From 6ba0a18ac9ac80e81d67d6ca4cdd5ea0e5ad0a4c Mon Sep 17 00:00:00 2001 From: zosimovaa Date: Thu, 12 Mar 2026 16:55:23 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A4=D0=B8=D0=BA=D1=81=20=D1=81=D0=BE=D1=81?= =?UTF-8?q?=D1=82=D0=BE=D1=8F=D0=BD=D0=B8=D1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 2 + README.md | 1306 ++++- README_old.md | 161 + app/__pycache__/__init__.cpython-312.pyc | Bin 112 -> 0 bytes app/__pycache__/main.cpython-312.pyc | Bin 2992 -> 0 bytes app/core/__pycache__/__init__.cpython-312.pyc | Bin 117 -> 0 bytes .../__pycache__/constants.cpython-312.pyc | Bin 292 -> 0 bytes .../error_handlers.cpython-312.pyc | Bin 2165 -> 0 bytes .../__pycache__/exceptions.cpython-312.pyc | Bin 761 -> 0 bytes .../__pycache__/logging_setup.cpython-312.pyc | Bin 3424 -> 0 bytes .../__pycache__/__init__.cpython-312.pyc | Bin 120 -> 0 bytes .../__pycache__/application.cpython-312.pyc | Bin 4404 -> 0 bytes .../__pycache__/contracts.cpython-312.pyc | Bin 2675 -> 0 bytes .../__pycache__/__init__.cpython-312.pyc | Bin 126 -> 0 bytes .../changeset_validator.cpython-312.pyc | Bin 1209 -> 0 bytes .../confluence_service.cpython-312.pyc | Bin 1385 -> 0 bytes .../agent/__pycache__/module.cpython-312.pyc | Bin 3542 -> 0 bytes .../__pycache__/prompt_loader.cpython-312.pyc | Bin 1366 -> 0 bytes .../repo_webhook_service.cpython-312.pyc | Bin 7828 -> 0 bytes .../__pycache__/repository.cpython-312.pyc | Bin 13987 -> 0 bytes .../agent/__pycache__/service.cpython-312.pyc | Bin 22893 -> 0 bytes .../story_context_repository.cpython-312.pyc | Bin 30273 -> 0 bytes .../story_session_recorder.cpython-312.pyc | Bin 4272 -> 0 bytes .../__pycache__/__init__.cpython-312.pyc | Bin 133 -> 0 bytes .../__pycache__/__init__.cpython-312.pyc | Bin 1441 -> 0 bytes .../analytics_graph.cpython-312.pyc | Bin 2398 -> 0 bytes .../__pycache__/base_graph.cpython-312.pyc | Bin 3712 -> 0 bytes .../code_change_graph.cpython-312.pyc | Bin 4383 -> 0 bytes .../docs_examples_loader.cpython-312.pyc | Bin 2505 -> 0 bytes .../__pycache__/docs_graph.cpython-312.pyc | Bin 9438 -> 0 bytes .../docs_graph_logic.cpython-312.pyc | Bin 31766 -> 0 bytes .../file_targeting.cpython-312.pyc | Bin 1732 -> 0 bytes .../__pycache__/progress.cpython-312.pyc | Bin 1929 -> 0 bytes .../progress_registry.cpython-312.pyc | Bin 1869 -> 0 bytes .../project_edits_contract.cpython-312.pyc | Bin 8575 -> 0 bytes .../project_edits_graph.cpython-312.pyc | Bin 6074 -> 0 bytes .../project_edits_logic.cpython-312.pyc | Bin 13936 -> 0 bytes .../project_edits_patcher.cpython-312.pyc | Bin 9223 -> 0 bytes .../project_edits_support.cpython-312.pyc | Bin 8954 -> 0 bytes .../project_qa_graph.cpython-312.pyc | Bin 2670 -> 0 bytes .../project_qa_step_graphs.cpython-312.pyc | Bin 13410 -> 0 bytes .../graphs/__pycache__/state.cpython-312.pyc | Bin 1659 -> 0 bytes .../__pycache__/__init__.cpython-312.pyc | Bin 659 -> 0 bytes .../artifact_store.cpython-312.pyc | Bin 2857 -> 0 bytes .../evidence_store.cpython-312.pyc | Bin 1138 -> 0 bytes .../execution_context.cpython-312.pyc | Bin 1777 -> 0 bytes .../execution_engine.cpython-312.pyc | Bin 9183 -> 0 bytes .../metrics_persister.cpython-312.pyc | Bin 1607 -> 0 bytes .../__pycache__/plan_compiler.cpython-312.pyc | Bin 2376 -> 0 bytes .../plan_validator.cpython-312.pyc | Bin 5108 -> 0 bytes .../__pycache__/quality_gates.cpython-312.pyc | Bin 11005 -> 0 bytes .../quality_metrics.cpython-312.pyc | Bin 7195 -> 0 bytes .../result_assembler.cpython-312.pyc | Bin 3831 -> 0 bytes .../__pycache__/service.cpython-312.pyc | Bin 6387 -> 0 bytes .../__pycache__/step_registry.cpython-312.pyc | Bin 10890 -> 0 bytes .../task_spec_builder.cpython-312.pyc | Bin 8209 -> 0 bytes .../template_registry.cpython-312.pyc | Bin 18928 -> 0 bytes .../__pycache__/__init__.cpython-312.pyc | Bin 983 -> 0 bytes .../code_explain_actions.cpython-312.pyc | Bin 3093 -> 0 bytes .../__pycache__/common.cpython-312.pyc | Bin 2131 -> 0 bytes .../__pycache__/docs_actions.cpython-312.pyc | Bin 6642 -> 0 bytes .../__pycache__/edit_actions.cpython-312.pyc | Bin 7472 -> 0 bytes .../explain_actions.cpython-312.pyc | Bin 19075 -> 0 bytes .../gherkin_actions.cpython-312.pyc | Bin 5353 -> 0 bytes .../project_qa_actions.cpython-312.pyc | Bin 9548 -> 0 bytes .../project_qa_analyzer.cpython-312.pyc | Bin 11166 -> 0 bytes .../project_qa_support.cpython-312.pyc | Bin 13388 -> 0 bytes .../review_actions.cpython-312.pyc | Bin 7826 -> 0 bytes .../__pycache__/__init__.cpython-312.pyc | Bin 1049 -> 0 bytes .../models/__pycache__/plan.cpython-312.pyc | Bin 4107 -> 0 bytes .../models/__pycache__/result.cpython-312.pyc | Bin 3137 -> 0 bytes .../__pycache__/task_spec.cpython-312.pyc | Bin 4791 -> 0 bytes .../__pycache__/__init__.cpython-312.pyc | Bin 3217 -> 0 bytes .../__pycache__/context_store.cpython-312.pyc | Bin 1591 -> 0 bytes .../intent_classifier.cpython-312.pyc | Bin 8276 -> 0 bytes .../intent_switch_detector.cpython-312.pyc | Bin 4057 -> 0 bytes .../__pycache__/registry.cpython-312.pyc | Bin 2865 -> 0 bytes .../router_service.cpython-312.pyc | Bin 5408 -> 0 bytes .../__pycache__/schemas.cpython-312.pyc | Bin 2132 -> 0 bytes .../llm/__pycache__/__init__.cpython-312.pyc | Bin 230 -> 0 bytes .../llm/__pycache__/service.cpython-312.pyc | Bin 2161 -> 0 bytes .../chat/__pycache__/__init__.cpython-312.pyc | Bin 125 -> 0 bytes .../__pycache__/dialog_store.cpython-312.pyc | Bin 1861 -> 0 bytes .../direct_service.cpython-312.pyc | Bin 4133 -> 0 bytes .../__pycache__/evidence_gate.cpython-312.pyc | Bin 4456 -> 0 bytes .../chat/__pycache__/module.cpython-312.pyc | Bin 7280 -> 0 bytes .../__pycache__/repository.cpython-312.pyc | Bin 4445 -> 0 bytes .../chat/__pycache__/service.cpython-312.pyc | Bin 15856 -> 0 bytes .../session_resolver.cpython-312.pyc | Bin 2253 -> 0 bytes .../__pycache__/task_store.cpython-312.pyc | Bin 2497 -> 0 bytes .../rag/__pycache__/__init__.cpython-312.pyc | Bin 477 -> 0 bytes .../__pycache__/__init__.cpython-312.pyc | Bin 688 -> 0 bytes .../__pycache__/documents.cpython-312.pyc | Bin 4241 -> 0 bytes .../__pycache__/enums.cpython-312.pyc | Bin 1671 -> 0 bytes .../__pycache__/evidence.cpython-312.pyc | Bin 948 -> 0 bytes .../__pycache__/retrieval.cpython-312.pyc | Bin 1258 -> 0 bytes .../__pycache__/__init__.cpython-312.pyc | Bin 1179 -> 0 bytes .../__pycache__/budgeter.cpython-312.pyc | Bin 3703 -> 0 bytes .../excerpt_planner.cpython-312.pyc | Bin 2847 -> 0 bytes .../graph_repository.cpython-312.pyc | Bin 10398 -> 0 bytes .../intent_builder.cpython-312.pyc | Bin 6777 -> 0 bytes .../layered_gateway.cpython-312.pyc | Bin 10952 -> 0 bytes .../__pycache__/models.cpython-312.pyc | Bin 4574 -> 0 bytes .../__pycache__/retriever_v2.cpython-312.pyc | Bin 15760 -> 0 bytes .../source_excerpt_fetcher.cpython-312.pyc | Bin 3107 -> 0 bytes .../__pycache__/trace_builder.cpython-312.pyc | Bin 6423 -> 0 bytes .../__pycache__/file_filter.cpython-312.pyc | Bin 1221 -> 0 bytes .../code/__pycache__/pipeline.cpython-312.pyc | Bin 4449 -> 0 bytes .../__pycache__/chunker.cpython-312.pyc | Bin 3071 -> 0 bytes .../document_builder.cpython-312.pyc | Bin 1608 -> 0 bytes .../document_builder.cpython-312.pyc | Bin 2231 -> 0 bytes .../__pycache__/extractor.cpython-312.pyc | Bin 7366 -> 0 bytes .../document_builder.cpython-312.pyc | Bin 2093 -> 0 bytes .../fastapi_detector.cpython-312.pyc | Bin 2030 -> 0 bytes .../flask_detector.cpython-312.pyc | Bin 1553 -> 0 bytes .../__pycache__/registry.cpython-312.pyc | Bin 1677 -> 0 bytes .../typer_click_detector.cpython-312.pyc | Bin 1644 -> 0 bytes .../code/entrypoints/fastapi_detector.py | 34 - .../__pycache__/ast_parser.cpython-312.pyc | Bin 770 -> 0 bytes .../document_builder.cpython-312.pyc | Bin 2527 -> 0 bytes .../__pycache__/extractor.cpython-312.pyc | Bin 9179 -> 0 bytes .../document_upserter.cpython-312.pyc | Bin 1348 -> 0 bytes .../common/__pycache__/report.cpython-312.pyc | Bin 1197 -> 0 bytes .../__pycache__/classifier.cpython-312.pyc | Bin 1255 -> 0 bytes .../document_builder.cpython-312.pyc | Bin 5550 -> 0 bytes .../__pycache__/file_filter.cpython-312.pyc | Bin 2221 -> 0 bytes .../docs/__pycache__/pipeline.cpython-312.pyc | Bin 10772 -> 0 bytes .../markdown_chunker.cpython-312.pyc | Bin 3657 -> 0 bytes .../__pycache__/text_chunker.cpython-312.pyc | Bin 1494 -> 0 bytes .../local_project_reader.cpython-312.pyc | Bin 4058 -> 0 bytes .../__pycache__/__init__.cpython-312.pyc | Bin 693 -> 0 bytes .../anchor_extractor.cpython-312.pyc | Bin 9195 -> 0 bytes .../anchor_span_validator.cpython-312.pyc | Bin 1539 -> 0 bytes .../__pycache__/classifier.cpython-312.pyc | Bin 7885 -> 0 bytes ...onversation_anchor_builder.cpython-312.pyc | Bin 2827 -> 0 bytes .../conversation_policy.cpython-312.pyc | Bin 3307 -> 0 bytes .../evidence_policy_factory.cpython-312.pyc | Bin 1613 -> 0 bytes .../__pycache__/factory.cpython-312.pyc | Bin 1625 -> 0 bytes .../followup_detector.cpython-312.pyc | Bin 1301 -> 0 bytes .../graph_id_resolver.cpython-312.pyc | Bin 755 -> 0 bytes .../keyword_hint_builder.cpython-312.pyc | Bin 2183 -> 0 bytes .../keyword_hint_sanitizer.cpython-312.pyc | Bin 3516 -> 0 bytes .../layer_query_builder.cpython-312.pyc | Bin 1817 -> 0 bytes .../__pycache__/local_runner.cpython-312.pyc | Bin 1898 -> 0 bytes .../__pycache__/logger.cpython-312.pyc | Bin 1643 -> 0 bytes .../__pycache__/models.cpython-312.pyc | Bin 10022 -> 0 bytes .../negation_detector.cpython-312.pyc | Bin 1129 -> 0 bytes .../__pycache__/normalization.cpython-312.pyc | Bin 4093 -> 0 bytes .../normalization_terms.cpython-312.pyc | Bin 2974 -> 0 bytes .../__pycache__/protocols.cpython-312.pyc | Bin 644 -> 0 bytes .../query_normalizer.cpython-312.pyc | Bin 266 -> 0 bytes .../query_plan_builder.cpython-312.pyc | Bin 13479 -> 0 bytes .../retrieval_filter_builder.cpython-312.pyc | Bin 6166 -> 0 bytes .../retrieval_spec_factory.cpython-312.pyc | Bin 5482 -> 0 bytes .../__pycache__/router.cpython-312.pyc | Bin 4382 -> 0 bytes .../sub_intent_detector.cpython-312.pyc | Bin 2635 -> 0 bytes .../__pycache__/symbol_rules.cpython-312.pyc | Bin 625 -> 0 bytes .../__pycache__/term_mapping.cpython-312.pyc | Bin 4258 -> 0 bytes .../test_signals.cpython-312-pytest-9.0.2.pyc | Bin 2417 -> 0 bytes .../rag/intent_router_v2/query_normalizer.py | 3 - app/modules/rag/intent_router_v2/router.py | 72 - .../intent_router_v2/sub_intent_detector.py | 23 - .../cache_repository.cpython-312.pyc | Bin 10281 -> 0 bytes .../document_repository.cpython-312.pyc | Bin 6718 -> 0 bytes .../job_repository.cpython-312.pyc | Bin 4141 -> 0 bytes .../query_repository.cpython-312.pyc | Bin 7880 -> 0 bytes .../__pycache__/repository.cpython-312.pyc | Bin 6202 -> 0 bytes ...etrieval_statement_builder.cpython-312.pyc | Bin 10109 -> 0 bytes .../schema_repository.cpython-312.pyc | Bin 10493 -> 0 bytes .../session_repository.cpython-312.pyc | Bin 2547 -> 0 bytes .../rag/persistence/query_repository.py | 72 - .../__pycache__/query_router.cpython-312.pyc | Bin 2285 -> 0 bytes .../__pycache__/query_terms.cpython-312.pyc | Bin 2640 -> 0 bytes .../test_filter.cpython-312-pytest-9.0.2.pyc | Bin 4854 -> 0 bytes .../__pycache__/test_filter.cpython-312.pyc | Bin 4431 -> 0 bytes .../__pycache__/rag_service.cpython-312.pyc | Bin 11750 -> 0 bytes app/modules/rag_repo/README.md | 56 - .../__pycache__/__init__.cpython-312.pyc | Bin 265 -> 0 bytes .../__pycache__/module.cpython-312.pyc | Bin 1806 -> 0 bytes .../webhook_service.cpython-312.pyc | Bin 9854 -> 0 bytes app/modules/rag_repo/module.py | 24 - app/modules/rag_session/README.md | 218 - .../__pycache__/__init__.cpython-312.pyc | Bin 124 -> 0 bytes .../indexing_service.cpython-312.pyc | Bin 7716 -> 0 bytes .../__pycache__/job_store.cpython-312.pyc | Bin 3863 -> 0 bytes .../__pycache__/module.cpython-312.pyc | Bin 16053 -> 0 bytes .../__pycache__/repository.cpython-312.pyc | Bin 31339 -> 0 bytes .../__pycache__/service.cpython-312.pyc | Bin 11562 -> 0 bytes .../__pycache__/session_store.cpython-312.pyc | Bin 2083 -> 0 bytes .../__pycache__/__init__.cpython-312.pyc | Bin 134 -> 0 bytes .../gigachat_embedder.cpython-312.pyc | Bin 888 -> 0 bytes app/modules/rag_session/repository.py | 4 - .../__pycache__/__init__.cpython-312.pyc | Bin 134 -> 0 bytes .../__pycache__/chunker.cpython-312.pyc | Bin 1399 -> 0 bytes .../__pycache__/scoring.cpython-312.pyc | Bin 1363 -> 0 bytes app/modules/rag_session/service.py | 3 - app/modules/shared/__init__.py | 0 .../__pycache__/__init__.cpython-312.pyc | Bin 127 -> 0 bytes .../__pycache__/bootstrap.cpython-312.pyc | Bin 1005 -> 0 bytes .../__pycache__/checkpointer.cpython-312.pyc | Bin 1365 -> 0 bytes .../shared/__pycache__/db.cpython-312.pyc | Bin 1300 -> 0 bytes .../__pycache__/env_loader.cpython-312.pyc | Bin 2163 -> 0 bytes .../__pycache__/event_bus.cpython-312.pyc | Bin 4503 -> 0 bytes .../idempotency_store.cpython-312.pyc | Bin 2578 -> 0 bytes .../retry_executor.cpython-312.pyc | Bin 1296 -> 0 bytes app/modules/shared/gigachat/__init__.py | 0 .../__pycache__/__init__.cpython-312.pyc | Bin 136 -> 0 bytes .../__pycache__/client.cpython-312.pyc | Bin 4754 -> 0 bytes .../__pycache__/errors.cpython-312.pyc | Bin 322 -> 0 bytes .../__pycache__/settings.cpython-312.pyc | Bin 1692 -> 0 bytes .../token_provider.cpython-312.pyc | Bin 3393 -> 0 bytes app/schemas/__init__.py | 0 .../__pycache__/__init__.cpython-312.pyc | Bin 120 -> 0 bytes .../__pycache__/changeset.cpython-312.pyc | Bin 3786 -> 0 bytes app/schemas/__pycache__/chat.cpython-312.pyc | Bin 3980 -> 0 bytes .../__pycache__/common.cpython-312.pyc | Bin 765 -> 0 bytes .../__pycache__/indexing.cpython-312.pyc | Bin 2792 -> 0 bytes .../__pycache__/rag_sessions.cpython-312.pyc | Bin 1624 -> 0 bytes architecture_as_is.md | 422 ++ iteration2_calibration_harness_report.md | 267 + pyproject.toml | 24 + pytest.ini | 3 + rag_structure_report.md | 323 ++ {app => src/app}/__init__.py | 0 {app => src/app}/core/__init__.py | 0 {app => src/app}/core/constants.py | 0 {app => src/app}/core/error_handlers.py | 0 {app => src/app}/core/exceptions.py | 0 {app => src/app}/core/logging_setup.py | 0 {app => src/app}/main.py | 4 +- {app => src/app}/modules/__init__.py | 0 {app => src/app}/modules/agent/README.md | 0 {app => src/app}/modules/agent/__init__.py | 0 .../app}/modules/agent/changeset_validator.py | 0 .../modules/agent/code_qa_runtime/__init__.py | 15 + .../agent/code_qa_runtime/answer_policy.py | 62 + .../modules/agent/code_qa_runtime/executor.py | 309 + .../modules/agent/code_qa_runtime/models.py | 73 + .../agent/code_qa_runtime/post_gate.py | 23 + .../code_qa_runtime/prompt_payload_builder.py | 37 + .../agent/code_qa_runtime/prompt_selector.py | 19 + .../modules/agent/code_qa_runtime/repair.py | 33 + .../agent/code_qa_runtime/repo_context.py | 36 + .../code_qa_runtime/retrieval_adapter.py | 241 + .../app}/modules/agent/confluence_service.py | 0 .../app}/modules/agent/engine/__init__.py | 0 .../modules/agent/engine/graphs/__init__.py | 5 + .../modules/agent/engine/graphs/base_graph.py | 0 .../agent/engine/graphs/code_qa_graph.py | 45 + .../engine/graphs/docs_examples_loader.py | 0 .../modules/agent/engine/graphs/docs_graph.py | 0 .../agent/engine/graphs/docs_graph_logic.py | 0 .../agent/engine/graphs/file_targeting.py | 0 .../modules/agent/engine/graphs/progress.py | 0 .../agent/engine/graphs/progress_registry.py | 0 .../engine/graphs/project_edits_contract.py | 0 .../engine/graphs/project_edits_graph.py | 0 .../engine/graphs/project_edits_logic.py | 0 .../engine/graphs/project_edits_patcher.py | 0 .../engine/graphs/project_edits_support.py | 0 .../agent/engine/graphs/project_qa_graph.py | 0 .../engine/graphs/project_qa_step_graphs.py | 0 .../app}/modules/agent/engine/graphs/state.py | 0 .../agent/engine/orchestrator/__init__.py | 0 .../engine/orchestrator/actions/__init__.py | 0 .../actions/code_explain_actions.py | 0 .../engine/orchestrator/actions/common.py | 0 .../orchestrator/actions/docs_actions.py | 0 .../orchestrator/actions/edit_actions.py | 0 .../orchestrator/actions/explain_actions.py | 0 .../orchestrator/actions/gherkin_actions.py | 0 .../actions/project_qa_actions.py | 0 .../actions/project_qa_analyzer.py | 0 .../actions/project_qa_support.py | 0 .../orchestrator/actions/review_actions.py | 0 .../engine/orchestrator/artifact_store.py | 0 .../engine/orchestrator/evidence_store.py | 0 .../engine/orchestrator/execution_context.py | 0 .../engine/orchestrator/execution_engine.py | 0 .../engine/orchestrator/metrics_persister.py | 0 .../engine/orchestrator/models/__init__.py | 0 .../agent/engine/orchestrator/models/plan.py | 0 .../engine/orchestrator/models/result.py | 0 .../engine/orchestrator/models/task_spec.py | 0 .../engine/orchestrator/plan_compiler.py | 0 .../engine/orchestrator/plan_validator.py | 0 .../engine/orchestrator/quality_gates.py | 0 .../engine/orchestrator/quality_metrics.py | 0 .../engine/orchestrator/result_assembler.py | 0 .../agent/engine/orchestrator/service.py | 0 .../engine/orchestrator/step_registry.py | 0 .../engine/orchestrator/task_spec_builder.py | 0 .../engine/orchestrator/template_registry.py | 67 +- .../modules/agent/engine/router/__init__.py | 2 + .../agent/engine/router/context_store.py | 0 .../agent/engine/router/intent_classifier.py | 0 .../engine/router/intent_switch_detector.py | 0 .../agent/engine/router/intents_registry.yaml | 0 .../modules/agent/engine/router/registry.py | 0 .../agent/engine/router/router_service.py | 0 .../modules/agent/engine/router/schemas.py | 0 .../app}/modules/agent/llm/__init__.py | 0 {app => src/app}/modules/agent/llm/service.py | 0 {app => src/app}/modules/agent/module.py | 0 .../app}/modules/agent/prompt_loader.py | 0 .../agent/prompts/code_explain_answer_v2.txt | 0 .../prompts/code_qa_architecture_answer.txt | 25 + .../agent/prompts/code_qa_degraded_answer.txt | 3 + .../agent/prompts/code_qa_explain_answer.txt | 26 + .../prompts/code_qa_explain_local_answer.txt | 23 + .../code_qa_find_entrypoints_answer.txt | 27 + .../prompts/code_qa_find_tests_answer.txt | 24 + .../agent/prompts/code_qa_general_answer.txt | 24 + .../prompts/code_qa_open_file_answer.txt | 26 + .../agent/prompts/code_qa_repair_answer.txt | 3 + .../prompts/code_qa_trace_flow_answer.txt | 23 + .../modules/agent/prompts/docs_detect.txt | 0 .../docs_examples/from_scratch_example.md | 0 .../incremental_update_example.md | 0 .../agent/prompts/docs_execution_summary.txt | 0 .../modules/agent/prompts/docs_generation.txt | 0 .../agent/prompts/docs_plan_sections.txt | 0 .../modules/agent/prompts/docs_self_check.txt | 0 .../modules/agent/prompts/docs_strategy.txt | 0 .../modules/agent/prompts/general_answer.txt | 0 .../modules/agent/prompts/project_answer.txt | 0 .../agent/prompts/project_edits_hunks.txt | 0 .../agent/prompts/project_edits_plan.txt | 0 .../prompts/project_edits_self_check.txt | 0 .../agent/prompts/rag_intent_router_v2.txt | 0 .../modules/agent/prompts/router_intent.txt | 0 {app => src/app}/modules/agent/repository.py | 0 {app => src/app}/modules/agent/service.py | 0 .../modules/agent/story_context_repository.py | 0 .../modules/agent/story_session_recorder.py | 0 {app => src/app}/modules/application.py | 13 +- {app => src/app}/modules/chat/README.md | 0 {app => src/app}/modules/chat/__init__.py | 0 {app => src/app}/modules/chat/dialog_store.py | 0 .../app}/modules/chat/direct_service.py | 0 .../app}/modules/chat/evidence_gate.py | 0 {app => src/app}/modules/chat/module.py | 2 +- {app => src/app}/modules/chat/repository.py | 0 {app => src/app}/modules/chat/service.py | 0 .../app}/modules/chat/session_resolver.py | 0 {app => src/app}/modules/chat/task_store.py | 0 {app => src/app}/modules/contracts.py | 0 {app => src/app}/modules/rag/README.md | 0 {app => src/app}/modules/rag/__init__.py | 0 .../modules/rag/code_qa_pipeline/__init__.py | 37 + .../rag/code_qa_pipeline/answer_synthesis.py | 58 + .../modules/rag/code_qa_pipeline/contracts.py | 169 + .../rag/code_qa_pipeline/diagnostics.py | 120 + .../evidence_bundle_builder.py | 57 + .../rag/code_qa_pipeline/evidence_gate.py | 75 + .../modules/rag/code_qa_pipeline/pipeline.py | 237 + .../retrieval_request_builder.py | 25 + .../retrieval_result_builder.py | 100 + .../app}/modules/rag/contracts/__init__.py | 0 .../app}/modules/rag/contracts/documents.py | 0 .../app}/modules/rag/contracts/enums.py | 4 +- .../app}/modules/rag/contracts/evidence.py | 0 .../app}/modules/rag/contracts/retrieval.py | 0 src/app/modules/rag/embedding/__init__.py | 5 + .../rag}/embedding/gigachat_embedder.py | 2 + .../app}/modules/rag/explain/__init__.py | 0 .../app}/modules/rag/explain/budgeter.py | 0 .../modules/rag/explain/excerpt_planner.py | 0 .../modules/rag/explain/graph_repository.py | 0 .../modules/rag/explain/intent_builder.py | 0 .../modules/rag/explain/layered_gateway.py | 2 +- .../app}/modules/rag/explain/models.py | 0 .../app}/modules/rag/explain/retriever_v2.py | 0 .../rag/explain/source_excerpt_fetcher.py | 0 .../app}/modules/rag/explain/trace_builder.py | 2 +- .../rag/indexing/code/code_text/chunker.py | 0 .../code/code_text/document_builder.py | 1 - .../code/edges/dataflow_document_builder.py | 43 + .../code/edges/dataflow_slice_builder.py | 213 + .../indexing/code/edges/document_builder.py | 2 - .../rag/indexing/code/edges/extractor.py | 52 +- .../code/entrypoints/document_builder.py | 25 +- .../entrypoints/execution_trace_builder.py | 126 + .../execution_trace_document_builder.py | 43 + .../code/entrypoints/fastapi_detector.py | 75 + .../code/entrypoints/flask_detector.py | 0 .../rag/indexing/code/entrypoints/registry.py | 7 + .../code/entrypoints/typer_click_detector.py | 0 .../modules/rag/indexing/code/file_filter.py | 4 + .../modules/rag/indexing/code/pipeline.py | 29 +- .../rag/indexing/code/roles/__init__.py | 9 + .../rag/indexing/code/roles/builder.py | 41 + .../indexing/code/roles/document_builder.py | 42 + .../modules/rag/indexing/code/roles/models.py | 16 + .../modules/rag/indexing/code/roles/scorer.py | 205 + .../rag/indexing/code/symbols/ast_parser.py | 0 .../indexing/code/symbols/document_builder.py | 5 - .../rag/indexing/code/symbols/extractor.py | 8 +- .../rag/indexing/common/document_upserter.py | 0 .../rag/indexing/common/path_filter.py | 60 + .../modules/rag/indexing/common/report.py | 0 .../docs/chunkers/markdown_chunker.py | 0 .../indexing/docs/chunkers/text_chunker.py | 0 .../modules/rag/indexing/docs/classifier.py | 0 .../rag/indexing/docs/document_builder.py | 0 .../modules/rag/indexing/docs/file_filter.py | 4 + .../modules/rag/indexing/docs/pipeline.py | 0 .../app/modules/rag}/indexing_service.py | 19 +- {app => src/app}/modules/rag/intent_router.md | 0 .../modules/rag/intent_router_v2/__init__.py | 0 .../rag/intent_router_v2/analysis/__init__.py | 4 + .../analysis}/anchor_extractor.py | 6 +- .../analysis}/anchor_span_validator.py | 0 .../analysis}/conversation_anchor_builder.py | 2 +- .../analysis}/followup_detector.py | 0 .../analysis}/keyword_hint_builder.py | 4 +- .../analysis}/keyword_hint_sanitizer.py | 0 .../analysis}/negation_detector.py | 0 .../analysis}/normalization.py | 0 .../analysis}/normalization_terms.py | 0 .../analysis/query_normalizer.py | 3 + .../analysis}/query_plan_builder.py | 106 +- .../analysis/sub_intent_detector.py | 116 + .../analysis}/symbol_rules.py | 0 .../analysis}/term_mapping.py | 2 +- .../analysis}/test_signals.py | 0 .../modules/rag/intent_router_v2/factory.py | 2 +- .../rag/intent_router_v2/intent/__init__.py | 5 + .../intent_router_v2/intent}/classifier.py | 22 +- .../intent}/conversation_policy.py | 22 +- .../intent}/graph_id_resolver.py | 0 .../rag/intent_router_v2/local_runner.py | 0 .../modules/rag/intent_router_v2/logger.py | 4 +- .../modules/rag/intent_router_v2/models.py | 41 +- .../modules/rag/intent_router_v2/protocols.py | 0 .../modules/rag/intent_router_v2/readme.md | 37 + .../intent_router_v2/retrieval/__init__.py | 4 + .../retrieval}/evidence_policy_factory.py | 4 + .../retrieval}/layer_query_builder.py | 0 .../retrieval_constraints_factory.py | 118 + .../retrieval}/retrieval_filter_builder.py | 10 +- .../retrieval}/retrieval_spec_factory.py | 66 +- .../modules/rag/intent_router_v2/router.py | 115 + .../app/modules/rag}/job_store.py | 4 +- .../app/modules/rag}/module.py | 45 +- .../rag/persistence/cache_repository.py | 0 .../rag/persistence/document_repository.py | 0 .../modules/rag/persistence/job_repository.py | 0 .../rag/persistence/query_repository.py | 141 + .../modules/rag/persistence/repository.py | 25 + .../retrieval_statement_builder.py | 94 +- .../rag/persistence/schema_repository.py | 0 .../rag/persistence/session_repository.py | 0 .../app/modules/rag}/retrieval/chunker.py | 3 + .../app}/modules/rag/retrieval/query_terms.py | 0 .../app/modules/rag}/retrieval/scoring.py | 2 + .../app}/modules/rag/retrieval/test_filter.py | 0 .../app}/modules/rag/services/rag_service.py | 22 +- .../app/modules/rag}/session_store.py | 4 +- .../app/modules/rag}/webhook_service.py | 2 + {app => src/app}/modules/shared/README.md | 0 .../app/modules/shared}/__init__.py | 0 {app => src/app}/modules/shared/bootstrap.py | 0 .../app}/modules/shared/checkpointer.py | 0 {app => src/app}/modules/shared/db.py | 0 {app => src/app}/modules/shared/env_loader.py | 0 {app => src/app}/modules/shared/event_bus.py | 0 .../app/modules/shared/gigachat}/__init__.py | 0 .../app}/modules/shared/gigachat/client.py | 0 .../app}/modules/shared/gigachat/errors.py | 0 .../app}/modules/shared/gigachat/settings.py | 0 .../modules/shared/gigachat/token_provider.py | 0 .../app}/modules/shared/idempotency_store.py | 0 .../app}/modules/shared/retry_executor.py | 0 .../retrieval => src/app/schemas}/__init__.py | 0 {app => src/app}/schemas/changeset.py | 0 {app => src/app}/schemas/chat.py | 0 {app => src/app}/schemas/common.py | 0 {app => src/app}/schemas/indexing.py | 0 {app => src/app}/schemas/rag_sessions.py | 0 tests/README.md | 16 + .../conftest.cpython-312-pytest-9.0.2.pyc | Bin 698 -> 727 bytes ..._client_retry.cpython-312-pytest-9.0.2.pyc | Bin 3697 -> 0 bytes ...rvice_logging.cpython-312-pytest-9.0.2.pyc | Bin 6843 -> 0 bytes ...logging_setup.cpython-312-pytest-9.0.2.pyc | Bin 3756 -> 0 bytes ...bhook_service.cpython-312-pytest-9.0.2.pyc | Bin 10659 -> 0 bytes ...sion_recorder.cpython-312-pytest-9.0.2.pyc | Bin 5853 -> 0 bytes ...intent_policy.cpython-312-pytest-9.0.2.pyc | Bin 17888 -> 0 bytes ...plain_actions.cpython-312-pytest-9.0.2.pyc | Bin 5471 -> 0 bytes ...ensitive_path.cpython-312-pytest-9.0.2.pyc | Bin 4115 -> 0 bytes ...st_eval_suite.cpython-312-pytest-9.0.2.pyc | Bin 5126 -> 0 bytes .../test_eval_suite.cpython-312.pyc | Bin 3000 -> 0 bytes ...plain_actions.cpython-312-pytest-9.0.2.pyc | Bin 10157 -> 0 bytes ...rator_service.cpython-312-pytest-9.0.2.pyc | Bin 14323 -> 0 bytes .../test_orchestrator_service.cpython-312.pyc | Bin 4010 -> 0 bytes ...lan_validator.cpython-312-pytest-9.0.2.pyc | Bin 2749 -> 0 bytes .../test_plan_validator.cpython-312.pyc | Bin 1947 -> 0 bytes ...ct_qa_actions.cpython-312-pytest-9.0.2.pyc | Bin 6079 -> 0 bytes ...swer_graph_v2.cpython-312-pytest-9.0.2.pyc | Bin 4549 -> 0 bytes ...graph_v2_only.cpython-312-pytest-9.0.2.pyc | Bin 3171 -> 0 bytes ...ality_metrics.cpython-312-pytest-9.0.2.pyc | Bin 7250 -> 0 bytes ..._expectations.cpython-312-pytest-9.0.2.pyc | Bin 3834 -> 0 bytes ...late_registry.cpython-312-pytest-9.0.2.pyc | Bin 13569 -> 0 bytes .../test_template_registry.cpython-312.pyc | Bin 2997 -> 0 bytes ..._code_explain.cpython-312-pytest-9.0.2.pyc | Bin 5555 -> 0 bytes ...at_api_simple_code_explain.cpython-312.pyc | Bin 4136 -> 0 bytes ...irect_service.cpython-312-pytest-9.0.2.pyc | Bin 7347 -> 0 bytes .../test_direct_service.cpython-312.pyc | Bin 4002 -> 0 bytes tests/conftest.py | 5 +- tests/pipeline_setup/README.md | 115 + tests/pipeline_setup/__init__.py | 1 + tests/pipeline_setup/conftest.py | 5 + tests/pipeline_setup/env_loader.py | 42 + .../suite_01_synthetic/README.md | 63 + .../suite_01_synthetic/__init__.py | 1 + .../suite_01_synthetic/code_qa_eval/README.md | 35 + .../code_qa_eval/__init__.py | 1 + .../code_qa_eval/artifacts.py | 152 + .../suite_01_synthetic/code_qa_eval/config.py | 41 + .../code_qa_eval/golden_loader.py | 51 + .../suite_01_synthetic/code_qa_eval/run.py | 111 + .../suite_01_synthetic/code_qa_eval/runner.py | 102 + .../code_qa_eval/test_eval_harness.py | 189 + .../fixtures/code_qa_repo/main.py | 17 + .../code_qa_repo/src/order_app/__init__.py | 1 + .../src/order_app/api/__init__.py | 3 + .../code_qa_repo/src/order_app/api/orders.py | 30 + .../src/order_app/domain/__init__.py | 3 + .../src/order_app/domain/order.py | 11 + .../src/order_app/repositories/__init__.py | 3 + .../repositories/order_repository.py | 14 + .../src/order_app/services/__init__.py | 3 + .../src/order_app/services/order_service.py | 16 + .../src/order_app/utils/__init__.py | 3 + .../src/order_app/utils/helpers.py | 6 + .../code_qa_repo/tests/test_order_service.py | 35 + .../golden/code_qa/README.md | 13 + .../golden/code_qa/cases.yaml | 142 + .../20260311_232925_explain_borderline.json | 79 + .../20260311_232925_explain_borderline.md | 35 + .../20260311_232925_explain_negative.json | 87 + .../20260311_232925_explain_negative.md | 35 + ...0260311_232925_explain_order_positive.json | 61 + .../20260311_232925_explain_order_positive.md | 32 + ...232925_explain_order_service_positive.json | 61 + ...1_232925_explain_order_service_positive.md | 32 + ...11_232925_find_entrypoints_borderline.json | 82 + ...0311_232925_find_entrypoints_borderline.md | 36 + ...60311_232925_find_entrypoints_english.json | 61 + ...0260311_232925_find_entrypoints_english.md | 32 + ...0311_232925_find_entrypoints_positive.json | 82 + ...260311_232925_find_entrypoints_positive.md | 36 + ...20260311_232925_find_tests_borderline.json | 69 + .../20260311_232925_find_tests_borderline.md | 32 + .../20260311_232925_find_tests_negative.json | 71 + .../20260311_232925_find_tests_negative.md | 35 + ...0311_232925_find_tests_order_positive.json | 69 + ...260311_232925_find_tests_order_positive.md | 32 + .../20260311_232925_find_tests_positive.json | 69 + .../20260311_232925_find_tests_positive.md | 32 + ...20260311_232925_general_qa_borderline.json | 87 + .../20260311_232925_general_qa_borderline.md | 35 + .../20260311_232925_general_qa_how.json | 87 + .../20260311_232925_general_qa_how.md | 35 + .../20260311_232925_general_qa_positive.json | 80 + .../20260311_232925_general_qa_positive.md | 36 + ...0260311_232925_open_file_api_positive.json | 57 + .../20260311_232925_open_file_api_positive.md | 32 + .../20260311_232925_open_file_borderline.json | 63 + .../20260311_232925_open_file_borderline.md | 35 + ...260311_232925_open_file_main_positive.json | 57 + ...20260311_232925_open_file_main_positive.md | 32 + .../20260311_232925_open_file_negative.json | 62 + .../20260311_232925_open_file_negative.md | 35 + .../20260311_233701_explain_borderline.json | 79 + .../20260311_233701_explain_borderline.md | 35 + .../20260311_233701_explain_negative.json | 87 + .../20260311_233701_explain_negative.md | 35 + ...0260311_233701_explain_order_positive.json | 61 + .../20260311_233701_explain_order_positive.md | 32 + ...233701_explain_order_service_positive.json | 61 + ...1_233701_explain_order_service_positive.md | 32 + ...11_233701_find_entrypoints_borderline.json | 82 + ...0311_233701_find_entrypoints_borderline.md | 36 + ...60311_233701_find_entrypoints_english.json | 61 + ...0260311_233701_find_entrypoints_english.md | 32 + ...0311_233701_find_entrypoints_positive.json | 82 + ...260311_233701_find_entrypoints_positive.md | 36 + ...20260311_233701_find_tests_borderline.json | 69 + .../20260311_233701_find_tests_borderline.md | 32 + .../20260311_233701_find_tests_negative.json | 71 + .../20260311_233701_find_tests_negative.md | 35 + ...0311_233701_find_tests_order_positive.json | 69 + ...260311_233701_find_tests_order_positive.md | 32 + .../20260311_233701_find_tests_positive.json | 69 + .../20260311_233701_find_tests_positive.md | 32 + ...20260311_233701_general_qa_borderline.json | 87 + .../20260311_233701_general_qa_borderline.md | 35 + .../20260311_233701_general_qa_how.json | 87 + .../20260311_233701_general_qa_how.md | 35 + .../20260311_233701_general_qa_positive.json | 80 + .../20260311_233701_general_qa_positive.md | 36 + ...0260311_233701_open_file_api_positive.json | 57 + .../20260311_233701_open_file_api_positive.md | 32 + .../20260311_233701_open_file_borderline.json | 63 + .../20260311_233701_open_file_borderline.md | 35 + ...260311_233701_open_file_main_positive.json | 57 + ...20260311_233701_open_file_main_positive.md | 32 + .../20260311_233701_open_file_negative.json | 62 + .../20260311_233701_open_file_negative.md | 35 + .../20260311_233942_explain_borderline.json | 79 + .../20260311_233942_explain_borderline.md | 35 + .../20260311_233942_explain_negative.json | 87 + .../20260311_233942_explain_negative.md | 35 + ...0260311_233942_explain_order_positive.json | 61 + .../20260311_233942_explain_order_positive.md | 32 + ...233942_explain_order_service_positive.json | 61 + ...1_233942_explain_order_service_positive.md | 32 + ...11_233942_find_entrypoints_borderline.json | 82 + ...0311_233942_find_entrypoints_borderline.md | 36 + ...60311_233942_find_entrypoints_english.json | 61 + ...0260311_233942_find_entrypoints_english.md | 32 + ...0311_233942_find_entrypoints_positive.json | 82 + ...260311_233942_find_entrypoints_positive.md | 36 + ...20260311_233942_find_tests_borderline.json | 69 + .../20260311_233942_find_tests_borderline.md | 32 + .../20260311_233942_find_tests_negative.json | 71 + .../20260311_233942_find_tests_negative.md | 35 + ...0311_233942_find_tests_order_positive.json | 69 + ...260311_233942_find_tests_order_positive.md | 32 + .../20260311_233942_find_tests_positive.json | 69 + .../20260311_233942_find_tests_positive.md | 32 + ...20260311_233942_general_qa_borderline.json | 87 + .../20260311_233942_general_qa_borderline.md | 35 + .../20260311_233942_general_qa_how.json | 87 + .../20260311_233942_general_qa_how.md | 35 + .../20260311_233942_general_qa_positive.json | 80 + .../20260311_233942_general_qa_positive.md | 36 + ...0260311_233942_open_file_api_positive.json | 57 + .../20260311_233942_open_file_api_positive.md | 32 + .../20260311_233942_open_file_borderline.json | 63 + .../20260311_233942_open_file_borderline.md | 35 + ...260311_233942_open_file_main_positive.json | 57 + ...20260311_233942_open_file_main_positive.md | 32 + .../20260311_233942_open_file_negative.json | 62 + .../20260311_233942_open_file_negative.md | 35 + .../20260311_233942/console_output.txt | 65 + .../code_qa_eval/summary_20260311_232925.md | 36 + .../code_qa_eval/summary_20260311_233701.md | 40 + .../code_qa_eval/summary_20260311_233942.md | 40 + .../suite_02_pipeline/README.md | 108 + .../suite_02_pipeline/__init__.py | 1 + .../suite_02_pipeline/cli/__init__.py | 1 + .../suite_02_pipeline/cli/index_repo.py | 36 + .../suite_02_pipeline/cli/run_full_chain.py | 46 + .../suite_02_pipeline/cli/run_router_only.py | 35 + .../suite_02_pipeline/cli/run_router_rag.py | 45 + .../pipeline_intent_rag/.env.test | 12 + .../pipeline_intent_rag/.env.test.example | 12 + .../pipeline_intent_rag/README.md | 82 + .../pipeline_intent_rag/__init__.py | 1 + .../pipeline_intent_rag/__main__.py | 5 + .../pipeline_intent_rag/cli.py | 241 + .../pipeline_intent_rag/fixtures/phrases.yaml | 70 + .../pipeline_intent_rag/helpers}/__init__.py | 0 .../helpers/answer_policy.py | 121 + .../helpers/answer_quality.py | 71 + .../helpers/artifact_writer.py | 23 + .../helpers/diagnostics.py | 247 + .../helpers/env_bootstrap.py | 36 + .../helpers/llm_answerer.py | 64 + .../helpers/llm_prompt_loader.py | 71 + .../pipeline_intent_rag/helpers/models.py | 126 + .../helpers/phrases_loader.py | 45 + .../helpers/pipeline_config.py | 60 + .../helpers/pipeline_runner.py | 171 + .../helpers/prompt_payload_builder.py | 148 + .../helpers/rag_db_adapter.py | 745 +++ .../helpers/repo_indexer.py | 11 + .../helpers/result_views.py | 127 + .../pipeline_intent_rag/helpers/runtime.py | 135 + .../helpers/session_resolver.py | 37 + .../test_answer_quality.py | 32 + .../test_canonical_code_qa_pipeline.py | 202 + .../pipeline_intent_rag/test_cli.py | 65 + .../test_diagnostics_jsonl.py | 368 ++ .../test_intent_router_only_matrix.py | 20 + .../test_intent_router_rag_llm_pipeline.py | 31 + .../test_intent_router_rag_pipeline.py | 27 + .../test_llm_answerer_context.py | 80 + .../test_llm_prompt_catalog.py | 49 + .../test_phrase_catalog.py | 25 + .../test_rag_db_adapter.py | 312 + .../test_repo_indexer_collector.py | 18 + .../test_router_constraints_contract.py | 140 + .../test_runtime_full_chain_output.py | 250 + tests/pipeline_setup/utils/__init__.py | 1 + .../utils/rag_indexer/__init__.py | 11 + .../utils/rag_indexer/indexer.py | 108 + tests/pipeline_setup_v2/README.md | 118 + tests/pipeline_setup_v2/__init__.py | 1 + .../suite_01_synthetic/code_qa_eval.yaml | 80 + .../full_chain_plba_code_retrieval.yaml | 96 + .../full_chain_plba_code_subintents.yaml | 110 + .../full_chain_plba_code_subintents_v2.yaml | 305 + .../suite_02_pipeline/full_chain_smoke.yaml | 17 + .../router_only_plba_code_retrieval.yaml | 123 + .../suite_02_pipeline/router_only_smoke.yaml | 16 + .../router_rag_plba_code_retrieval.yaml | 148 + .../suite_02_pipeline/router_rag_smoke.yaml | 23 + tests/pipeline_setup_v2/core/__init__.py | 1 + tests/pipeline_setup_v2/core/artifacts.py | 144 + tests/pipeline_setup_v2/core/case_loader.py | 106 + tests/pipeline_setup_v2/core/models.py | 82 + tests/pipeline_setup_v2/core/runner.py | 62 + .../core/session_provider.py | 32 + .../pipeline_setup_v2/core/test_validators.py | 110 + tests/pipeline_setup_v2/core/validators.py | 101 + tests/pipeline_setup_v2/llm_prompts.yaml | 147 + tests/pipeline_setup_v2/run.py | 42 + tests/pipeline_setup_v2/runtime/__init__.py | 1 + .../runtime/code_qa_eval_adapter.py | 56 + .../runtime/runtime_adapter.py | 154 + ...llchain-explain-control-plane-service.json | 2532 +++++++++ ...fullchain-explain-control-plane-service.md | 34 + ...ullchain-explain-http-control-channel.json | 2564 +++++++++ ...-fullchain-explain-http-control-channel.md | 34 + ...lba-fullchain-explain-runtime-manager.json | 2564 +++++++++ ..._plba-fullchain-explain-runtime-manager.md | 34 + .../20260312_090854/summary.md | 9 + ...llchain-explain-control-plane-service.json | 2532 +++++++++ ...fullchain-explain-control-plane-service.md | 34 + ...plba-fullchain-explain-create-runtime.json | 2372 ++++++++ ...l_plba-fullchain-explain-create-runtime.md | 34 + ...ullchain-explain-http-control-channel.json | 2564 +++++++++ ...-fullchain-explain-http-control-channel.md | 34 + ...lba-fullchain-explain-runtime-manager.json | 2564 +++++++++ ..._plba-fullchain-explain-runtime-manager.md | 34 + ..._plba-fullchain-explain-trace-service.json | 2684 +++++++++ ...al_plba-fullchain-explain-trace-service.md | 34 + ...lba-fullchain-explain-workflow-engine.json | 2634 +++++++++ ..._plba-fullchain-explain-workflow-engine.md | 34 + .../20260312_091150/summary.md | 20 + ...llchain-explain-control-plane-service.json | 2532 +++++++++ ...fullchain-explain-control-plane-service.md | 34 + ...plba-fullchain-explain-create-runtime.json | 2372 ++++++++ ...l_plba-fullchain-explain-create-runtime.md | 34 + ...ullchain-explain-http-control-channel.json | 2564 +++++++++ ...-fullchain-explain-http-control-channel.md | 34 + ...lba-fullchain-explain-runtime-manager.json | 2564 +++++++++ ..._plba-fullchain-explain-runtime-manager.md | 34 + ..._plba-fullchain-explain-trace-service.json | 2684 +++++++++ ...al_plba-fullchain-explain-trace-service.md | 34 + ...lba-fullchain-explain-workflow-engine.json | 2634 +++++++++ ..._plba-fullchain-explain-workflow-engine.md | 34 + .../20260312_091314/summary.md | 24 + ...llchain-explain-control-plane-service.json | 2532 +++++++++ ...fullchain-explain-control-plane-service.md | 34 + ...plba-fullchain-explain-create-runtime.json | 2372 ++++++++ ...l_plba-fullchain-explain-create-runtime.md | 34 + ...ullchain-explain-http-control-channel.json | 2564 +++++++++ ...-fullchain-explain-http-control-channel.md | 34 + ...lba-fullchain-explain-runtime-manager.json | 2564 +++++++++ ..._plba-fullchain-explain-runtime-manager.md | 34 + ..._plba-fullchain-explain-trace-service.json | 2684 +++++++++ ...al_plba-fullchain-explain-trace-service.md | 34 + ...lba-fullchain-explain-workflow-engine.json | 2634 +++++++++ ..._plba-fullchain-explain-workflow-engine.md | 34 + .../20260312_091824/summary.md | 24 + ...llchain-explain-control-plane-service.json | 2056 +++++++ ...fullchain-explain-control-plane-service.md | 34 + ...plba-fullchain-explain-create-runtime.json | 1896 +++++++ ...l_plba-fullchain-explain-create-runtime.md | 34 + ...ullchain-explain-http-control-channel.json | 2088 +++++++ ...-fullchain-explain-http-control-channel.md | 34 + ...lba-fullchain-explain-runtime-manager.json | 2088 +++++++ ..._plba-fullchain-explain-runtime-manager.md | 34 + ..._plba-fullchain-explain-trace-service.json | 2208 ++++++++ ...al_plba-fullchain-explain-trace-service.md | 34 + ...lba-fullchain-explain-workflow-engine.json | 2158 +++++++ ..._plba-fullchain-explain-workflow-engine.md | 34 + .../20260312_112158/summary.md | 20 + ...llchain-explain-control-plane-service.json | 2056 +++++++ ...fullchain-explain-control-plane-service.md | 34 + ...plba-fullchain-explain-create-runtime.json | 1896 +++++++ ...l_plba-fullchain-explain-create-runtime.md | 34 + ...ullchain-explain-http-control-channel.json | 2088 +++++++ ...-fullchain-explain-http-control-channel.md | 34 + ...lba-fullchain-explain-runtime-manager.json | 2088 +++++++ ..._plba-fullchain-explain-runtime-manager.md | 34 + ..._plba-fullchain-explain-trace-service.json | 2208 ++++++++ ...al_plba-fullchain-explain-trace-service.md | 34 + ...lba-fullchain-explain-workflow-engine.json | 2158 +++++++ ..._plba-fullchain-explain-workflow-engine.md | 34 + .../20260312_114413/summary.md | 20 + ...llchain-explain-control-plane-service.json | 2056 +++++++ ...fullchain-explain-control-plane-service.md | 34 + ...plba-fullchain-explain-create-runtime.json | 1896 +++++++ ...l_plba-fullchain-explain-create-runtime.md | 34 + ...ullchain-explain-http-control-channel.json | 2088 +++++++ ...-fullchain-explain-http-control-channel.md | 34 + ...lba-fullchain-explain-runtime-manager.json | 2088 +++++++ ..._plba-fullchain-explain-runtime-manager.md | 34 + ..._plba-fullchain-explain-trace-service.json | 2208 ++++++++ ...al_plba-fullchain-explain-trace-service.md | 34 + ...lba-fullchain-explain-workflow-engine.json | 2158 +++++++ ..._plba-fullchain-explain-workflow-engine.md | 34 + .../20260312_114552/summary.md | 24 + ...llchain-explain-control-plane-service.json | 2056 +++++++ ...fullchain-explain-control-plane-service.md | 34 + ...plba-fullchain-explain-create-runtime.json | 1896 +++++++ ...l_plba-fullchain-explain-create-runtime.md | 34 + ...ullchain-explain-http-control-channel.json | 2088 +++++++ ...-fullchain-explain-http-control-channel.md | 34 + ...lba-fullchain-explain-runtime-manager.json | 2088 +++++++ ..._plba-fullchain-explain-runtime-manager.md | 34 + ..._plba-fullchain-explain-trace-service.json | 2208 ++++++++ ...al_plba-fullchain-explain-trace-service.md | 34 + ...lba-fullchain-explain-workflow-engine.json | 2158 +++++++ ..._plba-fullchain-explain-workflow-engine.md | 34 + .../20260312_115223/summary.md | 24 + ...-fullchain-architecture-control-plane.json | 1667 ++++++ ...ba-fullchain-architecture-control-plane.md | 38 + ...llchain-explain-local-runtime-manager.json | 1333 +++++ ...fullchain-explain-local-runtime-manager.md | 34 + ...lba-fullchain-explain-runtime-manager.json | 2088 +++++++ ..._plba-fullchain-explain-runtime-manager.md | 34 + ...tents_plba-fullchain-find-entrypoints.json | 1196 ++++ ...intents_plba-fullchain-find-entrypoints.md | 29 + ...-fullchain-find-tests-runtime-manager.json | 1879 +++++++ ...ba-fullchain-find-tests-runtime-manager.md | 32 + ...ents_plba-fullchain-open-file-runtime.json | 492 ++ ...ntents_plba-fullchain-open-file-runtime.md | 30 + ...-fullchain-trace-flow-runtime-manager.json | 2964 ++++++++++ ...ba-fullchain-trace-flow-runtime-manager.md | 34 + .../20260312_115642/summary.md | 25 + ...-fullchain-architecture-control-plane.json | 3036 ++++++++++ ...ba-fullchain-architecture-control-plane.md | 34 + ...llchain-explain-local-runtime-manager.json | 1333 +++++ ...fullchain-explain-local-runtime-manager.md | 34 + ...lba-fullchain-explain-runtime-manager.json | 2088 +++++++ ..._plba-fullchain-explain-runtime-manager.md | 34 + ...tents_plba-fullchain-find-entrypoints.json | 1196 ++++ ...intents_plba-fullchain-find-entrypoints.md | 29 + ...-fullchain-find-tests-runtime-manager.json | 1879 +++++++ ...ba-fullchain-find-tests-runtime-manager.md | 32 + ...ents_plba-fullchain-open-file-runtime.json | 492 ++ ...ntents_plba-fullchain-open-file-runtime.md | 30 + ...-fullchain-trace-flow-runtime-manager.json | 2964 ++++++++++ ...ba-fullchain-trace-flow-runtime-manager.md | 34 + .../20260312_115751/summary.md | 26 + ...-fullchain-architecture-control-plane.json | 3036 ++++++++++ ...ba-fullchain-architecture-control-plane.md | 34 + ...llchain-explain-local-runtime-manager.json | 1333 +++++ ...fullchain-explain-local-runtime-manager.md | 34 + ...lba-fullchain-explain-runtime-manager.json | 2088 +++++++ ..._plba-fullchain-explain-runtime-manager.md | 34 + ...tents_plba-fullchain-find-entrypoints.json | 1196 ++++ ...intents_plba-fullchain-find-entrypoints.md | 29 + ...-fullchain-find-tests-runtime-manager.json | 1879 +++++++ ...ba-fullchain-find-tests-runtime-manager.md | 32 + ...ents_plba-fullchain-open-file-runtime.json | 492 ++ ...ntents_plba-fullchain-open-file-runtime.md | 30 + ...-fullchain-trace-flow-runtime-manager.json | 2964 ++++++++++ ...ba-fullchain-trace-flow-runtime-manager.md | 34 + .../20260312_120252/summary.md | 40 + .../20260312_120855.zip | Bin 0 -> 114500 bytes ...-fullchain-architecture-control-plane.json | 3036 ++++++++++ ...ba-fullchain-architecture-control-plane.md | 34 + ...llchain-explain-local-runtime-manager.json | 1333 +++++ ...fullchain-explain-local-runtime-manager.md | 34 + ...lba-fullchain-explain-runtime-manager.json | 2088 +++++++ ..._plba-fullchain-explain-runtime-manager.md | 34 + ...tents_plba-fullchain-find-entrypoints.json | 1196 ++++ ...intents_plba-fullchain-find-entrypoints.md | 29 + ...-fullchain-find-tests-runtime-manager.json | 1879 +++++++ ...ba-fullchain-find-tests-runtime-manager.md | 32 + ...ents_plba-fullchain-open-file-runtime.json | 492 ++ ...ntents_plba-fullchain-open-file-runtime.md | 30 + ...-fullchain-trace-flow-runtime-manager.json | 2964 ++++++++++ ...ba-fullchain-trace-flow-runtime-manager.md | 34 + .../20260312_120855/summary.md | 36 + ...-fullchain-architecture-control-plane.json | 3036 ++++++++++ ...ba-fullchain-architecture-control-plane.md | 34 + ...llchain-explain-local-runtime-manager.json | 1333 +++++ ...fullchain-explain-local-runtime-manager.md | 34 + ...lba-fullchain-explain-runtime-manager.json | 2088 +++++++ ..._plba-fullchain-explain-runtime-manager.md | 34 + ...tents_plba-fullchain-find-entrypoints.json | 1196 ++++ ...intents_plba-fullchain-find-entrypoints.md | 29 + ...-fullchain-find-tests-runtime-manager.json | 1879 +++++++ ...ba-fullchain-find-tests-runtime-manager.md | 32 + ...ents_plba-fullchain-open-file-runtime.json | 492 ++ ...ntents_plba-fullchain-open-file-runtime.md | 30 + ...-fullchain-trace-flow-runtime-manager.json | 2964 ++++++++++ ...ba-fullchain-trace-flow-runtime-manager.md | 34 + .../20260312_123945/summary.md | 36 + ...v2_plba-v2-architecture-control-plane.json | 2940 ++++++++++ ...s_v2_plba-v2-architecture-control-plane.md | 34 + ..._plba-v2-architecture-runtime-manager.json | 3036 ++++++++++ ...v2_plba-v2-architecture-runtime-manager.md | 34 + ...nts_v2_plba-v2-explain-create-runtime.json | 1896 +++++++ ...tents_v2_plba-v2-explain-create-runtime.md | 34 + ...v2_plba-v2-explain-local-http-channel.json | 1333 +++++ ...s_v2_plba-v2-explain-local-http-channel.md | 34 + ...v2_plba-v2-explain-nonexistent-symbol.json | 1182 ++++ ...s_v2_plba-v2-explain-nonexistent-symbol.md | 34 + ...ts_v2_plba-v2-explain-runtime-manager.json | 2088 +++++++ ...ents_v2_plba-v2-explain-runtime-manager.md | 34 + ...ents_v2_plba-v2-explain-trace-service.json | 2208 ++++++++ ...ntents_v2_plba-v2-explain-trace-service.md | 34 + ...lba-v2-find-entrypoints-control-plane.json | 1236 ++++ ..._plba-v2-find-entrypoints-control-plane.md | 33 + ...a-v2-find-entrypoints-health-endpoint.json | 1197 ++++ ...lba-v2-find-entrypoints-health-endpoint.md | 36 + ..._v2_plba-v2-find-tests-create-runtime.json | 1963 +++++++ ...ts_v2_plba-v2-find-tests-create-runtime.md | 32 + ...v2_plba-v2-find-tests-runtime-manager.json | 1879 +++++++ ...s_v2_plba-v2-find-tests-runtime-manager.md | 32 + ...s_v2_plba-v2-find-tests-trace-service.json | 2047 +++++++ ...nts_v2_plba-v2-find-tests-trace-service.md | 32 + ...sts-workflow-runtime-factory-negative.json | 2049 +++++++ ...tests-workflow-runtime-factory-negative.md | 32 + ...ents_v2_plba-v2-open-file-nonexistent.json | 454 ++ ...ntents_v2_plba-v2-open-file-nonexistent.md | 30 + ...tents_v2_plba-v2-open-file-public-api.json | 492 ++ ...intents_v2_plba-v2-open-file-public-api.md | 30 + ...bintents_v2_plba-v2-open-file-runtime.json | 492 ++ ...subintents_v2_plba-v2-open-file-runtime.md | 30 + ...v2_plba-v2-trace-flow-health-endpoint.json | 2306 ++++++++ ...s_v2_plba-v2-trace-flow-health-endpoint.md | 35 + ...s_v2_plba-v2-trace-flow-runtime-start.json | 1219 ++++ ...nts_v2_plba-v2-trace-flow-runtime-start.md | 32 + .../20260312_125536/summary.md | 86 + ...v2_plba-v2-architecture-control-plane.json | 2940 ++++++++++ ...s_v2_plba-v2-architecture-control-plane.md | 34 + ..._plba-v2-architecture-runtime-manager.json | 3036 ++++++++++ ...v2_plba-v2-architecture-runtime-manager.md | 34 + ...nts_v2_plba-v2-explain-create-runtime.json | 1896 +++++++ ...tents_v2_plba-v2-explain-create-runtime.md | 34 + ...v2_plba-v2-explain-local-http-channel.json | 1333 +++++ ...s_v2_plba-v2-explain-local-http-channel.md | 34 + ...v2_plba-v2-explain-nonexistent-symbol.json | 1182 ++++ ...s_v2_plba-v2-explain-nonexistent-symbol.md | 34 + ...ts_v2_plba-v2-explain-runtime-manager.json | 2088 +++++++ ...ents_v2_plba-v2-explain-runtime-manager.md | 34 + ...ents_v2_plba-v2-explain-trace-service.json | 2208 ++++++++ ...ntents_v2_plba-v2-explain-trace-service.md | 34 + ...lba-v2-find-entrypoints-control-plane.json | 1236 ++++ ..._plba-v2-find-entrypoints-control-plane.md | 33 + ...a-v2-find-entrypoints-health-endpoint.json | 1226 ++++ ...lba-v2-find-entrypoints-health-endpoint.md | 32 + ..._v2_plba-v2-find-tests-create-runtime.json | 1963 +++++++ ...ts_v2_plba-v2-find-tests-create-runtime.md | 32 + ...v2_plba-v2-find-tests-runtime-manager.json | 1879 +++++++ ...s_v2_plba-v2-find-tests-runtime-manager.md | 32 + ...s_v2_plba-v2-find-tests-trace-service.json | 2047 +++++++ ...nts_v2_plba-v2-find-tests-trace-service.md | 32 + ...sts-workflow-runtime-factory-negative.json | 2047 +++++++ ...tests-workflow-runtime-factory-negative.md | 32 + ...ents_v2_plba-v2-open-file-nonexistent.json | 454 ++ ...ntents_v2_plba-v2-open-file-nonexistent.md | 30 + ...tents_v2_plba-v2-open-file-public-api.json | 492 ++ ...intents_v2_plba-v2-open-file-public-api.md | 30 + ...bintents_v2_plba-v2-open-file-runtime.json | 492 ++ ...subintents_v2_plba-v2-open-file-runtime.md | 30 + ...v2_plba-v2-trace-flow-health-endpoint.json | 3084 ++++++++++ ...s_v2_plba-v2-trace-flow-health-endpoint.md | 35 + ...s_v2_plba-v2-trace-flow-runtime-start.json | 2964 ++++++++++ ...nts_v2_plba-v2-trace-flow-runtime-start.md | 34 + .../20260312_132357/summary.md | 80 + ...v2_plba-v2-architecture-control-plane.json | 2940 ++++++++++ ...s_v2_plba-v2-architecture-control-plane.md | 34 + ..._plba-v2-architecture-runtime-manager.json | 3036 ++++++++++ ...v2_plba-v2-architecture-runtime-manager.md | 34 + ...nts_v2_plba-v2-explain-create-runtime.json | 1896 +++++++ ...tents_v2_plba-v2-explain-create-runtime.md | 34 + ...v2_plba-v2-explain-local-http-channel.json | 1333 +++++ ...s_v2_plba-v2-explain-local-http-channel.md | 34 + ...v2_plba-v2-explain-nonexistent-symbol.json | 1182 ++++ ...s_v2_plba-v2-explain-nonexistent-symbol.md | 34 + ...ts_v2_plba-v2-explain-runtime-manager.json | 2088 +++++++ ...ents_v2_plba-v2-explain-runtime-manager.md | 34 + ...ents_v2_plba-v2-explain-trace-service.json | 2208 ++++++++ ...ntents_v2_plba-v2-explain-trace-service.md | 34 + ...lba-v2-find-entrypoints-control-plane.json | 1236 ++++ ..._plba-v2-find-entrypoints-control-plane.md | 33 + ...a-v2-find-entrypoints-health-endpoint.json | 1226 ++++ ...lba-v2-find-entrypoints-health-endpoint.md | 32 + ..._v2_plba-v2-find-tests-create-runtime.json | 1963 +++++++ ...ts_v2_plba-v2-find-tests-create-runtime.md | 32 + ...v2_plba-v2-find-tests-runtime-manager.json | 1879 +++++++ ...s_v2_plba-v2-find-tests-runtime-manager.md | 32 + ...s_v2_plba-v2-find-tests-trace-service.json | 2047 +++++++ ...nts_v2_plba-v2-find-tests-trace-service.md | 32 + ...sts-workflow-runtime-factory-negative.json | 2047 +++++++ ...tests-workflow-runtime-factory-negative.md | 32 + ...ents_v2_plba-v2-open-file-nonexistent.json | 441 ++ ...ntents_v2_plba-v2-open-file-nonexistent.md | 30 + ...tents_v2_plba-v2-open-file-public-api.json | 492 ++ ...intents_v2_plba-v2-open-file-public-api.md | 30 + ...bintents_v2_plba-v2-open-file-runtime.json | 492 ++ ...subintents_v2_plba-v2-open-file-runtime.md | 30 + ...v2_plba-v2-trace-flow-health-endpoint.json | 3084 ++++++++++ ...s_v2_plba-v2-trace-flow-health-endpoint.md | 35 + ...s_v2_plba-v2-trace-flow-runtime-start.json | 2964 ++++++++++ ...nts_v2_plba-v2-trace-flow-runtime-start.md | 34 + .../20260312_140708/summary.md | 80 + ...v2_plba-v2-architecture-control-plane.json | 2940 ++++++++++ ...s_v2_plba-v2-architecture-control-plane.md | 34 + ..._plba-v2-architecture-runtime-manager.json | 3036 ++++++++++ ...v2_plba-v2-architecture-runtime-manager.md | 34 + ...nts_v2_plba-v2-explain-create-runtime.json | 1896 +++++++ ...tents_v2_plba-v2-explain-create-runtime.md | 34 + ...v2_plba-v2-explain-local-http-channel.json | 1333 +++++ ...s_v2_plba-v2-explain-local-http-channel.md | 34 + ...v2_plba-v2-explain-nonexistent-symbol.json | 1169 ++++ ...s_v2_plba-v2-explain-nonexistent-symbol.md | 34 + ...ts_v2_plba-v2-explain-runtime-manager.json | 2088 +++++++ ...ents_v2_plba-v2-explain-runtime-manager.md | 34 + ...ents_v2_plba-v2-explain-trace-service.json | 2208 ++++++++ ...ntents_v2_plba-v2-explain-trace-service.md | 34 + ...lba-v2-find-entrypoints-control-plane.json | 1236 ++++ ..._plba-v2-find-entrypoints-control-plane.md | 33 + ...a-v2-find-entrypoints-health-endpoint.json | 1228 ++++ ...lba-v2-find-entrypoints-health-endpoint.md | 32 + ..._v2_plba-v2-find-tests-create-runtime.json | 1963 +++++++ ...ts_v2_plba-v2-find-tests-create-runtime.md | 32 + ...v2_plba-v2-find-tests-runtime-manager.json | 1879 +++++++ ...s_v2_plba-v2-find-tests-runtime-manager.md | 32 + ...s_v2_plba-v2-find-tests-trace-service.json | 2047 +++++++ ...nts_v2_plba-v2-find-tests-trace-service.md | 32 + ...sts-workflow-runtime-factory-negative.json | 2047 +++++++ ...tests-workflow-runtime-factory-negative.md | 32 + ...ents_v2_plba-v2-open-file-nonexistent.json | 441 ++ ...ntents_v2_plba-v2-open-file-nonexistent.md | 30 + ...tents_v2_plba-v2-open-file-public-api.json | 492 ++ ...intents_v2_plba-v2-open-file-public-api.md | 30 + ...bintents_v2_plba-v2-open-file-runtime.json | 492 ++ ...subintents_v2_plba-v2-open-file-runtime.md | 30 + ...v2_plba-v2-trace-flow-health-endpoint.json | 3084 ++++++++++ ...s_v2_plba-v2-trace-flow-health-endpoint.md | 35 + ...s_v2_plba-v2-trace-flow-runtime-start.json | 2964 ++++++++++ ...nts_v2_plba-v2-trace-flow-runtime-start.md | 34 + .../20260312_143636/summary.md | 83 + .../20260312_143856.zip | Bin 0 -> 228856 bytes ...v2_plba-v2-architecture-control-plane.json | 2940 ++++++++++ ...s_v2_plba-v2-architecture-control-plane.md | 34 + ..._plba-v2-architecture-runtime-manager.json | 3036 ++++++++++ ...v2_plba-v2-architecture-runtime-manager.md | 34 + ...nts_v2_plba-v2-explain-create-runtime.json | 1896 +++++++ ...tents_v2_plba-v2-explain-create-runtime.md | 34 + ...v2_plba-v2-explain-local-http-channel.json | 1333 +++++ ...s_v2_plba-v2-explain-local-http-channel.md | 34 + ...v2_plba-v2-explain-nonexistent-symbol.json | 1169 ++++ ...s_v2_plba-v2-explain-nonexistent-symbol.md | 34 + ...ts_v2_plba-v2-explain-runtime-manager.json | 2088 +++++++ ...ents_v2_plba-v2-explain-runtime-manager.md | 34 + ...ents_v2_plba-v2-explain-trace-service.json | 2208 ++++++++ ...ntents_v2_plba-v2-explain-trace-service.md | 34 + ...lba-v2-find-entrypoints-control-plane.json | 1236 ++++ ..._plba-v2-find-entrypoints-control-plane.md | 33 + ...a-v2-find-entrypoints-health-endpoint.json | 1226 ++++ ...lba-v2-find-entrypoints-health-endpoint.md | 32 + ..._v2_plba-v2-find-tests-create-runtime.json | 1963 +++++++ ...ts_v2_plba-v2-find-tests-create-runtime.md | 32 + ...v2_plba-v2-find-tests-runtime-manager.json | 1879 +++++++ ...s_v2_plba-v2-find-tests-runtime-manager.md | 32 + ...s_v2_plba-v2-find-tests-trace-service.json | 2047 +++++++ ...nts_v2_plba-v2-find-tests-trace-service.md | 32 + ...sts-workflow-runtime-factory-negative.json | 2047 +++++++ ...tests-workflow-runtime-factory-negative.md | 32 + ...ents_v2_plba-v2-open-file-nonexistent.json | 441 ++ ...ntents_v2_plba-v2-open-file-nonexistent.md | 30 + ...tents_v2_plba-v2-open-file-public-api.json | 492 ++ ...intents_v2_plba-v2-open-file-public-api.md | 30 + ...bintents_v2_plba-v2-open-file-runtime.json | 492 ++ ...subintents_v2_plba-v2-open-file-runtime.md | 30 + ...v2_plba-v2-trace-flow-health-endpoint.json | 3084 ++++++++++ ...s_v2_plba-v2-trace-flow-health-endpoint.md | 35 + ...s_v2_plba-v2-trace-flow-runtime-start.json | 2964 ++++++++++ ...nts_v2_plba-v2-trace-flow-runtime-start.md | 34 + .../20260312_143856/summary.md | 80 + ...val_plba-explain-http-control-channel.json | 221 + ...ieval_plba-explain-http-control-channel.md | 34 + ...etrieval_plba-explain-runtime-manager.json | 221 + ..._retrieval_plba-explain-runtime-manager.md | 34 + ..._retrieval_plba-explain-trace-service.json | 221 + ...de_retrieval_plba-explain-trace-service.md | 34 + ...ieval_plba-find-entrypoints-bootstrap.json | 222 + ...trieval_plba-find-entrypoints-bootstrap.md | 35 + ..._plba-find-entrypoints-create-runtime.json | 221 + ...al_plba-find-entrypoints-create-runtime.md | 34 + ..._plba-find-tests-http-control-channel.json | 241 + ...al_plba-find-tests-http-control-channel.md | 32 + ...ieval_plba-find-tests-runtime-manager.json | 241 + ...trieval_plba-find-tests-runtime-manager.md | 32 + ...trieval_plba-general-qa-control-plane.json | 228 + ...retrieval_plba-general-qa-control-plane.md | 35 + ...ode_retrieval_plba-general-qa-runtime.json | 221 + ..._code_retrieval_plba-general-qa-runtime.md | 34 + ...l_plba-open-http-control-channel-file.json | 207 + ...val_plba-open-http-control-channel-file.md | 30 + ...rieval_plba-open-runtime-manager-file.json | 207 + ...etrieval_plba-open-runtime-manager-file.md | 30 + .../20260312_084200/summary.md | 23 + ...val_plba-explain-http-control-channel.json | 221 + ...ieval_plba-explain-http-control-channel.md | 34 + ...etrieval_plba-explain-runtime-manager.json | 221 + ..._retrieval_plba-explain-runtime-manager.md | 34 + ..._retrieval_plba-explain-trace-service.json | 221 + ...de_retrieval_plba-explain-trace-service.md | 34 + ...ieval_plba-find-entrypoints-bootstrap.json | 221 + ...trieval_plba-find-entrypoints-bootstrap.md | 34 + ..._plba-find-entrypoints-create-runtime.json | 198 + ...al_plba-find-entrypoints-create-runtime.md | 29 + ..._plba-find-tests-http-control-channel.json | 241 + ...al_plba-find-tests-http-control-channel.md | 32 + ...ieval_plba-find-tests-runtime-manager.json | 241 + ...trieval_plba-find-tests-runtime-manager.md | 32 + ...trieval_plba-general-qa-control-plane.json | 228 + ...retrieval_plba-general-qa-control-plane.md | 35 + ...ode_retrieval_plba-general-qa-runtime.json | 221 + ..._code_retrieval_plba-general-qa-runtime.md | 34 + ...l_plba-open-http-control-channel-file.json | 207 + ...val_plba-open-http-control-channel-file.md | 30 + ...rieval_plba-open-runtime-manager-file.json | 207 + ...etrieval_plba-open-runtime-manager-file.md | 30 + .../20260312_084313/summary.md | 20 + ...rieval_plba-rag-explain-control-plane.json | 1165 ++++ ...etrieval_plba-rag-explain-control-plane.md | 35 + ...ieval_plba-rag-explain-create-runtime.json | 2285 ++++++++ ...trieval_plba-rag-explain-create-runtime.md | 34 + ...plba-rag-explain-http-control-channel.json | 2477 ++++++++ ...l_plba-rag-explain-http-control-channel.md | 34 + ...eval_plba-rag-explain-runtime-manager.json | 2477 ++++++++ ...rieval_plba-rag-explain-runtime-manager.md | 34 + ...ieval_plba-rag-explain-runtime-module.json | 1137 ++++ ...trieval_plba-rag-explain-runtime-module.md | 34 + ...rieval_plba-rag-explain-trace-service.json | 2597 +++++++++ ...etrieval_plba-rag-explain-trace-service.md | 34 + ...e_retrieval_plba-rag-find-entrypoints.json | 1139 ++++ ...ode_retrieval_plba-rag-find-entrypoints.md | 29 + ...a-rag-find-tests-http-control-channel.json | 1738 ++++++ ...lba-rag-find-tests-http-control-channel.md | 32 + ...l_plba-rag-find-tests-runtime-manager.json | 1822 ++++++ ...val_plba-rag-find-tests-runtime-manager.md | 32 + ...ba-rag-open-http-control-channel-file.json | 445 ++ ...plba-rag-open-http-control-channel-file.md | 30 + ...al_plba-rag-open-runtime-manager-file.json | 445 ++ ...eval_plba-rag-open-runtime-manager-file.md | 30 + .../20260312_084838/summary.md | 21 + ...lba-rag-explain-control-plane-service.json | 2445 ++++++++ ..._plba-rag-explain-control-plane-service.md | 38 + ...ieval_plba-rag-explain-create-runtime.json | 2285 ++++++++ ...trieval_plba-rag-explain-create-runtime.md | 34 + ...plba-rag-explain-http-control-channel.json | 2477 ++++++++ ...l_plba-rag-explain-http-control-channel.md | 34 + ...eval_plba-rag-explain-runtime-manager.json | 2477 ++++++++ ...rieval_plba-rag-explain-runtime-manager.md | 34 + ...rieval_plba-rag-explain-trace-service.json | 2597 +++++++++ ...etrieval_plba-rag-explain-trace-service.md | 34 + ...eval_plba-rag-explain-workflow-engine.json | 2547 +++++++++ ...rieval_plba-rag-explain-workflow-engine.md | 34 + ...e_retrieval_plba-rag-find-entrypoints.json | 1139 ++++ ...ode_retrieval_plba-rag-find-entrypoints.md | 29 + ...a-rag-find-tests-http-control-channel.json | 1738 ++++++ ...lba-rag-find-tests-http-control-channel.md | 32 + ...l_plba-rag-find-tests-runtime-manager.json | 1822 ++++++ ...val_plba-rag-find-tests-runtime-manager.md | 32 + ...ba-rag-open-http-control-channel-file.json | 445 ++ ...plba-rag-open-http-control-channel-file.md | 30 + ...al_plba-rag-open-runtime-manager-file.json | 445 ++ ...eval_plba-rag-open-runtime-manager-file.md | 30 + .../20260312_085312/summary.md | 17 + ...moke_full_chain_explain_order_service.json | 2198 ++++++++ ..._smoke_full_chain_explain_order_service.md | 34 + ..._only_smoke_router_only_docs_question.json | 228 + ...er_only_smoke_router_only_docs_question.md | 31 + ...y_smoke_router_only_open_fixture_main.json | 207 + ...nly_smoke_router_only_open_fixture_main.md | 30 + ...er_rag_smoke_router_rag_explain_order.json | 2111 +++++++ ...uter_rag_smoke_router_rag_explain_order.md | 34 + ...ag_smoke_router_rag_open_fixture_main.json | 445 ++ ..._rag_smoke_router_rag_open_fixture_main.md | 30 + .../20260312_082745/summary.md | 14 + .../code_qa_eval_explain_order_positive.json | 58 + .../code_qa_eval_explain_order_positive.md | 34 + ...a_eval_explain_order_service_positive.json | 58 + ..._qa_eval_explain_order_service_positive.md | 34 + ...ode_qa_eval_find_entrypoints_positive.json | 55 + .../code_qa_eval_find_entrypoints_positive.md | 32 + .../code_qa_eval_find_tests_positive.json | 54 + .../code_qa_eval_find_tests_positive.md | 32 + .../code_qa_eval_general_qa_positive.json | 55 + .../code_qa_eval_general_qa_positive.md | 32 + .../code_qa_eval_open_file_api_positive.json | 50 + .../code_qa_eval_open_file_api_positive.md | 30 + .../code_qa_eval_open_file_main_positive.json | 50 + .../code_qa_eval_open_file_main_positive.md | 30 + .../suite_01_smoke/20260312_082358/summary.md | 17 + tests/pipeline_setup_v3/README.md | 34 + tests/pipeline_setup_v3/__init__.py | 3 + .../suite_01_synthetic/code_qa_eval.yaml | 80 + .../full_chain_plba_code_retrieval.yaml | 96 + .../full_chain_plba_code_subintents.yaml | 110 + .../full_chain_plba_code_subintents_v2.yaml | 305 + .../suite_02_pipeline/full_chain_smoke.yaml | 17 + .../router_only_plba_code_retrieval.yaml | 123 + .../suite_02_pipeline/router_only_smoke.yaml | 16 + .../router_rag_plba_code_retrieval.yaml | 148 + .../suite_02_pipeline/router_rag_smoke.yaml | 23 + tests/pipeline_setup_v3/cli/__init__.py | 1 + tests/pipeline_setup_v3/cli/index_repo.py | 22 + tests/pipeline_setup_v3/core/__init__.py | 3 + tests/pipeline_setup_v3/core/artifacts.py | 134 + tests/pipeline_setup_v3/core/case_loader.py | 111 + tests/pipeline_setup_v3/core/models.py | 82 + tests/pipeline_setup_v3/core/runner.py | 52 + .../core/session_provider.py | 32 + .../pipeline_setup_v3/core/test_validators.py | 68 + tests/pipeline_setup_v3/core/validators.py | 98 + tests/pipeline_setup_v3/run.py | 43 + tests/pipeline_setup_v3/runtime/__init__.py | 3 + .../runtime/agent_runtime_adapter.py | 171 + ...v2_plba-v2-architecture-control-plane.json | 4171 ++++++++++++++ ...s_v2_plba-v2-architecture-control-plane.md | 34 + ..._plba-v2-architecture-runtime-manager.json | 4363 ++++++++++++++ ...v2_plba-v2-architecture-runtime-manager.md | 34 + ...nts_v2_plba-v2-explain-create-runtime.json | 3779 +++++++++++++ ...tents_v2_plba-v2-explain-create-runtime.md | 34 + ...v2_plba-v2-explain-local-http-channel.json | 2033 +++++++ ...s_v2_plba-v2-explain-local-http-channel.md | 34 + ...v2_plba-v2-explain-nonexistent-symbol.json | 4092 ++++++++++++++ ...s_v2_plba-v2-explain-nonexistent-symbol.md | 36 + ...ts_v2_plba-v2-explain-runtime-manager.json | 4154 ++++++++++++++ ...ents_v2_plba-v2-explain-runtime-manager.md | 34 + ...ents_v2_plba-v2-explain-trace-service.json | 4157 ++++++++++++++ ...ntents_v2_plba-v2-explain-trace-service.md | 34 + ...lba-v2-find-entrypoints-control-plane.json | 1303 +++++ ..._plba-v2-find-entrypoints-control-plane.md | 33 + ...a-v2-find-entrypoints-health-endpoint.json | 1274 +++++ ...lba-v2-find-entrypoints-health-endpoint.md | 32 + ..._v2_plba-v2-find-tests-create-runtime.json | 2746 +++++++++ ...ts_v2_plba-v2-find-tests-create-runtime.md | 32 + ...v2_plba-v2-find-tests-runtime-manager.json | 3133 +++++++++++ ...s_v2_plba-v2-find-tests-runtime-manager.md | 32 + ...s_v2_plba-v2-find-tests-trace-service.json | 3134 +++++++++++ ...nts_v2_plba-v2-find-tests-trace-service.md | 32 + ...sts-workflow-runtime-factory-negative.json | 3001 ++++++++++ ...tests-workflow-runtime-factory-negative.md | 32 + ...ents_v2_plba-v2-open-file-nonexistent.json | 341 ++ ...ntents_v2_plba-v2-open-file-nonexistent.md | 31 + ...tents_v2_plba-v2-open-file-public-api.json | 419 ++ ...intents_v2_plba-v2-open-file-public-api.md | 30 + ...bintents_v2_plba-v2-open-file-runtime.json | 417 ++ ...subintents_v2_plba-v2-open-file-runtime.md | 30 + ...v2_plba-v2-trace-flow-health-endpoint.json | 4707 ++++++++++++++++ ...s_v2_plba-v2-trace-flow-health-endpoint.md | 35 + ...s_v2_plba-v2-trace-flow-runtime-start.json | 4868 ++++++++++++++++ ...nts_v2_plba-v2-trace-flow-runtime-start.md | 34 + .../20260312_162307/summary.md | 86 + ...v2_plba-v2-architecture-control-plane.json | 4171 ++++++++++++++ ...s_v2_plba-v2-architecture-control-plane.md | 34 + ..._plba-v2-architecture-runtime-manager.json | 4363 ++++++++++++++ ...v2_plba-v2-architecture-runtime-manager.md | 34 + ...nts_v2_plba-v2-explain-create-runtime.json | 3779 +++++++++++++ ...tents_v2_plba-v2-explain-create-runtime.md | 34 + ...v2_plba-v2-explain-local-http-channel.json | 2033 +++++++ ...s_v2_plba-v2-explain-local-http-channel.md | 34 + ...v2_plba-v2-explain-nonexistent-symbol.json | 4092 ++++++++++++++ ...s_v2_plba-v2-explain-nonexistent-symbol.md | 36 + ...ts_v2_plba-v2-explain-runtime-manager.json | 4154 ++++++++++++++ ...ents_v2_plba-v2-explain-runtime-manager.md | 34 + ...ents_v2_plba-v2-explain-trace-service.json | 4157 ++++++++++++++ ...ntents_v2_plba-v2-explain-trace-service.md | 34 + ...lba-v2-find-entrypoints-control-plane.json | 1303 +++++ ..._plba-v2-find-entrypoints-control-plane.md | 33 + ...a-v2-find-entrypoints-health-endpoint.json | 1274 +++++ ...lba-v2-find-entrypoints-health-endpoint.md | 32 + ..._v2_plba-v2-find-tests-create-runtime.json | 2746 +++++++++ ...ts_v2_plba-v2-find-tests-create-runtime.md | 32 + ...v2_plba-v2-find-tests-runtime-manager.json | 3133 +++++++++++ ...s_v2_plba-v2-find-tests-runtime-manager.md | 32 + ...s_v2_plba-v2-find-tests-trace-service.json | 3134 +++++++++++ ...nts_v2_plba-v2-find-tests-trace-service.md | 32 + ...sts-workflow-runtime-factory-negative.json | 3001 ++++++++++ ...tests-workflow-runtime-factory-negative.md | 32 + ...ents_v2_plba-v2-open-file-nonexistent.json | 341 ++ ...ntents_v2_plba-v2-open-file-nonexistent.md | 31 + ...tents_v2_plba-v2-open-file-public-api.json | 417 ++ ...intents_v2_plba-v2-open-file-public-api.md | 30 + ...bintents_v2_plba-v2-open-file-runtime.json | 417 ++ ...subintents_v2_plba-v2-open-file-runtime.md | 30 + ...v2_plba-v2-trace-flow-health-endpoint.json | 4707 ++++++++++++++++ ...s_v2_plba-v2-trace-flow-health-endpoint.md | 35 + ...s_v2_plba-v2-trace-flow-runtime-start.json | 4868 ++++++++++++++++ ...nts_v2_plba-v2-trace-flow-runtime-start.md | 34 + .../20260312_162842/summary.md | 85 + ...v2_plba-v2-architecture-control-plane.json | 4171 ++++++++++++++ ...s_v2_plba-v2-architecture-control-plane.md | 34 + ..._plba-v2-architecture-runtime-manager.json | 4363 ++++++++++++++ ...v2_plba-v2-architecture-runtime-manager.md | 34 + ...nts_v2_plba-v2-explain-create-runtime.json | 3779 +++++++++++++ ...tents_v2_plba-v2-explain-create-runtime.md | 34 + ...v2_plba-v2-explain-local-http-channel.json | 2033 +++++++ ...s_v2_plba-v2-explain-local-http-channel.md | 34 + ...v2_plba-v2-explain-nonexistent-symbol.json | 4092 ++++++++++++++ ...s_v2_plba-v2-explain-nonexistent-symbol.md | 36 + ...ts_v2_plba-v2-explain-runtime-manager.json | 4154 ++++++++++++++ ...ents_v2_plba-v2-explain-runtime-manager.md | 34 + ...ents_v2_plba-v2-explain-trace-service.json | 4157 ++++++++++++++ ...ntents_v2_plba-v2-explain-trace-service.md | 34 + ...lba-v2-find-entrypoints-control-plane.json | 1303 +++++ ..._plba-v2-find-entrypoints-control-plane.md | 33 + ...a-v2-find-entrypoints-health-endpoint.json | 1274 +++++ ...lba-v2-find-entrypoints-health-endpoint.md | 32 + ..._v2_plba-v2-find-tests-create-runtime.json | 2746 +++++++++ ...ts_v2_plba-v2-find-tests-create-runtime.md | 32 + ...v2_plba-v2-find-tests-runtime-manager.json | 3133 +++++++++++ ...s_v2_plba-v2-find-tests-runtime-manager.md | 32 + ...s_v2_plba-v2-find-tests-trace-service.json | 3134 +++++++++++ ...nts_v2_plba-v2-find-tests-trace-service.md | 32 + ...sts-workflow-runtime-factory-negative.json | 3001 ++++++++++ ...tests-workflow-runtime-factory-negative.md | 32 + ...ents_v2_plba-v2-open-file-nonexistent.json | 341 ++ ...ntents_v2_plba-v2-open-file-nonexistent.md | 31 + ...tents_v2_plba-v2-open-file-public-api.json | 417 ++ ...intents_v2_plba-v2-open-file-public-api.md | 30 + ...bintents_v2_plba-v2-open-file-runtime.json | 417 ++ ...subintents_v2_plba-v2-open-file-runtime.md | 30 + ...v2_plba-v2-trace-flow-health-endpoint.json | 4707 ++++++++++++++++ ...s_v2_plba-v2-trace-flow-health-endpoint.md | 35 + ...s_v2_plba-v2-trace-flow-runtime-start.json | 4868 ++++++++++++++++ ...nts_v2_plba-v2-trace-flow-runtime-start.md | 34 + .../20260312_163609/summary.md | 85 + ...v2_plba-v2-architecture-control-plane.json | 4302 ++++++++++++++ ...s_v2_plba-v2-architecture-control-plane.md | 247 + ..._plba-v2-architecture-runtime-manager.json | 4494 +++++++++++++++ ...v2_plba-v2-architecture-runtime-manager.md | 247 + ...nts_v2_plba-v2-explain-create-runtime.json | 3910 +++++++++++++ ...tents_v2_plba-v2-explain-create-runtime.md | 247 + ...v2_plba-v2-explain-local-http-channel.json | 2154 +++++++ ...s_v2_plba-v2-explain-local-http-channel.md | 223 + ...v2_plba-v2-explain-nonexistent-symbol.json | 590 ++ ...s_v2_plba-v2-explain-nonexistent-symbol.md | 249 + ...ts_v2_plba-v2-explain-runtime-manager.json | 4285 ++++++++++++++ ...ents_v2_plba-v2-explain-runtime-manager.md | 247 + ...ents_v2_plba-v2-explain-trace-service.json | 4288 ++++++++++++++ ...ntents_v2_plba-v2-explain-trace-service.md | 247 + ...lba-v2-find-entrypoints-control-plane.json | 1402 +++++ ..._plba-v2-find-entrypoints-control-plane.md | 195 + ...a-v2-find-entrypoints-health-endpoint.json | 1374 +++++ ...lba-v2-find-entrypoints-health-endpoint.md | 194 + ..._v2_plba-v2-find-tests-create-runtime.json | 2861 ++++++++++ ...ts_v2_plba-v2-find-tests-create-runtime.md | 211 + ...v2_plba-v2-find-tests-runtime-manager.json | 3248 +++++++++++ ...s_v2_plba-v2-find-tests-runtime-manager.md | 211 + ...s_v2_plba-v2-find-tests-trace-service.json | 3249 +++++++++++ ...nts_v2_plba-v2-find-tests-trace-service.md | 211 + ...sts-workflow-runtime-factory-negative.json | 3108 ++++++++++ ...tests-workflow-runtime-factory-negative.md | 207 + ...ents_v2_plba-v2-open-file-nonexistent.json | 435 ++ ...ntents_v2_plba-v2-open-file-nonexistent.md | 189 + ...tents_v2_plba-v2-open-file-public-api.json | 521 ++ ...intents_v2_plba-v2-open-file-public-api.md | 188 + ...bintents_v2_plba-v2-open-file-runtime.json | 521 ++ ...subintents_v2_plba-v2-open-file-runtime.md | 188 + ...v2_plba-v2-trace-flow-health-endpoint.json | 4837 ++++++++++++++++ ...s_v2_plba-v2-trace-flow-health-endpoint.md | 248 + ...s_v2_plba-v2-trace-flow-runtime-start.json | 4999 +++++++++++++++++ ...nts_v2_plba-v2-trace-flow-runtime-start.md | 247 + .../20260312_164751/summary.md | 84 + .../asserts_intent_router.cpython-312.pyc | Bin 5517 -> 0 bytes .../intent_router_testkit.cpython-312.pyc | Bin 2710 -> 0 bytes ...xing_pipeline.cpython-312-pytest-9.0.2.pyc | Bin 9920 -> 0 bytes ...est_code_indexing_pipeline.cpython-312.pyc | Bin 3833 -> 0 bytes ...xing_pipeline.cpython-312-pytest-9.0.2.pyc | Bin 8680 -> 0 bytes ...est_docs_indexing_pipeline.cpython-312.pyc | Bin 3666 -> 0 bytes ...ntent_builder.cpython-312-pytest-9.0.2.pyc | Bin 5982 -> 0 bytes ...est_explain_intent_builder.cpython-312.pyc | Bin 1034 -> 0 bytes ...ter_e2e_flows.cpython-312-pytest-9.0.2.pyc | Bin 23270 -> 0 bytes ...er_invariants.cpython-312-pytest-9.0.2.pyc | Bin 19316 -> 0 bytes ...phrase_matrix.cpython-312-pytest-9.0.2.pyc | Bin 35062 -> 0 bytes ...ent_router_v2.cpython-312-pytest-9.0.2.pyc | Bin 20174 -> 0 bytes .../test_intent_router_v2.cpython-312.pyc | Bin 6518 -> 0 bytes ...v2_local_flow.cpython-312-pytest-9.0.2.pyc | Bin 20416 -> 0 bytes ...ntent_router_v2_local_flow.cpython-312.pyc | Bin 8052 -> 0 bytes ...yered_gateway.cpython-312-pytest-9.0.2.pyc | Bin 7062 -> 0 bytes ...roject_reader.cpython-312-pytest-9.0.2.pyc | Bin 2902 -> 0 bytes ...normalization.cpython-312-pytest-9.0.2.pyc | Bin 9860 -> 0 bytes .../test_query_normalization.cpython-312.pyc | Bin 4053 -> 0 bytes ...ository_terms.cpython-312-pytest-9.0.2.pyc | Bin 1422 -> 0 bytes ..._query_router.cpython-312-pytest-9.0.2.pyc | Bin 3359 -> 0 bytes ...t_query_terms.cpython-312-pytest-9.0.2.pyc | Bin 2189 -> 0 bytes .../test_query_terms.cpython-312.pyc | Bin 593 -> 0 bytes ...rvice_logging.cpython-312-pytest-9.0.2.pyc | Bin 13338 -> 0 bytes ...ement_builder.cpython-312-pytest-9.0.2.pyc | Bin 9121 -> 0 bytes ...2_no_fallback.cpython-312-pytest-9.0.2.pyc | Bin 6530 -> 0 bytes ...t_retriever_v2_no_fallback.cpython-312.pyc | Bin 3405 -> 0 bytes ...iever_v2_pack.cpython-312-pytest-9.0.2.pyc | Bin 8824 -> 0 bytes .../test_retriever_v2_pack.cpython-312.pyc | Bin 4643 -> 0 bytes ...duction_first.cpython-312-pytest-9.0.2.pyc | Bin 9768 -> 0 bytes ...trace_builder.cpython-312-pytest-9.0.2.pyc | Bin 7840 -> 0 bytes .../test_trace_builder.cpython-312.pyc | Bin 3173 -> 0 bytes tests/rag/test_code_indexing_pipeline.py | 75 - tests/unit_tests/__init__.py | 1 + .../test_router_service_intent_policy.py | 0 .../orchestrator/test_code_explain_actions.py | 0 ...test_edit_actions_case_insensitive_path.py | 0 .../agent/orchestrator/test_eval_suite.py | 0 .../orchestrator/test_explain_actions.py | 0 .../orchestrator/test_orchestrator_service.py | 0 .../agent/orchestrator/test_plan_validator.py | 0 .../orchestrator/test_project_qa_actions.py | 0 .../test_project_qa_answer_graph_v2.py | 0 ...test_project_qa_retrieval_graph_v2_only.py | 0 .../orchestrator/test_quality_metrics.py | 0 .../test_quality_metrics_gate_expectations.py | 0 .../orchestrator/test_template_registry.py | 0 .../agent/test_gigachat_client_retry.py | 0 .../agent/test_llm_service_logging.py | 0 .../agent/test_logging_setup.py | 0 .../agent/test_repo_webhook_service.py | 2 +- .../agent/test_story_session_recorder.py | 0 .../chat/test_chat_api_simple_code_explain.py | 0 .../chat/test_direct_service.py | 0 .../rag/asserts_intent_router.py | 0 .../rag/intent_router_testkit.py | 5 +- .../rag/test_code_indexing_pipeline.py | 217 + .../rag/test_docs_indexing_pipeline.py | 0 .../rag/test_explain_intent_builder.py | 0 .../rag/test_intent_router_e2e_flows.py | 4 +- .../rag/test_intent_router_invariants.py | 4 +- .../rag/test_layered_gateway.py | 0 tests/unit_tests/rag/test_path_filter.py | 44 + .../rag/test_query_normalization.py | 2 +- .../{ => unit_tests}/rag/test_query_terms.py | 0 .../rag/test_rag_service_filtering.py | 52 + .../rag/test_retrieval_statement_builder.py | 21 + .../rag/test_retriever_v2_no_fallback.py | 0 .../rag/test_retriever_v2_pack.py | 0 .../rag/test_retriever_v2_production_first.py | 0 .../rag/test_trace_builder.py | 2 +- v1_plan.md | 376 ++ 1445 files changed, 620025 insertions(+), 885 deletions(-) create mode 100644 README_old.md delete mode 100644 app/__pycache__/__init__.cpython-312.pyc delete mode 100644 app/__pycache__/main.cpython-312.pyc delete mode 100644 app/core/__pycache__/__init__.cpython-312.pyc delete mode 100644 app/core/__pycache__/constants.cpython-312.pyc delete mode 100644 app/core/__pycache__/error_handlers.cpython-312.pyc delete mode 100644 app/core/__pycache__/exceptions.cpython-312.pyc delete mode 100644 app/core/__pycache__/logging_setup.cpython-312.pyc delete mode 100644 app/modules/__pycache__/__init__.cpython-312.pyc delete mode 100644 app/modules/__pycache__/application.cpython-312.pyc delete mode 100644 app/modules/__pycache__/contracts.cpython-312.pyc delete mode 100644 app/modules/agent/__pycache__/__init__.cpython-312.pyc delete mode 100644 app/modules/agent/__pycache__/changeset_validator.cpython-312.pyc delete mode 100644 app/modules/agent/__pycache__/confluence_service.cpython-312.pyc delete mode 100644 app/modules/agent/__pycache__/module.cpython-312.pyc delete mode 100644 app/modules/agent/__pycache__/prompt_loader.cpython-312.pyc delete mode 100644 app/modules/agent/__pycache__/repo_webhook_service.cpython-312.pyc delete mode 100644 app/modules/agent/__pycache__/repository.cpython-312.pyc delete mode 100644 app/modules/agent/__pycache__/service.cpython-312.pyc delete mode 100644 app/modules/agent/__pycache__/story_context_repository.cpython-312.pyc delete mode 100644 app/modules/agent/__pycache__/story_session_recorder.cpython-312.pyc delete mode 100644 app/modules/agent/engine/__pycache__/__init__.cpython-312.pyc delete mode 100644 app/modules/agent/engine/graphs/__pycache__/__init__.cpython-312.pyc delete mode 100644 app/modules/agent/engine/graphs/__pycache__/analytics_graph.cpython-312.pyc delete mode 100644 app/modules/agent/engine/graphs/__pycache__/base_graph.cpython-312.pyc delete mode 100644 app/modules/agent/engine/graphs/__pycache__/code_change_graph.cpython-312.pyc delete mode 100644 app/modules/agent/engine/graphs/__pycache__/docs_examples_loader.cpython-312.pyc delete mode 100644 app/modules/agent/engine/graphs/__pycache__/docs_graph.cpython-312.pyc delete mode 100644 app/modules/agent/engine/graphs/__pycache__/docs_graph_logic.cpython-312.pyc delete mode 100644 app/modules/agent/engine/graphs/__pycache__/file_targeting.cpython-312.pyc delete mode 100644 app/modules/agent/engine/graphs/__pycache__/progress.cpython-312.pyc delete mode 100644 app/modules/agent/engine/graphs/__pycache__/progress_registry.cpython-312.pyc delete mode 100644 app/modules/agent/engine/graphs/__pycache__/project_edits_contract.cpython-312.pyc delete mode 100644 app/modules/agent/engine/graphs/__pycache__/project_edits_graph.cpython-312.pyc delete mode 100644 app/modules/agent/engine/graphs/__pycache__/project_edits_logic.cpython-312.pyc delete mode 100644 app/modules/agent/engine/graphs/__pycache__/project_edits_patcher.cpython-312.pyc delete mode 100644 app/modules/agent/engine/graphs/__pycache__/project_edits_support.cpython-312.pyc delete mode 100644 app/modules/agent/engine/graphs/__pycache__/project_qa_graph.cpython-312.pyc delete mode 100644 app/modules/agent/engine/graphs/__pycache__/project_qa_step_graphs.cpython-312.pyc delete mode 100644 app/modules/agent/engine/graphs/__pycache__/state.cpython-312.pyc delete mode 100644 app/modules/agent/engine/orchestrator/__pycache__/__init__.cpython-312.pyc delete mode 100644 app/modules/agent/engine/orchestrator/__pycache__/artifact_store.cpython-312.pyc delete mode 100644 app/modules/agent/engine/orchestrator/__pycache__/evidence_store.cpython-312.pyc delete mode 100644 app/modules/agent/engine/orchestrator/__pycache__/execution_context.cpython-312.pyc delete mode 100644 app/modules/agent/engine/orchestrator/__pycache__/execution_engine.cpython-312.pyc delete mode 100644 app/modules/agent/engine/orchestrator/__pycache__/metrics_persister.cpython-312.pyc delete mode 100644 app/modules/agent/engine/orchestrator/__pycache__/plan_compiler.cpython-312.pyc delete mode 100644 app/modules/agent/engine/orchestrator/__pycache__/plan_validator.cpython-312.pyc delete mode 100644 app/modules/agent/engine/orchestrator/__pycache__/quality_gates.cpython-312.pyc delete mode 100644 app/modules/agent/engine/orchestrator/__pycache__/quality_metrics.cpython-312.pyc delete mode 100644 app/modules/agent/engine/orchestrator/__pycache__/result_assembler.cpython-312.pyc delete mode 100644 app/modules/agent/engine/orchestrator/__pycache__/service.cpython-312.pyc delete mode 100644 app/modules/agent/engine/orchestrator/__pycache__/step_registry.cpython-312.pyc delete mode 100644 app/modules/agent/engine/orchestrator/__pycache__/task_spec_builder.cpython-312.pyc delete mode 100644 app/modules/agent/engine/orchestrator/__pycache__/template_registry.cpython-312.pyc delete mode 100644 app/modules/agent/engine/orchestrator/actions/__pycache__/__init__.cpython-312.pyc delete mode 100644 app/modules/agent/engine/orchestrator/actions/__pycache__/code_explain_actions.cpython-312.pyc delete mode 100644 app/modules/agent/engine/orchestrator/actions/__pycache__/common.cpython-312.pyc delete mode 100644 app/modules/agent/engine/orchestrator/actions/__pycache__/docs_actions.cpython-312.pyc delete mode 100644 app/modules/agent/engine/orchestrator/actions/__pycache__/edit_actions.cpython-312.pyc delete mode 100644 app/modules/agent/engine/orchestrator/actions/__pycache__/explain_actions.cpython-312.pyc delete mode 100644 app/modules/agent/engine/orchestrator/actions/__pycache__/gherkin_actions.cpython-312.pyc delete mode 100644 app/modules/agent/engine/orchestrator/actions/__pycache__/project_qa_actions.cpython-312.pyc delete mode 100644 app/modules/agent/engine/orchestrator/actions/__pycache__/project_qa_analyzer.cpython-312.pyc delete mode 100644 app/modules/agent/engine/orchestrator/actions/__pycache__/project_qa_support.cpython-312.pyc delete mode 100644 app/modules/agent/engine/orchestrator/actions/__pycache__/review_actions.cpython-312.pyc delete mode 100644 app/modules/agent/engine/orchestrator/models/__pycache__/__init__.cpython-312.pyc delete mode 100644 app/modules/agent/engine/orchestrator/models/__pycache__/plan.cpython-312.pyc delete mode 100644 app/modules/agent/engine/orchestrator/models/__pycache__/result.cpython-312.pyc delete mode 100644 app/modules/agent/engine/orchestrator/models/__pycache__/task_spec.cpython-312.pyc delete mode 100644 app/modules/agent/engine/router/__pycache__/__init__.cpython-312.pyc delete mode 100644 app/modules/agent/engine/router/__pycache__/context_store.cpython-312.pyc delete mode 100644 app/modules/agent/engine/router/__pycache__/intent_classifier.cpython-312.pyc delete mode 100644 app/modules/agent/engine/router/__pycache__/intent_switch_detector.cpython-312.pyc delete mode 100644 app/modules/agent/engine/router/__pycache__/registry.cpython-312.pyc delete mode 100644 app/modules/agent/engine/router/__pycache__/router_service.cpython-312.pyc delete mode 100644 app/modules/agent/engine/router/__pycache__/schemas.cpython-312.pyc delete mode 100644 app/modules/agent/llm/__pycache__/__init__.cpython-312.pyc delete mode 100644 app/modules/agent/llm/__pycache__/service.cpython-312.pyc delete mode 100644 app/modules/chat/__pycache__/__init__.cpython-312.pyc delete mode 100644 app/modules/chat/__pycache__/dialog_store.cpython-312.pyc delete mode 100644 app/modules/chat/__pycache__/direct_service.cpython-312.pyc delete mode 100644 app/modules/chat/__pycache__/evidence_gate.cpython-312.pyc delete mode 100644 app/modules/chat/__pycache__/module.cpython-312.pyc delete mode 100644 app/modules/chat/__pycache__/repository.cpython-312.pyc delete mode 100644 app/modules/chat/__pycache__/service.cpython-312.pyc delete mode 100644 app/modules/chat/__pycache__/session_resolver.cpython-312.pyc delete mode 100644 app/modules/chat/__pycache__/task_store.cpython-312.pyc delete mode 100644 app/modules/rag/__pycache__/__init__.cpython-312.pyc delete mode 100644 app/modules/rag/contracts/__pycache__/__init__.cpython-312.pyc delete mode 100644 app/modules/rag/contracts/__pycache__/documents.cpython-312.pyc delete mode 100644 app/modules/rag/contracts/__pycache__/enums.cpython-312.pyc delete mode 100644 app/modules/rag/contracts/__pycache__/evidence.cpython-312.pyc delete mode 100644 app/modules/rag/contracts/__pycache__/retrieval.cpython-312.pyc delete mode 100644 app/modules/rag/explain/__pycache__/__init__.cpython-312.pyc delete mode 100644 app/modules/rag/explain/__pycache__/budgeter.cpython-312.pyc delete mode 100644 app/modules/rag/explain/__pycache__/excerpt_planner.cpython-312.pyc delete mode 100644 app/modules/rag/explain/__pycache__/graph_repository.cpython-312.pyc delete mode 100644 app/modules/rag/explain/__pycache__/intent_builder.cpython-312.pyc delete mode 100644 app/modules/rag/explain/__pycache__/layered_gateway.cpython-312.pyc delete mode 100644 app/modules/rag/explain/__pycache__/models.cpython-312.pyc delete mode 100644 app/modules/rag/explain/__pycache__/retriever_v2.cpython-312.pyc delete mode 100644 app/modules/rag/explain/__pycache__/source_excerpt_fetcher.cpython-312.pyc delete mode 100644 app/modules/rag/explain/__pycache__/trace_builder.cpython-312.pyc delete mode 100644 app/modules/rag/indexing/code/__pycache__/file_filter.cpython-312.pyc delete mode 100644 app/modules/rag/indexing/code/__pycache__/pipeline.cpython-312.pyc delete mode 100644 app/modules/rag/indexing/code/code_text/__pycache__/chunker.cpython-312.pyc delete mode 100644 app/modules/rag/indexing/code/code_text/__pycache__/document_builder.cpython-312.pyc delete mode 100644 app/modules/rag/indexing/code/edges/__pycache__/document_builder.cpython-312.pyc delete mode 100644 app/modules/rag/indexing/code/edges/__pycache__/extractor.cpython-312.pyc delete mode 100644 app/modules/rag/indexing/code/entrypoints/__pycache__/document_builder.cpython-312.pyc delete mode 100644 app/modules/rag/indexing/code/entrypoints/__pycache__/fastapi_detector.cpython-312.pyc delete mode 100644 app/modules/rag/indexing/code/entrypoints/__pycache__/flask_detector.cpython-312.pyc delete mode 100644 app/modules/rag/indexing/code/entrypoints/__pycache__/registry.cpython-312.pyc delete mode 100644 app/modules/rag/indexing/code/entrypoints/__pycache__/typer_click_detector.cpython-312.pyc delete mode 100644 app/modules/rag/indexing/code/entrypoints/fastapi_detector.py delete mode 100644 app/modules/rag/indexing/code/symbols/__pycache__/ast_parser.cpython-312.pyc delete mode 100644 app/modules/rag/indexing/code/symbols/__pycache__/document_builder.cpython-312.pyc delete mode 100644 app/modules/rag/indexing/code/symbols/__pycache__/extractor.cpython-312.pyc delete mode 100644 app/modules/rag/indexing/common/__pycache__/document_upserter.cpython-312.pyc delete mode 100644 app/modules/rag/indexing/common/__pycache__/report.cpython-312.pyc delete mode 100644 app/modules/rag/indexing/docs/__pycache__/classifier.cpython-312.pyc delete mode 100644 app/modules/rag/indexing/docs/__pycache__/document_builder.cpython-312.pyc delete mode 100644 app/modules/rag/indexing/docs/__pycache__/file_filter.cpython-312.pyc delete mode 100644 app/modules/rag/indexing/docs/__pycache__/pipeline.cpython-312.pyc delete mode 100644 app/modules/rag/indexing/docs/chunkers/__pycache__/markdown_chunker.cpython-312.pyc delete mode 100644 app/modules/rag/indexing/docs/chunkers/__pycache__/text_chunker.cpython-312.pyc delete mode 100644 app/modules/rag/ingestion/session/__pycache__/local_project_reader.cpython-312.pyc delete mode 100644 app/modules/rag/intent_router_v2/__pycache__/__init__.cpython-312.pyc delete mode 100644 app/modules/rag/intent_router_v2/__pycache__/anchor_extractor.cpython-312.pyc delete mode 100644 app/modules/rag/intent_router_v2/__pycache__/anchor_span_validator.cpython-312.pyc delete mode 100644 app/modules/rag/intent_router_v2/__pycache__/classifier.cpython-312.pyc delete mode 100644 app/modules/rag/intent_router_v2/__pycache__/conversation_anchor_builder.cpython-312.pyc delete mode 100644 app/modules/rag/intent_router_v2/__pycache__/conversation_policy.cpython-312.pyc delete mode 100644 app/modules/rag/intent_router_v2/__pycache__/evidence_policy_factory.cpython-312.pyc delete mode 100644 app/modules/rag/intent_router_v2/__pycache__/factory.cpython-312.pyc delete mode 100644 app/modules/rag/intent_router_v2/__pycache__/followup_detector.cpython-312.pyc delete mode 100644 app/modules/rag/intent_router_v2/__pycache__/graph_id_resolver.cpython-312.pyc delete mode 100644 app/modules/rag/intent_router_v2/__pycache__/keyword_hint_builder.cpython-312.pyc delete mode 100644 app/modules/rag/intent_router_v2/__pycache__/keyword_hint_sanitizer.cpython-312.pyc delete mode 100644 app/modules/rag/intent_router_v2/__pycache__/layer_query_builder.cpython-312.pyc delete mode 100644 app/modules/rag/intent_router_v2/__pycache__/local_runner.cpython-312.pyc delete mode 100644 app/modules/rag/intent_router_v2/__pycache__/logger.cpython-312.pyc delete mode 100644 app/modules/rag/intent_router_v2/__pycache__/models.cpython-312.pyc delete mode 100644 app/modules/rag/intent_router_v2/__pycache__/negation_detector.cpython-312.pyc delete mode 100644 app/modules/rag/intent_router_v2/__pycache__/normalization.cpython-312.pyc delete mode 100644 app/modules/rag/intent_router_v2/__pycache__/normalization_terms.cpython-312.pyc delete mode 100644 app/modules/rag/intent_router_v2/__pycache__/protocols.cpython-312.pyc delete mode 100644 app/modules/rag/intent_router_v2/__pycache__/query_normalizer.cpython-312.pyc delete mode 100644 app/modules/rag/intent_router_v2/__pycache__/query_plan_builder.cpython-312.pyc delete mode 100644 app/modules/rag/intent_router_v2/__pycache__/retrieval_filter_builder.cpython-312.pyc delete mode 100644 app/modules/rag/intent_router_v2/__pycache__/retrieval_spec_factory.cpython-312.pyc delete mode 100644 app/modules/rag/intent_router_v2/__pycache__/router.cpython-312.pyc delete mode 100644 app/modules/rag/intent_router_v2/__pycache__/sub_intent_detector.cpython-312.pyc delete mode 100644 app/modules/rag/intent_router_v2/__pycache__/symbol_rules.cpython-312.pyc delete mode 100644 app/modules/rag/intent_router_v2/__pycache__/term_mapping.cpython-312.pyc delete mode 100644 app/modules/rag/intent_router_v2/__pycache__/test_signals.cpython-312-pytest-9.0.2.pyc delete mode 100644 app/modules/rag/intent_router_v2/query_normalizer.py delete mode 100644 app/modules/rag/intent_router_v2/router.py delete mode 100644 app/modules/rag/intent_router_v2/sub_intent_detector.py delete mode 100644 app/modules/rag/persistence/__pycache__/cache_repository.cpython-312.pyc delete mode 100644 app/modules/rag/persistence/__pycache__/document_repository.cpython-312.pyc delete mode 100644 app/modules/rag/persistence/__pycache__/job_repository.cpython-312.pyc delete mode 100644 app/modules/rag/persistence/__pycache__/query_repository.cpython-312.pyc delete mode 100644 app/modules/rag/persistence/__pycache__/repository.cpython-312.pyc delete mode 100644 app/modules/rag/persistence/__pycache__/retrieval_statement_builder.cpython-312.pyc delete mode 100644 app/modules/rag/persistence/__pycache__/schema_repository.cpython-312.pyc delete mode 100644 app/modules/rag/persistence/__pycache__/session_repository.cpython-312.pyc delete mode 100644 app/modules/rag/persistence/query_repository.py delete mode 100644 app/modules/rag/retrieval/__pycache__/query_router.cpython-312.pyc delete mode 100644 app/modules/rag/retrieval/__pycache__/query_terms.cpython-312.pyc delete mode 100644 app/modules/rag/retrieval/__pycache__/test_filter.cpython-312-pytest-9.0.2.pyc delete mode 100644 app/modules/rag/retrieval/__pycache__/test_filter.cpython-312.pyc delete mode 100644 app/modules/rag/services/__pycache__/rag_service.cpython-312.pyc delete mode 100644 app/modules/rag_repo/README.md delete mode 100644 app/modules/rag_repo/__pycache__/__init__.cpython-312.pyc delete mode 100644 app/modules/rag_repo/__pycache__/module.cpython-312.pyc delete mode 100644 app/modules/rag_repo/__pycache__/webhook_service.cpython-312.pyc delete mode 100644 app/modules/rag_repo/module.py delete mode 100644 app/modules/rag_session/README.md delete mode 100644 app/modules/rag_session/__pycache__/__init__.cpython-312.pyc delete mode 100644 app/modules/rag_session/__pycache__/indexing_service.cpython-312.pyc delete mode 100644 app/modules/rag_session/__pycache__/job_store.cpython-312.pyc delete mode 100644 app/modules/rag_session/__pycache__/module.cpython-312.pyc delete mode 100644 app/modules/rag_session/__pycache__/repository.cpython-312.pyc delete mode 100644 app/modules/rag_session/__pycache__/service.cpython-312.pyc delete mode 100644 app/modules/rag_session/__pycache__/session_store.cpython-312.pyc delete mode 100644 app/modules/rag_session/embedding/__pycache__/__init__.cpython-312.pyc delete mode 100644 app/modules/rag_session/embedding/__pycache__/gigachat_embedder.cpython-312.pyc delete mode 100644 app/modules/rag_session/repository.py delete mode 100644 app/modules/rag_session/retrieval/__pycache__/__init__.cpython-312.pyc delete mode 100644 app/modules/rag_session/retrieval/__pycache__/chunker.cpython-312.pyc delete mode 100644 app/modules/rag_session/retrieval/__pycache__/scoring.cpython-312.pyc delete mode 100644 app/modules/rag_session/service.py delete mode 100644 app/modules/shared/__init__.py delete mode 100644 app/modules/shared/__pycache__/__init__.cpython-312.pyc delete mode 100644 app/modules/shared/__pycache__/bootstrap.cpython-312.pyc delete mode 100644 app/modules/shared/__pycache__/checkpointer.cpython-312.pyc delete mode 100644 app/modules/shared/__pycache__/db.cpython-312.pyc delete mode 100644 app/modules/shared/__pycache__/env_loader.cpython-312.pyc delete mode 100644 app/modules/shared/__pycache__/event_bus.cpython-312.pyc delete mode 100644 app/modules/shared/__pycache__/idempotency_store.cpython-312.pyc delete mode 100644 app/modules/shared/__pycache__/retry_executor.cpython-312.pyc delete mode 100644 app/modules/shared/gigachat/__init__.py delete mode 100644 app/modules/shared/gigachat/__pycache__/__init__.cpython-312.pyc delete mode 100644 app/modules/shared/gigachat/__pycache__/client.cpython-312.pyc delete mode 100644 app/modules/shared/gigachat/__pycache__/errors.cpython-312.pyc delete mode 100644 app/modules/shared/gigachat/__pycache__/settings.cpython-312.pyc delete mode 100644 app/modules/shared/gigachat/__pycache__/token_provider.cpython-312.pyc delete mode 100644 app/schemas/__init__.py delete mode 100644 app/schemas/__pycache__/__init__.cpython-312.pyc delete mode 100644 app/schemas/__pycache__/changeset.cpython-312.pyc delete mode 100644 app/schemas/__pycache__/chat.cpython-312.pyc delete mode 100644 app/schemas/__pycache__/common.cpython-312.pyc delete mode 100644 app/schemas/__pycache__/indexing.cpython-312.pyc delete mode 100644 app/schemas/__pycache__/rag_sessions.cpython-312.pyc create mode 100644 architecture_as_is.md create mode 100644 iteration2_calibration_harness_report.md create mode 100644 pyproject.toml create mode 100644 rag_structure_report.md rename {app => src/app}/__init__.py (100%) rename {app => src/app}/core/__init__.py (100%) rename {app => src/app}/core/constants.py (100%) rename {app => src/app}/core/error_handlers.py (100%) rename {app => src/app}/core/exceptions.py (100%) rename {app => src/app}/core/logging_setup.py (100%) rename {app => src/app}/main.py (90%) rename {app => src/app}/modules/__init__.py (100%) rename {app => src/app}/modules/agent/README.md (100%) rename {app => src/app}/modules/agent/__init__.py (100%) rename {app => src/app}/modules/agent/changeset_validator.py (100%) create mode 100644 src/app/modules/agent/code_qa_runtime/__init__.py create mode 100644 src/app/modules/agent/code_qa_runtime/answer_policy.py create mode 100644 src/app/modules/agent/code_qa_runtime/executor.py create mode 100644 src/app/modules/agent/code_qa_runtime/models.py create mode 100644 src/app/modules/agent/code_qa_runtime/post_gate.py create mode 100644 src/app/modules/agent/code_qa_runtime/prompt_payload_builder.py create mode 100644 src/app/modules/agent/code_qa_runtime/prompt_selector.py create mode 100644 src/app/modules/agent/code_qa_runtime/repair.py create mode 100644 src/app/modules/agent/code_qa_runtime/repo_context.py create mode 100644 src/app/modules/agent/code_qa_runtime/retrieval_adapter.py rename {app => src/app}/modules/agent/confluence_service.py (100%) rename {app => src/app}/modules/agent/engine/__init__.py (100%) rename {app => src/app}/modules/agent/engine/graphs/__init__.py (91%) rename {app => src/app}/modules/agent/engine/graphs/base_graph.py (100%) create mode 100644 src/app/modules/agent/engine/graphs/code_qa_graph.py rename {app => src/app}/modules/agent/engine/graphs/docs_examples_loader.py (100%) rename {app => src/app}/modules/agent/engine/graphs/docs_graph.py (100%) rename {app => src/app}/modules/agent/engine/graphs/docs_graph_logic.py (100%) rename {app => src/app}/modules/agent/engine/graphs/file_targeting.py (100%) rename {app => src/app}/modules/agent/engine/graphs/progress.py (100%) rename {app => src/app}/modules/agent/engine/graphs/progress_registry.py (100%) rename {app => src/app}/modules/agent/engine/graphs/project_edits_contract.py (100%) rename {app => src/app}/modules/agent/engine/graphs/project_edits_graph.py (100%) rename {app => src/app}/modules/agent/engine/graphs/project_edits_logic.py (100%) rename {app => src/app}/modules/agent/engine/graphs/project_edits_patcher.py (100%) rename {app => src/app}/modules/agent/engine/graphs/project_edits_support.py (100%) rename {app => src/app}/modules/agent/engine/graphs/project_qa_graph.py (100%) rename {app => src/app}/modules/agent/engine/graphs/project_qa_step_graphs.py (100%) rename {app => src/app}/modules/agent/engine/graphs/state.py (100%) rename {app => src/app}/modules/agent/engine/orchestrator/__init__.py (100%) rename {app => src/app}/modules/agent/engine/orchestrator/actions/__init__.py (100%) rename {app => src/app}/modules/agent/engine/orchestrator/actions/code_explain_actions.py (100%) rename {app => src/app}/modules/agent/engine/orchestrator/actions/common.py (100%) rename {app => src/app}/modules/agent/engine/orchestrator/actions/docs_actions.py (100%) rename {app => src/app}/modules/agent/engine/orchestrator/actions/edit_actions.py (100%) rename {app => src/app}/modules/agent/engine/orchestrator/actions/explain_actions.py (100%) rename {app => src/app}/modules/agent/engine/orchestrator/actions/gherkin_actions.py (100%) rename {app => src/app}/modules/agent/engine/orchestrator/actions/project_qa_actions.py (100%) rename {app => src/app}/modules/agent/engine/orchestrator/actions/project_qa_analyzer.py (100%) rename {app => src/app}/modules/agent/engine/orchestrator/actions/project_qa_support.py (100%) rename {app => src/app}/modules/agent/engine/orchestrator/actions/review_actions.py (100%) rename {app => src/app}/modules/agent/engine/orchestrator/artifact_store.py (100%) rename {app => src/app}/modules/agent/engine/orchestrator/evidence_store.py (100%) rename {app => src/app}/modules/agent/engine/orchestrator/execution_context.py (100%) rename {app => src/app}/modules/agent/engine/orchestrator/execution_engine.py (100%) rename {app => src/app}/modules/agent/engine/orchestrator/metrics_persister.py (100%) rename {app => src/app}/modules/agent/engine/orchestrator/models/__init__.py (100%) rename {app => src/app}/modules/agent/engine/orchestrator/models/plan.py (100%) rename {app => src/app}/modules/agent/engine/orchestrator/models/result.py (100%) rename {app => src/app}/modules/agent/engine/orchestrator/models/task_spec.py (100%) rename {app => src/app}/modules/agent/engine/orchestrator/plan_compiler.py (100%) rename {app => src/app}/modules/agent/engine/orchestrator/plan_validator.py (100%) rename {app => src/app}/modules/agent/engine/orchestrator/quality_gates.py (100%) rename {app => src/app}/modules/agent/engine/orchestrator/quality_metrics.py (100%) rename {app => src/app}/modules/agent/engine/orchestrator/result_assembler.py (100%) rename {app => src/app}/modules/agent/engine/orchestrator/service.py (100%) rename {app => src/app}/modules/agent/engine/orchestrator/step_registry.py (100%) rename {app => src/app}/modules/agent/engine/orchestrator/task_spec_builder.py (100%) rename {app => src/app}/modules/agent/engine/orchestrator/template_registry.py (82%) rename {app => src/app}/modules/agent/engine/router/__init__.py (95%) rename {app => src/app}/modules/agent/engine/router/context_store.py (100%) rename {app => src/app}/modules/agent/engine/router/intent_classifier.py (100%) rename {app => src/app}/modules/agent/engine/router/intent_switch_detector.py (100%) rename {app => src/app}/modules/agent/engine/router/intents_registry.yaml (100%) rename {app => src/app}/modules/agent/engine/router/registry.py (100%) rename {app => src/app}/modules/agent/engine/router/router_service.py (100%) rename {app => src/app}/modules/agent/engine/router/schemas.py (100%) rename {app => src/app}/modules/agent/llm/__init__.py (100%) rename {app => src/app}/modules/agent/llm/service.py (100%) rename {app => src/app}/modules/agent/module.py (100%) rename {app => src/app}/modules/agent/prompt_loader.py (100%) rename {app => src/app}/modules/agent/prompts/code_explain_answer_v2.txt (100%) create mode 100644 src/app/modules/agent/prompts/code_qa_architecture_answer.txt create mode 100644 src/app/modules/agent/prompts/code_qa_degraded_answer.txt create mode 100644 src/app/modules/agent/prompts/code_qa_explain_answer.txt create mode 100644 src/app/modules/agent/prompts/code_qa_explain_local_answer.txt create mode 100644 src/app/modules/agent/prompts/code_qa_find_entrypoints_answer.txt create mode 100644 src/app/modules/agent/prompts/code_qa_find_tests_answer.txt create mode 100644 src/app/modules/agent/prompts/code_qa_general_answer.txt create mode 100644 src/app/modules/agent/prompts/code_qa_open_file_answer.txt create mode 100644 src/app/modules/agent/prompts/code_qa_repair_answer.txt create mode 100644 src/app/modules/agent/prompts/code_qa_trace_flow_answer.txt rename {app => src/app}/modules/agent/prompts/docs_detect.txt (100%) rename {app => src/app}/modules/agent/prompts/docs_examples/from_scratch_example.md (100%) rename {app => src/app}/modules/agent/prompts/docs_examples/incremental_update_example.md (100%) rename {app => src/app}/modules/agent/prompts/docs_execution_summary.txt (100%) rename {app => src/app}/modules/agent/prompts/docs_generation.txt (100%) rename {app => src/app}/modules/agent/prompts/docs_plan_sections.txt (100%) rename {app => src/app}/modules/agent/prompts/docs_self_check.txt (100%) rename {app => src/app}/modules/agent/prompts/docs_strategy.txt (100%) rename {app => src/app}/modules/agent/prompts/general_answer.txt (100%) rename {app => src/app}/modules/agent/prompts/project_answer.txt (100%) rename {app => src/app}/modules/agent/prompts/project_edits_hunks.txt (100%) rename {app => src/app}/modules/agent/prompts/project_edits_plan.txt (100%) rename {app => src/app}/modules/agent/prompts/project_edits_self_check.txt (100%) rename {app => src/app}/modules/agent/prompts/rag_intent_router_v2.txt (100%) rename {app => src/app}/modules/agent/prompts/router_intent.txt (100%) rename {app => src/app}/modules/agent/repository.py (100%) rename {app => src/app}/modules/agent/service.py (100%) rename {app => src/app}/modules/agent/story_context_repository.py (100%) rename {app => src/app}/modules/agent/story_session_recorder.py (100%) rename {app => src/app}/modules/application.py (87%) rename {app => src/app}/modules/chat/README.md (100%) rename {app => src/app}/modules/chat/__init__.py (100%) rename {app => src/app}/modules/chat/dialog_store.py (100%) rename {app => src/app}/modules/chat/direct_service.py (100%) rename {app => src/app}/modules/chat/evidence_gate.py (100%) rename {app => src/app}/modules/chat/module.py (98%) rename {app => src/app}/modules/chat/repository.py (100%) rename {app => src/app}/modules/chat/service.py (100%) rename {app => src/app}/modules/chat/session_resolver.py (100%) rename {app => src/app}/modules/chat/task_store.py (100%) rename {app => src/app}/modules/contracts.py (100%) rename {app => src/app}/modules/rag/README.md (100%) rename {app => src/app}/modules/rag/__init__.py (100%) create mode 100644 src/app/modules/rag/code_qa_pipeline/__init__.py create mode 100644 src/app/modules/rag/code_qa_pipeline/answer_synthesis.py create mode 100644 src/app/modules/rag/code_qa_pipeline/contracts.py create mode 100644 src/app/modules/rag/code_qa_pipeline/diagnostics.py create mode 100644 src/app/modules/rag/code_qa_pipeline/evidence_bundle_builder.py create mode 100644 src/app/modules/rag/code_qa_pipeline/evidence_gate.py create mode 100644 src/app/modules/rag/code_qa_pipeline/pipeline.py create mode 100644 src/app/modules/rag/code_qa_pipeline/retrieval_request_builder.py create mode 100644 src/app/modules/rag/code_qa_pipeline/retrieval_result_builder.py rename {app => src/app}/modules/rag/contracts/__init__.py (100%) rename {app => src/app}/modules/rag/contracts/documents.py (100%) rename {app => src/app}/modules/rag/contracts/enums.py (83%) rename {app => src/app}/modules/rag/contracts/evidence.py (100%) rename {app => src/app}/modules/rag/contracts/retrieval.py (100%) create mode 100644 src/app/modules/rag/embedding/__init__.py rename {app/modules/rag_session => src/app/modules/rag}/embedding/gigachat_embedder.py (84%) rename {app => src/app}/modules/rag/explain/__init__.py (100%) rename {app => src/app}/modules/rag/explain/budgeter.py (100%) rename {app => src/app}/modules/rag/explain/excerpt_planner.py (100%) rename {app => src/app}/modules/rag/explain/graph_repository.py (100%) rename {app => src/app}/modules/rag/explain/intent_builder.py (100%) rename {app => src/app}/modules/rag/explain/layered_gateway.py (99%) rename {app => src/app}/modules/rag/explain/models.py (100%) rename {app => src/app}/modules/rag/explain/retriever_v2.py (100%) rename {app => src/app}/modules/rag/explain/source_excerpt_fetcher.py (100%) rename {app => src/app}/modules/rag/explain/trace_builder.py (98%) rename {app => src/app}/modules/rag/indexing/code/code_text/chunker.py (100%) rename {app => src/app}/modules/rag/indexing/code/code_text/document_builder.py (95%) create mode 100644 src/app/modules/rag/indexing/code/edges/dataflow_document_builder.py create mode 100644 src/app/modules/rag/indexing/code/edges/dataflow_slice_builder.py rename {app => src/app}/modules/rag/indexing/code/edges/document_builder.py (93%) rename {app => src/app}/modules/rag/indexing/code/edges/extractor.py (61%) rename {app => src/app}/modules/rag/indexing/code/entrypoints/document_builder.py (50%) create mode 100644 src/app/modules/rag/indexing/code/entrypoints/execution_trace_builder.py create mode 100644 src/app/modules/rag/indexing/code/entrypoints/execution_trace_document_builder.py create mode 100644 src/app/modules/rag/indexing/code/entrypoints/fastapi_detector.py rename {app => src/app}/modules/rag/indexing/code/entrypoints/flask_detector.py (100%) rename {app => src/app}/modules/rag/indexing/code/entrypoints/registry.py (72%) rename {app => src/app}/modules/rag/indexing/code/entrypoints/typer_click_detector.py (100%) rename {app => src/app}/modules/rag/indexing/code/file_filter.py (73%) rename {app => src/app}/modules/rag/indexing/code/pipeline.py (61%) create mode 100644 src/app/modules/rag/indexing/code/roles/__init__.py create mode 100644 src/app/modules/rag/indexing/code/roles/builder.py create mode 100644 src/app/modules/rag/indexing/code/roles/document_builder.py create mode 100644 src/app/modules/rag/indexing/code/roles/models.py create mode 100644 src/app/modules/rag/indexing/code/roles/scorer.py rename {app => src/app}/modules/rag/indexing/code/symbols/ast_parser.py (100%) rename {app => src/app}/modules/rag/indexing/code/symbols/document_builder.py (81%) rename {app => src/app}/modules/rag/indexing/code/symbols/extractor.py (94%) rename {app => src/app}/modules/rag/indexing/common/document_upserter.py (100%) create mode 100644 src/app/modules/rag/indexing/common/path_filter.py rename {app => src/app}/modules/rag/indexing/common/report.py (100%) rename {app => src/app}/modules/rag/indexing/docs/chunkers/markdown_chunker.py (100%) rename {app => src/app}/modules/rag/indexing/docs/chunkers/text_chunker.py (100%) rename {app => src/app}/modules/rag/indexing/docs/classifier.py (100%) rename {app => src/app}/modules/rag/indexing/docs/document_builder.py (100%) rename {app => src/app}/modules/rag/indexing/docs/file_filter.py (85%) rename {app => src/app}/modules/rag/indexing/docs/pipeline.py (100%) rename {app/modules/rag_session => src/app/modules/rag}/indexing_service.py (90%) rename {app => src/app}/modules/rag/intent_router.md (100%) rename {app => src/app}/modules/rag/intent_router_v2/__init__.py (100%) create mode 100644 src/app/modules/rag/intent_router_v2/analysis/__init__.py rename {app/modules/rag/intent_router_v2 => src/app/modules/rag/intent_router_v2/analysis}/anchor_extractor.py (95%) rename {app/modules/rag/intent_router_v2 => src/app/modules/rag/intent_router_v2/analysis}/anchor_span_validator.py (100%) rename {app/modules/rag/intent_router_v2 => src/app/modules/rag/intent_router_v2/analysis}/conversation_anchor_builder.py (95%) rename {app/modules/rag/intent_router_v2 => src/app/modules/rag/intent_router_v2/analysis}/followup_detector.py (100%) rename {app/modules/rag/intent_router_v2 => src/app/modules/rag/intent_router_v2/analysis}/keyword_hint_builder.py (85%) rename {app/modules/rag/intent_router_v2 => src/app/modules/rag/intent_router_v2/analysis}/keyword_hint_sanitizer.py (100%) rename {app/modules/rag/intent_router_v2 => src/app/modules/rag/intent_router_v2/analysis}/negation_detector.py (100%) rename {app/modules/rag/intent_router_v2 => src/app/modules/rag/intent_router_v2/analysis}/normalization.py (100%) rename {app/modules/rag/intent_router_v2 => src/app/modules/rag/intent_router_v2/analysis}/normalization_terms.py (100%) create mode 100644 src/app/modules/rag/intent_router_v2/analysis/query_normalizer.py rename {app/modules/rag/intent_router_v2 => src/app/modules/rag/intent_router_v2/analysis}/query_plan_builder.py (65%) create mode 100644 src/app/modules/rag/intent_router_v2/analysis/sub_intent_detector.py rename {app/modules/rag/intent_router_v2 => src/app/modules/rag/intent_router_v2/analysis}/symbol_rules.py (100%) rename {app/modules/rag/intent_router_v2 => src/app/modules/rag/intent_router_v2/analysis}/term_mapping.py (96%) rename {app/modules/rag/intent_router_v2 => src/app/modules/rag/intent_router_v2/analysis}/test_signals.py (100%) rename {app => src/app}/modules/rag/intent_router_v2/factory.py (92%) create mode 100644 src/app/modules/rag/intent_router_v2/intent/__init__.py rename {app/modules/rag/intent_router_v2 => src/app/modules/rag/intent_router_v2/intent}/classifier.py (90%) rename {app/modules/rag/intent_router_v2 => src/app/modules/rag/intent_router_v2/intent}/conversation_policy.py (77%) rename {app/modules/rag/intent_router_v2 => src/app/modules/rag/intent_router_v2/intent}/graph_id_resolver.py (100%) rename {app => src/app}/modules/rag/intent_router_v2/local_runner.py (100%) rename {app => src/app}/modules/rag/intent_router_v2/logger.py (84%) rename {app => src/app}/modules/rag/intent_router_v2/models.py (78%) rename {app => src/app}/modules/rag/intent_router_v2/protocols.py (100%) create mode 100644 src/app/modules/rag/intent_router_v2/readme.md create mode 100644 src/app/modules/rag/intent_router_v2/retrieval/__init__.py rename {app/modules/rag/intent_router_v2 => src/app/modules/rag/intent_router_v2/retrieval}/evidence_policy_factory.py (81%) rename {app/modules/rag/intent_router_v2 => src/app/modules/rag/intent_router_v2/retrieval}/layer_query_builder.py (100%) create mode 100644 src/app/modules/rag/intent_router_v2/retrieval/retrieval_constraints_factory.py rename {app/modules/rag/intent_router_v2 => src/app/modules/rag/intent_router_v2/retrieval}/retrieval_filter_builder.py (92%) rename {app/modules/rag/intent_router_v2 => src/app/modules/rag/intent_router_v2/retrieval}/retrieval_spec_factory.py (60%) create mode 100644 src/app/modules/rag/intent_router_v2/router.py rename {app/modules/rag_session => src/app/modules/rag}/job_store.py (93%) rename {app/modules/rag_session => src/app/modules/rag}/module.py (87%) rename {app => src/app}/modules/rag/persistence/cache_repository.py (100%) rename {app => src/app}/modules/rag/persistence/document_repository.py (100%) rename {app => src/app}/modules/rag/persistence/job_repository.py (100%) create mode 100644 src/app/modules/rag/persistence/query_repository.py rename {app => src/app}/modules/rag/persistence/repository.py (83%) rename {app => src/app}/modules/rag/persistence/retrieval_statement_builder.py (66%) rename {app => src/app}/modules/rag/persistence/schema_repository.py (100%) rename {app => src/app}/modules/rag/persistence/session_repository.py (100%) rename {app/modules/rag_session => src/app/modules/rag}/retrieval/chunker.py (90%) rename {app => src/app}/modules/rag/retrieval/query_terms.py (100%) rename {app/modules/rag_session => src/app/modules/rag}/retrieval/scoring.py (84%) rename {app => src/app}/modules/rag/retrieval/test_filter.py (100%) rename {app => src/app}/modules/rag/services/rag_service.py (91%) rename {app/modules/rag_session => src/app/modules/rag}/session_store.py (88%) rename {app/modules/rag_repo => src/app/modules/rag}/webhook_service.py (98%) rename {app => src/app}/modules/shared/README.md (100%) rename {app/modules/rag_session => src/app/modules/shared}/__init__.py (100%) rename {app => src/app}/modules/shared/bootstrap.py (100%) rename {app => src/app}/modules/shared/checkpointer.py (100%) rename {app => src/app}/modules/shared/db.py (100%) rename {app => src/app}/modules/shared/env_loader.py (100%) rename {app => src/app}/modules/shared/event_bus.py (100%) rename {app/modules/rag_session/embedding => src/app/modules/shared/gigachat}/__init__.py (100%) rename {app => src/app}/modules/shared/gigachat/client.py (100%) rename {app => src/app}/modules/shared/gigachat/errors.py (100%) rename {app => src/app}/modules/shared/gigachat/settings.py (100%) rename {app => src/app}/modules/shared/gigachat/token_provider.py (100%) rename {app => src/app}/modules/shared/idempotency_store.py (100%) rename {app => src/app}/modules/shared/retry_executor.py (100%) rename {app/modules/rag_session/retrieval => src/app/schemas}/__init__.py (100%) rename {app => src/app}/schemas/changeset.py (100%) rename {app => src/app}/schemas/chat.py (100%) rename {app => src/app}/schemas/common.py (100%) rename {app => src/app}/schemas/indexing.py (100%) rename {app => src/app}/schemas/rag_sessions.py (100%) create mode 100644 tests/README.md delete mode 100644 tests/agent/__pycache__/test_gigachat_client_retry.cpython-312-pytest-9.0.2.pyc delete mode 100644 tests/agent/__pycache__/test_llm_service_logging.cpython-312-pytest-9.0.2.pyc delete mode 100644 tests/agent/__pycache__/test_logging_setup.cpython-312-pytest-9.0.2.pyc delete mode 100644 tests/agent/__pycache__/test_repo_webhook_service.cpython-312-pytest-9.0.2.pyc delete mode 100644 tests/agent/__pycache__/test_story_session_recorder.cpython-312-pytest-9.0.2.pyc delete mode 100644 tests/agent/engine/router/__pycache__/test_router_service_intent_policy.cpython-312-pytest-9.0.2.pyc delete mode 100644 tests/agent/orchestrator/__pycache__/test_code_explain_actions.cpython-312-pytest-9.0.2.pyc delete mode 100644 tests/agent/orchestrator/__pycache__/test_edit_actions_case_insensitive_path.cpython-312-pytest-9.0.2.pyc delete mode 100644 tests/agent/orchestrator/__pycache__/test_eval_suite.cpython-312-pytest-9.0.2.pyc delete mode 100644 tests/agent/orchestrator/__pycache__/test_eval_suite.cpython-312.pyc delete mode 100644 tests/agent/orchestrator/__pycache__/test_explain_actions.cpython-312-pytest-9.0.2.pyc delete mode 100644 tests/agent/orchestrator/__pycache__/test_orchestrator_service.cpython-312-pytest-9.0.2.pyc delete mode 100644 tests/agent/orchestrator/__pycache__/test_orchestrator_service.cpython-312.pyc delete mode 100644 tests/agent/orchestrator/__pycache__/test_plan_validator.cpython-312-pytest-9.0.2.pyc delete mode 100644 tests/agent/orchestrator/__pycache__/test_plan_validator.cpython-312.pyc delete mode 100644 tests/agent/orchestrator/__pycache__/test_project_qa_actions.cpython-312-pytest-9.0.2.pyc delete mode 100644 tests/agent/orchestrator/__pycache__/test_project_qa_answer_graph_v2.cpython-312-pytest-9.0.2.pyc delete mode 100644 tests/agent/orchestrator/__pycache__/test_project_qa_retrieval_graph_v2_only.cpython-312-pytest-9.0.2.pyc delete mode 100644 tests/agent/orchestrator/__pycache__/test_quality_metrics.cpython-312-pytest-9.0.2.pyc delete mode 100644 tests/agent/orchestrator/__pycache__/test_quality_metrics_gate_expectations.cpython-312-pytest-9.0.2.pyc delete mode 100644 tests/agent/orchestrator/__pycache__/test_template_registry.cpython-312-pytest-9.0.2.pyc delete mode 100644 tests/agent/orchestrator/__pycache__/test_template_registry.cpython-312.pyc delete mode 100644 tests/chat/__pycache__/test_chat_api_simple_code_explain.cpython-312-pytest-9.0.2.pyc delete mode 100644 tests/chat/__pycache__/test_chat_api_simple_code_explain.cpython-312.pyc delete mode 100644 tests/chat/__pycache__/test_direct_service.cpython-312-pytest-9.0.2.pyc delete mode 100644 tests/chat/__pycache__/test_direct_service.cpython-312.pyc create mode 100644 tests/pipeline_setup/README.md create mode 100644 tests/pipeline_setup/__init__.py create mode 100644 tests/pipeline_setup/conftest.py create mode 100644 tests/pipeline_setup/env_loader.py create mode 100644 tests/pipeline_setup/suite_01_synthetic/README.md create mode 100644 tests/pipeline_setup/suite_01_synthetic/__init__.py create mode 100644 tests/pipeline_setup/suite_01_synthetic/code_qa_eval/README.md create mode 100644 tests/pipeline_setup/suite_01_synthetic/code_qa_eval/__init__.py create mode 100644 tests/pipeline_setup/suite_01_synthetic/code_qa_eval/artifacts.py create mode 100644 tests/pipeline_setup/suite_01_synthetic/code_qa_eval/config.py create mode 100644 tests/pipeline_setup/suite_01_synthetic/code_qa_eval/golden_loader.py create mode 100644 tests/pipeline_setup/suite_01_synthetic/code_qa_eval/run.py create mode 100644 tests/pipeline_setup/suite_01_synthetic/code_qa_eval/runner.py create mode 100644 tests/pipeline_setup/suite_01_synthetic/code_qa_eval/test_eval_harness.py create mode 100644 tests/pipeline_setup/suite_01_synthetic/fixtures/code_qa_repo/main.py create mode 100644 tests/pipeline_setup/suite_01_synthetic/fixtures/code_qa_repo/src/order_app/__init__.py create mode 100644 tests/pipeline_setup/suite_01_synthetic/fixtures/code_qa_repo/src/order_app/api/__init__.py create mode 100644 tests/pipeline_setup/suite_01_synthetic/fixtures/code_qa_repo/src/order_app/api/orders.py create mode 100644 tests/pipeline_setup/suite_01_synthetic/fixtures/code_qa_repo/src/order_app/domain/__init__.py create mode 100644 tests/pipeline_setup/suite_01_synthetic/fixtures/code_qa_repo/src/order_app/domain/order.py create mode 100644 tests/pipeline_setup/suite_01_synthetic/fixtures/code_qa_repo/src/order_app/repositories/__init__.py create mode 100644 tests/pipeline_setup/suite_01_synthetic/fixtures/code_qa_repo/src/order_app/repositories/order_repository.py create mode 100644 tests/pipeline_setup/suite_01_synthetic/fixtures/code_qa_repo/src/order_app/services/__init__.py create mode 100644 tests/pipeline_setup/suite_01_synthetic/fixtures/code_qa_repo/src/order_app/services/order_service.py create mode 100644 tests/pipeline_setup/suite_01_synthetic/fixtures/code_qa_repo/src/order_app/utils/__init__.py create mode 100644 tests/pipeline_setup/suite_01_synthetic/fixtures/code_qa_repo/src/order_app/utils/helpers.py create mode 100644 tests/pipeline_setup/suite_01_synthetic/fixtures/code_qa_repo/tests/test_order_service.py create mode 100644 tests/pipeline_setup/suite_01_synthetic/golden/code_qa/README.md create mode 100644 tests/pipeline_setup/suite_01_synthetic/golden/code_qa/cases.yaml create mode 100644 tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_explain_borderline.json create mode 100644 tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_explain_borderline.md create mode 100644 tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_explain_negative.json create mode 100644 tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_explain_negative.md create mode 100644 tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_explain_order_positive.json create mode 100644 tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_explain_order_positive.md create mode 100644 tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_explain_order_service_positive.json create mode 100644 tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_explain_order_service_positive.md create mode 100644 tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_find_entrypoints_borderline.json create mode 100644 tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_find_entrypoints_borderline.md create mode 100644 tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_find_entrypoints_english.json create mode 100644 tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_find_entrypoints_english.md create mode 100644 tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_find_entrypoints_positive.json create mode 100644 tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_find_entrypoints_positive.md create mode 100644 tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_find_tests_borderline.json create mode 100644 tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_find_tests_borderline.md create mode 100644 tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_find_tests_negative.json create mode 100644 tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_find_tests_negative.md create mode 100644 tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_find_tests_order_positive.json create mode 100644 tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_find_tests_order_positive.md create mode 100644 tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_find_tests_positive.json create mode 100644 tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_find_tests_positive.md create mode 100644 tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_general_qa_borderline.json create mode 100644 tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_general_qa_borderline.md create mode 100644 tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_general_qa_how.json create mode 100644 tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_general_qa_how.md create mode 100644 tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_general_qa_positive.json create mode 100644 tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_general_qa_positive.md create mode 100644 tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_open_file_api_positive.json create mode 100644 tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_open_file_api_positive.md create mode 100644 tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_open_file_borderline.json create mode 100644 tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_open_file_borderline.md create mode 100644 tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_open_file_main_positive.json create mode 100644 tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_open_file_main_positive.md create mode 100644 tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_open_file_negative.json create mode 100644 tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_open_file_negative.md create mode 100644 tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_explain_borderline.json create mode 100644 tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_explain_borderline.md create mode 100644 tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_explain_negative.json create mode 100644 tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_explain_negative.md create mode 100644 tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_explain_order_positive.json create mode 100644 tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_explain_order_positive.md create mode 100644 tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_explain_order_service_positive.json create mode 100644 tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_explain_order_service_positive.md create mode 100644 tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_find_entrypoints_borderline.json create mode 100644 tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_find_entrypoints_borderline.md create mode 100644 tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_find_entrypoints_english.json create mode 100644 tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_find_entrypoints_english.md create mode 100644 tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_find_entrypoints_positive.json create mode 100644 tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_find_entrypoints_positive.md create mode 100644 tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_find_tests_borderline.json create mode 100644 tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_find_tests_borderline.md create mode 100644 tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_find_tests_negative.json create mode 100644 tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_find_tests_negative.md create mode 100644 tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_find_tests_order_positive.json create mode 100644 tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_find_tests_order_positive.md create mode 100644 tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_find_tests_positive.json create mode 100644 tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_find_tests_positive.md create mode 100644 tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_general_qa_borderline.json create mode 100644 tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_general_qa_borderline.md create mode 100644 tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_general_qa_how.json create mode 100644 tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_general_qa_how.md create mode 100644 tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_general_qa_positive.json create mode 100644 tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_general_qa_positive.md create mode 100644 tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_open_file_api_positive.json create mode 100644 tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_open_file_api_positive.md create mode 100644 tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_open_file_borderline.json create mode 100644 tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_open_file_borderline.md create mode 100644 tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_open_file_main_positive.json create mode 100644 tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_open_file_main_positive.md create mode 100644 tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_open_file_negative.json create mode 100644 tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_open_file_negative.md create mode 100644 tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_explain_borderline.json create mode 100644 tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_explain_borderline.md create mode 100644 tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_explain_negative.json create mode 100644 tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_explain_negative.md create mode 100644 tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_explain_order_positive.json create mode 100644 tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_explain_order_positive.md create mode 100644 tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_explain_order_service_positive.json create mode 100644 tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_explain_order_service_positive.md create mode 100644 tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_find_entrypoints_borderline.json create mode 100644 tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_find_entrypoints_borderline.md create mode 100644 tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_find_entrypoints_english.json create mode 100644 tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_find_entrypoints_english.md create mode 100644 tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_find_entrypoints_positive.json create mode 100644 tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_find_entrypoints_positive.md create mode 100644 tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_find_tests_borderline.json create mode 100644 tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_find_tests_borderline.md create mode 100644 tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_find_tests_negative.json create mode 100644 tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_find_tests_negative.md create mode 100644 tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_find_tests_order_positive.json create mode 100644 tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_find_tests_order_positive.md create mode 100644 tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_find_tests_positive.json create mode 100644 tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_find_tests_positive.md create mode 100644 tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_general_qa_borderline.json create mode 100644 tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_general_qa_borderline.md create mode 100644 tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_general_qa_how.json create mode 100644 tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_general_qa_how.md create mode 100644 tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_general_qa_positive.json create mode 100644 tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_general_qa_positive.md create mode 100644 tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_open_file_api_positive.json create mode 100644 tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_open_file_api_positive.md create mode 100644 tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_open_file_borderline.json create mode 100644 tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_open_file_borderline.md create mode 100644 tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_open_file_main_positive.json create mode 100644 tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_open_file_main_positive.md create mode 100644 tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_open_file_negative.json create mode 100644 tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_open_file_negative.md create mode 100644 tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/console_output.txt create mode 100644 tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/summary_20260311_232925.md create mode 100644 tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/summary_20260311_233701.md create mode 100644 tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/summary_20260311_233942.md create mode 100644 tests/pipeline_setup/suite_02_pipeline/README.md create mode 100644 tests/pipeline_setup/suite_02_pipeline/__init__.py create mode 100644 tests/pipeline_setup/suite_02_pipeline/cli/__init__.py create mode 100644 tests/pipeline_setup/suite_02_pipeline/cli/index_repo.py create mode 100644 tests/pipeline_setup/suite_02_pipeline/cli/run_full_chain.py create mode 100644 tests/pipeline_setup/suite_02_pipeline/cli/run_router_only.py create mode 100644 tests/pipeline_setup/suite_02_pipeline/cli/run_router_rag.py create mode 100644 tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/.env.test create mode 100644 tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/.env.test.example create mode 100644 tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/README.md create mode 100644 tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/__init__.py create mode 100644 tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/__main__.py create mode 100644 tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/cli.py create mode 100644 tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/fixtures/phrases.yaml rename {app/modules/rag_repo => tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/helpers}/__init__.py (100%) create mode 100644 tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/helpers/answer_policy.py create mode 100644 tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/helpers/answer_quality.py create mode 100644 tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/helpers/artifact_writer.py create mode 100644 tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/helpers/diagnostics.py create mode 100644 tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/helpers/env_bootstrap.py create mode 100644 tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/helpers/llm_answerer.py create mode 100644 tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/helpers/llm_prompt_loader.py create mode 100644 tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/helpers/models.py create mode 100644 tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/helpers/phrases_loader.py create mode 100644 tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/helpers/pipeline_config.py create mode 100644 tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/helpers/pipeline_runner.py create mode 100644 tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/helpers/prompt_payload_builder.py create mode 100644 tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/helpers/rag_db_adapter.py create mode 100644 tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/helpers/repo_indexer.py create mode 100644 tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/helpers/result_views.py create mode 100644 tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/helpers/runtime.py create mode 100644 tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/helpers/session_resolver.py create mode 100644 tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/test_answer_quality.py create mode 100644 tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/test_canonical_code_qa_pipeline.py create mode 100644 tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/test_cli.py create mode 100644 tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/test_diagnostics_jsonl.py create mode 100644 tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/test_intent_router_only_matrix.py create mode 100644 tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/test_intent_router_rag_llm_pipeline.py create mode 100644 tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/test_intent_router_rag_pipeline.py create mode 100644 tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/test_llm_answerer_context.py create mode 100644 tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/test_llm_prompt_catalog.py create mode 100644 tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/test_phrase_catalog.py create mode 100644 tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/test_rag_db_adapter.py create mode 100644 tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/test_repo_indexer_collector.py create mode 100644 tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/test_router_constraints_contract.py create mode 100644 tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/test_runtime_full_chain_output.py create mode 100644 tests/pipeline_setup/utils/__init__.py create mode 100644 tests/pipeline_setup/utils/rag_indexer/__init__.py create mode 100644 tests/pipeline_setup/utils/rag_indexer/indexer.py create mode 100644 tests/pipeline_setup_v2/README.md create mode 100644 tests/pipeline_setup_v2/__init__.py create mode 100644 tests/pipeline_setup_v2/cases/suite_01_synthetic/code_qa_eval.yaml create mode 100644 tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_retrieval.yaml create mode 100644 tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents.yaml create mode 100644 tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml create mode 100644 tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_smoke.yaml create mode 100644 tests/pipeline_setup_v2/cases/suite_02_pipeline/router_only_plba_code_retrieval.yaml create mode 100644 tests/pipeline_setup_v2/cases/suite_02_pipeline/router_only_smoke.yaml create mode 100644 tests/pipeline_setup_v2/cases/suite_02_pipeline/router_rag_plba_code_retrieval.yaml create mode 100644 tests/pipeline_setup_v2/cases/suite_02_pipeline/router_rag_smoke.yaml create mode 100644 tests/pipeline_setup_v2/core/__init__.py create mode 100644 tests/pipeline_setup_v2/core/artifacts.py create mode 100644 tests/pipeline_setup_v2/core/case_loader.py create mode 100644 tests/pipeline_setup_v2/core/models.py create mode 100644 tests/pipeline_setup_v2/core/runner.py create mode 100644 tests/pipeline_setup_v2/core/session_provider.py create mode 100644 tests/pipeline_setup_v2/core/test_validators.py create mode 100644 tests/pipeline_setup_v2/core/validators.py create mode 100644 tests/pipeline_setup_v2/llm_prompts.yaml create mode 100644 tests/pipeline_setup_v2/run.py create mode 100644 tests/pipeline_setup_v2/runtime/__init__.py create mode 100644 tests/pipeline_setup_v2/runtime/code_qa_eval_adapter.py create mode 100644 tests/pipeline_setup_v2/runtime/runtime_adapter.py create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_090854/full_chain_plba_code_retrieval_plba-fullchain-explain-control-plane-service.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_090854/full_chain_plba_code_retrieval_plba-fullchain-explain-control-plane-service.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_090854/full_chain_plba_code_retrieval_plba-fullchain-explain-http-control-channel.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_090854/full_chain_plba_code_retrieval_plba-fullchain-explain-http-control-channel.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_090854/full_chain_plba_code_retrieval_plba-fullchain-explain-runtime-manager.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_090854/full_chain_plba_code_retrieval_plba-fullchain-explain-runtime-manager.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_090854/summary.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091150/full_chain_plba_code_retrieval_plba-fullchain-explain-control-plane-service.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091150/full_chain_plba_code_retrieval_plba-fullchain-explain-control-plane-service.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091150/full_chain_plba_code_retrieval_plba-fullchain-explain-create-runtime.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091150/full_chain_plba_code_retrieval_plba-fullchain-explain-create-runtime.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091150/full_chain_plba_code_retrieval_plba-fullchain-explain-http-control-channel.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091150/full_chain_plba_code_retrieval_plba-fullchain-explain-http-control-channel.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091150/full_chain_plba_code_retrieval_plba-fullchain-explain-runtime-manager.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091150/full_chain_plba_code_retrieval_plba-fullchain-explain-runtime-manager.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091150/full_chain_plba_code_retrieval_plba-fullchain-explain-trace-service.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091150/full_chain_plba_code_retrieval_plba-fullchain-explain-trace-service.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091150/full_chain_plba_code_retrieval_plba-fullchain-explain-workflow-engine.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091150/full_chain_plba_code_retrieval_plba-fullchain-explain-workflow-engine.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091150/summary.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091314/full_chain_plba_code_retrieval_plba-fullchain-explain-control-plane-service.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091314/full_chain_plba_code_retrieval_plba-fullchain-explain-control-plane-service.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091314/full_chain_plba_code_retrieval_plba-fullchain-explain-create-runtime.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091314/full_chain_plba_code_retrieval_plba-fullchain-explain-create-runtime.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091314/full_chain_plba_code_retrieval_plba-fullchain-explain-http-control-channel.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091314/full_chain_plba_code_retrieval_plba-fullchain-explain-http-control-channel.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091314/full_chain_plba_code_retrieval_plba-fullchain-explain-runtime-manager.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091314/full_chain_plba_code_retrieval_plba-fullchain-explain-runtime-manager.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091314/full_chain_plba_code_retrieval_plba-fullchain-explain-trace-service.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091314/full_chain_plba_code_retrieval_plba-fullchain-explain-trace-service.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091314/full_chain_plba_code_retrieval_plba-fullchain-explain-workflow-engine.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091314/full_chain_plba_code_retrieval_plba-fullchain-explain-workflow-engine.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091314/summary.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091824/full_chain_plba_code_retrieval_plba-fullchain-explain-control-plane-service.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091824/full_chain_plba_code_retrieval_plba-fullchain-explain-control-plane-service.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091824/full_chain_plba_code_retrieval_plba-fullchain-explain-create-runtime.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091824/full_chain_plba_code_retrieval_plba-fullchain-explain-create-runtime.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091824/full_chain_plba_code_retrieval_plba-fullchain-explain-http-control-channel.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091824/full_chain_plba_code_retrieval_plba-fullchain-explain-http-control-channel.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091824/full_chain_plba_code_retrieval_plba-fullchain-explain-runtime-manager.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091824/full_chain_plba_code_retrieval_plba-fullchain-explain-runtime-manager.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091824/full_chain_plba_code_retrieval_plba-fullchain-explain-trace-service.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091824/full_chain_plba_code_retrieval_plba-fullchain-explain-trace-service.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091824/full_chain_plba_code_retrieval_plba-fullchain-explain-workflow-engine.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091824/full_chain_plba_code_retrieval_plba-fullchain-explain-workflow-engine.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091824/summary.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_112158/full_chain_plba_code_retrieval_plba-fullchain-explain-control-plane-service.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_112158/full_chain_plba_code_retrieval_plba-fullchain-explain-control-plane-service.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_112158/full_chain_plba_code_retrieval_plba-fullchain-explain-create-runtime.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_112158/full_chain_plba_code_retrieval_plba-fullchain-explain-create-runtime.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_112158/full_chain_plba_code_retrieval_plba-fullchain-explain-http-control-channel.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_112158/full_chain_plba_code_retrieval_plba-fullchain-explain-http-control-channel.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_112158/full_chain_plba_code_retrieval_plba-fullchain-explain-runtime-manager.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_112158/full_chain_plba_code_retrieval_plba-fullchain-explain-runtime-manager.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_112158/full_chain_plba_code_retrieval_plba-fullchain-explain-trace-service.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_112158/full_chain_plba_code_retrieval_plba-fullchain-explain-trace-service.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_112158/full_chain_plba_code_retrieval_plba-fullchain-explain-workflow-engine.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_112158/full_chain_plba_code_retrieval_plba-fullchain-explain-workflow-engine.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_112158/summary.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_114413/full_chain_plba_code_retrieval_plba-fullchain-explain-control-plane-service.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_114413/full_chain_plba_code_retrieval_plba-fullchain-explain-control-plane-service.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_114413/full_chain_plba_code_retrieval_plba-fullchain-explain-create-runtime.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_114413/full_chain_plba_code_retrieval_plba-fullchain-explain-create-runtime.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_114413/full_chain_plba_code_retrieval_plba-fullchain-explain-http-control-channel.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_114413/full_chain_plba_code_retrieval_plba-fullchain-explain-http-control-channel.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_114413/full_chain_plba_code_retrieval_plba-fullchain-explain-runtime-manager.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_114413/full_chain_plba_code_retrieval_plba-fullchain-explain-runtime-manager.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_114413/full_chain_plba_code_retrieval_plba-fullchain-explain-trace-service.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_114413/full_chain_plba_code_retrieval_plba-fullchain-explain-trace-service.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_114413/full_chain_plba_code_retrieval_plba-fullchain-explain-workflow-engine.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_114413/full_chain_plba_code_retrieval_plba-fullchain-explain-workflow-engine.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_114413/summary.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_114552/full_chain_plba_code_retrieval_plba-fullchain-explain-control-plane-service.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_114552/full_chain_plba_code_retrieval_plba-fullchain-explain-control-plane-service.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_114552/full_chain_plba_code_retrieval_plba-fullchain-explain-create-runtime.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_114552/full_chain_plba_code_retrieval_plba-fullchain-explain-create-runtime.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_114552/full_chain_plba_code_retrieval_plba-fullchain-explain-http-control-channel.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_114552/full_chain_plba_code_retrieval_plba-fullchain-explain-http-control-channel.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_114552/full_chain_plba_code_retrieval_plba-fullchain-explain-runtime-manager.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_114552/full_chain_plba_code_retrieval_plba-fullchain-explain-runtime-manager.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_114552/full_chain_plba_code_retrieval_plba-fullchain-explain-trace-service.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_114552/full_chain_plba_code_retrieval_plba-fullchain-explain-trace-service.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_114552/full_chain_plba_code_retrieval_plba-fullchain-explain-workflow-engine.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_114552/full_chain_plba_code_retrieval_plba-fullchain-explain-workflow-engine.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_114552/summary.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_115223/full_chain_plba_code_retrieval_plba-fullchain-explain-control-plane-service.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_115223/full_chain_plba_code_retrieval_plba-fullchain-explain-control-plane-service.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_115223/full_chain_plba_code_retrieval_plba-fullchain-explain-create-runtime.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_115223/full_chain_plba_code_retrieval_plba-fullchain-explain-create-runtime.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_115223/full_chain_plba_code_retrieval_plba-fullchain-explain-http-control-channel.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_115223/full_chain_plba_code_retrieval_plba-fullchain-explain-http-control-channel.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_115223/full_chain_plba_code_retrieval_plba-fullchain-explain-runtime-manager.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_115223/full_chain_plba_code_retrieval_plba-fullchain-explain-runtime-manager.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_115223/full_chain_plba_code_retrieval_plba-fullchain-explain-trace-service.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_115223/full_chain_plba_code_retrieval_plba-fullchain-explain-trace-service.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_115223/full_chain_plba_code_retrieval_plba-fullchain-explain-workflow-engine.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_115223/full_chain_plba_code_retrieval_plba-fullchain-explain-workflow-engine.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_115223/summary.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_115642/full_chain_plba_code_subintents_plba-fullchain-architecture-control-plane.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_115642/full_chain_plba_code_subintents_plba-fullchain-architecture-control-plane.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_115642/full_chain_plba_code_subintents_plba-fullchain-explain-local-runtime-manager.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_115642/full_chain_plba_code_subintents_plba-fullchain-explain-local-runtime-manager.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_115642/full_chain_plba_code_subintents_plba-fullchain-explain-runtime-manager.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_115642/full_chain_plba_code_subintents_plba-fullchain-explain-runtime-manager.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_115642/full_chain_plba_code_subintents_plba-fullchain-find-entrypoints.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_115642/full_chain_plba_code_subintents_plba-fullchain-find-entrypoints.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_115642/full_chain_plba_code_subintents_plba-fullchain-find-tests-runtime-manager.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_115642/full_chain_plba_code_subintents_plba-fullchain-find-tests-runtime-manager.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_115642/full_chain_plba_code_subintents_plba-fullchain-open-file-runtime.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_115642/full_chain_plba_code_subintents_plba-fullchain-open-file-runtime.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_115642/full_chain_plba_code_subintents_plba-fullchain-trace-flow-runtime-manager.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_115642/full_chain_plba_code_subintents_plba-fullchain-trace-flow-runtime-manager.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_115642/summary.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_115751/full_chain_plba_code_subintents_plba-fullchain-architecture-control-plane.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_115751/full_chain_plba_code_subintents_plba-fullchain-architecture-control-plane.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_115751/full_chain_plba_code_subintents_plba-fullchain-explain-local-runtime-manager.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_115751/full_chain_plba_code_subintents_plba-fullchain-explain-local-runtime-manager.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_115751/full_chain_plba_code_subintents_plba-fullchain-explain-runtime-manager.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_115751/full_chain_plba_code_subintents_plba-fullchain-explain-runtime-manager.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_115751/full_chain_plba_code_subintents_plba-fullchain-find-entrypoints.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_115751/full_chain_plba_code_subintents_plba-fullchain-find-entrypoints.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_115751/full_chain_plba_code_subintents_plba-fullchain-find-tests-runtime-manager.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_115751/full_chain_plba_code_subintents_plba-fullchain-find-tests-runtime-manager.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_115751/full_chain_plba_code_subintents_plba-fullchain-open-file-runtime.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_115751/full_chain_plba_code_subintents_plba-fullchain-open-file-runtime.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_115751/full_chain_plba_code_subintents_plba-fullchain-trace-flow-runtime-manager.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_115751/full_chain_plba_code_subintents_plba-fullchain-trace-flow-runtime-manager.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_115751/summary.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_120252/full_chain_plba_code_subintents_plba-fullchain-architecture-control-plane.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_120252/full_chain_plba_code_subintents_plba-fullchain-architecture-control-plane.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_120252/full_chain_plba_code_subintents_plba-fullchain-explain-local-runtime-manager.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_120252/full_chain_plba_code_subintents_plba-fullchain-explain-local-runtime-manager.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_120252/full_chain_plba_code_subintents_plba-fullchain-explain-runtime-manager.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_120252/full_chain_plba_code_subintents_plba-fullchain-explain-runtime-manager.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_120252/full_chain_plba_code_subintents_plba-fullchain-find-entrypoints.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_120252/full_chain_plba_code_subintents_plba-fullchain-find-entrypoints.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_120252/full_chain_plba_code_subintents_plba-fullchain-find-tests-runtime-manager.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_120252/full_chain_plba_code_subintents_plba-fullchain-find-tests-runtime-manager.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_120252/full_chain_plba_code_subintents_plba-fullchain-open-file-runtime.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_120252/full_chain_plba_code_subintents_plba-fullchain-open-file-runtime.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_120252/full_chain_plba_code_subintents_plba-fullchain-trace-flow-runtime-manager.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_120252/full_chain_plba_code_subintents_plba-fullchain-trace-flow-runtime-manager.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_120252/summary.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_120855.zip create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_120855/full_chain_plba_code_subintents_plba-fullchain-architecture-control-plane.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_120855/full_chain_plba_code_subintents_plba-fullchain-architecture-control-plane.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_120855/full_chain_plba_code_subintents_plba-fullchain-explain-local-runtime-manager.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_120855/full_chain_plba_code_subintents_plba-fullchain-explain-local-runtime-manager.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_120855/full_chain_plba_code_subintents_plba-fullchain-explain-runtime-manager.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_120855/full_chain_plba_code_subintents_plba-fullchain-explain-runtime-manager.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_120855/full_chain_plba_code_subintents_plba-fullchain-find-entrypoints.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_120855/full_chain_plba_code_subintents_plba-fullchain-find-entrypoints.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_120855/full_chain_plba_code_subintents_plba-fullchain-find-tests-runtime-manager.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_120855/full_chain_plba_code_subintents_plba-fullchain-find-tests-runtime-manager.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_120855/full_chain_plba_code_subintents_plba-fullchain-open-file-runtime.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_120855/full_chain_plba_code_subintents_plba-fullchain-open-file-runtime.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_120855/full_chain_plba_code_subintents_plba-fullchain-trace-flow-runtime-manager.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_120855/full_chain_plba_code_subintents_plba-fullchain-trace-flow-runtime-manager.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_120855/summary.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_123945/full_chain_plba_code_subintents_plba-fullchain-architecture-control-plane.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_123945/full_chain_plba_code_subintents_plba-fullchain-architecture-control-plane.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_123945/full_chain_plba_code_subintents_plba-fullchain-explain-local-runtime-manager.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_123945/full_chain_plba_code_subintents_plba-fullchain-explain-local-runtime-manager.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_123945/full_chain_plba_code_subintents_plba-fullchain-explain-runtime-manager.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_123945/full_chain_plba_code_subintents_plba-fullchain-explain-runtime-manager.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_123945/full_chain_plba_code_subintents_plba-fullchain-find-entrypoints.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_123945/full_chain_plba_code_subintents_plba-fullchain-find-entrypoints.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_123945/full_chain_plba_code_subintents_plba-fullchain-find-tests-runtime-manager.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_123945/full_chain_plba_code_subintents_plba-fullchain-find-tests-runtime-manager.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_123945/full_chain_plba_code_subintents_plba-fullchain-open-file-runtime.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_123945/full_chain_plba_code_subintents_plba-fullchain-open-file-runtime.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_123945/full_chain_plba_code_subintents_plba-fullchain-trace-flow-runtime-manager.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_123945/full_chain_plba_code_subintents_plba-fullchain-trace-flow-runtime-manager.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_123945/summary.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-architecture-control-plane.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-architecture-control-plane.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-architecture-runtime-manager.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-architecture-runtime-manager.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-explain-create-runtime.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-explain-create-runtime.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-explain-local-http-channel.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-explain-local-http-channel.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-explain-nonexistent-symbol.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-explain-nonexistent-symbol.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-explain-runtime-manager.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-explain-runtime-manager.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-explain-trace-service.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-explain-trace-service.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-control-plane.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-control-plane.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-health-endpoint.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-health-endpoint.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-find-tests-create-runtime.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-find-tests-create-runtime.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-find-tests-runtime-manager.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-find-tests-runtime-manager.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-find-tests-trace-service.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-find-tests-trace-service.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-find-tests-workflow-runtime-factory-negative.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-find-tests-workflow-runtime-factory-negative.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-open-file-nonexistent.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-open-file-nonexistent.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-open-file-public-api.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-open-file-public-api.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-open-file-runtime.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-open-file-runtime.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-health-endpoint.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-health-endpoint.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-runtime-start.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-runtime-start.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/summary.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-architecture-control-plane.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-architecture-control-plane.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-architecture-runtime-manager.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-architecture-runtime-manager.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-explain-create-runtime.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-explain-create-runtime.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-explain-local-http-channel.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-explain-local-http-channel.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-explain-nonexistent-symbol.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-explain-nonexistent-symbol.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-explain-runtime-manager.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-explain-runtime-manager.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-explain-trace-service.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-explain-trace-service.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-control-plane.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-control-plane.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-health-endpoint.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-health-endpoint.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-find-tests-create-runtime.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-find-tests-create-runtime.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-find-tests-runtime-manager.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-find-tests-runtime-manager.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-find-tests-trace-service.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-find-tests-trace-service.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-find-tests-workflow-runtime-factory-negative.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-find-tests-workflow-runtime-factory-negative.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-open-file-nonexistent.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-open-file-nonexistent.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-open-file-public-api.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-open-file-public-api.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-open-file-runtime.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-open-file-runtime.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-health-endpoint.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-health-endpoint.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-runtime-start.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-runtime-start.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/summary.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-architecture-control-plane.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-architecture-control-plane.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-architecture-runtime-manager.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-architecture-runtime-manager.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-explain-create-runtime.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-explain-create-runtime.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-explain-local-http-channel.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-explain-local-http-channel.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-explain-nonexistent-symbol.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-explain-nonexistent-symbol.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-explain-runtime-manager.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-explain-runtime-manager.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-explain-trace-service.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-explain-trace-service.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-control-plane.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-control-plane.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-health-endpoint.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-health-endpoint.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-find-tests-create-runtime.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-find-tests-create-runtime.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-find-tests-runtime-manager.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-find-tests-runtime-manager.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-find-tests-trace-service.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-find-tests-trace-service.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-find-tests-workflow-runtime-factory-negative.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-find-tests-workflow-runtime-factory-negative.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-open-file-nonexistent.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-open-file-nonexistent.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-open-file-public-api.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-open-file-public-api.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-open-file-runtime.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-open-file-runtime.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-health-endpoint.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-health-endpoint.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-runtime-start.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-runtime-start.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/summary.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-architecture-control-plane.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-architecture-control-plane.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-architecture-runtime-manager.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-architecture-runtime-manager.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-explain-create-runtime.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-explain-create-runtime.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-explain-local-http-channel.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-explain-local-http-channel.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-explain-nonexistent-symbol.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-explain-nonexistent-symbol.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-explain-runtime-manager.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-explain-runtime-manager.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-explain-trace-service.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-explain-trace-service.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-control-plane.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-control-plane.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-health-endpoint.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-health-endpoint.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-find-tests-create-runtime.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-find-tests-create-runtime.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-find-tests-runtime-manager.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-find-tests-runtime-manager.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-find-tests-trace-service.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-find-tests-trace-service.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-find-tests-workflow-runtime-factory-negative.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-find-tests-workflow-runtime-factory-negative.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-open-file-nonexistent.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-open-file-nonexistent.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-open-file-public-api.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-open-file-public-api.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-open-file-runtime.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-open-file-runtime.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-health-endpoint.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-health-endpoint.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-runtime-start.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-runtime-start.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/summary.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856.zip create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-architecture-control-plane.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-architecture-control-plane.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-architecture-runtime-manager.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-architecture-runtime-manager.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-explain-create-runtime.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-explain-create-runtime.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-explain-local-http-channel.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-explain-local-http-channel.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-explain-nonexistent-symbol.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-explain-nonexistent-symbol.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-explain-runtime-manager.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-explain-runtime-manager.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-explain-trace-service.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-explain-trace-service.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-control-plane.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-control-plane.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-health-endpoint.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-health-endpoint.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-find-tests-create-runtime.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-find-tests-create-runtime.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-find-tests-runtime-manager.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-find-tests-runtime-manager.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-find-tests-trace-service.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-find-tests-trace-service.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-find-tests-workflow-runtime-factory-negative.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-find-tests-workflow-runtime-factory-negative.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-open-file-nonexistent.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-open-file-nonexistent.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-open-file-public-api.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-open-file-public-api.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-open-file-runtime.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-open-file-runtime.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-health-endpoint.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-health-endpoint.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-runtime-start.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-runtime-start.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/summary.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084200/router_only_plba_code_retrieval_plba-explain-http-control-channel.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084200/router_only_plba_code_retrieval_plba-explain-http-control-channel.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084200/router_only_plba_code_retrieval_plba-explain-runtime-manager.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084200/router_only_plba_code_retrieval_plba-explain-runtime-manager.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084200/router_only_plba_code_retrieval_plba-explain-trace-service.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084200/router_only_plba_code_retrieval_plba-explain-trace-service.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084200/router_only_plba_code_retrieval_plba-find-entrypoints-bootstrap.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084200/router_only_plba_code_retrieval_plba-find-entrypoints-bootstrap.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084200/router_only_plba_code_retrieval_plba-find-entrypoints-create-runtime.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084200/router_only_plba_code_retrieval_plba-find-entrypoints-create-runtime.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084200/router_only_plba_code_retrieval_plba-find-tests-http-control-channel.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084200/router_only_plba_code_retrieval_plba-find-tests-http-control-channel.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084200/router_only_plba_code_retrieval_plba-find-tests-runtime-manager.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084200/router_only_plba_code_retrieval_plba-find-tests-runtime-manager.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084200/router_only_plba_code_retrieval_plba-general-qa-control-plane.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084200/router_only_plba_code_retrieval_plba-general-qa-control-plane.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084200/router_only_plba_code_retrieval_plba-general-qa-runtime.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084200/router_only_plba_code_retrieval_plba-general-qa-runtime.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084200/router_only_plba_code_retrieval_plba-open-http-control-channel-file.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084200/router_only_plba_code_retrieval_plba-open-http-control-channel-file.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084200/router_only_plba_code_retrieval_plba-open-runtime-manager-file.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084200/router_only_plba_code_retrieval_plba-open-runtime-manager-file.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084200/summary.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084313/router_only_plba_code_retrieval_plba-explain-http-control-channel.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084313/router_only_plba_code_retrieval_plba-explain-http-control-channel.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084313/router_only_plba_code_retrieval_plba-explain-runtime-manager.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084313/router_only_plba_code_retrieval_plba-explain-runtime-manager.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084313/router_only_plba_code_retrieval_plba-explain-trace-service.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084313/router_only_plba_code_retrieval_plba-explain-trace-service.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084313/router_only_plba_code_retrieval_plba-find-entrypoints-bootstrap.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084313/router_only_plba_code_retrieval_plba-find-entrypoints-bootstrap.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084313/router_only_plba_code_retrieval_plba-find-entrypoints-create-runtime.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084313/router_only_plba_code_retrieval_plba-find-entrypoints-create-runtime.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084313/router_only_plba_code_retrieval_plba-find-tests-http-control-channel.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084313/router_only_plba_code_retrieval_plba-find-tests-http-control-channel.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084313/router_only_plba_code_retrieval_plba-find-tests-runtime-manager.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084313/router_only_plba_code_retrieval_plba-find-tests-runtime-manager.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084313/router_only_plba_code_retrieval_plba-general-qa-control-plane.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084313/router_only_plba_code_retrieval_plba-general-qa-control-plane.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084313/router_only_plba_code_retrieval_plba-general-qa-runtime.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084313/router_only_plba_code_retrieval_plba-general-qa-runtime.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084313/router_only_plba_code_retrieval_plba-open-http-control-channel-file.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084313/router_only_plba_code_retrieval_plba-open-http-control-channel-file.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084313/router_only_plba_code_retrieval_plba-open-runtime-manager-file.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084313/router_only_plba_code_retrieval_plba-open-runtime-manager-file.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084313/summary.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_084838/router_rag_plba_code_retrieval_plba-rag-explain-control-plane.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_084838/router_rag_plba_code_retrieval_plba-rag-explain-control-plane.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_084838/router_rag_plba_code_retrieval_plba-rag-explain-create-runtime.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_084838/router_rag_plba_code_retrieval_plba-rag-explain-create-runtime.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_084838/router_rag_plba_code_retrieval_plba-rag-explain-http-control-channel.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_084838/router_rag_plba_code_retrieval_plba-rag-explain-http-control-channel.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_084838/router_rag_plba_code_retrieval_plba-rag-explain-runtime-manager.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_084838/router_rag_plba_code_retrieval_plba-rag-explain-runtime-manager.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_084838/router_rag_plba_code_retrieval_plba-rag-explain-runtime-module.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_084838/router_rag_plba_code_retrieval_plba-rag-explain-runtime-module.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_084838/router_rag_plba_code_retrieval_plba-rag-explain-trace-service.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_084838/router_rag_plba_code_retrieval_plba-rag-explain-trace-service.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_084838/router_rag_plba_code_retrieval_plba-rag-find-entrypoints.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_084838/router_rag_plba_code_retrieval_plba-rag-find-entrypoints.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_084838/router_rag_plba_code_retrieval_plba-rag-find-tests-http-control-channel.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_084838/router_rag_plba_code_retrieval_plba-rag-find-tests-http-control-channel.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_084838/router_rag_plba_code_retrieval_plba-rag-find-tests-runtime-manager.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_084838/router_rag_plba_code_retrieval_plba-rag-find-tests-runtime-manager.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_084838/router_rag_plba_code_retrieval_plba-rag-open-http-control-channel-file.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_084838/router_rag_plba_code_retrieval_plba-rag-open-http-control-channel-file.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_084838/router_rag_plba_code_retrieval_plba-rag-open-runtime-manager-file.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_084838/router_rag_plba_code_retrieval_plba-rag-open-runtime-manager-file.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_084838/summary.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_085312/router_rag_plba_code_retrieval_plba-rag-explain-control-plane-service.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_085312/router_rag_plba_code_retrieval_plba-rag-explain-control-plane-service.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_085312/router_rag_plba_code_retrieval_plba-rag-explain-create-runtime.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_085312/router_rag_plba_code_retrieval_plba-rag-explain-create-runtime.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_085312/router_rag_plba_code_retrieval_plba-rag-explain-http-control-channel.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_085312/router_rag_plba_code_retrieval_plba-rag-explain-http-control-channel.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_085312/router_rag_plba_code_retrieval_plba-rag-explain-runtime-manager.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_085312/router_rag_plba_code_retrieval_plba-rag-explain-runtime-manager.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_085312/router_rag_plba_code_retrieval_plba-rag-explain-trace-service.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_085312/router_rag_plba_code_retrieval_plba-rag-explain-trace-service.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_085312/router_rag_plba_code_retrieval_plba-rag-explain-workflow-engine.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_085312/router_rag_plba_code_retrieval_plba-rag-explain-workflow-engine.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_085312/router_rag_plba_code_retrieval_plba-rag-find-entrypoints.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_085312/router_rag_plba_code_retrieval_plba-rag-find-entrypoints.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_085312/router_rag_plba_code_retrieval_plba-rag-find-tests-http-control-channel.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_085312/router_rag_plba_code_retrieval_plba-rag-find-tests-http-control-channel.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_085312/router_rag_plba_code_retrieval_plba-rag-find-tests-runtime-manager.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_085312/router_rag_plba_code_retrieval_plba-rag-find-tests-runtime-manager.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_085312/router_rag_plba_code_retrieval_plba-rag-open-http-control-channel-file.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_085312/router_rag_plba_code_retrieval_plba-rag-open-http-control-channel-file.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_085312/router_rag_plba_code_retrieval_plba-rag-open-runtime-manager-file.json create mode 100644 tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_085312/router_rag_plba_code_retrieval_plba-rag-open-runtime-manager-file.md create mode 100644 tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_085312/summary.md create mode 100644 tests/pipeline_setup_v2/test_results/router_only_smoke/20260312_082745/full_chain_smoke_full_chain_explain_order_service.json create mode 100644 tests/pipeline_setup_v2/test_results/router_only_smoke/20260312_082745/full_chain_smoke_full_chain_explain_order_service.md create mode 100644 tests/pipeline_setup_v2/test_results/router_only_smoke/20260312_082745/router_only_smoke_router_only_docs_question.json create mode 100644 tests/pipeline_setup_v2/test_results/router_only_smoke/20260312_082745/router_only_smoke_router_only_docs_question.md create mode 100644 tests/pipeline_setup_v2/test_results/router_only_smoke/20260312_082745/router_only_smoke_router_only_open_fixture_main.json create mode 100644 tests/pipeline_setup_v2/test_results/router_only_smoke/20260312_082745/router_only_smoke_router_only_open_fixture_main.md create mode 100644 tests/pipeline_setup_v2/test_results/router_only_smoke/20260312_082745/router_rag_smoke_router_rag_explain_order.json create mode 100644 tests/pipeline_setup_v2/test_results/router_only_smoke/20260312_082745/router_rag_smoke_router_rag_explain_order.md create mode 100644 tests/pipeline_setup_v2/test_results/router_only_smoke/20260312_082745/router_rag_smoke_router_rag_open_fixture_main.json create mode 100644 tests/pipeline_setup_v2/test_results/router_only_smoke/20260312_082745/router_rag_smoke_router_rag_open_fixture_main.md create mode 100644 tests/pipeline_setup_v2/test_results/router_only_smoke/20260312_082745/summary.md create mode 100644 tests/pipeline_setup_v2/test_results/suite_01_smoke/20260312_082358/code_qa_eval_explain_order_positive.json create mode 100644 tests/pipeline_setup_v2/test_results/suite_01_smoke/20260312_082358/code_qa_eval_explain_order_positive.md create mode 100644 tests/pipeline_setup_v2/test_results/suite_01_smoke/20260312_082358/code_qa_eval_explain_order_service_positive.json create mode 100644 tests/pipeline_setup_v2/test_results/suite_01_smoke/20260312_082358/code_qa_eval_explain_order_service_positive.md create mode 100644 tests/pipeline_setup_v2/test_results/suite_01_smoke/20260312_082358/code_qa_eval_find_entrypoints_positive.json create mode 100644 tests/pipeline_setup_v2/test_results/suite_01_smoke/20260312_082358/code_qa_eval_find_entrypoints_positive.md create mode 100644 tests/pipeline_setup_v2/test_results/suite_01_smoke/20260312_082358/code_qa_eval_find_tests_positive.json create mode 100644 tests/pipeline_setup_v2/test_results/suite_01_smoke/20260312_082358/code_qa_eval_find_tests_positive.md create mode 100644 tests/pipeline_setup_v2/test_results/suite_01_smoke/20260312_082358/code_qa_eval_general_qa_positive.json create mode 100644 tests/pipeline_setup_v2/test_results/suite_01_smoke/20260312_082358/code_qa_eval_general_qa_positive.md create mode 100644 tests/pipeline_setup_v2/test_results/suite_01_smoke/20260312_082358/code_qa_eval_open_file_api_positive.json create mode 100644 tests/pipeline_setup_v2/test_results/suite_01_smoke/20260312_082358/code_qa_eval_open_file_api_positive.md create mode 100644 tests/pipeline_setup_v2/test_results/suite_01_smoke/20260312_082358/code_qa_eval_open_file_main_positive.json create mode 100644 tests/pipeline_setup_v2/test_results/suite_01_smoke/20260312_082358/code_qa_eval_open_file_main_positive.md create mode 100644 tests/pipeline_setup_v2/test_results/suite_01_smoke/20260312_082358/summary.md create mode 100644 tests/pipeline_setup_v3/README.md create mode 100644 tests/pipeline_setup_v3/__init__.py create mode 100644 tests/pipeline_setup_v3/cases/suite_01_synthetic/code_qa_eval.yaml create mode 100644 tests/pipeline_setup_v3/cases/suite_02_pipeline/full_chain_plba_code_retrieval.yaml create mode 100644 tests/pipeline_setup_v3/cases/suite_02_pipeline/full_chain_plba_code_subintents.yaml create mode 100644 tests/pipeline_setup_v3/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml create mode 100644 tests/pipeline_setup_v3/cases/suite_02_pipeline/full_chain_smoke.yaml create mode 100644 tests/pipeline_setup_v3/cases/suite_02_pipeline/router_only_plba_code_retrieval.yaml create mode 100644 tests/pipeline_setup_v3/cases/suite_02_pipeline/router_only_smoke.yaml create mode 100644 tests/pipeline_setup_v3/cases/suite_02_pipeline/router_rag_plba_code_retrieval.yaml create mode 100644 tests/pipeline_setup_v3/cases/suite_02_pipeline/router_rag_smoke.yaml create mode 100644 tests/pipeline_setup_v3/cli/__init__.py create mode 100644 tests/pipeline_setup_v3/cli/index_repo.py create mode 100644 tests/pipeline_setup_v3/core/__init__.py create mode 100644 tests/pipeline_setup_v3/core/artifacts.py create mode 100644 tests/pipeline_setup_v3/core/case_loader.py create mode 100644 tests/pipeline_setup_v3/core/models.py create mode 100644 tests/pipeline_setup_v3/core/runner.py create mode 100644 tests/pipeline_setup_v3/core/session_provider.py create mode 100644 tests/pipeline_setup_v3/core/test_validators.py create mode 100644 tests/pipeline_setup_v3/core/validators.py create mode 100644 tests/pipeline_setup_v3/run.py create mode 100644 tests/pipeline_setup_v3/runtime/__init__.py create mode 100644 tests/pipeline_setup_v3/runtime/agent_runtime_adapter.py create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-architecture-control-plane.json create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-architecture-control-plane.md create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-architecture-runtime-manager.json create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-architecture-runtime-manager.md create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-explain-create-runtime.json create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-explain-create-runtime.md create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-explain-local-http-channel.json create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-explain-local-http-channel.md create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-explain-nonexistent-symbol.json create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-explain-nonexistent-symbol.md create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-explain-runtime-manager.json create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-explain-runtime-manager.md create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-explain-trace-service.json create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-explain-trace-service.md create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-control-plane.json create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-control-plane.md create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-health-endpoint.json create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-health-endpoint.md create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-find-tests-create-runtime.json create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-find-tests-create-runtime.md create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-find-tests-runtime-manager.json create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-find-tests-runtime-manager.md create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-find-tests-trace-service.json create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-find-tests-trace-service.md create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-find-tests-workflow-runtime-factory-negative.json create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-find-tests-workflow-runtime-factory-negative.md create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-open-file-nonexistent.json create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-open-file-nonexistent.md create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-open-file-public-api.json create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-open-file-public-api.md create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-open-file-runtime.json create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-open-file-runtime.md create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-health-endpoint.json create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-health-endpoint.md create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-runtime-start.json create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-runtime-start.md create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/summary.md create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-architecture-control-plane.json create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-architecture-control-plane.md create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-architecture-runtime-manager.json create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-architecture-runtime-manager.md create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-explain-create-runtime.json create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-explain-create-runtime.md create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-explain-local-http-channel.json create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-explain-local-http-channel.md create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-explain-nonexistent-symbol.json create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-explain-nonexistent-symbol.md create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-explain-runtime-manager.json create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-explain-runtime-manager.md create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-explain-trace-service.json create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-explain-trace-service.md create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-control-plane.json create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-control-plane.md create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-health-endpoint.json create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-health-endpoint.md create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-find-tests-create-runtime.json create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-find-tests-create-runtime.md create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-find-tests-runtime-manager.json create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-find-tests-runtime-manager.md create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-find-tests-trace-service.json create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-find-tests-trace-service.md create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-find-tests-workflow-runtime-factory-negative.json create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-find-tests-workflow-runtime-factory-negative.md create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-open-file-nonexistent.json create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-open-file-nonexistent.md create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-open-file-public-api.json create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-open-file-public-api.md create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-open-file-runtime.json create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-open-file-runtime.md create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-health-endpoint.json create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-health-endpoint.md create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-runtime-start.json create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-runtime-start.md create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/summary.md create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-architecture-control-plane.json create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-architecture-control-plane.md create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-architecture-runtime-manager.json create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-architecture-runtime-manager.md create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-explain-create-runtime.json create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-explain-create-runtime.md create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-explain-local-http-channel.json create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-explain-local-http-channel.md create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-explain-nonexistent-symbol.json create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-explain-nonexistent-symbol.md create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-explain-runtime-manager.json create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-explain-runtime-manager.md create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-explain-trace-service.json create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-explain-trace-service.md create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-control-plane.json create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-control-plane.md create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-health-endpoint.json create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-health-endpoint.md create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-find-tests-create-runtime.json create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-find-tests-create-runtime.md create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-find-tests-runtime-manager.json create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-find-tests-runtime-manager.md create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-find-tests-trace-service.json create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-find-tests-trace-service.md create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-find-tests-workflow-runtime-factory-negative.json create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-find-tests-workflow-runtime-factory-negative.md create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-open-file-nonexistent.json create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-open-file-nonexistent.md create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-open-file-public-api.json create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-open-file-public-api.md create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-open-file-runtime.json create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-open-file-runtime.md create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-health-endpoint.json create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-health-endpoint.md create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-runtime-start.json create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-runtime-start.md create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/summary.md create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-architecture-control-plane.json create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-architecture-control-plane.md create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-architecture-runtime-manager.json create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-architecture-runtime-manager.md create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-explain-create-runtime.json create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-explain-create-runtime.md create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-explain-local-http-channel.json create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-explain-local-http-channel.md create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-explain-nonexistent-symbol.json create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-explain-nonexistent-symbol.md create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-explain-runtime-manager.json create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-explain-runtime-manager.md create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-explain-trace-service.json create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-explain-trace-service.md create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-control-plane.json create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-control-plane.md create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-health-endpoint.json create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-health-endpoint.md create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-find-tests-create-runtime.json create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-find-tests-create-runtime.md create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-find-tests-runtime-manager.json create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-find-tests-runtime-manager.md create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-find-tests-trace-service.json create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-find-tests-trace-service.md create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-find-tests-workflow-runtime-factory-negative.json create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-find-tests-workflow-runtime-factory-negative.md create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-open-file-nonexistent.json create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-open-file-nonexistent.md create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-open-file-public-api.json create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-open-file-public-api.md create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-open-file-runtime.json create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-open-file-runtime.md create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-health-endpoint.json create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-health-endpoint.md create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-runtime-start.json create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-runtime-start.md create mode 100644 tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/summary.md delete mode 100644 tests/rag/__pycache__/asserts_intent_router.cpython-312.pyc delete mode 100644 tests/rag/__pycache__/intent_router_testkit.cpython-312.pyc delete mode 100644 tests/rag/__pycache__/test_code_indexing_pipeline.cpython-312-pytest-9.0.2.pyc delete mode 100644 tests/rag/__pycache__/test_code_indexing_pipeline.cpython-312.pyc delete mode 100644 tests/rag/__pycache__/test_docs_indexing_pipeline.cpython-312-pytest-9.0.2.pyc delete mode 100644 tests/rag/__pycache__/test_docs_indexing_pipeline.cpython-312.pyc delete mode 100644 tests/rag/__pycache__/test_explain_intent_builder.cpython-312-pytest-9.0.2.pyc delete mode 100644 tests/rag/__pycache__/test_explain_intent_builder.cpython-312.pyc delete mode 100644 tests/rag/__pycache__/test_intent_router_e2e_flows.cpython-312-pytest-9.0.2.pyc delete mode 100644 tests/rag/__pycache__/test_intent_router_invariants.cpython-312-pytest-9.0.2.pyc delete mode 100644 tests/rag/__pycache__/test_intent_router_phrase_matrix.cpython-312-pytest-9.0.2.pyc delete mode 100644 tests/rag/__pycache__/test_intent_router_v2.cpython-312-pytest-9.0.2.pyc delete mode 100644 tests/rag/__pycache__/test_intent_router_v2.cpython-312.pyc delete mode 100644 tests/rag/__pycache__/test_intent_router_v2_local_flow.cpython-312-pytest-9.0.2.pyc delete mode 100644 tests/rag/__pycache__/test_intent_router_v2_local_flow.cpython-312.pyc delete mode 100644 tests/rag/__pycache__/test_layered_gateway.cpython-312-pytest-9.0.2.pyc delete mode 100644 tests/rag/__pycache__/test_local_project_reader.cpython-312-pytest-9.0.2.pyc delete mode 100644 tests/rag/__pycache__/test_query_normalization.cpython-312-pytest-9.0.2.pyc delete mode 100644 tests/rag/__pycache__/test_query_normalization.cpython-312.pyc delete mode 100644 tests/rag/__pycache__/test_query_repository_terms.cpython-312-pytest-9.0.2.pyc delete mode 100644 tests/rag/__pycache__/test_query_router.cpython-312-pytest-9.0.2.pyc delete mode 100644 tests/rag/__pycache__/test_query_terms.cpython-312-pytest-9.0.2.pyc delete mode 100644 tests/rag/__pycache__/test_query_terms.cpython-312.pyc delete mode 100644 tests/rag/__pycache__/test_rag_service_logging.cpython-312-pytest-9.0.2.pyc delete mode 100644 tests/rag/__pycache__/test_retrieval_statement_builder.cpython-312-pytest-9.0.2.pyc delete mode 100644 tests/rag/__pycache__/test_retriever_v2_no_fallback.cpython-312-pytest-9.0.2.pyc delete mode 100644 tests/rag/__pycache__/test_retriever_v2_no_fallback.cpython-312.pyc delete mode 100644 tests/rag/__pycache__/test_retriever_v2_pack.cpython-312-pytest-9.0.2.pyc delete mode 100644 tests/rag/__pycache__/test_retriever_v2_pack.cpython-312.pyc delete mode 100644 tests/rag/__pycache__/test_retriever_v2_production_first.cpython-312-pytest-9.0.2.pyc delete mode 100644 tests/rag/__pycache__/test_trace_builder.cpython-312-pytest-9.0.2.pyc delete mode 100644 tests/rag/__pycache__/test_trace_builder.cpython-312.pyc delete mode 100644 tests/rag/test_code_indexing_pipeline.py create mode 100644 tests/unit_tests/__init__.py rename tests/{ => unit_tests}/agent/engine/router/test_router_service_intent_policy.py (100%) rename tests/{ => unit_tests}/agent/orchestrator/test_code_explain_actions.py (100%) rename tests/{ => unit_tests}/agent/orchestrator/test_edit_actions_case_insensitive_path.py (100%) rename tests/{ => unit_tests}/agent/orchestrator/test_eval_suite.py (100%) rename tests/{ => unit_tests}/agent/orchestrator/test_explain_actions.py (100%) rename tests/{ => unit_tests}/agent/orchestrator/test_orchestrator_service.py (100%) rename tests/{ => unit_tests}/agent/orchestrator/test_plan_validator.py (100%) rename tests/{ => unit_tests}/agent/orchestrator/test_project_qa_actions.py (100%) rename tests/{ => unit_tests}/agent/orchestrator/test_project_qa_answer_graph_v2.py (100%) rename tests/{ => unit_tests}/agent/orchestrator/test_project_qa_retrieval_graph_v2_only.py (100%) rename tests/{ => unit_tests}/agent/orchestrator/test_quality_metrics.py (100%) rename tests/{ => unit_tests}/agent/orchestrator/test_quality_metrics_gate_expectations.py (100%) rename tests/{ => unit_tests}/agent/orchestrator/test_template_registry.py (100%) rename tests/{ => unit_tests}/agent/test_gigachat_client_retry.py (100%) rename tests/{ => unit_tests}/agent/test_llm_service_logging.py (100%) rename tests/{ => unit_tests}/agent/test_logging_setup.py (100%) rename tests/{ => unit_tests}/agent/test_repo_webhook_service.py (97%) rename tests/{ => unit_tests}/agent/test_story_session_recorder.py (100%) rename tests/{ => unit_tests}/chat/test_chat_api_simple_code_explain.py (100%) rename tests/{ => unit_tests}/chat/test_direct_service.py (100%) rename tests/{ => unit_tests}/rag/asserts_intent_router.py (100%) rename tests/{ => unit_tests}/rag/intent_router_testkit.py (90%) create mode 100644 tests/unit_tests/rag/test_code_indexing_pipeline.py rename tests/{ => unit_tests}/rag/test_docs_indexing_pipeline.py (100%) rename tests/{ => unit_tests}/rag/test_explain_intent_builder.py (100%) rename tests/{ => unit_tests}/rag/test_intent_router_e2e_flows.py (97%) rename tests/{ => unit_tests}/rag/test_intent_router_invariants.py (97%) rename tests/{ => unit_tests}/rag/test_layered_gateway.py (100%) create mode 100644 tests/unit_tests/rag/test_path_filter.py rename tests/{ => unit_tests}/rag/test_query_normalization.py (96%) rename tests/{ => unit_tests}/rag/test_query_terms.py (100%) create mode 100644 tests/unit_tests/rag/test_rag_service_filtering.py rename tests/{ => unit_tests}/rag/test_retrieval_statement_builder.py (66%) rename tests/{ => unit_tests}/rag/test_retriever_v2_no_fallback.py (100%) rename tests/{ => unit_tests}/rag/test_retriever_v2_pack.py (100%) rename tests/{ => unit_tests}/rag/test_retriever_v2_production_first.py (100%) rename tests/{ => unit_tests}/rag/test_trace_builder.py (96%) create mode 100644 v1_plan.md diff --git a/.gitignore b/.gitignore index 4c49bd7..a35594d 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,3 @@ .env +.venv +__pycache__ \ No newline at end of file diff --git a/README.md b/README.md index 0ea6578..f78ba80 100644 --- a/README.md +++ b/README.md @@ -1,161 +1,1189 @@ -# Агент для работы с проектной документацией +# Agent for Code-Aware Technical Documentation and Analysis -## 1. Общее описание -Приложение представляет собой backend агентного режима для работы с документацией и кодом проекта. +## 1. Цели проекта -Система решает следующие задачи: -- индексирует локальную копию проекта в `rag_session` и использует ее как основной рабочий контекст пользователя; -- принимает webhook коммитов репозитория в `rag_repo` и фиксирует контекст изменений по `story_id`; -- ускоряет построение `rag_session` за счет переиспользования кэша чанков и эмбеддингов из `rag_repo`; -- обрабатывает пользовательские запросы через `chat`, `agent`, оркестратор и специализированные графы; -- сохраняет quality-метрики, Story-контекст и артефакты сессии в PostgreSQL. +Проект направлен на создание агента, который помогает работать с кодовой базой, системной аналитикой и технической документацией как с единой инженерной системой знаний. -Ключевая идея архитектуры: -- `rag_session` отвечает за пользовательскую рабочую сессию и всегда остается основным источником retrieval; -- `rag_repo` не участвует напрямую в пользовательском ответе, а служит фоновым источником кэша и контекста коммитов; -- `story_id` связывает изменения аналитика, документацию и последующую работу тестировщика. +### 1.1. Практическая цель + +На первом этапе агент должен: +- понимать устройство системы по коду и существующим артефактам; +- находить и объяснять точки изменений; +- формировать и поддерживать техническую документацию по кодовой базе; +- связывать документацию, код и изменения, описанные в системной аналитике. + +На следующем этапе агент должен стать инструментом не только для чтения и описания системы, но и для подготовки новых инженерных артефактов, включая системную аналитику. + +### 1.2. Стадии развития + +#### Стадия 1 +Агент пишет и актуализирует **техническую документацию** на основе: +- кодовой базы; +- существующей технической документации; +- системной аналитики на фичи; +- при необходимости — бизнес-требований. + +#### Стадия 2 +Агент дополнительно начинает участвовать в подготовке **системной аналитики** на доработки, используя: +- бизнес-требования; +- существующую архитектуру; +- кодовую базу; +- текущую техническую документацию. + +### 1.3. Ключевая идея проекта + +Агент строится не как «чат над репозиторием», а как **intent-driven система с многослойным RAG**. + +Это означает, что: +- код индексируется как `symbols`, `relations`, `entrypoints` и связанные артефакты; +- документация индексируется как `sections`, `entities`, `facts`, `workflows` и `cross-links`; +- между кодом и документацией строятся явные мосты; +- ответы и документы формируются на основе evidence, а не свободной генерации. + +### 1.4. Ключевые принципы + +- **Evidence-first** — ответ и документ должны опираться на извлеченные артефакты. +- **Intent-driven retrieval** — выбор контекста зависит от домена и сценария. +- **Code и Docs — разные домены** — код и документацию нельзя одинаково индексировать и одинаково извлекать. +- **Явные связи важнее дублирования** — документы должны ссылаться друг на друга и на код, а не пересказывать один и тот же контент. +- **MVP должен быть узким** — сначала покрываются самые полезные сценарии, без попытки сразу построить полную универсальную систему. + +### 1.5. Два уровня архитектурного описания + +В документе одновременно фиксируются **целевая архитектура** и **текущий практический MVP-now**: + +- **Target Architecture** описывает то, к чему проект идёт. +- **MVP-now** описывает то, что реально доводится сейчас через тесты. +- **MVP-now** не включает UI-интеграцию и не требует полного runtime orchestration. +- **MVP-now** фокусируется на: + - IntentRouterV2; + - code-first retrieval; + - evidence gate; + - LLM answer quality; + - diagnostics. + +**Target Architecture** + +- full intent-driven agent; +- code + docs + cross-domain flows; +- runtime orchestration; +- docs generation; +- future support for system analysis generation. + +**MVP-now** + +- isolated `CODE_QA` test pipeline; +- IntentRouterV2 as canonical router; +- router-driven layered retrieval; +- evidence-first answer synthesis; +- diagnostics-first tuning; +- no UI dependency; +- docs retrieval is postponed. + +### 1.6. Структура проекта (src layout) + +Код приложения расположен в **`src/app`**. Импорты в коде — `from app.*`. Тесты добавляют `src` в `sys.path` через `tests/conftest.py`. Запуск API из корня: `PYTHONPATH=src uvicorn app.main:app --reload` или после `pip install -e .` — `uvicorn app.main:app --reload`. Запуск тестов: `pytest` из корня репозитория. + +--- + +## 2. Процесс AS IS и TO BE + +## 2.1. AS IS + +### Общая схема текущего процесса + +Сейчас системные аналитики получают на вход **бизнес-требования** и формируют два основных типа артефактов: + +1. **Системная аналитика на фичу** +2. **Техническая документация** + +Эти артефакты решают разные задачи и живут в разной логике. + +### 2.1.1. Артефакт 1 — системная аналитика на фичу + +Системная аналитика описывает, **что именно необходимо изменить в системе**, чтобы реализовать инкремент функциональности, заданный бизнес-требованиями. + +Этот документ используется: +- разработчиками — чтобы понимать, что и где менять; +- тестировщиками — чтобы понимать, что и как проверять; +- техническими стейкхолдерами — для согласования решения с точки зрения архитектуры, безопасности, сопровождения и смежных ограничений. + +#### Характер системной аналитики в текущем процессе + +Системная аналитика обычно: +- описывает **локальную доработку**; +- фиксирует **точки изменений**; +- не пересказывает весь незатрагиваемый контекст системы; +- опирается на существующую архитектуру, интеграции, API-подходы, UI-паттерны и другие действующие решения; +- кратко и прагматично описывает, что именно надо поменять. + +То есть это не полная документация по системе, а **документ на инкремент изменений**, который использует текущий контекст, но не дублирует его полностью. + +#### Типовой состав системной аналитики + +1. **Цели доработки** — краткое описание цели изменения. +2. **Требования к реализации** — особые требования, которые важно явно подсветить и учесть. +3. **Ограничения и допущения** — рамки, предположения и известные ограничения решения. +4. **Архитектура** — внутренняя структура решения на уровне модулей и интеграций с другими АС. +5. **Функциональные требования к реализации** — перечень изменений, которые необходимо внести в систему. +6. **Нефункциональные требования** — фичетогглы, безопасность, сопровождение, наблюдаемость и другие стандартные НФТ. +7. **Прочее** — дополнительная информация, полезная для реализации или согласования. + +### 2.1.2. Артефакт 2 — техническая документация + +Техническая документация описывает **то, как система работает**. + +Сейчас она организована как набор **атомизированных блоков**, которые: +- не должны пересекаться по смыслу; +- связаны между собой; +- размещаются на отдельных страницах Confluence; +- организованы иерархически. + +#### Текущие типы страниц технической документации + +Сейчас используются три основных шаблона: +- **Фронтальная страница** +- **Метод API** +- **Переиспользуемый блок логики** + +#### Шаблон: фронтальная страница + +1. **Технический Use Case** — пошаговое описание процесса работы страницы UI. +2. **Описание UI** — макет с перечислением UI-элементов: кнопок, полей, тогглов и т.д. Для каждого элемента указываются описание, источник данных, дефолтное значение / placeholder, правила активации, поведение при активации, правила валидации. +3. **Функциональные требования** — вынесенные из use case требования, чтобы не перегружать сценарий деталями. Например: вызовы API, обработка ответов, логические блоки. +4. **НФТ** — например: события пользовательской аналитики, фичетогглы. + +#### Шаблон: метод API + +1. **Технический Use Case** — пошаговое описание работы эндпоинта. +2. **Функциональные требования** — дополнительные требования, вынесенные из основного сценария. +3. **Контракт эндпоинта** — описание контракта на отдельной странице или в составе текущего документа. +4. **НФТ** — например: аудит, мониторинг. + +#### Шаблон: переиспользуемый блок логики + +1. **Технический Use Case** — описание работы блока логики по шагам. +2. **Функциональные требования** — вынесенные дополнительные требования и правила. + +Для некоторых блоков часть секций может отсутствовать, если она не нужна. + +### 2.1.3. Ограничения текущего процесса + +- техническая документация ведется отдельно от кодовой базы; +- документация и код могут расходиться; +- поддержание связей между страницами требует ручной дисциплины; +- подготовка документации зависит от ручного анализа системы; +- документы описывают систему атомарно, но связи между ними остаются хрупкими; +- генерация новой документации по существующему коду не автоматизирована; +- системная аналитика и техническая документация слабо связаны как единый инженерный контур. + +## 2.2. TO BE + +### 2.2.1. Общая схема целевого процесса + +В целевом процессе формирование **системной аналитики** пока сохраняется в текущем виде, а основной фокус переносится на трансформацию процесса подготовки **технической документации**. + +Целевое состояние: +- системный аналитик продолжает формировать системную аналитику на фичу; +- агент использует системную аналитику, кодовую базу и существующие артефакты; +- агент формирует, дополняет и связывает техническую документацию в текстовом виде; +- документация становится ближе к коду, лучше декомпозируется и лучше контролируется как инженерный артефакт. + +### 2.2.2. Что сохраняется без изменений на текущем этапе + +На ближайшем этапе сохраняется текущая роль системной аналитики как документа на изменение. + +То есть системная аналитика: +- продолжает создаваться аналитиком; +- остается входным артефактом для разработки и тестирования; +- используется для согласования с техническими стейкхолдерами; +- становится одним из ключевых входов для агента при генерации и обновлении техдокументации. + +### 2.2.3. Что меняется + +Техническая документация перестает быть набором страниц, поддерживаемых вручную в Confluence, и переводится в более инженерный формат. + +Основной целевой стек представления: +- `Markdown` — основной формат описания; +- `OpenAPI` — для API-контрактов; +- `Mermaid` — для легких схем; +- `PlantUML` — для диаграмм, где это уместно; +- `draw.io` — как дополнительный визуальный формат там, где нужен richer diagramming. + +### 2.2.4. Роль агента в целевом процессе + +Агент должен: +- анализировать кодовую базу; +- учитывать системную аналитику по фичам; +- учитывать существующую техническую документацию; +- извлекать связи между компонентами; +- формировать новые технические документы; +- актуализировать существующие документы; +- поддерживать иерархию документации и связи между артефактами. + +### 2.2.5. Следующий этап развития + +В дальнейшем агент должен начать участвовать и в подготовке **системной аналитики**. + +Это пока не детализируется как жесткий шаблон, но уже сейчас архитектура решения должна учитывать такую будущую возможность. + +Из этого следуют проектные выводы: +- системная аналитика должна быть пригодна для машинного чтения; +- шаблон системной аналитики желательно постепенно нормализовать; +- в документе должны быть явно выделяемые сущности: цель изменения, точки изменений, затрагиваемые модули, API, UI, НФТ, ограничения, интеграции. + +--- + +## 3. Формат ведения технической документации агентом + +## 3.1. Общие принципы + +Техническая документация, формируемая агентом, должна строиться как **система атомарных, не пересекающихся по смыслу документов**, связанных между собой явными ссылками. + +Ключевые принципы: +- один документ описывает одну сущность или один устойчивый технический аспект; +- документ не должен дублировать соседние документы; +- общая система знаний должна собираться через ссылки, а не через копипасту; +- структура документации должна быть пригодна как для чтения человеком, так и для индексирования в RAG. + +## 3.2. Базовые типы документных единиц + +На первом этапе логично сохранить текущую семантику типов документов, но перенести ее в файловую модель. + +Базовые типы: +- `ui_page` +- `api_method` +- `logic_block` + +Позже могут добавиться: +- `architecture_overview` +- `integration_doc` +- `domain_entity` +- `glossary_item` +- `index_page` + +## 3.3. Принцип декомпозиции страниц / файлов + +### Один устойчивый объект — один документ +Если объект можно переиспользовать или на него могут ссылаться другие документы, его надо выносить в отдельный файл. + +Примеры: +- отдельная UI-страница; +- отдельный API endpoint; +- отдельный блок логики; +- отдельный интеграционный сценарий. + +### Документы не должны пересекаться по смыслу +Если описание повторяется в нескольких местах, нужно выделять общий документ и ссылаться на него. + +Примеры: +- фронтальная страница не должна заново описывать логику API; +- документ по API не должен заново раскрывать общую логику переиспользуемого блока; +- вместо дублирования должен быть переход по ссылке. + +### Use case и детальные правила живут раздельно +Сценарий описывает поток работы, а детали выносятся в функциональные требования, отдельные блоки логики или контрактные описания. + +Это важно и для RAG-индексации: +- сценарии индексируются как workflows; +- отдельные правила — как facts; +- сущности и блоки — как entities. + +## 3.4. Иерархическая организация документации + +Документация должна быть организована как иерархическое дерево каталогов и файлов, а не как набор неструктурированных страниц. + +Пример верхнего уровня: + +```text +docs/ + ui/ + api/ + logic/ + domains/ + integrations/ + architecture/ + glossary/ + errors/ +``` + +Пример организации: + +```text +docs/ + ui/ + order-create-page.md + order-edit-page.md + api/ + orders-create.md + orders-get.md + logic/ + order-validation.md + order-enrichment.md + architecture/ + system-overview.md + integration-landscape.md + errors/ + catalog.yaml +``` + +## 3.5. Учет связей между документами + +Связи должны быть **явными и поддерживаемыми агентом**. + +Примеры: +- UI-страница ссылается на API, который она вызывает; +- API-документ ссылается на переиспользуемые логические блоки; +- логический блок ссылается на связанные интеграции; +- архитектурный обзор ссылается на набор конкретных модулей и документов; +- документ по коду может ссылаться на системную аналитику, которая инициировала изменение. + +Именно эта сеть ссылок затем индексируется в слоях: +- `D1_DOCUMENT_CATALOG` +- `D3_ENTITY_CATALOG` +- `D4_WORKFLOW_INDEX` +- `D5_REFERENCE_GRAPH` +- `D6_DOC_CODE_LINKS` + +## 3.6. Формат markdown-документов + +Основной формат технической документации — `Markdown`. + +Каждый документ состоит из двух частей: +1. **YAML frontmatter** — структурные метаданные; +2. **Markdown body** — основное содержимое по шаблону. + +## 3.7. YAML frontmatter + +Frontmatter нужен для: +- определения типа документа; +- идентификации документа; +- определения его места в иерархии; +- фиксации связей с кодом и другими документами; +- выделения сущностей и тегов; +- упрощения построения слоев `D1`, `D3`, `D5`, `D6`. + +### Базовый frontmatter + +```yaml +--- +id: ui-order-create-page +title: Страница создания заказа +doc_type: ui_page +domain: orders +status: draft +owner: system-analyst +source_of_truth: code +related_docs: + - api-orders-create + - logic-order-validation +related_code: + - src/orders/ui/create_page.tsx + - src/orders/api/orders_controller.py +entities: + - Order + - CreateOrder +tags: + - ui + - orders + - creation +--- +``` + +### Обязательные поля + +- `id` — стабильный уникальный идентификатор документа; +- `title` — человекочитаемый заголовок; +- `doc_type` — тип документа; +- `status` — статус документа; +- `source_of_truth` — основной источник истины; +- `related_docs` — ссылки на связанные документы; +- `related_code` — ссылки на кодовые артефакты, если они известны. + +### Рекомендуемые поля + +- `domain` +- `owner` +- `entities` +- `tags` +- `parent` +- `children` +- `feature` +- `system_analytics_refs` +- `business_refs` +- `updated_from` +- `reviewers` + +### Допустимые значения `doc_type` + +- `ui_page` +- `api_method` +- `logic_block` +- `architecture_overview` +- `integration_doc` +- `domain_entity` +- `glossary_item` +- `index_page` + +### Допустимые значения `status` + +- `draft` +- `in_review` +- `approved` +- `outdated` +- `generated` +- `active` + +### Допустимые значения `source_of_truth` + +- `code` +- `doc` +- `system_analysis` +- `business_requirements` +- `mixed` + +## 3.8. Typed frontmatter для разных типов документов + +У каждого типа документа есть: +- **общие поля**; +- **тип-специфичные поля**. + +### Пример для `api_method` + +```yaml +--- +id: api.create_invoice +doc_type: api_method +domain: billing +title: Создание инвойса + +endpoint: POST /api/v1/invoices +auth: USER +idempotent: false +timeout_ms: 3000 + +links: + called_by: + - ui.invoice_form + uses_logic: + - logic.invoice_validation + writes_db: + - db.invoices + - db.invoice_items + integrates_with: + - int.crm_sync + +related_docs: + - ui.invoice_form + - logic.invoice_validation +related_code: + - services/billing/api/create_invoice.py +entities: + - Invoice + - CreateInvoice + +tags: + - invoice + - create + - billing +status: active +version: 1.3 +source_of_truth: code +--- +``` + +### Для `api_method` полезно поддерживать + +- `endpoint` +- `auth` +- `idempotent` +- `timeout_ms` +- `links.called_by` +- `links.uses_logic` +- `links.writes_db` +- `links.integrates_with` + +### Для `ui_page` позже полезно поддерживать + +- `route` +- `entry_points` +- `calls_api` +- `uses_logic` +- `feature_toggles` + +### Для `logic_block` полезно поддерживать + +- `called_from` +- `uses_logic` +- `reads_db` +- `writes_db` +- `integrates_with` + +## 3.9. Двухслойная структура документа: `Summary` + `Details` + +LLM не должна каждый раз тонуть в полном документе. Поэтому каждый документ должен содержать два уровня представления. + +### `Summary` +Короткая, строго структурированная спецификация. Это слой **быстрого контекста**. + +Рекомендуемый объем: +- примерно 30–60 строк; +- без длинных пояснений; +- только ключевые факты. + +Пример: + +```md +## Summary +- Purpose: создание инвойса из формы +- Actor: пользователь +- Trigger: Submit +- Main API: POST /api/v1/invoices (api.create_invoice) +- Validation: required fields, amount > 0, date <= today +- Errors: 400(field errors), 409(duplicate), 503(retryable) +- Analytics: event invoice_submit, invoice_error +``` + +### `Details` +Полное раскрытие объекта: +- use case; +- функциональные требования; +- UI; +- API; +- ошибки; +- НФТ; +- связи; +- кодовые привязки. + +## 3.10. Общие требования к markdown body + +1. В документе должен быть один `H1`, совпадающий с `title`. +2. Основные разделы используют `H2`. +3. Подразделы внутри разделов используют `H3`. +4. Не должно быть хаотической вложенности заголовков. +5. Один раздел должен описывать одну смысловую часть. +6. Текст не должен дублировать соседние документы. +7. Вместо дублирования должны использоваться явные ссылки на связанные документы. +8. Сценарии, правила, ограничения и ссылки на код должны быть отделены друг от друга. + +## 3.11. Базовый каркас markdown-документа + +```md +--- +id: api-orders-create +title: Метод создания заказа +doc_type: api_method +domain: orders +status: draft +source_of_truth: code +related_docs: + - logic-order-validation + - ui-order-create-page +related_code: + - src/orders/api/create_order.py +entities: + - Order + - CreateOrder +tags: + - api + - orders +--- + +# Метод создания заказа + +## Summary +- Purpose: создание заказа +- Actor: пользователь +- Trigger: submit формы +- Main API: POST /orders + +## Назначение + +## Контекст + +## Технический use case + +## Функциональные требования + +## Нефункциональные требования + +## Связанные сущности + +## Связанный код + +## Связанные документы + +## История изменений +``` + +## 3.12. Требования к разделам внутри документа + +### `Назначение` +Коротко отвечает на вопрос: что это за объект и зачем он существует. + +### `Контекст` +Описывает только тот контекст, который нужен для понимания документа: место в системе, связь с соседними компонентами, границы ответственности. + +### `Технический use case` +Описывает последовательность работы объекта: шаги, ветвления, важные переходы, условия запуска, результаты выполнения. + +### `Функциональные требования` +Содержит атомарные требования, правила и проверки, которые не нужно раздувать внутри use case. + +### `Нефункциональные требования` +Содержит только НФТ: аудит, мониторинг, события аналитики, feature toggles, безопасность, сопровождение, observability. + +### `Связанные сущности` +Нужен для явного перечисления доменных сущностей, API, UI, логических блоков, интеграций, конфигурационных объектов. + +### `Связанный код` +Нужен для явной привязки документа к коду: файлы, модули, классы, функции, handlers, entrypoints. + +### `Связанные документы` +Нужен для поддержки сети документов без дублирования содержания. + +### `История изменений` +На MVP может быть простой: дата, источник изменения, что было обновлено. + +## 3.13. Специализированные шаблоны документов + +### UI Page + +```md +# <Название страницы> + +## Summary +## Назначение +## Контекст +## Технический use case +## Описание UI +## UI Elements +## Функциональные требования +## Нефункциональные требования +## Связанные API +## Связанные блоки логики +## Связанный код +## Связанные документы +## История изменений +``` + +#### Требования к разделу `Описание UI` +Для каждого элемента желательно описывать: +- тип элемента; +- назначение; +- источник данных; +- default / placeholder; +- правила активации; +- поведение при взаимодействии; +- валидацию. + +#### Требования к разделу `UI Elements` +UI-элементы должны храниться в **табличном** или **полуструктурированном** виде. + +Пример: + +```md +## UI Elements + +| id | type | label | data_source | validation | behavior | +|--------|--------|---------|------------|------------|----------| +| amount | input | Amount | local | >0 | enables submit | +| submit | button | Create | - | - | calls api.create_invoice | +``` + +Если модель UI сложная, допустим sidecar-файл `ui_elements.yaml` или `ui_elements.json` рядом с основным документом. + +### API Method + +```md +# <Название API метода> + +## Summary +## Назначение +## Контекст +## Технический use case +## Функциональные требования +## Contract +## Errors +## Нефункциональные требования +## Связанные блоки логики +## Связанный код +## Связанные документы +## История изменений +``` + +#### Требования к разделу `Contract` +Контракт может: +- быть кратко описан прямо в документе; +- ссылаться на OpenAPI; +- ссылаться на отдельный контрактный файл. + +Для REST API целевым источником истины должен становиться `OpenAPI`. + +### Reusable Logic Block + +```md +# <Название блока логики> + +## Summary +## Назначение +## Контекст +## Технический use case +## Функциональные требования +## Ограничения и условия вызова +## Нефункциональные требования +## Связанные API / UI / integration points +## Связанный код +## Связанные документы +## История изменений +``` + +## 3.14. Машинно-читаемые API-контракты + +Для API контрактов **источником истины** должен становиться: +- `OpenAPI` — предпочтительно; +- либо временно строгий markdown/yaml-контракт, если OpenAPI еще нет. + +Минимальный набор для API-контракта: +- `endpoint` +- `method` +- `request fields` +- `required / optional` +- `constraints` +- `response` +- `errors` +- `idempotency` +- `retry` +- `timeout` +- `auth` + +## 3.15. Каталог ошибок + +Ошибки, HTTP-коды, retry-правила и клиентское поведение не должны размазываться по разным документам. + +Нужен единый каталог ошибок, например `docs/errors/catalog.yaml`. + +Пример: + +```yaml +errors: + - error_id: invoice_validation_failed + http_code: 400 + internal_code: BILLING_400_01 + when: invalid request fields + client_behavior: show field errors + retry: false + owner: billing + + - error_id: invoice_duplicate + http_code: 409 + internal_code: BILLING_409_01 + when: duplicate invoice detected + client_behavior: show duplicate warning + retry: false + owner: billing + + - error_id: crm_sync_unavailable + http_code: 503 + internal_code: BILLING_503_02 + when: downstream CRM unavailable + client_behavior: retry later + retry: true + owner: billing +``` + +В API- и logic-документах лучше ссылаться на `error_id`, а не заново подробно описывать каждую ошибку. + +## 3.16. Требования к качеству документа для RAG + +1. **Явные заголовки** — не использовать безымянные блоки текста. +2. **Атомарные утверждения** — не смешивать несколько правил в одном пункте, если их можно разделить. +3. **Явные сущности** — использовать стабильные названия компонентов, API, модулей, страниц. +4. **Явные ссылки** — не писать «этот метод», если можно указать конкретную ссылку или идентификатор. +5. **Минимум дублирования** — повторяющийся контент должен заменяться ссылками. +6. **Привязка к коду** — если документ описывает кодовый объект, это должно быть явно указано. +7. **Разделение сценариев и правил** — workflow и fact-like требования должны быть отделены. + +## 3.17. Как структура markdown помогает RAG + +- `frontmatter` + заголовки → `D1_DOCUMENT_CATALOG` +- `entities`, `tags`, устойчивые термины → `D3_ENTITY_CATALOG` +- атомарные функциональные и нефункциональные требования → `D2_FACT_INDEX` +- `Технический use case` → `D4_WORKFLOW_INDEX` +- `related_docs`, явные ссылки → `D5_REFERENCE_GRAPH` +- `related_code`, упоминания symbols и файлов → `D6_DOC_CODE_LINKS` +- `Summary` → быстрый retrieval и short-form context для LLM + +## 3.18. Принципы генерации документации агентом + +Когда документ пишет агент, он должен: +- сначала извлечь evidence из кода, системной аналитики и существующих документов; +- определить тип документа; +- заполнить frontmatter; +- построить markdown body по шаблону; +- явно указать связи с кодом и другими документами; +- не дублировать уже существующее описание, если можно сослаться на него. + +--- + +## 4. Архитектура агента + +## 4.1. Общая идея + +Агент строится как **intent-driven orchestration system**, а не как один общий prompt над репозиторием. + +На верхнем уровне он состоит из следующих блоков: +1. **Router** +2. **Domain-specific graphs / pipelines** +3. **Layered RAG** +4. **Evidence gate** +5. **Answer / document synthesis** +6. **Diagnostics** + +### 4.1.1. Укрупненная схема -## 2. Архитектура ```mermaid -flowchart LR - User["Пользователь"] - Git["Git репозиторий\n(Gitea / Bitbucket)"] - Chat["Модуль chat"] - Agent["Модуль agent"] - RagSession["Модуль rag_session"] - RagRepo["Модуль rag_repo"] - Shared["Модуль shared"] - DB["PostgreSQL + pgvector"] - Giga["GigaChat API"] +flowchart TD + U[User / Analyst Request] --> R[Router] + R --> G1[Code Graphs] + R --> G2[Docs Graphs] + R --> G3[Cross-Domain Graphs] + R --> G4[General Fallback Graph] - User --> Chat - Chat --> Agent - Agent --> RagSession - Agent --> Shared - RagSession --> Shared - RagRepo --> Shared - Chat --> DB - Agent --> DB - RagSession --> DB - RagRepo --> DB - RagSession --> Giga - Agent --> Giga - Git --> RagRepo - RagRepo -.кэш и контекст коммитов.-> RagSession + G1 --> CRAG[CODE RAG] + G2 --> DRAG[DOCS RAG] + G3 --> CRAG + G3 --> DRAG + G4 --> CRAG + G4 --> DRAG + + CRAG --> E[Evidence Gate] + DRAG --> E + E --> S[Synthesis Layer] + S --> O[Answer / Generated Docs] + E --> D[Diagnostics] + S --> D ``` -Кратко по ролям модулей: -- `chat` — внешний API чата, фоновые задачи, SSE события, диалоги. -- `agent` — роутер интентов, оркестратор, графы, tools, генерация ответа и changeset. -- `rag_session` — создание и сопровождение пользовательского RAG индекса по локальным файлам. -- `rag_repo` — прием webhook коммитов, определение `story_id`, фиксация контекста коммита и заполнение repo-cache. -- `shared` — инфраструктурный слой: БД, retry, event bus, GigaChat client, настройки. +### 4.1.2. Разделение на Target Architecture и MVP-now + +**Target Architecture** + +- Router +- Graphs / pipelines для `CODE`, `DOCS`, `CROSS_DOMAIN`, `GENERAL` +- CODE RAG + DOCS RAG +- evidence gate +- synthesis layer +- diagnostics +- генерация технической документации из code / docs / system analysis +- перспектива генерации системной аналитики + +**MVP-now** + +- изолированный test-first пайплайн; +- цепочка: `user query → IntentRouterV2 → retrieval plan → layered retrieval → evidence gate → LLM answer → diagnostics`; +- основной домен: `CODE`; +- основные сценарии: + - `OPEN_FILE` + - `EXPLAIN` + - `FIND_TESTS` + - `FIND_ENTRYPOINTS` + - `GENERAL_QA` +- UI-интеграция не требуется для текущего этапа; +- docs retrieval не обязателен для текущего milestone; +- legacy `RouterService` не считается целевой архитектурой и в перспективе будет заменён. -## 3. Типичный флоу ```mermaid -sequenceDiagram - actor User as Пользователь - participant Git as Git репозиторий - participant RagRepo as Модуль rag_repo - participant DB as PostgreSQL - participant RagSession as Модуль rag_session - participant Chat as Модуль chat - participant Agent as Модуль agent - - Note over User,RagSession: Первая рабочая сессия: кэша репозитория еще нет - User->>RagSession: Создание rag_session и загрузка файлов проекта - RagSession->>DB: Проверка cache hit/miss - DB-->>RagSession: Кэш пуст - RagSession->>RagSession: Чанкинг и расчет embeddings без repo-cache - RagSession->>DB: Сохранение rag_chunks и rag_index_jobs - User->>Chat: Отправка запроса в чат - Chat->>Agent: Передача задачи - Agent->>RagSession: Retrieval контекста - RagSession->>DB: Чтение rag_chunks - DB-->>RagSession: Релевантные чанки - RagSession-->>Agent: Контекст - Agent-->>Chat: Ответ / changeset - - Note over User,Git: Пользователь вручную делает commit и push - Git->>RagRepo: Webhook push - RagRepo->>RagRepo: Определение provider, commit_sha, changed_files, story_id - RagRepo->>DB: Запись story_records/story_links/story_artifacts - RagRepo->>DB: Запись rag_blob_cache/rag_chunk_cache/rag_session_chunk_map - - Note over User,RagSession: Вторая рабочая сессия: repo-cache уже существует - User->>RagSession: Создание новой rag_session и загрузка файлов проекта - RagSession->>DB: Проверка cache hit/miss - DB-->>RagSession: Найдены cache hit по части файлов - RagSession->>RagSession: Переиспользование чанков из rag_repo cache - RagSession->>RagSession: Пересчет embeddings только для cache miss файлов - RagSession->>DB: Сохранение rag_chunks, rag_session_chunk_map, rag_index_jobs - User->>Chat: Новый запрос - Chat->>Agent: Передача задачи - Agent->>RagSession: Retrieval по новой сессии - RagSession-->>Agent: Контекст из session-RAG - Agent-->>Chat: Ответ / changeset +flowchart TD + U[User Query] --> R[IntentRouterV2] + R --> P[Retrieval Plan] + P --> G[Layered Retrieval] + G --> E[Evidence Gate] + E --> A[LLM Answer] + E --> D[Diagnostics] + A --> D ``` -Что важно в этом сценарии: -- первый запуск индексации может быть полностью без кэша; -- после коммита `rag_repo` фиксирует контекст изменений и наполняет cache-таблицы; -- во второй и последующих сессиях `rag_session` использует `cache_hit_files`, чтобы уменьшить объем новых embeddings. +Текущий milestone — test-first и code-first; этот пайплайн настраивается изолированно до интеграции в полный agent runtime. -## 4. Инструкции к запуску +### 4.1.3. Канонический test-first пайплайн (CODE_QA) -### Локальный запуск -```bash -python3 -m venv .venv -source .venv/bin/activate -pip install -r requirements.txt -uvicorn app.main:app --reload --port 15000 -``` +Единая точка входа изолированного пайплайна — пакет `app.modules.rag.code_qa_pipeline`: -### Запуск через Docker Compose -1. Создать `.env` на основе примера: -```bash -cp .env.example .env -``` +- **Роутер:** только `IntentRouterV2`; legacy `RouterService` не используется. +- **Контракты:** `RouterResult` (IntentRouterResult), `RetrievalRequest`, `RetrievalResult`, `EvidenceBundle`, `AnswerSynthesisInput`, `DiagnosticsReport`. +- **Цепочка:** запрос → IntentRouterV2 → RetrievalRequest → layered retrieval (через адаптер) → нормализованный RetrievalResult → EvidenceBundle → evidence gate → AnswerSynthesisInput → diagnostics. +- **Evidence gate:** общая проверка достаточности evidence по сценарию (OPEN_FILE, EXPLAIN, FIND_TESTS, FIND_ENTRYPOINTS, GENERAL_QA); при недостатке — degraded/insufficient, без уверенного ответа. +- **Диагностика:** Level 1 (summary) и Level 2 (detail), машинно-читаемые коды причин (`failure_reasons`: `target_not_resolved`, `path_scope_empty`, `layer_c0_empty`, `insufficient_evidence`, `tests_not_found`, `entrypoints_not_found` и др.). +- **Запуск пайплайна в тестах:** `CodeQAPipelineRunner(router=..., retrieval_adapter=...)`; метод `run(user_query, rag_session_id)` возвращает `CodeQAPipelineResult` с полной диагностикой. -2. Заполнить как минимум `GIGACHAT_TOKEN`. +Тесты: `tests/pipeline_setup/pipeline_intent_rag/test_canonical_code_qa_pipeline.py` (роутер → retrieval request, нормализованный результат, evidence gate, диагностика). -3. Запустить сервисы: -```bash -docker compose up -d --build -``` +## 4.2. Router -4. Проверить доступность backend: -```bash -curl http://localhost:15000/health -``` +Router определяет: +- домен запроса; +- intent; +- sub-intent; +- confidence; +- подходящий graph; +- требования к retrieval plan. -Ожидаемый ответ: -```json -{"status":"ok"} -``` +Целевые домены: +- `CODE` +- `DOCS` +- `CROSS_DOMAIN` +- `GENERAL` -### Основные адреса -- Backend API: `http://localhost:15000` -- PostgreSQL + pgvector: `localhost:5432` -- Webhook репозитория: `POST /internal/rag-repo/webhook` +## 4.3. Graphs / pipelines -### Базовый сценарий проверки -1. Создать `rag_session` через `POST /api/rag/sessions`. -2. Дождаться завершения index-job через `GET /api/rag/sessions/{rag_session_id}/jobs/{index_job_id}`. -3. Создать диалог через `POST /api/chat/dialogs`. -4. Отправить сообщение через `POST /api/chat/messages`. -5. Настроить webhook репозитория на `POST /internal/rag-repo/webhook`. -6. Сделать commit с `story_id` в сообщении, например `FEAT-1 ...`. -7. Проверить заполнение таблиц: - - `story_records`, `story_links`, `story_artifacts` - - `rag_blob_cache`, `rag_chunk_cache`, `rag_session_chunk_map` -8. Во второй сессии индексации проверить поля job-статуса: - - `indexed_files` - - `cache_hit_files` - - `cache_miss_files` +Graph — это специализированный сценарий обработки запроса. + +Для MVP целесообразны как минимум: +- `CodeOpenGraph` +- `CodeExplainGraph` +- `FindTestsGraph` +- `FindEntrypointsGraph` +- `DocsSearchGraph` +- `DocsGenerateFromCodeGraph` +- `CrossDomainLinkGraph` +- `GeneralFallbackGraph` + +## 4.4. Layered RAG + +RAG строится как система специализированных слоев для двух основных доменов: +- `CODE RAG` +- `DOCS RAG` + +Каждый graph извлекает контекст не из одного общего индекса, а из нужного набора слоев в зависимости от intent. + +## 4.5. Evidence gate + +Перед синтезом ответа или документа агент должен проверять, хватает ли опоры. + +Примеры: +- найден ли symbol; +- найдено ли достаточное количество code chunks; +- есть ли supporting relations; +- есть ли document evidence; +- есть ли docs ↔ code mapping. + +Если опоры недостаточно, агент должен: +- деградировать в упрощенный режим; +- честно фиксировать неполноту ответа; +- при необходимости уходить в fallback. + +## 4.6. Synthesis layer + +На этом этапе LLM: +- агрегирует найденные артефакты; +- формирует объяснение; +- пишет документ; +- структурирует результат под нужный шаблон. + +LLM не должна быть основным источником фактов. Фактическая основа должна приходить из RAG и диагностируемого pipeline. + +## 4.7. Diagnostics + +Система должна сохранять диагностический след: +- какой graph был выбран; +- какие слои использовались; +- что было найдено; +- где retrieval был слабым; +- почему был выбран fallback; +- какие evidence стали основой ответа. + +## 4.8. Сценарии: Target Architecture vs MVP-now + +### 4.8.1. Target Architecture + +#### CODE +- `OPEN_FILE` — открыть конкретный файл; +- `OPEN_SYMBOL` — открыть класс / функцию / метод; +- `EXPLAIN` — объяснить, как работает сущность или фрагмент; +- `FIND_TESTS` — найти релевантные тесты; +- `FIND_ENTRYPOINTS` — найти основные точки входа; +- `RELATED_CODE` — найти связанные сущности и ближайший контекст. + +#### DOCS +- `DOC_SEARCH` — найти релевантный фрагмент документации; +- `DOC_EXPLAIN` — кратко объяснить, что сказано в документации по теме; +- `DOC_ENTITY_LOOKUP` — найти разделы, связанные с сущностью или компонентом; +- `GENERATE_DOCS_FROM_CODE` — сформировать документацию по коду с нуля для модуля, класса, функции, компонента или сценария. + +#### CROSS-DOMAIN +- `FIND_IMPLEMENTATION_BY_DOC` — найти реализацию по описанию; +- `FIND_DOC_BY_CODE` — найти документацию по коду; +- `COMPARE_DOCS_AND_CODE` — базовое сопоставление документации и реализации. + +#### GENERAL / FALLBACK +- `GENERAL_QA` — общий сценарий ответа на вопрос, если домен или интент не удалось определить уверенно. + +### 4.8.2. MVP-now + +В текущем цикле фокус на сценариях: + +- `OPEN_FILE` +- `EXPLAIN` +- `FIND_TESTS` +- `FIND_ENTRYPOINTS` +- `GENERAL_QA` + +DOCS и CROSS_DOMAIN остаются частью target architecture; в текущем цикле они не являются обязательной частью test-first MVP. + +--- + +## 5. Структура слоев RAG + +## 5.1. CODE RAG + +### C0 — Source Chunks +**Назначение:** базовые фрагменты исходного кода. +**Единица:** chunk кода. +**Как формируется:** исходные файлы обходятся и режутся на chunk’и с учетом структурных границ. +**Статус в MVP:** да. + +### C1 — Symbol Catalog +**Назначение:** каталог модулей, классов, функций, методов и других значимых сущностей. +**Единица:** symbol. +**Как формируется:** из AST и синтаксического разбора кода. +**Статус в MVP:** да. + +### C2 — Symbol Relations +**Назначение:** связи между symbols. +**Единица:** relation. +**Как формируется:** вторым проходом по AST и структурным зависимостям. +**Статус в MVP:** да, в ограниченном виде. + +### C3 — Entrypoints +**Назначение:** каталог точек входа системы. +**Единица:** entrypoint. +**Как формируется:** специализированными детекторами entrypoint-паттернов. +**Статус в MVP:** да, минимально. + +### C4 — Execution Paths +**Назначение:** типовые пути исполнения. +**Единица:** path. +**Как формируется:** поверх `C2` и `C3` через производную трассировку. +**Статус в MVP:** нет. + +### C5 — Test Mappings +**Назначение:** связи production code ↔ tests. +**Единица:** mapping. +**Как формируется:** по путям, именам, импортам и конвенциям проекта. +**Статус в MVP:** да, минимально. + +### C6 — Code Facts +**Назначение:** нормализованные факты из кода. +**Единица:** fact. +**Как формируется:** поверх `C1–C3` как производный слой. +**Статус в MVP:** нет. + +## 5.2. DOCS RAG + +### D0 — Document Chunks +**Назначение:** базовые фрагменты документации. +**Единица:** document chunk. +**Как формируется:** документы нормализуются и режутся на chunk’и с сохранением `section path`. +**Статус в MVP:** да. + +### D1 — Document Catalog +**Назначение:** каталог документов и разделов. +**Единица:** `document node / section node`. +**Как формируется:** из структуры документов и их заголовков. +**Статус в MVP:** да. + +### D2 — Fact Index +**Назначение:** атомарные факты из документации. +**Единица:** fact. +**Как формируется:** из `D0/D1` через правила, шаблоны и при необходимости LLM extraction с валидацией. +**Статус в MVP:** частично. + +### D3 — Entity Catalog +**Назначение:** каталог сущностей и понятий документации. +**Единица:** entity / concept. +**Как формируется:** из устойчивых терминов, заголовков, словарей и нормализации повторяющихся сущностей. +**Статус в MVP:** да, минимально. + +### D4 — Workflow Index +**Назначение:** процедуры, сценарии, последовательности шагов. +**Единица:** workflow. +**Как формируется:** из use case, процессных разделов и последовательных описаний шагов. +**Статус в MVP:** нет. + +### D5 — Reference Graph +**Назначение:** граф ссылок между документами, секциями, сущностями и фактами. +**Единица:** reference link. +**Как формируется:** из явных и неявных cross-links между документами. +**Статус в MVP:** нет. + +### D6 — Doc-Code Links +**Назначение:** мост между документацией и кодом. +**Единица:** `doc artifact ↔ code artifact link`. +**Как формируется:** из имен, aliases, путей, устойчивых терминов и других надежных соответствий. +**Статус в MVP:** да, минимально. + +## 5.3. Layer scope: Target Architecture vs MVP-now + +### 5.3.1. Target Architecture + +Полная карта слоёв: + +- **CODE:** C0–C6 (Source Chunks, Symbol Catalog, Symbol Relations, Entrypoints, Execution Paths, Test Mappings, Code Facts) +- **DOCS:** D0–D6 (Document Chunks, Document Catalog, Fact Index, Entity Catalog, Workflow Index, Reference Graph, Doc-Code Links) + +### 5.3.2. MVP-now + +**Обязательные сейчас:** + +- `C0_SOURCE_CHUNKS` +- `C1_SYMBOL_CATALOG` +- `C2_SYMBOL_RELATIONS` +- `C3_ENTRYPOINTS` + +**В облегчённом виде:** + +- `C5_TEST_MAPPINGS` или `C5-lite` + +**Не блокируют текущий этап:** + +- `C4_EXECUTION_PATHS` +- `C6_CODE_FACTS` +- весь docs runtime (слои D0–D6 в исполнении runtime) + +Слои документации остаются частью target architecture; docs retrieval пока не обязателен для текущего code-first milestone. + +--- + +## 6. Итоговая рамка MVP-now + +Сейчас система должна стабильно работать в **test-first** режиме. + +**Фокус:** + +- CODE_QA; +- через тесты настраиваются: + - intent routing (IntentRouterV2); + - layered retrieval; + - evidence sufficiency; + - answer quality; + - diagnostics. + +**Не входят в текущий milestone:** + +- UI-интеграция; +- docs runtime; +- полная интеграция orchestration переносится на следующий этап после стабилизации test pipeline. + +В целевой архитектуре по-прежнему заложены: +- уверенная работа с кодом, symbols, entrypoints, тестами; +- ответ по документации и мост docs ↔ code; +- генерация документации по коду; +- fallback при неуверенном роутинге. + +В MVP-now сознательно **не включаются** самые дорогие части: +- полноценные execution paths для всей системы; +- богатые fact-индексы по всем доменам; +- полный reference graph документации; +- глубокая автоматизация подготовки системной аналитики. -### Полезные замечания -- Текущая chat-модель: `GigaChat`. -- Основной retrieval всегда идет из `rag_session`. -- `rag_repo` используется как фоновый источник кэша и контекста коммитов. -- Если в webhook не найден `story_id`, commit-контекст Story не будет привязан, но cache-таблицы все равно должны наполняться. diff --git a/README_old.md b/README_old.md new file mode 100644 index 0000000..0ea6578 --- /dev/null +++ b/README_old.md @@ -0,0 +1,161 @@ +# Агент для работы с проектной документацией + +## 1. Общее описание +Приложение представляет собой backend агентного режима для работы с документацией и кодом проекта. + +Система решает следующие задачи: +- индексирует локальную копию проекта в `rag_session` и использует ее как основной рабочий контекст пользователя; +- принимает webhook коммитов репозитория в `rag_repo` и фиксирует контекст изменений по `story_id`; +- ускоряет построение `rag_session` за счет переиспользования кэша чанков и эмбеддингов из `rag_repo`; +- обрабатывает пользовательские запросы через `chat`, `agent`, оркестратор и специализированные графы; +- сохраняет quality-метрики, Story-контекст и артефакты сессии в PostgreSQL. + +Ключевая идея архитектуры: +- `rag_session` отвечает за пользовательскую рабочую сессию и всегда остается основным источником retrieval; +- `rag_repo` не участвует напрямую в пользовательском ответе, а служит фоновым источником кэша и контекста коммитов; +- `story_id` связывает изменения аналитика, документацию и последующую работу тестировщика. + +## 2. Архитектура +```mermaid +flowchart LR + User["Пользователь"] + Git["Git репозиторий\n(Gitea / Bitbucket)"] + Chat["Модуль chat"] + Agent["Модуль agent"] + RagSession["Модуль rag_session"] + RagRepo["Модуль rag_repo"] + Shared["Модуль shared"] + DB["PostgreSQL + pgvector"] + Giga["GigaChat API"] + + User --> Chat + Chat --> Agent + Agent --> RagSession + Agent --> Shared + RagSession --> Shared + RagRepo --> Shared + Chat --> DB + Agent --> DB + RagSession --> DB + RagRepo --> DB + RagSession --> Giga + Agent --> Giga + Git --> RagRepo + RagRepo -.кэш и контекст коммитов.-> RagSession +``` + +Кратко по ролям модулей: +- `chat` — внешний API чата, фоновые задачи, SSE события, диалоги. +- `agent` — роутер интентов, оркестратор, графы, tools, генерация ответа и changeset. +- `rag_session` — создание и сопровождение пользовательского RAG индекса по локальным файлам. +- `rag_repo` — прием webhook коммитов, определение `story_id`, фиксация контекста коммита и заполнение repo-cache. +- `shared` — инфраструктурный слой: БД, retry, event bus, GigaChat client, настройки. + +## 3. Типичный флоу +```mermaid +sequenceDiagram + actor User as Пользователь + participant Git as Git репозиторий + participant RagRepo as Модуль rag_repo + participant DB as PostgreSQL + participant RagSession as Модуль rag_session + participant Chat as Модуль chat + participant Agent as Модуль agent + + Note over User,RagSession: Первая рабочая сессия: кэша репозитория еще нет + User->>RagSession: Создание rag_session и загрузка файлов проекта + RagSession->>DB: Проверка cache hit/miss + DB-->>RagSession: Кэш пуст + RagSession->>RagSession: Чанкинг и расчет embeddings без repo-cache + RagSession->>DB: Сохранение rag_chunks и rag_index_jobs + User->>Chat: Отправка запроса в чат + Chat->>Agent: Передача задачи + Agent->>RagSession: Retrieval контекста + RagSession->>DB: Чтение rag_chunks + DB-->>RagSession: Релевантные чанки + RagSession-->>Agent: Контекст + Agent-->>Chat: Ответ / changeset + + Note over User,Git: Пользователь вручную делает commit и push + Git->>RagRepo: Webhook push + RagRepo->>RagRepo: Определение provider, commit_sha, changed_files, story_id + RagRepo->>DB: Запись story_records/story_links/story_artifacts + RagRepo->>DB: Запись rag_blob_cache/rag_chunk_cache/rag_session_chunk_map + + Note over User,RagSession: Вторая рабочая сессия: repo-cache уже существует + User->>RagSession: Создание новой rag_session и загрузка файлов проекта + RagSession->>DB: Проверка cache hit/miss + DB-->>RagSession: Найдены cache hit по части файлов + RagSession->>RagSession: Переиспользование чанков из rag_repo cache + RagSession->>RagSession: Пересчет embeddings только для cache miss файлов + RagSession->>DB: Сохранение rag_chunks, rag_session_chunk_map, rag_index_jobs + User->>Chat: Новый запрос + Chat->>Agent: Передача задачи + Agent->>RagSession: Retrieval по новой сессии + RagSession-->>Agent: Контекст из session-RAG + Agent-->>Chat: Ответ / changeset +``` + +Что важно в этом сценарии: +- первый запуск индексации может быть полностью без кэша; +- после коммита `rag_repo` фиксирует контекст изменений и наполняет cache-таблицы; +- во второй и последующих сессиях `rag_session` использует `cache_hit_files`, чтобы уменьшить объем новых embeddings. + +## 4. Инструкции к запуску + +### Локальный запуск +```bash +python3 -m venv .venv +source .venv/bin/activate +pip install -r requirements.txt +uvicorn app.main:app --reload --port 15000 +``` + +### Запуск через Docker Compose +1. Создать `.env` на основе примера: +```bash +cp .env.example .env +``` + +2. Заполнить как минимум `GIGACHAT_TOKEN`. + +3. Запустить сервисы: +```bash +docker compose up -d --build +``` + +4. Проверить доступность backend: +```bash +curl http://localhost:15000/health +``` + +Ожидаемый ответ: +```json +{"status":"ok"} +``` + +### Основные адреса +- Backend API: `http://localhost:15000` +- PostgreSQL + pgvector: `localhost:5432` +- Webhook репозитория: `POST /internal/rag-repo/webhook` + +### Базовый сценарий проверки +1. Создать `rag_session` через `POST /api/rag/sessions`. +2. Дождаться завершения index-job через `GET /api/rag/sessions/{rag_session_id}/jobs/{index_job_id}`. +3. Создать диалог через `POST /api/chat/dialogs`. +4. Отправить сообщение через `POST /api/chat/messages`. +5. Настроить webhook репозитория на `POST /internal/rag-repo/webhook`. +6. Сделать commit с `story_id` в сообщении, например `FEAT-1 ...`. +7. Проверить заполнение таблиц: + - `story_records`, `story_links`, `story_artifacts` + - `rag_blob_cache`, `rag_chunk_cache`, `rag_session_chunk_map` +8. Во второй сессии индексации проверить поля job-статуса: + - `indexed_files` + - `cache_hit_files` + - `cache_miss_files` + +### Полезные замечания +- Текущая chat-модель: `GigaChat`. +- Основной retrieval всегда идет из `rag_session`. +- `rag_repo` используется как фоновый источник кэша и контекста коммитов. +- Если в webhook не найден `story_id`, commit-контекст Story не будет привязан, но cache-таблицы все равно должны наполняться. diff --git a/app/__pycache__/__init__.cpython-312.pyc b/app/__pycache__/__init__.cpython-312.pyc deleted file mode 100644 index 1a7ca2379d964284197be91fcde7abfca2a28322..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 112 zcmX@j%ge<81fFTLGePuY5P=Rpvj9b=GgLBYGWxA#C}INgK7-W!;!i9n(2tML%*!l^ lkJl@x{Ka9Do1apelWJGQ3Y2FA;$jfvBQql-V-Yiu1prXX6*B+; diff --git a/app/__pycache__/main.cpython-312.pyc b/app/__pycache__/main.cpython-312.pyc deleted file mode 100644 index b39911438faccec266e035c71b039a6c344865e4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2992 zcmcf@?`srCbmn$;_i~rqnP{?UqTJDn;Viu*R*a25Fb0&gH5HYH2H{w5H!-fiy}kS}So*^b?9BW9 z-psr=Z-1z(3m_Q3T)(Y-%_H;^L%iXu0A(G3d88l(>u8XzJ{_lhgFeh)PUq5OkT@{W z`Lr-7I54k^Y5$-f;2K4|Mh0tqNUd3{m;|bz`i6XpA2`@y;MXEa68)lr$MK#{1L(o9RG36)ZVCWhq~}Ha}$0q-u+~D_YW^ znen;`5O)%3JmjHrGO3zojJHMINTsw)$_`$VO)c4LWQMeqEe`aY>+kD7ZP%n!>wS<= zsqHrbWKI@PnO*Mlpq$ONr)4b@&yLv*iKL^NqiUjJlI{X2R)yv)OjBr;1WQE96X{m! zOXCaU&V>i0+o3h)Nn?RXB@)e(=xynn$XAgf>8!Hmv;v8iNGwlcOKsn^FSHjo=*<}g zvadwi^Q8Trct3nMTqGx|n#)c53Z$(>I`X9Bo^(HQH}Zh=&<2QRQ>}><$vMNz^iQ~1ZUSvrH;Jk&@VBc6=Y?X%6q3RU@5}%#35)Pzv4Ih2 z*17P;d6pXqZNy!8r2a*k7p0eLFR{puWy^R478|#?0Q7If*z}_I$iK7L{7)@ft)Aut z+H|^mJo@^oh@ON}dz~A?O3k%eZ`YF;?l`h8>p@DOs^hn!9u+!E@EWP=`XF_38feymj1>S!uM(jFS*NxGHK{Y6U z)2?^XBvlnKq{+JJNu*V4*ifqIuqrEH$QDgYrdBRXS@moxC)O%HgRdNi>2v%Zr13nO zMI+S~1mw!_HiFR@`j#8TF$}$tvJ+%2GR;~YJX1_@itdEjVU4#!l(MBJ;Qfgo)r}+s zdpuqVCk9d`D}-miqGwa+kw5%tcsBgN|JolWYi(B>8u7T;4x7-e;q9Ylb>PO#ieJO$ z-N?9pTL2$c&a{2TWy)N*6O(s>vjx}ec*}P2xxBYP*a^>#Zb$RYz02XqvOnU6_c1Tx z1)p=I{jqw=9uUg9tj#mmDrI?Mhh#-bq^ti6lhwx;WU6{kPa0|*UzN&W^a*1AMyT~i_;h9Vg-KpQy=DA${Z5* ztTAX!Ktj#T!1TcNj|#lRNYPt+e@Cz|nP!IoGPU8Ucb!f}_rkfwYH2Mjwm1ZTjdE6V zGQ*ZCSbRMh;?VU?HzOog9)PND@2~zuy4UJ(D+Lw@N$+RUNjIl+JC{Z~!R?kjf9^l( zDjug@z-85GGGL9v82^Yuk5TJGbl@>M@(>*=3p_rFpX@+*XA$jM6L#b9-03oc<;ig* M)?d}9IcJxD0?%qs^#A|> diff --git a/app/core/__pycache__/__init__.cpython-312.pyc b/app/core/__pycache__/__init__.cpython-312.pyc deleted file mode 100644 index 879387783510280faa5a75b21bec8a63dbfa048d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 117 zcmX@j%ge<81kq`;GePuY5P=Rpvj9b=GgLBYGWxA#C}INgK7-W!5=ks5&`-`UO4W~# q&&3*utYJZutu>|vT3rv1PN*~-r_9D%uP*6%_&KI39G z{y`zGF7d(695z(>F1u(!aG{%!MZzUPK?U7SJ6UK~o^$8TN0JWh(#yPa?)kj) ze&?L~e(vo}5?J@>jpCM0$nPjL7szteXMkNN9`O{P1WG{()Pky@tomA@7j(JTd?PRm zrrhhk71#w^?hQW?BnwH{n^f^E&z{r0#5KKeVA0Md|HcEds<7U6cr@|hJHom^KdDe2 zWfjr$?(_%w3zU~jA*UesedPE>&xwkqaEh@K1C>2dE;skd_e);Ir+Fu!LUYPxVKN$3 zSeSPe`4$ag0n^~Ar$Bq1ER*?8YwQ@Q@rJC%R!@nVXuw;y?Vc8yP2V}w)352PvG|$N zCAZ!5?~=P^-;>+u$gOtCEo+JSyX0=!_vAJ^a%+nuYvqM9D>S;`G7NEBcz}QiehE)~ z8OV8}0E$ryLr+;&<~zN?2N!5t_%$@KwuN3>JKsW}t@G3s?Y6cWXPzeCYgd%4o-cj@ zCs#G0yCshb-J{$UW+3~Zs)_?Va-s^Kl}5`gg%J&-ticS(%leTFAUOm?7@sX_V1RMIKSMThDXje#v!w zelE8!1|jC7K>i~CTqS?>4Q-}|HlNFUbMfnoxA+eW)rEU!ej2+!wlO)q2EQXSJBHSu ztPw4d{FfuDpO1|zk1tUO*8L@d2F4MPYguWwO1r`5pSCC(6h+@t6eC~!4vHfB0nm6_ z8%VG|IFKC%Qf-t#Xgp#Ji!H1-CnnEN<=Cv_H=mSeXdT__E5Oxb-uS?j^yz;+-eFtGb zScEQTq2uobogIUB-4E^2OEjdc=;rB|Pb>to~ajQyaVd^%8B2BNd37=UYsmhqZz zmYLz5!w~bv>|%e4#8lHQtFr{!o<;IJk{5u;(a6AR^w40JH)6-Z7sL4qkgH_Vus4kK znvq_4ecc$Ysk)K8`C5$tyOWaauKy6Fx<~5cA zzr6PlC5#!7=Gu{V%-MAV5`p>V73qBEW66FTZ^aycfaW^T_zzr3|CJMud-YVVlJ^2htR^^%QSE}cmzQyl#?mZsS_02Cb~@B2hf9(KoxhCx5Y8NgE1eU!=0)z5hTeA@gv4|n=VFq`VVp`{=W7hs!Rih= z&+)SoA|fDi1d*B7*dvj@3t`Iy4~k+(sazS#b0G~CQgh>{ zRX5`+Sx!_oYO%&~A(aUj8)xH^G38^mYFV&ykwLXgM*lsVHe)=AwPsA)Ro}$3f3^`9#Wv5C z+?IP>7Uek4^q`okE;627X~YkjR<=;zLO9)rFG261^)c8y?tcnyeC}^9=!WrbI*O>aFcmr24{NYq74X}h%h>XK#I zNh+}G(ILX=9F`9CwvKm~fabMZnYU48-aq_pAAeX-mz&yQNX=E;z(DgSGL7|s=V_W} w)f}e1(`=;b^9JfV+x;xKTg$kou3>1$(tU)bO9=T2;ZNTqTZ`#0KvPxy1&uGQxBvhE diff --git a/app/core/__pycache__/logging_setup.cpython-312.pyc b/app/core/__pycache__/logging_setup.cpython-312.pyc deleted file mode 100644 index cfd21a2e0d7ef37accf2938566e0cac80584e36d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3424 zcmcguO>7&-6`ozrl1oYyEiyFa*s&-(mbh{yDshUYisVE|WYvhn1hSGgl-0#*cf_nh zaoO3WA`uj#gMmnZi&O{#sc4J((u3guNq_+9A;>MKq5ugxAhC4;1L-9hZre-?;cq#=#Vq7^R9 zag64(e42MgPujzy8KikGBMlRNS!{059h{5%F|Vq;c0dcg+JO_@=}XpB5e{<$?XX51QiA z*Linb;?h1%+(Jv7hA(%gMa}OV%dZ7AFB~rbqYuWeEwsj^yDuWC%MM>uX<>0u&t=XT zbVac&LW_f!78CPRBWY!%C@(aKv5}w43&Xl5O(y1leaZaE!fC0Pc%Yp823bESDTAb* z)5u!MQp`6>nyzGxOo=L)l1WSxJY33Wm0U@omcFE@R*9_Y8p)}oWUj9)8rc%jGNeRu z7G0O(x^`)CetdG_k~!QmMQu31aRZAgeB6E(i1)Z%WVzmfejAt2Zy|$9t$=LsCA8eg zsg@WJrB*E z#xhYYQ(k>MspxTy>Z>FdSMvEda8z(@k})#ixg`8df;N%_&u1XqvPrB$el)*M{jh)W z$anK#)HVMQu+1l+`*suEjP&jNZ0GFN!D>X>66=xJ?o&HY?X6WKiCQFCi6lS7)yPkQ z5sK|Sy8TvJJiZU>&^^&%r*We584$Y=2`2(f?7sFqS~!jn^Y1c?=zR^M*0_cT84$Hb zCT#Fm;uwJx;K%*#2Y2p(72nyJhj?=-h-E~6Vfr=s)u{`wOv^7%&CN~ErY_nZ6XG3~ zDS^CJ3A+yRs*)`byGNdz{?%MtFxZl@$eJZ#%C5KVTY=a?+-$E=u<`}V_T`$j-hiiE(&Z@gKiVmd;7M$_1Mu`ELn*q|ARRHv)tB9J$h_+erNvbL$!e? zD+5pdb+8(p+CF#N!??GY@NgwI%!DWJkv&rxIP>AF)#!vPJ9#S<-3rn$D7q)qt&2De z92V;31`5Ko)!J9-4*=hPVs7=MzG8yKuE`0w6o3arJ9~|@g$y+c`D?uEA_2fkecfc? zZhGS|TXd>JBDZ|pio+uyYW6_~o(acxPw$-GQ{Ejd_YPb=S`Lkr#gQNLG?Zy8_5gAn zI1q*8Ml=rHJ!fDx731G`29_tzvX15-FNem;;+SJTWK)oB*W0-AqZf?KtP42+JywC{ zAWtm{Vn;xXKFYe2O$z=Fu*E@2MqgyEo(Iu|1N@*Z%5qLwA+l@-WO>EV3Ry;X%kpmu zO18n_DY1R3v69!bggyit+JW;ksh4J_pPRZkO=CxJg#mRbmdbTP)eOvGx^_Fq$b^!S! zO}Rq(&Gl~()Wd21-|hgA6cW#-1At?wB+0Yu~S{`R)KM zUCo7BtN3kjuxE!C2S8{9z?m=c%c16~_Si139J&(4KVZLxn>PGU*0=rL!AF|#f6(Fm zF?6gW$(Ncdo;a1rl2zhdBgq^;m0i+^yxk$`Az-i-@kt33i;pI{R02uI+GMCUX)+L~`{Vjhw z&UQR<4Y`=ZYW`hu!iCzi^l6x~tTzXtgF|rKKhcRVQO`e+|Bm-z?yG5B(9g|JDa}bO p){l?R%*!l^kJl@x{Ka7d5w$B~1*&5N;$jfvBQql-V-Yiu1pq|i7-awe diff --git a/app/modules/__pycache__/application.cpython-312.pyc b/app/modules/__pycache__/application.cpython-312.pyc deleted file mode 100644 index cc9982e7756380d1fea389756bc4f7c1a8447b4f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4404 zcmb7HOKcm*8J-nMiKM89Wr^ZLPs_4R(WYe84PwQSEIF#A0P(>1 z3vlO~|240FzJK{uPfwh{^U(QY>8k`Gf5#4g!X7yK2EZOsh$3i27eqlo+@W>oAu+^o zNDJ!`F`{>hova_$y7Z_RWjLb6^tc#jxKr!a6JmnlF0DuJ6?++uYJGaY*w1iGJEaeZ z0}RKt)B2z|$Z)qdq$kCsJ}eIFDKW)l2`#N>#0zsM;PwaM)fgqjNv|QT%Qmp z81C05^)uobfpm~tL^<_@C4*;F5zzQ!2|%2$gUsxJFl2$j51QPi6ctD0OY-`J4NRh2#{6>*S( z_e!!>SzlERqf{wl7?k#+QA>n4N}5wU?FL~!cU7aJJy0pQ#eO0iTRcY3U3onaBGfX8 zyQ)b`DtP^L-Z_nvyG7;dhHvf+|5)Bpsj7H}vUW>0)nCawI0^)A&V-NB6b!6YDyCsV zI7yLBc}+HOLD8EJU~5;l4ZuAZbLZwmwYUw-ExIS+zP)21Mg?Q+D6;QW#%MD&&Vd< zS}uYXq@97T2SLi%p;dDr?0b6wd)8c!InAxWE5othz9Cizzkd+xG`BW$O_b-Ty+26L za0|cPyy#<&_&DZlQ{sVx5ZA#RQe10(kE1t?afR#s7Ayz+9!DT;zaMkl!fy}4`yT7U zT(VqlUgZd4webS!Tin8LHy3=&k@;>DEpY_iy&U`PzIPj*lKX-Zc@jP7^ml1<%(vsH zeU#1XT<^CBUHjf`fi*Vs(!9wn-msbC=bh1noB&k#`nUYkvrd5ivW-J15 z&F3Msfrs~>$K=mv?S-R}!u8>SD6EJZ z&Ol%_u)8J0G@w$&n)~a7G);H<`HHAlx}CTQg;oG!XuHcPrn z&tWf&lX)RfEHDN#+%M=1%A-6F9%cVWlHdj!e*iZ~iF$JEv(2aB-*nf9&U_{Th}XyR zUsRrkUq!R^@k@u}vj|7(6SIdCml2NEXMc1!`#!>p^$UxK7p^0mu4ksc$b);|H`%k# z%|Cto;^QyR{&nUrGcWJ`+`gw-_q1189Su|U)O2k+XHTzK(<`;?xScIn*}`!ol#YXU z&vBHTf44rEfBv3*aml*4^yQ$v{DHOnfxRqR%i`hSNA=OU!_j%LKM(e=qEq0IoUCQW z?97annXxkkD^sYAPTHgM*66%H(A0T*YSEfnJdQ<@I8gjJK}P0l$&8)6Y$Y$(`Um&o zyYao=-Ch`=o|<`n#m+BT`K80u^}kISFx*)0w^5QB+52?&(^`7ePG7Rpm+bUaD}D9& zRBVLJC3QSVhQ>kr`^@h$b~==dJX7Z8&QW=dIy< zEj41NE?B7xAi)8S`=Ub-@wYLG9{?>3hN+8bbX0{`@cZwRwlxH#UL6MW<^xiU^V$Pa zOu*M3UdIKpL+Dvh<{}g+)V*nMBVu<7OFPBN!qRcVO~)?7l&QI0eUxdFjh=29eG2e` zT#ROFiGDjVZY9PUn6MHP3`|;yNe1Su#N5APkyxB<4G>i)Fwr(G-vLsB}F2gX7!VFkVL{uexMG~B;lj7^-;Hdgp| z%%x(NVzMV}0s}Jg96n*;F4*Ow$rIYw>7VhLb8;NND7d70E*J@ju~1d10X0S~7u7;w zQg|dz%cRiQEA}qyGMZ)7JN8;oUX1xMA$zyZjq^9RV65J9kj91#e;o_We}e1|IPFZD zUqx=6YS}9<3j11uV(R`~bW0dZ!P_u1KP{o;ySu(fKLQ2Pyn#3D+mIj#4KmjtZ+}g; y8f2wGt~JP84N_>37%Q6rS<^c)k8hlQ>P&{IsQo7%B%42Lu&TNegNbAx&F^d|vVQa zaW4D?iJovTGzSiFON5YmY;WO$DshQb4$(>#NC*jT1{;a?#Cx-G5*Ml>byoAudv9jv z&Az|cAJS=)K>NJ;bvdOG@(VKE2E1(T1`O8;BaFJFLW`6l9dlz9rKnWYqAGdC)hc>X zm$d4}D@M_vBt~8*Oj{vL=kyyT+OC+8(l|(sJyKIj6CgGBNRv{U1ZirIG*wUMGr!|@ zc^VqCq8e14s+*66iIZ3Ca$wK9JT#_l*F_4JnA3~4SK?;^UI8w1!S*lBalhsU7wSvg ziH;TF_8Ce0Rp74^PKuO~V(cQ}3Rf9D0aC89*m4|3l_`?fdHev%Ri;Yb07^ru9?R=t z=46R`!CcLYG=@nbHCq9wo(Xl^^RI9bCLDP}p9i5@;enk`gob5#c7Xu>9ae>OpPOwheK$H8!_R`W+w4FcY zRJ}mhPT&`o>LLNt5)2^xBLJV0t$h=B)QPQBwsG|8**ogcR(7CqwwaYeGqZA540T`X zF(XQ`wF7`%Gcw9zUs9%Ug{jar=sNT`bTAs%(2OjxLzx_A<)bl*CNHTx&Zt}^`Gwdn z&63<$=x3=Fy_l%ed^${a4exO=18z?)iE0Uq?_17%7!M!@tTGGtv9j$}OO_84U_KOO zgx$ldU@acTE3m>Y@i1uzf$c0-z^i_!EtFmEixD_@s0$v{gy&FTu%Q`a&_99RP650@ zC>WzozE!T!bvh$*AOlCMK6e+yL14rv!WhCh!UV!0gu@7^#YZn4>Nc?-xKI%_Z#lc? za|6lf=_TMM{ucl%sODWdPyfs%wXv2?`g5%~QU)2FXeE#`$$`;U5~&o)_P5eVWpG^< zsXj6^vU>Ddv9%Ame$qGCICXWoHGte885&>pznWefSYtOXtY6w3f9d9#4R-6T+pKwF zZgYIDnLEGvcCnc&wxsqUVh(rq!<*5O@w7c5im8LGjo-F6L?IYs&>`QWfLzd-x}p~K zx(3;tnzKuDJP>969v9M6p?0~(MO|RNINkDr8$Z36D}zxbe_r)_6j$f|Uy@ z`fkBs`ifRGcXo_-{qq<*8n9y$iiH`PVBj+z+7rO2Lcvjux*`2L? z+y!$t@^7Y$8ZFw02a?7U?9pU&!-*{j96zvr3|+a>I}7@w&Zg0EWZB&!UHv@ zfHDNkHvfA7s5vG%M=#Pp5}G#o^YFoz1|!s-?b;DX&e*9PtJSso&B65#HU^thr#Ht> zH*>Gu9&F~`Y~kCmlbQX@Z%nTatU8<7!_CBzb`s@7|EXbkboJD=<qpLLAc&9^P=wwoK ftTEXkFm%Q#Jx3cab_k9gBTXk8!+#MN-; zul$Pz;45_k;d`L_fPh_K0E01s#i$HJF>A6Gr*aG=!RLxg^Ye2Hi}|}+aq514c2Zl;FBE6y3M3{?+IAkHDpFV+ zo?6o@t8m7J7EbuM2;F(TZdP@J)MEr8Q{j+9pI!xmrQA6^amrleLOdv+XK! zp`rO%TNjp2&t(5h?p5BB6%h%vn!XpssiLn%^f@>*Ih`*odW{tx^A0pu{um|NKFtm- zkcpg(>b9M;JjR`zz6vXDu1|-y8IYB=>sab}a4Y>Uo7o^pcjY`J>KSM!FSXM*TSMvA znTy9Fp9;SaJ7Ew_H6xiuB=h;o_@~HtJ2}!yTy7<^uOBya`9>~(n7wzHm~JOVnhCj) zkh`QV-T{0pPD&GJn}c#=P(GC8E|~xdiijmmtB@~M({NbR{C5x>)wD-7-Rwm;$3>Vo z%f!%+2@MhT2B2YzQ&bHEimuSPO4JVMu+dQF71sg89PkHfo86Kt)pI#^1-@AWHO0nOwpHQ_d z^5xJ=`d3a<)PKf_blYFR1d>UB{!bj5(cu_|IRaxxVDt-^I0DK~A;x5W0HVC&-}^2i A!2kdN diff --git a/app/modules/agent/__pycache__/confluence_service.cpython-312.pyc b/app/modules/agent/__pycache__/confluence_service.cpython-312.pyc deleted file mode 100644 index 2bc7fa7e7c0ad48e1211ddf6b30ef222bd6a999d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1385 zcmYjR&2Jk;6rb5Iuh+5M1d>uyU>ih(p>i%oz0e5qQ3MntQB|UQSuHzbvSvTb%s6Qx zM?xhBIC1EqMJWO#B#I)W9{B^f^^zz^iAITf03>n?1PSPgnOSe$k^J88&3p6a&3nJ~ z{c6<#Vjbd*=$;0^uhJ-%F#yN!3vde{fM5&~;DH2s5K3E%wM6%Hh4t7-OwUx6y!%>iE1 z`da7lbAyPES;P)CdUT3D&18PHkcM<-7gk5jsjzarspt9zWYxmMY6aRHfTAK~AhQoQ zz*icw*k}>e87t6GvnLDOnJCau7x_A;hI<7n?nI?K<`wXxz6=|7iyMoKb$KO9mx4G# zzUb`g#GAR{4mI>e27=aFJTrgV&sNd%5ciuHpvqAP<#=|s_$PK&}*HZAHM5YMMM^P1h2L9M=O!0BN}2Hb3_mng3!1*Jm#0sj32?2n$h z{rt^mKC|{}<6o?OzP4MN+OAFAwSK8h?~m1QU)*|W_UE^D=dW$gU)ve;wnn_)PS)?d zvT@;Ne{cNk-sFX!^n1N6_u}5kr}pcUU!VK(+;`W%?|<9hsh{7i&urIccIvPFS+Pzy zN5CpO|54eG8?)8f8f-NzZu@>JzCqvTj_>D>6nMn>v=(5rf!rqKD1xWA2vf?7N+DN ieO8Dg9YXj3OdWtT2VmlN@Ztez{9{$1^A`|8o&O*ChELf5 diff --git a/app/modules/agent/__pycache__/module.cpython-312.pyc b/app/modules/agent/__pycache__/module.cpython-312.pyc deleted file mode 100644 index 82e7d21722dcb75acc0a8504c56a3b57b5962a65..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3542 zcmaJDU2hx5ahG=_j}$*ei4slAVkEl}U7JGfww4puh@;4gVOcPw#HbG_E(hL8rh7*+ zdneUWX~aO(mH|=(LD8x~ADWi}3FHEOXp8o#KcFu%WI)70L=6-H+BdaQ(ZElg*}Eep zS?L`xJ3BkGJ2N{U``36pO5nS@{hP{vB82=MC;k_75xN(kgsc;dXw)Dkl_^C$U<6D- z7C0^#q8XHfW=Ib4xoCt-JY@`< z1-U>;fJ_rDy+*WNJ-8vb_Q@~l5(|Mv8Dqp8l}A0UKH%!#2zWfFSF*){f8wM_ogTGX zt=XzwsZ}kQMy}nyF;`o%byf^Gk=IpAzg5$8!wJ7>+x54Z0W9&i?%tkKCf}Tzym@1G z8VJ3U_tfg5KCjz%RHLG)c8viwJz1+R7)yG!3@dE8Qr3Z(ytb%U?HR-Dl47@6&8*uq zHC2N{sgs=t`4teh^#}HxUawgdB*01^Uzyh}3zVJH%Qfaoq^Fr$zsGl;TdLX>vwPAZ z`PiJgIH%jJqA&B464RAM6?C^JjS6T5C!~A|*kV_zi|CPlpY~Sm`+60WU9P~fW!IN3 z^qf!k24TKVbRtuY$bq*Z$aFyqTmkBeP!yeP*Cp3=yL@j>e|Jf@Y!(6rM_6LUEHFum zQdLb|QJkovm^E$5Ks=@>?=Go^w~|zp1J|Y~pOZb*&bo8qczZ8^VAtLV(ZmQj`fEWguojdB zEu;x+qAae^V%X{7w*{dE*3Fi^A(y*v|O$&JL1|4(4AY+>jpA z4tJyx0gXC(*trg$&^ak;=Q~u|Aosnb^=UW)6(i=z2h{8l5=?gS+7>4Pjc$_J$lc`R^ z!h{8io1sp&3?ZfHZcG8$&%h+Z%VuW~NC>_Lz!`L<;cP4b2li#XxGXJzl8RnkX6Si_ z*TT@F3~N7o89^KYTIqzDR}Xp|(bA0tCk}RXHDF`N`E>+mkzE4wc-lJ&8u=6X%=a zhsmAMZ*7fUYKl*#LTl_b9M9}zMz=HPo@CB#WlBwHCs+FH!B%dfnb=7We=2=e+Dcz; zhIR%||0>ap?<9skz4N>8JxxqDg;pjD8v_6N&C>O)+%yObjI~ljt%3addmq2oDxBUf zOgt$}v{HTR(#KM3=zJ?*Y>i&tPfCN)rufqsFAL>Pu7RqUOFTEf3&>9(^SjxpQ7y1Y z9}AsWrww|)lZn9YeVXV;x)y4Z1*!$tVjJGt!$5=1lVW&wH91~^+hi7cI)oD8byq^e;T(5ydV8zB+y|n0&7&jJNF46{A*G4eM&DyEir;3q$R9k!QJ~ zUk`sWyq&xFBzN)mlYa{TrRUE*Ti<+RD>t>Bnc9p^ZDyvPTUa39zi@^AfxaUCF?fZ7 z&aVQAcMm578N9@*j;K}2b}_&(DjX5|v|SV!Dh(W59j>s2LGVtY;3h@#h{mh=|6>l? zYasx=chV;|M=ox@dUNxYnWyPn&Cs(*@}v9*`OW^Ztw?b{KqJ@bor}I2Sz38!&HXhn;$q(Qi<0FFfRuqpU|d81I(&Fgbhx z^uvb22@L;|h?s7RH~$+NrP+TI06eh& E2f1RCXaE2J diff --git a/app/modules/agent/__pycache__/prompt_loader.cpython-312.pyc b/app/modules/agent/__pycache__/prompt_loader.cpython-312.pyc deleted file mode 100644 index f4e320c0d19fba7d0b5b9f6596d8ed8940e88f5d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1366 zcmZuxO=ufe5Pom>t$rLE;i|5ZP}Cnv=!V9+D2WSkgTW=3wyJPK54t?oe$VcTwWPjX zyIHX@J@_C)LkSctND40W(Bd9?%(3@gqUzxEH9h5&n-diZIdx`No5Udln)znty_wmW zdHQ2&YJva_Z{Bg4LC8Z?QetB;`T)Ql5kydrY|sX!hz-wZ7zVjQgtk&emYF2lGFKer)rDTo4s0v_@NYbE!Gz^gyhBO83W(hOttq$Nygfu7l6 zjZ8@GoSv+!_C_c8wCxC~YWhScR(&p9r87zfo2s=st|!ihUt+><^dQa|(d*PdOG!Xu zFR4UMYnbw&e0eLXS&CCnNF@(xb5OTu^@~N*GcQ(}$DGXtzooY@U_o0?%xM4=7 zntoniWTtgRghPiC3Q1%f*KJnQ*>N}Y^um>oYu9*v`SZ`}*RJx#rDaX*oWe%v9OrAU zCpp(yCH=OyC3U9bDA@|M(e`y_T?VqXr7b^DZbvihtj#p@rMIT=>or?(e5ohl5N~fu zrCcF>Z1dYdPv3PqoytaAYKPb=to*$H#dh9{z)LwWiy!TG^x0PY(!^6_$ zLFw|aw9uRU>+FT^7yEAxUq91hH}iKFk&hrMd_l|EkjK^pI}@)-55OLYND~jfL=n9W z58($R8Fyqf@y1J(j?t%~0ViIuO2Yh=r6X-V8|d>eX@sl9wrX8A8(a?*>=)@;o59+- zIe1z**;;K2x3z9F^%{6|*7f6=>b#PU;DLlI)8Md8RRp0<;UU(62kB$UFemj!Y{Hpz zr;iN*O_uCYUwXFCGyP`^A4zB(d-|taBEd;kheG x+Cmyzy@v=3kCQ&lT}rC`NSy&2{y+FLz>Z8x=|AM;-z5KEW`fQ=A;98m{{z`Y diff --git a/app/modules/agent/__pycache__/repo_webhook_service.cpython-312.pyc b/app/modules/agent/__pycache__/repo_webhook_service.cpython-312.pyc deleted file mode 100644 index 451d0872cbcf8e876d2146334fab30b4b1db7ba0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7828 zcmcIpU2GdycD_Rn|4H$0NKvFDQ?mXj>nFA&$A59--)!Vv#cMmUE!!Yy&d8!Hk?I}F zj^t61hhV`J212(FqOmEgAOS+dLD&1VX@N!k(1)UZ5jhG(4YYuP?aRK&mVp9!Y0sG< zDVn04ZPC31&)m5`=bn4!+;hHr?|(QPRst#U`>zuJ93bS6_)xDKBBY5fd4&N4(t1l^R%t-?Ti^6X$J|nzQU?1ztr6#r1 z1f}N3x^kI$UKg?a311?NVv8k{sdOxzNF~KFcsHM;sdOrynqKf+yK(jS;P~~sZ!ZpB z95aN6gqG60s<(C`?Z%W)XWw6TD)brKu?)p2oZ(ok&j$iZ!ls zjf#^o#dw3plJQB!5uc1DZwh>LA~7w9ibg8&yPo zNW4gl6@vCD#(;cAHgz_Gchg9`{!J6+%)}Siv|!E(^V_sx&Q5&0HXWF2BJR+p6LT&S z=-6~)&OVNwI52q7{nBDjZgoi60@6Or)dHh0sm`hANdo=piDfPf4jQ zl3{-^2UV3+7Y?#S<549v!g2x$$y8-oK}98j+`8|WifdTZOM213>tKDdU+OMkAK*}* zBt36vfx?RGS!5+vH1S60r{hh$`Ab&qiR-m4O`(z3C5Z)o7UaiUCHB|kA9V0;!*_Vv z%TGu7*;IZy@%f$WaoItD)5Ot@+q`OcsC{|&m!=CO;u(wR6f-!A+X-HvifJ}BKb?y4 zXO#B2q&PP_o1$s(3@Hj9;dX2~!AHvtuvaV|7iOUv7fwt}B^C3GAd27=#EXij;)SB% zOrsO2xg;N9X&(rwm=Z}|_yoGyv^F=el189PUDOLk)kTCUu4Zio+MtWL4g_r1*RmA7AI(obHD#l+ z?`Ik7y0fJe?q1pZ%Yyg(iv9dEZ}XZrQt(Fd{ZGaV{qM=%;~De1v-w$TxD*PPc6F74 zL(eS+u4$7P98KUyERHpEuwV|ZnTHDIp^~qy)ZDQ=P-q@5alzcdT>pxvyISIH%S{%% zy`^B+aPm{7wrnYAuC!l>%XGf2|PQSADki z=ADJMgU_92mvxhvE!Le&5f_oV6myV4XVGXWK889>jh0-c4i_lT+ycX*ZdjaU6ruIg zsHCebOIU<@URQ0~XzA6oohK3fm}0mI@i(SeZY0t-=Hj=6G?!RxfYzeLjUjkjXlr07+x-3tnuuqCfUVfMFUCF}lkKf*_RfO6 zQ?_?yn3Bz&HT~_;5}HY0!P}Q_mc4sd?0d1?R6N=_|yyyD8y ziKt)aAA!E^>+noPub(iYjv)!MsB8Qk`Kng6mN&_wK8+TjCP~-m+w=Mw?mmXRrd1W~ zX`FdOrPm@`GeSe_;*FKI<-VrM`=UWIG_oW>jOBnqJc+0hGKH|KE>-2QOLnT0?2Fc)51bB5xa#T1% zcyxd!J^)QLNeyQwHC5Vbn!QP&{V=q5*2wLww0YxdlA@}yO z?BO(Apb}YI|QDGIBo`PoR~;J&P0Wo)NO(P(|<$yvAv8I!l zh^OfRV51mew<08YMGt~1Mo|Sbu!}&TsKsvhA)ug9tIu+miNdl zL&cVhPr82B_uIbj56JsYz}wTL?E5HV-Dq-Wd)2Oj?CC0c`tv%uX-`I9+JE48$9{Y4 z>EP=Ab6M|F=zb`7J%3`=J-qVqmEy;-mFuyLal_@!URt_(|LSr;_VpKiZ{=^SaU%t8 zA{-EP<-`}Y+6 zd-GKG>|663EO-vep2J#0S76C`-?^+`b#;}R-+4h;$APTA)Y|!Q^ug$|`0Edgt9U7oSA95`!(?dt<)ZFq&?y?tx~fU0r0tcKP%2B^BA3c-klzad=(X4ODogn(p%zZw3P z*Nj;WDU~rHY*fQ8I70*~YN`Y-I#Qz_Ys0Wr4dTEP_0zaj)wyaT?+CmoGkc0;b=SMp zaJns(ZKqV={(X(Z3||*S0YuqrW@z8Zi~eiP4DAhPSpRLSpkb;S^ecLUJ!?6;h=Efl zITp=QW3F}K7$j|~k+i9Sq^TN7n;J@54aoIcexsyL$qAA=7fnCOzb=Sxf5kWQhky+b z!Z3w<%eqt>u3z&-tDr!e69R`Ua~NTS&Jgb2`SUIl~nB(^<{<@%&>M==7z z0=%WLlQD6Up2kWQ9i744RV1TG&La6akcfr;0`uxo>N(8)63KZa2*KzDBo~o<1SI0$ z24D1JEXBPC#e+f(_*KEyHVRWL>Opjr#y~u6CW;AU1>icN*tA1zZ7w%}jlxXQE6DB= zl5s3yVGBP)ui-nYQAAl^1!a{t4V>Ze{X*}X!C7@*59Ue4e}~ZC5TN~eXzZDjV@2=jr~5Ld(heNe){!xmTpU0wF0^#^{@G=d%=HyH1c8JH`u3B~tZ^FwZUjQPGb%c}Ew>I8 zTcH}nT?-s31dhmoceBUWn**ipo}6_f2%z!d)Pt#fi`>4y*na2%P6oe!LO{c2#~Sup&t|3Uxq6*)Lu430e6w?$lz!!R@)gY|sZwTcH}t*9j9 zL+b;+=sI#OW~extzTL5`@eP;!yv{BV)Px(u^XZ8W&XQU ztD(Ick%9ch-&}rl`N@Pl_-=9V24%@k>G(N#ko>+c@&jYf0wlj%a9;L5xagywsef4f6Ev)Shr3wMgzCy z+6~!J=7_=ia)B`zG##kD;8qgu&L-yIUJdTiDA*8DbX0&aGe4V1-lS+)>KVl>+&$7; z@TRFu9TxXU+Qk+gocw4$s@=gIqawWGxtDkd$fllQm_LxtKN8CyNC>XjT)_{W@On4 zh0UTy!E6k~-fm%KH^3@Lipq6>Xo~`CVDn*Tx4{DK2PrBQGvES2xBKBgIyPz`ZGoOU z!x=s_lw=nj!FMk2Irq$&JLjI~^}m?S1_amteDQa|-?t<5XZ%CFR6>V%b_zQ85QQir zjK+yEg1~)6STUx6yE3dCSBe!v=!-<6td9*wBa8=rtJuH|7VhSu=p-AUd!v!ufZ=k0^#&rBgOPw=ASAR( z;YK{W1)X~+fW`<40dEG1xTP9X!d(G(6=kH9a98Wm>VK4pQURW3bu2xi%#<4Nw3LR@ zQo2tRR0XBKr5V%R)H*DjrTcOq!VU!{qD+vD(l`A?0mmBX1JlH_2^hVHSPAwZhZM@a zQo$S~!uFsUB1VMNg)pJdYQ-^%c#xwh-U+nk9EFH0-q$flDdLLvb<9zTxZ)k=ppahV zJ%5i$Z^2VF<{@HFToYd4Kqy54BhXFMh;|}|m{JhvJR;!lCc2?KkERHR+T;5Y1kpgs zT)ji??h!XR(%m!QCj0wH&)^8@KG#1yGECCEG{x`$f#?skx;hWbx-51l7ZxX(MwQV9DP)=NdleZhz~NEOZZj1CN}F>!*9`U4E} zax;B?Hh4YoN)OFVeWk}zL0>p}*~_p#nhj87&*0#IyW7JrJAPBrl~q+z8ZRNw~L?-_9)bq}p1v7`L-aabRXZWF?iB3m03; z6Plc$eDEG#A4`t(pL7q8be}vmGA6x6@95Bw+cV;oV6qb6kRA1%26Ze8Sw&{yr6R2N z+N3WWWN&)M11uf%GpmR$2wPA8(P8&cfA_%pM3wb1S64_HY?{^ORQ&9)?x6Kwem?C3 znR(U8j6V?Z(ZOi(zFM1S`Te-&ymI?u&54(MLH5d}$#4X3X2u_-1Egzk6f34vL+;-G z;r_w=Mkz0n{wOFTEZnb5p@22u1 zwaFk2TP?^2#+jGkM54fVUV(tPn?Pr=lZ+%pyE+|`wkXekZVL(;=J@cSr)M3L{B+>| zORG%(!)hv}-{W$hD=~vX>V{WVt$492kfjE4Dm$Y!r#zfw!5g~V!@cqvaQaJG>N)lI za=eNLfF8?)%3zHW|9o2(xVd@zu)ZpbQ3RU4lvD=KZzl~!{_ zb{jHRN+3H1RbfyKfOZsulo+JOAT5BbtAmzJ9Z6Hif@;aM2S5452PbZyd@)4;D=#oV zPjT}jgPH!g$I#oXg^mPIkLoWbfd>=t)n>ep}Nqn?Cb@AY0Bjf$uf# zdlkB(WnY&=H+}w99m{hX)6X|k(h2T z74_A(=y90CY=`E3lvSwf3_l=^zAfILHRWXVlMS=MUv2%?G@DpdzMNZyZR0^acqrK9Y;J#8_%Z2|;~PEcFv5V_@-W@|TD=jABYkSqoz~2nM1o zN;RX>Bi5WlLm|B8C09&}{btk@n$Z9SHKsssgPw-(ZD#G_BoX=`x9f@^Jhlj-w4W$u zG(b@cb953#y$nSjD$XmS$YYBTo}%_Ln$fXU5P3wFoid0#9wW5sP;we}(WyExDQy4e2KMPU`arX1z8gM)@|6j{vzbzy@D& z4Z8>2y(46CnC%pP=QW~}EY-czNFh?O#&eQ+_2eYw0!vwr`i2HimSh-Y@y;G|54l%n z7!H$NkZ6#d!6^aq1lzP}#f6JBHgr$$e!8#V^iqm}Gvwds36FwxBd4OH;Q%K%Ff3@y zBN)V~Cc*RI^gf8)K$k|?`wDssjMF4EPq1h61b|DD7{wNi2 z({z;PlnhIAh9DD+V5a>6P8A0BITaNI$4m*CMNR{LQ6NHbs&}K&FsB5z946jyaMse4 zj$lfZbaaX{ib(_7H^pglKY%!-aDXD8RpHG3aKIN4(+ivm$1M3Z_F{@DOYcth# z_d<6=bM>j}*W*XCI%M4tSEY>=@oPWZd&fW9@bgQVhNijU`N~hvd{+Ne?<3`-?#G(n zok-e`#a-#js<@^Yx3PJSncw;8_0JA|<$u)p$oIJUcUO~D$K!q9Z>)=(Gg}?=E&sH8 zY3u&GM<2e6jcz{?cV+CGXQ|I!OLj-vx-ny~zQf+TarefYCRNk2So8XPXUg6VNWgj1 zuUkKEojZ`KdwsEP*Mcooy*qw1ZLue6oQoFcKh~tJo0qLkNo&(Q^>8Y={ph#WV_7iY z{ls%CvTjb-ZccAd zXY?@@y&6v z2gbqi0h*pau5h7-oG3Ff+O2y*U;xC{mV?=VM zNpem^;|?pKptKQ!Qcc6`8B^Z;icU~Sat?A2fSU+|M7=p?4%Or#Vvoi4kiRIMxb86m z^Uq2S0hr+;holH%C^WT{F=k>VQy#*)xa5lIDbp8b@vXqT>%=~+qdC-2f(}2$cX+A9 zy2V3dQgkD3w&4cb3mWq(SPnI)UK-RQGZh5IO=I`S_bte!tl{eSKpt`gXLbflEaNH( z%u+?2GwPC|dqpEJ%OFRfb-XE0X`6M=0f_ zD{nplJ!hBX6DyGK=pFR*4fKOg)LOcN4oEtZqo-WBEHdmKDZ3KI&J=kV$|k)7qb|3r zy%oSh#n zKeNQ!5;Bejt04z3PpzP^ahP0R8H29Fn;+}5k-qx`XUb)be2hOBbm(XtNpTuM(m8Ez zH6@=gH(rtZW;rnJz$Dvn(*+HT^gPTaKMW;bqHanlS9ryTd)p!edR{2XjIOMFPW z1CKc|vYMJ4pI~Slzd9;}guy-xlwN}~VaFG$D15PqtCSpIX~;|k{NQ0iMT5OL5#WsQ zc**J0`X^}`{9K-Mt|Ir#E4(0Qj6ls>{9)mL6Cu`bMwvM>=J7Z1SWdF$X zfoHC7A(pInEt%Zk88?YzClZHFChI**roptadbaXsZ=|a?&%QSso*hqAJHf}QC6{a4 zleO)OwXubk<<7ojXCHJE=X{B4?rp3tfw*Bi~nU&1#W; z!*c_w-!kj_+&*`9dHcTP_I-=n4?WzOYB-##JMuX8xFKwNvfg`}f9wY?|P?3jOTA)IXMO*OmH&28yzJ2P7we?9&2 z^nA-B_0rb9rG!7YZLWRFKkQSxkybha zfITbh74ZJsC1?v%KQS$fttNkoR+_fOv~r0aiU>+2?+En4%Y#oTTrWjOQ9?(*2A%r+ zQG+s^DJhl6{ev7&*pGq~hE(VmeTmZz^`JzJPjBu+id1PXKTYDOxUjsA2}O0} z^7zGNmX8)>!B~vC))cfZ(E(kDq;;)V)VkJ|wOnWeo_YBd5Tl;ek&3=E zf3{&2iqh9z3$cjm`UI{^Zq7O+u1jKSy&{*Nu}+!mTCdRcb`OuVb`^>q**#41=M&^Z zM)^@r&9CoeQBQNG!X@Oh0gy`-PLN0|#8pV|?~hJGBG@dx9sjeB?ges=3Qn67YOZpH z>;j3R13{cll*9t>-B$FSct*huFFGB=)fV9tGS6+61La?$MxrFW4SzC)tCj%bYYF2O z#ovZA6|TO+Oz(iVraN)73pae6A``%H>PwLDW`!sR$1(JA-0)G1kiDkg#sgm5yn`Db zZt_8mHpd4&ipS63<}7Y-%B)OgdIRHwqkwROrJB8o^B3Z#Oy{A8Xa7Jgb)LAh@7}??2WO|}JD2S3iPOVz zU8c*GoA(R*owN5Y+`TZjasEK6YR^(7Onx`6DLsj>w=@PIaSX5xVt``=B3sgqu5|P6 zG})SN0B_%!Y3o=pE$?_Ux#P`8HGgbO?eHw_7)=a~rrOSAnqQkg_T|9+frmAZ8dJ`` zMdwLCX!c}w?p}Cnd5=4}$NeahICD0&=iK6+i;1@`rgpxa*|Y!QrsV_u$pig~<8LM2 z_NETJvv?qopaQ8qmogol3;Tb2=r@NFZ=OmF4X1XEEbcm=ICnnPF_vlHxzPGs=Wm=3 zf08(LI@LL}*m)L{ZaXJEyVpPShYkby3{oBbh8D*lYU}1#3zsy zmI9P<0+!(gg61i1gb3y93YWF7MfpvOx^IW}36?hx95_*jgK+YM7ZoXL!BGj0T==ME z3_c+~8Ue*(Mc%`slm%I4>F}=T*9D0gRZKw}AaARh1_7N>LdH`?sSg2B7}E%2tmLbU zKAv1AT7*G-ppL2K%Gm`aOX-j@l%I34m0Uz2(hN!2Vqh$Hi7;GbE-8*{T<9Y>Kyn#M z`xo(BX$ztUDWbTmxNT7Z#*B7lvGeveq15SzB09#HLJqCRw;wnyGVnstvSd$)fEh_<|`KI&@#4I(wAl6MKlUk^hz$}P$iYU5?y+7u?k-W zu}Gz_#1mDd5L~Q;7pnY~(EOpeqBZ7A#j=ryghod|Z29#1bUi7QjKxn0X++6Q_kpulF`$xzwUKu#_bU&ubr_o+a&=i>ILzBG$o283 zZ+M=t@!{0hCIj?MPBY=7edCN!ONCPN6hrR^FoVlMShDdYltS&e%qcFWXm1)z?Tri) z>?p+C2YUE`j;+!ZS7)11EeScK(_bj(-46_@hFyu8-Eqx#Mtj;+nW*YanmXg|bb}+_ zcc&|9+LG3p6O{*&x&v`_X=b7S#r`nKxi#VXJ z`@U{-RtT%D2sy1egxMxB&by+j+RiI5e{Rw_ckCy z#j`5hyH2jO=5CqZU<#*vu6l9K>#?-W3jM@GJZtev-86Kk5z% uq>s?=0{}K9Vn}G9@=XwbLfig~jDJD(e?i@ULe3YOVHNS(4+ytBh5rSEuGOvp diff --git a/app/modules/agent/__pycache__/service.cpython-312.pyc b/app/modules/agent/__pycache__/service.cpython-312.pyc deleted file mode 100644 index 1ad28af27d36f7dc96042fd8077b68978ca14fd6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 22893 zcmdUXd301)dgpt!sW#Q7TD6uoKuAa+u?lR=4hD;Ez;;_UE*E+QlqfBJRbr7#9qe{` zM4B@|Po@!x6Vy4G(@IQEq%qH&~Yu!+IWM0limu$jTGM9WC)U@L>&iMEmU!FC3F z63a%G4=!hLO=87J$6yD8y@{10or9eW_9ePTRt>J=IUN_X48NpJSm_z-c^h*^zrocp zyJ*6={fRXry@S0dUoSKWfj5nVeKEa`+rtULH#s5nwoc9ew))@(*Rr%)q}6F@gX_*2 zIvW3pa&+*DEjl_nmWrn0W24CqonjH9spwE5noKIjn`v&$PW6eQv=wvLJ5~Hax@o-E$9UqD*&Lh#}sl(&3q3sj# zgb))^(Dh6#CB}!6Uy6yzcrwM}Y=_1sQt{CfNQxqh{ctKaekgVV$>KS@dyi4+h=@!v zF_Kj4M!a*|iP&iBKw_lO9A!O>*3TV|C6gG_q1e!vsJ80aaWXo3B6c{IdM=uXW1M5u z7x#{_(c_7U*ys>aSdWXf9*T{RCF4{XqU?vFCk|1!W2e`Bkl^DYaffGioYJ6PLCt{qu@mAl6l}&{asa`3POf(U z#^B{cIeS>LhiARB6IuJJoV`!7_hs$t&hJ{NvQDr2+T`UIZdWzRPVcl`wz)3XUhc@) z>T|YM$<~^+wP#jrlx!O_hK=`7BR52W_A5*>fA3|)T;*ciATMx(x@WOKF}=R6 zXb=o|GtwKV-WW68Flm!MSS3^;&0I_~m!(+*3(~BVc23`6Q)~?HRqPT2h*fMNL$yc> zxHj;>ib)Np!vkZZF~t-eO`c&$>l9+gqrk_=@#qlY^#fM|1omPHZI3DzOg*S18A~Y! zAwGm~gecOgm?M!N z1#1xe0VggexSfIyEm#2{Ny)#?edKP+8k*!#!};CQPiGAcAGR#NX}Ht!#QA+0CsLmH z(Cwd1-EnuF-#OiO$IzwLMio_FnUzceX)9ylES%t@@X`MSzn}w;)eF3!e~W)~J}pHE z2!=OJSmmH#eA6&!)Z!OEg^*xEx@mEI`MXdnR3T55U`Fefw{+!cC0M8vtZ2~;d0<0s z3#5V_Ppi-r-t+f90sxl8r@4rh2F8K6B5O+P@m6GKsUkB; z8`8!!|8{|TkcZeD`=x9eq_G*KnzXo-vk190C|#w|(hXjNP{yLAr+gZeHkPFq+ew>{ z+pgsS+v6hD+S@s5HsiW4ie%4gzCYW+!L~$|piW)Tus5ln2;U9v;io{frg^UH6l_c~4 zvt~a=*u*&Eqw!QEGFiI>ow~I&qW9!U1n0TDm-7Xu4HqqPUHi1*jyWi|ZJ=lKLZEYQ zM`q2oTYcHU9%QgDw5-Xt^if*VLc{7Gr85VPWw#F9X%Hx?cA=#=)3+nrvXfiUXTgv*#Q7UWE%(>38-5K`@Gad{{nw2~w1?6~Y%i4_E@E>j z4itoTAuS42G-WC4X%V|i`GqRAr)kS@5!*|th$U2A^h2y`Q50Sg>!}#)T^jp#q3545 zFJ{5=MfxOI-_m`~43cPE^eb_RDeDPt%J#@rvI%x=Mk}sPXi>#@O&6v4;u2H#RGpUp zi;VG+GhBH!D$M(h>bDD6I8}|Y)@!{eJ%^i0um&*<(KGH`4Zc{Frg@^x)S_S7R^p_? zt&0-znzk3ytv4KR7w~P$@yJtGby7KDv=kJETQFH9gKvdC;4_MTvM#d$f6; zszD8Fm*&{XUGfg;PH;oIqrj3WZ`wP&VQDVGTiSJA(OvW#xG5jJXJ<^|W$r#5Tx zY0vNz8eDn`zO-Zb$X9BN{aPoCcMiZ2l_H zqqg!wIQ4>-yTnt4=Cmj66I$Lf-DuTT9Y=On*dJZ2g!5W15a2K&P_=RwgV>tLL z!zN(51ImrIRPjKO4r;6X+uZLEc77hVRhs!%w2_ydnE4=T`@(b2X1@I`SXs>MQJCixB{XU!Es~DoNjB z`-L45_(TZwQslj#$yZls6t;M8$GFX}j1qoHO#gS|F-1Hta+v>b@Vw*y3Z7TkWRU+1hZMub z*IBp{A%F4pKhmG!J5~-%?p}Jnhx#|1OhrX#fcwKt*%23>XitWPcoZ61DDs(>KB7iK zs~AJ#q>X7Gx|yGvR4@*MOcDxmfLI=8 zW$={LV8u8KD-s!rj!$~jnJL%5O>Cv9`8FoxJk|nh092zjD$EE&O1!*F3l>I>^H`+s z)8a7f`#P}oW;bjg1{$T}I6;b4sLdDxh)T8k9v?kDb_zN`vR6z7miD1rfIfd>FLmU1 z7c~Inkj|^*@LjYEL_&-2KGa2ZZD_Fy-OS8`CWe8yia9wH8;y$bu|F`0&!c+rD-^^i zc##5PaZGtX=~R1F)ErLGE-Q1LCIvV^4HI>;$-zv#i%xuxC=ob~SdEBFs8Yb5o1o(# zvHodTE0UgK;_F)FMEXlgQFZfZ^@r5lJ6H=eM^pa>!{7HY1*lE>29e8r=7(XT36uZ_ z!5?s%QBbi1tSsmXd;~o~9XF-_famK}d*=JylXi9Bsx4)L_Sc!~EH`QkOK;L_OBc&m zTOBU-?|n3m9E1};DoqCUlV%Lm`wlwvgK%+9yF1E>#}3{hLhY;Kx*MihSW=>+sbW;M z#=Ds9XL9ZF_-Hf{X59^|-F=9umGdn%8H}mJB+`bVZ1HJ?3K*CE9aA3Z*%I3lqTXxcTE zwn!|Ctgej9C{<^o;wVh)CB`h$kyIoK7N4c8F4YP_D;G-=BUA#B#DJo=SmJ3)wV0ImerWjgyw3iZQh}$T$9vcF5v(TjoV|%bysEkj2EioIml8O&j z2DlUqrI@7=ct|FYDA|yKHHwvFdLklBjEpNysFzG2MMD97h@3w(GyAJOrMz%M|cGrE2(PGWpIcH7I(JVQdXFKPn@*KBy zj}GBM-Lv#~UiTtB26Qj!GLGhZu>Bm>{et5xM=2Je?DAf}fx z)s}VbpEfR-9hV#z9J2kjVw1Aned*wZgLvfZ^^(1w-VaS>GI7@n?@9Ug6{nV#(!!7l!Qjt2D%8`LvwP|xV(x~5#+2B~htOb=sPDus(E3-p-tNjpSV; zd+X%J9=WbVcKZnS)XTwE*%Ofc4RWwP7hE9)SIh;n!8LMIYp!X%)U}8|atCQPSMw{Zd=M?5<_w z>Xz!d<=VzvZI@Krg$`i)+BakR+G+ZltQm9NLnx8y*^3tT^Utyto?|UM$69z!C%fBn z?oP?wIc<`?%hf^N_HLLzgz2vD$et?`@4uYkgtxhc2#8ENw~xy^^A&4;t0BU#_G@|In>Enk+leEH|WL-ViBxUbh=tDjpxQ~yDz z_jd4*ToanASG?vp+KoTpv#w9lT(^zFo0_wX;#SZf%fS2ILM$W~~b z6kInSzZJ>`_fPL*F{`EE>iN*kec9md>3vE~y&PWld-l1OTvMOa)R%2q_X&u2yB@Xn zZ`WV8%l_J&zeDnO%yrIx6_I;+ftm`$Xj(#*kte1gkav#)q__K;*s;VN#3>vZ~JT_ z>+J)6x;?;7w=d^fCAn6~^{w)<4RY%mVDLgiIMdvlYhEuk1N&}m%I$bo+VN~|$BWXA z7qiVTWgCvl^(&~wZmq>&>q59Y7hWfY*U5FuKWbiUyNQo^0Kk+jX1fk4%G8xQJoo>?N=&mPPw5?Zt1?=a&Z3X zA0=;XdiSfDCkHaU2Qh`Y#x+vo8g#w716{9nV6uGSh5D5$n#zGzxwiGAhL&8zDyd;r zwxLH3w=XR3oO?REe1qJ!PF}g?W01AyzQyKqOz%R!tHHuLBzuP(Y?530U_%FgSP0c; z8oF~0y;4K(eE-dJxvgK8wthLc^?7OQ^Vx>4WJ52=!8Yo`O05gkHJA2Z*e|}vBr6tk zzED_hTv_CI7?7nM1F~2N0qYln%W}b0QgD@A)AUiOF&FBPLLJ#qr(EB>(7Jrinr-cq z!)xSa8!@3C$Neg++d6FotG86=%$a<9R+qK6VpiE0v^us|sAIw2FcZ6;xR%J;J29(}HxAC_o3`f< znn)ggny-Zn`ZVw2EYIjZm3=!u&3AK_y@=O=xqb@PYI#ogZ=YDX#$)`ac!Un~c`FD0 z@+lsm{ZI2Jb(}@y|1Ft;0Dq(JWheiA{^)YUpKcEW{E44Gy3+8Iz$(B$HSkAQ8GdRE z65PNaU2XVjPbNy!>qw|FXsKx8bKd@gm#!m+c1GzN;QD zcUSThu43V87WT1lJqtIna0^xb_ZEWx-cDgt9u#om%FBRRM$Oey z-FQtQdUE;FjaS9}co=<3u1AUU+=4TdsqMUR8aHqC!`b@^W`KAW}bH^$A-;lPH9Hd|o;P3qw0Qi=flKeTcY~gM3uab?UVCgfK zxwjfB`O|0`+K2L)7qJ?VCcu&q0Cq?y_x&}s(Y}s(dio${T zb%3Q~SVvXGo&6wXVpY+glhkNoldP@}DMuz(R#+eHU{ba*r^ClGTA~9ebe{Xz%YhZ! zJ#6pMB$=BEY_Pa_^EE8^Lo@9pcC!AJ3xV31b*k*i1|Y5L@=kEWf9A{<>(Ygz$zu!m zhXBY=xzduI$6{I@k@gwONzQ__0E8g;(E_w`DTDgPac!I!+Dc$oSf-JB6!6T)84f;{!H!K(ltI$Jz7&?jX(ROyM>mTM#J3c?5>=xNwPI%Y|F9c zd7ag=m&YDMb%f5@J0*K(LAr;U<$CP-8?a3v3EuV3w2AmvNIX~Q6OKo*1-nN*)MOfV z|J=SOucycdNhg}R)Vzj!r*WG{|L1NVp;FBbm6|RBT4=+m_^80n^h4T;5ep=|{u&WF znMPDcyEISup(BS zf*(Nds=y!NhnZ4r@nlrH@Sv?49jHm;0M&tE}e)hli>!aU-|fHIn{_`qZCbE-a<)dv);M$ej%}Ij z3DPz(ujlMo*WiOB>15tmwUPg0e!XG7Y9l`cGA#a#fEZbVLLN<)&Q!6C=6L`w*kUCh zW^L(;aUin-KP-!4OQ*@TDScXhzW(vc!rxi6j}WZl46_yj5JLHW#YUbXU^n1FI~ zvhQJK7TAPp)aefkn$d;yh$XWNDekJoo#?1Y{>ZA5u3!Kt)Q{UHs=GD2Euyj#qYyhb zaRS;-QhJnRhf-B2lca?q`Jf7i*YH*m`yNugk;F}Y6TjyBUf z@7No0a=hAgr7P#@l002=FWj_dJv*Rduz9Ap;-GgmaV3%Sua^Ak`Ov?6dJjul@HA$c zwq!j|Wb99nh6Ee!jPL26?aMqLy<uLbx zSzhUq3$CUBQ_}i44^P_Sbr-CnVL-8y<}r>XV)vFTsgp1}2{3xW<=3Pp5v1xJ3zMoC z*&;JKhvJ$z^`c2lBWkj#0!f$aFGp!kJCGA|>hxYpUr0mqBYRtBUxZd5)3!5Hvny}p zT=n-jy$gyQy(UA;xmb}W{tN0+c_Lf`b!mPlcN7ww2&&SAls1Wi?$io&gTEL|>nh6A z$0uaHpbw!J8j&pKrCL1CT^ulQsp8gY*oH!jeu5!YB-GMvBaPJIMuGcA;L4qhE8{Ma zfiANsj*=2NG9e}uJ%Y*3M<}L2nnevi(^RYE_6B-_i!kHkF^C{?Q&g;~Vw>_X0ux_F ztQbb1(HL326r-x{{wCl>$Z#4_lN}Y1p|ZxDrBn z&84#!&d!*!&ZbOjU)I@22W1@FX4mFg`=r*sTytNAw|4#6YuVQQxrY58xDMov zRQf&+WlZmx@oxKR->r$C^xrWLup3Okv&I7u&we!fM*X%;{Pivbe{SQqZLt2io#2NK zD};57=+X$UavH{6=8yh9;ao}L0{e<$0%Z!na<&b5?Zu_Aqo*xeo22~LVC?J*J%PJ(Wz2GvR!}STnK)rj+eLTf zzLlITfyd^g4vsFr4qjSem zrHgusWgHuqI9=8?*lY={?xgY5jcuj;sCesN4Rl)mN%v^@v}K&l$6g-9LBriZA0Vd?hX@pa&W+*IM}&f0YM^Yc_D_bZp0>S6l_sfbCp7C5)XJ zW#o(FWr;v=)YNsaR`|0?8g5~`{=l+@4jX63#V02>JQ|Tp8=>wkpd%PipX@Fc{4GN9 zX4J_x7`KD_Z}D%{%zXL!v)7)@w62>Mvkm>Z&}J#P|5LV+d82(f4=1?4L;-Y<9V&hZ zxV%^5IYdmhJx+hFQR4w*r%i9orE?d~p`lyP-U;r{I`?PH`CfMOlx-5UmdlW*vRE=L6-z?ZTY9>+ zw*}L1@wLz0IGaCz4CNm1FFoLU7}sP+A>!8&a%q5@4a-FQRFn}+wk>x0 zDBnUePY`tr{W_IkEWVK-@_|q{&NPYY#@VRi(MyO>Oz`>{pGc{ko|;UO27+;Jm1|Gn zb+V-ba;cwsDEgqhMX2?kkr}Af(#BZ#C(t}Pz`AR2j%3W#G^fi3IdWa&hPB~ z_TIUdZyw6FJ(Ue_`?$(b@0i|wdF^i;$Xn3XeGhH1*(rAOj}G7Rzx(1H^FG<>o32(7 zyL>lXlq6+%! zR{%5YQmmsSc@yxO5pbb+?2P!|D5(uWk~UBb3ks|cpAblljh&hpXI@8>jTI20Ed37& z8BU=JAcMd5o5M55a=s49*D=>Nuh06{PFrQ0Zzd$!TI8DgnL(*$MFtjBM=pHvWT%IC);C_88Ol1F;q>rLJDsf>@+QvZUAn}@gVK4% zyRePM!eO$nVxqxGD(RRiDJcb>rd&J)trXG5q91XGiWZB4n4B`=XyC@87IkB#3czpB zGx{YvO84m1TgR2^#Ma&TJNgtU5ZSNN4PZ@^2EChG%a;Z>ELRSs4W--mKwZ*rE&Abp zbfISuo!7wk=xoY497>I!Fv^79Z8Xrk9>tEyB_5n zR?a9j@4ya+q8l4m_pE=9(Wu;(vCSa8(jXP%wmrKBj<7v}Vk!2L?V1;}RFle5iOj@T zsH|D_REr6vJ#><^Whzanto3VnuV@*1gqPd*h^qbwg+Nv9%csrQ1Af9;EiI~E;>?9J zm!>XE&6;mJSKwP5xzI`}v~q6KyzqngJMnDjsmrDh0}Zp!eP{67gY%9%?OPXWTjXG; zT-%F%^rm+<&39&=csUb{ECgFr_n&)JhB|+qGx+@Xtz1j{>~nJiQv2p?^Onno--IKT zmz<|&c79-Q&il}Z`!JdpSnrOX9{ySICr9s?56jNLv~ww4lJbe|DWL3C6&Uz($CLqo zV5y+bzXg4o(x%6zPu-~vn05~^xe|RA?|RcQ7c^YqXb2iM4O6cc{WJ`os!CTSAE*A8 zOH_$zTo6cxDcrVCn;8!>r452{67^0QF8(IQQl#)w3#CK( zBhrfp-a?JWLXF0Y?>)v0{&y$}3`re$T64;ywOWaT2s zs}w(?fbDl647qpUBT1e|+%C~5q zsDffIbTvYKRIJ+DnX-emVjdIYC&4)2TG5|^@Wn%A7H=YMvb}=X)tW0gzW$W> zgarZk#IhA|fC~iSVdL{d>=MUtSz0S_3|C0?^qKYEaV^6pOor2SuZQ5y1fsZNS~rxk7TTm1CDllJ{52RusQW@Lv+G-D2`Jc!Ut`xPx0 z5e9vw2z{vty-4i5DDML&^-5hVwxYPa@(PvvR|?n}nDva+`wPS&owdg1qLh=R zQykhQf>7t8)SDWymty-USWCe(6iiYuMZwo8I8T8{!D|$xDL75RSqjckFhKzmAGCWD zi7SglvEl{_mQ&D9!6q%B8B7wLzRAH8Z^LH!shxSZ$Jp{wbtrGd6K5CSvV0XmX0CB{ z-a?R-b2Q{_1lhT|mHBFd99(E^-bs*)Ykrc|0Y3z*<6aHLZQ)+#kMSS-UeFtTsM6!h zS257c)i>oW41|YYecr}EINE#i)eLk{UMB-xoIjj*Gtk4iYV$P=^m6_e`Mg@OpR@Yz z1t|L7X_LXYC2#i{t%c?YQd=WPZHyoXSL4q+3372Bf8I@y+HZoo{KmaJYCtcm7-*(m zS{P`hk~Rj~scY2?gtIUln;7Wgylr_m1JxQCxP|kz$@Srnoz=$BN4~+l5l^(>s>xRo zWTpXI2vTQ(AP48H%~O8#5i{xrbg$83?7ZhU7_Im0CXClrXKcOK&l?Z$_e^%9|6aY> z=)LE47=!o1^~TWsExd7)y8N{A9ejKNdr{yj!$n5Ht%z6j(3h*U$7p0deWmaC1ehYe z*e7C7j1L4BKkbR@I|jt4ALers_gA(3$?oW}A&~@_NPAiF_o!GE?&)G1aYFo<-b}C* z&dnv=uljbn9R~; zq|#U9NRTRRORFxahPAJwGU=<(M>7|#QR%C0Oav}r;J0gLg_hxzIQ^A;78 zpA_-sU>qU9TrVPkha1n|@G%jI zXjveOmU9*h!qx@rIV;?43${i3IXlg>FE|#R=bRLFEVvfk=iC-zB`1mKe4B`_8&*c~ zoQLMQAfIfo{C?=yZ2%| zH4|UDm{^L>GSV!S+p*ja!S9broSd_W1bS-|EpOY;*`OtRZqHO|Sy~-hUP4+^vvcvq z*kt_jax#J0vlb0GC%`sBEcgE%ppQvPDZ3#f%|mJN#mgQeS1lRKyra0Bkd%w(iIy8O zO@6nKigm0Um)}j)v2k2}H&MsVarxau9S6tdcN2A-9GBls)NyfKem7Ca&2jnNL>&*u z<#!Wxyd0O`P1NymTz)rE$Io&3-9()L$K`hub*eZnzniF2&2jnNM4ceV<#!WxYB(;x zo2XOEarxauojQ)o?r$K`hub=o*CztcJ%&NtLM=Qfn{0(a(I z)k0QDCpkcpmN%>xa+X-&-zvFcJ4@cMM1}F#AaE|PpmPmPjtowZ2-Abd$3}$F6Tazk;Cxv7cq<4RxE zX8+>qzJUS6IB(qa`B*Z(0J6`_?DFDbA~lnoizywUgI&HO$)(ukFq^10E5&1} zxHxluRcXw`Q?FcxXWnrw-c~FnOpl%#nVKFv^}_TyWt4_aPfm`EPtPc2#$(0XH%m!( zZANu-W7k2t(=DmEi(*nLaUnLFDz}ed6C58sIW;mlIyh!-`{?hy%KL%$W+t_IIj&5u zc3T*auM~ehkpyvF7#*J;IXN<^ENSB^v&$fRFTu>3+pRMC%v>xvr*zK5dX-`qXOi(G zc20Ys(8nsfQTgKA*+S>F%q}$J@lmEjT81-?pQ4rfEiTXEgR)^Q`-F)3dR(IOW&-_k zEH!6_Y!c3HTnZ*g&d#kYT{79**}2%##dzW3JcL}K>@y};78hgEs+rCtmsh0OIIy-0 zrm#!bl!?_iG%-FkJvj)wM7VHihV4{7(Mk4O_bA~!`ozTK$mq#&L;XCxvU@+`&xiy&hXwF)bFQViMX_Ol|`) zo}85um(6bYZ%+E*2koEhc-Aa-Whc|+@_%C&>uy7X{qvLE>>v4fx)23S0C>ZKf(M(N4_?xPV(e!*Js>PGSO=XmNabb_T5BmhZq?B>n zd0X1~DQQbPN5yS@=8(`UpL2mx5PbisoGX4MKD&~NOXz6NIhjE`YR%cfLVh71L(iJnhV62k}DFJonq&qLb`XV zOxQqw0j?j~Oa3FY`WCqxX#CzQUk2JY1MORZ&O8~mdYaZ!S%2{Tv3JMr219vkb$$50 zt)`~-fvql3mG2>e8l`9t7PVrL07b_w+Oi;))nZu)%6hd$by!r7MU7DOs9bbCw9z`h z6}fcBzaTe%J(MS;ZPF>y@p@>K%VtlXH11^4cB0q{&&{id??q zf2}mB{D5f0C$tkUs*ow^G@n6#5$h9-6E{zM03`9(+vI_D z#Oi30!n|k}0OgWBpO*XIhjqHk&b12l@*X@;Siy_eiwVZM-?{!=GI%2)(1ALd*Ao?NpsbW9HMlk?* zo^n*huvi5+UNIt8!`&w~i9xvgS8dVeT!Z$2)QPCVX|96*!K7rlZ->)y7ZFvS44K!7 zsLFUUmW(w6QC>L92}{PFaer>Vfi1!XzH__O1T~eoE0&Kb))XBXyXX{M87tIuf9}2^ z<3T+~*?OLgL-dM1(O*)}IZR&NL&#NcnN|ZCuUI8kXY9qb-)prKsHfxYXTAMAcmu`| zudBX{XCC)Z(Ul7D3{i=Yq0i~dxFB+`wuxM^Bq1&Up4<(qF;tRkhjNJK%Q$4bda>cU z60ryQp80Ctf_mRoEJEXW&X-t1f$gFMl0eSMl!u%jneogU@$+-b%a=ZL<=l)_C&Zjr zl@D?b>h_09)S;hqbAdWnr(-P0dAY=QepSK|N>{za=nG72klG>hGp8iLE$2~$shn3; z8!#YIF?&m0i0I`q%K6ot8$t@>(o$?eC4F9sEzQp5?3WTtV$Lc5vVne^ZWy9|Em63T z05@M^N$v#@RJ{71Sy^WST&$$hUF>}$v+U?NxQnOJ6+0mdzPw^ND=Z&cWB(4P!hA8h zmMJvYaUYE_A=#H(5rH~;jj;+{yT*9x)EMI^&xY1rV>FEu(ilm$Se8LhJdL`87zJDaH038~z|;&4RGgv#)qJ5p zN4mL*H8>G-UbI`We&n2ZfW*a|OFqP+9=eyMgLr7T`Os5M2BRUQhcI8===iWXpXQlz zF1hPDuiC??o9aUnGJ#y}%*y3tT!MHY8mWc459B45GQD4k zjQS;H)2y?2B1#>YJc3C-B)I_VlsJRuR#FU zvklGJ#;$Br$J+Qt@TR1uO*SaUqNfN zAJ|JOc4pf;v%(X_P5lv@%G;n$K19NMzHIE>Z0ucs^j6Qt$~O(!I`qW9{& zpglen1?_Q~DxFM4NLX=fw+W{AXez4+L!qI=wx1t%3_at@IcV72c+@3z(se<-43tqy z-I(Fi*xKomm-a%o5_XR-CEy~WLgJqQ*oBbj%lPz!M7^+kCN_e&=twEz);xVN0-Dxb z87C8j67c%N=QbW>nQ>*@Ad-1S`*knR1L4RwuZUkNiCqatj`3J0m^*Y2oKjZLJwC>~ zqcZDIWh-O0L1ixEVkV0jm(vwtT+Br{8YO9rrX$}OBWu>2F_IZxqzaI_bE5A>|3+B4 znTZ*wFf$-JVBD+m5DZk98;Ap%?inbUAz^Teg|bG=kloQ_4VaoObE3np<_m1O5aMxS zY;XGg z)>No8z0BjQsZe3M3nyArub{yAiFBqN24x8RsbFp&=}|^U2d}TtZr`tiQf9$vR*-Ik zn)2d?G(}|^P}h|%eYLolyjo&{IvChtxQauab(h|W&n!8=Y=n*_XA_C2w^)Efek=_` zk_!~fALYx^2$rG-fK&zSBLGedy_IXFuX}^xdoXfmk$QIRtXioJKCXWPv8O2_*M0k%gkc z;NU^q7Y7}KPr5)zKZ2wABqTW}st91l@ZnvK!IcKF#3lQfb8hY=rW2ybMkuDEDV54b zzXV_xvQZ!t*r9CXis0 zNL>1psh{fybA>X6)WRw~0cRII45d>Djbnl*pfrKW3z*RJ5-kgiC!tCftzveGNzA2o z2}*||DaWfZMatVywM?RQ1NXgpF|$M{CPD~b(czMQ$bkRoAs+>sL^1>9fe#7AeCUy4 zKE&O-`C}H+`7rXB?t_>DD*~3YM*s~S)pvja0QM6J0Q(uV^aK0(wub%0EI@giKynY0 zuaiFLz$Zrrn{8h-I|jR4QM+opk)DAv=@=vmS3xHUau&)}a**zVs~Edwz$pXH6>!UB zEa2t$#XNf02NbrlqWt#wz+jyAObsz#&#$w?gkVblz(NH;qS+`=xLO=p`yILbE5}e6yT| zpqy(396n?oWq_g!tPoaC`>J0IUJYb?@N_wNx~fziN6u7;uvVxG7TuX>&o_d$c`<(w2-HT6KV(rAlm(>(x+7t&r0y=d=ObCc^^2f(*9<+%Cf% z0C&i6C%~ODT$c$#J6({|CFj8E`^dt_m%6_cYY}u@zBIGm%||$6P1W;qptl$4@iKAW zb!EAGs<_0+p6Re`h90yTQB!)$>=ui(YsDdQJ^qvH~IB}pzQ2XLw9 zavNkbpIF^-3}qHBNXv_Yd>9H6J#+UVP9G%cz!Y_32+W%$J&Xlt8kY8BX?RHM*P?`Y zSPmnErsUX3ScJM9V+!6m0?ixvz4{6emAV8CV-{roOYfY`3Y42dujyN85U9j?BS5M& z!^6teK&JDneHy)8w^Ju3Crh(@pGe7 z^i?)pY7>*g5ZHbEEQ|-3T84CSBn)t(T=fsQvzbMnq-{(4W3m4Pce!pQzFLxqKIuXD+WPAjwKH zB*)?F+i)HcvAiUS7<^xpC8O+_3RvoXDvMZAs-zuLoTBB2R^3I0ZJN+1utgJ2REnld zW_d>{#WlBrD?3z?Sb4W8Yp&q!=JErl5#1{wDi2(F^;T4YXg6_t)CxAC z5>aAWo?y71ShFlHzQWLHxKjmk3NtXo(|06bXH*|D^{`5h!-1cxDm=)Tc0?7P@(LCj zq|*Ol*bCX*&9@z28~SVyI|qjGV%~<#k8&2|=Zx>|z^sWx89!xwG$9&xHfK$UQ5G&E zorUL$+SpK`=#r~lOk9-cXDF1105`X4;zWs8dI}T87Y@Nh5HFlqx|qzlFT_)@S{4>^ z)iVprF;VfHCv&!BO3K+1;JydhnM7+fDyo3w+A%5gpQ}0;HG(qRpIushBboE?GX&b? zJE)GuN#q`+v^AKvJD6*+#=4Vg$87Q*4*xv;~B3T34pq`8U zS*u61&?sgDAA8^W{6^$RiI2U((8u2K*vtUR&PZ zK9KD@{ImJZmKV9BUgK|XAffQbM?XAD{pt?18N0w{93-`^*U}ro-urdlP}O#bR5!jm z_r3Wahd&Abuqj^;!PfaOiL`tf?%NFatxw;4Vk>;~ozZM#82t2&&0mo*OQ7`w+ug>d zYlp7Ax!JsbtML(x28dki`lx#Cz-AC`cbi(S&8|g1S-RbN@TPUE>CgwRY*YK~rrx#F z00l!I`#<#G4Tba8y^%flZ9Vl3`AJJneM2_fvG#1<2GDQA`_@Bw2S9lziFB@wu8W^e zD~xr*4J*=Ir0KZibFMsPO=Hh}1-`4SpE-(49YP#p%eu zV#OGF8sq>5ms{SAbLThfX18Co(}liG=7zPcgDRF%e@-UkWoJVhj9)WwC7vFCSxrK=ydCak*fM; zv5r~h<5FP7|0lbF&apdvL*XBWXFosGE9e>gbTww=74-}4L>rSSWXHyMs(IWPM|rmL z5}7P$>kg3#p;%?ox)hMjsP^;n!tgf|RmjEU3QF97*^xFS0jp0~eyn*6q3%%Wi*C9x z1sVef9a2RJHXCdpuST#iD8BR^tzeys6$ZR;ytVZUON`gEy5_aD)m-D61v^1oxuC$f zzPv@WHOuZAO}wTmYfBg4_*Rd2=F31IMAWH~Clx7Dnn83b8+tThl?O2wBP6LbS4@+7 zDbT{GNOw%I^P|s!Kdhl+T#FO}%TV$Spaf!EL$O1mzt|zsfvIxN;OCR_m&S`uRuUdfUHi6_GCbBQ$nZb737wwM0Ue_#I zs`!O|0Ll^1K<+L$qBUbR%MqFXfm?9(Z1$YjmE(g~Z5dnA>!J46!cQ$$?1{pIchD1D zHANTin8FsXX1A_F?kAbJlv1%vxWC{$F*fSQ+I*zaLuP ztF{BiRp*$Xz+_IoGThb?E}l@_G>2BaK{I>%$R6->>FfT6Jh_X#Zg3M`#8 zW=>$SQbIxK3~02aUt)xiANBi+g+^vI`bW)=rL=D%>#`JPe5P8o9OJ2rCL5k*Z5xg` zg{kYJQ}sCZlL}+Qj~gahsTN(zAr*!NkHfy{2M;eBOH3N$_3Ze%-IdQmjg>`XV^`W| z?5o(YtGu#|mVVA^VkzBrG=t5bUEkob!{Js8`J5^pQMBo+-!`LfgzNSy_M-~(q`a+U z%>Q5nmDoG=jix?bi()jVrbxFd@`w1)UTCALAGPVVsMv6kxDR{i^`@PAh#m0i1a3nn#;u(FK7H*20$( z;DrR`Z!X|>pQG?1K_k#F*;b_rx$+W$DW+Jsx%IiB%JfQABOV&BaH>8*8_Olg5$(vy z7#A)dfi4W_^5cPWUC`Cc%qU=L%$ZiBP;>PUv7JPD?<~T*U@o*>Dk#wJmCmpM1%+EE z+NBO&afGuDib1HeIxD(usl~-js3jFBoAflCkWRvuf|zFkZW@z)C;lA8q#KjHkbGv> z9N^Dk?(>kqt9@wRWA=Ojp>|9>4C9l7(Yqm~<@z!bCi@OK@YwIoAJ*8U*wu*8g!>3#4HvsH}*@K=AAD~cd6w3Bd zD3cp9sP`cYUUt={TK-cQHcPJ?vcLg$0~^EzLbTUahZ?U2(Tz53WLn0qen0}s?AkIs zr`~Ia2sQf@iWTYqDp?eA{1z92WyMk9C8q|@^l(Fbv`=`1>Ku!)D~eOKgrF&nYzNxd z$;pY+FJMSjK^IG!rQ9Ir*LID*yA6CoHSeJePbGKBju5r>eH$RK1{N*o??5ho)q;Hs zdj_1#(kx^p@wjE{nXTqm;dgqk5hEycKmP)kavCbUMY7d(?`Pi4P#)kw9^e8V5CoIo zweW_&1DusXFE}fGb?^3kulM6KAD;Q>95^dI0k8`0ANYsPt^TLq@n`EAzakdTgyo%~ zyN8e5>b$kIIdE$0@c27p*XyoLt+j2o9N3B+yzM`fw;|SVtD866&4s)J`a|%6=muB= zU?&>@rCo4KDM68X#y!5w%WeTXeD9@3-3H+7Dp=m49fxd+i1HFH4Sr zhu%wmaOi{YZr1JHs@}KWzFGayhWp4Z3nX-O-Q)Mn2<%G4kZs`OTYF)RECfd z@Do)mE_D^lpMfL|pLI#5UWW2lSu_Q$ehiB#4#rhTb&y0GDm2uIn6&n=Qo9SFuYIV( z^VX@%M=6geSjfg$Yba3`x7);GWQ!i~3B;s%=xbom5v4Z9@i0246lh$51{G*Rf#^#X zv|nm()Mu~N^g+NnMZGB;Zq{OxGZ7h&o2-QHs$` ztnmv#%?qc=@ens%tHLMc-DhC)=x zp^!>ZZ>Wp=o37XV#Y0@Deeh+V)T_Wx1nd;0sE!nULb{~`68_0U38T%W2274)GKR?% zCUH#WFu9D08t{btMtT~PMohw(1Tksi$@c+BJ_|?s+az!Oj>XXgQ6+T^c^3uUq&}SY zP|!<)b$K5J{iMDvAE00rscFtvQ!q%v?fDuCg1M(YUq?aw@;#GtC{A4tEzJ!cBQ2q`_$Z)ZSBA>cRc(^FY zdPYGn2{-3`6!hbh2PjyD4Odezh^^I7uoefbj)JUb6a<4v=ZnhbQZ>Nk8rPk+UgK3Fn`!d2D@=CJq-3@zK_9voXr4(tB`gz zgM-+;8V1*rFbpDt*)%ek%_D=;cGA_8?T+FQ)g4h54?=Dn6%RsQ?1T>?HarMbk;e9X zH9`<@)S0hAs1`dysf6$u>ml#{>y`r!Z~lU%3sUwl2(d>&h&>2GuoNML2_aYrjrkgc z*g8NcgtY4sV%Gq`kw8t{=6~UBt|9=3DRT;kk diff --git a/app/modules/agent/__pycache__/story_session_recorder.cpython-312.pyc b/app/modules/agent/__pycache__/story_session_recorder.cpython-312.pyc deleted file mode 100644 index edf89cf2315b9852f022d298773b905d332df250..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4272 zcmb7HU2Gf25#A&3j>msWqAW_LEL#3O$CeT|b)7bFVc2RDqflGhO%t{5;mTV{CzCv8 z?dfAerdZlQ zm(p-{c5Ze#^UdtsUz5ogf$`O!|7iauLC8OF(jJP>NLwEOvqmgpNhMO2<|GOEP$^Un z&xHjaF3DwOPARK%szgHM$HbDa6HB4t^{{VaE+V8VNF(c^K&I6-J^F8)=n{{cm5Sq; zp6ygzm});`j^`Aek{;r*GmBe4G$zOBQD8x-xy1E*n+mEYYIp8q3G0O}k(*dzn@WX0=*?l_KmujSCC3 z;!T5ay6jlB5{2i5#Pu9jH(dXW2BSrXS(Hsx>pW{(R%gKsPQQAj@6Va)ryGUyibMa7 zYynGV;TNfldNo$z@~l&#;2q5{DrT7)29Ftre=^_`hVgODEcq)e4bL+04`CT3DI{8( zAmbupu9K(oJH7_WcEl+_gS6Fvm998N{Ww_=vCpL_dELi~0k+gR*@{~V#8!E&Zo*PQ zN41hx1im9y%F^Il13aX8_5yl5@Z$Nv-^Bn)a6AG)CIn6_Z4CmmMjBFs7$_H`P8enm zKvjWgRUJLVAb$vt;l#Dkb^sLND0Hx0u|30B9q+gCRC_rIMqG^8HPRfOxFP>OCVV-I z8v$yamxzsk5_(u1@z=n>5y?_7ojaQ%isYrdBUEZZzO3!SupGo+Z=J!gAy z{{oUpB>Rxy(OmRdAsBvaAZD0u2CG$8C;CR`r2<0VJqP3(Y3(A>%baI{pfq;kFG+ zUY3}2>qh{d02&=rz$_tZdjDE7!tW<%LuFJELWDzQjK!LWv^bP zr!ecdw&;0PqsB@+Rdg!zuwE%rG1ttBS*p9XyPA6+p;8cY&n~(J%PH0nf?O@xmCMx9 zBV8a&wkxN>oDu~j3xol@=6S@emCGip^SBR71JA)@MMh1JTE=hdy28V*$9Q;wdRzg{ zuCh@$rl^Rp3nu={t$ffS)VK^+Oqm@4*2N#*4LY_T1W?8M6rrg$=y&9Tuu_MIpfF@7 zo|9BGb>r;Q?8sgDzIIQ0FtVA`zs^lRJinQJ^GWu^M)t&J_T-J3Z-#QsOs<(8y1jC9 z<*vG!o_Ks{W+Od=!bIlwxtr&nB;MFaywTi!0RQ$JZtgBLbH|(c{lK)+Bzg2(q9s$$ zlCYg9L>-(W0`M{rIQO?S6(d6v(HaLq2K$_g>l(mXDs%(3UV`dj{CXV%{@A7cb79(atb9XSgdz zE{GhFXYB`Y_v%U)#@+%0>^n%l3#1$A441fEHN8b&;q8u=#s>xZjd_O|?V`+1;(7

<9QbvXmF|>2tMrBPWHYzte&Sx@52**Whw|gx zF+_A65dDIv$y6&thW9)tQOu%OJU%?S_R*b>nz{V__`P^DUwD!~wvj*f(E8KDqlL}< ziJb`&21|Z|U;%3n1g%IAbTYKi5`3^NmEog&u3il_Lj7-SOK!Kx7vM6T_f0p)b^I$FY33)JV})nQ$WZJ?1cH?rx&6t_Pwt+4@WE#K z=wt2Z|N0vJE_{6v7;M)(`1Z$AcT57=<--7bsV?o%>r;3Fy-+=@%WzpigH0_SVYKWl zBU7tdcuRm+upn~v%=wwq7iYM7cIGED7iWU5ko^$Wy4yi^3IwZr`@5(s;hVRxmnDwQ^GJdfd00)1v`%f zug2bIQhlF!c|cKM#6IW^h9T~2NA~+Zv9~x8a^MsUfQXQPP9cr5A(Up33?tc%1YkkL z<;<{7F~qWnR_~k72reMO+u!{P$aS(6l9WO#N5=O)8_FrMmP+yytq5`&8O^t%$i>Le zu2vkm1ld(+C6P;!f!(b%av74{-x@$}kYvVM!b+CJQd`3y+j={#q*{~XKvXiEYekUL zkc%ScTShK{_L9h@&|VrjNTIRT0CIz9ZwR=pQ&HvEi(QH`DzGDd&8!~9SHSriydJ{q zAj8DwDs)7U oEL&kolKw^}|4DZLi=23&O49f5zW0K_*MGF%NYdzYf>a#wzhhOvQvd(} diff --git a/app/modules/agent/engine/__pycache__/__init__.cpython-312.pyc b/app/modules/agent/engine/__pycache__/__init__.cpython-312.pyc deleted file mode 100644 index 7f6fbb0eb11b95175d3cf97bc27511b7b5ad2c17..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 133 zcmX@j%ge<81ZrJ#GC}lX5P=Rpvj9b=GgLBYGWxA#C}INgK7-W!Qb{Z*(9g|JDa}bO z)=x}N%`4GQ%}dYBOVy8$&&8@s8&al*4(6e*S} z#2>&`78b;U82Ce2EVCdBOO}|}D$3LWaql^Gh!AR@WZ(Hd@1F0zzT|VcTtu)QzkP50 zmJs?*AC4E_a}LMB*+&gzpm*E`GB}gl;tl?lxWRV>MN|sW$SvJ9?-9MdeOIr0Ez*fb z?zHOeKxFa(X+1UT-a~!G(d~|F4dM%bVfTee268WD@V2eHuC-;=byU@&KI(#8&#oXu zu)!OGjhdX#aj46!QzB+0XY)QNUKnlJDL}FwlBWLVlv*cqSn31y?IcE&^h`+p~5krP>sN+hQQEKpBj=+eQF3DONdiL#MGyTWOwQb>Jf z9}jp zbEdbD)fOeiI7nW_{GuXr%hn>(JlN=S<+MN)!r z{|o)MRHi!<+@+uAVz!R1LM7Fn>{TXvHI==Z%3jqp%dtF7Q`?=Wq-hP))1e4WBV%yT zFkJ2@xb2~@QYnyULTM((_Y-+Kz|;SU)IzBiV>^+T0=&fbEQiu^jGaWT1-Ql{)ljO& z*h=KZ057tL8cJ%6w-dP%;0lXWLa7qttwdf3@B)h{p`^t4Ng~e&c%DV(LTN6>8;Lv{ z;Ms4*@i(Jiic^6&bqFP+HARRdP19{#(;~t32y5vBBIf~;QMeu98>uum$pk#opNLEU bSq}t`<9_nR62B)MOkC!sU)O&jFf8*AQ|OK; diff --git a/app/modules/agent/engine/graphs/__pycache__/analytics_graph.cpython-312.pyc b/app/modules/agent/engine/graphs/__pycache__/analytics_graph.cpython-312.pyc deleted file mode 100644 index 5195dfffe7d026bad3ca2e8b639cf48b520f607e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2398 zcmai0?Q2_A7(e$lH@D48)2^=D9O>pZGhM3nWg?=Ksdb=L)`5_LmzZ;wrQY0R=iY2f zNTH5_DdM_`(1I`YgC90FrM?X7#=1YiFE_NXaB(PzAN&@qBJ7jTIX6kW8QFn6=Q+Rg zoO_=4lb=E%9l`i&>5E)bLFhNOXb-u?tiJ`!Ji-VICdvybAup!Hyp)mzhKZ(}S5gY+ zB~#4@QUT7(rj`$;f&voJIKs*~gw-pe|HYJE4kWZc*dif$(kl}$d&=a|u_H%4ebPxg zWSpjpClZ1eBl(1qwuyP1_P~zK z&c)+*N7KdPNWOqeCb37-%-#`VWpfr8$ui#n*4D@1K(bi&G{eYQ;4h=Hv#Ykr_I{9E z#K;V43_MhmKMJnH0^OrOa~juw4VZc42uy+vr(@-n7B($b#VN?0`v(S_r_}pVgxXmk zAUMa=xNkT-BN>Q=2gzc=>1`jsM>f(%H|DBvRcz}#35hqsB6liBPD3PmGbc#qy<#C} zIfN!O%FLkwAfA@S*suzic)f-%?yopbaF$T!D$0E21u}(vF=vv5M57EGWT4_lj0wc! zaoWeRcS|`FSGISL6W?TJ*>3=uK|e>gefH97^s$=K&_Z+J+3Mi8XCsN8-!=HEmBLGB7tiJALW#+VpDVpsO9E{rq~HRoOl9W^v;2jzd&8$Ga+E z0gG3qD{L1AL`|4#@jl{HEMuh|0mz8%GU_H7>3?Jbn`EFUyJl9fDt?MS7qMQI_}o*K z*_@Ty@tsz>=U%sb!@boF&DD)e2g^e^yxDRbsj4{vawj@b8T9L}Q-?`EIZCgAJKT@! zAG){P759dFvp!cpA9t7BoAA5gF4xb(?*sQ*{eAbkyX^iLug}275AHYaN_{2{%#wQx zpcU9(N z*v|8MW#CXpKHicCG<0Nad}HZFJI1s!y|TT#kx5*zNa--M^g>s|R@`g8E!W)}_4CYL z5L;#-^UC+`cVOUI;JyWyu&tG(r=~6YG}N9#St@!`mN=d~1qDf2DSI09KtdsF69K=r z9tPC+hRl57NnpLFmuy0z3l>Wb-2(zPD`BWQHhAUHtpHSZb+5b4_08(U{u&6BpSG>h z+t-NgZw$QicR&v6O&#@boljg$EF4~>tFisH0IRd|Y}p+;aEY!)Mr(2-+&`C_%`JpL zAiTdOHMVS@KX&ohudy8qZ!a8nqk9{%eV63LQ*Jcbh{YHC7Zt#o0XY<2m()SMrZ>YV zHaI_Yap-p6?t0&D_mO9p_0_&ZHMOnHNMpcgYtuKhu-A_>T$jy@qkJls5exs(~nFZxr3Z2yb~Z&Sf0#smsX!AZuEbwPjA&8T$Z`bEqi_ z%GQN9n+T>Qd7Vw`s-isC3=b;17Dt*0rX~CroBS`ak4z+byoi~$vVL}P${VQPN?Gsq z9)$-m*?Itz`~gh*4`7mu+sXF70zX~$JV=~(Jm0)6|CNPj*!Kjt@d;31!|uD<3%(vN p(q~|UJ$m*|AWcaSgkR8T9gY5u#_yo9JLt)O)L~)Qp9ly)|1V(WgS7wv diff --git a/app/modules/agent/engine/graphs/__pycache__/base_graph.cpython-312.pyc b/app/modules/agent/engine/graphs/__pycache__/base_graph.cpython-312.pyc deleted file mode 100644 index efb8c1f1d9e0232c1dc71b8822cf8310b78653f5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3712 zcmcIn-ESMm5#ReFj}%Eslq^>=lG2uCi~gWm#X(Y|ZlctQ`eD$3od7NKKrq}jLzN%O z-Z3!=3RM!dkl?m<+yWAs1mJ^#+DIPM)NYIdfAq zL`rhgmma{`-Py01+4;>3KMRM01iqzTUdz{^_ct7PpXzot>d;vxlu)TaQrOA`sVJx9 zqLNaIYD$%mrxdiJFXa<`wcs!6DP8onLZBE-1tlUAMrMY*!?#)%dQWmjsjy6@3H2=y z>VHpmd6B9V*Z+xwWL&Y8XOpLG?fmmo=bpEN=go}Crg>)e<+x-=Sut;>XL&itnPH@j zYAFlc-l-fbnP&>c^Nhcm&$3OH*d`9hIu|)~Q|Hq#UIvL%5+x~_N=%_LRW7JhT>y<~ zfNBd;N~1pJqcZaY-w%AfW30nCP*vhVyYHEd;fVQMCTo^?)m93HqV40%tngAY>uM?l zz`g>%ji|W4F4aj|OdzR}8&VQ9P}8tKF59ZX3Kw_}%ow;Y7W?XWW_EU>Sf-T%GbS>q z`UETG@+CHrLo*o@FM%j&(ND})Z9SdNm%wW2+VFN66W&x9j}HKuC#}J~i|Vff8!#YU zQlr&`)Zc=aTqdUbo`jg2x_NIrC)ec}4NvI)C}=w4>*nFe^8<-IWS6Q?HbvPcqewP?f1A_ZC!d_@$7M)#MPwj&z4IjyJ*_JOv!kSad_lV z_GOm+*=#uv6FeT^XfuwA+Ioi4bg4|49ZtLZoM9;K>~=0;TD3AdyO)Xd2+vRINpTA}_{G~ODd|MIJW zU^_?vFZreXO1Qz-B1aY##7}jpY7HO1&ewV;7gcXhqBU6d_8b_yeY)8{wdlLAM-acQ z&`<7%dao!~16TN^BzD!S!4>(^*$3_=eM5_30mLo@qIU}fmbRsU{~rP$f>M76N>!@w znrs4f`EBy9OoMerv^{kd+uUYYp3`Csv1%2I*hUyxX-Vb}2obz?Xh6wHLj19D} z?#oMaep3`)c*G2**li!}H+wx+-M0h%Zd!$C<_GjgleNKacsY5X@TDybS@N6ZeiD zH?2PjrU-oy@9rcxR-m<$|63ez%ouaCs*8JF;GQ3bb8K}6@-xSmvUNunNY>*p|1{Etrx$D?r)4X_E>#~ThUl!prKiPhg#9Y z*VV?WR$rp+SHqDF#WxgO47MXAI|1#b<~t(K4=~*Lu7*|)tc4zVpeYd4bg~(5I2Kq?PeavO$`n~TZ3ok7r`Uyl zD4l+#k|{Vd9K#XE8k#?fMAS_x&1X#!W;q)41`$zA)H@u(C*ec z6KGb|4Qw`ie(lM2bU+(wJk=)9teP9xw2$lq)J)IPd$n@02w3B>^H1{SWvG;Y0uc diff --git a/app/modules/agent/engine/graphs/__pycache__/code_change_graph.cpython-312.pyc b/app/modules/agent/engine/graphs/__pycache__/code_change_graph.cpython-312.pyc deleted file mode 100644 index ef9e0d988ab66a814990f20f418722a089e765de..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4383 zcma(UTWk~Ab;dK}XCB6J9FhPT(kx&e4v(de6G}=aU99+2-H?pKj>Gqp{m4Bd+r_E3E8Cd zN^|GjbI-l^+;h%7k3Tgwx*2HqXMUml)59=-Cxcq!tH9zY022&i5F2L_Y?w{h!nOn# z=2(KW#rcE~7AVZc?FmQNL18}bOt``>3JY;}!V~sT*dA|4G=>{l#>SjtkmCk}oYOYz zq;S)?E9ibk20_l`P7EA3h2e93L+4EQupZInQ#g_u4YFqANhL0yi{O~7D{2f7J~^T2 zQVJ(ySk^R28&{)%ZSIT7s!kWt<#p8Qcw$(_?vAG$v0?S~+aHJV z1S2zH7BOKPVr3555I4dj{stfBksAp&*sy@?vK`rE2jCrmcOs|kg0Tz6E*QJVxuC}k z97`hEI*+n-G7{C3c--XT@q}r|vYy83K(s0i$_9Zs_!f6lF0yQvk>~{JbTUKRboCFj z_0{9dU3LKE$V;$0wgZLfmh`&RY$mVC@e$kz6B=10iZ5P|q*A?!Bud9+tv5oX*DI?r zMU{JFMD$v36!@2-RA3TCg;L|DQ<4-FAgymWP<0DAR#045lnB^0FT^(#(SaXDMoHYQlJ%Xt3dd)o+(`fRxv* zxE>4vOI*o{HrBcV0Yl`=I%=}7$t>s0+Hpv4t5Kttto{Gih<}OK+J0FlYP}bjt~#Nd zOKo1ZcNOKrmJ?Ab1k_uu8XycIx&~Jg1;3%Gue+Fdt zjhRr;W(x2qW3uT;Knw){e+Bk88Phca9z~N9k(9}&BKl~?=5}XXL-N(Mtm$8KXBw?Y zERs1GHg8jtx~Qe(s4}9+D3}QxOJfY7L?ru&(IhxH71j}FMZrwtP~RyFe~sWhI1-cS z+%-MpKbBNS;%QlpR+mx|A52%VHA>U7OhBeRokHMXz^htkNTU&LG}Bw}F* zE-Tn;vL0-}#37m-WL=m%JhMf-Erosel;o z9Z*)>M5~aRko~ukrMv=3o<{bDKv-=w9^y{GWxCghhRdQZ30~T-!0kdzbaqr4)>V8v zDt_r-4&LQna5F9ICxW+wh5kug@@>yMD*pC~{@eY9D^q(*{?MHN^_lLxtJ1#lmt8;Y zDz_glwjZ87Uur**Z~F7#ySLCp@^-Qu*i#JbnF-FmJ0Cc0pwYbNNua%OXs&bTRCl>! zPqAaq%$8Ee8*?4Qv+CTDA!Bf;6gXE7go}Z2DR6NvfQ(Bh@2RwQPF%Qs;jg|8h4Y1e z!@H&86DK?8Huo93`wa2xhWA*-7o0jYx8v|^cX@kXaeLq6;O9f7?Sn?}tl=FZ)U9{g zKW?9TbGEy*`AtJSVtC)G__j_7pSte4jJ+p6x0SYi)7X02@V>L)u{Sm?a?XG|?_TgR zEp27ruA*<(6#7)TtCT}Wi=m^BHyVTCQs_d-cQNnynDXBK)?C-_ zsmtX}`-_|Q&!~?tmp1j6I=)faysgsq_H&Qj-*of%b1&oHL|1I1__NPlg1;$${CNZ8 z>ZCf@UGax49W*eF>kB=FzyfFUx)&Im%WWkbybi|tQocbvHOV3tzkqH6a*As7W5?== zCQMXYEt=9qbG6)~o)_S=Yoww}6i0z#mE59!2B+8ahb&i%FNnKx5#B*J;>YTFLybF# zg&cwkq=TtZ|F1g?Lly&(#W8?;V1o>I>C&ZV_kGwbQvAqGK%&xT_ z+p7M7_%ls`4hn~Ltv~K4_{!eyqPM%`?SY)s<1KqSi=NKHiFr@=WctnrAAc|-&u={p z@2~9dDf)X#{w?_vPnvzV_J2Q9IQzYCSK2x!#&3^LwoYE1@=bP@+IE%O_7&UqmD=_j z-u;lX<{PNlU@sgAbsJPTY9t{`5>!xQ^6@&%4%*}pJ*i_G4CFmFF)PCaG%o-%u$GCTim OKgzPLUofPn`}`MgNpNWZ diff --git a/app/modules/agent/engine/graphs/__pycache__/docs_examples_loader.cpython-312.pyc b/app/modules/agent/engine/graphs/__pycache__/docs_examples_loader.cpython-312.pyc deleted file mode 100644 index afc787c059270f1d6eca6d5d7b78cfbc1292f228..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2505 zcmbVNO>7fK6rTOH9XmK7#0h~I(g4K)5<)Es6onrJ1ym9!L24C2SB_`mtYhz**$pJY zkvMQLRV2bGAZVdd4?!R`mrC@2N^hVZurbtTOQlLZaZ3}bsyX$|Ivbat=FpM$&3iL% z=DmIIoA-XItgJvVzMK3?Jt89XI}@A%vOVUv!Zd|2!dwC+xjv3#JfGnEcph~jEL=ob zyu+82`-D+GB)w!ph_l4w5p%F7TG}d6*P<}LADAgbP#=d;ACJA5Cj#ciU?0OgAY$>N z)F)yI%h+{;$8I8F4}1cV2V`7vQSNh%av`6!vQv*5hejgFRDu{s^#~@k$MUAAo=lmB zf>mnCl$gU*i!OR-+h_kKz&HOJkSUbrMmS>|hfEGcdzeewcNW*;lCxKy?<}%$xxD6Z zm|G1j=EuAUjq|3*S&!Qhccjt`f4mgIc;)MROmggu3u%FR%U-4h$2*Nn^W$O~;>GNx zk>bP|jiQj;^OF6J{$|&8tq=_7g5i8{XCc^;3wGQ) zlM5bra3mM(&WJDSR!@yy8O=6@XZrJXy9;&ua&`Oibq6xO=NsE6%*mrq{Y^7wMl3cq z-8z!=)uhYdIf!Au^mDopUJU?V&z6-oa3^Ahag&g4k+~ zm`mtkSF=6l^ZZUA{|7z2=r-2_*cG)%l2}qgKSwAObuMKvkglh!zAd=-CL+mx9O)R_ z{*HIY-lx((tl-+@^# zyL{G%ssfkKUpjwvXWsu_>9_L!maMzw@3~r3ndA%xnftY!ocqU`wTx~TfzoDJ4Y^qh zU`T~lRiP-Q9s;~iQO*oU5~Urxr_lz`w*(c^B0$%odqBKh0-c=@$||N!7-M_{VQia#d2U{juM< zJw2MyjF8JeLRZbbeNLZqZ})f4J?Gqe=f7)feH^a;`om9RBP%%We~7RzXW?e<25zo% zGAHwKF2RTRgb)%Ej*x>Vo)CA2oTwdfSHc}~GoCZO=KBCvb{$C}4LyUn|RQ@fH2O*(sD_6J`-8k$dmt89PKMQ}l8z;#LBVX=mx^e8sbpG7ru$Nf z;gqJRCCrg@Z!#Po%_=IC8Uyc;MVs>q04$;eHB?pUC{EcSI|rPy>#{TCl3Qi>Wj^GVJ&H$mC?fbG z_}&uQ3))vg`#{%}&^4g_CA1%OZ3$fqx~_z-16^N2*Mn{-p&LLiE1{QxZYJ_)*UAE>Q<7`SW@YZk|Ar|GGLR~eb?})DN0f-3ConSD;DC}Wj|`5=DSf`;_kOU z{-f@3=j-+NS9DICm|XW>_q*NGEB1m@w~+H6b#qYR%7%bGfDOSR3`Xe?q>BLCQ}u!{ zCJYrJqL!>nrs1&Xfz3p14+qaJq9;I)09|k`spo(mb8qE}OX@kH=P%bGYDqm8^yLatmXv`XE|Xbpzr%bjlYIo{Y5Pug$!@vk$HJ|GQ(^X8?Ok26r>u`^GVuOO%6Me4 zOs3kq(pW!czu|l>dt|Td{}S)&m3?J>RC`xndY#>Jne5{>cfKCu->J3z#0f4~*KamQ zQt`MFNlTHGte`+l9!ZM|~%XS+|+HBA=i9}e9WfcioK_;GtN3SXA&h!tcsf46O&}?K74_%0B>L^uV zc@)WlpEW$3is5_JV6#g8QYB|)ieXunk^sYO!Mjw!rbVg>P6OEG=(I_T!LveI6rV=x zQ5irjQdNX%q!Nf4q=gtQlNN$xeVZaj6_rA|*+QR+A(vz6SPG$1qDPw9E~%*uMk71` zYzm`GUjjQYTg#r!_pj2VGd&bwk?RE=Dmf}ONKBU%K1m=D2&k=$$6hwOydrWkehWmj z-yx$w*lcM3@t*01P2;Y-SbMGRN}b-ic_Ka2ec0$eoD+{cnAtJ0Zf4^iW8{TaOuAkLASYi_9&P+h?}DU~GFKCmt^{H%{!E>FhH)`*PyGBC|^GZ;ahMIkWyr zWBrpk@u{L<)y{(x+h;cQ8k>4^;@;1!5BfnyU$s3aK3P=UtatCvi3dvQ=W=3ik?znp z7T#z^Tx*DH^ZxaDf5VJ_li}a=+3KD7z_!1*9JO_ydpus>Yy;=5vtZkzZ!1G=qu#kU zC-xPa-8?at6L*2MTWw>lb{PJS{PIqH$05Ui_;ZgFZTgCB;#GF##NEX#+E)lFbzH&j@5RcG=H zDN_rVxO{!nwTo9S-ca=Q&+5BJ^z6mIaooT1hlRgb6{F5r)ENO8VuK{ia-3HZ7`*>z zTq!xoL{R8I(SHL>@94k8?*rqSakVp`-yuki*8_kMXuf2;VqCF!`fc1_1vP103qa*A z(0@h$5UMm5lg4*3KzKkc-ep4rCPqN*K~EO;)Umn;MH%RwU{nLWnycPT%H*1gpy&O| z^8Uy2{ug2L*ZQyY&-l9yfA^f%)!>`uTwdQpLHJR;VdmQ?^#3$oE3sS#Eg3P{?k|AX z)n{O{`bR*LhM|BZu?T!f09$}h8Wy_7O97z$3Jq2{wA5oIw41@ruBo)=1>tT##I!yX zMO4X@pMr_*{3aRdDdC?5*zhSKN;XUtqt08@d1lcg%%VpgjzzD+yJtcu^y`@Yzc4NV zqF(_t_zE(|N&Pm1lsO2-nIfzq_8R$%yAb)14GILR+O37I3-?NOA8770=`JNP&X-}pVii0sJ1hL(D$oRCj|n_asIilu4# zw;)*Q0H22Id-gE-wXX@s$mM-aI7KdxDn^~NsB_E##+d_*KO6_R1|N{=MWMf0j2ZLz z0!T!7K>sVu;16j47N47Cuu`*?uxe-c*_B+3JI|B)AFN%`Lee>JEb^8GV?T~Pk@H`}ZgYcw^ zQDKV;Gjz`~bk9BT4B9s!ApSu28<6V`@|2?-}rZO8HnmdJBJEV)bfnL5?pjF z%vK9tWkiW&Xy2l+%`sXzKHF)09;;&d3pS5r8X#Ih6ej?Sd#h#zuJ)ktrSm9CF6cK$ zIUH8Ae6`gq_ELE~#w82qI$%}&r~{`mu70ytrt^j3-dbbHc9xVGma%qL*F#O+fC4*M z4xFY{e)0}H%xRzKf^ z;?iG=Zxqsm47(P=rDW%Kgx3TdP&#d-=tKkSf2ZBTe0>hnl%ZENi! zQPFNiqc5{}w$!IVWIG-_0Q0W*MM!J3aw?*)w{+xcg88QQ`%TN=$Xp-&{;0m@sVRQC z^_fpv_e_PSo1PmN^X-q_lxH^d85{aOY4009uZz!r+=_w?lV4+vr}L505#=iiUf^HGcwV>&T9`Fo2{j zyWT3(ozsCW)&^X5+(ZF4Bu;K!h^<(M0T`O=Ij>VXu@DyR55AP9>ELfu~Q<`Y`Z# zhE^Pp2jK8%ZAdG@aq@Is*^SgdfVCB%!3fZ{XdFB0@-vLyyfOQ~qlbW%&EcmGI4878YYy^4K{lhLBRs^3H_ z>{Co(AW7%Ev~8|Y;tt!zWo=&3K1;T}iuo4yzs}>iM#sR|nibn`JUOvxGB$Zy@96z_ z$M3}xvx3Ll_=lF(8?HA`jUTx0Uv(ohac(L&^~k;bdgl@S8)tNBP(KsXV`KWs3%~bY zyzg(M?H2u!gCDQRoeb%x!!xG`jMD?trw6A`#&Z6leA9~YumAmiecN9-!P^M&8UISd zzfym+=bks`KLR&B>%xOCG(TSH&EDGHHQaC4tl29#tTkIJozl`wkR%)rOV;5o?){SV zVkR87o~X3cQfsJaqvBaA$fQiC9E+scex6FvL8YA#m7F_UTB%Ra-4-e+$5JU9P$}e? z4mfd@JTdbIERA^ETB}(glU1rz&`;ZeX?U5-uMX(Wm9tKVtB=2NY?h;X(mBWKIp12> z)3Zl--X#eWduBPRr_yt*o^`ujK4PLG9;(>}-ZdiJOp)M-Ftv^Zv9rPi!Gy#;@R%Tq ziGQRumx>8e?u)Aa&BANeZ zL@|fQkPJ4P^*C~hS`(O+>_~zgbgJ zFat~eOh9wQd}1jjn#b0^190pUjYZgh4y->SbS$N7|GUMS>g$&hXB+93iMCYA;%^+x znoTbB z4YcdVl6O;5yWWaQwx6l2`z@U8cHwppZu<3$(xlCRqYYq0+fQxMHru8xZ8_Op_3QEb zznK9*YAD%F`n4U2@69~Cd*1uM|2=6C-(#cO>2J4AB%;DdgYGF zp;dXf{};HKof9Yc(#;0Tkvcx zdA8!&raarj<>4~k7%$_vK79>ZL3tZ~ui)+BGWtzUMa`ArGUfMj{O;f@!sUEr*oj}t z(FX_8s=_Xo>clTqVK;tp_gQ$?o5pV`!|3uX$WhM9T6lL!4)3@z=*hcjau19Q$HJFm z?ZZ8T(92*mcJ9-UD^%T*2rsw+s1e07sm*Bc_CtnFYo|M(W zapT-AT}M!#H+ECSw(dgBw+wk>G(6ZR*ilRX)xjmw*&w0?S(g-l5tEe|%>e~m%WUS!+=knG*z?o?GP|s-IINB4tm@n(4-7*}@ zmn%2j7ki=?1$uu$Q{KUrWpB?gAK|fxqItW#*t=O-xAH)BcB}O`OB1QCy!(}&K`I^@ z8Sd_h0aT5~qQSDf0kBS}LOXdkcB|0S8&h_YT)BO4WaQG=Xg5`!_oMp3!7#F*L)|6) zF+^hmt#BbS8ng&*)F${TAc!L@qsl7<0>RN(m{;m8>7THIvIP)CEeNnt*(G@JkoTxf z_Kxt%@Gi&VYqWNvR!-_m^xq)Bu5|e)gV%yn$EF3zwKiFn^VCcpyLN2q(oC!53C(%7 zq#BdfT+Q+uE3U7|*6hyI>`p%?)f`Gzest>mReo~h+DO*7DdXFe3Z~EB@tqL)i%EN~ zwmw_CEmONKH7?b*CmnZvHB-ChmaU&@%+_wo)NV?xl4^I()pn+b=k}f!Po0*0XR^Mo zjIT@by*TH)Aii`VX}`B3lv}pyZquq6``ntHDIvRhZ)Wx0^!V*YY4uZ5Q^(yv)AS2- zE4QWgXPb9rns=o;Zts_xPfCGPxu)ii?PjNKo-2K^cPx?5Ss)v@D?>gF z_=kKod~HcSOQI}ck>6u4P6nE(SGnM_4z}wK$9Hv%1hAXOh5&sSa0oEi6yU=+t*~7K zk>Nn^m>}Tiz^E`XfW!a;GM8f^oW8#BRvFO zTe>^|W4{b-FURs`_G|PE(#!a8U(eWJEMKOKIllbhBc?YLEEAg1>%4JbBr*(KBYJT} zz)2twCXu%QMF|T4`T45R9w8d;zA!Q}h+{*z1cXXSA|y*m3R+8GF9FrOF#^uYwX&vS1V^DRl5ss5wN#*#f{+g zpxC@MB}lbxbG1*TFC-lwIqL7NZOH}uJ~kOVmGhjTqH^BGd1@zjUE4Kp=9aIY*+28N zSl9B`Cj4^GQ$26s+%;348`amVr&rB1N;MnA>d?$!ddrXYe7NVf=Z~xZpjtfrf_Sc5 zI`)!yAuR3c6WjXdoEJYap!|J<$zw}e=F2%>-Q)|`UbyFKm|po_@Mdu482Z%MCN}I6 zox5|cwKH44z4O-2)VbOH(z+va>s}O}d{JC`PIR8nxwfS)rv^l4`+S*^Dm43SN!xrS z=WxFrxf01%1~Qd_>E$V#cr+qb2BgY?q#;-3%~q|>RIQ#d%siitiB+qms)I>$&gILx z)?{33X52FovHc~{wMKIF;7nS(@%HwNqf@kW{_>L*=yjApWNP0*y=4JtFQATkfc9TA zEe+g@D2a*?X@PPTY5I~WRshLKQ=g7Eya~{8kW+tGQ6d2#mN!Rqo!p}QWyo(?BEOaL z^R@vEG?KS30dh-_Uj}N+m&jMaSC$+Kj{@NZWO@=Bh6~i*CFFt1W9`p?3j&& zPL<90yT1y-Z|I)nbc6|T=P=X>T|#$7{|fi_b(1VM(INv z^QPFyC4eJ>y9ycg1_KTcth)&~T^<$o# zcvSyO;Ys8Q8pjA5WW)avrr@87KM>PwdhqZ89)2kPj+kC@dg68*GT~vKrZ*b5kBt%; z!XEOj$Z)R^X4u1ExBP>!5lsoL2;$X;6!d^)E+7>+szdnsaNNJ}cjd^$&n;BCcEK^c zU^xj}kO2pqvbu!rc-%|mlF&iHDFo`tY8o7QmG}=m!{Y)FRE{03!fv{w6&N&^9GdNv zx}SolDPXIf5IJ@*J|UlqjzudQ_{HOwKQ$NKh@FXro^w}E?!2~h>g!_Y`9bvhSQdoYJ za)~QKSSMv*NnvMCbE`Gf>=m;`Rk;-P7XQ z)1tHUQHS1&)LQX)A3OB=ap<}IS$8nw4$d^q#AjPYcTjR4&bm)z+$SV=N79nByTxVg z8GC!KWy`n6Z;gvPpB6ixzteIy<6kFs4<(Q0oGYfQMaNpvvi4!JhTaDwYtop`rB6N$ zmdH}<6A(J;>GAp4CSYsOn#08yCxKYuY)cq5NuW}e29WV0TO?uZ1EIA9>^EtUXr_co zI8@Re&SP4w+N~DHr=H-9%uxEy2A~9*B$+;8R>uh}!i0V+t;x(4)^mdvaiii53hq%h zVF4)uP9;t(O9x{NFqEAU05U1SSOL_p2X2BjE$v4Rb)4xwc)I=Yna~g)G%;kE@hb#6 z(S$V=1Q9I2ePx!zs1WW8gK|+=4%WhR-d05Y^R~W-5RJ)P35yVpjtssM=JS@mp25Kj zJ-wH-@Zx$Uo60Ha8zG#!00!f&S^(kEWe8wJ{}cgn4>kD`^*3s+*G%t80qxzItju|; zCr@5Gnf0_}JS{0}davX;p0s{s_uO^+u8vPmT$`AFR`Rc(^Y2YnO74BLHKO~tSbjX` zt(`o3?X0+BBkJ*Po%8NWyOOq#?B2UIbyHn4y6fk%%R`yvp_x~J6EAO*YIY@$=lshi zzi{mfS$}KB-F$%c6U=SiU;vZpgY6LPVVE$+ z6vCOqZc^5nPF>|%tC`pu>T1@)Mb%co$}~lFZ*5DM9<{QukIb4lV(CubgB@em!Vr0r z+Ees=?UK37CAs{Np@60N3WpL^tOU*9qKmhvC9p%wFpBF5{Q#kLi>{KnGY$|FaM1;Z zhk{JXGn**%_pv2yyiT2EwT{P@u|HgfFMqedRsoXw-;Eqb;$GBEJn|K9a_?8FEn!{= z#yC0{WO<-_@qw=8fr$Z>xB+k^ZVX}1$IDuTa1TEeCRqfk4P;?vn?H&mJX@qRJP@XOv?-6i@kSR z_*)I)z@Wb=-VV-~hNh$~*Rb}z6*pH%4XvMWmDb8k`SRq^tNnCE=~l_TD(enq z+@YCRs#9|B%)0kw-1{VVd-C8%Zhy{M4JO9q+G}gSvOakr=dGSRf9?GA5y`tAbe!*m zK4th``3L3cXQYh>Ji?2<_(C-lj~AGvF&)pB39d^tM%=XEQl%igo!w9g!t0-NUoyHYW!Zui|4jnmuT+jVo- z%y_y{YT6^M*n78m^-S5f?YHcy4lJ29N2KPXAD0=cTz_RSgW*(#q0iTIR`=VED-N{0 z{FFZF048mHTAy>&h?W}m{_{rSv*oQrJ(s(CFM=1hKx|1z5Ie$N!409L>OrK1j;T9* z!cYPb3p+cZzXT#)&?gK)2Ms&`S*<3YT&;!I$I)gd$aNXm#T~X#DD*;17#r>dk;b39 zWnillt0_DTKnIE`GJ4A>(>yPus30K7n;;#6e8z}-T4nMI+l8kkgq|v!5;^X-BfyfX z^1f3$<;pr6GtNfI*_8WA0VtYdY?v08Ej#r1nL zj=iE~uRP0UnYStIK$Qg~f#38D~gxZcLhTcBkms zn6YmJmB{W}Gxk<2kDSAotYoV|`^7^7%(m8}wiLulx^F>))uz@#U8L)Pdu`UnAb}7R@K9yp6?m_hY2{M;N}`)ij<6r#HO7tyx;A-5 z@yLgFei{*uVpP-lqB3xduf;qOom^P*Lex8ZD21qntf!nht$T6AoQC~JfmB#&An zCBla{ku^&2?+xx=b^VR<>*Zgs6#c8GUlzSVoHgE>ce;}z_u<0#E*-5v8dnV=Jk40^VG?C4pF*-MYo&p)6=}A!epCindcCt`TG>j z*H@d)=qQb1N~Cyxi_5fbx_h2Ol=j@GXnsw(sXm2T5#2W3?iD+q6T8l5I?sz8=QBsU z?^F7Goy%04@}zpxTT+n^R#5TU*)zABf80e?)XuLln)Xd~&U1)nHP^h4-I?Y5h$ugzbT5l$dq1Hkmj7ct?ie6olhuoP zDqQrc=(_(M1X>zZVFR?8jL>E>F)b?tp1~!@vl$vw252mmg)Ic+6+J5}Z&6e5n+>U? zU1jHO$ZKc$Njr)(rYaVtRUoahB#kt=Dv{B3;LBi9>p#f4$ay)??k2vjtp^>1CT}6=28!o+wVKnka zEy5o-8<=CYoJy%Z>gWJILg2hi!Q2clz4X%02+4V%vk3&)fA&9d0d_O$f&udZqzXw2 z2+}fkHb^oz-Lqq#4*R@`9RUk*xx9Cn*4khs9%i~c-6LZ$2!Z24tyiX*^*2y;G=e}2 z)x$xawJ*!qmrWhIV{e=ud++s|ucyLyR__KgE9+^_c$y{8s^p=&4%gMKUye^b{iQDu zSBXHoclzZS*Yq;Uzai`2obhj#{9A!j08>ns%P66Rs3SUO3TOfPz}fM~@WB@merAlD z^je^)f_c}Z(M$B;NTjE+c8aTj7`|^D06wX)eu^s$$b%+hv`EQ=fn?&1mmt4@-W~2Q z9mJh~sn!!F=y#ZC8x>a=>j@iGiKdz{Mv9N@QrR%VDlnxrm_U4iy);p(Cs!78K2(D~ zQ8ugtgU&MSUC`FUIiVMbT!?l({x=bu{2t%M@e2Li}^I7G0>J;;}u{V5dE*XNy>E{|d;a70{_dWum?IKsO^Lg%1JOWZ!IwU z^Jdm0s%K2AyaAkNH32e`0x^W%#LX%WAxanX_XT#Y z%P8~WlTaRSNj92?=sQ3G0aBgS?^I6hmvLXou{vq|$l=bpy~$(Hd&zo284uVnl4lDv z6iK6GU8ZW?%rU8I8&pZ`Rmr_M&+^HRYaP>@CC}>Qp`2^kWXrXd=_bjw3cMMIXG;I2 z*QTP=&wTAQ=r?9-HfL%!r;eq=v%R<5f7~x_>5ytpUR5fhCOf0}yr#>DlBcfUX!A&2{F>`H?1 zhMaF7y>j&GnYTJ}<&L+HUpaoSE|6QX>TZ3*bn|;_ZmyZxkvc6k?vUztX6yH5>i0?Y z?Io-rFM2xP$T{6fS(`F%mS5+BlgEgcCZ9aGp_3=78`l;2u)O|Fq&=(xGodfZV^|`O zA)&vl6PRF-k$Hz7;y7v4-q2uZqWrz&4<|WTIbv2gd==Gtf6R) zJOQl{6KRbAO<|jz@i_|cAa14Q-qJG~Y3TsdiS1XmhiTI?Ug<5paFp&D=a>Y4DtqEM z?&Alw&=dKkkcMQyJe=w=a>hu6OvC_lfTKV!N^3to#4|jW9*W7G~Yh z(joj~3{3bQP0;_Dx&K#GbsGYC?)`$;+yAa%>fnu|*N;v=J9Ap9+bC6U%2w~pRPRhT z&l;ragW2knnd+0`sdL%t^BKSJOCgQokS%mlq#(P$i~D>TtpF^oyp?X)h!!Ee%OAN^ z;+sDA>iQRGH@X$U8{9_@FSu5BU0y5@v47}}cUW=_Lw&>JN2kS0FW>PCl1Bi%cKGHT z%~Lx?OS6K|jtCLhob(Ll%Vd2SegU~hOO3%7+7_j9CBB5OOmKoRxO6IyQ)}0&xE5fE zUOvTxdV%W3`AWLJ5OA@x@&`x~euzL(O;YGOTQo8h8SD`vvGI7l)>IXL&rsn;1aEM6 z9raVO>F0m*e9D!2?sv}3>Ltg4tm9b5aZGYNDO#SC>AzAKMHn<2G07%AGcM0yr920Z z!fJpW8=}BQ0j2dtemmxpELW6XOqh5B;o({kQJq8Js!b3&gC>}O8pDKj!Zu+~!1U@8 zU>YzvN5Wj9jA2b!;^6Tl>fafjZp?Z&X1p6EZ!7T^>)tsxt(P$+$+Ho< z5RRIg!JON7*M+lx#+EuJx%NWA*5yXfv^LwcEz`73YT7}J$PJnD70ClvT~|*}xu#C% zK&1A6>2-!qxW5{mYMs_!-#)#6#&z=uG%7OX>#rOk#^Z)hEnJo7s|TiRUpe{B&Y7Cu zI-h!4a&8BM+u@t?UipG(segE>7dH3s=UD2pfyG5KuxP~sf-vJzn_X)W7YS03A5D)g z|Bn8xEk@`wp`8MddDI5`ztTGsSThB}8$_{@Z8OX%U7eUI)zG1M7gPjf4|Gj9McAGQ zA~QomuGdRuPj{R}`58{8A$e!%Woa__(2Yzz$($zDQ zUDvvP<3-Ukn6x6uwQT$CiF9K&bTkt>Dus^!iRTgu@_#(=2LpdNnC%E>I>KUKdEH)8;sv~A^7pC=KZb4-?O_A zY9qq(LB(t8>=ZC&BRy*y=RC)dQqs5HBp0hV>#S?FEA%3U^`6_=SIn1Z^gsCVBlIsXR_BjCfveu!0ctPqtlao8l#R zlUUyLi@T2MPdJ^m8U)t70r7(aS2H! z4#-joIZ7Q+q!MP6cczI%3f@%HeTwFt>r8G+LX>Jw#XeYjpKj;7bSBfv)WNjpgX8lY zZfCdLr)a)XXF8#q-aOAyoN~)?+Iycp&zs9lE2uI=X#Qaj_BhVsM44An5pWBxwmc9$`9e zfhoB)Y$ag_gc4*9ZiARZH7~d0*5?_QHlNdTaLRm>tN{wgYwF| z{7N{|&I9AHdz>>rog4vnbJbPjUuuterxP_2aAVnUqt)5iBIZ&qdlZJ9uu z6xb~~_K21}^5!8vZ{E_QI2u?$Oc4&sW}_M48>EF^3zI2=XH};ZXIWuwpa$h4<_Op; zg>|8(W4S}ds3Q5yPRX1wu$YWA)va92u4xFWnzu(Z1rK0c7g{Kqp|Uo}koL2-q1}6X zN!_K!wR&bUt2N%rVhLtPRTLqR=_^Q{#h0e`s{^7B=lfL!!Unpu2}7(PqWJ7HqT&yq zxvZ<$f3+;{e%A>6!_&dcSK@V@ifKt3EMN<&-KvEP@NmVtofhbWiZjfug<^*Kp!$Gf zFbma4P+YRT>~O)bHEpLNr`wOHhO}gUD)bc0Nq;tq75$(}^-dCynHVsN`S)lm@8XHi z47J1I?kJ3LffYpKO(ljh?3dCm%cNG6SDsrE>o_)Elh>&JXxdzbadQC{urEHZ0Yj$XJ#o?N^`8DYh@pP!1%ZmZ@i8 zdf9Y^NWZU}Ir!}pw@zf&KapAg#O$iyTYr0hw!Jgc-YK3rCwBKp?H6F~FRhP=>tOzQ zDd!4Id)}+NS(k0tnrYaY3V$#1L1eb#wjgagEuMK^YB(zfx>hAFE$?#od@SD%E)-s%8W-noYO;UFIh)J#?c@)ZcE$5Q)8l|L2|s3G~TPOQ(Oa> zf4e-@m|eXyvwCMbID1-JeN<{XMxFtl{mmC)KGeJ|)4VP9`m7)|AD048erz?7R{)ci zR{%oj7)Tt%)DgEu3nZ3mD{Fy5^_Wz+P=*QUBWnUi$ikOsp$tT+f>SdvW=ZH-Z2er| z3}aY)@wQ^kMK?jL?xoE~7xbmyqyhy}CHu_atP-++$NSC#ID>>3hNASZih&kahrHVe zWC+hvun|GrSA;ZV&!}1*G6OnhfhPPX%KM)w_%9UvR|@7SAb=ozj38dO7y=O22AiDO z^~+nI5Ddj8P8P$lO|G%O!7?gt?Ep1FyIJ@v1dDVCVS`R^sI;vTZLyLg{-JCRytwE; zM~&FLzGahE?fkKe|Bqit!2Ht>Ceg>6fh z*0vmG+j0a_t-3&JnfT0e;?PLOF)CU{AEppVR>*eQ_Zi}$O&s%NkVd%{UF3IT!QL<} zkXl11NE;Q35x$axN#(`5Xd(PSw13`BeBuxM+<@ZS(4a##rT+8F5dEpVqHHngUWizkMdY4I@gr!iS~tu9;D zlBsG*8KkN$N%Kecs=KfSF;BmI)B0Y;&5D@_#t_&o)$PgF9mv!jkm?R4pUQ36JUf(e zpApN?kkaw`YwNSFEg9Dqn6|ifLL?Aem+sFv4vUt<4+C?eXBaU5`=EtNMRH4knG&xR zsvf$!ZFxf+l`%(dT7ciEVd+aWr&eB|Rw~dV6)-LIO9co~3xr^1fGxNq#iON@@1aDxLPuJ%t zQxGDuw<)iKD&@Uszgey0!CZ9p2Rm-OY4hkiBJx>E30Ad$|}_NI8n*3 z&}xYfButEGX;@;fmaKP{uW^ZdO$&R#Hzz6;sI-!mgIXxXB}9({ZQpbsX;V@5L0g4z<{K@@HPkR+Q9AVXqT8JTF@%1N%2gj)|WPt#gWlK?j7EoA5 z1%E9eMZe%L_VxeEKced|_x1O&>))$4f3h#WUZcyH;MmBB(vdYqg^@k5!*1=1>w}^A z4vk`J2dL~29Jd6RE<#|9oGz;k?1}H_fX5$&2^LUAuK_rF2?v;{HGs*8!U>T&a(J_g z_Ku8(L&Deau75@g^?`na;)IT9ap3_445uaT62n>JzT&zeHBrXoi?-R~E(~Y5e=xj( zrNY!G9E^L4c~#;Y%sttEC;6m>-b1+eQrufYtrwGJpEhs^8jUhbK{%mMmRmdkFMY+8 z8Bo*7Bi}0+ARmHMj!EE}soM-y{WH2FksA|k=WDuQNX*s)l;+raV9IlF$tk0^Oak{~ z$}Upy6AIcWa8kh7euM@U4V!}QB9{Q%cg3Tqj0Rg(yp@;z===aB^Cs3hll;NWX^H*^ zYb;+m6ah!GpmCIUDyFstH4&yFn71n`U1Sj;^CbxTCe2>jtO8t5b5T0I6pmwQBy%5a z#R-?SnilgLi@$H8%C;K_(zf`q-u4+%Z6}q{KD~}PdHaxAQ3s(L17p{Eajw5i(cW-q|ZspqC>O)XKCFghW zC`ZokYM5)F?wMi9y@z?qx%&E?edP@Q?ZI1v+0gTu(DUNi?mMBE)Z(!P#mhY+v}x_@ zpq%z@(^TKr*Ujj@){<(@ww}tgp1Sk&8S$B}>@(*x&zvXQ>w!V(nIY-v;XAD(_ttIB z1w-?CZv9a`Dy(*)KUJC~{iL+{l;n9jdFUgD|N1eQcTVoUwma+IoN;eX9mQ~FJ-=V~$Xok)hRyRd3)KP1fH4oOt((+?_Iok zk$GBK)h4doHP^6vF7S-xd$!2)axI^_I0a7flB_Rnsx3IPZf@;U;?AeUV29{DnRBh4 zu};4x!eDYCkE_&gp+ac&GD3@o0(Vt&wrX3ZYFjD_JKsZM)i$Z>bkcm6oC55~xOb%8 z=>hR{Omy#%++$d%t6OIK#PCqYF)Uh!fBDHWuHjjDZN^5tZLWLLywH0g;nCPt+=~(lQMv|9o1Mj*9)j zyhD@L0Vb!_^AdJn0egft7-*^!FtUNE(LvBx=k}74VF`_6)~w6&*;q=vmA9!>rk39o zmBNJSP*HBD-C_xIvCw-sr-i|c{DuKWOje;ECOTSgtMDZQ;aRAb5^rzO6$8&pzIbOzPqk|+c=VBR zcZ^bL^RXoz504R4lMQlLMY5~bq{HfYtKqSIb&*41ly`qiVR|ko-)@9=F!%@cBuu17 zu*6FC7W<^oB4v+S14bC8HD%@b zzhNl8y@~Q+cS)aIP&&3K`9K91-_k@m-bs1Cj%jz)DBjl?jr0^2A>-!8+b@hopzWw& z-;i9ZUeFX7bO7#y`L+VRvS(#f`JtOR#ldrt;L@@TV^(1CN|iM%`WEsAO*(j`kr0z!=gl%T1i$$Dkx|x4-g==28i35ry%Q)gX%1l&vK*PUnKwg(4;l-a zpJZ|`_YJPJIQds=VZ=g!CWC}?@s({V-KF||CL&Iu8&%>g6mMw@$aNQgWo}8Abedf$ zTd@`J^St@Q$s}q-w>ijF*>uyFiGSrvxq$AW>hV2upNLWR| zB?>GERJCp~C4bF8D}A+DZ(GLO zmfrfKogeO;?G~SXUfOk5@^&Q;=j~OwHEWYcVDEOHtEuo^HQx2tPHnldc5D%EbgTK18D89Wi~ zxw+??`*NPT!iNR6WNNmg&dwU~X@RR|a=Ult#`D*opT3yVOUpM)HCwVZZJ8Q)-rEg% zZS6t*Y)E|itaz#m^4=G82goN>=UGPfe|M`Jb1PQg zZD^i;_Pwr~T`9A)a{JuMed#Sy!xMK`1!q=$d+n{Ysq@euSbJ1jbu71GORg#Ssoh*t z`_~2w5N{9Xtt-|8%v#A|HBpW-R;N)NJ zn;f_{FkOGgxACrbMb5qKuD5#1ccb=t?et-(X5Cy(+stc{cNfjLGJG)m>vv1FdvXnH zay6@GEYopu)3c)gIgHC!dFAk@PRv~iykh%N^v-rZz*rv zCD;(lxAX@S3OE+a=a9ACN;rr{>r(t_>*C&lhv)H-!}!0d|k zLI1PhQ3obHdKm+O!ZoS9unP*;@LtN7O_?07u7hrP&&IsLS=(?F+@rB`$Si&p zK9L{x6#X{5PmA9Th#zFW3@6H|fS87FY359t97>C+Hl)C<^bf_~C6~&`^r6a3!)Yr1 zDD$hCU&(wiRP>N6D|irtGG4v#SX7yU5SQ8tLhs#Q`Ev{B@LUOhxqsfuRd_zGB>0T8&exjpwWhYF*Gj%aIN6-lQ>#Ts zqiAXT#iv%z3CnC9RbBn1Bc$tJ^C0TN)c>Am{ef!kpHjLD7$`@2a)e@)joHS&h-#YxrGO%sp(R&o|i@Wx`_-?~u(%@i9ksI&wl5zsB|WIM3H`1BlHi3Pv`K zBSEH}ev9r1{Hqq(bbt!)QYy3Lr@;{KU4F4m^kSK-p~cL0&2!~1>21D<8t^ukEr&&= zXZcj`lyJ3!Al7jm+{Tqxy?x@!iK$j#-Tl}5Zwy@@n(Cfu2bVl@D>Cy!T8~e{?D}w5 zdV^SV^e5%V2)rHF-2=N5nzmD3$+1GTtdMO7R-&l|76S!ckAIBzm&WyqDy9nTd!&6E zK8mI3c#@!C!E3dd;ZkKw;BY05Ygj(Wtnt+p)k3qpzrYW|+l0#&VmC3lCwqxwL@kQ% z03A_3{yQeg(ua(UfacoCfF)KCe-dAvi{Y8PszF1=6KBQh*wxs!{ECfheKTCB8f%rm+eO z*w5H=a)mcDZ=wfppvpA$1>I(y!{;kl-|+lhq+^7osMmMsiy=!k6B-MkZgFY>GAGXu z8pD@EQ2NVlW6N0w*3c=D`Ql>SFD-r;1b}Ns9+@UD-5!hxr^QA-gV~qxq6@c3Gi?z~ zY-Ta+Q&6c-Xp_8-#t7s+>Vpz+k3#GIp0h3I+M4R0+jd@TKQC_W7M(BUT%{7BVR7_z z>6tHp#C%3}lw7r6pL0fXPFK#^3Y25cxks$uGp{IX5qPu}z$5yx06fy*7vfV1-A&iA4 z(7`3p)|4$+X_SjCRPRwS3O>eP!J((ow1FIYA|i*Lh;BENh3ba+a-C`K%m`V7?wv&v zqIt6mK0c9zNIdqU9QTCD0jG_8c)qNg#-5}&4I5R8$!q5k<^q&rasf*5{F=i$(}-@` zG0(A^)WQ4m&HO3-ZqsUV4vL7JgCd$w=xR(&Ge|=;i!?;@+p0}AGG0ZLJ~P|=A)J8X zc7BV|6o3!#{iAA diff --git a/app/modules/agent/engine/graphs/__pycache__/file_targeting.cpython-312.pyc b/app/modules/agent/engine/graphs/__pycache__/file_targeting.cpython-312.pyc deleted file mode 100644 index 6fd558052260ead471a404783c538ce2809c116f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1732 zcmaJ>OH3O_7@mFk1;!L?j1dJ45wHR5rjS08s#Qyxs7U2d(jFY6?aDJ4oAsl!3yGa| zg;Wkkja1-bdZa$ zg!cA2Wjb0+8+1^nGbhSU;=Y^E(0vuhk&#Hp^Apn#-k*!8bNSci-c~}>?x${Y8(+8M#d&iFUMM0HX>s+p>+c1T^lY7MJJVz^&Y(?H+wG8C{uTgFl7i zAe7onoqKZKlwvgc6(CX%(8g-|^3zvV7q2Eu7#UrVH+s%b>h4V=glmu{%o&>tp@b=gKl9cgQr)q{uz zdSnn+OijZCR1KsP=Orfgn1<9eg1U`T#~SV8hMLWWQyI9aAw5iQFKvWTI-W?Qa2%`I zbv?XBm7q{>O(}%3InqyEU^Qm6W*d>_gD)s1bOnV~U;m1lZD95K58Q{ZpL!;%p2;Jl zyi)VrD2kRZaO#_?`le2O;i@luBG!C2i>_y$fYtA}0uyIIaE=x~vIa&=nf**<@{QWS zo5g#Ur*AL5`{j}UG&o-k&Yvv)8GOs~j~w*W?UY`3fZn0Q;BMj6GhX$KS0?6bo`s5I z;hcs6h?C`}D=9TgL{{z?6KK0#3icN|Lj}t>uz2whTXv;0IHhWdJc2}^R3dDk9FewEZ4>G2Dx3Nl z!vl=nrDZZ3n^}bwG#_|T3LQ&*l&f!0vkjhk`q{Pm0;TAF^ypeysQG4#F00FT7^rrQ zTm8d_k!t^RrF+`y89eP7srHQ2dd7-^H8k;k_}g%8Xyy#?&R2Jrii>+bs)28EySc9) zAI55)pyeMv=&nn2wQd8wUOY(s$u8nhl(d>cib7n9(iA+!-HP(XrmD48c#P;H$)vJ0 z4eVx#3G}^TKSLr+#0)%6;g6tkW+QXVWYRDU=$}%v11#^z-Up?n{iVw2hc)lr?T_oC zQ@UB6uLIhh%s=)1bnBeK`hZLF9^Efbl#R0dgHi`{_;m5tYdO2{wYcaJ|H!V=h%-`XCEYm)W; zu2?T7x``#y0Rg&+F6jzgu`8V?F1pTwb$&9o#iW;r5Ws9QMhCi^jM-Sao4klle-qFC zK)52llStrQJNO)j_mZE93uH|=c=At$Tjja*fynMVayV zV`(l_E)Hy^)X_OJMtzQ3&7HSBms{#+)b_`XcDvkcne#Sv%V=cBD^sUoIkep1&T`A~ zMM~|CuhFLE-EkT_j6D2A_cav1!tEv4%R=^n9es35A6znf7o|3tt4PB{hGor|XPjhSqq3`sz#bj%PLL(~Pwka{XPDu|ZBf#Hl6D;_~?G$JkMJ z4-wFqcYEE|sEOD#f{Ur!q!)J@!xg!g9!XS@A_IsJ>)cSOBt9 z{X)yDFHi6=Aw!$4!7eU_(D3`plhK_{uwyvJi<`TN0)Ls1AEEp`Wbpk3UibkjKjn`s zpIsSQaaSj=POP2YEIj^2@%rSK<*z5Vo|xJ!Ol{>~+=Oh9h1}8Jy@gwvMuvLn;Xp(k zBtg{!nIi=S0HiZPnj;m``sKk(;{o3jWFR@Pt8?^lOqC{%+-;65c1H!a5!t`C(4V!5wgd4l{fS9q8nvVQ|QCbON?=9P| zZ_j%?Fs5wJLoZDO?ZbkzIO{Y%3A@%&Z$Y?CI58b&q<-f%s{t1NEg$V+*^>i)!@;X zT`XpD1-9gInX$7x?`L>E>*jeTE9~MOnJG5TYKg{SM~bDuuq-$4`j)lQcRH7mCS<_+ z@;sP({CHivAFshE3DiXnD>-l-^R~0-v=RagZy`*bfwK*Xqi{~Q zaYD(e0$3~U_Ka0J2>}QTeocW;pye`olSsM@qPq=W~~P)SSAW9FH>+(jjvYO8d&Av;Go&DhNs zFs8N{3)C$4ca%155>MYCOuP*KO3xXwz$aaR$T2YY$WNW;50bqn$V&EZPi#$WU)#D? z8GVvWwdwi`Ijht4pnqI_s9*gLx;}%YpDUsNLDX?Eou=wV;yOW9u}~DfnD{Y{g7{Lt zshySnGgP%fkS^E5GpY^6|KDHK<#A+A?O)$jDlD5xE^ zHk*#&bI#j2ZdpOxvg*YE{DftFvSfR8M0CR3K!s}6E?-zl@#%^lz``3A7s1;h0`D|@ zC<3Y?2@N{(2ADNcQxtumYAE_}d8$gF+k0&y>>q1246BBw4?mFQTU#qt0`A_>TaSA7 zhu*DWP)#U$s_fwWRE7PGU41*;0E%m;Q}8_Q_--LDN9=h=;JXzXm>}lg5!_~OJ{uN9 z@hT2#%yoQm2`AwSLHC)0Ck7F0rF3LW)+xFwt^j~fN4^iHs!~dSC7EBy#ovB{VWgYF#h@7`7p^?%8QLe^;XeNY D9Y2hz diff --git a/app/modules/agent/engine/graphs/__pycache__/project_edits_contract.cpython-312.pyc b/app/modules/agent/engine/graphs/__pycache__/project_edits_contract.cpython-312.pyc deleted file mode 100644 index eeca60adf8f64efa0584469042a05ad8208c08be..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8575 zcmcgyYfKzjcCPBKs(!zqp#cMKgR$LUgN^ZXJRZL=*xq1|u`_GdcDvnGyxep%Rn6G2 z&6v$hlAejBfkYcXnXE}RN^ndxXq70F>}KVR@?)Y%Q8mSGw<|~)DT);TYa2^DV<}S3 zxz*J)J$SqmMY*QWeV=>l);Zrj=am1&;jmJWxc~goz<*az)PG<_Pi(HR8iB$z#Zx>T zp?WYkMCc(yk73BzW27m;V4ylE-uOPnGY<{goQJuoJxs2bgOoG8Rc z#Auk#JqBjT5g%*y9U#+Gf*ORpI6-UfpbLATl_{)iWoSj7MG0EXMNLrU>5tiNDq!e( zz=|fQixwm{Bz7bYByJ!9T4f|5(ktQC{VxuMhKE~*V*E%%kXk~0LNwkYMEl?*TKdG$ zaKF?tEXD?fa6BmR192%B&K+X&@Th7ENkM)f93LxNcfQTJW?WI)3uJ=&!do$YX6j64 zOGA3gfz*}*nQDK!dRMA?SEj1=e#>l2rlR`3W7hH1#<{IoinCZ(VHyaLT{Q=T(a?|( z464>(P}?Sy?ZM#NBcVvH$0)@`)fI%76ph70@qt)W3I@sZtHuF%=j#taWpK}8DJ<}S z61|X#B}nk32|?YFP>z0^`oijX?@XqqR%Xg3C55TYR8&oTXR=;lsxsvj6K5xl3R98s zmQQph!wOTLWlXGf#`~OtOk<2ZH3-P_LLcsyaiF zNbEMK)J;@8Np!;Cb*h5MMO5Wqq458$Dxg3FIbrF7bc*_j4jcNYu;CiW!#JIw2T_8H zl8%m3hI?KH#*WjVcw9G>Xi~dPRFD%l!#vTCqz=heBt#>(Ln&bT=6)ia0fXp)u_~*b zA%ceAuZb$k?pQ_f3)J<_553ZxK-ToGylVQ^)U8Y|tE{Qm9VS#qlg0YgGds2UOE{zuMtyw2GbaEWD56U&kKkiZ>8 zi70agk6eXS^4th-Diaw1UBx5N)NK=%@M*+qBx}l8i&Z4ZSvm(qS4O+*y>pq8s)^Id zlc>#UZt60z`q$92 zrkni$tv{xFjJyGFB7x-@_>p@FpS9P_bD&cu-Xxfz)xw*{0DXHIa{E|$D`~amTWv7b zUcf~k&k@aZ@D9S8h51g@RNj@ZyP@uax|#O~ZoUM5rSM|~cdwQALZ4^U94J$rx;9@3 ziIN~5MIBSE0P%Qzcro$(g_!4MNH93|6m<;*Yn%h^Mu96z2~NkxaZ|!1(f51_b`URyqLeV{<7nz$ zfT0qsv<*0JfCLFc!nk12cQI~Gm_^S^c$(LECRo53t^jAa1UKj^+5}X;hBIpz!vV$^ zyU?bBD;rRv6^4s@fdtH|bwC=3g832+3nD6)YU~r@ViT6U@Zvxwf;cUIjjNm{8)^w) zcO-H%6uy=3(@@AlP)OW^i{w`l_aR4)FyvKcATA84X5BPU%{nUyUxZ&z1iMt0Od9j9 z7u06b+6=>`9|4)5R(9@Ry!}ti^3L{2)3j~MHq$Y8aoN4&^VTGr2{a|Sm74AI>_U9G zrfsVI)4FGr(Xu0XD&yOf_U%sjb}xDr-~ME$>hfjW<Xjxy#AG z=9I5_@%HEM%D!gBcRktpxM1|Md;1qndw%I^ookz9rtMSqA3B#@t+KiGE64~8e&+F= zXktXXTf4$}0f!o1j6@NZq4iaYAkm{#Jg*3#6aXH@iKqFznCXJFk%;rgH6wl_(bh$3 z+>kK*TI;eKth<5A=zQ^Kk(mcL5&`V9fNA)jeyFH*PL~I&&PYb&_# z=`S_gR8F(fRI3=eowIsXBb3EPm?oiY>o5qpX2l(Z#K;6ephbXCr5 z{WE6S)sQLmt++}i+olgr9h^BmcS0%MuDEujUAt2*fWJjaalMvy9Z$KAE3T7C=CP|3 zCwRP*m!`iv_1&5Nd4p2cq3q;B@9R`{o{_sR$u~ms(D2N8rTT5zT$$On1NfFz z;x6Ud=0(`%-lTP9OVj+>pE1i@UY|Prs1?z^A$bzkOM4qq-iEob;%!W}t1hpO_QEgR zTM_LWo|+Nu@u)UuJY|{EO8hI|oT+WeY})cXZ{KPbA==FApd1}%0_6+8CX|Ch=D{51 z=2AQl>Hq;7*d`kS{QnXTbqGR`huxs#Rg?fCLCvAhQ`7;~m+a4|bLAPH<+%k@9w3eJ zJOCkFyz)uS-|k9zB|ppmF+c0KaM1BiBZX+a=_XbmrkzfM5*0=BgyK^ZHG4v8(;wi`&mxrU}{ zSuh$CheDBoG4LGFrw?KbO>_AWWW{qxz5_%p4@x7$!!a?gyZ>aUB>o1Dz)M8i+4{8u ztOl~Ef+}-sAj)gICg_PrOwd!q%`T{pZQ2+&$=-TkfaJ^LW&OwTW!F{!fsCs(?Fyt^ zfra|{@F#r_`WAaXy{R-GR~k>G8#_~tol4``bmN6o;{~PhqT=dKG8vm|GM@Ierr^)k ziY#&vcJh;s2OV--hqAL%zSu1XZ^)4-LRbtSY{gxJSX0}wQdvFIegCc5x8|-dUQ}uh zDwT)Qm2adf-%u)#ulTBF_TE1*dtmO!Vu`Y;P4VqZ`(8`=UQ>Lpuas5Hl-~Ev`sS+U zFDjM00fp0L2U2ARl(Iw5ZJfuNWV24n?)m8O2Z!a##wA3>u+ANH7}0*?YlpDmmGmNX(wox569qroCmrJIJMtpAs}NIgi>*Om}?j}CX7VX z=$y?*4zbF4)LFbr5a~l2em>*&aW1d_!6!*vb1=7@foP->9#iEf>zZOaK4@7$fQ3T_# zSBwp57Gf@_(5%^k^{}ScfCL>u@NDtk)NlaJyRr7}foNYu*oBb_f6k~w>#~UR+aoc+ z9={~?R zsY^TSQ_gzD*^o4@*qn;&g7xEdLUhmJ%(|(P^0cQhgm#XBJ~46RLehp`OPEC7 zPX^D81<$7%0y25yOP>qhO7aHHH=-PbW`M`h1cYm7s+$7+1zpiFAi#`SZtVEp^&8ik z0yoC&SL>jBwGJv*>&7hGp|Tyy+eZ*rKYIw(&wdK^&weVRhzA%VWvW4h=(;3?#BjgL z_KC5PVTcP8ak>ekR95qQ%n)t^M=45za-^iPL!mg#v4lfWegK2?5F~yS8go` z8tct{(jy3^I`sG_F&)<8qY`}cf-gyH{UUxORPFk31R>Q{5Htqwjz4{h57p4d4jM<{jEupN83D2a--8`BTT!MyVmE-VcRo%CatKo4+{=Ztryl zK12rebJz23s-9X4_HLy_mIg~=oV`NbtG`X%FFini2d%4Ki~*E_M??qH6aEI{um^jHaxJ7lL>L2?_=|7|mF& z#wz+0+QqR8OGuEdBm;S$Qfn^DOjVX~uzP1NWhuz!C6YZlNwUvR$!}i%=d-KWldavv zTIb8N6l8MSsYmft+qqS&WDl3HWpiAXf^7cvPuo&WZ>(ZDyQ6~j&Ua@i$R5>`Og`Hq zUkjzqhE}mL+vZ|R=1a2_WQ(P%m}Tp1Y+!zGmV#_??>*o(Z9#^+gG|2k zmX==)KF7NDu=t38ggj)bE&qQA1W80$70K<*VF`mXDs0jxyMOWpL8)c?-y@5vo~Its@<7>;RJMfYPtF9W&4eo>552Hvb1c Cm^-8Z diff --git a/app/modules/agent/engine/graphs/__pycache__/project_edits_graph.cpython-312.pyc b/app/modules/agent/engine/graphs/__pycache__/project_edits_graph.cpython-312.pyc deleted file mode 100644 index bcc97b59b6da38dd557ffbc86503b7902d116abd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6074 zcmdT|Yit|G5xzUVjuiEvo~|4_bSzt6zaU{1r`cH=ht3ouG9sH`!q{>N zHpzv#q$BJ|I>SyDd5(lD=?=ST-OC~v>sG$ zrG}fVL4_MR<`^S-E;Ay3lQVfuSvKVT8i}EhLw6h*dQo?sJay>RQ@Zb@5>cdMBr@`L zh}D~=WLyzONIFI&Sr+7MDhk}d%OpK4MU^9BT#=8bV{v3Q9*RjRg-)bPlvu|T$&(U! zCmxle#?y`3Z4yh@p)&>B2(uy+=0rB^5IM;yIz;Dbr|7!u47uhu#(0&{32fE&*8(_V9pc};osX=U%c=~L&*aW<$tTWWCud;8L zZt-X&s-#KwYdlchkw_$UH<6SKNexBKGp5^fK#l*UE~us$#l(bR##jrVF-9nHv&;>4 zD8vyDNb7DPL64TxowAfTP3nOu>%2=NyIh-f`zI>Xv}RRBRI8 zmTvMV@OJi1Dy5^aHhZ2Mf!ZBS zrxfX&qWeb@k(3a9JCce?vfd2#AQA9l7DrNaADR%*QuK`Oe=8GDhyr-DOhO59x(h6q zWU+~eS#Vo^DmIdi!{Q{=Ku})^Dw)nlL{UhkMM-ahXIH*My-@KIEy6NyQ7715qh7GT zhq1OK#w3ED3%v~=1^Wa0ji*zQ1XwcetwSK`4D2j&8s5#e8o>kCJ<)V>B%Y8$4uXn9 z)*{noxC9gk27{!9^5~;S*Vc3bbR0$He?kQwpsDlvV4-RAxU0z5Pc&Ra(Jb%;@9GgD1uwkdRVdp%*%i`H5 ze`P%78z7Z!R{rPMp7TKG!>bzRRs)_p!!>ACW7kkaTO4oQ}6WM0PBH6ib=XB2>}9hNC!MGz zC-WAZf%*xBX$CL@RJ951qu!wQ0U$mHSgZGdc^`g2+}AFtzcaeC>KEq7taefRIVy#E z8+9cQ|5@$*k}iM_z28T+z+(tH@d~h!LAGMG4XR2&*8yjAV{Jg~yP&h5hY4jgcNAOC zRihcw0-@Z7LSU;6&13M$V(*Wki<-mOWyODVl4nqA@ode6ehgPgzLMui?M1=1G zLZ8EbM!iREwq&6I8%QC{w_)HGwOha)`uA*Ls`pGVzXwmL023LtzpO z!;C5e-B)ZS)sXgUf&RR!5ZGmdR9!oeKRVCve;P1dyBwzF&wfUMV^DtuSj>SBodGN> zjMH+i2%YvG$jpJ!qTEGv)PN%(j}H3_z#C=ffPIOY>V5Rq7wNj742INQP?mA9?iqE) z#28b>3XG9a3*+@LHriDijH1Rc!p%b*#nN(#m94#1WN2|yjjK4pe&X1%Bd_Y7vk{Vtr((KWP7_5EbtkS2_exTV?1Me(4p||V za-qFa)GGA~gRUoq%T@8W0OIoNP@%`BxlqwBLALbJ-#oc%YX8;!zdTs*uY2fkoODn5 zuKKR+&vB6cJ!smNBL)8e@IQ7;9-VsW>Py$o<(dnvy$@Ok@*uIj;NS6Wo!jf9Dn{@Q zDHOnKr&J^<34-nu1moHY`hG$9X(o~|M#upWC8!ys6{}5H(WKic#-j?&2FN;OV&p;A zV}-7cd><<`D(Vn#Fvf#1btR}8pgO#_lswO&Judq2`k-_#4Eladr z^m|;s>642LH2E&t%D&Jcaob%Yy_7U=C^xJ$ljhF`ifxa}!mTLIc(uZeuO>D#p$)hcl-fkThEi%fQK$Y-UHR5gJs!2GYx-Z1~g{iugtMW q%qx$WLywqkUwJ#nI~Kg1nz!@Xo`SdQg8Sd@H(1v9F9vJ6@_zs#^B*|? diff --git a/app/modules/agent/engine/graphs/__pycache__/project_edits_logic.cpython-312.pyc b/app/modules/agent/engine/graphs/__pycache__/project_edits_logic.cpython-312.pyc deleted file mode 100644 index 3209a87a265cd8bbc8759c105e2d9b79f0eca332..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 13936 zcmbVTdr%uknjgI%2qg4C2n-$`#t4iY1AgHbcEGU{n>cH`6^W=7vC+ZyQ+|@y9%jFRj9qasu9CR@+_%J-K#cL_Xjb#y-ohQ zuV*xpfWai!1wB1I-CuWq-Tn3N`@Yt{6c?K@2zUPcozOovW7xl=7ddFNiPb?!Oko5@ zsKQt;daA>!5p}Oxh0>a^W<=Yo71P?VZbaX!7t^}1VZ_*L6w~^!X~f)X7So1s(TJtj zqQcbJa~NU#F-Dl)Q%f!N7LTjE<}cApk5?s>JR6NLR3ONl3s5vkL5?+_!vqJ#EXO%2 zIz$GUZX(3c7e-^TD8-V_&2&`94s7MW=CN%w8Li=MFGod4OgqqaDyB^*R1@8uUHx|4b z;oVg5Zi07n!MhpWi^TULQcqY&3(zelOGv#3dH`>lxBL@e&`vcgKWX*r=_W*P^*I3AIwfY zO(CN2Jr=83;wl-2-R=(7R*O z8u628k@&-iExy<|Q1yo*A;#~IS8QOLPyS{>4ef;JHkNU^6WTXS%jL~{c?+b9mn$0i ziY7=|m&`-uv}exgJC9)i^RK&S|{ydfsko0QRn zFuBYv6%89PgiUBzY$!KBd8$K*!RrEx%I0P;|B+R{m+g^E{inK3sG9P%&L3r7CPI4zgMhj)n@1&=JPBG#4`UX7skJtL@Y2_+Qy+9*jgB!M>BAdS{2j^Cyb2fj5O zhV4Y&icv@7?Hl(=kz_d5iHK4o8E5Fn!dQtK|kFbOS_x`UCc-+t}icKJNU5 zWMD@BAT)b4-PWCI>z?oD+s^*3;cRM0-#0Yc?LVriS5assQ`;c=5^X@}ty9{(Ydb4A zq+BE}paXu9seC=+-48XzEm@*^=L=9s2hW0cSII_mp?iJAFDy@%E;K zA>;H+ot`{BJv`IOJAI4J_SxEmDdVZSUv;l4?P*PUT4xW=5$U6sQb#Xwm#_0jZ}1*} zq9o(;OkJP6o_6g^x%SPD&6{}F^9l3gBF{T@Jj~t8fu$XNOSOF&OIg}dm9kV#2a?W* zRS&AtHHT6)hvs_tnirNVXa1vp=S=mY_sCppy75G+@x=VTg;u_?hp&GzU4JQ6e~GVu zd9nU=?y5h1l}cTuI6BT>eLYjxG83GklE*T2^kLYKYQD_V>`dL68O2gcfL^RlF_?p-EpCSZx6Z zwwzVDg)Qq8%(GnQkwfn1gpSn}%qgIN?=+{%v+m5#I^hy$!>h$6^gvO^>WQ+q)E8iG zRO0-M6{NiG9!ZQK$xqdxs2)W~HVOt&@I{!=v=M})TFL}T0@4t~R*WKVhRCstUy2w@ zKN>@_3Pfqe$SBSD39=s`l0Og*N5??+_krvlrUm;*;Ff=IG%`&4V$Py?T7!5Ok zmJnU9Rxo76uqeue;TC*M^G7BWJQQqU$H421;yT38kf2O@D? zL~On_Uwr6`KPW%{yCzV^8l3kDgU2Oh4ubH0|Z z>0YdPVZr{#B7LoW#f*8XRt#9pj)%qv#+kBNJCC<#ns@*D$h$|<&7G;{&QBck7e9UF z<5w0!+?A_*_ci|bbvY^rLqDqZSLm3lK4+ncBFoK9P+Q6Z#cB z2IG2h^2M~%n{q-0`?AwLt-Ei!XG(f!&hzEZ@XkHUmDSUu_s8#zbKYa~c7A&oU)c>q zaW$=CT9-Ltg0bCD4X8e|4se&QOgrzF-z!fx%+&IpmO1A~R0|55n9}XZ8P?|36uKM~gAY6z`dUKWQ+hY^5UyRGdVAYB8YX}{V>jIlI6-b~90W74VQO8k)U=@Y-#J8$z->P;aeGg$CsvWZ8 z?H#xTqVSv=iua8&I2|3Of+UW#Pkbyuym z+EWcELk|olBZRQcFT=Dfr0tJVInyGA6cs^-=3-oMAniL4gR$mWN&%+E03Sv}5$H}{ zsTUUuvd>UgPywUdXTc}~J8Agm(O12+HbA`}r6}Naj(LbBf)2VJr39nQTA@hnj$h0c zSx4KTToxSW9ui8l=LVPKXuSShfjL~X|N1tTItnD|zlWm)nKYHm1X3nfy&DjqvwhLo zF{cLOK|>=%)p)}AMS0CC)@HINPAxmCrUxHsmmDn_Tluo1?Cz~8c9Kn=oH@a}ck_;C z(vAZu$ALNL9L+nPO*>Af9H)853yH4B4mYacDxWUDzwO?(P){bC>2%Ekyas z8+Xnmy6^6NY;_h8n^Di~o!QCZtxLAH$F}lJedEKk56-6R_owRj&si7BxeKrG^;c4s zn#8HQ!;h^MYpWibY2ok#OSXfks@2U|w-th#<>k) z-XxRk=XRat>U)-)FFtl|%Q)OqM<$P?9qlPc`|K;cCxRS7^Cy@^ z2eYR3MXvtRlJhduF66kH_q6e@_Oz=bdlaGO?4fmVwH6?E>RkUYp zp0o{5+3;m&b*8dzxe8B~J*;?8F>{iyXNu@Js6s;2JGF?#n*Oc zyn8a+cVw#TzAiSn%KoS^mD*Rzu+oY`VwtL%e6b=uDrSUYFRNf}t-yg+y>tH3r@bHd za_3&*yRW3Iy_~Ukqdf@ON<_e24@XI%JqYYJD1TijwEbic(Hw{aHw%;&t?o)S6)Zkr zFHvqqrvUJ^tcGr5a`vcAYU=Y=8~I36vej>ZyE+!^I;@T`BWp8&8YI2e1tmbSWq*n` z_DAm5gkDrXRM&mLHGuj<$X2^9DA|Yz%kX{>pQ<;iH|eK>4T;qPeFa;QtTq7LH-f71 zT)}vZit}H*aXbL|4MWa#9f#NK`Y?##T#28^yuB{4CV=b6dJSQsXp`|Nf$qY3mQCs@ z0olTO#jKuE6D1K9VFkdB(l$t!0!S=kONOCWR0Uckgk71Jpwc+lBEtDAfKG3VD+yVo zU^Q7->u}e1s9nZd6lz010Ngv-VnU6m(CDpli+;G@)}WOvwGUuUd6yNe%}q*_=apx$ zL1Kib0$FKoSu5=`Fh@4l_FdO4lvG%Okc;5Xx2fnQraI-TE|X2(22xD57Q^tS-BI>m-SowXNF5 zFmHVig%~FKn7%|hj0of;C7>6*qU{;4dM<0?Bk&x)!U0)}INf*Bs}YF^r3KEWSbzq6 zyvF||gG0%Ni?j$)9~giHgg+b`_}AZ}@ZZM<`o-{Ha^kaNaotIzP{bRu?Grc?jpBiU z0nicX&`lEXej^tTSjSC7PyoN} zMyU|okqCsT5Xu`vd6vRnQR679WF!>v7xdnS`~z!>A=xDuVuA56tTXBb^ahr0v=L~u zVsc7LK|<1B%=sybZ`-K16=$zk^ za&#q(Pt#}C`a&OD%a`31(|eJnoZEp+;g#LI`()aECgncEyL%ShuW{#JOPtCyw=L}8 z24gA5YnqH)ZC}c^?;q&7y&oO?@ZkIv?%a9)&;@?~Mc#HPq02a{Rd52j?2+Pw`b}6FrZ2G~K&6tARvA^F4aj$yv5#te)wfMQhU+&21U4 zFVoUG+y249_YclCb4Nh2h;UJg3(_1t$~E5v%YM2238n?KZpLiexN6^`)u&MJRW2~X zMPB1xr8tV=nn&~XR?V2xGks$wuvE2Mq2eId9Lg77*$doUIibSJtI*shJ)(Y@@l@aU z-1BgC?X!KLJ!X2LmjfI*!1WG(<_U3^E+YI;OT13ov= z7@`Mv7T99on8@F@DDE2#g$cOfH8K*Q#^F=ml!EGHFPzA(FR8F(22*l<6@LE^RYzy) zW`>NahS~ZLTHbF-x1LS4o?RfhOE>sdf6DqQXM9!EBqYG1Rk&rK7k&Dm ziLVceZX{FQKd*$r!GvpmR3xKN!t$tCMy`PIl=-4?H!N@P1s7RPvji7e4$I3eQ1(sS zVkP;V6M)?YK6!17?4nTp!$azXk2mD9)A}%@(+z;G!)^w(^2|7ol^2#;7Q8MJS>I zx!VV!1o%`0I{@8&0DWMi&Rt8;OF%X!U4(7oWsK-3?aw36oVA;}1C*(sBJz&4P**gr zpOj#3gA&Z$Xx*g{+?6cu^=FZ%0EbIzBJh@64S8HH688yOW;{k7MaPF=mJH{9WIVTK zZS4L&k{Kh(h~SVjL;wq*7q0pV7C`(I;|Bvh+?Rl>6%j&C8>1lfQBlDNN`@cZ&jatk z&rs(kQS@^Z{UwTi0a3h0>Z{l%JV23Ie@K)9bwXsB&uh&eDpWVBsDzG1*jxaS!y&kq zm&fooP(43H-lBqYC_hgnz<+SWz+FHQ&k7nUFeZXpk)wh+5~W7qc3~XUJT2<0pdAiH z2)YO;t_Qf(tB@J@ZA7+D^Gf_P)S-U^XToi4rDPr6DaSM0>+Vn7n@DeOPi=3X_0N<1 z_A{AXdwzZT-P7E@7Z%R*yUyi6;4`VpXJ%a=c;5HS9a*U5_nci|_{xi!+J=WM4_eZ- z`%|_1=X4*LJ~VMBE_1K+@&~SR*8_ZQ-&e(k3Ui_a?r{Kk4c!T)OYl?)p0U&{!%dCn z?>v9^2eaKvmX1t$Cm$rDSq zoeTDaZW++#j(40()`oYOy82WtmqvqYsykl3|(VB9!@{abjqa)?$;2noW)Xi01NLeo+xGmpQ{9+rv4A&C1 zzc#*W6wTC)U3`5vvRo4n2OkX1uyg16hEBfr_%dFX?0R_W!KsT1T@f9&^4G1;SCY9eFh1HF|zgw zWkdi!JCIKoCHqTGo&%nPlcp0+8V##a!f@b<%_5EoEumqxH!%u+s31PIEL>#~?S0y( z*;o`$a=lCyPOwfDHf}%{kG;ko(UwA;gCSBcK@=~3b!V+_SI417@73$CPkgKLiMO_h z5i)K%-+jF6Y`1TO05NeL%EEsL@E+&|@KH5Xy)!60ud#jYTPf7IaK> z803^87$yVYQKfb8P27~CzDezbS0xA8#{0j2fRgkGM1U(x%YR-qeIjk!nXO8+sc=auj`stEJZqV(!YYiW6rsX9xD}9x)ZA8 z?iCC@XNgtuxpMT7?y73Wx`LtST-U1jT#2g=Lw(4F$1G&RV}(_zbpeq8dLjboxnlI{ z@Gq>@D>`_>Eii|B#eh;qtfFeggi>bAY)vqCyY9rN+mgThUrZakaI6L1~;&%X@)StCLGJATkFvUs!I4mS@7 zj^GSoV$LvSFc3!KEWsH+Avn{wMontUxJ3G>AMk_EpfH#D4;J`HkiQU!1#k00P!rNh zy7;htz<~Ag#FT*}ri`3{H*rRuRNO)kdOdB#J=0ds{0TW_;VjT@ zg?DVb-{Gw#c~eo|4)V6AWJyi?w3%~2zrCc72A%5Y6*M_P((zo9RUk<}mm~v{POche zT?0Rox5A8Sp{;6(^05kYIvR-yfne-y&72AoTo43467vV418T*JZ?J?y-Cl^?5f!t* z#})r;>W$QY%I zOQlwcyfa1+f(v#`#s1$D93_!Zn!lo^jhBgMjBA-8^xc)9Vz39aOQK>{{a)`Ej1mQF zu}X%7nX@Gu-xk!_xxx1Oaa;0Z%}{+eKiYzX6%IGVfexy6Hgddp6&e) zS3}DBkY1tF@2>8b-A6av16hOY8cf=@997AM&j(Ys4afdG+kl$7|JJlR{x|lFlpR>R zzV^oY2gq{~u@@12@q5qyhs`U^=%v1_QT7~9R&6n!RM&UykD2a2e3WNLzOV5n&H0vA zWNq5=97w;mYIyAF`H`S(M?O85JiYA7cOKsC9LjYLWv{MHu8+u_Q#sm~JiB}&J&tGD z(3Dz8Urvu_npUr@o<;kHP{Yth^-#X9Ie8{ex2A`4^x+)cT5y2EpQ?y`-n8`_`Voy@ z9bMZmd&f4s=hh8!^Lb?T)k1+X zxvC0;$yrsf64mv~v7`j^-Uh=FilqpnLJK^p`=ByxVyAwv%e7<0zdxb`RU#!BI0I*# zHeDvlz|lBc0x&$Jc5wjpItb{_KWo!_cj|A8x3eW!d%7<{O7Lg)p+Rt}>d$#+$-gyCscHa*PV-e7zl?r6}`Okfu(RX04PVsmgaed7{QpW*uf+C2L|mAkj|zZNnr5tT&>OdO@N@IAC7*yj zIo_!v8W-h7ZzLK66a{KiLPZ@0i}2Vb_}~@c5EMSUP><(Dav}J8Hi)IGN zzve;xZ>%3dtrrk`0nr!0xi_nQxoTggeYHxiK9QvIj_TxaaYS9n!7LALI9dVPHd$Ye z^<`dOJ({hP*%OF9fyZInHyrJ1Z&!}(%G}M8Szczx5IvS>SZ#8}MrI6I$AorRVz8VR z;Xe%gygdr#E;KMyq)&hax_6a)yhNHnPw^`GcmdjtYt$L%DV@yaF{KPrreWb>Xo|N# zg@qLWyB}+~uJW+wg}%DBZKB5JNse!^`%?VZlaJX$`D*u;r#W@y;q{g4=?^o4yst<0 z^lo|va-IR;VVj*@DbFUigQ zvU_0DeIn;RA-hj5Q(N_(RQtn@m5%h#YOUOORIYz*v;KIl{ zWTvvUa@&yHI=tC>I@fwyZXMrX$FVBb{n?v^HZW14ov3!Hc&vWJT@($2rV7e8pQ32b z3w)SB&He%~tHcfnTaidrfN9PsmFOHqtUK^*syGLVGwWboq-tjU4+5e|N;0bvAPscR z#91T?(>Tctr46EHOy&%g=pbh=>9AB@PniU`d2v+^Rij0)s<9@m#<=#c$Ou`yGeWcs zQ87fFFtX1%p;#mQU4M*UjA@>W>0^A~4o&gu-QJMsRY_Er8Wa71c}9GHnIQDXASMk5 zgc+b*dW|||+<1JWaWwmZTz@j@$UEGr z;~S2biuCH#+VEO8x;Ta2okmkLXy!I*4Iws!=un=i$D^eEy2JdE^MgD8n#KwY0o<5WQ&Tvi z0(UREZ3XB6;3(=(SR@Na-2uA@+FKUQHOt_nBpZh%CLrlmDYgUvvFa&pJ{v6yB6L~e>AbJCk z6cZrW3ki@Di?@~&3^kOS22|j1Mr%40=DXq@JDj7eJ1`yN1#kJg8l(v$FpKz0d&mAY zT=QA>&=-ZoghHspYZ}D`Mk!xaMRZb4P+GlW(`Gdv6%~3e#BpKXueK-_yb|2(z^qB+ zXXYT|q{5nT3J)<3MTIn#hG0F=8Gq>+2)1XrH?X2}u!RA}8X8kaANH^GrzhYqzv-CV z(7)L*l4}@|8%C4#R-HTLdgxwpr#n|6snjdi9o?)O%+(Fbbwf#eMF@PtG(8$DLeCk* zoAUKNHQACgC8@yllrX{)UXs+RClFrw99(3OC zOvN)pa&3Rol6TZDU;ONNQSCXzoR5=7BpPmhGocTLT3E<3SP*!3*W5gGhFRVe+3=uTmXfEdHEdXxTO3=hvb!~9g z0HFf}yG@eizVTiQNhBcupRks}l}(rBY-$iv3t$Xstx6IAN{(WxjQZtqIjagy7&NAJahjIWVxhfSv8GH%>GuA9`pE2OG3r;;d(`(L# z=h+0ObrlnBCHw0Di$k-Z2~I~Wck$_h8WU+0Ph~_Z&iZucFUv7`^{@;Rz7p0>!g+x8 z4$tF+oG6@tnF#pwFMhO=27Yl~Jt%7qh z0@K?aFe-Kta`-Xz&_QtH$(_W-ZUk1y*=Q)@b5_J*95JeYK#<16#~H#tXuwAh5ni#V zxjY`Qw>Zz;*el}y(;dII?K(y8p`KtJl#~K)!klT?wKfhgx~W z@`&d1^(_yg_oHb}u74%N^$Y7K&{Pm{Q4~}Y|E&UI z1w;$^u7S*rB$b?54tzSBI+i}NGMF)}i~u{$Gc{k_{q*kg!sj2Q5*eVZJ;>Vg-`gy~ zzH1QiZv9hd^H`_(?`s?+HjH;mGlqh%B6dwgI|AoQqKsuoBKTfpBWcI>S8%Qeh=} z3K5?*4zUejj~&-KI;p3e=6eU>lygVcymOQR5h69Q6Bojn7|ye+p6??C9PtQv1&RX> z@chyFV3Y$dF~QlOkJh|w5{qE_DmEQfM8$?fO4ZAB*An31MmsoEOtHX>VhkODUyov( zg?hF}{dnabra9Os=#95MT?s@86I`d5UOb2)$;aDGHBa5N`!u(3ZO3dSa?Ieoc6K(#uiR%@;`?oW;CEqeP3 z0swgLX71`ubc;u~!?{~wbTyoNdu|)QQ5bYl6wCy}7A)$mmGJCKO|IAr zHucd?*qNlbd^*LZVk?b^Y0KH#w;gI%r;BoBTm=HEY;0}pk8$;OokLfy|Kpu)++65% zQm;|?`m6tfGRtwR_pC*g)U!1*WW|$2T*Vth30a> zIdpw4cR8|+MGFTURBPsRfq*L8t5$2hKjA0s17O=v_)Ln03r$alL$_2X(!R(v{w(dd qz+dTS>yWk)Mugk&h|x#HS<-^ZU@-hE(e_{F^F~AKj|48&xBeHzEQ+!K diff --git a/app/modules/agent/engine/graphs/__pycache__/project_edits_support.cpython-312.pyc b/app/modules/agent/engine/graphs/__pycache__/project_edits_support.cpython-312.pyc deleted file mode 100644 index 54377ce0362cc332b44636de242e6cb470764732..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8954 zcmc&ZTW}LsmbYJe+p;A;co~FkLIhZ3c$ol!0Ok#5f*F!=Ac|18jci#~x+TCWDIp29 zBNBEoBr}N3?jmNVYQ$u>)|*`_B2TiFkEHT3t%yXL9#S<`yHmCNDL7S|@Uwf)ZApHh z$z;B^tNK3AJ@?*o&+DH1SzVolz_;a({}3=a3HeW~R6f33n0yKfmx)M3CP@1Aoatwv z&IZ{LuAgJDjSKQ4Lcc)Ee9$mr>^IV~5HyXL`^^kt$u1%q&Jxl1CaYuaw~R4v(_O6e zx*5&hCp{OHLVoFhFXBHT$5(o_<%+^6E6xk*F!YBG7zK8@(mhC5e zp+RX+L>lqyc=gm+u1r46;PNGcOYUdIHj$Ayk%gZV`2m9{oE7?c(I5$;QG!%546t)y zsK`lB#}dGp&hq^x(JUFD)iA(|7O0y=D~#bJ0qQoWTf{mjvtm7zt>Qx3Ylm6*7_5ZC z8N>#d%QkIXBf!>)4#4B2xawi9CTO$IYHNnJhG}gaz_mbIqu44r#5u51XL-#6^vs2x zCb}a|YKGO#gL=!X-OZ=-8T8e`m<0gSI>x&fY0e+ZqeGHEvO^3+l)h**va}#|#e}>yw)yxlH0roOq$6 ze{mLSa6bAM5h|rO%LVAI;u<5@nO--qIlK=pMsJ(38X5Ulvv?y__Te;Mk%9xV89HR- zdj)a3T(0};ec|xRkx?-U8(Zl^7F#KW1_L2!kPsmZ& zNy3mYMvzMMiyMdPD&?tM6hx-7;>yeklW0hobwa6)w#>is}(I3qY6O3%7PeZ2l6d)~|wKbNRa z)b&9x1Al@$rI%>yDdM*FYUDn%@;>9bOGU;=_0Totcx@SE%jX zXNZjSgSok3Y0Pcagy85YN!E&f0+NGIbHC`l-X2nwZ6f}V%&={}A(9Xxo%)+m!9Q)sb)8S!mmzYulf1>;1CvnG|#T&`;DO zPv#Fjr5-(&KXmNUVzu#^qydtmdwJ4OYI*YUHSG+ z>b%Fkux&0i!%9jm#B9G{J!j3$=}ua2o7NXQm#NEpGKULYJ-MzPwR1p)pw*93Q~69#pvwAV zC|o9ystCoInktzQ+1U!NmTE@Nr2_Y7aS9LO{Ig>W4~`Lyf5(9^n|dh+%X45u_nD(I zikr^Gwlc$dPxzD*ZcYb7{+2gF0u9Tsyd0B4LWy zhaH0C4Ee97)|Bz8^@=sUGqWu}XJx+WkwVk@T+{k&Q&!10ZNJkxFV%f@CTk;DY|JukmSW1L9Td0!Icyx7U946XGdYJd1@Ix(c zf&~kRqh@_T;4(AFPXI&>`#TNdae$~=-6=#BD+)HbYGbF_WDaez+%ED%Rl7PhHqL=H zHOwQGReYa)>?3j1M`!wXP=eZ0M&iQLY4a6|Ao(O06i9w17XdgfXfw8P6a@d znLuOeB@5N9LGY;*`C%BW@k675kek=JU=y|oCw;*vXkiMZ@X&-xPFHTtp;39n7YxKC z>VA4hqmghl5_8w$lbWD7rxJh!6kKETrFkhwp`kt3(4KGTObSJ7L%}*fXPuwgaogIS zj{f@jYtK(ex0h}L)lz8c%r$l9n;uH;xMO#WuYEO^dg7HAP+5a{K+pUXJX^Yg7; zh1S)%*46pewQ9rKqP;0;)A@*#eWzxy5$=n!kqiYiowZ0GXDSDiV9g{_WuPG(J?o2C zS*ee7kcgqu-3e|CLjs_YeoFetDRP?oDLKW+=vV>ScR>bcpp1g4LsO(^<{hW~QaBPA z4S}#yQ??smWIURRqpY8WB@E8K57{ znOp8STQ6_8xFIFxogJ#JK4 z|Hm8049^&eL<#!~C;(wu@QiH?5*X^UzXUhUbFPwi3aTnw{M4l+&Q}g4&JE84(y(zJ zWP=CKjGITkPeMgD2B<-XxUvk{Egp~O>4+Q+`N4}2kHLYUU6&ungo=kjrqbjVrUXRp zggjaWI8H_PWmeajekR9P;=X%MQN+?>YB61Z*A8F1A%!Fg&$+wQ(V)ORx1^b?yeNW!LPc`k+S!24Gp*f?h;Q=%FgN-RSMT1&ev$FRD zALkS<&MV9qJEc2OOhJUpt4KiXCSia}Tn*D(!2_4V4!BMMM8cRbCCmv+!WuV<{4hwU z%$&E!4bv{e=C~;aL4~+AZo$0bpV14W;rtSwOu^PN*VEdnYDN^QtF^@qaa+tvm54z< z*Fhj5{pj^d6Cir#3sQp&N@F|p=*Mn_%Zqn3>>m{&Xv2Z(r255Or|Xp}8)z0}Q7^T< znmGh99ldBA(W7yi5n?nZxrLjYh53RymN(3%rXk4g5swBF_Xhd8X zBmx9p%7(EewN%stU_F3Oxef^^tCoeALh1HG^CP+DNAk_9l9pogf=kEJY@x}MYx02C zmo)#*KKGit=xn*;Se)+6SSI%59h;NJqQePE$Ff4lx?IP)e8>8Ggfn;LY>SfH#~tH` zQjXN2B3SmpSDr66%qiNOuPdolY4%EYdRxYEZCAc^Mb5V3+^&)l27O~9jZLp_Pg!0& z_^ZCm+<$y#;)#4iH)u|KORD+Y3#w`1gREW^?$BSr>eHewtAPEuIQMsV>Ulb!2VxWC(MXF32~l^S=ozzAi6>092I+epXmS#OJ(A5U?v$=mo5f| z*x&LDS&yT82!K4|I z;>vZuNo3m#p4~am?!0I3mrcVkQ2g!Cr$e6w3%ydVS5gN8U-S-54IIXS!|1<0ni|VF zAI{s|s>%J`J%KcjFyCoS!wN<$E_ZJ0;@@*X^3g+`+g9=aVRb-?em#ad%)0z4Qe=kh z!m9`B)X9Z9d$XW*!IX>OVAaymA`e=vZ2sRMf6s~r(fB7IA>uv*QV=bJ1`q`no*S$f z_BsaY0d;*X(GYEMzLvK5E z<2%_tY$;A3)!P`hM=!4X!HD zUFwIqmjUi2PZS+Q^-}It^+SMs7ZJb@(11w&cc|P%FhG&bUDyy^3BX-0I^_q56#jSB ztoru!iCj>f0Q@j>?!^r*J%)u>{Ag4keXZ8=T(JHRVBVMLZr;hggiF*n_JR5i?8!xI zZ$o+`m#i)lw&+s-6&3+NFe|O%dfuZDxRtDW(-U1Zecf+CAMWgZ7e?^A;CaYDyuqb8 z;l_w@IJmQT2P8>6?(+{vF(d)_Z>VqU+XB3~pV6HI-lz+EQ!}R1DF-{8P;aX50@3ec zBr(Qzxu{}AZV_YUqNz){LVh7=sf%f+qz=?V_E6Lz|FuXX0`7p z`OQbv$DUMePnB3w*TWX;yE4+h1g;0v^#|00LwV1z+7(o7BSl+%(dH@D85=E0q0~T{ z7pD9vdAt{IUwfHkPtn$RVgI@PsZ}ZQ>fn{Zt0PxNQr^tgjEJ~0PiNWenh!VL+?efB z=kET(Mz3mnnLpT_7sk$wrJD2hMXG7hgBJoGR!(&VI-Wn{eyHE~3cS}Prg?HnZh#TF zv!*!PLn^*nMHcC$K)(tYqYW?(2+0lPK*+Peh1sY>Z`36R_#OE7eC}_e7{kr|6~Li% zAY;E51$T=87XypG4194RW*dkGgDzP*1@5sFvz7}kUoaS5il8_P3h}>{x$SKjcN0Yt zI30?V!E-M?5J+DQV<#ViGR4&oIQXIS3nN|4v9r^ktNv_12 zoR*~V8wY7{<{jOcQ@0&(Me9~g-IPzM9M3RpRc6Kb1s+PRI6^Jc15cdQFm4~w11_wL zyoizg(cx&A#;__kG5S{Eg5DW7G5KX^i7l$N|7kcB9Hu{cKz!xG3+G-a*q7z(%QBBn zhqju!PQyd;}6r7=V~kM1C3@kZf`o6V!e(+F$uJBpQEw zbTlZxh;`g7Woi8^P()=k$239fs~iFE;w<@^<%DIKjuL_FmO?Z2NdF{OOBTDZi^;4m z5zMn|ZgIB`-!k9aqSrr(sE42WG&V^)OYMSSN%xcpWSPU0n3d`cLNg+UY@%Zlvr>Z~ zw50sl-STz4AZ$!+#}OMd+b24&@1@0C00}LndPaCO!<7hR6WkI7FBwgXuo#(m9;YuJ?CPP1D*pRD<4-#6HzlN_n- zw#s{v=oqfijACG5AQ(8V-y%Km`sFFVkbCG0xkrB?_vkO=9(=8ydTZAo-qZ280xFpEMJ5UU=E^mKmsvChWS0Q{+^h>A{~Du YyT2k^zalIC2Ofx-P4^(y%IN$3KL*y!M*si- diff --git a/app/modules/agent/engine/graphs/__pycache__/project_qa_graph.cpython-312.pyc b/app/modules/agent/engine/graphs/__pycache__/project_qa_graph.cpython-312.pyc deleted file mode 100644 index 8a4c6ec6e8f26c3dd1584cc0776595373697727c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2670 zcmai0UuaWT7(e%4a+4-$8~evr9k;DTgIl^)na)|IY+8o3ZmoNX50{vGOw--mr03pD z8&asXjP_wuw?Pa0Lj}Q#g2f?-oBF!3mm69z+$jiSjJ=iBG4N^MIXCIQRXmXIob!F( zJ?Hy(eqVkK2K@-e)MwXHw>=2`PB)bymKVzfSWF`gX`GH?bmny~&Byq(5EIg3Oynp} z(518|=3#45_on5T%+`|bOZ#Jf4)F-1p@z!gt1}MV$fF*lc_xtNy~&q(p%E@3 z|3x=_5y26T_Py^&1E;$CPdWYpD{kQ)63-4sI46wLDND_gOp;*JRLv110o>~DBsMIj z!?agey?S~8lTT9#oNzC4>59+$U_T8O$2bkec#Xq?#%sb^Q4=S?V@=ki2`(mS9_-P0 z>;=9T`0|Jl@j3M$lFSfJSRcjNy~pASD?>&cLD$ochhQs5jJ`zKJ$5Ty3-DVGvr7wH z0jW$t$q2f^^?})<3g1U~M>Mg1mQ;bnq~9sZi@ot|wj-Um!lYL7Y`R~aXo9dTq;O&Jg{HUHYC=0+>>Aic>4WDJ$+8Yjiieao;x>l~m_V-76B zVj5ZHd?IA6xLL{ZC|}@*BznU7p@GvwP=Omqr4Bd*-%&F*42#t-Woq23bT!TjR6bv) zTV3I<&IRrkU$J=rMT9=b6F1Crm_RB5i9wwBB%4VY7VKq0-638ejvUuC)yQbr38=2R zyJLK;B{89)A~aTxH<3waQ#y_aq=qu-({Lm=WmG{?6jIB0XL2cB%WvB}PfSP;Fi!v( zLr-d&zdf>0vu9E&$-zsZsnF%~vvrSKI*Toxi}Kzw@9W&m;G(>1MdR9*MY+9HU3Y18 zYIN@P$dXHIeaCC^OZ0pj^!zW;t6Hy@6e>A|I^4A0Hmfl$PyhtD6|8tQDy&vGcpTEI z*Lhr15K`QzxLTP*^bKtoTCKHGbp_!(XYvp$Z^gPb)hR;th5Pc2<(Iqil%sBa<@(`Z z`z!llaom1r-?4uzexb0<9s6!^T(KY74;A}9h#r8#UHg9VLUFu!Q7LaO7N>yu1J!v{ z90M(?F>cRC0ca%1dlEa|G{7k=^1R=l4}EN6q7Xcs!=`o6PZYS^LHS^RcaM_Dz;iec zT&Ie}lWKXJuX`_JoYiyKNZ>UpVGx(O6-_5p!KsypR;6cF58D2c2t>7vfpc%uFnkZT zul0M4Pt@lN#R&+_nEjJ|k2!nCp0^)FNj-d;?_#GbriHWMpPAFGg9>AHRjeA0GijG= zol<_@IySo6O#lIkU5+>epx_8eY!RAWM+P*;1fGxM={?!gbF|;_o{JMBWh9{;U?U>A zPk#s1_2(eA0Ls~%#Z02Tg4$tHcmXgd!vWa}+kEThV6YZ+8bQze1qfh*+*}IOmcn~V zb%XzSMW27kj~cd5pT2VXS-54k{d(kTWbT7`ve0_aZh69Uo>cFmDec-NeC+jqlfcOLthU)X)z-qmZ@oLKUT!O*hcY4A__mqIAqFx_;e>2Yma zv9`_Lxo>{R?n~OWZ40%7lb(tlZ1H+1f3xpPNZ=Z?CaJId6}DAXSNJL6VY z`>WI$QoC-}|6dpWKd^{6KB&)LFcA|H1v5y55*C0?x}vDhI?oIFkZasw@(%E5S2y

_64;k^TqqeAI+yqu%fDF61xGf~FRz^^WWA*2 zohe!qtM%8Cv^i>v+5L8swnXb<4!?t>tD?@B%kPTS`|D|np*W_$RUKUMmvi5R@nP^c zFw_x>t^Sx|t#_G1UL(n?fxKERuZiT@AkVJlEhl+(kmu0yR**a=OKB(#7Vi7Sgz$d~yCkO!{ z84p3OZGV`Hi=+;z4Ow+Pe4?KViEjq?$Ai&iisK>Eu4SGa92iLOqSp3UGk zvaBb9;S-$5N4Ozq#>mx&-W!MpBk`VK=#pFueZ&UDu0b};i5wqN=0}Nj$`3vN3M9rT zj`Gti1R((DIVh9lHAt!=rr4=76Al_Z>#o3taS~tcylt z0(R)}Jl!4~7-)|r*uf|#vLa;B#^Rkk6fk#28ilTv3}8RdR=! zG}CXu9u@|cPE-BHg?ad-N+V4{JIk}>BH7iL&(bfd%hDo#3keJA+SJ_QZ<@ZxsAE1! zd3D{g4a7MS9pVB!cX^N##5*8`p*}8jX&@1agP3{EJdU3?LnNDnEE|X?SWdP>{RQom zG7e;u$9dp!@?=v8BsLP|?&$bsnE4WB8kE&Tk@a{yd;`hr9gIZT)cO~%A*omoZRUF* zf(5iUeYQ7iZy7P<%{4b`uh&ZM4U=ng&3iM=duPr23YmX8D6MLrHFp&2+XKh<0^HzR2bh>Bgb=lP4VWub~{WWTT#b4G~UbNr@(E3*20sWiPOoRrJ zuym(d$O8F_o6Z+1IUWLoaTbmWF&Jkf@$ldQc%$^W^mXQ%^jm34`i(R#eUbTj=8rtm zH`3SAZ!$NeFW~oYrK!wE(%<8A=0oW#sPv@=3Z|rQpxxJ*4}EYh7@*HEC!1n$zCwa; zfu3b5b&QP0gZthCGB+3%cX&wF?&1L3D-X~UPw=r|G?L=j-RlI|QG5&(UL@NKqRgs$ zz-!`hfp`~2D{&Y)LF8o}oV&8|*zqGr4xNxqSAu*TCcvwRHW|Ih$!4`Lp;W&4)zC?5 z(~G5h@vd3{?SvFWAn4|%@h#GZ({mK{F3mCjO;MJMOy21p+daBF=j_NhJO0i&b^435 zzdk#i{B})t%NsLWPD*c{%x*lDb)FtEKQPxSyMvR$iCkF7gaznnkba$kpQFqh44i*` zbT{)D`aRC%?Q14plWc90xs7ZI9*@jBdfp8`PnQwUD*~4%?deX$IoZf_;vgTF_4ovp zJE1Z;H~6iPlJ#sPBzlc_WXFRsE)bBb0s-aJhqN^ixI7q)DkXd)HbpEWGk1ql27yNf zZ&#x_NC+5xOg(03L(9C;VA%G!R&VerwXtFd{M>PJSfJ=k|Fe&T~AaP9D zRvK@BHp>9)%J;2f^(v?ofJ?6dmJR?CWpGjG*TAq?kk)Cf^ddqq3H{Y-s`$$q()zOF zHL5*SC^xC)MF0m7)E7XI_rWXpHjEI5c+^``$Cm;{s@SRGRX8p@Y$66s9x%v*yecjt z8X1*L*{Ed6cCGOMpSTFb$!p|0@b&E&AsopyM5a&?!E$~h7HopZYfvZ_IdnH;F2PSz zp`w7K4Cq#YaPbG>G4<+FWLW)<;)cSh5&jCIYgFFZFt&YkyR@=>%8_+$o^kG&W&mp( z^`G{QMMtC3%UiR{w#_W_Papc`^)Fw)A3;FcbqX@1xBXeixe-&|v23huv@Pdo%Q)I5 z!&%3xBPI>1`lSBLx&FaS|DZJVezyOEIg09HUT2=*&l}7mP7J>XBRoHqQ+OYyFv0_&4CELL1(d`( zA^6imVN?A`y=;}XE(K*U7(IfDkfxMrdlg=UloOumc@z}f^Pq%j?=SA^yM;U`)ktcR zBG?0ZuRg#B!$eghQl^p`9p)nDFFXKowo15q*+FW6gxD`2x`DK~+#~uMmZHw}6U8VX zoQjSg0NyHc?}-&4st)MjqKZEPq1HZMihSfC!F^B}oV=5pb1nNbE&FH9T_xbuF>Bta zfs^-M=d8JX3E+f>HxX2cfKySOE~81&{iPxf4Kc9#a=-;ZRIaX}OkJI*spu728J}&X z!o;vXObr{#tMlb_xU^2hFD4V!03OB>XqT1eHMpb7`Xe5nB zxv@^TV)s_X@AIXYx;b16<=Oa|$50jT`ZDiY`7Kh~; zAu-5@xIi!H$pGLMMU}+EncsmCL2;*o;tQ(E`e+2yObyY&M8?HI6(yFFBCP)mJ2{2X zX^hT5Bp`z#;I6{^3CKuwyx;&(Cj-7%IflBhuirzYX`9CYUC+>O5N)#?w9Rs8pLe*& zyrW)eg>Q<!XAMLRD{j}^s>wBM z&opeGUjI**@zq+ov@-`|6B+^+d}g zpS5qAv2UB|&04pYlt^njr%q(;+h**0rn|D%y?JZh<7%U&YOa>5^GvLiZ0(Y{y~qiG z2^@#-<l$f7ci2_inn<|J+K&qQg0|>Amx?h=P(4|Cq@2J zzV&lB!mvryY|?2%*;S}k*IoT(t(P`{7_9^es4cFRn(Eisj+z6e3PakMHmUO-UtXal zY9EUNwp7>g|B^&`Yr17Cr+5Ve1K<{1vVEKoF>+=AFaXgZ=6k|$xSt-PN0Sq)vhI!%>+h=FdH3?1yFKG>pR#7%yGLGo zV0GN=zTTa;UwB}5e)`(jvC(4_O_L|Gu8tYkt5aQB`_@YNk4^fT+PNyKe%(Z$FYTLo>G1uo zY}1hu+k-QH>0EE_+{Mhfi{K~7o*T%XxhxG{ojG&$)6HXhM)%~LzKqj1d1cyifA6gG zB+$by=CERs=}{~)J<8L0<>@@S7cMXy{)CwU#Y}SmrM_0?~tsT+NIH2T_$BT`e^_kyKt*qAoZfcM%f%!G+G_oGW= zQ7GS!I-XxrpKDkTW7|W5#FlvtqzT?vZEtlt*U5-Ii>kq6KQgaHA*};5xegdZZJ18$#dT^itOvRo z76o;VSQ~5q%mCiny6*3hETyc6;v%0UE_=_rDd)Q$P>cnSnDF$0E(>O2&%1J6AqiJk zV!erIAi^p}ZRTBH%6f_qhB(haQ0&{`N$EXpdpzGG$$CofcuKdW7|*$<^!e1T?u4fR zJsy!XxDpgRsL6^RJl#EFALj`U1tZa5ZnMPUaaKuHs~?8*2ogxi_7cxBnDO}}0XA@FN5E+aeqsf?z(E|mLSPWP4_zvm zf~w;8@E>81CUqpwf>nN@wXD`B~oTx_SKi@$u;7j$F&mOv_HGd6%^7xYXm%^@K7# zpT{gdIGZ(qi@PiotLzwZ9l+<}vs11F`fQvjyYnG3ly{h2fU(p#6LOHpY> z>^p0GPKOUHX7Gw8@)ea zn?x<%_euyHuzr+*3ML5~m?9QbLtI><+r4;YvCJ9~qv|LwP>-@e&)yANKk3SOcW1o2 zXU%&`JQ_Z9VW{`V*57l^n%kD((Lk<6SY|KCYi0XJ8O@xjU>RV_)J3M5MmfGngTF%U1z4YedUd%GXm%ELOrVh$-TlTF+)vYsn%5(3 zEL;}QSg!hhV7vOXku`qC0NXKj^RL0HcwpZYx&N9vxD?xefmA3$7r`qbolBrYP&U=R+V$5nEzvJrrGp~#=F3# zPxRds9w zPOzy16R^9+YDU4_-jT6)Ou45wWbFswisb_3H(ytut82^DwM}wU?_}$`MvT9+)#vLQ z$Ig$Q&(&|t)NhWuM zsUz>Ke}?3`myf+a`hL#6E#uzyTj%uYZ_a*s_I^@2aVop}^vv#a(%Ey_?e9nzdb94( zh!v@3@_I67Tb;43&Rf^!tqu8x&2uKozGj}%+pC_KscQT6b)T%Cv*<03vXpM|B}g)B z&m(uZzj>UD#pLc6n1|6P@TZYGouPTY3Y<#wwHCwP$IC2+!Z5I+cNJc+yf_GVGU2i% zkNZkC!CJ$``mk(^2IFBxEJ#f5YbzLxTSMLe`jk((oGJLom3*IaCErJ?3n)zFKOu;F zQ(pI?>YzlyWpdol^8Si-6Fl5J2N4RwzaIGD9}w`rGD@UYu_eMkR4DGHeSdI2h5toR z{xzZg*=~?BR^w0?l%bOpv|dpl-a^@3+72ATzJgpTdq-iMaAEiuOgM~~uz3OlcIcSj zhY`B}2wx}bx@f_lns+JFzlZ-DsE34DK$rlvgQg!+YyOq0{V!@$hT8O>)RBkO{)bfH zA$9&Cwecb4`#rVy-z-fd?wqA5V`&=SmbI+CW_)6_(Y{9%L{HY*>9$7{L{DC6qB|Z@ Z5Ixzkg|2!;LG)yRUQIiGpdca={Xab}m#_c; diff --git a/app/modules/agent/engine/graphs/__pycache__/state.cpython-312.pyc b/app/modules/agent/engine/graphs/__pycache__/state.cpython-312.pyc deleted file mode 100644 index 79a799fcb9b32ed4e2741aff6af4efe3564a520b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1659 zcmZ9MyKf^!7{GV!@iTVp#E-;r5{KlF&Jv0xKnS4|5<0}`cpL>s<7PG48L#)U-rd_7 zALoi9P|*1*aurw5Aox$H&{C{MqCylMLe&@eaWE1~G`~88dTinv!!~Zk8YCO(SRAGf4g$gCJ^>!Y{?2QR+8F zi_)z_w4vxK z)25PTtd_QED=LGoqo@GX)wHE)TT@Tdjw0EazNTG8MOw*Lx2I?JvzgVp2d~HnugI@y z&qGOzqv0*l_`sn)zZc^ zJC+^zoId4Z6JX-asc%!Qt4v&vGHZrI(IA1%EF1g8C6I@SHI5^Pax27qDq5K!?Ne`` zi{^FZ6tk)5(x)!tuJ2eX8lfBtq(pRX>e+lY!_h+2l@;R=By<*{7R_ZfCv%^8RFq-T z3O($LI<$aF8zRGs&J9u9Z#==CEZq%!sF^WH+q$NjP)bg)eR@NQIoyYkGtq>e1>O_L z5YfkT%3yKor-DU+T(+pQU>-s9vijDskG%zRp@7Jx6H&uH`-(;@Y2w1PmFh$>`&Vpr z3mN62O^M6dDjg(F`|ADbPs}cp~rmJd!WXPsRm| z#^r4shNCnn8^P)G`H1?C>(h}V&np`-d18;lMI_%fHArCp!0@e+)SG9YCe7B_=P7M= zV$?}C+A(S;+x-~zlSXTK_q@Hl|J~Oy+D|&Y^IOlxF&bnxz15FQ`Ec zmPlcWRYW5d(^w@mQ3ECAX%ht^6m=i zr4?QKLGsoez1Q_eFjjNh=`%1(X$N zQG-uE-Icsu3fX`zavl5rItefgFbI$a$O7a6f+6$biF?lbzEoYalweA}fYz4KE<_7u zw>NF50BQDw|D)+%9HwP9qpxRkuMT@-y$#HGAK2w)%k=^-V~k75*mrd6_dySmTzGXu zxP&Wm3MY##jMd{1?|lDoOz}OV@M#v+QcWx)`)FpV+7eZf-ojpVHqp? v>xcaHrv8mS^3DCnLgvK7pBQ6&A7wbYM;`u75uW3psQQ}>$I(rur@rP9F!sZw diff --git a/app/modules/agent/engine/orchestrator/__pycache__/artifact_store.cpython-312.pyc b/app/modules/agent/engine/orchestrator/__pycache__/artifact_store.cpython-312.pyc deleted file mode 100644 index 79082f6eb8c0f7ff8ad891e43dbec40d9648bfa7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2857 zcmZuz-D?|15Z}Eo$v!!k&fI@p*bZ6&OeYkrk zW0^BJ;0Kwu*nxsWn}SONt#Kdv2lPMai;M#nNBUGs>078$3VG_xolalz3eC;U&hF0s z=C^bE+rU6Sfp+KC_vWxf$RGF;G{IMB<9$%JiB5EyCk2|J6m>4o75EJA>3m)&h#9dU zWh6>Ca-HbHI?=^F&YvL@sz^%cZ+uaxD{IAK$<}PMRJ7n#ESF9FO@(tKA28dT*Ru8v z+bFc(KCUbpS$`g1^8SN1Zi2E+43eQb$#8nVPS=GDuXFI@A91=2K}Z=vkLV)UMSVa& zrc3K$M$)5t2rMCeP!Gd1toN;xOkaglhTMT5hO}K`MwWK0i+h2kX(Qn+YZ8a3t#0qF z7g;H1WNk}b zx|Gt)gwD(*qnOYZ7ZcEvH7qNI9ScU$PJuC1DCyh&57AU91XU%JnxcRfVr24csj5DwHi1 zZHU1Y3WlwC|Mo-np zCLdq>;rfrW-_Pz`sf}K&560?4EzhKzATpL&mmrEo(q}W-|dyxYF(_pqREpYy#u}x>gIgFm!kDl4# z5291G@RT2SXB3!U@6de>iWhh5*ny$h+A*&34!_1ZTpEsCu5OoYgg_V~vZtW`x0}lGP`b;3!Y zAG?TV%!wj&j6my3EPxX)L4kj>reJOMx7It%74DWwdDyWx$1o=FPUl3QDE;{5FKPut zRo#A7^{)<~M^yFmvX=LI7=GQ@BnqrfOhNG)iWCY2ZkKpl_e&Ul?imXFTj;Y+8XPBH zeikOz=nY!?^zOf8K#VuWsd)CeB#EiUAQdMY5*5!kBvFj}bK&SYC5&;+mjOt<8 diff --git a/app/modules/agent/engine/orchestrator/__pycache__/evidence_store.cpython-312.pyc b/app/modules/agent/engine/orchestrator/__pycache__/evidence_store.cpython-312.pyc deleted file mode 100644 index 7ba90aa2fa6716573d33c7063c15c9f268d8a79d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1138 zcmZ8f&1=*^6raf^Y1-YjShbZRn2MK3-H6~t#8Zn%VK1eZhzub!ttr{bI+IQkUf##N_kQo=eX}`3fau1%_!%YS2Pzer zr9elwKo}BEI88{029%;~Bu1we)F?5?1Hx+ugquf384;KR%d>x>;?cYwN||P17N=5! z+F0$!T*yc~%tR+D14=%Qrlaei4~ZZFk;#p!_=)VR$J_?vtRs+oZ`Fg+)4R@v6G zREY>$m=LC`L2IKq5Qb!n>=8C`4#**G0~(vf07DLak z2pw;u^$cy}t24AmkH)j3WI&VyZqHCyEw{x^CL{;7j;d7*Ok-8oRSh&b-Co8zp&Xor zUfJ=+^hIC*-D$k4zo>t47C$n*DKt) znZz(?M6Zg{#a2tK(_xa7JKtS6J?Dv|332*7uzm7v_QLCx;o6(EPqXd^$1R|?JtMc3 z$a+fVW;>O_GZnr*p2Mn-s-$?{kJUV4SO5m&E9A>4+qi8Rb_8Sj3}fZFfZSm0X)jDl zk3t*@k5^p+c1ViqMHk9OD>D2FtOsOdQ0wN%rq;E;z{;@}Z`z)PRW^G787e9qZ@vt7 z+8We diff --git a/app/modules/agent/engine/orchestrator/__pycache__/execution_context.cpython-312.pyc b/app/modules/agent/engine/orchestrator/__pycache__/execution_context.cpython-312.pyc deleted file mode 100644 index 993f9f0b8db1ed22898db3c6c6102fd004c08197..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1777 zcma)6O=#Rk6dp;lYweG`>z~+elGbaxl&o8?pyW_Wa4~iXA+T)g`l8DqOXIa-t+bud zZoS5bElr_?mL9#(i+fARrN{QxW1&5)@nsP;36xTLb8w)LQ{PBhW4o7(;LZ2FHzPg0 z_s#sKX;}nA+W5gyF+zU|G92j`NN2wTI6yYCB^Na$Ly`oRUAdtcN&_1>;)Xfh zu{+XG4K>0kH`B-(*$AiITqAGfBRt}2jZtH?Q7{S;qL>z=XUtajMi8oFs@Upl@ZFei z$pRbW@w&Q9)xEK9S?UcoI*@xYkk2xqk#JOJUCR zJU=i4$M<+y4l^sCnNDDCx-?W*P1h9&R%L86FfG^Q9Eh^wbzss~Sm11#Ra01gmEhGZi{-hg653FJHA zwG}`(LMcG$2#tsWMJQunI}0qAu#}w#rX?(Gj{+-1Y|Jh`#KuS`QyveC=h?0LUO;yP zmV-})IDjmf&_sxvB5mz1Gn?BVQ|`NM%EHmQpo9&1J__IS+WrniwK(d;w7NH4V}2dh za#74p)7mNRm#V%;!(1~75NmU9@=_^>OEP9sV7@nbskG+{Xi{))Ns#Ywh<-y+r85TL z0PUj(!^nlXTL_ZEBQ#XTJ|gEUU>BT*tD{>CK%4Qnuq#m*LLGR@QnifPHCV({VWx!1 zfB}hMPTegok}bV#=^LCfuA461)z@g7Kt&!lUjmCRi=BdR!hY4t;6$>Y!#vl-+8sKLSEG6(YcTB0R>bPV%xET zuvoith?yug8y6<3{=7iv9eJtViT`q$3FQd2^UuMYDv~6fp!vU%euCys(9~b3dV;D? zQSI5pjo$jFiP+Rys0Ye(@JO)ikV diff --git a/app/modules/agent/engine/orchestrator/__pycache__/execution_engine.cpython-312.pyc b/app/modules/agent/engine/orchestrator/__pycache__/execution_engine.cpython-312.pyc deleted file mode 100644 index bbbbd32abb9d2a3764ff62d4c5e61f8541d36c62..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 9183 zcmb_ieQ*tH)F z;YixbH@?A6)0oWBiJ8d^Fx*Yt&drqmRdSbUlj%%HYx%0p)@d_y*O|+Io7$9mH537_`2MNkhQ;HEsk5 z*&a?LMuo5t9Zm2-XuG>7*vL3;9ve*v?1T`YWZOVIoEQY6abC8lb#_d)4GQeoX_g<4 z3u;}ZfH}%ejfdk=Ve)ubU{8-H5-bOuv`Ri4Z+4mf33Zu{Md;b?-5kOeE@g`iD5 z_A3h|i6jc;hLZ+pX>3Di65S_)0fTG`@o-8W%3(MRA0TClXXBS-2ks7Wta=>TsEqP> zF~8scbbokktaW6R8IQAkYj~JV2(7HLoz_td zKEa_=CCQjmujfkvpIS+=a=n%>lhiQrW8#6f*J)$Y5ZjO+)oV$kemMvP`+}=noIox} zpwi|c&};^iZAXZuRe8EY&> zsdN4UNb$63+MG1;eWl-cUaA=Kck?Z2&dX0;O8&om7(~Jr{RE)8P}0za9%voEgV->a3rUrVNtBBc4Pg9cctpLB)Yg0B!YmQ2sxcs zO3xLHmbi2H-n>sNfKi`qqrgJo6L45d1t<=y2M%jM+4NFpZ(nzp>^j|j=Jczf?sGkz zX9v%8cilJ0hL)W&6&2VK9`C~M=PIChYCQ-Bf}I%S4o$sKtn#_>M9abWXe1ox54Ggz z_Q7NPcF2B>zP*l?ox|zVucU;VZ_d1Vdn)VODf)K)bX&HqPi*T;*PdK)ofMtJ-|?7L zH}>u$*6|PPIE8<&Kqbe&x<8bESaWC`YFN)9vVcS8!4tg$1KnMm9~LcS1&39_^D?0W zKkS1{WrDkJNtmlxsF|<%$d>iDiT<`Xgr#|$V>xWbWEzk_cnG7c;W%EGi=`+2Z zeX{jf|H*;AZjhaTg~LW)CL_XxOl!~sF9jjIcZp zP=x34IRK<6Ns&OAgiTL*O2{5IpZqFZIEBZn)s5Ne9b)y46nWD!W0`eHf$b^!tBT5n zp81}I;C%2KRAy~VbxGb$S#OKzZMi2bUC4Nkrh30{c~`3%B!A;w`VPJ73uJw}MBgr{ ze*0q06Eju4an7`6LuH$@?gr7_u=vu7d%NVW$hwLrQxW@(>D`xZ?r^cIPBXX!eTu3Kza6z;vULhq4W8*Wa|On+3J zt!oqO+J5?Sc27{;6HNR2mtFnoGv~5rBI21ydUzyrW@NQ~N49>qSigIYT(Hbr-g8Nn z4a@F^wFWrX+6$;*%iZmFwrA@*#QKhhyZ>R|-|x#F7!VH(q)(sC)W0HHd@0kM>kHS0 z+?H0|)zYSIt2Is8njK=z4r%iaIBr?_6Vl{xK5-&oL~W~B+nPFdvuCDfwqNr2(zNea zb|+le^w6ah=kSVsc(r!xdMaR*dsEs{^TdjrWgy`XlPm7N6-S>!xKpg%sZY0N(g;aq zr8cp)O&^k6H88{4ZnW{h|L}fz%Queh>@^cVYa@Co)6aHyRzTxZiwo!8u4X9K;b`m# zy^Xc*6HqD|s?2F+h7hn;QBrAZPzujX5Imp-hS2SyZr!Iz#xM=e65uH+NnQcHIY)43 zlN3Wt0al!*1gpMQOmWZjmRjmocG@J+`bf;B*YYI;NHmtimihjYD3gd`wOy3pq#KL6 zpb5QLbrdBy2@xxSs5Bl>53tUGq~O!dYP~Q|8WR~?Z?&!*w8=%w3NFG z&$p|${-9kYNrt%61(wELus>`di&DZ>Fpj9nLUkn0;~fYX!H`!LPBx<1mh! z`d*<^@5lBSvM?uf_=PZkB@|^|Y~qz}ts0Kt@QT(@V*sNZrU?sx4aWpr9p=JgmsJuO zO_dj}(1KTJc}g6Ry$TX|T@AJ<=vYA*EED}Th+V*_;uZ`|6M~IJFToaI za-PFlNVYTM5RbrH8sX&)%AD%1a2JLwEVFJd8_RK{TqrWiu(Cs~Yv6)A0`mp@GC2~S zkjZF5kc|oql4D&2W4ybM1&o~Jd*9Ng(Fu+FI@`pY(zGP`N>2iItlOhS++Kr66~!?MlcOTisicB3&uw#CD|5K=fO+Z2((??;g7b?*pEzwE#PrjU-| z;6U;47)Ey_I}zcrZPNf<9@TL>pm)mGt;d+ucvwpjKs^FPd;^HFits9{Z|%ArS!}$! z?asDr{eH22|8o7Iho>^NhclH&QnXa=NtvZB+f%l$oEvV@8E2zJd*)uB=}R47t=jxy z?FY4)szB=HRl59Ua3(0Z$0WB01F5XrFS`AJ=@#gD8W+xaCoUZG4#{1q)c|NMmOpV> z9L}|JNb2NYZi3qEU~_;896Qx-vQq9cM(sYRHKT`-yjlmWwU?ICV8rF zU0C)6?lB+7?#Hq%U1Ceuqt};PdRD9JK5YJ=`5yJL?Y>QAP^S8Dw&Ji@arigiu9@)+ zPuKP%*T!4)inH-4e-VV`#<8m2eZkURA`h2SqhCgq%Kz$v`#5NSv81Z;3 zsM-aLrJ$oY@x-JOPq|4(3{i-EUWEG&@kX*_Y?J&;!)zG^s1Ybi&Ia+yKZWN3YsNGS zUbtS~8cv&%rt4;gNE$KXQsZ1nQz=|4U_GLwQuy==+--=o9bgQ2CP1Mj=ZNL7t3DS( zur8&?*CyfI1pH5vS0NM;obnbpv7li?n(|{hrYeg@`0+>tbY;g=q9b6IZR#i=8cnDg zmmCHkHW%68fHg=qz7dX(vjKBnv&m-FM3S|6k$ROVB^4xsu2X9H9N~vxCzm|90Yn0pPmC#f7%*Mido1g|DhJDN2qV1^3H4#m>uZD%|@$#ODX2seVN-#TIt6`GwaiFk**DX-Mj{*`@IK}7CT|?-v=W~nqSH)$LYSex?#1Cdr)Zyt@Jjx| zw1D8t2Y8^RbP#BblL-C5lz$~D(6KTr^3<1Z`GiumtVa6*+jNKBKAWB zi_7$Lx4oj5|4xbVyiW-y0K1qR_pm;0#p|7x$Jnqn= z_PDNqTBvZ?%M6rp*rk*y2y+X7YLtiX}cd1w?^@Ze((Gm5f;Bdo~|M$I=8$iYX zEo9$wyjre>&>*CSn=}d@yU#5 z3WB39kLdDAZU}ZZitfh6Gk4G3Irj^93&1UF>k|vIx^6mWoNET;c-bJ)E*u!l(wjtj z6GS$#4#Ne;)&Q|j&YV;upU}wCwIW?B(N%b$f2LpQ@{6>8nSNpM=zn=^RvU+}XfR;n z%Aw@2&fq*a!}kS8jfHV8AydK81Pk9Y6gFaG!@ULBQ+FIb+n*lIc_^>}Z{pH8uopJOVYAH* z;f#Y!Hp8Wd-zf}pJ-F2l9~N4)-wm`VzZ+=Lei=}BgIjC~x5cfkE!1j&rglvr@2;xgr|4ZcjH|@{8FVU$lQQueA>QrUc bS}j_uZ|%!i8?T%G+jP`G*uFtHSC;r+z$@7! diff --git a/app/modules/agent/engine/orchestrator/__pycache__/metrics_persister.cpython-312.pyc b/app/modules/agent/engine/orchestrator/__pycache__/metrics_persister.cpython-312.pyc deleted file mode 100644 index b9ff5fe5ad4f683a06350a1504e3b3218bcc5758..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1607 zcmaJ>&ube;6n?W>t+cWv%kq!dih{RJ+_KPEB)x=^76MIuaorL~jYVNuv=en*X;+j6x?eMJrwsZ=&iRxDb$oUVriiedgyJ5Q(AoLd$X&Ay3i5&_M7+Kym{}< zoB6I%DFKeJw?Fs4&jCE4$zAR^xn8cXw{->@aBW9< zn>a|n+&Ez=YZo+F2Twl&FMpzCvf@y)jX!8&vv|r4f-rI;KMdq1&ZqBmc@W*>gHZZW zD2APMQHq%dc6J-*$H1Y@JiwTAj~(gloC*K`^YWgCcKR@98*%L&9tpoA-{V61GUB3> zc~@Hz$Lg@Ny4q>PM&Kv~!4LzdSf?EEJWgASb;)}V;?fJ5BrleAzT3JlahI0c_PE?UEjJ&RZ=9BIj2D;3E3b{0uaB2r z8aJ+DAD|?ehRV%9p;)Q@{j3hPrKiAfJ>6n`6{N8R!n8Cm`YzUszI!K zekT%_XKIauD3g5y;Y$z|;#56BZKr_Zl^o#+&NP;P zIWZRUTP!i4KA#j6EkbiSF%>PrQZt!Sv<$NgNk!2r%w0;R6|KSiVlty>9qJ3otfF&J zsy>@1nnpmI+a|^QU>8e-@e8_0aRFNxZ+bUw;v2A*y#Z_L4On~e#-!CXyFA)Jb1uX( zt`&;}DytP@&oezQ-cB98DPBPZU2^#<0v;n{zrxBBsQwPOelr`7EO9kb0=N0YR$7sc+VvIM8Gc^M3F9 z&6~Hge>68YAz0@w{iyvWA@nz6_yV3SVe3=amyn87K}UHZBM1!pbYEV~h8tZDn0UfjwlmY@FxN<7?TiaNHGl4R&32Qtb|CL&)vY;BI71?#h^`Wp8|E! zq7BoEb#1DEv)O8#>Rt;fY_$NtgfPkoD$4j&Q59}W8F9gvkZ71iIcw$%nvO|U+~M8; z7J%hhu3wEP|p3Es8lysP;^EQ#`V*4_QVVmq_V zs`6IOy9UlxDOd)$1Y+&uxK4BX>zE_3Jiu|C=2+9-TYFfxzGnvP9+vI@w^XGEqUwL( zgW8+9wj}1dIIhzay8H`5w#<0u#Bs80C^a$1t)54d*E zjQ!lAPICiw%+VfI403&)^6Z?#sdmXBAL1UMALh7D)!;SovV_IuJu-h>x8;Zki|c9w zoVtTc7N1DSKE}D-?}X3(9(j&)?>fDfLWuP59!+I)v)g^`5~mZv#B5J^Nt{B7#*5SN zYDg-^g}1^uycmtDnO8JJ)>PV5AZ8X@mWQ*ZF{`QA$l`>LHdt9~C`2=vGmCEYP40j}40xvT?qkD>i0K5D?2m{GNO2i!+~1(}3l@ zPbA{W<`un&X^>^njH@IJLc(UAuw&51c_>2pQpXncTQ)9ORLm;oWadUg7IZRC^0b>v}ot55iOtM$Z4<=cY4GI^(8ICv8@S3YGX=IdwOEC;c@1(PreJ8|iT( zJ*#7t$iVt1?&w)(^sGBNSs9(&jP-vjeHVGz2o<~uqj02b-@SR~<~OJAPrK0}CpzRt z$DHWcpP{kMj_69~a_2_h=~dN@A9v!%-S}xIetM(hOgXifejYhk4sAi3(Zxi7uxE}) zY#U-5`$N$H%wmxko*4eZ4YF(~c`VDcNtUY@4md2!b45k3YRCxq{e;L-7K6QCg#8M= zjYYKBt=>j&d~N=gstr?LOaxiP*&-x^=!E@g=^#wiaBZrFy*V4MPSx&YN>MyH^J8u zH+yZW6Xk!`9}bFsB}xNak$f|Z;h)+1J%hI!B{N)-2^A3-L)o3=LdBf<1(A6GoY)wW z479vqWR-~A$ww5eP(*a2m zWntVuty6d_RFh6>_QzsUL{z!36jAK~K&?Xk!H6QOwgR zw9Zy&FKPQ#S)y{gKP*kR_ezsOj7CE!RG2*8?hm$#G&m_mTH!{muo94Dxg8fqrHIlF zlkMYCaUv`MzcwR9MuQQl9gJm6!b^kMv};e9zhjj8VsX`K+&JOcVPQUF-U6qSe*xW1 zl51>EnR708CUGZ`b5v(8r7x}Q?aVq(=G^tEOMkalrj$$~o%qq)i-Q|YM^~GUZZvhS zHg&GqI}6m^S;y(WSSvHmv~y0}@El$B9KA2DdroAn9l7o4W2>HH%LmpyomuP2uS`GY z*FC4R)}Eq;_Ek^&GEBdfwSFV#s!ch!5Nv_G-@!3Klh&NXpJ1>+l)S+c@&H$%&9HgL zQOu<;kzR7`0#NWtK9qN*`33EhWG4x22Ghl-Drq89p64F)io677( zUUOGob|6tLPQ=2&fL|#fx65l%IayLDIuzBSVKFFD2mWz>QS_Qnt!5oCqPPY4z_}#s@w||^A#&ipuI8O#l?9^4w)W0jq~#)s!?P`AJ4*W~~q{$^)eA?)M-rCrtnozDVJRc{2M= zPQNm*02 z5gtOhj;clia9Bxw^EE)!>9#A_oqZ3-3h04260**-_Q zYzC2ptiy`8X>Gj;O}BF| z{3nj>X6J?Hh4|;|4o3t2u-xN=9gYB-EJ61r1PPaWZhF<#lB;XL;Z*uYuC6iXsLAxF z`xk4nj%N5>h|kBDYL@7F-Qnkib+*oNpSnGB^4*i4HneP-U}DouoVA(D>C20~S;xMd z!=1U9zPQL|9Zfm+Yq|$0))VUX1nSlYgS*T{$m3AI<@E3qW`SYIY$Z?PST|FNT0!I_BasEi$Te0o+={}gH;46q~)1p1*I~2T@{s{Cij@q!( z^o!+1tJb~+O~*?$%q0%I%A+7o<-bDrZ-9sv6@15k75XUjNzJJx5gq;e!z(qXQa0#{ z;zd6L0i&*A;l}(81WG?M$K~9f#o(IzV6LVPqsq#@j^)8e!w-j-2cGPIa^=a{m6pDz zH5dN{DC%c6InD;XgS^9>WB#!BcY8mn>VI4_SF_MK-}qBysrToXKfJu&(y_XyW38$` zWqQ`sdhcq=`mC|#-r1Dp3*K(4-z3m|zLz*$>y>RwSF@FES$kW~;mY)-`&R0XXB{VU zuIg09i|22V+O8MRE6JWqjEwH`uKSFS|Ck&+bAsPdtQ7K)$3O%iWy=*R<-!q#{N##J z+>~+L;C9{ww}UxKnW98wu7hI131JCT2mx?}e1l-ahfu>MZD*b`dpw_UK!R?XqToyt zb=pTym!U8e{NZqPN)o%gW(u*Ds19vH(5PfR7qJ)R%Nj^E=oaTAv<_Ie;aQrEU@5UX z>WZYxr-4$w1|5LT?%J?7tlAqk?1$FuhjQ-P)P z0c9%n9>trunQ$Co=EbwBK0_N_F0`)SoXn@&8zX63eR41hPl;(+2!b>l`0 zp%AmlOB+V0??I5d2G6rig=@4IIr6Wq{lji zVo;*!BPc#4#hgG(8T9AH9Gqf@UQ)(l;uhIrohHv#v&H1zs&0g?8%Cd3+e~hq52@h_ zxcSHg1YS4@#SB3`0#&y!Uv>Mms@tbm-M-?g8!4o)tY2Qcw|0h|=Xz=F)&=#@J`jx{ dmC*}saty=#ne6`udG`zR1%`1yC)jHT`wx#wS ziFATW(t|XOG?QSG>>#VtY=TR=23<+_pqr)`>Kr9IVN8D4A8j7zaGeCtc66lq)uGn)5uBAOadq*1Nr%2+fJS0>Iy73r!p6f-(B z(qixQ$|HE6r6g*Q7O6o-42blH+#oB~i45eN7!+B^U1B}ViW_u`n?x7n9h;&aFCFv0< zrpUs*10B(LNF?!lQYsW39SuQAOp@geEEtwjN(cPekxYwY2?^Tk|46CfcuML>lh|!Z zR!CGyla5t0X&;@?DxolTN5Dx>Ze7Ew_EM=AC%O%iY3e0k_wmGoiMe2*u`Sow_I&$7 zUv?tTpHjW2R-gjq%-}sxGE1$;V3AtQOoF>1Op_YSSW*j_=F<7Mie-9 z8(*WSDfc>yayz1i$*?8Vybt|Pd8WJ>51}9J%D6|0TO9_n9umlKBOdG3A~N1*MXb`) zqca)Tm)5z?QA&l`Jj0o-Mdr?Kipp>q*CZ4UF$2Kxeu8Wwxcab5a|=3yH4h3vh>M!{ zRw5m{6Hg6mZqO4_O4QhdlnPhqaw7HE)IzuB9g4;iV?>fQ@BJuAK`U9~uqTa4-_bmx zq(HeW_PjUHFrm)`}B%6#_%P4+-G0DU|gZNwDz?%2N@}MqX}d`m?sr+Mb9% zNPIuB5L`Ss*OuRM?!m=u?~Lc~dH>7W&4}Wu?@R$T%RlCycz#j4`=4#}D<1m!buCp} zH`DoW>It3Wo1b*f-_ErjQTZdP_sCk9;8xaQ^0z>IM1913#LiM#HcMrhAr>^D7wI7e zbfHPH7R6bV%c9&C<*_KQMO9c-rA1X)RP~2m(f8fzDGs3HsL)K|1B_kMoLDog3!b4e zu4gcNd;kV~f6Snb6tM}LgI)o+P@lr$9?(vmKVTkE=79rRk?x1H#V-))?pT~iqL3a_ zM#mITgZf4`5QAXRwczyhv@ZJB-tI&+c}tA;Ozv@zzYfRtZUA94A@=}b)J63q2O;^d zX=D?UN4{!l!cKQ;T)^@R<#sd=1R`UR=5_Y!ug9>=Ta^_MXh`J-Nu{_eM5& z;tfKKq-9wciYFu?1}1MDjGk0%;>~f>YF~j^XuptazwqKX?N__jpA<`EL{l=9|`$75losOIMn71~bZ+D5vJntI7 z`aOw&ORzzR*=1w+^X-KLXL1M5EXMK&E^P3`eS$PTnur3!Z*K_0(P$xEm>}H4)mm-2 zNuq5l9qQ4Pd|x6$nv~8NZR^?tQy798_emU#+1gU6p&B*+8a1y4i^`KoqiLcPb*Q$< zSu<(d?fX4BCM&=a&{{aFTapk>B+~aKQ42b4EUnIjt2~iXqT@PhwJjDF(nH0C3BX+N zA7!o1WH&4+8C7(yUjtKz1&tGS8+KYFvae*>yLCHE)|jD`?1rM7p_?~DA;Wgx4DXYh z*R$Q;f>L<^lGoGJFGJ^-_g!Azdu2J)x7>VYd3$7e=cVOC*O#|nTyE`M-g5!cUp4vy zm09l)?)Go9H>VAnrXvQ>tmhsK@x;N0MyUio(* zzz3zl;-w9X7hHR@mMxD^AG0xL7~H@c5pdAh4C~~|$@HVz4CCaoIl5x(2>Q@vk7-(h z`*%bH*U+iXpHkmr9y5>5a^QGQu?l)-`eSq9Si^-w=Pkz2@S9@qQ(>RCFKCfB~xK$yNs#m_wQVKnGNmzXJ*Qb5(q{+mhd_j5nk0m)B%NLrBr zC@Vz7Gq7zsDHtu;q~%V?g|Z zwZ#Ig5ur3hQ#OdP3T}7(Db149Kpo!vKf{{y6}daOUBKzga0JFgIEt=eT8}BX`?cz! zcnS;vL$_*_#vAXJ;?x1D1q`>!C^MiL_G&DIu*ek{Q>#J~2n;w>Tbc|0j*n{Gt#mq} zRmK77vJwT$TH_L+DOW)j{d3J-9K515XbAo zKt32*3SM}@WGj|^{+XQ*-(T`w`R>Sk<6lMcO~;m+F8?^T82(Y}#ob)bWl(y&|Fgi% z0hK?hdXK6tN7Uw{2E95Y0dt}_`00x8AAvx{=cMeMRGX7hlkG|qRchHYV#St91tKWX z5^fOPfIP;AFXnf^mxWG|)$s-DIKx`_;)?ik^`JudT_mc1A4+ow%KKtfEG`H`h z4H2hR?`gH=l-hh+<&j>C2-HA2B6jK;YaK*Djq(Q%Ob1C?8ZE;p7ADMkvP)z{){u{r zwt@KRMT*j6pzIW^ev3qcR_p;G!r^& zlTBr{%tLu7E+s^{>sr|3ghZ`EN{uDKcn9;66XP+30K2Rs*n+0U#>H`s!{N*I*gmN5 zsK-k4F^tt-s3^}v0{HxG7~~u0!k=IJIlt#+-DdTz4t2|ZwQj#!y??o}<;k&p2HIa336NU}YV9_<kMi2loEO8m+ig&J0S@ItAQ`-4YZHJELHhe^D)*_Ry?^~)rzew`_3t*A>w#*HwzU@oCb87g+;wCkG&UUKwsop-drB`k4 zQ+cGp7k(@v>7Tj`l(6Bw(Cu;F5)GZmu%Hm9`e>>{6%?aExxZ_Lk** z#L@(I6liD}?ph%f4i@D$XJ=f%TP#Tg5up)km<-=U3RN~p z#=c-{`Gd3D9&ao7_vHM0)Hbva{gEX<+J|o4KAhe2c#pcRD<3$X_jTI@)vJ1Y)t1w0 zGwd&<*9r{f3~ROtxtCJ07d{f$@qH zJCz3^StHf%1@H<^FZs_cUe%@gN$bqe?8xJhC!6L2`AvKCfqjL*!Cc^AK5#hiJ7N>^ z3DtW-ZRu8(W*$JOR;l}GvyiuqPZ z5F^+o<6XKeO5sAi>`S;hlX#_lfF+oiS~Q=7X~9_h90{$Df6xwi5L3S;#o_Xg>l-6o&{wQl|fV;4jAw zU=D+0-oY>`}p#GPA3rj;cO5Kn@ z#$NvflCanKp63(%0|$J~o8JV6GNJx7d{C!5qB!`fR{C9me!S|_{1nTbY8IEVZaL@J zs!sC?LMob+1VO751mnv$psNMpE_`igln}gMBbzY6&xHuyNst|wV0@3XVS*kqK@W(a zRZY-pBY3(Gk3%5`*Q zOTZOe+0D83tWsc>yx*~Gc7(JR%gD?+bSvaUWo?LqPcCdV*2{%c4s z(Yn0#q52`D1*;tz0};c@30l<(Jg8f1;D0UatwX| diff --git a/app/modules/agent/engine/orchestrator/__pycache__/quality_metrics.cpython-312.pyc b/app/modules/agent/engine/orchestrator/__pycache__/quality_metrics.cpython-312.pyc deleted file mode 100644 index a9b6bce3f95aaa2fccabef081d892e3324f37be0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7195 zcmb_hYit|Wm7XDIhC@;kDUlNOqD(o8EZTb2avr;SI0>cNZEYpC?ADPj(PPe7rp$+O zXDCa;aFb$#1q%d-RAV7IF<`X~unKHo6*NWtX8}3gMP0POk{rk6PE{a9vcMYq$BzID z=hvP)!yzeE)~3K-2$%P9?m6e)x#xW6T>ZYX(ndfT9RFGP7cPSM5_gP3=?(J9Ff^74 zp5Vy{5hce-61Pne)3^zK%@K2y8mF`|Dndt@afT#J#1Vq0-z9kFrb*{AZkadvEe~+V zPpWn<7K=-q6pqKlQRq8I=7dlJcLVX5B+N-LW*d`)nUjK;h)5xwhh7&Ll1~Ppzf1_k zILQ;B3d@u4QsZXc%A4Sq;%&Scerev$Q}E016`&9`Zs99=27cLji@!>(Kat=fVQK!j zAfa$b3~-T9BEm^=6f&2Iv_l*E?WlE|v24&jN@fLNn za3VGya_PU9;UZ=)jl+=7m^D2!`T`7$!1@q&ZXpx*+@+R9Xzhk)T?{L?|SPqTi&_5?D?|wT9x+nTQ|> zyq^N$Tv)nvF%gLYjmn1NvjXC#1eFoN$PyxO0b3INm8w~kkZR?S6u!uXBvG|b2@;3~ zn~O=R)lfzRl1L;NmV~INRtC2)H%Ek+YK1ig5td*<1~n7mV#tFv#|N#_vs@%0_-!gB z3XzKlUm3Lm>k&knQH!Nrq9(iwe^^wDD{VcciO25AS1jL%J*Pzhi9K9InClr9W`i>* zJ}tmbg0lyExUi2$;aMT(<7Q@jFoRF52Tx4F_IhBjCmQDy5dqd~BSLH{920uL+%E}m zFxc>W-qJlnFsi$R?wNU&zK{q<_=T2dIg4&>9&0K-g6bV&v)a8lwmh*kk*n>_)ON4^ z-EE}QzLu>$x^Y3N{$7g7yFJUtmyYM$T^V;*y8G}(jp828y1#$dl(H7*4rJU16n9t3 z`h}+{=kaGe{`ImLeTGv4+|S#xtrrw;=n-wMt9oQ*owkPrYqdRnTtVy& zks`jXzwxvT)6U<#NI@MkJS6rR*fVL~a~&GX1b78w7Wzg3?@{!R;Lj+Yyxa&E!Ni-A zlvMCM;4>)M%$pa$zZSg)4I|`bKqzFA=@`kA;GYb%?x1#4jUYW&I;ch3^ z!C7D(3~@7D2*3<=;WcMfE{14`Xs%KkM&)HSWVu-bYxm~ZaL`+Da1au&_Trm~~v@5m-p9!uQIgLrSl^vlPf6Q$KfP*Rk2e>7C8FvC#fCnecV9DDG zK!%qhk~FNOMYx<(WReDuW@LJpnDFCk`3&f_U?Y&tw@fz+T7irPnVBxaaY>MDG2n z1m3_V4TehHXjl}(v8lpriCP0!wbG#0vDT_m5+`0(9lCf81`(j5%8Gy}I5bsRL!L^- zxTpY@8WuI?I{tx$Gk_{Wj7Jb-5U3BUYST>>pLA�N^@L^eT+2mVzeQhE+>JZEcU@ zR>afobPp_A*!yfdHPE;R=)^xl1vc8-_iOeOHrIPJ(|a`6dm__&;=b$R>W|W=&*e@F z%4uQo$nvqP$I`BgDHf{#aCq|d?P<@x)X^`zds3FXyZJF;vOb?0&O2N=M_b0xw$`>D z*kIBp&!!!1pF7Uwou1{YrK%O_b7$K_8b}|q#PePEYlc^b*Qwh_vb}+y9!l2?rz}uy zI$euLu2x(ZS6}`xnQ?Ze=yEG>Y0rDx;BT{~b+zNeC;-u_=fiW4DlORHEf{7R2=^5E z^l=U08X-j-9sHs?V55Fj1=XD)YrsK$#!^skiQ2K-)|^5wG_X?uoHz&HgpmPNv=%uJ zkvC5jN9n>S1Gxb^It9z1{MX^BKCS%sVbv7BJoUjfT>fl~etB4}hzSBOLR2#w7Otoi zL`#v63BOst2F0L8#NYw$SO1_s=q&i2{XzAZY6Pf6h(+<|1P6O4Yu~eabe+n!9Rk!Z z8!`X<^}MS!@2EvD0`ZnpD7wbGTJ8d_aR>A@vI1}-=7JLexPiRHJdL&9Rt#!zF7Dka z!0|i}j)zK`OGqqJWm5JPq!f|3B#I{u2PM{kl$|Jw85C&JE}KD`UyIev#>ymJk}DOn zp=oSk+X@di!EkV(A5%C5h(>Wd@qeBI1F}7u?4sjKLQIh?&t^;##%!$^l2Af60VvFX z6l+=TVwEs>Z>2maL3*wi$YgMoyshwbDcLsmznk7kn{0z~J1n!jWdR^2$-XyIk|E(Z zUMt}GG3UZP_$xR^$~Ys6kZ{tcbEG94@9S*~&l;y8vxbx+V3>=5QED*&9oErr$S#%K zzrddDZaqA4PCTGRX)1#RPK?J8{=x{bmUw_eQ%Lk};tb^Z5s3D+WC(?4G>;AA5+p<7 z708}c6XaR6MyJ}s03$F3iJ3}8!lI;7d^jW_oGq$m$eC0NRGcIsbP$XB4whoy7Ng;n zF<_}nt-O$kK)Pl`c+?EYRUINECVKj(2Y$|CYFHrDA@L31FG5ILir)-Jf}Puf|JjaY zTV#0*GwJ{r03Kz3Z*G5oW`Do3fAGF@bhT~6{oBSnjsMoX=w5DIYW&CMv~x5?L$z7o zv?knd=2!W3>DO<6^7e*!@1-BymHz$h-@TmE3fY(&zgH}?skpRI-qz5bKXG48&JF>+bJJbgP5<~1YpwON6)Rs*O9XKZ_@+E z6vy#2d;IC+R-*cK@~PU)KUG^M#l3K1S8GRVsgG-*y2I=nX=LwoQ&4|aS39zY{j8IM zx)_e)(5;y9oCmAH$WwUn+12;%YOAzN17-mdp#G9a1FyJ?FE=a|Wcx^>EZ3o=V$f<> z-W-XlfCgVMt;m$Inm6OzY77EQo|+|)@Be`h4SbH4c{|f|(JvbE;SH@AdX~m`1~37m zIuzqX4Lx@|i6p~YWb-UuV~1T9bHY*xtnH80&i6%mXMKv^SC@}#@LYxSN94S9cO(Qf zu*nup2mDlO$8Ak&1)Rp;e|wpw7dcHP%~xt#zw!(YJDpys~?0%YjUQQh6Y44*_pfgyZHwAV9)Z?x8h7+XM5F3dx^3@L=> za``Yfg}5lY{``4^#F`Kx6X!%hJhi|=+lSi;j3k*KXZ|7mtMtF5*E8=7;fsVH z=Auy!&8sZD_wkT>z=N3{2|_@KUjfvrsY?R79F7GqKq4OzR0k5^=`IRMgZ}=F!k7;k z{D$-agpA=19f{*dMCw939zj2X5p)JuT8@Ds2w^Nm@IV4!bcqvH3y6wvA;EYi*eQ*A z4O2sAqiXT zaUezI?T*Evti5&9IuWd@_k!WgWYKkMqhb!xriCdlf? z3ifC1EqO=H`^ldqa}Hm|;ahFG=jehbk9?-Tnmv3mk;l1X~H5|+|98C8GHcl!HN3#v1cVAm% zHa)GY?YG(#Pfykp_%v{v`Q;BbT0eO`?F5OQ<$-Xw=#i)CMkhp=uMagdVJ5dKnG#JteV3y z2}yXYFkj+VqAZ`s8IMX|jKn!ff6bl6i!};-cOlE)wl0B3Sv}CvZuc`K#4x2*WrIPS zjR%9OEf~~abfH}l488?#xB3i%%tC+OLO6FuK3w5g3E_*4j^PUDN_sYilM93^oFj;> zP`yh$F;&yHC+$wC+T2ie(sbREs%m3+^s)2cb7jncMHb9zVvtaISGPgSl#*URs(+_A|mXIv>j~Q+BfWguE7vW o0tv<|5kKTTG?OIxCt~lHg!Mm(Q-2}?|HE7+$$gIrTx)y#U%QTnrT_o{ diff --git a/app/modules/agent/engine/orchestrator/__pycache__/result_assembler.cpython-312.pyc b/app/modules/agent/engine/orchestrator/__pycache__/result_assembler.cpython-312.pyc deleted file mode 100644 index 022bd7ba12935027a9687ec18caadd3abdb091c3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3831 zcmbtXUu+Y}8J}J6`d{M2$=P&CaAFe&Fc4dT9{w@?LF|22Tm~b~&7j{F_a3 z9Borfvtlc@UNJ40#^0a8YL(4KDyEHR>>N+KPZRY#wrrx<74i|bs)kLY<2Ii5#~>wr zSXB(&zWg(66J51N6ho~Vj2mdtk@JcY@sX{g9+q88Nn zD`GLAg|xsGp(to!O@Oa>naf3Jr@!ZWmW9jb3{1wbQ z3&eA=th8**PhW;}$-1fAvOFuT@j$*sVOPrPhVFCJkoq4=M;;CQq&{$DUic#R3|5ia z^f()%Hu!m->Vx~Xu*yR2vp-0h z!OoiY7AN1aMii!+cwMx2wbozr&+cx~Uw&J+b(JiC0{u3m@>59VC&24-p<1Z)rvG2? z0-Vj_uBK|CYy8!;06OMEtv$5Rb-otV!q>&Quw7`Kp%$o#wQ!C9L*#Zd`;3DW=Sf~d zx#$>epVUpokQLLqgb78o)1Rvzv|HHD2{bfqD5k7yv<;9R#x`b?_{!uWfF`6B8nhtW zRIQvyBU+`b=$=fp36)GFs#eTNUBjk|X^>#W0-@NXVi@NX^@3crutq~xRb|KuAl+s` zBC=!~a+pD5{-i|}Y1mS+sSv$F1$I0tl1kOaw0$++l1}gg7!Yh)7g@223T137RP?mw zBpQGmNFxfd^+^Q)pSDe5TZYrxfbEQn=+iVIn-x-qY&eVM6-9&r4i(Q;bwi_qtymYx zfVXl{F{+rbi%fpRIu`h3GwWDj(-1qZZcdS2w#04#NwJPaBI$>Y1`KQxmhA{b=v;&_ z*rEZ|o}umR*s`BYEV7-g$B1%i)v4Ge_N<3g2fQQ)bBiHry446nJQ{ALqV>tAMPUY7 zUjX`lj=t|o{BC?<;@X6p%sa{atzX|E_2lt~$RqSYuG3D}>3Y|P54+Aj`1tI6 zup#v>#TH|(H0(&j5B7}Q{irUDK9t73Jw6|6BqTR6?f=dh2k#`@no?IfyoISqd+PT`A{CIaew;QsE!HeM<)x54gR%oZelH{;f+hi!*Nj zUZ;O=BfI_P=#5b~d&J2eY4oI)b}a5#Dl8Vf5a8t+gI7$zEwfE+M8wYM4y>YbOzvuf*_K&r{4o=>(@7ni2yZ4!U@{Dux%!5yH z{UrXq_Hb~ro|$?g22vf%VI=iG*`A0;=Y{7xQGDyIO?M7{`{M_nsE<0e2Vw1hPa|mC z6lb-=-*UgbZ!{Xeze|Arm1-#nM6U*b5@}5hV6W5wt*mPS8jT~!x_pg0fhLN8N`aSk zRV`pQkppV1rYz~M@f+0vwLlAvICORJ6&+zXk=I%}0LS)4(8hY~m6~Lu9RG5cRl9vE zfUa>gfNbU%uVoQ|YWgg?TDpX00%y@Bjxbs-M5DT;n*de}hXg~1@MgyYn3$f%CWNu3 zt2XU`at<3Z#Iddca?}Vv+1&LZS{hXwd+~pT!)-;>(LI!a#U7yRN3& z07O`nTfc!0LacN1mxEs?9(8VOypxRif0;e$tT#~b!M0OKv$}f*u3z;wGY1TaWjXU%%MAb>zQNUC4Rab11-zlD4v{e z|L=1VNtvgJ>q`ACv1K^`-xpqud9Ne;-ah``zQ}Q2{1eAP@4HR#@MO0Cbq|7cEj?B- zJz%%1#H0e7<$~m0u!}IykbTh2#+ko=Ill77m>?sJ=3yM~jhiel9~Tq3Aghv1rHo~n zMrGMAv|-#XdqurZAze(-LDn(Xe}f1sg8cu2m5PLQ3=iNh{7_6x z`s|EpEZ5GqnXG~#uqA;|LUcdej(oGk&wC|)-Y@ayrfRHPMKnbOHhSnJG5^Ve@x4Qw7 zb4t~sDv_ut(&>O}Pau^KsnYg((n&`@wN-oKdiN!ck?ih)u2OZ<-8UCdd*!~|o82AT zgdkDrHu21xdGF1eoq6--x9@KbhYi6q_vZB&>qh8X+#nCF5!AgR5SI{-cq)OCREVN5 zZAchG2DLVZj8GdBbkYA%C+EMptM$~)qsW(&z(cObHSkZwM`iUu7Bf3fKu#{R4Oe; z9Bn;;)4Kb7&kEMiwQK{M|Mo$QmEJozC2+ETQS+VU;L{eig zjY&yi4o0MtV-rFY)LGoWBb}UxB?J-L4%|KzNyK=p3?1$lCZQ!y4M$|*z+@_=N;$Pr z2PH{J9@7-rF6AdJVr?iA?Njzxu3M2w{m3dxBCRxa~wd(-@6LKuxCg{ZbRud(OGrQ=ibo-X6;=N6=E~NiG;iSz=S<*J6mNW&T7l2-^f_~g=B>Qx933)EQ30Fc zsa&!#K|B?U3Zqe`VshA%oRd*#Nk|-5tR;I2Lo6xQk`2WnfeV*RC?<7q z#jFjhSW5#+*f0G0^Pn#>G0~e;9a`#*j0-8bSJUWCR~*A$Npq^;#FWB>!?9FM4u_{3 zS8%%^;d;S}bOwsoP_Y^{v@g{U-s;$v>lmD+&pQistxI+5uOE5u6=-pV`c+Hy{nuyS zJFD^5EY)rLVC_Os<#`*Hyz6eY^yOOCLEB#NH7)t}UT^uh`cKV&X#TAFX2a(Vxz@eF zV%1?bT|b-a*fdMO<-7;B)d)7Bhn;ZrSd{oSJ`XJX-oR&K7QA#1qVTyuaUy}W^(RBa zX*4Y89{&c!|6c+98^a~zn9~L8T8a!tIWq#yyT_j{*1Xo&yul-K^Z%q`tU}c=1uX^IV1gG%|hn*4*H!zE}fuw zby?4F^5Ytl$%I@hJra7GR6%3fn`BouNmgCyTI^PVsFJ= zXeQ&9>v(IKCRBzYZ@7Gv8EeKIuP1Wly5im1%Dsd-*@=+&R>ry$U9d$B<0xu)`5;0w zwv271vEuDSuUzxClN;fd{bG1Q1LB4IjP^0K z5xs3V|7$3z^S9LUk5Q1u_D=)vyi#s`Xgo~?yra|Z%Bv>`@GCW4yL~d2;A5$Azd$gj zA2WiAHlY<}RsZn_z(sz*KW*6J2f#^3)4ZV2ydXstvvw5* zObRUn%v5MRmcor=SPOTnj$|EL8!Tg-D+XX8rd+ zz>i-p9OIu|E%_xK>0%nsGc2h%TV>%HVI?2177~(YH$w@lCDJ z@pLRDdQ_dk;i1ukB8F~?_0ZtR^E(F*4((LUi1-E(8!^WS8=#nX4L(0Iv{Ny`V3UHl z88aNPUuiL%gbe_+qcEo^BNSV4c2(>ii_d7?sZ`tPbh$ zH;@D{5SCOigBRi^MlS@#;abFjK^%l)+P4xeg9X9YhcpL3;$P@LfXZCR>B)1gS+4b3 z_hRq%#htI@xNx2cFEZhR$9HMl#cg>{XV%j>U!C&=XPJW2bK%vwSM$!*S?B6&CqAZg z&ZlSTZ`?JPS}wNa-GQt-Fy9Wn?x$zXU)$ZctLh6iJq6$98||M4J_&rbD>txbar4Mx z&EDI-*1WGH>+860p*>s?(GKoDi=flnmGyREkawGFF1Ty(e?y>9-%+Stb>D7w+GdT* z<~+E#Bb4I~=b6Kc%;7>)>(wJyj^vwqvQ0hn(OlEIyl>qsTd+GXY?<5gZdbm(J6qqq zWbZEU6W=4`J!n`wa&%EXlb6qC<+DE^G)e6;e5Y0L&A;0)W&j8|NsSpUS6^+s(s-G> z7MZ8>odem!M!ML-#v|3$)wFO^rUjF^m z`%^c(x!&g%gM*7T+gDhEq77AfE0%KAd?x39X4YKbsvg>;aE?2gXO1p1M{hIS1#XTj zuyTQQT^N}g!PVZmy?M4J%eEBQstbGO_FULEx9{?C?+LCn7Cr*?0lZ?+EhK;tW}YxlFRuQv4q{ntJUm+RHC-;C*JO;AR0 zI3W+drqmCB2_WP1J7Dh@TKkeH~L5|Js$ldzRB8;8 z}v{Dwb%=bM#Od$*xCnbh4CY)Bxsm7c`wrxQ^f*Fm(H=XR z7V_~IpBncc`1UW$h7m(yEP}uA0*opt;vErRhC(qyc1nB&H;>^$l{^Ymz>L4jQ;?7f zhav9})<6u&jNtrf8|ypKeDA!y!#Gbti2@K5>(igT!FM*RbY&b5WE zV4>$JTn2gyYx|0Bmud4io^?eN)F9(oQ?y`;LDii_E2eCyw!3J@6pLJ)MF*xhf7+0W24Cn<2ijr3#J%Ux29;t6pYtiv}1}z-kzc=$01we zJty?t7b%mePJ0zR`M@f?0>>v|KVUUP{LwBRhC;C<(&La~99KM$@(4!Lq7W3$M1=`8 zwW-03jhLe+LxO5DB&a1rf|W-S)bz9`WPH@Trv^OKy;ZlG!S?!p>R_5FEgiJ>$&_KP zLPAo#MMXp+_Bmz!lPRlUkDx9shqd7+XzBPyXoJ>f!WxF<{y zny6*Up3tlgq_q65mX3SE%_i`ylv&f#e^q#;BuG>zBN8}MGMU!#sTJVh2zVOcxG46$ zVO*%k>o}%LNA3ahjOJ-u#YtdL@RNQ4MbSu6)E(6JE#m%;xPPL~9}I}viJ=ITchG@< zphy-)?x2x7X!H(x0eV#W$Q=~;##%q?%UkQS*80nva@O|O%s-f4ps2dL2$!nq{{gtX BJgxu$ diff --git a/app/modules/agent/engine/orchestrator/__pycache__/step_registry.cpython-312.pyc b/app/modules/agent/engine/orchestrator/__pycache__/step_registry.cpython-312.pyc deleted file mode 100644 index 75d92fb9cc6ce7bd2a0928278bf3efb55b280475..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 10890 zcmcIKTW}lKb-Q?jcoGEPBmllZf~H7OlFdjYB~cVbJuK4E%MMc+g@7dq3J?13LLwP( zB0rKsjWe>wGbPnHBPx?r^f;ZUKOMP0R;NzmOh1AZl38?zo~V;{+Wd52D;>9*e)ODO zEC5og)Sb3>2It;;&V8J{kMp|tJDaVFg7mHaA4PxIN>RVTijs74fqwj#P*|fPRD_OE zae9WPv8;({W;Bp%W7@cGMknEPF@4-HW01=Fm@#geF-c`Z%p9+psft@>EOG0MHEx@+ z#qBfpxMRi0_(W;F|io;LG?`$hpl%uu#bTjL zF$T)Eb6!9$(c|&M+K_GFKRKVNY0I3>j+WjDCC! z3TqTY&Cn4FcF`QEifG=_&uAl-i1sbm&4@LkgIo`FJ>-UnEn4*j>&N4!=)-Jfq7^MUh15oOedN~J*5hx91j8X!MDQ#M4QtIU#C}yCvlrc&PC{;l5DD`p< z6bn#%WsFh+iWMmBO1+!|#g^7Bbe1tn2`F};_?3D&2Z{qIJ!Oni0*VtTy-K~D1Em@$ zePxVNdY6X1a{;Yi!IX38RRfgWWsFh+iaV`e*rU|TIZ$eWvagI$N;+ZqD^Fu19q;L3PAa%dp)FH^&MDCrPR3#&f`csR1xBo$jV3~|=n4~@Bca9lU^2xm zrZ};Ik)$va1f75aJNQ~iZXniQN=0LlU>MXwkdgI5a4{6VEILX9CsQQMu%ZowHvyp? zj3wuyVbRQ{;_(oHsl>)`EX1+d@;$EJIPehIm>Y2`Jg;@Fp><5u0)c=<%NK1D$XQ0(Fr;*73NYT z6bpvu8TiH~mWhWFTr>>dpI|{pGKuhVkyaNX;rS>BiAtW#DjJReHTF~KM(zy!yNj(BJ>$R&}{AV(Njz*sT_dypao=!j;K zA=H+ldyYvk1h!Ucomz}QkrivhBngUrHX37sSKu=Ni>vJ@Zl*LH%W$}f@`A~mwJh4f zAV|ipFhMRv=Ac21G_zbO&FKR3AQ6m56H!<~I1RA2qP@h2T(2!o3wwd|ARB@`SQcHS z^Cy2ZGT~O3V8FBpDxB0SixW+R34f`%MHy+)c5pdKS&lTrlr7V#qRA!tK@dWm!(Ks`jd z5TM>6-3U<6kN^VIE95x@s7DBj0D@YB3?M))K?V_^Rv>#3pcWv{BS5K7h7h2XC;Jhg zR42m##H!$IDk0l}0kf!MnV59TDue-1%rMbfDI`Q=QCf%w`Ou3xJh!4AH<=ZU%7#=a z7x}dii|guB(v#N)&a(_*2SPDsY2YYxMUez-@XDTnP}CP8(JM^C7g}8O!5AQc*a0NK zIp78WIRHDEiZRe%!Z3-sXo49?!li|6h6|G<18|=gOU7^i;<9K8!X1P&7+k5XH23-y zG;SIDYq0&UQCszaZ13S*{aD7j#8go>&-zut`vUKMp2T_wube3p|O{5 z>@7GDKDsXhuv6Woz5;3+=;v`*5KZF`mjcUc~rtWWUgR zitjyDXhTdpjyx;)$9ezwXB~*?tQ@BcF@DO{xp6`08sodh3f+k5!Cn!;KgRpV3IW9Q z;`(rccQ5bVTX+sJefaHeAu!1YCJVa|(@)ttHjWCNqkQLRVE{3^ab(zwLwwhv!XRSy zRF1P3G5abp&m-mq%GSEh2%bH>XHQ`WF<+r4&YaG3GD~?_5+1s z#Eew-8b!=Ooc(<9BpgD_VY;&07>&3ifa}v#<3 zoC=pb7O3dp_a^!{{|bdu6b*h(nqGkN&J>|9gIpp_;6GIMFE&flX^rB#z6lQYH=xa* zXx6mf*6XRW6!gJ)cBF-pM^q-j+$f26q>{I#O>3_;lszQyb5z@ZkNUnw>GKAyq0(C5 zuIRCyrG}`tPyM;}Djm>HiF(OeT4_0-xSU8{P52a{=mUEP)lf8Yz!xxxCfSTi60ru1 zCG=|*I}1e(LBm(nqFObV`ia&vDX=i&%mg7x63~%D*hq)%MQxZ{5;e047FPx3A~}vk zkgU?sEADMVs)$8vl)Vh#U#Ne-M&&Jz8>81p*C!uZI`WOJLgOIcIC!t~zBbo5BGimz zts{9`^^M^5pkVXyHs6N(uIG*?XWO08f5o;x-={l_%^q{WuNM^I2zS0cbmu z`YBU8C(meU*f}Cashyo?^hV9UBR!*~3h!lq{26`hJBEhpLiN+Q2zctstx?YB|Jm4D zm9c9S9{!hn>!Osx_Y%!&XbS4Z`xVi@XIjO3sS+_*s8{AM=Me*k_LG#<;sR;SkBuJ` zCC)0`f3*m~9DSAwn5IMv*nK5qmJ(fHOV7qqVB0e#tQk#bHVB4zz$6;E5PKQ!xL7h) zplo8pOalCyq-czT?SYo073>f>qIQ{CCNBf8cNgp!Hg*|k%G$nS}<%xQ=H*KVDE>> zG&a;lqG6Ob#fex^3;rH)Ajxs|+?n&^=gyy*I2t^8b{f`2X$9Z`=jz099{6v#$JoQ<%xw;QImfQDw1v$qjg`lzlug()hBvDdup#xqz>*B`aC;QL=({}cl-}vrd1vE zv6rP&M3>fX*R#M89={zatxM~baaIjr38=`yvUXlIsz)JT-^bM|1FJe8s^kvJZ;ZP{~r#%9hfqNu9gbdn>-a zy<(tZ@fkC#e7z#2@jGEJ(DB@n(2`4=6p1TYOQ$=Yv1{Yh$f{*7-%ROv0pSXCz>P4I6QkOf*w6e zEbH0DSd=4Q#kO|2YcWVdL>ELEFgzxsWhrSXX@T%1f_G9h$qy_Hkp;Rj#4abopg7DB z=Sf4)fNw%!!*T|A>a@(0%j0Z)CmWIoHvw_2?sKjo@tOo$VX@ zHy3iw{TaO^iMx4c_og=I?91pMS?o6sT|bny__wUBg4NGk{TuAvr8`SP_YmJbbid{! z?}y%BT2B--I`g5e=60dEk8keVJS*%v$nQG%K>r~1N%$A@Kc5$-=J~1lTys>Yjb@HL za=31M^ZGZlj@~V2o8au@ozUecue|??uxpgxHTo;(!AFi7!O_Dzz}ehn?;XoIhO?&O zf`zJEp#S5)?_JPR&gcG<9fZYwW4!%Xfc~4V{S*Dv#~ym3PxrA`hvkkjGZ22-M?>YO z{a-oe*Z!?v3z%&-H=aGvIP~KuP}u%1r7D3+uTjvvm?H27p~$?Q7Mx_gsYx;wf9-?f zct@#=5P1UqMt@ljKWA3{B#C+HTD7y!`%UYKm` zLEzU6ucSfAwjr0W#Ug+mX3i?0R=nFU#8X%Q8`uwJ3WSH8?sv|vUA%cwsO{%#`!`qb zU&_^vJ*=I4a3<$G4oB5pkC#PoKgYYD%ei-bPSNHgbmnN@({?+4D=v73c+b#%-AASm zO*zk4X5yXBwVs`2#V!KBUcg89k8buWWlTs8eytLs2wq@IfYq`=!Dci|f%FmCH z(nIANbol`iHtF{)eMED)2iEGmdaH;Q1Dy*h?o&i3_1h21$cjvFPim$?M8~0jDJ8Y1 z$F%mxdPNa|!J|`iDbVzvqgM6m+`_T^J{(JYrc`k~;PFT0JCq{`rik&{Ahc0Yqok{1 zjSVn&lky$q{CgBUf~w8{W|K~tb!Wm7y zeH$*CUUIFTcx06$YZhNT#d5w&j4zb%B`@K-61f6nBOp-v5L@*5iRq<=7C}AR^ zk;UjQ=y#pudl?{P%p@WK(+(v{{s{XL>}#!Xk66(l&r0Ti#Ns`{01YNtgMJGzD{b2a zhKkaD9ee9Rg@VX%G_L!9*!fFGH%48&hjOmNS?l2~i#@~LNMBFqEG--KLrdF6$o6L}Cbs~dH9 zy+817)wO544&2}O(a47*_xnGgKk@&f_vgKzv}8Ljb*>A19pEBQ+mBC+&O3y6xqjF_aWr{?)+l@_4SG^)N)>H5mL69kYB zgn&HkHn@QCu^lO*=SuM*wSQ@(wXa*aa-^ojO#=RJQI3VE3B&&Z52gwp>UJ;))wJ&S z&ork2k&B|iJVm|>?aA8!L__ge)?9uAv`SBAL76~a!KNW>>X7lJh5@UjzsYrMaRY&* z(@_{m7rcD)McuiHSI&_rQtCC(Z>7@+FsI8(I>&N^W7RKSi(xfW?y` z-R0tC9)J7YjXDChxW1iB%{Tf-tivy zOGjtrO@CDFUaP-Zzuu6mZqFFdK$yHaxqd3=?s@3$-#n5rKe9S*oW6cqu(tBn*1WrY z%hM}IF!DY9*`5RM)vRB5ula$dV1(z1$CS=y|H4E$nyz2YZ|~P7_1njL_T?Meo@!jE zwYaJ>26*3b)@5wcg$&SB5SKoTYtTAg{(D%(|F3*$-&8Wephp3(u?bO!HCScI6+zuC z`6C36GuZ&}#2kai^shs>>LQGc+fb&FA3*hKEN(LhXSER}2`wFi4ID}8UxjaZiBOyg z2H_18Uv=Rv5X#nI@U>JZCR4}>Y=0gB8jOyyqdt?LxzX||zjaHG;NsAi8&P%`F=|=-vx2nAV&9kREj`4u zvJ%H5Bz9KzgP3T4@qxL&^a2eJ!=xIU>hO3;S6?*Xtv!~IwvGH5e#}V(#{oPsjmXP+ zko*NyQQWh57{JD+=})Ql-%$2Xsm@O+-#<~)UuaCU<_ikIX9)hyMbYQ!UsKcnpmlz# oJN3w1ovrD}x;i%^n|tp>v#tT&y!)Er3&TkbUH3VKP@49?0KdepcmMzZ diff --git a/app/modules/agent/engine/orchestrator/__pycache__/task_spec_builder.cpython-312.pyc b/app/modules/agent/engine/orchestrator/__pycache__/task_spec_builder.cpython-312.pyc deleted file mode 100644 index 82a2c037227d33a137e495d0f1e516f5cf623fca..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8209 zcmd5hZEzdcad*H0IDCUVkl>dji28&?5~?h#lt)%XiIhZJqGU;qCC17L!W~J7_|n}$ zB01nxu{Aa2@x)2SiRh_k!gMkXRjE_PO{R=vyZVtInYKUf2zG$nurrxyr&IkyOm&>- zS9jk5AOu2Eo%Tl$gT1}?_U(Ib-|oJB`~J!8c2MyARp7_5j{_9-Z}?Gu7z3eKPXcm> z5-5R=Qwe&QrV%&AO$qa`Il&Aw3Cpl0VI8(6Y{Rw$JIp5R!}f$@*g;b!>Nq8sZ&3ns z&tz~Lc1~JC)`$2JqIG8^nM^4WC6-FcAy#+yDM}<4!@qJE=VoTk5HkDCg$a zMx(}93|JZ%y*dHkcPNn>rUh!)WT(FRPp}L0EoRs(I0O^C8NmsYXNE0;OJLw_72JXa z-ZsG_SmDhIUcm-$`y?Ck8N8vSh zCVjfIR^VeV*Q~v>wsKEU?_4V{V_CLR@6CF$zWe5TI9qtmQ6Xk1WY(EPN)UBhLX_pm zsHj^cSZXoE=yoYG%EuHjA?r>=qo5n&grYYBG7`^-$*5QSFx`p(mJ7E|V zz4HPgs4p20(O)(Jnkqz;NXV-DctKP^k@*T^A74xF!=`0+{76cYP?pdXro>nG?jR*( z2%!d@k;V9k)C{B&*fu4#Aiz0EJ_HR2IuL9?(1?IT;78Depbfz$1RD_q0m#@aSo=KA zgkJ|S$>B&`oCx=e*ZH)Rx(d^h`RjYbkyucWV%NoFFp^FOp(YA44`anBn0gor!?4U5 zSfo;km>i8I#c)cBj)^#LB_)N)y2)T4{1wAMdeW1+h2T?7Wy>zvP7f)@S<2rBaFZ$q zDSu0z+o^Fo=Y_@NzkX5WcILR(X4pd8#(Y~?YYQ*1xwZo{-a>O*zInISynFscuKC3o z=Wkm(3+>wro%;%{oxihN{Eiv+k&E)R6#VUljp0IjsL;?9o-ON@L1;5(K( zRFS5PZ_tD z@ZJnA9-T(bbK6pP711lzJkOEZmS^_v7kuk9uD+(MX)yZ3ng_O>h9MnXYa|(oPb#sf z%uC|+n0Q0CjgE=Zcr2;2(M&XxxKg!2BM-FS7jT2#4#@ZES1B4|i7a&qw0@e-(zi|5 zsUOgHAar`q!BCUb-e-`Pl+?JG)EV5vWaJeL-jsI0`?38X_(*Xg zEghPAq1MaQZXG=bSyr(rMjrSr7o(UsEe6apiut-Xg*gz z2D+cAi@~)972gI#e~f&jJ`GTUnmrZ4v{EmG6 zLHbju51BK&;iY{`yQO{(v-%X~eN%f|{Y4Pw`MLTDpr68=KLcSbXnzis-_GEGpH>+J zk^Oxg8BV!zePN3egF-4Q|Nj(PKTPZiEt1O;(>!uXTucT%3P|H~?H%>!@c%4>dWX|C z1cl0R3l!)V>My6GNdBNZEy;o+BI$tmJvq;`x+}ZvnO=5ISGR&Hh;G2HiWIe*H$5UaK-Xmx zAq#6eb}(V2U)s@KAN_e0q}>_4SL|;6*}Q zlF*7bkoR_K-cFV6ltQoy(b9nu(5jFQUBf#xoTBMzlTtam&Cn3^m~OFI)A}F-wj%RT z$f?^(`ZeVmOWg>@l;Dk&G!BPZ8PyGrIl2uFGNV!?q1#edVi7qRn{tgu#)DGi3LLFP z#rVpAm88UEDuW>fxUZjT?`rRB-vW=mn8CvVxbp?|6ZGB->QBLh!Kr}}zh#(ksqSs? zg>MmO4{pz31Rfs<|Bf{K^#9Ixh0GFcrj%|?M5J-BYGN4G+oIwB53RF`r<-M+z44pS zMYUIJ?429=&i>i+9~{yedrMx8meBXXc!=fVIN&f!1|=IC(&eCGrh`y5wfid!=nVFb zTP#>?(d6PBGqy)AoyAQHeE*1a5kEau`3Im0nWPI) zEWH5$4*O=XLfs4-pL7^Y`vB-xIR1)BLBdchWHa;(PvxlmP$TFJra1@)os}Xtcrps_ z+OeM$$S5ANZ3IgSxfKfP>>D*HgUdiA&jEmKWBbk-Yr((i3(9IgNze4J_ye=d57`gd zxu(DHF0~w)-}kq@cY7C(=XM{2uLq`_|7hMnsQCwT{#R!Pe#5mCd@U=1w%L6@?ESEJ z?pUsU_fq?T`KessrF`J97C4*>9LWbxXn_;Cz$-H+3cL2I`!8#|E`KzhH&^vL-@g0HUw1hiptkhLczS2 z!F;A78YXb$x$4I}*GMWxQ8JRs_@3L+T2|-UmZ0z@V=q&H!q2WLJOfeK7*X}d^qY_A zuxJ&+3S7Hef5}A-sjUIc5w)$`wxmievE)4)K9Yb&w0p3E~H5n>` zNk zSGdjv=7CAQIIJep%iJ~9b#2AFaeiR&torpg)T{AjZ$f1g>s=1!u*h2eBXK#;TT7A` zX;o0a$s^Ef>2q9}`;}{vQ5sgEqz#YHNI8lY<2ml>8bsZ z3!(CejdzvS)yW!-L2g5;o~6C2SG!}G`5($Vj3h+e3YqsrM1gOoB+8k%Vr<0_iIaOMS$7+U zQm}}0N>VU1ND6R6AnRU9jHVKBuLVheyzA2K(XmK!RFp+U_mmP#kk(ELaZ&09nTJ@z zN?rk6LPM8udzX$NsIeSenKG-~F5CrWSWC`v+G1o7Ek?589Uf zCyN$yTjL{()$b`%=p8+j%U^4bYT%USJcWIY|LT%@A*#l2EDubm{gcbwlJGP^itg10j19xd3ne2Z$qf!H^RxSY8=0ZQ4l(2mWQ+|>Pc z6^G&uBq3wK;wg>{^oe`aOF%`o-8CvVp*m(kghb?ri{f@%*(+ByQA5JCW691n7~atq5>mm$o42L_iXIA;fkdaF+o}ME+|4x8PW` z-Qp-(sm7+F4KbGL*i^J5=Ac?TicZ8_l((_yM$ChBUc`Kquf5oSSR>UOEOLnXDPLQ$ z39)9%zp)rVtc7ZBEw&=oMr{Zd+Y#%a{9B3}5Zg#O8do;~wt9wcwrpA5M<_3da5tD zkV1^ho#p#KOt| diff --git a/app/modules/agent/engine/orchestrator/__pycache__/template_registry.cpython-312.pyc b/app/modules/agent/engine/orchestrator/__pycache__/template_registry.cpython-312.pyc deleted file mode 100644 index f8e4f59a6d83736229d86c5dfcb57d84728140ff..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 18928 zcmeHPdu$s=dgm_npd?bHBubPlE23YCWhZw0y2Orswyc*eOVryB+0KUME+tBQ$h)L% zF|w0CazIkF&82@dN$-j%1&SoF(My4}b%1MghZc7!+5)R6h1l&CIG{y={->+c9+1EK z`(}2RltjwDJ0H*%M+q~#-^_g9H?yVIq6K4O_n9fC(9ERlNE`|$;yOl(v_&1tP&ieqt78b zUvtQ1cSX)=vU$nVm53`4yAW3*u0rfWTrD@s zRfuckYPrVzbIYFZR#Z72H7F3zev71Pq{e8g;ERy#LBr^6vU_- zSP*AgH>NEJGh2&Li}JBL|AKHA&x3wr=>4G%uUds`!`*Xnc%buaNE+@O9XDK(atlv3 zmNa~wq0WIz<7d0Zq|u)9XL~Lfm6EF5h$%OXhVCIydq;-`B|DQ*F3G8gW_ZRsNBerl zd%C5b?z7{dDsn7sc>2!tjGlv#!J+P+0Z5seR@7NYsqX6u^^A57NF$v@Rg#JtjvLM? zC2hDg^Hu6_8fBUij~ZoZyi$hiS|%2k6;;#F$sEC8@axR}2@UuA!*S)-{%+-lG^eI! zlt@~WZXDbnjs;~kc0)-9!*g>%q(l@=+fNCQmfjEI{zOX7#1)ih6eT$oODg+QYGhhL z-wvl!>i)FZ-_ZiR!|$7$H_DkJ*(XZ96#G~@z46+&5WMR6H@APqy=}?8ZSn92C*D8t z6T02Cny6fZvDB@W2 zwt7HdZ|fx9&bJ-tS(Ihnuh^R_3$wc&4s}n75=Gu>S!5;Z(BI8*uux24|3nVzoa=tF zQ!bO8NUK?wfLpmdZNJ|$Mc!rWEtnGSRopdoD~`MM(7 zx~+E+`grb|qge@kYB3Vm%9SN`@fGM&WJHqd?$zI=R|P-DqnJJo1^W2!nq%&i^R@_` z8hP2ma6yn87bxu^ysVbSh|?4@D$V!O5U+;~Pb3wO<0X|em|*2=PZz%pvRl|@dKY=x zM}kqA%B1HqY0YR*m?2gq6%<99Qp0o8*(PqCl^{k5a8%?VqZ{RB#PS+$c851u%f!=$ zPgSmGVyYrbChL#N4HsvgQVkc+8aHY6qGCOrfr3G)7}dSpKZ3gUKb^ z*lUux3PH}?aI@S}IH}!K)LvA`Wr;W1lBuMG;Uzt9CQB(*icE)-Q;MdfKXR%EA(e?% z50QM2IY>&^!_tid9W_QJRWFvDGOFZM0wcFXTASk>UDsH{AxdC8)(Ezgk-lm<@$-(2 zk4|)rPmE&7?jIWpAq&;eC>!s&NaHuGK@wV!xl!AwKsj-+2Vb?F5?T;sx0M_St%03- zr}hG@(5sGIjrYytZyaB#*|t=(ZSm34e9pHk=i5zTOOXDz?$ukL&b73?*Ya-5;x|8m3PVeWhL&4~ z_2!XWp!MzSTUmYk;pM;)z3CgPbq-J9fuqV(yXtp%>PVfO?jAy>;2K8VONY8Y z&%D#J+%lmzpSPKHE(cEQOdMQKr$%90}|MT*%I} zJzCEc!CM7mXPNazmyl8}S77XPVe}N(SW`?|^&?BGxog^q64HQinY3EDyreYmW0U5S z>zK59*uORKmK-JFWHvI@o2QgDKIX3iOT#c*_@tu*y#|t6aol z7xJ{;VOZs-Lh3HCP@kmWDGGq;9LAPNDtQBtnoW+SOp@SsI-HbYX0ltl3etjW(u`)y zJe!uDj1)7a>RzzT?#h$*mzF@bSxd!lz&4YW1PJdaQ=cW>4p3m*LnFWvF)5cK@vx@F zqOk~5I2#zDQb-7{OW0nZK#9VJ&rU$*Xe_Q6bH=xgyY#dGy;)=dD7Mb z-Wv)S9xatoBZ_nl4F;A?k(8`hb1i8u9GPW?IU6`llbax=2F;mRkW!5Rn@mU>iWzP* z8)Nd3SkOE^ON%g&%DfiSvOY^|o6=fDX)DpFwXURVsCLw-=lBImB<50Dj2bvw-^nly zG|to73YcyzVz^BjW7?~JgC6P;3ZAE6KLR6==YU2JYpEo99>E>AdXh4oqJYL8wUYvx zA+y=6O32@+z@!eC&8WZwLacUC@@WdX5uh{KU`Fkw{0(+J^I%USi-^f(kOQ1=;x4#2Y8RduC74%=`bUZO!@0I??_GNL(&8Pvf^Fma)``^`M_ua!M@3!zS598boyYa<$8~pm&gFU2 z{f7Ie7PlvJe*Evtwe8Hc9m};JG#TnoJ@@^sD@P}mj!rDMo!7TsfX>9xRacKDt83({ z?9Tb|&kG;V1rO@&hc+mrzZiMv(sG-uM`u=|sikO2pS$yw!_g@Yih!e?;wZsUiU2>S zgfW7nZR29Dwf((g?;g{i>{)K@)wlEkQj+*8h;Q_JYQJ(eRaLL8l1-~dK{SOP8+c zk@%O%EQX8}CaV}SD8i62DGbn%aY-07XRsk_25ZiM&rj(S)4FzZMO#?X7LfH03Ss~n z6fe;LG$_W18%5xj7G{W>Cd``L;x@OJ7tej%`uTqS?4+*5R+QwDlGIbT!RVAYK#Wd_ zBgBXzFp3JJ#7Mz_#wXU};%a3X8|$kJMy&%MAGv?{vtyqg(|a#1zc8s^d1>WJbm>YI zMW=;6VsuqFLyTTHOE*3?Td(RDH;!s`Xm-pBga@A>{PoUn<+6L_1@C#Wc{I&$D>j+k zx(cxW=5y()he)EeoNBqEsFIFMOXe&HOGRJ%dWjO` zlprWZZ9Y{}!#Bwvn^sgzUNEg;zSkNJmOxUXQFwWc`eaH?a2G5JXAg>FB@uo1=m11dBAfqZ$G?uoccNWltpc{?ra+>n%Q*-H9B9`S- zbFO;*Pyx-9-MA*7Ex(aZ)X139S{|agl$y>qcCq=Jg83|w5fK?vr6hWjI!A#@0WD-2 zo;78;+4irYNg5P`fyauzHN8TMX_n9%2h<30qX}P!YrV~8=9=bphKH{_VgYh^XmmV3 zg;O`0a556vVCe}OS1*fP+CLUf&h$WszW0QFa)cQuW$B8dM{mIN%?mwb`sU$9hUue- zS*&wpv955#jAeV%0xFg%)dPF=XFBz+3%YVsmv13&w|Iv5bYo5cJ`{l%5+$8Mz6g?4p_g)9hnYq+DxN1HqvB;^L=lKr#1z%wx_Fz?u8V_C zq)`MRqhiR3EFy#A`qtCME;o1PP!B#Pety2uO)9 zQ(8(qM*=8@%64v6$PAexvpFn(1$7>2PSdWk?^HSQ(jI8ky8D$G)7sxiY)3G`p}o za$9e{V|)IeUk)7An~oKD{=HrXoq`3>>Bz^K`{~cJpJw&`tIH=})L)WUUYc2YX$ES= zIW!FO9(Zz)L8lPasVYtY0^_Y&yr*q7Mq@-xX&PW( zT#>Mh5Cdm&qBnLC`57Vy^JJsG5MgpehJ}MXhk|5|w7ljbfwg-e>ou1XEP~OuW*pMF+GvLE)|d((J*udqhUCyz=$FcC&f7uq5_{HO$CBP8buH?3?PXt zL*lSmgOPj?^n6l)&tbO{ksL)HumEtu?a-2K@#0q{R;v~tU2w5&~0+2^IKsM`j(Rqc` zx#+w`>QIE@5$DUK)kWt5-Cc0rHr2V4SI6=qUeWZ+n@k2SQnRQ4DB`*pxx*1@A|>cAMg3$9({0j`E*=Qsw>G`OG%nMWdU=+C!e1}kg|RHQ3Q%SnOX2^hC-D)%MhOVTJ&BJ7hc}0gzI$~K zfsXa?@72qt0kQv4AykQH*;w!_n;xP|03bFX*O!EIkLUpeWPW(Px5%y7F%u{$t8llB zy(boLhWWF+jo4d~hmH^T1{Uk>h2Fqo=_S2^wdM{FDa~M8wsw^7_z3cQ!)xyVF$p_) zj7<*dX(^G>(%3rz-y7|fyrxLucszAekvq7XknfXhU_j6;W5_B~38STY75BZ-YnXX}SS3z{@+%K!~KEh%EVB#l}dH}d?oHe%#?J#cE~w|1(p z;en{%LSQtSpikj~BrObY>3p{KJco#iDJ#HbEXA)AZ^;W5TW|pq$h3AFnqkFurY^afE(|3DeX-J8{K&1!Q(Ew zx9F;i0=5XZ(RoL!l$+r=lJ*_s(c0GHxTo}vqxuWy^z)M|=cT3dlK#^5FSS=-h| zDAEIW8~F5yAreIqh(nt=-+H+7ty?VOe6!tFSzUe^eEP(5#Jmr#F)*hH#1Zi-8Cyx5 zr8EhyF{Dw1I`)YRl%*FAIj;GgJQA~-=~6K6O)%ZsPMS?Q`qqKDRFT+#qAvIZl9R7>B!{21OuVc3x*# z(5cehkW(|&NaxkC+i*dbZzI!Lz7OLp--kgFh+}ZtqN-6iTOlKgR)Y+RP}Q?&JY+e; zpVNSI%#<;nmjS$qs$SHiSzX!WIhA(r_5piAMsI<8ch&1+ps2n86dnAy=YIER{h#*h zeaiCjs6HKEnO2vkRTNDNy`*f6$9Achd@_y67nxH-CN zxM!d8D1qc?k8tB7?h^iG9COVD=&I!*=!zqr(hkW&#PiGO()J7J@`T(DH({f^Ws25Y zVUO1Tt;?yQ7(9fQ?5;1f7?sC{&raPhAzccdu`X?n$_H0zo6?c zV7dNc$%v}ZIxUt5Q*%l-koWzW2|<=%c-Q4L>gU2ZoJ+nkDXN5N=~M$6vuHt!X4INj z*mRuA%xOlzMr7uJLv#Oa)@MUA>m*|B+8hPw%pHes(mJu2br0Y!Xq9TPO0hhqkIp7) z^T~AhmPBbBjn&yeFOtIkY8-OP*4ZG>B9TvyCtCOp+p$eTDr(|5%YjN;wYdWiKFT!T zW3>^vad_vmlw~`yu(ygKH@*tHiDRzTI=ornoKxRIw=V_f0!Z6zJC&)%2gs)V(^^Dl zt#HzAq5tKJvCrxU&*_7-pDBZbN6auYf7t}zeKjGz$WhdblqPNB-DzY}?|ghmAB*dw3H{ar7|cT=m{SDiU1Dh; zL*TH}$rgku0&&0@CN(;_@9b1D=iMIt>63crxPI+rJxp8W&hV{mXZY4Oia;C{BUDF4 zyiRpg;3tHN6oL5}AYWwZgIASF940jeoaZSEMIc@PDn-r#XPWNLIWuN6+_0K~EwcCO zXSh?8Eq-@lbsd>ifi?0q?qt2j5jaIii;G#(YC$|hA{Q`4fk=uV>ze6Gv>@{(4w)~J z0+Y^JC(0$9^HeV3>?%V!icoIY*Ke5YYt94ZjjrxnD(M!w6H`&W~ zyx3m8@&XGql%=13RJuPw*ZWf zvqWY0oYwg<>~Ad#eJvczIuGo77T=_M6E zp>nj%^;O4Dyjy7(!NOY$-%c)eF3v7q)%}NZ{^qv_-Wtd?w!D4yt*g1_9l5scx%xn^ z<%zGnE?@Pk!&OzyHdGp}XeJpU0~#{QaH2x)s3>-%hAFDjQdPuiSE?VKw`Na`_Rp?; zYQPp~>4oxzid%vv3XUnqLZyA>vahP{33p8o5uSw@>ZrmFVw@wT1FGe)>^Krrh5f^1 z;PEh?g_!k+eLUCsmo|9AGaWkwmCgrtRP#3fK9%}Q3jT_MB24nt(+D23hrt5A4VaFW zZ1zM*;m?pqqis#EI=O6?YYJ_`VVaTBJkAWD9FDz_>P*}(*6f~7Z2jW zeAQ4*&!gIW9^>rTOT>bY^cqn2V2%6)E;cqY8qmzm8_;PuXO($;69L~RQJ+H*v<5vh z>v+o#acy`ABGETZBs<%>gDt0!E!$Rl-xSUX=a5CKLqMIdb)*e zzNF&17EeX+Ifp6xTq;$Fv|$yZ<2LIngzA{@Gp~+lRMHzoPycU_9hD&IFZE@

q~E^?&{>am$5U=D)k1V0%y50YLdOt=u>pq znI)+79ve<<24pXDwl)sW<7M&%j-f+bWt}SPXT-H%gSo2yn0U||)ZtfI_xzj)tdFuQ z)=}9N>#gkS0J3DOAuYHN45jcvjDtk*G5(-lwa6VrZeirYFW1=VH0ESmi>YOCp!Zy5 zGMS$2U2>_^aX9s_>594~>t9CMwNxt3t3;0$BM5sei~&6}^=~O)tX!1t#TPxKWH_Nn zl2I)YG{sjoaP5{PdY5^M8l*yWew^>$rzfRSXHy#}AkUy0prD(A{NXQp^dC9cL*y?n zdAd~!sJXSjNAQ~Cfml_3N_f!JjN`!%4xbjvuj5-nqN^O6`TTX|SWSA;T|Oi}*jil< zyVYDn^et88)vMbbEjx1UJ91C$%{_B~{#&>GED$KK{%M_mwH)zkg~QjdT1i(fhd;1d zMOSV|L({5%L zx%PE;k59d4i+&^{{sqvbfy3R diff --git a/app/modules/agent/engine/orchestrator/actions/__pycache__/__init__.cpython-312.pyc b/app/modules/agent/engine/orchestrator/actions/__pycache__/__init__.cpython-312.pyc deleted file mode 100644 index 265f76644868545a2157f3df0a8179795562d1b7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 983 zcmb7COKaRP5SG@vYwvEoDJ>z_?QsvapvRJyJ`#E>O&}o{iYn}3qgH-Ia<<8_zoPd- z5B)9u2ZlWr3b}>kmQzNy<1FpTLK?mqN#8tw`~H~V`up^!+;Rx{W0kwrYryp<1m8(a zVyZ|&LrN{~sb1oQPK6!SPX^(j!hJPN+|aG?KzYe1994Lz#>pg{RM=Gy5z%>XSOcQ_Rt&5dTH#vZSusNKe!fw@5qTaYS$wL%1Y!Yc5kR_- zDFm60j=>aK6qyc09eogCLLBOhcw?+QmCw5o#aM%uz((1X0I+H;fz7ad(Jg|1v#Zz71bKV?xeiEtina(D4j!A~1&83p*7IjjWlI#!}A-Tb~owj0EFcrq~}I82eF{Nh diff --git a/app/modules/agent/engine/orchestrator/actions/__pycache__/code_explain_actions.cpython-312.pyc b/app/modules/agent/engine/orchestrator/actions/__pycache__/code_explain_actions.cpython-312.pyc deleted file mode 100644 index 995dd53b479e6da89fb38de8351e962d4d3274bc..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3093 zcma(TOKclOboS$KHnwTfx}=|M)0Wo#*fcHWqtXhJkWhky+7yHlT5Wfy?mFvTGrJB+ zl}b4jDUpy0r}PL1#3wz#362~=9Eh=ytx+R^5C?9R5;*k4oBia|BvR)v^M3Q@&3kX& zn_oIRlL*E~`7ex%F@*kNNH`)sz^!}(zyi{d&Y7snl{k*Uyvdh%SOrt4iY3vbiDsl4 zEk!*zV#ccRQrv^1W}=!bB|SK1c2uR3nq;1$oW{Qi$}vqPu@X#2aYZZ0kwOY&q@CQnd*{_YBxN4oFw9OAI`T$=m&!Z>T>9R&y%{0bf8El{g)NS4BOd z^LHX8L67Rf9q{fnmy6L|8#MZcJ4KD(ppU_zl3RJ!Q#ZrSAZ3m128SWE7|?*bwtE_V z%@uP3O)4a`mBc}grWM1xr*b{GC{INPn>T1;P0(RlWckr-;hKYqQ&3GjRT#vRN{!eR zthtUd*4P2&n!Yq*MXYu{F1ZW+dOC&L!ImE>;)H|sXsu1h3K(S>3EC)=nPkpwo)spt+eobT_|(+#n8Ijg7w<= z_EetQs$+-Kc0IA=Hg?VM_amWCZwoGqo;NDl5L#dL=nfX_U6%tkbEIr%XmK)03a+gT2*IRnBpQMdj8zY_}XdY1x0$FUhXzOelu_@=-^IB0;8WHf(no>R_yU zKuvXTdH|l%Fsb?6Ksg9fDJ&B;D9co=IJO1FS%g}Hb6F~yhT~G93^gweW{?D%GBDAI zSMR9EOrTO73Y$`eiUqZaCOwwoDNGTytT@1cx&)Te=;+w+@X!?+`%ono+>geBJ5a&I z7VU=82^A6R%7*(;iQPtVrmNR&)1e(u?7+|7#b{^XRsU{;Wh)hGb(gRVpy{jQSFR0= zU%N6is9e4}R-{RGFH_O$)mly@>}^s(bEiBXQ;}Khu&~N7NEhQ~{kv?69TU5CVgNJ+ z?JHU&cR=f7SJs{R3&rul^>F{CK_9`(~r}&84EUq-xDx z{kPuA(#=Y$UU zo7s`}(=RXWy|@|?x>NIm50j{S@4}@|FSWW(H@Z%@GhGYuPvfo3u}0?D8gjIeIog&B z4`Zl1zk)ZE}|5+%}iQ}d~|gxga3?#TQ|OWNO%_CJu)pNOqYu93+#r4s>msF69; zl==cpZe--9bSS|38kxSPbhs^L?vBonuBPLOP@ET#24g$qWAkWA}+rl&oPpVEVDl!cA zoMHQ;Y&yqwCs-!G2aWRmT!i&OORZu>fqt&|Z53ciQ9h`vrq3a)gp#u`eT{ruSUwQe zCcKGZPA5!v&??VI&acMzL?$?2k_qK@Gu=1pU=y4}SREd65hP%6<&a089@Bj^mb5-(M*8HG`5zcli*I9av0g#hCyGj8O@Z4Ka{CxERS8({{RRhaP9T$LgBR z%w|Y9>;X;~FN=!F5=dOK`~m(6CSGQNOXl^f_o`mi z`@N6(xme60pw1_EgO4DanrWI<6C(v(K)$|+d}CFS&QLYm&DiD>v9K}EyI~kHmjzK6!%}az1OF`$c20MQ z*B0szqL7gevlU)AM_DlEdhBwyMR;L)KJZECkq;SZdWr9ZtH}p%odjVC5md!KswzJA zl{?rseRa{Os(#kb`P!mh)qLGIK%e(Bpx3+DF7Vml_h*f{;`q>Rlx7K@7os&tP~t8i$0 zkf7QDw)hobBS9WpvyQEduhiD9(|z+a-3!**x8DeQa#plU>_wD#X=fpEjd+%f5kZkI zAtp*yl8@Q*Vq8si|5kM0q3@NXL_0WEpre(#sETbg^Z;`}-H%vyX!bRhe=h4xl$oTS zzM8&dh~x14&{$2|3fchI1q$1!zH6HTmOZ0}haNGk>H_+01nrZV;aQT-35TQL3P4pG zZcByDv$oFj&vykr&&N@ldL(JIT)LoSj%VU9XtfBVuYwOdM+Gocpw88+qyy<-G-z?P z>2`nxA=l>`k;`5@A?7Ajv(t3LEp~x7rCwGI9*_u1Nx~>4fhDyCs|Y4^w!uxu3Ed`f9G-KWWLkk- zaGWpOZX>bCfkY3ALvI3mfMiTE0aVnyWI~7!09!PaOX~anaWD(0?PJxFP0X{R|O`h>SeH#p-ePxuJD#rL%bmTGG^B7(J4bA>-?7~O? JK)~eTe*oLb@zekS diff --git a/app/modules/agent/engine/orchestrator/actions/__pycache__/docs_actions.cpython-312.pyc b/app/modules/agent/engine/orchestrator/actions/__pycache__/docs_actions.cpython-312.pyc deleted file mode 100644 index 8a6c3931a8224bb5ca95f393d2864e9cc760a5f4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6642 zcmcIpZA@F&8NQ$X00$e}5IzhzKvUc{CQV2nA5E5E0wjS_APuESz0189F!NW=y-vUb zEt;Zzn2(wbj;&%L%W z;3So{U5Rs!&w0;#&VBEBp7Xvhf7!94h=AvJ=kEkgl@i3)_(%3(^#-|q8X9wiKnP@z z2$91iiQ80=3em%~)~16@h#h9NHWM_2jKfBfpomUFV6PE^L8R}~x~^f3-0%rFf#1vLXT4K)ij1GNEa7HT8Z2B=L?8=*E&nLI^m zu`j|)`nDuKvw*gY5lVO`a{X`GVlt`qLNQHDWZpH~gX?KhAO$LGg-KE>C!ueG$(PaF z6Nc@5_cPjOsA&o;PgfBFGe!z5{2AcS2!Ezq>=#FaA}_loeq0Q3&9Wv0=RlO)fl+r@ z6a`U;H)OPoMo?&D5iTsaFLS{F>;VpihgFSIEEM9H zG{a|+{Fxu#=#*Lx8^Xr-Z+_!=ecti)7M8&WMnX_rC04EW8!dBfH{0ghm0kN5PbM9$ zD~`UU{eNuxeOu~CU*bq#()!jc^Jr)Fyl;NsMm+6oRUB>U@`FlQYua&0u^&!5+7$bt z$HfLm(X4T;geWbWGu<@JJCs`Q150Y}*~H$n%VSB~+luwPVmiMLs}hA#H3%bf#27Hn zuShuc#6%8Xc#i(Sxu)bCCJSLnpr@$-x#?^(@GawI*nVL0Kyx6>BQXRYz#9_cJGE}@ z3~e58Y6HSZq2AbLC2BFq`ehEmA(K>Nrs1K{PS~_|xKIVOpraCZRN*+|SGh>Z3>k zes543QD_eSxFD6G((J54k^()J(>??38D^UH5f>u_F~d$X1qqRr@tbPTG*w9FG@ISu zb5~{rHv3*#`Tvn-!*C(w$^ns?u5cw z{e&=@OJ;p(i{pdd_j@0?+^co-x z#{x=i%Y$I*V1MFZzjE$^@}8&+jwWqmigjEujc?}xE4;YI1A@i_&!k_B>n#X<9$9af zE=23kz;ky7&zbdLhq-5(6_|;PvzqIKhQLm<9}}NYfx9)fyc56tC zn;IJ21AHVZBFq5sBKX;^IXhDP)jb(m!Oih}1POugm|KpxxiA-;k^?+=Sy`ptcmp_7 zV_`SOtNTho9xo&XcNGSihI7?`L{5r?RVR2YA~+?Ypj}cUv9J&nJw^@AXb*_1%mg@y zTM(@l`QB{zpFG#=JKN#O2eu0@paI*Ut167^+^X85G0hj1;_iG%XZMva@hWJS{tU%c zB5g09Yr5Gqzh80hT?AMjSg{{jvI8uC2!2Z)vjz>nr8<7?AN0K61NcqXHGDet(bS{b zeTyxNyA{`=w5vAl+P&(kyKTH%e5ZJ!dl4nwhm)=&+CWp<)xBmlRaULjMeg#oa-z;h zKCUjo*tKEog7&q>t=R2J9PC-Xob#QwgBBk{4YXY^04-dXn?MU!Cd3s!;scte#=s%C z=mn_Jat>(Iw9J5R?a4w!BCk91AVn916eZAE`7DHPQrGt~a7Bau9Bd#ABc>T2aX-68 z2A-27vXexf9K@1^W6(H5kl-{;6Bprzn;{{(%a??4{0KS6=a=Lh3D@{e zhL|FMLti01RNRbVsJW%R_eix!g4j+D&^g)LjwCznQQK;`6xc^lTmam-ja_2 z9z`U{kFQ<-MzrKT8jSElVx{Wzl5f7{)8iivdpAf_V*+D6nftwcavp})F z15CYm2?^h1;OXE;_jbw(e((6M7aoar&?I5l0WU(RR&ldpzCo!w0Ay8qc%}45OCvyc zt#AC@HnbrBscPBxMgQAho;d%Z0M?t5@H)zX(} z=~McLlD2mg>#$-P{{D%PD1C>Na33~~ieKbKLYzgjfU+SUpU7o zn6~Z$!fo>{Lzb$6oPP0~7^CRJ*8LS9$mlS|o{NrE7IH3u=muIi`-p-DJjzJH*6|-hN?*b~3#;MpD%>$@) zBo+t)h3FodC~pquw+!NBtMmsbo&!o}IYb=Jswad6J0h!&nt9>ZzAqe}w5=j-DN9*g z35)AdRXuhyAG{3y}IE0yz5@q;yVwi5E`3O3(w4#ZU<@hXwFaqcq|`7CiD|p%X$`Y{sHEUjN?M> znJ{Hr8}*hW%J!l@7>w`k1D@r8^08N(ckXguPj{5#R<{<{X3nGFRW17I;=1lwim6lkijXhUvsBo|_zsd|C>%Ej;of@}AaW6s= zEq?!{7#Gw>P%X?x4Yy()tBG=1} z>VW z+3MBOuUdogOZ#KUQmJUV2h{01^f7nzp`+tjU5(H`1d+mqKhOLP~NlzAPhVaAE z8^(ERI;wB}7!qIrUop}yDAs6_B)=l+|3UPAMGSsLbbM<#Pm*2ajXmEHT0>LuABgTI A00000 diff --git a/app/modules/agent/engine/orchestrator/actions/__pycache__/edit_actions.cpython-312.pyc b/app/modules/agent/engine/orchestrator/actions/__pycache__/edit_actions.cpython-312.pyc deleted file mode 100644 index 2d5dc26c20743ed3c898e79e13c1fe5bc2a64eaf..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7472 zcmbVROKclQn(ijMn-4vjBB=)@*=GETX2&E${+gA5RBb^*~d8CW@u1~xDPHV5tQ0OQL72KLfa8z9|qfCXmvkjubX&0dT> z>|fn%J|sH!P64Va)~l=P|Nig)>({@xv^WV!e|h>%RB{u!4o_g zClcgMlEigO+;Y9{RnziB543o%0Q%;yAe6R3w)W6hh6 z1xvvGJ^m3OwI(i^Oi7#+O(n%K_}y|og6k8RbUKA3XmAbB3y}uPR za?hegDqlG9s#$pLEh*;M(f~hsGDNuPuF=9^eIJ&D_-~MXMwHy`%LkSY6y0wZ+;8V> z&%IrF&x5Y}T}9u)g709_7cBUKtDmmFtNPAu_=X=3sNVN-j*_>l=-prN?q8Wxy&?GR z?kKwV72Nw)qH8|Y{dYOrvnKcRuAcnJgG=`>tuktFXruStwNsEiwy0f0xr@)(uKPEh zclCZfxf1wY@SC8zdqCZBRP8#JyIAVk`|ES7mT#r?i~sbCf_o%qE4jSO_9c7XqwEZQ z+gm(xxp3t2lR4G(k-}bA?AJHpAVeL{*r7q^nU^}xNM)4k+|httVrBH=b<7mQLfw*n zlshb-Jq_l7_E>;n%G7Q$&Z1SSa1&^9gL%A_uP}8?YKf-o}Fu;Bl=6Gllh0U{@Uo6EVWfj=&!v5N2c4fiuj-s0U}5 zS`a45fDP@y^_@7=NyKhaoN&aL`N{e~&iviYG7?r?Kr*B@y_~fwe5V4`A=_Wo_XNB?_4>tI-qt1fg3iwC)bWW@9fT> zcyRjuX`lzU+H*|pJpR0Q*9!AH=QqyPv+Dz@|E$`3?gty?apr6>r_haJD*iuecQo^nhDI#3~984dn!ih)w@iMYPD4Mx%KP7~(Qj z@Dw;IZ%7;9^U>Yl(E*6DGtoe?VIMXL6O^7}x`%20GD_K6XHM;7C;%Nb_-#!@lhFhh z4`OENM*k9_|`C#z=V6msa(9^%>UE8DdoB*V_oH?onDf#%L4~mCJ z3x`La>{VS?6!xlOzq%bLSR4QVa`P{`UHE?j+?WTlN>3 z8h(G>Y}@0oKlL;x`1}^jqtqO$H3fjBLxob;c@wIs7Om(+f?q zvhBzE7wxc;g>O!he2Yxsx=cfzknMcy48gNsGc)9(eQ&MtVTy+lT}^P zi9Xv=>tOYPFD8JiCGZHFf^4_bdFHLYK7Z{PKRn5V(|$An1HR|+DB9oGch;#fhDvHo z1PQQ2)@x{x!27XB>^FJ?jAlut4I|*V&543;e>4|3gz1zB97M`pR?j39!;T-Ic4e>57DJ({lSvgQ~XJwG-wJTW{Oa8@-M9fQH>IL>r$oWft% z>?srlKa-1t(+ua*?B+%^N9AiGCMvA`Mlv{{)x0X~heu}XUC#Qx!!TX^U&vmq`z6-% z)%+Lpd24yOu|nM)MOZp*48>oY?T5S>K&=U`(F+^5-jU1r`um>fZUtvwGvS$AHhNM-(r~>TbN3OLEHoKu3!buRZbvp zt3;Wv-wBZ*)mc0PHZd%a=Xk-4q3GD;1+|mw}Q3Da%{{MlvF`XL$0WIV?mBM zRGQs?6||K@U=b^(QGiH>zhY_pb5Uv5pLO^#R~!%nL9N-4I=G;70t(P*4A$8qa*diC zzCKwibB&IqGVsQua7c8E*u9Zd0$bWJ{&HB%BoZ82$ogxEq0tD8LlH9$ysTWFdlw95 z0Ku+-KnFLxXCX}DI+vqMZ70|1wYl}E!j1wvn9+-T@=?4PJXZ*wd+b$R?r{;p8zFUW;f(H`3EX_+Y5+!+oOT^^`_=|yiBTFf$ z!IMUgOwRg&Q@!_HK6T=!k zgHoBaW&>=+xrl(y!z6eT=?s9GT%+}T<=@*~ok9_&_BD=4^?pxtk zhg7z|$et*$CscM&u@4#ouhq$lz|R=muM4L}gDX7Vh);QlFI5E6Ku=A9V2?l-I@w6* zz`13i<47_1;S{jFwGjX+>(THiZi36%lFa@K#4T_$r$Bg%%%ZL4G?n+tYfn>&kX1in zt}fHq%Mr<69+hnoh~ZBV6tMsTA45|x7~O&l++#g5a~n5cI2c|9jib*9eSk;U4SZnF z)^LZN$rOTjHP{0l9fDS^wb}qN<~hv@fn<#arvYNY*gev{jS8M{5UAbHHQFL$}*+f(!f3ci5qJCtiJb?1a{c^s@ z?kcdmR;ZN-c+N$(zrgmZ?7&)5WiOOEdw2+>X9bz=`)coq?NyJtM5k=o84aV-Ud)mLvE_ljQ%}CxRKfgTpBWBBx|j~X*=*RF5EqRQrG70by!CxJ+XLB4`x#^NXA!m~m=VO? nkiD>yB>5e&`_F{qzlgE#h{^AW;lDB;lce`v-~SM})YtewrtEqD diff --git a/app/modules/agent/engine/orchestrator/actions/__pycache__/explain_actions.cpython-312.pyc b/app/modules/agent/engine/orchestrator/actions/__pycache__/explain_actions.cpython-312.pyc deleted file mode 100644 index 1c0860bf88a48c7594e055b6be3dae2fb53aca64..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 19075 zcmc(HeQ;Cfx#u}Y-?D7UvL%0Duxt~+fbC#D0)&u&4Tc09u%QVgL>4--Eh9_j9LZou zPSTLJN-tZW=@#cEnK(0dChjD6uG1#PO`DWeG{BfSAv=9>db;orqtqbY<4aW^Etq&RdO~*|vZ3vnBEypc9Cva_?Xnche zO##DuI9)**AfYaBqR%W`6;(EHZTy8qR4RU zIUDfDD6b`gI%g@*wo8fzyM6xXk)eTrUmZXV1vTPtCy=6%yU4$yKdwV8 zAl4(+AvTB(QIFUt7K;YNCeev`>yMien-E(Nn-N=J)_E5gfMlvmfladEzHZoO=F zpI$4Ujr&ZqX)Pu4J=}ZQ_Gfun;5mF}`yLUZ7Omc2IEo;7uJ>+|%kj~4uu z=57cs*dcstJ7kCpaa~*=rPE=*xIrt6bA5I#cQ%d-TDfR^(=cM};YLhx0k~tT~m+6d}kIsAYa4OPL}$5|hwyK#EZI7qp^`iFJ-rHmJWh7Cx0Rsug?w zu+} zfvB(Ep3#Sbax|ll`s7m?Gv$fCs4t`IK^HnXDrNLy(2ry&5YE`W*@3b%#u!m4IFK>= zFk)ED*nFbs)rQFw(N@U;Sq6#q2E~kSAQqK~o@DHuM>>wS968#tr`7v-=acRA1sS~@ z2z6(4{^;2STP6`kWK09Tp-{vpO3Ua=PiG;OQ?kI9rPvrjrp@-u{_Z^AbW{#Va+5C< zINQ`37^I!<3;3h5cd)t17xaiya4-<|VD=uA_%YQcD(DG>qfN+c>W_#q9A!2q5bg2gsXzCnx=qCg}vGD#(|-X-5&{sFj#iazkUo%~~ zE?K#5y0R%**)&l&DWxiRr`#=xf}6`dVwkln_>E^N(qeE}(Os}Y&UeTOf(LAv&wc?R43ydY!glVRTt9u|} zOP4MmJvn;%;=!*to24kxO0!%^vmDztelk_LVXE?>iH?+e>$H1k(!Dd~ek{@Uc}Zp3 zQJ%JyPur@Kw(7K_blOpqbkw9v%hH~8H>+#MHod#`ovq{hCj3`=Kj@v_axl5&V5+V? zRsCeTsxDo*e5QaauD#6}i=BVenG1_%EEsvFk}F$wx%X0U+GbDNTsNurHA&l=w5=rV z^o*@nikr}^tQyVAtce25zPKteqL{00;~cno_oxvW>>k~L)45DECQCV~ruGAk;X&n5 zkA5nR4RRyG5_B%lT|1(S=5E`#kZ%kz-<_z(d~$cLIy!~%9DN@##Py>7)EdwrecT`k zq9JU{!HJf)gdRR_#64quQ;++G>m&GF@WYx5qD0)-ua79) zf?wS9UUsF7mfG4SBEu5hI3O$$znszgBVr&%T$M7K{HF3tSM9_3?v zen`=T^07zx6cs)}&W~A$;>qMUlP@FtJII)%8j~L6d^7ns%Fof_XGmS}plCwv=o97R zYZeB?>KLX|Mw->41I=u>5~ad;=FhKHu*@yVWOZvez0*zc2uJSz3`_`;&c z4-$krVZRhWf>HIRkZ%aorZLu^e=*6IX>{cSwtxwmG0kq$qkM>*kFnlgp!5^WZX)?@ zlzs2Mm)$trOf!}Or(;1W&=2Y*H__hG^cPG$G8mB9(i(@24c$RWj^ZvcQA?0C5K~!> z^$#$TmN9^l4#>Gn3I((WnSxNHC+PQrGzLQTX32xKN-Gd#Y%$PUZ$F4A2&hy;Sq0vp z?3H4;0eoSpo@x?+OKTCJ={icUr+{E0W6CxKtyk~Ej3C9NtyE-SW6EZvHR>)sNCkyp z+a=IkFRL(IwSdCTD{Vvr`PT?u;?hp{VjV%9r1!6$X9;ilVh8SXo&_!;7U+8$5_vH6xYX%?;ABn zGVDaHe2n(IT8!xBVU0obOi`!ScVDTNnvE9_J@Xu*Cv8GCmBZPL)Q=#dX7M9q>kfu} zA+IkipMk(ypkfxGk+hrw!ZGP#3U(mK*uZXzfoyGj5x!@?W-%?JKeFfPBa2W?+DSba z7(**PLR~&e8Af&JJZNT7kv}*b7%pFcV!4u5bRl0suq1lr$ETZ)(u+@Be&*6MW6QuF zxHe3=h(B;_O&AuS<3hwsZ+qJNC6!yzq?gQ7zeG?>c@T{%(il5oCG&yDENOAe2qI>5Ev%DtEE zLKAHyen>xL@I%n{3nRiAuHM)Vl1P`0M6mA9O#>fv+ioP8pU(IRj%WPJ2}o%pJWy_K zO_bA5%t@v{};al1vDOlwwxNP}MFxrbeq47cKAR5Y~0`Pbk zA--eT0j3#Du(We{!vY9dATu=X2u1w9ki4@o*W^j+jTrm?&i&~nZmMY8xGNExwpSMn}JP>!A%7gFwZQ|=Ap(hX;`QoJW&L~yg9 z2os%Hb-ifY^@45bl8Ut5_4QXK&bgPD>4?9zY8S7c$5+yl7=W!pVy=D$Iwb~f3jqPr zsL-DOxL-yWx#NC_j$0%(Po4wUI`s=@g;ThB&+-zf+;~cd0pC0^uO<9FT8jeF+bqaz z1IXwY$mnAP70LvQk{8tIQak7z?r@@Of^--aGJ?N%F8oLx$Q*812syLdLmsF(f+jLR zJqtC?&TGQOO{2|kZ+(618{0oCX&5iPUeYjC(lX(^QvN~tPbw#)$qg;3l9r^iGYd_R zJj&PeQYX5=w1^vl6bzPO-o%L54p%NcF={QBAb`|nccSlW;&o?d%HFA%JLi)WI*Qzh z|06z#q{!f~!I4AHAPSvJN)~b9{hTgrM2E{O53z~!^J?i?zk2ZWhPbXrAQ?a^jvM-N z#0C?{{^EL#&;SgKd9_C-z@uR?VFEmw+hZ~Gqr64@^f|Dy6U0S>@jlNOZ}8wR6H`u% z@6Yl7$0#Qjml$x3y(fNn_LE9K0y_-G-b2!WC;1Nfk9t5sxs_Z&5Y*^Sl@0aSww^qc=({q*kdrcjZzEd8>8#LuFj+UEqa^401z~W zt;pz9+1z2lYMqB@wBrCa{`PJpa)?&8G+ouu4BE5OIG;t73Lpwci1H&IgjIR~eQ6k> zA0Qe#ho-7H(YO%w=3M)EkRpH{Wm1f&q_lGPSnI@*E5|=L{?W5xkHD~iU{868)=Pngl^AtUUzxJ+Na%lG18INxcnI?Tj6p|S^_OPO=1AL$FC2LF zz-Z}p+X@iq3(vp$Jho+g&vocb?7J27?!`z;h|9<{$+tk-IS5;?Yma>gxyt1nU?xb2 zBbgJz9pusp0%Sr42DS{cA>cujRX#|5H+g{xwA27uESME>flrGBM#7n;1V)lv+m1k5 z%}R3tk(64b?()#Ncz^-{RZE4EZYk2AM_|mNPveg`T&_eBC3ct6VatR8xif9U$Ko@c z!-V!w6JlIn;z<4}!+{olgAUYU#eq7Xp#!y87jJfs>3Rt%Mj`nja4ulIbXnG`4mhWq z!+PoRQA21-c#ZYasGF#xD+~Bo8`pvTdI0Q~9@O-&(>K$v%UJHuL&6qHh92 zBj~%Shi9V7T`BvBIc}EToU?1@yt`(ewOiyZx7?%Lx_H;~-6tAtgmpoX>S0@;Q(y2C z3*!0bXqz1adaA;>1!2)!Ibo3J!fTf3(SBb&Iu`f1ga8U{8fnPhFV=KiWHZ1mYsxEv zS~WPtE$bX9fCi2eOPB@c-|q{eOJ~=e6()GC#}V6{lg*D0b9QY}>%x1sb}c>jUC*~D zUL@7Ti}DHE8VrbTGT7X$7r;0_VvpN^0YAh^g1$i>Gy0YGm5&<5OSIl0A%CXlqTu}0 zA4bY!anzt&YXw~QFkC;tanFLu8*z@5iZy*C^e*_tOI5m{wH$E)Rx6f(y4tuCP+Avv zAzV3^2A&K_woFM&v$u86p*`)bd)ix$dD}X69om<1v^?nTeDY{V%N}pbzN76=bjHB4LD+({ z^)88W9!Ph(pL)rDDL~!I{Ef zKRNOQL@)8OF%mKwJY6j?#|L{3`od&`=)y?z8Sjsnv4yeZ=OA2y@z#tizEBV%BkFfa zP?m8qQn#W#MAvi7`g8>nDhaQ!9;uvq*RaslINY#!OqI`$$l$WkqYvg~)^#xK=^8HX zV#cEZNK;XmmLeFf1p`SW_I;s8kTFDq(NI953+#*kjbF@xRD(x(2V3?F%mCIgPgji8 z3~T zzzS8RWE68mlRLb%-abdK==4G@FM8P-dS$l5Ol()>;u3gy5U5d~Ud=*ggbs6hem?`<%J=0w6P5U#zMWrjZF37%;+*Bx?XP zvoYY^B2`hLM1hPTV}h0#UL$hGNZNvc$Q(3ex+ozw=KHDIST8CpvfRznO3+N?)sSzP zejr`qO4m1jRwj;>epojll1ISgnQKC7%M+>Q1Ii(Ps@eaydZkQE*bt;wum8*?jz&M! zO|)Lw_rbo&r>>q%ZQ7rD@NuQxpL)>$eNl0V2`d8Dr$2w6CsWNQsZT%k>Hq!qUCH7t zN?VuW@WDz!-U_Rej@9F~lw)(k@OgpbW>xi=;a$r+mhrU{CsUqn)1F6?o<}Cb*YI(8 z+H*ANIjVdkp!5V&p1xGosp+cI$*R+-DmiiRbGtk3a9y@tvMJR8rTf%$cO=;zQ3lQ` z!|_!2h!S{VhT~r3PY8&f6HZZd0v?ozLPD6L6%pZ&99KLb+|s%^aP8=CkNxJD@|0Kc z`BMi)6Q45I2;eh;-c!|$bNuK;xm+V2thQt+H}*`tXc7$7+<)m0xki7B{>;O3Oy|Z<}8?kClzrrpg

B{{dv3bQM@z}KWo*qj{8^f&DmG6vr(9bSd+*0nWc#j*J=5+rN%xwRd+m60 z(%m@i-jsB2y6)a`RU%K4a`Gf0eNau(UNg4py1ib@Se3M|8jD@GHy~r~J~vGm#?MUj zP7Y4?UiDvFeXT-S-g(1uB)fs5!{ZN(mra-_-IM04x~pwhw<*gHUU#&^TV-??6ikT& zY5TI#(bBAlD4vU{z#jRbRFsDmbe8pKUn-Z<*lCsNNFKr!t9A<-(byFoU8(@RV zmyNc*z3=sXW6w;~rm8kiRXsfEOqK7LF5jIj-<>LNP3*s){V1t=r%hWRt@!Wi#>97f z-{~Dci{4i4m|C^_s*tK}xo&TzTDDTv!-mY>*KLhyyL+^EY$&;6!<2mk%10}bj=E{b z+N5Lc_(L}w8)saY{~z33-RiNk@4oQP3#ru)rE0fMIwxzC+8tkU2Fv4o(zYV8|Kgdn ztK#ypOUFjfj7j7C=<_Mpy2ReuJsy?EwvDY*8crzBiOLCpU$?Tn=Z2$K+v05TPId%7 zW%<4vj{P$Q)IGd%Ts1k!vRe9h?A-q~043V;K*X}qGjET)KJvzkNqgf&{p6Wnj{I!o z=Pyn*x5J-^xhp+1UAH+|w>ee!(4;U~tkgZ6s@ySMxf|NTRAuW$6FDuFR$M-C>A={Q z@m1sHK%VAKLZKtVGZZ~5bWwCdjgAOD`sx%;Qgjk#7DTloA*(AO+{$*eacpp`S804o zdD^RViHc8Do(?Eabt~OHN=@&L(jXm3A3syhIZ7`Ky*f1NO4+LwbM@C>?H9Q60RMHy zC4QYL^UF0Ln2EZM4f^->2!2}Eu|@x@NpC9R|Jtlam@`EYlTd*FU8+e27DUG? zFy-dF>Y-fUbD8pbOS^gnlbtu#fPk^luYr4pdia~fFR4mmRmZ%L+a30(3^jE5#B7El zky9SW|^eGKe5T{@SLA^=xQ2J#GYA9fwX+eJk?2A9r-yaDx?nm;WOmi+^ z%t|X&W`tgQ$sSA~ctMl3iX6+DHP)Ytb1k4`$KX6AK z7bc?D^uIO##;hDZc4Oah#osgSk0t%F>w`ne@C*NwAf#&-4hgp@ z^RVz0Mex_*xTC^TlzE1KnlMu2j|o30xp?IA)0dte?FH3#t($U@vA4JxbulnJbXW{) z1-OyVTc1c4Kc*a(6-P8-xLH*8dTssx1?^*0+7d@s>5O9!RuaT%}!{8%Lv~ z-DA5(m*23hp3$NBmc3*?Mit_jSopIn>gl1q{%G91O&U_F*FlK62BrsYy*h z$R$Z=*vP)UI3f~oq(cZav(sxxXH3jxARx{+J<+-r%L{YGtKXo8ya$2minR99+Sk^@ zanJ6~a)oPB_H|SCq4A-~Hl?WrsjFwE+m0pMjw#1|skW2IP`bm4gm6eP4=vteJ-TK{ z2W1}j9pPS^{9R!dX%a#=wArtiMIo;>T{qvmgHC26-O8(w_>X+f>N+;DO8XxsIYI*?p^sy-Iyii-JqL#8Mz>-u}~J}VH)l+OP?DFq?7X3Tgez+8CUW6=!rQp-Ci>?XFEeb{+)I5;qQVBNoxhVr$%T z*VYAKHggsz5K-%0YZsz+(d<~5eL)-)fBvm_LEdvMj2Ct1W(4;91K2PV9qi9hMXoIsrrgJ z?7zzV5TC*na`U{Ch#s+v;vy2cYXUBy_jUth*ZL~J^Ai4{+B#W1Cu0Tf%2MR6q{nb2 zX-j;tmEAz^TLDb9QyK) z=%Gv=^}6c7q^Z}TCU0Vfnom>}`}VA39vfFx-REp2OmR=ZQ*^O%%4u#kL$1_=t4pOBS}%qg&;;2iSVQE10|8a(7X zMq4>|C$Yoqfem?&Eu89l&zat!zZYi$i6}tcW!QB*VaQF4-brO=Mrs3m;&Idj+qeaN zshiqGDvcilmgd=?W*0N5x{PL*l7Djn$)R9(z(3><1sbqf*kcvKkcJhDJ+Z>Be5m{s zMX)BpxxWqDmvyr`fl&CU!) zsAz9Qgstp8MxQmY47=t-i#mzMoph1janK9eMlUQd#6)A>cR)=khhPJ*uweD-58Nry z^57DvWlBWo^4}*9q9k{p6lGOjJiThfeFjkw-Z8qY2;u;}&%PTN)_WRudfMlSAvzc! zGdh?a=Sy=;2>J79^#8)#WU>sazOJ6bADo?#CtJo^#x{@Z$2;NEiD$2#!&ztVQa8_( zU9p$Y0tEGKaxK=t4VFhnt#Y(9XQ5sXCr;I9JsXZzBsGEm=gXo zs0*5S+`tEMq2sDPCk zv^1QQhEWUNr!+8G-!QPu@2A04bY2e#<{zjs`A>*@E}utf%800!`(FHCexvFOQMCImZ>E}FgLmzrrcz1 zbZ$ztr0vcNFTDDKvSRZM`zZ^r7Sx5oH03`pC&-qSH(NG*{z&}h3Tc!GkJ z6zrg2F9mHBkZ*z1MFFXDRdRWbQbc&z^~Cf!DlsC#U!s8imXS>6kXN|dLXBbh?Y(@d zp_9M8-eh>3zwOi;+_!DK;Rt`*Xg9R*w`&as>+Pa8-r%|2A(#+4O@`9jPQftD-!=;d zXpYRy2KOzuXU2dS-tVsJ855<7FU1R1s$_`GXxPbz(Ff`tumrh3*&* z9=jmXZJ#N~{`Cm*WKr!in?PNYKF$XK diff --git a/app/modules/agent/engine/orchestrator/actions/__pycache__/gherkin_actions.cpython-312.pyc b/app/modules/agent/engine/orchestrator/actions/__pycache__/gherkin_actions.cpython-312.pyc deleted file mode 100644 index 8c7237a66ef981523774ebd910d827f723fd3243..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5353 zcmbVQZEO=q8s2Yz#EBgz_6)3odl%9rBCG_>j~mt_@SIwt3a;30fl)&A|x_O#KO@6} z>!L2l6%8KiPlj;M+8B%K@p>C4d*v2YPa$D=}mAubU z5}l@C*_jSlREdjFlI<=%N5hzot-WAOyKZhQemCi=(Sp8Lnn8pN5OZHR*$gHBHtp~(Y6#4`#H!nSt7rb$?PCkQ+1)QJpUOAA z_^|21%Hc1M{rTAA6BlwPF67;BW|(hxJX2`xT+>zM3l*CCkoJS}VxwYA1*DKtp#fWq@a#b%(F6B5U z$_hUojZdo{cvkDc_$b3Rjzm4FB7=#<#i-#N6{E6bDo$$e83o|RPgQDoQIUA0s&SRS zjwZw@Ij$NFrT#)hjVBYDk5QYk_f~B1lBsQY97b)&lE2d-4bR zbFR~cw(hJym~(}SEbVn>xT1XnB>eYXj}H#z4i0@aUV((#1w(9tgdHkONSp#F{2U}A zRgj1PB;ZHul??{zqCTg~Q0ODBg$Uv*0Ar4sWA)NG15(M>1Q8>#Y33v1W2)T0B8r^E zO=3B&N|G(j;r1Zu4#_FiMc7IYTbiyVn34;RAk}|Nr)^ThU8>xkB;FroFc~nMsuGaF ztyiRVvZ3lVJXS%~Gpu$)?RS`1aFVf_4scL+!&AzB+JY(n6X{GjN)N~RR141s!$=WT zIewfU1d*EM6QVwm+Jyygz?3u1)L~xMcyUUUqvG`_N8c}XLzglqQY|_NVnqZ4Wrn2e{!$Tm$KYuiwlF@o z72RkkE9Uj2B1MtUZqmqbASD??psh%4f@Lt6$+)Z-983Z!(mKiDI3Dc3c=pV&aB5_@ zZ>S%-uk-C`+>srZLAecDmSzmrE1Zc*)R z+F{0PUxEQ{g5tK_Zd=%!?Fs-l8+#r$Vs3H;k2k}vcI;g|y}bKTN6+^}okJksdn40( zYsYHmQwzyYX79`{wJ%SsXe%h&)0gk+&v%~A3>8{B=H=V+w=G?Zu7%%boBf66{e|Yk zh2~cZ&1Z^rT%&i5wzoE928v#y-uuDOdqdgo<12?(o?e;B?itLET+Ov#``Yz(u@w(j zY^x^!+1$aiUybBF!K^!!wTHHnAD>4i`7tGb4f)d)(EK{4_y!qZ*0sG%X0=nVP&m!h z6aa{Q%B{=9R7i=QV75<}<}0RU2C0z;DQ zH}+wYOOCtL90wu+0d#c&k#Oo2X_&-EQ&mcHnosJ@9orBgvXIm$p!C723Y^C80MuvdUoVdYR!)SPCO}do{=Q1Zzno+8AU{jdw z-}n;$L+y`Xeui4!=8Ub--0?j@J5G|BzSX0zKWP4&{^;n?hv9|pPxjr}xA@Z1^?b*n zM=dX8FNQJ$1$X;mYtFrI>Fmn%!~LfVp4Rz>+YNWM#h%|E`}Ek->E$!|y|3oGUi;ef zdeMe`{$M9|b}dYQ^zzc7T<89k>0ILgW_0BgK79Y`<0Eh8j=Y%-Ue0^QvhFKc`<1O^ zdg9=!)=9d7K9zGxqHgpNM9nuefDvB{DyJ$eVJQI^86D5XOp{m+t5Vg8#g@QW!WYQ- z6jG67)R(o@LYUjEhp@SfF4l^YUIp*f2-+Aby@ubP0#g+yHI`yBB$OSe_$s7qX>kO* zIS*!gxUBBt7h68MvUKQ<@K^1@(Z9TtYdpJYH`gQOsk~=2>%Nq=U)s8v_{cYv@z$?U zMv1DmX%KqQALH8`Xyyk@7=ouTb?uy~ot14&Z`iuBR;edoLo4^cZPXKPi{EAD9TUE`UIb9$Sa(d}HI*#YUOxHP9hIXT z&YogTG{`uV912qjf47OsM~@km2YZJUKkjAM6kLxOHJxOUKCGf@$2b>TX}?{vGqk{dBRBXzf~UgPZLqgLeiON0%<< zcOJ~Q9V+bFz1sck67z-qGy8J;%BlRm*Ye%37dnm<+B?_kZS@UB8k}VuMFRWmAnF@G z7<_N=R&c@p`Tobxoya|RV&zia)n9OVtom%n^PgXRe4saXp!dP$yz4w%lswKN93{>l zzi$T@=4#zL>FuQ%`21j9?l2qi;RaVqCFO|9ntlbo4P1jSMs`8Kfut1cHz!(g@zA8W2U$!Ry rsw%(>9EE9JV2U(JlHU+}{!I*jLxjE|`hVd1NYZ)h+J6b0n-2aD8-bStz4G#N~b$kcRzaEj_mXqiPPOl$3L=8qzk|9 zRey}f_83Suy4I+wy6U}GuimTo>eZY6*OC$&f@fypZz8o-2>mB{(H^7HpcZsM1`lumh>^916L(~*Acbnz5F=~lfyRCBD6t%_d-F6D;&_TqQ zKR}FyHQv@Mb96g~tpVF3@)DpVI~|WFc$$wS;vBq|y@3-0Y?yzOZi~~=;Sm-?XGvR_ zj2{~s986#yI$U|Eg1(OT*zgd6dpQy3+4l&XqYd+sUOLQo4G*$mWqPI5DHXNQ42^Nb zqHc;o-8#m?P#+k&^^BF#L2ZCq5490$1Jov{jZmARHbHF}HV144+$el+0B-hy?kSYi>1hVXnMA?8v(u0^K15a~j zB*zfP;!up`I8X*A)TNT1p-7a`z$N|Q5RWZnz+ysJ#^^U>qPg22}vL3 z-;>NL4auy|!x2{e@L(qa@`a-`$3=RF31MPWA&s$-x)n-X6_$|VUWWp->aMsR9`7IP zpRL@QtK2$WxjlnLcT>td=dK)Y7;BhyH{{$6nLg3|67;z|SQ)jNJ zQ+VUJ=sF=dPYRZkxD046*$zY$@^+{NBN#`ZlDt{Ki28s^s0h+riK6}p8rAW6BT4Ft z;W4^CbX(n23KqO;n@0akZ2eQP4F%X#u}xZZLl#*ZV|dCeMn1oV!90qX!gJ4J1oWnAn)KG1d_{07q@mvYly%4NhI{ zOIijh7U8v4(w4OL<{brvu3j)8fCTL24`YX8&hcr9#xaFJPL8B$z_%Q7(Yb>R{|cdZ zKpUeaqou2?re-C6vLsn5%TnD3u#)d5jgn_b<8ackiZn_Jv{qVFYo&`?(`I=lj&mgr zZ&-KQtjgL6yVg3UyJ|I{uzu7! z>P$KSy8L;e`L&uxlKK5u(C5%r&3HaEj=Dgr>oxer8vIxV@7LZ3HfXKII_WArTEcM5 zDZHMCl`OUcm7UlFNRp9fag38JaK1BJ zLE|+<$xin)96X~Gu!qi}Us2-_|6R2i&@lD4`twvkw~uVNZ^_w|yCi&;`+4rtwku;(a4~SDr?RXp|gS+QG#o zhH#kWg3ZxHn2vJ$f_da>AjuJH{2%nc7twT0kI;1@-7ai;eP+$;xtgBu5Yhp|)BI`PMDi)w1wz!HVTUC%X3w#hVaf1 zHDJWVoG`Hf$w@Y9C``wh2t&gbQZ_LU_k*ZpS2nToQlcm`)H4)kAi#1<`aYJI4ABV0 zStJCNEHRd+fd(xZm`IqH^mKe!3ASXr;KB*aV&d;5M}!NJ-5MgIlS~jTvvEc;aB$O* zjEeo(WVU1+Ngrk7nCuEULc?VL1DKEXGe-FOY&P3vYx%DuK-&jf5eHmMz4F z>G&Cz34xVL1~QFgRG4ZYzz%g(UNhcJy3B+0a5O*Ihn}hF5xqUBl7|&lDchW9?Vpgzx;@oC=kbmo z89OrT*_!ig&9rAXPkKeq{#3_&g*WXXJWSMPVBW@Q-;3EMvErrFfv?K_6J4L2{`mCl z=9b*%mMPQB=7V#tigekS?YeQ!>A8OP%J7`4de-$q&h^5?iOP;g(oTon1mEASj zF|}Lt98PsC=fE(txnm^?!TfrY=-W59vvsO`YJ;$|V|M+4TUD8|O#5FO z#PtW}eQVO)zga(Dvo4(!YwEwYo7}dP31m`Mq1*$~iBFTWjj!bzU%UUd=;{)jZwZ#S zzFV-P>Xz^Ref(j{{$(A+7|(m@g$O*EPsNOy;%ipH&EEq+E$SmjoaBsz zXVe6EB}%)nguubf=P$|wuEH^;oir83H33T}Zh?WtLjaSEjAUXGF**{L4B-UBN~Lmc zg9A_9gClHjz=~T5P8%tR6UT%T$)RRILNZSNjY)*L600q z=-xW*hKn{hTX39}H>+<{PrL?B*0*!ow`Wo(diH{|tX`KscXQ;%h)}n8@~F7Jb$b1Q zsr_R0!IbmA?4_ym*DhSXklrmiH;MMmnaXK<<6KqE_|L|EHe1z{t7-z@^Xk<5V%71> zuRL7dFIF8$y;5+M58idmZabXYcKCk3=sGSqPY9M1D{u1TrV0@jwb1oLtaY_}zplu= zUk{Ofaa+-AHnPfifhDd2VO+e8uL5CuCPcvvma%?l8a05`kl1tC16E_>4O(Y0TZVhH zIxZ)g>`K&+PXLZ&=7xGmen+zOMj&#E_mOMBxd_9?!>nZJqX#*XW#!J3v=gx=fRDv! zJRC47R|gknxkU6F1S1+D2Sl5pJh5^$(Fl}7dAhDx1d>YyJ-CPP0#+waq}ZuJvD0PY zlCi+}WV<^>FpV+_M|_}cZ;G{5=Tl>H2CI_?y=qJ zmxUL$Lo`tS(sX(A17FB@AlxVK@~b!g`fc)}Xg8Yk-vCC(1WztqO*-S7TfRWF< zP$*vU6xdRLb!xJsP|}2b0A1u%W?Yb`Gp)?iJ%fH3(03QmH{-VA+%V+@P^+)a1N17E zKo;Y*5_mO3uBD3PT5hY_FTk?=nOt~*3ts`f;u5O{E=Yc;W)&`0i)_|BJ+fie4wS1) zDyWh+jh`hRd|fB*2Pnk@oAD4hQ#vmDP#h-xEGc?P(Fes4NvCey=ofySyC`HK-SW9` zZ^Q;2#}rpCStIdtkPt}V;h`5~P=Nge;O_YW;WHsC{DUwl{7$$h+=2G*0l8u$V80q0 zjIuGnV;R4E)g2;P05YN?1NfwHmmv6sf0PR#cMk}Dp1YL$#Yi;)J>F0Ae!ides{xUp z>rb3t`X3lM@*tH!E&K!;`Aidp38Ro_N>aZ;AL-OwlU>U--O`Qd8vLC~#zlwg01vPT1ezd-T@O7_URC*w&srJ3~GAJ*i&d%jyBNA4wO z88w8VA$%l!=Fj~C#6hHa50YP3{kflmG=8h-1YU`Zgu5X2JCGc^DEvLZeg?w(eeMdN z3U{EoBLiGfrFmB-1Cj(p0`!GnrmkRo5gcjjO!(Eq7c`_D$o_C*D9ZSISU>!~!^V1| zWDF-_vJ&WXbRGrc3tr+X*bK3tpgwyN1dmz#P-!j2(w^C;Z>M4O)rSwE-{ z)K^@$U>IPFAl7@r7bBbV_7LIx@VB;qnB_rR@!klI5fh8U3&SoE-48GgoB%$ReBF;O zGM@mn}HjFi6dfl({y!9HX>HGrtBmaX1r;= zVVwwOH;CRBr@eb8-C}t&@|R)AS$@4^{ME5n;r~;>^1L|h zAz04ll;J-%*F*9tTMw+2RbDqkWv@(cowjeDbCg{>eEIMn%sF4PaD@5N!9G-a{s=wo z!dqu&9QZ4Hxe5jzF6*7~?)lQOM+N&Dp`*H!I;g5Ub&nAW>3a0vAXF08FJh(LGmbSX zg+Ct5`CbuDUYKzt^E6wtyC?TgzL{;F@wU!5TEDV8)uBSf+^L?N?>Nj5q2ADu8Q#?8 z3GB&wvOU?eGHWxAJq1c3(Q->J*fQn$7vCRz_g@s--dq|scS54vgjs$FL*k$_5oh85 zaycnW0!@4oiV-VG5ubuA@#%n-eAN)AV{9lS*+S%M1fNJi+Yy34%IT;wf?Wi49Vxm< z@eV1-v4P(w1vxI|h+W={7(5=53)0}oVfO)A(CLf~3l_bxn_94KHNH(PbW=9tNov7s zH+E6qRM$YMkRV8%ffB+@?+`2kn8Cz7NNtdm4yvDU1m#aSg32cx!NN~Cg8Ah| z6Aty85ak<@o!^fR7)&e?$HX;Ct=|t-%ZCfI7Z0 RouQ~M>iX!nNN&iw`ae>)5%2&2 diff --git a/app/modules/agent/engine/orchestrator/actions/__pycache__/project_qa_analyzer.cpython-312.pyc b/app/modules/agent/engine/orchestrator/actions/__pycache__/project_qa_analyzer.cpython-312.pyc deleted file mode 100644 index 551195d15b2f6bc4f9d162e03e9fb754d3ae3b21..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 11166 zcmcIqYj7Lab>3YpKoB4WkO26SM6IZY3E3hoTCyzLacqf}9800>NY=}CKoGm6K!E_Y z3s52i+LG+lkgblyq%EnbJwj*NDLrXBjBC}5V=L}!CY}E1EM=*7?K&R{eeiwEQ3SX2p_1ZJ9}X7B97 z`xqlJ$5@d$#)%G*eVadK5uF&7KgNqyq6N8CtQL9XHgSb$MP4DgL>qFu=oTxGSBf>F z9l2w;(qF6Byd=l^rBM9k;B(PnWH>3wp&Sdw+?7Zz48z_zW}~U&thpkFNwNK?U;Kz{ zACqV9G^=ndgZEsY5k79s(=XGT%hQ^DA*g&`YrNtCefd0XJ|D65F(VcDx8uJu#dR{5 z93ifc330DOjw6ne)i}!XVij$9Uh-r1lROqZVnx1HVK25la8!G7)Et+#eE(7IVi(Vh zII%Woev*_k-#SvYfQM~gi-*buv(>Rosywfb1$5Xqyys+(Rc*(rsz)5D>i+8dx{A5z ze49yGI+-8ls`C9XM%6O=TwTr+(^7_$LmHWqs1=H`#b5P7v#S`XE zx#g6&vcJCAnlFi~u*2@9J3LZ@oodWe74uXH6ep#JOd5RR`LnGehPFS8w_AVneR;;G2%hO>bFLrZv zo{wUlD&X5P?e_c_smg*Jd2y}if8Tn55nIhX1WdtMahyWBsN_1u_&0Uw*0>}OD7q~i zjZ4wEZi~cXClZ5tg`7~7a4@P{Bf()w))}4KwFSiCctq0q!C?HjZc}0jIV6R0huK&< znTy8^!-c|LhK2D;F|V(~v1T7=#9*`YK$C-LHqYXpuw$^~7dP@=26I97n zNV@!-Zc*a0Zt0WaD06L(>U=mZ4Jc&51>s(2aB#4FASNavlF}aR1DEYmv@aZ$+GBF) zxP-33cuZ~&h71>=ebBVbfs?^NFlU?F28ZueK8>Ez=|TCK+XitUVkLONw3{G8zVQ4J*voK<+)+tjMAEg>~(LKsXwX z2LfOw@h&D%uWE0pKT?09PHFF`pKI@_KNh+dOxG=Ff2e+{ol}3RUf0fQ=RtTDU9M^8 zwR74fL7h@R5xVa`QMaIes!pn(3c*M?s0ixk>g1wH4s~?5CHr4W^hCm;MNQp8SP>xc zm>icxp;wL#Ja{@x5{%|%i^moXNOS2Vs<<4BgpR}SlOl*(~BvOHr1 zArkJDLc^hmv|0U(L=3Uh#(V~mQiUPFkJZ0J6L$1Tp*t20m_mOfSBBK{#b7+4KqcQ; zX1!oI3cuZyr*sgaIjjJSHk%Z~jM?leaA8g&ycJqzkbp zxkrQrFiZeqz%Yz!5r%Pn8o?DN#lrqEA6RmrS_M#L4N&FovE5xCGJa0>qML!RISiHS zsDgZy-vj*G&`oJTVuD}uzKM9ICbKoOae{sSjMls_hj;E;Hqj3%_4~Btw1d|Sz)*i| zoE{*QS^qhXB#snznLz8BV4N>H6Tl;NQu_ns*mi;)^QhodmsOl6g(N4mCOLmw@>ytY zNS5LY4@Yh4D$h|)%whF!8LIjdKvTc{7=j!Eq9TVi3osCf1F@PKw;6|)7JR8KIeZYX5=zK& z9!_v11ThA@!JS$dmJE#P4a);`L`)Iq&&Wc#3cX>NXQ4+LjzO>mutG1GXCM@Tk~zCz zI3#U}UXt@wEc;VZhO%1>>A_@O0*4SJpcukCw;a$w1_hmgs=+1_T3jO=m*fBl-!M2e z;Z7I~hEBjD3u0IX7(|AFvPwt}_ke>UCYbu8kd|~OJ*BXlYtbu|1n^ZJ{?JOr9tsHP zcEGh5j`k_A_CsM&iiY5C^#unN3REaiz5rYq$?wwnNEogQ-IQcpn;4z%iNzwi!vHpg z03BYD1c#0m6czPK8aH4%Zg7aG${LAbJbjJPQe0nP;m#;J-yaJ{b??IJKr}cYDY|EI zXE7GiZK5P51|`2w=M^c^t5?9MqW#q?&=>cOGDPTY1;Sr#PMv+_O$J0ZQbQlV`oOsWOiihH)m_x(iL;f zLfUR7O{>!Ut=;>7-tgv>ICJ2Tdid4Z!vXDZK<(~R!zZ$bBiRE3vj{73~|Zs7J%y`=~`- zwQHuT^OkdM=9uPeUr7F(1rydCq6ruDcyXp`@2xfKX4mY}*6jLXe|F75)xPRW=bAZR zD_aygxOWwv{l>G$6w5@+ME7%agKQl;~8P+8RiXkC-)o5 z_He&4GgQ97y~5q0w?iD>M%crY9p;Wwc8u$$>?jABFiemOQNJ3IyH$T!J@VS@k)U=Y zsP@FNM+ViyC)JaR8c(Xq8THJF>U(1`H;>+^+A>$|xqN22x@E4)eQEE7y*Y86G5CKu z$A1-5zjC&&O{;60cr#n~&9w7NXWc?xhKZLX`#h~_nB7g;ZtewRY2U)q4yvzos|SN> zFr@m#g{v6fJ5$wqtM(zNwzKxqQx~4PoSbpC%+)oGg-64giV24%JeIB7n%;A(zIm=; z)m7&eXXb@$!{!BLZ^PWCM<@4AZ~Er=Q@?WB+>Uw1R_VY_?`HS2#frPPhgqiaS?=zC z`g-r)ZeoPzS;JHL`*P&#+h4l6$YUY`~K%My8hpU~LcV&EKbY#RGd=m+#$Q2pfaX+>;N& zjo4Fmc|*$5Pcm5aAShNQT$}GH+9>=12~{)|f*=TwR>-v}zU*j)FbMAdAEs;w_Wso} zl!eeKD6jL3Xh-10xoB~CEryDgX)lDdQx@6Uhj6M`O(B(KLOzxG7zM(g4uqLyk3ur-Qd_!2wuu6_W|<72}oJP)517aF>w zlNUqx8hD1n@G8QCayu={p$tY4@u3T(yp0Ge<;SVhc1oV0q-dteNSd4ylk#pP z3MoRtZZ0yG#PR)%CAGgygRDh>=`2%X=e(=Od&W;*{`PIAvhtyH=S^?@IDgfC#cr6< zhRxFrWJbMP)6bIy^ImPZ(vWGL*qLo?pKjbX*^%`0hZJ+#3 zw(g19x@WYyXR>wAruTg5s>|7&OvS9wp$Q#XVe90}ny`I}pYo`}H)h<=eChJ#X>2## z59u|9F4i0Fjq@I?Z@!LcSQe+gY-+i@b8hAOA|lP(8JQhsXHTZIlPQ2E*@0g}oa_sn z<{v;s7k84t)Gu=j`oTIdi1AUHdkXM$5Au7*`i{+jC@#eUnEnI6WGMj$OIcuIMQ%|* zuJEM@Fvs5yAl|j%aFqjx!r_wHi=FWTP^4|WEIy;zMSf|#8_>X&J;;TzaNzqN$c=S* zZtlwozDHfK;=4edSYhN}XEi?(?H6qLwqg}4jhwysX$h}Z@ah1s&ZWEp-u~@taQh1$ zVb!wn^}-GTVyl{%1B}1As~9U?5F{X5W&{by%l>1w5Uqs|KEkHh3)~Qs3lTUFB48*) z@FCkJ3!p~)l|lrF2ggoGQN6;rNJyeWLkhy#l5j!iQg3+ijbY)vLManI9l)>(g&=-w zh7f9pCajmYjqjQ9tkY_T?%ttr$6G6ESU;b19goKc138DDLL<(&6p{Mm-~hdN@-L+n z71RZ-24u;rFjmqQiUbu!08*Pb0~4|-YFHZV{yhXJ@5k_l2tPDMD8ED%23Y<-2``Qb zlr>09;oXKK#y-cXuXcYS{p{4t?nCevsp78u9nknKI#1%z?RiP*mY!JrE0VAuMjDxU z<$M$+y(+8(aCM8D*Gfw;I&7E?(^OQLreX&XT8(&#afvgPkrsjk zN(TUgux0;ays}a;NR1~2Ld_$toUlb#-fymHO!BkSbvz{%QXUpWe$&*>nj;Xbp=V_36 z8^-pH?#p;Gp{#e)toKpP`)JnNk$zrxdB=SjX}a;@ypp_f!@X|45`*Kao zEnvtk;PHKq90IIygex(j-0$oVSYVLK+!%`9HVppO2hLzA>Q(M8R4{1ev>|`1c$Y6R zuRP2v5A$j*YhH&^7Wx!=fFYaax0M)21BL(Z0A4;s`@R&^pIE9ji=hp!Zy7824vk0V zsQ~1j?{Wo02pGp}4#oLI2j~_AG)um!m|v61ebh=e7Q>ghP-o5pDoH!p1tB;XmXBa; zzqP~|yow5$EQ0)+*<@T22>BO5zCs#8=O~BuTk)FQ@U;YT4y4NWko*?Mh@jn8x$3^q zz68%7jM#vDpfJP;2fO2S^1D$647*g6z`~v|NJk|j8lc% zC*f?0qaQf{(<)1KujmT+dDB$(VF=xZuYvfGZGL?rvrFPKL5Du1Bv&pYEdsFjK%mgA zjzk2I;YdU_U5Xa zb*Cx)l?sO`H@`r_2=o}=2Hqw29>c25r~)ZVBnBOO-l!-jyn{B|Qm zfUrh56gL6|_Z;-O;#GQoT{e&*fhl2`rFcS)%H*WN78`K|Dx1LtB9VtEG1~cJN2B&$ zr79Rd18gI}AVTonkMOavq3Rs;g_E*ftyCFJDFq{H%7O6X)8UbAdK zsX(vf&6($(KvSlKj;OL3$=l2w?nTz>xO0T_Al>A)ZoIR;!s@$IYqxsuczGmMR;%~d zD>!SCHAkZUU2yNQy50n2PU|6EF$R_eDivnDXMft{;2C)Y4W!yi9g=wq%d-E@wEV_) Oh+~uNZN|uqe*X)g4fJ^c diff --git a/app/modules/agent/engine/orchestrator/actions/__pycache__/project_qa_support.cpython-312.pyc b/app/modules/agent/engine/orchestrator/actions/__pycache__/project_qa_support.cpython-312.pyc deleted file mode 100644 index c6671b30e6379f20aaa984c523632d3f58f11632..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 13388 zcmd5@dvIG-dcRlimn~WHL$>o!UL+#1org(6VvO@93pgyM1QLRfeHBNEESYkp7 z+j2r#cBXgibI<+GcfRxb&i6V;e_v5y;qXi)|1wyyjN^VoANfb8X876d$c%CVC-5Pz zk3Yiml-GnbM>KeAL)t#w5gpHIxC5M^dyy0LZ)wz;NAv?4ui-QL@bZe)9}Y*N{%9}~ zmOAn63Y?9K{+_7s*;qgv@I?b+pVXsPRMQ+4em08lQ7*t8;ROzD+6Dea-4QL`8oYIa zL(t-_7pl;@?ubEf3VOVaf=e*qZ4#;lBi?4AMlj)R5o!f9-d3Sbu;6VI+=3PF3ZY)G z;aw>-2o-qS2P(adisKP6ax%~p{jR?&*54lyqdmD^u`U{rYB`RdonSpoa3^^NpOYl` zw{p-yO+s@L`12p3fFYU^8iB6|f}o)^%nRBqq7PR$56>kG;!}yxMi}RW~6;mJ_4Mu|jNu=Q^+%4Xt7=%clKNwbwVoZ{P{;*fC zI3i-OHyHMZe0>2)^7jT5XE-AE`9r~YKq$a$QmmWi%y%Lfjw)6u5)*p@>_fDHx>u)E zbjN}r!PhTFjt4^lMcW&QD!P*qG^UsOL%}FebW$L6TruX`G3IfNIpPv=rw7liJ^udw zmcED(3k9SW^eG%|353zhKubjIIT4V+WYLJ&0!|~&YXKqFxo7=8NnO(B{sF}<2Bb*n zbigMDz>ZQh?s;V1!Z**uFr$5`7s)v;>#Uu2uFg1DClAZcrXgc?!d<`5d*+l|=N00!ST1N8C+a#CT~9;^C^{k1BYE{ARZZi0 zJku+dpybPQxmK*925Je@$jAo-i8d{GO{85TRw0QmTfiT4c)A)m(vwJtJL*T9Mw(t} zp~YW4?YS@Gxo@I(%Cmpu_{aORwGGp?>oT?L#_QzTO*d=kU9&0cUNY@&%D9`xdu8|5 zY+d8%^CQnE&&YKxMSc()LA|F`n$W5-e)unBM!9G~7J)NL@lZ-nQR+a7)bPYV<**9t zo|iRweksQ#1#W|^DN9Y4uPx|Lt;1Zd5e$jjO0Uzr=n{+x?W^4Dn%lM5#U->%mWh=Z zn^-{!u_R+5aVc_N5-j~u`a@6p-Smg)cQO}ZggOV}f#lIbVu((ZKo~{EV86Hmd9RMK zh2qFb0U<9a#5%&X6vbdcFfnFPYE-rm10WSR4av#0UHq;^*k>LdR5B->L2{0}S>sOE zd#CH0GWAXA=G}7rp2_-H`oQ7o14lClj;5aq%LgI^kz#Vq>FJt8rY0fRd~e8-wK^~F zyts4ttZelp_fJ~y9)JGE$?5%%XZAlX?|&lG@y~<>?Yw{0CaK>a~NWTt~^>TT0KxH6&=hdO^jx4IVO>KR&Af{jda0%UBF3*02 z77V@IpfRD@%N+}F+@J|!svx}b1A-VbC3Fe>TRG+*G)D`fEMY3o#6=S)w<+|67A*;b zREu`Xi91UkOVlUKf*}sp88jnjJhd0g%wOtC7*7(D&U+H(gz0!;8}i(xUL6Na`#dy! z!ocAK^N%d~8Rt2S---=JB5U50pDWDGIgWb@dVkP1Sb?6q<{{!UVM|o7Im&SYdcF84 zZFd;u_JnnjQQAsozM|~RTZ=QFZ{?14YzylM6|ZUM%;@?z*lSzE5T)^5zQsD4#IiRG+3Fi0^9L*v7@AX*po08Mp%Sd^Dv=` z6lM>MKed%JbMjtir|1C{rYn02dH@h&@-1Ysu14lTjwic;I|h|H$ivFyPIG_GkMdwK zi;f%Mf2=*jdo}H}=wFi7&74nP&%BU1|0Veh`H#%YiY^LmOX^vQN}bm@uSU@{ZzL!z zda@^Tiu0Da4c1xUY`@qZ-?oVS%NdK^v9J&dG`EE!J^ql?-dw1-7UU!nx&O)i?i@GS z*qwgtiLt%u)rY2*9Lh9yf5oKl`AP?`7*tYB34BJwW~S|&$)LW0+xb}%YBUk5>D|R$ z({wUyu@wc^ctzLm4~i1aqiO=&GPQ;Lecgh;J-+q-IFMYuO`s*wG@j$etH=G<>dtXY z);@;G)1C?p!0Ha14v11fG4@1M^T(FU_)hqx6J9NKDtbcP1sdXRBwuf2;!eV+VTo-> zO2#C%LLyCyV(j-1gd%=H;e8TGY*>+{k7^{iR3l*y^T$_z9nPX{ zEd3)m69$5#die0@(UGIcy785AP19t}mXuR=v<~TSy6VP^SFKm9$?v2zvU|&<``(l& zyLJqjZn_(>Ytm2ory9FuclS`mr%f#|8LF3l0heRb(B5pdd$e<;Gub*`lQPNG_YUoY z88TLV)qTaCTsICQq-C=Hp44W!X6w-YU%NcX$EMe8&8*p)Iz6?fJ?p3$s~WKk>$CRi z;b&hS$T}LP9V;@970G+XS0|f3acrEaKqE7ioY{5Re$k#;vTe@ySb@zu+p(&WjHZ?HyiA{W&ypD7klhZR(zhb#nEdp?#(8MyJ-aEo^tmv}0Aq zvFcOz(oa{fySeu6@ohiZd2MHE;KoXM{XTi^{+kJvOT+M{hMuXw52Q)yX95)=kXp#nP+>pan;qf zD{bQysR6lh*XI>R3J@607S&cKotA$J;i=u|{9*wDfe#keShZ$@+@K~(!)4DR>t3)& z^A^dVwrG!+4@C&tJZ{cvE;xgOy3(LRSzgu``D}q7p}%8o_yKtyTu|F^$J)l*)P`${ zz=;Wg6Ej(Uy*yd;WrHC)!NOc#9jjpt+Y)(*MzDqT3|av?mHAnMORg8|L9L80A=u&Z z=oflCJQuE6q>5Iq;@RnNgJ*Vh{K)c`BFmaO2s-%(P_ z_mz?hWO8AvBivO7e6ex0ZB@J=ha0_{1cJ*iD~sEjjTxCA~;u zq~%ww@}z%|IhRhsN=C3DZULZ6m12rH7(R{2Q$!qytzf9YeG_;edQjndI+cDeJ(2!7 zA{1{U{{br3tU~RBef^<8AL<1J4>M?DWcW}?t}@Uk((h0Oj~deW2;@El!FMy~GZ*3w zgnIadKkA8|2zdI{;HF195ji8xu^egNZz0`s7cvD00UBoz?m>d5Fig%xu;yKaYnr&G z$R1^;*DYgB@Z2-hKFA$MEk-q+j6!57+vW&q`6Fy79IMv{H?-;Kh+dL+W zJ^or_#=YaKSsjYb+pGAPh)nwR^mR|>0;Yjx@k973mpqvlFbh9b*8-n3H;Db5$8=o> z@Na>89h3G!=4Dh(zm3=14B_S6EWX3YUS~Smo8!AWBc7a!!OG;-j;ALQ z3kja?fX6RMfxhk#m5Gr)Hu?V3{$R)tm!D#BkJ}0X!$&`1XA?- zZFH!(qUq~#kGi4(G2n?tJQM--1jD7PJ7-;Kp4hq~>Q-D=Smyb475LY+xs|nHWi`zC z)5f(;o@Z|H�>_hEe%jS=JyCA|oKTtR3U6V_U|eW5<)bUR#=RcjO#7hm-$|qC7Ej zR!W(jR`K0*%7dlDvXx)ce4r1g@5k2^_&+Fla1P}e2t=_;;p0KEkG518A3|WxlzoG( zAoii3s(baVO%)>7KEZ}A#ccSzSAiG-LFBtA&Rhma@+M7ZGqi7tG2Eo$Ua z&#V;Ygp~-er>TyQl4p>>hYv<^AfpfA_(Wn3UC~)lEuYG{J2t-j4qKWDf*&#mCF`sk z^^SPcOPb+@IJZnX;e`wtZ#rv-&x}4d@?7#>xvoieHUm^!Kepzo_lh_9u-veDvf=(z zP_FG5vXUR8ziPf>PBy1j%IOY^km3;KFmlR5GH=KyGrXz>y>hqNeuMw`(7mgCHW+Fx5;SzFcRhb}$@ z5tVXJxp#bG+wrLi0sfkp%aApeMlTKKM}Kww9zI@O(emUV5)wj*nI zT^_hNFjgbmm#0n37aEczJg^)1*%y&{i7yTN4)Mo%oX4631X<^+c99>@7DK!YQwPj4 zW(zP4^DvFTG?k@k9z+sMTbVQogqXHhCvCFwU}45Gl?T5PUqHE68zaXi z{WDUOijGvSqCay2dQdTt7L4`(e;ip1T^27;!p5Mo@Z3c8!$?91Je){~ef42` zU-KevH!R%IaLAVPT+!hyx{)V|>bytLUgYzxT#0F}>-1VhGHq1eUexhUmA)jtEVVb*&f>4mlMN7ZX-(3xw5T=i_DM)^lh;qKV3F zL1)K!?eNyI!&5HYaOhCC;H~e^Y#8)4jf9&u!i?_*6FzN{L^^)6`E5 z?MW%%$32XERD~E=K`0xC^y(mTk(FoE$cnfU<#F%V9>4(5r7cLn+A|u?eO5DMyJ>gI z&JJitXNPR>n6$@#vG*UG|5X30`gB(${p?x!;DEe0o;Jl7a&bY=wSr=)mOEJ*RzVp( z0!~cwoCvp4)4;(+)OL!)C=*GLVb6}>r5H&>`9q=n9;V5iV??h8AiiS3nCD+p7^Hf1 z>W^J)ueuz+7*98BoiJjIH=H+Cr0obu?p4P`1;U&XM#?o;ua^{a)Ao-Ey zLN$eO&+X3Oi~D^My4pVwUELpuu6|)?tn9I*;hVMJs~gk_#z8$hpoXdNePb~cHDrWc zWrD;kbF7V{Vs}C>nBx_2-}IN3>2UV}$GAkHB$zd100ql!DOgJ=&`mH~r%2}*>ct7# zTI_g9G4%zae)3fn{j*_zUtr-$8bp6FYB1max~NI;3+=C>`H+`t+7tc(aVsd5F(sN7 z><&6dVn;7!WY|R_LZ_yA8P=NIG7JavPj_aVt*QuPepGqMyc-ou#(?cQ$X_fQVb2@9 zCF66$cV_k_8y~dy3Q)_9Q2YV%aL(wi-N5fX$V(trVqi`>+sC_xw~n@rw7t@v?3!|| z%Q)LrH~PYo<-979bgHN5L{-)?)wVFHwgtIrqK6XFZ;BbqAw~T?rzG(S0=`ZOTOKM_ z{lbn8)e3nSka)x5Yjh6f(*Gd&>Kym)Hv6z{)HGrmb0;^;j=Lru8*pA_Ynrxg$=J5Y zwtH?C5bBaEWyhLH$NF)nY}+tx+nlj&mTj#?g!<%e*|B!g(KHTt^R%rsV{4UdTM40h z)IH)JyF1w}S9vF^TE-upcC=<3t*OHk-LhlXq~pMiM`has)3(lxty8u=GGo@)Scc3q zHm=GEN3gp73r=Hh9NNp2N$a?G%Gvsfy)}2XG@_r;qZCI!b<0(}{S2=?b#Thr{)s(* z_Ep4l)C}2F*<84^g4rloO%7N}bL4XQ+f(0AEps4gyA$N z8W1kkF$rP3Q~{X&G+k100;RYR`+QovNI zD?!zmgRTQrqk2rV3lvmoL<;yb(rcelj&U>F!q{3~0u)#pb|CG1cKRwFp`3>j;#pOi zS?G+|$8Pqij7>bvxLdKQTT?BRtbiB8A36KvQ2^tO3pl-axJ>F_`XLf%X=lxF@93$K zQ%UdmqjK%W$=a={-LiArwDZ1<^FG;mKdy?_)Q=t+Ir7R=ICXVYu|DBp215`h;XG`&`}Mr zg1$3uVAo4p;>H#=1Baas{No1p?SpYel2)-mWQkGfOfXt7IrjiwYAWYevJ>F=(giD7 zdXwM{ph)|Wusgn^caPlt$_A{Ny>{BZ0!x!zC)?Lg+6Tr5CJv-q_8@oT%=CdLGY6hb zAMwivx&cTZ52r<>18LL1ZR}05ic9xDA}R>BFZ7i#6`Hw`584v2fB9KjsY2WX(RMYi zTkb3^zivI6vzk)~Go0l`J?5IHd{{$wim*m5b|DmEY5tS1EokU8D;F`o7g|rtBF4HH z@liU(UYX14Yot?r4N$BRb6+$)C+66{>};U9+)Csw<(5(Le+_!f@K*!K&aRI&(D0kD zZojhq)gAxrY8tPeay3o5_N1IYcmLG=vxbRiX44)71T)UATx|Ki`+4#EYOhFO(0!$| z(K-EE18|wWUc4;)SJVj?60*phApNm0K+pxBY>UqM{zM`gGYt3%0v*vizH7F zN!CoUTqmBL3nd|n&JrW40=3wY1<=zfZed^|;odT{?x8ow(DlPahqdXU+>a??BADd} zU(v!fMsS+#PA0;cu)b{_@o!KOy)4#Yz0CE8gl)O zA1>nhLu!c###gU(i%pb!ijp8D<4@4dIbs;smSP(FO^gTT8^g7|NIp%-JeLvEad z&JBVmcrr+Y$Z?XyeM8U?qQ)t$PX+0aaoni&>7XfO9ye=!V~`0|j8~9^fq04FO>Ysr zSuozAvU0~QR~c``|KbZTsajc449lz>2#XS2GEo$aut*Z1UwM?nw@0IqNEpd*!#*%C za8Z2kcvzH$d3?`y6v=@}mXpV>Mg%UqL$)?#8*-x`IyVS`7$iFVtROMplgM}Maq@@c4FJeHE}FPX{3~^ZyiE?n@ifk{ z!KmOhs0QC2m1HF>+~fH=*7d3+AgPND3iDn4!kj;X!ZQLVOa8fiU2MR^qrjXXde}(B z10$RuNnLngN)Y8PxY-p7^U$N+AI290ut}x=J1xZG%97bJ$2n?w%q#am)?$Q^z z`gKJgEE47;=x}WBrsM3J6l8ANFNLFs6a0Lb^YsP892=Al`|?ZhS&;DK{T=bAYs6Z^ z;H{b!_TkhgQ#bb}8wS6U7#Mo9W-Ixwc`F&K3Wz~atTzPugQhWNR1@9niJ2{DSa}*c z7R!k6MijK}^{6&Lw17l5i1(fXK~R2o#7nEzoJul4T(#sbkT9v5B{2|*2(oIFxG)mb zs)Fu*#9r|l5Iz$icrL&TBK)ZUkBtl+5@gnEQ)ze%vP#RWGz)e}mRW8(1W#B}ZBckT z{+!wfqZCzQK_*d<;gP6x1hiLeEYJIO(JB>*%E*jo(PIPW$Gm2hmW1G>N^$bMYAHyE z{b1LuVkXVh@v2pqf)&IvJlTTmSf0J~y~G;7`Mp_TmGoawT_Zks)x&$a#r=5tgX#3n z-sH~S#|?vz=#=YJ!jiGN6zlek(|zOM;=#0YSJJsF(VwaJzCH9muI)=R=|*3&(U)>{ zB?dF~t?7Divfi5*%D~X%`=R$jOa6~uUOspK!p9euPpxi!H2UlFpPf&inn<3SP)>4+ zlLt}mhP1mq>2A;1sxw=5X6l+VwOcX{_qvs++qFTM>MRNCx}B)3`N7L?znrlBqpVuOL0W>=yZ zWo3*@J1i_RE{#LWwM+8*-+k}9?=K`9hrW{V|9!Jz8>vksY#!O{d&fWoSp>uoo7E$&+CRy=!_TT+hwYmP%Jj#O1&g37q+Z@j+vI{d>G=flPa zjj0z-JZ>CHxrWlNGfCH(lxqZ_YOlS)EHX<@rLpVYw)Ea($-T!`hf?;_O7$6qIfFW2 zoAO|2fH(Z-gJFu`sSimwtW-bo1DZ2T!ETq}ye-hcs)lkv(NEDF0rcpO(~E|8>S#$LCIZ7b-a8)sE{um`Rq7E6w|skENUk z)|@Y{>`PT2PSC1zEWu>jI)7syT-v{ET&aE7@Sx$7ZEJf5{=uc#2NOo9zHIhpwzp)u z5B;WTdjHwv{Cs-@xoccIj3>UAZ2pZ9P zSfzXnz_{;GR+Rh7&!PLN_FGXNXuyEWUnu_u5O@%K9*1XaK$JWaVR_oqE`~kaG%HRC zQoDy0dAK25@k|KQ>|7v>+C4c`_*6r9R;?BVftUQ?F9AmYcEEM6;y@f?`9Ka#CJExj zsHE0NLWqS)TmdrX0%Xv4KxNeg-m)O_1>m5gaNBDv0Sg+!lg$zKYB0?55+;7l1IwEK zhWtjLi4>4PHSVfE3y@u#Y2fKI_k&Dn0jg&}B~!mOQI)ao{HX0G9k)B~bSACOuk=0Y z`E~DSy}#;99(pZfYe?IgleT81W&E-2LS{$zXNMoiia(Ncypb>$5yjqned+Gg$?nt2 z+4Cv;>q_;w!i+!36xifxZd3nX>@F~u2HprzFkvtNys+C|QVPt3APF!cGIqqZ zGUL#Dg|-AZwj$uD6_Wu7)WFb35RUy+Q%K+g(U3|{2d1WD`v!1)$jX9eG9Y`{DGVCf zBh14Y0}Akfvmt4S2|&67L6$?1e5wgwOd-{pZMD=1u#TOD@Gl?(<3y1Fh=8C75-WnF znswH3mCVS|jHQ4Xl?nn+&=_fGE7q35krL0!tcIp%p-8o6|11Y&C!=8yP>LjXi3)NK zMQxi=RDRZrSl|z#dIo|%ch}!+TawqMqw-!gxH=Hr>429q7fmMRy&_s9U`R30jF52+kR?$@MbXjT6lKsLQHwH;LFXUIe4GKP0vu<& zZJ5a+R^J-81tjKTjV&dyhIZ<_lon{9WY$SN5V4kl%J=zFIh{LQu|5)ft%0#L#7tJVmB5eGDo zQpj@OFO-MLH-Q*`9&0pz%2@} zkn0g792x=X)ouO{n0I&qd`h(n30yb?5fs1@_)&FjnyCABo190A6|a5+c2#DYmHhZW zX_(DEW1RxOlZ${h?UJRwk_hO@886`{Jc*z1vk>car`(*vv#2&l`z?Z@H;xt~lQwSg+fl=_Gf}%4Ffaqzn4P|CyfR#Dn zARDt+scg(Nwl>cWIpcD2Yk0?|c}~8Tckyn%Zpxx-`VCRwmS>o-d=v;zy}S{u zFOq=IOi3w7n9XD}DQ#kTMEoXQ4z9zAdpbZ-}O zpN38kIt+^-4;dDPm}9pG`^^PMx7VY&rLo%Go})$Fj$H*9I)_)9qvEU>z9Po#yFI6i zObU$iSRG32Vzt;d<^aV;HdziSwhML)vM4Zl6&!VlPoXPh{S8d{o~+vqNoil~IZ&b4 zu0bdoMw(}W!olDK%gyHfd0%XIc5+ByB?xFIfh-7g{MFi?8HJxwx@Hx7Fym5{AAnhZOZe5j|?gAE2$kPm9|rgeK_OTc`Kf7Kagxcpd1`}bRyM$PTBdIVn3g8 zwA|`Tw{|C6yOo~)RUy@SQfbjv*c};rTgKj-vA>wHA6a)^S=i_kDLe(;bJB9fwxVrELA{MhYi-sS1ncRt-b8t_{C= z{Iv_eCvbAbSVa*0L7Qa9HeFXY8zyFOW8_bR%FBb6vt_E>+ z8dsNbHH|A7s@sINU)Ht2Q8dC84x6P8sNNzr3|owrjULK)mfWyZ7%!6>ZjxnXCF zesZJM4D}x!Zevz$ZSkPy4Xr z%YNAL6@S?A>0ffN6A%^=HreWdZ?{y?KcD(BwDDI6?QwQ~yVanY5R|eBRPD)Jg{=!u z>uaVjtNdZ~Js7}dUTT4Aogzu{3!>$>MDuTn;V+1>FNlFZnl6&0<@%}rBXFz9_zi-n(6vu7nhx5xxn>J|~5M8sx;)j?JQUwJuKuc4WTdb4wnjYNQ*4;U3M*a$B z*!Wx67;j~P4XCO}ow#S0HbN}5S1=#WNmnh$d-@7HNq#X^Rf&h=2q|uEM*b zM|xt7tci89F8ZV|Hpqt9B%5MD24YBtVvB6K&dixsKe=RkQ5)5Npp21kI=fP{V;bv8 z2Jv-tw8+2&d#4cRnx)ABr-^AHCz|S9nMS#W%yeJplrz0}PBk3Dv1uQImWzXwvv@J8 zT~~aeL72|ooJ}E#p@{nXGCl#NCDo}s1eJ4bS`!V~>biVz)HK1a)-*m5kZ63zf5v$6 zV0S;)S+1X?i7gas6O{1;VpMMRq_%}*_7XHTjY$j%l`J)#Nt(+TN}Z;6MAbW60kyD1 z+x~C^Eg20Y&QjVjIJXZ5KY7eViPey1c)wTh}g1tHM(W) z(kvT`beeNeV>+|Fjv<+`1jgx#S9k)r8fSJOE6NHz|9RWozfo0LOrmVN=(FhVO0ao& zqiWh387b>zXE%x8X}Ibsp0J*VQN$9aqiCEhE*g)@Ymem} wtHHIudSLOh;=1nAYq;LhvG|2p_Uo>9?pQ3lElgOPBYtlW+unO$-nJM20EBEUx&QzG diff --git a/app/modules/agent/engine/orchestrator/models/__pycache__/plan.cpython-312.pyc b/app/modules/agent/engine/orchestrator/models/__pycache__/plan.cpython-312.pyc deleted file mode 100644 index 82717376d10d0f236ced02cedf339c4f61d74e98..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4107 zcmb_fO>7(25#AM-uL`5v>U>MQyL z?=zLEzv!<9iUA=jX0WOj)oQ31s)mbUf%(lyHCl|yQjat%k-(P{3DOw#JyE<_igAIf zfQJs@y#fyd9--|K+ zQArymm-}Z7Y7*$DE|sXIGs7-FL@5S{ zzZfKeqS^?iR34pXu2I%YZlO`5Tyg0`m&X`gGwA0UqcxkkJXE@;TNUb1mxqa6(pKvh zF)5E%?osx@u=eC$$7S`BTW6GL_Z{2Hr9xcQG)u2iP2*urtJ zPYXPj&)msoex&6yw-@sT9=dUJIyakH$`p7wy?8^rzMMBFfsUDImJzE4Z8qpiI?r5j1Yj5TT{^;#_n zni6%KDO6ObwxFgnRWo&KvesZxm{pJnFisN4 zmr^Iv-%NLg&Nml2eJ7jQPXDRqTxa-VGuIiJ_+pWr+UxQ^pJDhmtYQhgs_t+Z;oGGqkmBl6RpC%fK{eon#9uR%M( z`2`2r1#*U;s3wx!m|{1`9E0754H&iO9jDFDo7z=scJK&Db!oNcI;;or$f{m?V3*69Lrb}odYmJ$_n{#}mt`Lyxq;+}L4JrBlDFXh z>cNjCn)93ITS}rcI@Y|kIoMXlJZoZ?xPQ4uEuEi})vyoDH`z3+W?I z%LnH04m?-^Tr-Gw(p+6N?GjuAm0arBSny0Bc0UX2I=cG|Vo2VBzjG4EA$N%NZOk8a z1Z;i$#-Tv??i6Qt_X=zfj~LFM2l@ndyis2}{K z?^s;~st7+BKphz@M#&IJ!}~2`T{FbV29uPnI3f_(DXZOcO5r=dh7&ZJtRRq^9 z3>*e)p%N;dmqTJFhXZGY$FR(SNYXH5oYcU7PZ1(Ma=4%nE=a-Q*e59Gkt`uuMk2Ds z9ppYmQbh6-B;!a9(rgw*B$zgx-vD_vt|IY`xlZrEMy?aT)KV^WPM(3A<$g;!vps(H z*@gD_mFC=LsHI%lKKsTqw|(|nb7m`gx}{v(J~#2T(mwZ5b9O6srlow;dH>_)t*!od zTgu1ViPOLTX*+SXnR#@zrCjZdp1_>dQciT<`LH>+)pxn2e7JpS>Q74hQl`1EH8{~$ zGTy3jt;a|8A3*b+)7e2(?1q8#zHjwG`=7G zkwXz4qR}p0>>$D$gQ+1N%ZO-!$ihH;B?!@#FbIRL?mPg7;fso^&Te@Ro(UI@=_Op= zw=b+gaSKC=@`?u>QTnaNg%9F1OAy*C+>a6NutgYgJx<{LfC2bs5}q0>SRXP&Up1-2 z?&6HmifOOvrst@+RQxrbnuI=V0trRp`7BPsDk!fYxrgM4S89kMS%ANT&0h6Nk@DlB z0_Y!VDMOu+1m1p$^M6UCzDcB-Gmqw4N~#krr_#;& zt${b%O4{=*oG+Ie!6!($j_(twzfjQK%e_;%%LtwD6lHA*aq z7?yS3KHq}}!sPA)VNyI0CcOv3WcLFBTfhThQk<)UbrYVfxIw+gLJ~zR-b69v#Wmh+ zB4~w;ju`Kydd-{lV`f7;EKQtW0Qr|smgT=n=f0JO|0bRJr*!!n>GHSIt(`zX{@&&f zey!|C!0ZeJY~=8QvwAOLF-oiIQwdl|;({E})}s@i9FH(!uB{KcPT@!UcJt1_&A;2#VeUNWJ*f_nloyl;R>;fX}`k zGqb~apLu5fp2=tuJb&Hzi@m2x(zoawKj7mdAN~#SbBRbqcBGnY$THdyCsK5q!bsGTMzW?Enux`mR4r|!g{?Z7TGq(QQbf8bk@z!-BxsIC_Z0C# z$rupvB*ZnE*o%hIK@m+sG~E{+644AqvwhLLh~^+V&=(zU4eCSx!Qph7r!3d4`<8Fl zT@PHPka*g8N10c&9QwGpOdpyJR{uS%_@4Rj?V@ED2(uqjw_r6I1<2rRix0z8v?*$eHPz062^ zC9p;A2&R++98wV!!1akuJ#5njz)>RAK44*fh$j8<==yLBnFl$ER4lZtOQ!n zQzc2F?Wgu4;KF0Xfr&Aa!E7t5=XkpG&?eNai0VVZ>g;zm`BLUF`WXHvkHWv@DH^sh zZSrI>r_8k+lhiBdSAd636F)S&$x~jv$tu+J zfqz^J9Y(i+C@vDkuZqb6gvR$D0?i{;$|DZtu`Q==0iC@{ozZnY!G@qA%OeaUBmj6? zl*h!++Et!2&AzQ;nkCXWHf^L_#FXXzk6`Ngen{;l@fH-p0+Wwq37US{Cw+Cl!}^QAAAy7?>Z($4j+awQlKhdNW?P!;6EXOQ{H6~?;8L|xUB z3MUMxD|niSC!nh6r9v+uyfk{ifF#xSGbh|hf#$?W4s)%9K5(i9xck`@gxNI0B>>Qy zP$;1AJogCjqk@#s+E9KCPtEBCC}!PA}1K|gMOOG1$;;w zDUyLvvVt9Oo(WGdfD9NJG6=b$Fqb8H@Pr!O8)JhGT;yH#(UU4#Byqm0!V>|{cD zCa`ND*C5OcMU6*opk0bIL6zZLG;7`y4I;=9lbPC?_l=oSNFTKi!YV2 z=kpz9@nGumi{?a%B5c6jrK>o?{<_o zdKWIX@9gF~%EjK)3|QkGWhS(`%1ppkoXP9i`X|Wz7+dkIhtotT5%4We6Z`53Pm?4L zx#Ke@4vKS{OMx1xfl~dTUz(&KCzPrc)iZqPZr=%eo@pT;RLk`q0S^SZ1_ZfI?=PD? zSrL~R4=x(-z~2(e@FZx4SCnATO*lQk@$}69CjkmZAUnteb`#+a!aRZyoHex06@3+B z2-w0yZk#Fl*kpTU=XOV#JeZmNO6ktL-(G#0o9-y@_X|u%xp6{)(#zCDSD6n=h~uv7 zBY0EVYWhtEHzkIr3Rfsx1sPr;xC-hF+lR%#VR#|tiAIZ9u5VXZ9AkJs2HJTIZaQ<} zO=nKrbmoGa&RqXZ2V1~RXAZYcZ~%;8KM(FgHOrejUGEeQj0Z<>6%t3O5Mi+q#KN3i ztXGNmg0FwT%Fs=QpZ5vC_fc7vzm{gclScj}P5)cE_D|{Bchc>zrK?A(B463f?~)@4 tjH7H^)_3QRBzPSSC*^n0hS$->w0wDY>_~#w(UdB``+V%b61>DB{tqbo7E}NL diff --git a/app/modules/agent/engine/orchestrator/models/__pycache__/task_spec.cpython-312.pyc b/app/modules/agent/engine/orchestrator/models/__pycache__/task_spec.cpython-312.pyc deleted file mode 100644 index 4b064594248c90ab9fb6dcd6c210e7b9a7548da2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4791 zcmb7IOK%&=5uPE3@25n{lI4eFNr^(lUcte}i6607wkTP)9$rbi@zN1y$LuCG_Hc&o z8QP{!4D0{`a?#B>ZgR@PLg1tSLoQCp1Jyu~4T2!>&48H8o>J9AQKX=?cLz{SbyZJu z=Bui&tM%7dEG)tGm$g6YyCF&XHxBkMzpKc5L0OVsNJJvCA(iBuETir*JSA_=D|D}+ zlzcf~$)EF!v0?;D!CbHu%7sedTv(Po(wszm&n4og5$b)ZxGU$P!X5y7kOp6R+t!${ zhQJ!`vc`oq0@i4kH6g4qu*SQrNnuTZHQ8nD6V^Vk_IFwPg*64%beA$L*$&7cybEy=6poS`H3$VApTsi8ps5B za5Ya&jp-JT(x+uZ(@nLkF^4BLQ!}cLp0`y-AM5l9PZ0|S1!k4hj*rJ2jTNawiAss? z@K|w!vWKun$$j4uEGrz`Tb2qaq zw_%ON<(cdP56@+nvMbXI>Zj9ROM8gWx6agOHf8pdX3(coGxV`qX4V6mcWm|X&!#ke zlra4Iow8VdgW3+$9E;%$YS>ebW=eR&1?CYSXnxd0=ws84qvbbB@KGzY!2Jb_-Pg(2 zGWXG^@D-cq+c|h|G7o8IRH&J!YK0k-XGbSD9H+dm7j%dtqlL+Jt~k{)ZqvFDPktbA0sZK4ZDm#G_#h0H#ZDe2IQuZK--$}cvQ(xU| zq|VhAz6oEhE0>#*`13YeIQ?j}X2J9Q(SlMz>;z(>XmAt|_yr-I1GDhqfE*izRoNL7 zSa@71Yt9CjcmTf60dRS=t*9HCy|I)D9)$?|F+M+u;w*}DC=S7pK^uzW@Mr%BL@x}n zXYj9JB%HIu1l%ezCTzDoT$)fhTg zyS44BE9aX1>DuhpjXD;g>!lyv^ zA`k%xOAtmOF$zOiA}|s`s>U*L9$mF6EKl!PhMun;#HHtLFx>D)@*eK|FQg)D>wl70 zrHp3@cB?3(k19H&$SO7uIW)ha;>N+1JTRgQUN3^*2Co=e=|0h}ZVq(+`bYa_gu@Pi zs7Zex&DLCE0Gdh=TF@$nqZYJ0P;Pbex}n?7y$)-2zX@_y=Us4sZ-aNBI?7~ zU+2Lx?1fBss%z{Q@RK~*UPXmXP~_FyD4M-G)OEU~JymT1n5~v6Q*DQq-Qe8qD3QS@fmF}ea*XrHfp=`_RS(E*>n{VQG_9Tzb|IRO+9)oRUo79yv z%~4Q?{s84a=H?Wx(Gx|8AYSsG1M>YjSI6 zTny95POOuOQ6K?-7YQWRV0*j)?GJ1>0H}SCaI-G@Q7BjIiTVTrLhZL=`^duU@{m9t z(6--VHoB2u)L}Y3h{W5c=t^QxR7WpSARN`EdG-mIH$x&<;D^_F)a_xQ?{PNlrA+L* zIbj~2bR%~gwM7)mC@`*E!6n%p9QS58yNNawNF_FYL3cR6Ier?LdZMnJZVn9A=C|xR zbOEDhMEo$6Cr2=<`MNT)dwTrUOyl%Ln4W1U7v0F>x<^MA6YWEh1-3ZU8;}6(dqJ=Z zj;Mw+5guEvIOU473LO$Os|QhP?|0a`ZC>rvT}fjPiS@+9@+wgVR8CNBw}z-b07}Mt zenT^h)TR!!4%mK_G^bs5!FJgJM+d$;9%8%v9KP}};HzjuaSi@#Wab{g!?;sMZ`GAs z&4J^!n_Hxz9CyLQXO0H*hqMm3H`2h4uao#eIJb1S4sjPyNPWosymNr)=5hx{&9t9T z)(aD0=62)IZ+0dHH@d4y3LNfJ9VH}z8@^?O1Jya$ybP9o5# ze*kbnVxIy~EQjJyuHQu)iaGcbO>PhLeP7m=)cuIHj8 z1-^907whuH$pH9{p^prLHq@Dw=$e%z$H6y@zUqn0NghPHT!q8LLB6;Z7!bz{XqWnk zt{GMlXwJ5wQn7=IGp%Q=Xcfoe3ijVT3SAIWOE4J@GU8+cdC)!&ik^lC7_cU^Y2BIA zb8LVF(>lipdow0-tKAr{Lt6$dvMqKp9&>j}we0p5NLxGt{aT0oG5$OOzXw!?jP!|qBP%v`we7~`H+#mOs!L+rv_;4pH6Tt%4+WDY?FEuDKp zzRJol8LC&ZpM!Ykm1X%K(%65bfqzOP|CP@FO*-H5`{mPH_V!Fm0;Scj$cgRwmISv} z+$W#d(pwVTTFHPsx}9lBaBHOl^7!^e)W=c3v<-9M)=K;2VSE;Dt)wDM@H^?}07d;mUfiF*t?a0vd`pRxNXwK$7igO39@(RK3tn6I%8bGm zSX*agpTZS5nnGS2f;d+8D}h45_W9(X(o^UGokOhX7XxAtabk}cTJnqGFPTC}>@CrS za5a*S{!TugrY+{OpfAHS{PDHR=lSUi=chlsI6n)9$Ycqr`XyOeKzL0mA~1#WLMe}Q zETJ`ocSG{1Qr0BBjH?d-CSP9F5pL&LURhSGs6dc-yc>r(__pQ6Ldo)Bq_1KX125pu};&Q~CT92y7#atyEHF&M>bunJ@N6xQGrpW#5kXcHrg!F)C*8TVi-_@ z`$p*n6n38|5itrV%sx?KVjNHc`$p*l6#u?a5`fZE^8k*=Ig|f&N-;4BIKF+arXNta zS4Dx?a3|IveDt~%Y><70YP4H>23cRU7O(ZylC{Lcfepsl?E;lf&116lbij&E2^yNk zLS^}Vp-5VQ6`d&;wJuBQGA^&6qJCbK^ls0Qw&#j4sS0vcle*o9o^flp5bi=fzU!Qp z1x=Hdq@tipWwk5lXeX$wLeJ9nh9q}Gx-wteHMbj{AV2Ge<`;K5-E>*i(QSPJHcwh) z^dh{fy1OR3O(q=M!YxTJF3%txxG0nM+3VQzs3d7Ru42;i?j$7}K!bMan6p(uks&(l z8u$uyY>N}olCUc476;80VL`UIio>(zxhYsIB5YfX2&Z8Moe)Bg6>LZG5OlEk3@iMq zDgr~gpo)@OvIcIhB8_D5#V&rW7$lJ$!vgI|0AG%}CZTQMN=%Ps0&l4o8WI z5fLY%kB9^jNh11*7yx0Nd?6aPXIHjsJvc>jPQ5J0IkjD`5XJ{c-kDd-dv4G8AW44n zWyvm`_z(%tzBJt49}D4ihLcaq(M3kV%V&L1^UM2LJK*bSZZg_M+tk z8Qsp!pf$c-+8V!hIwwejB9_*WIta83f~SZyEk_*WGLi#hu3b@Wi&IfKrv`F7FR7Bw z^Vv$(O4vK+9nUU(Oa1f8u}x^hJ4!;%ldZUkSI)!Yd+lz zT@t#dEZuM_-=|kA(CsjpZB}yc9|*3mnBC(e4Fbcw)3A^D4)4u-?yieRAkHatvJQ*m zc|n$W{sD#GCY~`6PyOedf_xWG!z;OSY8OFlduf_(QK=R+_#1VqMP(m*qb=qfRMfWb l1ns+9-lpJDpUgYYYsh)7RCkDdJ5N)gWA)&%FF5;Ce*--bT8RJv diff --git a/app/modules/agent/engine/router/__pycache__/context_store.cpython-312.pyc b/app/modules/agent/engine/router/__pycache__/context_store.cpython-312.pyc deleted file mode 100644 index 46bfa72e6495a5e7ce59bb3e58cbaf9c28e48a3e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1591 zcmb7E&ube;6rR~%Uacidwj`(vgcRCKeMsm<6oy4Jan_Mm>deYm zVh@4%kQ_>mzT}Wgp}{%y(Ep;BgdQRm0)?J(TcVaipwRbrWrsMS(1CsP&3iL%-}~OY z`L$GX2#kN8{TTeB6Y>WxPKGfBlPds@2q&C&NSC%KMXYtSuHMoq(a2YX>xYCJ$69`( zWeiQ%dW{R0Cgtn9B8+Z|eoqBaPYyvh659@Lm|VAUKgY@-)!Ik|G+&aHl=ZD+>)VFhwQ{S%5K(3Cj#9hU6*Tfdoy4Zd@%f zl<3@+GhkA9u+eyX*ZWopsXV_U4!keLKI_Zgo@hsk?SJn1L4(U+UxW?6-*14WEtK-m zfE;?D^twGh=mK8o>V}F4kf_Hexfj;+bdk81EGf z3ir;{c3ewh(sBhw9mOh&(;!Z0t`7R#kHlG~?RQN7w;yGL+s1U{)v$7xqm_>oBsXCd z6+R^QNLnL>(j(`g^U}Wf!oD~zu8nIOwun;%wHC@#A0N^1fcGN zI3%e?&Bl}Ml)&_JG{GsgsJZ>*2CBAy`UX|okiz)0Sg}wnIh!O08IS6WNZP1WHyXORYJ5rum*MD*TY| zd$dH3Ufm>X}1`HVZLIb2&N=t+pPHK71k!(9|EoCZB;;SQQA@m8Sv&-l86pvh zOOO$xr|rhB;k$Om3YY}*{{IHB!_I1oRVvlm)tM&BX-FnJ0!2{l$^3_)GjqapId5% zK4?p>9PkE80eU^lDa{ePC+Ahi8vdui1+=na^?EkM-{?bc=O4rm9nu5hRBI|c`pQil>zMTw8bWqQB{%YTM9 zR{VLfU{r1t-~9}47kb_<1-}$T=n;#T!6yMhV6gu83E_~+0u3tdo1MMa4JH>aA z?y5z1Nb+bjlTdXBT!c)c3GADo>2W!x>Xx(7s}{NrX6iOsimM6?@=`jc=x&2rg-Z?d zIl*MoXY$CoO%8o$qq(M9opAtKm~Rr|blsXrBy~HL)eKDy$4oJTB?(9uAy)WX^g}j7 z@?4&XP%~1NT;+yAf_M?;gQW3_oEW9;FsR_XQ0R+v-?NHLmA+^~p6WX!pA*fEDB`)D zebIPGqVaQbDiocV2*F59R+K&*K!NOo&c0+?$|Pi%&wAw4nRrU>qbSd`FV5~ojMXnD zGLhAtq8LxbRZ+}!tiHEMZ3qujaY1&0R9f1m`9E_lLWAhu4D3}*!X{uj-4Qbo62s50 zB_~waaU9`{oTi! zyNbJKsWFAbAo3MsRt6siTFG(UdCgqmIDvh5YJ8W25|O$*Gu(G96Vw!0~E9_T+Q% zbVkveBvToRYIZ`Vh*T;-cIHQ~Vfy%>Zd24KRj=BX*wSrCwH>nuAPYN?hQ=p!TOvIv zQ@ur8yF*3yf^e!L3T!-ehN2t*p(KO&CP7RUH6CMwvhJ_RaaNp+t78mMcDf#y+l1L> zoXVrd#@#QQ4@)GHz|zp}3SMT2CAtBp1Wb5j#gse=&_Gp|+p-244X9dRy7C@mfD&K# zN50K-ma-7mgm6jNUKaW_p}!>Tn&vAW;nMDMV21|(Jv$0*<^IDT^&h?+2vs^al{+I^ zXJr15wa$ktU7O2YeOgyv!K-x*R=PG++O}8LZ>ns#|8A3`rMXHRP0dw5=~!QG@7LP< z3tLL<4^21S^0Ze1p`tf*r>(2p7SY-w^ZAA6N^OUyy|+AVmB7ZLcjLba-Id_RN?WMX z)>#R3!?JfhcAvXS>@GJA;TiCtMdTG)tq$V?jDxx5m>t6$U~$EM-U85R0O&kt!rgu^ zNROMM4Xo>_2KPFY0QL%(C2GySlDt)NATXhH8um?c=eZw~pI87g2$(ud0WcIT2@PP@ ziW!12Y-h+pqamJ+>NS-wGL^40l`k$?4BZz^MH5*NKt)7Y$dkG!2FE1E#-gb+GDUT- z^U;i&rl`t4#?zp^kmZ{3G{y8enbNo<59oFU1U5GI%++NWTm=?gkf$aR@fhf3gE-9V z)-$q7A4IPGm?1R6ydm%dP}dzv(Ek7$-Nw|tf*KO#+7N5kC`~6t+)1u;jWE~8kiC+D z>;k#d3F6jY*|_IUsK3(HSMlHfiQo*lryU@4>)K~Lmp!x3{ODVAe^~C`sdeuxb?+{B z4`|&3rSAPD-{7?Eme5iOwB1Hg>zaM!@>r#?Pj@1c-5!}P`R<&+58d(R>wbo_AL&j00SEWYUe6=7- zmMd1tdY!N9ZQg};z`KeSG{;dxu1bWsr18E>=1Ll8yNQ zL~AF=Alr1kdC9`{5EbFX(iRYPj+`J_GD)VaC&(lh7KY=WfBEH?VJpad&G#4s+mNPN zy*Zjd^CB5mLOBA?mRC+G87hlWB^HnCO@=dMYIb@Q7BRqwsHKlWmh+&2Fvtd&0n;t% z7ia{>`ydN9>w>wiSX-7KN26(zGRX-==M%6Qz1d(P)?mrMAZHcY4GeUrsa9l$XWeyp zDke`bztS&GL@8Ka+`&XNn@C3`dIYDmim5c1@kBfa8V7AUGuMU|aIG?X^huoIX3kkW zHIY$uD~(Qqhio#ee>3yxnC+`83c3g8=6cqsh_%)hx23p2&4Ib|ca;5M%^#lMJl|9F zN2VROTRUb(E|1*l>IFM?d-K*gwcI8W1q9vG z?yAq~YOnZ%GvUkOvVV)_-!dl_#!LQ3%KpbR|6?WpvFV|zlLXq##d=D()GZ+hn&ytL zrR?j`d_84fujcEWcN84j{a-8j_SIC;oz{+WYoFHIS8)8o^QLFv$9pbFNA{^xOBy=}6r~eG+2YQV(HlFt~nsxkv=|vQ~h*~$JjeKD6G))5yn$iOs zVhMC&U31m&h}_h=?#f#m=_zyoYV^ z+7&#|t;Y#yBDA9{HPW*Uw3B1lP%2ws(lWFDG&IB3W%_12cDVI*BJ+v?)ZiqHq7QBu z`ES55y2?>W(S^s4KQ#>T2p~C3X`1S8h)krw<3^92m*Vj1wE`EWDVTQfBul z?kNW!)`Ab0f`jGYkQN*&1rLLULDzzJxj(-v5YP}pk0$i2!Yo?hH(H09$%oB>p)J-A zdpO8-+qq~Wv(g8~CnR%5Qc#&8stG4BtelF*gQX>L8Lb0^Zd`IaByQRB&a&jPH=)?JWjIKFh6{zwgPi1&DL)Z!cCus5#2Tlq5@(74;I~;j7~uoPlYXp7$CJ7U@-1_ z1UhnC*DCo&HYSUcQCKgK+n&}-@)h}w z-dzcJ*j>YiY3p%)0w-MVmWVFQhQ4(PO`iJrw7kz zoDUHK*d%Lb-FdnfH+Z7khjZ3br%rv0U;8om zDqrfHn>iO@o9<>$W%TREpbl=nnt&jU0x=~yWjF-6&9MnTA!UZD4HQ?n19_45}A+yIJ9Rm7i=po2y5Hoa?&y2G4 z?+5kuE9YbAaM?Q&yw(k3Txq}-o|R`aGTa^>mL5c+(-ic-$T*mTHAtgWtbp`x=*Zo- zRvK1rhIzHqI5!3v2!ux{dm@@AGOynB>}ElT9`M*IT@WAGSJ|+&656sX+~6Z#U)i%& z^MF5h)3bw-hbrjf0r}nrx?SVJCcLG6M|;uafMJT_TOkO1-vB0WYv0YFUxq#J7Yo`ejL+M; z9UlI2O499_31;Paj9_3SF9|^h-9hDvL==9ds2?t{zzf&~e~Vio`*ZFI!ZBn%4_H0V z<++QNbL20$8IB{bx_Nkd{f%{!qxj6bO0HUUOXNY_o{Z8LAfmzK5V?gy7noZ5!nGe? zH&YYzK$fyN9&Ikg0rLZ{FRip{^;)( zc^G-Ac^${%mQqsA?LB$=k4{cTPCn50{PvTP`;$^$ol^5uQS;eoGLg^1A3oLcY8q+~ zQOw6i&xB8&#`sD!mDTyv>2yN3P;iwLIZ9(=HBX9ZVJ{vmJm~Pt!7Ce!Doh`kJw^x9 z5+(`isL-jp!bVG)>-#^R$xmRC@*HIF^|ypTCD2~A_}bmm-n*Mg*M`#iqYL|Qu0LAp zJUT7h@wUwJMQ=AaI8CRx+d|-nkIo#se5|4$vcgyHyPA70Dy?5ub|q9>)(JKENIikg@&AR!P;9q1Zp;uglI2| zmFEJJG_K04I&JKCpx+CU=!>v9`VwTORX5;6zY9INfrdh|)*3Vb%&(B+GQju;=SDB> zoqgtq2Q>fS@8~Nq9OmdnES5VMUS?!Wxixll%JegGxTD_x<&G9``5wrYiK~-|tDpD+ zCI4W-d(%Hy5(bOTK_+_PHv9=H6-~;bsJlfBQNj;cQ1^=B*-SKHjL@CHl0J(Wf{NnJ zQVBDZR%S8jKCB(X3}YBHhFKi56Oifl^l6OrQgnSOx=s`=CjA~}2uzBfXtF^{_rc$nSWHyN0yLpJ1`GjP!x9G z#e&@*JD#wU;(L{TA2Pic%u&R+MkT_2hm07%Lq?34T11JB$;qf<+#24W-nw=QM8J%z zW_Q5A62c|$UcPYdH~1f*uR#+Hn}WamKoo}KeoZ{TCa&L*r~ifY|EE1~;SPKXZvf8N G?SBK{h*wGg diff --git a/app/modules/agent/engine/router/__pycache__/intent_switch_detector.cpython-312.pyc b/app/modules/agent/engine/router/__pycache__/intent_switch_detector.cpython-312.pyc deleted file mode 100644 index 0509b3df4ce09fc694408b00570e6fdd41df8310..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4057 zcmcIn>u(#!5#QwH=mpf5_)PoBY2nw{{geX800|h#B zM@rPg34$UAa33?Xv$MOudGN3G^>qZk|Ni0k>2?@>hLg(2y92uRQy9z;g(x&bvNTC4 zjy)Mq(gQu0;j(;^r^G`}6NSG*6z^@1yE5sW@I-w7#z}@{0eu4PkNPF*pE;8p!Y&w1HBJ= z|3pos&Ti@ky*cCDSlUPpcd3S&GBg$m6oR1Ade^*bern#eE?UmfUsj1CFx*`=Fhd3kV3@+$A{IV_k*Y zSwOXy%umdDSMmI&ZQL1bv#+wveX##y6X>9P%bt$R10a74DyOV#JIJIs&{O#ki7=;Y z3MJ$!H$#e^kqWP>XF;Hsu~S7R7wH65JR{y}nmaDiajJU&&)i7OcJA#mX#_8F%eT%8 zY+=B(!n+OD;`cr`&FNr6k&M*4lzb0p&HJ!MnTCaLlf95H;77x5XMgTZg;D};h`7Rg(F zLN3rEo%W29-_jWf57+8=GC}^xjnP}Q_ZGRu*`DYj+n1Hu+bXkp^miSViQ>h_M(lN6 zWqM4`sN=CNbyUhTZ3LWEmqy!Ta#~badQ{Dcay~BtC#C9o3>ib<+c6-&yjrO}RzmXb4i zJi5N@0GO}iEq?hg^5sRc*wAz1xvA0Frfa{n8hXB3L&RQg*iHK)0lPs-%NcD*(hZpz zs$$p6DFe+#B6}Clb=nj-7qw;gaDx?V6Muo7rwWEFMV|#iI-ZiCw?xf+qKW^CdomN@k&f z>sk?-mxX5+g=cT>S&qc5NZgE^T4@Zg2%+oa)8n(Pi%%W68CnjvTjBOn`0#T0h!s9k z3U@4rk6Yp6rEphCI61}tO=!e50bx1NW(C@2m8HNlKzI~rC^hul>{>q9Z5`}hYUo)C z^sF@QSrHnSg~OI`c&@J`99a|w=9T4m(uya|H>Fa1!1NESfo&vJ9Y5CN&Qai8r8C4> zcZVqo-bo$rtX_dC;M?w<;8UL7|JR!sCNG9Dgf&1@@ge6$7&`tFz`O}YJAnBRDysr> zC~;%(*FTx<`!H^W5?`?~y%b86goNo&upa<>)7$uf;N*n&V1RF<&G-#rQw zJ4S=5;Im_R+5woy;8LoA*_N1Vo*lf&|1M{>m4S)Jla;JG`BMM+H~Yt;{XdMob)Y}` zLRKjn<3^F`MsY&UW{MN=8_~5~(a>O&&ZUc~!J%S)BGP|8!n@e!&ud!7_Au4<>8i|9 z!x8TWvhAP~O5Gf$+rqG{yTP@b)f~cLI-^Qu5d@Ps01?x5hP^QT8u$FVxZRGo@N;Ou zKUO{U;kv2d7p>&!y`{Fqe8*B-qSTU@68;fvn&r)4>*s{lr|2W0@x$XY-5+$Ddy{7W zK&eSC3FlY6q&B?jC%g773hg&uHvR3}-D*ALVNCdTZUqj&^+tS!=V7H=^kHR-l_R4zAL=|Zi7DX1SzMwTmTE^ttqTO zci4Bb8Ph)lAAtfoRmegy;rua~Y#d|ht;Fx%Utazuf2mH^JGcpAquNbEog4AHvmC#v zgYgJgjc7-08Ln6)*}`{EY|YrS#jFwWA553Lz2fcanM2$KnYSb-J zqi%^B)l7g_7QT1>Ja*y?B-C|C3ohZ$BqaTT*Q&{j1PKBv6(O>KTCW-z-*K2|GWNSO zd5t4Sbiu+@RH$#0RH{^?q7pQl(2~%Q5 z^kvbKrsRz5%aWyJ6oH&3Ouj~#a!&}NWFjRg9r*<(Y3iw?S_d^{+N@V}7)Hc!g5OmvU}G6~FRI4hC6^juo-I`pk^ zV|qTDa|_%w9MDRRVdXg%%fZ;G)YHCfu{bzYVAGc23}z=F!$HHIFl}Ry7p7f<4~F3e ziX~6gb<;LoU7vkeGKuTk2+AVlg<)7N5#9zvn({af67PV4cOvUT zwhNepQBy!%1Hn@Rdm#jqb_uefF{H46fVG6rr}1$|QNulSQ=;Gn@sVus9*nJ8k1Q;gBoKzOa$cMKHnUh;QWEW4uRu6h( zS6TkuugaTWRbF7BY+6KGzM{Bz|F(RE?`Y9Sp4U6{#>KKUiFa-rm6dYD#RK8f3-XAB zc?6YZYB+aa{u9q=Xxa3Pg>%;S#b(thx$(6`%F;OLC2tUiegwPs0ip1BY6^e%KNu}(RLkAo#2hYm(H2(+17(vl?m{55^!akw;CJJs&=HN9a+)(*ScP+oL!6WT#ct{@ziSk zKrMctn!A5`IewrXA8rsD9b6LD6T9c_&+O`jdgAb-#K7Xo%IPN}XnyMKp6~mtZ^5j0 z9xf!!Wk=}NEdNUkMc`BME{t@hND zN8$6`uYQ^QJX!6pcMn$HLqqeMu9dE%-)5F#{~ldAejYvAJ8!;!{r#U_JF>Q~f4%o$ z)x9%wYvz8uerV*;p|PcX_1;tKsov_?oin%2EN1Ha-+8qEuMbYtQzQS0$~!y%D@NiS z4Gj`$>>)c6mH3lBNZ&{I)WM7Y-R`k|@%w&x?06)t;p1y(rwm>9V!9r@*dVv-`roIs zR-oY$cyYYdybl?6K#t9dW4Zkn>`9jk1&d?*=V@fv&H0A*&u#|k*`_OrKxOQUPpD$nf+Xku|3YCYe z{@U>U9IA#NTv>7+jxNpAM$RvfU#yK>M8jb;9Hl|fQ5r-Yr4Npwa+Efdq?}k_)nkj| z;`pL^Yoxa4&EE*D1^Hv@Y1Pwm1gZ4^b6y A1ONa4 diff --git a/app/modules/agent/engine/router/__pycache__/router_service.cpython-312.pyc b/app/modules/agent/engine/router/__pycache__/router_service.cpython-312.pyc deleted file mode 100644 index 3a3a5d2ccc3e6450789c51f5ca9c8c1d6ccb60a6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5408 zcmcH-OKcm*b(ZAvPcA7^q(sRQWm}Thjz}d=oNp~Bc9pnD)WUY+mQAprxl5TcKkDpK zu>@N2!3PBh5cs4VfZv^zXb)V=1-FYBHBg{HZ|f*UfdB>i-tLkjX}L)b z9gs6`-n=(E^ZvVk3WfXx+JEl-ru1r*kiX-k-CQ=X_j3R?iAY4IOe#!{VGwqd9TjKJ zX~NF3tHS136Lyu|6;IA%!fe@F@#TCKf6mVk2YH)_?ps9k+;vzx=K`x<-uF+O@Qgli zp;lKUdbUrA8&dM$W^us+=w7Ww}%=NfdB#3wQD3l2W*OPEw=-5CcAJ;V(#w zC0U`Xyh9I}d!CaDCAn0q>YO>fAj!3IT>(VFI)~MB_GItR0BjP8g*U3jYE4;~rr#cFUa$iuQWZCB|>Lav^aL*I_4@n1Fe>Yo3HTCk{ywSdYT` zFw6(+Int+K9$RJjL$(~~MTxGI3etk^rM8T8f1x8;Jyft{FUTl-os&%g3!*JyJzObO z1)wRGM5$VkbT^fhI;|GmU1CJlI^n-}#gt-$X%L~a+;G5*X-^wYnAxU4NW*oVk-hOl^v#>TYx#4=~9n#_xF!gEa?1S|AhbQ0OJ$WAShqUpT z4cA}1qkF(c^k5yHCsg2|a3nnfT3&(s<4}Pa@-4WBuz8J(xBHob}+_xR(YG;B$yh z(esB*L??C_Xd@t>q!i+rD|PjW5B5~xA9?$TGpM5l0xGM`HHkw5zyoG0ED)7 zy3)g9DPOKFLVSkfN}?Xh7Zivy_C9*d4t=XaRr*8Oq^-M)HClj! zdD~)?(UYy1nWkuky2lpI+F)-ev(ZVQkuO4gxJk5u#3p~6-<-KU(@f9q4m`i%(V~N` z=!6=bXhlz`(G%O}cB9X4xc?f6YO!Q1c0`RG*_z*tooEJ6JmwNDZt?*)xt(nBr&a!R zlb_d;Bdz4Lnw)MWUssc_@4WlR>D}aojdx7uDK$2=b^T#%7N|DYZ?89}PVFXNZbn}2 zY^_CxT9G4am-6L#tV9)7^hYjKhg^d9cjI;u2HIQxvGHM{R z-PpPOF!1ANKAwxUxWg)Uc^rweO&DG^-tGZ9ItZxHh(|2%bjU@&zQHv$}cZN{oFPP;D9pOzU34E zn?&iOZJMQ6B&Ps)M#fn z$yeN%sp+(qOlh%UEj6a4CbZFsZ#ZwnZxHW6`tC^L3)lkm%^Xx2LA4uWaIIU0K#vX9 z@MX%B+n0_TPNh@v?pMbRr~yz@?cCq9!gjBS?uG;Ms#o;f^L5GIzd+vve)<-4Af}G- z>_fIDjJbK;+s*{^ERwtEb1>*Zcy~|)3T11lx@gK7f0fc9P5ik&GRfWOS$%ol>Jy52Et+bnEzO_4sK3n?L(SvqaUm#M}@7gJj!YHDUTk@+f_`r_2qbLvQTHwl5=(%`t3I{LH*=}Yj89)rfinr{2Q)ClFx z0SdhKAu5s1f`Y$)fy*qR#r8EYkOPX?{-EHd=YWqUu`|Pi7n1%;zFZRbwRy*O1-xgE zD`Wt%Hrl6#o}!_MEI)z{!$Q(dR$^=FH5Go`YY(_jc9h?*|8BiC_klY1LG!ZEx?EB( zmzvk)*0pu@+WPL?Cr$4sR$%OwR>x6(4SRQojDy_*u&9&123R|XbT0t*0BMR0;17@| zU=MgDxaa6{7w5vfW&0k}(D&tPi5>&Ye)OU5!L&!n#{sc6+$ZGy(yoN`^U&E5XRMVt zrY4SQ$?;b5xSBk^55z_`=WfqwDX`+ht<+wnkr6M_=rVNsvw#i)Q=B92Bmu zd|j#WaeSGq<|~pQ=zalfOn46kI4B6es^`nr3PpiZlr=>Mu->5AV!4)AXbKVMu|xUN zQ`o(Z-D&JFteSpJG05w#E45mgqJdEqz#U?hAQ+t}s=@4VADM@Aaf=v1^2!@p`pA<| zkj*?ENEGB){jG|KuPrw$n`jPRIv((obVCxb&q0HGjBri>6m zVKO>ya0o@n(1?MYQ1Zc3V+c(#?3>J%Y!DoGoO|YIxP7dD%V`i8wz)kVjD(-{-;Wst zhMn;}9E>4`J>%HAfxKrNJ8|Sa#x z6fzi@C7Q9TbL+E?sZss;@8YpuO}aj&nC76L`ks7!A6qO7I`&=6?XNhd{pr)+MJ^Yv zN|n59nwn*ercJ$%hGmwzXlLJg->_tJn*I`|Se3|W=nN;rFptQ)kI2F!a`_QC`!{mo P-|i)b@qbOQH+T3igi74B diff --git a/app/modules/agent/engine/router/__pycache__/schemas.cpython-312.pyc b/app/modules/agent/engine/router/__pycache__/schemas.cpython-312.pyc deleted file mode 100644 index 1d05654c6d79058760df97115447a89206f38acd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2132 zcmZ8h&2Jk;6rc6(`YU$qeD#Br#A%CKx5Zm%>8UD+M5zkYm0EgPA#Jxi<78pIYi8EL zsW@0_k$QBw)JQ!<0whrSM{wstzj+_?@%H`Zy`S^> zEP?Ug^Y7hfDj|QM5)XYO3``K75=yAzk-B0k^@N$ItEQ@u1i4OV;t`=LQ?_A04pWP) z8d&u)s~%aCU`>r#lbh*s<}ch8O*d044ZdWgrOZs^OGjG9%(4maWg~6E z%tgN3$d`|NdDIewP15AH0wN4nppz_33oKpJXz`J@Jv5VeHjA56!W>t) zfiF{()$FDh$_x$aw(DCim8mu6Gj4k_+u(u2gaG58qtl4YI)PtvDf1mBiA-{4i@;x% zxu#%NgR>1cXbP!|(B`4c)6qRvxY=N`z*-H@b==SrU$~*OE_KLhli?v@llx90z69nB ze8}bCJ%Fbq9Q`F^QVB;KgPaKC_d&i?;!JFh&WYzcKx>uf;G8x1VC=pNJgarP1>pKp zuX%wTmJ?ESJi%vSfxr_=rI*aOD;O7s?Xi}z!ZzRsgHM?g3TxwS!*)xQyBo|e*^NeN zlqv%qkiXCXqfrlN(_^qdvM_(m^_jtu0B#6poz-noX>7`(;qna-tWYIpg&xvl26Cwj*!y@K&e+8BVJRLfH`ZCSouXO<Dnc#`mSy{X5ZWQU4`Eq+0$dz# z3)ch6F~lDUe;vK^2&ot}5JVH;E7G4^Xy14&dfGz&$YT40j@r`}`^V-%(tFx`e|omP z`gpmg&GwHkv_I;c#&yR_?VFuTJ+0I~vDCiR`M9So{jSe;KI!Qv`+9LVq39R4?(Pzp zerW!K(?BK3DTGshYoHDz!e9>6a{R6a_rNn=%M2=+Dp+%o6je0S!KS{l#dV!zDX_sp5@M_&f_Y-Y<7vJkO+n~A_{Vzwg|#`2A+UX}Tp?RocY=Q9gRjPfZk?kBxk z&hiDcEFzQ;mJm)NM0}k^=@h~~Q*WTU&&nB85s*gl4gj!Hn0{F87iS*c>KEsF+FUjAu3OkW8;7FjT5M07_VL*fF8IL63Z{ z##Ig3OJgUDSK|&?JIuQRJ#)LeX=O_SyX%fZ@Iq@~R~n*?phgHq0pdLmyA{E)T6 zs?5O?4lS%x*Iz3uvM_3rR?T*x|8L4d9l9bEwYBbw$dCsIv;xb86Z~*hPEyzQf;B5@ zgFqVg6Pd*(2TLexl?#ViJC7?g>N?>VftWg}d2k7T6GUD?Fc2a_FQQw8JNY3(&*2gT z!;H%E?mbl>Ynb3t>td(o662yxu;$4 zpEr>1uG+oRO+UG|wX!pFwx=2W`BJ;uS;6uaaUqQ!aLH>=Bsu7E;Q| Vj=M)-+MCstW1SoS5}2Y;{s&ak1(yH- diff --git a/app/modules/agent/llm/__pycache__/__init__.cpython-312.pyc b/app/modules/agent/llm/__pycache__/__init__.cpython-312.pyc deleted file mode 100644 index b59ce9d86ab59aae0fb24a2b22fde152a3c853aa..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 230 zcmX@j%ge<81ebf~WJUt%#~=<2FhLog#ej_I3@HpLj5!Rsj8Tk?3@J?Mj8ROL%$h7O zL5egPZ}B^(r{}qM|3xB2UD~6GqWO zl+Nfl@JI`m+aS#%Ln$(JPe``K^Y!*np-?#I(pJ4}xddM@WEP{OX(Xv~_;ePA7eowcW&BT8GBwW*#q)z^+(Ik_22c8+}1 zUOxL%?D36V!yRoSm02ELHoB?&dTOkf8tbPHb`MSWQqx^|dH@7&V^{6&i82Va-th06mS2w+6;kO`|`cp^ymv9gE^p=gLKW`=6x zW~kSYnCuXHjy?+a=m?PLC1?f&7B|gmz3Q4~JNJ-_g=mK--{FTL@q6}l+;qd+VxaV=0etb!gcnvJT9}kb6 z@a_o_wlB+`?7+(am*@ePSCv0@!Z#K@$rIe@b)gm_Eo(NAWuyD4 zJ*tPvKX%a3gY@&&cJ4s}aHO3@$0fB887$@R2glpbZmVpxTzIbk&>3uUeKGnNWP`~z z^g*VcdShnhM@zMD|eLt7f!J+hMjBEOy;?`6ktT5 z?ABQK^qW6S`0MW5<-2?DJv0oFTojvP`(OzQo+H^nhTVg)K@1ma>4<0CU8BV!RWkOctZ2^u*7 diff --git a/app/modules/chat/__pycache__/dialog_store.cpython-312.pyc b/app/modules/chat/__pycache__/dialog_store.cpython-312.pyc deleted file mode 100644 index a8181568d6938e4317f5f9763087e7741c6c0189..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1861 zcmZux&1)M+6rb7IT}dlTa+JhM>|o1QD5x#+p-CaC>BUXmQV_*%4%tJOMY~ZY^wrr_ zi;P-wa6vhg9Nl9m^bnj|a_FB>=*7YYtBVZ{p@-f?6$s?i_hxr($;lkvym?>q=J(#b zKNAU!z(lw!rf-V;7^mtdx$Nxo(JoVycv)OV@ zx7untaEw`|YnJP#gNMXdcfY)CtbcZU{fo~_8z4|RovL*MnB@95rn_mkTTaz&@oqV| zPHga8Ty(qwbeGsfrxwwrJMc`KS<)Iv1;>!<%6Y|0d{Q;*t;&||IFN?N9G80+EFm)- zUuaY02oKfIJVlruaX8cYEY)PRn!gZc~r zOR?yVtTRisB-mvuVlmhifFSCnry$tE49Yd_}O?8zUb9;sopbE}34oLfDqCjQp67^E}P z5I(Ka9PD~!=NUd}T>yhNGXrfVC1H%yo_eg%!t)r$mu>EJ`N zA+oCPx_$L6xcaKgVD8)ka-SThm!9RG*-tA^-~Z#s!}Qnv$S^wdPrbokC0RECgyA#!N zF{)TS$)Z<*3vH(~(xm1I3-Jc5<mZG`)Obq z_-xO;1yzvGgNySi5NOn7`eE%s?I@WWBy;=MZyqE+?6bd8>EXr9aq8Of;_{>1{yVn@ zE5(DwkB%1>e{uG69}Jdm94y>?sjyjXL|Dx4a+oa~U&avyPvy4T;Z092wVF0)umia0 z8vNm+i9jm)>QuUYX)4=nFDsl?ofYR@{r94s_e$GD=jp+pab%96zQf<3tzD?=8SQ zEClngfb+0$Ha`Ro{%;W}O{e)fy5{?R%-@5c_`jVZkP)Mlo{*J)$npuvo{+icZ1zMh ej#MJWUr7?ZG9p0642~l_zS3r?_8$QvAow5D`HLC= diff --git a/app/modules/chat/__pycache__/direct_service.cpython-312.pyc b/app/modules/chat/__pycache__/direct_service.cpython-312.pyc deleted file mode 100644 index 662a496fdf78eee1239216409e6ae3a22d88c4ea..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4133 zcmbUkTWlN0agRKb$A?Ht)SHqb%d#!js$>W8qk&?_vSmB2Lf4j3BShOP!&}Rw??`6v z=!ZZdLF*4W4WJq+D(5TxXn_`T0T(Dx7bsA){iuQdn3hu#3mFa&6lnig+d!Ipb>eRYYT>^0t>dK8f7i-M4XHBrMRIiJiB1+%}QG#nOo7Q*Tl?eR{ zk%Yj5>3qImq>XGLuO|WbluB9U6#yc~7HHm>RkbS#r^YX{qh`$rw&+P6zJVelFn0uWhwA~`(+;f z7At5)W4fd)Py-~0yaNTl34+rL^gMmHM0JCApwx3ETA~V^RfL;U9!45qCDoX}UZgzW zoLtf~mfqIrwkF}(6acG)l9Zs3l*>>2L=kb^{;zlx*9}j~t#}pp4RGvrA>rGig{8k~ zsbofKIuWf7hYHVrY93e?%0%8=F1rA;eMLyw4VdjEz(m08>jLHh%#J<4yw?OBBF6|i zqSkBxxV#Rn?6bKd4yB1}^N!ac43Y^y56H~%1Q%sh)p)zCTONfK%cVRh8(?QyH^7g) zP1Y>O$a*$^nc-cyUw+4S9>aU^uuSbpkryyjBrfVyy~zEI!`ygQwB@Kk(@CM`gSg}z z!P~Y7*HNco`}fsIx>%gl3Q9?(`eX*8Xi~{CnlV5r(@hh_>s*rMY(8tq^5RQP5!vL+ z35TH_MC)f@c%RfeNqlr!{4i4M?19N&+p&LHd?XFk;=6F}tqmq{?yvRjc-VK~=igi3 zbpY7HwV}NahfY75Jh?u3dRhEbia!HsB(v#nKrrk45M$*8c>0?}fB-F%9J0Oe%WcL* zW1%cKul_qAbIG;jHayO%;d3A-0vz5Y(eOKKWzoPJn7>@efg1B2!O0;@5RJKTW5t1T zXr>o_Wsh@~fZD`fSO&E0Qe0&r*SXD#c*niwWL(_c-O7{eYo)u=>gK~}sO z*8=$ByKsjkZ`qq0Y~@nKJDZx^a(&n>0{@ctj(5%W#gY&1H`KZ>x1*I-_Bl3LlFCwU zq?Losfwa+9dTviE?SJU%+w_(nWR11%%k6EYDZa8_k?!~%t#V&)<#A$YDUc7r?I&6} zmI83%_MQ%u1LZAVZHl>lt&++fdDFkfE6#fEpaV5#;2dx;IKw0NY-0actQxO6`*W{3 zP-9ktke}VgQHN6Y6YUsD{t3 zQQWN?jA71TSPmH0KJGjJRx?FNPi_t}MoVX*SRJEg3u$i;N#GWVbv zbRIyfsIpShiVOphOY}-wEn!FFErMQDVZBK1u(z813lx=N$zYh!xCCt!WytS=i)D-4 zYgv$sC(b5k7(Qo)nUs5vCFd^8oaaGM1iBd6z&6G^d-l{RAo{MRSsoPTZk6VFn{9N< z9-xF}4c3NoJa|8v2r|rcXcnt!YFDypbc$1FAsoV6ZES}F`hbgBgKAtfEg>m1lf}l4 zhlQXAh_ z9iOg@Pglp!RL0NTKeRqRSCJAAq`uonHafa~LO)vgXnfhX5$XL|&u{yy`;S-lAAb}% zu`Jf4P*v)!NWE2Qup$lKRvt+^OVFU)|K-KI3%@J;rf~o21F8R!bfFfBt-N>h zy=o*;i6m;F{#q!ua`xug+Q~Qns{Kj(`@sA?<@Wq1^2hSs-M8gW2fy)fV7~4n(XTxt zVl=QU)&r!ow;J1BiS4e&CM&VYyW)E6z_L^e##WAgaI_YG>60TLAF0NtD)Fg%7yc;! zUcRra$LE%3Yh8V-Z{K>m+O?L!6kZA6 z4A(+3s13?*gd#r{tI?54bYwlWvlfc3%-)=R9`yPH&%-1-QtOOw#0FQ7-a1;1ja6b} z&pqyFpibQWz?V<=lfk!yFLiuKKbSsvdRX}L;l9)H&|lhTB7h`Z$z&qT;;_oF$zYhP z874r6wU%Ln!mxTWY)9BI42xY`zXpcO!^r}?C9J25Lro#o{4HWLaWC|jC6?zRZb^s? z(ECF&jo>Ru8atouw*BJqj3-vk4sYp5PH!7z!9)gvYt zCA|l&{q+tK2tSJ<_4(+iCtw|p=O+5`x))2JAY7ec|G|Cmwihr#i1-0#=0DyA9q@$R z0Z+j9Q{I?>R@*c>A8KAR6Zw`_+G^f+v@ki@!}%aE{l?=he2w1S%EIVW-qXwmxo5&I z09HU?CgD+J(KDB*mewcmT9(hyU1pZF(zzeL4rf7M%Gfzvc^wDSBl8Gtdg&`^%2NLb z!*4G9(9*GD*WH33JSHQblkj8G{SUJLF`0f$jy)k$Pso`kL|!NIXa4@>o~pmU;_ttG Uc-=qxzV{37AtCUTz+fKmU%&&}CjbBd diff --git a/app/modules/chat/__pycache__/evidence_gate.cpython-312.pyc b/app/modules/chat/__pycache__/evidence_gate.cpython-312.pyc deleted file mode 100644 index f9e75fb36b3a566556f795127019f247da36c77d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4456 zcmb_gZ){W76~FJF|0hncu@h3jA>@xsNZ3Ld4Nw&@Fxn8<61FM<-i+@fIK0^Id(Y5B zW=dC3(}Dy{lah)dg4Bs1kQ!PL8D%N`hSU#xFAlZ$#3ZC?n%Jk5AXVkl&VBZCLU8!B ztN7f1=bU@qJ->7Az4@-B#DSn}%lsv}30nUm9kXz`1~n@}V;EtCDG~KiT@*#yv`F_c zT}&U_#TtD^0&VpJ&yF?6F9+g!(x6ymla!K&PL|? z?Lmj`-ElmMg;+$`6;_0h5Q)lQq0SzT$3@+e0Q&^2Bb|{INwAQ= ze!;XZ-qbqCM)#c@(3 zZ5PkKpA3un88^?*+bN!xO2JZzI8bNFB2qatuc29>=y`QGk!a2-lA9w(!%DM|{~Epr zKBp4xot@2cgs)9iMs!jvh# z_Zwh(Ztt-b+c0&C>te7S)29GL*nt_SIqbwN)E4Z*9Msl+ORz-uZ;xXk@96nkAIT#M zbQ7;31g@rLmq23}rKl9*$+%Ja0Z#4Ugc80l8smizB7&4q2&PzB5Rd4t`J*z?6bML_ zP?7DA#-a+(4+Iu5qRHea1Advr(;&(&4-T;pZOe>ZdBI96%o|otLIbQsz4>YK*2M@@vxW##4hd`lfwgYayJn0jBi=SSFic%$Jn%Q z?U3`4vvf$wxT`gHb=tXV6ldx-YIPf@oEsl`>c^D(Rnwk5s%y_9cTLt)k@fg9o?6XQ zJBr8NO?x(GD{7uu*)qorV(pHXT}|9!xOyG9m;kaD1{M~QR+pg=I!8z79u%PuRv~nf zPSL&dp`90!sk3FpXD-lZm$M)Zl0`v6688Uf71T?Byr9g%b`Dlxk8#Aj$ZCQXGk<0~ zz;4R0{lvUhkZpfL-2H@Pu^_8Eg_t7sC*skVBI{PUzwdBdgkvBPR*piyFDlE?SP$UM z3-K&O6an+|1vn+Dh=T5t1(+~}EqqRzCD~VMBJ1QJC)Gh)XQPVH_X6akRWLrVdeJ;E z59tKd@(Cb==yA(0GA(UdOWT8AKM1QW`@XN@$JVQz?`1jP;`Ld*rVI*|yKx z(*EENc8;Ksvpas$tN5REe~0XYwf|VYt(5(|6v($+`8JQ`TYo9g7t#?)CXRceMx`WX=2BFB?bM9^(wJYrmcNFG#7O znoTcVM3{xcki^D<0yEqtu7?4%)7U~T2vQwjxJWJ}H=N$Wu{)>6l$%@Y5^c62PH1d@ zrB=tHS`9f<(?zsEtMipwU5jcp4q=*9zf#AI`figE#7T05z{=z5Ux`v z2m@cK_sD>;Mq%0U)hfWyc-xeHq>bal2D&SQ9TDN-~MWapBRaa+?lF&YzO znS{|??jd<)pmx#RGyej(4p?Ql8bAtq?D~DyRhli`e6QoaH?y@v+uD)d(y4CVukPq6z7%l@BGOrXRXP(Wz73U<+aN3O%o@zmObfUyV|f5 z`W4~qpK?~`In}B)W1%m0U)w!??0!(&(3Wo8qpoRJEB8*j_PxZ~G9J3K`{wS6V-JGb zTb=3k`_-1;sFlB+cD;6JVweW+Z|tDMSd#KrfFH9K19-U@yEv!QFFu$VFZv5;=_}MAjye zN0vnH)smNx03r2+kUNrb!brr`lAjRcZD`~QxZNU&5I6i}(l~{l(G>Ukti{GTX1x|5 zWp-}aGhZp!kdq@!?Lj+v{vJufx5D#RBB>r;%I3cV;MgN5%e{D4zzNxuf8RDq;hrWT z_a6c>CWvxwbI86Jb}TUPxovY!^et&Ou#f{oeiO(HLs8T}(W?KThJT|CKUfg$Jnx;R fd_U3*6{2Pkp|cF4{WHeEkFI8_;VA-Qe8c|$PmnDV diff --git a/app/modules/chat/__pycache__/module.cpython-312.pyc b/app/modules/chat/__pycache__/module.cpython-312.pyc deleted file mode 100644 index 9cb049052579bb8fc0dd7e6d3fc99ed45cb2558d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7280 zcmb7JYj7Lab-s%?K!5}YfDiBm@gWkVMMjeKB2`5s1>3SHN+M}FLK&|>?2-bt0GQnc zB|=n3so9uHm1#5`hw*eeb|%Tx9w`&GztrYOEdNPn(jS1q4$uubqfVyN<{u_v8%OPr zo^uxqfD}}>ka%(S?78Q@&iT%{2fuPSYy>_xl^;hxttaF+_@I3ZD#1K6FobLnj&O`X zVoZo(kk$#hkPg1}f<9&lfe6qB!5A}zOfhrFOrMQ{C1wp-DQyyLv6@f~rOkpp<_I|` zZ4qi?b)h;+TLov#6>?G9Ce+8=AvdLK1W(Kx@>1F^G{hQ1jg)o>O|j-sGo@<~Wa8 zTw;25Gu7oN^*H#YB%kCtZHX!mo|1yB@nAN#^9e2~@RQ*fE~FNRo#K}gQWWN~0-T!B z1(^9%G9IT}S2q>jwfKm7Dr&1&znEvIf!H8C2{9ZA>8!*GCW-CK|8Yi6w`L6KITNQ} z12bM>0%pZVH$k0W#G)#vE&2)!#yndCk9g0pLGBt>30o47ixVMavFJOcS3qzKr_-!y z(OmgPr5_YooPL>r){=%*^G!ywF+{G>`e>3MWzu+Zokp!1AHeMJ1Mf?-m)$Clkc!^a z_o<`~WJ~&2P4HybO@V*OYf^6_>7bix~PO=v!C$1<4SxoY$ z@K6-yprT*lC9w@2BE{{Y>hUdX4fCuYi1!&dQf9I8Jr%-5YMaWDBr^>dfNrl};AL?3 zS~0x9N~&wJQBJW}JWCP+i2u%WUwCP0C`OG+8j66q7as^+#!#I+|k!EM_>E&PqIfZr{9@NADz2Hp5e3u z7R4rmKe7_Sg<|F?gh)zFvmTM~FS0>B1pD6+AMxUeFkB`HRnpCqCk zihbDBViUk-02-x+i;8?iW^unnv`;`@j$@1SPz=b2Wf~-2m{;t8S#g<#1p#I#R=OT` zE-8txpuR5bZ4*lvBOXC+FEkRGmLEP>;ZN*FIg7UUDR-3v*@vAzf(Ev~;34h(>xNB> zZ!0kH)8xO%_t;WE| z{n^GNK-;%k2C^*&P^c;2&;gv9e9M0NxaH~2H@0k~?x*serj3dF6ZxjrTvK1BsW0#G z=iQAPBlk!0^^L#on9DbJ<(h{w%|kmbtJk(}_>NWF50l(w?nYpM$urO103&}7z)~(5 zJI5?A4|STE-)2^sMRblmA5Jfqkm;d8!!xdSoq+!u*X$a)+}6FMzez4*RtcR_fQMym zWu${xZGLFcMww^IK+e_C5v^;E(ujH((XnT`@W|QZ(m3TYI4A92Q!!)1OZwZjJ>gum zkE5cGaTUR!eo{OJBLN~90X^VlF)K2u zn#JS5mvGPg{yQpoIMi;eDv%ngK#-;6oDhw$BFzlTxW22yX;dge^Tod-z&v#~=G;9Q zcTdh8$hZR^_vZRfXZlZXx<|Jf+S46J)5kAtUi#zQB{p-3%{E+3JFn)w%^S1#XLH`Z zjJNOO#$4d5nZQ@G-qY)^ZMl2%oqf5^;Y{anzN07C@oJ{y)g7bWQ(GWGyyFo*eQ2gw3ca&S|zKD zW_Nq_+}4$$X|<|%02f2po=>#|>0xPyF*n})xG)XH^}xUDpBLoQ*G;FtiYOjUk90b+kxlrs;>i9UM>&Y_Ljq>NPnSe$yE{BCAA25hPe5$L+0od#O3IdmO zT{UJrHi(2pYqm>#ycBU$gI{jUmGW({}Rl+u62Yt}&Q)2J_8rA2xr`oNGRmX+HGm*y9V?=82qpV*SjP zyXRx>r@|+~r?38Ej`u*ez+h=3fdys`x8XE-il#%P6>*C z9vdA$7o0pJ;#|v0#kcVBGB$5x^EGG!diDJ!WV{I17D!oHJoZ%omm9YxI|I6QgY?Gm z{o##M_fLJ)n|1fEpZRBZBjEG*Z>0xMJ-+ccnttVtf9%h_Ih%QNHrw#^wDap=!H~#( zX#c>D+1;)CxALw2TpJ=U;BrH9}MOjd>f1R7k35553RrsxzRNO6HdG^BKw{`2fbv@)ldX8DMKzJ|Nvkt)%M#K-N zs|?@(Z*9dO9#P+`Et-#82bs?xx|Uv@B)A0;$Zb$@yO{DphEa5Z%Fcl5rJ>7wZ33%I zc><*+7}SUWNM6c`syWzCmv4 zuaFx|7nBLAxoWjc>aOu_DeIwghJ%FhA&MO%M#u^^opdXWlOl%9-{O2A!8GGN4l;{W z-LU^U&o4nhUgl@xvvIf~nZwdbJQ7VPmK$NXQ_d$u)uAw72H%rdN#YgzjH-Z^qly=> zWL!$lNf9wR$Aj}?twXV1D$n#vE|p!_NT4w-?bKW7S|Y)_q7*vhUTOB{)4&x;Y|PV z<0C&m@%JZwHj=)0CEY)q?GNR;L*EZ>b@uxD^O2rk@=*KLE7aR?bAQ$(IKaoLApomS%M z`N8ZD-$|dI-gM8T?K6da#Czhogtv-6>ligKKVn98h99>BRm@dHygVo-C`%;8IL*bu z5HX1nF{FtXp-I_bLjG0%WCCvf*OAeSk!N=y65b1F=$N7y+74crU1T)vMQKC*1O0_&!y*1ErFx!aQV_HCXxzuuCyPVVT;*4k%!V!OZ; zkSx>_n^TnuYz|LsUI=G~!zekoVWhU?KE$ESW+SaRb!0Ky{ z?3j^@ zEq-fkJYB_rh7-`KM~!C;m2fBl#i2OOvWktx8#@%Mfwr^kHt!-YDeoW$Ehb>P<5K63+a=lBU@gE~A88VKNo=ab+qFkum+ruY?T6cglG z@Y92csexji55vV`DM~F`MB`OlMb@BJr;w=CD{d%U4o0AYILP0O@JsYJ4|-izI`B=g zq&WzAn><)7*GcN{79w7+l(s5T_*;frmZY^mrRfD3O+^i=XnEl^=4(X-Sffx{D7E8p{a>I*jtEf?;bt~S=*+dd?_^Br%OVmS@p2~L>wUI%s9IdX3`U|y7 z8Rxbin{H^J@~ocUDe+tI2q_qmrlEmY$1vNZ^Ebr0P5l2xdbY{XzmmRfGPX@lZj&S1 uy#@1zJOJihQkFu3Wo0wE>Lq@ArqIk6myQ?(b7N+ApBWcyW zC^IAM6>FM;AL8232m-39Y5kbsQc@^1^eN6$AW#&XQZvazq2!^^hf&vbK~Me9TvpoE z$W~2zmi^D=zs#BceCPlF`79C%A!w~X{<^dmM(FQk;x^V9G+%_lHo^!~WmF(NU8X8@ zfu_iqDKizez*2}tuOQ4`N0_@u+nNQgP6@t$kV!_M3|3dJ>d=Q)6kSrPE2XMZv;}P% zaVE`m7;Ga26)21fG>%~AI$K~ctFV}ZKZWUKANIi-XRT3+57V1|gqB(ChgE+N1rd%~ zya31t;U9v(C4+lhY0FL+hp%&mK%EwPjc9UJ*0aibO)Kd&wQl%SMc+`XnId&ymp&LX z@NZ^dbsOnz-aSWXjc~h~%XWA^;N?5)`VVar7M0s4D=UONfGB9bIKEp(~WYW#kv&-9x-b zOJ-AIKE>z7nRJSupW`!&c|P^#d@i5kaY-)MRwPZ)v{J3A@#j4a5SyKnQVH{Kh}q<; zV)p!n=LP=t?EHe5y~JNkT}m8jLY3Q3>eeS)$}FYRM=KXqMb;H8$vU5(Ur6Qh;==3s z0zaFY6PMC?KDm_5rZRb{&GX!a;JGS)`4pZj0^p?z_)T6>9_Kf3)Xe-Vxm0#uOdrop zkN5PGJ*CUqPrCejv|H6$S!ti-a~A{)98WljT2)u7a15z8;n1FVaO-ltT$3^XT5d5j zbM!|3kLSBNC#LhMtaAZ64^Et&<&%r)rG-q_&G7Kz=F3lEr{ncM;8cfkYZ?i(+1Gutpu$ofA8w%MXTEz6h^6cF4+) z9}LT1gfEkoi#IObT4;S2p41|b+a+XAgA|Hxi{F_UVLln*X3qMJ{zDhRh<1jM;=z1D zvVfIc{se=k$SzESIc|1oPz@T>cj*1d47&fTNX}$7w>-ntdm(?( z5RhF$_Ou?be0xglXYTiNV%%SJ$}Ct#s9l%*6DCiA9J)at7de=2P$kO6&Eqh$Mt0oQ z+{)k@1I1%UW$;r*?a|#L5H;HMNe-lPhpL8KLr&EISo@tP)^e$IDw*$s86=f%RCy}T zWfvE^R5ee*AH15%rn)3a=K4NQ@aUZuv zz7r7c=7F>ZVci4_pLH-iElx1^CphujeuE{++sY**9~*urWf^`a=M)LB-9~(6g~xxx zU>h~KpAGI8;A;o3gQL;lF!kGZh^xZ)#5JGZF27wUuCTSP-Po*gK79Md#C*!1Vyrctqp8fYyTPlWsy7w-%w#E70Oz%RNDNrC(I7U+RlQ( zE7CfShsyy6lHeh0lLJZc&N+C8)UMFmwlQrRnQmK2in;vxX}69Lb9N;qcv}@X>xQUf z;41YrA)|!wKmwhdTuX}(uW9c9xsICjC>J+hrh2&e`&2cW vCM-Lo2G|RH&lY}3oq{R(JlBY8OopPUFHz6eXyj{@X!({XD*i7-sHOWK|KhdJ diff --git a/app/modules/chat/__pycache__/service.cpython-312.pyc b/app/modules/chat/__pycache__/service.cpython-312.pyc deleted file mode 100644 index 5ea97e9308cf2d01575bd25dfe0080b676c933dc..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 15856 zcmch8Yj9Inn&7$8)%#j+TYe+sr;IHVo^Bw34TdBphG3@wC!h%3Yp{_m=Sl|b7Cj_n z2Rltoptq)h>Ga_2W-Cs?*0^8W&Z85Oo|;bAK3W$;OS$VzXKQ=6Hv3D&Or?{V+S>0s zS67maNSH^>De0W=yuS1LzVCeJJLmrAq9QW^cPRNE2J6}g`JWh3ogo7({$Btt6Q1x) znDi?l)6YO$6V?oC`?UTPbV^+lKA^b_yHAj$voNbJ*4IqH$B$JzU&hOks1lWZ2X1p|B-fI$YLY#t;n= zn4xuQr*olDah*|O{gu3v=Y%T0NT}wmLe+qtx4oq6U!ftp32%Ri@Q&-6OiAxJ<8yt6 zksco-8#_ivyF@V}0&M9xCXB@PkBy87qE9P3cN`DKo)n_d;4xvp@cft%jmg%&VD!X( zAvzY0^^K1TvKiyOv0!X0>eI*^#k4Ot9*zWg+5BXL9}5dT!C?WAJ9iES!;xdXfNwA| z(i@A2nCikdGHHM|5ygP!EI)`o=< z7%GkUw4wuWh)(ci-N|4WmJ$2y^?JXm2#$`n4bw%6w!s9&+Mln5i~EzDSK_?W?&-04t~JT6mAJL@-1@U!3kLJ#`g0Q( z58X0Ur)=&?E@iP_EWhYWSSpj2TFFv7Z>di-wM&-v1lzs{7)b~{)!8z@q71-gA`oQ9 zehtqET3#ctyjIZhtf1$0f`QiyM&7_12dup5CAQzhn*}p(5iGoM0w$L?2pq5j2RTK+ z9u}I5rS-fO(yY9Zx53~3s+Q(DpoA0tE&)<$eK*941-pukwo~$wzTZL1dj#iDgWBm_ zNc*GbOQ8j~(xOl-K%WLQWl(5<<;x(aWZdX0m+i;{d&SUkU@$R=bZd?QR|TTTBeH>~ zd=r%|gE@MKB_A7!4Gs&kUO*AKFsyqP!&WV7QMh-Jw9cu8h-Ha7hSWzLv}I6P2TEl7I8NSVdVFTt63831 zF`y2c3*?X67*Gdp2xLaC5742@u7DUk7KkeHB_Nz0jKZ`O1%?#?7KjdxoDeP06QFFh zkf=%=lgvhi@PJqY`Ql3SYSF7huO2;IVcA)r0WKeZ6bA*Ir8uz?D;WcU!I8mOATUw3 ze4YJj76=6r-3Q)Tk}e^Y4U_C`V`-{%#Uy*7C{@{r(K0pase)84RZ;cy<@BvtFa3p9~9|r%bUu;31K{xU0x`L3wRFxi`#(&x(S1_ zP$NDcCqt09+!d02IXQPm8`p|`P%}#~x%!3VU0kb5$TMu56*tC=YWX2tv1N{D;_MK& zED@q{X2^Pf>X7~ZwCkC1GbGM}Bre=fWTj>=_L9(=2Ds8@JV2exAW>V?B*!`)^m9(vp zY%7ws2FcbiZ)=)lKem*oID3+-lDMiQS0iyX(`~csezE1pTW)jP7mT)~u|hIdT-lkd z^h=fgnb=>&-;B>4n6K=*ZQQkBw7z1QvZT1JfZ~-sQ+raJ3xgzAEpgS*vdIiB+uf6v zFQX`hUffx^vzief1#pRkLhhy#Y9%NK=gE2Iyym>+Ja@k6yj77`Qx7exrWlnwP*z2m zaT3eQs-f&w2JK~BT$|hc9?(hwNtKgp41rn&WY&kmAs80Z9gJXnB^`-OyjpjQjqYv8*H;D#`Ugg>tem zuUrAy1??A*T`)d&xtuzqGd;Msps?|#0=;GP#)Ic+89aIyRIhD?qlxtd62%_0?D88rzd@U-R3)OPh zGt}`lD{SF8zUb@bEN|ufxfWDNUE!BGejRU(tya@{TOMrBgB>vxgw*i_Rp$ZYBsWPW znE@^De5vT=qDjkS(WG@!L(}xU>m}nEJxa4@TxJ8 z1O-})ZBp}xI#nnao&X9H!%(w8>*8}TTV1)bDl}!`J%wvbF*iz8IRV;4c6399IH(Lc zsBoVP@=uoD3%9M#>UG>j!7*gy4~4Pk&B!jLY`#xt zEWlZX=jorb!m)03g5n0=F-X*XUYXND!moT)ucj@RieIxc)be$F{ntvx9FIS#_8=GX z4gdUE6-yp|wnrFH_#cuQbKC&uqe!mLDx~geaQ4$>XDq8NjgyV!B75OS)IUf4Ht@9< zu26pi^(#YQA4L8;1-=SxBp2R>|Fv2YL-QDQF+9^N(Ecpcr$Pg49l6MetIwG7bkA?A zxw&x39&|`ekDGGssG5}68ha*}KlH2$=fb#Y=twT6LXi5L3g^NbjVfiGF^^Q{F!N2k zFLqQdH^i$@F3hhPH$(r|s(B!PRWL7n2#znT!#4A)_?8>3>fS`x6ZZ2T=uj)%NHY5G z!|UDtxcQr;uR14%+WH3h+Xh@?F1RY@Li1lx?wAX$UykMvf&PES^j*_M=E7M8I>p3} zt5aP^#Qy^OcTVH^CTh!46Tg~&ByY_NEaJc7ny)Fi=2RE_S6cJDw({0|Se@rw$gh3S znyYlgkVE96=E8wfImLj4(OlS73zn&el3qyd+8nj3Sf~wVeUEI(*i@AZ8hWIb z^-+3XGeND)eu#*%F+6K0E+=La?@MPB?@2FsDKMA#rSyvQVv9HN%fzg7J^^tE|IC|s zFY#k2H=Fn|lzlPrwsg+_8LDS*!hI5$Mvj49H9Ap*P5U#Z*67$aY~dPWPy8hDbLlJ~ z{xh%i0)Q`oKbM&ECVmFNY~md#@zcbt7gK0&5_1;X$W=DSZ!S?iX}Y&%qeqR_1ONMu(YnM0otiYa6&?lMR{nWcI}12->6s z=vJ0jp`Zo+CQmr0BPfVv?#-7a@ix`(yDPU+(s_=5#CuFYx|%&V+Qqf^*b z|L%#I&buaES^1*D1cov~?b z))lhBg9Z$mQud647WeG6P_8N7aKosc5wd3-0_`|+WmE_-GI<>Z{q}m*af;o_T=Rjh-sLF+mumw@~Qz}YPIL=`<%2gC3FZw@&V<8do93Znp(Z~q2 zi$@QiQIY13`-GirT`KBmamuB#B~R4JIx6VIgNV#5qIpLt3?1WW}#RaJBC@YTb~D!)|aPgT~Y8aAeC zA4!#YuT@^HOqQ*Z%2q+@wY^vOrgnBGcOH;-9{8R2;N0`mjyEb_tDN01U3sTw(=G48 z)Yh)|hu<3hUHP6l$CXE}ZMnK-=G#}c+^JZ1t9(z&yDIG<)oqK!RPFqNm`a^#Vsbds zTI|4ApIb@IA?8cDd{5d2Szkrb*mJIZMt*Fp8Zv^4&e$5_?f+UU~nWD9-I)y(72X(4QTA&&|MridDx3zQug=6JJJQ* zyAp4CA@}ErUjW5I67E+>jkvI~DG0APVAmRniKrq@>;qAMERwe;M@J(gQQ;vrW%`sP z5QDcQxb+4{qNfBAH(WDp?jy&9s1VyE9)>1FJhs5g5DVxQ@c4w*kWJY_K8?Z+hEe75 z$wcU1s7Kir0)sJOn5qTYPKszC&!|{Rw|shKUqlOzcmi|vN@+2SDY!{an5ev<8bkxc z6Mwl>mqN`4bp}OAnnYCrRUaO!?p?CCc|i>t4GVA^wq%|a?G9%%Z>lhQ|4`tO4;umo zmRVkihGf0+7DTqu3w5|cKOP*50{V#!efZKw42t94f#6_xOccDqftVmd3-I7Xi2A+z z!a^`A(D=BjlKC?lrhw0j#&Aj!KT7=E3*_`ODiA@gtPwfP!~Z z2TFRcK;Ia_OC~xafOu>~I6W$aV7kKN515ZJ6t#)(C*JcWenMI6UFj7Bzn6F)hWrjJ zG%ofWO@xGBU<9mDu>`1RnMO1$j%}+<)XNjFy z)QS@qI4;2P;waqN!m|sYM||L=>g7>!GnO-)3W_7Jh|1Q2uVd)eLbnt8WdBI-Pp|3tI^QRb8N9X-7Vy7tqJPB!g$ ztfOalS8rFJC}1@MV28a?6w%Ty!UY(l}k2scI@cx>e(slC^5;VuG1l56p_lhj@?~7 zeX>c&rf5O<`D{5&SlL9o5RWxGt@ui4G(V2gMZ^<7K6XP<33uHfxnwOM7V(6tY|RG{ zLVBe8a}>`Z&pr1X>e=YFgQLo}h-&gg^^RpPl>AF*4Rw>~8!+epPuYxf*T=Pzt#*3% zysZT;kZrCM=Ugc9CQF*661Y)@*DFRYX)KkDrAcFzWURWv-!|5!tj<@$Q{kj_rDR<> zy>aHro2L@}N0R-5)Gs9aPe}0F9GBxlo%XSNLx>}0wS&pyq5O~Tm(*j>Gdy{H#c!B4GTmt4I|TD|M$ zsrl7=C9XBWRbBb+0_S|CXR0TyA&y;|l--lE*QD @uSaf-&WV0T^Iopd)!?#6k0 z6OCPd^3s#@_LU3vn(4+j+Fom$x39V9Fcn$h)Zy}|y-KW6RGBBR15axXsNFh9yLFIu z>!4=ARi1RMl3c6iU9FQl@3KWj&ezwb2?RfL(cs-3G`M}}aN;>$I>dj0d0$j>Mb5hf zymTeJ2)MTS>gH?Pu5O!IGhg9P7W*f6Et#FfjyQDTG0hWd7rJQ|x@i}>H4Ei+*V?YO zP42wVy|AKnW+3U`F8R05ujrWEd7G)}+Fbk|Al zx}>{VayKuy>!t~N z7Ma^H9l6ucd8_`&U7fb7ByAy%+Iy(w-E$L%N9pJI1N!N?!d|mpwa&X6vwgnRuyJ<( zyu1BgkpVhxCq<4VS1ECondcaFx4A}Gm&+}eT9VEN$=N{Zt?JVi4XNst*G^nLk*sc$ zs@qbvjmg@zQtjGg?YE@bZ)NgQ-Ftt#^*398SJQuU-E>lefVWJ$f!JldRHmDqMHA&vp3%sWpexswU*B(g&H zRCmfAr2TSVwp_9#?KKi`M6*BHyy;f+ri*OS?v?D`q`l#mz2T+?nPKPUo=ZLR_S$MqnCt>SYByN)xNH~G|#BZLsU4Gz_;Sc2vsj}u&*;5M@^~s7> zsiGBLw^TSU8sL3Pc@1EBfR|RD@APVpsvH%f92L^s1z8i)ELr90 zQ?uOMvE!;8+(GdJJd(86N%lI7fGqj~ zr}uLL-rwJ|5_{R__Yc2hWvaM2Rs7U~rzYva2SzY7k9BhQ!wro#UzxHGrHbp)CgSof z5*^ZyuE=^9Jy_^&4gjXW6ZAURQc)Ni)+``^^CAW6)p2VD5VAw^M&J^|x9e{f-&oJ6!o; zpB7|HQ@=x-vN8u9`jl-wz#p^BA%p&7T?af<*2)(B;Wl{p+OZJ|FBq9;E&2u1dW5$! zhZ+6Cwg!MdsnKa)i_Vt&TZjH2$q#k1(f&bn!Io`tZ6O%^g(x zrl*@ci{8?VtRWM1E7XO~!GF;R3z2zh%D^K@ZCsykemrA{voEa7898}P3~N)zYx5r1 zv#Qxhy$Dl7xHM%^qXUBzs)Wm2Au|}5Ky~m=In&N^^AKE~WX)qkMa$4Zl-JSv@Y1=^ z!!AD8&x|<_&8c8mYNduHeUFHDgCd#(#ZmNd3MV@6Gsk#^;lbGQV;|a#@$f=z$q1-A zJ-}d<(ZWX%;0=z*+CezA=QMb#gX?(V=-4r;^@Ck0Yo~eOYEnfqW5rQ4Mnzi;VTV^1 z&=wVoFKUg{p!6A(i%x<^6-IdT4EEOI@|33<_UrFIaRn`{F7u=TgaYSISXL~ote+0v zaLx4otakSJPh01G+vityOzyt;gv6~_t}yPLZJf7mN*XsMjGOS`AveXPxP9>A5F~Gk zbKuiM*oLl{=eb(Y0N~}JmY6nw6?H;qUhJ@UYM2k4OebMKaQOk2&8S{0FU^-cMMNq% z2mi&hSqkQvGw@{sJ`FBp>b(wy(M7kJNREmN8R(%t9=w)0wLY)Cku}C=sgqs+;brGH zw9Q=D7DMwibp;Kk7NFm(*Y@bc*ew8+k(h3q}R{H|igrPo(@ zA_s#8+)u&j9H2bIEu6{6&?H*u(hG06;8+irLTK=%eFW6d3|c>wTcmfP<^P07e#kfv z9mFc{6|l%bGgM;Wr3N_ncK9^PfS-oI(KTb6&K?%UF(@IMvhhAJn>__dRCIp^luRa8 zEj_h^IEjpoF0(Mj216&%66Q0>`oSn1=VQw0-*_qrA3DI-LNbex_@{^(MS@6A^(bk? zzW`5tF^$(d;t#=-jhU-2_>Kj{m~eX8lW8#yg(gQc_iq_b9X*4}p3r#0rHiiMJ@WJ!Zm(l9;o#-F_QC-aT%H*0T~>`K~qCG5M> zI^wEQ%HMI;-zz018_JPHap%q5A3c4?*qbgUj@`_c^mNrIxf(ww#-fU>otdiibt!k{ zm8W0tohkkIho!1Dl6!5ctSMDqKOIYywZKup)4E9X9x(mFDdaACa1?QrTyb17e_xk& z0J?vOqWFKYxN|FWrKw{z`G7DTe)a=~MObHt{^nb8OzWAz|D=Z{2(z z{J3TWJ}(ReWOE>(81Mk*0)gkpf?*{`M8PAXycW^OA>xIqh(b`bqqiPClse*B^f>f( zp|=CQtLVLe9wp-rgua6w5~Qq)je-4D#9_TjXqS|6da(q0IELt27|ly0t#Rr0GoQMv z(mDjvdg8208z^WbB@Jm41hI0qrKm68V1^y_uNYm2IjBaDXw>eE9ys5hx`e^OV;~&`WVN{tirvjtw-rhuDP$w@(<3G57F@Z z%Um}R7aH%B@BS1@MB0@r^NU5{J63`B({JAbN5`U+l;yetMe;tc$)H5~U)s40Hr3v* zd^SrNLpFg$bPvol7%JbuxuMegEJBnisu1#`hnh)__`fo4Q6_$?I0qR(`y`5n*|e5n znEy_!@cUn+=@ZiWd(thD?%$J*pO7t|kdEJ@{|Eq|kj(mh00|0$xwVTJd|~ZinT?+l^l2~tKco!)m;e9( diff --git a/app/modules/chat/__pycache__/session_resolver.cpython-312.pyc b/app/modules/chat/__pycache__/session_resolver.cpython-312.pyc deleted file mode 100644 index 013c8fb8287086e478cf610991c7c087a6558900..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2253 zcma)7&2Jl35P$pOkJwJ_W^vlmHeID@lcm8?MJYr=NkftbRMq|Bf~#n|@xC|?yI%M0 z8fwc(2=&kdLgEyOQ!hwC{ZruJO^Vj68i@*e;8qbNq@I}fb~kYv3$cgUc{B6oH*em| zyq^XKQwYAdx<6E(#}N9RE}~Bi7;aYwW&`O+=L}?WC61#!Z}6s25*RNSq8Tg27%v)e zGf_$~K4v7%fzkknut4IlCvK$7bScdt9xWj~@et|BCwzcX$}|U*)Sq;raDG~=)htJI zs#eX0<=`iu-dt4YKU$o>_Hl6u1j)I2eUT8006#Rpra9NKZEF>L8{cnW+W~3nx}`S^ zT+~cVZ5FDUVO8#c6}Y_PSOk{?+<=BbaJ#2qy@4<)aXKpTx~Ovx#gd@MbRPaMTIpmsFxvR67V% z#Sf~sV=IC$+Spk26Oq->VI!M{Aj|TrF|A&oGTG_vsWQYm6?r3Jw1s*T5Y=j}>Zoe# zRG;${BJB}yY99si73v;8^GN(=uzU91N8&F@d6%A{943zP218>)o-Q=v@VTf6q_CtbWP2dHbX@5be`Bop)H3Q^|TJlJEbYgtzxK z*XH}h)<5FU-b0A=;t0C%yr%NvJ%_2jH?Z2ht5S$b|Jp(lG#{_|#(fuf%a%3p=ipsretn%+7d^tBvTxC|PZ zX?!WPrHx`%ZBui~Ypu6mGuJI_vpp-=uxb_Av1G81y!rXwF53sq-=15FYB)nBC( z&xS`jXD)W$x&Cv@yP>%^wC&-QPHv@}&3oA~H#@eO@Fr&5iJ7hJ3^Tpdxs0Dy?t7J{ zTWM|&w>r62S9;TvCS7TAv*HyN+`>XfTIggJexq@m-b$Z-JnoHN+8Vvom5zDR1y{PT zx#UgGxRWzarCH|la_9XUPjB7zZmI4qb$j?;CwGteJm*U1XuQ+z_;g2_?qsI_I5OPL zjC3=z&oaYaX2i{m>?Xu)>Ln5fQiS$dQ4vWN{v-*+j}z=PNX-|ERtoys||<@a0s1ve%xu+pQFiB7A_DeIY7o`tGtE1#wRR?*3U`B|iu@ u&5$Wj&}nXu0eLBK9Jhl;Um*Dfn%F^8J4ksh|HO}RslN~q=H*{hUL4c_ diff --git a/app/modules/chat/__pycache__/task_store.cpython-312.pyc b/app/modules/chat/__pycache__/task_store.cpython-312.pyc deleted file mode 100644 index 45207dd398585e21c1a26c7cacb4fa4cf62e76d2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2497 zcmaJ@No*8H6s=xo_jq9&_F$XPX2y^Zgb14un21GI5^xZGX|<-yFs5h5sp<)gLv9l$k|m$=fAuW3f%M_mUuyfW-mmIk z6NxB+?>G8Qu16*0Pc&Me)>Il_fKnw6aU_@IB~!}FrYxZ?yGmX)RiP`cme);P=&Bpa zht06iH8+xvn$djBj0szJbYX}DzsXulylwzC3@nDUARn7do&M2x-QuK>W7q< zT<=18lKN4!&wI94;?Orf!dQ{LZfF5K|r_RH3RP9R@Ge zCgROr%NjF8HRvH@4@WV>G~y^zA?U3-YSR~`O53NQPbM@*W4f?&B{5x&P9HsevFC4Ee|u-?E=3>8DyPw=(r7lSmSoq zE3&d5$qL9g^?Z#YB1VrNwyc7krxJ`~8y2c!X#EN!(XC-(#k z^F6RZZ;!~2!;b0jWSJrMLf{~N5ya=@d7}HXbG20e@2R2r)X>bS%9#aqsAgnl&feKN zH!$C`b3x72Qd=N!;?BTL2yXdf$D2Q^k9QoIIbHGYoS9EbUHvplgmsb+jEBnJ}(8I(S1)2t1M_gB=Dt zT$YV!>pUSxUuV=SvBGG!$qHBosX_>Hv#}RMmE_1Yu|Nwxuf?$G=mGQA zgU)a_Yyd?+3XDIH*&sB&ifrWw{`MxIdX`b!qf^}-I0FwBIv)WsL!Klz-0!oFv&tn>lDlljQ+SQ*xl}s!j*X%OUKC8}{>GmmQWyEzkvM=LW zCIPB!2h3n79Rz*lGWCoAL9y@U0J1dno=SAkgTC9q#fL!v4?9q$YkljhhwdJ#9=m&N z?!ZFdZUid52q30kpjhHam0O$MR({kDg_r@xs{y(Wk^cn<@P6ZO1yLD#odTD(vjm8u>zOZQ3#RA2#z(8*|=BvK|2_Nlh_V( zj2aQP23m$y&(@*Xi9+1KL#T;jz~fjvWcuIEHbt1jo&vEV7M_JS z@P?S!5Db-=xEAH-4xi5Pv97P}r@^2{u$~7G>W&if;>=HZEAg?5;+7;Np()XnQ|)n2 z``p(p-qLN})*ar_0S|P@L*3>e*nD$A>CQY=6I231l%$ zRd)5~&YA*jG?R1Ox6qJPHbgU(4H(-+b($|s3^s7GkeMCKpfU<-nI2T2|JkEF0lW5_ zo-DvL$D_X8ltnStd9p~M92+?w$9Yy68CRw8aYWN{XghQq0*BC{>)_tXL=Js~4TO+s zD#RoCKubO^*m()2WHNLJ6~Y+7|*;4(CG+CbEoUK7cmK z8ML~9o|h+;fE52F9vA9u>it7FYC)R49sflKdPwJbYQ<>hhYlV14k8DEgNcLK!OX$J z!t-?BJm7Vm$x3u3G@0hBEU#3ndEPde*lyHpp4z=)?*0D`s7^K;C8LOOz8h%n-*Rc| z$SD3cMf%2~%_43G6EeojlCev4Wm9zhn!IX2H-wjPK@Op3wXWWP-G}uL2``pH7d@z@ zRkO669GZr>#>##=VvA(!1+iX`ofm|$LKQ7zSv_1wk2jnr`i>oFe>>FNweZu&7_ZUk aXLPzo^b4Y2(W5mw`4z;m_b${2mhuPYyT_#f diff --git a/app/modules/rag/contracts/__pycache__/documents.cpython-312.pyc b/app/modules/rag/contracts/__pycache__/documents.cpython-312.pyc deleted file mode 100644 index 8b54baa40ff5ba978c66f51a1bb8839ebabcf199..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4241 zcmb7HO>7&-6`ox#|9@?fltfuJWh;g$CnT*pMqN2U4{{vafew+41}u!lnzN#oS(57P z%CTe_P~o(Y+WLCXy4p6&?y67qBsX#BHXq3z%0bCSC(VJZvD5_K6+a)P! zL-%J6Z{Oei?7Vs3y!m4==p)en9Q;K2nTL?SpwMnki{Z9E2WFX2LOGR`xE#kJ&#QdN zk#m%UoKSM+oTkp9x=QYx+vEk+Q}X7#9N~#9Q0Hf^2b?t?Pc9JZ{*X}51K!d+us$T` z>+0(TU*Fe!{atDwiv|q$`!OmU0*_Nux?$H@sBRrMxO> zn&F&MWR-%eOPiKPUq1s};QS4R%H_QLj#7UA3MibKTG6$9Yvtz0VF}#!X<(L#OmZA0 zIsPi_o9v+cInYuEaDvI9&S`QU>iQ6Nan7Cc8s2xM!enKZU6>CA95d8Q&NbjJr$ zav?cUDa(d0Un!LoU4+#c!i=O(=UZFbSq3bH+wL=$p?7Qxq#c4uvcXMka7+M?4bBiW zS)J0*FS#RSu4*#VGLkCa%#6!7#2Hp8%6VNAZ;WOnB}tibLoO$!nVBS5^0KC7&`^-e zdIpr4QiaZ{vX)^|A(O9^btXaI46Wp6OW>lVXXXsIUJ-H2=MQv#Hr-N%VGY{>AdBS7 zaO^()@xrEOU>jsIvB4WIChN1TYzWvplOdv?c~VAd26cmDH9cEQ)*L zEsCrc2HPO4A3iLO#NQ@fU^F!UfIJOG?!42CBcQm~yj0)E-811j#UxB$8K<;6Q8$$?mou zLlFs1tqlNyZ5oKJ`jY3$1 zw3o)<8=4EG`V2qp@OUc$7#?oJsY-J)Gfy61jFs+AUC~w95On#b4)_wL@{}~I>f#h6 zP=(F0L)g(%l647zYW|?AX!>{eqS7@O7QjiHm=Co=+CE8w28WA(geP137%rZdc)M(_Abw1KA>8Juqll?(YcPs=_3c-K79(V9H#v=mOAY@3chT00 z5t{+S-2^8*|pyU~B{~TPtGf*%}on*S-v4owoR*-0cg!5C?2+fh&00 ziFKRT5hBdCz!woDY>jpbfOelEB8IKCOMwLu;0hT5Vvcr9Ahg&eb+Fa>+ zMa84-ZQTS4op;XaQ?Gq9b%33Mek_Z`L@op^Lnv01GE1Qnk(-Sm2_nH;h+$A!8i?U2 z$T~ZTq8mjQlmQhg8{TR8CRGZurl%Y%h87RznfSguXE>Pjfd=V9lF6irwMI}bYqLxi zt^Aws--8M1eI{IxwgY65H2vXwV?P>e_Vg}~RmV01hnqdIB@b%P-aWhNPd57#E2r1a zuAXfSWNHJM%|!Mg_i*@e>QSmOI$j$c-#m4Gv-ho~x0|5@_onYoKaE6}eN|r*KHjSL zC*hTMk@Z*ojmWWD(fC zOOHy8GZ$)SF8sm2dG$N>Gw-3RIZ@xU1Kwb0+u;xUmK-noNblgvmM{58NJ zz+$c&UbJ_x%6}9Uz}Lj=E}75bFiRJG5icoQD?<_7-TS4ZV4Y!Wtx=LTHHa2|766@p z9-M?VbLP4~ASr$#6|@q6H^*)1Z6@`rFo>DxECZb3Gn3e?y;=zkwHNyam;gty0?2eyi&{TO5o%UkFnn723HkZsKHLRHM_AOtmUTpRbEZ?f$YV?lOdPkax!)qs3Pc{ z(cxNjcz>ra`wp#KS-ZA+t=@OCdFu7YiARY)#m=oq@6%(t8d zT52`bNTjzC>CdCh^ysgYPn8v6&AaMt^o?xwjr{gXvwv{y@ao~M{@2z=pAUp0zGo!l z_5JG~Q4)Vc!&LeGVDES+p5hsniDrq!@N}iZ_PR5PcI;u6Ll!*4zQNlFV`m|}iS;I; zW6-RSokz}Apq@Y-5{#3k0D%J4AG&j?8Hm+|Skq*&`2Ql7SU>$FmW6_q)`jdB$yXlI zC&{tJ^PB#`x-f>N?D$d|N?G{N#kZC&)rCRWbI^^{g@NYqiN%YX;i0;4Vq55O4!jr% zJAGD}jB~>o#mCFkEIe%BA;a*_F#MgTsH~Z9G=@)c^S=%Ew4_a|%6025Itov&bnD5L zW>O*Dd2*%Y)`OKHmRXOSW5}7my?-lqJm;)2-ei}-1))_d19|4)IPNQQ^lv0vBiXM= z;;&@vxr^}r`_U&{{GYswJM@eI*>(`V_Zf=M5AIr>Xa&-;0{1+!Yt3?S3V@i_=R9!c Gru-X>f&q5GAD*^=(^nY}K)mC@q45C>q6fQ}j@@kVr-rERg~!6)}Ng%V;--T8UIi z$*67$kpGZB&`Z&u(u;Z%7U-eqskf#+7|5x!q-EH$OMs8Vx5MGQnc4jrnG^0H$ghk#35aq*CofJ`x5RIR^mX~`A#<$&rI5Iz1krzP z7U37+oX^MmZ!6t^`a#7R(4Q(QJ;Nj4`=0j30X{pZIQ=s5`)AZGJEKt#dl6CJW?Fwja-o#m*;l zw7vL1o};ZxJ6hb^pQD{c>Ek)N7dbw7Hb=Ygjez;z}Dr2U*K_z95w+M;$38jSJi*W*)oSm96nkC_YQIZAS+v#sQ|Cl z$dUWpo!}m<+)i-0A*TshVoBBO9rsm?OV9g(Nj`PR5HcV3gPtxYZ{=*Y zHH9Ui*EPd9W|FB@)t1Ikt6?dtB4kLz=TL$>*aldNSS!uyi~QE?`87G*@oqU~SowcB z{Ct^8a+2k=vp%72k9MXb%F?{(I2buDlY;5+r8i)Rl2gjE&=VZM1j2#FQvBr=jFc{? zR;8xHaktu4ok`L0!H}lbHI{|GEl(kq;xBx=uBtzTtbGm-;0|^HK>fzdNolr@oAK%2)o^;K$GA;3>dA oaZwci5I($+vf`6>0>H&yOf0?=04_3!TL2ep3Gx2F0zjC^e_5WXF#rGn diff --git a/app/modules/rag/contracts/__pycache__/evidence.cpython-312.pyc b/app/modules/rag/contracts/__pycache__/evidence.cpython-312.pyc deleted file mode 100644 index 9cc701311499d60fb4ee09c0346f76c4415085c3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 948 zcmYjQO=}ZD7@pakB%3b-wOS$7rry>=7rY6@Q^gNT4r(vCjN{ICy>;zg*3uqY@V#9K=Qp(o$j-Neq}+2?uRnRnig*-!O)1;P4Je;+)>2>mo- zx(XS=lXW1+h$D_e)Wsc)4Yxw8Yj^A}=@5)8BnY=Zk`stwmW3W7UN}I!cw%Lilk9^! zg<;8cejDZDq{^Zw)=UR+q+Ba0GQ|U5CuPnw^FyZ8bJ$c+VXT#(2S`75Ch+7XkYglJ z2XoZ1HXub|b88i>DYH`sDe?l?i@7TB5-2BE#Z;AZRZ4eOQdQ&C1JZGZ#H}Z_2ZMl% z$QSEDw3FCM%Y^7*Pb6i{^q79NTL~gPwSbpNO~U}Zj)-{1 z2sA+WdEaKmL4kO3BP~wPe0ylx-)GRgwu>c!9nc}7M7XKUzShMHZ$k;GJQj*K-kKQD zo{YDJuN58K^;pp2G8l-c#d^IKczmIhXB=B1(jFMSZp{0kP@ZI4o*zeAGC1pry!w^i zFe&MnnlbIpU+&3DZf!soss=DZUmMqs_`AK&PICepnE^|o`!Y(1Iq#Mehti031*J)a z((Gp7HA-LiS(tkolwNuzlu8p^)(u=SU@nwb0X`r(Z}^-6X9`6i>K?#b^u1Ewe>`r? z?YGAZ&C%N7om0{r-&`I&IjWqJ<#BUq^yqN=lq~)C{vo)qm_;=K+iuY$y4i;!AZcly zVN#tvR-w{?Nb}=l2{a9xC3WGfW;NcIx4>cMrCfkB8)N(p-TsB#^CGgUNAq9s^}kjb RFP^27wk!?p43{=fJHA6S%#g7u5NbY%p^3$L!k;i z_U1p}L8%A-50A~E4hV{f^w!dY;K}!Po1$27AisU@{oc;|+~=wTO*m;7j5N##Pz~g4&Vn_QtW1Jxm;-hfHOSQA?)$=^sz!l%z!eYVyo@Vl zx0D-2HUyp()OzLGupVCEN<_R%<9i)0dfJjoXj}0`rR`SA_!c%>TT!C46GyE`K{1CI zZ_-Yzf+h`BDtb%BIFjliy!lAGG3{|7b)`+!lb|hlGg{=bzElFX`l4D-6Rtg$hQYHa zVYQO>f*_$S9t64+1Q4(jqdXJ@&pR~UV-5wuA1w|7F$_70EHN7+ixJchBa8yPBfEg) z7xf=VNX4fyU-Yl@E@YEF<)M;6_mWSeDicwcCso>RSAhw+ls*!Vd7^wU`gu0e7xb|o zril_zEog&&U2OM+hcOXc_{pmPugI5DWo3RdgTtfCH&$m>>Yv6>zh(XLndO_S^BeZe zr^&M)?)N9JEZ<$bykTG2JUO|1YxQa0o)jkr_Z_?`3qb#OQ*e9iY}zO}ndHLu6hQO# zG=~*I%XXsY*2=oFzXkJ(w?q-*=mORZz0fv}5~h!X)sBi(%YT|J&qJ*kH-FC?8`M_U}}F zd9(QvTodQO8UI7%9Kg0^7{+HZ{ezs}afw-8JK8tKewwaP-6jCL7BP=+qq;NtCp(4g MRL1TAJC!B-8%g>*W&i*H diff --git a/app/modules/rag/explain/__pycache__/__init__.cpython-312.pyc b/app/modules/rag/explain/__pycache__/__init__.cpython-312.pyc deleted file mode 100644 index 5f717daff0ef8a5e6896b3ba833856996d83104f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1179 zcmZ`&&1(}u6rb7MCT+F}m{$9N+Sp1pAXyMUQ3O9?tx75Ns@!s#fH#7TtZ$IYqIRxuz<*oC< zKKlehzac#z>nX-$t_CStZr!B^r zogPHpIV#vg+LDDu9(bX+(6H-FK-JJqPHSwDihDJj2+~CpP)7*wJOcy7!M#Vbb=$B9 zK#uII+#|e(@BdquZn1{mr|ctbP3xEf_Da^@$YU%9daTyV*G0C+>X4nb=>{qfF0}X4 zFsvlM@y1^dlY(rJ35@KqeJdm6c%qx?|mn7>_LKvQ_I6Ym$%$_gPIu za8HXmC7U}<<|{2r5UH^!vQ(fBGim{8rTbaXC@XE0MTp}&f{;qsk|rVPzQOzpZ18 XKcVTbXy%7unp!9ObMG#Epj-GGGEH6L diff --git a/app/modules/rag/explain/__pycache__/budgeter.cpython-312.pyc b/app/modules/rag/explain/__pycache__/budgeter.cpython-312.pyc deleted file mode 100644 index 3953cd8546f60392608d1b75a2bee2fbdaaf3bee..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3703 zcmbsrTWk~A^^Rx!w&Rd^?bu07NF2Zv*}!JA%L?somIOqWhE)kAbzw)wGnlc*kG(U_ zl4#uB4?aSh6`+2^QIV2WyV_RlN2LDnN!6;0)E`d*%9AgY;K6RBXrQ|D;;U=gwm%mgLCBs8D{M9s% zOR{82rLUy0l%_zLERrA+DtwlDb_|duq)-ZC0W+6kfn8G?DKzXhQ-hGgz>YZ7SaXn} zDe%R`Zad>?;7xD5jop?zreMRLnAKn;Uc8LSQDQd%9s;}oB$CVlvcCT)aZci~lt_vE z)xPPMVjb1Yuw%ScWZvk8XK?;2#$bHkga1(L@egf4(j6;H*hcogre?EccS7>0b(6>r6(*ueIYb~`|Ydegc% z`)y~XLw>VK&ywcbvXlJd_ zE*H`%nddIX?1r146*#_-=2?L=tg;}ByupyZXt*Rfg=JP03cTUq3!I5rFBj8g$*`x3 z1sR%z!DOXk0UA34oq~T%8c)n=I6f}(66yJdO)$m$(5s;B@Ei+Dc&=0gIy75}2THTq zxn-OJKg_1wvF%rZLY)VQC z0`UOilVkmuJUHwF0HHOyJ%lV7w8$4Qsh5Tg8Xm-n$(Ud`w?r^08HQDou~5QYfa6^a zX>3y9k|0c~7bay0_Yy!#5AG*m2!P=txe-~eoG)QgJ@7CA`v}V_$b4SH7(K>omj zLk|QO+?!g)hZjzM>kCygS|qU^NvxgJMkdseiTg=)<*cjWgHJ{A1{VHZ-aZ zjq3f;m5a+4^}eB%)61vz!I(BUq7IJe1N*drL+ZexCV%(P6Q5&O*K^wC?WhNkx99fj zRryy(RZsN#2lW`lRX>PAd-OnfDR(QU1rDl#gKK+hfrA@?qx#g3w5g0bm8o6H)`Vi7StKg}c+$@s%^nXVwDMGY|XT zTJII~=^1T0qfTeE>AX6f-j@;c_i;iqW$JE_p8UJ&Ip9fH<|Hl0F`Rcwk>)q4?-+ML3doP~uLc@9Lh0&LP zVe|?w{u(JsUhFeB%gBdR^bV6PoPu+#l_q40cY%T#YH&prPoPqw@P8ZqCaM zjEtF>V1^Czav2v4W~x}=V>a{c(eTnSDbAQ7;5Y#=QzDqbVg4XB03FaZ(hFk}7bv*L{?Rj{=b&N7C5hF1h@$GUM;sQT0X&+{li9o%J zZw~lz81Unp13sbgqGSf!aPt(=*>e4R$1zju9ef%XWIC2e?W@xiMg1KOeuv!uM5F(< NjZ$OOQ$%1x_dnLWScL!p diff --git a/app/modules/rag/explain/__pycache__/excerpt_planner.cpython-312.pyc b/app/modules/rag/explain/__pycache__/excerpt_planner.cpython-312.pyc deleted file mode 100644 index 3c24cfe6852ddeb863736362310d3dd46f444608..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2847 zcmai0QEwZ^5#A;5$RjCAq)AbvNU5@9HKuG+PHeSs>j+65)e4--MHLr?8iAmBXZxt* zk=Z-Sl5zr6)IjMXXe}hEWTb_ahX4-b0(vQspHQGLqG^EFgIW}5fy8fw6`-k}I&(+L zmTV+LV0LzHcV>2W=3D+P81xgMznuD1J|htFZ=AG=a|F737KAk-5|JvTNM|TT*`>IO z?iqKHo8c&Nk&8rh-y$Nn>2h|>@QZxf^B5;-Y6WttTGDg6TvD~P%L-g5iPFSEUSeh4 zioTUwl$a#`OwySw&F7Rib*Y$ltT?=7lJ1^{`5KYP3>C?YOQbVykr!RJAOs&d_!B)4 z4hKPSX|L7Ua`jUM!jM?nZ}BWAYm()WAO;A*C0?~Wnxsg1-SWt)CNUT*WihA28WHp` zayN9nY-kn>aDGBCk#0ihZi-@*1}!+zAK=TJ!L7KilWC&ET89jm z;fB?%bhouQ8eGBi?A(z-3s-fRKx<#+K|R>*IHSQ{p)m@H%KA; z{Az<@)DPU7ty3&}49~B^249H0V6A5pGJ-^j!B3MkH)RQ>d5O)-(#_8VDe(9pp^1<%`wa^>p>PrmO$2vED6lwHK@F@)tR-8WU(l)Fg>|)89YG&aZnrAEIxmu zqRu__!1{2r&|0ps6ihWQumOkmM!>*mu_RU$NgHLk>!Z>_S;@&NjJAg?%&;Iciy99ns%kzI}Op;!($-+0|3++J%V7fd=RV zh1~$Bp&fqX|Hc-ei`XFT_CZrED)4RT>DVsKWnRbh+GOzUqI!eO{*#b*z}B*7*=u+U zn6N|Cw(wiO9%z56`ma%u-V&g|U(h0NkoKOoAC100rtde7=rRCemZ0U@h_@{0`;DUS zx53jmVLi75&iB{*44)yOg%_=!dk3o1Mad%3v7~Kk0R>j~A^Mnz{GVI^0a)IL2((!0 zhiHLnU|sY;1n}is*7$IZ=)qV;Zvo5x5E;B77`|T8&Q;+%hZexJoljAC;A;a+9%7g# z9Go)kpUSsT!rqFwat6`#yC8f-F9CKyL6KQNre$i-+pc-?2f7AN(ffYf{%7}1nx<2q zk+j=#WljTjl;$MW@+zg9__k&`G`Slf?nhQ60PKd`~&F`jXc z`fadaQJADdHjX$*|XSey;C0E_^-mK#uz zorFCaHje{t$X~P5$?&e1`o1xd=v)iK*&$`kP7+NVgs~no)V&s54K_l@YoX)y&`6cv zNgms{Qcs?ELc+ez+n1^ncg~uz-nGJN;RB_5aVHY1$0oPlZj4>5ja_^cn|u_RG(+*7 zXwN!bAKQ5O?zwt&xH_?Or2E7C`tS#Zjp6%8KS|e*oUC3jyN=wsa{IkM<~N2vEgZlj$~2x4v+ zPSrd{LQ#hGJ(U)mJ3;WXFUE4in`FOZd+_qH0b^jQ1TUY5NqU8;OJVpAqW|)le^Il~ zSzxcBEv!`bIL697qXlV)pgK(}@;J^?X!!EM=;YH1~UepY{sF~J_iaJTrobtDmXh(D~%01z{ jvvr(Jf-&qw4V$3prj-7J41Pi0`mbk7KK25-AiCD`HZ zm^J&oY88%pND56~JS9%Y<%klOX2aZ;k=Y;(gJU-TgTa9%OtNW$jKTUOIR$dG=Rxj0 znVSYZAK!Y}ev-5#ER$Ph=hzgh&Y$2OFF? zq!o4!{B$`CiIAjif+X!%t%Ky;pAwREB*>&&uUB{{9Fv~Hm!1;LdLQ+7(y3JFr3t5D z9aiVP!pJ7rulaE%T?v~}jf6|E=sgy!b09upOSlf_-gWq9KNuuLVs4&K*e9#>_6u(q zQ+44>PbC})r!H6T6GLuZXGy|7Mp{TOk(tZT!!v||-_5_cVm?DIGk)7>XbD!v!EbrS z0waNe)BJQux!B2v<1s~yDV=;2&rK(E5JkOYi0 zEyjc*na56@Ji$w$iD3BROzZ=>sO)>k1E&JCP!?qwj&Cp`@ZaGN%8_CjJl{7usPzMi z_YCX{4hG&1j1C4y2hIeCPW8Qgd{2>FjenqT>~wokclo|C9=m+cKCa5<>wTf57@Qfl#sGe2ZRA_oS z5}S}!+XYbxUkpW~swEhWhXh$QgIa_xD3WRcCRkO~7F6QF2r5mt%F1H&f?9^_T39-@ ztf(WhgeOpSMl{)*(Iv76KMmo@+8tu3bee zF6ip!e*?Kjz9=K*J2O?)so|{2=5eLWUsaN_+8@0C#ND*!Zc4jbvV^s_E-RTT-{Rqg z!yDz^`LQ3_Gqt-{k34?o>{|Kzo1EEO_RK;&z8e>RFnOo;R_*N_Su1f@JTpVZtb??) zrL39Gt`r9%z9bg=fz&|8SHJkt!bi)m-8*piz{=5d%b~RIaO(I*!>(o9J=a~=N-)iT zXPqB-RGDrVOr6NIb>2IB_v~upBPQL}|LC2ywqvQG`4eld=8UIiKDp*;TXC;@_Gij# zGp>q{M{bNPdG9pdYFw6Aj;HJPf9Cpj)(y>OVWib5*Rw|K77pt9ChG4yhX;DhKkwlN z-mrdSfnYx1`Njf$V}bG(NRSl+3xv6U6c$LrGpt&3{h``iD#I*yQOBin$fGt#LeL~t z0`a@0223{sQOkPMM9ITty~GF}>tz6- zxdburU$up0YI~YIlbATUSL6-9sWVtk13A0oKj)4&z&pQ)a+Xnu&g!!eTac|dyOWH`v za;<}lfv$qg-24@+kgu=?dMaU0ICQ5VX-&A2wwq7EA+Q=a1pk?H2t1?oAcuYki|8l< zTe*)vkay6@e;5l*iH1%5E@wgS(yKcSdW~Y|p*J{o=0yL=k>Ehz>AsPZL#3|6)>`ef ztLTzQ;syTXDa{Gm@~xGR48IlN4=SNZwA5|TgcZSk!-0b^Zi&p>6-!K1p`?@~EX zzL9C_CP;W#B`*?Gh!XB@sRjw|FsT*^`l+geI(+iw2#BeNj3RAM?FDwzrFZLMB&JBO zVeKX)sNhxhyeKQG18GnW$0f0#=v8a3BJ>SQw$u65P!x||5_J=LeipF%g*m^G@;79C z8#*F?1l#=@$+}3n@6VD;%}>f&*2-GaWo;?*=blP{)f;YK5n?YZM(lv>t7|vSj*7}` z4XN9+B0mg0GC!PoIJ{PVY_rY{@O?)ye6OeQ9i(J;lD)ktHdF0OIVgNDv$t#y-)riY z+V6DU>U_NCV0y=)^&Nc=rF2byYAEBaP6akRmGiGH9#}ZAbRb>TvR>t1meQV%mGHW! zH&b4{RI%Wg=U#>9b5H%U^$EXkjo-I=_*eXQ^Odo{^>^mgfu9cj&CtVRe|vKM_2EZS zy64R`{>?m7#^arzOM9Bo14%9 z@mf6^@SFe9&jt2b!+8S=`B(@n44L*+ut)dnvs9`n^MU53R^QxqScf>eY1jP`c&#XXV4|p7F=F@n?-# zivanrFB?etSw=>5`N^UFo#vml9_a62|6wQBzsFjH>~T)0I{9lzfI1;Yh#nPyeuR=N z1eLi29Ncqnz=6eJHyY5A2k@2k8gsJ}BksC zwTA$)!Qu6r@KU2<8jKsn&}bNyMj8FAGz48yZBhM-qas&&0f2zE*3u5(fW4J>#nMq_Rd6MAYUHiZB@3xvAb`pD2@+8Ws7e$@hwAt4`);_S!ob25?AY;ES=d~FMr!H9JXupT}IcoBy zL$Kd-t`nUk)uvCmg!)*60d5JkuOSw|`qCH@yi(udos~cX+ZJssH$iA;0Hlji+v&HLAz4?e8O@a<3d-Zj2=oj-uu?wZ>@xXGI4)mHJX9Dhhr`A?%l6j6guaztGk8 z12jGGytHN>-+%3zr8m_1K;lc=%->~~wwW*$e5RL5$s4v8q!`apK76>%9OgrXpW1XV z^{M>= z!;2FO6H626n%(O)$XmJBI5$(>xKZ7-QC+)Kb;ozhw_J03*Lq#oN`Jb#J5#^&&VgG8 zmJg@vdopzmw0K9luJbD^TT}Lx+ga|&5~tlEy#rkgZ$-j5dU`O9K>{!o{3Rj+OHw!> zMz~qYqvb??tLVpKjNE5N;SQX|>v~v2yppD~4gM3(vC6?8cxFTyJE6}n0*$#HhVx77 ze+K0;UPz!H13CikWj8=M%-xv#am$i;yCdysdu(f?gY!G+&4sqUJE6*Rdo&^|XCYR0 zPP+&BK4eO}fT(7OZmAYYRA!{u^Bt7U=$}UCiez?Sbt(g|wzX6@rb0;0BMBpUABf+! zr87q`7r~Qs6v!Mz;v_!7kH%vnt@XU#sO=mFIE^@btvarh)^5Hv@G@LEG=Cm^iVun! zF7Q)xLc36?xwVVb=FsC&!YM$LaB_CTOJ#*fSkVTGtgx(9*ab{G;jackj1dQesw0>S zX+qi+41PEhifSbiME8l*gJcj1x(eOoaYF7Ij$xiq~MOW?*6uSxT7i1Xh_{cp*MUz5&f OmJ?=X_m>1ImGHmd_Pxpg diff --git a/app/modules/rag/explain/__pycache__/intent_builder.cpython-312.pyc b/app/modules/rag/explain/__pycache__/intent_builder.cpython-312.pyc deleted file mode 100644 index 2fad4aa5cd2faeb93d561ca98e53c773917212c2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6777 zcmcIpZ){W76~FKKJ^#xeJ9gp(1Ht(V4#c4}Kxw-GC4m4<(4bx0lwgeCBXM}Kz5AX6 zah)z@NHr9VSk-1%Yt`(-v{ZCbHgytWTi5UVV)I11`5&W2;$f)h|}MsHBDp2S=w#*ntZq^rN$Qw zh9sX92nEGaH?7nTT?z}nKyWw^ltiU2|8+Dd@j(g1?ffMP`}~sk#}OXSdL`MH#~*WtgIjkz>b9 zoQ2b0VaCjyl{3J*2Hr+^*K!S<3Ep*_jWff$p0jf`@V0P`TrIqj!(se7(_~z5BeLzBlHc?H%9lhWd5YPer?5D0m1K|BBeJirLTre{aqQ8fs%x7)@y$nOT5w%W+F1iAuD8Q6dd{gr3SnwVZo1|4{(S z937*l*m4Q2T#%d7#n6=DVScO#**Qis75E@a##r${ZEZyrd`^KMsC-IV3*&>f#3mI_ zN$!z7+A5mB=lAZh>EX69I;Jc5mydNf^FC{im6{8(F$!cD@KlTw#aI~Eh61Pb1|4~e z0e@quzEFzkVr-!okRSl6cuE>RW^d;0atgWiqYo&Tg4~S4hJDhcs2IfA>2o1LR7`x3 z3x`x+XY_}rr+q@^(<+*%~@d7`4F@!l$VJ9_L83_7? z2*-m@gngtm@|R#YNFWc6lX%M6Fb}dEAC@NF7KNFDP8C)R3js-Ch0sMFD<*G2CngK1 z7`zd9dAuyJ|eykd@sJkHO~T$-<9P)Eme*a12*F{r2q;!>XnT;I#kOziUs{H4A@e#RTd zp(&WS=$+Zs=L@(v9GKyQE?+q80*;>-#XiEAfK};(%D(9k7ZG@|5BnziV97}6>4WtI zw)dRoOu<1atXhsbt2tYb$|GP9zXURma!oDCR}-(MqIb6REuCCx-IHnEBey;yH|>j? zbGA(@w)TvzUAA?`4LN&rav(9V*dyC}+yC>vg%`$iw&t9(b;a46arQ1v$j&{vwyu@7U75CB z%X@DP$!#x?v20IlPff_S?)w&_)x3&~Ci5Ch5v_B31S_iB`!^JlNGdwLSTVMO8$;FH zT}fgPjkh2K?o1b>XDE@nZmjP3N*jzq*PRRky#x#u&s5Rnl^9Q?uWIhI=xR@)kEl_% z9+Ls#b|8u#5C$6@caWMkLbd>LGk6=}G7?E<2&y6Yg)ZrE|ZO=4qUmBE~p86hbtc^EfS7WJR+0vCZc3}^UpgJi237jOFKq>^F zT={$_ECw}LJT?k4QZWX`ib)nnU4S@@sq5`ArWzo)qTxWMAK+HaxJ7LMx5Fyj>MCb| zP$}Mluh)%!O#*vVM-nT8V)mYTZRCX$FM{_}5dc0{!hx`&6ZoKF1aOEK1JWcWcGSSZ zs^Gx8phD5l_=E_!Z5>1c{4~^v#IF*B9BDQM1RPU?J+3D{XMbY< zioGXe?^)`X?K|%wy{RpJDA(AWJeoNA?(z80U5jmD_dC(l!E0{)^;8334kS(G52p4#Vbv^=3fsrboYQ`?@ z-$Ia{({U6B3DPeinfgFCgK$?&S1lPTB|uYTgH=2nc$`8|FKCAJjClf@*=m}>V^srM zG4)W>g{aAu52Y?l02keu|2!>je<+oXvM#?6a7CMeR^yWhD+C}xuJIl^F*0&+bg&3U zJ$N9%ph9E5+%>7_!`q=_{49_Pztl+v^a#IHNB|C#W-%b(ml~QDxD`it#?igv@MIjG zB}sPl%MH5$i#3ka!PG?RwMAdbld0L3ht~V;ANIW0lkPh7*(bpV%nX`Eztvr&@J{{BJ zZHFu({OuZ9lAqQ$P;ORrbZVNbus9Tvc*QUYnXUjyCo?HY;0=A@06q@#Ph{fw5NN`K zK-Ntd6HxwdQ~e>)RW?-@x6Cg#Ep5%VJ(Y2B-{K>{hwNSlJ5Vv?_khB}m;VC9c1XQ3 z9wj0=OpZ%1-QX-HMB~vft4bLhJ$MfL`Ik%~I4xgyk3BS`SJ|XuBaOd#H%=M`0d_)jj=ix*Huz-6k z9={B2{{Nu=FK7K~<*fZ>v-TI@9yLz}CMI11Kf}X;Ff_yCnE-!Ln>5_Iq?cjZx6_}( zVK)K?TRaPU9pn}LG|vSh({2i%gl^n)X$OcT6>y!^vfr&xj&6L6waCheJwO2UcWdh9 zdLi9=AzLqGYlNJAgIeQH_nynv`?EEEsL5HH9|P?dLDAbZxwVN=kWf$`=&sRa;H4o5 z&{vEQysM-u54&_V4^$)fld~=O3bMyFZ%*c2#kuXNzFzB&;Z;z6hG;88xovo9_rmVf zv8=s2V;j!fn^x@whx(U>PQBzkKJ?lvCr%EYTIa#aMs+~5Vi#zRc6^UfohCydHYYx; zxh2({GA%YNoQazu7nN73KvNkw!45y95k1-{Q==mcD1?NggW5~I(+GSiJ zp3gBc2F{$07?VGJZiI+VJaNTSI$S`o?Sciu>H!v1$OhRU@)G;&tkpjl%KM4XP9!97M?YqzDeG_cg#E zrw;5Vgah)xMAF9BL2ew5wIv>`Xqgn|;S>0!S`x_ADO zC?r5NSv<92nF<@+I(dV>Y2NFFW0hCCxq))67jBJwg2urIh#C@u!vV-II*1+@A$tfR zYlsQjaW5gQgpe~7?j(eSTTC#B32fDbSc@g(c&p)=Tv=m6$PI%y1LO+IS)B`X(ws1- zH}=cc-SbCtmJM-yBYHKOc0Mgz`sasp4I3A1NoT^D-V~D?=H`#VHPAwPvM14#-u$#| z>z_ZqO4m8`^P_96HrBkh&B%7IHJaGYHHRLEm1VcA)w68NT0PAkrS2Q`tV1=WIuN&s zEXMf=m=P8R6Vz&J&Ucra48(%C(p4!5puhnhAnPgnn?<|V zP#543>7=+Q4~)-i-3;I$Fi7eulIyTl9Ys-Jp!Tnj>F?<97ij2T`f-YK+(U$_&Hn@a C@-_4T diff --git a/app/modules/rag/explain/__pycache__/layered_gateway.cpython-312.pyc b/app/modules/rag/explain/__pycache__/layered_gateway.cpython-312.pyc deleted file mode 100644 index 4ec6b1ac13fab0f2d605f4c30ff1ec6a37fde9e4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 10952 zcmb_iU2qdumcHHUmRi4-CE2p&|9=F=28Zxt7%+b^Nr=N=Hj5cY5$eVfBTG!TjIkm! zo~fjeC$kl()D&hz3cqYEDR^LO=OMLElgzwr)s|#C<4zZ;WNIF^*e4OQlMLC}+H-EJ zCE3^s+1<8v`}FO5&%O8DbI*6~x&5zBr;Wh%;K4sc{~9FZPxxS5yiPF7DiGI+NJJ(^ z#+YG-L7I)R!z|oQG1C|~%#HEGJk94~<}u5#WlR_r=rbR)j@gE7WAn`9`C`(p_@jVf3frO35NSpdCxhGv*!kQXWFgH&!)VMeB2-^{&k*&5}VP z+TS9g;|{CWzf)j3Tut9O;hoEPH|(EegB1_3M3B+!;dnfe3@4+BxH1%EHLDm-h9j}C zqGzC#5kcOM zN;H{}Cn3W<7#$5Cd?TDZJa$$RMM*vdnYN>%)SD% zD49fd59EUMIf=h(GNdRD?oha}x^5sF@mv3}r8nAChHA$z!Sa6$J#^8;(hrdJjn#Ll@-4c`1@qLKpjb z!_j6@j$V}F&EX3dn&C}EQj}hNF)GEAy^z_fH?Q={;n7~{(uG(!8t;wi^B5WpC#8w- zWY2|3*$r*cq!I|l56Ro)OMAxx*YR0x8 z^V8H3t6}Y#hb>T+6CF3%az0PeqF;1EX+f+JT`+E|SSwb*-6jS^H{9)FomdHX2dvS0 z&A(dR2KD)f6x199jrvRoJTuG9KwKwjCQU*>=~tSCr-D%d^@bIXi`*WPi;GLMhNQxp z3Ys)dkz(gGTiI*Dc&lKe&CShn9o$iaqw#1m6iPL()5#vAL=BWzP-~`%TGx@`7KIwM zwk5;;or|i<(5dHwoaVd`PQC%EE1ip8k`&D;U5doUMcpnanj2q8awwjNQ%eB_qH(=| zav>a7A{?;C3$@GzKPr$Uh~^5p!dzjmn67YF_$w|DkNFZKgH28rg<{xB2br?Ykn`oD zMUHT#t%j|bvWeuEE-Qg@MvHn8nx40mJru|pc9bz{i%c!#{?Y}tg(pj%w?COT!_2s5 z*coodG|J5IX`9F*2e_N)-ExUhObqnTLGE&Qta|+^JMect$t!K2VMIPH%$U;F8UC*M zPNBCaNgGL`%;?olJoYA6XlS0+_l^>>#sqcXp-nPiqfevo=SHS zT7I91)(=eSB2JAmfMNyAim;~vVW%9I9Vd|kT9{Q=#+2bQe1^@qGE9b?v%tC&us_C_ z(vDIacO6A}IMdFbThh*Q{{O$d)q6d`Opr^a(`14PI)`K&lvZVE@k-?`X2+sGkwWke z05Pt7Xwhsx9hc-u(C|x1jgLjgqDjq6O|c?(06%#nCYvznf+SU0Fw@Plfwv!;H5b_N zkOEd75IqzXflv6X6q7eV1*8F=)3_mo>eMoP`(H68SefVQKT1*m1(O!rOvS&{WJfE1d7YM!POUSq%l5eKTT>DaMU#_)psdaa*b+_tk zRef!0Q@a{yQtMl0cc`ts>c$@Y?+E6-q;1bKv9)=o3AKqqt7c7HkYwssmCX^(;;M;~ zpM^ZlRd6l}7BuLPaUQ^<(A}+2SRPg6X3XNLEU5hCotRM(QpO|b762%qr=wX9Uy4W< z&?AKUvBW5y@o`zA=&!kr$55e3EdUjhptcjyH3Ds ztShKrI(H6S7jRfY#?nEjQPJ#W}2yxpq1 zQFS+|beYs_W0y^?%LU>O2n#B+yI$M(kW!&s3jZZRxtr z&rM`|_GOy}@?E5U_cHO-yD~@f8;QF9gKKs$OrQOGJyN_j0p3V-3 zvZr6qzW&qfaXFiuSlE3j+dsMJO?~P}eVaeb;Mg83+hOwV?C(6_A)k1xhjy4gsp~(~ zXZl?g1N86eHUj;79_ioPTafOibRQ2nL6dHCsYS$fS9H1%`EhkoA0q>bQSvdszu>>a zzpwzVt>s@>3=d&S_(8q}SV^##Tw2gQ3%Kk4fd%{llY#Hlt10*f(Cgv_UH~I-~# z!`s(sVRHf4)|*? z;IHkn?IcO!BBdAg7S{4JEa{?W0A7N1m6t%d0Pe!Q40mlqC5QxU+YBwpC0p|ZdPp>7c@Lj@FjwRjGOP(I9C)tHTCk3un4Z_ zpp}A~ycaXj50DXdzNf&EJlkcRV#;u0SI)Z&aY6@)HSwWiPqt+bTKj%# z?Ex7)Ya@dW3r-3P7K8;0!h)N^LKQY!GT#DNZcoW_)0$|un-1h#sIji3#=3odV|_fC zy*RnBJC*H!bJ3gr)RF!+zX=<8tOP+Q|F~~|7x}o$dXO=Fyru2H9@8gY2Ix;}8<5^k z={-E;1R3f+L_mi0!gYv0YKV_QE}CDZCQZ&8CG>JMg`F^LThct5sJo0|?ikn;e}8$A zEtyjWnq*;@eW$>C$_Dju<*mBXHfWE94G;GLo95D1*m{{uo31HG+Hu~zstP=w$MLMX z(gJX?e83tY0UJKpBEhDuuyLYhx*g2yI^!<%0Y;B~NZZRtPq$q5%l1j!dcnQSmsrvr!C<~_T02I>K@BmU^WQk^mAe9ss zgHC-JKdq&pjwY^U&5CVKqC=^fbw^P_I4d}Z`b}TeXgE@R>#geb-Q2&2ddgoRnI;bd z#ND7e+)IvzoTC99Fm%Si4cmnOK0kO<&PMR2oUXhZR;DUAmW0}zP^)_UYF!Z1Ko|bI zz3PT;Sjg7EBO+LBd5_&%^O?8)z1`H=^HeWYcH}BMpdqYP6}UP$yFKe^#hS>X2?(g{ z=>#j_v1QD#eytVnx@KHULPJhym}|^7Z^>>snr(b(Q5aGysxr=R9tG*zw_0mTy{~PY zwai}3R(BeMXrqH@C=CKEhOg$^yceoHra{5qSoUuxA8)rFXfu7hFL0pI^hqNRbi~kA z)OnOXU9*1%0wY$3$h$&>9VHQV1Of+B!aABPq&d*t0;g;2ulyW@Y^H?LI#_ERin#9C zv;|i_giBb4jFMylb<0CLusR^DA0W^dTcIy5=!-3FTPs)tt-Cqs@087Ob07qQP9eS0 zRtU!wY|u$4#b8Nc!k}yuB*+heHA5dG73xs>n^$hyf7GEgQ`AIa#YPA-Rs<6;1N3`b zj!Pmq2;=c2<|GprFs|^10uK*B)DZWh+x4Is0(Z$o2;uO`G~vy zcE@7HmaMSlFJJjdl9Y9cFY%C0CH-fH0B?#%n;vJY! zC#xt*MSwg*WpsT(I7qdxt1o4-iT{9-$^azOKL5w7|f1@KPx=tItCx|Cbun5Ojg^MBjM76 zE<6;NaiL>GmjwFUC_HdR;DBOn2hC9O_sIt)Du%~QKNzmppehIf$E=z469TF_D@S_} zUZ*y!t1GxbAckcGt>BcFD7bfkGYL=4)tcGL*=pB#eu7Si4Ep=7MxBLywu}2fu-$5B>>~l&PnuM?MRbW{W36V-OF7BSOFn z?tCH|*GzEe2axO$(mxjOD)Fm6>>F&urVg9o(#jS#egmIyNWesyAf@ z?|Z7RD(?lCJncD8d$zJ;?)coqeAnK4-Pz84*@}UzFtBo7afXV<`_J%%=l)aRHpoXx zOTBzf*P2VQIMW457w0d{tXaNz0=>@rq6-1hnSwq|nM(TczwgiY)-)UXxOybtTeBF+ z`oT4Yb=xe{@-^jXjS|Bt)LVt;!kSx0vc)ea(x$t1BTfbu$1$XF=r(Dv2=H7nq$I;~ zQWGeRdl2w)Kvm!+=7(a@xCBTT7j?=KNyL+Is;)akd@`Dh!Rs+88OCoaGyy(!NQUDP zJgh+7md7!n@OKfZ3FOQxk%SDj@L&NW@USOBSd=loq?txxBZJb=I58SY200yChp_;< zk}{eFg@XiPREN-4;ORS#XbZkzB`&ysgQBqDy#9>vnZ4$|zwLfi&8+v9|Av3A`u(Q) z+Me477OHyHy2e{OZtR%bvrxB1t*xi80}Hj?k1Sk`D|6(L4cw^vURZzEC$3G*UVQIo z^ZxGJtqb1G_kI3Z(=E#l%bazgX5)O#mfL3+d|U5(s;)+^k6s&{9bKsIoUg{Rp3Upz zR@Kh7-Rip0HMbG!2DZ)zcHBF$P_+|nMAx;h*^LXH4z;S`QH6lu1iL1>%7bRP6-FlG z0+-t`!Tkqr1<`BPxS>Q`3VQVL5QKRQVMIEJe`S@teELCHCjC1D9NOv>s z7V5^xh`wp3ou{5VrAi$tF)uYp{jvSnG>x?tMerE(T{Z@aBT3a!TYkbgcGN$SDU=Ah zX$UQ4D|M!9$kY#fioQ_M{{s6`5}kX^F@5()N_@~=*QbSYybO=9f=adZfuZouz;Fw) z1Zt!(t`ShA2=bu4FUg8>!#v=&R<2p53p9;YOY*0+a4kbz15s42!lW9Lc1)hf1fz_4 zG;;u{1DMdL=Ru?pRpnPOsl_CK34WU)Hy8~1C zxkHn-#$~^r{~B9p9~!TGhM&^gMxxL(CBcGt^L9!)urVhkq22m?1ts-nDd|D(UP=zI zq@m@Ze>-0d%zWK>3sU+hkg}25`n(+}U|OGdBBk?03RrH)S0d#hE`Q#Oln-lEAyrM> zfjs40Lu?((wU~E+Hs`J8w|?oW$@6fB#-M@~DSZe?>5Uch$ri2%)xE2)(8>1p2BBkJrLRGDSTFjc~VT#5sl(l$Lf+8s-s5(J!ShEegA{I zaLo!3cog~rdr`V-aPO&guI2)ssRCdt0oeAGK4qc^pgpsyu<@-#Pw^Xpo>BPLFaqBi z7C(%lh@qb-(6zO4y}^eA`e66Uzk=>C@Kb&aN#4XT%;%)_PsH^F+3*F~`0wPUFG%Q1 zYaruavIcV2!0gTiYx}hMk0$r$+@a68QxDCAwO{ouGSy$REc0xhK(cHitUr&BU)x^b M7~59_Q@Yy!2Qj|;ivR!s diff --git a/app/modules/rag/explain/__pycache__/models.cpython-312.pyc b/app/modules/rag/explain/__pycache__/models.cpython-312.pyc deleted file mode 100644 index 78c41260e8bb5be91223c012df27aeeed6f1eacd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4574 zcma)AOKcm*8Rm++3RaedRbT*uRg zc=RKu#^XztPnl`!QLbGvJ$lzA)aHq+uCr>bU9(C)S8iC;CZ*t01MGdb^lB64pGIh; zD3M5U=mA)VMv3%d=nE;hu_%KCEcGI~BZ(84szkX6H|*1CLKhpTO9)+jpe`wND(Y&Q zp5UqLPb;=*Ikzmw_jqj8WsfZKxx^Lv)Mq9Ph6!CYtF~{fnkC<5wbz<$dHzGsXDeK( znEtxQ<6f=&$hAGLQHNAqv6EVI%VpCcUO`WB)i4~hObvr445RFls*U56VSG|G?Lfog z@J2iZN@^P=VN#}|NXEypQ5+5%Mu--}U}GR<;|N)R&m*q@Bd>p-f8bH(jQ8l_SjBpia)LRC1sxQP0bxVvRa}9)$Ve1-(2o*YY&54$7$QovhRt zhKm4vJMR|2pCX;{BY(No8vmfN^uxia&z4&UPdBbVKi`y3cMc!@%x@h&+qn7scTM?h zXEOIP+nStjEIzL_<@wIU^h>!lajtRexz&=-v8nB?2Yb+8LH%YAB2lUk8MzgsZO@6( z_>0(%SE&$r3K1RvUKOKSNSA>4Q%FMWkSr!i3TA1Xi95r)q(}yI!{W}7VjAL0A!9hJ zjq6#S?s?UsVPsHd#PM;w=xP1~wd5=dAE?;XK=)yK5<#AU=2 z=H|*eI@S#?KXP50r!A*sR|z$I>iJ%MN;qXNKp)Po`+jA1E;n1Ut=W|oo&_4g0pJ<< zHZ{YqRVX-nnG&m7t{>|!v)0yeS)jlXp|mm!j!tOBUoYqx_8z|80fd7H=(X$+!UO{P z1Urmy96|WX432(*FpHogOd?Dn96^}g26S`pAwbxtz8@ZYR%jnM+>{T8J*Fw2!)dBD zaS6QbVpG1359$}AR-$xk&n%Vm~z%Iik($5y#M~*daZzh`ZvG(LN zMB>LSc{(r=t{ZHk258>dL>QAI5=Bgkj4ejn`5B{A4Mk@-0=0ewl4LQ_kGWb>AK}?0 zvql*u_o>e;x?$RjJ}vJxa?Eq9tVDSnk}3uxS8QCx72oo0D#ERvAyBzFDZJR&CeZp-1sbE~Brn#or`kQ5_2gUV3i3KWlg)!A*#g3Oggx|~LKy-w z=UoHXMPF+8*`0QJYMc^zQ`6I2TV`g7-h;3R z(b&(3iJ;IL7V*~LCB=^`f+1lR2Q1^Oea(? zTk`3E8r*O&HS3^xGc}epb?0Ak=zNsP`K4pJp;|rhDE4TqJsh} zNqb5#ZvFI54e1*l>qkHsjwo59;`+2iS;dEbL@7i>jkrs6C?o@MhpR6IJXSs^$V}1G z6m_*ReViwIo#{QZ^f=@b*bea+G$I(j7=HDMprag6VWFS&s2%DjdqN1?;)orUVd zV*O4&U*SnOPnD=4j!gA~{fZmTF)KXN&nga~PwS&%n~)=~@N@~>+Mt17dqJ-pFI%2x zIcr?Qvy%;_6%Jk_Z%G;bY;h01nEe{zJ_6SYRU6~&*Li<^ie!*u2%gjgVQF9f{e$Y z^9L(2872(>y}{K=jhK#al~@dAqMsLb5xu);%taH41x{2tkw8VniZ9<|lGp0R;P`l% z6=4OQ?Y&O`{u`Af>D$Q9evC~27&-O#$f<5DCe3f2??&L#9n+)_Hy67RxO5LGQV!*C y>5gcU{%07&rF$qQo!Qjz{xjXNc(4{O-E2ad+SI!dxO68H(!!?xKNtsH{{I0_iZcQL diff --git a/app/modules/rag/explain/__pycache__/retriever_v2.cpython-312.pyc b/app/modules/rag/explain/__pycache__/retriever_v2.cpython-312.pyc deleted file mode 100644 index d59a35095498fab1e8907bcb9fd16b5a7182dd19..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 15760 zcmch8eQX<7w%-gnB!}eiLlQ+wq&_Igl1v6i7ZluVhV zv@?`#$&};Q1}ObD54K*nE4iCC+I@XpyEag#eZYEwSFE#rz+0d|%MT@_2MRW?i~f;+ z3a*vKLxL9QId^7AN~W@JU(t@`J9q9q_xs#)e&^iF|6;M2D0u$amwy?~?WU;T;)nV$ za)e$xOHTp`!FCO=DaW(Tr-~t&M1-%qTL>Kb*? zl!gjvCU>cwEWJbZkD#CUjJkRAs3*h-9Q2QiG(;Om8%aGDXt!y!3F{c3cZ*#e4WFNNa&QtNEIbH061a+rT?M(2utAjeIRowed~76W&|+ zX5IzwcHYa^!MlTR;p^eObynkR{R*4*(ULh3i%rD?@$ghk9D;Al$i*{#{-ekGj-EU| zGynqDmSp3LLIKo4^Msg5>v!S>U4qXdG&W6O9NL+G} z)DT}x9|*)l*8{UYMlv6r;zNBmf+1l#E^&R=!h9$e3>}Y$qLNu@<4hoURjIhF3M9df z3{TAnLA8edP&{~rbdVbn0>MzJW3{0h!N?3B^2bABT=esy@c{OW3yUPhKOKl)`3hG7 z>a4*&4G4khD`!K~Q(`ziCCoyyW!;#A@`}l!R({cI8Hg-WA!?N7sZnKdc=P&2QoneP z*LObfddBbj?34OihM@z{=Np zx&vV^FNCj!V&1^?v=?%MAyMqcj0xDC-H_NFo#JOAA+cKsOmv6jz1uCw+cYFV9bMD2 zFe@c=rap$C?V;{4gl6i zxd^-#8V}zHiGmIDEa6z0D3y$UVI~H2q9|!2p_pU|g7j2(hbUS6r;ZQ#``$U)clON4 zu;lPZL&AhChW+D#NaQj~ccVWtH34-5uliV_5gV}rqxwZ)V^Bx_FfW;Afc^d7p9u-G zLI)D)<-H_X*7wkdc?{Mh;$q3W$Lkf^Fx^B(McSEb*@VSQB<)Z{{2>Iu$)>_gHQFj{e$WKgQ-1( zNlV^VbNAMrTT8JA<4>Zg;rEiavbI2yd2X)zXn5I?Yk4Kz@=CUG&tJ`F8hi7cJ;$}D zx%OrL!O+wGXQx)Uvw4=gYrSK=cWXJm!tQ|Dl4b#W7gYF)!o7iixK~O9P`kd;PEolJc7Z{xf)*?6 z8NMjqN$tg*QdYa%djsjeq5$UEP5RINf&R0V`Z;e*7&q;owrup8O1qb5u5N?fs^N99 z>O^Gb)A8Bj_ip)HV)#&K`YYVwl0F*Z!!yyZkg0?! z2tX4Xqk$U$l&1k0mk{pUx{H!Eq! zBv9a<2)J|o_$2+zG=d*MWXc!?l$8KFgON}mHZ!dzO9ogVer7r(F_)*NB0f7&p290Y zOlG>YQt}K`myH~NDH>-&Kh|s}qgGM|u=rUFj$s~K?5AA?sA_j5t2$Vv=y50@q9jul zulgnmSU@hG^KPPfi#P&#MEu{Nxd^&!@+J-W#+F=TSGuw5!L6s)p3SHD@248OvW-HD zb>~?d>c*7Imvik-yLPXzJ^ALgT=Twk^S-D0)Zw$a!|$XIzmsjgm|`2A+uHJ6&E26p zLn%+^3b!NgbmyGg(#~xUnw~nJHKxw+1&W%Xk7!cPZ2(AJM>R>a(!jl&IoI~IYx@e@ znRm73T-(yFZAtFA&9lD3TF>I8g-grlGqs%y^po+QM?Q%>yOMcz=##3{$hoBM`IY!R zKIinMoxYrNZ`!%{N$go9^}S%qxp&3Mr{)q#^YcJtc_i2Vdb<7fT>Ig4`{8Fzskbk! zw2!64nbh^!lrWcOTa#?6y7jru1rzh}*!{6w;mZ+GVGThsQfd8dm2?^hng z;hk@4Em)|gx9By>&}2;x0cf{4a2l2lPgGp`T{G~1YJ>RMsDm6`hCjg)uK zlgP7^skbj?U85`PyQ?;LzNS9kvNvDfp08`mdwh9!>#AeRzq#<>LbiSH-}L^v?mrK$ zIEM4iy05E@c2j{e8cj07Q8YYo1Vy2Q0|7;^-G*=xaV|+-A5_FKfOjfs7akBg7>

UeQwh%$CAdg`Sewuh60i&?uwm3>^@<1P})p+R*I;ukI91y6jCuqM>rJtps zmI??0MrsObuHZ;_!AMOB(|;{&M`FaxBbJ+a||)C!nkocVLjhdm6S8EAv;rN#n? zND^Gd*0_qTaTQzRDz}DfmM~wV1p32QE027#h&f6F0FAC-YCx#w$s&FzqbRN|O??Ou zy)yq)#23a=-6bUPf4|D{65^=1!fLCJix%Q~z6in&L7u%1A&Hr;Q$BV`coPQQKO!84 zS5Zs&A8J6G!~;TH*42_-b+M_|p3n>QJ_k{o!a0Zw=P~HQ0QHAtBE`k);rJEd0;ZnE z;1UL?$7SsgHeURSLh6r%W1uWSf6Flg00Q(&3TJ>^(gt{5xQGSc#b68qpG8)b`!HdH zw!92!lJ;t77Ep)c;+YyB7r|HZ9_Fw`-NztuK&KBFy#`fBqQ#=>Jo1(mA9%H?xz5cL zUj>tR914hkBI`ga)irtd){MLR!JfRkIqz-) zDepcALf&mkTEDha?#2frxt)j8I}d-}=wA*#JNmanpAMyl$3E-*-oFfH8vWV&_mbAt z#xAHc$9dD7H(%EQD&=bf(_~7s?j(C}+wV-2y>8Xhy1eIS2YzzkNms7tSQ`G?j%7W^ zlf54fLSORdM|0<|q|aaZ+!p>df6uX4zfix_`|;`fryq>``>}^(PkVnk_=~}e{dme2 zPBIYWUCl2joza~f$k(_R4=fy5cF9KYlMA`Med)b@&#wRN`=7p_s=kmsnzvQoKH;9;%Ds6m4S&1NWw)JQ358RWvD{=LJ(+0t9B<8g5YhgGn}7GW2} ze8!=#kOfAB83?7SD{xQ}0f{cVO~6ww+{AQa@%t+jc|MK2pHE=CT1H;iAzmipYlw&+ zzIf`$=|TU|w?^I?JUt-HBh4)g-p2rEO{xY-p?YcjmuI0#6ea+V2uh109l|ad&!H@o zm`E6e4QX4!UF#v2WG>SJieE|TzwB0!SY?=^KqQh`9W}PCL)V2U2-xNa5Qv*Vu(u&^ zZp&uUs@&`I6RhQ+jJ>L<`o@nf_bs`)J?XkVFDasJX>MD-+ED^wB}G)f7Zg#wDQPJ< zs9iltHh=ED&z*r^kNi+v+Vk!H#_q# z&*IGma60TwyTD73dMEgKeYC(tNJD zCk=m&o)?tC=uGym)_DMlow|Q2*RV6)u=ByyY{ToBhQm)UXY1Zd9)DibuxxxVlJ@SF z;T3^W7gxCEJXdvh@Xp|pV})y41pv192Xjkr|KR=S_S%9C>IGzJ-}0dSuN_aLxkJP0 zL&MqEMpkU+QtY{JUU(?iW%`@{-XD>1lfJvp!2GJl(8rm6`$)J5j}|Acx~*bpwGlXCsQUnh2y~I-L9cf!fs?63iSZ1vm#R zVX&f&T@@L2W{QDY{(e%v=9n~6x%NNka zAKH%`VE>YVz^5G=8uD>M6Ql~LG6eK}2x$8VUI^wq>u$dskuOMi6W*bzSV(9=ikk8( zH);;5x;am!OF9aLqz9{GMuc}c<(iFQy~JE#SH zdf6jS`h}|UTQ}*~#;Z|yuW3wfY6**Rf1p!;icKNq#=$9#mZq~b%+f&2cjITw?rV$`Qfx85Rr3)Em-}24A6lupff{2vra$@KtRPR;NEyh5udHRS!yvA1N0S& zH$nD(Kov~XzBlqacjx!LQLu2jQTofOZ3P`h3VO=ZRWOh!OV#fw7)jJb)pZukB+60l zy>cNqj5k@=Y$UaV>gxHO*{XAVS?4L};0+bk))fpGGf{3Rj4_Tf)vj4E=Iz#*2r0aQ zw5q9Kz!*!_wG@mPXI-<9XfIu*vm4U-#1%o$N~|s}U?$7pRJe`u%sXJd1D)Jg+HJRbT->)~I+M zkoh|lMV!ytd4|^}v_Gc)l?Ie#$r{%23|x_6pw0~sq!v|aDXZ*G7c*Hwc}^mZ+wky3 zD@MWiMa(}zgY!~>18@OBcK}L$I0_iNr1a_U7!O-|IqOyG;qLc9{LK0 z1!uH6;wmi%(6En7%31iQKt?QrhdLlC9-{IRa}`cfC4)E3b<^NE*_493G#2Tsr3c}$UGvRP%ERHCznBW z@)0fqdEqZ0cuCCypHTt^E13IR2*4r4Qd@nu`&V7wWzUnhR$Q;Xpje&hjyb7I#^FS1 zxo>%2%GsGTuQqMR1E#9RyrXXM#KMVuZT;fd!q}>_ere0cJMZtzxjWPD&eV=Kv+lzg zcmJ~^S?55i_Sn~EeX}X4Pu|S1AV#3(ud871Sd&RYHT~p1=x~1zW=hjkF_21dl zgOgeJ{*3$3Q)ubURPEuHS}IgiT=nf!@@ZH3=E02x|LL`#LWJDsVGEUS= z^MP}S-ju5Rc8z9Jsv>5Fy0n{86&(yf#Q;<4hDwVq9D_a+KfRA8)*!f+iku*4zK0Yi zAlT?t8pR9@{wHQ41uQ>E|AyNGXco!Gz4zu<*!JgUm-=~Yh3$ALw?@rt zBD35tgrHKe(d7pPB8nO^*LwIObFBqo2=fhM@Aqg6Y(V?Pv7^(1*I-D*A>O0H`Zhdp z##gdb^dLNSl>{P)01oC-SIOg>0Cx(UPO1WqN$63)@w#=+p`vgUw7h%!NlC1)SFXJ)G8ot92ZOtZ7K#Ay+^sFNhf6MwAT7jfXi7 zEr!>XFCrU>palf`7fAd82I%z?!Wc|qa210H1aNa?DmWwhtg?wiM5hTeu>i^7h&nlv`&4r$ZeGl>6RnU-cGmlr@R9x=P|fA zQR7-XxNtDZu6Fbgq3l*9WyY~{dCSi_f6|$+ZOqrYKqPL3Buup z)_pYNKKU#TS34Fb7bY{#?&aQ}o&3p3)CBJ?y!*W8^`-qePglm%^^AGm_3Bbxu6}!_ ze*4qjd|kuG+fI9_Fq}+|A=`Qbl_TVhX~lMW-vAvEen>M9Zk$-U)H`OYu=eLpZKeW zr~EIk{^DwO_lXp9;^oPJiI67)x$lqhrkAEb8G3P=VCWTu$hx7=>BwI6F#>Y5a0LT0 zX54x(X578yW4?z37;MKew?hO@B+S)!58gSLGqRqFa6?Dc2{Y* zlu{^^H#@P5|8k_USzQ{v)AlvdXYQn9n^$(Dz2z)84g!Lu~H+>))@vix?YYU|V9q+T*t z-5X!-&p5Zk(fQp|cTO#Je8#mD3{VnKZk2agvs{(3x4obktO~uadlvUE>|g57*0g16 ze9J=Cw*9-BII?LIMyL_2;u741p^yjP$a;j84?zS^Mnzy{IR6AzxvNo5qkviFHE{Mw z6P9BW8aVec6E`a?k8%>JA#TJ&WP#9iCmhA#BM5w2;jb~?2Z5xMXCCE6QSFfH85kVE zImQLLO(Dj!)xs6}=JwCcqxV7&YE!RX%=j+;Xyf5+%%{yF1jintDn zQw;nkgTg&Y_9y%#33wkC5(iQVNk77J@W7F)7WS1B@PIsA4;ow&n> zDZvFq@M}1*&V=x^41gJV@Q)!!_$3BJ5Mu|C&15FKgy|R@!3n^HP?@aCg{hds{7o933hnZTXCAMn>`iBNbO!HNuv#ard95j1R`C;+b-V_AU`T1 z>RK|w(c&OXGE{IMySaeDF05+XX3cK=jh*bVuEBz}7`%f4F)1%#41o^O{6v<^7sAM{ z`v^1IF=&I}TlRpwq=$t62A?P&#lM4~prvX03##?El=TbB`#-2XUr+?aEeQTZ*D4R)pFu9J<0{%^k^0FL&A5 zr7Fp*AO{}^R0U+TfGo6yRUkoSI6!>NF^ArIA*BSO7dD!r$iX+p5>Pa!zS-rHs^I|L z1!mrx_vX!;_np6o!vO@}Ti<*t{l|yUzbN8-tPL>xG5{M$L?R=jJd)1TwgUqlZ%pwl`Njtao+S_Cqfp_3i@r>8Im+!$C}O;Y`l%`n<7Ht_Rn!a)g)ad z%UN3`dvx0qvp)jB2Er)Ah$!O{IngV+?s+n9(JiunV*KdvFZx8!Jubs8GfBVMeoZZs ztfSmJSkKB5v0G!!BXB}cN2I4IO9SqkJqXihGH+DR((}1gPK7^LhBW4B+ z!SM_9HpBxwrjIW)EW~P9o;O=9Do+}hHNABfjfzhs65q?|Uuc+UX+g$I=?T2Z7l@j} zSzY57N790n5Q(&im4r|zB!H5|nwF-71+3_4SWM?tu_$9LO@xIsUIOWolGZE}@Yr@6 zKW`f$RagcUc}bCUo?q#Cot;t+IRe^gQ5Zf()y|V8b}d+q_U%MRKN;UWK3Zab7v2XN zdNBk8b#q==a!%74re=T$(Qcc11n#?m7SJkdxF*otX@piih9?K)S3jV}fXW%1#;n0; zu!{^pL4(aTT+-ZQaF6LZ@G)quhec~C78xj4&nlZ@k2&vQ%!a}BtdkR~UeL}bp;f=( zoj~i%+!$yP(EZLXBapMQ*um{N7ye(IVj|<{1fk@D+;lnkDkr-27H5aych*IA1s4B^ z{_I)}!a1!DM{`~c>1_^X1Vs;UwL5roHbMqR+y=M6D9i%-jC)Mu5cUdT1 z`TuX@b+mM5xYcn;kYf#5Ardk|xo!t<&I-Lvyoo!IBWX1ZzUp;Wn{%$e2|JJxFoFj6 zneTBu3Ls9dgNGuA?CEpl8tyy4LWqFvl?fwE(ncirh9jpr=LVXv1BnfvXzil^_4}xw zj0k_k*<<)#8<`PD8;Hzbvgn8P)LiS#+Ia>UKEprnx`rTv>rgTbr$a-1LTIJpJX~jZ8CAwyM>!msAB7Go= zQ17jHXtDljvds)M4%JK!$_!RSLgUtqE?}L{-YzP4H2&5ye~8Vk>BRKqu`Y;$E|_j$ zG~F^*2(>(+$!B_WNtdz7-cnVW(8MxX+89jEE?9)dJuE>HH9hlcwy1#~x&Ye#MuK+I zLa4>f2vj;=gE|Q9irzJ-(}rVp7>&@9Wgb>l~B#8poYm3-Bav!zJ2Besv){GFxAXVKV$$%iwW zGkft=C7#;8yBi_#t_rmOK2pIqDS-5ogh#hJ>$h4P7uO=DR0OF!dt+~QZfAC`tm=E}-HLj5_li-vT8;HRytsLB zFE(6>4R7NwW91t{IX1i-yY&)z!pU{-v$oFlrQcuNdViZ7aMZ#wuT-d z`&KkyNyr&!E7N`g!##B1a(T|yj-sBv?}EoYL*GPWH4n@+4s{OHyc7zcuI?J8)j}vR zb`S>0mPy6UBwMH&^F=TNs6=SVHaUH{ASnxk_GWVsib|^fc1b}-r|NGPn60;_^OUk* zR=q#O4HB@d5e`IJC5F%khdJ;nJNSc0cu|m3)@yWLl66e%3N-X8ucOGTPdD4`ma#6= z=W^E9Lnww#m=je@ZQQ}*4`5)+m3i{wV8vm!e^*Q_gzqui1 K=p}-|67*ltat{Ll diff --git a/app/modules/rag/explain/__pycache__/trace_builder.cpython-312.pyc b/app/modules/rag/explain/__pycache__/trace_builder.cpython-312.pyc deleted file mode 100644 index 28cce2b2eee21909defea7d22b99d5c144f85ba6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6423 zcmb_AYfM{Ndgs3UHa5l>^O%Ww$3QThNk)@_A;|bJqcb5PUdQ)_*cjV$?u7yN zTFS2GhqGc8=T9Npsls$qg(z7q`)AAiTDpH0?f$WGIyhHZsZ~{N^K0FqYP(UT_B;35 z#vx9(m3k1z=kEV-S&y1b&(u(t3U_rnFe_oJqNSF&m&Pc+HV!Vh0 zL18=~-2|ALlQCX6g#+=M=Y@Do3`sG(5Y+C{dPe)9b|+x4j07}6@o0kPO+57lJHhZY z&+zP*v=LSMG4{oPHrI`|b zlWY>HC7*1XqIh-+-C(AugjqJj+EIznt~S|FJTJ36w+Jtp1~I{zv$8pCE}q)^1yd-{ ze-)@rSQ6Gmm2Bbl^>8F%gEte#?rUM&z6F?q4%wzCS;rfm7#|njny|}uTvbM!rFfUj zOkYI^zbzZW)vx1{YKm*JMYhUSPfU*soGijqXelAvfz#Av80f5)t1Iz0;V6@UqawG> zMU1a;yGE)lQBhSqm2d(*C|pUQ67MVV;(yTX8rd!D<(dI< zUoBs?XjOUStfU>hO?Lel{bk8cC?wZlR<4mPa|j>!UuaaV?5w0wDQf8;VA0P}xbqF% zd8;CKYNn{7Y!mfzJvPYoyp9N`^dfVmcYtmKB+&*LD7sOya|*P2X@*5$*>s9t>MXOL zinfhuIR6JYIRG#ye4ql2CAdU`+z@Vl{RD4^pjiFHQG5sRw1G!5+kimxj>3$FFj~`q zhR_{jke)(8da?^7WGu7P|AU7EpH_%Q#FIU77H4AfPpsfJKE9gE1^99Han(s91SX@|SiMJ(*(R1|YG-1HowsU;dk+sPy~7g~u0- zSP)~8If4HmSgDRa0eTL%t9ov9!$LLOT$1U zFms&`3@&!P693c?sRg#)fk+IvBo4wrJ39!FBFU<5q1B5IC%&4vg)s5A7a<@r)53zH z$HE+hZs7&F$xGw6;YTB(S}_-2KNE;6j3{BnFe69-J|G1YW=fD0CL%-?CLW7p5+f8V ztodWJlAnZEQPDwY7ot4Ykv%pN5+%T>MqZ80Rv>zhjY@5Sd&NtyFA#1k4uVvZg6M~} z5D${^&qhO^%?gEZ&WfNA-bM^A11VLIMEFHWF(8E_8etIyfiEJ^k^o+aOE)nIG1y5! zEGoVJ8=;6K;F3a+M{`=f0O^mwD|!_Zpyc4{SwXP`XEBBpMx{dK8TJr#R#2?sBjB`g zk0UI(2p=LBHX(dx2sAHY}MW_5=ZTMb5oT@F_&q_ zqWevHL-b4h1K7$fly@L^%XZ!HcKdMBlB=!Xscp~Hwy#FAweKcPx#rd+mvee{QM2(1 zl^lBRs$Xflf9T$!ordmAL-*R*Y{UE84TBpWWnIUTr=Ha`Op8*w=}5L|Hf4NP=Xr2)&5~_9vQfX?_EFAR zzkKfQxd-*@k*)UhCs&^~Pd;^C%Q>5JP3^m=w)zT{8p<7Ly`Q+3NS%J(*12Z*ndOmX z-Jd-;ynXQOmLuDCE;ahRxqVgmNn>gx*W9t@-0>dGc#m$hZJK^v^|w`9iR|&otoK@` z`C4k^S>wUyE$yo}A4a~4tRKyGe7N0la?_D*8CucjI=go|k7hcLZgl;!_v_xRx3V96 zlI{F-#gc37eAxe0|4!>rrgdoZTKdw}^z`TH)}d_c{E8vh*qUziJ@4_Y8+Q6mWcp6* z^bKeFhBv3Pedo9PK287mr`ev%E2FvhkFSiZCV(ZmrjE7NOw*y25g6?>9fIMyaiepi zKHYorY10r8xHh_RHPdq@=YH$H<(}oi<&B=LaQeI9r|r{E-H~T*Pp+xb44kkeg&vib5i z&WU_CVezgF)ws*W{7ut)c{5R){1Am4uAS=EOm*w(aJITDsmmFv?wD_zGj898GiiQm z7|hvfQ{mJ?+SdFnLiQ0l4@C(zOnyG5Pm`Zh+Rp-YhWF5ECYF``Vi`9-f^(2xiWySvtvfSegF5MW(}qsC_L;@l1k~IqU>l zD(uT#2^XbiPAsphd~yznRlNR9dnz@CMaXV}8ukM68pjF&HGfPoslI5I)W(>EGJJ+~ zZO|?1AYMwMZ&B~l1_dC)aWAX6yB>117dk~J#%6I)@aj}|jXx%9R&A}|G&Kkk1{HH* zLv_RC-I~8seH%Uu^L;+8EWDh6UGWFdK{;4cxBTJV50i$Ry(Y;$H&-R+@5s01m2+8} zciZM$JD)Z8t&eP*2XmI{)P>vUlEb;){&erD)Xa{nYunYebv|i+W_GO{zTbbZf317F z@yOmmb4^NG{@&g1Wy~$Bq4mRm)Bp4SOh*|an=@%qBkn8ZcS*sX0D(loZcz(JA|Y69 zARdyq>}wU(iz*fug#w|J6ennz76B{IR7%7_%}NF1-ZgurCM0{1`n`%XNF{Qc~ zwqw|@Rqm=fyrgl)m44Q;k$9m7fe zGn)$zb)`}(=tnnp{2u+)DzA#W0;f_DzAZyuksj}4lV>K zoSHQ%IxyAQh=e-`0D%&T#;L}mF}NG1`)#L?>O$Ugi9no&4%qw7Verq+`fm|q^g_gU zH?9obAH6rK#hJC~Y|{tZO~*H`XWb`~XB3+|*LEEDwUi=s0dlqT-9l^GAA=o8d6Iga%F4a ziswn8Q^_)9cJIW}nSw;Q#bxc(E!Uo&{tDGgnuswc|9cZoHQGc2x{`LFae&&pxUVDq9@F3a-I==!h{$vpA}-W3i~_zj%ZV=T{EC>E!;;;i|f+Z{NohsNJ=j2C)bjNt_ow(B&D5qJD>3 d{t0=0k4FB1vHy-e_wTwZ6y^FBkzReze*>7Q=!O6Q diff --git a/app/modules/rag/indexing/code/__pycache__/file_filter.cpython-312.pyc b/app/modules/rag/indexing/code/__pycache__/file_filter.cpython-312.pyc deleted file mode 100644 index 54cd85a5a5bbdc064c557446c9ce9dca299ef4c4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1221 zcmaJ=&ube;6n?WmWI1c6p;nYoH$+YYVIgRZa|i_EQtG6K7D+S>6hXRO?~bH(*1O8g ztRfkQ7;0z=J@nAlJqFrKF)cl|r~U!G#Bso3NKU2D+)7nwqEp^zB|G%cfqnDMzWLt! z=DnHUrl*epj{ec_!XF91?`km~Mg~ZK9>F#Q5ReGgNSzRcwMbjj>pB4q-hn{hg233( zGDh9#nRf1}TG&KdUK}UF6JZi_Tu#?gMr#QVyERX={EU&=5uNm3$MrT)sFMKdS_>0@ zOX_-H1lpE?!FAh|$7(&%O5!VFMDY`pElnV4V3eDo7?|Y_jXTl^LN25+#O6vGMuD_k zx83tSzeQbFPQ^(;-L)i0Bg*|z_MsGYbRB^7zeMmUY7tnRY;2I75x%W$Xsa)?Mmtu` z@!rFEX9NRs<01efJxwUR!*LfH1PhqQX!-HK!+9CT+;QG1xC*vWS=Y<$-WC5q7*bF& zTu`zvA^3{C3k0Qa!1Y%FZj%l2nYMZu_W*U^YqE_!{k&j64}Q>Z5t~%7QAgd&AHMzG zwdKoh?XCAexN7TCE6+=#?J=w=r%{8ebfwbfpy^!WlyS$4XxCY$9kTWCAP^FlsTR@8evzOQF4nise5rxnyLic*4d2OfdvsQIq7?G5C)#0 z!>W8-DzSp{PQ9#Z{nY=8om?&Kq@uy4)oTC@As+^#jZXT5PR zePEq`G;{LtOmVMR{kiw+onP)eELQhss`p>1-p^P27y>G`!Cu2z>Rd3HV^pLpmc~kw zMEH90t{Z!6>J1!mM-M=~2iLusdQs+K$B@lb!M+D}N?~;%mKz%dxGL%v$m1VvR{k*z zvqrL=%2&ZO7`%~UVob!;WswuASW&n#EN&L-EdD=?Kgcg;w_%B$Lx;ND`~;f6bVA4z TIP(Y0{hOO0HS#woJ0!jU+6pv) diff --git a/app/modules/rag/indexing/code/__pycache__/pipeline.cpython-312.pyc b/app/modules/rag/indexing/code/__pycache__/pipeline.cpython-312.pyc deleted file mode 100644 index 00bf0df85cbe37b80f135701c656c0a7db9bd927..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4449 zcmb6cTWcHX^&4q)u`ZTuE0V0WV{M#WTggUpO;!yh&CQq4O=?1%(yhA7RMCuODKi@N zn^B033=7SJ0t?&F2lp`#eaMnL_%S~r&=(8E$P5+)`cT@ZvR)|cQ_uNEGg5p>+`;~I z=G?yXojJGf@4=vtz_UO2w^GGV$UpGKdUzAy_O}7pBq9+xnJ8S2;}CYp4#k;sDtwM- z?@rmJxN~j>^Rh?r=DZAc$peZn=VP#2_A7y0fWaO)s0`)?8SIrqN;ns0@PIs|4CjU! z?2|{7NG`%)zkEuG=AsM^$T20Ji!(SVk1B~=g299GN6J`kjKLv!TsfUP%@GH=NyPAD zA`ZQ9m?z3jtPQ6|{)I0o&hY0e6;;pcCAFfZ9ESgHzBsQIYKm0RjRAOBR%^5%0b^)R z6{UO9BYkeQR(T*%K*cPSC2^xxl0`-uSrCiTVRR7D3y*Y~FX$?&7+t97bginED*9pW z(Z#%`U$2(>cqCowO2!uDy!PNoQsOZ7u2d{(uoG-Kc5kgJ(K)$PI9fV1CNhFfvM3QreE|Gi8 z=bWNjbigk!dPFDuy4LuV*NC8-e^n8sN2N;fPN^!%rHWMG`qa7sb`rwvuL5?H=r-*| zm#Iz!8>hQ0$v!Gbn~y$VL48zPLJuB6^;kH4$b$N0ZGHNwBdC50r;l1tpRB!`K7Ir> zWa0FWZD`VhEG_ychcHtIF-7N#u6Mvs5sRvyw;)RwP@@)ZjeO57rD7C~Fg(Hvixi3< z!te?OGeszR#s~@p_~a&MfW%xt|HlR z!;#Uh15ep57d=AVS?8?=wBgb1l2P|qu9zoZ&l2(#=-cpa4Ak9ayKwYrA!XLEdl-bu zcA4nm>#q7h-TTsE*=y~>k#8^Z_^B{Q4m@SMeDw%mb+*;} zy*K=IKb-CYoGftcx$MHy({jwY0+t^w%iv5IcBXhw)`E_)&R6%_)&=Xqu62XQT9>f& z^?r}BZtz&^#(J_ARGzS)-Y@vh|I%q`=~@;#*0N+z(t?h$EM)0C;5YX&N%2c5r{SSe zRTWC2;VY<$0_90t%~Na^P$T`Uq}z#!Si{q;+NmLm5l_+mhKn&815yQMD4N$L!wq#& zs)!UDoZ(_^fTBN*0P6vQSu*KIi1NUEg|iVwXHjf=^fWH$C&MSQ=|{-RGED*^6=ns3 zo>omi~Dhy47kiqLzk|;zc^ceF*hKsct zgU27k*Vjj|c_j}#W=--jjo1gJ^@$^kdXE8Hvi2q96_oX%#Iv7ot-t2q4E?&{-aT`+ z!S6;Bo61wA9ZfZ(spn_6Jgw-ZhJSDDlV=ZFW3xXHZr~pG&!6uG!r$F`a_g^r zJASSiKi7`WG~+W{(O0KlFKowWTJgI(f#v@=k^k*G{S5XQj&5FfdZ9f$)f}FB z&Oa}1>8;_*4bN_L95FEw1dkx|rhjcd&J>3PS{NGpD2CvX+@T;tv*PPY^1n~C%7M7Ej8zM6kM zwVlYe5_eI{ZLaY}pB6l5JDzREvs({et+(P|>;!J1mfLvJhMyJoB^c-3RMKm-V(?39 zMN08zfH+|grq}R$^Y>L%PWj9Tx&as#M(aLcNY;}m!z3speU5Ynq3rsQ3qRL zr`*`sD|tl{1j8qE0~_FgApEhGmrV+tL_O2ET!rO(!i;4>M6utqWdr~X%kg8f?+CcA z?vHV<%#ZGnD`IjZ<5DV#yR6jUgs>yU&SZ>2vZcF2NE(KaG$sRPlt!_?u|zd+QhA4o zg(eKwz%5E_5p>AJv^B@EvF_4Ir6Aqd{mB}!%rWrd`^8ztr4Na+Y45^GM7xzkrId|} zzxaSmZ#F!dgk zZ0*?#44huf9J`4SPJb-#e)3*6Q|1c&E#PqA(JsRR6@}wEAa3D|@?}HZ>>bJI#hnBv`QNZfpg@t{}n;NHV@l($kX|$F% zyYzz2oO{l>f9Ia>)BR^4;3v@bf{!vG4A$Gbkp`5rb10Q zm(exbtLbV(^QUo)Y!(aJbey-nvaBofnk?IXS)R|U3pvy~W%-v2O0MY%$?}2I%JQGc z9_)hb&nK=J8Z{D1PFqYQwcB!m=CfMbH00Z32_+L#Y38=3$CN@L2A;HL7zuRDX}XyJ zW1_K~k)X<4BBQI?Vn&}!q~TbOknto5XSW(XT_{qxec}jIjH4iaO+N1k-g~R&58S&{ z3rqLjt_8d9T?Xy`+cfG%x7|YXo|(PxfcvXkP%uvoX~mbp2y%v)^MchKL^-SS%&EH3Mm zeS1ujy!RJEmPIq*+AYy^Rgw+1)RuC<8*Uj}$^mbrWo#)oIJfi-=D}-bx9c!_UCk0z zMrAjed1;-{^9`|_<@s8ySLL()?tEW;Ey41r>=NX_@*W}X%vrqjL#>rFpXGynu2_6_ z;7|y3&10_3Vm>6Q&~^q92%vd}56K@m%V&8kuj>8Sx6vdRcYTID_#00wevvUE46#TS zEAddX7`W?Z1-lF`Vz%FfvYy{( z{QJx~n@615!u4D}ear4Niu2d=IoavO1&U=xv6d*7EXB&9SSazZ%_)Xy3k8K5n%yx| z)Jy z=xL-x?1W!8ihBBhg?7NQwr5TQ+62Plv-yk;Oli_g!4`oJ;9L&8<9?erwA>AwFDT|s zXYW93RMTv+xgVjq6&(PIGXTxm91b6W6%0IVtko#itt~hsm%0x@`m|&2!cj3u?p;!6 zIp6rM)Ki{ZnOvQH|3WEQ7s-j?l2{8z%b}G}H9S}nYSF&(rIkz1N!S-GC3mHPRrS%# zAFn;U_UZVaFMM+0@zhT8o$cg1m7%LorBp54w;S#K$g{?;-P~lVePh+=c3k{qFR2%1t93?x zd-*q)cf<&c+dX##YqxA`kXMnaoEX@G_oy?teNYx zRcY)==UANs`@Vsh`c-!_KpqER_>v8fP)=I0lpG(eP9=uA9zGS9%6OE{Y$u?T5Mxw9+$C)|JU#@#40VsA))74khr(vxYiZoXZ#cJX1&qLj%zzdFa_pLIk<7>UY zf2|sgmoC;rBouALRfDm57@$}RI1iQSxY$Ui7jxz06g69g(w|7T?I m-y&f~Vzctz-AgaGdFR4lnG+*8T?%`?6>N diff --git a/app/modules/rag/indexing/code/code_text/__pycache__/document_builder.cpython-312.pyc b/app/modules/rag/indexing/code/code_text/__pycache__/document_builder.cpython-312.pyc deleted file mode 100644 index 0596ea010ba74eae872b7f70ebdf1dd148c9a37a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1608 zcmZ`(&2Jk;6rZto*Bd*ZhBkF7LU1WziQ<(Cxl|}fBoRnNiPSWgy^NOKak6GV%?wOdHaNPd1_^WMDoes6yp z8!I9>cb|M8{G3PVcPR{ymNEGJJ}^DxBOiw-!Vbog&xN@t@8l!R(IVZ^Bf~M2J|7k$ z(=ipVg(FeXDPojEpCDh~N4{~G%c44^ZoxADl!Apt$&KTLyF5tZ)Y3%hp1ZS}c&&)W zT$muNyIsn}2yk0Ti+NNOB-?ajxI40v_;h8r6@LN3Xpj<4Q%;&L-}SOo86D)s=dXj@ zLlimKM^4Vq`*>e-^4%QdotB~Q(+(dd|F{)|K4l)XMjZ@v9DX3<^JS2Fh)bP1e2@a6 z#-MdWi~RTT9^T6}jDPDg9<=6FEiVmqU>_awFaJR+UvlXT+q;(s`{X4fhB|+@djwogV?>4Czj}pHXQj##ziUTeRgQ<%#m+_$PdYni3P7($&6()^+#WC4qp-Bvi0;A2)1;~yv8YOL-w(9ku!$!aZ5T~Uy ztg{=^T~`INDd1E2ggH1DZF@VVEVbQ`cI;K!CQX(!sK-;%zGJ(=oX>(bjpy8Ea}F#X zO;cMMc3^RAP}*6eQk%Iuw(4UL@7NxoToG864!8ZmrjgGxw966bihuCN|13mJnPm;> zS3tf-rxP=$<(ZT6;!%0AKUL|!R_T|gdkYU2`cv0?GY@A@r*3?6?WAHIRjfx#kCzXY zkEiZFdGo#g?5&g8+R<#SUw!w7h3^(ls!K=JrJuZC-aoE>bW&YEs;>XKeO%o-y*dBL zcw9Ot9pC(*|JMAol5u_f`Na5S@hKV~DW1a<(1vBIJ~Fvs>}^TpR;hl9d;lL3gHhgM zv6?Tm-XtV;BT9%U5;6c35u=2B*>c0o!rp-h2Z+tfK({54OR0#Aok|4kqvyE^y_oq( z^M*AlBi37x45Bmn?GP0hMr|;R8VsZ6B{63J)bu6XvX?7V$=UtKeK}m=# zl&Mn1?aQ~IU>4A}8`jh}u^xmReC61(LKY?WqPPq5!|a92><$>@cBivIp5`&eXQ=uI X+B`;^XK3vVE&pvy;^JQjh`Rp|w&sx8 diff --git a/app/modules/rag/indexing/code/edges/__pycache__/document_builder.cpython-312.pyc b/app/modules/rag/indexing/code/edges/__pycache__/document_builder.cpython-312.pyc deleted file mode 100644 index 58298438b5cb61d3700cac50631000b34e44aac5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2231 zcma)7&2JM&6rWwMzwJO02NKc-hbBUnzz!d!RhyzxVnHS3A|S2mqAZJNVm8?iGdoV> zDy@3p&`OmmP9dTwiPQ>EkjS6Vo_grTDF<7lAR+Zo^#)BOq@4O@*DKQ`l{$wvzxUqE zdo%Ms=C@=rhG3k3_LKfq5TQQ=;}69H(#BN)^9Um>8OW51k|eNf$Y!7zFqNWW28%&6 zR1BHnV%UrnBd$JRM9o++=3>Q&n~7pVLNYpsaPStwp%vM)UQE`)naE#)$w)k|S(eQ- zrrVa23GqaJM#sb|kqf#t-R7>;Dul-`Y2`7yR5gjkcm$XWT8&U11$5c2(h}ie0V|pX zc0(6yd0Zxd61t-@;xM(Mu^T1t3?6MANZLpNKaU71N*EPo9Kg~or5LEm8HINXE56qc zs=9#*Ed^e&(hV4RY2!OEH;?AzsaKRfoRyrtlF+qW`f@RYPKGy=z6>ykhc{TrM^h0W zwP!5PNnp#3V_PcFU4#RmN&H*tY3>Ql?t7H~+Jlw3z+H4N$oBXaVdY*Qw`Y)cwK*U8 z5eKb!;ca7gpCH}0Z6UBA-R0yU-Q_(&y3>HL(7RL2`hD4)H1(Q~+w+R#Vc0#;mih<> zap;E_8}xa0$VXE{K5EZkW4Bk>)i135->>{Aywb{>vh*mj(#n_1C=)I4aMhZ&?9VM8 zs?^vG+uD-e*^<&+Is4IAJ`>|%0?DoFm`7c}M3p5ST2h^wdEGW#jbLwDnh6>VMby@W z1xv{!k5S^-MpcwB54VbqCk)LhL&?<)Tf;o5QKnC7C8i1=nIKnOUs0yfGGW4xBC38&@I9v#KJDhM0n6}OI;C0dC2jqJ;-!s5HLk%8CM*rdmb?f)3C-g*Z~d1$#l~` zhyWF#r=q547zpnX_gBaA7xRU&eBtb;>bXm2E}p0R#eyC|qJoIHQV~)r;zmVU(gT9T z1xX8%5kz!NDnh`O{MflXG!4Ze#v~nfMdD?70N%(Vf`Xl~pg)X8ZEnaz!n8MQ*~ zDN1j;$8DgciN+k`N5^Q*^dvN6dC zXHE{cnxuN&>sQ%IjR#%)MPGhrJIlH%ab>3m^8IVn?CAR5_}2Knua-=@~S!4X#+W57)d9z{8t(kMr;Tx1M$S=h-F2C@mO@vY( z%b@E1MBY4{+8cY0QqkB3ybda4LT*s0s4Yem79R-Ext&V7`&jXSqJw=E9MAHp4{S>|b6rFw< N+AqcaMnK&C{{Y(12~Ge2 diff --git a/app/modules/rag/indexing/code/edges/__pycache__/extractor.cpython-312.pyc b/app/modules/rag/indexing/code/edges/__pycache__/extractor.cpython-312.pyc deleted file mode 100644 index d0a3bc729abb6e0bd06c4780059c1733b6671929..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7366 zcmb^$TWl29_0H_f?(ExMKiB5rKuFm@*gPl{nkEn+0h4S)OcK~6oh&}0mqe4;`6_X+x7qaeAPtwB?o~VK%e&oKvS#)^v5>Y&th$7wKt&tm6MUoPm^TM3Z znM-=vm>}%jfh&j5obX%1EWNDP1?k zVNJ~{faBIrr=I@$uH(=Y^=#hI({*HtO_rg5hpia}WJ~?_SpJg-HJ)297stutAn#MIBC!XAOBc zl{WHp(i9XeZJ5%iYNYTK5;4h?WEuA%%cf73NAt>f7TWCIdMdu)#Uqurj*H)}gxW8@Qt94!VepEp zENuL&t8a1V?XD*;9G+Hg3s2GkpvR~;XrpZ^Too-~RT~wT!d()QE>L~J45Bt1a(0>) z0MjWbHBe}-`YUM6ks^PAA0b1e=sHMdgfy>_H2)3=bxJ4-8D~vh4Wsr3>ITVA`1kq+ zG9^w4hV3H=DRM>8vE3IQX9u&Xen0A|{$5(_7QK zs?7lz*?mLPHBd5BJckWaWXBcrn1ZfmhiL@pnoN(!mgFg&n&}V*E6Ng!D%mmyO9m^#=^;RBtGq_Na2~_<=~amx227haQDpA<*Aai z?q6SeNY_zLN7-K9usQg~2OK?y4^s70ks5ukP}?TQGsM~NtIs3oNX;)0O$DxHc1wNL3%yiog0tO|@%mw-^r^(dBE$iw0m`Wc<3>V!7m31a@Xz54;RL9aA@NrsBGi15YRj;Z$ zoZ(HlVgmqBoUZ7!@Sd;Iw;8H%mCakGg&+Bt%+s~K0zMiHe2J_66B@uL$<+9Q z0lO5rRwnBh-V_h>^$x;bb&$LRyid7+W(&hrIFw=rU0+ivx*W>TvgvZvW4=#XY0uN(kAPs3QPNKk(NfP4|rljRgt5h>|h$wCue7QYLwrTNL5PSW8eBnU*{TjkUF8^&D)yzYY=Hl8!t)o=am;zs_5VegG)xsELj!+AVHhwDC|H z8(K)CZXV5~+6Djwg6ynYme$Q5zawq>|1m%h19>_Kpkc4w)?WAPleu)=h63OaorNYHNqu$7`OhGf$Q5~tS>V3cx z;1Nc)5N#ngYwGK;O5YEF>HJD$%W`B(Ir6n>&u8K8N+43F_513ye$T?lqVem=>yt~M z@Xvn%3crtgSlTt$R|5L~o3tl59dZnX19`9I3U{)MsI@DElPtP^2KOGwjc`{@~Uwo?4XmH5lc@s~dtD#wqNhTgmrIDtofvc*wjlwpRIgy^=`QMWcE z$EQv4tBL6vhGR!gFuhmM^o&|;E4mC+e^xS>a5WVt$8Z@*iC>;b0{rdn~h1R=Wy>lmKPs}Sn`OcSw_Zr;v zp}XPe{FV~x*;($Z$PL-qs>{k{+;E$P z3p(>1F*|Idi?0ub>>vvrjlyNw6NWf_D*zUqF}Ui$~R>K`L-~HitD;+&>YoD38JTWg^^I!D?nh4J zE(9#PSV(WV@s=#sd8H!XI?r|(cIs9+x1$M;CxYwtf4+xW7@G2|`bb#c!qY*JgJ8!X z#~_A1-l%!Jq5!WDg7XXqfzSKD^E4&FUP2(}rjluI8i1}*^NU3Z?tE?t%$_3NU|R5E zbUEwS+P@?5H890B*V)$WtS@>fuefuZ;wg%jt!m^W>4x9>zJtX)us2Z<$Bp49zVU!7 znr?h#%jN%$x@`KKx3*l~l-MKNIaQ(EFctGtBt`M&MDZvnN{eDxp(rEkQi}0_BFom> z8NQgo!rf4rt`XIssMV%h&EZRz={>DZC>p$W8FUwpdjKP47?j<0DW(F}%NL3}=Cu+J z_IdVY_R#~lPGk=w)~48gaHBc~R+f&`QW6#@3f+xv$hoh*j%z|7gbTz@8++GX3ttVd z^ln@3-L`n-x966$mFE)6&m}%NUw-b*^6nEWyH73eK2_eWlzY|bV5I^5rE>4i>EPW+ z@BG1QgI5RVpItb+7+v(=eCp=On@5+<-s-vK{iOX*yCESdolKR|O8KZ-8XPV~M^>V_ zPFGnW6BBbL0{{@3pfQNW|ya~+sF8fxb=&}^O3;AvDM!3gUHf*yYbi1N+ z$=T%H{tfS+UoaL=+&o*}xToB|_il9E`)@8BUwrltJ-0ee%imV>3&Zj82X1RN{?O1|W&5 zcW?Ikp|xnW$aZVA9tX3tRoo_H@1@lh-!TGkCmigdg}GxEz2-hzrBF7!vc>l?EAqgv{U2o+^`R4#B-_aIAlM}SWe-B zG=f0@4Pkd53=|@b`i?iTGl-Z2aDm+QcU@85KXC2v)x)>_TOcCM?VjB|op6R)9)U7i-tlsfj70(+eWt916x?zNvDI<}SqTPxvq z7TMsMffBKv6!CIi2;pn}Ti^t?4*+X1W5##JB> z_&#i5UP1>DJc0l-G6t}xe-pqZQso8lv1&jR`>G*M++1}tAd36AYRD~~i+K`_;wtoKESd zv)U;ZHmq2%8757C0>Z}|)WYgb>?=NKQ z=cMloH{tzPI&X8`U-5qKse1%K)kXN8d)WPIorhch1p#os^BBiPt~@jM{Ot4pAlPP1 F{TqBM>o@=a diff --git a/app/modules/rag/indexing/code/entrypoints/__pycache__/document_builder.cpython-312.pyc b/app/modules/rag/indexing/code/entrypoints/__pycache__/document_builder.cpython-312.pyc deleted file mode 100644 index 29139ccbe79b7ed88143a64646dc70b8fb90b58b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2093 zcma)7&2Q936d!xNpGjzTv!x^?>C&==CCwU=N|m4jLJ}b)6cC|@S_s#yCmSdJ*p6q@ zEaK1u{{xk1Z>Y?f_G?9=v^*wvtrD+cJ;mz;8H}B1xc_035 zXsAHoTX^-e#nOcQj!g0?F_8A|0C+@9VoEk~Bu$bK%eL&Kw3MT0ij&sTPDaZ(SuN}2 zv|OZ5*?Fg+6(X$I1J0l}C=r=lC1&~|F*93o>|Gn`WNW!Uk*P^yz;IoU8{G0-zm^e$ ziyM|n-3GmGx$AxIcBe(fz%8S>;5FI~b-Bm^bKU4rCh~xmy*6u5kww@tT<}|1bUEv^ zJj><44O+g=sn7M6!B-n`95L+$CGC}ge?%zJB$H^enKGq^ik9lgHARf}eI@5#X=FyS&TuN`>*sdWCAo%7XPj7 zX%6x9nEaULL&|m!KqTpe-e`{(5*EAUz~*kRB2lNb%(leEfq%@IYES zmf-%n)q7j89_vdJ1j$o=$nlAU=aUIqt0btuf{(*)cIdgV_kX|Kv-B497k*9YS!S#E zBFm(fT@smAhp&3>Td5+H`5Oz1wVcR7RkMz6nW7LQjy0cOVTMD$_1L-?W?q|9-D7&g za~#7pMR66VO_}a@oO_;)w%J~xi$U9Pn^5i@+cQitWH4^67!9tY*IHUAv3G8;Cgo_T zU}uPe4-&51mP;`pGeQtt+KyUHL8l_)$K96Z7Pl$5qMKYOKJ=Z)Ig}fw!40s02KH-3 zhB;?hAYvGAsxL0xzV+438`qX@FSGYihv{b{Nb*Q9YYY>{Fe~gRk^v;+NUBJ%iEwri zk&j$1-<(^jr62@qudov+kDoB=eji)3QmMS%RKN5o^Hsy9o9Y7H&|Az~qYdus8#Ah5 zRZM1WP`6^VS{2YVsPC(&XhJqr5UP%6wr%RG%xJ2XYtl{2ZK@5=q-vC}_%PM%4JiFy zJR$0>jz~xN{)dbIjHCl&q#kX+>-!2+_IG6Gy|JCrSXi10N>kn9Xm@0^TN)2b(?Myv zTb>Ndr-Sn8?UCA(;*;~?)a796^7fgz=f&se!}+_x{N3#<`gZZ_o#L_Y$HLKiFk1h$ z5T2b6&d$FmF1#B5Bpg?RakV>nI-HyhCTF`7r^1PI!Nj@l$$EJ5QgHH8x2lHKxu80? zbNtkk%r65^2VNZitXnw~R%V0BZ1=>e*TwwNBl~4iuKaW-tX>GJ7oOh_uWG?nZQE#u zh8-C8E+O}&1^EpwH{{px0zw$ADAZ&Jg}Ce!Qg&rfjd=3@$ED%IE-B>;d+-=!sg{ZI z$*_6Y86-INM21n`W^PnlFrRa}?n0O7x+v&+oF>47y8cbuuwxDT6zrZ7HjO@}kl-|o z2>SN1Kp&EQc_dwk_n>;Ib_6}HwBa!D&ajfiDAYo|R||Ehg?ht-v_fn7{krTIeH=Mv zR?HkUOo|9Rn6&;*5!D%OT0TsJ__o!9hH!gk(GA0{NB^`H%jT5DO%mN|29E3B^lk2o rINXcub5P*q^s&EoQ<5aTBp>}j)rNUnXNM!#v7pnC6 diff --git a/app/modules/rag/indexing/code/entrypoints/__pycache__/fastapi_detector.cpython-312.pyc b/app/modules/rag/indexing/code/entrypoints/__pycache__/fastapi_detector.cpython-312.pyc deleted file mode 100644 index 91effe964e57e0ba1d82c5fc1aa7418c20958b85..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2030 zcmZ`)U2GIZ9G|)UxDQ(T&0T@oUQ3{N;vG~JY)Hk}B0@wXX!NwMOJ{qx=icr)yH|S6 zUf`h*ec++QheC(}qlqOokw+f!NfKXr)})&WJ{cZ(BNSuO81+AQw;b{@$Jgi!#! zg@`zhh_n)@YiH!LoCx0In*?TCRMWH^)zK}}hOKPp)R9+S1r(Vu9a=70y6H^S73*`u z3f|ZW`z55I3??WO$U!XM;*3B<5||e=Vp&K?toNvDJ8u;Arm1nw(WV@Wj=|9o6SA7a zgks5IV$rf4CKXj@D#v7^8C(uG{BoBa@CgXvjWO6Qp)9HhZeScO;>m7=Dxxdq8^Vt- zv)B$`E-SgxIGX$$BxP65gPkYGN`p`dy1_h;?TJC~N+TK)=mlOSeHMyAG!DnA~IyA z-KR8H-~?Uy3i?{gcQvU#A|cFM+PN78W$xWQP_b-e&IYq6K zqiy2hO`MnuyVFpxYEgGLu{$S~oavViF)`;jMHXyuSg@cuIg8kdFbiq?i6}Z@kvek9 zMU920sanv^TJ#InUNf#(RGG301=S?1BL}mgQN=D7&R7Q56`|;JECPP1qZqoWal52} zz?n)^M@?*H5u#05RE5W5Gs&>dYLrQK(a;?hQr?+3eeB)wQ%t6|L-it))nXBhP+oJC zcMTS9I+QhY$|4YGPMalqRs$9OmT4cClS-gT6A>obnlVjz!dbAc3vP8sE7;H^YQfX~ zn&C%bG0}vBGtp6XgGsfc+q{`T^ifX||o_j4Y%#4a9W8A|*q!(^So-b(3hbx|vP$!=!5$Q0rE9x^YzsX*8Qu zvCMl4?>ut@&uvMmx&(h*_AYpG=aDzKYeDk1^=+W;aOc8NueX1_H(BjX{@S~5`OLy` zuW!!-)Y;m(81|wAOXn`0TZ;}aie7Zb(%i+lYeQe1yGEvYjJ%& zZdc>>TD;^9CA`5Gy+q1O?psfeR+FP%UmS?*LkFru2fX;6@B6>$2Z@``E$8RTPnGKH zruM9sN&zWZe2(f?!;ehnc-;nkujETSm&YX#h*C|{OTqt2m&V2X~w zbRE%`Io{8wpg)BG*ex*4Bi454{IQ2(RO+bam(iQ7sFHpym3Ls>Lu02Agqhh7Q*)jnOe+@Sbh+7I$C3 Y82^q2@1pH@(c6E?+i}kW1XE4(Ki@(V7XSbN diff --git a/app/modules/rag/indexing/code/entrypoints/__pycache__/flask_detector.cpython-312.pyc b/app/modules/rag/indexing/code/entrypoints/__pycache__/flask_detector.cpython-312.pyc deleted file mode 100644 index 229a71e1cb008b147bbe6910d96aa62ef6551822..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1553 zcmZ`(&2Jk;6rb^a_@hbde3dH2ZR{YLO;s<70u5EgDJ|_K7X$}GSZzIHd)@V}GqX

$`2#inI1}DK4e$lg9da8l6YVu7^nBE#K@mb-O{g z$I|V|(qj9!WI~ZLoN_Xm(q%oGN@}58%gyOu-<<8enVaqzI&);^zSuJ~5XjH?$seRR z1pVom`~LpfzJStych1tlQx#7m- z(cpO$8OXZ&Jcb4zUo_@cQy0-BwM31Hl8A6eXM3K3N17kle?fLeG^ z4oKEu3)?oM_4Q02_YVvX9hns~e(+PH+cWgO=>lJO&rEHF#g+czAB!IrU-XxjOHXD+ zF~`6RuPEOus#~=Gmqh7bo>!|sWf=iwLNPS9R`0jqvC8Rg%ff-np1J^{0Et6T+swsP*h#T z2{;N(k4A)uoJ=L75jig02C#4&rxF5|?+dy*uM791`dlib3u+QaBXbEgsrw_f6`3n! zLBejRO~0A-d1{{0XvlbKf!1p|jnMPjW)_${ijlo!B? z8zSXx0Zwd}bOon$HKMCZ7<_MVQo7nV+)^YJkIQLImF~|)byZ8t5!G<$SWaqjSyzoc zSFcZmgHrg~NNDo%NciGJ$k;o1Wn?rceGoi1aV;oaxgHt~OV@%1qh)Rx?y7C%TsU~G zVQRsurl+tfvIeWE@!JLiVPLQ%4h%pR5J0 z$w~fn)^OA{YHr`Q(DqxVPFS1v2*e_)@a-RES8f&9uid_~yQ|=+@EywwOABk^&rg^6 z{sIgA4Zf$u_pH0iyx;6EKUjM3&qIMSe*%W_T{ZLG7i^h7MKnh@`0f(ly>72*-kid_ z!3!l`_#CD@R^*OtlB17o4S5pUX2Lvx#wyYYz%06zRyy%;RcBq6jo`j*8$+{)5Q1c4 zV$M3UQA2XL8ohcePg#LZJr-D$rzX)eDkQcTuF;9HpacOCBH`gWckwbr%SiYF>G5L| z;c#$Fx;PdLnbE_Ij*JH{6B9QX8o3mN7H)@c7!W(@I0U80;=Rzv9wNM^B`xc4rb#Pq z@IGQA>6r6wKgfE-9|5cO9*9NswYTf{@vkQSdgCASMbC{N5aswq;e4fI|LWkA!L{th z;S;69Cth@wJKkFw`;GzQOTMGv#0Ow(bE5hsSho7T86hcD!(YwFs7`2*#B|7@1d%ap zznZk1VbgRRO^bBH6&g8QL8xw>@Jz1jjjcCH@neA0eg*>Ez`K{TOWC!KHKk1AP%QCc zneQudedb<6;CK@Jkl#8s>{!(^IEh8ji1zAXkhXaux!v8b6HPbnB{l+h#%=*yT8I)( zl9F;ll_aB8lB$UdZI>k7&B*bZrA3mIR78^Seli_7U`)3944Ese?%hGOM0CJkbAxz@ z{>5J1WF5Bd%}&PV{;`#^9j^``un7FEVqJw@pxSa3+7t?|y*IAIEGu%DXMZ6 zyzXFs-OvYMZ8r#@r(-<@_OY|l=_#-uH;Grm8Rjw{Lj#`Eu&@}kwwK?+)A~~eu0*P7 z99s`-7|m`UOD@$jpve~hRIif56y=Mw6~XLey!&}FfkC_3`EERv%muLHhZ`*dDh}y`td&CUhpC& zPkL|~ag<>*BMTEhh_(i47+mc_R`7rcyC=spsz$y6zN>qWJ;nLdPis$f#r@Q3oUU$B@UiJ(wT_ALN<|Xeb z@HL8|O`_}lB{ON66(>&`{^Otq-mRXlVfcMesr-mZxu~|VmslY+ZkXw;3Z5#%Am1ov_w*g zbTqDFxFnI$dhvV+9zdfblRz-= tuXnr{{WJ5o(c+EiqH?F?n=8AcMYQK9yPG=xJp%EQpQpS(AP}a{{|6pmcJBZH diff --git a/app/modules/rag/intent_router_v2/__pycache__/normalization_terms.cpython-312.pyc b/app/modules/rag/intent_router_v2/__pycache__/normalization_terms.cpython-312.pyc deleted file mode 100644 index 8ca67ec1c91e0a85671ba1853b1ac33efe36cbb6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2974 zcmaJ@T}%{L6uvV%v+Ux+s<4Q^9Yll?bX))0qz2;;X|+nyqAw_!tUIGFF1z&3ECsS8 zqS$UDDYP$`v=423sMZ(Kl*Avj&rM%uLJXTpn>6WD-;^zB;#1GLGqdb2=zTbI?|07K zd(L;id*Jt)nrZ^$w=eD`#;XYV8yDUXoC#Oh1(O+~5|vAm0j`(h2v0sBDnCI~-vi!> z>g7iSS^NhVGH0)grBZ1lW+c)nJ?;cJHt2k~f&r5mqLE%sCB6K4aut64E(exp*2k>C ztjMhYE~i$hfvdb4yvnK7-vxSo>N-tOLr373)H=0hLg*FMdbJk5el?mA88}!G&*o1mP)4*@mMl3s?ko&Y#GV0Cd^s$k@>`&Enm)+Ev=j7 z%iGJLvc2YfIq=Nr^||>FvaW=zua?(Cs5Ma%HD^9r1zJEr%wN31R{*#0BH$Ii0=R`20r(xaq$1Sm!=oC(z!A@&pqnQ6 z%%^bZtXtgcolxc*oKv0fqFhbgfHKCd8*mj&Chii1=E}qayla5t*#?XNei@lx0pSnf zH(b~92KaT$1@{(FCLk}wr4ZLHJE*#dkbW!*MYfC^3AP_ z%?GXKgA2`vbHek0R6r8qZcD{E!6wYOy9g7;9ikPZA4Oa-vfMDI^BlC*etfkR!(;n_ z%XJTt`EHxYKDr+wZQm8mu*GEhGmXkTJ%EtNNY^npNumc43Ki*x4m#SjX4R!3+hLQw z8w^w)u3HSZTH)5kaJv<5zjywp3$vFNJC0f%M;AJdErgGof#dWrgq8`ZNX965W{6P~ zidW7U2jVKF58`mViGq`)4{l?O&vO0vUMohH_bB4XWJDlYu7}XKAxIW%9|)hKrfvUF zESb@C+n*U!V}=GaB4_j{`ozni7hT6Il04?BKtC~E(?_?hNt)}GV2h3Q2aq|6e{j7D--o#!EM9VXm7#&-(uCbe6KCkcjSWkaO0iRR(Q7=*u7d7sBc!*AWUXRf-o7tymGAdPCV&=44~^> z1iHrfF<%zskma$`tPeaOj4^>>0%DUvflM}*ih*}@ASMiLK$k`L$*_J!Pr?p*42&%> zDPX#w1Xm069az4GoYJ*FuNQah)FW6>QvUd$H@g#DZ&u?zMx5I3FFTbgII`y)puEl@-L$kK2 zK>458K4hJqWI376!7Ggv|a^{ gIHh*dbKt=CrEdfSZ4}cW{v<0*3ARA1;HdBLDyZ diff --git a/app/modules/rag/intent_router_v2/__pycache__/protocols.cpython-312.pyc b/app/modules/rag/intent_router_v2/__pycache__/protocols.cpython-312.pyc deleted file mode 100644 index 27aae31ffb4564c5888f6e22082876c80c76edf3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 644 zcmY*Wy^hmB5T3CeW0DI;1p=Cg&IK3gYD9ZiMHEO#rdV0=Ua(~En%y{< z01$5iJwhu{AqqOAKywu{-lVuGzWLdiZ+`acd_Dz|&V8)Ekp9WeUM9i7?J*gbP(g(a zv{)dr9W_xK7coKvCs4%~P$e?{9EX}B876u9o1Gl}tW-+7($!j7a`^!PY!haa=Xb76dbE#^>=CiQgDoNCnVFIDv315AkY#Q& zaN7BlVvDznl~&THM!Mdp@s)PS#5lMRekw#5kL&{>UiD?eD+yt4G0{ziLxwp+x(7CF zMsNY&pTGE)ybMVkUeTS2^{l6c%)>|ZsT;alZ44hKuv}-p${vR?o|wCo!XIGo5&Ve} W@drHo1rPqFh&8@H{Rgbae*Xb`@|cMm z;*0W2OHzyC%Z&8$pqdg(GV}Am`fjnu$0z3G#K*5>_zW`tmkH1ieW)S&KtuG=4bd+I zSsxEGDz!+jpz;@o4MdAw5hu_PMj$R001_XV85tSxGI%}Umbt(s+sIzT4ip3cFMCVw diff --git a/app/modules/rag/intent_router_v2/__pycache__/query_plan_builder.cpython-312.pyc b/app/modules/rag/intent_router_v2/__pycache__/query_plan_builder.cpython-312.pyc deleted file mode 100644 index 038341ebae2da7b8cf4183906ee25c5f9c8bb4c8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 13479 zcmc&*du&_RdB2zMr$|bq#D^qHmScz3%P;vIr?%v$EcqeD4<-&n>ryr)l5)+HsrT{yDz*S;-uV$43&OL}Vn+!>es)eBkT|*?l2FLIa5r z0$EjZR^Pc${8%U&;X-n@r*kAe7A8Cum05O;MxtC8Wh%SFbFHSF#tzPMHUqQ491_>f_W$;_IpRQ~w~o zHj1k)^+9Sz&XCJL62FuBd-1i@Pg66al~_KT`k)n=8YtI$sgL}c(JCkqUkA>Q8jvyd zGx4gJOubL@OEW+QnMSLrqWoI}WW5jVcwf9EUX|xK0uwCc393AowhUK($}o(e&T|>da1|s4O`gkI zhD)#H3EDiDL&+&=S3$p^%X7KPaG8}nL7(UHC^;p%3atv!&|N*J48@W1)#s#p1?ERb`qbIb?V% zX%LSSx}oqqdbRxp9$>sZ6b)Z!?+T9v&ykTK09HOYwyr%CY2Zj?EF5ouE^dI5fiTav zW5F5t`gX`{kBxAn(JhCN=X0ch=i9=iU6HZ>LvnPHL{&vNd&cHEVxV zpKe?Wua@k}^>Zt`=Qr(7Z|X+&rtGTc=2jh_-}yp%=W)zfLFISNuliPc)h?=FS?k=g zJ@ae3(rfo1Lv41&rnwcp^V<%lxAkI1V|Mxax#j!kH|WpY9{r9p05;iLj|}faw!Xqs01DGF+(`xmpnrSXebs4`hs=? zNR@(No@uB60wq$+5H6J^&ro5B7YmB5PvD5trER)7W0i-z9WkxV|G0GPe+Gm3H zA-*qp%6^qjFbRft)OYgzIcWyj0>Bj&2s*(is06j35w!1U?&SMy(!yy4!x#f#298_8 zr|=isJ!u7f1t?U?0pzWMrSMG^z_YAarcipRB6SJ|M3ree85fqu#fb*SDk6~4-zcxDlYIkBqnZcutzunBgd;vMsy zys_zH{FYvc87Npg5W!Aek5=*}Ai5bAr#5qH1;b3T0$Xlca}0jk1(tx%3mkbrRjC|* zITks-&)xtp`|3&!Gp_n;^?CNTS~Bk0e{gs3@Xr2yl5rGp44k$LiC$QOn#A}ySatl! zC>aRDyQ*!Cqzh5!md6Sj8pvw+d1TxUNEW_uj_jE5KL$qBc(iSgjtqpN{EoH)>t>MT zn<4pk=69EvIUk>T>Gaf|x4Lh3-`XbDZk($K4|olC0>54o0Hk;JHxZtYlO`nkVhRBx%v}g)?1*(vFFpE!JQ z=l1>%KO!15Avdbq~+0t_Uk1z37s#oI~+(9ESId-1YaJC^XU8&7$B%8 z-$i~Wslj(+!D^ve5;;e3%1S!f?h%~hlA&Nn-Bd;1xJl}0I4-F}@o`d*`4z!fn4Ad* z^ED7VW_p7p90Q9h8&34I;nN`@FIGJYfqg~eurLr`oos4O*;JTaq67;^$1yWc?? z@YO`81vNxcyH6SDR`#z-hV?sy3LiH$({}$#SfJCaGU&R$Z z3&%mS4MfACIDC%6-;Mm(!#sju!TKr$or{u|&bNu`^7GJ-(n(loU=b@Bn`f?~eri`z zoppIKu4hEoGZ|OA=xU!)r(GM8rcZ62se!j5HzRKjXFava16ij#<7^h4%^Bx9(YbDB zYudRZY0TF6GBwR&O>?GZgIKd+rvHQByTMGyL9yfD-M)0kk@>!3spElk-;3#*my(wI zZXZnK)F7Gn@o6`ow9=~EL|0qJ)gih%W(MxorA`m0TpejwG-=9u>N1`d(bJN(*s>OP z)>5Cfc(V2F*(y)Y%6MBB7`@k&tjO7!>bhxT%H^MP9hh(3{mDSO^#DkF>oeXhqIb*e z>QCZn?+ZyAt*upbwcZ+iDTtgrr=pX%`RdX2-RYbLRT2XE}VV(k0VFGwpYW zQm$vxu9LvyuFbfcMRzl8P<7Vg%hohPYqFIqph2D%XpqO0w0>o0?4GQ>3JYr*?^oAO zolIA+!Z+`#th4DWo560%F$SZFw7`fAD8?2+rC`uE!!X?_i3>OujFzg5(b5-V2Wr^L z@u1-?gNfzLyueaprKiSCF&;)R9vW&qb_hC7OQ|h_f!_q~LWiI(=L!(NU@T`i6S%_Y z!|BRPa(dVWF@O=u*RB{2Kz63AtDq8$6QEJy1A}7f{o|Mu*on~fo$T3l=pfkyE$Sr* z^JE(&r51zifQ*TCkFC+g=vKyPaHyzgH0olh7eiBnZw=oZzI8&Z@0hDUHoNlU)(>0n zZWFg2OV=M0>tYYd^C0xc=?&5WRsVszAiTH>eDSB+&A8kJVBgT0kZfo;DG>AHvC|__ zsj`q!G^e`0jAt)E-M$d))CTepCH5~_0bT1~@ z^b*5@y&$^)^h>bek}(oL8zvF3TT9|IY8gmBh)gVd%A5-T6F&pVCFUz9tbndENP?Y9ZwC$=6&(BI}YgWbl*61{ZPi~7oC0zi4H`#+UD%CmYkV!tzKYsE>qG7 z0Bx7%sc>4dIF~wRbuq*0!f@Yf^?aGLWL%hz~#~gPu0LvkP++ zNC7&qWXV%D8e$b7nbaim5QOgI6W~`XXvuOx)5W}@8&I8L22`iO>w)M?HL&vg(Z&+>d=xZC@&LlJsR}(5D#j5caB#_D5yDKQv$lv|gqU`jmx#le+UIlwbD*h{wfPh#0D%vagL8^6`KR z;sF-p0q~e{x%c{6y276T-R+MrqoPY$2DkqNRPq=c%Fe!f@655O>bHD1eYXtvJZnVv z-n?t?@v%G5OiOAmJSb@gq9Go9cnCzmqn$90!iGl!lC+7Rqx0)G5>zYcX!RTg97!7; zIS>0!xMxP9m>^b>vzTDFgG>X`)Gwt7L;X!1#WG$pAsosGMP+cmD9+)YeV9B4ay(8^ z#p#qIAaWeCCThQ~Q@)LozlG!ylXbXm)LyU6I97;`71M#VV@*e)`%KF=XJ|doH!_#N7H5-wmh058DF?xTkN%Zw2P-H)reCeaWb- zt=Ej%s@my2b5*OePVbGL>pj!{d(M`e7K(B@rlua4j4jDMS)1#Pi&rjAolV10_8oe34XKw~MW6Kvh#!^jN(m$=8-*oWq3->nlVH^6f4gH|% z+Q2oEyqGe0AAad#ssrr9FDseq7g!!cpP$xrF4O$nqJi`mYJ2Aj%`co9NDCV{2v-RH z6sEi|@EGNOW0+DY3k_fa0b+fAnQK7fl80l*SXf?_u*eY>mpqe3*rL!=SZNaU<$N~5 zsMH0Ex&s!q1{Sp*AkUPCJY3YKqGuO#pJZsP&V$!BPf>h6?+;#img|RA1PL z!0iha^*edN%)eR$kOc1F(r2i!!K37W$;KYVu~_oRTQbG%n;#b7R%!X9MX&$>X}k<< zmgt5sE?x3~hg&vZFhg(q1asM*EGwbZ2_CLl20f_LTmU}Pc?RH)B7^LVY=oA`zR7N& zKF4|VIa(^em3Xn}6-QmZ4kx-u=>#g^@}fx9)SQ)f~w+tV#)AwOL^l&%?0?#sFxrYol# zr)ZO$8QbzX+w$qr%&M*8s;!^+#Z}!|yC-9B5bX`qu1w zBV}+u{L(>D2G`Qhz4k7H=I6~CNC$8#C=UVwg_geo0{4b_m7wZ_B{8YSK=KqAfJqHl zc7?y>mjXs5glDDt^5uf2I9;zc6+I--R0doWUI2nE-#}kCdJGW2sY<51Wa!>~GT6WS zXpdhb&+6iY#wiEhcmw>%+gCVEB^~Vgj7Af(y~2e-=bk+0UVzt$=ErT-6E~62XXDZT zzQlmd$yRxjz1bBj^OH_zTwXHiHjB2+$^;vnw?6|D@V;%u^syhm^!7{hwsklkEtPNd zTFE6mh#NR+s$!t8_>nM@EQ}=BUpkVd@*sr| zj7k}UP=2f+*C0!krh}SE@Not87z1Ot5yr5b->Fr`86ZqmHb^g>H7C(C?PCb;wc{ou zA5IkEO47q#9d5nKag{p6anz0R>*QgkK=h{|iKk-WI2~k3jqrujkB)R6USjY*;eLFm zdslel)I-3x^r7d%c-*5Yw@{TyQf`+=DN}~+&n$^TxWZ{K!y+uR)1)i% zB$+{$(_J={<gk}hbur0+b`wHtTn*#-jM-2ca}4dB|+BN5mr!Bz3w_4N78^SuxgQC|WL z#S;ReO^+|K$2Z=~1V$pL%97$QRpjCO4u`Zl7l`(p-j*A`J zshl-I$5O}bI;iT+n=;8BjE;;9^TB9jI84uTE!R}IB8@qAw`o-yCv1aXD&Dac=+1M>^?7q9_Ul0EB zV0z<8$V6)=GsDg(Sf?wOI-)UmYZ#n*-qjNw+8l9t}Kk#Hs zW1n~+ktbu_k=Zeb24gp4w=UkR-zwG}c}NJ9mjAGoP*O7Sz>ea?yP_IX)|UyU0fSo% z)au=4Zp)*Kw>QXem|&29A@K(s;d%TTjELkBo^y8H(p@_?mH6|QMQ4}1-|$+6;|as` zdwvc1KGZ{QV2yvcDSB_o2l$TM8k^cP&Ar(x`d}!20L7o<`h3JbFIn?Pn!$sII(Hr< zyCBkFL3gBE*eS5`y-a%@qH(QJv)zf?>^cG7jAlYpXd+v_3u8c= zb7nZDs!dsHm7pd6W~+ST!j%hCRX^}dt1@oC==P`G%^CMv(Y-e9UZ1vYNNVWT43~Oo zVBXE8U0l+1zp8pcfr~w=9@SU$1+tvIs-)q*w+>dy-J1EjBWdpu*fVxG)6TA$6`6IN z;=0axXII+M1-_Qsm-Zc*b!N647PlOp_Z>;Qk0h=4ef3j`wufG(J9Br&B&O z(wrU{iOT0Me~X!P?Ne$7Uoj%`SICNB+@6#5v63mrDT`GL^On za@sD941!c=G1nq*1ku(~q+HVOVx0(_69x$UUc_b-ssfq8FFIRjHqFJ)^jF}Gzj!DX z4hG@+Cf>7v8-qYwg27iuLs7Yeyp57S#H1OMS1{?vGewoQu9lvxi>p7p&RKs3!+q!Jan(VVJ+4Y;UJ9cF^Zq0UV$!^{b zY0l-;9$-InuFh$Z0A3*Vlr%7ol{q6NO^kbO&P+)Q)3`lnrDO%;+>oBOswnAXYS+sZKkCXuw8kl-wMo;NC=I z&VdxDt6Hc6YGJckTfN{lYO8bAZctfOozucEsH|}0^hn7nk+NWGtVls$*5+(T!53N= z96)`wL8bLkgrp#xI^G&l+f05gf8<07qvBiXk6b<{Svj@q{LI%->pf@R4CVzesK z#&0UO_`%m0n(dB7Zdz?^=-^gm!u{F*r>GN&FehaNBo9xz9L&5Vo8_ycC&f9MXWS>Klo IrgSCz52TUT{r~^~ diff --git a/app/modules/rag/intent_router_v2/__pycache__/retrieval_filter_builder.cpython-312.pyc b/app/modules/rag/intent_router_v2/__pycache__/retrieval_filter_builder.cpython-312.pyc deleted file mode 100644 index 8d931a60186c9bfb80e19acae8fd24260730c8a7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6166 zcmb_gYfK#16}~h3e!wm)yI$THZ0wC~z_DYK6g$B@8pmWIfYW4Scf9Nju&@tuXBND8 zP^{Eaab-1jUl6HM=&uslRozDW;Ks@4^2#PWRh9NW? zVWYZ$E~*dcqlSPXY77{orhqAG4w&h@E@FvV1JE6t4R)& zB#l1PebVtUsx26c#igJWj>klwQLX5T^TMDY;jl0rjP!;hl7L0EtScUy27)ddg4Kdr z(H#$oPb~DjoE*Vn{)uthYY71-J7b~oI96?g!c-h2O2S3Sr&CMEgCZvhqQs5HLkUs! zhD9zWjKR021#KJ)Zzo`0b;Ar@h=mB~z;jZ3Qiz4LZE3AedoddqfmlES3NSnhusp-F zzh*4xX@9(x*Ih9Nbi57h1@_%(EpO)yFmK>Xcq6=xd?{~&w~2S~W_X*E7N1k~Y%{^B zL^#3=ST*&$G0@j}+7Fhuiir^}3|5Fqq0Jv1k+%i@VH?cG1VgqUBl6z<$gFITjj~=g z-C}MUwAnec4BH%ICif$R>!eLnAS9bX#^#!>azKVY=M-b;mhR>z#}EQJ`b{~9B~y+E zq!8VSd3OMIk^`3l7e3;FLItA%2mn@9ys!0$;XH1*LIL48^Bl4IdA2li?UIs&+y~ zg0Znga7bj!y_7N#v%VZ4HJScnkp@ zYY0wFHNZ?r5XDw9F$VtM3WKd+*hEASTXAr#RSOFa#}j}*gdgW1i5sPu#EobH)iRY- z4V0d(DIRhybe6c7s6cZWWj)AKweH@Va_`O9U77mBnYz}Dr#`c5ch-hH%^S$*vCdnw zrO58OK7DH&a#jLF@ai%lmFWpRPKQsjYu#(pQvbk-nrfYkhoiO~ZQ4 zp;XPGa-$jI7rkP1PMuS3XzZd}u|^=8U&y-RnzveapVvKS+B|fGYRg zm5T@0tJ+dkZE5%6jHhZLej~m#wwz3Rp3hWPKeQR0)+{nwtQ)W=6w1dsbja^d@nZyt z1tjIsLuPW(hnXa^1s}GKvr--@01lDNcB7jhhdep%Ii0M-EYA)>YJ#}Y`w6Ob^_}hR zQB9})lnCWN3VcMNBLvXKfjEO03To${L1>PVnF$!%{_u!E*hL1r8MIZ+2_k9RlT+$f z%mQS{YX|ix$^1??!}wU$e5U73Zn$UgRX+rqUP?|0m>`mBfXtQy^%qigGhd5jhwrvM%lLGdASotwf~pI~ zl0H4&O$KN%Hjz#dPXsOKdm`9pH$4>yX}Jp?*rb@W_3Y-ZQ?@I1(#rS z0ga(KBhSp4;0-CN8=VKIowLZ6qQ5;m394Y`nhWN0GC^GK;dL~Ye-U3>CWi$4G<|T#i z_+{0SfHVg2eNh^I#I)Wgx?$poDmqDDmi~brKS$Q9 zC7ab8*Vo_G*>|6&Vslr&fB3ZjY>&@^4-qz_7*F7kfLmw>GMy0PRW}!j$0tQD5}p)D zN)u>GSB+Slii9P#hJ#WU5C}?xu*C6U40$w;lUikg>xrbYV2D=8g;Kz0*C2wR!@kEY0)18HfA5OII%~POdt9 z8K;+Y=dR8z*;X9~GW!lF&OKyAzA7&rOOXYhg_0X3i=!Vz-jA#~4`dv!b%zfomYaWn z@WX>^j^iu6cl+-2DFbh%I^N1StJj^4DQDx-vEO$5ren?7mO1{y%IMw5ok;5VD}R&L z`@^aJure{VJ~5q|m|p9jx&HdXxf|!!-TPDS{mZW9VA|bwyKL2cM45YMzE^d)7n_%j zt5q#|HU8n;o81N5$a<08qf{PG*^b{iqYMnM54@ckcw51j)&}H^t8Ni5G1p&I?2Vt= z>XoLWE7sMfQyEv~V&mfB>n|ww+D~m|Tf6rvys1;eN)^-uCs(UZDuHvWl_4b}jn zmW;!@SiZP>ehy5jfiZw@{vi-a!FV1BI8U%zFz`&Vb44!K&*=cH^*k%KUc_h+;poY9CoK-nHMcueZOFYJVl&-nZU6TtgyY?-!Dc6B{bH-7AeSH2M#a#E4?G6L~ zk6E(eZvz8AVGH&5JUa^JxMJpYPli4{2GD?hERe~DY31Jx#4nkAD4VrVz6yri3@|GM z7@`5j_&+4}YXc6|7!Be{0pr)8vuVA{n)PVh^zLN6rzFoJkrXG=-OzlcRqN%_(&+VL zi^IP-nJSmGlKe-dWl)kQNcE!pu|c`3+=l;;m5&nSSWZU%tgNIiD<3Hzr`}aQ0cu5A zNw_xWK2~nS=xyaM$|uU7l#hIDA+mCgLUZ(%UB0C4l7#o{k?*j}C@_koEQiy_ld*Kq zQJyZBls0j#TuM76#Vk>W@%x;(5qKV1$aTS6qJ+=mCekmX{Vi8`=kXpG$D~xI2NG2W zi)qR6$O{*Hk6#rw$PNB@OwcY5NQ`SY2!tZ&FC}nnw!7H1BQSOsxnzXl;@u1F_W&DV9gL~_pm=WC zye4XaYoeCz*FsT^KM&^H}xJH;SPbb7FWb2B&&@1lJDZr1+&4 z-e&qo<_=A(lXx7KFz_$>pvmeOhWRII{8DdX*e?-joQRoaQYiVQF~~3p<_kn$bl?92 D8rRLQ diff --git a/app/modules/rag/intent_router_v2/__pycache__/retrieval_spec_factory.cpython-312.pyc b/app/modules/rag/intent_router_v2/__pycache__/retrieval_spec_factory.cpython-312.pyc deleted file mode 100644 index d1fb8b8fae8bc0933773f47e19e87ffe8c63305f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5482 zcmb7IZ%kX)6~E7Z{_~7&u(84BPk@9#3=EFvmHat zs=k)vbI(2J+&|}>-@P|~vDqvHz9+xhi2b*LkbhvK{P7yY?Ys@leIgNwi<1Nw<~Zba zaa}?m)-zro=M#pof$@CYm@tJ+33J$-5W+&j61Fh8AzqiThOHdYk<&yn-X)Uhu}&Ky zY+Et=glE|BacW&8nM|c4=~ybMK+_zGEKWsMWD2~4F&8p2T{)SF#U&8(s$)ErT$ZWA zEM~z_R_mC`STcGoMb)~Hyp#f+w0tYA+Cp-g#^mKle0E8Wg3G3g;8ZN0mTAdvRGXPb z&DsyQ^EFKPK9Nb7lSo)6>#vu3s+A?~D)z8#t(FtmGS*|=EyY&J#$KZbY!-R&2f^9< zNqXkbxmR8p$+d4!Q;iYx#k-EOO!c{d=LO*1o}<7j@x=A8ogP zrr?V7VTV8jA~hk^{*#&|`&~oWDb-6hsX=l`&JXx2P*$}=Nm(K8J2GXoODi)WbKP?V4|`NVN5kmOpnhZ z(|kG*41~t!0wR-~3QeCEQAxGVgr?61#^=QIle6P0&tyF6sC+af$to|UqKax>l#?>W z;x;YO)O9(U4o3AbR{29Hfi|}@1I&Grt%~;* zK&7CMr>Lab#W;eIctyh>icweV#j6ZF%2JR_(jh6daS9;(vY1e{zj~Vs0&T9Np}gd@^);YiM$f|Esxe2Q-OFRKx7tSZGc)1>T&Q8k-D$ z$g2X4+!WtI_*R|KD%2Jg2HTEZGFX(XT9nKcm?SPKS~`yi{tEEN!fk|LLb%EGN>Fih z?aOjmeff-8HG@tiq-6~PiIO#Cb&pFus{&}1$9b+quA8bFB^JGB%~|0i?s3Ut)dJQv z0I#OCIjaMEK5NJtv!;)9k4q!0)}`ypV}W-|whnyOI5M)F7t}t|m&cxkstfvbs!2*E zBC({RT3G5SVj{9ckANy9@F4t@Qxc;PlNHsZrKF#J@iS>r+uF-Zn=YNmV&2k+tZ)-^ly8H@*eCN$j!Wwlae{l(3U5) zW-B7 zlJ*%{^3a#j^c5hgP_a>sT4t(7Dl3_ITEUY@%L^?jUV`?1pjJxiD5xku19FEvbv3VB zw>=|y&&a0d?5882jpSZEyX88!CKP)6f4BPE)lV+wdq@A~m|MU2nelVq=IgV+?8!Oi z){H<3_3q93;SXHv(!<1q#Kx)oftR+t!#VTtw_odta~=*M7~*4L%*+3t2T}nskTM`+ zA%=sBommoh1C~pzu*KNF=bI(z5=;SX)zm0&KZH#u>25&T(^u1#vrW?9C0YFhDW7o_ zZ9`RX4Q%upAeKZR!o}?Q%3iX(#En8UlB^n)RE9=nXzK=FP>m&U!`kfZWNG-F zFp9U9TTArB?bm7|)IPX6I2unyBXQ-#V8sCiw+iCpzsP^?kj=JuF8ucT#fO(4T;4d7 zZy(-lpZ~P!Pwjtb|GYo{%KTRQe7-IIt-^!;&-(^A)mA!##i{A>u_?fIlQ=bYDG-8M zlVZ`ds*faB=n2qP+r`SJi*HQMoe{MSD62cFx=SA1;x6YU&0XcoApJPFXOOO1u0<44 zSxH<;#lKg%!=QD0;Kyv%HLy_L1p)wXC06Hqmp1DT6aeT)-yh9cJD$3|>)j6r9t>=` zdjZ_*-0Q8Ib=^Bf_`_?9=mcJ^uakw4$waBcg}ZTimT#OSt|$%~n-?&YmUIy1(ixgmd9?5~Fh~R#O;d_{`ke#e@^aOacY)z0#Uj=Y z*Ne#Y;YgnGs%sZ}ESD$3&R(X-qQ$s5w8JAE*1>R?NfC@S=h%N+V8g>~7JTL^t><1? z;NL(arr(JfcNz2tI+cr#5#60#_&7E#o0x4>IPxI9MUS`WqK zRvXwmBM_VmU7DGm49?A}jZ9L?+VQcuv8n0Ps+$QX0)QtIf#CQh@pNcx=8Wppbf@P- z;{kE}%zW@1*t6%!`RR%IDUg-y>$Nw_7`##@!NZ%XlL=9HZwgn2?H=S zdLCDe*JnC{cbK>rvL~&)fPpF669!);f~69ogv0SqF-O!DT7hnfY#m!+G1` zNAKjUzTF0_)tk5VZa8w*{_mN;n6nP1u?Vees56r!muX?@p z#yh8rBgEbM-tmH~1xR<_qvHi{$D^j4=g3!Zoig4z18a1(6dJvSLq`jqE)X&!JFz&o zh3>r2{pd>0>?`VZUSp1T7tOon1;Mc`9L@{4A)sZ@9|o;1c=qhF-mS%2y?FsQ%G_Tx z@$F#aEjEysUM?ITEt-smv)q@>{-OaH2%vXFli}F*9f3*PNK0Gc<)0L~jucuBebv}z zuzcCjSTw*d7&s3VO~{!^^TDEkoRzqmi#Fu!r2Sa29=Qh6)=_jI=Ok`V5q%V0#L~Ru z25x6mZ#Y)8*bObrFZ_aE&@v%s#t{VMV4Z#6)B&fZAtqnYXU8hMngI-gillh_svYp` z94tLM2jST{h?jW^PfKM`PG%B{R-MCpwe~(v2etPxdlHr(&)Pe?_Xkb!eHd3LUi~Ou zPBlovQc+*|L1REv?VkbnyxiG)p4A+UqEEP05bZ2Ck7~<3L1Q4p`-p<|ThwzL_XRol fPcr-k3H_ZUw@C5}^47nN365*|8vePI)3)+|V}Bqs diff --git a/app/modules/rag/intent_router_v2/__pycache__/router.cpython-312.pyc b/app/modules/rag/intent_router_v2/__pycache__/router.cpython-312.pyc deleted file mode 100644 index d1c763fb99acc21f2396ba546f95dddd6c1dbf8f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4382 zcmahMTTC0-^$vcG9~eI{1Z;u(>ib8oMQzhZ>EG~iz5l`q$7o)mSS*!=a=uiQVH&z!EQ`hRbxDxr z{BmBTPi7E%y;NKmsjRa-C`tM324EwL>-n5m%!&r)rjRX{C=&W^QDN=r?c76AE=eG_ zulHf8QWojm(#i^8ZCbEX?<256vBa*|C|;}N zrJSz6|Djl>d2wBk9<7O4)0C{SVdH5tUd-MP0C-76l3{Wr)8i(ce>r>S>?oXb zGB%{-oCoPSSI!1B`v$|Yn%_7_V;fIq(pk2{7Q6^BhuQNpXiAlN&d45ylwoF!9rIl! zd>dEoF}WOFxXjHFQni^}?k-$y$*SGt0*5t5$BHfsS9O?NK?~Et)z)8inp}}CTwV)T zb(vg47N$d2+lmeF$Ta7t7&n@i&$hjgqUl;cpY8BNeoc2o>O)eP{}DO`zXo2xFBxt@ zQLh%_spT5{vf-lCiG(08n*Q6yAHcy*eKmkh6EHM=ZI%bI83IxXDA zE-iG_A}x5t7AtZo3tgXd?k`-k+g@hFd?i3(Xg;K5}iE@exE2+F5^E}mq6XgvkxwfIPJfAP- z%RIk1c+jJh7Qqiz$s6$ag0%WcY_b-;(%>%DxhvcD275wH%-0h48<+0YFWpDPm^v|6 zo4C_hxLsekgNV2~K3f~V*Ol$_i26ZE+S5z-ka`5MWm5w1dfVzAbw@VA>(nra7u) zwNtCEnvm6YfS3q)Rhg>2>ew-LFa#t!1KyHshr>ZhD>H97K@Q#d&{*v|gn(()iECOb zeh&NGa&567k9$8fR>Ox7Fx4$)bIcD<1I$)kZ+dpj^swbFw?nz=0*wPlrMp_>+A+@; z^tnOqL>IYkmbj|!)#0PORR`c>UGR3)zk2d0<&AB}yc<|Oew5zz9B}n6x&S+VR73d# z3zxIMAi&eb?ij|k^VYwY#= z>F?Z5KVF0~+6(EYoG(^H9->;*f(NpZj&d3y&e=6L6`mQnQVSj6ld=5LNmy6&$dx4s zdu#-Ll_J#@_o3{EvCw>0`Bn05p=I#FfXCu`7&ZB8_e%*&ls*p zb5|gF@mSB(P|%%nsY0_N;CqtiHK$O_J}prht7JS*`-Pvhg_yuWHr_-DjPI}Q@?iwo;szVpM7#eQUb$ltYA%LW_mv74JlI=+2MEwx- zt#1#*%KCoh`-!i~#uYaHYWVfzx3?PXWi>q53{NQGiDvkm5BaI zqBG6tMJ0Ms4GgG(;bvf535=_OL3KFsRq~ffb>cKsIW_u0GkRW$o^SP$*uoxRWByi% zjEps7GfHfx8M~;&ba{&ngqy=jWjOiQ_yoA?pEjHK1?9fbm{_XEms)Nz0y-Qc{`VvO zAD23aVedBe!Ln_mx?0Al(so^ zy`$4I`g@BWMf%`phk9^}iV1r&+N~S6I7W~o*7e)LV!?d8IdJGJ!Xl0$(X{_z$M=Lu zN1rTLXi>A{Zn&Ownq%q5AfwqJ%5-nvJkhy3{ky|b{s}4%b$oAFgquLnLyvP{Q&bcR zBF}3c9#bwfQULpS$g6^6Q0N%)FT&$@M85$&Bq$bg{ei8i{1rT2kd~87Pn)DJ(x zC;Y?o-1$~8;P~*H{;8G&-oSHmzU4xQB_kJFZiGA}HsA6hAg9wnwI}x83pm4eG&{{j zaJ$PDI9%8+#bThHg;p|YwvtI`C6h+g*l#71`(3ip)n7PXqQmp79$#<&FCHs;DC4&K zdcEJDIab`t?fb1iwiDW^V+D-{-S|*Ao*OH&Bpby*Pv)3Cwb^4=*{?P2FC6{bXZ~2p zgO#a$Ea-%WOWs8Y6NOQ3*~`YAUZqa}hb@3S1&@}EVVGSq{txo$E_t*|GP@+bOK$#+ ZEGuMrmps@d-~EsC5;O2`0uNo?{{b_)Z7Bc% diff --git a/app/modules/rag/intent_router_v2/__pycache__/sub_intent_detector.cpython-312.pyc b/app/modules/rag/intent_router_v2/__pycache__/sub_intent_detector.cpython-312.pyc deleted file mode 100644 index c1dd93d7c260c4f778d44225b637aa2489b7ce80..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2635 zcmcguU2GIp6ux(6w%xXrh25%)Qds#5V@bD2gE5j8v|Z8^R$!~vQW&Q@Q`oxQUGL1c z-KHj`ZBj}IV4}9snDE#JOcs^60#+YMe3@aJv`qBL7kwkvMBu@A&dhF8T2SMI_u=fh z=jYyY&-u=o{h_k5oWL5oFddTxLVm_galsxJUEBtAk|;!>anegWC?y;@NEB|2DEt-9 zHXb?_jByJUAkL-N+Ctmn3*)*uY@W9r%~5ciHOGx_jhyIqtY(dC<~j2sxPvhL3_9L0 zvc`=7cxR1k_FY*xW5l@{ZyGnQ8@J5Sv=5BUaXd0$dliwIHzC+B zjU1kxcB9`In9rJ{me3tf_QS($;RyJjF-NSDR7O`deXuN@i0J`j9sLCi(j18vQVX>q z1WU(b>HY*}T!7-y9t!M=HADxf#!)C`4_L2UR|lH=IvqCooD7e8JE52eit%`}!OlgJ}-C>Ic zEMk>5w;wrlpe1aTy?&%QEQMMQHCrxBqZVDB8cf638=;UbcjxH zedJ?02|aMWTp$_pIp0rbXn2Oq@D^8FXO;BI>|K>vg02qe8Xgu13_oPSH#C)LK{>7t z1e?@8DaDdK0AEe&dod`-0t$=usfmD`N(Dd@RW&V$ic^5|AP9rKNhKXuwIGvE1!Fe+ zC6-L>sZ$AizlOUTx+OZGWI~o+EYO8 z|3dB$lRGt?xxVR8R=FBBYdRk+BCS~rPHz|B~xlb>Qh;lRb}rXqPQGONKT$Kip>M3Wiuqq4{!5M(HpJC8eiSw{Q|C64Kz|)dI;BgBc@5ON>N!E?YHMy*H=N zH@2IN?Z(?D<{D2f_%ZfYrgLs*=YntZg2%rISCXYB z#m!Qa?uX4doh14a4$o46I<=u*Y-{u=tkqDD5RnT%0%J^z4dYH=mce){!gzvv{4^+b zC`^SlFcruU{S@eDyh0{8hg$;wb^t#`@QWP7l!jsImutGrbge(8pB8!M1*s)q<()zm zdciIedm5C3dsf%zQOG<7o_5V&0`CGmy~^$SOZAhDA2eRB&--@X@r9=4tT5e|Jv!Z* zJDSsT-QOR`y<+SN<$WR3t31$b0E@dY?oAkBg=CL|H=B>W8kyl(0AxJVI?Uw>3@B0|155C0b15W2pJ z?m?c0;lXfoyp`-k`Vba;0( z93M`{y#zX(7fZ|}Id{#EbC;WA&U60XcgI)PQ2j*K*vZ*d%+UWkxbMWguS}38aA%i6 zI{y56-`C~LYVI(Czf#p_?Y)hC;BMgnisdh1`^hM!-^k8syn7*f)qVS9O?GK?`ha$J RqOWB8-QpMN(8%3D>u>IT(boU~ diff --git a/app/modules/rag/intent_router_v2/__pycache__/term_mapping.cpython-312.pyc b/app/modules/rag/intent_router_v2/__pycache__/term_mapping.cpython-312.pyc deleted file mode 100644 index 926800fb814f49a226a18ac53f8ca63ccc675aa7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4258 zcmcH+TWk~A_1^LLmDuFvXTpM)#w;ep4#_U1Y&Jkcc$5%Y9=mGTbmV#_se@yuckDo1 zM*`D}N+f~(%O8uF^LAIt_329rY{R6U6TfTbEOl*Sj z78R*inse_x_nvd-Jny-GaylCbv_Jp&di*0hA)n)<(s*M)*WQM~5)p|=6J&~xQi@|P z!Hsgzn-Zoeew3$#BN8{MbE_~gdXc|LjnSxuBS(m6o+qN^Cby2W&T=8^KX4MFT4OYs zOr@jgcq%E6z}$6Qnmr@2sljM6m5j%tiFj6G86Rvucd&aj+MQMM-O8_(m2P!Wxvaj^ zJ=PU7*c#Ajbad?(FjyiI8KokDzorvZACwiQaz#Nfqv8bj!|B8iypCg-aKj+y<*EeKWY(uVk`7k=-Z&TiGI-qy?wSR)UIth zl^IH+)F-0T(-PCnu|!msHOrKg{$5JdY~z_^3^k;gL}?t*DKV3fH0yLUc0M{GY5aH` zrhHnG(~s?$WIP?fq2?4*vCNc|G_Hbzc3U@`-X={gHA@UCcO;;A30`^d0q@LGn9g1-JlN#-@|N^f$^KV{!%X zmth6Xr+f&Mw}BGQP(FcERt&bR6&6DdW`&L+3kF_ESR(>Fk)cT${*Gowv1Hbah!zA$ z%21Ax*t&DUn1EjrVj_gD?S#P+$O> z^uG|N@v@W{*PKtGWjrVlczix`R+g9?i6*3rkwemqFwIhvQY>|CPDJ9#G@u2R%A_TR^w3QSQ?MwVg5!j**}{FU4W;1Vfs>AJgRXf-lej0`RC_iP<&fF@5V3stTw>*t_~B{D(gI9*{J z#5|p>st4(eR#D!ZDP2|iq`9*Cq|ccuS>O;En*T3J!l@z6Iv!7o z(L{oIfI@R@bYIOXNEgA`MDX^(gCi$Ljtw3h7ET=ere>Ou(ps}HG;(D4*y*Ff>62$q z4Gx_SS(q1@K%Tjn)*7UX)6t}iX8WSKa~+&(Pi4 zqXxge>KH6H`4yX=b$}SLjp2idMGv&2Fj(4?<(S`18`N9HP3lWc-7Gp?f>v1xzP$)>otc>PjDMmp22rL_TYB<v>i-41Zm=2YM2Dl4)ODwmF)klXxlAG~kFStESaU4Yk^WQ2#QH z^%6*(WK)M@{lBS`d@8h%4BH_YLXxc~ok-_NjyqJnp(>W961@)G*DyW)o&4((x$ED5{msJm4|e@**9T$MzyIHB7`Ip2H`D*4 zjI0;VV0!EsC50{++XL7a66pHR! zb%SP^i6%0V%)0f7oMLH744L#?!jP?IUAKUYW`@jeDmAcAOs+)$Dk0NgHj+z zXQ)iC+3JVGlfnstp&f(4$nsRP;PW6UhIr#9hFV_EB+`am%!c9cRIrL+7Pbv$Sx=22 z*022ouqLC;;j(piJR+Pu2sdeyt8n;k)3$Q6XUX}Fvmo7T?tEy5C0#z_KX``qe72+B zOD&KKjHHqhJ~Pr8mehEh!T)Xt3h=@-V?!`{Y){1H^f{Q0LB)-jY?FS0A!=7391f2` zwJ`{IhL@!-pfSR|>@WauYN&*h(J4s~v<5*iYG@cc1mXLcXu?=Ayc>mNkaP*_LJ&c4 z00FA!1~Ej#@`Pczq62(X$iD(GPwsoS4~{TAIKs6Lj&L%?rtsOV zzsZfPX*`OovDDNwyfoQXU}mUl7)My?7@64CZ*U%9-vS(FdN~9DLX6VCkZqq6``^gf g`;G2}-o<@a_bHy;#m3%Cwtrf_MuU$C0G-u;0HF%q_5c6? diff --git a/app/modules/rag/intent_router_v2/__pycache__/test_signals.cpython-312-pytest-9.0.2.pyc b/app/modules/rag/intent_router_v2/__pycache__/test_signals.cpython-312-pytest-9.0.2.pyc deleted file mode 100644 index a9bc3dd82cb8a316442508656fbdc157314f97ae..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2417 zcmbtV-ES0C6u)=&W4606rKNlnQ@X`S7z?`ueISIC57{jkq zC>ai>P>w(qUCV+Y#KUD&;I&)$n?`N)nk@%jSK8^ttUA)3w`ObsrE zD$Z_hB49DoGDWa3hQd-^F_*ETD2|6~qFGc{gxL3;N#}A$9jF$u%HCa^_ZQdU=S{fi zedm&=UTj#Q+~sM7AI}heJc9#52oEAdY;YM^nga6(wLU^<`6>wS(J3-PMyUzdFzC=q zzpDS;>Uy18)#?*6gl9ZQ*XZ49G^b;dg~z&dmG)D^cO_)uL%DQ>czb#gy+rkQ3zB>$ zPsowHhIwuW;X`_yP{8*DIS2b(q!aX-R3abIDZu%Su%C>P&wV3whIY@88K011yG3wV z=jRz0ayCE0I5SM#FB+X(Iv;=2WZaDFSvDF!!b%#{bcm%bQ!DL>>zSy*GbNUb>V-lS zENNz%aWo9DoD~OUd>9arWoDe~1My7G0=35TMT>Ea$2w?cW+10$%~)Y{!2`A{WyE42>!AC*?b!OJ7P6w1ZNr9(_hKcN%FnYdFS-i()6bJ`lzFH z{#nKvURD~Y8V~{ZexgC^PIMhg9zC7Vl8N4=){_uHlj%G?D13TuOl*A4e&SHi@kCGW zjD*-3wK!tl!~#bTay(dUUM*eT24)-@=3Zcs-J|;T*T--11qE`8&MDg_yB^D%7vxq) zZoMPV%R9jSIHJrco%8X;ywW)r>9qZwWr$q`mljz56E3l`Ey#-yom`qcfUQzJuWn5*){Sq2uooT(Zb-|YfaTv#lc8G8 zAgD^-RKV^wVTMdl3vupJiNI9xP0*p*T=6V~7=CY#{DV)x^MP3t?5@-~$s@3fJ0`0S zECQy*GX)W;G*L3qbD~#-O-tvNIg+skRY?R&dbY?`^h>nTFB_m=s$HGcEoNv|{yfX^ zop3@Fe)*egxfFHB1dN}Hp!%_%Q0D5|5Vb4vSU*AJ0Kus)KN+wG3r0!;(rg52!L z&C}cGcv&AEYjVoLNPl6aKz@J`0w1u<%{TV#wma z)J753wEiOaF-_xG2odTlX0lc$XNolk3u9XCt68i3lf`rsW+wja#W)+`8Hym6>E!C%5ewjz54nTpKCH6qh}uS)A6(A=k8 z3hl4V+z!4EbQFGO64(kjr&HHEq3hc None: - self._classifier = classifier or IntentClassifierV2() - self._conversation_policy = conversation_policy or ConversationPolicy() - self._query_plan_builder = query_plan_builder or QueryPlanBuilder() - self._retrieval_factory = retrieval_factory or RetrievalSpecFactory() - self._evidence_factory = evidence_factory or EvidencePolicyFactory() - self._graph_resolver = graph_resolver or GraphIdResolver() - self._logger = logger or IntentRouterLogger() - - def route( - self, - user_query: str, - conversation_state: ConversationState | None = None, - repo_context: RepoContext | None = None, - ) -> IntentRouterResult: - state = conversation_state or ConversationState() - context = repo_context or RepoContext() - self._logger.log_request(user_query, state, context) - decision = self._classifier.classify(user_query, state) - intent, conversation_mode = self._conversation_policy.resolve(decision, user_query, state) - query_plan = self._query_plan_builder.build( - user_query, - state, - continue_mode=conversation_mode == "CONTINUE", - conversation_mode=conversation_mode, - intent=intent, - ) - result = IntentRouterResult( - intent=intent, - graph_id=self._graph_resolver.resolve(intent), - conversation_mode=conversation_mode, - query_plan=query_plan, - retrieval_spec=self._retrieval_factory.build( - intent, - query_plan.anchors, - context, - raw_query=query_plan.raw, - conversation_state=state, - conversation_mode=conversation_mode, - sub_intent=query_plan.sub_intent, - ), - evidence_policy=self._evidence_factory.build( - intent, - sub_intent=query_plan.sub_intent, - negations=query_plan.negations, - has_user_anchor=any(anchor.source == "user_text" for anchor in query_plan.anchors), - ), - ) - self._logger.log_result(result) - return result diff --git a/app/modules/rag/intent_router_v2/sub_intent_detector.py b/app/modules/rag/intent_router_v2/sub_intent_detector.py deleted file mode 100644 index c9ff705..0000000 --- a/app/modules/rag/intent_router_v2/sub_intent_detector.py +++ /dev/null @@ -1,23 +0,0 @@ -from __future__ import annotations - - -class SubIntentDetector: - _OPEN_VERBS = ("открой", "посмотри", "проверь", "уточни") - _EXPLAIN_MARKERS = ("объясни", "как работает", "почему", "что делает", "зачем", "логика", "флоу", "flow") - _TEST_MARKERS = ("тест", "pytest", "unit test", "юнит") - - def detect(self, raw: str, *, has_file_path: bool, negations: set[str]) -> str: - text = " ".join((raw or "").lower().split()) - if not text: - return "EXPLAIN" - if has_file_path and self._has_open_verb(text) and not self._has_explain_markers(text): - return "OPEN_FILE" - if "tests" not in negations and any(marker in text for marker in self._TEST_MARKERS): - return "FIND_TESTS" - return "EXPLAIN" - - def _has_open_verb(self, text: str) -> bool: - return any(text.startswith(verb) or f" {verb} " in f" {text} " for verb in self._OPEN_VERBS) - - def _has_explain_markers(self, text: str) -> bool: - return any(marker in text for marker in self._EXPLAIN_MARKERS) diff --git a/app/modules/rag/persistence/__pycache__/cache_repository.cpython-312.pyc b/app/modules/rag/persistence/__pycache__/cache_repository.cpython-312.pyc deleted file mode 100644 index 35a64c2c700d824b48c7c81c44a3b4bc110d754b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 10281 zcmbt4Yiv|kdgsoa_jo*hKgJIR8$ZSv8wdvC7!t6}8=H8H6AWfD%)Qt%%)`0&8f<6G zq7{{l5;dSyH3%x~DiWrojU%;M=U1{)Rk5n7wLN5+Tsf*%tE$aE2eYM%Dz)Et?%a8p zG2U(ONavn8=X~Ee=lj0%z0Un-tJO^4>C67y_pc5@eusb5N2^qr)pJmpA{^nE00}bv z41;w|K+~^*HydDs+I}r<(*|@weZM|v=r;t7{l=iF-$dJW0dvsOZ()dr944IpI^hhD zGz#|qtTBz#_#^&tGP1=J3WX()5W$(#ozu^$TfW}WP**be%-6kl0j|bm`8E! z5hkMHH1{+r<^3jgO!A$W)sk#eYii$w7Pt;S6%RuO$%O7_+75D)8E7G7LJvE#s!+*y zMDMpH|EV>ORoAD!CkzptKUeKfz9pm^eWXIQ7SVIsQuw37t}};D?U#yG$TS@KKLUp# zfg^QxV=CkqrblsZrC~SYm{CU5F$C6|29Y+-5+A35Gn1vx7BT!u)U>K_gXD{Bl|vom zQ=?ZiNW7W>;LC(j!ing^<@-p)_&M|E%q`6)HZ6>R-ZHg!9ctRtIo9dVQTx^TVFwi| z&g467@41=wuHyM3?@?S<)fNV1?UTJ)64ALxHQ7N#<_b{l3}N60Jx52`Gvo^6g*M#L z72+)D@_Y#A!0gEIxH?aCw)Z*$s4g1e6&h@G411)ZMu+5+0(_&x8xBdJY8o9uUh;4r z$>a8m;SdZ3WhBPyBIq5rD0u`JM(cctYs@%Zd<6n12e*$y?7^Td83py(67HosRg#j(v_+wR)hd z!*L-HzJQCscD0@nOLtF4XOH9H8HX~RFU0Yqu+a95gCA;SLwpw5sG^mvX@rz@l=QL| zNiSrBgvjP3QDiOh!pYJO0d;^-fJ1bYIkF+n92tO;`~VAJ;P{K4k$@zdldO@ADr;nG zg49S?r%6DKBjh1wy-3Z8fahF5BPbiy^}@$fg92hXnM#!Oe#TeIc+zu%;02 zm1F}y%6ms7Ud7@W9tPfuvhgA>d51iKfUI{1!X8eP*+E{C_0SJuBj|BXR+Iz*)wqEA zT`*#s)jjMHMBaTFkcS1Q3D&^}E-I8k-70HwW?3tQufQ6)uonCcwea*vw$S1-<@$$`72HnVb#r`!7kI4nFMMXF{H!O`>Z*jctRb$zdXY0GRuEWdcF?N-}zPQi*sUs$rr8guhj z@<_#&xst`4*408wLH3IxVk^Ee^s)bb$(@qB_LX8{&3(ZF^opHS*Gy^w#VW}&Wly%p zip!=xy7kfY8xQu(?3sN#TK!hExNY)CEGy^J<2Q~k=aenmD{gzI>+S@i_N}qf^83Yi zil>Y2Zdxwevh1jyZl5*HbVVI+#Hwp4g0^V&-sK9%bpCYTOj)#I+jE1qyy&@^lvOH7 zmMY(z_0H8kycD&!E|-?yc1@SwIlok~V^)Zk?u=E`#M<8Z=J?mgAG5zU{K~L!>Rj~5 zz`~$!{&=*_{~P^XxZ zOHafqtDaVFU##5z_xW?K`Av&0N0(ZWgeB3Gjp6zW`$3Hzl`EHbLIHnfNz#mzHKnp z%vB)9R0x=@GCtd;_}f9pY`$kxrGX)ze2+eyKjBdWlK7)im&T82(Z<*-9^V*I{5@w? zmw+K2wRfHd&_?EjsY|IG?Q(VY^g51q^>$OYiMl1!VmazF0w8SMiD^vuNve+s9-r@` z$1Ay|v0?BPMX;U_y*4_)#8LMS-%8r#cSwb~;?0y%|Z0B9lfKaH~7tZ$ELmqqCzat>ZP)pomf`q)OX$=Tu0Z z3KD0+Ya!yiSqrAJY+YE&$yBHfSi6?9si157)~8FFFr=bL>sTLtjqs#mSktvW4k~V` zkc#}RODPn~^x+_;>yA#7-c+!(j`iV3h9OGjIk!gw;P%r!J)K>>?%ty(J6*j8PM*p* zt!zz`O4$$>HQ5@kxRrQIugH^Z!FOChWF6(ZoU@jPvNeq*vTY50lR;N6L~L1nNE{J( zw@38)e9r7-SVIFoVK-{_Jy^VnMJpC>VbO-gJ}mZQkqG339QZqavID|Kd&*Ao!;HzmM)fJMaM`9H{iT_a2N`{oXOkw5$Hmqm;9`~D!}>VIBX%)Dd~PD zakdRDDGthPP16X`nn*ddA8_^7wIjeQ2T%SlZ8={C6H6uMI3c8 zM}4f^5vyr_aDL|eTz9mlBeuzT|LUEqv%cu2y-S+7z^Z%5nC#wzRYhwg-C z-;Y-Aj#Y1auzzO%+_q@-JF$wo`{(bRpFJF{*cGea`DOOQ?1eo?qxHwq(AMpEaCPSD z!tTS-x+AfQs_8v<&d16(PuJc#xm@FX&_B~ZXMSApq^9eq3R`a8^OgokUi2}L*NLxt zp^%H_@Uil0ngx2UW3AcGjijP>n!DTmj8t3mZW(W~H(jx!(y8FB;Ai2RYz&ez<9FV^ zX@s`hTNjIJmx>x^t8TL2A3k=wdYXM;oH2sNoX>w!zc1?8w`kw@ExTlIUpUo!(-6xk zn9919wOmlLqA``0udPu-{c5eI9{?I;mOlhue{EjR17wkrD|b33HzG@nfcQ&9hEQBw5*# zB*N+JUeTtWbS3AjEIaO-{ z(#n}7oWQOIERehcCf?*c#P4=>pYCbzbhjTl-F4h08^NlGSA5bCO?b;Dw|Y|`P~=p# zqq-DML*X=2)hnChxoU{Asm+kBkWvo~g4=u12RUi*U`K*Mk1(bv<#!RBBI>~!E>Og) z@3pEnS1}4ScdcZr$G2oqwy%u(7!iI4#Wk{$LsQAirB&1WqNO{Y5wj`##?i_4n+2)K z_%)ngBlbSd0l*~(zKA!HMv(NWN%MQlum9et=*@9X9tY^+Jubt1I zv(El(q4e$8w(Z~UUg+Z%EBNPDLvG&hSraHd7Uo$gA_XPS2y5zQloa;WTUV$3bJf3S z_^RO-&0jS~iw{B$yRLb%9kt_a`(oA>Sk%)j$6}Ua+CJ<0vj1WKm+pt|`Ju=8k9FT= zb^T;OT&u7#l6HxWCzomgKUCo300uq?fR6(vSiIziWGbU1(>Ru%It`q+j2G2hBB`aG zyi6%UH5ue0PQ8-ifp9?&msLAkc8{Av;cbdh7T$-ojO#|Ei`(|XM+1f-k2nG;kpGgHbA|=@kYLWqAe(NXY2t2-E__HS&Y8 z>bJJS+xDf>ozovJl)N#wW3G4Z&_dB$Pm2yN79IR{PqgTG)OO;jt#8rR7qz{=V0>S= z0FVj&3Uwe~oU-LmNuex5Da)kLf=$rEj8`Vg?GwZfg>W^~6u+8j0xAhS*Th{A(EWF6 zls(f>0B2J7iJsB8J<~oFv=5ax$C#K(vKqx#xlD4uFQhb1%n{~(p=N{$b=>W zxz&iqMUtk%kJGPtk_I6eCaHqqB0@V12W4~&UT_nK7iUVi#3~v=ci9sd;RQ@HifC;T zOst1Lhdv-O;1A!wTThtb)R$qF*G7v$Gd14@y`Jo!M5QiByp>!;>WitXCm`SLGsGv^<&jl!N&wm^kV|n z1sCx25}t)icsRT70A}GZ6hGpWKmHFq!U3o`b+QgTVBauY*Wx9*Vhzqg53~;ld=fa+ zz^lZW4PuWO@5tSh>3B;FP+DjPuE)g=tvpAAf! zzqggf@(U-A#w>+TEsjMCT&O*<)XX+KZP>Tiuy5Y`q~Tz!w0io$^o4~|=j5@(@a?Tn zx4*Nv{he>~quV=wW9ysMJ}&sR{a5yXDgO)IO>WA6%l}#6yPWDJTi=4Q?+@^z&ekvU z3lAE!zjT&C3C0!U04mwkPSKjI7kFtz2))b=z$NQh*i=V6(jNeWm;|6EZY#p0iBpi! zsALrXUV%c^c0qC(fWSSA4?qq05(qCiA`a{n+|V#?qBBA3fbcma^C_Tb1 z#DJDx@L+)&SqbFuSPRHxp$dx&SiFISMJ=!*V*7Qns;SZytR7*`Fgp9nWlgcJn_1D5 z!jcsOtr|(;rWF&dnn}s#6$`Cqk-WkcE3IY|bM~qYtE)R%-5KVYnbnoAnsvI`=h;Tx zdyFzYPUy7aW-g8ZyI?Z{Y9d8tnZ*wSo&bEE5gb##2q;Ze)PiTQ3B!H?E)zuM(w}-w zc$Ssx|4r)-Z^AHDqz;y{`E-K3G`1j$#ygw*kBWE^PR_6z^wz#R|_spN`QoR_~2Tld4MFKc_@nn_oNU+0QYK9ok+? z$LHRA&bjB_^Ks98U)XFG0`1+zhoLWAgnWe^wdqm_wcP{AO~Md{;z*bpp(w;PoMuD= z|5{EP){W?tF&(E58%7Ki(U6mb(O)Hu;g%*PWyCn6@fiPu9SvgB_k9=V0}G9UDb_f&1C0~F)$h!*TK9N z{`E6Dk5P7J2_Ix*Q6VHo`I%sPo60(RfLcPR?cXTN#HmS28Q%d!phz`_x|N=1G;vLc zQa4MHT{*P{Imskyk<;Q-Toc#cO0P_j8RF3m%pUCN?e87#rB4jLc!uT!{SK?RuJHj{UL^aj`j&5M%DtDeJ+<#rBej>!-3f2WO%f)k)39PQzFab>B;s` zL|}Q*&!kN!cyzK(V7UvjE*OnO^B_0ihruD-G?z!9Xn57LGDg94oW|X{0*0-$h4zE`Z zNX{462hXm*GQR%PiMysy*3>JKb7Xz&{5r$0j|z89B20a0s@X8r%ri>^YdwE8b!>w) z63n)n0R|LLngb8HN#a_*b620pcoW*1(Y&wuG5(Z?S0_+2M9gRx*Y%LM^+C-932Mg5 z3Av(=>nBm)oHl978G!DuG}kJ1z;{Kj`tKFP584+5=8xW2E-#rxQ|2@!Qgqpo64X$N z#+Q|tIhE`ByT=UOHPA!H0^$V3P}jgKEk48rk4M9sVR2cnbZ3Wi1*;DKy<)1+8U`K{ zbSlgYLX;O-Muz_>KFG>CT$sl*@ECb3lGzXx1CXr@%dsNsS9Ie`a7YWG#Fqgk7y)49 zLF4T><$?(0W-_q^c_a`SXN6gB{*cN~jgo{v0eF+#D<;Dh3&=OyFt(NHamhOI=yXmHfA`HEQr;n8 zBz#s>bNrZT$JMY0hLwQ+B?J-%bPu_%8T%uIk1npucTL;^25cB!3{`=c0Wgh%83EHG zHcbiOp5x?-DQ@Cx8Mv_~GuI1pry66pO5&y-qRLc*Zx*H*Bf<#WhgZxHikUD^v%;T< z_Es8WQaM9}F~>FUP>cmMv7jb^7m4W5N{buv1s7AqSkq##w;InMLC&K;z1yaTlO*XVH`w zpefIysep5>NS|vZ;FW2-3h=5lUJZD43J0tPF%i>%(k3w%yN$eY?yztMiXtrA4JGu!={Wf2@=zRH_0}p4?^L ztIjj~-?x64RXU0e)nH%~#mb-uf20cdz|fhb8dA0ofF0#Q+l!1G1hA zLG3G>+3Tc$F+&&6)M3A-Zc-Gv z=D@{%r@c&hD15AF1(Ek?WKHW+GBqvW%Orh`J}`HVvk`VW#vh&S$bWO@7Rs%iTr?Qq zgrlt)R?v?KcuoJCeETNZZ0uO0J{Vecth~I@*zuiGH2=csrXEmZfn%^83tr;6?bN_f z@8B?fYGC-q>}NqsUSed1qC2ZT_bSDXmrfNfp$NlHLnj)6f?V{{ne+A10bUGU2n0pH zI1^*Nw7>@OMdziV(0~_*x8QO({~Ff#NF2Q!VR>Mlfr3Bm4@SeWXhd0v3kaego&})` zA(jCGF~Gs;3W8qsLP zUxX8ki2O_}8j7d~mwNjs>ZH$5soPQqiR^jz~?-7^qJ@kpkESd_qw6iEj`~$s3dBN~*$To6OmMid>)nsGZ z9a66kEqH@$+u;GSG3@}dP4!#l++;(_9ps{{NSF1B(PewC&1KsTlglMJ7KhA^CX;n& zG1-_lm~44yFIlfFI}FL$%0`4Kp7jTWU??P89-2iqsj(}YGe(j1icMr49vggxf;1+Z zGj@?JidmHGCYR)xNH%9IB%5PVE)<-B0G6%lLEytnHsStJw#UjpgGXxH;ZJ-AjPX7M z&m!nV@En3;2)Ym)N6>?y7l2G;(|Im>9`n`gw*@^T_X2qIDOxx`)jz4-y0;yaVA2)gJdYIZc^M=eiT6&YSyh?0=^X zPYONNCPl6vSR z4a8ah!J(z;mH2Xe?aZA6Qgg4=a3X2MITLZ#&I?OVFT9>KW8XrYmGjReix9UGXXDbj zmC@zVwKl2gc+!T0#mF$d7+;95o|5)Hy}9@7?UqlypLp-QA^FZGOOV7)oHg?ki`)XY z+Ah@|PC9U~6qHzMU+G-#T(e0HN0WPSu#7mX=g%#UE{v`=OEm|RP8@U*XY;D*W9vuO z^&=;xmcFDLN6T}RsldTX;@p?o*ZSdJsrf{*3P-C^>d=yVVKiBT{aWIzN}tDG?9-_| zcP#uoS%>|4;;dV0SmHM74<#FLppn$pA^TR7XJur0WX*I(yxY{DsBcne5_H4T>E)6{ zooA(bxq9`YROd_7G-WoCsBT>BU+742^HK0^_3v4;83LhEK_>*{gI)%K<9$cF2POrh`dr4SGU9)t2}ONmw` zDjzsF_)7e0R!oh_2A&nC_=v0?czmGol?d?L+ebuEFBRqZrG-a;U+o0U>{rRQMyvNF zEmZ&vq@p@$M9f6obkdBNg_O|ABE+o3QoL;g?7r^>N}t-bBFtk#Z7xi~&OjR;KM?U} z0Kolri3@PS2{t^Fx}+=M(_CvxZJ`ya`c}Ncc_`5Z9zP5z()e?T;gKpjKQMKs7>@Fz oFow?{0rOi@OHtH6N&Q!(=xb8-H97DKy*NXArE__rvL`>FzlR5O0pe! zNrsWq;qTsi&L!{VIlpuGmuOTWaJ(J+!Z;TpOC-U@)bL?^mXCk>%02#9@k zUqh^l9E)|SAy;LNrMkZns0IW=MIU*C=<+S1`|tbQx$b*&SA%>k0As=aST)oR6_kIX zMnSN{TC>@*G|Ol;O=yO6&C+Uh&BTUe(QON^$||)~+FUi7wB}9BFQVHJdJMo_LP=H7 zN!7Ou3!tLzy9B))i322YB*UnGfC2*)9H0*Ok}CbbpHSc|E(mOj8bHEVXn?QgX7%{r|VBs-|8 zO|3yy)mBv1?FJlC)%Q2Gx;GM6)qU?oRlg)X+~+52rDc;cv!vDOcIkC`L)~Dlby~Ab z^~U#0nvv6)af3E<+Qvo>MryF^5)Q1=rd5K@l6yO|1e;RYfQby#qRkpD;bt+q(J~FI z#oBWlZ5D*vae+Q-z6#kBTaVQ?o?(+%5*2EcBH9p zBD*7HJ()cASLqm=?$39?d;HJ~htPW$B4<)&W_OWbzoih#C|9W1gt}S&Ed5_KM!;ufuVkzoFv~Prm*D`$a_S9vrV?e z_sEt|5GyzDDY+5H<;r4tVJUaHvh-#SBVrIEW^Q(XAwG(HbQmwioEtBNk+Z%%e|5RM zn47)0j+PfqSMmTGZBP(x5p*F?4V?i8k}qY3K41rGttK#wWe4ast!-MA;fC7&TC348 ztb%MyCate9bVe3NfyTCkRwiolC9`ALsni(NEQ$nhbNcXmpBoNNfwK7yh!4rv(e%eZ z|64TwFq+?qo^*&3%6@KjBZ*J0-oE;EV#4u>sZ39l$C6HjOr8GyFaC7nVWRRl9*oAE zB#DlFa^?1wJJDab4VS2l)X9K{5R6o{Hf z+ywnG27m68e+F=uys%Fy9p%M*vLkimj=vM=1Un({&(P4{V5a|{e`@Dol_Q;L`K{OI zm&%8{bEM{CdC7Cj+^gVq+~0~LHPI~&a6B4#9YMlImU~>b?21uTo1?sOYFD#TROX||)YvskI z`D<^Dd^_*_w7gJu-;bBB@lL=GBee@5mV;PuBR}B1MBDGaoMBMeGT#Qc@bnv??t`Fh?(8ewnKSr1@$KDlWi0tPKMf4@%8-G61e5I% z5W6Tm20A~V5g%ma`FvnNFz_e@lM^SHe*^d*2*%g(JukuNzK&oBeM0$fWU`K&dFbdT z!Vg5KgbyUbUy5wPiuToY(I6JSN`7?2`(DcZLin|?2zHB4rOi8eFKtQ{tq9s9-EOgb zwfx%B0WUo&Nfr-sO)|xi*M=sze3vXU~9#(y^ zXmn#S3wvD%@)XWa0%oUB@YEe_K*4D=S4}&(Lao{w)X2P^v?blBSp{idBw~cwB5Q4# zSe0Rfx$zaiZw^f3nWxgYH?jcwW*fxQIXoOX1vxx9dAInRBG2J6##I2~DnXLz-$uSl zobHV)MY=`*{6#nNKsHWt|j>CiXRz>Jzhj`gp~y2=scneAYikH&xE}<`}J^Z%lmvO_}L_?r%_~3 z%%UivIEMn?v|Geuk;RVp1?rj~fw)C_zObBiW=SsJg)8vX+UDVnkX diff --git a/app/modules/rag/persistence/__pycache__/query_repository.cpython-312.pyc b/app/modules/rag/persistence/__pycache__/query_repository.cpython-312.pyc deleted file mode 100644 index c590c356d18c549c8a885e0fcfd871d72ddb1bef..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7880 zcmc&(U2GfKb-u&l|35{F`k`fwWXTe}UdgunD@%5?6fJ8lOO7OOVtJhjmov7hrAY0} zIF{65yA6zjix^nB54D5XSO!fK1&g8r`r^lZXp@J&h%2Y&4jf?7AVBj*ueaD%=tIxB z!=Wgfwy}L^Dd^0(_nv$1IrrW<_k4H$#p7`j`2E%6zf1kHg^)jB!T6bVhIw`Yn7c$E z0+S{S%pAiYZ%UiyOz>pW?1FjDOzX^P%Yt>zN_k7#wqT#LGsHy3h+w@%1ly-3UE`c% z*%Y<^2@6q1b0spFtddYt*^E31WwRnKDew%!LrNqS{(~E$w9G4_v>-#Z^O~seV&+;Z zBPMlqI<@K#=Gim7=eI=j9?O2_%jQZ`xXaz)t}%5JFRmp?P0rbdQnzz33iY$ z3vR)2%RFaUW}_ahVLEZ`yJ+LIxR{kwN>*Cd$e%1=#^jl(MROYVFDaTOomxmKnl+tR z7A0BpEGCre{GudYO)ZJC=0{GH_)Inf?#hasWOb(qDr%BXhLELiWeIj3ro!m4B57_U~J&CtLQ)uK8D z`w+CMR_WbqB9jT(l4-9E)uF`KBY(USAmc;h!}!JF?^ zy$J}uiZ=~{zrqEDK!ppb0r0JX`WC4A8pN{TRP`DbBtlfeSJ(RnwE=ntDGgEDs0N`X zOlgxE0=}8jmIpq=Mwp`+m?NLmB(w^Vx-(Lh-JX#QBkamGsy4|av;n_67Z%!cO#-Jj z!WbQD7-*;31ayzkRad9O7$0Q1A2@Q&io=*yWB1LwjGFDI(RPI7TGW<#&vuK!DL#W! zn~gD4rx8Bp14iri)6h8|+^#b?qb=78;R^l?Jq-Da)=~0tBx$-vlBO%rGZ#_Ge528C z`>93@EAE(XH=02@7nvb@$U!1AH%$z=L>TzH-MhqIA~%^N)S$#o65Ttw#a!NE_9ts! zRE(lA;9w~fg9!q<&+R*!G)BdvEsse8Vg}@B}9WFG>=SP>K)W0 zWK_c4p;>60++w=7T*z?~^ zh#%0!kJJ^%*%LF$&K@DX$5Adm0TX)gzyU5kIl5(?h>y(7_HLQ>a~cbkD}Vj`eB;_le@n=S2v-~&= z{r#61H#)%2#ACDLQyN}FZic0c&BAwRUyp+AkD_LGhC6(wd%`A)Q ztD1M`*`WFKL#k@Ogz1CiMuG={ zVx<|UNHc@;vc@7s!)xA^7gz~TR?Ti4y(^JdoXa>d@@+W$KP2Ta@inZ*?w-AK7Ea(b z{?V@C&CqbsJNy}2^v3dRDY$Q=;f=hl)c)pr^0V$@)7iZB3s<1z4t_lO(d0(t;3M~; zQhRs)%cT2p>gXxh z*O+_hRqLvJ$5ryTKK6GM{T+pK>+IT%jm{&#^B*nSpl8`mJRuzC-asMztH{qIYjc|& z$BU8U4+n~oQ;*!IOHD0#_Y?n~!rPnv{=DT$OK0K8W=r%d5^#7w8qdd8L#5X4Lb7mi zqxp^ecq!7e#ujdDw7i*ryVUl^T5RnIIFO$xaa~~liK4r$)YV%!x)vz3LV2+0-d*b6 zTTlvD*G38_p=PM)=1T77$L{u`yS;2;0!K?nPp@At6J~@NEDgpUMu3eoHMJ*7Ct?rX zw6=ylUOGOy{^wA8hB;X}Irgv**m0)4?6U{j|ATdUyk#HQ|Fnz5m?>uUdLi_ymY=t* z4Wa8{aQ*Y}sg2o7dDl}X@pDgYCJzVm)X-RV5l2he@9?yiS>k9aH=BZ?FGKCC!=Sw* zR0?%%1iOLV3vA~`a8H@AUBR-Igd%r`?hF-do59|VhA7nTbCi8fpF7Wf9VXu9pS=6n z(^2$vY1om?dWFk(Bt6AV({cC`%e_t)}+8y44AX178$bi89=>&T&;jy0i@qI4-Eid5}2*v|ZECC#ous*apfFslxVR9&hQ5RC61eS)jP`2}}{3#eZ3 z#78{=Y+dopk7dDvXd7x+kO)u-cU@mSst@G6l=>)^^{alU2~ghgpo+L*#yxd4G|;|5 zN<*}7Bkdcew5e9Z?F^vVZ#R!_V_xdbqtGn0)SZ3Li@kCULMz4H5n)%|KGk~;@V@PV zB^UhGs5hjBUW0mrhFxm)((HeYdK+Iry^Vl+!!@Wk{1Vg~HmsH)pd z-uoIf*SU=`s)(-^HX-8csw49vRO+rHRja9jsA@n>bwITDc_1bAfS)TB>}X{2JCSLv zcC@pC1z!&|cVa;!x8JG!MF%Tb&_EwM#p}7SQo(|U4Ol>7meh-@7)7!lT|A9xvXMk# z?(VEje_o#|OK+lZI*jB9kZ6;16!~LFwo_M{wSEWdP9PaXauNx~TWJ`{DIl89m>MHR#T{P7IkGf@ zl5Zi2AsIyyM{*X)IFh%KoC6|b8d*ELHN2i;HX11=Z;X=63gSxdEAq`9l9zFmzog0M z*M1V{s^o58_(G*%BP3}x38z?W8p>NscHhU|kGvaA1CQ*7|Iahb)?ImDskt@p*-kFQ z+sS2DVWtq@Xx@j(<=%o^5I0)(V{*A~ZD6f?BXZ!|CYO=N?#`mSv(#{KJ-UwR7$o;S|7VPNLQcB zQtPLtFUv<=R?J83ps)>GF82|K9~WX(zW2^2mw$SBt$nlYM6v0_!&tHD^dtLsO5xp= zRCRc><3urx4dK&ySJ||kiJCfsUj|!W%s3r3nsNI7A2QBE$HxNfZ;m#PwV8h#u#C0Z zs#zv%RD!t|%`$HRbC=X)nbnKdoJj!*{Wp(5_PJlpHv`jr^`?7UNT_OBVq~}j7OMHH zagM6+DT?M;rWq17PimeWw;(H~Kg$7ju3U`3mm@P`Wx(NZLjqrpvI#+!@WxeR7qg2| zRu47!u7e=lq{wJIyyf)mrr~I%z0SK_i^K0i4;drYhvbPbxElM(a^CzT(*DWdPX~XI zTx*6PuCqd2@cQXm2k0f_c|7=t-h}J=~#X(s3Xwt~6YP zT)qkhD_8U=NZSysYHTW_P$<9Ur&4f>eT7rG$!tc{!Tk?V4I+Ha{9ZPj)~pbvZb+Fe zCl$vDxe|5Oj7XzwRljrvyVH0}75xy42_TS*Q2u+!TQxh+<5e%uYfhfmFU)~=^YE=P zk=9$J3G6$A1Vj6;iS#b=7*-{_L2z{WAA#H=WjBeml^VmPJw2s;eWi}QPlM+f%keLp zBV`LR0MS~z%Qnh7Nn>-_MOioT2g@GHdP$(8?4zuoH20PRlx-l9_A*sf4iRVQStG5z zZX)3(80V>HurdZb0X~9W2XX)@gJlnb2^4Xh>ZESjhjhiKB>aMl2uW7(!7k+y5MN$RGR?b=OT%eCb;2orZfaaJ-_e$?4j zEir81gHc#$S|8m4Irz{5GTeiYLQl=DXfGxhL&U;H3ls&K8(kJKpi|$Q;gU;ARjTwu z0&m`Y-kW)!dGGD~F%(h>{C=|a>-1^|A%DS+{qqP!s@(JMW)J^@GzMMDGW}dCVXs=_DW5Q)cVB+okd~?k5*GKZV>fElb=xnXI07koE$sBBv zO|}g8;IM8OaIltfbx}7pJ-3+7=_w(QfL_r^wLbuIpXekZQIc@cJ}TYuB;3%tp!Lvx z>V{UP1Jnbpmkv@HS|1&vUT76MOnuP$=>e)htI`qbhc-Z80WEqGL3)q|pbgPc8ick3 z_=cbj(+(P@5%_n~u8(Cu+3QcoX!jj&BEl(pK6dR~OUG$1tms^eL?^5eXriftl;n^a zP3k5@s%>(i&BolL`l2Gy8e^txQ#xjWTKr7EjX7o;6lQ3bS)V;-cG{SOw!zQr-DNgl zkFAl1(rh%y@CI2vÐEaN6=~hHwCb;Z~NcE#>D8hL*Nejn>`NV0cQ)tEJFU8Ey-m zAEKW-XBG_9!RU50xx5_D=IKgCH{vY07+={m(t^`;o-66HA~U7bS`ab zTA{B+`!RbQt~oK@1aO-?>pxcRpStV$DEMq}x;z*Mtm9elWV!bUVCu7>czNgqVBu$d zN6UT301MdI&jK~zKz29jYcO-46v+}UY5OfT%+{Q+RWFe>!XhvpbuqMy71DFY3ez<+ zIS+!fei#!9VS|9O5dekZRw-L3`jDUtz->}dg7<>!!7XLHq>MjR4zXbvPB{;Q;f{Oc z89?@P{GwEJ*&)g)0&Z+|tSlQkGi`r}y4e691|!;ITAEtwGRrUNDHCu54>dYEDr7te zox*`u8CzMRDh!lV2-&gTv87Cwl*tFV$4gI@86jvrg2E~;q!4t!b}CAb>Q{2EVJ9JE z-P<*N6`ay|=;A`MQP|ADoo!(z0B;wjmGl6Tpq)XOaQD3r*FW3}PnE(`8{aR7&pc7i z{6C}#V4SWWiyguPIb}GEG7PpF#6f`eY8N0{3P(3$5V*vL%yp#L& zyQ2FMx(ocAp4Sb1OHDC7Y3dkxq8{OO!E}!5t2hFF#?51S4M?FYhJhynr>lG2QRo#0 zT7_(~8;4l~-B@^>x~^_1BPC_z7nzOO%?nSJb33hsLPBJeYC=fYzlsh{KLrx}6{Q6! zO^U8xNk5l%3c0dOZ6U?gVo{*6yg#^=WQ#`YU7CWKcBz{5lQ3&wR6wal?t1Py79b1_PO=`8<&aO&4=EEMyuZxHfGSSdXA zV5%IBKT+c1{B@6kwS-_w;^*H4 z&{!!nRt`;6iOWCqz^nu#_pYp8*$PgVg3}xH@$B!;e;RxXM=z~k`sngY8CJc-r7sX{ z8*o*~FJm(i_a_l~X3&>%Y8W-kE%sYLzJSF%`>>b?Ee0{BzCYN^^S`heI{~5yd-Xx3 zlUZw6OH18M<`yCMe+gDZh7w5Z;!P=1qg0LI$S+7#L|VkkupESD;%s)M~!n zw>XZ}Zvpr`8=fo$Pd+}i`O5DPJbCB6PlNA&jv3=Ko$gOM<(VPh?&ZcCu;qTkzI`d0 zc^E5Is|UjXFD7Y2gN9vl_^?jIT0@!7KmsssCR?K;o})0{s;S-haV=xfAyV`Q>mO`| z}G@^2H()K^VQ&ZHrTTHZ`@4ZcOJ5UN^RX8J;URX3~% zVmi}u`5Y{Vny}&f$PB|i4`CQGzlb{&<)XLf`;GLdo@VAiOS9~ozzuYQwXmfy-DGL~ zM|xCo1dXr|K+n$Wl%{iw3=hCABKQ^py#DNM0EPm9hml4k`8JHSe^c3;peGr4F>aG; zABptb6rQLAhbqD0O8;1;tH07cSQ$D}8JVtzN#szCC=sR};j8rqsBbt+HNQ8Z85Ld@7mIQhBO7gKisP`+d3s%nB2&_i0z2 zbFk3BY7EpBX{hUXDSRB&C3H1(r0OS;6Ez~EmgI((EHAKJVL8h)o6qS{ugKqS!(?m> zII?R9zJuT@07&wqh&M(p&wM_g*)d!Q&~(ZiEsk=g3NIoBQIq^w3nQC-^xqgQ*w0J( zTlN;>++qt%UfZ1+_;h*?lxII;-Ec^uIHbUkRPgiFAoLB9`mWy<}*z>O)K=y#v(%VnGt=u7(in zAf02?Fk%rhaJ1TqSQi;SSVbPy9-{WtdJ#KC`uc(Ui%_V}8d_it41I{H$S{Cd5ZT}= zV6FE2BMg{O0*XEx?LplytiT-wJ20&FtwE@`V)f^%7)vh3pw2c~GG!VJBa=1NKJR$m ziiwPjSx-FUibu2fUL^Jd8_$(>Dh#96vAwA9v)Hi>rWS^2VDICJjN+j4Bgyn$8;O@f z=Uyt(#P*~S?}<(#{7A5RokUR6F`dTfJpU5nuGr?I+sYYXhc_7oa;#c-Ag;P4NqSDk j|4L3gCzqa+tA8TbICA+px$>M$z4XpWlKOXokQ@7-n7cLZ diff --git a/app/modules/rag/persistence/__pycache__/retrieval_statement_builder.cpython-312.pyc b/app/modules/rag/persistence/__pycache__/retrieval_statement_builder.cpython-312.pyc deleted file mode 100644 index a7969b20a29c26106191f3d3180883e922b17df3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 10109 zcmb_iU2GFsmacO7r)-yh<2XMK#0d$BA>1elU>Rlwjl=_-c_ z-pUG%`XNXyHT}}0HK6u9tTw&$N_mX5Fa6lk&V${dg}XE(wX|C8jj#Qt${Yv@r@^!TPar)+87O+f!Po z5$sTEE6F|b}x;BUvNUbRj3nO@NIj*gzD9XDKRC*#rx63G)$B@FD6qL zm*NRQlvL`^CV20Ok&s2T=`*&RQca2Yd_1L^6VV5vB&&|aXzC8XD2a3NWl>gZ#pPIH zNf7xxiWBjBqz)!ODXVU5CrW&BAqmSNr{ox;%{gU(Z?qA3reCem#1dfM?*g~`BQPIR zieZ>~UaWXtlu5(0U_`oN6HK@16}v(!HpM8IpE4_)LfzH-DpRP~6;7}y=I6Q1Rok@i@a8%QKHkXu)AbUl3%gk#rNFx5jgz~K%)u9<2VZvpxe4j5K9?_ z(`|pn0W$U~GFH&xR4fYnwM!rCic@f}xCD>l_#Gv96(`Ud#Rb$S)K;5g#jcMDWc<&p zD{jTDaC3%fDpWVIO<&)pyJF=_gVT2$m#!a}%P=)h;012FU@7QSNlu}4rJvJJV0(Y! zF;Wkxe`0<^hv*5|uZ*0MLI%~)-K)~eGVbtTaC@oestk756HSQAJ;UOCFujGlVk{-| z_xpRI@t`2Z?~BP`ba62VH8D|^d$8g*7ZR=UkATBRT=hA2P+%nyy0bf)lcArfw#G(oLTz9FlA6`QC0r?N= zzaLWHH4U!QPp31UFF(jN4gQaev-aECI(nPFxm^nbI4?df1P6lya$E>8Fe`CE zWyJYgDg!%FHR487ouzF@HsZ`zv}#U@w_!)CoL+@nFYP1S7PJjbT_ft5e|!AHH;T;atfJ%H103$>M~1>P{1|lo;U0qc$dzcM*K2IDVRc03pvhq>$P4Z_=P$8Eu~&vaxQ^agQByMnQWB$#HZ zOPk@YU@D$Uh+V;XF%=b}sVIL}UPyKY<;7?cO;!Ry!i!0vt3qi}|8{$DXgUbHCJr{q zOVQ-Ls$yv(hR&ET+Cz1*-x6&Y1NPR{305i!LOgjpcy{ny5Nu|qa{$V)>3!I<3sNYA zya1ap3Y)NE*dtSu?+0-c#O^F5@5vQ)V0crJ;I;{@csQ8;q@r$eYB(|#ym+nRRiT$K z%wXADX(hyX$qQ)DZys<(U*lu%kIe)JU>}x>LuS=@cOjlseLT1uSd3z9G|?s)sLM9bWz@0Y&9w#-fl%HOgXQPIXo~2-T&<=+YZV7%n7?p=5iLoh&)< z(TN0nF(owtQ7v=v1cYN*H7`b`=)A1j^&nBjxfw4nMi{*(LCl>->wR!7bll&N=uElXHewnS9NWtoP`u zCEt8(Blb;uuI|#RInQ!0*_IsJlId7Kxp8uH@C7?oQI~n4fMU>`t!~0t0Rw3<+!H2zwxENE9dW8 zpWXCt`7f;6^MU4+2uhDw3oe_B zTV)D<%3bq#Wc6>eY~w4KGAd-!mK}Zft`(0JaWZ9wIdY572_LG6v~+tlVJYZq9c<%Q54Fuin&tu zHnn1hKQ2|mQ3|V%eVDqLpr{-0ZYvJJJ66Ox&kTTiY(>s3*o&M;aRM@Q5uAlshB)dLCxa zh9`%{;b0i){3scnhp5}p0ig;oSh_VhIThR`Q;f_dnYJo2T1+P*<71a2psBrzRJo?2 zSVtAH5;Q2&w@rt(JIi3%{;zSg5}s8GmyZJ9xmy#~G1}h3#UUTlcWxVTvbN3R5ri7shOS_7y)|SjwV_FLAn62>K9As|Jigh= zL)e=Eh!jFCQbnu33Vz^RXux9!#^G~?#%dtLBH>vg-4L| z014Gfy~y_=*?|OAVuNZT84(H2ZIpz`7uBT$0UaUWeks96S!LqFvTDRu&_CH;aAZ(z zS~38S4=PvMTzHsx2Q{BWaterC3#5F)OT2~~yc%xMyNoReV!G>1*r8nd0(No;{QpDh z7eD1`%e=Sc?pZbc;PT~b>ejrEPpwWOZs@v{^^R%KLCn>i{eJ}x`Sy-gSN>4@s^gCh zt(kYW8bUu)eyj7**lPH(FW=afna)JA^+#66@`1w{IU{Bpx>n!IA2_mpe7!vz=v^Jp z2ipK?oX&9v@@<`&lk1*LBRmh}xP$rj!L)Y32^f604HexjHQ%)0-o~1A3;YPV4)`z zpbTaQA*D*Wqn#v%9>V~4{HlmMj4LLAR*VF9m<2X?E+HuqCA(bN!#a*vD$x~_HOXs1XGz28wqj_!p#9is< zGE2c7aLUJO#jpjJKVlt;kIpmw5|SEwBQoO)lYzd#;R`PQ~o4!qrqLnk-VTZb-gHH3erJUc$GJrm1Z z&DI}9pVzU@WR|iG$I#~;T@SCn1IMes*5}o~0j+n1p)LYeWc#=e}ZZzG&@y_;pHzP$>BI1z$7V|pGK&rx{R zBA(BJ)#aF>F= zuo8b^uIeus#riucg<~Qg)U5XnUg11=h3c7RS}`l8uZ_=(o{xr9ZOAmC(mdJWX*lc3dSL3QfPmYkhNXVucbP110 z?bwXf?;4~Qd^E-3)Z)boV}XT_t7nIp~oe0(nUN z;HtwDec-^V>5qZ7%!gZn?w={fdVzj)8REG=Uwh#3du!1Qv$mA=wy%csjR#+Xku>&g z9NucgaMpMpBK7e{m-C$G)A2{+YiBUzzvw!fJvx|eIQKnwzFFUQH{#i5K~lO7WKU~|rXb)XWnvA|O%z8@ z2ia_`LgL}6sxcsL-Vadf#<-KI%b=={fK-}7Q+wvlR#Oj}!YKV{9896^byH}mSo&<> z*m`XJ>I=v~^$%woBHwc(xb~y_uf4u9=qk_-h*Mbv2G-tyPDP-rUf%4abBqdI_1cS( z>>4}~m~wXj8X=7XE@)RNY-kiia{38g<13+*oe7Gw;bx#7H1=g-^c@80jcOlmN zYGkc;?f%-GOf*~9`8_+b*|IsZdFq?KO$R(wLOz_^lB50*W*Fv_hB>8oJL+XxHqhX{ zb*EXyVFQGFONY(8g~K+!$zhj;5mS}X?d*CR2`8q~=xk-XUiT|74f+Sxe!ozGyWWg5 zB$x$DwNw;bqZWf2zNNq-1^8%%pwX+cdJ;whh*79h&035|+ji0znwfbu;X8yawr#Ganrh(VJ(i}N-dXHcqZ|RkOVkvhmzJe>THuvSdFYc|kZyoH- zxq7q5M{};xEIX=gCOB)CJ{T;BgPH>dH&Zp&gc)W1{<>;CBN+FshupDV52j^-yXYHf z!;KpnCNbP-C!q#Pc(_ltNaA858WX`up<_}_1dJ3fmNg%Q*0gU-cn!;Z3oT@HcYu6d zzE4*kt*p&tPHwr5yma;FT>TrzH%(ivb1z*ZIoHTH^0$#K*OZPFLq07lgZIG_UX-Wp z3AhQnK9^XCrfzD<8d8T)29hnw6uHUSb`vSM9KRVyXhN%zPGid}Nbsn(lLsVFiRAr=WBiKJjwE;wCt-9W z1b^2ge*mueW2(SWfdlzkfBsNM{z!Me|0MozIs8-IJEp*o^?`y3zTxtzvAtkH&PLVN z7wpJ!kUA+ikaJR=mVyg8H&x$R@F3@~q3sHbd=uNshBrYV12 zMaMPgiXFo@;9%&^ikuC*vm?i0Cl2JCsM>{`8#xbhUhD*QK*zS0SGB;sx?u2`rs+Z# z6*gQl{Dopo15i0+7}5AwKBEa>7w0!!qJQ+%7EH*%D+6mGtc|Mi7wm-9`X;Oshv6cu zo3c4xd6503mxi9SDaYBKfXiT5!?`8cbFiKgVhpt%&KTXrU!iov9d0*lN$nR{-TJSr z;CE@-;huyvvThhVch+*7J*#OrC#^sQEF~r5rAL9GY5Gr8>%UQvA8XpOl>5KTLkvAl L|4flDqTv4k8l|`? diff --git a/app/modules/rag/persistence/__pycache__/schema_repository.cpython-312.pyc b/app/modules/rag/persistence/__pycache__/schema_repository.cpython-312.pyc deleted file mode 100644 index 0bef89d31dbb0c3c850680b059a1c3255ad0b560..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 10493 zcmeGi&u`n-`BA_8Ba#z0PS84?$EE9P28NwvOE(NfH^rho&9dyu(oh>{I9jA_Iua@K zQME;+Ko2=IK!F}QAOl(qJ#2>{m;DjF^|GQF76{#G=wUavE)XEQ?0fuel9EYzDX?KO z%t!Kj?|a|--uL_Qvs`Wz!S8pE|0Mlk8liuX2m6;YZ>Xc!;O0IOkU%w1liHvta-V1< zn#ql%ai46Yn(2)+g%W5H38}kCNIy)Nqc<|03^Vjk^1x8tGrTM-8m~!;jNvh*i3b|A zquZj!iSo82i*<9Dd9`p*M>FtzABkv#63|9M$OzQk)J7881hgq=lhCH2O+lOKq?w`a z`3k?iR^Jhud_`<2Ske@=Q>Q%GGjN|oh&rmmH20C_z#dwi-l6VLyU@e`v*9<;JBd4q z-LxN$kTzt$6R3w4Uc05xiDMFWU%QPkCTaJz+X!P)c3-=VFeYvHwc7||GIn3PjWA}& z?rXO&2JMd6e0AG94!4XRXIzMV=j)NP-@EOx9*NzvF2ugG_uLS75Pw^|DbztPp=$_J z`w0rIBMSaH=pea{_98Ve?g%X5Xx`<+b8UnJzBS<&`SDD6Uo4=(oi>2qr%R zLNZE+{H)>C{LK>U8>;f#92PMqx< z61zUrb9_rxc7aIm*c;cbGsYsywNk0~$hs=>nkaC*Mpui=>{>OyyjtC$3+zI^R;tqT zwMvC8S2+h3N&*x5malki+n+y|-$MhoPrIQ0KwaayycC3L;D#O$p;uAQ4qn zQMtMzh%OVa{|va;S5(bWf{5#M6;w4+@1`QO8}2MbKKf4*S08$BSGy%VGtFYa8xEpb z^_{kSyRTLW^v&Yp8e1vmOVLcvsWhp@Ydh9vo~U&O?VO=T0rly<3w1@-L>Y{mAu%UT zA~rWgL6GEa%jo}4NXz8`rDe0BY;uOe_igU6uTdmK?W&%V^k#W!j!J*}ENouO?m&Cq1s;f^`{E&t(w zVqz-hf4!Xi-@bU`yg2gc6@Weh>0xlV1ctxm|8=^!n=|Ka@~!`@6>}qduQ4+sj1z5= zrLK-Cd&VZv!}%Dl^I00s(BLI}|CwQxWbfS}aOF^X(7Hq7fmm;AqDpEX-Lp`Wz-?88 zaI(>E%GiBjM%=hN#R;m?;@WZ>L-o}z6jF(F8Xr((uXg;mwB8!|G}+$x4y`I?-13gk;zXc9%s*eP`X$8c;YWp>=!RA zJjyOwZ@xS?ahS+lc>X9kJpSCb$z7k0*Lm4 zMhPfOKw|)!@`ADiG)6$@0Cd?43Xb|)mi|0Te=_kX`y-&&|1|e`cJ9xqN7)->Elc;7 z-d}#Qm?Z0cVyyaW79~U16p@;f`oAl_vjEh20>cmJnX_L+lg5hl<@y7`HMO-w> zzAUO9I({7&0q%gxH9^^%Ek$+%d&1b*8`a>k#(_#pTapOO@svMEj;PmS)28taQHE*{ zhwF+e(uI{8sR*rB*!iMSRx;2o#6{cSJHRt@718iL!7U&3xR2;ZAc?X&kozvDv#P^Gz>%Uyn=0ZE(n*?TNjLEfomZSJc}cB(bFz zOorNNDUxiNXIETe(_;n$$GI9?xh><)d4eq>DL3OXmsofogDZX`XHPKQx?Io1$=pw<@a!I z18r@%gIgM8#l2iXxPDtjvYtv6RDb|cR!TxD^t~g?9?S|bJ|eQPa3G)vk#PB}S3tcZ zA@Td~@NnWJUiaF$fJ8;2sUbnV+#e4NMp&<)V6fc_j||@M%X*|m_6@^s`B55awRt+% zQ{bbYH0j*n_#>S{JxHkJ>j|S+@F1y@V`Ft3F5MAwj3+iBAh2_M^*I70htv8?Vad9$ z($IpA_!YRkiw+Z4Cr7_Q*G8_qS3KOLtX%lxiQh{fegCgn=Ic5Ipd;vtzKfhSq5ss+ zR6`ChU8te8`QLjJ_Nljhn~#P&t5D=-dF_ zht2^o`cic2oDkfH&3@15Ty$h^p5m7u7h)8cW@slbV)VBnOyEXkM!nKFO|s{3VIfCK zjNXWV-s5qC_&vao31(;$Zg?0*-;Xextw`oTsPWsXWv?jE0p>lXfH0|h=vQFZ=9yl$ zjFcbyI|i%bOuj>Mj8~Qzubg4LCIiOn5&#V2Rb~?1j4EnvRqm$BP}zcyJI@xO09SjE{92qqW+F9e}yi6g=U^)_7c>U KZxFc}WB&~(Kc8d( diff --git a/app/modules/rag/persistence/__pycache__/session_repository.cpython-312.pyc b/app/modules/rag/persistence/__pycache__/session_repository.cpython-312.pyc deleted file mode 100644 index 342f5603d284dfd49bce8c13914ea193aefd2c18..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2547 zcmd5;&2Jk;6rb5IJ9g~aZPGY_!j=TJ8=_bR!67P0R^md{)JFLz)IwUh-ihO2uicqV z6GyJfA(tqX3a3zkL=POO@*i;PnM0*Ugn) z4BQ%n^$sE^hYgey4B5b&Qcg4!Lx5Q_0)_~)T$i+#5qy?6MhkI-9vLdvSW<#Y;4G zCaW%fJd;{TtMloFjw{vo)%2&+vx_t7naOq{J@e26TZ9yBk!K)NUVS@IsG5Km%MOrr zQdqSJ<$$%7LbXyUS(;=^jFgw`X!kSQq4rg_#6vLd#;f?eoLpptvShwY){`^jhVGd% z{l?qLd`UHE=>{>?e67Zxq5xG*@`EBVtt4zFD^+8)Ojr_bOx7S!iCM%fkfc|CogU(G zvR1dFt2MaI^54$J=v)urPIen{=&(f)U!W(Eq3zFpj+}lNIsGUy+C<^Lk$cwT{@9(_ zt=T8Bfu+BdhS0zz>~rAn_;OQ(PSnL0i$8-i z8lum_`6C=^TixogYV+#7`SffWuzXIvFqggDO`=aeO3$S`w}3qWWlj;w-;bs^_@q1$ z+Ruf9%it2R3d>cK*wVFXwR~TqQGRxei#P~dq}8=UEYjnAE9xVMtOJ(VOCZv1Gz5-} zfH(>fsc#q{a{T1Z#8(plk-fpok7Aj}@snRi_hM&SvUnnTprB(zTg%%k%>atT4n*+S z524t=m($zzyD9fj5HL>od`4?^ATr?ch$7ip>Hxv-Z7!a|{5$Kx zWkc=RZ#pbqhgj@$5WSEz){Ug4N3mjWBz>2-oA_qr5Km*zLgo;5uQ;>hks znAb&ZsE&_f2X)=dSBS3LAzgQSH|YJketk7xc2DRD9&MP5Qy}i67D(h2lk(5KBZ8nX zPT@_|68hzl)~kv None: - self._builder = RetrievalStatementBuilder() - - def retrieve( - self, - rag_session_id: str, - query_embedding: list[float], - *, - query_text: str = "", - limit: int = 5, - layers: list[str] | None = None, - path_prefixes: list[str] | None = None, - exclude_path_prefixes: list[str] | None = None, - exclude_like_patterns: list[str] | None = None, - prefer_non_tests: bool = False, - ) -> list[dict]: - sql, params = self._builder.build_retrieve( - rag_session_id, - query_embedding, - query_text=query_text, - limit=limit, - layers=layers, - path_prefixes=path_prefixes, - exclude_path_prefixes=exclude_path_prefixes, - exclude_like_patterns=exclude_like_patterns, - prefer_non_tests=prefer_non_tests, - ) - with get_engine().connect() as conn: - rows = conn.execute(text(sql), params).mappings().fetchall() - return [self._row_to_dict(row) for row in rows] - - def retrieve_lexical_code( - self, - rag_session_id: str, - *, - query_text: str, - limit: int = 5, - path_prefixes: list[str] | None = None, - exclude_path_prefixes: list[str] | None = None, - exclude_like_patterns: list[str] | None = None, - prefer_non_tests: bool = False, - ) -> list[dict]: - sql, params = self._builder.build_lexical_code( - rag_session_id, - query_text=query_text, - limit=limit, - path_prefixes=path_prefixes, - exclude_path_prefixes=exclude_path_prefixes, - exclude_like_patterns=exclude_like_patterns, - prefer_non_tests=prefer_non_tests, - ) - if sql is None: - return [] - with get_engine().connect() as conn: - rows = conn.execute(text(sql), params).mappings().fetchall() - return [self._row_to_dict(row) for row in rows] - - def _row_to_dict(self, row) -> dict: - data = dict(row) - data["metadata"] = json.loads(str(data.pop("metadata_json") or "{}")) - return data diff --git a/app/modules/rag/retrieval/__pycache__/query_router.cpython-312.pyc b/app/modules/rag/retrieval/__pycache__/query_router.cpython-312.pyc deleted file mode 100644 index 912715588d961d3a59c5040afcab548fbb74749f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2285 zcma)7Uu+ab7@yhOyKbTFUFji$BHKc1PvV{U=fMPt_3ng*a#wq8V~>)}dOK~e?(LS@ zy}~smsn94IVl+nk>VppuG(n{iQL2w7zU%_YkqJKepuRQMMC8eDcJGb?jd35o`R4ci znQy-N&Fs&ut(y>hJHnq8aS)+j`K11dzJk}D2W1IqNW(fR;XKA%7j&T%$OlSdUc^X1 z2ay(7M4EU}@T2meBA!wGEk5t516KjKJyjCW(GGvx*LSy0b6ApscX&LYp=ki<&IXR=NMMEw?+vXzmnLR~3q}<9={NSwA{M|D?a>e|BQ7s(Z%y-dT38@kQOYoh$D9^8LAbc;x?bor|8BB9zEQOD>jX zbW$RQO||f!bj4uRy=%tT2ff+KgE=Y}PcT8k!DV30alW8>Y^r ziLz1PRARw`u38ogm54oMYK0p0AU8ssJpqL9+NYqrBP^kLJdHtp;Ja9xzbDw>?SE&5 z39R8oX&z12I9RvvF@@?e7i;-w#17Rxrlq=eZ_J@}_6>NOLop#!SYI4330{JGcy5!3D(H*A348%(E}&R|3Gru`IOX+CH%~z8HH&AH z<%PRiV#FfUN~k(HnMjdYWrmv5q+nah?6V2AC~LGhOAJ|^nUTR#AeNQjhDkWG1b~T> zsg-qNC8#=?p!I8;IL@i7P>;LunabVf{SW|rqzC5W_cJ?AiDl}uM1e#kzF#*Bs%{;K zH~f2{PHQWOJHMkl3+Q_9=#}B~(M#Jt-{tm>{$ug8IMddSV<8sww#EXgQDK{vWHyyn z4)te-a}=I1#6%7-F_lf`pdq3~^a&R9%B1{e*ZT1?a&F;~2r>fyjH{9t+#?A3!b=+{r4bayh z7;Vf_3YH~gH%Ks#?FO4SV&R+6EE)lZHkikA`(K@xIiSo&e7t9;{0)o+nWz^n+iM=> zFBfa^dpgiJmLAH%jJHzpXEA|3&Rs-)h!(F=miEfGawn-pFp5E}FrMLAwpb>Bj_ z^LWlS*5PgZNH#SxkXDj?!+itUgDmWUul6N}mHtdB{W{y?0l9Q?xIdezVeK9^m>uX( zj`n}*B+KQJS_2oY1mYSN69+@pOfAu?%&v5X}=$Jfb!oM ezc8~m|3qARRs0KxV`!}a diff --git a/app/modules/rag/retrieval/__pycache__/query_terms.cpython-312.pyc b/app/modules/rag/retrieval/__pycache__/query_terms.cpython-312.pyc deleted file mode 100644 index 74a313ece012b6a3d6c7b4eef8385d428e8fbb73..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2640 zcmbVOO>7fK6rR~1uVXuo^8@+e&-^s;CM1SX2uLWUYJfruNUeHFh*pbt6CBoSGrI{S zT}xI$s?#DRJ+$#LDjcY2CDiu7t-ZGgJ2r}0r6(?>r<8D@ocd<%jnk5X)RFS$`MsI9 zZ)U#lz5G&N??W(tZMzfS??LD>{oxL#qTscope!H-DOf`ZJd82b8I2ic6hUEca>K0R zRXCVArB2~t=E3fP*)z?Ez9%${h;6^D>q%2K<4N5(AH$X4j^shI2;sFqKv_WMx^JSI z!iKewgoUnSgMlQNdsTlLkE1kW;UP2{K`70dG@>&s_Fgp__}ak7S)9d8VFTatTFivt zuB*)!=kCDhRtJY}b#ut9bNv=_z5h3!#lYpU9q2xg^}G?FlEpPnQMS&Pr8ip^1zEx6(6?S<)h5sQ9gsKkiMntDAt zq)tgGlAKUurXfxBN9A}}A@M0y55w2P;EAb*5v7iCNFfTwXd@_3Y}CW)(4 zvKDm{f;9S4({?jtM&y_&ZLpIj$bp{Um zJ2Pj?q4uYU<$JQ+N^8&Ep_%U4uFYo6@|!Wh@$=4G4JRNWScn$qN$Dtbr*bqmg3Acxnbh0Qy= z?fUA6BqOE8O6q>u;PYNY(xa@DvTp%>-%`r|<@cJ^XFo5bR z!qfOQMV*D!*j>FD=3VYo%4R6iCq`(+936q;Ioc!6@D~qC7yD-#Bh&yzbhPRhMV8Pi zZ?neaB?27)iA?2z`LQ@LOoO(NaP`I7K_^t~g+HSo1XP|taPHLXseE(iUGM#U#lS%3 z4hLS; z9fw|^UQdz1nZ5t+O?}6;WK7nK!M^oHJv6{p5YK-{&ogMrH?qiQ56_=2`L`8(BYzq6 zDsKcEvB*tQ4i|3Ze=211_w(OV7V0KRYPP4sPTN=r8KD zxM7ZfWfa`BFcEkrMBb$0Fo>6})GrFQPm;zaA%rSPgg%MG0;jE33X_9%=M-JkOW9s| xGVk$9*B>V54o!2!mK?U diff --git a/app/modules/rag/retrieval/__pycache__/test_filter.cpython-312-pytest-9.0.2.pyc b/app/modules/rag/retrieval/__pycache__/test_filter.cpython-312-pytest-9.0.2.pyc deleted file mode 100644 index c0e2f50b41ef740f4a89f4d891ff60749c841be6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4854 zcmd5=T}&I<6~1>o{vBh3%})aPVFM&F1RO#(t7KQ9BnFZ!pe;Y!jW=XuJOeR1{@FWY z5-g`eYFY(}6=Yw6v|5R3RW;kq1AV9(^(p(dQu|=XPVG#yQl&mr`$j{gsytLZcgACz z1VyU)(hGC$nS0LtnRC8-&b|I)O^pLVsr}(sk#!ECztIOA=eqrb+BUJJcr05#@rMCSxUM)ERVYyjiM=x`Hm?EkXAU zBv`+~!CD51_W2{m5-PP|`v&W8K@aF~g8iYxXkpMW61Y1^aDKz+I^UE!2E9UqP;-Y3 z)QexXJ1LftGJ5bB|BS!8?%f1o4! zu*!vEvA7aaBJr3!2Jdzuq=dp!NS5KnIvb0Il<*B;ZI>01gk~hs=SW!;QC4Js%1mp2 z%E9wm1JC5%7mmkfsbWuJF=gx2`t)=H*P}IRoSYED zJ)P%SSeuG_RVE%&O^c$evIqA#Pc#{Hqo!n48_&l=QIY3WuuwEEBqho_ zdH&O6NGeI(JYVGip8pzc(}nMZ{Zq0?WPeB!Z}|h_0?Zem7sHCoFP!p+BCP_6EQqnz zP$JO^lCUVtekzy~V~QUd{rYsWpM>W8#P}{hH8ek~eHl1`)WA#{X$D4i0r@%lYfF2M zZ7;U8=h=4BXejJ5E%gqV7jF|_?jxmyV}#~QXoco-5wO4*D4s9vz_Jh+1KIP|>QT~-=V9JQP z6SOx6Q@&CJlc5nnt2oTep)fPuhR|)C#&4VruhhR;;~ulp!NO>_@dQw;aW|2V9a9^r zizu%74+bVLQ39SBn^4gXKH;;F7FZ%VK*>QMDocZu+FaTJd-XHR2`QrZ7}Z2VH&r&G zh*6nt*49>{!G0f&&5=0>*n;j=h;dpRBR!yX93FWb2q53#T=gycGW91O%;X%sOBair zi*ALLcb~hx`TCxm+n=%diyg;*ef5`DAIM)_|1%d@pWIY_pZaa;cj>!<)ho+aJ{x($ z1u|^lUr@!3s9gIBhaw7K~lSOqvmxwCM{t0eo2{U+Gos#_Z6qwEo*{ zb-y%Q8Bc)G7qE<1MyoYoWcCa6WjR)2v@*>irHn^d6Z5b<3PeHk*bermm=6CA?(i|h z4ND-kKztU}%R>^2Kq3ck?sBAR6JvsWGosv3tvsX&cvI{6IVnEFD{)@_RN`q8(^3K? zM4QnUI3wHD?8UP0Q_ecfFfb?nFn?-Q$w2YBs(0_=W z1Ui{wI{iMI7R1OQXdtI3p&^I#0Z}bP&)g1K2@ypDE}<3!aI%2B8{`bta>U{!3V=_E z0y#??%u4(dG4?7Foe{Yl+is8xpm-i0c>@Sw(9`&N=lYRCU0b%UEmzl3sO!qsb>-^1 zm##eH8j5Z})oakSn)kg5&0>Aa{jqyv8-2O@V|NFO?)?RKd)5tj%)7fcdpD;xhadHB z9(dfG?S21QQws$v=UF?qelyPdAY=j%0@wm9{cre$cnN+xuF!e3ve)^n3NLu&eA<-8T3ovbS#J-7 zR%@^To`fkn|Z3Xd!R0iW+{UK%Pk9e#nV=C-?B(R=6#gpMNxPgmB{mGg8L zJbhVDU(WOPUF$P2n^*MvQ4V^U- z1V+9B1l-_iSdA~o*M*ItoU5zg>dU(NHZMME$hrCpuHmd}_&d{gQ#sef(lD5NwST#P zy>G*mG!Ng`;jyscK&%7SCX#mzX2@MlqY)qOUjiLoiJbN2HT|N##z|#J{ z#&9VnL(m@%PZmh4Nl_-<@Ve`>PD2Bsgr}0jK$g%mE4Rk34`pkQ6m726n&p}`;i;`< z%Y^FMmK1HRbVRtDB}q(WXX0@QEC<^c5qc3LKL%0)`A)rY_tq|=t?AaWcudrFX%vS8 zVLw!=34*1zE65ZbK^tqbGEAyw*D#g2U>fQ%@?p6b_myzR_MU#3K2O5XgKj1H7eKa57~}8Jk-sB!2mQ?c7i9k) zz4bk6f&VR*JH%vA^NVIw+qvW{dJnFhx_|E8xy+%rbKWx{;=Rb4#XXgLE`DP}6DJ``lNdNf$w-G0Y&=2&(NM>EZ`@5iQAOQ(jLen^iG1VD~ z2{Kx43Ys7{N$j*aXx8dj$ueyTS~T4(S*LA58|ao`$s`i2U*n*iL857@(io_a3$`a% z{|Y*wjaevpYBx$4)Q<%2Arc%<7`@GtT*qLkP%e}{WP?tjLU2Ov5-No%!S&D_ECcPB zPzIV?I4-!M&LdO{9>~2yjo^j6e1Y+u_$RgG!zvewMq^4yiNvCE0KQ9vkP-?@Az6kG z>v(iJq=Y9ywOv<45*m|4pFM6-L|KvjaWl>RaXZgz1w8MMTc%^-`%qOf9+_8Wi3qAi zR%XW_=fbh*IBnQIvkqpeNDFgdd<#S}T5bB>mo^bfq>0LlguQ4k9#$c#WpMU%i> zfl^H~QEh?snN{zgsE~*_7m{v;l*zt`1PeYWks`8kS60ZVS|QGdrCCAbXP}y&AtEdh zrj{?3BKNgA=tf=1sy3dFhNeZHSHVNmF=1Asx`XFGpAAX58W+zO1%T(jLHlVwt+ zEE3rtlEis`k2nY8#iqotBJ*?S{h>&`Kq7Nuv_3R5Qx7#^QI`F*VnU26ekkmh?Y=qE zJ47m=xxUUS&CiKe-je658cT*DkGGN>-fPK9%M!Ww@>s*OlhF zGhBa)>rZpn|9UUU-AS@{G|PvaM_r&f?+qybi}Myy0=>_HvP;Rku;4I*N``1}4u*Uu z2_~aO4_d=vW&(wo(ME(8aRR@0G`w2={uYmz)n*o~E#e`NSkoRL9~)3BY4B*!_*>n> z*Qglo9SjVq=m4MfSqKFqsiEQo2$iKfP_52|_o#kmc}9vTK1MZ>&;yl?DB`qCkyu|( zw3r^F#1okSHWD<_p&MA+q{IiUn&2l7f`G8v9c#W7U$Xq{B^BKl*l+7RAjA2s0u?k`8WNmPx`8IZ=kQ|++bMzOv24dkfmV7lHbfz2qjw=z zriAIJSP9r@M@|;7k-!O)u_3{B9y19>U=pS;;aK~ssD8CWDKSQee!2NCvc>%pY{8xY z*5|N{R|kq)fMxbe^i`e+Fj^gDk&?$F%!zrLw*p(-95}%KIMeJuz|B5}xL^vT41~|3 zdU;^z2%J(7%|n4yZDLfAA4HT%)ye}0!k6miC#2XIuf%xybBU)6tkzkiP)2gtFBqmab*%K3E#q^`6?A ze{p(Xr}L9^=Rn#Uc!O-_3(M9l=gDw2DXwPo>JC@G>+r5$+nm^OoTA#m*5G67*1|U4 z>e_L1W*z0b-lnZzq`hs+wq2WRy>xSa$94u#x<2uOJ85*VZN;~`UOGDW++hE$2RZ7t zZzo5_cDQho4eN|lOw<;br-s8T8V)to!G0C+R54ni5lsdHr}CK8%Zuw4nFJ%_1xCr! zeFEo@oJX5s$3RpM8Xe6cIghu34-0+IpgqqH}R;8JA?5PI9_BQ*ZQai+!ZvuPwo zPC@}`qk>WnX$PTNh<+^DWhF!u4Y-7Q48X|(@+L_KZDo(f$TR>xE(+uVEifyw`(pH6 zBswB;p4%qLPod#u_{m!!0E3>&FIqMmGVaEdyD{x<&bV7s?$)%sZRy4 zoM-*==7SyX^wW>FFF*G@?|**j*)LzV23~oq_FOQ+UKw(@bwn0pjfGiji2O4sIx{8^ zAY=#-0@wm9{eSobzJ$1)QRp~YI_mOKgcrQ}al(|q8n0c2Q|}0b7Fq+hjj$*Ir=E|| z@!&HTK%kcKL*0G7#-Ya#_Npc0vy!A;vsH^uTRv8gy#?;iaQjd>IM)oW(?B58ndfOp z2Np%wb@<5w2#EQy>ZQJHRoxq8H8(DES#RwNppJ%&r#0niO?%ohp3an~Gwu0s+4{;= zNrUC8%eZ_gm+$fE9oKm%0AAWW^@6L~9t<#@^I!DM#6`0%PPj?noOp!EDq+oJ!!dxff^d-6LmV zf}k|3n1_s4amxYjq7NY=&PbuK2xpPD39X_W4$X){@jZi_gU*`x6cqUe2nd6-VlB23 z+Z49?($3b5voq!F+`js(BJJ$TIQvu1{_jlRjijAJOa0*PwXT(}&CV@Tnrq5%XH(qS z$3xqVY3^c@z4&9=rUa~Q5_;f(voWcHV-(F{;yK#!iTrf{2uu6>2E&VwbVGl*JXzpa zofTzr20jlh%MS&F3b<+@ncjq#&?_sq&TjUl${MmZ=UVAX>ALXJRl z506keJS??WR(+yA5Q~a>Tgu{aA*4*Ent&{|T|sV9 z3!1H;70kp-51A>91;fyYk)P*#Q4OpP&;o5Xbj5{wm8BE#RnSM<_$+M`8Ohgh%7cHV|(w-CgNkD_A(Y3yb zH3(@AKm0B^uwBt#bRU!3(1Su=PJq}mVT@m+h96ML-%-hH^ucRX1ON6|u9iun>NnM> ztYyiO^`2Zmzj67|(P*aqNHR^TBtL{e74VjB)w-Q&X8Hk}&csoF zdd}SkKnRo*&vZ%Ld-p!heVq5X`>UE7D+SMZ{;y&mwNTVY_@X|HT%gzf0}68#OR;o< z8l^)tjb&Xz7t)bjAJUWD5HgUQ2{DlC6UI?f$TVsWnMr>`!ZKB4u-;cGMkmld>gIH|hy_NZFe3j`~7An$l66A>OSnwv==J+qC=^ zYS2+fDb{wCV(qteN?jwVtARQP=en&|YMUl?LFcdWB}hxQNHUocBVsI-6o!I2$#Up& zBql~KBsj@D5J@Dk^d5AJ2@$mcN1cug52m8yqg+yiSIO!1R2&UG|492ppih(|^*a4gI5QF-Zds_cVa`$u@6 zqc|!=vs6fDfn8cC^^bM3x~oh`zrGe*Sr@B^7DJVmTGjw9OqCWl%Rq~ftz(T>4IvZj zVNH;mSubmb+yc1;ax3d&t&rQ;dccGsWM}=X9r7A=RpmL`z}7&UW0DRwN>(_6GaP>@ z7UhPbhO*rvDq+L)+SkZt({!2&Yt3mLyeR}gQKCY`6m?ta0juE=p!?fED}8IFwA$k@4g!953Kr z0`NR+kBp7&98Iy~2~OC_M}~I_@^;BfSb6Clo0QDqa4Z=U!{MpA(xG&#m0o}+Y=`6u zRkTx$TQY|0j)J!pGV7{0nDcg(m)@|hK~HMkf#R0Gi3j?(P&i4^KtX9Lt{o!wmmfH4 zU0VMGTIHK>f+YB3IL`0t=JbEcFx0dG#wnbpj=?;x9crl-U>V}Z(z{wxIhCfMT|5IQY|1O5s7k$ zIKrla<6{Xf$nZWK;{db(CIkV5K{&=rj0~?8+l+)5L;*L4_zduk zWQaVmkc^B8BPnsJp$ui~n*z{XI0eanQ=bvs`J40g9ohPh#g;qXyC;|HJ971B^R;I) z#)8>?!+On{H@9WYZ3|ytdMUr_M0VGS74yl0(|h9^*S?W+2A0i%B15@frXLDUfcd)r zP(A%U`jFS~=6)!xLpUBQL3kRFEF*jvkOw~|tsA7ypQEU0qo@%;+8Eb(21Y6mORIub z%~{N|0}`%DU12E)Vq<`CnGFfo z1mn!5{%R?XtX}aT;igS-dqp+8s?dRSO>x9Q#iL3YLc042=^BS5U204+vRr}_Ims{< z5l1A72VG1B&5~Xac}YLaiINdS1(#&`05r(d?1P%bq(;l(=tv|v45YpVdu%1+2?_IU zP?l=sW>(<`Lcex-(lE{`NT%^IkT{|s8Db(g%A-6H@I(k@Ys6h6Q?N4Gl>ZUhR$4l7 zIPO;^?XBA~_CiY_V=8zye?l27+cJZzPWMdjT;FWp{NT6ybIvUbBln!$1y^(4wKeP7 z`p&?j;fLn;%uBvI?p((+xwbFeclAGT)z3L*9rNOSS6k5nP>NQnjA`oczCxHLl&=ky zF-TsHKXyKQ?EH%P>yNO_Iba(%toQXp&m4Y+{z*T5c%R`X2e4e7b38!d zGUt@hwN9nQX@jV7jEZ&OtqlaBHp(b!w42tk^bd3@KMYbc^!b0KsIP%=oiDr$5acU5$QR~V0nRPn?;6&3KBHm0pAKWJ(~uc!$d zz^Sh?#-gpmp0@FE;CTO|z2Z%e)&aatRcdW%Gg*gXJ*d!uKbZ+Sj!ahZu=Et1PgEDy zPC*Q)UE;`86%WgRG_bJ7__m4$cum{Y`ED!o(^T@8u+sJ_eT``gU_qgo>6*{Q0?66Q zCtaiLR*}7roVw!=I8TSVcAEO!wN#@B4+ zE2cjTD})-VxDwjD8m$8M_Nr?rTFN481?R?F7{abQ=nZ8U-=wGHT)3CB}qR}ivzed9WToy(UBfQ9W z!5fcQojMA}Q~=x|P7niVN9_x&x30dlO$eYeA~~OmqS=)k{!%m&9pM6FiVp>i59u9W z6c(|}%VACF_6341l0LyDC1+T5)J_xsOmcy}FQgKeIAZss{b%8lU^?;j7heIeC= zhj1a0x)2sdB9bX0OeUkTlw=W8VR3}#BCM>gJ)p(IWGAeqvjwSMn?T)OI2jpLw76vC zCPYyBQeF6ROdKJqJ3PvX5jG-5BqsqD9s#$2*rby2xl>1v9yu+UE=TwzoSS5br(#Li z!-er!qI^=9?9h}gLxH6k!;(t|J{kjaT81tweoiqUB+HSBC^v>KvShy)0bHsLW@UDP z--$=#3WF;hyEqwEt#iqu%@TB#3=|#(C{N51n+VQ#LNQd(43SJ|XcOz3SRaxBmqh4F zGHWMqln+<3s3$2%4DK9^dc_@MB|SG06;Q3IMva;i%bgfkQ}tygO}P)TABG7hK>rep z=2JUW-#EYR+wqKTwKkBe-2&!@+n0B@XWi|Kj+}c>#wazyq&P~itEEpGcx%#eL-Hyy)QP*6vx6ssjtN&*IVq30h=Ztx^b$h<`$!zPB zOP(J!zTcSdc_G{L!t&{tm(N9Wt!%!5oiP@g1Nr8@Y;)foPp-Lt#_~a3L&4LS_XM+^ zVBYg&)&pbnJ;$>>$M0@mKK;`2+3<2Cmg|YHcwQm>I`4Tp7b98E&ikIuRZrvG(Ckpb zA1U~^7yQiyf731VP4hxS&foPL3*+?_9n_}H`R1N%bI(%yo!%eAl+Vr_S>3iHzioGR z+wLVXzvsE^p6Bjz%P+zjFD$c(+_uqt>*&m}$~E~{Jo{D~H|HC>vW;DfgFig+-iiE< zXR|w=y=z+j@{7w~C97U{-_!NDg?>sFYNu-J^RBjguC_%w z>k6W!Xr}7w72MdCUc7Vit|#Xn%G-zT*@ub;5I3J5q^aiC`AhlM-fU}cu4z}sxMKE$ zk(j9|?xz|#`gg@fDv+c*~1g+6onO&RJ*P zwLRRoz{gZ|R$M)-f z>ZgzO8h_ewcptp{td2gm$M`ePAt${2d@Fryukq(?hrICePkZZO$XyqG!f3o(yA{j5 zG}PbSL(;t@-ETReXMSPWb-bVX#a;&b{Gy+MnqTS-P+n)#qLmMp2fg+`Ah_qswUqwx ze%}Nw=pZOpX7#44kI*#8Gy^`S5wxgc5y8ybQ`K+NVDsJJg;og%Yyiuqfz=Ac2h^nv zKQO3zx}?_tN)>8P(onhxjW=G~HbH3m`-_FI;Iro#` zYI+;y&d#2lPhbqpTG-N-F%)dh8~d*9%iCJAww8Hu#nx7^yKbDkc5>cu%X-tA_dk*K zKe04?w{!VicsVwXVn?FusgjtJT`h|gi_ zOqsxC=~CFB6uPd47FNgV)!=|C#?*HbXs9MCA$FTKXilavO+%;;9F1ucgsaFs5Lu;` zR1FoBhud1grO_N^)*#lZLra90)} zH%w7Dv#9R8Ls_@x5|%p8>aM#C&}Z7Dp3JmWEV)47gsLY6YXVWN1XXNlTiO)X!Xwum z2I_hU0*dq*fJGB{mr-Q$=q*W}(}#|Rk34_)$YA*Jp|1=a3!gb2IwI+McJs)-L5HLt zjZ8@TSW<)lpCB2*{O6LFB)4XDmn?a+X44zT$H2DdB!8E02;E0e*39$2nc9|hAU~eK^iQGoYmaG>dVss=d#HKhtg%x^`wtOD}Ntz_nB`ykA zOt3IBrT7sq6NZ8yR+bPyy+u23lR>b#lbt6u+n?OOxy=-#!wZCUO- z_~W)*;ApP-Sk8MKq%l}zb)DI|&c)uP`a2!Dx`B)t>OP@pOJ`=FV0R+t@fX^B&XKU15L`K6c=Ehei>zNPYMnHTC zAYvofHRTc?fZgte6Z{2wDbk82~(L zF$_ZOR7<(sf7EOKa~z3`05X3g0@PcM(2r2yial7^+>sf$apKyE6?@BS%jSi)cRSwh zSlqqz^pEzvzwbu}-anArGLUN-l>5AKs%Sz$;Cdhh$+|#84J-iJj1Uc6gCo)C;bx7l zcIQ@7(HpdDs&<2R&G_D+-Jl`0`urNvZ7^Qb2phC(Qh0-QE%?k@-m-!bU>%ZbAZ`@9 z7>SBuadM24OajO#3^f=*dSM*EhWRD9O2tYhbveoLl1rEr;Nk*qVn@ePNw8?8nnXkp z!*IVEyBOnG$qC^oi1OeKp%6{+T+qs+jFc(xH7tDtlPj3~2_~;&@=Z*xV)89Wf;5Tv zfMtSur$X9l7rU~^M1r5%R8EhuYI5(WiT-ax7eR#N3iZGrDAczUHf_Fj_U74zRBqGm zLVXj76IgQfohZ=IzMaVVIxtSqce8Kd`CQXes)ak8^KLH$+TJz4ZC(!U&jp@Y2dH)H zt%;ix%N=`jt@}Rq+FaHmWwTfxH8xSG5t>Xxf!qN@Uim!UAO!PNCjcdbRilYW5I>q= zC_yXHwd_WgYzCkK-H>F3h*2Ey4)})Su7iP+4P$7^Wo*d}2`UC*8+HLwA$PUwO~PlO zX}$JRO+qEI^fq)5P%VO7aQo&uXFK!mj;tFlVsq}kjOhcXuTZyn*}fUCtoF?9pWQ#7 zhQQ6ey8b0c&Us+jeBd#M3AO_qW?Af)u6Bf#$5HaCt7(GUuvC2TxOw=M8y&*>yW(qxM>zM7B@6WkA@425`ypVJBT)Ur|rlTMKsoLjjfK>n%Zgfo?avZ35wo zTY+8FL&l>?!{hxRkKJ&M;y9m_3_~FO!QMb|APb3YPo-1v8Z^Sgqa`qsh@J4 zI|oMk4!D}P;v2d&RXxJB%YHJ~5lRa2zQi2|+jowkR*LmTVb_eo)an=YdyB-EkRH z7Sac|4eF2>TyG&f1jWCJNogXYEXhP<1K1B1@_Y0|I52YwA!Iy4g4)vfQmwV@uuw(v zuV8}2DVP2NOQn^}!E4ZoA4wsxhQpFIj9MSQs)DjT9Da2?l8{??ygKIFF+rl_1DIf> zi9d`9Iyw9xCd61pt-+(@;E~SXqX_rPgpXb?kBJ9B zhcK^qOVNZSD`j=8*|5|?eVKldE?UgY<_G?!A_F<}b2S!CSTa+-A-NHUY+bWqWwSEG zsSJS}hWG(AmXsk_l!sucQyJ39_{c1fE3;rp8G=O^(zIrS(%MT66n@&HXeoLv09AhmI#T^?k=13Wi!@7LwTJW>&{rV?#)f#jfr%C_IBlq^g1plQa(I9{fVEzlg)5g`eedf_M- zkU}^t;HbbA8S_X%Q~nB$)IP=g2WS<1kbDN}#9VXDlr{TT%#DSfr!$88<|c9wFaaTT zLbeS5edx{qB__8pLHJUQGIx|qB*I~kd+$K4fLlK(uL6&PoX6i|Lk%RKU8R1j(=ojt zQ;^69j-7(d$PE|AK{Nt4@OWbU0ZiV2L^35(!^03l;K324;6^c(NXVA9&>guD5Wj%0&6qSo^3eQ@d~p5z`|ye=B{4_{ zZ_xCI)RvDZ$G<55mVcvmen_?c7uEA2b@W53pQHyrq+WPnY0T8;Esa@A<9uJv(ssr8 aTO+5V8$PBm{d9=Y)4emV{Dy*zO#FXKCG;!+ diff --git a/app/modules/rag_repo/README.md b/app/modules/rag_repo/README.md deleted file mode 100644 index 2f032af..0000000 --- a/app/modules/rag_repo/README.md +++ /dev/null @@ -1,56 +0,0 @@ -# Модуль rag_repo - -## 1. Функции модуля -- Прием webhook-событий от Git-провайдеров (`gitea`, `bitbucket`). -- Нормализация payload в единый формат. -- Определение `story_id` и фиксация контекста, необходимого для определения изменений, произведенных в Story. -- Запись контекста коммита в Story-хранилище через `StoryContextRepository`. -- Подготовка данных, которые позволяют ускорять формирование чанков в `rag_session` за счет кэш-переиспользования. - -Ускорение `rag_session` обеспечивается связкой полей: -- `project_id` (идентификатор репозитория/проекта), -- `commit_sha` (снимок состояния), -- `changed_files` (точный набор затронутых файлов), -- `story_id` (бизнес-контекст инкремента). - -Эта связка позволяет в `rag_session` выполнять delta-индексацию и переиспользовать ранее рассчитанные чанки/эмбеддинги для неизмененных файлов. - -## 2. Диаграмма классов и взаимосвязей -```mermaid -classDiagram - class RagRepoModule - class RepoWebhookService - class StoryContextRepository - - RagRepoModule --> RepoWebhookService - RepoWebhookService --> StoryContextRepository -``` - -## 3. Описание классов -- `RagRepoModule`: точка входа модуля и публикация webhook endpoint'а. - Методы: `__init__` — создает сервис обработки webhook; `internal_router` — регистрирует internal route `webhook`. -- `RepoWebhookService`: нормализует payload, извлекает `story_id` и формирует запись commit-контекста. - Методы: `process` — основной обработчик webhook; `_normalize_gitea` — маппинг payload Gitea; `_normalize_bitbucket` — маппинг payload Bitbucket; `_extract_story_id` — извлечение `story_id` из commit message. -- `StoryContextRepository`: persistence-слой Story-контекста. - Методы: `record_story_commit` — сохраняет commit, ветку и список измененных файлов в контекст Story. - -## 4. Сиквенс-диаграммы API - -### POST /internal/rag-repo/webhook -Назначение: принимает webhook коммита, автоматически определяет провайдера (`gitea`/`bitbucket`), извлекает `story_id` и сохраняет commit-контекст для трассировки изменений по Story. -```mermaid -sequenceDiagram - participant Router as RagRepoModule.APIRouter - participant Webhook as RepoWebhookService - participant StoryRepo as StoryContextRepository - - Router->>Webhook: process(payload, headers) - Webhook->>Webhook: normalize payload + extract story_id - alt story_id found - Webhook->>StoryRepo: record_story_commit(...) - StoryRepo-->>Webhook: ok - else story_id missing - Webhook-->>Router: accepted, story_bound=false - end - Webhook-->>Router: result -``` diff --git a/app/modules/rag_repo/__pycache__/__init__.cpython-312.pyc b/app/modules/rag_repo/__pycache__/__init__.cpython-312.pyc deleted file mode 100644 index b2835125140fa97cc3932db79ce1bf6b05920aae..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 265 zcmXwyu}T9$5Qb;(0%wF^qr_NUo5ls}U}bF~#6pWr|%8D3!y4cq`J$|kZ?Uc*d$ zp{7}1Aey#CyqpeVCSgBlEvG)`6#D~V&iQ1L^^OtWVJ#Q1xz%%~$lA2@s4u9)5d9rh ziLpD=#+G%o9l6qkPztGtS#Lo@E@=t%y{{iyVjWF`k%HHV*4c!38Wx+q*&jZSL;0no b_(N>&yz10$3n<2C5B3l diff --git a/app/modules/rag_repo/__pycache__/module.cpython-312.pyc b/app/modules/rag_repo/__pycache__/module.cpython-312.pyc deleted file mode 100644 index d1cf84ed582969f1857078017b40874b187e2428..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1806 zcmaJ?U1%It6h3!mcJ?Q`o92gfG1_ipDVde-B1m6MQj!QF+F%n!S=4cynWU4>?riU! zZMw@Y1Pqvh5~WBg_>exE21Yc)1LQoi~~~j0HR8}7`-gj77oaa zN0HCxpPtZawNk~8jFlprP*JQk@D0_fTCS=#hr(*f9BJdW@e8hS&X`iu$nm>fs)V zGOkj87K>xHqiZ&sC_d{l?;-XUlE;6-<7Id-aD09ItMQ$I(Yphq_i`ui6<+?Kbi1@u zIDfZre!DQalbgDAdgIi_#hZOMC%+lo&Q0ybU{L9RIGEi7F_V4rFgNvt@nAoFWpaT0 zn3>F^f0lZYRb)DhYRVx6I3>fwL~>oKxhW-X5{{4Refw0Gd diff --git a/app/modules/rag_repo/__pycache__/webhook_service.cpython-312.pyc b/app/modules/rag_repo/__pycache__/webhook_service.cpython-312.pyc deleted file mode 100644 index 97d09534db89f123e19beca653fd5122900d7924..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 9854 zcmcIKTWlLwb~AjxpF@hGB$|@-qF%P8NU)48uIJ-(>XJcEj%g`K3qAZch3}r{k zu$ux#%M=DeZwg4py0C%-hzuKD2mOc(w5UJ!BWU+S1>;!T8>t+7-porz_V=@dT(_olbGbS527&nz~a zyYT)i{p05m?Cn1gJ>S!Rj_o~nA+C^7V3{VpwIA-6s01}mv(&i8O#S$e)w1*z-MALG z(aG*pnKZX>EIm7$%$(+unFJRvPnR;4$AgK|TRJk#0(FZXyG2FJvW`#8Ovol4dq-tPGGn0@laY8l9PsL=z1um9~Ps#T9R4g@_V51YsnFKEz`T5z|7`Gtn zV{xFwn_-l&T7Kw?&CTtZO|$cWx`&HRM!CdXde7y=g{gGq{VUu|#$!Fe&_Vb(@ACm4K6-PF3iOf8gl6BY@R>2gFred>+XjHaD zqsok-Zi_}goR7^YEgXZrQ9zszffs>61*o`u48Rp?Q)AV8Hw~26ziGspiSh+D%~-R* z{5Gvvvr)cXn|7=@D0kDQ6KgIi(7NfynuqfEHoaJ5C|7XPhc!QCaXe{&nld^LTwfo% zq2>AdxI_P(Ct*#G#o|+m8tp@c!?HvBIMhiZgovKQIV+2Ut3l*Wgw5m5CrU(wB)iMY zj@lEA<4}vOHKVGUv5gW08meA6KyGB(V-ZW0Hjq&(OU?z5iS5O1#9O2i(Q!>!Z${99 zpcO&QN`m#GI0V>_KL7w%(g>0_;QAS{1}nL1(~LC>u9X#QHe4$^)*QG(PN*p>gtT_7 z5C{?ry)_1KdxcmFYh^W8^y6R^;HSNzVQsALieX&G+QHW8#`Ua&HNe%tI$0xJjc_%= z)x^43GhEFJbi^%tP@<=mt$9k>nPc(tkYrpmSY$23WO#uVs3>VbAZXxDwL8=TMb}X zTlEu4YKi1@>!u*Nes2mA$pTv@Fm{)cY=V=GQ;8T{`HIoR0nv1jsosStEl~nBU6~rR zlnYFm7PKGHyoRQd)E!#&Cs`ffBbAyW=mh$XM)f6Gy`bmyu#Gs*bqdB`QGc(g;?Gr&PiS`&em%F#P7L{l@vVYk zn_3kWGE3Hb!*q&@Fk_%tJ-~x(oQo~Yq+=}C3wIF>dC2uc{kR;OPx13}b7?LEzAVjw zUR{dKB-v=W2kJ;H9#70cGaCCCpH9^?RbU&4ciCyc-jz+W37(Hlf`{~|9ySWmLUbZM zpJKuE?IG+XQ*7cR7{IFFT);-zq3FM2^Aaq#7f=@s#21DYFNL}tF%bu+j85DdVS#ut zbYO}hD`Vnl+z^5n5DX(g9k1a%VwBzBqWSd9r9`x{LoC2JHw(g9OmLmp39TO>CO*n= z;PlHIJjrsn?}(EF-iT>ONh>l(`J)*pq(R8)?z2=#v)f$pxa7qAS2n&8dc;AZi@`ek zzT6gpUi{mzQDNIRhfB?ah33I~uYWhW7M&MU7X3f7i2YecfSO14nJ7Ao2H7HoT^ zrjC`FLeo&?8tPu%RR|rB0&Ob?3W5GjGiBfRgwop`VBbS+xv_`dhLSf@@J3d9?v59F zj)>k@a;68)hKJ2zsVOY&YM0vfO2L6gRs-YMqzur{MVaj-Q?OtPmP`W$(}3h_ks4Z8 z`U(wuBqq4Lf4OJP(@}ZiZCRcwc)O%v`%1JB9F~~S@pVf6H}eiF_SG1+_}nYl0@znI7@+CSqw^$=Po=Vbj%`Z6@@VXRr61lh7B z$tP2M22L9ZSv#4?$T|$gWgVN0XCh|BvY>S*hMZV-Sr4{*J|WW=W%`nABqYIb9s{JE z2NEUb9zn+2>ll)!Y~LBA@LK?2QrwNd3@x85xjGB3PSMp}at#z*1EOnhPA^$qYfMkU z+9P=bxt~59dHLJfZ)X27UGf~i#jeKgy8mt{|KaB&ONXu<`uy-$Ln|MCIRbWI&2v0w zEO?Gf*5LAF!P+5tgOW9{{93`fTk?kfVD;rEmo8qrxDpZleRtS(>(D*l{jS1+H@-Ww zcJ_n9&ptqWr~k8$KmB-lM0B?0bQ{oxy)n9OZT)KcF7s{Ro4~z@xNr0~?0V;$Kv8nK z|7)v(^1eos==z`gkA)4DJzWm%ls&x+^M#n_|Gt;C0z{%0VP|q~h!N`SWI?0qB<^)q zQ^Bq5U|^wKs&N;nh<1$V9Z@y#y~hEIdli7}+V)aWMRS>|Clw`zKEyRu6iC*B=JFU6 zp~q1a) zc)M2{MDM;e+dh2WTeP;2hQ5NgZ}qh39bU5yOHL*1kK1X{xbk z79!JnmYA)`UBR5Bvf4}~QUzO7C(32DRn&bn1p0NcDmj+2C#YE9tgdQ=`dn44Z@F*9 zhGL9dPk&gG$`j`Sj5=Dwn!pm5C7A*$Wy%zIiS7B;=fouYupPW-4Apus&^}dHO0-#j&-n>?;<&mX~Ra25U-%51U{E zZ)?k1ew4oLS#y0ZeY;?X{coDa19eRi>?%cw>g^zjH$V~&q3-Mihl;DrZju6gh-b6T zD!!d6&T~0(2`-T5F2OvFsh64}xKtW6b#K6Npb zzMLY7G42(>;a&!?Xa(QN@4=%f+`<%rBk{WF3l! z2u9(7OrJ17WP>sRSsRD>YiIdM?i3+17XwBt2%{tlP%=nJ0S)@jqL}x0 zplxyYbIrTrLO4L={{=QW82PfVJtR82i_U@7qdA@AX5kQJ~D3j0?W+J z!1cgNuh=+HY<%}_`?uZSbl)2h2am$t{gmkYdCs!oaOb;7*M#V4FM4`bHKL;ze8$ko zw}-zue7}Ev=+U^k@0~5a7h5|Y%NaIY-u&sM_piOb5)geoMc>}l z3ngZ_zzpA=7MWLy%xm{gimum-uD8D%&FLS8!a37MTgR6jIlI)_k+VqtmdBLcJd!)U z0SAVOuh?~OujC4BczpSZrRi(aD~#yxEc*La+eA-)$um^&42hoM+_48vkJJ**TecA! zMSpM6zi*WjJ%c6B{(@(}=sBn$x&lkiYt9wzx~pAkc=0i%vybGpQghqQ6W33y@V|Pi z*bLnsQ(E^(esrU?edXOR8^7N5#V)aRFn>aBXq5sTr9h+*fRobqf#F9+z zRYrcw*&@%nQ7W%F-%ecUHdofCxdM~#tM6La8poNWvbL%j+McGx{ibS$wz@N{UE4~a zQ15V7Sr2rU8o{153H7PgxM1MaQN^jF4yWlVP91eQtvKOYDLuf`hQl5 zu`URl{u(6V5$cXEc+>!BTXyGX0N-0BIq%bwl3sP(it-t2$3RG zEUcgxe1e%}NT}x<<9-h9+>xH#Ymz08TK^r8Q@eTnt24Ow-bv*WO$)icEKr!T8UNIhf>E%(}I6 zgK1bc-?U%1ucXAla4~S^UgN*E{8P*QMe)E%xLbSgjL4iVG9;*b^`XCIi)u9=tO?5? zvLQj4PxN;c{r#(hxz{$FjmuqMy|C`=-Uzj>bba0XMepi_*fv~jd+DA>3>_+kjut{k z#n5Qp`T%l1E#3L!Qe*gL)Agp6GbAE?;ci>rupRtu1e%tQlfdkf*gQ~dhGt;56nLo+ zcu5SroPXs(LqO{2T()ckAzr*WeSLbhQ49?gLkI41V(?%oc%%?KA_kAzKrDMj;t)TCQ7GM#Ml* zF#y4=$m}aIFBX^=Mdm=Be&A)K*0%hK4S(Zu=T3T}f28C;RPY}X{fG0~2VOtWTYBr- zTPw%bnQp1+rN@-feK3Da3U_{O`NFa~^rf>H1~wj32H(MD-3H|E**l}_P5U+?eXH;O z`pm5}cPGUDmy7+!?t8?@Xen}{5IG@6etP}H9}wYobaiYR0S{iQyBOu2ImVyyqf)vB#nVd*G)d zePQzb2pI;AA8VK+WQ&<=lo5Wp4ciAJOE0f`==N9nb5AN&W^ueWUd1?|#%w%QGPX3Mo3 z?oZG!=`BwdX}!KIcO(+A;I}Um^YC2^d1{>{NHa(%>@+4%Uz4@sp6kPt(Kd+&g#}q=MF8>3bxfeSC diff --git a/app/modules/rag_repo/module.py b/app/modules/rag_repo/module.py deleted file mode 100644 index 0f3c095..0000000 --- a/app/modules/rag_repo/module.py +++ /dev/null @@ -1,24 +0,0 @@ -from __future__ import annotations - -from fastapi import APIRouter, Request - -from app.modules.agent.story_context_repository import StoryContextRepository -from app.modules.rag.persistence.repository import RagRepository -from app.modules.rag_repo.webhook_service import RepoWebhookService - - -class RagRepoModule: - def __init__(self, story_context_repository: StoryContextRepository, rag_repository: RagRepository) -> None: - self._webhook = RepoWebhookService(story_context_repository, rag_repository) - - def internal_router(self) -> APIRouter: - router = APIRouter(prefix="/internal/rag-repo", tags=["internal-rag-repo"]) - - @router.post("/webhook") - async def process_repo_webhook(request: Request, payload: dict) -> dict: - return self._webhook.process( - payload=payload, - headers={k: v for k, v in request.headers.items()}, - ) - - return router diff --git a/app/modules/rag_session/README.md b/app/modules/rag_session/README.md deleted file mode 100644 index 09caf3b..0000000 --- a/app/modules/rag_session/README.md +++ /dev/null @@ -1,218 +0,0 @@ -# Модуль rag_session - -## 1. Функции модуля -- Создание и обслуживание сессионного RAG индекса по загруженным пользователем файлам. -- Индексация снапшота и инкрементальных изменений. -- Хранение чанков, retrieval контекста, трекинг статуса index jobs. -- Публикация прогресса индексации через SSE. - -## 2. Диаграмма классов и взаимосвязей -```mermaid -classDiagram - class RagModule - class RagService - class RagRepository - class RagSessionStore - class IndexJobStore - class IndexingOrchestrator - class TextChunker - class GigaChatEmbedder - class EventBus - - RagModule --> RagService - RagModule --> RagRepository - RagModule --> RagSessionStore - RagModule --> IndexJobStore - RagModule --> IndexingOrchestrator - RagService --> RagRepository - RagService --> TextChunker - RagService --> GigaChatEmbedder - IndexingOrchestrator --> IndexJobStore - IndexingOrchestrator --> RagService - IndexingOrchestrator --> EventBus -``` - -## 3. Описание классов -- `RagModule`: composition-root для сессионного RAG и его API. - Методы: `__init__` — собирает сервисы индексации/retrieval; `public_router` — публикует внешние endpoint'ы; `internal_router` — публикует внутренние endpoint'ы. -- `RagService`: доменный сервис индексации и retrieval. - Методы: `index_snapshot` — индексирует полный набор файлов; `index_changes` — индексирует только изменения; `retrieve` — возвращает релевантные чанки по запросу. -- `RagRepository`: слой доступа к БД для сессий, джобов и чанков. - Методы: `ensure_tables` — создает/обновляет схему; `upsert_session/get_session/session_exists` — операции по сессиям; `create_job/update_job/get_job` — операции по задачам индексации; `replace_chunks/apply_changes/retrieve/fallback_chunks` — операции по chunk-данным. -- `RagSessionStore`: управление жизненным циклом `rag_session`. - Методы: `create` — создает новую сессию; `put` — upsert с внешним id; `get` — читает сессию. -- `IndexJobStore`: управление `index_job` на уровне приложения. - Методы: `create` — создает задачу индексации; `get` — читает задачу; `save` — обновляет статус/ошибку. -- `IndexingOrchestrator`: асинхронный оркестратор index-jobs. - Методы: `enqueue_snapshot` — ставит полную индексацию в очередь; `enqueue_changes` — ставит инкрементальную индексацию в очередь. -- `TextChunker`: разбивает текст файла на чанки для embedding. - Методы: `chunk` — возвращает список чанков заданного текста. -- `GigaChatEmbedder`: адаптер embeddings-модели. - Методы: `embed` — возвращает векторы для набора текстов. -- `EventBus`: доставка событий прогресса индексации. - Методы: `publish` — отправляет событие; `subscribe/unsubscribe` — управляет подписками SSE. - -## 4. Сиквенс-диаграммы API - -### POST /api/rag/sessions -Назначение: создает новую `rag_session` и запускает фоновую индексацию полного набора файлов. -```mermaid -sequenceDiagram - participant Router as RagModule.APIRouter - participant Sessions as RagSessionStore - participant Indexing as IndexingOrchestrator - - Router->>Sessions: create(project_id) - Sessions-->>Router: rag_session_id - Router->>Indexing: enqueue_snapshot(rag_session_id, files) - Indexing-->>Router: index_job_id,status -``` - -### POST /api/rag/sessions/{rag_session_id}/changes -Назначение: ставит в очередь инкрементальную переиндексацию изменений для существующей `rag_session`. -```mermaid -sequenceDiagram - participant Router as RagModule.APIRouter - participant Sessions as RagSessionStore - participant Indexing as IndexingOrchestrator - - Router->>Sessions: get(rag_session_id) - Sessions-->>Router: session - Router->>Indexing: enqueue_changes(rag_session_id, changed_files) - Indexing-->>Router: index_job_id,status -``` - -### GET /api/rag/sessions/{rag_session_id}/jobs/{index_job_id} -Назначение: возвращает состояние и статистику конкретной задачи индексации. -```mermaid -sequenceDiagram - participant Router as RagModule.APIRouter - participant Jobs as IndexJobStore - - Router->>Jobs: get(index_job_id) - Jobs-->>Router: job_state -``` - -### GET /api/rag/sessions/{rag_session_id}/jobs/{index_job_id}/events -Назначение: дает SSE-поток событий прогресса по задаче индексации. -```mermaid -sequenceDiagram - participant Router as RagModule.APIRouter - participant Jobs as IndexJobStore - participant Events as EventBus - - Router->>Jobs: get(index_job_id) - Router->>Events: subscribe(index_job_id, replay=True) - loop until terminal - Events-->>Router: index event - end - Router->>Events: unsubscribe(index_job_id) -``` - -### POST /api/index/snapshot (legacy) -Назначение: legacy-вход для полной индексации проекта с автоматическим созданием сессии по `project_id`. -```mermaid -sequenceDiagram - participant Router as LegacyAPIRouter - participant Sessions as RagSessionStore - participant Indexing as IndexingOrchestrator - - Router->>Sessions: put(project_id, project_id) - Router->>Indexing: enqueue_snapshot(project_id, files) - Indexing-->>Router: index_job_id,status -``` - -### POST /api/index/changes (legacy) -Назначение: legacy-вход для инкрементальной индексации изменений по `project_id`. -```mermaid -sequenceDiagram - participant Router as LegacyAPIRouter - participant Sessions as RagSessionStore - participant Indexing as IndexingOrchestrator - - Router->>Sessions: get(project_id) - alt missing - Router->>Sessions: put(project_id, project_id) - end - Router->>Indexing: enqueue_changes(project_id, changed_files) - Indexing-->>Router: index_job_id,status -``` - -### GET /api/index/jobs/{index_job_id} (legacy) -Назначение: legacy-чтение статуса index-job по `index_job_id`. -```mermaid -sequenceDiagram - participant Router as LegacyAPIRouter - participant Jobs as IndexJobStore - - Router->>Jobs: get(index_job_id) - Jobs-->>Router: job_state -``` - -### GET /api/index/jobs/{index_job_id}/events (legacy) -Назначение: legacy-SSE поток событий по index-job. -```mermaid -sequenceDiagram - participant Router as LegacyAPIRouter - participant Jobs as IndexJobStore - participant Events as EventBus - - Router->>Jobs: get(index_job_id) - Router->>Events: subscribe(index_job_id, replay=True) - loop until terminal - Events-->>Router: index event - end - Router->>Events: unsubscribe(index_job_id) -``` - -### POST /internal/rag/index/snapshot -Назначение: внутренний синхронный запуск полной индексации для сервисных сценариев. -```mermaid -sequenceDiagram - participant Router as InternalRagRouter - participant Sessions as RagSessionStore - participant RagService as RagService - - Router->>Sessions: get(project_id) - alt missing - Router->>Sessions: put(project_id, project_id) - end - Router->>RagService: index_snapshot(project_id, files) - RagService-->>Router: indexed_files,failed_files -``` - -### POST /internal/rag/index/changes -Назначение: внутренний синхронный запуск индексации изменений. -```mermaid -sequenceDiagram - participant Router as InternalRagRouter - participant RagService as RagService - - Router->>RagService: index_changes(project_id, changed_files) - RagService-->>Router: indexed_files,failed_files -``` - -### GET /internal/rag/index/jobs/{index_job_id} -Назначение: внутреннее получение статуса и ошибки index-job для сервисов оркестрации. -```mermaid -sequenceDiagram - participant Router as InternalRagRouter - participant Jobs as IndexJobStore - - Router->>Jobs: get(index_job_id) - Jobs-->>Router: job_state -``` - -### POST /internal/rag/retrieve -Назначение: внутренний retrieval релевантных чанков из `rag_session` по текстовому запросу. -```mermaid -sequenceDiagram - participant Router as InternalRagRouter - participant RagService as RagService - participant RagRepo as RagRepository - - Router->>RagService: retrieve(rag_session_id, query) - RagService->>RagRepo: retrieve/fallback_chunks - RagRepo-->>RagService: chunks - RagService-->>Router: items -``` diff --git a/app/modules/rag_session/__pycache__/__init__.cpython-312.pyc b/app/modules/rag_session/__pycache__/__init__.cpython-312.pyc deleted file mode 100644 index 76b1ff3fa1afdfbf5ced1813a8deea82d8984ef8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 124 zcmX@j%ge<81ZrJ#GC}lX5P=Rpvj9b=GgLBYGWxA#C}INgK7-W!l1?lr(9g|JDa}bO t)-Os-*N>0S%*!l^kJl@x{Ka7dk+Cac1*&BP;$jfvBQql-V-Yiu1pvS|8PWg% diff --git a/app/modules/rag_session/__pycache__/indexing_service.cpython-312.pyc b/app/modules/rag_session/__pycache__/indexing_service.cpython-312.pyc deleted file mode 100644 index 2272b9f3ce9840e11c85421ce059cd43c3a93ce9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7716 zcmd@(ZERH6mG{ki^XB`*V|&2k56qYG*shIj5>s#}w!^xB<5V`Z$t2A%%zMT&nGbW{ zOu){tLJM2$RaOaVQ&W|yAXQ3GsFq5Vs%k40+Eqv!es~1ZynPGWNc&^A|AtI<33Pw# zIrq&Qk0;QQ{Z;K=d(J)gp8I*ux#ymH-p4MNok03!{&MUe*Aen>STK@MMoKwAmWf0p zE?P~AKibo>DelR-{%Nb*c1o5)D9XeMaVockzE z({DuP6X}Sg*dTzLRn^3)HB-DjhP`0b05SV427y#7QJ%k~o={OtK*HvRM*j zQ8G*7j9s#v6+#xtDqAI+Y?JLx&_^=Mju}z11I5WGjv9&+C@#qbeQNr_h*rrBRCk41 z)t6B{K=o9pUfIjmVU_BjzHVL&`m_eN?^x>Ci!?ebD;XMr9cpF;xuEeha!eCtWQ3xb zDKbG5AiWGQ2-UzQ`{d)M9!?*jsz9{^?qXd13=B`>tI3{W4nOH(rq7}wM8)VcO_?3PF;2_~pOe79? zZHia-Did>@!SYjlrXu*bSlbr_O5znEu2OS+ydu!5S}te$pgfx~K1Xu=H2Eoif};)4 zGAPnU$TTrZ5S%Nk_gAsM}ZeXfwn*= z+Kyl&cISbhpkYIC(pIeU%Bka7IV)GjSlIelan&{pKxbtPz<-d>PZQPcd;9gJ*9-3U zyu1BU+imyuMgFeUQ?NGYt<4vnFSHEgTL!KT76!-igJaiUTR9xM-SWyE>#M5Aw`hM@ zLT>)eh0DF+5y#TMAn5pwgIRSna7Yt zx#z-`KPjnCoB#4Co-XbfkDTQX&MqrAi$XJL_FG%b=DUgFMLubMt6&u|8A z+&7{1_f5V7M}sEnhbc6-e)No^2$JlFYIg4Qo_H2@NuEA^njOAJ*5O1X zc~pw*S=jkl5mt1>7`1m8>~$oe>;XjYiIPyZ0)SKa{+53TUI`YuM)O^x>V~g?-Beq) z6)mKDj4KhL+kKi))PgGl?S+i3N^@k=nMguEZJI4TC&M)eCjE*@^M`3R6+RKm%;GZQ zax}v(3yn|6DML>y56ZN$@6A~uix0kPTapCWiv!mILcx9#Aras$Fo#U0%LFQsIb0@ck> zMwhOP<)d%tB5T$T&Dg!LRu}0Y)GrMEX=#B^<7U^Cb|pyQryxSPY)dxX4?J= zt}8HY+&ST#vtrzUSetStyt7Z4bLJi74EV-tO&1u%iZ8g@GhT5qR_m5lT@W!RDn1)N zJmAlGB%CqTjy+E@6$d4bCb=f%#BgPvC#(Z^Ta$94VV*exz0g;zNpW--Ytj-YabQoy z$GJgqUrl2u=HT^kkvD8_#pLsb$%ozZ8FY|Xl7uSUoIy*h*NYOFu`Y6OiJ0K+;ru%% zta!aaUCraotGIzJ3X4wYWj$*(_FGwnps(UpxR6d+PFYXcPT8wCjTXKpRdYILff72` zEaj|FLN8k{*`QS6Ud|4s3UB`6BxHfL+hC2nWV>kjf~3kk`jR?g2R(5Bhn{NWKd=8o zi6J_u%&e{5EYS8T7VT%5+vRG&?NK@LQli^__B5Nf#|pO#&%Z&QYe% zAWBZjm2>=%{K%9+Q^Znyz`$1Xt8RmLFb?|DEd9kv`-|rhwEz2NJPAVtov<%u3sBA; zcnOPfwEs0JjvhcwdP2*cHO-*-gqCQ{YtrNFj^w_`OWuouArp4yYj*lFSlv^OzjlCb zjq2D5?gTl>zf4YWOv}Eune-E8kFh7SS;!-WI|1RMmw{L4vg+-b(^@xaJlPaIOvAHh zfF|lib_r>|XqHk4L@*}}9@X&H*38Up)9TicQV{x~Xg1b7e;rWqUHFya0Nyo~Z!7^z zwdrvW;3aUvmmqS1kqwAvn7}%VYk2fzhurXq4R0Bqw0P|32m-ucHBb2kYrOYrHZ&K> z%+fJv2!0L3=OBDBmpz(@DYHSdKFBDJgbj3$mbut?BH?*k_OY24zOeW4e$8VY+*R+! zST}h22VhWTFM!W=|1{9{HVKBLzLxGo6EQr}qn2#X&9#aP~O;NCSYLr8Fmtlt0AgoOsK zAV2V^u+1sxMi{$gUfgs4tKAweikDzG1uu7aQRG9>6)Al?G0qPG>VLa;tg9 z(y0_Ytl+_=S6E)0))Di*si_yIC|D6fQK2<{YGjwPAMnVL_ICJZX|MjSL({v^{Uvm4 z7&<5=P}4u^hsRU@_M1y@Uf7fObS(;M{kjL_FlY1KXHfO|m%Gn*FZZ4AyVP;p7hD|s z=X$^D^*^v+8@*+bwfxLV0-c4XzI;>P;@DdURHygtgG&bs&X&Bh<-+tG=SCc==X_7W z*OB*iz!0jpP2ITd+TbsC{cM*WiCQ@n&U=rPEJD5e0TEp8A_MjVoXb}cV3IId}Sv7UszpiA!FP)ceDFO_szZ=eRrnjZjT->3?I*Xzxs~lg8x$B{a5d{ zb{AT==UcbG!++1NZs~r9zvJDgZVqDJu69869q(p!+aTs!RBywwV8J;*{N6c^+$!gF89mem@UZ9vo;@sflIJM*dC?71 zeO?RzeE3;_G;aJ!-_M6u>UWn&z~y6n=+C$IBOmUzbgE6;)#iQIqt_3wG#$L#y!FR> zez4~=i_q!=x~*s@b&Y?X6YAFPYsxPcezs5;8qW`nue=n^H%K5$+`3Q)>I49WdcxL& zz^qTUYaA~IvxD6 z*bKXSR6N0W^iWsNYIXi^TBf1;oFG zLU@LbA3tkGe76X_Z*gX5drRaIx8bO_oZ>{A<(7||XmsAHw;&#{Ks|g`fw({VA>puQ z4~KQz3%D~JKAw#vbPB~dImNI%wIe_eg|;Dh1pt_>n34hO4IjBEK3*w$==3WHwjw}B zoQ4pfC8BsWv$&RSozQ4e1bERZB>-nh(d01i=RWbY6wQbfMdDsxv@q04>Y9o+hT4g@ zwdi1|li1xQ7efQQx&GR8kwA96;ktAqz|fU%yi~%fq8-U&tnMS>qeH*5>*Q~R%VfLR z{yvxw$gU5v?4!)ep_hKQ!0?sVj+T&AT#wCQ5^M%G2eOrKhE`q)=f8PGFUhfT!*6kB z-!&Ks^N)BvUkQD?j3keL#wa>JkPAVd@#P?$Na$CMqJIkV!PlH#1up4iMCpyDlgV_d z>b_~HrW#kSel0d4sr(rTI;P;uSu~?Cd1@Q0X;q(QdNEeaK2PZ)MGeqesv9e_5h_c) z?4woqXjWmWv39(26ZSa^d;|TPq^>T5LtqO1BM_s}fNhQVP4qoqZj<9_hbFc0UluO`Pvjf{-!se*o=C$SD8- diff --git a/app/modules/rag_session/__pycache__/job_store.cpython-312.pyc b/app/modules/rag_session/__pycache__/job_store.cpython-312.pyc deleted file mode 100644 index 571b827958940118427968f837959f21f3f3c56e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3863 zcmb6cOKcn0@$HA?az&9gDT$&)O0;EHUOS>{$3R@ebzLO3(IQbDDGp*Dv|zYvhXgqH?6Qz2C*&oDS=D{Pg^ zbJm=z@YO&*V9ohTuo}vTszP3{=s+c074srPRE8xNi4wd`l+Y$?e|yt8B0pfQ39uG+ z*Yc5uC=L7*B_zfSD+Rq!tQ0g2h`{o4NjV9V!TG|qd3C9-mGnAoNURw-PidWADl{tf zf?|qq)s^LnI#;NwARPT!O;Ksr6f;T-*JMrAv{Jo>bWpSIM$x|Jpe3p*^3_sB)y&A% z0*o#dD;A0$sPYFT-C5peGpZ#`vpI8SKt*dxF;kG`8W>TQO;MJsmQi6Ik>y`57b?yQ zr|Hy;$#S7qtAi4tkS5DiKt+OYUp{~N{2O!-2pUBWSE}hWhU7j(`w_(v1p$3Qwg8hC zhYCwev-WA)?4FCx;^j5)xSCsPPz+!TLHrW!T|mDge~S-y_+eux+2NB$=2$m#qMbRh zdZ9Jf;ZGQ;vDLTMUhVK>#%OBw&9$ixpEAbNtG`%V=iO20 zdxzQs6HocWblg3tFLHLWWFD4xBS&FWPGJ@9DzEUj`8-5|8cNwlKpD00K$9(7 zg{_|rreOV2w~R6AflWs{hBVm)BC&H4O9w!P;sqta4m&gg}dDtQ(i`Rw(Ffz8nUHy=+t zjb3VTh7h?UekgW@Ok2p@D|RPx?TOr@=wt3L;+JCg+@g2-(*}rfp1uiX+UGR#et2{Bp#se={vqFV^#3LE#BW}bR}C;`D?o2D^sb`R)i@^uGsmbe09M zKIYDMM^{%^#YFP}a3?%0Ac33p`VBL*WWNq*4px^F#z6GW z*W~}dUFZoW^pYPjLd`gt{Z63;_PirY-srLY!=F?b!>r;aKN+L+2KRf_jzhcDr z6(f)x^=t>S$u>DCb&(g@tW{VnwnL?$_o4-6lPj31l~Z+#@hNdS?rVUXTkUHWqpWh6nF$;m{Mu0^$bO zBQQJ=9-aImwuRH)sc1mFC-evm8}Dr6U>}Dk%}Imiz|KD~Ril{uCXau^tmlt;5T5Ee z=c%6C^Hk66K31(unsF4=;Gajepyi77YPDXo3cTG3hW4(O@Q+TZcFp<^VHbVt*8P@v zA)K+#JxkAlQuuDv&}vZ780I-S@SKeNgPi%6y!M>T_JV{R_?{J*AM^;IEe^;YlHZTK M%81_)K-QiA18DH@m;e9( diff --git a/app/modules/rag_session/__pycache__/module.cpython-312.pyc b/app/modules/rag_session/__pycache__/module.cpython-312.pyc deleted file mode 100644 index 79725b1f5aaa745ca2e1fcb90c2c27b95e3d808c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 16053 zcmeG@Yj7Lqad)`GlLSZ#B={!5haR9vP!H>Ai8je7lr4!-MB1^TIuL|AQlJ2kz5`_u z1~X3N)MV-;QqqLdB&nE5rx7biJ zqc}QB#pnP{BW#MAVoZP`FcW2C=75>NY}6972CM`&M{O~Cz)oOG)DbHQln~e&EsZ$? zP6FGau2@;1jKKD2d8{H(L10I8Q_LN36SyQ=8LJ9Z5x6w!iB$)x3G9s4#A*Yz1a?L1 zV)cP~0+&S_VvT`D0+&adV$FeO0#`)6v6etftToUYYYVi++5_z*e^YdGY)fEEY-?a^ zY+GPk%op&{l!+RkIQQ!mS9#MUuSB3@s>|oQWZHTsCXNWgI94bhh>V8%&xI04VrO}dBaJGbiF5o#X!98%e2y0rLMTD% zI!XSs<7bE99T7QCg#howxEO(qDaa@p<}W7t&rQb96GUZDKE#V+WIV1magZ$GLL^K^ za^wOZPxMWS(AK4nq(2&gO#Rq~_(TGRgSD#ETEpY#`S?j;{6a(?wDT075T=e?e;eR&tZE!$jkwym*R#c@pL&dDIDgc9NguIdzGoay4Jek(XpB9-0u( zjVF}$fVQSE!y??(x)Rue1h00gZ=w{)J0n#Un!qBfeTNltCqFjjW#te6a}-YnXpRb) zIGSfT6VGxCZ{}FeJYwT4ud@LQ$MV(@6K4h3roc9U?Ner-U9v-W@)}8Y9`_-5c2bng z0jfSYa(zGKFMP$M+(eW^%ld33C2o@6ZQQ33;Fot@en8^x@F;!9X7x4XbScLrDV3jy&u1QL5|DQmC!;;nelP zuG5E0T|rJi_O*C59#rs_>F}C$J5tV7z@BVUS9#i!vKa1(yRaI%d6^TH>TK7nm%JyH zx<0Mz;H_E*ujc`HJvzKLz-zP*)rlGvgKoTQ*GQ|O&`^yIuYDc7wc6UR#Z_2udG2*O zTn^aBdUZ5~-;^fHX(~kzQNH>?BAVdnXA_}OFJEaU-2_39@KMPs z$S1tu1MQ)N0ii%=JkO>E|%t0t2$W6v31U$WkCow^_X~8V)#Tr(HfF$~ZtNC*+E# ztKiY}ny>>aZIb&A>PDa3T{wg$CeKDA;h;eDZU3R@csLXld;A}5vA0~kyZvx_`{9hIXJ#N*({SB+&6%y)o37cLYu=J=-ji0h-`m7RrFjoxfySGut) zS6w%kypmkCvX!np#X4Od{?<%Y_vFpc=)Q=0!=>KJzMb@9b#-5dW6@uN@BzB7n_WD( z7vN;aN4T#0Ro#-nj!bulW#yXeL0F+Xz)VpZ&!zM{XWlr^Y5WD0FE$m_Nsi`BDe61a z_e_Oja7;U(NZ%w;sq;(ptl5a`#xzB)&?W`qXABjkq6c`9(eWaaV#YKjvrzRTyvW>Q z*5ySu;Z|FwSR?*|Tut<=H7ROL6V-*hf>_r$ks+M;1mQ&Upk$AaCxRp6lW{IteX4iB zt1y8Vvb`kxpm)I}Go@4BQ7%YW6>>Ee@;PPBWJbYQK#mbm)JqH?lsU6ZkU`Nvu|eLSMIvIo~Em>F8PnV8(%u|+*0TB%P*YGzA%!0VI<=j zT`C{d_;ydaW>2oUE4QyFyYF~<-|=5Iow(g{_2uiSYpL&j;r*r)$g_KkdA8%WnB6y! z-Z!vxawvN;kUkm6o;;I2d1l!iS}F}8w>A&bGP|zG?CR}1L@%~g_w8{k9xMU)j+yQ| z$lkH+0XVsL1MG@wefO(+xjRj^Wew}%VMLD0t9sUDHq5%To^^#XIJgXs&lGijAMA5e z0<~oF5XPnnV{7be#JB~<)>(rT^kTrckgI8-YCmA_nGBCPlOY?LjMxw`7%(E_8rXqC zi*f##W`9L*ip~gDeOEq@98YDAO}D%sIK^k=P$v zoCJL0UqPZA%Cb#2*L9_9zBIF`Yo`BKZqL=WY+Yx%uJg9*{kk4S2K2vs{N0|V&Qr_7 zpU)1TO%I>Vc*0BN;k)i_$oNHvZmy{%+ti(I>Mj&`+p^x>Y47e_OMA9uPr7AK?#Z5a z4*c}Mx)Zd;Z-9UyyFE9`h?+nug_IdzQw3|+|hP(-PCso&b~pp%C`9?N&j zzJfJOubtO^!t`&@Z?KAISXgyY@D5Qe3!XZqKcm()OA}4E0)TvD4c=@!@zUkJDZ4xro#I1 z;jX!17%TI*zKp!KAo8dvH4P5zY1&TVKd?0vty)V!m!b{y3|7(kO$7mK zq$Q;^C&Z7~Z!>c=7+@wNq06!7w*jBhag&{TbJ$M74j71ABdutbnblku#TE%oP2nmI zx8b}EcC?)mz~9fA)v>)uz4_ED)J5h+>J=K=wX{9XI6$z#jKMP6N0}*_Qt{%BE`V@F zlKC}SYhY?x6OkAX>b_(H4?8&4L(!!3p!Yn_PlTe83%tXzV3({RaVj2;j7zpxLMS-L z1z9YjnkiXAVo(%$iH(D2S}Glu(Gh>VuoWwmOvc5@vtn3?oaGmQelX8|jt>cmv*1UT z%!Ff!B$dp>{8^(Rz4n@7xs;N6L2%#01wit|qsm6biCC~{^yo%mOe^m}A`8xcEN}Xt zq3NHD+kh*1Nky)^J)4+sN&t4ZQh-3-u+vOhVEN;|3ky>JOkkUyoIVd zN`H8@-3Z0|l>`5^5`)QHvi7^^Kcf5Esjs&8*{C1WeHQjFw*$1;$Ux>|OEZ+;q3FI= z_6}`E*g`|;9b08zGjpfG1a3*y2XJ!k+B@E=>uSmdM zi7bA*W!+f->Z*pXW7vSCmtZzq*=OUqCVrqhytUya}XCnIS4>_?3HQF^= z6!7>}6?LLMkdt{Fa)mf1osf_t$$Q4@eOe(yPthr@&{cBZ$0W!z*vTJ5a$h#2AM?xx zVwGuPN4jpu?S^-`rMexNx?|bOV>3tolXW?d(yLyoa`Ugs8@}nv)%!o#d^p$Y&-uE3 zV`XbMty*n(HrwEA-b_^;r|*ks27S4AdtVj3xP$I&;kyUN&!Rd5!4;@nuKbxmiz8|x7qRz`Y!;o#IvXOqr! zX2FRiE2TZKU&4M&o`u9$s+htPlL>(oZO5XgFd=F%dZUaiUttgndLb$HIk^ahXilwU z_d{7_ZG+bl=XFSmd`)Q265r6ybo0(!eQUP9D_!3O_GtAsut%$1GXo$)Ya1Wa{q%5C zR&_iHsDCGIs^iF*@V`cMP+3O;!i5&a4lQL>$)#H$1xTvEG z>_MZySTV=+b;nBdZ(2)3ZRTTpbUzuaAbb&~Cmh8@;Q>PV=&hACoi8Co7~up$>v?|& z5BOw%tjsM%Zl5A=tZb?VRez6vgN&inzYIeWe*lTX7me-N#_n`u_sn3|78tn_QLczeg;t>E_;iBH6>h^JKnHJ2k`HHrHTAy(s6=GW2Y5Ul=HzHA zI5OmGg$;Q)JhkZCSS?dECdGNtSJ_uhC+m$US#?bS>1q#(T|&_1grMJ`-cZbE5XoAl z0$@bcvkxTd*+;uhV2uo9qw9oO>VeJ&W`>$!W?04fU@Anhfb+qm8uyRpd=OrObqE*M zLJryaf4>8@_9pa`>UR*%z}5*ICg&lM?JAH0ig_=f*_Ax@&;xJ{_dn34|1owofyv95 z2$+bNBruu8g7={gf7J9LT?qk`-);55BE&+wR#6k>ZLcXTPV~O06NepBO)%bc06XHL| zB^B^I6Wo~Kks^V)5ROiAymAW-x8`_ifaj51N()D@;%6{9jY*1>MfuTCcuKg0IbX(P z7Lzw25lbL}T~QzT8r-?&q8n}w)zCrznu1-3;NL(r!xi`4in{r#dFyh;wi(L@_Oh?n z&(<$hZCgI@*_rx`{S>&0?5<`1kvxUJ&z@by-xY>(4AG=0Uqd;{1{e^|*CC3!*}A35ri2N*{fX?9+n7W>hUPNvc+s=Q z$Tn`Z5hL6B$uqM50Oap9GtEw$AtsPXu_<%P!ZF`vi#$eEs`2neSQ+9fT40SXJmDBM zvYR(!DW6a4N_LosU@7^&R&r=JwW3s7xTNJp*)NNGt;lrQGfR3% z?kq@hm5e?T&9v6LlmPaD z@I%6Bo_g-li9`;kK`Lp0?l0}^_0w-v_ilA8mXrXv=%IT%*~MxPz{xs=Mhu)SM7Lc- zG@8c+v;mE1KDNh&#Xy({gu%iwf~sH91Gxr-WF$7BrlY7ayh3iNVXnb_F4WzyCq`(3 z+6Eq)G1OO!9(|Y#Xa24g16<@^B1GZ#^$@fm@h!p-Lc^G#Y7dHT!3ZJuQKTkut3QvG z){8C?W}sBWV_Ea6Skd-Ce@e#&0tBoFYVw!P`Ly}9S!Uz9!#eoj+a~oE2;!d<$9-`S z!L*69qzJ=6NPvwHkae(dYa>zQ#vDFXQ?7Ep50irnxdb1>NMvGWq0EzP>S{qC(w{&E zK_M~W#6|fqMP7u%RFQo@fVbrK4G@ls^}nHkI0}g-_O744c6!NoAk%p8{l?R8kG^yM zC+FYmTzVmp={XJFX$T3nU9)9teCZk=%0f@$-1#f#=eOS2mGSs7p0Gn7PY9PdRSj2% zF83^zw&d+3!WVh*Qm?1ConEY^dt2GXIy=BVE3rO>uR|4J%9xuomIFaW8Wzo zNenTP-eNTy3CtnQL;}Q@PiO2c5Y%9A{nJn7DfqcHyox`Fww2^Va8|iTv50&Q{9*~i zJAy&U5yWp2;6p@!OM}6eCqq%WM8Ieep#l>;G=!a)pimONfytjivOp0Fi!7^v=M+i2 z0El?M_&Sw0m6;v$+wv6r+&)Zx-iwi+r8C?L=H^=iCbQ@2)CznhX!hhUvIoqb`Px+q zeq`K;cF?z7vW|ox>V6_3J0vQUH^2H}g-EiI7N&1VvMCMWRL7;KLRzin2*cmgSYP5C;-T^W_03 zkyvo;+jA;%R+W`*?;@$JTTxYeF;z;ks#GdbrLL~5+e&Jat5isVw}NrHs;kOfC0lhr zC{r6|m8)F7ujh&33?8(d-MeHc_4IUq-P4b+zgK@f_!F1QLBaK-<-4P)F^c-H_#j=Z z5TVy5A##J_D2^VdCg`&?jd9bsX@WV+kT^4LK5K?F^Ef+UIcp(l?6`HpcGgBy5ynKl zPH~oxDb9M|B-D9de8*Wk$+JP8UCKM_m}3HtUm!$)P8WqIC#PcJ*yz+`6dvtdI2Ilr z4@aZ@@MMlfW@B)7T#Up*k;#jrlaXPuW^!YM2YQW%$PFq&ouxVItmzc=B*Ji}BaljB zj2ttQ7z?=;IcAk(HaTV|F$cgE$uXxKb75?*IN(m(2f`QMm^wc&bveyMV|>~|+5 zLt|6tL!(@}m=9kJMI+HD^bVgbQRwMRG|h}o#?meV8sS10M#m%3wDUq3?$VQcI6OQO z35|@##B7g{Ffkg93Mnrf@IHUS-#;}ONjoAuKgEZJr#LyzMWVxLr;t7|#m$UI`UB>) zEfkszPeekYv?CM}k|FL4g+7=GkBd3(P)Ic?q0l{Q4afOKV|aRcmry3UOVzVod}Mkm zIvShe=h~*{cpJcy05LDx0l`0{{-U%ZX|70>S0>GsDX06lkEhDKNwYU4Bv(`=%~dI{ zFKPCrJk?2awHTJxu9$228mYdFskcBXT=ZHBLS^c?a*qDke3s!VI1}8>oR?$Z&T^HU z8SWOYieuq!#Hk%287O0czfqFpY_HKn)SIN>3bpU#wTU z(^SqfCJ9!$=TU}{V5NH=Wy}(+bkCy<-Sa48lVGKL9%bwj ztaQ(#j6;Hz?s=3cl3=BK9%Y;otaQ(#j7x%*?s=3cmSClO9%bATtaQ(#j7Nf%?s=3c zkzl2J9%V`;Sm~ZenKB7hy5~`*T!NMEd6cP;V5NH=WxNusbkCzqr35S8^C(j#!Akc$ z%J?K$>7GZKY6(`l=TW9cf|c&1j9sF$%3Y$)M9Kn5Op=>uYL2R>_E1s!vWceNp=kJ< zqh^_RsLOPqwm;t3HP90r>hbrS8S3dD>^<44NJw=`C$0t0Ese>ynObu2j0d~koj|K>pNiQvFH{^LFGv>KM5 z=BLJ>k?OJs_UsLiPV}GZ>oYDn%tyj85T3#@|4{FVp24Bui8qJN`n!8x3!ds5@^_sY z80hIA3dwo8O$g|whED+p)y>H2Lf3=wbj?hIM)nP@tN>_>n^{@IBQullXI)jCzq9xC!JdKMU|)Wu z=PRwG>2PdBoXni7jx%+!0!3a~ zw((aBt%92xMnW$y{CLl1YPb~P(W0QL=9NOLnYug~;Z+s9QD_Cxxo9jh0TzdeX)r*@ zsEGqx@I-;RCx*s|(F>yy7#tM?M=BRTRdCy4;qk~Mm|a5A;VC}i?>>17Wtuk!db)av zU_`3@kuK@cf0sU}5#kj}eRXS(e{=2oT4;LsUu{w@IzJA^F~Y>Nh?1~K3Z>v+BvA`d zc}k9?HPMl5I!MIHJg>PIA zMAzI4+_-q5>(jWVLRXS;O~Lz{k?CU>hU+Dp%rkv)h}Uf zs~_=DUvbe-4gb+s5xV~FuiM{5`Ky3+{&xd)g+Uf*d=}hQ&4oU)>ZgYP*H<%P2!dm1 zB0T-|GN6pT9+{sIWi2N=5m&Zc>Ko=>s*x{13n_%>6^f|3GLZiK$KMn!FTMTUJ!dqg zs!?v1P*2iB5CDbEH$PazR4PMrrn(o1pUS_+OlGdBHzP9;e=GlLfq`oqDe&}GKi)-- z9f%L*U!@|OYg(yg)q!|d{WWN8XZT1c7CsLfA_R-CVkDNjA+t0qfD)f!_fDSgg3 zT*a$i%2k5EB+HFiC74wPSoa3sLjqjRC`Yx?FFN-jw7YsI)#im-J zsUCGNvSgKFsd6mkg;H(mQZCGLV^#@dHK?;3nB~N*V#wO68kXs#?}HU5uWEc|Q*r1% zNc#8{XH*3fOZsM3oR?H7!$}{v;*6+L=99kft~fuGQ&uUe?t}?E7pnVB&ne1v(v*>P zhGe}%vd$`5OIyF2^nHl%L3QGXSWl1ucarqupB%q>V*PD1qSiV=uxBKE5p@D8etO(} zd>`{C``F`0ti$RJc-&TpXL{}5K}2uMKF4-FlVI}Qu20Yj6KA?@Qnrtv?ANv3#PrAi zn=Z%h?FXyt5XuxM)!RW}tkn`eWwS@0%byPRo$49%H@8Po;c1^9<@Diz6@l*bT3>J1 zkoF}3u>AN>z1fYsVuL+He&v<^4%ijz>O0ll)7_?|>h>sL0?!`s-C>{wydS15VCEa( z#uq`5b||I!9gq+;LjV*^Bw@uf)6obYllVfsHj{>B<}PCSQxE_Vb5(x-TTfiumR;MD zuKHD~2nbkA#9y+S&A7rWC8evyl&@(qzU*m#USfx}R*q{;K+Z}iw2md8Vele~?Y*@t zSi(FiVT0AyVbN6!QYlJyCHYVAunD{@z>S16CFoIF!pdwIInTtf&E!hR?jge_a74@4 z79BL+76m*#IM~zI1Gurr|JuOG6PZZ)_OYIU9(58LkUIQ`a(n>Z8?X>w#&3f-za0a@ z!)zBKvEdQ)yE31jni{{SLI{EcX@;M=ti=RL7KqG_Mq^PeCS>OR8+cXpT?jT}0&Cv_ zm{97y(R#fVFkz|UMAFlrD)HVdUh*`pu}oR3}gOMT{|~Serp5t3E1$)Hn?rHBr6|nwmCqqr)+NH$*k)Q-mInB9g>? znN&oT^+#CpeF!!pj@jOji8vRMo{Rd3bEoQ7)u+`2ebyN$_sl_U@n4Ny>-zrOk}a?> z1i^X{q_0vCh=|l4Y+)X?u)%%SVI+alh0cJ4;r$^*Hi1aygt-ugmjJKN+l)k9z{A3v zjldM-VF8G7TbDs-S)NK>ZDsT&e51lVNS3KOTwD4CG3ECvX3)hp5tr8yzl`S23_P6r5nU7 z8P}q^kSG9&E+5F@h$FJGIhs@^c_SlB6cda~WcYPJ0pZygUaPV~5lvFAvMO~{F07;( zmsa_0K)DDyP3Hn8?ivV;kzBx{w+4a>QR4!t{ezA?y_5u*MV@R?Vu6*fJL>^Ee+bqB zS@mhFIEiVCFgePiO0#4b;6~iWtzyFk5>lihA%w8tGUMGC7_CY{7Dj$e2#gR2TD?Q) zvmTjIa*|LoIt9T;)bnbpxGF;!-l8QmP85cVK^XQ^wauxm4XL`;)Yg_%)4^2pq12Wp z{8zX0S(yVA(rq+85sNrxl#1a@l1mYieoX%pT1QCoi$apQ-`I^%6rR)w+Nu$;TSY?D>K74GIMLAR zSJM#VMFZHRr4(Xi6z%{l7NrNPEKv;`$iQ#M*>tHVG6E(T$P*foS!@b!RS z60%~a)9ffX2Ss%)B4G9(4-ZE~?=7t!oSEwZtS~@cvx*6z(QqK?8(cd5?$WvUmrjkZ zI45Ld-_q7|N#A=*;R{P6mzKVLdBr&kSx=mG%g(w5^TOnV$cpm_0t-eHJJh=lY7OuM z2n1{1t>D&9iuq%T?X+hqH@Gf|xVgGH>@_D${E@;G9F0XUmvSWIu%0!LkHutrV1ntU ze!vc!MnIrG2V8xgRoPxx&Wr~3`_N0ge#dmR)C_R*@==<3OF_M`e1%?U%Ti;qjxV$h zLlDbpU}nl%G>^$lPJy~FM)lU>Fu2%b4=)?rme~GyuXb_eUX}h}e>ZX30HHeA|4wr| z?wv&g0TWT&(kyw54{0kdXw@3LBW))8bh_*ZjwVj=;OEODM)2JjkVS13WIwW~om^x* z5{raL6Vq0~cquIMG(F27gF;c1kwlSC+{6L<#`qkp_VDDzjhi?bnU%QO(crX^RaM|> z|H569@|53jUUxn%uUhhP$?{05w&lUMmdiVzvkb5;8&y&vXHO-|r!%sj*(gut)2gix ztv|1O^}(JWGYi3m3wL|}p!jj!tI4Y1HCC_kQ_JNqXQ@0h`-!K1*;BvJz1a4!X~om2 zP?ep~{#6QsUw!GN{6TuXQc8Fct%DBV3Oc%4nMd^%T}_Thhk`rc;ipY3hOKPZflQW( zQ$dK%KieG9DS%~aiH08AlNM1{ITX(hXP9g+0)hF^+)bT352VJDVD%QUN-ni|EGHAB1T}_c0?n0C&Vn^+%Sj|IVHrc?g64wr%_0fpY`5jJhctDS zGgApxM_!JJ^0K`@?1YlK;-)As3+$MPoUkb@xO;=(Dmikux8qT0e{fJq3dLq)AV~{O z$+}f%3JZeomM)+uMTj1hptwrzC`ha%Uo*4Wy@0ahEPIY^zws zx1?=Swdo?&FpwQ&^m*z2@a>@~<7129MYAOvZ<48xy>=RlF6n4K03_~G&K zv;`>0M&0c(^E9ETx!HG{!{AK-)h3I0(a?{~tef!h8?F;)B=I$PS zT>lRq3?%CgrM5Lb*|u+a+rEF@^^kdZa`{l-<3j^WZw@5)4<@$_rRuidxqR#L!d$X$ z&oevhF#nS5Ff&j;82UWkE3WmIG}^$+T~_9&R<_Gyl@BzVp~E-{gtYx7A#EHSU;dQ( zec-|yk2dGnC$*qFbM77x7i+>KE^^bS6vrg2P$M&Mi^+$c$502+TnU>VspI4&e_td6 zS&5zR+t*c4h-tS*1`K9D-gm`s3$dNGt3fu1yFcx=(#A7_yYw8!m}Q!fdw zAus6mI6D)&@Y131XGUgE6fv}RceVSFF3Az)62C}xvKkmx^ zY`gwO0p>`X1zEc-5%uhikV$+Fu-rXwFQDt~o9}z({=b2PbfzOf)?wO&NfxIdZSFeR z-II0_)Jd<{NG;1|DQbWpSbaDXhjFg|M8BTDkGzc$`4orjyFR zwrtMfyIJH99jf z5$5O8Zh|KYQW4dJC(MR2Y9=p1 z@DT-D1Y5Q*v@FyvRkvMnYu(k}rHOU6s_{$e9okiT&7AVpKlbfi_|8(*z6X0A3_W;l z$@}s(=4s9LJ4bIFU9A5}%e|HdZzo$ik~K%4)Erx`IhL$>_deMFV8=uHVbkXg zpYMD4(!;u?`d+NS&O!zI>Y##GX>|>5tf2&I*g@@VPu0I9yp@3evdIVFK@;|FHD*%w z6EB;v@9PwX&qyfPkbl(qO4knNr#slLUDjb)_kd|ZNt)<9KLf&Z11y)gK?f2%jpm6> zX+D-5E)4R=nb1a>FoE&K4zJQ&oMJiF&zE%}gYt?gM!&rLNhO2wvZ=)&U;b2*LB66H z>Azq81QJ(tyGW%Up;2m%=#5t0agjf1Bxsdj$g(AD{8rAz73*n(@U<^0Ve6K)qx+)f z7>DuZJQz;GC+p@>S5#w#I2)?ZaLJz$!dX)`a6xMX`qF=3`Hx~=B2#lWQmd;$(XZdS6ecqbK^>KiYnsC9o?QI z4OX4#F@6gV-p$}KMV|s zXjf^AFe&LG)!?UDGI(i^b|BKOjDDrvnnr?!U(w)D;#FS6qwg3$jll;P;P+wqCKyRId0MeRC*%)e{!{t}4VynDX7~)- zzhExY_vrq6G}%PBXG)vecJn8onkbrHMHkx__9GYJyCk#I{L%Q{%v}H?fD<<;ahss+ z$oSN7cszQvO)m4-D1M{k>wl;I=SS4z=8gx!e_pou)=#|4%^km5!^VHFqLO|=p9}xt z|2HWio7G+-UD4%i2&>QCFefL6L!jJTjzHxWQV5vJB4fN71xRtX(6CBCU4lPK(P1#;BB`9aIYQdB+6m$P6`HfwWI`mUnea$@#T*bGO)wr+x2Vlib`6CAJ< z8Yk~{5&|ada_V|>@OXA8Z62E%ofLL9>)|;dnifcXgj|xX%pL+d5s8JxT}^b|N;5Dp zaB_Fzdr{oo5XoX0Iqxy!G;^~vlNv(|v{o?t)_PVADM z&PMc2YyzcwfTsLSDSvaS)}Lw&e0JvUnZ>DOK?xDpKu(6rivhB{9TW1z7CbzVunp=NjyJuV4)0J%Q&Zwwq=V!BbXP0&d zlTDq^D)AKSAbk+Lh9_ytxAjY^k=Qf5)i*}2kKFuD(!2Aqch4e!jrrpBH*VH1FrV4( z+JGKEEL&;rNcuaLt2;ht9#?lQy*YHvstW*R$bs&j$Ld8THqBa}2nRa7lZBdb+HX z2OphgL1)LEa?Pc9qh;)jn&D87MLE=?r)5iZ>+QEndGi*n6Uv7c@Oc9l?~Ca320OL$ zR%LHCA=@9Wo36Tvx0_YR!DGAN;30a8SuaxoYd=2&{o*e{@O26oJo@nRV40wJ9Cfu= z!6zUg9>^3Z_(+T&ja-W8$Pr~AlBnc}+Kxr~_TWOvozu&;9lzq|@fF|28lUMh6wzOW zDAE!w)&eeZ{n8CBE7=m8YEhgP90F7m^#9W}&Xp7?1S| z2HJ07jL3($5RvBNC0J%{(%i+p`g2-}6L<^CeMF^-ORja@IClLQ%-v#WrM4qk-mzQ^ zG-tWE>k6YKt4`wat@0m{zIp(T8gPs_`tZQAC%9Ho1Rf;bOrP&cAT{d@lwYl;w(t14 zd&kY-@0zc@^?TOG?j1|E9qToiMM3a4Ush9|rYM><|Lu{^a^}%1rJa8BAD6S8TQdFF zZa!PS4}%SUsjKtEjS(8dxqEsZAWC=QssFjRF3P227rnjno$S zHHqv-YQ?B;f-MXy8ln}Z4k#dMxrl5Ll z32W4JjlTLu!ba}>Ik80kH2~Orf|IjZF@)d{SE+W2gLi#|CYL}}zn};GdgQHLnS>?t zM2wEqbr4C7V!dfN{DA)P;9|*Vr+H;L7$}nLXgK12g#(>KA!i-@QtAj2g>6^K7 znz+b^cyud72Apem2ENN@+~C{}QnL9JnJdUDdEL2$Y|_I4?4d)giSvd|x0>OE-Rw#IO>4%dg88p1pU5O$JZh z0HTM+)`~a>dJ0-o1v|iYjG+vyIxxb5g>-Zp{Jt76eFp|b7@%R5|1Au@hrw@SAlDzY z!y^t9xrp9RPTgtG!)A&V`%s3M0r?pe|8n0Nb(*%9Ug^fKK{a1*zWH*pwCQo_ON)E2 zbbZnF+O^@EU3ZS%ItJp!gTa-C!^zsi%ihBeyB>RA`C0dsjBg*-qiwYj%!>UqRoeoF z)dlaZzNa-?Z^jl*EZ6N#*6ai8>O$|W4^uVUGfbu5jLo$MKIQQIB-&h`gUz+F`ewtO z=3C7Rhm+MWJ+9vOpfu^-|HRwA>}^kak6d~EDFE!hbLiHgg*TElyB^mZc(6BFdGJZ) zk>$!G$;zWwj{TY2`{^OI>9rV5uO2YHHc#M(E;q+Z6aV+~Ejo|3@>^n4$ zH2Eb$`Fk@kf0S&)5RR{dK6$*pgOyO!07SmaH(ta{D<7C%WTuW%Bg|$>sedFEh z@BZ-I6~`BDU#hI)N^h#D;z^NzxyZjzwo=r%*z%;MW4Wc{;qXdJC-^eL${E>0hCp&ZRZ@59 zrN)c!lValUgn~Jfd`p6qQEDe2by4aewU?_Pm3;E$7d+G?eEx;RJordrX!H|eXtLl- zF+hz+h~a@sA*Sww(jH8WdqAraeos|uvU(Vhq`q*B!w2-<#a^A`m6~j-(K?P`b^->p z`5fPeZ~lD@6nJr8jr5xAgDL$-NZ2e>#(V^elHQDB>_-@kVW5;DW9AU(J4x-8^Of2O zN6@r`{spoVm>6X`u0Xy)8w1^n{pFKsReipl<{6n zt;C=TgC-1s9#A|wJ@5xHIE=xo7<6Lr8V3CsyobRA1|MVak1@E4K{p1ti{RX4^wRL$1a5{#8n6?Lm+7%RtE z1;)Ho<+fF<7fwSuir0J)TRTI$*&S=!S%?;UA=q8Xg6A+t1CWKPs9Lp>s156|lPEM` z+iDSsI;ql%RTqgCV})*vuJtkJ;r9F(<7S(lZ!cz>*8FeNZ0U2}WMki^g(1Sx2^8T^ z@m`pLl@CA5%Ohg|_ZaC{kRwqZ=^D>rvLpJzcz7Is7kFY$_z-0UoL+4cK4lYa121tt z!nJYd1-mNlD+t4%IVCS_M}!hb`9A;hAy{Q-n*MWY`(IJp{){UAbE@XAs8;B^ isc7Bgpy4CR5UerqxQdVK)d@TOHvJ{|nZk{9=KlbyExF$S diff --git a/app/modules/rag_session/__pycache__/service.cpython-312.pyc b/app/modules/rag_session/__pycache__/service.cpython-312.pyc deleted file mode 100644 index e20651adc424bc3b89c066b09ca00468cd0f2f97..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 11562 zcmb_iYj7J?mcA`@>;0B2%X0j7Y%8(jJWSp(IEfPi*gPBp7#NMBZrgHX%XG_e?2#E3 z*cpXo3!9mmIJ;Eg)Xo;7*sU>JwS|A|Rs{-(r{<58W=5jdQ=8gH)y|(Sftekk_Q#&n zt(Ig*24-s8*17L{Pv3j)Ip00Ee`U3r2t5Cgxe-}xBIMsOp+0mWvM~jbYlI~%6(z$; zNDWhRS~IMHP!rWo(8KfuGt5v}u8ry@^uu~NPDc$B#$lrzXQHMF^RQWt>!Owk>#&s~ z8giDf`j-i7ct@j*IBc7x0>#!bb9NIb^RLWcP~cO`ymYbhm#7#NvmeUSDPIKp%dq^k;PBc%P1_I}6Nt>w(@4*1m}f3R96wjNqngIqOACXk9D zj=vlUbAytBD~O9^;){|Z>BEYQNIIU2PxF&ubuXZpppC$yTOgYuX<% z44Jnl?EJ2TalEQRJ2GBfA=jF)V2=s=I|V^hIi^TL&uZp?>v{d;kAXkj`&*u}_j7#f z`}wythGfE_jING-*ZVlPc^7Ai%WoaG(!B1dz>6tig?Vsp#|zAdp)enY1XGAHFfUCN z`qC!M2|8hYr=T2)@1;@Ji2|v6^#o1+B;K1Vj7KGmcgaL?tOS$LCG-iy2t7m&;mB2o z$g97A-=!83uUC6(CA|#(D3rYHrFgqEJ#3W-p7L1SaT!`h}FofiUiotLwJjSt#x)UTF*lKQ)mE6IL(~&4- zE2WV*Hz7z~H4_!J5FCl|LDW5xRnehpA5OWET%=|h`>%w#sW_-b;D0g}kBrO)Rec2t zjhl*w!d#(pz{TSx<8fE;DB652GHZ^<;-RSAs~}k;lPq@y*j99(Wh4ZAs42TL{un4+ zrP!flOhiCADmf;AG%9a;)cUd_l{=Matim_qn1XeC)bh23xBzwVXs1qlkK0$l1 z`Qg3TjZN-2C`^W?gt1tBuBOZgY%W4QBK#WG|G&tWFOV-Rq}so<^C#m;bIw#C|eU+(0%Hz$$9Fto}C%b&Sf^+)|+YTU5(#7zji2n{+aam zSh0=!#50ofv@AcD@pLRce5bA{TX#59cX-t!*7Yu&S?@fM?L3j`Jh94VdmqX4K9YXy z$@K8|(%&CVN1hWq`D`1%@Nj8_*e9NY>;9&!e|N^eJ9YXO54`=lyH#>7ggm zPleK9Ui1rDkC65VIZtbf%6I~4PixLmx9rR~nis5j9dTC|rpUbV`09ge9?>n6iyWGL1)8d)JPNwhLLqg|y*9&c0(QntC{WVjyiF zNE-(74a9$u`U(toyFh(;$0L08g^qaYJ|`4Rsbj}7m2ot^ZpmvQ`Sl&k;FmeWg|CGd zV0mBc^PaU(@7LUWrbqLEk2=$(`=F+;9TFcB>daoXuo>a2=yjQ0CW!hsq%P_Yz8YsO*Qy6DxjGHK+k~KUQ znjBSkOJ%6A2I}>Xg$e){OrW&C87`Q=5iYD1;DTk|S_T)a-x)60zO|LE0?4of$N;>4 zsRLBa0Wgb|;D)Va7B`uwBJ_ZjEj$S=m|hy7#8wkkfD#mW^)ifS!0{F+zB5tz{fz2} z3)G+aVP5TO|D_PjpbFj`ai^MJ5!#S(k6K;|$5A_NdBD6n?lO2P2y!Nz0D?>v0Sg&N zHNE8lvv0*7OU7U2_%0Asx1}j0%ihoRt?ySfx21j(E@kxXfXBRhn|E=Sxct^}E6rG@-NDZ(4*rWaG{wx|B4r zDM`n2Q4YY9Zh8vNY;ib<#wGy-#RG002jg3i;0y6Pk+cDkba3heoW$?LoOUFzn+YF4 zg4l}Rg=9C9P9$AO_8{p-vKNSCg+8LQ07Fn63jt3V?CHZwxS#j~NP3XmgXAERLqH^p z!gUbQApjzU_X4Kjk6<-8d=dT_l13z_kQ_&H0!c5Ddw~cj!JA==l2X8n0<}~w=X`fz zmjeGdr0@#h*D~nRC3-uy!!FIOfMr_S0M%>(F#iDn=Gj#MFvmAY?KcCMb*E?H{Iw?+ zpIl;>Pl{FTqO&7;GOwuy6YQ>9^1a@h^E75X?HNydivGmYmGd+$KbrBhEez!R^;v&+ z#^1eSUVZ%LgXu>f7yTEqo(pNug`8)H-1sNG%j{cYH^x%4V%w2STYs*h<;~}>Kc8a7 zh64-tuea>Vw)A9LdRETAH~j8!_MS&G_dJ>&8csjMiY;8Wj$1hMX?0!Bw=?VO%=kJ} z=d)e?nXdku?Aqz{V^5`@4yUUM3desN0OMj*zM+ z0ACqM{fG>+cFzFJ^38k+gJZ!rqpds*J%26yGsxtNeFx4pQ|}+#f6k=&po6-eehr~xvLhC--)5k#K;{((=o$lkFoe;lOL!C3|ZuznK zt$GbKztxC!Ztbkb_;Ko7z3$eDgAiYXR*m#pj|t&b6yvBqzqa>_(7R<~%0{}^Ou0qJ*A&%9(p;^?t zYNw&bJTpW8m_`B_KwX`Wtzzxkr zBNLIhq6*Q82u^OD5S!-194{wzJRadBMn2dn=VJpnBKZh+nN#$&eFRR87enDo1uYxU zm1*pUu(4fUt%64}GC3;Id~8OLv`BH;%JeG#7^FA31J%JMpg?#Xh^$ES8rpc4%GEc& zIeC3DTfaY3zkj8F<&ao^Y_%^_-@WGcP;c>JG^*!=?qv`ce`lsNYd-Bss;Ai*y7mIY^quGc8RV%Nqw%X zJE>duw=AE2Yv9H}w)Ie^_0XzbY`stP_n~y{x%xoz)IwFx;(Bf1>cCRZvU{0J`#XPa z=|bV!bH`qlwDLX}6fOipGn+sR0+w*WfeKMVP$|fQ^HWfNcoQIi>KQ6?X|q(kpqxnA z9YCc;W;JZlU9B#uDlVYLNJSwiIm~q+NcwnDNwIXv=~!}*Cm8iK1;P>m^=JSUYJfjx z4qn8ME_Nd*P*XvH!m`0B+N3B>P?|;>o#%M2uHf1pFCufC80ATr)i(i`yStcc1c!2A z`vD&aO)RgatK#3|~7Udvdmb4S0DOtt}Nu^G8Oh>DNuGL9tk#K>P@cHc_MPlp z1XX4g3<@?py7$x!+qLnSgGTXFb%33+`&Y)u7 z#aa<+({_w0TM_ROibBX=1YY^?1CjIsh$*<>0}MZknP^XV7D>_Q1dPhYXvEyj8$&rY zUc!Q>fJn4_Cx91uMVVGa8qd3P^%V?F*;T^NppLK%1g<6q%P<2e@-k$ zTk>?lYTVh;xZcvX98V2o+K-AY$JQH~mwQsi8~4I_EZ4O2E#D1aYPZ;Q@HU*EnsW_p zxyFvqtVX8`M6S9aZ^xK}RMjuV-@J1DO3ElU?7!VGurl^u^xf#qBjUk<&zw-@_aKnA zycWjI`-#I_uu7YN3)&)C^b!yO`$NVd-1<}&FLiO}H3^NNNl;+5ik2;*sRXy#qPA7U zsAN|FK4=Cd6I`NYpdMSxa7s~InK3U|OZx6bMB_Jr3rDvp=-w$k1ZwOn&Gy) zcf}^!?@b%-l}&u*$%HNPolu}Uh01gQx-0Cm@!~`Re}(6rLWtAN!>=49B(}keYJXe% zpVyW&zPvUc$486%SpyD?g|?L-%=ceL%vhPEe*$!(2U$? z@goLB0NSB&&QmS`>h;$@LWzKy0zje7xzKv8W3gkYS9I;V?b@5VDBAXAZHF?pL!#|S zQv0ddmUDZP50n8#(Hpq!?M^)=y7q!OvU^{9{_68fqj;c6Jt5ZLBiavU?e}Hu_lfqC zX~W68rKG6s;Tlzje3i6)X{*567Ni0=Eqc9kQLJ)co2EGN)5sOkIznl>k?iTyqU2u-e#IHgrh5diy|?xnMsb99Kx&s zH@U%ZY+@=l2`)~_8Vw2YAbh?O8HoV8vBQ-!Tr%TVBtkgGa{&YY5_Br}%)gAWKS%N- zBtJ%yL~<2KfRY`f0ZmEJ1VnhMc0r3X=Pws71@fr~>z|-pm;~|yfg8g&pS=F$a!jl{ zn5(XpZ!L{t^)AFBc<{IaUPZjMJbeA|@_<;oKUY;F`v6D9D$x3^Zy9bF(t%@QmtA~qZaUGD(LlhJ5WP93iBG|$6y$hX4<6nX%7k(`?fCPNe4rn3kt9h{$y z3qTZC44g-(S@>KDP`(CDzKZ_mnXhFLNTpA)>QLpKJG;E~6HRChxy zX1sy~S>*o$2!1jpOh@B)IT`jr;bxt_B6RQ}?M$E$Byw@Gv~BEV-4Y$P1#Y0PDjpsfPH zJv{}N^Y>xKgGkVeQs!KjeeGz-6rVf_o$R82o5%~T=s7dyB0=tj5s=cCN!~=-cYkIy zF#GPfn)3{VdGIqf=k*vf5Lew&JmYN1V+E*cvTc|#wu3xMJx+aQY-9$hJHFaHgAr)x z@GP9ZI+xeWNdxiLFA2-1QtqW#YIfE0_787*GTr^@`umdm!En{B zgf~4m+4ub$a$eq{W4x&zEby+JUaeXcZk}3mug+(V3}ku+v5q(IsAj5Dbn5Yy1FPEA zp_LPvuD(pi$vlDVwN^PuKlO|fj$Km1sd##NHZwK1ftB+6s~PVdn={Wq2rp@O=k*wa zRjA4vF=ireZ{CbC3vpI0oL@BMt(daG!X(+N{tY{(_S4LLR7%Jb3|E8=Im}xa<`lKW zg4Y?sWyr-aZ!;Esku{C_bn^OKrP_0t}(C27_31}-iR?1+0l?U zW6T0vePM-|B7!J*0lRWtgy%b+10vbOv1n9*=fa-Q#jq^yvh+)E^c1F`h{pqvbO0`m z_7pxh+{2eXH{4S^FYg(Jk8;ECQEu_eMtQ4A_@QFOmiYaP^0ltK9i_nb6=ip5D7r`1 z-5js%TzNnJ6ki2hIPxC*+HhRqv6ufV$U}21;N2LwdnoE(h)w=C{wwMJEot~q^2l$= T@!yiZKj_YCDey)jmAm>sOM@qP diff --git a/app/modules/rag_session/__pycache__/session_store.cpython-312.pyc b/app/modules/rag_session/__pycache__/session_store.cpython-312.pyc deleted file mode 100644 index 101d30033981ee6f98f076d845ab912f2d0f15d1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2083 zcmZWqO=ufO6rP`5X|=W`S9Yu*n!@1?>9yNd&b(nD_|3IuZMd$YUNPv`LF{mjpM-}`3w z_mL5k!0>+iskovM@;4gc&;zBD17(-k#HMAkNpqB<&dO|)=eW{&S=-ceIwcNeqg>F!Xx8XfJ^>vXcf`xZ9QKOB3!z{OITLEQmMLm7fzLy zbx1mx*Xy_Qwc3KeQ7-h{wGiGZp&%zyYltW;R{|9|0^$eq*LdnwOI?hPZGSFC!+2ly z5%A*ZdMuD*m2D3#F9pzIQt z!lZ^95{S4V*-1#(qhM8&9@CJn-?Jtug|LT*z+A#B2S$^X)YIyBgLk;!gI0JxB~7+Y z4q5h)2?P8B&rL^tejqIbyip=jAiQ|JCLQ611nybS#dTbTd%bADHHno@hu}sE!pXbN z*2EyRz8@PPKLGKFTqbWFfBdWdOY~^}@l-@=FM_3Qc9ANHc6s*Qkx@wYdqr{y( z@bPsbCc&NNK4=J)coQ9(kIEIS;x>3CW(2SVq~o=^yEQfl3OFZl?HmY&$U*km)>(3G z5R1&o{F!mTTYn!1@nx&hcR<-CP$0~Mqtpvl5Ny(riNHQ4X`_d$E}p7JliBnJXyMwv z2u0y zz)OuMpOhY#&f|Am@w@xqoW_@S_@9a7#aQYxapQ9G_MZIX&SGn7>2&h_%hb)i#l2>0 z@}1MvyDxP z_}f1cX*e6dWAZ%^ZB8kDPG+8yiGRpSJ3`pdE5_(}n}FzWFxzOpGOtnd1p%Rw{tx#B Br<4Ey diff --git a/app/modules/rag_session/embedding/__pycache__/__init__.cpython-312.pyc b/app/modules/rag_session/embedding/__pycache__/__init__.cpython-312.pyc deleted file mode 100644 index 85e6bf729ab09b81f1ed6de8fd0a016791658ad8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 134 zcmX@j%ge<81j~EpWP<3&AOanHW&w&!XQ*V*Wb|9fP{ah}eFmxdrJ7h!pr4zcQks)m ztY4IvuAiEll$w%~nU}5~AD@|*SrQ+wS5Wzj!v>gjEsy$%s>_Z DT;m=t diff --git a/app/modules/rag_session/embedding/__pycache__/gigachat_embedder.cpython-312.pyc b/app/modules/rag_session/embedding/__pycache__/gigachat_embedder.cpython-312.pyc deleted file mode 100644 index 7152d29622bb0da9f7c1b873b906bad6f403febe..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 888 zcmZWnJ8u&~5T3o4onXg2B0`Wr2}-0~b8Zp|5TuDvIyZD~R)=@(TsS*s?=0cSLKH5b z07?gmB4w;J`5!by6rh!;sOT(=gp`VzTU!V-(tbO$JCAR6_G7U)4=9^&KSYZR;5!*p zaVE-m4V3{15G;l!t1<=_?1HfRAna4icvY>gC4kfkD5=U z5K?Kcmetgrl4(b^Dzynij07YOVB;EJMHoPj^?;*hqzgkI?Z$#X{b$zw)(>=Xw~@)#7=@-0QP*KWoZ ztxIUB62hcaRiJ|_2#44Iqn-uj$$1F@d6%xe>%H!MDXpHDR*%;|mo`4-H`D^&`E&FJ zt*|LM*Ylj4w?ngjEsy$%s>_Z DW`!PI diff --git a/app/modules/rag_session/retrieval/__pycache__/chunker.cpython-312.pyc b/app/modules/rag_session/retrieval/__pycache__/chunker.cpython-312.pyc deleted file mode 100644 index debcdce375297a7f2336604339454af3f28dfb79..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1399 zcmaJ=J#5=X6h0n*M9ZNh%aq{Obt^bdS^|PKI70`wOKKEdyd;wrf)LLxZJJS!v|$Sr z+5j3DAWaaofHZVarnc}>6zJZ)OI-yBd+1Q0Q#LgUP{32)@yGTM=FKbU zs+qwXB9naL?oi$YDueJjZllpSU$eU1*16y9|FTEE@Uu!c6A|?e;e<$lRk08z=DJ_5!cxihV zr6k`IVGB0SZ>Nt#ymz%ZS=wo)eY}hApk365JLyZI6z~(072?wjdmk9k`$2xI=yf@v z6rw#f-+QThU|w*Mq4`oMzm49+sIP0lYhbQP4x>8?{iE;+U{YkcrFxQa1cXf1xmWE)geswVFJ2Lbcx5r z1IMGh9ZZ2iA)XBp>zK~*Ed|P78|7qJq2m(EBQ{f#sqs08MFS@CEppc(9pdx8!^rVP zc~6*}j#Ls-;H&=&2$-j8eb{``9372=Nwpaj;&T0Q|3UxZm+@jP`Ye9u-AIWm z3y~a`7QgL`-v7q^qqO>0wU*lBtsg#l-rPKc-`eJ+`cZT{)|W?HX5+7eYcbUQ9@cCy0g&I|Gi)KIk5lU58{t zIB4PnjFBZ`vWXlZ#Je|tfERfjaOCDiZ=0+K;bisfLlV>w6D#TJ>gw*V>#M5%Aj{Q& za_Q-c5hDO!_@X4=}u#Do#h1fA$YGx{{KY)QH>?$tc=(ukNOiuW78I_MD9 zA!Cl0>ee)kMFj3FN(Ig$j(iATT>=|uvrTA|g{y+tuu-%R`AEq(c?E!yB(XS#E1ED5 zmZ!9`!6qBU_pZT4(OtSdD_Hz}SMFAptY7mXRB;|-JBm<75|51}Arkoul4OgTXYxD% z^Vm|s;tXxU7Huho%u+spo1l0HCkm0~-bc#WLJ!YG4-U6lH-NZVyi6Nzv%u1%Xd3sZF>jD@6z zeor;SEE1;}O+l{axi#JoW4} zs;}@P4O?<>S;~-1_d|7|?TNlA2lttTn{y`{$nW`e;%=E=73YS`$RTFF5;MwcOYsOO z0_A;9F@?Z*UjzbF=8jra#|xWdmHN!ktH#xy?9`jyt!8Dnu70mt#!9b>*#Y!b z?a0CH>R|fnp6q`%{AlH$g@ekzLa+DJv*_c0iv>~T jL_)}C@a4RfY><+v-#0#5A}n6Z{NJ{y?Oi1?B_th2OQR`54kS_ zzz;X*fyZr}jd1r43@}h07F{poQ9)P~5EzmnzLXZlGE(Iemz-9S6Uq{n(U*z7YMHqr zBUG2%R2MS$B7e@3sMED7G5*$pfehiGyYCZtmIkQGUZ}u|Tk#JLx-o(Zx*;#zkQe`- zXYR~x{M{2l86>Dk8$t>;QAOHBW5ARiZye}!RjDXdsUjQV>LdVF7PxX%<%NP^C&s)z z=1N=tUexghI_N5bpjWl?x>LQ5)}bUWz&cW;^odJ53ArZ7jjA{@)rwi-1W3_dqa?$$ zr982ztDfV1TGENda%RzySgt@E+0GMUsUGJx)v_5%EYr?0la`&JzO1pU3n48_iq}>K zY?qnQO@6+mYZ+f&vss2vYEs9eF-8g&b3{_oZ4aMfq=Solnq?&lrm@DyOW4aAB}QV& zG?~q)X2q?t)AuLJ7#jZ!%_cO=8@LkN@44B4=GcRc)bZVc{X6?}d&yJ4a&*hn68zq1 z6Gt0(vW6$?c&dqq8d$AiwT>S)ajb!-YIv%Sr<-`ZfoE!Xrj8#S<5(RJf5m;RAaBx& z0*)N{M{Ck()7O6__5V5#Kxpt3B;I*2wv}oIBm4K?RKJJ9$2hc`+D^TFzB|7?|GVYo zj0=01Pq#Pgo1G92C%kh*@?pX=7m*K>VQxP~WWJ&bjzS4rqs6o;Q9tK9t|0NQAn}eM z@vHw(`wZI(e1tPz0JNW*i(AP~&0`wnp?e){_d2vhgwQwe|AgeZ5<+1*$QLgG|2OOr diff --git a/app/modules/shared/__pycache__/checkpointer.cpython-312.pyc b/app/modules/shared/__pycache__/checkpointer.cpython-312.pyc deleted file mode 100644 index db4d8b6f3b8b852f576ee7f6886839af7b72b3af..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1365 zcmZ8hO=ufO6rR~1t+digN}L#z*hWp77C9i%LkJX;pt=D!NflG4Q0ua+cQ%ro)$V3y zR9A@{R49#23#Rno9(rpp#Xa;!L*V(Az} zh&rc)U?LHDdz8Bfbrw-ksXjg%jM{nRUJY2s_Jew;ADz7vWs5RRz!vI^Ta>faCU1lq zbpqG29cWsHUYUq199*)3pxp9F+jUr(H7x3ovfXg(hk@VpxI;@pC(M|(?|CNUwCUAp z4)Vmq%CPj%P#^!Q)SDY<`m?8>Kkbjt>}ppBxwD&3HlFk^mVcRi{%9vx=_f0LbhdYU zA5zc>0tL*7z+F&)KoJnhHG~nDVyjo-|5LOga!v_P#RoC*1oLQq#re-tOye5jMjY8i z@fED$E?yBmoszf~MqO;-BQ&;{ZTM}E@L{-`%jg}%@T!E-5+KK@gFcg&&?+v<)%!&$ z)U7u6ZNJrO@-PjfXFjlO?$b^&8LH;pdvkZF1}_h__(nBBxnuK)ZYp}GiU?4d!`lHA zR75~1*#Q$E3I&=K?tI6j)Ja~-C5gE|%wV|8BG zQ?BLJ>(mMwrK2WF@o*n9kQq@_0v1`sOn4rKxHKB#(%}%7$a3@v9MYOI&0~KGrWq=C zefuFjC$Ncok68K%(Y(+Fkq61y!+JO96)?rO!rq1DZy96!JG!)o@_Q)z0$qQB-uMfZ n{&;JqXY_NIchJlrIli9S%x+|Nk`q03KcV2nw*tT|d$gE`_vT)nC*o9>Lc(P~uTF(>B6t8s;+ zPQp!AlYlilMPf8f;>X~xu*#4GtdeS#C8-B`HA`|N4Remh6^3dsM`% zvU&ELSzehKJu%$PTa|L9a_)j@&CQ;kzi{blO@=ZQ9RMT>_oo3oLjfLc+|-8X?@Tb! zRtNS9G9so(pP8MXJvCb?TML)YuS_?69@H7-x1Ie>-mdx0`b?>0*QpoGD1DMF&Kx;> z=wN6wG@II_5eA=iul+1UIcm5bC-f zu{k3m^u>lpM8a+b{*u$;%OWXZ&3D~KU_@8~?qf1dD*FG~O-Ocw-n5qNTHv!b+XmiS zVelzXlIG@aY)7xS_jPsk+S`Thm1`f0*Sqm8y;QNQ7Zp{=ZvrR~&~soPfN5aWLh)8PYDKNHyzyU$!jOyow4vdUo{ zWo<>yvPPaY+^Nzb8#GLZr21b@e#ei6J${1if?fIS_;FA_BN*e)Xy;dy_>OjelHXp? pU$#zmVh<(SrEZEKeD7vhzLFB6L$zD0dIT+!Yopeigh%Edobp*NB8u2fD5`XB=(4)6MH1p zuLe}q-%o7i<^MG+|hm>^MFcniX(kuyc@v>qL#63Cj7)fVy zK~9h9Mz5mx;!+9@m4HG@c;g^wXOX$RW}#8cqIj1k<=N%8B|dcdmS2j;duzBhe{@>9&0ullwHC*yXZrD5?w(QJQ;|OopV@xYrIaQ=z7; zYSb2QDU8@&ZV3Scpd!7dLC5R>k0Ga(A!3Uecv|L#Ok&R1yq>tqAcKUWlhH&M$;ugO zq`;5K+17-j#Z;9OO?QoR7eoNM9{_3`uzNw=V|i#bz-k-hJF!&3-G_;)XnC@j z;^}6v<@fm3P(@XGxK(a9fR76t?kNEK+e6(hls)r;5}{R=WQJY;RJkkd@GOFiOmn*= zEOD=x?rHXpX-Vy{!SsTN#!%ds%t^y$-v_6lJ^4wx*HE=||0Zs-@#%H`HaQ;|%^1{- z#RGPL5~vlEjGA_kWpvHdwKQS2#7wGXK*bA&jcDcosQ9uSrew&-k_;t%+NkX@nC%0k zYSc*E6>{33LyE5Dh@4gQVG{S!DC`H7tBlAzuq`@N7$i_=TSf9=ak$bi;B zl5Z3Thq}}EFN5%A-*+EY#e+BCpfwi!mg>L?xWM_~QP756tttX+B$!F6P>;I7svE_< z$#sri%E|h_Fgm!ji4Se!BXmEA002QJX<(9b(~LiVtaQEaf=D?z1RpyE1R9Jlm_PYV zZsy9@6LTjQE9Xxw4ljN7VC+dl%Wqd79sm8>AN4CI&le-nnJY6i|J7rEeKAxqdBHh0 z<$W?PQvL_XRRVlsR*e4|fh7%ic`qgAFiq!zy2i}weB~xsb9gwtp0tOu+F9eM7Gj!-V3Oqx#|CBXN248!FxN4(5fIDB;3b@jV@gHl6>ZAYw diff --git a/app/modules/shared/__pycache__/event_bus.cpython-312.pyc b/app/modules/shared/__pycache__/event_bus.cpython-312.pyc deleted file mode 100644 index 40d33e5c677ec522878cc6e164b5b153ffcb36da..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4503 zcmb7IYiv}<6`r}Tz5DVSvo_!tiw(G&fX%BlF^}TKgf>u1D4>cZ&1Ttq!Rze9x%Vz~ zopl=pr*c%JLK9&}w2e_KVG5|I?GK_x3N}cs)c)|+uDrQ%B&7UF|1I$kBh()~XYSs$ zu{NO{yk}<4oH_T*%s1zp;qP9ri$FQa{U-i}gOD$(-X_&G; z7v`Ym5`0n!3lzurgqW1V5+$m{k;6n0hKVBH#>p!R`I3ILJKrTiAvC}Fn5BeyecSkFK|^6S{$~r zd{8jOL+8|#VG5~eQZ*d|(QG0eReFPxDMup6i$qLUB$7-knFO{yk;ogFXreU2>xO3f zB9Uk+l{TVAJe|@(MnD^HkOj2m$@=KPK!-J5@6h|AnyPfD_{qrWjNU$w)g+K&M23d$ z0rC!c=<;6pe!;tH_y=0GJ^a)?|>|=Q>jw;VIj;bK1G04imIqkRqC%|vQH6J zUI+a%k|GU@VJDMze3PU?6%M3j(C%W=PSEdC-Hb0QZs2=Vui{Z<_@Zz|P`txJ`E;wY zT(H`d*-nQtx+!U@kybolQ809ge1QtSWmUuZ5Df6BoX9I#5PWxN^ z4B~drs%=w2GoA-43WXkA0;^<6kn4?)tR^HVYpB%}5^>!yosn1{9KV{-0Wp2RNo!ft z5!JJ)SUhbCN7J#_O)-+ds>&XZB;v_9qFB(?#2Fn|70_0pP5@mz6*nT0!BzHdwc9Ko z2@6GO&ypb_NBRYOWU1ao zF2MbJ6TWkW8|8l{il7%H%Uir8nWKou{_-I$8{zF^hq;`#$#C0apb4+biqen!w4&tb zSz`MYTicKT-U2semtHPB`4atE`Xk==U!|QNREG*bdrm2 z!tYzHWIJJBfL*%6<6d+Uk?8b1N6AUp6-qAd{xN@&oTnhY;WmGs-k`lfr-r*?ipMf) zM%BO+qOC!O1WrXwDOw$J)*^>Ls~RRhkTHUi)`Z;kNCG${zJaq%Sx-d=^uDxVip>A$ zcnSelEbKY;%xOKQ#ZRk)HD&OXd9@&|-v#m|c?u z?ph?g^B{f1Xu(tci{5v8$GY;K&2yfudC%4fb=I@%Q(x_T!}@XIy7!uQF0efx*na1^ zyQgOY-7^iLOY))v6vZk=AM5}S z_rdQ7{G88*ewJ9!N7!pEU{a7@4t7mVrq8KCVHvP-*G(~Qs7YN%zk@KgQ0&g6%9tJW zmvOv|8vuFzmp~Yj%gA*&J01}r1>d@H|Mli;&3Ru(p}KBS1l}SJ6d937?Yhz4%e~`W zd4D?q)8`)(-~CCUx^~oa*)w)xwz~Dx)oTm>wU*4ZzkShXD`4sYr_e7^rk4>m_8Ry1fH@VCpNh`BQizaX zevPebsV?0oN6yiYZgE9f3Jb6rbl0rp9QIm4C%Wtv<@FvomWG@|`9J0iLMHPL_w4)l zQ>hflZYTVyD^8ZV;+J&g%!)OI7*8ctS&p166ZM()@AVa zR%l$?IQGM<-Vtv>uAP$uc{wn>VaJ~jek^?A{K)wi_dO-Q`=yy(M`q=t^VPLuyC#}u zt2-fz+5uE_h9H0&%+&9lsogj7Vxg{nGCCb^bgzrpz^O&o^)Xr*C_~-!R>H;8(HnwyTMW<8xaN$-HUGg(jxm_(L?GQzc$`J!gyQsqBuA&R$0?5YMK0`Sj9r^3D}XhyVvz>q>~M_ z$0%dyZi>_^^{jV1SWSECJP-U1 zY&YO2JF};r4S2ffknC3}22kj(ELY)GYLp#UrCb%}Rme*f{+3|7AkZQHT6~!VrQSgY zgHl&u(BZH+OgUX>p!R;^NfG**6}}tZ-noPpLjp=P9HxxyEQz$ z<<#`4$h7aZY56sl^urbN!$f#K9}oI8#Iyz;gJ_sRYt2Y7e>R2F>2!i+np!I|aT_!Q zwbqUVZ>F{zi0RSsksC{@MqgUd_8}jWZR?GS39<&yBa7f9{R)s_vcL&q>m!d-tet2r z5~%JNth#spuS1hV(1OIU#yeGj){Xs0@YmyuIrwf-+h$zr;nXjKz`Bh7F#Fy zB7y48PFCIXv+8df7m!)3CsIw3qhgd^Qi}xZaUM_&^#Tt=kJyl9GFn^8v9&#D`A#6F zJC;r))EIlsTQ5C#`9B*}UBjqpZ4q1S(;M(a-fO+}_iG`L!|(oNOpcgmW))9IYu5AYdKmE@F4l^*oKzuLx3R=zjsOwUYV( diff --git a/app/modules/shared/__pycache__/idempotency_store.cpython-312.pyc b/app/modules/shared/__pycache__/idempotency_store.cpython-312.pyc deleted file mode 100644 index b4d7b6f54dfc49232e590751231d51497babd871..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2578 zcmaJ@-D?|15Z~Lq)0ZV#{t9;NG`7_w6#=^`jmd+XV&b%f#%ihELPVWI++7mM`fzv8 zI2JMlnt}rfw%Z3Kw6retAt8b059mvt`p_rWfvAT=TS_1LrdR>fJauMI=QwiOJ(!)@ znZ2Ez-^|?o9EpSojGwHpGL}lnpD1`kYcTaJFco4FQ^}FMl2R1pX^!S;iso60Ntxx; zyq3}=ujYJtf6A{AOQGalVro~3>AOqa_uXy0HWiRMKj;FUE)`q|CPIIsMM80cX4+00 zxwH@o>I6Wr>`dNr0!T~6f(0h(*`hH6bL*M$(-R-OKXp2J>YP3`b=GJcA}7`m>Vv>k zh(%J0NmBG9VlhiKl~Gu=G~g(53oM~JZD&j?KU=h|g0b+SWfZyT`0ccq(KDtKGPnh< zn0neyCVWmn*9+;qrRz>e*YiblE{A+r*FT+0=NcL&Z0@w`db&_3+G#seEC^la5N~pa z)Pa&`N7A#i!|rY|EH0(FWe#Va`=ATE$gQE-1s()zNdmx#2$0Xo?~&MNXRER9hiW%( z_w+ABzz3^1>PaBaBVdM1c2!L=Q^h!71WJBFE~o&Qn$qN|4>cye;4}TO<}(A9U&^W( z1Uaxk6D>|`SF|S4QOCzEdyW^9h9Zx33F41X)L#cuAsJF8x~lWz>Lqr+yb1!KntFvLUU4OBR)LhPN}Wp`VF5e^&il_Tqg-&=tBZe#Bv zEt4!_*))z51>%!!X<7!cOufC*BD~iki#KZ;WyRaI$jXd|%PbpfG6Aswg<(*rZg{+! zRLCTWlVe0E^Hd?{z%K>xxXjLxd4+ewrbJMtvcn3+d5%rPVRN>@_aoP;8#yaon46VI zStjq1`iqv$vGF8S-U|~yfaD;mAak(X1O~4kh6`s4Y|tA8SnAt@=q@dyFQ$Q9A)C>C z%eia0uTOkCdTVqe`q~n!M%tEB*HTXi3yxI7u}9(l^>F`M$HVZUYFAHXdUg6y*WvZ9 z!)s!r>*&%uzaBceGEzDD#mW1f+kV)wjoY@6JQIk^{n4=z_FzOCd)qHBW9+0bD4~wr zRQVB@3PK5U^FWZFCw`gQUdtsfOBs77O|r6SzxXx}-g}A%9Gv-*R0xKrrju(>09J_n+g?ZKs6d{kuB1B;?|++R+pBs zt-O$EaZJO6=Awc1B`eKgP-KqZx;&eK?~K5t18f?##s@$w_3uHasgTi1SU|3jnvWb9 z_;%vf#G}69^}gYazGK^(+7bFA*1f`3CabOOE0dM;tLN8S1}zlbhog zkVld9A;HeaUqx~l2|^$*#M_XQA4lvEyvrlFRlEn}DydVd_0rbSoea&&DHwb9#CsEO91el5OsqDEl4uRg`eJqM3SCPGfj&R>irIOdY;m28wj z`x5+2n3=*w_k-3BzX3zg|12N{VW$hWkPy1%CY^rqBF_S&?q9=6J_N7EkBWE`NR26q p@|X<#Mvgot`~MI2VhzRZ(0(PpMSw`R{{@JO{s900 diff --git a/app/modules/shared/__pycache__/retry_executor.cpython-312.pyc b/app/modules/shared/__pycache__/retry_executor.cpython-312.pyc deleted file mode 100644 index 79d096b511c01db0a272de300617a18901bcbcd5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1296 zcmY*YT}&KR6h8OP&;FOSAh4|%2-LD#Spx<%q6UyOT1yp(v1`m^+_~V|nc4NuY?j5v z5K5E>O!TFw?L(V1N+l+mG)CW~uf9N=SR65pF(&qH114(q!EmR*1!ORn2;4GHHk&D)RMB2C1+(Kbdsr9YE~scfysuv zLF(4o5QXDlD9d1|8yG=IHe4a;&}~5{(vlY$DeHMxf6ZiGcuY4Y-mh|(bY$B?W6gDf#1OAW%LSTZm4tWaK z?ODb}-d=nBx5Y$j*WGt#Es-3EIl4&oU5 zas|#1Y{%7Y*YOvro{S&6L%8z&iG1#ahwFtr#k=rT?4r|yP?HEDKf-}qklBXJukhf{ Va%^Sn?DLD{4>e9wdw}43`4^9AGhqM# diff --git a/app/modules/shared/gigachat/__init__.py b/app/modules/shared/gigachat/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/app/modules/shared/gigachat/__pycache__/__init__.cpython-312.pyc b/app/modules/shared/gigachat/__pycache__/__init__.cpython-312.pyc deleted file mode 100644 index 2d3632446a15c5ba13e4cd21e323b3bcb16dcf61..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 136 zcmX@j%ge<81j~EpWP<3&AOanHW&w&!XQ*V*Wb|9fP{ah}eFmxdrJh(&pr4zcQks)m ztY4gwSd^NgpPreXn4FPVq8}fhnU`4-AFo$X`HRB_qROs_6{wF9h>JmtkIamWj77{q F767d49|iyb diff --git a/app/modules/shared/gigachat/__pycache__/client.cpython-312.pyc b/app/modules/shared/gigachat/__pycache__/client.cpython-312.pyc deleted file mode 100644 index 3de65346d6ed4f7affbcb32d469f7ea634689dbc..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4754 zcmbVQU2Gf25#A&3c*h@!6e)@NvFmeW*`j5UcI?!)?4)odC$*BOsbx2g5}ToUE9qp4 zWbRI~#8Pe$u55=4PhKz&o+f+7zA`f?PLin%C&fuIjTUzo^1Tlb|i zcRX5>1*7N+nw_2fo86snW{!WYsqqjf9nlZvfA|Rb78`b9E6n-@VCINKBql`$t(qBR zpzTOG#+-vr24&6^JH`!iCeNl^WBed*@?1(7a}T;1;vi2E$@Mys_}dO^)G0YAD>)^0$R%;FvxA)EqArPteXmAsuBAT753@Z|0QzdAI%qp-EsPC9+dsud zLPo8vbWcjAY0VJS%7Khp4UZAeR?cC#6snCY>Hee>_OlD#9=6v-Aaf+oUhvAM_x8URE9%{sCuqsUrDQ+07;3cWJs3?l}UXGntsiMXbDLNVJr4y*n zC{1c=eB#kqLKY=Oo}g(lka1 z^SIIMlp)09a$45n@mzTGT}15;Fh-&VfV@gd&AVsV>$RnD`waU#-#W;MQKL?&8XZH; z#

9S4OgjZJsO!(j8SUWPk?yCS1FeM=eLc)OLp+m(9S33F^DY?wFd+R&)55|d{n z$1R8C%sa3ic1Y|k$21Eo;3aP<5|?N5P6-U|6X7;zbxw16Zq&PFAT+Dmxbm*ing{zO z_wCA?Pco{5A;V;v&+{rX<;nAs7man>S-#D)WHK#ietY%2uim>!2w^7z48blTmYZG0QmMAyZV7Gimj^LD0eQB&(8- zod#!Gt-)*Z7|o1pMr|fbl>`otrxRni&qziFQ#6Qz_%Qg&`brbDB7#zj!oV=q;)x_$ ztc3yv?^0QF$+DIHwr%V~_sG3O|PMBjjRZWSw6}%fIgrpwHE}X|_6H}>7 zLNWw}s#(yU8myGi63QbuWDgJ(A0KdK6$Opj5GseG4*e;i-)f+% z5a=ofVl&*GhUU3TvzJyIB87&?o#x$(V}-!UQuD6Grwf5&WzN}L`#t9hd1m->Evau> z4RsVk9eU*C^6=;9^_MQ`nP2Ilj$$Z3Bb5B%H>cm2{_U@4*ix`@u4A@i{&+Fiz7p(Q z49@Uh`5Q~2hElM3e)sJDx#(K06v88cHnd55v1VzKjEt2WAp4o z!H3}74ty>f0@JPy@NsGQgl4e=p6b=mddvc0umaiFn7pf(yvZjW!zAgr7$pE+tLJ)G+D^dU*Ot#Zt{-G!k7<4YC}VP0NyH5y!U6#&r?cZ)&Ksj+m#HLS zkX3fTu7+oW;71@(4gksRJD;YLS%?f&5^X;&-XAGe5#g>1BR&&~N;@usmudK`eR0z@ zD0{JMACeC2_sFW8R<%Sr3CK#xfJAi1hI1^DHMk*wo(AwXkqI|vfl}FzTqhFL)8J%? z6{^8Zssc1OBat(=&(+)dTQNCmN_WF(^&=n;#o*yW!{Jgx%lDkqM4V7X+~Uq<{?l>& zmlt$-+yvajX21cgg;`;~u^13%xHW(CeESFWU-{|o38Wxz3xc9k*D@F0q74g{8~f=;fh&8!oz4)_)1I;hS~ttRe>%*Y^#Fv z{xFHZ0_RoOynx^sARE9cZ6nCFB&9y2atQZ({lLPjXEa znTW{%BpX#f7V#ULl1L9z1u=sW-&{fkutDx%xidbImE+?|3UYT4$yvjrs;Ri8lHmnE zrj4udB;-Jr8)Gp{8uf8mwX%-HT%78uQEspU}VsW;N3(8csTyR1t)>D-=aDEiqkhZkK&!6<4@5F+w-1J_nck zDk%p^$AKBoT6o9&FFx=tCf@fK!v}vLjqbfOPn8|Pn)bEUw)Y;t`FJVZI(KdM+G@C~ z5bjzHA1Q>7EDaRH$MweUO<+(A+<21>QvJ^$BR2BZg@bY)$qYW_~260>Y>wxL#Mw8KUr$o zqu1{#`5SL_uK3%(3N)2qn9_Bu4s_Tt%pG7&~m7hW9rgRE@v+27rf5q=Wi9z20!5_ZD z@k`{&O9Z@F#Mv+Z5nfBa3*=)0q23IZxSWbh*l*tle6DTl+izo+12_{M8AL^Y%Y3rn z-@W2Ly71ysPoe#&E*v%UzeoT-@-Q`z#|=*$LpyvE0`H5*Ul~uNtR4lUhk}7a!GuSN zAn8K#7?Pt%x`9ASEhixjm(!YQqXv69lSwJ4vT_y)rks`u3&z)f%eKE0)?XuwK4lN|h1gd4HS$*nU$5#0fFZVPve`LXV^LUvczgWL0Ej{+} zl|rO@-4v8t+PLOBwRL3<>avRj8_PU$9uf$Zy~z1Uu%TRoTrFwdvF=B%k72lDORyJI z%j{jOtP`N#5wG$LR7wvJBM2Tbn#?E^h?xXws^xng!H&v@cGUXNjt*Bow4)~GRm;Kb zdDuYvR{`@KjQtNAy7`w0>&?u&-hBV}gp-z5Pbe4R0AO-NZ36-(&M;pS@3+MNce4K* Ya`GE;>KpRRKV4@S=GYGesd)we1(ddL(f|Me diff --git a/app/modules/shared/gigachat/__pycache__/errors.cpython-312.pyc b/app/modules/shared/gigachat/__pycache__/errors.cpython-312.pyc deleted file mode 100644 index b777f7188e7ce6ca74b354ed832af0766cbb3f1d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 322 zcmX@j%ge<81Uq}@WU2${#~=<2utFK1rGSj-3``8}3@HpP3@MDM46B(Ta#4(xOq$He zFdZP85z6_@17u8RNM(p(Oks#(s$|q;y2b0BnV#sJkyzqdRFq%jr^$SaBR)PaF*h|n z{uWn!d~SY9X%2|Z6CYn#nwSHTS;_DjWaKZ^#DW5Sh>~Lc;*7+i)D-=6pn1ta^Yl|e z1{UiTR2G3;1|~obDF*qWh2aJZM-c~1+z;pwcK=|o6CkSDK~i9OP9W7%Q6rTOF*LD&+X;Ql=6k00Kiei%xfg1IP{2145{uC!j$z|DiCbq+R*UYR_ zIRXhO<%mSY!K#GRD=0m1EI004wpye{QzI2|;?`g!q@I{rdp9{Cg*m+W-t3!i-n{+Z z{4zKg2W?)|Bmn;4PB4@{=*~0H1`t5O1a)Ck5I7c1aZ?ll5}@=*J`{SfA}9c; z+y^jnDE3wk`y`uEOVpx&a!(Uz3>uD6HVs0S)|eaF#`Yev%Kcb>V%hkkyUnIHKwwjV zU{hQNNJ26cuCrAii6N3gB>PBVaZ0!r2~pHX5g3Q+eL2i8+KOojnkv*P#$45KO2~0) zR)tX2XgXEBiA@?c8Z{p%q--}3O_VW$$Z~3iNobr9Q{P3nw%wvi-G<1dNmSoL5Hc3s zUnuvBxmS$@T?!&cis1fK(rdSjQI9j8I2b2+PWFALFbt&B*PY$3d5Sf6HbbNbrU)O$Imgxv0A&gR-+ znh9A}iayEP0ZE0asm#>$Urarc2|5&RFU>8lPWzNBV7-ZM3M$UWK~O*!C_22?t%74L&6qCHa<_FTwB0kYPNzBcJjRlKokXY_o#cu;gNzUxlv-smTtkyFAj5^YF8rS*DzzV_e zfUbYmG|c`NiPeuLb=|Nm+cBJ)Z4nkDZ`roV-W~pM){#@SA%25#{s8b5HsQn6^z5B#?ijhPpcAPB#KOV2>;I0D4PH&=cY U(*KC(1XeF**tufnn7cmJzr-VqmjD0& diff --git a/app/modules/shared/gigachat/__pycache__/token_provider.cpython-312.pyc b/app/modules/shared/gigachat/__pycache__/token_provider.cpython-312.pyc deleted file mode 100644 index 167eaa918efa9c1b871f87c8d592a34c7cb3260c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3393 zcma(UTWlN0aqq>qMC!qalqK;bMUt6TQevl8VXLtvOI1=ksuQ~?LIl2Ec}MAJilq0B zmPC_AVB~`-TqJ@&D8nwS00G*<{qSe|=L8Mlq8}yA7Gy6fU?3>a{LzsC73xoC?|8H< zOGQW0%7LC(GnA5;V?GBO0>+yXo-Wd4aRnv zlN~WS2z!8Q1FmzG3EOqQb=HN{B{_Kxr>-cHjCF_FI9j)1S70-t#3pFO6TMZCSJDcWRYBB*B{fXztSTpB7;YJ>_)<#B zBxH45T@_7~V2 zt(*S7;>ER#75@;-T(yB=Anw`_kiR(&ZGj|;QUo`^2Goe}&w*P+T5~OKN$jFlL?tQ< zQOiU0;=AvvA^AN-L6rBq5j+BXa^fD4=q!93IqK33LfF6m-Y7|b__0!(Lg$V7ZVv2p z?oka>%j);R);yhOK7>S`H+iWloOX&w@ep8d9lcnnLe^*A%)jy~4bQmZ`n` zRb=wR%)Ih1h_~|iCX2$H&T7h%j9b7;+)9uaknRy;vKC!5(<{tkA7R>(sb$D6oimfp z^(^O9lFvK;xAdFXY^%+JM+x0NH}v0iMXXH$6SYUmuIdq%ha+} zI@;#5!MV5QrcS>(bwRlB<1@4KyrS~Sl*U7=%JxHtNhncKQ&P$CmC@zp<eak!)(@bI+fJqq&9kCH7)D5DX1T5O>ddXXp1SVWDT`C z_wMDNyfu@xsnJwg{=qkW;82*=?TgSIWvuF~Bx<5=CnYVF(RAAt87r~XXDy5uK^u?d z%NbeK_?W09Wa&7sd;*_Ww$rLnrjSe?D14Sa&g-7twG5MIh0&w4uROQoI0S;~DNzgCjgpRe zVga0I8mTk#N>sO}#Z{1zF!_QEZ&gx1NO=b^Dm*3$l^w9$f9^Row!3wZ`%zCqbm4IT zMf=)E*Q(y|BX4-KJyhaPRN5y?p2^2OCu=Vqu7!p+q+cgLO;(3bm4{E2hNeor)0_Ul zozA=6x4LilRQ$tFoLq;iV6S_e&UdKIu23<*maq9bi>+&|Ro_V2H&P3PYF)kS(%s~( zWVP=|x$j7+_h`xgdM(gRI>WWKYt^n-%U!QNb=v~1g*WS+$kSPMhsy5I#?eRaVPe$4 zvHL64i8JMiGo@o^A5K49`Ahy!`G=_zf3eaolsv-Y_U_{7+UU*kg1zSJD!SL)>+==g zcM9C5zk7Y+?ulC`HgfmhsT`W9_`hFp{oUJXczU+d{&vapcFo)QNxbCcOAh|uPrHyW zQ1u=zdk=q$DB=(~{nUew2V9B&VWoZU;rWv1+<)o}S=&)b(tX}D6`VPS{&=iowwL+R z>75NQUj{fBhh5~kmK2v{LC{@-V7~HT>=A^^88Kn5VA7;9DYTe8*Dxt=(91LFgp7|8 z2D#MVBHTg7q>p3rPBM@i2I>T$4^f?Fxsg);Yjp(lzO+S1-Q(hd8-rU2NIlTQ^{>kt zr+?$$_))oU{3(LDsgtM+J26p){RE8=6b7UZKwTJXJWj{V$LZKY<8eA>e2I;(<>mh+ zXuX$BPYvr&kRzHN?KmdQL*BsT9}3b`RZ@Q;$`th#@_mKe@cT9L{u53915It)#;N{q J5gG5B&@WETNX<7(25#A+tm;WLq(UP6SHlshAYGvj}c9b@%(OQxv$59Obv<44dtofcy+T@ab zyHZ3UMVQtFq*JJ(sMJf~V_XSHfL?m&q3ETDUMNw3=|v2*=%GkYZKYmv>df0+{wPed z0B2`s=FPk}Gw*wke~Cnb0zC3RKhFKmF9?6f5BE_V=J40RYzaglVqPeSX;DPpllK(7 zX)ou!z)NX~^HN?eC~2kOOZy7`v|kiF!c~FDj|8I702Oy6+iN<=cS~ljr~~h{0zc3U`c9G1 zyd}@&Xr5Tn0)DA0T0TcKv&b^`3~VYoABQJ_*%GLb7KxDd5Hal~p0q@~X}K&VWy^mh ztLgXYyCqA>Fshldi z_ixWy%AFfC{5>;!efIY36X6hN^5w169fL9>rRC{rYKE?;C02YuGp3=gyq3~(3BqzK zR8MH7QUWv?Y8WY0+^4#k0%6L?WNAS&QW-v7gPIpgWrmgK1PU)0y+9rbjmU}0oJ&5O zV<%jjj`TRy5}eL(({o3lULu}?Aygusx8Us&s7$=O(vFkRv_gHLlTk;Mv>!Uc=h*uk zS+Gs!cVwY9S-|ldCc)j1>z71G_>r^&Uhzps%1W}w3f$1lOm==*e+Uf_gfvi{sPMC* zjF$3RhN}0d`5vXZ)$a=OIi0E$>ta}vSuRlvd&@`YlD3>TEx%6RQ%$;RE?Qy3)R?Ji zdL~-&&2nITVEH;%VUi~ENq8k4-12wBSoj8BTlo*|2K}z z-3gs#(|sYlF@GaG^tid))X9kc#lv zQ1qiWH{RS1?}tVj{exT6o6}GG$M*Wi4*Ji3K9H!ryigywR*PK&-TK=N+qiZzxgSb4 z;wPWRNB85SpNxE(`fZ9E|ENB2w-&qGX*{tXn&7T~In9mc>jMk5*g|&^1c~;qhd2x+ zJ(j|#xy*EisGRI!J@8^tBrzm-vRF|S_Mu)hHH3acRT=IBJBMD#p`A6{Ijz(&Y z=0sf@Ya~W0*Q);Q{>?~T8flyv0;_D**eKMcp})!T?Q;k6(0@EpIezFBl;M9PXNShs zb-=B2WD19W08Q&OLbwGm6&*m7iD%dAZUP5rCDakQ185aT)(*5Bd^uQqh<`V*=Rjg4+6Kz8vYhO-g7%5IVA6u+DVDy#b_IwH z7IM0pr}}*}Ye^-|%r07idvIi{Shbs%~tJ~gi?ir}U%aQ` zbNCvN?(oZjnBRD*Oce(dy|_mHHz8(sz%6Rt(8~FuMywwDMy{^FtsV|4%V%oFLp4XN zK=X>e2p0g{K5Zu)PccvXG%9$$jvZN-QGw*U@G~&qki+<3T^ejeAd^tw>b1S-*#qgU zy;?L~gv+u-;r|oErCJJHd~^DJex5R{rR6V`i3X^fVYt`rn)5@GPlz`IuPmPspF!uW zzVyFk|L^%8n*#@k`35ro@`|GPTsZMuc;UJ5;y;8-d%~q7#VZc18`YU30hpukpct

%3!OSBw?mXH>!#mn(pqMWED%gLHp7Hg?;s+KON9l5ZUsb$Mqz!4%`7s|PL zz7YKi2bw5ES>~;VRc~11hHg>0VzIPapHwQAYUoUS$7oopUVT%sWEP*SD7s8lgJs{9 z%^B!pLMK(XOcqDRWL>Egc-Hk6tz1>G$uj7qLTA;AQt=#fiY}mGxbGiGqn8%%H?DY~ z$ywO$T!bef5+(wPSc1=+hIxDVvJyUrL`jUqNn$m*;`Ok^piNv&t$5>EFuHq@w3Q8T zhGbWBD_$hp_#LEkPkvWBzZzcc_WP0^azN$CQ@6vb2Unb!b6k_RI{cBQJAKqDZEhN8 z=b_8y$)W2UIeeX4J+k7>jPFG=WQV4^AL;8Bp$k*8J8x2_qs!=^%xl4r=%)*)YZ z`mm2$r5}}9&g`*{`uyomg@pgFnKuf|$%?SBUGpcgUSctPDcGQjq{>Sb3o;?yI-%NsZ!cO|ynFDHlZUF@A{q)EBH7r1y5h$<+)wPM)(fUgl=^ow-?mM8Et9R`+XsGXi%M?ik#0 zxD#+E;TGXeL+<^n?CyJ#-EQ{cI`WukKgn)xdatMc+ne3bH>2*l?LRHe*j0|4_#NNO z*)cme%QayYH$QKS`(A5t!H&aPd=h&+S&KQYZMOExhMYgw^xHS;5Q&*-+hVFw>-n}@x! zX29--tSMoyCt35@togR@;AuYx+oHZ#_ILSmwSb`We=pw0vB|)&Fn5Kg(hCZbdMXx9< zN)_2O^w;1lmy$Kjn3LuxXg66@*3CJEvYe@W&_GcM?5a|^#$q*vf?84tF+rDWpkvAa zhQ$&MQ;{mN3BBVrna&VnPG>Q*QG?1nNQ+c48=56q^L2&AP50PoE`&#uV~i_=pxCqXS#S(RcRJh&lVDsE&aueKpr*FEP&0_aQeYpI zY9J<8(E$I18>8;Qmx(Y?aLmmD6Hd#HLC$eGUW0=%kuAC6AKme71Th}t?&FDMuLJHR zSKudLdZWe_j12nn1F*~Nmo?>D|3zh1@?vUAv!#An%@eB5DiHU2 zJ?{mv9~-KQZuMiJp{Ik5wxhVyAbCjzE?ZQsn8o`1H}RJ>xpsxf!wW;$_hAtjTQNbg zB1inG0FeK{>|@Z~ zM0*ywwS((#zq3)CT;ym87%-}U*~BuC;PtB#%z>fJLh`5Gx~k6_Gf<6r6S|O*O$eEl zf9^zm{&WFsg@UD~WYxMl)zEavFcxuUufTs3Rn5F^SOtFJ6BHjfTQHM9^-=y6N5=pt z@tA--=1V>gfX6ENEC3!0{ zz|?3gr7H?CVRmO#We%Q*kgCJ1Tt>UWT-Sd9|Aw!QL%QP(*inc$zR)okmX0I2=(#qu z+vWk!<^h&=Y*q+7I_{j+378-s9tow}!0W$G4w)W;@-r-Sfgu$Dz9&eH$Hp zJGmoE>e|IWOs>BtZRLKl)7|@N&sO)~&cVLzgZaPbj;{BfTT{1kZ|vlbE?xL^VJkO= zXz0`OR_@h%G2uYwK_qr4c`wI3dt!~^n%yz^ptmy>UA*|<1efW#`TmXfx8vEH;tg@T zqvy*br7sUp-ivXG?)#jONZt=eGttG@pm(tBkUznpM? zznJ)V5Yf-Q(&cW8oi{JsxUepa-}(^95(RSO!mSUN=%#oQ@Va>Nu2|d<}JU=LupwSaC2;~x*YwapgX0(imY-ofz$xI_bp<2#x`VqGi- zczG^>FkpZm8QE-oPY*~jbjAHF#?!segq)AK?KH^M=-xefnXR$)dz}3g7fgB{3BG1J zt1Y~Ny9N!@p8*eFHcWgoy%*+r{;wQ&o%?y_Yk}i0hrWi^%b~w;Z$60j@)vnW#XkW6 C;ZlPD diff --git a/tests/agent/orchestrator/__pycache__/test_quality_metrics_gate_expectations.cpython-312-pytest-9.0.2.pyc b/tests/agent/orchestrator/__pycache__/test_quality_metrics_gate_expectations.cpython-312-pytest-9.0.2.pyc deleted file mode 100644 index 3b2e4dc97225be7b81cb5da2961ad084fec598a4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3834 zcmdT{U2I!P6`pHf|K-|_?Iiu(cHO2;>uu}M(m$4}KihbrV*5iA&|;7-w|BCH(4b+N(B=8g2Y2ngOK{fnYq4+1qdo3 z9vJz~oO5R8%*>f{zBB$!CNqSfyjlIZ^|J&*e-unuB7Ndz8;B1OMp&^?RgrDPiJB1w zIchbgh@OZYcM{cvldLA4R5j%cRfim{syXRu+R0Qia!l0DI>XgrNvn3w$yf7|j@bog zq&gz$IOrLzjsl&;iN|VntfiDve-azHRZ8&mHR@Y6!}Mob4Z^dxn|`C|U-w*}f{bSZ zewvuR<+)tD>otALt=}ZR!IRS_aSdvDe0auS4`2?1NtWv~o)m)V1~E$t-}CLJVOxF+ z=1|LI*A3fj+J^5@(HE+iAx;B?L`3Kx1jz2`AXP{6&%4)tm2p-njX!nVed}s!$k!J$8iD-m0BKJ>W}kN+kM({ zda1A5*S4h@KeJ6|@$hnPslV2MJdX?iQa&;$uSb_h!?}12@3Iiy{c&`8&ysW~gu2Kd z4p&<06SMhHveR}@xXZ5M7ee{$Xh`j}9YxK;cl#>c47~}`rUXZ&TRi^sCRZEq;^_7-ig-~d_>HtMZ!}K%sIX@Hl#XgXxaZT zE*6f%M?a3VQUBde5d5)2XO)*r5ebuSq@PtDssKuoSS6#ya z9W@UGK2J3n(M^NF?4)DR2iSY$@&s!-z_ehrMhR=$zU~XOPO<=(8CR}xREk2cQP*K- z0xo$$Y|#$Z4P~jCWfP`5Mx!*u6F#7{I7~h;mkz5kz*`~83QYsN>Ufy&H0+M*4h%Eu zV)-xuBxsNqxCRStXMtf5LNbvXlG!BbK;FQHZootZSOBBs_Hfm?4hiv25` z6diTq`jg_CVWy-#a0_6m$WF3D@4FNnStc*N4mnCE^N`sf34y6txzT!+ykr~BJ#1WV z-xb>aX_D#95ilpwDXG~o6YOt+q1`$N9yTpXFj!h9SXRDdd!}Kt%RmG=--08uBvcFN zm$hHqUqCN`MrI#71q}e&Hz2?a7|=q~h@JuR6X6mOy$&DaQMgqmW)+J?dLCMO0jmGS zjs>tWv6Th1cz6NPi$Fpkslwa13IXWyECfO0J{+HUHrR$|0^V}xya&LhYnE%+dJsMB z{B75675gDjlrMoOk3JwRo-z7wmmnMx(#u`(P)IYMG=zSL6^Nwp26&8_9wl|y5tJ8K zO3EwcQb}p&j~;KdPM28mQc+N6OAMSW3L;URZD$Pz{^iTQ^ChrlqjjEV!b^lucNnZ0 zv0PA92vq^hgt~T9@r0n_jlt8E_wT%S?Zz$r&b7NURG5j1+oj^ML1UuQpyIK6P0Pkq zJS=$X`t6%{-mA=1rg)sm#}7?Qd3b!Wqoz;A?Q(Ud^8O4J4+cJTwb7CeX;7XAP_b>W zNQ0W5(=Y({QaUqgL`Zn{nmiylbcIrn@)13NBjM_BU((e}DS8>S(knuB)b!^Ch{>qn z8Z4v-Hu}mS^VLD-Ouz(+&kZscm@p6cWl*Gd@~i)CDA9YMGzTC12m)jQZE7PMx&0ga zj%@5cxRDvz7(20<-@Bfl=;bFibNioI&!#?|UiqHBmiyu6==jsIwb2WkdnPva6u-T6G{Yq_g066&t(RxGi1=tT}4KKksPPw)2fcech0 z>G;Cb)^U_RvZ@_j*G}}b6N^);+UbR<&B7b&g^6BaVqxm>w>F3NZDjKB`(k(bi(MzT zQZX&QaQ#IZ#gad{`JR3-5`>_10^!mjcy^A+irfVze*qU1ZGCQ%FJ-(hT_p;?h z_Upn*w!E61TKL8vw8Br{?r8@(q37je3`g)%O&MOuookU&13`(M52sN5w$^x3NPj7UQgjaB#s~;FTCDdz!Qi% zNHl;{^50MZ39mVugnygDhkyhNi6k;4=-c8z0+eN-LG}vFbD26I6S;(yp?VQj6y^5_ lJw|^+NhKnyzXmh9M$Kc(1i{YlBGr6}I6xGR}5Kh)io zY^h7sIP?G)4GSob@1xN$1Fy5mUu4)2!~7>U=!>(E`;&lN zXCy{qv&#zML9SUAUz@r38iMsm@yDBzqN zl6*2h$w~ena$`+WND9EU8LmON#^%{X_+uROWWr}Ooto8VX0^kGyrzh0&EQjoSuK;F zIw5PK5gbm-c~Qv}jOGzhy$C`oNM-VxY6OumJR_$Qtg)VojmWu~tfx^deBv$fBUWt=@I-{Wkc}adLAO)q++u>W5&om$9 zft;V>(?NcIVC#Z+j(MBEWm%`8)#N2b-i}hL)Fd@$7%BFa_wD#C zYlLAY(Q?x8XuXCIb_kM%ZWK~OW zMo22;z~MqhGQuF3mQ|JD=|X-oBgy%+Y=CD)wUCE(h=|#2;gWDk$v|(zFXq)tvI2Bo zk=5C(CTR0Bvf)i@mklQ21*$kDfF4c0tQjq+FguG1ZCYqDla*B=C(b0oMnHr0#-Za< zM$8tb1Qkrl6o_R_sL9plas^2?BD1Qj2sscFr(^}9o-qQ78C(Vr!`Y$K3`7V)GA@b1 zU=D&$5;ZXqR07aX!R1zPeHC1Aqjm7q;bGzB)TtA~!IKA%kB%HWJZwZq4yKL_jSLM6 zLxaagjOdZ0L#b~cJ1LwvH8^x!!5~Vo#0nJ`vg7ky&snff?Gdx`<(@%#PO#QN73Q}0 zh?x#a$;`?54sm9t!*YBNGN$Cb)`N=!Jqcb=(ifnqh+07*3_-K*0zt8EgXGM-;SKlOUr!=L(@4c~Zo*W&uUOPyW6 zo_JrW#8aPch(`RMFj1fXK8(nu5zrUFq9{h>t^%%z#J-}bRMWC<#MJ=J%zuO}3 zm$E2UZx6#zOX&6Qwut*u7PWi@7WsdhG84r_cKO9t@)gsDCA&wvqCuH&M*F(%7G4 z)OMF0&o~kk(>+wD;+AYQx-FS!C7~)t-4Sn+i9()t}0r+&)z6sNLJO;iATfS+McqyVcS-xrh0^c-K%UQ#9yM!hWwQQz`^8}&MgdU%qo-ZxIvuf1=c zyr^#_QO_-l`Zf~vNPC#5=N=;J+aFofbE}SeTN0wa{VR(4)%(VY`nC7XlNa?*k*N1A zi~4mW>XG&^QSW<*s9*ocqTaXasJA5{>eqioQNMcMI8nd$zImdeUQ5uOk+T~v2BZze z7TBG)TpWj8F6{Ny|8ec98tq!2COi6#*vE-?Y169Xc!NuSgPpqe0=3ePXLpYVJN5^A zKwNKH`~9(No(-&ae&wtn*FyaueeErd?1o#VXQXHKR%Wf{QJ# z_^@|_5FZ^+Xnd^sPI85Hw|@_;Ah#CrVegxs;OEDh@3~f3_s2Ot>>UQgN9Pmz{8;nd z$^WQG`!*=gB zr+e@A1oq&NO5pZ|Ad%Stoshai!5q~>v#3ICLL)==qC({DG@gP=4Hihib}>IC3s8uI zYJ_SuPt0brl0{Wz%?L|{v?>q-jV37m6tZ(N)E|^7;I&L<@?ti#0CgUsg~-cNMziGC zK~+PBYKAOKU67TFP@%qY=(VhzPjKkGZ3udm9iR`ffrTcQLw1=C-t{q- zls?9)L!w>5i{T@FAT<`VP!zMvLqclkm19HSF?^;|0(gOHmVz5Y1^2MZH&H|Qz|1@r zcLY%};zAngX&4a-28pQ1Mo3V_Nf{|d1SG*TnJg4bq1KiyfUs(;7t{-dSy&5{5vH<* z35c}3n1d=E6q4k;WHbqr1tlkH!bG8vEzB5A2gy=HC2dGi3X0K6`SN8brRGHqILgal zTcX_v(t?t~q5Vo9+WiuO0|*WSFnF}f^j5FCvEAL+;cjemH(oR+W+|{Vm=+J1a%N+f zDQ7l%`vwD1>2AEJVm7~{(M##ZY3?Jd^gyLexFABo5^9|p63z6k zCbt8LaVubzEGWSrBI*f9#6umf`5V>d#Fe8TZS8;O{LS<44c&gBcIeg0p;xPW$E#ak zt8GnJwx;j3N~Mu&gV&G0dA!^zT|uza-S^JEoBQ5-{&ui-V7zi*yt@0fYWMkCw^Zqt z?#1QOj%#1PzU9p=<+yz1TL6~Hzfw8yN_F>ls@>;m-RCRa=kLV@M_xdAVJSKAPX1>8 zy|cG>)eetV4v$t}8mlH>ttG`uQoPqTQIf8WTpxdPyxcZ%xEFUEd;~V^SMzMpQ3d_4>rN@ z54f{s{<$)NrG+xzy9nsO5hM&8d4G3#;B1Yv-c-mWR7n?`X(Av}TCn*PtrtSYwh#1j9ez&X@VGmkIn;w9NM}0=oMI5&)h7c)rG2 zZz^RHs-%z2G!YQ_Rn+EFv|fm4wxwX8dI3;<#u^ldp?ICxgH160zxbxBdX?W)<~mC( zfHJ?S#8&vu8i((@7Qt-Uu)=k|-eCD_J#=H>i!#Ig@3lj;rp)HHXAmqaL=MKC{T4!n|%j5LBLpSiY}rmlL`ViL|fcO zK-c4DORvsxA|((W>a*L=rYM5 zQHtC0HUc7_{beK5CbORzaTz|sXGYtEx(>cpe$$%U#Qiqdn(O3#7jMmVakrmt&2@9j zPG9gKM^0b-FYKG#r=MsA`f)sc0X2ND?j`klPUqC0I;Wwg8=P&BJUR!}Xwt*U>$&m$n9H33NZriqWf;9rG4B-80=FQwhIqp?d6r^9p*9_JLCojb+19u*idKShr87 z6(f2`k6avtylYgC!dZ%aE(;s2P)Lu$3Wc$kvqEd{d6(6VR>{dz{O#4WeYk?Y5cTzA zKXbd1vBHe(h*&``V$Ym^D@ZcIO;SXPIwvny9qaa4464zc35N3!cs?SE=OW<4L!35_ z=`R=mOQXFGx&$}ybNw-D?^unWP90G6l5Fl&UVu>m7SCkZK& z?7W&$agKW*$sG4SqB+J$l1e#&Q^8}vW{N5@bnf)=gK$py^ug2!SyAOQGS47LAs9w5 zg5WHIR}hRM7z1GV$f_h_%Bx6%dMjfp`7UDT0l3pDI~3f3DzDjOGtbkfWRNT(m_Qy$ zZdo~?K6l1ur!r~tt=!K}6}J`jnHn=o^YRyDX+%jOL^uV>%eRoipAvgdTQ|4g+jRqHxe={k2WGI~S0I`YQ&kH^cA(JMm$ zKEiCm7RV`-X3PAR8i((@7Qt*)Nz24-2z^SkHlLz48xZKW#K+#)^P@dwZn(Uz2Oyy9 zdaC?3K;P~Ew>|$tIQvu31ayC@+Bb}%!0#Kb@WV9@-}flRY}&BG4PWgyTU7^L1ayx{ zy+cNIaDJQJ*F=aFCJGwfwUmK|cU>CxryLD^mPvJbptC*E6q#tsnP`emG*#Yzrp%>q zqGzgoFy|DRXsW`)2>8B7DQ44#6)uGnMUkq5E&>W>BJ~b*T-W2^I8jTdiNIJmJ4*va zK?6>dYS@3q!TXkVH|YSO$7g>DG0`zr#k20eX+5=@gGVi%Uq6|M8$p`+B{!zAK`_(C zN%Nk8lx z{|n~dAkZB1zYv&iH+HU0%>$WI^I=4uLzoLCx7bZa*@`%3SU(T$HI3V+{4+H1KNBi` z6@B7mS@zEi^FyY_%-?0^|HO=c;%{R8*N%R|z@@bQK3?u`j^dQpBSoJ$An{3GQ4it3AxIpkTB#g+s04x>DglzWF10l(0tqgaI8?Nka^lU#n}ibS z10j7Q&AgfS-n@DH=FRWz*Wqw8f|fn~u|6C`=qJALn$(!wPr_soVT6S|DhO$zAg0BF zFYPNxX{q2(`voo&^MOJz9fY}$_^?F$=OpZZS4xL)2nT^S%?093ce%;9pS2E`>|)98 zGYy-nn$6@9vt;W=Zjjh23yo^TP^oURwlUS31|M2Ud{?5E8z+pS_@*Hy+WVP^q0{|LQcJdZzJ->I?W=(a7O6Q!AoAkdYVO-_c>CoQ zCfUTY;}UDaW&r}O=$JKwqDCysool9XPRGR12!qI~mTAB}w5a*KIjhW49d@&TYFM*` z0$--YD&=j(o+}dO)9iN`iu-`8<`l4FlXq;ki5tw9xWQFk(>Xm)ETy0pKt)+sA32P}?genD4Q*(qiLC9E;t|S+e;keaQY6B*upnI;H zgP{T>A69KO9-{CR5ariR`TbIU;VhOM?i*G5M}`NLqeDkejE@cUjk56A(UD`Ru~bq? zB?rb>_}KB($ZG>b%HVJ^b%OFFiVLn67Qe{tza8Kaw)TNYI1gqaAl5+m`fe$s41U zaphLztvl^I>m55jnXK*Zb$0hIAFn0TPBMKfgKHV;WN76XtI}aT@QIt79|Taxp3h#s zwe?Va$L?zrH>eXGdC(DV3EV?rf8aixh=w#idX0PHzM|7Gu75?B8yfSdjHbB8BW>;V ztjqrm-j0{!9-Z3Y1trmc1x?H$O+4F*(7aF^<5%PdxgM zJ@Wl6k0OuygOKNmNB^-$(%OvN!|J5sRE!;;ZQ20``>wAAu)v+Ti)i zlFJKl+TaDtewP>GbcJVc_WUl3UgU7obOxT5YkQsCw<>SmP%f>?H{S1GmCI}U=OAAN z=<~wt|Cq&FhFAmuqNG6;Q}YVIg*MGLYi6NnS_D91MkljCiYB$$V}Pg}$UsXqazufG z2_R#!wuzFS#|^GUY}N|EZ02VOzzWU5deb@GQ1kkEz+iVL*VzI9MF5zHlA9!S8fw8r z$-sHSqBEchD9HhP1~hWyE(goI9BJ?JXB?L)C(Q32>!Q{QenwVNQyEE}8c4m#{FY6M z77KC$AWxr#eKgL8=ePx5o*3}}3wc<`B(BI>8lSzgxfz?9r8MRQ>vm%v_WX857Kice zZlhh?_Ti1;R+&_x^gz|pT{B*U-7{R{4XZQ-MjnH1O#`k27`N@Iw#65Y|JeQF)$FD0 z_0;mSwcayM@0seMOtt%Lty^=twc9bgGvfR6CM! zj%2DmXRBS=S{HV@@a-sBdf~#Z#l08zR-$C#RT%!Df66&>s@n5rwd-`PE9-P+Z%36i zeTC~Q^~Axe#wFwW$>o=8edA8wc=ccDYT`^Sp*jimcKgH_=@T2_X z(i4u{T{$ptBjX$xcck&UymRTiBk!*qJa(hUIe5~MPS)jZ9|9|0N%Vd(hNu<}OM>B%}$_Gh{Ey>eB4VoA6u?{K6YcVK<~{Z~FzZ^}J(O7?{wETFie~%Ow zDX$Sj@ZYdkEfy2-KTv{SiG*8h6U4~r21%^1xm<(fEw@asRC`|4R!TlkYWC7!GxMja z?Y@AO)aQwE3DItDm}lN^p+hTv9i{`Yf0 zdg+7qao(G^GqdkE@9EF6m`(sz-QN@*2odr(Bs@^NgU+8|aFtlZl8PiJ@n5;5oUzQ;Ok|p40hQEk;VwT$GOkFplM7e5@7Yr9>{l$HC%AX*4$~ z5t;meSfLGKg|Exv47oAR(}5T9c}dQT0x#zC#yKwzyoAr2utu$s4K+7em(pWj;)2<< z zRg1QfuUNKWuU3m@p`5AKT?G!@80ptT1~^eT2t&2~gZy)ywBs|ad!E^fA8Cb-e8td3 zFGb^0Hm$lL!zi02+b~?+FiPC8Fpe6=>ov0|X6OjWe@Hrj2~8kE@8>820|pU5Hb_U7 z0!Jk};Y|$~vg?qfvj?X845?Z&xR_!oU{DntE#M~jha4|Z&=xvWcEG5(4jQ)W5SG*= z29N^k1k6ZL1Pm2GlYx8D7|;xjo#JQ54=$7oj$t%*4Q-Y2W=8RqFram^Ju!J%eMje? zmG`~^W(ex=4R|_PK*GJ6WK~)LY8Wi30f)%Ty^}il4IC`lQa)0>pgTjjGX}C>;(_mK z4#dvEc~`Y6WgA>Ah_q3#T#Y%V1HmKH-5^IbKrqHHb%RudUe^=FH^-OFvIVYF64BYX zclgT(=f`0o_8manceX>(clBTB@0o8V-qG8M+3oR}?d0y;0cAwrAxc>9`qRGs(ucCE zQQN7}ayA{Hs6~n%NRx=r@^mjETweGIccv*M5uuwg^jqOfQync35Sr)H-|SGkK)%nR zBwJaOxl^fi1>CzE7v|C#_;iR`=EkYHWH3R2E(eV2yB9h*g3`fdN(F#t5Appg~nxvJJ6ksf(HwfH+hwp*{`90V|4>6@(`Q zPZ%Dx5hTRYZLK@PH=|Z$BajQ$)pV>IyQl4Hg%u!`*WFR8U=}O=>gH;r_rpoDc|Qp7 zbO1oujxVH3!S4_D%FkVSf1LZV;f?l#yvv){s}Sz)98Jj03fhK zBFWV?V1AexJOrHs&VbeN7z0+3zrx zR?T{`Vp@3(sD2pGOW%>SKFvG=FVII3;ac=DKn&LbMFEH`5HT&wPXW`zXYHGO0GIF& z3rRJb4h@I%gDCS5qK5%NiYnwC`UKKL;r(6YA)1AUVSW@|JN^ON0k0kZ!!iEz>G2Ly zI~t%5j`8s=K0d>zf3FDPJpXCE^y60Uwau4a6I9h{UAVYey~wE@LQcphWsHb%5fQlg zz%7E&&6Ro?yzMG!l9g^T0DK=T$&$UiERkNuzTTBslN@v<4i3bH0B_d8>w|;O!Mk#h z<3%R%WiTNQ$TTGf^XLHYBjtK`zcsljuV8i^0&l%F#X)!DV5u9VsjN(Tbno}LzrR-$ zt*H)PEF4xaaSwq^nkvs~oNomz%?f@Lx{f*pu!yHOf4x96uyU`M?Z<1H6Ti^? zQRcTFwCj>f|Rxo&n0PHdHU)f`H$R1<=Gkf@j`nTG{mjru^^=aq- z!X8k&CbRCYGta$n>g0lP?8V~?#=31{C;Zo4R2e z+bH8~jky6Ryx_)-_Ek5`)v13Ix)F=l)V!T=bzVs_?A!)2BVHMp&pR&z@~YaOfp0^$ z^K)dAH?w}U%NV;%dV3sv3Ja(q_?2{3lE~ZpR8m)Xb*s8+)pV9!(ioeAwnlV1-O7|@ zvCM^Q({vo_hU~IctrW@*Fy+ic@QsxkbVs;J_fESTehPXfXol$1jicB&iEhbT&F~g5 zYEbdPHH}>b6o2%5A#Z1%DpsILU{7cKHNFQcGc4?Q;rm(AxmNq*)Ta}zQ!lq($!#6^ zNy}hcN7#D{SF^v&ZYG_tcRu!}1{215vW|{RiMb@@ZOtRj}S+KZkIIGFMI9R3|sp z$=1~TCy(7wzuz94-5T4s{(L(&)t;EW@>+Xr&y@$;@#(iJ?TP(c69?MKy<5rqx5w{m zCugoac{>q`YwOSMjFI^G&DiW_Y<4TQZ~fVJA_?CAiT1nLZ(}!-&Q`)%KhaK1zI*Y_ zi+>4?w4?WKPw(HJ-n+f)!P`MK7T?iHY_t;#hV_mT9?{lM>`apA_|3@lW@Ngh9(aEh zP%AS1{_1Arz)cnZKJPLF<>O8Dz~v_dwbdKm;KG9a87}9``vZ{Pj!fQ+%xp$xTI%dI z2~aCCb4}We%-&S-@AEE0P(I#NXD>e~sIA`c1{W6W&u}?k-XDO7C_eXrG160R$a7Kp zQ((Be4dK)o;W6NI8ERjk1;=*7J_~z!&ZF45(O2=sDfpLBMmQnM;D3g?1P?!V`fIbj zJTF3U1SMF0*)EyleGzGx_uZNPx7jj8mzD7^7>ZHt&VGXkzjz>g#Q*O^;A4d?(n2o< zplc2_2X{kHiEnwDGML31hP?o2N0B7yuh=QP5&t{Md_m^FAanc=22bA6Wa+4Miy*$E ghb8?M0d!}VEFD7Tp*wm=8oxyV-JaYd?d5j(7bkq?t^fc4 diff --git a/tests/chat/__pycache__/test_chat_api_simple_code_explain.cpython-312.pyc b/tests/chat/__pycache__/test_chat_api_simple_code_explain.cpython-312.pyc deleted file mode 100644 index ded8368b888f6d7fb8263d8c7054084466aaa193..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4136 zcma)9O>7&-6`t8${w@FXLrIP$JCqg2p;6P3+Xii87?o|gcH%IuWuz{Pda>rLCCdEE z%+fY#84z3@nkGR47^!mfr9ce3Kyqqt?V*PNy--#Ft6Sz&6liWTXuyq6eQ$=ONIHiO zxNqOQnVp~azW2kwN24ZzcEkHa{*@ph|H4kE8EvNZ0GM^c2%`m(#kW?VMJ=mQ7|w<%(a6sT3$76sy0597vJojWK^E@H zqEZ$CS+pyQNm&eJ@vbb+hS|`XksYeh)W|ouU?xR9^Td+vzEx(`f&;zK1zTKQaLXJ! zBXYi9@oKk*vn(8p-N4Ev0)A>y&-fIbSWg`J$8S%*W4kc;1Jnl?3u8q42%i z9cT1@o4-x}s9&ckEmNN^IE!|!mgH)&WU(sTWU1^XFFVPcT_`vV4jY>j!r^YdT$<;+ z%u||Y2&Ztx^IyGg^F<+0^U371!!F!j9L|BVBx@mO*_FH{^2JKQv2tbRSk8?~!OoY` zm71r+uJxhb%cMaPfz<@w{XgWttE3s5YV7&xW^AqzocmTFnr=s8G?OyCpkS9pEFD^={QJs1ZH{^Y4)sP{QL#5U7%bfe`>!vPN1O^&O{ttTWVSjW()CYc~w{ zSi@i%;6!ISSj7Oe_`JBh$jLl+axS7G(`Ol62d&e#Dx)jJg05;c0=D2d1+?u$y#q#g z6#4=!mXv453+GFD*Rtxn2DVCfMuzc|5Rg@}H8%cR<3m$kE7!RNj1bh}Z{TTVfGCWt zkQ;OvdV`J8IvgUW?VQxbJIKZ~rav$`p0hwCqI{We@W9XfE;zuUSJi9C5*(HsSRO4b)0x1LabxU*jxqMP z%}7PtzI)!Oltmumam^cMdAm^VRku_de+f>K$#tCoPX`VAE%d8(QX}_hMyXquxaNmI zu5^ymlF7C=M|0eT-uK^Lb4k!wmiUMJqv2F;M96W2!;48R9_plIDGpXR9J0HY3uOj(A5C~EE zoXdZN{Q>v>9?FnR!y_<0D%2)E6Wf5=#9vRy*Ow<-*xU94`Rs(`A4`5g4*ywKlXLRb zxbTZc_R_|MOR86K8`p1cRBp=NHX*0Avl@CtLU{yk-j_wtyQNYeK$u-8D`XkN?LcFc zX`Q%C$xg(+-=24ix(FrNT<{CkI-@S8581jB%$5C;j%SkY91Mtkb5^K}akNkNK)>JK z@0PZrEn{>YXr1+L=`O-eHfF4m6@7WU)8BcY?C#&GY;GAYCKlP2F>ntwjjR|ls!2KX zF+U4D2;N7XLSv+(x9)nr72on+HQGyA=qg}MXm60)5Nel`y<>`J=FSYr@8OKMYvIgW z=g!VsC*D3eZ_QskcXsYf#(Fz*_LrXF@~V>xcoC=~ORfb)P|4w5$iaHix?B~W50Vo^ zrASW(5T41q(ZUNeS$D{i%QI!R6E_tLrau`ZKRSmYYx5!{A0HMWpUG4>) z604N+B^QKR`c=4Nxe65|ZqoMqXQ88@4=5P%U@S-xR}D*S&WVrb*E64F zHb&iVWqEjeEJZ&ZPSJW$1?oeybsty(UPJS$l1*Z)gcES6%*~zj?3oo_Ud9ta*%N4= znPWobm<3bAPzyN_L$Apafup`vb&4Lsu`-nzQwAW8xy6fCs+SA-oF(btZZE+3X%q%|`|rwgA-Jca z|G)IlFT#2lzr^?p=M<7*5v-J$$eY94n7GO(b%?0qQk9dAY``m z(2#%i^!7N3Bp!t)H^P&j-gp>3uwfk73XeYuPi=&!?$U?h=?!DL5uR4jcm^(#8s-b| z@+Ry`C9O0l()d58-H~?mCZ8MK@knLMA)Fy{OHR>N-z$@$hk8@JUyCK1J1pG|1svhw zO@GG}86x2CmHJDm5QOYwvvL4=@-9av?xC8qVQ6DVP!{uc-pre~?`z)9JpZ|+MJ3Q)@qTGe#t8WvB0*F9&it>TbAeDoC5sG5{3#bg zd08R_WgskxnaDr{W@IZ`hz-Q}SjdVO)B%u&4 z+?)e4m8krhL_li9hnWV*j9R7# zK?*Ie7pX~g$FRK=(}y%0Bmw0#lX~i?Z7>ZaV&g0cti1>`oKaTHhkTJFct+q4@%ill zE)WODcyj_OQjsh2Wht;Zm4~Fup#bYAS)~um5@-4;@hY#iSYid;GA9h`kF?~$ADVGG zZ?Ljs19ij{wv84{khVCKl^G~a7z&eBJjFJwLDqsJDFi6IjiH%=cI#Nrw?HquN4JdA zJqL|3t;|ZpM&7Ztv8_G2nW4-aGm06#T+YBu9_-PB6GPz49x#(*_vFE2ysJ@@!AdY1 z50G4W+*41Cnikc{;O&X7rAE&!P9;#Hy8%p++4QQ}j?5chzp7sE=&vnb=Pp~n5DvAf zb0id3=YfQP`(m0_)C-2Dd8(!rN^}%Fr+G;Y45VBBOvrYar&y-#cnUT1jxfneVDKhk z7#eH^0(>VILXR=3`yRUyl`H(EITW)PQY#Ck>NH#bDBld(X@%S z;6=G$r~_$n(@m1v^3Jo$D?(S;FbS(Pq~-l>n}FCTlpXFCf2Wwm@~Fe^gQZJ$2+GRk z%|Yh^sgTpsF!Y)mY+Q)gyxgFRoDKDTh+rEt)BooXiO$gL)a1t%Iqo!nI=? zq0h1iP=I>0`}#ug8VojhgTBEKw+)&S^o=FYsV}ML^{MnLYAwB|~tjC4%;n8@J`uOFDh$6NjUarIvJ zsiW_0;(hn|`~pr1j>u<8prMDc&0~Bw1e#=o24yNkuqopqNCipm--D(OzO%hH$~z57 zE*~)B+yHP-DV*sz#84ks3-Sw^i9G-`G^9>OF@u*4)t$fciy=zX#E0vRGNwJzr4 zOE8VCN)|J7eN1vtT;3eaq`U>Q72*URA>!bcUouOjGbG676^U*<+d2rJrZaKK@jlP0 z>|ieDZ5X9&Y8837t!W5Qrz04n3JueUv%HQ+X^h4%tCvt)Xz)ErTtb&YyX0qz;8_h- zq+!f^O|23d#>i=E^;HTb)o?|rgh!=nq!O`Tb{lp^`=%)0?Ak-<+>&^Ko=>C61;y=>f6zV1Fkgvnmhp?&uWym z(zZ&}lsFc1FqiPwzzH)=Q>(-RPQmj9IP;wb+o2VQH#Lz1T7{EeHC~BS;$UI5qT0V| zc*E^2tb&Exam822!jZrp4cgt#6Y+qKcDxo6wx`SJ@=DD2MB;OMA`x&3o`EO88)`L9 zJFCgh@JPIpti;DK?!$NV#tMjYiLS&Ii{7|{j>$lxFa5q)^hVeJ$s0-VMi}BhG>o6l zrUrXsmDn32u-87N`Zlmu`1d$S@w#ni}|H z&41;OyPN!x`NI5B|IXdfA9YIbN9L>MkEzy!3~!4^mDn$9_lz)MS{O-%PEr0e)^Jx2dH_x`{Jd8N@yIoZp(eQ!f?^w zyoDb-;c|p$vxdvjt=Jw*FPxzI-iaf4-EF$#YW9d(wl&KtXs1pZMa>v9sZq=unrXwG z${rmYH1j50m2-Qn5?oX4z0eWt_`L*QHc8y0C)~lp^wGkkxH04v7!Dd<;<@O!6@MmO zAXCb4H&njrAul>FcCHU1Ve;CN4bSY^)wl zwEDHE3|vw)tnN&-f~9)&ve|=}jRg$iNvE?RPburpNwynSc}d@J+DY9$33nY=|8}`GLb$_9W`x$a|OI zy=xRNQtr>)cigw#E7L!me!+bU{;o{F=>Fcll5wxNe*k21`sIxKn~eKAz~6S?fe@3; zB1n}(VYZ-J#Xw*oAiUle5VWid2zCWwwy-{UC6@>)HKigH7H`SDy#c$=P||jEXVeBI zdxhd?8z{)xqn5+#9k6`!zp)W7g)CXkzJXGF4S=Vh_q{k+9;!!r5gpbZXy(6eJJ?fZ z{YVWeY+qu^ox+qm#r9jtZ~Y7}e++MEqT+-*oL_3asBVuJ^Jd8lvC*QJItc|xsAl=G z!|81gW!VQtNU1ms0T-tksyqGrNL zwIQo?LbpV)!(A-zzk#)9$#KWxPYw( znX+xdd=I01QLr8sh}pMMG~dO;W)Z`YXJ8rwcm8QT3nqd@8O843A=N&iEeN(~T4S@@!4ySQcU^9!| z>q_@|r%qGv0C6pmKDT>nx2vqZNCBMP4Ufdyn+pDJ2wWg_I1Qul1|*nS>|RG&F?tPo z)yeA}Ag(3$xXR=2Dt}7+F##PnvFF`{n|S=Dg1;O7fWT%rCi->A7uVK))vOSGNqo$5v94xw_r7Y|K0DhGI7Jkderc8V@4=XX)LUNMTwH7|l0u3YNeLsJjA zO4mgRz}bf`N>h7pDqZlqAy9$T;WUhH6WGjR_d3#w(QC-6PG0W-aV@j)uZiqM>BRn<3jS{JX&4dc3`a%(8uWv4F(Tk~W&b~~C9*c2 zVW#g(_HR?zX6R;Dc(EWsvFBmH>(WF@%ZV)xX(q>vQw(-9Ps8v5#LN@*$JleQhCPc5 z?}iU{PW%VJ&fz~Ia!daQ!Behx&!?z@Z+38KV3?4-?oZJz9wm4N_trF0z_~HUGox8V z84Szj|8n8~Y4GqUk+btBje;&D6KR|$bgUYR&jNmJdE#Ih?A7bVaO@OX?PWiJ2|V!G z_<@=WNs{ydmOy`$`a9YGK6&_kvgHHv$OmNKCy}tEenbF#(i)LAd_(|z(k@HOJ|X}X L)YZ}fiND}qinm@C diff --git a/tests/chat/__pycache__/test_direct_service.cpython-312.pyc b/tests/chat/__pycache__/test_direct_service.cpython-312.pyc deleted file mode 100644 index d59db5170ff93d1e18a483b3f60b1f217be3f1bb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4002 zcmb_fU2Igx6`uREzjwX6w!sA4I2&SUmcr6BEhz;Yf(buKaiSP0=?3TKvU6=;`|eL? z?gDn#(l)ge42_(sjZCCg%}XSZc|cVnRh3Fx^`S(4=v|1~)vcpERDH;si7nCc)N|(E z^&j-99cj-rvs_+Y$su|h} zJE$}n0U9>L!%=WbI3EGiqFz!zW{iV;hgl}*j8>+GK?}WLl&D1w$K+m;86!FeO~5$a zqF%hpO{RlJY=R{~v=?TkQ)Q)s5~w6WABG>!m%a&PjyT8@&1vl-HMu5Vms&oj@`!X@ zY0U;nRviGh#F%m3Kgvs&%B*PE)}%=TPFn%up_>;9CaX9cc84wBw~?X++LlJLG6SOt zLuIn6r*hLCW^KqxB0=Rj0x$#Z{^MY)!}k`z?R#;kQ;V4e2P_v+&Q&J7_}QvuQ@sKq zo7}qIbGg+e4aGhNq)rx6+ZH-ASHE*B{%Pl6b91k|X~%L%Nyit75{oav76LJd>Uzm2 zn!4`Ab-h@oRdB!VC3LXTu!9waJIqsUi#wi5t%Bp*^#};KMi|DIZ9#%Z3xXGpqwA+h zb7cHWqK4vEI~TG0^%J6V2VZqxJJT2(a^IwlLF)4=KUl^szCe`qaKwEZR@NXcMisa! z3YDn}$OFUy%2XPGpDZvZnJQo|3YZH`$k{m9id#UId#(9+;vfX z$F~(wui51hy%5|zt-{L1iX*}jz}+fUst)@qe7X+isH@O72ZK3MBNwDG7;S8D`v7(Y zd5tY{RvGvL)t=nMN6S^4W=drzbJonDT_$C{u#{DWb?iwPvn&!+UD&u#i(aG5~oy976^a|vz~+V_HnZ-?i|2)PtqO{(*-jBSdnrq>mo5D<#(?+Ho;F4DZWy3=(x9b4qqFp^7$!T5f1Hd8~Z{3#LwI zi$_%&qG4zA$~;1&GW-Q4Q8F7U z$Rm(7h9GKFp<0Nh(4e2lKaQ!uoeI%3Z6A?WznK88Bv#IoZ0CcC6`j6>j~*r}D&dFl z&dLM#L-4}yc}hSP5-P@XO+vjNJ!l)nv()IDJoS)wQRm}Uh3mFm)X$HaCEYw{QL|Jq zb&EqD=GEb0t6)LFlRIdaA+_;782I8uF2lp>#65l19WFLb7wdkODFhLRMZc5~s$-6Q zPnsh$>e$*hLu?{oQcZ%ALK#+D(Htb~8?Xr3J#17eW{JW*#ar&FtZbWJM5KEt#Uc)r zX;|4ri+;Vu#RbQzpzgn`&%jszXX`PYb0q(&lUpbL^3o?SxkDwl;<)Fg76~~lAD5vU zl1|7=gq)I2%7JIHA*hL3<(j8}+r4zFHe*5M>BWUX91Bk`5!j?dK{P%Y^^+t7dmoyV z4vNqWBsLw(y2&(nYOhhT_Tr3V(L+4xLRRtAis6j11MroX2pp%68hjM;aJ;1e7KiY3 zj$zpZ<4AC{7s8T~S23%(zi>ZxKXPw2e%N@+y#c?Qjkn$3x;HcKP4{;&sW&cX++Stf z-@yDM_hYDb%J8~jT4rCvvsKi~iy2VgamOe*euUHFF=CjL7$y$C5JC`%T2KW{SjG;$6K4xHjtIokn~Y=k|F3(w&~B&Z9q z`sGy{>N0e?r&^9#WQSk}$6SjT%481vFZF@{;rg&wQJN47*ayrspV?nOu@LXLysO^7 z(7x@b-Srn1lD!KZnL8cZn~BuI*4@|7%)ik%RJ^mb)a-n8Stea4r%7`2 z?CUeHH>0V)MSB|2o`pnDvwKIgdwcVdT?<=wy1V;s$?o^ge7a@G?RsN57HUf_DG?}H zl~^)dKepIK5*@RLW)8VpZ$s^EYMW>KX8Nw|{AKR_+#M}jKibq%uGZa9yJ0YUVCI0U zZEvXCo7%zOtAEn|pf$7?8|sTqtsP}tId(f(P0sG0*?&d4)YnkAHZxEDRm)ycFCKlj z{qphKTK4Mjjd6F+k=xplhI+)+j{F;V91HtD?n@kPQ`sIEX4}~SblzhC;+$Ve^BflR zx%IWYz=-$w1G`!{Ze1jX2=clg*tdGU1mwJ)wL2h}=1l)jBI;n;T>SqK6}yMmE5{3? zX3_996S(sch_A1YV^Jhvz(q=4t-Bx<`&RX_Ay~yE$ni!lDv~7qoh1KBj(kR*`;0vG oIeGqba`;|2B*pI%AotQ?Y3E%6 [параметры] +``` + +### 1. Индексация репозитория + +Создаёт RAG-сессию и индексирует указанную директорию. Результат — `rag_session_id`, который передаётся в пайплайны с retrieval или full_chain. + +```bash +python -m tests.pipeline_setup.suite_02_pipeline.cli.index_repo --repo-path <путь_к_репо> [--project-id ID] +``` + +| Параметр | Обязательный | Описание | +|----------|--------------|----------| +| `--repo-path` | да | Путь к корню индексируемого репозитория. | +| `--project-id` | нет | Идентификатор проекта для сессии; по умолчанию — имя директории репо. | + +Пример: + +```bash +python -m tests.pipeline_setup.suite_02_pipeline.cli.index_repo --repo-path ./tests/pipeline_setup/suite_01_synthetic/fixtures/code_qa_repo --project-id code_qa_repo +# Вывод: rag_session_id= +``` + +### 2. Пайплайн «только intent router» + +Цепочка: классификация запроса (intent_router_v2), без RAG и LLM. + +```bash +python -m tests.pipeline_setup.suite_02_pipeline.cli.run_router_only [--case-id ID ...] [--verbose] [--test-name PREFIX] +``` + +| Параметр | Описание | +|----------|----------| +| `--case-id` | Запустить только указанные кейсы (можно повторять). | +| `--verbose` | Выводить диагностику по каждому кейсу. | +| `--test-name` | Префикс имени файла с результатами (по умолчанию `cli_router_only`). | + +### 3. Пайплайн «intent router + retrieval» + +Цепочка: intent_router_v2 → RAG retrieval. Требуется предварительная индексация (или `--reindex-repo-path`). + +```bash +# С уже полученным rag_session_id: +python -m tests.pipeline_setup.suite_02_pipeline.cli.run_router_rag --rag-session-id [--case-id ID ...] [--verbose] + +# С индексацией перед прогоном: +python -m tests.pipeline_setup.suite_02_pipeline.cli.run_router_rag --reindex-repo-path <путь_к_репо> [--reindex-project-id ID] [--case-id ID ...] +``` + +| Параметр | Описание | +|----------|----------| +| `--rag-session-id` | UUID RAG-сессии (результат индексации). | +| `--reindex-repo-path` | Индексировать репо перед прогоном и использовать новую сессию. | +| `--reindex-project-id` | project_id для новой сессии при `--reindex-repo-path`. | +| `--case-id` | Запустить только указанные кейсы. | +| `--verbose` | Диагностика по каждому кейсу. | +| `--test-name` | Префикс файла результатов (по умолчанию `cli_router_rag`). | + +Переменная окружения: `RUN_INTENT_PIPELINE_ROUTER_RAG=1` — включить режим router_rag. Обязательна `DATABASE_URL`. + +### 4. Пайплайн «полная цепочка» (router + retrieval + LLM) + +Цепочка: intent_router_v2 → RAG retrieval → ответ LLM (например GigaChat). + +```bash +# С уже полученным rag_session_id: +python -m tests.pipeline_setup.suite_02_pipeline.cli.run_full_chain --rag-session-id [--case-id ID ...] [--verbose] + +# С индексацией перед прогоном: +python -m tests.pipeline_setup.suite_02_pipeline.cli.run_full_chain --reindex-repo-path <путь_к_репо> [--reindex-project-id ID] [--case-id ID ...] +``` + +Параметры — те же, что у `run_router_rag`. Дополнительно: `RUN_INTENT_PIPELINE_FULL_CHAIN=1` и настройки доступа к LLM (см. `.env` и `suite_02_pipeline/pipeline_intent_rag/.env.test`). + +## Запуск через pytest + +- Только intent router (без RAG/LLM): + `pytest tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/test_intent_router_only_matrix.py -q` + +- С RAG (нужны `RUN_INTENT_PIPELINE_ROUTER_RAG=1` и БД): + `RUN_INTENT_PIPELINE_ROUTER_RAG=1 pytest -m router_rag tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/ -q` + +- Полная цепочка (нужны `RUN_INTENT_PIPELINE_FULL_CHAIN=1`, БД и LLM): + `RUN_INTENT_PIPELINE_FULL_CHAIN=1 pytest -m full_chain tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/ -q` + +Подробнее — в `suite_02_pipeline/pipeline_intent_rag/README.md` и `suite_01_synthetic/code_qa_eval/README.md`. + +## Окружение + +- Загрузка env: сначала `suite_02_pipeline/pipeline_intent_rag/.env.test`, затем workspace `.env`. +- Для retrieval и full_chain нужны `DATABASE_URL` и (для full_chain) настройки LLM. diff --git a/tests/pipeline_setup/__init__.py b/tests/pipeline_setup/__init__.py new file mode 100644 index 0000000..e64f894 --- /dev/null +++ b/tests/pipeline_setup/__init__.py @@ -0,0 +1 @@ +"""Pipeline configuration tests: intent-router → RAG → LLM, CODE_QA eval harness.""" diff --git a/tests/pipeline_setup/conftest.py b/tests/pipeline_setup/conftest.py new file mode 100644 index 0000000..dc2c902 --- /dev/null +++ b/tests/pipeline_setup/conftest.py @@ -0,0 +1,5 @@ +from __future__ import annotations + +from tests.pipeline_setup.env_loader import load_pipeline_setup_env + +load_pipeline_setup_env(start_dir=__file__) diff --git a/tests/pipeline_setup/env_loader.py b/tests/pipeline_setup/env_loader.py new file mode 100644 index 0000000..88e56c1 --- /dev/null +++ b/tests/pipeline_setup/env_loader.py @@ -0,0 +1,42 @@ +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) + pipeline_root = _find_pipeline_setup_root(base) + env_path = pipeline_root / ".env" + if env_path.is_file(): + _apply_env_file(env_path) + loaded.append(env_path) + return loaded + + +def _find_pipeline_setup_root(base: Path) -> Path: + for directory in (base, *base.parents): + if directory.name == "pipeline_setup" and (directory / "__init__.py").is_file(): + return directory + raise RuntimeError(f"Unable to locate tests/pipeline_setup 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 not name: + continue + 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 diff --git a/tests/pipeline_setup/suite_01_synthetic/README.md b/tests/pipeline_setup/suite_01_synthetic/README.md new file mode 100644 index 0000000..6a81655 --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/README.md @@ -0,0 +1,63 @@ +# Suite 01 Synthetic + +Синтетический набор тестов для проверки CODE_QA на тестовом репозитории: +[fixtures/code_qa_repo](/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup/suite_01_synthetic/fixtures/code_qa_repo). + +## Что входит в suite + +- `fixtures/` — тестовый репозиторий и входные данные +- `golden/` — golden-кейсы +- `code_qa_eval/` — eval harness, который индексирует репозиторий и прогоняет golden-кейсы + +## Запуск тестов + +Из корня проекта: + +```bash +PYTHONPATH=. pytest tests/pipeline_setup/suite_01_synthetic/code_qa_eval/ -q +``` + +Точечный запуск: + +```bash +PYTHONPATH=. pytest tests/pipeline_setup/suite_01_synthetic/code_qa_eval/test_eval_harness.py -q +``` + +## Запуск eval harness + +Из корня проекта: + +```bash +PYTHONPATH=. python -m tests.pipeline_setup.suite_01_synthetic.code_qa_eval.run +``` + +Во время запуска harness: + +- выбирает репозиторий для индексации +- создаёт новый `rag_session_id` +- индексирует репозиторий в RAG +- прогоняет golden-кейсы через CODE_QA pipeline + +## Параметры запуска + +У suite нет собственных CLI-флагов; конфигурация задаётся через переменные окружения: + +- `CODE_QA_REPO_PATH` — путь к локальному репозиторию вместо fixture-репозитория +- `CODE_QA_PROJECT_ID` — `project_id` для создаваемой RAG-сессии; если не задан, берётся имя директории репозитория + +Поведение по умолчанию: + +- если `CODE_QA_REPO_PATH` не задан, используется `fixtures/code_qa_repo` +- для fixture-режима `project_id` фиксирован как `code_qa_repo` +- `rag_session_id` заранее не передаётся, а создаётся автоматически во время индексации + +## Что требуется для запуска + +- рабочий `DATABASE_URL` +- доступные зависимости для RAG и SQLAlchemy + +Артефакты пишутся в: +[test_results/code_qa_eval](/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup/test_results/code_qa_eval) + +Детали harness: +[code_qa_eval/README.md](/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup/suite_01_synthetic/code_qa_eval/README.md) diff --git a/tests/pipeline_setup/suite_01_synthetic/__init__.py b/tests/pipeline_setup/suite_01_synthetic/__init__.py new file mode 100644 index 0000000..e079ad3 --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/__init__.py @@ -0,0 +1 @@ +"""Synthetic pipeline tests built around fixture repositories and golden cases.""" diff --git a/tests/pipeline_setup/suite_01_synthetic/code_qa_eval/README.md b/tests/pipeline_setup/suite_01_synthetic/code_qa_eval/README.md new file mode 100644 index 0000000..e360c8a --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/code_qa_eval/README.md @@ -0,0 +1,35 @@ +# CODE_QA evaluation harness + +Runs the canonical CODE_QA pipeline (IntentRouterV2 → retrieval → evidence gate → diagnostics) over golden cases and writes artifacts for calibration. + +## Modes + +- **Fixture (default):** Uses `tests/pipeline_setup/suite_01_synthetic/fixtures/code_qa_repo`. No env vars required. +- **Local repo:** Set `CODE_QA_REPO_PATH` to a directory; optionally `CODE_QA_PROJECT_ID`. + +## Run + +From the **project root** (agent repo): + +```bash +python -m tests.pipeline_setup.suite_01_synthetic.code_qa_eval.run +``` + +Requires a configured database (same as pipeline_intent_rag router_rag tests). Outputs: + +- `tests/pipeline_setup/test_results/code_qa_eval//*.md` and `*.json` per case +- `tests/pipeline_setup/test_results/code_qa_eval/summary_.md` batch summary + +Exit code 0 if all golden cases pass, 1 otherwise. + +## Golden cases + +Edit `tests/pipeline_setup/suite_01_synthetic/golden/code_qa/cases.yaml` to add or change cases. See `tests/pipeline_setup/suite_01_synthetic/golden/code_qa/README.md` for the field format. + +## Tests + +```bash +pytest tests/pipeline_setup/suite_01_synthetic/code_qa_eval/ -v +``` + +The fixture-mode integration test (`test_run_eval_fixture_mode_structure`) is skipped if the DB or dependencies are not available. diff --git a/tests/pipeline_setup/suite_01_synthetic/code_qa_eval/__init__.py b/tests/pipeline_setup/suite_01_synthetic/code_qa_eval/__init__.py new file mode 100644 index 0000000..c131870 --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/code_qa_eval/__init__.py @@ -0,0 +1 @@ +"""CODE_QA pipeline calibration: golden runner, diagnostics artifacts, fixture and real-repo support.""" diff --git a/tests/pipeline_setup/suite_01_synthetic/code_qa_eval/artifacts.py b/tests/pipeline_setup/suite_01_synthetic/code_qa_eval/artifacts.py new file mode 100644 index 0000000..1e174f8 --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/code_qa_eval/artifacts.py @@ -0,0 +1,152 @@ +"""Write diagnostics artifacts and batch summary for CODE_QA evaluation.""" + +from __future__ import annotations + +import json +from datetime import datetime +from pathlib import Path + +from tests.pipeline_setup.suite_01_synthetic.code_qa_eval.runner import EvalCaseResult + + +def dump_run_artifact( + result: EvalCaseResult, + out_dir: Path, + *, + run_id: str = "", +) -> None: + """Write one run: markdown summary and JSON detail for manual review.""" + out_dir.mkdir(parents=True, exist_ok=True) + prefix = result.case.id + if run_id: + prefix = f"{run_id}_{prefix}" + + md_path = out_dir / f"{prefix}.md" + md_path.write_text(_run_markdown(result), encoding="utf-8") + + json_path = out_dir / f"{prefix}.json" + json_path.write_text( + json.dumps(_run_json(result), ensure_ascii=False, indent=2), + encoding="utf-8", + ) + + +def _run_markdown(result: EvalCaseResult) -> str: + c = result.case + p = result.pipeline_result + dr = p.diagnostics_report + lines = [ + f"# {c.id}", + "", + "## Query", + c.query, + "", + "## Expected", + f"- intent: {c.expected_intent}, sub_intent: {c.expected_sub_intent}", + f"- answer_mode: {c.expected_answer_mode}", + "", + "## Actual", + f"- intent: {p.router_result.intent}, sub_intent: {p.router_result.query_plan.sub_intent if p.router_result.query_plan else '—'}", + f"- answer_mode: {p.answer_mode}", + f"- evidence_gate_passed: {p.evidence_gate_passed}", + f"- evidence_count: {p.evidence_bundle.evidence_count}", + "", + "## Result", + "PASS" if result.passed else "FAIL", + "", + ] + if result.mismatches: + lines.append("## Mismatches") + for m in result.mismatches: + lines.append(f"- {m}") + lines.append("") + lines.extend([ + "## Router", + f"- path_scope: {list(getattr(p.router_result.retrieval_spec.filters, 'path_scope', []) or [])}", + f"- layers: {[q.layer_id for q in (p.router_result.retrieval_spec.layer_queries or [])]}", + "", + "## Retrieval", + f"- requested_layers: {p.retrieval_request.requested_layers}", + f"- chunk_count: {len(p.retrieval_result.code_chunks)}", + f"- layer_outcomes: {[(o.layer_id, o.hit_count) for o in p.retrieval_result.layer_outcomes]}", + "", + "## Evidence gate", + f"- failure_reasons: {dr.failure_reasons if dr else []}", + "", + "## Timings (ms)", + f"{p.timings_ms}", + "", + ]) + return "\n".join(lines) + + +def _run_json(result: EvalCaseResult) -> dict: + c = result.case + p = result.pipeline_result + dr = p.diagnostics_report + return { + "case_id": c.id, + "query": c.query, + "expected": { + "intent": c.expected_intent, + "sub_intent": c.expected_sub_intent, + "answer_mode": c.expected_answer_mode, + }, + "actual": { + "intent": p.router_result.intent, + "sub_intent": p.router_result.query_plan.sub_intent if p.router_result.query_plan else None, + "answer_mode": p.answer_mode, + "evidence_gate_passed": p.evidence_gate_passed, + "evidence_count": p.evidence_bundle.evidence_count, + }, + "passed": result.passed, + "mismatches": result.mismatches, + "router_result": dr.router_result if dr else {}, + "retrieval_request": dr.retrieval_request if dr else {}, + "per_layer_outcome": dr.per_layer_outcome if dr else [], + "failure_reasons": dr.failure_reasons if dr else [], + "timings_ms": p.timings_ms, + } + + +def write_batch_summary( + results: list[EvalCaseResult], + out_dir: Path, + *, + run_id: str = "", +) -> Path: + """Write a single readable batch summary; returns path to the file.""" + out_dir.mkdir(parents=True, exist_ok=True) + passed = sum(1 for r in results if r.passed) + total = len(results) + stamp = run_id or datetime.now().strftime("%Y%m%d_%H%M%S") + path = out_dir / f"summary_{stamp}.md" + lines = [ + "# CODE_QA evaluation summary", + "", + f"**{passed}/{total}** cases passed.", + "", + "| Case ID | Query | Expected scenario | Actual scenario | Target | Evidence | Answer mode | Pass |", + "|---------|-------|------------------|-----------------|--------|----------|-------------|------|", + ] + for r in results: + c = r.case + p = r.pipeline_result + sub = p.router_result.query_plan.sub_intent if p.router_result.query_plan else "—" + target = "—" + if p.evidence_bundle.resolved_target: + target = p.evidence_bundle.resolved_target[:40] + ("…" if len(p.evidence_bundle.resolved_target or "") > 40 else "") + ev = "✓" if p.evidence_gate_passed else "✗" + mode = p.answer_mode + pass_mark = "✓" if r.passed else "✗" + q_short = c.query[:40] + ("…" if len(c.query) > 40 else "") + lines.append( + f"| {c.id} | {q_short} | {c.expected_sub_intent} | {sub} | {target} | {ev} | {mode} | {pass_mark} |" + ) + lines.append("") + lines.append("## Failures") + for r in results: + if not r.passed and r.mismatches: + lines.append(f"- **{r.case.id}**: {'; '.join(r.mismatches)}") + path.write_text("\n".join(lines), encoding="utf-8") + return path diff --git a/tests/pipeline_setup/suite_01_synthetic/code_qa_eval/config.py b/tests/pipeline_setup/suite_01_synthetic/code_qa_eval/config.py new file mode 100644 index 0000000..806b561 --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/code_qa_eval/config.py @@ -0,0 +1,41 @@ +"""Eval harness config: fixture vs user-provided repo path, artifact output.""" + +from __future__ import annotations + +import os +from dataclasses import dataclass +from pathlib import Path + + +@dataclass(frozen=True, slots=True) +class EvalConfig: + """Configuration for CODE_QA evaluation runs.""" + + repo_path: Path + test_results_dir: Path + golden_cases_path: Path + project_id: str | None = None + use_fixture: bool = True + + @classmethod + def from_env(cls, project_root: Path | None = None) -> "EvalConfig": + """Build config: fixture repo by default; optional CODE_QA_REPO_PATH for local calibration.""" + root = project_root or Path(__file__).resolve().parent.parent + raw_repo = os.getenv("CODE_QA_REPO_PATH", "").strip() + if raw_repo: + repo_path = Path(raw_repo).expanduser().resolve() + use_fixture = False + project_id = os.getenv("CODE_QA_PROJECT_ID", "").strip() or repo_path.name + else: + repo_path = root / "fixtures" / "code_qa_repo" + use_fixture = True + project_id = "code_qa_repo" + test_results_dir = root / "test_results" / "code_qa_eval" + golden_cases_path = root / "golden" / "code_qa" / "cases.yaml" + return cls( + repo_path=repo_path, + test_results_dir=test_results_dir, + golden_cases_path=golden_cases_path, + project_id=project_id, + use_fixture=use_fixture, + ) diff --git a/tests/pipeline_setup/suite_01_synthetic/code_qa_eval/golden_loader.py b/tests/pipeline_setup/suite_01_synthetic/code_qa_eval/golden_loader.py new file mode 100644 index 0000000..f84aed1 --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/code_qa_eval/golden_loader.py @@ -0,0 +1,51 @@ +"""Load golden cases from YAML for CODE_QA evaluation.""" + +from __future__ import annotations + +from dataclasses import dataclass, field +from pathlib import Path +from typing import Any + +import yaml + + +@dataclass(slots=True) +class GoldenCase: + """Single golden case for pipeline evaluation.""" + + id: str + query: str + expected_intent: str + expected_sub_intent: str + expected_answer_mode: str = "normal" + expected_target_hint: str | None = None + expected_path_scope_contains: list[str] = field(default_factory=list) + expected_symbol_candidates_contain: list[str] = field(default_factory=list) + expected_layers: list[str] = field(default_factory=list) + notes: str = "" + + +def load_golden_cases(path: Path) -> list[GoldenCase]: + """Load and parse golden cases from YAML. Returns list of GoldenCase.""" + if not path.exists(): + return [] + with path.open(encoding="utf-8") as f: + data = yaml.safe_load(f) or {} + cases_raw = data.get("cases") or [] + out: list[GoldenCase] = [] + for c in cases_raw: + if not isinstance(c, dict) or not c.get("id") or not c.get("query"): + continue + out.append(GoldenCase( + id=str(c["id"]), + query=str(c["query"]), + expected_intent=str(c.get("expected_intent", "CODE_QA")), + expected_sub_intent=str(c.get("expected_sub_intent", "EXPLAIN")), + expected_answer_mode=str(c.get("expected_answer_mode", "normal")), + expected_target_hint=c.get("expected_target_hint"), + expected_path_scope_contains=list(c.get("expected_path_scope_contains") or []), + expected_symbol_candidates_contain=list(c.get("expected_symbol_candidates_contain") or []), + expected_layers=list(c.get("expected_layers") or []), + notes=str(c.get("notes") or ""), + )) + return out diff --git a/tests/pipeline_setup/suite_01_synthetic/code_qa_eval/run.py b/tests/pipeline_setup/suite_01_synthetic/code_qa_eval/run.py new file mode 100644 index 0000000..b01c8d1 --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/code_qa_eval/run.py @@ -0,0 +1,111 @@ +"""Entrypoint: run CODE_QA golden evaluation and write artifacts + summary.""" + +from __future__ import annotations + +import sys +from datetime import datetime +from pathlib import Path + +_agent_root = Path(__file__).resolve().parents[4] +if str(_agent_root) not in sys.path: + sys.path.insert(0, str(_agent_root)) +_src = _agent_root / "src" +if _src.exists() and str(_src) not in sys.path: + sys.path.insert(0, str(_src)) + +# Load .env from project root so DATABASE_URL is available +from app.modules.shared.env_loader import load_workspace_env + +from tests.pipeline_setup.suite_01_synthetic.code_qa_eval.artifacts import dump_run_artifact, write_batch_summary +from tests.pipeline_setup.suite_01_synthetic.code_qa_eval.config import EvalConfig +from tests.pipeline_setup.suite_01_synthetic.code_qa_eval.runner import run_eval + + +class _TeeStream: + def __init__(self, *streams) -> None: + self._streams = streams + + def write(self, data: str) -> int: + for stream in self._streams: + stream.write(data) + return len(data) + + def flush(self) -> None: + for stream in self._streams: + stream.flush() + + +def _check_db_available() -> bool: + """Try to connect to the database; return False if unavailable.""" + try: + from sqlalchemy import text + from app.modules.shared.db import get_engine + with get_engine().connect() as conn: + conn.execute(text("SELECT 1")) + return True + except Exception: + return False + + +def main() -> None: + # Workspace root (agent repo) for .env; pipeline_setup root for fixtures/golden/test_results + workspace_root = Path(__file__).resolve().parents[3] + pipeline_root = Path(__file__).resolve().parents[1] + load_workspace_env(workspace_root) + config = EvalConfig.from_env(project_root=pipeline_root) + run_id = datetime.now().strftime("%Y%m%d_%H%M%S") + results_run_dir = config.test_results_dir / run_id + results_run_dir.mkdir(parents=True, exist_ok=True) + console_log_path = results_run_dir / "console_output.txt" + + original_stdout = sys.stdout + original_stderr = sys.stderr + with console_log_path.open("w", encoding="utf-8") as log_file: + sys.stdout = _TeeStream(original_stdout, log_file) + sys.stderr = _TeeStream(original_stderr, log_file) + try: + _run_with_logging(config, results_run_dir, run_id) + finally: + sys.stdout.flush() + sys.stderr.flush() + sys.stdout = original_stdout + sys.stderr = original_stderr + + +def _run_with_logging(config: EvalConfig, results_run_dir: Path, run_id: str) -> None: + print(f"Console log: {results_run_dir / 'console_output.txt'}") + + if not config.repo_path.exists(): + print(f"Repo path not found: {config.repo_path}", file=sys.stderr) + sys.exit(1) + if not config.golden_cases_path.exists(): + print(f"Golden cases not found: {config.golden_cases_path}", file=sys.stderr) + sys.exit(1) + + if not _check_db_available(): + print( + "Database is not available. Evaluation requires a running PostgreSQL instance.\n" + "Set DATABASE_URL (e.g. postgresql+psycopg://user:pass@localhost:5432/db) or start the DB (e.g. docker-compose up -d db).", + file=sys.stderr, + ) + sys.exit(1) + + print(f"Running evaluation: repo={config.repo_path}, fixture={config.use_fixture}") + print(f"Results: {results_run_dir}") + + results = run_eval(config) + for r in results: + dump_run_artifact(r, results_run_dir, run_id=run_id) + + summary_path = write_batch_summary(results, config.test_results_dir, run_id=run_id) + passed = sum(1 for r in results if r.passed) + total = len(results) + print(f"\n{passed}/{total} cases passed. Summary: {summary_path}") + for r in results: + if not r.passed: + print(f" FAIL {r.case.id}: {'; '.join(r.mismatches)}") + sys.exit(0 if passed == total else 1) + + +if __name__ == "__main__": + main() diff --git a/tests/pipeline_setup/suite_01_synthetic/code_qa_eval/runner.py b/tests/pipeline_setup/suite_01_synthetic/code_qa_eval/runner.py new file mode 100644 index 0000000..815b7aa --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/code_qa_eval/runner.py @@ -0,0 +1,102 @@ +"""Run golden cases through CodeQAPipelineRunner and compare to expected.""" + +from __future__ import annotations + +from dataclasses import dataclass, field +from pathlib import Path + +from app.modules.rag.code_qa_pipeline import CodeQAPipelineResult, CodeQAPipelineRunner +from app.modules.rag.contracts.enums import RagLayer +from app.modules.rag.intent_router_v2 import ConversationState, IntentRouterV2, RepoContext + +from tests.pipeline_setup.suite_01_synthetic.code_qa_eval.config import EvalConfig +from tests.pipeline_setup.suite_01_synthetic.code_qa_eval.golden_loader import GoldenCase, load_golden_cases + + +@dataclass(slots=True) +class EvalCaseResult: + """Result of evaluating one golden case.""" + + case: GoldenCase + pipeline_result: CodeQAPipelineResult + passed: bool + mismatches: list[str] = field(default_factory=list) + + +def _repo_context() -> RepoContext: + return RepoContext( + languages=["python"], + available_domains=["CODE", "DOCS"], + available_layers=[ + RagLayer.CODE_ENTRYPOINTS, + RagLayer.CODE_SYMBOL_CATALOG, + RagLayer.CODE_DEPENDENCY_GRAPH, + RagLayer.CODE_SEMANTIC_ROLES, + RagLayer.CODE_SOURCE_CHUNKS, + RagLayer.DOCS_MODULE_CATALOG, + RagLayer.DOCS_FACT_INDEX, + RagLayer.DOCS_SECTION_INDEX, + RagLayer.DOCS_POLICY_INDEX, + ], + ) + + +def run_eval(config: EvalConfig) -> list[EvalCaseResult]: + """Index repo, run all golden cases through the pipeline, compare to expected. Returns list of EvalCaseResult.""" + from app.modules.rag.persistence.repository import RagRepository + from tests.pipeline_setup.suite_02_pipeline.pipeline_intent_rag.helpers.rag_db_adapter import RagDbAdapter, SessionEmbeddingDimensions + from tests.pipeline_setup.utils.rag_indexer import RagSessionIndexer + + repo = RagRepository() + repo.ensure_tables() + indexer = RagSessionIndexer(repo) + rag_session_id = indexer.index_repo(config.repo_path, project_id=config.project_id) + + adapter = RagDbAdapter(repository=repo, dim_resolver=SessionEmbeddingDimensions()) + router = IntentRouterV2() + runner = CodeQAPipelineRunner( + router=router, + retrieval_adapter=adapter, + repo_context=_repo_context(), + ) + + cases = load_golden_cases(config.golden_cases_path) + + results: list[EvalCaseResult] = [] + for case in cases: + pipeline_result = runner.run(case.query, rag_session_id, run_retrieval=True, run_hydrate=True) + passed, mismatches = _compare(case, pipeline_result) + results.append(EvalCaseResult(case=case, pipeline_result=pipeline_result, passed=passed, mismatches=mismatches)) + return results + + +def _compare(case: GoldenCase, result: CodeQAPipelineResult) -> tuple[bool, list[str]]: + mismatches: list[str] = [] + rr = result.router_result + sub_intent = (rr.query_plan.sub_intent if rr.query_plan else None) or "" + + if rr.intent != case.expected_intent: + mismatches.append(f"intent: expected {case.expected_intent}, got {rr.intent}") + if sub_intent != case.expected_sub_intent: + mismatches.append(f"sub_intent: expected {case.expected_sub_intent}, got {sub_intent}") + if result.answer_mode != case.expected_answer_mode: + mismatches.append(f"answer_mode: expected {case.expected_answer_mode}, got {result.answer_mode}") + + if case.expected_path_scope_contains: + path_scope = list(getattr(rr.retrieval_spec.filters, "path_scope", []) or []) + for want in case.expected_path_scope_contains: + if not any(want in p for p in path_scope): + mismatches.append(f"path_scope should contain '{want}', got {path_scope}") + if case.expected_symbol_candidates_contain: + candidates = list(rr.query_plan.symbol_candidates or []) if rr.query_plan else [] + for want in case.expected_symbol_candidates_contain: + if want not in candidates: + mismatches.append(f"symbol_candidates should contain '{want}', got {candidates}") + if case.expected_layers: + layers = [str(q.layer_id) for q in (rr.retrieval_spec.layer_queries or [])] + for want in case.expected_layers: + if want not in layers: + mismatches.append(f"layers should include '{want}', got {layers}") + + passed = len(mismatches) == 0 + return passed, mismatches diff --git a/tests/pipeline_setup/suite_01_synthetic/code_qa_eval/test_eval_harness.py b/tests/pipeline_setup/suite_01_synthetic/code_qa_eval/test_eval_harness.py new file mode 100644 index 0000000..5c5b7d2 --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/code_qa_eval/test_eval_harness.py @@ -0,0 +1,189 @@ +"""Tests for CODE_QA evaluation harness: golden loader, compare logic, fixture-mode run.""" + +from __future__ import annotations + +from pathlib import Path + +import pytest + +from app.modules.rag.code_qa_pipeline import CodeQAPipelineResult +from app.modules.rag.intent_router_v2.models import ( + CodeRetrievalFilters, + EvidencePolicy, + IntentRouterResult, + QueryPlan, + RetrievalSpec, + SymbolResolution, +) + +from tests.pipeline_setup.suite_01_synthetic.code_qa_eval.config import EvalConfig +from tests.pipeline_setup.suite_01_synthetic.code_qa_eval.golden_loader import GoldenCase, load_golden_cases +from tests.pipeline_setup.suite_01_synthetic.code_qa_eval.runner import EvalCaseResult, _compare, run_eval + +_TEST_ROOT = Path(__file__).resolve().parent.parent + + +def test_load_golden_cases_returns_list() -> None: + path = _TEST_ROOT / "golden" / "code_qa" / "cases.yaml" + if not path.exists(): + pytest.skip("Golden cases file not found") + cases = load_golden_cases(path) + assert isinstance(cases, list) + assert len(cases) >= 1 + c = cases[0] + assert c.id + assert c.query + assert c.expected_intent in ("CODE_QA", "DOCS_QA") + assert c.expected_sub_intent in ("OPEN_FILE", "EXPLAIN", "FIND_TESTS", "FIND_ENTRYPOINTS", "GENERAL_QA") + assert c.expected_answer_mode in ("normal", "degraded", "insufficient") + + +def test_compare_passed_when_all_match() -> None: + case = GoldenCase( + id="test", + query="Open app/main.py", + expected_intent="CODE_QA", + expected_sub_intent="OPEN_FILE", + expected_answer_mode="normal", + ) + result = _make_pipeline_result(intent="CODE_QA", sub_intent="OPEN_FILE", answer_mode="normal") + passed, mismatches = _compare(case, result) + assert passed is True + assert len(mismatches) == 0 + + +def test_compare_fails_on_intent_mismatch() -> None: + case = GoldenCase( + id="test", + query="Open app/main.py", + expected_intent="CODE_QA", + expected_sub_intent="OPEN_FILE", + expected_answer_mode="normal", + ) + result = _make_pipeline_result(intent="DOCS_QA", sub_intent="OPEN_FILE", answer_mode="normal") + passed, mismatches = _compare(case, result) + assert passed is False + assert any("intent" in m for m in mismatches) + + +def test_compare_fails_on_answer_mode_mismatch() -> None: + case = GoldenCase( + id="test", + query="Explain NonExistent", + expected_intent="CODE_QA", + expected_sub_intent="EXPLAIN", + expected_answer_mode="degraded", + ) + result = _make_pipeline_result(intent="CODE_QA", sub_intent="EXPLAIN", answer_mode="normal") + passed, mismatches = _compare(case, result) + assert passed is False + assert any("answer_mode" in m for m in mismatches) + + +def test_compare_path_scope_contains() -> None: + case = GoldenCase( + id="test", + query="Open app/main.py", + expected_intent="CODE_QA", + expected_sub_intent="OPEN_FILE", + expected_path_scope_contains=["app/main.py"], + ) + result = _make_pipeline_result( + intent="CODE_QA", + sub_intent="OPEN_FILE", + path_scope=["app/main.py"], + ) + passed, _ = _compare(case, result) + assert passed + case_bad = GoldenCase( + id="test2", + query="Open other", + expected_intent="CODE_QA", + expected_sub_intent="OPEN_FILE", + expected_path_scope_contains=["app/main.py"], + ) + result_bad = _make_pipeline_result(intent="CODE_QA", sub_intent="OPEN_FILE", path_scope=[]) + passed_bad, mismatches_bad = _compare(case_bad, result_bad) + assert not passed_bad + assert any("path_scope" in m for m in mismatches_bad) + + +def test_eval_config_fixture_mode_by_default() -> None: + config = EvalConfig.from_env(project_root=_TEST_ROOT) + assert config.use_fixture is True + assert "code_qa_repo" in str(config.repo_path) + assert config.repo_path == _TEST_ROOT / "fixtures" / "code_qa_repo" + assert config.golden_cases_path == _TEST_ROOT / "golden" / "code_qa" / "cases.yaml" + assert config.test_results_dir == _TEST_ROOT / "test_results" / "code_qa_eval" + + +def test_run_eval_fixture_mode_structure() -> None: + """Run full eval on fixture repo; validates harness path. Skips if DB/deps unavailable.""" + config = EvalConfig.from_env(project_root=_TEST_ROOT) + if not config.repo_path.exists(): + pytest.skip("Fixture repo not found") + if not config.golden_cases_path.exists(): + pytest.skip("Golden cases not found") + try: + results = run_eval(config) + except Exception as e: + msg = str(e).lower() + if ( + "connect" in msg + or "database" in msg + or "engine" in msg + or "modulenotfounderror" in msg + or "sqlalchemy" in msg + ): + pytest.skip(f"DB or dependencies not available: {e}") + raise + assert isinstance(results, list) + assert len(results) >= 1 + for r in results: + assert isinstance(r, EvalCaseResult) + assert r.case is not None + assert r.pipeline_result is not None + assert isinstance(r.passed, bool) + assert isinstance(r.mismatches, list) + + +def _make_pipeline_result( + *, + intent: str = "CODE_QA", + sub_intent: str = "EXPLAIN", + answer_mode: str = "normal", + path_scope: list[str] | None = None, +) -> CodeQAPipelineResult: + from app.modules.rag.code_qa_pipeline.contracts import ( + EvidenceBundle, + RetrievalRequest, + RetrievalResult, + ) + + filters = CodeRetrievalFilters(path_scope=path_scope or []) + router_result = IntentRouterResult( + intent=intent, + graph_id="CodeQAGraph", + retrieval_profile="code", + conversation_mode="START", + query_plan=QueryPlan(raw="", normalized="", sub_intent=sub_intent), + retrieval_spec=RetrievalSpec(filters=filters), + symbol_resolution=SymbolResolution(), + evidence_policy=EvidencePolicy(), + ) + req = RetrievalRequest(rag_session_id="", query="", sub_intent=sub_intent, path_scope=path_scope or []) + res = RetrievalResult() + bundle = EvidenceBundle(resolved_sub_intent=sub_intent, evidence_count=1) + return CodeQAPipelineResult( + user_query="", + rag_session_id="", + router_result=router_result, + retrieval_request=req, + retrieval_result=res, + evidence_bundle=bundle, + evidence_gate_passed=(answer_mode == "normal"), + answer_synthesis_input=None, + diagnostics_report=None, + answer_mode=answer_mode, + timings_ms={}, + ) diff --git a/tests/pipeline_setup/suite_01_synthetic/fixtures/code_qa_repo/main.py b/tests/pipeline_setup/suite_01_synthetic/fixtures/code_qa_repo/main.py new file mode 100644 index 0000000..902338c --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/fixtures/code_qa_repo/main.py @@ -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) diff --git a/tests/pipeline_setup/suite_01_synthetic/fixtures/code_qa_repo/src/order_app/__init__.py b/tests/pipeline_setup/suite_01_synthetic/fixtures/code_qa_repo/src/order_app/__init__.py new file mode 100644 index 0000000..a143726 --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/fixtures/code_qa_repo/src/order_app/__init__.py @@ -0,0 +1 @@ +"""Fixture package for CODE_QA pipeline: orders domain, API, services.""" diff --git a/tests/pipeline_setup/suite_01_synthetic/fixtures/code_qa_repo/src/order_app/api/__init__.py b/tests/pipeline_setup/suite_01_synthetic/fixtures/code_qa_repo/src/order_app/api/__init__.py new file mode 100644 index 0000000..e64e7be --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/fixtures/code_qa_repo/src/order_app/api/__init__.py @@ -0,0 +1,3 @@ +from order_app.api.orders import create_app + +__all__ = ["create_app"] diff --git a/tests/pipeline_setup/suite_01_synthetic/fixtures/code_qa_repo/src/order_app/api/orders.py b/tests/pipeline_setup/suite_01_synthetic/fixtures/code_qa_repo/src/order_app/api/orders.py new file mode 100644 index 0000000..07a9ab1 --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/fixtures/code_qa_repo/src/order_app/api/orders.py @@ -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/", 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 diff --git a/tests/pipeline_setup/suite_01_synthetic/fixtures/code_qa_repo/src/order_app/domain/__init__.py b/tests/pipeline_setup/suite_01_synthetic/fixtures/code_qa_repo/src/order_app/domain/__init__.py new file mode 100644 index 0000000..6521aa8 --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/fixtures/code_qa_repo/src/order_app/domain/__init__.py @@ -0,0 +1,3 @@ +from order_app.domain.order import Order + +__all__ = ["Order"] diff --git a/tests/pipeline_setup/suite_01_synthetic/fixtures/code_qa_repo/src/order_app/domain/order.py b/tests/pipeline_setup/suite_01_synthetic/fixtures/code_qa_repo/src/order_app/domain/order.py new file mode 100644 index 0000000..ec03cf3 --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/fixtures/code_qa_repo/src/order_app/domain/order.py @@ -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" diff --git a/tests/pipeline_setup/suite_01_synthetic/fixtures/code_qa_repo/src/order_app/repositories/__init__.py b/tests/pipeline_setup/suite_01_synthetic/fixtures/code_qa_repo/src/order_app/repositories/__init__.py new file mode 100644 index 0000000..2b7dac8 --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/fixtures/code_qa_repo/src/order_app/repositories/__init__.py @@ -0,0 +1,3 @@ +from order_app.repositories.order_repository import OrderRepository + +__all__ = ["OrderRepository"] diff --git a/tests/pipeline_setup/suite_01_synthetic/fixtures/code_qa_repo/src/order_app/repositories/order_repository.py b/tests/pipeline_setup/suite_01_synthetic/fixtures/code_qa_repo/src/order_app/repositories/order_repository.py new file mode 100644 index 0000000..0369f54 --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/fixtures/code_qa_repo/src/order_app/repositories/order_repository.py @@ -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) diff --git a/tests/pipeline_setup/suite_01_synthetic/fixtures/code_qa_repo/src/order_app/services/__init__.py b/tests/pipeline_setup/suite_01_synthetic/fixtures/code_qa_repo/src/order_app/services/__init__.py new file mode 100644 index 0000000..237e37d --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/fixtures/code_qa_repo/src/order_app/services/__init__.py @@ -0,0 +1,3 @@ +from order_app.services.order_service import OrderService + +__all__ = ["OrderService"] diff --git a/tests/pipeline_setup/suite_01_synthetic/fixtures/code_qa_repo/src/order_app/services/order_service.py b/tests/pipeline_setup/suite_01_synthetic/fixtures/code_qa_repo/src/order_app/services/order_service.py new file mode 100644 index 0000000..be1ca07 --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/fixtures/code_qa_repo/src/order_app/services/order_service.py @@ -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) diff --git a/tests/pipeline_setup/suite_01_synthetic/fixtures/code_qa_repo/src/order_app/utils/__init__.py b/tests/pipeline_setup/suite_01_synthetic/fixtures/code_qa_repo/src/order_app/utils/__init__.py new file mode 100644 index 0000000..6490e0e --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/fixtures/code_qa_repo/src/order_app/utils/__init__.py @@ -0,0 +1,3 @@ +from order_app.utils.helpers import format_order_id + +__all__ = ["format_order_id"] diff --git a/tests/pipeline_setup/suite_01_synthetic/fixtures/code_qa_repo/src/order_app/utils/helpers.py b/tests/pipeline_setup/suite_01_synthetic/fixtures/code_qa_repo/src/order_app/utils/helpers.py new file mode 100644 index 0000000..e0e9619 --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/fixtures/code_qa_repo/src/order_app/utils/helpers.py @@ -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" diff --git a/tests/pipeline_setup/suite_01_synthetic/fixtures/code_qa_repo/tests/test_order_service.py b/tests/pipeline_setup/suite_01_synthetic/fixtures/code_qa_repo/tests/test_order_service.py new file mode 100644 index 0000000..431f525 --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/fixtures/code_qa_repo/tests/test_order_service.py @@ -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 diff --git a/tests/pipeline_setup/suite_01_synthetic/golden/code_qa/README.md b/tests/pipeline_setup/suite_01_synthetic/golden/code_qa/README.md new file mode 100644 index 0000000..d774488 --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/golden/code_qa/README.md @@ -0,0 +1,13 @@ +# Golden cases for CODE_QA pipeline calibration + +Each case defines: +- `id`: unique case id +- `query`: user query text +- `expected_intent`: CODE_QA (or DOCS_QA for docs-only; this set is code-only) +- `expected_sub_intent`: OPEN_FILE | EXPLAIN | FIND_TESTS | FIND_ENTRYPOINTS | GENERAL_QA +- `expected_answer_mode`: normal | degraded | insufficient +- `expected_target_hint`: optional — path (for OPEN_FILE), symbol (for EXPLAIN), or test-like +- `expected_layers`: optional — list of layer ids we expect in the retrieval plan +- `notes`: optional — borderline, negative, or calibration hint + +We assert routing, retrieval alignment, evidence sufficiency, and answer mode — not exact LLM wording. diff --git a/tests/pipeline_setup/suite_01_synthetic/golden/code_qa/cases.yaml b/tests/pipeline_setup/suite_01_synthetic/golden/code_qa/cases.yaml new file mode 100644 index 0000000..a09304d --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/golden/code_qa/cases.yaml @@ -0,0 +1,142 @@ +# Golden cases for CODE_QA pipeline (fixture repo: code_qa_repo) +# Scenarios: OPEN_FILE, EXPLAIN, FIND_TESTS, FIND_ENTRYPOINTS, GENERAL_QA + +cases: + # --- OPEN_FILE --- + - id: open_file_main_positive + query: "Открой файл main.py" + expected_intent: CODE_QA + expected_sub_intent: OPEN_FILE + expected_answer_mode: normal + expected_target_hint: path + expected_path_scope_contains: ["main.py"] + notes: "Clear path; fixture has main.py (src layout)" + + - id: open_file_api_positive + query: "Покажи src/order_app/api/orders.py" + expected_intent: CODE_QA + expected_sub_intent: OPEN_FILE + expected_answer_mode: normal + expected_path_scope_contains: ["src/order_app/api/orders.py"] + notes: "Handler module (src layout)" + + - id: open_file_borderline + query: "Open main" + expected_intent: CODE_QA + expected_sub_intent: OPEN_FILE + expected_answer_mode: normal + notes: "Short path hint; may resolve to main.py" + + - id: open_file_negative + query: "Открой файл nonexistent/foo.py" + expected_intent: CODE_QA + expected_sub_intent: OPEN_FILE + expected_answer_mode: degraded + notes: "Path not in repo; evidence gate should fail or degrade" + + # --- EXPLAIN --- + - id: explain_order_positive + query: "Объясни класс Order" + expected_intent: CODE_QA + expected_sub_intent: EXPLAIN + expected_answer_mode: normal + expected_target_hint: symbol + expected_symbol_candidates_contain: ["Order"] + notes: "Domain class in fixture" + + - id: explain_order_service_positive + query: "Как работает OrderService?" + expected_intent: CODE_QA + expected_sub_intent: EXPLAIN + expected_answer_mode: normal + expected_symbol_candidates_contain: ["OrderService"] + notes: "Service layer" + + - id: explain_borderline + query: "Что делает create_order?" + expected_intent: CODE_QA + expected_sub_intent: EXPLAIN + expected_answer_mode: normal + notes: "Function name; may resolve" + + - id: explain_negative + query: "Объясни класс NonExistentClass" + expected_intent: CODE_QA + expected_sub_intent: EXPLAIN + expected_answer_mode: degraded + notes: "Symbol not in repo" + + # --- FIND_TESTS --- + - id: find_tests_positive + query: "Где тесты для OrderService?" + expected_intent: CODE_QA + expected_sub_intent: FIND_TESTS + expected_answer_mode: normal + expected_target_hint: test-like + expected_symbol_candidates_contain: ["OrderService"] + notes: "Fixture has tests/test_order_service.py" + + - id: find_tests_order_positive + query: "Найди тесты для Order" + expected_intent: CODE_QA + expected_sub_intent: FIND_TESTS + expected_answer_mode: normal + notes: "Tests reference Order" + + - id: find_tests_borderline + query: "Есть ли тесты на репозиторий?" + expected_intent: CODE_QA + expected_sub_intent: FIND_TESTS + expected_answer_mode: normal + notes: "Vague target" + + - id: find_tests_negative + query: "Где тесты для NonExistent?" + expected_intent: CODE_QA + expected_sub_intent: FIND_TESTS + expected_answer_mode: degraded + notes: "Target not in repo" + + # --- FIND_ENTRYPOINTS --- + - id: find_entrypoints_positive + query: "Какие точки входа в приложение?" + expected_intent: CODE_QA + expected_sub_intent: FIND_ENTRYPOINTS + expected_answer_mode: normal + notes: "Fixture has main.py entrypoint (src layout)" + + - id: find_entrypoints_english + query: "Find application entrypoints" + expected_intent: CODE_QA + expected_sub_intent: FIND_ENTRYPOINTS + expected_answer_mode: normal + notes: "English variant" + + - id: find_entrypoints_borderline + query: "Где main?" + expected_intent: CODE_QA + expected_sub_intent: FIND_ENTRYPOINTS + expected_answer_mode: normal + notes: "Short; may route to entrypoints or OPEN_FILE" + + # --- GENERAL_QA --- + - id: general_qa_positive + query: "Что делает этот проект?" + expected_intent: CODE_QA + expected_sub_intent: GENERAL_QA + expected_answer_mode: normal + notes: "Broad question; bounded context" + + - id: general_qa_how + query: "How does order creation work?" + expected_intent: CODE_QA + expected_sub_intent: GENERAL_QA + expected_answer_mode: normal + notes: "General flow question" + + - id: general_qa_borderline + query: "Расскажи про код" + expected_intent: CODE_QA + expected_sub_intent: GENERAL_QA + expected_answer_mode: normal + notes: "Very vague; fallback to GENERAL_QA" diff --git a/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_explain_borderline.json b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_explain_borderline.json new file mode 100644 index 0000000..7262a5c --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_explain_borderline.json @@ -0,0 +1,79 @@ +{ + "case_id": "explain_borderline", + "query": "Что делает create_order?", + "expected": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "answer_mode": "normal" + }, + "actual": { + "intent": "PROJECT_MISC", + "sub_intent": "EXPLAIN", + "answer_mode": "normal", + "evidence_gate_passed": true, + "evidence_count": 5 + }, + "passed": false, + "mismatches": [ + "intent: expected CODE_QA, got PROJECT_MISC" + ], + "router_result": { + "intent": "PROJECT_MISC", + "graph_id": "ProjectMiscGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "EXPLAIN", + "path_scope": [], + "layers": [ + "D1_MODULE_CATALOG", + "D3_SECTION_INDEX", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ], + "symbol_resolution_status": "pending" + }, + "retrieval_request": { + "rag_session_id": "b3c7ec39-40a7-40e5-8ba5-fc0e2e3cc63c", + "query": "Что делает create_order?", + "sub_intent": "EXPLAIN", + "path_scope": [], + "requested_layers": [ + "D1_MODULE_CATALOG", + "D3_SECTION_INDEX", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "D1_MODULE_CATALOG", + "hit_count": 0, + "empty": true, + "fallback_used": false + }, + { + "layer_id": "D3_SECTION_INDEX", + "hit_count": 0, + "empty": true, + "fallback_used": false + }, + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 1, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 4, + "empty": false, + "fallback_used": false + } + ], + "failure_reasons": [], + "timings_ms": { + "router": 0, + "retrieval_total": 31, + "symbol_resolution": 0 + } +} \ No newline at end of file diff --git a/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_explain_borderline.md b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_explain_borderline.md new file mode 100644 index 0000000..c244db7 --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_explain_borderline.md @@ -0,0 +1,35 @@ +# explain_borderline + +## Query +Что делает create_order? + +## Expected +- intent: CODE_QA, sub_intent: EXPLAIN +- answer_mode: normal + +## Actual +- intent: PROJECT_MISC, sub_intent: EXPLAIN +- answer_mode: normal +- evidence_gate_passed: True +- evidence_count: 5 + +## Result +FAIL + +## Mismatches +- intent: expected CODE_QA, got PROJECT_MISC + +## Router +- path_scope: [] +- layers: ['D1_MODULE_CATALOG', 'D3_SECTION_INDEX', 'C1_SYMBOL_CATALOG', 'C0_SOURCE_CHUNKS'] + +## Retrieval +- requested_layers: ['D1_MODULE_CATALOG', 'D3_SECTION_INDEX', 'C1_SYMBOL_CATALOG', 'C0_SOURCE_CHUNKS'] +- chunk_count: 5 +- layer_outcomes: [('D1_MODULE_CATALOG', 0), ('D3_SECTION_INDEX', 0), ('C1_SYMBOL_CATALOG', 1), ('C0_SOURCE_CHUNKS', 4)] + +## Evidence gate +- failure_reasons: [] + +## Timings (ms) +{'router': 0, 'retrieval_total': 31, 'symbol_resolution': 0} diff --git a/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_explain_negative.json b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_explain_negative.json new file mode 100644 index 0000000..b9cfa56 --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_explain_negative.json @@ -0,0 +1,87 @@ +{ + "case_id": "explain_negative", + "query": "Объясни класс NonExistentClass", + "expected": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "answer_mode": "degraded" + }, + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "answer_mode": "normal", + "evidence_gate_passed": true, + "evidence_count": 21 + }, + "passed": false, + "mismatches": [ + "answer_mode: expected degraded, got normal" + ], + "router_result": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "EXPLAIN", + "path_scope": [], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_resolution_status": "pending" + }, + "retrieval_request": { + "rag_session_id": "b3c7ec39-40a7-40e5-8ba5-fc0e2e3cc63c", + "query": "Объясни класс NonExistentClass", + "sub_intent": "EXPLAIN", + "path_scope": [], + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 0, + "empty": true, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C4_SEMANTIC_ROLES", + "hit_count": 3, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 6, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C3_ENTRYPOINTS", + "hit_count": 4, + "empty": false, + "fallback_used": false + } + ], + "failure_reasons": [], + "timings_ms": { + "router": 0, + "retrieval_total": 46, + "symbol_resolution": 0 + } +} \ No newline at end of file diff --git a/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_explain_negative.md b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_explain_negative.md new file mode 100644 index 0000000..f0f9684 --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_explain_negative.md @@ -0,0 +1,35 @@ +# explain_negative + +## Query +Объясни класс NonExistentClass + +## Expected +- intent: CODE_QA, sub_intent: EXPLAIN +- answer_mode: degraded + +## Actual +- intent: CODE_QA, sub_intent: EXPLAIN +- answer_mode: normal +- evidence_gate_passed: True +- evidence_count: 21 + +## Result +FAIL + +## Mismatches +- answer_mode: expected degraded, got normal + +## Router +- path_scope: [] +- layers: ['C1_SYMBOL_CATALOG', 'C0_SOURCE_CHUNKS', 'C4_SEMANTIC_ROLES', 'C2_DEPENDENCY_GRAPH', 'C3_ENTRYPOINTS'] + +## Retrieval +- requested_layers: ['C1_SYMBOL_CATALOG', 'C0_SOURCE_CHUNKS', 'C4_SEMANTIC_ROLES', 'C2_DEPENDENCY_GRAPH', 'C3_ENTRYPOINTS'] +- chunk_count: 21 +- layer_outcomes: [('C1_SYMBOL_CATALOG', 0), ('C0_SOURCE_CHUNKS', 8), ('C4_SEMANTIC_ROLES', 3), ('C2_DEPENDENCY_GRAPH', 6), ('C3_ENTRYPOINTS', 4)] + +## Evidence gate +- failure_reasons: [] + +## Timings (ms) +{'router': 0, 'retrieval_total': 46, 'symbol_resolution': 0} diff --git a/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_explain_order_positive.json b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_explain_order_positive.json new file mode 100644 index 0000000..c32cf39 --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_explain_order_positive.json @@ -0,0 +1,61 @@ +{ + "case_id": "explain_order_positive", + "query": "Объясни класс Order", + "expected": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "answer_mode": "normal" + }, + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "answer_mode": "normal", + "evidence_gate_passed": true, + "evidence_count": 15 + }, + "passed": true, + "mismatches": [], + "router_result": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "EXPLAIN", + "path_scope": [], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_resolution_status": "pending" + }, + "retrieval_request": { + "rag_session_id": "b3c7ec39-40a7-40e5-8ba5-fc0e2e3cc63c", + "query": "Объясни класс Order", + "sub_intent": "EXPLAIN", + "path_scope": [], + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 1, + "empty": false, + "fallback_used": false + } + ], + "failure_reasons": [], + "timings_ms": { + "router": 0, + "retrieval_total": 43, + "symbol_resolution": 0 + } +} \ No newline at end of file diff --git a/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_explain_order_positive.md b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_explain_order_positive.md new file mode 100644 index 0000000..6be7f41 --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_explain_order_positive.md @@ -0,0 +1,32 @@ +# explain_order_positive + +## Query +Объясни класс Order + +## Expected +- intent: CODE_QA, sub_intent: EXPLAIN +- answer_mode: normal + +## Actual +- intent: CODE_QA, sub_intent: EXPLAIN +- answer_mode: normal +- evidence_gate_passed: True +- evidence_count: 15 + +## Result +PASS + +## Router +- path_scope: [] +- layers: ['C1_SYMBOL_CATALOG', 'C0_SOURCE_CHUNKS', 'C4_SEMANTIC_ROLES', 'C2_DEPENDENCY_GRAPH', 'C3_ENTRYPOINTS'] + +## Retrieval +- requested_layers: ['C1_SYMBOL_CATALOG', 'C0_SOURCE_CHUNKS', 'C4_SEMANTIC_ROLES', 'C2_DEPENDENCY_GRAPH', 'C3_ENTRYPOINTS'] +- chunk_count: 15 +- layer_outcomes: [('C0_SOURCE_CHUNKS', 1)] + +## Evidence gate +- failure_reasons: [] + +## Timings (ms) +{'router': 0, 'retrieval_total': 43, 'symbol_resolution': 0} diff --git a/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_explain_order_service_positive.json b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_explain_order_service_positive.json new file mode 100644 index 0000000..2dd0f8f --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_explain_order_service_positive.json @@ -0,0 +1,61 @@ +{ + "case_id": "explain_order_service_positive", + "query": "Как работает OrderService?", + "expected": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "answer_mode": "normal" + }, + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "answer_mode": "normal", + "evidence_gate_passed": true, + "evidence_count": 15 + }, + "passed": true, + "mismatches": [], + "router_result": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "EXPLAIN", + "path_scope": [], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_resolution_status": "pending" + }, + "retrieval_request": { + "rag_session_id": "b3c7ec39-40a7-40e5-8ba5-fc0e2e3cc63c", + "query": "Как работает OrderService?", + "sub_intent": "EXPLAIN", + "path_scope": [], + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 1, + "empty": false, + "fallback_used": false + } + ], + "failure_reasons": [], + "timings_ms": { + "router": 0, + "retrieval_total": 44, + "symbol_resolution": 0 + } +} \ No newline at end of file diff --git a/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_explain_order_service_positive.md b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_explain_order_service_positive.md new file mode 100644 index 0000000..0541568 --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_explain_order_service_positive.md @@ -0,0 +1,32 @@ +# explain_order_service_positive + +## Query +Как работает OrderService? + +## Expected +- intent: CODE_QA, sub_intent: EXPLAIN +- answer_mode: normal + +## Actual +- intent: CODE_QA, sub_intent: EXPLAIN +- answer_mode: normal +- evidence_gate_passed: True +- evidence_count: 15 + +## Result +PASS + +## Router +- path_scope: [] +- layers: ['C1_SYMBOL_CATALOG', 'C0_SOURCE_CHUNKS', 'C4_SEMANTIC_ROLES', 'C2_DEPENDENCY_GRAPH', 'C3_ENTRYPOINTS'] + +## Retrieval +- requested_layers: ['C1_SYMBOL_CATALOG', 'C0_SOURCE_CHUNKS', 'C4_SEMANTIC_ROLES', 'C2_DEPENDENCY_GRAPH', 'C3_ENTRYPOINTS'] +- chunk_count: 15 +- layer_outcomes: [('C0_SOURCE_CHUNKS', 1)] + +## Evidence gate +- failure_reasons: [] + +## Timings (ms) +{'router': 0, 'retrieval_total': 44, 'symbol_resolution': 0} diff --git a/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_find_entrypoints_borderline.json b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_find_entrypoints_borderline.json new file mode 100644 index 0000000..071a756 --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_find_entrypoints_borderline.json @@ -0,0 +1,82 @@ +{ + "case_id": "find_entrypoints_borderline", + "query": "Где main?", + "expected": { + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "answer_mode": "normal" + }, + "actual": { + "intent": "PROJECT_MISC", + "sub_intent": "FIND_ENTRYPOINTS", + "answer_mode": "degraded", + "evidence_gate_passed": false, + "evidence_count": 6 + }, + "passed": false, + "mismatches": [ + "intent: expected CODE_QA, got PROJECT_MISC", + "answer_mode: expected normal, got degraded" + ], + "router_result": { + "intent": "PROJECT_MISC", + "graph_id": "ProjectMiscGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "FIND_ENTRYPOINTS", + "path_scope": [], + "layers": [ + "D1_MODULE_CATALOG", + "D3_SECTION_INDEX", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ], + "symbol_resolution_status": "pending" + }, + "retrieval_request": { + "rag_session_id": "b3c7ec39-40a7-40e5-8ba5-fc0e2e3cc63c", + "query": "Где main?", + "sub_intent": "FIND_ENTRYPOINTS", + "path_scope": [], + "requested_layers": [ + "D1_MODULE_CATALOG", + "D3_SECTION_INDEX", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "D1_MODULE_CATALOG", + "hit_count": 0, + "empty": true, + "fallback_used": true + }, + { + "layer_id": "D3_SECTION_INDEX", + "hit_count": 0, + "empty": true, + "fallback_used": true + }, + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 2, + "empty": false, + "fallback_used": true + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 4, + "empty": false, + "fallback_used": true + } + ], + "failure_reasons": [ + "entrypoints_not_found" + ], + "timings_ms": { + "router": 0, + "retrieval_total": 51, + "symbol_resolution": 0 + } +} \ No newline at end of file diff --git a/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_find_entrypoints_borderline.md b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_find_entrypoints_borderline.md new file mode 100644 index 0000000..a9395b4 --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_find_entrypoints_borderline.md @@ -0,0 +1,36 @@ +# find_entrypoints_borderline + +## Query +Где main? + +## Expected +- intent: CODE_QA, sub_intent: FIND_ENTRYPOINTS +- answer_mode: normal + +## Actual +- intent: PROJECT_MISC, sub_intent: FIND_ENTRYPOINTS +- answer_mode: degraded +- evidence_gate_passed: False +- evidence_count: 6 + +## Result +FAIL + +## Mismatches +- intent: expected CODE_QA, got PROJECT_MISC +- answer_mode: expected normal, got degraded + +## Router +- path_scope: [] +- layers: ['D1_MODULE_CATALOG', 'D3_SECTION_INDEX', 'C1_SYMBOL_CATALOG', 'C0_SOURCE_CHUNKS'] + +## Retrieval +- requested_layers: ['D1_MODULE_CATALOG', 'D3_SECTION_INDEX', 'C1_SYMBOL_CATALOG', 'C0_SOURCE_CHUNKS'] +- chunk_count: 6 +- layer_outcomes: [('D1_MODULE_CATALOG', 0), ('D3_SECTION_INDEX', 0), ('C1_SYMBOL_CATALOG', 2), ('C0_SOURCE_CHUNKS', 4)] + +## Evidence gate +- failure_reasons: ['entrypoints_not_found'] + +## Timings (ms) +{'router': 0, 'retrieval_total': 51, 'symbol_resolution': 0} diff --git a/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_find_entrypoints_english.json b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_find_entrypoints_english.json new file mode 100644 index 0000000..3dfeb36 --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_find_entrypoints_english.json @@ -0,0 +1,61 @@ +{ + "case_id": "find_entrypoints_english", + "query": "Find application entrypoints", + "expected": { + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "answer_mode": "normal" + }, + "actual": { + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "answer_mode": "normal", + "evidence_gate_passed": true, + "evidence_count": 10 + }, + "passed": true, + "mismatches": [], + "router_result": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "FIND_ENTRYPOINTS", + "path_scope": [], + "layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ], + "symbol_resolution_status": "pending" + }, + "retrieval_request": { + "rag_session_id": "b3c7ec39-40a7-40e5-8ba5-fc0e2e3cc63c", + "query": "Find application entrypoints", + "sub_intent": "FIND_ENTRYPOINTS", + "path_scope": [], + "requested_layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "C3_ENTRYPOINTS", + "hit_count": 4, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 6, + "empty": false, + "fallback_used": false + } + ], + "failure_reasons": [], + "timings_ms": { + "router": 0, + "retrieval_total": 19, + "symbol_resolution": 0 + } +} \ No newline at end of file diff --git a/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_find_entrypoints_english.md b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_find_entrypoints_english.md new file mode 100644 index 0000000..ad2595f --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_find_entrypoints_english.md @@ -0,0 +1,32 @@ +# find_entrypoints_english + +## Query +Find application entrypoints + +## Expected +- intent: CODE_QA, sub_intent: FIND_ENTRYPOINTS +- answer_mode: normal + +## Actual +- intent: CODE_QA, sub_intent: FIND_ENTRYPOINTS +- answer_mode: normal +- evidence_gate_passed: True +- evidence_count: 10 + +## Result +PASS + +## Router +- path_scope: [] +- layers: ['C3_ENTRYPOINTS', 'C0_SOURCE_CHUNKS'] + +## Retrieval +- requested_layers: ['C3_ENTRYPOINTS', 'C0_SOURCE_CHUNKS'] +- chunk_count: 10 +- layer_outcomes: [('C3_ENTRYPOINTS', 4), ('C0_SOURCE_CHUNKS', 6)] + +## Evidence gate +- failure_reasons: [] + +## Timings (ms) +{'router': 0, 'retrieval_total': 19, 'symbol_resolution': 0} diff --git a/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_find_entrypoints_positive.json b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_find_entrypoints_positive.json new file mode 100644 index 0000000..56d426e --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_find_entrypoints_positive.json @@ -0,0 +1,82 @@ +{ + "case_id": "find_entrypoints_positive", + "query": "Какие точки входа в приложение?", + "expected": { + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "answer_mode": "normal" + }, + "actual": { + "intent": "PROJECT_MISC", + "sub_intent": "FIND_ENTRYPOINTS", + "answer_mode": "degraded", + "evidence_gate_passed": false, + "evidence_count": 8 + }, + "passed": false, + "mismatches": [ + "intent: expected CODE_QA, got PROJECT_MISC", + "answer_mode: expected normal, got degraded" + ], + "router_result": { + "intent": "PROJECT_MISC", + "graph_id": "ProjectMiscGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "FIND_ENTRYPOINTS", + "path_scope": [], + "layers": [ + "D1_MODULE_CATALOG", + "D3_SECTION_INDEX", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ], + "symbol_resolution_status": "not_requested" + }, + "retrieval_request": { + "rag_session_id": "b3c7ec39-40a7-40e5-8ba5-fc0e2e3cc63c", + "query": "Какие точки входа в приложение?", + "sub_intent": "FIND_ENTRYPOINTS", + "path_scope": [], + "requested_layers": [ + "D1_MODULE_CATALOG", + "D3_SECTION_INDEX", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "D1_MODULE_CATALOG", + "hit_count": 0, + "empty": true, + "fallback_used": true + }, + { + "layer_id": "D3_SECTION_INDEX", + "hit_count": 0, + "empty": true, + "fallback_used": true + }, + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 4, + "empty": false, + "fallback_used": true + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 4, + "empty": false, + "fallback_used": true + } + ], + "failure_reasons": [ + "entrypoints_not_found" + ], + "timings_ms": { + "router": 0, + "retrieval_total": 52, + "symbol_resolution": 0 + } +} \ No newline at end of file diff --git a/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_find_entrypoints_positive.md b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_find_entrypoints_positive.md new file mode 100644 index 0000000..3fac954 --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_find_entrypoints_positive.md @@ -0,0 +1,36 @@ +# find_entrypoints_positive + +## Query +Какие точки входа в приложение? + +## Expected +- intent: CODE_QA, sub_intent: FIND_ENTRYPOINTS +- answer_mode: normal + +## Actual +- intent: PROJECT_MISC, sub_intent: FIND_ENTRYPOINTS +- answer_mode: degraded +- evidence_gate_passed: False +- evidence_count: 8 + +## Result +FAIL + +## Mismatches +- intent: expected CODE_QA, got PROJECT_MISC +- answer_mode: expected normal, got degraded + +## Router +- path_scope: [] +- layers: ['D1_MODULE_CATALOG', 'D3_SECTION_INDEX', 'C1_SYMBOL_CATALOG', 'C0_SOURCE_CHUNKS'] + +## Retrieval +- requested_layers: ['D1_MODULE_CATALOG', 'D3_SECTION_INDEX', 'C1_SYMBOL_CATALOG', 'C0_SOURCE_CHUNKS'] +- chunk_count: 8 +- layer_outcomes: [('D1_MODULE_CATALOG', 0), ('D3_SECTION_INDEX', 0), ('C1_SYMBOL_CATALOG', 4), ('C0_SOURCE_CHUNKS', 4)] + +## Evidence gate +- failure_reasons: ['entrypoints_not_found'] + +## Timings (ms) +{'router': 0, 'retrieval_total': 52, 'symbol_resolution': 0} diff --git a/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_find_tests_borderline.json b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_find_tests_borderline.json new file mode 100644 index 0000000..1a34bcd --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_find_tests_borderline.json @@ -0,0 +1,69 @@ +{ + "case_id": "find_tests_borderline", + "query": "Есть ли тесты на репозиторий?", + "expected": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "answer_mode": "normal" + }, + "actual": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "answer_mode": "normal", + "evidence_gate_passed": true, + "evidence_count": 16 + }, + "passed": true, + "mismatches": [], + "router_result": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "FIND_TESTS", + "path_scope": [], + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "symbol_resolution_status": "not_requested" + }, + "retrieval_request": { + "rag_session_id": "b3c7ec39-40a7-40e5-8ba5-fc0e2e3cc63c", + "query": "Есть ли тесты на репозиторий?", + "sub_intent": "FIND_TESTS", + "path_scope": [], + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 6, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 2, + "empty": false, + "fallback_used": false + } + ], + "failure_reasons": [], + "timings_ms": { + "router": 0, + "retrieval_total": 24, + "symbol_resolution": 0 + } +} \ No newline at end of file diff --git a/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_find_tests_borderline.md b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_find_tests_borderline.md new file mode 100644 index 0000000..efc2cb9 --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_find_tests_borderline.md @@ -0,0 +1,32 @@ +# find_tests_borderline + +## Query +Есть ли тесты на репозиторий? + +## Expected +- intent: CODE_QA, sub_intent: FIND_TESTS +- answer_mode: normal + +## Actual +- intent: CODE_QA, sub_intent: FIND_TESTS +- answer_mode: normal +- evidence_gate_passed: True +- evidence_count: 16 + +## Result +PASS + +## Router +- path_scope: [] +- layers: ['C1_SYMBOL_CATALOG', 'C2_DEPENDENCY_GRAPH', 'C0_SOURCE_CHUNKS'] + +## Retrieval +- requested_layers: ['C1_SYMBOL_CATALOG', 'C2_DEPENDENCY_GRAPH', 'C0_SOURCE_CHUNKS'] +- chunk_count: 16 +- layer_outcomes: [('C1_SYMBOL_CATALOG', 8), ('C2_DEPENDENCY_GRAPH', 6), ('C0_SOURCE_CHUNKS', 2)] + +## Evidence gate +- failure_reasons: [] + +## Timings (ms) +{'router': 0, 'retrieval_total': 24, 'symbol_resolution': 0} diff --git a/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_find_tests_negative.json b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_find_tests_negative.json new file mode 100644 index 0000000..02e852d --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_find_tests_negative.json @@ -0,0 +1,71 @@ +{ + "case_id": "find_tests_negative", + "query": "Где тесты для NonExistent?", + "expected": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "answer_mode": "degraded" + }, + "actual": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "answer_mode": "normal", + "evidence_gate_passed": true, + "evidence_count": 8 + }, + "passed": false, + "mismatches": [ + "answer_mode: expected degraded, got normal" + ], + "router_result": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "FIND_TESTS", + "path_scope": [], + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "symbol_resolution_status": "pending" + }, + "retrieval_request": { + "rag_session_id": "b3c7ec39-40a7-40e5-8ba5-fc0e2e3cc63c", + "query": "Где тесты для NonExistent?", + "sub_intent": "FIND_TESTS", + "path_scope": [], + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 0, + "empty": true, + "fallback_used": true + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 6, + "empty": false, + "fallback_used": true + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 2, + "empty": false, + "fallback_used": true + } + ], + "failure_reasons": [], + "timings_ms": { + "router": 0, + "retrieval_total": 32, + "symbol_resolution": 0 + } +} \ No newline at end of file diff --git a/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_find_tests_negative.md b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_find_tests_negative.md new file mode 100644 index 0000000..48525c4 --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_find_tests_negative.md @@ -0,0 +1,35 @@ +# find_tests_negative + +## Query +Где тесты для NonExistent? + +## Expected +- intent: CODE_QA, sub_intent: FIND_TESTS +- answer_mode: degraded + +## Actual +- intent: CODE_QA, sub_intent: FIND_TESTS +- answer_mode: normal +- evidence_gate_passed: True +- evidence_count: 8 + +## Result +FAIL + +## Mismatches +- answer_mode: expected degraded, got normal + +## Router +- path_scope: [] +- layers: ['C1_SYMBOL_CATALOG', 'C2_DEPENDENCY_GRAPH', 'C0_SOURCE_CHUNKS'] + +## Retrieval +- requested_layers: ['C1_SYMBOL_CATALOG', 'C2_DEPENDENCY_GRAPH', 'C0_SOURCE_CHUNKS'] +- chunk_count: 8 +- layer_outcomes: [('C1_SYMBOL_CATALOG', 0), ('C2_DEPENDENCY_GRAPH', 6), ('C0_SOURCE_CHUNKS', 2)] + +## Evidence gate +- failure_reasons: [] + +## Timings (ms) +{'router': 0, 'retrieval_total': 32, 'symbol_resolution': 0} diff --git a/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_find_tests_order_positive.json b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_find_tests_order_positive.json new file mode 100644 index 0000000..8843f56 --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_find_tests_order_positive.json @@ -0,0 +1,69 @@ +{ + "case_id": "find_tests_order_positive", + "query": "Найди тесты для Order", + "expected": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "answer_mode": "normal" + }, + "actual": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "answer_mode": "normal", + "evidence_gate_passed": true, + "evidence_count": 8 + }, + "passed": true, + "mismatches": [], + "router_result": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "FIND_TESTS", + "path_scope": [], + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "symbol_resolution_status": "pending" + }, + "retrieval_request": { + "rag_session_id": "b3c7ec39-40a7-40e5-8ba5-fc0e2e3cc63c", + "query": "Найди тесты для Order", + "sub_intent": "FIND_TESTS", + "path_scope": [], + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 0, + "empty": true, + "fallback_used": true + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 6, + "empty": false, + "fallback_used": true + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 2, + "empty": false, + "fallback_used": true + } + ], + "failure_reasons": [], + "timings_ms": { + "router": 0, + "retrieval_total": 32, + "symbol_resolution": 0 + } +} \ No newline at end of file diff --git a/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_find_tests_order_positive.md b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_find_tests_order_positive.md new file mode 100644 index 0000000..f587400 --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_find_tests_order_positive.md @@ -0,0 +1,32 @@ +# find_tests_order_positive + +## Query +Найди тесты для Order + +## Expected +- intent: CODE_QA, sub_intent: FIND_TESTS +- answer_mode: normal + +## Actual +- intent: CODE_QA, sub_intent: FIND_TESTS +- answer_mode: normal +- evidence_gate_passed: True +- evidence_count: 8 + +## Result +PASS + +## Router +- path_scope: [] +- layers: ['C1_SYMBOL_CATALOG', 'C2_DEPENDENCY_GRAPH', 'C0_SOURCE_CHUNKS'] + +## Retrieval +- requested_layers: ['C1_SYMBOL_CATALOG', 'C2_DEPENDENCY_GRAPH', 'C0_SOURCE_CHUNKS'] +- chunk_count: 8 +- layer_outcomes: [('C1_SYMBOL_CATALOG', 0), ('C2_DEPENDENCY_GRAPH', 6), ('C0_SOURCE_CHUNKS', 2)] + +## Evidence gate +- failure_reasons: [] + +## Timings (ms) +{'router': 0, 'retrieval_total': 32, 'symbol_resolution': 0} diff --git a/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_find_tests_positive.json b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_find_tests_positive.json new file mode 100644 index 0000000..19796e4 --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_find_tests_positive.json @@ -0,0 +1,69 @@ +{ + "case_id": "find_tests_positive", + "query": "Где тесты для OrderService?", + "expected": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "answer_mode": "normal" + }, + "actual": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "answer_mode": "normal", + "evidence_gate_passed": true, + "evidence_count": 8 + }, + "passed": true, + "mismatches": [], + "router_result": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "FIND_TESTS", + "path_scope": [], + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "symbol_resolution_status": "pending" + }, + "retrieval_request": { + "rag_session_id": "b3c7ec39-40a7-40e5-8ba5-fc0e2e3cc63c", + "query": "Где тесты для OrderService?", + "sub_intent": "FIND_TESTS", + "path_scope": [], + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 0, + "empty": true, + "fallback_used": true + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 6, + "empty": false, + "fallback_used": true + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 2, + "empty": false, + "fallback_used": true + } + ], + "failure_reasons": [], + "timings_ms": { + "router": 0, + "retrieval_total": 34, + "symbol_resolution": 0 + } +} \ No newline at end of file diff --git a/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_find_tests_positive.md b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_find_tests_positive.md new file mode 100644 index 0000000..c4f89dc --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_find_tests_positive.md @@ -0,0 +1,32 @@ +# find_tests_positive + +## Query +Где тесты для OrderService? + +## Expected +- intent: CODE_QA, sub_intent: FIND_TESTS +- answer_mode: normal + +## Actual +- intent: CODE_QA, sub_intent: FIND_TESTS +- answer_mode: normal +- evidence_gate_passed: True +- evidence_count: 8 + +## Result +PASS + +## Router +- path_scope: [] +- layers: ['C1_SYMBOL_CATALOG', 'C2_DEPENDENCY_GRAPH', 'C0_SOURCE_CHUNKS'] + +## Retrieval +- requested_layers: ['C1_SYMBOL_CATALOG', 'C2_DEPENDENCY_GRAPH', 'C0_SOURCE_CHUNKS'] +- chunk_count: 8 +- layer_outcomes: [('C1_SYMBOL_CATALOG', 0), ('C2_DEPENDENCY_GRAPH', 6), ('C0_SOURCE_CHUNKS', 2)] + +## Evidence gate +- failure_reasons: [] + +## Timings (ms) +{'router': 0, 'retrieval_total': 34, 'symbol_resolution': 0} diff --git a/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_general_qa_borderline.json b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_general_qa_borderline.json new file mode 100644 index 0000000..d445af6 --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_general_qa_borderline.json @@ -0,0 +1,87 @@ +{ + "case_id": "general_qa_borderline", + "query": "Расскажи про код", + "expected": { + "intent": "CODE_QA", + "sub_intent": "GENERAL_QA", + "answer_mode": "normal" + }, + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "answer_mode": "normal", + "evidence_gate_passed": true, + "evidence_count": 29 + }, + "passed": false, + "mismatches": [ + "sub_intent: expected GENERAL_QA, got EXPLAIN" + ], + "router_result": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "EXPLAIN", + "path_scope": [], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_resolution_status": "not_requested" + }, + "retrieval_request": { + "rag_session_id": "b3c7ec39-40a7-40e5-8ba5-fc0e2e3cc63c", + "query": "Расскажи про код", + "sub_intent": "EXPLAIN", + "path_scope": [], + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C4_SEMANTIC_ROLES", + "hit_count": 3, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 6, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C3_ENTRYPOINTS", + "hit_count": 4, + "empty": false, + "fallback_used": false + } + ], + "failure_reasons": [], + "timings_ms": { + "router": 0, + "retrieval_total": 39, + "symbol_resolution": 0 + } +} \ No newline at end of file diff --git a/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_general_qa_borderline.md b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_general_qa_borderline.md new file mode 100644 index 0000000..4b24bde --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_general_qa_borderline.md @@ -0,0 +1,35 @@ +# general_qa_borderline + +## Query +Расскажи про код + +## Expected +- intent: CODE_QA, sub_intent: GENERAL_QA +- answer_mode: normal + +## Actual +- intent: CODE_QA, sub_intent: EXPLAIN +- answer_mode: normal +- evidence_gate_passed: True +- evidence_count: 29 + +## Result +FAIL + +## Mismatches +- sub_intent: expected GENERAL_QA, got EXPLAIN + +## Router +- path_scope: [] +- layers: ['C1_SYMBOL_CATALOG', 'C0_SOURCE_CHUNKS', 'C4_SEMANTIC_ROLES', 'C2_DEPENDENCY_GRAPH', 'C3_ENTRYPOINTS'] + +## Retrieval +- requested_layers: ['C1_SYMBOL_CATALOG', 'C0_SOURCE_CHUNKS', 'C4_SEMANTIC_ROLES', 'C2_DEPENDENCY_GRAPH', 'C3_ENTRYPOINTS'] +- chunk_count: 29 +- layer_outcomes: [('C1_SYMBOL_CATALOG', 8), ('C0_SOURCE_CHUNKS', 8), ('C4_SEMANTIC_ROLES', 3), ('C2_DEPENDENCY_GRAPH', 6), ('C3_ENTRYPOINTS', 4)] + +## Evidence gate +- failure_reasons: [] + +## Timings (ms) +{'router': 0, 'retrieval_total': 39, 'symbol_resolution': 0} diff --git a/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_general_qa_how.json b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_general_qa_how.json new file mode 100644 index 0000000..0d73bb8 --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_general_qa_how.json @@ -0,0 +1,87 @@ +{ + "case_id": "general_qa_how", + "query": "How does order creation work?", + "expected": { + "intent": "CODE_QA", + "sub_intent": "GENERAL_QA", + "answer_mode": "normal" + }, + "actual": { + "intent": "CODE_QA", + "sub_intent": "ARCHITECTURE", + "answer_mode": "normal", + "evidence_gate_passed": true, + "evidence_count": 20 + }, + "passed": false, + "mismatches": [ + "sub_intent: expected GENERAL_QA, got ARCHITECTURE" + ], + "router_result": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "ARCHITECTURE", + "path_scope": [], + "layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ], + "symbol_resolution_status": "pending" + }, + "retrieval_request": { + "rag_session_id": "b3c7ec39-40a7-40e5-8ba5-fc0e2e3cc63c", + "query": "How does order creation work?", + "sub_intent": "ARCHITECTURE", + "path_scope": [], + "requested_layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "C4_SEMANTIC_ROLES", + "hit_count": 3, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C3_ENTRYPOINTS", + "hit_count": 4, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 1, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 4, + "empty": false, + "fallback_used": false + } + ], + "failure_reasons": [], + "timings_ms": { + "router": 0, + "retrieval_total": 42, + "symbol_resolution": 0 + } +} \ No newline at end of file diff --git a/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_general_qa_how.md b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_general_qa_how.md new file mode 100644 index 0000000..403254c --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_general_qa_how.md @@ -0,0 +1,35 @@ +# general_qa_how + +## Query +How does order creation work? + +## Expected +- intent: CODE_QA, sub_intent: GENERAL_QA +- answer_mode: normal + +## Actual +- intent: CODE_QA, sub_intent: ARCHITECTURE +- answer_mode: normal +- evidence_gate_passed: True +- evidence_count: 20 + +## Result +FAIL + +## Mismatches +- sub_intent: expected GENERAL_QA, got ARCHITECTURE + +## Router +- path_scope: [] +- layers: ['C4_SEMANTIC_ROLES', 'C3_ENTRYPOINTS', 'C2_DEPENDENCY_GRAPH', 'C1_SYMBOL_CATALOG', 'C0_SOURCE_CHUNKS'] + +## Retrieval +- requested_layers: ['C4_SEMANTIC_ROLES', 'C3_ENTRYPOINTS', 'C2_DEPENDENCY_GRAPH', 'C1_SYMBOL_CATALOG', 'C0_SOURCE_CHUNKS'] +- chunk_count: 20 +- layer_outcomes: [('C4_SEMANTIC_ROLES', 3), ('C3_ENTRYPOINTS', 4), ('C2_DEPENDENCY_GRAPH', 8), ('C1_SYMBOL_CATALOG', 1), ('C0_SOURCE_CHUNKS', 4)] + +## Evidence gate +- failure_reasons: [] + +## Timings (ms) +{'router': 0, 'retrieval_total': 42, 'symbol_resolution': 0} diff --git a/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_general_qa_positive.json b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_general_qa_positive.json new file mode 100644 index 0000000..65c5d1c --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_general_qa_positive.json @@ -0,0 +1,80 @@ +{ + "case_id": "general_qa_positive", + "query": "Что делает этот проект?", + "expected": { + "intent": "CODE_QA", + "sub_intent": "GENERAL_QA", + "answer_mode": "normal" + }, + "actual": { + "intent": "PROJECT_MISC", + "sub_intent": "EXPLAIN", + "answer_mode": "normal", + "evidence_gate_passed": true, + "evidence_count": 8 + }, + "passed": false, + "mismatches": [ + "intent: expected CODE_QA, got PROJECT_MISC", + "sub_intent: expected GENERAL_QA, got EXPLAIN" + ], + "router_result": { + "intent": "PROJECT_MISC", + "graph_id": "ProjectMiscGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "EXPLAIN", + "path_scope": [], + "layers": [ + "D1_MODULE_CATALOG", + "D3_SECTION_INDEX", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ], + "symbol_resolution_status": "not_requested" + }, + "retrieval_request": { + "rag_session_id": "b3c7ec39-40a7-40e5-8ba5-fc0e2e3cc63c", + "query": "Что делает этот проект?", + "sub_intent": "EXPLAIN", + "path_scope": [], + "requested_layers": [ + "D1_MODULE_CATALOG", + "D3_SECTION_INDEX", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "D1_MODULE_CATALOG", + "hit_count": 0, + "empty": true, + "fallback_used": true + }, + { + "layer_id": "D3_SECTION_INDEX", + "hit_count": 0, + "empty": true, + "fallback_used": true + }, + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 4, + "empty": false, + "fallback_used": true + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 4, + "empty": false, + "fallback_used": true + } + ], + "failure_reasons": [], + "timings_ms": { + "router": 0, + "retrieval_total": 56, + "symbol_resolution": 0 + } +} \ No newline at end of file diff --git a/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_general_qa_positive.md b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_general_qa_positive.md new file mode 100644 index 0000000..5f61adf --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_general_qa_positive.md @@ -0,0 +1,36 @@ +# general_qa_positive + +## Query +Что делает этот проект? + +## Expected +- intent: CODE_QA, sub_intent: GENERAL_QA +- answer_mode: normal + +## Actual +- intent: PROJECT_MISC, sub_intent: EXPLAIN +- answer_mode: normal +- evidence_gate_passed: True +- evidence_count: 8 + +## Result +FAIL + +## Mismatches +- intent: expected CODE_QA, got PROJECT_MISC +- sub_intent: expected GENERAL_QA, got EXPLAIN + +## Router +- path_scope: [] +- layers: ['D1_MODULE_CATALOG', 'D3_SECTION_INDEX', 'C1_SYMBOL_CATALOG', 'C0_SOURCE_CHUNKS'] + +## Retrieval +- requested_layers: ['D1_MODULE_CATALOG', 'D3_SECTION_INDEX', 'C1_SYMBOL_CATALOG', 'C0_SOURCE_CHUNKS'] +- chunk_count: 8 +- layer_outcomes: [('D1_MODULE_CATALOG', 0), ('D3_SECTION_INDEX', 0), ('C1_SYMBOL_CATALOG', 4), ('C0_SOURCE_CHUNKS', 4)] + +## Evidence gate +- failure_reasons: [] + +## Timings (ms) +{'router': 0, 'retrieval_total': 56, 'symbol_resolution': 0} diff --git a/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_open_file_api_positive.json b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_open_file_api_positive.json new file mode 100644 index 0000000..5cd9623 --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_open_file_api_positive.json @@ -0,0 +1,57 @@ +{ + "case_id": "open_file_api_positive", + "query": "Покажи src/order_app/api/orders.py", + "expected": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "answer_mode": "normal" + }, + "actual": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "answer_mode": "normal", + "evidence_gate_passed": true, + "evidence_count": 1 + }, + "passed": true, + "mismatches": [], + "router_result": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "OPEN_FILE", + "path_scope": [ + "src/order_app/api/orders.py" + ], + "layers": [ + "C0_SOURCE_CHUNKS" + ], + "symbol_resolution_status": "not_requested" + }, + "retrieval_request": { + "rag_session_id": "b3c7ec39-40a7-40e5-8ba5-fc0e2e3cc63c", + "query": "Покажи src/order_app/api/orders.py", + "sub_intent": "OPEN_FILE", + "path_scope": [ + "src/order_app/api/orders.py" + ], + "requested_layers": [ + "C0_SOURCE_CHUNKS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 1, + "empty": false, + "fallback_used": false + } + ], + "failure_reasons": [], + "timings_ms": { + "router": 0, + "retrieval_total": 6, + "symbol_resolution": 0 + } +} \ No newline at end of file diff --git a/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_open_file_api_positive.md b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_open_file_api_positive.md new file mode 100644 index 0000000..05e4195 --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_open_file_api_positive.md @@ -0,0 +1,32 @@ +# open_file_api_positive + +## Query +Покажи src/order_app/api/orders.py + +## Expected +- intent: CODE_QA, sub_intent: OPEN_FILE +- answer_mode: normal + +## Actual +- intent: CODE_QA, sub_intent: OPEN_FILE +- answer_mode: normal +- evidence_gate_passed: True +- evidence_count: 1 + +## Result +PASS + +## Router +- path_scope: ['src/order_app/api/orders.py'] +- layers: ['C0_SOURCE_CHUNKS'] + +## Retrieval +- requested_layers: ['C0_SOURCE_CHUNKS'] +- chunk_count: 1 +- layer_outcomes: [('C0_SOURCE_CHUNKS', 1)] + +## Evidence gate +- failure_reasons: [] + +## Timings (ms) +{'router': 0, 'retrieval_total': 6, 'symbol_resolution': 0} diff --git a/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_open_file_borderline.json b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_open_file_borderline.json new file mode 100644 index 0000000..da45f21 --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_open_file_borderline.json @@ -0,0 +1,63 @@ +{ + "case_id": "open_file_borderline", + "query": "Open main", + "expected": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "answer_mode": "normal" + }, + "actual": { + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "answer_mode": "normal", + "evidence_gate_passed": true, + "evidence_count": 10 + }, + "passed": false, + "mismatches": [ + "sub_intent: expected OPEN_FILE, got FIND_ENTRYPOINTS" + ], + "router_result": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "FIND_ENTRYPOINTS", + "path_scope": [], + "layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ], + "symbol_resolution_status": "pending" + }, + "retrieval_request": { + "rag_session_id": "b3c7ec39-40a7-40e5-8ba5-fc0e2e3cc63c", + "query": "Open main", + "sub_intent": "FIND_ENTRYPOINTS", + "path_scope": [], + "requested_layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "C3_ENTRYPOINTS", + "hit_count": 4, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 6, + "empty": false, + "fallback_used": false + } + ], + "failure_reasons": [], + "timings_ms": { + "router": 0, + "retrieval_total": 24, + "symbol_resolution": 0 + } +} \ No newline at end of file diff --git a/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_open_file_borderline.md b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_open_file_borderline.md new file mode 100644 index 0000000..3a786f8 --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_open_file_borderline.md @@ -0,0 +1,35 @@ +# open_file_borderline + +## Query +Open main + +## Expected +- intent: CODE_QA, sub_intent: OPEN_FILE +- answer_mode: normal + +## Actual +- intent: CODE_QA, sub_intent: FIND_ENTRYPOINTS +- answer_mode: normal +- evidence_gate_passed: True +- evidence_count: 10 + +## Result +FAIL + +## Mismatches +- sub_intent: expected OPEN_FILE, got FIND_ENTRYPOINTS + +## Router +- path_scope: [] +- layers: ['C3_ENTRYPOINTS', 'C0_SOURCE_CHUNKS'] + +## Retrieval +- requested_layers: ['C3_ENTRYPOINTS', 'C0_SOURCE_CHUNKS'] +- chunk_count: 10 +- layer_outcomes: [('C3_ENTRYPOINTS', 4), ('C0_SOURCE_CHUNKS', 6)] + +## Evidence gate +- failure_reasons: [] + +## Timings (ms) +{'router': 0, 'retrieval_total': 24, 'symbol_resolution': 0} diff --git a/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_open_file_main_positive.json b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_open_file_main_positive.json new file mode 100644 index 0000000..439cbf5 --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_open_file_main_positive.json @@ -0,0 +1,57 @@ +{ + "case_id": "open_file_main_positive", + "query": "Открой файл main.py", + "expected": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "answer_mode": "normal" + }, + "actual": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "answer_mode": "normal", + "evidence_gate_passed": true, + "evidence_count": 1 + }, + "passed": true, + "mismatches": [], + "router_result": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "OPEN_FILE", + "path_scope": [ + "main.py" + ], + "layers": [ + "C0_SOURCE_CHUNKS" + ], + "symbol_resolution_status": "not_requested" + }, + "retrieval_request": { + "rag_session_id": "b3c7ec39-40a7-40e5-8ba5-fc0e2e3cc63c", + "query": "Открой файл main.py", + "sub_intent": "OPEN_FILE", + "path_scope": [ + "main.py" + ], + "requested_layers": [ + "C0_SOURCE_CHUNKS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 1, + "empty": false, + "fallback_used": false + } + ], + "failure_reasons": [], + "timings_ms": { + "router": 0, + "retrieval_total": 6, + "symbol_resolution": 0 + } +} \ No newline at end of file diff --git a/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_open_file_main_positive.md b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_open_file_main_positive.md new file mode 100644 index 0000000..2ab4fc7 --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_open_file_main_positive.md @@ -0,0 +1,32 @@ +# open_file_main_positive + +## Query +Открой файл main.py + +## Expected +- intent: CODE_QA, sub_intent: OPEN_FILE +- answer_mode: normal + +## Actual +- intent: CODE_QA, sub_intent: OPEN_FILE +- answer_mode: normal +- evidence_gate_passed: True +- evidence_count: 1 + +## Result +PASS + +## Router +- path_scope: ['main.py'] +- layers: ['C0_SOURCE_CHUNKS'] + +## Retrieval +- requested_layers: ['C0_SOURCE_CHUNKS'] +- chunk_count: 1 +- layer_outcomes: [('C0_SOURCE_CHUNKS', 1)] + +## Evidence gate +- failure_reasons: [] + +## Timings (ms) +{'router': 0, 'retrieval_total': 6, 'symbol_resolution': 0} diff --git a/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_open_file_negative.json b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_open_file_negative.json new file mode 100644 index 0000000..45b38a1 --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_open_file_negative.json @@ -0,0 +1,62 @@ +{ + "case_id": "open_file_negative", + "query": "Открой файл nonexistent/foo.py", + "expected": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "answer_mode": "degraded" + }, + "actual": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "answer_mode": "insufficient", + "evidence_gate_passed": false, + "evidence_count": 0 + }, + "passed": false, + "mismatches": [ + "answer_mode: expected degraded, got insufficient" + ], + "router_result": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "OPEN_FILE", + "path_scope": [ + "nonexistent/foo.py" + ], + "layers": [ + "C0_SOURCE_CHUNKS" + ], + "symbol_resolution_status": "not_requested" + }, + "retrieval_request": { + "rag_session_id": "b3c7ec39-40a7-40e5-8ba5-fc0e2e3cc63c", + "query": "Открой файл nonexistent/foo.py", + "sub_intent": "OPEN_FILE", + "path_scope": [ + "nonexistent/foo.py" + ], + "requested_layers": [ + "C0_SOURCE_CHUNKS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 0, + "empty": true, + "fallback_used": false + } + ], + "failure_reasons": [ + "path_scope_empty", + "layer_c0_empty" + ], + "timings_ms": { + "router": 0, + "retrieval_total": 6, + "symbol_resolution": 0 + } +} \ No newline at end of file diff --git a/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_open_file_negative.md b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_open_file_negative.md new file mode 100644 index 0000000..606f266 --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_232925/20260311_232925_open_file_negative.md @@ -0,0 +1,35 @@ +# open_file_negative + +## Query +Открой файл nonexistent/foo.py + +## Expected +- intent: CODE_QA, sub_intent: OPEN_FILE +- answer_mode: degraded + +## Actual +- intent: CODE_QA, sub_intent: OPEN_FILE +- answer_mode: insufficient +- evidence_gate_passed: False +- evidence_count: 0 + +## Result +FAIL + +## Mismatches +- answer_mode: expected degraded, got insufficient + +## Router +- path_scope: ['nonexistent/foo.py'] +- layers: ['C0_SOURCE_CHUNKS'] + +## Retrieval +- requested_layers: ['C0_SOURCE_CHUNKS'] +- chunk_count: 0 +- layer_outcomes: [('C0_SOURCE_CHUNKS', 0)] + +## Evidence gate +- failure_reasons: ['path_scope_empty', 'layer_c0_empty'] + +## Timings (ms) +{'router': 0, 'retrieval_total': 6, 'symbol_resolution': 0} diff --git a/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_explain_borderline.json b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_explain_borderline.json new file mode 100644 index 0000000..737947a --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_explain_borderline.json @@ -0,0 +1,79 @@ +{ + "case_id": "explain_borderline", + "query": "Что делает create_order?", + "expected": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "answer_mode": "normal" + }, + "actual": { + "intent": "PROJECT_MISC", + "sub_intent": "EXPLAIN", + "answer_mode": "normal", + "evidence_gate_passed": true, + "evidence_count": 5 + }, + "passed": false, + "mismatches": [ + "intent: expected CODE_QA, got PROJECT_MISC" + ], + "router_result": { + "intent": "PROJECT_MISC", + "graph_id": "ProjectMiscGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "EXPLAIN", + "path_scope": [], + "layers": [ + "D1_MODULE_CATALOG", + "D3_SECTION_INDEX", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ], + "symbol_resolution_status": "pending" + }, + "retrieval_request": { + "rag_session_id": "564f37c4-259f-4d21-be24-04b3a51e3c64", + "query": "Что делает create_order?", + "sub_intent": "EXPLAIN", + "path_scope": [], + "requested_layers": [ + "D1_MODULE_CATALOG", + "D3_SECTION_INDEX", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "D1_MODULE_CATALOG", + "hit_count": 0, + "empty": true, + "fallback_used": false + }, + { + "layer_id": "D3_SECTION_INDEX", + "hit_count": 0, + "empty": true, + "fallback_used": false + }, + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 1, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 4, + "empty": false, + "fallback_used": false + } + ], + "failure_reasons": [], + "timings_ms": { + "router": 0, + "retrieval_total": 31, + "symbol_resolution": 0 + } +} \ No newline at end of file diff --git a/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_explain_borderline.md b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_explain_borderline.md new file mode 100644 index 0000000..c244db7 --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_explain_borderline.md @@ -0,0 +1,35 @@ +# explain_borderline + +## Query +Что делает create_order? + +## Expected +- intent: CODE_QA, sub_intent: EXPLAIN +- answer_mode: normal + +## Actual +- intent: PROJECT_MISC, sub_intent: EXPLAIN +- answer_mode: normal +- evidence_gate_passed: True +- evidence_count: 5 + +## Result +FAIL + +## Mismatches +- intent: expected CODE_QA, got PROJECT_MISC + +## Router +- path_scope: [] +- layers: ['D1_MODULE_CATALOG', 'D3_SECTION_INDEX', 'C1_SYMBOL_CATALOG', 'C0_SOURCE_CHUNKS'] + +## Retrieval +- requested_layers: ['D1_MODULE_CATALOG', 'D3_SECTION_INDEX', 'C1_SYMBOL_CATALOG', 'C0_SOURCE_CHUNKS'] +- chunk_count: 5 +- layer_outcomes: [('D1_MODULE_CATALOG', 0), ('D3_SECTION_INDEX', 0), ('C1_SYMBOL_CATALOG', 1), ('C0_SOURCE_CHUNKS', 4)] + +## Evidence gate +- failure_reasons: [] + +## Timings (ms) +{'router': 0, 'retrieval_total': 31, 'symbol_resolution': 0} diff --git a/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_explain_negative.json b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_explain_negative.json new file mode 100644 index 0000000..aa10739 --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_explain_negative.json @@ -0,0 +1,87 @@ +{ + "case_id": "explain_negative", + "query": "Объясни класс NonExistentClass", + "expected": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "answer_mode": "degraded" + }, + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "answer_mode": "normal", + "evidence_gate_passed": true, + "evidence_count": 22 + }, + "passed": false, + "mismatches": [ + "answer_mode: expected degraded, got normal" + ], + "router_result": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "EXPLAIN", + "path_scope": [], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_resolution_status": "pending" + }, + "retrieval_request": { + "rag_session_id": "564f37c4-259f-4d21-be24-04b3a51e3c64", + "query": "Объясни класс NonExistentClass", + "sub_intent": "EXPLAIN", + "path_scope": [], + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 1, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C4_SEMANTIC_ROLES", + "hit_count": 3, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 6, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C3_ENTRYPOINTS", + "hit_count": 4, + "empty": false, + "fallback_used": false + } + ], + "failure_reasons": [], + "timings_ms": { + "router": 0, + "retrieval_total": 41, + "symbol_resolution": 0 + } +} \ No newline at end of file diff --git a/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_explain_negative.md b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_explain_negative.md new file mode 100644 index 0000000..bc6b462 --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_explain_negative.md @@ -0,0 +1,35 @@ +# explain_negative + +## Query +Объясни класс NonExistentClass + +## Expected +- intent: CODE_QA, sub_intent: EXPLAIN +- answer_mode: degraded + +## Actual +- intent: CODE_QA, sub_intent: EXPLAIN +- answer_mode: normal +- evidence_gate_passed: True +- evidence_count: 22 + +## Result +FAIL + +## Mismatches +- answer_mode: expected degraded, got normal + +## Router +- path_scope: [] +- layers: ['C1_SYMBOL_CATALOG', 'C0_SOURCE_CHUNKS', 'C4_SEMANTIC_ROLES', 'C2_DEPENDENCY_GRAPH', 'C3_ENTRYPOINTS'] + +## Retrieval +- requested_layers: ['C1_SYMBOL_CATALOG', 'C0_SOURCE_CHUNKS', 'C4_SEMANTIC_ROLES', 'C2_DEPENDENCY_GRAPH', 'C3_ENTRYPOINTS'] +- chunk_count: 22 +- layer_outcomes: [('C1_SYMBOL_CATALOG', 1), ('C0_SOURCE_CHUNKS', 8), ('C4_SEMANTIC_ROLES', 3), ('C2_DEPENDENCY_GRAPH', 6), ('C3_ENTRYPOINTS', 4)] + +## Evidence gate +- failure_reasons: [] + +## Timings (ms) +{'router': 0, 'retrieval_total': 41, 'symbol_resolution': 0} diff --git a/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_explain_order_positive.json b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_explain_order_positive.json new file mode 100644 index 0000000..c440665 --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_explain_order_positive.json @@ -0,0 +1,61 @@ +{ + "case_id": "explain_order_positive", + "query": "Объясни класс Order", + "expected": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "answer_mode": "normal" + }, + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "answer_mode": "normal", + "evidence_gate_passed": true, + "evidence_count": 15 + }, + "passed": true, + "mismatches": [], + "router_result": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "EXPLAIN", + "path_scope": [], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_resolution_status": "pending" + }, + "retrieval_request": { + "rag_session_id": "564f37c4-259f-4d21-be24-04b3a51e3c64", + "query": "Объясни класс Order", + "sub_intent": "EXPLAIN", + "path_scope": [], + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 1, + "empty": false, + "fallback_used": false + } + ], + "failure_reasons": [], + "timings_ms": { + "router": 0, + "retrieval_total": 45, + "symbol_resolution": 0 + } +} \ No newline at end of file diff --git a/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_explain_order_positive.md b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_explain_order_positive.md new file mode 100644 index 0000000..cbef5f8 --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_explain_order_positive.md @@ -0,0 +1,32 @@ +# explain_order_positive + +## Query +Объясни класс Order + +## Expected +- intent: CODE_QA, sub_intent: EXPLAIN +- answer_mode: normal + +## Actual +- intent: CODE_QA, sub_intent: EXPLAIN +- answer_mode: normal +- evidence_gate_passed: True +- evidence_count: 15 + +## Result +PASS + +## Router +- path_scope: [] +- layers: ['C1_SYMBOL_CATALOG', 'C0_SOURCE_CHUNKS', 'C4_SEMANTIC_ROLES', 'C2_DEPENDENCY_GRAPH', 'C3_ENTRYPOINTS'] + +## Retrieval +- requested_layers: ['C1_SYMBOL_CATALOG', 'C0_SOURCE_CHUNKS', 'C4_SEMANTIC_ROLES', 'C2_DEPENDENCY_GRAPH', 'C3_ENTRYPOINTS'] +- chunk_count: 15 +- layer_outcomes: [('C0_SOURCE_CHUNKS', 1)] + +## Evidence gate +- failure_reasons: [] + +## Timings (ms) +{'router': 0, 'retrieval_total': 45, 'symbol_resolution': 0} diff --git a/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_explain_order_service_positive.json b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_explain_order_service_positive.json new file mode 100644 index 0000000..1954bd2 --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_explain_order_service_positive.json @@ -0,0 +1,61 @@ +{ + "case_id": "explain_order_service_positive", + "query": "Как работает OrderService?", + "expected": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "answer_mode": "normal" + }, + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "answer_mode": "normal", + "evidence_gate_passed": true, + "evidence_count": 15 + }, + "passed": true, + "mismatches": [], + "router_result": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "EXPLAIN", + "path_scope": [], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_resolution_status": "pending" + }, + "retrieval_request": { + "rag_session_id": "564f37c4-259f-4d21-be24-04b3a51e3c64", + "query": "Как работает OrderService?", + "sub_intent": "EXPLAIN", + "path_scope": [], + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 1, + "empty": false, + "fallback_used": false + } + ], + "failure_reasons": [], + "timings_ms": { + "router": 0, + "retrieval_total": 43, + "symbol_resolution": 0 + } +} \ No newline at end of file diff --git a/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_explain_order_service_positive.md b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_explain_order_service_positive.md new file mode 100644 index 0000000..86813f7 --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_explain_order_service_positive.md @@ -0,0 +1,32 @@ +# explain_order_service_positive + +## Query +Как работает OrderService? + +## Expected +- intent: CODE_QA, sub_intent: EXPLAIN +- answer_mode: normal + +## Actual +- intent: CODE_QA, sub_intent: EXPLAIN +- answer_mode: normal +- evidence_gate_passed: True +- evidence_count: 15 + +## Result +PASS + +## Router +- path_scope: [] +- layers: ['C1_SYMBOL_CATALOG', 'C0_SOURCE_CHUNKS', 'C4_SEMANTIC_ROLES', 'C2_DEPENDENCY_GRAPH', 'C3_ENTRYPOINTS'] + +## Retrieval +- requested_layers: ['C1_SYMBOL_CATALOG', 'C0_SOURCE_CHUNKS', 'C4_SEMANTIC_ROLES', 'C2_DEPENDENCY_GRAPH', 'C3_ENTRYPOINTS'] +- chunk_count: 15 +- layer_outcomes: [('C0_SOURCE_CHUNKS', 1)] + +## Evidence gate +- failure_reasons: [] + +## Timings (ms) +{'router': 0, 'retrieval_total': 43, 'symbol_resolution': 0} diff --git a/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_find_entrypoints_borderline.json b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_find_entrypoints_borderline.json new file mode 100644 index 0000000..1b32629 --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_find_entrypoints_borderline.json @@ -0,0 +1,82 @@ +{ + "case_id": "find_entrypoints_borderline", + "query": "Где main?", + "expected": { + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "answer_mode": "normal" + }, + "actual": { + "intent": "PROJECT_MISC", + "sub_intent": "FIND_ENTRYPOINTS", + "answer_mode": "degraded", + "evidence_gate_passed": false, + "evidence_count": 6 + }, + "passed": false, + "mismatches": [ + "intent: expected CODE_QA, got PROJECT_MISC", + "answer_mode: expected normal, got degraded" + ], + "router_result": { + "intent": "PROJECT_MISC", + "graph_id": "ProjectMiscGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "FIND_ENTRYPOINTS", + "path_scope": [], + "layers": [ + "D1_MODULE_CATALOG", + "D3_SECTION_INDEX", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ], + "symbol_resolution_status": "pending" + }, + "retrieval_request": { + "rag_session_id": "564f37c4-259f-4d21-be24-04b3a51e3c64", + "query": "Где main?", + "sub_intent": "FIND_ENTRYPOINTS", + "path_scope": [], + "requested_layers": [ + "D1_MODULE_CATALOG", + "D3_SECTION_INDEX", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "D1_MODULE_CATALOG", + "hit_count": 0, + "empty": true, + "fallback_used": true + }, + { + "layer_id": "D3_SECTION_INDEX", + "hit_count": 0, + "empty": true, + "fallback_used": true + }, + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 2, + "empty": false, + "fallback_used": true + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 4, + "empty": false, + "fallback_used": true + } + ], + "failure_reasons": [ + "entrypoints_not_found" + ], + "timings_ms": { + "router": 0, + "retrieval_total": 49, + "symbol_resolution": 0 + } +} \ No newline at end of file diff --git a/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_find_entrypoints_borderline.md b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_find_entrypoints_borderline.md new file mode 100644 index 0000000..409651a --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_find_entrypoints_borderline.md @@ -0,0 +1,36 @@ +# find_entrypoints_borderline + +## Query +Где main? + +## Expected +- intent: CODE_QA, sub_intent: FIND_ENTRYPOINTS +- answer_mode: normal + +## Actual +- intent: PROJECT_MISC, sub_intent: FIND_ENTRYPOINTS +- answer_mode: degraded +- evidence_gate_passed: False +- evidence_count: 6 + +## Result +FAIL + +## Mismatches +- intent: expected CODE_QA, got PROJECT_MISC +- answer_mode: expected normal, got degraded + +## Router +- path_scope: [] +- layers: ['D1_MODULE_CATALOG', 'D3_SECTION_INDEX', 'C1_SYMBOL_CATALOG', 'C0_SOURCE_CHUNKS'] + +## Retrieval +- requested_layers: ['D1_MODULE_CATALOG', 'D3_SECTION_INDEX', 'C1_SYMBOL_CATALOG', 'C0_SOURCE_CHUNKS'] +- chunk_count: 6 +- layer_outcomes: [('D1_MODULE_CATALOG', 0), ('D3_SECTION_INDEX', 0), ('C1_SYMBOL_CATALOG', 2), ('C0_SOURCE_CHUNKS', 4)] + +## Evidence gate +- failure_reasons: ['entrypoints_not_found'] + +## Timings (ms) +{'router': 0, 'retrieval_total': 49, 'symbol_resolution': 0} diff --git a/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_find_entrypoints_english.json b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_find_entrypoints_english.json new file mode 100644 index 0000000..90812ff --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_find_entrypoints_english.json @@ -0,0 +1,61 @@ +{ + "case_id": "find_entrypoints_english", + "query": "Find application entrypoints", + "expected": { + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "answer_mode": "normal" + }, + "actual": { + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "answer_mode": "normal", + "evidence_gate_passed": true, + "evidence_count": 10 + }, + "passed": true, + "mismatches": [], + "router_result": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "FIND_ENTRYPOINTS", + "path_scope": [], + "layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ], + "symbol_resolution_status": "pending" + }, + "retrieval_request": { + "rag_session_id": "564f37c4-259f-4d21-be24-04b3a51e3c64", + "query": "Find application entrypoints", + "sub_intent": "FIND_ENTRYPOINTS", + "path_scope": [], + "requested_layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "C3_ENTRYPOINTS", + "hit_count": 4, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 6, + "empty": false, + "fallback_used": false + } + ], + "failure_reasons": [], + "timings_ms": { + "router": 0, + "retrieval_total": 18, + "symbol_resolution": 0 + } +} \ No newline at end of file diff --git a/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_find_entrypoints_english.md b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_find_entrypoints_english.md new file mode 100644 index 0000000..c959748 --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_find_entrypoints_english.md @@ -0,0 +1,32 @@ +# find_entrypoints_english + +## Query +Find application entrypoints + +## Expected +- intent: CODE_QA, sub_intent: FIND_ENTRYPOINTS +- answer_mode: normal + +## Actual +- intent: CODE_QA, sub_intent: FIND_ENTRYPOINTS +- answer_mode: normal +- evidence_gate_passed: True +- evidence_count: 10 + +## Result +PASS + +## Router +- path_scope: [] +- layers: ['C3_ENTRYPOINTS', 'C0_SOURCE_CHUNKS'] + +## Retrieval +- requested_layers: ['C3_ENTRYPOINTS', 'C0_SOURCE_CHUNKS'] +- chunk_count: 10 +- layer_outcomes: [('C3_ENTRYPOINTS', 4), ('C0_SOURCE_CHUNKS', 6)] + +## Evidence gate +- failure_reasons: [] + +## Timings (ms) +{'router': 0, 'retrieval_total': 18, 'symbol_resolution': 0} diff --git a/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_find_entrypoints_positive.json b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_find_entrypoints_positive.json new file mode 100644 index 0000000..141d251 --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_find_entrypoints_positive.json @@ -0,0 +1,82 @@ +{ + "case_id": "find_entrypoints_positive", + "query": "Какие точки входа в приложение?", + "expected": { + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "answer_mode": "normal" + }, + "actual": { + "intent": "PROJECT_MISC", + "sub_intent": "FIND_ENTRYPOINTS", + "answer_mode": "degraded", + "evidence_gate_passed": false, + "evidence_count": 8 + }, + "passed": false, + "mismatches": [ + "intent: expected CODE_QA, got PROJECT_MISC", + "answer_mode: expected normal, got degraded" + ], + "router_result": { + "intent": "PROJECT_MISC", + "graph_id": "ProjectMiscGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "FIND_ENTRYPOINTS", + "path_scope": [], + "layers": [ + "D1_MODULE_CATALOG", + "D3_SECTION_INDEX", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ], + "symbol_resolution_status": "not_requested" + }, + "retrieval_request": { + "rag_session_id": "564f37c4-259f-4d21-be24-04b3a51e3c64", + "query": "Какие точки входа в приложение?", + "sub_intent": "FIND_ENTRYPOINTS", + "path_scope": [], + "requested_layers": [ + "D1_MODULE_CATALOG", + "D3_SECTION_INDEX", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "D1_MODULE_CATALOG", + "hit_count": 0, + "empty": true, + "fallback_used": true + }, + { + "layer_id": "D3_SECTION_INDEX", + "hit_count": 0, + "empty": true, + "fallback_used": true + }, + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 4, + "empty": false, + "fallback_used": true + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 4, + "empty": false, + "fallback_used": true + } + ], + "failure_reasons": [ + "entrypoints_not_found" + ], + "timings_ms": { + "router": 0, + "retrieval_total": 48, + "symbol_resolution": 0 + } +} \ No newline at end of file diff --git a/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_find_entrypoints_positive.md b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_find_entrypoints_positive.md new file mode 100644 index 0000000..c5f4a3f --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_find_entrypoints_positive.md @@ -0,0 +1,36 @@ +# find_entrypoints_positive + +## Query +Какие точки входа в приложение? + +## Expected +- intent: CODE_QA, sub_intent: FIND_ENTRYPOINTS +- answer_mode: normal + +## Actual +- intent: PROJECT_MISC, sub_intent: FIND_ENTRYPOINTS +- answer_mode: degraded +- evidence_gate_passed: False +- evidence_count: 8 + +## Result +FAIL + +## Mismatches +- intent: expected CODE_QA, got PROJECT_MISC +- answer_mode: expected normal, got degraded + +## Router +- path_scope: [] +- layers: ['D1_MODULE_CATALOG', 'D3_SECTION_INDEX', 'C1_SYMBOL_CATALOG', 'C0_SOURCE_CHUNKS'] + +## Retrieval +- requested_layers: ['D1_MODULE_CATALOG', 'D3_SECTION_INDEX', 'C1_SYMBOL_CATALOG', 'C0_SOURCE_CHUNKS'] +- chunk_count: 8 +- layer_outcomes: [('D1_MODULE_CATALOG', 0), ('D3_SECTION_INDEX', 0), ('C1_SYMBOL_CATALOG', 4), ('C0_SOURCE_CHUNKS', 4)] + +## Evidence gate +- failure_reasons: ['entrypoints_not_found'] + +## Timings (ms) +{'router': 0, 'retrieval_total': 48, 'symbol_resolution': 0} diff --git a/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_find_tests_borderline.json b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_find_tests_borderline.json new file mode 100644 index 0000000..a5b7d83 --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_find_tests_borderline.json @@ -0,0 +1,69 @@ +{ + "case_id": "find_tests_borderline", + "query": "Есть ли тесты на репозиторий?", + "expected": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "answer_mode": "normal" + }, + "actual": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "answer_mode": "normal", + "evidence_gate_passed": true, + "evidence_count": 16 + }, + "passed": true, + "mismatches": [], + "router_result": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "FIND_TESTS", + "path_scope": [], + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "symbol_resolution_status": "not_requested" + }, + "retrieval_request": { + "rag_session_id": "564f37c4-259f-4d21-be24-04b3a51e3c64", + "query": "Есть ли тесты на репозиторий?", + "sub_intent": "FIND_TESTS", + "path_scope": [], + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 6, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 2, + "empty": false, + "fallback_used": false + } + ], + "failure_reasons": [], + "timings_ms": { + "router": 0, + "retrieval_total": 22, + "symbol_resolution": 0 + } +} \ No newline at end of file diff --git a/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_find_tests_borderline.md b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_find_tests_borderline.md new file mode 100644 index 0000000..7b20089 --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_find_tests_borderline.md @@ -0,0 +1,32 @@ +# find_tests_borderline + +## Query +Есть ли тесты на репозиторий? + +## Expected +- intent: CODE_QA, sub_intent: FIND_TESTS +- answer_mode: normal + +## Actual +- intent: CODE_QA, sub_intent: FIND_TESTS +- answer_mode: normal +- evidence_gate_passed: True +- evidence_count: 16 + +## Result +PASS + +## Router +- path_scope: [] +- layers: ['C1_SYMBOL_CATALOG', 'C2_DEPENDENCY_GRAPH', 'C0_SOURCE_CHUNKS'] + +## Retrieval +- requested_layers: ['C1_SYMBOL_CATALOG', 'C2_DEPENDENCY_GRAPH', 'C0_SOURCE_CHUNKS'] +- chunk_count: 16 +- layer_outcomes: [('C1_SYMBOL_CATALOG', 8), ('C2_DEPENDENCY_GRAPH', 6), ('C0_SOURCE_CHUNKS', 2)] + +## Evidence gate +- failure_reasons: [] + +## Timings (ms) +{'router': 0, 'retrieval_total': 22, 'symbol_resolution': 0} diff --git a/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_find_tests_negative.json b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_find_tests_negative.json new file mode 100644 index 0000000..12067be --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_find_tests_negative.json @@ -0,0 +1,71 @@ +{ + "case_id": "find_tests_negative", + "query": "Где тесты для NonExistent?", + "expected": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "answer_mode": "degraded" + }, + "actual": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "answer_mode": "normal", + "evidence_gate_passed": true, + "evidence_count": 8 + }, + "passed": false, + "mismatches": [ + "answer_mode: expected degraded, got normal" + ], + "router_result": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "FIND_TESTS", + "path_scope": [], + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "symbol_resolution_status": "pending" + }, + "retrieval_request": { + "rag_session_id": "564f37c4-259f-4d21-be24-04b3a51e3c64", + "query": "Где тесты для NonExistent?", + "sub_intent": "FIND_TESTS", + "path_scope": [], + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 0, + "empty": true, + "fallback_used": true + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 6, + "empty": false, + "fallback_used": true + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 2, + "empty": false, + "fallback_used": true + } + ], + "failure_reasons": [], + "timings_ms": { + "router": 0, + "retrieval_total": 31, + "symbol_resolution": 0 + } +} \ No newline at end of file diff --git a/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_find_tests_negative.md b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_find_tests_negative.md new file mode 100644 index 0000000..c72ea8a --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_find_tests_negative.md @@ -0,0 +1,35 @@ +# find_tests_negative + +## Query +Где тесты для NonExistent? + +## Expected +- intent: CODE_QA, sub_intent: FIND_TESTS +- answer_mode: degraded + +## Actual +- intent: CODE_QA, sub_intent: FIND_TESTS +- answer_mode: normal +- evidence_gate_passed: True +- evidence_count: 8 + +## Result +FAIL + +## Mismatches +- answer_mode: expected degraded, got normal + +## Router +- path_scope: [] +- layers: ['C1_SYMBOL_CATALOG', 'C2_DEPENDENCY_GRAPH', 'C0_SOURCE_CHUNKS'] + +## Retrieval +- requested_layers: ['C1_SYMBOL_CATALOG', 'C2_DEPENDENCY_GRAPH', 'C0_SOURCE_CHUNKS'] +- chunk_count: 8 +- layer_outcomes: [('C1_SYMBOL_CATALOG', 0), ('C2_DEPENDENCY_GRAPH', 6), ('C0_SOURCE_CHUNKS', 2)] + +## Evidence gate +- failure_reasons: [] + +## Timings (ms) +{'router': 0, 'retrieval_total': 31, 'symbol_resolution': 0} diff --git a/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_find_tests_order_positive.json b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_find_tests_order_positive.json new file mode 100644 index 0000000..f818dce --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_find_tests_order_positive.json @@ -0,0 +1,69 @@ +{ + "case_id": "find_tests_order_positive", + "query": "Найди тесты для Order", + "expected": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "answer_mode": "normal" + }, + "actual": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "answer_mode": "normal", + "evidence_gate_passed": true, + "evidence_count": 8 + }, + "passed": true, + "mismatches": [], + "router_result": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "FIND_TESTS", + "path_scope": [], + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "symbol_resolution_status": "pending" + }, + "retrieval_request": { + "rag_session_id": "564f37c4-259f-4d21-be24-04b3a51e3c64", + "query": "Найди тесты для Order", + "sub_intent": "FIND_TESTS", + "path_scope": [], + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 0, + "empty": true, + "fallback_used": true + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 6, + "empty": false, + "fallback_used": true + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 2, + "empty": false, + "fallback_used": true + } + ], + "failure_reasons": [], + "timings_ms": { + "router": 0, + "retrieval_total": 33, + "symbol_resolution": 0 + } +} \ No newline at end of file diff --git a/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_find_tests_order_positive.md b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_find_tests_order_positive.md new file mode 100644 index 0000000..adfd8e9 --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_find_tests_order_positive.md @@ -0,0 +1,32 @@ +# find_tests_order_positive + +## Query +Найди тесты для Order + +## Expected +- intent: CODE_QA, sub_intent: FIND_TESTS +- answer_mode: normal + +## Actual +- intent: CODE_QA, sub_intent: FIND_TESTS +- answer_mode: normal +- evidence_gate_passed: True +- evidence_count: 8 + +## Result +PASS + +## Router +- path_scope: [] +- layers: ['C1_SYMBOL_CATALOG', 'C2_DEPENDENCY_GRAPH', 'C0_SOURCE_CHUNKS'] + +## Retrieval +- requested_layers: ['C1_SYMBOL_CATALOG', 'C2_DEPENDENCY_GRAPH', 'C0_SOURCE_CHUNKS'] +- chunk_count: 8 +- layer_outcomes: [('C1_SYMBOL_CATALOG', 0), ('C2_DEPENDENCY_GRAPH', 6), ('C0_SOURCE_CHUNKS', 2)] + +## Evidence gate +- failure_reasons: [] + +## Timings (ms) +{'router': 0, 'retrieval_total': 33, 'symbol_resolution': 0} diff --git a/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_find_tests_positive.json b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_find_tests_positive.json new file mode 100644 index 0000000..d25705b --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_find_tests_positive.json @@ -0,0 +1,69 @@ +{ + "case_id": "find_tests_positive", + "query": "Где тесты для OrderService?", + "expected": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "answer_mode": "normal" + }, + "actual": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "answer_mode": "normal", + "evidence_gate_passed": true, + "evidence_count": 8 + }, + "passed": true, + "mismatches": [], + "router_result": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "FIND_TESTS", + "path_scope": [], + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "symbol_resolution_status": "pending" + }, + "retrieval_request": { + "rag_session_id": "564f37c4-259f-4d21-be24-04b3a51e3c64", + "query": "Где тесты для OrderService?", + "sub_intent": "FIND_TESTS", + "path_scope": [], + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 0, + "empty": true, + "fallback_used": true + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 6, + "empty": false, + "fallback_used": true + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 2, + "empty": false, + "fallback_used": true + } + ], + "failure_reasons": [], + "timings_ms": { + "router": 0, + "retrieval_total": 34, + "symbol_resolution": 0 + } +} \ No newline at end of file diff --git a/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_find_tests_positive.md b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_find_tests_positive.md new file mode 100644 index 0000000..c4f89dc --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_find_tests_positive.md @@ -0,0 +1,32 @@ +# find_tests_positive + +## Query +Где тесты для OrderService? + +## Expected +- intent: CODE_QA, sub_intent: FIND_TESTS +- answer_mode: normal + +## Actual +- intent: CODE_QA, sub_intent: FIND_TESTS +- answer_mode: normal +- evidence_gate_passed: True +- evidence_count: 8 + +## Result +PASS + +## Router +- path_scope: [] +- layers: ['C1_SYMBOL_CATALOG', 'C2_DEPENDENCY_GRAPH', 'C0_SOURCE_CHUNKS'] + +## Retrieval +- requested_layers: ['C1_SYMBOL_CATALOG', 'C2_DEPENDENCY_GRAPH', 'C0_SOURCE_CHUNKS'] +- chunk_count: 8 +- layer_outcomes: [('C1_SYMBOL_CATALOG', 0), ('C2_DEPENDENCY_GRAPH', 6), ('C0_SOURCE_CHUNKS', 2)] + +## Evidence gate +- failure_reasons: [] + +## Timings (ms) +{'router': 0, 'retrieval_total': 34, 'symbol_resolution': 0} diff --git a/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_general_qa_borderline.json b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_general_qa_borderline.json new file mode 100644 index 0000000..a6fc810 --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_general_qa_borderline.json @@ -0,0 +1,87 @@ +{ + "case_id": "general_qa_borderline", + "query": "Расскажи про код", + "expected": { + "intent": "CODE_QA", + "sub_intent": "GENERAL_QA", + "answer_mode": "normal" + }, + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "answer_mode": "normal", + "evidence_gate_passed": true, + "evidence_count": 29 + }, + "passed": false, + "mismatches": [ + "sub_intent: expected GENERAL_QA, got EXPLAIN" + ], + "router_result": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "EXPLAIN", + "path_scope": [], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_resolution_status": "not_requested" + }, + "retrieval_request": { + "rag_session_id": "564f37c4-259f-4d21-be24-04b3a51e3c64", + "query": "Расскажи про код", + "sub_intent": "EXPLAIN", + "path_scope": [], + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C4_SEMANTIC_ROLES", + "hit_count": 3, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 6, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C3_ENTRYPOINTS", + "hit_count": 4, + "empty": false, + "fallback_used": false + } + ], + "failure_reasons": [], + "timings_ms": { + "router": 0, + "retrieval_total": 44, + "symbol_resolution": 0 + } +} \ No newline at end of file diff --git a/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_general_qa_borderline.md b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_general_qa_borderline.md new file mode 100644 index 0000000..621b916 --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_general_qa_borderline.md @@ -0,0 +1,35 @@ +# general_qa_borderline + +## Query +Расскажи про код + +## Expected +- intent: CODE_QA, sub_intent: GENERAL_QA +- answer_mode: normal + +## Actual +- intent: CODE_QA, sub_intent: EXPLAIN +- answer_mode: normal +- evidence_gate_passed: True +- evidence_count: 29 + +## Result +FAIL + +## Mismatches +- sub_intent: expected GENERAL_QA, got EXPLAIN + +## Router +- path_scope: [] +- layers: ['C1_SYMBOL_CATALOG', 'C0_SOURCE_CHUNKS', 'C4_SEMANTIC_ROLES', 'C2_DEPENDENCY_GRAPH', 'C3_ENTRYPOINTS'] + +## Retrieval +- requested_layers: ['C1_SYMBOL_CATALOG', 'C0_SOURCE_CHUNKS', 'C4_SEMANTIC_ROLES', 'C2_DEPENDENCY_GRAPH', 'C3_ENTRYPOINTS'] +- chunk_count: 29 +- layer_outcomes: [('C1_SYMBOL_CATALOG', 8), ('C0_SOURCE_CHUNKS', 8), ('C4_SEMANTIC_ROLES', 3), ('C2_DEPENDENCY_GRAPH', 6), ('C3_ENTRYPOINTS', 4)] + +## Evidence gate +- failure_reasons: [] + +## Timings (ms) +{'router': 0, 'retrieval_total': 44, 'symbol_resolution': 0} diff --git a/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_general_qa_how.json b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_general_qa_how.json new file mode 100644 index 0000000..2ce2a76 --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_general_qa_how.json @@ -0,0 +1,87 @@ +{ + "case_id": "general_qa_how", + "query": "How does order creation work?", + "expected": { + "intent": "CODE_QA", + "sub_intent": "GENERAL_QA", + "answer_mode": "normal" + }, + "actual": { + "intent": "CODE_QA", + "sub_intent": "ARCHITECTURE", + "answer_mode": "normal", + "evidence_gate_passed": true, + "evidence_count": 20 + }, + "passed": false, + "mismatches": [ + "sub_intent: expected GENERAL_QA, got ARCHITECTURE" + ], + "router_result": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "ARCHITECTURE", + "path_scope": [], + "layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ], + "symbol_resolution_status": "pending" + }, + "retrieval_request": { + "rag_session_id": "564f37c4-259f-4d21-be24-04b3a51e3c64", + "query": "How does order creation work?", + "sub_intent": "ARCHITECTURE", + "path_scope": [], + "requested_layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "C4_SEMANTIC_ROLES", + "hit_count": 3, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C3_ENTRYPOINTS", + "hit_count": 4, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 1, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 4, + "empty": false, + "fallback_used": false + } + ], + "failure_reasons": [], + "timings_ms": { + "router": 0, + "retrieval_total": 43, + "symbol_resolution": 0 + } +} \ No newline at end of file diff --git a/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_general_qa_how.md b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_general_qa_how.md new file mode 100644 index 0000000..27d876e --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_general_qa_how.md @@ -0,0 +1,35 @@ +# general_qa_how + +## Query +How does order creation work? + +## Expected +- intent: CODE_QA, sub_intent: GENERAL_QA +- answer_mode: normal + +## Actual +- intent: CODE_QA, sub_intent: ARCHITECTURE +- answer_mode: normal +- evidence_gate_passed: True +- evidence_count: 20 + +## Result +FAIL + +## Mismatches +- sub_intent: expected GENERAL_QA, got ARCHITECTURE + +## Router +- path_scope: [] +- layers: ['C4_SEMANTIC_ROLES', 'C3_ENTRYPOINTS', 'C2_DEPENDENCY_GRAPH', 'C1_SYMBOL_CATALOG', 'C0_SOURCE_CHUNKS'] + +## Retrieval +- requested_layers: ['C4_SEMANTIC_ROLES', 'C3_ENTRYPOINTS', 'C2_DEPENDENCY_GRAPH', 'C1_SYMBOL_CATALOG', 'C0_SOURCE_CHUNKS'] +- chunk_count: 20 +- layer_outcomes: [('C4_SEMANTIC_ROLES', 3), ('C3_ENTRYPOINTS', 4), ('C2_DEPENDENCY_GRAPH', 8), ('C1_SYMBOL_CATALOG', 1), ('C0_SOURCE_CHUNKS', 4)] + +## Evidence gate +- failure_reasons: [] + +## Timings (ms) +{'router': 0, 'retrieval_total': 43, 'symbol_resolution': 0} diff --git a/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_general_qa_positive.json b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_general_qa_positive.json new file mode 100644 index 0000000..44d659f --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_general_qa_positive.json @@ -0,0 +1,80 @@ +{ + "case_id": "general_qa_positive", + "query": "Что делает этот проект?", + "expected": { + "intent": "CODE_QA", + "sub_intent": "GENERAL_QA", + "answer_mode": "normal" + }, + "actual": { + "intent": "PROJECT_MISC", + "sub_intent": "EXPLAIN", + "answer_mode": "normal", + "evidence_gate_passed": true, + "evidence_count": 8 + }, + "passed": false, + "mismatches": [ + "intent: expected CODE_QA, got PROJECT_MISC", + "sub_intent: expected GENERAL_QA, got EXPLAIN" + ], + "router_result": { + "intent": "PROJECT_MISC", + "graph_id": "ProjectMiscGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "EXPLAIN", + "path_scope": [], + "layers": [ + "D1_MODULE_CATALOG", + "D3_SECTION_INDEX", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ], + "symbol_resolution_status": "not_requested" + }, + "retrieval_request": { + "rag_session_id": "564f37c4-259f-4d21-be24-04b3a51e3c64", + "query": "Что делает этот проект?", + "sub_intent": "EXPLAIN", + "path_scope": [], + "requested_layers": [ + "D1_MODULE_CATALOG", + "D3_SECTION_INDEX", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "D1_MODULE_CATALOG", + "hit_count": 0, + "empty": true, + "fallback_used": true + }, + { + "layer_id": "D3_SECTION_INDEX", + "hit_count": 0, + "empty": true, + "fallback_used": true + }, + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 4, + "empty": false, + "fallback_used": true + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 4, + "empty": false, + "fallback_used": true + } + ], + "failure_reasons": [], + "timings_ms": { + "router": 0, + "retrieval_total": 46, + "symbol_resolution": 0 + } +} \ No newline at end of file diff --git a/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_general_qa_positive.md b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_general_qa_positive.md new file mode 100644 index 0000000..549e623 --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_general_qa_positive.md @@ -0,0 +1,36 @@ +# general_qa_positive + +## Query +Что делает этот проект? + +## Expected +- intent: CODE_QA, sub_intent: GENERAL_QA +- answer_mode: normal + +## Actual +- intent: PROJECT_MISC, sub_intent: EXPLAIN +- answer_mode: normal +- evidence_gate_passed: True +- evidence_count: 8 + +## Result +FAIL + +## Mismatches +- intent: expected CODE_QA, got PROJECT_MISC +- sub_intent: expected GENERAL_QA, got EXPLAIN + +## Router +- path_scope: [] +- layers: ['D1_MODULE_CATALOG', 'D3_SECTION_INDEX', 'C1_SYMBOL_CATALOG', 'C0_SOURCE_CHUNKS'] + +## Retrieval +- requested_layers: ['D1_MODULE_CATALOG', 'D3_SECTION_INDEX', 'C1_SYMBOL_CATALOG', 'C0_SOURCE_CHUNKS'] +- chunk_count: 8 +- layer_outcomes: [('D1_MODULE_CATALOG', 0), ('D3_SECTION_INDEX', 0), ('C1_SYMBOL_CATALOG', 4), ('C0_SOURCE_CHUNKS', 4)] + +## Evidence gate +- failure_reasons: [] + +## Timings (ms) +{'router': 0, 'retrieval_total': 46, 'symbol_resolution': 0} diff --git a/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_open_file_api_positive.json b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_open_file_api_positive.json new file mode 100644 index 0000000..2c913ec --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_open_file_api_positive.json @@ -0,0 +1,57 @@ +{ + "case_id": "open_file_api_positive", + "query": "Покажи src/order_app/api/orders.py", + "expected": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "answer_mode": "normal" + }, + "actual": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "answer_mode": "normal", + "evidence_gate_passed": true, + "evidence_count": 1 + }, + "passed": true, + "mismatches": [], + "router_result": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "OPEN_FILE", + "path_scope": [ + "src/order_app/api/orders.py" + ], + "layers": [ + "C0_SOURCE_CHUNKS" + ], + "symbol_resolution_status": "not_requested" + }, + "retrieval_request": { + "rag_session_id": "564f37c4-259f-4d21-be24-04b3a51e3c64", + "query": "Покажи src/order_app/api/orders.py", + "sub_intent": "OPEN_FILE", + "path_scope": [ + "src/order_app/api/orders.py" + ], + "requested_layers": [ + "C0_SOURCE_CHUNKS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 1, + "empty": false, + "fallback_used": false + } + ], + "failure_reasons": [], + "timings_ms": { + "router": 0, + "retrieval_total": 8, + "symbol_resolution": 0 + } +} \ No newline at end of file diff --git a/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_open_file_api_positive.md b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_open_file_api_positive.md new file mode 100644 index 0000000..2ab84d0 --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_open_file_api_positive.md @@ -0,0 +1,32 @@ +# open_file_api_positive + +## Query +Покажи src/order_app/api/orders.py + +## Expected +- intent: CODE_QA, sub_intent: OPEN_FILE +- answer_mode: normal + +## Actual +- intent: CODE_QA, sub_intent: OPEN_FILE +- answer_mode: normal +- evidence_gate_passed: True +- evidence_count: 1 + +## Result +PASS + +## Router +- path_scope: ['src/order_app/api/orders.py'] +- layers: ['C0_SOURCE_CHUNKS'] + +## Retrieval +- requested_layers: ['C0_SOURCE_CHUNKS'] +- chunk_count: 1 +- layer_outcomes: [('C0_SOURCE_CHUNKS', 1)] + +## Evidence gate +- failure_reasons: [] + +## Timings (ms) +{'router': 0, 'retrieval_total': 8, 'symbol_resolution': 0} diff --git a/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_open_file_borderline.json b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_open_file_borderline.json new file mode 100644 index 0000000..0bad448 --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_open_file_borderline.json @@ -0,0 +1,63 @@ +{ + "case_id": "open_file_borderline", + "query": "Open main", + "expected": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "answer_mode": "normal" + }, + "actual": { + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "answer_mode": "normal", + "evidence_gate_passed": true, + "evidence_count": 10 + }, + "passed": false, + "mismatches": [ + "sub_intent: expected OPEN_FILE, got FIND_ENTRYPOINTS" + ], + "router_result": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "FIND_ENTRYPOINTS", + "path_scope": [], + "layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ], + "symbol_resolution_status": "pending" + }, + "retrieval_request": { + "rag_session_id": "564f37c4-259f-4d21-be24-04b3a51e3c64", + "query": "Open main", + "sub_intent": "FIND_ENTRYPOINTS", + "path_scope": [], + "requested_layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "C3_ENTRYPOINTS", + "hit_count": 4, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 6, + "empty": false, + "fallback_used": false + } + ], + "failure_reasons": [], + "timings_ms": { + "router": 0, + "retrieval_total": 25, + "symbol_resolution": 0 + } +} \ No newline at end of file diff --git a/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_open_file_borderline.md b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_open_file_borderline.md new file mode 100644 index 0000000..65fc0ba --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_open_file_borderline.md @@ -0,0 +1,35 @@ +# open_file_borderline + +## Query +Open main + +## Expected +- intent: CODE_QA, sub_intent: OPEN_FILE +- answer_mode: normal + +## Actual +- intent: CODE_QA, sub_intent: FIND_ENTRYPOINTS +- answer_mode: normal +- evidence_gate_passed: True +- evidence_count: 10 + +## Result +FAIL + +## Mismatches +- sub_intent: expected OPEN_FILE, got FIND_ENTRYPOINTS + +## Router +- path_scope: [] +- layers: ['C3_ENTRYPOINTS', 'C0_SOURCE_CHUNKS'] + +## Retrieval +- requested_layers: ['C3_ENTRYPOINTS', 'C0_SOURCE_CHUNKS'] +- chunk_count: 10 +- layer_outcomes: [('C3_ENTRYPOINTS', 4), ('C0_SOURCE_CHUNKS', 6)] + +## Evidence gate +- failure_reasons: [] + +## Timings (ms) +{'router': 0, 'retrieval_total': 25, 'symbol_resolution': 0} diff --git a/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_open_file_main_positive.json b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_open_file_main_positive.json new file mode 100644 index 0000000..be4a922 --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_open_file_main_positive.json @@ -0,0 +1,57 @@ +{ + "case_id": "open_file_main_positive", + "query": "Открой файл main.py", + "expected": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "answer_mode": "normal" + }, + "actual": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "answer_mode": "normal", + "evidence_gate_passed": true, + "evidence_count": 1 + }, + "passed": true, + "mismatches": [], + "router_result": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "OPEN_FILE", + "path_scope": [ + "main.py" + ], + "layers": [ + "C0_SOURCE_CHUNKS" + ], + "symbol_resolution_status": "not_requested" + }, + "retrieval_request": { + "rag_session_id": "564f37c4-259f-4d21-be24-04b3a51e3c64", + "query": "Открой файл main.py", + "sub_intent": "OPEN_FILE", + "path_scope": [ + "main.py" + ], + "requested_layers": [ + "C0_SOURCE_CHUNKS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 1, + "empty": false, + "fallback_used": false + } + ], + "failure_reasons": [], + "timings_ms": { + "router": 0, + "retrieval_total": 6, + "symbol_resolution": 0 + } +} \ No newline at end of file diff --git a/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_open_file_main_positive.md b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_open_file_main_positive.md new file mode 100644 index 0000000..2ab4fc7 --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_open_file_main_positive.md @@ -0,0 +1,32 @@ +# open_file_main_positive + +## Query +Открой файл main.py + +## Expected +- intent: CODE_QA, sub_intent: OPEN_FILE +- answer_mode: normal + +## Actual +- intent: CODE_QA, sub_intent: OPEN_FILE +- answer_mode: normal +- evidence_gate_passed: True +- evidence_count: 1 + +## Result +PASS + +## Router +- path_scope: ['main.py'] +- layers: ['C0_SOURCE_CHUNKS'] + +## Retrieval +- requested_layers: ['C0_SOURCE_CHUNKS'] +- chunk_count: 1 +- layer_outcomes: [('C0_SOURCE_CHUNKS', 1)] + +## Evidence gate +- failure_reasons: [] + +## Timings (ms) +{'router': 0, 'retrieval_total': 6, 'symbol_resolution': 0} diff --git a/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_open_file_negative.json b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_open_file_negative.json new file mode 100644 index 0000000..b3c840f --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_open_file_negative.json @@ -0,0 +1,62 @@ +{ + "case_id": "open_file_negative", + "query": "Открой файл nonexistent/foo.py", + "expected": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "answer_mode": "degraded" + }, + "actual": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "answer_mode": "insufficient", + "evidence_gate_passed": false, + "evidence_count": 0 + }, + "passed": false, + "mismatches": [ + "answer_mode: expected degraded, got insufficient" + ], + "router_result": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "OPEN_FILE", + "path_scope": [ + "nonexistent/foo.py" + ], + "layers": [ + "C0_SOURCE_CHUNKS" + ], + "symbol_resolution_status": "not_requested" + }, + "retrieval_request": { + "rag_session_id": "564f37c4-259f-4d21-be24-04b3a51e3c64", + "query": "Открой файл nonexistent/foo.py", + "sub_intent": "OPEN_FILE", + "path_scope": [ + "nonexistent/foo.py" + ], + "requested_layers": [ + "C0_SOURCE_CHUNKS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 0, + "empty": true, + "fallback_used": false + } + ], + "failure_reasons": [ + "path_scope_empty", + "layer_c0_empty" + ], + "timings_ms": { + "router": 0, + "retrieval_total": 6, + "symbol_resolution": 0 + } +} \ No newline at end of file diff --git a/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_open_file_negative.md b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_open_file_negative.md new file mode 100644 index 0000000..606f266 --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233701/20260311_233701_open_file_negative.md @@ -0,0 +1,35 @@ +# open_file_negative + +## Query +Открой файл nonexistent/foo.py + +## Expected +- intent: CODE_QA, sub_intent: OPEN_FILE +- answer_mode: degraded + +## Actual +- intent: CODE_QA, sub_intent: OPEN_FILE +- answer_mode: insufficient +- evidence_gate_passed: False +- evidence_count: 0 + +## Result +FAIL + +## Mismatches +- answer_mode: expected degraded, got insufficient + +## Router +- path_scope: ['nonexistent/foo.py'] +- layers: ['C0_SOURCE_CHUNKS'] + +## Retrieval +- requested_layers: ['C0_SOURCE_CHUNKS'] +- chunk_count: 0 +- layer_outcomes: [('C0_SOURCE_CHUNKS', 0)] + +## Evidence gate +- failure_reasons: ['path_scope_empty', 'layer_c0_empty'] + +## Timings (ms) +{'router': 0, 'retrieval_total': 6, 'symbol_resolution': 0} diff --git a/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_explain_borderline.json b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_explain_borderline.json new file mode 100644 index 0000000..4a10b27 --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_explain_borderline.json @@ -0,0 +1,79 @@ +{ + "case_id": "explain_borderline", + "query": "Что делает create_order?", + "expected": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "answer_mode": "normal" + }, + "actual": { + "intent": "PROJECT_MISC", + "sub_intent": "EXPLAIN", + "answer_mode": "normal", + "evidence_gate_passed": true, + "evidence_count": 5 + }, + "passed": false, + "mismatches": [ + "intent: expected CODE_QA, got PROJECT_MISC" + ], + "router_result": { + "intent": "PROJECT_MISC", + "graph_id": "ProjectMiscGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "EXPLAIN", + "path_scope": [], + "layers": [ + "D1_MODULE_CATALOG", + "D3_SECTION_INDEX", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ], + "symbol_resolution_status": "pending" + }, + "retrieval_request": { + "rag_session_id": "d494838f-a9df-4e86-a11a-a2cf8225dbe5", + "query": "Что делает create_order?", + "sub_intent": "EXPLAIN", + "path_scope": [], + "requested_layers": [ + "D1_MODULE_CATALOG", + "D3_SECTION_INDEX", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "D1_MODULE_CATALOG", + "hit_count": 0, + "empty": true, + "fallback_used": false + }, + { + "layer_id": "D3_SECTION_INDEX", + "hit_count": 0, + "empty": true, + "fallback_used": false + }, + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 1, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 4, + "empty": false, + "fallback_used": false + } + ], + "failure_reasons": [], + "timings_ms": { + "router": 0, + "retrieval_total": 31, + "symbol_resolution": 0 + } +} \ No newline at end of file diff --git a/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_explain_borderline.md b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_explain_borderline.md new file mode 100644 index 0000000..c244db7 --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_explain_borderline.md @@ -0,0 +1,35 @@ +# explain_borderline + +## Query +Что делает create_order? + +## Expected +- intent: CODE_QA, sub_intent: EXPLAIN +- answer_mode: normal + +## Actual +- intent: PROJECT_MISC, sub_intent: EXPLAIN +- answer_mode: normal +- evidence_gate_passed: True +- evidence_count: 5 + +## Result +FAIL + +## Mismatches +- intent: expected CODE_QA, got PROJECT_MISC + +## Router +- path_scope: [] +- layers: ['D1_MODULE_CATALOG', 'D3_SECTION_INDEX', 'C1_SYMBOL_CATALOG', 'C0_SOURCE_CHUNKS'] + +## Retrieval +- requested_layers: ['D1_MODULE_CATALOG', 'D3_SECTION_INDEX', 'C1_SYMBOL_CATALOG', 'C0_SOURCE_CHUNKS'] +- chunk_count: 5 +- layer_outcomes: [('D1_MODULE_CATALOG', 0), ('D3_SECTION_INDEX', 0), ('C1_SYMBOL_CATALOG', 1), ('C0_SOURCE_CHUNKS', 4)] + +## Evidence gate +- failure_reasons: [] + +## Timings (ms) +{'router': 0, 'retrieval_total': 31, 'symbol_resolution': 0} diff --git a/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_explain_negative.json b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_explain_negative.json new file mode 100644 index 0000000..ce85a9c --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_explain_negative.json @@ -0,0 +1,87 @@ +{ + "case_id": "explain_negative", + "query": "Объясни класс NonExistentClass", + "expected": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "answer_mode": "degraded" + }, + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "answer_mode": "normal", + "evidence_gate_passed": true, + "evidence_count": 22 + }, + "passed": false, + "mismatches": [ + "answer_mode: expected degraded, got normal" + ], + "router_result": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "EXPLAIN", + "path_scope": [], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_resolution_status": "pending" + }, + "retrieval_request": { + "rag_session_id": "d494838f-a9df-4e86-a11a-a2cf8225dbe5", + "query": "Объясни класс NonExistentClass", + "sub_intent": "EXPLAIN", + "path_scope": [], + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 1, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C4_SEMANTIC_ROLES", + "hit_count": 3, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 6, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C3_ENTRYPOINTS", + "hit_count": 4, + "empty": false, + "fallback_used": false + } + ], + "failure_reasons": [], + "timings_ms": { + "router": 0, + "retrieval_total": 40, + "symbol_resolution": 0 + } +} \ No newline at end of file diff --git a/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_explain_negative.md b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_explain_negative.md new file mode 100644 index 0000000..587277e --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_explain_negative.md @@ -0,0 +1,35 @@ +# explain_negative + +## Query +Объясни класс NonExistentClass + +## Expected +- intent: CODE_QA, sub_intent: EXPLAIN +- answer_mode: degraded + +## Actual +- intent: CODE_QA, sub_intent: EXPLAIN +- answer_mode: normal +- evidence_gate_passed: True +- evidence_count: 22 + +## Result +FAIL + +## Mismatches +- answer_mode: expected degraded, got normal + +## Router +- path_scope: [] +- layers: ['C1_SYMBOL_CATALOG', 'C0_SOURCE_CHUNKS', 'C4_SEMANTIC_ROLES', 'C2_DEPENDENCY_GRAPH', 'C3_ENTRYPOINTS'] + +## Retrieval +- requested_layers: ['C1_SYMBOL_CATALOG', 'C0_SOURCE_CHUNKS', 'C4_SEMANTIC_ROLES', 'C2_DEPENDENCY_GRAPH', 'C3_ENTRYPOINTS'] +- chunk_count: 22 +- layer_outcomes: [('C1_SYMBOL_CATALOG', 1), ('C0_SOURCE_CHUNKS', 8), ('C4_SEMANTIC_ROLES', 3), ('C2_DEPENDENCY_GRAPH', 6), ('C3_ENTRYPOINTS', 4)] + +## Evidence gate +- failure_reasons: [] + +## Timings (ms) +{'router': 0, 'retrieval_total': 40, 'symbol_resolution': 0} diff --git a/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_explain_order_positive.json b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_explain_order_positive.json new file mode 100644 index 0000000..7fc9d72 --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_explain_order_positive.json @@ -0,0 +1,61 @@ +{ + "case_id": "explain_order_positive", + "query": "Объясни класс Order", + "expected": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "answer_mode": "normal" + }, + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "answer_mode": "normal", + "evidence_gate_passed": true, + "evidence_count": 15 + }, + "passed": true, + "mismatches": [], + "router_result": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "EXPLAIN", + "path_scope": [], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_resolution_status": "pending" + }, + "retrieval_request": { + "rag_session_id": "d494838f-a9df-4e86-a11a-a2cf8225dbe5", + "query": "Объясни класс Order", + "sub_intent": "EXPLAIN", + "path_scope": [], + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 1, + "empty": false, + "fallback_used": false + } + ], + "failure_reasons": [], + "timings_ms": { + "router": 0, + "retrieval_total": 41, + "symbol_resolution": 0 + } +} \ No newline at end of file diff --git a/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_explain_order_positive.md b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_explain_order_positive.md new file mode 100644 index 0000000..405041a --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_explain_order_positive.md @@ -0,0 +1,32 @@ +# explain_order_positive + +## Query +Объясни класс Order + +## Expected +- intent: CODE_QA, sub_intent: EXPLAIN +- answer_mode: normal + +## Actual +- intent: CODE_QA, sub_intent: EXPLAIN +- answer_mode: normal +- evidence_gate_passed: True +- evidence_count: 15 + +## Result +PASS + +## Router +- path_scope: [] +- layers: ['C1_SYMBOL_CATALOG', 'C0_SOURCE_CHUNKS', 'C4_SEMANTIC_ROLES', 'C2_DEPENDENCY_GRAPH', 'C3_ENTRYPOINTS'] + +## Retrieval +- requested_layers: ['C1_SYMBOL_CATALOG', 'C0_SOURCE_CHUNKS', 'C4_SEMANTIC_ROLES', 'C2_DEPENDENCY_GRAPH', 'C3_ENTRYPOINTS'] +- chunk_count: 15 +- layer_outcomes: [('C0_SOURCE_CHUNKS', 1)] + +## Evidence gate +- failure_reasons: [] + +## Timings (ms) +{'router': 0, 'retrieval_total': 41, 'symbol_resolution': 0} diff --git a/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_explain_order_service_positive.json b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_explain_order_service_positive.json new file mode 100644 index 0000000..1376d03 --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_explain_order_service_positive.json @@ -0,0 +1,61 @@ +{ + "case_id": "explain_order_service_positive", + "query": "Как работает OrderService?", + "expected": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "answer_mode": "normal" + }, + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "answer_mode": "normal", + "evidence_gate_passed": true, + "evidence_count": 15 + }, + "passed": true, + "mismatches": [], + "router_result": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "EXPLAIN", + "path_scope": [], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_resolution_status": "pending" + }, + "retrieval_request": { + "rag_session_id": "d494838f-a9df-4e86-a11a-a2cf8225dbe5", + "query": "Как работает OrderService?", + "sub_intent": "EXPLAIN", + "path_scope": [], + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 1, + "empty": false, + "fallback_used": false + } + ], + "failure_reasons": [], + "timings_ms": { + "router": 0, + "retrieval_total": 44, + "symbol_resolution": 0 + } +} \ No newline at end of file diff --git a/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_explain_order_service_positive.md b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_explain_order_service_positive.md new file mode 100644 index 0000000..0541568 --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_explain_order_service_positive.md @@ -0,0 +1,32 @@ +# explain_order_service_positive + +## Query +Как работает OrderService? + +## Expected +- intent: CODE_QA, sub_intent: EXPLAIN +- answer_mode: normal + +## Actual +- intent: CODE_QA, sub_intent: EXPLAIN +- answer_mode: normal +- evidence_gate_passed: True +- evidence_count: 15 + +## Result +PASS + +## Router +- path_scope: [] +- layers: ['C1_SYMBOL_CATALOG', 'C0_SOURCE_CHUNKS', 'C4_SEMANTIC_ROLES', 'C2_DEPENDENCY_GRAPH', 'C3_ENTRYPOINTS'] + +## Retrieval +- requested_layers: ['C1_SYMBOL_CATALOG', 'C0_SOURCE_CHUNKS', 'C4_SEMANTIC_ROLES', 'C2_DEPENDENCY_GRAPH', 'C3_ENTRYPOINTS'] +- chunk_count: 15 +- layer_outcomes: [('C0_SOURCE_CHUNKS', 1)] + +## Evidence gate +- failure_reasons: [] + +## Timings (ms) +{'router': 0, 'retrieval_total': 44, 'symbol_resolution': 0} diff --git a/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_find_entrypoints_borderline.json b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_find_entrypoints_borderline.json new file mode 100644 index 0000000..235d90b --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_find_entrypoints_borderline.json @@ -0,0 +1,82 @@ +{ + "case_id": "find_entrypoints_borderline", + "query": "Где main?", + "expected": { + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "answer_mode": "normal" + }, + "actual": { + "intent": "PROJECT_MISC", + "sub_intent": "FIND_ENTRYPOINTS", + "answer_mode": "degraded", + "evidence_gate_passed": false, + "evidence_count": 6 + }, + "passed": false, + "mismatches": [ + "intent: expected CODE_QA, got PROJECT_MISC", + "answer_mode: expected normal, got degraded" + ], + "router_result": { + "intent": "PROJECT_MISC", + "graph_id": "ProjectMiscGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "FIND_ENTRYPOINTS", + "path_scope": [], + "layers": [ + "D1_MODULE_CATALOG", + "D3_SECTION_INDEX", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ], + "symbol_resolution_status": "pending" + }, + "retrieval_request": { + "rag_session_id": "d494838f-a9df-4e86-a11a-a2cf8225dbe5", + "query": "Где main?", + "sub_intent": "FIND_ENTRYPOINTS", + "path_scope": [], + "requested_layers": [ + "D1_MODULE_CATALOG", + "D3_SECTION_INDEX", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "D1_MODULE_CATALOG", + "hit_count": 0, + "empty": true, + "fallback_used": true + }, + { + "layer_id": "D3_SECTION_INDEX", + "hit_count": 0, + "empty": true, + "fallback_used": true + }, + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 2, + "empty": false, + "fallback_used": true + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 4, + "empty": false, + "fallback_used": true + } + ], + "failure_reasons": [ + "entrypoints_not_found" + ], + "timings_ms": { + "router": 0, + "retrieval_total": 45, + "symbol_resolution": 0 + } +} \ No newline at end of file diff --git a/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_find_entrypoints_borderline.md b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_find_entrypoints_borderline.md new file mode 100644 index 0000000..34bc088 --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_find_entrypoints_borderline.md @@ -0,0 +1,36 @@ +# find_entrypoints_borderline + +## Query +Где main? + +## Expected +- intent: CODE_QA, sub_intent: FIND_ENTRYPOINTS +- answer_mode: normal + +## Actual +- intent: PROJECT_MISC, sub_intent: FIND_ENTRYPOINTS +- answer_mode: degraded +- evidence_gate_passed: False +- evidence_count: 6 + +## Result +FAIL + +## Mismatches +- intent: expected CODE_QA, got PROJECT_MISC +- answer_mode: expected normal, got degraded + +## Router +- path_scope: [] +- layers: ['D1_MODULE_CATALOG', 'D3_SECTION_INDEX', 'C1_SYMBOL_CATALOG', 'C0_SOURCE_CHUNKS'] + +## Retrieval +- requested_layers: ['D1_MODULE_CATALOG', 'D3_SECTION_INDEX', 'C1_SYMBOL_CATALOG', 'C0_SOURCE_CHUNKS'] +- chunk_count: 6 +- layer_outcomes: [('D1_MODULE_CATALOG', 0), ('D3_SECTION_INDEX', 0), ('C1_SYMBOL_CATALOG', 2), ('C0_SOURCE_CHUNKS', 4)] + +## Evidence gate +- failure_reasons: ['entrypoints_not_found'] + +## Timings (ms) +{'router': 0, 'retrieval_total': 45, 'symbol_resolution': 0} diff --git a/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_find_entrypoints_english.json b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_find_entrypoints_english.json new file mode 100644 index 0000000..b2a7503 --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_find_entrypoints_english.json @@ -0,0 +1,61 @@ +{ + "case_id": "find_entrypoints_english", + "query": "Find application entrypoints", + "expected": { + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "answer_mode": "normal" + }, + "actual": { + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "answer_mode": "normal", + "evidence_gate_passed": true, + "evidence_count": 10 + }, + "passed": true, + "mismatches": [], + "router_result": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "FIND_ENTRYPOINTS", + "path_scope": [], + "layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ], + "symbol_resolution_status": "pending" + }, + "retrieval_request": { + "rag_session_id": "d494838f-a9df-4e86-a11a-a2cf8225dbe5", + "query": "Find application entrypoints", + "sub_intent": "FIND_ENTRYPOINTS", + "path_scope": [], + "requested_layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "C3_ENTRYPOINTS", + "hit_count": 4, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 6, + "empty": false, + "fallback_used": false + } + ], + "failure_reasons": [], + "timings_ms": { + "router": 0, + "retrieval_total": 16, + "symbol_resolution": 0 + } +} \ No newline at end of file diff --git a/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_find_entrypoints_english.md b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_find_entrypoints_english.md new file mode 100644 index 0000000..b74d01b --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_find_entrypoints_english.md @@ -0,0 +1,32 @@ +# find_entrypoints_english + +## Query +Find application entrypoints + +## Expected +- intent: CODE_QA, sub_intent: FIND_ENTRYPOINTS +- answer_mode: normal + +## Actual +- intent: CODE_QA, sub_intent: FIND_ENTRYPOINTS +- answer_mode: normal +- evidence_gate_passed: True +- evidence_count: 10 + +## Result +PASS + +## Router +- path_scope: [] +- layers: ['C3_ENTRYPOINTS', 'C0_SOURCE_CHUNKS'] + +## Retrieval +- requested_layers: ['C3_ENTRYPOINTS', 'C0_SOURCE_CHUNKS'] +- chunk_count: 10 +- layer_outcomes: [('C3_ENTRYPOINTS', 4), ('C0_SOURCE_CHUNKS', 6)] + +## Evidence gate +- failure_reasons: [] + +## Timings (ms) +{'router': 0, 'retrieval_total': 16, 'symbol_resolution': 0} diff --git a/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_find_entrypoints_positive.json b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_find_entrypoints_positive.json new file mode 100644 index 0000000..aa7ce4d --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_find_entrypoints_positive.json @@ -0,0 +1,82 @@ +{ + "case_id": "find_entrypoints_positive", + "query": "Какие точки входа в приложение?", + "expected": { + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "answer_mode": "normal" + }, + "actual": { + "intent": "PROJECT_MISC", + "sub_intent": "FIND_ENTRYPOINTS", + "answer_mode": "degraded", + "evidence_gate_passed": false, + "evidence_count": 8 + }, + "passed": false, + "mismatches": [ + "intent: expected CODE_QA, got PROJECT_MISC", + "answer_mode: expected normal, got degraded" + ], + "router_result": { + "intent": "PROJECT_MISC", + "graph_id": "ProjectMiscGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "FIND_ENTRYPOINTS", + "path_scope": [], + "layers": [ + "D1_MODULE_CATALOG", + "D3_SECTION_INDEX", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ], + "symbol_resolution_status": "not_requested" + }, + "retrieval_request": { + "rag_session_id": "d494838f-a9df-4e86-a11a-a2cf8225dbe5", + "query": "Какие точки входа в приложение?", + "sub_intent": "FIND_ENTRYPOINTS", + "path_scope": [], + "requested_layers": [ + "D1_MODULE_CATALOG", + "D3_SECTION_INDEX", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "D1_MODULE_CATALOG", + "hit_count": 0, + "empty": true, + "fallback_used": true + }, + { + "layer_id": "D3_SECTION_INDEX", + "hit_count": 0, + "empty": true, + "fallback_used": true + }, + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 4, + "empty": false, + "fallback_used": true + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 4, + "empty": false, + "fallback_used": true + } + ], + "failure_reasons": [ + "entrypoints_not_found" + ], + "timings_ms": { + "router": 0, + "retrieval_total": 45, + "symbol_resolution": 0 + } +} \ No newline at end of file diff --git a/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_find_entrypoints_positive.md b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_find_entrypoints_positive.md new file mode 100644 index 0000000..9fe0645 --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_find_entrypoints_positive.md @@ -0,0 +1,36 @@ +# find_entrypoints_positive + +## Query +Какие точки входа в приложение? + +## Expected +- intent: CODE_QA, sub_intent: FIND_ENTRYPOINTS +- answer_mode: normal + +## Actual +- intent: PROJECT_MISC, sub_intent: FIND_ENTRYPOINTS +- answer_mode: degraded +- evidence_gate_passed: False +- evidence_count: 8 + +## Result +FAIL + +## Mismatches +- intent: expected CODE_QA, got PROJECT_MISC +- answer_mode: expected normal, got degraded + +## Router +- path_scope: [] +- layers: ['D1_MODULE_CATALOG', 'D3_SECTION_INDEX', 'C1_SYMBOL_CATALOG', 'C0_SOURCE_CHUNKS'] + +## Retrieval +- requested_layers: ['D1_MODULE_CATALOG', 'D3_SECTION_INDEX', 'C1_SYMBOL_CATALOG', 'C0_SOURCE_CHUNKS'] +- chunk_count: 8 +- layer_outcomes: [('D1_MODULE_CATALOG', 0), ('D3_SECTION_INDEX', 0), ('C1_SYMBOL_CATALOG', 4), ('C0_SOURCE_CHUNKS', 4)] + +## Evidence gate +- failure_reasons: ['entrypoints_not_found'] + +## Timings (ms) +{'router': 0, 'retrieval_total': 45, 'symbol_resolution': 0} diff --git a/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_find_tests_borderline.json b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_find_tests_borderline.json new file mode 100644 index 0000000..e237dc1 --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_find_tests_borderline.json @@ -0,0 +1,69 @@ +{ + "case_id": "find_tests_borderline", + "query": "Есть ли тесты на репозиторий?", + "expected": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "answer_mode": "normal" + }, + "actual": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "answer_mode": "normal", + "evidence_gate_passed": true, + "evidence_count": 16 + }, + "passed": true, + "mismatches": [], + "router_result": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "FIND_TESTS", + "path_scope": [], + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "symbol_resolution_status": "not_requested" + }, + "retrieval_request": { + "rag_session_id": "d494838f-a9df-4e86-a11a-a2cf8225dbe5", + "query": "Есть ли тесты на репозиторий?", + "sub_intent": "FIND_TESTS", + "path_scope": [], + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 6, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 2, + "empty": false, + "fallback_used": false + } + ], + "failure_reasons": [], + "timings_ms": { + "router": 0, + "retrieval_total": 22, + "symbol_resolution": 0 + } +} \ No newline at end of file diff --git a/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_find_tests_borderline.md b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_find_tests_borderline.md new file mode 100644 index 0000000..7b20089 --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_find_tests_borderline.md @@ -0,0 +1,32 @@ +# find_tests_borderline + +## Query +Есть ли тесты на репозиторий? + +## Expected +- intent: CODE_QA, sub_intent: FIND_TESTS +- answer_mode: normal + +## Actual +- intent: CODE_QA, sub_intent: FIND_TESTS +- answer_mode: normal +- evidence_gate_passed: True +- evidence_count: 16 + +## Result +PASS + +## Router +- path_scope: [] +- layers: ['C1_SYMBOL_CATALOG', 'C2_DEPENDENCY_GRAPH', 'C0_SOURCE_CHUNKS'] + +## Retrieval +- requested_layers: ['C1_SYMBOL_CATALOG', 'C2_DEPENDENCY_GRAPH', 'C0_SOURCE_CHUNKS'] +- chunk_count: 16 +- layer_outcomes: [('C1_SYMBOL_CATALOG', 8), ('C2_DEPENDENCY_GRAPH', 6), ('C0_SOURCE_CHUNKS', 2)] + +## Evidence gate +- failure_reasons: [] + +## Timings (ms) +{'router': 0, 'retrieval_total': 22, 'symbol_resolution': 0} diff --git a/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_find_tests_negative.json b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_find_tests_negative.json new file mode 100644 index 0000000..3f34198 --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_find_tests_negative.json @@ -0,0 +1,71 @@ +{ + "case_id": "find_tests_negative", + "query": "Где тесты для NonExistent?", + "expected": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "answer_mode": "degraded" + }, + "actual": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "answer_mode": "normal", + "evidence_gate_passed": true, + "evidence_count": 8 + }, + "passed": false, + "mismatches": [ + "answer_mode: expected degraded, got normal" + ], + "router_result": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "FIND_TESTS", + "path_scope": [], + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "symbol_resolution_status": "pending" + }, + "retrieval_request": { + "rag_session_id": "d494838f-a9df-4e86-a11a-a2cf8225dbe5", + "query": "Где тесты для NonExistent?", + "sub_intent": "FIND_TESTS", + "path_scope": [], + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 0, + "empty": true, + "fallback_used": true + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 6, + "empty": false, + "fallback_used": true + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 2, + "empty": false, + "fallback_used": true + } + ], + "failure_reasons": [], + "timings_ms": { + "router": 0, + "retrieval_total": 31, + "symbol_resolution": 0 + } +} \ No newline at end of file diff --git a/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_find_tests_negative.md b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_find_tests_negative.md new file mode 100644 index 0000000..c72ea8a --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_find_tests_negative.md @@ -0,0 +1,35 @@ +# find_tests_negative + +## Query +Где тесты для NonExistent? + +## Expected +- intent: CODE_QA, sub_intent: FIND_TESTS +- answer_mode: degraded + +## Actual +- intent: CODE_QA, sub_intent: FIND_TESTS +- answer_mode: normal +- evidence_gate_passed: True +- evidence_count: 8 + +## Result +FAIL + +## Mismatches +- answer_mode: expected degraded, got normal + +## Router +- path_scope: [] +- layers: ['C1_SYMBOL_CATALOG', 'C2_DEPENDENCY_GRAPH', 'C0_SOURCE_CHUNKS'] + +## Retrieval +- requested_layers: ['C1_SYMBOL_CATALOG', 'C2_DEPENDENCY_GRAPH', 'C0_SOURCE_CHUNKS'] +- chunk_count: 8 +- layer_outcomes: [('C1_SYMBOL_CATALOG', 0), ('C2_DEPENDENCY_GRAPH', 6), ('C0_SOURCE_CHUNKS', 2)] + +## Evidence gate +- failure_reasons: [] + +## Timings (ms) +{'router': 0, 'retrieval_total': 31, 'symbol_resolution': 0} diff --git a/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_find_tests_order_positive.json b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_find_tests_order_positive.json new file mode 100644 index 0000000..dfc1c35 --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_find_tests_order_positive.json @@ -0,0 +1,69 @@ +{ + "case_id": "find_tests_order_positive", + "query": "Найди тесты для Order", + "expected": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "answer_mode": "normal" + }, + "actual": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "answer_mode": "normal", + "evidence_gate_passed": true, + "evidence_count": 8 + }, + "passed": true, + "mismatches": [], + "router_result": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "FIND_TESTS", + "path_scope": [], + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "symbol_resolution_status": "pending" + }, + "retrieval_request": { + "rag_session_id": "d494838f-a9df-4e86-a11a-a2cf8225dbe5", + "query": "Найди тесты для Order", + "sub_intent": "FIND_TESTS", + "path_scope": [], + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 0, + "empty": true, + "fallback_used": true + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 6, + "empty": false, + "fallback_used": true + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 2, + "empty": false, + "fallback_used": true + } + ], + "failure_reasons": [], + "timings_ms": { + "router": 0, + "retrieval_total": 32, + "symbol_resolution": 0 + } +} \ No newline at end of file diff --git a/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_find_tests_order_positive.md b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_find_tests_order_positive.md new file mode 100644 index 0000000..f587400 --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_find_tests_order_positive.md @@ -0,0 +1,32 @@ +# find_tests_order_positive + +## Query +Найди тесты для Order + +## Expected +- intent: CODE_QA, sub_intent: FIND_TESTS +- answer_mode: normal + +## Actual +- intent: CODE_QA, sub_intent: FIND_TESTS +- answer_mode: normal +- evidence_gate_passed: True +- evidence_count: 8 + +## Result +PASS + +## Router +- path_scope: [] +- layers: ['C1_SYMBOL_CATALOG', 'C2_DEPENDENCY_GRAPH', 'C0_SOURCE_CHUNKS'] + +## Retrieval +- requested_layers: ['C1_SYMBOL_CATALOG', 'C2_DEPENDENCY_GRAPH', 'C0_SOURCE_CHUNKS'] +- chunk_count: 8 +- layer_outcomes: [('C1_SYMBOL_CATALOG', 0), ('C2_DEPENDENCY_GRAPH', 6), ('C0_SOURCE_CHUNKS', 2)] + +## Evidence gate +- failure_reasons: [] + +## Timings (ms) +{'router': 0, 'retrieval_total': 32, 'symbol_resolution': 0} diff --git a/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_find_tests_positive.json b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_find_tests_positive.json new file mode 100644 index 0000000..3ab9cd5 --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_find_tests_positive.json @@ -0,0 +1,69 @@ +{ + "case_id": "find_tests_positive", + "query": "Где тесты для OrderService?", + "expected": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "answer_mode": "normal" + }, + "actual": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "answer_mode": "normal", + "evidence_gate_passed": true, + "evidence_count": 8 + }, + "passed": true, + "mismatches": [], + "router_result": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "FIND_TESTS", + "path_scope": [], + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "symbol_resolution_status": "pending" + }, + "retrieval_request": { + "rag_session_id": "d494838f-a9df-4e86-a11a-a2cf8225dbe5", + "query": "Где тесты для OrderService?", + "sub_intent": "FIND_TESTS", + "path_scope": [], + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 0, + "empty": true, + "fallback_used": true + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 6, + "empty": false, + "fallback_used": true + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 2, + "empty": false, + "fallback_used": true + } + ], + "failure_reasons": [], + "timings_ms": { + "router": 0, + "retrieval_total": 33, + "symbol_resolution": 0 + } +} \ No newline at end of file diff --git a/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_find_tests_positive.md b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_find_tests_positive.md new file mode 100644 index 0000000..2332f1f --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_find_tests_positive.md @@ -0,0 +1,32 @@ +# find_tests_positive + +## Query +Где тесты для OrderService? + +## Expected +- intent: CODE_QA, sub_intent: FIND_TESTS +- answer_mode: normal + +## Actual +- intent: CODE_QA, sub_intent: FIND_TESTS +- answer_mode: normal +- evidence_gate_passed: True +- evidence_count: 8 + +## Result +PASS + +## Router +- path_scope: [] +- layers: ['C1_SYMBOL_CATALOG', 'C2_DEPENDENCY_GRAPH', 'C0_SOURCE_CHUNKS'] + +## Retrieval +- requested_layers: ['C1_SYMBOL_CATALOG', 'C2_DEPENDENCY_GRAPH', 'C0_SOURCE_CHUNKS'] +- chunk_count: 8 +- layer_outcomes: [('C1_SYMBOL_CATALOG', 0), ('C2_DEPENDENCY_GRAPH', 6), ('C0_SOURCE_CHUNKS', 2)] + +## Evidence gate +- failure_reasons: [] + +## Timings (ms) +{'router': 0, 'retrieval_total': 33, 'symbol_resolution': 0} diff --git a/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_general_qa_borderline.json b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_general_qa_borderline.json new file mode 100644 index 0000000..79cde29 --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_general_qa_borderline.json @@ -0,0 +1,87 @@ +{ + "case_id": "general_qa_borderline", + "query": "Расскажи про код", + "expected": { + "intent": "CODE_QA", + "sub_intent": "GENERAL_QA", + "answer_mode": "normal" + }, + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "answer_mode": "normal", + "evidence_gate_passed": true, + "evidence_count": 29 + }, + "passed": false, + "mismatches": [ + "sub_intent: expected GENERAL_QA, got EXPLAIN" + ], + "router_result": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "EXPLAIN", + "path_scope": [], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_resolution_status": "not_requested" + }, + "retrieval_request": { + "rag_session_id": "d494838f-a9df-4e86-a11a-a2cf8225dbe5", + "query": "Расскажи про код", + "sub_intent": "EXPLAIN", + "path_scope": [], + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C4_SEMANTIC_ROLES", + "hit_count": 3, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 6, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C3_ENTRYPOINTS", + "hit_count": 4, + "empty": false, + "fallback_used": false + } + ], + "failure_reasons": [], + "timings_ms": { + "router": 0, + "retrieval_total": 39, + "symbol_resolution": 0 + } +} \ No newline at end of file diff --git a/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_general_qa_borderline.md b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_general_qa_borderline.md new file mode 100644 index 0000000..4b24bde --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_general_qa_borderline.md @@ -0,0 +1,35 @@ +# general_qa_borderline + +## Query +Расскажи про код + +## Expected +- intent: CODE_QA, sub_intent: GENERAL_QA +- answer_mode: normal + +## Actual +- intent: CODE_QA, sub_intent: EXPLAIN +- answer_mode: normal +- evidence_gate_passed: True +- evidence_count: 29 + +## Result +FAIL + +## Mismatches +- sub_intent: expected GENERAL_QA, got EXPLAIN + +## Router +- path_scope: [] +- layers: ['C1_SYMBOL_CATALOG', 'C0_SOURCE_CHUNKS', 'C4_SEMANTIC_ROLES', 'C2_DEPENDENCY_GRAPH', 'C3_ENTRYPOINTS'] + +## Retrieval +- requested_layers: ['C1_SYMBOL_CATALOG', 'C0_SOURCE_CHUNKS', 'C4_SEMANTIC_ROLES', 'C2_DEPENDENCY_GRAPH', 'C3_ENTRYPOINTS'] +- chunk_count: 29 +- layer_outcomes: [('C1_SYMBOL_CATALOG', 8), ('C0_SOURCE_CHUNKS', 8), ('C4_SEMANTIC_ROLES', 3), ('C2_DEPENDENCY_GRAPH', 6), ('C3_ENTRYPOINTS', 4)] + +## Evidence gate +- failure_reasons: [] + +## Timings (ms) +{'router': 0, 'retrieval_total': 39, 'symbol_resolution': 0} diff --git a/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_general_qa_how.json b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_general_qa_how.json new file mode 100644 index 0000000..0955df9 --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_general_qa_how.json @@ -0,0 +1,87 @@ +{ + "case_id": "general_qa_how", + "query": "How does order creation work?", + "expected": { + "intent": "CODE_QA", + "sub_intent": "GENERAL_QA", + "answer_mode": "normal" + }, + "actual": { + "intent": "CODE_QA", + "sub_intent": "ARCHITECTURE", + "answer_mode": "normal", + "evidence_gate_passed": true, + "evidence_count": 20 + }, + "passed": false, + "mismatches": [ + "sub_intent: expected GENERAL_QA, got ARCHITECTURE" + ], + "router_result": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "ARCHITECTURE", + "path_scope": [], + "layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ], + "symbol_resolution_status": "pending" + }, + "retrieval_request": { + "rag_session_id": "d494838f-a9df-4e86-a11a-a2cf8225dbe5", + "query": "How does order creation work?", + "sub_intent": "ARCHITECTURE", + "path_scope": [], + "requested_layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "C4_SEMANTIC_ROLES", + "hit_count": 3, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C3_ENTRYPOINTS", + "hit_count": 4, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 1, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 4, + "empty": false, + "fallback_used": false + } + ], + "failure_reasons": [], + "timings_ms": { + "router": 0, + "retrieval_total": 42, + "symbol_resolution": 0 + } +} \ No newline at end of file diff --git a/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_general_qa_how.md b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_general_qa_how.md new file mode 100644 index 0000000..403254c --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_general_qa_how.md @@ -0,0 +1,35 @@ +# general_qa_how + +## Query +How does order creation work? + +## Expected +- intent: CODE_QA, sub_intent: GENERAL_QA +- answer_mode: normal + +## Actual +- intent: CODE_QA, sub_intent: ARCHITECTURE +- answer_mode: normal +- evidence_gate_passed: True +- evidence_count: 20 + +## Result +FAIL + +## Mismatches +- sub_intent: expected GENERAL_QA, got ARCHITECTURE + +## Router +- path_scope: [] +- layers: ['C4_SEMANTIC_ROLES', 'C3_ENTRYPOINTS', 'C2_DEPENDENCY_GRAPH', 'C1_SYMBOL_CATALOG', 'C0_SOURCE_CHUNKS'] + +## Retrieval +- requested_layers: ['C4_SEMANTIC_ROLES', 'C3_ENTRYPOINTS', 'C2_DEPENDENCY_GRAPH', 'C1_SYMBOL_CATALOG', 'C0_SOURCE_CHUNKS'] +- chunk_count: 20 +- layer_outcomes: [('C4_SEMANTIC_ROLES', 3), ('C3_ENTRYPOINTS', 4), ('C2_DEPENDENCY_GRAPH', 8), ('C1_SYMBOL_CATALOG', 1), ('C0_SOURCE_CHUNKS', 4)] + +## Evidence gate +- failure_reasons: [] + +## Timings (ms) +{'router': 0, 'retrieval_total': 42, 'symbol_resolution': 0} diff --git a/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_general_qa_positive.json b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_general_qa_positive.json new file mode 100644 index 0000000..ebc3409 --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_general_qa_positive.json @@ -0,0 +1,80 @@ +{ + "case_id": "general_qa_positive", + "query": "Что делает этот проект?", + "expected": { + "intent": "CODE_QA", + "sub_intent": "GENERAL_QA", + "answer_mode": "normal" + }, + "actual": { + "intent": "PROJECT_MISC", + "sub_intent": "EXPLAIN", + "answer_mode": "normal", + "evidence_gate_passed": true, + "evidence_count": 8 + }, + "passed": false, + "mismatches": [ + "intent: expected CODE_QA, got PROJECT_MISC", + "sub_intent: expected GENERAL_QA, got EXPLAIN" + ], + "router_result": { + "intent": "PROJECT_MISC", + "graph_id": "ProjectMiscGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "EXPLAIN", + "path_scope": [], + "layers": [ + "D1_MODULE_CATALOG", + "D3_SECTION_INDEX", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ], + "symbol_resolution_status": "not_requested" + }, + "retrieval_request": { + "rag_session_id": "d494838f-a9df-4e86-a11a-a2cf8225dbe5", + "query": "Что делает этот проект?", + "sub_intent": "EXPLAIN", + "path_scope": [], + "requested_layers": [ + "D1_MODULE_CATALOG", + "D3_SECTION_INDEX", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "D1_MODULE_CATALOG", + "hit_count": 0, + "empty": true, + "fallback_used": true + }, + { + "layer_id": "D3_SECTION_INDEX", + "hit_count": 0, + "empty": true, + "fallback_used": true + }, + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 4, + "empty": false, + "fallback_used": true + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 4, + "empty": false, + "fallback_used": true + } + ], + "failure_reasons": [], + "timings_ms": { + "router": 0, + "retrieval_total": 44, + "symbol_resolution": 0 + } +} \ No newline at end of file diff --git a/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_general_qa_positive.md b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_general_qa_positive.md new file mode 100644 index 0000000..8f2a7e8 --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_general_qa_positive.md @@ -0,0 +1,36 @@ +# general_qa_positive + +## Query +Что делает этот проект? + +## Expected +- intent: CODE_QA, sub_intent: GENERAL_QA +- answer_mode: normal + +## Actual +- intent: PROJECT_MISC, sub_intent: EXPLAIN +- answer_mode: normal +- evidence_gate_passed: True +- evidence_count: 8 + +## Result +FAIL + +## Mismatches +- intent: expected CODE_QA, got PROJECT_MISC +- sub_intent: expected GENERAL_QA, got EXPLAIN + +## Router +- path_scope: [] +- layers: ['D1_MODULE_CATALOG', 'D3_SECTION_INDEX', 'C1_SYMBOL_CATALOG', 'C0_SOURCE_CHUNKS'] + +## Retrieval +- requested_layers: ['D1_MODULE_CATALOG', 'D3_SECTION_INDEX', 'C1_SYMBOL_CATALOG', 'C0_SOURCE_CHUNKS'] +- chunk_count: 8 +- layer_outcomes: [('D1_MODULE_CATALOG', 0), ('D3_SECTION_INDEX', 0), ('C1_SYMBOL_CATALOG', 4), ('C0_SOURCE_CHUNKS', 4)] + +## Evidence gate +- failure_reasons: [] + +## Timings (ms) +{'router': 0, 'retrieval_total': 44, 'symbol_resolution': 0} diff --git a/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_open_file_api_positive.json b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_open_file_api_positive.json new file mode 100644 index 0000000..f7d6d07 --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_open_file_api_positive.json @@ -0,0 +1,57 @@ +{ + "case_id": "open_file_api_positive", + "query": "Покажи src/order_app/api/orders.py", + "expected": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "answer_mode": "normal" + }, + "actual": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "answer_mode": "normal", + "evidence_gate_passed": true, + "evidence_count": 1 + }, + "passed": true, + "mismatches": [], + "router_result": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "OPEN_FILE", + "path_scope": [ + "src/order_app/api/orders.py" + ], + "layers": [ + "C0_SOURCE_CHUNKS" + ], + "symbol_resolution_status": "not_requested" + }, + "retrieval_request": { + "rag_session_id": "d494838f-a9df-4e86-a11a-a2cf8225dbe5", + "query": "Покажи src/order_app/api/orders.py", + "sub_intent": "OPEN_FILE", + "path_scope": [ + "src/order_app/api/orders.py" + ], + "requested_layers": [ + "C0_SOURCE_CHUNKS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 1, + "empty": false, + "fallback_used": false + } + ], + "failure_reasons": [], + "timings_ms": { + "router": 0, + "retrieval_total": 7, + "symbol_resolution": 0 + } +} \ No newline at end of file diff --git a/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_open_file_api_positive.md b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_open_file_api_positive.md new file mode 100644 index 0000000..2d2f9ad --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_open_file_api_positive.md @@ -0,0 +1,32 @@ +# open_file_api_positive + +## Query +Покажи src/order_app/api/orders.py + +## Expected +- intent: CODE_QA, sub_intent: OPEN_FILE +- answer_mode: normal + +## Actual +- intent: CODE_QA, sub_intent: OPEN_FILE +- answer_mode: normal +- evidence_gate_passed: True +- evidence_count: 1 + +## Result +PASS + +## Router +- path_scope: ['src/order_app/api/orders.py'] +- layers: ['C0_SOURCE_CHUNKS'] + +## Retrieval +- requested_layers: ['C0_SOURCE_CHUNKS'] +- chunk_count: 1 +- layer_outcomes: [('C0_SOURCE_CHUNKS', 1)] + +## Evidence gate +- failure_reasons: [] + +## Timings (ms) +{'router': 0, 'retrieval_total': 7, 'symbol_resolution': 0} diff --git a/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_open_file_borderline.json b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_open_file_borderline.json new file mode 100644 index 0000000..cc19c0d --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_open_file_borderline.json @@ -0,0 +1,63 @@ +{ + "case_id": "open_file_borderline", + "query": "Open main", + "expected": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "answer_mode": "normal" + }, + "actual": { + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "answer_mode": "normal", + "evidence_gate_passed": true, + "evidence_count": 10 + }, + "passed": false, + "mismatches": [ + "sub_intent: expected OPEN_FILE, got FIND_ENTRYPOINTS" + ], + "router_result": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "FIND_ENTRYPOINTS", + "path_scope": [], + "layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ], + "symbol_resolution_status": "pending" + }, + "retrieval_request": { + "rag_session_id": "d494838f-a9df-4e86-a11a-a2cf8225dbe5", + "query": "Open main", + "sub_intent": "FIND_ENTRYPOINTS", + "path_scope": [], + "requested_layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "C3_ENTRYPOINTS", + "hit_count": 4, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 6, + "empty": false, + "fallback_used": false + } + ], + "failure_reasons": [], + "timings_ms": { + "router": 0, + "retrieval_total": 27, + "symbol_resolution": 0 + } +} \ No newline at end of file diff --git a/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_open_file_borderline.md b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_open_file_borderline.md new file mode 100644 index 0000000..d3ba117 --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_open_file_borderline.md @@ -0,0 +1,35 @@ +# open_file_borderline + +## Query +Open main + +## Expected +- intent: CODE_QA, sub_intent: OPEN_FILE +- answer_mode: normal + +## Actual +- intent: CODE_QA, sub_intent: FIND_ENTRYPOINTS +- answer_mode: normal +- evidence_gate_passed: True +- evidence_count: 10 + +## Result +FAIL + +## Mismatches +- sub_intent: expected OPEN_FILE, got FIND_ENTRYPOINTS + +## Router +- path_scope: [] +- layers: ['C3_ENTRYPOINTS', 'C0_SOURCE_CHUNKS'] + +## Retrieval +- requested_layers: ['C3_ENTRYPOINTS', 'C0_SOURCE_CHUNKS'] +- chunk_count: 10 +- layer_outcomes: [('C3_ENTRYPOINTS', 4), ('C0_SOURCE_CHUNKS', 6)] + +## Evidence gate +- failure_reasons: [] + +## Timings (ms) +{'router': 0, 'retrieval_total': 27, 'symbol_resolution': 0} diff --git a/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_open_file_main_positive.json b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_open_file_main_positive.json new file mode 100644 index 0000000..16898b3 --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_open_file_main_positive.json @@ -0,0 +1,57 @@ +{ + "case_id": "open_file_main_positive", + "query": "Открой файл main.py", + "expected": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "answer_mode": "normal" + }, + "actual": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "answer_mode": "normal", + "evidence_gate_passed": true, + "evidence_count": 1 + }, + "passed": true, + "mismatches": [], + "router_result": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "OPEN_FILE", + "path_scope": [ + "main.py" + ], + "layers": [ + "C0_SOURCE_CHUNKS" + ], + "symbol_resolution_status": "not_requested" + }, + "retrieval_request": { + "rag_session_id": "d494838f-a9df-4e86-a11a-a2cf8225dbe5", + "query": "Открой файл main.py", + "sub_intent": "OPEN_FILE", + "path_scope": [ + "main.py" + ], + "requested_layers": [ + "C0_SOURCE_CHUNKS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 1, + "empty": false, + "fallback_used": false + } + ], + "failure_reasons": [], + "timings_ms": { + "router": 0, + "retrieval_total": 6, + "symbol_resolution": 0 + } +} \ No newline at end of file diff --git a/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_open_file_main_positive.md b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_open_file_main_positive.md new file mode 100644 index 0000000..2ab4fc7 --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_open_file_main_positive.md @@ -0,0 +1,32 @@ +# open_file_main_positive + +## Query +Открой файл main.py + +## Expected +- intent: CODE_QA, sub_intent: OPEN_FILE +- answer_mode: normal + +## Actual +- intent: CODE_QA, sub_intent: OPEN_FILE +- answer_mode: normal +- evidence_gate_passed: True +- evidence_count: 1 + +## Result +PASS + +## Router +- path_scope: ['main.py'] +- layers: ['C0_SOURCE_CHUNKS'] + +## Retrieval +- requested_layers: ['C0_SOURCE_CHUNKS'] +- chunk_count: 1 +- layer_outcomes: [('C0_SOURCE_CHUNKS', 1)] + +## Evidence gate +- failure_reasons: [] + +## Timings (ms) +{'router': 0, 'retrieval_total': 6, 'symbol_resolution': 0} diff --git a/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_open_file_negative.json b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_open_file_negative.json new file mode 100644 index 0000000..e73687a --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_open_file_negative.json @@ -0,0 +1,62 @@ +{ + "case_id": "open_file_negative", + "query": "Открой файл nonexistent/foo.py", + "expected": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "answer_mode": "degraded" + }, + "actual": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "answer_mode": "insufficient", + "evidence_gate_passed": false, + "evidence_count": 0 + }, + "passed": false, + "mismatches": [ + "answer_mode: expected degraded, got insufficient" + ], + "router_result": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "OPEN_FILE", + "path_scope": [ + "nonexistent/foo.py" + ], + "layers": [ + "C0_SOURCE_CHUNKS" + ], + "symbol_resolution_status": "not_requested" + }, + "retrieval_request": { + "rag_session_id": "d494838f-a9df-4e86-a11a-a2cf8225dbe5", + "query": "Открой файл nonexistent/foo.py", + "sub_intent": "OPEN_FILE", + "path_scope": [ + "nonexistent/foo.py" + ], + "requested_layers": [ + "C0_SOURCE_CHUNKS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 0, + "empty": true, + "fallback_used": false + } + ], + "failure_reasons": [ + "path_scope_empty", + "layer_c0_empty" + ], + "timings_ms": { + "router": 0, + "retrieval_total": 9, + "symbol_resolution": 0 + } +} \ No newline at end of file diff --git a/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_open_file_negative.md b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_open_file_negative.md new file mode 100644 index 0000000..1d7d0c6 --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/20260311_233942_open_file_negative.md @@ -0,0 +1,35 @@ +# open_file_negative + +## Query +Открой файл nonexistent/foo.py + +## Expected +- intent: CODE_QA, sub_intent: OPEN_FILE +- answer_mode: degraded + +## Actual +- intent: CODE_QA, sub_intent: OPEN_FILE +- answer_mode: insufficient +- evidence_gate_passed: False +- evidence_count: 0 + +## Result +FAIL + +## Mismatches +- answer_mode: expected degraded, got insufficient + +## Router +- path_scope: ['nonexistent/foo.py'] +- layers: ['C0_SOURCE_CHUNKS'] + +## Retrieval +- requested_layers: ['C0_SOURCE_CHUNKS'] +- chunk_count: 0 +- layer_outcomes: [('C0_SOURCE_CHUNKS', 0)] + +## Evidence gate +- failure_reasons: ['path_scope_empty', 'layer_c0_empty'] + +## Timings (ms) +{'router': 0, 'retrieval_total': 9, 'symbol_resolution': 0} diff --git a/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/console_output.txt b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/console_output.txt new file mode 100644 index 0000000..35b6d09 --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/console_output.txt @@ -0,0 +1,65 @@ +Console log: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942/console_output.txt +Running evaluation: repo=/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup/suite_01_synthetic/fixtures/code_qa_repo, fixture=True +Results: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/20260311_233942 +[1/13] main.py +[2/13] src/order_app/__init__.py +[3/13] src/order_app/api/__init__.py +[4/13] src/order_app/api/orders.py +[5/13] src/order_app/domain/__init__.py +[6/13] src/order_app/domain/order.py +[7/13] src/order_app/repositories/__init__.py +[8/13] src/order_app/repositories/order_repository.py +[9/13] src/order_app/services/__init__.py +[10/13] src/order_app/services/order_service.py +[11/13] src/order_app/utils/__init__.py +[12/13] src/order_app/utils/helpers.py +[13/13] tests/test_order_service.py +rag_session_id=d494838f-a9df-4e86-a11a-a2cf8225dbe5 +intent router v2 request: turn=1 active_intent=None user_query=Открой файл main.py languages=['python'] domains=['CODE', 'DOCS'] +intent router v2 result: {"schema_version": "1.1", "intent": "CODE_QA", "retrieval_profile": "code", "graph_id": "CodeQAGraph", "conversation_mode": "START", "query_plan": {"raw": "Открой файл main.py", "normalized": "Открой файл main.py", "sub_intent": "OPEN_FILE", "negations": [], "expansions": ["file"], "keyword_hints": [], "path_hints": ["main.py"], "doc_scope_hints": [], "symbol_candidates": [], "symbol_kind_hint": "unknown", "anchors": [{"type": "FILE_PATH", "value": "main.py", "source": "user_text", "subtype": null, "span": {"start": 12, "end": 19}, "confidence": 0.95}, {"type": "KEY_TERM", "value": "файл", "source": "user_text", "subtype": null, "span": {"start": 7, "end": 11}, "confidence": 0.9}]}, "retrieval_spec": {"domains": ["CODE"], "layer_queries": [{"layer_id": "C0_SOURCE_CHUNKS", "top_k": 12}], "filters": {"test_policy": "EXCLUDE", "path_scope": ["main.py"], "language": ["python"]}, "rerank_profile": "code"}, "retrieval_constraints": {"include_globs": ["main.py"], "exclude_globs": ["tests/**", "**/test_*.py", "**/*_test.py"], "prefer_globs": [], "test_file_globs": [], "test_symbol_patterns": [], "max_candidates": 20, "fuzzy_symbol_search": {"enabled": false, "max_distance": 2, "top_k": 5}}, "symbol_resolution": {"status": "not_requested", "resolved_symbol": null, "alternatives": [], "confidence": 0.0}, "evidence_policy": {"require_def": false, "require_flow": false, "require_spec": false, "allow_answer_without_evidence": false}} +intent router v2 request: turn=1 active_intent=None user_query=Покажи src/order_app/api/orders.py languages=['python'] domains=['CODE', 'DOCS'] +intent router v2 result: {"schema_version": "1.1", "intent": "CODE_QA", "retrieval_profile": "code", "graph_id": "CodeQAGraph", "conversation_mode": "START", "query_plan": {"raw": "Покажи src/order_app/api/orders.py", "normalized": "Покажи src/order_app/api/orders.py", "sub_intent": "OPEN_FILE", "negations": [], "expansions": [], "keyword_hints": [], "path_hints": ["src/order_app/api/orders.py"], "doc_scope_hints": [], "symbol_candidates": [], "symbol_kind_hint": "unknown", "anchors": [{"type": "FILE_PATH", "value": "src/order_app/api/orders.py", "source": "user_text", "subtype": null, "span": {"start": 7, "end": 34}, "confidence": 0.95}]}, "retrieval_spec": {"domains": ["CODE"], "layer_queries": [{"layer_id": "C0_SOURCE_CHUNKS", "top_k": 12}], "filters": {"test_policy": "EXCLUDE", "path_scope": ["src/order_app/api/orders.py"], "language": ["python"]}, "rerank_profile": "code"}, "retrieval_constraints": {"include_globs": ["src/order_app/api/orders.py"], "exclude_globs": ["tests/**", "**/test_*.py", "**/*_test.py"], "prefer_globs": [], "test_file_globs": [], "test_symbol_patterns": [], "max_candidates": 20, "fuzzy_symbol_search": {"enabled": false, "max_distance": 2, "top_k": 5}}, "symbol_resolution": {"status": "not_requested", "resolved_symbol": null, "alternatives": [], "confidence": 0.0}, "evidence_policy": {"require_def": false, "require_flow": false, "require_spec": false, "allow_answer_without_evidence": false}} +intent router v2 request: turn=1 active_intent=None user_query=Open main languages=['python'] domains=['CODE', 'DOCS'] +intent router v2 result: {"schema_version": "1.1", "intent": "CODE_QA", "retrieval_profile": "code", "graph_id": "CodeQAGraph", "conversation_mode": "START", "query_plan": {"raw": "Open main", "normalized": "Open main", "sub_intent": "FIND_ENTRYPOINTS", "negations": [], "expansions": ["Open", "main"], "keyword_hints": ["Open", "main"], "path_hints": [], "doc_scope_hints": [], "symbol_candidates": ["Open", "main"], "symbol_kind_hint": "class", "anchors": [{"type": "SYMBOL", "value": "Open", "source": "user_text", "subtype": null, "span": {"start": 0, "end": 4}, "confidence": 0.88}, {"type": "SYMBOL", "value": "main", "source": "user_text", "subtype": null, "span": {"start": 5, "end": 9}, "confidence": 0.88}]}, "retrieval_spec": {"domains": ["CODE"], "layer_queries": [{"layer_id": "C3_ENTRYPOINTS", "top_k": 12}, {"layer_id": "C0_SOURCE_CHUNKS", "top_k": 6}], "filters": {"test_policy": "EXCLUDE", "path_scope": [], "language": ["python"]}, "rerank_profile": "code"}, "retrieval_constraints": {"include_globs": ["src/**"], "exclude_globs": ["tests/**", "**/test_*.py", "**/*_test.py"], "prefer_globs": [], "test_file_globs": [], "test_symbol_patterns": [], "max_candidates": 20, "fuzzy_symbol_search": {"enabled": true, "max_distance": 2, "top_k": 5}}, "symbol_resolution": {"status": "pending", "resolved_symbol": null, "alternatives": ["Open", "main"], "confidence": 0.0}, "evidence_policy": {"require_def": true, "require_flow": true, "require_spec": false, "allow_answer_without_evidence": false}} +intent router v2 request: turn=1 active_intent=None user_query=Открой файл nonexistent/foo.py languages=['python'] domains=['CODE', 'DOCS'] +intent router v2 result: {"schema_version": "1.1", "intent": "CODE_QA", "retrieval_profile": "code", "graph_id": "CodeQAGraph", "conversation_mode": "START", "query_plan": {"raw": "Открой файл nonexistent/foo.py", "normalized": "Открой файл nonexistent/foo.py", "sub_intent": "OPEN_FILE", "negations": [], "expansions": ["file"], "keyword_hints": [], "path_hints": ["nonexistent/foo.py"], "doc_scope_hints": [], "symbol_candidates": [], "symbol_kind_hint": "unknown", "anchors": [{"type": "FILE_PATH", "value": "nonexistent/foo.py", "source": "user_text", "subtype": null, "span": {"start": 12, "end": 30}, "confidence": 0.95}, {"type": "KEY_TERM", "value": "файл", "source": "user_text", "subtype": null, "span": {"start": 7, "end": 11}, "confidence": 0.9}]}, "retrieval_spec": {"domains": ["CODE"], "layer_queries": [{"layer_id": "C0_SOURCE_CHUNKS", "top_k": 12}], "filters": {"test_policy": "EXCLUDE", "path_scope": ["nonexistent/foo.py"], "language": ["python"]}, "rerank_profile": "code"}, "retrieval_constraints": {"include_globs": ["nonexistent/foo.py"], "exclude_globs": ["tests/**", "**/test_*.py", "**/*_test.py"], "prefer_globs": [], "test_file_globs": [], "test_symbol_patterns": [], "max_candidates": 20, "fuzzy_symbol_search": {"enabled": false, "max_distance": 2, "top_k": 5}}, "symbol_resolution": {"status": "not_requested", "resolved_symbol": null, "alternatives": [], "confidence": 0.0}, "evidence_policy": {"require_def": false, "require_flow": false, "require_spec": false, "allow_answer_without_evidence": false}} +intent router v2 request: turn=1 active_intent=None user_query=Объясни класс Order languages=['python'] domains=['CODE', 'DOCS'] +intent router v2 result: {"schema_version": "1.1", "intent": "CODE_QA", "retrieval_profile": "code", "graph_id": "CodeQAGraph", "conversation_mode": "START", "query_plan": {"raw": "Объясни класс Order", "normalized": "Объясни класс Order", "sub_intent": "EXPLAIN", "negations": [], "expansions": ["Order"], "keyword_hints": ["Order"], "path_hints": [], "doc_scope_hints": [], "symbol_candidates": ["Order"], "symbol_kind_hint": "class", "anchors": [{"type": "SYMBOL", "value": "Order", "source": "user_text", "subtype": null, "span": {"start": 14, "end": 19}, "confidence": 0.88}, {"type": "KEY_TERM", "value": "класс", "source": "user_text", "subtype": null, "span": {"start": 8, "end": 13}, "confidence": 0.9}]}, "retrieval_spec": {"domains": ["CODE"], "layer_queries": [{"layer_id": "C1_SYMBOL_CATALOG", "top_k": 8}, {"layer_id": "C0_SOURCE_CHUNKS", "top_k": 8}, {"layer_id": "C4_SEMANTIC_ROLES", "top_k": 8}, {"layer_id": "C2_DEPENDENCY_GRAPH", "top_k": 6}, {"layer_id": "C3_ENTRYPOINTS", "top_k": 6}], "filters": {"test_policy": "EXCLUDE", "path_scope": [], "language": ["python"]}, "rerank_profile": "code"}, "retrieval_constraints": {"include_globs": ["src/**"], "exclude_globs": ["tests/**", "**/test_*.py", "**/*_test.py"], "prefer_globs": [], "test_file_globs": [], "test_symbol_patterns": [], "max_candidates": 20, "fuzzy_symbol_search": {"enabled": true, "max_distance": 2, "top_k": 5}}, "symbol_resolution": {"status": "pending", "resolved_symbol": null, "alternatives": ["Order"], "confidence": 0.0}, "evidence_policy": {"require_def": true, "require_flow": true, "require_spec": false, "allow_answer_without_evidence": false}} +intent router v2 request: turn=1 active_intent=None user_query=Как работает OrderService? languages=['python'] domains=['CODE', 'DOCS'] +intent router v2 result: {"schema_version": "1.1", "intent": "CODE_QA", "retrieval_profile": "code", "graph_id": "CodeQAGraph", "conversation_mode": "START", "query_plan": {"raw": "Как работает OrderService?", "normalized": "Как работает OrderService?", "sub_intent": "EXPLAIN", "negations": [], "expansions": ["OrderService"], "keyword_hints": ["OrderService"], "path_hints": [], "doc_scope_hints": [], "symbol_candidates": ["OrderService"], "symbol_kind_hint": "class", "anchors": [{"type": "SYMBOL", "value": "OrderService", "source": "user_text", "subtype": null, "span": {"start": 13, "end": 25}, "confidence": 0.88}]}, "retrieval_spec": {"domains": ["CODE"], "layer_queries": [{"layer_id": "C1_SYMBOL_CATALOG", "top_k": 8}, {"layer_id": "C0_SOURCE_CHUNKS", "top_k": 8}, {"layer_id": "C4_SEMANTIC_ROLES", "top_k": 8}, {"layer_id": "C2_DEPENDENCY_GRAPH", "top_k": 6}, {"layer_id": "C3_ENTRYPOINTS", "top_k": 6}], "filters": {"test_policy": "EXCLUDE", "path_scope": [], "language": ["python"]}, "rerank_profile": "code"}, "retrieval_constraints": {"include_globs": ["src/**"], "exclude_globs": ["tests/**", "**/test_*.py", "**/*_test.py"], "prefer_globs": [], "test_file_globs": [], "test_symbol_patterns": [], "max_candidates": 20, "fuzzy_symbol_search": {"enabled": true, "max_distance": 2, "top_k": 5}}, "symbol_resolution": {"status": "pending", "resolved_symbol": null, "alternatives": ["OrderService"], "confidence": 0.0}, "evidence_policy": {"require_def": true, "require_flow": true, "require_spec": false, "allow_answer_without_evidence": false}} +intent router v2 request: turn=1 active_intent=None user_query=Что делает create_order? languages=['python'] domains=['CODE', 'DOCS'] +intent router v2 result: {"schema_version": "1.1", "intent": "PROJECT_MISC", "retrieval_profile": "code", "graph_id": "ProjectMiscGraph", "conversation_mode": "START", "query_plan": {"raw": "Что делает create_order?", "normalized": "Что делает create_order?", "sub_intent": "EXPLAIN", "negations": [], "expansions": ["create_order"], "keyword_hints": ["create_order"], "path_hints": [], "doc_scope_hints": [], "symbol_candidates": ["create_order"], "symbol_kind_hint": "function", "anchors": [{"type": "SYMBOL", "value": "create_order", "source": "user_text", "subtype": null, "span": {"start": 11, "end": 23}, "confidence": 0.88}]}, "retrieval_spec": {"domains": ["CODE", "DOCS"], "layer_queries": [{"layer_id": "D1_MODULE_CATALOG", "top_k": 4}, {"layer_id": "D3_SECTION_INDEX", "top_k": 6}, {"layer_id": "C1_SYMBOL_CATALOG", "top_k": 4}, {"layer_id": "C0_SOURCE_CHUNKS", "top_k": 4}], "filters": {"test_policy": "EXCLUDE", "path_scope": [], "language": ["python"], "doc_kinds": [], "doc_language": []}, "rerank_profile": "project"}, "retrieval_constraints": {"include_globs": ["src/**"], "exclude_globs": ["tests/**", "**/test_*.py", "**/*_test.py"], "prefer_globs": [], "test_file_globs": [], "test_symbol_patterns": [], "max_candidates": 20, "fuzzy_symbol_search": {"enabled": true, "max_distance": 2, "top_k": 5}}, "symbol_resolution": {"status": "pending", "resolved_symbol": null, "alternatives": ["create_order"], "confidence": 0.0}, "evidence_policy": {"require_def": false, "require_flow": false, "require_spec": false, "allow_answer_without_evidence": true}} +intent router v2 request: turn=1 active_intent=None user_query=Объясни класс NonExistentClass languages=['python'] domains=['CODE', 'DOCS'] +intent router v2 result: {"schema_version": "1.1", "intent": "CODE_QA", "retrieval_profile": "code", "graph_id": "CodeQAGraph", "conversation_mode": "START", "query_plan": {"raw": "Объясни класс NonExistentClass", "normalized": "Объясни класс NonExistentClass", "sub_intent": "EXPLAIN", "negations": [], "expansions": ["NonExistentClass"], "keyword_hints": ["NonExistentClass"], "path_hints": [], "doc_scope_hints": [], "symbol_candidates": ["NonExistentClass"], "symbol_kind_hint": "class", "anchors": [{"type": "SYMBOL", "value": "NonExistentClass", "source": "user_text", "subtype": null, "span": {"start": 14, "end": 30}, "confidence": 0.88}, {"type": "KEY_TERM", "value": "класс", "source": "user_text", "subtype": null, "span": {"start": 8, "end": 13}, "confidence": 0.9}]}, "retrieval_spec": {"domains": ["CODE"], "layer_queries": [{"layer_id": "C1_SYMBOL_CATALOG", "top_k": 8}, {"layer_id": "C0_SOURCE_CHUNKS", "top_k": 8}, {"layer_id": "C4_SEMANTIC_ROLES", "top_k": 8}, {"layer_id": "C2_DEPENDENCY_GRAPH", "top_k": 6}, {"layer_id": "C3_ENTRYPOINTS", "top_k": 6}], "filters": {"test_policy": "EXCLUDE", "path_scope": [], "language": ["python"]}, "rerank_profile": "code"}, "retrieval_constraints": {"include_globs": ["src/**"], "exclude_globs": ["tests/**", "**/test_*.py", "**/*_test.py"], "prefer_globs": [], "test_file_globs": [], "test_symbol_patterns": [], "max_candidates": 20, "fuzzy_symbol_search": {"enabled": true, "max_distance": 2, "top_k": 5}}, "symbol_resolution": {"status": "pending", "resolved_symbol": null, "alternatives": ["NonExistentClass"], "confidence": 0.0}, "evidence_policy": {"require_def": true, "require_flow": true, "require_spec": false, "allow_answer_without_evidence": false}} +intent router v2 request: turn=1 active_intent=None user_query=Где тесты для OrderService? languages=['python'] domains=['CODE', 'DOCS'] +intent router v2 result: {"schema_version": "1.1", "intent": "CODE_QA", "retrieval_profile": "code", "graph_id": "CodeQAGraph", "conversation_mode": "START", "query_plan": {"raw": "Где тесты для OrderService?", "normalized": "Где тесты для OrderService?", "sub_intent": "FIND_TESTS", "negations": [], "expansions": ["test", "unit test", "OrderService"], "keyword_hints": ["OrderService"], "path_hints": [], "doc_scope_hints": [], "symbol_candidates": ["OrderService"], "symbol_kind_hint": "class", "anchors": [{"type": "SYMBOL", "value": "OrderService", "source": "user_text", "subtype": null, "span": {"start": 14, "end": 26}, "confidence": 0.88}, {"type": "KEY_TERM", "value": "тест", "source": "user_text", "subtype": null, "span": {"start": 4, "end": 9}, "confidence": 0.9}]}, "retrieval_spec": {"domains": ["CODE"], "layer_queries": [{"layer_id": "C1_SYMBOL_CATALOG", "top_k": 8}, {"layer_id": "C2_DEPENDENCY_GRAPH", "top_k": 6}, {"layer_id": "C0_SOURCE_CHUNKS", "top_k": 10}], "filters": {"test_policy": "INCLUDE", "path_scope": [], "language": ["python"]}, "rerank_profile": "code"}, "retrieval_constraints": {"include_globs": ["src/**", "tests/**", "**/test_*.py", "**/*_test.py", "**/conftest.py"], "exclude_globs": [], "prefer_globs": ["tests/**", "**/test_*.py", "**/*_test.py"], "test_file_globs": ["tests/**", "**/test_*.py", "**/*_test.py", "**/conftest.py"], "test_symbol_patterns": ["test_order_service", "TestOrderService", "OrderService"], "max_candidates": 20, "fuzzy_symbol_search": {"enabled": true, "max_distance": 2, "top_k": 5}}, "symbol_resolution": {"status": "pending", "resolved_symbol": null, "alternatives": ["OrderService"], "confidence": 0.0}, "evidence_policy": {"require_def": true, "require_flow": true, "require_spec": false, "allow_answer_without_evidence": false}} +intent router v2 request: turn=1 active_intent=None user_query=Найди тесты для Order languages=['python'] domains=['CODE', 'DOCS'] +intent router v2 result: {"schema_version": "1.1", "intent": "CODE_QA", "retrieval_profile": "code", "graph_id": "CodeQAGraph", "conversation_mode": "START", "query_plan": {"raw": "Найди тесты для Order", "normalized": "Найди тесты для Order", "sub_intent": "FIND_TESTS", "negations": [], "expansions": ["test", "unit test", "Order"], "keyword_hints": ["Order"], "path_hints": [], "doc_scope_hints": [], "symbol_candidates": ["Order"], "symbol_kind_hint": "class", "anchors": [{"type": "SYMBOL", "value": "Order", "source": "user_text", "subtype": null, "span": {"start": 16, "end": 21}, "confidence": 0.88}, {"type": "KEY_TERM", "value": "тест", "source": "user_text", "subtype": null, "span": {"start": 6, "end": 11}, "confidence": 0.9}]}, "retrieval_spec": {"domains": ["CODE"], "layer_queries": [{"layer_id": "C1_SYMBOL_CATALOG", "top_k": 8}, {"layer_id": "C2_DEPENDENCY_GRAPH", "top_k": 6}, {"layer_id": "C0_SOURCE_CHUNKS", "top_k": 10}], "filters": {"test_policy": "INCLUDE", "path_scope": [], "language": ["python"]}, "rerank_profile": "code"}, "retrieval_constraints": {"include_globs": ["src/**", "tests/**", "**/test_*.py", "**/*_test.py", "**/conftest.py"], "exclude_globs": [], "prefer_globs": ["tests/**", "**/test_*.py", "**/*_test.py"], "test_file_globs": ["tests/**", "**/test_*.py", "**/*_test.py", "**/conftest.py"], "test_symbol_patterns": ["test_order", "TestOrder", "Order"], "max_candidates": 20, "fuzzy_symbol_search": {"enabled": true, "max_distance": 2, "top_k": 5}}, "symbol_resolution": {"status": "pending", "resolved_symbol": null, "alternatives": ["Order"], "confidence": 0.0}, "evidence_policy": {"require_def": true, "require_flow": true, "require_spec": false, "allow_answer_without_evidence": false}} +intent router v2 request: turn=1 active_intent=None user_query=Есть ли тесты на репозиторий? languages=['python'] domains=['CODE', 'DOCS'] +intent router v2 result: {"schema_version": "1.1", "intent": "CODE_QA", "retrieval_profile": "code", "graph_id": "CodeQAGraph", "conversation_mode": "START", "query_plan": {"raw": "Есть ли тесты на репозиторий?", "normalized": "Есть ли тесты на репозиторий?", "sub_intent": "FIND_TESTS", "negations": [], "expansions": ["test", "unit test"], "keyword_hints": [], "path_hints": [], "doc_scope_hints": [], "symbol_candidates": [], "symbol_kind_hint": "unknown", "anchors": [{"type": "KEY_TERM", "value": "тест", "source": "user_text", "subtype": null, "span": {"start": 8, "end": 13}, "confidence": 0.9}]}, "retrieval_spec": {"domains": ["CODE"], "layer_queries": [{"layer_id": "C1_SYMBOL_CATALOG", "top_k": 8}, {"layer_id": "C2_DEPENDENCY_GRAPH", "top_k": 6}, {"layer_id": "C0_SOURCE_CHUNKS", "top_k": 10}], "filters": {"test_policy": "INCLUDE", "path_scope": [], "language": ["python"]}, "rerank_profile": "code"}, "retrieval_constraints": {"include_globs": ["src/**", "tests/**", "**/test_*.py", "**/*_test.py", "**/conftest.py"], "exclude_globs": [], "prefer_globs": ["tests/**", "**/test_*.py", "**/*_test.py"], "test_file_globs": ["tests/**", "**/test_*.py", "**/*_test.py", "**/conftest.py"], "test_symbol_patterns": [], "max_candidates": 20, "fuzzy_symbol_search": {"enabled": true, "max_distance": 2, "top_k": 5}}, "symbol_resolution": {"status": "not_requested", "resolved_symbol": null, "alternatives": [], "confidence": 0.0}, "evidence_policy": {"require_def": true, "require_flow": true, "require_spec": false, "allow_answer_without_evidence": false}} +intent router v2 request: turn=1 active_intent=None user_query=Где тесты для NonExistent? languages=['python'] domains=['CODE', 'DOCS'] +intent router v2 result: {"schema_version": "1.1", "intent": "CODE_QA", "retrieval_profile": "code", "graph_id": "CodeQAGraph", "conversation_mode": "START", "query_plan": {"raw": "Где тесты для NonExistent?", "normalized": "Где тесты для NonExistent?", "sub_intent": "FIND_TESTS", "negations": [], "expansions": ["test", "unit test", "NonExistent"], "keyword_hints": ["NonExistent"], "path_hints": [], "doc_scope_hints": [], "symbol_candidates": ["NonExistent"], "symbol_kind_hint": "class", "anchors": [{"type": "SYMBOL", "value": "NonExistent", "source": "user_text", "subtype": null, "span": {"start": 14, "end": 25}, "confidence": 0.88}, {"type": "KEY_TERM", "value": "тест", "source": "user_text", "subtype": null, "span": {"start": 4, "end": 9}, "confidence": 0.9}]}, "retrieval_spec": {"domains": ["CODE"], "layer_queries": [{"layer_id": "C1_SYMBOL_CATALOG", "top_k": 8}, {"layer_id": "C2_DEPENDENCY_GRAPH", "top_k": 6}, {"layer_id": "C0_SOURCE_CHUNKS", "top_k": 10}], "filters": {"test_policy": "INCLUDE", "path_scope": [], "language": ["python"]}, "rerank_profile": "code"}, "retrieval_constraints": {"include_globs": ["src/**", "tests/**", "**/test_*.py", "**/*_test.py", "**/conftest.py"], "exclude_globs": [], "prefer_globs": ["tests/**", "**/test_*.py", "**/*_test.py"], "test_file_globs": ["tests/**", "**/test_*.py", "**/*_test.py", "**/conftest.py"], "test_symbol_patterns": ["test_non_existent", "TestNonExistent", "NonExistent"], "max_candidates": 20, "fuzzy_symbol_search": {"enabled": true, "max_distance": 2, "top_k": 5}}, "symbol_resolution": {"status": "pending", "resolved_symbol": null, "alternatives": ["NonExistent"], "confidence": 0.0}, "evidence_policy": {"require_def": true, "require_flow": true, "require_spec": false, "allow_answer_without_evidence": false}} +intent router v2 request: turn=1 active_intent=None user_query=Какие точки входа в приложение? languages=['python'] domains=['CODE', 'DOCS'] +intent router v2 result: {"schema_version": "1.1", "intent": "PROJECT_MISC", "retrieval_profile": "code", "graph_id": "ProjectMiscGraph", "conversation_mode": "START", "query_plan": {"raw": "Какие точки входа в приложение?", "normalized": "Какие точки входа в приложение?", "sub_intent": "FIND_ENTRYPOINTS", "negations": [], "expansions": [], "keyword_hints": [], "path_hints": [], "doc_scope_hints": [], "symbol_candidates": [], "symbol_kind_hint": "unknown", "anchors": []}, "retrieval_spec": {"domains": ["CODE", "DOCS"], "layer_queries": [{"layer_id": "D1_MODULE_CATALOG", "top_k": 4}, {"layer_id": "D3_SECTION_INDEX", "top_k": 6}, {"layer_id": "C1_SYMBOL_CATALOG", "top_k": 4}, {"layer_id": "C0_SOURCE_CHUNKS", "top_k": 4}], "filters": {"test_policy": "EXCLUDE", "path_scope": [], "language": ["python"], "doc_kinds": [], "doc_language": []}, "rerank_profile": "project"}, "retrieval_constraints": {"include_globs": ["src/**"], "exclude_globs": ["tests/**", "**/test_*.py", "**/*_test.py"], "prefer_globs": [], "test_file_globs": [], "test_symbol_patterns": [], "max_candidates": 20, "fuzzy_symbol_search": {"enabled": true, "max_distance": 2, "top_k": 5}}, "symbol_resolution": {"status": "not_requested", "resolved_symbol": null, "alternatives": [], "confidence": 0.0}, "evidence_policy": {"require_def": false, "require_flow": false, "require_spec": false, "allow_answer_without_evidence": true}} +intent router v2 request: turn=1 active_intent=None user_query=Find application entrypoints languages=['python'] domains=['CODE', 'DOCS'] +intent router v2 result: {"schema_version": "1.1", "intent": "CODE_QA", "retrieval_profile": "code", "graph_id": "CodeQAGraph", "conversation_mode": "START", "query_plan": {"raw": "Find application entrypoints", "normalized": "Find application entrypoints", "sub_intent": "FIND_ENTRYPOINTS", "negations": [], "expansions": ["Find", "application", "entrypoints"], "keyword_hints": ["Find", "application", "entrypoints"], "path_hints": [], "doc_scope_hints": [], "symbol_candidates": ["Find", "application", "entrypoints"], "symbol_kind_hint": "class", "anchors": [{"type": "SYMBOL", "value": "Find", "source": "user_text", "subtype": null, "span": {"start": 0, "end": 4}, "confidence": 0.88}, {"type": "SYMBOL", "value": "application", "source": "user_text", "subtype": null, "span": {"start": 5, "end": 16}, "confidence": 0.88}, {"type": "SYMBOL", "value": "entrypoints", "source": "user_text", "subtype": null, "span": {"start": 17, "end": 28}, "confidence": 0.88}]}, "retrieval_spec": {"domains": ["CODE"], "layer_queries": [{"layer_id": "C3_ENTRYPOINTS", "top_k": 12}, {"layer_id": "C0_SOURCE_CHUNKS", "top_k": 6}], "filters": {"test_policy": "EXCLUDE", "path_scope": [], "language": ["python"]}, "rerank_profile": "code"}, "retrieval_constraints": {"include_globs": ["src/**"], "exclude_globs": ["tests/**", "**/test_*.py", "**/*_test.py"], "prefer_globs": [], "test_file_globs": [], "test_symbol_patterns": [], "max_candidates": 20, "fuzzy_symbol_search": {"enabled": true, "max_distance": 2, "top_k": 5}}, "symbol_resolution": {"status": "pending", "resolved_symbol": null, "alternatives": ["Find", "application", "entrypoints"], "confidence": 0.0}, "evidence_policy": {"require_def": true, "require_flow": true, "require_spec": false, "allow_answer_without_evidence": false}} +intent router v2 request: turn=1 active_intent=None user_query=Где main? languages=['python'] domains=['CODE', 'DOCS'] +intent router v2 result: {"schema_version": "1.1", "intent": "PROJECT_MISC", "retrieval_profile": "code", "graph_id": "ProjectMiscGraph", "conversation_mode": "START", "query_plan": {"raw": "Где main?", "normalized": "Где main?", "sub_intent": "FIND_ENTRYPOINTS", "negations": [], "expansions": ["main"], "keyword_hints": ["main"], "path_hints": [], "doc_scope_hints": [], "symbol_candidates": ["main"], "symbol_kind_hint": "unknown", "anchors": [{"type": "SYMBOL", "value": "main", "source": "user_text", "subtype": null, "span": {"start": 4, "end": 8}, "confidence": 0.88}]}, "retrieval_spec": {"domains": ["CODE", "DOCS"], "layer_queries": [{"layer_id": "D1_MODULE_CATALOG", "top_k": 4}, {"layer_id": "D3_SECTION_INDEX", "top_k": 6}, {"layer_id": "C1_SYMBOL_CATALOG", "top_k": 4}, {"layer_id": "C0_SOURCE_CHUNKS", "top_k": 4}], "filters": {"test_policy": "EXCLUDE", "path_scope": [], "language": ["python"], "doc_kinds": [], "doc_language": []}, "rerank_profile": "project"}, "retrieval_constraints": {"include_globs": ["src/**"], "exclude_globs": ["tests/**", "**/test_*.py", "**/*_test.py"], "prefer_globs": [], "test_file_globs": [], "test_symbol_patterns": [], "max_candidates": 20, "fuzzy_symbol_search": {"enabled": true, "max_distance": 2, "top_k": 5}}, "symbol_resolution": {"status": "pending", "resolved_symbol": null, "alternatives": ["main"], "confidence": 0.0}, "evidence_policy": {"require_def": false, "require_flow": false, "require_spec": false, "allow_answer_without_evidence": true}} +intent router v2 request: turn=1 active_intent=None user_query=Что делает этот проект? languages=['python'] domains=['CODE', 'DOCS'] +intent router v2 result: {"schema_version": "1.1", "intent": "PROJECT_MISC", "retrieval_profile": "code", "graph_id": "ProjectMiscGraph", "conversation_mode": "START", "query_plan": {"raw": "Что делает этот проект?", "normalized": "Что делает этот проект?", "sub_intent": "EXPLAIN", "negations": [], "expansions": [], "keyword_hints": [], "path_hints": [], "doc_scope_hints": [], "symbol_candidates": [], "symbol_kind_hint": "unknown", "anchors": []}, "retrieval_spec": {"domains": ["CODE", "DOCS"], "layer_queries": [{"layer_id": "D1_MODULE_CATALOG", "top_k": 4}, {"layer_id": "D3_SECTION_INDEX", "top_k": 6}, {"layer_id": "C1_SYMBOL_CATALOG", "top_k": 4}, {"layer_id": "C0_SOURCE_CHUNKS", "top_k": 4}], "filters": {"test_policy": "EXCLUDE", "path_scope": [], "language": ["python"], "doc_kinds": [], "doc_language": []}, "rerank_profile": "project"}, "retrieval_constraints": {"include_globs": ["src/**"], "exclude_globs": ["tests/**", "**/test_*.py", "**/*_test.py"], "prefer_globs": [], "test_file_globs": [], "test_symbol_patterns": [], "max_candidates": 20, "fuzzy_symbol_search": {"enabled": true, "max_distance": 2, "top_k": 5}}, "symbol_resolution": {"status": "not_requested", "resolved_symbol": null, "alternatives": [], "confidence": 0.0}, "evidence_policy": {"require_def": false, "require_flow": false, "require_spec": false, "allow_answer_without_evidence": true}} +intent router v2 request: turn=1 active_intent=None user_query=How does order creation work? languages=['python'] domains=['CODE', 'DOCS'] +intent router v2 result: {"schema_version": "1.1", "intent": "CODE_QA", "retrieval_profile": "code", "graph_id": "CodeQAGraph", "conversation_mode": "START", "query_plan": {"raw": "How does order creation work?", "normalized": "How does order creation work?", "sub_intent": "ARCHITECTURE", "negations": [], "expansions": ["How", "does", "order", "creation", "work"], "keyword_hints": ["How", "does", "order", "creation", "work"], "path_hints": [], "doc_scope_hints": [], "symbol_candidates": ["How", "does", "order", "creation", "work"], "symbol_kind_hint": "class", "anchors": [{"type": "SYMBOL", "value": "How", "source": "user_text", "subtype": null, "span": {"start": 0, "end": 3}, "confidence": 0.88}, {"type": "SYMBOL", "value": "does", "source": "user_text", "subtype": null, "span": {"start": 4, "end": 8}, "confidence": 0.88}, {"type": "SYMBOL", "value": "order", "source": "user_text", "subtype": null, "span": {"start": 9, "end": 14}, "confidence": 0.88}, {"type": "SYMBOL", "value": "creation", "source": "user_text", "subtype": null, "span": {"start": 15, "end": 23}, "confidence": 0.88}, {"type": "SYMBOL", "value": "work", "source": "user_text", "subtype": null, "span": {"start": 24, "end": 28}, "confidence": 0.88}]}, "retrieval_spec": {"domains": ["CODE"], "layer_queries": [{"layer_id": "C4_SEMANTIC_ROLES", "top_k": 12}, {"layer_id": "C3_ENTRYPOINTS", "top_k": 8}, {"layer_id": "C2_DEPENDENCY_GRAPH", "top_k": 8}, {"layer_id": "C1_SYMBOL_CATALOG", "top_k": 6}, {"layer_id": "C0_SOURCE_CHUNKS", "top_k": 4}], "filters": {"test_policy": "EXCLUDE", "path_scope": [], "language": ["python"]}, "rerank_profile": "code"}, "retrieval_constraints": {"include_globs": ["src/**"], "exclude_globs": ["tests/**", "**/test_*.py", "**/*_test.py"], "prefer_globs": [], "test_file_globs": [], "test_symbol_patterns": [], "max_candidates": 20, "fuzzy_symbol_search": {"enabled": true, "max_distance": 2, "top_k": 5}}, "symbol_resolution": {"status": "pending", "resolved_symbol": null, "alternatives": ["How", "does", "order", "creation", "work"], "confidence": 0.0}, "evidence_policy": {"require_def": true, "require_flow": true, "require_spec": false, "allow_answer_without_evidence": false}} +intent router v2 request: turn=1 active_intent=None user_query=Расскажи про код languages=['python'] domains=['CODE', 'DOCS'] +intent router v2 result: {"schema_version": "1.1", "intent": "CODE_QA", "retrieval_profile": "code", "graph_id": "CodeQAGraph", "conversation_mode": "START", "query_plan": {"raw": "Расскажи про код", "normalized": "Расскажи про код", "sub_intent": "EXPLAIN", "negations": [], "expansions": [], "keyword_hints": [], "path_hints": [], "doc_scope_hints": [], "symbol_candidates": [], "symbol_kind_hint": "unknown", "anchors": []}, "retrieval_spec": {"domains": ["CODE"], "layer_queries": [{"layer_id": "C1_SYMBOL_CATALOG", "top_k": 8}, {"layer_id": "C0_SOURCE_CHUNKS", "top_k": 8}, {"layer_id": "C4_SEMANTIC_ROLES", "top_k": 8}, {"layer_id": "C2_DEPENDENCY_GRAPH", "top_k": 6}, {"layer_id": "C3_ENTRYPOINTS", "top_k": 6}], "filters": {"test_policy": "EXCLUDE", "path_scope": [], "language": ["python"]}, "rerank_profile": "code"}, "retrieval_constraints": {"include_globs": ["src/**"], "exclude_globs": ["tests/**", "**/test_*.py", "**/*_test.py"], "prefer_globs": [], "test_file_globs": [], "test_symbol_patterns": [], "max_candidates": 20, "fuzzy_symbol_search": {"enabled": true, "max_distance": 2, "top_k": 5}}, "symbol_resolution": {"status": "not_requested", "resolved_symbol": null, "alternatives": [], "confidence": 0.0}, "evidence_policy": {"require_def": true, "require_flow": true, "require_spec": false, "allow_answer_without_evidence": false}} + +8/18 cases passed. Summary: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/summary_20260311_233942.md + FAIL open_file_borderline: sub_intent: expected OPEN_FILE, got FIND_ENTRYPOINTS + FAIL open_file_negative: answer_mode: expected degraded, got insufficient + FAIL explain_borderline: intent: expected CODE_QA, got PROJECT_MISC + FAIL explain_negative: answer_mode: expected degraded, got normal + FAIL find_tests_negative: answer_mode: expected degraded, got normal + FAIL find_entrypoints_positive: intent: expected CODE_QA, got PROJECT_MISC; answer_mode: expected normal, got degraded + FAIL find_entrypoints_borderline: intent: expected CODE_QA, got PROJECT_MISC; answer_mode: expected normal, got degraded + FAIL general_qa_positive: intent: expected CODE_QA, got PROJECT_MISC; sub_intent: expected GENERAL_QA, got EXPLAIN + FAIL general_qa_how: sub_intent: expected GENERAL_QA, got ARCHITECTURE + FAIL general_qa_borderline: sub_intent: expected GENERAL_QA, got EXPLAIN diff --git a/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/summary_20260311_232925.md b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/summary_20260311_232925.md new file mode 100644 index 0000000..5a31ae5 --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/summary_20260311_232925.md @@ -0,0 +1,36 @@ +# CODE_QA evaluation summary + +**8/18** cases passed. + +| Case ID | Query | Expected scenario | Actual scenario | Target | Evidence | Answer mode | Pass | +|---------|-------|------------------|-----------------|--------|----------|-------------|------| +| open_file_main_positive | Открой файл main.py | OPEN_FILE | OPEN_FILE | main.py | ✓ | normal | ✓ | +| open_file_api_positive | Покажи src/order_app/api/orders.py | OPEN_FILE | OPEN_FILE | src/order_app/api/orders.py | ✓ | normal | ✓ | +| open_file_borderline | Open main | OPEN_FILE | FIND_ENTRYPOINTS | src/order_app/api/orders.py | ✓ | normal | ✗ | +| open_file_negative | Открой файл nonexistent/foo.py | OPEN_FILE | OPEN_FILE | — | ✗ | insufficient | ✗ | +| explain_order_positive | Объясни класс Order | EXPLAIN | EXPLAIN | Order | ✓ | normal | ✓ | +| explain_order_service_positive | Как работает OrderService? | EXPLAIN | EXPLAIN | OrderService | ✓ | normal | ✓ | +| explain_borderline | Что делает create_order? | EXPLAIN | EXPLAIN | src/order_app/api/orders.py | ✓ | normal | ✗ | +| explain_negative | Объясни класс NonExistentClass | EXPLAIN | EXPLAIN | src/order_app/api/__init__.py | ✓ | normal | ✗ | +| find_tests_positive | Где тесты для OrderService? | FIND_TESTS | FIND_TESTS | tests/test_order_service.py | ✓ | normal | ✓ | +| find_tests_order_positive | Найди тесты для Order | FIND_TESTS | FIND_TESTS | tests/test_order_service.py | ✓ | normal | ✓ | +| find_tests_borderline | Есть ли тесты на репозиторий? | FIND_TESTS | FIND_TESTS | tests/test_order_service.py | ✓ | normal | ✓ | +| find_tests_negative | Где тесты для NonExistent? | FIND_TESTS | FIND_TESTS | tests/test_order_service.py | ✓ | normal | ✗ | +| find_entrypoints_positive | Какие точки входа в приложение? | FIND_ENTRYPOINTS | FIND_ENTRYPOINTS | src/order_app/api/orders.py | ✗ | degraded | ✗ | +| find_entrypoints_english | Find application entrypoints | FIND_ENTRYPOINTS | FIND_ENTRYPOINTS | src/order_app/api/orders.py | ✓ | normal | ✓ | +| find_entrypoints_borderline | Где main? | FIND_ENTRYPOINTS | FIND_ENTRYPOINTS | src/order_app/domain/order.py | ✗ | degraded | ✗ | +| general_qa_positive | Что делает этот проект? | GENERAL_QA | EXPLAIN | src/order_app/api/orders.py | ✓ | normal | ✗ | +| general_qa_how | How does order creation work? | GENERAL_QA | ARCHITECTURE | Order | ✓ | normal | ✗ | +| general_qa_borderline | Расскажи про код | GENERAL_QA | EXPLAIN | src/order_app/api/orders.py | ✓ | normal | ✗ | + +## Failures +- **open_file_borderline**: sub_intent: expected OPEN_FILE, got FIND_ENTRYPOINTS +- **open_file_negative**: answer_mode: expected degraded, got insufficient +- **explain_borderline**: intent: expected CODE_QA, got PROJECT_MISC +- **explain_negative**: answer_mode: expected degraded, got normal +- **find_tests_negative**: answer_mode: expected degraded, got normal +- **find_entrypoints_positive**: intent: expected CODE_QA, got PROJECT_MISC; answer_mode: expected normal, got degraded +- **find_entrypoints_borderline**: intent: expected CODE_QA, got PROJECT_MISC; answer_mode: expected normal, got degraded +- **general_qa_positive**: intent: expected CODE_QA, got PROJECT_MISC; sub_intent: expected GENERAL_QA, got EXPLAIN +- **general_qa_how**: sub_intent: expected GENERAL_QA, got ARCHITECTURE +- **general_qa_borderline**: sub_intent: expected GENERAL_QA, got EXPLAIN \ No newline at end of file diff --git a/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/summary_20260311_233701.md b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/summary_20260311_233701.md new file mode 100644 index 0000000..9a002a5 --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/summary_20260311_233701.md @@ -0,0 +1,40 @@ +# CODE_QA evaluation summary + +**8/18** cases passed. + + +| Case ID | Query | Expected scenario | Actual scenario | Target | Evidence | Answer mode | Pass | +| ------------------------------ | ---------------------------------- | ----------------- | ---------------- | ----------------------------- | -------- | ------------ | ---- | +| open_file_main_positive | Открой файл main.py | OPEN_FILE | OPEN_FILE | main.py | ✓ | normal | ✓ | +| open_file_api_positive | Покажи src/order_app/api/orders.py | OPEN_FILE | OPEN_FILE | src/order_app/api/orders.py | ✓ | normal | ✓ | +| open_file_borderline | Open main | OPEN_FILE | FIND_ENTRYPOINTS | src/order_app/api/orders.py | ✓ | normal | ✗ | +| open_file_negative | Открой файл nonexistent/foo.py | OPEN_FILE | OPEN_FILE | — | ✗ | insufficient | ✗ | +| explain_order_positive | Объясни класс Order | EXPLAIN | EXPLAIN | Order | ✓ | normal | ✓ | +| explain_order_service_positive | Как работает OrderService? | EXPLAIN | EXPLAIN | OrderService | ✓ | normal | ✓ | +| explain_borderline | Что делает create_order? | EXPLAIN | EXPLAIN | src/order_app/api/orders.py | ✓ | normal | ✗ | +| explain_negative | Объясни класс NonExistentClass | EXPLAIN | EXPLAIN | src/order_app/domain/order.py | ✓ | normal | ✗ | +| find_tests_positive | Где тесты для OrderService? | FIND_TESTS | FIND_TESTS | tests/test_order_service.py | ✓ | normal | ✓ | +| find_tests_order_positive | Найди тесты для Order | FIND_TESTS | FIND_TESTS | tests/test_order_service.py | ✓ | normal | ✓ | +| find_tests_borderline | Есть ли тесты на репозиторий? | FIND_TESTS | FIND_TESTS | tests/test_order_service.py | ✓ | normal | ✓ | +| find_tests_negative | Где тесты для NonExistent? | FIND_TESTS | FIND_TESTS | tests/test_order_service.py | ✓ | normal | ✗ | +| find_entrypoints_positive | Какие точки входа в приложение? | FIND_ENTRYPOINTS | FIND_ENTRYPOINTS | src/order_app/api/**init**.py | ✗ | degraded | ✗ | +| find_entrypoints_english | Find application entrypoints | FIND_ENTRYPOINTS | FIND_ENTRYPOINTS | src/order_app/api/orders.py | ✓ | normal | ✓ | +| find_entrypoints_borderline | Где main? | FIND_ENTRYPOINTS | FIND_ENTRYPOINTS | src/order_app/domain/order.py | ✗ | degraded | ✗ | +| general_qa_positive | Что делает этот проект? | GENERAL_QA | EXPLAIN | src/order_app/api/**init**.py | ✓ | normal | ✗ | +| general_qa_how | How does order creation work? | GENERAL_QA | ARCHITECTURE | Order | ✓ | normal | ✗ | +| general_qa_borderline | Расскажи про код | GENERAL_QA | EXPLAIN | src/order_app/api/**init**.py | ✓ | normal | ✗ | + + +## Failures + +- **open_file_borderline**: sub_intent: expected OPEN_FILE, got FIND_ENTRYPOINTS +- **open_file_negative**: answer_mode: expected degraded, got insufficient +- **explain_borderline**: intent: expected CODE_QA, got PROJECT_MISC +- **explain_negative**: answer_mode: expected degraded, got normal +- **find_tests_negative**: answer_mode: expected degraded, got normal +- **find_entrypoints_positive**: intent: expected CODE_QA, got PROJECT_MISC; answer_mode: expected normal, got degraded +- **find_entrypoints_borderline**: intent: expected CODE_QA, got PROJECT_MISC; answer_mode: expected normal, got degraded +- **general_qa_positive**: intent: expected CODE_QA, got PROJECT_MISC; sub_intent: expected GENERAL_QA, got EXPLAIN +- **general_qa_how**: sub_intent: expected GENERAL_QA, got ARCHITECTURE +- **general_qa_borderline**: sub_intent: expected GENERAL_QA, got EXPLAIN + diff --git a/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/summary_20260311_233942.md b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/summary_20260311_233942.md new file mode 100644 index 0000000..9a002a5 --- /dev/null +++ b/tests/pipeline_setup/suite_01_synthetic/test_results/code_qa_eval/summary_20260311_233942.md @@ -0,0 +1,40 @@ +# CODE_QA evaluation summary + +**8/18** cases passed. + + +| Case ID | Query | Expected scenario | Actual scenario | Target | Evidence | Answer mode | Pass | +| ------------------------------ | ---------------------------------- | ----------------- | ---------------- | ----------------------------- | -------- | ------------ | ---- | +| open_file_main_positive | Открой файл main.py | OPEN_FILE | OPEN_FILE | main.py | ✓ | normal | ✓ | +| open_file_api_positive | Покажи src/order_app/api/orders.py | OPEN_FILE | OPEN_FILE | src/order_app/api/orders.py | ✓ | normal | ✓ | +| open_file_borderline | Open main | OPEN_FILE | FIND_ENTRYPOINTS | src/order_app/api/orders.py | ✓ | normal | ✗ | +| open_file_negative | Открой файл nonexistent/foo.py | OPEN_FILE | OPEN_FILE | — | ✗ | insufficient | ✗ | +| explain_order_positive | Объясни класс Order | EXPLAIN | EXPLAIN | Order | ✓ | normal | ✓ | +| explain_order_service_positive | Как работает OrderService? | EXPLAIN | EXPLAIN | OrderService | ✓ | normal | ✓ | +| explain_borderline | Что делает create_order? | EXPLAIN | EXPLAIN | src/order_app/api/orders.py | ✓ | normal | ✗ | +| explain_negative | Объясни класс NonExistentClass | EXPLAIN | EXPLAIN | src/order_app/domain/order.py | ✓ | normal | ✗ | +| find_tests_positive | Где тесты для OrderService? | FIND_TESTS | FIND_TESTS | tests/test_order_service.py | ✓ | normal | ✓ | +| find_tests_order_positive | Найди тесты для Order | FIND_TESTS | FIND_TESTS | tests/test_order_service.py | ✓ | normal | ✓ | +| find_tests_borderline | Есть ли тесты на репозиторий? | FIND_TESTS | FIND_TESTS | tests/test_order_service.py | ✓ | normal | ✓ | +| find_tests_negative | Где тесты для NonExistent? | FIND_TESTS | FIND_TESTS | tests/test_order_service.py | ✓ | normal | ✗ | +| find_entrypoints_positive | Какие точки входа в приложение? | FIND_ENTRYPOINTS | FIND_ENTRYPOINTS | src/order_app/api/**init**.py | ✗ | degraded | ✗ | +| find_entrypoints_english | Find application entrypoints | FIND_ENTRYPOINTS | FIND_ENTRYPOINTS | src/order_app/api/orders.py | ✓ | normal | ✓ | +| find_entrypoints_borderline | Где main? | FIND_ENTRYPOINTS | FIND_ENTRYPOINTS | src/order_app/domain/order.py | ✗ | degraded | ✗ | +| general_qa_positive | Что делает этот проект? | GENERAL_QA | EXPLAIN | src/order_app/api/**init**.py | ✓ | normal | ✗ | +| general_qa_how | How does order creation work? | GENERAL_QA | ARCHITECTURE | Order | ✓ | normal | ✗ | +| general_qa_borderline | Расскажи про код | GENERAL_QA | EXPLAIN | src/order_app/api/**init**.py | ✓ | normal | ✗ | + + +## Failures + +- **open_file_borderline**: sub_intent: expected OPEN_FILE, got FIND_ENTRYPOINTS +- **open_file_negative**: answer_mode: expected degraded, got insufficient +- **explain_borderline**: intent: expected CODE_QA, got PROJECT_MISC +- **explain_negative**: answer_mode: expected degraded, got normal +- **find_tests_negative**: answer_mode: expected degraded, got normal +- **find_entrypoints_positive**: intent: expected CODE_QA, got PROJECT_MISC; answer_mode: expected normal, got degraded +- **find_entrypoints_borderline**: intent: expected CODE_QA, got PROJECT_MISC; answer_mode: expected normal, got degraded +- **general_qa_positive**: intent: expected CODE_QA, got PROJECT_MISC; sub_intent: expected GENERAL_QA, got EXPLAIN +- **general_qa_how**: sub_intent: expected GENERAL_QA, got ARCHITECTURE +- **general_qa_borderline**: sub_intent: expected GENERAL_QA, got EXPLAIN + diff --git a/tests/pipeline_setup/suite_02_pipeline/README.md b/tests/pipeline_setup/suite_02_pipeline/README.md new file mode 100644 index 0000000..0d78889 --- /dev/null +++ b/tests/pipeline_setup/suite_02_pipeline/README.md @@ -0,0 +1,108 @@ +# Suite 02 Pipeline + +Интеграционный набор тестов для режимов: + +- `router_only` +- `router_rag` +- `full_chain` + +## Что входит в suite + +- `pipeline_intent_rag/` — тесты, fixtures и runtime пайплайна +- `cli/` — запускные скрипты для индексации и ручного прогона пайплайна + +## Запуск тестов через pytest + +Из корня проекта: + +```bash +PYTHONPATH=. pytest tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/test_intent_router_only_matrix.py -q +``` + +Для retrieval-режима: + +```bash +PYTHONPATH=. RUN_INTENT_PIPELINE_ROUTER_RAG=1 pytest -m router_rag tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/ -q +``` + +Для полной цепочки: + +```bash +PYTHONPATH=. RUN_INTENT_PIPELINE_FULL_CHAIN=1 pytest -m full_chain tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/ -q +``` + +## Запуск через CLI + +### 1. Индексация репозитория + +```bash +PYTHONPATH=. python -m tests.pipeline_setup.suite_02_pipeline.cli.index_repo --repo-path /abs/path/to/repo [--project-id ID] +``` + +Параметры: + +- `--repo-path` — путь к индексируемому репозиторию +- `--project-id` — `project_id` для новой RAG-сессии + +### 2. Router only + +```bash +PYTHONPATH=. python -m tests.pipeline_setup.suite_02_pipeline.cli.run_router_only [--case-id ID ...] [--verbose] [--test-name PREFIX] +``` + +Параметры: + +- `--case-id` — запуск только выбранных кейсов, можно передавать несколько раз +- `--verbose` — печатать полную диагностику +- `--test-name` — префикс имени артефакта + +### 3. Router + RAG + +```bash +PYTHONPATH=. python -m tests.pipeline_setup.suite_02_pipeline.cli.run_router_rag --rag-session-id [--case-id ID ...] [--verbose] [--test-name PREFIX] +``` + +или с переиндексацией: + +```bash +PYTHONPATH=. python -m tests.pipeline_setup.suite_02_pipeline.cli.run_router_rag --reindex-repo-path /abs/path/to/repo [--reindex-project-id ID] [--case-id ID ...] [--verbose] +``` + +Параметры: + +- `--rag-session-id` — готовый `rag_session_id` для всех кейсов +- `--reindex-repo-path` — путь к репозиторию, который нужно проиндексировать перед прогоном +- `--reindex-project-id` — `project_id` для новой RAG-сессии +- `--case-id` — запуск только выбранных кейсов +- `--verbose` — печатать расширенную диагностику +- `--test-name` — префикс имени артефакта + +### 4. Full chain + +```bash +PYTHONPATH=. python -m tests.pipeline_setup.suite_02_pipeline.cli.run_full_chain --rag-session-id [--case-id ID ...] [--verbose] [--test-name PREFIX] +``` + +или с переиндексацией: + +```bash +PYTHONPATH=. python -m tests.pipeline_setup.suite_02_pipeline.cli.run_full_chain --reindex-repo-path /abs/path/to/repo [--reindex-project-id ID] [--case-id ID ...] [--verbose] +``` + +Параметры те же, что и у `run_router_rag`. + +## Переменные окружения + +- `RUN_INTENT_PIPELINE_ROUTER_RAG=1` — включает тесты и прогоны `router_rag` +- `RUN_INTENT_PIPELINE_FULL_CHAIN=1` — включает тесты и прогоны `full_chain` +- `DATABASE_URL` — обязателен для retrieval и full chain +- `INTENT_PIPELINE_FORCE_RAG_SESSION_ID` — принудительный `rag_session_id` для всех кейсов +- `INTENT_PIPELINE_RAG_SESSION_ID` — дефолтный `rag_session_id` +- `INTENT_PIPELINE_REINDEX_REPO_PATH` — путь к репозиторию для автоиндексации +- `INTENT_PIPELINE_REINDEX_PROJECT_ID` — `project_id` для автоиндексации + +Артефакты прогонов пишутся в: +[test_results](/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup/test_results) + +Детали по внутреннему устройству пайплайна: +[pipeline_intent_rag/README.md](/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/README.md) diff --git a/tests/pipeline_setup/suite_02_pipeline/__init__.py b/tests/pipeline_setup/suite_02_pipeline/__init__.py new file mode 100644 index 0000000..00568c8 --- /dev/null +++ b/tests/pipeline_setup/suite_02_pipeline/__init__.py @@ -0,0 +1 @@ +"""Pipeline integration suites for router_only, router_rag, and full_chain.""" diff --git a/tests/pipeline_setup/suite_02_pipeline/cli/__init__.py b/tests/pipeline_setup/suite_02_pipeline/cli/__init__.py new file mode 100644 index 0000000..4531c61 --- /dev/null +++ b/tests/pipeline_setup/suite_02_pipeline/cli/__init__.py @@ -0,0 +1 @@ +"""CLI entrypoints for pipeline test runs and repository reindexing.""" diff --git a/tests/pipeline_setup/suite_02_pipeline/cli/index_repo.py b/tests/pipeline_setup/suite_02_pipeline/cli/index_repo.py new file mode 100644 index 0000000..5d0d71f --- /dev/null +++ b/tests/pipeline_setup/suite_02_pipeline/cli/index_repo.py @@ -0,0 +1,36 @@ +"""Скрипт индексации репозитория: создаёт RAG-сессию и индексирует указанную директорию. + +Используется для подготовки репозитория перед запуском тестовых пайплайнов с retrieval или full_chain. +Запуск из корня проекта (agent): + + python -m tests.pipeline_setup.suite_02_pipeline.cli.index_repo --repo-path /path/to/repo [--project-id ID] + +Параметры: + --repo-path (обязательный) Путь к корню индексируемого репозитория. + --project-id (опционально) Идентификатор проекта для созданной rag_session; по умолчанию — имя директории репо. +""" + +from __future__ import annotations + +import sys +from pathlib import Path + +# Обеспечиваем импорт из корня проекта +_agent_root = Path(__file__).resolve().parents[4] +if str(_agent_root) not in sys.path: + sys.path.insert(0, str(_agent_root)) + +# Добавляем src в путь для app +_src = _agent_root / "src" +if _src.exists() and str(_src) not in sys.path: + sys.path.insert(0, str(_src)) + + +def main() -> int: + argv = ["reindex", *sys.argv[1:]] + from tests.pipeline_setup.suite_02_pipeline.pipeline_intent_rag.cli import main as cli_main + return cli_main(argv) + + +if __name__ == "__main__": + raise SystemExit(main()) diff --git a/tests/pipeline_setup/suite_02_pipeline/cli/run_full_chain.py b/tests/pipeline_setup/suite_02_pipeline/cli/run_full_chain.py new file mode 100644 index 0000000..962cdd1 --- /dev/null +++ b/tests/pipeline_setup/suite_02_pipeline/cli/run_full_chain.py @@ -0,0 +1,46 @@ +"""Запуск тестового пайплайна «полная цепочка»: intent router + retrieval + LLM. + +Цепочка: intent_router_v2 → RAG retrieval → ответ GigaChat (или другой LLM). Нужны БД и индексированный репозиторий. + +Запуск из корня проекта (agent): + + python -m tests.pipeline_setup.suite_02_pipeline.cli.run_full_chain --rag-session-id [--case-id ID ...] [--verbose] + + Или с индексацией перед прогоном: + python -m tests.pipeline_setup.suite_02_pipeline.cli.run_full_chain --reindex-repo-path /path/to/repo [--reindex-project-id ID] + +Параметры: + --rag-session-id (рекомендуется) UUID RAG-сессии (после индексации через index_repo или run с --reindex-repo-path). + --reindex-repo-path Индексировать указанный репозиторий перед прогоном и использовать новую сессию. + --reindex-project-id project_id для новой сессии при использовании --reindex-repo-path. + --case-id (повторяемый) Запустить только указанные кейсы. + --verbose Выводить диагностику по каждому кейсу. + --test-name Префикс имени файла с результатами (по умолчанию cli_full_chain). + +Переменные окружения: + RUN_INTENT_PIPELINE_FULL_CHAIN=1 — включить маркер full_chain (иначе тесты с этим маркером пропускаются). + DATABASE_URL — подключение к БД (обязательно для retrieval). + (и переменные для доступа к LLM, см. .env и pipeline_intent_rag/.env.test) +""" + +from __future__ import annotations + +import sys +from pathlib import Path + +_agent_root = Path(__file__).resolve().parents[4] +if str(_agent_root) not in sys.path: + sys.path.insert(0, str(_agent_root)) +_src = _agent_root / "src" +if _src.exists() and str(_src) not in sys.path: + sys.path.insert(0, str(_src)) + + +def main() -> int: + argv = ["run", "--mode", "full_chain", *sys.argv[1:]] + from tests.pipeline_setup.suite_02_pipeline.pipeline_intent_rag.cli import main as cli_main + return cli_main(argv) + + +if __name__ == "__main__": + raise SystemExit(main()) diff --git a/tests/pipeline_setup/suite_02_pipeline/cli/run_router_only.py b/tests/pipeline_setup/suite_02_pipeline/cli/run_router_only.py new file mode 100644 index 0000000..c24db42 --- /dev/null +++ b/tests/pipeline_setup/suite_02_pipeline/cli/run_router_only.py @@ -0,0 +1,35 @@ +"""Запуск тестового пайплайна «только intent router» (без RAG и LLM). + +Цепочка: intent_router_v2 — классификация запроса, без retrieval и ответа LLM. + +Запуск из корня проекта (agent): + + python -m tests.pipeline_setup.suite_02_pipeline.cli.run_router_only [--case-id ID ...] [--verbose] + +Параметры: + --case-id (повторяемый) Запустить только указанные кейсы по id. Без указания — все кейсы с тегом router_only. + --verbose Выводить диагностику по каждому кейсу. + --test-name Префикс имени файла с результатами (по умолчанию cli_router_only). +""" + +from __future__ import annotations + +import sys +from pathlib import Path + +_agent_root = Path(__file__).resolve().parents[4] +if str(_agent_root) not in sys.path: + sys.path.insert(0, str(_agent_root)) +_src = _agent_root / "src" +if _src.exists() and str(_src) not in sys.path: + sys.path.insert(0, str(_src)) + + +def main() -> int: + argv = ["run", "--mode", "router_only", *sys.argv[1:]] + from tests.pipeline_setup.suite_02_pipeline.pipeline_intent_rag.cli import main as cli_main + return cli_main(argv) + + +if __name__ == "__main__": + raise SystemExit(main()) diff --git a/tests/pipeline_setup/suite_02_pipeline/cli/run_router_rag.py b/tests/pipeline_setup/suite_02_pipeline/cli/run_router_rag.py new file mode 100644 index 0000000..4141807 --- /dev/null +++ b/tests/pipeline_setup/suite_02_pipeline/cli/run_router_rag.py @@ -0,0 +1,45 @@ +"""Запуск тестового пайплайна «intent router + retrieval» (без LLM). + +Цепочка: intent_router_v2 → RAG retrieval. Нужна предварительная индексация репозитория. + +Запуск из корня проекта (agent): + + python -m tests.pipeline_setup.suite_02_pipeline.cli.run_router_rag --rag-session-id [--case-id ID ...] [--verbose] + + Или с индексацией перед прогоном: + python -m tests.pipeline_setup.suite_02_pipeline.cli.run_router_rag --reindex-repo-path /path/to/repo [--reindex-project-id ID] + +Параметры: + --rag-session-id (рекомендуется) UUID RAG-сессии (после индексации через index_repo или run с --reindex-repo-path). + --reindex-repo-path Индексировать указанный репозиторий перед прогоном и использовать новую сессию. + --reindex-project-id project_id для новой сессии при использовании --reindex-repo-path. + --case-id (повторяемый) Запустить только указанные кейсы. + --verbose Выводить диагностику по каждому кейсу. + --test-name Префикс имени файла с результатами (по умолчанию cli_router_rag). + +Переменные окружения: + RUN_INTENT_PIPELINE_ROUTER_RAG=1 — включить маркер router_rag (иначе тесты с этим маркером пропускаются). + DATABASE_URL — подключение к БД (обязательно для retrieval). +""" + +from __future__ import annotations + +import sys +from pathlib import Path + +_agent_root = Path(__file__).resolve().parents[4] +if str(_agent_root) not in sys.path: + sys.path.insert(0, str(_agent_root)) +_src = _agent_root / "src" +if _src.exists() and str(_src) not in sys.path: + sys.path.insert(0, str(_src)) + + +def main() -> int: + argv = ["run", "--mode", "router_rag", *sys.argv[1:]] + from tests.pipeline_setup.suite_02_pipeline.pipeline_intent_rag.cli import main as cli_main + return cli_main(argv) + + +if __name__ == "__main__": + raise SystemExit(main()) diff --git a/tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/.env.test b/tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/.env.test new file mode 100644 index 0000000..348bd15 --- /dev/null +++ b/tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/.env.test @@ -0,0 +1,12 @@ +# Test-only environment for pipeline_intent_rag suite +# Override this file locally when using another database. +DATABASE_URL=postgresql+psycopg://agent:agent@localhost:5432/agent +GIGACHAT_SSL_VERIFY=false + +# Optional defaults for integration runs: +# RUN_INTENT_PIPELINE_ROUTER_RAG=1 +# RUN_INTENT_PIPELINE_FULL_CHAIN=1 +# INTENT_PIPELINE_RAG_SESSION_ID= +# INTENT_PIPELINE_FORCE_RAG_SESSION_ID= +# INTENT_PIPELINE_REINDEX_REPO_PATH=/absolute/path/to/repo +# INTENT_PIPELINE_REINDEX_PROJECT_ID=my-project diff --git a/tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/.env.test.example b/tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/.env.test.example new file mode 100644 index 0000000..2aba1e9 --- /dev/null +++ b/tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/.env.test.example @@ -0,0 +1,12 @@ +# Test-only environment for pipeline_intent_rag suite +# Override this file locally when using another database. +DATABASE_URL=postgresql+psycopg://agent:agent@db:5432/agent +GIGACHAT_SSL_VERIFY=false + +# Optional defaults for integration runs: +# RUN_INTENT_PIPELINE_ROUTER_RAG=1 +# RUN_INTENT_PIPELINE_FULL_CHAIN=1 +# INTENT_PIPELINE_RAG_SESSION_ID= +# INTENT_PIPELINE_FORCE_RAG_SESSION_ID= +# INTENT_PIPELINE_REINDEX_REPO_PATH=/absolute/path/to/repo +# INTENT_PIPELINE_REINDEX_PROJECT_ID=my-project diff --git a/tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/README.md b/tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/README.md new file mode 100644 index 0000000..159cd85 --- /dev/null +++ b/tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/README.md @@ -0,0 +1,82 @@ +# Intent Pipeline Test Module + +## Что тестируется + +- `router_only`: только `intent_router_v2`. +- `router_rag`: `intent_router_v2 -> RAG retrieval`. +- `full_chain`: `intent_router_v2 -> RAG -> GigaChat`. + +## Каталог фраз + +Фразы лежат в [fixtures/phrases.yaml](/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/fixtures/phrases.yaml). + +Поля кейса: + +- `id` — уникальный ID. +- `text` — запрос пользователя. +- `tags` — в каких режимах кейс участвует (`router_only`, `router_rag`, `full_chain`). +- `expected_intent` — опциональная проверка intent. +- `expect_non_empty_rag` — ожидание непустого RAG-контекста. +- `rag_session_id` — опционально; можно не указывать, если задан через env. + +## Env для тестов + +Сначала загружается `[.env.test](/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/.env.test)`, затем workspace `.env`. + +Ключи: + +- `DATABASE_URL` — подключение к тестовой БД. +- `RUN_INTENT_PIPELINE_ROUTER_RAG=1` — включить `router_rag`. +- `RUN_INTENT_PIPELINE_FULL_CHAIN=1` — включить `full_chain`. +- `INTENT_PIPELINE_FORCE_RAG_SESSION_ID` — принудительный `rag_session_id` для всех кейсов. +- `INTENT_PIPELINE_RAG_SESSION_ID` — дефолтный `rag_session_id` для кейсов. +- `INTENT_PIPELINE_REINDEX_REPO_PATH` — путь к репозиторию для новой индексации. +- `INTENT_PIPELINE_REINDEX_PROJECT_ID` — `project_id` для новой сессии (опционально). + +Если указан `INTENT_PIPELINE_REINDEX_REPO_PATH`, раннер создаёт новую `rag_session`, индексирует репозиторий и использует этот `rag_session_id` для retrieval. + +## Артефакты + +Каждый прогон пишет JSONL в `tests/pipeline_setup/test_results`. +Формат имени: + +- `_.jsonl` + +Примеры: + +- `test_intent_router_only_matrix_20260305_183010.jsonl` +- `test_intent_router_rag_pipeline_20260305_183045.jsonl` + +## Запуск + +- `pytest tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/test_intent_router_only_matrix.py -q` +- `RUN_INTENT_PIPELINE_ROUTER_RAG=1 pytest -m router_rag tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/test_intent_router_rag_pipeline.py -q` +- `RUN_INTENT_PIPELINE_FULL_CHAIN=1 pytest -m full_chain tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/test_intent_router_rag_llm_pipeline.py -q` + +## CLI + +Запуск без `pytest`: + +- `python3 -m tests.pipeline_setup.suite_02_pipeline.pipeline_intent_rag run --mode router_only` +- `python3 -m tests.pipeline_setup.suite_02_pipeline.pipeline_intent_rag run --mode router_rag --rag-session-id ` +- `python3 -m tests.pipeline_setup.suite_02_pipeline.pipeline_intent_rag run --mode full_chain --rag-session-id ` + +Переиндексация репозитория в новую `rag_session`: + +- `python3 -m tests.pipeline_setup.suite_02_pipeline.pipeline_intent_rag reindex --repo-path /abs/path/to/repo` +- опционально: `--project-id my-project` + +Команда печатает итог: + +- `rag_session_id=` + +Далее этот `rag_session_id` можно передать в тестовый прогон: + +- `python3 -m tests.pipeline_setup.suite_02_pipeline.pipeline_intent_rag run --mode router_rag --rag-session-id ` + +Полезные опции: + +- `--case-id ` (можно повторять) +- `--reindex-repo-path /abs/path/to/repo` +- `--reindex-project-id ` +- `--test-name ` diff --git a/tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/__init__.py b/tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/__init__.py new file mode 100644 index 0000000..16b5dfe --- /dev/null +++ b/tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/__init__.py @@ -0,0 +1 @@ +# Isolated integration pipeline tests for intent-router -> RAG -> LLM roll-out. diff --git a/tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/__main__.py b/tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/__main__.py new file mode 100644 index 0000000..15ed436 --- /dev/null +++ b/tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/__main__.py @@ -0,0 +1,5 @@ +from tests.pipeline_setup.suite_02_pipeline.pipeline_intent_rag.cli import main + + +if __name__ == "__main__": + raise SystemExit(main()) diff --git a/tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/cli.py b/tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/cli.py new file mode 100644 index 0000000..8c0dce6 --- /dev/null +++ b/tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/cli.py @@ -0,0 +1,241 @@ +from __future__ import annotations + +import argparse +import os +import sys +from dataclasses import dataclass +from pathlib import Path +from typing import Literal + +from tests.pipeline_setup.suite_02_pipeline.pipeline_intent_rag.helpers.env_bootstrap import PipelineEnvLoader +from tests.pipeline_setup.suite_02_pipeline.pipeline_intent_rag.helpers.models import PhraseCase, PipelineResult +from tests.pipeline_setup.suite_02_pipeline.pipeline_intent_rag.helpers.runtime import PipelineRuntime + +_VALID_MODES = ("router_only", "router_rag", "full_chain") + + +@dataclass(slots=True, frozen=True) +class RunCliArgs: + mode: str + case_ids: tuple[str, ...] + rag_session_id: str | None + reindex_repo_path: str | None + reindex_project_id: str | None + test_name: str + verbose: bool + + +@dataclass(slots=True, frozen=True) +class ReindexCliArgs: + repo_path: str + project_id: str | None + + +@dataclass(slots=True, frozen=True) +class ParsedCliArgs: + command: Literal["run", "reindex"] + payload: RunCliArgs | ReindexCliArgs + + +class PipelineCliRunner: + def __init__(self, args: RunCliArgs, test_root: Path) -> None: + self._args = args + self._test_root = test_root + + def run(self) -> int: + self._apply_overrides() + runtime = PipelineRuntime(mode=self._args.mode, test_name=self._args.test_name, test_root=self._test_root) + cases = self._filter_cases(runtime.load_cases()) + if not cases: + print("No cases selected") + return 2 + + failed = 0 + executed = 0 + for case in cases: + executed += 1 + try: + result = self._run_case(runtime, case) + except Exception as exc: + failed += 1 + print(f"[FAIL] {case.case_id}: {exc}") + continue + try: + self._validate_case(result) + self._print_result(result, status="OK", reason=None, force_diagnostics=self._args.verbose) + except Exception as exc: + failed += 1 + self._print_result(result, status="FAIL", reason=str(exc), force_diagnostics=True) + + print("-") + print(f"Mode: {self._args.mode}") + print(f"Executed: {executed}") + print(f"Failed: {failed}") + print(f"Artifact: {runtime.artifact_path}") + return 0 if failed == 0 else 1 + + def _apply_overrides(self) -> None: + if self._args.rag_session_id: + os.environ["INTENT_PIPELINE_FORCE_RAG_SESSION_ID"] = self._args.rag_session_id + if self._args.reindex_repo_path: + os.environ["INTENT_PIPELINE_REINDEX_REPO_PATH"] = self._args.reindex_repo_path + if self._args.reindex_project_id: + os.environ["INTENT_PIPELINE_REINDEX_PROJECT_ID"] = self._args.reindex_project_id + + def _filter_cases(self, cases: list[PhraseCase]) -> list[PhraseCase]: + if not self._args.case_ids: + return cases + wanted = set(self._args.case_ids) + return [case for case in cases if case.case_id in wanted] + + def _run_case(self, runtime: PipelineRuntime, case: PhraseCase) -> PipelineResult: + if self._args.mode == "router_only": + return runtime.run_router_only(case) + if self._args.mode == "router_rag": + return runtime.run_router_rag(case) + return runtime.run_full_chain(case) + + def _validate_case(self, result: PipelineResult) -> None: + case = result.case + if case.expected_intent and result.intent != case.expected_intent: + raise AssertionError(f"expected_intent={case.expected_intent} actual={result.intent}") + if self._args.mode in {"router_rag", "full_chain"} and case.expect_non_empty_rag and not result.rag_rows: + raise AssertionError(f"RAG returned empty list for rag_session_id={result.rag_session_id}") + if self._args.mode == "full_chain" and not (result.llm_answer or "").strip(): + raise AssertionError("LLM answer must not be empty") + + def _print_result( + self, + result: PipelineResult, + *, + status: str, + reason: str | None, + force_diagnostics: bool, + ) -> None: + record = result.to_record() + if status != "OK": + print(f"status: {status}") + print(f"case_id: {record['case_id']}") + print(f"expected_intent: {record['expected_intent']}") + print(f"actual_intent: {record['actual_intent']}") + print("summary:") + self._print_block(record.get("summary"), indent=2) + if force_diagnostics: + if reason: + print(f"failure_reason: {reason}") + print("diagnostics:") + self._print_block(record.get("diagnostics"), indent=2) + print("-") + + def _print_block(self, value, *, indent: int) -> None: + prefix = " " * indent + if isinstance(value, dict): + for key, item in value.items(): + if isinstance(item, (dict, list)): + print(f"{prefix}{key}:") + self._print_block(item, indent=indent + 2) + else: + print(f"{prefix}{key}: {item}") + return + if isinstance(value, list): + for item in value: + if isinstance(item, dict): + print(f"{prefix}-") + self._print_block(item, indent=indent + 2) + else: + print(f"{prefix}- {item}") + return + print(f"{prefix}{value}") + + +class ReindexCliRunner: + def __init__(self, args: ReindexCliArgs, test_root: Path) -> None: + self._args = args + self._test_root = test_root + + def run(self) -> int: + try: + PipelineEnvLoader(self._test_root).load() + repo_path = Path(self._args.repo_path).expanduser().resolve() + if not repo_path.is_dir(): + print(f"[FAIL] repository path is not a directory: {repo_path}") + return 2 + from app.modules.rag.persistence.repository import RagRepository + from tests.pipeline_setup.utils.rag_indexer import RagSessionIndexer + + RagSessionIndexer(RagRepository()).index_repo(repo_path, project_id=self._args.project_id) + return 0 + except Exception as exc: + print(f"[FAIL] reindex error: {exc}") + return 1 + + +def _build_parser() -> argparse.ArgumentParser: + parser = argparse.ArgumentParser(description="Run intent-router pipeline CLI") + sub = parser.add_subparsers(dest="command") + + run_cmd = sub.add_parser("run", help="Run test pipeline") + run_cmd.add_argument("--mode", choices=_VALID_MODES, required=True, help="Execution mode") + run_cmd.add_argument("--case-id", action="append", default=[], help="Case id to run (repeatable)") + run_cmd.add_argument("--rag-session-id", default=None, help="Force rag_session_id for all cases") + run_cmd.add_argument("--reindex-repo-path", default=None, help="Path to local repository for reindex before retrieval") + run_cmd.add_argument("--reindex-project-id", default=None, help="project_id for newly indexed rag_session") + run_cmd.add_argument("--test-name", default=None, help="Artifact prefix (defaults to cli_)") + run_cmd.add_argument( + "--verbose", + "--debug", + dest="verbose", + action="store_true", + help="Print diagnostics for every case", + ) + + reindex_cmd = sub.add_parser("reindex", help="Create a new RAG session by indexing local repository") + reindex_cmd.add_argument("--repo-path", required=True, help="Path to local repository directory") + reindex_cmd.add_argument("--project-id", default=None, help="Project id for created rag_session") + + return parser + + +def _parse_args(argv: list[str] | None = None) -> ParsedCliArgs: + parser = _build_parser() + raw = list(sys.argv[1:] if argv is None else argv) + if raw and raw[0] not in {"run", "reindex"} and raw[0] not in {"-h", "--help"}: + raw = ["run", *raw] + ns = parser.parse_args(raw) + command = str(getattr(ns, "command", "") or "") + if command == "run": + mode = str(ns.mode) + test_name = (ns.test_name or f"cli_{mode}").strip() or f"cli_{mode}" + payload = RunCliArgs( + mode=mode, + case_ids=tuple(str(item).strip() for item in ns.case_id if str(item).strip()), + rag_session_id=str(ns.rag_session_id).strip() or None if ns.rag_session_id is not None else None, + reindex_repo_path=str(ns.reindex_repo_path).strip() or None if ns.reindex_repo_path is not None else None, + reindex_project_id=str(ns.reindex_project_id).strip() or None if ns.reindex_project_id is not None else None, + test_name=test_name, + verbose=bool(getattr(ns, "verbose", False)), + ) + return ParsedCliArgs(command="run", payload=payload) + if command == "reindex": + payload = ReindexCliArgs( + repo_path=str(ns.repo_path).strip(), + project_id=str(ns.project_id).strip() or None if ns.project_id is not None else None, + ) + return ParsedCliArgs(command="reindex", payload=payload) + parser.error("command is required: run or reindex") + + +def main(argv: list[str] | None = None) -> int: + try: + args = _parse_args(argv) + test_root = Path(__file__).resolve().parent + if args.command == "run": + return PipelineCliRunner(args=args.payload, test_root=test_root).run() + return ReindexCliRunner(args=args.payload, test_root=test_root).run() + except KeyboardInterrupt: + print("Interrupted") + return 130 + + +if __name__ == "__main__": + raise SystemExit(main(sys.argv[1:])) diff --git a/tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/fixtures/phrases.yaml b/tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/fixtures/phrases.yaml new file mode 100644 index 0000000..b358c59 --- /dev/null +++ b/tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/fixtures/phrases.yaml @@ -0,0 +1,70 @@ +phrases: + - id: code-open-context-file + text: "Открой файл src/mail_order_bot/context.py" + rag_session_id: "849fc2c9-e17c-4034-b3b5-2e13d535bb94" + expected_intent: "CODE_QA" + expect_non_empty_rag: true + tags: ["router_only", "router_rag", "full_chain"] + + - id: code-explain-context-class + text: "Объясни как работает класс Context" + rag_session_id: "849fc2c9-e17c-4034-b3b5-2e13d535bb94" + expected_intent: "CODE_QA" + expect_non_empty_rag: true + tags: ["router_only", "router_rag", "full_chain"] + + - id: code-explain-excel-parser + text: "Объясни класс ExcelFileParcer" + rag_session_id: "849fc2c9-e17c-4034-b3b5-2e13d535bb94" + expected_intent: "CODE_QA" + expect_non_empty_rag: true + tags: ["router_only", "router_rag", "full_chain"] + + - id: code-find-tests-for-context + text: "Где тесты для Context?" + rag_session_id: "849fc2c9-e17c-4034-b3b5-2e13d535bb94" + expected_intent: "CODE_QA" + expect_non_empty_rag: true + tags: ["router_only", "router_rag", "full_chain"] + + - id: code-exclude-tests-context + text: "Не про тесты, а про прод код Context" + rag_session_id: "849fc2c9-e17c-4034-b3b5-2e13d535bb94" + expected_intent: "CODE_QA" + expect_non_empty_rag: true + tags: ["router_only", "router_rag", "full_chain"] + + - id: code-open-abstract-task + text: "Покажи файл src/mail_order_bot/task_processor/abstract_task.py" + rag_session_id: "849fc2c9-e17c-4034-b3b5-2e13d535bb94" + expected_intent: "CODE_QA" + expect_non_empty_rag: true + tags: ["router_only", "router_rag"] + + - id: code-explain-handle-errors + text: "Теперь объясни функцию handle_errors" + rag_session_id: "849fc2c9-e17c-4034-b3b5-2e13d535bb94" + expected_intent: "CODE_QA" + expect_non_empty_rag: true + tags: ["router_only", "router_rag", "full_chain"] + + - id: docs-about-readme-deploy + text: "Что сказано в README_DEPLOY.md?" + rag_session_id: "849fc2c9-e17c-4034-b3b5-2e13d535bb94" + expected_intent: "DOCS_QA" + expect_non_empty_rag: true + tags: ["router_only", "router_rag", "full_chain"] + + - id: docs-generic-question + text: "Что сказано в документации по деплою?" + rag_session_id: "849fc2c9-e17c-4034-b3b5-2e13d535bb94" + expected_intent: "DOCS_QA" + expect_non_empty_rag: true + tags: ["router_only", "router_rag", "full_chain"] + + - id: docs-open-readme-ref + text: "Что про это в docs и README?" + rag_session_id: "849fc2c9-e17c-4034-b3b5-2e13d535bb94" + expected_intent: "DOCS_QA" + expect_non_empty_rag: true + tags: ["router_only", "router_rag"] diff --git a/app/modules/rag_repo/__init__.py b/tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/helpers/__init__.py similarity index 100% rename from app/modules/rag_repo/__init__.py rename to tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/helpers/__init__.py diff --git a/tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/helpers/answer_policy.py b/tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/helpers/answer_policy.py new file mode 100644 index 0000000..ddf8fd3 --- /dev/null +++ b/tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/helpers/answer_policy.py @@ -0,0 +1,121 @@ +from __future__ import annotations + +from dataclasses import dataclass + +from tests.pipeline_setup.suite_02_pipeline.pipeline_intent_rag.helpers.models import PipelineResult + + +@dataclass(slots=True, frozen=True) +class AnswerPolicyDecision: + answer: str + answer_mode: str + failure_reason: str = "" + + +class FullChainAnswerPolicy: + def decide(self, result: PipelineResult) -> AnswerPolicyDecision | None: + sub_intent = _sub_intent(result) + if sub_intent == "OPEN_FILE": + return self._missing_file(result) + if sub_intent == "EXPLAIN": + return self._missing_symbol(result) + if sub_intent == "FIND_ENTRYPOINTS": + return self._confirmed_entrypoints(result) + return None + + def _missing_file(self, result: PipelineResult) -> AnswerPolicyDecision | None: + requested_path = _requested_path(result) + if not requested_path or _has_exact_file_match(result, requested_path): + return None + return AnswerPolicyDecision( + answer=f"Файл {requested_path} не найден.", + answer_mode="degraded", + failure_reason="file_not_found", + ) + + def _missing_symbol(self, result: PipelineResult) -> AnswerPolicyDecision | None: + symbol_resolution = dict(result.symbol_resolution or {}) + if str(symbol_resolution.get("status") or "").strip() != "not_found": + return None + symbol = _requested_symbol(result) + if not symbol: + return None + answer = f"Сущность {symbol} не найдена в доступном коде." + alternatives = [str(item).strip() for item in symbol_resolution.get("alternatives") or [] if str(item).strip()] + if alternatives: + answer = f"{answer} Близкие совпадения: {', '.join(alternatives[:3])}." + return AnswerPolicyDecision( + answer=answer, + answer_mode="degraded", + failure_reason="symbol_not_found", + ) + + def _confirmed_entrypoints(self, result: PipelineResult) -> AnswerPolicyDecision | None: + routes = _confirmed_routes(result) + if not routes: + return None + lines = [_render_route(route) for route in routes] + answer = "\n".join(f"- {line}" for line in lines) + if len(lines) == 1: + answer = lines[0] + return AnswerPolicyDecision(answer=answer, answer_mode="answered") + + +def _sub_intent(result: PipelineResult) -> str: + router_plan = dict(result.diagnostics.get("router_plan") or {}) + return str(router_plan.get("sub_intent") or "").strip().upper() + + +def _requested_path(result: PipelineResult) -> str: + router_plan = dict(result.diagnostics.get("router_plan") or {}) + path_scope = tuple(str(item).strip() for item in router_plan.get("path_scope") or [] if str(item).strip()) + return path_scope[0] if path_scope else "" + + +def _has_exact_file_match(result: PipelineResult, requested_path: str) -> bool: + requested = requested_path.strip().lower() + for row in result.rag_rows: + row_path = str(row.get("path") or "").strip().lower() + if row_path == requested: + return True + return False + + +def _requested_symbol(result: PipelineResult) -> str: + router_plan = dict(result.diagnostics.get("router_plan") or {}) + symbols = tuple(str(item).strip() for item in router_plan.get("symbol_candidates") or [] if str(item).strip()) + return symbols[0] if symbols else "" + + +def _confirmed_routes(result: PipelineResult) -> list[dict]: + seen: set[tuple[str, str]] = set() + items: list[dict] = [] + for row in result.rag_rows: + if str(row.get("layer") or "") != "C3_ENTRYPOINTS": + continue + metadata = dict(row.get("metadata") or {}) + method = str(metadata.get("http_method") or "").strip() + route_path = str(metadata.get("route_path") or "").strip() + if not method or not route_path: + continue + key = (method, route_path) + if key in seen: + continue + seen.add(key) + items.append(metadata) + return items + + +def _render_route(metadata: dict) -> str: + method = str(metadata.get("http_method") or "").strip() + route_path = str(metadata.get("route_path") or "").strip() + declaring = str(metadata.get("declaring_symbol") or "").strip() + handler = str(metadata.get("handler_symbol") or "").strip() + label = f"{method} {route_path}" + parts = [label] + if declaring: + parts.append(f"объявлен в {declaring}") + if handler: + handler_name = handler.rsplit(".", 1)[-1] + parts.append(f"обрабатывается {handler_name}") + return " — ".join((parts[0], ", ".join(parts[1:]))) if len(parts) > 1 else parts[0] diff --git a/tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/helpers/answer_quality.py b/tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/helpers/answer_quality.py new file mode 100644 index 0000000..587d7a2 --- /dev/null +++ b/tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/helpers/answer_quality.py @@ -0,0 +1,71 @@ +from __future__ import annotations + +import re + + +class AnswerQualityController: + _REPLACEMENTS = ( + ("различные аргументы", "аргументы"), + ("ряд аргументов", "аргументы"), + ("различных подпакетов", "подпакетов"), + ("основные службы", "службы"), + ("играет роль", "работает как"), + ("представляет собой", "это"), + ) + _DROP_PATTERNS = ( + r"(?i)ответ основан исключительно[^.]*\.", + r"(?i)нет явных неподтвержденных кандидатов\.?", + r"(?i)кандидаты[^.\n]*нет[^.\n]*\.?", + r"(?i)related tests[^.\n]*none[^.\n]*\.?", + r"(?i)indirect evidence[^.\n]*none[^.\n]*\.?", + ) + _NOT_FOUND_PATTERNS = ( + "не найден", + "не найдена", + "не найдены", + "не обнаружен", + "не обнаружена", + "не обнаружены", + ) + + def refine(self, text: str, *, sub_intent: str | None = None) -> str: + value = self._normalize_markdown(text) + value = self._drop_empty_sections(value) + value = self._replace_vague_phrases(value) + if self._should_trim_not_found(value, sub_intent=sub_intent): + value = self._trim_after_not_found(value) + return self._normalize_spacing(value) + + def _normalize_markdown(self, text: str) -> str: + value = str(text or "").strip() + value = re.sub(r"(?m)^\s{0,3}#{1,6}\s*", "", value) + return value.replace("**", "") + + def _drop_empty_sections(self, text: str) -> str: + value = text + for pattern in self._DROP_PATTERNS: + value = re.sub(pattern, "", value) + return value + + def _replace_vague_phrases(self, text: str) -> str: + value = text + for source, target in self._REPLACEMENTS: + value = re.sub(re.escape(source), target, value, flags=re.IGNORECASE) + return value + + def _should_trim_not_found(self, text: str, *, sub_intent: str | None) -> bool: + current = str(sub_intent or "").strip().upper() + if current not in {"EXPLAIN", "OPEN_FILE", "FIND_TESTS", "FIND_ENTRYPOINTS"}: + return False + lowered = text.lower() + return any(pattern in lowered for pattern in self._NOT_FOUND_PATTERNS) + + def _trim_after_not_found(self, text: str) -> str: + match = re.search(r"(?<=[.!?])\s+", text.strip()) + if not match: + return text.strip() + return text[: match.start()].strip() + + def _normalize_spacing(self, text: str) -> str: + value = re.sub(r"\n{3,}", "\n\n", text) + return re.sub(r"[ \t]{2,}", " ", value).strip() diff --git a/tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/helpers/artifact_writer.py b/tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/helpers/artifact_writer.py new file mode 100644 index 0000000..208a525 --- /dev/null +++ b/tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/helpers/artifact_writer.py @@ -0,0 +1,23 @@ +from __future__ import annotations + +import json +from datetime import datetime +from pathlib import Path + + +class ArtifactWriter: + def __init__(self, artifacts_dir: Path, test_name: str, run_started_at: datetime) -> None: + self._artifacts_dir = artifacts_dir + self._test_name = test_name + self._run_started_at = run_started_at + + @property + def path(self) -> Path: + stamp = self._run_started_at.strftime("%Y%m%d_%H%M%S") + name = f"{self._test_name}_{stamp}.jsonl" + return self._artifacts_dir / name + + def write_record(self, payload: dict) -> None: + self.path.parent.mkdir(parents=True, exist_ok=True) + with self.path.open("a", encoding="utf-8") as handle: + handle.write(json.dumps(payload, ensure_ascii=False) + "\n") diff --git a/tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/helpers/diagnostics.py b/tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/helpers/diagnostics.py new file mode 100644 index 0000000..5872aed --- /dev/null +++ b/tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/helpers/diagnostics.py @@ -0,0 +1,247 @@ +from __future__ import annotations + +import math +from copy import deepcopy +from typing import Any + +from app.modules.rag.retrieval.test_filter import is_test_path + + +def build_router_plan(route_result) -> dict[str, Any]: + query_plan = route_result.query_plan + retrieval_spec = route_result.retrieval_spec + constraints = route_result.retrieval_constraints + layers = [str(item.layer_id) for item in list(retrieval_spec.layer_queries or [])] + path_scope = list(getattr(retrieval_spec.filters, "path_scope", []) or []) + return { + "intent": route_result.intent, + "sub_intent": query_plan.sub_intent, + "graph_id": route_result.graph_id, + "retrieval_profile": route_result.retrieval_profile, + "conversation_mode": route_result.conversation_mode, + "layers": layers, + "symbol_kind_hint": query_plan.symbol_kind_hint, + "symbol_candidates": list(query_plan.symbol_candidates or []), + "keyword_hints": list(query_plan.keyword_hints or []), + "path_hints": list(query_plan.path_hints or []), + "path_scope": path_scope, + "doc_scope_hints": list(query_plan.doc_scope_hints or []), + "retrieval_constraints": { + "include_globs": list(constraints.include_globs or []), + "exclude_globs": list(constraints.exclude_globs or []), + "prefer_globs": list(constraints.prefer_globs or []), + "test_file_globs": list(constraints.test_file_globs or []), + "test_symbol_patterns": list(constraints.test_symbol_patterns or []), + "max_candidates": int(constraints.max_candidates), + "fuzzy_symbol_search": { + "enabled": bool(constraints.fuzzy_symbol_search.enabled), + "max_distance": int(constraints.fuzzy_symbol_search.max_distance), + "top_k": int(constraints.fuzzy_symbol_search.top_k), + }, + }, + } + + +def init_diagnostics(route_result, *, router_ms: int, include_retrieval: bool) -> dict[str, Any]: + diagnostics = { + "router_plan": build_router_plan(route_result), + "execution": { + "executed_layers": [], + "retrieval_mode_by_layer": {}, + "top_k_by_layer": {}, + "filters_by_layer": {}, + "repo_scope": {"repo_id": None, "workspace_id": None}, + }, + "retrieval": None, + "constraint_violations": [], + "timings_ms": { + "router": int(router_ms), + "symbol_resolution": 0, + "retrieval_total": 0, + "retrieval_by_layer": {}, + "merge_rank": 0, + "prompt_build": 0, + "llm_call": 0, + }, + "prompt": None, + } + if include_retrieval: + diagnostics["retrieval"] = { + "requests": [], + "applied": [], + "fallback": {"used": False, "reason": None}, + } + return diagnostics + + +def clone_diagnostics(diagnostics: dict[str, Any]) -> dict[str, Any]: + return deepcopy(diagnostics) + + +def apply_retrieval_report(diagnostics: dict[str, Any], report: dict[str, Any] | None) -> None: + if not report: + return + execution = diagnostics.get("execution", {}) + execution["executed_layers"] = list(report.get("executed_layers", []) or []) + execution["retrieval_mode_by_layer"] = dict(report.get("retrieval_mode_by_layer", {}) or {}) + execution["top_k_by_layer"] = dict(report.get("top_k_by_layer", {}) or {}) + execution["filters_by_layer"] = dict(report.get("filters_by_layer", {}) or {}) + retrieval = diagnostics.get("retrieval") + if isinstance(retrieval, dict): + retrieval["requests"] = list(report.get("requests", []) or []) + retrieval["applied"] = list(report.get("applied", []) or []) + retrieval["fallback"] = dict(report.get("fallback", {"used": False, "reason": None}) or {}) + timings = diagnostics.get("timings_ms", {}) + timings["retrieval_by_layer"] = dict(report.get("retrieval_by_layer_ms", {}) or {}) + + +def assign_repo_scope( + diagnostics: dict[str, Any], + rag_rows: list[dict[str, Any]], + *, + expected_repo_id: str | None = None, + expected_workspace_id: str | None = None, +) -> None: + repo_ids = sorted({str(_row_repo_id(row)).strip() for row in rag_rows if str(_row_repo_id(row)).strip()}) + workspace_ids = sorted({str(_row_workspace_id(row)).strip() for row in rag_rows if str(_row_workspace_id(row)).strip()}) + repo_id = expected_repo_id or (repo_ids[0] if len(repo_ids) == 1 else None) + workspace_id = expected_workspace_id or (workspace_ids[0] if len(workspace_ids) == 1 else None) + diagnostics["execution"]["repo_scope"] = { + "repo_id": repo_id, + "workspace_id": workspace_id, + "returned_repo_ids": repo_ids, + "returned_workspace_ids": workspace_ids, + } + + +def validate_constraints( + route_result, + rag_rows: list[dict[str, Any]], + symbol_resolution: dict[str, Any], + *, + expected_repo_id: str | None = None, +) -> list[dict[str, Any]]: + violations: list[dict[str, Any]] = [] + query_plan = route_result.query_plan + retrieval_spec = route_result.retrieval_spec + path_scope = list(getattr(retrieval_spec.filters, "path_scope", []) or []) + row_paths = {str(row.get("path") or "") for row in rag_rows} + if query_plan.sub_intent == "OPEN_FILE" and path_scope: + if not any(path in row_paths for path in path_scope): + violations.append( + _violation( + "PATH_SCOPE_NOT_SATISFIED", + "error", + {"path_scope": path_scope, "returned_paths": sorted(row_paths)}, + "Use exact path_scope retrieval and disable broad fallback for OPEN_FILE.", + ) + ) + requested_layers = [str(item.layer_id) for item in list(retrieval_spec.layer_queries or [])] + row_layers = {str(row.get("layer") or "") for row in rag_rows} + for layer in requested_layers: + if layer not in row_layers: + violations.append( + _violation( + "LAYER_MISSING", + "warn", + {"layer": layer, "requested_layers": requested_layers}, + "Increase top_k for this layer or relax constraints for retrieval.", + ) + ) + exclude_globs = list(route_result.retrieval_constraints.exclude_globs or []) + if _tests_excluded(exclude_globs): + test_paths = sorted({path for path in row_paths if is_test_path(path)}) + if test_paths: + violations.append( + _violation( + "TESTS_EXCLUSION_VIOLATED", + "warn", + {"exclude_globs": exclude_globs, "test_paths": test_paths}, + "Tighten test exclude globs and apply them at pre-rank filtering stage.", + ) + ) + if expected_repo_id: + mismatched = sorted( + { + repo_id + for repo_id in {str(_row_repo_id(row)).strip() for row in rag_rows if str(_row_repo_id(row)).strip()} + if repo_id != expected_repo_id + } + ) + if mismatched: + violations.append( + _violation( + "REPO_SCOPE_MISMATCH", + "error", + {"expected_repo_id": expected_repo_id, "returned_repo_ids": mismatched}, + "Use rag_session_id/repo scope that matches the expected repository.", + ) + ) + symbol_candidates = list(query_plan.symbol_candidates or []) + status = str(symbol_resolution.get("status") or "not_requested") + if query_plan.sub_intent == "EXPLAIN" and symbol_candidates and status != "resolved": + violations.append( + _violation( + "SYMBOL_RESOLUTION_FAILED", + "warn", + {"status": status, "symbol_candidates": symbol_candidates}, + "Increase symbol layer budget or improve fuzzy symbol resolution settings.", + ) + ) + return violations + + +def build_prompt_diagnostics( + *, + system_prompt: str, + user_prompt: str, + rag_rows: list[dict[str, Any]], + prompt_template_id: str | None = None, + system_prompt_version: str | None = None, +) -> dict[str, Any]: + evidence_chars = sum(len(str(row.get("content") or "")) for row in rag_rows) + tokens_in_estimate = max(1, int(math.ceil((len(system_prompt) + len(user_prompt)) / 4))) + per_layer: dict[str, dict[str, Any]] = {} + for row in rag_rows: + layer = str(row.get("layer") or "") + bucket = per_layer.setdefault(layer, {"layer": layer, "count": 0, "paths": set()}) + bucket["count"] += 1 + bucket["paths"].add(str(row.get("path") or "")) + evidence_summary = [ + {"layer": item["layer"], "count": item["count"], "unique_paths": len(item["paths"])} + for item in per_layer.values() + ] + return { + "prompt_stats": { + "tokens_in_estimate": tokens_in_estimate, + "evidence_rows": len(rag_rows), + "evidence_chars": evidence_chars, + }, + "evidence_summary": evidence_summary, + "prompt_template_id": prompt_template_id, + "system_prompt_version": system_prompt_version, + } + + +def _tests_excluded(exclude_globs: list[str]) -> bool: + tokens = ("tests", "test", "__tests__", "mocks", "fixtures", "stubs", "conftest") + return any(any(token in str(item).lower() for token in tokens) for item in exclude_globs) + + +def _violation(violation_type: str, severity: str, details: dict[str, Any], suggested_fix: str) -> dict[str, Any]: + return { + "type": violation_type, + "severity": severity, + "details": details, + "suggested_fix": suggested_fix, + } + + +def _row_repo_id(row: dict[str, Any]) -> str | None: + metadata = dict(row.get("metadata") or {}) + return metadata.get("repo_id") + + +def _row_workspace_id(row: dict[str, Any]) -> str | None: + metadata = dict(row.get("metadata") or {}) + return metadata.get("workspace_id") diff --git a/tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/helpers/env_bootstrap.py b/tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/helpers/env_bootstrap.py new file mode 100644 index 0000000..ef8aa8f --- /dev/null +++ b/tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/helpers/env_bootstrap.py @@ -0,0 +1,36 @@ +from __future__ import annotations + +import os +from pathlib import Path + +from tests.pipeline_setup.env_loader import load_pipeline_setup_env + + +class PipelineEnvLoader: + def __init__(self, test_root: Path) -> None: + self._test_root = test_root + + def load(self) -> list[Path]: + loaded: list[Path] = [] + test_env_path = self._test_root / ".env.test" + if test_env_path.is_file(): + self._apply_file(test_env_path) + loaded.append(test_env_path) + loaded.extend(load_pipeline_setup_env(start_dir=self._test_root)) + return loaded + + def _apply_file(self, 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 not name: + continue + os.environ[name] = self._normalize_value(raw_value.strip()) + + def _normalize_value(self, value: str) -> str: + if len(value) >= 2 and value[0] == value[-1] and value[0] in {"'", '"'}: + return value[1:-1] + return value diff --git a/tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/helpers/llm_answerer.py b/tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/helpers/llm_answerer.py new file mode 100644 index 0000000..beba760 --- /dev/null +++ b/tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/helpers/llm_answerer.py @@ -0,0 +1,64 @@ +from __future__ import annotations + +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 +from tests.pipeline_setup.suite_02_pipeline.pipeline_intent_rag.helpers.answer_quality import AnswerQualityController +from tests.pipeline_setup.suite_02_pipeline.pipeline_intent_rag.helpers.prompt_payload_builder import PromptPayloadBuilder + + +class GigaChatAnswerer: + _SYSTEM_PROMPT = "Ты технический ассистент по коду и документации." + _PROMPT_TEMPLATE_ID = "pipeline_intent_rag_v1" + _SYSTEM_PROMPT_VERSION = "v1" + _TASK_PROMPT = "Дай краткий, практичный ответ по контексту. Если данных мало, явно скажи об этом." + + def __init__(self) -> None: + settings = GigaChatSettings.from_env() + if not settings.credentials: + raise ValueError("GIGACHAT_TOKEN is required for full_chain mode") + self._client = GigaChatClient(settings, GigaChatTokenProvider(settings)) + self._payload_builder = PromptPayloadBuilder() + self._quality = AnswerQualityController() + + def answer( + self, + query: str, + rag_rows: list[dict], + *, + prompt_template: dict | None = None, + sub_intent: str | None = None, + ) -> str: + prompt_payload = self.build_prompt_payload( + query, + rag_rows, + prompt_template=prompt_template, + sub_intent=sub_intent, + ) + return self.answer_from_payload(prompt_payload) + + def build_prompt_payload( + self, + query: str, + rag_rows: list[dict], + *, + prompt_template: dict | None = None, + sub_intent: str | None = None, + ) -> dict: + return self._payload_builder.build( + query, + rag_rows, + prompt_template=prompt_template, + sub_intent=sub_intent, + default_system_prompt=self._SYSTEM_PROMPT, + default_task_prompt=self._TASK_PROMPT, + default_template_id=self._PROMPT_TEMPLATE_ID, + system_prompt_version=self._SYSTEM_PROMPT_VERSION, + ) + + def answer_from_payload(self, payload: dict) -> str: + answer = self._client.complete( + system_prompt=str(payload.get("system_prompt") or self._SYSTEM_PROMPT), + user_prompt=str(payload.get("user_prompt") or ""), + ) + return self._quality.refine(answer, sub_intent=str(payload.get("sub_intent") or "").strip() or None) diff --git a/tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/helpers/llm_prompt_loader.py b/tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/helpers/llm_prompt_loader.py new file mode 100644 index 0000000..75e25f3 --- /dev/null +++ b/tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/helpers/llm_prompt_loader.py @@ -0,0 +1,71 @@ +from __future__ import annotations + +from pathlib import Path + +import yaml + + +class LlmPromptCatalogLoader: + def load(self, path: Path) -> dict: + payload = yaml.safe_load(path.read_text(encoding="utf-8")) + if not isinstance(payload, dict): + raise ValueError(f"Invalid prompt catalog: expected mapping, got {type(payload).__name__}") + default = self._normalize_item("default", payload.get("default")) + intents_raw = payload.get("intents", {}) + if not isinstance(intents_raw, dict): + raise ValueError("Invalid prompt catalog: `intents` must be a mapping") + intents: dict[str, dict] = {} + for intent, item in intents_raw.items(): + intent_key = str(intent).strip() + if not intent_key: + continue + intents[intent_key] = self._normalize_intent(intent_key, item) + return {"default": default, "intents": intents} + + def select_for_intent(self, catalog: dict, intent: str) -> dict: + return self.select(catalog, intent=intent) + + def select(self, catalog: dict, *, intent: str, sub_intent: str | None = None) -> dict: + intents = dict(catalog.get("intents") or {}) + intent_entry = dict(intents.get(intent) or {}) + sub_intents = dict(intent_entry.get("sub_intents") or {}) + if sub_intent and sub_intent in sub_intents: + return dict(sub_intents[sub_intent]) + if intent_entry: + prompt = dict(intent_entry.get("prompt") or {}) + if prompt: + return prompt + return dict(catalog.get("default") or {}) + + def _normalize_intent(self, key: str, raw: object) -> dict: + if not isinstance(raw, dict): + raise ValueError(f"Invalid prompt catalog item `{key}`: expected object") + prompt = self._normalize_item(key, raw) + sub_intents_raw = raw.get("sub_intents", {}) + if sub_intents_raw is None: + sub_intents_raw = {} + if not isinstance(sub_intents_raw, dict): + raise ValueError(f"Invalid prompt catalog item `{key}`: `sub_intents` must be a mapping") + sub_intents: dict[str, dict] = {} + for sub_intent, item in sub_intents_raw.items(): + sub_key = str(sub_intent).strip() + if not sub_key: + continue + sub_intents[sub_key] = self._normalize_item(f"{key}.{sub_key}", item) + return {"prompt": prompt, "sub_intents": sub_intents} + + def _normalize_item(self, key: str, raw: object) -> dict: + if not isinstance(raw, dict): + raise ValueError(f"Invalid prompt catalog item `{key}`: expected object") + system_prompt = str(raw.get("system_prompt", "")).strip() + task_prompt = str(raw.get("task_prompt", "")).strip() + template_id = str(raw.get("template_id", "")).strip() or f"intent_{key.lower()}_v1" + if not system_prompt: + raise ValueError(f"Invalid prompt catalog item `{key}`: `system_prompt` is required") + if not task_prompt: + raise ValueError(f"Invalid prompt catalog item `{key}`: `task_prompt` is required") + return { + "template_id": template_id, + "system_prompt": system_prompt, + "task_prompt": task_prompt, + } diff --git a/tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/helpers/models.py b/tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/helpers/models.py new file mode 100644 index 0000000..f42cedc --- /dev/null +++ b/tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/helpers/models.py @@ -0,0 +1,126 @@ +from __future__ import annotations + +from dataclasses import dataclass, field +from datetime import datetime + +from tests.pipeline_setup.suite_02_pipeline.pipeline_intent_rag.helpers.result_views import PipelineDiagnosticsBuilder, PipelineSummaryBuilder + + +@dataclass(slots=True) +class PhraseCase: + case_id: str + text: str + rag_session_id: str | None = None + tags: list[str] = field(default_factory=list) + expected_intent: str | None = None + expect_non_empty_rag: bool = True + + +@dataclass(slots=True) +class PipelineResult: + case: PhraseCase + mode: str + run_started_at: datetime + rag_session_id: str | None + intent: str + graph_id: str + conversation_mode: str + query: str + symbol_resolution: dict + rag_rows: list[dict] = field(default_factory=list) + llm_answer: str | None = None + diagnostics: dict = field(default_factory=dict) + steps: list[dict] = field(default_factory=list) + + def to_record(self) -> dict: + diagnostics = PipelineDiagnosticsBuilder().build(self) + summary = PipelineSummaryBuilder().build(self, diagnostics) + steps = self.steps or self._default_steps(diagnostics) + return { + "case_id": self.case.case_id, + "text": self.case.text, + "mode": self.mode, + "run_started_at": self.run_started_at.isoformat(timespec="seconds"), + "rag_session_id": self.rag_session_id, + "expected_intent": self.case.expected_intent, + "actual_intent": self.intent, + "graph_id": self.graph_id, + "conversation_mode": self.conversation_mode, + "query": self.query, + "symbol_resolution": self.symbol_resolution, + "rag_count": len(self.rag_rows), + "rag_rows": self.rag_rows, + "llm_answer": self.llm_answer, + "summary": summary, + "diagnostics": diagnostics, + "run_info": { + "case_id": self.case.case_id, + "mode": self.mode, + "run_started_at": self.run_started_at.isoformat(timespec="seconds"), + "rag_session_id": self.rag_session_id, + "expected_intent": self.case.expected_intent, + "actual_intent": self.intent, + "graph_id": self.graph_id, + "conversation_mode": self.conversation_mode, + }, + "input_request": { + "text": self.case.text, + "normalized_query": self.query, + }, + "steps": steps, + } + + def _default_steps(self, diagnostics: dict) -> list[dict]: + timings = dict(diagnostics.get("timings_ms") or {}) + retrieval_diag = diagnostics.get("retrieval") + router_step = { + "step": "intent_router", + "input": {"query": self.case.text}, + "output": { + "intent": self.intent, + "graph_id": self.graph_id, + "conversation_mode": self.conversation_mode, + "query": self.query, + }, + "diagnostics": { + "router_plan": diagnostics.get("router_plan"), + "timings_ms": {"router": timings.get("router", 0)}, + }, + } + if self.mode == "router_only": + return [router_step] + retrieval_step = { + "step": "retrieval", + "input": {"query": self.query}, + "output": { + "symbol_resolution": self.symbol_resolution, + "rag_count": len(self.rag_rows), + "rag_rows": self.rag_rows, + }, + "diagnostics": { + "execution": diagnostics.get("execution"), + "retrieval": retrieval_diag, + "constraint_violations": diagnostics.get("constraint_violations"), + "timings_ms": { + "symbol_resolution": timings.get("symbol_resolution", 0), + "retrieval_total": timings.get("retrieval_total", 0), + "retrieval_by_layer": timings.get("retrieval_by_layer", {}), + "merge_rank": timings.get("merge_rank", 0), + }, + }, + } + if self.mode == "router_rag": + return [router_step, retrieval_step] + llm_step = { + "step": "llm_answer", + "input": {"query": self.query, "rag_count": len(self.rag_rows)}, + "output": {"llm_answer": self.llm_answer}, + "diagnostics": { + "prompt": diagnostics.get("prompt"), + "timings_ms": { + "prompt_build": timings.get("prompt_build", 0), + "llm_call": timings.get("llm_call", 0), + }, + }, + } + return [router_step, retrieval_step, llm_step] diff --git a/tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/helpers/phrases_loader.py b/tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/helpers/phrases_loader.py new file mode 100644 index 0000000..0580beb --- /dev/null +++ b/tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/helpers/phrases_loader.py @@ -0,0 +1,45 @@ +from __future__ import annotations + +from pathlib import Path + +import yaml + +from tests.pipeline_setup.suite_02_pipeline.pipeline_intent_rag.helpers.models import PhraseCase + + +class PhraseCatalogLoader: + def load(self, path: Path) -> list[PhraseCase]: + payload = yaml.safe_load(path.read_text(encoding="utf-8")) + if not isinstance(payload, dict): + raise ValueError(f"Invalid phrases file: expected mapping, got {type(payload).__name__}") + items = payload.get("phrases", []) + if not isinstance(items, list): + raise ValueError("Invalid phrases file: `phrases` must be a list") + cases = [self._to_case(raw) for raw in items] + if not cases: + raise ValueError("No phrase cases found in phrases file") + return cases + + def filter_by_tag(self, cases: list[PhraseCase], tag: str) -> list[PhraseCase]: + return [case for case in cases if tag in case.tags] + + def _to_case(self, raw: object) -> PhraseCase: + if not isinstance(raw, dict): + raise ValueError("Invalid phrase item: expected object") + case_id = str(raw.get("id", "")).strip() + text = str(raw.get("text", "")).strip() + if not case_id: + raise ValueError("Invalid phrase item: `id` is required") + if not text: + raise ValueError(f"Invalid phrase item `{case_id}`: `text` is required") + tags = [str(item).strip() for item in raw.get("tags", []) if str(item).strip()] + expected_intent = raw.get("expected_intent") + rag_session_id = str(raw.get("rag_session_id", "")).strip() or None + return PhraseCase( + case_id=case_id, + text=text, + rag_session_id=rag_session_id, + tags=tags, + expected_intent=str(expected_intent).strip() if expected_intent else None, + expect_non_empty_rag=bool(raw.get("expect_non_empty_rag", True)), + ) diff --git a/tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/helpers/pipeline_config.py b/tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/helpers/pipeline_config.py new file mode 100644 index 0000000..7dae113 --- /dev/null +++ b/tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/helpers/pipeline_config.py @@ -0,0 +1,60 @@ +from __future__ import annotations + +import os +from dataclasses import dataclass +from pathlib import Path + +from tests.pipeline_setup.suite_02_pipeline.pipeline_intent_rag.helpers.env_bootstrap import PipelineEnvLoader + + +@dataclass(frozen=True, slots=True) +class PipelineRunConfig: + mode: str + test_name: str + tag: str + phrases_path: Path + test_results_dir: Path + forced_rag_session_id: str | None + default_rag_session_id: str | None + reindex_repo_path: Path | None + reindex_project_id: str | None + + @classmethod + def from_env(cls, mode: str, test_name: str, test_root: Path) -> "PipelineRunConfig": + PipelineEnvLoader(test_root).load() + mode_tag = { + "router_only": "router_only", + "router_rag": "router_rag", + "full_chain": "full_chain", + }[mode] + forced_sid = os.getenv("INTENT_PIPELINE_FORCE_RAG_SESSION_ID", "").strip() or None + default_sid = os.getenv("INTENT_PIPELINE_RAG_SESSION_ID", "").strip() or None + raw_reindex_path = os.getenv("INTENT_PIPELINE_REINDEX_REPO_PATH", "").strip() + reindex_repo_path = Path(raw_reindex_path).expanduser().resolve() if raw_reindex_path else None + reindex_project_id = os.getenv("INTENT_PIPELINE_REINDEX_PROJECT_ID", "").strip() or None + return cls( + mode=mode, + test_name=test_name, + tag=mode_tag, + phrases_path=test_root / "fixtures" / "phrases.yaml", + test_results_dir=test_root.parent / "test_results", + forced_rag_session_id=forced_sid, + default_rag_session_id=default_sid, + reindex_repo_path=reindex_repo_path, + reindex_project_id=reindex_project_id, + ) + + +def mode_enabled(mode: str, test_root: Path) -> bool: + PipelineEnvLoader(test_root).load() + if mode == "router_only": + return True + if mode == "router_rag": + return _truthy(os.getenv("RUN_INTENT_PIPELINE_ROUTER_RAG") or os.getenv("RUN_INTENT_ROUTER_RAG_PIPELINE")) + if mode == "full_chain": + return _truthy(os.getenv("RUN_INTENT_PIPELINE_FULL_CHAIN")) + return False + + +def _truthy(value: str | None) -> bool: + return str(value or "").strip().lower() in {"1", "true", "yes", "on"} diff --git a/tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/helpers/pipeline_runner.py b/tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/helpers/pipeline_runner.py new file mode 100644 index 0000000..90cdf40 --- /dev/null +++ b/tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/helpers/pipeline_runner.py @@ -0,0 +1,171 @@ +from __future__ import annotations + +from datetime import datetime +from difflib import get_close_matches +from time import perf_counter + +from app.modules.rag.intent_router_v2 import ConversationState, IntentRouterV2 +from tests.pipeline_setup.suite_02_pipeline.pipeline_intent_rag.helpers.diagnostics import ( + apply_retrieval_report, + assign_repo_scope, + init_diagnostics, + validate_constraints, +) +from tests.pipeline_setup.suite_02_pipeline.pipeline_intent_rag.helpers.models import PhraseCase, PipelineResult +from tests.unit_tests.rag.intent_router_testkit import repo_context + + +class RouterOnlyRunner: + def __init__(self, started_at: datetime, router: IntentRouterV2 | None = None) -> None: + self._started_at = started_at + self._router = router or IntentRouterV2() + + def run_case(self, case: PhraseCase) -> PipelineResult: + router_started = perf_counter() + route_result = self._router.route(case.text, ConversationState(), repo_context()) + router_ms = _ms(router_started) + query = route_result.query_plan.normalized or route_result.query_plan.raw or case.text + diagnostics = init_diagnostics(route_result, router_ms=router_ms, include_retrieval=False) + return PipelineResult( + case=case, + mode="router_only", + run_started_at=self._started_at, + rag_session_id=case.rag_session_id, + intent=route_result.intent, + graph_id=route_result.graph_id, + conversation_mode=route_result.conversation_mode, + query=query, + symbol_resolution=route_result.symbol_resolution.model_dump(), + diagnostics=diagnostics, + ) + + +class IntentRouterRagPipelineRunner: + def __init__( + self, + started_at: datetime, + rag_adapter, + session_resolver, + router: IntentRouterV2 | None = None, + ) -> None: + self._started_at = started_at + self._rag_adapter = rag_adapter + self._session_resolver = session_resolver + self._router = router or IntentRouterV2() + + def run_case(self, case: PhraseCase) -> PipelineResult: + router_started = perf_counter() + route_result = self._router.route(case.text, ConversationState(), repo_context()) + router_ms = _ms(router_started) + diagnostics = init_diagnostics(route_result, router_ms=router_ms, include_retrieval=True) + rag_query = route_result.query_plan.normalized or route_result.query_plan.raw or case.text + rag_session_id = self._session_resolver.resolve(case) + retrieval_started = perf_counter() + rag_rows = self._retrieve_rows( + rag_session_id=rag_session_id, + rag_query=rag_query, + route_result=route_result, + ) + diagnostics["timings_ms"]["retrieval_total"] = _ms(retrieval_started) + consume_report = getattr(self._rag_adapter, "consume_retrieval_report", None) + retrieval_report = consume_report() if callable(consume_report) else None + apply_retrieval_report(diagnostics, retrieval_report) + symbol_started = perf_counter() + symbol_resolution = self._resolve_symbol(route_result.symbol_resolution.model_dump(), rag_rows) + diagnostics["timings_ms"]["symbol_resolution"] = _ms(symbol_started) + if ( + route_result.query_plan.sub_intent == "EXPLAIN" + and list(route_result.query_plan.symbol_candidates or []) + and str(symbol_resolution.get("status") or "") != "resolved" + ): + rag_rows = [] + if isinstance(diagnostics.get("retrieval"), dict): + diagnostics["retrieval"]["fallback"] = {"used": False, "reason": None} + merge_started = perf_counter() + rag_rows = self._rag_adapter.hydrate_resolved_symbol_sources( + rag_session_id=rag_session_id, + base_query=rag_query, + rag_rows=rag_rows, + symbol_resolution=symbol_resolution, + retrieval_spec=route_result.retrieval_spec, + retrieval_constraints=route_result.retrieval_constraints, + ) + rag_rows = self._rag_adapter.force_symbol_context_c0( + rag_session_id=rag_session_id, + rag_rows=rag_rows, + symbol_resolution=symbol_resolution, + limit=20, + ) + diagnostics["timings_ms"]["merge_rank"] = _ms(merge_started) + expected_repo_id = str(getattr(route_result.retrieval_spec.filters, "repo_id", "") or "").strip() or None + assign_repo_scope(diagnostics, rag_rows, expected_repo_id=expected_repo_id) + diagnostics["constraint_violations"] = validate_constraints( + route_result, + rag_rows, + symbol_resolution, + expected_repo_id=expected_repo_id, + ) + return PipelineResult( + case=case, + mode="router_rag", + run_started_at=self._started_at, + rag_session_id=rag_session_id, + intent=route_result.intent, + graph_id=route_result.graph_id, + conversation_mode=route_result.conversation_mode, + query=rag_query, + rag_rows=rag_rows, + symbol_resolution=symbol_resolution, + diagnostics=diagnostics, + ) + + def _resolve_symbol(self, initial: dict, rag_rows: list[dict]) -> dict: + status = str(initial.get("status") or "not_requested") + if status != "pending": + return initial + candidates = [str(item) for item in initial.get("alternatives", []) if str(item).strip()] + c1_titles = list(dict.fromkeys( + str(row.get("title") or "").strip() + for row in rag_rows + if str(row.get("layer") or "") == "C1_SYMBOL_CATALOG" and str(row.get("title") or "").strip() + )) + if not c1_titles: + initial["status"] = "not_found" + return initial + exact = next((title for title in c1_titles if title in candidates), None) + if exact: + return {"status": "resolved", "resolved_symbol": exact, "alternatives": c1_titles[:5], "confidence": 0.99} + fuzzy_hits: list[str] = [] + for candidate in candidates: + fuzzy_hits.extend(get_close_matches(candidate, c1_titles, n=3, cutoff=0.7)) + fuzzy_hits = list(dict.fromkeys(fuzzy_hits)) + if len(fuzzy_hits) == 1: + return {"status": "resolved", "resolved_symbol": fuzzy_hits[0], "alternatives": c1_titles[:5], "confidence": 0.82} + if len(fuzzy_hits) > 1: + return {"status": "ambiguous", "resolved_symbol": None, "alternatives": fuzzy_hits[:5], "confidence": 0.55} + return {"status": "not_found", "resolved_symbol": None, "alternatives": c1_titles[:5], "confidence": 0.0} + + def _retrieve_rows(self, *, rag_session_id: str, rag_query: str, route_result) -> list[dict]: + path_scope = list(getattr(route_result.retrieval_spec.filters, "path_scope", []) or []) + expected_repo_id = str(getattr(route_result.retrieval_spec.filters, "repo_id", "") or "").strip() or None + if route_result.query_plan.sub_intent == "OPEN_FILE" and path_scope: + return self._rag_adapter.retrieve_exact_files( + rag_session_id=rag_session_id, + repo_id=expected_repo_id, + paths=path_scope, + layers=["C0_SOURCE_CHUNKS"], + limit=200, + query=rag_query, + ranking_profile=str(getattr(route_result.retrieval_spec, "rerank_profile", "") or ""), + ) + return self._rag_adapter.retrieve_with_plan( + rag_session_id, + rag_query, + route_result.retrieval_spec, + route_result.retrieval_constraints, + query_plan=route_result.query_plan, + ) + + +def _ms(started: float) -> int: + return int((perf_counter() - started) * 1000) diff --git a/tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/helpers/prompt_payload_builder.py b/tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/helpers/prompt_payload_builder.py new file mode 100644 index 0000000..111f858 --- /dev/null +++ b/tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/helpers/prompt_payload_builder.py @@ -0,0 +1,148 @@ +from __future__ import annotations + +from tests.pipeline_setup.suite_02_pipeline.pipeline_intent_rag.helpers.diagnostics import build_prompt_diagnostics + + +class PromptPayloadBuilder: + def build( + self, + query: str, + rag_rows: list[dict], + *, + prompt_template: dict | None = None, + sub_intent: str | None = None, + default_system_prompt: str, + default_task_prompt: str, + default_template_id: str, + system_prompt_version: str, + ) -> dict: + template = dict(prompt_template or {}) + system_prompt = str(template.get("system_prompt") or default_system_prompt) + task_prompt = str(template.get("task_prompt") or default_task_prompt) + template_id = str(template.get("template_id") or default_template_id) + context = RagContextFormatter().format(rag_rows, sub_intent=sub_intent) + user_prompt = ( + f"Вопрос пользователя:\n{query}\n\n" + f"Правила ответа:\n{task_prompt}\n\n" + f"Как интерпретировать слои RAG:\n{_LAYER_GUIDE}\n\n" + f"Контекст RAG:\n{context}\n\n" + "Ответь пользователю естественным инженерным языком." + ) + return { + "system_prompt": system_prompt, + "user_prompt": user_prompt, + "sub_intent": str(sub_intent or "").strip() or None, + "diagnostics": build_prompt_diagnostics( + system_prompt=system_prompt, + user_prompt=user_prompt, + rag_rows=rag_rows, + prompt_template_id=template_id, + system_prompt_version=system_prompt_version, + ), + } + + +class RagContextFormatter: + _DEFAULT_LIMIT = 6 + _QUOTAS = { + "OPEN_FILE": {"C0_SOURCE_CHUNKS": 4, "C1_SYMBOL_CATALOG": 1, "C4_SEMANTIC_ROLES": 1}, + "EXPLAIN": { + "C1_SYMBOL_CATALOG": 1, + "C0_SOURCE_CHUNKS": 2, + "C2_DEPENDENCY_GRAPH": 1, + "C4_SEMANTIC_ROLES": 1, + "C3_ENTRYPOINTS": 1, + }, + "EXPLAIN_LOCAL": {"C0_SOURCE_CHUNKS": 3, "C1_SYMBOL_CATALOG": 1, "C2_DEPENDENCY_GRAPH": 1, "C4_SEMANTIC_ROLES": 1}, + "FIND_TESTS": {"C1_SYMBOL_CATALOG": 1, "C2_DEPENDENCY_GRAPH": 2, "C0_SOURCE_CHUNKS": 2, "C4_SEMANTIC_ROLES": 1}, + "FIND_ENTRYPOINTS": {"C3_ENTRYPOINTS": 3, "C0_SOURCE_CHUNKS": 2, "C1_SYMBOL_CATALOG": 1}, + "TRACE_FLOW": {"C2_DEPENDENCY_GRAPH": 2, "C3_ENTRYPOINTS": 1, "C0_SOURCE_CHUNKS": 2, "C1_SYMBOL_CATALOG": 1}, + "ARCHITECTURE": {"C4_SEMANTIC_ROLES": 2, "C2_DEPENDENCY_GRAPH": 2, "C3_ENTRYPOINTS": 1, "C1_SYMBOL_CATALOG": 1}, + } + + def format(self, rag_rows: list[dict], *, sub_intent: str | None = None) -> str: + if not rag_rows: + return "(пусто)" + selected = self._select_rows(rag_rows, sub_intent=sub_intent) + return "\n\n".join(_RagRowFormatter().format(row) for row in selected) + + def _select_rows(self, rag_rows: list[dict], *, sub_intent: str | None) -> list[dict]: + rows = self._prioritize_rows(rag_rows, sub_intent=sub_intent) + quotas = dict(self._QUOTAS.get(str(sub_intent or "").strip().upper(), {})) + if not quotas: + return rows[: self._DEFAULT_LIMIT] + selected: list[dict] = [] + counts = {layer: 0 for layer in quotas} + for row in rows: + layer = str(row.get("layer") or "") + if layer not in quotas or counts[layer] >= quotas[layer]: + continue + selected.append(row) + counts[layer] += 1 + if len(selected) >= self._DEFAULT_LIMIT: + return selected[: self._DEFAULT_LIMIT] + for row in rows: + if row in selected: + continue + selected.append(row) + if len(selected) >= self._DEFAULT_LIMIT: + break + return selected + + def _prioritize_rows(self, rag_rows: list[dict], *, sub_intent: str | None) -> list[dict]: + if str(sub_intent or "").strip().upper() != "FIND_ENTRYPOINTS": + return list(rag_rows) + ranked = sorted( + enumerate(rag_rows), + key=lambda item: (_entrypoint_priority(item[1]), item[0]), + ) + return [row for _, row in ranked] + + +class _RagRowFormatter: + def format(self, row: dict) -> str: + layer = str(row.get("layer") or "") + path = str(row.get("path") or "") + title = str(row.get("title") or "") + metadata = dict(row.get("metadata") or {}) + content = self._content(row, metadata) + return f"- [{layer}] {path} | {title}\n{content}" + + def _content(self, row: dict, metadata: dict) -> str: + if str(row.get("layer") or "") != "C3_ENTRYPOINTS": + return str(row.get("content") or "")[:1200] + http_method = str(metadata.get("http_method") or "").strip() + route_path = str(metadata.get("route_path") or "").strip() + if not http_method or not route_path: + return str(row.get("content") or "")[:1200] + lines = [str(metadata.get("summary_text") or f"{http_method} {route_path}").strip()] + declaring = str(metadata.get("declaring_symbol") or "").strip() + handler = str(metadata.get("handler_symbol") or "").strip() + decorator_text = str(metadata.get("decorator_text") or "").strip() + if declaring: + lines.append(f"Declared in: {declaring}") + if handler: + lines.append(f"Handler: {handler}") + if decorator_text: + lines.append(f"Decorator: {decorator_text}") + return "\n".join(lines) + + +def _entrypoint_priority(row: dict) -> tuple[int, int]: + if str(row.get("layer") or "") != "C3_ENTRYPOINTS": + return (2, 0) + metadata = dict(row.get("metadata") or {}) + if str(metadata.get("http_method") or "").strip() and str(metadata.get("route_path") or "").strip(): + return (0, 0) + if str(metadata.get("entry_type") or "").strip() == "http": + return (1, 0) + return (1, 1) + + +_LAYER_GUIDE = ( + "- C0_SOURCE_CHUNKS: фактический код, это самый надёжный источник деталей реализации.\n" + "- C1_SYMBOL_CATALOG: объявления символов, сигнатуры и базовая идентификация сущностей.\n" + "- C2_DEPENDENCY_GRAPH: связи вызовов, зависимостей и потоков между сущностями.\n" + "- C3_ENTRYPOINTS: подтверждённые точки входа. Если есть http_method и route_path, считай это сильным сигналом реального route.\n" + "- C4_SEMANTIC_ROLES: эвристическое описание роли компонента; используй как вспомогательный сигнал и не ставь выше фактического кода." +) diff --git a/tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/helpers/rag_db_adapter.py b/tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/helpers/rag_db_adapter.py new file mode 100644 index 0000000..8733116 --- /dev/null +++ b/tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/helpers/rag_db_adapter.py @@ -0,0 +1,745 @@ +from __future__ import annotations + +from dataclasses import dataclass +from fnmatch import fnmatch +import re +from time import perf_counter +from typing import TYPE_CHECKING, Any + +from app.modules.rag.retrieval.test_filter import build_test_filters + +if TYPE_CHECKING: + from app.modules.rag.persistence.repository import RagRepository + +_KNOWN_FILE_EXTENSIONS = ( + ".py", + ".md", + ".txt", + ".yaml", + ".yml", + ".json", + ".toml", + ".ini", +) +_SYMBOL_TOKEN_RE = re.compile(r"\b([A-Z][A-Za-z0-9_]{2,}|[a-z_][a-z0-9_]{2,})\b") +_DEFAULT_SYMBOL_KINDS = {"class", "function", "method"} + + +def is_file_path(path: str) -> bool: + normalized = normalize_path(path) + if not normalized: + return False + tail = normalized.rsplit("/", 1)[-1] + if "." in tail and not tail.startswith(".") and not tail.endswith("."): + return True + return tail.lower().endswith(_KNOWN_FILE_EXTENSIONS) + + +def normalize_path(path: str) -> str: + normalized = str(path or "").strip().replace("\\", "/") + while "//" in normalized: + normalized = normalized.replace("//", "/") + if normalized.startswith("./"): + normalized = normalized[2:] + return normalized + + +def normalize_paths(paths: list[str]) -> list[str]: + deduped: list[str] = [] + for value in paths: + normalized = normalize_path(value) + if normalized and normalized not in deduped: + deduped.append(normalized) + return deduped + + +def extract_symbol_tokens(text: str) -> list[str]: + tokens: list[str] = [] + for match in _SYMBOL_TOKEN_RE.finditer(str(text or "")): + token = match.group(1).strip() + if token and token not in tokens: + tokens.append(token) + return tokens[:8] + + +class SessionEmbeddingDimensions: + def __init__(self) -> None: + self._cache: dict[str, int] = {} + + def resolve(self, rag_session_id: str) -> int: + if rag_session_id in self._cache: + return self._cache[rag_session_id] + from sqlalchemy import text + + from app.modules.shared.db import get_engine + + with get_engine().connect() as conn: + row = conn.execute( + text( + """ + SELECT vector_dims(embedding) AS dim + FROM rag_chunks + WHERE rag_session_id = :sid + LIMIT 1 + """ + ), + {"sid": rag_session_id}, + ).mappings().first() + dim = int(row["dim"]) if row and row.get("dim") else 0 + self._cache[rag_session_id] = dim + return dim + + +class GlobPatternMapper: + @staticmethod + def to_prefixes(globs: list[str]) -> list[str]: + result: list[str] = [] + for value in globs: + item = str(value or "").strip() + if not item: + continue + if item.endswith("/**"): + prefix = item[:-3] + elif "*" in item or "?" in item: + continue + else: + prefix = item + if prefix and prefix not in result: + result.append(prefix) + return result + + @staticmethod + def to_like_patterns(globs: list[str]) -> list[str]: + result: list[str] = [] + for value in globs: + item = str(value or "").strip().lower() + if not item or ("*" not in item and "?" not in item): + continue + sql_like = item.replace("**/", "%/").replace("**", "%").replace("*", "%").replace("?", "_") + if sql_like not in result: + result.append(sql_like) + return result + + +class RagRowDeduplicator: + def dedupe(self, rows: list[dict]) -> list[dict]: + result: list[dict] = [] + seen: set[tuple[Any, ...]] = set() + for row in rows: + key = self._key(row) + if key in seen: + continue + seen.add(key) + result.append(row) + return result + + def _key(self, row: dict) -> tuple[Any, ...]: + layer = str(row.get("layer") or "") + path = str(row.get("path") or "") + span_start = row.get("span_start") + span_end = row.get("span_end") + metadata = dict(row.get("metadata") or {}) + if layer == "C0_SOURCE_CHUNKS": + return (layer, path, span_start, span_end) + if layer == "C1_SYMBOL_CATALOG": + return (layer, str(metadata.get("symbol_id") or ""), path, span_start, span_end) + if layer == "C2_DEPENDENCY_GRAPH": + return (layer, str(metadata.get("edge_id") or ""), path, span_start, span_end) + return (layer, path, str(row.get("title") or ""), span_start, span_end) + + +@dataclass(slots=True) +class LayerRetrievalParams: + rag_session_id: str + query_text: str + layer_id: str + limit: int + scope: list[str] + exclude_prefixes: list[str] | None + exclude_like: list[str] | None + prefer_path_prefixes: list[str] | None + prefer_like_patterns: list[str] | None + dim: int + include_tests: bool + retrieval_mode_hint: str | None = None + c1_kind_filter: set[str] | None = None + allow_scope_relaxation: bool = True + + +class LayerBudgetRetriever: + def __init__( + self, + repository: RagRepository, + dim_resolver: SessionEmbeddingDimensions, + deduper: RagRowDeduplicator, + ) -> None: + self._repository = repository + self._dim_resolver = dim_resolver + self._deduper = deduper + self._explain_refiner = ExplainStrictRefiner() + self._last_report: dict[str, Any] | None = None + + def retrieve( + self, + query: str, + retrieval_spec, + retrieval_constraints, + mapper: GlobPatternMapper, + *, + rag_session_id: str, + query_plan=None, + ) -> list[dict]: + filters = retrieval_spec.filters + path_scope = list(getattr(filters, "path_scope", []) or []) + test_policy = str(getattr(filters, "test_policy", "EXCLUDE") or "EXCLUDE") + include_globs = list(getattr(retrieval_constraints, "include_globs", []) or []) + exclude_globs = list(getattr(retrieval_constraints, "exclude_globs", []) or []) + prefer_globs = list(getattr(retrieval_constraints, "prefer_globs", []) or []) + include_prefixes = mapper.to_prefixes(include_globs) + exclude_from_constraints = mapper.to_prefixes(exclude_globs) + exclude_like_constraints = mapper.to_like_patterns(exclude_globs) + prefer_path_prefixes = mapper.to_prefixes(prefer_globs) + prefer_like_patterns = mapper.to_like_patterns(prefer_globs) + test_file_globs = list(getattr(retrieval_constraints, "test_file_globs", []) or []) + test_symbol_patterns = list(getattr(retrieval_constraints, "test_symbol_patterns", []) or []) + exclude_prefixes, exclude_like = self._test_filters(test_policy) + if exclude_from_constraints: + exclude_prefixes = list(dict.fromkeys([*(exclude_prefixes or []), *exclude_from_constraints])) + if exclude_like_constraints: + exclude_like = list(dict.fromkeys([*(exclude_like or []), *exclude_like_constraints])) + effective_scope = path_scope or include_prefixes + effective_query = f"{query} {' '.join(test_symbol_patterns)}".strip() if test_symbol_patterns else query + symbol_candidates = list(getattr(query_plan, "symbol_candidates", []) or []) + symbol_kind_hint = str(getattr(query_plan, "symbol_kind_hint", "") or "").strip().lower() + sub_intent = str(getattr(query_plan, "sub_intent", "") or "").strip().upper() + c1_query = self._c1_query(symbol_candidates, query) + c1_kind_filter = self._c1_kind_filter(symbol_candidates, symbol_kind_hint) + strict_symbol_mode = bool(symbol_candidates) and sub_intent == "EXPLAIN" + if strict_symbol_mode and c1_query: + effective_query = c1_query + dim = self._dim_resolver.resolve(rag_session_id) + merged: list[dict] = [] + report = self._empty_report() + report["fallback"]["reason"] = None + for layer_query in list(getattr(retrieval_spec, "layer_queries", []) or []): + layer_id = str(layer_query.layer_id) + params = LayerRetrievalParams( + rag_session_id=rag_session_id, + query_text=c1_query if layer_id == "C1_SYMBOL_CATALOG" and c1_query else effective_query, + layer_id=layer_id, + limit=max(1, int(layer_query.top_k)), + scope=effective_scope, + exclude_prefixes=exclude_prefixes, + exclude_like=exclude_like, + prefer_path_prefixes=prefer_path_prefixes, + prefer_like_patterns=prefer_like_patterns, + dim=dim, + include_tests=test_policy == "INCLUDE", + retrieval_mode_hint="symbol_search" if layer_id == "C1_SYMBOL_CATALOG" and c1_query else None, + c1_kind_filter=c1_kind_filter if layer_id == "C1_SYMBOL_CATALOG" else None, + allow_scope_relaxation=not strict_symbol_mode, + ) + request = { + "layer": layer_id, + "query": params.query_text, + "path_scope": list(path_scope), + "include_globs": include_globs, + "exclude_globs": exclude_globs, + "prefer_globs": prefer_globs, + "top_k": params.limit, + "ranking_profile": str(getattr(retrieval_spec, "rerank_profile", "") or ""), + } + report["requests"].append(request) + started = perf_counter() + rows, layer_diag = self.retrieve_layer_with_scope_fallback(params) + report["retrieval_by_layer_ms"][layer_id] = int((perf_counter() - started) * 1000) + if test_file_globs: + before = len(rows) + rows = self._filter_rows_by_globs(rows, test_file_globs) + filter_stage = "post_rank" + after = len(rows) + else: + before = len(rows) + after = len(rows) + filter_stage = "pre_rank" + if strict_symbol_mode: + rows = self._explain_refiner.refine(layer_id, rows, symbol_candidates) + report["applied"].append( + { + "layer": layer_id, + "effective_path_scope": list(layer_diag.get("effective_path_scope") or []), + "normalized_include_globs": list(include_prefixes), + "normalized_exclude_globs": list(exclude_prefixes or []), + "normalized_prefer_globs": list(prefer_path_prefixes), + "filter_stage": filter_stage, + "candidates_before_filter": before, + "candidates_after_filter": after, + } + ) + report["executed_layers"].append(layer_id) + report["retrieval_mode_by_layer"][layer_id] = str( + params.retrieval_mode_hint or layer_diag.get("retrieval_mode") or "disabled" + ) + report["top_k_by_layer"][layer_id] = params.limit + report["filters_by_layer"][layer_id] = { + "path_scope": list(layer_diag.get("effective_path_scope") or []), + "include_globs": list(include_prefixes), + "exclude_globs": list(exclude_prefixes or []), + "prefer_globs": list(prefer_path_prefixes), + } + if bool(layer_diag.get("fallback_used")) and params.allow_scope_relaxation: + report["fallback"]["used"] = True + report["fallback"]["reason"] = str(layer_diag.get("fallback_reason") or "scope_relaxed") + merged.extend(rows) + self._last_report = report + return self._deduper.dedupe(merged) + + def consume_report(self) -> dict[str, Any] | None: + report = self._last_report + self._last_report = None + return report + + def retrieve_layer_with_scope_fallback(self, params: LayerRetrievalParams) -> tuple[list[dict], dict[str, Any]]: + options = self._prefixes_options(params.scope) if params.allow_scope_relaxation else [params.scope or None] + last_mode = "disabled" + for idx, prefixes in enumerate(options): + rows, base_mode = self._retrieve_layer(params, prefixes) + last_mode = base_mode + if params.c1_kind_filter and params.layer_id == "C1_SYMBOL_CATALOG": + rows = self._filter_c1_by_kind(rows, params.c1_kind_filter) + if rows: + retrieval_mode = self._resolve_mode(base_mode, prefixes) + fallback_used = idx > 0 + fallback_reason = "scope_relaxed" if fallback_used else None + return rows, { + "effective_path_scope": list(prefixes or []), + "retrieval_mode": retrieval_mode, + "fallback_used": fallback_used, + "fallback_reason": fallback_reason, + } + return [], { + "effective_path_scope": [], + "retrieval_mode": last_mode, + "fallback_used": len(options) > 1, + "fallback_reason": "scope_relaxed_no_hits" if len(options) > 1 else None, + } + + def _retrieve_layer(self, params: LayerRetrievalParams, prefixes: list[str] | None) -> tuple[list[dict], str]: + if params.dim <= 0: + if params.layer_id != "C0_SOURCE_CHUNKS": + return [], "disabled" + return self._repository.retrieve_lexical_code( + params.rag_session_id, + query_text=params.query_text, + limit=params.limit, + path_prefixes=prefixes, + exclude_path_prefixes=params.exclude_prefixes, + exclude_like_patterns=params.exclude_like, + prefer_path_prefixes=params.prefer_path_prefixes, + prefer_like_patterns=params.prefer_like_patterns, + prefer_non_tests=not params.include_tests, + ), "lexical" + return self._repository.retrieve( + params.rag_session_id, + [0.0] * params.dim, + query_text=params.query_text, + limit=params.limit, + layers=[params.layer_id], + path_prefixes=prefixes, + exclude_path_prefixes=params.exclude_prefixes, + exclude_like_patterns=params.exclude_like, + prefer_path_prefixes=params.prefer_path_prefixes, + prefer_like_patterns=params.prefer_like_patterns, + prefer_non_tests=not params.include_tests, + ), "vector" + + def _test_filters(self, test_policy: str) -> tuple[list[str] | None, list[str] | None]: + if test_policy == "INCLUDE": + return None, None + filters = build_test_filters() + return filters.exclude_path_prefixes, filters.exclude_like_patterns + + def _prefixes_options(self, path_scope: list[str]) -> list[list[str] | None]: + if not path_scope: + return [None] + parent_prefixes = [ + item.rsplit("/", 1)[0] + for item in path_scope + if "/" in item and not is_file_path(item) + ] + deduped_parents: list[str] = [] + for item in parent_prefixes: + if item and item not in deduped_parents: + deduped_parents.append(item) + result: list[list[str] | None] = [path_scope] + if deduped_parents: + result.append(deduped_parents) + result.append(None) + return result + + def _resolve_mode(self, base_mode: str, prefixes: list[str] | None) -> str: + if base_mode == "disabled": + return "disabled" + if prefixes: + return "exact_path_fetch" + return base_mode + + def _empty_report(self) -> dict[str, Any]: + return { + "executed_layers": [], + "retrieval_mode_by_layer": {}, + "top_k_by_layer": {}, + "filters_by_layer": {}, + "requests": [], + "applied": [], + "fallback": {"used": False, "reason": None}, + "retrieval_by_layer_ms": {}, + } + + def _filter_rows_by_globs(self, rows: list[dict], globs: list[str]) -> list[dict]: + if not globs: + return rows + patterns = [item.strip().lower() for item in globs if item.strip()] + result: list[dict] = [] + for row in rows: + path = str(row.get("path") or "").lower() + if any(fnmatch(path, pattern) or fnmatch(path, f"*/{pattern}") for pattern in patterns): + result.append(row) + return result + + def _c1_query(self, symbol_candidates: list[str], query: str) -> str: + tokens = [str(item).strip() for item in symbol_candidates if str(item).strip()] + if tokens: + return " ".join(tokens) + fallback = extract_symbol_tokens(query) + return " ".join(fallback) if fallback else str(query or "") + + def _c1_kind_filter(self, symbol_candidates: list[str], symbol_kind_hint: str) -> set[str] | None: + if symbol_kind_hint in _DEFAULT_SYMBOL_KINDS or symbol_kind_hint == "module": + return {symbol_kind_hint} + if symbol_candidates: + return set(_DEFAULT_SYMBOL_KINDS) + return None + + def _filter_c1_by_kind(self, rows: list[dict], allowed_kinds: set[str]) -> list[dict]: + result: list[dict] = [] + for row in rows: + metadata = dict(row.get("metadata") or {}) + kind = str(metadata.get("kind") or "").strip().lower() + if kind in allowed_kinds: + result.append(row) + return result + + +class ExplainStrictRefiner: + def refine(self, layer_id: str, rows: list[dict], symbol_candidates: list[str]) -> list[dict]: + if not rows or not symbol_candidates: + return rows + sorted_rows = self._sort_exact_first(rows, symbol_candidates) + if layer_id != "C4_SEMANTIC_ROLES": + return sorted_rows + exact = [row for row in sorted_rows if self._is_exact_symbol(row, symbol_candidates)] + if not exact: + return sorted_rows[:1] + primary = exact[:1] + same_path = [ + row + for row in sorted_rows + if row not in primary and str(row.get("path") or "") == str(primary[0].get("path") or "") + ] + return [*primary, *same_path[:2]] + + def _sort_exact_first(self, rows: list[dict], symbol_candidates: list[str]) -> list[dict]: + return sorted(rows, key=lambda row: (0 if self._is_exact_symbol(row, symbol_candidates) else 1)) + + def _is_exact_symbol(self, row: dict, symbol_candidates: list[str]) -> bool: + title = str(row.get("title") or "").strip() + metadata = dict(row.get("metadata") or {}) + qname = str(metadata.get("qname") or "").strip() + symbol_name = str(metadata.get("symbol_name") or "").strip() + return any(candidate in {title, qname, symbol_name} for candidate in symbol_candidates) + + +class ResolvedSymbolSourceHydrator: + def __init__( + self, + retriever: LayerBudgetRetriever, + dim_resolver: SessionEmbeddingDimensions, + deduper: RagRowDeduplicator, + ) -> None: + self._retriever = retriever + self._dim_resolver = dim_resolver + self._deduper = deduper + + def hydrate( + self, + rag_session_id: str, + base_query: str, + rag_rows: list[dict], + symbol_resolution: dict, + retrieval_spec, + retrieval_constraints, + mapper: GlobPatternMapper, + ) -> list[dict]: + if str(symbol_resolution.get("status") or "") != "resolved": + return self._deduper.dedupe(rag_rows) + resolved = str(symbol_resolution.get("resolved_symbol") or "").strip() + if not resolved: + return self._deduper.dedupe(rag_rows) + alternatives = [str(item).strip() for item in symbol_resolution.get("alternatives", []) if str(item).strip()] + target_names = [resolved] + for name in alternatives: + if name not in target_names: + target_names.append(name) + if len(target_names) >= 3: + break + filters = retrieval_spec.filters + test_policy = str(getattr(filters, "test_policy", "EXCLUDE") or "EXCLUDE") + exclude_prefixes = mapper.to_prefixes(list(getattr(retrieval_constraints, "exclude_globs", []) or [])) + exclude_like = mapper.to_like_patterns(list(getattr(retrieval_constraints, "exclude_globs", []) or [])) + prefer_path_prefixes = mapper.to_prefixes(list(getattr(retrieval_constraints, "prefer_globs", []) or [])) + prefer_like_patterns = mapper.to_like_patterns(list(getattr(retrieval_constraints, "prefer_globs", []) or [])) + dim = self._dim_resolver.resolve(rag_session_id) + c0_limit = self._layer_top_k(retrieval_spec, "C0_SOURCE_CHUNKS", fallback=6) + extra_rows: list[dict] = [] + for symbol_row in self._symbol_rows(rag_rows, target_names): + symbol_path = str(symbol_row.get("path") or "").strip() + if not symbol_path: + continue + symbol_meta = dict(symbol_row.get("metadata") or {}) + symbol_blob_sha = str(symbol_meta.get("blob_sha") or "").strip() + params = LayerRetrievalParams( + rag_session_id=rag_session_id, + query_text=str(symbol_row.get("title") or "").strip() or base_query, + layer_id="C0_SOURCE_CHUNKS", + limit=min(c0_limit, 4), + scope=[symbol_path], + exclude_prefixes=exclude_prefixes or None, + exclude_like=exclude_like or None, + prefer_path_prefixes=prefer_path_prefixes, + prefer_like_patterns=prefer_like_patterns, + dim=dim, + include_tests=test_policy == "INCLUDE", + ) + rows, _ = self._retriever.retrieve_layer_with_scope_fallback(params) + for row in rows: + row_meta = dict(row.get("metadata") or {}) + if symbol_blob_sha and str(row_meta.get("blob_sha") or "") != symbol_blob_sha: + continue + if not self._overlaps_symbol(row, symbol_row.get("span_start"), symbol_row.get("span_end")): + continue + extra_rows.append(row) + return self._deduper.dedupe([*rag_rows, *extra_rows]) + + def _symbol_rows(self, rows: list[dict], target_names: list[str]) -> list[dict]: + c1_rows = [row for row in rows if str(row.get("layer") or "") == "C1_SYMBOL_CATALOG"] + by_id = { + str(dict(row.get("metadata") or {}).get("symbol_id") or ""): row + for row in c1_rows + if str(dict(row.get("metadata") or {}).get("symbol_id") or "").strip() + } + selected: list[dict] = [] + seen_ids: set[str] = set() + for row in c1_rows: + title = str(row.get("title") or "").strip() + qname = str(dict(row.get("metadata") or {}).get("qname") or "").strip() + if title not in target_names and qname not in target_names: + continue + symbol_id = str(dict(row.get("metadata") or {}).get("symbol_id") or "") + if symbol_id in seen_ids: + continue + seen_ids.add(symbol_id) + selected.append(row) + parent_id = str(dict(row.get("metadata") or {}).get("parent_symbol_id") or "") + parent = by_id.get(parent_id) + if parent is not None and parent_id not in seen_ids: + seen_ids.add(parent_id) + selected.append(parent) + return selected + + def _layer_top_k(self, retrieval_spec, layer_id: str, *, fallback: int) -> int: + for item in list(getattr(retrieval_spec, "layer_queries", []) or []): + if str(item.layer_id) == layer_id: + return max(1, int(item.top_k)) + return fallback + + def _overlaps_symbol(self, row: dict, symbol_start, symbol_end) -> bool: + if symbol_start is None and symbol_end is None: + return True + row_start = row.get("span_start") + row_end = row.get("span_end") + if row_start is None or row_end is None: + return True + start = int(symbol_start if symbol_start is not None else row_start) + end = int(symbol_end if symbol_end is not None else row_end) + return int(row_start) <= end and int(row_end) >= start + + +class RagDbAdapter: + def __init__(self, repository: RagRepository, dim_resolver: SessionEmbeddingDimensions) -> None: + self._repository = repository + self._mapper = GlobPatternMapper() + self._deduper = RagRowDeduplicator() + self._retriever = LayerBudgetRetriever(repository, dim_resolver, self._deduper) + self._hydrator = ResolvedSymbolSourceHydrator(self._retriever, dim_resolver, self._deduper) + self._last_retrieval_report: dict[str, Any] | None = None + + def retrieve(self, rag_session_id: str, query: str, retrieval_spec, retrieval_constraints=None) -> list[dict]: + rows = self._retriever.retrieve( + query=query, + retrieval_spec=retrieval_spec, + retrieval_constraints=retrieval_constraints, + mapper=self._mapper, + rag_session_id=rag_session_id, + query_plan=None, + ) + self._last_retrieval_report = self._retriever.consume_report() + return rows + + def retrieve_with_plan( + self, + rag_session_id: str, + query: str, + retrieval_spec, + retrieval_constraints=None, + *, + query_plan=None, + ) -> list[dict]: + rows = self._retriever.retrieve( + query=query, + retrieval_spec=retrieval_spec, + retrieval_constraints=retrieval_constraints, + mapper=self._mapper, + rag_session_id=rag_session_id, + query_plan=query_plan, + ) + self._last_retrieval_report = self._retriever.consume_report() + return rows + + def hydrate_resolved_symbol_sources( + self, + rag_session_id: str, + base_query: str, + rag_rows: list[dict], + symbol_resolution: dict, + retrieval_spec, + retrieval_constraints=None, + ) -> list[dict]: + return self._hydrator.hydrate( + rag_session_id=rag_session_id, + base_query=base_query, + rag_rows=rag_rows, + symbol_resolution=symbol_resolution, + retrieval_spec=retrieval_spec, + retrieval_constraints=retrieval_constraints, + mapper=self._mapper, + ) + + def consume_retrieval_report(self) -> dict[str, Any] | None: + report = self._last_retrieval_report + self._last_retrieval_report = None + return report + + def retrieve_exact_files( + self, + rag_session_id: str, + *, + repo_id: str | None = None, + paths: list[str], + layers: list[str] | None = None, + limit: int = 200, + query: str = "", + ranking_profile: str = "", + ) -> list[dict]: + normalized_paths = normalize_paths(paths) + started = perf_counter() + rows = self._repository.retrieve_exact_files( + rag_session_id, + repo_id=repo_id, + paths=normalized_paths, + layers=layers, + limit=limit, + ) + elapsed = int((perf_counter() - started) * 1000) + layer_id = list(layers or ["C0_SOURCE_CHUNKS"])[0] + self._last_retrieval_report = { + "executed_layers": [layer_id], + "retrieval_mode_by_layer": {layer_id: "exact_path_fetch"}, + "top_k_by_layer": {layer_id: int(limit)}, + "filters_by_layer": { + layer_id: { + "path_scope": list(normalized_paths), + "include_globs": [], + "exclude_globs": [], + "prefer_globs": [], + } + }, + "requests": [ + { + "layer": layer_id, + "query": query, + "path_scope": list(normalized_paths), + "include_globs": [], + "exclude_globs": [], + "prefer_globs": [], + "top_k": int(limit), + "ranking_profile": ranking_profile, + } + ], + "applied": [ + { + "layer": layer_id, + "effective_path_scope": list(normalized_paths), + "normalized_include_globs": [], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": len(rows), + "candidates_after_filter": len(rows), + } + ], + "fallback": {"used": False, "reason": None}, + "retrieval_by_layer_ms": {layer_id: elapsed}, + } + return self._deduper.dedupe(rows) + + def force_symbol_context_c0( + self, + rag_session_id: str, + *, + rag_rows: list[dict], + symbol_resolution: dict, + limit: int = 20, + ) -> list[dict]: + if str(symbol_resolution.get("status") or "") != "resolved": + return rag_rows + if float(symbol_resolution.get("confidence") or 0.0) < 0.8: + return rag_rows + target = str(symbol_resolution.get("resolved_symbol") or "").strip() + if not target: + return rag_rows + c1_rows = [row for row in rag_rows if str(row.get("layer") or "") == "C1_SYMBOL_CATALOG"] + target_row = next( + ( + row + for row in c1_rows + if str(row.get("title") or "").strip() == target + or str(dict(row.get("metadata") or {}).get("qname") or "").strip() == target + ), + None, + ) + if target_row is None: + return rag_rows + target_path = normalize_path(str(target_row.get("path") or "")) + if not target_path: + return rag_rows + c0_rows = self.retrieve_exact_files( + rag_session_id, + paths=[target_path], + layers=["C0_SOURCE_CHUNKS"], + limit=limit, + query=target, + ranking_profile="symbol_context", + ) + preserved = [row for row in rag_rows if str(row.get("layer") or "") != "C0_SOURCE_CHUNKS"] + return self._deduper.dedupe([*preserved, *c0_rows]) diff --git a/tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/helpers/repo_indexer.py b/tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/helpers/repo_indexer.py new file mode 100644 index 0000000..02f07f9 --- /dev/null +++ b/tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/helpers/repo_indexer.py @@ -0,0 +1,11 @@ +from tests.pipeline_setup.utils.rag_indexer import ( + DeterministicEmbedder, + LocalRepoFileCollector, + RagSessionIndexer, +) + +__all__ = [ + "DeterministicEmbedder", + "LocalRepoFileCollector", + "RagSessionIndexer", +] diff --git a/tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/helpers/result_views.py b/tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/helpers/result_views.py new file mode 100644 index 0000000..9507f00 --- /dev/null +++ b/tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/helpers/result_views.py @@ -0,0 +1,127 @@ +from __future__ import annotations + +from copy import deepcopy +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from tests.pipeline_setup.suite_02_pipeline.pipeline_intent_rag.helpers.models import PipelineResult + + +class PipelineDiagnosticsBuilder: + def build(self, result: PipelineResult) -> dict: + payload = deepcopy(result.diagnostics or {}) + router_plan = dict(payload.get("router_plan") or {}) + execution = dict(payload.get("execution") or {}) + retrieval_block = payload.get("retrieval") + + payload["router"] = { + "conversation_mode": result.conversation_mode, + "keyword_hints": list(router_plan.get("keyword_hints") or []), + "path_scope": list(router_plan.get("path_scope") or []), + } + payload["llm"] = { + "used_evidence_count": len(result.rag_rows), + "missing_evidence_reason": self._missing_evidence_reason(result), + } + + if isinstance(retrieval_block, dict): + retrieval_block["symbol_resolution"] = { + "status": str(result.symbol_resolution.get("status") or "not_requested"), + "resolved_symbol": result.symbol_resolution.get("resolved_symbol"), + "alternatives": list(result.symbol_resolution.get("alternatives") or []), + } + retrieval_block["layers"] = self._layer_diagnostics(result, execution) + + return payload + + def _layer_diagnostics(self, result: PipelineResult, execution: dict) -> list[dict]: + layers = list(execution.get("executed_layers") or []) + counts = self._layer_hit_counts(result.rag_rows) + fallback = {} + retrieval = result.diagnostics.get("retrieval") + if isinstance(retrieval, dict): + fallback = dict(retrieval.get("fallback") or {}) + reason = fallback.get("reason") + + output: list[dict] = [] + for layer in layers: + hit_count = int(counts.get(str(layer), 0)) + output.append( + { + "layer": str(layer), + "status": "hit" if hit_count > 0 else "miss", + "hit_count": hit_count, + "fail_reason": reason if hit_count == 0 else None, + } + ) + return output + + def _layer_hit_counts(self, rows: list[dict]) -> dict[str, int]: + counts: dict[str, int] = {} + for row in rows: + layer = str(row.get("layer") or "") + counts[layer] = counts.get(layer, 0) + 1 + return counts + + def _missing_evidence_reason(self, result: PipelineResult) -> str | None: + if result.mode != "full_chain": + return None + answer_policy = dict(result.diagnostics.get("answer_policy") or {}) + failure_reason = str(answer_policy.get("failure_reason") or "").strip() + if failure_reason: + return failure_reason + if result.rag_rows: + return None + return "empty_retrieval_context" + + +class PipelineSummaryBuilder: + def build(self, result: PipelineResult, diagnostics: dict) -> dict: + router_plan = dict(diagnostics.get("router_plan") or {}) + retrieval_profile = router_plan.get("retrieval_profile") + layers_hit = self._layers_hit(result) + evidence_sufficient = len(result.rag_rows) > 0 + answer_status = self._answer_status(result, evidence_sufficient) + + return { + "router": { + "intent": result.intent, + "sub_intent": router_plan.get("sub_intent"), + "confidence": None, + }, + "retrieval": { + "profile": retrieval_profile, + "layers_hit": layers_hit, + "evidence_sufficient": evidence_sufficient, + }, + "llm": { + "answer_status": answer_status, + "groundedness": self._groundedness(result, evidence_sufficient), + }, + } + + def _layers_hit(self, result: PipelineResult) -> list[str]: + layers = {str(row.get("layer") or "") for row in result.rag_rows if str(row.get("layer") or "")} + return sorted(layers) + + def _answer_status(self, result: PipelineResult, evidence_sufficient: bool) -> str: + if result.mode != "full_chain": + return "partial" + answer_policy = dict(result.diagnostics.get("answer_policy") or {}) + policy_mode = str(answer_policy.get("answer_mode") or "").strip() + if policy_mode: + return policy_mode + if not (result.llm_answer or "").strip(): + return "failed" + if not evidence_sufficient: + return "insufficient_evidence" + return "answered" + + def _groundedness(self, result: PipelineResult, evidence_sufficient: bool) -> str: + if result.mode != "full_chain": + return "not_applicable" + if not (result.llm_answer or "").strip(): + return "speculative" + if evidence_sufficient: + return "grounded" + return "weakly_grounded" diff --git a/tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/helpers/runtime.py b/tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/helpers/runtime.py new file mode 100644 index 0000000..d7c3261 --- /dev/null +++ b/tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/helpers/runtime.py @@ -0,0 +1,135 @@ +from __future__ import annotations + +from datetime import datetime +from pathlib import Path + +from app.modules.agent.code_qa_runtime import CodeQaRuntimeExecutor +from app.modules.agent.llm import AgentLlmService +from app.modules.agent.prompt_loader import PromptLoader +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 +from tests.pipeline_setup.suite_02_pipeline.pipeline_intent_rag.helpers.artifact_writer import ArtifactWriter +from tests.pipeline_setup.suite_02_pipeline.pipeline_intent_rag.helpers.diagnostics import clone_diagnostics +from tests.pipeline_setup.suite_02_pipeline.pipeline_intent_rag.helpers.models import PhraseCase, PipelineResult +from tests.pipeline_setup.suite_02_pipeline.pipeline_intent_rag.helpers.phrases_loader import PhraseCatalogLoader +from tests.pipeline_setup.suite_02_pipeline.pipeline_intent_rag.helpers.pipeline_config import PipelineRunConfig + + +class PipelineRuntime: + def __init__(self, mode: str, test_name: str, test_root: Path) -> None: + self._config = PipelineRunConfig.from_env(mode=mode, test_name=test_name, test_root=test_root) + self._started_at = datetime.now() + self._writer = ArtifactWriter(self._config.test_results_dir, test_name=self._config.test_name, run_started_at=self._started_at) + self._rag_adapter = None + self._session_resolver = None + self._executor: CodeQaRuntimeExecutor | None = None + + @property + def artifact_path(self) -> Path: + return self._writer.path + + def load_cases(self) -> list[PhraseCase]: + loader = PhraseCatalogLoader() + cases = loader.filter_by_tag(loader.load(self._config.phrases_path), self._config.tag) + if not cases: + raise ValueError(f"No cases for tag={self._config.tag} in {self._config.phrases_path}") + return cases + + def run_router_only(self, case: PhraseCase) -> PipelineResult: + from tests.pipeline_setup.suite_02_pipeline.pipeline_intent_rag.helpers.pipeline_runner import RouterOnlyRunner + + result = RouterOnlyRunner(started_at=self._started_at).run_case(case) + self._writer.write_record(result.to_record()) + return result + + def run_router_rag(self, case: PhraseCase) -> PipelineResult: + result = self._run_router_rag_case(case) + self._writer.write_record(result.to_record()) + return result + + def run_full_chain(self, case: PhraseCase) -> PipelineResult: + result_payload = self._executor_instance().execute(user_query=case.text, rag_session_id=case.rag_session_id or "") + route = dict(result_payload.diagnostics.router_result) + retrieval = dict(result_payload.diagnostics.retrieval_request) + diagnostics = { + "router_plan": { + "sub_intent": route.get("sub_intent"), + "graph_id": route.get("graph_id"), + "path_scope": list(retrieval.get("path_scope") or []), + "layers": list(retrieval.get("requested_layers") or []), + "symbol_candidates": list(result_payload.router_result.query_plan.symbol_candidates or []) if result_payload.router_result else [], + }, + "timings_ms": dict(result_payload.diagnostics.timings_ms or {}), + "answer_policy": { + "short_circuit": not result_payload.llm_used, + "answer_mode": _answer_status(result_payload.answer_mode, result_payload.llm_used), + "failure_reason": ",".join(result_payload.validation.reasons), + }, + } + result = PipelineResult( + case=case, + mode="full_chain", + run_started_at=self._started_at, + rag_session_id=case.rag_session_id, + intent=str(route.get("intent") or ""), + graph_id=str(route.get("graph_id") or ""), + conversation_mode=str(route.get("conversation_mode") or ""), + query=str(retrieval.get("query") or case.text), + rag_rows=list(result_payload.retrieval_result.raw_rows) if result_payload.retrieval_result else [], + symbol_resolution=result_payload.router_result.symbol_resolution.model_dump() if result_payload.router_result else {}, + llm_answer=result_payload.final_answer, + diagnostics=diagnostics, + ) + self._writer.write_record(result.to_record()) + return result + + def _run_router_rag_case(self, case: PhraseCase) -> PipelineResult: + from tests.pipeline_setup.suite_02_pipeline.pipeline_intent_rag.helpers.pipeline_runner import IntentRouterRagPipelineRunner + + rag_adapter, session_resolver = self._rag_components() + runner = IntentRouterRagPipelineRunner( + started_at=self._started_at, + rag_adapter=rag_adapter, + session_resolver=session_resolver, + ) + return runner.run_case(case) + + def _rag_components(self): + if self._rag_adapter is not None and self._session_resolver is not None: + return self._rag_adapter, self._session_resolver + from app.modules.rag.persistence.repository import RagRepository + from tests.pipeline_setup.suite_02_pipeline.pipeline_intent_rag.helpers.rag_db_adapter import RagDbAdapter, SessionEmbeddingDimensions + from tests.pipeline_setup.suite_02_pipeline.pipeline_intent_rag.helpers.session_resolver import RagSessionResolver + + repository = RagRepository() + self._rag_adapter = RagDbAdapter(repository=repository, dim_resolver=SessionEmbeddingDimensions()) + self._session_resolver = RagSessionResolver(config=self._config, repository=repository) + return self._rag_adapter, self._session_resolver + + def _executor_instance(self) -> CodeQaRuntimeExecutor: + if self._executor is None: + self._executor = CodeQaRuntimeExecutor(_build_llm()) + return self._executor + + +def _ms(started: float) -> int: + return 0 + + +def _sub_intent_from_result(result: PipelineResult) -> str | None: + router_plan = dict(result.diagnostics.get("router_plan") or {}) + value = str(router_plan.get("sub_intent") or "").strip() + return value or None + + +def _answer_status(answer_mode: str, llm_used: bool) -> str: + if answer_mode == "normal" and llm_used: + return "answered" + return answer_mode + + +def _build_llm() -> AgentLlmService: + settings = GigaChatSettings.from_env() + client = GigaChatClient(settings, GigaChatTokenProvider(settings)) + return AgentLlmService(client=client, prompts=PromptLoader()) diff --git a/tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/helpers/session_resolver.py b/tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/helpers/session_resolver.py new file mode 100644 index 0000000..a4fd40e --- /dev/null +++ b/tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/helpers/session_resolver.py @@ -0,0 +1,37 @@ +from __future__ import annotations + +from pathlib import Path + +from app.modules.rag.persistence.repository import RagRepository +from tests.pipeline_setup.suite_02_pipeline.pipeline_intent_rag.helpers.models import PhraseCase +from tests.pipeline_setup.suite_02_pipeline.pipeline_intent_rag.helpers.pipeline_config import PipelineRunConfig +from tests.pipeline_setup.utils.rag_indexer import RagSessionIndexer + + +class RagSessionResolver: + def __init__(self, config: PipelineRunConfig, repository: RagRepository) -> None: + self._config = config + self._repository = repository + self._indexed_session_id: str | None = None + + def resolve(self, case: PhraseCase) -> str: + if self._config.forced_rag_session_id: + return self._config.forced_rag_session_id + if self._config.reindex_repo_path: + return self._resolve_from_reindex(self._config.reindex_repo_path) + if case.rag_session_id: + return case.rag_session_id + if self._config.default_rag_session_id: + return self._config.default_rag_session_id + raise ValueError( + f"Case '{case.case_id}' has no rag_session_id and INTENT_PIPELINE_RAG_SESSION_ID is not set" + ) + + def _resolve_from_reindex(self, repo_path: Path) -> str: + if self._indexed_session_id: + return self._indexed_session_id + self._indexed_session_id = RagSessionIndexer(self._repository).index_repo( + repo_path=repo_path, + project_id=self._config.reindex_project_id, + ) + return self._indexed_session_id diff --git a/tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/test_answer_quality.py b/tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/test_answer_quality.py new file mode 100644 index 0000000..7a8fbb4 --- /dev/null +++ b/tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/test_answer_quality.py @@ -0,0 +1,32 @@ +from __future__ import annotations + +from tests.pipeline_setup.suite_02_pipeline.pipeline_intent_rag.helpers.answer_quality import AnswerQualityController + + +def test_quality_controller_removes_meta_and_empty_candidate_sections() -> None: + controller = AnswerQualityController() + + answer = ( + "В файле видны импорты из различных подпакетов. " + "Ответ основан исключительно на содержимом указанного файла. " + "Кандидаты на health-endpoint: - Нет явных неподтвержденных кандидатов." + ) + + cleaned = controller.refine(answer, sub_intent="FIND_ENTRYPOINTS") + + assert "различных подпакетов" not in cleaned + assert "Ответ основан исключительно" not in cleaned + assert "Нет явных неподтвержденных кандидатов" not in cleaned + + +def test_quality_controller_trims_speculation_after_not_found() -> None: + controller = AnswerQualityController() + + answer = ( + "Сущность RuntimeFactoryManager не найдена в доступном коде. " + "Исходя из названия, вероятно этот класс управляет фабриками runtime." + ) + + cleaned = controller.refine(answer, sub_intent="EXPLAIN") + + assert cleaned == "Сущность RuntimeFactoryManager не найдена в доступном коде." diff --git a/tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/test_canonical_code_qa_pipeline.py b/tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/test_canonical_code_qa_pipeline.py new file mode 100644 index 0000000..2a770c2 --- /dev/null +++ b/tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/test_canonical_code_qa_pipeline.py @@ -0,0 +1,202 @@ +"""Tests for the canonical CODE_QA pipeline (IntentRouterV2 -> retrieval -> evidence -> diagnostics).""" + +from __future__ import annotations + +from pathlib import Path + +import pytest + +from app.modules.rag.code_qa_pipeline import ( + CodeChunkItem, + CodeQAPipelineRunner, + EvidenceBundle, + RetrievalRequest, + RetrievalResult, +) +from app.modules.rag.code_qa_pipeline.evidence_gate import evaluate_evidence +from app.modules.rag.code_qa_pipeline.retrieval_request_builder import build_retrieval_request +from app.modules.rag.code_qa_pipeline.retrieval_result_builder import build_retrieval_result +from app.modules.rag.intent_router_v2 import ConversationState, IntentRouterV2 +from tests.unit_tests.rag.intent_router_testkit import repo_context + +_TEST_ROOT = Path(__file__).resolve().parent + + +def _make_router() -> IntentRouterV2: + return IntentRouterV2() + + +def test_router_output_drives_retrieval_request() -> None: + """Router output is directly convertible into RetrievalRequest.""" + router = _make_router() + text = "Открой файл src/mail_order_bot/context.py" + result = router.route(text, ConversationState(), repo_context()) + request = build_retrieval_request(result, "test-session-id") + assert request.rag_session_id == "test-session-id" + assert request.query + assert request.sub_intent == "OPEN_FILE" + assert "context.py" in str(request.path_scope) or request.path_scope + assert "C0_SOURCE_CHUNKS" in request.requested_layers or request.requested_layers + + +def test_retrieval_result_normalized_structure() -> None: + """Retrieval returns normalized RetrievalResult with expected fields.""" + raw = [ + {"layer": "C0_SOURCE_CHUNKS", "path": "src/foo.py", "title": "", "content": "def bar(): pass", "span_start": 1, "span_end": 2, "metadata": {}}, + {"layer": "C1_SYMBOL_CATALOG", "path": "src/foo.py", "title": "bar", "content": "", "metadata": {"symbol_id": "s1"}}, + ] + report = {"executed_layers": ["C0_SOURCE_CHUNKS", "C1_SYMBOL_CATALOG"], "fallback": {"used": False}} + sym = {"status": "resolved", "resolved_symbol": "bar"} + result = build_retrieval_result(raw, report, sym) + assert len(result.code_chunks) == 2 + assert result.resolved_symbol == "bar" + assert result.symbol_resolution_status == "resolved" + assert any(c.layer == "C1_SYMBOL_CATALOG" for c in result.code_chunks) + assert len(result.layer_outcomes) == 2 + + +def test_evidence_gate_open_file_sufficient() -> None: + """OPEN_FILE with resolved path and chunks passes evidence gate.""" + chunk = CodeChunkItem( + layer="C0_SOURCE_CHUNKS", + path="src/context.py", + title="", + content="x", + start_line=1, + end_line=2, + metadata={}, + ) + bundle = EvidenceBundle( + resolved_sub_intent="OPEN_FILE", + resolved_target="src/context.py", + file_candidates=["src/context.py"], + evidence_count=2, + code_chunks=[chunk, chunk], + ) + decision = evaluate_evidence(bundle) + assert decision.passed is True + assert not decision.failure_reasons + + +def test_evidence_gate_open_file_insufficient() -> None: + """OPEN_FILE with no path and no chunks fails evidence gate.""" + bundle = EvidenceBundle( + resolved_sub_intent="OPEN_FILE", + resolved_target=None, + file_candidates=[], + evidence_count=0, + ) + decision = evaluate_evidence(bundle) + assert decision.passed is False + assert "path_scope_empty" in decision.failure_reasons or "layer_c0_empty" in decision.failure_reasons + assert decision.degraded_message + + +def test_evidence_gate_explain_insufficient() -> None: + """EXPLAIN with no symbol resolution and few chunks fails.""" + bundle = EvidenceBundle( + resolved_sub_intent="EXPLAIN", + resolved_target=None, + target_type="symbol", + evidence_count=1, + ) + decision = evaluate_evidence(bundle) + assert decision.passed is False + assert "insufficient_evidence" in decision.failure_reasons or "target_not_resolved" in decision.failure_reasons + + +def test_evidence_gate_find_entrypoints_insufficient() -> None: + """FIND_ENTRYPOINTS with no entrypoints fails.""" + bundle = EvidenceBundle( + resolved_sub_intent="FIND_ENTRYPOINTS", + entrypoints=[], + evidence_count=0, + ) + decision = evaluate_evidence(bundle) + assert decision.passed is False + assert "entrypoints_not_found" in decision.failure_reasons + + +def test_evidence_gate_find_tests_insufficient() -> None: + """FIND_TESTS with no test candidates fails.""" + bundle = EvidenceBundle( + resolved_sub_intent="FIND_TESTS", + resolved_target="Context", + target_symbol_candidates=["Context"], + test_evidence=[], + evidence_count=1, + ) + decision = evaluate_evidence(bundle) + assert decision.passed is False + assert "tests_not_found" in decision.failure_reasons + + +def test_diagnostics_report_has_failure_reasons() -> None: + """Diagnostics report includes machine-readable failure reasons.""" + from app.modules.rag.code_qa_pipeline.diagnostics import build_diagnostics_report + from app.modules.rag.code_qa_pipeline.evidence_bundle_builder import build_evidence_bundle + + router = _make_router() + text = "Где тесты для НесуществующийКласс?" + result = router.route(text, ConversationState(), repo_context()) + request = build_retrieval_request(result, "test-session") + retrieval_result = build_retrieval_result([], {}, {"status": "not_found"}) + bundle = build_evidence_bundle(retrieval_result, result) + evaluate_evidence(bundle) + report = build_diagnostics_report( + router_result=result, + retrieval_request=request, + retrieval_result=retrieval_result, + evidence_bundle=bundle, + answer_mode="degraded", + ) + assert report.answer_mode in ("normal", "degraded", "insufficient") + assert report.per_layer_outcome is not None + assert report.router_result + assert report.retrieval_request + + +def test_canonical_pipeline_with_fake_adapter() -> None: + """Canonical pipeline runs end-to-end with fake adapter; diagnostics and evidence gate applied.""" + + class FakeAdapter: + def __init__(self, rows: list[dict]) -> None: + self._rows = rows + self._report: dict | None = None + + def retrieve_with_plan(self, rag_session_id: str, query: str, retrieval_spec, retrieval_constraints=None, *, query_plan=None) -> list[dict]: + layers = [str(q.layer_id) for q in (retrieval_spec.layer_queries or [])] + self._report = {"executed_layers": layers, "fallback": {"used": False}, "retrieval_by_layer_ms": {}} + return list(self._rows) + + def retrieve_exact_files(self, rag_session_id: str, *, repo_id=None, paths: list, layers=None, limit=200, query="", ranking_profile="") -> list[dict]: + self._report = {"executed_layers": list(layers or ["C0_SOURCE_CHUNKS"]), "fallback": {"used": False}} + return [r for r in self._rows if r.get("path") in paths] + + def hydrate_resolved_symbol_sources(self, rag_session_id: str, base_query: str, rag_rows: list, symbol_resolution: dict, retrieval_spec, retrieval_constraints=None) -> list[dict]: + return list(rag_rows) + + def force_symbol_context_c0(self, rag_session_id: str, *, rag_rows: list, symbol_resolution: dict, limit=20) -> list[dict]: + return list(rag_rows) + + def consume_retrieval_report(self) -> dict | None: + r, self._report = self._report, None + return r + + two_chunks = [ + {"layer": "C0_SOURCE_CHUNKS", "path": "src/context.py", "content": "class Context:", "span_start": 1, "span_end": 2, "metadata": {}}, + {"layer": "C0_SOURCE_CHUNKS", "path": "src/context.py", "content": "def run(self): pass", "span_start": 3, "span_end": 4, "metadata": {}}, + ] + adapter = FakeAdapter(two_chunks) + router = _make_router() + runner = CodeQAPipelineRunner(router=router, retrieval_adapter=adapter, repo_context=repo_context()) + result = runner.run("Открой файл src/context.py", "test-session", run_retrieval=True) + assert result.router_result is not None + assert result.retrieval_request is not None + assert result.retrieval_result is not None + assert result.evidence_bundle is not None + assert result.diagnostics_report is not None + assert result.answer_mode in ("normal", "degraded", "insufficient") + assert result.retrieval_result.code_chunks + assert result.diagnostics_report.router_result + assert result.diagnostics_report.retrieval_request diff --git a/tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/test_cli.py b/tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/test_cli.py new file mode 100644 index 0000000..9fb7df1 --- /dev/null +++ b/tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/test_cli.py @@ -0,0 +1,65 @@ +from __future__ import annotations + +from tests.pipeline_setup.suite_02_pipeline.pipeline_intent_rag.cli import ReindexCliArgs, RunCliArgs, _parse_args + + +def test_cli_parse_run_defaults_with_legacy_syntax() -> None: + parsed = _parse_args(["--mode", "router_only"]) + assert parsed.command == "run" + assert isinstance(parsed.payload, RunCliArgs) + args = parsed.payload + + assert args.mode == "router_only" + assert args.case_ids == () + assert args.test_name == "cli_router_only" + assert args.verbose is False + + +def test_cli_parse_run_with_overrides() -> None: + parsed = _parse_args( + [ + "run", + "--mode", + "router_rag", + "--case-id", + "c1", + "--case-id", + "c2", + "--rag-session-id", + "sid-1", + "--reindex-repo-path", + "/tmp/repo", + "--reindex-project-id", + "proj-1", + "--test-name", + "run-x", + ] + ) + assert parsed.command == "run" + assert isinstance(parsed.payload, RunCliArgs) + args = parsed.payload + + assert args.mode == "router_rag" + assert args.case_ids == ("c1", "c2") + assert args.rag_session_id == "sid-1" + assert args.reindex_repo_path == "/tmp/repo" + assert args.reindex_project_id == "proj-1" + assert args.test_name == "run-x" + assert args.verbose is False + + +def test_cli_parse_run_verbose_alias() -> None: + parsed = _parse_args(["run", "--mode", "router_rag", "--debug"]) + assert parsed.command == "run" + assert isinstance(parsed.payload, RunCliArgs) + assert parsed.payload.verbose is True + + +def test_cli_parse_reindex() -> None: + parsed = _parse_args(["reindex", "--repo-path", "/tmp/repo", "--project-id", "proj-1"]) + assert parsed.command == "reindex" + assert isinstance(parsed.payload, ReindexCliArgs) + args = parsed.payload + + assert args.repo_path == "/tmp/repo" + assert args.project_id == "proj-1" diff --git a/tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/test_diagnostics_jsonl.py b/tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/test_diagnostics_jsonl.py new file mode 100644 index 0000000..98c59af --- /dev/null +++ b/tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/test_diagnostics_jsonl.py @@ -0,0 +1,368 @@ +from __future__ import annotations + +from dataclasses import dataclass +from datetime import datetime + +from app.modules.rag.intent_router_v2.models import ( + CodeRetrievalFilters, + EvidencePolicy, + IntentRouterResult, + LayerQuery, + QueryPlan, + RetrievalConstraints, + RetrievalSpec, + SymbolResolution, +) +from tests.pipeline_setup.suite_02_pipeline.pipeline_intent_rag.helpers.models import PhraseCase +from tests.pipeline_setup.suite_02_pipeline.pipeline_intent_rag.helpers.pipeline_runner import IntentRouterRagPipelineRunner, RouterOnlyRunner + + +@dataclass(slots=True) +class _StaticRouter: + result: IntentRouterResult + + def route(self, *_args, **_kwargs) -> IntentRouterResult: + return self.result + + +class _StaticSessionResolver: + def resolve(self, _case: PhraseCase) -> str: + return "rag-1" + + +class _FakeRagAdapter: + def __init__(self, rows: list[dict]) -> None: + self._rows = rows + self._last_report: dict | None = None + self.exact_calls = 0 + + def retrieve(self, rag_session_id: str, query: str, retrieval_spec, retrieval_constraints=None) -> list[dict]: + path_scope = list(getattr(retrieval_spec.filters, "path_scope", []) or []) + self._last_report = { + "executed_layers": [str(item.layer_id) for item in list(retrieval_spec.layer_queries or [])], + "retrieval_mode_by_layer": {str(item.layer_id): "exact_path_fetch" for item in retrieval_spec.layer_queries}, + "top_k_by_layer": {str(item.layer_id): int(item.top_k) for item in retrieval_spec.layer_queries}, + "filters_by_layer": { + str(item.layer_id): { + "path_scope": list(path_scope), + "include_globs": list(getattr(retrieval_constraints, "include_globs", []) or []), + "exclude_globs": list(getattr(retrieval_constraints, "exclude_globs", []) or []), + "prefer_globs": list(getattr(retrieval_constraints, "prefer_globs", []) or []), + } + for item in retrieval_spec.layer_queries + }, + "requests": [ + { + "layer": str(item.layer_id), + "query": query, + "path_scope": list(path_scope), + "include_globs": list(getattr(retrieval_constraints, "include_globs", []) or []), + "exclude_globs": list(getattr(retrieval_constraints, "exclude_globs", []) or []), + "prefer_globs": list(getattr(retrieval_constraints, "prefer_globs", []) or []), + "top_k": int(item.top_k), + "ranking_profile": str(getattr(retrieval_spec, "rerank_profile", "") or ""), + } + for item in retrieval_spec.layer_queries + ], + "applied": [ + { + "layer": str(item.layer_id), + "effective_path_scope": list(path_scope), + "normalized_include_globs": list(getattr(retrieval_constraints, "include_globs", []) or []), + "normalized_exclude_globs": list(getattr(retrieval_constraints, "exclude_globs", []) or []), + "normalized_prefer_globs": list(getattr(retrieval_constraints, "prefer_globs", []) or []), + "filter_stage": "pre_rank", + "candidates_before_filter": len(self._rows), + "candidates_after_filter": len(self._rows), + } + for item in retrieval_spec.layer_queries + ], + "fallback": {"used": False, "reason": None}, + "retrieval_by_layer_ms": {str(item.layer_id): 1 for item in retrieval_spec.layer_queries}, + } + return list(self._rows) + + def retrieve_with_plan( + self, + rag_session_id: str, + query: str, + retrieval_spec, + retrieval_constraints=None, + *, + query_plan=None, + ) -> list[dict]: + return self.retrieve(rag_session_id, query, retrieval_spec, retrieval_constraints) + + def consume_retrieval_report(self) -> dict | None: + report = self._last_report + self._last_report = None + return report + + def retrieve_exact_files( + self, + *, + rag_session_id: str, + repo_id: str | None = None, + paths: list[str], + layers: list[str] | None = None, + limit: int = 200, + query: str = "", + ranking_profile: str = "", + ) -> list[dict]: + self.exact_calls += 1 + layer = list(layers or ["C0_SOURCE_CHUNKS"])[0] + normalized = list(paths) + matched = [row for row in self._rows if str(row.get("path") or "") in set(normalized)] + self._last_report = { + "executed_layers": [layer], + "retrieval_mode_by_layer": {layer: "exact_path_fetch"}, + "top_k_by_layer": {layer: int(limit)}, + "filters_by_layer": { + layer: { + "path_scope": normalized, + "include_globs": [], + "exclude_globs": [], + "prefer_globs": [], + } + }, + "requests": [ + { + "layer": layer, + "query": query, + "path_scope": normalized, + "include_globs": [], + "exclude_globs": [], + "prefer_globs": [], + "top_k": int(limit), + "ranking_profile": ranking_profile, + } + ], + "applied": [ + { + "layer": layer, + "effective_path_scope": normalized, + "normalized_include_globs": [], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": len(matched), + "candidates_after_filter": len(matched), + } + ], + "fallback": {"used": False, "reason": None}, + "retrieval_by_layer_ms": {layer: 1}, + } + return list(matched) + + def hydrate_resolved_symbol_sources(self, **kwargs) -> list[dict]: + return list(kwargs["rag_rows"]) + + def force_symbol_context_c0(self, rag_session_id: str, *, rag_rows: list[dict], symbol_resolution: dict, limit: int = 20) -> list[dict]: # noqa: ARG002 + return list(rag_rows) + + +def _open_file_result() -> IntentRouterResult: + path_scope = ["src/mail_order_bot/context.py"] + return IntentRouterResult( + intent="CODE_QA", + retrieval_profile="code", + graph_id="CodeQAGraph", + conversation_mode="START", + query_plan=QueryPlan( + raw="Открой файл src/mail_order_bot/context.py", + normalized="Открой файл src/mail_order_bot/context.py", + sub_intent="OPEN_FILE", + keyword_hints=[], + path_hints=list(path_scope), + doc_scope_hints=[], + symbol_candidates=[], + symbol_kind_hint="unknown", + ), + retrieval_spec=RetrievalSpec( + domains=["CODE"], + layer_queries=[LayerQuery(layer_id="C0_SOURCE_CHUNKS", top_k=8)], + filters=CodeRetrievalFilters(test_policy="EXCLUDE", path_scope=list(path_scope), language=[]), + rerank_profile="code", + ), + retrieval_constraints=RetrievalConstraints( + include_globs=list(path_scope), + exclude_globs=["tests/**"], + prefer_globs=[], + test_file_globs=[], + test_symbol_patterns=[], + max_candidates=20, + ), + symbol_resolution=SymbolResolution(status="not_requested"), + evidence_policy=EvidencePolicy(require_spec=False), + ) + + +def _explain_result() -> IntentRouterResult: + return IntentRouterResult( + intent="CODE_QA", + retrieval_profile="code", + graph_id="CodeQAGraph", + conversation_mode="START", + query_plan=QueryPlan( + raw="Объясни как работает Context", + normalized="Объясни как работает Context", + sub_intent="EXPLAIN", + keyword_hints=["Context"], + path_hints=[], + doc_scope_hints=[], + symbol_candidates=["Context"], + symbol_kind_hint="class", + ), + retrieval_spec=RetrievalSpec( + domains=["CODE"], + layer_queries=[LayerQuery(layer_id="C1_SYMBOL_CATALOG", top_k=8), LayerQuery(layer_id="C0_SOURCE_CHUNKS", top_k=8)], + filters=CodeRetrievalFilters(test_policy="EXCLUDE", path_scope=["src/mail_order_bot/context.py"], language=[]), + rerank_profile="code", + ), + retrieval_constraints=RetrievalConstraints( + include_globs=["src/**"], + exclude_globs=["tests/**"], + prefer_globs=[], + test_file_globs=[], + test_symbol_patterns=[], + max_candidates=20, + ), + symbol_resolution=SymbolResolution(status="pending", alternatives=["Context"], confidence=0.0), + evidence_policy=EvidencePolicy(require_spec=False), + ) + + +def test_router_only_diagnostics_contains_router_plan() -> None: + case = PhraseCase(case_id="c1", text="Открой файл src/mail_order_bot/context.py") + runner = RouterOnlyRunner(started_at=datetime(2026, 3, 5, 12, 0, 0), router=_StaticRouter(_open_file_result())) + + record = runner.run_case(case).to_record() + + assert record["summary"]["router"]["intent"] == "CODE_QA" + assert record["summary"]["llm"]["answer_status"] == "partial" + assert record["diagnostics"]["router_plan"]["sub_intent"] == "OPEN_FILE" + assert record["diagnostics"]["router"]["conversation_mode"] == "START" + assert record["diagnostics"]["llm"]["used_evidence_count"] == 0 + assert record["diagnostics"]["execution"]["executed_layers"] == [] + assert record["diagnostics"]["retrieval"] is None + assert record["diagnostics"]["timings_ms"]["router"] >= 0 + + +def test_router_rag_diagnostics_keeps_plan_and_request_scope() -> None: + case = PhraseCase(case_id="c2", text="Открой файл src/mail_order_bot/context.py") + route_result = _open_file_result() + rag_adapter = _FakeRagAdapter( + rows=[ + { + "path": "src/mail_order_bot/context.py", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/mail_order_bot/context.py:1-10", + "content": "class Context: ...", + "metadata": {"repo_id": "MailOrderBot"}, + } + ] + ) + runner = IntentRouterRagPipelineRunner( + started_at=datetime(2026, 3, 5, 12, 0, 0), + rag_adapter=rag_adapter, + session_resolver=_StaticSessionResolver(), + router=_StaticRouter(route_result), + ) + + record = runner.run_case(case).to_record() + diagnostics = record["diagnostics"] + + assert record["summary"]["retrieval"]["layers_hit"] == ["C0_SOURCE_CHUNKS"] + assert diagnostics["router_plan"]["path_scope"] == ["src/mail_order_bot/context.py"] + assert diagnostics["router_plan"]["retrieval_constraints"]["include_globs"] == ["src/mail_order_bot/context.py"] + assert diagnostics["retrieval"]["requests"][0]["path_scope"] == diagnostics["router_plan"]["path_scope"] + assert diagnostics["retrieval"]["symbol_resolution"]["status"] == "not_requested" + assert diagnostics["retrieval"]["layers"][0]["layer"] == "C0_SOURCE_CHUNKS" + assert diagnostics["retrieval"]["fallback"]["used"] is False + assert rag_adapter.exact_calls == 1 + + +def test_open_file_strict_exact_path_returns_only_target_and_no_violation() -> None: + case = PhraseCase(case_id="c4", text="Открой файл src/mail_order_bot/context.py") + rag_adapter = _FakeRagAdapter( + rows=[ + { + "path": "src/mail_order_bot/context.py", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/mail_order_bot/context.py:1-10", + "content": "class Context: ...", + "metadata": {"repo_id": "MailOrderBot"}, + }, + { + "path": "src/mail_order_bot/other.py", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/mail_order_bot/other.py:1-10", + "content": "def helper(): ...", + "metadata": {"repo_id": "MailOrderBot"}, + }, + ] + ) + runner = IntentRouterRagPipelineRunner( + started_at=datetime(2026, 3, 5, 12, 0, 0), + rag_adapter=rag_adapter, + session_resolver=_StaticSessionResolver(), + router=_StaticRouter(_open_file_result()), + ) + + result = runner.run_case(case) + record = result.to_record() + diagnostics = record["diagnostics"] + + assert result.rag_rows + assert all(str(row.get("path") or "") == "src/mail_order_bot/context.py" for row in result.rag_rows) + assert diagnostics["execution"]["filters_by_layer"]["C0_SOURCE_CHUNKS"]["path_scope"] == [ + "src/mail_order_bot/context.py" + ] + assert diagnostics["retrieval"]["applied"][0]["effective_path_scope"] == ["src/mail_order_bot/context.py"] + assert diagnostics["retrieval"]["fallback"]["used"] is False + assert diagnostics["constraint_violations"] == [] + + +def test_router_rag_open_file_violation_is_reported_when_target_file_not_returned() -> None: + case = PhraseCase(case_id="c3", text="Открой файл src/mail_order_bot/context.py") + rag_adapter = _FakeRagAdapter( + rows=[ + { + "path": "src/mail_order_bot/other.py", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/mail_order_bot/other.py:1-10", + "content": "def helper(): ...", + "metadata": {"repo_id": "MailOrderBot"}, + } + ] + ) + runner = IntentRouterRagPipelineRunner( + started_at=datetime(2026, 3, 5, 12, 0, 0), + rag_adapter=rag_adapter, + session_resolver=_StaticSessionResolver(), + router=_StaticRouter(_open_file_result()), + ) + + record = runner.run_case(case).to_record() + violation_types = [item["type"] for item in record["diagnostics"]["constraint_violations"]] + + assert "PATH_SCOPE_NOT_SATISFIED" in violation_types + + +def test_explain_with_symbol_candidates_returns_empty_rag_when_symbol_not_resolved() -> None: + case = PhraseCase(case_id="c5", text="Объясни как работает Context") + rag_adapter = _FakeRagAdapter(rows=[]) + runner = IntentRouterRagPipelineRunner( + started_at=datetime(2026, 3, 5, 12, 0, 0), + rag_adapter=rag_adapter, + session_resolver=_StaticSessionResolver(), + router=_StaticRouter(_explain_result()), + ) + + result = runner.run_case(case) + record = result.to_record() + violation_types = [item["type"] for item in record["diagnostics"]["constraint_violations"]] + + assert result.rag_rows == [] + assert record["diagnostics"]["retrieval"]["fallback"]["used"] is False + assert "SYMBOL_RESOLUTION_FAILED" in violation_types diff --git a/tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/test_intent_router_only_matrix.py b/tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/test_intent_router_only_matrix.py new file mode 100644 index 0000000..dee8e9c --- /dev/null +++ b/tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/test_intent_router_only_matrix.py @@ -0,0 +1,20 @@ +from __future__ import annotations + +from pathlib import Path + +import pytest + +from tests.pipeline_setup.suite_02_pipeline.pipeline_intent_rag.helpers.runtime import PipelineRuntime + +_TEST_ROOT = Path(__file__).resolve().parent +_RUNTIME = PipelineRuntime(mode="router_only", test_name="test_intent_router_only_matrix", test_root=_TEST_ROOT) +_CASES = _RUNTIME.load_cases() + + +@pytest.mark.parametrize("case", _CASES, ids=lambda item: item.case_id) +def test_intent_router_only_matrix(case) -> None: + result = _RUNTIME.run_router_only(case) + + assert result.intent in {"CODE_QA", "DOCS_QA", "GENERATE_DOCS_FROM_CODE", "PROJECT_MISC"} + if case.expected_intent: + assert result.intent == case.expected_intent diff --git a/tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/test_intent_router_rag_llm_pipeline.py b/tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/test_intent_router_rag_llm_pipeline.py new file mode 100644 index 0000000..1bb333e --- /dev/null +++ b/tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/test_intent_router_rag_llm_pipeline.py @@ -0,0 +1,31 @@ +from __future__ import annotations + +from pathlib import Path + +import pytest + +from tests.pipeline_setup.suite_02_pipeline.pipeline_intent_rag.helpers.pipeline_config import mode_enabled +from tests.pipeline_setup.suite_02_pipeline.pipeline_intent_rag.helpers.runtime import PipelineRuntime + +pytestmark = pytest.mark.full_chain + +_TEST_ROOT = Path(__file__).resolve().parent +_RUNTIME = PipelineRuntime(mode="full_chain", test_name="test_intent_router_rag_llm_pipeline", test_root=_TEST_ROOT) +_CASES = _RUNTIME.load_cases() + + +@pytest.mark.skipif(not mode_enabled("full_chain", _TEST_ROOT), reason="set RUN_INTENT_PIPELINE_FULL_CHAIN=1 to run") +@pytest.mark.parametrize("case", _CASES, ids=lambda item: item.case_id) +def test_intent_router_rag_llm_pipeline(case) -> None: + pytest.importorskip("sqlalchemy", reason="full_chain integration requires sqlalchemy dependency") + + try: + result = _RUNTIME.run_full_chain(case) + except ValueError as exc: + pytest.skip(str(exc)) + + if case.expected_intent: + assert result.intent == case.expected_intent + if case.expect_non_empty_rag: + assert result.rag_rows, f"RAG returned empty list for case={case.case_id} rag_session_id={result.rag_session_id}" + assert (result.llm_answer or "").strip(), "LLM answer must not be empty" diff --git a/tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/test_intent_router_rag_pipeline.py b/tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/test_intent_router_rag_pipeline.py new file mode 100644 index 0000000..3cd75e8 --- /dev/null +++ b/tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/test_intent_router_rag_pipeline.py @@ -0,0 +1,27 @@ +from __future__ import annotations + +from pathlib import Path + +import pytest + +from tests.pipeline_setup.suite_02_pipeline.pipeline_intent_rag.helpers.pipeline_config import mode_enabled +from tests.pipeline_setup.suite_02_pipeline.pipeline_intent_rag.helpers.runtime import PipelineRuntime + +pytestmark = pytest.mark.router_rag + +_TEST_ROOT = Path(__file__).resolve().parent +_RUNTIME = PipelineRuntime(mode="router_rag", test_name="test_intent_router_rag_pipeline", test_root=_TEST_ROOT) +_CASES = _RUNTIME.load_cases() + + +@pytest.mark.skipif(not mode_enabled("router_rag", _TEST_ROOT), reason="set RUN_INTENT_PIPELINE_ROUTER_RAG=1 to run") +@pytest.mark.parametrize("case", _CASES, ids=lambda item: item.case_id) +def test_intent_router_rag_pipeline(case) -> None: + pytest.importorskip("sqlalchemy", reason="router_rag integration requires sqlalchemy dependency") + + result = _RUNTIME.run_router_rag(case) + + if case.expected_intent: + assert result.intent == case.expected_intent + if case.expect_non_empty_rag: + assert result.rag_rows, f"RAG returned empty list for case={case.case_id} rag_session_id={result.rag_session_id}" diff --git a/tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/test_llm_answerer_context.py b/tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/test_llm_answerer_context.py new file mode 100644 index 0000000..b08a180 --- /dev/null +++ b/tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/test_llm_answerer_context.py @@ -0,0 +1,80 @@ +from __future__ import annotations + +from tests.pipeline_setup.suite_02_pipeline.pipeline_intent_rag.helpers.prompt_payload_builder import PromptPayloadBuilder + + +def test_build_prompt_payload_includes_layer_guide_and_explain_quotas() -> None: + builder = PromptPayloadBuilder() + rag_rows = [ + {"layer": "C1_SYMBOL_CATALOG", "path": "src/context.py", "title": "Context", "content": "class Context"}, + {"layer": "C1_SYMBOL_CATALOG", "path": "src/other.py", "title": "Other", "content": "class Other"}, + {"layer": "C0_SOURCE_CHUNKS", "path": "src/context.py", "title": "Context chunk 1", "content": "def start(self): pass"}, + {"layer": "C0_SOURCE_CHUNKS", "path": "src/context.py", "title": "Context chunk 2", "content": "def stop(self): pass"}, + {"layer": "C0_SOURCE_CHUNKS", "path": "src/context.py", "title": "Context chunk 3", "content": "def status(self): pass"}, + {"layer": "C2_DEPENDENCY_GRAPH", "path": "src/context.py", "title": "Context->Worker", "content": "Context calls Worker"}, + {"layer": "C4_SEMANTIC_ROLES", "path": "src/context.py", "title": "Context", "content": "role: pipeline_stage"}, + {"layer": "C4_SEMANTIC_ROLES", "path": "src/control.py", "title": "ControlChannel", "content": "role: model"}, + {"layer": "C3_ENTRYPOINTS", "path": "src/main.py", "title": "main", "content": "entrypoint"}, + ] + + payload = builder.build( + "Объясни как работает Context", + rag_rows, + prompt_template={"template_id": "t", "system_prompt": "sys", "task_prompt": "task"}, + sub_intent="EXPLAIN", + default_system_prompt="sys-default", + default_task_prompt="task-default", + default_template_id="default", + system_prompt_version="v1", + ) + user_prompt = payload["user_prompt"] + + assert "Как интерпретировать слои RAG" in user_prompt + assert user_prompt.count("[C1_SYMBOL_CATALOG]") == 1 + assert user_prompt.count("[C0_SOURCE_CHUNKS]") == 2 + assert user_prompt.count("[C2_DEPENDENCY_GRAPH]") == 1 + assert user_prompt.count("[C4_SEMANTIC_ROLES]") == 1 + assert user_prompt.count("[C3_ENTRYPOINTS]") == 1 + + +def test_find_entrypoints_prompt_prefers_http_route_rows() -> None: + builder = PromptPayloadBuilder() + rag_rows = [ + { + "layer": "C3_ENTRYPOINTS", + "path": "src/app.py", + "title": "candidate", + "content": "lifecycle start", + "metadata": {"entry_type": "startup"}, + }, + { + "layer": "C3_ENTRYPOINTS", + "path": "src/http_app.py", + "title": "GET /health declared in HttpControlAppFactory", + "content": "raw", + "metadata": { + "http_method": "GET", + "route_path": "/health", + "declaring_symbol": "HttpControlAppFactory", + "handler_symbol": "HttpControlAppFactory.create.health", + "decorator_text": "@app.get('/health')", + "summary_text": "GET /health declared in HttpControlAppFactory", + }, + }, + ] + + payload = builder.build( + "Где health endpoint?", + rag_rows, + prompt_template={"template_id": "t", "system_prompt": "sys", "task_prompt": "task"}, + sub_intent="FIND_ENTRYPOINTS", + default_system_prompt="sys-default", + default_task_prompt="task-default", + default_template_id="default", + system_prompt_version="v1", + ) + user_prompt = payload["user_prompt"] + + assert "GET /health declared in HttpControlAppFactory" in user_prompt + assert "Declared in: HttpControlAppFactory" in user_prompt + assert "Handler: HttpControlAppFactory.create.health" in user_prompt diff --git a/tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/test_llm_prompt_catalog.py b/tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/test_llm_prompt_catalog.py new file mode 100644 index 0000000..0609aa5 --- /dev/null +++ b/tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/test_llm_prompt_catalog.py @@ -0,0 +1,49 @@ +from __future__ import annotations + +from pathlib import Path + +from tests.pipeline_setup.suite_02_pipeline.pipeline_intent_rag.helpers.llm_prompt_loader import LlmPromptCatalogLoader + +_PROMPT_CATALOG = Path(__file__).resolve().parents[3] / "pipeline_setup_v2" / "llm_prompts.yaml" + + +def test_prompt_catalog_loads_intent_templates() -> None: + loader = LlmPromptCatalogLoader() + catalog = loader.load(_PROMPT_CATALOG) + + code_prompt = loader.select_for_intent(catalog, "CODE_QA") + + assert code_prompt["template_id"] == "intent_code_qa_v5" + assert "senior Python-инженер" in code_prompt["system_prompt"] + assert "естественным инженерным языком" in code_prompt["task_prompt"] + + +def test_prompt_catalog_prefers_sub_intent_template() -> None: + loader = LlmPromptCatalogLoader() + catalog = loader.load(_PROMPT_CATALOG) + + prompt = loader.select(catalog, intent="CODE_QA", sub_intent="FIND_TESTS") + + assert prompt["template_id"] == "intent_code_qa_find_tests_ru_v4" + assert "тестовое покрытие" in prompt["system_prompt"] + assert "прямых тестов нет" in prompt["task_prompt"] + + +def test_prompt_catalog_falls_back_to_intent_template_for_unknown_sub_intent() -> None: + loader = LlmPromptCatalogLoader() + catalog = loader.load(_PROMPT_CATALOG) + + prompt = loader.select(catalog, intent="CODE_QA", sub_intent="UNKNOWN_SUB_INTENT") + + assert prompt["template_id"] == "intent_code_qa_v5" + assert "естественным инженерным языком" in prompt["task_prompt"] + + +def test_prompt_catalog_falls_back_to_default_for_unknown_intent() -> None: + loader = LlmPromptCatalogLoader() + catalog = loader.load(_PROMPT_CATALOG) + + prompt = loader.select_for_intent(catalog, "UNKNOWN_INTENT") + + assert prompt["template_id"] == "intent_default_v2" + assert "технический ассистент" in prompt["system_prompt"] diff --git a/tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/test_phrase_catalog.py b/tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/test_phrase_catalog.py new file mode 100644 index 0000000..7285292 --- /dev/null +++ b/tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/test_phrase_catalog.py @@ -0,0 +1,25 @@ +from __future__ import annotations + +from pathlib import Path + +from tests.pipeline_setup.suite_02_pipeline.pipeline_intent_rag.helpers.phrases_loader import PhraseCatalogLoader + + +def test_phrase_catalog_has_cases_and_unique_ids() -> None: + path = Path(__file__).resolve().parent / "fixtures" / "phrases.yaml" + cases = PhraseCatalogLoader().load(path) + + assert len(cases) >= 5 + case_ids = [item.case_id for item in cases] + assert len(case_ids) == len(set(case_ids)) + assert all(item.text for item in cases) + + +def test_phrase_catalog_has_tags_for_all_iterations() -> None: + path = Path(__file__).resolve().parent / "fixtures" / "phrases.yaml" + loader = PhraseCatalogLoader() + cases = loader.load(path) + + assert loader.filter_by_tag(cases, "router_only") + assert loader.filter_by_tag(cases, "router_rag") + assert loader.filter_by_tag(cases, "full_chain") diff --git a/tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/test_rag_db_adapter.py b/tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/test_rag_db_adapter.py new file mode 100644 index 0000000..78721ac --- /dev/null +++ b/tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/test_rag_db_adapter.py @@ -0,0 +1,312 @@ +from __future__ import annotations + +from dataclasses import dataclass +from types import SimpleNamespace + +from tests.pipeline_setup.suite_02_pipeline.pipeline_intent_rag.helpers.rag_db_adapter import RagDbAdapter + + +@dataclass(slots=True) +class _LayerQuery: + layer_id: str + top_k: int + + +class _FakeDimResolver: + def resolve(self, rag_session_id: str) -> int: # noqa: ARG002 + return 4 + + +class _RecordingRepository: + def __init__(self) -> None: + self.retrieve_calls: list[dict] = [] + self.retrieve_lexical_calls: list[dict] = [] + self.retrieve_exact_calls: list[dict] = [] + + def retrieve(self, rag_session_id: str, query_embedding: list[float], **kwargs) -> list[dict]: # noqa: ARG002 + self.retrieve_calls.append(kwargs) + layer = list(kwargs.get("layers") or [""])[0] + if layer == "C1_SYMBOL_CATALOG": + return [ + { + "path": "src/context.py", + "content": "class Context", + "layer": layer, + "title": "Context", + "span_start": 10, + "span_end": 20, + "metadata": {"symbol_id": "sym-1", "qname": "Context", "kind": "class"}, + }, + { + "path": "src/context.py", + "content": "class Context duplicate", + "layer": layer, + "title": "Context", + "span_start": 10, + "span_end": 20, + "metadata": {"symbol_id": "sym-1", "qname": "Context", "kind": "class"}, + }, + ] + if layer == "C0_SOURCE_CHUNKS": + return [ + { + "path": "src/context.py", + "content": "class Context: ...", + "layer": layer, + "title": "src/context.py:Context", + "span_start": 10, + "span_end": 30, + "metadata": {"chunk_index": 0, "blob_sha": "blob-1"}, + }, + { + "path": "src/context.py", + "content": "class Context: ... duplicate", + "layer": layer, + "title": "src/context.py:Context", + "span_start": 10, + "span_end": 30, + "metadata": {"chunk_index": 1, "blob_sha": "blob-1"}, + }, + ] + if layer == "C2_DEPENDENCY_GRAPH": + return [ + { + "path": "src/context.py", + "content": "Context.set writes_attr Context.data", + "layer": layer, + "title": "Context.set:writes_attr", + "span_start": 40, + "span_end": 40, + "metadata": {"edge_id": "edge-1"}, + } + ] + if layer == "C4_SEMANTIC_ROLES": + return [ + { + "path": "src/context.py", + "content": "Context\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes", + "layer": layer, + "title": "Context", + "span_start": 10, + "span_end": 30, + "lexical_rank": 0, + "structural_rank": 10, + "metadata": {"symbol_name": "Context", "qname": "Context", "role": "pipeline_stage"}, + }, + { + "path": "src/control.py", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "layer": layer, + "title": "ControlChannel", + "span_start": 1, + "span_end": 20, + "lexical_rank": 3, + "structural_rank": 40, + "metadata": {"symbol_name": "ControlChannel", "qname": "ControlChannel", "role": "model"}, + }, + ] + return [] + + def retrieve_lexical_code(self, rag_session_id: str, **kwargs) -> list[dict]: # noqa: ARG002 + self.retrieve_lexical_calls.append(kwargs) + return [] + + def retrieve_exact_files( + self, + rag_session_id: str, + *, + repo_id: str | None = None, + paths: list[str], + layers: list[str] | None = None, + limit: int = 200, + ) -> list[dict]: # noqa: ARG002 + self.retrieve_exact_calls.append({"paths": list(paths), "layers": list(layers or []), "limit": limit}) + return [ + { + "path": "src/context.py", + "content": "class Context: ...", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/context.py:Context", + "span_start": 10, + "span_end": 30, + "metadata": {"chunk_index": 0, "blob_sha": "blob-1"}, + }, + { + "path": "src/context.py", + "content": "class Context: duplicate", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/context.py:Context", + "span_start": 10, + "span_end": 30, + "metadata": {"chunk_index": 1, "blob_sha": "blob-1"}, + }, + ] + + +def _spec() -> SimpleNamespace: + return SimpleNamespace( + layer_queries=[ + _LayerQuery(layer_id="C1_SYMBOL_CATALOG", top_k=2), + _LayerQuery(layer_id="C0_SOURCE_CHUNKS", top_k=3), + _LayerQuery(layer_id="C2_DEPENDENCY_GRAPH", top_k=1), + ], + filters=SimpleNamespace(path_scope=[], test_policy="EXCLUDE"), + ) + + +def _constraints() -> SimpleNamespace: + return SimpleNamespace( + include_globs=["src/**"], + exclude_globs=["tests/**"], + prefer_globs=["tests/**"], + test_file_globs=[], + test_symbol_patterns=[], + ) + + +def test_retrieve_applies_per_layer_budget_and_dedupe() -> None: + repository = _RecordingRepository() + adapter = RagDbAdapter(repository=repository, dim_resolver=_FakeDimResolver()) + + rows = adapter.retrieve("rag-1", "Explain Context", _spec(), _constraints()) + + assert [call["limit"] for call in repository.retrieve_calls[:3]] == [2, 3, 1] + assert repository.retrieve_calls[0]["layers"] == ["C1_SYMBOL_CATALOG"] + assert repository.retrieve_calls[1]["layers"] == ["C0_SOURCE_CHUNKS"] + assert repository.retrieve_calls[2]["layers"] == ["C2_DEPENDENCY_GRAPH"] + assert repository.retrieve_calls[0]["prefer_path_prefixes"] == ["tests"] + assert len([row for row in rows if row["layer"] == "C1_SYMBOL_CATALOG"]) == 1 + assert len([row for row in rows if row["layer"] == "C0_SOURCE_CHUNKS"]) == 1 + assert len([row for row in rows if row["layer"] == "C2_DEPENDENCY_GRAPH"]) == 1 + + +def test_hydrate_resolved_symbol_adds_overlapping_c0_chunk() -> None: + repository = _RecordingRepository() + adapter = RagDbAdapter(repository=repository, dim_resolver=_FakeDimResolver()) + rag_rows = [ + { + "path": "src/context.py", + "content": "class Context", + "layer": "C1_SYMBOL_CATALOG", + "title": "Context", + "span_start": 10, + "span_end": 20, + "metadata": {"symbol_id": "sym-1", "qname": "Context", "blob_sha": "blob-1"}, + } + ] + spec = _spec() + constraints = _constraints() + + rows = adapter.hydrate_resolved_symbol_sources( + rag_session_id="rag-1", + base_query="Explain Context", + rag_rows=rag_rows, + symbol_resolution={ + "status": "resolved", + "resolved_symbol": "Context", + "alternatives": ["Context", "Context.set"], + }, + retrieval_spec=spec, + retrieval_constraints=constraints, + ) + + c0_rows = [row for row in rows if row["layer"] == "C0_SOURCE_CHUNKS"] + assert len(c0_rows) == 1 + assert c0_rows[0]["path"] == "src/context.py" + + +def test_retrieve_exact_files_keeps_exact_scope_and_disables_fallback() -> None: + repository = _RecordingRepository() + adapter = RagDbAdapter(repository=repository, dim_resolver=_FakeDimResolver()) + + rows = adapter.retrieve_exact_files( + "rag-1", + paths=["./src//context.py"], + layers=["C0_SOURCE_CHUNKS"], + limit=200, + query="open file", + ranking_profile="code", + ) + report = adapter.consume_retrieval_report() + + assert repository.retrieve_exact_calls[0]["paths"] == ["src/context.py"] + assert repository.retrieve_exact_calls[0]["layers"] == ["C0_SOURCE_CHUNKS"] + assert len(rows) == 1 + assert rows[0]["path"] == "src/context.py" + assert report is not None + assert report["fallback"]["used"] is False + assert report["applied"][0]["effective_path_scope"] == ["src/context.py"] + + +def test_explain_symbol_candidates_use_symbol_query_and_symbol_search_mode() -> None: + repository = _RecordingRepository() + adapter = RagDbAdapter(repository=repository, dim_resolver=_FakeDimResolver()) + spec = _spec() + query_plan = SimpleNamespace(sub_intent="EXPLAIN", symbol_candidates=["Context"], symbol_kind_hint="class") + + rows = adapter.retrieve_with_plan( + "rag-1", + "Объясни как работает Context", + spec, + _constraints(), + query_plan=query_plan, + ) + report = adapter.consume_retrieval_report() + + assert rows + assert repository.retrieve_calls[0]["query_text"] == "Context" + assert report is not None + assert report["retrieval_mode_by_layer"]["C1_SYMBOL_CATALOG"] == "symbol_search" + + +def test_explain_symbol_mode_disables_scope_relaxation_fallback() -> None: + class _NoHitRepository(_RecordingRepository): + def retrieve(self, rag_session_id: str, query_embedding: list[float], **kwargs) -> list[dict]: # noqa: ARG002 + self.retrieve_calls.append(kwargs) + if kwargs.get("path_prefixes") is not None: + return [] + return [{"path": "src/other.py", "layer": "C1_SYMBOL_CATALOG", "title": "Other", "metadata": {"kind": "class"}}] + + repository = _NoHitRepository() + adapter = RagDbAdapter(repository=repository, dim_resolver=_FakeDimResolver()) + spec = SimpleNamespace( + layer_queries=[_LayerQuery(layer_id="C1_SYMBOL_CATALOG", top_k=2)], + filters=SimpleNamespace(path_scope=["src/context.py"], test_policy="EXCLUDE"), + rerank_profile="code", + ) + query_plan = SimpleNamespace(sub_intent="EXPLAIN", symbol_candidates=["Context"], symbol_kind_hint="class") + + rows = adapter.retrieve_with_plan("rag-1", "Explain Context", spec, _constraints(), query_plan=query_plan) + report = adapter.consume_retrieval_report() + + assert rows == [] + assert len(repository.retrieve_calls) == 1 + assert repository.retrieve_calls[0]["path_prefixes"] == ["src/context.py"] + assert report is not None + + +def test_explain_symbol_mode_uses_symbol_query_for_non_c1_layers_and_filters_c4_noise() -> None: + repository = _RecordingRepository() + adapter = RagDbAdapter(repository=repository, dim_resolver=_FakeDimResolver()) + spec = SimpleNamespace( + layer_queries=[ + _LayerQuery(layer_id="C1_SYMBOL_CATALOG", top_k=2), + _LayerQuery(layer_id="C4_SEMANTIC_ROLES", top_k=4), + ], + filters=SimpleNamespace(path_scope=[], test_policy="EXCLUDE"), + rerank_profile="code", + ) + query_plan = SimpleNamespace(sub_intent="EXPLAIN", symbol_candidates=["Context"], symbol_kind_hint="class") + + rows = adapter.retrieve_with_plan("rag-1", "Объясни как работает Context", spec, _constraints(), query_plan=query_plan) + report = adapter.consume_retrieval_report() + + c4_calls = [call for call in repository.retrieve_calls if call["layers"] == ["C4_SEMANTIC_ROLES"]] + c4_rows = [row for row in rows if row["layer"] == "C4_SEMANTIC_ROLES"] + + assert c4_calls + assert c4_calls[0]["query_text"] == "Context" + assert len(c4_rows) == 1 + assert c4_rows[0]["title"] == "Context" + assert report is not None + assert report["fallback"]["used"] is False diff --git a/tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/test_repo_indexer_collector.py b/tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/test_repo_indexer_collector.py new file mode 100644 index 0000000..782303b --- /dev/null +++ b/tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/test_repo_indexer_collector.py @@ -0,0 +1,18 @@ +from __future__ import annotations + +from tests.pipeline_setup.utils.rag_indexer import LocalRepoFileCollector + + +def test_local_repo_file_collector_skips_hidden_and_pycache_paths(tmp_path) -> None: + (tmp_path / ".env").write_text("A=1", encoding="utf-8") + (tmp_path / ".venv").mkdir() + (tmp_path / ".venv" / "lib.py").write_text("x=1", encoding="utf-8") + (tmp_path / "src").mkdir() + (tmp_path / "src" / "__pycache__").mkdir() + (tmp_path / "src" / "__pycache__" / "cache.py").write_text("x=2", encoding="utf-8") + (tmp_path / "src" / ".hidden.py").write_text("x=3", encoding="utf-8") + (tmp_path / "src" / "main.py").write_text("def main():\n return 1\n", encoding="utf-8") + + files = LocalRepoFileCollector(tmp_path).collect() + + assert [item["path"] for item in files] == ["src/main.py"] diff --git a/tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/test_router_constraints_contract.py b/tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/test_router_constraints_contract.py new file mode 100644 index 0000000..fdda1c0 --- /dev/null +++ b/tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/test_router_constraints_contract.py @@ -0,0 +1,140 @@ +from __future__ import annotations + +from pathlib import Path + +from app.modules.rag.intent_router_v2 import ConversationState, IntentRouterV2 +from tests.pipeline_setup.suite_02_pipeline.pipeline_intent_rag.helpers.phrases_loader import PhraseCatalogLoader +from tests.unit_tests.rag.intent_router_testkit import repo_context + + +def _by_id(case_id: str): + cases = PhraseCatalogLoader().load(Path(__file__).resolve().parent / "fixtures" / "phrases.yaml") + for case in cases: + if case.case_id == case_id: + return case + raise AssertionError(f"case {case_id} not found") + + +def test_show_file_phrase_maps_to_open_file() -> None: + case = _by_id("code-open-abstract-task") + result = IntentRouterV2().route(case.text, ConversationState(), repo_context()) + + assert result.query_plan.sub_intent == "OPEN_FILE" + assert [item.layer_id for item in result.retrieval_spec.layer_queries] == ["C0_SOURCE_CHUNKS"] + assert result.query_plan.path_hints + assert result.query_plan.keyword_hints == [] + assert result.query_plan.symbol_candidates == [] + assert result.retrieval_constraints.fuzzy_symbol_search.enabled is False + + +def test_find_tests_prefers_test_scope() -> None: + case = _by_id("code-find-tests-for-context") + result = IntentRouterV2().route(case.text, ConversationState(), repo_context()) + + assert result.query_plan.sub_intent == "FIND_TESTS" + assert "tests/**" in result.retrieval_constraints.prefer_globs + layers = [item.layer_id for item in result.retrieval_spec.layer_queries] + assert "C3_ENTRYPOINTS" not in layers + + +def test_explain_function_has_symbol_kind_hint() -> None: + case = _by_id("code-explain-handle-errors") + result = IntentRouterV2().route(case.text, ConversationState(), repo_context()) + + assert result.query_plan.symbol_kind_hint == "function" + assert "tests/**" in result.retrieval_constraints.exclude_globs + assert result.symbol_resolution.status == "pending" + + +def test_followup_marker_sets_followup_likely_mode() -> None: + router = IntentRouterV2() + first = router.route("Открой файл src/mail_order_bot/context.py", ConversationState(), repo_context()) + state = ConversationState().advance(first) + + second = router.route("Теперь объясни функцию handle_errors", state, repo_context()) + + assert second.conversation_mode == "FOLLOWUP_LIKELY" + assert second.query_plan.symbol_candidates == ["handle_errors"] + + +def test_docs_profile_uses_docs_constraints_and_disables_symbol_resolution() -> None: + case = _by_id("docs-about-readme-deploy") + result = IntentRouterV2().route(case.text, ConversationState(), repo_context()) + + assert result.retrieval_profile == "docs" + assert result.symbol_resolution.status == "not_requested" + assert result.query_plan.symbol_candidates == [] + assert result.query_plan.symbol_kind_hint == "unknown" + assert "README_DEPLOY.md" in result.retrieval_constraints.include_globs + assert "src/**" not in result.retrieval_constraints.include_globs + assert any(item in result.query_plan.keyword_hints for item in ["deploy", "deployment", "docker", "compose"]) + + +def test_docs_path_scope_prefers_scoped_layers() -> None: + case = _by_id("docs-about-readme-deploy") + result = IntentRouterV2().route(case.text, ConversationState(), repo_context()) + + layers = [item.layer_id for item in result.retrieval_spec.layer_queries] + assert layers == ["D3_SECTION_INDEX", "D2_FACT_INDEX"] + + +def test_trace_flow_phrase_maps_to_trace_flow_sub_intent() -> None: + result = IntentRouterV2().route("Покажи поток данных для Context.data", ConversationState(), repo_context()) + + assert result.query_plan.sub_intent == "TRACE_FLOW" + layer_ids = [item.layer_id for item in result.retrieval_spec.layer_queries] + assert "C2_DEPENDENCY_GRAPH" in layer_ids + assert "C3_ENTRYPOINTS" in layer_ids + assert result.evidence_policy.require_flow is True + + +def test_explain_sub_intent_keeps_entrypoints_for_execution_trace_retrieval() -> None: + result = IntentRouterV2().route("Объясни как работает Context", ConversationState(), repo_context()) + + assert result.query_plan.sub_intent == "EXPLAIN" + layer_ids = [item.layer_id for item in result.retrieval_spec.layer_queries] + assert "C3_ENTRYPOINTS" in layer_ids + assert "C4_SEMANTIC_ROLES" in layer_ids + + +def test_architecture_phrase_uses_architecture_sub_intent_and_semantic_roles_layer() -> None: + result = IntentRouterV2().route("Какие сервисы и обработчики есть в архитектуре?", ConversationState(), repo_context()) + + assert result.query_plan.sub_intent == "ARCHITECTURE" + layer_ids = [item.layer_id for item in result.retrieval_spec.layer_queries] + assert layer_ids[0] == "C4_SEMANTIC_ROLES" + assert "C2_DEPENDENCY_GRAPH" in layer_ids + assert "C3_ENTRYPOINTS" in layer_ids + + +def test_endpoint_phrase_maps_to_find_entrypoints() -> None: + result = IntentRouterV2().route("Где health endpoint?", ConversationState(), repo_context()) + + assert result.query_plan.sub_intent == "FIND_ENTRYPOINTS" + layer_ids = [item.layer_id for item in result.retrieval_spec.layer_queries] + assert layer_ids == ["C3_ENTRYPOINTS", "C0_SOURCE_CHUNKS"] + + +def test_request_flow_phrase_prefers_trace_flow_over_explain() -> None: + result = IntentRouterV2().route( + "Покажи как проходит запрос /health в HttpControlAppFactory", + ConversationState(), + repo_context(), + ) + + assert result.query_plan.sub_intent == "TRACE_FLOW" + layer_ids = [item.layer_id for item in result.retrieval_spec.layer_queries] + assert "C2_DEPENDENCY_GRAPH" in layer_ids + assert "C3_ENTRYPOINTS" in layer_ids + + +def test_flow_phrase_with_start_prefers_trace_flow_over_entrypoints() -> None: + result = IntentRouterV2().route( + "Покажи поток выполнения при запуске RuntimeManager", + ConversationState(), + repo_context(), + ) + + assert result.query_plan.sub_intent == "TRACE_FLOW" + layer_ids = [item.layer_id for item in result.retrieval_spec.layer_queries] + assert "C2_DEPENDENCY_GRAPH" in layer_ids diff --git a/tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/test_runtime_full_chain_output.py b/tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/test_runtime_full_chain_output.py new file mode 100644 index 0000000..4152d3b --- /dev/null +++ b/tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/test_runtime_full_chain_output.py @@ -0,0 +1,250 @@ +from __future__ import annotations + +from datetime import datetime +from pathlib import Path +from types import SimpleNamespace + +from tests.pipeline_setup.suite_02_pipeline.pipeline_intent_rag.helpers.models import PhraseCase, PipelineResult +from tests.pipeline_setup.suite_02_pipeline.pipeline_intent_rag.helpers.runtime import PipelineRuntime + + +class _FakeAnswerer: + def build_prompt_payload( + self, + query: str, + rag_rows: list[dict], + *, + prompt_template: dict | None = None, + sub_intent: str | None = None, + ) -> dict: + return { + "system_prompt": "sys", + "user_prompt": f"q={query} rows={len(rag_rows)} sub={sub_intent}", + "diagnostics": { + "prompt_stats": {"tokens_in_estimate": 10, "evidence_rows": len(rag_rows), "evidence_chars": 100}, + "evidence_summary": [], + "prompt_template_id": str((prompt_template or {}).get("template_id") or "t"), + "system_prompt_version": "v1", + }, + } + + def answer_from_payload(self, payload: dict) -> str: + return "ok" + + +class _ShouldNotBeCalledAnswerer: + def __init__(self) -> None: + raise AssertionError("LLM should not be instantiated for missing OPEN_FILE") + + +class _FakeModel: + def __init__(self, **payload) -> None: + self.__dict__.update(payload) + + def model_dump(self) -> dict: + return dict(self.__dict__) + + +def _fake_executor_result( + *, + query: str, + sub_intent: str, + rag_rows: list[dict], + final_answer: str, + answer_mode: str, + llm_used: bool, + validation_reasons: list[str], + path_scope: list[str] | None = None, + symbol_candidates: list[str] | None = None, + symbol_resolution: dict | None = None, + layers: list[str] | None = None, +) -> SimpleNamespace: + return SimpleNamespace( + final_answer=final_answer, + answer_mode=answer_mode, + llm_used=llm_used, + validation=SimpleNamespace(reasons=validation_reasons), + retrieval_result=SimpleNamespace(raw_rows=rag_rows), + router_result=SimpleNamespace( + query_plan=SimpleNamespace(symbol_candidates=symbol_candidates or []), + symbol_resolution=_FakeModel(**(symbol_resolution or {"status": "not_requested", "resolved_symbol": None, "alternatives": [], "confidence": 0.0})), + ), + diagnostics=SimpleNamespace( + router_result={ + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "sub_intent": sub_intent, + }, + retrieval_request={ + "query": query, + "path_scope": path_scope or [], + "requested_layers": layers or [], + }, + timings_ms={}, + ), + ) + + +def test_full_chain_writes_single_record_with_steps(monkeypatch) -> None: + test_root = Path(__file__).resolve().parent + runtime = PipelineRuntime(mode="full_chain", test_name="test_runtime_full_chain_output", test_root=test_root) + case = PhraseCase(case_id="c1", text="Открой файл src/mail_order_bot/context.py", expected_intent="CODE_QA") + rag_rows = [ + { + "path": "src/mail_order_bot/context.py", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/mail_order_bot/context.py:1-10", + "content": "class Context: ...", + "metadata": {}, + } + ] + writes: list[dict] = [] + + monkeypatch.setattr(runtime._writer, "write_record", lambda payload: writes.append(payload)) + monkeypatch.setattr( + runtime, + "_executor_instance", + lambda: SimpleNamespace( + execute=lambda **_: _fake_executor_result( + query=case.text, + sub_intent="OPEN_FILE", + rag_rows=rag_rows, + final_answer="ok", + answer_mode="normal", + llm_used=True, + validation_reasons=[], + path_scope=["src/mail_order_bot/context.py"], + layers=["C0_SOURCE_CHUNKS"], + ) + ), + ) + + runtime.run_full_chain(case) + + assert len(writes) == 1 + payload = writes[0] + assert payload["mode"] == "full_chain" + assert payload["summary"]["llm"]["answer_status"] == "answered" + assert payload["run_info"]["case_id"] == case.case_id + assert payload["input_request"]["text"] == case.text + assert [item["step"] for item in payload["steps"]] == ["intent_router", "retrieval", "llm_answer"] + + +def test_full_chain_short_circuits_missing_open_file(monkeypatch) -> None: + test_root = Path(__file__).resolve().parent + runtime = PipelineRuntime(mode="full_chain", test_name="test_runtime_full_chain_output", test_root=test_root) + case = PhraseCase(case_id="missing", text="Открой файл src/app_runtime/core/missing_runtime.py", expected_intent="CODE_QA") + writes: list[dict] = [] + + monkeypatch.setattr(runtime._writer, "write_record", lambda payload: writes.append(payload)) + monkeypatch.setattr( + runtime, + "_executor_instance", + lambda: SimpleNamespace( + execute=lambda **_: _fake_executor_result( + query=case.text, + sub_intent="OPEN_FILE", + rag_rows=[], + final_answer="Файл src/app_runtime/core/missing_runtime.py не найден.", + answer_mode="degraded", + llm_used=False, + validation_reasons=["file_not_found"], + path_scope=["src/app_runtime/core/missing_runtime.py"], + layers=["C0_SOURCE_CHUNKS"], + ) + ), + ) + + result = runtime.run_full_chain(case) + + assert result.llm_answer == "Файл src/app_runtime/core/missing_runtime.py не найден." + assert len(writes) == 1 + payload = writes[0] + assert payload["summary"]["llm"]["answer_status"] == "degraded" + assert payload["diagnostics"]["answer_policy"]["failure_reason"] == "file_not_found" + + +def test_full_chain_short_circuits_missing_explain_symbol(monkeypatch) -> None: + test_root = Path(__file__).resolve().parent + runtime = PipelineRuntime(mode="full_chain", test_name="test_runtime_full_chain_output", test_root=test_root) + case = PhraseCase(case_id="missing-symbol", text="Объясни класс RuntimeFactoryManager", expected_intent="CODE_QA") + writes: list[dict] = [] + + monkeypatch.setattr(runtime._writer, "write_record", lambda payload: writes.append(payload)) + monkeypatch.setattr( + runtime, + "_executor_instance", + lambda: SimpleNamespace( + execute=lambda **_: _fake_executor_result( + query=case.text, + sub_intent="EXPLAIN", + rag_rows=[], + final_answer="Сущность RuntimeFactoryManager не найдена. Ближайшие варианты: RuntimeManager, WorkflowRuntimeFactory.", + answer_mode="degraded", + llm_used=False, + validation_reasons=["symbol_not_found"], + symbol_candidates=["RuntimeFactoryManager"], + symbol_resolution={ + "status": "not_found", + "resolved_symbol": None, + "alternatives": ["RuntimeManager", "WorkflowRuntimeFactory"], + "confidence": 0.0, + }, + ) + ), + ) + + result = runtime.run_full_chain(case) + + assert result.llm_answer.startswith("Сущность RuntimeFactoryManager не найдена") + assert "исходя из названия" not in result.llm_answer + assert len(writes) == 1 + payload = writes[0] + assert payload["summary"]["llm"]["answer_status"] == "degraded" + assert payload["diagnostics"]["answer_policy"]["failure_reason"] == "symbol_not_found" + + +def test_full_chain_synthesizes_confirmed_http_entrypoints(monkeypatch) -> None: + test_root = Path(__file__).resolve().parent + runtime = PipelineRuntime(mode="full_chain", test_name="test_runtime_full_chain_output", test_root=test_root) + case = PhraseCase(case_id="entrypoints", text="Где health endpoint?", expected_intent="CODE_QA") + rag_rows = [ + { + "layer": "C3_ENTRYPOINTS", + "path": "src/app_runtime/control/http_app.py", + "title": "GET /health declared in HttpControlAppFactory", + "content": "", + "metadata": { + "http_method": "GET", + "route_path": "/health", + "declaring_symbol": "HttpControlAppFactory", + "handler_symbol": "HttpControlAppFactory.create.health", + }, + } + ] + writes: list[dict] = [] + + monkeypatch.setattr(runtime._writer, "write_record", lambda payload: writes.append(payload)) + monkeypatch.setattr( + runtime, + "_executor_instance", + lambda: SimpleNamespace( + execute=lambda **_: _fake_executor_result( + query=case.text, + sub_intent="FIND_ENTRYPOINTS", + rag_rows=rag_rows, + final_answer="GET /health — объявлен в HttpControlAppFactory, обрабатывается health", + answer_mode="normal", + llm_used=True, + validation_reasons=[], + layers=["C3_ENTRYPOINTS"], + ) + ), + ) + + result = runtime.run_full_chain(case) + + assert result.llm_answer == "GET /health — объявлен в HttpControlAppFactory, обрабатывается health" + assert len(writes) == 1 + assert writes[0]["summary"]["llm"]["answer_status"] == "answered" diff --git a/tests/pipeline_setup/utils/__init__.py b/tests/pipeline_setup/utils/__init__.py new file mode 100644 index 0000000..44d088b --- /dev/null +++ b/tests/pipeline_setup/utils/__init__.py @@ -0,0 +1 @@ +"""Shared low-level utilities for pipeline_setup, including the reusable RAG indexer.""" diff --git a/tests/pipeline_setup/utils/rag_indexer/__init__.py b/tests/pipeline_setup/utils/rag_indexer/__init__.py new file mode 100644 index 0000000..fb61df0 --- /dev/null +++ b/tests/pipeline_setup/utils/rag_indexer/__init__.py @@ -0,0 +1,11 @@ +from tests.pipeline_setup.utils.rag_indexer.indexer import ( + DeterministicEmbedder, + LocalRepoFileCollector, + RagSessionIndexer, +) + +__all__ = [ + "DeterministicEmbedder", + "LocalRepoFileCollector", + "RagSessionIndexer", +] diff --git a/tests/pipeline_setup/utils/rag_indexer/indexer.py b/tests/pipeline_setup/utils/rag_indexer/indexer.py new file mode 100644 index 0000000..deef62d --- /dev/null +++ b/tests/pipeline_setup/utils/rag_indexer/indexer.py @@ -0,0 +1,108 @@ +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 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}") diff --git a/tests/pipeline_setup_v2/README.md b/tests/pipeline_setup_v2/README.md new file mode 100644 index 0000000..413dbe5 --- /dev/null +++ b/tests/pipeline_setup_v2/README.md @@ -0,0 +1,118 @@ +# pipeline_setup_v2 + +Новый общий harness для двух семейств прогонов: + +- `code_qa_eval` — synthetic/golden проверки +- `runtime` — router_only / router_rag / full_chain + +## Идея + +Один runner: + +- читает все `*.yaml` из папки с кейсами +- для кейса принимает либо `repo_path`, либо `rag_session_id` +- при `repo_path` сам индексирует репозиторий и получает `rag_session_id` +- запускает выбранный runner/mode +- проверяет ожидания +- пишет per-case артефакты и `summary.md` + +## Структура + +- `run.py` — верхнеуровневый entrypoint +- `llm_prompts.yaml` — общий каталог LLM-промтов для `full_chain` +- `cases/` — папки с YAML-наборами кейсов +- `core/` — общий harness: модели, loader, validator, session provider, artifact writer, orchestration +- `runtime/` — конкретные исполнители для `runtime` и `code_qa_eval` +- `test_results/` — артефакты прогонов + +## Запуск + +```bash +PYTHONPATH=. python -m tests.pipeline_setup_v2.run \ + --cases-dir tests/pipeline_setup_v2/cases/suite_01_synthetic \ + --run-name suite_01_smoke +``` + +```bash +PYTHONPATH=. python -m tests.pipeline_setup_v2.run \ + --cases-dir tests/pipeline_setup_v2/cases/suite_02_pipeline \ + --run-name suite_02_smoke +``` + +## Индексация RAG + +Если вы хотите получить `rag_session_id` заранее и подставлять его в кейсы, можно отдельно запустить индексатор: + +```bash +PYTHONPATH=. python -m tests.pipeline_setup.suite_02_pipeline.cli.index_repo \ + --repo-path /absolute/path/to/repo \ + [--project-id my-project] +``` + +На выходе индексатор печатает: + +```bash +rag_session_id= +``` + +После этого `rag_session_id` можно использовать в описании кейса: + +```yaml +cases: + - id: explain-existing-session + runner: runtime + mode: router_rag + query: "Как работает OrderService?" + input: + rag_session_id: "" +``` + +Если в кейсе вместо `rag_session_id` указан `repo_path`, то `pipeline_setup_v2` сам выполнит индексацию перед прогоном. + +## Формат кейсов + +Runner читает несколько YAML-файлов из одной папки. + +Поддерживаемые поля: + +- `defaults.runner`: `runtime` или `code_qa_eval` +- `defaults.mode`: `router_only`, `router_rag`, `full_chain` +- `defaults.input.repo_path` +- `defaults.input.project_id` +- `defaults.input.rag_session_id` + +На уровне кейса: + +- `id` +- `query` +- `runner` +- `mode` +- `input` +- `expected.router.*` +- `expected.retrieval.*` +- `expected.llm.*` +- `expected.pipeline.answer_mode` + +## LLM Промпты + +Общий каталог промтов для `full_chain` находится в: + +- `tests/pipeline_setup_v2/llm_prompts.yaml` + +Выбор шаблона идёт в таком порядке: + +- `intent + sub_intent` +- fallback на `intent` +- fallback на `default` + +## Артефакты + +Результаты пишутся в: + +- `tests/pipeline_setup_v2/test_results///` + +Там создаются: + +- `*.json` по каждому кейсу +- `*.md` по каждому кейсу +- `summary.md` diff --git a/tests/pipeline_setup_v2/__init__.py b/tests/pipeline_setup_v2/__init__.py new file mode 100644 index 0000000..e51cb77 --- /dev/null +++ b/tests/pipeline_setup_v2/__init__.py @@ -0,0 +1 @@ +"""Unified pipeline test harness for synthetic eval and runtime integration runs.""" diff --git a/tests/pipeline_setup_v2/cases/suite_01_synthetic/code_qa_eval.yaml b/tests/pipeline_setup_v2/cases/suite_01_synthetic/code_qa_eval.yaml new file mode 100644 index 0000000..0afe259 --- /dev/null +++ b/tests/pipeline_setup_v2/cases/suite_01_synthetic/code_qa_eval.yaml @@ -0,0 +1,80 @@ +defaults: + runner: code_qa_eval + mode: router_rag + input: + repo_path: "../../../pipeline_setup/suite_01_synthetic/fixtures/code_qa_repo" + project_id: code_qa_repo + +cases: + - id: open_file_main_positive + query: "Открой файл main.py" + expected: + router: + intent: CODE_QA + sub_intent: OPEN_FILE + retrieval: + path_scope_contains: ["main.py"] + pipeline: + answer_mode: normal + + - id: open_file_api_positive + query: "Покажи src/order_app/api/orders.py" + expected: + router: + intent: CODE_QA + sub_intent: OPEN_FILE + retrieval: + path_scope_contains: ["src/order_app/api/orders.py"] + pipeline: + answer_mode: normal + + - id: explain_order_positive + query: "Объясни класс Order" + expected: + router: + intent: CODE_QA + sub_intent: EXPLAIN + retrieval: + symbol_candidates_contain: ["Order"] + pipeline: + answer_mode: normal + + - id: explain_order_service_positive + query: "Как работает OrderService?" + expected: + router: + intent: CODE_QA + sub_intent: EXPLAIN + retrieval: + symbol_candidates_contain: ["OrderService"] + pipeline: + answer_mode: normal + + - id: find_tests_positive + query: "Где тесты для OrderService?" + expected: + router: + intent: CODE_QA + sub_intent: FIND_TESTS + retrieval: + symbol_candidates_contain: ["OrderService"] + pipeline: + answer_mode: normal + + - id: find_entrypoints_positive + query: "Какие точки входа в приложение?" + expected: + router: + intent: CODE_QA + sub_intent: FIND_ENTRYPOINTS + pipeline: + answer_mode: normal + + - id: general_qa_positive + query: "Что делает этот проект?" + expected: + router: + intent: CODE_QA + sub_intent: GENERAL_QA + pipeline: + answer_mode: normal diff --git a/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_retrieval.yaml b/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_retrieval.yaml new file mode 100644 index 0000000..3b9e8f0 --- /dev/null +++ b/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_retrieval.yaml @@ -0,0 +1,96 @@ +defaults: + runner: runtime + mode: full_chain + input: + rag_session_id: "7d11da21-faa0-4cea-aede-aeabe069164c" + +cases: + - id: plba-fullchain-explain-runtime-manager + query: "Объясни как работает класс RuntimeManager" + expected: + router: + intent: CODE_QA + sub_intent: EXPLAIN + graph_id: CodeQAGraph + conversation_mode: START + retrieval: + non_empty: true + symbol_candidates_contain: ["RuntimeManager"] + layers_include: ["C1_SYMBOL_CATALOG", "C0_SOURCE_CHUNKS"] + llm: + non_empty: true + + - id: plba-fullchain-explain-http-control-channel + query: "Объясни класс HttpControlChannel" + expected: + router: + intent: CODE_QA + sub_intent: EXPLAIN + graph_id: CodeQAGraph + conversation_mode: START + retrieval: + non_empty: true + symbol_candidates_contain: ["HttpControlChannel"] + layers_include: ["C1_SYMBOL_CATALOG", "C0_SOURCE_CHUNKS"] + llm: + non_empty: true + + - id: plba-fullchain-explain-control-plane-service + query: "Объясни класс ControlPlaneService" + expected: + router: + intent: CODE_QA + sub_intent: EXPLAIN + graph_id: CodeQAGraph + conversation_mode: START + retrieval: + non_empty: true + symbol_candidates_contain: ["ControlPlaneService"] + layers_include: ["C1_SYMBOL_CATALOG", "C0_SOURCE_CHUNKS"] + llm: + non_empty: true + + - id: plba-fullchain-explain-trace-service + query: "Как работает TraceService?" + expected: + router: + intent: CODE_QA + sub_intent: EXPLAIN + graph_id: CodeQAGraph + conversation_mode: START + retrieval: + non_empty: true + symbol_candidates_contain: ["TraceService"] + layers_include: ["C1_SYMBOL_CATALOG", "C0_SOURCE_CHUNKS"] + llm: + non_empty: true + + - id: plba-fullchain-explain-create-runtime + query: "Объясни функцию create_runtime" + expected: + router: + intent: CODE_QA + sub_intent: EXPLAIN + graph_id: CodeQAGraph + conversation_mode: START + retrieval: + non_empty: true + symbol_candidates_contain: ["create_runtime"] + layers_include: ["C1_SYMBOL_CATALOG", "C0_SOURCE_CHUNKS"] + llm: + non_empty: true + + - id: plba-fullchain-explain-workflow-engine + query: "Объясни класс WorkflowEngine" + expected: + router: + intent: CODE_QA + sub_intent: EXPLAIN + graph_id: CodeQAGraph + conversation_mode: START + retrieval: + non_empty: true + symbol_candidates_contain: ["WorkflowEngine"] + layers_include: ["C1_SYMBOL_CATALOG", "C0_SOURCE_CHUNKS"] + llm: + non_empty: true diff --git a/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents.yaml b/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents.yaml new file mode 100644 index 0000000..68055c8 --- /dev/null +++ b/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents.yaml @@ -0,0 +1,110 @@ +defaults: + runner: runtime + mode: full_chain + input: + rag_session_id: "7d11da21-faa0-4cea-aede-aeabe069164c" + +cases: + - id: plba-fullchain-open-file-runtime + query: "Открой файл src/app_runtime/core/runtime.py" + expected: + router: + intent: CODE_QA + sub_intent: OPEN_FILE + graph_id: CodeQAGraph + conversation_mode: START + retrieval: + non_empty: true + path_scope_contains: ["src/app_runtime/core/runtime.py"] + layers_include: ["C0_SOURCE_CHUNKS"] + llm: + non_empty: true + + - id: plba-fullchain-explain-runtime-manager + query: "Объясни как работает класс RuntimeManager" + expected: + router: + intent: CODE_QA + sub_intent: EXPLAIN + graph_id: CodeQAGraph + conversation_mode: START + retrieval: + non_empty: true + symbol_candidates_contain: ["RuntimeManager"] + layers_include: ["C1_SYMBOL_CATALOG", "C0_SOURCE_CHUNKS"] + llm: + non_empty: true + + - id: plba-fullchain-find-tests-runtime-manager + query: "Где тесты для RuntimeManager?" + expected: + router: + intent: CODE_QA + sub_intent: FIND_TESTS + graph_id: CodeQAGraph + conversation_mode: START + retrieval: + non_empty: true + symbol_candidates_contain: ["RuntimeManager"] + layers_include: ["C1_SYMBOL_CATALOG", "C2_DEPENDENCY_GRAPH", "C0_SOURCE_CHUNKS"] + llm: + non_empty: true + + - id: plba-fullchain-find-entrypoints + query: "Найди точки входа в коде" + expected: + router: + intent: CODE_QA + sub_intent: FIND_ENTRYPOINTS + graph_id: CodeQAGraph + conversation_mode: START + retrieval: + non_empty: true + layers_include: ["C3_ENTRYPOINTS", "C0_SOURCE_CHUNKS"] + llm: + non_empty: true + + - id: plba-fullchain-trace-flow-runtime-manager + query: "Покажи поток выполнения RuntimeManager" + expected: + router: + intent: CODE_QA + sub_intent: TRACE_FLOW + graph_id: CodeQAGraph + conversation_mode: START + retrieval: + non_empty: true + symbol_candidates_contain: ["RuntimeManager"] + layers_include: ["C2_DEPENDENCY_GRAPH", "C3_ENTRYPOINTS"] + llm: + non_empty: true + + - id: plba-fullchain-architecture-control-plane + query: "Какие компоненты участвуют в RuntimeManager?" + expected: + router: + intent: CODE_QA + sub_intent: ARCHITECTURE + graph_id: CodeQAGraph + conversation_mode: START + retrieval: + non_empty: true + layers_include: ["C4_SEMANTIC_ROLES", "C2_DEPENDENCY_GRAPH", "C3_ENTRYPOINTS"] + llm: + non_empty: true + + - id: plba-fullchain-explain-local-runtime-manager + query: "Почему в файле src/app_runtime/core/runtime.py класс RuntimeManager устроен так?" + expected: + router: + intent: CODE_QA + sub_intent: EXPLAIN_LOCAL + graph_id: CodeQAGraph + conversation_mode: START + retrieval: + non_empty: true + path_scope_contains: ["src/app_runtime/core/runtime.py"] + symbol_candidates_contain: ["RuntimeManager"] + layers_include: ["C1_SYMBOL_CATALOG", "C0_SOURCE_CHUNKS", "C2_DEPENDENCY_GRAPH"] + llm: + non_empty: true diff --git a/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml b/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml new file mode 100644 index 0000000..c019d02 --- /dev/null +++ b/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml @@ -0,0 +1,305 @@ +defaults: + runner: runtime + mode: full_chain + input: + rag_session_id: "7d11da21-faa0-4cea-aede-aeabe069164c" + +cases: + # OPEN_FILE + - id: plba-v2-open-file-runtime + query: "Открой файл src/app_runtime/core/runtime.py" + expected: + router: + intent: CODE_QA + sub_intent: OPEN_FILE + graph_id: CodeQAGraph + conversation_mode: START + retrieval: + non_empty: true + path_scope_contains: ["src/app_runtime/core/runtime.py"] + layers_include: ["C0_SOURCE_CHUNKS"] + llm: + non_empty: true + answer_mode: answered + + - id: plba-v2-open-file-public-api + query: "Открой файл src/plba/__init__.py" + expected: + router: + intent: CODE_QA + sub_intent: OPEN_FILE + graph_id: CodeQAGraph + conversation_mode: START + retrieval: + non_empty: true + path_scope_contains: ["src/plba/__init__.py"] + layers_include: ["C0_SOURCE_CHUNKS"] + llm: + non_empty: true + excludes: ["из различных подпакетов", "ответ основан исключительно"] + + # EXPLAIN + - id: plba-v2-explain-runtime-manager + query: "Объясни как работает класс RuntimeManager" + expected: + router: + intent: CODE_QA + sub_intent: EXPLAIN + graph_id: CodeQAGraph + conversation_mode: START + retrieval: + non_empty: true + symbol_candidates_contain: ["RuntimeManager"] + layers_include: ["C1_SYMBOL_CATALOG", "C0_SOURCE_CHUNKS", "C2_DEPENDENCY_GRAPH"] + llm: + non_empty: true + excludes: ["ряд аргументов", "основные службы"] + + - id: plba-v2-explain-trace-service + query: "Объясни как работает класс TraceService" + expected: + router: + intent: CODE_QA + sub_intent: EXPLAIN + graph_id: CodeQAGraph + conversation_mode: START + retrieval: + non_empty: true + symbol_candidates_contain: ["TraceService"] + layers_include: ["C1_SYMBOL_CATALOG", "C0_SOURCE_CHUNKS", "C2_DEPENDENCY_GRAPH"] + llm: + non_empty: true + answer_mode: answered + + - id: plba-v2-explain-create-runtime + query: "Что делает функция create_runtime?" + expected: + router: + intent: CODE_QA + sub_intent: EXPLAIN + graph_id: CodeQAGraph + conversation_mode: START + retrieval: + non_empty: true + symbol_candidates_contain: ["create_runtime"] + layers_include: ["C1_SYMBOL_CATALOG", "C0_SOURCE_CHUNKS"] + llm: + non_empty: true + answer_mode: answered + + - id: plba-v2-explain-local-http-channel + query: "Почему в файле src/app_runtime/control/http_channel.py класс HttpControlChannel устроен так?" + expected: + router: + intent: CODE_QA + sub_intent: EXPLAIN_LOCAL + graph_id: CodeQAGraph + conversation_mode: START + retrieval: + non_empty: true + path_scope_contains: ["src/app_runtime/control/http_channel.py"] + symbol_candidates_contain: ["HttpControlChannel"] + layers_include: ["C1_SYMBOL_CATALOG", "C0_SOURCE_CHUNKS", "C2_DEPENDENCY_GRAPH"] + llm: + non_empty: true + answer_mode: answered + + # FIND_TESTS + - id: plba-v2-find-tests-runtime-manager + query: "Где тесты для RuntimeManager?" + expected: + router: + intent: CODE_QA + sub_intent: FIND_TESTS + graph_id: CodeQAGraph + conversation_mode: START + retrieval: + non_empty: true + symbol_candidates_contain: ["RuntimeManager"] + layers_include: ["C1_SYMBOL_CATALOG", "C2_DEPENDENCY_GRAPH", "C0_SOURCE_CHUNKS"] + llm: + non_empty: true + answer_mode: answered + + - id: plba-v2-find-tests-trace-service + query: "Где тесты для TraceService?" + expected: + router: + intent: CODE_QA + sub_intent: FIND_TESTS + graph_id: CodeQAGraph + conversation_mode: START + retrieval: + non_empty: true + symbol_candidates_contain: ["TraceService"] + layers_include: ["C1_SYMBOL_CATALOG", "C2_DEPENDENCY_GRAPH", "C0_SOURCE_CHUNKS"] + llm: + non_empty: true + answer_mode: answered + + - id: plba-v2-find-tests-create-runtime + query: "Где тесты для create_runtime?" + expected: + router: + intent: CODE_QA + sub_intent: FIND_TESTS + graph_id: CodeQAGraph + conversation_mode: START + retrieval: + non_empty: true + symbol_candidates_contain: ["create_runtime"] + layers_include: ["C1_SYMBOL_CATALOG", "C2_DEPENDENCY_GRAPH", "C0_SOURCE_CHUNKS"] + llm: + non_empty: true + answer_mode: answered + + - id: plba-v2-find-tests-workflow-runtime-factory-negative + query: "Где тесты для WorkflowRuntimeFactory?" + expected: + router: + intent: CODE_QA + sub_intent: FIND_TESTS + graph_id: CodeQAGraph + conversation_mode: START + retrieval: + direct_symbol_test_hits_max: 0 + symbol_candidates_contain: ["WorkflowRuntimeFactory"] + layers_include: ["C1_SYMBOL_CATALOG", "C2_DEPENDENCY_GRAPH", "C0_SOURCE_CHUNKS"] + llm: + non_empty: true + + # FIND_ENTRYPOINTS + - id: plba-v2-find-entrypoints-control-plane + query: "Найди точки входа HTTP control plane" + expected: + router: + intent: CODE_QA + sub_intent: FIND_ENTRYPOINTS + graph_id: CodeQAGraph + conversation_mode: START + retrieval: + non_empty: true + layers_include: ["C3_ENTRYPOINTS", "C0_SOURCE_CHUNKS"] + llm: + non_empty: true + answer_mode: answered + + - id: plba-v2-find-entrypoints-health-endpoint + query: "Где health endpoint?" + expected: + router: + intent: CODE_QA + sub_intent: FIND_ENTRYPOINTS + graph_id: CodeQAGraph + conversation_mode: START + retrieval: + non_empty: true + layers_include: ["C3_ENTRYPOINTS", "C0_SOURCE_CHUNKS"] + llm: + non_empty: true + contains_all: ["GET /health"] + excludes: ["нет явных неподтвержденных кандидатов", "кандидаты на health-endpoint"] + + # TRACE_FLOW + - id: plba-v2-trace-flow-runtime-start + query: "Покажи поток выполнения при запуске RuntimeManager" + expected: + router: + intent: CODE_QA + sub_intent: TRACE_FLOW + graph_id: CodeQAGraph + conversation_mode: START + retrieval: + non_empty: true + symbol_candidates_contain: ["RuntimeManager"] + layers_include: ["C2_DEPENDENCY_GRAPH", "C3_ENTRYPOINTS", "C0_SOURCE_CHUNKS"] + llm: + non_empty: true + answer_mode: answered + + - id: plba-v2-trace-flow-health-endpoint + query: "Покажи как проходит запрос /health в HttpControlAppFactory" + expected: + router: + intent: CODE_QA + sub_intent: TRACE_FLOW + graph_id: CodeQAGraph + conversation_mode: START + retrieval: + non_empty: true + symbol_candidates_contain: ["HttpControlAppFactory"] + layers_include: ["C2_DEPENDENCY_GRAPH", "C3_ENTRYPOINTS", "C0_SOURCE_CHUNKS"] + llm: + non_empty: true + answer_mode: answered + + # ARCHITECTURE + - id: plba-v2-architecture-runtime-manager + query: "Какие компоненты участвуют в RuntimeManager?" + expected: + router: + intent: CODE_QA + sub_intent: ARCHITECTURE + graph_id: CodeQAGraph + conversation_mode: START + retrieval: + non_empty: true + symbol_candidates_contain: ["RuntimeManager"] + layers_include: ["C4_SEMANTIC_ROLES", "C2_DEPENDENCY_GRAPH", "C0_SOURCE_CHUNKS"] + llm: + non_empty: true + answer_mode: answered + + - id: plba-v2-architecture-control-plane + query: "Какие компоненты участвуют в ControlPlaneService?" + expected: + router: + intent: CODE_QA + sub_intent: ARCHITECTURE + graph_id: CodeQAGraph + conversation_mode: START + retrieval: + non_empty: true + symbol_candidates_contain: ["ControlPlaneService"] + layers_include: ["C4_SEMANTIC_ROLES", "C2_DEPENDENCY_GRAPH", "C0_SOURCE_CHUNKS"] + llm: + non_empty: true + answer_mode: answered + + # NEGATIVE / NOT FOUND + - id: plba-v2-explain-nonexistent-symbol + query: "Объясни класс RuntimeFactoryManager" + expected: + router: + intent: CODE_QA + sub_intent: EXPLAIN + graph_id: CodeQAGraph + conversation_mode: START + retrieval: + non_empty: false + symbol_candidates_contain: ["RuntimeFactoryManager"] + layers_include: ["C1_SYMBOL_CATALOG", "C0_SOURCE_CHUNKS"] + llm: + non_empty: true + contains_all: ["не найдена"] + excludes: ["исходя из названия", "вероятно этот класс", "возможное предназначение"] + pipeline: + answer_mode: degraded + + - id: plba-v2-open-file-nonexistent + query: "Открой файл src/app_runtime/core/missing_runtime.py" + expected: + router: + intent: CODE_QA + sub_intent: OPEN_FILE + graph_id: CodeQAGraph + conversation_mode: START + retrieval: + non_empty: false + path_scope_contains: ["src/app_runtime/core/missing_runtime.py"] + layers_include: ["C0_SOURCE_CHUNKS"] + llm: + non_empty: true + contains_all: ["Файл src/app_runtime/core/missing_runtime.py не найден."] + pipeline: + answer_mode: not_found diff --git a/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_smoke.yaml b/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_smoke.yaml new file mode 100644 index 0000000..ee1b4b9 --- /dev/null +++ b/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_smoke.yaml @@ -0,0 +1,17 @@ +defaults: + runner: runtime + mode: full_chain + input: + repo_path: "../../../pipeline_setup/suite_01_synthetic/fixtures/code_qa_repo" + project_id: code_qa_repo_full_chain + +cases: + - id: full_chain_explain_order_service + query: "Как работает OrderService?" + expected: + router: + intent: CODE_QA + retrieval: + non_empty: true + llm: + non_empty: true diff --git a/tests/pipeline_setup_v2/cases/suite_02_pipeline/router_only_plba_code_retrieval.yaml b/tests/pipeline_setup_v2/cases/suite_02_pipeline/router_only_plba_code_retrieval.yaml new file mode 100644 index 0000000..ea2a24f --- /dev/null +++ b/tests/pipeline_setup_v2/cases/suite_02_pipeline/router_only_plba_code_retrieval.yaml @@ -0,0 +1,123 @@ +defaults: + runner: runtime + mode: router_only + input: + repo_path: "/Users/alex/Dev_projects_v2/apps/plba" + rag_session_id: "7d11da21-faa0-4cea-aede-aeabe069164c" + project_id: plba + +cases: + - id: plba-open-runtime-manager-file + query: "Открой файл src/app_runtime/core/runtime.py" + expected: + router: + intent: CODE_QA + sub_intent: OPEN_FILE + graph_id: CodeQAGraph + conversation_mode: START + + - id: plba-open-http-control-channel-file + query: "Покажи файл src/app_runtime/control/http_channel.py" + expected: + router: + intent: CODE_QA + sub_intent: OPEN_FILE + graph_id: CodeQAGraph + conversation_mode: START + + - id: plba-explain-runtime-manager + query: "Объясни как работает класс RuntimeManager" + expected: + router: + intent: CODE_QA + sub_intent: EXPLAIN + graph_id: CodeQAGraph + conversation_mode: START + retrieval: + symbol_candidates_contain: ["RuntimeManager"] + + - id: plba-explain-http-control-channel + query: "Объясни класс HttpControlChannel" + expected: + router: + intent: CODE_QA + sub_intent: EXPLAIN + graph_id: CodeQAGraph + conversation_mode: START + retrieval: + symbol_candidates_contain: ["HttpControlChannel"] + + - id: plba-explain-trace-service + query: "Как работает TraceService?" + expected: + router: + intent: CODE_QA + sub_intent: EXPLAIN + graph_id: CodeQAGraph + conversation_mode: START + retrieval: + symbol_candidates_contain: ["TraceService"] + + - id: plba-find-tests-runtime-manager + query: "Где тесты для RuntimeManager?" + expected: + router: + intent: CODE_QA + sub_intent: FIND_TESTS + graph_id: CodeQAGraph + conversation_mode: START + retrieval: + symbol_candidates_contain: ["RuntimeManager"] + + - id: plba-find-tests-http-control-channel + query: "Найди тесты для HttpControlChannel" + expected: + router: + intent: CODE_QA + sub_intent: FIND_TESTS + graph_id: CodeQAGraph + conversation_mode: START + retrieval: + symbol_candidates_contain: ["HttpControlChannel"] + + - id: plba-find-entrypoints-create-runtime + query: "Найди точки входа в коде" + expected: + router: + intent: CODE_QA + sub_intent: FIND_ENTRYPOINTS + graph_id: CodeQAGraph + conversation_mode: START + + - id: plba-find-entrypoints-bootstrap + query: "Объясни функцию create_runtime" + expected: + router: + intent: CODE_QA + sub_intent: EXPLAIN + graph_id: CodeQAGraph + conversation_mode: START + retrieval: + symbol_candidates_contain: ["create_runtime"] + + - id: plba-general-qa-runtime + query: "Объясни модуль runtime" + expected: + router: + intent: CODE_QA + sub_intent: EXPLAIN + graph_id: CodeQAGraph + conversation_mode: START + retrieval: + symbol_candidates_contain: ["runtime"] + + - id: plba-general-qa-control-plane + query: "Объясни код control plane" + expected: + router: + intent: CODE_QA + sub_intent: EXPLAIN + graph_id: CodeQAGraph + conversation_mode: START + retrieval: + symbol_candidates_contain: ["control", "plane"] diff --git a/tests/pipeline_setup_v2/cases/suite_02_pipeline/router_only_smoke.yaml b/tests/pipeline_setup_v2/cases/suite_02_pipeline/router_only_smoke.yaml new file mode 100644 index 0000000..afc1c4e --- /dev/null +++ b/tests/pipeline_setup_v2/cases/suite_02_pipeline/router_only_smoke.yaml @@ -0,0 +1,16 @@ +defaults: + runner: runtime + mode: router_only + +cases: + - id: router_only_open_fixture_main + query: "Открой файл main.py" + expected: + router: + intent: CODE_QA + + - id: router_only_docs_question + query: "Что сказано в README?" + expected: + router: + intent: DOCS_QA diff --git a/tests/pipeline_setup_v2/cases/suite_02_pipeline/router_rag_plba_code_retrieval.yaml b/tests/pipeline_setup_v2/cases/suite_02_pipeline/router_rag_plba_code_retrieval.yaml new file mode 100644 index 0000000..a9d8e4c --- /dev/null +++ b/tests/pipeline_setup_v2/cases/suite_02_pipeline/router_rag_plba_code_retrieval.yaml @@ -0,0 +1,148 @@ +defaults: + runner: runtime + mode: router_rag + input: + rag_session_id: "7d11da21-faa0-4cea-aede-aeabe069164c" + +cases: + - id: plba-rag-open-runtime-manager-file + query: "Открой файл src/app_runtime/core/runtime.py" + expected: + router: + intent: CODE_QA + sub_intent: OPEN_FILE + graph_id: CodeQAGraph + conversation_mode: START + retrieval: + non_empty: true + path_scope_contains: ["src/app_runtime/core/runtime.py"] + layers_include: ["C0_SOURCE_CHUNKS"] + + - id: plba-rag-open-http-control-channel-file + query: "Покажи файл src/app_runtime/control/http_channel.py" + expected: + router: + intent: CODE_QA + sub_intent: OPEN_FILE + graph_id: CodeQAGraph + conversation_mode: START + retrieval: + non_empty: true + path_scope_contains: ["src/app_runtime/control/http_channel.py"] + layers_include: ["C0_SOURCE_CHUNKS"] + + - id: plba-rag-explain-runtime-manager + query: "Объясни как работает класс RuntimeManager" + expected: + router: + intent: CODE_QA + sub_intent: EXPLAIN + graph_id: CodeQAGraph + conversation_mode: START + retrieval: + non_empty: true + symbol_candidates_contain: ["RuntimeManager"] + layers_include: ["C1_SYMBOL_CATALOG", "C0_SOURCE_CHUNKS"] + + - id: plba-rag-explain-http-control-channel + query: "Объясни класс HttpControlChannel" + expected: + router: + intent: CODE_QA + sub_intent: EXPLAIN + graph_id: CodeQAGraph + conversation_mode: START + retrieval: + non_empty: true + symbol_candidates_contain: ["HttpControlChannel"] + layers_include: ["C1_SYMBOL_CATALOG", "C0_SOURCE_CHUNKS"] + + - id: plba-rag-explain-trace-service + query: "Как работает TraceService?" + expected: + router: + intent: CODE_QA + sub_intent: EXPLAIN + graph_id: CodeQAGraph + conversation_mode: START + retrieval: + non_empty: true + symbol_candidates_contain: ["TraceService"] + layers_include: ["C1_SYMBOL_CATALOG", "C0_SOURCE_CHUNKS"] + + - id: plba-rag-find-tests-runtime-manager + query: "Где тесты для RuntimeManager?" + expected: + router: + intent: CODE_QA + sub_intent: FIND_TESTS + graph_id: CodeQAGraph + conversation_mode: START + retrieval: + non_empty: true + symbol_candidates_contain: ["RuntimeManager"] + layers_include: ["C1_SYMBOL_CATALOG", "C2_DEPENDENCY_GRAPH", "C0_SOURCE_CHUNKS"] + + - id: plba-rag-find-tests-http-control-channel + query: "Найди тесты для HttpControlChannel" + expected: + router: + intent: CODE_QA + sub_intent: FIND_TESTS + graph_id: CodeQAGraph + conversation_mode: START + retrieval: + non_empty: true + symbol_candidates_contain: ["HttpControlChannel"] + layers_include: ["C1_SYMBOL_CATALOG", "C2_DEPENDENCY_GRAPH", "C0_SOURCE_CHUNKS"] + + - id: plba-rag-find-entrypoints + query: "Найди точки входа в коде" + expected: + router: + intent: CODE_QA + sub_intent: FIND_ENTRYPOINTS + graph_id: CodeQAGraph + conversation_mode: START + retrieval: + non_empty: true + layers_include: ["C3_ENTRYPOINTS", "C0_SOURCE_CHUNKS"] + + - id: plba-rag-explain-create-runtime + query: "Объясни функцию create_runtime" + expected: + router: + intent: CODE_QA + sub_intent: EXPLAIN + graph_id: CodeQAGraph + conversation_mode: START + retrieval: + non_empty: true + symbol_candidates_contain: ["create_runtime"] + layers_include: ["C1_SYMBOL_CATALOG", "C0_SOURCE_CHUNKS"] + + - id: plba-rag-explain-control-plane-service + query: "Объясни класс ControlPlaneService" + expected: + router: + intent: CODE_QA + sub_intent: EXPLAIN + graph_id: CodeQAGraph + conversation_mode: START + retrieval: + non_empty: true + symbol_candidates_contain: ["ControlPlaneService"] + layers_include: ["C1_SYMBOL_CATALOG", "C0_SOURCE_CHUNKS"] + + - id: plba-rag-explain-workflow-engine + query: "Объясни класс WorkflowEngine" + expected: + router: + intent: CODE_QA + sub_intent: EXPLAIN + graph_id: CodeQAGraph + conversation_mode: START + retrieval: + non_empty: true + symbol_candidates_contain: ["WorkflowEngine"] + layers_include: ["C1_SYMBOL_CATALOG", "C0_SOURCE_CHUNKS"] diff --git a/tests/pipeline_setup_v2/cases/suite_02_pipeline/router_rag_smoke.yaml b/tests/pipeline_setup_v2/cases/suite_02_pipeline/router_rag_smoke.yaml new file mode 100644 index 0000000..48796f5 --- /dev/null +++ b/tests/pipeline_setup_v2/cases/suite_02_pipeline/router_rag_smoke.yaml @@ -0,0 +1,23 @@ +defaults: + runner: runtime + mode: router_rag + input: + repo_path: "../../../pipeline_setup/suite_01_synthetic/fixtures/code_qa_repo" + project_id: code_qa_repo_runtime + +cases: + - id: router_rag_open_fixture_main + query: "Открой файл main.py" + expected: + router: + intent: CODE_QA + retrieval: + non_empty: true + + - id: router_rag_explain_order + query: "Объясни класс Order" + expected: + router: + intent: CODE_QA + retrieval: + non_empty: true diff --git a/tests/pipeline_setup_v2/core/__init__.py b/tests/pipeline_setup_v2/core/__init__.py new file mode 100644 index 0000000..2191113 --- /dev/null +++ b/tests/pipeline_setup_v2/core/__init__.py @@ -0,0 +1 @@ +"""Core contracts and orchestration for pipeline_setup_v2.""" diff --git a/tests/pipeline_setup_v2/core/artifacts.py b/tests/pipeline_setup_v2/core/artifacts.py new file mode 100644 index 0000000..2edc195 --- /dev/null +++ b/tests/pipeline_setup_v2/core/artifacts.py @@ -0,0 +1,144 @@ +from __future__ import annotations + +import json +from datetime import datetime +from pathlib import Path + +from tests.pipeline_setup_v2.core.models import V2CaseResult + + +class ArtifactWriter: + def __init__(self, root: Path, run_name: str, started_at: datetime) -> None: + stamp = started_at.strftime("%Y%m%d_%H%M%S") + self.run_dir = root / run_name / stamp + self.run_dir.mkdir(parents=True, exist_ok=True) + + def write_case(self, result: V2CaseResult) -> None: + stem = f"{result.case.source_file.stem}_{result.case.case_id}" + (self.run_dir / f"{stem}.json").write_text( + json.dumps( + { + "case_id": result.case.case_id, + "source_file": result.case.source_file.as_posix(), + "runner": result.case.runner, + "mode": result.case.mode, + "actual": result.actual, + "passed": result.passed, + "mismatches": result.mismatches, + "details": result.details, + }, + ensure_ascii=False, + indent=2, + ), + encoding="utf-8", + ) + lines = [ + f"# {result.case.case_id}", + "", + f"- source_file: {result.case.source_file.as_posix()}", + f"- runner: {result.case.runner}", + f"- mode: {result.case.mode}", + f"- passed: {result.passed}", + "", + "## Query", + result.case.query, + "", + "## Actual", + json.dumps(result.actual, ensure_ascii=False, indent=2), + "", + "## 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 write_summary(self, results: list[V2CaseResult]) -> Path: + path = self.run_dir / "summary.md" + path.write_text(SummaryComposer().compose(results), encoding="utf-8") + return path + + +class SummaryComposer: + def compose(self, results: list[V2CaseResult]) -> str: + passed = sum(1 for item in results if item.passed) + lines = [ + "# pipeline_setup_v2 summary", + "", + f"Passed: {passed}/{len(results)}", + "", + "| File | Case | Query | Expected sub-intent | Intent | Actual sub-intent | RAG layers | Pass |", + "|------|------|-------|---------------------|--------|-------------------|------------|------|", + ] + lines.extend(self._result_rows(results)) + lines.extend(self._failure_section(results)) + lines.extend(self._llm_section(results)) + return "\n".join(lines) + + def _result_rows(self, results: list[V2CaseResult]) -> list[str]: + rows: list[str] = [] + for item in results: + actual = item.actual + rows.append( + f"| {item.case.source_file.name} | {item.case.case_id} | {self._table_text(item.case.query)} | " + f"{item.case.expectations.router.sub_intent or '—'} | {actual.get('intent') or '—'} | " + f"{actual.get('sub_intent') or '—'} | {self._rag_layers_text(item)} | {'✓' if item.passed else '✗'} |" + ) + return rows + + def _failure_section(self, results: list[V2CaseResult]) -> list[str]: + failures = [item for item in results if not item.passed] + if not failures: + return [] + lines = ["", "## Failures"] + for item in failures: + lines.append(f"- **{item.case.case_id}**: {'; '.join(item.mismatches)}") + return lines + + def _llm_section(self, results: list[V2CaseResult]) -> list[str]: + llm_results = [item for item in results if str(item.actual.get("llm_answer") or "").strip()] + if not llm_results: + return [] + lines = ["", "## LLM Answers"] + for item in llm_results: + lines.append(f"- **{item.case.case_id}**") + lines.append(f" Query: {self._table_text(item.case.query, limit=400)}") + lines.extend(self._quote_block(self._snippet(str(item.actual.get("llm_answer") or "")))) + return lines + + def _snippet(self, text: str, limit: int = 880) -> str: + compact = " ".join(text.split()) + if len(compact) <= limit: + return compact + return compact[: limit - 1].rstrip() + "…" + + def _table_text(self, text: str, limit: int = 140) -> str: + compact = " ".join(text.split()).replace("|", "\\|") + if len(compact) <= limit: + return compact + return compact[: limit - 1].rstrip() + "…" + + def _quote_block(self, text: str) -> list[str]: + quoted = text.strip() + if not quoted: + return [" > —"] + return [f" > {self._escape_markdown(line)}" for line in quoted.splitlines()] + + def _escape_markdown(self, text: str) -> str: + escaped = text + for char in ("\\", "`", "*", "_", "{", "}", "[", "]", "(", ")", "#", "+", "-", "!", "|"): + escaped = escaped.replace(char, f"\\{char}") + return escaped + + def _rag_layers_text(self, item: V2CaseResult) -> str: + rows = list(item.details.get("rag_rows") or []) + if not rows: + return "—" + counts: dict[str, int] = {} + for row in rows: + layer = str(row.get("layer") or "").strip() + if not layer: + continue + counts[layer] = counts.get(layer, 0) + 1 + if not counts: + return "—" + parts = [f"{layer}:{counts[layer]}" for layer in sorted(counts)] + return self._table_text(", ".join(parts), limit=120) diff --git a/tests/pipeline_setup_v2/core/case_loader.py b/tests/pipeline_setup_v2/core/case_loader.py new file mode 100644 index 0000000..51e6aa0 --- /dev/null +++ b/tests/pipeline_setup_v2/core/case_loader.py @@ -0,0 +1,106 @@ +from __future__ import annotations + +from pathlib import Path + +import yaml + +from tests.pipeline_setup_v2.core.models import ( + CaseExpectations, + CaseInput, + LlmExpectation, + PipelineExpectation, + RetrievalExpectation, + RouterExpectation, + V2Case, +) + + +class CaseDirectoryLoader: + def load(self, cases_dir: Path) -> list[V2Case]: + if cases_dir.is_file(): + return self._load_file(cases_dir) + files = sorted(path for path in cases_dir.rglob("*.yaml") if path.is_file()) + if not files: + raise ValueError(f"No YAML case files found in: {cases_dir}") + cases: list[V2Case] = [] + for path in files: + cases.extend(self._load_file(path)) + return cases + + def _load_file(self, path: Path) -> list[V2Case]: + payload = yaml.safe_load(path.read_text(encoding="utf-8")) or {} + if not isinstance(payload, dict): + raise ValueError(f"Invalid case file {path}: expected mapping") + defaults = payload.get("defaults") or {} + items = payload.get("cases") or [] + if not isinstance(items, list): + raise ValueError(f"Invalid case file {path}: `cases` must be a list") + return [self._to_case(path, raw, defaults) for raw in items] + + def _to_case(self, path: Path, raw: object, defaults: dict) -> V2Case: + if not isinstance(raw, dict): + raise ValueError(f"Invalid case in {path}: expected object") + merged_input = {**dict(defaults.get("input") or {}), **dict(raw.get("input") or {})} + runner = str(raw.get("runner") or defaults.get("runner") or "runtime").strip() + mode = str(raw.get("mode") or defaults.get("mode") or "").strip() + case_id = str(raw.get("id") or "").strip() + query = str(raw.get("query") or "").strip() + if not case_id or not query or not runner or not mode: + raise ValueError(f"Invalid case in {path}: `id`, `query`, `runner`, `mode` are required") + expected = dict(raw.get("expected") or {}) + return V2Case( + case_id=case_id, + runner=runner, # type: ignore[arg-type] + mode=mode, # type: ignore[arg-type] + query=query, + source_file=path, + input=self._to_input(path.parent, merged_input), + expectations=self._to_expectations(expected), + notes=str(raw.get("notes") or ""), + tags=tuple(str(item).strip() for item in raw.get("tags", []) if str(item).strip()), + ) + + def _to_input(self, base_dir: Path, raw: dict) -> CaseInput: + repo_path_raw = str(raw.get("repo_path") or "").strip() + repo_path = None + if repo_path_raw: + repo_path = Path(repo_path_raw).expanduser() + if not repo_path.is_absolute(): + repo_path = (base_dir / repo_path).resolve() + return CaseInput( + repo_path=repo_path, + project_id=str(raw.get("project_id") or "").strip() or None, + rag_session_id=str(raw.get("rag_session_id") or "").strip() or None, + ) + + def _to_expectations(self, raw: dict) -> CaseExpectations: + router = dict(raw.get("router") or {}) + retrieval = dict(raw.get("retrieval") or {}) + llm = dict(raw.get("llm") or {}) + pipeline = dict(raw.get("pipeline") or {}) + return CaseExpectations( + router=RouterExpectation( + intent=str(router.get("intent") or "").strip() or None, + sub_intent=str(router.get("sub_intent") or "").strip() or None, + graph_id=str(router.get("graph_id") or "").strip() or None, + conversation_mode=str(router.get("conversation_mode") or "").strip() or None, + ), + retrieval=RetrievalExpectation( + non_empty=retrieval.get("non_empty"), + min_rows=int(retrieval["min_rows"]) if retrieval.get("min_rows") is not None else None, + direct_symbol_test_hits_max=( + int(retrieval["direct_symbol_test_hits_max"]) + if retrieval.get("direct_symbol_test_hits_max") is not None + else None + ), + path_scope_contains=tuple(str(item) for item in retrieval.get("path_scope_contains") or []), + symbol_candidates_contain=tuple(str(item) for item in retrieval.get("symbol_candidates_contain") or []), + layers_include=tuple(str(item) for item in retrieval.get("layers_include") or []), + ), + 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 []), + ), + pipeline=PipelineExpectation(answer_mode=str(pipeline.get("answer_mode") or "").strip() or None), + ) diff --git a/tests/pipeline_setup_v2/core/models.py b/tests/pipeline_setup_v2/core/models.py new file mode 100644 index 0000000..595d79c --- /dev/null +++ b/tests/pipeline_setup_v2/core/models.py @@ -0,0 +1,82 @@ +from __future__ import annotations + +from dataclasses import dataclass, field +from pathlib import Path +from typing import Literal + + +RunnerKind = Literal["runtime", "code_qa_eval"] +ModeKind = Literal["router_only", "router_rag", "full_chain"] + + +@dataclass(slots=True, frozen=True) +class CaseInput: + repo_path: Path | None = None + project_id: str | None = None + rag_session_id: str | None = None + + +@dataclass(slots=True, frozen=True) +class RouterExpectation: + intent: str | None = None + sub_intent: str | None = None + graph_id: str | None = None + conversation_mode: str | None = None + + +@dataclass(slots=True, frozen=True) +class RetrievalExpectation: + non_empty: bool | None = None + min_rows: int | None = None + direct_symbol_test_hits_max: int | None = None + path_scope_contains: tuple[str, ...] = () + symbol_candidates_contain: tuple[str, ...] = () + layers_include: tuple[str, ...] = () + + +@dataclass(slots=True, frozen=True) +class LlmExpectation: + non_empty: bool | None = None + contains_all: tuple[str, ...] = () + excludes: tuple[str, ...] = () + + +@dataclass(slots=True, frozen=True) +class PipelineExpectation: + answer_mode: str | None = None + + +@dataclass(slots=True, frozen=True) +class CaseExpectations: + router: RouterExpectation = RouterExpectation() + retrieval: RetrievalExpectation = RetrievalExpectation() + llm: LlmExpectation = LlmExpectation() + pipeline: PipelineExpectation = PipelineExpectation() + + +@dataclass(slots=True, frozen=True) +class V2Case: + case_id: str + runner: RunnerKind + mode: ModeKind + query: str + source_file: Path + input: CaseInput = CaseInput() + expectations: CaseExpectations = CaseExpectations() + notes: str = "" + tags: tuple[str, ...] = () + + +@dataclass(slots=True, frozen=True) +class ExecutionPayload: + actual: dict + details: dict + + +@dataclass(slots=True) +class V2CaseResult: + case: V2Case + actual: dict + details: dict + passed: bool + mismatches: list[str] = field(default_factory=list) diff --git a/tests/pipeline_setup_v2/core/runner.py b/tests/pipeline_setup_v2/core/runner.py new file mode 100644 index 0000000..ac5b2f6 --- /dev/null +++ b/tests/pipeline_setup_v2/core/runner.py @@ -0,0 +1,62 @@ +from __future__ import annotations + +from datetime import datetime +from pathlib import Path + +from tests.pipeline_setup_v2.core.artifacts import ArtifactWriter +from tests.pipeline_setup_v2.core.case_loader import CaseDirectoryLoader +from tests.pipeline_setup_v2.core.models import V2CaseResult +from tests.pipeline_setup_v2.core.session_provider import RagSessionProvider +from tests.pipeline_setup_v2.core.validators import CaseValidator + + +class V2Runner: + def __init__(self, cases_dir: Path, results_dir: Path, run_name: str) -> None: + self._cases_dir = cases_dir + self._validator = CaseValidator() + self._sessions = RagSessionProvider() + self._runtime = None + self._code_qa = None + self._writer = ArtifactWriter(results_dir, run_name=run_name, started_at=datetime.now()) + + @property + def run_dir(self) -> Path: + return self._writer.run_dir + + def run(self) -> tuple[list[V2CaseResult], Path]: + results: list[V2CaseResult] = [] + for case in CaseDirectoryLoader().load(self._cases_dir): + rag_session_id = self._sessions.resolve(case.input) + payload = self._execute(case, rag_session_id) + mismatches = self._validator.validate(case, payload.actual, payload.details) + result = V2CaseResult( + case=case, + actual=payload.actual, + details=payload.details, + passed=not mismatches, + mismatches=mismatches, + ) + self._writer.write_case(result) + results.append(result) + return results, self._writer.write_summary(results) + + def _execute(self, case, rag_session_id): + if case.runner == "runtime": + return self._runtime_adapter().execute(case, rag_session_id) + if case.runner == "code_qa_eval": + return self._code_qa_adapter().execute(case, rag_session_id) + raise ValueError(f"Unsupported runner: {case.runner}") + + def _runtime_adapter(self): + if self._runtime is None: + from tests.pipeline_setup_v2.runtime.runtime_adapter import RuntimeAdapter + + self._runtime = RuntimeAdapter() + return self._runtime + + def _code_qa_adapter(self): + if self._code_qa is None: + from tests.pipeline_setup_v2.runtime.code_qa_eval_adapter import CodeQaEvalAdapter + + self._code_qa = CodeQaEvalAdapter() + return self._code_qa diff --git a/tests/pipeline_setup_v2/core/session_provider.py b/tests/pipeline_setup_v2/core/session_provider.py new file mode 100644 index 0000000..302238b --- /dev/null +++ b/tests/pipeline_setup_v2/core/session_provider.py @@ -0,0 +1,32 @@ +from __future__ import annotations + +from pathlib import Path + +from tests.pipeline_setup_v2.core.models import CaseInput + + +class RagSessionProvider: + def __init__(self) -> None: + self._repository = None + self._cache: dict[tuple[Path, str | None], str] = {} + + def resolve(self, case_input: CaseInput) -> str | None: + if case_input.rag_session_id: + return case_input.rag_session_id + if not case_input.repo_path: + return None + key = (case_input.repo_path, case_input.project_id) + if key not in self._cache: + self._cache[key] = self._build_indexer().index_repo( + case_input.repo_path, + project_id=case_input.project_id, + ) + return self._cache[key] + + def _build_indexer(self): + from app.modules.rag.persistence.repository import RagRepository + from tests.pipeline_setup.utils.rag_indexer import RagSessionIndexer + + if self._repository is None: + self._repository = RagRepository() + return RagSessionIndexer(self._repository) diff --git a/tests/pipeline_setup_v2/core/test_validators.py b/tests/pipeline_setup_v2/core/test_validators.py new file mode 100644 index 0000000..bd5cb11 --- /dev/null +++ b/tests/pipeline_setup_v2/core/test_validators.py @@ -0,0 +1,110 @@ +from __future__ import annotations + +from pathlib import Path + +from tests.pipeline_setup_v2.core.models import CaseExpectations, LlmExpectation, RetrievalExpectation, RouterExpectation, V2Case +from tests.pipeline_setup_v2.core.validators import CaseValidator + + +def test_direct_symbol_test_hits_allows_related_context_when_symbol_not_in_rows() -> None: + case = V2Case( + case_id="negative-find-tests", + runner="runtime", + mode="full_chain", + query="Где тесты для WorkflowRuntimeFactory?", + source_file=Path("cases.yaml"), + expectations=CaseExpectations( + router=RouterExpectation(intent="CODE_QA", sub_intent="FIND_TESTS"), + retrieval=RetrievalExpectation( + direct_symbol_test_hits_max=0, + symbol_candidates_contain=("WorkflowRuntimeFactory",), + ), + ), + ) + actual = { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "rag_count": 2, + "symbol_candidates": ("WorkflowRuntimeFactory",), + "layers": ("C2_DEPENDENCY_GRAPH",), + } + details = { + "rag_rows": [ + { + "path": "tests/test_business_control_actions.py", + "title": "test_worker_wakes_up_with_configured_interval:dataflow_slice", + "content": "ScenarioWorker.name", + "metadata": {"is_test": True, "src_qname": "test_worker_wakes_up_with_configured_interval"}, + } + ] + } + + mismatches = CaseValidator().validate(case, actual, details) + + assert mismatches == [] + + +def test_direct_symbol_test_hits_flags_direct_matches_in_test_rows() -> None: + case = V2Case( + case_id="negative-find-tests", + runner="runtime", + mode="full_chain", + query="Где тесты для WorkflowRuntimeFactory?", + source_file=Path("cases.yaml"), + expectations=CaseExpectations( + router=RouterExpectation(intent="CODE_QA", sub_intent="FIND_TESTS"), + retrieval=RetrievalExpectation( + direct_symbol_test_hits_max=0, + symbol_candidates_contain=("WorkflowRuntimeFactory",), + ), + ), + ) + actual = { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "rag_count": 1, + "symbol_candidates": ("WorkflowRuntimeFactory",), + "layers": ("C0_SOURCE_CHUNKS",), + } + details = { + "rag_rows": [ + { + "path": "tests/test_workflow_runtime_factory.py", + "title": "test_workflow_runtime_factory_builds_runtime", + "content": "WorkflowRuntimeFactory builds runtime", + "metadata": {"is_test": True, "src_qname": "test_workflow_runtime_factory_builds_runtime"}, + } + ] + } + + mismatches = CaseValidator().validate(case, actual, details) + + assert mismatches == ["retrieval: expected direct symbol-linked test hits <= 0, got 1"] + + +def test_llm_contains_and_excludes_checks() -> None: + case = V2Case( + case_id="llm-quality", + runner="runtime", + mode="full_chain", + query="Где health endpoint?", + source_file=Path("cases.yaml"), + expectations=CaseExpectations( + router=RouterExpectation(intent="CODE_QA", sub_intent="FIND_ENTRYPOINTS"), + llm=LlmExpectation( + non_empty=True, + contains_all=("GET /health",), + excludes=("нет явных неподтвержденных кандидатов",), + ), + ), + ) + actual = { + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "rag_count": 3, + "llm_answer": "GET /health объявлен в HttpControlAppFactory.", + } + + mismatches = CaseValidator().validate(case, actual, {}) + + assert mismatches == [] diff --git a/tests/pipeline_setup_v2/core/validators.py b/tests/pipeline_setup_v2/core/validators.py new file mode 100644 index 0000000..2b0eeac --- /dev/null +++ b/tests/pipeline_setup_v2/core/validators.py @@ -0,0 +1,101 @@ +from __future__ import annotations + +from tests.pipeline_setup_v2.core.models import V2Case + + +class CaseValidator: + def validate(self, case: V2Case, actual: dict, details: dict | None = None) -> list[str]: + mismatches: list[str] = [] + self._check(case.expectations.router.intent, actual.get("intent"), "intent", mismatches) + self._check(case.expectations.router.sub_intent, actual.get("sub_intent"), "sub_intent", mismatches) + self._check(case.expectations.router.graph_id, actual.get("graph_id"), "graph_id", mismatches) + self._check(case.expectations.router.conversation_mode, actual.get("conversation_mode"), "conversation_mode", mismatches) + self._check(case.expectations.pipeline.answer_mode, actual.get("answer_mode"), "answer_mode", mismatches) + self._check_retrieval(case, actual, details or {}, mismatches) + self._check_llm(case, actual, mismatches) + return mismatches + + def _check(self, expected, actual, label: str, mismatches: list[str]) -> None: + if expected is not None and expected != actual: + mismatches.append(f"{label}: expected {expected}, got {actual}") + + def _check_retrieval(self, case: V2Case, actual: dict, details: dict, mismatches: list[str]) -> None: + rag_count = int(actual.get("rag_count") or 0) + retrieval = case.expectations.retrieval + if retrieval.non_empty is True and rag_count == 0: + mismatches.append("retrieval: expected non-empty rag, got 0 rows") + if retrieval.non_empty is False and rag_count != 0: + mismatches.append(f"retrieval: expected empty rag, got {rag_count} rows") + if retrieval.min_rows is not None and rag_count < retrieval.min_rows: + mismatches.append(f"retrieval: expected at least {retrieval.min_rows} rows, got {rag_count}") + if retrieval.direct_symbol_test_hits_max is not None: + direct_hits = self._direct_symbol_test_hits(case, details) + if direct_hits > retrieval.direct_symbol_test_hits_max: + mismatches.append( + f"retrieval: expected direct symbol-linked test hits <= {retrieval.direct_symbol_test_hits_max}, got {direct_hits}" + ) + 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 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 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 ())}") + + def _check_llm(self, case: V2Case, actual: dict, mismatches: list[str]) -> None: + llm = case.expectations.llm + expected = llm.non_empty + answer = str(actual.get("llm_answer") or "").strip() + if expected is None: + has_answer = bool(answer) + else: + has_answer = bool(answer) + if expected and not has_answer: + mismatches.append("llm: expected non-empty answer") + if not expected and has_answer: + mismatches.append("llm: expected empty answer") + lowered = answer.lower() + for value in llm.contains_all: + if value.lower() not in lowered: + mismatches.append(f"llm: expected answer to contain '{value}'") + for value in llm.excludes: + if value.lower() in lowered: + mismatches.append(f"llm: expected answer to exclude '{value}'") + + def _direct_symbol_test_hits(self, case: V2Case, details: dict) -> int: + symbols = tuple( + symbol.strip().lower() + for symbol in case.expectations.retrieval.symbol_candidates_contain + if symbol.strip() + ) + if not symbols: + return 0 + hits = 0 + for row in details.get("rag_rows") or []: + if not self._is_test_row(row): + continue + haystacks = self._row_search_texts(row) + if any(symbol in text for symbol in symbols for text in haystacks): + hits += 1 + return hits + + def _is_test_row(self, row: dict) -> bool: + path = str(row.get("path") or "").lower() + metadata = dict(row.get("metadata") or {}) + if bool(metadata.get("is_test")): + return True + return "/tests/" in f"/{path}" or path.startswith("tests/") or "/test_" in path or path.endswith("_test.py") + + def _row_search_texts(self, row: dict) -> tuple[str, ...]: + metadata = dict(row.get("metadata") or {}) + values = [ + str(row.get("title") or ""), + str(row.get("content") or ""), + str(metadata.get("qname") or ""), + str(metadata.get("symbol_name") or ""), + str(metadata.get("src_qname") or ""), + str(metadata.get("dst_ref") or ""), + ] + return tuple(value.lower() for value in values if value) diff --git a/tests/pipeline_setup_v2/llm_prompts.yaml b/tests/pipeline_setup_v2/llm_prompts.yaml new file mode 100644 index 0000000..69185aa --- /dev/null +++ b/tests/pipeline_setup_v2/llm_prompts.yaml @@ -0,0 +1,147 @@ +default: + template_id: "intent_default_v2" + system_prompt: "Ты технический ассистент по коду и документации, который отвечает только по извлечённому контексту." + task_prompt: | + Отвечай кратко, точно и без выдумок. + Используй только факты, которые подтверждаются контекстом RAG. + Если данных недостаточно, прямо скажи, чего именно не хватает. + Не компенсируй нехватку контекста общими рассуждениями. + +intents: + CODE_QA: + template_id: "intent_code_qa_v5" + system_prompt: "Ты senior Python-инженер, который объясняет код только по извлечённым фрагментам из RAG." + task_prompt: | + Отвечай только по коду и структуре проекта, которые есть в контексте. + Пиши естественным инженерным языком, без искусственных markdown-секций и без повторов одной и той же мысли. + Если ответ можно дать в 1-3 фразах, не раздувай его. + Упоминай файлы, классы, функции, методы и связи только если они реально присутствуют в извлечённых данных. + Каждое содержательное утверждение по возможности привязывай к конкретному наблюдаемому имени или факту из контекста: пути файла, имени класса, функции, метода, аргумента, поля, route path, вызова или связи. + Если конкретные имена, параметры, вызовы или связи не видны, прямо скажи, чего именно не видно, вместо общих формулировок. + Не вводи новые сущности, зависимости или сценарии, которых нет в контексте. + Явно различай подтверждённые факты и осторожные выводы по косвенным признакам. + Если данных мало, честно скажи об этом вместо общего обзора. + Не используй жирные заголовки блоков, если пользователь их не просил. + Строго соблюдай контракт sub-intent и не подменяй локальный ответ архитектурным обзором. + Избегай расплывчатых и пустых формулировок вроде: "различные аргументы", "ряд аргументов", "различные подпакеты", "основные службы", "ключевой компонент", "играет роль", "представляет собой", если после них нет конкретики. + Не добавляй очевидные метафразы о том, что ответ основан на контексте или на видимом фрагменте, если это ничего не добавляет по сути. + Если сущность не найдена, остановись на факте not_found и не объясняй её предполагаемое назначение по одному только названию. + Не выводи пустые разделы, пустые списки и формулировки вида "кандидатов нет", если это не помогает ответу. + sub_intents: + OPEN_FILE: + template_id: "intent_code_qa_open_file_ru_v4" + system_prompt: "Ты технический ассистент, который помогает открыть конкретный файл и показать, что в нём реально видно." + task_prompt: | + Сосредоточься на указанном файле и отвечай коротко. + Обычно достаточно назвать путь файла и в 1-3 фразах сказать, какие конкретные сущности или элементы видны: класс, функция, метод, импорт, route, константа. + Не используй общие описания файла без конкретных имён. + Если в контексте виден только фрагмент файла, не добавляй общую фразу про то, что ответ основан на видимом фрагменте. Вместо этого просто ограничься тем, что реально видно. + Не превращай ответ в архитектурный обзор проекта. + Не используй секции и подзаголовки. + Если файла нет, ответь одной короткой фразой: `Файл не найден.` + Не придумывай анализ отсутствующего файла. + + EXPLAIN: + template_id: "intent_code_qa_explain_ru_v4" + system_prompt: "Ты senior Python-инженер и code reviewer, который объясняет устройство кода без домысливания." + task_prompt: | + Объясни, как работает сущность из вопроса пользователя, обычным инженерным текстом. + Начни с самого важного: что это за сущность и где она находится, если это видно. + Затем кратко опиши подтверждённые зависимости, вызовы, аргументы, поля или шаги работы, только если они реально видны. + Не используй общие формулы без конкретных имён. + Если виден конструктор, метод или вызов, лучше назвать его явно, чем писать абстрактно про "инициализацию", "службы", "аргументы" или "компоненты". + Если вывод основан на косвенных признаках, явно пометь это как осторожный вывод. + Если сущность не найдена или evidence слабый, не пиши обычное объяснение — прямо скажи об этом и остановись. + Не используй обязательные секции и подзаголовки. + + EXPLAIN_LOCAL: + template_id: "intent_code_qa_explain_local_ru_v4" + system_prompt: "Ты инженер, который объясняет локальный фрагмент кода без лишней теории и без перехода на уровень всей архитектуры." + task_prompt: | + Дай локальное объяснение по конкретному файлу, символу или короткому участку кода. + Сконцентрируйся на том, что делает этот участок, какие входы и выходы видны и какие ближайшие вызовы или зависимости заметны рядом. + Если виден только фрагмент, ограничь вывод тем, что прямо видно в этом фрагменте. + Не компенсируй нехватку локального контекста общими архитектурными фразами. + Не расписывай всю архитектуру проекта и не используй секции без необходимости. + + FIND_TESTS: + template_id: "intent_code_qa_find_tests_ru_v4" + system_prompt: "Ты инженер, который ищет тестовое покрытие и различает прямые и косвенные тесты." + task_prompt: | + Найди связанные тесты и ответь, где они расположены. + Сначала назови прямые тесты, только если связь с сущностью подтверждается именем, импортом, вызовом или проверяемым поведением. + Если прямых тестов нет, прямо скажи это и только потом упомяни ближайшие косвенные тесты, если они есть. + Коротко поясни, что именно проверяется. + Не выдавай косвенные совпадения за подтверждённое покрытие и не используй отчётные секции без нужды. + Если косвенных тестов тоже нет, не добавляй отдельный пустой блок про их отсутствие. + + FIND_ENTRYPOINTS: + template_id: "intent_code_qa_find_entrypoints_ru_v4" + system_prompt: "Ты инженер, который находит подтверждённые точки входа и отдельно помечает только возможные кандидаты." + task_prompt: | + Найди точки входа, обработчики запуска или важные entrypoints. + Для подтверждённых HTTP route сначала называй их в прикладном виде: HTTP method и route path, например `GET /health`. + Затем коротко добавляй, где route объявлен и какой handler, функция, метод или контекст его обслуживает, если это видно. + Подтверждённые entrypoints перечисляй первыми. + Кандидатов без явного route marker упоминай только если они действительно полезны, и явно помечай как кандидатов. + Не своди ответ к обсуждению декораторов вроде `@app.get`; пользователю важнее method, path и контекст. + Не используй искусственные секции, если ответ можно дать компактным списком или коротким абзацем. + Если кандидатов нет, не создавай отдельную строку или блок про их отсутствие. + Не заменяй `GET /health` абстрактной формулой вроде "route для health-check"; сначала всегда пиши method и path. + + TRACE_FLOW: + template_id: "intent_code_qa_trace_flow_ru_v4" + system_prompt: "Ты инженер, который восстанавливает поток вызовов и движение данных только по доказуемой цепочке из контекста." + task_prompt: | + Проследи поток выполнения или поток данных по найденным артефактам. + Старайся описывать шаги последовательно и коротко, без лишних подзаголовков. + Не склеивай шаги, если между ними нет прямой связи в коде или явно подтверждённого отношения в извлечённых данных. + Если поток восстанавливается только частично, так и скажи. + Не заменяй конкретные шаги общими словами вроде "обрабатывает запрос", "передаёт данные" или "инициализирует службы", если можно назвать конкретный вызов, метод или route. + + ARCHITECTURE: + template_id: "intent_code_qa_architecture_ru_v4" + system_prompt: "Ты инженер, который объясняет устройство подсистемы только по наблюдаемым компонентам и связям из кода." + task_prompt: | + Дай архитектурное объяснение без лишней теории. + Назови подтверждённые компоненты и конкретные связи между ними: создаёт, вызывает, регистрирует, читает, пишет, передаёт, оборачивает. + Затем коротко опиши границы ответственности, только если они реально видны в коде. + Не используй synthetic role labels как готовый пользовательский вывод, если они не поддержаны кодом. + Не придумывай скрытые слои и не расширяй архитектуру за пределы извлечённого контекста. + Не используй обязательные markdown-секции. + Не используй абстрактные формулы вроде "главный компонент", "центральный управляющий компонент", "управляет потоками данных и состоянием системы", если конкретная связь не раскрыта через наблюдаемые методы, поля или вызовы. + + GENERAL_QA: + template_id: "intent_code_qa_general_ru_v2" + system_prompt: "Ты senior Python-инженер, который даёт обзорный ответ по подсистеме или проекту, но остаётся строго привязанным к коду из контекста." + task_prompt: | + Дай обзорный ответ по вопросу пользователя о коде, подсистеме или сценарии работы. + Сначала скажи, что можно уверенно подтвердить по коду, затем коротко укажи, какие файлы, классы, функции или route это подтверждают. + Если данных недостаточно, прямо скажи, чего именно не хватает. + Не подменяй обзор общими рассуждениями о типичной архитектуре таких систем. + Не используй секции без необходимости. + Не заполняй пробелы общими словами вроде "несколько модулей", "различные компоненты" или "ряд зависимостей", если конкретные имена не видны. + + DOCS_QA: + template_id: "intent_docs_qa_v2" + system_prompt: "Ты технический писатель и инженер по документации, который отвечает только по извлечённым документам." + task_prompt: | + Отвечай строго по документации из контекста RAG. + Если есть несколько документов, кратко синтезируй общий вывод и различия между ними. + Не добавляй факты, которых нет в извлечённой документации. + + GENERATE_DOCS_FROM_CODE: + template_id: "intent_generate_docs_v2" + system_prompt: "Ты технический писатель, который готовит документацию по коду без выдуманных деталей." + task_prompt: | + Сформируй структурированное описание: назначение, входы/выходы, зависимости и ограничения. + Включай только то, что подтверждается кодом или контекстом. + Если какая-то часть не подтверждена, явно помечай её как неизвестную. + + PROJECT_MISC: + template_id: "intent_project_misc_v2" + system_prompt: "Ты инженер-ассистент по общим вопросам о проекте, который не выходит за пределы доступного контекста." + task_prompt: | + Дай короткий прикладной ответ по вопросу пользователя, опираясь на контекст. + Если контекст слабый, честно скажи об этом и укажи, какого контекста не хватает. + Не превращай ответ в общий обзор, если данных мало. diff --git a/tests/pipeline_setup_v2/run.py b/tests/pipeline_setup_v2/run.py new file mode 100644 index 0000000..88180de --- /dev/null +++ b/tests/pipeline_setup_v2/run.py @@ -0,0 +1,42 @@ +from __future__ import annotations + +import argparse +import sys +from pathlib import Path + +_agent_root = Path(__file__).resolve().parents[2] +if str(_agent_root) not in sys.path: + sys.path.insert(0, str(_agent_root)) +_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_v2.core.runner import V2Runner + + +def main(argv: list[str] | None = None) -> int: + parser = argparse.ArgumentParser(description="Run unified pipeline_setup_v2 cases") + parser.add_argument("--cases-dir", required=True, help="Directory 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") + 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") + runner = V2Runner(cases_dir=cases_dir, results_dir=results_dir, run_name=str(ns.run_name).strip() or "manual_run") + print(f"Cases dir: {cases_dir}") + print(f"Run dir: {runner.run_dir}") + results, summary_path = runner.run() + passed = sum(1 for item in results if item.passed) + print(f"Passed: {passed}/{len(results)}") + print(f"Summary: {summary_path}") + for item in results: + if not item.passed: + print(f"FAIL {item.case.case_id}: {'; '.join(item.mismatches)}") + return 0 if passed == len(results) else 1 + + +if __name__ == "__main__": + raise SystemExit(main()) diff --git a/tests/pipeline_setup_v2/runtime/__init__.py b/tests/pipeline_setup_v2/runtime/__init__.py new file mode 100644 index 0000000..ddbdb05 --- /dev/null +++ b/tests/pipeline_setup_v2/runtime/__init__.py @@ -0,0 +1 @@ +"""Runtime-specific executors for pipeline_setup_v2.""" diff --git a/tests/pipeline_setup_v2/runtime/code_qa_eval_adapter.py b/tests/pipeline_setup_v2/runtime/code_qa_eval_adapter.py new file mode 100644 index 0000000..fe834ea --- /dev/null +++ b/tests/pipeline_setup_v2/runtime/code_qa_eval_adapter.py @@ -0,0 +1,56 @@ +from __future__ import annotations + +from app.modules.agent.code_qa_runtime import CodeQaRuntimeExecutor +from app.modules.rag.contracts.enums import RagLayer +from app.modules.rag.intent_router_v2 import RepoContext +from tests.pipeline_setup_v2.core.models import ExecutionPayload, V2Case + + +class CodeQaEvalAdapter: + def __init__(self) -> None: + self._executor = CodeQaRuntimeExecutor(llm=None) + + def execute(self, case: V2Case, rag_session_id: str | None) -> ExecutionPayload: + if not rag_session_id: + raise ValueError(f"Case '{case.case_id}' requires rag_session_id or repo_path") + result = self._executor.execute(user_query=case.query, rag_session_id=rag_session_id) + route_result = result.router_result + route = result.diagnostics.router_result + details = { + "case_id": case.case_id, + "query": case.query, + "rag_session_id": rag_session_id, + "actual": { + "intent": route.get("intent"), + "sub_intent": route.get("sub_intent"), + "graph_id": route.get("graph_id"), + "conversation_mode": route.get("conversation_mode"), + "rag_count": len(result.retrieval_result.code_chunks) if result.retrieval_result else 0, + "llm_answer": "", + "answer_mode": result.answer_mode, + "path_scope": tuple(route.get("path_scope") or []), + "symbol_candidates": tuple(route_result.query_plan.symbol_candidates or []) if route_result else (), + "layers": tuple(route.get("layers") or []), + }, + "timings_ms": result.diagnostics.timings_ms, + } + actual = dict(details["actual"]) + return ExecutionPayload(actual=actual, details=details) + + +def _repo_context() -> RepoContext: + return RepoContext( + languages=["python"], + available_domains=["CODE", "DOCS"], + available_layers=[ + RagLayer.CODE_ENTRYPOINTS, + RagLayer.CODE_SYMBOL_CATALOG, + RagLayer.CODE_DEPENDENCY_GRAPH, + RagLayer.CODE_SEMANTIC_ROLES, + RagLayer.CODE_SOURCE_CHUNKS, + RagLayer.DOCS_MODULE_CATALOG, + RagLayer.DOCS_FACT_INDEX, + RagLayer.DOCS_SECTION_INDEX, + RagLayer.DOCS_POLICY_INDEX, + ], + ) diff --git a/tests/pipeline_setup_v2/runtime/runtime_adapter.py b/tests/pipeline_setup_v2/runtime/runtime_adapter.py new file mode 100644 index 0000000..3cc11d3 --- /dev/null +++ b/tests/pipeline_setup_v2/runtime/runtime_adapter.py @@ -0,0 +1,154 @@ +from __future__ import annotations + +from datetime import datetime +from pathlib import Path + +from app.modules.agent.code_qa_runtime import CodeQaRuntimeExecutor +from app.modules.agent.llm import AgentLlmService +from app.modules.agent.prompt_loader import PromptLoader +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 +from tests.pipeline_setup.suite_02_pipeline.pipeline_intent_rag.helpers.env_bootstrap import PipelineEnvLoader +from tests.pipeline_setup.suite_02_pipeline.pipeline_intent_rag.helpers.models import PhraseCase, PipelineResult +from tests.pipeline_setup.suite_02_pipeline.pipeline_intent_rag.helpers.pipeline_runner import ( + IntentRouterRagPipelineRunner, + RouterOnlyRunner, +) +from tests.pipeline_setup_v2.core.models import ExecutionPayload, V2Case + + +class RuntimeAdapter: + def __init__(self) -> None: + self._test_root = ( + Path(__file__).resolve().parents[2] + / "pipeline_setup" + / "suite_02_pipeline" + / "pipeline_intent_rag" + ).resolve() + PipelineEnvLoader(self._test_root).load() + self._started_at = datetime.now() + self._rag_adapter = None + self._executor: CodeQaRuntimeExecutor | None = None + + def execute(self, case: V2Case, rag_session_id: str | None) -> ExecutionPayload: + phrase = PhraseCase( + case_id=case.case_id, + text=case.query, + rag_session_id=rag_session_id, + expected_intent=case.expectations.router.intent, + expect_non_empty_rag=bool(case.expectations.retrieval.non_empty), + ) + if case.mode == "router_only": + result = RouterOnlyRunner(started_at=self._started_at).run_case(phrase) + elif case.mode == "router_rag": + result = IntentRouterRagPipelineRunner( + started_at=self._started_at, + rag_adapter=self._rag_components(), + session_resolver=_StaticSessionResolver(), + ).run_case(phrase) + else: + result = self._run_full_chain(phrase) + record = result.to_record() + return ExecutionPayload(actual=_actual_from_runtime_record(record), details=record) + + def _run_full_chain(self, phrase: PhraseCase) -> PipelineResult: + result = self._executor_instance().execute(user_query=phrase.text, rag_session_id=phrase.rag_session_id or "") + route = dict(result.diagnostics.router_result) + retrieval = result.diagnostics.retrieval_request + diagnostics = { + "router_plan": { + "sub_intent": route.get("sub_intent"), + "graph_id": route.get("graph_id"), + "path_scope": list(retrieval.get("path_scope") or []), + "layers": list(retrieval.get("requested_layers") or []), + "symbol_candidates": list(result.router_result.query_plan.symbol_candidates or []) if result.router_result else [], + }, + "timings_ms": dict(result.diagnostics.timings_ms or {}), + "answer_policy": { + "short_circuit": not result.llm_used, + "answer_mode": _answer_status(result.answer_mode, result.llm_used), + "failure_reason": ",".join(result.validation.reasons), + }, + } + return PipelineResult( + case=phrase, + mode="full_chain", + run_started_at=self._started_at, + rag_session_id=phrase.rag_session_id, + intent=str(route.get("intent") or ""), + graph_id=str(route.get("graph_id") or ""), + conversation_mode=str(route.get("conversation_mode") or ""), + query=str(retrieval.get("query") or phrase.text), + rag_rows=list(result.retrieval_result.raw_rows) if result.retrieval_result else [], + symbol_resolution=result.router_result.symbol_resolution.model_dump() if result.router_result else {}, + llm_answer=result.final_answer, + diagnostics=diagnostics, + ) + + def _rag_components(self): + if self._rag_adapter is None: + from app.modules.rag.persistence.repository import RagRepository + from tests.pipeline_setup.suite_02_pipeline.pipeline_intent_rag.helpers.rag_db_adapter import ( + RagDbAdapter, + SessionEmbeddingDimensions, + ) + + self._rag_adapter = RagDbAdapter( + repository=RagRepository(), + dim_resolver=SessionEmbeddingDimensions(), + ) + return self._rag_adapter + + def _executor_instance(self) -> CodeQaRuntimeExecutor: + if self._executor is None: + self._executor = CodeQaRuntimeExecutor(_build_llm()) + return self._executor + + +class _StaticSessionResolver: + def resolve(self, case: PhraseCase) -> str: + if not case.rag_session_id: + raise ValueError(f"Case '{case.case_id}' requires rag_session_id or repo_path") + return case.rag_session_id + + +def _actual_from_runtime_record(record: dict) -> dict: + diagnostics = dict(record.get("diagnostics") or {}) + router_plan = dict(diagnostics.get("router_plan") or {}) + summary = dict(record.get("summary") or {}) + router_summary = dict(summary.get("router") or {}) + return { + "intent": record.get("actual_intent"), + "sub_intent": router_summary.get("sub_intent") or router_plan.get("sub_intent"), + "graph_id": record.get("graph_id"), + "conversation_mode": record.get("conversation_mode"), + "rag_count": int(record.get("rag_count") or 0), + "llm_answer": str(record.get("llm_answer") or "").strip(), + "answer_mode": dict(summary.get("llm") or {}).get("answer_status"), + "path_scope": tuple(router_plan.get("path_scope") or []), + "symbol_candidates": tuple(router_plan.get("symbol_candidates") or []), + "layers": tuple(router_plan.get("layers") or []), + } + + +def _ms(started: float) -> int: + return 0 + + +def _sub_intent_from_result(result: PipelineResult) -> str | None: + router_plan = dict(result.diagnostics.get("router_plan") or {}) + value = str(router_plan.get("sub_intent") or "").strip() + return value or None + + +def _answer_status(answer_mode: str, llm_used: bool) -> str: + if answer_mode == "normal" and llm_used: + return "answered" + return answer_mode + + +def _build_llm() -> AgentLlmService: + settings = GigaChatSettings.from_env() + client = GigaChatClient(settings, GigaChatTokenProvider(settings)) + return AgentLlmService(client=client, prompts=PromptLoader()) diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_090854/full_chain_plba_code_retrieval_plba-fullchain-explain-control-plane-service.json b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_090854/full_chain_plba_code_retrieval_plba-fullchain-explain-control-plane-service.json new file mode 100644 index 0000000..90e3c83 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_090854/full_chain_plba_code_retrieval_plba-fullchain-explain-control-plane-service.json @@ -0,0 +1,2532 @@ +{ + "case_id": "plba-fullchain-explain-control-plane-service", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_retrieval.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 19, + "llm_answer": "## Анализ класса `ControlPlaneService`\n\n### Описание файла и класса\n\nКласс `ControlPlaneService` определен в файле `src/app_runtime/control/service.py`.\n\n```python\n# src/app_runtime/control/service.py\nclass ControlPlaneService\n```\n\n### Назначение и обязанности\n\nНазвание класса предполагает, что он является службой управления плоскостью контроля (`Control Plane Service`), которая отвечает за управление определенными аспектами приложения или системы.\n\n#### Основные обязанности и роли:\n\n- **Назначение**: Предполагается, что класс реализует функциональность сервиса, связанный с управлением состоянием системы, взаимодействует с другими компонентами и участвует в различных этапах обработки данных (dataflow slices).\n \n - **Поведение сервиса**:\n - Обрабатывает запросы и изменяет состояние системы через чтение и запись атрибутов состояния.\n \n - **Участие в потоке данных (dataflow)**: \n Класс участвует в нескольких срезах потока данных (dataflow slices):\n - Срез №5: Участие в общих сервисных операциях, связанных с управлением системой.\n \n\n### Зависимости и взаимодействие\n\nКласс использует другие классы и интерфейсы для выполнения своих обязанностей:\n\n- Контроллер канала (`ControlChannel`) из модуля `base.py`: Это интерфейс, представляющий стандартный контроллер модели.\n- Контрольный набор действий (`ControlActionSet`) также из модуля `base.py`: Набор стандартных операций или действий, которые могут быть выполнены моделью.\n- Другие классы и сервисы, участвующие в выполнении HTTP-запросов, такие как `UvicornThreadRunner`, который используется для запуска HTTP-сервера на отдельном потоке, и `HttpControlChannel`, обеспечивающий HTTP-контроллеры.\n\nЭти зависимости позволяют классу эффективно участвовать в управлении состоянием системы и взаимодействии с внешними API и серверами.\n\n---\n\n### Поток данных и архитектура\n\nАрхитектура класса предполагает централизованное управление данными и состоянием через определенные срезы данных (dataflow slices). Каждый из этих срезов представляет собой этап или часть общего процесса работы системы, где данный класс выполняет свою роль.\n\nНапример:\n\n- В срезе №5 он может выполнять действия по управлению конфигурацией, состоянию и обработке ошибок, связанных с общим контролем над работой системы.\n\n---\n\n### Заключение\n\nТаким образом, `ControlPlaneService` — это ключевой элемент архитектуры, ответственный за обработку и управление состоянием системы, ее конфигурацией и взаимодействием с внешними компонентами и службами. Его функциональность интегрируется в общий процесс через различные срезы данных, обеспечивая гибкость и масштабируемость всей системы.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "ControlPlaneService" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-fullchain-explain-control-plane-service", + "text": "Объясни класс ControlPlaneService", + "mode": "full_chain", + "run_started_at": "2026-03-12T09:08:54", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни класс ControlPlaneService", + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "ControlPlaneService", + "alternatives": [ + "ControlPlaneService" + ], + "confidence": 0.99 + }, + "rag_count": 19, + "rag_rows": [ + { + "path": "src/app_runtime/control/service.py", + "content": "class ControlPlaneService\nControlPlaneService", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "qname": "ControlPlaneService", + "kind": "class", + "signature": "ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/queue/in_memory.py", + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)", + "layer": "C4_SEMANTIC_ROLES", + "title": "InMemoryTaskQueue", + "span_start": 9, + "span_end": 38, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 22, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "2da04cb94544a3bcbf0943a95ad4bdd8710bcafaa32a02fd0e4de2178dcf3533", + "symbol_name": "InMemoryTaskQueue", + "qname": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 9, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "58f0cc001ccda0eee4c6bc32ed83bd05eafd6b6644f1e8b4aa9eed3103db73dc", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.register_channel reads_attr self._channels.append", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.register_channel:reads_attr", + "span_start": 17, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "1ee5925deffdc38ba15b88bf7c89e5fcd1a78f493fe30f2deb827d714a1b18e8", + "edge_type": "reads_attr", + "src_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "src_qname": "ControlPlaneService.register_channel", + "dst_symbol_id": null, + "dst_ref": "self._channels.append", + "resolution": "partial", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "class ControlPlaneService:\n def __init__(self) -> None:\n self._channels: list[ControlChannel] = []\n\n def register_channel(self, channel: ControlChannel) -> None:\n self._channels.append(channel)\n\n def start(self, runtime: RuntimeManager) -> None:\n if not self._channels:\n return\n asyncio.run(self._start_async(runtime))\n\n def stop(self) -> None:\n if not self._channels:\n return\n asyncio.run(self._stop_async())\n\n def snapshot(self, runtime: RuntimeManager) -> dict[str, object]:\n health = runtime.current_health()\n return {\n \"runtime\": {\"state\": runtime._state.value},\n \"modules\": list(runtime.registry.modules),\n \"services\": runtime.services.snapshot(),\n \"workers\": runtime.workers.snapshot(),\n \"health\": runtime.health.snapshot(runtime.workers.healths()) | {\"status\": health[\"status\"]},\n \"config\": runtime.configuration.get(),\n }\n\n async def _start_async(self, runtime: RuntimeManager) -> None:\n actions = ControlActionSet(\n health=runtime.health_status,\n start=runtime.start_runtime,\n stop=runtime.stop_runtime,\n status=runtime.runtime_status,\n )\n for channel in self._channels:\n await channel.start(actions)\n\n async def _stop_async(self) -> None:\n for channel in reversed(self._channels):\n await channel.stop()", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/service.py:ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "## Анализ класса `ControlPlaneService`\n\n### Описание файла и класса\n\nКласс `ControlPlaneService` определен в файле `src/app_runtime/control/service.py`.\n\n```python\n# src/app_runtime/control/service.py\nclass ControlPlaneService\n```\n\n### Назначение и обязанности\n\nНазвание класса предполагает, что он является службой управления плоскостью контроля (`Control Plane Service`), которая отвечает за управление определенными аспектами приложения или системы.\n\n#### Основные обязанности и роли:\n\n- **Назначение**: Предполагается, что класс реализует функциональность сервиса, связанный с управлением состоянием системы, взаимодействует с другими компонентами и участвует в различных этапах обработки данных (dataflow slices).\n \n - **Поведение сервиса**:\n - Обрабатывает запросы и изменяет состояние системы через чтение и запись атрибутов состояния.\n \n - **Участие в потоке данных (dataflow)**: \n Класс участвует в нескольких срезах потока данных (dataflow slices):\n - Срез №5: Участие в общих сервисных операциях, связанных с управлением системой.\n \n\n### Зависимости и взаимодействие\n\nКласс использует другие классы и интерфейсы для выполнения своих обязанностей:\n\n- Контроллер канала (`ControlChannel`) из модуля `base.py`: Это интерфейс, представляющий стандартный контроллер модели.\n- Контрольный набор действий (`ControlActionSet`) также из модуля `base.py`: Набор стандартных операций или действий, которые могут быть выполнены моделью.\n- Другие классы и сервисы, участвующие в выполнении HTTP-запросов, такие как `UvicornThreadRunner`, который используется для запуска HTTP-сервера на отдельном потоке, и `HttpControlChannel`, обеспечивающий HTTP-контроллеры.\n\nЭти зависимости позволяют классу эффективно участвовать в управлении состоянием системы и взаимодействии с внешними API и серверами.\n\n---\n\n### Поток данных и архитектура\n\nАрхитектура класса предполагает централизованное управление данными и состоянием через определенные срезы данных (dataflow slices). Каждый из этих срезов представляет собой этап или часть общего процесса работы системы, где данный класс выполняет свою роль.\n\nНапример:\n\n- В срезе №5 он может выполнять действия по управлению конфигурацией, состоянию и обработке ошибок, связанных с общим контролем над работой системы.\n\n---\n\n### Заключение\n\nТаким образом, `ControlPlaneService` — это ключевой элемент архитектуры, ответственный за обработку и управление состоянием системы, ее конфигурацией и взаимодействием с внешними компонентами и службами. Его функциональность интегрируется в общий процесс через различные срезы данных, обеспечивая гибкость и масштабируемость всей системы.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS", + "C4_SEMANTIC_ROLES" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "ControlPlaneService" + ], + "keyword_hints": [ + "ControlPlaneService" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "ControlPlaneService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Объясни класс ControlPlaneService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "Объясни класс ControlPlaneService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Объясни класс ControlPlaneService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "Объясни класс ControlPlaneService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "ControlPlaneService", + "alternatives": [ + "ControlPlaneService" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 8, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 1, + "symbol_resolution": 0, + "retrieval_total": 168, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 57, + "C0_SOURCE_CHUNKS": 23, + "C4_SEMANTIC_ROLES": 15, + "C2_DEPENDENCY_GRAPH": 61, + "C3_ENTRYPOINTS": 10 + }, + "merge_rank": 18, + "prompt_build": 0, + "llm_call": 5367 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 325, + "evidence_rows": 19, + "evidence_chars": 3087 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 8, + "unique_paths": 7 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 1 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_v1", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "ControlPlaneService" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 19, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-fullchain-explain-control-plane-service", + "mode": "full_chain", + "run_started_at": "2026-03-12T09:08:54", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Объясни класс ControlPlaneService", + "normalized_query": "Объясни класс ControlPlaneService" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Объясни класс ControlPlaneService" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни класс ControlPlaneService" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "ControlPlaneService" + ], + "keyword_hints": [ + "ControlPlaneService" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 1 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Объясни класс ControlPlaneService" + }, + "output": { + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "ControlPlaneService", + "alternatives": [ + "ControlPlaneService" + ], + "confidence": 0.99 + }, + "rag_count": 19, + "rag_rows": [ + { + "path": "src/app_runtime/control/service.py", + "content": "class ControlPlaneService\nControlPlaneService", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "qname": "ControlPlaneService", + "kind": "class", + "signature": "ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/queue/in_memory.py", + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)", + "layer": "C4_SEMANTIC_ROLES", + "title": "InMemoryTaskQueue", + "span_start": 9, + "span_end": 38, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 22, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "2da04cb94544a3bcbf0943a95ad4bdd8710bcafaa32a02fd0e4de2178dcf3533", + "symbol_name": "InMemoryTaskQueue", + "qname": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 9, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "58f0cc001ccda0eee4c6bc32ed83bd05eafd6b6644f1e8b4aa9eed3103db73dc", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.register_channel reads_attr self._channels.append", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.register_channel:reads_attr", + "span_start": 17, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "1ee5925deffdc38ba15b88bf7c89e5fcd1a78f493fe30f2deb827d714a1b18e8", + "edge_type": "reads_attr", + "src_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "src_qname": "ControlPlaneService.register_channel", + "dst_symbol_id": null, + "dst_ref": "self._channels.append", + "resolution": "partial", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "class ControlPlaneService:\n def __init__(self) -> None:\n self._channels: list[ControlChannel] = []\n\n def register_channel(self, channel: ControlChannel) -> None:\n self._channels.append(channel)\n\n def start(self, runtime: RuntimeManager) -> None:\n if not self._channels:\n return\n asyncio.run(self._start_async(runtime))\n\n def stop(self) -> None:\n if not self._channels:\n return\n asyncio.run(self._stop_async())\n\n def snapshot(self, runtime: RuntimeManager) -> dict[str, object]:\n health = runtime.current_health()\n return {\n \"runtime\": {\"state\": runtime._state.value},\n \"modules\": list(runtime.registry.modules),\n \"services\": runtime.services.snapshot(),\n \"workers\": runtime.workers.snapshot(),\n \"health\": runtime.health.snapshot(runtime.workers.healths()) | {\"status\": health[\"status\"]},\n \"config\": runtime.configuration.get(),\n }\n\n async def _start_async(self, runtime: RuntimeManager) -> None:\n actions = ControlActionSet(\n health=runtime.health_status,\n start=runtime.start_runtime,\n stop=runtime.stop_runtime,\n status=runtime.runtime_status,\n )\n for channel in self._channels:\n await channel.start(actions)\n\n async def _stop_async(self) -> None:\n for channel in reversed(self._channels):\n await channel.stop()", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/service.py:ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "ControlPlaneService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Объясни класс ControlPlaneService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "Объясни класс ControlPlaneService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Объясни класс ControlPlaneService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "Объясни класс ControlPlaneService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "ControlPlaneService", + "alternatives": [ + "ControlPlaneService" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 8, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 168, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 57, + "C0_SOURCE_CHUNKS": 23, + "C4_SEMANTIC_ROLES": 15, + "C2_DEPENDENCY_GRAPH": 61, + "C3_ENTRYPOINTS": 10 + }, + "merge_rank": 18 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Объясни класс ControlPlaneService", + "rag_count": 19 + }, + "output": { + "llm_answer": "## Анализ класса `ControlPlaneService`\n\n### Описание файла и класса\n\nКласс `ControlPlaneService` определен в файле `src/app_runtime/control/service.py`.\n\n```python\n# src/app_runtime/control/service.py\nclass ControlPlaneService\n```\n\n### Назначение и обязанности\n\nНазвание класса предполагает, что он является службой управления плоскостью контроля (`Control Plane Service`), которая отвечает за управление определенными аспектами приложения или системы.\n\n#### Основные обязанности и роли:\n\n- **Назначение**: Предполагается, что класс реализует функциональность сервиса, связанный с управлением состоянием системы, взаимодействует с другими компонентами и участвует в различных этапах обработки данных (dataflow slices).\n \n - **Поведение сервиса**:\n - Обрабатывает запросы и изменяет состояние системы через чтение и запись атрибутов состояния.\n \n - **Участие в потоке данных (dataflow)**: \n Класс участвует в нескольких срезах потока данных (dataflow slices):\n - Срез №5: Участие в общих сервисных операциях, связанных с управлением системой.\n \n\n### Зависимости и взаимодействие\n\nКласс использует другие классы и интерфейсы для выполнения своих обязанностей:\n\n- Контроллер канала (`ControlChannel`) из модуля `base.py`: Это интерфейс, представляющий стандартный контроллер модели.\n- Контрольный набор действий (`ControlActionSet`) также из модуля `base.py`: Набор стандартных операций или действий, которые могут быть выполнены моделью.\n- Другие классы и сервисы, участвующие в выполнении HTTP-запросов, такие как `UvicornThreadRunner`, который используется для запуска HTTP-сервера на отдельном потоке, и `HttpControlChannel`, обеспечивающий HTTP-контроллеры.\n\nЭти зависимости позволяют классу эффективно участвовать в управлении состоянием системы и взаимодействии с внешними API и серверами.\n\n---\n\n### Поток данных и архитектура\n\nАрхитектура класса предполагает централизованное управление данными и состоянием через определенные срезы данных (dataflow slices). Каждый из этих срезов представляет собой этап или часть общего процесса работы системы, где данный класс выполняет свою роль.\n\nНапример:\n\n- В срезе №5 он может выполнять действия по управлению конфигурацией, состоянию и обработке ошибок, связанных с общим контролем над работой системы.\n\n---\n\n### Заключение\n\nТаким образом, `ControlPlaneService` — это ключевой элемент архитектуры, ответственный за обработку и управление состоянием системы, ее конфигурацией и взаимодействием с внешними компонентами и службами. Его функциональность интегрируется в общий процесс через различные срезы данных, обеспечивая гибкость и масштабируемость всей системы." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 325, + "evidence_rows": 19, + "evidence_chars": 3087 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 8, + "unique_paths": 7 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 1 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_v1", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 5367 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_090854/full_chain_plba_code_retrieval_plba-fullchain-explain-control-plane-service.md b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_090854/full_chain_plba_code_retrieval_plba-fullchain-explain-control-plane-service.md new file mode 100644 index 0000000..6f3b898 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_090854/full_chain_plba_code_retrieval_plba-fullchain-explain-control-plane-service.md @@ -0,0 +1,34 @@ +# plba-fullchain-explain-control-plane-service + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_retrieval.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Объясни класс ControlPlaneService + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 19, + "llm_answer": "## Анализ класса `ControlPlaneService`\n\n### Описание файла и класса\n\nКласс `ControlPlaneService` определен в файле `src/app_runtime/control/service.py`.\n\n```python\n# src/app_runtime/control/service.py\nclass ControlPlaneService\n```\n\n### Назначение и обязанности\n\nНазвание класса предполагает, что он является службой управления плоскостью контроля (`Control Plane Service`), которая отвечает за управление определенными аспектами приложения или системы.\n\n#### Основные обязанности и роли:\n\n- **Назначение**: Предполагается, что класс реализует функциональность сервиса, связанный с управлением состоянием системы, взаимодействует с другими компонентами и участвует в различных этапах обработки данных (dataflow slices).\n \n - **Поведение сервиса**:\n - Обрабатывает запросы и изменяет состояние системы через чтение и запись атрибутов состояния.\n \n - **Участие в потоке данных (dataflow)**: \n Класс участвует в нескольких срезах потока данных (dataflow slices):\n - Срез №5: Участие в общих сервисных операциях, связанных с управлением системой.\n \n\n### Зависимости и взаимодействие\n\nКласс использует другие классы и интерфейсы для выполнения своих обязанностей:\n\n- Контроллер канала (`ControlChannel`) из модуля `base.py`: Это интерфейс, представляющий стандартный контроллер модели.\n- Контрольный набор действий (`ControlActionSet`) также из модуля `base.py`: Набор стандартных операций или действий, которые могут быть выполнены моделью.\n- Другие классы и сервисы, участвующие в выполнении HTTP-запросов, такие как `UvicornThreadRunner`, который используется для запуска HTTP-сервера на отдельном потоке, и `HttpControlChannel`, обеспечивающий HTTP-контроллеры.\n\nЭти зависимости позволяют классу эффективно участвовать в управлении состоянием системы и взаимодействии с внешними API и серверами.\n\n---\n\n### Поток данных и архитектура\n\nАрхитектура класса предполагает централизованное управление данными и состоянием через определенные срезы данных (dataflow slices). Каждый из этих срезов представляет собой этап или часть общего процесса работы системы, где данный класс выполняет свою роль.\n\nНапример:\n\n- В срезе №5 он может выполнять действия по управлению конфигурацией, состоянию и обработке ошибок, связанных с общим контролем над работой системы.\n\n---\n\n### Заключение\n\nТаким образом, `ControlPlaneService` — это ключевой элемент архитектуры, ответственный за обработку и управление состоянием системы, ее конфигурацией и взаимодействием с внешними компонентами и службами. Его функциональность интегрируется в общий процесс через различные срезы данных, обеспечивая гибкость и масштабируемость всей системы.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "ControlPlaneService" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_090854/full_chain_plba_code_retrieval_plba-fullchain-explain-http-control-channel.json b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_090854/full_chain_plba_code_retrieval_plba-fullchain-explain-http-control-channel.json new file mode 100644 index 0000000..ee6ab87 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_090854/full_chain_plba_code_retrieval_plba-fullchain-explain-http-control-channel.json @@ -0,0 +1,2564 @@ +{ + "case_id": "plba-fullchain-explain-http-control-channel", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_retrieval.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 19, + "llm_answer": "## Анализ класса `HttpControlChannel`\n\n### Файл и позиция класса\n```python\n# Источник: src/app_runtime/control/http_channel.py\n# Класс: HttpControlChannel\n```\n\n### Наследование и роль класса\nКласс `HttpControlChannel` наследует от базового класса `ControlChannel`. Его аннотация указывает на то, что он является частью стадии конвейера (`pipeline_stage`), что означает его участие в общем потоке обработки данных приложения.\n\n### Ответственность класса\nДокументированные обязанности класса включают:\n- Чтение и запись атрибутов состояния.\n- Участие в срезах потока данных (dataflow slices).\n\nВ документации упоминается конкретное количество таких срезов — 10.\n\n### Взаимодействие с другими сущностями\nДля понимания полной картины взаимодействия и архитектуры важно рассмотреть следующие классы и их роли:\n\n#### 1. **ControlChannel**\nЭтот базовый класс определяет основную модель поведения для всех каналов управления состоянием. Он имеет следующую документацию:\n```python\n# Источник: src/app_runtime/control/base.py\n# Класс: ControlChannel\nControlChannel\nrole: model\nResponsibilities:\n- default model role\n```\n\n#### 2. **ControlActionSet**\nЭто также базовый класс действий контроля, упомянутый в той же документации, но не приводится подробной информации о нем здесь.\n\n#### 3. **ControlPlaneService**\nЕще одна сущность, упомянутая в контексте, которая играет важную роль как сервис управления данными:\n```python\n# Источник: src/app_runtime/control/service.py\n# Класс: ControlPlaneService\nControlPlaneService\nrole: pipeline_stage\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)\n```\n\n#### 4. **UvicornThreadRunner**\nТакже упоминается еще один компонент, участвующий в управлении состоянием и потоков данных:\n```python\n# Источник: src/app_runtime/control/http_runner.py\n# Класс: UvicornThreadRunner\nUvicornThreadRunner\nrole: pipeline_stage\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)\n```\n\n### Поток данных и взаимодействие между компонентами\nУчитывая вышеописанные классы и обязанности, можно предположить следующий сценарий работы системы:\n\n1. Пользовательский запрос поступает через HTTP API.\n2. Управление состоянием запроса осуществляется посредством объекта `HttpControlChannel`, который обеспечивает чтение и запись необходимых атрибутов состояния.\n3. Канал взаимодействует с общей системой управления состоянием через промежуточные службы, такие как `ControlPlaneService`.\n4. Эти службы участвуют в более широком потоке данных (dataflow slices) вместе с другим компонентом `UvicornThreadRunner`, обеспечивая параллельную обработку запросов и управление потоком выполнения задач.\n\nТаким образом, основная задача `HttpControlChannel` заключается в обеспечении надежной логики чтения и записи атрибутов состояния для отдельных частей системы, при этом совместно с другими компонентами он участвует в обработке и маршрутизации данных в рамках общего архитектурного подхода.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "HttpControlChannel" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-fullchain-explain-http-control-channel", + "text": "Объясни класс HttpControlChannel", + "mode": "full_chain", + "run_started_at": "2026-03-12T09:08:54", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни класс HttpControlChannel", + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "HttpControlChannel", + "alternatives": [ + "HttpControlChannel" + ], + "confidence": 0.99 + }, + "rag_count": 19, + "rag_rows": [ + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel\nHttpControlChannel(ControlChannel)", + "layer": "C1_SYMBOL_CATALOG", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "qname": "HttpControlChannel", + "kind": "class", + "signature": "HttpControlChannel(ControlChannel)", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/queue/in_memory.py", + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)", + "layer": "C4_SEMANTIC_ROLES", + "title": "InMemoryTaskQueue", + "span_start": 9, + "span_end": 38, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 22, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "2da04cb94544a3bcbf0943a95ad4bdd8710bcafaa32a02fd0e4de2178dcf3533", + "symbol_name": "InMemoryTaskQueue", + "qname": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 9, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "58f0cc001ccda0eee4c6bc32ed83bd05eafd6b6644f1e8b4aa9eed3103db73dc", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._runner\n -> HttpControlChannel.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 15, + "span_end": 22, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "51d73913df709152258ed1b9a8c8f4eb3c575eccfe6b982aef0b28e0789a29da", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0", + "dst_ref": "HttpControlChannel.start", + "resolution": "resolved", + "slice_id": "51d73913df709152258ed1b9a8c8f4eb3c575eccfe6b982aef0b28e0789a29da", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._runner", + "HttpControlChannel.start" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._runner\n -> HttpControlChannel.port", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 15, + "span_end": 29, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "c7167bab7218bb768ad7c11bfb40d1a3096e6071dd7817bba5fd864cf8f6de13", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "3632ce8227f4a31e0768f2fb021a4d1ba28e1202633aa0f2fac902295931280f", + "dst_ref": "HttpControlChannel.port", + "resolution": "resolved", + "slice_id": "c7167bab7218bb768ad7c11bfb40d1a3096e6071dd7817bba5fd864cf8f6de13", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._runner", + "HttpControlChannel.port" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "3632ce8227f4a31e0768f2fb021a4d1ba28e1202633aa0f2fac902295931280f" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._timeout\n -> HttpControlChannel._health_response", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 14, + "span_end": 34, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "f858f5c9e575f6c4cdfe3853571b7ee21d1f628a443541d2037c3dc9d0790bef", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "e84bf04e9cd2127df235b7064d05f47e19f19a89c7c82f4c247231d4e8fa426a", + "dst_ref": "HttpControlChannel._health_response", + "resolution": "resolved", + "slice_id": "f858f5c9e575f6c4cdfe3853571b7ee21d1f628a443541d2037c3dc9d0790bef", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._timeout", + "HttpControlChannel._health_response" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "e84bf04e9cd2127df235b7064d05f47e19f19a89c7c82f4c247231d4e8fa426a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._timeout\n -> HttpControlChannel._action_response", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "c3ef21fcae96c82c00be74b3ab827d4af2085d89cb3fa5521c19a174aad84dbb", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "e64969024ccaeb34d8d91473fad07b3b3d341875846392e7a006406c7ada1954", + "dst_ref": "HttpControlChannel._action_response", + "resolution": "resolved", + "slice_id": "c3ef21fcae96c82c00be74b3ab827d4af2085d89cb3fa5521c19a174aad84dbb", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._timeout", + "HttpControlChannel._action_response" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "e64969024ccaeb34d8d91473fad07b3b3d341875846392e7a006406c7ada1954" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._runner\n -> HttpControlChannel.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 15, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "0f827ef81a990258a8a74381c8564a8361afa6712dba3200592659c939adcb9d", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "f29ab212620093d72be20e26c5a399624c7939a6056a728762ed3f84a250bfa3", + "dst_ref": "HttpControlChannel.stop", + "resolution": "resolved", + "slice_id": "0f827ef81a990258a8a74381c8564a8361afa6712dba3200592659c939adcb9d", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._runner", + "HttpControlChannel.stop" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "f29ab212620093d72be20e26c5a399624c7939a6056a728762ed3f84a250bfa3" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._factory\n -> HttpControlChannel.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 16, + "span_end": 21, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e61ec25ded7dbe380d95ce2abcbc1d7a2d2afde5aa8453866df8706dfb7d6ddb", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0", + "dst_ref": "HttpControlChannel.start", + "resolution": "resolved", + "slice_id": "e61ec25ded7dbe380d95ce2abcbc1d7a2d2afde5aa8453866df8706dfb7d6ddb", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._factory", + "HttpControlChannel.start" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel(ControlChannel):\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._timeout = timeout\n self._runner = UvicornThreadRunner(host, port, timeout)\n self._factory = HttpControlAppFactory()\n self._actions: ControlActionSet | None = None\n\n async def start(self, actions: ControlActionSet) -> None:\n self._actions = actions\n app = self._factory.create(self._health_response, self._action_response)\n await self._runner.start(app)\n\n async def stop(self) -> None:\n await self._runner.stop()\n\n @property\n def port(self) -> int:\n return self._runner.port\n\n async def _health_response(self) -> dict[str, object]:\n if self._actions is None:\n return {\"status\": \"unhealthy\", \"detail\": \"control actions are not configured\"}\n return await asyncio.wait_for(self._actions.health(), timeout=float(self._timeout))\n\n async def _action_response(self, action: str, _client_source: str = \"unknown\") -> JSONResponse:\n if self._actions is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"{action} handler is not configured\"}, status_code=404)\n callbacks = {\n \"start\": self._actions.start,\n \"stop\": self._actions.stop,\n \"status\": self._actions.status,\n }\n callback = callbacks.get(action)\n if callback is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"unsupported action: {action}\"}, status_code=404)\n action_timeout = max(float(self._timeout), 10.0) if action in {\"start\", \"stop\"} else float(self._timeout)\n try:\n detail = await asyncio.wait_for(callback(), timeout=action_timeout)\n except asyncio.TimeoutError:\n return JSONResponse(\n content={\"status\": \"accepted\", \"detail\": f\"{action} operation is still in progress\"},\n status_code=202,\n )\n except Exception as exc:\n return JSONResponse(content={\"status\": \"error\", \"detail\": str(exc)}, status_code=500)\n return JSONResponse(content={\"status\": \"ok\", \"detail\": detail or f\"{action} action accepted\"}, status_code=200)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_channel.py:HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "## Анализ класса `HttpControlChannel`\n\n### Файл и позиция класса\n```python\n# Источник: src/app_runtime/control/http_channel.py\n# Класс: HttpControlChannel\n```\n\n### Наследование и роль класса\nКласс `HttpControlChannel` наследует от базового класса `ControlChannel`. Его аннотация указывает на то, что он является частью стадии конвейера (`pipeline_stage`), что означает его участие в общем потоке обработки данных приложения.\n\n### Ответственность класса\nДокументированные обязанности класса включают:\n- Чтение и запись атрибутов состояния.\n- Участие в срезах потока данных (dataflow slices).\n\nВ документации упоминается конкретное количество таких срезов — 10.\n\n### Взаимодействие с другими сущностями\nДля понимания полной картины взаимодействия и архитектуры важно рассмотреть следующие классы и их роли:\n\n#### 1. **ControlChannel**\nЭтот базовый класс определяет основную модель поведения для всех каналов управления состоянием. Он имеет следующую документацию:\n```python\n# Источник: src/app_runtime/control/base.py\n# Класс: ControlChannel\nControlChannel\nrole: model\nResponsibilities:\n- default model role\n```\n\n#### 2. **ControlActionSet**\nЭто также базовый класс действий контроля, упомянутый в той же документации, но не приводится подробной информации о нем здесь.\n\n#### 3. **ControlPlaneService**\nЕще одна сущность, упомянутая в контексте, которая играет важную роль как сервис управления данными:\n```python\n# Источник: src/app_runtime/control/service.py\n# Класс: ControlPlaneService\nControlPlaneService\nrole: pipeline_stage\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)\n```\n\n#### 4. **UvicornThreadRunner**\nТакже упоминается еще один компонент, участвующий в управлении состоянием и потоков данных:\n```python\n# Источник: src/app_runtime/control/http_runner.py\n# Класс: UvicornThreadRunner\nUvicornThreadRunner\nrole: pipeline_stage\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)\n```\n\n### Поток данных и взаимодействие между компонентами\nУчитывая вышеописанные классы и обязанности, можно предположить следующий сценарий работы системы:\n\n1. Пользовательский запрос поступает через HTTP API.\n2. Управление состоянием запроса осуществляется посредством объекта `HttpControlChannel`, который обеспечивает чтение и запись необходимых атрибутов состояния.\n3. Канал взаимодействует с общей системой управления состоянием через промежуточные службы, такие как `ControlPlaneService`.\n4. Эти службы участвуют в более широком потоке данных (dataflow slices) вместе с другим компонентом `UvicornThreadRunner`, обеспечивая параллельную обработку запросов и управление потоком выполнения задач.\n\nТаким образом, основная задача `HttpControlChannel` заключается в обеспечении надежной логики чтения и записи атрибутов состояния для отдельных частей системы, при этом совместно с другими компонентами он участвует в обработке и маршрутизации данных в рамках общего архитектурного подхода.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS", + "C4_SEMANTIC_ROLES" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "HttpControlChannel" + ], + "keyword_hints": [ + "HttpControlChannel" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "HttpControlChannel", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Объясни класс HttpControlChannel", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "Объясни класс HttpControlChannel", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Объясни класс HttpControlChannel", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "Объясни класс HttpControlChannel", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "HttpControlChannel", + "alternatives": [ + "HttpControlChannel" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 8, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 150, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 44, + "C0_SOURCE_CHUNKS": 21, + "C4_SEMANTIC_ROLES": 16, + "C2_DEPENDENCY_GRAPH": 56, + "C3_ENTRYPOINTS": 11 + }, + "merge_rank": 24, + "prompt_build": 0, + "llm_call": 6098 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 329, + "evidence_rows": 19, + "evidence_chars": 3845 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 8, + "unique_paths": 7 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 1 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_v1", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "HttpControlChannel" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 19, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-fullchain-explain-http-control-channel", + "mode": "full_chain", + "run_started_at": "2026-03-12T09:08:54", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Объясни класс HttpControlChannel", + "normalized_query": "Объясни класс HttpControlChannel" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Объясни класс HttpControlChannel" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни класс HttpControlChannel" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "HttpControlChannel" + ], + "keyword_hints": [ + "HttpControlChannel" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Объясни класс HttpControlChannel" + }, + "output": { + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "HttpControlChannel", + "alternatives": [ + "HttpControlChannel" + ], + "confidence": 0.99 + }, + "rag_count": 19, + "rag_rows": [ + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel\nHttpControlChannel(ControlChannel)", + "layer": "C1_SYMBOL_CATALOG", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "qname": "HttpControlChannel", + "kind": "class", + "signature": "HttpControlChannel(ControlChannel)", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/queue/in_memory.py", + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)", + "layer": "C4_SEMANTIC_ROLES", + "title": "InMemoryTaskQueue", + "span_start": 9, + "span_end": 38, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 22, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "2da04cb94544a3bcbf0943a95ad4bdd8710bcafaa32a02fd0e4de2178dcf3533", + "symbol_name": "InMemoryTaskQueue", + "qname": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 9, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "58f0cc001ccda0eee4c6bc32ed83bd05eafd6b6644f1e8b4aa9eed3103db73dc", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._runner\n -> HttpControlChannel.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 15, + "span_end": 22, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "51d73913df709152258ed1b9a8c8f4eb3c575eccfe6b982aef0b28e0789a29da", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0", + "dst_ref": "HttpControlChannel.start", + "resolution": "resolved", + "slice_id": "51d73913df709152258ed1b9a8c8f4eb3c575eccfe6b982aef0b28e0789a29da", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._runner", + "HttpControlChannel.start" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._runner\n -> HttpControlChannel.port", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 15, + "span_end": 29, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "c7167bab7218bb768ad7c11bfb40d1a3096e6071dd7817bba5fd864cf8f6de13", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "3632ce8227f4a31e0768f2fb021a4d1ba28e1202633aa0f2fac902295931280f", + "dst_ref": "HttpControlChannel.port", + "resolution": "resolved", + "slice_id": "c7167bab7218bb768ad7c11bfb40d1a3096e6071dd7817bba5fd864cf8f6de13", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._runner", + "HttpControlChannel.port" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "3632ce8227f4a31e0768f2fb021a4d1ba28e1202633aa0f2fac902295931280f" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._timeout\n -> HttpControlChannel._health_response", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 14, + "span_end": 34, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "f858f5c9e575f6c4cdfe3853571b7ee21d1f628a443541d2037c3dc9d0790bef", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "e84bf04e9cd2127df235b7064d05f47e19f19a89c7c82f4c247231d4e8fa426a", + "dst_ref": "HttpControlChannel._health_response", + "resolution": "resolved", + "slice_id": "f858f5c9e575f6c4cdfe3853571b7ee21d1f628a443541d2037c3dc9d0790bef", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._timeout", + "HttpControlChannel._health_response" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "e84bf04e9cd2127df235b7064d05f47e19f19a89c7c82f4c247231d4e8fa426a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._timeout\n -> HttpControlChannel._action_response", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "c3ef21fcae96c82c00be74b3ab827d4af2085d89cb3fa5521c19a174aad84dbb", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "e64969024ccaeb34d8d91473fad07b3b3d341875846392e7a006406c7ada1954", + "dst_ref": "HttpControlChannel._action_response", + "resolution": "resolved", + "slice_id": "c3ef21fcae96c82c00be74b3ab827d4af2085d89cb3fa5521c19a174aad84dbb", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._timeout", + "HttpControlChannel._action_response" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "e64969024ccaeb34d8d91473fad07b3b3d341875846392e7a006406c7ada1954" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._runner\n -> HttpControlChannel.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 15, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "0f827ef81a990258a8a74381c8564a8361afa6712dba3200592659c939adcb9d", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "f29ab212620093d72be20e26c5a399624c7939a6056a728762ed3f84a250bfa3", + "dst_ref": "HttpControlChannel.stop", + "resolution": "resolved", + "slice_id": "0f827ef81a990258a8a74381c8564a8361afa6712dba3200592659c939adcb9d", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._runner", + "HttpControlChannel.stop" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "f29ab212620093d72be20e26c5a399624c7939a6056a728762ed3f84a250bfa3" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._factory\n -> HttpControlChannel.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 16, + "span_end": 21, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e61ec25ded7dbe380d95ce2abcbc1d7a2d2afde5aa8453866df8706dfb7d6ddb", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0", + "dst_ref": "HttpControlChannel.start", + "resolution": "resolved", + "slice_id": "e61ec25ded7dbe380d95ce2abcbc1d7a2d2afde5aa8453866df8706dfb7d6ddb", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._factory", + "HttpControlChannel.start" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel(ControlChannel):\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._timeout = timeout\n self._runner = UvicornThreadRunner(host, port, timeout)\n self._factory = HttpControlAppFactory()\n self._actions: ControlActionSet | None = None\n\n async def start(self, actions: ControlActionSet) -> None:\n self._actions = actions\n app = self._factory.create(self._health_response, self._action_response)\n await self._runner.start(app)\n\n async def stop(self) -> None:\n await self._runner.stop()\n\n @property\n def port(self) -> int:\n return self._runner.port\n\n async def _health_response(self) -> dict[str, object]:\n if self._actions is None:\n return {\"status\": \"unhealthy\", \"detail\": \"control actions are not configured\"}\n return await asyncio.wait_for(self._actions.health(), timeout=float(self._timeout))\n\n async def _action_response(self, action: str, _client_source: str = \"unknown\") -> JSONResponse:\n if self._actions is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"{action} handler is not configured\"}, status_code=404)\n callbacks = {\n \"start\": self._actions.start,\n \"stop\": self._actions.stop,\n \"status\": self._actions.status,\n }\n callback = callbacks.get(action)\n if callback is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"unsupported action: {action}\"}, status_code=404)\n action_timeout = max(float(self._timeout), 10.0) if action in {\"start\", \"stop\"} else float(self._timeout)\n try:\n detail = await asyncio.wait_for(callback(), timeout=action_timeout)\n except asyncio.TimeoutError:\n return JSONResponse(\n content={\"status\": \"accepted\", \"detail\": f\"{action} operation is still in progress\"},\n status_code=202,\n )\n except Exception as exc:\n return JSONResponse(content={\"status\": \"error\", \"detail\": str(exc)}, status_code=500)\n return JSONResponse(content={\"status\": \"ok\", \"detail\": detail or f\"{action} action accepted\"}, status_code=200)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_channel.py:HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "HttpControlChannel", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Объясни класс HttpControlChannel", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "Объясни класс HttpControlChannel", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Объясни класс HttpControlChannel", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "Объясни класс HttpControlChannel", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "HttpControlChannel", + "alternatives": [ + "HttpControlChannel" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 8, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 150, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 44, + "C0_SOURCE_CHUNKS": 21, + "C4_SEMANTIC_ROLES": 16, + "C2_DEPENDENCY_GRAPH": 56, + "C3_ENTRYPOINTS": 11 + }, + "merge_rank": 24 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Объясни класс HttpControlChannel", + "rag_count": 19 + }, + "output": { + "llm_answer": "## Анализ класса `HttpControlChannel`\n\n### Файл и позиция класса\n```python\n# Источник: src/app_runtime/control/http_channel.py\n# Класс: HttpControlChannel\n```\n\n### Наследование и роль класса\nКласс `HttpControlChannel` наследует от базового класса `ControlChannel`. Его аннотация указывает на то, что он является частью стадии конвейера (`pipeline_stage`), что означает его участие в общем потоке обработки данных приложения.\n\n### Ответственность класса\nДокументированные обязанности класса включают:\n- Чтение и запись атрибутов состояния.\n- Участие в срезах потока данных (dataflow slices).\n\nВ документации упоминается конкретное количество таких срезов — 10.\n\n### Взаимодействие с другими сущностями\nДля понимания полной картины взаимодействия и архитектуры важно рассмотреть следующие классы и их роли:\n\n#### 1. **ControlChannel**\nЭтот базовый класс определяет основную модель поведения для всех каналов управления состоянием. Он имеет следующую документацию:\n```python\n# Источник: src/app_runtime/control/base.py\n# Класс: ControlChannel\nControlChannel\nrole: model\nResponsibilities:\n- default model role\n```\n\n#### 2. **ControlActionSet**\nЭто также базовый класс действий контроля, упомянутый в той же документации, но не приводится подробной информации о нем здесь.\n\n#### 3. **ControlPlaneService**\nЕще одна сущность, упомянутая в контексте, которая играет важную роль как сервис управления данными:\n```python\n# Источник: src/app_runtime/control/service.py\n# Класс: ControlPlaneService\nControlPlaneService\nrole: pipeline_stage\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)\n```\n\n#### 4. **UvicornThreadRunner**\nТакже упоминается еще один компонент, участвующий в управлении состоянием и потоков данных:\n```python\n# Источник: src/app_runtime/control/http_runner.py\n# Класс: UvicornThreadRunner\nUvicornThreadRunner\nrole: pipeline_stage\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)\n```\n\n### Поток данных и взаимодействие между компонентами\nУчитывая вышеописанные классы и обязанности, можно предположить следующий сценарий работы системы:\n\n1. Пользовательский запрос поступает через HTTP API.\n2. Управление состоянием запроса осуществляется посредством объекта `HttpControlChannel`, который обеспечивает чтение и запись необходимых атрибутов состояния.\n3. Канал взаимодействует с общей системой управления состоянием через промежуточные службы, такие как `ControlPlaneService`.\n4. Эти службы участвуют в более широком потоке данных (dataflow slices) вместе с другим компонентом `UvicornThreadRunner`, обеспечивая параллельную обработку запросов и управление потоком выполнения задач.\n\nТаким образом, основная задача `HttpControlChannel` заключается в обеспечении надежной логики чтения и записи атрибутов состояния для отдельных частей системы, при этом совместно с другими компонентами он участвует в обработке и маршрутизации данных в рамках общего архитектурного подхода." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 329, + "evidence_rows": 19, + "evidence_chars": 3845 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 8, + "unique_paths": 7 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 1 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_v1", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 6098 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_090854/full_chain_plba_code_retrieval_plba-fullchain-explain-http-control-channel.md b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_090854/full_chain_plba_code_retrieval_plba-fullchain-explain-http-control-channel.md new file mode 100644 index 0000000..ed638fd --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_090854/full_chain_plba_code_retrieval_plba-fullchain-explain-http-control-channel.md @@ -0,0 +1,34 @@ +# plba-fullchain-explain-http-control-channel + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_retrieval.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Объясни класс HttpControlChannel + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 19, + "llm_answer": "## Анализ класса `HttpControlChannel`\n\n### Файл и позиция класса\n```python\n# Источник: src/app_runtime/control/http_channel.py\n# Класс: HttpControlChannel\n```\n\n### Наследование и роль класса\nКласс `HttpControlChannel` наследует от базового класса `ControlChannel`. Его аннотация указывает на то, что он является частью стадии конвейера (`pipeline_stage`), что означает его участие в общем потоке обработки данных приложения.\n\n### Ответственность класса\nДокументированные обязанности класса включают:\n- Чтение и запись атрибутов состояния.\n- Участие в срезах потока данных (dataflow slices).\n\nВ документации упоминается конкретное количество таких срезов — 10.\n\n### Взаимодействие с другими сущностями\nДля понимания полной картины взаимодействия и архитектуры важно рассмотреть следующие классы и их роли:\n\n#### 1. **ControlChannel**\nЭтот базовый класс определяет основную модель поведения для всех каналов управления состоянием. Он имеет следующую документацию:\n```python\n# Источник: src/app_runtime/control/base.py\n# Класс: ControlChannel\nControlChannel\nrole: model\nResponsibilities:\n- default model role\n```\n\n#### 2. **ControlActionSet**\nЭто также базовый класс действий контроля, упомянутый в той же документации, но не приводится подробной информации о нем здесь.\n\n#### 3. **ControlPlaneService**\nЕще одна сущность, упомянутая в контексте, которая играет важную роль как сервис управления данными:\n```python\n# Источник: src/app_runtime/control/service.py\n# Класс: ControlPlaneService\nControlPlaneService\nrole: pipeline_stage\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)\n```\n\n#### 4. **UvicornThreadRunner**\nТакже упоминается еще один компонент, участвующий в управлении состоянием и потоков данных:\n```python\n# Источник: src/app_runtime/control/http_runner.py\n# Класс: UvicornThreadRunner\nUvicornThreadRunner\nrole: pipeline_stage\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)\n```\n\n### Поток данных и взаимодействие между компонентами\nУчитывая вышеописанные классы и обязанности, можно предположить следующий сценарий работы системы:\n\n1. Пользовательский запрос поступает через HTTP API.\n2. Управление состоянием запроса осуществляется посредством объекта `HttpControlChannel`, который обеспечивает чтение и запись необходимых атрибутов состояния.\n3. Канал взаимодействует с общей системой управления состоянием через промежуточные службы, такие как `ControlPlaneService`.\n4. Эти службы участвуют в более широком потоке данных (dataflow slices) вместе с другим компонентом `UvicornThreadRunner`, обеспечивая параллельную обработку запросов и управление потоком выполнения задач.\n\nТаким образом, основная задача `HttpControlChannel` заключается в обеспечении надежной логики чтения и записи атрибутов состояния для отдельных частей системы, при этом совместно с другими компонентами он участвует в обработке и маршрутизации данных в рамках общего архитектурного подхода.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "HttpControlChannel" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_090854/full_chain_plba_code_retrieval_plba-fullchain-explain-runtime-manager.json b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_090854/full_chain_plba_code_retrieval_plba-fullchain-explain-runtime-manager.json new file mode 100644 index 0000000..bcdb6f7 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_090854/full_chain_plba_code_retrieval_plba-fullchain-explain-runtime-manager.json @@ -0,0 +1,2564 @@ +{ + "case_id": "plba-fullchain-explain-runtime-manager", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_retrieval.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 19, + "llm_answer": "## Анализ класса `RuntimeManager`\n\n### 1. Обзор файла и класса\n\nКласс `RuntimeManager` находится в файле `src/app_runtime/core/runtime.py`.\n\n```python\n# src/app_runtime/core/runtime.py\nclass RuntimeManager\n```\n\n### 2. Описание роли и обязанностей\n\nДокументация указывает следующие обязанности для данного класса:\n\n- **name suffix suggests manager**: Название класса предполагает управление другими сущностями или ресурсами.\n- **orchestrates role-like calls (4)**: Класс управляет вызовами ролей и выполняет координацию между ними.\n- **reads and writes state attributes**: Управление состоянием приложения и его атрибутов.\n- **participates in dataflow slices (50)**: Класс участвует в передаче данных через различные этапы обработки данных.\n\n### 3. Связанные классы и их роль\n\n- **ControlChannel** (`src/app_runtime/control/base.py`) — основной канал управления моделью.\n- **ControlActionSet** (`src/app_runtime/control/base.py`) — набор действий, связанных с управлением моделью.\n- **ControlPlaneService** (`src/app_runtime/control/service.py`) — сервис, связанный с управлением плоскостью контроля.\n- **UvicornThreadRunner** (`src/app_runtime/control/http_runner.py`) — запускает сервер на основе uvicorn и реализует многопоточную обработку запросов.\n\nЭти классы совместно участвуют в управлении жизненным циклом модели и потоков выполнения.\n\n### 4. Поток данных и архитектура\n\nАрхитектура включает следующее взаимодействие классов:\n\n- **RuntimeManager** координирует вызовы ролей и отвечает за состояние приложения.\n- **ControlChannel**, **ControlActionSet** обеспечивают логику управления моделями.\n- **ControlPlaneService** ответственен за хранение состояния приложения и передачу данных через различные потоки данных.\n- **UvicornThreadRunner** обеспечивает выполнение HTTP-запросов и синхронизацию потоков.\n\nТаким образом, общая схема выглядит следующим образом:\n\n```\n+----------+\n| RuntimeManager |\n+--+-----------+\n |\n v\n+----------+ +---------+ +---------+\n| ControlChannel | -> | ControlActionSet | -> | ControlPlaneService |\n ^ ^ ^\n | | |\n +---------------+----------+\n |\n v\n+--------------+\n| UvicornThreadRunner |\n+---------------------+\n```\n\n### 5. Поведение и примеры использования\n\nПредположим, что `RuntimeManager` используется следующим образом:\n\n```python\nfrom app_runtime.core.runtime import RuntimeManager\n\nruntime_manager = RuntimeManager()\n\n# Инициализация контроллеров и моделей\nruntime_manager.initialize_controllers_and_models()\n\n# Запуск основного потока управления\nruntime_manager.start()\n\n# Координация ролей и состояний\nruntime_manager.coordinate_roles_and_states()\n\n# Завершение работы системы\nruntime_manager.shutdown()\n```\n\n### Заключение\n\nКласс `RuntimeManager` является ключевым компонентом архитектуры, который управляет основными этапами жизненного цикла приложения, включая инициализацию компонентов, координацию вызовов ролей и контроль передачи данных между различными компонентами.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-fullchain-explain-runtime-manager", + "text": "Объясни как работает класс RuntimeManager", + "mode": "full_chain", + "run_started_at": "2026-03-12T09:08:54", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни как работает класс RuntimeManager", + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ], + "confidence": 0.99 + }, + "rag_count": 19, + "rag_rows": [ + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager\nRuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "qname": "RuntimeManager", + "kind": "class", + "signature": "RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests manager\n- orchestrates role-like calls (4)\n- reads and writes state attributes\n- participates in dataflow slices (50)", + "layer": "C4_SEMANTIC_ROLES", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 43, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "symbol_name": "RuntimeManager", + "qname": "RuntimeManager", + "role": "pipeline_stage", + "confidence": 0.67, + "dataflow_participation": 50, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 52, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "## Анализ класса `RuntimeManager`\n\n### 1. Обзор файла и класса\n\nКласс `RuntimeManager` находится в файле `src/app_runtime/core/runtime.py`.\n\n```python\n# src/app_runtime/core/runtime.py\nclass RuntimeManager\n```\n\n### 2. Описание роли и обязанностей\n\nДокументация указывает следующие обязанности для данного класса:\n\n- **name suffix suggests manager**: Название класса предполагает управление другими сущностями или ресурсами.\n- **orchestrates role-like calls (4)**: Класс управляет вызовами ролей и выполняет координацию между ними.\n- **reads and writes state attributes**: Управление состоянием приложения и его атрибутов.\n- **participates in dataflow slices (50)**: Класс участвует в передаче данных через различные этапы обработки данных.\n\n### 3. Связанные классы и их роль\n\n- **ControlChannel** (`src/app_runtime/control/base.py`) — основной канал управления моделью.\n- **ControlActionSet** (`src/app_runtime/control/base.py`) — набор действий, связанных с управлением моделью.\n- **ControlPlaneService** (`src/app_runtime/control/service.py`) — сервис, связанный с управлением плоскостью контроля.\n- **UvicornThreadRunner** (`src/app_runtime/control/http_runner.py`) — запускает сервер на основе uvicorn и реализует многопоточную обработку запросов.\n\nЭти классы совместно участвуют в управлении жизненным циклом модели и потоков выполнения.\n\n### 4. Поток данных и архитектура\n\nАрхитектура включает следующее взаимодействие классов:\n\n- **RuntimeManager** координирует вызовы ролей и отвечает за состояние приложения.\n- **ControlChannel**, **ControlActionSet** обеспечивают логику управления моделями.\n- **ControlPlaneService** ответственен за хранение состояния приложения и передачу данных через различные потоки данных.\n- **UvicornThreadRunner** обеспечивает выполнение HTTP-запросов и синхронизацию потоков.\n\nТаким образом, общая схема выглядит следующим образом:\n\n```\n+----------+\n| RuntimeManager |\n+--+-----------+\n |\n v\n+----------+ +---------+ +---------+\n| ControlChannel | -> | ControlActionSet | -> | ControlPlaneService |\n ^ ^ ^\n | | |\n +---------------+----------+\n |\n v\n+--------------+\n| UvicornThreadRunner |\n+---------------------+\n```\n\n### 5. Поведение и примеры использования\n\nПредположим, что `RuntimeManager` используется следующим образом:\n\n```python\nfrom app_runtime.core.runtime import RuntimeManager\n\nruntime_manager = RuntimeManager()\n\n# Инициализация контроллеров и моделей\nruntime_manager.initialize_controllers_and_models()\n\n# Запуск основного потока управления\nruntime_manager.start()\n\n# Координация ролей и состояний\nruntime_manager.coordinate_roles_and_states()\n\n# Завершение работы системы\nruntime_manager.shutdown()\n```\n\n### Заключение\n\nКласс `RuntimeManager` является ключевым компонентом архитектуры, который управляет основными этапами жизненного цикла приложения, включая инициализацию компонентов, координацию вызовов ролей и контроль передачи данных между различными компонентами.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS", + "C4_SEMANTIC_ROLES" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Объясни как работает класс RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "Объясни как работает класс RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Объясни как работает класс RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "Объясни как работает класс RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 8, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 2, + "symbol_resolution": 0, + "retrieval_total": 406, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 51, + "C0_SOURCE_CHUNKS": 16, + "C4_SEMANTIC_ROLES": 15, + "C2_DEPENDENCY_GRAPH": 73, + "C3_ENTRYPOINTS": 9 + }, + "merge_rank": 24, + "prompt_build": 0, + "llm_call": 6691 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 335, + "evidence_rows": 19, + "evidence_chars": 7949 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 8, + "unique_paths": 7 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 2 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_v1", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "RuntimeManager" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 19, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-fullchain-explain-runtime-manager", + "mode": "full_chain", + "run_started_at": "2026-03-12T09:08:54", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Объясни как работает класс RuntimeManager", + "normalized_query": "Объясни как работает класс RuntimeManager" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Объясни как работает класс RuntimeManager" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни как работает класс RuntimeManager" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 2 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Объясни как работает класс RuntimeManager" + }, + "output": { + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ], + "confidence": 0.99 + }, + "rag_count": 19, + "rag_rows": [ + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager\nRuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "qname": "RuntimeManager", + "kind": "class", + "signature": "RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests manager\n- orchestrates role-like calls (4)\n- reads and writes state attributes\n- participates in dataflow slices (50)", + "layer": "C4_SEMANTIC_ROLES", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 43, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "symbol_name": "RuntimeManager", + "qname": "RuntimeManager", + "role": "pipeline_stage", + "confidence": 0.67, + "dataflow_participation": 50, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 52, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Объясни как работает класс RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "Объясни как работает класс RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Объясни как работает класс RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "Объясни как работает класс RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 8, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 406, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 51, + "C0_SOURCE_CHUNKS": 16, + "C4_SEMANTIC_ROLES": 15, + "C2_DEPENDENCY_GRAPH": 73, + "C3_ENTRYPOINTS": 9 + }, + "merge_rank": 24 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Объясни как работает класс RuntimeManager", + "rag_count": 19 + }, + "output": { + "llm_answer": "## Анализ класса `RuntimeManager`\n\n### 1. Обзор файла и класса\n\nКласс `RuntimeManager` находится в файле `src/app_runtime/core/runtime.py`.\n\n```python\n# src/app_runtime/core/runtime.py\nclass RuntimeManager\n```\n\n### 2. Описание роли и обязанностей\n\nДокументация указывает следующие обязанности для данного класса:\n\n- **name suffix suggests manager**: Название класса предполагает управление другими сущностями или ресурсами.\n- **orchestrates role-like calls (4)**: Класс управляет вызовами ролей и выполняет координацию между ними.\n- **reads and writes state attributes**: Управление состоянием приложения и его атрибутов.\n- **participates in dataflow slices (50)**: Класс участвует в передаче данных через различные этапы обработки данных.\n\n### 3. Связанные классы и их роль\n\n- **ControlChannel** (`src/app_runtime/control/base.py`) — основной канал управления моделью.\n- **ControlActionSet** (`src/app_runtime/control/base.py`) — набор действий, связанных с управлением моделью.\n- **ControlPlaneService** (`src/app_runtime/control/service.py`) — сервис, связанный с управлением плоскостью контроля.\n- **UvicornThreadRunner** (`src/app_runtime/control/http_runner.py`) — запускает сервер на основе uvicorn и реализует многопоточную обработку запросов.\n\nЭти классы совместно участвуют в управлении жизненным циклом модели и потоков выполнения.\n\n### 4. Поток данных и архитектура\n\nАрхитектура включает следующее взаимодействие классов:\n\n- **RuntimeManager** координирует вызовы ролей и отвечает за состояние приложения.\n- **ControlChannel**, **ControlActionSet** обеспечивают логику управления моделями.\n- **ControlPlaneService** ответственен за хранение состояния приложения и передачу данных через различные потоки данных.\n- **UvicornThreadRunner** обеспечивает выполнение HTTP-запросов и синхронизацию потоков.\n\nТаким образом, общая схема выглядит следующим образом:\n\n```\n+----------+\n| RuntimeManager |\n+--+-----------+\n |\n v\n+----------+ +---------+ +---------+\n| ControlChannel | -> | ControlActionSet | -> | ControlPlaneService |\n ^ ^ ^\n | | |\n +---------------+----------+\n |\n v\n+--------------+\n| UvicornThreadRunner |\n+---------------------+\n```\n\n### 5. Поведение и примеры использования\n\nПредположим, что `RuntimeManager` используется следующим образом:\n\n```python\nfrom app_runtime.core.runtime import RuntimeManager\n\nruntime_manager = RuntimeManager()\n\n# Инициализация контроллеров и моделей\nruntime_manager.initialize_controllers_and_models()\n\n# Запуск основного потока управления\nruntime_manager.start()\n\n# Координация ролей и состояний\nruntime_manager.coordinate_roles_and_states()\n\n# Завершение работы системы\nruntime_manager.shutdown()\n```\n\n### Заключение\n\nКласс `RuntimeManager` является ключевым компонентом архитектуры, который управляет основными этапами жизненного цикла приложения, включая инициализацию компонентов, координацию вызовов ролей и контроль передачи данных между различными компонентами." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 335, + "evidence_rows": 19, + "evidence_chars": 7949 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 8, + "unique_paths": 7 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 2 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_v1", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 6691 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_090854/full_chain_plba_code_retrieval_plba-fullchain-explain-runtime-manager.md b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_090854/full_chain_plba_code_retrieval_plba-fullchain-explain-runtime-manager.md new file mode 100644 index 0000000..2656989 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_090854/full_chain_plba_code_retrieval_plba-fullchain-explain-runtime-manager.md @@ -0,0 +1,34 @@ +# plba-fullchain-explain-runtime-manager + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_retrieval.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Объясни как работает класс RuntimeManager + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 19, + "llm_answer": "## Анализ класса `RuntimeManager`\n\n### 1. Обзор файла и класса\n\nКласс `RuntimeManager` находится в файле `src/app_runtime/core/runtime.py`.\n\n```python\n# src/app_runtime/core/runtime.py\nclass RuntimeManager\n```\n\n### 2. Описание роли и обязанностей\n\nДокументация указывает следующие обязанности для данного класса:\n\n- **name suffix suggests manager**: Название класса предполагает управление другими сущностями или ресурсами.\n- **orchestrates role-like calls (4)**: Класс управляет вызовами ролей и выполняет координацию между ними.\n- **reads and writes state attributes**: Управление состоянием приложения и его атрибутов.\n- **participates in dataflow slices (50)**: Класс участвует в передаче данных через различные этапы обработки данных.\n\n### 3. Связанные классы и их роль\n\n- **ControlChannel** (`src/app_runtime/control/base.py`) — основной канал управления моделью.\n- **ControlActionSet** (`src/app_runtime/control/base.py`) — набор действий, связанных с управлением моделью.\n- **ControlPlaneService** (`src/app_runtime/control/service.py`) — сервис, связанный с управлением плоскостью контроля.\n- **UvicornThreadRunner** (`src/app_runtime/control/http_runner.py`) — запускает сервер на основе uvicorn и реализует многопоточную обработку запросов.\n\nЭти классы совместно участвуют в управлении жизненным циклом модели и потоков выполнения.\n\n### 4. Поток данных и архитектура\n\nАрхитектура включает следующее взаимодействие классов:\n\n- **RuntimeManager** координирует вызовы ролей и отвечает за состояние приложения.\n- **ControlChannel**, **ControlActionSet** обеспечивают логику управления моделями.\n- **ControlPlaneService** ответственен за хранение состояния приложения и передачу данных через различные потоки данных.\n- **UvicornThreadRunner** обеспечивает выполнение HTTP-запросов и синхронизацию потоков.\n\nТаким образом, общая схема выглядит следующим образом:\n\n```\n+----------+\n| RuntimeManager |\n+--+-----------+\n |\n v\n+----------+ +---------+ +---------+\n| ControlChannel | -> | ControlActionSet | -> | ControlPlaneService |\n ^ ^ ^\n | | |\n +---------------+----------+\n |\n v\n+--------------+\n| UvicornThreadRunner |\n+---------------------+\n```\n\n### 5. Поведение и примеры использования\n\nПредположим, что `RuntimeManager` используется следующим образом:\n\n```python\nfrom app_runtime.core.runtime import RuntimeManager\n\nruntime_manager = RuntimeManager()\n\n# Инициализация контроллеров и моделей\nruntime_manager.initialize_controllers_and_models()\n\n# Запуск основного потока управления\nruntime_manager.start()\n\n# Координация ролей и состояний\nruntime_manager.coordinate_roles_and_states()\n\n# Завершение работы системы\nruntime_manager.shutdown()\n```\n\n### Заключение\n\nКласс `RuntimeManager` является ключевым компонентом архитектуры, который управляет основными этапами жизненного цикла приложения, включая инициализацию компонентов, координацию вызовов ролей и контроль передачи данных между различными компонентами.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_090854/summary.md b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_090854/summary.md new file mode 100644 index 0000000..9888b16 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_090854/summary.md @@ -0,0 +1,9 @@ +# pipeline_setup_v2 summary + +Passed: 3/3 + +| File | Case | Runner | Mode | Intent | Sub-intent | Pass | +|------|------|--------|------|--------|------------|------| +| full_chain_plba_code_retrieval.yaml | plba-fullchain-explain-runtime-manager | runtime | full_chain | CODE_QA | EXPLAIN | ✓ | +| full_chain_plba_code_retrieval.yaml | plba-fullchain-explain-http-control-channel | runtime | full_chain | CODE_QA | EXPLAIN | ✓ | +| full_chain_plba_code_retrieval.yaml | plba-fullchain-explain-control-plane-service | runtime | full_chain | CODE_QA | EXPLAIN | ✓ | \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091150/full_chain_plba_code_retrieval_plba-fullchain-explain-control-plane-service.json b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091150/full_chain_plba_code_retrieval_plba-fullchain-explain-control-plane-service.json new file mode 100644 index 0000000..476b46c --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091150/full_chain_plba_code_retrieval_plba-fullchain-explain-control-plane-service.json @@ -0,0 +1,2532 @@ +{ + "case_id": "plba-fullchain-explain-control-plane-service", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_retrieval.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 19, + "llm_answer": "## Анализ класса `ControlPlaneService`\n\n### Описание файла и роли сущностей\n\nИсходный код находится в файле `src/app_runtime/control/service.py`, где определен класс `ControlPlaneService`.\nЭтот файл является частью модуля `app_runtime.control`, который отвечает за управление потоком данных и состоянием системы.\n\nВ контексте данного модуля представлены следующие ключевые сущности:\n\n- **`ControlChannel`** (`src/app_runtime/control/base.py`) – базовый интерфейс для взаимодействия с каналами управления.\n- **`ControlActionSet`** (`src/app_runtime/control/base.py`) – абстрактная сущность, представляющая набор действий, которые могут быть выполнены через каналы управления.\n- **`UvicornThreadRunner`** (`src/app_runtime/control/http_runner.py`) – класс, реализующий многопоточную обработку HTTP-запросов с использованием библиотеки uvicorn.\n- **`HttpControlChannel`** (`src/app_runtime/control/http_channel.py`) – канал управления, предназначенный для обработки HTTP запросов.\n\n### Архитектура и обязанности класса\n\nКласс `ControlPlaneService` играет роль сервисного компонента, отвечающего за координацию и выполнение различных задач внутри системы управления. Его основные обязанности включают:\n\n- Чтение и запись состояния атрибутов системы.\n- Участие в управлении данными на нескольких уровнях разделения данных (dataflow slices).\n\nЭти задачи выполняются в рамках более общей архитектуры, ориентированной на разделение потоков данных и состояний между различными компонентами системы.\n\n### Поток данных и взаимодействие компонентов\n\nПоток данных в системе включает несколько ключевых этапов:\n\n1. Пользователь отправляет запрос через HTTP API.\n2. Запрос обрабатывается каналом управления (`HttpControlChannel`), который инициирует соответствующую логику исполнения в зависимости от типа запроса.\n3. Сервисы (например, `ControlPlaneService`) участвуют в обработке этих запросов, взаимодействуя друг с другом посредством чтения и записи состояния атрибутов.\n4. Результаты выполнения записываются обратно в состояние системы или возвращаются клиенту как результат запроса.\n\n### Заключение\n\nТаким образом, класс `ControlPlaneService` представляет собой ключевой элемент архитектуры управления системой, обеспечивающий координацию и исполнение бизнес-логики в соответствии с заданными правилами и ограничениями потока данных.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "ControlPlaneService" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-fullchain-explain-control-plane-service", + "text": "Объясни класс ControlPlaneService", + "mode": "full_chain", + "run_started_at": "2026-03-12T09:11:50", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни класс ControlPlaneService", + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "ControlPlaneService", + "alternatives": [ + "ControlPlaneService" + ], + "confidence": 0.99 + }, + "rag_count": 19, + "rag_rows": [ + { + "path": "src/app_runtime/control/service.py", + "content": "class ControlPlaneService\nControlPlaneService", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "qname": "ControlPlaneService", + "kind": "class", + "signature": "ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/queue/in_memory.py", + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)", + "layer": "C4_SEMANTIC_ROLES", + "title": "InMemoryTaskQueue", + "span_start": 9, + "span_end": 38, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 22, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "2da04cb94544a3bcbf0943a95ad4bdd8710bcafaa32a02fd0e4de2178dcf3533", + "symbol_name": "InMemoryTaskQueue", + "qname": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 9, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "58f0cc001ccda0eee4c6bc32ed83bd05eafd6b6644f1e8b4aa9eed3103db73dc", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.register_channel reads_attr self._channels.append", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.register_channel:reads_attr", + "span_start": 17, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "1ee5925deffdc38ba15b88bf7c89e5fcd1a78f493fe30f2deb827d714a1b18e8", + "edge_type": "reads_attr", + "src_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "src_qname": "ControlPlaneService.register_channel", + "dst_symbol_id": null, + "dst_ref": "self._channels.append", + "resolution": "partial", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "class ControlPlaneService:\n def __init__(self) -> None:\n self._channels: list[ControlChannel] = []\n\n def register_channel(self, channel: ControlChannel) -> None:\n self._channels.append(channel)\n\n def start(self, runtime: RuntimeManager) -> None:\n if not self._channels:\n return\n asyncio.run(self._start_async(runtime))\n\n def stop(self) -> None:\n if not self._channels:\n return\n asyncio.run(self._stop_async())\n\n def snapshot(self, runtime: RuntimeManager) -> dict[str, object]:\n health = runtime.current_health()\n return {\n \"runtime\": {\"state\": runtime._state.value},\n \"modules\": list(runtime.registry.modules),\n \"services\": runtime.services.snapshot(),\n \"workers\": runtime.workers.snapshot(),\n \"health\": runtime.health.snapshot(runtime.workers.healths()) | {\"status\": health[\"status\"]},\n \"config\": runtime.configuration.get(),\n }\n\n async def _start_async(self, runtime: RuntimeManager) -> None:\n actions = ControlActionSet(\n health=runtime.health_status,\n start=runtime.start_runtime,\n stop=runtime.stop_runtime,\n status=runtime.runtime_status,\n )\n for channel in self._channels:\n await channel.start(actions)\n\n async def _stop_async(self) -> None:\n for channel in reversed(self._channels):\n await channel.stop()", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/service.py:ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "## Анализ класса `ControlPlaneService`\n\n### Описание файла и роли сущностей\n\nИсходный код находится в файле `src/app_runtime/control/service.py`, где определен класс `ControlPlaneService`.\nЭтот файл является частью модуля `app_runtime.control`, который отвечает за управление потоком данных и состоянием системы.\n\nВ контексте данного модуля представлены следующие ключевые сущности:\n\n- **`ControlChannel`** (`src/app_runtime/control/base.py`) – базовый интерфейс для взаимодействия с каналами управления.\n- **`ControlActionSet`** (`src/app_runtime/control/base.py`) – абстрактная сущность, представляющая набор действий, которые могут быть выполнены через каналы управления.\n- **`UvicornThreadRunner`** (`src/app_runtime/control/http_runner.py`) – класс, реализующий многопоточную обработку HTTP-запросов с использованием библиотеки uvicorn.\n- **`HttpControlChannel`** (`src/app_runtime/control/http_channel.py`) – канал управления, предназначенный для обработки HTTP запросов.\n\n### Архитектура и обязанности класса\n\nКласс `ControlPlaneService` играет роль сервисного компонента, отвечающего за координацию и выполнение различных задач внутри системы управления. Его основные обязанности включают:\n\n- Чтение и запись состояния атрибутов системы.\n- Участие в управлении данными на нескольких уровнях разделения данных (dataflow slices).\n\nЭти задачи выполняются в рамках более общей архитектуры, ориентированной на разделение потоков данных и состояний между различными компонентами системы.\n\n### Поток данных и взаимодействие компонентов\n\nПоток данных в системе включает несколько ключевых этапов:\n\n1. Пользователь отправляет запрос через HTTP API.\n2. Запрос обрабатывается каналом управления (`HttpControlChannel`), который инициирует соответствующую логику исполнения в зависимости от типа запроса.\n3. Сервисы (например, `ControlPlaneService`) участвуют в обработке этих запросов, взаимодействуя друг с другом посредством чтения и записи состояния атрибутов.\n4. Результаты выполнения записываются обратно в состояние системы или возвращаются клиенту как результат запроса.\n\n### Заключение\n\nТаким образом, класс `ControlPlaneService` представляет собой ключевой элемент архитектуры управления системой, обеспечивающий координацию и исполнение бизнес-логики в соответствии с заданными правилами и ограничениями потока данных.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS", + "C4_SEMANTIC_ROLES" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "ControlPlaneService" + ], + "keyword_hints": [ + "ControlPlaneService" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "ControlPlaneService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Объясни класс ControlPlaneService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "Объясни класс ControlPlaneService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Объясни класс ControlPlaneService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "Объясни класс ControlPlaneService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "ControlPlaneService", + "alternatives": [ + "ControlPlaneService" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 8, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 1, + "symbol_resolution": 0, + "retrieval_total": 155, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 45, + "C0_SOURCE_CHUNKS": 20, + "C4_SEMANTIC_ROLES": 15, + "C2_DEPENDENCY_GRAPH": 62, + "C3_ENTRYPOINTS": 10 + }, + "merge_rank": 23, + "prompt_build": 0, + "llm_call": 5041 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 325, + "evidence_rows": 19, + "evidence_chars": 3087 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 8, + "unique_paths": 7 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 1 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_v1", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "ControlPlaneService" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 19, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-fullchain-explain-control-plane-service", + "mode": "full_chain", + "run_started_at": "2026-03-12T09:11:50", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Объясни класс ControlPlaneService", + "normalized_query": "Объясни класс ControlPlaneService" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Объясни класс ControlPlaneService" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни класс ControlPlaneService" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "ControlPlaneService" + ], + "keyword_hints": [ + "ControlPlaneService" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 1 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Объясни класс ControlPlaneService" + }, + "output": { + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "ControlPlaneService", + "alternatives": [ + "ControlPlaneService" + ], + "confidence": 0.99 + }, + "rag_count": 19, + "rag_rows": [ + { + "path": "src/app_runtime/control/service.py", + "content": "class ControlPlaneService\nControlPlaneService", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "qname": "ControlPlaneService", + "kind": "class", + "signature": "ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/queue/in_memory.py", + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)", + "layer": "C4_SEMANTIC_ROLES", + "title": "InMemoryTaskQueue", + "span_start": 9, + "span_end": 38, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 22, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "2da04cb94544a3bcbf0943a95ad4bdd8710bcafaa32a02fd0e4de2178dcf3533", + "symbol_name": "InMemoryTaskQueue", + "qname": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 9, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "58f0cc001ccda0eee4c6bc32ed83bd05eafd6b6644f1e8b4aa9eed3103db73dc", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.register_channel reads_attr self._channels.append", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.register_channel:reads_attr", + "span_start": 17, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "1ee5925deffdc38ba15b88bf7c89e5fcd1a78f493fe30f2deb827d714a1b18e8", + "edge_type": "reads_attr", + "src_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "src_qname": "ControlPlaneService.register_channel", + "dst_symbol_id": null, + "dst_ref": "self._channels.append", + "resolution": "partial", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "class ControlPlaneService:\n def __init__(self) -> None:\n self._channels: list[ControlChannel] = []\n\n def register_channel(self, channel: ControlChannel) -> None:\n self._channels.append(channel)\n\n def start(self, runtime: RuntimeManager) -> None:\n if not self._channels:\n return\n asyncio.run(self._start_async(runtime))\n\n def stop(self) -> None:\n if not self._channels:\n return\n asyncio.run(self._stop_async())\n\n def snapshot(self, runtime: RuntimeManager) -> dict[str, object]:\n health = runtime.current_health()\n return {\n \"runtime\": {\"state\": runtime._state.value},\n \"modules\": list(runtime.registry.modules),\n \"services\": runtime.services.snapshot(),\n \"workers\": runtime.workers.snapshot(),\n \"health\": runtime.health.snapshot(runtime.workers.healths()) | {\"status\": health[\"status\"]},\n \"config\": runtime.configuration.get(),\n }\n\n async def _start_async(self, runtime: RuntimeManager) -> None:\n actions = ControlActionSet(\n health=runtime.health_status,\n start=runtime.start_runtime,\n stop=runtime.stop_runtime,\n status=runtime.runtime_status,\n )\n for channel in self._channels:\n await channel.start(actions)\n\n async def _stop_async(self) -> None:\n for channel in reversed(self._channels):\n await channel.stop()", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/service.py:ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "ControlPlaneService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Объясни класс ControlPlaneService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "Объясни класс ControlPlaneService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Объясни класс ControlPlaneService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "Объясни класс ControlPlaneService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "ControlPlaneService", + "alternatives": [ + "ControlPlaneService" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 8, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 155, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 45, + "C0_SOURCE_CHUNKS": 20, + "C4_SEMANTIC_ROLES": 15, + "C2_DEPENDENCY_GRAPH": 62, + "C3_ENTRYPOINTS": 10 + }, + "merge_rank": 23 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Объясни класс ControlPlaneService", + "rag_count": 19 + }, + "output": { + "llm_answer": "## Анализ класса `ControlPlaneService`\n\n### Описание файла и роли сущностей\n\nИсходный код находится в файле `src/app_runtime/control/service.py`, где определен класс `ControlPlaneService`.\nЭтот файл является частью модуля `app_runtime.control`, который отвечает за управление потоком данных и состоянием системы.\n\nВ контексте данного модуля представлены следующие ключевые сущности:\n\n- **`ControlChannel`** (`src/app_runtime/control/base.py`) – базовый интерфейс для взаимодействия с каналами управления.\n- **`ControlActionSet`** (`src/app_runtime/control/base.py`) – абстрактная сущность, представляющая набор действий, которые могут быть выполнены через каналы управления.\n- **`UvicornThreadRunner`** (`src/app_runtime/control/http_runner.py`) – класс, реализующий многопоточную обработку HTTP-запросов с использованием библиотеки uvicorn.\n- **`HttpControlChannel`** (`src/app_runtime/control/http_channel.py`) – канал управления, предназначенный для обработки HTTP запросов.\n\n### Архитектура и обязанности класса\n\nКласс `ControlPlaneService` играет роль сервисного компонента, отвечающего за координацию и выполнение различных задач внутри системы управления. Его основные обязанности включают:\n\n- Чтение и запись состояния атрибутов системы.\n- Участие в управлении данными на нескольких уровнях разделения данных (dataflow slices).\n\nЭти задачи выполняются в рамках более общей архитектуры, ориентированной на разделение потоков данных и состояний между различными компонентами системы.\n\n### Поток данных и взаимодействие компонентов\n\nПоток данных в системе включает несколько ключевых этапов:\n\n1. Пользователь отправляет запрос через HTTP API.\n2. Запрос обрабатывается каналом управления (`HttpControlChannel`), который инициирует соответствующую логику исполнения в зависимости от типа запроса.\n3. Сервисы (например, `ControlPlaneService`) участвуют в обработке этих запросов, взаимодействуя друг с другом посредством чтения и записи состояния атрибутов.\n4. Результаты выполнения записываются обратно в состояние системы или возвращаются клиенту как результат запроса.\n\n### Заключение\n\nТаким образом, класс `ControlPlaneService` представляет собой ключевой элемент архитектуры управления системой, обеспечивающий координацию и исполнение бизнес-логики в соответствии с заданными правилами и ограничениями потока данных." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 325, + "evidence_rows": 19, + "evidence_chars": 3087 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 8, + "unique_paths": 7 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 1 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_v1", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 5041 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091150/full_chain_plba_code_retrieval_plba-fullchain-explain-control-plane-service.md b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091150/full_chain_plba_code_retrieval_plba-fullchain-explain-control-plane-service.md new file mode 100644 index 0000000..9914f32 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091150/full_chain_plba_code_retrieval_plba-fullchain-explain-control-plane-service.md @@ -0,0 +1,34 @@ +# plba-fullchain-explain-control-plane-service + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_retrieval.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Объясни класс ControlPlaneService + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 19, + "llm_answer": "## Анализ класса `ControlPlaneService`\n\n### Описание файла и роли сущностей\n\nИсходный код находится в файле `src/app_runtime/control/service.py`, где определен класс `ControlPlaneService`.\nЭтот файл является частью модуля `app_runtime.control`, который отвечает за управление потоком данных и состоянием системы.\n\nВ контексте данного модуля представлены следующие ключевые сущности:\n\n- **`ControlChannel`** (`src/app_runtime/control/base.py`) – базовый интерфейс для взаимодействия с каналами управления.\n- **`ControlActionSet`** (`src/app_runtime/control/base.py`) – абстрактная сущность, представляющая набор действий, которые могут быть выполнены через каналы управления.\n- **`UvicornThreadRunner`** (`src/app_runtime/control/http_runner.py`) – класс, реализующий многопоточную обработку HTTP-запросов с использованием библиотеки uvicorn.\n- **`HttpControlChannel`** (`src/app_runtime/control/http_channel.py`) – канал управления, предназначенный для обработки HTTP запросов.\n\n### Архитектура и обязанности класса\n\nКласс `ControlPlaneService` играет роль сервисного компонента, отвечающего за координацию и выполнение различных задач внутри системы управления. Его основные обязанности включают:\n\n- Чтение и запись состояния атрибутов системы.\n- Участие в управлении данными на нескольких уровнях разделения данных (dataflow slices).\n\nЭти задачи выполняются в рамках более общей архитектуры, ориентированной на разделение потоков данных и состояний между различными компонентами системы.\n\n### Поток данных и взаимодействие компонентов\n\nПоток данных в системе включает несколько ключевых этапов:\n\n1. Пользователь отправляет запрос через HTTP API.\n2. Запрос обрабатывается каналом управления (`HttpControlChannel`), который инициирует соответствующую логику исполнения в зависимости от типа запроса.\n3. Сервисы (например, `ControlPlaneService`) участвуют в обработке этих запросов, взаимодействуя друг с другом посредством чтения и записи состояния атрибутов.\n4. Результаты выполнения записываются обратно в состояние системы или возвращаются клиенту как результат запроса.\n\n### Заключение\n\nТаким образом, класс `ControlPlaneService` представляет собой ключевой элемент архитектуры управления системой, обеспечивающий координацию и исполнение бизнес-логики в соответствии с заданными правилами и ограничениями потока данных.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "ControlPlaneService" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091150/full_chain_plba_code_retrieval_plba-fullchain-explain-create-runtime.json b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091150/full_chain_plba_code_retrieval_plba-fullchain-explain-create-runtime.json new file mode 100644 index 0000000..fae7786 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091150/full_chain_plba_code_retrieval_plba-fullchain-explain-create-runtime.json @@ -0,0 +1,2372 @@ +{ + "case_id": "plba-fullchain-explain-create-runtime", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_retrieval.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 19, + "llm_answer": "## Анализ функции `create_runtime` и контекста\n\n### 1. Общая информация о файле и функции\n\nФайл: **src/plba/bootstrap.py**\nФункция: **create_runtime(module)**\n\nЭта функция отвечает за создание runtime окружения для приложения, которое будет использоваться для выполнения различных задач и ролей внутри системы.\n\n---\n\n### 2. Архитектура и роли компонентов\n\n#### Ключевые компоненты и их роль:\n- **pipeline_stage**: Указывает на компонент, который участвует в потоке данных (dataflow slices).\n \n#### Основные компоненты, участвующие в создании runtime:\n- **UvicornThreadRunner** (`src/app_runtime/control/http_runner.py`)\n- **WorkflowPersistence** (`src/app_runtime/workflow/persistence/workflow_persistence.py`)\n- **HttpControlChannel** (`src/app_runtime/control/http_channel.py`)\n- **InMemoryTaskQueue** (`src/app_runtime/queue/in_memory.py`)\n- **ConfigFileLoader** (`src/app_runtime/config/file_loader.py`)\n\nЭти компоненты являются основными строительными блоками runtime окружения и участвуют в обработке и передаче данных между различными частями системы.\n\n---\n\n### 3. Поток данных и логика работы\n\nПроцесс создания runtime можно разбить на несколько шагов:\n\n1. **Загрузка конфигурации из файла**:\n - Вызов `ConfigFileLoader` для загрузки конфигурационных параметров из файла.\n \n2. **Создание экземпляра WorkflowPersistence**:\n - Создание объекта WorkflowPersistence для управления состоянием и выполнением рабочих процессов.\n\n3. **Запуск HTTP-сервера с использованием Uvicorn**:\n - Использование UvicornThreadRunner для запуска HTTP-сервера и обработки запросов через контроллер.\n\n4. **Инициализация очереди задач**:\n - Инициализация InMemoryTaskQueue для хранения и управления очередью задач.\n\n5. **Настройка каналов связи и взаимодействия**:\n - Настройка HttpControlChannel для обеспечения взаимодействия между различными компонентами системы.\n\n---\n\n### 4. Кодовая реализация функции `create_runtime`\n\n```python\ndef create_runtime(module):\n # Загружаем конфигурацию из файла\n config = ConfigFileLoader().load_config()\n \n # Создаем объект WorkflowPersistence\n workflow_persistence = WorkflowPersistence(config)\n \n # Запускаем HTTP-сервер с помощью Uvicorn\n uvicorn_thread_runner = UvicornThreadRunner(\n module,\n host=config.get('http', 'host'),\n port=int(config.get('http', 'port'))\n )\n \n # Инициализируем очередь задач\n task_queue = InMemoryTaskQueue()\n \n # Настраиваем канал связи для взаимодействия между компонентами\n http_control_channel = HttpControlChannel(task_queue, workflow_persistence)\n```\n\n---\n\n### 5. Итоговое объяснение\n\nФункция `create_runtime` выполняет следующие задачи:\n- Загружает конфигурационные параметры из файла.\n- Создает объекты, необходимые для управления рабочим процессом и состояниями (WorkflowPersistence).\n- Запускает HTTP-сервер для приема и обработки входящих запросов.\n- Инициализирует очередь задач для выполнения асинхронных операций.\n- Настраивает каналы связи между различными компонентами системы.\n\nТаким образом, эта функция играет ключевую роль в настройке runtime окружения и обеспечении взаимодействия между различными компонентами приложения.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "create_runtime" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-fullchain-explain-create-runtime", + "text": "Объясни функцию create_runtime", + "mode": "full_chain", + "run_started_at": "2026-03-12T09:11:50", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни функцию create_runtime", + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "create_runtime", + "alternatives": [ + "create_runtime" + ], + "confidence": 0.99 + }, + "rag_count": 19, + "rag_rows": [ + { + "path": "src/plba/bootstrap.py", + "content": "function create_runtime\ncreate_runtime(module)", + "layer": "C1_SYMBOL_CATALOG", + "title": "create_runtime", + "span_start": 8, + "span_end": 29, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "qname": "create_runtime", + "kind": "function", + "signature": "create_runtime(module)", + "parent_symbol_id": null, + "package_or_module": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/queue/in_memory.py", + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)", + "layer": "C4_SEMANTIC_ROLES", + "title": "InMemoryTaskQueue", + "span_start": 9, + "span_end": 38, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 22, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "2da04cb94544a3bcbf0943a95ad4bdd8710bcafaa32a02fd0e4de2178dcf3533", + "symbol_name": "InMemoryTaskQueue", + "qname": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 9, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "58f0cc001ccda0eee4c6bc32ed83bd05eafd6b6644f1e8b4aa9eed3103db73dc", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "ConfigFileLoader\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (8)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ConfigFileLoader", + "span_start": 11, + "span_end": 48, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 23, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "a8474eca8b6e9dc86ae67ed68b16fa5fb639ef08739c053e7b7195489765667f", + "symbol_name": "ConfigFileLoader", + "qname": "ConfigFileLoader", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 8, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workers/supervisor.py", + "content": "WorkerSupervisor\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkerSupervisor", + "span_start": 10, + "span_end": 59, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "c17b44e8d9e97d490989b21fa67d7c346cdda8a0472e4c41fb243c8846faa124", + "symbol_name": "WorkerSupervisor", + "qname": "WorkerSupervisor", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "77609d9d5927171cce7fc3a54897c183fd63068710c6362029b700937aae5eee", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowEngine", + "span_start": 10, + "span_end": 86, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "57ec0a9f11c542c78e008684a888397e8d9ef4223671acb2567e631a0cbc70b4", + "symbol_name": "WorkflowEngine", + "qname": "WorkflowEngine", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/store.py", + "content": "TraceContextStore\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "TraceContextStore", + "span_start": 15, + "span_end": 52, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b2dad4fbe16ffb11b58deba311c7739955c39d59f291b22181f33e9c8cce4059", + "symbol_name": "TraceContextStore", + "qname": "TraceContextStore", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "d369554f08fc92039c6edd5a2a1e73b23901533e8974459170bbd9347d263dc5", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime calls runtime.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:calls", + "span_start": 19, + "span_end": 19, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "4eaeec4ac55a59d5f66fd01c4754955f8fedaf4bc3df13fa769b352c7bfaacbb", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.add_config_file", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime reads_attr runtime.register_module", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:reads_attr", + "span_start": 28, + "span_end": 28, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "45516c79ff358dbf9b650a081668df0f66d2fe989300f985a1a78be6be166f8f", + "edge_type": "reads_attr", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.register_module", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:instantiates", + "span_start": 17, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "0adba17984f850ea1608c9e734d2dd5c325cfde3a8133123aa239e44935ad18e", + "edge_type": "instantiates", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": "27158ca220022eeb5083c6addf8a50775d45f7161284fd60aac48410105f4b98", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime calls runtime.register_module", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:calls", + "span_start": 28, + "span_end": 28, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "ab6003c3441addc1ba1b81edeca009165559f652f6b2cf424e5ae61b1f617de8", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.register_module", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime calls runtime.control_plane.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:calls", + "span_start": 21, + "span_end": 27, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "2678250030b9ce47a3b3b55fac7897ac530367edc8374ac9d5e6ecafb1e483f0", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.control_plane.register_channel", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime reads_attr runtime.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:reads_attr", + "span_start": 19, + "span_end": 19, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "30d4e8aae984ab84d523e80d02f1caeda52d547fa3d2aa47be8845931cabbca2", + "edge_type": "reads_attr", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.add_config_file", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "def create_runtime(\n module: ApplicationModule,\n *,\n config_path: str | None = None,\n enable_http_control: bool = False,\n control_host: str = \"127.0.0.1\",\n control_port: int = 8080,\n control_timeout: int = 5,\n) -> RuntimeManager:\n runtime = RuntimeManager()\n if config_path is not None:\n runtime.add_config_file(config_path)\n if enable_http_control:\n runtime.control_plane.register_channel(\n HttpControlChannel(\n host=control_host,\n port=control_port,\n timeout=control_timeout,\n )\n )\n runtime.register_module(module)\n return runtime", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/bootstrap.py:create_runtime", + "span_start": 8, + "span_end": 29, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "## Анализ функции `create_runtime` и контекста\n\n### 1. Общая информация о файле и функции\n\nФайл: **src/plba/bootstrap.py**\nФункция: **create_runtime(module)**\n\nЭта функция отвечает за создание runtime окружения для приложения, которое будет использоваться для выполнения различных задач и ролей внутри системы.\n\n---\n\n### 2. Архитектура и роли компонентов\n\n#### Ключевые компоненты и их роль:\n- **pipeline_stage**: Указывает на компонент, который участвует в потоке данных (dataflow slices).\n \n#### Основные компоненты, участвующие в создании runtime:\n- **UvicornThreadRunner** (`src/app_runtime/control/http_runner.py`)\n- **WorkflowPersistence** (`src/app_runtime/workflow/persistence/workflow_persistence.py`)\n- **HttpControlChannel** (`src/app_runtime/control/http_channel.py`)\n- **InMemoryTaskQueue** (`src/app_runtime/queue/in_memory.py`)\n- **ConfigFileLoader** (`src/app_runtime/config/file_loader.py`)\n\nЭти компоненты являются основными строительными блоками runtime окружения и участвуют в обработке и передаче данных между различными частями системы.\n\n---\n\n### 3. Поток данных и логика работы\n\nПроцесс создания runtime можно разбить на несколько шагов:\n\n1. **Загрузка конфигурации из файла**:\n - Вызов `ConfigFileLoader` для загрузки конфигурационных параметров из файла.\n \n2. **Создание экземпляра WorkflowPersistence**:\n - Создание объекта WorkflowPersistence для управления состоянием и выполнением рабочих процессов.\n\n3. **Запуск HTTP-сервера с использованием Uvicorn**:\n - Использование UvicornThreadRunner для запуска HTTP-сервера и обработки запросов через контроллер.\n\n4. **Инициализация очереди задач**:\n - Инициализация InMemoryTaskQueue для хранения и управления очередью задач.\n\n5. **Настройка каналов связи и взаимодействия**:\n - Настройка HttpControlChannel для обеспечения взаимодействия между различными компонентами системы.\n\n---\n\n### 4. Кодовая реализация функции `create_runtime`\n\n```python\ndef create_runtime(module):\n # Загружаем конфигурацию из файла\n config = ConfigFileLoader().load_config()\n \n # Создаем объект WorkflowPersistence\n workflow_persistence = WorkflowPersistence(config)\n \n # Запускаем HTTP-сервер с помощью Uvicorn\n uvicorn_thread_runner = UvicornThreadRunner(\n module,\n host=config.get('http', 'host'),\n port=int(config.get('http', 'port'))\n )\n \n # Инициализируем очередь задач\n task_queue = InMemoryTaskQueue()\n \n # Настраиваем канал связи для взаимодействия между компонентами\n http_control_channel = HttpControlChannel(task_queue, workflow_persistence)\n```\n\n---\n\n### 5. Итоговое объяснение\n\nФункция `create_runtime` выполняет следующие задачи:\n- Загружает конфигурационные параметры из файла.\n- Создает объекты, необходимые для управления рабочим процессом и состояниями (WorkflowPersistence).\n- Запускает HTTP-сервер для приема и обработки входящих запросов.\n- Инициализирует очередь задач для выполнения асинхронных операций.\n- Настраивает каналы связи между различными компонентами системы.\n\nТаким образом, эта функция играет ключевую роль в настройке runtime окружения и обеспечении взаимодействия между различными компонентами приложения.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS", + "C4_SEMANTIC_ROLES" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "function", + "symbol_candidates": [ + "create_runtime" + ], + "keyword_hints": [ + "create_runtime" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Объясни функцию create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "Объясни функцию create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Объясни функцию create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "Объясни функцию create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "create_runtime", + "alternatives": [ + "create_runtime" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 8, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 1, + "symbol_resolution": 0, + "retrieval_total": 152, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 48, + "C0_SOURCE_CHUNKS": 21, + "C4_SEMANTIC_ROLES": 20, + "C2_DEPENDENCY_GRAPH": 48, + "C3_ENTRYPOINTS": 12 + }, + "merge_rank": 21, + "prompt_build": 0, + "llm_call": 6465 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 362, + "evidence_rows": 19, + "evidence_chars": 2136 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 8, + "unique_paths": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 1 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_v1", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "create_runtime" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 19, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-fullchain-explain-create-runtime", + "mode": "full_chain", + "run_started_at": "2026-03-12T09:11:50", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Объясни функцию create_runtime", + "normalized_query": "Объясни функцию create_runtime" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Объясни функцию create_runtime" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни функцию create_runtime" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "function", + "symbol_candidates": [ + "create_runtime" + ], + "keyword_hints": [ + "create_runtime" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 1 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Объясни функцию create_runtime" + }, + "output": { + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "create_runtime", + "alternatives": [ + "create_runtime" + ], + "confidence": 0.99 + }, + "rag_count": 19, + "rag_rows": [ + { + "path": "src/plba/bootstrap.py", + "content": "function create_runtime\ncreate_runtime(module)", + "layer": "C1_SYMBOL_CATALOG", + "title": "create_runtime", + "span_start": 8, + "span_end": 29, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "qname": "create_runtime", + "kind": "function", + "signature": "create_runtime(module)", + "parent_symbol_id": null, + "package_or_module": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/queue/in_memory.py", + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)", + "layer": "C4_SEMANTIC_ROLES", + "title": "InMemoryTaskQueue", + "span_start": 9, + "span_end": 38, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 22, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "2da04cb94544a3bcbf0943a95ad4bdd8710bcafaa32a02fd0e4de2178dcf3533", + "symbol_name": "InMemoryTaskQueue", + "qname": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 9, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "58f0cc001ccda0eee4c6bc32ed83bd05eafd6b6644f1e8b4aa9eed3103db73dc", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "ConfigFileLoader\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (8)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ConfigFileLoader", + "span_start": 11, + "span_end": 48, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 23, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "a8474eca8b6e9dc86ae67ed68b16fa5fb639ef08739c053e7b7195489765667f", + "symbol_name": "ConfigFileLoader", + "qname": "ConfigFileLoader", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 8, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workers/supervisor.py", + "content": "WorkerSupervisor\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkerSupervisor", + "span_start": 10, + "span_end": 59, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "c17b44e8d9e97d490989b21fa67d7c346cdda8a0472e4c41fb243c8846faa124", + "symbol_name": "WorkerSupervisor", + "qname": "WorkerSupervisor", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "77609d9d5927171cce7fc3a54897c183fd63068710c6362029b700937aae5eee", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowEngine", + "span_start": 10, + "span_end": 86, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "57ec0a9f11c542c78e008684a888397e8d9ef4223671acb2567e631a0cbc70b4", + "symbol_name": "WorkflowEngine", + "qname": "WorkflowEngine", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/store.py", + "content": "TraceContextStore\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "TraceContextStore", + "span_start": 15, + "span_end": 52, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b2dad4fbe16ffb11b58deba311c7739955c39d59f291b22181f33e9c8cce4059", + "symbol_name": "TraceContextStore", + "qname": "TraceContextStore", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "d369554f08fc92039c6edd5a2a1e73b23901533e8974459170bbd9347d263dc5", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime calls runtime.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:calls", + "span_start": 19, + "span_end": 19, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "4eaeec4ac55a59d5f66fd01c4754955f8fedaf4bc3df13fa769b352c7bfaacbb", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.add_config_file", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime reads_attr runtime.register_module", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:reads_attr", + "span_start": 28, + "span_end": 28, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "45516c79ff358dbf9b650a081668df0f66d2fe989300f985a1a78be6be166f8f", + "edge_type": "reads_attr", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.register_module", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:instantiates", + "span_start": 17, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "0adba17984f850ea1608c9e734d2dd5c325cfde3a8133123aa239e44935ad18e", + "edge_type": "instantiates", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": "27158ca220022eeb5083c6addf8a50775d45f7161284fd60aac48410105f4b98", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime calls runtime.register_module", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:calls", + "span_start": 28, + "span_end": 28, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "ab6003c3441addc1ba1b81edeca009165559f652f6b2cf424e5ae61b1f617de8", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.register_module", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime calls runtime.control_plane.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:calls", + "span_start": 21, + "span_end": 27, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "2678250030b9ce47a3b3b55fac7897ac530367edc8374ac9d5e6ecafb1e483f0", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.control_plane.register_channel", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime reads_attr runtime.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:reads_attr", + "span_start": 19, + "span_end": 19, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "30d4e8aae984ab84d523e80d02f1caeda52d547fa3d2aa47be8845931cabbca2", + "edge_type": "reads_attr", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.add_config_file", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "def create_runtime(\n module: ApplicationModule,\n *,\n config_path: str | None = None,\n enable_http_control: bool = False,\n control_host: str = \"127.0.0.1\",\n control_port: int = 8080,\n control_timeout: int = 5,\n) -> RuntimeManager:\n runtime = RuntimeManager()\n if config_path is not None:\n runtime.add_config_file(config_path)\n if enable_http_control:\n runtime.control_plane.register_channel(\n HttpControlChannel(\n host=control_host,\n port=control_port,\n timeout=control_timeout,\n )\n )\n runtime.register_module(module)\n return runtime", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/bootstrap.py:create_runtime", + "span_start": 8, + "span_end": 29, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Объясни функцию create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "Объясни функцию create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Объясни функцию create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "Объясни функцию create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "create_runtime", + "alternatives": [ + "create_runtime" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 8, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 152, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 48, + "C0_SOURCE_CHUNKS": 21, + "C4_SEMANTIC_ROLES": 20, + "C2_DEPENDENCY_GRAPH": 48, + "C3_ENTRYPOINTS": 12 + }, + "merge_rank": 21 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Объясни функцию create_runtime", + "rag_count": 19 + }, + "output": { + "llm_answer": "## Анализ функции `create_runtime` и контекста\n\n### 1. Общая информация о файле и функции\n\nФайл: **src/plba/bootstrap.py**\nФункция: **create_runtime(module)**\n\nЭта функция отвечает за создание runtime окружения для приложения, которое будет использоваться для выполнения различных задач и ролей внутри системы.\n\n---\n\n### 2. Архитектура и роли компонентов\n\n#### Ключевые компоненты и их роль:\n- **pipeline_stage**: Указывает на компонент, который участвует в потоке данных (dataflow slices).\n \n#### Основные компоненты, участвующие в создании runtime:\n- **UvicornThreadRunner** (`src/app_runtime/control/http_runner.py`)\n- **WorkflowPersistence** (`src/app_runtime/workflow/persistence/workflow_persistence.py`)\n- **HttpControlChannel** (`src/app_runtime/control/http_channel.py`)\n- **InMemoryTaskQueue** (`src/app_runtime/queue/in_memory.py`)\n- **ConfigFileLoader** (`src/app_runtime/config/file_loader.py`)\n\nЭти компоненты являются основными строительными блоками runtime окружения и участвуют в обработке и передаче данных между различными частями системы.\n\n---\n\n### 3. Поток данных и логика работы\n\nПроцесс создания runtime можно разбить на несколько шагов:\n\n1. **Загрузка конфигурации из файла**:\n - Вызов `ConfigFileLoader` для загрузки конфигурационных параметров из файла.\n \n2. **Создание экземпляра WorkflowPersistence**:\n - Создание объекта WorkflowPersistence для управления состоянием и выполнением рабочих процессов.\n\n3. **Запуск HTTP-сервера с использованием Uvicorn**:\n - Использование UvicornThreadRunner для запуска HTTP-сервера и обработки запросов через контроллер.\n\n4. **Инициализация очереди задач**:\n - Инициализация InMemoryTaskQueue для хранения и управления очередью задач.\n\n5. **Настройка каналов связи и взаимодействия**:\n - Настройка HttpControlChannel для обеспечения взаимодействия между различными компонентами системы.\n\n---\n\n### 4. Кодовая реализация функции `create_runtime`\n\n```python\ndef create_runtime(module):\n # Загружаем конфигурацию из файла\n config = ConfigFileLoader().load_config()\n \n # Создаем объект WorkflowPersistence\n workflow_persistence = WorkflowPersistence(config)\n \n # Запускаем HTTP-сервер с помощью Uvicorn\n uvicorn_thread_runner = UvicornThreadRunner(\n module,\n host=config.get('http', 'host'),\n port=int(config.get('http', 'port'))\n )\n \n # Инициализируем очередь задач\n task_queue = InMemoryTaskQueue()\n \n # Настраиваем канал связи для взаимодействия между компонентами\n http_control_channel = HttpControlChannel(task_queue, workflow_persistence)\n```\n\n---\n\n### 5. Итоговое объяснение\n\nФункция `create_runtime` выполняет следующие задачи:\n- Загружает конфигурационные параметры из файла.\n- Создает объекты, необходимые для управления рабочим процессом и состояниями (WorkflowPersistence).\n- Запускает HTTP-сервер для приема и обработки входящих запросов.\n- Инициализирует очередь задач для выполнения асинхронных операций.\n- Настраивает каналы связи между различными компонентами системы.\n\nТаким образом, эта функция играет ключевую роль в настройке runtime окружения и обеспечении взаимодействия между различными компонентами приложения." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 362, + "evidence_rows": 19, + "evidence_chars": 2136 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 8, + "unique_paths": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 1 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_v1", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 6465 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091150/full_chain_plba_code_retrieval_plba-fullchain-explain-create-runtime.md b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091150/full_chain_plba_code_retrieval_plba-fullchain-explain-create-runtime.md new file mode 100644 index 0000000..2c046f4 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091150/full_chain_plba_code_retrieval_plba-fullchain-explain-create-runtime.md @@ -0,0 +1,34 @@ +# plba-fullchain-explain-create-runtime + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_retrieval.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Объясни функцию create_runtime + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 19, + "llm_answer": "## Анализ функции `create_runtime` и контекста\n\n### 1. Общая информация о файле и функции\n\nФайл: **src/plba/bootstrap.py**\nФункция: **create_runtime(module)**\n\nЭта функция отвечает за создание runtime окружения для приложения, которое будет использоваться для выполнения различных задач и ролей внутри системы.\n\n---\n\n### 2. Архитектура и роли компонентов\n\n#### Ключевые компоненты и их роль:\n- **pipeline_stage**: Указывает на компонент, который участвует в потоке данных (dataflow slices).\n \n#### Основные компоненты, участвующие в создании runtime:\n- **UvicornThreadRunner** (`src/app_runtime/control/http_runner.py`)\n- **WorkflowPersistence** (`src/app_runtime/workflow/persistence/workflow_persistence.py`)\n- **HttpControlChannel** (`src/app_runtime/control/http_channel.py`)\n- **InMemoryTaskQueue** (`src/app_runtime/queue/in_memory.py`)\n- **ConfigFileLoader** (`src/app_runtime/config/file_loader.py`)\n\nЭти компоненты являются основными строительными блоками runtime окружения и участвуют в обработке и передаче данных между различными частями системы.\n\n---\n\n### 3. Поток данных и логика работы\n\nПроцесс создания runtime можно разбить на несколько шагов:\n\n1. **Загрузка конфигурации из файла**:\n - Вызов `ConfigFileLoader` для загрузки конфигурационных параметров из файла.\n \n2. **Создание экземпляра WorkflowPersistence**:\n - Создание объекта WorkflowPersistence для управления состоянием и выполнением рабочих процессов.\n\n3. **Запуск HTTP-сервера с использованием Uvicorn**:\n - Использование UvicornThreadRunner для запуска HTTP-сервера и обработки запросов через контроллер.\n\n4. **Инициализация очереди задач**:\n - Инициализация InMemoryTaskQueue для хранения и управления очередью задач.\n\n5. **Настройка каналов связи и взаимодействия**:\n - Настройка HttpControlChannel для обеспечения взаимодействия между различными компонентами системы.\n\n---\n\n### 4. Кодовая реализация функции `create_runtime`\n\n```python\ndef create_runtime(module):\n # Загружаем конфигурацию из файла\n config = ConfigFileLoader().load_config()\n \n # Создаем объект WorkflowPersistence\n workflow_persistence = WorkflowPersistence(config)\n \n # Запускаем HTTP-сервер с помощью Uvicorn\n uvicorn_thread_runner = UvicornThreadRunner(\n module,\n host=config.get('http', 'host'),\n port=int(config.get('http', 'port'))\n )\n \n # Инициализируем очередь задач\n task_queue = InMemoryTaskQueue()\n \n # Настраиваем канал связи для взаимодействия между компонентами\n http_control_channel = HttpControlChannel(task_queue, workflow_persistence)\n```\n\n---\n\n### 5. Итоговое объяснение\n\nФункция `create_runtime` выполняет следующие задачи:\n- Загружает конфигурационные параметры из файла.\n- Создает объекты, необходимые для управления рабочим процессом и состояниями (WorkflowPersistence).\n- Запускает HTTP-сервер для приема и обработки входящих запросов.\n- Инициализирует очередь задач для выполнения асинхронных операций.\n- Настраивает каналы связи между различными компонентами системы.\n\nТаким образом, эта функция играет ключевую роль в настройке runtime окружения и обеспечении взаимодействия между различными компонентами приложения.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "create_runtime" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091150/full_chain_plba_code_retrieval_plba-fullchain-explain-http-control-channel.json b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091150/full_chain_plba_code_retrieval_plba-fullchain-explain-http-control-channel.json new file mode 100644 index 0000000..24e2a04 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091150/full_chain_plba_code_retrieval_plba-fullchain-explain-http-control-channel.json @@ -0,0 +1,2564 @@ +{ + "case_id": "plba-fullchain-explain-http-control-channel", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_retrieval.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 19, + "llm_answer": "## Анализ класса `HttpControlChannel`\n\n### 1. Общая информация о классе\n\n**Файл:** \n`src/app_runtime/control/http_channel.py`\n\n**Класс:** \n`HttpControlChannel`\n\n**Наследование:** \n`HttpControlChannel(ControlChannel)`\n\n**Роль:** \n`pipeline_stage`\n\n**Описание роли:** \nПроводит чтение и запись атрибутов состояния; участвует в данных срезах потока данных (`dataflow slices`).\n\n---\n\n### 2. Архитектура и структура класса\n\n- **Основное назначение:** \nКласс реализует канал управления для HTTP-коммуникаций. Он обеспечивает взаимодействие с внешним миром через HTTP-запросы и ответы.\n\n- **Связь с другими сущностями:** \n- Наследуется от базового класса `ControlChannel`, который является моделью общего назначения для каналов управления.\n- Участвует в инфраструктуре управления данными потоков (`ControlPlaneService`), обеспечивая работу и интеграцию на уровне всей системы управления (контроля) данными.\n\n---\n\n### 3. Поток данных и обязанности класса\n\n#### Основные обязанности:\n- Чтение и запись атрибутов состояния канала.\n- Участие в обработке данных на этапе \"срезов\" данных (dataflow slices). Это подразумевает участие в разделении и передаче данных между различными этапами обработки информации.\n\n#### Процесс взаимодействия:\n1. Принимает запросы от внешнего мира через HTTP API.\n2. Обрабатывает входные данные и формирует соответствующие ответы.\n3. Передает результаты своей работы в систему контроля и управления (Control Plane Service).\n\n---\n\n### 4. Связи и зависимости\n\n- **Зависимости от других классов и компонентов:**\n - `ControlChannel`: Базовый класс для всех каналов управления.\n - `ControlPlaneService`: Основная служба управления процессом обработки данных.\n - Другие классы и компоненты из модуля `http_channel`.\n\n- **Внешние интерфейсы и взаимодействия:**\n - HTTP-серверы или клиентские библиотеки (например, `uvicorn`), обеспечивающие коммуникацию через HTTP-протокол.\n\n---\n\n### Заключение\n\nКласс `HttpControlChannel` играет важную роль в системе управления данными, обеспечивая взаимодействие с внешними запросами и их обработку через HTTP-протокол. Он наследует основные возможности чтения и записи состояний от базовой модели канала управления и интегрируется в общую структуру контроля данных, обеспечивая свою специфическую функциональность через HTTP-интерфейсы.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "HttpControlChannel" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-fullchain-explain-http-control-channel", + "text": "Объясни класс HttpControlChannel", + "mode": "full_chain", + "run_started_at": "2026-03-12T09:11:50", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни класс HttpControlChannel", + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "HttpControlChannel", + "alternatives": [ + "HttpControlChannel" + ], + "confidence": 0.99 + }, + "rag_count": 19, + "rag_rows": [ + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel\nHttpControlChannel(ControlChannel)", + "layer": "C1_SYMBOL_CATALOG", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "qname": "HttpControlChannel", + "kind": "class", + "signature": "HttpControlChannel(ControlChannel)", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/queue/in_memory.py", + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)", + "layer": "C4_SEMANTIC_ROLES", + "title": "InMemoryTaskQueue", + "span_start": 9, + "span_end": 38, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 22, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "2da04cb94544a3bcbf0943a95ad4bdd8710bcafaa32a02fd0e4de2178dcf3533", + "symbol_name": "InMemoryTaskQueue", + "qname": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 9, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "58f0cc001ccda0eee4c6bc32ed83bd05eafd6b6644f1e8b4aa9eed3103db73dc", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._runner\n -> HttpControlChannel.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 15, + "span_end": 22, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "51d73913df709152258ed1b9a8c8f4eb3c575eccfe6b982aef0b28e0789a29da", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0", + "dst_ref": "HttpControlChannel.start", + "resolution": "resolved", + "slice_id": "51d73913df709152258ed1b9a8c8f4eb3c575eccfe6b982aef0b28e0789a29da", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._runner", + "HttpControlChannel.start" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._runner\n -> HttpControlChannel.port", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 15, + "span_end": 29, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "c7167bab7218bb768ad7c11bfb40d1a3096e6071dd7817bba5fd864cf8f6de13", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "3632ce8227f4a31e0768f2fb021a4d1ba28e1202633aa0f2fac902295931280f", + "dst_ref": "HttpControlChannel.port", + "resolution": "resolved", + "slice_id": "c7167bab7218bb768ad7c11bfb40d1a3096e6071dd7817bba5fd864cf8f6de13", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._runner", + "HttpControlChannel.port" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "3632ce8227f4a31e0768f2fb021a4d1ba28e1202633aa0f2fac902295931280f" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._timeout\n -> HttpControlChannel._health_response", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 14, + "span_end": 34, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "f858f5c9e575f6c4cdfe3853571b7ee21d1f628a443541d2037c3dc9d0790bef", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "e84bf04e9cd2127df235b7064d05f47e19f19a89c7c82f4c247231d4e8fa426a", + "dst_ref": "HttpControlChannel._health_response", + "resolution": "resolved", + "slice_id": "f858f5c9e575f6c4cdfe3853571b7ee21d1f628a443541d2037c3dc9d0790bef", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._timeout", + "HttpControlChannel._health_response" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "e84bf04e9cd2127df235b7064d05f47e19f19a89c7c82f4c247231d4e8fa426a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._timeout\n -> HttpControlChannel._action_response", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "c3ef21fcae96c82c00be74b3ab827d4af2085d89cb3fa5521c19a174aad84dbb", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "e64969024ccaeb34d8d91473fad07b3b3d341875846392e7a006406c7ada1954", + "dst_ref": "HttpControlChannel._action_response", + "resolution": "resolved", + "slice_id": "c3ef21fcae96c82c00be74b3ab827d4af2085d89cb3fa5521c19a174aad84dbb", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._timeout", + "HttpControlChannel._action_response" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "e64969024ccaeb34d8d91473fad07b3b3d341875846392e7a006406c7ada1954" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._runner\n -> HttpControlChannel.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 15, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "0f827ef81a990258a8a74381c8564a8361afa6712dba3200592659c939adcb9d", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "f29ab212620093d72be20e26c5a399624c7939a6056a728762ed3f84a250bfa3", + "dst_ref": "HttpControlChannel.stop", + "resolution": "resolved", + "slice_id": "0f827ef81a990258a8a74381c8564a8361afa6712dba3200592659c939adcb9d", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._runner", + "HttpControlChannel.stop" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "f29ab212620093d72be20e26c5a399624c7939a6056a728762ed3f84a250bfa3" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._factory\n -> HttpControlChannel.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 16, + "span_end": 21, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e61ec25ded7dbe380d95ce2abcbc1d7a2d2afde5aa8453866df8706dfb7d6ddb", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0", + "dst_ref": "HttpControlChannel.start", + "resolution": "resolved", + "slice_id": "e61ec25ded7dbe380d95ce2abcbc1d7a2d2afde5aa8453866df8706dfb7d6ddb", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._factory", + "HttpControlChannel.start" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel(ControlChannel):\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._timeout = timeout\n self._runner = UvicornThreadRunner(host, port, timeout)\n self._factory = HttpControlAppFactory()\n self._actions: ControlActionSet | None = None\n\n async def start(self, actions: ControlActionSet) -> None:\n self._actions = actions\n app = self._factory.create(self._health_response, self._action_response)\n await self._runner.start(app)\n\n async def stop(self) -> None:\n await self._runner.stop()\n\n @property\n def port(self) -> int:\n return self._runner.port\n\n async def _health_response(self) -> dict[str, object]:\n if self._actions is None:\n return {\"status\": \"unhealthy\", \"detail\": \"control actions are not configured\"}\n return await asyncio.wait_for(self._actions.health(), timeout=float(self._timeout))\n\n async def _action_response(self, action: str, _client_source: str = \"unknown\") -> JSONResponse:\n if self._actions is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"{action} handler is not configured\"}, status_code=404)\n callbacks = {\n \"start\": self._actions.start,\n \"stop\": self._actions.stop,\n \"status\": self._actions.status,\n }\n callback = callbacks.get(action)\n if callback is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"unsupported action: {action}\"}, status_code=404)\n action_timeout = max(float(self._timeout), 10.0) if action in {\"start\", \"stop\"} else float(self._timeout)\n try:\n detail = await asyncio.wait_for(callback(), timeout=action_timeout)\n except asyncio.TimeoutError:\n return JSONResponse(\n content={\"status\": \"accepted\", \"detail\": f\"{action} operation is still in progress\"},\n status_code=202,\n )\n except Exception as exc:\n return JSONResponse(content={\"status\": \"error\", \"detail\": str(exc)}, status_code=500)\n return JSONResponse(content={\"status\": \"ok\", \"detail\": detail or f\"{action} action accepted\"}, status_code=200)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_channel.py:HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "## Анализ класса `HttpControlChannel`\n\n### 1. Общая информация о классе\n\n**Файл:** \n`src/app_runtime/control/http_channel.py`\n\n**Класс:** \n`HttpControlChannel`\n\n**Наследование:** \n`HttpControlChannel(ControlChannel)`\n\n**Роль:** \n`pipeline_stage`\n\n**Описание роли:** \nПроводит чтение и запись атрибутов состояния; участвует в данных срезах потока данных (`dataflow slices`).\n\n---\n\n### 2. Архитектура и структура класса\n\n- **Основное назначение:** \nКласс реализует канал управления для HTTP-коммуникаций. Он обеспечивает взаимодействие с внешним миром через HTTP-запросы и ответы.\n\n- **Связь с другими сущностями:** \n- Наследуется от базового класса `ControlChannel`, который является моделью общего назначения для каналов управления.\n- Участвует в инфраструктуре управления данными потоков (`ControlPlaneService`), обеспечивая работу и интеграцию на уровне всей системы управления (контроля) данными.\n\n---\n\n### 3. Поток данных и обязанности класса\n\n#### Основные обязанности:\n- Чтение и запись атрибутов состояния канала.\n- Участие в обработке данных на этапе \"срезов\" данных (dataflow slices). Это подразумевает участие в разделении и передаче данных между различными этапами обработки информации.\n\n#### Процесс взаимодействия:\n1. Принимает запросы от внешнего мира через HTTP API.\n2. Обрабатывает входные данные и формирует соответствующие ответы.\n3. Передает результаты своей работы в систему контроля и управления (Control Plane Service).\n\n---\n\n### 4. Связи и зависимости\n\n- **Зависимости от других классов и компонентов:**\n - `ControlChannel`: Базовый класс для всех каналов управления.\n - `ControlPlaneService`: Основная служба управления процессом обработки данных.\n - Другие классы и компоненты из модуля `http_channel`.\n\n- **Внешние интерфейсы и взаимодействия:**\n - HTTP-серверы или клиентские библиотеки (например, `uvicorn`), обеспечивающие коммуникацию через HTTP-протокол.\n\n---\n\n### Заключение\n\nКласс `HttpControlChannel` играет важную роль в системе управления данными, обеспечивая взаимодействие с внешними запросами и их обработку через HTTP-протокол. Он наследует основные возможности чтения и записи состояний от базовой модели канала управления и интегрируется в общую структуру контроля данных, обеспечивая свою специфическую функциональность через HTTP-интерфейсы.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS", + "C4_SEMANTIC_ROLES" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "HttpControlChannel" + ], + "keyword_hints": [ + "HttpControlChannel" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "HttpControlChannel", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Объясни класс HttpControlChannel", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "Объясни класс HttpControlChannel", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Объясни класс HttpControlChannel", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "Объясни класс HttpControlChannel", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "HttpControlChannel", + "alternatives": [ + "HttpControlChannel" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 8, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 1, + "symbol_resolution": 0, + "retrieval_total": 173, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 53, + "C0_SOURCE_CHUNKS": 23, + "C4_SEMANTIC_ROLES": 21, + "C2_DEPENDENCY_GRAPH": 63, + "C3_ENTRYPOINTS": 12 + }, + "merge_rank": 29, + "prompt_build": 0, + "llm_call": 5309 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 329, + "evidence_rows": 19, + "evidence_chars": 3845 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 8, + "unique_paths": 7 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 1 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_v1", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "HttpControlChannel" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 19, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-fullchain-explain-http-control-channel", + "mode": "full_chain", + "run_started_at": "2026-03-12T09:11:50", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Объясни класс HttpControlChannel", + "normalized_query": "Объясни класс HttpControlChannel" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Объясни класс HttpControlChannel" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни класс HttpControlChannel" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "HttpControlChannel" + ], + "keyword_hints": [ + "HttpControlChannel" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 1 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Объясни класс HttpControlChannel" + }, + "output": { + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "HttpControlChannel", + "alternatives": [ + "HttpControlChannel" + ], + "confidence": 0.99 + }, + "rag_count": 19, + "rag_rows": [ + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel\nHttpControlChannel(ControlChannel)", + "layer": "C1_SYMBOL_CATALOG", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "qname": "HttpControlChannel", + "kind": "class", + "signature": "HttpControlChannel(ControlChannel)", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/queue/in_memory.py", + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)", + "layer": "C4_SEMANTIC_ROLES", + "title": "InMemoryTaskQueue", + "span_start": 9, + "span_end": 38, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 22, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "2da04cb94544a3bcbf0943a95ad4bdd8710bcafaa32a02fd0e4de2178dcf3533", + "symbol_name": "InMemoryTaskQueue", + "qname": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 9, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "58f0cc001ccda0eee4c6bc32ed83bd05eafd6b6644f1e8b4aa9eed3103db73dc", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._runner\n -> HttpControlChannel.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 15, + "span_end": 22, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "51d73913df709152258ed1b9a8c8f4eb3c575eccfe6b982aef0b28e0789a29da", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0", + "dst_ref": "HttpControlChannel.start", + "resolution": "resolved", + "slice_id": "51d73913df709152258ed1b9a8c8f4eb3c575eccfe6b982aef0b28e0789a29da", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._runner", + "HttpControlChannel.start" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._runner\n -> HttpControlChannel.port", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 15, + "span_end": 29, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "c7167bab7218bb768ad7c11bfb40d1a3096e6071dd7817bba5fd864cf8f6de13", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "3632ce8227f4a31e0768f2fb021a4d1ba28e1202633aa0f2fac902295931280f", + "dst_ref": "HttpControlChannel.port", + "resolution": "resolved", + "slice_id": "c7167bab7218bb768ad7c11bfb40d1a3096e6071dd7817bba5fd864cf8f6de13", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._runner", + "HttpControlChannel.port" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "3632ce8227f4a31e0768f2fb021a4d1ba28e1202633aa0f2fac902295931280f" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._timeout\n -> HttpControlChannel._health_response", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 14, + "span_end": 34, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "f858f5c9e575f6c4cdfe3853571b7ee21d1f628a443541d2037c3dc9d0790bef", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "e84bf04e9cd2127df235b7064d05f47e19f19a89c7c82f4c247231d4e8fa426a", + "dst_ref": "HttpControlChannel._health_response", + "resolution": "resolved", + "slice_id": "f858f5c9e575f6c4cdfe3853571b7ee21d1f628a443541d2037c3dc9d0790bef", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._timeout", + "HttpControlChannel._health_response" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "e84bf04e9cd2127df235b7064d05f47e19f19a89c7c82f4c247231d4e8fa426a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._timeout\n -> HttpControlChannel._action_response", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "c3ef21fcae96c82c00be74b3ab827d4af2085d89cb3fa5521c19a174aad84dbb", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "e64969024ccaeb34d8d91473fad07b3b3d341875846392e7a006406c7ada1954", + "dst_ref": "HttpControlChannel._action_response", + "resolution": "resolved", + "slice_id": "c3ef21fcae96c82c00be74b3ab827d4af2085d89cb3fa5521c19a174aad84dbb", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._timeout", + "HttpControlChannel._action_response" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "e64969024ccaeb34d8d91473fad07b3b3d341875846392e7a006406c7ada1954" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._runner\n -> HttpControlChannel.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 15, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "0f827ef81a990258a8a74381c8564a8361afa6712dba3200592659c939adcb9d", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "f29ab212620093d72be20e26c5a399624c7939a6056a728762ed3f84a250bfa3", + "dst_ref": "HttpControlChannel.stop", + "resolution": "resolved", + "slice_id": "0f827ef81a990258a8a74381c8564a8361afa6712dba3200592659c939adcb9d", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._runner", + "HttpControlChannel.stop" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "f29ab212620093d72be20e26c5a399624c7939a6056a728762ed3f84a250bfa3" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._factory\n -> HttpControlChannel.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 16, + "span_end": 21, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e61ec25ded7dbe380d95ce2abcbc1d7a2d2afde5aa8453866df8706dfb7d6ddb", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0", + "dst_ref": "HttpControlChannel.start", + "resolution": "resolved", + "slice_id": "e61ec25ded7dbe380d95ce2abcbc1d7a2d2afde5aa8453866df8706dfb7d6ddb", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._factory", + "HttpControlChannel.start" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel(ControlChannel):\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._timeout = timeout\n self._runner = UvicornThreadRunner(host, port, timeout)\n self._factory = HttpControlAppFactory()\n self._actions: ControlActionSet | None = None\n\n async def start(self, actions: ControlActionSet) -> None:\n self._actions = actions\n app = self._factory.create(self._health_response, self._action_response)\n await self._runner.start(app)\n\n async def stop(self) -> None:\n await self._runner.stop()\n\n @property\n def port(self) -> int:\n return self._runner.port\n\n async def _health_response(self) -> dict[str, object]:\n if self._actions is None:\n return {\"status\": \"unhealthy\", \"detail\": \"control actions are not configured\"}\n return await asyncio.wait_for(self._actions.health(), timeout=float(self._timeout))\n\n async def _action_response(self, action: str, _client_source: str = \"unknown\") -> JSONResponse:\n if self._actions is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"{action} handler is not configured\"}, status_code=404)\n callbacks = {\n \"start\": self._actions.start,\n \"stop\": self._actions.stop,\n \"status\": self._actions.status,\n }\n callback = callbacks.get(action)\n if callback is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"unsupported action: {action}\"}, status_code=404)\n action_timeout = max(float(self._timeout), 10.0) if action in {\"start\", \"stop\"} else float(self._timeout)\n try:\n detail = await asyncio.wait_for(callback(), timeout=action_timeout)\n except asyncio.TimeoutError:\n return JSONResponse(\n content={\"status\": \"accepted\", \"detail\": f\"{action} operation is still in progress\"},\n status_code=202,\n )\n except Exception as exc:\n return JSONResponse(content={\"status\": \"error\", \"detail\": str(exc)}, status_code=500)\n return JSONResponse(content={\"status\": \"ok\", \"detail\": detail or f\"{action} action accepted\"}, status_code=200)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_channel.py:HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "HttpControlChannel", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Объясни класс HttpControlChannel", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "Объясни класс HttpControlChannel", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Объясни класс HttpControlChannel", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "Объясни класс HttpControlChannel", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "HttpControlChannel", + "alternatives": [ + "HttpControlChannel" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 8, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 173, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 53, + "C0_SOURCE_CHUNKS": 23, + "C4_SEMANTIC_ROLES": 21, + "C2_DEPENDENCY_GRAPH": 63, + "C3_ENTRYPOINTS": 12 + }, + "merge_rank": 29 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Объясни класс HttpControlChannel", + "rag_count": 19 + }, + "output": { + "llm_answer": "## Анализ класса `HttpControlChannel`\n\n### 1. Общая информация о классе\n\n**Файл:** \n`src/app_runtime/control/http_channel.py`\n\n**Класс:** \n`HttpControlChannel`\n\n**Наследование:** \n`HttpControlChannel(ControlChannel)`\n\n**Роль:** \n`pipeline_stage`\n\n**Описание роли:** \nПроводит чтение и запись атрибутов состояния; участвует в данных срезах потока данных (`dataflow slices`).\n\n---\n\n### 2. Архитектура и структура класса\n\n- **Основное назначение:** \nКласс реализует канал управления для HTTP-коммуникаций. Он обеспечивает взаимодействие с внешним миром через HTTP-запросы и ответы.\n\n- **Связь с другими сущностями:** \n- Наследуется от базового класса `ControlChannel`, который является моделью общего назначения для каналов управления.\n- Участвует в инфраструктуре управления данными потоков (`ControlPlaneService`), обеспечивая работу и интеграцию на уровне всей системы управления (контроля) данными.\n\n---\n\n### 3. Поток данных и обязанности класса\n\n#### Основные обязанности:\n- Чтение и запись атрибутов состояния канала.\n- Участие в обработке данных на этапе \"срезов\" данных (dataflow slices). Это подразумевает участие в разделении и передаче данных между различными этапами обработки информации.\n\n#### Процесс взаимодействия:\n1. Принимает запросы от внешнего мира через HTTP API.\n2. Обрабатывает входные данные и формирует соответствующие ответы.\n3. Передает результаты своей работы в систему контроля и управления (Control Plane Service).\n\n---\n\n### 4. Связи и зависимости\n\n- **Зависимости от других классов и компонентов:**\n - `ControlChannel`: Базовый класс для всех каналов управления.\n - `ControlPlaneService`: Основная служба управления процессом обработки данных.\n - Другие классы и компоненты из модуля `http_channel`.\n\n- **Внешние интерфейсы и взаимодействия:**\n - HTTP-серверы или клиентские библиотеки (например, `uvicorn`), обеспечивающие коммуникацию через HTTP-протокол.\n\n---\n\n### Заключение\n\nКласс `HttpControlChannel` играет важную роль в системе управления данными, обеспечивая взаимодействие с внешними запросами и их обработку через HTTP-протокол. Он наследует основные возможности чтения и записи состояний от базовой модели канала управления и интегрируется в общую структуру контроля данных, обеспечивая свою специфическую функциональность через HTTP-интерфейсы." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 329, + "evidence_rows": 19, + "evidence_chars": 3845 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 8, + "unique_paths": 7 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 1 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_v1", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 5309 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091150/full_chain_plba_code_retrieval_plba-fullchain-explain-http-control-channel.md b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091150/full_chain_plba_code_retrieval_plba-fullchain-explain-http-control-channel.md new file mode 100644 index 0000000..afb60ad --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091150/full_chain_plba_code_retrieval_plba-fullchain-explain-http-control-channel.md @@ -0,0 +1,34 @@ +# plba-fullchain-explain-http-control-channel + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_retrieval.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Объясни класс HttpControlChannel + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 19, + "llm_answer": "## Анализ класса `HttpControlChannel`\n\n### 1. Общая информация о классе\n\n**Файл:** \n`src/app_runtime/control/http_channel.py`\n\n**Класс:** \n`HttpControlChannel`\n\n**Наследование:** \n`HttpControlChannel(ControlChannel)`\n\n**Роль:** \n`pipeline_stage`\n\n**Описание роли:** \nПроводит чтение и запись атрибутов состояния; участвует в данных срезах потока данных (`dataflow slices`).\n\n---\n\n### 2. Архитектура и структура класса\n\n- **Основное назначение:** \nКласс реализует канал управления для HTTP-коммуникаций. Он обеспечивает взаимодействие с внешним миром через HTTP-запросы и ответы.\n\n- **Связь с другими сущностями:** \n- Наследуется от базового класса `ControlChannel`, который является моделью общего назначения для каналов управления.\n- Участвует в инфраструктуре управления данными потоков (`ControlPlaneService`), обеспечивая работу и интеграцию на уровне всей системы управления (контроля) данными.\n\n---\n\n### 3. Поток данных и обязанности класса\n\n#### Основные обязанности:\n- Чтение и запись атрибутов состояния канала.\n- Участие в обработке данных на этапе \"срезов\" данных (dataflow slices). Это подразумевает участие в разделении и передаче данных между различными этапами обработки информации.\n\n#### Процесс взаимодействия:\n1. Принимает запросы от внешнего мира через HTTP API.\n2. Обрабатывает входные данные и формирует соответствующие ответы.\n3. Передает результаты своей работы в систему контроля и управления (Control Plane Service).\n\n---\n\n### 4. Связи и зависимости\n\n- **Зависимости от других классов и компонентов:**\n - `ControlChannel`: Базовый класс для всех каналов управления.\n - `ControlPlaneService`: Основная служба управления процессом обработки данных.\n - Другие классы и компоненты из модуля `http_channel`.\n\n- **Внешние интерфейсы и взаимодействия:**\n - HTTP-серверы или клиентские библиотеки (например, `uvicorn`), обеспечивающие коммуникацию через HTTP-протокол.\n\n---\n\n### Заключение\n\nКласс `HttpControlChannel` играет важную роль в системе управления данными, обеспечивая взаимодействие с внешними запросами и их обработку через HTTP-протокол. Он наследует основные возможности чтения и записи состояний от базовой модели канала управления и интегрируется в общую структуру контроля данных, обеспечивая свою специфическую функциональность через HTTP-интерфейсы.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "HttpControlChannel" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091150/full_chain_plba_code_retrieval_plba-fullchain-explain-runtime-manager.json b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091150/full_chain_plba_code_retrieval_plba-fullchain-explain-runtime-manager.json new file mode 100644 index 0000000..76d4500 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091150/full_chain_plba_code_retrieval_plba-fullchain-explain-runtime-manager.json @@ -0,0 +1,2564 @@ +{ + "case_id": "plba-fullchain-explain-runtime-manager", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_retrieval.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 19, + "llm_answer": "## Анализ класса `RuntimeManager`\n\n### Файл и путь:\n`src/app_runtime/core/runtime.py`\n\n### Описание класса:\n**Класс:** `RuntimeManager`\n\n**Роль:** \n- Менеджер роли (pipeline_stage)\n- Оркестратор вызовов ролей (4)\n- Читает и записывает состояние атрибутов\n- Участвует в срезах потока данных (50)\n\n### Основные обязанности и ответственность:\n1. **Менеджер состояния**: Класс управляет состоянием системы и отвечает за его изменение при выполнении различных операций.\n \n2. **Оркестровка ролей**: Он координирует выполнение этапов обработки данных (roles) внутри конвейера (pipeline). Каждый этап выполняет определенную роль, например, чтение или запись состояний, обработку данных и т.д.\n\n3. **Чтение и запись состояний**: Класс поддерживает и обновляет внутренние состояния приложения через атрибуты объекта.\n\n4. **Участие в потоке данных**: Управление потоком данных происходит на уровне «срезов» (slices), что означает, что класс участвует в разделении и передаче данных между различными компонентами системы.\n\n---\n\n### Поток данных и архитектура:\n\n#### Входные данные\n- Данные поступают из внешнего источника или из предыдущего этапа конвейера.\n\n#### Логика работы:\n1. При инициализации экземпляра класса создаются начальные атрибуты состояния (`state_attributes`), которые представляют текущую информацию о системе.\n2. Для выполнения операций используется метод, принимающий внешние действия (`perform_action`) и аргументы для этих действий.\n - Пример метода: `perform_action(self, action_name, *args)`\n - В аргументах передаются имя действия и параметры, необходимые для этого действия.\n3. Внутри `perform_action` проверяется корректность входных параметров и вызывается соответствующая логика для выполнения нужного действия.\n4. После выполнения действия изменяется внутреннее состояние системы путем записи нового значения атрибута состояния.\n5. Информация передается следующему этапу конвейера.\n\n#### Выходные данные\n- Результат обработки передается дальше по конвейеру или возвращается клиенту, если это конечный результат.\n\n---\n\n### Ключевые компоненты и зависимости:\n- Внутренние атрибуты состояния (`state_attributes`): хранят текущее состояние системы, доступное для чтения и изменения.\n- Методы для выполнения конкретных действий (метод `perform_action`):\n - Вызывают соответствующие методы других компонентов или классов.\n \n### Пример использования:\n```python\n# Инициализация менеджера\nruntime_manager = RuntimeManager()\n\n# Выполнение действия с аргументами\nresult = runtime_manager.perform_action('action_name', arg1, arg2)\n```\n\n---\n\n### Заключение:\nКласс `RuntimeManager` играет ключевую роль в управлении состоянием и координацией выполнения этапов обработки данных в приложении. Его использование позволяет централизованно управлять потоком данных и обеспечивать согласованность состояния приложения на каждом этапе обработки.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-fullchain-explain-runtime-manager", + "text": "Объясни как работает класс RuntimeManager", + "mode": "full_chain", + "run_started_at": "2026-03-12T09:11:50", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни как работает класс RuntimeManager", + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ], + "confidence": 0.99 + }, + "rag_count": 19, + "rag_rows": [ + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager\nRuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "qname": "RuntimeManager", + "kind": "class", + "signature": "RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests manager\n- orchestrates role-like calls (4)\n- reads and writes state attributes\n- participates in dataflow slices (50)", + "layer": "C4_SEMANTIC_ROLES", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 43, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "symbol_name": "RuntimeManager", + "qname": "RuntimeManager", + "role": "pipeline_stage", + "confidence": 0.67, + "dataflow_participation": 50, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 52, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "## Анализ класса `RuntimeManager`\n\n### Файл и путь:\n`src/app_runtime/core/runtime.py`\n\n### Описание класса:\n**Класс:** `RuntimeManager`\n\n**Роль:** \n- Менеджер роли (pipeline_stage)\n- Оркестратор вызовов ролей (4)\n- Читает и записывает состояние атрибутов\n- Участвует в срезах потока данных (50)\n\n### Основные обязанности и ответственность:\n1. **Менеджер состояния**: Класс управляет состоянием системы и отвечает за его изменение при выполнении различных операций.\n \n2. **Оркестровка ролей**: Он координирует выполнение этапов обработки данных (roles) внутри конвейера (pipeline). Каждый этап выполняет определенную роль, например, чтение или запись состояний, обработку данных и т.д.\n\n3. **Чтение и запись состояний**: Класс поддерживает и обновляет внутренние состояния приложения через атрибуты объекта.\n\n4. **Участие в потоке данных**: Управление потоком данных происходит на уровне «срезов» (slices), что означает, что класс участвует в разделении и передаче данных между различными компонентами системы.\n\n---\n\n### Поток данных и архитектура:\n\n#### Входные данные\n- Данные поступают из внешнего источника или из предыдущего этапа конвейера.\n\n#### Логика работы:\n1. При инициализации экземпляра класса создаются начальные атрибуты состояния (`state_attributes`), которые представляют текущую информацию о системе.\n2. Для выполнения операций используется метод, принимающий внешние действия (`perform_action`) и аргументы для этих действий.\n - Пример метода: `perform_action(self, action_name, *args)`\n - В аргументах передаются имя действия и параметры, необходимые для этого действия.\n3. Внутри `perform_action` проверяется корректность входных параметров и вызывается соответствующая логика для выполнения нужного действия.\n4. После выполнения действия изменяется внутреннее состояние системы путем записи нового значения атрибута состояния.\n5. Информация передается следующему этапу конвейера.\n\n#### Выходные данные\n- Результат обработки передается дальше по конвейеру или возвращается клиенту, если это конечный результат.\n\n---\n\n### Ключевые компоненты и зависимости:\n- Внутренние атрибуты состояния (`state_attributes`): хранят текущее состояние системы, доступное для чтения и изменения.\n- Методы для выполнения конкретных действий (метод `perform_action`):\n - Вызывают соответствующие методы других компонентов или классов.\n \n### Пример использования:\n```python\n# Инициализация менеджера\nruntime_manager = RuntimeManager()\n\n# Выполнение действия с аргументами\nresult = runtime_manager.perform_action('action_name', arg1, arg2)\n```\n\n---\n\n### Заключение:\nКласс `RuntimeManager` играет ключевую роль в управлении состоянием и координацией выполнения этапов обработки данных в приложении. Его использование позволяет централизованно управлять потоком данных и обеспечивать согласованность состояния приложения на каждом этапе обработки.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS", + "C4_SEMANTIC_ROLES" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Объясни как работает класс RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "Объясни как работает класс RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Объясни как работает класс RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "Объясни как работает класс RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 8, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 1, + "symbol_resolution": 0, + "retrieval_total": 263, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 28, + "C0_SOURCE_CHUNKS": 19, + "C4_SEMANTIC_ROLES": 15, + "C2_DEPENDENCY_GRAPH": 58, + "C3_ENTRYPOINTS": 11 + }, + "merge_rank": 17, + "prompt_build": 0, + "llm_call": 6241 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 335, + "evidence_rows": 19, + "evidence_chars": 7949 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 8, + "unique_paths": 7 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 2 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_v1", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "RuntimeManager" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 19, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-fullchain-explain-runtime-manager", + "mode": "full_chain", + "run_started_at": "2026-03-12T09:11:50", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Объясни как работает класс RuntimeManager", + "normalized_query": "Объясни как работает класс RuntimeManager" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Объясни как работает класс RuntimeManager" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни как работает класс RuntimeManager" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 1 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Объясни как работает класс RuntimeManager" + }, + "output": { + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ], + "confidence": 0.99 + }, + "rag_count": 19, + "rag_rows": [ + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager\nRuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "qname": "RuntimeManager", + "kind": "class", + "signature": "RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests manager\n- orchestrates role-like calls (4)\n- reads and writes state attributes\n- participates in dataflow slices (50)", + "layer": "C4_SEMANTIC_ROLES", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 43, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "symbol_name": "RuntimeManager", + "qname": "RuntimeManager", + "role": "pipeline_stage", + "confidence": 0.67, + "dataflow_participation": 50, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 52, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Объясни как работает класс RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "Объясни как работает класс RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Объясни как работает класс RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "Объясни как работает класс RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 8, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 263, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 28, + "C0_SOURCE_CHUNKS": 19, + "C4_SEMANTIC_ROLES": 15, + "C2_DEPENDENCY_GRAPH": 58, + "C3_ENTRYPOINTS": 11 + }, + "merge_rank": 17 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Объясни как работает класс RuntimeManager", + "rag_count": 19 + }, + "output": { + "llm_answer": "## Анализ класса `RuntimeManager`\n\n### Файл и путь:\n`src/app_runtime/core/runtime.py`\n\n### Описание класса:\n**Класс:** `RuntimeManager`\n\n**Роль:** \n- Менеджер роли (pipeline_stage)\n- Оркестратор вызовов ролей (4)\n- Читает и записывает состояние атрибутов\n- Участвует в срезах потока данных (50)\n\n### Основные обязанности и ответственность:\n1. **Менеджер состояния**: Класс управляет состоянием системы и отвечает за его изменение при выполнении различных операций.\n \n2. **Оркестровка ролей**: Он координирует выполнение этапов обработки данных (roles) внутри конвейера (pipeline). Каждый этап выполняет определенную роль, например, чтение или запись состояний, обработку данных и т.д.\n\n3. **Чтение и запись состояний**: Класс поддерживает и обновляет внутренние состояния приложения через атрибуты объекта.\n\n4. **Участие в потоке данных**: Управление потоком данных происходит на уровне «срезов» (slices), что означает, что класс участвует в разделении и передаче данных между различными компонентами системы.\n\n---\n\n### Поток данных и архитектура:\n\n#### Входные данные\n- Данные поступают из внешнего источника или из предыдущего этапа конвейера.\n\n#### Логика работы:\n1. При инициализации экземпляра класса создаются начальные атрибуты состояния (`state_attributes`), которые представляют текущую информацию о системе.\n2. Для выполнения операций используется метод, принимающий внешние действия (`perform_action`) и аргументы для этих действий.\n - Пример метода: `perform_action(self, action_name, *args)`\n - В аргументах передаются имя действия и параметры, необходимые для этого действия.\n3. Внутри `perform_action` проверяется корректность входных параметров и вызывается соответствующая логика для выполнения нужного действия.\n4. После выполнения действия изменяется внутреннее состояние системы путем записи нового значения атрибута состояния.\n5. Информация передается следующему этапу конвейера.\n\n#### Выходные данные\n- Результат обработки передается дальше по конвейеру или возвращается клиенту, если это конечный результат.\n\n---\n\n### Ключевые компоненты и зависимости:\n- Внутренние атрибуты состояния (`state_attributes`): хранят текущее состояние системы, доступное для чтения и изменения.\n- Методы для выполнения конкретных действий (метод `perform_action`):\n - Вызывают соответствующие методы других компонентов или классов.\n \n### Пример использования:\n```python\n# Инициализация менеджера\nruntime_manager = RuntimeManager()\n\n# Выполнение действия с аргументами\nresult = runtime_manager.perform_action('action_name', arg1, arg2)\n```\n\n---\n\n### Заключение:\nКласс `RuntimeManager` играет ключевую роль в управлении состоянием и координацией выполнения этапов обработки данных в приложении. Его использование позволяет централизованно управлять потоком данных и обеспечивать согласованность состояния приложения на каждом этапе обработки." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 335, + "evidence_rows": 19, + "evidence_chars": 7949 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 8, + "unique_paths": 7 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 2 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_v1", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 6241 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091150/full_chain_plba_code_retrieval_plba-fullchain-explain-runtime-manager.md b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091150/full_chain_plba_code_retrieval_plba-fullchain-explain-runtime-manager.md new file mode 100644 index 0000000..fdb6206 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091150/full_chain_plba_code_retrieval_plba-fullchain-explain-runtime-manager.md @@ -0,0 +1,34 @@ +# plba-fullchain-explain-runtime-manager + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_retrieval.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Объясни как работает класс RuntimeManager + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 19, + "llm_answer": "## Анализ класса `RuntimeManager`\n\n### Файл и путь:\n`src/app_runtime/core/runtime.py`\n\n### Описание класса:\n**Класс:** `RuntimeManager`\n\n**Роль:** \n- Менеджер роли (pipeline_stage)\n- Оркестратор вызовов ролей (4)\n- Читает и записывает состояние атрибутов\n- Участвует в срезах потока данных (50)\n\n### Основные обязанности и ответственность:\n1. **Менеджер состояния**: Класс управляет состоянием системы и отвечает за его изменение при выполнении различных операций.\n \n2. **Оркестровка ролей**: Он координирует выполнение этапов обработки данных (roles) внутри конвейера (pipeline). Каждый этап выполняет определенную роль, например, чтение или запись состояний, обработку данных и т.д.\n\n3. **Чтение и запись состояний**: Класс поддерживает и обновляет внутренние состояния приложения через атрибуты объекта.\n\n4. **Участие в потоке данных**: Управление потоком данных происходит на уровне «срезов» (slices), что означает, что класс участвует в разделении и передаче данных между различными компонентами системы.\n\n---\n\n### Поток данных и архитектура:\n\n#### Входные данные\n- Данные поступают из внешнего источника или из предыдущего этапа конвейера.\n\n#### Логика работы:\n1. При инициализации экземпляра класса создаются начальные атрибуты состояния (`state_attributes`), которые представляют текущую информацию о системе.\n2. Для выполнения операций используется метод, принимающий внешние действия (`perform_action`) и аргументы для этих действий.\n - Пример метода: `perform_action(self, action_name, *args)`\n - В аргументах передаются имя действия и параметры, необходимые для этого действия.\n3. Внутри `perform_action` проверяется корректность входных параметров и вызывается соответствующая логика для выполнения нужного действия.\n4. После выполнения действия изменяется внутреннее состояние системы путем записи нового значения атрибута состояния.\n5. Информация передается следующему этапу конвейера.\n\n#### Выходные данные\n- Результат обработки передается дальше по конвейеру или возвращается клиенту, если это конечный результат.\n\n---\n\n### Ключевые компоненты и зависимости:\n- Внутренние атрибуты состояния (`state_attributes`): хранят текущее состояние системы, доступное для чтения и изменения.\n- Методы для выполнения конкретных действий (метод `perform_action`):\n - Вызывают соответствующие методы других компонентов или классов.\n \n### Пример использования:\n```python\n# Инициализация менеджера\nruntime_manager = RuntimeManager()\n\n# Выполнение действия с аргументами\nresult = runtime_manager.perform_action('action_name', arg1, arg2)\n```\n\n---\n\n### Заключение:\nКласс `RuntimeManager` играет ключевую роль в управлении состоянием и координацией выполнения этапов обработки данных в приложении. Его использование позволяет централизованно управлять потоком данных и обеспечивать согласованность состояния приложения на каждом этапе обработки.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091150/full_chain_plba_code_retrieval_plba-fullchain-explain-trace-service.json b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091150/full_chain_plba_code_retrieval_plba-fullchain-explain-trace-service.json new file mode 100644 index 0000000..c71dc59 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091150/full_chain_plba_code_retrieval_plba-fullchain-explain-trace-service.json @@ -0,0 +1,2684 @@ +{ + "case_id": "plba-fullchain-explain-trace-service", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_retrieval.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 21, + "llm_answer": "## Анализ архитектуры и поведения системы с участием `TraceService`\n\n### Описание роли и ответственности компонента\n\nВ системе предоставлены несколько компонентов, выполняющих роль pipeline stage и участвующих в управлении состоянием приложения и его данными. Рассмотрим подробнее один из них — **`TraceService`**.\n\n---\n\n### Поведение и архитектура `TraceService`\n\n#### 1. Место в общей архитектуре\n- `TraceService` является классом, производным от класса `TraceContextFactory`.\n- Класс предназначен для работы с контекстом трассировки (`trace context`), что позволяет отслеживать выполнение задач и событий в приложении.\n \n#### 2. Основные обязанности и ответственность\n- Название класса и суффикс «service» указывают на то, что он играет сервисную роль в системе.\n- Он участвует в обработке данных и их перемещении между различными компонентами (dataflow slices).\n- Имеет доступ к атрибутам состояния и может изменять их значение.\n\n#### 3. Участие в процессе выполнения запросов и управления данными\n- Класс взаимодействует с другими pipeline stages, такими как `UvicornThreadRunner`, `WorkflowPersistence`, `HttpControlChannel` и `InMemoryTaskQueue`. Эти компоненты совместно обеспечивают функционирование workflow и взаимодействие с внешним миром.\n\n---\n\n### Поток данных и логика обработки\n\n- Входные данные поступают через HTTP-запросы или другие каналы взаимодействия (например, запросы через очередь сообщений).\n- В рамках обработки запроса происходит создание контекста трассировки, который передается всем задействованным компонентам.\n- Контекст содержит информацию о запросе, включая идентификаторы, метаданные и другие параметры, необходимые для корректного отслеживания и логирования операций.\n- Все pipeline stages участвуют в передаче этих данных и обмениваются ими между собой, обеспечивая согласованность и целостность процесса.\n\n---\n\n### Примеры использования и вызовы методов\n\nДля лучшего понимания рассмотрим примерный сценарий взаимодействия компонентов:\n\n```python\n# Пример вызова сервиса trace service\nfrom app_runtime.tracing.service import TraceService\n\n# Создание экземпляра сервиса\ntrace_service = TraceService()\n\n# Обработка входных данных и получение контекста трассировки\ncontext = trace_service.get_trace_context(request_data)\n\n# Передача контекста другим pipeline stages\nuvicorn_thread_runner = UvicornThreadRunner()\nuvicorn_thread_runner.process_request(context)\n```\n\n---\n\n### Заключение\n\nТаким образом, **`TraceService`** представляет собой важный элемент системы, обеспечивающий централизованное управление контекстом трассировки и участие в потоках данных и состоянии приложения. Он активно взаимодействует с другими компонентами, обеспечивая корректное выполнение задач и передачу информации между ними.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "TraceService" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-fullchain-explain-trace-service", + "text": "Как работает TraceService?", + "mode": "full_chain", + "run_started_at": "2026-03-12T09:11:50", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Как работает TraceService?", + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "TraceService", + "alternatives": [ + "TraceService" + ], + "confidence": 0.99 + }, + "rag_count": 21, + "rag_rows": [ + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceService\nTraceService(TraceContextFactory)", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService", + "span_start": 39, + "span_end": 166, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "c2b2b976d99f2c600000b753731b26e0a69adcb4359398b93073590c5d5d04f4", + "qname": "TraceService", + "kind": "class", + "signature": "TraceService(TraceContextFactory)", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (13)", + "layer": "C4_SEMANTIC_ROLES", + "title": "TraceService", + "span_start": 39, + "span_end": 166, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 60, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "c2b2b976d99f2c600000b753731b26e0a69adcb4359398b93073590c5d5d04f4", + "symbol_name": "TraceService", + "qname": "TraceService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 13, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/queue/in_memory.py", + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)", + "layer": "C4_SEMANTIC_ROLES", + "title": "InMemoryTaskQueue", + "span_start": 9, + "span_end": 38, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 22, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "2da04cb94544a3bcbf0943a95ad4bdd8710bcafaa32a02fd0e4de2178dcf3533", + "symbol_name": "InMemoryTaskQueue", + "qname": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 9, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "58f0cc001ccda0eee4c6bc32ed83bd05eafd6b6644f1e8b4aa9eed3103db73dc", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "ConfigFileLoader\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (8)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ConfigFileLoader", + "span_start": 11, + "span_end": 48, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 23, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "a8474eca8b6e9dc86ae67ed68b16fa5fb639ef08739c053e7b7195489765667f", + "symbol_name": "ConfigFileLoader", + "qname": "ConfigFileLoader", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 8, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/store.py", + "content": "TraceContextStore\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "TraceContextStore", + "span_start": 15, + "span_end": 52, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b2dad4fbe16ffb11b58deba311c7739955c39d59f291b22181f33e9c8cce4059", + "symbol_name": "TraceContextStore", + "qname": "TraceContextStore", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "d369554f08fc92039c6edd5a2a1e73b23901533e8974459170bbd9347d263dc5", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workers/supervisor.py", + "content": "WorkerSupervisor\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkerSupervisor", + "span_start": 10, + "span_end": 59, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "c17b44e8d9e97d490989b21fa67d7c346cdda8a0472e4c41fb243c8846faa124", + "symbol_name": "WorkerSupervisor", + "qname": "WorkerSupervisor", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "77609d9d5927171cce7fc3a54897c183fd63068710c6362029b700937aae5eee", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.create_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 61, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3b052062067a78aef3302ee1d996897e02a67d1b340397bea4f59fe147c0492a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a", + "dst_ref": "TraceService.create_context", + "resolution": "resolved", + "slice_id": "3b052062067a78aef3302ee1d996897e02a67d1b340397bea4f59fe147c0492a", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.create_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.close_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 84, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "7a9353ef57c9ae5d19b3a0c6ac50fad05e6d21d31bbe1cd1cd07af6332ba6505", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "01e14158dcced7e52d0c8ac84ac7b9a75225c261b6aca6a1d7da802d0994721c", + "dst_ref": "TraceService.close_context", + "resolution": "resolved", + "slice_id": "7a9353ef57c9ae5d19b3a0c6ac50fad05e6d21d31bbe1cd1cd07af6332ba6505", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.close_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "01e14158dcced7e52d0c8ac84ac7b9a75225c261b6aca6a1d7da802d0994721c" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.open_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 78, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a6e13b9ebc4fed84586afd53ed92a4d14757e440873f572b2337d5622ee96031", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426", + "dst_ref": "TraceService.open_context", + "resolution": "resolved", + "slice_id": "a6e13b9ebc4fed84586afd53ed92a4d14757e440873f572b2337d5622ee96031", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.open_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.transport\n -> TraceService.__init__", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 41, + "span_end": 43, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "1e923a93faa05c3c43ca9b19bd047007a8589ccce57d3cc1798ae7f9f200af98", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "dst_ref": "TraceService.__init__", + "resolution": "resolved", + "slice_id": "1e923a93faa05c3c43ca9b19bd047007a8589ccce57d3cc1798ae7f9f200af98", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.transport", + "TraceService.__init__" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.current_trace_id", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 81, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3ea17138634b1190bded77ddb84aa1595124f6519b246f24fc4b02bd62b5cac1", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c", + "dst_ref": "TraceService.current_trace_id", + "resolution": "resolved", + "slice_id": "3ea17138634b1190bded77ddb84aa1595124f6519b246f24fc4b02bd62b5cac1", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.current_trace_id" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.step", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 88, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "9f34c5da9b09fba99df6f6b1bde183a9aeb45111b8218a747c71590c2c9f60f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "c44bfbc66cf747283f30088da3e011a10395031d41e77b74e523c24997f641ca", + "dst_ref": "TraceService.step", + "resolution": "resolved", + "slice_id": "9f34c5da9b09fba99df6f6b1bde183a9aeb45111b8218a747c71590c2c9f60f2", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.step" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "c44bfbc66cf747283f30088da3e011a10395031d41e77b74e523c24997f641ca" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceRecordWriter:\n def __init__(self, transport: TraceTransport) -> None:\n self._logger = logging.getLogger(__name__)\n self._transport = transport\n\n def write_context(self, record: TraceContextRecord) -> None:\n try:\n self._transport.write_context(record)\n except Exception:\n self._logger.exception(\"Trace transport failed to write context %s\", record.trace_id)\n\n def write_message(self, record: TraceLogMessage) -> None:\n try:\n self._transport.write_message(record)\n except Exception:\n self._logger.exception(\"Trace transport failed to write message for %s\", record.trace_id)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/tracing/service.py:TraceRecordWriter", + "span_start": 21, + "span_end": 36, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceService(TraceContextFactory):\n def __init__(self, transport: TraceTransport | None = None, store: TraceContextStore | None = None) -> None:\n self.transport = transport or NoOpTraceTransport()\n self.store = store or TraceContextStore()\n self._writer = TraceRecordWriter(self.transport)\n\n def create_context(\n self,\n *,\n alias: str,\n parent_id: str | None = None,\n kind: str | None = None,\n attrs: dict[str, Any] | None = None,\n ) -> str:\n record = TraceContextRecord(\n trace_id=uuid4().hex,\n alias=str(alias or \"\"),\n parent_id=parent_id,\n type=kind,\n event_time=utc_now(),\n attrs=dict(attrs or {}),\n )\n self.store.push(record)\n self._writer.write_context(record)\n return record.trace_id\n\n @contextmanager\n def open_context(\n self,\n *,\n alias: str,\n parent_id: str | None = None,\n kind: str | None = None,\n attrs: dict[str, Any] | None = None,\n ) -> Iterator[str]:\n trace_id = self.create_context(alias=alias, parent_id=parent_id, kind=kind, attrs=attrs)\n try:\n yield trace_id\n finally:\n self.store.pop()\n\n def current_trace_id(self) -> str | None:\n return self.store.current_trace_id()\n\n def close_context(self) -> str | None:\n previous = self.store.pop()\n return previous.record.trace_id if previous else None\n\n def step(self, name: str) -> None:\n self.store.set_step(str(name or \"\"))\n\n def info(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"INFO\", message, status, attrs)\n\n def debug(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"DEBUG\", message, status, attrs)\n\n def warning(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"WARNING\", message, status, attrs)\n\n def error(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"ERROR\", message, status, attrs)\n\n def exception(self, message: str, *, status: str = \"failed\", attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"ERROR\", message, status, attrs)\n\n def new_root(self, operation: str) -> TraceContext:\n trace_id = self.create_context(alias=operation, kind=\"operation\", attrs={\"operation\": operation})\n return TraceContext(trace_id=trace_id, span_id=trace_id, attributes={\"operation\": operation})\n\n def child_of(self, parent: TraceContext, operation: str) -> TraceContext:\n trace_id = self.create_context(\n alias=operation,\n parent_id=parent.trace_id,\n kind=\"worker\",\n attrs={\"operation\": operation},\n )\n return TraceContext(\n trace_id=trace_id,\n span_id=trace_id,\n parent_span_id=parent.span_id,\n attributes={\"operation\": operation},\n )\n\n def attach(self, metadata: dict[str, object], context: TraceContext) -> dict[str, object]:\n updated = dict(metadata)\n updated[\"trace_id\"] = context.trace_id\n updated[\"span_id\"] = context.span_id\n updated[\"parent_span_id\"] = context.parent_span_id\n return updated\n\n def resume(self, metadata: dict[str, object], operation: str) -> TraceContext:\n trace_id = str(metadata.get(\"trace_id\") or uuid4().hex)\n span_id = str(metadata.get(\"span_id\") or trace_id)\n parent_id = metadata.get(\"parent_span_id\")\n self.create_context(\n alias=operation,\n parent_id=str(parent_id) if parent_id else None,\n kind=\"worker\",\n attrs=dict(metadata),\n )\n return TraceContext(\n trace_id=trace_id,\n span_id=span_id,\n parent_span_id=str(parent_id) if parent_id else None,\n attributes={\"operation\": operation},\n )\n\n def _write_message(\n self,\n level: TraceLevel,\n message: str,\n status: str | None,\n attrs: dict[str, Any] | None,\n ) -> None:\n active = self.store.current()\n if active is None:\n raise RuntimeError(\"Trace context is not bound. Call create_context() first.\")\n record = TraceLogMessage(\n trace_id=active.record.trace_id,\n step=active.step,\n status=str(status or \"\"),\n message=str(message or \"\"),\n level=level,\n event_time=utc_now(),\n attrs=dict(attrs or {}),\n )\n self._writer.write_message(record)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/tracing/service.py:TraceService", + "span_start": 39, + "span_end": 166, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceManager(TraceService):\n \"\"\"Compatibility alias during the transition from ConfigManager-shaped naming.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/tracing/service.py:TraceManager", + "span_start": 169, + "span_end": 170, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 2, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "## Анализ архитектуры и поведения системы с участием `TraceService`\n\n### Описание роли и ответственности компонента\n\nВ системе предоставлены несколько компонентов, выполняющих роль pipeline stage и участвующих в управлении состоянием приложения и его данными. Рассмотрим подробнее один из них — **`TraceService`**.\n\n---\n\n### Поведение и архитектура `TraceService`\n\n#### 1. Место в общей архитектуре\n- `TraceService` является классом, производным от класса `TraceContextFactory`.\n- Класс предназначен для работы с контекстом трассировки (`trace context`), что позволяет отслеживать выполнение задач и событий в приложении.\n \n#### 2. Основные обязанности и ответственность\n- Название класса и суффикс «service» указывают на то, что он играет сервисную роль в системе.\n- Он участвует в обработке данных и их перемещении между различными компонентами (dataflow slices).\n- Имеет доступ к атрибутам состояния и может изменять их значение.\n\n#### 3. Участие в процессе выполнения запросов и управления данными\n- Класс взаимодействует с другими pipeline stages, такими как `UvicornThreadRunner`, `WorkflowPersistence`, `HttpControlChannel` и `InMemoryTaskQueue`. Эти компоненты совместно обеспечивают функционирование workflow и взаимодействие с внешним миром.\n\n---\n\n### Поток данных и логика обработки\n\n- Входные данные поступают через HTTP-запросы или другие каналы взаимодействия (например, запросы через очередь сообщений).\n- В рамках обработки запроса происходит создание контекста трассировки, который передается всем задействованным компонентам.\n- Контекст содержит информацию о запросе, включая идентификаторы, метаданные и другие параметры, необходимые для корректного отслеживания и логирования операций.\n- Все pipeline stages участвуют в передаче этих данных и обмениваются ими между собой, обеспечивая согласованность и целостность процесса.\n\n---\n\n### Примеры использования и вызовы методов\n\nДля лучшего понимания рассмотрим примерный сценарий взаимодействия компонентов:\n\n```python\n# Пример вызова сервиса trace service\nfrom app_runtime.tracing.service import TraceService\n\n# Создание экземпляра сервиса\ntrace_service = TraceService()\n\n# Обработка входных данных и получение контекста трассировки\ncontext = trace_service.get_trace_context(request_data)\n\n# Передача контекста другим pipeline stages\nuvicorn_thread_runner = UvicornThreadRunner()\nuvicorn_thread_runner.process_request(context)\n```\n\n---\n\n### Заключение\n\nТаким образом, **`TraceService`** представляет собой важный элемент системы, обеспечивающий централизованное управление контекстом трассировки и участие в потоках данных и состоянии приложения. Он активно взаимодействует с другими компонентами, обеспечивая корректное выполнение задач и передачу информации между ними.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS", + "C4_SEMANTIC_ROLES" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "TraceService" + ], + "keyword_hints": [ + "TraceService" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "TraceService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Как работает TraceService?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "Как работает TraceService?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Как работает TraceService?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "Как работает TraceService?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "TraceService", + "alternatives": [ + "TraceService" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 8, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 1, + "symbol_resolution": 0, + "retrieval_total": 150, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 50, + "C0_SOURCE_CHUNKS": 21, + "C4_SEMANTIC_ROLES": 17, + "C2_DEPENDENCY_GRAPH": 48, + "C3_ENTRYPOINTS": 11 + }, + "merge_rank": 24, + "prompt_build": 0, + "llm_call": 5616 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 371, + "evidence_rows": 21, + "evidence_chars": 7281 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 8, + "unique_paths": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 1 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 3, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_v1", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "TraceService" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 21, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-fullchain-explain-trace-service", + "mode": "full_chain", + "run_started_at": "2026-03-12T09:11:50", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Как работает TraceService?", + "normalized_query": "Как работает TraceService?" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Как работает TraceService?" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Как работает TraceService?" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "TraceService" + ], + "keyword_hints": [ + "TraceService" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 1 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Как работает TraceService?" + }, + "output": { + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "TraceService", + "alternatives": [ + "TraceService" + ], + "confidence": 0.99 + }, + "rag_count": 21, + "rag_rows": [ + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceService\nTraceService(TraceContextFactory)", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService", + "span_start": 39, + "span_end": 166, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "c2b2b976d99f2c600000b753731b26e0a69adcb4359398b93073590c5d5d04f4", + "qname": "TraceService", + "kind": "class", + "signature": "TraceService(TraceContextFactory)", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (13)", + "layer": "C4_SEMANTIC_ROLES", + "title": "TraceService", + "span_start": 39, + "span_end": 166, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 60, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "c2b2b976d99f2c600000b753731b26e0a69adcb4359398b93073590c5d5d04f4", + "symbol_name": "TraceService", + "qname": "TraceService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 13, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/queue/in_memory.py", + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)", + "layer": "C4_SEMANTIC_ROLES", + "title": "InMemoryTaskQueue", + "span_start": 9, + "span_end": 38, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 22, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "2da04cb94544a3bcbf0943a95ad4bdd8710bcafaa32a02fd0e4de2178dcf3533", + "symbol_name": "InMemoryTaskQueue", + "qname": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 9, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "58f0cc001ccda0eee4c6bc32ed83bd05eafd6b6644f1e8b4aa9eed3103db73dc", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "ConfigFileLoader\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (8)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ConfigFileLoader", + "span_start": 11, + "span_end": 48, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 23, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "a8474eca8b6e9dc86ae67ed68b16fa5fb639ef08739c053e7b7195489765667f", + "symbol_name": "ConfigFileLoader", + "qname": "ConfigFileLoader", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 8, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/store.py", + "content": "TraceContextStore\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "TraceContextStore", + "span_start": 15, + "span_end": 52, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b2dad4fbe16ffb11b58deba311c7739955c39d59f291b22181f33e9c8cce4059", + "symbol_name": "TraceContextStore", + "qname": "TraceContextStore", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "d369554f08fc92039c6edd5a2a1e73b23901533e8974459170bbd9347d263dc5", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workers/supervisor.py", + "content": "WorkerSupervisor\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkerSupervisor", + "span_start": 10, + "span_end": 59, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "c17b44e8d9e97d490989b21fa67d7c346cdda8a0472e4c41fb243c8846faa124", + "symbol_name": "WorkerSupervisor", + "qname": "WorkerSupervisor", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "77609d9d5927171cce7fc3a54897c183fd63068710c6362029b700937aae5eee", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.create_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 61, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3b052062067a78aef3302ee1d996897e02a67d1b340397bea4f59fe147c0492a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a", + "dst_ref": "TraceService.create_context", + "resolution": "resolved", + "slice_id": "3b052062067a78aef3302ee1d996897e02a67d1b340397bea4f59fe147c0492a", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.create_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.close_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 84, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "7a9353ef57c9ae5d19b3a0c6ac50fad05e6d21d31bbe1cd1cd07af6332ba6505", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "01e14158dcced7e52d0c8ac84ac7b9a75225c261b6aca6a1d7da802d0994721c", + "dst_ref": "TraceService.close_context", + "resolution": "resolved", + "slice_id": "7a9353ef57c9ae5d19b3a0c6ac50fad05e6d21d31bbe1cd1cd07af6332ba6505", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.close_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "01e14158dcced7e52d0c8ac84ac7b9a75225c261b6aca6a1d7da802d0994721c" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.open_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 78, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a6e13b9ebc4fed84586afd53ed92a4d14757e440873f572b2337d5622ee96031", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426", + "dst_ref": "TraceService.open_context", + "resolution": "resolved", + "slice_id": "a6e13b9ebc4fed84586afd53ed92a4d14757e440873f572b2337d5622ee96031", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.open_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.transport\n -> TraceService.__init__", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 41, + "span_end": 43, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "1e923a93faa05c3c43ca9b19bd047007a8589ccce57d3cc1798ae7f9f200af98", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "dst_ref": "TraceService.__init__", + "resolution": "resolved", + "slice_id": "1e923a93faa05c3c43ca9b19bd047007a8589ccce57d3cc1798ae7f9f200af98", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.transport", + "TraceService.__init__" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.current_trace_id", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 81, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3ea17138634b1190bded77ddb84aa1595124f6519b246f24fc4b02bd62b5cac1", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c", + "dst_ref": "TraceService.current_trace_id", + "resolution": "resolved", + "slice_id": "3ea17138634b1190bded77ddb84aa1595124f6519b246f24fc4b02bd62b5cac1", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.current_trace_id" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.step", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 88, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "9f34c5da9b09fba99df6f6b1bde183a9aeb45111b8218a747c71590c2c9f60f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "c44bfbc66cf747283f30088da3e011a10395031d41e77b74e523c24997f641ca", + "dst_ref": "TraceService.step", + "resolution": "resolved", + "slice_id": "9f34c5da9b09fba99df6f6b1bde183a9aeb45111b8218a747c71590c2c9f60f2", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.step" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "c44bfbc66cf747283f30088da3e011a10395031d41e77b74e523c24997f641ca" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceRecordWriter:\n def __init__(self, transport: TraceTransport) -> None:\n self._logger = logging.getLogger(__name__)\n self._transport = transport\n\n def write_context(self, record: TraceContextRecord) -> None:\n try:\n self._transport.write_context(record)\n except Exception:\n self._logger.exception(\"Trace transport failed to write context %s\", record.trace_id)\n\n def write_message(self, record: TraceLogMessage) -> None:\n try:\n self._transport.write_message(record)\n except Exception:\n self._logger.exception(\"Trace transport failed to write message for %s\", record.trace_id)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/tracing/service.py:TraceRecordWriter", + "span_start": 21, + "span_end": 36, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceService(TraceContextFactory):\n def __init__(self, transport: TraceTransport | None = None, store: TraceContextStore | None = None) -> None:\n self.transport = transport or NoOpTraceTransport()\n self.store = store or TraceContextStore()\n self._writer = TraceRecordWriter(self.transport)\n\n def create_context(\n self,\n *,\n alias: str,\n parent_id: str | None = None,\n kind: str | None = None,\n attrs: dict[str, Any] | None = None,\n ) -> str:\n record = TraceContextRecord(\n trace_id=uuid4().hex,\n alias=str(alias or \"\"),\n parent_id=parent_id,\n type=kind,\n event_time=utc_now(),\n attrs=dict(attrs or {}),\n )\n self.store.push(record)\n self._writer.write_context(record)\n return record.trace_id\n\n @contextmanager\n def open_context(\n self,\n *,\n alias: str,\n parent_id: str | None = None,\n kind: str | None = None,\n attrs: dict[str, Any] | None = None,\n ) -> Iterator[str]:\n trace_id = self.create_context(alias=alias, parent_id=parent_id, kind=kind, attrs=attrs)\n try:\n yield trace_id\n finally:\n self.store.pop()\n\n def current_trace_id(self) -> str | None:\n return self.store.current_trace_id()\n\n def close_context(self) -> str | None:\n previous = self.store.pop()\n return previous.record.trace_id if previous else None\n\n def step(self, name: str) -> None:\n self.store.set_step(str(name or \"\"))\n\n def info(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"INFO\", message, status, attrs)\n\n def debug(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"DEBUG\", message, status, attrs)\n\n def warning(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"WARNING\", message, status, attrs)\n\n def error(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"ERROR\", message, status, attrs)\n\n def exception(self, message: str, *, status: str = \"failed\", attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"ERROR\", message, status, attrs)\n\n def new_root(self, operation: str) -> TraceContext:\n trace_id = self.create_context(alias=operation, kind=\"operation\", attrs={\"operation\": operation})\n return TraceContext(trace_id=trace_id, span_id=trace_id, attributes={\"operation\": operation})\n\n def child_of(self, parent: TraceContext, operation: str) -> TraceContext:\n trace_id = self.create_context(\n alias=operation,\n parent_id=parent.trace_id,\n kind=\"worker\",\n attrs={\"operation\": operation},\n )\n return TraceContext(\n trace_id=trace_id,\n span_id=trace_id,\n parent_span_id=parent.span_id,\n attributes={\"operation\": operation},\n )\n\n def attach(self, metadata: dict[str, object], context: TraceContext) -> dict[str, object]:\n updated = dict(metadata)\n updated[\"trace_id\"] = context.trace_id\n updated[\"span_id\"] = context.span_id\n updated[\"parent_span_id\"] = context.parent_span_id\n return updated\n\n def resume(self, metadata: dict[str, object], operation: str) -> TraceContext:\n trace_id = str(metadata.get(\"trace_id\") or uuid4().hex)\n span_id = str(metadata.get(\"span_id\") or trace_id)\n parent_id = metadata.get(\"parent_span_id\")\n self.create_context(\n alias=operation,\n parent_id=str(parent_id) if parent_id else None,\n kind=\"worker\",\n attrs=dict(metadata),\n )\n return TraceContext(\n trace_id=trace_id,\n span_id=span_id,\n parent_span_id=str(parent_id) if parent_id else None,\n attributes={\"operation\": operation},\n )\n\n def _write_message(\n self,\n level: TraceLevel,\n message: str,\n status: str | None,\n attrs: dict[str, Any] | None,\n ) -> None:\n active = self.store.current()\n if active is None:\n raise RuntimeError(\"Trace context is not bound. Call create_context() first.\")\n record = TraceLogMessage(\n trace_id=active.record.trace_id,\n step=active.step,\n status=str(status or \"\"),\n message=str(message or \"\"),\n level=level,\n event_time=utc_now(),\n attrs=dict(attrs or {}),\n )\n self._writer.write_message(record)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/tracing/service.py:TraceService", + "span_start": 39, + "span_end": 166, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceManager(TraceService):\n \"\"\"Compatibility alias during the transition from ConfigManager-shaped naming.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/tracing/service.py:TraceManager", + "span_start": 169, + "span_end": 170, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 2, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "TraceService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Как работает TraceService?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "Как работает TraceService?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Как работает TraceService?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "Как работает TraceService?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "TraceService", + "alternatives": [ + "TraceService" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 8, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 150, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 50, + "C0_SOURCE_CHUNKS": 21, + "C4_SEMANTIC_ROLES": 17, + "C2_DEPENDENCY_GRAPH": 48, + "C3_ENTRYPOINTS": 11 + }, + "merge_rank": 24 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Как работает TraceService?", + "rag_count": 21 + }, + "output": { + "llm_answer": "## Анализ архитектуры и поведения системы с участием `TraceService`\n\n### Описание роли и ответственности компонента\n\nВ системе предоставлены несколько компонентов, выполняющих роль pipeline stage и участвующих в управлении состоянием приложения и его данными. Рассмотрим подробнее один из них — **`TraceService`**.\n\n---\n\n### Поведение и архитектура `TraceService`\n\n#### 1. Место в общей архитектуре\n- `TraceService` является классом, производным от класса `TraceContextFactory`.\n- Класс предназначен для работы с контекстом трассировки (`trace context`), что позволяет отслеживать выполнение задач и событий в приложении.\n \n#### 2. Основные обязанности и ответственность\n- Название класса и суффикс «service» указывают на то, что он играет сервисную роль в системе.\n- Он участвует в обработке данных и их перемещении между различными компонентами (dataflow slices).\n- Имеет доступ к атрибутам состояния и может изменять их значение.\n\n#### 3. Участие в процессе выполнения запросов и управления данными\n- Класс взаимодействует с другими pipeline stages, такими как `UvicornThreadRunner`, `WorkflowPersistence`, `HttpControlChannel` и `InMemoryTaskQueue`. Эти компоненты совместно обеспечивают функционирование workflow и взаимодействие с внешним миром.\n\n---\n\n### Поток данных и логика обработки\n\n- Входные данные поступают через HTTP-запросы или другие каналы взаимодействия (например, запросы через очередь сообщений).\n- В рамках обработки запроса происходит создание контекста трассировки, который передается всем задействованным компонентам.\n- Контекст содержит информацию о запросе, включая идентификаторы, метаданные и другие параметры, необходимые для корректного отслеживания и логирования операций.\n- Все pipeline stages участвуют в передаче этих данных и обмениваются ими между собой, обеспечивая согласованность и целостность процесса.\n\n---\n\n### Примеры использования и вызовы методов\n\nДля лучшего понимания рассмотрим примерный сценарий взаимодействия компонентов:\n\n```python\n# Пример вызова сервиса trace service\nfrom app_runtime.tracing.service import TraceService\n\n# Создание экземпляра сервиса\ntrace_service = TraceService()\n\n# Обработка входных данных и получение контекста трассировки\ncontext = trace_service.get_trace_context(request_data)\n\n# Передача контекста другим pipeline stages\nuvicorn_thread_runner = UvicornThreadRunner()\nuvicorn_thread_runner.process_request(context)\n```\n\n---\n\n### Заключение\n\nТаким образом, **`TraceService`** представляет собой важный элемент системы, обеспечивающий централизованное управление контекстом трассировки и участие в потоках данных и состоянии приложения. Он активно взаимодействует с другими компонентами, обеспечивая корректное выполнение задач и передачу информации между ними." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 371, + "evidence_rows": 21, + "evidence_chars": 7281 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 8, + "unique_paths": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 1 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 3, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_v1", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 5616 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091150/full_chain_plba_code_retrieval_plba-fullchain-explain-trace-service.md b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091150/full_chain_plba_code_retrieval_plba-fullchain-explain-trace-service.md new file mode 100644 index 0000000..c6573ba --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091150/full_chain_plba_code_retrieval_plba-fullchain-explain-trace-service.md @@ -0,0 +1,34 @@ +# plba-fullchain-explain-trace-service + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_retrieval.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Как работает TraceService? + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 21, + "llm_answer": "## Анализ архитектуры и поведения системы с участием `TraceService`\n\n### Описание роли и ответственности компонента\n\nВ системе предоставлены несколько компонентов, выполняющих роль pipeline stage и участвующих в управлении состоянием приложения и его данными. Рассмотрим подробнее один из них — **`TraceService`**.\n\n---\n\n### Поведение и архитектура `TraceService`\n\n#### 1. Место в общей архитектуре\n- `TraceService` является классом, производным от класса `TraceContextFactory`.\n- Класс предназначен для работы с контекстом трассировки (`trace context`), что позволяет отслеживать выполнение задач и событий в приложении.\n \n#### 2. Основные обязанности и ответственность\n- Название класса и суффикс «service» указывают на то, что он играет сервисную роль в системе.\n- Он участвует в обработке данных и их перемещении между различными компонентами (dataflow slices).\n- Имеет доступ к атрибутам состояния и может изменять их значение.\n\n#### 3. Участие в процессе выполнения запросов и управления данными\n- Класс взаимодействует с другими pipeline stages, такими как `UvicornThreadRunner`, `WorkflowPersistence`, `HttpControlChannel` и `InMemoryTaskQueue`. Эти компоненты совместно обеспечивают функционирование workflow и взаимодействие с внешним миром.\n\n---\n\n### Поток данных и логика обработки\n\n- Входные данные поступают через HTTP-запросы или другие каналы взаимодействия (например, запросы через очередь сообщений).\n- В рамках обработки запроса происходит создание контекста трассировки, который передается всем задействованным компонентам.\n- Контекст содержит информацию о запросе, включая идентификаторы, метаданные и другие параметры, необходимые для корректного отслеживания и логирования операций.\n- Все pipeline stages участвуют в передаче этих данных и обмениваются ими между собой, обеспечивая согласованность и целостность процесса.\n\n---\n\n### Примеры использования и вызовы методов\n\nДля лучшего понимания рассмотрим примерный сценарий взаимодействия компонентов:\n\n```python\n# Пример вызова сервиса trace service\nfrom app_runtime.tracing.service import TraceService\n\n# Создание экземпляра сервиса\ntrace_service = TraceService()\n\n# Обработка входных данных и получение контекста трассировки\ncontext = trace_service.get_trace_context(request_data)\n\n# Передача контекста другим pipeline stages\nuvicorn_thread_runner = UvicornThreadRunner()\nuvicorn_thread_runner.process_request(context)\n```\n\n---\n\n### Заключение\n\nТаким образом, **`TraceService`** представляет собой важный элемент системы, обеспечивающий централизованное управление контекстом трассировки и участие в потоках данных и состоянии приложения. Он активно взаимодействует с другими компонентами, обеспечивая корректное выполнение задач и передачу информации между ними.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "TraceService" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091150/full_chain_plba_code_retrieval_plba-fullchain-explain-workflow-engine.json b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091150/full_chain_plba_code_retrieval_plba-fullchain-explain-workflow-engine.json new file mode 100644 index 0000000..409601d --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091150/full_chain_plba_code_retrieval_plba-fullchain-explain-workflow-engine.json @@ -0,0 +1,2634 @@ +{ + "case_id": "plba-fullchain-explain-workflow-engine", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_retrieval.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 20, + "llm_answer": "## Архитектура и Поведение `WorkflowEngine`\n\n### Описание класса `WorkflowEngine` (`src/app_runtime/workflow/engine/workflow_engine.py`)\n\n**Класс:** \n`WorkflowEngine`\n\n**Роль:** \n`pipeline_stage`\n\n**Ответственности:** \n- Чтение и запись атрибутов состояния.\n- Участие в срезах данных потока (dataflow slices).\n\n---\n\n### Поток данных и структура работы\n\n1. **Входные данные**\n - Данные передаются через состояние приложения или из внешних источников (например, REST API вызовов).\n \n2. **Основная логика работы `WorkflowEngine`:**\n 1. Принимает входные данные (через чтение атрибутов состояния).\n 2. Определяет текущее состояние системы на основе этих данных.\n 3. Использует внутренние механизмы для разрешения переходов между этапами выполнения workflow.\n 4. Записывает новое состояние после обработки.\n\n3. **Связь с другими сущностями:**\n - **WorkflowEngineHooks:** \n Класс отвечает за определение стандартного поведения модели, используемой внутри workflow engine. В основном он выполняет действия по умолчанию, которые могут быть переопределены пользователем.\n \n - **TransitionResolver:** \n Используется для определения правил перехода между различными стадиями workflow. Этот механизм решает, как именно должны выполняться шаги workflow и какие условия их активируют.\n\n4. **Участие в потоках данных (dataflow slices):**\n - **Dataflow Slices (6):** \n Срезы данных обеспечивают возможность параллельного выполнения различных частей workflow одновременно, что улучшает производительность системы.\n - **Dataflow Slices (24):** \n Другой набор параллельных потоков, организованных через `UvicornThreadRunner`, обеспечивает параллельность выполнения HTTP-запросов и других асинхронных задач.\n\n5. **Пример взаимодействия с внешними компонентами:**\n - Работа через внешние HTTP вызовы (`UvicornThreadRunner`) позволяет запускать различные задачи параллельно и возвращать результаты обратно в систему workflow.\n\n---\n\n### Ключевые моменты реализации:\n\n- `WorkflowEngine` выступает центральным элементом всей логики workflow и координирует выполнение этапов.\n- Все этапы определяются через правила перехода (`TransitionResolver`), которые помогают системе двигаться от одного этапа к другому.\n- Использование срезов данных и параллелизма (6 и 24 потоков) позволяет оптимизировать обработку и улучшить общую производительность.\n\n---\n\n### Заключение\n\n`WorkflowEngine` является ключевым компонентом системы управления workflow, отвечающим за координацию и управление процессом выполнения шагов workflow. Он взаимодействует с различными модулями, такими как `WorkflowEngineHooks` и `TransitionResolver`, обеспечивая корректное выполнение всех необходимых действий. Параллельная обработка (до 24 потоков) и четкая структура правил перехода делают этот подход эффективным и масштабируемым решением.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "WorkflowEngine" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-fullchain-explain-workflow-engine", + "text": "Объясни класс WorkflowEngine", + "mode": "full_chain", + "run_started_at": "2026-03-12T09:11:50", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни класс WorkflowEngine", + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "WorkflowEngine", + "alternatives": [ + "WorkflowEngine", + "WorkflowEngineHooks" + ], + "confidence": 0.99 + }, + "rag_count": 20, + "rag_rows": [ + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "class WorkflowEngine\nWorkflowEngine", + "layer": "C1_SYMBOL_CATALOG", + "title": "WorkflowEngine", + "span_start": 10, + "span_end": 86, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "57ec0a9f11c542c78e008684a888397e8d9ef4223671acb2567e631a0cbc70b4", + "qname": "WorkflowEngine", + "kind": "class", + "signature": "WorkflowEngine", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.workflow.engine.workflow_engine", + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/hooks.py", + "content": "class WorkflowEngineHooks\nWorkflowEngineHooks", + "layer": "C1_SYMBOL_CATALOG", + "title": "WorkflowEngineHooks", + "span_start": 6, + "span_end": 14, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "914123ed510540061e116100fc87bba4195595ba696f8bfde2fd77ac6a5cd7e4", + "qname": "WorkflowEngineHooks", + "kind": "class", + "signature": "WorkflowEngineHooks", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.workflow.engine.hooks", + "is_test": false, + "blob_sha": "4b11672b0a9af1ae04bfce9d8e1f96572997d3e65e68108d7c797b88fa5fa47a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowEngine", + "span_start": 10, + "span_end": 86, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "57ec0a9f11c542c78e008684a888397e8d9ef4223671acb2567e631a0cbc70b4", + "symbol_name": "WorkflowEngine", + "qname": "WorkflowEngine", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/hooks.py", + "content": "WorkflowEngineHooks\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowEngineHooks", + "span_start": 6, + "span_end": 14, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "914123ed510540061e116100fc87bba4195595ba696f8bfde2fd77ac6a5cd7e4", + "symbol_name": "WorkflowEngineHooks", + "qname": "WorkflowEngineHooks", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "4b11672b0a9af1ae04bfce9d8e1f96572997d3e65e68108d7c797b88fa5fa47a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/transition_resolver.py", + "content": "TransitionResolver\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "TransitionResolver", + "span_start": 7, + "span_end": 9, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "d1979f0b23d354338debf7771373226833d57c1e7830ce66ca0b82cdf209b958", + "symbol_name": "TransitionResolver", + "qname": "TransitionResolver", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "2c518f4c77fb5dcc2970b88f55a7b121d05959578fb0d196af92ff5193574838", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/queue/in_memory.py", + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)", + "layer": "C4_SEMANTIC_ROLES", + "title": "InMemoryTaskQueue", + "span_start": 9, + "span_end": 38, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 22, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "2da04cb94544a3bcbf0943a95ad4bdd8710bcafaa32a02fd0e4de2178dcf3533", + "symbol_name": "InMemoryTaskQueue", + "qname": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 9, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "58f0cc001ccda0eee4c6bc32ed83bd05eafd6b6644f1e8b4aa9eed3103db73dc", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "ConfigFileLoader\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (8)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ConfigFileLoader", + "span_start": 11, + "span_end": 48, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 23, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "a8474eca8b6e9dc86ae67ed68b16fa5fb639ef08739c053e7b7195489765667f", + "symbol_name": "ConfigFileLoader", + "qname": "ConfigFileLoader", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 8, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine.__init__\n -> WorkflowEngine._transition_resolver\n -> WorkflowEngine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowEngine.__init__:dataflow_slice", + "span_start": 14, + "span_end": 63, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3abf07e5c245e0fe59785ba2d569c2ee56018715fc7f625a044ddaf6201f903d", + "edge_type": "dataflow_slice", + "src_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "src_qname": "WorkflowEngine.__init__", + "dst_symbol_id": "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8", + "dst_ref": "WorkflowEngine.run", + "resolution": "resolved", + "slice_id": "3abf07e5c245e0fe59785ba2d569c2ee56018715fc7f625a044ddaf6201f903d", + "root_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "path_symbols": [ + "WorkflowEngine.__init__", + "WorkflowEngine._transition_resolver", + "WorkflowEngine.run" + ], + "path_symbol_ids": [ + "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine.__init__\n -> WorkflowEngine._hooks\n -> WorkflowEngine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowEngine.__init__:dataflow_slice", + "span_start": 16, + "span_end": 34, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d73db644b69c1eb35afd6eae9d6ac8674e49e30e9bcf9c020f9fdbfe754851b2", + "edge_type": "dataflow_slice", + "src_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "src_qname": "WorkflowEngine.__init__", + "dst_symbol_id": "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8", + "dst_ref": "WorkflowEngine.run", + "resolution": "resolved", + "slice_id": "d73db644b69c1eb35afd6eae9d6ac8674e49e30e9bcf9c020f9fdbfe754851b2", + "root_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "path_symbols": [ + "WorkflowEngine.__init__", + "WorkflowEngine._hooks", + "WorkflowEngine.run" + ], + "path_symbol_ids": [ + "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine.__init__\n -> WorkflowEngine._workflow\n -> WorkflowEngine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowEngine.__init__:dataflow_slice", + "span_start": 12, + "span_end": 29, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "b45ef3c54669b4910a8aed3a565804f275424a24007bc7e3c953389521f80249", + "edge_type": "dataflow_slice", + "src_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "src_qname": "WorkflowEngine.__init__", + "dst_symbol_id": "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8", + "dst_ref": "WorkflowEngine.run", + "resolution": "resolved", + "slice_id": "b45ef3c54669b4910a8aed3a565804f275424a24007bc7e3c953389521f80249", + "root_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "path_symbols": [ + "WorkflowEngine.__init__", + "WorkflowEngine._workflow", + "WorkflowEngine.run" + ], + "path_symbol_ids": [ + "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine.__init__\n -> WorkflowEngine._persistence\n -> WorkflowEngine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowEngine.__init__:dataflow_slice", + "span_start": 13, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "8101338770016324ce05d61daa9935a444c75e6c94a0fae4275d5b50fcbcc70b", + "edge_type": "dataflow_slice", + "src_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "src_qname": "WorkflowEngine.__init__", + "dst_symbol_id": "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8", + "dst_ref": "WorkflowEngine.run", + "resolution": "resolved", + "slice_id": "8101338770016324ce05d61daa9935a444c75e6c94a0fae4275d5b50fcbcc70b", + "root_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "path_symbols": [ + "WorkflowEngine.__init__", + "WorkflowEngine._persistence", + "WorkflowEngine.run" + ], + "path_symbol_ids": [ + "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine.__init__\n -> WorkflowEngine._traces\n -> WorkflowEngine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowEngine.__init__:dataflow_slice", + "span_start": 15, + "span_end": 27, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "5006266616d534d721648391565e2ac0c9e7e9d9f8df00c17fba8989afb533a5", + "edge_type": "dataflow_slice", + "src_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "src_qname": "WorkflowEngine.__init__", + "dst_symbol_id": "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8", + "dst_ref": "WorkflowEngine.run", + "resolution": "resolved", + "slice_id": "5006266616d534d721648391565e2ac0c9e7e9d9f8df00c17fba8989afb533a5", + "root_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "path_symbols": [ + "WorkflowEngine.__init__", + "WorkflowEngine._traces", + "WorkflowEngine.run" + ], + "path_symbol_ids": [ + "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine.__init__\n -> WorkflowEngine._logger\n -> WorkflowEngine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowEngine.__init__:dataflow_slice", + "span_start": 17, + "span_end": 85, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "2f9927abb24794adb056b94bfb5d8538a5cbafb160da2079f52fca97fd694a2b", + "edge_type": "dataflow_slice", + "src_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "src_qname": "WorkflowEngine.__init__", + "dst_symbol_id": "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8", + "dst_ref": "WorkflowEngine.run", + "resolution": "resolved", + "slice_id": "2f9927abb24794adb056b94bfb5d8538a5cbafb160da2079f52fca97fd694a2b", + "root_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "path_symbols": [ + "WorkflowEngine.__init__", + "WorkflowEngine._logger", + "WorkflowEngine.run" + ], + "path_symbol_ids": [ + "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "class WorkflowEngine:\n def __init__(self, workflow, persistence, *, traces, hooks: WorkflowEngineHooks | None = None) -> None:\n self._workflow = workflow\n self._persistence = persistence\n self._transition_resolver = TransitionResolver()\n self._traces = traces\n self._hooks = hooks or WorkflowEngineHooks()\n self._logger = logging.getLogger(__name__)\n\n def run(self, context: WorkflowContext) -> dict[str, object]:\n run_id = self._persistence.start_run(\n self._workflow.definition.name,\n self._workflow.definition.start_at,\n context.snapshot(),\n )\n context.state.setdefault(\"runtime\", {})\n context.state[\"runtime\"][\"workflow_run_id\"] = run_id\n self._traces.step(\"workflow\")\n self._traces.info(\"Workflow started.\", status=\"started\", attrs={\"workflow_run_id\": run_id})\n current_name = self._workflow.definition.start_at\n while current_name is not None:\n node = self._workflow.definition.nodes[current_name]\n context.state[\"runtime\"][\"current_node\"] = current_name\n self._logger.info(\"Workflow run %s: step '%s' started.\", run_id, current_name)\n self._hooks.on_step_started(context, current_name)\n self._persistence.start_step(run_id, current_name, context.snapshot())\n self._traces.step(current_name)\n self._traces.debug(\n f\"Step '{current_name}' started.\",\n status=\"started\",\n attrs={\"workflow_run_id\": run_id, \"node\": current_name},\n )\n try:\n result = node.step.run(context)\n except Exception as error:\n self._persistence.fail_step(run_id, current_name, context.snapshot(), error)\n self._persistence.fail_run(run_id, context.snapshot())\n self._traces.error(\n f\"Step '{current_name}' failed: {error}\",\n status=\"failed\",\n attrs={\"exception_type\": type(error).__name__},\n )\n self._logger.exception(\"Workflow run %s: step '%s' failed.\", run_id, current_name)\n self._hooks.on_step_failed(context, current_name)\n raise\n context.state.update(result.updates)\n self._persistence.complete_step(\n run_id,\n current_name,\n result.status,\n result.transition,\n context.snapshot(),\n )\n next_node = self._transition_resolver.resolve(node, result)\n self._traces.debug(\n f\"Step '{current_name}' completed with transition '{result.transition}'.\",\n status=result.status,\n attrs={\n \"workflow_run_id\": run_id,\n \"from_node\": current_name,\n \"transition\": result.transition,\n \"to_node\": next_node,\n },\n )\n self._logger.info(\n \"Workflow run %s: step '%s' completed with transition '%s'.\",\n run_id,\n current_name,\n result.transition,\n )\n self._hooks.on_step_finished(context, current_name)\n current_name = next_node\n self._persistence.complete_run(run_id, context.snapshot())\n self._traces.step(\"workflow\")\n self._traces.info(\"Workflow completed.\", status=\"completed\", attrs={\"workflow_run_id\": run_id})\n self._logger.info(\"Workflow run %s completed.\", run_id)\n return {\"run_id\": run_id, \"status\": \"completed\", \"context\": context.snapshot()}", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/workflow/engine/workflow_engine.py:WorkflowEngine", + "span_start": 10, + "span_end": 86, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.workflow.engine.workflow_engine", + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "## Архитектура и Поведение `WorkflowEngine`\n\n### Описание класса `WorkflowEngine` (`src/app_runtime/workflow/engine/workflow_engine.py`)\n\n**Класс:** \n`WorkflowEngine`\n\n**Роль:** \n`pipeline_stage`\n\n**Ответственности:** \n- Чтение и запись атрибутов состояния.\n- Участие в срезах данных потока (dataflow slices).\n\n---\n\n### Поток данных и структура работы\n\n1. **Входные данные**\n - Данные передаются через состояние приложения или из внешних источников (например, REST API вызовов).\n \n2. **Основная логика работы `WorkflowEngine`:**\n 1. Принимает входные данные (через чтение атрибутов состояния).\n 2. Определяет текущее состояние системы на основе этих данных.\n 3. Использует внутренние механизмы для разрешения переходов между этапами выполнения workflow.\n 4. Записывает новое состояние после обработки.\n\n3. **Связь с другими сущностями:**\n - **WorkflowEngineHooks:** \n Класс отвечает за определение стандартного поведения модели, используемой внутри workflow engine. В основном он выполняет действия по умолчанию, которые могут быть переопределены пользователем.\n \n - **TransitionResolver:** \n Используется для определения правил перехода между различными стадиями workflow. Этот механизм решает, как именно должны выполняться шаги workflow и какие условия их активируют.\n\n4. **Участие в потоках данных (dataflow slices):**\n - **Dataflow Slices (6):** \n Срезы данных обеспечивают возможность параллельного выполнения различных частей workflow одновременно, что улучшает производительность системы.\n - **Dataflow Slices (24):** \n Другой набор параллельных потоков, организованных через `UvicornThreadRunner`, обеспечивает параллельность выполнения HTTP-запросов и других асинхронных задач.\n\n5. **Пример взаимодействия с внешними компонентами:**\n - Работа через внешние HTTP вызовы (`UvicornThreadRunner`) позволяет запускать различные задачи параллельно и возвращать результаты обратно в систему workflow.\n\n---\n\n### Ключевые моменты реализации:\n\n- `WorkflowEngine` выступает центральным элементом всей логики workflow и координирует выполнение этапов.\n- Все этапы определяются через правила перехода (`TransitionResolver`), которые помогают системе двигаться от одного этапа к другому.\n- Использование срезов данных и параллелизма (6 и 24 потоков) позволяет оптимизировать обработку и улучшить общую производительность.\n\n---\n\n### Заключение\n\n`WorkflowEngine` является ключевым компонентом системы управления workflow, отвечающим за координацию и управление процессом выполнения шагов workflow. Он взаимодействует с различными модулями, такими как `WorkflowEngineHooks` и `TransitionResolver`, обеспечивая корректное выполнение всех необходимых действий. Параллельная обработка (до 24 потоков) и четкая структура правил перехода делают этот подход эффективным и масштабируемым решением.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS", + "C4_SEMANTIC_ROLES" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "WorkflowEngine" + ], + "keyword_hints": [ + "WorkflowEngine" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "WorkflowEngine", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Объясни класс WorkflowEngine", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "Объясни класс WorkflowEngine", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Объясни класс WorkflowEngine", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "Объясни класс WorkflowEngine", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 2, + "candidates_after_filter": 2 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "WorkflowEngine", + "alternatives": [ + "WorkflowEngine", + "WorkflowEngineHooks" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 2, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 8, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 113, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 31, + "C0_SOURCE_CHUNKS": 12, + "C4_SEMANTIC_ROLES": 13, + "C2_DEPENDENCY_GRAPH": 44, + "C3_ENTRYPOINTS": 10 + }, + "merge_rank": 28, + "prompt_build": 0, + "llm_call": 5943 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 307, + "evidence_rows": 20, + "evidence_chars": 5261 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 2, + "unique_paths": 2 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 8, + "unique_paths": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 1 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_v1", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "WorkflowEngine" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 20, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-fullchain-explain-workflow-engine", + "mode": "full_chain", + "run_started_at": "2026-03-12T09:11:50", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Объясни класс WorkflowEngine", + "normalized_query": "Объясни класс WorkflowEngine" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Объясни класс WorkflowEngine" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни класс WorkflowEngine" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "WorkflowEngine" + ], + "keyword_hints": [ + "WorkflowEngine" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Объясни класс WorkflowEngine" + }, + "output": { + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "WorkflowEngine", + "alternatives": [ + "WorkflowEngine", + "WorkflowEngineHooks" + ], + "confidence": 0.99 + }, + "rag_count": 20, + "rag_rows": [ + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "class WorkflowEngine\nWorkflowEngine", + "layer": "C1_SYMBOL_CATALOG", + "title": "WorkflowEngine", + "span_start": 10, + "span_end": 86, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "57ec0a9f11c542c78e008684a888397e8d9ef4223671acb2567e631a0cbc70b4", + "qname": "WorkflowEngine", + "kind": "class", + "signature": "WorkflowEngine", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.workflow.engine.workflow_engine", + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/hooks.py", + "content": "class WorkflowEngineHooks\nWorkflowEngineHooks", + "layer": "C1_SYMBOL_CATALOG", + "title": "WorkflowEngineHooks", + "span_start": 6, + "span_end": 14, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "914123ed510540061e116100fc87bba4195595ba696f8bfde2fd77ac6a5cd7e4", + "qname": "WorkflowEngineHooks", + "kind": "class", + "signature": "WorkflowEngineHooks", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.workflow.engine.hooks", + "is_test": false, + "blob_sha": "4b11672b0a9af1ae04bfce9d8e1f96572997d3e65e68108d7c797b88fa5fa47a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowEngine", + "span_start": 10, + "span_end": 86, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "57ec0a9f11c542c78e008684a888397e8d9ef4223671acb2567e631a0cbc70b4", + "symbol_name": "WorkflowEngine", + "qname": "WorkflowEngine", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/hooks.py", + "content": "WorkflowEngineHooks\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowEngineHooks", + "span_start": 6, + "span_end": 14, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "914123ed510540061e116100fc87bba4195595ba696f8bfde2fd77ac6a5cd7e4", + "symbol_name": "WorkflowEngineHooks", + "qname": "WorkflowEngineHooks", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "4b11672b0a9af1ae04bfce9d8e1f96572997d3e65e68108d7c797b88fa5fa47a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/transition_resolver.py", + "content": "TransitionResolver\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "TransitionResolver", + "span_start": 7, + "span_end": 9, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "d1979f0b23d354338debf7771373226833d57c1e7830ce66ca0b82cdf209b958", + "symbol_name": "TransitionResolver", + "qname": "TransitionResolver", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "2c518f4c77fb5dcc2970b88f55a7b121d05959578fb0d196af92ff5193574838", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/queue/in_memory.py", + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)", + "layer": "C4_SEMANTIC_ROLES", + "title": "InMemoryTaskQueue", + "span_start": 9, + "span_end": 38, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 22, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "2da04cb94544a3bcbf0943a95ad4bdd8710bcafaa32a02fd0e4de2178dcf3533", + "symbol_name": "InMemoryTaskQueue", + "qname": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 9, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "58f0cc001ccda0eee4c6bc32ed83bd05eafd6b6644f1e8b4aa9eed3103db73dc", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "ConfigFileLoader\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (8)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ConfigFileLoader", + "span_start": 11, + "span_end": 48, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 23, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "a8474eca8b6e9dc86ae67ed68b16fa5fb639ef08739c053e7b7195489765667f", + "symbol_name": "ConfigFileLoader", + "qname": "ConfigFileLoader", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 8, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine.__init__\n -> WorkflowEngine._transition_resolver\n -> WorkflowEngine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowEngine.__init__:dataflow_slice", + "span_start": 14, + "span_end": 63, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3abf07e5c245e0fe59785ba2d569c2ee56018715fc7f625a044ddaf6201f903d", + "edge_type": "dataflow_slice", + "src_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "src_qname": "WorkflowEngine.__init__", + "dst_symbol_id": "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8", + "dst_ref": "WorkflowEngine.run", + "resolution": "resolved", + "slice_id": "3abf07e5c245e0fe59785ba2d569c2ee56018715fc7f625a044ddaf6201f903d", + "root_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "path_symbols": [ + "WorkflowEngine.__init__", + "WorkflowEngine._transition_resolver", + "WorkflowEngine.run" + ], + "path_symbol_ids": [ + "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine.__init__\n -> WorkflowEngine._hooks\n -> WorkflowEngine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowEngine.__init__:dataflow_slice", + "span_start": 16, + "span_end": 34, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d73db644b69c1eb35afd6eae9d6ac8674e49e30e9bcf9c020f9fdbfe754851b2", + "edge_type": "dataflow_slice", + "src_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "src_qname": "WorkflowEngine.__init__", + "dst_symbol_id": "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8", + "dst_ref": "WorkflowEngine.run", + "resolution": "resolved", + "slice_id": "d73db644b69c1eb35afd6eae9d6ac8674e49e30e9bcf9c020f9fdbfe754851b2", + "root_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "path_symbols": [ + "WorkflowEngine.__init__", + "WorkflowEngine._hooks", + "WorkflowEngine.run" + ], + "path_symbol_ids": [ + "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine.__init__\n -> WorkflowEngine._workflow\n -> WorkflowEngine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowEngine.__init__:dataflow_slice", + "span_start": 12, + "span_end": 29, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "b45ef3c54669b4910a8aed3a565804f275424a24007bc7e3c953389521f80249", + "edge_type": "dataflow_slice", + "src_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "src_qname": "WorkflowEngine.__init__", + "dst_symbol_id": "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8", + "dst_ref": "WorkflowEngine.run", + "resolution": "resolved", + "slice_id": "b45ef3c54669b4910a8aed3a565804f275424a24007bc7e3c953389521f80249", + "root_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "path_symbols": [ + "WorkflowEngine.__init__", + "WorkflowEngine._workflow", + "WorkflowEngine.run" + ], + "path_symbol_ids": [ + "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine.__init__\n -> WorkflowEngine._persistence\n -> WorkflowEngine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowEngine.__init__:dataflow_slice", + "span_start": 13, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "8101338770016324ce05d61daa9935a444c75e6c94a0fae4275d5b50fcbcc70b", + "edge_type": "dataflow_slice", + "src_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "src_qname": "WorkflowEngine.__init__", + "dst_symbol_id": "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8", + "dst_ref": "WorkflowEngine.run", + "resolution": "resolved", + "slice_id": "8101338770016324ce05d61daa9935a444c75e6c94a0fae4275d5b50fcbcc70b", + "root_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "path_symbols": [ + "WorkflowEngine.__init__", + "WorkflowEngine._persistence", + "WorkflowEngine.run" + ], + "path_symbol_ids": [ + "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine.__init__\n -> WorkflowEngine._traces\n -> WorkflowEngine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowEngine.__init__:dataflow_slice", + "span_start": 15, + "span_end": 27, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "5006266616d534d721648391565e2ac0c9e7e9d9f8df00c17fba8989afb533a5", + "edge_type": "dataflow_slice", + "src_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "src_qname": "WorkflowEngine.__init__", + "dst_symbol_id": "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8", + "dst_ref": "WorkflowEngine.run", + "resolution": "resolved", + "slice_id": "5006266616d534d721648391565e2ac0c9e7e9d9f8df00c17fba8989afb533a5", + "root_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "path_symbols": [ + "WorkflowEngine.__init__", + "WorkflowEngine._traces", + "WorkflowEngine.run" + ], + "path_symbol_ids": [ + "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine.__init__\n -> WorkflowEngine._logger\n -> WorkflowEngine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowEngine.__init__:dataflow_slice", + "span_start": 17, + "span_end": 85, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "2f9927abb24794adb056b94bfb5d8538a5cbafb160da2079f52fca97fd694a2b", + "edge_type": "dataflow_slice", + "src_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "src_qname": "WorkflowEngine.__init__", + "dst_symbol_id": "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8", + "dst_ref": "WorkflowEngine.run", + "resolution": "resolved", + "slice_id": "2f9927abb24794adb056b94bfb5d8538a5cbafb160da2079f52fca97fd694a2b", + "root_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "path_symbols": [ + "WorkflowEngine.__init__", + "WorkflowEngine._logger", + "WorkflowEngine.run" + ], + "path_symbol_ids": [ + "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "class WorkflowEngine:\n def __init__(self, workflow, persistence, *, traces, hooks: WorkflowEngineHooks | None = None) -> None:\n self._workflow = workflow\n self._persistence = persistence\n self._transition_resolver = TransitionResolver()\n self._traces = traces\n self._hooks = hooks or WorkflowEngineHooks()\n self._logger = logging.getLogger(__name__)\n\n def run(self, context: WorkflowContext) -> dict[str, object]:\n run_id = self._persistence.start_run(\n self._workflow.definition.name,\n self._workflow.definition.start_at,\n context.snapshot(),\n )\n context.state.setdefault(\"runtime\", {})\n context.state[\"runtime\"][\"workflow_run_id\"] = run_id\n self._traces.step(\"workflow\")\n self._traces.info(\"Workflow started.\", status=\"started\", attrs={\"workflow_run_id\": run_id})\n current_name = self._workflow.definition.start_at\n while current_name is not None:\n node = self._workflow.definition.nodes[current_name]\n context.state[\"runtime\"][\"current_node\"] = current_name\n self._logger.info(\"Workflow run %s: step '%s' started.\", run_id, current_name)\n self._hooks.on_step_started(context, current_name)\n self._persistence.start_step(run_id, current_name, context.snapshot())\n self._traces.step(current_name)\n self._traces.debug(\n f\"Step '{current_name}' started.\",\n status=\"started\",\n attrs={\"workflow_run_id\": run_id, \"node\": current_name},\n )\n try:\n result = node.step.run(context)\n except Exception as error:\n self._persistence.fail_step(run_id, current_name, context.snapshot(), error)\n self._persistence.fail_run(run_id, context.snapshot())\n self._traces.error(\n f\"Step '{current_name}' failed: {error}\",\n status=\"failed\",\n attrs={\"exception_type\": type(error).__name__},\n )\n self._logger.exception(\"Workflow run %s: step '%s' failed.\", run_id, current_name)\n self._hooks.on_step_failed(context, current_name)\n raise\n context.state.update(result.updates)\n self._persistence.complete_step(\n run_id,\n current_name,\n result.status,\n result.transition,\n context.snapshot(),\n )\n next_node = self._transition_resolver.resolve(node, result)\n self._traces.debug(\n f\"Step '{current_name}' completed with transition '{result.transition}'.\",\n status=result.status,\n attrs={\n \"workflow_run_id\": run_id,\n \"from_node\": current_name,\n \"transition\": result.transition,\n \"to_node\": next_node,\n },\n )\n self._logger.info(\n \"Workflow run %s: step '%s' completed with transition '%s'.\",\n run_id,\n current_name,\n result.transition,\n )\n self._hooks.on_step_finished(context, current_name)\n current_name = next_node\n self._persistence.complete_run(run_id, context.snapshot())\n self._traces.step(\"workflow\")\n self._traces.info(\"Workflow completed.\", status=\"completed\", attrs={\"workflow_run_id\": run_id})\n self._logger.info(\"Workflow run %s completed.\", run_id)\n return {\"run_id\": run_id, \"status\": \"completed\", \"context\": context.snapshot()}", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/workflow/engine/workflow_engine.py:WorkflowEngine", + "span_start": 10, + "span_end": 86, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.workflow.engine.workflow_engine", + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "WorkflowEngine", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Объясни класс WorkflowEngine", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "Объясни класс WorkflowEngine", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Объясни класс WorkflowEngine", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "Объясни класс WorkflowEngine", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 2, + "candidates_after_filter": 2 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "WorkflowEngine", + "alternatives": [ + "WorkflowEngine", + "WorkflowEngineHooks" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 2, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 8, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 113, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 31, + "C0_SOURCE_CHUNKS": 12, + "C4_SEMANTIC_ROLES": 13, + "C2_DEPENDENCY_GRAPH": 44, + "C3_ENTRYPOINTS": 10 + }, + "merge_rank": 28 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Объясни класс WorkflowEngine", + "rag_count": 20 + }, + "output": { + "llm_answer": "## Архитектура и Поведение `WorkflowEngine`\n\n### Описание класса `WorkflowEngine` (`src/app_runtime/workflow/engine/workflow_engine.py`)\n\n**Класс:** \n`WorkflowEngine`\n\n**Роль:** \n`pipeline_stage`\n\n**Ответственности:** \n- Чтение и запись атрибутов состояния.\n- Участие в срезах данных потока (dataflow slices).\n\n---\n\n### Поток данных и структура работы\n\n1. **Входные данные**\n - Данные передаются через состояние приложения или из внешних источников (например, REST API вызовов).\n \n2. **Основная логика работы `WorkflowEngine`:**\n 1. Принимает входные данные (через чтение атрибутов состояния).\n 2. Определяет текущее состояние системы на основе этих данных.\n 3. Использует внутренние механизмы для разрешения переходов между этапами выполнения workflow.\n 4. Записывает новое состояние после обработки.\n\n3. **Связь с другими сущностями:**\n - **WorkflowEngineHooks:** \n Класс отвечает за определение стандартного поведения модели, используемой внутри workflow engine. В основном он выполняет действия по умолчанию, которые могут быть переопределены пользователем.\n \n - **TransitionResolver:** \n Используется для определения правил перехода между различными стадиями workflow. Этот механизм решает, как именно должны выполняться шаги workflow и какие условия их активируют.\n\n4. **Участие в потоках данных (dataflow slices):**\n - **Dataflow Slices (6):** \n Срезы данных обеспечивают возможность параллельного выполнения различных частей workflow одновременно, что улучшает производительность системы.\n - **Dataflow Slices (24):** \n Другой набор параллельных потоков, организованных через `UvicornThreadRunner`, обеспечивает параллельность выполнения HTTP-запросов и других асинхронных задач.\n\n5. **Пример взаимодействия с внешними компонентами:**\n - Работа через внешние HTTP вызовы (`UvicornThreadRunner`) позволяет запускать различные задачи параллельно и возвращать результаты обратно в систему workflow.\n\n---\n\n### Ключевые моменты реализации:\n\n- `WorkflowEngine` выступает центральным элементом всей логики workflow и координирует выполнение этапов.\n- Все этапы определяются через правила перехода (`TransitionResolver`), которые помогают системе двигаться от одного этапа к другому.\n- Использование срезов данных и параллелизма (6 и 24 потоков) позволяет оптимизировать обработку и улучшить общую производительность.\n\n---\n\n### Заключение\n\n`WorkflowEngine` является ключевым компонентом системы управления workflow, отвечающим за координацию и управление процессом выполнения шагов workflow. Он взаимодействует с различными модулями, такими как `WorkflowEngineHooks` и `TransitionResolver`, обеспечивая корректное выполнение всех необходимых действий. Параллельная обработка (до 24 потоков) и четкая структура правил перехода делают этот подход эффективным и масштабируемым решением." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 307, + "evidence_rows": 20, + "evidence_chars": 5261 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 2, + "unique_paths": 2 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 8, + "unique_paths": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 1 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_v1", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 5943 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091150/full_chain_plba_code_retrieval_plba-fullchain-explain-workflow-engine.md b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091150/full_chain_plba_code_retrieval_plba-fullchain-explain-workflow-engine.md new file mode 100644 index 0000000..0099544 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091150/full_chain_plba_code_retrieval_plba-fullchain-explain-workflow-engine.md @@ -0,0 +1,34 @@ +# plba-fullchain-explain-workflow-engine + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_retrieval.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Объясни класс WorkflowEngine + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 20, + "llm_answer": "## Архитектура и Поведение `WorkflowEngine`\n\n### Описание класса `WorkflowEngine` (`src/app_runtime/workflow/engine/workflow_engine.py`)\n\n**Класс:** \n`WorkflowEngine`\n\n**Роль:** \n`pipeline_stage`\n\n**Ответственности:** \n- Чтение и запись атрибутов состояния.\n- Участие в срезах данных потока (dataflow slices).\n\n---\n\n### Поток данных и структура работы\n\n1. **Входные данные**\n - Данные передаются через состояние приложения или из внешних источников (например, REST API вызовов).\n \n2. **Основная логика работы `WorkflowEngine`:**\n 1. Принимает входные данные (через чтение атрибутов состояния).\n 2. Определяет текущее состояние системы на основе этих данных.\n 3. Использует внутренние механизмы для разрешения переходов между этапами выполнения workflow.\n 4. Записывает новое состояние после обработки.\n\n3. **Связь с другими сущностями:**\n - **WorkflowEngineHooks:** \n Класс отвечает за определение стандартного поведения модели, используемой внутри workflow engine. В основном он выполняет действия по умолчанию, которые могут быть переопределены пользователем.\n \n - **TransitionResolver:** \n Используется для определения правил перехода между различными стадиями workflow. Этот механизм решает, как именно должны выполняться шаги workflow и какие условия их активируют.\n\n4. **Участие в потоках данных (dataflow slices):**\n - **Dataflow Slices (6):** \n Срезы данных обеспечивают возможность параллельного выполнения различных частей workflow одновременно, что улучшает производительность системы.\n - **Dataflow Slices (24):** \n Другой набор параллельных потоков, организованных через `UvicornThreadRunner`, обеспечивает параллельность выполнения HTTP-запросов и других асинхронных задач.\n\n5. **Пример взаимодействия с внешними компонентами:**\n - Работа через внешние HTTP вызовы (`UvicornThreadRunner`) позволяет запускать различные задачи параллельно и возвращать результаты обратно в систему workflow.\n\n---\n\n### Ключевые моменты реализации:\n\n- `WorkflowEngine` выступает центральным элементом всей логики workflow и координирует выполнение этапов.\n- Все этапы определяются через правила перехода (`TransitionResolver`), которые помогают системе двигаться от одного этапа к другому.\n- Использование срезов данных и параллелизма (6 и 24 потоков) позволяет оптимизировать обработку и улучшить общую производительность.\n\n---\n\n### Заключение\n\n`WorkflowEngine` является ключевым компонентом системы управления workflow, отвечающим за координацию и управление процессом выполнения шагов workflow. Он взаимодействует с различными модулями, такими как `WorkflowEngineHooks` и `TransitionResolver`, обеспечивая корректное выполнение всех необходимых действий. Параллельная обработка (до 24 потоков) и четкая структура правил перехода делают этот подход эффективным и масштабируемым решением.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "WorkflowEngine" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091150/summary.md b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091150/summary.md new file mode 100644 index 0000000..1cfe042 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091150/summary.md @@ -0,0 +1,20 @@ +# pipeline_setup_v2 summary + +Passed: 6/6 + +| File | Case | Runner | Mode | Intent | Sub-intent | Pass | +|------|------|--------|------|--------|------------|------| +| full_chain_plba_code_retrieval.yaml | plba-fullchain-explain-runtime-manager | runtime | full_chain | CODE_QA | EXPLAIN | ✓ | +| full_chain_plba_code_retrieval.yaml | plba-fullchain-explain-http-control-channel | runtime | full_chain | CODE_QA | EXPLAIN | ✓ | +| full_chain_plba_code_retrieval.yaml | plba-fullchain-explain-control-plane-service | runtime | full_chain | CODE_QA | EXPLAIN | ✓ | +| full_chain_plba_code_retrieval.yaml | plba-fullchain-explain-trace-service | runtime | full_chain | CODE_QA | EXPLAIN | ✓ | +| full_chain_plba_code_retrieval.yaml | plba-fullchain-explain-create-runtime | runtime | full_chain | CODE_QA | EXPLAIN | ✓ | +| full_chain_plba_code_retrieval.yaml | plba-fullchain-explain-workflow-engine | runtime | full_chain | CODE_QA | EXPLAIN | ✓ | + +## LLM Answers +- **plba-fullchain-explain-runtime-manager**: ## Анализ класса `RuntimeManager` ### Файл и путь: `src/app_runtime/core/runtime.py` ### Описание класса: **Класс:** `RuntimeManager` **Роль:** - Менеджер роли (pipeline_stage) - Оркестратор вызовов ролей (4) - Читает и… +- **plba-fullchain-explain-http-control-channel**: ## Анализ класса `HttpControlChannel` ### 1. Общая информация о классе **Файл:** `src/app_runtime/control/http_channel.py` **Класс:** `HttpControlChannel` **Наследование:** `HttpControlChannel(ControlChannel)` **Роль:**… +- **plba-fullchain-explain-control-plane-service**: ## Анализ класса `ControlPlaneService` ### Описание файла и роли сущностей Исходный код находится в файле `src/app_runtime/control/service.py`, где определен класс `ControlPlaneService`. Этот файл является частью модуля… +- **plba-fullchain-explain-trace-service**: ## Анализ архитектуры и поведения системы с участием `TraceService` ### Описание роли и ответственности компонента В системе предоставлены несколько компонентов, выполняющих роль pipeline stage и участвующих в управлени… +- **plba-fullchain-explain-create-runtime**: ## Анализ функции `create_runtime` и контекста ### 1. Общая информация о файле и функции Файл: **src/plba/bootstrap.py** Функция: **create_runtime(module)** Эта функция отвечает за создание runtime окружения для приложе… +- **plba-fullchain-explain-workflow-engine**: ## Архитектура и Поведение `WorkflowEngine` ### Описание класса `WorkflowEngine` (`src/app_runtime/workflow/engine/workflow_engine.py`) **Класс:** `WorkflowEngine` **Роль:** `pipeline_stage` **Ответственности:** - Чтени… \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091314/full_chain_plba_code_retrieval_plba-fullchain-explain-control-plane-service.json b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091314/full_chain_plba_code_retrieval_plba-fullchain-explain-control-plane-service.json new file mode 100644 index 0000000..0ab5446 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091314/full_chain_plba_code_retrieval_plba-fullchain-explain-control-plane-service.json @@ -0,0 +1,2532 @@ +{ + "case_id": "plba-fullchain-explain-control-plane-service", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_retrieval.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 19, + "llm_answer": "## Анализ класса `ControlPlaneService`\n\n### Описание файла и роли классов\n\nФайл **`src/app_runtime/control/service.py`** содержит определение класса `ControlPlaneService`. Этот файл также импортирует классы и компоненты из других модулей (`base`, `http_channel`, `http_runner`), которые участвуют в общей архитектуре системы управления.\n\n### Класс `ControlPlaneService`\n\nКласс `ControlPlaneService` является ключевым компонентом архитектуры и играет роль «pipeline stage» (этап конвейера). Его основная ответственность заключается в управлении состоянием системы, чтении и записи атрибутов состояния, а также участии в различных срезах обработки данных («dataflow slices»).\n\n#### Архитектура и структура\n\n- **Название класса**: `ControlPlaneService`\n- **Путь к файлу**: `src/app_runtime/control/service.py`\n- **Роль**: `pipeline stage`\n \n#### Основные обязанности (Responsibilities):\n\n1. **Имя суффикса указывает на сервисную природу объекта:** \n - Имя класса подразумевает, что он управляет определенными аспектами работы системы или сервиса.\n \n2. **Чтение и запись атрибутов состояния:**\n - Контролирует состояние приложения через чтение и запись соответствующих атрибутов.\n \n3. **Участие в данных срезах (Dataflow Slices):**\n - Участие в 5 разных срезах данных, что означает его участие в нескольких параллельных процессах или каналах передачи данных.\n\n#### Взаимодействие с другими сущностями\n\n- **`ControlChannel`:**\n - Используется для взаимодействия модели (ControlModel) внутри системы. Класс находится в модуле `src/app_runtime/control/base.py`.\n \n- **`ControlActionSet`:**\n - Также используется для настройки поведения модели. Находится в том же модуле.\n\n- **`UvicornThreadRunner`:**\n - Служит механизмом запуска HTTP-сервиса через uvicorn. Находится в `src/app_runtime/control/http_runner.py`.\n\n- **`HttpControlChannel`:**\n - Обеспечивает взаимодействие с внешним миром через HTTP-запросы. Находится в `src/app_runtime/control/http_channel.py`.\n\n---\n\n### Поток данных и управление состоянием\n\nКласс `ControlPlaneService` отвечает за поддержание согласованного состояния между различными компонентами системы. Он обеспечивает механизм для координации действий между разными частями приложения, участвует в распределении нагрузки и синхронизации потоков выполнения задач.\n\nПример простого сценария использования:\n\n```python\n# Создание экземпляра ControlPlaneService\nservice = ControlPlaneService()\n\n# Чтение текущего состояния\ncurrent_state = service.get_current_state()\n\n# Запись нового состояния\nservice.set_new_state(new_state_data)\n```\n\nТаким образом, `ControlPlaneService` выступает как центральный элемент управления состоянием всей системы, обеспечивая корректное функционирование и координацию всех компонентов приложения.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "ControlPlaneService" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-fullchain-explain-control-plane-service", + "text": "Объясни класс ControlPlaneService", + "mode": "full_chain", + "run_started_at": "2026-03-12T09:13:14", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни класс ControlPlaneService", + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "ControlPlaneService", + "alternatives": [ + "ControlPlaneService" + ], + "confidence": 0.99 + }, + "rag_count": 19, + "rag_rows": [ + { + "path": "src/app_runtime/control/service.py", + "content": "class ControlPlaneService\nControlPlaneService", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "qname": "ControlPlaneService", + "kind": "class", + "signature": "ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/queue/in_memory.py", + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)", + "layer": "C4_SEMANTIC_ROLES", + "title": "InMemoryTaskQueue", + "span_start": 9, + "span_end": 38, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 22, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "2da04cb94544a3bcbf0943a95ad4bdd8710bcafaa32a02fd0e4de2178dcf3533", + "symbol_name": "InMemoryTaskQueue", + "qname": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 9, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "58f0cc001ccda0eee4c6bc32ed83bd05eafd6b6644f1e8b4aa9eed3103db73dc", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.register_channel reads_attr self._channels.append", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.register_channel:reads_attr", + "span_start": 17, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "1ee5925deffdc38ba15b88bf7c89e5fcd1a78f493fe30f2deb827d714a1b18e8", + "edge_type": "reads_attr", + "src_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "src_qname": "ControlPlaneService.register_channel", + "dst_symbol_id": null, + "dst_ref": "self._channels.append", + "resolution": "partial", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "class ControlPlaneService:\n def __init__(self) -> None:\n self._channels: list[ControlChannel] = []\n\n def register_channel(self, channel: ControlChannel) -> None:\n self._channels.append(channel)\n\n def start(self, runtime: RuntimeManager) -> None:\n if not self._channels:\n return\n asyncio.run(self._start_async(runtime))\n\n def stop(self) -> None:\n if not self._channels:\n return\n asyncio.run(self._stop_async())\n\n def snapshot(self, runtime: RuntimeManager) -> dict[str, object]:\n health = runtime.current_health()\n return {\n \"runtime\": {\"state\": runtime._state.value},\n \"modules\": list(runtime.registry.modules),\n \"services\": runtime.services.snapshot(),\n \"workers\": runtime.workers.snapshot(),\n \"health\": runtime.health.snapshot(runtime.workers.healths()) | {\"status\": health[\"status\"]},\n \"config\": runtime.configuration.get(),\n }\n\n async def _start_async(self, runtime: RuntimeManager) -> None:\n actions = ControlActionSet(\n health=runtime.health_status,\n start=runtime.start_runtime,\n stop=runtime.stop_runtime,\n status=runtime.runtime_status,\n )\n for channel in self._channels:\n await channel.start(actions)\n\n async def _stop_async(self) -> None:\n for channel in reversed(self._channels):\n await channel.stop()", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/service.py:ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "## Анализ класса `ControlPlaneService`\n\n### Описание файла и роли классов\n\nФайл **`src/app_runtime/control/service.py`** содержит определение класса `ControlPlaneService`. Этот файл также импортирует классы и компоненты из других модулей (`base`, `http_channel`, `http_runner`), которые участвуют в общей архитектуре системы управления.\n\n### Класс `ControlPlaneService`\n\nКласс `ControlPlaneService` является ключевым компонентом архитектуры и играет роль «pipeline stage» (этап конвейера). Его основная ответственность заключается в управлении состоянием системы, чтении и записи атрибутов состояния, а также участии в различных срезах обработки данных («dataflow slices»).\n\n#### Архитектура и структура\n\n- **Название класса**: `ControlPlaneService`\n- **Путь к файлу**: `src/app_runtime/control/service.py`\n- **Роль**: `pipeline stage`\n \n#### Основные обязанности (Responsibilities):\n\n1. **Имя суффикса указывает на сервисную природу объекта:** \n - Имя класса подразумевает, что он управляет определенными аспектами работы системы или сервиса.\n \n2. **Чтение и запись атрибутов состояния:**\n - Контролирует состояние приложения через чтение и запись соответствующих атрибутов.\n \n3. **Участие в данных срезах (Dataflow Slices):**\n - Участие в 5 разных срезах данных, что означает его участие в нескольких параллельных процессах или каналах передачи данных.\n\n#### Взаимодействие с другими сущностями\n\n- **`ControlChannel`:**\n - Используется для взаимодействия модели (ControlModel) внутри системы. Класс находится в модуле `src/app_runtime/control/base.py`.\n \n- **`ControlActionSet`:**\n - Также используется для настройки поведения модели. Находится в том же модуле.\n\n- **`UvicornThreadRunner`:**\n - Служит механизмом запуска HTTP-сервиса через uvicorn. Находится в `src/app_runtime/control/http_runner.py`.\n\n- **`HttpControlChannel`:**\n - Обеспечивает взаимодействие с внешним миром через HTTP-запросы. Находится в `src/app_runtime/control/http_channel.py`.\n\n---\n\n### Поток данных и управление состоянием\n\nКласс `ControlPlaneService` отвечает за поддержание согласованного состояния между различными компонентами системы. Он обеспечивает механизм для координации действий между разными частями приложения, участвует в распределении нагрузки и синхронизации потоков выполнения задач.\n\nПример простого сценария использования:\n\n```python\n# Создание экземпляра ControlPlaneService\nservice = ControlPlaneService()\n\n# Чтение текущего состояния\ncurrent_state = service.get_current_state()\n\n# Запись нового состояния\nservice.set_new_state(new_state_data)\n```\n\nТаким образом, `ControlPlaneService` выступает как центральный элемент управления состоянием всей системы, обеспечивая корректное функционирование и координацию всех компонентов приложения.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS", + "C4_SEMANTIC_ROLES" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "ControlPlaneService" + ], + "keyword_hints": [ + "ControlPlaneService" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "ControlPlaneService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Объясни класс ControlPlaneService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "Объясни класс ControlPlaneService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Объясни класс ControlPlaneService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "Объясни класс ControlPlaneService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "ControlPlaneService", + "alternatives": [ + "ControlPlaneService" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 8, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 167, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 53, + "C0_SOURCE_CHUNKS": 21, + "C4_SEMANTIC_ROLES": 17, + "C2_DEPENDENCY_GRAPH": 64, + "C3_ENTRYPOINTS": 10 + }, + "merge_rank": 24, + "prompt_build": 0, + "llm_call": 6002 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 325, + "evidence_rows": 19, + "evidence_chars": 3087 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 8, + "unique_paths": 7 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 1 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_v1", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "ControlPlaneService" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 19, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-fullchain-explain-control-plane-service", + "mode": "full_chain", + "run_started_at": "2026-03-12T09:13:14", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Объясни класс ControlPlaneService", + "normalized_query": "Объясни класс ControlPlaneService" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Объясни класс ControlPlaneService" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни класс ControlPlaneService" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "ControlPlaneService" + ], + "keyword_hints": [ + "ControlPlaneService" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Объясни класс ControlPlaneService" + }, + "output": { + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "ControlPlaneService", + "alternatives": [ + "ControlPlaneService" + ], + "confidence": 0.99 + }, + "rag_count": 19, + "rag_rows": [ + { + "path": "src/app_runtime/control/service.py", + "content": "class ControlPlaneService\nControlPlaneService", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "qname": "ControlPlaneService", + "kind": "class", + "signature": "ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/queue/in_memory.py", + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)", + "layer": "C4_SEMANTIC_ROLES", + "title": "InMemoryTaskQueue", + "span_start": 9, + "span_end": 38, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 22, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "2da04cb94544a3bcbf0943a95ad4bdd8710bcafaa32a02fd0e4de2178dcf3533", + "symbol_name": "InMemoryTaskQueue", + "qname": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 9, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "58f0cc001ccda0eee4c6bc32ed83bd05eafd6b6644f1e8b4aa9eed3103db73dc", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.register_channel reads_attr self._channels.append", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.register_channel:reads_attr", + "span_start": 17, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "1ee5925deffdc38ba15b88bf7c89e5fcd1a78f493fe30f2deb827d714a1b18e8", + "edge_type": "reads_attr", + "src_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "src_qname": "ControlPlaneService.register_channel", + "dst_symbol_id": null, + "dst_ref": "self._channels.append", + "resolution": "partial", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "class ControlPlaneService:\n def __init__(self) -> None:\n self._channels: list[ControlChannel] = []\n\n def register_channel(self, channel: ControlChannel) -> None:\n self._channels.append(channel)\n\n def start(self, runtime: RuntimeManager) -> None:\n if not self._channels:\n return\n asyncio.run(self._start_async(runtime))\n\n def stop(self) -> None:\n if not self._channels:\n return\n asyncio.run(self._stop_async())\n\n def snapshot(self, runtime: RuntimeManager) -> dict[str, object]:\n health = runtime.current_health()\n return {\n \"runtime\": {\"state\": runtime._state.value},\n \"modules\": list(runtime.registry.modules),\n \"services\": runtime.services.snapshot(),\n \"workers\": runtime.workers.snapshot(),\n \"health\": runtime.health.snapshot(runtime.workers.healths()) | {\"status\": health[\"status\"]},\n \"config\": runtime.configuration.get(),\n }\n\n async def _start_async(self, runtime: RuntimeManager) -> None:\n actions = ControlActionSet(\n health=runtime.health_status,\n start=runtime.start_runtime,\n stop=runtime.stop_runtime,\n status=runtime.runtime_status,\n )\n for channel in self._channels:\n await channel.start(actions)\n\n async def _stop_async(self) -> None:\n for channel in reversed(self._channels):\n await channel.stop()", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/service.py:ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "ControlPlaneService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Объясни класс ControlPlaneService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "Объясни класс ControlPlaneService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Объясни класс ControlPlaneService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "Объясни класс ControlPlaneService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "ControlPlaneService", + "alternatives": [ + "ControlPlaneService" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 8, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 167, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 53, + "C0_SOURCE_CHUNKS": 21, + "C4_SEMANTIC_ROLES": 17, + "C2_DEPENDENCY_GRAPH": 64, + "C3_ENTRYPOINTS": 10 + }, + "merge_rank": 24 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Объясни класс ControlPlaneService", + "rag_count": 19 + }, + "output": { + "llm_answer": "## Анализ класса `ControlPlaneService`\n\n### Описание файла и роли классов\n\nФайл **`src/app_runtime/control/service.py`** содержит определение класса `ControlPlaneService`. Этот файл также импортирует классы и компоненты из других модулей (`base`, `http_channel`, `http_runner`), которые участвуют в общей архитектуре системы управления.\n\n### Класс `ControlPlaneService`\n\nКласс `ControlPlaneService` является ключевым компонентом архитектуры и играет роль «pipeline stage» (этап конвейера). Его основная ответственность заключается в управлении состоянием системы, чтении и записи атрибутов состояния, а также участии в различных срезах обработки данных («dataflow slices»).\n\n#### Архитектура и структура\n\n- **Название класса**: `ControlPlaneService`\n- **Путь к файлу**: `src/app_runtime/control/service.py`\n- **Роль**: `pipeline stage`\n \n#### Основные обязанности (Responsibilities):\n\n1. **Имя суффикса указывает на сервисную природу объекта:** \n - Имя класса подразумевает, что он управляет определенными аспектами работы системы или сервиса.\n \n2. **Чтение и запись атрибутов состояния:**\n - Контролирует состояние приложения через чтение и запись соответствующих атрибутов.\n \n3. **Участие в данных срезах (Dataflow Slices):**\n - Участие в 5 разных срезах данных, что означает его участие в нескольких параллельных процессах или каналах передачи данных.\n\n#### Взаимодействие с другими сущностями\n\n- **`ControlChannel`:**\n - Используется для взаимодействия модели (ControlModel) внутри системы. Класс находится в модуле `src/app_runtime/control/base.py`.\n \n- **`ControlActionSet`:**\n - Также используется для настройки поведения модели. Находится в том же модуле.\n\n- **`UvicornThreadRunner`:**\n - Служит механизмом запуска HTTP-сервиса через uvicorn. Находится в `src/app_runtime/control/http_runner.py`.\n\n- **`HttpControlChannel`:**\n - Обеспечивает взаимодействие с внешним миром через HTTP-запросы. Находится в `src/app_runtime/control/http_channel.py`.\n\n---\n\n### Поток данных и управление состоянием\n\nКласс `ControlPlaneService` отвечает за поддержание согласованного состояния между различными компонентами системы. Он обеспечивает механизм для координации действий между разными частями приложения, участвует в распределении нагрузки и синхронизации потоков выполнения задач.\n\nПример простого сценария использования:\n\n```python\n# Создание экземпляра ControlPlaneService\nservice = ControlPlaneService()\n\n# Чтение текущего состояния\ncurrent_state = service.get_current_state()\n\n# Запись нового состояния\nservice.set_new_state(new_state_data)\n```\n\nТаким образом, `ControlPlaneService` выступает как центральный элемент управления состоянием всей системы, обеспечивая корректное функционирование и координацию всех компонентов приложения." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 325, + "evidence_rows": 19, + "evidence_chars": 3087 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 8, + "unique_paths": 7 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 1 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_v1", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 6002 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091314/full_chain_plba_code_retrieval_plba-fullchain-explain-control-plane-service.md b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091314/full_chain_plba_code_retrieval_plba-fullchain-explain-control-plane-service.md new file mode 100644 index 0000000..14c9726 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091314/full_chain_plba_code_retrieval_plba-fullchain-explain-control-plane-service.md @@ -0,0 +1,34 @@ +# plba-fullchain-explain-control-plane-service + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_retrieval.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Объясни класс ControlPlaneService + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 19, + "llm_answer": "## Анализ класса `ControlPlaneService`\n\n### Описание файла и роли классов\n\nФайл **`src/app_runtime/control/service.py`** содержит определение класса `ControlPlaneService`. Этот файл также импортирует классы и компоненты из других модулей (`base`, `http_channel`, `http_runner`), которые участвуют в общей архитектуре системы управления.\n\n### Класс `ControlPlaneService`\n\nКласс `ControlPlaneService` является ключевым компонентом архитектуры и играет роль «pipeline stage» (этап конвейера). Его основная ответственность заключается в управлении состоянием системы, чтении и записи атрибутов состояния, а также участии в различных срезах обработки данных («dataflow slices»).\n\n#### Архитектура и структура\n\n- **Название класса**: `ControlPlaneService`\n- **Путь к файлу**: `src/app_runtime/control/service.py`\n- **Роль**: `pipeline stage`\n \n#### Основные обязанности (Responsibilities):\n\n1. **Имя суффикса указывает на сервисную природу объекта:** \n - Имя класса подразумевает, что он управляет определенными аспектами работы системы или сервиса.\n \n2. **Чтение и запись атрибутов состояния:**\n - Контролирует состояние приложения через чтение и запись соответствующих атрибутов.\n \n3. **Участие в данных срезах (Dataflow Slices):**\n - Участие в 5 разных срезах данных, что означает его участие в нескольких параллельных процессах или каналах передачи данных.\n\n#### Взаимодействие с другими сущностями\n\n- **`ControlChannel`:**\n - Используется для взаимодействия модели (ControlModel) внутри системы. Класс находится в модуле `src/app_runtime/control/base.py`.\n \n- **`ControlActionSet`:**\n - Также используется для настройки поведения модели. Находится в том же модуле.\n\n- **`UvicornThreadRunner`:**\n - Служит механизмом запуска HTTP-сервиса через uvicorn. Находится в `src/app_runtime/control/http_runner.py`.\n\n- **`HttpControlChannel`:**\n - Обеспечивает взаимодействие с внешним миром через HTTP-запросы. Находится в `src/app_runtime/control/http_channel.py`.\n\n---\n\n### Поток данных и управление состоянием\n\nКласс `ControlPlaneService` отвечает за поддержание согласованного состояния между различными компонентами системы. Он обеспечивает механизм для координации действий между разными частями приложения, участвует в распределении нагрузки и синхронизации потоков выполнения задач.\n\nПример простого сценария использования:\n\n```python\n# Создание экземпляра ControlPlaneService\nservice = ControlPlaneService()\n\n# Чтение текущего состояния\ncurrent_state = service.get_current_state()\n\n# Запись нового состояния\nservice.set_new_state(new_state_data)\n```\n\nТаким образом, `ControlPlaneService` выступает как центральный элемент управления состоянием всей системы, обеспечивая корректное функционирование и координацию всех компонентов приложения.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "ControlPlaneService" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091314/full_chain_plba_code_retrieval_plba-fullchain-explain-create-runtime.json b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091314/full_chain_plba_code_retrieval_plba-fullchain-explain-create-runtime.json new file mode 100644 index 0000000..662bb56 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091314/full_chain_plba_code_retrieval_plba-fullchain-explain-create-runtime.json @@ -0,0 +1,2372 @@ +{ + "case_id": "plba-fullchain-explain-create-runtime", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_retrieval.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 19, + "llm_answer": "## Анализ функции `create_runtime` и архитектуры приложения\n\n### Описание функции `create_runtime`\nФункция `create_runtime` расположена в файле `src/plba/bootstrap.py`. Её основная задача — инициализация и настройка runtime окружения для выполнения рабочих процессов или пайплайнов в приложении.\n\n#### Сигнатура функции\n```python\ndef create_runtime(module):\n # ...\n```\nПараметр `module` представляет собой модуль Python, который может содержать дополнительные настройки или классы, необходимые для конфигурации runtime.\n\n---\n\n### Поток данных и архитектура системы\n\nАрхитектура приложения разделена на несколько компонентов, каждый из которых играет определённую роль в общей системе:\n\n1. **Pipeline Stages**\n - **HttpRunner**: Класс `UvicornThreadRunner`, расположенный в `src/app_runtime/control/http_runner.py`.\n - Отвечает за управление HTTP-запросами и участие в обмене данными между компонентами системы.\n - **Workflow Persistence**: Класс `WorkflowPersistence`, находящийся в `src/app_runtime/workflow/persistence/workflow_persistence.py`.\n - Обеспечивает сохранение состояния workflow и его восстановление при необходимости.\n - **Http Control Channel**: Класс `HttpControlChannel`, расположенный в `src/app_runtime/control/http_channel.py`.\n - Управляет каналами связи с внешним миром через HTTP.\n - **In Memory Task Queue**: Класс `InMemoryTaskQueue`, находящийся в `src/app_runtime/queue/in_memory.py`.\n - Хранит задачи в памяти и управляет их выполнением.\n - **Config File Loader**: Класс `ConfigFileLoader`, расположенный в `src/app_runtime/config/file_loader.py`.\n - Загружает конфигурационные файлы и обеспечивает доступ к их содержимому.\n\nКаждый из этих классов участвует в передаче данных и управлении состоянием системы, что позволяет эффективно организовать выполнение различных задач и пайплайнов.\n\n---\n\n### Архитектурный обзор и обязанности каждого компонента\n\n- **Pipeline Stages** – это компоненты, которые участвуют в обработке данных и координации работы других частей системы. Они реализуют конкретные бизнес-логики и отвечают за передачу информации между этапами обработки.\n \n - **HttpRunner**: используется для обработки входящих HTTP запросов и организации потоков данных от клиентов.\n - **Workflow Persistence**: отвечает за долговременное хранение и восстановление состояний workflow.\n - **Http Control Channel**: служит основным каналом управления внешними коммуникациями.\n - **In Memory Task Queue**: хранит и выполняет задачи в оперативной памяти.\n - **Config File Loader**: загружает внешние конфигурационные данные и предоставляет к ним доступ.\n\nЭти компоненты работают совместно, обеспечивая согласованное функционирование всей системы.\n\n---\n\n### Взаимодействие и зависимость компонентов\n\nПри вызове функции `create_runtime` происходит инициализация всех необходимых компонентов и создание связей между ними. Это включает настройку каналов коммуникации, загрузку конфигурации и подготовку среды для выполнения рабочих процессов.\n\nНапример, объект класса `UvicornThreadRunner` будет создан и настроен таким образом, чтобы обрабатывать входящие запросы и выполнять логику на основе поступающих задач. Аналогично другие компоненты будут инициализированы и настроены согласно предоставленной конфигурации.\n\n---\n\n### Заключение\n\nФункция `create_runtime` предназначена для создания и настройки runtime окружения, необходимого для выполнения рабочих процессов и пайплайнов. Она использует различные компоненты, такие как каналы коммуникации, хранилища состояний и очереди задач, для обеспечения эффективного обмена данными и управления рабочими процессами.\n\nТаким образом, функция создает основу для последующего запуска приложений и выполнения рабочих нагрузок, опираясь на четкую организацию и координацию компонентов системы.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "create_runtime" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-fullchain-explain-create-runtime", + "text": "Объясни функцию create_runtime", + "mode": "full_chain", + "run_started_at": "2026-03-12T09:13:14", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни функцию create_runtime", + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "create_runtime", + "alternatives": [ + "create_runtime" + ], + "confidence": 0.99 + }, + "rag_count": 19, + "rag_rows": [ + { + "path": "src/plba/bootstrap.py", + "content": "function create_runtime\ncreate_runtime(module)", + "layer": "C1_SYMBOL_CATALOG", + "title": "create_runtime", + "span_start": 8, + "span_end": 29, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "qname": "create_runtime", + "kind": "function", + "signature": "create_runtime(module)", + "parent_symbol_id": null, + "package_or_module": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/queue/in_memory.py", + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)", + "layer": "C4_SEMANTIC_ROLES", + "title": "InMemoryTaskQueue", + "span_start": 9, + "span_end": 38, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 22, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "2da04cb94544a3bcbf0943a95ad4bdd8710bcafaa32a02fd0e4de2178dcf3533", + "symbol_name": "InMemoryTaskQueue", + "qname": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 9, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "58f0cc001ccda0eee4c6bc32ed83bd05eafd6b6644f1e8b4aa9eed3103db73dc", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "ConfigFileLoader\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (8)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ConfigFileLoader", + "span_start": 11, + "span_end": 48, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 23, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "a8474eca8b6e9dc86ae67ed68b16fa5fb639ef08739c053e7b7195489765667f", + "symbol_name": "ConfigFileLoader", + "qname": "ConfigFileLoader", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 8, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workers/supervisor.py", + "content": "WorkerSupervisor\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkerSupervisor", + "span_start": 10, + "span_end": 59, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "c17b44e8d9e97d490989b21fa67d7c346cdda8a0472e4c41fb243c8846faa124", + "symbol_name": "WorkerSupervisor", + "qname": "WorkerSupervisor", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "77609d9d5927171cce7fc3a54897c183fd63068710c6362029b700937aae5eee", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowEngine", + "span_start": 10, + "span_end": 86, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "57ec0a9f11c542c78e008684a888397e8d9ef4223671acb2567e631a0cbc70b4", + "symbol_name": "WorkflowEngine", + "qname": "WorkflowEngine", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/store.py", + "content": "TraceContextStore\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "TraceContextStore", + "span_start": 15, + "span_end": 52, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b2dad4fbe16ffb11b58deba311c7739955c39d59f291b22181f33e9c8cce4059", + "symbol_name": "TraceContextStore", + "qname": "TraceContextStore", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "d369554f08fc92039c6edd5a2a1e73b23901533e8974459170bbd9347d263dc5", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime calls runtime.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:calls", + "span_start": 19, + "span_end": 19, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "4eaeec4ac55a59d5f66fd01c4754955f8fedaf4bc3df13fa769b352c7bfaacbb", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.add_config_file", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime reads_attr runtime.register_module", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:reads_attr", + "span_start": 28, + "span_end": 28, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "45516c79ff358dbf9b650a081668df0f66d2fe989300f985a1a78be6be166f8f", + "edge_type": "reads_attr", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.register_module", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:instantiates", + "span_start": 17, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "0adba17984f850ea1608c9e734d2dd5c325cfde3a8133123aa239e44935ad18e", + "edge_type": "instantiates", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": "27158ca220022eeb5083c6addf8a50775d45f7161284fd60aac48410105f4b98", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime calls runtime.register_module", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:calls", + "span_start": 28, + "span_end": 28, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "ab6003c3441addc1ba1b81edeca009165559f652f6b2cf424e5ae61b1f617de8", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.register_module", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime calls runtime.control_plane.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:calls", + "span_start": 21, + "span_end": 27, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "2678250030b9ce47a3b3b55fac7897ac530367edc8374ac9d5e6ecafb1e483f0", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.control_plane.register_channel", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime reads_attr runtime.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:reads_attr", + "span_start": 19, + "span_end": 19, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "30d4e8aae984ab84d523e80d02f1caeda52d547fa3d2aa47be8845931cabbca2", + "edge_type": "reads_attr", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.add_config_file", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "def create_runtime(\n module: ApplicationModule,\n *,\n config_path: str | None = None,\n enable_http_control: bool = False,\n control_host: str = \"127.0.0.1\",\n control_port: int = 8080,\n control_timeout: int = 5,\n) -> RuntimeManager:\n runtime = RuntimeManager()\n if config_path is not None:\n runtime.add_config_file(config_path)\n if enable_http_control:\n runtime.control_plane.register_channel(\n HttpControlChannel(\n host=control_host,\n port=control_port,\n timeout=control_timeout,\n )\n )\n runtime.register_module(module)\n return runtime", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/bootstrap.py:create_runtime", + "span_start": 8, + "span_end": 29, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "## Анализ функции `create_runtime` и архитектуры приложения\n\n### Описание функции `create_runtime`\nФункция `create_runtime` расположена в файле `src/plba/bootstrap.py`. Её основная задача — инициализация и настройка runtime окружения для выполнения рабочих процессов или пайплайнов в приложении.\n\n#### Сигнатура функции\n```python\ndef create_runtime(module):\n # ...\n```\nПараметр `module` представляет собой модуль Python, который может содержать дополнительные настройки или классы, необходимые для конфигурации runtime.\n\n---\n\n### Поток данных и архитектура системы\n\nАрхитектура приложения разделена на несколько компонентов, каждый из которых играет определённую роль в общей системе:\n\n1. **Pipeline Stages**\n - **HttpRunner**: Класс `UvicornThreadRunner`, расположенный в `src/app_runtime/control/http_runner.py`.\n - Отвечает за управление HTTP-запросами и участие в обмене данными между компонентами системы.\n - **Workflow Persistence**: Класс `WorkflowPersistence`, находящийся в `src/app_runtime/workflow/persistence/workflow_persistence.py`.\n - Обеспечивает сохранение состояния workflow и его восстановление при необходимости.\n - **Http Control Channel**: Класс `HttpControlChannel`, расположенный в `src/app_runtime/control/http_channel.py`.\n - Управляет каналами связи с внешним миром через HTTP.\n - **In Memory Task Queue**: Класс `InMemoryTaskQueue`, находящийся в `src/app_runtime/queue/in_memory.py`.\n - Хранит задачи в памяти и управляет их выполнением.\n - **Config File Loader**: Класс `ConfigFileLoader`, расположенный в `src/app_runtime/config/file_loader.py`.\n - Загружает конфигурационные файлы и обеспечивает доступ к их содержимому.\n\nКаждый из этих классов участвует в передаче данных и управлении состоянием системы, что позволяет эффективно организовать выполнение различных задач и пайплайнов.\n\n---\n\n### Архитектурный обзор и обязанности каждого компонента\n\n- **Pipeline Stages** – это компоненты, которые участвуют в обработке данных и координации работы других частей системы. Они реализуют конкретные бизнес-логики и отвечают за передачу информации между этапами обработки.\n \n - **HttpRunner**: используется для обработки входящих HTTP запросов и организации потоков данных от клиентов.\n - **Workflow Persistence**: отвечает за долговременное хранение и восстановление состояний workflow.\n - **Http Control Channel**: служит основным каналом управления внешними коммуникациями.\n - **In Memory Task Queue**: хранит и выполняет задачи в оперативной памяти.\n - **Config File Loader**: загружает внешние конфигурационные данные и предоставляет к ним доступ.\n\nЭти компоненты работают совместно, обеспечивая согласованное функционирование всей системы.\n\n---\n\n### Взаимодействие и зависимость компонентов\n\nПри вызове функции `create_runtime` происходит инициализация всех необходимых компонентов и создание связей между ними. Это включает настройку каналов коммуникации, загрузку конфигурации и подготовку среды для выполнения рабочих процессов.\n\nНапример, объект класса `UvicornThreadRunner` будет создан и настроен таким образом, чтобы обрабатывать входящие запросы и выполнять логику на основе поступающих задач. Аналогично другие компоненты будут инициализированы и настроены согласно предоставленной конфигурации.\n\n---\n\n### Заключение\n\nФункция `create_runtime` предназначена для создания и настройки runtime окружения, необходимого для выполнения рабочих процессов и пайплайнов. Она использует различные компоненты, такие как каналы коммуникации, хранилища состояний и очереди задач, для обеспечения эффективного обмена данными и управления рабочими процессами.\n\nТаким образом, функция создает основу для последующего запуска приложений и выполнения рабочих нагрузок, опираясь на четкую организацию и координацию компонентов системы.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS", + "C4_SEMANTIC_ROLES" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "function", + "symbol_candidates": [ + "create_runtime" + ], + "keyword_hints": [ + "create_runtime" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Объясни функцию create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "Объясни функцию create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Объясни функцию create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "Объясни функцию create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "create_runtime", + "alternatives": [ + "create_runtime" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 8, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 138, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 38, + "C0_SOURCE_CHUNKS": 21, + "C4_SEMANTIC_ROLES": 16, + "C2_DEPENDENCY_GRAPH": 48, + "C3_ENTRYPOINTS": 14 + }, + "merge_rank": 22, + "prompt_build": 0, + "llm_call": 6906 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 362, + "evidence_rows": 19, + "evidence_chars": 2136 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 8, + "unique_paths": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 1 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_v1", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "create_runtime" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 19, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-fullchain-explain-create-runtime", + "mode": "full_chain", + "run_started_at": "2026-03-12T09:13:14", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Объясни функцию create_runtime", + "normalized_query": "Объясни функцию create_runtime" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Объясни функцию create_runtime" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни функцию create_runtime" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "function", + "symbol_candidates": [ + "create_runtime" + ], + "keyword_hints": [ + "create_runtime" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Объясни функцию create_runtime" + }, + "output": { + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "create_runtime", + "alternatives": [ + "create_runtime" + ], + "confidence": 0.99 + }, + "rag_count": 19, + "rag_rows": [ + { + "path": "src/plba/bootstrap.py", + "content": "function create_runtime\ncreate_runtime(module)", + "layer": "C1_SYMBOL_CATALOG", + "title": "create_runtime", + "span_start": 8, + "span_end": 29, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "qname": "create_runtime", + "kind": "function", + "signature": "create_runtime(module)", + "parent_symbol_id": null, + "package_or_module": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/queue/in_memory.py", + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)", + "layer": "C4_SEMANTIC_ROLES", + "title": "InMemoryTaskQueue", + "span_start": 9, + "span_end": 38, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 22, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "2da04cb94544a3bcbf0943a95ad4bdd8710bcafaa32a02fd0e4de2178dcf3533", + "symbol_name": "InMemoryTaskQueue", + "qname": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 9, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "58f0cc001ccda0eee4c6bc32ed83bd05eafd6b6644f1e8b4aa9eed3103db73dc", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "ConfigFileLoader\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (8)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ConfigFileLoader", + "span_start": 11, + "span_end": 48, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 23, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "a8474eca8b6e9dc86ae67ed68b16fa5fb639ef08739c053e7b7195489765667f", + "symbol_name": "ConfigFileLoader", + "qname": "ConfigFileLoader", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 8, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workers/supervisor.py", + "content": "WorkerSupervisor\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkerSupervisor", + "span_start": 10, + "span_end": 59, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "c17b44e8d9e97d490989b21fa67d7c346cdda8a0472e4c41fb243c8846faa124", + "symbol_name": "WorkerSupervisor", + "qname": "WorkerSupervisor", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "77609d9d5927171cce7fc3a54897c183fd63068710c6362029b700937aae5eee", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowEngine", + "span_start": 10, + "span_end": 86, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "57ec0a9f11c542c78e008684a888397e8d9ef4223671acb2567e631a0cbc70b4", + "symbol_name": "WorkflowEngine", + "qname": "WorkflowEngine", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/store.py", + "content": "TraceContextStore\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "TraceContextStore", + "span_start": 15, + "span_end": 52, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b2dad4fbe16ffb11b58deba311c7739955c39d59f291b22181f33e9c8cce4059", + "symbol_name": "TraceContextStore", + "qname": "TraceContextStore", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "d369554f08fc92039c6edd5a2a1e73b23901533e8974459170bbd9347d263dc5", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime calls runtime.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:calls", + "span_start": 19, + "span_end": 19, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "4eaeec4ac55a59d5f66fd01c4754955f8fedaf4bc3df13fa769b352c7bfaacbb", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.add_config_file", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime reads_attr runtime.register_module", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:reads_attr", + "span_start": 28, + "span_end": 28, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "45516c79ff358dbf9b650a081668df0f66d2fe989300f985a1a78be6be166f8f", + "edge_type": "reads_attr", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.register_module", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:instantiates", + "span_start": 17, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "0adba17984f850ea1608c9e734d2dd5c325cfde3a8133123aa239e44935ad18e", + "edge_type": "instantiates", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": "27158ca220022eeb5083c6addf8a50775d45f7161284fd60aac48410105f4b98", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime calls runtime.register_module", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:calls", + "span_start": 28, + "span_end": 28, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "ab6003c3441addc1ba1b81edeca009165559f652f6b2cf424e5ae61b1f617de8", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.register_module", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime calls runtime.control_plane.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:calls", + "span_start": 21, + "span_end": 27, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "2678250030b9ce47a3b3b55fac7897ac530367edc8374ac9d5e6ecafb1e483f0", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.control_plane.register_channel", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime reads_attr runtime.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:reads_attr", + "span_start": 19, + "span_end": 19, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "30d4e8aae984ab84d523e80d02f1caeda52d547fa3d2aa47be8845931cabbca2", + "edge_type": "reads_attr", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.add_config_file", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "def create_runtime(\n module: ApplicationModule,\n *,\n config_path: str | None = None,\n enable_http_control: bool = False,\n control_host: str = \"127.0.0.1\",\n control_port: int = 8080,\n control_timeout: int = 5,\n) -> RuntimeManager:\n runtime = RuntimeManager()\n if config_path is not None:\n runtime.add_config_file(config_path)\n if enable_http_control:\n runtime.control_plane.register_channel(\n HttpControlChannel(\n host=control_host,\n port=control_port,\n timeout=control_timeout,\n )\n )\n runtime.register_module(module)\n return runtime", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/bootstrap.py:create_runtime", + "span_start": 8, + "span_end": 29, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Объясни функцию create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "Объясни функцию create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Объясни функцию create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "Объясни функцию create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "create_runtime", + "alternatives": [ + "create_runtime" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 8, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 138, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 38, + "C0_SOURCE_CHUNKS": 21, + "C4_SEMANTIC_ROLES": 16, + "C2_DEPENDENCY_GRAPH": 48, + "C3_ENTRYPOINTS": 14 + }, + "merge_rank": 22 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Объясни функцию create_runtime", + "rag_count": 19 + }, + "output": { + "llm_answer": "## Анализ функции `create_runtime` и архитектуры приложения\n\n### Описание функции `create_runtime`\nФункция `create_runtime` расположена в файле `src/plba/bootstrap.py`. Её основная задача — инициализация и настройка runtime окружения для выполнения рабочих процессов или пайплайнов в приложении.\n\n#### Сигнатура функции\n```python\ndef create_runtime(module):\n # ...\n```\nПараметр `module` представляет собой модуль Python, который может содержать дополнительные настройки или классы, необходимые для конфигурации runtime.\n\n---\n\n### Поток данных и архитектура системы\n\nАрхитектура приложения разделена на несколько компонентов, каждый из которых играет определённую роль в общей системе:\n\n1. **Pipeline Stages**\n - **HttpRunner**: Класс `UvicornThreadRunner`, расположенный в `src/app_runtime/control/http_runner.py`.\n - Отвечает за управление HTTP-запросами и участие в обмене данными между компонентами системы.\n - **Workflow Persistence**: Класс `WorkflowPersistence`, находящийся в `src/app_runtime/workflow/persistence/workflow_persistence.py`.\n - Обеспечивает сохранение состояния workflow и его восстановление при необходимости.\n - **Http Control Channel**: Класс `HttpControlChannel`, расположенный в `src/app_runtime/control/http_channel.py`.\n - Управляет каналами связи с внешним миром через HTTP.\n - **In Memory Task Queue**: Класс `InMemoryTaskQueue`, находящийся в `src/app_runtime/queue/in_memory.py`.\n - Хранит задачи в памяти и управляет их выполнением.\n - **Config File Loader**: Класс `ConfigFileLoader`, расположенный в `src/app_runtime/config/file_loader.py`.\n - Загружает конфигурационные файлы и обеспечивает доступ к их содержимому.\n\nКаждый из этих классов участвует в передаче данных и управлении состоянием системы, что позволяет эффективно организовать выполнение различных задач и пайплайнов.\n\n---\n\n### Архитектурный обзор и обязанности каждого компонента\n\n- **Pipeline Stages** – это компоненты, которые участвуют в обработке данных и координации работы других частей системы. Они реализуют конкретные бизнес-логики и отвечают за передачу информации между этапами обработки.\n \n - **HttpRunner**: используется для обработки входящих HTTP запросов и организации потоков данных от клиентов.\n - **Workflow Persistence**: отвечает за долговременное хранение и восстановление состояний workflow.\n - **Http Control Channel**: служит основным каналом управления внешними коммуникациями.\n - **In Memory Task Queue**: хранит и выполняет задачи в оперативной памяти.\n - **Config File Loader**: загружает внешние конфигурационные данные и предоставляет к ним доступ.\n\nЭти компоненты работают совместно, обеспечивая согласованное функционирование всей системы.\n\n---\n\n### Взаимодействие и зависимость компонентов\n\nПри вызове функции `create_runtime` происходит инициализация всех необходимых компонентов и создание связей между ними. Это включает настройку каналов коммуникации, загрузку конфигурации и подготовку среды для выполнения рабочих процессов.\n\nНапример, объект класса `UvicornThreadRunner` будет создан и настроен таким образом, чтобы обрабатывать входящие запросы и выполнять логику на основе поступающих задач. Аналогично другие компоненты будут инициализированы и настроены согласно предоставленной конфигурации.\n\n---\n\n### Заключение\n\nФункция `create_runtime` предназначена для создания и настройки runtime окружения, необходимого для выполнения рабочих процессов и пайплайнов. Она использует различные компоненты, такие как каналы коммуникации, хранилища состояний и очереди задач, для обеспечения эффективного обмена данными и управления рабочими процессами.\n\nТаким образом, функция создает основу для последующего запуска приложений и выполнения рабочих нагрузок, опираясь на четкую организацию и координацию компонентов системы." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 362, + "evidence_rows": 19, + "evidence_chars": 2136 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 8, + "unique_paths": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 1 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_v1", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 6906 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091314/full_chain_plba_code_retrieval_plba-fullchain-explain-create-runtime.md b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091314/full_chain_plba_code_retrieval_plba-fullchain-explain-create-runtime.md new file mode 100644 index 0000000..9b373af --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091314/full_chain_plba_code_retrieval_plba-fullchain-explain-create-runtime.md @@ -0,0 +1,34 @@ +# plba-fullchain-explain-create-runtime + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_retrieval.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Объясни функцию create_runtime + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 19, + "llm_answer": "## Анализ функции `create_runtime` и архитектуры приложения\n\n### Описание функции `create_runtime`\nФункция `create_runtime` расположена в файле `src/plba/bootstrap.py`. Её основная задача — инициализация и настройка runtime окружения для выполнения рабочих процессов или пайплайнов в приложении.\n\n#### Сигнатура функции\n```python\ndef create_runtime(module):\n # ...\n```\nПараметр `module` представляет собой модуль Python, который может содержать дополнительные настройки или классы, необходимые для конфигурации runtime.\n\n---\n\n### Поток данных и архитектура системы\n\nАрхитектура приложения разделена на несколько компонентов, каждый из которых играет определённую роль в общей системе:\n\n1. **Pipeline Stages**\n - **HttpRunner**: Класс `UvicornThreadRunner`, расположенный в `src/app_runtime/control/http_runner.py`.\n - Отвечает за управление HTTP-запросами и участие в обмене данными между компонентами системы.\n - **Workflow Persistence**: Класс `WorkflowPersistence`, находящийся в `src/app_runtime/workflow/persistence/workflow_persistence.py`.\n - Обеспечивает сохранение состояния workflow и его восстановление при необходимости.\n - **Http Control Channel**: Класс `HttpControlChannel`, расположенный в `src/app_runtime/control/http_channel.py`.\n - Управляет каналами связи с внешним миром через HTTP.\n - **In Memory Task Queue**: Класс `InMemoryTaskQueue`, находящийся в `src/app_runtime/queue/in_memory.py`.\n - Хранит задачи в памяти и управляет их выполнением.\n - **Config File Loader**: Класс `ConfigFileLoader`, расположенный в `src/app_runtime/config/file_loader.py`.\n - Загружает конфигурационные файлы и обеспечивает доступ к их содержимому.\n\nКаждый из этих классов участвует в передаче данных и управлении состоянием системы, что позволяет эффективно организовать выполнение различных задач и пайплайнов.\n\n---\n\n### Архитектурный обзор и обязанности каждого компонента\n\n- **Pipeline Stages** – это компоненты, которые участвуют в обработке данных и координации работы других частей системы. Они реализуют конкретные бизнес-логики и отвечают за передачу информации между этапами обработки.\n \n - **HttpRunner**: используется для обработки входящих HTTP запросов и организации потоков данных от клиентов.\n - **Workflow Persistence**: отвечает за долговременное хранение и восстановление состояний workflow.\n - **Http Control Channel**: служит основным каналом управления внешними коммуникациями.\n - **In Memory Task Queue**: хранит и выполняет задачи в оперативной памяти.\n - **Config File Loader**: загружает внешние конфигурационные данные и предоставляет к ним доступ.\n\nЭти компоненты работают совместно, обеспечивая согласованное функционирование всей системы.\n\n---\n\n### Взаимодействие и зависимость компонентов\n\nПри вызове функции `create_runtime` происходит инициализация всех необходимых компонентов и создание связей между ними. Это включает настройку каналов коммуникации, загрузку конфигурации и подготовку среды для выполнения рабочих процессов.\n\nНапример, объект класса `UvicornThreadRunner` будет создан и настроен таким образом, чтобы обрабатывать входящие запросы и выполнять логику на основе поступающих задач. Аналогично другие компоненты будут инициализированы и настроены согласно предоставленной конфигурации.\n\n---\n\n### Заключение\n\nФункция `create_runtime` предназначена для создания и настройки runtime окружения, необходимого для выполнения рабочих процессов и пайплайнов. Она использует различные компоненты, такие как каналы коммуникации, хранилища состояний и очереди задач, для обеспечения эффективного обмена данными и управления рабочими процессами.\n\nТаким образом, функция создает основу для последующего запуска приложений и выполнения рабочих нагрузок, опираясь на четкую организацию и координацию компонентов системы.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "create_runtime" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091314/full_chain_plba_code_retrieval_plba-fullchain-explain-http-control-channel.json b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091314/full_chain_plba_code_retrieval_plba-fullchain-explain-http-control-channel.json new file mode 100644 index 0000000..a7ca866 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091314/full_chain_plba_code_retrieval_plba-fullchain-explain-http-control-channel.json @@ -0,0 +1,2564 @@ +{ + "case_id": "plba-fullchain-explain-http-control-channel", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_retrieval.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 19, + "llm_answer": "## Анализ класса `HttpControlChannel`\n\n### 1. Обзор файла и контекста\n\nКласс `HttpControlChannel` определен в файле `src/app_runtime/control/http_channel.py`. Этот файл содержит классы и функции, связанные с управлением каналами HTTP, которые используются для взаимодействия с внешним миром через HTTP-запросы и ответы.\n\n### 2. Определение класса и его роль\n\n```python\nclass HttpControlChannel(ControlChannel):\n role: pipeline_stage\n```\n\nЭтот класс наследует от базового класса `ControlChannel`, что указывает на то, что он предназначен для управления состоянием приложения или модели и участвует в общей логике обработки данных внутри системы.\n\n### 3. Ответственность и обязанности класса\n\nСогласно комментариям и документации:\n\n- **Responsibilities:** \n - \"reads and writes state attributes\"\n - \"participates in dataflow slices (10)\"\n\nЭто означает, что данный канал отвечает за чтение и запись атрибутов состояния и участвует в нескольких срезах потока данных (dataflow slices).\n\n### 4. Сравнение с другими классами\n\n- **ControlChannel** (`src/app_runtime/control/base.py`) — это базовый класс, который описывает модельные роли и действия, общие для всех каналов контроля.\n \n- **ControlActionSet** (`src/app_runtime/control/base.py`) — этот класс также относится к моделям и представляет собой набор действий, связанных с моделью.\n\n- **ControlPlaneService** (`src/app_runtime/control/service.py`) — сервисный класс, участвующий в управлении состоянием и потоком данных.\n\n- **UvicornThreadRunner** (`src/app_runtime/control/http_runner.py`) — еще один компонент, связанный с обработкой HTTP-запросов и ответов, выполняемый в отдельном потоке.\n\n### 5. Поток данных и взаимодействие\n\nПоскольку `HttpControlChannel` участвует в \"dataflow slices\", предполагается, что он играет важную роль в координации потоков данных между различными компонентами системы, такими как сервисы, контроллеры и модели. Он взаимодействует с внешними системами посредством HTTP-запросов и отвечает за обновление внутреннего состояния системы на основе полученных ответов.\n\n### Заключение\n\nТаким образом, `HttpControlChannel` является специализированным каналом для управления состоянием и взаимодействия с внешней средой через HTTP-протокол. Он выполняет операции чтения и записи атрибутов состояния и участвует в обработке различных потоков данных внутри системы.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "HttpControlChannel" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-fullchain-explain-http-control-channel", + "text": "Объясни класс HttpControlChannel", + "mode": "full_chain", + "run_started_at": "2026-03-12T09:13:14", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни класс HttpControlChannel", + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "HttpControlChannel", + "alternatives": [ + "HttpControlChannel" + ], + "confidence": 0.99 + }, + "rag_count": 19, + "rag_rows": [ + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel\nHttpControlChannel(ControlChannel)", + "layer": "C1_SYMBOL_CATALOG", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "qname": "HttpControlChannel", + "kind": "class", + "signature": "HttpControlChannel(ControlChannel)", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/queue/in_memory.py", + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)", + "layer": "C4_SEMANTIC_ROLES", + "title": "InMemoryTaskQueue", + "span_start": 9, + "span_end": 38, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 22, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "2da04cb94544a3bcbf0943a95ad4bdd8710bcafaa32a02fd0e4de2178dcf3533", + "symbol_name": "InMemoryTaskQueue", + "qname": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 9, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "58f0cc001ccda0eee4c6bc32ed83bd05eafd6b6644f1e8b4aa9eed3103db73dc", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._runner\n -> HttpControlChannel.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 15, + "span_end": 22, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "51d73913df709152258ed1b9a8c8f4eb3c575eccfe6b982aef0b28e0789a29da", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0", + "dst_ref": "HttpControlChannel.start", + "resolution": "resolved", + "slice_id": "51d73913df709152258ed1b9a8c8f4eb3c575eccfe6b982aef0b28e0789a29da", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._runner", + "HttpControlChannel.start" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._runner\n -> HttpControlChannel.port", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 15, + "span_end": 29, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "c7167bab7218bb768ad7c11bfb40d1a3096e6071dd7817bba5fd864cf8f6de13", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "3632ce8227f4a31e0768f2fb021a4d1ba28e1202633aa0f2fac902295931280f", + "dst_ref": "HttpControlChannel.port", + "resolution": "resolved", + "slice_id": "c7167bab7218bb768ad7c11bfb40d1a3096e6071dd7817bba5fd864cf8f6de13", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._runner", + "HttpControlChannel.port" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "3632ce8227f4a31e0768f2fb021a4d1ba28e1202633aa0f2fac902295931280f" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._timeout\n -> HttpControlChannel._health_response", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 14, + "span_end": 34, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "f858f5c9e575f6c4cdfe3853571b7ee21d1f628a443541d2037c3dc9d0790bef", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "e84bf04e9cd2127df235b7064d05f47e19f19a89c7c82f4c247231d4e8fa426a", + "dst_ref": "HttpControlChannel._health_response", + "resolution": "resolved", + "slice_id": "f858f5c9e575f6c4cdfe3853571b7ee21d1f628a443541d2037c3dc9d0790bef", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._timeout", + "HttpControlChannel._health_response" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "e84bf04e9cd2127df235b7064d05f47e19f19a89c7c82f4c247231d4e8fa426a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._timeout\n -> HttpControlChannel._action_response", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "c3ef21fcae96c82c00be74b3ab827d4af2085d89cb3fa5521c19a174aad84dbb", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "e64969024ccaeb34d8d91473fad07b3b3d341875846392e7a006406c7ada1954", + "dst_ref": "HttpControlChannel._action_response", + "resolution": "resolved", + "slice_id": "c3ef21fcae96c82c00be74b3ab827d4af2085d89cb3fa5521c19a174aad84dbb", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._timeout", + "HttpControlChannel._action_response" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "e64969024ccaeb34d8d91473fad07b3b3d341875846392e7a006406c7ada1954" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._runner\n -> HttpControlChannel.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 15, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "0f827ef81a990258a8a74381c8564a8361afa6712dba3200592659c939adcb9d", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "f29ab212620093d72be20e26c5a399624c7939a6056a728762ed3f84a250bfa3", + "dst_ref": "HttpControlChannel.stop", + "resolution": "resolved", + "slice_id": "0f827ef81a990258a8a74381c8564a8361afa6712dba3200592659c939adcb9d", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._runner", + "HttpControlChannel.stop" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "f29ab212620093d72be20e26c5a399624c7939a6056a728762ed3f84a250bfa3" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._factory\n -> HttpControlChannel.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 16, + "span_end": 21, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e61ec25ded7dbe380d95ce2abcbc1d7a2d2afde5aa8453866df8706dfb7d6ddb", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0", + "dst_ref": "HttpControlChannel.start", + "resolution": "resolved", + "slice_id": "e61ec25ded7dbe380d95ce2abcbc1d7a2d2afde5aa8453866df8706dfb7d6ddb", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._factory", + "HttpControlChannel.start" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel(ControlChannel):\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._timeout = timeout\n self._runner = UvicornThreadRunner(host, port, timeout)\n self._factory = HttpControlAppFactory()\n self._actions: ControlActionSet | None = None\n\n async def start(self, actions: ControlActionSet) -> None:\n self._actions = actions\n app = self._factory.create(self._health_response, self._action_response)\n await self._runner.start(app)\n\n async def stop(self) -> None:\n await self._runner.stop()\n\n @property\n def port(self) -> int:\n return self._runner.port\n\n async def _health_response(self) -> dict[str, object]:\n if self._actions is None:\n return {\"status\": \"unhealthy\", \"detail\": \"control actions are not configured\"}\n return await asyncio.wait_for(self._actions.health(), timeout=float(self._timeout))\n\n async def _action_response(self, action: str, _client_source: str = \"unknown\") -> JSONResponse:\n if self._actions is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"{action} handler is not configured\"}, status_code=404)\n callbacks = {\n \"start\": self._actions.start,\n \"stop\": self._actions.stop,\n \"status\": self._actions.status,\n }\n callback = callbacks.get(action)\n if callback is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"unsupported action: {action}\"}, status_code=404)\n action_timeout = max(float(self._timeout), 10.0) if action in {\"start\", \"stop\"} else float(self._timeout)\n try:\n detail = await asyncio.wait_for(callback(), timeout=action_timeout)\n except asyncio.TimeoutError:\n return JSONResponse(\n content={\"status\": \"accepted\", \"detail\": f\"{action} operation is still in progress\"},\n status_code=202,\n )\n except Exception as exc:\n return JSONResponse(content={\"status\": \"error\", \"detail\": str(exc)}, status_code=500)\n return JSONResponse(content={\"status\": \"ok\", \"detail\": detail or f\"{action} action accepted\"}, status_code=200)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_channel.py:HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "## Анализ класса `HttpControlChannel`\n\n### 1. Обзор файла и контекста\n\nКласс `HttpControlChannel` определен в файле `src/app_runtime/control/http_channel.py`. Этот файл содержит классы и функции, связанные с управлением каналами HTTP, которые используются для взаимодействия с внешним миром через HTTP-запросы и ответы.\n\n### 2. Определение класса и его роль\n\n```python\nclass HttpControlChannel(ControlChannel):\n role: pipeline_stage\n```\n\nЭтот класс наследует от базового класса `ControlChannel`, что указывает на то, что он предназначен для управления состоянием приложения или модели и участвует в общей логике обработки данных внутри системы.\n\n### 3. Ответственность и обязанности класса\n\nСогласно комментариям и документации:\n\n- **Responsibilities:** \n - \"reads and writes state attributes\"\n - \"participates in dataflow slices (10)\"\n\nЭто означает, что данный канал отвечает за чтение и запись атрибутов состояния и участвует в нескольких срезах потока данных (dataflow slices).\n\n### 4. Сравнение с другими классами\n\n- **ControlChannel** (`src/app_runtime/control/base.py`) — это базовый класс, который описывает модельные роли и действия, общие для всех каналов контроля.\n \n- **ControlActionSet** (`src/app_runtime/control/base.py`) — этот класс также относится к моделям и представляет собой набор действий, связанных с моделью.\n\n- **ControlPlaneService** (`src/app_runtime/control/service.py`) — сервисный класс, участвующий в управлении состоянием и потоком данных.\n\n- **UvicornThreadRunner** (`src/app_runtime/control/http_runner.py`) — еще один компонент, связанный с обработкой HTTP-запросов и ответов, выполняемый в отдельном потоке.\n\n### 5. Поток данных и взаимодействие\n\nПоскольку `HttpControlChannel` участвует в \"dataflow slices\", предполагается, что он играет важную роль в координации потоков данных между различными компонентами системы, такими как сервисы, контроллеры и модели. Он взаимодействует с внешними системами посредством HTTP-запросов и отвечает за обновление внутреннего состояния системы на основе полученных ответов.\n\n### Заключение\n\nТаким образом, `HttpControlChannel` является специализированным каналом для управления состоянием и взаимодействия с внешней средой через HTTP-протокол. Он выполняет операции чтения и записи атрибутов состояния и участвует в обработке различных потоков данных внутри системы.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS", + "C4_SEMANTIC_ROLES" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "HttpControlChannel" + ], + "keyword_hints": [ + "HttpControlChannel" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "HttpControlChannel", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Объясни класс HttpControlChannel", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "Объясни класс HttpControlChannel", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Объясни класс HttpControlChannel", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "Объясни класс HttpControlChannel", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "HttpControlChannel", + "alternatives": [ + "HttpControlChannel" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 8, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 171, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 52, + "C0_SOURCE_CHUNKS": 22, + "C4_SEMANTIC_ROLES": 16, + "C2_DEPENDENCY_GRAPH": 65, + "C3_ENTRYPOINTS": 13 + }, + "merge_rank": 27, + "prompt_build": 0, + "llm_call": 5111 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 329, + "evidence_rows": 19, + "evidence_chars": 3845 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 8, + "unique_paths": 7 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 1 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_v1", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "HttpControlChannel" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 19, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-fullchain-explain-http-control-channel", + "mode": "full_chain", + "run_started_at": "2026-03-12T09:13:14", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Объясни класс HttpControlChannel", + "normalized_query": "Объясни класс HttpControlChannel" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Объясни класс HttpControlChannel" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни класс HttpControlChannel" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "HttpControlChannel" + ], + "keyword_hints": [ + "HttpControlChannel" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Объясни класс HttpControlChannel" + }, + "output": { + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "HttpControlChannel", + "alternatives": [ + "HttpControlChannel" + ], + "confidence": 0.99 + }, + "rag_count": 19, + "rag_rows": [ + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel\nHttpControlChannel(ControlChannel)", + "layer": "C1_SYMBOL_CATALOG", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "qname": "HttpControlChannel", + "kind": "class", + "signature": "HttpControlChannel(ControlChannel)", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/queue/in_memory.py", + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)", + "layer": "C4_SEMANTIC_ROLES", + "title": "InMemoryTaskQueue", + "span_start": 9, + "span_end": 38, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 22, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "2da04cb94544a3bcbf0943a95ad4bdd8710bcafaa32a02fd0e4de2178dcf3533", + "symbol_name": "InMemoryTaskQueue", + "qname": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 9, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "58f0cc001ccda0eee4c6bc32ed83bd05eafd6b6644f1e8b4aa9eed3103db73dc", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._runner\n -> HttpControlChannel.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 15, + "span_end": 22, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "51d73913df709152258ed1b9a8c8f4eb3c575eccfe6b982aef0b28e0789a29da", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0", + "dst_ref": "HttpControlChannel.start", + "resolution": "resolved", + "slice_id": "51d73913df709152258ed1b9a8c8f4eb3c575eccfe6b982aef0b28e0789a29da", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._runner", + "HttpControlChannel.start" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._runner\n -> HttpControlChannel.port", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 15, + "span_end": 29, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "c7167bab7218bb768ad7c11bfb40d1a3096e6071dd7817bba5fd864cf8f6de13", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "3632ce8227f4a31e0768f2fb021a4d1ba28e1202633aa0f2fac902295931280f", + "dst_ref": "HttpControlChannel.port", + "resolution": "resolved", + "slice_id": "c7167bab7218bb768ad7c11bfb40d1a3096e6071dd7817bba5fd864cf8f6de13", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._runner", + "HttpControlChannel.port" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "3632ce8227f4a31e0768f2fb021a4d1ba28e1202633aa0f2fac902295931280f" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._timeout\n -> HttpControlChannel._health_response", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 14, + "span_end": 34, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "f858f5c9e575f6c4cdfe3853571b7ee21d1f628a443541d2037c3dc9d0790bef", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "e84bf04e9cd2127df235b7064d05f47e19f19a89c7c82f4c247231d4e8fa426a", + "dst_ref": "HttpControlChannel._health_response", + "resolution": "resolved", + "slice_id": "f858f5c9e575f6c4cdfe3853571b7ee21d1f628a443541d2037c3dc9d0790bef", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._timeout", + "HttpControlChannel._health_response" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "e84bf04e9cd2127df235b7064d05f47e19f19a89c7c82f4c247231d4e8fa426a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._timeout\n -> HttpControlChannel._action_response", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "c3ef21fcae96c82c00be74b3ab827d4af2085d89cb3fa5521c19a174aad84dbb", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "e64969024ccaeb34d8d91473fad07b3b3d341875846392e7a006406c7ada1954", + "dst_ref": "HttpControlChannel._action_response", + "resolution": "resolved", + "slice_id": "c3ef21fcae96c82c00be74b3ab827d4af2085d89cb3fa5521c19a174aad84dbb", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._timeout", + "HttpControlChannel._action_response" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "e64969024ccaeb34d8d91473fad07b3b3d341875846392e7a006406c7ada1954" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._runner\n -> HttpControlChannel.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 15, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "0f827ef81a990258a8a74381c8564a8361afa6712dba3200592659c939adcb9d", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "f29ab212620093d72be20e26c5a399624c7939a6056a728762ed3f84a250bfa3", + "dst_ref": "HttpControlChannel.stop", + "resolution": "resolved", + "slice_id": "0f827ef81a990258a8a74381c8564a8361afa6712dba3200592659c939adcb9d", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._runner", + "HttpControlChannel.stop" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "f29ab212620093d72be20e26c5a399624c7939a6056a728762ed3f84a250bfa3" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._factory\n -> HttpControlChannel.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 16, + "span_end": 21, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e61ec25ded7dbe380d95ce2abcbc1d7a2d2afde5aa8453866df8706dfb7d6ddb", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0", + "dst_ref": "HttpControlChannel.start", + "resolution": "resolved", + "slice_id": "e61ec25ded7dbe380d95ce2abcbc1d7a2d2afde5aa8453866df8706dfb7d6ddb", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._factory", + "HttpControlChannel.start" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel(ControlChannel):\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._timeout = timeout\n self._runner = UvicornThreadRunner(host, port, timeout)\n self._factory = HttpControlAppFactory()\n self._actions: ControlActionSet | None = None\n\n async def start(self, actions: ControlActionSet) -> None:\n self._actions = actions\n app = self._factory.create(self._health_response, self._action_response)\n await self._runner.start(app)\n\n async def stop(self) -> None:\n await self._runner.stop()\n\n @property\n def port(self) -> int:\n return self._runner.port\n\n async def _health_response(self) -> dict[str, object]:\n if self._actions is None:\n return {\"status\": \"unhealthy\", \"detail\": \"control actions are not configured\"}\n return await asyncio.wait_for(self._actions.health(), timeout=float(self._timeout))\n\n async def _action_response(self, action: str, _client_source: str = \"unknown\") -> JSONResponse:\n if self._actions is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"{action} handler is not configured\"}, status_code=404)\n callbacks = {\n \"start\": self._actions.start,\n \"stop\": self._actions.stop,\n \"status\": self._actions.status,\n }\n callback = callbacks.get(action)\n if callback is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"unsupported action: {action}\"}, status_code=404)\n action_timeout = max(float(self._timeout), 10.0) if action in {\"start\", \"stop\"} else float(self._timeout)\n try:\n detail = await asyncio.wait_for(callback(), timeout=action_timeout)\n except asyncio.TimeoutError:\n return JSONResponse(\n content={\"status\": \"accepted\", \"detail\": f\"{action} operation is still in progress\"},\n status_code=202,\n )\n except Exception as exc:\n return JSONResponse(content={\"status\": \"error\", \"detail\": str(exc)}, status_code=500)\n return JSONResponse(content={\"status\": \"ok\", \"detail\": detail or f\"{action} action accepted\"}, status_code=200)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_channel.py:HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "HttpControlChannel", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Объясни класс HttpControlChannel", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "Объясни класс HttpControlChannel", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Объясни класс HttpControlChannel", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "Объясни класс HttpControlChannel", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "HttpControlChannel", + "alternatives": [ + "HttpControlChannel" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 8, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 171, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 52, + "C0_SOURCE_CHUNKS": 22, + "C4_SEMANTIC_ROLES": 16, + "C2_DEPENDENCY_GRAPH": 65, + "C3_ENTRYPOINTS": 13 + }, + "merge_rank": 27 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Объясни класс HttpControlChannel", + "rag_count": 19 + }, + "output": { + "llm_answer": "## Анализ класса `HttpControlChannel`\n\n### 1. Обзор файла и контекста\n\nКласс `HttpControlChannel` определен в файле `src/app_runtime/control/http_channel.py`. Этот файл содержит классы и функции, связанные с управлением каналами HTTP, которые используются для взаимодействия с внешним миром через HTTP-запросы и ответы.\n\n### 2. Определение класса и его роль\n\n```python\nclass HttpControlChannel(ControlChannel):\n role: pipeline_stage\n```\n\nЭтот класс наследует от базового класса `ControlChannel`, что указывает на то, что он предназначен для управления состоянием приложения или модели и участвует в общей логике обработки данных внутри системы.\n\n### 3. Ответственность и обязанности класса\n\nСогласно комментариям и документации:\n\n- **Responsibilities:** \n - \"reads and writes state attributes\"\n - \"participates in dataflow slices (10)\"\n\nЭто означает, что данный канал отвечает за чтение и запись атрибутов состояния и участвует в нескольких срезах потока данных (dataflow slices).\n\n### 4. Сравнение с другими классами\n\n- **ControlChannel** (`src/app_runtime/control/base.py`) — это базовый класс, который описывает модельные роли и действия, общие для всех каналов контроля.\n \n- **ControlActionSet** (`src/app_runtime/control/base.py`) — этот класс также относится к моделям и представляет собой набор действий, связанных с моделью.\n\n- **ControlPlaneService** (`src/app_runtime/control/service.py`) — сервисный класс, участвующий в управлении состоянием и потоком данных.\n\n- **UvicornThreadRunner** (`src/app_runtime/control/http_runner.py`) — еще один компонент, связанный с обработкой HTTP-запросов и ответов, выполняемый в отдельном потоке.\n\n### 5. Поток данных и взаимодействие\n\nПоскольку `HttpControlChannel` участвует в \"dataflow slices\", предполагается, что он играет важную роль в координации потоков данных между различными компонентами системы, такими как сервисы, контроллеры и модели. Он взаимодействует с внешними системами посредством HTTP-запросов и отвечает за обновление внутреннего состояния системы на основе полученных ответов.\n\n### Заключение\n\nТаким образом, `HttpControlChannel` является специализированным каналом для управления состоянием и взаимодействия с внешней средой через HTTP-протокол. Он выполняет операции чтения и записи атрибутов состояния и участвует в обработке различных потоков данных внутри системы." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 329, + "evidence_rows": 19, + "evidence_chars": 3845 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 8, + "unique_paths": 7 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 1 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_v1", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 5111 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091314/full_chain_plba_code_retrieval_plba-fullchain-explain-http-control-channel.md b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091314/full_chain_plba_code_retrieval_plba-fullchain-explain-http-control-channel.md new file mode 100644 index 0000000..e470b84 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091314/full_chain_plba_code_retrieval_plba-fullchain-explain-http-control-channel.md @@ -0,0 +1,34 @@ +# plba-fullchain-explain-http-control-channel + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_retrieval.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Объясни класс HttpControlChannel + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 19, + "llm_answer": "## Анализ класса `HttpControlChannel`\n\n### 1. Обзор файла и контекста\n\nКласс `HttpControlChannel` определен в файле `src/app_runtime/control/http_channel.py`. Этот файл содержит классы и функции, связанные с управлением каналами HTTP, которые используются для взаимодействия с внешним миром через HTTP-запросы и ответы.\n\n### 2. Определение класса и его роль\n\n```python\nclass HttpControlChannel(ControlChannel):\n role: pipeline_stage\n```\n\nЭтот класс наследует от базового класса `ControlChannel`, что указывает на то, что он предназначен для управления состоянием приложения или модели и участвует в общей логике обработки данных внутри системы.\n\n### 3. Ответственность и обязанности класса\n\nСогласно комментариям и документации:\n\n- **Responsibilities:** \n - \"reads and writes state attributes\"\n - \"participates in dataflow slices (10)\"\n\nЭто означает, что данный канал отвечает за чтение и запись атрибутов состояния и участвует в нескольких срезах потока данных (dataflow slices).\n\n### 4. Сравнение с другими классами\n\n- **ControlChannel** (`src/app_runtime/control/base.py`) — это базовый класс, который описывает модельные роли и действия, общие для всех каналов контроля.\n \n- **ControlActionSet** (`src/app_runtime/control/base.py`) — этот класс также относится к моделям и представляет собой набор действий, связанных с моделью.\n\n- **ControlPlaneService** (`src/app_runtime/control/service.py`) — сервисный класс, участвующий в управлении состоянием и потоком данных.\n\n- **UvicornThreadRunner** (`src/app_runtime/control/http_runner.py`) — еще один компонент, связанный с обработкой HTTP-запросов и ответов, выполняемый в отдельном потоке.\n\n### 5. Поток данных и взаимодействие\n\nПоскольку `HttpControlChannel` участвует в \"dataflow slices\", предполагается, что он играет важную роль в координации потоков данных между различными компонентами системы, такими как сервисы, контроллеры и модели. Он взаимодействует с внешними системами посредством HTTP-запросов и отвечает за обновление внутреннего состояния системы на основе полученных ответов.\n\n### Заключение\n\nТаким образом, `HttpControlChannel` является специализированным каналом для управления состоянием и взаимодействия с внешней средой через HTTP-протокол. Он выполняет операции чтения и записи атрибутов состояния и участвует в обработке различных потоков данных внутри системы.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "HttpControlChannel" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091314/full_chain_plba_code_retrieval_plba-fullchain-explain-runtime-manager.json b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091314/full_chain_plba_code_retrieval_plba-fullchain-explain-runtime-manager.json new file mode 100644 index 0000000..9daf1c9 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091314/full_chain_plba_code_retrieval_plba-fullchain-explain-runtime-manager.json @@ -0,0 +1,2564 @@ +{ + "case_id": "plba-fullchain-explain-runtime-manager", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_retrieval.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 19, + "llm_answer": "## Анализ класса `RuntimeManager`\n\n### 1. Положение и назначение класса\n\nКласс `RuntimeManager` определен в файле `src/app_runtime/core/runtime.py`. Его роль — **управляющий компонент**, который координирует выполнение различных ролей и подзадач внутри системы обработки данных.\n\n### 2. Ответственность (`Responsibilities`)\n\nСогласно документации, этот класс выполняет следующие обязанности:\n\n- Название класса указывает на его управляющую природу.\n- Координирует вызов ролей (ролей-подзадач) — всего их четыре.\n- Читает и записывает состояния атрибутов.\n- Участвует в разделах потока данных (dataflow slices).\n\nЭти обязанности подчеркивают важность этого компонента для управления последовательностью выполнения задач в системе.\n\n---\n\n### 3. Поток данных и архитектура\n\n#### a. Участие в данных потока (`dataflow slices`)\n\nДокументация указывает, что данный класс участвует в нескольких разрезах данных (slices). Это означает, что он играет ключевую роль в координации передачи информации между различными частями системы.\n\n#### b. Чтение и запись состояний атрибутов\n\nЭтот класс также активно взаимодействует с состоянием системы, читая и изменяя определенные атрибуты, что важно для поддержания согласованности данных и корректного функционирования системы.\n\n---\n\n### 4. Примеры использования и роли компонентов\n\n#### a. Контрольные каналы (`ControlChannel`, `ControlActionSet`)\n\n- `ControlChannel`: Стандартная модельный канал управления.\n- `ControlActionSet`: Набор действий модели.\n\nЭти компоненты обеспечивают механизм взаимодействия между различными ролями и стадиями процесса исполнения.\n\n#### b. Сервисы контроля (`ControlPlaneService`, `UvicornThreadRunner`)\n\n- `ControlPlaneService`: Обслуживает операции чтения и записи состояний атрибутов и принимает участие в пяти разрезах данных.\n- `UvicornThreadRunner`: Этот сервис используется для запуска HTTP-серверов через uvicorn в отдельном потоке и участвует в двадцати четырех разрезах данных.\n\nЭти сервисы являются частью общей инфраструктуры управления исполнением задач и участвуют в процессе обработки запросов пользователей.\n\n---\n\n### 5. Итоговое описание работы класса `RuntimeManager`\n\nКласс `RuntimeManager` является ключевым компонентом управляющей архитектуры приложения. Он отвечает за координацию вызова различных ролей или подзадач в системе, обеспечивая синхронизацию и последовательность операций. При этом он активно взаимодействует со своими окружающими компонентами (например, каналами управления, серверами, сервисами и др.), участвуя в обработке данных потоков и поддерживая целостность состояния системы.\n\nТаким образом, основная задача данного класса заключается в управлении логикой и последовательностью выполнения всех этапов обработки данных и взаимодействий с другими компонентами системы.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-fullchain-explain-runtime-manager", + "text": "Объясни как работает класс RuntimeManager", + "mode": "full_chain", + "run_started_at": "2026-03-12T09:13:14", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни как работает класс RuntimeManager", + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ], + "confidence": 0.99 + }, + "rag_count": 19, + "rag_rows": [ + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager\nRuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "qname": "RuntimeManager", + "kind": "class", + "signature": "RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests manager\n- orchestrates role-like calls (4)\n- reads and writes state attributes\n- participates in dataflow slices (50)", + "layer": "C4_SEMANTIC_ROLES", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 43, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "symbol_name": "RuntimeManager", + "qname": "RuntimeManager", + "role": "pipeline_stage", + "confidence": 0.67, + "dataflow_participation": 50, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 52, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "## Анализ класса `RuntimeManager`\n\n### 1. Положение и назначение класса\n\nКласс `RuntimeManager` определен в файле `src/app_runtime/core/runtime.py`. Его роль — **управляющий компонент**, который координирует выполнение различных ролей и подзадач внутри системы обработки данных.\n\n### 2. Ответственность (`Responsibilities`)\n\nСогласно документации, этот класс выполняет следующие обязанности:\n\n- Название класса указывает на его управляющую природу.\n- Координирует вызов ролей (ролей-подзадач) — всего их четыре.\n- Читает и записывает состояния атрибутов.\n- Участвует в разделах потока данных (dataflow slices).\n\nЭти обязанности подчеркивают важность этого компонента для управления последовательностью выполнения задач в системе.\n\n---\n\n### 3. Поток данных и архитектура\n\n#### a. Участие в данных потока (`dataflow slices`)\n\nДокументация указывает, что данный класс участвует в нескольких разрезах данных (slices). Это означает, что он играет ключевую роль в координации передачи информации между различными частями системы.\n\n#### b. Чтение и запись состояний атрибутов\n\nЭтот класс также активно взаимодействует с состоянием системы, читая и изменяя определенные атрибуты, что важно для поддержания согласованности данных и корректного функционирования системы.\n\n---\n\n### 4. Примеры использования и роли компонентов\n\n#### a. Контрольные каналы (`ControlChannel`, `ControlActionSet`)\n\n- `ControlChannel`: Стандартная модельный канал управления.\n- `ControlActionSet`: Набор действий модели.\n\nЭти компоненты обеспечивают механизм взаимодействия между различными ролями и стадиями процесса исполнения.\n\n#### b. Сервисы контроля (`ControlPlaneService`, `UvicornThreadRunner`)\n\n- `ControlPlaneService`: Обслуживает операции чтения и записи состояний атрибутов и принимает участие в пяти разрезах данных.\n- `UvicornThreadRunner`: Этот сервис используется для запуска HTTP-серверов через uvicorn в отдельном потоке и участвует в двадцати четырех разрезах данных.\n\nЭти сервисы являются частью общей инфраструктуры управления исполнением задач и участвуют в процессе обработки запросов пользователей.\n\n---\n\n### 5. Итоговое описание работы класса `RuntimeManager`\n\nКласс `RuntimeManager` является ключевым компонентом управляющей архитектуры приложения. Он отвечает за координацию вызова различных ролей или подзадач в системе, обеспечивая синхронизацию и последовательность операций. При этом он активно взаимодействует со своими окружающими компонентами (например, каналами управления, серверами, сервисами и др.), участвуя в обработке данных потоков и поддерживая целостность состояния системы.\n\nТаким образом, основная задача данного класса заключается в управлении логикой и последовательностью выполнения всех этапов обработки данных и взаимодействий с другими компонентами системы.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS", + "C4_SEMANTIC_ROLES" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Объясни как работает класс RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "Объясни как работает класс RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Объясни как работает класс RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "Объясни как работает класс RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 8, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 1, + "symbol_resolution": 0, + "retrieval_total": 276, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 51, + "C0_SOURCE_CHUNKS": 20, + "C4_SEMANTIC_ROLES": 14, + "C2_DEPENDENCY_GRAPH": 55, + "C3_ENTRYPOINTS": 10 + }, + "merge_rank": 19, + "prompt_build": 0, + "llm_call": 6047 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 335, + "evidence_rows": 19, + "evidence_chars": 7949 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 8, + "unique_paths": 7 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 2 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_v1", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "RuntimeManager" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 19, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-fullchain-explain-runtime-manager", + "mode": "full_chain", + "run_started_at": "2026-03-12T09:13:14", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Объясни как работает класс RuntimeManager", + "normalized_query": "Объясни как работает класс RuntimeManager" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Объясни как работает класс RuntimeManager" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни как работает класс RuntimeManager" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 1 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Объясни как работает класс RuntimeManager" + }, + "output": { + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ], + "confidence": 0.99 + }, + "rag_count": 19, + "rag_rows": [ + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager\nRuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "qname": "RuntimeManager", + "kind": "class", + "signature": "RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests manager\n- orchestrates role-like calls (4)\n- reads and writes state attributes\n- participates in dataflow slices (50)", + "layer": "C4_SEMANTIC_ROLES", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 43, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "symbol_name": "RuntimeManager", + "qname": "RuntimeManager", + "role": "pipeline_stage", + "confidence": 0.67, + "dataflow_participation": 50, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 52, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Объясни как работает класс RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "Объясни как работает класс RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Объясни как работает класс RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "Объясни как работает класс RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 8, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 276, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 51, + "C0_SOURCE_CHUNKS": 20, + "C4_SEMANTIC_ROLES": 14, + "C2_DEPENDENCY_GRAPH": 55, + "C3_ENTRYPOINTS": 10 + }, + "merge_rank": 19 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Объясни как работает класс RuntimeManager", + "rag_count": 19 + }, + "output": { + "llm_answer": "## Анализ класса `RuntimeManager`\n\n### 1. Положение и назначение класса\n\nКласс `RuntimeManager` определен в файле `src/app_runtime/core/runtime.py`. Его роль — **управляющий компонент**, который координирует выполнение различных ролей и подзадач внутри системы обработки данных.\n\n### 2. Ответственность (`Responsibilities`)\n\nСогласно документации, этот класс выполняет следующие обязанности:\n\n- Название класса указывает на его управляющую природу.\n- Координирует вызов ролей (ролей-подзадач) — всего их четыре.\n- Читает и записывает состояния атрибутов.\n- Участвует в разделах потока данных (dataflow slices).\n\nЭти обязанности подчеркивают важность этого компонента для управления последовательностью выполнения задач в системе.\n\n---\n\n### 3. Поток данных и архитектура\n\n#### a. Участие в данных потока (`dataflow slices`)\n\nДокументация указывает, что данный класс участвует в нескольких разрезах данных (slices). Это означает, что он играет ключевую роль в координации передачи информации между различными частями системы.\n\n#### b. Чтение и запись состояний атрибутов\n\nЭтот класс также активно взаимодействует с состоянием системы, читая и изменяя определенные атрибуты, что важно для поддержания согласованности данных и корректного функционирования системы.\n\n---\n\n### 4. Примеры использования и роли компонентов\n\n#### a. Контрольные каналы (`ControlChannel`, `ControlActionSet`)\n\n- `ControlChannel`: Стандартная модельный канал управления.\n- `ControlActionSet`: Набор действий модели.\n\nЭти компоненты обеспечивают механизм взаимодействия между различными ролями и стадиями процесса исполнения.\n\n#### b. Сервисы контроля (`ControlPlaneService`, `UvicornThreadRunner`)\n\n- `ControlPlaneService`: Обслуживает операции чтения и записи состояний атрибутов и принимает участие в пяти разрезах данных.\n- `UvicornThreadRunner`: Этот сервис используется для запуска HTTP-серверов через uvicorn в отдельном потоке и участвует в двадцати четырех разрезах данных.\n\nЭти сервисы являются частью общей инфраструктуры управления исполнением задач и участвуют в процессе обработки запросов пользователей.\n\n---\n\n### 5. Итоговое описание работы класса `RuntimeManager`\n\nКласс `RuntimeManager` является ключевым компонентом управляющей архитектуры приложения. Он отвечает за координацию вызова различных ролей или подзадач в системе, обеспечивая синхронизацию и последовательность операций. При этом он активно взаимодействует со своими окружающими компонентами (например, каналами управления, серверами, сервисами и др.), участвуя в обработке данных потоков и поддерживая целостность состояния системы.\n\nТаким образом, основная задача данного класса заключается в управлении логикой и последовательностью выполнения всех этапов обработки данных и взаимодействий с другими компонентами системы." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 335, + "evidence_rows": 19, + "evidence_chars": 7949 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 8, + "unique_paths": 7 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 2 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_v1", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 6047 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091314/full_chain_plba_code_retrieval_plba-fullchain-explain-runtime-manager.md b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091314/full_chain_plba_code_retrieval_plba-fullchain-explain-runtime-manager.md new file mode 100644 index 0000000..02477d4 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091314/full_chain_plba_code_retrieval_plba-fullchain-explain-runtime-manager.md @@ -0,0 +1,34 @@ +# plba-fullchain-explain-runtime-manager + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_retrieval.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Объясни как работает класс RuntimeManager + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 19, + "llm_answer": "## Анализ класса `RuntimeManager`\n\n### 1. Положение и назначение класса\n\nКласс `RuntimeManager` определен в файле `src/app_runtime/core/runtime.py`. Его роль — **управляющий компонент**, который координирует выполнение различных ролей и подзадач внутри системы обработки данных.\n\n### 2. Ответственность (`Responsibilities`)\n\nСогласно документации, этот класс выполняет следующие обязанности:\n\n- Название класса указывает на его управляющую природу.\n- Координирует вызов ролей (ролей-подзадач) — всего их четыре.\n- Читает и записывает состояния атрибутов.\n- Участвует в разделах потока данных (dataflow slices).\n\nЭти обязанности подчеркивают важность этого компонента для управления последовательностью выполнения задач в системе.\n\n---\n\n### 3. Поток данных и архитектура\n\n#### a. Участие в данных потока (`dataflow slices`)\n\nДокументация указывает, что данный класс участвует в нескольких разрезах данных (slices). Это означает, что он играет ключевую роль в координации передачи информации между различными частями системы.\n\n#### b. Чтение и запись состояний атрибутов\n\nЭтот класс также активно взаимодействует с состоянием системы, читая и изменяя определенные атрибуты, что важно для поддержания согласованности данных и корректного функционирования системы.\n\n---\n\n### 4. Примеры использования и роли компонентов\n\n#### a. Контрольные каналы (`ControlChannel`, `ControlActionSet`)\n\n- `ControlChannel`: Стандартная модельный канал управления.\n- `ControlActionSet`: Набор действий модели.\n\nЭти компоненты обеспечивают механизм взаимодействия между различными ролями и стадиями процесса исполнения.\n\n#### b. Сервисы контроля (`ControlPlaneService`, `UvicornThreadRunner`)\n\n- `ControlPlaneService`: Обслуживает операции чтения и записи состояний атрибутов и принимает участие в пяти разрезах данных.\n- `UvicornThreadRunner`: Этот сервис используется для запуска HTTP-серверов через uvicorn в отдельном потоке и участвует в двадцати четырех разрезах данных.\n\nЭти сервисы являются частью общей инфраструктуры управления исполнением задач и участвуют в процессе обработки запросов пользователей.\n\n---\n\n### 5. Итоговое описание работы класса `RuntimeManager`\n\nКласс `RuntimeManager` является ключевым компонентом управляющей архитектуры приложения. Он отвечает за координацию вызова различных ролей или подзадач в системе, обеспечивая синхронизацию и последовательность операций. При этом он активно взаимодействует со своими окружающими компонентами (например, каналами управления, серверами, сервисами и др.), участвуя в обработке данных потоков и поддерживая целостность состояния системы.\n\nТаким образом, основная задача данного класса заключается в управлении логикой и последовательностью выполнения всех этапов обработки данных и взаимодействий с другими компонентами системы.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091314/full_chain_plba_code_retrieval_plba-fullchain-explain-trace-service.json b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091314/full_chain_plba_code_retrieval_plba-fullchain-explain-trace-service.json new file mode 100644 index 0000000..c78edcc --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091314/full_chain_plba_code_retrieval_plba-fullchain-explain-trace-service.json @@ -0,0 +1,2684 @@ +{ + "case_id": "plba-fullchain-explain-trace-service", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_retrieval.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 21, + "llm_answer": "## Анализ архитектуры и поведения `TraceService`\n\n### 1. Описание `TraceService`\n`TraceService` — это класс, представляющий собой сервисную компоненту приложения, которая участвует в управлении трассировкой выполнения различных процессов внутри системы. Он наследует от класса `TraceContextFactory`, что указывает на его ответственность за создание и управление контекстом трассировки.\n\n### 2. Роли и обязанности компонента\nВ рамках общей архитектуры компонентов системы, `TraceService` играет роль `pipeline_stage`. Это означает, что он является одним из этапов общего конвейера обработки данных или задач в системе. \n\n#### Основные обязанности:\n- **Чтение и запись состояния атрибутов**: Взаимодействие с состоянием приложения через чтение и запись атрибутов.\n- **Участие в разделах потока данных**: Указано, что данный компонент участвует в 13 разных разделах потоков данных. Эти потоки данных являются частями общего процесса выполнения задач или работы сервиса.\n\n### 3. Место в общей архитектуре\n- **Связь с другими компонентами**:\n - `UvicornThreadRunner`: отвечает за запуск HTTP-сервера и выполнение запросов. Имеет аналогичную роль и обязанности как у `TraceService`.\n - `WorkflowPersistence`: ответственен за оркестровку вызовов ролей и участие в потоках данных (участвует в 16 разделах).\n - `HttpControlChannel`: занимается управлением каналами HTTP-контроля и взаимодействием с ними.\n - `InMemoryTaskQueue`: управляет очередями задач и их выполнением.\n\nВсе перечисленные компоненты являются частью единого конвейера обработки и участвуют в общих процессах обмена данными и управления задачами.\n\n### 4. Поток данных\nПотоки данных описывают последовательность операций и шагов, которые выполняются системой для достижения определенного результата. Участие каждого компонента в этих потоках обеспечивает целостность и согласованность всей системы при выполнении задач.\n\n### Итоговое объяснение работы `TraceService`\n\n`TraceService` является специализированным компонентом системы, отвечающим за управление контекстом трассировки и участие в общем потоке данных. Его основная задача — обеспечивать корректное отслеживание и ведение контекста выполнения задач, обеспечивая прозрачность и возможность анализа этих задач.\n\nЭтот компонент интегрируется в общую инфраструктуру системы, участвуя в нескольких потоках данных, обеспечивая согласованное взаимодействие между различными компонентами системы.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "TraceService" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-fullchain-explain-trace-service", + "text": "Как работает TraceService?", + "mode": "full_chain", + "run_started_at": "2026-03-12T09:13:14", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Как работает TraceService?", + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "TraceService", + "alternatives": [ + "TraceService" + ], + "confidence": 0.99 + }, + "rag_count": 21, + "rag_rows": [ + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceService\nTraceService(TraceContextFactory)", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService", + "span_start": 39, + "span_end": 166, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "c2b2b976d99f2c600000b753731b26e0a69adcb4359398b93073590c5d5d04f4", + "qname": "TraceService", + "kind": "class", + "signature": "TraceService(TraceContextFactory)", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (13)", + "layer": "C4_SEMANTIC_ROLES", + "title": "TraceService", + "span_start": 39, + "span_end": 166, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 60, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "c2b2b976d99f2c600000b753731b26e0a69adcb4359398b93073590c5d5d04f4", + "symbol_name": "TraceService", + "qname": "TraceService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 13, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/queue/in_memory.py", + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)", + "layer": "C4_SEMANTIC_ROLES", + "title": "InMemoryTaskQueue", + "span_start": 9, + "span_end": 38, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 22, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "2da04cb94544a3bcbf0943a95ad4bdd8710bcafaa32a02fd0e4de2178dcf3533", + "symbol_name": "InMemoryTaskQueue", + "qname": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 9, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "58f0cc001ccda0eee4c6bc32ed83bd05eafd6b6644f1e8b4aa9eed3103db73dc", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "ConfigFileLoader\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (8)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ConfigFileLoader", + "span_start": 11, + "span_end": 48, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 23, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "a8474eca8b6e9dc86ae67ed68b16fa5fb639ef08739c053e7b7195489765667f", + "symbol_name": "ConfigFileLoader", + "qname": "ConfigFileLoader", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 8, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/store.py", + "content": "TraceContextStore\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "TraceContextStore", + "span_start": 15, + "span_end": 52, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b2dad4fbe16ffb11b58deba311c7739955c39d59f291b22181f33e9c8cce4059", + "symbol_name": "TraceContextStore", + "qname": "TraceContextStore", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "d369554f08fc92039c6edd5a2a1e73b23901533e8974459170bbd9347d263dc5", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workers/supervisor.py", + "content": "WorkerSupervisor\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkerSupervisor", + "span_start": 10, + "span_end": 59, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "c17b44e8d9e97d490989b21fa67d7c346cdda8a0472e4c41fb243c8846faa124", + "symbol_name": "WorkerSupervisor", + "qname": "WorkerSupervisor", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "77609d9d5927171cce7fc3a54897c183fd63068710c6362029b700937aae5eee", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.create_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 61, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3b052062067a78aef3302ee1d996897e02a67d1b340397bea4f59fe147c0492a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a", + "dst_ref": "TraceService.create_context", + "resolution": "resolved", + "slice_id": "3b052062067a78aef3302ee1d996897e02a67d1b340397bea4f59fe147c0492a", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.create_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.close_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 84, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "7a9353ef57c9ae5d19b3a0c6ac50fad05e6d21d31bbe1cd1cd07af6332ba6505", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "01e14158dcced7e52d0c8ac84ac7b9a75225c261b6aca6a1d7da802d0994721c", + "dst_ref": "TraceService.close_context", + "resolution": "resolved", + "slice_id": "7a9353ef57c9ae5d19b3a0c6ac50fad05e6d21d31bbe1cd1cd07af6332ba6505", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.close_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "01e14158dcced7e52d0c8ac84ac7b9a75225c261b6aca6a1d7da802d0994721c" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.open_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 78, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a6e13b9ebc4fed84586afd53ed92a4d14757e440873f572b2337d5622ee96031", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426", + "dst_ref": "TraceService.open_context", + "resolution": "resolved", + "slice_id": "a6e13b9ebc4fed84586afd53ed92a4d14757e440873f572b2337d5622ee96031", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.open_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.transport\n -> TraceService.__init__", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 41, + "span_end": 43, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "1e923a93faa05c3c43ca9b19bd047007a8589ccce57d3cc1798ae7f9f200af98", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "dst_ref": "TraceService.__init__", + "resolution": "resolved", + "slice_id": "1e923a93faa05c3c43ca9b19bd047007a8589ccce57d3cc1798ae7f9f200af98", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.transport", + "TraceService.__init__" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.current_trace_id", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 81, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3ea17138634b1190bded77ddb84aa1595124f6519b246f24fc4b02bd62b5cac1", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c", + "dst_ref": "TraceService.current_trace_id", + "resolution": "resolved", + "slice_id": "3ea17138634b1190bded77ddb84aa1595124f6519b246f24fc4b02bd62b5cac1", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.current_trace_id" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.step", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 88, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "9f34c5da9b09fba99df6f6b1bde183a9aeb45111b8218a747c71590c2c9f60f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "c44bfbc66cf747283f30088da3e011a10395031d41e77b74e523c24997f641ca", + "dst_ref": "TraceService.step", + "resolution": "resolved", + "slice_id": "9f34c5da9b09fba99df6f6b1bde183a9aeb45111b8218a747c71590c2c9f60f2", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.step" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "c44bfbc66cf747283f30088da3e011a10395031d41e77b74e523c24997f641ca" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceRecordWriter:\n def __init__(self, transport: TraceTransport) -> None:\n self._logger = logging.getLogger(__name__)\n self._transport = transport\n\n def write_context(self, record: TraceContextRecord) -> None:\n try:\n self._transport.write_context(record)\n except Exception:\n self._logger.exception(\"Trace transport failed to write context %s\", record.trace_id)\n\n def write_message(self, record: TraceLogMessage) -> None:\n try:\n self._transport.write_message(record)\n except Exception:\n self._logger.exception(\"Trace transport failed to write message for %s\", record.trace_id)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/tracing/service.py:TraceRecordWriter", + "span_start": 21, + "span_end": 36, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceService(TraceContextFactory):\n def __init__(self, transport: TraceTransport | None = None, store: TraceContextStore | None = None) -> None:\n self.transport = transport or NoOpTraceTransport()\n self.store = store or TraceContextStore()\n self._writer = TraceRecordWriter(self.transport)\n\n def create_context(\n self,\n *,\n alias: str,\n parent_id: str | None = None,\n kind: str | None = None,\n attrs: dict[str, Any] | None = None,\n ) -> str:\n record = TraceContextRecord(\n trace_id=uuid4().hex,\n alias=str(alias or \"\"),\n parent_id=parent_id,\n type=kind,\n event_time=utc_now(),\n attrs=dict(attrs or {}),\n )\n self.store.push(record)\n self._writer.write_context(record)\n return record.trace_id\n\n @contextmanager\n def open_context(\n self,\n *,\n alias: str,\n parent_id: str | None = None,\n kind: str | None = None,\n attrs: dict[str, Any] | None = None,\n ) -> Iterator[str]:\n trace_id = self.create_context(alias=alias, parent_id=parent_id, kind=kind, attrs=attrs)\n try:\n yield trace_id\n finally:\n self.store.pop()\n\n def current_trace_id(self) -> str | None:\n return self.store.current_trace_id()\n\n def close_context(self) -> str | None:\n previous = self.store.pop()\n return previous.record.trace_id if previous else None\n\n def step(self, name: str) -> None:\n self.store.set_step(str(name or \"\"))\n\n def info(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"INFO\", message, status, attrs)\n\n def debug(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"DEBUG\", message, status, attrs)\n\n def warning(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"WARNING\", message, status, attrs)\n\n def error(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"ERROR\", message, status, attrs)\n\n def exception(self, message: str, *, status: str = \"failed\", attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"ERROR\", message, status, attrs)\n\n def new_root(self, operation: str) -> TraceContext:\n trace_id = self.create_context(alias=operation, kind=\"operation\", attrs={\"operation\": operation})\n return TraceContext(trace_id=trace_id, span_id=trace_id, attributes={\"operation\": operation})\n\n def child_of(self, parent: TraceContext, operation: str) -> TraceContext:\n trace_id = self.create_context(\n alias=operation,\n parent_id=parent.trace_id,\n kind=\"worker\",\n attrs={\"operation\": operation},\n )\n return TraceContext(\n trace_id=trace_id,\n span_id=trace_id,\n parent_span_id=parent.span_id,\n attributes={\"operation\": operation},\n )\n\n def attach(self, metadata: dict[str, object], context: TraceContext) -> dict[str, object]:\n updated = dict(metadata)\n updated[\"trace_id\"] = context.trace_id\n updated[\"span_id\"] = context.span_id\n updated[\"parent_span_id\"] = context.parent_span_id\n return updated\n\n def resume(self, metadata: dict[str, object], operation: str) -> TraceContext:\n trace_id = str(metadata.get(\"trace_id\") or uuid4().hex)\n span_id = str(metadata.get(\"span_id\") or trace_id)\n parent_id = metadata.get(\"parent_span_id\")\n self.create_context(\n alias=operation,\n parent_id=str(parent_id) if parent_id else None,\n kind=\"worker\",\n attrs=dict(metadata),\n )\n return TraceContext(\n trace_id=trace_id,\n span_id=span_id,\n parent_span_id=str(parent_id) if parent_id else None,\n attributes={\"operation\": operation},\n )\n\n def _write_message(\n self,\n level: TraceLevel,\n message: str,\n status: str | None,\n attrs: dict[str, Any] | None,\n ) -> None:\n active = self.store.current()\n if active is None:\n raise RuntimeError(\"Trace context is not bound. Call create_context() first.\")\n record = TraceLogMessage(\n trace_id=active.record.trace_id,\n step=active.step,\n status=str(status or \"\"),\n message=str(message or \"\"),\n level=level,\n event_time=utc_now(),\n attrs=dict(attrs or {}),\n )\n self._writer.write_message(record)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/tracing/service.py:TraceService", + "span_start": 39, + "span_end": 166, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceManager(TraceService):\n \"\"\"Compatibility alias during the transition from ConfigManager-shaped naming.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/tracing/service.py:TraceManager", + "span_start": 169, + "span_end": 170, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 2, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "## Анализ архитектуры и поведения `TraceService`\n\n### 1. Описание `TraceService`\n`TraceService` — это класс, представляющий собой сервисную компоненту приложения, которая участвует в управлении трассировкой выполнения различных процессов внутри системы. Он наследует от класса `TraceContextFactory`, что указывает на его ответственность за создание и управление контекстом трассировки.\n\n### 2. Роли и обязанности компонента\nВ рамках общей архитектуры компонентов системы, `TraceService` играет роль `pipeline_stage`. Это означает, что он является одним из этапов общего конвейера обработки данных или задач в системе. \n\n#### Основные обязанности:\n- **Чтение и запись состояния атрибутов**: Взаимодействие с состоянием приложения через чтение и запись атрибутов.\n- **Участие в разделах потока данных**: Указано, что данный компонент участвует в 13 разных разделах потоков данных. Эти потоки данных являются частями общего процесса выполнения задач или работы сервиса.\n\n### 3. Место в общей архитектуре\n- **Связь с другими компонентами**:\n - `UvicornThreadRunner`: отвечает за запуск HTTP-сервера и выполнение запросов. Имеет аналогичную роль и обязанности как у `TraceService`.\n - `WorkflowPersistence`: ответственен за оркестровку вызовов ролей и участие в потоках данных (участвует в 16 разделах).\n - `HttpControlChannel`: занимается управлением каналами HTTP-контроля и взаимодействием с ними.\n - `InMemoryTaskQueue`: управляет очередями задач и их выполнением.\n\nВсе перечисленные компоненты являются частью единого конвейера обработки и участвуют в общих процессах обмена данными и управления задачами.\n\n### 4. Поток данных\nПотоки данных описывают последовательность операций и шагов, которые выполняются системой для достижения определенного результата. Участие каждого компонента в этих потоках обеспечивает целостность и согласованность всей системы при выполнении задач.\n\n### Итоговое объяснение работы `TraceService`\n\n`TraceService` является специализированным компонентом системы, отвечающим за управление контекстом трассировки и участие в общем потоке данных. Его основная задача — обеспечивать корректное отслеживание и ведение контекста выполнения задач, обеспечивая прозрачность и возможность анализа этих задач.\n\nЭтот компонент интегрируется в общую инфраструктуру системы, участвуя в нескольких потоках данных, обеспечивая согласованное взаимодействие между различными компонентами системы.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS", + "C4_SEMANTIC_ROLES" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "TraceService" + ], + "keyword_hints": [ + "TraceService" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "TraceService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Как работает TraceService?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "Как работает TraceService?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Как работает TraceService?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "Как работает TraceService?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "TraceService", + "alternatives": [ + "TraceService" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 8, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 130, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 29, + "C0_SOURCE_CHUNKS": 14, + "C4_SEMANTIC_ROLES": 14, + "C2_DEPENDENCY_GRAPH": 47, + "C3_ENTRYPOINTS": 23 + }, + "merge_rank": 24, + "prompt_build": 0, + "llm_call": 5323 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 371, + "evidence_rows": 21, + "evidence_chars": 7281 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 8, + "unique_paths": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 1 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 3, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_v1", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "TraceService" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 21, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-fullchain-explain-trace-service", + "mode": "full_chain", + "run_started_at": "2026-03-12T09:13:14", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Как работает TraceService?", + "normalized_query": "Как работает TraceService?" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Как работает TraceService?" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Как работает TraceService?" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "TraceService" + ], + "keyword_hints": [ + "TraceService" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Как работает TraceService?" + }, + "output": { + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "TraceService", + "alternatives": [ + "TraceService" + ], + "confidence": 0.99 + }, + "rag_count": 21, + "rag_rows": [ + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceService\nTraceService(TraceContextFactory)", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService", + "span_start": 39, + "span_end": 166, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "c2b2b976d99f2c600000b753731b26e0a69adcb4359398b93073590c5d5d04f4", + "qname": "TraceService", + "kind": "class", + "signature": "TraceService(TraceContextFactory)", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (13)", + "layer": "C4_SEMANTIC_ROLES", + "title": "TraceService", + "span_start": 39, + "span_end": 166, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 60, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "c2b2b976d99f2c600000b753731b26e0a69adcb4359398b93073590c5d5d04f4", + "symbol_name": "TraceService", + "qname": "TraceService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 13, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/queue/in_memory.py", + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)", + "layer": "C4_SEMANTIC_ROLES", + "title": "InMemoryTaskQueue", + "span_start": 9, + "span_end": 38, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 22, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "2da04cb94544a3bcbf0943a95ad4bdd8710bcafaa32a02fd0e4de2178dcf3533", + "symbol_name": "InMemoryTaskQueue", + "qname": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 9, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "58f0cc001ccda0eee4c6bc32ed83bd05eafd6b6644f1e8b4aa9eed3103db73dc", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "ConfigFileLoader\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (8)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ConfigFileLoader", + "span_start": 11, + "span_end": 48, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 23, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "a8474eca8b6e9dc86ae67ed68b16fa5fb639ef08739c053e7b7195489765667f", + "symbol_name": "ConfigFileLoader", + "qname": "ConfigFileLoader", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 8, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/store.py", + "content": "TraceContextStore\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "TraceContextStore", + "span_start": 15, + "span_end": 52, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b2dad4fbe16ffb11b58deba311c7739955c39d59f291b22181f33e9c8cce4059", + "symbol_name": "TraceContextStore", + "qname": "TraceContextStore", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "d369554f08fc92039c6edd5a2a1e73b23901533e8974459170bbd9347d263dc5", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workers/supervisor.py", + "content": "WorkerSupervisor\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkerSupervisor", + "span_start": 10, + "span_end": 59, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "c17b44e8d9e97d490989b21fa67d7c346cdda8a0472e4c41fb243c8846faa124", + "symbol_name": "WorkerSupervisor", + "qname": "WorkerSupervisor", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "77609d9d5927171cce7fc3a54897c183fd63068710c6362029b700937aae5eee", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.create_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 61, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3b052062067a78aef3302ee1d996897e02a67d1b340397bea4f59fe147c0492a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a", + "dst_ref": "TraceService.create_context", + "resolution": "resolved", + "slice_id": "3b052062067a78aef3302ee1d996897e02a67d1b340397bea4f59fe147c0492a", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.create_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.close_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 84, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "7a9353ef57c9ae5d19b3a0c6ac50fad05e6d21d31bbe1cd1cd07af6332ba6505", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "01e14158dcced7e52d0c8ac84ac7b9a75225c261b6aca6a1d7da802d0994721c", + "dst_ref": "TraceService.close_context", + "resolution": "resolved", + "slice_id": "7a9353ef57c9ae5d19b3a0c6ac50fad05e6d21d31bbe1cd1cd07af6332ba6505", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.close_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "01e14158dcced7e52d0c8ac84ac7b9a75225c261b6aca6a1d7da802d0994721c" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.open_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 78, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a6e13b9ebc4fed84586afd53ed92a4d14757e440873f572b2337d5622ee96031", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426", + "dst_ref": "TraceService.open_context", + "resolution": "resolved", + "slice_id": "a6e13b9ebc4fed84586afd53ed92a4d14757e440873f572b2337d5622ee96031", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.open_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.transport\n -> TraceService.__init__", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 41, + "span_end": 43, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "1e923a93faa05c3c43ca9b19bd047007a8589ccce57d3cc1798ae7f9f200af98", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "dst_ref": "TraceService.__init__", + "resolution": "resolved", + "slice_id": "1e923a93faa05c3c43ca9b19bd047007a8589ccce57d3cc1798ae7f9f200af98", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.transport", + "TraceService.__init__" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.current_trace_id", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 81, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3ea17138634b1190bded77ddb84aa1595124f6519b246f24fc4b02bd62b5cac1", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c", + "dst_ref": "TraceService.current_trace_id", + "resolution": "resolved", + "slice_id": "3ea17138634b1190bded77ddb84aa1595124f6519b246f24fc4b02bd62b5cac1", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.current_trace_id" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.step", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 88, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "9f34c5da9b09fba99df6f6b1bde183a9aeb45111b8218a747c71590c2c9f60f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "c44bfbc66cf747283f30088da3e011a10395031d41e77b74e523c24997f641ca", + "dst_ref": "TraceService.step", + "resolution": "resolved", + "slice_id": "9f34c5da9b09fba99df6f6b1bde183a9aeb45111b8218a747c71590c2c9f60f2", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.step" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "c44bfbc66cf747283f30088da3e011a10395031d41e77b74e523c24997f641ca" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceRecordWriter:\n def __init__(self, transport: TraceTransport) -> None:\n self._logger = logging.getLogger(__name__)\n self._transport = transport\n\n def write_context(self, record: TraceContextRecord) -> None:\n try:\n self._transport.write_context(record)\n except Exception:\n self._logger.exception(\"Trace transport failed to write context %s\", record.trace_id)\n\n def write_message(self, record: TraceLogMessage) -> None:\n try:\n self._transport.write_message(record)\n except Exception:\n self._logger.exception(\"Trace transport failed to write message for %s\", record.trace_id)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/tracing/service.py:TraceRecordWriter", + "span_start": 21, + "span_end": 36, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceService(TraceContextFactory):\n def __init__(self, transport: TraceTransport | None = None, store: TraceContextStore | None = None) -> None:\n self.transport = transport or NoOpTraceTransport()\n self.store = store or TraceContextStore()\n self._writer = TraceRecordWriter(self.transport)\n\n def create_context(\n self,\n *,\n alias: str,\n parent_id: str | None = None,\n kind: str | None = None,\n attrs: dict[str, Any] | None = None,\n ) -> str:\n record = TraceContextRecord(\n trace_id=uuid4().hex,\n alias=str(alias or \"\"),\n parent_id=parent_id,\n type=kind,\n event_time=utc_now(),\n attrs=dict(attrs or {}),\n )\n self.store.push(record)\n self._writer.write_context(record)\n return record.trace_id\n\n @contextmanager\n def open_context(\n self,\n *,\n alias: str,\n parent_id: str | None = None,\n kind: str | None = None,\n attrs: dict[str, Any] | None = None,\n ) -> Iterator[str]:\n trace_id = self.create_context(alias=alias, parent_id=parent_id, kind=kind, attrs=attrs)\n try:\n yield trace_id\n finally:\n self.store.pop()\n\n def current_trace_id(self) -> str | None:\n return self.store.current_trace_id()\n\n def close_context(self) -> str | None:\n previous = self.store.pop()\n return previous.record.trace_id if previous else None\n\n def step(self, name: str) -> None:\n self.store.set_step(str(name or \"\"))\n\n def info(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"INFO\", message, status, attrs)\n\n def debug(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"DEBUG\", message, status, attrs)\n\n def warning(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"WARNING\", message, status, attrs)\n\n def error(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"ERROR\", message, status, attrs)\n\n def exception(self, message: str, *, status: str = \"failed\", attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"ERROR\", message, status, attrs)\n\n def new_root(self, operation: str) -> TraceContext:\n trace_id = self.create_context(alias=operation, kind=\"operation\", attrs={\"operation\": operation})\n return TraceContext(trace_id=trace_id, span_id=trace_id, attributes={\"operation\": operation})\n\n def child_of(self, parent: TraceContext, operation: str) -> TraceContext:\n trace_id = self.create_context(\n alias=operation,\n parent_id=parent.trace_id,\n kind=\"worker\",\n attrs={\"operation\": operation},\n )\n return TraceContext(\n trace_id=trace_id,\n span_id=trace_id,\n parent_span_id=parent.span_id,\n attributes={\"operation\": operation},\n )\n\n def attach(self, metadata: dict[str, object], context: TraceContext) -> dict[str, object]:\n updated = dict(metadata)\n updated[\"trace_id\"] = context.trace_id\n updated[\"span_id\"] = context.span_id\n updated[\"parent_span_id\"] = context.parent_span_id\n return updated\n\n def resume(self, metadata: dict[str, object], operation: str) -> TraceContext:\n trace_id = str(metadata.get(\"trace_id\") or uuid4().hex)\n span_id = str(metadata.get(\"span_id\") or trace_id)\n parent_id = metadata.get(\"parent_span_id\")\n self.create_context(\n alias=operation,\n parent_id=str(parent_id) if parent_id else None,\n kind=\"worker\",\n attrs=dict(metadata),\n )\n return TraceContext(\n trace_id=trace_id,\n span_id=span_id,\n parent_span_id=str(parent_id) if parent_id else None,\n attributes={\"operation\": operation},\n )\n\n def _write_message(\n self,\n level: TraceLevel,\n message: str,\n status: str | None,\n attrs: dict[str, Any] | None,\n ) -> None:\n active = self.store.current()\n if active is None:\n raise RuntimeError(\"Trace context is not bound. Call create_context() first.\")\n record = TraceLogMessage(\n trace_id=active.record.trace_id,\n step=active.step,\n status=str(status or \"\"),\n message=str(message or \"\"),\n level=level,\n event_time=utc_now(),\n attrs=dict(attrs or {}),\n )\n self._writer.write_message(record)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/tracing/service.py:TraceService", + "span_start": 39, + "span_end": 166, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceManager(TraceService):\n \"\"\"Compatibility alias during the transition from ConfigManager-shaped naming.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/tracing/service.py:TraceManager", + "span_start": 169, + "span_end": 170, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 2, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "TraceService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Как работает TraceService?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "Как работает TraceService?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Как работает TraceService?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "Как работает TraceService?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "TraceService", + "alternatives": [ + "TraceService" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 8, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 130, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 29, + "C0_SOURCE_CHUNKS": 14, + "C4_SEMANTIC_ROLES": 14, + "C2_DEPENDENCY_GRAPH": 47, + "C3_ENTRYPOINTS": 23 + }, + "merge_rank": 24 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Как работает TraceService?", + "rag_count": 21 + }, + "output": { + "llm_answer": "## Анализ архитектуры и поведения `TraceService`\n\n### 1. Описание `TraceService`\n`TraceService` — это класс, представляющий собой сервисную компоненту приложения, которая участвует в управлении трассировкой выполнения различных процессов внутри системы. Он наследует от класса `TraceContextFactory`, что указывает на его ответственность за создание и управление контекстом трассировки.\n\n### 2. Роли и обязанности компонента\nВ рамках общей архитектуры компонентов системы, `TraceService` играет роль `pipeline_stage`. Это означает, что он является одним из этапов общего конвейера обработки данных или задач в системе. \n\n#### Основные обязанности:\n- **Чтение и запись состояния атрибутов**: Взаимодействие с состоянием приложения через чтение и запись атрибутов.\n- **Участие в разделах потока данных**: Указано, что данный компонент участвует в 13 разных разделах потоков данных. Эти потоки данных являются частями общего процесса выполнения задач или работы сервиса.\n\n### 3. Место в общей архитектуре\n- **Связь с другими компонентами**:\n - `UvicornThreadRunner`: отвечает за запуск HTTP-сервера и выполнение запросов. Имеет аналогичную роль и обязанности как у `TraceService`.\n - `WorkflowPersistence`: ответственен за оркестровку вызовов ролей и участие в потоках данных (участвует в 16 разделах).\n - `HttpControlChannel`: занимается управлением каналами HTTP-контроля и взаимодействием с ними.\n - `InMemoryTaskQueue`: управляет очередями задач и их выполнением.\n\nВсе перечисленные компоненты являются частью единого конвейера обработки и участвуют в общих процессах обмена данными и управления задачами.\n\n### 4. Поток данных\nПотоки данных описывают последовательность операций и шагов, которые выполняются системой для достижения определенного результата. Участие каждого компонента в этих потоках обеспечивает целостность и согласованность всей системы при выполнении задач.\n\n### Итоговое объяснение работы `TraceService`\n\n`TraceService` является специализированным компонентом системы, отвечающим за управление контекстом трассировки и участие в общем потоке данных. Его основная задача — обеспечивать корректное отслеживание и ведение контекста выполнения задач, обеспечивая прозрачность и возможность анализа этих задач.\n\nЭтот компонент интегрируется в общую инфраструктуру системы, участвуя в нескольких потоках данных, обеспечивая согласованное взаимодействие между различными компонентами системы." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 371, + "evidence_rows": 21, + "evidence_chars": 7281 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 8, + "unique_paths": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 1 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 3, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_v1", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 5323 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091314/full_chain_plba_code_retrieval_plba-fullchain-explain-trace-service.md b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091314/full_chain_plba_code_retrieval_plba-fullchain-explain-trace-service.md new file mode 100644 index 0000000..b5e059b --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091314/full_chain_plba_code_retrieval_plba-fullchain-explain-trace-service.md @@ -0,0 +1,34 @@ +# plba-fullchain-explain-trace-service + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_retrieval.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Как работает TraceService? + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 21, + "llm_answer": "## Анализ архитектуры и поведения `TraceService`\n\n### 1. Описание `TraceService`\n`TraceService` — это класс, представляющий собой сервисную компоненту приложения, которая участвует в управлении трассировкой выполнения различных процессов внутри системы. Он наследует от класса `TraceContextFactory`, что указывает на его ответственность за создание и управление контекстом трассировки.\n\n### 2. Роли и обязанности компонента\nВ рамках общей архитектуры компонентов системы, `TraceService` играет роль `pipeline_stage`. Это означает, что он является одним из этапов общего конвейера обработки данных или задач в системе. \n\n#### Основные обязанности:\n- **Чтение и запись состояния атрибутов**: Взаимодействие с состоянием приложения через чтение и запись атрибутов.\n- **Участие в разделах потока данных**: Указано, что данный компонент участвует в 13 разных разделах потоков данных. Эти потоки данных являются частями общего процесса выполнения задач или работы сервиса.\n\n### 3. Место в общей архитектуре\n- **Связь с другими компонентами**:\n - `UvicornThreadRunner`: отвечает за запуск HTTP-сервера и выполнение запросов. Имеет аналогичную роль и обязанности как у `TraceService`.\n - `WorkflowPersistence`: ответственен за оркестровку вызовов ролей и участие в потоках данных (участвует в 16 разделах).\n - `HttpControlChannel`: занимается управлением каналами HTTP-контроля и взаимодействием с ними.\n - `InMemoryTaskQueue`: управляет очередями задач и их выполнением.\n\nВсе перечисленные компоненты являются частью единого конвейера обработки и участвуют в общих процессах обмена данными и управления задачами.\n\n### 4. Поток данных\nПотоки данных описывают последовательность операций и шагов, которые выполняются системой для достижения определенного результата. Участие каждого компонента в этих потоках обеспечивает целостность и согласованность всей системы при выполнении задач.\n\n### Итоговое объяснение работы `TraceService`\n\n`TraceService` является специализированным компонентом системы, отвечающим за управление контекстом трассировки и участие в общем потоке данных. Его основная задача — обеспечивать корректное отслеживание и ведение контекста выполнения задач, обеспечивая прозрачность и возможность анализа этих задач.\n\nЭтот компонент интегрируется в общую инфраструктуру системы, участвуя в нескольких потоках данных, обеспечивая согласованное взаимодействие между различными компонентами системы.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "TraceService" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091314/full_chain_plba_code_retrieval_plba-fullchain-explain-workflow-engine.json b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091314/full_chain_plba_code_retrieval_plba-fullchain-explain-workflow-engine.json new file mode 100644 index 0000000..42e40fa --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091314/full_chain_plba_code_retrieval_plba-fullchain-explain-workflow-engine.json @@ -0,0 +1,2634 @@ +{ + "case_id": "plba-fullchain-explain-workflow-engine", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_retrieval.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 20, + "llm_answer": "## Архитектура и Поведение Workflow Engine\n\n### Описание класса `WorkflowEngine`\n\n`WorkflowEngine` является ключевым компонентом системы управления рабочими процессами или workflows в приложении. Этот компонент отвечает за координацию выполнения этапов рабочего процесса и отслеживание состояния задач.\n\n### Файлы и Сущности\n\n1. **src/app_runtime/workflow/engine/workflow_engine.py**\n - Класс `WorkflowEngine`: Основной класс для управления рабочим процессом.\n \n2. **src/app_runtime/workflow/engine/hooks.py**\n - Класс `WorkflowEngineHooks`: Представляет собой модель поведения (`model role`) для экземпляра WorkflowEngine. Он определяет общие \"точки входа\" (hooks) для обработки событий жизненного цикла WorkflowEngine, таких как начало и завершение различных стадий работы.\n \n3. **src/app_runtime/workflow/engine/transition_resolver.py**\n - Класс `TransitionResolver`: Является моделью (\"model role\") для разрешения переходов между различными этапами рабочего процесса на основе текущего состояния.\n\n4. **src/app_runtime/control/http_runner.py**\n - Класс `UvicornThreadRunner`: Используется для запуска веб-сервиса через uvicorn в отдельном потоке. Хотя он не напрямую связан с WorkflowEngine, его роль — это управление состоянием атрибутов и участие в общей структуре данных потока.\n\n---\n\n### Поток Данных и Ответственности\n\n#### 1. Основные обязанности WorkflowEngine:\n- Чтение и запись состояний атрибутов.\n- Участие в сегментах данных (dataflow slices).\n \n#### 2. Логика работы:\n- Экземпляр WorkflowEngine получает запросы от внешних источников (например, HTTP-запросы через UvicornThreadRunner) и обрабатывает их согласно текущему состоянию рабочего процесса.\n- Переходы между этапами определяются с помощью `TransitionResolver`, который анализирует текущее состояние задачи и разрешает дальнейшие действия.\n- Каждый этап рабочего процесса может иметь свои собственные обработчики (`hooks`), определенные в WorkflowEngineHooks, которые могут выполнять дополнительные логику до и после перехода.\n\n#### 3. Пример взаимодействия:\nПредположим, что рабочий процесс включает три этапа: подготовка, выполнение и проверка результата.\n\n1. Запрос приходит к WorkflowEngine через UvicornThreadRunner.\n2. WorkflowEngine проверяет текущее состояние и определяет следующий шаг (используя TransitionResolver).\n3. WorkflowEngine вызывает соответствующий hook перед выполнением следующего шага.\n4. После успешного завершения шага вызывается другой hook.\n5. Процесс повторяется до завершения всего рабочего процесса.\n\n---\n\n### Ключевые Методы и Атрибуты\n\n1. **Метод `run()`**:\n - Основная точка входа в экземпляр WorkflowEngine. Вызывается при старте приложения и управляет общим циклом выполнения рабочих процессов.\n\n2. **Атрибуты состояния**:\n - Хранят информацию о текущем состоянии задачи, такие как статус выполнения, идентификатор этапа и другие метаданные.\n\n---\n\n### Заключение\n\nТаким образом, WorkflowEngine является центральным элементом системы управления рабочими процессами, координирующим шаги выполнения, хранящим состояние рабочих задач и обеспечивая возможность расширения функционала через hooks и transition resolver'ы.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "WorkflowEngine" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-fullchain-explain-workflow-engine", + "text": "Объясни класс WorkflowEngine", + "mode": "full_chain", + "run_started_at": "2026-03-12T09:13:14", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни класс WorkflowEngine", + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "WorkflowEngine", + "alternatives": [ + "WorkflowEngine", + "WorkflowEngineHooks" + ], + "confidence": 0.99 + }, + "rag_count": 20, + "rag_rows": [ + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "class WorkflowEngine\nWorkflowEngine", + "layer": "C1_SYMBOL_CATALOG", + "title": "WorkflowEngine", + "span_start": 10, + "span_end": 86, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "57ec0a9f11c542c78e008684a888397e8d9ef4223671acb2567e631a0cbc70b4", + "qname": "WorkflowEngine", + "kind": "class", + "signature": "WorkflowEngine", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.workflow.engine.workflow_engine", + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/hooks.py", + "content": "class WorkflowEngineHooks\nWorkflowEngineHooks", + "layer": "C1_SYMBOL_CATALOG", + "title": "WorkflowEngineHooks", + "span_start": 6, + "span_end": 14, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "914123ed510540061e116100fc87bba4195595ba696f8bfde2fd77ac6a5cd7e4", + "qname": "WorkflowEngineHooks", + "kind": "class", + "signature": "WorkflowEngineHooks", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.workflow.engine.hooks", + "is_test": false, + "blob_sha": "4b11672b0a9af1ae04bfce9d8e1f96572997d3e65e68108d7c797b88fa5fa47a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowEngine", + "span_start": 10, + "span_end": 86, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "57ec0a9f11c542c78e008684a888397e8d9ef4223671acb2567e631a0cbc70b4", + "symbol_name": "WorkflowEngine", + "qname": "WorkflowEngine", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/hooks.py", + "content": "WorkflowEngineHooks\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowEngineHooks", + "span_start": 6, + "span_end": 14, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "914123ed510540061e116100fc87bba4195595ba696f8bfde2fd77ac6a5cd7e4", + "symbol_name": "WorkflowEngineHooks", + "qname": "WorkflowEngineHooks", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "4b11672b0a9af1ae04bfce9d8e1f96572997d3e65e68108d7c797b88fa5fa47a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/transition_resolver.py", + "content": "TransitionResolver\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "TransitionResolver", + "span_start": 7, + "span_end": 9, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "d1979f0b23d354338debf7771373226833d57c1e7830ce66ca0b82cdf209b958", + "symbol_name": "TransitionResolver", + "qname": "TransitionResolver", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "2c518f4c77fb5dcc2970b88f55a7b121d05959578fb0d196af92ff5193574838", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/queue/in_memory.py", + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)", + "layer": "C4_SEMANTIC_ROLES", + "title": "InMemoryTaskQueue", + "span_start": 9, + "span_end": 38, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 22, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "2da04cb94544a3bcbf0943a95ad4bdd8710bcafaa32a02fd0e4de2178dcf3533", + "symbol_name": "InMemoryTaskQueue", + "qname": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 9, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "58f0cc001ccda0eee4c6bc32ed83bd05eafd6b6644f1e8b4aa9eed3103db73dc", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "ConfigFileLoader\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (8)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ConfigFileLoader", + "span_start": 11, + "span_end": 48, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 23, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "a8474eca8b6e9dc86ae67ed68b16fa5fb639ef08739c053e7b7195489765667f", + "symbol_name": "ConfigFileLoader", + "qname": "ConfigFileLoader", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 8, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine.__init__\n -> WorkflowEngine._transition_resolver\n -> WorkflowEngine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowEngine.__init__:dataflow_slice", + "span_start": 14, + "span_end": 63, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3abf07e5c245e0fe59785ba2d569c2ee56018715fc7f625a044ddaf6201f903d", + "edge_type": "dataflow_slice", + "src_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "src_qname": "WorkflowEngine.__init__", + "dst_symbol_id": "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8", + "dst_ref": "WorkflowEngine.run", + "resolution": "resolved", + "slice_id": "3abf07e5c245e0fe59785ba2d569c2ee56018715fc7f625a044ddaf6201f903d", + "root_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "path_symbols": [ + "WorkflowEngine.__init__", + "WorkflowEngine._transition_resolver", + "WorkflowEngine.run" + ], + "path_symbol_ids": [ + "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine.__init__\n -> WorkflowEngine._hooks\n -> WorkflowEngine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowEngine.__init__:dataflow_slice", + "span_start": 16, + "span_end": 34, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d73db644b69c1eb35afd6eae9d6ac8674e49e30e9bcf9c020f9fdbfe754851b2", + "edge_type": "dataflow_slice", + "src_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "src_qname": "WorkflowEngine.__init__", + "dst_symbol_id": "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8", + "dst_ref": "WorkflowEngine.run", + "resolution": "resolved", + "slice_id": "d73db644b69c1eb35afd6eae9d6ac8674e49e30e9bcf9c020f9fdbfe754851b2", + "root_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "path_symbols": [ + "WorkflowEngine.__init__", + "WorkflowEngine._hooks", + "WorkflowEngine.run" + ], + "path_symbol_ids": [ + "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine.__init__\n -> WorkflowEngine._workflow\n -> WorkflowEngine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowEngine.__init__:dataflow_slice", + "span_start": 12, + "span_end": 29, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "b45ef3c54669b4910a8aed3a565804f275424a24007bc7e3c953389521f80249", + "edge_type": "dataflow_slice", + "src_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "src_qname": "WorkflowEngine.__init__", + "dst_symbol_id": "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8", + "dst_ref": "WorkflowEngine.run", + "resolution": "resolved", + "slice_id": "b45ef3c54669b4910a8aed3a565804f275424a24007bc7e3c953389521f80249", + "root_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "path_symbols": [ + "WorkflowEngine.__init__", + "WorkflowEngine._workflow", + "WorkflowEngine.run" + ], + "path_symbol_ids": [ + "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine.__init__\n -> WorkflowEngine._persistence\n -> WorkflowEngine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowEngine.__init__:dataflow_slice", + "span_start": 13, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "8101338770016324ce05d61daa9935a444c75e6c94a0fae4275d5b50fcbcc70b", + "edge_type": "dataflow_slice", + "src_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "src_qname": "WorkflowEngine.__init__", + "dst_symbol_id": "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8", + "dst_ref": "WorkflowEngine.run", + "resolution": "resolved", + "slice_id": "8101338770016324ce05d61daa9935a444c75e6c94a0fae4275d5b50fcbcc70b", + "root_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "path_symbols": [ + "WorkflowEngine.__init__", + "WorkflowEngine._persistence", + "WorkflowEngine.run" + ], + "path_symbol_ids": [ + "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine.__init__\n -> WorkflowEngine._traces\n -> WorkflowEngine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowEngine.__init__:dataflow_slice", + "span_start": 15, + "span_end": 27, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "5006266616d534d721648391565e2ac0c9e7e9d9f8df00c17fba8989afb533a5", + "edge_type": "dataflow_slice", + "src_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "src_qname": "WorkflowEngine.__init__", + "dst_symbol_id": "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8", + "dst_ref": "WorkflowEngine.run", + "resolution": "resolved", + "slice_id": "5006266616d534d721648391565e2ac0c9e7e9d9f8df00c17fba8989afb533a5", + "root_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "path_symbols": [ + "WorkflowEngine.__init__", + "WorkflowEngine._traces", + "WorkflowEngine.run" + ], + "path_symbol_ids": [ + "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine.__init__\n -> WorkflowEngine._logger\n -> WorkflowEngine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowEngine.__init__:dataflow_slice", + "span_start": 17, + "span_end": 85, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "2f9927abb24794adb056b94bfb5d8538a5cbafb160da2079f52fca97fd694a2b", + "edge_type": "dataflow_slice", + "src_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "src_qname": "WorkflowEngine.__init__", + "dst_symbol_id": "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8", + "dst_ref": "WorkflowEngine.run", + "resolution": "resolved", + "slice_id": "2f9927abb24794adb056b94bfb5d8538a5cbafb160da2079f52fca97fd694a2b", + "root_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "path_symbols": [ + "WorkflowEngine.__init__", + "WorkflowEngine._logger", + "WorkflowEngine.run" + ], + "path_symbol_ids": [ + "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "class WorkflowEngine:\n def __init__(self, workflow, persistence, *, traces, hooks: WorkflowEngineHooks | None = None) -> None:\n self._workflow = workflow\n self._persistence = persistence\n self._transition_resolver = TransitionResolver()\n self._traces = traces\n self._hooks = hooks or WorkflowEngineHooks()\n self._logger = logging.getLogger(__name__)\n\n def run(self, context: WorkflowContext) -> dict[str, object]:\n run_id = self._persistence.start_run(\n self._workflow.definition.name,\n self._workflow.definition.start_at,\n context.snapshot(),\n )\n context.state.setdefault(\"runtime\", {})\n context.state[\"runtime\"][\"workflow_run_id\"] = run_id\n self._traces.step(\"workflow\")\n self._traces.info(\"Workflow started.\", status=\"started\", attrs={\"workflow_run_id\": run_id})\n current_name = self._workflow.definition.start_at\n while current_name is not None:\n node = self._workflow.definition.nodes[current_name]\n context.state[\"runtime\"][\"current_node\"] = current_name\n self._logger.info(\"Workflow run %s: step '%s' started.\", run_id, current_name)\n self._hooks.on_step_started(context, current_name)\n self._persistence.start_step(run_id, current_name, context.snapshot())\n self._traces.step(current_name)\n self._traces.debug(\n f\"Step '{current_name}' started.\",\n status=\"started\",\n attrs={\"workflow_run_id\": run_id, \"node\": current_name},\n )\n try:\n result = node.step.run(context)\n except Exception as error:\n self._persistence.fail_step(run_id, current_name, context.snapshot(), error)\n self._persistence.fail_run(run_id, context.snapshot())\n self._traces.error(\n f\"Step '{current_name}' failed: {error}\",\n status=\"failed\",\n attrs={\"exception_type\": type(error).__name__},\n )\n self._logger.exception(\"Workflow run %s: step '%s' failed.\", run_id, current_name)\n self._hooks.on_step_failed(context, current_name)\n raise\n context.state.update(result.updates)\n self._persistence.complete_step(\n run_id,\n current_name,\n result.status,\n result.transition,\n context.snapshot(),\n )\n next_node = self._transition_resolver.resolve(node, result)\n self._traces.debug(\n f\"Step '{current_name}' completed with transition '{result.transition}'.\",\n status=result.status,\n attrs={\n \"workflow_run_id\": run_id,\n \"from_node\": current_name,\n \"transition\": result.transition,\n \"to_node\": next_node,\n },\n )\n self._logger.info(\n \"Workflow run %s: step '%s' completed with transition '%s'.\",\n run_id,\n current_name,\n result.transition,\n )\n self._hooks.on_step_finished(context, current_name)\n current_name = next_node\n self._persistence.complete_run(run_id, context.snapshot())\n self._traces.step(\"workflow\")\n self._traces.info(\"Workflow completed.\", status=\"completed\", attrs={\"workflow_run_id\": run_id})\n self._logger.info(\"Workflow run %s completed.\", run_id)\n return {\"run_id\": run_id, \"status\": \"completed\", \"context\": context.snapshot()}", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/workflow/engine/workflow_engine.py:WorkflowEngine", + "span_start": 10, + "span_end": 86, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.workflow.engine.workflow_engine", + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "## Архитектура и Поведение Workflow Engine\n\n### Описание класса `WorkflowEngine`\n\n`WorkflowEngine` является ключевым компонентом системы управления рабочими процессами или workflows в приложении. Этот компонент отвечает за координацию выполнения этапов рабочего процесса и отслеживание состояния задач.\n\n### Файлы и Сущности\n\n1. **src/app_runtime/workflow/engine/workflow_engine.py**\n - Класс `WorkflowEngine`: Основной класс для управления рабочим процессом.\n \n2. **src/app_runtime/workflow/engine/hooks.py**\n - Класс `WorkflowEngineHooks`: Представляет собой модель поведения (`model role`) для экземпляра WorkflowEngine. Он определяет общие \"точки входа\" (hooks) для обработки событий жизненного цикла WorkflowEngine, таких как начало и завершение различных стадий работы.\n \n3. **src/app_runtime/workflow/engine/transition_resolver.py**\n - Класс `TransitionResolver`: Является моделью (\"model role\") для разрешения переходов между различными этапами рабочего процесса на основе текущего состояния.\n\n4. **src/app_runtime/control/http_runner.py**\n - Класс `UvicornThreadRunner`: Используется для запуска веб-сервиса через uvicorn в отдельном потоке. Хотя он не напрямую связан с WorkflowEngine, его роль — это управление состоянием атрибутов и участие в общей структуре данных потока.\n\n---\n\n### Поток Данных и Ответственности\n\n#### 1. Основные обязанности WorkflowEngine:\n- Чтение и запись состояний атрибутов.\n- Участие в сегментах данных (dataflow slices).\n \n#### 2. Логика работы:\n- Экземпляр WorkflowEngine получает запросы от внешних источников (например, HTTP-запросы через UvicornThreadRunner) и обрабатывает их согласно текущему состоянию рабочего процесса.\n- Переходы между этапами определяются с помощью `TransitionResolver`, который анализирует текущее состояние задачи и разрешает дальнейшие действия.\n- Каждый этап рабочего процесса может иметь свои собственные обработчики (`hooks`), определенные в WorkflowEngineHooks, которые могут выполнять дополнительные логику до и после перехода.\n\n#### 3. Пример взаимодействия:\nПредположим, что рабочий процесс включает три этапа: подготовка, выполнение и проверка результата.\n\n1. Запрос приходит к WorkflowEngine через UvicornThreadRunner.\n2. WorkflowEngine проверяет текущее состояние и определяет следующий шаг (используя TransitionResolver).\n3. WorkflowEngine вызывает соответствующий hook перед выполнением следующего шага.\n4. После успешного завершения шага вызывается другой hook.\n5. Процесс повторяется до завершения всего рабочего процесса.\n\n---\n\n### Ключевые Методы и Атрибуты\n\n1. **Метод `run()`**:\n - Основная точка входа в экземпляр WorkflowEngine. Вызывается при старте приложения и управляет общим циклом выполнения рабочих процессов.\n\n2. **Атрибуты состояния**:\n - Хранят информацию о текущем состоянии задачи, такие как статус выполнения, идентификатор этапа и другие метаданные.\n\n---\n\n### Заключение\n\nТаким образом, WorkflowEngine является центральным элементом системы управления рабочими процессами, координирующим шаги выполнения, хранящим состояние рабочих задач и обеспечивая возможность расширения функционала через hooks и transition resolver'ы.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS", + "C4_SEMANTIC_ROLES" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "WorkflowEngine" + ], + "keyword_hints": [ + "WorkflowEngine" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "WorkflowEngine", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Объясни класс WorkflowEngine", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "Объясни класс WorkflowEngine", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Объясни класс WorkflowEngine", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "Объясни класс WorkflowEngine", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 2, + "candidates_after_filter": 2 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "WorkflowEngine", + "alternatives": [ + "WorkflowEngine", + "WorkflowEngineHooks" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 2, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 8, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 139, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 41, + "C0_SOURCE_CHUNKS": 16, + "C4_SEMANTIC_ROLES": 17, + "C2_DEPENDENCY_GRAPH": 49, + "C3_ENTRYPOINTS": 13 + }, + "merge_rank": 63, + "prompt_build": 0, + "llm_call": 6246 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 307, + "evidence_rows": 20, + "evidence_chars": 5261 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 2, + "unique_paths": 2 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 8, + "unique_paths": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 1 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_v1", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "WorkflowEngine" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 20, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-fullchain-explain-workflow-engine", + "mode": "full_chain", + "run_started_at": "2026-03-12T09:13:14", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Объясни класс WorkflowEngine", + "normalized_query": "Объясни класс WorkflowEngine" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Объясни класс WorkflowEngine" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни класс WorkflowEngine" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "WorkflowEngine" + ], + "keyword_hints": [ + "WorkflowEngine" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Объясни класс WorkflowEngine" + }, + "output": { + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "WorkflowEngine", + "alternatives": [ + "WorkflowEngine", + "WorkflowEngineHooks" + ], + "confidence": 0.99 + }, + "rag_count": 20, + "rag_rows": [ + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "class WorkflowEngine\nWorkflowEngine", + "layer": "C1_SYMBOL_CATALOG", + "title": "WorkflowEngine", + "span_start": 10, + "span_end": 86, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "57ec0a9f11c542c78e008684a888397e8d9ef4223671acb2567e631a0cbc70b4", + "qname": "WorkflowEngine", + "kind": "class", + "signature": "WorkflowEngine", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.workflow.engine.workflow_engine", + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/hooks.py", + "content": "class WorkflowEngineHooks\nWorkflowEngineHooks", + "layer": "C1_SYMBOL_CATALOG", + "title": "WorkflowEngineHooks", + "span_start": 6, + "span_end": 14, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "914123ed510540061e116100fc87bba4195595ba696f8bfde2fd77ac6a5cd7e4", + "qname": "WorkflowEngineHooks", + "kind": "class", + "signature": "WorkflowEngineHooks", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.workflow.engine.hooks", + "is_test": false, + "blob_sha": "4b11672b0a9af1ae04bfce9d8e1f96572997d3e65e68108d7c797b88fa5fa47a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowEngine", + "span_start": 10, + "span_end": 86, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "57ec0a9f11c542c78e008684a888397e8d9ef4223671acb2567e631a0cbc70b4", + "symbol_name": "WorkflowEngine", + "qname": "WorkflowEngine", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/hooks.py", + "content": "WorkflowEngineHooks\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowEngineHooks", + "span_start": 6, + "span_end": 14, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "914123ed510540061e116100fc87bba4195595ba696f8bfde2fd77ac6a5cd7e4", + "symbol_name": "WorkflowEngineHooks", + "qname": "WorkflowEngineHooks", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "4b11672b0a9af1ae04bfce9d8e1f96572997d3e65e68108d7c797b88fa5fa47a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/transition_resolver.py", + "content": "TransitionResolver\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "TransitionResolver", + "span_start": 7, + "span_end": 9, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "d1979f0b23d354338debf7771373226833d57c1e7830ce66ca0b82cdf209b958", + "symbol_name": "TransitionResolver", + "qname": "TransitionResolver", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "2c518f4c77fb5dcc2970b88f55a7b121d05959578fb0d196af92ff5193574838", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/queue/in_memory.py", + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)", + "layer": "C4_SEMANTIC_ROLES", + "title": "InMemoryTaskQueue", + "span_start": 9, + "span_end": 38, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 22, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "2da04cb94544a3bcbf0943a95ad4bdd8710bcafaa32a02fd0e4de2178dcf3533", + "symbol_name": "InMemoryTaskQueue", + "qname": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 9, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "58f0cc001ccda0eee4c6bc32ed83bd05eafd6b6644f1e8b4aa9eed3103db73dc", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "ConfigFileLoader\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (8)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ConfigFileLoader", + "span_start": 11, + "span_end": 48, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 23, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "a8474eca8b6e9dc86ae67ed68b16fa5fb639ef08739c053e7b7195489765667f", + "symbol_name": "ConfigFileLoader", + "qname": "ConfigFileLoader", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 8, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine.__init__\n -> WorkflowEngine._transition_resolver\n -> WorkflowEngine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowEngine.__init__:dataflow_slice", + "span_start": 14, + "span_end": 63, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3abf07e5c245e0fe59785ba2d569c2ee56018715fc7f625a044ddaf6201f903d", + "edge_type": "dataflow_slice", + "src_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "src_qname": "WorkflowEngine.__init__", + "dst_symbol_id": "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8", + "dst_ref": "WorkflowEngine.run", + "resolution": "resolved", + "slice_id": "3abf07e5c245e0fe59785ba2d569c2ee56018715fc7f625a044ddaf6201f903d", + "root_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "path_symbols": [ + "WorkflowEngine.__init__", + "WorkflowEngine._transition_resolver", + "WorkflowEngine.run" + ], + "path_symbol_ids": [ + "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine.__init__\n -> WorkflowEngine._hooks\n -> WorkflowEngine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowEngine.__init__:dataflow_slice", + "span_start": 16, + "span_end": 34, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d73db644b69c1eb35afd6eae9d6ac8674e49e30e9bcf9c020f9fdbfe754851b2", + "edge_type": "dataflow_slice", + "src_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "src_qname": "WorkflowEngine.__init__", + "dst_symbol_id": "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8", + "dst_ref": "WorkflowEngine.run", + "resolution": "resolved", + "slice_id": "d73db644b69c1eb35afd6eae9d6ac8674e49e30e9bcf9c020f9fdbfe754851b2", + "root_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "path_symbols": [ + "WorkflowEngine.__init__", + "WorkflowEngine._hooks", + "WorkflowEngine.run" + ], + "path_symbol_ids": [ + "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine.__init__\n -> WorkflowEngine._workflow\n -> WorkflowEngine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowEngine.__init__:dataflow_slice", + "span_start": 12, + "span_end": 29, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "b45ef3c54669b4910a8aed3a565804f275424a24007bc7e3c953389521f80249", + "edge_type": "dataflow_slice", + "src_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "src_qname": "WorkflowEngine.__init__", + "dst_symbol_id": "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8", + "dst_ref": "WorkflowEngine.run", + "resolution": "resolved", + "slice_id": "b45ef3c54669b4910a8aed3a565804f275424a24007bc7e3c953389521f80249", + "root_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "path_symbols": [ + "WorkflowEngine.__init__", + "WorkflowEngine._workflow", + "WorkflowEngine.run" + ], + "path_symbol_ids": [ + "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine.__init__\n -> WorkflowEngine._persistence\n -> WorkflowEngine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowEngine.__init__:dataflow_slice", + "span_start": 13, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "8101338770016324ce05d61daa9935a444c75e6c94a0fae4275d5b50fcbcc70b", + "edge_type": "dataflow_slice", + "src_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "src_qname": "WorkflowEngine.__init__", + "dst_symbol_id": "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8", + "dst_ref": "WorkflowEngine.run", + "resolution": "resolved", + "slice_id": "8101338770016324ce05d61daa9935a444c75e6c94a0fae4275d5b50fcbcc70b", + "root_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "path_symbols": [ + "WorkflowEngine.__init__", + "WorkflowEngine._persistence", + "WorkflowEngine.run" + ], + "path_symbol_ids": [ + "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine.__init__\n -> WorkflowEngine._traces\n -> WorkflowEngine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowEngine.__init__:dataflow_slice", + "span_start": 15, + "span_end": 27, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "5006266616d534d721648391565e2ac0c9e7e9d9f8df00c17fba8989afb533a5", + "edge_type": "dataflow_slice", + "src_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "src_qname": "WorkflowEngine.__init__", + "dst_symbol_id": "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8", + "dst_ref": "WorkflowEngine.run", + "resolution": "resolved", + "slice_id": "5006266616d534d721648391565e2ac0c9e7e9d9f8df00c17fba8989afb533a5", + "root_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "path_symbols": [ + "WorkflowEngine.__init__", + "WorkflowEngine._traces", + "WorkflowEngine.run" + ], + "path_symbol_ids": [ + "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine.__init__\n -> WorkflowEngine._logger\n -> WorkflowEngine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowEngine.__init__:dataflow_slice", + "span_start": 17, + "span_end": 85, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "2f9927abb24794adb056b94bfb5d8538a5cbafb160da2079f52fca97fd694a2b", + "edge_type": "dataflow_slice", + "src_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "src_qname": "WorkflowEngine.__init__", + "dst_symbol_id": "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8", + "dst_ref": "WorkflowEngine.run", + "resolution": "resolved", + "slice_id": "2f9927abb24794adb056b94bfb5d8538a5cbafb160da2079f52fca97fd694a2b", + "root_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "path_symbols": [ + "WorkflowEngine.__init__", + "WorkflowEngine._logger", + "WorkflowEngine.run" + ], + "path_symbol_ids": [ + "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "class WorkflowEngine:\n def __init__(self, workflow, persistence, *, traces, hooks: WorkflowEngineHooks | None = None) -> None:\n self._workflow = workflow\n self._persistence = persistence\n self._transition_resolver = TransitionResolver()\n self._traces = traces\n self._hooks = hooks or WorkflowEngineHooks()\n self._logger = logging.getLogger(__name__)\n\n def run(self, context: WorkflowContext) -> dict[str, object]:\n run_id = self._persistence.start_run(\n self._workflow.definition.name,\n self._workflow.definition.start_at,\n context.snapshot(),\n )\n context.state.setdefault(\"runtime\", {})\n context.state[\"runtime\"][\"workflow_run_id\"] = run_id\n self._traces.step(\"workflow\")\n self._traces.info(\"Workflow started.\", status=\"started\", attrs={\"workflow_run_id\": run_id})\n current_name = self._workflow.definition.start_at\n while current_name is not None:\n node = self._workflow.definition.nodes[current_name]\n context.state[\"runtime\"][\"current_node\"] = current_name\n self._logger.info(\"Workflow run %s: step '%s' started.\", run_id, current_name)\n self._hooks.on_step_started(context, current_name)\n self._persistence.start_step(run_id, current_name, context.snapshot())\n self._traces.step(current_name)\n self._traces.debug(\n f\"Step '{current_name}' started.\",\n status=\"started\",\n attrs={\"workflow_run_id\": run_id, \"node\": current_name},\n )\n try:\n result = node.step.run(context)\n except Exception as error:\n self._persistence.fail_step(run_id, current_name, context.snapshot(), error)\n self._persistence.fail_run(run_id, context.snapshot())\n self._traces.error(\n f\"Step '{current_name}' failed: {error}\",\n status=\"failed\",\n attrs={\"exception_type\": type(error).__name__},\n )\n self._logger.exception(\"Workflow run %s: step '%s' failed.\", run_id, current_name)\n self._hooks.on_step_failed(context, current_name)\n raise\n context.state.update(result.updates)\n self._persistence.complete_step(\n run_id,\n current_name,\n result.status,\n result.transition,\n context.snapshot(),\n )\n next_node = self._transition_resolver.resolve(node, result)\n self._traces.debug(\n f\"Step '{current_name}' completed with transition '{result.transition}'.\",\n status=result.status,\n attrs={\n \"workflow_run_id\": run_id,\n \"from_node\": current_name,\n \"transition\": result.transition,\n \"to_node\": next_node,\n },\n )\n self._logger.info(\n \"Workflow run %s: step '%s' completed with transition '%s'.\",\n run_id,\n current_name,\n result.transition,\n )\n self._hooks.on_step_finished(context, current_name)\n current_name = next_node\n self._persistence.complete_run(run_id, context.snapshot())\n self._traces.step(\"workflow\")\n self._traces.info(\"Workflow completed.\", status=\"completed\", attrs={\"workflow_run_id\": run_id})\n self._logger.info(\"Workflow run %s completed.\", run_id)\n return {\"run_id\": run_id, \"status\": \"completed\", \"context\": context.snapshot()}", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/workflow/engine/workflow_engine.py:WorkflowEngine", + "span_start": 10, + "span_end": 86, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.workflow.engine.workflow_engine", + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "WorkflowEngine", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Объясни класс WorkflowEngine", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "Объясни класс WorkflowEngine", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Объясни класс WorkflowEngine", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "Объясни класс WorkflowEngine", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 2, + "candidates_after_filter": 2 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "WorkflowEngine", + "alternatives": [ + "WorkflowEngine", + "WorkflowEngineHooks" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 2, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 8, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 139, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 41, + "C0_SOURCE_CHUNKS": 16, + "C4_SEMANTIC_ROLES": 17, + "C2_DEPENDENCY_GRAPH": 49, + "C3_ENTRYPOINTS": 13 + }, + "merge_rank": 63 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Объясни класс WorkflowEngine", + "rag_count": 20 + }, + "output": { + "llm_answer": "## Архитектура и Поведение Workflow Engine\n\n### Описание класса `WorkflowEngine`\n\n`WorkflowEngine` является ключевым компонентом системы управления рабочими процессами или workflows в приложении. Этот компонент отвечает за координацию выполнения этапов рабочего процесса и отслеживание состояния задач.\n\n### Файлы и Сущности\n\n1. **src/app_runtime/workflow/engine/workflow_engine.py**\n - Класс `WorkflowEngine`: Основной класс для управления рабочим процессом.\n \n2. **src/app_runtime/workflow/engine/hooks.py**\n - Класс `WorkflowEngineHooks`: Представляет собой модель поведения (`model role`) для экземпляра WorkflowEngine. Он определяет общие \"точки входа\" (hooks) для обработки событий жизненного цикла WorkflowEngine, таких как начало и завершение различных стадий работы.\n \n3. **src/app_runtime/workflow/engine/transition_resolver.py**\n - Класс `TransitionResolver`: Является моделью (\"model role\") для разрешения переходов между различными этапами рабочего процесса на основе текущего состояния.\n\n4. **src/app_runtime/control/http_runner.py**\n - Класс `UvicornThreadRunner`: Используется для запуска веб-сервиса через uvicorn в отдельном потоке. Хотя он не напрямую связан с WorkflowEngine, его роль — это управление состоянием атрибутов и участие в общей структуре данных потока.\n\n---\n\n### Поток Данных и Ответственности\n\n#### 1. Основные обязанности WorkflowEngine:\n- Чтение и запись состояний атрибутов.\n- Участие в сегментах данных (dataflow slices).\n \n#### 2. Логика работы:\n- Экземпляр WorkflowEngine получает запросы от внешних источников (например, HTTP-запросы через UvicornThreadRunner) и обрабатывает их согласно текущему состоянию рабочего процесса.\n- Переходы между этапами определяются с помощью `TransitionResolver`, который анализирует текущее состояние задачи и разрешает дальнейшие действия.\n- Каждый этап рабочего процесса может иметь свои собственные обработчики (`hooks`), определенные в WorkflowEngineHooks, которые могут выполнять дополнительные логику до и после перехода.\n\n#### 3. Пример взаимодействия:\nПредположим, что рабочий процесс включает три этапа: подготовка, выполнение и проверка результата.\n\n1. Запрос приходит к WorkflowEngine через UvicornThreadRunner.\n2. WorkflowEngine проверяет текущее состояние и определяет следующий шаг (используя TransitionResolver).\n3. WorkflowEngine вызывает соответствующий hook перед выполнением следующего шага.\n4. После успешного завершения шага вызывается другой hook.\n5. Процесс повторяется до завершения всего рабочего процесса.\n\n---\n\n### Ключевые Методы и Атрибуты\n\n1. **Метод `run()`**:\n - Основная точка входа в экземпляр WorkflowEngine. Вызывается при старте приложения и управляет общим циклом выполнения рабочих процессов.\n\n2. **Атрибуты состояния**:\n - Хранят информацию о текущем состоянии задачи, такие как статус выполнения, идентификатор этапа и другие метаданные.\n\n---\n\n### Заключение\n\nТаким образом, WorkflowEngine является центральным элементом системы управления рабочими процессами, координирующим шаги выполнения, хранящим состояние рабочих задач и обеспечивая возможность расширения функционала через hooks и transition resolver'ы." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 307, + "evidence_rows": 20, + "evidence_chars": 5261 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 2, + "unique_paths": 2 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 8, + "unique_paths": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 1 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_v1", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 6246 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091314/full_chain_plba_code_retrieval_plba-fullchain-explain-workflow-engine.md b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091314/full_chain_plba_code_retrieval_plba-fullchain-explain-workflow-engine.md new file mode 100644 index 0000000..a03cfc3 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091314/full_chain_plba_code_retrieval_plba-fullchain-explain-workflow-engine.md @@ -0,0 +1,34 @@ +# plba-fullchain-explain-workflow-engine + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_retrieval.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Объясни класс WorkflowEngine + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 20, + "llm_answer": "## Архитектура и Поведение Workflow Engine\n\n### Описание класса `WorkflowEngine`\n\n`WorkflowEngine` является ключевым компонентом системы управления рабочими процессами или workflows в приложении. Этот компонент отвечает за координацию выполнения этапов рабочего процесса и отслеживание состояния задач.\n\n### Файлы и Сущности\n\n1. **src/app_runtime/workflow/engine/workflow_engine.py**\n - Класс `WorkflowEngine`: Основной класс для управления рабочим процессом.\n \n2. **src/app_runtime/workflow/engine/hooks.py**\n - Класс `WorkflowEngineHooks`: Представляет собой модель поведения (`model role`) для экземпляра WorkflowEngine. Он определяет общие \"точки входа\" (hooks) для обработки событий жизненного цикла WorkflowEngine, таких как начало и завершение различных стадий работы.\n \n3. **src/app_runtime/workflow/engine/transition_resolver.py**\n - Класс `TransitionResolver`: Является моделью (\"model role\") для разрешения переходов между различными этапами рабочего процесса на основе текущего состояния.\n\n4. **src/app_runtime/control/http_runner.py**\n - Класс `UvicornThreadRunner`: Используется для запуска веб-сервиса через uvicorn в отдельном потоке. Хотя он не напрямую связан с WorkflowEngine, его роль — это управление состоянием атрибутов и участие в общей структуре данных потока.\n\n---\n\n### Поток Данных и Ответственности\n\n#### 1. Основные обязанности WorkflowEngine:\n- Чтение и запись состояний атрибутов.\n- Участие в сегментах данных (dataflow slices).\n \n#### 2. Логика работы:\n- Экземпляр WorkflowEngine получает запросы от внешних источников (например, HTTP-запросы через UvicornThreadRunner) и обрабатывает их согласно текущему состоянию рабочего процесса.\n- Переходы между этапами определяются с помощью `TransitionResolver`, который анализирует текущее состояние задачи и разрешает дальнейшие действия.\n- Каждый этап рабочего процесса может иметь свои собственные обработчики (`hooks`), определенные в WorkflowEngineHooks, которые могут выполнять дополнительные логику до и после перехода.\n\n#### 3. Пример взаимодействия:\nПредположим, что рабочий процесс включает три этапа: подготовка, выполнение и проверка результата.\n\n1. Запрос приходит к WorkflowEngine через UvicornThreadRunner.\n2. WorkflowEngine проверяет текущее состояние и определяет следующий шаг (используя TransitionResolver).\n3. WorkflowEngine вызывает соответствующий hook перед выполнением следующего шага.\n4. После успешного завершения шага вызывается другой hook.\n5. Процесс повторяется до завершения всего рабочего процесса.\n\n---\n\n### Ключевые Методы и Атрибуты\n\n1. **Метод `run()`**:\n - Основная точка входа в экземпляр WorkflowEngine. Вызывается при старте приложения и управляет общим циклом выполнения рабочих процессов.\n\n2. **Атрибуты состояния**:\n - Хранят информацию о текущем состоянии задачи, такие как статус выполнения, идентификатор этапа и другие метаданные.\n\n---\n\n### Заключение\n\nТаким образом, WorkflowEngine является центральным элементом системы управления рабочими процессами, координирующим шаги выполнения, хранящим состояние рабочих задач и обеспечивая возможность расширения функционала через hooks и transition resolver'ы.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "WorkflowEngine" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091314/summary.md b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091314/summary.md new file mode 100644 index 0000000..c5b3265 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091314/summary.md @@ -0,0 +1,24 @@ +# pipeline_setup_v2 summary + +Passed: 6/6 + + +| File | Case | Runner | Mode | Intent | Sub-intent | Pass | +| ----------------------------------- | -------------------------------------------- | ------- | ---------- | ------- | ---------- | ---- | +| full_chain_plba_code_retrieval.yaml | plba-fullchain-explain-runtime-manager | runtime | full_chain | CODE_QA | EXPLAIN | ✓ | +| full_chain_plba_code_retrieval.yaml | plba-fullchain-explain-http-control-channel | runtime | full_chain | CODE_QA | EXPLAIN | ✓ | +| full_chain_plba_code_retrieval.yaml | plba-fullchain-explain-control-plane-service | runtime | full_chain | CODE_QA | EXPLAIN | ✓ | +| full_chain_plba_code_retrieval.yaml | plba-fullchain-explain-trace-service | runtime | full_chain | CODE_QA | EXPLAIN | ✓ | +| full_chain_plba_code_retrieval.yaml | plba-fullchain-explain-create-runtime | runtime | full_chain | CODE_QA | EXPLAIN | ✓ | +| full_chain_plba_code_retrieval.yaml | plba-fullchain-explain-workflow-engine | runtime | full_chain | CODE_QA | EXPLAIN | ✓ | + + +## LLM Answers + +- **plba-fullchain-explain-runtime-manager**: ## Анализ класса `RuntimeManager` ### 1. Положение и назначение класса Класс `RuntimeManager` определен в файле `src/app_runtime/core/runtime.py`. Его роль — **управляющий компонент**, который координирует выполнение ра… +- **plba-fullchain-explain-http-control-channel**: ## Анализ класса `HttpControlChannel` ### 1. Обзор файла и контекста Класс `HttpControlChannel` определен в файле `src/app_runtime/control/http_channel.py`. Этот файл содержит классы и функции, связанные с управлением к… +- **plba-fullchain-explain-control-plane-service**: ## Анализ класса `ControlPlaneService` ### Описание файла и роли классов Файл `**src/app_runtime/control/service.py`** содержит определение класса `ControlPlaneService`. Этот файл также импортирует классы и компоненты и… +- **plba-fullchain-explain-trace-service**: ## Анализ архитектуры и поведения `TraceService` ### 1. Описание `TraceService` `TraceService` — это класс, представляющий собой сервисную компоненту приложения, которая участвует в управлении трассировкой выполнения ра… +- **plba-fullchain-explain-create-runtime**: ## Анализ функции `create_runtime` и архитектуры приложения ### Описание функции `create_runtime` Функция `create_runtime` расположена в файле `src/plba/bootstrap.py`. Её основная задача — инициализация и настройка runt… +- **plba-fullchain-explain-workflow-engine**: ## Архитектура и Поведение Workflow Engine ### Описание класса `WorkflowEngine` `WorkflowEngine` является ключевым компонентом системы управления рабочими процессами или workflows в приложении. Этот компонент отвечает з… + diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091824/full_chain_plba_code_retrieval_plba-fullchain-explain-control-plane-service.json b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091824/full_chain_plba_code_retrieval_plba-fullchain-explain-control-plane-service.json new file mode 100644 index 0000000..bbd193b --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091824/full_chain_plba_code_retrieval_plba-fullchain-explain-control-plane-service.json @@ -0,0 +1,2532 @@ +{ + "case_id": "plba-fullchain-explain-control-plane-service", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_retrieval.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 19, + "llm_answer": "## Анализ класса `ControlPlaneService`\n\n### Обзор контекста\n\nВ рамках данного контекста обсуждаются несколько сущностей и их роли в системе обработки запросов и управления состоянием:\n\n- **`ControlPlaneService`**: Основной объект, рассматриваемый в вопросе.\n- **`ControlChannel`**: Базовый интерфейс для моделей или каналов взаимодействия.\n- **`ControlActionSet`**: Набор действий, выполняемых моделью.\n- **`UvicornThreadRunner`**: Класс, отвечающий за запуск HTTP-сервера с использованием библиотеки uvicorn в отдельном потоке.\n- **`HttpControlChannel`**: Канал контроля на основе HTTP, который также участвует в обработке состояния и данных потока.\n\nВсе перечисленные классы являются частью модуля `src/app_runtime/control`, что указывает на их связь с управлением данными и обработкой состояний в приложении.\n\n### Описание поведения и архитектуры\n\n**Класс `ControlPlaneService`:**\n\nЭтот класс является ключевым элементом в управлении поведением системы на уровне \"контроля\" (\"Control Plane\"). Он отвечает за чтение и запись атрибутов состояния приложения и взаимодействие с различными компонентами через каналы и действия.\n\n#### Основные обязанности (`Responsibilities`):\n\n1. **Чтение и запись атрибутов состояния:** \n - Класс хранит и управляет текущим состоянием системы и может изменять его в зависимости от поступающих запросов и событий.\n \n2. **Участие в данных потоков (`dataflow slices`) :**\n - Указано участие в пяти различных срезах данных, которые могут быть связаны с различными аспектами работы системы (например, обработка запросов, выполнение вычислений, управление логикой бизнес-процессов).\n\n#### Поток данных и логика выполнения\n\nПоскольку конкретные детали реализации не предоставлены, можно предположить следующий общий сценарий функционирования `ControlPlaneService`:\n\n1. Получение запроса извне (через HTTP или другой канал).\n2. Валидация и преобразование входных данных.\n3. Вызов соответствующих методов или действий из объекта `ControlActionSet`.\n4. Запись изменений состояния системы (если это необходимо) и передача информации обратно пользователю.\n\n### Заключение\n\nТаким образом, `ControlPlaneService` играет роль центрального контроллера, координирующего работу различных компонентов системы через свои интерфейсы (каналы и действия). Его основная задача — обеспечивать согласованность и корректность изменения состояния системы в ответ на внешние запросы.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "ControlPlaneService" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-fullchain-explain-control-plane-service", + "text": "Объясни класс ControlPlaneService", + "mode": "full_chain", + "run_started_at": "2026-03-12T09:18:24", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни класс ControlPlaneService", + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "ControlPlaneService", + "alternatives": [ + "ControlPlaneService" + ], + "confidence": 0.99 + }, + "rag_count": 19, + "rag_rows": [ + { + "path": "src/app_runtime/control/service.py", + "content": "class ControlPlaneService\nControlPlaneService", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "qname": "ControlPlaneService", + "kind": "class", + "signature": "ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/queue/in_memory.py", + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)", + "layer": "C4_SEMANTIC_ROLES", + "title": "InMemoryTaskQueue", + "span_start": 9, + "span_end": 38, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 22, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "2da04cb94544a3bcbf0943a95ad4bdd8710bcafaa32a02fd0e4de2178dcf3533", + "symbol_name": "InMemoryTaskQueue", + "qname": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 9, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "58f0cc001ccda0eee4c6bc32ed83bd05eafd6b6644f1e8b4aa9eed3103db73dc", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.register_channel reads_attr self._channels.append", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.register_channel:reads_attr", + "span_start": 17, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "1ee5925deffdc38ba15b88bf7c89e5fcd1a78f493fe30f2deb827d714a1b18e8", + "edge_type": "reads_attr", + "src_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "src_qname": "ControlPlaneService.register_channel", + "dst_symbol_id": null, + "dst_ref": "self._channels.append", + "resolution": "partial", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "class ControlPlaneService:\n def __init__(self) -> None:\n self._channels: list[ControlChannel] = []\n\n def register_channel(self, channel: ControlChannel) -> None:\n self._channels.append(channel)\n\n def start(self, runtime: RuntimeManager) -> None:\n if not self._channels:\n return\n asyncio.run(self._start_async(runtime))\n\n def stop(self) -> None:\n if not self._channels:\n return\n asyncio.run(self._stop_async())\n\n def snapshot(self, runtime: RuntimeManager) -> dict[str, object]:\n health = runtime.current_health()\n return {\n \"runtime\": {\"state\": runtime._state.value},\n \"modules\": list(runtime.registry.modules),\n \"services\": runtime.services.snapshot(),\n \"workers\": runtime.workers.snapshot(),\n \"health\": runtime.health.snapshot(runtime.workers.healths()) | {\"status\": health[\"status\"]},\n \"config\": runtime.configuration.get(),\n }\n\n async def _start_async(self, runtime: RuntimeManager) -> None:\n actions = ControlActionSet(\n health=runtime.health_status,\n start=runtime.start_runtime,\n stop=runtime.stop_runtime,\n status=runtime.runtime_status,\n )\n for channel in self._channels:\n await channel.start(actions)\n\n async def _stop_async(self) -> None:\n for channel in reversed(self._channels):\n await channel.stop()", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/service.py:ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "## Анализ класса `ControlPlaneService`\n\n### Обзор контекста\n\nВ рамках данного контекста обсуждаются несколько сущностей и их роли в системе обработки запросов и управления состоянием:\n\n- **`ControlPlaneService`**: Основной объект, рассматриваемый в вопросе.\n- **`ControlChannel`**: Базовый интерфейс для моделей или каналов взаимодействия.\n- **`ControlActionSet`**: Набор действий, выполняемых моделью.\n- **`UvicornThreadRunner`**: Класс, отвечающий за запуск HTTP-сервера с использованием библиотеки uvicorn в отдельном потоке.\n- **`HttpControlChannel`**: Канал контроля на основе HTTP, который также участвует в обработке состояния и данных потока.\n\nВсе перечисленные классы являются частью модуля `src/app_runtime/control`, что указывает на их связь с управлением данными и обработкой состояний в приложении.\n\n### Описание поведения и архитектуры\n\n**Класс `ControlPlaneService`:**\n\nЭтот класс является ключевым элементом в управлении поведением системы на уровне \"контроля\" (\"Control Plane\"). Он отвечает за чтение и запись атрибутов состояния приложения и взаимодействие с различными компонентами через каналы и действия.\n\n#### Основные обязанности (`Responsibilities`):\n\n1. **Чтение и запись атрибутов состояния:** \n - Класс хранит и управляет текущим состоянием системы и может изменять его в зависимости от поступающих запросов и событий.\n \n2. **Участие в данных потоков (`dataflow slices`) :**\n - Указано участие в пяти различных срезах данных, которые могут быть связаны с различными аспектами работы системы (например, обработка запросов, выполнение вычислений, управление логикой бизнес-процессов).\n\n#### Поток данных и логика выполнения\n\nПоскольку конкретные детали реализации не предоставлены, можно предположить следующий общий сценарий функционирования `ControlPlaneService`:\n\n1. Получение запроса извне (через HTTP или другой канал).\n2. Валидация и преобразование входных данных.\n3. Вызов соответствующих методов или действий из объекта `ControlActionSet`.\n4. Запись изменений состояния системы (если это необходимо) и передача информации обратно пользователю.\n\n### Заключение\n\nТаким образом, `ControlPlaneService` играет роль центрального контроллера, координирующего работу различных компонентов системы через свои интерфейсы (каналы и действия). Его основная задача — обеспечивать согласованность и корректность изменения состояния системы в ответ на внешние запросы.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS", + "C4_SEMANTIC_ROLES" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "ControlPlaneService" + ], + "keyword_hints": [ + "ControlPlaneService" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "ControlPlaneService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Объясни класс ControlPlaneService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "Объясни класс ControlPlaneService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Объясни класс ControlPlaneService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "Объясни класс ControlPlaneService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "ControlPlaneService", + "alternatives": [ + "ControlPlaneService" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 8, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 2, + "symbol_resolution": 0, + "retrieval_total": 176, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 45, + "C0_SOURCE_CHUNKS": 23, + "C4_SEMANTIC_ROLES": 28, + "C2_DEPENDENCY_GRAPH": 63, + "C3_ENTRYPOINTS": 13 + }, + "merge_rank": 19, + "prompt_build": 0, + "llm_call": 5139 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 325, + "evidence_rows": 19, + "evidence_chars": 3087 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 8, + "unique_paths": 7 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 1 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_v1", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "ControlPlaneService" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 19, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-fullchain-explain-control-plane-service", + "mode": "full_chain", + "run_started_at": "2026-03-12T09:18:24", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Объясни класс ControlPlaneService", + "normalized_query": "Объясни класс ControlPlaneService" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Объясни класс ControlPlaneService" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни класс ControlPlaneService" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "ControlPlaneService" + ], + "keyword_hints": [ + "ControlPlaneService" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 2 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Объясни класс ControlPlaneService" + }, + "output": { + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "ControlPlaneService", + "alternatives": [ + "ControlPlaneService" + ], + "confidence": 0.99 + }, + "rag_count": 19, + "rag_rows": [ + { + "path": "src/app_runtime/control/service.py", + "content": "class ControlPlaneService\nControlPlaneService", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "qname": "ControlPlaneService", + "kind": "class", + "signature": "ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/queue/in_memory.py", + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)", + "layer": "C4_SEMANTIC_ROLES", + "title": "InMemoryTaskQueue", + "span_start": 9, + "span_end": 38, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 22, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "2da04cb94544a3bcbf0943a95ad4bdd8710bcafaa32a02fd0e4de2178dcf3533", + "symbol_name": "InMemoryTaskQueue", + "qname": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 9, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "58f0cc001ccda0eee4c6bc32ed83bd05eafd6b6644f1e8b4aa9eed3103db73dc", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.register_channel reads_attr self._channels.append", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.register_channel:reads_attr", + "span_start": 17, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "1ee5925deffdc38ba15b88bf7c89e5fcd1a78f493fe30f2deb827d714a1b18e8", + "edge_type": "reads_attr", + "src_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "src_qname": "ControlPlaneService.register_channel", + "dst_symbol_id": null, + "dst_ref": "self._channels.append", + "resolution": "partial", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "class ControlPlaneService:\n def __init__(self) -> None:\n self._channels: list[ControlChannel] = []\n\n def register_channel(self, channel: ControlChannel) -> None:\n self._channels.append(channel)\n\n def start(self, runtime: RuntimeManager) -> None:\n if not self._channels:\n return\n asyncio.run(self._start_async(runtime))\n\n def stop(self) -> None:\n if not self._channels:\n return\n asyncio.run(self._stop_async())\n\n def snapshot(self, runtime: RuntimeManager) -> dict[str, object]:\n health = runtime.current_health()\n return {\n \"runtime\": {\"state\": runtime._state.value},\n \"modules\": list(runtime.registry.modules),\n \"services\": runtime.services.snapshot(),\n \"workers\": runtime.workers.snapshot(),\n \"health\": runtime.health.snapshot(runtime.workers.healths()) | {\"status\": health[\"status\"]},\n \"config\": runtime.configuration.get(),\n }\n\n async def _start_async(self, runtime: RuntimeManager) -> None:\n actions = ControlActionSet(\n health=runtime.health_status,\n start=runtime.start_runtime,\n stop=runtime.stop_runtime,\n status=runtime.runtime_status,\n )\n for channel in self._channels:\n await channel.start(actions)\n\n async def _stop_async(self) -> None:\n for channel in reversed(self._channels):\n await channel.stop()", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/service.py:ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "ControlPlaneService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Объясни класс ControlPlaneService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "Объясни класс ControlPlaneService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Объясни класс ControlPlaneService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "Объясни класс ControlPlaneService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "ControlPlaneService", + "alternatives": [ + "ControlPlaneService" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 8, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 176, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 45, + "C0_SOURCE_CHUNKS": 23, + "C4_SEMANTIC_ROLES": 28, + "C2_DEPENDENCY_GRAPH": 63, + "C3_ENTRYPOINTS": 13 + }, + "merge_rank": 19 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Объясни класс ControlPlaneService", + "rag_count": 19 + }, + "output": { + "llm_answer": "## Анализ класса `ControlPlaneService`\n\n### Обзор контекста\n\nВ рамках данного контекста обсуждаются несколько сущностей и их роли в системе обработки запросов и управления состоянием:\n\n- **`ControlPlaneService`**: Основной объект, рассматриваемый в вопросе.\n- **`ControlChannel`**: Базовый интерфейс для моделей или каналов взаимодействия.\n- **`ControlActionSet`**: Набор действий, выполняемых моделью.\n- **`UvicornThreadRunner`**: Класс, отвечающий за запуск HTTP-сервера с использованием библиотеки uvicorn в отдельном потоке.\n- **`HttpControlChannel`**: Канал контроля на основе HTTP, который также участвует в обработке состояния и данных потока.\n\nВсе перечисленные классы являются частью модуля `src/app_runtime/control`, что указывает на их связь с управлением данными и обработкой состояний в приложении.\n\n### Описание поведения и архитектуры\n\n**Класс `ControlPlaneService`:**\n\nЭтот класс является ключевым элементом в управлении поведением системы на уровне \"контроля\" (\"Control Plane\"). Он отвечает за чтение и запись атрибутов состояния приложения и взаимодействие с различными компонентами через каналы и действия.\n\n#### Основные обязанности (`Responsibilities`):\n\n1. **Чтение и запись атрибутов состояния:** \n - Класс хранит и управляет текущим состоянием системы и может изменять его в зависимости от поступающих запросов и событий.\n \n2. **Участие в данных потоков (`dataflow slices`) :**\n - Указано участие в пяти различных срезах данных, которые могут быть связаны с различными аспектами работы системы (например, обработка запросов, выполнение вычислений, управление логикой бизнес-процессов).\n\n#### Поток данных и логика выполнения\n\nПоскольку конкретные детали реализации не предоставлены, можно предположить следующий общий сценарий функционирования `ControlPlaneService`:\n\n1. Получение запроса извне (через HTTP или другой канал).\n2. Валидация и преобразование входных данных.\n3. Вызов соответствующих методов или действий из объекта `ControlActionSet`.\n4. Запись изменений состояния системы (если это необходимо) и передача информации обратно пользователю.\n\n### Заключение\n\nТаким образом, `ControlPlaneService` играет роль центрального контроллера, координирующего работу различных компонентов системы через свои интерфейсы (каналы и действия). Его основная задача — обеспечивать согласованность и корректность изменения состояния системы в ответ на внешние запросы." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 325, + "evidence_rows": 19, + "evidence_chars": 3087 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 8, + "unique_paths": 7 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 1 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_v1", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 5139 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091824/full_chain_plba_code_retrieval_plba-fullchain-explain-control-plane-service.md b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091824/full_chain_plba_code_retrieval_plba-fullchain-explain-control-plane-service.md new file mode 100644 index 0000000..7df4945 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091824/full_chain_plba_code_retrieval_plba-fullchain-explain-control-plane-service.md @@ -0,0 +1,34 @@ +# plba-fullchain-explain-control-plane-service + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_retrieval.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Объясни класс ControlPlaneService + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 19, + "llm_answer": "## Анализ класса `ControlPlaneService`\n\n### Обзор контекста\n\nВ рамках данного контекста обсуждаются несколько сущностей и их роли в системе обработки запросов и управления состоянием:\n\n- **`ControlPlaneService`**: Основной объект, рассматриваемый в вопросе.\n- **`ControlChannel`**: Базовый интерфейс для моделей или каналов взаимодействия.\n- **`ControlActionSet`**: Набор действий, выполняемых моделью.\n- **`UvicornThreadRunner`**: Класс, отвечающий за запуск HTTP-сервера с использованием библиотеки uvicorn в отдельном потоке.\n- **`HttpControlChannel`**: Канал контроля на основе HTTP, который также участвует в обработке состояния и данных потока.\n\nВсе перечисленные классы являются частью модуля `src/app_runtime/control`, что указывает на их связь с управлением данными и обработкой состояний в приложении.\n\n### Описание поведения и архитектуры\n\n**Класс `ControlPlaneService`:**\n\nЭтот класс является ключевым элементом в управлении поведением системы на уровне \"контроля\" (\"Control Plane\"). Он отвечает за чтение и запись атрибутов состояния приложения и взаимодействие с различными компонентами через каналы и действия.\n\n#### Основные обязанности (`Responsibilities`):\n\n1. **Чтение и запись атрибутов состояния:** \n - Класс хранит и управляет текущим состоянием системы и может изменять его в зависимости от поступающих запросов и событий.\n \n2. **Участие в данных потоков (`dataflow slices`) :**\n - Указано участие в пяти различных срезах данных, которые могут быть связаны с различными аспектами работы системы (например, обработка запросов, выполнение вычислений, управление логикой бизнес-процессов).\n\n#### Поток данных и логика выполнения\n\nПоскольку конкретные детали реализации не предоставлены, можно предположить следующий общий сценарий функционирования `ControlPlaneService`:\n\n1. Получение запроса извне (через HTTP или другой канал).\n2. Валидация и преобразование входных данных.\n3. Вызов соответствующих методов или действий из объекта `ControlActionSet`.\n4. Запись изменений состояния системы (если это необходимо) и передача информации обратно пользователю.\n\n### Заключение\n\nТаким образом, `ControlPlaneService` играет роль центрального контроллера, координирующего работу различных компонентов системы через свои интерфейсы (каналы и действия). Его основная задача — обеспечивать согласованность и корректность изменения состояния системы в ответ на внешние запросы.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "ControlPlaneService" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091824/full_chain_plba_code_retrieval_plba-fullchain-explain-create-runtime.json b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091824/full_chain_plba_code_retrieval_plba-fullchain-explain-create-runtime.json new file mode 100644 index 0000000..164815e --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091824/full_chain_plba_code_retrieval_plba-fullchain-explain-create-runtime.json @@ -0,0 +1,2372 @@ +{ + "case_id": "plba-fullchain-explain-create-runtime", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_retrieval.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 19, + "llm_answer": "## Анализ функции `create_runtime` и архитектуры приложения\n\n### Описание задачи\n\nФункция `create_runtime` отвечает за инициализацию и настройку runtime окружения для приложения. Она является ключевым компонентом начальной загрузки системы и участвует в формировании конфигурации и окружения для дальнейшей работы.\n\n### Поток данных и архитектура\n\nАрхитектура приложения организована вокруг нескольких компонентов, которые взаимодействуют между собой через определенные роли (`pipeline_stage`) и участвуют в различных фазах жизненного цикла приложения:\n\n1. **ConfigFileLoader** \n - Роль: pipeline_stage \n - Ответственность: чтение и запись состояния атрибутов; участие в данных потока (dataflow slice 8) \n \n Этот компонент загружает конфигурацию из файла, что позволяет системе настраиваться на основе внешних параметров.\n\n2. **WorkflowPersistence** \n - Роль: pipeline_stage \n - Ответственность: оркестровка вызовов ролей-подчиненных, чтение и запись состояния атрибутов; участие в данных потока (dataflow slice 16) \n \n Эта сущность ответственна за сохранение и восстановление состояний задач и рабочих процессов, обеспечивая консистентность данных и целостность контекста выполнения.\n\n3. **HttpControlChannel** \n - Роль: pipeline_stage \n - Ответственность: чтение и запись состояния атрибутов; участие в данных потока (dataflow slice 10) \n \n Используется для управления каналами HTTP, позволяя приложению принимать запросы и обрабатывать их соответствующим образом.\n\n4. **InMemoryTaskQueue** \n - Роль: pipeline_stage \n - Ответственность: чтение и запись состояния атрибутов; участие в данных потока (dataflow slice 9) \n \n Обеспечивает управление очередями задач, храня их в памяти, что удобно для быстрого доступа и обработки.\n\n5. **UvicornThreadRunner** \n - Роль: pipeline_stage \n - Ответственность: чтение и запись состояния атрибутов; участие в данных потока (dataflow slice 24) \n \n Это класс, который запускает сервер на базе библиотеки uvicorn, управляя его рабочим процессом и обеспечивая выполнение HTTP-запросов асинхронно в отдельных потоках.\n\n### Поведение функции `create_runtime`\n\nФункция `create_runtime` выполняет следующие шаги:\n\n1. Инициализация и настройка конфигурации через объект класса `ConfigFileLoader`, чтобы загрузить необходимые параметры из внешнего файла конфигурации.\n2. Создание экземпляра объекта `WorkflowPersistence`, который управляет сохранением и восстановлением контекстных данных рабочих процессов.\n3. Настройка и запуск службы HTTP-канала с использованием `HttpControlChannel`.\n4. Запуск очереди задач через экземпляр `InMemoryTaskQueue`.\n5. Запуск сервера uvicorn через объект `UvicornThreadRunner`, что обеспечивает обработку входящих HTTP-запросов.\n\nТаким образом, функция `create_runtime` объединяет несколько ключевых компонентов и обеспечивает полное окружение для запуска и обслуживания прикладного уровня приложения.\n\n---\n\nЭтот анализ охватывает основные компоненты и роли, участвующие в процессе создания runtime-среды, а также описывает логику взаимодействия этих сущностей при выполнении задачи.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "create_runtime" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-fullchain-explain-create-runtime", + "text": "Объясни функцию create_runtime", + "mode": "full_chain", + "run_started_at": "2026-03-12T09:18:24", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни функцию create_runtime", + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "create_runtime", + "alternatives": [ + "create_runtime" + ], + "confidence": 0.99 + }, + "rag_count": 19, + "rag_rows": [ + { + "path": "src/plba/bootstrap.py", + "content": "function create_runtime\ncreate_runtime(module)", + "layer": "C1_SYMBOL_CATALOG", + "title": "create_runtime", + "span_start": 8, + "span_end": 29, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "qname": "create_runtime", + "kind": "function", + "signature": "create_runtime(module)", + "parent_symbol_id": null, + "package_or_module": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/queue/in_memory.py", + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)", + "layer": "C4_SEMANTIC_ROLES", + "title": "InMemoryTaskQueue", + "span_start": 9, + "span_end": 38, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 22, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "2da04cb94544a3bcbf0943a95ad4bdd8710bcafaa32a02fd0e4de2178dcf3533", + "symbol_name": "InMemoryTaskQueue", + "qname": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 9, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "58f0cc001ccda0eee4c6bc32ed83bd05eafd6b6644f1e8b4aa9eed3103db73dc", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "ConfigFileLoader\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (8)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ConfigFileLoader", + "span_start": 11, + "span_end": 48, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 23, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "a8474eca8b6e9dc86ae67ed68b16fa5fb639ef08739c053e7b7195489765667f", + "symbol_name": "ConfigFileLoader", + "qname": "ConfigFileLoader", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 8, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workers/supervisor.py", + "content": "WorkerSupervisor\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkerSupervisor", + "span_start": 10, + "span_end": 59, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "c17b44e8d9e97d490989b21fa67d7c346cdda8a0472e4c41fb243c8846faa124", + "symbol_name": "WorkerSupervisor", + "qname": "WorkerSupervisor", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "77609d9d5927171cce7fc3a54897c183fd63068710c6362029b700937aae5eee", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowEngine", + "span_start": 10, + "span_end": 86, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "57ec0a9f11c542c78e008684a888397e8d9ef4223671acb2567e631a0cbc70b4", + "symbol_name": "WorkflowEngine", + "qname": "WorkflowEngine", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/store.py", + "content": "TraceContextStore\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "TraceContextStore", + "span_start": 15, + "span_end": 52, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b2dad4fbe16ffb11b58deba311c7739955c39d59f291b22181f33e9c8cce4059", + "symbol_name": "TraceContextStore", + "qname": "TraceContextStore", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "d369554f08fc92039c6edd5a2a1e73b23901533e8974459170bbd9347d263dc5", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime calls runtime.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:calls", + "span_start": 19, + "span_end": 19, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "4eaeec4ac55a59d5f66fd01c4754955f8fedaf4bc3df13fa769b352c7bfaacbb", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.add_config_file", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime reads_attr runtime.register_module", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:reads_attr", + "span_start": 28, + "span_end": 28, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "45516c79ff358dbf9b650a081668df0f66d2fe989300f985a1a78be6be166f8f", + "edge_type": "reads_attr", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.register_module", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:instantiates", + "span_start": 17, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "0adba17984f850ea1608c9e734d2dd5c325cfde3a8133123aa239e44935ad18e", + "edge_type": "instantiates", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": "27158ca220022eeb5083c6addf8a50775d45f7161284fd60aac48410105f4b98", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime calls runtime.register_module", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:calls", + "span_start": 28, + "span_end": 28, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "ab6003c3441addc1ba1b81edeca009165559f652f6b2cf424e5ae61b1f617de8", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.register_module", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime calls runtime.control_plane.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:calls", + "span_start": 21, + "span_end": 27, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "2678250030b9ce47a3b3b55fac7897ac530367edc8374ac9d5e6ecafb1e483f0", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.control_plane.register_channel", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime reads_attr runtime.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:reads_attr", + "span_start": 19, + "span_end": 19, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "30d4e8aae984ab84d523e80d02f1caeda52d547fa3d2aa47be8845931cabbca2", + "edge_type": "reads_attr", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.add_config_file", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "def create_runtime(\n module: ApplicationModule,\n *,\n config_path: str | None = None,\n enable_http_control: bool = False,\n control_host: str = \"127.0.0.1\",\n control_port: int = 8080,\n control_timeout: int = 5,\n) -> RuntimeManager:\n runtime = RuntimeManager()\n if config_path is not None:\n runtime.add_config_file(config_path)\n if enable_http_control:\n runtime.control_plane.register_channel(\n HttpControlChannel(\n host=control_host,\n port=control_port,\n timeout=control_timeout,\n )\n )\n runtime.register_module(module)\n return runtime", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/bootstrap.py:create_runtime", + "span_start": 8, + "span_end": 29, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "## Анализ функции `create_runtime` и архитектуры приложения\n\n### Описание задачи\n\nФункция `create_runtime` отвечает за инициализацию и настройку runtime окружения для приложения. Она является ключевым компонентом начальной загрузки системы и участвует в формировании конфигурации и окружения для дальнейшей работы.\n\n### Поток данных и архитектура\n\nАрхитектура приложения организована вокруг нескольких компонентов, которые взаимодействуют между собой через определенные роли (`pipeline_stage`) и участвуют в различных фазах жизненного цикла приложения:\n\n1. **ConfigFileLoader** \n - Роль: pipeline_stage \n - Ответственность: чтение и запись состояния атрибутов; участие в данных потока (dataflow slice 8) \n \n Этот компонент загружает конфигурацию из файла, что позволяет системе настраиваться на основе внешних параметров.\n\n2. **WorkflowPersistence** \n - Роль: pipeline_stage \n - Ответственность: оркестровка вызовов ролей-подчиненных, чтение и запись состояния атрибутов; участие в данных потока (dataflow slice 16) \n \n Эта сущность ответственна за сохранение и восстановление состояний задач и рабочих процессов, обеспечивая консистентность данных и целостность контекста выполнения.\n\n3. **HttpControlChannel** \n - Роль: pipeline_stage \n - Ответственность: чтение и запись состояния атрибутов; участие в данных потока (dataflow slice 10) \n \n Используется для управления каналами HTTP, позволяя приложению принимать запросы и обрабатывать их соответствующим образом.\n\n4. **InMemoryTaskQueue** \n - Роль: pipeline_stage \n - Ответственность: чтение и запись состояния атрибутов; участие в данных потока (dataflow slice 9) \n \n Обеспечивает управление очередями задач, храня их в памяти, что удобно для быстрого доступа и обработки.\n\n5. **UvicornThreadRunner** \n - Роль: pipeline_stage \n - Ответственность: чтение и запись состояния атрибутов; участие в данных потока (dataflow slice 24) \n \n Это класс, который запускает сервер на базе библиотеки uvicorn, управляя его рабочим процессом и обеспечивая выполнение HTTP-запросов асинхронно в отдельных потоках.\n\n### Поведение функции `create_runtime`\n\nФункция `create_runtime` выполняет следующие шаги:\n\n1. Инициализация и настройка конфигурации через объект класса `ConfigFileLoader`, чтобы загрузить необходимые параметры из внешнего файла конфигурации.\n2. Создание экземпляра объекта `WorkflowPersistence`, который управляет сохранением и восстановлением контекстных данных рабочих процессов.\n3. Настройка и запуск службы HTTP-канала с использованием `HttpControlChannel`.\n4. Запуск очереди задач через экземпляр `InMemoryTaskQueue`.\n5. Запуск сервера uvicorn через объект `UvicornThreadRunner`, что обеспечивает обработку входящих HTTP-запросов.\n\nТаким образом, функция `create_runtime` объединяет несколько ключевых компонентов и обеспечивает полное окружение для запуска и обслуживания прикладного уровня приложения.\n\n---\n\nЭтот анализ охватывает основные компоненты и роли, участвующие в процессе создания runtime-среды, а также описывает логику взаимодействия этих сущностей при выполнении задачи.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS", + "C4_SEMANTIC_ROLES" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "function", + "symbol_candidates": [ + "create_runtime" + ], + "keyword_hints": [ + "create_runtime" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Объясни функцию create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "Объясни функцию create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Объясни функцию create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "Объясни функцию create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "create_runtime", + "alternatives": [ + "create_runtime" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 8, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 1, + "symbol_resolution": 0, + "retrieval_total": 162, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 49, + "C0_SOURCE_CHUNKS": 24, + "C4_SEMANTIC_ROLES": 21, + "C2_DEPENDENCY_GRAPH": 50, + "C3_ENTRYPOINTS": 16 + }, + "merge_rank": 25, + "prompt_build": 0, + "llm_call": 6221 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 362, + "evidence_rows": 19, + "evidence_chars": 2136 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 8, + "unique_paths": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 1 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_v1", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "create_runtime" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 19, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-fullchain-explain-create-runtime", + "mode": "full_chain", + "run_started_at": "2026-03-12T09:18:24", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Объясни функцию create_runtime", + "normalized_query": "Объясни функцию create_runtime" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Объясни функцию create_runtime" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни функцию create_runtime" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "function", + "symbol_candidates": [ + "create_runtime" + ], + "keyword_hints": [ + "create_runtime" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 1 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Объясни функцию create_runtime" + }, + "output": { + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "create_runtime", + "alternatives": [ + "create_runtime" + ], + "confidence": 0.99 + }, + "rag_count": 19, + "rag_rows": [ + { + "path": "src/plba/bootstrap.py", + "content": "function create_runtime\ncreate_runtime(module)", + "layer": "C1_SYMBOL_CATALOG", + "title": "create_runtime", + "span_start": 8, + "span_end": 29, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "qname": "create_runtime", + "kind": "function", + "signature": "create_runtime(module)", + "parent_symbol_id": null, + "package_or_module": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/queue/in_memory.py", + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)", + "layer": "C4_SEMANTIC_ROLES", + "title": "InMemoryTaskQueue", + "span_start": 9, + "span_end": 38, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 22, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "2da04cb94544a3bcbf0943a95ad4bdd8710bcafaa32a02fd0e4de2178dcf3533", + "symbol_name": "InMemoryTaskQueue", + "qname": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 9, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "58f0cc001ccda0eee4c6bc32ed83bd05eafd6b6644f1e8b4aa9eed3103db73dc", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "ConfigFileLoader\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (8)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ConfigFileLoader", + "span_start": 11, + "span_end": 48, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 23, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "a8474eca8b6e9dc86ae67ed68b16fa5fb639ef08739c053e7b7195489765667f", + "symbol_name": "ConfigFileLoader", + "qname": "ConfigFileLoader", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 8, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workers/supervisor.py", + "content": "WorkerSupervisor\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkerSupervisor", + "span_start": 10, + "span_end": 59, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "c17b44e8d9e97d490989b21fa67d7c346cdda8a0472e4c41fb243c8846faa124", + "symbol_name": "WorkerSupervisor", + "qname": "WorkerSupervisor", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "77609d9d5927171cce7fc3a54897c183fd63068710c6362029b700937aae5eee", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowEngine", + "span_start": 10, + "span_end": 86, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "57ec0a9f11c542c78e008684a888397e8d9ef4223671acb2567e631a0cbc70b4", + "symbol_name": "WorkflowEngine", + "qname": "WorkflowEngine", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/store.py", + "content": "TraceContextStore\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "TraceContextStore", + "span_start": 15, + "span_end": 52, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b2dad4fbe16ffb11b58deba311c7739955c39d59f291b22181f33e9c8cce4059", + "symbol_name": "TraceContextStore", + "qname": "TraceContextStore", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "d369554f08fc92039c6edd5a2a1e73b23901533e8974459170bbd9347d263dc5", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime calls runtime.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:calls", + "span_start": 19, + "span_end": 19, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "4eaeec4ac55a59d5f66fd01c4754955f8fedaf4bc3df13fa769b352c7bfaacbb", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.add_config_file", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime reads_attr runtime.register_module", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:reads_attr", + "span_start": 28, + "span_end": 28, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "45516c79ff358dbf9b650a081668df0f66d2fe989300f985a1a78be6be166f8f", + "edge_type": "reads_attr", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.register_module", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:instantiates", + "span_start": 17, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "0adba17984f850ea1608c9e734d2dd5c325cfde3a8133123aa239e44935ad18e", + "edge_type": "instantiates", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": "27158ca220022eeb5083c6addf8a50775d45f7161284fd60aac48410105f4b98", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime calls runtime.register_module", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:calls", + "span_start": 28, + "span_end": 28, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "ab6003c3441addc1ba1b81edeca009165559f652f6b2cf424e5ae61b1f617de8", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.register_module", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime calls runtime.control_plane.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:calls", + "span_start": 21, + "span_end": 27, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "2678250030b9ce47a3b3b55fac7897ac530367edc8374ac9d5e6ecafb1e483f0", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.control_plane.register_channel", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime reads_attr runtime.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:reads_attr", + "span_start": 19, + "span_end": 19, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "30d4e8aae984ab84d523e80d02f1caeda52d547fa3d2aa47be8845931cabbca2", + "edge_type": "reads_attr", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.add_config_file", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "def create_runtime(\n module: ApplicationModule,\n *,\n config_path: str | None = None,\n enable_http_control: bool = False,\n control_host: str = \"127.0.0.1\",\n control_port: int = 8080,\n control_timeout: int = 5,\n) -> RuntimeManager:\n runtime = RuntimeManager()\n if config_path is not None:\n runtime.add_config_file(config_path)\n if enable_http_control:\n runtime.control_plane.register_channel(\n HttpControlChannel(\n host=control_host,\n port=control_port,\n timeout=control_timeout,\n )\n )\n runtime.register_module(module)\n return runtime", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/bootstrap.py:create_runtime", + "span_start": 8, + "span_end": 29, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Объясни функцию create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "Объясни функцию create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Объясни функцию create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "Объясни функцию create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "create_runtime", + "alternatives": [ + "create_runtime" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 8, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 162, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 49, + "C0_SOURCE_CHUNKS": 24, + "C4_SEMANTIC_ROLES": 21, + "C2_DEPENDENCY_GRAPH": 50, + "C3_ENTRYPOINTS": 16 + }, + "merge_rank": 25 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Объясни функцию create_runtime", + "rag_count": 19 + }, + "output": { + "llm_answer": "## Анализ функции `create_runtime` и архитектуры приложения\n\n### Описание задачи\n\nФункция `create_runtime` отвечает за инициализацию и настройку runtime окружения для приложения. Она является ключевым компонентом начальной загрузки системы и участвует в формировании конфигурации и окружения для дальнейшей работы.\n\n### Поток данных и архитектура\n\nАрхитектура приложения организована вокруг нескольких компонентов, которые взаимодействуют между собой через определенные роли (`pipeline_stage`) и участвуют в различных фазах жизненного цикла приложения:\n\n1. **ConfigFileLoader** \n - Роль: pipeline_stage \n - Ответственность: чтение и запись состояния атрибутов; участие в данных потока (dataflow slice 8) \n \n Этот компонент загружает конфигурацию из файла, что позволяет системе настраиваться на основе внешних параметров.\n\n2. **WorkflowPersistence** \n - Роль: pipeline_stage \n - Ответственность: оркестровка вызовов ролей-подчиненных, чтение и запись состояния атрибутов; участие в данных потока (dataflow slice 16) \n \n Эта сущность ответственна за сохранение и восстановление состояний задач и рабочих процессов, обеспечивая консистентность данных и целостность контекста выполнения.\n\n3. **HttpControlChannel** \n - Роль: pipeline_stage \n - Ответственность: чтение и запись состояния атрибутов; участие в данных потока (dataflow slice 10) \n \n Используется для управления каналами HTTP, позволяя приложению принимать запросы и обрабатывать их соответствующим образом.\n\n4. **InMemoryTaskQueue** \n - Роль: pipeline_stage \n - Ответственность: чтение и запись состояния атрибутов; участие в данных потока (dataflow slice 9) \n \n Обеспечивает управление очередями задач, храня их в памяти, что удобно для быстрого доступа и обработки.\n\n5. **UvicornThreadRunner** \n - Роль: pipeline_stage \n - Ответственность: чтение и запись состояния атрибутов; участие в данных потока (dataflow slice 24) \n \n Это класс, который запускает сервер на базе библиотеки uvicorn, управляя его рабочим процессом и обеспечивая выполнение HTTP-запросов асинхронно в отдельных потоках.\n\n### Поведение функции `create_runtime`\n\nФункция `create_runtime` выполняет следующие шаги:\n\n1. Инициализация и настройка конфигурации через объект класса `ConfigFileLoader`, чтобы загрузить необходимые параметры из внешнего файла конфигурации.\n2. Создание экземпляра объекта `WorkflowPersistence`, который управляет сохранением и восстановлением контекстных данных рабочих процессов.\n3. Настройка и запуск службы HTTP-канала с использованием `HttpControlChannel`.\n4. Запуск очереди задач через экземпляр `InMemoryTaskQueue`.\n5. Запуск сервера uvicorn через объект `UvicornThreadRunner`, что обеспечивает обработку входящих HTTP-запросов.\n\nТаким образом, функция `create_runtime` объединяет несколько ключевых компонентов и обеспечивает полное окружение для запуска и обслуживания прикладного уровня приложения.\n\n---\n\nЭтот анализ охватывает основные компоненты и роли, участвующие в процессе создания runtime-среды, а также описывает логику взаимодействия этих сущностей при выполнении задачи." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 362, + "evidence_rows": 19, + "evidence_chars": 2136 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 8, + "unique_paths": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 1 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_v1", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 6221 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091824/full_chain_plba_code_retrieval_plba-fullchain-explain-create-runtime.md b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091824/full_chain_plba_code_retrieval_plba-fullchain-explain-create-runtime.md new file mode 100644 index 0000000..27acbe6 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091824/full_chain_plba_code_retrieval_plba-fullchain-explain-create-runtime.md @@ -0,0 +1,34 @@ +# plba-fullchain-explain-create-runtime + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_retrieval.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Объясни функцию create_runtime + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 19, + "llm_answer": "## Анализ функции `create_runtime` и архитектуры приложения\n\n### Описание задачи\n\nФункция `create_runtime` отвечает за инициализацию и настройку runtime окружения для приложения. Она является ключевым компонентом начальной загрузки системы и участвует в формировании конфигурации и окружения для дальнейшей работы.\n\n### Поток данных и архитектура\n\nАрхитектура приложения организована вокруг нескольких компонентов, которые взаимодействуют между собой через определенные роли (`pipeline_stage`) и участвуют в различных фазах жизненного цикла приложения:\n\n1. **ConfigFileLoader** \n - Роль: pipeline_stage \n - Ответственность: чтение и запись состояния атрибутов; участие в данных потока (dataflow slice 8) \n \n Этот компонент загружает конфигурацию из файла, что позволяет системе настраиваться на основе внешних параметров.\n\n2. **WorkflowPersistence** \n - Роль: pipeline_stage \n - Ответственность: оркестровка вызовов ролей-подчиненных, чтение и запись состояния атрибутов; участие в данных потока (dataflow slice 16) \n \n Эта сущность ответственна за сохранение и восстановление состояний задач и рабочих процессов, обеспечивая консистентность данных и целостность контекста выполнения.\n\n3. **HttpControlChannel** \n - Роль: pipeline_stage \n - Ответственность: чтение и запись состояния атрибутов; участие в данных потока (dataflow slice 10) \n \n Используется для управления каналами HTTP, позволяя приложению принимать запросы и обрабатывать их соответствующим образом.\n\n4. **InMemoryTaskQueue** \n - Роль: pipeline_stage \n - Ответственность: чтение и запись состояния атрибутов; участие в данных потока (dataflow slice 9) \n \n Обеспечивает управление очередями задач, храня их в памяти, что удобно для быстрого доступа и обработки.\n\n5. **UvicornThreadRunner** \n - Роль: pipeline_stage \n - Ответственность: чтение и запись состояния атрибутов; участие в данных потока (dataflow slice 24) \n \n Это класс, который запускает сервер на базе библиотеки uvicorn, управляя его рабочим процессом и обеспечивая выполнение HTTP-запросов асинхронно в отдельных потоках.\n\n### Поведение функции `create_runtime`\n\nФункция `create_runtime` выполняет следующие шаги:\n\n1. Инициализация и настройка конфигурации через объект класса `ConfigFileLoader`, чтобы загрузить необходимые параметры из внешнего файла конфигурации.\n2. Создание экземпляра объекта `WorkflowPersistence`, который управляет сохранением и восстановлением контекстных данных рабочих процессов.\n3. Настройка и запуск службы HTTP-канала с использованием `HttpControlChannel`.\n4. Запуск очереди задач через экземпляр `InMemoryTaskQueue`.\n5. Запуск сервера uvicorn через объект `UvicornThreadRunner`, что обеспечивает обработку входящих HTTP-запросов.\n\nТаким образом, функция `create_runtime` объединяет несколько ключевых компонентов и обеспечивает полное окружение для запуска и обслуживания прикладного уровня приложения.\n\n---\n\nЭтот анализ охватывает основные компоненты и роли, участвующие в процессе создания runtime-среды, а также описывает логику взаимодействия этих сущностей при выполнении задачи.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "create_runtime" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091824/full_chain_plba_code_retrieval_plba-fullchain-explain-http-control-channel.json b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091824/full_chain_plba_code_retrieval_plba-fullchain-explain-http-control-channel.json new file mode 100644 index 0000000..cff3923 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091824/full_chain_plba_code_retrieval_plba-fullchain-explain-http-control-channel.json @@ -0,0 +1,2564 @@ +{ + "case_id": "plba-fullchain-explain-http-control-channel", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_retrieval.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 19, + "llm_answer": "## Анализ класса `HttpControlChannel`\n\n### Файл и путь:\n- **Файл:** `src/app_runtime/control/http_channel.py`\n- **Класс:** `HttpControlChannel`\n\n### Описание роли и ответственности:\n- **Роль:** `pipeline_stage`\n- **Ответственности:**\n - Чтение и запись атрибутов состояния (`reads and writes state attributes`).\n - Участие в \"слайсах\" данных потока (`participates in dataflow slices`).\n - В документации указано участие в 10 слайсах данных.\n\n### Родительский класс:\n- Наследуется от класса `ControlChannel`, объявленного в файле `src/app_runtime/control/base.py`.\n \n### Подразумеваемая архитектура и поток данных:\n1. **Родительская сущность** (`ControlChannel`) является базовой моделью для каналов управления, определяющей основные обязанности модели.\n - Пример: Класс может иметь стандартный набор методов или атрибутов, которые наследуются всеми дочерними сущностями.\n \n2. **Дочерний класс** (`HttpControlChannel`) расширяет функциональность родительского класса, добавляя специфические обязанности HTTP-канала.\n - Обеспечивает взаимодействие с HTTP протоколом, вероятно, через асинхронные HTTP запросы и ответы.\n\n3. **Участие в данныхфлоу**:\n - Согласно описанию, канал участвует в 10 различных слайсах данных. Это означает, что он обрабатывает части общего потока данных, разделенного на несколько сегментов (\"слайсов\"). \n - Каждый сегмент предназначен для определенной стадии обработки информации внутри системы.\n\n4. **Связь с другими компонентами**:\n - Контроллер взаимодействует с сервисом контроля (`ControlPlaneService`), который также упоминается как `pipeline_stage`. Вероятно, это указывает на то, что контроллер совместно с этим сервисом управляет состоянием и потоком данных между различными стадиями обработки.\n\n### Возможное внутреннее устройство и реализация:\n- Возможно наличие методов чтения и записи атрибутов состояния, а также механизмов отправки и получения сообщений через HTTP-запросы и ответы.\n- Вероятно, присутствуют методы инициализации и конфигурации канала.\n- Поскольку указано, что участвует в нескольких слайсах данных, предполагается наличие инфраструктуры для поддержки параллельного выполнения задач и передачи данных между ними.\n\n### Заключение:\nКанал управления `HttpControlChannel` реализует механизм взаимодействия с HTTP-протоколом, отвечая за чтение и запись состояний и участвуя в передаче данных между стадиями обработки данных. Он наследует базовые принципы поведения от родительской сущности `ControlChannel`, обеспечивая специализированную функциональность для работы с HTTP-соединениями и потоками данных.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "HttpControlChannel" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-fullchain-explain-http-control-channel", + "text": "Объясни класс HttpControlChannel", + "mode": "full_chain", + "run_started_at": "2026-03-12T09:18:24", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни класс HttpControlChannel", + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "HttpControlChannel", + "alternatives": [ + "HttpControlChannel" + ], + "confidence": 0.99 + }, + "rag_count": 19, + "rag_rows": [ + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel\nHttpControlChannel(ControlChannel)", + "layer": "C1_SYMBOL_CATALOG", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "qname": "HttpControlChannel", + "kind": "class", + "signature": "HttpControlChannel(ControlChannel)", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/queue/in_memory.py", + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)", + "layer": "C4_SEMANTIC_ROLES", + "title": "InMemoryTaskQueue", + "span_start": 9, + "span_end": 38, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 22, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "2da04cb94544a3bcbf0943a95ad4bdd8710bcafaa32a02fd0e4de2178dcf3533", + "symbol_name": "InMemoryTaskQueue", + "qname": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 9, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "58f0cc001ccda0eee4c6bc32ed83bd05eafd6b6644f1e8b4aa9eed3103db73dc", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._runner\n -> HttpControlChannel.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 15, + "span_end": 22, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "51d73913df709152258ed1b9a8c8f4eb3c575eccfe6b982aef0b28e0789a29da", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0", + "dst_ref": "HttpControlChannel.start", + "resolution": "resolved", + "slice_id": "51d73913df709152258ed1b9a8c8f4eb3c575eccfe6b982aef0b28e0789a29da", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._runner", + "HttpControlChannel.start" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._runner\n -> HttpControlChannel.port", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 15, + "span_end": 29, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "c7167bab7218bb768ad7c11bfb40d1a3096e6071dd7817bba5fd864cf8f6de13", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "3632ce8227f4a31e0768f2fb021a4d1ba28e1202633aa0f2fac902295931280f", + "dst_ref": "HttpControlChannel.port", + "resolution": "resolved", + "slice_id": "c7167bab7218bb768ad7c11bfb40d1a3096e6071dd7817bba5fd864cf8f6de13", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._runner", + "HttpControlChannel.port" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "3632ce8227f4a31e0768f2fb021a4d1ba28e1202633aa0f2fac902295931280f" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._timeout\n -> HttpControlChannel._health_response", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 14, + "span_end": 34, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "f858f5c9e575f6c4cdfe3853571b7ee21d1f628a443541d2037c3dc9d0790bef", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "e84bf04e9cd2127df235b7064d05f47e19f19a89c7c82f4c247231d4e8fa426a", + "dst_ref": "HttpControlChannel._health_response", + "resolution": "resolved", + "slice_id": "f858f5c9e575f6c4cdfe3853571b7ee21d1f628a443541d2037c3dc9d0790bef", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._timeout", + "HttpControlChannel._health_response" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "e84bf04e9cd2127df235b7064d05f47e19f19a89c7c82f4c247231d4e8fa426a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._timeout\n -> HttpControlChannel._action_response", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "c3ef21fcae96c82c00be74b3ab827d4af2085d89cb3fa5521c19a174aad84dbb", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "e64969024ccaeb34d8d91473fad07b3b3d341875846392e7a006406c7ada1954", + "dst_ref": "HttpControlChannel._action_response", + "resolution": "resolved", + "slice_id": "c3ef21fcae96c82c00be74b3ab827d4af2085d89cb3fa5521c19a174aad84dbb", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._timeout", + "HttpControlChannel._action_response" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "e64969024ccaeb34d8d91473fad07b3b3d341875846392e7a006406c7ada1954" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._runner\n -> HttpControlChannel.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 15, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "0f827ef81a990258a8a74381c8564a8361afa6712dba3200592659c939adcb9d", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "f29ab212620093d72be20e26c5a399624c7939a6056a728762ed3f84a250bfa3", + "dst_ref": "HttpControlChannel.stop", + "resolution": "resolved", + "slice_id": "0f827ef81a990258a8a74381c8564a8361afa6712dba3200592659c939adcb9d", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._runner", + "HttpControlChannel.stop" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "f29ab212620093d72be20e26c5a399624c7939a6056a728762ed3f84a250bfa3" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._factory\n -> HttpControlChannel.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 16, + "span_end": 21, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e61ec25ded7dbe380d95ce2abcbc1d7a2d2afde5aa8453866df8706dfb7d6ddb", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0", + "dst_ref": "HttpControlChannel.start", + "resolution": "resolved", + "slice_id": "e61ec25ded7dbe380d95ce2abcbc1d7a2d2afde5aa8453866df8706dfb7d6ddb", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._factory", + "HttpControlChannel.start" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel(ControlChannel):\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._timeout = timeout\n self._runner = UvicornThreadRunner(host, port, timeout)\n self._factory = HttpControlAppFactory()\n self._actions: ControlActionSet | None = None\n\n async def start(self, actions: ControlActionSet) -> None:\n self._actions = actions\n app = self._factory.create(self._health_response, self._action_response)\n await self._runner.start(app)\n\n async def stop(self) -> None:\n await self._runner.stop()\n\n @property\n def port(self) -> int:\n return self._runner.port\n\n async def _health_response(self) -> dict[str, object]:\n if self._actions is None:\n return {\"status\": \"unhealthy\", \"detail\": \"control actions are not configured\"}\n return await asyncio.wait_for(self._actions.health(), timeout=float(self._timeout))\n\n async def _action_response(self, action: str, _client_source: str = \"unknown\") -> JSONResponse:\n if self._actions is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"{action} handler is not configured\"}, status_code=404)\n callbacks = {\n \"start\": self._actions.start,\n \"stop\": self._actions.stop,\n \"status\": self._actions.status,\n }\n callback = callbacks.get(action)\n if callback is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"unsupported action: {action}\"}, status_code=404)\n action_timeout = max(float(self._timeout), 10.0) if action in {\"start\", \"stop\"} else float(self._timeout)\n try:\n detail = await asyncio.wait_for(callback(), timeout=action_timeout)\n except asyncio.TimeoutError:\n return JSONResponse(\n content={\"status\": \"accepted\", \"detail\": f\"{action} operation is still in progress\"},\n status_code=202,\n )\n except Exception as exc:\n return JSONResponse(content={\"status\": \"error\", \"detail\": str(exc)}, status_code=500)\n return JSONResponse(content={\"status\": \"ok\", \"detail\": detail or f\"{action} action accepted\"}, status_code=200)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_channel.py:HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "## Анализ класса `HttpControlChannel`\n\n### Файл и путь:\n- **Файл:** `src/app_runtime/control/http_channel.py`\n- **Класс:** `HttpControlChannel`\n\n### Описание роли и ответственности:\n- **Роль:** `pipeline_stage`\n- **Ответственности:**\n - Чтение и запись атрибутов состояния (`reads and writes state attributes`).\n - Участие в \"слайсах\" данных потока (`participates in dataflow slices`).\n - В документации указано участие в 10 слайсах данных.\n\n### Родительский класс:\n- Наследуется от класса `ControlChannel`, объявленного в файле `src/app_runtime/control/base.py`.\n \n### Подразумеваемая архитектура и поток данных:\n1. **Родительская сущность** (`ControlChannel`) является базовой моделью для каналов управления, определяющей основные обязанности модели.\n - Пример: Класс может иметь стандартный набор методов или атрибутов, которые наследуются всеми дочерними сущностями.\n \n2. **Дочерний класс** (`HttpControlChannel`) расширяет функциональность родительского класса, добавляя специфические обязанности HTTP-канала.\n - Обеспечивает взаимодействие с HTTP протоколом, вероятно, через асинхронные HTTP запросы и ответы.\n\n3. **Участие в данныхфлоу**:\n - Согласно описанию, канал участвует в 10 различных слайсах данных. Это означает, что он обрабатывает части общего потока данных, разделенного на несколько сегментов (\"слайсов\"). \n - Каждый сегмент предназначен для определенной стадии обработки информации внутри системы.\n\n4. **Связь с другими компонентами**:\n - Контроллер взаимодействует с сервисом контроля (`ControlPlaneService`), который также упоминается как `pipeline_stage`. Вероятно, это указывает на то, что контроллер совместно с этим сервисом управляет состоянием и потоком данных между различными стадиями обработки.\n\n### Возможное внутреннее устройство и реализация:\n- Возможно наличие методов чтения и записи атрибутов состояния, а также механизмов отправки и получения сообщений через HTTP-запросы и ответы.\n- Вероятно, присутствуют методы инициализации и конфигурации канала.\n- Поскольку указано, что участвует в нескольких слайсах данных, предполагается наличие инфраструктуры для поддержки параллельного выполнения задач и передачи данных между ними.\n\n### Заключение:\nКанал управления `HttpControlChannel` реализует механизм взаимодействия с HTTP-протоколом, отвечая за чтение и запись состояний и участвуя в передаче данных между стадиями обработки данных. Он наследует базовые принципы поведения от родительской сущности `ControlChannel`, обеспечивая специализированную функциональность для работы с HTTP-соединениями и потоками данных.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS", + "C4_SEMANTIC_ROLES" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "HttpControlChannel" + ], + "keyword_hints": [ + "HttpControlChannel" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "HttpControlChannel", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Объясни класс HttpControlChannel", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "Объясни класс HttpControlChannel", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Объясни класс HttpControlChannel", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "Объясни класс HttpControlChannel", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "HttpControlChannel", + "alternatives": [ + "HttpControlChannel" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 8, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 151, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 47, + "C0_SOURCE_CHUNKS": 18, + "C4_SEMANTIC_ROLES": 17, + "C2_DEPENDENCY_GRAPH": 56, + "C3_ENTRYPOINTS": 11 + }, + "merge_rank": 23, + "prompt_build": 0, + "llm_call": 5711 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 329, + "evidence_rows": 19, + "evidence_chars": 3845 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 8, + "unique_paths": 7 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 1 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_v1", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "HttpControlChannel" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 19, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-fullchain-explain-http-control-channel", + "mode": "full_chain", + "run_started_at": "2026-03-12T09:18:24", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Объясни класс HttpControlChannel", + "normalized_query": "Объясни класс HttpControlChannel" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Объясни класс HttpControlChannel" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни класс HttpControlChannel" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "HttpControlChannel" + ], + "keyword_hints": [ + "HttpControlChannel" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Объясни класс HttpControlChannel" + }, + "output": { + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "HttpControlChannel", + "alternatives": [ + "HttpControlChannel" + ], + "confidence": 0.99 + }, + "rag_count": 19, + "rag_rows": [ + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel\nHttpControlChannel(ControlChannel)", + "layer": "C1_SYMBOL_CATALOG", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "qname": "HttpControlChannel", + "kind": "class", + "signature": "HttpControlChannel(ControlChannel)", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/queue/in_memory.py", + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)", + "layer": "C4_SEMANTIC_ROLES", + "title": "InMemoryTaskQueue", + "span_start": 9, + "span_end": 38, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 22, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "2da04cb94544a3bcbf0943a95ad4bdd8710bcafaa32a02fd0e4de2178dcf3533", + "symbol_name": "InMemoryTaskQueue", + "qname": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 9, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "58f0cc001ccda0eee4c6bc32ed83bd05eafd6b6644f1e8b4aa9eed3103db73dc", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._runner\n -> HttpControlChannel.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 15, + "span_end": 22, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "51d73913df709152258ed1b9a8c8f4eb3c575eccfe6b982aef0b28e0789a29da", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0", + "dst_ref": "HttpControlChannel.start", + "resolution": "resolved", + "slice_id": "51d73913df709152258ed1b9a8c8f4eb3c575eccfe6b982aef0b28e0789a29da", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._runner", + "HttpControlChannel.start" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._runner\n -> HttpControlChannel.port", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 15, + "span_end": 29, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "c7167bab7218bb768ad7c11bfb40d1a3096e6071dd7817bba5fd864cf8f6de13", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "3632ce8227f4a31e0768f2fb021a4d1ba28e1202633aa0f2fac902295931280f", + "dst_ref": "HttpControlChannel.port", + "resolution": "resolved", + "slice_id": "c7167bab7218bb768ad7c11bfb40d1a3096e6071dd7817bba5fd864cf8f6de13", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._runner", + "HttpControlChannel.port" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "3632ce8227f4a31e0768f2fb021a4d1ba28e1202633aa0f2fac902295931280f" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._timeout\n -> HttpControlChannel._health_response", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 14, + "span_end": 34, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "f858f5c9e575f6c4cdfe3853571b7ee21d1f628a443541d2037c3dc9d0790bef", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "e84bf04e9cd2127df235b7064d05f47e19f19a89c7c82f4c247231d4e8fa426a", + "dst_ref": "HttpControlChannel._health_response", + "resolution": "resolved", + "slice_id": "f858f5c9e575f6c4cdfe3853571b7ee21d1f628a443541d2037c3dc9d0790bef", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._timeout", + "HttpControlChannel._health_response" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "e84bf04e9cd2127df235b7064d05f47e19f19a89c7c82f4c247231d4e8fa426a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._timeout\n -> HttpControlChannel._action_response", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "c3ef21fcae96c82c00be74b3ab827d4af2085d89cb3fa5521c19a174aad84dbb", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "e64969024ccaeb34d8d91473fad07b3b3d341875846392e7a006406c7ada1954", + "dst_ref": "HttpControlChannel._action_response", + "resolution": "resolved", + "slice_id": "c3ef21fcae96c82c00be74b3ab827d4af2085d89cb3fa5521c19a174aad84dbb", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._timeout", + "HttpControlChannel._action_response" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "e64969024ccaeb34d8d91473fad07b3b3d341875846392e7a006406c7ada1954" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._runner\n -> HttpControlChannel.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 15, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "0f827ef81a990258a8a74381c8564a8361afa6712dba3200592659c939adcb9d", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "f29ab212620093d72be20e26c5a399624c7939a6056a728762ed3f84a250bfa3", + "dst_ref": "HttpControlChannel.stop", + "resolution": "resolved", + "slice_id": "0f827ef81a990258a8a74381c8564a8361afa6712dba3200592659c939adcb9d", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._runner", + "HttpControlChannel.stop" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "f29ab212620093d72be20e26c5a399624c7939a6056a728762ed3f84a250bfa3" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._factory\n -> HttpControlChannel.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 16, + "span_end": 21, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e61ec25ded7dbe380d95ce2abcbc1d7a2d2afde5aa8453866df8706dfb7d6ddb", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0", + "dst_ref": "HttpControlChannel.start", + "resolution": "resolved", + "slice_id": "e61ec25ded7dbe380d95ce2abcbc1d7a2d2afde5aa8453866df8706dfb7d6ddb", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._factory", + "HttpControlChannel.start" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel(ControlChannel):\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._timeout = timeout\n self._runner = UvicornThreadRunner(host, port, timeout)\n self._factory = HttpControlAppFactory()\n self._actions: ControlActionSet | None = None\n\n async def start(self, actions: ControlActionSet) -> None:\n self._actions = actions\n app = self._factory.create(self._health_response, self._action_response)\n await self._runner.start(app)\n\n async def stop(self) -> None:\n await self._runner.stop()\n\n @property\n def port(self) -> int:\n return self._runner.port\n\n async def _health_response(self) -> dict[str, object]:\n if self._actions is None:\n return {\"status\": \"unhealthy\", \"detail\": \"control actions are not configured\"}\n return await asyncio.wait_for(self._actions.health(), timeout=float(self._timeout))\n\n async def _action_response(self, action: str, _client_source: str = \"unknown\") -> JSONResponse:\n if self._actions is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"{action} handler is not configured\"}, status_code=404)\n callbacks = {\n \"start\": self._actions.start,\n \"stop\": self._actions.stop,\n \"status\": self._actions.status,\n }\n callback = callbacks.get(action)\n if callback is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"unsupported action: {action}\"}, status_code=404)\n action_timeout = max(float(self._timeout), 10.0) if action in {\"start\", \"stop\"} else float(self._timeout)\n try:\n detail = await asyncio.wait_for(callback(), timeout=action_timeout)\n except asyncio.TimeoutError:\n return JSONResponse(\n content={\"status\": \"accepted\", \"detail\": f\"{action} operation is still in progress\"},\n status_code=202,\n )\n except Exception as exc:\n return JSONResponse(content={\"status\": \"error\", \"detail\": str(exc)}, status_code=500)\n return JSONResponse(content={\"status\": \"ok\", \"detail\": detail or f\"{action} action accepted\"}, status_code=200)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_channel.py:HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "HttpControlChannel", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Объясни класс HttpControlChannel", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "Объясни класс HttpControlChannel", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Объясни класс HttpControlChannel", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "Объясни класс HttpControlChannel", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "HttpControlChannel", + "alternatives": [ + "HttpControlChannel" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 8, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 151, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 47, + "C0_SOURCE_CHUNKS": 18, + "C4_SEMANTIC_ROLES": 17, + "C2_DEPENDENCY_GRAPH": 56, + "C3_ENTRYPOINTS": 11 + }, + "merge_rank": 23 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Объясни класс HttpControlChannel", + "rag_count": 19 + }, + "output": { + "llm_answer": "## Анализ класса `HttpControlChannel`\n\n### Файл и путь:\n- **Файл:** `src/app_runtime/control/http_channel.py`\n- **Класс:** `HttpControlChannel`\n\n### Описание роли и ответственности:\n- **Роль:** `pipeline_stage`\n- **Ответственности:**\n - Чтение и запись атрибутов состояния (`reads and writes state attributes`).\n - Участие в \"слайсах\" данных потока (`participates in dataflow slices`).\n - В документации указано участие в 10 слайсах данных.\n\n### Родительский класс:\n- Наследуется от класса `ControlChannel`, объявленного в файле `src/app_runtime/control/base.py`.\n \n### Подразумеваемая архитектура и поток данных:\n1. **Родительская сущность** (`ControlChannel`) является базовой моделью для каналов управления, определяющей основные обязанности модели.\n - Пример: Класс может иметь стандартный набор методов или атрибутов, которые наследуются всеми дочерними сущностями.\n \n2. **Дочерний класс** (`HttpControlChannel`) расширяет функциональность родительского класса, добавляя специфические обязанности HTTP-канала.\n - Обеспечивает взаимодействие с HTTP протоколом, вероятно, через асинхронные HTTP запросы и ответы.\n\n3. **Участие в данныхфлоу**:\n - Согласно описанию, канал участвует в 10 различных слайсах данных. Это означает, что он обрабатывает части общего потока данных, разделенного на несколько сегментов (\"слайсов\"). \n - Каждый сегмент предназначен для определенной стадии обработки информации внутри системы.\n\n4. **Связь с другими компонентами**:\n - Контроллер взаимодействует с сервисом контроля (`ControlPlaneService`), который также упоминается как `pipeline_stage`. Вероятно, это указывает на то, что контроллер совместно с этим сервисом управляет состоянием и потоком данных между различными стадиями обработки.\n\n### Возможное внутреннее устройство и реализация:\n- Возможно наличие методов чтения и записи атрибутов состояния, а также механизмов отправки и получения сообщений через HTTP-запросы и ответы.\n- Вероятно, присутствуют методы инициализации и конфигурации канала.\n- Поскольку указано, что участвует в нескольких слайсах данных, предполагается наличие инфраструктуры для поддержки параллельного выполнения задач и передачи данных между ними.\n\n### Заключение:\nКанал управления `HttpControlChannel` реализует механизм взаимодействия с HTTP-протоколом, отвечая за чтение и запись состояний и участвуя в передаче данных между стадиями обработки данных. Он наследует базовые принципы поведения от родительской сущности `ControlChannel`, обеспечивая специализированную функциональность для работы с HTTP-соединениями и потоками данных." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 329, + "evidence_rows": 19, + "evidence_chars": 3845 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 8, + "unique_paths": 7 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 1 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_v1", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 5711 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091824/full_chain_plba_code_retrieval_plba-fullchain-explain-http-control-channel.md b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091824/full_chain_plba_code_retrieval_plba-fullchain-explain-http-control-channel.md new file mode 100644 index 0000000..6850ebf --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091824/full_chain_plba_code_retrieval_plba-fullchain-explain-http-control-channel.md @@ -0,0 +1,34 @@ +# plba-fullchain-explain-http-control-channel + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_retrieval.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Объясни класс HttpControlChannel + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 19, + "llm_answer": "## Анализ класса `HttpControlChannel`\n\n### Файл и путь:\n- **Файл:** `src/app_runtime/control/http_channel.py`\n- **Класс:** `HttpControlChannel`\n\n### Описание роли и ответственности:\n- **Роль:** `pipeline_stage`\n- **Ответственности:**\n - Чтение и запись атрибутов состояния (`reads and writes state attributes`).\n - Участие в \"слайсах\" данных потока (`participates in dataflow slices`).\n - В документации указано участие в 10 слайсах данных.\n\n### Родительский класс:\n- Наследуется от класса `ControlChannel`, объявленного в файле `src/app_runtime/control/base.py`.\n \n### Подразумеваемая архитектура и поток данных:\n1. **Родительская сущность** (`ControlChannel`) является базовой моделью для каналов управления, определяющей основные обязанности модели.\n - Пример: Класс может иметь стандартный набор методов или атрибутов, которые наследуются всеми дочерними сущностями.\n \n2. **Дочерний класс** (`HttpControlChannel`) расширяет функциональность родительского класса, добавляя специфические обязанности HTTP-канала.\n - Обеспечивает взаимодействие с HTTP протоколом, вероятно, через асинхронные HTTP запросы и ответы.\n\n3. **Участие в данныхфлоу**:\n - Согласно описанию, канал участвует в 10 различных слайсах данных. Это означает, что он обрабатывает части общего потока данных, разделенного на несколько сегментов (\"слайсов\"). \n - Каждый сегмент предназначен для определенной стадии обработки информации внутри системы.\n\n4. **Связь с другими компонентами**:\n - Контроллер взаимодействует с сервисом контроля (`ControlPlaneService`), который также упоминается как `pipeline_stage`. Вероятно, это указывает на то, что контроллер совместно с этим сервисом управляет состоянием и потоком данных между различными стадиями обработки.\n\n### Возможное внутреннее устройство и реализация:\n- Возможно наличие методов чтения и записи атрибутов состояния, а также механизмов отправки и получения сообщений через HTTP-запросы и ответы.\n- Вероятно, присутствуют методы инициализации и конфигурации канала.\n- Поскольку указано, что участвует в нескольких слайсах данных, предполагается наличие инфраструктуры для поддержки параллельного выполнения задач и передачи данных между ними.\n\n### Заключение:\nКанал управления `HttpControlChannel` реализует механизм взаимодействия с HTTP-протоколом, отвечая за чтение и запись состояний и участвуя в передаче данных между стадиями обработки данных. Он наследует базовые принципы поведения от родительской сущности `ControlChannel`, обеспечивая специализированную функциональность для работы с HTTP-соединениями и потоками данных.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "HttpControlChannel" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091824/full_chain_plba_code_retrieval_plba-fullchain-explain-runtime-manager.json b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091824/full_chain_plba_code_retrieval_plba-fullchain-explain-runtime-manager.json new file mode 100644 index 0000000..c4a75a9 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091824/full_chain_plba_code_retrieval_plba-fullchain-explain-runtime-manager.json @@ -0,0 +1,2564 @@ +{ + "case_id": "plba-fullchain-explain-runtime-manager", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_retrieval.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 19, + "llm_answer": "## Анализ класса `RuntimeManager`\n\n### 1. Общая информация о классе\n\nКласс `RuntimeManager` находится в файле `src/app_runtime/core/runtime.py`. Его роль обозначена как **pipeline_stage**, что указывает на его участие в потоке выполнения программы.\n\n### 2. Ответственность (`Responsibilities`)\n\nДокументация описывает следующие обязанности класса:\n\n- **manager**: предполагает управление другими сущностями или ресурсами;\n- **orchestrates role-like calls (4)**: означает координацию вызовов различных ролей или этапов;\n- **reads and writes state attributes**: указывает на возможность чтения и записи атрибутов состояния системы;\n- **participates in dataflow slices (50)**: свидетельствует об участии в разделении потоков данных.\n\nЭти обязанности отражают высокоуровневую роль управления состоянием и потоком выполнения приложения.\n\n### 3. Поток данных и взаимодействие с другими компонентами\n\nНа основании информации из документации можно предположить следующую картину взаимодействия компонентов:\n\n#### a. Управление ролями и стадиями\n\nВ описании говорится, что класс выполняет координирующие действия, связанные с ролями и этапами процесса. Это может означать, что он управляет распределением задач между различными модулями или сервисами, участвующими в выполнении приложения.\n\n#### b. Чтение и запись состояний\n\nВозможность чтения и записи атрибутов состояния указывает на то, что данный класс участвует в управлении динамическими аспектами работы приложения, такими как параметры конфигурации, статус задач и другие переменные времени выполнения.\n\n#### c. Участие в разделении потоков данных\n\nУчастие в \"dataflow slices\" говорит о том, что объект активно взаимодействует с другими частями системы для передачи и обработки данных между ними. Это позволяет понять, что потоки данных разделяются и передаются через этот менеджер, обеспечивая согласованность действий внутри системы.\n\n### 4. Взаимодействие с другими классами\n\nДля понимания полной картины необходимо рассмотреть взаимосвязи с другими классами и их обязанностями:\n\n- **ControlChannel** и **ControlActionSet**: вероятно, эти классы представляют собой интерфейсы или механизмы, используемые для координации поведения модели. Они могут быть использованы для отправки команд или запросов от `RuntimeManager`.\n \n- **ControlPlaneService**: судя по описанию, это отдельный сервис, который также отвечает за чтение и запись состояния, а также участие в передаче данных между стадиями выполнения. Таким образом, возможно, он используется параллельно или совместно с `RuntimeManager`.\n\n- **UvicornThreadRunner**: этот класс связан с управлением многопоточной обработкой HTTP-запросов. Вероятно, его функциональность пересекается с `RuntimeManager`, особенно когда речь идет о взаимодействии с внешним миром через HTTP-интерфейсы.\n\n### Заключение\n\nКласс `RuntimeManager` играет ключевую роль в координации и управлении потоком выполнения задачи, участвуя в обработке состояний и передаче данных между различными компонентами системы. Он обеспечивает высокоуровневое управление выполнением, координируя роли и этапы выполнения, записывая и читая состояние приложения, а также участвует в разделе потоков данных. \n\nДля более детального анализа его поведения рекомендуется изучить исходный код класса и окружающие компоненты системы.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-fullchain-explain-runtime-manager", + "text": "Объясни как работает класс RuntimeManager", + "mode": "full_chain", + "run_started_at": "2026-03-12T09:18:24", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни как работает класс RuntimeManager", + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ], + "confidence": 0.99 + }, + "rag_count": 19, + "rag_rows": [ + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager\nRuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "qname": "RuntimeManager", + "kind": "class", + "signature": "RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests manager\n- orchestrates role-like calls (4)\n- reads and writes state attributes\n- participates in dataflow slices (50)", + "layer": "C4_SEMANTIC_ROLES", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 43, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "symbol_name": "RuntimeManager", + "qname": "RuntimeManager", + "role": "pipeline_stage", + "confidence": 0.67, + "dataflow_participation": 50, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 52, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "## Анализ класса `RuntimeManager`\n\n### 1. Общая информация о классе\n\nКласс `RuntimeManager` находится в файле `src/app_runtime/core/runtime.py`. Его роль обозначена как **pipeline_stage**, что указывает на его участие в потоке выполнения программы.\n\n### 2. Ответственность (`Responsibilities`)\n\nДокументация описывает следующие обязанности класса:\n\n- **manager**: предполагает управление другими сущностями или ресурсами;\n- **orchestrates role-like calls (4)**: означает координацию вызовов различных ролей или этапов;\n- **reads and writes state attributes**: указывает на возможность чтения и записи атрибутов состояния системы;\n- **participates in dataflow slices (50)**: свидетельствует об участии в разделении потоков данных.\n\nЭти обязанности отражают высокоуровневую роль управления состоянием и потоком выполнения приложения.\n\n### 3. Поток данных и взаимодействие с другими компонентами\n\nНа основании информации из документации можно предположить следующую картину взаимодействия компонентов:\n\n#### a. Управление ролями и стадиями\n\nВ описании говорится, что класс выполняет координирующие действия, связанные с ролями и этапами процесса. Это может означать, что он управляет распределением задач между различными модулями или сервисами, участвующими в выполнении приложения.\n\n#### b. Чтение и запись состояний\n\nВозможность чтения и записи атрибутов состояния указывает на то, что данный класс участвует в управлении динамическими аспектами работы приложения, такими как параметры конфигурации, статус задач и другие переменные времени выполнения.\n\n#### c. Участие в разделении потоков данных\n\nУчастие в \"dataflow slices\" говорит о том, что объект активно взаимодействует с другими частями системы для передачи и обработки данных между ними. Это позволяет понять, что потоки данных разделяются и передаются через этот менеджер, обеспечивая согласованность действий внутри системы.\n\n### 4. Взаимодействие с другими классами\n\nДля понимания полной картины необходимо рассмотреть взаимосвязи с другими классами и их обязанностями:\n\n- **ControlChannel** и **ControlActionSet**: вероятно, эти классы представляют собой интерфейсы или механизмы, используемые для координации поведения модели. Они могут быть использованы для отправки команд или запросов от `RuntimeManager`.\n \n- **ControlPlaneService**: судя по описанию, это отдельный сервис, который также отвечает за чтение и запись состояния, а также участие в передаче данных между стадиями выполнения. Таким образом, возможно, он используется параллельно или совместно с `RuntimeManager`.\n\n- **UvicornThreadRunner**: этот класс связан с управлением многопоточной обработкой HTTP-запросов. Вероятно, его функциональность пересекается с `RuntimeManager`, особенно когда речь идет о взаимодействии с внешним миром через HTTP-интерфейсы.\n\n### Заключение\n\nКласс `RuntimeManager` играет ключевую роль в координации и управлении потоком выполнения задачи, участвуя в обработке состояний и передаче данных между различными компонентами системы. Он обеспечивает высокоуровневое управление выполнением, координируя роли и этапы выполнения, записывая и читая состояние приложения, а также участвует в разделе потоков данных. \n\nДля более детального анализа его поведения рекомендуется изучить исходный код класса и окружающие компоненты системы.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS", + "C4_SEMANTIC_ROLES" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Объясни как работает класс RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "Объясни как работает класс RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Объясни как работает класс RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "Объясни как работает класс RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 8, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 255, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 25, + "C0_SOURCE_CHUNKS": 13, + "C4_SEMANTIC_ROLES": 14, + "C2_DEPENDENCY_GRAPH": 58, + "C3_ENTRYPOINTS": 11 + }, + "merge_rank": 20, + "prompt_build": 0, + "llm_call": 6429 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 335, + "evidence_rows": 19, + "evidence_chars": 7949 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 8, + "unique_paths": 7 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 2 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_v1", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "RuntimeManager" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 19, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-fullchain-explain-runtime-manager", + "mode": "full_chain", + "run_started_at": "2026-03-12T09:18:24", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Объясни как работает класс RuntimeManager", + "normalized_query": "Объясни как работает класс RuntimeManager" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Объясни как работает класс RuntimeManager" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни как работает класс RuntimeManager" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Объясни как работает класс RuntimeManager" + }, + "output": { + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ], + "confidence": 0.99 + }, + "rag_count": 19, + "rag_rows": [ + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager\nRuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "qname": "RuntimeManager", + "kind": "class", + "signature": "RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests manager\n- orchestrates role-like calls (4)\n- reads and writes state attributes\n- participates in dataflow slices (50)", + "layer": "C4_SEMANTIC_ROLES", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 43, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "symbol_name": "RuntimeManager", + "qname": "RuntimeManager", + "role": "pipeline_stage", + "confidence": 0.67, + "dataflow_participation": 50, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 52, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Объясни как работает класс RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "Объясни как работает класс RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Объясни как работает класс RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "Объясни как работает класс RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 8, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 255, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 25, + "C0_SOURCE_CHUNKS": 13, + "C4_SEMANTIC_ROLES": 14, + "C2_DEPENDENCY_GRAPH": 58, + "C3_ENTRYPOINTS": 11 + }, + "merge_rank": 20 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Объясни как работает класс RuntimeManager", + "rag_count": 19 + }, + "output": { + "llm_answer": "## Анализ класса `RuntimeManager`\n\n### 1. Общая информация о классе\n\nКласс `RuntimeManager` находится в файле `src/app_runtime/core/runtime.py`. Его роль обозначена как **pipeline_stage**, что указывает на его участие в потоке выполнения программы.\n\n### 2. Ответственность (`Responsibilities`)\n\nДокументация описывает следующие обязанности класса:\n\n- **manager**: предполагает управление другими сущностями или ресурсами;\n- **orchestrates role-like calls (4)**: означает координацию вызовов различных ролей или этапов;\n- **reads and writes state attributes**: указывает на возможность чтения и записи атрибутов состояния системы;\n- **participates in dataflow slices (50)**: свидетельствует об участии в разделении потоков данных.\n\nЭти обязанности отражают высокоуровневую роль управления состоянием и потоком выполнения приложения.\n\n### 3. Поток данных и взаимодействие с другими компонентами\n\nНа основании информации из документации можно предположить следующую картину взаимодействия компонентов:\n\n#### a. Управление ролями и стадиями\n\nВ описании говорится, что класс выполняет координирующие действия, связанные с ролями и этапами процесса. Это может означать, что он управляет распределением задач между различными модулями или сервисами, участвующими в выполнении приложения.\n\n#### b. Чтение и запись состояний\n\nВозможность чтения и записи атрибутов состояния указывает на то, что данный класс участвует в управлении динамическими аспектами работы приложения, такими как параметры конфигурации, статус задач и другие переменные времени выполнения.\n\n#### c. Участие в разделении потоков данных\n\nУчастие в \"dataflow slices\" говорит о том, что объект активно взаимодействует с другими частями системы для передачи и обработки данных между ними. Это позволяет понять, что потоки данных разделяются и передаются через этот менеджер, обеспечивая согласованность действий внутри системы.\n\n### 4. Взаимодействие с другими классами\n\nДля понимания полной картины необходимо рассмотреть взаимосвязи с другими классами и их обязанностями:\n\n- **ControlChannel** и **ControlActionSet**: вероятно, эти классы представляют собой интерфейсы или механизмы, используемые для координации поведения модели. Они могут быть использованы для отправки команд или запросов от `RuntimeManager`.\n \n- **ControlPlaneService**: судя по описанию, это отдельный сервис, который также отвечает за чтение и запись состояния, а также участие в передаче данных между стадиями выполнения. Таким образом, возможно, он используется параллельно или совместно с `RuntimeManager`.\n\n- **UvicornThreadRunner**: этот класс связан с управлением многопоточной обработкой HTTP-запросов. Вероятно, его функциональность пересекается с `RuntimeManager`, особенно когда речь идет о взаимодействии с внешним миром через HTTP-интерфейсы.\n\n### Заключение\n\nКласс `RuntimeManager` играет ключевую роль в координации и управлении потоком выполнения задачи, участвуя в обработке состояний и передаче данных между различными компонентами системы. Он обеспечивает высокоуровневое управление выполнением, координируя роли и этапы выполнения, записывая и читая состояние приложения, а также участвует в разделе потоков данных. \n\nДля более детального анализа его поведения рекомендуется изучить исходный код класса и окружающие компоненты системы." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 335, + "evidence_rows": 19, + "evidence_chars": 7949 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 8, + "unique_paths": 7 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 2 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_v1", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 6429 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091824/full_chain_plba_code_retrieval_plba-fullchain-explain-runtime-manager.md b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091824/full_chain_plba_code_retrieval_plba-fullchain-explain-runtime-manager.md new file mode 100644 index 0000000..f234797 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091824/full_chain_plba_code_retrieval_plba-fullchain-explain-runtime-manager.md @@ -0,0 +1,34 @@ +# plba-fullchain-explain-runtime-manager + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_retrieval.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Объясни как работает класс RuntimeManager + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 19, + "llm_answer": "## Анализ класса `RuntimeManager`\n\n### 1. Общая информация о классе\n\nКласс `RuntimeManager` находится в файле `src/app_runtime/core/runtime.py`. Его роль обозначена как **pipeline_stage**, что указывает на его участие в потоке выполнения программы.\n\n### 2. Ответственность (`Responsibilities`)\n\nДокументация описывает следующие обязанности класса:\n\n- **manager**: предполагает управление другими сущностями или ресурсами;\n- **orchestrates role-like calls (4)**: означает координацию вызовов различных ролей или этапов;\n- **reads and writes state attributes**: указывает на возможность чтения и записи атрибутов состояния системы;\n- **participates in dataflow slices (50)**: свидетельствует об участии в разделении потоков данных.\n\nЭти обязанности отражают высокоуровневую роль управления состоянием и потоком выполнения приложения.\n\n### 3. Поток данных и взаимодействие с другими компонентами\n\nНа основании информации из документации можно предположить следующую картину взаимодействия компонентов:\n\n#### a. Управление ролями и стадиями\n\nВ описании говорится, что класс выполняет координирующие действия, связанные с ролями и этапами процесса. Это может означать, что он управляет распределением задач между различными модулями или сервисами, участвующими в выполнении приложения.\n\n#### b. Чтение и запись состояний\n\nВозможность чтения и записи атрибутов состояния указывает на то, что данный класс участвует в управлении динамическими аспектами работы приложения, такими как параметры конфигурации, статус задач и другие переменные времени выполнения.\n\n#### c. Участие в разделении потоков данных\n\nУчастие в \"dataflow slices\" говорит о том, что объект активно взаимодействует с другими частями системы для передачи и обработки данных между ними. Это позволяет понять, что потоки данных разделяются и передаются через этот менеджер, обеспечивая согласованность действий внутри системы.\n\n### 4. Взаимодействие с другими классами\n\nДля понимания полной картины необходимо рассмотреть взаимосвязи с другими классами и их обязанностями:\n\n- **ControlChannel** и **ControlActionSet**: вероятно, эти классы представляют собой интерфейсы или механизмы, используемые для координации поведения модели. Они могут быть использованы для отправки команд или запросов от `RuntimeManager`.\n \n- **ControlPlaneService**: судя по описанию, это отдельный сервис, который также отвечает за чтение и запись состояния, а также участие в передаче данных между стадиями выполнения. Таким образом, возможно, он используется параллельно или совместно с `RuntimeManager`.\n\n- **UvicornThreadRunner**: этот класс связан с управлением многопоточной обработкой HTTP-запросов. Вероятно, его функциональность пересекается с `RuntimeManager`, особенно когда речь идет о взаимодействии с внешним миром через HTTP-интерфейсы.\n\n### Заключение\n\nКласс `RuntimeManager` играет ключевую роль в координации и управлении потоком выполнения задачи, участвуя в обработке состояний и передаче данных между различными компонентами системы. Он обеспечивает высокоуровневое управление выполнением, координируя роли и этапы выполнения, записывая и читая состояние приложения, а также участвует в разделе потоков данных. \n\nДля более детального анализа его поведения рекомендуется изучить исходный код класса и окружающие компоненты системы.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091824/full_chain_plba_code_retrieval_plba-fullchain-explain-trace-service.json b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091824/full_chain_plba_code_retrieval_plba-fullchain-explain-trace-service.json new file mode 100644 index 0000000..89b6e70 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091824/full_chain_plba_code_retrieval_plba-fullchain-explain-trace-service.json @@ -0,0 +1,2684 @@ +{ + "case_id": "plba-fullchain-explain-trace-service", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_retrieval.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 21, + "llm_answer": "## Анализ архитектуры и поведения `TraceService`\n\n### Описание класса `TraceService`\n\nКласс `TraceService` определен в файле `src/app_runtime/tracing/service.py`. Этот класс является наследником абстрактного базового класса `TraceContextFactory`, что указывает на его ключевую роль в создании контекста трассировки (`trace context`) для последующих вызовов API или логики приложения.\n\n#### Обязанности класса:\n- Обладает именем с суффиксом \"service\", указывающим на его сервисную природу.\n- Оперирует состоянием атрибутов через чтение и запись их значений.\n- Участвует в передаче данных между различными этапами обработки (\"dataflow slices\").\n\n#### Поведение метода `_create_trace_context`\nМетод `_create_trace_context` создает новый контекст трассировки, который используется для отслеживания выполнения различных этапов программы. Контекст трассировки включает информацию о текущей сессии и этапах выполнения задачи.\n\n```python\ndef _create_trace_context(self):\n # Создание нового trace context, который содержит сессионные данные и метаданные текущего этапа работы.\n return self._context_factory.create()\n```\n\n### Взаимодействие с другими компонентами системы\n\n- **Pipeline stages**: Все перечисленные классы (`UvicornThreadRunner`, `WorkflowPersistence`, `HttpControlChannel`, `InMemoryTaskQueue`) также являются участниками передачи данных и участия в «слайсах» потока данных (`dataflow slices`), аналогично поведению `TraceService`.\n \n - `UvicornThreadRunner`: отвечает за запуск асинхронных HTTP запросов и обработку ответов.\n - `WorkflowPersistence`: управляет сохранением и восстановлением состояния рабочих процессов (workflow).\n - `HttpControlChannel`: обеспечивает взаимодействие с внешним интерфейсом управления задачами и данными.\n - `InMemoryTaskQueue`: представляет очередь задач, хранящуюся в памяти.\n\nЭти компоненты участвуют в общей архитектуре конвейера выполнения задач и передают состояние атрибутов друг другу во время выполнения операций.\n\n### Поток данных и обязанности классов\n\nВ системе существует несколько уровней взаимодействия компонентов, которые могут быть описаны следующим образом:\n\n1. Пользовательский запрос инициируется внешним клиентом и поступает через интерфейс HTTP (`HttpControlChannel`).\n2. Запрос передается дальше в различные рабочие процессы (`WorkflowPersistence`, `InMemoryTaskQueue`), где он может быть обработан параллельно или последовательно.\n3. Каждый из этих компонентов сохраняет свое текущее состояние и передает его дальше через промежуточные этапы выполнения.\n4. Информация об этапах выполнения собирается в виде контекста трассировки (`trace context`), созданном при помощи `TraceService`.\n5. Эта информация затем сохраняется или передается дальше другим компонентам для дальнейшей обработки.\n\nТаким образом, каждый компонент играет свою роль в общей цепочке выполнения задачи, обеспечивая корректность состояния атрибутов и правильное отслеживание процесса выполнения запроса.\n\n---\n\nЭтот анализ демонстрирует общую картину того, как компоненты взаимодействуют друг с другом и какую роль выполняет `TraceService` в этом процессе.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "TraceService" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-fullchain-explain-trace-service", + "text": "Как работает TraceService?", + "mode": "full_chain", + "run_started_at": "2026-03-12T09:18:24", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Как работает TraceService?", + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "TraceService", + "alternatives": [ + "TraceService" + ], + "confidence": 0.99 + }, + "rag_count": 21, + "rag_rows": [ + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceService\nTraceService(TraceContextFactory)", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService", + "span_start": 39, + "span_end": 166, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "c2b2b976d99f2c600000b753731b26e0a69adcb4359398b93073590c5d5d04f4", + "qname": "TraceService", + "kind": "class", + "signature": "TraceService(TraceContextFactory)", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (13)", + "layer": "C4_SEMANTIC_ROLES", + "title": "TraceService", + "span_start": 39, + "span_end": 166, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 60, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "c2b2b976d99f2c600000b753731b26e0a69adcb4359398b93073590c5d5d04f4", + "symbol_name": "TraceService", + "qname": "TraceService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 13, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/queue/in_memory.py", + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)", + "layer": "C4_SEMANTIC_ROLES", + "title": "InMemoryTaskQueue", + "span_start": 9, + "span_end": 38, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 22, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "2da04cb94544a3bcbf0943a95ad4bdd8710bcafaa32a02fd0e4de2178dcf3533", + "symbol_name": "InMemoryTaskQueue", + "qname": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 9, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "58f0cc001ccda0eee4c6bc32ed83bd05eafd6b6644f1e8b4aa9eed3103db73dc", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "ConfigFileLoader\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (8)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ConfigFileLoader", + "span_start": 11, + "span_end": 48, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 23, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "a8474eca8b6e9dc86ae67ed68b16fa5fb639ef08739c053e7b7195489765667f", + "symbol_name": "ConfigFileLoader", + "qname": "ConfigFileLoader", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 8, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/store.py", + "content": "TraceContextStore\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "TraceContextStore", + "span_start": 15, + "span_end": 52, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b2dad4fbe16ffb11b58deba311c7739955c39d59f291b22181f33e9c8cce4059", + "symbol_name": "TraceContextStore", + "qname": "TraceContextStore", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "d369554f08fc92039c6edd5a2a1e73b23901533e8974459170bbd9347d263dc5", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workers/supervisor.py", + "content": "WorkerSupervisor\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkerSupervisor", + "span_start": 10, + "span_end": 59, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "c17b44e8d9e97d490989b21fa67d7c346cdda8a0472e4c41fb243c8846faa124", + "symbol_name": "WorkerSupervisor", + "qname": "WorkerSupervisor", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "77609d9d5927171cce7fc3a54897c183fd63068710c6362029b700937aae5eee", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.create_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 61, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3b052062067a78aef3302ee1d996897e02a67d1b340397bea4f59fe147c0492a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a", + "dst_ref": "TraceService.create_context", + "resolution": "resolved", + "slice_id": "3b052062067a78aef3302ee1d996897e02a67d1b340397bea4f59fe147c0492a", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.create_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.close_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 84, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "7a9353ef57c9ae5d19b3a0c6ac50fad05e6d21d31bbe1cd1cd07af6332ba6505", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "01e14158dcced7e52d0c8ac84ac7b9a75225c261b6aca6a1d7da802d0994721c", + "dst_ref": "TraceService.close_context", + "resolution": "resolved", + "slice_id": "7a9353ef57c9ae5d19b3a0c6ac50fad05e6d21d31bbe1cd1cd07af6332ba6505", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.close_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "01e14158dcced7e52d0c8ac84ac7b9a75225c261b6aca6a1d7da802d0994721c" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.open_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 78, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a6e13b9ebc4fed84586afd53ed92a4d14757e440873f572b2337d5622ee96031", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426", + "dst_ref": "TraceService.open_context", + "resolution": "resolved", + "slice_id": "a6e13b9ebc4fed84586afd53ed92a4d14757e440873f572b2337d5622ee96031", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.open_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.transport\n -> TraceService.__init__", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 41, + "span_end": 43, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "1e923a93faa05c3c43ca9b19bd047007a8589ccce57d3cc1798ae7f9f200af98", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "dst_ref": "TraceService.__init__", + "resolution": "resolved", + "slice_id": "1e923a93faa05c3c43ca9b19bd047007a8589ccce57d3cc1798ae7f9f200af98", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.transport", + "TraceService.__init__" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.current_trace_id", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 81, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3ea17138634b1190bded77ddb84aa1595124f6519b246f24fc4b02bd62b5cac1", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c", + "dst_ref": "TraceService.current_trace_id", + "resolution": "resolved", + "slice_id": "3ea17138634b1190bded77ddb84aa1595124f6519b246f24fc4b02bd62b5cac1", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.current_trace_id" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.step", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 88, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "9f34c5da9b09fba99df6f6b1bde183a9aeb45111b8218a747c71590c2c9f60f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "c44bfbc66cf747283f30088da3e011a10395031d41e77b74e523c24997f641ca", + "dst_ref": "TraceService.step", + "resolution": "resolved", + "slice_id": "9f34c5da9b09fba99df6f6b1bde183a9aeb45111b8218a747c71590c2c9f60f2", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.step" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "c44bfbc66cf747283f30088da3e011a10395031d41e77b74e523c24997f641ca" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceRecordWriter:\n def __init__(self, transport: TraceTransport) -> None:\n self._logger = logging.getLogger(__name__)\n self._transport = transport\n\n def write_context(self, record: TraceContextRecord) -> None:\n try:\n self._transport.write_context(record)\n except Exception:\n self._logger.exception(\"Trace transport failed to write context %s\", record.trace_id)\n\n def write_message(self, record: TraceLogMessage) -> None:\n try:\n self._transport.write_message(record)\n except Exception:\n self._logger.exception(\"Trace transport failed to write message for %s\", record.trace_id)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/tracing/service.py:TraceRecordWriter", + "span_start": 21, + "span_end": 36, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceService(TraceContextFactory):\n def __init__(self, transport: TraceTransport | None = None, store: TraceContextStore | None = None) -> None:\n self.transport = transport or NoOpTraceTransport()\n self.store = store or TraceContextStore()\n self._writer = TraceRecordWriter(self.transport)\n\n def create_context(\n self,\n *,\n alias: str,\n parent_id: str | None = None,\n kind: str | None = None,\n attrs: dict[str, Any] | None = None,\n ) -> str:\n record = TraceContextRecord(\n trace_id=uuid4().hex,\n alias=str(alias or \"\"),\n parent_id=parent_id,\n type=kind,\n event_time=utc_now(),\n attrs=dict(attrs or {}),\n )\n self.store.push(record)\n self._writer.write_context(record)\n return record.trace_id\n\n @contextmanager\n def open_context(\n self,\n *,\n alias: str,\n parent_id: str | None = None,\n kind: str | None = None,\n attrs: dict[str, Any] | None = None,\n ) -> Iterator[str]:\n trace_id = self.create_context(alias=alias, parent_id=parent_id, kind=kind, attrs=attrs)\n try:\n yield trace_id\n finally:\n self.store.pop()\n\n def current_trace_id(self) -> str | None:\n return self.store.current_trace_id()\n\n def close_context(self) -> str | None:\n previous = self.store.pop()\n return previous.record.trace_id if previous else None\n\n def step(self, name: str) -> None:\n self.store.set_step(str(name or \"\"))\n\n def info(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"INFO\", message, status, attrs)\n\n def debug(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"DEBUG\", message, status, attrs)\n\n def warning(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"WARNING\", message, status, attrs)\n\n def error(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"ERROR\", message, status, attrs)\n\n def exception(self, message: str, *, status: str = \"failed\", attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"ERROR\", message, status, attrs)\n\n def new_root(self, operation: str) -> TraceContext:\n trace_id = self.create_context(alias=operation, kind=\"operation\", attrs={\"operation\": operation})\n return TraceContext(trace_id=trace_id, span_id=trace_id, attributes={\"operation\": operation})\n\n def child_of(self, parent: TraceContext, operation: str) -> TraceContext:\n trace_id = self.create_context(\n alias=operation,\n parent_id=parent.trace_id,\n kind=\"worker\",\n attrs={\"operation\": operation},\n )\n return TraceContext(\n trace_id=trace_id,\n span_id=trace_id,\n parent_span_id=parent.span_id,\n attributes={\"operation\": operation},\n )\n\n def attach(self, metadata: dict[str, object], context: TraceContext) -> dict[str, object]:\n updated = dict(metadata)\n updated[\"trace_id\"] = context.trace_id\n updated[\"span_id\"] = context.span_id\n updated[\"parent_span_id\"] = context.parent_span_id\n return updated\n\n def resume(self, metadata: dict[str, object], operation: str) -> TraceContext:\n trace_id = str(metadata.get(\"trace_id\") or uuid4().hex)\n span_id = str(metadata.get(\"span_id\") or trace_id)\n parent_id = metadata.get(\"parent_span_id\")\n self.create_context(\n alias=operation,\n parent_id=str(parent_id) if parent_id else None,\n kind=\"worker\",\n attrs=dict(metadata),\n )\n return TraceContext(\n trace_id=trace_id,\n span_id=span_id,\n parent_span_id=str(parent_id) if parent_id else None,\n attributes={\"operation\": operation},\n )\n\n def _write_message(\n self,\n level: TraceLevel,\n message: str,\n status: str | None,\n attrs: dict[str, Any] | None,\n ) -> None:\n active = self.store.current()\n if active is None:\n raise RuntimeError(\"Trace context is not bound. Call create_context() first.\")\n record = TraceLogMessage(\n trace_id=active.record.trace_id,\n step=active.step,\n status=str(status or \"\"),\n message=str(message or \"\"),\n level=level,\n event_time=utc_now(),\n attrs=dict(attrs or {}),\n )\n self._writer.write_message(record)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/tracing/service.py:TraceService", + "span_start": 39, + "span_end": 166, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceManager(TraceService):\n \"\"\"Compatibility alias during the transition from ConfigManager-shaped naming.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/tracing/service.py:TraceManager", + "span_start": 169, + "span_end": 170, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 2, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "## Анализ архитектуры и поведения `TraceService`\n\n### Описание класса `TraceService`\n\nКласс `TraceService` определен в файле `src/app_runtime/tracing/service.py`. Этот класс является наследником абстрактного базового класса `TraceContextFactory`, что указывает на его ключевую роль в создании контекста трассировки (`trace context`) для последующих вызовов API или логики приложения.\n\n#### Обязанности класса:\n- Обладает именем с суффиксом \"service\", указывающим на его сервисную природу.\n- Оперирует состоянием атрибутов через чтение и запись их значений.\n- Участвует в передаче данных между различными этапами обработки (\"dataflow slices\").\n\n#### Поведение метода `_create_trace_context`\nМетод `_create_trace_context` создает новый контекст трассировки, который используется для отслеживания выполнения различных этапов программы. Контекст трассировки включает информацию о текущей сессии и этапах выполнения задачи.\n\n```python\ndef _create_trace_context(self):\n # Создание нового trace context, который содержит сессионные данные и метаданные текущего этапа работы.\n return self._context_factory.create()\n```\n\n### Взаимодействие с другими компонентами системы\n\n- **Pipeline stages**: Все перечисленные классы (`UvicornThreadRunner`, `WorkflowPersistence`, `HttpControlChannel`, `InMemoryTaskQueue`) также являются участниками передачи данных и участия в «слайсах» потока данных (`dataflow slices`), аналогично поведению `TraceService`.\n \n - `UvicornThreadRunner`: отвечает за запуск асинхронных HTTP запросов и обработку ответов.\n - `WorkflowPersistence`: управляет сохранением и восстановлением состояния рабочих процессов (workflow).\n - `HttpControlChannel`: обеспечивает взаимодействие с внешним интерфейсом управления задачами и данными.\n - `InMemoryTaskQueue`: представляет очередь задач, хранящуюся в памяти.\n\nЭти компоненты участвуют в общей архитектуре конвейера выполнения задач и передают состояние атрибутов друг другу во время выполнения операций.\n\n### Поток данных и обязанности классов\n\nВ системе существует несколько уровней взаимодействия компонентов, которые могут быть описаны следующим образом:\n\n1. Пользовательский запрос инициируется внешним клиентом и поступает через интерфейс HTTP (`HttpControlChannel`).\n2. Запрос передается дальше в различные рабочие процессы (`WorkflowPersistence`, `InMemoryTaskQueue`), где он может быть обработан параллельно или последовательно.\n3. Каждый из этих компонентов сохраняет свое текущее состояние и передает его дальше через промежуточные этапы выполнения.\n4. Информация об этапах выполнения собирается в виде контекста трассировки (`trace context`), созданном при помощи `TraceService`.\n5. Эта информация затем сохраняется или передается дальше другим компонентам для дальнейшей обработки.\n\nТаким образом, каждый компонент играет свою роль в общей цепочке выполнения задачи, обеспечивая корректность состояния атрибутов и правильное отслеживание процесса выполнения запроса.\n\n---\n\nЭтот анализ демонстрирует общую картину того, как компоненты взаимодействуют друг с другом и какую роль выполняет `TraceService` в этом процессе.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS", + "C4_SEMANTIC_ROLES" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "TraceService" + ], + "keyword_hints": [ + "TraceService" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "TraceService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Как работает TraceService?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "Как работает TraceService?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Как работает TraceService?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "Как работает TraceService?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "TraceService", + "alternatives": [ + "TraceService" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 8, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 106, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 32, + "C0_SOURCE_CHUNKS": 12, + "C4_SEMANTIC_ROLES": 11, + "C2_DEPENDENCY_GRAPH": 41, + "C3_ENTRYPOINTS": 9 + }, + "merge_rank": 16, + "prompt_build": 0, + "llm_call": 7366 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 371, + "evidence_rows": 21, + "evidence_chars": 7281 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 8, + "unique_paths": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 1 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 3, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_v1", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "TraceService" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 21, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-fullchain-explain-trace-service", + "mode": "full_chain", + "run_started_at": "2026-03-12T09:18:24", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Как работает TraceService?", + "normalized_query": "Как работает TraceService?" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Как работает TraceService?" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Как работает TraceService?" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "TraceService" + ], + "keyword_hints": [ + "TraceService" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Как работает TraceService?" + }, + "output": { + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "TraceService", + "alternatives": [ + "TraceService" + ], + "confidence": 0.99 + }, + "rag_count": 21, + "rag_rows": [ + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceService\nTraceService(TraceContextFactory)", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService", + "span_start": 39, + "span_end": 166, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "c2b2b976d99f2c600000b753731b26e0a69adcb4359398b93073590c5d5d04f4", + "qname": "TraceService", + "kind": "class", + "signature": "TraceService(TraceContextFactory)", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (13)", + "layer": "C4_SEMANTIC_ROLES", + "title": "TraceService", + "span_start": 39, + "span_end": 166, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 60, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "c2b2b976d99f2c600000b753731b26e0a69adcb4359398b93073590c5d5d04f4", + "symbol_name": "TraceService", + "qname": "TraceService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 13, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/queue/in_memory.py", + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)", + "layer": "C4_SEMANTIC_ROLES", + "title": "InMemoryTaskQueue", + "span_start": 9, + "span_end": 38, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 22, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "2da04cb94544a3bcbf0943a95ad4bdd8710bcafaa32a02fd0e4de2178dcf3533", + "symbol_name": "InMemoryTaskQueue", + "qname": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 9, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "58f0cc001ccda0eee4c6bc32ed83bd05eafd6b6644f1e8b4aa9eed3103db73dc", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "ConfigFileLoader\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (8)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ConfigFileLoader", + "span_start": 11, + "span_end": 48, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 23, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "a8474eca8b6e9dc86ae67ed68b16fa5fb639ef08739c053e7b7195489765667f", + "symbol_name": "ConfigFileLoader", + "qname": "ConfigFileLoader", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 8, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/store.py", + "content": "TraceContextStore\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "TraceContextStore", + "span_start": 15, + "span_end": 52, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b2dad4fbe16ffb11b58deba311c7739955c39d59f291b22181f33e9c8cce4059", + "symbol_name": "TraceContextStore", + "qname": "TraceContextStore", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "d369554f08fc92039c6edd5a2a1e73b23901533e8974459170bbd9347d263dc5", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workers/supervisor.py", + "content": "WorkerSupervisor\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkerSupervisor", + "span_start": 10, + "span_end": 59, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "c17b44e8d9e97d490989b21fa67d7c346cdda8a0472e4c41fb243c8846faa124", + "symbol_name": "WorkerSupervisor", + "qname": "WorkerSupervisor", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "77609d9d5927171cce7fc3a54897c183fd63068710c6362029b700937aae5eee", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.create_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 61, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3b052062067a78aef3302ee1d996897e02a67d1b340397bea4f59fe147c0492a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a", + "dst_ref": "TraceService.create_context", + "resolution": "resolved", + "slice_id": "3b052062067a78aef3302ee1d996897e02a67d1b340397bea4f59fe147c0492a", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.create_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.close_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 84, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "7a9353ef57c9ae5d19b3a0c6ac50fad05e6d21d31bbe1cd1cd07af6332ba6505", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "01e14158dcced7e52d0c8ac84ac7b9a75225c261b6aca6a1d7da802d0994721c", + "dst_ref": "TraceService.close_context", + "resolution": "resolved", + "slice_id": "7a9353ef57c9ae5d19b3a0c6ac50fad05e6d21d31bbe1cd1cd07af6332ba6505", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.close_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "01e14158dcced7e52d0c8ac84ac7b9a75225c261b6aca6a1d7da802d0994721c" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.open_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 78, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a6e13b9ebc4fed84586afd53ed92a4d14757e440873f572b2337d5622ee96031", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426", + "dst_ref": "TraceService.open_context", + "resolution": "resolved", + "slice_id": "a6e13b9ebc4fed84586afd53ed92a4d14757e440873f572b2337d5622ee96031", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.open_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.transport\n -> TraceService.__init__", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 41, + "span_end": 43, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "1e923a93faa05c3c43ca9b19bd047007a8589ccce57d3cc1798ae7f9f200af98", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "dst_ref": "TraceService.__init__", + "resolution": "resolved", + "slice_id": "1e923a93faa05c3c43ca9b19bd047007a8589ccce57d3cc1798ae7f9f200af98", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.transport", + "TraceService.__init__" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.current_trace_id", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 81, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3ea17138634b1190bded77ddb84aa1595124f6519b246f24fc4b02bd62b5cac1", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c", + "dst_ref": "TraceService.current_trace_id", + "resolution": "resolved", + "slice_id": "3ea17138634b1190bded77ddb84aa1595124f6519b246f24fc4b02bd62b5cac1", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.current_trace_id" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.step", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 88, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "9f34c5da9b09fba99df6f6b1bde183a9aeb45111b8218a747c71590c2c9f60f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "c44bfbc66cf747283f30088da3e011a10395031d41e77b74e523c24997f641ca", + "dst_ref": "TraceService.step", + "resolution": "resolved", + "slice_id": "9f34c5da9b09fba99df6f6b1bde183a9aeb45111b8218a747c71590c2c9f60f2", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.step" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "c44bfbc66cf747283f30088da3e011a10395031d41e77b74e523c24997f641ca" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceRecordWriter:\n def __init__(self, transport: TraceTransport) -> None:\n self._logger = logging.getLogger(__name__)\n self._transport = transport\n\n def write_context(self, record: TraceContextRecord) -> None:\n try:\n self._transport.write_context(record)\n except Exception:\n self._logger.exception(\"Trace transport failed to write context %s\", record.trace_id)\n\n def write_message(self, record: TraceLogMessage) -> None:\n try:\n self._transport.write_message(record)\n except Exception:\n self._logger.exception(\"Trace transport failed to write message for %s\", record.trace_id)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/tracing/service.py:TraceRecordWriter", + "span_start": 21, + "span_end": 36, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceService(TraceContextFactory):\n def __init__(self, transport: TraceTransport | None = None, store: TraceContextStore | None = None) -> None:\n self.transport = transport or NoOpTraceTransport()\n self.store = store or TraceContextStore()\n self._writer = TraceRecordWriter(self.transport)\n\n def create_context(\n self,\n *,\n alias: str,\n parent_id: str | None = None,\n kind: str | None = None,\n attrs: dict[str, Any] | None = None,\n ) -> str:\n record = TraceContextRecord(\n trace_id=uuid4().hex,\n alias=str(alias or \"\"),\n parent_id=parent_id,\n type=kind,\n event_time=utc_now(),\n attrs=dict(attrs or {}),\n )\n self.store.push(record)\n self._writer.write_context(record)\n return record.trace_id\n\n @contextmanager\n def open_context(\n self,\n *,\n alias: str,\n parent_id: str | None = None,\n kind: str | None = None,\n attrs: dict[str, Any] | None = None,\n ) -> Iterator[str]:\n trace_id = self.create_context(alias=alias, parent_id=parent_id, kind=kind, attrs=attrs)\n try:\n yield trace_id\n finally:\n self.store.pop()\n\n def current_trace_id(self) -> str | None:\n return self.store.current_trace_id()\n\n def close_context(self) -> str | None:\n previous = self.store.pop()\n return previous.record.trace_id if previous else None\n\n def step(self, name: str) -> None:\n self.store.set_step(str(name or \"\"))\n\n def info(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"INFO\", message, status, attrs)\n\n def debug(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"DEBUG\", message, status, attrs)\n\n def warning(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"WARNING\", message, status, attrs)\n\n def error(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"ERROR\", message, status, attrs)\n\n def exception(self, message: str, *, status: str = \"failed\", attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"ERROR\", message, status, attrs)\n\n def new_root(self, operation: str) -> TraceContext:\n trace_id = self.create_context(alias=operation, kind=\"operation\", attrs={\"operation\": operation})\n return TraceContext(trace_id=trace_id, span_id=trace_id, attributes={\"operation\": operation})\n\n def child_of(self, parent: TraceContext, operation: str) -> TraceContext:\n trace_id = self.create_context(\n alias=operation,\n parent_id=parent.trace_id,\n kind=\"worker\",\n attrs={\"operation\": operation},\n )\n return TraceContext(\n trace_id=trace_id,\n span_id=trace_id,\n parent_span_id=parent.span_id,\n attributes={\"operation\": operation},\n )\n\n def attach(self, metadata: dict[str, object], context: TraceContext) -> dict[str, object]:\n updated = dict(metadata)\n updated[\"trace_id\"] = context.trace_id\n updated[\"span_id\"] = context.span_id\n updated[\"parent_span_id\"] = context.parent_span_id\n return updated\n\n def resume(self, metadata: dict[str, object], operation: str) -> TraceContext:\n trace_id = str(metadata.get(\"trace_id\") or uuid4().hex)\n span_id = str(metadata.get(\"span_id\") or trace_id)\n parent_id = metadata.get(\"parent_span_id\")\n self.create_context(\n alias=operation,\n parent_id=str(parent_id) if parent_id else None,\n kind=\"worker\",\n attrs=dict(metadata),\n )\n return TraceContext(\n trace_id=trace_id,\n span_id=span_id,\n parent_span_id=str(parent_id) if parent_id else None,\n attributes={\"operation\": operation},\n )\n\n def _write_message(\n self,\n level: TraceLevel,\n message: str,\n status: str | None,\n attrs: dict[str, Any] | None,\n ) -> None:\n active = self.store.current()\n if active is None:\n raise RuntimeError(\"Trace context is not bound. Call create_context() first.\")\n record = TraceLogMessage(\n trace_id=active.record.trace_id,\n step=active.step,\n status=str(status or \"\"),\n message=str(message or \"\"),\n level=level,\n event_time=utc_now(),\n attrs=dict(attrs or {}),\n )\n self._writer.write_message(record)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/tracing/service.py:TraceService", + "span_start": 39, + "span_end": 166, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceManager(TraceService):\n \"\"\"Compatibility alias during the transition from ConfigManager-shaped naming.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/tracing/service.py:TraceManager", + "span_start": 169, + "span_end": 170, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 2, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "TraceService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Как работает TraceService?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "Как работает TraceService?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Как работает TraceService?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "Как работает TraceService?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "TraceService", + "alternatives": [ + "TraceService" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 8, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 106, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 32, + "C0_SOURCE_CHUNKS": 12, + "C4_SEMANTIC_ROLES": 11, + "C2_DEPENDENCY_GRAPH": 41, + "C3_ENTRYPOINTS": 9 + }, + "merge_rank": 16 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Как работает TraceService?", + "rag_count": 21 + }, + "output": { + "llm_answer": "## Анализ архитектуры и поведения `TraceService`\n\n### Описание класса `TraceService`\n\nКласс `TraceService` определен в файле `src/app_runtime/tracing/service.py`. Этот класс является наследником абстрактного базового класса `TraceContextFactory`, что указывает на его ключевую роль в создании контекста трассировки (`trace context`) для последующих вызовов API или логики приложения.\n\n#### Обязанности класса:\n- Обладает именем с суффиксом \"service\", указывающим на его сервисную природу.\n- Оперирует состоянием атрибутов через чтение и запись их значений.\n- Участвует в передаче данных между различными этапами обработки (\"dataflow slices\").\n\n#### Поведение метода `_create_trace_context`\nМетод `_create_trace_context` создает новый контекст трассировки, который используется для отслеживания выполнения различных этапов программы. Контекст трассировки включает информацию о текущей сессии и этапах выполнения задачи.\n\n```python\ndef _create_trace_context(self):\n # Создание нового trace context, который содержит сессионные данные и метаданные текущего этапа работы.\n return self._context_factory.create()\n```\n\n### Взаимодействие с другими компонентами системы\n\n- **Pipeline stages**: Все перечисленные классы (`UvicornThreadRunner`, `WorkflowPersistence`, `HttpControlChannel`, `InMemoryTaskQueue`) также являются участниками передачи данных и участия в «слайсах» потока данных (`dataflow slices`), аналогично поведению `TraceService`.\n \n - `UvicornThreadRunner`: отвечает за запуск асинхронных HTTP запросов и обработку ответов.\n - `WorkflowPersistence`: управляет сохранением и восстановлением состояния рабочих процессов (workflow).\n - `HttpControlChannel`: обеспечивает взаимодействие с внешним интерфейсом управления задачами и данными.\n - `InMemoryTaskQueue`: представляет очередь задач, хранящуюся в памяти.\n\nЭти компоненты участвуют в общей архитектуре конвейера выполнения задач и передают состояние атрибутов друг другу во время выполнения операций.\n\n### Поток данных и обязанности классов\n\nВ системе существует несколько уровней взаимодействия компонентов, которые могут быть описаны следующим образом:\n\n1. Пользовательский запрос инициируется внешним клиентом и поступает через интерфейс HTTP (`HttpControlChannel`).\n2. Запрос передается дальше в различные рабочие процессы (`WorkflowPersistence`, `InMemoryTaskQueue`), где он может быть обработан параллельно или последовательно.\n3. Каждый из этих компонентов сохраняет свое текущее состояние и передает его дальше через промежуточные этапы выполнения.\n4. Информация об этапах выполнения собирается в виде контекста трассировки (`trace context`), созданном при помощи `TraceService`.\n5. Эта информация затем сохраняется или передается дальше другим компонентам для дальнейшей обработки.\n\nТаким образом, каждый компонент играет свою роль в общей цепочке выполнения задачи, обеспечивая корректность состояния атрибутов и правильное отслеживание процесса выполнения запроса.\n\n---\n\nЭтот анализ демонстрирует общую картину того, как компоненты взаимодействуют друг с другом и какую роль выполняет `TraceService` в этом процессе." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 371, + "evidence_rows": 21, + "evidence_chars": 7281 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 8, + "unique_paths": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 1 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 3, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_v1", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 7366 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091824/full_chain_plba_code_retrieval_plba-fullchain-explain-trace-service.md b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091824/full_chain_plba_code_retrieval_plba-fullchain-explain-trace-service.md new file mode 100644 index 0000000..6587ea8 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091824/full_chain_plba_code_retrieval_plba-fullchain-explain-trace-service.md @@ -0,0 +1,34 @@ +# plba-fullchain-explain-trace-service + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_retrieval.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Как работает TraceService? + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 21, + "llm_answer": "## Анализ архитектуры и поведения `TraceService`\n\n### Описание класса `TraceService`\n\nКласс `TraceService` определен в файле `src/app_runtime/tracing/service.py`. Этот класс является наследником абстрактного базового класса `TraceContextFactory`, что указывает на его ключевую роль в создании контекста трассировки (`trace context`) для последующих вызовов API или логики приложения.\n\n#### Обязанности класса:\n- Обладает именем с суффиксом \"service\", указывающим на его сервисную природу.\n- Оперирует состоянием атрибутов через чтение и запись их значений.\n- Участвует в передаче данных между различными этапами обработки (\"dataflow slices\").\n\n#### Поведение метода `_create_trace_context`\nМетод `_create_trace_context` создает новый контекст трассировки, который используется для отслеживания выполнения различных этапов программы. Контекст трассировки включает информацию о текущей сессии и этапах выполнения задачи.\n\n```python\ndef _create_trace_context(self):\n # Создание нового trace context, который содержит сессионные данные и метаданные текущего этапа работы.\n return self._context_factory.create()\n```\n\n### Взаимодействие с другими компонентами системы\n\n- **Pipeline stages**: Все перечисленные классы (`UvicornThreadRunner`, `WorkflowPersistence`, `HttpControlChannel`, `InMemoryTaskQueue`) также являются участниками передачи данных и участия в «слайсах» потока данных (`dataflow slices`), аналогично поведению `TraceService`.\n \n - `UvicornThreadRunner`: отвечает за запуск асинхронных HTTP запросов и обработку ответов.\n - `WorkflowPersistence`: управляет сохранением и восстановлением состояния рабочих процессов (workflow).\n - `HttpControlChannel`: обеспечивает взаимодействие с внешним интерфейсом управления задачами и данными.\n - `InMemoryTaskQueue`: представляет очередь задач, хранящуюся в памяти.\n\nЭти компоненты участвуют в общей архитектуре конвейера выполнения задач и передают состояние атрибутов друг другу во время выполнения операций.\n\n### Поток данных и обязанности классов\n\nВ системе существует несколько уровней взаимодействия компонентов, которые могут быть описаны следующим образом:\n\n1. Пользовательский запрос инициируется внешним клиентом и поступает через интерфейс HTTP (`HttpControlChannel`).\n2. Запрос передается дальше в различные рабочие процессы (`WorkflowPersistence`, `InMemoryTaskQueue`), где он может быть обработан параллельно или последовательно.\n3. Каждый из этих компонентов сохраняет свое текущее состояние и передает его дальше через промежуточные этапы выполнения.\n4. Информация об этапах выполнения собирается в виде контекста трассировки (`trace context`), созданном при помощи `TraceService`.\n5. Эта информация затем сохраняется или передается дальше другим компонентам для дальнейшей обработки.\n\nТаким образом, каждый компонент играет свою роль в общей цепочке выполнения задачи, обеспечивая корректность состояния атрибутов и правильное отслеживание процесса выполнения запроса.\n\n---\n\nЭтот анализ демонстрирует общую картину того, как компоненты взаимодействуют друг с другом и какую роль выполняет `TraceService` в этом процессе.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "TraceService" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091824/full_chain_plba_code_retrieval_plba-fullchain-explain-workflow-engine.json b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091824/full_chain_plba_code_retrieval_plba-fullchain-explain-workflow-engine.json new file mode 100644 index 0000000..aad5209 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091824/full_chain_plba_code_retrieval_plba-fullchain-explain-workflow-engine.json @@ -0,0 +1,2634 @@ +{ + "case_id": "plba-fullchain-explain-workflow-engine", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_retrieval.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 20, + "llm_answer": "## Анализ архитектуры и поведения класса `WorkflowEngine`\n\n### 1. Описание файла и роли классов\n\n#### Файл: `src/app_runtime/workflow/engine/workflow_engine.py`\nВ данном файле находится определение класса **`WorkflowEngine`**, который играет ключевую роль в управлении workflow-приложением.\n\n### 2. Структура класса `WorkflowEngine`\n\n```python\nclass WorkflowEngine:\n # Конструктор класса с инициализацией атрибутов\n def __init__(self):\n self._hooks = WorkflowEngineHooks()\n self.transition_resolver = TransitionResolver()\n \n # Метод для запуска workflow\n async def run(self):\n pass\n\n # Метод для добавления новых хуков\n def add_hooks(self, hooks):\n self._hooks.add(hooks)\n```\n\n### 3. Ответственность и взаимодействие\n\n**Ответственности (`Responsibilities`) класса:**\n- Чтение и запись состояния атрибутов\n- Участие в потоках данных (dataflow slices)\n\n**Роль класса (`role`):**\n- pipeline_stage\n\n**Связанные классы и их роли:**\n- `WorkflowEngineHooks`: модель (`model`), отвечает за обработку событий или действий связанных с жизненным циклом workflow.\n- `TransitionResolver`: модель (`model`), решает переходы между стадиями workflow.\n- `UvicornThreadRunner`: pipeline_stage, используется для выполнения HTTP-запросов и взаимодействия с API.\n\n### 4. Поток данных и структура работы класса\n\nПри запуске метода `run()` происходит следующее:\n1. Инициализация внутренних объектов.\n2. Вызов методов соответствующих стадий и переходов внутри workflow.\n3. Выполнение хуков, зарегистрированных через метод `add_hooks()`.\n\n### 5. Пример использования класса\n\n```python\n# Создание экземпляра WorkflowEngine\nengine = WorkflowEngine()\n\n# Добавление пользовательских хуков\ncustom_hooks = {\n \"before_start\": lambda: print(\"Before start\"),\n \"after_end\": lambda: print(\"After end\")\n}\nengine.add_hooks(custom_hooks)\n\n# Запуск workflow\nawait engine.run()\n```\n\n### Заключение\n\nКласс `WorkflowEngine` является центральным компонентом управления workflow-приложением. Он управляет состоянием приложения, взаимодействует с внешними сервисами и обеспечивает логику перехода между стадиями workflow при помощи встроенных хуков и решений переходов. Использование данного класса позволяет легко расширять функциональность путем регистрации дополнительных хуков и модификации стандартных потоков данных.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "WorkflowEngine" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-fullchain-explain-workflow-engine", + "text": "Объясни класс WorkflowEngine", + "mode": "full_chain", + "run_started_at": "2026-03-12T09:18:24", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни класс WorkflowEngine", + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "WorkflowEngine", + "alternatives": [ + "WorkflowEngine", + "WorkflowEngineHooks" + ], + "confidence": 0.99 + }, + "rag_count": 20, + "rag_rows": [ + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "class WorkflowEngine\nWorkflowEngine", + "layer": "C1_SYMBOL_CATALOG", + "title": "WorkflowEngine", + "span_start": 10, + "span_end": 86, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "57ec0a9f11c542c78e008684a888397e8d9ef4223671acb2567e631a0cbc70b4", + "qname": "WorkflowEngine", + "kind": "class", + "signature": "WorkflowEngine", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.workflow.engine.workflow_engine", + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/hooks.py", + "content": "class WorkflowEngineHooks\nWorkflowEngineHooks", + "layer": "C1_SYMBOL_CATALOG", + "title": "WorkflowEngineHooks", + "span_start": 6, + "span_end": 14, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "914123ed510540061e116100fc87bba4195595ba696f8bfde2fd77ac6a5cd7e4", + "qname": "WorkflowEngineHooks", + "kind": "class", + "signature": "WorkflowEngineHooks", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.workflow.engine.hooks", + "is_test": false, + "blob_sha": "4b11672b0a9af1ae04bfce9d8e1f96572997d3e65e68108d7c797b88fa5fa47a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowEngine", + "span_start": 10, + "span_end": 86, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "57ec0a9f11c542c78e008684a888397e8d9ef4223671acb2567e631a0cbc70b4", + "symbol_name": "WorkflowEngine", + "qname": "WorkflowEngine", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/hooks.py", + "content": "WorkflowEngineHooks\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowEngineHooks", + "span_start": 6, + "span_end": 14, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "914123ed510540061e116100fc87bba4195595ba696f8bfde2fd77ac6a5cd7e4", + "symbol_name": "WorkflowEngineHooks", + "qname": "WorkflowEngineHooks", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "4b11672b0a9af1ae04bfce9d8e1f96572997d3e65e68108d7c797b88fa5fa47a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/transition_resolver.py", + "content": "TransitionResolver\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "TransitionResolver", + "span_start": 7, + "span_end": 9, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "d1979f0b23d354338debf7771373226833d57c1e7830ce66ca0b82cdf209b958", + "symbol_name": "TransitionResolver", + "qname": "TransitionResolver", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "2c518f4c77fb5dcc2970b88f55a7b121d05959578fb0d196af92ff5193574838", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/queue/in_memory.py", + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)", + "layer": "C4_SEMANTIC_ROLES", + "title": "InMemoryTaskQueue", + "span_start": 9, + "span_end": 38, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 22, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "2da04cb94544a3bcbf0943a95ad4bdd8710bcafaa32a02fd0e4de2178dcf3533", + "symbol_name": "InMemoryTaskQueue", + "qname": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 9, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "58f0cc001ccda0eee4c6bc32ed83bd05eafd6b6644f1e8b4aa9eed3103db73dc", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "ConfigFileLoader\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (8)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ConfigFileLoader", + "span_start": 11, + "span_end": 48, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 23, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "a8474eca8b6e9dc86ae67ed68b16fa5fb639ef08739c053e7b7195489765667f", + "symbol_name": "ConfigFileLoader", + "qname": "ConfigFileLoader", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 8, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine.__init__\n -> WorkflowEngine._transition_resolver\n -> WorkflowEngine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowEngine.__init__:dataflow_slice", + "span_start": 14, + "span_end": 63, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3abf07e5c245e0fe59785ba2d569c2ee56018715fc7f625a044ddaf6201f903d", + "edge_type": "dataflow_slice", + "src_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "src_qname": "WorkflowEngine.__init__", + "dst_symbol_id": "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8", + "dst_ref": "WorkflowEngine.run", + "resolution": "resolved", + "slice_id": "3abf07e5c245e0fe59785ba2d569c2ee56018715fc7f625a044ddaf6201f903d", + "root_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "path_symbols": [ + "WorkflowEngine.__init__", + "WorkflowEngine._transition_resolver", + "WorkflowEngine.run" + ], + "path_symbol_ids": [ + "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine.__init__\n -> WorkflowEngine._hooks\n -> WorkflowEngine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowEngine.__init__:dataflow_slice", + "span_start": 16, + "span_end": 34, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d73db644b69c1eb35afd6eae9d6ac8674e49e30e9bcf9c020f9fdbfe754851b2", + "edge_type": "dataflow_slice", + "src_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "src_qname": "WorkflowEngine.__init__", + "dst_symbol_id": "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8", + "dst_ref": "WorkflowEngine.run", + "resolution": "resolved", + "slice_id": "d73db644b69c1eb35afd6eae9d6ac8674e49e30e9bcf9c020f9fdbfe754851b2", + "root_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "path_symbols": [ + "WorkflowEngine.__init__", + "WorkflowEngine._hooks", + "WorkflowEngine.run" + ], + "path_symbol_ids": [ + "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine.__init__\n -> WorkflowEngine._workflow\n -> WorkflowEngine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowEngine.__init__:dataflow_slice", + "span_start": 12, + "span_end": 29, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "b45ef3c54669b4910a8aed3a565804f275424a24007bc7e3c953389521f80249", + "edge_type": "dataflow_slice", + "src_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "src_qname": "WorkflowEngine.__init__", + "dst_symbol_id": "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8", + "dst_ref": "WorkflowEngine.run", + "resolution": "resolved", + "slice_id": "b45ef3c54669b4910a8aed3a565804f275424a24007bc7e3c953389521f80249", + "root_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "path_symbols": [ + "WorkflowEngine.__init__", + "WorkflowEngine._workflow", + "WorkflowEngine.run" + ], + "path_symbol_ids": [ + "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine.__init__\n -> WorkflowEngine._persistence\n -> WorkflowEngine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowEngine.__init__:dataflow_slice", + "span_start": 13, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "8101338770016324ce05d61daa9935a444c75e6c94a0fae4275d5b50fcbcc70b", + "edge_type": "dataflow_slice", + "src_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "src_qname": "WorkflowEngine.__init__", + "dst_symbol_id": "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8", + "dst_ref": "WorkflowEngine.run", + "resolution": "resolved", + "slice_id": "8101338770016324ce05d61daa9935a444c75e6c94a0fae4275d5b50fcbcc70b", + "root_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "path_symbols": [ + "WorkflowEngine.__init__", + "WorkflowEngine._persistence", + "WorkflowEngine.run" + ], + "path_symbol_ids": [ + "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine.__init__\n -> WorkflowEngine._traces\n -> WorkflowEngine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowEngine.__init__:dataflow_slice", + "span_start": 15, + "span_end": 27, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "5006266616d534d721648391565e2ac0c9e7e9d9f8df00c17fba8989afb533a5", + "edge_type": "dataflow_slice", + "src_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "src_qname": "WorkflowEngine.__init__", + "dst_symbol_id": "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8", + "dst_ref": "WorkflowEngine.run", + "resolution": "resolved", + "slice_id": "5006266616d534d721648391565e2ac0c9e7e9d9f8df00c17fba8989afb533a5", + "root_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "path_symbols": [ + "WorkflowEngine.__init__", + "WorkflowEngine._traces", + "WorkflowEngine.run" + ], + "path_symbol_ids": [ + "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine.__init__\n -> WorkflowEngine._logger\n -> WorkflowEngine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowEngine.__init__:dataflow_slice", + "span_start": 17, + "span_end": 85, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "2f9927abb24794adb056b94bfb5d8538a5cbafb160da2079f52fca97fd694a2b", + "edge_type": "dataflow_slice", + "src_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "src_qname": "WorkflowEngine.__init__", + "dst_symbol_id": "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8", + "dst_ref": "WorkflowEngine.run", + "resolution": "resolved", + "slice_id": "2f9927abb24794adb056b94bfb5d8538a5cbafb160da2079f52fca97fd694a2b", + "root_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "path_symbols": [ + "WorkflowEngine.__init__", + "WorkflowEngine._logger", + "WorkflowEngine.run" + ], + "path_symbol_ids": [ + "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "class WorkflowEngine:\n def __init__(self, workflow, persistence, *, traces, hooks: WorkflowEngineHooks | None = None) -> None:\n self._workflow = workflow\n self._persistence = persistence\n self._transition_resolver = TransitionResolver()\n self._traces = traces\n self._hooks = hooks or WorkflowEngineHooks()\n self._logger = logging.getLogger(__name__)\n\n def run(self, context: WorkflowContext) -> dict[str, object]:\n run_id = self._persistence.start_run(\n self._workflow.definition.name,\n self._workflow.definition.start_at,\n context.snapshot(),\n )\n context.state.setdefault(\"runtime\", {})\n context.state[\"runtime\"][\"workflow_run_id\"] = run_id\n self._traces.step(\"workflow\")\n self._traces.info(\"Workflow started.\", status=\"started\", attrs={\"workflow_run_id\": run_id})\n current_name = self._workflow.definition.start_at\n while current_name is not None:\n node = self._workflow.definition.nodes[current_name]\n context.state[\"runtime\"][\"current_node\"] = current_name\n self._logger.info(\"Workflow run %s: step '%s' started.\", run_id, current_name)\n self._hooks.on_step_started(context, current_name)\n self._persistence.start_step(run_id, current_name, context.snapshot())\n self._traces.step(current_name)\n self._traces.debug(\n f\"Step '{current_name}' started.\",\n status=\"started\",\n attrs={\"workflow_run_id\": run_id, \"node\": current_name},\n )\n try:\n result = node.step.run(context)\n except Exception as error:\n self._persistence.fail_step(run_id, current_name, context.snapshot(), error)\n self._persistence.fail_run(run_id, context.snapshot())\n self._traces.error(\n f\"Step '{current_name}' failed: {error}\",\n status=\"failed\",\n attrs={\"exception_type\": type(error).__name__},\n )\n self._logger.exception(\"Workflow run %s: step '%s' failed.\", run_id, current_name)\n self._hooks.on_step_failed(context, current_name)\n raise\n context.state.update(result.updates)\n self._persistence.complete_step(\n run_id,\n current_name,\n result.status,\n result.transition,\n context.snapshot(),\n )\n next_node = self._transition_resolver.resolve(node, result)\n self._traces.debug(\n f\"Step '{current_name}' completed with transition '{result.transition}'.\",\n status=result.status,\n attrs={\n \"workflow_run_id\": run_id,\n \"from_node\": current_name,\n \"transition\": result.transition,\n \"to_node\": next_node,\n },\n )\n self._logger.info(\n \"Workflow run %s: step '%s' completed with transition '%s'.\",\n run_id,\n current_name,\n result.transition,\n )\n self._hooks.on_step_finished(context, current_name)\n current_name = next_node\n self._persistence.complete_run(run_id, context.snapshot())\n self._traces.step(\"workflow\")\n self._traces.info(\"Workflow completed.\", status=\"completed\", attrs={\"workflow_run_id\": run_id})\n self._logger.info(\"Workflow run %s completed.\", run_id)\n return {\"run_id\": run_id, \"status\": \"completed\", \"context\": context.snapshot()}", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/workflow/engine/workflow_engine.py:WorkflowEngine", + "span_start": 10, + "span_end": 86, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.workflow.engine.workflow_engine", + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "## Анализ архитектуры и поведения класса `WorkflowEngine`\n\n### 1. Описание файла и роли классов\n\n#### Файл: `src/app_runtime/workflow/engine/workflow_engine.py`\nВ данном файле находится определение класса **`WorkflowEngine`**, который играет ключевую роль в управлении workflow-приложением.\n\n### 2. Структура класса `WorkflowEngine`\n\n```python\nclass WorkflowEngine:\n # Конструктор класса с инициализацией атрибутов\n def __init__(self):\n self._hooks = WorkflowEngineHooks()\n self.transition_resolver = TransitionResolver()\n \n # Метод для запуска workflow\n async def run(self):\n pass\n\n # Метод для добавления новых хуков\n def add_hooks(self, hooks):\n self._hooks.add(hooks)\n```\n\n### 3. Ответственность и взаимодействие\n\n**Ответственности (`Responsibilities`) класса:**\n- Чтение и запись состояния атрибутов\n- Участие в потоках данных (dataflow slices)\n\n**Роль класса (`role`):**\n- pipeline_stage\n\n**Связанные классы и их роли:**\n- `WorkflowEngineHooks`: модель (`model`), отвечает за обработку событий или действий связанных с жизненным циклом workflow.\n- `TransitionResolver`: модель (`model`), решает переходы между стадиями workflow.\n- `UvicornThreadRunner`: pipeline_stage, используется для выполнения HTTP-запросов и взаимодействия с API.\n\n### 4. Поток данных и структура работы класса\n\nПри запуске метода `run()` происходит следующее:\n1. Инициализация внутренних объектов.\n2. Вызов методов соответствующих стадий и переходов внутри workflow.\n3. Выполнение хуков, зарегистрированных через метод `add_hooks()`.\n\n### 5. Пример использования класса\n\n```python\n# Создание экземпляра WorkflowEngine\nengine = WorkflowEngine()\n\n# Добавление пользовательских хуков\ncustom_hooks = {\n \"before_start\": lambda: print(\"Before start\"),\n \"after_end\": lambda: print(\"After end\")\n}\nengine.add_hooks(custom_hooks)\n\n# Запуск workflow\nawait engine.run()\n```\n\n### Заключение\n\nКласс `WorkflowEngine` является центральным компонентом управления workflow-приложением. Он управляет состоянием приложения, взаимодействует с внешними сервисами и обеспечивает логику перехода между стадиями workflow при помощи встроенных хуков и решений переходов. Использование данного класса позволяет легко расширять функциональность путем регистрации дополнительных хуков и модификации стандартных потоков данных.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS", + "C4_SEMANTIC_ROLES" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "WorkflowEngine" + ], + "keyword_hints": [ + "WorkflowEngine" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "WorkflowEngine", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Объясни класс WorkflowEngine", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "Объясни класс WorkflowEngine", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Объясни класс WorkflowEngine", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "Объясни класс WorkflowEngine", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 2, + "candidates_after_filter": 2 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "WorkflowEngine", + "alternatives": [ + "WorkflowEngine", + "WorkflowEngineHooks" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 2, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 8, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 1, + "symbol_resolution": 0, + "retrieval_total": 151, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 37, + "C0_SOURCE_CHUNKS": 22, + "C4_SEMANTIC_ROLES": 21, + "C2_DEPENDENCY_GRAPH": 53, + "C3_ENTRYPOINTS": 15 + }, + "merge_rank": 35, + "prompt_build": 0, + "llm_call": 5185 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 307, + "evidence_rows": 20, + "evidence_chars": 5261 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 2, + "unique_paths": 2 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 8, + "unique_paths": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 1 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_v1", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "WorkflowEngine" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 20, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-fullchain-explain-workflow-engine", + "mode": "full_chain", + "run_started_at": "2026-03-12T09:18:24", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Объясни класс WorkflowEngine", + "normalized_query": "Объясни класс WorkflowEngine" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Объясни класс WorkflowEngine" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни класс WorkflowEngine" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "WorkflowEngine" + ], + "keyword_hints": [ + "WorkflowEngine" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 1 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Объясни класс WorkflowEngine" + }, + "output": { + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "WorkflowEngine", + "alternatives": [ + "WorkflowEngine", + "WorkflowEngineHooks" + ], + "confidence": 0.99 + }, + "rag_count": 20, + "rag_rows": [ + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "class WorkflowEngine\nWorkflowEngine", + "layer": "C1_SYMBOL_CATALOG", + "title": "WorkflowEngine", + "span_start": 10, + "span_end": 86, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "57ec0a9f11c542c78e008684a888397e8d9ef4223671acb2567e631a0cbc70b4", + "qname": "WorkflowEngine", + "kind": "class", + "signature": "WorkflowEngine", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.workflow.engine.workflow_engine", + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/hooks.py", + "content": "class WorkflowEngineHooks\nWorkflowEngineHooks", + "layer": "C1_SYMBOL_CATALOG", + "title": "WorkflowEngineHooks", + "span_start": 6, + "span_end": 14, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "914123ed510540061e116100fc87bba4195595ba696f8bfde2fd77ac6a5cd7e4", + "qname": "WorkflowEngineHooks", + "kind": "class", + "signature": "WorkflowEngineHooks", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.workflow.engine.hooks", + "is_test": false, + "blob_sha": "4b11672b0a9af1ae04bfce9d8e1f96572997d3e65e68108d7c797b88fa5fa47a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowEngine", + "span_start": 10, + "span_end": 86, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "57ec0a9f11c542c78e008684a888397e8d9ef4223671acb2567e631a0cbc70b4", + "symbol_name": "WorkflowEngine", + "qname": "WorkflowEngine", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/hooks.py", + "content": "WorkflowEngineHooks\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowEngineHooks", + "span_start": 6, + "span_end": 14, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "914123ed510540061e116100fc87bba4195595ba696f8bfde2fd77ac6a5cd7e4", + "symbol_name": "WorkflowEngineHooks", + "qname": "WorkflowEngineHooks", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "4b11672b0a9af1ae04bfce9d8e1f96572997d3e65e68108d7c797b88fa5fa47a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/transition_resolver.py", + "content": "TransitionResolver\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "TransitionResolver", + "span_start": 7, + "span_end": 9, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "d1979f0b23d354338debf7771373226833d57c1e7830ce66ca0b82cdf209b958", + "symbol_name": "TransitionResolver", + "qname": "TransitionResolver", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "2c518f4c77fb5dcc2970b88f55a7b121d05959578fb0d196af92ff5193574838", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/queue/in_memory.py", + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)", + "layer": "C4_SEMANTIC_ROLES", + "title": "InMemoryTaskQueue", + "span_start": 9, + "span_end": 38, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 22, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "2da04cb94544a3bcbf0943a95ad4bdd8710bcafaa32a02fd0e4de2178dcf3533", + "symbol_name": "InMemoryTaskQueue", + "qname": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 9, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "58f0cc001ccda0eee4c6bc32ed83bd05eafd6b6644f1e8b4aa9eed3103db73dc", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "ConfigFileLoader\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (8)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ConfigFileLoader", + "span_start": 11, + "span_end": 48, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 23, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "a8474eca8b6e9dc86ae67ed68b16fa5fb639ef08739c053e7b7195489765667f", + "symbol_name": "ConfigFileLoader", + "qname": "ConfigFileLoader", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 8, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine.__init__\n -> WorkflowEngine._transition_resolver\n -> WorkflowEngine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowEngine.__init__:dataflow_slice", + "span_start": 14, + "span_end": 63, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3abf07e5c245e0fe59785ba2d569c2ee56018715fc7f625a044ddaf6201f903d", + "edge_type": "dataflow_slice", + "src_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "src_qname": "WorkflowEngine.__init__", + "dst_symbol_id": "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8", + "dst_ref": "WorkflowEngine.run", + "resolution": "resolved", + "slice_id": "3abf07e5c245e0fe59785ba2d569c2ee56018715fc7f625a044ddaf6201f903d", + "root_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "path_symbols": [ + "WorkflowEngine.__init__", + "WorkflowEngine._transition_resolver", + "WorkflowEngine.run" + ], + "path_symbol_ids": [ + "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine.__init__\n -> WorkflowEngine._hooks\n -> WorkflowEngine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowEngine.__init__:dataflow_slice", + "span_start": 16, + "span_end": 34, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d73db644b69c1eb35afd6eae9d6ac8674e49e30e9bcf9c020f9fdbfe754851b2", + "edge_type": "dataflow_slice", + "src_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "src_qname": "WorkflowEngine.__init__", + "dst_symbol_id": "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8", + "dst_ref": "WorkflowEngine.run", + "resolution": "resolved", + "slice_id": "d73db644b69c1eb35afd6eae9d6ac8674e49e30e9bcf9c020f9fdbfe754851b2", + "root_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "path_symbols": [ + "WorkflowEngine.__init__", + "WorkflowEngine._hooks", + "WorkflowEngine.run" + ], + "path_symbol_ids": [ + "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine.__init__\n -> WorkflowEngine._workflow\n -> WorkflowEngine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowEngine.__init__:dataflow_slice", + "span_start": 12, + "span_end": 29, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "b45ef3c54669b4910a8aed3a565804f275424a24007bc7e3c953389521f80249", + "edge_type": "dataflow_slice", + "src_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "src_qname": "WorkflowEngine.__init__", + "dst_symbol_id": "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8", + "dst_ref": "WorkflowEngine.run", + "resolution": "resolved", + "slice_id": "b45ef3c54669b4910a8aed3a565804f275424a24007bc7e3c953389521f80249", + "root_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "path_symbols": [ + "WorkflowEngine.__init__", + "WorkflowEngine._workflow", + "WorkflowEngine.run" + ], + "path_symbol_ids": [ + "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine.__init__\n -> WorkflowEngine._persistence\n -> WorkflowEngine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowEngine.__init__:dataflow_slice", + "span_start": 13, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "8101338770016324ce05d61daa9935a444c75e6c94a0fae4275d5b50fcbcc70b", + "edge_type": "dataflow_slice", + "src_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "src_qname": "WorkflowEngine.__init__", + "dst_symbol_id": "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8", + "dst_ref": "WorkflowEngine.run", + "resolution": "resolved", + "slice_id": "8101338770016324ce05d61daa9935a444c75e6c94a0fae4275d5b50fcbcc70b", + "root_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "path_symbols": [ + "WorkflowEngine.__init__", + "WorkflowEngine._persistence", + "WorkflowEngine.run" + ], + "path_symbol_ids": [ + "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine.__init__\n -> WorkflowEngine._traces\n -> WorkflowEngine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowEngine.__init__:dataflow_slice", + "span_start": 15, + "span_end": 27, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "5006266616d534d721648391565e2ac0c9e7e9d9f8df00c17fba8989afb533a5", + "edge_type": "dataflow_slice", + "src_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "src_qname": "WorkflowEngine.__init__", + "dst_symbol_id": "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8", + "dst_ref": "WorkflowEngine.run", + "resolution": "resolved", + "slice_id": "5006266616d534d721648391565e2ac0c9e7e9d9f8df00c17fba8989afb533a5", + "root_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "path_symbols": [ + "WorkflowEngine.__init__", + "WorkflowEngine._traces", + "WorkflowEngine.run" + ], + "path_symbol_ids": [ + "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine.__init__\n -> WorkflowEngine._logger\n -> WorkflowEngine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowEngine.__init__:dataflow_slice", + "span_start": 17, + "span_end": 85, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "2f9927abb24794adb056b94bfb5d8538a5cbafb160da2079f52fca97fd694a2b", + "edge_type": "dataflow_slice", + "src_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "src_qname": "WorkflowEngine.__init__", + "dst_symbol_id": "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8", + "dst_ref": "WorkflowEngine.run", + "resolution": "resolved", + "slice_id": "2f9927abb24794adb056b94bfb5d8538a5cbafb160da2079f52fca97fd694a2b", + "root_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "path_symbols": [ + "WorkflowEngine.__init__", + "WorkflowEngine._logger", + "WorkflowEngine.run" + ], + "path_symbol_ids": [ + "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "class WorkflowEngine:\n def __init__(self, workflow, persistence, *, traces, hooks: WorkflowEngineHooks | None = None) -> None:\n self._workflow = workflow\n self._persistence = persistence\n self._transition_resolver = TransitionResolver()\n self._traces = traces\n self._hooks = hooks or WorkflowEngineHooks()\n self._logger = logging.getLogger(__name__)\n\n def run(self, context: WorkflowContext) -> dict[str, object]:\n run_id = self._persistence.start_run(\n self._workflow.definition.name,\n self._workflow.definition.start_at,\n context.snapshot(),\n )\n context.state.setdefault(\"runtime\", {})\n context.state[\"runtime\"][\"workflow_run_id\"] = run_id\n self._traces.step(\"workflow\")\n self._traces.info(\"Workflow started.\", status=\"started\", attrs={\"workflow_run_id\": run_id})\n current_name = self._workflow.definition.start_at\n while current_name is not None:\n node = self._workflow.definition.nodes[current_name]\n context.state[\"runtime\"][\"current_node\"] = current_name\n self._logger.info(\"Workflow run %s: step '%s' started.\", run_id, current_name)\n self._hooks.on_step_started(context, current_name)\n self._persistence.start_step(run_id, current_name, context.snapshot())\n self._traces.step(current_name)\n self._traces.debug(\n f\"Step '{current_name}' started.\",\n status=\"started\",\n attrs={\"workflow_run_id\": run_id, \"node\": current_name},\n )\n try:\n result = node.step.run(context)\n except Exception as error:\n self._persistence.fail_step(run_id, current_name, context.snapshot(), error)\n self._persistence.fail_run(run_id, context.snapshot())\n self._traces.error(\n f\"Step '{current_name}' failed: {error}\",\n status=\"failed\",\n attrs={\"exception_type\": type(error).__name__},\n )\n self._logger.exception(\"Workflow run %s: step '%s' failed.\", run_id, current_name)\n self._hooks.on_step_failed(context, current_name)\n raise\n context.state.update(result.updates)\n self._persistence.complete_step(\n run_id,\n current_name,\n result.status,\n result.transition,\n context.snapshot(),\n )\n next_node = self._transition_resolver.resolve(node, result)\n self._traces.debug(\n f\"Step '{current_name}' completed with transition '{result.transition}'.\",\n status=result.status,\n attrs={\n \"workflow_run_id\": run_id,\n \"from_node\": current_name,\n \"transition\": result.transition,\n \"to_node\": next_node,\n },\n )\n self._logger.info(\n \"Workflow run %s: step '%s' completed with transition '%s'.\",\n run_id,\n current_name,\n result.transition,\n )\n self._hooks.on_step_finished(context, current_name)\n current_name = next_node\n self._persistence.complete_run(run_id, context.snapshot())\n self._traces.step(\"workflow\")\n self._traces.info(\"Workflow completed.\", status=\"completed\", attrs={\"workflow_run_id\": run_id})\n self._logger.info(\"Workflow run %s completed.\", run_id)\n return {\"run_id\": run_id, \"status\": \"completed\", \"context\": context.snapshot()}", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/workflow/engine/workflow_engine.py:WorkflowEngine", + "span_start": 10, + "span_end": 86, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.workflow.engine.workflow_engine", + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "WorkflowEngine", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Объясни класс WorkflowEngine", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "Объясни класс WorkflowEngine", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Объясни класс WorkflowEngine", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "Объясни класс WorkflowEngine", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 2, + "candidates_after_filter": 2 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "WorkflowEngine", + "alternatives": [ + "WorkflowEngine", + "WorkflowEngineHooks" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 2, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 8, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 151, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 37, + "C0_SOURCE_CHUNKS": 22, + "C4_SEMANTIC_ROLES": 21, + "C2_DEPENDENCY_GRAPH": 53, + "C3_ENTRYPOINTS": 15 + }, + "merge_rank": 35 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Объясни класс WorkflowEngine", + "rag_count": 20 + }, + "output": { + "llm_answer": "## Анализ архитектуры и поведения класса `WorkflowEngine`\n\n### 1. Описание файла и роли классов\n\n#### Файл: `src/app_runtime/workflow/engine/workflow_engine.py`\nВ данном файле находится определение класса **`WorkflowEngine`**, который играет ключевую роль в управлении workflow-приложением.\n\n### 2. Структура класса `WorkflowEngine`\n\n```python\nclass WorkflowEngine:\n # Конструктор класса с инициализацией атрибутов\n def __init__(self):\n self._hooks = WorkflowEngineHooks()\n self.transition_resolver = TransitionResolver()\n \n # Метод для запуска workflow\n async def run(self):\n pass\n\n # Метод для добавления новых хуков\n def add_hooks(self, hooks):\n self._hooks.add(hooks)\n```\n\n### 3. Ответственность и взаимодействие\n\n**Ответственности (`Responsibilities`) класса:**\n- Чтение и запись состояния атрибутов\n- Участие в потоках данных (dataflow slices)\n\n**Роль класса (`role`):**\n- pipeline_stage\n\n**Связанные классы и их роли:**\n- `WorkflowEngineHooks`: модель (`model`), отвечает за обработку событий или действий связанных с жизненным циклом workflow.\n- `TransitionResolver`: модель (`model`), решает переходы между стадиями workflow.\n- `UvicornThreadRunner`: pipeline_stage, используется для выполнения HTTP-запросов и взаимодействия с API.\n\n### 4. Поток данных и структура работы класса\n\nПри запуске метода `run()` происходит следующее:\n1. Инициализация внутренних объектов.\n2. Вызов методов соответствующих стадий и переходов внутри workflow.\n3. Выполнение хуков, зарегистрированных через метод `add_hooks()`.\n\n### 5. Пример использования класса\n\n```python\n# Создание экземпляра WorkflowEngine\nengine = WorkflowEngine()\n\n# Добавление пользовательских хуков\ncustom_hooks = {\n \"before_start\": lambda: print(\"Before start\"),\n \"after_end\": lambda: print(\"After end\")\n}\nengine.add_hooks(custom_hooks)\n\n# Запуск workflow\nawait engine.run()\n```\n\n### Заключение\n\nКласс `WorkflowEngine` является центральным компонентом управления workflow-приложением. Он управляет состоянием приложения, взаимодействует с внешними сервисами и обеспечивает логику перехода между стадиями workflow при помощи встроенных хуков и решений переходов. Использование данного класса позволяет легко расширять функциональность путем регистрации дополнительных хуков и модификации стандартных потоков данных." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 307, + "evidence_rows": 20, + "evidence_chars": 5261 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 2, + "unique_paths": 2 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 8, + "unique_paths": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 1 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_v1", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 5185 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091824/full_chain_plba_code_retrieval_plba-fullchain-explain-workflow-engine.md b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091824/full_chain_plba_code_retrieval_plba-fullchain-explain-workflow-engine.md new file mode 100644 index 0000000..86d0354 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091824/full_chain_plba_code_retrieval_plba-fullchain-explain-workflow-engine.md @@ -0,0 +1,34 @@ +# plba-fullchain-explain-workflow-engine + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_retrieval.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Объясни класс WorkflowEngine + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 20, + "llm_answer": "## Анализ архитектуры и поведения класса `WorkflowEngine`\n\n### 1. Описание файла и роли классов\n\n#### Файл: `src/app_runtime/workflow/engine/workflow_engine.py`\nВ данном файле находится определение класса **`WorkflowEngine`**, который играет ключевую роль в управлении workflow-приложением.\n\n### 2. Структура класса `WorkflowEngine`\n\n```python\nclass WorkflowEngine:\n # Конструктор класса с инициализацией атрибутов\n def __init__(self):\n self._hooks = WorkflowEngineHooks()\n self.transition_resolver = TransitionResolver()\n \n # Метод для запуска workflow\n async def run(self):\n pass\n\n # Метод для добавления новых хуков\n def add_hooks(self, hooks):\n self._hooks.add(hooks)\n```\n\n### 3. Ответственность и взаимодействие\n\n**Ответственности (`Responsibilities`) класса:**\n- Чтение и запись состояния атрибутов\n- Участие в потоках данных (dataflow slices)\n\n**Роль класса (`role`):**\n- pipeline_stage\n\n**Связанные классы и их роли:**\n- `WorkflowEngineHooks`: модель (`model`), отвечает за обработку событий или действий связанных с жизненным циклом workflow.\n- `TransitionResolver`: модель (`model`), решает переходы между стадиями workflow.\n- `UvicornThreadRunner`: pipeline_stage, используется для выполнения HTTP-запросов и взаимодействия с API.\n\n### 4. Поток данных и структура работы класса\n\nПри запуске метода `run()` происходит следующее:\n1. Инициализация внутренних объектов.\n2. Вызов методов соответствующих стадий и переходов внутри workflow.\n3. Выполнение хуков, зарегистрированных через метод `add_hooks()`.\n\n### 5. Пример использования класса\n\n```python\n# Создание экземпляра WorkflowEngine\nengine = WorkflowEngine()\n\n# Добавление пользовательских хуков\ncustom_hooks = {\n \"before_start\": lambda: print(\"Before start\"),\n \"after_end\": lambda: print(\"After end\")\n}\nengine.add_hooks(custom_hooks)\n\n# Запуск workflow\nawait engine.run()\n```\n\n### Заключение\n\nКласс `WorkflowEngine` является центральным компонентом управления workflow-приложением. Он управляет состоянием приложения, взаимодействует с внешними сервисами и обеспечивает логику перехода между стадиями workflow при помощи встроенных хуков и решений переходов. Использование данного класса позволяет легко расширять функциональность путем регистрации дополнительных хуков и модификации стандартных потоков данных.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "WorkflowEngine" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091824/summary.md b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091824/summary.md new file mode 100644 index 0000000..992b1c9 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_091824/summary.md @@ -0,0 +1,24 @@ +# pipeline_setup_v2 summary + +Passed: 6/6 + + +| File | Case | Runner | Mode | Intent | Sub-intent | Pass | +| ----------------------------------- | -------------------------------------------- | ------- | ---------- | ------- | ---------- | ---- | +| full_chain_plba_code_retrieval.yaml | plba-fullchain-explain-runtime-manager | runtime | full_chain | CODE_QA | EXPLAIN | ✓ | +| full_chain_plba_code_retrieval.yaml | plba-fullchain-explain-http-control-channel | runtime | full_chain | CODE_QA | EXPLAIN | ✓ | +| full_chain_plba_code_retrieval.yaml | plba-fullchain-explain-control-plane-service | runtime | full_chain | CODE_QA | EXPLAIN | ✓ | +| full_chain_plba_code_retrieval.yaml | plba-fullchain-explain-trace-service | runtime | full_chain | CODE_QA | EXPLAIN | ✓ | +| full_chain_plba_code_retrieval.yaml | plba-fullchain-explain-create-runtime | runtime | full_chain | CODE_QA | EXPLAIN | ✓ | +| full_chain_plba_code_retrieval.yaml | plba-fullchain-explain-workflow-engine | runtime | full_chain | CODE_QA | EXPLAIN | ✓ | + + +## LLM Answers + +- **plba-fullchain-explain-runtime-manager**: ## Анализ класса `RuntimeManager` ### 1. Общая информация о классе Класс `RuntimeManager` находится в файле `src/app_runtime/core/runtime.py`. Его роль обозначена как **pipeline_stage**, что указывает на его участие в потоке выполнения программы. ### 2. Ответственность (`Responsibilities`) Документация описывает следующие обязанности класса: - **manager**: предполагает управление другими сущностями или ресурсами; - **orchestrates role-like calls (4)**: означает координацию вызовов различных ролей или этапов; - **reads and writes state attributes**: указывает на возможность чтения и записи атрибутов состояния системы; - **participates in dataflow slices (50)**: свидетельствует об участии в разделении потоков данных. Эти обязанности отражают высокоуровневую роль управления состоянием и потоком выполнения приложения. ### 3. Поток данных и взаимодействие с другими компон… +- **plba-fullchain-explain-http-control-channel**: ## Анализ класса `HttpControlChannel` ### Файл и путь: - **Файл:** `src/app_runtime/control/http_channel.py` - **Класс:** `HttpControlChannel` ### Описание роли и ответственности: - **Роль:** `pipeline_stage` - **Ответственности:** - Чтение и запись атрибутов состояния (`reads and writes state attributes`). - Участие в "слайсах" данных потока (`participates in dataflow slices`). - В документации указано участие в 10 слайсах данных. ### Родительский класс: - Наследуется от класса `ControlChannel`, объявленного в файле `src/app_runtime/control/base.py`. ### Подразумеваемая архитектура и поток данных: 1. **Родительская сущность** (`ControlChannel`) является базовой моделью для каналов управления, определяющей основные обязанности модели. - Пример: Класс может иметь стандартный набор методов или атрибутов, которые наследуются всеми дочерними сущностями. 2. **Дочерний кла… +- **plba-fullchain-explain-control-plane-service**: ## Анализ класса `ControlPlaneService` ### Обзор контекста В рамках данного контекста обсуждаются несколько сущностей и их роли в системе обработки запросов и управления состоянием: - `**ControlPlaneService`**: Основной объект, рассматриваемый в вопросе. - `**ControlChannel**`: Базовый интерфейс для моделей или каналов взаимодействия. - `**ControlActionSet**`: Набор действий, выполняемых моделью. - `**UvicornThreadRunner**`: Класс, отвечающий за запуск HTTP-сервера с использованием библиотеки uvicorn в отдельном потоке. - `**HttpControlChannel**`: Канал контроля на основе HTTP, который также участвует в обработке состояния и данных потока. Все перечисленные классы являются частью модуля `src/app_runtime/control`, что указывает на их связь с управлением данными и обработкой состояний в приложении. ### Описание поведения и архитектуры **Класс `ControlPlaneService`:** Э… +- **plba-fullchain-explain-trace-service**: ## Анализ архитектуры и поведения `TraceService` ### Описание класса `TraceService` Класс `TraceService` определен в файле `src/app_runtime/tracing/service.py`. Этот класс является наследником абстрактного базового класса `TraceContextFactory`, что указывает на его ключевую роль в создании контекста трассировки (`trace context`) для последующих вызовов API или логики приложения. #### Обязанности класса: - Обладает именем с суффиксом "service", указывающим на его сервисную природу. - Оперирует состоянием атрибутов через чтение и запись их значений. - Участвует в передаче данных между различными этапами обработки ("dataflow slices"). #### Поведение метода `_create_trace_context` Метод `_create_trace_context` создает новый контекст трассировки, который используется для отслеживания выполнения различных этапов программы. Контекст трассировки включает информацию о текущей… +- **plba-fullchain-explain-create-runtime**: ## Анализ функции `create_runtime` и архитектуры приложения ### Описание задачи Функция `create_runtime` отвечает за инициализацию и настройку runtime окружения для приложения. Она является ключевым компонентом начальной загрузки системы и участвует в формировании конфигурации и окружения для дальнейшей работы. ### Поток данных и архитектура Архитектура приложения организована вокруг нескольких компонентов, которые взаимодействуют между собой через определенные роли (`pipeline_stage`) и участвуют в различных фазах жизненного цикла приложения: 1. **ConfigFileLoader** - Роль: pipeline_stage - Ответственность: чтение и запись состояния атрибутов; участие в данных потока (dataflow slice 8) Этот компонент загружает конфигурацию из файла, что позволяет системе настраиваться на основе внешних параметров. 2. **WorkflowPersistence** - Роль: pipeline_stage - Ответственность: о… +- **plba-fullchain-explain-workflow-engine**: ## Анализ архитектуры и поведения класса `WorkflowEngine` ### 1. Описание файла и роли классов #### Файл: `src/app_runtime/workflow/engine/workflow_engine.py` В данном файле находится определение класса `**WorkflowEngine`**, который играет ключевую роль в управлении workflow-приложением. ### 2. Структура класса `WorkflowEngine` `python class WorkflowEngine: # Конструктор класса с инициализацией атрибутов def __init__(self): self._hooks = WorkflowEngineHooks() self.transition_resolver = TransitionResolver() # Метод для запуска workflow async def run(self): pass # Метод для добавления новых хуков def add_hooks(self, hooks): self._hooks.add(hooks)` ### 3. Ответственность и взаимодействие **Ответственности (`Responsibilities`) класса:** - Чтение и запись состояния атрибутов - Участие в потоках данных (dataflow slices) **Роль класса (`role`):** - pipeline_stage **Свя… + diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_112158/full_chain_plba_code_retrieval_plba-fullchain-explain-control-plane-service.json b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_112158/full_chain_plba_code_retrieval_plba-fullchain-explain-control-plane-service.json new file mode 100644 index 0000000..eaf333b --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_112158/full_chain_plba_code_retrieval_plba-fullchain-explain-control-plane-service.json @@ -0,0 +1,2056 @@ +{ + "case_id": "plba-fullchain-explain-control-plane-service", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_retrieval.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 12, + "llm_answer": "## Назначение\n\n`ControlPlaneService` — это сущность, отвечающая за управление каналами (`ControlChannel`) и координацию действий по запуску и остановке различных компонентов системы. Этот сервис играет роль `pipeline_stage`, что указывает на его участие в конвейере обработки данных или управлении состоянием приложения.\n\n## Ключевые зависимости\n\n### Файлы и сущности\n- **src/app_runtime/control/service.py**: местоположение определения класса `ControlPlaneService`.\n- Используется библиотека **asyncio** для асинхронного выполнения задач.\n\n### Внешние зависимости\n- `RuntimeManager`: менеджер управления рабочим окружением и состоянием приложения.\n- `ControlChannel`: каналы взаимодействия с внешними компонентами или службами.\n- `ControlActionSet`: набор действий, которые могут быть выполнены при старте или останове сервиса.\n\n## Поток данных или вызовов\n\n1. **Инициализация и регистрация каналов**\n - Конструктор `__init__` инициализирует пустой список `_channels` и создаёт пустую коллекцию каналов.\n - Метод `register_channel` добавляет новый канал в список.\n \n2. **Запуск сервиса**\n - Метод `start` проверяет наличие зарегистрированных каналов и вызывает асинхронную функцию `_start_async`.\n - Внутри `_start_async` выполняется выполнение действий через объект `ControlActionSet`. Эти действия включают старт и останов рабочих процессов, проверку текущего состояния здоровья (`health_status`), а также запуск самого рабочего окружения (`start_runtime`).\n\n3. **Остановка сервиса**\n - Метод `stop` аналогично проверяет наличие каналов и вызывает асинхронную функцию `_stop_async`, которая выполняет очистку ресурсов и завершение работы всех каналов.\n\n4. **Создание снимка состояния**\n - Метод `snapshot` собирает информацию о текущем состоянии приложения, включая рабочие процессы, модули, сервисы, состояние работников, текущее здоровье и конфигурационные параметры.\n\n## Важные детали реализации\n\n1. **Асинхронность операций**\n - Использование функций `asyncio.run()` внутри методов `_start_async` и `_stop_async` позволяет выполнять задачи асинхронно, что важно для высокопроизводительных систем.\n\n2. **Состояние и конфигурация**\n - Объект `RuntimeManager` хранит текущие данные о состоянии приложения и конфигурации, что используется для создания снимков состояния и проверки текущих статусов.\n\n3. **Сообщения об ошибках**\n - Если каналы отсутствуют, метод `start` и `stop` просто возвращают без выполнения каких-либо действий.\n\n## Осторожные выводы\n\nНа основании анализа структуры зависимостей и объявлений классов можно предположить, что данный сервис является частью более крупной архитектуры и взаимодействует с другими модулями, такими как HTTP API (`app.post`) и системой регистрации модулей и сервисов (`registry.modules`). Однако прямых доказательств этого нет, поэтому данный вывод считается осторожным.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "ControlPlaneService" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-fullchain-explain-control-plane-service", + "text": "Объясни класс ControlPlaneService", + "mode": "full_chain", + "run_started_at": "2026-03-12T11:21:59", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни класс ControlPlaneService", + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "ControlPlaneService", + "alternatives": [ + "ControlPlaneService" + ], + "confidence": 0.99 + }, + "rag_count": 12, + "rag_rows": [ + { + "path": "src/app_runtime/control/service.py", + "content": "class ControlPlaneService\nControlPlaneService", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "qname": "ControlPlaneService", + "kind": "class", + "signature": "ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.register_channel reads_attr self._channels.append", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.register_channel:reads_attr", + "span_start": 17, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "1ee5925deffdc38ba15b88bf7c89e5fcd1a78f493fe30f2deb827d714a1b18e8", + "edge_type": "reads_attr", + "src_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "src_qname": "ControlPlaneService.register_channel", + "dst_symbol_id": null, + "dst_ref": "self._channels.append", + "resolution": "partial", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "class ControlPlaneService:\n def __init__(self) -> None:\n self._channels: list[ControlChannel] = []\n\n def register_channel(self, channel: ControlChannel) -> None:\n self._channels.append(channel)\n\n def start(self, runtime: RuntimeManager) -> None:\n if not self._channels:\n return\n asyncio.run(self._start_async(runtime))\n\n def stop(self) -> None:\n if not self._channels:\n return\n asyncio.run(self._stop_async())\n\n def snapshot(self, runtime: RuntimeManager) -> dict[str, object]:\n health = runtime.current_health()\n return {\n \"runtime\": {\"state\": runtime._state.value},\n \"modules\": list(runtime.registry.modules),\n \"services\": runtime.services.snapshot(),\n \"workers\": runtime.workers.snapshot(),\n \"health\": runtime.health.snapshot(runtime.workers.healths()) | {\"status\": health[\"status\"]},\n \"config\": runtime.configuration.get(),\n }\n\n async def _start_async(self, runtime: RuntimeManager) -> None:\n actions = ControlActionSet(\n health=runtime.health_status,\n start=runtime.start_runtime,\n stop=runtime.stop_runtime,\n status=runtime.runtime_status,\n )\n for channel in self._channels:\n await channel.start(actions)\n\n async def _stop_async(self) -> None:\n for channel in reversed(self._channels):\n await channel.stop()", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/service.py:ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "## Назначение\n\n`ControlPlaneService` — это сущность, отвечающая за управление каналами (`ControlChannel`) и координацию действий по запуску и остановке различных компонентов системы. Этот сервис играет роль `pipeline_stage`, что указывает на его участие в конвейере обработки данных или управлении состоянием приложения.\n\n## Ключевые зависимости\n\n### Файлы и сущности\n- **src/app_runtime/control/service.py**: местоположение определения класса `ControlPlaneService`.\n- Используется библиотека **asyncio** для асинхронного выполнения задач.\n\n### Внешние зависимости\n- `RuntimeManager`: менеджер управления рабочим окружением и состоянием приложения.\n- `ControlChannel`: каналы взаимодействия с внешними компонентами или службами.\n- `ControlActionSet`: набор действий, которые могут быть выполнены при старте или останове сервиса.\n\n## Поток данных или вызовов\n\n1. **Инициализация и регистрация каналов**\n - Конструктор `__init__` инициализирует пустой список `_channels` и создаёт пустую коллекцию каналов.\n - Метод `register_channel` добавляет новый канал в список.\n \n2. **Запуск сервиса**\n - Метод `start` проверяет наличие зарегистрированных каналов и вызывает асинхронную функцию `_start_async`.\n - Внутри `_start_async` выполняется выполнение действий через объект `ControlActionSet`. Эти действия включают старт и останов рабочих процессов, проверку текущего состояния здоровья (`health_status`), а также запуск самого рабочего окружения (`start_runtime`).\n\n3. **Остановка сервиса**\n - Метод `stop` аналогично проверяет наличие каналов и вызывает асинхронную функцию `_stop_async`, которая выполняет очистку ресурсов и завершение работы всех каналов.\n\n4. **Создание снимка состояния**\n - Метод `snapshot` собирает информацию о текущем состоянии приложения, включая рабочие процессы, модули, сервисы, состояние работников, текущее здоровье и конфигурационные параметры.\n\n## Важные детали реализации\n\n1. **Асинхронность операций**\n - Использование функций `asyncio.run()` внутри методов `_start_async` и `_stop_async` позволяет выполнять задачи асинхронно, что важно для высокопроизводительных систем.\n\n2. **Состояние и конфигурация**\n - Объект `RuntimeManager` хранит текущие данные о состоянии приложения и конфигурации, что используется для создания снимков состояния и проверки текущих статусов.\n\n3. **Сообщения об ошибках**\n - Если каналы отсутствуют, метод `start` и `stop` просто возвращают без выполнения каких-либо действий.\n\n## Осторожные выводы\n\nНа основании анализа структуры зависимостей и объявлений классов можно предположить, что данный сервис является частью более крупной архитектуры и взаимодействует с другими модулями, такими как HTTP API (`app.post`) и системой регистрации модулей и сервисов (`registry.modules`). Однако прямых доказательств этого нет, поэтому данный вывод считается осторожным.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS", + "C4_SEMANTIC_ROLES" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "ControlPlaneService" + ], + "keyword_hints": [ + "ControlPlaneService" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "ControlPlaneService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "ControlPlaneService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "ControlPlaneService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "ControlPlaneService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "ControlPlaneService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "ControlPlaneService", + "alternatives": [ + "ControlPlaneService" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 1, + "symbol_resolution": 0, + "retrieval_total": 170, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 58, + "C0_SOURCE_CHUNKS": 22, + "C4_SEMANTIC_ROLES": 18, + "C2_DEPENDENCY_GRAPH": 58, + "C3_ENTRYPOINTS": 12 + }, + "merge_rank": 25, + "prompt_build": 0, + "llm_call": 4134 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 797, + "evidence_rows": 12, + "evidence_chars": 2301 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 1 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_explain_ru_v1", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "ControlPlaneService" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 12, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-fullchain-explain-control-plane-service", + "mode": "full_chain", + "run_started_at": "2026-03-12T11:21:59", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Объясни класс ControlPlaneService", + "normalized_query": "Объясни класс ControlPlaneService" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Объясни класс ControlPlaneService" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни класс ControlPlaneService" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "ControlPlaneService" + ], + "keyword_hints": [ + "ControlPlaneService" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 1 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Объясни класс ControlPlaneService" + }, + "output": { + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "ControlPlaneService", + "alternatives": [ + "ControlPlaneService" + ], + "confidence": 0.99 + }, + "rag_count": 12, + "rag_rows": [ + { + "path": "src/app_runtime/control/service.py", + "content": "class ControlPlaneService\nControlPlaneService", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "qname": "ControlPlaneService", + "kind": "class", + "signature": "ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.register_channel reads_attr self._channels.append", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.register_channel:reads_attr", + "span_start": 17, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "1ee5925deffdc38ba15b88bf7c89e5fcd1a78f493fe30f2deb827d714a1b18e8", + "edge_type": "reads_attr", + "src_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "src_qname": "ControlPlaneService.register_channel", + "dst_symbol_id": null, + "dst_ref": "self._channels.append", + "resolution": "partial", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "class ControlPlaneService:\n def __init__(self) -> None:\n self._channels: list[ControlChannel] = []\n\n def register_channel(self, channel: ControlChannel) -> None:\n self._channels.append(channel)\n\n def start(self, runtime: RuntimeManager) -> None:\n if not self._channels:\n return\n asyncio.run(self._start_async(runtime))\n\n def stop(self) -> None:\n if not self._channels:\n return\n asyncio.run(self._stop_async())\n\n def snapshot(self, runtime: RuntimeManager) -> dict[str, object]:\n health = runtime.current_health()\n return {\n \"runtime\": {\"state\": runtime._state.value},\n \"modules\": list(runtime.registry.modules),\n \"services\": runtime.services.snapshot(),\n \"workers\": runtime.workers.snapshot(),\n \"health\": runtime.health.snapshot(runtime.workers.healths()) | {\"status\": health[\"status\"]},\n \"config\": runtime.configuration.get(),\n }\n\n async def _start_async(self, runtime: RuntimeManager) -> None:\n actions = ControlActionSet(\n health=runtime.health_status,\n start=runtime.start_runtime,\n stop=runtime.stop_runtime,\n status=runtime.runtime_status,\n )\n for channel in self._channels:\n await channel.start(actions)\n\n async def _stop_async(self) -> None:\n for channel in reversed(self._channels):\n await channel.stop()", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/service.py:ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "ControlPlaneService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "ControlPlaneService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "ControlPlaneService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "ControlPlaneService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "ControlPlaneService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "ControlPlaneService", + "alternatives": [ + "ControlPlaneService" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 170, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 58, + "C0_SOURCE_CHUNKS": 22, + "C4_SEMANTIC_ROLES": 18, + "C2_DEPENDENCY_GRAPH": 58, + "C3_ENTRYPOINTS": 12 + }, + "merge_rank": 25 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Объясни класс ControlPlaneService", + "rag_count": 12 + }, + "output": { + "llm_answer": "## Назначение\n\n`ControlPlaneService` — это сущность, отвечающая за управление каналами (`ControlChannel`) и координацию действий по запуску и остановке различных компонентов системы. Этот сервис играет роль `pipeline_stage`, что указывает на его участие в конвейере обработки данных или управлении состоянием приложения.\n\n## Ключевые зависимости\n\n### Файлы и сущности\n- **src/app_runtime/control/service.py**: местоположение определения класса `ControlPlaneService`.\n- Используется библиотека **asyncio** для асинхронного выполнения задач.\n\n### Внешние зависимости\n- `RuntimeManager`: менеджер управления рабочим окружением и состоянием приложения.\n- `ControlChannel`: каналы взаимодействия с внешними компонентами или службами.\n- `ControlActionSet`: набор действий, которые могут быть выполнены при старте или останове сервиса.\n\n## Поток данных или вызовов\n\n1. **Инициализация и регистрация каналов**\n - Конструктор `__init__` инициализирует пустой список `_channels` и создаёт пустую коллекцию каналов.\n - Метод `register_channel` добавляет новый канал в список.\n \n2. **Запуск сервиса**\n - Метод `start` проверяет наличие зарегистрированных каналов и вызывает асинхронную функцию `_start_async`.\n - Внутри `_start_async` выполняется выполнение действий через объект `ControlActionSet`. Эти действия включают старт и останов рабочих процессов, проверку текущего состояния здоровья (`health_status`), а также запуск самого рабочего окружения (`start_runtime`).\n\n3. **Остановка сервиса**\n - Метод `stop` аналогично проверяет наличие каналов и вызывает асинхронную функцию `_stop_async`, которая выполняет очистку ресурсов и завершение работы всех каналов.\n\n4. **Создание снимка состояния**\n - Метод `snapshot` собирает информацию о текущем состоянии приложения, включая рабочие процессы, модули, сервисы, состояние работников, текущее здоровье и конфигурационные параметры.\n\n## Важные детали реализации\n\n1. **Асинхронность операций**\n - Использование функций `asyncio.run()` внутри методов `_start_async` и `_stop_async` позволяет выполнять задачи асинхронно, что важно для высокопроизводительных систем.\n\n2. **Состояние и конфигурация**\n - Объект `RuntimeManager` хранит текущие данные о состоянии приложения и конфигурации, что используется для создания снимков состояния и проверки текущих статусов.\n\n3. **Сообщения об ошибках**\n - Если каналы отсутствуют, метод `start` и `stop` просто возвращают без выполнения каких-либо действий.\n\n## Осторожные выводы\n\nНа основании анализа структуры зависимостей и объявлений классов можно предположить, что данный сервис является частью более крупной архитектуры и взаимодействует с другими модулями, такими как HTTP API (`app.post`) и системой регистрации модулей и сервисов (`registry.modules`). Однако прямых доказательств этого нет, поэтому данный вывод считается осторожным." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 797, + "evidence_rows": 12, + "evidence_chars": 2301 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 1 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_explain_ru_v1", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 4134 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_112158/full_chain_plba_code_retrieval_plba-fullchain-explain-control-plane-service.md b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_112158/full_chain_plba_code_retrieval_plba-fullchain-explain-control-plane-service.md new file mode 100644 index 0000000..089ab0f --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_112158/full_chain_plba_code_retrieval_plba-fullchain-explain-control-plane-service.md @@ -0,0 +1,34 @@ +# plba-fullchain-explain-control-plane-service + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_retrieval.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Объясни класс ControlPlaneService + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 12, + "llm_answer": "## Назначение\n\n`ControlPlaneService` — это сущность, отвечающая за управление каналами (`ControlChannel`) и координацию действий по запуску и остановке различных компонентов системы. Этот сервис играет роль `pipeline_stage`, что указывает на его участие в конвейере обработки данных или управлении состоянием приложения.\n\n## Ключевые зависимости\n\n### Файлы и сущности\n- **src/app_runtime/control/service.py**: местоположение определения класса `ControlPlaneService`.\n- Используется библиотека **asyncio** для асинхронного выполнения задач.\n\n### Внешние зависимости\n- `RuntimeManager`: менеджер управления рабочим окружением и состоянием приложения.\n- `ControlChannel`: каналы взаимодействия с внешними компонентами или службами.\n- `ControlActionSet`: набор действий, которые могут быть выполнены при старте или останове сервиса.\n\n## Поток данных или вызовов\n\n1. **Инициализация и регистрация каналов**\n - Конструктор `__init__` инициализирует пустой список `_channels` и создаёт пустую коллекцию каналов.\n - Метод `register_channel` добавляет новый канал в список.\n \n2. **Запуск сервиса**\n - Метод `start` проверяет наличие зарегистрированных каналов и вызывает асинхронную функцию `_start_async`.\n - Внутри `_start_async` выполняется выполнение действий через объект `ControlActionSet`. Эти действия включают старт и останов рабочих процессов, проверку текущего состояния здоровья (`health_status`), а также запуск самого рабочего окружения (`start_runtime`).\n\n3. **Остановка сервиса**\n - Метод `stop` аналогично проверяет наличие каналов и вызывает асинхронную функцию `_stop_async`, которая выполняет очистку ресурсов и завершение работы всех каналов.\n\n4. **Создание снимка состояния**\n - Метод `snapshot` собирает информацию о текущем состоянии приложения, включая рабочие процессы, модули, сервисы, состояние работников, текущее здоровье и конфигурационные параметры.\n\n## Важные детали реализации\n\n1. **Асинхронность операций**\n - Использование функций `asyncio.run()` внутри методов `_start_async` и `_stop_async` позволяет выполнять задачи асинхронно, что важно для высокопроизводительных систем.\n\n2. **Состояние и конфигурация**\n - Объект `RuntimeManager` хранит текущие данные о состоянии приложения и конфигурации, что используется для создания снимков состояния и проверки текущих статусов.\n\n3. **Сообщения об ошибках**\n - Если каналы отсутствуют, метод `start` и `stop` просто возвращают без выполнения каких-либо действий.\n\n## Осторожные выводы\n\nНа основании анализа структуры зависимостей и объявлений классов можно предположить, что данный сервис является частью более крупной архитектуры и взаимодействует с другими модулями, такими как HTTP API (`app.post`) и системой регистрации модулей и сервисов (`registry.modules`). Однако прямых доказательств этого нет, поэтому данный вывод считается осторожным.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "ControlPlaneService" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_112158/full_chain_plba_code_retrieval_plba-fullchain-explain-create-runtime.json b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_112158/full_chain_plba_code_retrieval_plba-fullchain-explain-create-runtime.json new file mode 100644 index 0000000..c8018c3 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_112158/full_chain_plba_code_retrieval_plba-fullchain-explain-create-runtime.json @@ -0,0 +1,1896 @@ +{ + "case_id": "plba-fullchain-explain-create-runtime", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_retrieval.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 12, + "llm_answer": "## Объяснение функции `create_runtime`\n\n### Назначение\nФункция `create_runtime` предназначена для инициализации и настройки окружения выполнения приложения (`runtime`), используя параметры конфигурации и дополнительные опции управления HTTP-интерфейсом.\n\n### Ключевые зависимости\nФункция зависит от следующих компонентов и библиотек:\n- **`RuntimeManager`** — главный менеджер окружения выполнения, регистрирующий модули и настраивающий каналы управления.\n- **`ApplicationModule`** — модуль приложения, подлежащий регистрации в менеджере среды выполнения.\n- **`HttpControlChannel`** — канал управления, обеспечивающий взаимодействие с внешним интерфейсом через HTTP.\n\n### Поток данных или вызовов\n1. Создаётся экземпляр менеджера окружения выполнения (`RuntimeManager`) и передаётся в возвращаемое значение.\n2. Если указан путь к файлу конфигурации (`config_path`), файл добавляется в конфигурацию среды выполнения.\n3. Если включён режим управления HTTP-интерфейсом (`enable_http_control`), создаётся объект канала управления (`HttpControlChannel`) и регистрируется в среде выполнения.\n4. Модуль приложения (`module`) регистрируется в менеджере окружения выполнения.\n\n### Важные детали реализации\n1. **Параметры функции:**\n - `module`: обязательный аргумент типа `ApplicationModule`, представляющий приложение.\n - `config_path`: необязательный параметр строки, задающий путь к файлу конфигурации.\n - `enable_http_control`: логический флаг, включающий управление HTTP-интерфейсом.\n - `control_host`, `control_port`, `control_timeout`: параметры, определяющие настройки HTTP-канала управления.\n \n2. **Ключевая логика:**\n - В начале создается пустой менеджер окружения выполнения (`RuntimeManager()`).\n - Далее происходит проверка наличия файла конфигурации и его добавление в конфигурацию среды выполнения.\n - При необходимости включается поддержка HTTP-интерфейса и регистрируется соответствующий канал управления.\n - Регистрируется указанный модуль приложения.\n\n3. **Примечания:**\n - Использование параметра `config_path` позволяет гибко загружать внешние конфигурации среды выполнения.\n - Наличие флага `enable_http_control` предоставляет возможность удалённого доступа и управления приложением через HTTP.\n\n---\n\n## Финальное объяснение пользователю\n\nФункция `create_runtime` выполняет инициализацию и настройку окружения выполнения приложения (`runtime`). Она принимает модуль приложения (`ApplicationModule`) и дополнительные параметры конфигурации и управления HTTP-интерфейсом. Если задан путь к файлу конфигурации, он добавляется в конфигурацию среды выполнения. Дополнительно при включении режима управления HTTP создаются и регистрируются соответствующие каналы управления. Важно отметить, что функция возвращает созданный менеджер окружения выполнения, который далее может использоваться для дальнейшей работы с приложением. \n\nЭтот процесс основан на использовании внутренних классов и объектов библиотеки, таких как `RuntimeManager`, `HttpControlChannel`. Логика создания и регистрации элементов четко определена и документирована в исходном коде модуля `bootstrap.py`. \n\nТаким образом, данная функция является ключевым элементом начальной настройки и инициализации системы исполнения приложений.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "create_runtime" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-fullchain-explain-create-runtime", + "text": "Объясни функцию create_runtime", + "mode": "full_chain", + "run_started_at": "2026-03-12T11:21:59", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни функцию create_runtime", + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "create_runtime", + "alternatives": [ + "create_runtime" + ], + "confidence": 0.99 + }, + "rag_count": 12, + "rag_rows": [ + { + "path": "src/plba/bootstrap.py", + "content": "function create_runtime\ncreate_runtime(module)", + "layer": "C1_SYMBOL_CATALOG", + "title": "create_runtime", + "span_start": 8, + "span_end": 29, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "qname": "create_runtime", + "kind": "function", + "signature": "create_runtime(module)", + "parent_symbol_id": null, + "package_or_module": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime calls runtime.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:calls", + "span_start": 19, + "span_end": 19, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "4eaeec4ac55a59d5f66fd01c4754955f8fedaf4bc3df13fa769b352c7bfaacbb", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.add_config_file", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime reads_attr runtime.register_module", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:reads_attr", + "span_start": 28, + "span_end": 28, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "45516c79ff358dbf9b650a081668df0f66d2fe989300f985a1a78be6be166f8f", + "edge_type": "reads_attr", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.register_module", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:instantiates", + "span_start": 17, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "0adba17984f850ea1608c9e734d2dd5c325cfde3a8133123aa239e44935ad18e", + "edge_type": "instantiates", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": "27158ca220022eeb5083c6addf8a50775d45f7161284fd60aac48410105f4b98", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime calls runtime.register_module", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:calls", + "span_start": 28, + "span_end": 28, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "ab6003c3441addc1ba1b81edeca009165559f652f6b2cf424e5ae61b1f617de8", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.register_module", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime calls runtime.control_plane.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:calls", + "span_start": 21, + "span_end": 27, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "2678250030b9ce47a3b3b55fac7897ac530367edc8374ac9d5e6ecafb1e483f0", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.control_plane.register_channel", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime reads_attr runtime.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:reads_attr", + "span_start": 19, + "span_end": 19, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "30d4e8aae984ab84d523e80d02f1caeda52d547fa3d2aa47be8845931cabbca2", + "edge_type": "reads_attr", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.add_config_file", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "def create_runtime(\n module: ApplicationModule,\n *,\n config_path: str | None = None,\n enable_http_control: bool = False,\n control_host: str = \"127.0.0.1\",\n control_port: int = 8080,\n control_timeout: int = 5,\n) -> RuntimeManager:\n runtime = RuntimeManager()\n if config_path is not None:\n runtime.add_config_file(config_path)\n if enable_http_control:\n runtime.control_plane.register_channel(\n HttpControlChannel(\n host=control_host,\n port=control_port,\n timeout=control_timeout,\n )\n )\n runtime.register_module(module)\n return runtime", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/bootstrap.py:create_runtime", + "span_start": 8, + "span_end": 29, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "## Объяснение функции `create_runtime`\n\n### Назначение\nФункция `create_runtime` предназначена для инициализации и настройки окружения выполнения приложения (`runtime`), используя параметры конфигурации и дополнительные опции управления HTTP-интерфейсом.\n\n### Ключевые зависимости\nФункция зависит от следующих компонентов и библиотек:\n- **`RuntimeManager`** — главный менеджер окружения выполнения, регистрирующий модули и настраивающий каналы управления.\n- **`ApplicationModule`** — модуль приложения, подлежащий регистрации в менеджере среды выполнения.\n- **`HttpControlChannel`** — канал управления, обеспечивающий взаимодействие с внешним интерфейсом через HTTP.\n\n### Поток данных или вызовов\n1. Создаётся экземпляр менеджера окружения выполнения (`RuntimeManager`) и передаётся в возвращаемое значение.\n2. Если указан путь к файлу конфигурации (`config_path`), файл добавляется в конфигурацию среды выполнения.\n3. Если включён режим управления HTTP-интерфейсом (`enable_http_control`), создаётся объект канала управления (`HttpControlChannel`) и регистрируется в среде выполнения.\n4. Модуль приложения (`module`) регистрируется в менеджере окружения выполнения.\n\n### Важные детали реализации\n1. **Параметры функции:**\n - `module`: обязательный аргумент типа `ApplicationModule`, представляющий приложение.\n - `config_path`: необязательный параметр строки, задающий путь к файлу конфигурации.\n - `enable_http_control`: логический флаг, включающий управление HTTP-интерфейсом.\n - `control_host`, `control_port`, `control_timeout`: параметры, определяющие настройки HTTP-канала управления.\n \n2. **Ключевая логика:**\n - В начале создается пустой менеджер окружения выполнения (`RuntimeManager()`).\n - Далее происходит проверка наличия файла конфигурации и его добавление в конфигурацию среды выполнения.\n - При необходимости включается поддержка HTTP-интерфейса и регистрируется соответствующий канал управления.\n - Регистрируется указанный модуль приложения.\n\n3. **Примечания:**\n - Использование параметра `config_path` позволяет гибко загружать внешние конфигурации среды выполнения.\n - Наличие флага `enable_http_control` предоставляет возможность удалённого доступа и управления приложением через HTTP.\n\n---\n\n## Финальное объяснение пользователю\n\nФункция `create_runtime` выполняет инициализацию и настройку окружения выполнения приложения (`runtime`). Она принимает модуль приложения (`ApplicationModule`) и дополнительные параметры конфигурации и управления HTTP-интерфейсом. Если задан путь к файлу конфигурации, он добавляется в конфигурацию среды выполнения. Дополнительно при включении режима управления HTTP создаются и регистрируются соответствующие каналы управления. Важно отметить, что функция возвращает созданный менеджер окружения выполнения, который далее может использоваться для дальнейшей работы с приложением. \n\nЭтот процесс основан на использовании внутренних классов и объектов библиотеки, таких как `RuntimeManager`, `HttpControlChannel`. Логика создания и регистрации элементов четко определена и документирована в исходном коде модуля `bootstrap.py`. \n\nТаким образом, данная функция является ключевым элементом начальной настройки и инициализации системы исполнения приложений.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS", + "C4_SEMANTIC_ROLES" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "function", + "symbol_candidates": [ + "create_runtime" + ], + "keyword_hints": [ + "create_runtime" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "create_runtime", + "alternatives": [ + "create_runtime" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 114, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 32, + "C0_SOURCE_CHUNKS": 13, + "C4_SEMANTIC_ROLES": 12, + "C2_DEPENDENCY_GRAPH": 45, + "C3_ENTRYPOINTS": 11 + }, + "merge_rank": 17, + "prompt_build": 0, + "llm_call": 4283 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 601, + "evidence_rows": 12, + "evidence_chars": 1184 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 1 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_explain_ru_v1", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "create_runtime" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 12, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-fullchain-explain-create-runtime", + "mode": "full_chain", + "run_started_at": "2026-03-12T11:21:59", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Объясни функцию create_runtime", + "normalized_query": "Объясни функцию create_runtime" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Объясни функцию create_runtime" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни функцию create_runtime" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "function", + "symbol_candidates": [ + "create_runtime" + ], + "keyword_hints": [ + "create_runtime" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Объясни функцию create_runtime" + }, + "output": { + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "create_runtime", + "alternatives": [ + "create_runtime" + ], + "confidence": 0.99 + }, + "rag_count": 12, + "rag_rows": [ + { + "path": "src/plba/bootstrap.py", + "content": "function create_runtime\ncreate_runtime(module)", + "layer": "C1_SYMBOL_CATALOG", + "title": "create_runtime", + "span_start": 8, + "span_end": 29, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "qname": "create_runtime", + "kind": "function", + "signature": "create_runtime(module)", + "parent_symbol_id": null, + "package_or_module": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime calls runtime.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:calls", + "span_start": 19, + "span_end": 19, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "4eaeec4ac55a59d5f66fd01c4754955f8fedaf4bc3df13fa769b352c7bfaacbb", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.add_config_file", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime reads_attr runtime.register_module", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:reads_attr", + "span_start": 28, + "span_end": 28, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "45516c79ff358dbf9b650a081668df0f66d2fe989300f985a1a78be6be166f8f", + "edge_type": "reads_attr", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.register_module", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:instantiates", + "span_start": 17, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "0adba17984f850ea1608c9e734d2dd5c325cfde3a8133123aa239e44935ad18e", + "edge_type": "instantiates", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": "27158ca220022eeb5083c6addf8a50775d45f7161284fd60aac48410105f4b98", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime calls runtime.register_module", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:calls", + "span_start": 28, + "span_end": 28, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "ab6003c3441addc1ba1b81edeca009165559f652f6b2cf424e5ae61b1f617de8", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.register_module", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime calls runtime.control_plane.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:calls", + "span_start": 21, + "span_end": 27, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "2678250030b9ce47a3b3b55fac7897ac530367edc8374ac9d5e6ecafb1e483f0", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.control_plane.register_channel", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime reads_attr runtime.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:reads_attr", + "span_start": 19, + "span_end": 19, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "30d4e8aae984ab84d523e80d02f1caeda52d547fa3d2aa47be8845931cabbca2", + "edge_type": "reads_attr", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.add_config_file", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "def create_runtime(\n module: ApplicationModule,\n *,\n config_path: str | None = None,\n enable_http_control: bool = False,\n control_host: str = \"127.0.0.1\",\n control_port: int = 8080,\n control_timeout: int = 5,\n) -> RuntimeManager:\n runtime = RuntimeManager()\n if config_path is not None:\n runtime.add_config_file(config_path)\n if enable_http_control:\n runtime.control_plane.register_channel(\n HttpControlChannel(\n host=control_host,\n port=control_port,\n timeout=control_timeout,\n )\n )\n runtime.register_module(module)\n return runtime", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/bootstrap.py:create_runtime", + "span_start": 8, + "span_end": 29, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "create_runtime", + "alternatives": [ + "create_runtime" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 114, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 32, + "C0_SOURCE_CHUNKS": 13, + "C4_SEMANTIC_ROLES": 12, + "C2_DEPENDENCY_GRAPH": 45, + "C3_ENTRYPOINTS": 11 + }, + "merge_rank": 17 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Объясни функцию create_runtime", + "rag_count": 12 + }, + "output": { + "llm_answer": "## Объяснение функции `create_runtime`\n\n### Назначение\nФункция `create_runtime` предназначена для инициализации и настройки окружения выполнения приложения (`runtime`), используя параметры конфигурации и дополнительные опции управления HTTP-интерфейсом.\n\n### Ключевые зависимости\nФункция зависит от следующих компонентов и библиотек:\n- **`RuntimeManager`** — главный менеджер окружения выполнения, регистрирующий модули и настраивающий каналы управления.\n- **`ApplicationModule`** — модуль приложения, подлежащий регистрации в менеджере среды выполнения.\n- **`HttpControlChannel`** — канал управления, обеспечивающий взаимодействие с внешним интерфейсом через HTTP.\n\n### Поток данных или вызовов\n1. Создаётся экземпляр менеджера окружения выполнения (`RuntimeManager`) и передаётся в возвращаемое значение.\n2. Если указан путь к файлу конфигурации (`config_path`), файл добавляется в конфигурацию среды выполнения.\n3. Если включён режим управления HTTP-интерфейсом (`enable_http_control`), создаётся объект канала управления (`HttpControlChannel`) и регистрируется в среде выполнения.\n4. Модуль приложения (`module`) регистрируется в менеджере окружения выполнения.\n\n### Важные детали реализации\n1. **Параметры функции:**\n - `module`: обязательный аргумент типа `ApplicationModule`, представляющий приложение.\n - `config_path`: необязательный параметр строки, задающий путь к файлу конфигурации.\n - `enable_http_control`: логический флаг, включающий управление HTTP-интерфейсом.\n - `control_host`, `control_port`, `control_timeout`: параметры, определяющие настройки HTTP-канала управления.\n \n2. **Ключевая логика:**\n - В начале создается пустой менеджер окружения выполнения (`RuntimeManager()`).\n - Далее происходит проверка наличия файла конфигурации и его добавление в конфигурацию среды выполнения.\n - При необходимости включается поддержка HTTP-интерфейса и регистрируется соответствующий канал управления.\n - Регистрируется указанный модуль приложения.\n\n3. **Примечания:**\n - Использование параметра `config_path` позволяет гибко загружать внешние конфигурации среды выполнения.\n - Наличие флага `enable_http_control` предоставляет возможность удалённого доступа и управления приложением через HTTP.\n\n---\n\n## Финальное объяснение пользователю\n\nФункция `create_runtime` выполняет инициализацию и настройку окружения выполнения приложения (`runtime`). Она принимает модуль приложения (`ApplicationModule`) и дополнительные параметры конфигурации и управления HTTP-интерфейсом. Если задан путь к файлу конфигурации, он добавляется в конфигурацию среды выполнения. Дополнительно при включении режима управления HTTP создаются и регистрируются соответствующие каналы управления. Важно отметить, что функция возвращает созданный менеджер окружения выполнения, который далее может использоваться для дальнейшей работы с приложением. \n\nЭтот процесс основан на использовании внутренних классов и объектов библиотеки, таких как `RuntimeManager`, `HttpControlChannel`. Логика создания и регистрации элементов четко определена и документирована в исходном коде модуля `bootstrap.py`. \n\nТаким образом, данная функция является ключевым элементом начальной настройки и инициализации системы исполнения приложений." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 601, + "evidence_rows": 12, + "evidence_chars": 1184 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 1 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_explain_ru_v1", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 4283 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_112158/full_chain_plba_code_retrieval_plba-fullchain-explain-create-runtime.md b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_112158/full_chain_plba_code_retrieval_plba-fullchain-explain-create-runtime.md new file mode 100644 index 0000000..0330caf --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_112158/full_chain_plba_code_retrieval_plba-fullchain-explain-create-runtime.md @@ -0,0 +1,34 @@ +# plba-fullchain-explain-create-runtime + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_retrieval.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Объясни функцию create_runtime + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 12, + "llm_answer": "## Объяснение функции `create_runtime`\n\n### Назначение\nФункция `create_runtime` предназначена для инициализации и настройки окружения выполнения приложения (`runtime`), используя параметры конфигурации и дополнительные опции управления HTTP-интерфейсом.\n\n### Ключевые зависимости\nФункция зависит от следующих компонентов и библиотек:\n- **`RuntimeManager`** — главный менеджер окружения выполнения, регистрирующий модули и настраивающий каналы управления.\n- **`ApplicationModule`** — модуль приложения, подлежащий регистрации в менеджере среды выполнения.\n- **`HttpControlChannel`** — канал управления, обеспечивающий взаимодействие с внешним интерфейсом через HTTP.\n\n### Поток данных или вызовов\n1. Создаётся экземпляр менеджера окружения выполнения (`RuntimeManager`) и передаётся в возвращаемое значение.\n2. Если указан путь к файлу конфигурации (`config_path`), файл добавляется в конфигурацию среды выполнения.\n3. Если включён режим управления HTTP-интерфейсом (`enable_http_control`), создаётся объект канала управления (`HttpControlChannel`) и регистрируется в среде выполнения.\n4. Модуль приложения (`module`) регистрируется в менеджере окружения выполнения.\n\n### Важные детали реализации\n1. **Параметры функции:**\n - `module`: обязательный аргумент типа `ApplicationModule`, представляющий приложение.\n - `config_path`: необязательный параметр строки, задающий путь к файлу конфигурации.\n - `enable_http_control`: логический флаг, включающий управление HTTP-интерфейсом.\n - `control_host`, `control_port`, `control_timeout`: параметры, определяющие настройки HTTP-канала управления.\n \n2. **Ключевая логика:**\n - В начале создается пустой менеджер окружения выполнения (`RuntimeManager()`).\n - Далее происходит проверка наличия файла конфигурации и его добавление в конфигурацию среды выполнения.\n - При необходимости включается поддержка HTTP-интерфейса и регистрируется соответствующий канал управления.\n - Регистрируется указанный модуль приложения.\n\n3. **Примечания:**\n - Использование параметра `config_path` позволяет гибко загружать внешние конфигурации среды выполнения.\n - Наличие флага `enable_http_control` предоставляет возможность удалённого доступа и управления приложением через HTTP.\n\n---\n\n## Финальное объяснение пользователю\n\nФункция `create_runtime` выполняет инициализацию и настройку окружения выполнения приложения (`runtime`). Она принимает модуль приложения (`ApplicationModule`) и дополнительные параметры конфигурации и управления HTTP-интерфейсом. Если задан путь к файлу конфигурации, он добавляется в конфигурацию среды выполнения. Дополнительно при включении режима управления HTTP создаются и регистрируются соответствующие каналы управления. Важно отметить, что функция возвращает созданный менеджер окружения выполнения, который далее может использоваться для дальнейшей работы с приложением. \n\nЭтот процесс основан на использовании внутренних классов и объектов библиотеки, таких как `RuntimeManager`, `HttpControlChannel`. Логика создания и регистрации элементов четко определена и документирована в исходном коде модуля `bootstrap.py`. \n\nТаким образом, данная функция является ключевым элементом начальной настройки и инициализации системы исполнения приложений.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "create_runtime" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_112158/full_chain_plba_code_retrieval_plba-fullchain-explain-http-control-channel.json b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_112158/full_chain_plba_code_retrieval_plba-fullchain-explain-http-control-channel.json new file mode 100644 index 0000000..51d6b21 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_112158/full_chain_plba_code_retrieval_plba-fullchain-explain-http-control-channel.json @@ -0,0 +1,2088 @@ +{ + "case_id": "plba-fullchain-explain-http-control-channel", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_retrieval.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 12, + "llm_answer": "## Объяснение работы класса `HttpControlChannel`\n\n### Назначение\nКласс `HttpControlChannel` является компонентом системы управления состоянием и взаимодействия с внешним миром через HTTP-протокол. Он реализует механизм обмена данными и состояниями между компонентами приложения через HTTP-запросы и ответы.\n\n### Ключевые зависимости\nКлючевыми зависимостями являются:\n- `UvicornThreadRunner`: используется для запуска асинхронного сервера на основе библиотеки Uvicorn.\n- `HttpControlAppFactory`: фабрика приложений, которая отвечает за создание экземпляров FastAPI приложения.\n- `ControlActionSet`: набор действий, связанных с управлением состоянием и поведением приложения.\n\n### Поток данных или вызовов\nПоток данных и вызовов выглядит следующим образом:\n1. **Инициализация (`__init__`)**:\n - При создании экземпляра класса задаются параметры хоста, порта и тайм-аута.\n - Создается объект `UvicornThreadRunner`, отвечающий за запуск асинхронного HTTP-сервера.\n - Создается экземпляр фабрики приложений `HttpControlAppFactory`.\n \n2. **Запуск (`start`)**:\n - Если заданы действия (`ControlActionSet`), создается экземпляр FastAPI приложения, включающего обработчики для health и action запросов.\n - Запускается сервер при помощи объекта `UvicornThreadRunner`.\n\n3. **Остановка (`stop`)**:\n - Остановка запущенного сервера при помощи метода `stop()` объекта `UvicornThreadRunner`.\n\n4. **Получение статуса порта (`port`)**:\n - Возвращает порт, на котором запущен сервер.\n\n5. **Health-запрос (`_health_response`)**:\n - Проверяет наличие настроенных действий и возвращает статус здоровья приложения.\n\n6. **Action-запрос (`_action_response`)**:\n - Обрабатывает запросы действий, проверяя их конфигурацию и возвращая соответствующий результат.\n\n### Важные детали реализации\n- **Таймаут (`_timeout`)**: устанавливается при инициализации и используется в методах проверки состояния здоровья и выполнения действий.\n- **Actions (`_actions`)**: набор доступных действий, определяющий функциональность приложения.\n- **FastAPI приложение**: строится динамически при каждом вызове метода `start`, что позволяет настраивать его под конкретные задачи.\n \n### Осторожные выводы\nНа основании текущего контекста сложно однозначно утверждать, какие именно данные передаются по HTTP-протоколу, так как контекст сигнализирует о возможности работы с различными типами данных, но детальной информации об этом нет.\n\n### Итоговое объяснение\nКласс `HttpControlChannel` предназначен для организации управления состоянием и взаимодействия с приложением через HTTP-интерфейс. Он использует библиотеку Uvicorn для создания асинхронного HTTP-сервера и FastAPI для построения прикладных сервисов. Класс управляет жизненным циклом сервера, отслеживает доступные действия и предоставляет методы для получения статуса здоровья и выполнения пользовательских операций.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "HttpControlChannel" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-fullchain-explain-http-control-channel", + "text": "Объясни класс HttpControlChannel", + "mode": "full_chain", + "run_started_at": "2026-03-12T11:21:59", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни класс HttpControlChannel", + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "HttpControlChannel", + "alternatives": [ + "HttpControlChannel" + ], + "confidence": 0.99 + }, + "rag_count": 12, + "rag_rows": [ + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel\nHttpControlChannel(ControlChannel)", + "layer": "C1_SYMBOL_CATALOG", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "qname": "HttpControlChannel", + "kind": "class", + "signature": "HttpControlChannel(ControlChannel)", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._runner\n -> HttpControlChannel.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 15, + "span_end": 22, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "51d73913df709152258ed1b9a8c8f4eb3c575eccfe6b982aef0b28e0789a29da", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0", + "dst_ref": "HttpControlChannel.start", + "resolution": "resolved", + "slice_id": "51d73913df709152258ed1b9a8c8f4eb3c575eccfe6b982aef0b28e0789a29da", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._runner", + "HttpControlChannel.start" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._runner\n -> HttpControlChannel.port", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 15, + "span_end": 29, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "c7167bab7218bb768ad7c11bfb40d1a3096e6071dd7817bba5fd864cf8f6de13", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "3632ce8227f4a31e0768f2fb021a4d1ba28e1202633aa0f2fac902295931280f", + "dst_ref": "HttpControlChannel.port", + "resolution": "resolved", + "slice_id": "c7167bab7218bb768ad7c11bfb40d1a3096e6071dd7817bba5fd864cf8f6de13", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._runner", + "HttpControlChannel.port" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "3632ce8227f4a31e0768f2fb021a4d1ba28e1202633aa0f2fac902295931280f" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._timeout\n -> HttpControlChannel._health_response", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 14, + "span_end": 34, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "f858f5c9e575f6c4cdfe3853571b7ee21d1f628a443541d2037c3dc9d0790bef", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "e84bf04e9cd2127df235b7064d05f47e19f19a89c7c82f4c247231d4e8fa426a", + "dst_ref": "HttpControlChannel._health_response", + "resolution": "resolved", + "slice_id": "f858f5c9e575f6c4cdfe3853571b7ee21d1f628a443541d2037c3dc9d0790bef", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._timeout", + "HttpControlChannel._health_response" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "e84bf04e9cd2127df235b7064d05f47e19f19a89c7c82f4c247231d4e8fa426a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._timeout\n -> HttpControlChannel._action_response", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "c3ef21fcae96c82c00be74b3ab827d4af2085d89cb3fa5521c19a174aad84dbb", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "e64969024ccaeb34d8d91473fad07b3b3d341875846392e7a006406c7ada1954", + "dst_ref": "HttpControlChannel._action_response", + "resolution": "resolved", + "slice_id": "c3ef21fcae96c82c00be74b3ab827d4af2085d89cb3fa5521c19a174aad84dbb", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._timeout", + "HttpControlChannel._action_response" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "e64969024ccaeb34d8d91473fad07b3b3d341875846392e7a006406c7ada1954" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._runner\n -> HttpControlChannel.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 15, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "0f827ef81a990258a8a74381c8564a8361afa6712dba3200592659c939adcb9d", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "f29ab212620093d72be20e26c5a399624c7939a6056a728762ed3f84a250bfa3", + "dst_ref": "HttpControlChannel.stop", + "resolution": "resolved", + "slice_id": "0f827ef81a990258a8a74381c8564a8361afa6712dba3200592659c939adcb9d", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._runner", + "HttpControlChannel.stop" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "f29ab212620093d72be20e26c5a399624c7939a6056a728762ed3f84a250bfa3" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._factory\n -> HttpControlChannel.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 16, + "span_end": 21, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e61ec25ded7dbe380d95ce2abcbc1d7a2d2afde5aa8453866df8706dfb7d6ddb", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0", + "dst_ref": "HttpControlChannel.start", + "resolution": "resolved", + "slice_id": "e61ec25ded7dbe380d95ce2abcbc1d7a2d2afde5aa8453866df8706dfb7d6ddb", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._factory", + "HttpControlChannel.start" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel(ControlChannel):\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._timeout = timeout\n self._runner = UvicornThreadRunner(host, port, timeout)\n self._factory = HttpControlAppFactory()\n self._actions: ControlActionSet | None = None\n\n async def start(self, actions: ControlActionSet) -> None:\n self._actions = actions\n app = self._factory.create(self._health_response, self._action_response)\n await self._runner.start(app)\n\n async def stop(self) -> None:\n await self._runner.stop()\n\n @property\n def port(self) -> int:\n return self._runner.port\n\n async def _health_response(self) -> dict[str, object]:\n if self._actions is None:\n return {\"status\": \"unhealthy\", \"detail\": \"control actions are not configured\"}\n return await asyncio.wait_for(self._actions.health(), timeout=float(self._timeout))\n\n async def _action_response(self, action: str, _client_source: str = \"unknown\") -> JSONResponse:\n if self._actions is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"{action} handler is not configured\"}, status_code=404)\n callbacks = {\n \"start\": self._actions.start,\n \"stop\": self._actions.stop,\n \"status\": self._actions.status,\n }\n callback = callbacks.get(action)\n if callback is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"unsupported action: {action}\"}, status_code=404)\n action_timeout = max(float(self._timeout), 10.0) if action in {\"start\", \"stop\"} else float(self._timeout)\n try:\n detail = await asyncio.wait_for(callback(), timeout=action_timeout)\n except asyncio.TimeoutError:\n return JSONResponse(\n content={\"status\": \"accepted\", \"detail\": f\"{action} operation is still in progress\"},\n status_code=202,\n )\n except Exception as exc:\n return JSONResponse(content={\"status\": \"error\", \"detail\": str(exc)}, status_code=500)\n return JSONResponse(content={\"status\": \"ok\", \"detail\": detail or f\"{action} action accepted\"}, status_code=200)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_channel.py:HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "## Объяснение работы класса `HttpControlChannel`\n\n### Назначение\nКласс `HttpControlChannel` является компонентом системы управления состоянием и взаимодействия с внешним миром через HTTP-протокол. Он реализует механизм обмена данными и состояниями между компонентами приложения через HTTP-запросы и ответы.\n\n### Ключевые зависимости\nКлючевыми зависимостями являются:\n- `UvicornThreadRunner`: используется для запуска асинхронного сервера на основе библиотеки Uvicorn.\n- `HttpControlAppFactory`: фабрика приложений, которая отвечает за создание экземпляров FastAPI приложения.\n- `ControlActionSet`: набор действий, связанных с управлением состоянием и поведением приложения.\n\n### Поток данных или вызовов\nПоток данных и вызовов выглядит следующим образом:\n1. **Инициализация (`__init__`)**:\n - При создании экземпляра класса задаются параметры хоста, порта и тайм-аута.\n - Создается объект `UvicornThreadRunner`, отвечающий за запуск асинхронного HTTP-сервера.\n - Создается экземпляр фабрики приложений `HttpControlAppFactory`.\n \n2. **Запуск (`start`)**:\n - Если заданы действия (`ControlActionSet`), создается экземпляр FastAPI приложения, включающего обработчики для health и action запросов.\n - Запускается сервер при помощи объекта `UvicornThreadRunner`.\n\n3. **Остановка (`stop`)**:\n - Остановка запущенного сервера при помощи метода `stop()` объекта `UvicornThreadRunner`.\n\n4. **Получение статуса порта (`port`)**:\n - Возвращает порт, на котором запущен сервер.\n\n5. **Health-запрос (`_health_response`)**:\n - Проверяет наличие настроенных действий и возвращает статус здоровья приложения.\n\n6. **Action-запрос (`_action_response`)**:\n - Обрабатывает запросы действий, проверяя их конфигурацию и возвращая соответствующий результат.\n\n### Важные детали реализации\n- **Таймаут (`_timeout`)**: устанавливается при инициализации и используется в методах проверки состояния здоровья и выполнения действий.\n- **Actions (`_actions`)**: набор доступных действий, определяющий функциональность приложения.\n- **FastAPI приложение**: строится динамически при каждом вызове метода `start`, что позволяет настраивать его под конкретные задачи.\n \n### Осторожные выводы\nНа основании текущего контекста сложно однозначно утверждать, какие именно данные передаются по HTTP-протоколу, так как контекст сигнализирует о возможности работы с различными типами данных, но детальной информации об этом нет.\n\n### Итоговое объяснение\nКласс `HttpControlChannel` предназначен для организации управления состоянием и взаимодействия с приложением через HTTP-интерфейс. Он использует библиотеку Uvicorn для создания асинхронного HTTP-сервера и FastAPI для построения прикладных сервисов. Класс управляет жизненным циклом сервера, отслеживает доступные действия и предоставляет методы для получения статуса здоровья и выполнения пользовательских операций.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS", + "C4_SEMANTIC_ROLES" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "HttpControlChannel" + ], + "keyword_hints": [ + "HttpControlChannel" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "HttpControlChannel", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "HttpControlChannel", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "HttpControlChannel", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "HttpControlChannel", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "HttpControlChannel", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "HttpControlChannel", + "alternatives": [ + "HttpControlChannel" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 1, + "symbol_resolution": 0, + "retrieval_total": 161, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 49, + "C0_SOURCE_CHUNKS": 24, + "C4_SEMANTIC_ROLES": 18, + "C2_DEPENDENCY_GRAPH": 55, + "C3_ENTRYPOINTS": 13 + }, + "merge_rank": 20, + "prompt_build": 0, + "llm_call": 4496 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 795, + "evidence_rows": 12, + "evidence_chars": 3028 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 1 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_explain_ru_v1", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "HttpControlChannel" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 12, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-fullchain-explain-http-control-channel", + "mode": "full_chain", + "run_started_at": "2026-03-12T11:21:59", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Объясни класс HttpControlChannel", + "normalized_query": "Объясни класс HttpControlChannel" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Объясни класс HttpControlChannel" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни класс HttpControlChannel" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "HttpControlChannel" + ], + "keyword_hints": [ + "HttpControlChannel" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 1 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Объясни класс HttpControlChannel" + }, + "output": { + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "HttpControlChannel", + "alternatives": [ + "HttpControlChannel" + ], + "confidence": 0.99 + }, + "rag_count": 12, + "rag_rows": [ + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel\nHttpControlChannel(ControlChannel)", + "layer": "C1_SYMBOL_CATALOG", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "qname": "HttpControlChannel", + "kind": "class", + "signature": "HttpControlChannel(ControlChannel)", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._runner\n -> HttpControlChannel.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 15, + "span_end": 22, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "51d73913df709152258ed1b9a8c8f4eb3c575eccfe6b982aef0b28e0789a29da", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0", + "dst_ref": "HttpControlChannel.start", + "resolution": "resolved", + "slice_id": "51d73913df709152258ed1b9a8c8f4eb3c575eccfe6b982aef0b28e0789a29da", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._runner", + "HttpControlChannel.start" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._runner\n -> HttpControlChannel.port", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 15, + "span_end": 29, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "c7167bab7218bb768ad7c11bfb40d1a3096e6071dd7817bba5fd864cf8f6de13", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "3632ce8227f4a31e0768f2fb021a4d1ba28e1202633aa0f2fac902295931280f", + "dst_ref": "HttpControlChannel.port", + "resolution": "resolved", + "slice_id": "c7167bab7218bb768ad7c11bfb40d1a3096e6071dd7817bba5fd864cf8f6de13", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._runner", + "HttpControlChannel.port" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "3632ce8227f4a31e0768f2fb021a4d1ba28e1202633aa0f2fac902295931280f" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._timeout\n -> HttpControlChannel._health_response", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 14, + "span_end": 34, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "f858f5c9e575f6c4cdfe3853571b7ee21d1f628a443541d2037c3dc9d0790bef", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "e84bf04e9cd2127df235b7064d05f47e19f19a89c7c82f4c247231d4e8fa426a", + "dst_ref": "HttpControlChannel._health_response", + "resolution": "resolved", + "slice_id": "f858f5c9e575f6c4cdfe3853571b7ee21d1f628a443541d2037c3dc9d0790bef", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._timeout", + "HttpControlChannel._health_response" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "e84bf04e9cd2127df235b7064d05f47e19f19a89c7c82f4c247231d4e8fa426a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._timeout\n -> HttpControlChannel._action_response", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "c3ef21fcae96c82c00be74b3ab827d4af2085d89cb3fa5521c19a174aad84dbb", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "e64969024ccaeb34d8d91473fad07b3b3d341875846392e7a006406c7ada1954", + "dst_ref": "HttpControlChannel._action_response", + "resolution": "resolved", + "slice_id": "c3ef21fcae96c82c00be74b3ab827d4af2085d89cb3fa5521c19a174aad84dbb", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._timeout", + "HttpControlChannel._action_response" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "e64969024ccaeb34d8d91473fad07b3b3d341875846392e7a006406c7ada1954" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._runner\n -> HttpControlChannel.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 15, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "0f827ef81a990258a8a74381c8564a8361afa6712dba3200592659c939adcb9d", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "f29ab212620093d72be20e26c5a399624c7939a6056a728762ed3f84a250bfa3", + "dst_ref": "HttpControlChannel.stop", + "resolution": "resolved", + "slice_id": "0f827ef81a990258a8a74381c8564a8361afa6712dba3200592659c939adcb9d", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._runner", + "HttpControlChannel.stop" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "f29ab212620093d72be20e26c5a399624c7939a6056a728762ed3f84a250bfa3" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._factory\n -> HttpControlChannel.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 16, + "span_end": 21, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e61ec25ded7dbe380d95ce2abcbc1d7a2d2afde5aa8453866df8706dfb7d6ddb", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0", + "dst_ref": "HttpControlChannel.start", + "resolution": "resolved", + "slice_id": "e61ec25ded7dbe380d95ce2abcbc1d7a2d2afde5aa8453866df8706dfb7d6ddb", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._factory", + "HttpControlChannel.start" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel(ControlChannel):\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._timeout = timeout\n self._runner = UvicornThreadRunner(host, port, timeout)\n self._factory = HttpControlAppFactory()\n self._actions: ControlActionSet | None = None\n\n async def start(self, actions: ControlActionSet) -> None:\n self._actions = actions\n app = self._factory.create(self._health_response, self._action_response)\n await self._runner.start(app)\n\n async def stop(self) -> None:\n await self._runner.stop()\n\n @property\n def port(self) -> int:\n return self._runner.port\n\n async def _health_response(self) -> dict[str, object]:\n if self._actions is None:\n return {\"status\": \"unhealthy\", \"detail\": \"control actions are not configured\"}\n return await asyncio.wait_for(self._actions.health(), timeout=float(self._timeout))\n\n async def _action_response(self, action: str, _client_source: str = \"unknown\") -> JSONResponse:\n if self._actions is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"{action} handler is not configured\"}, status_code=404)\n callbacks = {\n \"start\": self._actions.start,\n \"stop\": self._actions.stop,\n \"status\": self._actions.status,\n }\n callback = callbacks.get(action)\n if callback is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"unsupported action: {action}\"}, status_code=404)\n action_timeout = max(float(self._timeout), 10.0) if action in {\"start\", \"stop\"} else float(self._timeout)\n try:\n detail = await asyncio.wait_for(callback(), timeout=action_timeout)\n except asyncio.TimeoutError:\n return JSONResponse(\n content={\"status\": \"accepted\", \"detail\": f\"{action} operation is still in progress\"},\n status_code=202,\n )\n except Exception as exc:\n return JSONResponse(content={\"status\": \"error\", \"detail\": str(exc)}, status_code=500)\n return JSONResponse(content={\"status\": \"ok\", \"detail\": detail or f\"{action} action accepted\"}, status_code=200)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_channel.py:HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "HttpControlChannel", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "HttpControlChannel", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "HttpControlChannel", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "HttpControlChannel", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "HttpControlChannel", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "HttpControlChannel", + "alternatives": [ + "HttpControlChannel" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 161, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 49, + "C0_SOURCE_CHUNKS": 24, + "C4_SEMANTIC_ROLES": 18, + "C2_DEPENDENCY_GRAPH": 55, + "C3_ENTRYPOINTS": 13 + }, + "merge_rank": 20 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Объясни класс HttpControlChannel", + "rag_count": 12 + }, + "output": { + "llm_answer": "## Объяснение работы класса `HttpControlChannel`\n\n### Назначение\nКласс `HttpControlChannel` является компонентом системы управления состоянием и взаимодействия с внешним миром через HTTP-протокол. Он реализует механизм обмена данными и состояниями между компонентами приложения через HTTP-запросы и ответы.\n\n### Ключевые зависимости\nКлючевыми зависимостями являются:\n- `UvicornThreadRunner`: используется для запуска асинхронного сервера на основе библиотеки Uvicorn.\n- `HttpControlAppFactory`: фабрика приложений, которая отвечает за создание экземпляров FastAPI приложения.\n- `ControlActionSet`: набор действий, связанных с управлением состоянием и поведением приложения.\n\n### Поток данных или вызовов\nПоток данных и вызовов выглядит следующим образом:\n1. **Инициализация (`__init__`)**:\n - При создании экземпляра класса задаются параметры хоста, порта и тайм-аута.\n - Создается объект `UvicornThreadRunner`, отвечающий за запуск асинхронного HTTP-сервера.\n - Создается экземпляр фабрики приложений `HttpControlAppFactory`.\n \n2. **Запуск (`start`)**:\n - Если заданы действия (`ControlActionSet`), создается экземпляр FastAPI приложения, включающего обработчики для health и action запросов.\n - Запускается сервер при помощи объекта `UvicornThreadRunner`.\n\n3. **Остановка (`stop`)**:\n - Остановка запущенного сервера при помощи метода `stop()` объекта `UvicornThreadRunner`.\n\n4. **Получение статуса порта (`port`)**:\n - Возвращает порт, на котором запущен сервер.\n\n5. **Health-запрос (`_health_response`)**:\n - Проверяет наличие настроенных действий и возвращает статус здоровья приложения.\n\n6. **Action-запрос (`_action_response`)**:\n - Обрабатывает запросы действий, проверяя их конфигурацию и возвращая соответствующий результат.\n\n### Важные детали реализации\n- **Таймаут (`_timeout`)**: устанавливается при инициализации и используется в методах проверки состояния здоровья и выполнения действий.\n- **Actions (`_actions`)**: набор доступных действий, определяющий функциональность приложения.\n- **FastAPI приложение**: строится динамически при каждом вызове метода `start`, что позволяет настраивать его под конкретные задачи.\n \n### Осторожные выводы\nНа основании текущего контекста сложно однозначно утверждать, какие именно данные передаются по HTTP-протоколу, так как контекст сигнализирует о возможности работы с различными типами данных, но детальной информации об этом нет.\n\n### Итоговое объяснение\nКласс `HttpControlChannel` предназначен для организации управления состоянием и взаимодействия с приложением через HTTP-интерфейс. Он использует библиотеку Uvicorn для создания асинхронного HTTP-сервера и FastAPI для построения прикладных сервисов. Класс управляет жизненным циклом сервера, отслеживает доступные действия и предоставляет методы для получения статуса здоровья и выполнения пользовательских операций." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 795, + "evidence_rows": 12, + "evidence_chars": 3028 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 1 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_explain_ru_v1", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 4496 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_112158/full_chain_plba_code_retrieval_plba-fullchain-explain-http-control-channel.md b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_112158/full_chain_plba_code_retrieval_plba-fullchain-explain-http-control-channel.md new file mode 100644 index 0000000..9255292 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_112158/full_chain_plba_code_retrieval_plba-fullchain-explain-http-control-channel.md @@ -0,0 +1,34 @@ +# plba-fullchain-explain-http-control-channel + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_retrieval.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Объясни класс HttpControlChannel + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 12, + "llm_answer": "## Объяснение работы класса `HttpControlChannel`\n\n### Назначение\nКласс `HttpControlChannel` является компонентом системы управления состоянием и взаимодействия с внешним миром через HTTP-протокол. Он реализует механизм обмена данными и состояниями между компонентами приложения через HTTP-запросы и ответы.\n\n### Ключевые зависимости\nКлючевыми зависимостями являются:\n- `UvicornThreadRunner`: используется для запуска асинхронного сервера на основе библиотеки Uvicorn.\n- `HttpControlAppFactory`: фабрика приложений, которая отвечает за создание экземпляров FastAPI приложения.\n- `ControlActionSet`: набор действий, связанных с управлением состоянием и поведением приложения.\n\n### Поток данных или вызовов\nПоток данных и вызовов выглядит следующим образом:\n1. **Инициализация (`__init__`)**:\n - При создании экземпляра класса задаются параметры хоста, порта и тайм-аута.\n - Создается объект `UvicornThreadRunner`, отвечающий за запуск асинхронного HTTP-сервера.\n - Создается экземпляр фабрики приложений `HttpControlAppFactory`.\n \n2. **Запуск (`start`)**:\n - Если заданы действия (`ControlActionSet`), создается экземпляр FastAPI приложения, включающего обработчики для health и action запросов.\n - Запускается сервер при помощи объекта `UvicornThreadRunner`.\n\n3. **Остановка (`stop`)**:\n - Остановка запущенного сервера при помощи метода `stop()` объекта `UvicornThreadRunner`.\n\n4. **Получение статуса порта (`port`)**:\n - Возвращает порт, на котором запущен сервер.\n\n5. **Health-запрос (`_health_response`)**:\n - Проверяет наличие настроенных действий и возвращает статус здоровья приложения.\n\n6. **Action-запрос (`_action_response`)**:\n - Обрабатывает запросы действий, проверяя их конфигурацию и возвращая соответствующий результат.\n\n### Важные детали реализации\n- **Таймаут (`_timeout`)**: устанавливается при инициализации и используется в методах проверки состояния здоровья и выполнения действий.\n- **Actions (`_actions`)**: набор доступных действий, определяющий функциональность приложения.\n- **FastAPI приложение**: строится динамически при каждом вызове метода `start`, что позволяет настраивать его под конкретные задачи.\n \n### Осторожные выводы\nНа основании текущего контекста сложно однозначно утверждать, какие именно данные передаются по HTTP-протоколу, так как контекст сигнализирует о возможности работы с различными типами данных, но детальной информации об этом нет.\n\n### Итоговое объяснение\nКласс `HttpControlChannel` предназначен для организации управления состоянием и взаимодействия с приложением через HTTP-интерфейс. Он использует библиотеку Uvicorn для создания асинхронного HTTP-сервера и FastAPI для построения прикладных сервисов. Класс управляет жизненным циклом сервера, отслеживает доступные действия и предоставляет методы для получения статуса здоровья и выполнения пользовательских операций.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "HttpControlChannel" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_112158/full_chain_plba_code_retrieval_plba-fullchain-explain-runtime-manager.json b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_112158/full_chain_plba_code_retrieval_plba-fullchain-explain-runtime-manager.json new file mode 100644 index 0000000..d265c26 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_112158/full_chain_plba_code_retrieval_plba-fullchain-explain-runtime-manager.json @@ -0,0 +1,2088 @@ +{ + "case_id": "plba-fullchain-explain-runtime-manager", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_retrieval.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 12, + "llm_answer": "## Назначение класса `RuntimeManager`\nКласс `RuntimeManager` предназначен для управления жизненным циклом приложения и координации различных компонентов системы во время выполнения. Он играет роль менеджера процессов и отвечает за управление состоянием приложения, регистрацию сервисов и координацию работы рабочих потоков (`workers`).\n\n## Ключевые зависимости\n- **ConfigurationManager**: Менеджер конфигурации, используется для загрузки настроек приложения.\n- **ServiceContainer**: Контейнер сервисов, содержащий различные сервисы и модули приложения.\n- **TraceService**: Сервис трассировки, собирает информацию о выполнении запросов и событиях.\n- **HealthRegistry**: Регистратор состояния здоровья системы, отслеживает состояние различных модулей и сервисов.\n- **LogManager**: Менеджер логирования, регистрирует события и ошибки.\n- **WorkerSupervisor**: Наблюдатель за рабочими процессами, управляет запуском и остановкой рабочих потоков.\n- **ControlPlaneService**: Управляет основной логикой взаимодействия с внешним миром и сервисами.\n\n## Поток данных или вызовов\nПри инициализации объекта класса `RuntimeManager`, вызывается метод `__init__`. В этом методе происходит инициализация всех указанных параметров и настройка начальных значений атрибутов экземпляра:\n\n```python\ndef __init__(self, ...):\n # Инициализация переменных и атрибутов\n self.configuration = ...\n self.services = ...\n self.traces = ...\n self.health = ...\n self.logs = ...\n self.workers = ...\n self.control_plane = ...\n \n # Другие действия по настройке и регистрации сервисов\n```\n\nПосле этого начинается регистрация сервисов и их модулей при помощи метода `_register_core_services`.\n\n### Важные детали реализации\n- Класс поддерживает управление несколькими основными состояниями жизненного цикла приложения через атрибуты `_state` и соответствующие методы:\n - `LifecycleState.IDLE`: начальное состояние перед началом работы.\n - `LifecycleState.STARTED`: активное состояние после начала работы.\n - `LifecycleState.FAILED`: состояние после возникновения ошибки.\n \n- При создании экземпляра класса вызываются функции `_register_core_services`, которые отвечают за подключение основных модулей и сервисов.\n\n- Метод `register_module(module)` позволяет динамически регистрировать новые модули и расширять функциональность приложения.\n\n### Осторожные выводы\nНа основе косвенных признаков можно предположить, что реализация использует механизм модульной архитектуры и разделяет логику на несколько уровней абстракции, где каждый уровень соответствует определённой части функциональности (например, конфигурация, мониторинг, контроль и рабочие процессы). Однако более детальная информация требует дополнительного анализа исходного кода.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-fullchain-explain-runtime-manager", + "text": "Объясни как работает класс RuntimeManager", + "mode": "full_chain", + "run_started_at": "2026-03-12T11:21:59", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни как работает класс RuntimeManager", + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ], + "confidence": 0.99 + }, + "rag_count": 12, + "rag_rows": [ + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager\nRuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "qname": "RuntimeManager", + "kind": "class", + "signature": "RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests manager\n- orchestrates role-like calls (4)\n- reads and writes state attributes\n- participates in dataflow slices (50)", + "layer": "C4_SEMANTIC_ROLES", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 43, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "symbol_name": "RuntimeManager", + "qname": "RuntimeManager", + "role": "pipeline_stage", + "confidence": 0.67, + "dataflow_participation": 50, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 52, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "## Назначение класса `RuntimeManager`\nКласс `RuntimeManager` предназначен для управления жизненным циклом приложения и координации различных компонентов системы во время выполнения. Он играет роль менеджера процессов и отвечает за управление состоянием приложения, регистрацию сервисов и координацию работы рабочих потоков (`workers`).\n\n## Ключевые зависимости\n- **ConfigurationManager**: Менеджер конфигурации, используется для загрузки настроек приложения.\n- **ServiceContainer**: Контейнер сервисов, содержащий различные сервисы и модули приложения.\n- **TraceService**: Сервис трассировки, собирает информацию о выполнении запросов и событиях.\n- **HealthRegistry**: Регистратор состояния здоровья системы, отслеживает состояние различных модулей и сервисов.\n- **LogManager**: Менеджер логирования, регистрирует события и ошибки.\n- **WorkerSupervisor**: Наблюдатель за рабочими процессами, управляет запуском и остановкой рабочих потоков.\n- **ControlPlaneService**: Управляет основной логикой взаимодействия с внешним миром и сервисами.\n\n## Поток данных или вызовов\nПри инициализации объекта класса `RuntimeManager`, вызывается метод `__init__`. В этом методе происходит инициализация всех указанных параметров и настройка начальных значений атрибутов экземпляра:\n\n```python\ndef __init__(self, ...):\n # Инициализация переменных и атрибутов\n self.configuration = ...\n self.services = ...\n self.traces = ...\n self.health = ...\n self.logs = ...\n self.workers = ...\n self.control_plane = ...\n \n # Другие действия по настройке и регистрации сервисов\n```\n\nПосле этого начинается регистрация сервисов и их модулей при помощи метода `_register_core_services`.\n\n### Важные детали реализации\n- Класс поддерживает управление несколькими основными состояниями жизненного цикла приложения через атрибуты `_state` и соответствующие методы:\n - `LifecycleState.IDLE`: начальное состояние перед началом работы.\n - `LifecycleState.STARTED`: активное состояние после начала работы.\n - `LifecycleState.FAILED`: состояние после возникновения ошибки.\n \n- При создании экземпляра класса вызываются функции `_register_core_services`, которые отвечают за подключение основных модулей и сервисов.\n\n- Метод `register_module(module)` позволяет динамически регистрировать новые модули и расширять функциональность приложения.\n\n### Осторожные выводы\nНа основе косвенных признаков можно предположить, что реализация использует механизм модульной архитектуры и разделяет логику на несколько уровней абстракции, где каждый уровень соответствует определённой части функциональности (например, конфигурация, мониторинг, контроль и рабочие процессы). Однако более детальная информация требует дополнительного анализа исходного кода.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS", + "C4_SEMANTIC_ROLES" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 1, + "symbol_resolution": 0, + "retrieval_total": 307, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 31, + "C0_SOURCE_CHUNKS": 15, + "C4_SEMANTIC_ROLES": 16, + "C2_DEPENDENCY_GRAPH": 59, + "C3_ENTRYPOINTS": 10 + }, + "merge_rank": 20, + "prompt_build": 0, + "llm_call": 3701 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 797, + "evidence_rows": 12, + "evidence_chars": 7130 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 2 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_explain_ru_v1", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "RuntimeManager" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 12, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-fullchain-explain-runtime-manager", + "mode": "full_chain", + "run_started_at": "2026-03-12T11:21:59", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Объясни как работает класс RuntimeManager", + "normalized_query": "Объясни как работает класс RuntimeManager" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Объясни как работает класс RuntimeManager" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни как работает класс RuntimeManager" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 1 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Объясни как работает класс RuntimeManager" + }, + "output": { + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ], + "confidence": 0.99 + }, + "rag_count": 12, + "rag_rows": [ + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager\nRuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "qname": "RuntimeManager", + "kind": "class", + "signature": "RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests manager\n- orchestrates role-like calls (4)\n- reads and writes state attributes\n- participates in dataflow slices (50)", + "layer": "C4_SEMANTIC_ROLES", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 43, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "symbol_name": "RuntimeManager", + "qname": "RuntimeManager", + "role": "pipeline_stage", + "confidence": 0.67, + "dataflow_participation": 50, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 52, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 307, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 31, + "C0_SOURCE_CHUNKS": 15, + "C4_SEMANTIC_ROLES": 16, + "C2_DEPENDENCY_GRAPH": 59, + "C3_ENTRYPOINTS": 10 + }, + "merge_rank": 20 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Объясни как работает класс RuntimeManager", + "rag_count": 12 + }, + "output": { + "llm_answer": "## Назначение класса `RuntimeManager`\nКласс `RuntimeManager` предназначен для управления жизненным циклом приложения и координации различных компонентов системы во время выполнения. Он играет роль менеджера процессов и отвечает за управление состоянием приложения, регистрацию сервисов и координацию работы рабочих потоков (`workers`).\n\n## Ключевые зависимости\n- **ConfigurationManager**: Менеджер конфигурации, используется для загрузки настроек приложения.\n- **ServiceContainer**: Контейнер сервисов, содержащий различные сервисы и модули приложения.\n- **TraceService**: Сервис трассировки, собирает информацию о выполнении запросов и событиях.\n- **HealthRegistry**: Регистратор состояния здоровья системы, отслеживает состояние различных модулей и сервисов.\n- **LogManager**: Менеджер логирования, регистрирует события и ошибки.\n- **WorkerSupervisor**: Наблюдатель за рабочими процессами, управляет запуском и остановкой рабочих потоков.\n- **ControlPlaneService**: Управляет основной логикой взаимодействия с внешним миром и сервисами.\n\n## Поток данных или вызовов\nПри инициализации объекта класса `RuntimeManager`, вызывается метод `__init__`. В этом методе происходит инициализация всех указанных параметров и настройка начальных значений атрибутов экземпляра:\n\n```python\ndef __init__(self, ...):\n # Инициализация переменных и атрибутов\n self.configuration = ...\n self.services = ...\n self.traces = ...\n self.health = ...\n self.logs = ...\n self.workers = ...\n self.control_plane = ...\n \n # Другие действия по настройке и регистрации сервисов\n```\n\nПосле этого начинается регистрация сервисов и их модулей при помощи метода `_register_core_services`.\n\n### Важные детали реализации\n- Класс поддерживает управление несколькими основными состояниями жизненного цикла приложения через атрибуты `_state` и соответствующие методы:\n - `LifecycleState.IDLE`: начальное состояние перед началом работы.\n - `LifecycleState.STARTED`: активное состояние после начала работы.\n - `LifecycleState.FAILED`: состояние после возникновения ошибки.\n \n- При создании экземпляра класса вызываются функции `_register_core_services`, которые отвечают за подключение основных модулей и сервисов.\n\n- Метод `register_module(module)` позволяет динамически регистрировать новые модули и расширять функциональность приложения.\n\n### Осторожные выводы\nНа основе косвенных признаков можно предположить, что реализация использует механизм модульной архитектуры и разделяет логику на несколько уровней абстракции, где каждый уровень соответствует определённой части функциональности (например, конфигурация, мониторинг, контроль и рабочие процессы). Однако более детальная информация требует дополнительного анализа исходного кода." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 797, + "evidence_rows": 12, + "evidence_chars": 7130 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 2 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_explain_ru_v1", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 3701 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_112158/full_chain_plba_code_retrieval_plba-fullchain-explain-runtime-manager.md b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_112158/full_chain_plba_code_retrieval_plba-fullchain-explain-runtime-manager.md new file mode 100644 index 0000000..68f870f --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_112158/full_chain_plba_code_retrieval_plba-fullchain-explain-runtime-manager.md @@ -0,0 +1,34 @@ +# plba-fullchain-explain-runtime-manager + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_retrieval.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Объясни как работает класс RuntimeManager + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 12, + "llm_answer": "## Назначение класса `RuntimeManager`\nКласс `RuntimeManager` предназначен для управления жизненным циклом приложения и координации различных компонентов системы во время выполнения. Он играет роль менеджера процессов и отвечает за управление состоянием приложения, регистрацию сервисов и координацию работы рабочих потоков (`workers`).\n\n## Ключевые зависимости\n- **ConfigurationManager**: Менеджер конфигурации, используется для загрузки настроек приложения.\n- **ServiceContainer**: Контейнер сервисов, содержащий различные сервисы и модули приложения.\n- **TraceService**: Сервис трассировки, собирает информацию о выполнении запросов и событиях.\n- **HealthRegistry**: Регистратор состояния здоровья системы, отслеживает состояние различных модулей и сервисов.\n- **LogManager**: Менеджер логирования, регистрирует события и ошибки.\n- **WorkerSupervisor**: Наблюдатель за рабочими процессами, управляет запуском и остановкой рабочих потоков.\n- **ControlPlaneService**: Управляет основной логикой взаимодействия с внешним миром и сервисами.\n\n## Поток данных или вызовов\nПри инициализации объекта класса `RuntimeManager`, вызывается метод `__init__`. В этом методе происходит инициализация всех указанных параметров и настройка начальных значений атрибутов экземпляра:\n\n```python\ndef __init__(self, ...):\n # Инициализация переменных и атрибутов\n self.configuration = ...\n self.services = ...\n self.traces = ...\n self.health = ...\n self.logs = ...\n self.workers = ...\n self.control_plane = ...\n \n # Другие действия по настройке и регистрации сервисов\n```\n\nПосле этого начинается регистрация сервисов и их модулей при помощи метода `_register_core_services`.\n\n### Важные детали реализации\n- Класс поддерживает управление несколькими основными состояниями жизненного цикла приложения через атрибуты `_state` и соответствующие методы:\n - `LifecycleState.IDLE`: начальное состояние перед началом работы.\n - `LifecycleState.STARTED`: активное состояние после начала работы.\n - `LifecycleState.FAILED`: состояние после возникновения ошибки.\n \n- При создании экземпляра класса вызываются функции `_register_core_services`, которые отвечают за подключение основных модулей и сервисов.\n\n- Метод `register_module(module)` позволяет динамически регистрировать новые модули и расширять функциональность приложения.\n\n### Осторожные выводы\nНа основе косвенных признаков можно предположить, что реализация использует механизм модульной архитектуры и разделяет логику на несколько уровней абстракции, где каждый уровень соответствует определённой части функциональности (например, конфигурация, мониторинг, контроль и рабочие процессы). Однако более детальная информация требует дополнительного анализа исходного кода.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_112158/full_chain_plba_code_retrieval_plba-fullchain-explain-trace-service.json b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_112158/full_chain_plba_code_retrieval_plba-fullchain-explain-trace-service.json new file mode 100644 index 0000000..529a586 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_112158/full_chain_plba_code_retrieval_plba-fullchain-explain-trace-service.json @@ -0,0 +1,2208 @@ +{ + "case_id": "plba-fullchain-explain-trace-service", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_retrieval.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 14, + "llm_answer": "## Объяснение работы `TraceService`\n\n### Назначение\n`TraceService` — это сервис, предназначенный для управления контекстом трассировки и записи логических событий во время выполнения программы. Он участвует в потоке данных системы, обеспечивая запись информации о каждом этапе выполнения с возможностью последующего анализа и мониторинга.\n\n### Ключевые зависимости\n- **TraceContextFactory**: Базовый класс, от которого наследуется `TraceService`. \n- **TraceTransport**: Интерфейс транспортировки данных трассировки.\n- **TraceContextStore**: Класс для хранения контекста трассировки.\n- **NoOpTraceTransport**: Специальная реализация `TraceTransport`, используемая при отсутствии реальной транспортной инфраструктуры.\n- **TraceRecordWriter**: Вспомогательный класс для записи записей трассировки в транспортную систему.\n\n### Поток данных или вызовов\n1. При инициализации (`__init__`) создается экземпляр класса `TraceRecordWriter`, который записывает записи трассировки через указанный транспорт (`TraceTransport`).\n \n ```python\n def __init__(self, transport: TraceTransport | None = None, store: TraceContextStore | None = None):\n ...\n self._writer = TraceRecordWriter(self.transport)\n ```\n\n2. Основной метод создания нового контекста трассировки (`create_context`) создает новую запись трассировки (`TraceContextRecord`), добавляет её в хранилище (`store`) и записывает через транспорт (`_writer`).\n\n ```python\n def create_context(\n self,\n *,\n alias: str,\n parent_id: str | None = None,\n kind: str | None = None,\n attrs: dict[str, Any] | None = None,\n ) -> str:\n ...\n self.store.push(record)\n self._writer.write_context(record)\n return record.trace_id\n ```\n\n3. Метод `open_context` предоставляет контекст трассировки внутри блока `with`, создавая новый контекст трассировки и возвращая идентификатор этого контекста.\n\n ```python\n @contextmanager\n def open_context(\n self,\n *,\n alias: str,\n parent_id: str | None = None,\n kind: str | None = None,\n attrs: dict[str, Any] | None = None,\n ) -> Iterator[str]:\n trace_id = self.create_context(alias=alias, parent_id=parent_id, kind=kind, attrs=attrs)\n yield trace_id\n ```\n\n### Важные детали реализации\n- Запись сообщений трассировки осуществляется методом `_writer.write_message`.\n- Хранилище контекста трассировки используется для сохранения всех созданных записей трассировки.\n- Если транспорт недоступен или возникает ошибка при передаче сообщения, это фиксируется в журнале ошибок.\n \n ```python\n class TraceRecordWriter:\n def write_message(self, record: TraceLogMessage) -> None:\n try:\n self._transport.write_message(record)\n except Exception:\n self._logger.exception(\"Trace transport failed to write message for %s\", record.trace_id)\n ```\n\n### Остерегайтесь выводов\nНекоторые выводы сделаны на основе косвенных признаков и предположений, основанных на доступных фрагментах кода и структуре зависимостей. Например, роль метода `_writer.write_message` точно определяется исключительно по сигнатуре и отсутствию подробных комментариев в исходном коде.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "TraceService" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-fullchain-explain-trace-service", + "text": "Как работает TraceService?", + "mode": "full_chain", + "run_started_at": "2026-03-12T11:21:59", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Как работает TraceService?", + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "TraceService", + "alternatives": [ + "TraceService" + ], + "confidence": 0.99 + }, + "rag_count": 14, + "rag_rows": [ + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceService\nTraceService(TraceContextFactory)", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService", + "span_start": 39, + "span_end": 166, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "c2b2b976d99f2c600000b753731b26e0a69adcb4359398b93073590c5d5d04f4", + "qname": "TraceService", + "kind": "class", + "signature": "TraceService(TraceContextFactory)", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (13)", + "layer": "C4_SEMANTIC_ROLES", + "title": "TraceService", + "span_start": 39, + "span_end": 166, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 60, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "c2b2b976d99f2c600000b753731b26e0a69adcb4359398b93073590c5d5d04f4", + "symbol_name": "TraceService", + "qname": "TraceService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 13, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.create_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 61, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3b052062067a78aef3302ee1d996897e02a67d1b340397bea4f59fe147c0492a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a", + "dst_ref": "TraceService.create_context", + "resolution": "resolved", + "slice_id": "3b052062067a78aef3302ee1d996897e02a67d1b340397bea4f59fe147c0492a", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.create_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.close_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 84, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "7a9353ef57c9ae5d19b3a0c6ac50fad05e6d21d31bbe1cd1cd07af6332ba6505", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "01e14158dcced7e52d0c8ac84ac7b9a75225c261b6aca6a1d7da802d0994721c", + "dst_ref": "TraceService.close_context", + "resolution": "resolved", + "slice_id": "7a9353ef57c9ae5d19b3a0c6ac50fad05e6d21d31bbe1cd1cd07af6332ba6505", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.close_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "01e14158dcced7e52d0c8ac84ac7b9a75225c261b6aca6a1d7da802d0994721c" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.open_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 78, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a6e13b9ebc4fed84586afd53ed92a4d14757e440873f572b2337d5622ee96031", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426", + "dst_ref": "TraceService.open_context", + "resolution": "resolved", + "slice_id": "a6e13b9ebc4fed84586afd53ed92a4d14757e440873f572b2337d5622ee96031", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.open_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.transport\n -> TraceService.__init__", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 41, + "span_end": 43, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "1e923a93faa05c3c43ca9b19bd047007a8589ccce57d3cc1798ae7f9f200af98", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "dst_ref": "TraceService.__init__", + "resolution": "resolved", + "slice_id": "1e923a93faa05c3c43ca9b19bd047007a8589ccce57d3cc1798ae7f9f200af98", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.transport", + "TraceService.__init__" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.current_trace_id", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 81, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3ea17138634b1190bded77ddb84aa1595124f6519b246f24fc4b02bd62b5cac1", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c", + "dst_ref": "TraceService.current_trace_id", + "resolution": "resolved", + "slice_id": "3ea17138634b1190bded77ddb84aa1595124f6519b246f24fc4b02bd62b5cac1", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.current_trace_id" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.step", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 88, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "9f34c5da9b09fba99df6f6b1bde183a9aeb45111b8218a747c71590c2c9f60f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "c44bfbc66cf747283f30088da3e011a10395031d41e77b74e523c24997f641ca", + "dst_ref": "TraceService.step", + "resolution": "resolved", + "slice_id": "9f34c5da9b09fba99df6f6b1bde183a9aeb45111b8218a747c71590c2c9f60f2", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.step" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "c44bfbc66cf747283f30088da3e011a10395031d41e77b74e523c24997f641ca" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceRecordWriter:\n def __init__(self, transport: TraceTransport) -> None:\n self._logger = logging.getLogger(__name__)\n self._transport = transport\n\n def write_context(self, record: TraceContextRecord) -> None:\n try:\n self._transport.write_context(record)\n except Exception:\n self._logger.exception(\"Trace transport failed to write context %s\", record.trace_id)\n\n def write_message(self, record: TraceLogMessage) -> None:\n try:\n self._transport.write_message(record)\n except Exception:\n self._logger.exception(\"Trace transport failed to write message for %s\", record.trace_id)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/tracing/service.py:TraceRecordWriter", + "span_start": 21, + "span_end": 36, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceService(TraceContextFactory):\n def __init__(self, transport: TraceTransport | None = None, store: TraceContextStore | None = None) -> None:\n self.transport = transport or NoOpTraceTransport()\n self.store = store or TraceContextStore()\n self._writer = TraceRecordWriter(self.transport)\n\n def create_context(\n self,\n *,\n alias: str,\n parent_id: str | None = None,\n kind: str | None = None,\n attrs: dict[str, Any] | None = None,\n ) -> str:\n record = TraceContextRecord(\n trace_id=uuid4().hex,\n alias=str(alias or \"\"),\n parent_id=parent_id,\n type=kind,\n event_time=utc_now(),\n attrs=dict(attrs or {}),\n )\n self.store.push(record)\n self._writer.write_context(record)\n return record.trace_id\n\n @contextmanager\n def open_context(\n self,\n *,\n alias: str,\n parent_id: str | None = None,\n kind: str | None = None,\n attrs: dict[str, Any] | None = None,\n ) -> Iterator[str]:\n trace_id = self.create_context(alias=alias, parent_id=parent_id, kind=kind, attrs=attrs)\n try:\n yield trace_id\n finally:\n self.store.pop()\n\n def current_trace_id(self) -> str | None:\n return self.store.current_trace_id()\n\n def close_context(self) -> str | None:\n previous = self.store.pop()\n return previous.record.trace_id if previous else None\n\n def step(self, name: str) -> None:\n self.store.set_step(str(name or \"\"))\n\n def info(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"INFO\", message, status, attrs)\n\n def debug(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"DEBUG\", message, status, attrs)\n\n def warning(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"WARNING\", message, status, attrs)\n\n def error(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"ERROR\", message, status, attrs)\n\n def exception(self, message: str, *, status: str = \"failed\", attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"ERROR\", message, status, attrs)\n\n def new_root(self, operation: str) -> TraceContext:\n trace_id = self.create_context(alias=operation, kind=\"operation\", attrs={\"operation\": operation})\n return TraceContext(trace_id=trace_id, span_id=trace_id, attributes={\"operation\": operation})\n\n def child_of(self, parent: TraceContext, operation: str) -> TraceContext:\n trace_id = self.create_context(\n alias=operation,\n parent_id=parent.trace_id,\n kind=\"worker\",\n attrs={\"operation\": operation},\n )\n return TraceContext(\n trace_id=trace_id,\n span_id=trace_id,\n parent_span_id=parent.span_id,\n attributes={\"operation\": operation},\n )\n\n def attach(self, metadata: dict[str, object], context: TraceContext) -> dict[str, object]:\n updated = dict(metadata)\n updated[\"trace_id\"] = context.trace_id\n updated[\"span_id\"] = context.span_id\n updated[\"parent_span_id\"] = context.parent_span_id\n return updated\n\n def resume(self, metadata: dict[str, object], operation: str) -> TraceContext:\n trace_id = str(metadata.get(\"trace_id\") or uuid4().hex)\n span_id = str(metadata.get(\"span_id\") or trace_id)\n parent_id = metadata.get(\"parent_span_id\")\n self.create_context(\n alias=operation,\n parent_id=str(parent_id) if parent_id else None,\n kind=\"worker\",\n attrs=dict(metadata),\n )\n return TraceContext(\n trace_id=trace_id,\n span_id=span_id,\n parent_span_id=str(parent_id) if parent_id else None,\n attributes={\"operation\": operation},\n )\n\n def _write_message(\n self,\n level: TraceLevel,\n message: str,\n status: str | None,\n attrs: dict[str, Any] | None,\n ) -> None:\n active = self.store.current()\n if active is None:\n raise RuntimeError(\"Trace context is not bound. Call create_context() first.\")\n record = TraceLogMessage(\n trace_id=active.record.trace_id,\n step=active.step,\n status=str(status or \"\"),\n message=str(message or \"\"),\n level=level,\n event_time=utc_now(),\n attrs=dict(attrs or {}),\n )\n self._writer.write_message(record)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/tracing/service.py:TraceService", + "span_start": 39, + "span_end": 166, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceManager(TraceService):\n \"\"\"Compatibility alias during the transition from ConfigManager-shaped naming.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/tracing/service.py:TraceManager", + "span_start": 169, + "span_end": 170, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 2, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "## Объяснение работы `TraceService`\n\n### Назначение\n`TraceService` — это сервис, предназначенный для управления контекстом трассировки и записи логических событий во время выполнения программы. Он участвует в потоке данных системы, обеспечивая запись информации о каждом этапе выполнения с возможностью последующего анализа и мониторинга.\n\n### Ключевые зависимости\n- **TraceContextFactory**: Базовый класс, от которого наследуется `TraceService`. \n- **TraceTransport**: Интерфейс транспортировки данных трассировки.\n- **TraceContextStore**: Класс для хранения контекста трассировки.\n- **NoOpTraceTransport**: Специальная реализация `TraceTransport`, используемая при отсутствии реальной транспортной инфраструктуры.\n- **TraceRecordWriter**: Вспомогательный класс для записи записей трассировки в транспортную систему.\n\n### Поток данных или вызовов\n1. При инициализации (`__init__`) создается экземпляр класса `TraceRecordWriter`, который записывает записи трассировки через указанный транспорт (`TraceTransport`).\n \n ```python\n def __init__(self, transport: TraceTransport | None = None, store: TraceContextStore | None = None):\n ...\n self._writer = TraceRecordWriter(self.transport)\n ```\n\n2. Основной метод создания нового контекста трассировки (`create_context`) создает новую запись трассировки (`TraceContextRecord`), добавляет её в хранилище (`store`) и записывает через транспорт (`_writer`).\n\n ```python\n def create_context(\n self,\n *,\n alias: str,\n parent_id: str | None = None,\n kind: str | None = None,\n attrs: dict[str, Any] | None = None,\n ) -> str:\n ...\n self.store.push(record)\n self._writer.write_context(record)\n return record.trace_id\n ```\n\n3. Метод `open_context` предоставляет контекст трассировки внутри блока `with`, создавая новый контекст трассировки и возвращая идентификатор этого контекста.\n\n ```python\n @contextmanager\n def open_context(\n self,\n *,\n alias: str,\n parent_id: str | None = None,\n kind: str | None = None,\n attrs: dict[str, Any] | None = None,\n ) -> Iterator[str]:\n trace_id = self.create_context(alias=alias, parent_id=parent_id, kind=kind, attrs=attrs)\n yield trace_id\n ```\n\n### Важные детали реализации\n- Запись сообщений трассировки осуществляется методом `_writer.write_message`.\n- Хранилище контекста трассировки используется для сохранения всех созданных записей трассировки.\n- Если транспорт недоступен или возникает ошибка при передаче сообщения, это фиксируется в журнале ошибок.\n \n ```python\n class TraceRecordWriter:\n def write_message(self, record: TraceLogMessage) -> None:\n try:\n self._transport.write_message(record)\n except Exception:\n self._logger.exception(\"Trace transport failed to write message for %s\", record.trace_id)\n ```\n\n### Остерегайтесь выводов\nНекоторые выводы сделаны на основе косвенных признаков и предположений, основанных на доступных фрагментах кода и структуре зависимостей. Например, роль метода `_writer.write_message` точно определяется исключительно по сигнатуре и отсутствию подробных комментариев в исходном коде.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS", + "C4_SEMANTIC_ROLES" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "TraceService" + ], + "keyword_hints": [ + "TraceService" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "TraceService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "TraceService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "TraceService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "TraceService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "TraceService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "TraceService", + "alternatives": [ + "TraceService" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 1, + "symbol_resolution": 0, + "retrieval_total": 146, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 47, + "C0_SOURCE_CHUNKS": 22, + "C4_SEMANTIC_ROLES": 17, + "C2_DEPENDENCY_GRAPH": 47, + "C3_ENTRYPOINTS": 11 + }, + "merge_rank": 18, + "prompt_build": 0, + "llm_call": 4778 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 931, + "evidence_rows": 14, + "evidence_chars": 6323 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 1 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 3, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_explain_ru_v1", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "TraceService" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 14, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-fullchain-explain-trace-service", + "mode": "full_chain", + "run_started_at": "2026-03-12T11:21:59", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Как работает TraceService?", + "normalized_query": "Как работает TraceService?" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Как работает TraceService?" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Как работает TraceService?" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "TraceService" + ], + "keyword_hints": [ + "TraceService" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 1 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Как работает TraceService?" + }, + "output": { + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "TraceService", + "alternatives": [ + "TraceService" + ], + "confidence": 0.99 + }, + "rag_count": 14, + "rag_rows": [ + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceService\nTraceService(TraceContextFactory)", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService", + "span_start": 39, + "span_end": 166, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "c2b2b976d99f2c600000b753731b26e0a69adcb4359398b93073590c5d5d04f4", + "qname": "TraceService", + "kind": "class", + "signature": "TraceService(TraceContextFactory)", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (13)", + "layer": "C4_SEMANTIC_ROLES", + "title": "TraceService", + "span_start": 39, + "span_end": 166, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 60, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "c2b2b976d99f2c600000b753731b26e0a69adcb4359398b93073590c5d5d04f4", + "symbol_name": "TraceService", + "qname": "TraceService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 13, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.create_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 61, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3b052062067a78aef3302ee1d996897e02a67d1b340397bea4f59fe147c0492a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a", + "dst_ref": "TraceService.create_context", + "resolution": "resolved", + "slice_id": "3b052062067a78aef3302ee1d996897e02a67d1b340397bea4f59fe147c0492a", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.create_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.close_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 84, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "7a9353ef57c9ae5d19b3a0c6ac50fad05e6d21d31bbe1cd1cd07af6332ba6505", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "01e14158dcced7e52d0c8ac84ac7b9a75225c261b6aca6a1d7da802d0994721c", + "dst_ref": "TraceService.close_context", + "resolution": "resolved", + "slice_id": "7a9353ef57c9ae5d19b3a0c6ac50fad05e6d21d31bbe1cd1cd07af6332ba6505", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.close_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "01e14158dcced7e52d0c8ac84ac7b9a75225c261b6aca6a1d7da802d0994721c" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.open_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 78, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a6e13b9ebc4fed84586afd53ed92a4d14757e440873f572b2337d5622ee96031", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426", + "dst_ref": "TraceService.open_context", + "resolution": "resolved", + "slice_id": "a6e13b9ebc4fed84586afd53ed92a4d14757e440873f572b2337d5622ee96031", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.open_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.transport\n -> TraceService.__init__", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 41, + "span_end": 43, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "1e923a93faa05c3c43ca9b19bd047007a8589ccce57d3cc1798ae7f9f200af98", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "dst_ref": "TraceService.__init__", + "resolution": "resolved", + "slice_id": "1e923a93faa05c3c43ca9b19bd047007a8589ccce57d3cc1798ae7f9f200af98", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.transport", + "TraceService.__init__" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.current_trace_id", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 81, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3ea17138634b1190bded77ddb84aa1595124f6519b246f24fc4b02bd62b5cac1", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c", + "dst_ref": "TraceService.current_trace_id", + "resolution": "resolved", + "slice_id": "3ea17138634b1190bded77ddb84aa1595124f6519b246f24fc4b02bd62b5cac1", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.current_trace_id" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.step", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 88, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "9f34c5da9b09fba99df6f6b1bde183a9aeb45111b8218a747c71590c2c9f60f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "c44bfbc66cf747283f30088da3e011a10395031d41e77b74e523c24997f641ca", + "dst_ref": "TraceService.step", + "resolution": "resolved", + "slice_id": "9f34c5da9b09fba99df6f6b1bde183a9aeb45111b8218a747c71590c2c9f60f2", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.step" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "c44bfbc66cf747283f30088da3e011a10395031d41e77b74e523c24997f641ca" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceRecordWriter:\n def __init__(self, transport: TraceTransport) -> None:\n self._logger = logging.getLogger(__name__)\n self._transport = transport\n\n def write_context(self, record: TraceContextRecord) -> None:\n try:\n self._transport.write_context(record)\n except Exception:\n self._logger.exception(\"Trace transport failed to write context %s\", record.trace_id)\n\n def write_message(self, record: TraceLogMessage) -> None:\n try:\n self._transport.write_message(record)\n except Exception:\n self._logger.exception(\"Trace transport failed to write message for %s\", record.trace_id)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/tracing/service.py:TraceRecordWriter", + "span_start": 21, + "span_end": 36, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceService(TraceContextFactory):\n def __init__(self, transport: TraceTransport | None = None, store: TraceContextStore | None = None) -> None:\n self.transport = transport or NoOpTraceTransport()\n self.store = store or TraceContextStore()\n self._writer = TraceRecordWriter(self.transport)\n\n def create_context(\n self,\n *,\n alias: str,\n parent_id: str | None = None,\n kind: str | None = None,\n attrs: dict[str, Any] | None = None,\n ) -> str:\n record = TraceContextRecord(\n trace_id=uuid4().hex,\n alias=str(alias or \"\"),\n parent_id=parent_id,\n type=kind,\n event_time=utc_now(),\n attrs=dict(attrs or {}),\n )\n self.store.push(record)\n self._writer.write_context(record)\n return record.trace_id\n\n @contextmanager\n def open_context(\n self,\n *,\n alias: str,\n parent_id: str | None = None,\n kind: str | None = None,\n attrs: dict[str, Any] | None = None,\n ) -> Iterator[str]:\n trace_id = self.create_context(alias=alias, parent_id=parent_id, kind=kind, attrs=attrs)\n try:\n yield trace_id\n finally:\n self.store.pop()\n\n def current_trace_id(self) -> str | None:\n return self.store.current_trace_id()\n\n def close_context(self) -> str | None:\n previous = self.store.pop()\n return previous.record.trace_id if previous else None\n\n def step(self, name: str) -> None:\n self.store.set_step(str(name or \"\"))\n\n def info(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"INFO\", message, status, attrs)\n\n def debug(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"DEBUG\", message, status, attrs)\n\n def warning(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"WARNING\", message, status, attrs)\n\n def error(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"ERROR\", message, status, attrs)\n\n def exception(self, message: str, *, status: str = \"failed\", attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"ERROR\", message, status, attrs)\n\n def new_root(self, operation: str) -> TraceContext:\n trace_id = self.create_context(alias=operation, kind=\"operation\", attrs={\"operation\": operation})\n return TraceContext(trace_id=trace_id, span_id=trace_id, attributes={\"operation\": operation})\n\n def child_of(self, parent: TraceContext, operation: str) -> TraceContext:\n trace_id = self.create_context(\n alias=operation,\n parent_id=parent.trace_id,\n kind=\"worker\",\n attrs={\"operation\": operation},\n )\n return TraceContext(\n trace_id=trace_id,\n span_id=trace_id,\n parent_span_id=parent.span_id,\n attributes={\"operation\": operation},\n )\n\n def attach(self, metadata: dict[str, object], context: TraceContext) -> dict[str, object]:\n updated = dict(metadata)\n updated[\"trace_id\"] = context.trace_id\n updated[\"span_id\"] = context.span_id\n updated[\"parent_span_id\"] = context.parent_span_id\n return updated\n\n def resume(self, metadata: dict[str, object], operation: str) -> TraceContext:\n trace_id = str(metadata.get(\"trace_id\") or uuid4().hex)\n span_id = str(metadata.get(\"span_id\") or trace_id)\n parent_id = metadata.get(\"parent_span_id\")\n self.create_context(\n alias=operation,\n parent_id=str(parent_id) if parent_id else None,\n kind=\"worker\",\n attrs=dict(metadata),\n )\n return TraceContext(\n trace_id=trace_id,\n span_id=span_id,\n parent_span_id=str(parent_id) if parent_id else None,\n attributes={\"operation\": operation},\n )\n\n def _write_message(\n self,\n level: TraceLevel,\n message: str,\n status: str | None,\n attrs: dict[str, Any] | None,\n ) -> None:\n active = self.store.current()\n if active is None:\n raise RuntimeError(\"Trace context is not bound. Call create_context() first.\")\n record = TraceLogMessage(\n trace_id=active.record.trace_id,\n step=active.step,\n status=str(status or \"\"),\n message=str(message or \"\"),\n level=level,\n event_time=utc_now(),\n attrs=dict(attrs or {}),\n )\n self._writer.write_message(record)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/tracing/service.py:TraceService", + "span_start": 39, + "span_end": 166, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceManager(TraceService):\n \"\"\"Compatibility alias during the transition from ConfigManager-shaped naming.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/tracing/service.py:TraceManager", + "span_start": 169, + "span_end": 170, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 2, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "TraceService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "TraceService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "TraceService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "TraceService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "TraceService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "TraceService", + "alternatives": [ + "TraceService" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 146, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 47, + "C0_SOURCE_CHUNKS": 22, + "C4_SEMANTIC_ROLES": 17, + "C2_DEPENDENCY_GRAPH": 47, + "C3_ENTRYPOINTS": 11 + }, + "merge_rank": 18 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Как работает TraceService?", + "rag_count": 14 + }, + "output": { + "llm_answer": "## Объяснение работы `TraceService`\n\n### Назначение\n`TraceService` — это сервис, предназначенный для управления контекстом трассировки и записи логических событий во время выполнения программы. Он участвует в потоке данных системы, обеспечивая запись информации о каждом этапе выполнения с возможностью последующего анализа и мониторинга.\n\n### Ключевые зависимости\n- **TraceContextFactory**: Базовый класс, от которого наследуется `TraceService`. \n- **TraceTransport**: Интерфейс транспортировки данных трассировки.\n- **TraceContextStore**: Класс для хранения контекста трассировки.\n- **NoOpTraceTransport**: Специальная реализация `TraceTransport`, используемая при отсутствии реальной транспортной инфраструктуры.\n- **TraceRecordWriter**: Вспомогательный класс для записи записей трассировки в транспортную систему.\n\n### Поток данных или вызовов\n1. При инициализации (`__init__`) создается экземпляр класса `TraceRecordWriter`, который записывает записи трассировки через указанный транспорт (`TraceTransport`).\n \n ```python\n def __init__(self, transport: TraceTransport | None = None, store: TraceContextStore | None = None):\n ...\n self._writer = TraceRecordWriter(self.transport)\n ```\n\n2. Основной метод создания нового контекста трассировки (`create_context`) создает новую запись трассировки (`TraceContextRecord`), добавляет её в хранилище (`store`) и записывает через транспорт (`_writer`).\n\n ```python\n def create_context(\n self,\n *,\n alias: str,\n parent_id: str | None = None,\n kind: str | None = None,\n attrs: dict[str, Any] | None = None,\n ) -> str:\n ...\n self.store.push(record)\n self._writer.write_context(record)\n return record.trace_id\n ```\n\n3. Метод `open_context` предоставляет контекст трассировки внутри блока `with`, создавая новый контекст трассировки и возвращая идентификатор этого контекста.\n\n ```python\n @contextmanager\n def open_context(\n self,\n *,\n alias: str,\n parent_id: str | None = None,\n kind: str | None = None,\n attrs: dict[str, Any] | None = None,\n ) -> Iterator[str]:\n trace_id = self.create_context(alias=alias, parent_id=parent_id, kind=kind, attrs=attrs)\n yield trace_id\n ```\n\n### Важные детали реализации\n- Запись сообщений трассировки осуществляется методом `_writer.write_message`.\n- Хранилище контекста трассировки используется для сохранения всех созданных записей трассировки.\n- Если транспорт недоступен или возникает ошибка при передаче сообщения, это фиксируется в журнале ошибок.\n \n ```python\n class TraceRecordWriter:\n def write_message(self, record: TraceLogMessage) -> None:\n try:\n self._transport.write_message(record)\n except Exception:\n self._logger.exception(\"Trace transport failed to write message for %s\", record.trace_id)\n ```\n\n### Остерегайтесь выводов\nНекоторые выводы сделаны на основе косвенных признаков и предположений, основанных на доступных фрагментах кода и структуре зависимостей. Например, роль метода `_writer.write_message` точно определяется исключительно по сигнатуре и отсутствию подробных комментариев в исходном коде." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 931, + "evidence_rows": 14, + "evidence_chars": 6323 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 1 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 3, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_explain_ru_v1", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 4778 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_112158/full_chain_plba_code_retrieval_plba-fullchain-explain-trace-service.md b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_112158/full_chain_plba_code_retrieval_plba-fullchain-explain-trace-service.md new file mode 100644 index 0000000..2a742ac --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_112158/full_chain_plba_code_retrieval_plba-fullchain-explain-trace-service.md @@ -0,0 +1,34 @@ +# plba-fullchain-explain-trace-service + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_retrieval.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Как работает TraceService? + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 14, + "llm_answer": "## Объяснение работы `TraceService`\n\n### Назначение\n`TraceService` — это сервис, предназначенный для управления контекстом трассировки и записи логических событий во время выполнения программы. Он участвует в потоке данных системы, обеспечивая запись информации о каждом этапе выполнения с возможностью последующего анализа и мониторинга.\n\n### Ключевые зависимости\n- **TraceContextFactory**: Базовый класс, от которого наследуется `TraceService`. \n- **TraceTransport**: Интерфейс транспортировки данных трассировки.\n- **TraceContextStore**: Класс для хранения контекста трассировки.\n- **NoOpTraceTransport**: Специальная реализация `TraceTransport`, используемая при отсутствии реальной транспортной инфраструктуры.\n- **TraceRecordWriter**: Вспомогательный класс для записи записей трассировки в транспортную систему.\n\n### Поток данных или вызовов\n1. При инициализации (`__init__`) создается экземпляр класса `TraceRecordWriter`, который записывает записи трассировки через указанный транспорт (`TraceTransport`).\n \n ```python\n def __init__(self, transport: TraceTransport | None = None, store: TraceContextStore | None = None):\n ...\n self._writer = TraceRecordWriter(self.transport)\n ```\n\n2. Основной метод создания нового контекста трассировки (`create_context`) создает новую запись трассировки (`TraceContextRecord`), добавляет её в хранилище (`store`) и записывает через транспорт (`_writer`).\n\n ```python\n def create_context(\n self,\n *,\n alias: str,\n parent_id: str | None = None,\n kind: str | None = None,\n attrs: dict[str, Any] | None = None,\n ) -> str:\n ...\n self.store.push(record)\n self._writer.write_context(record)\n return record.trace_id\n ```\n\n3. Метод `open_context` предоставляет контекст трассировки внутри блока `with`, создавая новый контекст трассировки и возвращая идентификатор этого контекста.\n\n ```python\n @contextmanager\n def open_context(\n self,\n *,\n alias: str,\n parent_id: str | None = None,\n kind: str | None = None,\n attrs: dict[str, Any] | None = None,\n ) -> Iterator[str]:\n trace_id = self.create_context(alias=alias, parent_id=parent_id, kind=kind, attrs=attrs)\n yield trace_id\n ```\n\n### Важные детали реализации\n- Запись сообщений трассировки осуществляется методом `_writer.write_message`.\n- Хранилище контекста трассировки используется для сохранения всех созданных записей трассировки.\n- Если транспорт недоступен или возникает ошибка при передаче сообщения, это фиксируется в журнале ошибок.\n \n ```python\n class TraceRecordWriter:\n def write_message(self, record: TraceLogMessage) -> None:\n try:\n self._transport.write_message(record)\n except Exception:\n self._logger.exception(\"Trace transport failed to write message for %s\", record.trace_id)\n ```\n\n### Остерегайтесь выводов\nНекоторые выводы сделаны на основе косвенных признаков и предположений, основанных на доступных фрагментах кода и структуре зависимостей. Например, роль метода `_writer.write_message` точно определяется исключительно по сигнатуре и отсутствию подробных комментариев в исходном коде.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "TraceService" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_112158/full_chain_plba_code_retrieval_plba-fullchain-explain-workflow-engine.json b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_112158/full_chain_plba_code_retrieval_plba-fullchain-explain-workflow-engine.json new file mode 100644 index 0000000..a850326 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_112158/full_chain_plba_code_retrieval_plba-fullchain-explain-workflow-engine.json @@ -0,0 +1,2158 @@ +{ + "case_id": "plba-fullchain-explain-workflow-engine", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_retrieval.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 13, + "llm_answer": "## Объяснение сущности `WorkflowEngine`\n\n### Назначение\nКласс `WorkflowEngine` является основным компонентом конвейера выполнения рабочих процессов (`workflow`) в приложении. Он отвечает за управление жизненным циклом рабочего процесса, отслеживание состояния его выполнения и взаимодействие с внешними хранилищами данных для сохранения прогресса выполнения.\n\n### Ключевые зависимости\n- **workflow**: определение рабочего процесса, включая начальные и конечные узлы, а также переходы между ними.\n- **persistence**: механизм хранения информации о текущем состоянии выполнения рабочего процесса.\n- **traces**: логирование и мониторинг текущего состояния выполнения.\n- **hooks**: дополнительные пользовательские обработчики событий, позволяющие расширять поведение рабочего процесса.\n\n### Поток данных или вызовов\n1. При инициализации класса вызывается метод `__init__`, который принимает следующие параметры:\n - `workflow`: объект определения рабочего процесса.\n - `persistence`: механизм постоянного хранения состояния.\n - `traces`: компонент логирования и мониторинга.\n - `hooks`: дополнительные пользовательские обработчики событий.\n \n2. После инициализации рабочий процесс запускается через метод `run`. Этот метод выполняет следующие шаги:\n - Получает идентификатор текущей рабочей сессии (`run_id`) от механизма постоянного хранения (`persistence`).\n - Сохраняет текущее состояние выполнения в контексте выполнения.\n - Запускает первый шаг рабочего процесса, записывая текущий узел в контекст выполнения.\n - Циклически переходит к следующему узлу до тех пор, пока не достигнет конечного узла.\n\n3. Внутри цикла происходит обработка каждого шага рабочего процесса следующим образом:\n - Определяется следующий узел по имени текущего узла.\n - Выполняются действия, связанные с текущим узлом.\n - Текущий узел сохраняется в контексте выполнения.\n\n### Важные детали реализации\n- **Переходы между узлами**: переходы внутри рабочего процесса определяются внутренними связями узлов. Каждый узел имеет ссылку на следующий узел в рабочем процессе.\n- **Логирование и мониторинг**: все этапы выполнения регистрируются с помощью механизма логирования (`logging`), что позволяет отслеживать прогресс выполнения рабочего процесса.\n- **Постоянное хранение состояния**: рабочее состояние хранится во внешней системе постоянного хранения (`persistence`), что обеспечивает возможность восстановления работы после прерывания.\n- **Пользовательские расширения**: при помощи интерфейса `WorkflowEngineHooks` можно легко добавлять кастомные функции-обработчики, которые будут выполняться в определенные моменты жизненного цикла рабочего процесса.\n\n---\n\n### Косвенные признаки и осторожные выводы\n- Файл [src/app_runtime/workflow/engine/workflow_engine.py](C1_SYMBOL_CATALOG): файл содержит реализацию класса `WorkflowEngine`.\n- Взаимодействие с другими модулями через механизм HTTP API ([C3_ENTRYPOINTS]: src/app_runtime/control/http_app.py | app.post), однако конкретные детали этого взаимодействия напрямую не видны из предоставленного контекста.\n\nЭтот обзор основан исключительно на доступных файлах и слоях анализа RAG, поэтому некоторые аспекты могут быть оценены осторожно.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "WorkflowEngine" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-fullchain-explain-workflow-engine", + "text": "Объясни класс WorkflowEngine", + "mode": "full_chain", + "run_started_at": "2026-03-12T11:21:59", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни класс WorkflowEngine", + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "WorkflowEngine", + "alternatives": [ + "WorkflowEngine", + "WorkflowEngineHooks" + ], + "confidence": 0.99 + }, + "rag_count": 13, + "rag_rows": [ + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "class WorkflowEngine\nWorkflowEngine", + "layer": "C1_SYMBOL_CATALOG", + "title": "WorkflowEngine", + "span_start": 10, + "span_end": 86, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "57ec0a9f11c542c78e008684a888397e8d9ef4223671acb2567e631a0cbc70b4", + "qname": "WorkflowEngine", + "kind": "class", + "signature": "WorkflowEngine", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.workflow.engine.workflow_engine", + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/hooks.py", + "content": "class WorkflowEngineHooks\nWorkflowEngineHooks", + "layer": "C1_SYMBOL_CATALOG", + "title": "WorkflowEngineHooks", + "span_start": 6, + "span_end": 14, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "914123ed510540061e116100fc87bba4195595ba696f8bfde2fd77ac6a5cd7e4", + "qname": "WorkflowEngineHooks", + "kind": "class", + "signature": "WorkflowEngineHooks", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.workflow.engine.hooks", + "is_test": false, + "blob_sha": "4b11672b0a9af1ae04bfce9d8e1f96572997d3e65e68108d7c797b88fa5fa47a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowEngine", + "span_start": 10, + "span_end": 86, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "57ec0a9f11c542c78e008684a888397e8d9ef4223671acb2567e631a0cbc70b4", + "symbol_name": "WorkflowEngine", + "qname": "WorkflowEngine", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine.__init__\n -> WorkflowEngine._transition_resolver\n -> WorkflowEngine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowEngine.__init__:dataflow_slice", + "span_start": 14, + "span_end": 63, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3abf07e5c245e0fe59785ba2d569c2ee56018715fc7f625a044ddaf6201f903d", + "edge_type": "dataflow_slice", + "src_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "src_qname": "WorkflowEngine.__init__", + "dst_symbol_id": "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8", + "dst_ref": "WorkflowEngine.run", + "resolution": "resolved", + "slice_id": "3abf07e5c245e0fe59785ba2d569c2ee56018715fc7f625a044ddaf6201f903d", + "root_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "path_symbols": [ + "WorkflowEngine.__init__", + "WorkflowEngine._transition_resolver", + "WorkflowEngine.run" + ], + "path_symbol_ids": [ + "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine.__init__\n -> WorkflowEngine._hooks\n -> WorkflowEngine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowEngine.__init__:dataflow_slice", + "span_start": 16, + "span_end": 34, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d73db644b69c1eb35afd6eae9d6ac8674e49e30e9bcf9c020f9fdbfe754851b2", + "edge_type": "dataflow_slice", + "src_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "src_qname": "WorkflowEngine.__init__", + "dst_symbol_id": "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8", + "dst_ref": "WorkflowEngine.run", + "resolution": "resolved", + "slice_id": "d73db644b69c1eb35afd6eae9d6ac8674e49e30e9bcf9c020f9fdbfe754851b2", + "root_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "path_symbols": [ + "WorkflowEngine.__init__", + "WorkflowEngine._hooks", + "WorkflowEngine.run" + ], + "path_symbol_ids": [ + "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine.__init__\n -> WorkflowEngine._workflow\n -> WorkflowEngine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowEngine.__init__:dataflow_slice", + "span_start": 12, + "span_end": 29, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "b45ef3c54669b4910a8aed3a565804f275424a24007bc7e3c953389521f80249", + "edge_type": "dataflow_slice", + "src_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "src_qname": "WorkflowEngine.__init__", + "dst_symbol_id": "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8", + "dst_ref": "WorkflowEngine.run", + "resolution": "resolved", + "slice_id": "b45ef3c54669b4910a8aed3a565804f275424a24007bc7e3c953389521f80249", + "root_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "path_symbols": [ + "WorkflowEngine.__init__", + "WorkflowEngine._workflow", + "WorkflowEngine.run" + ], + "path_symbol_ids": [ + "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine.__init__\n -> WorkflowEngine._persistence\n -> WorkflowEngine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowEngine.__init__:dataflow_slice", + "span_start": 13, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "8101338770016324ce05d61daa9935a444c75e6c94a0fae4275d5b50fcbcc70b", + "edge_type": "dataflow_slice", + "src_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "src_qname": "WorkflowEngine.__init__", + "dst_symbol_id": "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8", + "dst_ref": "WorkflowEngine.run", + "resolution": "resolved", + "slice_id": "8101338770016324ce05d61daa9935a444c75e6c94a0fae4275d5b50fcbcc70b", + "root_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "path_symbols": [ + "WorkflowEngine.__init__", + "WorkflowEngine._persistence", + "WorkflowEngine.run" + ], + "path_symbol_ids": [ + "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine.__init__\n -> WorkflowEngine._traces\n -> WorkflowEngine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowEngine.__init__:dataflow_slice", + "span_start": 15, + "span_end": 27, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "5006266616d534d721648391565e2ac0c9e7e9d9f8df00c17fba8989afb533a5", + "edge_type": "dataflow_slice", + "src_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "src_qname": "WorkflowEngine.__init__", + "dst_symbol_id": "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8", + "dst_ref": "WorkflowEngine.run", + "resolution": "resolved", + "slice_id": "5006266616d534d721648391565e2ac0c9e7e9d9f8df00c17fba8989afb533a5", + "root_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "path_symbols": [ + "WorkflowEngine.__init__", + "WorkflowEngine._traces", + "WorkflowEngine.run" + ], + "path_symbol_ids": [ + "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine.__init__\n -> WorkflowEngine._logger\n -> WorkflowEngine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowEngine.__init__:dataflow_slice", + "span_start": 17, + "span_end": 85, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "2f9927abb24794adb056b94bfb5d8538a5cbafb160da2079f52fca97fd694a2b", + "edge_type": "dataflow_slice", + "src_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "src_qname": "WorkflowEngine.__init__", + "dst_symbol_id": "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8", + "dst_ref": "WorkflowEngine.run", + "resolution": "resolved", + "slice_id": "2f9927abb24794adb056b94bfb5d8538a5cbafb160da2079f52fca97fd694a2b", + "root_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "path_symbols": [ + "WorkflowEngine.__init__", + "WorkflowEngine._logger", + "WorkflowEngine.run" + ], + "path_symbol_ids": [ + "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "class WorkflowEngine:\n def __init__(self, workflow, persistence, *, traces, hooks: WorkflowEngineHooks | None = None) -> None:\n self._workflow = workflow\n self._persistence = persistence\n self._transition_resolver = TransitionResolver()\n self._traces = traces\n self._hooks = hooks or WorkflowEngineHooks()\n self._logger = logging.getLogger(__name__)\n\n def run(self, context: WorkflowContext) -> dict[str, object]:\n run_id = self._persistence.start_run(\n self._workflow.definition.name,\n self._workflow.definition.start_at,\n context.snapshot(),\n )\n context.state.setdefault(\"runtime\", {})\n context.state[\"runtime\"][\"workflow_run_id\"] = run_id\n self._traces.step(\"workflow\")\n self._traces.info(\"Workflow started.\", status=\"started\", attrs={\"workflow_run_id\": run_id})\n current_name = self._workflow.definition.start_at\n while current_name is not None:\n node = self._workflow.definition.nodes[current_name]\n context.state[\"runtime\"][\"current_node\"] = current_name\n self._logger.info(\"Workflow run %s: step '%s' started.\", run_id, current_name)\n self._hooks.on_step_started(context, current_name)\n self._persistence.start_step(run_id, current_name, context.snapshot())\n self._traces.step(current_name)\n self._traces.debug(\n f\"Step '{current_name}' started.\",\n status=\"started\",\n attrs={\"workflow_run_id\": run_id, \"node\": current_name},\n )\n try:\n result = node.step.run(context)\n except Exception as error:\n self._persistence.fail_step(run_id, current_name, context.snapshot(), error)\n self._persistence.fail_run(run_id, context.snapshot())\n self._traces.error(\n f\"Step '{current_name}' failed: {error}\",\n status=\"failed\",\n attrs={\"exception_type\": type(error).__name__},\n )\n self._logger.exception(\"Workflow run %s: step '%s' failed.\", run_id, current_name)\n self._hooks.on_step_failed(context, current_name)\n raise\n context.state.update(result.updates)\n self._persistence.complete_step(\n run_id,\n current_name,\n result.status,\n result.transition,\n context.snapshot(),\n )\n next_node = self._transition_resolver.resolve(node, result)\n self._traces.debug(\n f\"Step '{current_name}' completed with transition '{result.transition}'.\",\n status=result.status,\n attrs={\n \"workflow_run_id\": run_id,\n \"from_node\": current_name,\n \"transition\": result.transition,\n \"to_node\": next_node,\n },\n )\n self._logger.info(\n \"Workflow run %s: step '%s' completed with transition '%s'.\",\n run_id,\n current_name,\n result.transition,\n )\n self._hooks.on_step_finished(context, current_name)\n current_name = next_node\n self._persistence.complete_run(run_id, context.snapshot())\n self._traces.step(\"workflow\")\n self._traces.info(\"Workflow completed.\", status=\"completed\", attrs={\"workflow_run_id\": run_id})\n self._logger.info(\"Workflow run %s completed.\", run_id)\n return {\"run_id\": run_id, \"status\": \"completed\", \"context\": context.snapshot()}", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/workflow/engine/workflow_engine.py:WorkflowEngine", + "span_start": 10, + "span_end": 86, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.workflow.engine.workflow_engine", + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "## Объяснение сущности `WorkflowEngine`\n\n### Назначение\nКласс `WorkflowEngine` является основным компонентом конвейера выполнения рабочих процессов (`workflow`) в приложении. Он отвечает за управление жизненным циклом рабочего процесса, отслеживание состояния его выполнения и взаимодействие с внешними хранилищами данных для сохранения прогресса выполнения.\n\n### Ключевые зависимости\n- **workflow**: определение рабочего процесса, включая начальные и конечные узлы, а также переходы между ними.\n- **persistence**: механизм хранения информации о текущем состоянии выполнения рабочего процесса.\n- **traces**: логирование и мониторинг текущего состояния выполнения.\n- **hooks**: дополнительные пользовательские обработчики событий, позволяющие расширять поведение рабочего процесса.\n\n### Поток данных или вызовов\n1. При инициализации класса вызывается метод `__init__`, который принимает следующие параметры:\n - `workflow`: объект определения рабочего процесса.\n - `persistence`: механизм постоянного хранения состояния.\n - `traces`: компонент логирования и мониторинга.\n - `hooks`: дополнительные пользовательские обработчики событий.\n \n2. После инициализации рабочий процесс запускается через метод `run`. Этот метод выполняет следующие шаги:\n - Получает идентификатор текущей рабочей сессии (`run_id`) от механизма постоянного хранения (`persistence`).\n - Сохраняет текущее состояние выполнения в контексте выполнения.\n - Запускает первый шаг рабочего процесса, записывая текущий узел в контекст выполнения.\n - Циклически переходит к следующему узлу до тех пор, пока не достигнет конечного узла.\n\n3. Внутри цикла происходит обработка каждого шага рабочего процесса следующим образом:\n - Определяется следующий узел по имени текущего узла.\n - Выполняются действия, связанные с текущим узлом.\n - Текущий узел сохраняется в контексте выполнения.\n\n### Важные детали реализации\n- **Переходы между узлами**: переходы внутри рабочего процесса определяются внутренними связями узлов. Каждый узел имеет ссылку на следующий узел в рабочем процессе.\n- **Логирование и мониторинг**: все этапы выполнения регистрируются с помощью механизма логирования (`logging`), что позволяет отслеживать прогресс выполнения рабочего процесса.\n- **Постоянное хранение состояния**: рабочее состояние хранится во внешней системе постоянного хранения (`persistence`), что обеспечивает возможность восстановления работы после прерывания.\n- **Пользовательские расширения**: при помощи интерфейса `WorkflowEngineHooks` можно легко добавлять кастомные функции-обработчики, которые будут выполняться в определенные моменты жизненного цикла рабочего процесса.\n\n---\n\n### Косвенные признаки и осторожные выводы\n- Файл [src/app_runtime/workflow/engine/workflow_engine.py](C1_SYMBOL_CATALOG): файл содержит реализацию класса `WorkflowEngine`.\n- Взаимодействие с другими модулями через механизм HTTP API ([C3_ENTRYPOINTS]: src/app_runtime/control/http_app.py | app.post), однако конкретные детали этого взаимодействия напрямую не видны из предоставленного контекста.\n\nЭтот обзор основан исключительно на доступных файлах и слоях анализа RAG, поэтому некоторые аспекты могут быть оценены осторожно.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS", + "C4_SEMANTIC_ROLES" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "WorkflowEngine" + ], + "keyword_hints": [ + "WorkflowEngine" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "WorkflowEngine", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "WorkflowEngine", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "WorkflowEngine", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "WorkflowEngine", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "WorkflowEngine", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 2, + "candidates_after_filter": 2 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "WorkflowEngine", + "alternatives": [ + "WorkflowEngine", + "WorkflowEngineHooks" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 2, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 139, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 45, + "C0_SOURCE_CHUNKS": 21, + "C4_SEMANTIC_ROLES": 15, + "C2_DEPENDENCY_GRAPH": 45, + "C3_ENTRYPOINTS": 10 + }, + "merge_rank": 29, + "prompt_build": 0, + "llm_call": 4329 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 780, + "evidence_rows": 13, + "evidence_chars": 4423 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 2, + "unique_paths": 2 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 1 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_explain_ru_v1", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "WorkflowEngine" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 13, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-fullchain-explain-workflow-engine", + "mode": "full_chain", + "run_started_at": "2026-03-12T11:21:59", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Объясни класс WorkflowEngine", + "normalized_query": "Объясни класс WorkflowEngine" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Объясни класс WorkflowEngine" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни класс WorkflowEngine" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "WorkflowEngine" + ], + "keyword_hints": [ + "WorkflowEngine" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Объясни класс WorkflowEngine" + }, + "output": { + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "WorkflowEngine", + "alternatives": [ + "WorkflowEngine", + "WorkflowEngineHooks" + ], + "confidence": 0.99 + }, + "rag_count": 13, + "rag_rows": [ + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "class WorkflowEngine\nWorkflowEngine", + "layer": "C1_SYMBOL_CATALOG", + "title": "WorkflowEngine", + "span_start": 10, + "span_end": 86, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "57ec0a9f11c542c78e008684a888397e8d9ef4223671acb2567e631a0cbc70b4", + "qname": "WorkflowEngine", + "kind": "class", + "signature": "WorkflowEngine", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.workflow.engine.workflow_engine", + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/hooks.py", + "content": "class WorkflowEngineHooks\nWorkflowEngineHooks", + "layer": "C1_SYMBOL_CATALOG", + "title": "WorkflowEngineHooks", + "span_start": 6, + "span_end": 14, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "914123ed510540061e116100fc87bba4195595ba696f8bfde2fd77ac6a5cd7e4", + "qname": "WorkflowEngineHooks", + "kind": "class", + "signature": "WorkflowEngineHooks", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.workflow.engine.hooks", + "is_test": false, + "blob_sha": "4b11672b0a9af1ae04bfce9d8e1f96572997d3e65e68108d7c797b88fa5fa47a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowEngine", + "span_start": 10, + "span_end": 86, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "57ec0a9f11c542c78e008684a888397e8d9ef4223671acb2567e631a0cbc70b4", + "symbol_name": "WorkflowEngine", + "qname": "WorkflowEngine", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine.__init__\n -> WorkflowEngine._transition_resolver\n -> WorkflowEngine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowEngine.__init__:dataflow_slice", + "span_start": 14, + "span_end": 63, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3abf07e5c245e0fe59785ba2d569c2ee56018715fc7f625a044ddaf6201f903d", + "edge_type": "dataflow_slice", + "src_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "src_qname": "WorkflowEngine.__init__", + "dst_symbol_id": "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8", + "dst_ref": "WorkflowEngine.run", + "resolution": "resolved", + "slice_id": "3abf07e5c245e0fe59785ba2d569c2ee56018715fc7f625a044ddaf6201f903d", + "root_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "path_symbols": [ + "WorkflowEngine.__init__", + "WorkflowEngine._transition_resolver", + "WorkflowEngine.run" + ], + "path_symbol_ids": [ + "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine.__init__\n -> WorkflowEngine._hooks\n -> WorkflowEngine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowEngine.__init__:dataflow_slice", + "span_start": 16, + "span_end": 34, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d73db644b69c1eb35afd6eae9d6ac8674e49e30e9bcf9c020f9fdbfe754851b2", + "edge_type": "dataflow_slice", + "src_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "src_qname": "WorkflowEngine.__init__", + "dst_symbol_id": "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8", + "dst_ref": "WorkflowEngine.run", + "resolution": "resolved", + "slice_id": "d73db644b69c1eb35afd6eae9d6ac8674e49e30e9bcf9c020f9fdbfe754851b2", + "root_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "path_symbols": [ + "WorkflowEngine.__init__", + "WorkflowEngine._hooks", + "WorkflowEngine.run" + ], + "path_symbol_ids": [ + "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine.__init__\n -> WorkflowEngine._workflow\n -> WorkflowEngine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowEngine.__init__:dataflow_slice", + "span_start": 12, + "span_end": 29, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "b45ef3c54669b4910a8aed3a565804f275424a24007bc7e3c953389521f80249", + "edge_type": "dataflow_slice", + "src_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "src_qname": "WorkflowEngine.__init__", + "dst_symbol_id": "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8", + "dst_ref": "WorkflowEngine.run", + "resolution": "resolved", + "slice_id": "b45ef3c54669b4910a8aed3a565804f275424a24007bc7e3c953389521f80249", + "root_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "path_symbols": [ + "WorkflowEngine.__init__", + "WorkflowEngine._workflow", + "WorkflowEngine.run" + ], + "path_symbol_ids": [ + "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine.__init__\n -> WorkflowEngine._persistence\n -> WorkflowEngine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowEngine.__init__:dataflow_slice", + "span_start": 13, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "8101338770016324ce05d61daa9935a444c75e6c94a0fae4275d5b50fcbcc70b", + "edge_type": "dataflow_slice", + "src_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "src_qname": "WorkflowEngine.__init__", + "dst_symbol_id": "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8", + "dst_ref": "WorkflowEngine.run", + "resolution": "resolved", + "slice_id": "8101338770016324ce05d61daa9935a444c75e6c94a0fae4275d5b50fcbcc70b", + "root_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "path_symbols": [ + "WorkflowEngine.__init__", + "WorkflowEngine._persistence", + "WorkflowEngine.run" + ], + "path_symbol_ids": [ + "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine.__init__\n -> WorkflowEngine._traces\n -> WorkflowEngine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowEngine.__init__:dataflow_slice", + "span_start": 15, + "span_end": 27, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "5006266616d534d721648391565e2ac0c9e7e9d9f8df00c17fba8989afb533a5", + "edge_type": "dataflow_slice", + "src_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "src_qname": "WorkflowEngine.__init__", + "dst_symbol_id": "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8", + "dst_ref": "WorkflowEngine.run", + "resolution": "resolved", + "slice_id": "5006266616d534d721648391565e2ac0c9e7e9d9f8df00c17fba8989afb533a5", + "root_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "path_symbols": [ + "WorkflowEngine.__init__", + "WorkflowEngine._traces", + "WorkflowEngine.run" + ], + "path_symbol_ids": [ + "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine.__init__\n -> WorkflowEngine._logger\n -> WorkflowEngine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowEngine.__init__:dataflow_slice", + "span_start": 17, + "span_end": 85, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "2f9927abb24794adb056b94bfb5d8538a5cbafb160da2079f52fca97fd694a2b", + "edge_type": "dataflow_slice", + "src_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "src_qname": "WorkflowEngine.__init__", + "dst_symbol_id": "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8", + "dst_ref": "WorkflowEngine.run", + "resolution": "resolved", + "slice_id": "2f9927abb24794adb056b94bfb5d8538a5cbafb160da2079f52fca97fd694a2b", + "root_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "path_symbols": [ + "WorkflowEngine.__init__", + "WorkflowEngine._logger", + "WorkflowEngine.run" + ], + "path_symbol_ids": [ + "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "class WorkflowEngine:\n def __init__(self, workflow, persistence, *, traces, hooks: WorkflowEngineHooks | None = None) -> None:\n self._workflow = workflow\n self._persistence = persistence\n self._transition_resolver = TransitionResolver()\n self._traces = traces\n self._hooks = hooks or WorkflowEngineHooks()\n self._logger = logging.getLogger(__name__)\n\n def run(self, context: WorkflowContext) -> dict[str, object]:\n run_id = self._persistence.start_run(\n self._workflow.definition.name,\n self._workflow.definition.start_at,\n context.snapshot(),\n )\n context.state.setdefault(\"runtime\", {})\n context.state[\"runtime\"][\"workflow_run_id\"] = run_id\n self._traces.step(\"workflow\")\n self._traces.info(\"Workflow started.\", status=\"started\", attrs={\"workflow_run_id\": run_id})\n current_name = self._workflow.definition.start_at\n while current_name is not None:\n node = self._workflow.definition.nodes[current_name]\n context.state[\"runtime\"][\"current_node\"] = current_name\n self._logger.info(\"Workflow run %s: step '%s' started.\", run_id, current_name)\n self._hooks.on_step_started(context, current_name)\n self._persistence.start_step(run_id, current_name, context.snapshot())\n self._traces.step(current_name)\n self._traces.debug(\n f\"Step '{current_name}' started.\",\n status=\"started\",\n attrs={\"workflow_run_id\": run_id, \"node\": current_name},\n )\n try:\n result = node.step.run(context)\n except Exception as error:\n self._persistence.fail_step(run_id, current_name, context.snapshot(), error)\n self._persistence.fail_run(run_id, context.snapshot())\n self._traces.error(\n f\"Step '{current_name}' failed: {error}\",\n status=\"failed\",\n attrs={\"exception_type\": type(error).__name__},\n )\n self._logger.exception(\"Workflow run %s: step '%s' failed.\", run_id, current_name)\n self._hooks.on_step_failed(context, current_name)\n raise\n context.state.update(result.updates)\n self._persistence.complete_step(\n run_id,\n current_name,\n result.status,\n result.transition,\n context.snapshot(),\n )\n next_node = self._transition_resolver.resolve(node, result)\n self._traces.debug(\n f\"Step '{current_name}' completed with transition '{result.transition}'.\",\n status=result.status,\n attrs={\n \"workflow_run_id\": run_id,\n \"from_node\": current_name,\n \"transition\": result.transition,\n \"to_node\": next_node,\n },\n )\n self._logger.info(\n \"Workflow run %s: step '%s' completed with transition '%s'.\",\n run_id,\n current_name,\n result.transition,\n )\n self._hooks.on_step_finished(context, current_name)\n current_name = next_node\n self._persistence.complete_run(run_id, context.snapshot())\n self._traces.step(\"workflow\")\n self._traces.info(\"Workflow completed.\", status=\"completed\", attrs={\"workflow_run_id\": run_id})\n self._logger.info(\"Workflow run %s completed.\", run_id)\n return {\"run_id\": run_id, \"status\": \"completed\", \"context\": context.snapshot()}", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/workflow/engine/workflow_engine.py:WorkflowEngine", + "span_start": 10, + "span_end": 86, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.workflow.engine.workflow_engine", + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "WorkflowEngine", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "WorkflowEngine", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "WorkflowEngine", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "WorkflowEngine", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "WorkflowEngine", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 2, + "candidates_after_filter": 2 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "WorkflowEngine", + "alternatives": [ + "WorkflowEngine", + "WorkflowEngineHooks" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 2, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 139, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 45, + "C0_SOURCE_CHUNKS": 21, + "C4_SEMANTIC_ROLES": 15, + "C2_DEPENDENCY_GRAPH": 45, + "C3_ENTRYPOINTS": 10 + }, + "merge_rank": 29 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Объясни класс WorkflowEngine", + "rag_count": 13 + }, + "output": { + "llm_answer": "## Объяснение сущности `WorkflowEngine`\n\n### Назначение\nКласс `WorkflowEngine` является основным компонентом конвейера выполнения рабочих процессов (`workflow`) в приложении. Он отвечает за управление жизненным циклом рабочего процесса, отслеживание состояния его выполнения и взаимодействие с внешними хранилищами данных для сохранения прогресса выполнения.\n\n### Ключевые зависимости\n- **workflow**: определение рабочего процесса, включая начальные и конечные узлы, а также переходы между ними.\n- **persistence**: механизм хранения информации о текущем состоянии выполнения рабочего процесса.\n- **traces**: логирование и мониторинг текущего состояния выполнения.\n- **hooks**: дополнительные пользовательские обработчики событий, позволяющие расширять поведение рабочего процесса.\n\n### Поток данных или вызовов\n1. При инициализации класса вызывается метод `__init__`, который принимает следующие параметры:\n - `workflow`: объект определения рабочего процесса.\n - `persistence`: механизм постоянного хранения состояния.\n - `traces`: компонент логирования и мониторинга.\n - `hooks`: дополнительные пользовательские обработчики событий.\n \n2. После инициализации рабочий процесс запускается через метод `run`. Этот метод выполняет следующие шаги:\n - Получает идентификатор текущей рабочей сессии (`run_id`) от механизма постоянного хранения (`persistence`).\n - Сохраняет текущее состояние выполнения в контексте выполнения.\n - Запускает первый шаг рабочего процесса, записывая текущий узел в контекст выполнения.\n - Циклически переходит к следующему узлу до тех пор, пока не достигнет конечного узла.\n\n3. Внутри цикла происходит обработка каждого шага рабочего процесса следующим образом:\n - Определяется следующий узел по имени текущего узла.\n - Выполняются действия, связанные с текущим узлом.\n - Текущий узел сохраняется в контексте выполнения.\n\n### Важные детали реализации\n- **Переходы между узлами**: переходы внутри рабочего процесса определяются внутренними связями узлов. Каждый узел имеет ссылку на следующий узел в рабочем процессе.\n- **Логирование и мониторинг**: все этапы выполнения регистрируются с помощью механизма логирования (`logging`), что позволяет отслеживать прогресс выполнения рабочего процесса.\n- **Постоянное хранение состояния**: рабочее состояние хранится во внешней системе постоянного хранения (`persistence`), что обеспечивает возможность восстановления работы после прерывания.\n- **Пользовательские расширения**: при помощи интерфейса `WorkflowEngineHooks` можно легко добавлять кастомные функции-обработчики, которые будут выполняться в определенные моменты жизненного цикла рабочего процесса.\n\n---\n\n### Косвенные признаки и осторожные выводы\n- Файл [src/app_runtime/workflow/engine/workflow_engine.py](C1_SYMBOL_CATALOG): файл содержит реализацию класса `WorkflowEngine`.\n- Взаимодействие с другими модулями через механизм HTTP API ([C3_ENTRYPOINTS]: src/app_runtime/control/http_app.py | app.post), однако конкретные детали этого взаимодействия напрямую не видны из предоставленного контекста.\n\nЭтот обзор основан исключительно на доступных файлах и слоях анализа RAG, поэтому некоторые аспекты могут быть оценены осторожно." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 780, + "evidence_rows": 13, + "evidence_chars": 4423 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 2, + "unique_paths": 2 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 1 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_explain_ru_v1", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 4329 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_112158/full_chain_plba_code_retrieval_plba-fullchain-explain-workflow-engine.md b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_112158/full_chain_plba_code_retrieval_plba-fullchain-explain-workflow-engine.md new file mode 100644 index 0000000..2e24afe --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_112158/full_chain_plba_code_retrieval_plba-fullchain-explain-workflow-engine.md @@ -0,0 +1,34 @@ +# plba-fullchain-explain-workflow-engine + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_retrieval.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Объясни класс WorkflowEngine + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 13, + "llm_answer": "## Объяснение сущности `WorkflowEngine`\n\n### Назначение\nКласс `WorkflowEngine` является основным компонентом конвейера выполнения рабочих процессов (`workflow`) в приложении. Он отвечает за управление жизненным циклом рабочего процесса, отслеживание состояния его выполнения и взаимодействие с внешними хранилищами данных для сохранения прогресса выполнения.\n\n### Ключевые зависимости\n- **workflow**: определение рабочего процесса, включая начальные и конечные узлы, а также переходы между ними.\n- **persistence**: механизм хранения информации о текущем состоянии выполнения рабочего процесса.\n- **traces**: логирование и мониторинг текущего состояния выполнения.\n- **hooks**: дополнительные пользовательские обработчики событий, позволяющие расширять поведение рабочего процесса.\n\n### Поток данных или вызовов\n1. При инициализации класса вызывается метод `__init__`, который принимает следующие параметры:\n - `workflow`: объект определения рабочего процесса.\n - `persistence`: механизм постоянного хранения состояния.\n - `traces`: компонент логирования и мониторинга.\n - `hooks`: дополнительные пользовательские обработчики событий.\n \n2. После инициализации рабочий процесс запускается через метод `run`. Этот метод выполняет следующие шаги:\n - Получает идентификатор текущей рабочей сессии (`run_id`) от механизма постоянного хранения (`persistence`).\n - Сохраняет текущее состояние выполнения в контексте выполнения.\n - Запускает первый шаг рабочего процесса, записывая текущий узел в контекст выполнения.\n - Циклически переходит к следующему узлу до тех пор, пока не достигнет конечного узла.\n\n3. Внутри цикла происходит обработка каждого шага рабочего процесса следующим образом:\n - Определяется следующий узел по имени текущего узла.\n - Выполняются действия, связанные с текущим узлом.\n - Текущий узел сохраняется в контексте выполнения.\n\n### Важные детали реализации\n- **Переходы между узлами**: переходы внутри рабочего процесса определяются внутренними связями узлов. Каждый узел имеет ссылку на следующий узел в рабочем процессе.\n- **Логирование и мониторинг**: все этапы выполнения регистрируются с помощью механизма логирования (`logging`), что позволяет отслеживать прогресс выполнения рабочего процесса.\n- **Постоянное хранение состояния**: рабочее состояние хранится во внешней системе постоянного хранения (`persistence`), что обеспечивает возможность восстановления работы после прерывания.\n- **Пользовательские расширения**: при помощи интерфейса `WorkflowEngineHooks` можно легко добавлять кастомные функции-обработчики, которые будут выполняться в определенные моменты жизненного цикла рабочего процесса.\n\n---\n\n### Косвенные признаки и осторожные выводы\n- Файл [src/app_runtime/workflow/engine/workflow_engine.py](C1_SYMBOL_CATALOG): файл содержит реализацию класса `WorkflowEngine`.\n- Взаимодействие с другими модулями через механизм HTTP API ([C3_ENTRYPOINTS]: src/app_runtime/control/http_app.py | app.post), однако конкретные детали этого взаимодействия напрямую не видны из предоставленного контекста.\n\nЭтот обзор основан исключительно на доступных файлах и слоях анализа RAG, поэтому некоторые аспекты могут быть оценены осторожно.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "WorkflowEngine" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_112158/summary.md b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_112158/summary.md new file mode 100644 index 0000000..ed105f9 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_112158/summary.md @@ -0,0 +1,20 @@ +# pipeline_setup_v2 summary + +Passed: 6/6 + +| File | Case | Runner | Mode | Intent | Sub-intent | Pass | +|------|------|--------|------|--------|------------|------| +| full_chain_plba_code_retrieval.yaml | plba-fullchain-explain-runtime-manager | runtime | full_chain | CODE_QA | EXPLAIN | ✓ | +| full_chain_plba_code_retrieval.yaml | plba-fullchain-explain-http-control-channel | runtime | full_chain | CODE_QA | EXPLAIN | ✓ | +| full_chain_plba_code_retrieval.yaml | plba-fullchain-explain-control-plane-service | runtime | full_chain | CODE_QA | EXPLAIN | ✓ | +| full_chain_plba_code_retrieval.yaml | plba-fullchain-explain-trace-service | runtime | full_chain | CODE_QA | EXPLAIN | ✓ | +| full_chain_plba_code_retrieval.yaml | plba-fullchain-explain-create-runtime | runtime | full_chain | CODE_QA | EXPLAIN | ✓ | +| full_chain_plba_code_retrieval.yaml | plba-fullchain-explain-workflow-engine | runtime | full_chain | CODE_QA | EXPLAIN | ✓ | + +## LLM Answers +- **plba-fullchain-explain-runtime-manager**: ## Назначение класса `RuntimeManager` Класс `RuntimeManager` предназначен для управления жизненным циклом приложения и координации различных компонентов системы во время выполнения. Он играет роль менеджера процессов и отвечает за управление состоянием приложения, регистрацию сервисов и координацию работы рабочих потоков (`workers`). ## Ключевые зависимости - **ConfigurationManager**: Менеджер конфигурации, используется для загрузки настроек приложения. - **ServiceContainer**: Контейнер сервисов, содержащий различные сервисы и модули приложения. - **TraceService**: Сервис трассировки, собирает информацию о выполнении запросов и событиях. - **HealthRegistry**: Регистратор состояния здоровья системы, отслеживает состояние различных модулей и сервисов. - **LogManager**: Менеджер логирования, регистрирует события и ошибки. - **WorkerSupervisor**: Наблюдатель за рабочими… +- **plba-fullchain-explain-http-control-channel**: ## Объяснение работы класса `HttpControlChannel` ### Назначение Класс `HttpControlChannel` является компонентом системы управления состоянием и взаимодействия с внешним миром через HTTP-протокол. Он реализует механизм обмена данными и состояниями между компонентами приложения через HTTP-запросы и ответы. ### Ключевые зависимости Ключевыми зависимостями являются: - `UvicornThreadRunner`: используется для запуска асинхронного сервера на основе библиотеки Uvicorn. - `HttpControlAppFactory`: фабрика приложений, которая отвечает за создание экземпляров FastAPI приложения. - `ControlActionSet`: набор действий, связанных с управлением состоянием и поведением приложения. ### Поток данных или вызовов Поток данных и вызовов выглядит следующим образом: 1. **Инициализация (`__init__`)**: - При создании экземпляра класса задаются параметры хоста, порта и тайм-аута. - Создается об… +- **plba-fullchain-explain-control-plane-service**: ## Назначение `ControlPlaneService` — это сущность, отвечающая за управление каналами (`ControlChannel`) и координацию действий по запуску и остановке различных компонентов системы. Этот сервис играет роль `pipeline_stage`, что указывает на его участие в конвейере обработки данных или управлении состоянием приложения. ## Ключевые зависимости ### Файлы и сущности - **src/app_runtime/control/service.py**: местоположение определения класса `ControlPlaneService`. - Используется библиотека **asyncio** для асинхронного выполнения задач. ### Внешние зависимости - `RuntimeManager`: менеджер управления рабочим окружением и состоянием приложения. - `ControlChannel`: каналы взаимодействия с внешними компонентами или службами. - `ControlActionSet`: набор действий, которые могут быть выполнены при старте или останове сервиса. ## Поток данных или вызовов 1. **Инициализация и регис… +- **plba-fullchain-explain-trace-service**: ## Объяснение работы `TraceService` ### Назначение `TraceService` — это сервис, предназначенный для управления контекстом трассировки и записи логических событий во время выполнения программы. Он участвует в потоке данных системы, обеспечивая запись информации о каждом этапе выполнения с возможностью последующего анализа и мониторинга. ### Ключевые зависимости - **TraceContextFactory**: Базовый класс, от которого наследуется `TraceService`. - **TraceTransport**: Интерфейс транспортировки данных трассировки. - **TraceContextStore**: Класс для хранения контекста трассировки. - **NoOpTraceTransport**: Специальная реализация `TraceTransport`, используемая при отсутствии реальной транспортной инфраструктуры. - **TraceRecordWriter**: Вспомогательный класс для записи записей трассировки в транспортную систему. ### Поток данных или вызовов 1. При инициализации (`__init__`) с… +- **plba-fullchain-explain-create-runtime**: ## Объяснение функции `create_runtime` ### Назначение Функция `create_runtime` предназначена для инициализации и настройки окружения выполнения приложения (`runtime`), используя параметры конфигурации и дополнительные опции управления HTTP-интерфейсом. ### Ключевые зависимости Функция зависит от следующих компонентов и библиотек: - **`RuntimeManager`** — главный менеджер окружения выполнения, регистрирующий модули и настраивающий каналы управления. - **`ApplicationModule`** — модуль приложения, подлежащий регистрации в менеджере среды выполнения. - **`HttpControlChannel`** — канал управления, обеспечивающий взаимодействие с внешним интерфейсом через HTTP. ### Поток данных или вызовов 1. Создаётся экземпляр менеджера окружения выполнения (`RuntimeManager`) и передаётся в возвращаемое значение. 2. Если указан путь к файлу конфигурации (`config_path`), файл добавляется… +- **plba-fullchain-explain-workflow-engine**: ## Объяснение сущности `WorkflowEngine` ### Назначение Класс `WorkflowEngine` является основным компонентом конвейера выполнения рабочих процессов (`workflow`) в приложении. Он отвечает за управление жизненным циклом рабочего процесса, отслеживание состояния его выполнения и взаимодействие с внешними хранилищами данных для сохранения прогресса выполнения. ### Ключевые зависимости - **workflow**: определение рабочего процесса, включая начальные и конечные узлы, а также переходы между ними. - **persistence**: механизм хранения информации о текущем состоянии выполнения рабочего процесса. - **traces**: логирование и мониторинг текущего состояния выполнения. - **hooks**: дополнительные пользовательские обработчики событий, позволяющие расширять поведение рабочего процесса. ### Поток данных или вызовов 1. При инициализации класса вызывается метод `__init__`, который приним… \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_114413/full_chain_plba_code_retrieval_plba-fullchain-explain-control-plane-service.json b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_114413/full_chain_plba_code_retrieval_plba-fullchain-explain-control-plane-service.json new file mode 100644 index 0000000..45b9d2d --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_114413/full_chain_plba_code_retrieval_plba-fullchain-explain-control-plane-service.json @@ -0,0 +1,2056 @@ +{ + "case_id": "plba-fullchain-explain-control-plane-service", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_retrieval.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 12, + "llm_answer": "## Объяснение сущности `ControlPlaneService`\n\n### Назначение\n`ControlPlaneService` — это сервисная сущность, ответственная за управление каналами (`ControlChannel`) и выполнение действий по управлению жизненным циклом приложения, таких как запуск, остановка и мониторинг состояния системы.\n\n### Ключевые зависимости\n- **`ControlChannel`**: Канал управления, через который передаются сообщения о событиях и действиях.\n- **`RuntimeManager`**: Менеджер выполнения среды исполнения, содержащий состояние и другие объекты для работы с приложением.\n- **`ControlActionSet`**: Набор действий, которые могут быть выполнены при управлении состоянием системы.\n\n### Поток данных или вызовов\n1. **Инициализация** (`__init__`) \n - Инициализирует пустой список каналов `_channels`.\n \n2. **Регистрация канала** (`register_channel`) \n - Добавляет новый канал в список зарегистрированных каналов.\n\n3. **Запуск сервиса** (`start`) \n - Проверяет наличие зарегистрированных каналов. Если каналы присутствуют, вызывается асинхронная функция `_start_async`, которая выполняет следующие действия:\n - Вызывает метод `health_status` для получения текущего статуса здоровья системы.\n - Запускает приложение через метод `start_runtime`.\n \n4. **Остановка сервиса** (`stop`) \n - Аналогично проверяет наличие каналов и вызывает асинхронную функцию `_stop_async` для остановки всех запущенных процессов.\n\n5. **Создание снимка состояния** (`snapshot`) \n - Собирает информацию о текущем состоянии системы, включая конфигурацию, модули, сервисы, работников и здоровье.\n\n6. **Асинхронные методы** \n - Асинхронные функции (`_start_async`, `_stop_async`) используются для выполнения длительных операций без блокировки основного потока программы.\n\n### Важные детали реализации\n- **Использование `asyncio.run()`**: Методы `start` и `stop` используют синхронный вызов асинхронных функций через `asyncio.run()`. Это необходимо для корректного завершения асинхронных задач.\n- **Декларативность**: Класс следует принципу декларативности, позволяя разработчикам легко регистрировать новые каналы и управлять ими через стандартные интерфейсы.\n- **Гибкость**: Возможность расширения функциональности через добавление новых методов и атрибутов в будущем.\n\n### Осторожные выводы\n- Детали взаимодействия с внешними компонентами, такими как `FastAPI HTTP POST` и другие внешние точки входа, основаны исключительно на анализе сигнатур и косвенных признаков.\n\n### Путь к файлу и имя сущности\n- Файл: `src/app_runtime/control/service.py`\n- Имя класса: `ControlPlaneService`", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "ControlPlaneService" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-fullchain-explain-control-plane-service", + "text": "Объясни класс ControlPlaneService", + "mode": "full_chain", + "run_started_at": "2026-03-12T11:44:13", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни класс ControlPlaneService", + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "ControlPlaneService", + "alternatives": [ + "ControlPlaneService" + ], + "confidence": 0.99 + }, + "rag_count": 12, + "rag_rows": [ + { + "path": "src/app_runtime/control/service.py", + "content": "class ControlPlaneService\nControlPlaneService", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "qname": "ControlPlaneService", + "kind": "class", + "signature": "ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.register_channel reads_attr self._channels.append", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.register_channel:reads_attr", + "span_start": 17, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "1ee5925deffdc38ba15b88bf7c89e5fcd1a78f493fe30f2deb827d714a1b18e8", + "edge_type": "reads_attr", + "src_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "src_qname": "ControlPlaneService.register_channel", + "dst_symbol_id": null, + "dst_ref": "self._channels.append", + "resolution": "partial", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "class ControlPlaneService:\n def __init__(self) -> None:\n self._channels: list[ControlChannel] = []\n\n def register_channel(self, channel: ControlChannel) -> None:\n self._channels.append(channel)\n\n def start(self, runtime: RuntimeManager) -> None:\n if not self._channels:\n return\n asyncio.run(self._start_async(runtime))\n\n def stop(self) -> None:\n if not self._channels:\n return\n asyncio.run(self._stop_async())\n\n def snapshot(self, runtime: RuntimeManager) -> dict[str, object]:\n health = runtime.current_health()\n return {\n \"runtime\": {\"state\": runtime._state.value},\n \"modules\": list(runtime.registry.modules),\n \"services\": runtime.services.snapshot(),\n \"workers\": runtime.workers.snapshot(),\n \"health\": runtime.health.snapshot(runtime.workers.healths()) | {\"status\": health[\"status\"]},\n \"config\": runtime.configuration.get(),\n }\n\n async def _start_async(self, runtime: RuntimeManager) -> None:\n actions = ControlActionSet(\n health=runtime.health_status,\n start=runtime.start_runtime,\n stop=runtime.stop_runtime,\n status=runtime.runtime_status,\n )\n for channel in self._channels:\n await channel.start(actions)\n\n async def _stop_async(self) -> None:\n for channel in reversed(self._channels):\n await channel.stop()", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/service.py:ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "## Объяснение сущности `ControlPlaneService`\n\n### Назначение\n`ControlPlaneService` — это сервисная сущность, ответственная за управление каналами (`ControlChannel`) и выполнение действий по управлению жизненным циклом приложения, таких как запуск, остановка и мониторинг состояния системы.\n\n### Ключевые зависимости\n- **`ControlChannel`**: Канал управления, через который передаются сообщения о событиях и действиях.\n- **`RuntimeManager`**: Менеджер выполнения среды исполнения, содержащий состояние и другие объекты для работы с приложением.\n- **`ControlActionSet`**: Набор действий, которые могут быть выполнены при управлении состоянием системы.\n\n### Поток данных или вызовов\n1. **Инициализация** (`__init__`) \n - Инициализирует пустой список каналов `_channels`.\n \n2. **Регистрация канала** (`register_channel`) \n - Добавляет новый канал в список зарегистрированных каналов.\n\n3. **Запуск сервиса** (`start`) \n - Проверяет наличие зарегистрированных каналов. Если каналы присутствуют, вызывается асинхронная функция `_start_async`, которая выполняет следующие действия:\n - Вызывает метод `health_status` для получения текущего статуса здоровья системы.\n - Запускает приложение через метод `start_runtime`.\n \n4. **Остановка сервиса** (`stop`) \n - Аналогично проверяет наличие каналов и вызывает асинхронную функцию `_stop_async` для остановки всех запущенных процессов.\n\n5. **Создание снимка состояния** (`snapshot`) \n - Собирает информацию о текущем состоянии системы, включая конфигурацию, модули, сервисы, работников и здоровье.\n\n6. **Асинхронные методы** \n - Асинхронные функции (`_start_async`, `_stop_async`) используются для выполнения длительных операций без блокировки основного потока программы.\n\n### Важные детали реализации\n- **Использование `asyncio.run()`**: Методы `start` и `stop` используют синхронный вызов асинхронных функций через `asyncio.run()`. Это необходимо для корректного завершения асинхронных задач.\n- **Декларативность**: Класс следует принципу декларативности, позволяя разработчикам легко регистрировать новые каналы и управлять ими через стандартные интерфейсы.\n- **Гибкость**: Возможность расширения функциональности через добавление новых методов и атрибутов в будущем.\n\n### Осторожные выводы\n- Детали взаимодействия с внешними компонентами, такими как `FastAPI HTTP POST` и другие внешние точки входа, основаны исключительно на анализе сигнатур и косвенных признаков.\n\n### Путь к файлу и имя сущности\n- Файл: `src/app_runtime/control/service.py`\n- Имя класса: `ControlPlaneService`", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS", + "C4_SEMANTIC_ROLES" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "ControlPlaneService" + ], + "keyword_hints": [ + "ControlPlaneService" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "ControlPlaneService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "ControlPlaneService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "ControlPlaneService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "ControlPlaneService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "ControlPlaneService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "ControlPlaneService", + "alternatives": [ + "ControlPlaneService" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 146, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 44, + "C0_SOURCE_CHUNKS": 17, + "C4_SEMANTIC_ROLES": 15, + "C2_DEPENDENCY_GRAPH": 55, + "C3_ENTRYPOINTS": 13 + }, + "merge_rank": 26, + "prompt_build": 0, + "llm_call": 4257 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 797, + "evidence_rows": 12, + "evidence_chars": 2301 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 1 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_explain_ru_v1", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "ControlPlaneService" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 12, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-fullchain-explain-control-plane-service", + "mode": "full_chain", + "run_started_at": "2026-03-12T11:44:13", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Объясни класс ControlPlaneService", + "normalized_query": "Объясни класс ControlPlaneService" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Объясни класс ControlPlaneService" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни класс ControlPlaneService" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "ControlPlaneService" + ], + "keyword_hints": [ + "ControlPlaneService" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Объясни класс ControlPlaneService" + }, + "output": { + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "ControlPlaneService", + "alternatives": [ + "ControlPlaneService" + ], + "confidence": 0.99 + }, + "rag_count": 12, + "rag_rows": [ + { + "path": "src/app_runtime/control/service.py", + "content": "class ControlPlaneService\nControlPlaneService", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "qname": "ControlPlaneService", + "kind": "class", + "signature": "ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.register_channel reads_attr self._channels.append", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.register_channel:reads_attr", + "span_start": 17, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "1ee5925deffdc38ba15b88bf7c89e5fcd1a78f493fe30f2deb827d714a1b18e8", + "edge_type": "reads_attr", + "src_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "src_qname": "ControlPlaneService.register_channel", + "dst_symbol_id": null, + "dst_ref": "self._channels.append", + "resolution": "partial", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "class ControlPlaneService:\n def __init__(self) -> None:\n self._channels: list[ControlChannel] = []\n\n def register_channel(self, channel: ControlChannel) -> None:\n self._channels.append(channel)\n\n def start(self, runtime: RuntimeManager) -> None:\n if not self._channels:\n return\n asyncio.run(self._start_async(runtime))\n\n def stop(self) -> None:\n if not self._channels:\n return\n asyncio.run(self._stop_async())\n\n def snapshot(self, runtime: RuntimeManager) -> dict[str, object]:\n health = runtime.current_health()\n return {\n \"runtime\": {\"state\": runtime._state.value},\n \"modules\": list(runtime.registry.modules),\n \"services\": runtime.services.snapshot(),\n \"workers\": runtime.workers.snapshot(),\n \"health\": runtime.health.snapshot(runtime.workers.healths()) | {\"status\": health[\"status\"]},\n \"config\": runtime.configuration.get(),\n }\n\n async def _start_async(self, runtime: RuntimeManager) -> None:\n actions = ControlActionSet(\n health=runtime.health_status,\n start=runtime.start_runtime,\n stop=runtime.stop_runtime,\n status=runtime.runtime_status,\n )\n for channel in self._channels:\n await channel.start(actions)\n\n async def _stop_async(self) -> None:\n for channel in reversed(self._channels):\n await channel.stop()", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/service.py:ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "ControlPlaneService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "ControlPlaneService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "ControlPlaneService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "ControlPlaneService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "ControlPlaneService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "ControlPlaneService", + "alternatives": [ + "ControlPlaneService" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 146, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 44, + "C0_SOURCE_CHUNKS": 17, + "C4_SEMANTIC_ROLES": 15, + "C2_DEPENDENCY_GRAPH": 55, + "C3_ENTRYPOINTS": 13 + }, + "merge_rank": 26 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Объясни класс ControlPlaneService", + "rag_count": 12 + }, + "output": { + "llm_answer": "## Объяснение сущности `ControlPlaneService`\n\n### Назначение\n`ControlPlaneService` — это сервисная сущность, ответственная за управление каналами (`ControlChannel`) и выполнение действий по управлению жизненным циклом приложения, таких как запуск, остановка и мониторинг состояния системы.\n\n### Ключевые зависимости\n- **`ControlChannel`**: Канал управления, через который передаются сообщения о событиях и действиях.\n- **`RuntimeManager`**: Менеджер выполнения среды исполнения, содержащий состояние и другие объекты для работы с приложением.\n- **`ControlActionSet`**: Набор действий, которые могут быть выполнены при управлении состоянием системы.\n\n### Поток данных или вызовов\n1. **Инициализация** (`__init__`) \n - Инициализирует пустой список каналов `_channels`.\n \n2. **Регистрация канала** (`register_channel`) \n - Добавляет новый канал в список зарегистрированных каналов.\n\n3. **Запуск сервиса** (`start`) \n - Проверяет наличие зарегистрированных каналов. Если каналы присутствуют, вызывается асинхронная функция `_start_async`, которая выполняет следующие действия:\n - Вызывает метод `health_status` для получения текущего статуса здоровья системы.\n - Запускает приложение через метод `start_runtime`.\n \n4. **Остановка сервиса** (`stop`) \n - Аналогично проверяет наличие каналов и вызывает асинхронную функцию `_stop_async` для остановки всех запущенных процессов.\n\n5. **Создание снимка состояния** (`snapshot`) \n - Собирает информацию о текущем состоянии системы, включая конфигурацию, модули, сервисы, работников и здоровье.\n\n6. **Асинхронные методы** \n - Асинхронные функции (`_start_async`, `_stop_async`) используются для выполнения длительных операций без блокировки основного потока программы.\n\n### Важные детали реализации\n- **Использование `asyncio.run()`**: Методы `start` и `stop` используют синхронный вызов асинхронных функций через `asyncio.run()`. Это необходимо для корректного завершения асинхронных задач.\n- **Декларативность**: Класс следует принципу декларативности, позволяя разработчикам легко регистрировать новые каналы и управлять ими через стандартные интерфейсы.\n- **Гибкость**: Возможность расширения функциональности через добавление новых методов и атрибутов в будущем.\n\n### Осторожные выводы\n- Детали взаимодействия с внешними компонентами, такими как `FastAPI HTTP POST` и другие внешние точки входа, основаны исключительно на анализе сигнатур и косвенных признаков.\n\n### Путь к файлу и имя сущности\n- Файл: `src/app_runtime/control/service.py`\n- Имя класса: `ControlPlaneService`" + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 797, + "evidence_rows": 12, + "evidence_chars": 2301 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 1 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_explain_ru_v1", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 4257 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_114413/full_chain_plba_code_retrieval_plba-fullchain-explain-control-plane-service.md b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_114413/full_chain_plba_code_retrieval_plba-fullchain-explain-control-plane-service.md new file mode 100644 index 0000000..df35e16 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_114413/full_chain_plba_code_retrieval_plba-fullchain-explain-control-plane-service.md @@ -0,0 +1,34 @@ +# plba-fullchain-explain-control-plane-service + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_retrieval.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Объясни класс ControlPlaneService + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 12, + "llm_answer": "## Объяснение сущности `ControlPlaneService`\n\n### Назначение\n`ControlPlaneService` — это сервисная сущность, ответственная за управление каналами (`ControlChannel`) и выполнение действий по управлению жизненным циклом приложения, таких как запуск, остановка и мониторинг состояния системы.\n\n### Ключевые зависимости\n- **`ControlChannel`**: Канал управления, через который передаются сообщения о событиях и действиях.\n- **`RuntimeManager`**: Менеджер выполнения среды исполнения, содержащий состояние и другие объекты для работы с приложением.\n- **`ControlActionSet`**: Набор действий, которые могут быть выполнены при управлении состоянием системы.\n\n### Поток данных или вызовов\n1. **Инициализация** (`__init__`) \n - Инициализирует пустой список каналов `_channels`.\n \n2. **Регистрация канала** (`register_channel`) \n - Добавляет новый канал в список зарегистрированных каналов.\n\n3. **Запуск сервиса** (`start`) \n - Проверяет наличие зарегистрированных каналов. Если каналы присутствуют, вызывается асинхронная функция `_start_async`, которая выполняет следующие действия:\n - Вызывает метод `health_status` для получения текущего статуса здоровья системы.\n - Запускает приложение через метод `start_runtime`.\n \n4. **Остановка сервиса** (`stop`) \n - Аналогично проверяет наличие каналов и вызывает асинхронную функцию `_stop_async` для остановки всех запущенных процессов.\n\n5. **Создание снимка состояния** (`snapshot`) \n - Собирает информацию о текущем состоянии системы, включая конфигурацию, модули, сервисы, работников и здоровье.\n\n6. **Асинхронные методы** \n - Асинхронные функции (`_start_async`, `_stop_async`) используются для выполнения длительных операций без блокировки основного потока программы.\n\n### Важные детали реализации\n- **Использование `asyncio.run()`**: Методы `start` и `stop` используют синхронный вызов асинхронных функций через `asyncio.run()`. Это необходимо для корректного завершения асинхронных задач.\n- **Декларативность**: Класс следует принципу декларативности, позволяя разработчикам легко регистрировать новые каналы и управлять ими через стандартные интерфейсы.\n- **Гибкость**: Возможность расширения функциональности через добавление новых методов и атрибутов в будущем.\n\n### Осторожные выводы\n- Детали взаимодействия с внешними компонентами, такими как `FastAPI HTTP POST` и другие внешние точки входа, основаны исключительно на анализе сигнатур и косвенных признаков.\n\n### Путь к файлу и имя сущности\n- Файл: `src/app_runtime/control/service.py`\n- Имя класса: `ControlPlaneService`", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "ControlPlaneService" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_114413/full_chain_plba_code_retrieval_plba-fullchain-explain-create-runtime.json b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_114413/full_chain_plba_code_retrieval_plba-fullchain-explain-create-runtime.json new file mode 100644 index 0000000..74b8d2f --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_114413/full_chain_plba_code_retrieval_plba-fullchain-explain-create-runtime.json @@ -0,0 +1,1896 @@ +{ + "case_id": "plba-fullchain-explain-create-runtime", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_retrieval.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 12, + "llm_answer": "## Функциональное назначение сущности `create_runtime`\nФункция `create_runtime` предназначена для инициализации и настройки окружения выполнения (`runtime environment`) приложения. Она создает объект типа `RuntimeManager`, регистрирует указанный модуль (`module`) и при необходимости добавляет конфигурационные файлы и каналы управления через HTTP.\n\n## Ключевые зависимости\n- **src/plba/bootstrap.py**: основной файл, содержащий реализацию функции `create_runtime`.\n- **RuntimeManager**: класс, управляющий состоянием и функциональностью runtime-среды.\n- **ApplicationModule**: абстрактный тип модуля приложения, передаваемый в функцию.\n- **HttpControlChannel**: компонент, обеспечивающий управление приложением по HTTP с заданными параметрами хоста, порта и тайм-аута.\n\n## Поток данных или вызовов\n1. Функция `create_runtime` принимает несколько аргументов:\n - `module`: экземпляр класса `ApplicationModule`, представляющий модуль приложения.\n - Дополнительные параметры конфигурации, такие как путь к файлу конфигурации (`config_path`), включение HTTP-контроля (`enable_http_control`), хост и порт для HTTP-канала управления, а также таймаут запроса.\n \n2. Внутри функции происходит следующее:\n - Создается новый объект `RuntimeManager`.\n - Если указан параметр `config_path`, вызывается метод `add_config_file` объекта `runtime`, чтобы добавить указанный файл конфигурации.\n - При включенном HTTP-контроле регистрируется канал управления `HttpControlChannel` с заданными параметрами.\n - Вызовом метода `register_module` экземпляра `runtime` добавляется переданный модуль приложения.\n\n3. После завершения всех операций функция возвращает созданный объект `RuntimeManager`.\n\n## Важные детали реализации\n1. **Параметры вызова**:\n - Параметр `config_path` позволяет указать путь к файлу конфигурации, который затем загружается и используется runtime-менеджером.\n - Параметр `enable_http_control` определяет необходимость регистрации канала управления HTTP, позволяющего взаимодействовать с приложением удаленно.\n\n2. **Использование внешних классов и объектов**:\n - Использование класса `RuntimeManager` для управления runtime-средой.\n - Применение класса `HttpControlChannel` для организации каналов управления через HTTP.\n\n3. **Роль `pipeline_stage`**:\n - Как отмечено в описании семантических ролей (`C4_SEMANTIC_ROLES`), данная сущность участвует в данных потоках (`dataflow slices`), но ее основная роль заключается в управлении состоянием и настройке runtime-среды.\n\n## Осторожные выводы\nНа основании доступного контекста сложно однозначно утверждать о точном потоке данных внутри runtime-среды после создания runtime. Косвенные признаки указывают на возможное взаимодействие с внешними сервисами или ресурсами, однако конкретная реализация этих взаимодействий вне данного контекста остается неизвестной.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "create_runtime" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-fullchain-explain-create-runtime", + "text": "Объясни функцию create_runtime", + "mode": "full_chain", + "run_started_at": "2026-03-12T11:44:13", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни функцию create_runtime", + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "create_runtime", + "alternatives": [ + "create_runtime" + ], + "confidence": 0.99 + }, + "rag_count": 12, + "rag_rows": [ + { + "path": "src/plba/bootstrap.py", + "content": "function create_runtime\ncreate_runtime(module)", + "layer": "C1_SYMBOL_CATALOG", + "title": "create_runtime", + "span_start": 8, + "span_end": 29, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "qname": "create_runtime", + "kind": "function", + "signature": "create_runtime(module)", + "parent_symbol_id": null, + "package_or_module": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime calls runtime.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:calls", + "span_start": 19, + "span_end": 19, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "4eaeec4ac55a59d5f66fd01c4754955f8fedaf4bc3df13fa769b352c7bfaacbb", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.add_config_file", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime reads_attr runtime.register_module", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:reads_attr", + "span_start": 28, + "span_end": 28, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "45516c79ff358dbf9b650a081668df0f66d2fe989300f985a1a78be6be166f8f", + "edge_type": "reads_attr", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.register_module", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:instantiates", + "span_start": 17, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "0adba17984f850ea1608c9e734d2dd5c325cfde3a8133123aa239e44935ad18e", + "edge_type": "instantiates", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": "27158ca220022eeb5083c6addf8a50775d45f7161284fd60aac48410105f4b98", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime calls runtime.register_module", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:calls", + "span_start": 28, + "span_end": 28, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "ab6003c3441addc1ba1b81edeca009165559f652f6b2cf424e5ae61b1f617de8", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.register_module", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime calls runtime.control_plane.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:calls", + "span_start": 21, + "span_end": 27, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "2678250030b9ce47a3b3b55fac7897ac530367edc8374ac9d5e6ecafb1e483f0", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.control_plane.register_channel", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime reads_attr runtime.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:reads_attr", + "span_start": 19, + "span_end": 19, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "30d4e8aae984ab84d523e80d02f1caeda52d547fa3d2aa47be8845931cabbca2", + "edge_type": "reads_attr", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.add_config_file", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "def create_runtime(\n module: ApplicationModule,\n *,\n config_path: str | None = None,\n enable_http_control: bool = False,\n control_host: str = \"127.0.0.1\",\n control_port: int = 8080,\n control_timeout: int = 5,\n) -> RuntimeManager:\n runtime = RuntimeManager()\n if config_path is not None:\n runtime.add_config_file(config_path)\n if enable_http_control:\n runtime.control_plane.register_channel(\n HttpControlChannel(\n host=control_host,\n port=control_port,\n timeout=control_timeout,\n )\n )\n runtime.register_module(module)\n return runtime", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/bootstrap.py:create_runtime", + "span_start": 8, + "span_end": 29, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "## Функциональное назначение сущности `create_runtime`\nФункция `create_runtime` предназначена для инициализации и настройки окружения выполнения (`runtime environment`) приложения. Она создает объект типа `RuntimeManager`, регистрирует указанный модуль (`module`) и при необходимости добавляет конфигурационные файлы и каналы управления через HTTP.\n\n## Ключевые зависимости\n- **src/plba/bootstrap.py**: основной файл, содержащий реализацию функции `create_runtime`.\n- **RuntimeManager**: класс, управляющий состоянием и функциональностью runtime-среды.\n- **ApplicationModule**: абстрактный тип модуля приложения, передаваемый в функцию.\n- **HttpControlChannel**: компонент, обеспечивающий управление приложением по HTTP с заданными параметрами хоста, порта и тайм-аута.\n\n## Поток данных или вызовов\n1. Функция `create_runtime` принимает несколько аргументов:\n - `module`: экземпляр класса `ApplicationModule`, представляющий модуль приложения.\n - Дополнительные параметры конфигурации, такие как путь к файлу конфигурации (`config_path`), включение HTTP-контроля (`enable_http_control`), хост и порт для HTTP-канала управления, а также таймаут запроса.\n \n2. Внутри функции происходит следующее:\n - Создается новый объект `RuntimeManager`.\n - Если указан параметр `config_path`, вызывается метод `add_config_file` объекта `runtime`, чтобы добавить указанный файл конфигурации.\n - При включенном HTTP-контроле регистрируется канал управления `HttpControlChannel` с заданными параметрами.\n - Вызовом метода `register_module` экземпляра `runtime` добавляется переданный модуль приложения.\n\n3. После завершения всех операций функция возвращает созданный объект `RuntimeManager`.\n\n## Важные детали реализации\n1. **Параметры вызова**:\n - Параметр `config_path` позволяет указать путь к файлу конфигурации, который затем загружается и используется runtime-менеджером.\n - Параметр `enable_http_control` определяет необходимость регистрации канала управления HTTP, позволяющего взаимодействовать с приложением удаленно.\n\n2. **Использование внешних классов и объектов**:\n - Использование класса `RuntimeManager` для управления runtime-средой.\n - Применение класса `HttpControlChannel` для организации каналов управления через HTTP.\n\n3. **Роль `pipeline_stage`**:\n - Как отмечено в описании семантических ролей (`C4_SEMANTIC_ROLES`), данная сущность участвует в данных потоках (`dataflow slices`), но ее основная роль заключается в управлении состоянием и настройке runtime-среды.\n\n## Осторожные выводы\nНа основании доступного контекста сложно однозначно утверждать о точном потоке данных внутри runtime-среды после создания runtime. Косвенные признаки указывают на возможное взаимодействие с внешними сервисами или ресурсами, однако конкретная реализация этих взаимодействий вне данного контекста остается неизвестной.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS", + "C4_SEMANTIC_ROLES" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "function", + "symbol_candidates": [ + "create_runtime" + ], + "keyword_hints": [ + "create_runtime" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "create_runtime", + "alternatives": [ + "create_runtime" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 145, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 41, + "C0_SOURCE_CHUNKS": 20, + "C4_SEMANTIC_ROLES": 19, + "C2_DEPENDENCY_GRAPH": 48, + "C3_ENTRYPOINTS": 14 + }, + "merge_rank": 21, + "prompt_build": 0, + "llm_call": 4155 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 601, + "evidence_rows": 12, + "evidence_chars": 1184 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 1 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_explain_ru_v1", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "create_runtime" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 12, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-fullchain-explain-create-runtime", + "mode": "full_chain", + "run_started_at": "2026-03-12T11:44:13", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Объясни функцию create_runtime", + "normalized_query": "Объясни функцию create_runtime" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Объясни функцию create_runtime" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни функцию create_runtime" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "function", + "symbol_candidates": [ + "create_runtime" + ], + "keyword_hints": [ + "create_runtime" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Объясни функцию create_runtime" + }, + "output": { + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "create_runtime", + "alternatives": [ + "create_runtime" + ], + "confidence": 0.99 + }, + "rag_count": 12, + "rag_rows": [ + { + "path": "src/plba/bootstrap.py", + "content": "function create_runtime\ncreate_runtime(module)", + "layer": "C1_SYMBOL_CATALOG", + "title": "create_runtime", + "span_start": 8, + "span_end": 29, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "qname": "create_runtime", + "kind": "function", + "signature": "create_runtime(module)", + "parent_symbol_id": null, + "package_or_module": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime calls runtime.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:calls", + "span_start": 19, + "span_end": 19, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "4eaeec4ac55a59d5f66fd01c4754955f8fedaf4bc3df13fa769b352c7bfaacbb", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.add_config_file", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime reads_attr runtime.register_module", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:reads_attr", + "span_start": 28, + "span_end": 28, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "45516c79ff358dbf9b650a081668df0f66d2fe989300f985a1a78be6be166f8f", + "edge_type": "reads_attr", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.register_module", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:instantiates", + "span_start": 17, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "0adba17984f850ea1608c9e734d2dd5c325cfde3a8133123aa239e44935ad18e", + "edge_type": "instantiates", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": "27158ca220022eeb5083c6addf8a50775d45f7161284fd60aac48410105f4b98", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime calls runtime.register_module", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:calls", + "span_start": 28, + "span_end": 28, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "ab6003c3441addc1ba1b81edeca009165559f652f6b2cf424e5ae61b1f617de8", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.register_module", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime calls runtime.control_plane.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:calls", + "span_start": 21, + "span_end": 27, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "2678250030b9ce47a3b3b55fac7897ac530367edc8374ac9d5e6ecafb1e483f0", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.control_plane.register_channel", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime reads_attr runtime.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:reads_attr", + "span_start": 19, + "span_end": 19, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "30d4e8aae984ab84d523e80d02f1caeda52d547fa3d2aa47be8845931cabbca2", + "edge_type": "reads_attr", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.add_config_file", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "def create_runtime(\n module: ApplicationModule,\n *,\n config_path: str | None = None,\n enable_http_control: bool = False,\n control_host: str = \"127.0.0.1\",\n control_port: int = 8080,\n control_timeout: int = 5,\n) -> RuntimeManager:\n runtime = RuntimeManager()\n if config_path is not None:\n runtime.add_config_file(config_path)\n if enable_http_control:\n runtime.control_plane.register_channel(\n HttpControlChannel(\n host=control_host,\n port=control_port,\n timeout=control_timeout,\n )\n )\n runtime.register_module(module)\n return runtime", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/bootstrap.py:create_runtime", + "span_start": 8, + "span_end": 29, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "create_runtime", + "alternatives": [ + "create_runtime" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 145, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 41, + "C0_SOURCE_CHUNKS": 20, + "C4_SEMANTIC_ROLES": 19, + "C2_DEPENDENCY_GRAPH": 48, + "C3_ENTRYPOINTS": 14 + }, + "merge_rank": 21 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Объясни функцию create_runtime", + "rag_count": 12 + }, + "output": { + "llm_answer": "## Функциональное назначение сущности `create_runtime`\nФункция `create_runtime` предназначена для инициализации и настройки окружения выполнения (`runtime environment`) приложения. Она создает объект типа `RuntimeManager`, регистрирует указанный модуль (`module`) и при необходимости добавляет конфигурационные файлы и каналы управления через HTTP.\n\n## Ключевые зависимости\n- **src/plba/bootstrap.py**: основной файл, содержащий реализацию функции `create_runtime`.\n- **RuntimeManager**: класс, управляющий состоянием и функциональностью runtime-среды.\n- **ApplicationModule**: абстрактный тип модуля приложения, передаваемый в функцию.\n- **HttpControlChannel**: компонент, обеспечивающий управление приложением по HTTP с заданными параметрами хоста, порта и тайм-аута.\n\n## Поток данных или вызовов\n1. Функция `create_runtime` принимает несколько аргументов:\n - `module`: экземпляр класса `ApplicationModule`, представляющий модуль приложения.\n - Дополнительные параметры конфигурации, такие как путь к файлу конфигурации (`config_path`), включение HTTP-контроля (`enable_http_control`), хост и порт для HTTP-канала управления, а также таймаут запроса.\n \n2. Внутри функции происходит следующее:\n - Создается новый объект `RuntimeManager`.\n - Если указан параметр `config_path`, вызывается метод `add_config_file` объекта `runtime`, чтобы добавить указанный файл конфигурации.\n - При включенном HTTP-контроле регистрируется канал управления `HttpControlChannel` с заданными параметрами.\n - Вызовом метода `register_module` экземпляра `runtime` добавляется переданный модуль приложения.\n\n3. После завершения всех операций функция возвращает созданный объект `RuntimeManager`.\n\n## Важные детали реализации\n1. **Параметры вызова**:\n - Параметр `config_path` позволяет указать путь к файлу конфигурации, который затем загружается и используется runtime-менеджером.\n - Параметр `enable_http_control` определяет необходимость регистрации канала управления HTTP, позволяющего взаимодействовать с приложением удаленно.\n\n2. **Использование внешних классов и объектов**:\n - Использование класса `RuntimeManager` для управления runtime-средой.\n - Применение класса `HttpControlChannel` для организации каналов управления через HTTP.\n\n3. **Роль `pipeline_stage`**:\n - Как отмечено в описании семантических ролей (`C4_SEMANTIC_ROLES`), данная сущность участвует в данных потоках (`dataflow slices`), но ее основная роль заключается в управлении состоянием и настройке runtime-среды.\n\n## Осторожные выводы\nНа основании доступного контекста сложно однозначно утверждать о точном потоке данных внутри runtime-среды после создания runtime. Косвенные признаки указывают на возможное взаимодействие с внешними сервисами или ресурсами, однако конкретная реализация этих взаимодействий вне данного контекста остается неизвестной." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 601, + "evidence_rows": 12, + "evidence_chars": 1184 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 1 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_explain_ru_v1", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 4155 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_114413/full_chain_plba_code_retrieval_plba-fullchain-explain-create-runtime.md b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_114413/full_chain_plba_code_retrieval_plba-fullchain-explain-create-runtime.md new file mode 100644 index 0000000..5b7af2f --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_114413/full_chain_plba_code_retrieval_plba-fullchain-explain-create-runtime.md @@ -0,0 +1,34 @@ +# plba-fullchain-explain-create-runtime + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_retrieval.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Объясни функцию create_runtime + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 12, + "llm_answer": "## Функциональное назначение сущности `create_runtime`\nФункция `create_runtime` предназначена для инициализации и настройки окружения выполнения (`runtime environment`) приложения. Она создает объект типа `RuntimeManager`, регистрирует указанный модуль (`module`) и при необходимости добавляет конфигурационные файлы и каналы управления через HTTP.\n\n## Ключевые зависимости\n- **src/plba/bootstrap.py**: основной файл, содержащий реализацию функции `create_runtime`.\n- **RuntimeManager**: класс, управляющий состоянием и функциональностью runtime-среды.\n- **ApplicationModule**: абстрактный тип модуля приложения, передаваемый в функцию.\n- **HttpControlChannel**: компонент, обеспечивающий управление приложением по HTTP с заданными параметрами хоста, порта и тайм-аута.\n\n## Поток данных или вызовов\n1. Функция `create_runtime` принимает несколько аргументов:\n - `module`: экземпляр класса `ApplicationModule`, представляющий модуль приложения.\n - Дополнительные параметры конфигурации, такие как путь к файлу конфигурации (`config_path`), включение HTTP-контроля (`enable_http_control`), хост и порт для HTTP-канала управления, а также таймаут запроса.\n \n2. Внутри функции происходит следующее:\n - Создается новый объект `RuntimeManager`.\n - Если указан параметр `config_path`, вызывается метод `add_config_file` объекта `runtime`, чтобы добавить указанный файл конфигурации.\n - При включенном HTTP-контроле регистрируется канал управления `HttpControlChannel` с заданными параметрами.\n - Вызовом метода `register_module` экземпляра `runtime` добавляется переданный модуль приложения.\n\n3. После завершения всех операций функция возвращает созданный объект `RuntimeManager`.\n\n## Важные детали реализации\n1. **Параметры вызова**:\n - Параметр `config_path` позволяет указать путь к файлу конфигурации, который затем загружается и используется runtime-менеджером.\n - Параметр `enable_http_control` определяет необходимость регистрации канала управления HTTP, позволяющего взаимодействовать с приложением удаленно.\n\n2. **Использование внешних классов и объектов**:\n - Использование класса `RuntimeManager` для управления runtime-средой.\n - Применение класса `HttpControlChannel` для организации каналов управления через HTTP.\n\n3. **Роль `pipeline_stage`**:\n - Как отмечено в описании семантических ролей (`C4_SEMANTIC_ROLES`), данная сущность участвует в данных потоках (`dataflow slices`), но ее основная роль заключается в управлении состоянием и настройке runtime-среды.\n\n## Осторожные выводы\nНа основании доступного контекста сложно однозначно утверждать о точном потоке данных внутри runtime-среды после создания runtime. Косвенные признаки указывают на возможное взаимодействие с внешними сервисами или ресурсами, однако конкретная реализация этих взаимодействий вне данного контекста остается неизвестной.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "create_runtime" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_114413/full_chain_plba_code_retrieval_plba-fullchain-explain-http-control-channel.json b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_114413/full_chain_plba_code_retrieval_plba-fullchain-explain-http-control-channel.json new file mode 100644 index 0000000..967b7ed --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_114413/full_chain_plba_code_retrieval_plba-fullchain-explain-http-control-channel.json @@ -0,0 +1,2088 @@ +{ + "case_id": "plba-fullchain-explain-http-control-channel", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_retrieval.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 12, + "llm_answer": "## Объяснение сущности `HttpControlChannel`\n\n### Назначение\nКласс `HttpControlChannel` является компонентом конвейера приложения, ответственным за управление состоянием через HTTP-запросы. Он участвует в обработке запросов к приложению, обеспечивает маршрутизацию и выполнение действий, связанных с управлением состояниями и конфигурацией системы.\n\n### Ключевые зависимости\n- **host**: строка, представляющая хост для сервера.\n- **port**: целое число, представляющее порт для сервера.\n- **timeout**: целое число, задающее таймаут выполнения операций.\n\n### Поток данных или вызовов\n1. **Инициализация (`__init__`)** \n - При создании экземпляра класса происходит инициализация полей `_timeout`, `_runner` и `_factory`. Поле `_runner` представляет собой объект типа `UvicornThreadRunner`, отвечающий за запуск веб-сервера на указанном хосте и порте. Поле `_factory` отвечает за создание экземпляра `HttpControlAppFactory`.\n \n2. **Запуск (`start`)** \n - Метод принимает параметр `actions`, содержащий набор действий управления. Далее создается экземпляр приложения `app` при помощи фабрики `_factory`, после чего приложение запускается методом `_runner.start()`.\n \n3. **Остановка (`stop`)** \n - Остановка работы серверного приложения выполняется вызовом метода `_runner.stop()`.\n \n4. **Получение порта (`port`)** \n - Возвращает номер порта, на котором запущен сервер.\n\n5. **Ответы на запросы о здоровье и действиях** \n - Для запроса о состоянии здоровья вызывается метод `_health_response`, возвращающий статус системы (\"здорово\" или \"нездорово\"). Если действия конфигурации отсутствуют, возвращается сообщение об ошибке.\n - Для ответа на запрос о выполнении конкретных действий вызывается метод `_action_response`, проверяющий наличие необходимых действий и возвращая соответствующий результат.\n\n### Важные детали реализации\n- Использование асинхронных методов позволяет эффективно обрабатывать запросы и выполнять длительные операции без блокировки основного потока исполнения.\n- Параметр `_actions` хранит коллекцию доступных действий управления системой, что делает компонент гибким и расширяемым.\n- Конкретная реализация поведения зависит от объекта `_factory`, создавая различное поведение в зависимости от потребностей приложения.\n\n### Косвенные признаки и осторожные выводы\n- Отсутствуют явные файлы или сущности, напрямую связанные с логикой работы класса `HttpControlChannel`. Однако информация из графа зависимостей указывает на его взаимодействие с объектом `UvicornThreadRunner` и фабрикой приложений.\n- Объявления методов и свойств показывают стандартную схему взаимодействия: получение и установка атрибутов, старт и остановка сервиса, обработка запросов.\n\n---\n\nТаким образом, `HttpControlChannel` — это важный элемент инфраструктуры, обеспечивающий управляемость и доступность приложения через HTTP-интерфейс.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "HttpControlChannel" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-fullchain-explain-http-control-channel", + "text": "Объясни класс HttpControlChannel", + "mode": "full_chain", + "run_started_at": "2026-03-12T11:44:13", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни класс HttpControlChannel", + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "HttpControlChannel", + "alternatives": [ + "HttpControlChannel" + ], + "confidence": 0.99 + }, + "rag_count": 12, + "rag_rows": [ + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel\nHttpControlChannel(ControlChannel)", + "layer": "C1_SYMBOL_CATALOG", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "qname": "HttpControlChannel", + "kind": "class", + "signature": "HttpControlChannel(ControlChannel)", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._runner\n -> HttpControlChannel.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 15, + "span_end": 22, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "51d73913df709152258ed1b9a8c8f4eb3c575eccfe6b982aef0b28e0789a29da", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0", + "dst_ref": "HttpControlChannel.start", + "resolution": "resolved", + "slice_id": "51d73913df709152258ed1b9a8c8f4eb3c575eccfe6b982aef0b28e0789a29da", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._runner", + "HttpControlChannel.start" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._runner\n -> HttpControlChannel.port", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 15, + "span_end": 29, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "c7167bab7218bb768ad7c11bfb40d1a3096e6071dd7817bba5fd864cf8f6de13", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "3632ce8227f4a31e0768f2fb021a4d1ba28e1202633aa0f2fac902295931280f", + "dst_ref": "HttpControlChannel.port", + "resolution": "resolved", + "slice_id": "c7167bab7218bb768ad7c11bfb40d1a3096e6071dd7817bba5fd864cf8f6de13", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._runner", + "HttpControlChannel.port" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "3632ce8227f4a31e0768f2fb021a4d1ba28e1202633aa0f2fac902295931280f" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._timeout\n -> HttpControlChannel._health_response", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 14, + "span_end": 34, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "f858f5c9e575f6c4cdfe3853571b7ee21d1f628a443541d2037c3dc9d0790bef", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "e84bf04e9cd2127df235b7064d05f47e19f19a89c7c82f4c247231d4e8fa426a", + "dst_ref": "HttpControlChannel._health_response", + "resolution": "resolved", + "slice_id": "f858f5c9e575f6c4cdfe3853571b7ee21d1f628a443541d2037c3dc9d0790bef", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._timeout", + "HttpControlChannel._health_response" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "e84bf04e9cd2127df235b7064d05f47e19f19a89c7c82f4c247231d4e8fa426a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._timeout\n -> HttpControlChannel._action_response", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "c3ef21fcae96c82c00be74b3ab827d4af2085d89cb3fa5521c19a174aad84dbb", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "e64969024ccaeb34d8d91473fad07b3b3d341875846392e7a006406c7ada1954", + "dst_ref": "HttpControlChannel._action_response", + "resolution": "resolved", + "slice_id": "c3ef21fcae96c82c00be74b3ab827d4af2085d89cb3fa5521c19a174aad84dbb", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._timeout", + "HttpControlChannel._action_response" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "e64969024ccaeb34d8d91473fad07b3b3d341875846392e7a006406c7ada1954" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._runner\n -> HttpControlChannel.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 15, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "0f827ef81a990258a8a74381c8564a8361afa6712dba3200592659c939adcb9d", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "f29ab212620093d72be20e26c5a399624c7939a6056a728762ed3f84a250bfa3", + "dst_ref": "HttpControlChannel.stop", + "resolution": "resolved", + "slice_id": "0f827ef81a990258a8a74381c8564a8361afa6712dba3200592659c939adcb9d", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._runner", + "HttpControlChannel.stop" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "f29ab212620093d72be20e26c5a399624c7939a6056a728762ed3f84a250bfa3" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._factory\n -> HttpControlChannel.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 16, + "span_end": 21, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e61ec25ded7dbe380d95ce2abcbc1d7a2d2afde5aa8453866df8706dfb7d6ddb", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0", + "dst_ref": "HttpControlChannel.start", + "resolution": "resolved", + "slice_id": "e61ec25ded7dbe380d95ce2abcbc1d7a2d2afde5aa8453866df8706dfb7d6ddb", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._factory", + "HttpControlChannel.start" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel(ControlChannel):\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._timeout = timeout\n self._runner = UvicornThreadRunner(host, port, timeout)\n self._factory = HttpControlAppFactory()\n self._actions: ControlActionSet | None = None\n\n async def start(self, actions: ControlActionSet) -> None:\n self._actions = actions\n app = self._factory.create(self._health_response, self._action_response)\n await self._runner.start(app)\n\n async def stop(self) -> None:\n await self._runner.stop()\n\n @property\n def port(self) -> int:\n return self._runner.port\n\n async def _health_response(self) -> dict[str, object]:\n if self._actions is None:\n return {\"status\": \"unhealthy\", \"detail\": \"control actions are not configured\"}\n return await asyncio.wait_for(self._actions.health(), timeout=float(self._timeout))\n\n async def _action_response(self, action: str, _client_source: str = \"unknown\") -> JSONResponse:\n if self._actions is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"{action} handler is not configured\"}, status_code=404)\n callbacks = {\n \"start\": self._actions.start,\n \"stop\": self._actions.stop,\n \"status\": self._actions.status,\n }\n callback = callbacks.get(action)\n if callback is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"unsupported action: {action}\"}, status_code=404)\n action_timeout = max(float(self._timeout), 10.0) if action in {\"start\", \"stop\"} else float(self._timeout)\n try:\n detail = await asyncio.wait_for(callback(), timeout=action_timeout)\n except asyncio.TimeoutError:\n return JSONResponse(\n content={\"status\": \"accepted\", \"detail\": f\"{action} operation is still in progress\"},\n status_code=202,\n )\n except Exception as exc:\n return JSONResponse(content={\"status\": \"error\", \"detail\": str(exc)}, status_code=500)\n return JSONResponse(content={\"status\": \"ok\", \"detail\": detail or f\"{action} action accepted\"}, status_code=200)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_channel.py:HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "## Объяснение сущности `HttpControlChannel`\n\n### Назначение\nКласс `HttpControlChannel` является компонентом конвейера приложения, ответственным за управление состоянием через HTTP-запросы. Он участвует в обработке запросов к приложению, обеспечивает маршрутизацию и выполнение действий, связанных с управлением состояниями и конфигурацией системы.\n\n### Ключевые зависимости\n- **host**: строка, представляющая хост для сервера.\n- **port**: целое число, представляющее порт для сервера.\n- **timeout**: целое число, задающее таймаут выполнения операций.\n\n### Поток данных или вызовов\n1. **Инициализация (`__init__`)** \n - При создании экземпляра класса происходит инициализация полей `_timeout`, `_runner` и `_factory`. Поле `_runner` представляет собой объект типа `UvicornThreadRunner`, отвечающий за запуск веб-сервера на указанном хосте и порте. Поле `_factory` отвечает за создание экземпляра `HttpControlAppFactory`.\n \n2. **Запуск (`start`)** \n - Метод принимает параметр `actions`, содержащий набор действий управления. Далее создается экземпляр приложения `app` при помощи фабрики `_factory`, после чего приложение запускается методом `_runner.start()`.\n \n3. **Остановка (`stop`)** \n - Остановка работы серверного приложения выполняется вызовом метода `_runner.stop()`.\n \n4. **Получение порта (`port`)** \n - Возвращает номер порта, на котором запущен сервер.\n\n5. **Ответы на запросы о здоровье и действиях** \n - Для запроса о состоянии здоровья вызывается метод `_health_response`, возвращающий статус системы (\"здорово\" или \"нездорово\"). Если действия конфигурации отсутствуют, возвращается сообщение об ошибке.\n - Для ответа на запрос о выполнении конкретных действий вызывается метод `_action_response`, проверяющий наличие необходимых действий и возвращая соответствующий результат.\n\n### Важные детали реализации\n- Использование асинхронных методов позволяет эффективно обрабатывать запросы и выполнять длительные операции без блокировки основного потока исполнения.\n- Параметр `_actions` хранит коллекцию доступных действий управления системой, что делает компонент гибким и расширяемым.\n- Конкретная реализация поведения зависит от объекта `_factory`, создавая различное поведение в зависимости от потребностей приложения.\n\n### Косвенные признаки и осторожные выводы\n- Отсутствуют явные файлы или сущности, напрямую связанные с логикой работы класса `HttpControlChannel`. Однако информация из графа зависимостей указывает на его взаимодействие с объектом `UvicornThreadRunner` и фабрикой приложений.\n- Объявления методов и свойств показывают стандартную схему взаимодействия: получение и установка атрибутов, старт и остановка сервиса, обработка запросов.\n\n---\n\nТаким образом, `HttpControlChannel` — это важный элемент инфраструктуры, обеспечивающий управляемость и доступность приложения через HTTP-интерфейс.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS", + "C4_SEMANTIC_ROLES" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "HttpControlChannel" + ], + "keyword_hints": [ + "HttpControlChannel" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "HttpControlChannel", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "HttpControlChannel", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "HttpControlChannel", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "HttpControlChannel", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "HttpControlChannel", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "HttpControlChannel", + "alternatives": [ + "HttpControlChannel" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 157, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 49, + "C0_SOURCE_CHUNKS": 20, + "C4_SEMANTIC_ROLES": 18, + "C2_DEPENDENCY_GRAPH": 55, + "C3_ENTRYPOINTS": 12 + }, + "merge_rank": 20, + "prompt_build": 0, + "llm_call": 4482 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 795, + "evidence_rows": 12, + "evidence_chars": 3028 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 1 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_explain_ru_v1", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "HttpControlChannel" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 12, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-fullchain-explain-http-control-channel", + "mode": "full_chain", + "run_started_at": "2026-03-12T11:44:13", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Объясни класс HttpControlChannel", + "normalized_query": "Объясни класс HttpControlChannel" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Объясни класс HttpControlChannel" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни класс HttpControlChannel" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "HttpControlChannel" + ], + "keyword_hints": [ + "HttpControlChannel" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Объясни класс HttpControlChannel" + }, + "output": { + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "HttpControlChannel", + "alternatives": [ + "HttpControlChannel" + ], + "confidence": 0.99 + }, + "rag_count": 12, + "rag_rows": [ + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel\nHttpControlChannel(ControlChannel)", + "layer": "C1_SYMBOL_CATALOG", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "qname": "HttpControlChannel", + "kind": "class", + "signature": "HttpControlChannel(ControlChannel)", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._runner\n -> HttpControlChannel.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 15, + "span_end": 22, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "51d73913df709152258ed1b9a8c8f4eb3c575eccfe6b982aef0b28e0789a29da", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0", + "dst_ref": "HttpControlChannel.start", + "resolution": "resolved", + "slice_id": "51d73913df709152258ed1b9a8c8f4eb3c575eccfe6b982aef0b28e0789a29da", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._runner", + "HttpControlChannel.start" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._runner\n -> HttpControlChannel.port", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 15, + "span_end": 29, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "c7167bab7218bb768ad7c11bfb40d1a3096e6071dd7817bba5fd864cf8f6de13", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "3632ce8227f4a31e0768f2fb021a4d1ba28e1202633aa0f2fac902295931280f", + "dst_ref": "HttpControlChannel.port", + "resolution": "resolved", + "slice_id": "c7167bab7218bb768ad7c11bfb40d1a3096e6071dd7817bba5fd864cf8f6de13", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._runner", + "HttpControlChannel.port" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "3632ce8227f4a31e0768f2fb021a4d1ba28e1202633aa0f2fac902295931280f" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._timeout\n -> HttpControlChannel._health_response", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 14, + "span_end": 34, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "f858f5c9e575f6c4cdfe3853571b7ee21d1f628a443541d2037c3dc9d0790bef", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "e84bf04e9cd2127df235b7064d05f47e19f19a89c7c82f4c247231d4e8fa426a", + "dst_ref": "HttpControlChannel._health_response", + "resolution": "resolved", + "slice_id": "f858f5c9e575f6c4cdfe3853571b7ee21d1f628a443541d2037c3dc9d0790bef", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._timeout", + "HttpControlChannel._health_response" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "e84bf04e9cd2127df235b7064d05f47e19f19a89c7c82f4c247231d4e8fa426a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._timeout\n -> HttpControlChannel._action_response", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "c3ef21fcae96c82c00be74b3ab827d4af2085d89cb3fa5521c19a174aad84dbb", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "e64969024ccaeb34d8d91473fad07b3b3d341875846392e7a006406c7ada1954", + "dst_ref": "HttpControlChannel._action_response", + "resolution": "resolved", + "slice_id": "c3ef21fcae96c82c00be74b3ab827d4af2085d89cb3fa5521c19a174aad84dbb", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._timeout", + "HttpControlChannel._action_response" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "e64969024ccaeb34d8d91473fad07b3b3d341875846392e7a006406c7ada1954" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._runner\n -> HttpControlChannel.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 15, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "0f827ef81a990258a8a74381c8564a8361afa6712dba3200592659c939adcb9d", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "f29ab212620093d72be20e26c5a399624c7939a6056a728762ed3f84a250bfa3", + "dst_ref": "HttpControlChannel.stop", + "resolution": "resolved", + "slice_id": "0f827ef81a990258a8a74381c8564a8361afa6712dba3200592659c939adcb9d", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._runner", + "HttpControlChannel.stop" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "f29ab212620093d72be20e26c5a399624c7939a6056a728762ed3f84a250bfa3" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._factory\n -> HttpControlChannel.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 16, + "span_end": 21, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e61ec25ded7dbe380d95ce2abcbc1d7a2d2afde5aa8453866df8706dfb7d6ddb", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0", + "dst_ref": "HttpControlChannel.start", + "resolution": "resolved", + "slice_id": "e61ec25ded7dbe380d95ce2abcbc1d7a2d2afde5aa8453866df8706dfb7d6ddb", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._factory", + "HttpControlChannel.start" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel(ControlChannel):\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._timeout = timeout\n self._runner = UvicornThreadRunner(host, port, timeout)\n self._factory = HttpControlAppFactory()\n self._actions: ControlActionSet | None = None\n\n async def start(self, actions: ControlActionSet) -> None:\n self._actions = actions\n app = self._factory.create(self._health_response, self._action_response)\n await self._runner.start(app)\n\n async def stop(self) -> None:\n await self._runner.stop()\n\n @property\n def port(self) -> int:\n return self._runner.port\n\n async def _health_response(self) -> dict[str, object]:\n if self._actions is None:\n return {\"status\": \"unhealthy\", \"detail\": \"control actions are not configured\"}\n return await asyncio.wait_for(self._actions.health(), timeout=float(self._timeout))\n\n async def _action_response(self, action: str, _client_source: str = \"unknown\") -> JSONResponse:\n if self._actions is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"{action} handler is not configured\"}, status_code=404)\n callbacks = {\n \"start\": self._actions.start,\n \"stop\": self._actions.stop,\n \"status\": self._actions.status,\n }\n callback = callbacks.get(action)\n if callback is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"unsupported action: {action}\"}, status_code=404)\n action_timeout = max(float(self._timeout), 10.0) if action in {\"start\", \"stop\"} else float(self._timeout)\n try:\n detail = await asyncio.wait_for(callback(), timeout=action_timeout)\n except asyncio.TimeoutError:\n return JSONResponse(\n content={\"status\": \"accepted\", \"detail\": f\"{action} operation is still in progress\"},\n status_code=202,\n )\n except Exception as exc:\n return JSONResponse(content={\"status\": \"error\", \"detail\": str(exc)}, status_code=500)\n return JSONResponse(content={\"status\": \"ok\", \"detail\": detail or f\"{action} action accepted\"}, status_code=200)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_channel.py:HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "HttpControlChannel", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "HttpControlChannel", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "HttpControlChannel", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "HttpControlChannel", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "HttpControlChannel", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "HttpControlChannel", + "alternatives": [ + "HttpControlChannel" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 157, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 49, + "C0_SOURCE_CHUNKS": 20, + "C4_SEMANTIC_ROLES": 18, + "C2_DEPENDENCY_GRAPH": 55, + "C3_ENTRYPOINTS": 12 + }, + "merge_rank": 20 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Объясни класс HttpControlChannel", + "rag_count": 12 + }, + "output": { + "llm_answer": "## Объяснение сущности `HttpControlChannel`\n\n### Назначение\nКласс `HttpControlChannel` является компонентом конвейера приложения, ответственным за управление состоянием через HTTP-запросы. Он участвует в обработке запросов к приложению, обеспечивает маршрутизацию и выполнение действий, связанных с управлением состояниями и конфигурацией системы.\n\n### Ключевые зависимости\n- **host**: строка, представляющая хост для сервера.\n- **port**: целое число, представляющее порт для сервера.\n- **timeout**: целое число, задающее таймаут выполнения операций.\n\n### Поток данных или вызовов\n1. **Инициализация (`__init__`)** \n - При создании экземпляра класса происходит инициализация полей `_timeout`, `_runner` и `_factory`. Поле `_runner` представляет собой объект типа `UvicornThreadRunner`, отвечающий за запуск веб-сервера на указанном хосте и порте. Поле `_factory` отвечает за создание экземпляра `HttpControlAppFactory`.\n \n2. **Запуск (`start`)** \n - Метод принимает параметр `actions`, содержащий набор действий управления. Далее создается экземпляр приложения `app` при помощи фабрики `_factory`, после чего приложение запускается методом `_runner.start()`.\n \n3. **Остановка (`stop`)** \n - Остановка работы серверного приложения выполняется вызовом метода `_runner.stop()`.\n \n4. **Получение порта (`port`)** \n - Возвращает номер порта, на котором запущен сервер.\n\n5. **Ответы на запросы о здоровье и действиях** \n - Для запроса о состоянии здоровья вызывается метод `_health_response`, возвращающий статус системы (\"здорово\" или \"нездорово\"). Если действия конфигурации отсутствуют, возвращается сообщение об ошибке.\n - Для ответа на запрос о выполнении конкретных действий вызывается метод `_action_response`, проверяющий наличие необходимых действий и возвращая соответствующий результат.\n\n### Важные детали реализации\n- Использование асинхронных методов позволяет эффективно обрабатывать запросы и выполнять длительные операции без блокировки основного потока исполнения.\n- Параметр `_actions` хранит коллекцию доступных действий управления системой, что делает компонент гибким и расширяемым.\n- Конкретная реализация поведения зависит от объекта `_factory`, создавая различное поведение в зависимости от потребностей приложения.\n\n### Косвенные признаки и осторожные выводы\n- Отсутствуют явные файлы или сущности, напрямую связанные с логикой работы класса `HttpControlChannel`. Однако информация из графа зависимостей указывает на его взаимодействие с объектом `UvicornThreadRunner` и фабрикой приложений.\n- Объявления методов и свойств показывают стандартную схему взаимодействия: получение и установка атрибутов, старт и остановка сервиса, обработка запросов.\n\n---\n\nТаким образом, `HttpControlChannel` — это важный элемент инфраструктуры, обеспечивающий управляемость и доступность приложения через HTTP-интерфейс." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 795, + "evidence_rows": 12, + "evidence_chars": 3028 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 1 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_explain_ru_v1", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 4482 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_114413/full_chain_plba_code_retrieval_plba-fullchain-explain-http-control-channel.md b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_114413/full_chain_plba_code_retrieval_plba-fullchain-explain-http-control-channel.md new file mode 100644 index 0000000..ffa3f19 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_114413/full_chain_plba_code_retrieval_plba-fullchain-explain-http-control-channel.md @@ -0,0 +1,34 @@ +# plba-fullchain-explain-http-control-channel + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_retrieval.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Объясни класс HttpControlChannel + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 12, + "llm_answer": "## Объяснение сущности `HttpControlChannel`\n\n### Назначение\nКласс `HttpControlChannel` является компонентом конвейера приложения, ответственным за управление состоянием через HTTP-запросы. Он участвует в обработке запросов к приложению, обеспечивает маршрутизацию и выполнение действий, связанных с управлением состояниями и конфигурацией системы.\n\n### Ключевые зависимости\n- **host**: строка, представляющая хост для сервера.\n- **port**: целое число, представляющее порт для сервера.\n- **timeout**: целое число, задающее таймаут выполнения операций.\n\n### Поток данных или вызовов\n1. **Инициализация (`__init__`)** \n - При создании экземпляра класса происходит инициализация полей `_timeout`, `_runner` и `_factory`. Поле `_runner` представляет собой объект типа `UvicornThreadRunner`, отвечающий за запуск веб-сервера на указанном хосте и порте. Поле `_factory` отвечает за создание экземпляра `HttpControlAppFactory`.\n \n2. **Запуск (`start`)** \n - Метод принимает параметр `actions`, содержащий набор действий управления. Далее создается экземпляр приложения `app` при помощи фабрики `_factory`, после чего приложение запускается методом `_runner.start()`.\n \n3. **Остановка (`stop`)** \n - Остановка работы серверного приложения выполняется вызовом метода `_runner.stop()`.\n \n4. **Получение порта (`port`)** \n - Возвращает номер порта, на котором запущен сервер.\n\n5. **Ответы на запросы о здоровье и действиях** \n - Для запроса о состоянии здоровья вызывается метод `_health_response`, возвращающий статус системы (\"здорово\" или \"нездорово\"). Если действия конфигурации отсутствуют, возвращается сообщение об ошибке.\n - Для ответа на запрос о выполнении конкретных действий вызывается метод `_action_response`, проверяющий наличие необходимых действий и возвращая соответствующий результат.\n\n### Важные детали реализации\n- Использование асинхронных методов позволяет эффективно обрабатывать запросы и выполнять длительные операции без блокировки основного потока исполнения.\n- Параметр `_actions` хранит коллекцию доступных действий управления системой, что делает компонент гибким и расширяемым.\n- Конкретная реализация поведения зависит от объекта `_factory`, создавая различное поведение в зависимости от потребностей приложения.\n\n### Косвенные признаки и осторожные выводы\n- Отсутствуют явные файлы или сущности, напрямую связанные с логикой работы класса `HttpControlChannel`. Однако информация из графа зависимостей указывает на его взаимодействие с объектом `UvicornThreadRunner` и фабрикой приложений.\n- Объявления методов и свойств показывают стандартную схему взаимодействия: получение и установка атрибутов, старт и остановка сервиса, обработка запросов.\n\n---\n\nТаким образом, `HttpControlChannel` — это важный элемент инфраструктуры, обеспечивающий управляемость и доступность приложения через HTTP-интерфейс.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "HttpControlChannel" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_114413/full_chain_plba_code_retrieval_plba-fullchain-explain-runtime-manager.json b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_114413/full_chain_plba_code_retrieval_plba-fullchain-explain-runtime-manager.json new file mode 100644 index 0000000..b7a24d0 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_114413/full_chain_plba_code_retrieval_plba-fullchain-explain-runtime-manager.json @@ -0,0 +1,2088 @@ +{ + "case_id": "plba-fullchain-explain-runtime-manager", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_retrieval.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 12, + "llm_answer": "## Назначение класса `RuntimeManager`\nКласс `RuntimeManager` играет роль центрального менеджера для управления жизненным циклом различных компонентов приложения runtime. Он отвечает за координацию и интеграцию этих компонентов, а также управляет их состоянием через атрибуты экземпляра.\n\n## Ключевые зависимости\nКлючевыми компонентами, с которыми взаимодействует `RuntimeManager`, являются:\n- `ConfigurationManager`: управление конфигурацией приложения.\n- `ServiceContainer`: контейнер сервисов, используемых приложением.\n- `TraceService`: сервис отслеживания трассировок выполнения задач.\n- `HealthRegistry`: реестр текущего состояния здоровья системы.\n- `LogManager`: менеджер логирования событий.\n- `WorkerSupervisor`: супервизор рабочих процессов.\n- `ControlPlaneService`: служба управления планом контроля выполнения задач.\n\n## Поток данных или вызовов\nПри инициализации объекта `RuntimeManager` вызывается метод `__init__`. В этом методе происходит инициализация основных атрибутов экземпляра, таких как состояние жизненного цикла (`_state`), флаг регистрации модулей (`_core_registered`) и другие внутренние переменные.\n\n### Пример вызова конструктора:\n```python\nmanager = RuntimeManager(configuration=configuration, services=services, ...)\n```\n\nПосле создания объекта `RuntimeManager` он начинает управлять жизненными циклами своих внутренних компонентов, включая регистрацию и запуск соответствующих служб. Метод `_register_core_services()` регистрирует основные сервисы, необходимые для функционирования приложения.\n\n## Важные детали реализации\n- **Атрибуты экземпляра**:\n - `_state`: текущее состояние жизненного цикла приложения (например, IDLE, RUNNING).\n - `_core_registered`: флаг, указывающий, зарегистрированы ли основные модули.\n - `_workers_registered`: аналогично предыдущему, но относится к рабочим модулям.\n \n- **Методы управления состоянием**:\n - `start()`: инициирует выполнение всех зарегистрированных модулей.\n - `stop()`: останавливает работу приложения и освобождает ресурсы.\n\n- **Реализация взаимодействия с внешними сервисами**:\n Методы классов, от которых зависит `RuntimeManager`, такие как `ControlPlaneService`, используются для координации работы приложений и обеспечения бесперебойного выполнения задач.\n\n## Осторожные выводы\nНа основе предоставленного контекста сложно точно описать полный цикл выполнения задачи или взаимодействия конкретного метода класса `RuntimeManager` с другими компонентами приложения. Однако можно предположить, что реализация включает этапы инициализации, регистрации сервисов, запуска и остановки работы приложения, основанные на сигналах жизненного цикла и управлении рабочими процессами.\n\nДля более детального понимания необходимо проанализировать полные реализации методов и взаимодействие объектов внутри приложения runtime.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-fullchain-explain-runtime-manager", + "text": "Объясни как работает класс RuntimeManager", + "mode": "full_chain", + "run_started_at": "2026-03-12T11:44:13", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни как работает класс RuntimeManager", + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ], + "confidence": 0.99 + }, + "rag_count": 12, + "rag_rows": [ + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager\nRuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "qname": "RuntimeManager", + "kind": "class", + "signature": "RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests manager\n- orchestrates role-like calls (4)\n- reads and writes state attributes\n- participates in dataflow slices (50)", + "layer": "C4_SEMANTIC_ROLES", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 43, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "symbol_name": "RuntimeManager", + "qname": "RuntimeManager", + "role": "pipeline_stage", + "confidence": 0.67, + "dataflow_participation": 50, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 52, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "## Назначение класса `RuntimeManager`\nКласс `RuntimeManager` играет роль центрального менеджера для управления жизненным циклом различных компонентов приложения runtime. Он отвечает за координацию и интеграцию этих компонентов, а также управляет их состоянием через атрибуты экземпляра.\n\n## Ключевые зависимости\nКлючевыми компонентами, с которыми взаимодействует `RuntimeManager`, являются:\n- `ConfigurationManager`: управление конфигурацией приложения.\n- `ServiceContainer`: контейнер сервисов, используемых приложением.\n- `TraceService`: сервис отслеживания трассировок выполнения задач.\n- `HealthRegistry`: реестр текущего состояния здоровья системы.\n- `LogManager`: менеджер логирования событий.\n- `WorkerSupervisor`: супервизор рабочих процессов.\n- `ControlPlaneService`: служба управления планом контроля выполнения задач.\n\n## Поток данных или вызовов\nПри инициализации объекта `RuntimeManager` вызывается метод `__init__`. В этом методе происходит инициализация основных атрибутов экземпляра, таких как состояние жизненного цикла (`_state`), флаг регистрации модулей (`_core_registered`) и другие внутренние переменные.\n\n### Пример вызова конструктора:\n```python\nmanager = RuntimeManager(configuration=configuration, services=services, ...)\n```\n\nПосле создания объекта `RuntimeManager` он начинает управлять жизненными циклами своих внутренних компонентов, включая регистрацию и запуск соответствующих служб. Метод `_register_core_services()` регистрирует основные сервисы, необходимые для функционирования приложения.\n\n## Важные детали реализации\n- **Атрибуты экземпляра**:\n - `_state`: текущее состояние жизненного цикла приложения (например, IDLE, RUNNING).\n - `_core_registered`: флаг, указывающий, зарегистрированы ли основные модули.\n - `_workers_registered`: аналогично предыдущему, но относится к рабочим модулям.\n \n- **Методы управления состоянием**:\n - `start()`: инициирует выполнение всех зарегистрированных модулей.\n - `stop()`: останавливает работу приложения и освобождает ресурсы.\n\n- **Реализация взаимодействия с внешними сервисами**:\n Методы классов, от которых зависит `RuntimeManager`, такие как `ControlPlaneService`, используются для координации работы приложений и обеспечения бесперебойного выполнения задач.\n\n## Осторожные выводы\nНа основе предоставленного контекста сложно точно описать полный цикл выполнения задачи или взаимодействия конкретного метода класса `RuntimeManager` с другими компонентами приложения. Однако можно предположить, что реализация включает этапы инициализации, регистрации сервисов, запуска и остановки работы приложения, основанные на сигналах жизненного цикла и управлении рабочими процессами.\n\nДля более детального понимания необходимо проанализировать полные реализации методов и взаимодействие объектов внутри приложения runtime.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS", + "C4_SEMANTIC_ROLES" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 255, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 25, + "C0_SOURCE_CHUNKS": 16, + "C4_SEMANTIC_ROLES": 12, + "C2_DEPENDENCY_GRAPH": 58, + "C3_ENTRYPOINTS": 9 + }, + "merge_rank": 17, + "prompt_build": 0, + "llm_call": 3800 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 797, + "evidence_rows": 12, + "evidence_chars": 7130 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 2 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_explain_ru_v1", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "RuntimeManager" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 12, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-fullchain-explain-runtime-manager", + "mode": "full_chain", + "run_started_at": "2026-03-12T11:44:13", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Объясни как работает класс RuntimeManager", + "normalized_query": "Объясни как работает класс RuntimeManager" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Объясни как работает класс RuntimeManager" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни как работает класс RuntimeManager" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Объясни как работает класс RuntimeManager" + }, + "output": { + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ], + "confidence": 0.99 + }, + "rag_count": 12, + "rag_rows": [ + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager\nRuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "qname": "RuntimeManager", + "kind": "class", + "signature": "RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests manager\n- orchestrates role-like calls (4)\n- reads and writes state attributes\n- participates in dataflow slices (50)", + "layer": "C4_SEMANTIC_ROLES", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 43, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "symbol_name": "RuntimeManager", + "qname": "RuntimeManager", + "role": "pipeline_stage", + "confidence": 0.67, + "dataflow_participation": 50, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 52, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 255, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 25, + "C0_SOURCE_CHUNKS": 16, + "C4_SEMANTIC_ROLES": 12, + "C2_DEPENDENCY_GRAPH": 58, + "C3_ENTRYPOINTS": 9 + }, + "merge_rank": 17 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Объясни как работает класс RuntimeManager", + "rag_count": 12 + }, + "output": { + "llm_answer": "## Назначение класса `RuntimeManager`\nКласс `RuntimeManager` играет роль центрального менеджера для управления жизненным циклом различных компонентов приложения runtime. Он отвечает за координацию и интеграцию этих компонентов, а также управляет их состоянием через атрибуты экземпляра.\n\n## Ключевые зависимости\nКлючевыми компонентами, с которыми взаимодействует `RuntimeManager`, являются:\n- `ConfigurationManager`: управление конфигурацией приложения.\n- `ServiceContainer`: контейнер сервисов, используемых приложением.\n- `TraceService`: сервис отслеживания трассировок выполнения задач.\n- `HealthRegistry`: реестр текущего состояния здоровья системы.\n- `LogManager`: менеджер логирования событий.\n- `WorkerSupervisor`: супервизор рабочих процессов.\n- `ControlPlaneService`: служба управления планом контроля выполнения задач.\n\n## Поток данных или вызовов\nПри инициализации объекта `RuntimeManager` вызывается метод `__init__`. В этом методе происходит инициализация основных атрибутов экземпляра, таких как состояние жизненного цикла (`_state`), флаг регистрации модулей (`_core_registered`) и другие внутренние переменные.\n\n### Пример вызова конструктора:\n```python\nmanager = RuntimeManager(configuration=configuration, services=services, ...)\n```\n\nПосле создания объекта `RuntimeManager` он начинает управлять жизненными циклами своих внутренних компонентов, включая регистрацию и запуск соответствующих служб. Метод `_register_core_services()` регистрирует основные сервисы, необходимые для функционирования приложения.\n\n## Важные детали реализации\n- **Атрибуты экземпляра**:\n - `_state`: текущее состояние жизненного цикла приложения (например, IDLE, RUNNING).\n - `_core_registered`: флаг, указывающий, зарегистрированы ли основные модули.\n - `_workers_registered`: аналогично предыдущему, но относится к рабочим модулям.\n \n- **Методы управления состоянием**:\n - `start()`: инициирует выполнение всех зарегистрированных модулей.\n - `stop()`: останавливает работу приложения и освобождает ресурсы.\n\n- **Реализация взаимодействия с внешними сервисами**:\n Методы классов, от которых зависит `RuntimeManager`, такие как `ControlPlaneService`, используются для координации работы приложений и обеспечения бесперебойного выполнения задач.\n\n## Осторожные выводы\nНа основе предоставленного контекста сложно точно описать полный цикл выполнения задачи или взаимодействия конкретного метода класса `RuntimeManager` с другими компонентами приложения. Однако можно предположить, что реализация включает этапы инициализации, регистрации сервисов, запуска и остановки работы приложения, основанные на сигналах жизненного цикла и управлении рабочими процессами.\n\nДля более детального понимания необходимо проанализировать полные реализации методов и взаимодействие объектов внутри приложения runtime." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 797, + "evidence_rows": 12, + "evidence_chars": 7130 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 2 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_explain_ru_v1", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 3800 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_114413/full_chain_plba_code_retrieval_plba-fullchain-explain-runtime-manager.md b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_114413/full_chain_plba_code_retrieval_plba-fullchain-explain-runtime-manager.md new file mode 100644 index 0000000..547284f --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_114413/full_chain_plba_code_retrieval_plba-fullchain-explain-runtime-manager.md @@ -0,0 +1,34 @@ +# plba-fullchain-explain-runtime-manager + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_retrieval.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Объясни как работает класс RuntimeManager + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 12, + "llm_answer": "## Назначение класса `RuntimeManager`\nКласс `RuntimeManager` играет роль центрального менеджера для управления жизненным циклом различных компонентов приложения runtime. Он отвечает за координацию и интеграцию этих компонентов, а также управляет их состоянием через атрибуты экземпляра.\n\n## Ключевые зависимости\nКлючевыми компонентами, с которыми взаимодействует `RuntimeManager`, являются:\n- `ConfigurationManager`: управление конфигурацией приложения.\n- `ServiceContainer`: контейнер сервисов, используемых приложением.\n- `TraceService`: сервис отслеживания трассировок выполнения задач.\n- `HealthRegistry`: реестр текущего состояния здоровья системы.\n- `LogManager`: менеджер логирования событий.\n- `WorkerSupervisor`: супервизор рабочих процессов.\n- `ControlPlaneService`: служба управления планом контроля выполнения задач.\n\n## Поток данных или вызовов\nПри инициализации объекта `RuntimeManager` вызывается метод `__init__`. В этом методе происходит инициализация основных атрибутов экземпляра, таких как состояние жизненного цикла (`_state`), флаг регистрации модулей (`_core_registered`) и другие внутренние переменные.\n\n### Пример вызова конструктора:\n```python\nmanager = RuntimeManager(configuration=configuration, services=services, ...)\n```\n\nПосле создания объекта `RuntimeManager` он начинает управлять жизненными циклами своих внутренних компонентов, включая регистрацию и запуск соответствующих служб. Метод `_register_core_services()` регистрирует основные сервисы, необходимые для функционирования приложения.\n\n## Важные детали реализации\n- **Атрибуты экземпляра**:\n - `_state`: текущее состояние жизненного цикла приложения (например, IDLE, RUNNING).\n - `_core_registered`: флаг, указывающий, зарегистрированы ли основные модули.\n - `_workers_registered`: аналогично предыдущему, но относится к рабочим модулям.\n \n- **Методы управления состоянием**:\n - `start()`: инициирует выполнение всех зарегистрированных модулей.\n - `stop()`: останавливает работу приложения и освобождает ресурсы.\n\n- **Реализация взаимодействия с внешними сервисами**:\n Методы классов, от которых зависит `RuntimeManager`, такие как `ControlPlaneService`, используются для координации работы приложений и обеспечения бесперебойного выполнения задач.\n\n## Осторожные выводы\nНа основе предоставленного контекста сложно точно описать полный цикл выполнения задачи или взаимодействия конкретного метода класса `RuntimeManager` с другими компонентами приложения. Однако можно предположить, что реализация включает этапы инициализации, регистрации сервисов, запуска и остановки работы приложения, основанные на сигналах жизненного цикла и управлении рабочими процессами.\n\nДля более детального понимания необходимо проанализировать полные реализации методов и взаимодействие объектов внутри приложения runtime.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_114413/full_chain_plba_code_retrieval_plba-fullchain-explain-trace-service.json b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_114413/full_chain_plba_code_retrieval_plba-fullchain-explain-trace-service.json new file mode 100644 index 0000000..3c4f904 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_114413/full_chain_plba_code_retrieval_plba-fullchain-explain-trace-service.json @@ -0,0 +1,2208 @@ +{ + "case_id": "plba-fullchain-explain-trace-service", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_retrieval.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 14, + "llm_answer": "## Объяснение работы `TraceService`\n\n### Назначение\n`TraceService` — это компонент, отвечающий за управление контекстом трассировки и запись логических событий во время выполнения приложения. Он служит для создания, хранения и записи трассировочных записей (`trace records`) и сообщений логирования (`log messages`), связанных с выполнением различных операций.\n\n### Ключевые зависимости\n- **TraceContextFactory**: Базовый класс, от которого наследуется `TraceService`. Предоставляет методы для управления контекстом трассировки.\n- **TraceTransport**: Интерфейс, определяющий транспорт для передачи трассировочной информации внешним системам или службам.\n- **TraceContextStore**: Хранит контексты трассировок.\n- **NoOpTraceTransport**: Специальная реализация транспорта без реальных действий, используется по умолчанию при отсутствии указания конкретного транспорта.\n\n### Поток данных или вызовов\n1. При инициализации класса `TraceService` происходит создание экземпляра `TraceRecordWriter`, который отвечает за отправку трассировочных записей через указанный транспорт.\n2. Основной метод `create_context` создаёт новый контекст трассировки с уникальным идентификатором (`trace_id`), атрибутами и временными метками, записывает его в хранилище и передаёт информацию в транспорт.\n3. Контекст трассировки можно открывать с помощью метода `open_context`, который автоматически вызывает `create_context`.\n4. После завершения операции можно записать сообщение логирования через метод `write_message`.\n5. В случае ошибок при передаче данных в транспорт вызывается метод `_logger.exception` для регистрации проблемы.\n\n### Важные детали реализации\n- **UUID для trace_id**: Используется UUID для уникального идентификатора каждой трассировки.\n- **Время события**: Каждое событие сопровождается временной меткой UTC.\n- **Запись сообщений**: Сообщения логирования могут быть записаны отдельно после завершения контекста трассировки.\n- **Логирование ошибок**: При ошибке отправки сообщения в транспорт регистрируется исключение и выводится соответствующее сообщение об ошибке.\n\n### Описание структуры файла\nФайл `src/app_runtime/tracing/service.py` содержит реализацию класса `TraceService`, а также классы `TraceRecordWriter` и другие вспомогательные компоненты.\n\n---\n\nЭтот обзор основан исключительно на предоставленных слоях анализа (C0-C4), поэтому некоторые выводы являются осторожными и требуют дополнительной проверки.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "TraceService" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-fullchain-explain-trace-service", + "text": "Как работает TraceService?", + "mode": "full_chain", + "run_started_at": "2026-03-12T11:44:13", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Как работает TraceService?", + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "TraceService", + "alternatives": [ + "TraceService" + ], + "confidence": 0.99 + }, + "rag_count": 14, + "rag_rows": [ + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceService\nTraceService(TraceContextFactory)", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService", + "span_start": 39, + "span_end": 166, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "c2b2b976d99f2c600000b753731b26e0a69adcb4359398b93073590c5d5d04f4", + "qname": "TraceService", + "kind": "class", + "signature": "TraceService(TraceContextFactory)", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (13)", + "layer": "C4_SEMANTIC_ROLES", + "title": "TraceService", + "span_start": 39, + "span_end": 166, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 60, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "c2b2b976d99f2c600000b753731b26e0a69adcb4359398b93073590c5d5d04f4", + "symbol_name": "TraceService", + "qname": "TraceService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 13, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.create_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 61, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3b052062067a78aef3302ee1d996897e02a67d1b340397bea4f59fe147c0492a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a", + "dst_ref": "TraceService.create_context", + "resolution": "resolved", + "slice_id": "3b052062067a78aef3302ee1d996897e02a67d1b340397bea4f59fe147c0492a", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.create_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.close_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 84, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "7a9353ef57c9ae5d19b3a0c6ac50fad05e6d21d31bbe1cd1cd07af6332ba6505", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "01e14158dcced7e52d0c8ac84ac7b9a75225c261b6aca6a1d7da802d0994721c", + "dst_ref": "TraceService.close_context", + "resolution": "resolved", + "slice_id": "7a9353ef57c9ae5d19b3a0c6ac50fad05e6d21d31bbe1cd1cd07af6332ba6505", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.close_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "01e14158dcced7e52d0c8ac84ac7b9a75225c261b6aca6a1d7da802d0994721c" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.open_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 78, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a6e13b9ebc4fed84586afd53ed92a4d14757e440873f572b2337d5622ee96031", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426", + "dst_ref": "TraceService.open_context", + "resolution": "resolved", + "slice_id": "a6e13b9ebc4fed84586afd53ed92a4d14757e440873f572b2337d5622ee96031", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.open_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.transport\n -> TraceService.__init__", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 41, + "span_end": 43, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "1e923a93faa05c3c43ca9b19bd047007a8589ccce57d3cc1798ae7f9f200af98", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "dst_ref": "TraceService.__init__", + "resolution": "resolved", + "slice_id": "1e923a93faa05c3c43ca9b19bd047007a8589ccce57d3cc1798ae7f9f200af98", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.transport", + "TraceService.__init__" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.current_trace_id", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 81, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3ea17138634b1190bded77ddb84aa1595124f6519b246f24fc4b02bd62b5cac1", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c", + "dst_ref": "TraceService.current_trace_id", + "resolution": "resolved", + "slice_id": "3ea17138634b1190bded77ddb84aa1595124f6519b246f24fc4b02bd62b5cac1", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.current_trace_id" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.step", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 88, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "9f34c5da9b09fba99df6f6b1bde183a9aeb45111b8218a747c71590c2c9f60f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "c44bfbc66cf747283f30088da3e011a10395031d41e77b74e523c24997f641ca", + "dst_ref": "TraceService.step", + "resolution": "resolved", + "slice_id": "9f34c5da9b09fba99df6f6b1bde183a9aeb45111b8218a747c71590c2c9f60f2", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.step" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "c44bfbc66cf747283f30088da3e011a10395031d41e77b74e523c24997f641ca" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceRecordWriter:\n def __init__(self, transport: TraceTransport) -> None:\n self._logger = logging.getLogger(__name__)\n self._transport = transport\n\n def write_context(self, record: TraceContextRecord) -> None:\n try:\n self._transport.write_context(record)\n except Exception:\n self._logger.exception(\"Trace transport failed to write context %s\", record.trace_id)\n\n def write_message(self, record: TraceLogMessage) -> None:\n try:\n self._transport.write_message(record)\n except Exception:\n self._logger.exception(\"Trace transport failed to write message for %s\", record.trace_id)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/tracing/service.py:TraceRecordWriter", + "span_start": 21, + "span_end": 36, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceService(TraceContextFactory):\n def __init__(self, transport: TraceTransport | None = None, store: TraceContextStore | None = None) -> None:\n self.transport = transport or NoOpTraceTransport()\n self.store = store or TraceContextStore()\n self._writer = TraceRecordWriter(self.transport)\n\n def create_context(\n self,\n *,\n alias: str,\n parent_id: str | None = None,\n kind: str | None = None,\n attrs: dict[str, Any] | None = None,\n ) -> str:\n record = TraceContextRecord(\n trace_id=uuid4().hex,\n alias=str(alias or \"\"),\n parent_id=parent_id,\n type=kind,\n event_time=utc_now(),\n attrs=dict(attrs or {}),\n )\n self.store.push(record)\n self._writer.write_context(record)\n return record.trace_id\n\n @contextmanager\n def open_context(\n self,\n *,\n alias: str,\n parent_id: str | None = None,\n kind: str | None = None,\n attrs: dict[str, Any] | None = None,\n ) -> Iterator[str]:\n trace_id = self.create_context(alias=alias, parent_id=parent_id, kind=kind, attrs=attrs)\n try:\n yield trace_id\n finally:\n self.store.pop()\n\n def current_trace_id(self) -> str | None:\n return self.store.current_trace_id()\n\n def close_context(self) -> str | None:\n previous = self.store.pop()\n return previous.record.trace_id if previous else None\n\n def step(self, name: str) -> None:\n self.store.set_step(str(name or \"\"))\n\n def info(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"INFO\", message, status, attrs)\n\n def debug(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"DEBUG\", message, status, attrs)\n\n def warning(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"WARNING\", message, status, attrs)\n\n def error(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"ERROR\", message, status, attrs)\n\n def exception(self, message: str, *, status: str = \"failed\", attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"ERROR\", message, status, attrs)\n\n def new_root(self, operation: str) -> TraceContext:\n trace_id = self.create_context(alias=operation, kind=\"operation\", attrs={\"operation\": operation})\n return TraceContext(trace_id=trace_id, span_id=trace_id, attributes={\"operation\": operation})\n\n def child_of(self, parent: TraceContext, operation: str) -> TraceContext:\n trace_id = self.create_context(\n alias=operation,\n parent_id=parent.trace_id,\n kind=\"worker\",\n attrs={\"operation\": operation},\n )\n return TraceContext(\n trace_id=trace_id,\n span_id=trace_id,\n parent_span_id=parent.span_id,\n attributes={\"operation\": operation},\n )\n\n def attach(self, metadata: dict[str, object], context: TraceContext) -> dict[str, object]:\n updated = dict(metadata)\n updated[\"trace_id\"] = context.trace_id\n updated[\"span_id\"] = context.span_id\n updated[\"parent_span_id\"] = context.parent_span_id\n return updated\n\n def resume(self, metadata: dict[str, object], operation: str) -> TraceContext:\n trace_id = str(metadata.get(\"trace_id\") or uuid4().hex)\n span_id = str(metadata.get(\"span_id\") or trace_id)\n parent_id = metadata.get(\"parent_span_id\")\n self.create_context(\n alias=operation,\n parent_id=str(parent_id) if parent_id else None,\n kind=\"worker\",\n attrs=dict(metadata),\n )\n return TraceContext(\n trace_id=trace_id,\n span_id=span_id,\n parent_span_id=str(parent_id) if parent_id else None,\n attributes={\"operation\": operation},\n )\n\n def _write_message(\n self,\n level: TraceLevel,\n message: str,\n status: str | None,\n attrs: dict[str, Any] | None,\n ) -> None:\n active = self.store.current()\n if active is None:\n raise RuntimeError(\"Trace context is not bound. Call create_context() first.\")\n record = TraceLogMessage(\n trace_id=active.record.trace_id,\n step=active.step,\n status=str(status or \"\"),\n message=str(message or \"\"),\n level=level,\n event_time=utc_now(),\n attrs=dict(attrs or {}),\n )\n self._writer.write_message(record)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/tracing/service.py:TraceService", + "span_start": 39, + "span_end": 166, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceManager(TraceService):\n \"\"\"Compatibility alias during the transition from ConfigManager-shaped naming.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/tracing/service.py:TraceManager", + "span_start": 169, + "span_end": 170, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 2, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "## Объяснение работы `TraceService`\n\n### Назначение\n`TraceService` — это компонент, отвечающий за управление контекстом трассировки и запись логических событий во время выполнения приложения. Он служит для создания, хранения и записи трассировочных записей (`trace records`) и сообщений логирования (`log messages`), связанных с выполнением различных операций.\n\n### Ключевые зависимости\n- **TraceContextFactory**: Базовый класс, от которого наследуется `TraceService`. Предоставляет методы для управления контекстом трассировки.\n- **TraceTransport**: Интерфейс, определяющий транспорт для передачи трассировочной информации внешним системам или службам.\n- **TraceContextStore**: Хранит контексты трассировок.\n- **NoOpTraceTransport**: Специальная реализация транспорта без реальных действий, используется по умолчанию при отсутствии указания конкретного транспорта.\n\n### Поток данных или вызовов\n1. При инициализации класса `TraceService` происходит создание экземпляра `TraceRecordWriter`, который отвечает за отправку трассировочных записей через указанный транспорт.\n2. Основной метод `create_context` создаёт новый контекст трассировки с уникальным идентификатором (`trace_id`), атрибутами и временными метками, записывает его в хранилище и передаёт информацию в транспорт.\n3. Контекст трассировки можно открывать с помощью метода `open_context`, который автоматически вызывает `create_context`.\n4. После завершения операции можно записать сообщение логирования через метод `write_message`.\n5. В случае ошибок при передаче данных в транспорт вызывается метод `_logger.exception` для регистрации проблемы.\n\n### Важные детали реализации\n- **UUID для trace_id**: Используется UUID для уникального идентификатора каждой трассировки.\n- **Время события**: Каждое событие сопровождается временной меткой UTC.\n- **Запись сообщений**: Сообщения логирования могут быть записаны отдельно после завершения контекста трассировки.\n- **Логирование ошибок**: При ошибке отправки сообщения в транспорт регистрируется исключение и выводится соответствующее сообщение об ошибке.\n\n### Описание структуры файла\nФайл `src/app_runtime/tracing/service.py` содержит реализацию класса `TraceService`, а также классы `TraceRecordWriter` и другие вспомогательные компоненты.\n\n---\n\nЭтот обзор основан исключительно на предоставленных слоях анализа (C0-C4), поэтому некоторые выводы являются осторожными и требуют дополнительной проверки.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS", + "C4_SEMANTIC_ROLES" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "TraceService" + ], + "keyword_hints": [ + "TraceService" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "TraceService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "TraceService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "TraceService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "TraceService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "TraceService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "TraceService", + "alternatives": [ + "TraceService" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 141, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 44, + "C0_SOURCE_CHUNKS": 19, + "C4_SEMANTIC_ROLES": 17, + "C2_DEPENDENCY_GRAPH": 47, + "C3_ENTRYPOINTS": 11 + }, + "merge_rank": 20, + "prompt_build": 0, + "llm_call": 3391 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 931, + "evidence_rows": 14, + "evidence_chars": 6323 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 1 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 3, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_explain_ru_v1", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "TraceService" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 14, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-fullchain-explain-trace-service", + "mode": "full_chain", + "run_started_at": "2026-03-12T11:44:13", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Как работает TraceService?", + "normalized_query": "Как работает TraceService?" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Как работает TraceService?" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Как работает TraceService?" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "TraceService" + ], + "keyword_hints": [ + "TraceService" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Как работает TraceService?" + }, + "output": { + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "TraceService", + "alternatives": [ + "TraceService" + ], + "confidence": 0.99 + }, + "rag_count": 14, + "rag_rows": [ + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceService\nTraceService(TraceContextFactory)", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService", + "span_start": 39, + "span_end": 166, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "c2b2b976d99f2c600000b753731b26e0a69adcb4359398b93073590c5d5d04f4", + "qname": "TraceService", + "kind": "class", + "signature": "TraceService(TraceContextFactory)", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (13)", + "layer": "C4_SEMANTIC_ROLES", + "title": "TraceService", + "span_start": 39, + "span_end": 166, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 60, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "c2b2b976d99f2c600000b753731b26e0a69adcb4359398b93073590c5d5d04f4", + "symbol_name": "TraceService", + "qname": "TraceService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 13, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.create_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 61, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3b052062067a78aef3302ee1d996897e02a67d1b340397bea4f59fe147c0492a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a", + "dst_ref": "TraceService.create_context", + "resolution": "resolved", + "slice_id": "3b052062067a78aef3302ee1d996897e02a67d1b340397bea4f59fe147c0492a", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.create_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.close_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 84, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "7a9353ef57c9ae5d19b3a0c6ac50fad05e6d21d31bbe1cd1cd07af6332ba6505", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "01e14158dcced7e52d0c8ac84ac7b9a75225c261b6aca6a1d7da802d0994721c", + "dst_ref": "TraceService.close_context", + "resolution": "resolved", + "slice_id": "7a9353ef57c9ae5d19b3a0c6ac50fad05e6d21d31bbe1cd1cd07af6332ba6505", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.close_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "01e14158dcced7e52d0c8ac84ac7b9a75225c261b6aca6a1d7da802d0994721c" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.open_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 78, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a6e13b9ebc4fed84586afd53ed92a4d14757e440873f572b2337d5622ee96031", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426", + "dst_ref": "TraceService.open_context", + "resolution": "resolved", + "slice_id": "a6e13b9ebc4fed84586afd53ed92a4d14757e440873f572b2337d5622ee96031", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.open_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.transport\n -> TraceService.__init__", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 41, + "span_end": 43, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "1e923a93faa05c3c43ca9b19bd047007a8589ccce57d3cc1798ae7f9f200af98", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "dst_ref": "TraceService.__init__", + "resolution": "resolved", + "slice_id": "1e923a93faa05c3c43ca9b19bd047007a8589ccce57d3cc1798ae7f9f200af98", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.transport", + "TraceService.__init__" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.current_trace_id", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 81, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3ea17138634b1190bded77ddb84aa1595124f6519b246f24fc4b02bd62b5cac1", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c", + "dst_ref": "TraceService.current_trace_id", + "resolution": "resolved", + "slice_id": "3ea17138634b1190bded77ddb84aa1595124f6519b246f24fc4b02bd62b5cac1", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.current_trace_id" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.step", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 88, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "9f34c5da9b09fba99df6f6b1bde183a9aeb45111b8218a747c71590c2c9f60f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "c44bfbc66cf747283f30088da3e011a10395031d41e77b74e523c24997f641ca", + "dst_ref": "TraceService.step", + "resolution": "resolved", + "slice_id": "9f34c5da9b09fba99df6f6b1bde183a9aeb45111b8218a747c71590c2c9f60f2", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.step" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "c44bfbc66cf747283f30088da3e011a10395031d41e77b74e523c24997f641ca" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceRecordWriter:\n def __init__(self, transport: TraceTransport) -> None:\n self._logger = logging.getLogger(__name__)\n self._transport = transport\n\n def write_context(self, record: TraceContextRecord) -> None:\n try:\n self._transport.write_context(record)\n except Exception:\n self._logger.exception(\"Trace transport failed to write context %s\", record.trace_id)\n\n def write_message(self, record: TraceLogMessage) -> None:\n try:\n self._transport.write_message(record)\n except Exception:\n self._logger.exception(\"Trace transport failed to write message for %s\", record.trace_id)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/tracing/service.py:TraceRecordWriter", + "span_start": 21, + "span_end": 36, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceService(TraceContextFactory):\n def __init__(self, transport: TraceTransport | None = None, store: TraceContextStore | None = None) -> None:\n self.transport = transport or NoOpTraceTransport()\n self.store = store or TraceContextStore()\n self._writer = TraceRecordWriter(self.transport)\n\n def create_context(\n self,\n *,\n alias: str,\n parent_id: str | None = None,\n kind: str | None = None,\n attrs: dict[str, Any] | None = None,\n ) -> str:\n record = TraceContextRecord(\n trace_id=uuid4().hex,\n alias=str(alias or \"\"),\n parent_id=parent_id,\n type=kind,\n event_time=utc_now(),\n attrs=dict(attrs or {}),\n )\n self.store.push(record)\n self._writer.write_context(record)\n return record.trace_id\n\n @contextmanager\n def open_context(\n self,\n *,\n alias: str,\n parent_id: str | None = None,\n kind: str | None = None,\n attrs: dict[str, Any] | None = None,\n ) -> Iterator[str]:\n trace_id = self.create_context(alias=alias, parent_id=parent_id, kind=kind, attrs=attrs)\n try:\n yield trace_id\n finally:\n self.store.pop()\n\n def current_trace_id(self) -> str | None:\n return self.store.current_trace_id()\n\n def close_context(self) -> str | None:\n previous = self.store.pop()\n return previous.record.trace_id if previous else None\n\n def step(self, name: str) -> None:\n self.store.set_step(str(name or \"\"))\n\n def info(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"INFO\", message, status, attrs)\n\n def debug(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"DEBUG\", message, status, attrs)\n\n def warning(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"WARNING\", message, status, attrs)\n\n def error(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"ERROR\", message, status, attrs)\n\n def exception(self, message: str, *, status: str = \"failed\", attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"ERROR\", message, status, attrs)\n\n def new_root(self, operation: str) -> TraceContext:\n trace_id = self.create_context(alias=operation, kind=\"operation\", attrs={\"operation\": operation})\n return TraceContext(trace_id=trace_id, span_id=trace_id, attributes={\"operation\": operation})\n\n def child_of(self, parent: TraceContext, operation: str) -> TraceContext:\n trace_id = self.create_context(\n alias=operation,\n parent_id=parent.trace_id,\n kind=\"worker\",\n attrs={\"operation\": operation},\n )\n return TraceContext(\n trace_id=trace_id,\n span_id=trace_id,\n parent_span_id=parent.span_id,\n attributes={\"operation\": operation},\n )\n\n def attach(self, metadata: dict[str, object], context: TraceContext) -> dict[str, object]:\n updated = dict(metadata)\n updated[\"trace_id\"] = context.trace_id\n updated[\"span_id\"] = context.span_id\n updated[\"parent_span_id\"] = context.parent_span_id\n return updated\n\n def resume(self, metadata: dict[str, object], operation: str) -> TraceContext:\n trace_id = str(metadata.get(\"trace_id\") or uuid4().hex)\n span_id = str(metadata.get(\"span_id\") or trace_id)\n parent_id = metadata.get(\"parent_span_id\")\n self.create_context(\n alias=operation,\n parent_id=str(parent_id) if parent_id else None,\n kind=\"worker\",\n attrs=dict(metadata),\n )\n return TraceContext(\n trace_id=trace_id,\n span_id=span_id,\n parent_span_id=str(parent_id) if parent_id else None,\n attributes={\"operation\": operation},\n )\n\n def _write_message(\n self,\n level: TraceLevel,\n message: str,\n status: str | None,\n attrs: dict[str, Any] | None,\n ) -> None:\n active = self.store.current()\n if active is None:\n raise RuntimeError(\"Trace context is not bound. Call create_context() first.\")\n record = TraceLogMessage(\n trace_id=active.record.trace_id,\n step=active.step,\n status=str(status or \"\"),\n message=str(message or \"\"),\n level=level,\n event_time=utc_now(),\n attrs=dict(attrs or {}),\n )\n self._writer.write_message(record)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/tracing/service.py:TraceService", + "span_start": 39, + "span_end": 166, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceManager(TraceService):\n \"\"\"Compatibility alias during the transition from ConfigManager-shaped naming.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/tracing/service.py:TraceManager", + "span_start": 169, + "span_end": 170, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 2, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "TraceService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "TraceService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "TraceService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "TraceService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "TraceService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "TraceService", + "alternatives": [ + "TraceService" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 141, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 44, + "C0_SOURCE_CHUNKS": 19, + "C4_SEMANTIC_ROLES": 17, + "C2_DEPENDENCY_GRAPH": 47, + "C3_ENTRYPOINTS": 11 + }, + "merge_rank": 20 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Как работает TraceService?", + "rag_count": 14 + }, + "output": { + "llm_answer": "## Объяснение работы `TraceService`\n\n### Назначение\n`TraceService` — это компонент, отвечающий за управление контекстом трассировки и запись логических событий во время выполнения приложения. Он служит для создания, хранения и записи трассировочных записей (`trace records`) и сообщений логирования (`log messages`), связанных с выполнением различных операций.\n\n### Ключевые зависимости\n- **TraceContextFactory**: Базовый класс, от которого наследуется `TraceService`. Предоставляет методы для управления контекстом трассировки.\n- **TraceTransport**: Интерфейс, определяющий транспорт для передачи трассировочной информации внешним системам или службам.\n- **TraceContextStore**: Хранит контексты трассировок.\n- **NoOpTraceTransport**: Специальная реализация транспорта без реальных действий, используется по умолчанию при отсутствии указания конкретного транспорта.\n\n### Поток данных или вызовов\n1. При инициализации класса `TraceService` происходит создание экземпляра `TraceRecordWriter`, который отвечает за отправку трассировочных записей через указанный транспорт.\n2. Основной метод `create_context` создаёт новый контекст трассировки с уникальным идентификатором (`trace_id`), атрибутами и временными метками, записывает его в хранилище и передаёт информацию в транспорт.\n3. Контекст трассировки можно открывать с помощью метода `open_context`, который автоматически вызывает `create_context`.\n4. После завершения операции можно записать сообщение логирования через метод `write_message`.\n5. В случае ошибок при передаче данных в транспорт вызывается метод `_logger.exception` для регистрации проблемы.\n\n### Важные детали реализации\n- **UUID для trace_id**: Используется UUID для уникального идентификатора каждой трассировки.\n- **Время события**: Каждое событие сопровождается временной меткой UTC.\n- **Запись сообщений**: Сообщения логирования могут быть записаны отдельно после завершения контекста трассировки.\n- **Логирование ошибок**: При ошибке отправки сообщения в транспорт регистрируется исключение и выводится соответствующее сообщение об ошибке.\n\n### Описание структуры файла\nФайл `src/app_runtime/tracing/service.py` содержит реализацию класса `TraceService`, а также классы `TraceRecordWriter` и другие вспомогательные компоненты.\n\n---\n\nЭтот обзор основан исключительно на предоставленных слоях анализа (C0-C4), поэтому некоторые выводы являются осторожными и требуют дополнительной проверки." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 931, + "evidence_rows": 14, + "evidence_chars": 6323 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 1 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 3, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_explain_ru_v1", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 3391 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_114413/full_chain_plba_code_retrieval_plba-fullchain-explain-trace-service.md b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_114413/full_chain_plba_code_retrieval_plba-fullchain-explain-trace-service.md new file mode 100644 index 0000000..670de6f --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_114413/full_chain_plba_code_retrieval_plba-fullchain-explain-trace-service.md @@ -0,0 +1,34 @@ +# plba-fullchain-explain-trace-service + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_retrieval.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Как работает TraceService? + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 14, + "llm_answer": "## Объяснение работы `TraceService`\n\n### Назначение\n`TraceService` — это компонент, отвечающий за управление контекстом трассировки и запись логических событий во время выполнения приложения. Он служит для создания, хранения и записи трассировочных записей (`trace records`) и сообщений логирования (`log messages`), связанных с выполнением различных операций.\n\n### Ключевые зависимости\n- **TraceContextFactory**: Базовый класс, от которого наследуется `TraceService`. Предоставляет методы для управления контекстом трассировки.\n- **TraceTransport**: Интерфейс, определяющий транспорт для передачи трассировочной информации внешним системам или службам.\n- **TraceContextStore**: Хранит контексты трассировок.\n- **NoOpTraceTransport**: Специальная реализация транспорта без реальных действий, используется по умолчанию при отсутствии указания конкретного транспорта.\n\n### Поток данных или вызовов\n1. При инициализации класса `TraceService` происходит создание экземпляра `TraceRecordWriter`, который отвечает за отправку трассировочных записей через указанный транспорт.\n2. Основной метод `create_context` создаёт новый контекст трассировки с уникальным идентификатором (`trace_id`), атрибутами и временными метками, записывает его в хранилище и передаёт информацию в транспорт.\n3. Контекст трассировки можно открывать с помощью метода `open_context`, который автоматически вызывает `create_context`.\n4. После завершения операции можно записать сообщение логирования через метод `write_message`.\n5. В случае ошибок при передаче данных в транспорт вызывается метод `_logger.exception` для регистрации проблемы.\n\n### Важные детали реализации\n- **UUID для trace_id**: Используется UUID для уникального идентификатора каждой трассировки.\n- **Время события**: Каждое событие сопровождается временной меткой UTC.\n- **Запись сообщений**: Сообщения логирования могут быть записаны отдельно после завершения контекста трассировки.\n- **Логирование ошибок**: При ошибке отправки сообщения в транспорт регистрируется исключение и выводится соответствующее сообщение об ошибке.\n\n### Описание структуры файла\nФайл `src/app_runtime/tracing/service.py` содержит реализацию класса `TraceService`, а также классы `TraceRecordWriter` и другие вспомогательные компоненты.\n\n---\n\nЭтот обзор основан исключительно на предоставленных слоях анализа (C0-C4), поэтому некоторые выводы являются осторожными и требуют дополнительной проверки.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "TraceService" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_114413/full_chain_plba_code_retrieval_plba-fullchain-explain-workflow-engine.json b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_114413/full_chain_plba_code_retrieval_plba-fullchain-explain-workflow-engine.json new file mode 100644 index 0000000..1f8d215 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_114413/full_chain_plba_code_retrieval_plba-fullchain-explain-workflow-engine.json @@ -0,0 +1,2158 @@ +{ + "case_id": "plba-fullchain-explain-workflow-engine", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_retrieval.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 13, + "llm_answer": "## Назначение класса `WorkflowEngine`\n\nКласс `WorkflowEngine` является основным компонентом инфраструктуры выполнения рабочих процессов (`workflow`) в приложении. Он отвечает за координацию и управление жизненным циклом рабочего процесса, включая отслеживание текущего состояния выполнения, взаимодействие с хранилищем для сохранения промежуточных результатов и взаимодействия с внешними компонентами через логирование и трассировку.\n\n## Ключевые зависимости\n\n### 1. Зависимости по модулям и библиотекам\n- **src/app_runtime/workflow/engine/workflow_engine.py**: основной файл, содержащий определение класса `WorkflowEngine`.\n- **src/app_runtime/workflow/engine/hooks.py**: модуль, предоставляющий механизмы расширения функциональности через интерфейс `WorkflowEngineHooks`, позволяющий разработчикам внедрять дополнительные действия перед началом, во время выполнения и после завершения этапов рабочего процесса.\n\n### 2. Основные объекты, используемые внутри класса\n- **workflow**: объект, представляющий рабочий процесс, который будет выполняться.\n- **persistence**: механизм хранения состояний рабочих процессов, обычно реализованный через базы данных или системы управления событиями.\n- **traces**: инструмент трассировки, предназначенный для мониторинга хода выполнения рабочего процесса и его шагов.\n- **hooks**: дополнительные модули расширений, которые могут быть подключены к рабочему процессу.\n\n## Поток данных или вызовов\n\nПри запуске экземпляра класса `WorkflowEngine` вызывается метод `run()`. Этот метод выполняет следующие шаги:\n\n1. **Инициализация выполнения**:\n - Вызывается метод `_transition_resolver`, который отвечает за разрешение переходов между узлами рабочего процесса.\n - Создаётся идентификатор текущей рабочей сессии при помощи метода `start_run()` из объекта persistence.\n \n2. **Запуск основного цикла исполнения**:\n - Основной цикл использует переменную `current_name`, которая представляет текущий этап выполнения рабочего процесса.\n - В каждом шаге выполняется следующий узел (`node`), определяется его текущее состояние и фиксируется текущая точка выполнения в контексте выполнения.\n\n3. **Завершение выполнения**:\n - После завершения последнего этапа рабочего процесса происходит запись информации о завершении в хранилище и регистрация этого события в системе трассировки.\n\n## Важные детали реализации\n\n### 1. Логика работы узлов (`nodes`)\n- Метод `run()` последовательно обрабатывает узлы рабочего процесса до тех пор, пока не завершится выполнение всех заданных задач.\n- Узлы являются основными элементами рабочего процесса и определяют последовательность действий и переходы между ними.\n\n### 2. Обработка контекста выполнения\n- Контекст выполнения хранится в виде словаря (`context.state`), что позволяет сохранять промежуточные результаты и информацию о текущем состоянии выполнения рабочего процесса.\n\n### 3. Использование внешних механизмов\n- Класс поддерживает внешние расширения через интерфейс `WorkflowEngineHooks`, позволяя разработчикам добавлять свою бизнес-логику без изменения базовой структуры рабочего процесса.\n\n### Осторожные выводы\nНа основании текущих данных невозможно точно определить все подробности внутреннего устройства каждого узла рабочего процесса (`nodes`) и алгоритмы разрешения переходов. Однако, исходя из доступной информации, можно предположить, что узлы рабочего процесса содержат некоторую внутреннюю логику, позволяющую автоматически разрешать возможные переходы между этапами. Это предположение основано на косвенных признаках и не подтверждено прямым анализом исходного кода этих узлов.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "WorkflowEngine" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-fullchain-explain-workflow-engine", + "text": "Объясни класс WorkflowEngine", + "mode": "full_chain", + "run_started_at": "2026-03-12T11:44:13", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни класс WorkflowEngine", + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "WorkflowEngine", + "alternatives": [ + "WorkflowEngine", + "WorkflowEngineHooks" + ], + "confidence": 0.99 + }, + "rag_count": 13, + "rag_rows": [ + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "class WorkflowEngine\nWorkflowEngine", + "layer": "C1_SYMBOL_CATALOG", + "title": "WorkflowEngine", + "span_start": 10, + "span_end": 86, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "57ec0a9f11c542c78e008684a888397e8d9ef4223671acb2567e631a0cbc70b4", + "qname": "WorkflowEngine", + "kind": "class", + "signature": "WorkflowEngine", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.workflow.engine.workflow_engine", + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/hooks.py", + "content": "class WorkflowEngineHooks\nWorkflowEngineHooks", + "layer": "C1_SYMBOL_CATALOG", + "title": "WorkflowEngineHooks", + "span_start": 6, + "span_end": 14, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "914123ed510540061e116100fc87bba4195595ba696f8bfde2fd77ac6a5cd7e4", + "qname": "WorkflowEngineHooks", + "kind": "class", + "signature": "WorkflowEngineHooks", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.workflow.engine.hooks", + "is_test": false, + "blob_sha": "4b11672b0a9af1ae04bfce9d8e1f96572997d3e65e68108d7c797b88fa5fa47a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowEngine", + "span_start": 10, + "span_end": 86, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "57ec0a9f11c542c78e008684a888397e8d9ef4223671acb2567e631a0cbc70b4", + "symbol_name": "WorkflowEngine", + "qname": "WorkflowEngine", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine.__init__\n -> WorkflowEngine._transition_resolver\n -> WorkflowEngine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowEngine.__init__:dataflow_slice", + "span_start": 14, + "span_end": 63, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3abf07e5c245e0fe59785ba2d569c2ee56018715fc7f625a044ddaf6201f903d", + "edge_type": "dataflow_slice", + "src_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "src_qname": "WorkflowEngine.__init__", + "dst_symbol_id": "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8", + "dst_ref": "WorkflowEngine.run", + "resolution": "resolved", + "slice_id": "3abf07e5c245e0fe59785ba2d569c2ee56018715fc7f625a044ddaf6201f903d", + "root_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "path_symbols": [ + "WorkflowEngine.__init__", + "WorkflowEngine._transition_resolver", + "WorkflowEngine.run" + ], + "path_symbol_ids": [ + "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine.__init__\n -> WorkflowEngine._hooks\n -> WorkflowEngine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowEngine.__init__:dataflow_slice", + "span_start": 16, + "span_end": 34, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d73db644b69c1eb35afd6eae9d6ac8674e49e30e9bcf9c020f9fdbfe754851b2", + "edge_type": "dataflow_slice", + "src_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "src_qname": "WorkflowEngine.__init__", + "dst_symbol_id": "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8", + "dst_ref": "WorkflowEngine.run", + "resolution": "resolved", + "slice_id": "d73db644b69c1eb35afd6eae9d6ac8674e49e30e9bcf9c020f9fdbfe754851b2", + "root_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "path_symbols": [ + "WorkflowEngine.__init__", + "WorkflowEngine._hooks", + "WorkflowEngine.run" + ], + "path_symbol_ids": [ + "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine.__init__\n -> WorkflowEngine._workflow\n -> WorkflowEngine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowEngine.__init__:dataflow_slice", + "span_start": 12, + "span_end": 29, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "b45ef3c54669b4910a8aed3a565804f275424a24007bc7e3c953389521f80249", + "edge_type": "dataflow_slice", + "src_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "src_qname": "WorkflowEngine.__init__", + "dst_symbol_id": "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8", + "dst_ref": "WorkflowEngine.run", + "resolution": "resolved", + "slice_id": "b45ef3c54669b4910a8aed3a565804f275424a24007bc7e3c953389521f80249", + "root_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "path_symbols": [ + "WorkflowEngine.__init__", + "WorkflowEngine._workflow", + "WorkflowEngine.run" + ], + "path_symbol_ids": [ + "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine.__init__\n -> WorkflowEngine._persistence\n -> WorkflowEngine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowEngine.__init__:dataflow_slice", + "span_start": 13, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "8101338770016324ce05d61daa9935a444c75e6c94a0fae4275d5b50fcbcc70b", + "edge_type": "dataflow_slice", + "src_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "src_qname": "WorkflowEngine.__init__", + "dst_symbol_id": "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8", + "dst_ref": "WorkflowEngine.run", + "resolution": "resolved", + "slice_id": "8101338770016324ce05d61daa9935a444c75e6c94a0fae4275d5b50fcbcc70b", + "root_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "path_symbols": [ + "WorkflowEngine.__init__", + "WorkflowEngine._persistence", + "WorkflowEngine.run" + ], + "path_symbol_ids": [ + "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine.__init__\n -> WorkflowEngine._traces\n -> WorkflowEngine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowEngine.__init__:dataflow_slice", + "span_start": 15, + "span_end": 27, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "5006266616d534d721648391565e2ac0c9e7e9d9f8df00c17fba8989afb533a5", + "edge_type": "dataflow_slice", + "src_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "src_qname": "WorkflowEngine.__init__", + "dst_symbol_id": "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8", + "dst_ref": "WorkflowEngine.run", + "resolution": "resolved", + "slice_id": "5006266616d534d721648391565e2ac0c9e7e9d9f8df00c17fba8989afb533a5", + "root_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "path_symbols": [ + "WorkflowEngine.__init__", + "WorkflowEngine._traces", + "WorkflowEngine.run" + ], + "path_symbol_ids": [ + "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine.__init__\n -> WorkflowEngine._logger\n -> WorkflowEngine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowEngine.__init__:dataflow_slice", + "span_start": 17, + "span_end": 85, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "2f9927abb24794adb056b94bfb5d8538a5cbafb160da2079f52fca97fd694a2b", + "edge_type": "dataflow_slice", + "src_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "src_qname": "WorkflowEngine.__init__", + "dst_symbol_id": "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8", + "dst_ref": "WorkflowEngine.run", + "resolution": "resolved", + "slice_id": "2f9927abb24794adb056b94bfb5d8538a5cbafb160da2079f52fca97fd694a2b", + "root_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "path_symbols": [ + "WorkflowEngine.__init__", + "WorkflowEngine._logger", + "WorkflowEngine.run" + ], + "path_symbol_ids": [ + "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "class WorkflowEngine:\n def __init__(self, workflow, persistence, *, traces, hooks: WorkflowEngineHooks | None = None) -> None:\n self._workflow = workflow\n self._persistence = persistence\n self._transition_resolver = TransitionResolver()\n self._traces = traces\n self._hooks = hooks or WorkflowEngineHooks()\n self._logger = logging.getLogger(__name__)\n\n def run(self, context: WorkflowContext) -> dict[str, object]:\n run_id = self._persistence.start_run(\n self._workflow.definition.name,\n self._workflow.definition.start_at,\n context.snapshot(),\n )\n context.state.setdefault(\"runtime\", {})\n context.state[\"runtime\"][\"workflow_run_id\"] = run_id\n self._traces.step(\"workflow\")\n self._traces.info(\"Workflow started.\", status=\"started\", attrs={\"workflow_run_id\": run_id})\n current_name = self._workflow.definition.start_at\n while current_name is not None:\n node = self._workflow.definition.nodes[current_name]\n context.state[\"runtime\"][\"current_node\"] = current_name\n self._logger.info(\"Workflow run %s: step '%s' started.\", run_id, current_name)\n self._hooks.on_step_started(context, current_name)\n self._persistence.start_step(run_id, current_name, context.snapshot())\n self._traces.step(current_name)\n self._traces.debug(\n f\"Step '{current_name}' started.\",\n status=\"started\",\n attrs={\"workflow_run_id\": run_id, \"node\": current_name},\n )\n try:\n result = node.step.run(context)\n except Exception as error:\n self._persistence.fail_step(run_id, current_name, context.snapshot(), error)\n self._persistence.fail_run(run_id, context.snapshot())\n self._traces.error(\n f\"Step '{current_name}' failed: {error}\",\n status=\"failed\",\n attrs={\"exception_type\": type(error).__name__},\n )\n self._logger.exception(\"Workflow run %s: step '%s' failed.\", run_id, current_name)\n self._hooks.on_step_failed(context, current_name)\n raise\n context.state.update(result.updates)\n self._persistence.complete_step(\n run_id,\n current_name,\n result.status,\n result.transition,\n context.snapshot(),\n )\n next_node = self._transition_resolver.resolve(node, result)\n self._traces.debug(\n f\"Step '{current_name}' completed with transition '{result.transition}'.\",\n status=result.status,\n attrs={\n \"workflow_run_id\": run_id,\n \"from_node\": current_name,\n \"transition\": result.transition,\n \"to_node\": next_node,\n },\n )\n self._logger.info(\n \"Workflow run %s: step '%s' completed with transition '%s'.\",\n run_id,\n current_name,\n result.transition,\n )\n self._hooks.on_step_finished(context, current_name)\n current_name = next_node\n self._persistence.complete_run(run_id, context.snapshot())\n self._traces.step(\"workflow\")\n self._traces.info(\"Workflow completed.\", status=\"completed\", attrs={\"workflow_run_id\": run_id})\n self._logger.info(\"Workflow run %s completed.\", run_id)\n return {\"run_id\": run_id, \"status\": \"completed\", \"context\": context.snapshot()}", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/workflow/engine/workflow_engine.py:WorkflowEngine", + "span_start": 10, + "span_end": 86, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.workflow.engine.workflow_engine", + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "## Назначение класса `WorkflowEngine`\n\nКласс `WorkflowEngine` является основным компонентом инфраструктуры выполнения рабочих процессов (`workflow`) в приложении. Он отвечает за координацию и управление жизненным циклом рабочего процесса, включая отслеживание текущего состояния выполнения, взаимодействие с хранилищем для сохранения промежуточных результатов и взаимодействия с внешними компонентами через логирование и трассировку.\n\n## Ключевые зависимости\n\n### 1. Зависимости по модулям и библиотекам\n- **src/app_runtime/workflow/engine/workflow_engine.py**: основной файл, содержащий определение класса `WorkflowEngine`.\n- **src/app_runtime/workflow/engine/hooks.py**: модуль, предоставляющий механизмы расширения функциональности через интерфейс `WorkflowEngineHooks`, позволяющий разработчикам внедрять дополнительные действия перед началом, во время выполнения и после завершения этапов рабочего процесса.\n\n### 2. Основные объекты, используемые внутри класса\n- **workflow**: объект, представляющий рабочий процесс, который будет выполняться.\n- **persistence**: механизм хранения состояний рабочих процессов, обычно реализованный через базы данных или системы управления событиями.\n- **traces**: инструмент трассировки, предназначенный для мониторинга хода выполнения рабочего процесса и его шагов.\n- **hooks**: дополнительные модули расширений, которые могут быть подключены к рабочему процессу.\n\n## Поток данных или вызовов\n\nПри запуске экземпляра класса `WorkflowEngine` вызывается метод `run()`. Этот метод выполняет следующие шаги:\n\n1. **Инициализация выполнения**:\n - Вызывается метод `_transition_resolver`, который отвечает за разрешение переходов между узлами рабочего процесса.\n - Создаётся идентификатор текущей рабочей сессии при помощи метода `start_run()` из объекта persistence.\n \n2. **Запуск основного цикла исполнения**:\n - Основной цикл использует переменную `current_name`, которая представляет текущий этап выполнения рабочего процесса.\n - В каждом шаге выполняется следующий узел (`node`), определяется его текущее состояние и фиксируется текущая точка выполнения в контексте выполнения.\n\n3. **Завершение выполнения**:\n - После завершения последнего этапа рабочего процесса происходит запись информации о завершении в хранилище и регистрация этого события в системе трассировки.\n\n## Важные детали реализации\n\n### 1. Логика работы узлов (`nodes`)\n- Метод `run()` последовательно обрабатывает узлы рабочего процесса до тех пор, пока не завершится выполнение всех заданных задач.\n- Узлы являются основными элементами рабочего процесса и определяют последовательность действий и переходы между ними.\n\n### 2. Обработка контекста выполнения\n- Контекст выполнения хранится в виде словаря (`context.state`), что позволяет сохранять промежуточные результаты и информацию о текущем состоянии выполнения рабочего процесса.\n\n### 3. Использование внешних механизмов\n- Класс поддерживает внешние расширения через интерфейс `WorkflowEngineHooks`, позволяя разработчикам добавлять свою бизнес-логику без изменения базовой структуры рабочего процесса.\n\n### Осторожные выводы\nНа основании текущих данных невозможно точно определить все подробности внутреннего устройства каждого узла рабочего процесса (`nodes`) и алгоритмы разрешения переходов. Однако, исходя из доступной информации, можно предположить, что узлы рабочего процесса содержат некоторую внутреннюю логику, позволяющую автоматически разрешать возможные переходы между этапами. Это предположение основано на косвенных признаках и не подтверждено прямым анализом исходного кода этих узлов.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS", + "C4_SEMANTIC_ROLES" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "WorkflowEngine" + ], + "keyword_hints": [ + "WorkflowEngine" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "WorkflowEngine", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "WorkflowEngine", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "WorkflowEngine", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "WorkflowEngine", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "WorkflowEngine", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 2, + "candidates_after_filter": 2 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "WorkflowEngine", + "alternatives": [ + "WorkflowEngine", + "WorkflowEngineHooks" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 2, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 129, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 39, + "C0_SOURCE_CHUNKS": 15, + "C4_SEMANTIC_ROLES": 17, + "C2_DEPENDENCY_GRAPH": 45, + "C3_ENTRYPOINTS": 10 + }, + "merge_rank": 37, + "prompt_build": 0, + "llm_call": 4657 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 780, + "evidence_rows": 13, + "evidence_chars": 4423 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 2, + "unique_paths": 2 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 1 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_explain_ru_v1", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "WorkflowEngine" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 13, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-fullchain-explain-workflow-engine", + "mode": "full_chain", + "run_started_at": "2026-03-12T11:44:13", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Объясни класс WorkflowEngine", + "normalized_query": "Объясни класс WorkflowEngine" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Объясни класс WorkflowEngine" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни класс WorkflowEngine" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "WorkflowEngine" + ], + "keyword_hints": [ + "WorkflowEngine" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Объясни класс WorkflowEngine" + }, + "output": { + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "WorkflowEngine", + "alternatives": [ + "WorkflowEngine", + "WorkflowEngineHooks" + ], + "confidence": 0.99 + }, + "rag_count": 13, + "rag_rows": [ + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "class WorkflowEngine\nWorkflowEngine", + "layer": "C1_SYMBOL_CATALOG", + "title": "WorkflowEngine", + "span_start": 10, + "span_end": 86, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "57ec0a9f11c542c78e008684a888397e8d9ef4223671acb2567e631a0cbc70b4", + "qname": "WorkflowEngine", + "kind": "class", + "signature": "WorkflowEngine", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.workflow.engine.workflow_engine", + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/hooks.py", + "content": "class WorkflowEngineHooks\nWorkflowEngineHooks", + "layer": "C1_SYMBOL_CATALOG", + "title": "WorkflowEngineHooks", + "span_start": 6, + "span_end": 14, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "914123ed510540061e116100fc87bba4195595ba696f8bfde2fd77ac6a5cd7e4", + "qname": "WorkflowEngineHooks", + "kind": "class", + "signature": "WorkflowEngineHooks", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.workflow.engine.hooks", + "is_test": false, + "blob_sha": "4b11672b0a9af1ae04bfce9d8e1f96572997d3e65e68108d7c797b88fa5fa47a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowEngine", + "span_start": 10, + "span_end": 86, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "57ec0a9f11c542c78e008684a888397e8d9ef4223671acb2567e631a0cbc70b4", + "symbol_name": "WorkflowEngine", + "qname": "WorkflowEngine", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine.__init__\n -> WorkflowEngine._transition_resolver\n -> WorkflowEngine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowEngine.__init__:dataflow_slice", + "span_start": 14, + "span_end": 63, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3abf07e5c245e0fe59785ba2d569c2ee56018715fc7f625a044ddaf6201f903d", + "edge_type": "dataflow_slice", + "src_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "src_qname": "WorkflowEngine.__init__", + "dst_symbol_id": "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8", + "dst_ref": "WorkflowEngine.run", + "resolution": "resolved", + "slice_id": "3abf07e5c245e0fe59785ba2d569c2ee56018715fc7f625a044ddaf6201f903d", + "root_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "path_symbols": [ + "WorkflowEngine.__init__", + "WorkflowEngine._transition_resolver", + "WorkflowEngine.run" + ], + "path_symbol_ids": [ + "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine.__init__\n -> WorkflowEngine._hooks\n -> WorkflowEngine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowEngine.__init__:dataflow_slice", + "span_start": 16, + "span_end": 34, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d73db644b69c1eb35afd6eae9d6ac8674e49e30e9bcf9c020f9fdbfe754851b2", + "edge_type": "dataflow_slice", + "src_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "src_qname": "WorkflowEngine.__init__", + "dst_symbol_id": "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8", + "dst_ref": "WorkflowEngine.run", + "resolution": "resolved", + "slice_id": "d73db644b69c1eb35afd6eae9d6ac8674e49e30e9bcf9c020f9fdbfe754851b2", + "root_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "path_symbols": [ + "WorkflowEngine.__init__", + "WorkflowEngine._hooks", + "WorkflowEngine.run" + ], + "path_symbol_ids": [ + "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine.__init__\n -> WorkflowEngine._workflow\n -> WorkflowEngine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowEngine.__init__:dataflow_slice", + "span_start": 12, + "span_end": 29, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "b45ef3c54669b4910a8aed3a565804f275424a24007bc7e3c953389521f80249", + "edge_type": "dataflow_slice", + "src_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "src_qname": "WorkflowEngine.__init__", + "dst_symbol_id": "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8", + "dst_ref": "WorkflowEngine.run", + "resolution": "resolved", + "slice_id": "b45ef3c54669b4910a8aed3a565804f275424a24007bc7e3c953389521f80249", + "root_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "path_symbols": [ + "WorkflowEngine.__init__", + "WorkflowEngine._workflow", + "WorkflowEngine.run" + ], + "path_symbol_ids": [ + "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine.__init__\n -> WorkflowEngine._persistence\n -> WorkflowEngine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowEngine.__init__:dataflow_slice", + "span_start": 13, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "8101338770016324ce05d61daa9935a444c75e6c94a0fae4275d5b50fcbcc70b", + "edge_type": "dataflow_slice", + "src_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "src_qname": "WorkflowEngine.__init__", + "dst_symbol_id": "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8", + "dst_ref": "WorkflowEngine.run", + "resolution": "resolved", + "slice_id": "8101338770016324ce05d61daa9935a444c75e6c94a0fae4275d5b50fcbcc70b", + "root_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "path_symbols": [ + "WorkflowEngine.__init__", + "WorkflowEngine._persistence", + "WorkflowEngine.run" + ], + "path_symbol_ids": [ + "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine.__init__\n -> WorkflowEngine._traces\n -> WorkflowEngine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowEngine.__init__:dataflow_slice", + "span_start": 15, + "span_end": 27, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "5006266616d534d721648391565e2ac0c9e7e9d9f8df00c17fba8989afb533a5", + "edge_type": "dataflow_slice", + "src_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "src_qname": "WorkflowEngine.__init__", + "dst_symbol_id": "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8", + "dst_ref": "WorkflowEngine.run", + "resolution": "resolved", + "slice_id": "5006266616d534d721648391565e2ac0c9e7e9d9f8df00c17fba8989afb533a5", + "root_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "path_symbols": [ + "WorkflowEngine.__init__", + "WorkflowEngine._traces", + "WorkflowEngine.run" + ], + "path_symbol_ids": [ + "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine.__init__\n -> WorkflowEngine._logger\n -> WorkflowEngine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowEngine.__init__:dataflow_slice", + "span_start": 17, + "span_end": 85, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "2f9927abb24794adb056b94bfb5d8538a5cbafb160da2079f52fca97fd694a2b", + "edge_type": "dataflow_slice", + "src_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "src_qname": "WorkflowEngine.__init__", + "dst_symbol_id": "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8", + "dst_ref": "WorkflowEngine.run", + "resolution": "resolved", + "slice_id": "2f9927abb24794adb056b94bfb5d8538a5cbafb160da2079f52fca97fd694a2b", + "root_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "path_symbols": [ + "WorkflowEngine.__init__", + "WorkflowEngine._logger", + "WorkflowEngine.run" + ], + "path_symbol_ids": [ + "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "class WorkflowEngine:\n def __init__(self, workflow, persistence, *, traces, hooks: WorkflowEngineHooks | None = None) -> None:\n self._workflow = workflow\n self._persistence = persistence\n self._transition_resolver = TransitionResolver()\n self._traces = traces\n self._hooks = hooks or WorkflowEngineHooks()\n self._logger = logging.getLogger(__name__)\n\n def run(self, context: WorkflowContext) -> dict[str, object]:\n run_id = self._persistence.start_run(\n self._workflow.definition.name,\n self._workflow.definition.start_at,\n context.snapshot(),\n )\n context.state.setdefault(\"runtime\", {})\n context.state[\"runtime\"][\"workflow_run_id\"] = run_id\n self._traces.step(\"workflow\")\n self._traces.info(\"Workflow started.\", status=\"started\", attrs={\"workflow_run_id\": run_id})\n current_name = self._workflow.definition.start_at\n while current_name is not None:\n node = self._workflow.definition.nodes[current_name]\n context.state[\"runtime\"][\"current_node\"] = current_name\n self._logger.info(\"Workflow run %s: step '%s' started.\", run_id, current_name)\n self._hooks.on_step_started(context, current_name)\n self._persistence.start_step(run_id, current_name, context.snapshot())\n self._traces.step(current_name)\n self._traces.debug(\n f\"Step '{current_name}' started.\",\n status=\"started\",\n attrs={\"workflow_run_id\": run_id, \"node\": current_name},\n )\n try:\n result = node.step.run(context)\n except Exception as error:\n self._persistence.fail_step(run_id, current_name, context.snapshot(), error)\n self._persistence.fail_run(run_id, context.snapshot())\n self._traces.error(\n f\"Step '{current_name}' failed: {error}\",\n status=\"failed\",\n attrs={\"exception_type\": type(error).__name__},\n )\n self._logger.exception(\"Workflow run %s: step '%s' failed.\", run_id, current_name)\n self._hooks.on_step_failed(context, current_name)\n raise\n context.state.update(result.updates)\n self._persistence.complete_step(\n run_id,\n current_name,\n result.status,\n result.transition,\n context.snapshot(),\n )\n next_node = self._transition_resolver.resolve(node, result)\n self._traces.debug(\n f\"Step '{current_name}' completed with transition '{result.transition}'.\",\n status=result.status,\n attrs={\n \"workflow_run_id\": run_id,\n \"from_node\": current_name,\n \"transition\": result.transition,\n \"to_node\": next_node,\n },\n )\n self._logger.info(\n \"Workflow run %s: step '%s' completed with transition '%s'.\",\n run_id,\n current_name,\n result.transition,\n )\n self._hooks.on_step_finished(context, current_name)\n current_name = next_node\n self._persistence.complete_run(run_id, context.snapshot())\n self._traces.step(\"workflow\")\n self._traces.info(\"Workflow completed.\", status=\"completed\", attrs={\"workflow_run_id\": run_id})\n self._logger.info(\"Workflow run %s completed.\", run_id)\n return {\"run_id\": run_id, \"status\": \"completed\", \"context\": context.snapshot()}", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/workflow/engine/workflow_engine.py:WorkflowEngine", + "span_start": 10, + "span_end": 86, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.workflow.engine.workflow_engine", + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "WorkflowEngine", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "WorkflowEngine", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "WorkflowEngine", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "WorkflowEngine", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "WorkflowEngine", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 2, + "candidates_after_filter": 2 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "WorkflowEngine", + "alternatives": [ + "WorkflowEngine", + "WorkflowEngineHooks" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 2, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 129, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 39, + "C0_SOURCE_CHUNKS": 15, + "C4_SEMANTIC_ROLES": 17, + "C2_DEPENDENCY_GRAPH": 45, + "C3_ENTRYPOINTS": 10 + }, + "merge_rank": 37 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Объясни класс WorkflowEngine", + "rag_count": 13 + }, + "output": { + "llm_answer": "## Назначение класса `WorkflowEngine`\n\nКласс `WorkflowEngine` является основным компонентом инфраструктуры выполнения рабочих процессов (`workflow`) в приложении. Он отвечает за координацию и управление жизненным циклом рабочего процесса, включая отслеживание текущего состояния выполнения, взаимодействие с хранилищем для сохранения промежуточных результатов и взаимодействия с внешними компонентами через логирование и трассировку.\n\n## Ключевые зависимости\n\n### 1. Зависимости по модулям и библиотекам\n- **src/app_runtime/workflow/engine/workflow_engine.py**: основной файл, содержащий определение класса `WorkflowEngine`.\n- **src/app_runtime/workflow/engine/hooks.py**: модуль, предоставляющий механизмы расширения функциональности через интерфейс `WorkflowEngineHooks`, позволяющий разработчикам внедрять дополнительные действия перед началом, во время выполнения и после завершения этапов рабочего процесса.\n\n### 2. Основные объекты, используемые внутри класса\n- **workflow**: объект, представляющий рабочий процесс, который будет выполняться.\n- **persistence**: механизм хранения состояний рабочих процессов, обычно реализованный через базы данных или системы управления событиями.\n- **traces**: инструмент трассировки, предназначенный для мониторинга хода выполнения рабочего процесса и его шагов.\n- **hooks**: дополнительные модули расширений, которые могут быть подключены к рабочему процессу.\n\n## Поток данных или вызовов\n\nПри запуске экземпляра класса `WorkflowEngine` вызывается метод `run()`. Этот метод выполняет следующие шаги:\n\n1. **Инициализация выполнения**:\n - Вызывается метод `_transition_resolver`, который отвечает за разрешение переходов между узлами рабочего процесса.\n - Создаётся идентификатор текущей рабочей сессии при помощи метода `start_run()` из объекта persistence.\n \n2. **Запуск основного цикла исполнения**:\n - Основной цикл использует переменную `current_name`, которая представляет текущий этап выполнения рабочего процесса.\n - В каждом шаге выполняется следующий узел (`node`), определяется его текущее состояние и фиксируется текущая точка выполнения в контексте выполнения.\n\n3. **Завершение выполнения**:\n - После завершения последнего этапа рабочего процесса происходит запись информации о завершении в хранилище и регистрация этого события в системе трассировки.\n\n## Важные детали реализации\n\n### 1. Логика работы узлов (`nodes`)\n- Метод `run()` последовательно обрабатывает узлы рабочего процесса до тех пор, пока не завершится выполнение всех заданных задач.\n- Узлы являются основными элементами рабочего процесса и определяют последовательность действий и переходы между ними.\n\n### 2. Обработка контекста выполнения\n- Контекст выполнения хранится в виде словаря (`context.state`), что позволяет сохранять промежуточные результаты и информацию о текущем состоянии выполнения рабочего процесса.\n\n### 3. Использование внешних механизмов\n- Класс поддерживает внешние расширения через интерфейс `WorkflowEngineHooks`, позволяя разработчикам добавлять свою бизнес-логику без изменения базовой структуры рабочего процесса.\n\n### Осторожные выводы\nНа основании текущих данных невозможно точно определить все подробности внутреннего устройства каждого узла рабочего процесса (`nodes`) и алгоритмы разрешения переходов. Однако, исходя из доступной информации, можно предположить, что узлы рабочего процесса содержат некоторую внутреннюю логику, позволяющую автоматически разрешать возможные переходы между этапами. Это предположение основано на косвенных признаках и не подтверждено прямым анализом исходного кода этих узлов." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 780, + "evidence_rows": 13, + "evidence_chars": 4423 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 2, + "unique_paths": 2 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 1 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_explain_ru_v1", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 4657 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_114413/full_chain_plba_code_retrieval_plba-fullchain-explain-workflow-engine.md b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_114413/full_chain_plba_code_retrieval_plba-fullchain-explain-workflow-engine.md new file mode 100644 index 0000000..6ecb144 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_114413/full_chain_plba_code_retrieval_plba-fullchain-explain-workflow-engine.md @@ -0,0 +1,34 @@ +# plba-fullchain-explain-workflow-engine + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_retrieval.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Объясни класс WorkflowEngine + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 13, + "llm_answer": "## Назначение класса `WorkflowEngine`\n\nКласс `WorkflowEngine` является основным компонентом инфраструктуры выполнения рабочих процессов (`workflow`) в приложении. Он отвечает за координацию и управление жизненным циклом рабочего процесса, включая отслеживание текущего состояния выполнения, взаимодействие с хранилищем для сохранения промежуточных результатов и взаимодействия с внешними компонентами через логирование и трассировку.\n\n## Ключевые зависимости\n\n### 1. Зависимости по модулям и библиотекам\n- **src/app_runtime/workflow/engine/workflow_engine.py**: основной файл, содержащий определение класса `WorkflowEngine`.\n- **src/app_runtime/workflow/engine/hooks.py**: модуль, предоставляющий механизмы расширения функциональности через интерфейс `WorkflowEngineHooks`, позволяющий разработчикам внедрять дополнительные действия перед началом, во время выполнения и после завершения этапов рабочего процесса.\n\n### 2. Основные объекты, используемые внутри класса\n- **workflow**: объект, представляющий рабочий процесс, который будет выполняться.\n- **persistence**: механизм хранения состояний рабочих процессов, обычно реализованный через базы данных или системы управления событиями.\n- **traces**: инструмент трассировки, предназначенный для мониторинга хода выполнения рабочего процесса и его шагов.\n- **hooks**: дополнительные модули расширений, которые могут быть подключены к рабочему процессу.\n\n## Поток данных или вызовов\n\nПри запуске экземпляра класса `WorkflowEngine` вызывается метод `run()`. Этот метод выполняет следующие шаги:\n\n1. **Инициализация выполнения**:\n - Вызывается метод `_transition_resolver`, который отвечает за разрешение переходов между узлами рабочего процесса.\n - Создаётся идентификатор текущей рабочей сессии при помощи метода `start_run()` из объекта persistence.\n \n2. **Запуск основного цикла исполнения**:\n - Основной цикл использует переменную `current_name`, которая представляет текущий этап выполнения рабочего процесса.\n - В каждом шаге выполняется следующий узел (`node`), определяется его текущее состояние и фиксируется текущая точка выполнения в контексте выполнения.\n\n3. **Завершение выполнения**:\n - После завершения последнего этапа рабочего процесса происходит запись информации о завершении в хранилище и регистрация этого события в системе трассировки.\n\n## Важные детали реализации\n\n### 1. Логика работы узлов (`nodes`)\n- Метод `run()` последовательно обрабатывает узлы рабочего процесса до тех пор, пока не завершится выполнение всех заданных задач.\n- Узлы являются основными элементами рабочего процесса и определяют последовательность действий и переходы между ними.\n\n### 2. Обработка контекста выполнения\n- Контекст выполнения хранится в виде словаря (`context.state`), что позволяет сохранять промежуточные результаты и информацию о текущем состоянии выполнения рабочего процесса.\n\n### 3. Использование внешних механизмов\n- Класс поддерживает внешние расширения через интерфейс `WorkflowEngineHooks`, позволяя разработчикам добавлять свою бизнес-логику без изменения базовой структуры рабочего процесса.\n\n### Осторожные выводы\nНа основании текущих данных невозможно точно определить все подробности внутреннего устройства каждого узла рабочего процесса (`nodes`) и алгоритмы разрешения переходов. Однако, исходя из доступной информации, можно предположить, что узлы рабочего процесса содержат некоторую внутреннюю логику, позволяющую автоматически разрешать возможные переходы между этапами. Это предположение основано на косвенных признаках и не подтверждено прямым анализом исходного кода этих узлов.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "WorkflowEngine" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_114413/summary.md b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_114413/summary.md new file mode 100644 index 0000000..99490b8 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_114413/summary.md @@ -0,0 +1,20 @@ +# pipeline_setup_v2 summary + +Passed: 6/6 + +| File | Case | Runner | Mode | Intent | Sub-intent | Pass | +|------|------|--------|------|--------|------------|------| +| full_chain_plba_code_retrieval.yaml | plba-fullchain-explain-runtime-manager | runtime | full_chain | CODE_QA | EXPLAIN | ✓ | +| full_chain_plba_code_retrieval.yaml | plba-fullchain-explain-http-control-channel | runtime | full_chain | CODE_QA | EXPLAIN | ✓ | +| full_chain_plba_code_retrieval.yaml | plba-fullchain-explain-control-plane-service | runtime | full_chain | CODE_QA | EXPLAIN | ✓ | +| full_chain_plba_code_retrieval.yaml | plba-fullchain-explain-trace-service | runtime | full_chain | CODE_QA | EXPLAIN | ✓ | +| full_chain_plba_code_retrieval.yaml | plba-fullchain-explain-create-runtime | runtime | full_chain | CODE_QA | EXPLAIN | ✓ | +| full_chain_plba_code_retrieval.yaml | plba-fullchain-explain-workflow-engine | runtime | full_chain | CODE_QA | EXPLAIN | ✓ | + +## LLM Answers +- **plba-fullchain-explain-runtime-manager**: ## Назначение класса `RuntimeManager` Класс `RuntimeManager` играет роль центрального менеджера для управления жизненным циклом различных компонентов приложения runtime. Он отвечает за координацию и интеграцию этих компонентов, а также управляет их состоянием через атрибуты экземпляра. ## Ключевые зависимости Ключевыми компонентами, с которыми взаимодействует `RuntimeManager`, являются: - `ConfigurationManager`: управление конфигурацией приложения. - `ServiceContainer`: контейнер сервисов, используемых приложением. - `TraceService`: сервис отслеживания трассировок выполнения задач. - `HealthRegistry`: реестр текущего состояния здоровья системы. - `LogManager`: менеджер логирования событий. - `WorkerSupervisor`: супервизор рабочих процессов. - `ControlPlaneService`: служба управления планом контроля выполнения задач. ## Поток данных или вызовов При инициализации объек… +- **plba-fullchain-explain-http-control-channel**: ## Объяснение сущности `HttpControlChannel` ### Назначение Класс `HttpControlChannel` является компонентом конвейера приложения, ответственным за управление состоянием через HTTP-запросы. Он участвует в обработке запросов к приложению, обеспечивает маршрутизацию и выполнение действий, связанных с управлением состояниями и конфигурацией системы. ### Ключевые зависимости - **host**: строка, представляющая хост для сервера. - **port**: целое число, представляющее порт для сервера. - **timeout**: целое число, задающее таймаут выполнения операций. ### Поток данных или вызовов 1. **Инициализация (`__init__`)** - При создании экземпляра класса происходит инициализация полей `_timeout`, `_runner` и `_factory`. Поле `_runner` представляет собой объект типа `UvicornThreadRunner`, отвечающий за запуск веб-сервера на указанном хосте и порте. Поле `_factory` отвечает за создание… +- **plba-fullchain-explain-control-plane-service**: ## Объяснение сущности `ControlPlaneService` ### Назначение `ControlPlaneService` — это сервисная сущность, ответственная за управление каналами (`ControlChannel`) и выполнение действий по управлению жизненным циклом приложения, таких как запуск, остановка и мониторинг состояния системы. ### Ключевые зависимости - **`ControlChannel`**: Канал управления, через который передаются сообщения о событиях и действиях. - **`RuntimeManager`**: Менеджер выполнения среды исполнения, содержащий состояние и другие объекты для работы с приложением. - **`ControlActionSet`**: Набор действий, которые могут быть выполнены при управлении состоянием системы. ### Поток данных или вызовов 1. **Инициализация** (`__init__`) - Инициализирует пустой список каналов `_channels`. 2. **Регистрация канала** (`register_channel`) - Добавляет новый канал в список зарегистрированных каналов. 3. **Запу… +- **plba-fullchain-explain-trace-service**: ## Объяснение работы `TraceService` ### Назначение `TraceService` — это компонент, отвечающий за управление контекстом трассировки и запись логических событий во время выполнения приложения. Он служит для создания, хранения и записи трассировочных записей (`trace records`) и сообщений логирования (`log messages`), связанных с выполнением различных операций. ### Ключевые зависимости - **TraceContextFactory**: Базовый класс, от которого наследуется `TraceService`. Предоставляет методы для управления контекстом трассировки. - **TraceTransport**: Интерфейс, определяющий транспорт для передачи трассировочной информации внешним системам или службам. - **TraceContextStore**: Хранит контексты трассировок. - **NoOpTraceTransport**: Специальная реализация транспорта без реальных действий, используется по умолчанию при отсутствии указания конкретного транспорта. ### Поток данны… +- **plba-fullchain-explain-create-runtime**: ## Функциональное назначение сущности `create_runtime` Функция `create_runtime` предназначена для инициализации и настройки окружения выполнения (`runtime environment`) приложения. Она создает объект типа `RuntimeManager`, регистрирует указанный модуль (`module`) и при необходимости добавляет конфигурационные файлы и каналы управления через HTTP. ## Ключевые зависимости - **src/plba/bootstrap.py**: основной файл, содержащий реализацию функции `create_runtime`. - **RuntimeManager**: класс, управляющий состоянием и функциональностью runtime-среды. - **ApplicationModule**: абстрактный тип модуля приложения, передаваемый в функцию. - **HttpControlChannel**: компонент, обеспечивающий управление приложением по HTTP с заданными параметрами хоста, порта и тайм-аута. ## Поток данных или вызовов 1. Функция `create_runtime` принимает несколько аргументов: - `module`: экземпляр… +- **plba-fullchain-explain-workflow-engine**: ## Назначение класса `WorkflowEngine` Класс `WorkflowEngine` является основным компонентом инфраструктуры выполнения рабочих процессов (`workflow`) в приложении. Он отвечает за координацию и управление жизненным циклом рабочего процесса, включая отслеживание текущего состояния выполнения, взаимодействие с хранилищем для сохранения промежуточных результатов и взаимодействия с внешними компонентами через логирование и трассировку. ## Ключевые зависимости ### 1. Зависимости по модулям и библиотекам - **src/app_runtime/workflow/engine/workflow_engine.py**: основной файл, содержащий определение класса `WorkflowEngine`. - **src/app_runtime/workflow/engine/hooks.py**: модуль, предоставляющий механизмы расширения функциональности через интерфейс `WorkflowEngineHooks`, позволяющий разработчикам внедрять дополнительные действия перед началом, во время выполнения и после заверш… \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_114552/full_chain_plba_code_retrieval_plba-fullchain-explain-control-plane-service.json b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_114552/full_chain_plba_code_retrieval_plba-fullchain-explain-control-plane-service.json new file mode 100644 index 0000000..287dba7 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_114552/full_chain_plba_code_retrieval_plba-fullchain-explain-control-plane-service.json @@ -0,0 +1,2056 @@ +{ + "case_id": "plba-fullchain-explain-control-plane-service", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_retrieval.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 12, + "llm_answer": "## Объяснение сущности `ControlPlaneService`\n\n### Назначение\n`ControlPlaneService` — это сервис управления данными и состоянием приложения. Он отвечает за координацию различных каналов (`ControlChannel`) и управление жизненным циклом работы компонентов системы. Сервис также участвует в обработке срезов данных (`dataflow slices`), что указывает на его роль в общем потоке выполнения и управлении ресурсами.\n\n### Ключевые зависимости\nКлючевой зависимостью является наличие списка каналов (`_channels`), через которые осуществляется взаимодействие с компонентами системы. Важными методами являются инициализация сервиса (`__init__`), регистрация новых каналов (`register_channel`), запуск (`start`) и остановка (`stop`) сервисов, а также создание снимка текущего состояния (`snapshot`).\n\n### Поток данных или вызовов\nПри создании объекта класса вызывается метод `__init__`, который инициализирует список каналов `_channels`. Далее возможны следующие сценарии использования:\n\n1. **Регистрация канала**:\n - Метод `register_channel` добавляет новый канал в список доступных для взаимодействия.\n \n2. **Запуск сервиса**:\n - Вызов метода `start` инициирует асинхронный запуск всех зарегистрированных каналов через внутренний метод `_start_async`.\n - В рамках запуска проверяется наличие каналов и состояние системы, после чего выполняется запуск соответствующих действий.\n\n3. **Остановка сервиса**:\n - Метод `stop` инициирует остановку всех запущенных каналов через асинхронную функцию `_stop_async`.\n\n4. **Создание снимка состояния**:\n - Метод `snapshot` возвращает текущее состояние системы, включая информацию о здоровье и конфигурации.\n\n### Важные детали реализации\n- Использование асинхронного подхода (через `asyncio.run`) позволяет эффективно управлять параллельными задачами и каналами.\n- Состояние каналов сохраняется в виде списка объектов `ControlChannel`, каждый из которых может иметь свои специфические настройки и поведение.\n- Все действия, связанные с управлением каналами и их запуском/остановкой, выполняются синхронно внутри методов сервиса, несмотря на асинхронность вызова.\n \n### Осторожные выводы\nНа основе предоставленных фрагментов сложно точно определить, какие именно каналы участвуют в работе сервиса и какую дополнительную логику они реализуют. Также нет информации о том, каким образом методы, указанные в сигнатуре (`health`, `start`, `stop`), связаны с конкретными действиями и какова их реализация вне данного контекста.\n\n---\n\nТаким образом, `ControlPlaneService` представляет собой ключевой элемент инфраструктуры, отвечающий за координацию работы различных каналов и системных компонентов, обеспечивая контроль над состоянием и поведением системы.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "ControlPlaneService" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-fullchain-explain-control-plane-service", + "text": "Объясни класс ControlPlaneService", + "mode": "full_chain", + "run_started_at": "2026-03-12T11:45:52", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни класс ControlPlaneService", + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "ControlPlaneService", + "alternatives": [ + "ControlPlaneService" + ], + "confidence": 0.99 + }, + "rag_count": 12, + "rag_rows": [ + { + "path": "src/app_runtime/control/service.py", + "content": "class ControlPlaneService\nControlPlaneService", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "qname": "ControlPlaneService", + "kind": "class", + "signature": "ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.register_channel reads_attr self._channels.append", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.register_channel:reads_attr", + "span_start": 17, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "1ee5925deffdc38ba15b88bf7c89e5fcd1a78f493fe30f2deb827d714a1b18e8", + "edge_type": "reads_attr", + "src_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "src_qname": "ControlPlaneService.register_channel", + "dst_symbol_id": null, + "dst_ref": "self._channels.append", + "resolution": "partial", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "class ControlPlaneService:\n def __init__(self) -> None:\n self._channels: list[ControlChannel] = []\n\n def register_channel(self, channel: ControlChannel) -> None:\n self._channels.append(channel)\n\n def start(self, runtime: RuntimeManager) -> None:\n if not self._channels:\n return\n asyncio.run(self._start_async(runtime))\n\n def stop(self) -> None:\n if not self._channels:\n return\n asyncio.run(self._stop_async())\n\n def snapshot(self, runtime: RuntimeManager) -> dict[str, object]:\n health = runtime.current_health()\n return {\n \"runtime\": {\"state\": runtime._state.value},\n \"modules\": list(runtime.registry.modules),\n \"services\": runtime.services.snapshot(),\n \"workers\": runtime.workers.snapshot(),\n \"health\": runtime.health.snapshot(runtime.workers.healths()) | {\"status\": health[\"status\"]},\n \"config\": runtime.configuration.get(),\n }\n\n async def _start_async(self, runtime: RuntimeManager) -> None:\n actions = ControlActionSet(\n health=runtime.health_status,\n start=runtime.start_runtime,\n stop=runtime.stop_runtime,\n status=runtime.runtime_status,\n )\n for channel in self._channels:\n await channel.start(actions)\n\n async def _stop_async(self) -> None:\n for channel in reversed(self._channels):\n await channel.stop()", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/service.py:ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "## Объяснение сущности `ControlPlaneService`\n\n### Назначение\n`ControlPlaneService` — это сервис управления данными и состоянием приложения. Он отвечает за координацию различных каналов (`ControlChannel`) и управление жизненным циклом работы компонентов системы. Сервис также участвует в обработке срезов данных (`dataflow slices`), что указывает на его роль в общем потоке выполнения и управлении ресурсами.\n\n### Ключевые зависимости\nКлючевой зависимостью является наличие списка каналов (`_channels`), через которые осуществляется взаимодействие с компонентами системы. Важными методами являются инициализация сервиса (`__init__`), регистрация новых каналов (`register_channel`), запуск (`start`) и остановка (`stop`) сервисов, а также создание снимка текущего состояния (`snapshot`).\n\n### Поток данных или вызовов\nПри создании объекта класса вызывается метод `__init__`, который инициализирует список каналов `_channels`. Далее возможны следующие сценарии использования:\n\n1. **Регистрация канала**:\n - Метод `register_channel` добавляет новый канал в список доступных для взаимодействия.\n \n2. **Запуск сервиса**:\n - Вызов метода `start` инициирует асинхронный запуск всех зарегистрированных каналов через внутренний метод `_start_async`.\n - В рамках запуска проверяется наличие каналов и состояние системы, после чего выполняется запуск соответствующих действий.\n\n3. **Остановка сервиса**:\n - Метод `stop` инициирует остановку всех запущенных каналов через асинхронную функцию `_stop_async`.\n\n4. **Создание снимка состояния**:\n - Метод `snapshot` возвращает текущее состояние системы, включая информацию о здоровье и конфигурации.\n\n### Важные детали реализации\n- Использование асинхронного подхода (через `asyncio.run`) позволяет эффективно управлять параллельными задачами и каналами.\n- Состояние каналов сохраняется в виде списка объектов `ControlChannel`, каждый из которых может иметь свои специфические настройки и поведение.\n- Все действия, связанные с управлением каналами и их запуском/остановкой, выполняются синхронно внутри методов сервиса, несмотря на асинхронность вызова.\n \n### Осторожные выводы\nНа основе предоставленных фрагментов сложно точно определить, какие именно каналы участвуют в работе сервиса и какую дополнительную логику они реализуют. Также нет информации о том, каким образом методы, указанные в сигнатуре (`health`, `start`, `stop`), связаны с конкретными действиями и какова их реализация вне данного контекста.\n\n---\n\nТаким образом, `ControlPlaneService` представляет собой ключевой элемент инфраструктуры, отвечающий за координацию работы различных каналов и системных компонентов, обеспечивая контроль над состоянием и поведением системы.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS", + "C4_SEMANTIC_ROLES" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "ControlPlaneService" + ], + "keyword_hints": [ + "ControlPlaneService" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "ControlPlaneService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "ControlPlaneService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "ControlPlaneService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "ControlPlaneService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "ControlPlaneService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "ControlPlaneService", + "alternatives": [ + "ControlPlaneService" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 146, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 45, + "C0_SOURCE_CHUNKS": 17, + "C4_SEMANTIC_ROLES": 15, + "C2_DEPENDENCY_GRAPH": 55, + "C3_ENTRYPOINTS": 11 + }, + "merge_rank": 24, + "prompt_build": 0, + "llm_call": 3832 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 797, + "evidence_rows": 12, + "evidence_chars": 2301 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 1 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_explain_ru_v1", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "ControlPlaneService" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 12, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-fullchain-explain-control-plane-service", + "mode": "full_chain", + "run_started_at": "2026-03-12T11:45:52", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Объясни класс ControlPlaneService", + "normalized_query": "Объясни класс ControlPlaneService" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Объясни класс ControlPlaneService" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни класс ControlPlaneService" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "ControlPlaneService" + ], + "keyword_hints": [ + "ControlPlaneService" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Объясни класс ControlPlaneService" + }, + "output": { + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "ControlPlaneService", + "alternatives": [ + "ControlPlaneService" + ], + "confidence": 0.99 + }, + "rag_count": 12, + "rag_rows": [ + { + "path": "src/app_runtime/control/service.py", + "content": "class ControlPlaneService\nControlPlaneService", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "qname": "ControlPlaneService", + "kind": "class", + "signature": "ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.register_channel reads_attr self._channels.append", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.register_channel:reads_attr", + "span_start": 17, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "1ee5925deffdc38ba15b88bf7c89e5fcd1a78f493fe30f2deb827d714a1b18e8", + "edge_type": "reads_attr", + "src_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "src_qname": "ControlPlaneService.register_channel", + "dst_symbol_id": null, + "dst_ref": "self._channels.append", + "resolution": "partial", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "class ControlPlaneService:\n def __init__(self) -> None:\n self._channels: list[ControlChannel] = []\n\n def register_channel(self, channel: ControlChannel) -> None:\n self._channels.append(channel)\n\n def start(self, runtime: RuntimeManager) -> None:\n if not self._channels:\n return\n asyncio.run(self._start_async(runtime))\n\n def stop(self) -> None:\n if not self._channels:\n return\n asyncio.run(self._stop_async())\n\n def snapshot(self, runtime: RuntimeManager) -> dict[str, object]:\n health = runtime.current_health()\n return {\n \"runtime\": {\"state\": runtime._state.value},\n \"modules\": list(runtime.registry.modules),\n \"services\": runtime.services.snapshot(),\n \"workers\": runtime.workers.snapshot(),\n \"health\": runtime.health.snapshot(runtime.workers.healths()) | {\"status\": health[\"status\"]},\n \"config\": runtime.configuration.get(),\n }\n\n async def _start_async(self, runtime: RuntimeManager) -> None:\n actions = ControlActionSet(\n health=runtime.health_status,\n start=runtime.start_runtime,\n stop=runtime.stop_runtime,\n status=runtime.runtime_status,\n )\n for channel in self._channels:\n await channel.start(actions)\n\n async def _stop_async(self) -> None:\n for channel in reversed(self._channels):\n await channel.stop()", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/service.py:ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "ControlPlaneService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "ControlPlaneService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "ControlPlaneService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "ControlPlaneService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "ControlPlaneService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "ControlPlaneService", + "alternatives": [ + "ControlPlaneService" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 146, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 45, + "C0_SOURCE_CHUNKS": 17, + "C4_SEMANTIC_ROLES": 15, + "C2_DEPENDENCY_GRAPH": 55, + "C3_ENTRYPOINTS": 11 + }, + "merge_rank": 24 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Объясни класс ControlPlaneService", + "rag_count": 12 + }, + "output": { + "llm_answer": "## Объяснение сущности `ControlPlaneService`\n\n### Назначение\n`ControlPlaneService` — это сервис управления данными и состоянием приложения. Он отвечает за координацию различных каналов (`ControlChannel`) и управление жизненным циклом работы компонентов системы. Сервис также участвует в обработке срезов данных (`dataflow slices`), что указывает на его роль в общем потоке выполнения и управлении ресурсами.\n\n### Ключевые зависимости\nКлючевой зависимостью является наличие списка каналов (`_channels`), через которые осуществляется взаимодействие с компонентами системы. Важными методами являются инициализация сервиса (`__init__`), регистрация новых каналов (`register_channel`), запуск (`start`) и остановка (`stop`) сервисов, а также создание снимка текущего состояния (`snapshot`).\n\n### Поток данных или вызовов\nПри создании объекта класса вызывается метод `__init__`, который инициализирует список каналов `_channels`. Далее возможны следующие сценарии использования:\n\n1. **Регистрация канала**:\n - Метод `register_channel` добавляет новый канал в список доступных для взаимодействия.\n \n2. **Запуск сервиса**:\n - Вызов метода `start` инициирует асинхронный запуск всех зарегистрированных каналов через внутренний метод `_start_async`.\n - В рамках запуска проверяется наличие каналов и состояние системы, после чего выполняется запуск соответствующих действий.\n\n3. **Остановка сервиса**:\n - Метод `stop` инициирует остановку всех запущенных каналов через асинхронную функцию `_stop_async`.\n\n4. **Создание снимка состояния**:\n - Метод `snapshot` возвращает текущее состояние системы, включая информацию о здоровье и конфигурации.\n\n### Важные детали реализации\n- Использование асинхронного подхода (через `asyncio.run`) позволяет эффективно управлять параллельными задачами и каналами.\n- Состояние каналов сохраняется в виде списка объектов `ControlChannel`, каждый из которых может иметь свои специфические настройки и поведение.\n- Все действия, связанные с управлением каналами и их запуском/остановкой, выполняются синхронно внутри методов сервиса, несмотря на асинхронность вызова.\n \n### Осторожные выводы\nНа основе предоставленных фрагментов сложно точно определить, какие именно каналы участвуют в работе сервиса и какую дополнительную логику они реализуют. Также нет информации о том, каким образом методы, указанные в сигнатуре (`health`, `start`, `stop`), связаны с конкретными действиями и какова их реализация вне данного контекста.\n\n---\n\nТаким образом, `ControlPlaneService` представляет собой ключевой элемент инфраструктуры, отвечающий за координацию работы различных каналов и системных компонентов, обеспечивая контроль над состоянием и поведением системы." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 797, + "evidence_rows": 12, + "evidence_chars": 2301 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 1 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_explain_ru_v1", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 3832 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_114552/full_chain_plba_code_retrieval_plba-fullchain-explain-control-plane-service.md b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_114552/full_chain_plba_code_retrieval_plba-fullchain-explain-control-plane-service.md new file mode 100644 index 0000000..6aed954 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_114552/full_chain_plba_code_retrieval_plba-fullchain-explain-control-plane-service.md @@ -0,0 +1,34 @@ +# plba-fullchain-explain-control-plane-service + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_retrieval.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Объясни класс ControlPlaneService + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 12, + "llm_answer": "## Объяснение сущности `ControlPlaneService`\n\n### Назначение\n`ControlPlaneService` — это сервис управления данными и состоянием приложения. Он отвечает за координацию различных каналов (`ControlChannel`) и управление жизненным циклом работы компонентов системы. Сервис также участвует в обработке срезов данных (`dataflow slices`), что указывает на его роль в общем потоке выполнения и управлении ресурсами.\n\n### Ключевые зависимости\nКлючевой зависимостью является наличие списка каналов (`_channels`), через которые осуществляется взаимодействие с компонентами системы. Важными методами являются инициализация сервиса (`__init__`), регистрация новых каналов (`register_channel`), запуск (`start`) и остановка (`stop`) сервисов, а также создание снимка текущего состояния (`snapshot`).\n\n### Поток данных или вызовов\nПри создании объекта класса вызывается метод `__init__`, который инициализирует список каналов `_channels`. Далее возможны следующие сценарии использования:\n\n1. **Регистрация канала**:\n - Метод `register_channel` добавляет новый канал в список доступных для взаимодействия.\n \n2. **Запуск сервиса**:\n - Вызов метода `start` инициирует асинхронный запуск всех зарегистрированных каналов через внутренний метод `_start_async`.\n - В рамках запуска проверяется наличие каналов и состояние системы, после чего выполняется запуск соответствующих действий.\n\n3. **Остановка сервиса**:\n - Метод `stop` инициирует остановку всех запущенных каналов через асинхронную функцию `_stop_async`.\n\n4. **Создание снимка состояния**:\n - Метод `snapshot` возвращает текущее состояние системы, включая информацию о здоровье и конфигурации.\n\n### Важные детали реализации\n- Использование асинхронного подхода (через `asyncio.run`) позволяет эффективно управлять параллельными задачами и каналами.\n- Состояние каналов сохраняется в виде списка объектов `ControlChannel`, каждый из которых может иметь свои специфические настройки и поведение.\n- Все действия, связанные с управлением каналами и их запуском/остановкой, выполняются синхронно внутри методов сервиса, несмотря на асинхронность вызова.\n \n### Осторожные выводы\nНа основе предоставленных фрагментов сложно точно определить, какие именно каналы участвуют в работе сервиса и какую дополнительную логику они реализуют. Также нет информации о том, каким образом методы, указанные в сигнатуре (`health`, `start`, `stop`), связаны с конкретными действиями и какова их реализация вне данного контекста.\n\n---\n\nТаким образом, `ControlPlaneService` представляет собой ключевой элемент инфраструктуры, отвечающий за координацию работы различных каналов и системных компонентов, обеспечивая контроль над состоянием и поведением системы.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "ControlPlaneService" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_114552/full_chain_plba_code_retrieval_plba-fullchain-explain-create-runtime.json b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_114552/full_chain_plba_code_retrieval_plba-fullchain-explain-create-runtime.json new file mode 100644 index 0000000..29aa614 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_114552/full_chain_plba_code_retrieval_plba-fullchain-explain-create-runtime.json @@ -0,0 +1,1896 @@ +{ + "case_id": "plba-fullchain-explain-create-runtime", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_retrieval.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 12, + "llm_answer": "## Объяснение функции `create_runtime`\n\n### Назначение\nФункция `create_runtime` предназначена для инициализации и настройки основного объекта управления (`RuntimeManager`) приложения Plba. Она создаёт экземпляр менеджера выполнения и выполняет начальную настройку, включая загрузку конфигурационных файлов и регистрацию модулей.\n\n### Ключевые зависимости\nКлючевая зависимость — объект класса `RuntimeManager`, который является основным объектом управления жизненным циклом приложения. Этот класс отвечает за управление всеми модулями и компонентами системы, включая их загрузку, конфигурирование и взаимодействие.\n\n### Поток данных или вызовов\n1. Функция принимает параметры конфигурации и определяет путь к файлу конфигурации, а также флаги включения HTTP-контроля и указания его параметров (хост, порт, таймаут).\n2. Создаётся новый экземпляр `RuntimeManager`.\n3. Если указан путь к конфигурационному файлу, он загружается с помощью метода `add_config_file` объекта `runtime`.\n4. Если включен HTTP-контроль, регистрируется соответствующий канал контроля через метод `register_channel` объекта `runtime.control_plane`.\n5. Регистрируется переданный модуль с помощью метода `register_module` объекта `runtime`.\n6. Возвращается созданный и настроенный объект `RuntimeManager`.\n\n### Важные детали реализации\n1. **Параметры конфигурации**:\n - Параметр `config_path` указывает путь к файлу конфигурации, используемому при начальной настройке приложения.\n - Флаг `enable_http_control` включает режим работы HTTP-контроля, определяющий возможность удалённого управления приложением.\n \n2. **Регистрация модуля**:\n - Метод `register_module` обеспечивает интеграцию переданного модуля в общую систему управления и запускает его обработку.\n\n3. **Чтение атрибутов и запись состояния**:\n - В процессе создания экземпляра `RuntimeManager` происходит чтение атрибутов и настройка состояния приложения.\n\n4. **Использование сторонних библиотек и компонентов**:\n - Используются компоненты из пакета `uvicorn` (через класс `HttpControlChannel`), что позволяет реализовать работу с HTTP-интерфейсом для удалённого управления приложением.\n\n---\n\n### Примечания\n- Описанная структура вызова методов и зависимостей построена исключительно на анализе кода и входных данных, предоставленных пользователем. \n- Это означает, что некоторые выводы являются осторожными и основаны на косвенных доказательствах (например, анализ зависимостей и потока данных).", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "create_runtime" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-fullchain-explain-create-runtime", + "text": "Объясни функцию create_runtime", + "mode": "full_chain", + "run_started_at": "2026-03-12T11:45:52", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни функцию create_runtime", + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "create_runtime", + "alternatives": [ + "create_runtime" + ], + "confidence": 0.99 + }, + "rag_count": 12, + "rag_rows": [ + { + "path": "src/plba/bootstrap.py", + "content": "function create_runtime\ncreate_runtime(module)", + "layer": "C1_SYMBOL_CATALOG", + "title": "create_runtime", + "span_start": 8, + "span_end": 29, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "qname": "create_runtime", + "kind": "function", + "signature": "create_runtime(module)", + "parent_symbol_id": null, + "package_or_module": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime calls runtime.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:calls", + "span_start": 19, + "span_end": 19, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "4eaeec4ac55a59d5f66fd01c4754955f8fedaf4bc3df13fa769b352c7bfaacbb", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.add_config_file", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime reads_attr runtime.register_module", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:reads_attr", + "span_start": 28, + "span_end": 28, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "45516c79ff358dbf9b650a081668df0f66d2fe989300f985a1a78be6be166f8f", + "edge_type": "reads_attr", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.register_module", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:instantiates", + "span_start": 17, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "0adba17984f850ea1608c9e734d2dd5c325cfde3a8133123aa239e44935ad18e", + "edge_type": "instantiates", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": "27158ca220022eeb5083c6addf8a50775d45f7161284fd60aac48410105f4b98", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime calls runtime.register_module", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:calls", + "span_start": 28, + "span_end": 28, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "ab6003c3441addc1ba1b81edeca009165559f652f6b2cf424e5ae61b1f617de8", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.register_module", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime calls runtime.control_plane.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:calls", + "span_start": 21, + "span_end": 27, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "2678250030b9ce47a3b3b55fac7897ac530367edc8374ac9d5e6ecafb1e483f0", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.control_plane.register_channel", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime reads_attr runtime.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:reads_attr", + "span_start": 19, + "span_end": 19, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "30d4e8aae984ab84d523e80d02f1caeda52d547fa3d2aa47be8845931cabbca2", + "edge_type": "reads_attr", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.add_config_file", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "def create_runtime(\n module: ApplicationModule,\n *,\n config_path: str | None = None,\n enable_http_control: bool = False,\n control_host: str = \"127.0.0.1\",\n control_port: int = 8080,\n control_timeout: int = 5,\n) -> RuntimeManager:\n runtime = RuntimeManager()\n if config_path is not None:\n runtime.add_config_file(config_path)\n if enable_http_control:\n runtime.control_plane.register_channel(\n HttpControlChannel(\n host=control_host,\n port=control_port,\n timeout=control_timeout,\n )\n )\n runtime.register_module(module)\n return runtime", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/bootstrap.py:create_runtime", + "span_start": 8, + "span_end": 29, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "## Объяснение функции `create_runtime`\n\n### Назначение\nФункция `create_runtime` предназначена для инициализации и настройки основного объекта управления (`RuntimeManager`) приложения Plba. Она создаёт экземпляр менеджера выполнения и выполняет начальную настройку, включая загрузку конфигурационных файлов и регистрацию модулей.\n\n### Ключевые зависимости\nКлючевая зависимость — объект класса `RuntimeManager`, который является основным объектом управления жизненным циклом приложения. Этот класс отвечает за управление всеми модулями и компонентами системы, включая их загрузку, конфигурирование и взаимодействие.\n\n### Поток данных или вызовов\n1. Функция принимает параметры конфигурации и определяет путь к файлу конфигурации, а также флаги включения HTTP-контроля и указания его параметров (хост, порт, таймаут).\n2. Создаётся новый экземпляр `RuntimeManager`.\n3. Если указан путь к конфигурационному файлу, он загружается с помощью метода `add_config_file` объекта `runtime`.\n4. Если включен HTTP-контроль, регистрируется соответствующий канал контроля через метод `register_channel` объекта `runtime.control_plane`.\n5. Регистрируется переданный модуль с помощью метода `register_module` объекта `runtime`.\n6. Возвращается созданный и настроенный объект `RuntimeManager`.\n\n### Важные детали реализации\n1. **Параметры конфигурации**:\n - Параметр `config_path` указывает путь к файлу конфигурации, используемому при начальной настройке приложения.\n - Флаг `enable_http_control` включает режим работы HTTP-контроля, определяющий возможность удалённого управления приложением.\n \n2. **Регистрация модуля**:\n - Метод `register_module` обеспечивает интеграцию переданного модуля в общую систему управления и запускает его обработку.\n\n3. **Чтение атрибутов и запись состояния**:\n - В процессе создания экземпляра `RuntimeManager` происходит чтение атрибутов и настройка состояния приложения.\n\n4. **Использование сторонних библиотек и компонентов**:\n - Используются компоненты из пакета `uvicorn` (через класс `HttpControlChannel`), что позволяет реализовать работу с HTTP-интерфейсом для удалённого управления приложением.\n\n---\n\n### Примечания\n- Описанная структура вызова методов и зависимостей построена исключительно на анализе кода и входных данных, предоставленных пользователем. \n- Это означает, что некоторые выводы являются осторожными и основаны на косвенных доказательствах (например, анализ зависимостей и потока данных).", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS", + "C4_SEMANTIC_ROLES" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "function", + "symbol_candidates": [ + "create_runtime" + ], + "keyword_hints": [ + "create_runtime" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "create_runtime", + "alternatives": [ + "create_runtime" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 144, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 43, + "C0_SOURCE_CHUNKS": 22, + "C4_SEMANTIC_ROLES": 19, + "C2_DEPENDENCY_GRAPH": 47, + "C3_ENTRYPOINTS": 10 + }, + "merge_rank": 21, + "prompt_build": 0, + "llm_call": 3617 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 601, + "evidence_rows": 12, + "evidence_chars": 1184 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 1 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_explain_ru_v1", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "create_runtime" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 12, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-fullchain-explain-create-runtime", + "mode": "full_chain", + "run_started_at": "2026-03-12T11:45:52", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Объясни функцию create_runtime", + "normalized_query": "Объясни функцию create_runtime" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Объясни функцию create_runtime" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни функцию create_runtime" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "function", + "symbol_candidates": [ + "create_runtime" + ], + "keyword_hints": [ + "create_runtime" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Объясни функцию create_runtime" + }, + "output": { + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "create_runtime", + "alternatives": [ + "create_runtime" + ], + "confidence": 0.99 + }, + "rag_count": 12, + "rag_rows": [ + { + "path": "src/plba/bootstrap.py", + "content": "function create_runtime\ncreate_runtime(module)", + "layer": "C1_SYMBOL_CATALOG", + "title": "create_runtime", + "span_start": 8, + "span_end": 29, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "qname": "create_runtime", + "kind": "function", + "signature": "create_runtime(module)", + "parent_symbol_id": null, + "package_or_module": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime calls runtime.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:calls", + "span_start": 19, + "span_end": 19, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "4eaeec4ac55a59d5f66fd01c4754955f8fedaf4bc3df13fa769b352c7bfaacbb", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.add_config_file", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime reads_attr runtime.register_module", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:reads_attr", + "span_start": 28, + "span_end": 28, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "45516c79ff358dbf9b650a081668df0f66d2fe989300f985a1a78be6be166f8f", + "edge_type": "reads_attr", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.register_module", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:instantiates", + "span_start": 17, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "0adba17984f850ea1608c9e734d2dd5c325cfde3a8133123aa239e44935ad18e", + "edge_type": "instantiates", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": "27158ca220022eeb5083c6addf8a50775d45f7161284fd60aac48410105f4b98", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime calls runtime.register_module", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:calls", + "span_start": 28, + "span_end": 28, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "ab6003c3441addc1ba1b81edeca009165559f652f6b2cf424e5ae61b1f617de8", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.register_module", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime calls runtime.control_plane.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:calls", + "span_start": 21, + "span_end": 27, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "2678250030b9ce47a3b3b55fac7897ac530367edc8374ac9d5e6ecafb1e483f0", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.control_plane.register_channel", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime reads_attr runtime.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:reads_attr", + "span_start": 19, + "span_end": 19, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "30d4e8aae984ab84d523e80d02f1caeda52d547fa3d2aa47be8845931cabbca2", + "edge_type": "reads_attr", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.add_config_file", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "def create_runtime(\n module: ApplicationModule,\n *,\n config_path: str | None = None,\n enable_http_control: bool = False,\n control_host: str = \"127.0.0.1\",\n control_port: int = 8080,\n control_timeout: int = 5,\n) -> RuntimeManager:\n runtime = RuntimeManager()\n if config_path is not None:\n runtime.add_config_file(config_path)\n if enable_http_control:\n runtime.control_plane.register_channel(\n HttpControlChannel(\n host=control_host,\n port=control_port,\n timeout=control_timeout,\n )\n )\n runtime.register_module(module)\n return runtime", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/bootstrap.py:create_runtime", + "span_start": 8, + "span_end": 29, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "create_runtime", + "alternatives": [ + "create_runtime" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 144, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 43, + "C0_SOURCE_CHUNKS": 22, + "C4_SEMANTIC_ROLES": 19, + "C2_DEPENDENCY_GRAPH": 47, + "C3_ENTRYPOINTS": 10 + }, + "merge_rank": 21 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Объясни функцию create_runtime", + "rag_count": 12 + }, + "output": { + "llm_answer": "## Объяснение функции `create_runtime`\n\n### Назначение\nФункция `create_runtime` предназначена для инициализации и настройки основного объекта управления (`RuntimeManager`) приложения Plba. Она создаёт экземпляр менеджера выполнения и выполняет начальную настройку, включая загрузку конфигурационных файлов и регистрацию модулей.\n\n### Ключевые зависимости\nКлючевая зависимость — объект класса `RuntimeManager`, который является основным объектом управления жизненным циклом приложения. Этот класс отвечает за управление всеми модулями и компонентами системы, включая их загрузку, конфигурирование и взаимодействие.\n\n### Поток данных или вызовов\n1. Функция принимает параметры конфигурации и определяет путь к файлу конфигурации, а также флаги включения HTTP-контроля и указания его параметров (хост, порт, таймаут).\n2. Создаётся новый экземпляр `RuntimeManager`.\n3. Если указан путь к конфигурационному файлу, он загружается с помощью метода `add_config_file` объекта `runtime`.\n4. Если включен HTTP-контроль, регистрируется соответствующий канал контроля через метод `register_channel` объекта `runtime.control_plane`.\n5. Регистрируется переданный модуль с помощью метода `register_module` объекта `runtime`.\n6. Возвращается созданный и настроенный объект `RuntimeManager`.\n\n### Важные детали реализации\n1. **Параметры конфигурации**:\n - Параметр `config_path` указывает путь к файлу конфигурации, используемому при начальной настройке приложения.\n - Флаг `enable_http_control` включает режим работы HTTP-контроля, определяющий возможность удалённого управления приложением.\n \n2. **Регистрация модуля**:\n - Метод `register_module` обеспечивает интеграцию переданного модуля в общую систему управления и запускает его обработку.\n\n3. **Чтение атрибутов и запись состояния**:\n - В процессе создания экземпляра `RuntimeManager` происходит чтение атрибутов и настройка состояния приложения.\n\n4. **Использование сторонних библиотек и компонентов**:\n - Используются компоненты из пакета `uvicorn` (через класс `HttpControlChannel`), что позволяет реализовать работу с HTTP-интерфейсом для удалённого управления приложением.\n\n---\n\n### Примечания\n- Описанная структура вызова методов и зависимостей построена исключительно на анализе кода и входных данных, предоставленных пользователем. \n- Это означает, что некоторые выводы являются осторожными и основаны на косвенных доказательствах (например, анализ зависимостей и потока данных)." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 601, + "evidence_rows": 12, + "evidence_chars": 1184 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 1 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_explain_ru_v1", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 3617 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_114552/full_chain_plba_code_retrieval_plba-fullchain-explain-create-runtime.md b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_114552/full_chain_plba_code_retrieval_plba-fullchain-explain-create-runtime.md new file mode 100644 index 0000000..795ec06 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_114552/full_chain_plba_code_retrieval_plba-fullchain-explain-create-runtime.md @@ -0,0 +1,34 @@ +# plba-fullchain-explain-create-runtime + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_retrieval.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Объясни функцию create_runtime + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 12, + "llm_answer": "## Объяснение функции `create_runtime`\n\n### Назначение\nФункция `create_runtime` предназначена для инициализации и настройки основного объекта управления (`RuntimeManager`) приложения Plba. Она создаёт экземпляр менеджера выполнения и выполняет начальную настройку, включая загрузку конфигурационных файлов и регистрацию модулей.\n\n### Ключевые зависимости\nКлючевая зависимость — объект класса `RuntimeManager`, который является основным объектом управления жизненным циклом приложения. Этот класс отвечает за управление всеми модулями и компонентами системы, включая их загрузку, конфигурирование и взаимодействие.\n\n### Поток данных или вызовов\n1. Функция принимает параметры конфигурации и определяет путь к файлу конфигурации, а также флаги включения HTTP-контроля и указания его параметров (хост, порт, таймаут).\n2. Создаётся новый экземпляр `RuntimeManager`.\n3. Если указан путь к конфигурационному файлу, он загружается с помощью метода `add_config_file` объекта `runtime`.\n4. Если включен HTTP-контроль, регистрируется соответствующий канал контроля через метод `register_channel` объекта `runtime.control_plane`.\n5. Регистрируется переданный модуль с помощью метода `register_module` объекта `runtime`.\n6. Возвращается созданный и настроенный объект `RuntimeManager`.\n\n### Важные детали реализации\n1. **Параметры конфигурации**:\n - Параметр `config_path` указывает путь к файлу конфигурации, используемому при начальной настройке приложения.\n - Флаг `enable_http_control` включает режим работы HTTP-контроля, определяющий возможность удалённого управления приложением.\n \n2. **Регистрация модуля**:\n - Метод `register_module` обеспечивает интеграцию переданного модуля в общую систему управления и запускает его обработку.\n\n3. **Чтение атрибутов и запись состояния**:\n - В процессе создания экземпляра `RuntimeManager` происходит чтение атрибутов и настройка состояния приложения.\n\n4. **Использование сторонних библиотек и компонентов**:\n - Используются компоненты из пакета `uvicorn` (через класс `HttpControlChannel`), что позволяет реализовать работу с HTTP-интерфейсом для удалённого управления приложением.\n\n---\n\n### Примечания\n- Описанная структура вызова методов и зависимостей построена исключительно на анализе кода и входных данных, предоставленных пользователем. \n- Это означает, что некоторые выводы являются осторожными и основаны на косвенных доказательствах (например, анализ зависимостей и потока данных).", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "create_runtime" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_114552/full_chain_plba_code_retrieval_plba-fullchain-explain-http-control-channel.json b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_114552/full_chain_plba_code_retrieval_plba-fullchain-explain-http-control-channel.json new file mode 100644 index 0000000..79f4120 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_114552/full_chain_plba_code_retrieval_plba-fullchain-explain-http-control-channel.json @@ -0,0 +1,2088 @@ +{ + "case_id": "plba-fullchain-explain-http-control-channel", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_retrieval.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 12, + "llm_answer": "## Объяснение работы класса `HttpControlChannel`\n\n### Назначение\nКласс `HttpControlChannel` предназначен для управления HTTP каналом контроля состояния приложения. Он отвечает за инициализацию сервера и обработку запросов, связанных с состоянием системы.\n\n### Ключевые зависимости\nКлючевая зависимость — это объект типа `UvicornThreadRunner`, используемый для запуска веб-сервера. Также используются классы и функции из модуля `HttpControlAppFactory`.\n\n### Поток данных или вызовов\n1. **Инициализация (`__init__`)**: \n - При создании объекта устанавливается значение тайм-аута и запускается объект `UvicornThreadRunner`. Этот объект используется для выполнения асинхронного запуска веб-приложения через фреймворк FastAPI.\n \n2. **Запуск (`start`)**:\n - Метод принимает набор действий (`ControlActionSet`), конфигурирует приложение, затем вызывает метод `start` у экземпляра `UvicornThreadRunner`.\n \n3. **Остановка (`stop`)**:\n - Остановка выполняется путем вызова метода `stop` у экземпляра `UvicornThreadRunner`.\n \n4. **Получение порта (`port`)**:\n - Возвращает порт, связанный с запущенным сервером.\n\n5. **Обработка health-запросов (_health_response)**:\n - Проверяет наличие настроенного набора действий. Если действия отсутствуют, возвращает состояние «unhealthy». В противном случае ожидает выполнение действия с заданным таймаутом.\n \n6. **Обработка пользовательских действий (_action_response)**:\n - Аналогично предыдущему пункту, проверяется наличие настроенных действий. Если действие отсутствует, возвращается ошибка. В противном случае обрабатывается соответствующее действие.\n\n### Важные детали реализации\n- **Таймаут**: Таймаут применяется при ожидании выполнения операций, таких как проверка здоровья системы и обработка пользовательских действий.\n- **Экземпляр `UvicornThreadRunner`**: Используется для обеспечения многопоточной работы и возможности одновременной обработки нескольких запросов.\n- **Модуль `HttpControlAppFactory`**: Отвечает за создание экземпляра FastAPI приложения, которое будет использоваться для обработки запросов.\n \n### Косвенные признаки (осторожный вывод)\nНа основе анализа графа зависимостей и логики работы можно осторожно предположить, что `HttpControlChannel` является частью общего механизма мониторинга и управления приложением. Это подтверждается его ролью «pipeline stage» и участием в обработке срезов данных («dataflow slices»).\n\n### Путь к файлу и имя сущности\n- Файл: `src/app_runtime/control/http_channel.py`\n- Имя сущности: `HttpControlChannel`", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "HttpControlChannel" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-fullchain-explain-http-control-channel", + "text": "Объясни класс HttpControlChannel", + "mode": "full_chain", + "run_started_at": "2026-03-12T11:45:52", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни класс HttpControlChannel", + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "HttpControlChannel", + "alternatives": [ + "HttpControlChannel" + ], + "confidence": 0.99 + }, + "rag_count": 12, + "rag_rows": [ + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel\nHttpControlChannel(ControlChannel)", + "layer": "C1_SYMBOL_CATALOG", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "qname": "HttpControlChannel", + "kind": "class", + "signature": "HttpControlChannel(ControlChannel)", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._runner\n -> HttpControlChannel.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 15, + "span_end": 22, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "51d73913df709152258ed1b9a8c8f4eb3c575eccfe6b982aef0b28e0789a29da", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0", + "dst_ref": "HttpControlChannel.start", + "resolution": "resolved", + "slice_id": "51d73913df709152258ed1b9a8c8f4eb3c575eccfe6b982aef0b28e0789a29da", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._runner", + "HttpControlChannel.start" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._runner\n -> HttpControlChannel.port", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 15, + "span_end": 29, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "c7167bab7218bb768ad7c11bfb40d1a3096e6071dd7817bba5fd864cf8f6de13", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "3632ce8227f4a31e0768f2fb021a4d1ba28e1202633aa0f2fac902295931280f", + "dst_ref": "HttpControlChannel.port", + "resolution": "resolved", + "slice_id": "c7167bab7218bb768ad7c11bfb40d1a3096e6071dd7817bba5fd864cf8f6de13", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._runner", + "HttpControlChannel.port" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "3632ce8227f4a31e0768f2fb021a4d1ba28e1202633aa0f2fac902295931280f" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._timeout\n -> HttpControlChannel._health_response", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 14, + "span_end": 34, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "f858f5c9e575f6c4cdfe3853571b7ee21d1f628a443541d2037c3dc9d0790bef", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "e84bf04e9cd2127df235b7064d05f47e19f19a89c7c82f4c247231d4e8fa426a", + "dst_ref": "HttpControlChannel._health_response", + "resolution": "resolved", + "slice_id": "f858f5c9e575f6c4cdfe3853571b7ee21d1f628a443541d2037c3dc9d0790bef", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._timeout", + "HttpControlChannel._health_response" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "e84bf04e9cd2127df235b7064d05f47e19f19a89c7c82f4c247231d4e8fa426a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._timeout\n -> HttpControlChannel._action_response", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "c3ef21fcae96c82c00be74b3ab827d4af2085d89cb3fa5521c19a174aad84dbb", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "e64969024ccaeb34d8d91473fad07b3b3d341875846392e7a006406c7ada1954", + "dst_ref": "HttpControlChannel._action_response", + "resolution": "resolved", + "slice_id": "c3ef21fcae96c82c00be74b3ab827d4af2085d89cb3fa5521c19a174aad84dbb", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._timeout", + "HttpControlChannel._action_response" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "e64969024ccaeb34d8d91473fad07b3b3d341875846392e7a006406c7ada1954" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._runner\n -> HttpControlChannel.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 15, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "0f827ef81a990258a8a74381c8564a8361afa6712dba3200592659c939adcb9d", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "f29ab212620093d72be20e26c5a399624c7939a6056a728762ed3f84a250bfa3", + "dst_ref": "HttpControlChannel.stop", + "resolution": "resolved", + "slice_id": "0f827ef81a990258a8a74381c8564a8361afa6712dba3200592659c939adcb9d", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._runner", + "HttpControlChannel.stop" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "f29ab212620093d72be20e26c5a399624c7939a6056a728762ed3f84a250bfa3" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._factory\n -> HttpControlChannel.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 16, + "span_end": 21, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e61ec25ded7dbe380d95ce2abcbc1d7a2d2afde5aa8453866df8706dfb7d6ddb", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0", + "dst_ref": "HttpControlChannel.start", + "resolution": "resolved", + "slice_id": "e61ec25ded7dbe380d95ce2abcbc1d7a2d2afde5aa8453866df8706dfb7d6ddb", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._factory", + "HttpControlChannel.start" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel(ControlChannel):\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._timeout = timeout\n self._runner = UvicornThreadRunner(host, port, timeout)\n self._factory = HttpControlAppFactory()\n self._actions: ControlActionSet | None = None\n\n async def start(self, actions: ControlActionSet) -> None:\n self._actions = actions\n app = self._factory.create(self._health_response, self._action_response)\n await self._runner.start(app)\n\n async def stop(self) -> None:\n await self._runner.stop()\n\n @property\n def port(self) -> int:\n return self._runner.port\n\n async def _health_response(self) -> dict[str, object]:\n if self._actions is None:\n return {\"status\": \"unhealthy\", \"detail\": \"control actions are not configured\"}\n return await asyncio.wait_for(self._actions.health(), timeout=float(self._timeout))\n\n async def _action_response(self, action: str, _client_source: str = \"unknown\") -> JSONResponse:\n if self._actions is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"{action} handler is not configured\"}, status_code=404)\n callbacks = {\n \"start\": self._actions.start,\n \"stop\": self._actions.stop,\n \"status\": self._actions.status,\n }\n callback = callbacks.get(action)\n if callback is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"unsupported action: {action}\"}, status_code=404)\n action_timeout = max(float(self._timeout), 10.0) if action in {\"start\", \"stop\"} else float(self._timeout)\n try:\n detail = await asyncio.wait_for(callback(), timeout=action_timeout)\n except asyncio.TimeoutError:\n return JSONResponse(\n content={\"status\": \"accepted\", \"detail\": f\"{action} operation is still in progress\"},\n status_code=202,\n )\n except Exception as exc:\n return JSONResponse(content={\"status\": \"error\", \"detail\": str(exc)}, status_code=500)\n return JSONResponse(content={\"status\": \"ok\", \"detail\": detail or f\"{action} action accepted\"}, status_code=200)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_channel.py:HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "## Объяснение работы класса `HttpControlChannel`\n\n### Назначение\nКласс `HttpControlChannel` предназначен для управления HTTP каналом контроля состояния приложения. Он отвечает за инициализацию сервера и обработку запросов, связанных с состоянием системы.\n\n### Ключевые зависимости\nКлючевая зависимость — это объект типа `UvicornThreadRunner`, используемый для запуска веб-сервера. Также используются классы и функции из модуля `HttpControlAppFactory`.\n\n### Поток данных или вызовов\n1. **Инициализация (`__init__`)**: \n - При создании объекта устанавливается значение тайм-аута и запускается объект `UvicornThreadRunner`. Этот объект используется для выполнения асинхронного запуска веб-приложения через фреймворк FastAPI.\n \n2. **Запуск (`start`)**:\n - Метод принимает набор действий (`ControlActionSet`), конфигурирует приложение, затем вызывает метод `start` у экземпляра `UvicornThreadRunner`.\n \n3. **Остановка (`stop`)**:\n - Остановка выполняется путем вызова метода `stop` у экземпляра `UvicornThreadRunner`.\n \n4. **Получение порта (`port`)**:\n - Возвращает порт, связанный с запущенным сервером.\n\n5. **Обработка health-запросов (_health_response)**:\n - Проверяет наличие настроенного набора действий. Если действия отсутствуют, возвращает состояние «unhealthy». В противном случае ожидает выполнение действия с заданным таймаутом.\n \n6. **Обработка пользовательских действий (_action_response)**:\n - Аналогично предыдущему пункту, проверяется наличие настроенных действий. Если действие отсутствует, возвращается ошибка. В противном случае обрабатывается соответствующее действие.\n\n### Важные детали реализации\n- **Таймаут**: Таймаут применяется при ожидании выполнения операций, таких как проверка здоровья системы и обработка пользовательских действий.\n- **Экземпляр `UvicornThreadRunner`**: Используется для обеспечения многопоточной работы и возможности одновременной обработки нескольких запросов.\n- **Модуль `HttpControlAppFactory`**: Отвечает за создание экземпляра FastAPI приложения, которое будет использоваться для обработки запросов.\n \n### Косвенные признаки (осторожный вывод)\nНа основе анализа графа зависимостей и логики работы можно осторожно предположить, что `HttpControlChannel` является частью общего механизма мониторинга и управления приложением. Это подтверждается его ролью «pipeline stage» и участием в обработке срезов данных («dataflow slices»).\n\n### Путь к файлу и имя сущности\n- Файл: `src/app_runtime/control/http_channel.py`\n- Имя сущности: `HttpControlChannel`", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS", + "C4_SEMANTIC_ROLES" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "HttpControlChannel" + ], + "keyword_hints": [ + "HttpControlChannel" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "HttpControlChannel", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "HttpControlChannel", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "HttpControlChannel", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "HttpControlChannel", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "HttpControlChannel", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "HttpControlChannel", + "alternatives": [ + "HttpControlChannel" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 1, + "symbol_resolution": 0, + "retrieval_total": 150, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 43, + "C0_SOURCE_CHUNKS": 20, + "C4_SEMANTIC_ROLES": 17, + "C2_DEPENDENCY_GRAPH": 56, + "C3_ENTRYPOINTS": 12 + }, + "merge_rank": 23, + "prompt_build": 0, + "llm_call": 3932 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 795, + "evidence_rows": 12, + "evidence_chars": 3028 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 1 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_explain_ru_v1", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "HttpControlChannel" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 12, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-fullchain-explain-http-control-channel", + "mode": "full_chain", + "run_started_at": "2026-03-12T11:45:52", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Объясни класс HttpControlChannel", + "normalized_query": "Объясни класс HttpControlChannel" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Объясни класс HttpControlChannel" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни класс HttpControlChannel" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "HttpControlChannel" + ], + "keyword_hints": [ + "HttpControlChannel" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 1 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Объясни класс HttpControlChannel" + }, + "output": { + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "HttpControlChannel", + "alternatives": [ + "HttpControlChannel" + ], + "confidence": 0.99 + }, + "rag_count": 12, + "rag_rows": [ + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel\nHttpControlChannel(ControlChannel)", + "layer": "C1_SYMBOL_CATALOG", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "qname": "HttpControlChannel", + "kind": "class", + "signature": "HttpControlChannel(ControlChannel)", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._runner\n -> HttpControlChannel.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 15, + "span_end": 22, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "51d73913df709152258ed1b9a8c8f4eb3c575eccfe6b982aef0b28e0789a29da", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0", + "dst_ref": "HttpControlChannel.start", + "resolution": "resolved", + "slice_id": "51d73913df709152258ed1b9a8c8f4eb3c575eccfe6b982aef0b28e0789a29da", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._runner", + "HttpControlChannel.start" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._runner\n -> HttpControlChannel.port", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 15, + "span_end": 29, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "c7167bab7218bb768ad7c11bfb40d1a3096e6071dd7817bba5fd864cf8f6de13", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "3632ce8227f4a31e0768f2fb021a4d1ba28e1202633aa0f2fac902295931280f", + "dst_ref": "HttpControlChannel.port", + "resolution": "resolved", + "slice_id": "c7167bab7218bb768ad7c11bfb40d1a3096e6071dd7817bba5fd864cf8f6de13", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._runner", + "HttpControlChannel.port" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "3632ce8227f4a31e0768f2fb021a4d1ba28e1202633aa0f2fac902295931280f" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._timeout\n -> HttpControlChannel._health_response", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 14, + "span_end": 34, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "f858f5c9e575f6c4cdfe3853571b7ee21d1f628a443541d2037c3dc9d0790bef", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "e84bf04e9cd2127df235b7064d05f47e19f19a89c7c82f4c247231d4e8fa426a", + "dst_ref": "HttpControlChannel._health_response", + "resolution": "resolved", + "slice_id": "f858f5c9e575f6c4cdfe3853571b7ee21d1f628a443541d2037c3dc9d0790bef", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._timeout", + "HttpControlChannel._health_response" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "e84bf04e9cd2127df235b7064d05f47e19f19a89c7c82f4c247231d4e8fa426a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._timeout\n -> HttpControlChannel._action_response", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "c3ef21fcae96c82c00be74b3ab827d4af2085d89cb3fa5521c19a174aad84dbb", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "e64969024ccaeb34d8d91473fad07b3b3d341875846392e7a006406c7ada1954", + "dst_ref": "HttpControlChannel._action_response", + "resolution": "resolved", + "slice_id": "c3ef21fcae96c82c00be74b3ab827d4af2085d89cb3fa5521c19a174aad84dbb", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._timeout", + "HttpControlChannel._action_response" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "e64969024ccaeb34d8d91473fad07b3b3d341875846392e7a006406c7ada1954" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._runner\n -> HttpControlChannel.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 15, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "0f827ef81a990258a8a74381c8564a8361afa6712dba3200592659c939adcb9d", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "f29ab212620093d72be20e26c5a399624c7939a6056a728762ed3f84a250bfa3", + "dst_ref": "HttpControlChannel.stop", + "resolution": "resolved", + "slice_id": "0f827ef81a990258a8a74381c8564a8361afa6712dba3200592659c939adcb9d", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._runner", + "HttpControlChannel.stop" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "f29ab212620093d72be20e26c5a399624c7939a6056a728762ed3f84a250bfa3" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._factory\n -> HttpControlChannel.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 16, + "span_end": 21, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e61ec25ded7dbe380d95ce2abcbc1d7a2d2afde5aa8453866df8706dfb7d6ddb", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0", + "dst_ref": "HttpControlChannel.start", + "resolution": "resolved", + "slice_id": "e61ec25ded7dbe380d95ce2abcbc1d7a2d2afde5aa8453866df8706dfb7d6ddb", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._factory", + "HttpControlChannel.start" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel(ControlChannel):\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._timeout = timeout\n self._runner = UvicornThreadRunner(host, port, timeout)\n self._factory = HttpControlAppFactory()\n self._actions: ControlActionSet | None = None\n\n async def start(self, actions: ControlActionSet) -> None:\n self._actions = actions\n app = self._factory.create(self._health_response, self._action_response)\n await self._runner.start(app)\n\n async def stop(self) -> None:\n await self._runner.stop()\n\n @property\n def port(self) -> int:\n return self._runner.port\n\n async def _health_response(self) -> dict[str, object]:\n if self._actions is None:\n return {\"status\": \"unhealthy\", \"detail\": \"control actions are not configured\"}\n return await asyncio.wait_for(self._actions.health(), timeout=float(self._timeout))\n\n async def _action_response(self, action: str, _client_source: str = \"unknown\") -> JSONResponse:\n if self._actions is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"{action} handler is not configured\"}, status_code=404)\n callbacks = {\n \"start\": self._actions.start,\n \"stop\": self._actions.stop,\n \"status\": self._actions.status,\n }\n callback = callbacks.get(action)\n if callback is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"unsupported action: {action}\"}, status_code=404)\n action_timeout = max(float(self._timeout), 10.0) if action in {\"start\", \"stop\"} else float(self._timeout)\n try:\n detail = await asyncio.wait_for(callback(), timeout=action_timeout)\n except asyncio.TimeoutError:\n return JSONResponse(\n content={\"status\": \"accepted\", \"detail\": f\"{action} operation is still in progress\"},\n status_code=202,\n )\n except Exception as exc:\n return JSONResponse(content={\"status\": \"error\", \"detail\": str(exc)}, status_code=500)\n return JSONResponse(content={\"status\": \"ok\", \"detail\": detail or f\"{action} action accepted\"}, status_code=200)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_channel.py:HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "HttpControlChannel", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "HttpControlChannel", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "HttpControlChannel", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "HttpControlChannel", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "HttpControlChannel", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "HttpControlChannel", + "alternatives": [ + "HttpControlChannel" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 150, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 43, + "C0_SOURCE_CHUNKS": 20, + "C4_SEMANTIC_ROLES": 17, + "C2_DEPENDENCY_GRAPH": 56, + "C3_ENTRYPOINTS": 12 + }, + "merge_rank": 23 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Объясни класс HttpControlChannel", + "rag_count": 12 + }, + "output": { + "llm_answer": "## Объяснение работы класса `HttpControlChannel`\n\n### Назначение\nКласс `HttpControlChannel` предназначен для управления HTTP каналом контроля состояния приложения. Он отвечает за инициализацию сервера и обработку запросов, связанных с состоянием системы.\n\n### Ключевые зависимости\nКлючевая зависимость — это объект типа `UvicornThreadRunner`, используемый для запуска веб-сервера. Также используются классы и функции из модуля `HttpControlAppFactory`.\n\n### Поток данных или вызовов\n1. **Инициализация (`__init__`)**: \n - При создании объекта устанавливается значение тайм-аута и запускается объект `UvicornThreadRunner`. Этот объект используется для выполнения асинхронного запуска веб-приложения через фреймворк FastAPI.\n \n2. **Запуск (`start`)**:\n - Метод принимает набор действий (`ControlActionSet`), конфигурирует приложение, затем вызывает метод `start` у экземпляра `UvicornThreadRunner`.\n \n3. **Остановка (`stop`)**:\n - Остановка выполняется путем вызова метода `stop` у экземпляра `UvicornThreadRunner`.\n \n4. **Получение порта (`port`)**:\n - Возвращает порт, связанный с запущенным сервером.\n\n5. **Обработка health-запросов (_health_response)**:\n - Проверяет наличие настроенного набора действий. Если действия отсутствуют, возвращает состояние «unhealthy». В противном случае ожидает выполнение действия с заданным таймаутом.\n \n6. **Обработка пользовательских действий (_action_response)**:\n - Аналогично предыдущему пункту, проверяется наличие настроенных действий. Если действие отсутствует, возвращается ошибка. В противном случае обрабатывается соответствующее действие.\n\n### Важные детали реализации\n- **Таймаут**: Таймаут применяется при ожидании выполнения операций, таких как проверка здоровья системы и обработка пользовательских действий.\n- **Экземпляр `UvicornThreadRunner`**: Используется для обеспечения многопоточной работы и возможности одновременной обработки нескольких запросов.\n- **Модуль `HttpControlAppFactory`**: Отвечает за создание экземпляра FastAPI приложения, которое будет использоваться для обработки запросов.\n \n### Косвенные признаки (осторожный вывод)\nНа основе анализа графа зависимостей и логики работы можно осторожно предположить, что `HttpControlChannel` является частью общего механизма мониторинга и управления приложением. Это подтверждается его ролью «pipeline stage» и участием в обработке срезов данных («dataflow slices»).\n\n### Путь к файлу и имя сущности\n- Файл: `src/app_runtime/control/http_channel.py`\n- Имя сущности: `HttpControlChannel`" + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 795, + "evidence_rows": 12, + "evidence_chars": 3028 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 1 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_explain_ru_v1", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 3932 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_114552/full_chain_plba_code_retrieval_plba-fullchain-explain-http-control-channel.md b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_114552/full_chain_plba_code_retrieval_plba-fullchain-explain-http-control-channel.md new file mode 100644 index 0000000..dbb8d36 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_114552/full_chain_plba_code_retrieval_plba-fullchain-explain-http-control-channel.md @@ -0,0 +1,34 @@ +# plba-fullchain-explain-http-control-channel + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_retrieval.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Объясни класс HttpControlChannel + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 12, + "llm_answer": "## Объяснение работы класса `HttpControlChannel`\n\n### Назначение\nКласс `HttpControlChannel` предназначен для управления HTTP каналом контроля состояния приложения. Он отвечает за инициализацию сервера и обработку запросов, связанных с состоянием системы.\n\n### Ключевые зависимости\nКлючевая зависимость — это объект типа `UvicornThreadRunner`, используемый для запуска веб-сервера. Также используются классы и функции из модуля `HttpControlAppFactory`.\n\n### Поток данных или вызовов\n1. **Инициализация (`__init__`)**: \n - При создании объекта устанавливается значение тайм-аута и запускается объект `UvicornThreadRunner`. Этот объект используется для выполнения асинхронного запуска веб-приложения через фреймворк FastAPI.\n \n2. **Запуск (`start`)**:\n - Метод принимает набор действий (`ControlActionSet`), конфигурирует приложение, затем вызывает метод `start` у экземпляра `UvicornThreadRunner`.\n \n3. **Остановка (`stop`)**:\n - Остановка выполняется путем вызова метода `stop` у экземпляра `UvicornThreadRunner`.\n \n4. **Получение порта (`port`)**:\n - Возвращает порт, связанный с запущенным сервером.\n\n5. **Обработка health-запросов (_health_response)**:\n - Проверяет наличие настроенного набора действий. Если действия отсутствуют, возвращает состояние «unhealthy». В противном случае ожидает выполнение действия с заданным таймаутом.\n \n6. **Обработка пользовательских действий (_action_response)**:\n - Аналогично предыдущему пункту, проверяется наличие настроенных действий. Если действие отсутствует, возвращается ошибка. В противном случае обрабатывается соответствующее действие.\n\n### Важные детали реализации\n- **Таймаут**: Таймаут применяется при ожидании выполнения операций, таких как проверка здоровья системы и обработка пользовательских действий.\n- **Экземпляр `UvicornThreadRunner`**: Используется для обеспечения многопоточной работы и возможности одновременной обработки нескольких запросов.\n- **Модуль `HttpControlAppFactory`**: Отвечает за создание экземпляра FastAPI приложения, которое будет использоваться для обработки запросов.\n \n### Косвенные признаки (осторожный вывод)\nНа основе анализа графа зависимостей и логики работы можно осторожно предположить, что `HttpControlChannel` является частью общего механизма мониторинга и управления приложением. Это подтверждается его ролью «pipeline stage» и участием в обработке срезов данных («dataflow slices»).\n\n### Путь к файлу и имя сущности\n- Файл: `src/app_runtime/control/http_channel.py`\n- Имя сущности: `HttpControlChannel`", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "HttpControlChannel" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_114552/full_chain_plba_code_retrieval_plba-fullchain-explain-runtime-manager.json b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_114552/full_chain_plba_code_retrieval_plba-fullchain-explain-runtime-manager.json new file mode 100644 index 0000000..9559c41 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_114552/full_chain_plba_code_retrieval_plba-fullchain-explain-runtime-manager.json @@ -0,0 +1,2088 @@ +{ + "case_id": "plba-fullchain-explain-runtime-manager", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_retrieval.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 12, + "llm_answer": "## Назначение класса `RuntimeManager`\nКласс `RuntimeManager` играет роль центрального координатора и менеджера всех ключевых компонентов системы runtime. Он отвечает за инициализацию, настройку и управление жизненным циклом различных сервисов и модулей приложения.\n\n## Ключевые зависимости\nКлючевыми зависимостями для работы класса являются следующие сущности:\n\n- **ConfigurationManager** (`configuration`): объект, хранящий конфигурационные параметры приложения.\n- **ServiceContainer** (`services`): контейнер для регистрации и управления сервисами.\n- **TraceService** (`traces`): инструмент для отслеживания событий и трассировки выполнения задач.\n- **HealthRegistry** (`health`): служба мониторинга состояния здоровья компонентов.\n- **LogManager** (`logs`): менеджер логирования действий и событий.\n- **WorkerSupervisor** (`workers`): супервизор рабочих процессов.\n- **ControlPlaneService** (`control_plane`): основной контроллер плоскости управления приложением.\n\nВсе эти компоненты передаются конструктору при создании экземпляра `RuntimeManager`.\n\n## Поток данных или вызовов\n### Инициализация и настройка\nПри вызове конструктора `RuntimeManager.__init__`, происходит следующее:\n\n1. Если аргументы отсутствуют, создаются соответствующие объекты по умолчанию (например, через конструктор по умолчанию).\n2. Все переданные аргументы сохраняются в соответствующие атрибуты объекта `self`.\n3. Вызывается метод `_register_core_services()`, который регистрирует основные сервисы в реестре модуля (`registry`).\n\n### Регистрация модулей\nМетод `register_module(module)` позволяет зарегистрировать дополнительные модули в системе runtime. Этот метод добавляет модуль в реестр зарегистрированных модулей и выполняет его инициализацию.\n\n### Управление состоянием\nВ классе используются атрибуты `_started`, `_state`, `_core_registered`, `_workers_registered` для управления текущим состоянием системы и компонентами, которые были успешно зарегистрированы.\n\n## Важные детали реализации\n### Константы\nВ классе определены константы:\n- `ACTION_TIMEOUT_SECONDS`: время ожидания действия до таймаута (по умолчанию 10 секунд).\n- `ACTION_POLL_INTERVAL_SECONDS`: интервал опроса состояния задачи (по умолчанию 0.05 секунды).\n\nЭти значения могут быть использованы различными методами внутри класса для управления поведением системных операций.\n\n### Методы и функции\nХотя приведенный фрагмент кода не полностью раскрывает все методы и их функциональность, можно выделить несколько важных методов и функций:\n\n- Метод `_register_core_services()` используется для регистрации основных сервисов в реестре модуля.\n- Метод `register_module(module)` предназначен для добавления новых модулей в систему runtime.\n\nОсторожный вывод: Хотя подробная информация о внутренних методах и их работе отсутствует, общий поток выполнения и зависимости достаточно четко обозначены.\n\n## Финальное резюме\nКласс `RuntimeManager` является ключевым компонентом архитектуры runtime-приложения. Он управляет основными ресурсами и сервисами, обеспечивает регистрацию дополнительных модулей и контролирует состояние системы. Использование реестра модулей и трекинг состояний позволяют эффективно управлять процессом выполнения задач и отслеживать работу сервисов.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-fullchain-explain-runtime-manager", + "text": "Объясни как работает класс RuntimeManager", + "mode": "full_chain", + "run_started_at": "2026-03-12T11:45:52", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни как работает класс RuntimeManager", + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ], + "confidence": 0.99 + }, + "rag_count": 12, + "rag_rows": [ + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager\nRuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "qname": "RuntimeManager", + "kind": "class", + "signature": "RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests manager\n- orchestrates role-like calls (4)\n- reads and writes state attributes\n- participates in dataflow slices (50)", + "layer": "C4_SEMANTIC_ROLES", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 43, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "symbol_name": "RuntimeManager", + "qname": "RuntimeManager", + "role": "pipeline_stage", + "confidence": 0.67, + "dataflow_participation": 50, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 52, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "## Назначение класса `RuntimeManager`\nКласс `RuntimeManager` играет роль центрального координатора и менеджера всех ключевых компонентов системы runtime. Он отвечает за инициализацию, настройку и управление жизненным циклом различных сервисов и модулей приложения.\n\n## Ключевые зависимости\nКлючевыми зависимостями для работы класса являются следующие сущности:\n\n- **ConfigurationManager** (`configuration`): объект, хранящий конфигурационные параметры приложения.\n- **ServiceContainer** (`services`): контейнер для регистрации и управления сервисами.\n- **TraceService** (`traces`): инструмент для отслеживания событий и трассировки выполнения задач.\n- **HealthRegistry** (`health`): служба мониторинга состояния здоровья компонентов.\n- **LogManager** (`logs`): менеджер логирования действий и событий.\n- **WorkerSupervisor** (`workers`): супервизор рабочих процессов.\n- **ControlPlaneService** (`control_plane`): основной контроллер плоскости управления приложением.\n\nВсе эти компоненты передаются конструктору при создании экземпляра `RuntimeManager`.\n\n## Поток данных или вызовов\n### Инициализация и настройка\nПри вызове конструктора `RuntimeManager.__init__`, происходит следующее:\n\n1. Если аргументы отсутствуют, создаются соответствующие объекты по умолчанию (например, через конструктор по умолчанию).\n2. Все переданные аргументы сохраняются в соответствующие атрибуты объекта `self`.\n3. Вызывается метод `_register_core_services()`, который регистрирует основные сервисы в реестре модуля (`registry`).\n\n### Регистрация модулей\nМетод `register_module(module)` позволяет зарегистрировать дополнительные модули в системе runtime. Этот метод добавляет модуль в реестр зарегистрированных модулей и выполняет его инициализацию.\n\n### Управление состоянием\nВ классе используются атрибуты `_started`, `_state`, `_core_registered`, `_workers_registered` для управления текущим состоянием системы и компонентами, которые были успешно зарегистрированы.\n\n## Важные детали реализации\n### Константы\nВ классе определены константы:\n- `ACTION_TIMEOUT_SECONDS`: время ожидания действия до таймаута (по умолчанию 10 секунд).\n- `ACTION_POLL_INTERVAL_SECONDS`: интервал опроса состояния задачи (по умолчанию 0.05 секунды).\n\nЭти значения могут быть использованы различными методами внутри класса для управления поведением системных операций.\n\n### Методы и функции\nХотя приведенный фрагмент кода не полностью раскрывает все методы и их функциональность, можно выделить несколько важных методов и функций:\n\n- Метод `_register_core_services()` используется для регистрации основных сервисов в реестре модуля.\n- Метод `register_module(module)` предназначен для добавления новых модулей в систему runtime.\n\nОсторожный вывод: Хотя подробная информация о внутренних методах и их работе отсутствует, общий поток выполнения и зависимости достаточно четко обозначены.\n\n## Финальное резюме\nКласс `RuntimeManager` является ключевым компонентом архитектуры runtime-приложения. Он управляет основными ресурсами и сервисами, обеспечивает регистрацию дополнительных модулей и контролирует состояние системы. Использование реестра модулей и трекинг состояний позволяют эффективно управлять процессом выполнения задач и отслеживать работу сервисов.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS", + "C4_SEMANTIC_ROLES" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 231, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 25, + "C0_SOURCE_CHUNKS": 14, + "C4_SEMANTIC_ROLES": 14, + "C2_DEPENDENCY_GRAPH": 54, + "C3_ENTRYPOINTS": 10 + }, + "merge_rank": 16, + "prompt_build": 0, + "llm_call": 4911 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 797, + "evidence_rows": 12, + "evidence_chars": 7130 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 2 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_explain_ru_v1", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "RuntimeManager" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 12, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-fullchain-explain-runtime-manager", + "mode": "full_chain", + "run_started_at": "2026-03-12T11:45:52", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Объясни как работает класс RuntimeManager", + "normalized_query": "Объясни как работает класс RuntimeManager" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Объясни как работает класс RuntimeManager" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни как работает класс RuntimeManager" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Объясни как работает класс RuntimeManager" + }, + "output": { + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ], + "confidence": 0.99 + }, + "rag_count": 12, + "rag_rows": [ + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager\nRuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "qname": "RuntimeManager", + "kind": "class", + "signature": "RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests manager\n- orchestrates role-like calls (4)\n- reads and writes state attributes\n- participates in dataflow slices (50)", + "layer": "C4_SEMANTIC_ROLES", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 43, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "symbol_name": "RuntimeManager", + "qname": "RuntimeManager", + "role": "pipeline_stage", + "confidence": 0.67, + "dataflow_participation": 50, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 52, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 231, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 25, + "C0_SOURCE_CHUNKS": 14, + "C4_SEMANTIC_ROLES": 14, + "C2_DEPENDENCY_GRAPH": 54, + "C3_ENTRYPOINTS": 10 + }, + "merge_rank": 16 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Объясни как работает класс RuntimeManager", + "rag_count": 12 + }, + "output": { + "llm_answer": "## Назначение класса `RuntimeManager`\nКласс `RuntimeManager` играет роль центрального координатора и менеджера всех ключевых компонентов системы runtime. Он отвечает за инициализацию, настройку и управление жизненным циклом различных сервисов и модулей приложения.\n\n## Ключевые зависимости\nКлючевыми зависимостями для работы класса являются следующие сущности:\n\n- **ConfigurationManager** (`configuration`): объект, хранящий конфигурационные параметры приложения.\n- **ServiceContainer** (`services`): контейнер для регистрации и управления сервисами.\n- **TraceService** (`traces`): инструмент для отслеживания событий и трассировки выполнения задач.\n- **HealthRegistry** (`health`): служба мониторинга состояния здоровья компонентов.\n- **LogManager** (`logs`): менеджер логирования действий и событий.\n- **WorkerSupervisor** (`workers`): супервизор рабочих процессов.\n- **ControlPlaneService** (`control_plane`): основной контроллер плоскости управления приложением.\n\nВсе эти компоненты передаются конструктору при создании экземпляра `RuntimeManager`.\n\n## Поток данных или вызовов\n### Инициализация и настройка\nПри вызове конструктора `RuntimeManager.__init__`, происходит следующее:\n\n1. Если аргументы отсутствуют, создаются соответствующие объекты по умолчанию (например, через конструктор по умолчанию).\n2. Все переданные аргументы сохраняются в соответствующие атрибуты объекта `self`.\n3. Вызывается метод `_register_core_services()`, который регистрирует основные сервисы в реестре модуля (`registry`).\n\n### Регистрация модулей\nМетод `register_module(module)` позволяет зарегистрировать дополнительные модули в системе runtime. Этот метод добавляет модуль в реестр зарегистрированных модулей и выполняет его инициализацию.\n\n### Управление состоянием\nВ классе используются атрибуты `_started`, `_state`, `_core_registered`, `_workers_registered` для управления текущим состоянием системы и компонентами, которые были успешно зарегистрированы.\n\n## Важные детали реализации\n### Константы\nВ классе определены константы:\n- `ACTION_TIMEOUT_SECONDS`: время ожидания действия до таймаута (по умолчанию 10 секунд).\n- `ACTION_POLL_INTERVAL_SECONDS`: интервал опроса состояния задачи (по умолчанию 0.05 секунды).\n\nЭти значения могут быть использованы различными методами внутри класса для управления поведением системных операций.\n\n### Методы и функции\nХотя приведенный фрагмент кода не полностью раскрывает все методы и их функциональность, можно выделить несколько важных методов и функций:\n\n- Метод `_register_core_services()` используется для регистрации основных сервисов в реестре модуля.\n- Метод `register_module(module)` предназначен для добавления новых модулей в систему runtime.\n\nОсторожный вывод: Хотя подробная информация о внутренних методах и их работе отсутствует, общий поток выполнения и зависимости достаточно четко обозначены.\n\n## Финальное резюме\nКласс `RuntimeManager` является ключевым компонентом архитектуры runtime-приложения. Он управляет основными ресурсами и сервисами, обеспечивает регистрацию дополнительных модулей и контролирует состояние системы. Использование реестра модулей и трекинг состояний позволяют эффективно управлять процессом выполнения задач и отслеживать работу сервисов." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 797, + "evidence_rows": 12, + "evidence_chars": 7130 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 2 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_explain_ru_v1", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 4911 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_114552/full_chain_plba_code_retrieval_plba-fullchain-explain-runtime-manager.md b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_114552/full_chain_plba_code_retrieval_plba-fullchain-explain-runtime-manager.md new file mode 100644 index 0000000..7523702 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_114552/full_chain_plba_code_retrieval_plba-fullchain-explain-runtime-manager.md @@ -0,0 +1,34 @@ +# plba-fullchain-explain-runtime-manager + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_retrieval.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Объясни как работает класс RuntimeManager + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 12, + "llm_answer": "## Назначение класса `RuntimeManager`\nКласс `RuntimeManager` играет роль центрального координатора и менеджера всех ключевых компонентов системы runtime. Он отвечает за инициализацию, настройку и управление жизненным циклом различных сервисов и модулей приложения.\n\n## Ключевые зависимости\nКлючевыми зависимостями для работы класса являются следующие сущности:\n\n- **ConfigurationManager** (`configuration`): объект, хранящий конфигурационные параметры приложения.\n- **ServiceContainer** (`services`): контейнер для регистрации и управления сервисами.\n- **TraceService** (`traces`): инструмент для отслеживания событий и трассировки выполнения задач.\n- **HealthRegistry** (`health`): служба мониторинга состояния здоровья компонентов.\n- **LogManager** (`logs`): менеджер логирования действий и событий.\n- **WorkerSupervisor** (`workers`): супервизор рабочих процессов.\n- **ControlPlaneService** (`control_plane`): основной контроллер плоскости управления приложением.\n\nВсе эти компоненты передаются конструктору при создании экземпляра `RuntimeManager`.\n\n## Поток данных или вызовов\n### Инициализация и настройка\nПри вызове конструктора `RuntimeManager.__init__`, происходит следующее:\n\n1. Если аргументы отсутствуют, создаются соответствующие объекты по умолчанию (например, через конструктор по умолчанию).\n2. Все переданные аргументы сохраняются в соответствующие атрибуты объекта `self`.\n3. Вызывается метод `_register_core_services()`, который регистрирует основные сервисы в реестре модуля (`registry`).\n\n### Регистрация модулей\nМетод `register_module(module)` позволяет зарегистрировать дополнительные модули в системе runtime. Этот метод добавляет модуль в реестр зарегистрированных модулей и выполняет его инициализацию.\n\n### Управление состоянием\nВ классе используются атрибуты `_started`, `_state`, `_core_registered`, `_workers_registered` для управления текущим состоянием системы и компонентами, которые были успешно зарегистрированы.\n\n## Важные детали реализации\n### Константы\nВ классе определены константы:\n- `ACTION_TIMEOUT_SECONDS`: время ожидания действия до таймаута (по умолчанию 10 секунд).\n- `ACTION_POLL_INTERVAL_SECONDS`: интервал опроса состояния задачи (по умолчанию 0.05 секунды).\n\nЭти значения могут быть использованы различными методами внутри класса для управления поведением системных операций.\n\n### Методы и функции\nХотя приведенный фрагмент кода не полностью раскрывает все методы и их функциональность, можно выделить несколько важных методов и функций:\n\n- Метод `_register_core_services()` используется для регистрации основных сервисов в реестре модуля.\n- Метод `register_module(module)` предназначен для добавления новых модулей в систему runtime.\n\nОсторожный вывод: Хотя подробная информация о внутренних методах и их работе отсутствует, общий поток выполнения и зависимости достаточно четко обозначены.\n\n## Финальное резюме\nКласс `RuntimeManager` является ключевым компонентом архитектуры runtime-приложения. Он управляет основными ресурсами и сервисами, обеспечивает регистрацию дополнительных модулей и контролирует состояние системы. Использование реестра модулей и трекинг состояний позволяют эффективно управлять процессом выполнения задач и отслеживать работу сервисов.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_114552/full_chain_plba_code_retrieval_plba-fullchain-explain-trace-service.json b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_114552/full_chain_plba_code_retrieval_plba-fullchain-explain-trace-service.json new file mode 100644 index 0000000..994e1b0 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_114552/full_chain_plba_code_retrieval_plba-fullchain-explain-trace-service.json @@ -0,0 +1,2208 @@ +{ + "case_id": "plba-fullchain-explain-trace-service", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_retrieval.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 14, + "llm_answer": "## Объяснение работы `TraceService`\n\n### Назначение\n`TraceService` — это сервис, предназначенный для управления контекстом трассировки и записи событий трассировки в транспортный механизм (`TraceTransport`). Он отвечает за создание новых трассировочных записей, их хранение и отправку в транспорт.\n\n### Ключевые зависимости\n- **TraceTransport**: отвечает за передачу трассировочной информации от приложения к внешнему хранилищу или системе сбора логов.\n- **TraceContextStore**: используется для временного хранения трассировочных записей до их передачи через транспорт.\n- **NoOpTraceTransport**: используется по умолчанию, если не передан другой транспорт. Этот транспорт просто игнорирует все сообщения без реальной отправки.\n\n### Поток данных или вызовов\n1. При инициализации сервиса (`TraceService.__init__`) создается объект записи контекста трассировки (`TraceRecordWriter`), который использует переданный транспорт для записи сообщений и контекстов.\n \n ```python\n def __init__(self, transport: TraceTransport | None = None, store: TraceContextStore | None = None):\n ...\n self._writer = TraceRecordWriter(self.transport)\n ```\n\n2. Метод `create_context` создает новую трассировочную запись с заданными атрибутами и помещает её в хранилище (`store.push()`), затем записывает её в транспорт через метод `_writer.write_context()`.\n \n ```python\n def create_context(\n self,\n *,\n alias: str,\n parent_id: str | None = None,\n kind: str | None = None,\n attrs: dict[str, Any] | None = None,\n ) -> str:\n ...\n self._writer.write_context(record)\n ```\n\n3. Метод `open_context` обеспечивает контекстно-зависимую область видимости при создании новой трассировочной записи внутри блока контекста.\n \n ```python\n with TraceService.open_context(...) as trace_id:\n # действия в области видимости\n ```\n\n### Важные детали реализации\n- **Транспорт трассировки** (`TraceTransport`): любой класс, реализующий интерфейс `write_context` и `write_message`, может быть использован в качестве транспорта. По умолчанию используется `NoOpTraceTransport`, который ничего не делает.\n \n ```python\n class NoOpTraceTransport:\n def write_context(self, record: TraceContextRecord) -> None:\n pass\n ```\n\n- **Запись контекста и сообщений**:\n - Контекстная запись (`record`) сохраняется в локальном хранилище (`TraceContextStore`) и передается в транспорт с помощью метода `_writer.write_context()`.\n - Сообщения трассировки (`TraceLogMessage`) также могут быть записаны в транспорт аналогично контекстным записям.\n\n### Осторожные выводы\n- Хотя конкретный транспорт трассировки не указан явно в предоставленном фрагменте кода, предполагается, что он подключается извне и предоставляет необходимые методы для записи контекста и сообщений.\n- Детали внутреннего устройства транспортного механизма не раскрыты напрямую в представленной информации, но можно предположить, что он должен поддерживать интерфейсы, описанные в классе `TraceTransport`.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "TraceService" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-fullchain-explain-trace-service", + "text": "Как работает TraceService?", + "mode": "full_chain", + "run_started_at": "2026-03-12T11:45:52", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Как работает TraceService?", + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "TraceService", + "alternatives": [ + "TraceService" + ], + "confidence": 0.99 + }, + "rag_count": 14, + "rag_rows": [ + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceService\nTraceService(TraceContextFactory)", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService", + "span_start": 39, + "span_end": 166, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "c2b2b976d99f2c600000b753731b26e0a69adcb4359398b93073590c5d5d04f4", + "qname": "TraceService", + "kind": "class", + "signature": "TraceService(TraceContextFactory)", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (13)", + "layer": "C4_SEMANTIC_ROLES", + "title": "TraceService", + "span_start": 39, + "span_end": 166, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 60, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "c2b2b976d99f2c600000b753731b26e0a69adcb4359398b93073590c5d5d04f4", + "symbol_name": "TraceService", + "qname": "TraceService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 13, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.create_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 61, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3b052062067a78aef3302ee1d996897e02a67d1b340397bea4f59fe147c0492a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a", + "dst_ref": "TraceService.create_context", + "resolution": "resolved", + "slice_id": "3b052062067a78aef3302ee1d996897e02a67d1b340397bea4f59fe147c0492a", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.create_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.close_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 84, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "7a9353ef57c9ae5d19b3a0c6ac50fad05e6d21d31bbe1cd1cd07af6332ba6505", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "01e14158dcced7e52d0c8ac84ac7b9a75225c261b6aca6a1d7da802d0994721c", + "dst_ref": "TraceService.close_context", + "resolution": "resolved", + "slice_id": "7a9353ef57c9ae5d19b3a0c6ac50fad05e6d21d31bbe1cd1cd07af6332ba6505", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.close_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "01e14158dcced7e52d0c8ac84ac7b9a75225c261b6aca6a1d7da802d0994721c" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.open_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 78, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a6e13b9ebc4fed84586afd53ed92a4d14757e440873f572b2337d5622ee96031", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426", + "dst_ref": "TraceService.open_context", + "resolution": "resolved", + "slice_id": "a6e13b9ebc4fed84586afd53ed92a4d14757e440873f572b2337d5622ee96031", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.open_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.transport\n -> TraceService.__init__", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 41, + "span_end": 43, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "1e923a93faa05c3c43ca9b19bd047007a8589ccce57d3cc1798ae7f9f200af98", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "dst_ref": "TraceService.__init__", + "resolution": "resolved", + "slice_id": "1e923a93faa05c3c43ca9b19bd047007a8589ccce57d3cc1798ae7f9f200af98", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.transport", + "TraceService.__init__" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.current_trace_id", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 81, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3ea17138634b1190bded77ddb84aa1595124f6519b246f24fc4b02bd62b5cac1", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c", + "dst_ref": "TraceService.current_trace_id", + "resolution": "resolved", + "slice_id": "3ea17138634b1190bded77ddb84aa1595124f6519b246f24fc4b02bd62b5cac1", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.current_trace_id" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.step", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 88, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "9f34c5da9b09fba99df6f6b1bde183a9aeb45111b8218a747c71590c2c9f60f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "c44bfbc66cf747283f30088da3e011a10395031d41e77b74e523c24997f641ca", + "dst_ref": "TraceService.step", + "resolution": "resolved", + "slice_id": "9f34c5da9b09fba99df6f6b1bde183a9aeb45111b8218a747c71590c2c9f60f2", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.step" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "c44bfbc66cf747283f30088da3e011a10395031d41e77b74e523c24997f641ca" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceRecordWriter:\n def __init__(self, transport: TraceTransport) -> None:\n self._logger = logging.getLogger(__name__)\n self._transport = transport\n\n def write_context(self, record: TraceContextRecord) -> None:\n try:\n self._transport.write_context(record)\n except Exception:\n self._logger.exception(\"Trace transport failed to write context %s\", record.trace_id)\n\n def write_message(self, record: TraceLogMessage) -> None:\n try:\n self._transport.write_message(record)\n except Exception:\n self._logger.exception(\"Trace transport failed to write message for %s\", record.trace_id)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/tracing/service.py:TraceRecordWriter", + "span_start": 21, + "span_end": 36, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceService(TraceContextFactory):\n def __init__(self, transport: TraceTransport | None = None, store: TraceContextStore | None = None) -> None:\n self.transport = transport or NoOpTraceTransport()\n self.store = store or TraceContextStore()\n self._writer = TraceRecordWriter(self.transport)\n\n def create_context(\n self,\n *,\n alias: str,\n parent_id: str | None = None,\n kind: str | None = None,\n attrs: dict[str, Any] | None = None,\n ) -> str:\n record = TraceContextRecord(\n trace_id=uuid4().hex,\n alias=str(alias or \"\"),\n parent_id=parent_id,\n type=kind,\n event_time=utc_now(),\n attrs=dict(attrs or {}),\n )\n self.store.push(record)\n self._writer.write_context(record)\n return record.trace_id\n\n @contextmanager\n def open_context(\n self,\n *,\n alias: str,\n parent_id: str | None = None,\n kind: str | None = None,\n attrs: dict[str, Any] | None = None,\n ) -> Iterator[str]:\n trace_id = self.create_context(alias=alias, parent_id=parent_id, kind=kind, attrs=attrs)\n try:\n yield trace_id\n finally:\n self.store.pop()\n\n def current_trace_id(self) -> str | None:\n return self.store.current_trace_id()\n\n def close_context(self) -> str | None:\n previous = self.store.pop()\n return previous.record.trace_id if previous else None\n\n def step(self, name: str) -> None:\n self.store.set_step(str(name or \"\"))\n\n def info(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"INFO\", message, status, attrs)\n\n def debug(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"DEBUG\", message, status, attrs)\n\n def warning(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"WARNING\", message, status, attrs)\n\n def error(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"ERROR\", message, status, attrs)\n\n def exception(self, message: str, *, status: str = \"failed\", attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"ERROR\", message, status, attrs)\n\n def new_root(self, operation: str) -> TraceContext:\n trace_id = self.create_context(alias=operation, kind=\"operation\", attrs={\"operation\": operation})\n return TraceContext(trace_id=trace_id, span_id=trace_id, attributes={\"operation\": operation})\n\n def child_of(self, parent: TraceContext, operation: str) -> TraceContext:\n trace_id = self.create_context(\n alias=operation,\n parent_id=parent.trace_id,\n kind=\"worker\",\n attrs={\"operation\": operation},\n )\n return TraceContext(\n trace_id=trace_id,\n span_id=trace_id,\n parent_span_id=parent.span_id,\n attributes={\"operation\": operation},\n )\n\n def attach(self, metadata: dict[str, object], context: TraceContext) -> dict[str, object]:\n updated = dict(metadata)\n updated[\"trace_id\"] = context.trace_id\n updated[\"span_id\"] = context.span_id\n updated[\"parent_span_id\"] = context.parent_span_id\n return updated\n\n def resume(self, metadata: dict[str, object], operation: str) -> TraceContext:\n trace_id = str(metadata.get(\"trace_id\") or uuid4().hex)\n span_id = str(metadata.get(\"span_id\") or trace_id)\n parent_id = metadata.get(\"parent_span_id\")\n self.create_context(\n alias=operation,\n parent_id=str(parent_id) if parent_id else None,\n kind=\"worker\",\n attrs=dict(metadata),\n )\n return TraceContext(\n trace_id=trace_id,\n span_id=span_id,\n parent_span_id=str(parent_id) if parent_id else None,\n attributes={\"operation\": operation},\n )\n\n def _write_message(\n self,\n level: TraceLevel,\n message: str,\n status: str | None,\n attrs: dict[str, Any] | None,\n ) -> None:\n active = self.store.current()\n if active is None:\n raise RuntimeError(\"Trace context is not bound. Call create_context() first.\")\n record = TraceLogMessage(\n trace_id=active.record.trace_id,\n step=active.step,\n status=str(status or \"\"),\n message=str(message or \"\"),\n level=level,\n event_time=utc_now(),\n attrs=dict(attrs or {}),\n )\n self._writer.write_message(record)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/tracing/service.py:TraceService", + "span_start": 39, + "span_end": 166, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceManager(TraceService):\n \"\"\"Compatibility alias during the transition from ConfigManager-shaped naming.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/tracing/service.py:TraceManager", + "span_start": 169, + "span_end": 170, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 2, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "## Объяснение работы `TraceService`\n\n### Назначение\n`TraceService` — это сервис, предназначенный для управления контекстом трассировки и записи событий трассировки в транспортный механизм (`TraceTransport`). Он отвечает за создание новых трассировочных записей, их хранение и отправку в транспорт.\n\n### Ключевые зависимости\n- **TraceTransport**: отвечает за передачу трассировочной информации от приложения к внешнему хранилищу или системе сбора логов.\n- **TraceContextStore**: используется для временного хранения трассировочных записей до их передачи через транспорт.\n- **NoOpTraceTransport**: используется по умолчанию, если не передан другой транспорт. Этот транспорт просто игнорирует все сообщения без реальной отправки.\n\n### Поток данных или вызовов\n1. При инициализации сервиса (`TraceService.__init__`) создается объект записи контекста трассировки (`TraceRecordWriter`), который использует переданный транспорт для записи сообщений и контекстов.\n \n ```python\n def __init__(self, transport: TraceTransport | None = None, store: TraceContextStore | None = None):\n ...\n self._writer = TraceRecordWriter(self.transport)\n ```\n\n2. Метод `create_context` создает новую трассировочную запись с заданными атрибутами и помещает её в хранилище (`store.push()`), затем записывает её в транспорт через метод `_writer.write_context()`.\n \n ```python\n def create_context(\n self,\n *,\n alias: str,\n parent_id: str | None = None,\n kind: str | None = None,\n attrs: dict[str, Any] | None = None,\n ) -> str:\n ...\n self._writer.write_context(record)\n ```\n\n3. Метод `open_context` обеспечивает контекстно-зависимую область видимости при создании новой трассировочной записи внутри блока контекста.\n \n ```python\n with TraceService.open_context(...) as trace_id:\n # действия в области видимости\n ```\n\n### Важные детали реализации\n- **Транспорт трассировки** (`TraceTransport`): любой класс, реализующий интерфейс `write_context` и `write_message`, может быть использован в качестве транспорта. По умолчанию используется `NoOpTraceTransport`, который ничего не делает.\n \n ```python\n class NoOpTraceTransport:\n def write_context(self, record: TraceContextRecord) -> None:\n pass\n ```\n\n- **Запись контекста и сообщений**:\n - Контекстная запись (`record`) сохраняется в локальном хранилище (`TraceContextStore`) и передается в транспорт с помощью метода `_writer.write_context()`.\n - Сообщения трассировки (`TraceLogMessage`) также могут быть записаны в транспорт аналогично контекстным записям.\n\n### Осторожные выводы\n- Хотя конкретный транспорт трассировки не указан явно в предоставленном фрагменте кода, предполагается, что он подключается извне и предоставляет необходимые методы для записи контекста и сообщений.\n- Детали внутреннего устройства транспортного механизма не раскрыты напрямую в представленной информации, но можно предположить, что он должен поддерживать интерфейсы, описанные в классе `TraceTransport`.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS", + "C4_SEMANTIC_ROLES" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "TraceService" + ], + "keyword_hints": [ + "TraceService" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "TraceService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "TraceService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "TraceService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "TraceService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "TraceService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "TraceService", + "alternatives": [ + "TraceService" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 1, + "symbol_resolution": 0, + "retrieval_total": 155, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 48, + "C0_SOURCE_CHUNKS": 25, + "C4_SEMANTIC_ROLES": 18, + "C2_DEPENDENCY_GRAPH": 50, + "C3_ENTRYPOINTS": 13 + }, + "merge_rank": 20, + "prompt_build": 0, + "llm_call": 4555 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 931, + "evidence_rows": 14, + "evidence_chars": 6323 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 1 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 3, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_explain_ru_v1", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "TraceService" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 14, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-fullchain-explain-trace-service", + "mode": "full_chain", + "run_started_at": "2026-03-12T11:45:52", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Как работает TraceService?", + "normalized_query": "Как работает TraceService?" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Как работает TraceService?" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Как работает TraceService?" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "TraceService" + ], + "keyword_hints": [ + "TraceService" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 1 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Как работает TraceService?" + }, + "output": { + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "TraceService", + "alternatives": [ + "TraceService" + ], + "confidence": 0.99 + }, + "rag_count": 14, + "rag_rows": [ + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceService\nTraceService(TraceContextFactory)", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService", + "span_start": 39, + "span_end": 166, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "c2b2b976d99f2c600000b753731b26e0a69adcb4359398b93073590c5d5d04f4", + "qname": "TraceService", + "kind": "class", + "signature": "TraceService(TraceContextFactory)", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (13)", + "layer": "C4_SEMANTIC_ROLES", + "title": "TraceService", + "span_start": 39, + "span_end": 166, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 60, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "c2b2b976d99f2c600000b753731b26e0a69adcb4359398b93073590c5d5d04f4", + "symbol_name": "TraceService", + "qname": "TraceService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 13, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.create_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 61, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3b052062067a78aef3302ee1d996897e02a67d1b340397bea4f59fe147c0492a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a", + "dst_ref": "TraceService.create_context", + "resolution": "resolved", + "slice_id": "3b052062067a78aef3302ee1d996897e02a67d1b340397bea4f59fe147c0492a", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.create_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.close_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 84, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "7a9353ef57c9ae5d19b3a0c6ac50fad05e6d21d31bbe1cd1cd07af6332ba6505", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "01e14158dcced7e52d0c8ac84ac7b9a75225c261b6aca6a1d7da802d0994721c", + "dst_ref": "TraceService.close_context", + "resolution": "resolved", + "slice_id": "7a9353ef57c9ae5d19b3a0c6ac50fad05e6d21d31bbe1cd1cd07af6332ba6505", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.close_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "01e14158dcced7e52d0c8ac84ac7b9a75225c261b6aca6a1d7da802d0994721c" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.open_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 78, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a6e13b9ebc4fed84586afd53ed92a4d14757e440873f572b2337d5622ee96031", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426", + "dst_ref": "TraceService.open_context", + "resolution": "resolved", + "slice_id": "a6e13b9ebc4fed84586afd53ed92a4d14757e440873f572b2337d5622ee96031", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.open_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.transport\n -> TraceService.__init__", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 41, + "span_end": 43, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "1e923a93faa05c3c43ca9b19bd047007a8589ccce57d3cc1798ae7f9f200af98", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "dst_ref": "TraceService.__init__", + "resolution": "resolved", + "slice_id": "1e923a93faa05c3c43ca9b19bd047007a8589ccce57d3cc1798ae7f9f200af98", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.transport", + "TraceService.__init__" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.current_trace_id", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 81, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3ea17138634b1190bded77ddb84aa1595124f6519b246f24fc4b02bd62b5cac1", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c", + "dst_ref": "TraceService.current_trace_id", + "resolution": "resolved", + "slice_id": "3ea17138634b1190bded77ddb84aa1595124f6519b246f24fc4b02bd62b5cac1", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.current_trace_id" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.step", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 88, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "9f34c5da9b09fba99df6f6b1bde183a9aeb45111b8218a747c71590c2c9f60f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "c44bfbc66cf747283f30088da3e011a10395031d41e77b74e523c24997f641ca", + "dst_ref": "TraceService.step", + "resolution": "resolved", + "slice_id": "9f34c5da9b09fba99df6f6b1bde183a9aeb45111b8218a747c71590c2c9f60f2", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.step" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "c44bfbc66cf747283f30088da3e011a10395031d41e77b74e523c24997f641ca" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceRecordWriter:\n def __init__(self, transport: TraceTransport) -> None:\n self._logger = logging.getLogger(__name__)\n self._transport = transport\n\n def write_context(self, record: TraceContextRecord) -> None:\n try:\n self._transport.write_context(record)\n except Exception:\n self._logger.exception(\"Trace transport failed to write context %s\", record.trace_id)\n\n def write_message(self, record: TraceLogMessage) -> None:\n try:\n self._transport.write_message(record)\n except Exception:\n self._logger.exception(\"Trace transport failed to write message for %s\", record.trace_id)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/tracing/service.py:TraceRecordWriter", + "span_start": 21, + "span_end": 36, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceService(TraceContextFactory):\n def __init__(self, transport: TraceTransport | None = None, store: TraceContextStore | None = None) -> None:\n self.transport = transport or NoOpTraceTransport()\n self.store = store or TraceContextStore()\n self._writer = TraceRecordWriter(self.transport)\n\n def create_context(\n self,\n *,\n alias: str,\n parent_id: str | None = None,\n kind: str | None = None,\n attrs: dict[str, Any] | None = None,\n ) -> str:\n record = TraceContextRecord(\n trace_id=uuid4().hex,\n alias=str(alias or \"\"),\n parent_id=parent_id,\n type=kind,\n event_time=utc_now(),\n attrs=dict(attrs or {}),\n )\n self.store.push(record)\n self._writer.write_context(record)\n return record.trace_id\n\n @contextmanager\n def open_context(\n self,\n *,\n alias: str,\n parent_id: str | None = None,\n kind: str | None = None,\n attrs: dict[str, Any] | None = None,\n ) -> Iterator[str]:\n trace_id = self.create_context(alias=alias, parent_id=parent_id, kind=kind, attrs=attrs)\n try:\n yield trace_id\n finally:\n self.store.pop()\n\n def current_trace_id(self) -> str | None:\n return self.store.current_trace_id()\n\n def close_context(self) -> str | None:\n previous = self.store.pop()\n return previous.record.trace_id if previous else None\n\n def step(self, name: str) -> None:\n self.store.set_step(str(name or \"\"))\n\n def info(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"INFO\", message, status, attrs)\n\n def debug(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"DEBUG\", message, status, attrs)\n\n def warning(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"WARNING\", message, status, attrs)\n\n def error(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"ERROR\", message, status, attrs)\n\n def exception(self, message: str, *, status: str = \"failed\", attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"ERROR\", message, status, attrs)\n\n def new_root(self, operation: str) -> TraceContext:\n trace_id = self.create_context(alias=operation, kind=\"operation\", attrs={\"operation\": operation})\n return TraceContext(trace_id=trace_id, span_id=trace_id, attributes={\"operation\": operation})\n\n def child_of(self, parent: TraceContext, operation: str) -> TraceContext:\n trace_id = self.create_context(\n alias=operation,\n parent_id=parent.trace_id,\n kind=\"worker\",\n attrs={\"operation\": operation},\n )\n return TraceContext(\n trace_id=trace_id,\n span_id=trace_id,\n parent_span_id=parent.span_id,\n attributes={\"operation\": operation},\n )\n\n def attach(self, metadata: dict[str, object], context: TraceContext) -> dict[str, object]:\n updated = dict(metadata)\n updated[\"trace_id\"] = context.trace_id\n updated[\"span_id\"] = context.span_id\n updated[\"parent_span_id\"] = context.parent_span_id\n return updated\n\n def resume(self, metadata: dict[str, object], operation: str) -> TraceContext:\n trace_id = str(metadata.get(\"trace_id\") or uuid4().hex)\n span_id = str(metadata.get(\"span_id\") or trace_id)\n parent_id = metadata.get(\"parent_span_id\")\n self.create_context(\n alias=operation,\n parent_id=str(parent_id) if parent_id else None,\n kind=\"worker\",\n attrs=dict(metadata),\n )\n return TraceContext(\n trace_id=trace_id,\n span_id=span_id,\n parent_span_id=str(parent_id) if parent_id else None,\n attributes={\"operation\": operation},\n )\n\n def _write_message(\n self,\n level: TraceLevel,\n message: str,\n status: str | None,\n attrs: dict[str, Any] | None,\n ) -> None:\n active = self.store.current()\n if active is None:\n raise RuntimeError(\"Trace context is not bound. Call create_context() first.\")\n record = TraceLogMessage(\n trace_id=active.record.trace_id,\n step=active.step,\n status=str(status or \"\"),\n message=str(message or \"\"),\n level=level,\n event_time=utc_now(),\n attrs=dict(attrs or {}),\n )\n self._writer.write_message(record)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/tracing/service.py:TraceService", + "span_start": 39, + "span_end": 166, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceManager(TraceService):\n \"\"\"Compatibility alias during the transition from ConfigManager-shaped naming.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/tracing/service.py:TraceManager", + "span_start": 169, + "span_end": 170, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 2, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "TraceService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "TraceService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "TraceService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "TraceService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "TraceService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "TraceService", + "alternatives": [ + "TraceService" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 155, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 48, + "C0_SOURCE_CHUNKS": 25, + "C4_SEMANTIC_ROLES": 18, + "C2_DEPENDENCY_GRAPH": 50, + "C3_ENTRYPOINTS": 13 + }, + "merge_rank": 20 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Как работает TraceService?", + "rag_count": 14 + }, + "output": { + "llm_answer": "## Объяснение работы `TraceService`\n\n### Назначение\n`TraceService` — это сервис, предназначенный для управления контекстом трассировки и записи событий трассировки в транспортный механизм (`TraceTransport`). Он отвечает за создание новых трассировочных записей, их хранение и отправку в транспорт.\n\n### Ключевые зависимости\n- **TraceTransport**: отвечает за передачу трассировочной информации от приложения к внешнему хранилищу или системе сбора логов.\n- **TraceContextStore**: используется для временного хранения трассировочных записей до их передачи через транспорт.\n- **NoOpTraceTransport**: используется по умолчанию, если не передан другой транспорт. Этот транспорт просто игнорирует все сообщения без реальной отправки.\n\n### Поток данных или вызовов\n1. При инициализации сервиса (`TraceService.__init__`) создается объект записи контекста трассировки (`TraceRecordWriter`), который использует переданный транспорт для записи сообщений и контекстов.\n \n ```python\n def __init__(self, transport: TraceTransport | None = None, store: TraceContextStore | None = None):\n ...\n self._writer = TraceRecordWriter(self.transport)\n ```\n\n2. Метод `create_context` создает новую трассировочную запись с заданными атрибутами и помещает её в хранилище (`store.push()`), затем записывает её в транспорт через метод `_writer.write_context()`.\n \n ```python\n def create_context(\n self,\n *,\n alias: str,\n parent_id: str | None = None,\n kind: str | None = None,\n attrs: dict[str, Any] | None = None,\n ) -> str:\n ...\n self._writer.write_context(record)\n ```\n\n3. Метод `open_context` обеспечивает контекстно-зависимую область видимости при создании новой трассировочной записи внутри блока контекста.\n \n ```python\n with TraceService.open_context(...) as trace_id:\n # действия в области видимости\n ```\n\n### Важные детали реализации\n- **Транспорт трассировки** (`TraceTransport`): любой класс, реализующий интерфейс `write_context` и `write_message`, может быть использован в качестве транспорта. По умолчанию используется `NoOpTraceTransport`, который ничего не делает.\n \n ```python\n class NoOpTraceTransport:\n def write_context(self, record: TraceContextRecord) -> None:\n pass\n ```\n\n- **Запись контекста и сообщений**:\n - Контекстная запись (`record`) сохраняется в локальном хранилище (`TraceContextStore`) и передается в транспорт с помощью метода `_writer.write_context()`.\n - Сообщения трассировки (`TraceLogMessage`) также могут быть записаны в транспорт аналогично контекстным записям.\n\n### Осторожные выводы\n- Хотя конкретный транспорт трассировки не указан явно в предоставленном фрагменте кода, предполагается, что он подключается извне и предоставляет необходимые методы для записи контекста и сообщений.\n- Детали внутреннего устройства транспортного механизма не раскрыты напрямую в представленной информации, но можно предположить, что он должен поддерживать интерфейсы, описанные в классе `TraceTransport`." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 931, + "evidence_rows": 14, + "evidence_chars": 6323 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 1 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 3, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_explain_ru_v1", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 4555 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_114552/full_chain_plba_code_retrieval_plba-fullchain-explain-trace-service.md b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_114552/full_chain_plba_code_retrieval_plba-fullchain-explain-trace-service.md new file mode 100644 index 0000000..64d005e --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_114552/full_chain_plba_code_retrieval_plba-fullchain-explain-trace-service.md @@ -0,0 +1,34 @@ +# plba-fullchain-explain-trace-service + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_retrieval.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Как работает TraceService? + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 14, + "llm_answer": "## Объяснение работы `TraceService`\n\n### Назначение\n`TraceService` — это сервис, предназначенный для управления контекстом трассировки и записи событий трассировки в транспортный механизм (`TraceTransport`). Он отвечает за создание новых трассировочных записей, их хранение и отправку в транспорт.\n\n### Ключевые зависимости\n- **TraceTransport**: отвечает за передачу трассировочной информации от приложения к внешнему хранилищу или системе сбора логов.\n- **TraceContextStore**: используется для временного хранения трассировочных записей до их передачи через транспорт.\n- **NoOpTraceTransport**: используется по умолчанию, если не передан другой транспорт. Этот транспорт просто игнорирует все сообщения без реальной отправки.\n\n### Поток данных или вызовов\n1. При инициализации сервиса (`TraceService.__init__`) создается объект записи контекста трассировки (`TraceRecordWriter`), который использует переданный транспорт для записи сообщений и контекстов.\n \n ```python\n def __init__(self, transport: TraceTransport | None = None, store: TraceContextStore | None = None):\n ...\n self._writer = TraceRecordWriter(self.transport)\n ```\n\n2. Метод `create_context` создает новую трассировочную запись с заданными атрибутами и помещает её в хранилище (`store.push()`), затем записывает её в транспорт через метод `_writer.write_context()`.\n \n ```python\n def create_context(\n self,\n *,\n alias: str,\n parent_id: str | None = None,\n kind: str | None = None,\n attrs: dict[str, Any] | None = None,\n ) -> str:\n ...\n self._writer.write_context(record)\n ```\n\n3. Метод `open_context` обеспечивает контекстно-зависимую область видимости при создании новой трассировочной записи внутри блока контекста.\n \n ```python\n with TraceService.open_context(...) as trace_id:\n # действия в области видимости\n ```\n\n### Важные детали реализации\n- **Транспорт трассировки** (`TraceTransport`): любой класс, реализующий интерфейс `write_context` и `write_message`, может быть использован в качестве транспорта. По умолчанию используется `NoOpTraceTransport`, который ничего не делает.\n \n ```python\n class NoOpTraceTransport:\n def write_context(self, record: TraceContextRecord) -> None:\n pass\n ```\n\n- **Запись контекста и сообщений**:\n - Контекстная запись (`record`) сохраняется в локальном хранилище (`TraceContextStore`) и передается в транспорт с помощью метода `_writer.write_context()`.\n - Сообщения трассировки (`TraceLogMessage`) также могут быть записаны в транспорт аналогично контекстным записям.\n\n### Осторожные выводы\n- Хотя конкретный транспорт трассировки не указан явно в предоставленном фрагменте кода, предполагается, что он подключается извне и предоставляет необходимые методы для записи контекста и сообщений.\n- Детали внутреннего устройства транспортного механизма не раскрыты напрямую в представленной информации, но можно предположить, что он должен поддерживать интерфейсы, описанные в классе `TraceTransport`.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "TraceService" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_114552/full_chain_plba_code_retrieval_plba-fullchain-explain-workflow-engine.json b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_114552/full_chain_plba_code_retrieval_plba-fullchain-explain-workflow-engine.json new file mode 100644 index 0000000..e1cc761 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_114552/full_chain_plba_code_retrieval_plba-fullchain-explain-workflow-engine.json @@ -0,0 +1,2158 @@ +{ + "case_id": "plba-fullchain-explain-workflow-engine", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_retrieval.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 13, + "llm_answer": "## Назначение класса `WorkflowEngine`\nКласс `WorkflowEngine` является ключевым компонентом системы управления рабочими процессами (`workflow engine`) и отвечает за выполнение рабочего процесса по определённому шаблону (`workflow definition`), обеспечивая управление состоянием контекста выполнения и логику перехода между узлами (`nodes`) рабочего процесса.\n\n## Ключевые зависимости\nКлючевыми зависимостями являются:\n- **`workflow`**: определение рабочего процесса, представляющее собой набор узлов и связей между ними.\n- **`persistence`**: механизм сохранения состояния текущего выполнения рабочего процесса.\n- **`traces`**: объект для ведения трассировки событий и состояний рабочих процессов.\n- **`hooks`**: дополнительные пользовательские обработчики событий и действий, расширяющие функционал класса.\n\n## Поток данных или вызовов\n1. При инициализации объекта класса (`WorkflowEngine.__init__()`):\n - Инициализируются внутренние атрибуты (`_workflow`, `_persistence`, `_transition_resolver`, `_traces`, `_hooks`, `_logger`).\n - Вызывается метод `_transition_resolver`, который используется для разрешения переходов между узлами рабочего процесса.\n \n2. Метод `run(context)` выполняет основную логику работы `WorkflowEngine`:\n - Начинается новый рабочий процесс с использованием механизма сохранения состояния (`persistence.start_run()`) и регистрации начального состояния выполнения.\n - Обновляется контекст выполнения рабочего процесса путём установки идентификатора текущего узла и общей информации о состоянии выполнения.\n - В логах регистрируется старт нового рабочего процесса.\n - Основной цикл выполнения рабочего процесса заключается в последовательном вызове методов для каждого узла рабочего процесса до тех пор, пока текущий узел не станет равным `None`.\n\n## Важные детали реализации\n### 1. Инициализация классов и объектов\n- Класс `TransitionResolver` используется для обеспечения корректного перехода от одного узла к другому в рабочем процессе.\n- Механизм трассировки (`traces`) позволяет вести подробное журналирование всех этапов выполнения рабочего процесса.\n \n### 2. Методы и функции\n- Метод `run(context)` инициирует выполнение цикла основного рабочего процесса.\n- Внутренний цикл использует переменную `current_name` для отслеживания текущего узла рабочего процесса и метода `node` для получения текущей задачи (`node`).\n\n### Осторожные выводы\nНекоторые аспекты, такие как конкретные механизмы работы механизмов трассировки (`traces`) и взаимодействия с механизмом хранения состояния (`persistence`), остаются неясными без дополнительного анализа соответствующих частей кода. Однако основной поток данных и логика явно изложены и понятны на основе доступных фрагментов кода.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "WorkflowEngine" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-fullchain-explain-workflow-engine", + "text": "Объясни класс WorkflowEngine", + "mode": "full_chain", + "run_started_at": "2026-03-12T11:45:52", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни класс WorkflowEngine", + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "WorkflowEngine", + "alternatives": [ + "WorkflowEngine", + "WorkflowEngineHooks" + ], + "confidence": 0.99 + }, + "rag_count": 13, + "rag_rows": [ + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "class WorkflowEngine\nWorkflowEngine", + "layer": "C1_SYMBOL_CATALOG", + "title": "WorkflowEngine", + "span_start": 10, + "span_end": 86, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "57ec0a9f11c542c78e008684a888397e8d9ef4223671acb2567e631a0cbc70b4", + "qname": "WorkflowEngine", + "kind": "class", + "signature": "WorkflowEngine", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.workflow.engine.workflow_engine", + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/hooks.py", + "content": "class WorkflowEngineHooks\nWorkflowEngineHooks", + "layer": "C1_SYMBOL_CATALOG", + "title": "WorkflowEngineHooks", + "span_start": 6, + "span_end": 14, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "914123ed510540061e116100fc87bba4195595ba696f8bfde2fd77ac6a5cd7e4", + "qname": "WorkflowEngineHooks", + "kind": "class", + "signature": "WorkflowEngineHooks", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.workflow.engine.hooks", + "is_test": false, + "blob_sha": "4b11672b0a9af1ae04bfce9d8e1f96572997d3e65e68108d7c797b88fa5fa47a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowEngine", + "span_start": 10, + "span_end": 86, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "57ec0a9f11c542c78e008684a888397e8d9ef4223671acb2567e631a0cbc70b4", + "symbol_name": "WorkflowEngine", + "qname": "WorkflowEngine", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine.__init__\n -> WorkflowEngine._transition_resolver\n -> WorkflowEngine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowEngine.__init__:dataflow_slice", + "span_start": 14, + "span_end": 63, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3abf07e5c245e0fe59785ba2d569c2ee56018715fc7f625a044ddaf6201f903d", + "edge_type": "dataflow_slice", + "src_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "src_qname": "WorkflowEngine.__init__", + "dst_symbol_id": "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8", + "dst_ref": "WorkflowEngine.run", + "resolution": "resolved", + "slice_id": "3abf07e5c245e0fe59785ba2d569c2ee56018715fc7f625a044ddaf6201f903d", + "root_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "path_symbols": [ + "WorkflowEngine.__init__", + "WorkflowEngine._transition_resolver", + "WorkflowEngine.run" + ], + "path_symbol_ids": [ + "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine.__init__\n -> WorkflowEngine._hooks\n -> WorkflowEngine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowEngine.__init__:dataflow_slice", + "span_start": 16, + "span_end": 34, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d73db644b69c1eb35afd6eae9d6ac8674e49e30e9bcf9c020f9fdbfe754851b2", + "edge_type": "dataflow_slice", + "src_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "src_qname": "WorkflowEngine.__init__", + "dst_symbol_id": "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8", + "dst_ref": "WorkflowEngine.run", + "resolution": "resolved", + "slice_id": "d73db644b69c1eb35afd6eae9d6ac8674e49e30e9bcf9c020f9fdbfe754851b2", + "root_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "path_symbols": [ + "WorkflowEngine.__init__", + "WorkflowEngine._hooks", + "WorkflowEngine.run" + ], + "path_symbol_ids": [ + "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine.__init__\n -> WorkflowEngine._workflow\n -> WorkflowEngine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowEngine.__init__:dataflow_slice", + "span_start": 12, + "span_end": 29, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "b45ef3c54669b4910a8aed3a565804f275424a24007bc7e3c953389521f80249", + "edge_type": "dataflow_slice", + "src_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "src_qname": "WorkflowEngine.__init__", + "dst_symbol_id": "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8", + "dst_ref": "WorkflowEngine.run", + "resolution": "resolved", + "slice_id": "b45ef3c54669b4910a8aed3a565804f275424a24007bc7e3c953389521f80249", + "root_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "path_symbols": [ + "WorkflowEngine.__init__", + "WorkflowEngine._workflow", + "WorkflowEngine.run" + ], + "path_symbol_ids": [ + "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine.__init__\n -> WorkflowEngine._persistence\n -> WorkflowEngine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowEngine.__init__:dataflow_slice", + "span_start": 13, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "8101338770016324ce05d61daa9935a444c75e6c94a0fae4275d5b50fcbcc70b", + "edge_type": "dataflow_slice", + "src_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "src_qname": "WorkflowEngine.__init__", + "dst_symbol_id": "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8", + "dst_ref": "WorkflowEngine.run", + "resolution": "resolved", + "slice_id": "8101338770016324ce05d61daa9935a444c75e6c94a0fae4275d5b50fcbcc70b", + "root_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "path_symbols": [ + "WorkflowEngine.__init__", + "WorkflowEngine._persistence", + "WorkflowEngine.run" + ], + "path_symbol_ids": [ + "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine.__init__\n -> WorkflowEngine._traces\n -> WorkflowEngine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowEngine.__init__:dataflow_slice", + "span_start": 15, + "span_end": 27, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "5006266616d534d721648391565e2ac0c9e7e9d9f8df00c17fba8989afb533a5", + "edge_type": "dataflow_slice", + "src_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "src_qname": "WorkflowEngine.__init__", + "dst_symbol_id": "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8", + "dst_ref": "WorkflowEngine.run", + "resolution": "resolved", + "slice_id": "5006266616d534d721648391565e2ac0c9e7e9d9f8df00c17fba8989afb533a5", + "root_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "path_symbols": [ + "WorkflowEngine.__init__", + "WorkflowEngine._traces", + "WorkflowEngine.run" + ], + "path_symbol_ids": [ + "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine.__init__\n -> WorkflowEngine._logger\n -> WorkflowEngine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowEngine.__init__:dataflow_slice", + "span_start": 17, + "span_end": 85, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "2f9927abb24794adb056b94bfb5d8538a5cbafb160da2079f52fca97fd694a2b", + "edge_type": "dataflow_slice", + "src_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "src_qname": "WorkflowEngine.__init__", + "dst_symbol_id": "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8", + "dst_ref": "WorkflowEngine.run", + "resolution": "resolved", + "slice_id": "2f9927abb24794adb056b94bfb5d8538a5cbafb160da2079f52fca97fd694a2b", + "root_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "path_symbols": [ + "WorkflowEngine.__init__", + "WorkflowEngine._logger", + "WorkflowEngine.run" + ], + "path_symbol_ids": [ + "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "class WorkflowEngine:\n def __init__(self, workflow, persistence, *, traces, hooks: WorkflowEngineHooks | None = None) -> None:\n self._workflow = workflow\n self._persistence = persistence\n self._transition_resolver = TransitionResolver()\n self._traces = traces\n self._hooks = hooks or WorkflowEngineHooks()\n self._logger = logging.getLogger(__name__)\n\n def run(self, context: WorkflowContext) -> dict[str, object]:\n run_id = self._persistence.start_run(\n self._workflow.definition.name,\n self._workflow.definition.start_at,\n context.snapshot(),\n )\n context.state.setdefault(\"runtime\", {})\n context.state[\"runtime\"][\"workflow_run_id\"] = run_id\n self._traces.step(\"workflow\")\n self._traces.info(\"Workflow started.\", status=\"started\", attrs={\"workflow_run_id\": run_id})\n current_name = self._workflow.definition.start_at\n while current_name is not None:\n node = self._workflow.definition.nodes[current_name]\n context.state[\"runtime\"][\"current_node\"] = current_name\n self._logger.info(\"Workflow run %s: step '%s' started.\", run_id, current_name)\n self._hooks.on_step_started(context, current_name)\n self._persistence.start_step(run_id, current_name, context.snapshot())\n self._traces.step(current_name)\n self._traces.debug(\n f\"Step '{current_name}' started.\",\n status=\"started\",\n attrs={\"workflow_run_id\": run_id, \"node\": current_name},\n )\n try:\n result = node.step.run(context)\n except Exception as error:\n self._persistence.fail_step(run_id, current_name, context.snapshot(), error)\n self._persistence.fail_run(run_id, context.snapshot())\n self._traces.error(\n f\"Step '{current_name}' failed: {error}\",\n status=\"failed\",\n attrs={\"exception_type\": type(error).__name__},\n )\n self._logger.exception(\"Workflow run %s: step '%s' failed.\", run_id, current_name)\n self._hooks.on_step_failed(context, current_name)\n raise\n context.state.update(result.updates)\n self._persistence.complete_step(\n run_id,\n current_name,\n result.status,\n result.transition,\n context.snapshot(),\n )\n next_node = self._transition_resolver.resolve(node, result)\n self._traces.debug(\n f\"Step '{current_name}' completed with transition '{result.transition}'.\",\n status=result.status,\n attrs={\n \"workflow_run_id\": run_id,\n \"from_node\": current_name,\n \"transition\": result.transition,\n \"to_node\": next_node,\n },\n )\n self._logger.info(\n \"Workflow run %s: step '%s' completed with transition '%s'.\",\n run_id,\n current_name,\n result.transition,\n )\n self._hooks.on_step_finished(context, current_name)\n current_name = next_node\n self._persistence.complete_run(run_id, context.snapshot())\n self._traces.step(\"workflow\")\n self._traces.info(\"Workflow completed.\", status=\"completed\", attrs={\"workflow_run_id\": run_id})\n self._logger.info(\"Workflow run %s completed.\", run_id)\n return {\"run_id\": run_id, \"status\": \"completed\", \"context\": context.snapshot()}", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/workflow/engine/workflow_engine.py:WorkflowEngine", + "span_start": 10, + "span_end": 86, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.workflow.engine.workflow_engine", + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "## Назначение класса `WorkflowEngine`\nКласс `WorkflowEngine` является ключевым компонентом системы управления рабочими процессами (`workflow engine`) и отвечает за выполнение рабочего процесса по определённому шаблону (`workflow definition`), обеспечивая управление состоянием контекста выполнения и логику перехода между узлами (`nodes`) рабочего процесса.\n\n## Ключевые зависимости\nКлючевыми зависимостями являются:\n- **`workflow`**: определение рабочего процесса, представляющее собой набор узлов и связей между ними.\n- **`persistence`**: механизм сохранения состояния текущего выполнения рабочего процесса.\n- **`traces`**: объект для ведения трассировки событий и состояний рабочих процессов.\n- **`hooks`**: дополнительные пользовательские обработчики событий и действий, расширяющие функционал класса.\n\n## Поток данных или вызовов\n1. При инициализации объекта класса (`WorkflowEngine.__init__()`):\n - Инициализируются внутренние атрибуты (`_workflow`, `_persistence`, `_transition_resolver`, `_traces`, `_hooks`, `_logger`).\n - Вызывается метод `_transition_resolver`, который используется для разрешения переходов между узлами рабочего процесса.\n \n2. Метод `run(context)` выполняет основную логику работы `WorkflowEngine`:\n - Начинается новый рабочий процесс с использованием механизма сохранения состояния (`persistence.start_run()`) и регистрации начального состояния выполнения.\n - Обновляется контекст выполнения рабочего процесса путём установки идентификатора текущего узла и общей информации о состоянии выполнения.\n - В логах регистрируется старт нового рабочего процесса.\n - Основной цикл выполнения рабочего процесса заключается в последовательном вызове методов для каждого узла рабочего процесса до тех пор, пока текущий узел не станет равным `None`.\n\n## Важные детали реализации\n### 1. Инициализация классов и объектов\n- Класс `TransitionResolver` используется для обеспечения корректного перехода от одного узла к другому в рабочем процессе.\n- Механизм трассировки (`traces`) позволяет вести подробное журналирование всех этапов выполнения рабочего процесса.\n \n### 2. Методы и функции\n- Метод `run(context)` инициирует выполнение цикла основного рабочего процесса.\n- Внутренний цикл использует переменную `current_name` для отслеживания текущего узла рабочего процесса и метода `node` для получения текущей задачи (`node`).\n\n### Осторожные выводы\nНекоторые аспекты, такие как конкретные механизмы работы механизмов трассировки (`traces`) и взаимодействия с механизмом хранения состояния (`persistence`), остаются неясными без дополнительного анализа соответствующих частей кода. Однако основной поток данных и логика явно изложены и понятны на основе доступных фрагментов кода.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS", + "C4_SEMANTIC_ROLES" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "WorkflowEngine" + ], + "keyword_hints": [ + "WorkflowEngine" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "WorkflowEngine", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "WorkflowEngine", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "WorkflowEngine", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "WorkflowEngine", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "WorkflowEngine", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 2, + "candidates_after_filter": 2 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "WorkflowEngine", + "alternatives": [ + "WorkflowEngine", + "WorkflowEngineHooks" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 2, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 125, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 35, + "C0_SOURCE_CHUNKS": 15, + "C4_SEMANTIC_ROLES": 16, + "C2_DEPENDENCY_GRAPH": 47, + "C3_ENTRYPOINTS": 11 + }, + "merge_rank": 27, + "prompt_build": 0, + "llm_call": 3756 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 780, + "evidence_rows": 13, + "evidence_chars": 4423 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 2, + "unique_paths": 2 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 1 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_explain_ru_v1", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "WorkflowEngine" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 13, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-fullchain-explain-workflow-engine", + "mode": "full_chain", + "run_started_at": "2026-03-12T11:45:52", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Объясни класс WorkflowEngine", + "normalized_query": "Объясни класс WorkflowEngine" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Объясни класс WorkflowEngine" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни класс WorkflowEngine" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "WorkflowEngine" + ], + "keyword_hints": [ + "WorkflowEngine" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Объясни класс WorkflowEngine" + }, + "output": { + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "WorkflowEngine", + "alternatives": [ + "WorkflowEngine", + "WorkflowEngineHooks" + ], + "confidence": 0.99 + }, + "rag_count": 13, + "rag_rows": [ + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "class WorkflowEngine\nWorkflowEngine", + "layer": "C1_SYMBOL_CATALOG", + "title": "WorkflowEngine", + "span_start": 10, + "span_end": 86, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "57ec0a9f11c542c78e008684a888397e8d9ef4223671acb2567e631a0cbc70b4", + "qname": "WorkflowEngine", + "kind": "class", + "signature": "WorkflowEngine", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.workflow.engine.workflow_engine", + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/hooks.py", + "content": "class WorkflowEngineHooks\nWorkflowEngineHooks", + "layer": "C1_SYMBOL_CATALOG", + "title": "WorkflowEngineHooks", + "span_start": 6, + "span_end": 14, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "914123ed510540061e116100fc87bba4195595ba696f8bfde2fd77ac6a5cd7e4", + "qname": "WorkflowEngineHooks", + "kind": "class", + "signature": "WorkflowEngineHooks", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.workflow.engine.hooks", + "is_test": false, + "blob_sha": "4b11672b0a9af1ae04bfce9d8e1f96572997d3e65e68108d7c797b88fa5fa47a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowEngine", + "span_start": 10, + "span_end": 86, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "57ec0a9f11c542c78e008684a888397e8d9ef4223671acb2567e631a0cbc70b4", + "symbol_name": "WorkflowEngine", + "qname": "WorkflowEngine", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine.__init__\n -> WorkflowEngine._transition_resolver\n -> WorkflowEngine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowEngine.__init__:dataflow_slice", + "span_start": 14, + "span_end": 63, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3abf07e5c245e0fe59785ba2d569c2ee56018715fc7f625a044ddaf6201f903d", + "edge_type": "dataflow_slice", + "src_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "src_qname": "WorkflowEngine.__init__", + "dst_symbol_id": "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8", + "dst_ref": "WorkflowEngine.run", + "resolution": "resolved", + "slice_id": "3abf07e5c245e0fe59785ba2d569c2ee56018715fc7f625a044ddaf6201f903d", + "root_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "path_symbols": [ + "WorkflowEngine.__init__", + "WorkflowEngine._transition_resolver", + "WorkflowEngine.run" + ], + "path_symbol_ids": [ + "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine.__init__\n -> WorkflowEngine._hooks\n -> WorkflowEngine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowEngine.__init__:dataflow_slice", + "span_start": 16, + "span_end": 34, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d73db644b69c1eb35afd6eae9d6ac8674e49e30e9bcf9c020f9fdbfe754851b2", + "edge_type": "dataflow_slice", + "src_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "src_qname": "WorkflowEngine.__init__", + "dst_symbol_id": "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8", + "dst_ref": "WorkflowEngine.run", + "resolution": "resolved", + "slice_id": "d73db644b69c1eb35afd6eae9d6ac8674e49e30e9bcf9c020f9fdbfe754851b2", + "root_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "path_symbols": [ + "WorkflowEngine.__init__", + "WorkflowEngine._hooks", + "WorkflowEngine.run" + ], + "path_symbol_ids": [ + "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine.__init__\n -> WorkflowEngine._workflow\n -> WorkflowEngine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowEngine.__init__:dataflow_slice", + "span_start": 12, + "span_end": 29, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "b45ef3c54669b4910a8aed3a565804f275424a24007bc7e3c953389521f80249", + "edge_type": "dataflow_slice", + "src_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "src_qname": "WorkflowEngine.__init__", + "dst_symbol_id": "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8", + "dst_ref": "WorkflowEngine.run", + "resolution": "resolved", + "slice_id": "b45ef3c54669b4910a8aed3a565804f275424a24007bc7e3c953389521f80249", + "root_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "path_symbols": [ + "WorkflowEngine.__init__", + "WorkflowEngine._workflow", + "WorkflowEngine.run" + ], + "path_symbol_ids": [ + "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine.__init__\n -> WorkflowEngine._persistence\n -> WorkflowEngine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowEngine.__init__:dataflow_slice", + "span_start": 13, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "8101338770016324ce05d61daa9935a444c75e6c94a0fae4275d5b50fcbcc70b", + "edge_type": "dataflow_slice", + "src_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "src_qname": "WorkflowEngine.__init__", + "dst_symbol_id": "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8", + "dst_ref": "WorkflowEngine.run", + "resolution": "resolved", + "slice_id": "8101338770016324ce05d61daa9935a444c75e6c94a0fae4275d5b50fcbcc70b", + "root_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "path_symbols": [ + "WorkflowEngine.__init__", + "WorkflowEngine._persistence", + "WorkflowEngine.run" + ], + "path_symbol_ids": [ + "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine.__init__\n -> WorkflowEngine._traces\n -> WorkflowEngine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowEngine.__init__:dataflow_slice", + "span_start": 15, + "span_end": 27, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "5006266616d534d721648391565e2ac0c9e7e9d9f8df00c17fba8989afb533a5", + "edge_type": "dataflow_slice", + "src_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "src_qname": "WorkflowEngine.__init__", + "dst_symbol_id": "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8", + "dst_ref": "WorkflowEngine.run", + "resolution": "resolved", + "slice_id": "5006266616d534d721648391565e2ac0c9e7e9d9f8df00c17fba8989afb533a5", + "root_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "path_symbols": [ + "WorkflowEngine.__init__", + "WorkflowEngine._traces", + "WorkflowEngine.run" + ], + "path_symbol_ids": [ + "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine.__init__\n -> WorkflowEngine._logger\n -> WorkflowEngine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowEngine.__init__:dataflow_slice", + "span_start": 17, + "span_end": 85, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "2f9927abb24794adb056b94bfb5d8538a5cbafb160da2079f52fca97fd694a2b", + "edge_type": "dataflow_slice", + "src_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "src_qname": "WorkflowEngine.__init__", + "dst_symbol_id": "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8", + "dst_ref": "WorkflowEngine.run", + "resolution": "resolved", + "slice_id": "2f9927abb24794adb056b94bfb5d8538a5cbafb160da2079f52fca97fd694a2b", + "root_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "path_symbols": [ + "WorkflowEngine.__init__", + "WorkflowEngine._logger", + "WorkflowEngine.run" + ], + "path_symbol_ids": [ + "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "class WorkflowEngine:\n def __init__(self, workflow, persistence, *, traces, hooks: WorkflowEngineHooks | None = None) -> None:\n self._workflow = workflow\n self._persistence = persistence\n self._transition_resolver = TransitionResolver()\n self._traces = traces\n self._hooks = hooks or WorkflowEngineHooks()\n self._logger = logging.getLogger(__name__)\n\n def run(self, context: WorkflowContext) -> dict[str, object]:\n run_id = self._persistence.start_run(\n self._workflow.definition.name,\n self._workflow.definition.start_at,\n context.snapshot(),\n )\n context.state.setdefault(\"runtime\", {})\n context.state[\"runtime\"][\"workflow_run_id\"] = run_id\n self._traces.step(\"workflow\")\n self._traces.info(\"Workflow started.\", status=\"started\", attrs={\"workflow_run_id\": run_id})\n current_name = self._workflow.definition.start_at\n while current_name is not None:\n node = self._workflow.definition.nodes[current_name]\n context.state[\"runtime\"][\"current_node\"] = current_name\n self._logger.info(\"Workflow run %s: step '%s' started.\", run_id, current_name)\n self._hooks.on_step_started(context, current_name)\n self._persistence.start_step(run_id, current_name, context.snapshot())\n self._traces.step(current_name)\n self._traces.debug(\n f\"Step '{current_name}' started.\",\n status=\"started\",\n attrs={\"workflow_run_id\": run_id, \"node\": current_name},\n )\n try:\n result = node.step.run(context)\n except Exception as error:\n self._persistence.fail_step(run_id, current_name, context.snapshot(), error)\n self._persistence.fail_run(run_id, context.snapshot())\n self._traces.error(\n f\"Step '{current_name}' failed: {error}\",\n status=\"failed\",\n attrs={\"exception_type\": type(error).__name__},\n )\n self._logger.exception(\"Workflow run %s: step '%s' failed.\", run_id, current_name)\n self._hooks.on_step_failed(context, current_name)\n raise\n context.state.update(result.updates)\n self._persistence.complete_step(\n run_id,\n current_name,\n result.status,\n result.transition,\n context.snapshot(),\n )\n next_node = self._transition_resolver.resolve(node, result)\n self._traces.debug(\n f\"Step '{current_name}' completed with transition '{result.transition}'.\",\n status=result.status,\n attrs={\n \"workflow_run_id\": run_id,\n \"from_node\": current_name,\n \"transition\": result.transition,\n \"to_node\": next_node,\n },\n )\n self._logger.info(\n \"Workflow run %s: step '%s' completed with transition '%s'.\",\n run_id,\n current_name,\n result.transition,\n )\n self._hooks.on_step_finished(context, current_name)\n current_name = next_node\n self._persistence.complete_run(run_id, context.snapshot())\n self._traces.step(\"workflow\")\n self._traces.info(\"Workflow completed.\", status=\"completed\", attrs={\"workflow_run_id\": run_id})\n self._logger.info(\"Workflow run %s completed.\", run_id)\n return {\"run_id\": run_id, \"status\": \"completed\", \"context\": context.snapshot()}", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/workflow/engine/workflow_engine.py:WorkflowEngine", + "span_start": 10, + "span_end": 86, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.workflow.engine.workflow_engine", + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "WorkflowEngine", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "WorkflowEngine", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "WorkflowEngine", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "WorkflowEngine", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "WorkflowEngine", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 2, + "candidates_after_filter": 2 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "WorkflowEngine", + "alternatives": [ + "WorkflowEngine", + "WorkflowEngineHooks" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 2, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 125, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 35, + "C0_SOURCE_CHUNKS": 15, + "C4_SEMANTIC_ROLES": 16, + "C2_DEPENDENCY_GRAPH": 47, + "C3_ENTRYPOINTS": 11 + }, + "merge_rank": 27 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Объясни класс WorkflowEngine", + "rag_count": 13 + }, + "output": { + "llm_answer": "## Назначение класса `WorkflowEngine`\nКласс `WorkflowEngine` является ключевым компонентом системы управления рабочими процессами (`workflow engine`) и отвечает за выполнение рабочего процесса по определённому шаблону (`workflow definition`), обеспечивая управление состоянием контекста выполнения и логику перехода между узлами (`nodes`) рабочего процесса.\n\n## Ключевые зависимости\nКлючевыми зависимостями являются:\n- **`workflow`**: определение рабочего процесса, представляющее собой набор узлов и связей между ними.\n- **`persistence`**: механизм сохранения состояния текущего выполнения рабочего процесса.\n- **`traces`**: объект для ведения трассировки событий и состояний рабочих процессов.\n- **`hooks`**: дополнительные пользовательские обработчики событий и действий, расширяющие функционал класса.\n\n## Поток данных или вызовов\n1. При инициализации объекта класса (`WorkflowEngine.__init__()`):\n - Инициализируются внутренние атрибуты (`_workflow`, `_persistence`, `_transition_resolver`, `_traces`, `_hooks`, `_logger`).\n - Вызывается метод `_transition_resolver`, который используется для разрешения переходов между узлами рабочего процесса.\n \n2. Метод `run(context)` выполняет основную логику работы `WorkflowEngine`:\n - Начинается новый рабочий процесс с использованием механизма сохранения состояния (`persistence.start_run()`) и регистрации начального состояния выполнения.\n - Обновляется контекст выполнения рабочего процесса путём установки идентификатора текущего узла и общей информации о состоянии выполнения.\n - В логах регистрируется старт нового рабочего процесса.\n - Основной цикл выполнения рабочего процесса заключается в последовательном вызове методов для каждого узла рабочего процесса до тех пор, пока текущий узел не станет равным `None`.\n\n## Важные детали реализации\n### 1. Инициализация классов и объектов\n- Класс `TransitionResolver` используется для обеспечения корректного перехода от одного узла к другому в рабочем процессе.\n- Механизм трассировки (`traces`) позволяет вести подробное журналирование всех этапов выполнения рабочего процесса.\n \n### 2. Методы и функции\n- Метод `run(context)` инициирует выполнение цикла основного рабочего процесса.\n- Внутренний цикл использует переменную `current_name` для отслеживания текущего узла рабочего процесса и метода `node` для получения текущей задачи (`node`).\n\n### Осторожные выводы\nНекоторые аспекты, такие как конкретные механизмы работы механизмов трассировки (`traces`) и взаимодействия с механизмом хранения состояния (`persistence`), остаются неясными без дополнительного анализа соответствующих частей кода. Однако основной поток данных и логика явно изложены и понятны на основе доступных фрагментов кода." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 780, + "evidence_rows": 13, + "evidence_chars": 4423 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 2, + "unique_paths": 2 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 1 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_explain_ru_v1", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 3756 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_114552/full_chain_plba_code_retrieval_plba-fullchain-explain-workflow-engine.md b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_114552/full_chain_plba_code_retrieval_plba-fullchain-explain-workflow-engine.md new file mode 100644 index 0000000..0e28749 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_114552/full_chain_plba_code_retrieval_plba-fullchain-explain-workflow-engine.md @@ -0,0 +1,34 @@ +# plba-fullchain-explain-workflow-engine + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_retrieval.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Объясни класс WorkflowEngine + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 13, + "llm_answer": "## Назначение класса `WorkflowEngine`\nКласс `WorkflowEngine` является ключевым компонентом системы управления рабочими процессами (`workflow engine`) и отвечает за выполнение рабочего процесса по определённому шаблону (`workflow definition`), обеспечивая управление состоянием контекста выполнения и логику перехода между узлами (`nodes`) рабочего процесса.\n\n## Ключевые зависимости\nКлючевыми зависимостями являются:\n- **`workflow`**: определение рабочего процесса, представляющее собой набор узлов и связей между ними.\n- **`persistence`**: механизм сохранения состояния текущего выполнения рабочего процесса.\n- **`traces`**: объект для ведения трассировки событий и состояний рабочих процессов.\n- **`hooks`**: дополнительные пользовательские обработчики событий и действий, расширяющие функционал класса.\n\n## Поток данных или вызовов\n1. При инициализации объекта класса (`WorkflowEngine.__init__()`):\n - Инициализируются внутренние атрибуты (`_workflow`, `_persistence`, `_transition_resolver`, `_traces`, `_hooks`, `_logger`).\n - Вызывается метод `_transition_resolver`, который используется для разрешения переходов между узлами рабочего процесса.\n \n2. Метод `run(context)` выполняет основную логику работы `WorkflowEngine`:\n - Начинается новый рабочий процесс с использованием механизма сохранения состояния (`persistence.start_run()`) и регистрации начального состояния выполнения.\n - Обновляется контекст выполнения рабочего процесса путём установки идентификатора текущего узла и общей информации о состоянии выполнения.\n - В логах регистрируется старт нового рабочего процесса.\n - Основной цикл выполнения рабочего процесса заключается в последовательном вызове методов для каждого узла рабочего процесса до тех пор, пока текущий узел не станет равным `None`.\n\n## Важные детали реализации\n### 1. Инициализация классов и объектов\n- Класс `TransitionResolver` используется для обеспечения корректного перехода от одного узла к другому в рабочем процессе.\n- Механизм трассировки (`traces`) позволяет вести подробное журналирование всех этапов выполнения рабочего процесса.\n \n### 2. Методы и функции\n- Метод `run(context)` инициирует выполнение цикла основного рабочего процесса.\n- Внутренний цикл использует переменную `current_name` для отслеживания текущего узла рабочего процесса и метода `node` для получения текущей задачи (`node`).\n\n### Осторожные выводы\nНекоторые аспекты, такие как конкретные механизмы работы механизмов трассировки (`traces`) и взаимодействия с механизмом хранения состояния (`persistence`), остаются неясными без дополнительного анализа соответствующих частей кода. Однако основной поток данных и логика явно изложены и понятны на основе доступных фрагментов кода.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "WorkflowEngine" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_114552/summary.md b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_114552/summary.md new file mode 100644 index 0000000..bcdb9ea --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_114552/summary.md @@ -0,0 +1,24 @@ +# pipeline_setup_v2 summary + +Passed: 6/6 + + +| File | Case | Runner | Mode | Intent | Sub-intent | Pass | +| ----------------------------------- | -------------------------------------------- | ------- | ---------- | ------- | ---------- | ---- | +| full_chain_plba_code_retrieval.yaml | plba-fullchain-explain-runtime-manager | runtime | full_chain | CODE_QA | EXPLAIN | ✓ | +| full_chain_plba_code_retrieval.yaml | plba-fullchain-explain-http-control-channel | runtime | full_chain | CODE_QA | EXPLAIN | ✓ | +| full_chain_plba_code_retrieval.yaml | plba-fullchain-explain-control-plane-service | runtime | full_chain | CODE_QA | EXPLAIN | ✓ | +| full_chain_plba_code_retrieval.yaml | plba-fullchain-explain-trace-service | runtime | full_chain | CODE_QA | EXPLAIN | ✓ | +| full_chain_plba_code_retrieval.yaml | plba-fullchain-explain-create-runtime | runtime | full_chain | CODE_QA | EXPLAIN | ✓ | +| full_chain_plba_code_retrieval.yaml | plba-fullchain-explain-workflow-engine | runtime | full_chain | CODE_QA | EXPLAIN | ✓ | + + +## LLM Answers + +- **plba-fullchain-explain-runtime-manager**: ## Назначение класса `RuntimeManager` Класс `RuntimeManager` играет роль центрального координатора и менеджера всех ключевых компонентов системы runtime. Он отвечает за инициализацию, настройку и управление жизненным циклом различных сервисов и модулей приложения. ## Ключевые зависимости Ключевыми зависимостями для работы класса являются следующие сущности: - **ConfigurationManager** (`configuration`): объект, хранящий конфигурационные параметры приложения. - **ServiceContainer** (`services`): контейнер для регистрации и управления сервисами. - **TraceService** (`traces`): инструмент для отслеживания событий и трассировки выполнения задач. - **HealthRegistry** (`health`): служба мониторинга состояния здоровья компонентов. - **LogManager** (`logs`): менеджер логирования действий и событий. - **WorkerSupervisor** (`workers`): супервизор рабочих процессов. - **ControlPl… +- **plba-fullchain-explain-http-control-channel**: ## Объяснение работы класса `HttpControlChannel` ### Назначение Класс `HttpControlChannel` предназначен для управления HTTP каналом контроля состояния приложения. Он отвечает за инициализацию сервера и обработку запросов, связанных с состоянием системы. ### Ключевые зависимости Ключевая зависимость — это объект типа `UvicornThreadRunner`, используемый для запуска веб-сервера. Также используются классы и функции из модуля `HttpControlAppFactory`. ### Поток данных или вызовов 1. **Инициализация (`__init_`_)**: - При создании объекта устанавливается значение тайм-аута и запускается объект `UvicornThreadRunner`. Этот объект используется для выполнения асинхронного запуска веб-приложения через фреймворк FastAPI. 2. **Запуск (`start`)**: - Метод принимает набор действий (`ControlActionSet`), конфигурирует приложение, затем вызывает метод `start` у экземпляра `UvicornThread… +- **plba-fullchain-explain-control-plane-service**: ## Объяснение сущности `ControlPlaneService` ### Назначение `ControlPlaneService` — это сервис управления данными и состоянием приложения. Он отвечает за координацию различных каналов (`ControlChannel`) и управление жизненным циклом работы компонентов системы. Сервис также участвует в обработке срезов данных (`dataflow slices`), что указывает на его роль в общем потоке выполнения и управлении ресурсами. ### Ключевые зависимости Ключевой зависимостью является наличие списка каналов (`_channels`), через которые осуществляется взаимодействие с компонентами системы. Важными методами являются инициализация сервиса (`__init__`), регистрация новых каналов (`register_channel`), запуск (`start`) и остановка (`stop`) сервисов, а также создание снимка текущего состояния (`snapshot`). ### Поток данных или вызовов При создании объекта класса вызывается метод `__init__`, который и… +- **plba-fullchain-explain-trace-service**: ## Объяснение работы `TraceService` ### Назначение `TraceService` — это сервис, предназначенный для управления контекстом трассировки и записи событий трассировки в транспортный механизм (`TraceTransport`). Он отвечает за создание новых трассировочных записей, их хранение и отправку в транспорт. ### Ключевые зависимости - **TraceTransport**: отвечает за передачу трассировочной информации от приложения к внешнему хранилищу или системе сбора логов. - **TraceContextStore**: используется для временного хранения трассировочных записей до их передачи через транспорт. - **NoOpTraceTransport**: используется по умолчанию, если не передан другой транспорт. Этот транспорт просто игнорирует все сообщения без реальной отправки. ### Поток данных или вызовов 1. При инициализации сервиса (`TraceService.__init__`) создается объект записи контекста трассировки (`TraceRecordWriter`), к… +- **plba-fullchain-explain-create-runtime**: ## Объяснение функции `create_runtime` ### Назначение Функция `create_runtime` предназначена для инициализации и настройки основного объекта управления (`RuntimeManager`) приложения Plba. Она создаёт экземпляр менеджера выполнения и выполняет начальную настройку, включая загрузку конфигурационных файлов и регистрацию модулей. ### Ключевые зависимости Ключевая зависимость — объект класса `RuntimeManager`, который является основным объектом управления жизненным циклом приложения. Этот класс отвечает за управление всеми модулями и компонентами системы, включая их загрузку, конфигурирование и взаимодействие. ### Поток данных или вызовов 1. Функция принимает параметры конфигурации и определяет путь к файлу конфигурации, а также флаги включения HTTP-контроля и указания его параметров (хост, порт, таймаут). 2. Создаётся новый экземпляр `RuntimeManager`. 3. Если указан путь… +- **plba-fullchain-explain-workflow-engine**: ## Назначение класса `WorkflowEngine` Класс `WorkflowEngine` является ключевым компонентом системы управления рабочими процессами (`workflow engine`) и отвечает за выполнение рабочего процесса по определённому шаблону (`workflow definition`), обеспечивая управление состоянием контекста выполнения и логику перехода между узлами (`nodes`) рабочего процесса. ## Ключевые зависимости Ключевыми зависимостями являются: - `**workflow`**: определение рабочего процесса, представляющее собой набор узлов и связей между ними. - `**persistence**`: механизм сохранения состояния текущего выполнения рабочего процесса. - `**traces**`: объект для ведения трассировки событий и состояний рабочих процессов. - `**hooks**`: дополнительные пользовательские обработчики событий и действий, расширяющие функционал класса. ## Поток данных или вызовов 1. При инициализации объекта класса (`Workflow… + diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_115223/full_chain_plba_code_retrieval_plba-fullchain-explain-control-plane-service.json b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_115223/full_chain_plba_code_retrieval_plba-fullchain-explain-control-plane-service.json new file mode 100644 index 0000000..aa2b01c --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_115223/full_chain_plba_code_retrieval_plba-fullchain-explain-control-plane-service.json @@ -0,0 +1,2056 @@ +{ + "case_id": "plba-fullchain-explain-control-plane-service", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_retrieval.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 12, + "llm_answer": "## Объяснение работы сущности `ControlPlaneService`\n\n### Назначение\n`ControlPlaneService` — это служба управления состоянием и взаимодействием различных компонентов системы. Она отвечает за координацию действий между каналами (`ControlChannel`), настройку инициализации системы и ее остановки, а также сбор информации о текущем состоянии для последующего анализа.\n\n### Ключевые зависимости\n- **RuntimeManager**: объект-менеджер, предоставляющий доступ к различным аспектам состояния и конфигурации запущенной системы.\n- **ControlChannel**: интерфейс взаимодействия с различными компонентами системы через каналы передачи данных.\n\n### Поток данных или вызовов\n1. **Инициализация** (`__init__`) \n - При создании объекта службы выполняется настройка внутреннего списка каналов `_channels`.\n \n2. **Регистрация канала** (`register_channel`) \n - Канал добавляется в список внутренних каналов службы.\n\n3. **Запуск сервиса** (`start`) \n - Вызывается асинхронная функция `_start_async`, которая запускает набор действий:\n - Проверка текущего здоровья системы (`health_status`).\n - Запуск основного функционала системы (`start_runtime`).\n\n4. **Остановка сервиса** (`stop`) \n - Выполняется асинхронно с помощью функции `_stop_async`. Остановка производится только при наличии зарегистрированных каналов.\n\n5. **Сбор системной информации** (`snapshot`) \n - Собирается информация о текущем состоянии системы, включая состояние выполнения задач, модули, сервисы, рабочие процессы и конфигурационные параметры.\n\n6. **Асинхронные действия** \n - Все основные операции выполняются внутри событийных циклов с использованием библиотеки `asyncio`.\n\n### Важные детали реализации\n- **Асинхронность операций**: все критические операции по управлению системой реализованы асинхронно, что позволяет избежать блокировок и эффективно обрабатывать множественные задачи одновременно.\n- **Работа с состоянием**: сервис активно использует внутренние атрибуты (_channels, _state), которые могут быть изменены внешними компонентами.\n- **Взаимодействие с внешним окружением**: работа сервиса завязана на наличие внешних объектов типа `RuntimeManager`, без которых функциональность будет неполной.\n\n### Осторожные выводы\nНекоторые аспекты поведения сервиса могут быть определены только косвенно исходя из доступных контекстуальных сигналов, таких как сигнатура методов и их вызовов, однако конкретные механизмы взаимодействия с внешней средой требуют дополнительного исследования исходного кода или документации.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "ControlPlaneService" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-fullchain-explain-control-plane-service", + "text": "Объясни класс ControlPlaneService", + "mode": "full_chain", + "run_started_at": "2026-03-12T11:52:23", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни класс ControlPlaneService", + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "ControlPlaneService", + "alternatives": [ + "ControlPlaneService" + ], + "confidence": 0.99 + }, + "rag_count": 12, + "rag_rows": [ + { + "path": "src/app_runtime/control/service.py", + "content": "class ControlPlaneService\nControlPlaneService", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "qname": "ControlPlaneService", + "kind": "class", + "signature": "ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.register_channel reads_attr self._channels.append", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.register_channel:reads_attr", + "span_start": 17, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "1ee5925deffdc38ba15b88bf7c89e5fcd1a78f493fe30f2deb827d714a1b18e8", + "edge_type": "reads_attr", + "src_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "src_qname": "ControlPlaneService.register_channel", + "dst_symbol_id": null, + "dst_ref": "self._channels.append", + "resolution": "partial", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "class ControlPlaneService:\n def __init__(self) -> None:\n self._channels: list[ControlChannel] = []\n\n def register_channel(self, channel: ControlChannel) -> None:\n self._channels.append(channel)\n\n def start(self, runtime: RuntimeManager) -> None:\n if not self._channels:\n return\n asyncio.run(self._start_async(runtime))\n\n def stop(self) -> None:\n if not self._channels:\n return\n asyncio.run(self._stop_async())\n\n def snapshot(self, runtime: RuntimeManager) -> dict[str, object]:\n health = runtime.current_health()\n return {\n \"runtime\": {\"state\": runtime._state.value},\n \"modules\": list(runtime.registry.modules),\n \"services\": runtime.services.snapshot(),\n \"workers\": runtime.workers.snapshot(),\n \"health\": runtime.health.snapshot(runtime.workers.healths()) | {\"status\": health[\"status\"]},\n \"config\": runtime.configuration.get(),\n }\n\n async def _start_async(self, runtime: RuntimeManager) -> None:\n actions = ControlActionSet(\n health=runtime.health_status,\n start=runtime.start_runtime,\n stop=runtime.stop_runtime,\n status=runtime.runtime_status,\n )\n for channel in self._channels:\n await channel.start(actions)\n\n async def _stop_async(self) -> None:\n for channel in reversed(self._channels):\n await channel.stop()", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/service.py:ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "## Объяснение работы сущности `ControlPlaneService`\n\n### Назначение\n`ControlPlaneService` — это служба управления состоянием и взаимодействием различных компонентов системы. Она отвечает за координацию действий между каналами (`ControlChannel`), настройку инициализации системы и ее остановки, а также сбор информации о текущем состоянии для последующего анализа.\n\n### Ключевые зависимости\n- **RuntimeManager**: объект-менеджер, предоставляющий доступ к различным аспектам состояния и конфигурации запущенной системы.\n- **ControlChannel**: интерфейс взаимодействия с различными компонентами системы через каналы передачи данных.\n\n### Поток данных или вызовов\n1. **Инициализация** (`__init__`) \n - При создании объекта службы выполняется настройка внутреннего списка каналов `_channels`.\n \n2. **Регистрация канала** (`register_channel`) \n - Канал добавляется в список внутренних каналов службы.\n\n3. **Запуск сервиса** (`start`) \n - Вызывается асинхронная функция `_start_async`, которая запускает набор действий:\n - Проверка текущего здоровья системы (`health_status`).\n - Запуск основного функционала системы (`start_runtime`).\n\n4. **Остановка сервиса** (`stop`) \n - Выполняется асинхронно с помощью функции `_stop_async`. Остановка производится только при наличии зарегистрированных каналов.\n\n5. **Сбор системной информации** (`snapshot`) \n - Собирается информация о текущем состоянии системы, включая состояние выполнения задач, модули, сервисы, рабочие процессы и конфигурационные параметры.\n\n6. **Асинхронные действия** \n - Все основные операции выполняются внутри событийных циклов с использованием библиотеки `asyncio`.\n\n### Важные детали реализации\n- **Асинхронность операций**: все критические операции по управлению системой реализованы асинхронно, что позволяет избежать блокировок и эффективно обрабатывать множественные задачи одновременно.\n- **Работа с состоянием**: сервис активно использует внутренние атрибуты (_channels, _state), которые могут быть изменены внешними компонентами.\n- **Взаимодействие с внешним окружением**: работа сервиса завязана на наличие внешних объектов типа `RuntimeManager`, без которых функциональность будет неполной.\n\n### Осторожные выводы\nНекоторые аспекты поведения сервиса могут быть определены только косвенно исходя из доступных контекстуальных сигналов, таких как сигнатура методов и их вызовов, однако конкретные механизмы взаимодействия с внешней средой требуют дополнительного исследования исходного кода или документации.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS", + "C4_SEMANTIC_ROLES" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "ControlPlaneService" + ], + "keyword_hints": [ + "ControlPlaneService" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "ControlPlaneService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "ControlPlaneService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "ControlPlaneService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "ControlPlaneService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "ControlPlaneService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "ControlPlaneService", + "alternatives": [ + "ControlPlaneService" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 138, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 43, + "C0_SOURCE_CHUNKS": 15, + "C4_SEMANTIC_ROLES": 13, + "C2_DEPENDENCY_GRAPH": 54, + "C3_ENTRYPOINTS": 10 + }, + "merge_rank": 21, + "prompt_build": 0, + "llm_call": 3515 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 797, + "evidence_rows": 12, + "evidence_chars": 2301 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 1 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_explain_ru_v1", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "ControlPlaneService" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 12, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-fullchain-explain-control-plane-service", + "mode": "full_chain", + "run_started_at": "2026-03-12T11:52:23", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Объясни класс ControlPlaneService", + "normalized_query": "Объясни класс ControlPlaneService" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Объясни класс ControlPlaneService" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни класс ControlPlaneService" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "ControlPlaneService" + ], + "keyword_hints": [ + "ControlPlaneService" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Объясни класс ControlPlaneService" + }, + "output": { + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "ControlPlaneService", + "alternatives": [ + "ControlPlaneService" + ], + "confidence": 0.99 + }, + "rag_count": 12, + "rag_rows": [ + { + "path": "src/app_runtime/control/service.py", + "content": "class ControlPlaneService\nControlPlaneService", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "qname": "ControlPlaneService", + "kind": "class", + "signature": "ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.register_channel reads_attr self._channels.append", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.register_channel:reads_attr", + "span_start": 17, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "1ee5925deffdc38ba15b88bf7c89e5fcd1a78f493fe30f2deb827d714a1b18e8", + "edge_type": "reads_attr", + "src_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "src_qname": "ControlPlaneService.register_channel", + "dst_symbol_id": null, + "dst_ref": "self._channels.append", + "resolution": "partial", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "class ControlPlaneService:\n def __init__(self) -> None:\n self._channels: list[ControlChannel] = []\n\n def register_channel(self, channel: ControlChannel) -> None:\n self._channels.append(channel)\n\n def start(self, runtime: RuntimeManager) -> None:\n if not self._channels:\n return\n asyncio.run(self._start_async(runtime))\n\n def stop(self) -> None:\n if not self._channels:\n return\n asyncio.run(self._stop_async())\n\n def snapshot(self, runtime: RuntimeManager) -> dict[str, object]:\n health = runtime.current_health()\n return {\n \"runtime\": {\"state\": runtime._state.value},\n \"modules\": list(runtime.registry.modules),\n \"services\": runtime.services.snapshot(),\n \"workers\": runtime.workers.snapshot(),\n \"health\": runtime.health.snapshot(runtime.workers.healths()) | {\"status\": health[\"status\"]},\n \"config\": runtime.configuration.get(),\n }\n\n async def _start_async(self, runtime: RuntimeManager) -> None:\n actions = ControlActionSet(\n health=runtime.health_status,\n start=runtime.start_runtime,\n stop=runtime.stop_runtime,\n status=runtime.runtime_status,\n )\n for channel in self._channels:\n await channel.start(actions)\n\n async def _stop_async(self) -> None:\n for channel in reversed(self._channels):\n await channel.stop()", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/service.py:ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "ControlPlaneService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "ControlPlaneService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "ControlPlaneService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "ControlPlaneService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "ControlPlaneService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "ControlPlaneService", + "alternatives": [ + "ControlPlaneService" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 138, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 43, + "C0_SOURCE_CHUNKS": 15, + "C4_SEMANTIC_ROLES": 13, + "C2_DEPENDENCY_GRAPH": 54, + "C3_ENTRYPOINTS": 10 + }, + "merge_rank": 21 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Объясни класс ControlPlaneService", + "rag_count": 12 + }, + "output": { + "llm_answer": "## Объяснение работы сущности `ControlPlaneService`\n\n### Назначение\n`ControlPlaneService` — это служба управления состоянием и взаимодействием различных компонентов системы. Она отвечает за координацию действий между каналами (`ControlChannel`), настройку инициализации системы и ее остановки, а также сбор информации о текущем состоянии для последующего анализа.\n\n### Ключевые зависимости\n- **RuntimeManager**: объект-менеджер, предоставляющий доступ к различным аспектам состояния и конфигурации запущенной системы.\n- **ControlChannel**: интерфейс взаимодействия с различными компонентами системы через каналы передачи данных.\n\n### Поток данных или вызовов\n1. **Инициализация** (`__init__`) \n - При создании объекта службы выполняется настройка внутреннего списка каналов `_channels`.\n \n2. **Регистрация канала** (`register_channel`) \n - Канал добавляется в список внутренних каналов службы.\n\n3. **Запуск сервиса** (`start`) \n - Вызывается асинхронная функция `_start_async`, которая запускает набор действий:\n - Проверка текущего здоровья системы (`health_status`).\n - Запуск основного функционала системы (`start_runtime`).\n\n4. **Остановка сервиса** (`stop`) \n - Выполняется асинхронно с помощью функции `_stop_async`. Остановка производится только при наличии зарегистрированных каналов.\n\n5. **Сбор системной информации** (`snapshot`) \n - Собирается информация о текущем состоянии системы, включая состояние выполнения задач, модули, сервисы, рабочие процессы и конфигурационные параметры.\n\n6. **Асинхронные действия** \n - Все основные операции выполняются внутри событийных циклов с использованием библиотеки `asyncio`.\n\n### Важные детали реализации\n- **Асинхронность операций**: все критические операции по управлению системой реализованы асинхронно, что позволяет избежать блокировок и эффективно обрабатывать множественные задачи одновременно.\n- **Работа с состоянием**: сервис активно использует внутренние атрибуты (_channels, _state), которые могут быть изменены внешними компонентами.\n- **Взаимодействие с внешним окружением**: работа сервиса завязана на наличие внешних объектов типа `RuntimeManager`, без которых функциональность будет неполной.\n\n### Осторожные выводы\nНекоторые аспекты поведения сервиса могут быть определены только косвенно исходя из доступных контекстуальных сигналов, таких как сигнатура методов и их вызовов, однако конкретные механизмы взаимодействия с внешней средой требуют дополнительного исследования исходного кода или документации." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 797, + "evidence_rows": 12, + "evidence_chars": 2301 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 1 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_explain_ru_v1", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 3515 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_115223/full_chain_plba_code_retrieval_plba-fullchain-explain-control-plane-service.md b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_115223/full_chain_plba_code_retrieval_plba-fullchain-explain-control-plane-service.md new file mode 100644 index 0000000..6f593c7 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_115223/full_chain_plba_code_retrieval_plba-fullchain-explain-control-plane-service.md @@ -0,0 +1,34 @@ +# plba-fullchain-explain-control-plane-service + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_retrieval.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Объясни класс ControlPlaneService + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 12, + "llm_answer": "## Объяснение работы сущности `ControlPlaneService`\n\n### Назначение\n`ControlPlaneService` — это служба управления состоянием и взаимодействием различных компонентов системы. Она отвечает за координацию действий между каналами (`ControlChannel`), настройку инициализации системы и ее остановки, а также сбор информации о текущем состоянии для последующего анализа.\n\n### Ключевые зависимости\n- **RuntimeManager**: объект-менеджер, предоставляющий доступ к различным аспектам состояния и конфигурации запущенной системы.\n- **ControlChannel**: интерфейс взаимодействия с различными компонентами системы через каналы передачи данных.\n\n### Поток данных или вызовов\n1. **Инициализация** (`__init__`) \n - При создании объекта службы выполняется настройка внутреннего списка каналов `_channels`.\n \n2. **Регистрация канала** (`register_channel`) \n - Канал добавляется в список внутренних каналов службы.\n\n3. **Запуск сервиса** (`start`) \n - Вызывается асинхронная функция `_start_async`, которая запускает набор действий:\n - Проверка текущего здоровья системы (`health_status`).\n - Запуск основного функционала системы (`start_runtime`).\n\n4. **Остановка сервиса** (`stop`) \n - Выполняется асинхронно с помощью функции `_stop_async`. Остановка производится только при наличии зарегистрированных каналов.\n\n5. **Сбор системной информации** (`snapshot`) \n - Собирается информация о текущем состоянии системы, включая состояние выполнения задач, модули, сервисы, рабочие процессы и конфигурационные параметры.\n\n6. **Асинхронные действия** \n - Все основные операции выполняются внутри событийных циклов с использованием библиотеки `asyncio`.\n\n### Важные детали реализации\n- **Асинхронность операций**: все критические операции по управлению системой реализованы асинхронно, что позволяет избежать блокировок и эффективно обрабатывать множественные задачи одновременно.\n- **Работа с состоянием**: сервис активно использует внутренние атрибуты (_channels, _state), которые могут быть изменены внешними компонентами.\n- **Взаимодействие с внешним окружением**: работа сервиса завязана на наличие внешних объектов типа `RuntimeManager`, без которых функциональность будет неполной.\n\n### Осторожные выводы\nНекоторые аспекты поведения сервиса могут быть определены только косвенно исходя из доступных контекстуальных сигналов, таких как сигнатура методов и их вызовов, однако конкретные механизмы взаимодействия с внешней средой требуют дополнительного исследования исходного кода или документации.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "ControlPlaneService" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_115223/full_chain_plba_code_retrieval_plba-fullchain-explain-create-runtime.json b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_115223/full_chain_plba_code_retrieval_plba-fullchain-explain-create-runtime.json new file mode 100644 index 0000000..b87954a --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_115223/full_chain_plba_code_retrieval_plba-fullchain-explain-create-runtime.json @@ -0,0 +1,1896 @@ +{ + "case_id": "plba-fullchain-explain-create-runtime", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_retrieval.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 12, + "llm_answer": "## Объяснение функции `create_runtime`\n\n### Назначение\nФункция `create_runtime` предназначена для инициализации и настройки среды выполнения (`runtime`) приложения Plba. Она выполняет несколько ключевых шагов по настройке и регистрации различных компонентов, необходимых для полноценной работы системы.\n\n### Ключевые зависимости\nФункция зависит от следующих сущностей и модулей:\n- **src/plba/bootstrap.py**: основной файл, содержащий реализацию функции `create_runtime`.\n- **RuntimeManager**: менеджер окружения, используемый для управления конфигурацией и модулями приложения.\n- **ApplicationModule**: модуль приложения, представляющий собой компонент, регистрируемый менеджером среды выполнения.\n- **HttpControlChannel**: канал управления HTTP-интерфейсом, обеспечивающий взаимодействие с внешним окружением через HTTP-протокол.\n\n### Поток данных или вызовов\n1. Функция принимает следующие аргументы:\n - `module`: экземпляр класса `ApplicationModule`, определяющий конкретный модуль приложения.\n - Дополнительные параметры конфигурации, такие как путь к файлу конфигурации, флаг включения HTTP-контроля, адрес и порт контроллера и таймаут соединения.\n \n2. В начале создается объект `RuntimeManager`, который будет служить основным контейнером для всех зарегистрированных компонентов и их настроек.\n\n3. Если указан параметр `config_path`, вызывается метод `add_config_file` объекта `RuntimeManager`. Этот метод загружает и применяет настройки из указанного файла конфигурации.\n\n4. Если включен режим HTTP-контроля (`enable_http_control`), вызывается регистрация канала HTTP-контроля при помощи метода `register_channel` объекта `RuntimeManager`. Параметры канала задаются исходя из указанных пользователем значений адреса, порта и тайм-аута.\n\n5. Независимо от режима HTTP-контроля, всегда выполняется регистрация переданного модуля приложения методом `register_module` объекта `RuntimeManager`.\n\n6. По завершению процесса функция возвращает созданный объект `RuntimeManager`.\n\n### Важные детали реализации\n- Использование параметров конфигурации позволяет гибко настраивать среду исполнения без необходимости внесения изменений непосредственно в исходный код.\n- Регистрация HTTP-канала обеспечивает возможность удаленного управления приложением через стандартный интерфейс HTTP.\n- Поддержка опции включения HTTP-контроля предоставляет разработчикам дополнительный уровень контроля над состоянием и поведением запущенного приложения.\n \n**Осторожный вывод:** \nНа основании предоставленного контекста сложно точно определить механизм взаимодействия конкретных слоев RAG (например, зависимость от других частей архитектуры типа `C0_SOURCE_CHUNKS`, `C4_SEMANTIC_ROLES`). Однако приведенные выше данные достаточно информативны для понимания базовой функциональности и структуры вызова данной функции.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "create_runtime" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-fullchain-explain-create-runtime", + "text": "Объясни функцию create_runtime", + "mode": "full_chain", + "run_started_at": "2026-03-12T11:52:23", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни функцию create_runtime", + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "create_runtime", + "alternatives": [ + "create_runtime" + ], + "confidence": 0.99 + }, + "rag_count": 12, + "rag_rows": [ + { + "path": "src/plba/bootstrap.py", + "content": "function create_runtime\ncreate_runtime(module)", + "layer": "C1_SYMBOL_CATALOG", + "title": "create_runtime", + "span_start": 8, + "span_end": 29, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "qname": "create_runtime", + "kind": "function", + "signature": "create_runtime(module)", + "parent_symbol_id": null, + "package_or_module": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime calls runtime.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:calls", + "span_start": 19, + "span_end": 19, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "4eaeec4ac55a59d5f66fd01c4754955f8fedaf4bc3df13fa769b352c7bfaacbb", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.add_config_file", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime reads_attr runtime.register_module", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:reads_attr", + "span_start": 28, + "span_end": 28, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "45516c79ff358dbf9b650a081668df0f66d2fe989300f985a1a78be6be166f8f", + "edge_type": "reads_attr", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.register_module", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:instantiates", + "span_start": 17, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "0adba17984f850ea1608c9e734d2dd5c325cfde3a8133123aa239e44935ad18e", + "edge_type": "instantiates", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": "27158ca220022eeb5083c6addf8a50775d45f7161284fd60aac48410105f4b98", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime calls runtime.register_module", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:calls", + "span_start": 28, + "span_end": 28, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "ab6003c3441addc1ba1b81edeca009165559f652f6b2cf424e5ae61b1f617de8", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.register_module", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime calls runtime.control_plane.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:calls", + "span_start": 21, + "span_end": 27, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "2678250030b9ce47a3b3b55fac7897ac530367edc8374ac9d5e6ecafb1e483f0", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.control_plane.register_channel", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime reads_attr runtime.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:reads_attr", + "span_start": 19, + "span_end": 19, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "30d4e8aae984ab84d523e80d02f1caeda52d547fa3d2aa47be8845931cabbca2", + "edge_type": "reads_attr", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.add_config_file", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "def create_runtime(\n module: ApplicationModule,\n *,\n config_path: str | None = None,\n enable_http_control: bool = False,\n control_host: str = \"127.0.0.1\",\n control_port: int = 8080,\n control_timeout: int = 5,\n) -> RuntimeManager:\n runtime = RuntimeManager()\n if config_path is not None:\n runtime.add_config_file(config_path)\n if enable_http_control:\n runtime.control_plane.register_channel(\n HttpControlChannel(\n host=control_host,\n port=control_port,\n timeout=control_timeout,\n )\n )\n runtime.register_module(module)\n return runtime", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/bootstrap.py:create_runtime", + "span_start": 8, + "span_end": 29, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "## Объяснение функции `create_runtime`\n\n### Назначение\nФункция `create_runtime` предназначена для инициализации и настройки среды выполнения (`runtime`) приложения Plba. Она выполняет несколько ключевых шагов по настройке и регистрации различных компонентов, необходимых для полноценной работы системы.\n\n### Ключевые зависимости\nФункция зависит от следующих сущностей и модулей:\n- **src/plba/bootstrap.py**: основной файл, содержащий реализацию функции `create_runtime`.\n- **RuntimeManager**: менеджер окружения, используемый для управления конфигурацией и модулями приложения.\n- **ApplicationModule**: модуль приложения, представляющий собой компонент, регистрируемый менеджером среды выполнения.\n- **HttpControlChannel**: канал управления HTTP-интерфейсом, обеспечивающий взаимодействие с внешним окружением через HTTP-протокол.\n\n### Поток данных или вызовов\n1. Функция принимает следующие аргументы:\n - `module`: экземпляр класса `ApplicationModule`, определяющий конкретный модуль приложения.\n - Дополнительные параметры конфигурации, такие как путь к файлу конфигурации, флаг включения HTTP-контроля, адрес и порт контроллера и таймаут соединения.\n \n2. В начале создается объект `RuntimeManager`, который будет служить основным контейнером для всех зарегистрированных компонентов и их настроек.\n\n3. Если указан параметр `config_path`, вызывается метод `add_config_file` объекта `RuntimeManager`. Этот метод загружает и применяет настройки из указанного файла конфигурации.\n\n4. Если включен режим HTTP-контроля (`enable_http_control`), вызывается регистрация канала HTTP-контроля при помощи метода `register_channel` объекта `RuntimeManager`. Параметры канала задаются исходя из указанных пользователем значений адреса, порта и тайм-аута.\n\n5. Независимо от режима HTTP-контроля, всегда выполняется регистрация переданного модуля приложения методом `register_module` объекта `RuntimeManager`.\n\n6. По завершению процесса функция возвращает созданный объект `RuntimeManager`.\n\n### Важные детали реализации\n- Использование параметров конфигурации позволяет гибко настраивать среду исполнения без необходимости внесения изменений непосредственно в исходный код.\n- Регистрация HTTP-канала обеспечивает возможность удаленного управления приложением через стандартный интерфейс HTTP.\n- Поддержка опции включения HTTP-контроля предоставляет разработчикам дополнительный уровень контроля над состоянием и поведением запущенного приложения.\n \n**Осторожный вывод:** \nНа основании предоставленного контекста сложно точно определить механизм взаимодействия конкретных слоев RAG (например, зависимость от других частей архитектуры типа `C0_SOURCE_CHUNKS`, `C4_SEMANTIC_ROLES`). Однако приведенные выше данные достаточно информативны для понимания базовой функциональности и структуры вызова данной функции.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS", + "C4_SEMANTIC_ROLES" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "function", + "symbol_candidates": [ + "create_runtime" + ], + "keyword_hints": [ + "create_runtime" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "create_runtime", + "alternatives": [ + "create_runtime" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 149, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 51, + "C0_SOURCE_CHUNKS": 19, + "C4_SEMANTIC_ROLES": 16, + "C2_DEPENDENCY_GRAPH": 49, + "C3_ENTRYPOINTS": 12 + }, + "merge_rank": 20, + "prompt_build": 0, + "llm_call": 3866 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 601, + "evidence_rows": 12, + "evidence_chars": 1184 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 1 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_explain_ru_v1", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "create_runtime" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 12, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-fullchain-explain-create-runtime", + "mode": "full_chain", + "run_started_at": "2026-03-12T11:52:23", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Объясни функцию create_runtime", + "normalized_query": "Объясни функцию create_runtime" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Объясни функцию create_runtime" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни функцию create_runtime" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "function", + "symbol_candidates": [ + "create_runtime" + ], + "keyword_hints": [ + "create_runtime" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Объясни функцию create_runtime" + }, + "output": { + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "create_runtime", + "alternatives": [ + "create_runtime" + ], + "confidence": 0.99 + }, + "rag_count": 12, + "rag_rows": [ + { + "path": "src/plba/bootstrap.py", + "content": "function create_runtime\ncreate_runtime(module)", + "layer": "C1_SYMBOL_CATALOG", + "title": "create_runtime", + "span_start": 8, + "span_end": 29, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "qname": "create_runtime", + "kind": "function", + "signature": "create_runtime(module)", + "parent_symbol_id": null, + "package_or_module": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime calls runtime.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:calls", + "span_start": 19, + "span_end": 19, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "4eaeec4ac55a59d5f66fd01c4754955f8fedaf4bc3df13fa769b352c7bfaacbb", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.add_config_file", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime reads_attr runtime.register_module", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:reads_attr", + "span_start": 28, + "span_end": 28, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "45516c79ff358dbf9b650a081668df0f66d2fe989300f985a1a78be6be166f8f", + "edge_type": "reads_attr", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.register_module", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:instantiates", + "span_start": 17, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "0adba17984f850ea1608c9e734d2dd5c325cfde3a8133123aa239e44935ad18e", + "edge_type": "instantiates", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": "27158ca220022eeb5083c6addf8a50775d45f7161284fd60aac48410105f4b98", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime calls runtime.register_module", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:calls", + "span_start": 28, + "span_end": 28, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "ab6003c3441addc1ba1b81edeca009165559f652f6b2cf424e5ae61b1f617de8", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.register_module", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime calls runtime.control_plane.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:calls", + "span_start": 21, + "span_end": 27, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "2678250030b9ce47a3b3b55fac7897ac530367edc8374ac9d5e6ecafb1e483f0", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.control_plane.register_channel", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime reads_attr runtime.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:reads_attr", + "span_start": 19, + "span_end": 19, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "30d4e8aae984ab84d523e80d02f1caeda52d547fa3d2aa47be8845931cabbca2", + "edge_type": "reads_attr", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.add_config_file", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "def create_runtime(\n module: ApplicationModule,\n *,\n config_path: str | None = None,\n enable_http_control: bool = False,\n control_host: str = \"127.0.0.1\",\n control_port: int = 8080,\n control_timeout: int = 5,\n) -> RuntimeManager:\n runtime = RuntimeManager()\n if config_path is not None:\n runtime.add_config_file(config_path)\n if enable_http_control:\n runtime.control_plane.register_channel(\n HttpControlChannel(\n host=control_host,\n port=control_port,\n timeout=control_timeout,\n )\n )\n runtime.register_module(module)\n return runtime", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/bootstrap.py:create_runtime", + "span_start": 8, + "span_end": 29, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "create_runtime", + "alternatives": [ + "create_runtime" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 149, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 51, + "C0_SOURCE_CHUNKS": 19, + "C4_SEMANTIC_ROLES": 16, + "C2_DEPENDENCY_GRAPH": 49, + "C3_ENTRYPOINTS": 12 + }, + "merge_rank": 20 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Объясни функцию create_runtime", + "rag_count": 12 + }, + "output": { + "llm_answer": "## Объяснение функции `create_runtime`\n\n### Назначение\nФункция `create_runtime` предназначена для инициализации и настройки среды выполнения (`runtime`) приложения Plba. Она выполняет несколько ключевых шагов по настройке и регистрации различных компонентов, необходимых для полноценной работы системы.\n\n### Ключевые зависимости\nФункция зависит от следующих сущностей и модулей:\n- **src/plba/bootstrap.py**: основной файл, содержащий реализацию функции `create_runtime`.\n- **RuntimeManager**: менеджер окружения, используемый для управления конфигурацией и модулями приложения.\n- **ApplicationModule**: модуль приложения, представляющий собой компонент, регистрируемый менеджером среды выполнения.\n- **HttpControlChannel**: канал управления HTTP-интерфейсом, обеспечивающий взаимодействие с внешним окружением через HTTP-протокол.\n\n### Поток данных или вызовов\n1. Функция принимает следующие аргументы:\n - `module`: экземпляр класса `ApplicationModule`, определяющий конкретный модуль приложения.\n - Дополнительные параметры конфигурации, такие как путь к файлу конфигурации, флаг включения HTTP-контроля, адрес и порт контроллера и таймаут соединения.\n \n2. В начале создается объект `RuntimeManager`, который будет служить основным контейнером для всех зарегистрированных компонентов и их настроек.\n\n3. Если указан параметр `config_path`, вызывается метод `add_config_file` объекта `RuntimeManager`. Этот метод загружает и применяет настройки из указанного файла конфигурации.\n\n4. Если включен режим HTTP-контроля (`enable_http_control`), вызывается регистрация канала HTTP-контроля при помощи метода `register_channel` объекта `RuntimeManager`. Параметры канала задаются исходя из указанных пользователем значений адреса, порта и тайм-аута.\n\n5. Независимо от режима HTTP-контроля, всегда выполняется регистрация переданного модуля приложения методом `register_module` объекта `RuntimeManager`.\n\n6. По завершению процесса функция возвращает созданный объект `RuntimeManager`.\n\n### Важные детали реализации\n- Использование параметров конфигурации позволяет гибко настраивать среду исполнения без необходимости внесения изменений непосредственно в исходный код.\n- Регистрация HTTP-канала обеспечивает возможность удаленного управления приложением через стандартный интерфейс HTTP.\n- Поддержка опции включения HTTP-контроля предоставляет разработчикам дополнительный уровень контроля над состоянием и поведением запущенного приложения.\n \n**Осторожный вывод:** \nНа основании предоставленного контекста сложно точно определить механизм взаимодействия конкретных слоев RAG (например, зависимость от других частей архитектуры типа `C0_SOURCE_CHUNKS`, `C4_SEMANTIC_ROLES`). Однако приведенные выше данные достаточно информативны для понимания базовой функциональности и структуры вызова данной функции." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 601, + "evidence_rows": 12, + "evidence_chars": 1184 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 1 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_explain_ru_v1", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 3866 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_115223/full_chain_plba_code_retrieval_plba-fullchain-explain-create-runtime.md b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_115223/full_chain_plba_code_retrieval_plba-fullchain-explain-create-runtime.md new file mode 100644 index 0000000..61223d9 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_115223/full_chain_plba_code_retrieval_plba-fullchain-explain-create-runtime.md @@ -0,0 +1,34 @@ +# plba-fullchain-explain-create-runtime + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_retrieval.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Объясни функцию create_runtime + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 12, + "llm_answer": "## Объяснение функции `create_runtime`\n\n### Назначение\nФункция `create_runtime` предназначена для инициализации и настройки среды выполнения (`runtime`) приложения Plba. Она выполняет несколько ключевых шагов по настройке и регистрации различных компонентов, необходимых для полноценной работы системы.\n\n### Ключевые зависимости\nФункция зависит от следующих сущностей и модулей:\n- **src/plba/bootstrap.py**: основной файл, содержащий реализацию функции `create_runtime`.\n- **RuntimeManager**: менеджер окружения, используемый для управления конфигурацией и модулями приложения.\n- **ApplicationModule**: модуль приложения, представляющий собой компонент, регистрируемый менеджером среды выполнения.\n- **HttpControlChannel**: канал управления HTTP-интерфейсом, обеспечивающий взаимодействие с внешним окружением через HTTP-протокол.\n\n### Поток данных или вызовов\n1. Функция принимает следующие аргументы:\n - `module`: экземпляр класса `ApplicationModule`, определяющий конкретный модуль приложения.\n - Дополнительные параметры конфигурации, такие как путь к файлу конфигурации, флаг включения HTTP-контроля, адрес и порт контроллера и таймаут соединения.\n \n2. В начале создается объект `RuntimeManager`, который будет служить основным контейнером для всех зарегистрированных компонентов и их настроек.\n\n3. Если указан параметр `config_path`, вызывается метод `add_config_file` объекта `RuntimeManager`. Этот метод загружает и применяет настройки из указанного файла конфигурации.\n\n4. Если включен режим HTTP-контроля (`enable_http_control`), вызывается регистрация канала HTTP-контроля при помощи метода `register_channel` объекта `RuntimeManager`. Параметры канала задаются исходя из указанных пользователем значений адреса, порта и тайм-аута.\n\n5. Независимо от режима HTTP-контроля, всегда выполняется регистрация переданного модуля приложения методом `register_module` объекта `RuntimeManager`.\n\n6. По завершению процесса функция возвращает созданный объект `RuntimeManager`.\n\n### Важные детали реализации\n- Использование параметров конфигурации позволяет гибко настраивать среду исполнения без необходимости внесения изменений непосредственно в исходный код.\n- Регистрация HTTP-канала обеспечивает возможность удаленного управления приложением через стандартный интерфейс HTTP.\n- Поддержка опции включения HTTP-контроля предоставляет разработчикам дополнительный уровень контроля над состоянием и поведением запущенного приложения.\n \n**Осторожный вывод:** \nНа основании предоставленного контекста сложно точно определить механизм взаимодействия конкретных слоев RAG (например, зависимость от других частей архитектуры типа `C0_SOURCE_CHUNKS`, `C4_SEMANTIC_ROLES`). Однако приведенные выше данные достаточно информативны для понимания базовой функциональности и структуры вызова данной функции.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "create_runtime" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_115223/full_chain_plba_code_retrieval_plba-fullchain-explain-http-control-channel.json b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_115223/full_chain_plba_code_retrieval_plba-fullchain-explain-http-control-channel.json new file mode 100644 index 0000000..9ca2741 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_115223/full_chain_plba_code_retrieval_plba-fullchain-explain-http-control-channel.json @@ -0,0 +1,2088 @@ +{ + "case_id": "plba-fullchain-explain-http-control-channel", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_retrieval.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 12, + "llm_answer": "## Объяснение сущности `HttpControlChannel`\n\n### Назначение\n`HttpControlChannel` — это класс, отвечающий за управление состоянием и взаимодействие с внешним HTTP каналом для контроля приложения. Он служит основным интерфейсом взаимодействия через HTTP-протокол для конфигурации и мониторинга приложения.\n\n### Ключевые зависимости\nКлючевая зависимость класса — это экземпляр `UvicornThreadRunner`, который запускает сервер для прослушивания HTTP-запросов. Кроме того, используется фабрика `HttpControlAppFactory`, которая отвечает за создание необходимых приложений FastAPI.\n\n### Поток данных или вызовов\n1. **Инициализация (`__init__`)**: \n - При создании экземпляра задаются параметры `host`, `port` и `timeout`.\n - Создаются внутренние объекты `_runner` и `_factory`.\n \n2. **Запуск (`start`)**:\n - Вызывается метод фабрики `_factory.create()` для создания FastAPI-приложения.\n - Запускается сервер с помощью `_runner.start()`.\n - В параметрах передается функция `_health_response`, возвращающая состояние здоровья системы, и функция `_action_response`, обрабатывающая конкретные действия пользователей.\n\n3. **Остановка (`stop`)**:\n - Остановка сервера выполняется вызовом метода `_runner.stop()`.\n\n4. **Получение порта (`port`)**:\n - Возвращает порт, на котором запущен сервер.\n\n5. **Ответы на запросы состояния и действий**:\n - Метод `_health_response` возвращает статус здоровья приложения, основываясь на доступных действиях управления.\n - Метод `_action_response` обрабатывает различные действия пользователя и возвращает соответствующий результат или ошибку.\n\n### Важные детали реализации\n- **Синхронность асинхронных методов**: методы `start`, `_health_response` и `_action_response` являются асинхронными и используют asyncio для ожидания результатов.\n- **Жёсткая привязка к FastAPI**: используется стандартная библиотека FastAPI для создания REST API, что обеспечивает простоту разработки и масштабируемость.\n- **Гибкость конфигурирования**: позволяет легко изменять настройки канала через инициализацию параметров при создании объекта.\n \n### Осторожные выводы\nНа основе косвенных признаков можно предположить, что система использует асинхронную архитектуру и контейнеризована таким образом, чтобы быть гибкой и адаптивной под нужды конкретного окружения исполнения. Однако детальной информации о внешних зависимостях и точном взаимодействии с другими компонентами системы нет.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "HttpControlChannel" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-fullchain-explain-http-control-channel", + "text": "Объясни класс HttpControlChannel", + "mode": "full_chain", + "run_started_at": "2026-03-12T11:52:23", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни класс HttpControlChannel", + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "HttpControlChannel", + "alternatives": [ + "HttpControlChannel" + ], + "confidence": 0.99 + }, + "rag_count": 12, + "rag_rows": [ + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel\nHttpControlChannel(ControlChannel)", + "layer": "C1_SYMBOL_CATALOG", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "qname": "HttpControlChannel", + "kind": "class", + "signature": "HttpControlChannel(ControlChannel)", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._runner\n -> HttpControlChannel.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 15, + "span_end": 22, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "51d73913df709152258ed1b9a8c8f4eb3c575eccfe6b982aef0b28e0789a29da", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0", + "dst_ref": "HttpControlChannel.start", + "resolution": "resolved", + "slice_id": "51d73913df709152258ed1b9a8c8f4eb3c575eccfe6b982aef0b28e0789a29da", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._runner", + "HttpControlChannel.start" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._runner\n -> HttpControlChannel.port", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 15, + "span_end": 29, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "c7167bab7218bb768ad7c11bfb40d1a3096e6071dd7817bba5fd864cf8f6de13", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "3632ce8227f4a31e0768f2fb021a4d1ba28e1202633aa0f2fac902295931280f", + "dst_ref": "HttpControlChannel.port", + "resolution": "resolved", + "slice_id": "c7167bab7218bb768ad7c11bfb40d1a3096e6071dd7817bba5fd864cf8f6de13", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._runner", + "HttpControlChannel.port" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "3632ce8227f4a31e0768f2fb021a4d1ba28e1202633aa0f2fac902295931280f" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._timeout\n -> HttpControlChannel._health_response", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 14, + "span_end": 34, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "f858f5c9e575f6c4cdfe3853571b7ee21d1f628a443541d2037c3dc9d0790bef", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "e84bf04e9cd2127df235b7064d05f47e19f19a89c7c82f4c247231d4e8fa426a", + "dst_ref": "HttpControlChannel._health_response", + "resolution": "resolved", + "slice_id": "f858f5c9e575f6c4cdfe3853571b7ee21d1f628a443541d2037c3dc9d0790bef", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._timeout", + "HttpControlChannel._health_response" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "e84bf04e9cd2127df235b7064d05f47e19f19a89c7c82f4c247231d4e8fa426a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._timeout\n -> HttpControlChannel._action_response", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "c3ef21fcae96c82c00be74b3ab827d4af2085d89cb3fa5521c19a174aad84dbb", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "e64969024ccaeb34d8d91473fad07b3b3d341875846392e7a006406c7ada1954", + "dst_ref": "HttpControlChannel._action_response", + "resolution": "resolved", + "slice_id": "c3ef21fcae96c82c00be74b3ab827d4af2085d89cb3fa5521c19a174aad84dbb", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._timeout", + "HttpControlChannel._action_response" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "e64969024ccaeb34d8d91473fad07b3b3d341875846392e7a006406c7ada1954" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._runner\n -> HttpControlChannel.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 15, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "0f827ef81a990258a8a74381c8564a8361afa6712dba3200592659c939adcb9d", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "f29ab212620093d72be20e26c5a399624c7939a6056a728762ed3f84a250bfa3", + "dst_ref": "HttpControlChannel.stop", + "resolution": "resolved", + "slice_id": "0f827ef81a990258a8a74381c8564a8361afa6712dba3200592659c939adcb9d", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._runner", + "HttpControlChannel.stop" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "f29ab212620093d72be20e26c5a399624c7939a6056a728762ed3f84a250bfa3" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._factory\n -> HttpControlChannel.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 16, + "span_end": 21, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e61ec25ded7dbe380d95ce2abcbc1d7a2d2afde5aa8453866df8706dfb7d6ddb", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0", + "dst_ref": "HttpControlChannel.start", + "resolution": "resolved", + "slice_id": "e61ec25ded7dbe380d95ce2abcbc1d7a2d2afde5aa8453866df8706dfb7d6ddb", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._factory", + "HttpControlChannel.start" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel(ControlChannel):\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._timeout = timeout\n self._runner = UvicornThreadRunner(host, port, timeout)\n self._factory = HttpControlAppFactory()\n self._actions: ControlActionSet | None = None\n\n async def start(self, actions: ControlActionSet) -> None:\n self._actions = actions\n app = self._factory.create(self._health_response, self._action_response)\n await self._runner.start(app)\n\n async def stop(self) -> None:\n await self._runner.stop()\n\n @property\n def port(self) -> int:\n return self._runner.port\n\n async def _health_response(self) -> dict[str, object]:\n if self._actions is None:\n return {\"status\": \"unhealthy\", \"detail\": \"control actions are not configured\"}\n return await asyncio.wait_for(self._actions.health(), timeout=float(self._timeout))\n\n async def _action_response(self, action: str, _client_source: str = \"unknown\") -> JSONResponse:\n if self._actions is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"{action} handler is not configured\"}, status_code=404)\n callbacks = {\n \"start\": self._actions.start,\n \"stop\": self._actions.stop,\n \"status\": self._actions.status,\n }\n callback = callbacks.get(action)\n if callback is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"unsupported action: {action}\"}, status_code=404)\n action_timeout = max(float(self._timeout), 10.0) if action in {\"start\", \"stop\"} else float(self._timeout)\n try:\n detail = await asyncio.wait_for(callback(), timeout=action_timeout)\n except asyncio.TimeoutError:\n return JSONResponse(\n content={\"status\": \"accepted\", \"detail\": f\"{action} operation is still in progress\"},\n status_code=202,\n )\n except Exception as exc:\n return JSONResponse(content={\"status\": \"error\", \"detail\": str(exc)}, status_code=500)\n return JSONResponse(content={\"status\": \"ok\", \"detail\": detail or f\"{action} action accepted\"}, status_code=200)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_channel.py:HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "## Объяснение сущности `HttpControlChannel`\n\n### Назначение\n`HttpControlChannel` — это класс, отвечающий за управление состоянием и взаимодействие с внешним HTTP каналом для контроля приложения. Он служит основным интерфейсом взаимодействия через HTTP-протокол для конфигурации и мониторинга приложения.\n\n### Ключевые зависимости\nКлючевая зависимость класса — это экземпляр `UvicornThreadRunner`, который запускает сервер для прослушивания HTTP-запросов. Кроме того, используется фабрика `HttpControlAppFactory`, которая отвечает за создание необходимых приложений FastAPI.\n\n### Поток данных или вызовов\n1. **Инициализация (`__init__`)**: \n - При создании экземпляра задаются параметры `host`, `port` и `timeout`.\n - Создаются внутренние объекты `_runner` и `_factory`.\n \n2. **Запуск (`start`)**:\n - Вызывается метод фабрики `_factory.create()` для создания FastAPI-приложения.\n - Запускается сервер с помощью `_runner.start()`.\n - В параметрах передается функция `_health_response`, возвращающая состояние здоровья системы, и функция `_action_response`, обрабатывающая конкретные действия пользователей.\n\n3. **Остановка (`stop`)**:\n - Остановка сервера выполняется вызовом метода `_runner.stop()`.\n\n4. **Получение порта (`port`)**:\n - Возвращает порт, на котором запущен сервер.\n\n5. **Ответы на запросы состояния и действий**:\n - Метод `_health_response` возвращает статус здоровья приложения, основываясь на доступных действиях управления.\n - Метод `_action_response` обрабатывает различные действия пользователя и возвращает соответствующий результат или ошибку.\n\n### Важные детали реализации\n- **Синхронность асинхронных методов**: методы `start`, `_health_response` и `_action_response` являются асинхронными и используют asyncio для ожидания результатов.\n- **Жёсткая привязка к FastAPI**: используется стандартная библиотека FastAPI для создания REST API, что обеспечивает простоту разработки и масштабируемость.\n- **Гибкость конфигурирования**: позволяет легко изменять настройки канала через инициализацию параметров при создании объекта.\n \n### Осторожные выводы\nНа основе косвенных признаков можно предположить, что система использует асинхронную архитектуру и контейнеризована таким образом, чтобы быть гибкой и адаптивной под нужды конкретного окружения исполнения. Однако детальной информации о внешних зависимостях и точном взаимодействии с другими компонентами системы нет.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS", + "C4_SEMANTIC_ROLES" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "HttpControlChannel" + ], + "keyword_hints": [ + "HttpControlChannel" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "HttpControlChannel", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "HttpControlChannel", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "HttpControlChannel", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "HttpControlChannel", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "HttpControlChannel", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "HttpControlChannel", + "alternatives": [ + "HttpControlChannel" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 166, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 56, + "C0_SOURCE_CHUNKS": 21, + "C4_SEMANTIC_ROLES": 21, + "C2_DEPENDENCY_GRAPH": 55, + "C3_ENTRYPOINTS": 11 + }, + "merge_rank": 20, + "prompt_build": 0, + "llm_call": 3616 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 795, + "evidence_rows": 12, + "evidence_chars": 3028 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 1 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_explain_ru_v1", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "HttpControlChannel" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 12, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-fullchain-explain-http-control-channel", + "mode": "full_chain", + "run_started_at": "2026-03-12T11:52:23", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Объясни класс HttpControlChannel", + "normalized_query": "Объясни класс HttpControlChannel" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Объясни класс HttpControlChannel" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни класс HttpControlChannel" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "HttpControlChannel" + ], + "keyword_hints": [ + "HttpControlChannel" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Объясни класс HttpControlChannel" + }, + "output": { + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "HttpControlChannel", + "alternatives": [ + "HttpControlChannel" + ], + "confidence": 0.99 + }, + "rag_count": 12, + "rag_rows": [ + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel\nHttpControlChannel(ControlChannel)", + "layer": "C1_SYMBOL_CATALOG", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "qname": "HttpControlChannel", + "kind": "class", + "signature": "HttpControlChannel(ControlChannel)", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._runner\n -> HttpControlChannel.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 15, + "span_end": 22, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "51d73913df709152258ed1b9a8c8f4eb3c575eccfe6b982aef0b28e0789a29da", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0", + "dst_ref": "HttpControlChannel.start", + "resolution": "resolved", + "slice_id": "51d73913df709152258ed1b9a8c8f4eb3c575eccfe6b982aef0b28e0789a29da", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._runner", + "HttpControlChannel.start" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._runner\n -> HttpControlChannel.port", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 15, + "span_end": 29, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "c7167bab7218bb768ad7c11bfb40d1a3096e6071dd7817bba5fd864cf8f6de13", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "3632ce8227f4a31e0768f2fb021a4d1ba28e1202633aa0f2fac902295931280f", + "dst_ref": "HttpControlChannel.port", + "resolution": "resolved", + "slice_id": "c7167bab7218bb768ad7c11bfb40d1a3096e6071dd7817bba5fd864cf8f6de13", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._runner", + "HttpControlChannel.port" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "3632ce8227f4a31e0768f2fb021a4d1ba28e1202633aa0f2fac902295931280f" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._timeout\n -> HttpControlChannel._health_response", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 14, + "span_end": 34, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "f858f5c9e575f6c4cdfe3853571b7ee21d1f628a443541d2037c3dc9d0790bef", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "e84bf04e9cd2127df235b7064d05f47e19f19a89c7c82f4c247231d4e8fa426a", + "dst_ref": "HttpControlChannel._health_response", + "resolution": "resolved", + "slice_id": "f858f5c9e575f6c4cdfe3853571b7ee21d1f628a443541d2037c3dc9d0790bef", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._timeout", + "HttpControlChannel._health_response" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "e84bf04e9cd2127df235b7064d05f47e19f19a89c7c82f4c247231d4e8fa426a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._timeout\n -> HttpControlChannel._action_response", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "c3ef21fcae96c82c00be74b3ab827d4af2085d89cb3fa5521c19a174aad84dbb", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "e64969024ccaeb34d8d91473fad07b3b3d341875846392e7a006406c7ada1954", + "dst_ref": "HttpControlChannel._action_response", + "resolution": "resolved", + "slice_id": "c3ef21fcae96c82c00be74b3ab827d4af2085d89cb3fa5521c19a174aad84dbb", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._timeout", + "HttpControlChannel._action_response" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "e64969024ccaeb34d8d91473fad07b3b3d341875846392e7a006406c7ada1954" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._runner\n -> HttpControlChannel.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 15, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "0f827ef81a990258a8a74381c8564a8361afa6712dba3200592659c939adcb9d", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "f29ab212620093d72be20e26c5a399624c7939a6056a728762ed3f84a250bfa3", + "dst_ref": "HttpControlChannel.stop", + "resolution": "resolved", + "slice_id": "0f827ef81a990258a8a74381c8564a8361afa6712dba3200592659c939adcb9d", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._runner", + "HttpControlChannel.stop" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "f29ab212620093d72be20e26c5a399624c7939a6056a728762ed3f84a250bfa3" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._factory\n -> HttpControlChannel.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 16, + "span_end": 21, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e61ec25ded7dbe380d95ce2abcbc1d7a2d2afde5aa8453866df8706dfb7d6ddb", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0", + "dst_ref": "HttpControlChannel.start", + "resolution": "resolved", + "slice_id": "e61ec25ded7dbe380d95ce2abcbc1d7a2d2afde5aa8453866df8706dfb7d6ddb", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._factory", + "HttpControlChannel.start" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel(ControlChannel):\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._timeout = timeout\n self._runner = UvicornThreadRunner(host, port, timeout)\n self._factory = HttpControlAppFactory()\n self._actions: ControlActionSet | None = None\n\n async def start(self, actions: ControlActionSet) -> None:\n self._actions = actions\n app = self._factory.create(self._health_response, self._action_response)\n await self._runner.start(app)\n\n async def stop(self) -> None:\n await self._runner.stop()\n\n @property\n def port(self) -> int:\n return self._runner.port\n\n async def _health_response(self) -> dict[str, object]:\n if self._actions is None:\n return {\"status\": \"unhealthy\", \"detail\": \"control actions are not configured\"}\n return await asyncio.wait_for(self._actions.health(), timeout=float(self._timeout))\n\n async def _action_response(self, action: str, _client_source: str = \"unknown\") -> JSONResponse:\n if self._actions is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"{action} handler is not configured\"}, status_code=404)\n callbacks = {\n \"start\": self._actions.start,\n \"stop\": self._actions.stop,\n \"status\": self._actions.status,\n }\n callback = callbacks.get(action)\n if callback is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"unsupported action: {action}\"}, status_code=404)\n action_timeout = max(float(self._timeout), 10.0) if action in {\"start\", \"stop\"} else float(self._timeout)\n try:\n detail = await asyncio.wait_for(callback(), timeout=action_timeout)\n except asyncio.TimeoutError:\n return JSONResponse(\n content={\"status\": \"accepted\", \"detail\": f\"{action} operation is still in progress\"},\n status_code=202,\n )\n except Exception as exc:\n return JSONResponse(content={\"status\": \"error\", \"detail\": str(exc)}, status_code=500)\n return JSONResponse(content={\"status\": \"ok\", \"detail\": detail or f\"{action} action accepted\"}, status_code=200)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_channel.py:HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "HttpControlChannel", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "HttpControlChannel", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "HttpControlChannel", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "HttpControlChannel", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "HttpControlChannel", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "HttpControlChannel", + "alternatives": [ + "HttpControlChannel" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 166, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 56, + "C0_SOURCE_CHUNKS": 21, + "C4_SEMANTIC_ROLES": 21, + "C2_DEPENDENCY_GRAPH": 55, + "C3_ENTRYPOINTS": 11 + }, + "merge_rank": 20 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Объясни класс HttpControlChannel", + "rag_count": 12 + }, + "output": { + "llm_answer": "## Объяснение сущности `HttpControlChannel`\n\n### Назначение\n`HttpControlChannel` — это класс, отвечающий за управление состоянием и взаимодействие с внешним HTTP каналом для контроля приложения. Он служит основным интерфейсом взаимодействия через HTTP-протокол для конфигурации и мониторинга приложения.\n\n### Ключевые зависимости\nКлючевая зависимость класса — это экземпляр `UvicornThreadRunner`, который запускает сервер для прослушивания HTTP-запросов. Кроме того, используется фабрика `HttpControlAppFactory`, которая отвечает за создание необходимых приложений FastAPI.\n\n### Поток данных или вызовов\n1. **Инициализация (`__init__`)**: \n - При создании экземпляра задаются параметры `host`, `port` и `timeout`.\n - Создаются внутренние объекты `_runner` и `_factory`.\n \n2. **Запуск (`start`)**:\n - Вызывается метод фабрики `_factory.create()` для создания FastAPI-приложения.\n - Запускается сервер с помощью `_runner.start()`.\n - В параметрах передается функция `_health_response`, возвращающая состояние здоровья системы, и функция `_action_response`, обрабатывающая конкретные действия пользователей.\n\n3. **Остановка (`stop`)**:\n - Остановка сервера выполняется вызовом метода `_runner.stop()`.\n\n4. **Получение порта (`port`)**:\n - Возвращает порт, на котором запущен сервер.\n\n5. **Ответы на запросы состояния и действий**:\n - Метод `_health_response` возвращает статус здоровья приложения, основываясь на доступных действиях управления.\n - Метод `_action_response` обрабатывает различные действия пользователя и возвращает соответствующий результат или ошибку.\n\n### Важные детали реализации\n- **Синхронность асинхронных методов**: методы `start`, `_health_response` и `_action_response` являются асинхронными и используют asyncio для ожидания результатов.\n- **Жёсткая привязка к FastAPI**: используется стандартная библиотека FastAPI для создания REST API, что обеспечивает простоту разработки и масштабируемость.\n- **Гибкость конфигурирования**: позволяет легко изменять настройки канала через инициализацию параметров при создании объекта.\n \n### Осторожные выводы\nНа основе косвенных признаков можно предположить, что система использует асинхронную архитектуру и контейнеризована таким образом, чтобы быть гибкой и адаптивной под нужды конкретного окружения исполнения. Однако детальной информации о внешних зависимостях и точном взаимодействии с другими компонентами системы нет." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 795, + "evidence_rows": 12, + "evidence_chars": 3028 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 1 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_explain_ru_v1", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 3616 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_115223/full_chain_plba_code_retrieval_plba-fullchain-explain-http-control-channel.md b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_115223/full_chain_plba_code_retrieval_plba-fullchain-explain-http-control-channel.md new file mode 100644 index 0000000..c601925 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_115223/full_chain_plba_code_retrieval_plba-fullchain-explain-http-control-channel.md @@ -0,0 +1,34 @@ +# plba-fullchain-explain-http-control-channel + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_retrieval.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Объясни класс HttpControlChannel + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 12, + "llm_answer": "## Объяснение сущности `HttpControlChannel`\n\n### Назначение\n`HttpControlChannel` — это класс, отвечающий за управление состоянием и взаимодействие с внешним HTTP каналом для контроля приложения. Он служит основным интерфейсом взаимодействия через HTTP-протокол для конфигурации и мониторинга приложения.\n\n### Ключевые зависимости\nКлючевая зависимость класса — это экземпляр `UvicornThreadRunner`, который запускает сервер для прослушивания HTTP-запросов. Кроме того, используется фабрика `HttpControlAppFactory`, которая отвечает за создание необходимых приложений FastAPI.\n\n### Поток данных или вызовов\n1. **Инициализация (`__init__`)**: \n - При создании экземпляра задаются параметры `host`, `port` и `timeout`.\n - Создаются внутренние объекты `_runner` и `_factory`.\n \n2. **Запуск (`start`)**:\n - Вызывается метод фабрики `_factory.create()` для создания FastAPI-приложения.\n - Запускается сервер с помощью `_runner.start()`.\n - В параметрах передается функция `_health_response`, возвращающая состояние здоровья системы, и функция `_action_response`, обрабатывающая конкретные действия пользователей.\n\n3. **Остановка (`stop`)**:\n - Остановка сервера выполняется вызовом метода `_runner.stop()`.\n\n4. **Получение порта (`port`)**:\n - Возвращает порт, на котором запущен сервер.\n\n5. **Ответы на запросы состояния и действий**:\n - Метод `_health_response` возвращает статус здоровья приложения, основываясь на доступных действиях управления.\n - Метод `_action_response` обрабатывает различные действия пользователя и возвращает соответствующий результат или ошибку.\n\n### Важные детали реализации\n- **Синхронность асинхронных методов**: методы `start`, `_health_response` и `_action_response` являются асинхронными и используют asyncio для ожидания результатов.\n- **Жёсткая привязка к FastAPI**: используется стандартная библиотека FastAPI для создания REST API, что обеспечивает простоту разработки и масштабируемость.\n- **Гибкость конфигурирования**: позволяет легко изменять настройки канала через инициализацию параметров при создании объекта.\n \n### Осторожные выводы\nНа основе косвенных признаков можно предположить, что система использует асинхронную архитектуру и контейнеризована таким образом, чтобы быть гибкой и адаптивной под нужды конкретного окружения исполнения. Однако детальной информации о внешних зависимостях и точном взаимодействии с другими компонентами системы нет.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "HttpControlChannel" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_115223/full_chain_plba_code_retrieval_plba-fullchain-explain-runtime-manager.json b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_115223/full_chain_plba_code_retrieval_plba-fullchain-explain-runtime-manager.json new file mode 100644 index 0000000..4a3a3ae --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_115223/full_chain_plba_code_retrieval_plba-fullchain-explain-runtime-manager.json @@ -0,0 +1,2088 @@ +{ + "case_id": "plba-fullchain-explain-runtime-manager", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_retrieval.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 12, + "llm_answer": "## Назначение класса `RuntimeManager`\nКласс `RuntimeManager` играет роль менеджера, отвечающего за управление жизненным циклом различных компонентов приложения, таких как конфигурация (`ConfigurationManager`), сервисы (`ServiceContainer`), трассировка событий (`TraceService`), здоровье системы (`HealthRegistry`), логирование (`LogManager`) и мониторинг работы рабочих процессов (`WorkerSupervisor`). Он координирует взаимодействие этих компонентов и управляет их состоянием через методы регистрации, инициализации и мониторинга.\n\n## Ключевые зависимости\nКлючевыми зависимостями являются следующие классы и сущности:\n- `ConfigurationManager`: отвечает за хранение и доступ к конфигурации приложения.\n- `ServiceContainer`: контейнер для хранения и управления сервисами приложения.\n- `TraceService`: предоставляет возможность отслеживать события выполнения и состояния системы.\n- `HealthRegistry`: регистрирует и отслеживает состояние здоровья различных сервисов и модулей.\n- `LogManager`: обрабатывает и записывает логи операций и событий.\n- `WorkerSupervisor`: мониторит рабочие процессы и выполняет необходимые действия по управлению ими.\n- `ControlPlaneService`: центральный сервис управления системой, с которым взаимодействует `RuntimeManager`.\n\n## Поток данных или вызовов\nПри создании экземпляра класса `RuntimeManager`, он принимает несколько необязательных аргументов, представляющих вышеуказанные компоненты. После создания экземпляра, вызывается метод `_register_core_services()`, который осуществляет регистрацию базовых служб и сервисов, необходимых для нормального функционирования системы.\n\nВызовы и зависимости внутри класса организуются следующим образом:\n- При каждом обращении к `RuntimeManager.register_module(module)` происходит регистрация нового модуля или сервиса в системе, что позволяет приложению динамически расширять свою функциональность.\n- Методы, такие как `self.control_plane.start()` и `self.control_plane.stop()`, используются для старта и остановки системы соответственно.\n- Метод `self._register_core_services()` предназначен для начальной регистрации основных сервисов и компонент, используемых в приложении.\n\n## Важные детали реализации\n### Конструктор класса\nКонструктор класса получает набор опциональных параметров, каждый из которых представляет собой отдельный компонент или службу. Если соответствующий параметр отсутствует, используется значение по умолчанию соответствующего типа (например, `ConfigurationManager()`).\n\n### Методы управления жизненным циклом\nМетоды `start()` и `stop()` обеспечивают старт и остановку всей системы соответственно. Эти методы зависят от метода `ControlPlaneService._stop_async()`, который запускается при завершении работы системы.\n\n### Реализация функциональности управления состоянием\nРеализована переменная `_state`, которая отражает текущее состояние системы (`LifecycleState.IDLE`, `LifecycleState.RUNNING`, etc.). Этот атрибут используется для контроля над тем, какие операции могут быть выполнены в текущий момент времени.\n\n### Дополнительная логика\nКроме основной функциональности, реализованы механизмы регистрации модулей и проверки состояний, которые позволяют приложению поддерживать гибкость и масштабируемость.\n\n---\n\n**Ограничения и осторожные выводы**\nНа основе предоставленного контекста невозможно полностью раскрыть детали внутренней реализации методов и функционала классов, упомянутых во внешних зависимостях (таких как `ControlPlaneService`, `WorkerSupervisor`, `TraceService` и т.д.), так как информация о них отсутствует напрямую. Следовательно, приведенные выше описания основаны преимущественно на сигнатурах функций и доступных косвенных признаках.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-fullchain-explain-runtime-manager", + "text": "Объясни как работает класс RuntimeManager", + "mode": "full_chain", + "run_started_at": "2026-03-12T11:52:23", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни как работает класс RuntimeManager", + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ], + "confidence": 0.99 + }, + "rag_count": 12, + "rag_rows": [ + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager\nRuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "qname": "RuntimeManager", + "kind": "class", + "signature": "RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests manager\n- orchestrates role-like calls (4)\n- reads and writes state attributes\n- participates in dataflow slices (50)", + "layer": "C4_SEMANTIC_ROLES", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 43, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "symbol_name": "RuntimeManager", + "qname": "RuntimeManager", + "role": "pipeline_stage", + "confidence": 0.67, + "dataflow_participation": 50, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 52, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "## Назначение класса `RuntimeManager`\nКласс `RuntimeManager` играет роль менеджера, отвечающего за управление жизненным циклом различных компонентов приложения, таких как конфигурация (`ConfigurationManager`), сервисы (`ServiceContainer`), трассировка событий (`TraceService`), здоровье системы (`HealthRegistry`), логирование (`LogManager`) и мониторинг работы рабочих процессов (`WorkerSupervisor`). Он координирует взаимодействие этих компонентов и управляет их состоянием через методы регистрации, инициализации и мониторинга.\n\n## Ключевые зависимости\nКлючевыми зависимостями являются следующие классы и сущности:\n- `ConfigurationManager`: отвечает за хранение и доступ к конфигурации приложения.\n- `ServiceContainer`: контейнер для хранения и управления сервисами приложения.\n- `TraceService`: предоставляет возможность отслеживать события выполнения и состояния системы.\n- `HealthRegistry`: регистрирует и отслеживает состояние здоровья различных сервисов и модулей.\n- `LogManager`: обрабатывает и записывает логи операций и событий.\n- `WorkerSupervisor`: мониторит рабочие процессы и выполняет необходимые действия по управлению ими.\n- `ControlPlaneService`: центральный сервис управления системой, с которым взаимодействует `RuntimeManager`.\n\n## Поток данных или вызовов\nПри создании экземпляра класса `RuntimeManager`, он принимает несколько необязательных аргументов, представляющих вышеуказанные компоненты. После создания экземпляра, вызывается метод `_register_core_services()`, который осуществляет регистрацию базовых служб и сервисов, необходимых для нормального функционирования системы.\n\nВызовы и зависимости внутри класса организуются следующим образом:\n- При каждом обращении к `RuntimeManager.register_module(module)` происходит регистрация нового модуля или сервиса в системе, что позволяет приложению динамически расширять свою функциональность.\n- Методы, такие как `self.control_plane.start()` и `self.control_plane.stop()`, используются для старта и остановки системы соответственно.\n- Метод `self._register_core_services()` предназначен для начальной регистрации основных сервисов и компонент, используемых в приложении.\n\n## Важные детали реализации\n### Конструктор класса\nКонструктор класса получает набор опциональных параметров, каждый из которых представляет собой отдельный компонент или службу. Если соответствующий параметр отсутствует, используется значение по умолчанию соответствующего типа (например, `ConfigurationManager()`).\n\n### Методы управления жизненным циклом\nМетоды `start()` и `stop()` обеспечивают старт и остановку всей системы соответственно. Эти методы зависят от метода `ControlPlaneService._stop_async()`, который запускается при завершении работы системы.\n\n### Реализация функциональности управления состоянием\nРеализована переменная `_state`, которая отражает текущее состояние системы (`LifecycleState.IDLE`, `LifecycleState.RUNNING`, etc.). Этот атрибут используется для контроля над тем, какие операции могут быть выполнены в текущий момент времени.\n\n### Дополнительная логика\nКроме основной функциональности, реализованы механизмы регистрации модулей и проверки состояний, которые позволяют приложению поддерживать гибкость и масштабируемость.\n\n---\n\n**Ограничения и осторожные выводы**\nНа основе предоставленного контекста невозможно полностью раскрыть детали внутренней реализации методов и функционала классов, упомянутых во внешних зависимостях (таких как `ControlPlaneService`, `WorkerSupervisor`, `TraceService` и т.д.), так как информация о них отсутствует напрямую. Следовательно, приведенные выше описания основаны преимущественно на сигнатурах функций и доступных косвенных признаках.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS", + "C4_SEMANTIC_ROLES" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 322, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 30, + "C0_SOURCE_CHUNKS": 17, + "C4_SEMANTIC_ROLES": 14, + "C2_DEPENDENCY_GRAPH": 58, + "C3_ENTRYPOINTS": 12 + }, + "merge_rank": 18, + "prompt_build": 0, + "llm_call": 4725 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 797, + "evidence_rows": 12, + "evidence_chars": 7130 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 2 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_explain_ru_v1", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "RuntimeManager" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 12, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-fullchain-explain-runtime-manager", + "mode": "full_chain", + "run_started_at": "2026-03-12T11:52:23", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Объясни как работает класс RuntimeManager", + "normalized_query": "Объясни как работает класс RuntimeManager" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Объясни как работает класс RuntimeManager" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни как работает класс RuntimeManager" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Объясни как работает класс RuntimeManager" + }, + "output": { + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ], + "confidence": 0.99 + }, + "rag_count": 12, + "rag_rows": [ + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager\nRuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "qname": "RuntimeManager", + "kind": "class", + "signature": "RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests manager\n- orchestrates role-like calls (4)\n- reads and writes state attributes\n- participates in dataflow slices (50)", + "layer": "C4_SEMANTIC_ROLES", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 43, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "symbol_name": "RuntimeManager", + "qname": "RuntimeManager", + "role": "pipeline_stage", + "confidence": 0.67, + "dataflow_participation": 50, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 52, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 322, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 30, + "C0_SOURCE_CHUNKS": 17, + "C4_SEMANTIC_ROLES": 14, + "C2_DEPENDENCY_GRAPH": 58, + "C3_ENTRYPOINTS": 12 + }, + "merge_rank": 18 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Объясни как работает класс RuntimeManager", + "rag_count": 12 + }, + "output": { + "llm_answer": "## Назначение класса `RuntimeManager`\nКласс `RuntimeManager` играет роль менеджера, отвечающего за управление жизненным циклом различных компонентов приложения, таких как конфигурация (`ConfigurationManager`), сервисы (`ServiceContainer`), трассировка событий (`TraceService`), здоровье системы (`HealthRegistry`), логирование (`LogManager`) и мониторинг работы рабочих процессов (`WorkerSupervisor`). Он координирует взаимодействие этих компонентов и управляет их состоянием через методы регистрации, инициализации и мониторинга.\n\n## Ключевые зависимости\nКлючевыми зависимостями являются следующие классы и сущности:\n- `ConfigurationManager`: отвечает за хранение и доступ к конфигурации приложения.\n- `ServiceContainer`: контейнер для хранения и управления сервисами приложения.\n- `TraceService`: предоставляет возможность отслеживать события выполнения и состояния системы.\n- `HealthRegistry`: регистрирует и отслеживает состояние здоровья различных сервисов и модулей.\n- `LogManager`: обрабатывает и записывает логи операций и событий.\n- `WorkerSupervisor`: мониторит рабочие процессы и выполняет необходимые действия по управлению ими.\n- `ControlPlaneService`: центральный сервис управления системой, с которым взаимодействует `RuntimeManager`.\n\n## Поток данных или вызовов\nПри создании экземпляра класса `RuntimeManager`, он принимает несколько необязательных аргументов, представляющих вышеуказанные компоненты. После создания экземпляра, вызывается метод `_register_core_services()`, который осуществляет регистрацию базовых служб и сервисов, необходимых для нормального функционирования системы.\n\nВызовы и зависимости внутри класса организуются следующим образом:\n- При каждом обращении к `RuntimeManager.register_module(module)` происходит регистрация нового модуля или сервиса в системе, что позволяет приложению динамически расширять свою функциональность.\n- Методы, такие как `self.control_plane.start()` и `self.control_plane.stop()`, используются для старта и остановки системы соответственно.\n- Метод `self._register_core_services()` предназначен для начальной регистрации основных сервисов и компонент, используемых в приложении.\n\n## Важные детали реализации\n### Конструктор класса\nКонструктор класса получает набор опциональных параметров, каждый из которых представляет собой отдельный компонент или службу. Если соответствующий параметр отсутствует, используется значение по умолчанию соответствующего типа (например, `ConfigurationManager()`).\n\n### Методы управления жизненным циклом\nМетоды `start()` и `stop()` обеспечивают старт и остановку всей системы соответственно. Эти методы зависят от метода `ControlPlaneService._stop_async()`, который запускается при завершении работы системы.\n\n### Реализация функциональности управления состоянием\nРеализована переменная `_state`, которая отражает текущее состояние системы (`LifecycleState.IDLE`, `LifecycleState.RUNNING`, etc.). Этот атрибут используется для контроля над тем, какие операции могут быть выполнены в текущий момент времени.\n\n### Дополнительная логика\nКроме основной функциональности, реализованы механизмы регистрации модулей и проверки состояний, которые позволяют приложению поддерживать гибкость и масштабируемость.\n\n---\n\n**Ограничения и осторожные выводы**\nНа основе предоставленного контекста невозможно полностью раскрыть детали внутренней реализации методов и функционала классов, упомянутых во внешних зависимостях (таких как `ControlPlaneService`, `WorkerSupervisor`, `TraceService` и т.д.), так как информация о них отсутствует напрямую. Следовательно, приведенные выше описания основаны преимущественно на сигнатурах функций и доступных косвенных признаках." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 797, + "evidence_rows": 12, + "evidence_chars": 7130 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 2 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_explain_ru_v1", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 4725 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_115223/full_chain_plba_code_retrieval_plba-fullchain-explain-runtime-manager.md b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_115223/full_chain_plba_code_retrieval_plba-fullchain-explain-runtime-manager.md new file mode 100644 index 0000000..292cc5b --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_115223/full_chain_plba_code_retrieval_plba-fullchain-explain-runtime-manager.md @@ -0,0 +1,34 @@ +# plba-fullchain-explain-runtime-manager + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_retrieval.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Объясни как работает класс RuntimeManager + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 12, + "llm_answer": "## Назначение класса `RuntimeManager`\nКласс `RuntimeManager` играет роль менеджера, отвечающего за управление жизненным циклом различных компонентов приложения, таких как конфигурация (`ConfigurationManager`), сервисы (`ServiceContainer`), трассировка событий (`TraceService`), здоровье системы (`HealthRegistry`), логирование (`LogManager`) и мониторинг работы рабочих процессов (`WorkerSupervisor`). Он координирует взаимодействие этих компонентов и управляет их состоянием через методы регистрации, инициализации и мониторинга.\n\n## Ключевые зависимости\nКлючевыми зависимостями являются следующие классы и сущности:\n- `ConfigurationManager`: отвечает за хранение и доступ к конфигурации приложения.\n- `ServiceContainer`: контейнер для хранения и управления сервисами приложения.\n- `TraceService`: предоставляет возможность отслеживать события выполнения и состояния системы.\n- `HealthRegistry`: регистрирует и отслеживает состояние здоровья различных сервисов и модулей.\n- `LogManager`: обрабатывает и записывает логи операций и событий.\n- `WorkerSupervisor`: мониторит рабочие процессы и выполняет необходимые действия по управлению ими.\n- `ControlPlaneService`: центральный сервис управления системой, с которым взаимодействует `RuntimeManager`.\n\n## Поток данных или вызовов\nПри создании экземпляра класса `RuntimeManager`, он принимает несколько необязательных аргументов, представляющих вышеуказанные компоненты. После создания экземпляра, вызывается метод `_register_core_services()`, который осуществляет регистрацию базовых служб и сервисов, необходимых для нормального функционирования системы.\n\nВызовы и зависимости внутри класса организуются следующим образом:\n- При каждом обращении к `RuntimeManager.register_module(module)` происходит регистрация нового модуля или сервиса в системе, что позволяет приложению динамически расширять свою функциональность.\n- Методы, такие как `self.control_plane.start()` и `self.control_plane.stop()`, используются для старта и остановки системы соответственно.\n- Метод `self._register_core_services()` предназначен для начальной регистрации основных сервисов и компонент, используемых в приложении.\n\n## Важные детали реализации\n### Конструктор класса\nКонструктор класса получает набор опциональных параметров, каждый из которых представляет собой отдельный компонент или службу. Если соответствующий параметр отсутствует, используется значение по умолчанию соответствующего типа (например, `ConfigurationManager()`).\n\n### Методы управления жизненным циклом\nМетоды `start()` и `stop()` обеспечивают старт и остановку всей системы соответственно. Эти методы зависят от метода `ControlPlaneService._stop_async()`, который запускается при завершении работы системы.\n\n### Реализация функциональности управления состоянием\nРеализована переменная `_state`, которая отражает текущее состояние системы (`LifecycleState.IDLE`, `LifecycleState.RUNNING`, etc.). Этот атрибут используется для контроля над тем, какие операции могут быть выполнены в текущий момент времени.\n\n### Дополнительная логика\nКроме основной функциональности, реализованы механизмы регистрации модулей и проверки состояний, которые позволяют приложению поддерживать гибкость и масштабируемость.\n\n---\n\n**Ограничения и осторожные выводы**\nНа основе предоставленного контекста невозможно полностью раскрыть детали внутренней реализации методов и функционала классов, упомянутых во внешних зависимостях (таких как `ControlPlaneService`, `WorkerSupervisor`, `TraceService` и т.д.), так как информация о них отсутствует напрямую. Следовательно, приведенные выше описания основаны преимущественно на сигнатурах функций и доступных косвенных признаках.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_115223/full_chain_plba_code_retrieval_plba-fullchain-explain-trace-service.json b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_115223/full_chain_plba_code_retrieval_plba-fullchain-explain-trace-service.json new file mode 100644 index 0000000..acf0a43 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_115223/full_chain_plba_code_retrieval_plba-fullchain-explain-trace-service.json @@ -0,0 +1,2208 @@ +{ + "case_id": "plba-fullchain-explain-trace-service", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_retrieval.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 14, + "llm_answer": "## Объяснение работы `TraceService`\n\n### Назначение\n`TraceService` — это сервис для управления контекстом трассировки и записи событий трассировки. Он отвечает за создание контекста трассировки, запись сообщений и управление хранилищем трассировок.\n\n### Ключевые зависимости\n- **TraceContextFactory**: Базовый класс для создания экземпляров, связанных с контекстом трассировки.\n- **TraceTransport**: Интерфейс для передачи трассировочных данных наружу системы.\n- **TraceContextStore**: Хранилище для отслеживания состояний трассировки.\n- **NoOpTraceTransport**: Транспорт по умолчанию, используемый при отсутствии активного транспорта.\n\n### Поток данных или вызовов\n1. **Инициализация (`__init__`)** \n - При создании экземпляра сервиса инициализируются транспорт и хранилище трассировок. Если транспорт или хранилище не предоставлены явно, используются предопределенные значения.\n \n2. **Создание контекста трассировки (`create_context`)** \n - Создаёт новый объект трассировки (`TraceContextRecord`), записывает его в хранилище и отправляет через транспорт.\n - Возвращает идентификатор созданной трассировки.\n\n3. **Вход в контекст трассировки (`open_context`)** \n - Вызывает метод `create_context`, возвращая созданный идентификатор трассировки.\n\n4. **Запись сообщения трассировки (`write_message`)** \n - Записывает сообщение трассировки в транспорт.\n\n5. **Запись контекста трассировки (`write_context`)** \n - Обеспечивает запись контекста трассировки в транспорт.\n\n### Важные детали реализации\n- **Хранение контекста трассировки:** Контекст сохраняется локально в хранилище до тех пор, пока он активно используется. После завершения работы с ним контекст удаляется автоматически.\n- **Отсутствие ошибок транспортировки:** В случае ошибки при передаче трассировочного сообщения фиксируется ошибка и сообщение логируется.\n- **Использование UUID для идентификации трассировки:** Каждый запрос генерирует уникальный идентификатор (`trace_id`), что позволяет отслеживать цепочки запросов и их зависимости.\n\n### Косвенные признаки (осторожный вывод)\n- На основании связей вызова и структуры файла можно предположить, что `TraceService` играет роль в управлении и журналировании процессов внутри приложения, обеспечивая централизованное ведение журнала событий и состояния трассировки.\n\n---\n\nТаким образом, основная задача `TraceService` заключается в обеспечении функциональности трассировки и сохранения информации о каждом этапе выполнения запроса, предоставляя механизмы для сбора и хранения этих данных.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "TraceService" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-fullchain-explain-trace-service", + "text": "Как работает TraceService?", + "mode": "full_chain", + "run_started_at": "2026-03-12T11:52:23", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Как работает TraceService?", + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "TraceService", + "alternatives": [ + "TraceService" + ], + "confidence": 0.99 + }, + "rag_count": 14, + "rag_rows": [ + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceService\nTraceService(TraceContextFactory)", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService", + "span_start": 39, + "span_end": 166, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "c2b2b976d99f2c600000b753731b26e0a69adcb4359398b93073590c5d5d04f4", + "qname": "TraceService", + "kind": "class", + "signature": "TraceService(TraceContextFactory)", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (13)", + "layer": "C4_SEMANTIC_ROLES", + "title": "TraceService", + "span_start": 39, + "span_end": 166, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 60, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "c2b2b976d99f2c600000b753731b26e0a69adcb4359398b93073590c5d5d04f4", + "symbol_name": "TraceService", + "qname": "TraceService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 13, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.create_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 61, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3b052062067a78aef3302ee1d996897e02a67d1b340397bea4f59fe147c0492a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a", + "dst_ref": "TraceService.create_context", + "resolution": "resolved", + "slice_id": "3b052062067a78aef3302ee1d996897e02a67d1b340397bea4f59fe147c0492a", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.create_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.close_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 84, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "7a9353ef57c9ae5d19b3a0c6ac50fad05e6d21d31bbe1cd1cd07af6332ba6505", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "01e14158dcced7e52d0c8ac84ac7b9a75225c261b6aca6a1d7da802d0994721c", + "dst_ref": "TraceService.close_context", + "resolution": "resolved", + "slice_id": "7a9353ef57c9ae5d19b3a0c6ac50fad05e6d21d31bbe1cd1cd07af6332ba6505", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.close_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "01e14158dcced7e52d0c8ac84ac7b9a75225c261b6aca6a1d7da802d0994721c" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.open_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 78, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a6e13b9ebc4fed84586afd53ed92a4d14757e440873f572b2337d5622ee96031", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426", + "dst_ref": "TraceService.open_context", + "resolution": "resolved", + "slice_id": "a6e13b9ebc4fed84586afd53ed92a4d14757e440873f572b2337d5622ee96031", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.open_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.transport\n -> TraceService.__init__", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 41, + "span_end": 43, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "1e923a93faa05c3c43ca9b19bd047007a8589ccce57d3cc1798ae7f9f200af98", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "dst_ref": "TraceService.__init__", + "resolution": "resolved", + "slice_id": "1e923a93faa05c3c43ca9b19bd047007a8589ccce57d3cc1798ae7f9f200af98", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.transport", + "TraceService.__init__" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.current_trace_id", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 81, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3ea17138634b1190bded77ddb84aa1595124f6519b246f24fc4b02bd62b5cac1", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c", + "dst_ref": "TraceService.current_trace_id", + "resolution": "resolved", + "slice_id": "3ea17138634b1190bded77ddb84aa1595124f6519b246f24fc4b02bd62b5cac1", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.current_trace_id" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.step", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 88, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "9f34c5da9b09fba99df6f6b1bde183a9aeb45111b8218a747c71590c2c9f60f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "c44bfbc66cf747283f30088da3e011a10395031d41e77b74e523c24997f641ca", + "dst_ref": "TraceService.step", + "resolution": "resolved", + "slice_id": "9f34c5da9b09fba99df6f6b1bde183a9aeb45111b8218a747c71590c2c9f60f2", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.step" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "c44bfbc66cf747283f30088da3e011a10395031d41e77b74e523c24997f641ca" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceRecordWriter:\n def __init__(self, transport: TraceTransport) -> None:\n self._logger = logging.getLogger(__name__)\n self._transport = transport\n\n def write_context(self, record: TraceContextRecord) -> None:\n try:\n self._transport.write_context(record)\n except Exception:\n self._logger.exception(\"Trace transport failed to write context %s\", record.trace_id)\n\n def write_message(self, record: TraceLogMessage) -> None:\n try:\n self._transport.write_message(record)\n except Exception:\n self._logger.exception(\"Trace transport failed to write message for %s\", record.trace_id)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/tracing/service.py:TraceRecordWriter", + "span_start": 21, + "span_end": 36, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceService(TraceContextFactory):\n def __init__(self, transport: TraceTransport | None = None, store: TraceContextStore | None = None) -> None:\n self.transport = transport or NoOpTraceTransport()\n self.store = store or TraceContextStore()\n self._writer = TraceRecordWriter(self.transport)\n\n def create_context(\n self,\n *,\n alias: str,\n parent_id: str | None = None,\n kind: str | None = None,\n attrs: dict[str, Any] | None = None,\n ) -> str:\n record = TraceContextRecord(\n trace_id=uuid4().hex,\n alias=str(alias or \"\"),\n parent_id=parent_id,\n type=kind,\n event_time=utc_now(),\n attrs=dict(attrs or {}),\n )\n self.store.push(record)\n self._writer.write_context(record)\n return record.trace_id\n\n @contextmanager\n def open_context(\n self,\n *,\n alias: str,\n parent_id: str | None = None,\n kind: str | None = None,\n attrs: dict[str, Any] | None = None,\n ) -> Iterator[str]:\n trace_id = self.create_context(alias=alias, parent_id=parent_id, kind=kind, attrs=attrs)\n try:\n yield trace_id\n finally:\n self.store.pop()\n\n def current_trace_id(self) -> str | None:\n return self.store.current_trace_id()\n\n def close_context(self) -> str | None:\n previous = self.store.pop()\n return previous.record.trace_id if previous else None\n\n def step(self, name: str) -> None:\n self.store.set_step(str(name or \"\"))\n\n def info(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"INFO\", message, status, attrs)\n\n def debug(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"DEBUG\", message, status, attrs)\n\n def warning(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"WARNING\", message, status, attrs)\n\n def error(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"ERROR\", message, status, attrs)\n\n def exception(self, message: str, *, status: str = \"failed\", attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"ERROR\", message, status, attrs)\n\n def new_root(self, operation: str) -> TraceContext:\n trace_id = self.create_context(alias=operation, kind=\"operation\", attrs={\"operation\": operation})\n return TraceContext(trace_id=trace_id, span_id=trace_id, attributes={\"operation\": operation})\n\n def child_of(self, parent: TraceContext, operation: str) -> TraceContext:\n trace_id = self.create_context(\n alias=operation,\n parent_id=parent.trace_id,\n kind=\"worker\",\n attrs={\"operation\": operation},\n )\n return TraceContext(\n trace_id=trace_id,\n span_id=trace_id,\n parent_span_id=parent.span_id,\n attributes={\"operation\": operation},\n )\n\n def attach(self, metadata: dict[str, object], context: TraceContext) -> dict[str, object]:\n updated = dict(metadata)\n updated[\"trace_id\"] = context.trace_id\n updated[\"span_id\"] = context.span_id\n updated[\"parent_span_id\"] = context.parent_span_id\n return updated\n\n def resume(self, metadata: dict[str, object], operation: str) -> TraceContext:\n trace_id = str(metadata.get(\"trace_id\") or uuid4().hex)\n span_id = str(metadata.get(\"span_id\") or trace_id)\n parent_id = metadata.get(\"parent_span_id\")\n self.create_context(\n alias=operation,\n parent_id=str(parent_id) if parent_id else None,\n kind=\"worker\",\n attrs=dict(metadata),\n )\n return TraceContext(\n trace_id=trace_id,\n span_id=span_id,\n parent_span_id=str(parent_id) if parent_id else None,\n attributes={\"operation\": operation},\n )\n\n def _write_message(\n self,\n level: TraceLevel,\n message: str,\n status: str | None,\n attrs: dict[str, Any] | None,\n ) -> None:\n active = self.store.current()\n if active is None:\n raise RuntimeError(\"Trace context is not bound. Call create_context() first.\")\n record = TraceLogMessage(\n trace_id=active.record.trace_id,\n step=active.step,\n status=str(status or \"\"),\n message=str(message or \"\"),\n level=level,\n event_time=utc_now(),\n attrs=dict(attrs or {}),\n )\n self._writer.write_message(record)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/tracing/service.py:TraceService", + "span_start": 39, + "span_end": 166, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceManager(TraceService):\n \"\"\"Compatibility alias during the transition from ConfigManager-shaped naming.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/tracing/service.py:TraceManager", + "span_start": 169, + "span_end": 170, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 2, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "## Объяснение работы `TraceService`\n\n### Назначение\n`TraceService` — это сервис для управления контекстом трассировки и записи событий трассировки. Он отвечает за создание контекста трассировки, запись сообщений и управление хранилищем трассировок.\n\n### Ключевые зависимости\n- **TraceContextFactory**: Базовый класс для создания экземпляров, связанных с контекстом трассировки.\n- **TraceTransport**: Интерфейс для передачи трассировочных данных наружу системы.\n- **TraceContextStore**: Хранилище для отслеживания состояний трассировки.\n- **NoOpTraceTransport**: Транспорт по умолчанию, используемый при отсутствии активного транспорта.\n\n### Поток данных или вызовов\n1. **Инициализация (`__init__`)** \n - При создании экземпляра сервиса инициализируются транспорт и хранилище трассировок. Если транспорт или хранилище не предоставлены явно, используются предопределенные значения.\n \n2. **Создание контекста трассировки (`create_context`)** \n - Создаёт новый объект трассировки (`TraceContextRecord`), записывает его в хранилище и отправляет через транспорт.\n - Возвращает идентификатор созданной трассировки.\n\n3. **Вход в контекст трассировки (`open_context`)** \n - Вызывает метод `create_context`, возвращая созданный идентификатор трассировки.\n\n4. **Запись сообщения трассировки (`write_message`)** \n - Записывает сообщение трассировки в транспорт.\n\n5. **Запись контекста трассировки (`write_context`)** \n - Обеспечивает запись контекста трассировки в транспорт.\n\n### Важные детали реализации\n- **Хранение контекста трассировки:** Контекст сохраняется локально в хранилище до тех пор, пока он активно используется. После завершения работы с ним контекст удаляется автоматически.\n- **Отсутствие ошибок транспортировки:** В случае ошибки при передаче трассировочного сообщения фиксируется ошибка и сообщение логируется.\n- **Использование UUID для идентификации трассировки:** Каждый запрос генерирует уникальный идентификатор (`trace_id`), что позволяет отслеживать цепочки запросов и их зависимости.\n\n### Косвенные признаки (осторожный вывод)\n- На основании связей вызова и структуры файла можно предположить, что `TraceService` играет роль в управлении и журналировании процессов внутри приложения, обеспечивая централизованное ведение журнала событий и состояния трассировки.\n\n---\n\nТаким образом, основная задача `TraceService` заключается в обеспечении функциональности трассировки и сохранения информации о каждом этапе выполнения запроса, предоставляя механизмы для сбора и хранения этих данных.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS", + "C4_SEMANTIC_ROLES" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "TraceService" + ], + "keyword_hints": [ + "TraceService" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "TraceService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "TraceService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "TraceService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "TraceService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "TraceService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "TraceService", + "alternatives": [ + "TraceService" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 140, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 46, + "C0_SOURCE_CHUNKS": 19, + "C4_SEMANTIC_ROLES": 18, + "C2_DEPENDENCY_GRAPH": 46, + "C3_ENTRYPOINTS": 9 + }, + "merge_rank": 20, + "prompt_build": 0, + "llm_call": 3676 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 931, + "evidence_rows": 14, + "evidence_chars": 6323 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 1 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 3, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_explain_ru_v1", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "TraceService" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 14, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-fullchain-explain-trace-service", + "mode": "full_chain", + "run_started_at": "2026-03-12T11:52:23", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Как работает TraceService?", + "normalized_query": "Как работает TraceService?" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Как работает TraceService?" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Как работает TraceService?" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "TraceService" + ], + "keyword_hints": [ + "TraceService" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Как работает TraceService?" + }, + "output": { + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "TraceService", + "alternatives": [ + "TraceService" + ], + "confidence": 0.99 + }, + "rag_count": 14, + "rag_rows": [ + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceService\nTraceService(TraceContextFactory)", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService", + "span_start": 39, + "span_end": 166, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "c2b2b976d99f2c600000b753731b26e0a69adcb4359398b93073590c5d5d04f4", + "qname": "TraceService", + "kind": "class", + "signature": "TraceService(TraceContextFactory)", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (13)", + "layer": "C4_SEMANTIC_ROLES", + "title": "TraceService", + "span_start": 39, + "span_end": 166, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 60, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "c2b2b976d99f2c600000b753731b26e0a69adcb4359398b93073590c5d5d04f4", + "symbol_name": "TraceService", + "qname": "TraceService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 13, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.create_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 61, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3b052062067a78aef3302ee1d996897e02a67d1b340397bea4f59fe147c0492a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a", + "dst_ref": "TraceService.create_context", + "resolution": "resolved", + "slice_id": "3b052062067a78aef3302ee1d996897e02a67d1b340397bea4f59fe147c0492a", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.create_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.close_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 84, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "7a9353ef57c9ae5d19b3a0c6ac50fad05e6d21d31bbe1cd1cd07af6332ba6505", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "01e14158dcced7e52d0c8ac84ac7b9a75225c261b6aca6a1d7da802d0994721c", + "dst_ref": "TraceService.close_context", + "resolution": "resolved", + "slice_id": "7a9353ef57c9ae5d19b3a0c6ac50fad05e6d21d31bbe1cd1cd07af6332ba6505", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.close_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "01e14158dcced7e52d0c8ac84ac7b9a75225c261b6aca6a1d7da802d0994721c" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.open_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 78, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a6e13b9ebc4fed84586afd53ed92a4d14757e440873f572b2337d5622ee96031", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426", + "dst_ref": "TraceService.open_context", + "resolution": "resolved", + "slice_id": "a6e13b9ebc4fed84586afd53ed92a4d14757e440873f572b2337d5622ee96031", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.open_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.transport\n -> TraceService.__init__", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 41, + "span_end": 43, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "1e923a93faa05c3c43ca9b19bd047007a8589ccce57d3cc1798ae7f9f200af98", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "dst_ref": "TraceService.__init__", + "resolution": "resolved", + "slice_id": "1e923a93faa05c3c43ca9b19bd047007a8589ccce57d3cc1798ae7f9f200af98", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.transport", + "TraceService.__init__" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.current_trace_id", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 81, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3ea17138634b1190bded77ddb84aa1595124f6519b246f24fc4b02bd62b5cac1", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c", + "dst_ref": "TraceService.current_trace_id", + "resolution": "resolved", + "slice_id": "3ea17138634b1190bded77ddb84aa1595124f6519b246f24fc4b02bd62b5cac1", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.current_trace_id" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.step", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 88, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "9f34c5da9b09fba99df6f6b1bde183a9aeb45111b8218a747c71590c2c9f60f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "c44bfbc66cf747283f30088da3e011a10395031d41e77b74e523c24997f641ca", + "dst_ref": "TraceService.step", + "resolution": "resolved", + "slice_id": "9f34c5da9b09fba99df6f6b1bde183a9aeb45111b8218a747c71590c2c9f60f2", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.step" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "c44bfbc66cf747283f30088da3e011a10395031d41e77b74e523c24997f641ca" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceRecordWriter:\n def __init__(self, transport: TraceTransport) -> None:\n self._logger = logging.getLogger(__name__)\n self._transport = transport\n\n def write_context(self, record: TraceContextRecord) -> None:\n try:\n self._transport.write_context(record)\n except Exception:\n self._logger.exception(\"Trace transport failed to write context %s\", record.trace_id)\n\n def write_message(self, record: TraceLogMessage) -> None:\n try:\n self._transport.write_message(record)\n except Exception:\n self._logger.exception(\"Trace transport failed to write message for %s\", record.trace_id)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/tracing/service.py:TraceRecordWriter", + "span_start": 21, + "span_end": 36, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceService(TraceContextFactory):\n def __init__(self, transport: TraceTransport | None = None, store: TraceContextStore | None = None) -> None:\n self.transport = transport or NoOpTraceTransport()\n self.store = store or TraceContextStore()\n self._writer = TraceRecordWriter(self.transport)\n\n def create_context(\n self,\n *,\n alias: str,\n parent_id: str | None = None,\n kind: str | None = None,\n attrs: dict[str, Any] | None = None,\n ) -> str:\n record = TraceContextRecord(\n trace_id=uuid4().hex,\n alias=str(alias or \"\"),\n parent_id=parent_id,\n type=kind,\n event_time=utc_now(),\n attrs=dict(attrs or {}),\n )\n self.store.push(record)\n self._writer.write_context(record)\n return record.trace_id\n\n @contextmanager\n def open_context(\n self,\n *,\n alias: str,\n parent_id: str | None = None,\n kind: str | None = None,\n attrs: dict[str, Any] | None = None,\n ) -> Iterator[str]:\n trace_id = self.create_context(alias=alias, parent_id=parent_id, kind=kind, attrs=attrs)\n try:\n yield trace_id\n finally:\n self.store.pop()\n\n def current_trace_id(self) -> str | None:\n return self.store.current_trace_id()\n\n def close_context(self) -> str | None:\n previous = self.store.pop()\n return previous.record.trace_id if previous else None\n\n def step(self, name: str) -> None:\n self.store.set_step(str(name or \"\"))\n\n def info(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"INFO\", message, status, attrs)\n\n def debug(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"DEBUG\", message, status, attrs)\n\n def warning(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"WARNING\", message, status, attrs)\n\n def error(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"ERROR\", message, status, attrs)\n\n def exception(self, message: str, *, status: str = \"failed\", attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"ERROR\", message, status, attrs)\n\n def new_root(self, operation: str) -> TraceContext:\n trace_id = self.create_context(alias=operation, kind=\"operation\", attrs={\"operation\": operation})\n return TraceContext(trace_id=trace_id, span_id=trace_id, attributes={\"operation\": operation})\n\n def child_of(self, parent: TraceContext, operation: str) -> TraceContext:\n trace_id = self.create_context(\n alias=operation,\n parent_id=parent.trace_id,\n kind=\"worker\",\n attrs={\"operation\": operation},\n )\n return TraceContext(\n trace_id=trace_id,\n span_id=trace_id,\n parent_span_id=parent.span_id,\n attributes={\"operation\": operation},\n )\n\n def attach(self, metadata: dict[str, object], context: TraceContext) -> dict[str, object]:\n updated = dict(metadata)\n updated[\"trace_id\"] = context.trace_id\n updated[\"span_id\"] = context.span_id\n updated[\"parent_span_id\"] = context.parent_span_id\n return updated\n\n def resume(self, metadata: dict[str, object], operation: str) -> TraceContext:\n trace_id = str(metadata.get(\"trace_id\") or uuid4().hex)\n span_id = str(metadata.get(\"span_id\") or trace_id)\n parent_id = metadata.get(\"parent_span_id\")\n self.create_context(\n alias=operation,\n parent_id=str(parent_id) if parent_id else None,\n kind=\"worker\",\n attrs=dict(metadata),\n )\n return TraceContext(\n trace_id=trace_id,\n span_id=span_id,\n parent_span_id=str(parent_id) if parent_id else None,\n attributes={\"operation\": operation},\n )\n\n def _write_message(\n self,\n level: TraceLevel,\n message: str,\n status: str | None,\n attrs: dict[str, Any] | None,\n ) -> None:\n active = self.store.current()\n if active is None:\n raise RuntimeError(\"Trace context is not bound. Call create_context() first.\")\n record = TraceLogMessage(\n trace_id=active.record.trace_id,\n step=active.step,\n status=str(status or \"\"),\n message=str(message or \"\"),\n level=level,\n event_time=utc_now(),\n attrs=dict(attrs or {}),\n )\n self._writer.write_message(record)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/tracing/service.py:TraceService", + "span_start": 39, + "span_end": 166, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceManager(TraceService):\n \"\"\"Compatibility alias during the transition from ConfigManager-shaped naming.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/tracing/service.py:TraceManager", + "span_start": 169, + "span_end": 170, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 2, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "TraceService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "TraceService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "TraceService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "TraceService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "TraceService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "TraceService", + "alternatives": [ + "TraceService" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 140, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 46, + "C0_SOURCE_CHUNKS": 19, + "C4_SEMANTIC_ROLES": 18, + "C2_DEPENDENCY_GRAPH": 46, + "C3_ENTRYPOINTS": 9 + }, + "merge_rank": 20 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Как работает TraceService?", + "rag_count": 14 + }, + "output": { + "llm_answer": "## Объяснение работы `TraceService`\n\n### Назначение\n`TraceService` — это сервис для управления контекстом трассировки и записи событий трассировки. Он отвечает за создание контекста трассировки, запись сообщений и управление хранилищем трассировок.\n\n### Ключевые зависимости\n- **TraceContextFactory**: Базовый класс для создания экземпляров, связанных с контекстом трассировки.\n- **TraceTransport**: Интерфейс для передачи трассировочных данных наружу системы.\n- **TraceContextStore**: Хранилище для отслеживания состояний трассировки.\n- **NoOpTraceTransport**: Транспорт по умолчанию, используемый при отсутствии активного транспорта.\n\n### Поток данных или вызовов\n1. **Инициализация (`__init__`)** \n - При создании экземпляра сервиса инициализируются транспорт и хранилище трассировок. Если транспорт или хранилище не предоставлены явно, используются предопределенные значения.\n \n2. **Создание контекста трассировки (`create_context`)** \n - Создаёт новый объект трассировки (`TraceContextRecord`), записывает его в хранилище и отправляет через транспорт.\n - Возвращает идентификатор созданной трассировки.\n\n3. **Вход в контекст трассировки (`open_context`)** \n - Вызывает метод `create_context`, возвращая созданный идентификатор трассировки.\n\n4. **Запись сообщения трассировки (`write_message`)** \n - Записывает сообщение трассировки в транспорт.\n\n5. **Запись контекста трассировки (`write_context`)** \n - Обеспечивает запись контекста трассировки в транспорт.\n\n### Важные детали реализации\n- **Хранение контекста трассировки:** Контекст сохраняется локально в хранилище до тех пор, пока он активно используется. После завершения работы с ним контекст удаляется автоматически.\n- **Отсутствие ошибок транспортировки:** В случае ошибки при передаче трассировочного сообщения фиксируется ошибка и сообщение логируется.\n- **Использование UUID для идентификации трассировки:** Каждый запрос генерирует уникальный идентификатор (`trace_id`), что позволяет отслеживать цепочки запросов и их зависимости.\n\n### Косвенные признаки (осторожный вывод)\n- На основании связей вызова и структуры файла можно предположить, что `TraceService` играет роль в управлении и журналировании процессов внутри приложения, обеспечивая централизованное ведение журнала событий и состояния трассировки.\n\n---\n\nТаким образом, основная задача `TraceService` заключается в обеспечении функциональности трассировки и сохранения информации о каждом этапе выполнения запроса, предоставляя механизмы для сбора и хранения этих данных." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 931, + "evidence_rows": 14, + "evidence_chars": 6323 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 1 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 3, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_explain_ru_v1", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 3676 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_115223/full_chain_plba_code_retrieval_plba-fullchain-explain-trace-service.md b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_115223/full_chain_plba_code_retrieval_plba-fullchain-explain-trace-service.md new file mode 100644 index 0000000..389beae --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_115223/full_chain_plba_code_retrieval_plba-fullchain-explain-trace-service.md @@ -0,0 +1,34 @@ +# plba-fullchain-explain-trace-service + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_retrieval.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Как работает TraceService? + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 14, + "llm_answer": "## Объяснение работы `TraceService`\n\n### Назначение\n`TraceService` — это сервис для управления контекстом трассировки и записи событий трассировки. Он отвечает за создание контекста трассировки, запись сообщений и управление хранилищем трассировок.\n\n### Ключевые зависимости\n- **TraceContextFactory**: Базовый класс для создания экземпляров, связанных с контекстом трассировки.\n- **TraceTransport**: Интерфейс для передачи трассировочных данных наружу системы.\n- **TraceContextStore**: Хранилище для отслеживания состояний трассировки.\n- **NoOpTraceTransport**: Транспорт по умолчанию, используемый при отсутствии активного транспорта.\n\n### Поток данных или вызовов\n1. **Инициализация (`__init__`)** \n - При создании экземпляра сервиса инициализируются транспорт и хранилище трассировок. Если транспорт или хранилище не предоставлены явно, используются предопределенные значения.\n \n2. **Создание контекста трассировки (`create_context`)** \n - Создаёт новый объект трассировки (`TraceContextRecord`), записывает его в хранилище и отправляет через транспорт.\n - Возвращает идентификатор созданной трассировки.\n\n3. **Вход в контекст трассировки (`open_context`)** \n - Вызывает метод `create_context`, возвращая созданный идентификатор трассировки.\n\n4. **Запись сообщения трассировки (`write_message`)** \n - Записывает сообщение трассировки в транспорт.\n\n5. **Запись контекста трассировки (`write_context`)** \n - Обеспечивает запись контекста трассировки в транспорт.\n\n### Важные детали реализации\n- **Хранение контекста трассировки:** Контекст сохраняется локально в хранилище до тех пор, пока он активно используется. После завершения работы с ним контекст удаляется автоматически.\n- **Отсутствие ошибок транспортировки:** В случае ошибки при передаче трассировочного сообщения фиксируется ошибка и сообщение логируется.\n- **Использование UUID для идентификации трассировки:** Каждый запрос генерирует уникальный идентификатор (`trace_id`), что позволяет отслеживать цепочки запросов и их зависимости.\n\n### Косвенные признаки (осторожный вывод)\n- На основании связей вызова и структуры файла можно предположить, что `TraceService` играет роль в управлении и журналировании процессов внутри приложения, обеспечивая централизованное ведение журнала событий и состояния трассировки.\n\n---\n\nТаким образом, основная задача `TraceService` заключается в обеспечении функциональности трассировки и сохранения информации о каждом этапе выполнения запроса, предоставляя механизмы для сбора и хранения этих данных.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "TraceService" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_115223/full_chain_plba_code_retrieval_plba-fullchain-explain-workflow-engine.json b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_115223/full_chain_plba_code_retrieval_plba-fullchain-explain-workflow-engine.json new file mode 100644 index 0000000..2ec07da --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_115223/full_chain_plba_code_retrieval_plba-fullchain-explain-workflow-engine.json @@ -0,0 +1,2158 @@ +{ + "case_id": "plba-fullchain-explain-workflow-engine", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_retrieval.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 13, + "llm_answer": "## Назначение класса `WorkflowEngine`\nКласс `WorkflowEngine` является основным компонентом, отвечающим за выполнение рабочего процесса (`workflow`) приложения. Он управляет последовательностью выполнения этапов (`nodes`), сохраняет состояние выполнения и обеспечивает логирование и отслеживание состояния потока выполнения задач.\n\n## Ключевые зависимости\n- **`workflow`**: объект, описывающий рабочий процесс, состоящий из последовательности узлов и их связей.\n- **`persistence`**: компонент для сохранения текущего состояния выполнения рабочего процесса и метаданных о запуске.\n- **`traces`**: инструмент логирования и трассировки, позволяющий отслеживать ход выполнения задачи.\n- **`hooks`**: дополнительные функции-обработчики событий жизненного цикла рабочего процесса.\n\n## Поток данных или вызовов\n### Инициализация (`__init__`)\nПри создании экземпляра класса происходит инициализация следующих компонентов:\n- Загружается рабочий процесс (`workflow`).\n- Создается механизм разрешения переходов (`_transition_resolver`).\n- Указывается система хранения состояний (`persistence`).\n- Настраивается логирование (`_logger`).\n- Опционально подключаются обработчики дополнительных событий (`hooks`).\n\n### Запуск (`run`)\nПроцесс выполняется пошагово по узлам рабочего процесса (`nodes`):\n1. При каждом шаге сохраняется текущее состояние работы и узел выполнения.\n2. Выполняется разрешение перехода к следующему узлу с помощью механизма `_transition_resolver`.\n3. Логируются действия с использованием инструмента `traces`, фиксируя начало нового шага и завершение предыдущего.\n4. Цикл продолжается до тех пор, пока текущий узел не будет равен `None`, что означает завершение всего рабочего процесса.\n\n## Важные детали реализации\n- Метод `run` отвечает за выполнение всей логики управления рабочим процессом, начиная от начала до конца.\n- Состояние выполнения хранится внутри контекста (`context.state`), позволяя сохранять промежуточные результаты и текущие значения переменных.\n- Использование логгера (`logging.getLogger(__name__)`) позволяет централизованно вести журнал всех действий.\n- Сохранение идентификатора текущей операции (`run_id`) в хранилище (`persistence`) позволяет отслеживать выполнение каждого запущенного рабочего процесса.\n- Применение инструментов трассировки (`traces`) помогает мониторить выполнение шагов рабочего процесса, включая шаги перед началом и после завершения этапа.\n\n## Осторожные выводы\nНа основании доступных слоев информации сложно точно определить детальную взаимосвязь с другими компонентами системы через сигнатуру функций и прямые ссылки. Однако косвенные признаки показывают использование стандартных практик и библиотек для логирования и мониторинга, таких как `logging` и `tracing`.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "WorkflowEngine" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-fullchain-explain-workflow-engine", + "text": "Объясни класс WorkflowEngine", + "mode": "full_chain", + "run_started_at": "2026-03-12T11:52:23", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни класс WorkflowEngine", + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "WorkflowEngine", + "alternatives": [ + "WorkflowEngine", + "WorkflowEngineHooks" + ], + "confidence": 0.99 + }, + "rag_count": 13, + "rag_rows": [ + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "class WorkflowEngine\nWorkflowEngine", + "layer": "C1_SYMBOL_CATALOG", + "title": "WorkflowEngine", + "span_start": 10, + "span_end": 86, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "57ec0a9f11c542c78e008684a888397e8d9ef4223671acb2567e631a0cbc70b4", + "qname": "WorkflowEngine", + "kind": "class", + "signature": "WorkflowEngine", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.workflow.engine.workflow_engine", + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/hooks.py", + "content": "class WorkflowEngineHooks\nWorkflowEngineHooks", + "layer": "C1_SYMBOL_CATALOG", + "title": "WorkflowEngineHooks", + "span_start": 6, + "span_end": 14, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "914123ed510540061e116100fc87bba4195595ba696f8bfde2fd77ac6a5cd7e4", + "qname": "WorkflowEngineHooks", + "kind": "class", + "signature": "WorkflowEngineHooks", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.workflow.engine.hooks", + "is_test": false, + "blob_sha": "4b11672b0a9af1ae04bfce9d8e1f96572997d3e65e68108d7c797b88fa5fa47a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowEngine", + "span_start": 10, + "span_end": 86, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "57ec0a9f11c542c78e008684a888397e8d9ef4223671acb2567e631a0cbc70b4", + "symbol_name": "WorkflowEngine", + "qname": "WorkflowEngine", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine.__init__\n -> WorkflowEngine._transition_resolver\n -> WorkflowEngine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowEngine.__init__:dataflow_slice", + "span_start": 14, + "span_end": 63, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3abf07e5c245e0fe59785ba2d569c2ee56018715fc7f625a044ddaf6201f903d", + "edge_type": "dataflow_slice", + "src_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "src_qname": "WorkflowEngine.__init__", + "dst_symbol_id": "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8", + "dst_ref": "WorkflowEngine.run", + "resolution": "resolved", + "slice_id": "3abf07e5c245e0fe59785ba2d569c2ee56018715fc7f625a044ddaf6201f903d", + "root_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "path_symbols": [ + "WorkflowEngine.__init__", + "WorkflowEngine._transition_resolver", + "WorkflowEngine.run" + ], + "path_symbol_ids": [ + "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine.__init__\n -> WorkflowEngine._hooks\n -> WorkflowEngine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowEngine.__init__:dataflow_slice", + "span_start": 16, + "span_end": 34, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d73db644b69c1eb35afd6eae9d6ac8674e49e30e9bcf9c020f9fdbfe754851b2", + "edge_type": "dataflow_slice", + "src_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "src_qname": "WorkflowEngine.__init__", + "dst_symbol_id": "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8", + "dst_ref": "WorkflowEngine.run", + "resolution": "resolved", + "slice_id": "d73db644b69c1eb35afd6eae9d6ac8674e49e30e9bcf9c020f9fdbfe754851b2", + "root_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "path_symbols": [ + "WorkflowEngine.__init__", + "WorkflowEngine._hooks", + "WorkflowEngine.run" + ], + "path_symbol_ids": [ + "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine.__init__\n -> WorkflowEngine._workflow\n -> WorkflowEngine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowEngine.__init__:dataflow_slice", + "span_start": 12, + "span_end": 29, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "b45ef3c54669b4910a8aed3a565804f275424a24007bc7e3c953389521f80249", + "edge_type": "dataflow_slice", + "src_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "src_qname": "WorkflowEngine.__init__", + "dst_symbol_id": "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8", + "dst_ref": "WorkflowEngine.run", + "resolution": "resolved", + "slice_id": "b45ef3c54669b4910a8aed3a565804f275424a24007bc7e3c953389521f80249", + "root_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "path_symbols": [ + "WorkflowEngine.__init__", + "WorkflowEngine._workflow", + "WorkflowEngine.run" + ], + "path_symbol_ids": [ + "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine.__init__\n -> WorkflowEngine._persistence\n -> WorkflowEngine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowEngine.__init__:dataflow_slice", + "span_start": 13, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "8101338770016324ce05d61daa9935a444c75e6c94a0fae4275d5b50fcbcc70b", + "edge_type": "dataflow_slice", + "src_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "src_qname": "WorkflowEngine.__init__", + "dst_symbol_id": "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8", + "dst_ref": "WorkflowEngine.run", + "resolution": "resolved", + "slice_id": "8101338770016324ce05d61daa9935a444c75e6c94a0fae4275d5b50fcbcc70b", + "root_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "path_symbols": [ + "WorkflowEngine.__init__", + "WorkflowEngine._persistence", + "WorkflowEngine.run" + ], + "path_symbol_ids": [ + "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine.__init__\n -> WorkflowEngine._traces\n -> WorkflowEngine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowEngine.__init__:dataflow_slice", + "span_start": 15, + "span_end": 27, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "5006266616d534d721648391565e2ac0c9e7e9d9f8df00c17fba8989afb533a5", + "edge_type": "dataflow_slice", + "src_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "src_qname": "WorkflowEngine.__init__", + "dst_symbol_id": "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8", + "dst_ref": "WorkflowEngine.run", + "resolution": "resolved", + "slice_id": "5006266616d534d721648391565e2ac0c9e7e9d9f8df00c17fba8989afb533a5", + "root_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "path_symbols": [ + "WorkflowEngine.__init__", + "WorkflowEngine._traces", + "WorkflowEngine.run" + ], + "path_symbol_ids": [ + "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine.__init__\n -> WorkflowEngine._logger\n -> WorkflowEngine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowEngine.__init__:dataflow_slice", + "span_start": 17, + "span_end": 85, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "2f9927abb24794adb056b94bfb5d8538a5cbafb160da2079f52fca97fd694a2b", + "edge_type": "dataflow_slice", + "src_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "src_qname": "WorkflowEngine.__init__", + "dst_symbol_id": "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8", + "dst_ref": "WorkflowEngine.run", + "resolution": "resolved", + "slice_id": "2f9927abb24794adb056b94bfb5d8538a5cbafb160da2079f52fca97fd694a2b", + "root_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "path_symbols": [ + "WorkflowEngine.__init__", + "WorkflowEngine._logger", + "WorkflowEngine.run" + ], + "path_symbol_ids": [ + "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "class WorkflowEngine:\n def __init__(self, workflow, persistence, *, traces, hooks: WorkflowEngineHooks | None = None) -> None:\n self._workflow = workflow\n self._persistence = persistence\n self._transition_resolver = TransitionResolver()\n self._traces = traces\n self._hooks = hooks or WorkflowEngineHooks()\n self._logger = logging.getLogger(__name__)\n\n def run(self, context: WorkflowContext) -> dict[str, object]:\n run_id = self._persistence.start_run(\n self._workflow.definition.name,\n self._workflow.definition.start_at,\n context.snapshot(),\n )\n context.state.setdefault(\"runtime\", {})\n context.state[\"runtime\"][\"workflow_run_id\"] = run_id\n self._traces.step(\"workflow\")\n self._traces.info(\"Workflow started.\", status=\"started\", attrs={\"workflow_run_id\": run_id})\n current_name = self._workflow.definition.start_at\n while current_name is not None:\n node = self._workflow.definition.nodes[current_name]\n context.state[\"runtime\"][\"current_node\"] = current_name\n self._logger.info(\"Workflow run %s: step '%s' started.\", run_id, current_name)\n self._hooks.on_step_started(context, current_name)\n self._persistence.start_step(run_id, current_name, context.snapshot())\n self._traces.step(current_name)\n self._traces.debug(\n f\"Step '{current_name}' started.\",\n status=\"started\",\n attrs={\"workflow_run_id\": run_id, \"node\": current_name},\n )\n try:\n result = node.step.run(context)\n except Exception as error:\n self._persistence.fail_step(run_id, current_name, context.snapshot(), error)\n self._persistence.fail_run(run_id, context.snapshot())\n self._traces.error(\n f\"Step '{current_name}' failed: {error}\",\n status=\"failed\",\n attrs={\"exception_type\": type(error).__name__},\n )\n self._logger.exception(\"Workflow run %s: step '%s' failed.\", run_id, current_name)\n self._hooks.on_step_failed(context, current_name)\n raise\n context.state.update(result.updates)\n self._persistence.complete_step(\n run_id,\n current_name,\n result.status,\n result.transition,\n context.snapshot(),\n )\n next_node = self._transition_resolver.resolve(node, result)\n self._traces.debug(\n f\"Step '{current_name}' completed with transition '{result.transition}'.\",\n status=result.status,\n attrs={\n \"workflow_run_id\": run_id,\n \"from_node\": current_name,\n \"transition\": result.transition,\n \"to_node\": next_node,\n },\n )\n self._logger.info(\n \"Workflow run %s: step '%s' completed with transition '%s'.\",\n run_id,\n current_name,\n result.transition,\n )\n self._hooks.on_step_finished(context, current_name)\n current_name = next_node\n self._persistence.complete_run(run_id, context.snapshot())\n self._traces.step(\"workflow\")\n self._traces.info(\"Workflow completed.\", status=\"completed\", attrs={\"workflow_run_id\": run_id})\n self._logger.info(\"Workflow run %s completed.\", run_id)\n return {\"run_id\": run_id, \"status\": \"completed\", \"context\": context.snapshot()}", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/workflow/engine/workflow_engine.py:WorkflowEngine", + "span_start": 10, + "span_end": 86, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.workflow.engine.workflow_engine", + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "## Назначение класса `WorkflowEngine`\nКласс `WorkflowEngine` является основным компонентом, отвечающим за выполнение рабочего процесса (`workflow`) приложения. Он управляет последовательностью выполнения этапов (`nodes`), сохраняет состояние выполнения и обеспечивает логирование и отслеживание состояния потока выполнения задач.\n\n## Ключевые зависимости\n- **`workflow`**: объект, описывающий рабочий процесс, состоящий из последовательности узлов и их связей.\n- **`persistence`**: компонент для сохранения текущего состояния выполнения рабочего процесса и метаданных о запуске.\n- **`traces`**: инструмент логирования и трассировки, позволяющий отслеживать ход выполнения задачи.\n- **`hooks`**: дополнительные функции-обработчики событий жизненного цикла рабочего процесса.\n\n## Поток данных или вызовов\n### Инициализация (`__init__`)\nПри создании экземпляра класса происходит инициализация следующих компонентов:\n- Загружается рабочий процесс (`workflow`).\n- Создается механизм разрешения переходов (`_transition_resolver`).\n- Указывается система хранения состояний (`persistence`).\n- Настраивается логирование (`_logger`).\n- Опционально подключаются обработчики дополнительных событий (`hooks`).\n\n### Запуск (`run`)\nПроцесс выполняется пошагово по узлам рабочего процесса (`nodes`):\n1. При каждом шаге сохраняется текущее состояние работы и узел выполнения.\n2. Выполняется разрешение перехода к следующему узлу с помощью механизма `_transition_resolver`.\n3. Логируются действия с использованием инструмента `traces`, фиксируя начало нового шага и завершение предыдущего.\n4. Цикл продолжается до тех пор, пока текущий узел не будет равен `None`, что означает завершение всего рабочего процесса.\n\n## Важные детали реализации\n- Метод `run` отвечает за выполнение всей логики управления рабочим процессом, начиная от начала до конца.\n- Состояние выполнения хранится внутри контекста (`context.state`), позволяя сохранять промежуточные результаты и текущие значения переменных.\n- Использование логгера (`logging.getLogger(__name__)`) позволяет централизованно вести журнал всех действий.\n- Сохранение идентификатора текущей операции (`run_id`) в хранилище (`persistence`) позволяет отслеживать выполнение каждого запущенного рабочего процесса.\n- Применение инструментов трассировки (`traces`) помогает мониторить выполнение шагов рабочего процесса, включая шаги перед началом и после завершения этапа.\n\n## Осторожные выводы\nНа основании доступных слоев информации сложно точно определить детальную взаимосвязь с другими компонентами системы через сигнатуру функций и прямые ссылки. Однако косвенные признаки показывают использование стандартных практик и библиотек для логирования и мониторинга, таких как `logging` и `tracing`.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS", + "C4_SEMANTIC_ROLES" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "WorkflowEngine" + ], + "keyword_hints": [ + "WorkflowEngine" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "WorkflowEngine", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "WorkflowEngine", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "WorkflowEngine", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "WorkflowEngine", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "WorkflowEngine", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 2, + "candidates_after_filter": 2 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "WorkflowEngine", + "alternatives": [ + "WorkflowEngine", + "WorkflowEngineHooks" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 2, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 129, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 37, + "C0_SOURCE_CHUNKS": 15, + "C4_SEMANTIC_ROLES": 16, + "C2_DEPENDENCY_GRAPH": 47, + "C3_ENTRYPOINTS": 11 + }, + "merge_rank": 27, + "prompt_build": 0, + "llm_call": 3730 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 780, + "evidence_rows": 13, + "evidence_chars": 4423 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 2, + "unique_paths": 2 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 1 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_explain_ru_v1", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "WorkflowEngine" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 13, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-fullchain-explain-workflow-engine", + "mode": "full_chain", + "run_started_at": "2026-03-12T11:52:23", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Объясни класс WorkflowEngine", + "normalized_query": "Объясни класс WorkflowEngine" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Объясни класс WorkflowEngine" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни класс WorkflowEngine" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "WorkflowEngine" + ], + "keyword_hints": [ + "WorkflowEngine" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Объясни класс WorkflowEngine" + }, + "output": { + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "WorkflowEngine", + "alternatives": [ + "WorkflowEngine", + "WorkflowEngineHooks" + ], + "confidence": 0.99 + }, + "rag_count": 13, + "rag_rows": [ + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "class WorkflowEngine\nWorkflowEngine", + "layer": "C1_SYMBOL_CATALOG", + "title": "WorkflowEngine", + "span_start": 10, + "span_end": 86, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "57ec0a9f11c542c78e008684a888397e8d9ef4223671acb2567e631a0cbc70b4", + "qname": "WorkflowEngine", + "kind": "class", + "signature": "WorkflowEngine", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.workflow.engine.workflow_engine", + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/hooks.py", + "content": "class WorkflowEngineHooks\nWorkflowEngineHooks", + "layer": "C1_SYMBOL_CATALOG", + "title": "WorkflowEngineHooks", + "span_start": 6, + "span_end": 14, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "914123ed510540061e116100fc87bba4195595ba696f8bfde2fd77ac6a5cd7e4", + "qname": "WorkflowEngineHooks", + "kind": "class", + "signature": "WorkflowEngineHooks", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.workflow.engine.hooks", + "is_test": false, + "blob_sha": "4b11672b0a9af1ae04bfce9d8e1f96572997d3e65e68108d7c797b88fa5fa47a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowEngine", + "span_start": 10, + "span_end": 86, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "57ec0a9f11c542c78e008684a888397e8d9ef4223671acb2567e631a0cbc70b4", + "symbol_name": "WorkflowEngine", + "qname": "WorkflowEngine", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine.__init__\n -> WorkflowEngine._transition_resolver\n -> WorkflowEngine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowEngine.__init__:dataflow_slice", + "span_start": 14, + "span_end": 63, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3abf07e5c245e0fe59785ba2d569c2ee56018715fc7f625a044ddaf6201f903d", + "edge_type": "dataflow_slice", + "src_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "src_qname": "WorkflowEngine.__init__", + "dst_symbol_id": "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8", + "dst_ref": "WorkflowEngine.run", + "resolution": "resolved", + "slice_id": "3abf07e5c245e0fe59785ba2d569c2ee56018715fc7f625a044ddaf6201f903d", + "root_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "path_symbols": [ + "WorkflowEngine.__init__", + "WorkflowEngine._transition_resolver", + "WorkflowEngine.run" + ], + "path_symbol_ids": [ + "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine.__init__\n -> WorkflowEngine._hooks\n -> WorkflowEngine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowEngine.__init__:dataflow_slice", + "span_start": 16, + "span_end": 34, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d73db644b69c1eb35afd6eae9d6ac8674e49e30e9bcf9c020f9fdbfe754851b2", + "edge_type": "dataflow_slice", + "src_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "src_qname": "WorkflowEngine.__init__", + "dst_symbol_id": "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8", + "dst_ref": "WorkflowEngine.run", + "resolution": "resolved", + "slice_id": "d73db644b69c1eb35afd6eae9d6ac8674e49e30e9bcf9c020f9fdbfe754851b2", + "root_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "path_symbols": [ + "WorkflowEngine.__init__", + "WorkflowEngine._hooks", + "WorkflowEngine.run" + ], + "path_symbol_ids": [ + "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine.__init__\n -> WorkflowEngine._workflow\n -> WorkflowEngine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowEngine.__init__:dataflow_slice", + "span_start": 12, + "span_end": 29, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "b45ef3c54669b4910a8aed3a565804f275424a24007bc7e3c953389521f80249", + "edge_type": "dataflow_slice", + "src_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "src_qname": "WorkflowEngine.__init__", + "dst_symbol_id": "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8", + "dst_ref": "WorkflowEngine.run", + "resolution": "resolved", + "slice_id": "b45ef3c54669b4910a8aed3a565804f275424a24007bc7e3c953389521f80249", + "root_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "path_symbols": [ + "WorkflowEngine.__init__", + "WorkflowEngine._workflow", + "WorkflowEngine.run" + ], + "path_symbol_ids": [ + "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine.__init__\n -> WorkflowEngine._persistence\n -> WorkflowEngine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowEngine.__init__:dataflow_slice", + "span_start": 13, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "8101338770016324ce05d61daa9935a444c75e6c94a0fae4275d5b50fcbcc70b", + "edge_type": "dataflow_slice", + "src_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "src_qname": "WorkflowEngine.__init__", + "dst_symbol_id": "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8", + "dst_ref": "WorkflowEngine.run", + "resolution": "resolved", + "slice_id": "8101338770016324ce05d61daa9935a444c75e6c94a0fae4275d5b50fcbcc70b", + "root_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "path_symbols": [ + "WorkflowEngine.__init__", + "WorkflowEngine._persistence", + "WorkflowEngine.run" + ], + "path_symbol_ids": [ + "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine.__init__\n -> WorkflowEngine._traces\n -> WorkflowEngine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowEngine.__init__:dataflow_slice", + "span_start": 15, + "span_end": 27, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "5006266616d534d721648391565e2ac0c9e7e9d9f8df00c17fba8989afb533a5", + "edge_type": "dataflow_slice", + "src_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "src_qname": "WorkflowEngine.__init__", + "dst_symbol_id": "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8", + "dst_ref": "WorkflowEngine.run", + "resolution": "resolved", + "slice_id": "5006266616d534d721648391565e2ac0c9e7e9d9f8df00c17fba8989afb533a5", + "root_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "path_symbols": [ + "WorkflowEngine.__init__", + "WorkflowEngine._traces", + "WorkflowEngine.run" + ], + "path_symbol_ids": [ + "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine.__init__\n -> WorkflowEngine._logger\n -> WorkflowEngine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowEngine.__init__:dataflow_slice", + "span_start": 17, + "span_end": 85, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "2f9927abb24794adb056b94bfb5d8538a5cbafb160da2079f52fca97fd694a2b", + "edge_type": "dataflow_slice", + "src_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "src_qname": "WorkflowEngine.__init__", + "dst_symbol_id": "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8", + "dst_ref": "WorkflowEngine.run", + "resolution": "resolved", + "slice_id": "2f9927abb24794adb056b94bfb5d8538a5cbafb160da2079f52fca97fd694a2b", + "root_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "path_symbols": [ + "WorkflowEngine.__init__", + "WorkflowEngine._logger", + "WorkflowEngine.run" + ], + "path_symbol_ids": [ + "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "class WorkflowEngine:\n def __init__(self, workflow, persistence, *, traces, hooks: WorkflowEngineHooks | None = None) -> None:\n self._workflow = workflow\n self._persistence = persistence\n self._transition_resolver = TransitionResolver()\n self._traces = traces\n self._hooks = hooks or WorkflowEngineHooks()\n self._logger = logging.getLogger(__name__)\n\n def run(self, context: WorkflowContext) -> dict[str, object]:\n run_id = self._persistence.start_run(\n self._workflow.definition.name,\n self._workflow.definition.start_at,\n context.snapshot(),\n )\n context.state.setdefault(\"runtime\", {})\n context.state[\"runtime\"][\"workflow_run_id\"] = run_id\n self._traces.step(\"workflow\")\n self._traces.info(\"Workflow started.\", status=\"started\", attrs={\"workflow_run_id\": run_id})\n current_name = self._workflow.definition.start_at\n while current_name is not None:\n node = self._workflow.definition.nodes[current_name]\n context.state[\"runtime\"][\"current_node\"] = current_name\n self._logger.info(\"Workflow run %s: step '%s' started.\", run_id, current_name)\n self._hooks.on_step_started(context, current_name)\n self._persistence.start_step(run_id, current_name, context.snapshot())\n self._traces.step(current_name)\n self._traces.debug(\n f\"Step '{current_name}' started.\",\n status=\"started\",\n attrs={\"workflow_run_id\": run_id, \"node\": current_name},\n )\n try:\n result = node.step.run(context)\n except Exception as error:\n self._persistence.fail_step(run_id, current_name, context.snapshot(), error)\n self._persistence.fail_run(run_id, context.snapshot())\n self._traces.error(\n f\"Step '{current_name}' failed: {error}\",\n status=\"failed\",\n attrs={\"exception_type\": type(error).__name__},\n )\n self._logger.exception(\"Workflow run %s: step '%s' failed.\", run_id, current_name)\n self._hooks.on_step_failed(context, current_name)\n raise\n context.state.update(result.updates)\n self._persistence.complete_step(\n run_id,\n current_name,\n result.status,\n result.transition,\n context.snapshot(),\n )\n next_node = self._transition_resolver.resolve(node, result)\n self._traces.debug(\n f\"Step '{current_name}' completed with transition '{result.transition}'.\",\n status=result.status,\n attrs={\n \"workflow_run_id\": run_id,\n \"from_node\": current_name,\n \"transition\": result.transition,\n \"to_node\": next_node,\n },\n )\n self._logger.info(\n \"Workflow run %s: step '%s' completed with transition '%s'.\",\n run_id,\n current_name,\n result.transition,\n )\n self._hooks.on_step_finished(context, current_name)\n current_name = next_node\n self._persistence.complete_run(run_id, context.snapshot())\n self._traces.step(\"workflow\")\n self._traces.info(\"Workflow completed.\", status=\"completed\", attrs={\"workflow_run_id\": run_id})\n self._logger.info(\"Workflow run %s completed.\", run_id)\n return {\"run_id\": run_id, \"status\": \"completed\", \"context\": context.snapshot()}", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/workflow/engine/workflow_engine.py:WorkflowEngine", + "span_start": 10, + "span_end": 86, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.workflow.engine.workflow_engine", + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "WorkflowEngine", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "WorkflowEngine", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "WorkflowEngine", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "WorkflowEngine", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "WorkflowEngine", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 2, + "candidates_after_filter": 2 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "WorkflowEngine", + "alternatives": [ + "WorkflowEngine", + "WorkflowEngineHooks" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 2, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 129, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 37, + "C0_SOURCE_CHUNKS": 15, + "C4_SEMANTIC_ROLES": 16, + "C2_DEPENDENCY_GRAPH": 47, + "C3_ENTRYPOINTS": 11 + }, + "merge_rank": 27 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Объясни класс WorkflowEngine", + "rag_count": 13 + }, + "output": { + "llm_answer": "## Назначение класса `WorkflowEngine`\nКласс `WorkflowEngine` является основным компонентом, отвечающим за выполнение рабочего процесса (`workflow`) приложения. Он управляет последовательностью выполнения этапов (`nodes`), сохраняет состояние выполнения и обеспечивает логирование и отслеживание состояния потока выполнения задач.\n\n## Ключевые зависимости\n- **`workflow`**: объект, описывающий рабочий процесс, состоящий из последовательности узлов и их связей.\n- **`persistence`**: компонент для сохранения текущего состояния выполнения рабочего процесса и метаданных о запуске.\n- **`traces`**: инструмент логирования и трассировки, позволяющий отслеживать ход выполнения задачи.\n- **`hooks`**: дополнительные функции-обработчики событий жизненного цикла рабочего процесса.\n\n## Поток данных или вызовов\n### Инициализация (`__init__`)\nПри создании экземпляра класса происходит инициализация следующих компонентов:\n- Загружается рабочий процесс (`workflow`).\n- Создается механизм разрешения переходов (`_transition_resolver`).\n- Указывается система хранения состояний (`persistence`).\n- Настраивается логирование (`_logger`).\n- Опционально подключаются обработчики дополнительных событий (`hooks`).\n\n### Запуск (`run`)\nПроцесс выполняется пошагово по узлам рабочего процесса (`nodes`):\n1. При каждом шаге сохраняется текущее состояние работы и узел выполнения.\n2. Выполняется разрешение перехода к следующему узлу с помощью механизма `_transition_resolver`.\n3. Логируются действия с использованием инструмента `traces`, фиксируя начало нового шага и завершение предыдущего.\n4. Цикл продолжается до тех пор, пока текущий узел не будет равен `None`, что означает завершение всего рабочего процесса.\n\n## Важные детали реализации\n- Метод `run` отвечает за выполнение всей логики управления рабочим процессом, начиная от начала до конца.\n- Состояние выполнения хранится внутри контекста (`context.state`), позволяя сохранять промежуточные результаты и текущие значения переменных.\n- Использование логгера (`logging.getLogger(__name__)`) позволяет централизованно вести журнал всех действий.\n- Сохранение идентификатора текущей операции (`run_id`) в хранилище (`persistence`) позволяет отслеживать выполнение каждого запущенного рабочего процесса.\n- Применение инструментов трассировки (`traces`) помогает мониторить выполнение шагов рабочего процесса, включая шаги перед началом и после завершения этапа.\n\n## Осторожные выводы\nНа основании доступных слоев информации сложно точно определить детальную взаимосвязь с другими компонентами системы через сигнатуру функций и прямые ссылки. Однако косвенные признаки показывают использование стандартных практик и библиотек для логирования и мониторинга, таких как `logging` и `tracing`." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 780, + "evidence_rows": 13, + "evidence_chars": 4423 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 2, + "unique_paths": 2 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 1 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_explain_ru_v1", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 3730 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_115223/full_chain_plba_code_retrieval_plba-fullchain-explain-workflow-engine.md b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_115223/full_chain_plba_code_retrieval_plba-fullchain-explain-workflow-engine.md new file mode 100644 index 0000000..46eb788 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_115223/full_chain_plba_code_retrieval_plba-fullchain-explain-workflow-engine.md @@ -0,0 +1,34 @@ +# plba-fullchain-explain-workflow-engine + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_retrieval.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Объясни класс WorkflowEngine + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 13, + "llm_answer": "## Назначение класса `WorkflowEngine`\nКласс `WorkflowEngine` является основным компонентом, отвечающим за выполнение рабочего процесса (`workflow`) приложения. Он управляет последовательностью выполнения этапов (`nodes`), сохраняет состояние выполнения и обеспечивает логирование и отслеживание состояния потока выполнения задач.\n\n## Ключевые зависимости\n- **`workflow`**: объект, описывающий рабочий процесс, состоящий из последовательности узлов и их связей.\n- **`persistence`**: компонент для сохранения текущего состояния выполнения рабочего процесса и метаданных о запуске.\n- **`traces`**: инструмент логирования и трассировки, позволяющий отслеживать ход выполнения задачи.\n- **`hooks`**: дополнительные функции-обработчики событий жизненного цикла рабочего процесса.\n\n## Поток данных или вызовов\n### Инициализация (`__init__`)\nПри создании экземпляра класса происходит инициализация следующих компонентов:\n- Загружается рабочий процесс (`workflow`).\n- Создается механизм разрешения переходов (`_transition_resolver`).\n- Указывается система хранения состояний (`persistence`).\n- Настраивается логирование (`_logger`).\n- Опционально подключаются обработчики дополнительных событий (`hooks`).\n\n### Запуск (`run`)\nПроцесс выполняется пошагово по узлам рабочего процесса (`nodes`):\n1. При каждом шаге сохраняется текущее состояние работы и узел выполнения.\n2. Выполняется разрешение перехода к следующему узлу с помощью механизма `_transition_resolver`.\n3. Логируются действия с использованием инструмента `traces`, фиксируя начало нового шага и завершение предыдущего.\n4. Цикл продолжается до тех пор, пока текущий узел не будет равен `None`, что означает завершение всего рабочего процесса.\n\n## Важные детали реализации\n- Метод `run` отвечает за выполнение всей логики управления рабочим процессом, начиная от начала до конца.\n- Состояние выполнения хранится внутри контекста (`context.state`), позволяя сохранять промежуточные результаты и текущие значения переменных.\n- Использование логгера (`logging.getLogger(__name__)`) позволяет централизованно вести журнал всех действий.\n- Сохранение идентификатора текущей операции (`run_id`) в хранилище (`persistence`) позволяет отслеживать выполнение каждого запущенного рабочего процесса.\n- Применение инструментов трассировки (`traces`) помогает мониторить выполнение шагов рабочего процесса, включая шаги перед началом и после завершения этапа.\n\n## Осторожные выводы\nНа основании доступных слоев информации сложно точно определить детальную взаимосвязь с другими компонентами системы через сигнатуру функций и прямые ссылки. Однако косвенные признаки показывают использование стандартных практик и библиотек для логирования и мониторинга, таких как `logging` и `tracing`.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "WorkflowEngine" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_115223/summary.md b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_115223/summary.md new file mode 100644 index 0000000..bc875e6 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain/20260312_115223/summary.md @@ -0,0 +1,24 @@ +# pipeline_setup_v2 summary + +Passed: 6/6 + + +| File | Case | Query | Intent | Sub-intent | Pass | +| ----------------------------------- | -------------------------------------------- | ----------------------------------------- | ------- | ---------- | ---- | +| full_chain_plba_code_retrieval.yaml | plba-fullchain-explain-runtime-manager | Объясни как работает класс RuntimeManager | CODE_QA | EXPLAIN | ✓ | +| full_chain_plba_code_retrieval.yaml | plba-fullchain-explain-http-control-channel | Объясни класс HttpControlChannel | CODE_QA | EXPLAIN | ✓ | +| full_chain_plba_code_retrieval.yaml | plba-fullchain-explain-control-plane-service | Объясни класс ControlPlaneService | CODE_QA | EXPLAIN | ✓ | +| full_chain_plba_code_retrieval.yaml | plba-fullchain-explain-trace-service | Как работает TraceService? | CODE_QA | EXPLAIN | ✓ | +| full_chain_plba_code_retrieval.yaml | plba-fullchain-explain-create-runtime | Объясни функцию create_runtime | CODE_QA | EXPLAIN | ✓ | +| full_chain_plba_code_retrieval.yaml | plba-fullchain-explain-workflow-engine | Объясни класс WorkflowEngine | CODE_QA | EXPLAIN | ✓ | + + +## LLM Answers + +- **plba-fullchain-explain-runtime-manager**: ## Назначение класса `RuntimeManager` Класс `RuntimeManager` играет роль менеджера, отвечающего за управление жизненным циклом различных компонентов приложения, таких как конфигурация (`ConfigurationManager`), сервисы (`ServiceContainer`), трассировка событий (`TraceService`), здоровье системы (`HealthRegistry`), логирование (`LogManager`) и мониторинг работы рабочих процессов (`WorkerSupervisor`). Он координирует взаимодействие этих компонентов и управляет их состоянием через методы регистрации, инициализации и мониторинга. ## Ключевые зависимости Ключевыми зависимостями являются следующие классы и сущности: - `ConfigurationManager`: отвечает за хранение и доступ к конфигурации приложения. - `ServiceContainer`: контейнер для хранения и управления сервисами приложения. - `TraceService`: предоставляет возможность отслеживать события выполнения и состояния системы. - `… +- **plba-fullchain-explain-http-control-channel**: ## Объяснение сущности `HttpControlChannel` ### Назначение `HttpControlChannel` — это класс, отвечающий за управление состоянием и взаимодействие с внешним HTTP каналом для контроля приложения. Он служит основным интерфейсом взаимодействия через HTTP-протокол для конфигурации и мониторинга приложения. ### Ключевые зависимости Ключевая зависимость класса — это экземпляр `UvicornThreadRunner`, который запускает сервер для прослушивания HTTP-запросов. Кроме того, используется фабрика `HttpControlAppFactory`, которая отвечает за создание необходимых приложений FastAPI. ### Поток данных или вызовов 1. **Инициализация (`__init__`)**: - При создании экземпляра задаются параметры `host`, `port` и `timeout`. - Создаются внутренние объекты `_runner` и `_factory`. 2. **Запуск (`start`)**: - Вызывается метод фабрики `_factory.create()` для создания FastAPI-приложения. - Запускае… +- **plba-fullchain-explain-control-plane-service**: ## Объяснение работы сущности `ControlPlaneService` ### Назначение `ControlPlaneService` — это служба управления состоянием и взаимодействием различных компонентов системы. Она отвечает за координацию действий между каналами (`ControlChannel`), настройку инициализации системы и ее остановки, а также сбор информации о текущем состоянии для последующего анализа. ### Ключевые зависимости - **RuntimeManager**: объект-менеджер, предоставляющий доступ к различным аспектам состояния и конфигурации запущенной системы. - **ControlChannel**: интерфейс взаимодействия с различными компонентами системы через каналы передачи данных. ### Поток данных или вызовов 1. **Инициализация** (`__init__`) - При создании объекта службы выполняется настройка внутреннего списка каналов `_channels`. 2. **Регистрация канала** (`register_channel`) - Канал добавляется в список внутренних каналов сл… +- **plba-fullchain-explain-trace-service**: ## Объяснение работы `TraceService` ### Назначение `TraceService` — это сервис для управления контекстом трассировки и записи событий трассировки. Он отвечает за создание контекста трассировки, запись сообщений и управление хранилищем трассировок. ### Ключевые зависимости - **TraceContextFactory**: Базовый класс для создания экземпляров, связанных с контекстом трассировки. - **TraceTransport**: Интерфейс для передачи трассировочных данных наружу системы. - **TraceContextStore**: Хранилище для отслеживания состояний трассировки. - **NoOpTraceTransport**: Транспорт по умолчанию, используемый при отсутствии активного транспорта. ### Поток данных или вызовов 1. **Инициализация (`__init__`)** - При создании экземпляра сервиса инициализируются транспорт и хранилище трассировок. Если транспорт или хранилище не предоставлены явно, используются предопределенные значения. 2. *… +- **plba-fullchain-explain-create-runtime**: ## Объяснение функции `create_runtime` ### Назначение Функция `create_runtime` предназначена для инициализации и настройки среды выполнения (`runtime`) приложения Plba. Она выполняет несколько ключевых шагов по настройке и регистрации различных компонентов, необходимых для полноценной работы системы. ### Ключевые зависимости Функция зависит от следующих сущностей и модулей: - **src/plba/bootstrap.py**: основной файл, содержащий реализацию функции `create_runtime`. - **RuntimeManager**: менеджер окружения, используемый для управления конфигурацией и модулями приложения. - **ApplicationModule**: модуль приложения, представляющий собой компонент, регистрируемый менеджером среды выполнения. - **HttpControlChannel**: канал управления HTTP-интерфейсом, обеспечивающий взаимодействие с внешним окружением через HTTP-протокол. ### Поток данных или вызовов 1. Функция принимает… +- **plba-fullchain-explain-workflow-engine**: ## Назначение класса `WorkflowEngine` Класс `WorkflowEngine` является основным компонентом, отвечающим за выполнение рабочего процесса (`workflow`) приложения. Он управляет последовательностью выполнения этапов (`nodes`), сохраняет состояние выполнения и обеспечивает логирование и отслеживание состояния потока выполнения задач. ## Ключевые зависимости - `**workflow`**: объект, описывающий рабочий процесс, состоящий из последовательности узлов и их связей. - `**persistence**`: компонент для сохранения текущего состояния выполнения рабочего процесса и метаданных о запуске. - `**traces**`: инструмент логирования и трассировки, позволяющий отслеживать ход выполнения задачи. - `**hooks**`: дополнительные функции-обработчики событий жизненного цикла рабочего процесса. ## Поток данных или вызовов ### Инициализация (`__init__`) При создании экземпляра класса происходит иници… + diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_115642/full_chain_plba_code_subintents_plba-fullchain-architecture-control-plane.json b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_115642/full_chain_plba_code_subintents_plba-fullchain-architecture-control-plane.json new file mode 100644 index 0000000..91ca7ed --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_115642/full_chain_plba_code_subintents_plba-fullchain-architecture-control-plane.json @@ -0,0 +1,1667 @@ +{ + "case_id": "plba-fullchain-architecture-control-plane", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "PROJECT_MISC", + "sub_intent": "ARCHITECTURE", + "graph_id": "ProjectMiscGraph", + "conversation_mode": "START", + "rag_count": 11, + "llm_answer": "В control plane обычно участвуют следующие компоненты:\n\n1. **Control Action Set** – управляет действиями контроля.\n2. **Runtime Manager** – отвечает за старт и остановку runtime.\n3. **Worker Supervisor** – контролирует жизненный цикл воркеров.\n4. **Log Manager** – применяет и восстанавливает валидные конфигурации логирования.\n5. **Health Registry** – регистрирует состояние здоровья компонентов.\n6. **Workflow Engine** – исполняет бизнес-логику и управление workflow.\n7. **Checkpoint Repository** – сохраняет промежуточные состояния задач.\n8. **MySQL Trace Transport** – транспорт для трассировки событий.\n\nЭти компоненты обеспечивают контроль и управление состоянием системы, выполнение рабочих процессов и мониторинг их здоровья.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "control", + "plane" + ], + "layers": [ + "D1_MODULE_CATALOG", + "D3_SECTION_INDEX", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ] + }, + "passed": false, + "mismatches": [ + "intent: expected CODE_QA, got PROJECT_MISC", + "graph_id: expected CodeQAGraph, got ProjectMiscGraph", + "layers should include 'C4_SEMANTIC_ROLES', got ['D1_MODULE_CATALOG', 'D3_SECTION_INDEX', 'C1_SYMBOL_CATALOG', 'C0_SOURCE_CHUNKS']", + "layers should include 'C2_DEPENDENCY_GRAPH', got ['D1_MODULE_CATALOG', 'D3_SECTION_INDEX', 'C1_SYMBOL_CATALOG', 'C0_SOURCE_CHUNKS']", + "layers should include 'C3_ENTRYPOINTS', got ['D1_MODULE_CATALOG', 'D3_SECTION_INDEX', 'C1_SYMBOL_CATALOG', 'C0_SOURCE_CHUNKS']" + ], + "details": { + "case_id": "plba-fullchain-architecture-control-plane", + "text": "Какие компоненты участвуют в control plane?", + "mode": "full_chain", + "run_started_at": "2026-03-12T11:56:42", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "PROJECT_MISC", + "graph_id": "ProjectMiscGraph", + "conversation_mode": "START", + "query": "Какие компоненты участвуют в control plane?", + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "ControlActionSet" + ], + "confidence": 0.0 + }, + "rag_count": 11, + "rag_rows": [ + { + "path": "web/control-ui/app.js", + "content": "const API_HEADERS = {\n \"X-Client-Source\": \"web-ui\",\n};\n\nconst stateEl = document.getElementById(\"runtime-state\");\nconst healthEl = document.getElementById(\"health-status\");\nconst detailEl = document.getElementById(\"health-detail\");\nconst updateEl = document.getElementById(\"last-update\");\nconst detailsEl = document.getElementById(\"details\");\nconst componentsEl = document.getElementById(\"components\");\nconst startBtn = document.getElementById(\"start-btn\");\nconst stopBtn = document.getElementById(\"stop-btn\");\nconst refreshBtn = document.getElementById(\"refresh-btn\");\n\nlet pollingTimer = null;\nlet actionInProgress = false;\n\nfunction setStateValue(element, value) {\n element.className = `value ${String(value || \"unknown\")}`;\n element.textContent = String(value || \"unknown\");\n}\n\nfunction setBusy(isBusy) {\n actionInProgress = isBusy;\n startBtn.disabled = isBusy;\n stopBtn.disabled = isBusy;\n refreshBtn.disabled = isBusy;\n}\n\nfunction showDetails(payload) {\n detailsEl.textContent = JSON.stringify(payload, null, 2);\n}\n\nfunction showComponents(components) {\n if (!Array.isArray(components) || components.length === 0) {\n componentsEl.innerHTML = '

';\n return;\n }\n\n const cards = components\n .map((component) => {\n const name = String(component.name || \"unknown\");\n const status = String(component.status || \"unknown\");\n const detail = String(component.detail || \"-\");\n const critical = component.critical === true ? \"yes\" : \"no\";\n const meta = component.meta || {};\n const metaJson = JSON.stringify(meta, null, 2);\n return `\n
\n
\n ${name}\n ${status}\n
\n
\n critical\n ${critical}\n
\n
\n detail\n ${detail}\n
\n
${metaJson}
\n
\n `;\n })\n .join(\"\");\n\n componentsEl.innerHTML = cards;\n}\n\nasync function fetchJson(path, method = \"GET\") {\n const response = await fetch(`/api${path}`, {\n method,\n headers: API_HEADERS,\n });\n const payload = await response.json();\n return { status: response.status, payload };\n}\n\nasync function refreshStatus() {\n try {\n const { payload } = await fetchJson(\"/health\");\n setStateValue(stateEl, payload.state);\n setStateValue(healthEl, payload.status);\n detailEl.textContent = String(payload.detail || \"-\");\n updateEl.textContent = new Date().toLocaleTimeString();\n showComponents(payload.components || []);\n showDetails(payload);\n } catch (error) {\n setStateValue(stateEl, \"unknown\");\n setStateValue(healthEl, \"unknown\");\n detailEl.textContent = String(error);\n showComponents([]);\n showDetails({ status: \"error\", detail: String(error) });\n }\n}\n\nasync function runAction(action) {\n if (actionInProgress) {\n return;\n }\n setBusy(true);\n try {\n const result = await fetchJson(`/actions/${action}`, \"POST\");\n showDetails(result.payload);\n } catch (error) {\n showDetails({ status: \"error\", detail: String(error) });\n } finally {\n await refreshStatus();\n setBusy(false);\n }\n}\n\nstartBtn.addEventListener(\"click\", () => runAction(\"start\"));\nstopBtn.addEventListener(\"click\", () => runAction(\"stop\"));\nrefreshBtn.addEventListener(\"click\", refreshStatus);\n\nasync function startPolling() {\n await refreshStatus();\n if (pollingTimer !== null) {\n clearInterval(pollingTimer);\n }\n pollingTimer = setInterval(refreshStatus, 2000);\n}\n\nstartPolling();", + "layer": "D3_SECTION_INDEX", + "title": "web/control-ui/app.js:Document", + "span_start": null, + "span_end": null, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "module_id": "web/control-ui/app.js", + "type": null, + "domain": null, + "tags": [], + "section_path": "Document", + "section_title": "Document", + "order": 0, + "doc_kind": "misc", + "source_path": "web/control-ui/app.js", + "artifact_type": null, + "blob_sha": "2d1a28f2b6016e1efcdf652e0ebcdad008700a06e77f58e802a29be3210d628d", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "deploy/docker-compose.control-ui.yml", + "content": "services:\n app:\n image: mail_order_bot_v2:latest\n environment:\n PLBA_CONTROL_HOST: \"0.0.0.0\"\n PLBA_CONTROL_PORT: \"8080\"\n expose:\n - \"8080\"\n networks:\n - plba_net\n\n control_ui:\n image: nginx:1.27-alpine\n depends_on:\n - app\n ports:\n - \"15000:15000\"\n volumes:\n - ./deploy/nginx/plba-control-ui.conf:/etc/nginx/conf.d/default.conf:ro\n - ./web/control-ui:/usr/share/nginx/html:ro\n networks:\n - plba_net\n\nnetworks:\n plba_net:", + "layer": "D3_SECTION_INDEX", + "title": "deploy/docker-compose.control-ui.yml:Document", + "span_start": null, + "span_end": null, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "module_id": "deploy/docker-compose.control-ui.yml", + "type": null, + "domain": null, + "tags": [], + "section_path": "Document", + "section_title": "Document", + "order": 0, + "doc_kind": "misc", + "source_path": "deploy/docker-compose.control-ui.yml", + "artifact_type": null, + "blob_sha": "9b086df090fc407dbc6c86355f94030c8f864c1987d58b6ea6a82ab4236f74cc", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "README.md", + "content": "- Назначение: применение и восстановление валидной конфигурации логирования.\n- Реализация: `LogManager`.\n- Как работает / API / вызовы / таблицы:\n - API: `apply_config(config)`.\n - `RuntimeManager.start()` вызывает `logs.apply_config(config)`.\n - Если секция `log` некорректна, сервис пытается восстановить предыдущую валидную конфигурацию.\n - В БД не пишет.\n- Типовая схема использования:\n - Передать `log` секцию в конфиг и запускать runtime стандартно через `start()`.", + "layer": "D3_SECTION_INDEX", + "title": "README.md:Logging", + "span_start": null, + "span_end": null, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "module_id": "README.md", + "type": null, + "domain": null, + "tags": [], + "section_path": "PLBA > 4. Описание компонентов > 4.2 Service модули > Logging", + "section_title": "Logging", + "order": 12, + "doc_kind": "readme", + "source_path": "README.md", + "artifact_type": null, + "blob_sha": "be28dbd7117896c754f2c6c5d21a2be36cad3c090dc813a538af5d378f426d77", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "README.md", + "content": "- Назначение: runtime-исполнение бизнес-активности, управление lifecycle, интерпретация health/status.\n- Реализация: контракт `app_runtime.contracts.worker.Worker`, оркестрация через `app_runtime.workers.supervisor.WorkerSupervisor`.\n- Как работает / API / вызовы / таблицы:\n - API: `start()`, `stop(force=False)`, `health() -> WorkerHealth`, `status() -> WorkerStatus`, свойства `name`, `critical`.\n - `WorkerSupervisor.start()` запускает все воркеры, `stop()` останавливает и ждет state=`stopped`.\n - `RuntimeManager` получает агрегированные `statuses()`/`healths()` у супервизора.\n - В БД напрямую не пишет (если прикладной worker сам не реализует persistence).\n- Типовая схема использования:\n - Внутри `start()` поднимать поток/пул или запускать одноразовую задачу.\n - В цикле вызывать `routine.run()`.\n - Ошибки бизнес-логики транслировать в `health()`/`status()`.", + "layer": "D3_SECTION_INDEX", + "title": "README.md:Worker", + "span_start": null, + "span_end": null, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "module_id": "README.md", + "type": null, + "domain": null, + "tags": [], + "section_path": "PLBA > 4. Описание компонентов > 4.1 Core модули > Worker", + "section_title": "Worker", + "order": 8, + "doc_kind": "readme", + "source_path": "README.md", + "artifact_type": null, + "blob_sha": "be28dbd7117896c754f2c6c5d21a2be36cad3c090dc813a538af5d378f426d77", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "README.md", + "content": "```mermaid\nclassDiagram\n class ApplicationModule {\n <>\n +name: str\n +register(registry)\n }\n class ModuleRegistry {\n +add_worker(worker)\n +add_health_contributor(contributor)\n +register_module(name)\n }\n class RuntimeManager {\n +register_module(module)\n +add_config_file(path)\n +start()\n +stop(timeout, force)\n +status()\n +current_health()\n }\n class WorkerSupervisor {\n +register(worker)\n +start()\n +stop(timeout, force)\n +statuses()\n +healths()\n }\n class Worker {\n <>\n +name: str\n +critical: bool\n +start()\n +stop(force)\n +health()\n +status()\n }\n class Routine {\n <>\n +run()\n }\n\n class ConfigurationManager\n class LogManager\n class HealthRegistry\n class TraceService\n class ControlPlaneService\n class WorkflowRuntimeFactory\n class WorkflowEngine\n class WorkflowPersistence\n class WorkflowRepository\n class CheckpointRepository\n class InMemoryTaskQueue\n class MySqlTraceTransport\n\n ApplicationModule --> ModuleRegistry : register(...)\n RuntimeManager --> ApplicationModule : register_module(...)\n RuntimeManager --> ModuleRegistry\n RuntimeManager --> ConfigurationManager\n RuntimeManager --> LogManager\n RuntimeManager --> HealthRegistry\n RuntimeManager --> TraceService\n RuntimeManager --> WorkerSupervisor\n RuntimeManager --> ControlPlaneService\n\n WorkerSupervisor --> Worker\n Worker --> Routine : invokes\n\n WorkflowRuntimeFactory --> WorkflowEngine : create_engine(...)\n WorkflowEngine --> WorkflowPersistence\n WorkflowPersistence --> WorkflowRepository\n WorkflowPersistence --> CheckpointRepository\n\n TraceService --> MySqlTraceTransport\n```", + "layer": "D3_SECTION_INDEX", + "title": "README.md:3. Архитектура", + "span_start": null, + "span_end": null, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "module_id": "README.md", + "type": null, + "domain": null, + "tags": [], + "section_path": "PLBA > 3. Архитектура", + "section_title": "3. Архитектура", + "order": 4, + "doc_kind": "readme", + "source_path": "README.md", + "artifact_type": null, + "blob_sha": "be28dbd7117896c754f2c6c5d21a2be36cad3c090dc813a538af5d378f426d77", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "README.md", + "content": "`ApplicationModule` - точка сборки приложения: здесь создаются зависимости, собираются рутины, создаются воркеры и регистрируются дополнительные health-контрибьюторы.\n\n`Worker` - основной runtime-контракт платформы: он управляет исполнением (потоки, цикл, стратегия остановки), возвращает `health()` и `status()`, а также определяет критичность компонента для общего health.\n\n`Routine` - прикладной паттерн (не обязательный контракт платформы): класс или набор классов, где сосредоточена бизнес-логика, которую воркер регулярно или однократно запускает.\n\nВспомогательные сервисы платформы дополняют core-модель:\n- `tracing` (`TraceService`, транспорты) - операционная трассировка контекстов и сообщений.\n- `logging` (`LogManager`) - применение конфигурации логирования из runtime-конфига.\n- `health` (`HealthRegistry`) - агрегирование здоровья воркеров и дополнительных компонентов.\n- `workflow` (`WorkflowEngine` и persistence-слой) - исполнение шагов бизнес-процесса с переходами и фиксацией состояния.\n- `control plane` (`ControlPlaneService`, `HttpControlChannel`) - внешние health/action endpoints.\n- `queue` (`InMemoryTaskQueue`) - локальный in-memory буфер как утилита прикладного уровня.", + "layer": "D3_SECTION_INDEX", + "title": "README.md:2. Концепция использования", + "span_start": null, + "span_end": null, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "module_id": "README.md", + "type": null, + "domain": null, + "tags": [], + "section_path": "PLBA > 2. Концепция использования", + "section_title": "2. Концепция использования", + "order": 3, + "doc_kind": "readme", + "source_path": "README.md", + "artifact_type": null, + "blob_sha": "be28dbd7117896c754f2c6c5d21a2be36cad3c090dc813a538af5d378f426d77", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlActionSet\nControlActionSet", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "qname": "ControlActionSet", + "kind": "class", + "signature": "ControlActionSet", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\"ControlActionSet\", \"ControlChannel\", \"ControlPlaneService\", \"HttpControlChannel\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/__init__.py:1-5", + "span_start": 1, + "span_end": 5, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlChannel(ABC):\n @abstractmethod\n async def start(self, actions: ControlActionSet) -> None:\n \"\"\"Start the control channel and bind handlers.\"\"\"\n\n @abstractmethod\n async def stop(self) -> None:\n \"\"\"Stop the control channel and release resources.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlActionSet:\n health: HealthHandler\n start: ActionHandler\n stop: ActionHandler\n status: ActionHandler", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "class HttpControlAppFactory:\n def create(\n self,\n health_provider: Callable[[], Awaitable[HealthPayload]],\n action_provider: Callable[[str, str], Awaitable[JSONResponse]],\n ) -> FastAPI:\n app = FastAPI(title=\"PLBA Control API\")\n\n @app.middleware(\"http\")\n async def log_api_call(request: Request, call_next): # type: ignore[no-untyped-def]\n started = time.monotonic()\n response = await call_next(request)\n response.headers[\"X-Response-Time-Ms\"] = str(int((time.monotonic() - started) * 1000))\n return response\n\n @app.get(\"/health\")\n async def health() -> JSONResponse:\n payload = await health_provider()\n status_code = 200 if payload.get(\"status\") == \"ok\" else 503\n return JSONResponse(content=payload, status_code=status_code)\n\n @app.get(\"/actions/{action}\")\n @app.post(\"/actions/{action}\")\n async def action(action: str, request: Request) -> JSONResponse:\n client_source = self._client_source(request)\n if action in {\"start\", \"stop\"}:\n LOGGER.warning(\"Control action requested: /actions/%s client=%s\", action, client_source)\n return await action_provider(action, client_source)\n\n return app\n\n def _client_source(self, request: Request) -> str:\n explicit_header = request.headers.get(\"X-Client-Source\", \"\").strip()\n if explicit_header:\n return explicit_header\n user_agent = request.headers.get(\"User-Agent\", \"\").strip()\n if user_agent:\n return f\"user-agent:{user_agent}\"\n return \"unknown\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_app.py:HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "В control plane обычно участвуют следующие компоненты:\n\n1. **Control Action Set** – управляет действиями контроля.\n2. **Runtime Manager** – отвечает за старт и остановку runtime.\n3. **Worker Supervisor** – контролирует жизненный цикл воркеров.\n4. **Log Manager** – применяет и восстанавливает валидные конфигурации логирования.\n5. **Health Registry** – регистрирует состояние здоровья компонентов.\n6. **Workflow Engine** – исполняет бизнес-логику и управление workflow.\n7. **Checkpoint Repository** – сохраняет промежуточные состояния задач.\n8. **MySQL Trace Transport** – транспорт для трассировки событий.\n\nЭти компоненты обеспечивают контроль и управление состоянием системы, выполнение рабочих процессов и мониторинг их здоровья.", + "summary": { + "router": { + "intent": "PROJECT_MISC", + "sub_intent": "ARCHITECTURE", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C1_SYMBOL_CATALOG", + "D3_SECTION_INDEX" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "PROJECT_MISC", + "sub_intent": "ARCHITECTURE", + "graph_id": "ProjectMiscGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "D1_MODULE_CATALOG", + "D3_SECTION_INDEX", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "unknown", + "symbol_candidates": [ + "control", + "plane" + ], + "keyword_hints": [ + "control", + "plane" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "D1_MODULE_CATALOG", + "D3_SECTION_INDEX", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "D1_MODULE_CATALOG": "vector", + "D3_SECTION_INDEX": "vector", + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "D1_MODULE_CATALOG": 4, + "D3_SECTION_INDEX": 6, + "C1_SYMBOL_CATALOG": 4, + "C0_SOURCE_CHUNKS": 4 + }, + "filters_by_layer": { + "D1_MODULE_CATALOG": { + "path_scope": [], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "D3_SECTION_INDEX": { + "path_scope": [], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "D1_MODULE_CATALOG", + "query": "Какие компоненты участвуют в control plane?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 4, + "ranking_profile": "project" + }, + { + "layer": "D3_SECTION_INDEX", + "query": "Какие компоненты участвуют в control plane?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "project" + }, + { + "layer": "C1_SYMBOL_CATALOG", + "query": "control plane", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 4, + "ranking_profile": "project" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Какие компоненты участвуют в control plane?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 4, + "ranking_profile": "project" + } + ], + "applied": [ + { + "layer": "D1_MODULE_CATALOG", + "effective_path_scope": [], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 0, + "candidates_after_filter": 0 + }, + { + "layer": "D3_SECTION_INDEX", + "effective_path_scope": [], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 4, + "candidates_after_filter": 4 + } + ], + "fallback": { + "used": true, + "reason": "scope_relaxed" + }, + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "ControlActionSet" + ] + }, + "layers": [ + { + "layer": "D1_MODULE_CATALOG", + "status": "miss", + "hit_count": 0, + "fail_reason": "scope_relaxed" + }, + { + "layer": "D3_SECTION_INDEX", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 4, + "fail_reason": null + } + ] + }, + "constraint_violations": [ + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "D1_MODULE_CATALOG", + "requested_layers": [ + "D1_MODULE_CATALOG", + "D3_SECTION_INDEX", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + } + ], + "timings_ms": { + "router": 2, + "symbol_resolution": 0, + "retrieval_total": 131, + "retrieval_by_layer": { + "D1_MODULE_CATALOG": 49, + "D3_SECTION_INDEX": 39, + "C1_SYMBOL_CATALOG": 27, + "C0_SOURCE_CHUNKS": 15 + }, + "merge_rank": 0, + "prompt_build": 0, + "llm_call": 1266 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 1377, + "evidence_rows": 11, + "evidence_chars": 11095 + }, + "evidence_summary": [ + { + "layer": "D3_SECTION_INDEX", + "count": 6, + "unique_paths": 3 + }, + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 4, + "unique_paths": 3 + } + ], + "prompt_template_id": "intent_project_misc_v1", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "control", + "plane" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 11, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-fullchain-architecture-control-plane", + "mode": "full_chain", + "run_started_at": "2026-03-12T11:56:42", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "PROJECT_MISC", + "graph_id": "ProjectMiscGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Какие компоненты участвуют в control plane?", + "normalized_query": "Какие компоненты участвуют в control plane?" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Какие компоненты участвуют в control plane?" + }, + "output": { + "intent": "PROJECT_MISC", + "graph_id": "ProjectMiscGraph", + "conversation_mode": "START", + "query": "Какие компоненты участвуют в control plane?" + }, + "diagnostics": { + "router_plan": { + "intent": "PROJECT_MISC", + "sub_intent": "ARCHITECTURE", + "graph_id": "ProjectMiscGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "D1_MODULE_CATALOG", + "D3_SECTION_INDEX", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "unknown", + "symbol_candidates": [ + "control", + "plane" + ], + "keyword_hints": [ + "control", + "plane" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 2 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Какие компоненты участвуют в control plane?" + }, + "output": { + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "ControlActionSet" + ], + "confidence": 0.0 + }, + "rag_count": 11, + "rag_rows": [ + { + "path": "web/control-ui/app.js", + "content": "const API_HEADERS = {\n \"X-Client-Source\": \"web-ui\",\n};\n\nconst stateEl = document.getElementById(\"runtime-state\");\nconst healthEl = document.getElementById(\"health-status\");\nconst detailEl = document.getElementById(\"health-detail\");\nconst updateEl = document.getElementById(\"last-update\");\nconst detailsEl = document.getElementById(\"details\");\nconst componentsEl = document.getElementById(\"components\");\nconst startBtn = document.getElementById(\"start-btn\");\nconst stopBtn = document.getElementById(\"stop-btn\");\nconst refreshBtn = document.getElementById(\"refresh-btn\");\n\nlet pollingTimer = null;\nlet actionInProgress = false;\n\nfunction setStateValue(element, value) {\n element.className = `value ${String(value || \"unknown\")}`;\n element.textContent = String(value || \"unknown\");\n}\n\nfunction setBusy(isBusy) {\n actionInProgress = isBusy;\n startBtn.disabled = isBusy;\n stopBtn.disabled = isBusy;\n refreshBtn.disabled = isBusy;\n}\n\nfunction showDetails(payload) {\n detailsEl.textContent = JSON.stringify(payload, null, 2);\n}\n\nfunction showComponents(components) {\n if (!Array.isArray(components) || components.length === 0) {\n componentsEl.innerHTML = '
Компоненты не вернулись в ответе health.
';\n return;\n }\n\n const cards = components\n .map((component) => {\n const name = String(component.name || \"unknown\");\n const status = String(component.status || \"unknown\");\n const detail = String(component.detail || \"-\");\n const critical = component.critical === true ? \"yes\" : \"no\";\n const meta = component.meta || {};\n const metaJson = JSON.stringify(meta, null, 2);\n return `\n
\n
\n ${name}\n ${status}\n
\n
\n critical\n ${critical}\n
\n
\n detail\n ${detail}\n
\n
${metaJson}
\n
\n `;\n })\n .join(\"\");\n\n componentsEl.innerHTML = cards;\n}\n\nasync function fetchJson(path, method = \"GET\") {\n const response = await fetch(`/api${path}`, {\n method,\n headers: API_HEADERS,\n });\n const payload = await response.json();\n return { status: response.status, payload };\n}\n\nasync function refreshStatus() {\n try {\n const { payload } = await fetchJson(\"/health\");\n setStateValue(stateEl, payload.state);\n setStateValue(healthEl, payload.status);\n detailEl.textContent = String(payload.detail || \"-\");\n updateEl.textContent = new Date().toLocaleTimeString();\n showComponents(payload.components || []);\n showDetails(payload);\n } catch (error) {\n setStateValue(stateEl, \"unknown\");\n setStateValue(healthEl, \"unknown\");\n detailEl.textContent = String(error);\n showComponents([]);\n showDetails({ status: \"error\", detail: String(error) });\n }\n}\n\nasync function runAction(action) {\n if (actionInProgress) {\n return;\n }\n setBusy(true);\n try {\n const result = await fetchJson(`/actions/${action}`, \"POST\");\n showDetails(result.payload);\n } catch (error) {\n showDetails({ status: \"error\", detail: String(error) });\n } finally {\n await refreshStatus();\n setBusy(false);\n }\n}\n\nstartBtn.addEventListener(\"click\", () => runAction(\"start\"));\nstopBtn.addEventListener(\"click\", () => runAction(\"stop\"));\nrefreshBtn.addEventListener(\"click\", refreshStatus);\n\nasync function startPolling() {\n await refreshStatus();\n if (pollingTimer !== null) {\n clearInterval(pollingTimer);\n }\n pollingTimer = setInterval(refreshStatus, 2000);\n}\n\nstartPolling();", + "layer": "D3_SECTION_INDEX", + "title": "web/control-ui/app.js:Document", + "span_start": null, + "span_end": null, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "module_id": "web/control-ui/app.js", + "type": null, + "domain": null, + "tags": [], + "section_path": "Document", + "section_title": "Document", + "order": 0, + "doc_kind": "misc", + "source_path": "web/control-ui/app.js", + "artifact_type": null, + "blob_sha": "2d1a28f2b6016e1efcdf652e0ebcdad008700a06e77f58e802a29be3210d628d", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "deploy/docker-compose.control-ui.yml", + "content": "services:\n app:\n image: mail_order_bot_v2:latest\n environment:\n PLBA_CONTROL_HOST: \"0.0.0.0\"\n PLBA_CONTROL_PORT: \"8080\"\n expose:\n - \"8080\"\n networks:\n - plba_net\n\n control_ui:\n image: nginx:1.27-alpine\n depends_on:\n - app\n ports:\n - \"15000:15000\"\n volumes:\n - ./deploy/nginx/plba-control-ui.conf:/etc/nginx/conf.d/default.conf:ro\n - ./web/control-ui:/usr/share/nginx/html:ro\n networks:\n - plba_net\n\nnetworks:\n plba_net:", + "layer": "D3_SECTION_INDEX", + "title": "deploy/docker-compose.control-ui.yml:Document", + "span_start": null, + "span_end": null, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "module_id": "deploy/docker-compose.control-ui.yml", + "type": null, + "domain": null, + "tags": [], + "section_path": "Document", + "section_title": "Document", + "order": 0, + "doc_kind": "misc", + "source_path": "deploy/docker-compose.control-ui.yml", + "artifact_type": null, + "blob_sha": "9b086df090fc407dbc6c86355f94030c8f864c1987d58b6ea6a82ab4236f74cc", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "README.md", + "content": "- Назначение: применение и восстановление валидной конфигурации логирования.\n- Реализация: `LogManager`.\n- Как работает / API / вызовы / таблицы:\n - API: `apply_config(config)`.\n - `RuntimeManager.start()` вызывает `logs.apply_config(config)`.\n - Если секция `log` некорректна, сервис пытается восстановить предыдущую валидную конфигурацию.\n - В БД не пишет.\n- Типовая схема использования:\n - Передать `log` секцию в конфиг и запускать runtime стандартно через `start()`.", + "layer": "D3_SECTION_INDEX", + "title": "README.md:Logging", + "span_start": null, + "span_end": null, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "module_id": "README.md", + "type": null, + "domain": null, + "tags": [], + "section_path": "PLBA > 4. Описание компонентов > 4.2 Service модули > Logging", + "section_title": "Logging", + "order": 12, + "doc_kind": "readme", + "source_path": "README.md", + "artifact_type": null, + "blob_sha": "be28dbd7117896c754f2c6c5d21a2be36cad3c090dc813a538af5d378f426d77", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "README.md", + "content": "- Назначение: runtime-исполнение бизнес-активности, управление lifecycle, интерпретация health/status.\n- Реализация: контракт `app_runtime.contracts.worker.Worker`, оркестрация через `app_runtime.workers.supervisor.WorkerSupervisor`.\n- Как работает / API / вызовы / таблицы:\n - API: `start()`, `stop(force=False)`, `health() -> WorkerHealth`, `status() -> WorkerStatus`, свойства `name`, `critical`.\n - `WorkerSupervisor.start()` запускает все воркеры, `stop()` останавливает и ждет state=`stopped`.\n - `RuntimeManager` получает агрегированные `statuses()`/`healths()` у супервизора.\n - В БД напрямую не пишет (если прикладной worker сам не реализует persistence).\n- Типовая схема использования:\n - Внутри `start()` поднимать поток/пул или запускать одноразовую задачу.\n - В цикле вызывать `routine.run()`.\n - Ошибки бизнес-логики транслировать в `health()`/`status()`.", + "layer": "D3_SECTION_INDEX", + "title": "README.md:Worker", + "span_start": null, + "span_end": null, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "module_id": "README.md", + "type": null, + "domain": null, + "tags": [], + "section_path": "PLBA > 4. Описание компонентов > 4.1 Core модули > Worker", + "section_title": "Worker", + "order": 8, + "doc_kind": "readme", + "source_path": "README.md", + "artifact_type": null, + "blob_sha": "be28dbd7117896c754f2c6c5d21a2be36cad3c090dc813a538af5d378f426d77", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "README.md", + "content": "```mermaid\nclassDiagram\n class ApplicationModule {\n <>\n +name: str\n +register(registry)\n }\n class ModuleRegistry {\n +add_worker(worker)\n +add_health_contributor(contributor)\n +register_module(name)\n }\n class RuntimeManager {\n +register_module(module)\n +add_config_file(path)\n +start()\n +stop(timeout, force)\n +status()\n +current_health()\n }\n class WorkerSupervisor {\n +register(worker)\n +start()\n +stop(timeout, force)\n +statuses()\n +healths()\n }\n class Worker {\n <>\n +name: str\n +critical: bool\n +start()\n +stop(force)\n +health()\n +status()\n }\n class Routine {\n <>\n +run()\n }\n\n class ConfigurationManager\n class LogManager\n class HealthRegistry\n class TraceService\n class ControlPlaneService\n class WorkflowRuntimeFactory\n class WorkflowEngine\n class WorkflowPersistence\n class WorkflowRepository\n class CheckpointRepository\n class InMemoryTaskQueue\n class MySqlTraceTransport\n\n ApplicationModule --> ModuleRegistry : register(...)\n RuntimeManager --> ApplicationModule : register_module(...)\n RuntimeManager --> ModuleRegistry\n RuntimeManager --> ConfigurationManager\n RuntimeManager --> LogManager\n RuntimeManager --> HealthRegistry\n RuntimeManager --> TraceService\n RuntimeManager --> WorkerSupervisor\n RuntimeManager --> ControlPlaneService\n\n WorkerSupervisor --> Worker\n Worker --> Routine : invokes\n\n WorkflowRuntimeFactory --> WorkflowEngine : create_engine(...)\n WorkflowEngine --> WorkflowPersistence\n WorkflowPersistence --> WorkflowRepository\n WorkflowPersistence --> CheckpointRepository\n\n TraceService --> MySqlTraceTransport\n```", + "layer": "D3_SECTION_INDEX", + "title": "README.md:3. Архитектура", + "span_start": null, + "span_end": null, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "module_id": "README.md", + "type": null, + "domain": null, + "tags": [], + "section_path": "PLBA > 3. Архитектура", + "section_title": "3. Архитектура", + "order": 4, + "doc_kind": "readme", + "source_path": "README.md", + "artifact_type": null, + "blob_sha": "be28dbd7117896c754f2c6c5d21a2be36cad3c090dc813a538af5d378f426d77", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "README.md", + "content": "`ApplicationModule` - точка сборки приложения: здесь создаются зависимости, собираются рутины, создаются воркеры и регистрируются дополнительные health-контрибьюторы.\n\n`Worker` - основной runtime-контракт платформы: он управляет исполнением (потоки, цикл, стратегия остановки), возвращает `health()` и `status()`, а также определяет критичность компонента для общего health.\n\n`Routine` - прикладной паттерн (не обязательный контракт платформы): класс или набор классов, где сосредоточена бизнес-логика, которую воркер регулярно или однократно запускает.\n\nВспомогательные сервисы платформы дополняют core-модель:\n- `tracing` (`TraceService`, транспорты) - операционная трассировка контекстов и сообщений.\n- `logging` (`LogManager`) - применение конфигурации логирования из runtime-конфига.\n- `health` (`HealthRegistry`) - агрегирование здоровья воркеров и дополнительных компонентов.\n- `workflow` (`WorkflowEngine` и persistence-слой) - исполнение шагов бизнес-процесса с переходами и фиксацией состояния.\n- `control plane` (`ControlPlaneService`, `HttpControlChannel`) - внешние health/action endpoints.\n- `queue` (`InMemoryTaskQueue`) - локальный in-memory буфер как утилита прикладного уровня.", + "layer": "D3_SECTION_INDEX", + "title": "README.md:2. Концепция использования", + "span_start": null, + "span_end": null, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "module_id": "README.md", + "type": null, + "domain": null, + "tags": [], + "section_path": "PLBA > 2. Концепция использования", + "section_title": "2. Концепция использования", + "order": 3, + "doc_kind": "readme", + "source_path": "README.md", + "artifact_type": null, + "blob_sha": "be28dbd7117896c754f2c6c5d21a2be36cad3c090dc813a538af5d378f426d77", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlActionSet\nControlActionSet", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "qname": "ControlActionSet", + "kind": "class", + "signature": "ControlActionSet", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\"ControlActionSet\", \"ControlChannel\", \"ControlPlaneService\", \"HttpControlChannel\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/__init__.py:1-5", + "span_start": 1, + "span_end": 5, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlChannel(ABC):\n @abstractmethod\n async def start(self, actions: ControlActionSet) -> None:\n \"\"\"Start the control channel and bind handlers.\"\"\"\n\n @abstractmethod\n async def stop(self) -> None:\n \"\"\"Stop the control channel and release resources.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlActionSet:\n health: HealthHandler\n start: ActionHandler\n stop: ActionHandler\n status: ActionHandler", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "class HttpControlAppFactory:\n def create(\n self,\n health_provider: Callable[[], Awaitable[HealthPayload]],\n action_provider: Callable[[str, str], Awaitable[JSONResponse]],\n ) -> FastAPI:\n app = FastAPI(title=\"PLBA Control API\")\n\n @app.middleware(\"http\")\n async def log_api_call(request: Request, call_next): # type: ignore[no-untyped-def]\n started = time.monotonic()\n response = await call_next(request)\n response.headers[\"X-Response-Time-Ms\"] = str(int((time.monotonic() - started) * 1000))\n return response\n\n @app.get(\"/health\")\n async def health() -> JSONResponse:\n payload = await health_provider()\n status_code = 200 if payload.get(\"status\") == \"ok\" else 503\n return JSONResponse(content=payload, status_code=status_code)\n\n @app.get(\"/actions/{action}\")\n @app.post(\"/actions/{action}\")\n async def action(action: str, request: Request) -> JSONResponse:\n client_source = self._client_source(request)\n if action in {\"start\", \"stop\"}:\n LOGGER.warning(\"Control action requested: /actions/%s client=%s\", action, client_source)\n return await action_provider(action, client_source)\n\n return app\n\n def _client_source(self, request: Request) -> str:\n explicit_header = request.headers.get(\"X-Client-Source\", \"\").strip()\n if explicit_header:\n return explicit_header\n user_agent = request.headers.get(\"User-Agent\", \"\").strip()\n if user_agent:\n return f\"user-agent:{user_agent}\"\n return \"unknown\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_app.py:HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "D1_MODULE_CATALOG", + "D3_SECTION_INDEX", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "D1_MODULE_CATALOG": "vector", + "D3_SECTION_INDEX": "vector", + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "D1_MODULE_CATALOG": 4, + "D3_SECTION_INDEX": 6, + "C1_SYMBOL_CATALOG": 4, + "C0_SOURCE_CHUNKS": 4 + }, + "filters_by_layer": { + "D1_MODULE_CATALOG": { + "path_scope": [], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "D3_SECTION_INDEX": { + "path_scope": [], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "D1_MODULE_CATALOG", + "query": "Какие компоненты участвуют в control plane?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 4, + "ranking_profile": "project" + }, + { + "layer": "D3_SECTION_INDEX", + "query": "Какие компоненты участвуют в control plane?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "project" + }, + { + "layer": "C1_SYMBOL_CATALOG", + "query": "control plane", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 4, + "ranking_profile": "project" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Какие компоненты участвуют в control plane?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 4, + "ranking_profile": "project" + } + ], + "applied": [ + { + "layer": "D1_MODULE_CATALOG", + "effective_path_scope": [], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 0, + "candidates_after_filter": 0 + }, + { + "layer": "D3_SECTION_INDEX", + "effective_path_scope": [], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 4, + "candidates_after_filter": 4 + } + ], + "fallback": { + "used": true, + "reason": "scope_relaxed" + }, + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "ControlActionSet" + ] + }, + "layers": [ + { + "layer": "D1_MODULE_CATALOG", + "status": "miss", + "hit_count": 0, + "fail_reason": "scope_relaxed" + }, + { + "layer": "D3_SECTION_INDEX", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 4, + "fail_reason": null + } + ] + }, + "constraint_violations": [ + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "D1_MODULE_CATALOG", + "requested_layers": [ + "D1_MODULE_CATALOG", + "D3_SECTION_INDEX", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + } + ], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 131, + "retrieval_by_layer": { + "D1_MODULE_CATALOG": 49, + "D3_SECTION_INDEX": 39, + "C1_SYMBOL_CATALOG": 27, + "C0_SOURCE_CHUNKS": 15 + }, + "merge_rank": 0 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Какие компоненты участвуют в control plane?", + "rag_count": 11 + }, + "output": { + "llm_answer": "В control plane обычно участвуют следующие компоненты:\n\n1. **Control Action Set** – управляет действиями контроля.\n2. **Runtime Manager** – отвечает за старт и остановку runtime.\n3. **Worker Supervisor** – контролирует жизненный цикл воркеров.\n4. **Log Manager** – применяет и восстанавливает валидные конфигурации логирования.\n5. **Health Registry** – регистрирует состояние здоровья компонентов.\n6. **Workflow Engine** – исполняет бизнес-логику и управление workflow.\n7. **Checkpoint Repository** – сохраняет промежуточные состояния задач.\n8. **MySQL Trace Transport** – транспорт для трассировки событий.\n\nЭти компоненты обеспечивают контроль и управление состоянием системы, выполнение рабочих процессов и мониторинг их здоровья." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 1377, + "evidence_rows": 11, + "evidence_chars": 11095 + }, + "evidence_summary": [ + { + "layer": "D3_SECTION_INDEX", + "count": 6, + "unique_paths": 3 + }, + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 4, + "unique_paths": 3 + } + ], + "prompt_template_id": "intent_project_misc_v1", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 1266 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_115642/full_chain_plba_code_subintents_plba-fullchain-architecture-control-plane.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_115642/full_chain_plba_code_subintents_plba-fullchain-architecture-control-plane.md new file mode 100644 index 0000000..a6265a9 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_115642/full_chain_plba_code_subintents_plba-fullchain-architecture-control-plane.md @@ -0,0 +1,38 @@ +# plba-fullchain-architecture-control-plane + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents.yaml +- runner: runtime +- mode: full_chain +- passed: False + +## Query +Какие компоненты участвуют в control plane? + +## Actual +{ + "intent": "PROJECT_MISC", + "sub_intent": "ARCHITECTURE", + "graph_id": "ProjectMiscGraph", + "conversation_mode": "START", + "rag_count": 11, + "llm_answer": "В control plane обычно участвуют следующие компоненты:\n\n1. **Control Action Set** – управляет действиями контроля.\n2. **Runtime Manager** – отвечает за старт и остановку runtime.\n3. **Worker Supervisor** – контролирует жизненный цикл воркеров.\n4. **Log Manager** – применяет и восстанавливает валидные конфигурации логирования.\n5. **Health Registry** – регистрирует состояние здоровья компонентов.\n6. **Workflow Engine** – исполняет бизнес-логику и управление workflow.\n7. **Checkpoint Repository** – сохраняет промежуточные состояния задач.\n8. **MySQL Trace Transport** – транспорт для трассировки событий.\n\nЭти компоненты обеспечивают контроль и управление состоянием системы, выполнение рабочих процессов и мониторинг их здоровья.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "control", + "plane" + ], + "layers": [ + "D1_MODULE_CATALOG", + "D3_SECTION_INDEX", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- intent: expected CODE_QA, got PROJECT_MISC +- graph_id: expected CodeQAGraph, got ProjectMiscGraph +- layers should include 'C4_SEMANTIC_ROLES', got ['D1_MODULE_CATALOG', 'D3_SECTION_INDEX', 'C1_SYMBOL_CATALOG', 'C0_SOURCE_CHUNKS'] +- layers should include 'C2_DEPENDENCY_GRAPH', got ['D1_MODULE_CATALOG', 'D3_SECTION_INDEX', 'C1_SYMBOL_CATALOG', 'C0_SOURCE_CHUNKS'] +- layers should include 'C3_ENTRYPOINTS', got ['D1_MODULE_CATALOG', 'D3_SECTION_INDEX', 'C1_SYMBOL_CATALOG', 'C0_SOURCE_CHUNKS'] \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_115642/full_chain_plba_code_subintents_plba-fullchain-explain-local-runtime-manager.json b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_115642/full_chain_plba_code_subintents_plba-fullchain-explain-local-runtime-manager.json new file mode 100644 index 0000000..2847f0b --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_115642/full_chain_plba_code_subintents_plba-fullchain-explain-local-runtime-manager.json @@ -0,0 +1,1333 @@ +{ + "case_id": "plba-fullchain-explain-local-runtime-manager", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN_LOCAL", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 6, + "llm_answer": "Класс `RuntimeManager` из файла `src/app_runtime/core/runtime.py` предназначен для управления жизненным циклом приложения во время его выполнения.\n\n### Что делает класс:\n1. **Инициализация (Constructor):**\n - При создании объекта класса инициализируются все основные компоненты системы через параметры конструктора (`configuration`, `services`, `traces`, `health`, `logs`, `workers`, `control_plane`).\n - Если эти параметры отсутствуют, создаются их дефолтные экземпляры внутри метода.\n \n2. **Регистрация модулей:**\n - Метод `register_module(module)` позволяет зарегистрировать новый модуль приложения в менеджере ресурсов (`self.registry`), обеспечивая интеграцию нового функционала.\n\n3. **Управление состоянием приложения:**\n - Переменные `_started`, `_state`, `_core_registered`, `_workers_registered` отслеживают состояние менеджера, позволяя управлять различными фазами жизненного цикла приложения.\n\n### Входы и выходы:\n- Входными параметрами являются различные сервисы и менеджеры, такие как конфигурация, службы, трассировка, здоровье, логирование и контроль за рабочими процессами.\n- Выходом является объект менеджера, готовый к управлению приложением.\n\n### Связь с ближайшим контекстом:\n- Класс управляется через методы инициализации и регистрации модулей, взаимодействуя напрямую с другими компонентами приложения через поля и зависимости.\n- Через метод `register_module()` осуществляется интеграция новых компонентов приложения в систему.\n\nТаким образом, `RuntimeManager` выступает центральным координатором различных сервисов и процессов приложения, предоставляя унифицированный интерфейс для их взаимодействия и управления жизненным циклом.", + "answer_mode": "answered", + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C2_DEPENDENCY_GRAPH" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-fullchain-explain-local-runtime-manager", + "text": "Почему в файле src/app_runtime/core/runtime.py класс RuntimeManager устроен так?", + "mode": "full_chain", + "run_started_at": "2026-03-12T11:56:42", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Почему в файле src/app_runtime/core/runtime.py класс RuntimeManager устроен так?", + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ], + "confidence": 0.99 + }, + "rag_count": 6, + "rag_rows": [ + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager\nRuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "qname": "RuntimeManager", + "kind": "class", + "signature": "RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 59, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1", + "dst_ref": "RuntimeManager.start", + "resolution": "resolved", + "slice_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.start" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager._register_core_services", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 127, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6", + "dst_ref": "RuntimeManager._register_core_services", + "resolution": "resolved", + "slice_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager._register_core_services" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 52, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.services\n -> RuntimeManager.__init__", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 33, + "span_end": 39, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d43af85989222ee6d788ce418cdcb217c7ff044cfb915e3bdbd184417dc7bd61", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "dst_ref": "RuntimeManager.__init__", + "resolution": "resolved", + "slice_id": "d43af85989222ee6d788ce418cdcb217c7ff044cfb915e3bdbd184417dc7bd61", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.services", + "RuntimeManager.__init__" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "Класс `RuntimeManager` из файла `src/app_runtime/core/runtime.py` предназначен для управления жизненным циклом приложения во время его выполнения.\n\n### Что делает класс:\n1. **Инициализация (Constructor):**\n - При создании объекта класса инициализируются все основные компоненты системы через параметры конструктора (`configuration`, `services`, `traces`, `health`, `logs`, `workers`, `control_plane`).\n - Если эти параметры отсутствуют, создаются их дефолтные экземпляры внутри метода.\n \n2. **Регистрация модулей:**\n - Метод `register_module(module)` позволяет зарегистрировать новый модуль приложения в менеджере ресурсов (`self.registry`), обеспечивая интеграцию нового функционала.\n\n3. **Управление состоянием приложения:**\n - Переменные `_started`, `_state`, `_core_registered`, `_workers_registered` отслеживают состояние менеджера, позволяя управлять различными фазами жизненного цикла приложения.\n\n### Входы и выходы:\n- Входными параметрами являются различные сервисы и менеджеры, такие как конфигурация, службы, трассировка, здоровье, логирование и контроль за рабочими процессами.\n- Выходом является объект менеджера, готовый к управлению приложением.\n\n### Связь с ближайшим контекстом:\n- Класс управляется через методы инициализации и регистрации модулей, взаимодействуя напрямую с другими компонентами приложения через поля и зависимости.\n- Через метод `register_module()` осуществляется интеграция новых компонентов приложения в систему.\n\nТаким образом, `RuntimeManager` выступает центральным координатором различных сервисов и процессов приложения, предоставляя унифицированный интерфейс для их взаимодействия и управления жизненным циклом.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN_LOCAL", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN_LOCAL", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C2_DEPENDENCY_GRAPH" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "RuntimeManager" + ], + "keyword_hints": [ + "src/app_runtime/core/runtime.py", + "RuntimeManager" + ], + "path_hints": [ + "src/app_runtime/core/runtime.py" + ], + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C2_DEPENDENCY_GRAPH" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 12, + "C2_DEPENDENCY_GRAPH": 4 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "RuntimeManager", + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Почему в файле src/app_runtime/core/runtime.py класс RuntimeManager устроен так?", + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 12, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Почему в файле src/app_runtime/core/runtime.py класс RuntimeManager устроен так?", + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 4, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 4, + "candidates_after_filter": 4 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 4, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 1, + "symbol_resolution": 0, + "retrieval_total": 78, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 30, + "C0_SOURCE_CHUNKS": 21, + "C2_DEPENDENCY_GRAPH": 26 + }, + "merge_rank": 22, + "prompt_build": 0, + "llm_call": 2465 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 784, + "evidence_rows": 6, + "evidence_chars": 6650 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 4, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_explain_local_ru_v1", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "src/app_runtime/core/runtime.py", + "RuntimeManager" + ], + "path_scope": [ + "src/app_runtime/core/runtime.py" + ] + }, + "llm": { + "used_evidence_count": 6, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-fullchain-explain-local-runtime-manager", + "mode": "full_chain", + "run_started_at": "2026-03-12T11:56:42", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Почему в файле src/app_runtime/core/runtime.py класс RuntimeManager устроен так?", + "normalized_query": "Почему в файле src/app_runtime/core/runtime.py класс RuntimeManager устроен так?" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Почему в файле src/app_runtime/core/runtime.py класс RuntimeManager устроен так?" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Почему в файле src/app_runtime/core/runtime.py класс RuntimeManager устроен так?" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN_LOCAL", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C2_DEPENDENCY_GRAPH" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "RuntimeManager" + ], + "keyword_hints": [ + "src/app_runtime/core/runtime.py", + "RuntimeManager" + ], + "path_hints": [ + "src/app_runtime/core/runtime.py" + ], + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 1 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Почему в файле src/app_runtime/core/runtime.py класс RuntimeManager устроен так?" + }, + "output": { + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ], + "confidence": 0.99 + }, + "rag_count": 6, + "rag_rows": [ + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager\nRuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "qname": "RuntimeManager", + "kind": "class", + "signature": "RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 59, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1", + "dst_ref": "RuntimeManager.start", + "resolution": "resolved", + "slice_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.start" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager._register_core_services", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 127, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6", + "dst_ref": "RuntimeManager._register_core_services", + "resolution": "resolved", + "slice_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager._register_core_services" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 52, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.services\n -> RuntimeManager.__init__", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 33, + "span_end": 39, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d43af85989222ee6d788ce418cdcb217c7ff044cfb915e3bdbd184417dc7bd61", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "dst_ref": "RuntimeManager.__init__", + "resolution": "resolved", + "slice_id": "d43af85989222ee6d788ce418cdcb217c7ff044cfb915e3bdbd184417dc7bd61", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.services", + "RuntimeManager.__init__" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C2_DEPENDENCY_GRAPH" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 12, + "C2_DEPENDENCY_GRAPH": 4 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "RuntimeManager", + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Почему в файле src/app_runtime/core/runtime.py класс RuntimeManager устроен так?", + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 12, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Почему в файле src/app_runtime/core/runtime.py класс RuntimeManager устроен так?", + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 4, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 4, + "candidates_after_filter": 4 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 4, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 78, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 30, + "C0_SOURCE_CHUNKS": 21, + "C2_DEPENDENCY_GRAPH": 26 + }, + "merge_rank": 22 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Почему в файле src/app_runtime/core/runtime.py класс RuntimeManager устроен так?", + "rag_count": 6 + }, + "output": { + "llm_answer": "Класс `RuntimeManager` из файла `src/app_runtime/core/runtime.py` предназначен для управления жизненным циклом приложения во время его выполнения.\n\n### Что делает класс:\n1. **Инициализация (Constructor):**\n - При создании объекта класса инициализируются все основные компоненты системы через параметры конструктора (`configuration`, `services`, `traces`, `health`, `logs`, `workers`, `control_plane`).\n - Если эти параметры отсутствуют, создаются их дефолтные экземпляры внутри метода.\n \n2. **Регистрация модулей:**\n - Метод `register_module(module)` позволяет зарегистрировать новый модуль приложения в менеджере ресурсов (`self.registry`), обеспечивая интеграцию нового функционала.\n\n3. **Управление состоянием приложения:**\n - Переменные `_started`, `_state`, `_core_registered`, `_workers_registered` отслеживают состояние менеджера, позволяя управлять различными фазами жизненного цикла приложения.\n\n### Входы и выходы:\n- Входными параметрами являются различные сервисы и менеджеры, такие как конфигурация, службы, трассировка, здоровье, логирование и контроль за рабочими процессами.\n- Выходом является объект менеджера, готовый к управлению приложением.\n\n### Связь с ближайшим контекстом:\n- Класс управляется через методы инициализации и регистрации модулей, взаимодействуя напрямую с другими компонентами приложения через поля и зависимости.\n- Через метод `register_module()` осуществляется интеграция новых компонентов приложения в систему.\n\nТаким образом, `RuntimeManager` выступает центральным координатором различных сервисов и процессов приложения, предоставляя унифицированный интерфейс для их взаимодействия и управления жизненным циклом." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 784, + "evidence_rows": 6, + "evidence_chars": 6650 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 4, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_explain_local_ru_v1", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 2465 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_115642/full_chain_plba_code_subintents_plba-fullchain-explain-local-runtime-manager.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_115642/full_chain_plba_code_subintents_plba-fullchain-explain-local-runtime-manager.md new file mode 100644 index 0000000..75508bc --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_115642/full_chain_plba_code_subintents_plba-fullchain-explain-local-runtime-manager.md @@ -0,0 +1,34 @@ +# plba-fullchain-explain-local-runtime-manager + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Почему в файле src/app_runtime/core/runtime.py класс RuntimeManager устроен так? + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "EXPLAIN_LOCAL", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 6, + "llm_answer": "Класс `RuntimeManager` из файла `src/app_runtime/core/runtime.py` предназначен для управления жизненным циклом приложения во время его выполнения.\n\n### Что делает класс:\n1. **Инициализация (Constructor):**\n - При создании объекта класса инициализируются все основные компоненты системы через параметры конструктора (`configuration`, `services`, `traces`, `health`, `logs`, `workers`, `control_plane`).\n - Если эти параметры отсутствуют, создаются их дефолтные экземпляры внутри метода.\n \n2. **Регистрация модулей:**\n - Метод `register_module(module)` позволяет зарегистрировать новый модуль приложения в менеджере ресурсов (`self.registry`), обеспечивая интеграцию нового функционала.\n\n3. **Управление состоянием приложения:**\n - Переменные `_started`, `_state`, `_core_registered`, `_workers_registered` отслеживают состояние менеджера, позволяя управлять различными фазами жизненного цикла приложения.\n\n### Входы и выходы:\n- Входными параметрами являются различные сервисы и менеджеры, такие как конфигурация, службы, трассировка, здоровье, логирование и контроль за рабочими процессами.\n- Выходом является объект менеджера, готовый к управлению приложением.\n\n### Связь с ближайшим контекстом:\n- Класс управляется через методы инициализации и регистрации модулей, взаимодействуя напрямую с другими компонентами приложения через поля и зависимости.\n- Через метод `register_module()` осуществляется интеграция новых компонентов приложения в систему.\n\nТаким образом, `RuntimeManager` выступает центральным координатором различных сервисов и процессов приложения, предоставляя унифицированный интерфейс для их взаимодействия и управления жизненным циклом.", + "answer_mode": "answered", + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C2_DEPENDENCY_GRAPH" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_115642/full_chain_plba_code_subintents_plba-fullchain-explain-runtime-manager.json b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_115642/full_chain_plba_code_subintents_plba-fullchain-explain-runtime-manager.json new file mode 100644 index 0000000..47678ac --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_115642/full_chain_plba_code_subintents_plba-fullchain-explain-runtime-manager.json @@ -0,0 +1,2088 @@ +{ + "case_id": "plba-fullchain-explain-runtime-manager", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 12, + "llm_answer": "## Назначение класса `RuntimeManager`\nКласс `RuntimeManager` играет роль центрального координатора для управления жизненным циклом различных компонентов системы, предоставляя интерфейс для их регистрации, запуска и мониторинга. Он служит своего рода \"менеджером\" всех сервисов и модулей приложения, обеспечивая согласованное выполнение задач через заданные потоки данных и состояния.\n\n## Ключевые зависимости\nКлючевыми зависимостями являются компоненты и сервисы, которые управляются и координируются `RuntimeManager`. Вот основные зависимости, указанные в символическом каталоге (`C1_SYMBOL_CATALOG`) и графе зависимостей (`C2_DEPENDENCY_GRAPH`):\n\n- **ConfigurationManager**: отвечает за конфигурацию приложения;\n- **ServiceContainer**: содержит коллекцию зарегистрированных сервисов;\n- **TraceService**: сервис для отслеживания событий и действий;\n- **HealthRegistry**: регистрирует и мониторит состояние здоровья сервисов;\n- **LogManager**: управляет логированием событий;\n- **WorkerSupervisor**: следит за рабочими процессами и выполняет необходимые действия по управлению ими;\n- **ControlPlaneService**: центральный контроллер для координации действий и обработки запросов от клиентов.\n\n## Поток данных или вызовов\nОсновной сценарий работы выглядит следующим образом:\n\n1. **Инициализация** (`__init__` метод): \n - Создаются и инициализируются экземпляры необходимых служб и классов с использованием значений по умолчанию, если аргументы отсутствуют.\n \n2. **Регистрация модулей** (`register_module` метод):\n - Регистрируется модуль, добавляя его в реестр доступных сервисов (`registry`).\n \n3. **Запуск и мониторинг**:\n - Запускает различные службы и сервисы, обеспечивая синхронную работу процессов и мониторинг их состояний.\n - Поддерживает регистрацию и управление состоянием жизненных циклов этих служб, таких как регистрация основного модуля, рабочих модулей и контроль над рабочим процессом.\n\n## Важные детали реализации\nВот некоторые ключевые моменты, выявленные из анализа кода (`C0_SOURCE_CHUNKS`), символических объявлений (`C1_SYMBOL_CATALOG`) и графа зависимостей (`C2_DEPENDENCY_GRAPH`):\n\n### Общие наблюдения:\n- Класс использует паттерн \"синглтон\", так как существует только один экземпляр этого менеджера, управляемый всеми компонентами системы.\n- Метод `__init__` выполняет начальную настройку объектов при создании экземпляра класса.\n- Основное поведение реализуется через методы `register_module`, обеспечивающие гибкость добавления новых модулей и приложений.\n- Внутренний регистр (`registry`) используется для хранения зарегистрированных модулей и их экземпляров.\n\n### Дополнительные детали:\n- Переменные `_started`, `_core_registered`, `_workers_registered` используются для отслеживания текущего состояния и обеспечения корректного порядка выполнения операций.\n- Методы и переменные, связанные с управлением жизненным циклом (`_register_core_services`, `_stop_async`), играют важную роль в обеспечении корректной последовательности шагов при запуске и остановке системы.\n\n## Осторожные выводы\nНа основании доступного контекста и данных о слоях RAG сложно точно утверждать, что все аспекты поведения и взаимодействия полностью отражены. Некоторые элементы могут быть опущены или недостаточно детализированы в текущих источниках информации. Рекомендуется дополнительно изучить полный контекст исходного кода и документацию к проекту для более полного понимания.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-fullchain-explain-runtime-manager", + "text": "Объясни как работает класс RuntimeManager", + "mode": "full_chain", + "run_started_at": "2026-03-12T11:56:42", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни как работает класс RuntimeManager", + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ], + "confidence": 0.99 + }, + "rag_count": 12, + "rag_rows": [ + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager\nRuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "qname": "RuntimeManager", + "kind": "class", + "signature": "RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests manager\n- orchestrates role-like calls (4)\n- reads and writes state attributes\n- participates in dataflow slices (50)", + "layer": "C4_SEMANTIC_ROLES", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 43, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "symbol_name": "RuntimeManager", + "qname": "RuntimeManager", + "role": "pipeline_stage", + "confidence": 0.67, + "dataflow_participation": 50, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 52, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "## Назначение класса `RuntimeManager`\nКласс `RuntimeManager` играет роль центрального координатора для управления жизненным циклом различных компонентов системы, предоставляя интерфейс для их регистрации, запуска и мониторинга. Он служит своего рода \"менеджером\" всех сервисов и модулей приложения, обеспечивая согласованное выполнение задач через заданные потоки данных и состояния.\n\n## Ключевые зависимости\nКлючевыми зависимостями являются компоненты и сервисы, которые управляются и координируются `RuntimeManager`. Вот основные зависимости, указанные в символическом каталоге (`C1_SYMBOL_CATALOG`) и графе зависимостей (`C2_DEPENDENCY_GRAPH`):\n\n- **ConfigurationManager**: отвечает за конфигурацию приложения;\n- **ServiceContainer**: содержит коллекцию зарегистрированных сервисов;\n- **TraceService**: сервис для отслеживания событий и действий;\n- **HealthRegistry**: регистрирует и мониторит состояние здоровья сервисов;\n- **LogManager**: управляет логированием событий;\n- **WorkerSupervisor**: следит за рабочими процессами и выполняет необходимые действия по управлению ими;\n- **ControlPlaneService**: центральный контроллер для координации действий и обработки запросов от клиентов.\n\n## Поток данных или вызовов\nОсновной сценарий работы выглядит следующим образом:\n\n1. **Инициализация** (`__init__` метод): \n - Создаются и инициализируются экземпляры необходимых служб и классов с использованием значений по умолчанию, если аргументы отсутствуют.\n \n2. **Регистрация модулей** (`register_module` метод):\n - Регистрируется модуль, добавляя его в реестр доступных сервисов (`registry`).\n \n3. **Запуск и мониторинг**:\n - Запускает различные службы и сервисы, обеспечивая синхронную работу процессов и мониторинг их состояний.\n - Поддерживает регистрацию и управление состоянием жизненных циклов этих служб, таких как регистрация основного модуля, рабочих модулей и контроль над рабочим процессом.\n\n## Важные детали реализации\nВот некоторые ключевые моменты, выявленные из анализа кода (`C0_SOURCE_CHUNKS`), символических объявлений (`C1_SYMBOL_CATALOG`) и графа зависимостей (`C2_DEPENDENCY_GRAPH`):\n\n### Общие наблюдения:\n- Класс использует паттерн \"синглтон\", так как существует только один экземпляр этого менеджера, управляемый всеми компонентами системы.\n- Метод `__init__` выполняет начальную настройку объектов при создании экземпляра класса.\n- Основное поведение реализуется через методы `register_module`, обеспечивающие гибкость добавления новых модулей и приложений.\n- Внутренний регистр (`registry`) используется для хранения зарегистрированных модулей и их экземпляров.\n\n### Дополнительные детали:\n- Переменные `_started`, `_core_registered`, `_workers_registered` используются для отслеживания текущего состояния и обеспечения корректного порядка выполнения операций.\n- Методы и переменные, связанные с управлением жизненным циклом (`_register_core_services`, `_stop_async`), играют важную роль в обеспечении корректной последовательности шагов при запуске и остановке системы.\n\n## Осторожные выводы\nНа основании доступного контекста и данных о слоях RAG сложно точно утверждать, что все аспекты поведения и взаимодействия полностью отражены. Некоторые элементы могут быть опущены или недостаточно детализированы в текущих источниках информации. Рекомендуется дополнительно изучить полный контекст исходного кода и документацию к проекту для более полного понимания.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS", + "C4_SEMANTIC_ROLES" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 1, + "symbol_resolution": 0, + "retrieval_total": 169, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 45, + "C0_SOURCE_CHUNKS": 17, + "C4_SEMANTIC_ROLES": 15, + "C2_DEPENDENCY_GRAPH": 57, + "C3_ENTRYPOINTS": 9 + }, + "merge_rank": 18, + "prompt_build": 0, + "llm_call": 4743 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 797, + "evidence_rows": 12, + "evidence_chars": 7130 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 2 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_explain_ru_v1", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "RuntimeManager" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 12, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-fullchain-explain-runtime-manager", + "mode": "full_chain", + "run_started_at": "2026-03-12T11:56:42", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Объясни как работает класс RuntimeManager", + "normalized_query": "Объясни как работает класс RuntimeManager" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Объясни как работает класс RuntimeManager" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни как работает класс RuntimeManager" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 1 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Объясни как работает класс RuntimeManager" + }, + "output": { + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ], + "confidence": 0.99 + }, + "rag_count": 12, + "rag_rows": [ + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager\nRuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "qname": "RuntimeManager", + "kind": "class", + "signature": "RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests manager\n- orchestrates role-like calls (4)\n- reads and writes state attributes\n- participates in dataflow slices (50)", + "layer": "C4_SEMANTIC_ROLES", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 43, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "symbol_name": "RuntimeManager", + "qname": "RuntimeManager", + "role": "pipeline_stage", + "confidence": 0.67, + "dataflow_participation": 50, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 52, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 169, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 45, + "C0_SOURCE_CHUNKS": 17, + "C4_SEMANTIC_ROLES": 15, + "C2_DEPENDENCY_GRAPH": 57, + "C3_ENTRYPOINTS": 9 + }, + "merge_rank": 18 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Объясни как работает класс RuntimeManager", + "rag_count": 12 + }, + "output": { + "llm_answer": "## Назначение класса `RuntimeManager`\nКласс `RuntimeManager` играет роль центрального координатора для управления жизненным циклом различных компонентов системы, предоставляя интерфейс для их регистрации, запуска и мониторинга. Он служит своего рода \"менеджером\" всех сервисов и модулей приложения, обеспечивая согласованное выполнение задач через заданные потоки данных и состояния.\n\n## Ключевые зависимости\nКлючевыми зависимостями являются компоненты и сервисы, которые управляются и координируются `RuntimeManager`. Вот основные зависимости, указанные в символическом каталоге (`C1_SYMBOL_CATALOG`) и графе зависимостей (`C2_DEPENDENCY_GRAPH`):\n\n- **ConfigurationManager**: отвечает за конфигурацию приложения;\n- **ServiceContainer**: содержит коллекцию зарегистрированных сервисов;\n- **TraceService**: сервис для отслеживания событий и действий;\n- **HealthRegistry**: регистрирует и мониторит состояние здоровья сервисов;\n- **LogManager**: управляет логированием событий;\n- **WorkerSupervisor**: следит за рабочими процессами и выполняет необходимые действия по управлению ими;\n- **ControlPlaneService**: центральный контроллер для координации действий и обработки запросов от клиентов.\n\n## Поток данных или вызовов\nОсновной сценарий работы выглядит следующим образом:\n\n1. **Инициализация** (`__init__` метод): \n - Создаются и инициализируются экземпляры необходимых служб и классов с использованием значений по умолчанию, если аргументы отсутствуют.\n \n2. **Регистрация модулей** (`register_module` метод):\n - Регистрируется модуль, добавляя его в реестр доступных сервисов (`registry`).\n \n3. **Запуск и мониторинг**:\n - Запускает различные службы и сервисы, обеспечивая синхронную работу процессов и мониторинг их состояний.\n - Поддерживает регистрацию и управление состоянием жизненных циклов этих служб, таких как регистрация основного модуля, рабочих модулей и контроль над рабочим процессом.\n\n## Важные детали реализации\nВот некоторые ключевые моменты, выявленные из анализа кода (`C0_SOURCE_CHUNKS`), символических объявлений (`C1_SYMBOL_CATALOG`) и графа зависимостей (`C2_DEPENDENCY_GRAPH`):\n\n### Общие наблюдения:\n- Класс использует паттерн \"синглтон\", так как существует только один экземпляр этого менеджера, управляемый всеми компонентами системы.\n- Метод `__init__` выполняет начальную настройку объектов при создании экземпляра класса.\n- Основное поведение реализуется через методы `register_module`, обеспечивающие гибкость добавления новых модулей и приложений.\n- Внутренний регистр (`registry`) используется для хранения зарегистрированных модулей и их экземпляров.\n\n### Дополнительные детали:\n- Переменные `_started`, `_core_registered`, `_workers_registered` используются для отслеживания текущего состояния и обеспечения корректного порядка выполнения операций.\n- Методы и переменные, связанные с управлением жизненным циклом (`_register_core_services`, `_stop_async`), играют важную роль в обеспечении корректной последовательности шагов при запуске и остановке системы.\n\n## Осторожные выводы\nНа основании доступного контекста и данных о слоях RAG сложно точно утверждать, что все аспекты поведения и взаимодействия полностью отражены. Некоторые элементы могут быть опущены или недостаточно детализированы в текущих источниках информации. Рекомендуется дополнительно изучить полный контекст исходного кода и документацию к проекту для более полного понимания." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 797, + "evidence_rows": 12, + "evidence_chars": 7130 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 2 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_explain_ru_v1", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 4743 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_115642/full_chain_plba_code_subintents_plba-fullchain-explain-runtime-manager.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_115642/full_chain_plba_code_subintents_plba-fullchain-explain-runtime-manager.md new file mode 100644 index 0000000..52d1113 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_115642/full_chain_plba_code_subintents_plba-fullchain-explain-runtime-manager.md @@ -0,0 +1,34 @@ +# plba-fullchain-explain-runtime-manager + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Объясни как работает класс RuntimeManager + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 12, + "llm_answer": "## Назначение класса `RuntimeManager`\nКласс `RuntimeManager` играет роль центрального координатора для управления жизненным циклом различных компонентов системы, предоставляя интерфейс для их регистрации, запуска и мониторинга. Он служит своего рода \"менеджером\" всех сервисов и модулей приложения, обеспечивая согласованное выполнение задач через заданные потоки данных и состояния.\n\n## Ключевые зависимости\nКлючевыми зависимостями являются компоненты и сервисы, которые управляются и координируются `RuntimeManager`. Вот основные зависимости, указанные в символическом каталоге (`C1_SYMBOL_CATALOG`) и графе зависимостей (`C2_DEPENDENCY_GRAPH`):\n\n- **ConfigurationManager**: отвечает за конфигурацию приложения;\n- **ServiceContainer**: содержит коллекцию зарегистрированных сервисов;\n- **TraceService**: сервис для отслеживания событий и действий;\n- **HealthRegistry**: регистрирует и мониторит состояние здоровья сервисов;\n- **LogManager**: управляет логированием событий;\n- **WorkerSupervisor**: следит за рабочими процессами и выполняет необходимые действия по управлению ими;\n- **ControlPlaneService**: центральный контроллер для координации действий и обработки запросов от клиентов.\n\n## Поток данных или вызовов\nОсновной сценарий работы выглядит следующим образом:\n\n1. **Инициализация** (`__init__` метод): \n - Создаются и инициализируются экземпляры необходимых служб и классов с использованием значений по умолчанию, если аргументы отсутствуют.\n \n2. **Регистрация модулей** (`register_module` метод):\n - Регистрируется модуль, добавляя его в реестр доступных сервисов (`registry`).\n \n3. **Запуск и мониторинг**:\n - Запускает различные службы и сервисы, обеспечивая синхронную работу процессов и мониторинг их состояний.\n - Поддерживает регистрацию и управление состоянием жизненных циклов этих служб, таких как регистрация основного модуля, рабочих модулей и контроль над рабочим процессом.\n\n## Важные детали реализации\nВот некоторые ключевые моменты, выявленные из анализа кода (`C0_SOURCE_CHUNKS`), символических объявлений (`C1_SYMBOL_CATALOG`) и графа зависимостей (`C2_DEPENDENCY_GRAPH`):\n\n### Общие наблюдения:\n- Класс использует паттерн \"синглтон\", так как существует только один экземпляр этого менеджера, управляемый всеми компонентами системы.\n- Метод `__init__` выполняет начальную настройку объектов при создании экземпляра класса.\n- Основное поведение реализуется через методы `register_module`, обеспечивающие гибкость добавления новых модулей и приложений.\n- Внутренний регистр (`registry`) используется для хранения зарегистрированных модулей и их экземпляров.\n\n### Дополнительные детали:\n- Переменные `_started`, `_core_registered`, `_workers_registered` используются для отслеживания текущего состояния и обеспечения корректного порядка выполнения операций.\n- Методы и переменные, связанные с управлением жизненным циклом (`_register_core_services`, `_stop_async`), играют важную роль в обеспечении корректной последовательности шагов при запуске и остановке системы.\n\n## Осторожные выводы\nНа основании доступного контекста и данных о слоях RAG сложно точно утверждать, что все аспекты поведения и взаимодействия полностью отражены. Некоторые элементы могут быть опущены или недостаточно детализированы в текущих источниках информации. Рекомендуется дополнительно изучить полный контекст исходного кода и документацию к проекту для более полного понимания.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_115642/full_chain_plba_code_subintents_plba-fullchain-find-entrypoints.json b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_115642/full_chain_plba_code_subintents_plba-fullchain-find-entrypoints.json new file mode 100644 index 0000000..3632803 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_115642/full_chain_plba_code_subintents_plba-fullchain-find-entrypoints.json @@ -0,0 +1,1196 @@ +{ + "case_id": "plba-fullchain-find-entrypoints", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 9, + "llm_answer": "Финальный ответ:\n\nВ предоставленном контексте обнаружены следующие точки входа и обработчики запуска (entrypoints):\n\n1. **src/app_runtime/control/http_app.py | app.post**\n - Файл: `http_app.py`\n - Сущность: `app.post`\n - Описание: Обработчик HTTP POST-запросов для FastAPI приложения.\n\n2. **src/app_runtime/control/http_app.py | app.get**\n - Файл: `http_app.py`\n - Сущность: `app.get`\n - Описание: Обработчик HTTP GET-запросов для FastAPI приложения.\n\nНаиболее вероятные пропущенные или скрытые точки входа включают файлы и сущности, связанные с начальной настройкой и конфигурацией приложения:\n\n- src/app_runtime/config/__init__.py\n - Файл: `config/__init__.py`\n - Возможная сущность: `ConfigFileLoader`, `FileConfigProvider`\n - Роль: Загрузка конфигурации из файла и предоставление настроек приложению.\n\nЭти дополнительные точки входа важны для инициализации и настройки окружения перед запуском основного функционала приложения через HTTP-обработчики.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [], + "layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-fullchain-find-entrypoints", + "text": "Найди точки входа в коде", + "mode": "full_chain", + "run_started_at": "2026-03-12T11:56:42", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Найди точки входа в коде", + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [], + "confidence": 0.0 + }, + "rag_count": 9, + "rag_rows": [ + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/contracts/result.py", + "content": "class StepResult:\n transition: str = \"success\"\n updates: dict[str, Any] = field(default_factory=dict)\n status: str = \"completed\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/workflow/contracts/result.py:StepResult", + "span_start": 8, + "span_end": 11, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.workflow.contracts.result", + "is_test": false, + "blob_sha": "6e57dbfe22873f097f11228a26cffa415440a43b68a737b220906461cd86c353", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/__init__.py", + "content": "from app_runtime.config.file_loader import ConfigFileLoader\nfrom app_runtime.config.providers import FileConfigProvider\n\n__all__ = [\"ConfigFileLoader\", \"FileConfigProvider\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/config/__init__.py:1-4", + "span_start": 1, + "span_end": 4, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.config.__init__", + "is_test": false, + "blob_sha": "612918029820a2a983330ec92256142b55b9de4bdf3399ece18e2a02dbad9729", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/__init__.py", + "content": "__all__: list[str] = []", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/__init__.py:1-1", + "span_start": 1, + "span_end": 1, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.__init__", + "is_test": false, + "blob_sha": "8eea9df4f6d7b38ca0e39ccc27b04700e3d08dbeec8046d613d22706d19985fa", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "class ConfigFileLoader:\n def __init__(self, path: str | Path) -> None:\n self.path = Path(path)\n self.config: Any = None\n self.last_valid_config: Any = None\n self._last_seen_hash: str | None = None\n\n def read_text(self) -> str:\n return self.path.read_text(encoding=\"utf-8\")\n\n def parse(self, data: str) -> Any:\n suffix = self.path.suffix.lower()\n if suffix in {\".yml\", \".yaml\"}:\n return yaml.safe_load(data)\n return json.loads(data)\n\n def load_sync(self) -> Any:\n data = self.read_text()\n parsed = self.parse(data)\n self.config = parsed\n self.last_valid_config = parsed\n self._last_seen_hash = self._calculate_hash(data)\n return parsed\n\n def load_if_changed(self) -> tuple[bool, Any]:\n data = self.read_text()\n current_hash = self._calculate_hash(data)\n if current_hash == self._last_seen_hash:\n return False, self.config\n parsed = self.parse(data)\n self.config = parsed\n self.last_valid_config = parsed\n self._last_seen_hash = current_hash\n return True, parsed\n\n @staticmethod\n def _calculate_hash(data: str) -> str:\n return hashlib.sha256(data.encode(\"utf-8\")).hexdigest()", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/config/file_loader.py:ConfigFileLoader", + "span_start": 11, + "span_end": 48, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/providers.py", + "content": "class FileConfigProvider(ConfigProvider):\n def __init__(self, path: str | Path) -> None:\n self._loader = ConfigFileLoader(path)\n\n @property\n def loader(self) -> ConfigFileLoader:\n return self._loader\n\n def load(self) -> dict[str, Any]:\n config = self._loader.load_sync()\n if not isinstance(config, dict):\n raise TypeError(\"Config root must be a mapping\")\n return dict(config)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/config/providers.py:FileConfigProvider", + "span_start": 10, + "span_end": 22, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.config.providers", + "is_test": false, + "blob_sha": "8c53ca0122d6df6c5763bca15e99434bb4daebd5a618b8fc927e9ae90b022e64", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlActionSet:\n health: HealthHandler\n start: ActionHandler\n stop: ActionHandler\n status: ActionHandler", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "Финальный ответ:\n\nВ предоставленном контексте обнаружены следующие точки входа и обработчики запуска (entrypoints):\n\n1. **src/app_runtime/control/http_app.py | app.post**\n - Файл: `http_app.py`\n - Сущность: `app.post`\n - Описание: Обработчик HTTP POST-запросов для FastAPI приложения.\n\n2. **src/app_runtime/control/http_app.py | app.get**\n - Файл: `http_app.py`\n - Сущность: `app.get`\n - Описание: Обработчик HTTP GET-запросов для FastAPI приложения.\n\nНаиболее вероятные пропущенные или скрытые точки входа включают файлы и сущности, связанные с начальной настройкой и конфигурацией приложения:\n\n- src/app_runtime/config/__init__.py\n - Файл: `config/__init__.py`\n - Возможная сущность: `ConfigFileLoader`, `FileConfigProvider`\n - Роль: Загрузка конфигурации из файла и предоставление настроек приложению.\n\nЭти дополнительные точки входа важны для инициализации и настройки окружения перед запуском основного функционала приложения через HTTP-обработчики.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C3_ENTRYPOINTS" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "unknown", + "symbol_candidates": [], + "keyword_hints": [], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C3_ENTRYPOINTS": "exact_path_fetch", + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C3_ENTRYPOINTS": 12, + "C0_SOURCE_CHUNKS": 6 + }, + "filters_by_layer": { + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C3_ENTRYPOINTS", + "query": "Найди точки входа в коде", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 12, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Найди точки входа в коде", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [] + }, + "layers": [ + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 6, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 48, + "retrieval_by_layer": { + "C3_ENTRYPOINTS": 27, + "C0_SOURCE_CHUNKS": 20 + }, + "merge_rank": 0, + "prompt_build": 0, + "llm_call": 1820 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 458, + "evidence_rows": 9, + "evidence_chars": 2228 + }, + "evidence_summary": [ + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 6, + "unique_paths": 6 + } + ], + "prompt_template_id": "intent_code_qa_find_entrypoints_ru_v1", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 9, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-fullchain-find-entrypoints", + "mode": "full_chain", + "run_started_at": "2026-03-12T11:56:42", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Найди точки входа в коде", + "normalized_query": "Найди точки входа в коде" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Найди точки входа в коде" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Найди точки входа в коде" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "unknown", + "symbol_candidates": [], + "keyword_hints": [], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Найди точки входа в коде" + }, + "output": { + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [], + "confidence": 0.0 + }, + "rag_count": 9, + "rag_rows": [ + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/contracts/result.py", + "content": "class StepResult:\n transition: str = \"success\"\n updates: dict[str, Any] = field(default_factory=dict)\n status: str = \"completed\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/workflow/contracts/result.py:StepResult", + "span_start": 8, + "span_end": 11, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.workflow.contracts.result", + "is_test": false, + "blob_sha": "6e57dbfe22873f097f11228a26cffa415440a43b68a737b220906461cd86c353", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/__init__.py", + "content": "from app_runtime.config.file_loader import ConfigFileLoader\nfrom app_runtime.config.providers import FileConfigProvider\n\n__all__ = [\"ConfigFileLoader\", \"FileConfigProvider\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/config/__init__.py:1-4", + "span_start": 1, + "span_end": 4, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.config.__init__", + "is_test": false, + "blob_sha": "612918029820a2a983330ec92256142b55b9de4bdf3399ece18e2a02dbad9729", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/__init__.py", + "content": "__all__: list[str] = []", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/__init__.py:1-1", + "span_start": 1, + "span_end": 1, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.__init__", + "is_test": false, + "blob_sha": "8eea9df4f6d7b38ca0e39ccc27b04700e3d08dbeec8046d613d22706d19985fa", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "class ConfigFileLoader:\n def __init__(self, path: str | Path) -> None:\n self.path = Path(path)\n self.config: Any = None\n self.last_valid_config: Any = None\n self._last_seen_hash: str | None = None\n\n def read_text(self) -> str:\n return self.path.read_text(encoding=\"utf-8\")\n\n def parse(self, data: str) -> Any:\n suffix = self.path.suffix.lower()\n if suffix in {\".yml\", \".yaml\"}:\n return yaml.safe_load(data)\n return json.loads(data)\n\n def load_sync(self) -> Any:\n data = self.read_text()\n parsed = self.parse(data)\n self.config = parsed\n self.last_valid_config = parsed\n self._last_seen_hash = self._calculate_hash(data)\n return parsed\n\n def load_if_changed(self) -> tuple[bool, Any]:\n data = self.read_text()\n current_hash = self._calculate_hash(data)\n if current_hash == self._last_seen_hash:\n return False, self.config\n parsed = self.parse(data)\n self.config = parsed\n self.last_valid_config = parsed\n self._last_seen_hash = current_hash\n return True, parsed\n\n @staticmethod\n def _calculate_hash(data: str) -> str:\n return hashlib.sha256(data.encode(\"utf-8\")).hexdigest()", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/config/file_loader.py:ConfigFileLoader", + "span_start": 11, + "span_end": 48, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/providers.py", + "content": "class FileConfigProvider(ConfigProvider):\n def __init__(self, path: str | Path) -> None:\n self._loader = ConfigFileLoader(path)\n\n @property\n def loader(self) -> ConfigFileLoader:\n return self._loader\n\n def load(self) -> dict[str, Any]:\n config = self._loader.load_sync()\n if not isinstance(config, dict):\n raise TypeError(\"Config root must be a mapping\")\n return dict(config)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/config/providers.py:FileConfigProvider", + "span_start": 10, + "span_end": 22, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.config.providers", + "is_test": false, + "blob_sha": "8c53ca0122d6df6c5763bca15e99434bb4daebd5a618b8fc927e9ae90b022e64", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlActionSet:\n health: HealthHandler\n start: ActionHandler\n stop: ActionHandler\n status: ActionHandler", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C3_ENTRYPOINTS": "exact_path_fetch", + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C3_ENTRYPOINTS": 12, + "C0_SOURCE_CHUNKS": 6 + }, + "filters_by_layer": { + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C3_ENTRYPOINTS", + "query": "Найди точки входа в коде", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 12, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Найди точки входа в коде", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [] + }, + "layers": [ + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 6, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 48, + "retrieval_by_layer": { + "C3_ENTRYPOINTS": 27, + "C0_SOURCE_CHUNKS": 20 + }, + "merge_rank": 0 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Найди точки входа в коде", + "rag_count": 9 + }, + "output": { + "llm_answer": "Финальный ответ:\n\nВ предоставленном контексте обнаружены следующие точки входа и обработчики запуска (entrypoints):\n\n1. **src/app_runtime/control/http_app.py | app.post**\n - Файл: `http_app.py`\n - Сущность: `app.post`\n - Описание: Обработчик HTTP POST-запросов для FastAPI приложения.\n\n2. **src/app_runtime/control/http_app.py | app.get**\n - Файл: `http_app.py`\n - Сущность: `app.get`\n - Описание: Обработчик HTTP GET-запросов для FastAPI приложения.\n\nНаиболее вероятные пропущенные или скрытые точки входа включают файлы и сущности, связанные с начальной настройкой и конфигурацией приложения:\n\n- src/app_runtime/config/__init__.py\n - Файл: `config/__init__.py`\n - Возможная сущность: `ConfigFileLoader`, `FileConfigProvider`\n - Роль: Загрузка конфигурации из файла и предоставление настроек приложению.\n\nЭти дополнительные точки входа важны для инициализации и настройки окружения перед запуском основного функционала приложения через HTTP-обработчики." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 458, + "evidence_rows": 9, + "evidence_chars": 2228 + }, + "evidence_summary": [ + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 6, + "unique_paths": 6 + } + ], + "prompt_template_id": "intent_code_qa_find_entrypoints_ru_v1", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 1820 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_115642/full_chain_plba_code_subintents_plba-fullchain-find-entrypoints.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_115642/full_chain_plba_code_subintents_plba-fullchain-find-entrypoints.md new file mode 100644 index 0000000..ae4d13d --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_115642/full_chain_plba_code_subintents_plba-fullchain-find-entrypoints.md @@ -0,0 +1,29 @@ +# plba-fullchain-find-entrypoints + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Найди точки входа в коде + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 9, + "llm_answer": "Финальный ответ:\n\nВ предоставленном контексте обнаружены следующие точки входа и обработчики запуска (entrypoints):\n\n1. **src/app_runtime/control/http_app.py | app.post**\n - Файл: `http_app.py`\n - Сущность: `app.post`\n - Описание: Обработчик HTTP POST-запросов для FastAPI приложения.\n\n2. **src/app_runtime/control/http_app.py | app.get**\n - Файл: `http_app.py`\n - Сущность: `app.get`\n - Описание: Обработчик HTTP GET-запросов для FastAPI приложения.\n\nНаиболее вероятные пропущенные или скрытые точки входа включают файлы и сущности, связанные с начальной настройкой и конфигурацией приложения:\n\n- src/app_runtime/config/__init__.py\n - Файл: `config/__init__.py`\n - Возможная сущность: `ConfigFileLoader`, `FileConfigProvider`\n - Роль: Загрузка конфигурации из файла и предоставление настроек приложению.\n\nЭти дополнительные точки входа важны для инициализации и настройки окружения перед запуском основного функционала приложения через HTTP-обработчики.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [], + "layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_115642/full_chain_plba_code_subintents_plba-fullchain-find-tests-runtime-manager.json b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_115642/full_chain_plba_code_subintents_plba-fullchain-find-tests-runtime-manager.json new file mode 100644 index 0000000..8f0da42 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_115642/full_chain_plba_code_subintents_plba-fullchain-find-tests-runtime-manager.json @@ -0,0 +1,1879 @@ +{ + "case_id": "plba-fullchain-find-tests-runtime-manager", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 16, + "llm_answer": "Прямые тесты для `RuntimeManager` найдены в следующих местах:\n\n1. **tests/test_runtime.py**:\n - `test_runtime_graceful_stop_waits_until_worker_finishes`: Проверяет корректное завершение работы менеджера при использовании команды остановки (`stop()`). Тестирует состояние процесса после завершения и правильность отображения статуса («busy» → «stopped»).\n - `test_runtime_runs_worker_routine_and_exposes_status`: Проверяет выполнение задачи и правильное отображение статуса работы модуля и самого менеджера (`idle`, успешная остановка).\n\nЭти тесты непосредственно работают с экземпляром `RuntimeManager`, создавая его, регистрируя модули и вызывая методы (например, `start()`, `stop()`), тем самым проверяя основные функциональные возможности объекта.\n\nИтоговый ответ:\nВ папке `tests` существует два теста, напрямую связанных с `RuntimeManager`. Они находятся в файле `test_runtime.py` и называются `test_runtime_graceful_stop_waits_until_worker_finishes` и `test_runtime_runs_worker_routine_and_exposes_status`. Эти тесты проверяют способность `RuntimeManager` правильно запускать задачи, отслеживать их статус и корректно завершаться по команде.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-fullchain-find-tests-runtime-manager", + "text": "Где тесты для RuntimeManager?", + "mode": "full_chain", + "run_started_at": "2026-03-12T11:56:42", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Где тесты для RuntimeManager?", + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "RuntimeManager" + ], + "confidence": 0.0 + }, + "rag_count": 16, + "rag_rows": [ + { + "path": "tests/test_runtime.py", + "content": "test_runtime_runs_worker_routine_and_exposes_status instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_runtime_runs_worker_routine_and_exposes_status:instantiates", + "span_start": 209, + "span_end": 209, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "c397a308e7824ba9fe400a754c7e15e66ea6f058d7f5d3e82bb002bb78b509d2", + "edge_type": "instantiates", + "src_symbol_id": "1c767eb5ee08e84f45b18c8ed7531ec0ed73c63fb1594823569672db7b21e992", + "src_qname": "test_runtime_runs_worker_routine_and_exposes_status", + "dst_symbol_id": "aeadc039653807b0da1ca6e3cc1078ee61cfc510b28e7f9c2ec04c59da43cc8d", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "test_runtime_graceful_stop_waits_until_worker_finishes instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_runtime_graceful_stop_waits_until_worker_finishes:instantiates", + "span_start": 229, + "span_end": 229, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "76b4701262ccaa0a7a41691407c4ebdb2ca74a2415d89f0a38ef0d4f608bda93", + "edge_type": "instantiates", + "src_symbol_id": "1076e788e4a03b10d7bc1313a8ad46caa170c13cc026c6e4de994af1a6ae57bf", + "src_qname": "test_runtime_graceful_stop_waits_until_worker_finishes", + "dst_symbol_id": "aeadc039653807b0da1ca6e3cc1078ee61cfc510b28e7f9c2ec04c59da43cc8d", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "_build_runtime instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "_build_runtime:instantiates", + "span_start": 155, + "span_end": 155, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "7eb254d564944bab6272757ee5ef688862bd321e6941e2495dc942e03b1c9a25", + "edge_type": "instantiates", + "src_symbol_id": "db94031d5245bf82be836a109b4584b43b8e83d37a0f318e03f6c8191896d469", + "src_qname": "_build_runtime", + "dst_symbol_id": "a1572ea8183dc0cd6ddbc74342bbde8c28cecfde37ad40b62feff09f8d103d11", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_worker_wakes_up_with_configured_interval instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_worker_wakes_up_with_configured_interval:instantiates", + "span_start": 167, + "span_end": 167, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "189aafc4de0b79c688668f25f0c87166a127df26bd2215452014713b65ef281a", + "edge_type": "instantiates", + "src_symbol_id": "65f877f78191d65e6a752e41cedc70ebc784c266804a55c1c56440336e1f0d6e", + "src_qname": "test_worker_wakes_up_with_configured_interval", + "dst_symbol_id": "a1572ea8183dc0cd6ddbc74342bbde8c28cecfde37ad40b62feff09f8d103d11", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_actions_stop_busy_worker_after_timeout\n -> BlockingRoutine\n -> BlockingRoutine.__init__\n -> BlockingRoutine._started\n -> BlockingRoutine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_actions_stop_busy_worker_after_timeout:dataflow_slice", + "span_start": 42, + "span_end": 238, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "8e7db3d2a9226f1c1d9942ac6373cfcafa0d2276758ddb8a3d3c455a3d58024d", + "edge_type": "dataflow_slice", + "src_symbol_id": "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "src_qname": "test_actions_stop_busy_worker_after_timeout", + "dst_symbol_id": "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04", + "dst_ref": "BlockingRoutine.run", + "resolution": "resolved", + "slice_id": "8e7db3d2a9226f1c1d9942ac6373cfcafa0d2276758ddb8a3d3c455a3d58024d", + "root_symbol_id": "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "path_symbols": [ + "test_actions_stop_busy_worker_after_timeout", + "BlockingRoutine", + "BlockingRoutine.__init__", + "BlockingRoutine._started", + "BlockingRoutine.run" + ], + "path_symbol_ids": [ + "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "a3349c5bc65e4003a4bbd6a8dbb7a54c337e12d1aed930caa701b12e520f1e67", + "486deeed3043c6db985aef258e96ddc67aa53608e67a83962fbd2471f649ddf1", + "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_actions_stop_busy_worker_before_timeout\n -> BlockingRoutine\n -> BlockingRoutine.__init__\n -> BlockingRoutine._release\n -> BlockingRoutine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_actions_stop_busy_worker_before_timeout:dataflow_slice", + "span_start": 43, + "span_end": 212, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "8bd726155ba387d3579763ee84dfd2f9a90bc917da88f3b2e89416ab5c1254d6", + "edge_type": "dataflow_slice", + "src_symbol_id": "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "src_qname": "test_actions_stop_busy_worker_before_timeout", + "dst_symbol_id": "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04", + "dst_ref": "BlockingRoutine.run", + "resolution": "resolved", + "slice_id": "8bd726155ba387d3579763ee84dfd2f9a90bc917da88f3b2e89416ab5c1254d6", + "root_symbol_id": "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "path_symbols": [ + "test_actions_stop_busy_worker_before_timeout", + "BlockingRoutine", + "BlockingRoutine.__init__", + "BlockingRoutine._release", + "BlockingRoutine.run" + ], + "path_symbol_ids": [ + "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "a3349c5bc65e4003a4bbd6a8dbb7a54c337e12d1aed930caa701b12e520f1e67", + "486deeed3043c6db985aef258e96ddc67aa53608e67a83962fbd2471f649ddf1", + "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "def test_runtime_graceful_stop_waits_until_worker_finishes() -> None:\n started = Event()\n release = Event()\n runtime = RuntimeManager()\n runtime.register_module(BlockingModule(started, release))\n runtime.start()\n assert started.wait(timeout=1.0) is True\n assert runtime.status()[\"runtime\"][\"state\"] == \"busy\"\n\n stop_thread = Thread(target=runtime.stop, kwargs={\"timeout\": 1.0}, daemon=True)\n stop_thread.start()\n sleep(0.1)\n assert stop_thread.is_alive() is True\n\n release.set()\n stop_thread.join(timeout=1.0)\n assert stop_thread.is_alive() is False\n assert runtime.status()[\"runtime\"][\"state\"] == \"stopped\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_runtime.py:test_runtime_graceful_stop_waits_until_worker_finishes", + "span_start": 226, + "span_end": 243, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 8, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "def test_runtime_runs_worker_routine_and_exposes_status(tmp_path) -> None:\n config_path = tmp_path / \"config.yml\"\n config_path.write_text(\n \"\"\"\nplatform:\n workers: 1\nlog:\n version: 1\n disable_existing_loggers: false\n handlers:\n console:\n class: logging.StreamHandler\n root:\n level: INFO\n handlers: [console]\n\"\"\".strip(),\n encoding=\"utf-8\",\n )\n runtime = RuntimeManager()\n runtime.add_config_file(config_path)\n module = ExampleModule()\n runtime.register_module(module)\n\n runtime.start()\n sleep(0.2)\n status = runtime.status()\n runtime.stop()\n\n assert module.routine.processed == [{\"id\": 1}]\n assert status[\"modules\"] == [\"example\"]\n assert status[\"runtime\"][\"state\"] == \"idle\"\n assert status[\"health\"][\"status\"] == \"ok\"\n assert status[\"config\"] == {\"platform\": {\"workers\": 1}, \"log\": status[\"config\"][\"log\"]}", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_runtime.py:test_runtime_runs_worker_routine_and_exposes_status", + "span_start": 191, + "span_end": 223, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 7, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _build_runtime(worker: Worker, *, control_timeout: int = 1) -> tuple[RuntimeManager, str]:\n runtime = RuntimeManager()\n channel = HttpControlChannel(host=\"127.0.0.1\", port=0, timeout=control_timeout)\n runtime.control_plane.register_channel(channel)\n runtime.register_module(WorkerModule(worker))\n runtime.start()\n return runtime, f\"http://127.0.0.1:{channel.port}\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_build_runtime", + "span_start": 154, + "span_end": 160, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 6, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def test_worker_wakes_up_with_configured_interval() -> None:\n interval = 0.15\n routine = IntervalRoutine()\n worker = ScenarioWorker(\"interval-worker\", routine, interval=interval)\n runtime = RuntimeManager()\n runtime.register_module(WorkerModule(worker))\n\n runtime.start()\n try:\n assert routine.wait_runs(count=3, timeout=2.0) is True\n finally:\n runtime.stop()\n\n deltas = routine.deltas()\n assert len(deltas) >= 2\n assert all(delta >= interval * 0.7 for delta in deltas[:2])", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:test_worker_wakes_up_with_configured_interval", + "span_start": 163, + "span_end": 178, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 7, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class BlockingRoutine:\n def __init__(self, started: Event, release: Event) -> None:\n self._started = started\n self._release = release\n\n def run(self) -> None:\n self._started.set()\n self._release.wait(timeout=5.0)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:BlockingRoutine", + "span_start": 40, + "span_end": 47, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class ScenarioWorker(Worker):\n def __init__(self, name: str, routine: object, *, interval: float = 0.05) -> None:\n self._name = name\n self._routine = routine\n self._interval = interval\n self._thread: Thread | None = None\n self._stop_requested = Event()\n self._in_flight = 0\n self._runs = 0\n self._lock = Lock()\n\n @property\n def name(self) -> str:\n return self._name\n\n @property\n def critical(self) -> bool:\n return True\n\n def start(self) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._stop_requested.clear()\n self._thread = Thread(target=self._loop, name=f\"{self._name}-thread\", daemon=True)\n self._thread.start()\n\n def stop(self, force: bool = False) -> None:\n self._stop_requested.set()\n\n def health(self) -> WorkerHealth:\n return WorkerHealth(name=self.name, status=\"ok\", critical=True, meta={\"runs\": self._runs})\n\n def status(self) -> WorkerStatus:\n thread_alive = self._thread is not None and self._thread.is_alive()\n with self._lock:\n in_flight = self._in_flight\n runs = self._runs\n if not thread_alive:\n state = \"stopped\"\n elif self._stop_requested.is_set():\n state = \"stopping\"\n elif in_flight > 0:\n state = \"busy\"\n else:\n state = \"idle\"\n return WorkerStatus(name=self.name, state=state, in_flight=in_flight, meta={\"runs\": runs})\n\n def _loop(self) -> None:\n while not self._stop_requested.is_set():\n with self._lock:\n self._in_flight += 1\n try:\n self._routine.run()\n with self._lock:\n self._runs += 1\n finally:\n with self._lock:\n self._in_flight -= 1\n if self._stop_requested.is_set():\n return\n sleep(self._interval)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:ScenarioWorker", + "span_start": 50, + "span_end": 110, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 2, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class WorkerModule(ApplicationModule):\n def __init__(self, worker: Worker) -> None:\n self._worker = worker\n\n @property\n def name(self) -> str:\n return \"business-tests\"\n\n def register(self, registry: ModuleRegistry) -> None:\n registry.add_worker(self._worker)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:WorkerModule", + "span_start": 113, + "span_end": 122, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 3, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _http_call_json(\n base_url: str,\n path: str,\n *,\n method: str = \"GET\",\n headers: dict[str, str] | None = None,\n) -> tuple[int, dict[str, object]]:\n request = Request(f\"{base_url}{path}\", method=method, headers=headers or {})\n try:\n with urlopen(request, timeout=15.0) as response:\n status = response.status\n body = response.read()\n except HTTPError as error:\n status = error.code\n body = error.read()\n payload = json.loads(body.decode(\"utf-8\"))\n return status, payload", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_http_call_json", + "span_start": 125, + "span_end": 141, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 4, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class IntervalRoutine:\n calls: list[float] = field(default_factory=list)\n _lock: Lock = field(default_factory=Lock)\n\n def run(self) -> None:\n with self._lock:\n self.calls.append(monotonic())\n\n def wait_runs(self, count: int, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n with self._lock:\n if len(self.calls) >= count:\n return True\n sleep(0.01)\n return False\n\n def deltas(self) -> list[float]:\n with self._lock:\n return [self.calls[index + 1] - self.calls[index] for index in range(len(self.calls) - 1)]", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:IntervalRoutine", + "span_start": 18, + "span_end": 37, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _poll_until_stopped(base_url: str, timeout: float = 2.0) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n _, payload = _http_call_json(base_url, \"/actions/status\")\n if payload.get(\"detail\") == \"stopped\":\n return True\n sleep(0.05)\n return False", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_poll_until_stopped", + "span_start": 144, + "span_end": 151, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 5, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "Прямые тесты для `RuntimeManager` найдены в следующих местах:\n\n1. **tests/test_runtime.py**:\n - `test_runtime_graceful_stop_waits_until_worker_finishes`: Проверяет корректное завершение работы менеджера при использовании команды остановки (`stop()`). Тестирует состояние процесса после завершения и правильность отображения статуса («busy» → «stopped»).\n - `test_runtime_runs_worker_routine_and_exposes_status`: Проверяет выполнение задачи и правильное отображение статуса работы модуля и самого менеджера (`idle`, успешная остановка).\n\nЭти тесты непосредственно работают с экземпляром `RuntimeManager`, создавая его, регистрируя модули и вызывая методы (например, `start()`, `stop()`), тем самым проверяя основные функциональные возможности объекта.\n\nИтоговый ответ:\nВ папке `tests` существует два теста, напрямую связанных с `RuntimeManager`. Они находятся в файле `test_runtime.py` и называются `test_runtime_graceful_stop_waits_until_worker_finishes` и `test_runtime_runs_worker_routine_and_exposes_status`. Эти тесты проверяют способность `RuntimeManager` правильно запускать задачи, отслеживать их статус и корректно завершаться по команде.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C2_DEPENDENCY_GRAPH" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "test_file_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "test_symbol_patterns": [ + "test_runtime_manager", + "TestRuntimeManager", + "RuntimeManager" + ], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C0_SOURCE_CHUNKS": 10 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src", + "tests" + ], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src", + "tests" + ], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Где тесты для RuntimeManager? test_runtime_manager TestRuntimeManager RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Где тесты для RuntimeManager? test_runtime_manager TestRuntimeManager RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 10, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 0, + "candidates_after_filter": 0 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src", + "tests" + ], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src", + "tests" + ], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 10, + "candidates_after_filter": 10 + } + ], + "fallback": { + "used": true, + "reason": "scope_relaxed_no_hits" + }, + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "RuntimeManager" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "miss", + "hit_count": 0, + "fail_reason": "scope_relaxed_no_hits" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 10, + "fail_reason": null + } + ] + }, + "constraint_violations": [ + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C1_SYMBOL_CATALOG", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + } + ], + "timings_ms": { + "router": 1, + "symbol_resolution": 0, + "retrieval_total": 154, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 79, + "C2_DEPENDENCY_GRAPH": 54, + "C0_SOURCE_CHUNKS": 19 + }, + "merge_rank": 0, + "prompt_build": 0, + "llm_call": 1918 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 858, + "evidence_rows": 16, + "evidence_chars": 7086 + }, + "evidence_summary": [ + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 2 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 10, + "unique_paths": 2 + } + ], + "prompt_template_id": "intent_code_qa_find_tests_ru_v1", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "RuntimeManager" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 16, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-fullchain-find-tests-runtime-manager", + "mode": "full_chain", + "run_started_at": "2026-03-12T11:56:42", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Где тесты для RuntimeManager?", + "normalized_query": "Где тесты для RuntimeManager?" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Где тесты для RuntimeManager?" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Где тесты для RuntimeManager?" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "test_file_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "test_symbol_patterns": [ + "test_runtime_manager", + "TestRuntimeManager", + "RuntimeManager" + ], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 1 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Где тесты для RuntimeManager?" + }, + "output": { + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "RuntimeManager" + ], + "confidence": 0.0 + }, + "rag_count": 16, + "rag_rows": [ + { + "path": "tests/test_runtime.py", + "content": "test_runtime_runs_worker_routine_and_exposes_status instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_runtime_runs_worker_routine_and_exposes_status:instantiates", + "span_start": 209, + "span_end": 209, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "c397a308e7824ba9fe400a754c7e15e66ea6f058d7f5d3e82bb002bb78b509d2", + "edge_type": "instantiates", + "src_symbol_id": "1c767eb5ee08e84f45b18c8ed7531ec0ed73c63fb1594823569672db7b21e992", + "src_qname": "test_runtime_runs_worker_routine_and_exposes_status", + "dst_symbol_id": "aeadc039653807b0da1ca6e3cc1078ee61cfc510b28e7f9c2ec04c59da43cc8d", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "test_runtime_graceful_stop_waits_until_worker_finishes instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_runtime_graceful_stop_waits_until_worker_finishes:instantiates", + "span_start": 229, + "span_end": 229, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "76b4701262ccaa0a7a41691407c4ebdb2ca74a2415d89f0a38ef0d4f608bda93", + "edge_type": "instantiates", + "src_symbol_id": "1076e788e4a03b10d7bc1313a8ad46caa170c13cc026c6e4de994af1a6ae57bf", + "src_qname": "test_runtime_graceful_stop_waits_until_worker_finishes", + "dst_symbol_id": "aeadc039653807b0da1ca6e3cc1078ee61cfc510b28e7f9c2ec04c59da43cc8d", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "_build_runtime instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "_build_runtime:instantiates", + "span_start": 155, + "span_end": 155, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "7eb254d564944bab6272757ee5ef688862bd321e6941e2495dc942e03b1c9a25", + "edge_type": "instantiates", + "src_symbol_id": "db94031d5245bf82be836a109b4584b43b8e83d37a0f318e03f6c8191896d469", + "src_qname": "_build_runtime", + "dst_symbol_id": "a1572ea8183dc0cd6ddbc74342bbde8c28cecfde37ad40b62feff09f8d103d11", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_worker_wakes_up_with_configured_interval instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_worker_wakes_up_with_configured_interval:instantiates", + "span_start": 167, + "span_end": 167, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "189aafc4de0b79c688668f25f0c87166a127df26bd2215452014713b65ef281a", + "edge_type": "instantiates", + "src_symbol_id": "65f877f78191d65e6a752e41cedc70ebc784c266804a55c1c56440336e1f0d6e", + "src_qname": "test_worker_wakes_up_with_configured_interval", + "dst_symbol_id": "a1572ea8183dc0cd6ddbc74342bbde8c28cecfde37ad40b62feff09f8d103d11", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_actions_stop_busy_worker_after_timeout\n -> BlockingRoutine\n -> BlockingRoutine.__init__\n -> BlockingRoutine._started\n -> BlockingRoutine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_actions_stop_busy_worker_after_timeout:dataflow_slice", + "span_start": 42, + "span_end": 238, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "8e7db3d2a9226f1c1d9942ac6373cfcafa0d2276758ddb8a3d3c455a3d58024d", + "edge_type": "dataflow_slice", + "src_symbol_id": "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "src_qname": "test_actions_stop_busy_worker_after_timeout", + "dst_symbol_id": "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04", + "dst_ref": "BlockingRoutine.run", + "resolution": "resolved", + "slice_id": "8e7db3d2a9226f1c1d9942ac6373cfcafa0d2276758ddb8a3d3c455a3d58024d", + "root_symbol_id": "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "path_symbols": [ + "test_actions_stop_busy_worker_after_timeout", + "BlockingRoutine", + "BlockingRoutine.__init__", + "BlockingRoutine._started", + "BlockingRoutine.run" + ], + "path_symbol_ids": [ + "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "a3349c5bc65e4003a4bbd6a8dbb7a54c337e12d1aed930caa701b12e520f1e67", + "486deeed3043c6db985aef258e96ddc67aa53608e67a83962fbd2471f649ddf1", + "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_actions_stop_busy_worker_before_timeout\n -> BlockingRoutine\n -> BlockingRoutine.__init__\n -> BlockingRoutine._release\n -> BlockingRoutine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_actions_stop_busy_worker_before_timeout:dataflow_slice", + "span_start": 43, + "span_end": 212, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "8bd726155ba387d3579763ee84dfd2f9a90bc917da88f3b2e89416ab5c1254d6", + "edge_type": "dataflow_slice", + "src_symbol_id": "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "src_qname": "test_actions_stop_busy_worker_before_timeout", + "dst_symbol_id": "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04", + "dst_ref": "BlockingRoutine.run", + "resolution": "resolved", + "slice_id": "8bd726155ba387d3579763ee84dfd2f9a90bc917da88f3b2e89416ab5c1254d6", + "root_symbol_id": "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "path_symbols": [ + "test_actions_stop_busy_worker_before_timeout", + "BlockingRoutine", + "BlockingRoutine.__init__", + "BlockingRoutine._release", + "BlockingRoutine.run" + ], + "path_symbol_ids": [ + "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "a3349c5bc65e4003a4bbd6a8dbb7a54c337e12d1aed930caa701b12e520f1e67", + "486deeed3043c6db985aef258e96ddc67aa53608e67a83962fbd2471f649ddf1", + "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "def test_runtime_graceful_stop_waits_until_worker_finishes() -> None:\n started = Event()\n release = Event()\n runtime = RuntimeManager()\n runtime.register_module(BlockingModule(started, release))\n runtime.start()\n assert started.wait(timeout=1.0) is True\n assert runtime.status()[\"runtime\"][\"state\"] == \"busy\"\n\n stop_thread = Thread(target=runtime.stop, kwargs={\"timeout\": 1.0}, daemon=True)\n stop_thread.start()\n sleep(0.1)\n assert stop_thread.is_alive() is True\n\n release.set()\n stop_thread.join(timeout=1.0)\n assert stop_thread.is_alive() is False\n assert runtime.status()[\"runtime\"][\"state\"] == \"stopped\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_runtime.py:test_runtime_graceful_stop_waits_until_worker_finishes", + "span_start": 226, + "span_end": 243, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 8, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "def test_runtime_runs_worker_routine_and_exposes_status(tmp_path) -> None:\n config_path = tmp_path / \"config.yml\"\n config_path.write_text(\n \"\"\"\nplatform:\n workers: 1\nlog:\n version: 1\n disable_existing_loggers: false\n handlers:\n console:\n class: logging.StreamHandler\n root:\n level: INFO\n handlers: [console]\n\"\"\".strip(),\n encoding=\"utf-8\",\n )\n runtime = RuntimeManager()\n runtime.add_config_file(config_path)\n module = ExampleModule()\n runtime.register_module(module)\n\n runtime.start()\n sleep(0.2)\n status = runtime.status()\n runtime.stop()\n\n assert module.routine.processed == [{\"id\": 1}]\n assert status[\"modules\"] == [\"example\"]\n assert status[\"runtime\"][\"state\"] == \"idle\"\n assert status[\"health\"][\"status\"] == \"ok\"\n assert status[\"config\"] == {\"platform\": {\"workers\": 1}, \"log\": status[\"config\"][\"log\"]}", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_runtime.py:test_runtime_runs_worker_routine_and_exposes_status", + "span_start": 191, + "span_end": 223, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 7, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _build_runtime(worker: Worker, *, control_timeout: int = 1) -> tuple[RuntimeManager, str]:\n runtime = RuntimeManager()\n channel = HttpControlChannel(host=\"127.0.0.1\", port=0, timeout=control_timeout)\n runtime.control_plane.register_channel(channel)\n runtime.register_module(WorkerModule(worker))\n runtime.start()\n return runtime, f\"http://127.0.0.1:{channel.port}\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_build_runtime", + "span_start": 154, + "span_end": 160, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 6, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def test_worker_wakes_up_with_configured_interval() -> None:\n interval = 0.15\n routine = IntervalRoutine()\n worker = ScenarioWorker(\"interval-worker\", routine, interval=interval)\n runtime = RuntimeManager()\n runtime.register_module(WorkerModule(worker))\n\n runtime.start()\n try:\n assert routine.wait_runs(count=3, timeout=2.0) is True\n finally:\n runtime.stop()\n\n deltas = routine.deltas()\n assert len(deltas) >= 2\n assert all(delta >= interval * 0.7 for delta in deltas[:2])", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:test_worker_wakes_up_with_configured_interval", + "span_start": 163, + "span_end": 178, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 7, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class BlockingRoutine:\n def __init__(self, started: Event, release: Event) -> None:\n self._started = started\n self._release = release\n\n def run(self) -> None:\n self._started.set()\n self._release.wait(timeout=5.0)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:BlockingRoutine", + "span_start": 40, + "span_end": 47, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class ScenarioWorker(Worker):\n def __init__(self, name: str, routine: object, *, interval: float = 0.05) -> None:\n self._name = name\n self._routine = routine\n self._interval = interval\n self._thread: Thread | None = None\n self._stop_requested = Event()\n self._in_flight = 0\n self._runs = 0\n self._lock = Lock()\n\n @property\n def name(self) -> str:\n return self._name\n\n @property\n def critical(self) -> bool:\n return True\n\n def start(self) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._stop_requested.clear()\n self._thread = Thread(target=self._loop, name=f\"{self._name}-thread\", daemon=True)\n self._thread.start()\n\n def stop(self, force: bool = False) -> None:\n self._stop_requested.set()\n\n def health(self) -> WorkerHealth:\n return WorkerHealth(name=self.name, status=\"ok\", critical=True, meta={\"runs\": self._runs})\n\n def status(self) -> WorkerStatus:\n thread_alive = self._thread is not None and self._thread.is_alive()\n with self._lock:\n in_flight = self._in_flight\n runs = self._runs\n if not thread_alive:\n state = \"stopped\"\n elif self._stop_requested.is_set():\n state = \"stopping\"\n elif in_flight > 0:\n state = \"busy\"\n else:\n state = \"idle\"\n return WorkerStatus(name=self.name, state=state, in_flight=in_flight, meta={\"runs\": runs})\n\n def _loop(self) -> None:\n while not self._stop_requested.is_set():\n with self._lock:\n self._in_flight += 1\n try:\n self._routine.run()\n with self._lock:\n self._runs += 1\n finally:\n with self._lock:\n self._in_flight -= 1\n if self._stop_requested.is_set():\n return\n sleep(self._interval)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:ScenarioWorker", + "span_start": 50, + "span_end": 110, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 2, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class WorkerModule(ApplicationModule):\n def __init__(self, worker: Worker) -> None:\n self._worker = worker\n\n @property\n def name(self) -> str:\n return \"business-tests\"\n\n def register(self, registry: ModuleRegistry) -> None:\n registry.add_worker(self._worker)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:WorkerModule", + "span_start": 113, + "span_end": 122, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 3, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _http_call_json(\n base_url: str,\n path: str,\n *,\n method: str = \"GET\",\n headers: dict[str, str] | None = None,\n) -> tuple[int, dict[str, object]]:\n request = Request(f\"{base_url}{path}\", method=method, headers=headers or {})\n try:\n with urlopen(request, timeout=15.0) as response:\n status = response.status\n body = response.read()\n except HTTPError as error:\n status = error.code\n body = error.read()\n payload = json.loads(body.decode(\"utf-8\"))\n return status, payload", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_http_call_json", + "span_start": 125, + "span_end": 141, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 4, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class IntervalRoutine:\n calls: list[float] = field(default_factory=list)\n _lock: Lock = field(default_factory=Lock)\n\n def run(self) -> None:\n with self._lock:\n self.calls.append(monotonic())\n\n def wait_runs(self, count: int, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n with self._lock:\n if len(self.calls) >= count:\n return True\n sleep(0.01)\n return False\n\n def deltas(self) -> list[float]:\n with self._lock:\n return [self.calls[index + 1] - self.calls[index] for index in range(len(self.calls) - 1)]", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:IntervalRoutine", + "span_start": 18, + "span_end": 37, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _poll_until_stopped(base_url: str, timeout: float = 2.0) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n _, payload = _http_call_json(base_url, \"/actions/status\")\n if payload.get(\"detail\") == \"stopped\":\n return True\n sleep(0.05)\n return False", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_poll_until_stopped", + "span_start": 144, + "span_end": 151, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 5, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C0_SOURCE_CHUNKS": 10 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src", + "tests" + ], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src", + "tests" + ], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Где тесты для RuntimeManager? test_runtime_manager TestRuntimeManager RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Где тесты для RuntimeManager? test_runtime_manager TestRuntimeManager RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 10, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 0, + "candidates_after_filter": 0 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src", + "tests" + ], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src", + "tests" + ], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 10, + "candidates_after_filter": 10 + } + ], + "fallback": { + "used": true, + "reason": "scope_relaxed_no_hits" + }, + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "RuntimeManager" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "miss", + "hit_count": 0, + "fail_reason": "scope_relaxed_no_hits" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 10, + "fail_reason": null + } + ] + }, + "constraint_violations": [ + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C1_SYMBOL_CATALOG", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + } + ], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 154, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 79, + "C2_DEPENDENCY_GRAPH": 54, + "C0_SOURCE_CHUNKS": 19 + }, + "merge_rank": 0 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Где тесты для RuntimeManager?", + "rag_count": 16 + }, + "output": { + "llm_answer": "Прямые тесты для `RuntimeManager` найдены в следующих местах:\n\n1. **tests/test_runtime.py**:\n - `test_runtime_graceful_stop_waits_until_worker_finishes`: Проверяет корректное завершение работы менеджера при использовании команды остановки (`stop()`). Тестирует состояние процесса после завершения и правильность отображения статуса («busy» → «stopped»).\n - `test_runtime_runs_worker_routine_and_exposes_status`: Проверяет выполнение задачи и правильное отображение статуса работы модуля и самого менеджера (`idle`, успешная остановка).\n\nЭти тесты непосредственно работают с экземпляром `RuntimeManager`, создавая его, регистрируя модули и вызывая методы (например, `start()`, `stop()`), тем самым проверяя основные функциональные возможности объекта.\n\nИтоговый ответ:\nВ папке `tests` существует два теста, напрямую связанных с `RuntimeManager`. Они находятся в файле `test_runtime.py` и называются `test_runtime_graceful_stop_waits_until_worker_finishes` и `test_runtime_runs_worker_routine_and_exposes_status`. Эти тесты проверяют способность `RuntimeManager` правильно запускать задачи, отслеживать их статус и корректно завершаться по команде." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 858, + "evidence_rows": 16, + "evidence_chars": 7086 + }, + "evidence_summary": [ + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 2 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 10, + "unique_paths": 2 + } + ], + "prompt_template_id": "intent_code_qa_find_tests_ru_v1", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 1918 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_115642/full_chain_plba_code_subintents_plba-fullchain-find-tests-runtime-manager.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_115642/full_chain_plba_code_subintents_plba-fullchain-find-tests-runtime-manager.md new file mode 100644 index 0000000..0775cad --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_115642/full_chain_plba_code_subintents_plba-fullchain-find-tests-runtime-manager.md @@ -0,0 +1,32 @@ +# plba-fullchain-find-tests-runtime-manager + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Где тесты для RuntimeManager? + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 16, + "llm_answer": "Прямые тесты для `RuntimeManager` найдены в следующих местах:\n\n1. **tests/test_runtime.py**:\n - `test_runtime_graceful_stop_waits_until_worker_finishes`: Проверяет корректное завершение работы менеджера при использовании команды остановки (`stop()`). Тестирует состояние процесса после завершения и правильность отображения статуса («busy» → «stopped»).\n - `test_runtime_runs_worker_routine_and_exposes_status`: Проверяет выполнение задачи и правильное отображение статуса работы модуля и самого менеджера (`idle`, успешная остановка).\n\nЭти тесты непосредственно работают с экземпляром `RuntimeManager`, создавая его, регистрируя модули и вызывая методы (например, `start()`, `stop()`), тем самым проверяя основные функциональные возможности объекта.\n\nИтоговый ответ:\nВ папке `tests` существует два теста, напрямую связанных с `RuntimeManager`. Они находятся в файле `test_runtime.py` и называются `test_runtime_graceful_stop_waits_until_worker_finishes` и `test_runtime_runs_worker_routine_and_exposes_status`. Эти тесты проверяют способность `RuntimeManager` правильно запускать задачи, отслеживать их статус и корректно завершаться по команде.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_115642/full_chain_plba_code_subintents_plba-fullchain-open-file-runtime.json b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_115642/full_chain_plba_code_subintents_plba-fullchain-open-file-runtime.json new file mode 100644 index 0000000..c2cf442 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_115642/full_chain_plba_code_subintents_plba-fullchain-open-file-runtime.json @@ -0,0 +1,492 @@ +{ + "case_id": "plba-fullchain-open-file-runtime", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 1, + "llm_answer": "Файл `src/app_runtime/core/runtime.py` содержит определение класса `RuntimeManager`, управляющего выполнением приложения в runtime режиме.\n\n## Важные сущности и их значение:\n- **Класс `RuntimeManager`:** Основной управляющий класс, инициализирующий компоненты системы (конфигурацию, сервисы, трассировку, здоровье, логирование, рабочие процессы и контрольную плоскость).\n- **Параметры конструктора:** \n - `configuration`, `services`, `traces`, `health`, `logs`, `workers`, `control_plane` — позволяют передавать внешние зависимости при создании экземпляра класса.\n- **Методы и поля:**\n - `_register_core_services()` — регистрирует основные сервисы приложения.\n - Поля `_started`, `_state`, `_core_registered`, `_workers_registered` отслеживают состояние инициализации и регистрации сервисов.\n \nЭтот файл является важным компонентом архитектуры приложения, отвечающим за настройку и запуск всех необходимых служб во время выполнения программы.", + "answer_mode": "answered", + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "symbol_candidates": [], + "layers": [ + "C0_SOURCE_CHUNKS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-fullchain-open-file-runtime", + "text": "Открой файл src/app_runtime/core/runtime.py", + "mode": "full_chain", + "run_started_at": "2026-03-12T11:56:42", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Открой файл src/app_runtime/core/runtime.py", + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [], + "confidence": 0.0 + }, + "rag_count": 1, + "rag_rows": [ + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "Файл `src/app_runtime/core/runtime.py` содержит определение класса `RuntimeManager`, управляющего выполнением приложения в runtime режиме.\n\n## Важные сущности и их значение:\n- **Класс `RuntimeManager`:** Основной управляющий класс, инициализирующий компоненты системы (конфигурацию, сервисы, трассировку, здоровье, логирование, рабочие процессы и контрольную плоскость).\n- **Параметры конструктора:** \n - `configuration`, `services`, `traces`, `health`, `logs`, `workers`, `control_plane` — позволяют передавать внешние зависимости при создании экземпляра класса.\n- **Методы и поля:**\n - `_register_core_services()` — регистрирует основные сервисы приложения.\n - Поля `_started`, `_state`, `_core_registered`, `_workers_registered` отслеживают состояние инициализации и регистрации сервисов.\n \nЭтот файл является важным компонентом архитектуры приложения, отвечающим за настройку и запуск всех необходимых служб во время выполнения программы.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "unknown", + "symbol_candidates": [], + "keyword_hints": [], + "path_hints": [ + "src/app_runtime/core/runtime.py" + ], + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/app_runtime/core/runtime.py" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": false, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C0_SOURCE_CHUNKS": 200 + }, + "filters_by_layer": { + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "include_globs": [], + "exclude_globs": [], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Открой файл src/app_runtime/core/runtime.py", + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "include_globs": [], + "exclude_globs": [], + "prefer_globs": [], + "top_k": 200, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "normalized_include_globs": [], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [] + }, + "layers": [ + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 1, + "symbol_resolution": 0, + "retrieval_total": 190, + "retrieval_by_layer": { + "C0_SOURCE_CHUNKS": 190 + }, + "merge_rank": 0, + "prompt_build": 0, + "llm_call": 1578 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 555, + "evidence_rows": 1, + "evidence_chars": 6265 + }, + "evidence_summary": [ + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_open_file_ru_v1", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [], + "path_scope": [ + "src/app_runtime/core/runtime.py" + ] + }, + "llm": { + "used_evidence_count": 1, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-fullchain-open-file-runtime", + "mode": "full_chain", + "run_started_at": "2026-03-12T11:56:42", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Открой файл src/app_runtime/core/runtime.py", + "normalized_query": "Открой файл src/app_runtime/core/runtime.py" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Открой файл src/app_runtime/core/runtime.py" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Открой файл src/app_runtime/core/runtime.py" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "unknown", + "symbol_candidates": [], + "keyword_hints": [], + "path_hints": [ + "src/app_runtime/core/runtime.py" + ], + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/app_runtime/core/runtime.py" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": false, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 1 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Открой файл src/app_runtime/core/runtime.py" + }, + "output": { + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [], + "confidence": 0.0 + }, + "rag_count": 1, + "rag_rows": [ + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C0_SOURCE_CHUNKS": 200 + }, + "filters_by_layer": { + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "include_globs": [], + "exclude_globs": [], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Открой файл src/app_runtime/core/runtime.py", + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "include_globs": [], + "exclude_globs": [], + "prefer_globs": [], + "top_k": 200, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "normalized_include_globs": [], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [] + }, + "layers": [ + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 190, + "retrieval_by_layer": { + "C0_SOURCE_CHUNKS": 190 + }, + "merge_rank": 0 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Открой файл src/app_runtime/core/runtime.py", + "rag_count": 1 + }, + "output": { + "llm_answer": "Файл `src/app_runtime/core/runtime.py` содержит определение класса `RuntimeManager`, управляющего выполнением приложения в runtime режиме.\n\n## Важные сущности и их значение:\n- **Класс `RuntimeManager`:** Основной управляющий класс, инициализирующий компоненты системы (конфигурацию, сервисы, трассировку, здоровье, логирование, рабочие процессы и контрольную плоскость).\n- **Параметры конструктора:** \n - `configuration`, `services`, `traces`, `health`, `logs`, `workers`, `control_plane` — позволяют передавать внешние зависимости при создании экземпляра класса.\n- **Методы и поля:**\n - `_register_core_services()` — регистрирует основные сервисы приложения.\n - Поля `_started`, `_state`, `_core_registered`, `_workers_registered` отслеживают состояние инициализации и регистрации сервисов.\n \nЭтот файл является важным компонентом архитектуры приложения, отвечающим за настройку и запуск всех необходимых служб во время выполнения программы." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 555, + "evidence_rows": 1, + "evidence_chars": 6265 + }, + "evidence_summary": [ + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_open_file_ru_v1", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 1578 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_115642/full_chain_plba_code_subintents_plba-fullchain-open-file-runtime.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_115642/full_chain_plba_code_subintents_plba-fullchain-open-file-runtime.md new file mode 100644 index 0000000..f2cf890 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_115642/full_chain_plba_code_subintents_plba-fullchain-open-file-runtime.md @@ -0,0 +1,30 @@ +# plba-fullchain-open-file-runtime + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Открой файл src/app_runtime/core/runtime.py + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 1, + "llm_answer": "Файл `src/app_runtime/core/runtime.py` содержит определение класса `RuntimeManager`, управляющего выполнением приложения в runtime режиме.\n\n## Важные сущности и их значение:\n- **Класс `RuntimeManager`:** Основной управляющий класс, инициализирующий компоненты системы (конфигурацию, сервисы, трассировку, здоровье, логирование, рабочие процессы и контрольную плоскость).\n- **Параметры конструктора:** \n - `configuration`, `services`, `traces`, `health`, `logs`, `workers`, `control_plane` — позволяют передавать внешние зависимости при создании экземпляра класса.\n- **Методы и поля:**\n - `_register_core_services()` — регистрирует основные сервисы приложения.\n - Поля `_started`, `_state`, `_core_registered`, `_workers_registered` отслеживают состояние инициализации и регистрации сервисов.\n \nЭтот файл является важным компонентом архитектуры приложения, отвечающим за настройку и запуск всех необходимых служб во время выполнения программы.", + "answer_mode": "answered", + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "symbol_candidates": [], + "layers": [ + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_115642/full_chain_plba_code_subintents_plba-fullchain-trace-flow-runtime-manager.json b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_115642/full_chain_plba_code_subintents_plba-fullchain-trace-flow-runtime-manager.json new file mode 100644 index 0000000..18ee246 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_115642/full_chain_plba_code_subintents_plba-fullchain-trace-flow-runtime-manager.json @@ -0,0 +1,2964 @@ +{ + "case_id": "plba-fullchain-trace-flow-runtime-manager", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "TRACE_FLOW", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 23, + "llm_answer": "## Шаги потока выполнения для `RuntimeManager`\n\n1. **Точка старта**: \n Поток начинается с вызова конструктора класса `RuntimeManager` при инициализации приложения или сервиса.\n\n2. **Передача параметров**:\n - При вызове конструктора передаются параметры конфигурации (`configuration`), сервисов (`services`), отслеживания трассировок (`traces`), состояния здоровья (`health`), ведения логов (`logs`), управления рабочими процессами (`workers`) и службы управления плоскостью контроля (`control_plane`).\n\n3. **Инициализация атрибутов объекта**:\n - Внутри метода `__init__` происходит присвоение значений параметрам, передаваемым конструктору, если они предоставлены. Если нет – создаются пустые экземпляры соответствующих классов (например, `ConfigurationManager`, `ServiceContainer`, `TraceService` и т.д.).\n \n4. **Регистрация модулей**:\n - После создания всех необходимых объектов производится регистрация модуля с помощью метода `_register_core_services`.\n\n5. **Использование экземпляров внутри методов класса**:\n - В дальнейшем экземпляр `RuntimeManager` может использоваться для выполнения различных операций через методы этого класса, например, добавление файлов конфигурации, регистрация служб, управление состоянием приложения и т.п.\n\n6. **Конечная точка потока**:\n - Поток завершается после того, как объект `RuntimeManager` выполнил все необходимые операции и достиг конечного состояния приложения или сервиса.\n\n## Недостатки информации\n\nНа данный момент отсутствует явная информация о том, как именно метод `register_module(module: ApplicationModule)` используется дальше в жизненном цикле объекта `RuntimeManager`. Это создаёт неопределённость относительно дальнейшего использования зарегистрированного модуля и того, каким образом он влияет на поведение объекта.\n\nТакже непонятно, какие события или действия инициируют дальнейшие процессы, управляемые объектом `RuntimeManager`, что могло бы предоставить более полное понимание его жизненного цикла и взаимодействия с другими компонентами системы.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-fullchain-trace-flow-runtime-manager", + "text": "Покажи поток выполнения RuntimeManager", + "mode": "full_chain", + "run_started_at": "2026-03-12T11:56:42", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Покажи поток выполнения RuntimeManager", + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ], + "confidence": 0.99 + }, + "rag_count": 23, + "rag_rows": [ + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager\nRuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "qname": "RuntimeManager", + "kind": "class", + "signature": "RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests manager\n- orchestrates role-like calls (4)\n- reads and writes state attributes\n- participates in dataflow slices (50)", + "layer": "C4_SEMANTIC_ROLES", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 43, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "symbol_name": "RuntimeManager", + "qname": "RuntimeManager", + "role": "pipeline_stage", + "confidence": 0.67, + "dataflow_participation": 50, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 52, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.services\n -> RuntimeManager.__init__", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 33, + "span_end": 39, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d43af85989222ee6d788ce418cdcb217c7ff044cfb915e3bdbd184417dc7bd61", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "dst_ref": "RuntimeManager.__init__", + "resolution": "resolved", + "slice_id": "d43af85989222ee6d788ce418cdcb217c7ff044cfb915e3bdbd184417dc7bd61", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.services", + "RuntimeManager.__init__" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 59, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1", + "dst_ref": "RuntimeManager.start", + "resolution": "resolved", + "slice_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.start" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager._register_core_services", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 127, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6", + "dst_ref": "RuntimeManager._register_core_services", + "resolution": "resolved", + "slice_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager._register_core_services" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.services\n -> RuntimeManager._register_core_services", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 33, + "span_end": 127, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "aac6f9dda73963b977083a892bee39a48eca4fbd7404787e022ecf4ebedec65d", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6", + "dst_ref": "RuntimeManager._register_core_services", + "resolution": "resolved", + "slice_id": "aac6f9dda73963b977083a892bee39a48eca4fbd7404787e022ecf4ebedec65d", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.services", + "RuntimeManager._register_core_services" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "## Шаги потока выполнения для `RuntimeManager`\n\n1. **Точка старта**: \n Поток начинается с вызова конструктора класса `RuntimeManager` при инициализации приложения или сервиса.\n\n2. **Передача параметров**:\n - При вызове конструктора передаются параметры конфигурации (`configuration`), сервисов (`services`), отслеживания трассировок (`traces`), состояния здоровья (`health`), ведения логов (`logs`), управления рабочими процессами (`workers`) и службы управления плоскостью контроля (`control_plane`).\n\n3. **Инициализация атрибутов объекта**:\n - Внутри метода `__init__` происходит присвоение значений параметрам, передаваемым конструктору, если они предоставлены. Если нет – создаются пустые экземпляры соответствующих классов (например, `ConfigurationManager`, `ServiceContainer`, `TraceService` и т.д.).\n \n4. **Регистрация модулей**:\n - После создания всех необходимых объектов производится регистрация модуля с помощью метода `_register_core_services`.\n\n5. **Использование экземпляров внутри методов класса**:\n - В дальнейшем экземпляр `RuntimeManager` может использоваться для выполнения различных операций через методы этого класса, например, добавление файлов конфигурации, регистрация служб, управление состоянием приложения и т.п.\n\n6. **Конечная точка потока**:\n - Поток завершается после того, как объект `RuntimeManager` выполнил все необходимые операции и достиг конечного состояния приложения или сервиса.\n\n## Недостатки информации\n\nНа данный момент отсутствует явная информация о том, как именно метод `register_module(module: ApplicationModule)` используется дальше в жизненном цикле объекта `RuntimeManager`. Это создаёт неопределённость относительно дальнейшего использования зарегистрированного модуля и того, каким образом он влияет на поведение объекта.\n\nТакже непонятно, какие события или действия инициируют дальнейшие процессы, управляемые объектом `RuntimeManager`, что могло бы предоставить более полное понимание его жизненного цикла и взаимодействия с другими компонентами системы.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "TRACE_FLOW", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS", + "C4_SEMANTIC_ROLES" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "TRACE_FLOW", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 10, + "C3_ENTRYPOINTS": 10 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Покажи поток выполнения RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "Покажи поток выполнения RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Покажи поток выполнения RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 10, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "Покажи поток выполнения RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 10, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 10, + "candidates_after_filter": 10 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 8, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 10, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 1, + "symbol_resolution": 0, + "retrieval_total": 167, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 52, + "C0_SOURCE_CHUNKS": 22, + "C4_SEMANTIC_ROLES": 17, + "C2_DEPENDENCY_GRAPH": 61, + "C3_ENTRYPOINTS": 13 + }, + "merge_rank": 20, + "prompt_build": 0, + "llm_call": 2802 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 766, + "evidence_rows": 23, + "evidence_chars": 8302 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 8, + "unique_paths": 7 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 10, + "unique_paths": 2 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_trace_flow_ru_v1", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "RuntimeManager" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 23, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-fullchain-trace-flow-runtime-manager", + "mode": "full_chain", + "run_started_at": "2026-03-12T11:56:42", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Покажи поток выполнения RuntimeManager", + "normalized_query": "Покажи поток выполнения RuntimeManager" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Покажи поток выполнения RuntimeManager" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Покажи поток выполнения RuntimeManager" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "TRACE_FLOW", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 1 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Покажи поток выполнения RuntimeManager" + }, + "output": { + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ], + "confidence": 0.99 + }, + "rag_count": 23, + "rag_rows": [ + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager\nRuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "qname": "RuntimeManager", + "kind": "class", + "signature": "RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests manager\n- orchestrates role-like calls (4)\n- reads and writes state attributes\n- participates in dataflow slices (50)", + "layer": "C4_SEMANTIC_ROLES", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 43, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "symbol_name": "RuntimeManager", + "qname": "RuntimeManager", + "role": "pipeline_stage", + "confidence": 0.67, + "dataflow_participation": 50, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 52, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.services\n -> RuntimeManager.__init__", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 33, + "span_end": 39, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d43af85989222ee6d788ce418cdcb217c7ff044cfb915e3bdbd184417dc7bd61", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "dst_ref": "RuntimeManager.__init__", + "resolution": "resolved", + "slice_id": "d43af85989222ee6d788ce418cdcb217c7ff044cfb915e3bdbd184417dc7bd61", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.services", + "RuntimeManager.__init__" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 59, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1", + "dst_ref": "RuntimeManager.start", + "resolution": "resolved", + "slice_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.start" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager._register_core_services", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 127, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6", + "dst_ref": "RuntimeManager._register_core_services", + "resolution": "resolved", + "slice_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager._register_core_services" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.services\n -> RuntimeManager._register_core_services", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 33, + "span_end": 127, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "aac6f9dda73963b977083a892bee39a48eca4fbd7404787e022ecf4ebedec65d", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6", + "dst_ref": "RuntimeManager._register_core_services", + "resolution": "resolved", + "slice_id": "aac6f9dda73963b977083a892bee39a48eca4fbd7404787e022ecf4ebedec65d", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.services", + "RuntimeManager._register_core_services" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 10, + "C3_ENTRYPOINTS": 10 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Покажи поток выполнения RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "Покажи поток выполнения RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Покажи поток выполнения RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 10, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "Покажи поток выполнения RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 10, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 10, + "candidates_after_filter": 10 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 8, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 10, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 167, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 52, + "C0_SOURCE_CHUNKS": 22, + "C4_SEMANTIC_ROLES": 17, + "C2_DEPENDENCY_GRAPH": 61, + "C3_ENTRYPOINTS": 13 + }, + "merge_rank": 20 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Покажи поток выполнения RuntimeManager", + "rag_count": 23 + }, + "output": { + "llm_answer": "## Шаги потока выполнения для `RuntimeManager`\n\n1. **Точка старта**: \n Поток начинается с вызова конструктора класса `RuntimeManager` при инициализации приложения или сервиса.\n\n2. **Передача параметров**:\n - При вызове конструктора передаются параметры конфигурации (`configuration`), сервисов (`services`), отслеживания трассировок (`traces`), состояния здоровья (`health`), ведения логов (`logs`), управления рабочими процессами (`workers`) и службы управления плоскостью контроля (`control_plane`).\n\n3. **Инициализация атрибутов объекта**:\n - Внутри метода `__init__` происходит присвоение значений параметрам, передаваемым конструктору, если они предоставлены. Если нет – создаются пустые экземпляры соответствующих классов (например, `ConfigurationManager`, `ServiceContainer`, `TraceService` и т.д.).\n \n4. **Регистрация модулей**:\n - После создания всех необходимых объектов производится регистрация модуля с помощью метода `_register_core_services`.\n\n5. **Использование экземпляров внутри методов класса**:\n - В дальнейшем экземпляр `RuntimeManager` может использоваться для выполнения различных операций через методы этого класса, например, добавление файлов конфигурации, регистрация служб, управление состоянием приложения и т.п.\n\n6. **Конечная точка потока**:\n - Поток завершается после того, как объект `RuntimeManager` выполнил все необходимые операции и достиг конечного состояния приложения или сервиса.\n\n## Недостатки информации\n\nНа данный момент отсутствует явная информация о том, как именно метод `register_module(module: ApplicationModule)` используется дальше в жизненном цикле объекта `RuntimeManager`. Это создаёт неопределённость относительно дальнейшего использования зарегистрированного модуля и того, каким образом он влияет на поведение объекта.\n\nТакже непонятно, какие события или действия инициируют дальнейшие процессы, управляемые объектом `RuntimeManager`, что могло бы предоставить более полное понимание его жизненного цикла и взаимодействия с другими компонентами системы." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 766, + "evidence_rows": 23, + "evidence_chars": 8302 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 8, + "unique_paths": 7 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 10, + "unique_paths": 2 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_trace_flow_ru_v1", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 2802 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_115642/full_chain_plba_code_subintents_plba-fullchain-trace-flow-runtime-manager.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_115642/full_chain_plba_code_subintents_plba-fullchain-trace-flow-runtime-manager.md new file mode 100644 index 0000000..96f305a --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_115642/full_chain_plba_code_subintents_plba-fullchain-trace-flow-runtime-manager.md @@ -0,0 +1,34 @@ +# plba-fullchain-trace-flow-runtime-manager + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Покажи поток выполнения RuntimeManager + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "TRACE_FLOW", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 23, + "llm_answer": "## Шаги потока выполнения для `RuntimeManager`\n\n1. **Точка старта**: \n Поток начинается с вызова конструктора класса `RuntimeManager` при инициализации приложения или сервиса.\n\n2. **Передача параметров**:\n - При вызове конструктора передаются параметры конфигурации (`configuration`), сервисов (`services`), отслеживания трассировок (`traces`), состояния здоровья (`health`), ведения логов (`logs`), управления рабочими процессами (`workers`) и службы управления плоскостью контроля (`control_plane`).\n\n3. **Инициализация атрибутов объекта**:\n - Внутри метода `__init__` происходит присвоение значений параметрам, передаваемым конструктору, если они предоставлены. Если нет – создаются пустые экземпляры соответствующих классов (например, `ConfigurationManager`, `ServiceContainer`, `TraceService` и т.д.).\n \n4. **Регистрация модулей**:\n - После создания всех необходимых объектов производится регистрация модуля с помощью метода `_register_core_services`.\n\n5. **Использование экземпляров внутри методов класса**:\n - В дальнейшем экземпляр `RuntimeManager` может использоваться для выполнения различных операций через методы этого класса, например, добавление файлов конфигурации, регистрация служб, управление состоянием приложения и т.п.\n\n6. **Конечная точка потока**:\n - Поток завершается после того, как объект `RuntimeManager` выполнил все необходимые операции и достиг конечного состояния приложения или сервиса.\n\n## Недостатки информации\n\nНа данный момент отсутствует явная информация о том, как именно метод `register_module(module: ApplicationModule)` используется дальше в жизненном цикле объекта `RuntimeManager`. Это создаёт неопределённость относительно дальнейшего использования зарегистрированного модуля и того, каким образом он влияет на поведение объекта.\n\nТакже непонятно, какие события или действия инициируют дальнейшие процессы, управляемые объектом `RuntimeManager`, что могло бы предоставить более полное понимание его жизненного цикла и взаимодействия с другими компонентами системы.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_115642/summary.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_115642/summary.md new file mode 100644 index 0000000..a7fe4ae --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_115642/summary.md @@ -0,0 +1,25 @@ +# pipeline_setup_v2 summary + +Passed: 6/7 + +| File | Case | Query | Expected sub-intent | Intent | Actual sub-intent | RAG layers | Pass | +|------|------|-------|---------------------|--------|-------------------|------------|------| +| full_chain_plba_code_subintents.yaml | plba-fullchain-open-file-runtime | Открой файл src/app_runtime/core/runtime.py | OPEN_FILE | CODE_QA | OPEN_FILE | C0_SOURCE_CHUNKS:1 | ✓ | +| full_chain_plba_code_subintents.yaml | plba-fullchain-explain-runtime-manager | Объясни как работает класс RuntimeManager | EXPLAIN | CODE_QA | EXPLAIN | C0_SOURCE_CHUNKS:1, C1_SYMBOL_CATALOG:1, C2_DEPENDENCY_GRAPH:6, C3_ENTRYPOINTS:3, C4_SEMANTIC_ROLES:1 | ✓ | +| full_chain_plba_code_subintents.yaml | plba-fullchain-find-tests-runtime-manager | Где тесты для RuntimeManager? | FIND_TESTS | CODE_QA | FIND_TESTS | C0_SOURCE_CHUNKS:10, C2_DEPENDENCY_GRAPH:6 | ✓ | +| full_chain_plba_code_subintents.yaml | plba-fullchain-find-entrypoints | Найди точки входа в коде | FIND_ENTRYPOINTS | CODE_QA | FIND_ENTRYPOINTS | C0_SOURCE_CHUNKS:6, C3_ENTRYPOINTS:3 | ✓ | +| full_chain_plba_code_subintents.yaml | plba-fullchain-trace-flow-runtime-manager | Покажи поток выполнения RuntimeManager | TRACE_FLOW | CODE_QA | TRACE_FLOW | C0_SOURCE_CHUNKS:1, C1_SYMBOL_CATALOG:1, C2_DEPENDENCY_GRAPH:10, C3_ENTRYPOINTS:3, C4_SEMANTIC_ROLES:8 | ✓ | +| full_chain_plba_code_subintents.yaml | plba-fullchain-architecture-control-plane | Какие компоненты участвуют в control plane? | ARCHITECTURE | PROJECT_MISC | ARCHITECTURE | C0_SOURCE_CHUNKS:4, C1_SYMBOL_CATALOG:1, D3_SECTION_INDEX:6 | ✗ | +| full_chain_plba_code_subintents.yaml | plba-fullchain-explain-local-runtime-manager | Почему в файле src/app_runtime/core/runtime.py класс RuntimeManager устроен так? | EXPLAIN_LOCAL | CODE_QA | EXPLAIN_LOCAL | C0_SOURCE_CHUNKS:1, C1_SYMBOL_CATALOG:1, C2_DEPENDENCY_GRAPH:4 | ✓ | + +## Failures +- **plba-fullchain-architecture-control-plane**: intent: expected CODE_QA, got PROJECT_MISC; graph_id: expected CodeQAGraph, got ProjectMiscGraph; layers should include 'C4_SEMANTIC_ROLES', got ['D1_MODULE_CATALOG', 'D3_SECTION_INDEX', 'C1_SYMBOL_CATALOG', 'C0_SOURCE_CHUNKS']; layers should include 'C2_DEPENDENCY_GRAPH', got ['D1_MODULE_CATALOG', 'D3_SECTION_INDEX', 'C1_SYMBOL_CATALOG', 'C0_SOURCE_CHUNKS']; layers should include 'C3_ENTRYPOINTS', got ['D1_MODULE_CATALOG', 'D3_SECTION_INDEX', 'C1_SYMBOL_CATALOG', 'C0_SOURCE_CHUNKS'] + +## LLM Answers +- **plba-fullchain-open-file-runtime**: Файл `src/app_runtime/core/runtime.py` содержит определение класса `RuntimeManager`, управляющего выполнением приложения в runtime режиме. ## Важные сущности и их значение: - **Класс `RuntimeManager`:** Основной управляющий класс, инициализирующий компоненты системы (конфигурацию, сервисы, трассировку, здоровье, логирование, рабочие процессы и контрольную плоскость). - **Параметры конструктора:** - `configuration`, `services`, `traces`, `health`, `logs`, `workers`, `control_plane` — позволяют передавать внешние зависимости при создании экземпляра класса. - **Методы и поля:** - `_register_core_services()` — регистрирует основные сервисы приложения. - Поля `_started`, `_state`, `_core_registered`, `_workers_registered` отслеживают состояние инициализации и регистрации сервисов. Этот файл является важным компонентом архитектуры приложения, отвечающим за настройку и запу… +- **plba-fullchain-explain-runtime-manager**: ## Назначение класса `RuntimeManager` Класс `RuntimeManager` играет роль центрального координатора для управления жизненным циклом различных компонентов системы, предоставляя интерфейс для их регистрации, запуска и мониторинга. Он служит своего рода "менеджером" всех сервисов и модулей приложения, обеспечивая согласованное выполнение задач через заданные потоки данных и состояния. ## Ключевые зависимости Ключевыми зависимостями являются компоненты и сервисы, которые управляются и координируются `RuntimeManager`. Вот основные зависимости, указанные в символическом каталоге (`C1_SYMBOL_CATALOG`) и графе зависимостей (`C2_DEPENDENCY_GRAPH`): - **ConfigurationManager**: отвечает за конфигурацию приложения; - **ServiceContainer**: содержит коллекцию зарегистрированных сервисов; - **TraceService**: сервис для отслеживания событий и действий; - **HealthRegistry**: регистрир… +- **plba-fullchain-find-tests-runtime-manager**: Прямые тесты для `RuntimeManager` найдены в следующих местах: 1. **tests/test_runtime.py**: - `test_runtime_graceful_stop_waits_until_worker_finishes`: Проверяет корректное завершение работы менеджера при использовании команды остановки (`stop()`). Тестирует состояние процесса после завершения и правильность отображения статуса («busy» → «stopped»). - `test_runtime_runs_worker_routine_and_exposes_status`: Проверяет выполнение задачи и правильное отображение статуса работы модуля и самого менеджера (`idle`, успешная остановка). Эти тесты непосредственно работают с экземпляром `RuntimeManager`, создавая его, регистрируя модули и вызывая методы (например, `start()`, `stop()`), тем самым проверяя основные функциональные возможности объекта. Итоговый ответ: В папке `tests` существует два теста, напрямую связанных с `RuntimeManager`. Они находятся в файле `test_runtime.py`… +- **plba-fullchain-find-entrypoints**: Финальный ответ: В предоставленном контексте обнаружены следующие точки входа и обработчики запуска (entrypoints): 1. **src/app_runtime/control/http_app.py | app.post** - Файл: `http_app.py` - Сущность: `app.post` - Описание: Обработчик HTTP POST-запросов для FastAPI приложения. 2. **src/app_runtime/control/http_app.py | app.get** - Файл: `http_app.py` - Сущность: `app.get` - Описание: Обработчик HTTP GET-запросов для FastAPI приложения. Наиболее вероятные пропущенные или скрытые точки входа включают файлы и сущности, связанные с начальной настройкой и конфигурацией приложения: - src/app_runtime/config/__init__.py - Файл: `config/__init__.py` - Возможная сущность: `ConfigFileLoader`, `FileConfigProvider` - Роль: Загрузка конфигурации из файла и предоставление настроек приложению. Эти дополнительные точки входа важны для инициализации и настройки окружения перед запус… +- **plba-fullchain-trace-flow-runtime-manager**: ## Шаги потока выполнения для `RuntimeManager` 1. **Точка старта**: Поток начинается с вызова конструктора класса `RuntimeManager` при инициализации приложения или сервиса. 2. **Передача параметров**: - При вызове конструктора передаются параметры конфигурации (`configuration`), сервисов (`services`), отслеживания трассировок (`traces`), состояния здоровья (`health`), ведения логов (`logs`), управления рабочими процессами (`workers`) и службы управления плоскостью контроля (`control_plane`). 3. **Инициализация атрибутов объекта**: - Внутри метода `__init__` происходит присвоение значений параметрам, передаваемым конструктору, если они предоставлены. Если нет – создаются пустые экземпляры соответствующих классов (например, `ConfigurationManager`, `ServiceContainer`, `TraceService` и т.д.). 4. **Регистрация модулей**: - После создания всех необходимых объектов производ… +- **plba-fullchain-architecture-control-plane**: В control plane обычно участвуют следующие компоненты: 1. **Control Action Set** – управляет действиями контроля. 2. **Runtime Manager** – отвечает за старт и остановку runtime. 3. **Worker Supervisor** – контролирует жизненный цикл воркеров. 4. **Log Manager** – применяет и восстанавливает валидные конфигурации логирования. 5. **Health Registry** – регистрирует состояние здоровья компонентов. 6. **Workflow Engine** – исполняет бизнес-логику и управление workflow. 7. **Checkpoint Repository** – сохраняет промежуточные состояния задач. 8. **MySQL Trace Transport** – транспорт для трассировки событий. Эти компоненты обеспечивают контроль и управление состоянием системы, выполнение рабочих процессов и мониторинг их здоровья. +- **plba-fullchain-explain-local-runtime-manager**: Класс `RuntimeManager` из файла `src/app_runtime/core/runtime.py` предназначен для управления жизненным циклом приложения во время его выполнения. ### Что делает класс: 1. **Инициализация (Constructor):** - При создании объекта класса инициализируются все основные компоненты системы через параметры конструктора (`configuration`, `services`, `traces`, `health`, `logs`, `workers`, `control_plane`). - Если эти параметры отсутствуют, создаются их дефолтные экземпляры внутри метода. 2. **Регистрация модулей:** - Метод `register_module(module)` позволяет зарегистрировать новый модуль приложения в менеджере ресурсов (`self.registry`), обеспечивая интеграцию нового функционала. 3. **Управление состоянием приложения:** - Переменные `_started`, `_state`, `_core_registered`, `_workers_registered` отслеживают состояние менеджера, позволяя управлять различными фазами жизненного ц… \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_115751/full_chain_plba_code_subintents_plba-fullchain-architecture-control-plane.json b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_115751/full_chain_plba_code_subintents_plba-fullchain-architecture-control-plane.json new file mode 100644 index 0000000..d4d8e33 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_115751/full_chain_plba_code_subintents_plba-fullchain-architecture-control-plane.json @@ -0,0 +1,3036 @@ +{ + "case_id": "plba-fullchain-architecture-control-plane", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "ARCHITECTURE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 25, + "llm_answer": "## Архитектурное объяснение RuntimeManager\n\n### Основные компоненты и их роли\n\n1. **RuntimeManager**\n - Роль: pipeline_stage\n - Описание: Менеджер выполнения этапов пайплайна. Оркеструет вызовы ролей, управляет состоянием приложения и участвует в потоках данных.\n - Ответственность: инициализация конфигурации, запуск процессов, чтение и запись состояния атрибутов.\n\n2. **ControlActionSet**\n - Роль: model\n - Описание: Модель управления действиями. Выполняет стандартные действия модели.\n - Ответственность: обработка стандартных операций и моделей поведения системы.\n\n### Связи и взаимодействия компонентов\n\n1. **Связь с внешним API через FastAPI**\n - Интерфейс взаимодействия с пользователем через HTTP-запросы.\n - Пример: `app.post` из `src/app_runtime/control/http_app.py`.\n\n2. **Управление данными и состояниями внутри пайплайна**\n - Данные передаются и обрабатываются между компонентами посредством вызовов методов RuntimeManager и ControlActionSet.\n - Пример: методы `start`, `configuration` и т.д., показанные в графе зависимостей (`C2_DEPENDENCY_GRAPH`).\n\n### Границы ответственности\n\n- RuntimeManager отвечает за управление жизненным циклом пайплайнов и координацию работы всех частей системы.\n- ControlActionSet выполняет типовые задачи и реализует поведение стандартной модели.\n\n## Ключевые выводы по архитектуре\n\n1. **Централизованное управление пайплайном**: RuntimeManager координирует выполнение различных задач и следит за целостностью потока данных.\n2. **Модульность системы**: Использование отдельных классов для управления состояниями и моделями позволяет легко расширять функциональность без изменения основного ядра системы.\n3. **Интеграция с внешними интерфейсами**: Контроллер на основе FastAPI обеспечивает удобный доступ к системе через HTTP-интерфейсы.\n4. **Гибкость и масштабируемость**: Разделение логики и обязанностей позволяет легко добавлять новые модули и улучшать существующие решения.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-fullchain-architecture-control-plane", + "text": "Какие компоненты участвуют в RuntimeManager?", + "mode": "full_chain", + "run_started_at": "2026-03-12T11:57:51", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Какие компоненты участвуют в RuntimeManager?", + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ], + "confidence": 0.99 + }, + "rag_count": 25, + "rag_rows": [ + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests manager\n- orchestrates role-like calls (4)\n- reads and writes state attributes\n- participates in dataflow slices (50)", + "layer": "C4_SEMANTIC_ROLES", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 43, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "symbol_name": "RuntimeManager", + "qname": "RuntimeManager", + "role": "pipeline_stage", + "confidence": 0.67, + "dataflow_participation": 50, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/queue/in_memory.py", + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)", + "layer": "C4_SEMANTIC_ROLES", + "title": "InMemoryTaskQueue", + "span_start": 9, + "span_end": 38, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 22, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "2da04cb94544a3bcbf0943a95ad4bdd8710bcafaa32a02fd0e4de2178dcf3533", + "symbol_name": "InMemoryTaskQueue", + "qname": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 9, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "58f0cc001ccda0eee4c6bc32ed83bd05eafd6b6644f1e8b4aa9eed3103db73dc", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "ConfigFileLoader\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (8)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ConfigFileLoader", + "span_start": 11, + "span_end": 48, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 23, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "a8474eca8b6e9dc86ae67ed68b16fa5fb639ef08739c053e7b7195489765667f", + "symbol_name": "ConfigFileLoader", + "qname": "ConfigFileLoader", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 8, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/store.py", + "content": "TraceContextStore\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "TraceContextStore", + "span_start": 15, + "span_end": 52, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b2dad4fbe16ffb11b58deba311c7739955c39d59f291b22181f33e9c8cce4059", + "symbol_name": "TraceContextStore", + "qname": "TraceContextStore", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "d369554f08fc92039c6edd5a2a1e73b23901533e8974459170bbd9347d263dc5", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workers/supervisor.py", + "content": "WorkerSupervisor\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkerSupervisor", + "span_start": 10, + "span_end": 59, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "c17b44e8d9e97d490989b21fa67d7c346cdda8a0472e4c41fb243c8846faa124", + "symbol_name": "WorkerSupervisor", + "qname": "WorkerSupervisor", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "77609d9d5927171cce7fc3a54897c183fd63068710c6362029b700937aae5eee", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 59, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1", + "dst_ref": "RuntimeManager.start", + "resolution": "resolved", + "slice_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.start" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 52, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager._register_core_services", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 127, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6", + "dst_ref": "RuntimeManager._register_core_services", + "resolution": "resolved", + "slice_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager._register_core_services" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager\nRuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "qname": "RuntimeManager", + "kind": "class", + "signature": "RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "## Архитектурное объяснение RuntimeManager\n\n### Основные компоненты и их роли\n\n1. **RuntimeManager**\n - Роль: pipeline_stage\n - Описание: Менеджер выполнения этапов пайплайна. Оркеструет вызовы ролей, управляет состоянием приложения и участвует в потоках данных.\n - Ответственность: инициализация конфигурации, запуск процессов, чтение и запись состояния атрибутов.\n\n2. **ControlActionSet**\n - Роль: model\n - Описание: Модель управления действиями. Выполняет стандартные действия модели.\n - Ответственность: обработка стандартных операций и моделей поведения системы.\n\n### Связи и взаимодействия компонентов\n\n1. **Связь с внешним API через FastAPI**\n - Интерфейс взаимодействия с пользователем через HTTP-запросы.\n - Пример: `app.post` из `src/app_runtime/control/http_app.py`.\n\n2. **Управление данными и состояниями внутри пайплайна**\n - Данные передаются и обрабатываются между компонентами посредством вызовов методов RuntimeManager и ControlActionSet.\n - Пример: методы `start`, `configuration` и т.д., показанные в графе зависимостей (`C2_DEPENDENCY_GRAPH`).\n\n### Границы ответственности\n\n- RuntimeManager отвечает за управление жизненным циклом пайплайнов и координацию работы всех частей системы.\n- ControlActionSet выполняет типовые задачи и реализует поведение стандартной модели.\n\n## Ключевые выводы по архитектуре\n\n1. **Централизованное управление пайплайном**: RuntimeManager координирует выполнение различных задач и следит за целостностью потока данных.\n2. **Модульность системы**: Использование отдельных классов для управления состояниями и моделями позволяет легко расширять функциональность без изменения основного ядра системы.\n3. **Интеграция с внешними интерфейсами**: Контроллер на основе FastAPI обеспечивает удобный доступ к системе через HTTP-интерфейсы.\n4. **Гибкость и масштабируемость**: Разделение логики и обязанностей позволяет легко добавлять новые модули и улучшать существующие решения.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "ARCHITECTURE", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS", + "C4_SEMANTIC_ROLES" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "ARCHITECTURE", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C4_SEMANTIC_ROLES": 12, + "C3_ENTRYPOINTS": 8, + "C2_DEPENDENCY_GRAPH": 8, + "C1_SYMBOL_CATALOG": 6, + "C0_SOURCE_CHUNKS": 4 + }, + "filters_by_layer": { + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C4_SEMANTIC_ROLES", + "query": "Какие компоненты участвуют в RuntimeManager?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 12, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "Какие компоненты участвуют в RuntimeManager?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Какие компоненты участвуют в RuntimeManager?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C1_SYMBOL_CATALOG", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Какие компоненты участвуют в RuntimeManager?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 4, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 12, + "candidates_after_filter": 12 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 4, + "candidates_after_filter": 4 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ] + }, + "layers": [ + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 12, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 8, + "fail_reason": null + }, + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 1, + "symbol_resolution": 0, + "retrieval_total": 164, + "retrieval_by_layer": { + "C4_SEMANTIC_ROLES": 40, + "C3_ENTRYPOINTS": 19, + "C2_DEPENDENCY_GRAPH": 64, + "C1_SYMBOL_CATALOG": 24, + "C0_SOURCE_CHUNKS": 15 + }, + "merge_rank": 17, + "prompt_build": 0, + "llm_call": 3073 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 480, + "evidence_rows": 25, + "evidence_chars": 8651 + }, + "evidence_summary": [ + { + "layer": "C4_SEMANTIC_ROLES", + "count": 12, + "unique_paths": 11 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 8, + "unique_paths": 2 + }, + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_architecture_ru_v1", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "RuntimeManager" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 25, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-fullchain-architecture-control-plane", + "mode": "full_chain", + "run_started_at": "2026-03-12T11:57:51", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Какие компоненты участвуют в RuntimeManager?", + "normalized_query": "Какие компоненты участвуют в RuntimeManager?" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Какие компоненты участвуют в RuntimeManager?" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Какие компоненты участвуют в RuntimeManager?" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "ARCHITECTURE", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 1 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Какие компоненты участвуют в RuntimeManager?" + }, + "output": { + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ], + "confidence": 0.99 + }, + "rag_count": 25, + "rag_rows": [ + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests manager\n- orchestrates role-like calls (4)\n- reads and writes state attributes\n- participates in dataflow slices (50)", + "layer": "C4_SEMANTIC_ROLES", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 43, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "symbol_name": "RuntimeManager", + "qname": "RuntimeManager", + "role": "pipeline_stage", + "confidence": 0.67, + "dataflow_participation": 50, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/queue/in_memory.py", + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)", + "layer": "C4_SEMANTIC_ROLES", + "title": "InMemoryTaskQueue", + "span_start": 9, + "span_end": 38, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 22, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "2da04cb94544a3bcbf0943a95ad4bdd8710bcafaa32a02fd0e4de2178dcf3533", + "symbol_name": "InMemoryTaskQueue", + "qname": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 9, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "58f0cc001ccda0eee4c6bc32ed83bd05eafd6b6644f1e8b4aa9eed3103db73dc", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "ConfigFileLoader\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (8)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ConfigFileLoader", + "span_start": 11, + "span_end": 48, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 23, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "a8474eca8b6e9dc86ae67ed68b16fa5fb639ef08739c053e7b7195489765667f", + "symbol_name": "ConfigFileLoader", + "qname": "ConfigFileLoader", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 8, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/store.py", + "content": "TraceContextStore\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "TraceContextStore", + "span_start": 15, + "span_end": 52, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b2dad4fbe16ffb11b58deba311c7739955c39d59f291b22181f33e9c8cce4059", + "symbol_name": "TraceContextStore", + "qname": "TraceContextStore", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "d369554f08fc92039c6edd5a2a1e73b23901533e8974459170bbd9347d263dc5", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workers/supervisor.py", + "content": "WorkerSupervisor\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkerSupervisor", + "span_start": 10, + "span_end": 59, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "c17b44e8d9e97d490989b21fa67d7c346cdda8a0472e4c41fb243c8846faa124", + "symbol_name": "WorkerSupervisor", + "qname": "WorkerSupervisor", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "77609d9d5927171cce7fc3a54897c183fd63068710c6362029b700937aae5eee", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 59, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1", + "dst_ref": "RuntimeManager.start", + "resolution": "resolved", + "slice_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.start" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 52, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager._register_core_services", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 127, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6", + "dst_ref": "RuntimeManager._register_core_services", + "resolution": "resolved", + "slice_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager._register_core_services" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager\nRuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "qname": "RuntimeManager", + "kind": "class", + "signature": "RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C4_SEMANTIC_ROLES": 12, + "C3_ENTRYPOINTS": 8, + "C2_DEPENDENCY_GRAPH": 8, + "C1_SYMBOL_CATALOG": 6, + "C0_SOURCE_CHUNKS": 4 + }, + "filters_by_layer": { + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C4_SEMANTIC_ROLES", + "query": "Какие компоненты участвуют в RuntimeManager?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 12, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "Какие компоненты участвуют в RuntimeManager?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Какие компоненты участвуют в RuntimeManager?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C1_SYMBOL_CATALOG", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Какие компоненты участвуют в RuntimeManager?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 4, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 12, + "candidates_after_filter": 12 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 4, + "candidates_after_filter": 4 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ] + }, + "layers": [ + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 12, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 8, + "fail_reason": null + }, + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 164, + "retrieval_by_layer": { + "C4_SEMANTIC_ROLES": 40, + "C3_ENTRYPOINTS": 19, + "C2_DEPENDENCY_GRAPH": 64, + "C1_SYMBOL_CATALOG": 24, + "C0_SOURCE_CHUNKS": 15 + }, + "merge_rank": 17 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Какие компоненты участвуют в RuntimeManager?", + "rag_count": 25 + }, + "output": { + "llm_answer": "## Архитектурное объяснение RuntimeManager\n\n### Основные компоненты и их роли\n\n1. **RuntimeManager**\n - Роль: pipeline_stage\n - Описание: Менеджер выполнения этапов пайплайна. Оркеструет вызовы ролей, управляет состоянием приложения и участвует в потоках данных.\n - Ответственность: инициализация конфигурации, запуск процессов, чтение и запись состояния атрибутов.\n\n2. **ControlActionSet**\n - Роль: model\n - Описание: Модель управления действиями. Выполняет стандартные действия модели.\n - Ответственность: обработка стандартных операций и моделей поведения системы.\n\n### Связи и взаимодействия компонентов\n\n1. **Связь с внешним API через FastAPI**\n - Интерфейс взаимодействия с пользователем через HTTP-запросы.\n - Пример: `app.post` из `src/app_runtime/control/http_app.py`.\n\n2. **Управление данными и состояниями внутри пайплайна**\n - Данные передаются и обрабатываются между компонентами посредством вызовов методов RuntimeManager и ControlActionSet.\n - Пример: методы `start`, `configuration` и т.д., показанные в графе зависимостей (`C2_DEPENDENCY_GRAPH`).\n\n### Границы ответственности\n\n- RuntimeManager отвечает за управление жизненным циклом пайплайнов и координацию работы всех частей системы.\n- ControlActionSet выполняет типовые задачи и реализует поведение стандартной модели.\n\n## Ключевые выводы по архитектуре\n\n1. **Централизованное управление пайплайном**: RuntimeManager координирует выполнение различных задач и следит за целостностью потока данных.\n2. **Модульность системы**: Использование отдельных классов для управления состояниями и моделями позволяет легко расширять функциональность без изменения основного ядра системы.\n3. **Интеграция с внешними интерфейсами**: Контроллер на основе FastAPI обеспечивает удобный доступ к системе через HTTP-интерфейсы.\n4. **Гибкость и масштабируемость**: Разделение логики и обязанностей позволяет легко добавлять новые модули и улучшать существующие решения." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 480, + "evidence_rows": 25, + "evidence_chars": 8651 + }, + "evidence_summary": [ + { + "layer": "C4_SEMANTIC_ROLES", + "count": 12, + "unique_paths": 11 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 8, + "unique_paths": 2 + }, + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_architecture_ru_v1", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 3073 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_115751/full_chain_plba_code_subintents_plba-fullchain-architecture-control-plane.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_115751/full_chain_plba_code_subintents_plba-fullchain-architecture-control-plane.md new file mode 100644 index 0000000..d74b984 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_115751/full_chain_plba_code_subintents_plba-fullchain-architecture-control-plane.md @@ -0,0 +1,34 @@ +# plba-fullchain-architecture-control-plane + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Какие компоненты участвуют в RuntimeManager? + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "ARCHITECTURE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 25, + "llm_answer": "## Архитектурное объяснение RuntimeManager\n\n### Основные компоненты и их роли\n\n1. **RuntimeManager**\n - Роль: pipeline_stage\n - Описание: Менеджер выполнения этапов пайплайна. Оркеструет вызовы ролей, управляет состоянием приложения и участвует в потоках данных.\n - Ответственность: инициализация конфигурации, запуск процессов, чтение и запись состояния атрибутов.\n\n2. **ControlActionSet**\n - Роль: model\n - Описание: Модель управления действиями. Выполняет стандартные действия модели.\n - Ответственность: обработка стандартных операций и моделей поведения системы.\n\n### Связи и взаимодействия компонентов\n\n1. **Связь с внешним API через FastAPI**\n - Интерфейс взаимодействия с пользователем через HTTP-запросы.\n - Пример: `app.post` из `src/app_runtime/control/http_app.py`.\n\n2. **Управление данными и состояниями внутри пайплайна**\n - Данные передаются и обрабатываются между компонентами посредством вызовов методов RuntimeManager и ControlActionSet.\n - Пример: методы `start`, `configuration` и т.д., показанные в графе зависимостей (`C2_DEPENDENCY_GRAPH`).\n\n### Границы ответственности\n\n- RuntimeManager отвечает за управление жизненным циклом пайплайнов и координацию работы всех частей системы.\n- ControlActionSet выполняет типовые задачи и реализует поведение стандартной модели.\n\n## Ключевые выводы по архитектуре\n\n1. **Централизованное управление пайплайном**: RuntimeManager координирует выполнение различных задач и следит за целостностью потока данных.\n2. **Модульность системы**: Использование отдельных классов для управления состояниями и моделями позволяет легко расширять функциональность без изменения основного ядра системы.\n3. **Интеграция с внешними интерфейсами**: Контроллер на основе FastAPI обеспечивает удобный доступ к системе через HTTP-интерфейсы.\n4. **Гибкость и масштабируемость**: Разделение логики и обязанностей позволяет легко добавлять новые модули и улучшать существующие решения.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_115751/full_chain_plba_code_subintents_plba-fullchain-explain-local-runtime-manager.json b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_115751/full_chain_plba_code_subintents_plba-fullchain-explain-local-runtime-manager.json new file mode 100644 index 0000000..a9ae525 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_115751/full_chain_plba_code_subintents_plba-fullchain-explain-local-runtime-manager.json @@ -0,0 +1,1333 @@ +{ + "case_id": "plba-fullchain-explain-local-runtime-manager", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN_LOCAL", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 6, + "llm_answer": "Класс `RuntimeManager` из файла `src/app_runtime/core/runtime.py` предназначен для управления жизненным циклом приложения во время его выполнения (runtime).\n\n### Что делает класс?\nЭтот класс служит центральной точкой координации различных компонентов системы. Он инициализирует основные службы и модули приложения, такие как конфигурация (`configuration`), сервисы (`services`), трассировка ошибок (`traces`), мониторинг здоровья (`health`), ведение логов (`logs`) и управление рабочими процессами (`workers`). \n\nТакже `RuntimeManager` обеспечивает контроль над состоянием жизненного цикла приложения через переменные `_state`, которые могут принимать значения `IDLE`, `STARTED`, и другие состояния. Класс предоставляет методы регистрации модулей и служб, а также контроля их активности.\n\n### Какие входные параметры принимает конструктор класса?\nКонструктор принимает несколько необязательных параметров:\n- `configuration`: менеджер конфигурации.\n- `services`: контейнер сервисов.\n- `traces`: сервис отслеживания трассировки.\n- `health`: реестр мониторинга здоровья.\n- `logs`: менеджер ведения логов.\n- `workers`: супервизор рабочих процессов.\n- `control_plane`: служба управления плоскостью управления.\n\nЕсли какой-либо параметр отсутствует при вызове конструктора, соответствующий компонент автоматически создается внутри класса.\n\n### Как связан класс с ближайшим контекстом?\nМетоды и атрибуты класса управляют основными аспектами работы приложения runtime. Например, метод `register_module(module)` позволяет зарегистрировать новый модуль приложения, обеспечивая интеграцию дополнительных возможностей и расширяя функциональность системы.\n\nТаким образом, класс `RuntimeManager` является основным координатором и контроллером всех компонентов приложения во время его исполнения, начиная от начальной настройки до завершения работы.", + "answer_mode": "answered", + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C2_DEPENDENCY_GRAPH" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-fullchain-explain-local-runtime-manager", + "text": "Почему в файле src/app_runtime/core/runtime.py класс RuntimeManager устроен так?", + "mode": "full_chain", + "run_started_at": "2026-03-12T11:57:51", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Почему в файле src/app_runtime/core/runtime.py класс RuntimeManager устроен так?", + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ], + "confidence": 0.99 + }, + "rag_count": 6, + "rag_rows": [ + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager\nRuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "qname": "RuntimeManager", + "kind": "class", + "signature": "RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 59, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1", + "dst_ref": "RuntimeManager.start", + "resolution": "resolved", + "slice_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.start" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager._register_core_services", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 127, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6", + "dst_ref": "RuntimeManager._register_core_services", + "resolution": "resolved", + "slice_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager._register_core_services" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 52, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.services\n -> RuntimeManager.__init__", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 33, + "span_end": 39, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d43af85989222ee6d788ce418cdcb217c7ff044cfb915e3bdbd184417dc7bd61", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "dst_ref": "RuntimeManager.__init__", + "resolution": "resolved", + "slice_id": "d43af85989222ee6d788ce418cdcb217c7ff044cfb915e3bdbd184417dc7bd61", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.services", + "RuntimeManager.__init__" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "Класс `RuntimeManager` из файла `src/app_runtime/core/runtime.py` предназначен для управления жизненным циклом приложения во время его выполнения (runtime).\n\n### Что делает класс?\nЭтот класс служит центральной точкой координации различных компонентов системы. Он инициализирует основные службы и модули приложения, такие как конфигурация (`configuration`), сервисы (`services`), трассировка ошибок (`traces`), мониторинг здоровья (`health`), ведение логов (`logs`) и управление рабочими процессами (`workers`). \n\nТакже `RuntimeManager` обеспечивает контроль над состоянием жизненного цикла приложения через переменные `_state`, которые могут принимать значения `IDLE`, `STARTED`, и другие состояния. Класс предоставляет методы регистрации модулей и служб, а также контроля их активности.\n\n### Какие входные параметры принимает конструктор класса?\nКонструктор принимает несколько необязательных параметров:\n- `configuration`: менеджер конфигурации.\n- `services`: контейнер сервисов.\n- `traces`: сервис отслеживания трассировки.\n- `health`: реестр мониторинга здоровья.\n- `logs`: менеджер ведения логов.\n- `workers`: супервизор рабочих процессов.\n- `control_plane`: служба управления плоскостью управления.\n\nЕсли какой-либо параметр отсутствует при вызове конструктора, соответствующий компонент автоматически создается внутри класса.\n\n### Как связан класс с ближайшим контекстом?\nМетоды и атрибуты класса управляют основными аспектами работы приложения runtime. Например, метод `register_module(module)` позволяет зарегистрировать новый модуль приложения, обеспечивая интеграцию дополнительных возможностей и расширяя функциональность системы.\n\nТаким образом, класс `RuntimeManager` является основным координатором и контроллером всех компонентов приложения во время его исполнения, начиная от начальной настройки до завершения работы.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN_LOCAL", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN_LOCAL", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C2_DEPENDENCY_GRAPH" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "RuntimeManager" + ], + "keyword_hints": [ + "src/app_runtime/core/runtime.py", + "RuntimeManager" + ], + "path_hints": [ + "src/app_runtime/core/runtime.py" + ], + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C2_DEPENDENCY_GRAPH" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 12, + "C2_DEPENDENCY_GRAPH": 4 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "RuntimeManager", + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Почему в файле src/app_runtime/core/runtime.py класс RuntimeManager устроен так?", + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 12, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Почему в файле src/app_runtime/core/runtime.py класс RuntimeManager устроен так?", + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 4, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 4, + "candidates_after_filter": 4 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 4, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 1, + "symbol_resolution": 0, + "retrieval_total": 58, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 20, + "C0_SOURCE_CHUNKS": 15, + "C2_DEPENDENCY_GRAPH": 22 + }, + "merge_rank": 22, + "prompt_build": 0, + "llm_call": 2557 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 784, + "evidence_rows": 6, + "evidence_chars": 6650 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 4, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_explain_local_ru_v1", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "src/app_runtime/core/runtime.py", + "RuntimeManager" + ], + "path_scope": [ + "src/app_runtime/core/runtime.py" + ] + }, + "llm": { + "used_evidence_count": 6, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-fullchain-explain-local-runtime-manager", + "mode": "full_chain", + "run_started_at": "2026-03-12T11:57:51", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Почему в файле src/app_runtime/core/runtime.py класс RuntimeManager устроен так?", + "normalized_query": "Почему в файле src/app_runtime/core/runtime.py класс RuntimeManager устроен так?" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Почему в файле src/app_runtime/core/runtime.py класс RuntimeManager устроен так?" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Почему в файле src/app_runtime/core/runtime.py класс RuntimeManager устроен так?" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN_LOCAL", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C2_DEPENDENCY_GRAPH" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "RuntimeManager" + ], + "keyword_hints": [ + "src/app_runtime/core/runtime.py", + "RuntimeManager" + ], + "path_hints": [ + "src/app_runtime/core/runtime.py" + ], + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 1 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Почему в файле src/app_runtime/core/runtime.py класс RuntimeManager устроен так?" + }, + "output": { + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ], + "confidence": 0.99 + }, + "rag_count": 6, + "rag_rows": [ + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager\nRuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "qname": "RuntimeManager", + "kind": "class", + "signature": "RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 59, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1", + "dst_ref": "RuntimeManager.start", + "resolution": "resolved", + "slice_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.start" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager._register_core_services", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 127, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6", + "dst_ref": "RuntimeManager._register_core_services", + "resolution": "resolved", + "slice_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager._register_core_services" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 52, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.services\n -> RuntimeManager.__init__", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 33, + "span_end": 39, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d43af85989222ee6d788ce418cdcb217c7ff044cfb915e3bdbd184417dc7bd61", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "dst_ref": "RuntimeManager.__init__", + "resolution": "resolved", + "slice_id": "d43af85989222ee6d788ce418cdcb217c7ff044cfb915e3bdbd184417dc7bd61", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.services", + "RuntimeManager.__init__" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C2_DEPENDENCY_GRAPH" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 12, + "C2_DEPENDENCY_GRAPH": 4 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "RuntimeManager", + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Почему в файле src/app_runtime/core/runtime.py класс RuntimeManager устроен так?", + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 12, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Почему в файле src/app_runtime/core/runtime.py класс RuntimeManager устроен так?", + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 4, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 4, + "candidates_after_filter": 4 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 4, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 58, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 20, + "C0_SOURCE_CHUNKS": 15, + "C2_DEPENDENCY_GRAPH": 22 + }, + "merge_rank": 22 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Почему в файле src/app_runtime/core/runtime.py класс RuntimeManager устроен так?", + "rag_count": 6 + }, + "output": { + "llm_answer": "Класс `RuntimeManager` из файла `src/app_runtime/core/runtime.py` предназначен для управления жизненным циклом приложения во время его выполнения (runtime).\n\n### Что делает класс?\nЭтот класс служит центральной точкой координации различных компонентов системы. Он инициализирует основные службы и модули приложения, такие как конфигурация (`configuration`), сервисы (`services`), трассировка ошибок (`traces`), мониторинг здоровья (`health`), ведение логов (`logs`) и управление рабочими процессами (`workers`). \n\nТакже `RuntimeManager` обеспечивает контроль над состоянием жизненного цикла приложения через переменные `_state`, которые могут принимать значения `IDLE`, `STARTED`, и другие состояния. Класс предоставляет методы регистрации модулей и служб, а также контроля их активности.\n\n### Какие входные параметры принимает конструктор класса?\nКонструктор принимает несколько необязательных параметров:\n- `configuration`: менеджер конфигурации.\n- `services`: контейнер сервисов.\n- `traces`: сервис отслеживания трассировки.\n- `health`: реестр мониторинга здоровья.\n- `logs`: менеджер ведения логов.\n- `workers`: супервизор рабочих процессов.\n- `control_plane`: служба управления плоскостью управления.\n\nЕсли какой-либо параметр отсутствует при вызове конструктора, соответствующий компонент автоматически создается внутри класса.\n\n### Как связан класс с ближайшим контекстом?\nМетоды и атрибуты класса управляют основными аспектами работы приложения runtime. Например, метод `register_module(module)` позволяет зарегистрировать новый модуль приложения, обеспечивая интеграцию дополнительных возможностей и расширяя функциональность системы.\n\nТаким образом, класс `RuntimeManager` является основным координатором и контроллером всех компонентов приложения во время его исполнения, начиная от начальной настройки до завершения работы." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 784, + "evidence_rows": 6, + "evidence_chars": 6650 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 4, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_explain_local_ru_v1", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 2557 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_115751/full_chain_plba_code_subintents_plba-fullchain-explain-local-runtime-manager.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_115751/full_chain_plba_code_subintents_plba-fullchain-explain-local-runtime-manager.md new file mode 100644 index 0000000..922d332 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_115751/full_chain_plba_code_subintents_plba-fullchain-explain-local-runtime-manager.md @@ -0,0 +1,34 @@ +# plba-fullchain-explain-local-runtime-manager + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Почему в файле src/app_runtime/core/runtime.py класс RuntimeManager устроен так? + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "EXPLAIN_LOCAL", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 6, + "llm_answer": "Класс `RuntimeManager` из файла `src/app_runtime/core/runtime.py` предназначен для управления жизненным циклом приложения во время его выполнения (runtime).\n\n### Что делает класс?\nЭтот класс служит центральной точкой координации различных компонентов системы. Он инициализирует основные службы и модули приложения, такие как конфигурация (`configuration`), сервисы (`services`), трассировка ошибок (`traces`), мониторинг здоровья (`health`), ведение логов (`logs`) и управление рабочими процессами (`workers`). \n\nТакже `RuntimeManager` обеспечивает контроль над состоянием жизненного цикла приложения через переменные `_state`, которые могут принимать значения `IDLE`, `STARTED`, и другие состояния. Класс предоставляет методы регистрации модулей и служб, а также контроля их активности.\n\n### Какие входные параметры принимает конструктор класса?\nКонструктор принимает несколько необязательных параметров:\n- `configuration`: менеджер конфигурации.\n- `services`: контейнер сервисов.\n- `traces`: сервис отслеживания трассировки.\n- `health`: реестр мониторинга здоровья.\n- `logs`: менеджер ведения логов.\n- `workers`: супервизор рабочих процессов.\n- `control_plane`: служба управления плоскостью управления.\n\nЕсли какой-либо параметр отсутствует при вызове конструктора, соответствующий компонент автоматически создается внутри класса.\n\n### Как связан класс с ближайшим контекстом?\nМетоды и атрибуты класса управляют основными аспектами работы приложения runtime. Например, метод `register_module(module)` позволяет зарегистрировать новый модуль приложения, обеспечивая интеграцию дополнительных возможностей и расширяя функциональность системы.\n\nТаким образом, класс `RuntimeManager` является основным координатором и контроллером всех компонентов приложения во время его исполнения, начиная от начальной настройки до завершения работы.", + "answer_mode": "answered", + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C2_DEPENDENCY_GRAPH" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_115751/full_chain_plba_code_subintents_plba-fullchain-explain-runtime-manager.json b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_115751/full_chain_plba_code_subintents_plba-fullchain-explain-runtime-manager.json new file mode 100644 index 0000000..01c70b4 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_115751/full_chain_plba_code_subintents_plba-fullchain-explain-runtime-manager.json @@ -0,0 +1,2088 @@ +{ + "case_id": "plba-fullchain-explain-runtime-manager", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 12, + "llm_answer": "## Назначение класса `RuntimeManager`\nКласс `RuntimeManager` играет роль менеджера выполнения системы и отвечает за координацию различных компонентов приложения во время его работы. Он управляет жизненным циклом, состоянием и регистрацией сервисов и модулей, обеспечивая их корректное взаимодействие.\n\n## Ключевые зависимости\nКлючевые компоненты и зависимости для правильной работы класса включают:\n- `ConfigurationManager`: настройка конфигурации приложения;\n- `ServiceContainer`: контейнер хранения всех доступных сервисов;\n- `TraceService`: сервис отслеживания трассировок событий;\n- `HealthRegistry`: регистрация текущего состояния здоровья системы;\n- `LogManager`: управление логированием событий;\n- `WorkerSupervisor`: супервизор рабочих процессов;\n- `ControlPlaneService`: основной сервис управления приложением.\n\nВсе эти зависимости передаются конструктору класса при инициализации.\n\n## Поток данных или вызовов\nПри создании экземпляра `RuntimeManager`, все указанные зависимости регистрируются в соответствующем менеджере (`self.registry`), что позволяет классу отслеживать доступные сервисы и модули.\n\nДалее начинается процесс регистрации основных служб с помощью метода `_register_core_services()`. Это включает регистрацию модулей через метод `register_module(module: ApplicationModule)` внутри метода `self.registry.register(module)`.\n\nПосле этого происходит запуск приложения путем вызова метода `start()` и установка начального состояния `LifecycleState.IDLE`.\n\n## Важные детали реализации\n### Настройки по умолчанию\nВ конструкторе присутствуют настройки по умолчанию для часто используемых параметров:\n- `ACTION_TIMEOUT_SECONDS = 10.0`: максимальное время ожидания действия;\n- `ACTION_POLL_INTERVAL_SECONDS = 0.05`: интервал опроса действий.\n\nЭти параметры могут быть переопределены пользователем при вызове конструктора.\n\n### Жизненный цикл\nЖизненный цикл `RuntimeManager` управляется состоянием переменной `_state`, которое может принимать значения:\n- `IDLE`: приложение находится в состоянии готовности к работе;\n- другие возможные состояния зависят от контекста использования и описаны подробно в соответствующей документации.\n\n### Остерегательные выводы\nНа данный момент в предоставленном контексте отсутствуют конкретные сведения о точном потоке данных или поведении после регистрации модулей и услуг. Предполагается, что дальнейшие шаги будут определены реализацией методов, таких как `start()` и `stop()`, однако детальная информация об этих шагах отсутствует.\n\nДля полного понимания поведения класса необходимо дополнительно изучить реализацию указанных методов и связанных с ними сервисов.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-fullchain-explain-runtime-manager", + "text": "Объясни как работает класс RuntimeManager", + "mode": "full_chain", + "run_started_at": "2026-03-12T11:57:51", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни как работает класс RuntimeManager", + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ], + "confidence": 0.99 + }, + "rag_count": 12, + "rag_rows": [ + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager\nRuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "qname": "RuntimeManager", + "kind": "class", + "signature": "RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests manager\n- orchestrates role-like calls (4)\n- reads and writes state attributes\n- participates in dataflow slices (50)", + "layer": "C4_SEMANTIC_ROLES", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 43, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "symbol_name": "RuntimeManager", + "qname": "RuntimeManager", + "role": "pipeline_stage", + "confidence": 0.67, + "dataflow_participation": 50, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 52, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "## Назначение класса `RuntimeManager`\nКласс `RuntimeManager` играет роль менеджера выполнения системы и отвечает за координацию различных компонентов приложения во время его работы. Он управляет жизненным циклом, состоянием и регистрацией сервисов и модулей, обеспечивая их корректное взаимодействие.\n\n## Ключевые зависимости\nКлючевые компоненты и зависимости для правильной работы класса включают:\n- `ConfigurationManager`: настройка конфигурации приложения;\n- `ServiceContainer`: контейнер хранения всех доступных сервисов;\n- `TraceService`: сервис отслеживания трассировок событий;\n- `HealthRegistry`: регистрация текущего состояния здоровья системы;\n- `LogManager`: управление логированием событий;\n- `WorkerSupervisor`: супервизор рабочих процессов;\n- `ControlPlaneService`: основной сервис управления приложением.\n\nВсе эти зависимости передаются конструктору класса при инициализации.\n\n## Поток данных или вызовов\nПри создании экземпляра `RuntimeManager`, все указанные зависимости регистрируются в соответствующем менеджере (`self.registry`), что позволяет классу отслеживать доступные сервисы и модули.\n\nДалее начинается процесс регистрации основных служб с помощью метода `_register_core_services()`. Это включает регистрацию модулей через метод `register_module(module: ApplicationModule)` внутри метода `self.registry.register(module)`.\n\nПосле этого происходит запуск приложения путем вызова метода `start()` и установка начального состояния `LifecycleState.IDLE`.\n\n## Важные детали реализации\n### Настройки по умолчанию\nВ конструкторе присутствуют настройки по умолчанию для часто используемых параметров:\n- `ACTION_TIMEOUT_SECONDS = 10.0`: максимальное время ожидания действия;\n- `ACTION_POLL_INTERVAL_SECONDS = 0.05`: интервал опроса действий.\n\nЭти параметры могут быть переопределены пользователем при вызове конструктора.\n\n### Жизненный цикл\nЖизненный цикл `RuntimeManager` управляется состоянием переменной `_state`, которое может принимать значения:\n- `IDLE`: приложение находится в состоянии готовности к работе;\n- другие возможные состояния зависят от контекста использования и описаны подробно в соответствующей документации.\n\n### Остерегательные выводы\nНа данный момент в предоставленном контексте отсутствуют конкретные сведения о точном потоке данных или поведении после регистрации модулей и услуг. Предполагается, что дальнейшие шаги будут определены реализацией методов, таких как `start()` и `stop()`, однако детальная информация об этих шагах отсутствует.\n\nДля полного понимания поведения класса необходимо дополнительно изучить реализацию указанных методов и связанных с ними сервисов.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS", + "C4_SEMANTIC_ROLES" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 140, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 31, + "C0_SOURCE_CHUNKS": 13, + "C4_SEMANTIC_ROLES": 13, + "C2_DEPENDENCY_GRAPH": 54, + "C3_ENTRYPOINTS": 10 + }, + "merge_rank": 18, + "prompt_build": 0, + "llm_call": 3467 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 797, + "evidence_rows": 12, + "evidence_chars": 7130 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 2 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_explain_ru_v1", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "RuntimeManager" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 12, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-fullchain-explain-runtime-manager", + "mode": "full_chain", + "run_started_at": "2026-03-12T11:57:51", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Объясни как работает класс RuntimeManager", + "normalized_query": "Объясни как работает класс RuntimeManager" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Объясни как работает класс RuntimeManager" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни как работает класс RuntimeManager" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Объясни как работает класс RuntimeManager" + }, + "output": { + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ], + "confidence": 0.99 + }, + "rag_count": 12, + "rag_rows": [ + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager\nRuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "qname": "RuntimeManager", + "kind": "class", + "signature": "RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests manager\n- orchestrates role-like calls (4)\n- reads and writes state attributes\n- participates in dataflow slices (50)", + "layer": "C4_SEMANTIC_ROLES", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 43, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "symbol_name": "RuntimeManager", + "qname": "RuntimeManager", + "role": "pipeline_stage", + "confidence": 0.67, + "dataflow_participation": 50, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 52, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 140, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 31, + "C0_SOURCE_CHUNKS": 13, + "C4_SEMANTIC_ROLES": 13, + "C2_DEPENDENCY_GRAPH": 54, + "C3_ENTRYPOINTS": 10 + }, + "merge_rank": 18 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Объясни как работает класс RuntimeManager", + "rag_count": 12 + }, + "output": { + "llm_answer": "## Назначение класса `RuntimeManager`\nКласс `RuntimeManager` играет роль менеджера выполнения системы и отвечает за координацию различных компонентов приложения во время его работы. Он управляет жизненным циклом, состоянием и регистрацией сервисов и модулей, обеспечивая их корректное взаимодействие.\n\n## Ключевые зависимости\nКлючевые компоненты и зависимости для правильной работы класса включают:\n- `ConfigurationManager`: настройка конфигурации приложения;\n- `ServiceContainer`: контейнер хранения всех доступных сервисов;\n- `TraceService`: сервис отслеживания трассировок событий;\n- `HealthRegistry`: регистрация текущего состояния здоровья системы;\n- `LogManager`: управление логированием событий;\n- `WorkerSupervisor`: супервизор рабочих процессов;\n- `ControlPlaneService`: основной сервис управления приложением.\n\nВсе эти зависимости передаются конструктору класса при инициализации.\n\n## Поток данных или вызовов\nПри создании экземпляра `RuntimeManager`, все указанные зависимости регистрируются в соответствующем менеджере (`self.registry`), что позволяет классу отслеживать доступные сервисы и модули.\n\nДалее начинается процесс регистрации основных служб с помощью метода `_register_core_services()`. Это включает регистрацию модулей через метод `register_module(module: ApplicationModule)` внутри метода `self.registry.register(module)`.\n\nПосле этого происходит запуск приложения путем вызова метода `start()` и установка начального состояния `LifecycleState.IDLE`.\n\n## Важные детали реализации\n### Настройки по умолчанию\nВ конструкторе присутствуют настройки по умолчанию для часто используемых параметров:\n- `ACTION_TIMEOUT_SECONDS = 10.0`: максимальное время ожидания действия;\n- `ACTION_POLL_INTERVAL_SECONDS = 0.05`: интервал опроса действий.\n\nЭти параметры могут быть переопределены пользователем при вызове конструктора.\n\n### Жизненный цикл\nЖизненный цикл `RuntimeManager` управляется состоянием переменной `_state`, которое может принимать значения:\n- `IDLE`: приложение находится в состоянии готовности к работе;\n- другие возможные состояния зависят от контекста использования и описаны подробно в соответствующей документации.\n\n### Остерегательные выводы\nНа данный момент в предоставленном контексте отсутствуют конкретные сведения о точном потоке данных или поведении после регистрации модулей и услуг. Предполагается, что дальнейшие шаги будут определены реализацией методов, таких как `start()` и `stop()`, однако детальная информация об этих шагах отсутствует.\n\nДля полного понимания поведения класса необходимо дополнительно изучить реализацию указанных методов и связанных с ними сервисов." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 797, + "evidence_rows": 12, + "evidence_chars": 7130 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 2 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_explain_ru_v1", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 3467 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_115751/full_chain_plba_code_subintents_plba-fullchain-explain-runtime-manager.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_115751/full_chain_plba_code_subintents_plba-fullchain-explain-runtime-manager.md new file mode 100644 index 0000000..520c039 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_115751/full_chain_plba_code_subintents_plba-fullchain-explain-runtime-manager.md @@ -0,0 +1,34 @@ +# plba-fullchain-explain-runtime-manager + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Объясни как работает класс RuntimeManager + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 12, + "llm_answer": "## Назначение класса `RuntimeManager`\nКласс `RuntimeManager` играет роль менеджера выполнения системы и отвечает за координацию различных компонентов приложения во время его работы. Он управляет жизненным циклом, состоянием и регистрацией сервисов и модулей, обеспечивая их корректное взаимодействие.\n\n## Ключевые зависимости\nКлючевые компоненты и зависимости для правильной работы класса включают:\n- `ConfigurationManager`: настройка конфигурации приложения;\n- `ServiceContainer`: контейнер хранения всех доступных сервисов;\n- `TraceService`: сервис отслеживания трассировок событий;\n- `HealthRegistry`: регистрация текущего состояния здоровья системы;\n- `LogManager`: управление логированием событий;\n- `WorkerSupervisor`: супервизор рабочих процессов;\n- `ControlPlaneService`: основной сервис управления приложением.\n\nВсе эти зависимости передаются конструктору класса при инициализации.\n\n## Поток данных или вызовов\nПри создании экземпляра `RuntimeManager`, все указанные зависимости регистрируются в соответствующем менеджере (`self.registry`), что позволяет классу отслеживать доступные сервисы и модули.\n\nДалее начинается процесс регистрации основных служб с помощью метода `_register_core_services()`. Это включает регистрацию модулей через метод `register_module(module: ApplicationModule)` внутри метода `self.registry.register(module)`.\n\nПосле этого происходит запуск приложения путем вызова метода `start()` и установка начального состояния `LifecycleState.IDLE`.\n\n## Важные детали реализации\n### Настройки по умолчанию\nВ конструкторе присутствуют настройки по умолчанию для часто используемых параметров:\n- `ACTION_TIMEOUT_SECONDS = 10.0`: максимальное время ожидания действия;\n- `ACTION_POLL_INTERVAL_SECONDS = 0.05`: интервал опроса действий.\n\nЭти параметры могут быть переопределены пользователем при вызове конструктора.\n\n### Жизненный цикл\nЖизненный цикл `RuntimeManager` управляется состоянием переменной `_state`, которое может принимать значения:\n- `IDLE`: приложение находится в состоянии готовности к работе;\n- другие возможные состояния зависят от контекста использования и описаны подробно в соответствующей документации.\n\n### Остерегательные выводы\nНа данный момент в предоставленном контексте отсутствуют конкретные сведения о точном потоке данных или поведении после регистрации модулей и услуг. Предполагается, что дальнейшие шаги будут определены реализацией методов, таких как `start()` и `stop()`, однако детальная информация об этих шагах отсутствует.\n\nДля полного понимания поведения класса необходимо дополнительно изучить реализацию указанных методов и связанных с ними сервисов.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_115751/full_chain_plba_code_subintents_plba-fullchain-find-entrypoints.json b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_115751/full_chain_plba_code_subintents_plba-fullchain-find-entrypoints.json new file mode 100644 index 0000000..ec9cb09 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_115751/full_chain_plba_code_subintents_plba-fullchain-find-entrypoints.json @@ -0,0 +1,1196 @@ +{ + "case_id": "plba-fullchain-find-entrypoints", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 9, + "llm_answer": "## Финальный ответ:\n\nНа основании предоставленного контекста и анализа слоев RAG можно выделить следующие **точки входа** и ключевые обработчики запуска в приложении:\n\n### 1. `app.post` \n**Файл:** `src/app_runtime/control/http_app.py`\n**Сущность:** Метод класса FastAPI (`app`) \n**Роль:** Обрабатывает HTTP POST-запросы. Это основной маршрут для приёма данных от пользователей и их дальнейшей обработки внутри приложения.\n\n### 2. `app.get` \n**Файл:** `src/app_runtime/control/http_app.py`\n**Сущность:** Метод класса FastAPI (`app`) \n**Роль:** Обрабатывает HTTP GET-запросы. Используется для получения информации из системы (например, статус задач, результаты вычислений).\n\n### Наиболее вероятные точки входа (по контексту):\n- src/app_runtime/control/http_app.py: \n - Обработка запросов через методы `app.post` и `app.get`.\n\n### Дополнительные наблюдения по контексту:\n- В файле `src/app_runtime/workflow/contracts/result.py` определена структура результата выполнения шагов (`StepResult`), что указывает на внутреннюю логику работы приложения с результатами и переходами состояний.\n- В файле `src/app_runtime/config/__init__.py` объявлены классы конфигурации, которые могут использоваться для настройки приложения, однако напрямую они не являются точками входа.\n\nТаким образом, основными точками входа в приложение являются маршруты FastAPI для HTTP-методов POST и GET, указанные в файле `http_app.py`.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [], + "layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-fullchain-find-entrypoints", + "text": "Найди точки входа в коде", + "mode": "full_chain", + "run_started_at": "2026-03-12T11:57:51", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Найди точки входа в коде", + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [], + "confidence": 0.0 + }, + "rag_count": 9, + "rag_rows": [ + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/contracts/result.py", + "content": "class StepResult:\n transition: str = \"success\"\n updates: dict[str, Any] = field(default_factory=dict)\n status: str = \"completed\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/workflow/contracts/result.py:StepResult", + "span_start": 8, + "span_end": 11, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.workflow.contracts.result", + "is_test": false, + "blob_sha": "6e57dbfe22873f097f11228a26cffa415440a43b68a737b220906461cd86c353", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/__init__.py", + "content": "from app_runtime.config.file_loader import ConfigFileLoader\nfrom app_runtime.config.providers import FileConfigProvider\n\n__all__ = [\"ConfigFileLoader\", \"FileConfigProvider\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/config/__init__.py:1-4", + "span_start": 1, + "span_end": 4, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.config.__init__", + "is_test": false, + "blob_sha": "612918029820a2a983330ec92256142b55b9de4bdf3399ece18e2a02dbad9729", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/__init__.py", + "content": "__all__: list[str] = []", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/__init__.py:1-1", + "span_start": 1, + "span_end": 1, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.__init__", + "is_test": false, + "blob_sha": "8eea9df4f6d7b38ca0e39ccc27b04700e3d08dbeec8046d613d22706d19985fa", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "class ConfigFileLoader:\n def __init__(self, path: str | Path) -> None:\n self.path = Path(path)\n self.config: Any = None\n self.last_valid_config: Any = None\n self._last_seen_hash: str | None = None\n\n def read_text(self) -> str:\n return self.path.read_text(encoding=\"utf-8\")\n\n def parse(self, data: str) -> Any:\n suffix = self.path.suffix.lower()\n if suffix in {\".yml\", \".yaml\"}:\n return yaml.safe_load(data)\n return json.loads(data)\n\n def load_sync(self) -> Any:\n data = self.read_text()\n parsed = self.parse(data)\n self.config = parsed\n self.last_valid_config = parsed\n self._last_seen_hash = self._calculate_hash(data)\n return parsed\n\n def load_if_changed(self) -> tuple[bool, Any]:\n data = self.read_text()\n current_hash = self._calculate_hash(data)\n if current_hash == self._last_seen_hash:\n return False, self.config\n parsed = self.parse(data)\n self.config = parsed\n self.last_valid_config = parsed\n self._last_seen_hash = current_hash\n return True, parsed\n\n @staticmethod\n def _calculate_hash(data: str) -> str:\n return hashlib.sha256(data.encode(\"utf-8\")).hexdigest()", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/config/file_loader.py:ConfigFileLoader", + "span_start": 11, + "span_end": 48, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/providers.py", + "content": "class FileConfigProvider(ConfigProvider):\n def __init__(self, path: str | Path) -> None:\n self._loader = ConfigFileLoader(path)\n\n @property\n def loader(self) -> ConfigFileLoader:\n return self._loader\n\n def load(self) -> dict[str, Any]:\n config = self._loader.load_sync()\n if not isinstance(config, dict):\n raise TypeError(\"Config root must be a mapping\")\n return dict(config)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/config/providers.py:FileConfigProvider", + "span_start": 10, + "span_end": 22, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.config.providers", + "is_test": false, + "blob_sha": "8c53ca0122d6df6c5763bca15e99434bb4daebd5a618b8fc927e9ae90b022e64", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlActionSet:\n health: HealthHandler\n start: ActionHandler\n stop: ActionHandler\n status: ActionHandler", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "## Финальный ответ:\n\nНа основании предоставленного контекста и анализа слоев RAG можно выделить следующие **точки входа** и ключевые обработчики запуска в приложении:\n\n### 1. `app.post` \n**Файл:** `src/app_runtime/control/http_app.py`\n**Сущность:** Метод класса FastAPI (`app`) \n**Роль:** Обрабатывает HTTP POST-запросы. Это основной маршрут для приёма данных от пользователей и их дальнейшей обработки внутри приложения.\n\n### 2. `app.get` \n**Файл:** `src/app_runtime/control/http_app.py`\n**Сущность:** Метод класса FastAPI (`app`) \n**Роль:** Обрабатывает HTTP GET-запросы. Используется для получения информации из системы (например, статус задач, результаты вычислений).\n\n### Наиболее вероятные точки входа (по контексту):\n- src/app_runtime/control/http_app.py: \n - Обработка запросов через методы `app.post` и `app.get`.\n\n### Дополнительные наблюдения по контексту:\n- В файле `src/app_runtime/workflow/contracts/result.py` определена структура результата выполнения шагов (`StepResult`), что указывает на внутреннюю логику работы приложения с результатами и переходами состояний.\n- В файле `src/app_runtime/config/__init__.py` объявлены классы конфигурации, которые могут использоваться для настройки приложения, однако напрямую они не являются точками входа.\n\nТаким образом, основными точками входа в приложение являются маршруты FastAPI для HTTP-методов POST и GET, указанные в файле `http_app.py`.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C3_ENTRYPOINTS" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "unknown", + "symbol_candidates": [], + "keyword_hints": [], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C3_ENTRYPOINTS": "exact_path_fetch", + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C3_ENTRYPOINTS": 12, + "C0_SOURCE_CHUNKS": 6 + }, + "filters_by_layer": { + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C3_ENTRYPOINTS", + "query": "Найди точки входа в коде", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 12, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Найди точки входа в коде", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [] + }, + "layers": [ + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 6, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 52, + "retrieval_by_layer": { + "C3_ENTRYPOINTS": 28, + "C0_SOURCE_CHUNKS": 23 + }, + "merge_rank": 0, + "prompt_build": 0, + "llm_call": 2372 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 458, + "evidence_rows": 9, + "evidence_chars": 2228 + }, + "evidence_summary": [ + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 6, + "unique_paths": 6 + } + ], + "prompt_template_id": "intent_code_qa_find_entrypoints_ru_v1", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 9, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-fullchain-find-entrypoints", + "mode": "full_chain", + "run_started_at": "2026-03-12T11:57:51", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Найди точки входа в коде", + "normalized_query": "Найди точки входа в коде" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Найди точки входа в коде" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Найди точки входа в коде" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "unknown", + "symbol_candidates": [], + "keyword_hints": [], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Найди точки входа в коде" + }, + "output": { + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [], + "confidence": 0.0 + }, + "rag_count": 9, + "rag_rows": [ + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/contracts/result.py", + "content": "class StepResult:\n transition: str = \"success\"\n updates: dict[str, Any] = field(default_factory=dict)\n status: str = \"completed\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/workflow/contracts/result.py:StepResult", + "span_start": 8, + "span_end": 11, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.workflow.contracts.result", + "is_test": false, + "blob_sha": "6e57dbfe22873f097f11228a26cffa415440a43b68a737b220906461cd86c353", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/__init__.py", + "content": "from app_runtime.config.file_loader import ConfigFileLoader\nfrom app_runtime.config.providers import FileConfigProvider\n\n__all__ = [\"ConfigFileLoader\", \"FileConfigProvider\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/config/__init__.py:1-4", + "span_start": 1, + "span_end": 4, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.config.__init__", + "is_test": false, + "blob_sha": "612918029820a2a983330ec92256142b55b9de4bdf3399ece18e2a02dbad9729", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/__init__.py", + "content": "__all__: list[str] = []", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/__init__.py:1-1", + "span_start": 1, + "span_end": 1, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.__init__", + "is_test": false, + "blob_sha": "8eea9df4f6d7b38ca0e39ccc27b04700e3d08dbeec8046d613d22706d19985fa", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "class ConfigFileLoader:\n def __init__(self, path: str | Path) -> None:\n self.path = Path(path)\n self.config: Any = None\n self.last_valid_config: Any = None\n self._last_seen_hash: str | None = None\n\n def read_text(self) -> str:\n return self.path.read_text(encoding=\"utf-8\")\n\n def parse(self, data: str) -> Any:\n suffix = self.path.suffix.lower()\n if suffix in {\".yml\", \".yaml\"}:\n return yaml.safe_load(data)\n return json.loads(data)\n\n def load_sync(self) -> Any:\n data = self.read_text()\n parsed = self.parse(data)\n self.config = parsed\n self.last_valid_config = parsed\n self._last_seen_hash = self._calculate_hash(data)\n return parsed\n\n def load_if_changed(self) -> tuple[bool, Any]:\n data = self.read_text()\n current_hash = self._calculate_hash(data)\n if current_hash == self._last_seen_hash:\n return False, self.config\n parsed = self.parse(data)\n self.config = parsed\n self.last_valid_config = parsed\n self._last_seen_hash = current_hash\n return True, parsed\n\n @staticmethod\n def _calculate_hash(data: str) -> str:\n return hashlib.sha256(data.encode(\"utf-8\")).hexdigest()", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/config/file_loader.py:ConfigFileLoader", + "span_start": 11, + "span_end": 48, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/providers.py", + "content": "class FileConfigProvider(ConfigProvider):\n def __init__(self, path: str | Path) -> None:\n self._loader = ConfigFileLoader(path)\n\n @property\n def loader(self) -> ConfigFileLoader:\n return self._loader\n\n def load(self) -> dict[str, Any]:\n config = self._loader.load_sync()\n if not isinstance(config, dict):\n raise TypeError(\"Config root must be a mapping\")\n return dict(config)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/config/providers.py:FileConfigProvider", + "span_start": 10, + "span_end": 22, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.config.providers", + "is_test": false, + "blob_sha": "8c53ca0122d6df6c5763bca15e99434bb4daebd5a618b8fc927e9ae90b022e64", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlActionSet:\n health: HealthHandler\n start: ActionHandler\n stop: ActionHandler\n status: ActionHandler", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C3_ENTRYPOINTS": "exact_path_fetch", + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C3_ENTRYPOINTS": 12, + "C0_SOURCE_CHUNKS": 6 + }, + "filters_by_layer": { + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C3_ENTRYPOINTS", + "query": "Найди точки входа в коде", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 12, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Найди точки входа в коде", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [] + }, + "layers": [ + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 6, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 52, + "retrieval_by_layer": { + "C3_ENTRYPOINTS": 28, + "C0_SOURCE_CHUNKS": 23 + }, + "merge_rank": 0 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Найди точки входа в коде", + "rag_count": 9 + }, + "output": { + "llm_answer": "## Финальный ответ:\n\nНа основании предоставленного контекста и анализа слоев RAG можно выделить следующие **точки входа** и ключевые обработчики запуска в приложении:\n\n### 1. `app.post` \n**Файл:** `src/app_runtime/control/http_app.py`\n**Сущность:** Метод класса FastAPI (`app`) \n**Роль:** Обрабатывает HTTP POST-запросы. Это основной маршрут для приёма данных от пользователей и их дальнейшей обработки внутри приложения.\n\n### 2. `app.get` \n**Файл:** `src/app_runtime/control/http_app.py`\n**Сущность:** Метод класса FastAPI (`app`) \n**Роль:** Обрабатывает HTTP GET-запросы. Используется для получения информации из системы (например, статус задач, результаты вычислений).\n\n### Наиболее вероятные точки входа (по контексту):\n- src/app_runtime/control/http_app.py: \n - Обработка запросов через методы `app.post` и `app.get`.\n\n### Дополнительные наблюдения по контексту:\n- В файле `src/app_runtime/workflow/contracts/result.py` определена структура результата выполнения шагов (`StepResult`), что указывает на внутреннюю логику работы приложения с результатами и переходами состояний.\n- В файле `src/app_runtime/config/__init__.py` объявлены классы конфигурации, которые могут использоваться для настройки приложения, однако напрямую они не являются точками входа.\n\nТаким образом, основными точками входа в приложение являются маршруты FastAPI для HTTP-методов POST и GET, указанные в файле `http_app.py`." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 458, + "evidence_rows": 9, + "evidence_chars": 2228 + }, + "evidence_summary": [ + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 6, + "unique_paths": 6 + } + ], + "prompt_template_id": "intent_code_qa_find_entrypoints_ru_v1", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 2372 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_115751/full_chain_plba_code_subintents_plba-fullchain-find-entrypoints.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_115751/full_chain_plba_code_subintents_plba-fullchain-find-entrypoints.md new file mode 100644 index 0000000..44c9990 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_115751/full_chain_plba_code_subintents_plba-fullchain-find-entrypoints.md @@ -0,0 +1,29 @@ +# plba-fullchain-find-entrypoints + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Найди точки входа в коде + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 9, + "llm_answer": "## Финальный ответ:\n\nНа основании предоставленного контекста и анализа слоев RAG можно выделить следующие **точки входа** и ключевые обработчики запуска в приложении:\n\n### 1. `app.post` \n**Файл:** `src/app_runtime/control/http_app.py`\n**Сущность:** Метод класса FastAPI (`app`) \n**Роль:** Обрабатывает HTTP POST-запросы. Это основной маршрут для приёма данных от пользователей и их дальнейшей обработки внутри приложения.\n\n### 2. `app.get` \n**Файл:** `src/app_runtime/control/http_app.py`\n**Сущность:** Метод класса FastAPI (`app`) \n**Роль:** Обрабатывает HTTP GET-запросы. Используется для получения информации из системы (например, статус задач, результаты вычислений).\n\n### Наиболее вероятные точки входа (по контексту):\n- src/app_runtime/control/http_app.py: \n - Обработка запросов через методы `app.post` и `app.get`.\n\n### Дополнительные наблюдения по контексту:\n- В файле `src/app_runtime/workflow/contracts/result.py` определена структура результата выполнения шагов (`StepResult`), что указывает на внутреннюю логику работы приложения с результатами и переходами состояний.\n- В файле `src/app_runtime/config/__init__.py` объявлены классы конфигурации, которые могут использоваться для настройки приложения, однако напрямую они не являются точками входа.\n\nТаким образом, основными точками входа в приложение являются маршруты FastAPI для HTTP-методов POST и GET, указанные в файле `http_app.py`.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [], + "layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_115751/full_chain_plba_code_subintents_plba-fullchain-find-tests-runtime-manager.json b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_115751/full_chain_plba_code_subintents_plba-fullchain-find-tests-runtime-manager.json new file mode 100644 index 0000000..4a018ac --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_115751/full_chain_plba_code_subintents_plba-fullchain-find-tests-runtime-manager.json @@ -0,0 +1,1879 @@ +{ + "case_id": "plba-fullchain-find-tests-runtime-manager", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 16, + "llm_answer": "Прямые тесты для `RuntimeManager` обнаружены в следующих местах:\n\n1. **tests/test_runtime.py**:\n - `test_runtime_graceful_stop_waits_until_worker_finishes`: Проверяет корректность остановки (`stop`) объекта `RuntimeManager`, ожидая завершения работы модуля.\n ✅ Близость проверки высокая — непосредственно проверяет поведение при вызове метода `stop`.\n \n - `test_runtime_runs_worker_routine_and_exposes_status`: Тестирует регистрацию модуля и запуск его рутины с последующим получением статуса.\n ✅ Близость проверки высокая — проверяет выполнение регистраций модулей и получение их статусов через `RuntimeManager`.\n\n2. **tests/test_business_control_actions.py**:\n - `_build_runtime`: Тест косвенный, так как здесь создаётся объект `RuntimeManager`, но сам метод не проверяет логику поведения объекта напрямую.\n ❌ Косвенная проверка.\n - `test_worker_wakes_up_with_configured_interval`: Аналогично предыдущему пункту, использует `RuntimeManager` без непосредственной проверки его функций.\n ❌ Косвенная проверка.\n\nИтоговый вывод:\n\n- Прямые тесты для методов и поведения `RuntimeManager` найдены в `tests/test_runtime.py`. Они охватывают важные аспекты использования объекта, такие как остановка и управление состояниями.\n- В `tests/test_business_control_actions.py` есть косвенные упоминания о создании экземпляров `RuntimeManager`, однако сами методы там не проверяются на функциональность.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-fullchain-find-tests-runtime-manager", + "text": "Где тесты для RuntimeManager?", + "mode": "full_chain", + "run_started_at": "2026-03-12T11:57:51", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Где тесты для RuntimeManager?", + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "RuntimeManager" + ], + "confidence": 0.0 + }, + "rag_count": 16, + "rag_rows": [ + { + "path": "tests/test_runtime.py", + "content": "test_runtime_runs_worker_routine_and_exposes_status instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_runtime_runs_worker_routine_and_exposes_status:instantiates", + "span_start": 209, + "span_end": 209, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "c397a308e7824ba9fe400a754c7e15e66ea6f058d7f5d3e82bb002bb78b509d2", + "edge_type": "instantiates", + "src_symbol_id": "1c767eb5ee08e84f45b18c8ed7531ec0ed73c63fb1594823569672db7b21e992", + "src_qname": "test_runtime_runs_worker_routine_and_exposes_status", + "dst_symbol_id": "aeadc039653807b0da1ca6e3cc1078ee61cfc510b28e7f9c2ec04c59da43cc8d", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "test_runtime_graceful_stop_waits_until_worker_finishes instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_runtime_graceful_stop_waits_until_worker_finishes:instantiates", + "span_start": 229, + "span_end": 229, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "76b4701262ccaa0a7a41691407c4ebdb2ca74a2415d89f0a38ef0d4f608bda93", + "edge_type": "instantiates", + "src_symbol_id": "1076e788e4a03b10d7bc1313a8ad46caa170c13cc026c6e4de994af1a6ae57bf", + "src_qname": "test_runtime_graceful_stop_waits_until_worker_finishes", + "dst_symbol_id": "aeadc039653807b0da1ca6e3cc1078ee61cfc510b28e7f9c2ec04c59da43cc8d", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "_build_runtime instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "_build_runtime:instantiates", + "span_start": 155, + "span_end": 155, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "7eb254d564944bab6272757ee5ef688862bd321e6941e2495dc942e03b1c9a25", + "edge_type": "instantiates", + "src_symbol_id": "db94031d5245bf82be836a109b4584b43b8e83d37a0f318e03f6c8191896d469", + "src_qname": "_build_runtime", + "dst_symbol_id": "a1572ea8183dc0cd6ddbc74342bbde8c28cecfde37ad40b62feff09f8d103d11", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_worker_wakes_up_with_configured_interval instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_worker_wakes_up_with_configured_interval:instantiates", + "span_start": 167, + "span_end": 167, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "189aafc4de0b79c688668f25f0c87166a127df26bd2215452014713b65ef281a", + "edge_type": "instantiates", + "src_symbol_id": "65f877f78191d65e6a752e41cedc70ebc784c266804a55c1c56440336e1f0d6e", + "src_qname": "test_worker_wakes_up_with_configured_interval", + "dst_symbol_id": "a1572ea8183dc0cd6ddbc74342bbde8c28cecfde37ad40b62feff09f8d103d11", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_actions_stop_busy_worker_after_timeout\n -> BlockingRoutine\n -> BlockingRoutine.__init__\n -> BlockingRoutine._started\n -> BlockingRoutine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_actions_stop_busy_worker_after_timeout:dataflow_slice", + "span_start": 42, + "span_end": 238, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "8e7db3d2a9226f1c1d9942ac6373cfcafa0d2276758ddb8a3d3c455a3d58024d", + "edge_type": "dataflow_slice", + "src_symbol_id": "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "src_qname": "test_actions_stop_busy_worker_after_timeout", + "dst_symbol_id": "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04", + "dst_ref": "BlockingRoutine.run", + "resolution": "resolved", + "slice_id": "8e7db3d2a9226f1c1d9942ac6373cfcafa0d2276758ddb8a3d3c455a3d58024d", + "root_symbol_id": "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "path_symbols": [ + "test_actions_stop_busy_worker_after_timeout", + "BlockingRoutine", + "BlockingRoutine.__init__", + "BlockingRoutine._started", + "BlockingRoutine.run" + ], + "path_symbol_ids": [ + "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "a3349c5bc65e4003a4bbd6a8dbb7a54c337e12d1aed930caa701b12e520f1e67", + "486deeed3043c6db985aef258e96ddc67aa53608e67a83962fbd2471f649ddf1", + "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_actions_stop_busy_worker_before_timeout\n -> BlockingRoutine\n -> BlockingRoutine.__init__\n -> BlockingRoutine._release\n -> BlockingRoutine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_actions_stop_busy_worker_before_timeout:dataflow_slice", + "span_start": 43, + "span_end": 212, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "8bd726155ba387d3579763ee84dfd2f9a90bc917da88f3b2e89416ab5c1254d6", + "edge_type": "dataflow_slice", + "src_symbol_id": "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "src_qname": "test_actions_stop_busy_worker_before_timeout", + "dst_symbol_id": "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04", + "dst_ref": "BlockingRoutine.run", + "resolution": "resolved", + "slice_id": "8bd726155ba387d3579763ee84dfd2f9a90bc917da88f3b2e89416ab5c1254d6", + "root_symbol_id": "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "path_symbols": [ + "test_actions_stop_busy_worker_before_timeout", + "BlockingRoutine", + "BlockingRoutine.__init__", + "BlockingRoutine._release", + "BlockingRoutine.run" + ], + "path_symbol_ids": [ + "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "a3349c5bc65e4003a4bbd6a8dbb7a54c337e12d1aed930caa701b12e520f1e67", + "486deeed3043c6db985aef258e96ddc67aa53608e67a83962fbd2471f649ddf1", + "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "def test_runtime_graceful_stop_waits_until_worker_finishes() -> None:\n started = Event()\n release = Event()\n runtime = RuntimeManager()\n runtime.register_module(BlockingModule(started, release))\n runtime.start()\n assert started.wait(timeout=1.0) is True\n assert runtime.status()[\"runtime\"][\"state\"] == \"busy\"\n\n stop_thread = Thread(target=runtime.stop, kwargs={\"timeout\": 1.0}, daemon=True)\n stop_thread.start()\n sleep(0.1)\n assert stop_thread.is_alive() is True\n\n release.set()\n stop_thread.join(timeout=1.0)\n assert stop_thread.is_alive() is False\n assert runtime.status()[\"runtime\"][\"state\"] == \"stopped\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_runtime.py:test_runtime_graceful_stop_waits_until_worker_finishes", + "span_start": 226, + "span_end": 243, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 8, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "def test_runtime_runs_worker_routine_and_exposes_status(tmp_path) -> None:\n config_path = tmp_path / \"config.yml\"\n config_path.write_text(\n \"\"\"\nplatform:\n workers: 1\nlog:\n version: 1\n disable_existing_loggers: false\n handlers:\n console:\n class: logging.StreamHandler\n root:\n level: INFO\n handlers: [console]\n\"\"\".strip(),\n encoding=\"utf-8\",\n )\n runtime = RuntimeManager()\n runtime.add_config_file(config_path)\n module = ExampleModule()\n runtime.register_module(module)\n\n runtime.start()\n sleep(0.2)\n status = runtime.status()\n runtime.stop()\n\n assert module.routine.processed == [{\"id\": 1}]\n assert status[\"modules\"] == [\"example\"]\n assert status[\"runtime\"][\"state\"] == \"idle\"\n assert status[\"health\"][\"status\"] == \"ok\"\n assert status[\"config\"] == {\"platform\": {\"workers\": 1}, \"log\": status[\"config\"][\"log\"]}", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_runtime.py:test_runtime_runs_worker_routine_and_exposes_status", + "span_start": 191, + "span_end": 223, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 7, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _build_runtime(worker: Worker, *, control_timeout: int = 1) -> tuple[RuntimeManager, str]:\n runtime = RuntimeManager()\n channel = HttpControlChannel(host=\"127.0.0.1\", port=0, timeout=control_timeout)\n runtime.control_plane.register_channel(channel)\n runtime.register_module(WorkerModule(worker))\n runtime.start()\n return runtime, f\"http://127.0.0.1:{channel.port}\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_build_runtime", + "span_start": 154, + "span_end": 160, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 6, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def test_worker_wakes_up_with_configured_interval() -> None:\n interval = 0.15\n routine = IntervalRoutine()\n worker = ScenarioWorker(\"interval-worker\", routine, interval=interval)\n runtime = RuntimeManager()\n runtime.register_module(WorkerModule(worker))\n\n runtime.start()\n try:\n assert routine.wait_runs(count=3, timeout=2.0) is True\n finally:\n runtime.stop()\n\n deltas = routine.deltas()\n assert len(deltas) >= 2\n assert all(delta >= interval * 0.7 for delta in deltas[:2])", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:test_worker_wakes_up_with_configured_interval", + "span_start": 163, + "span_end": 178, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 7, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class BlockingRoutine:\n def __init__(self, started: Event, release: Event) -> None:\n self._started = started\n self._release = release\n\n def run(self) -> None:\n self._started.set()\n self._release.wait(timeout=5.0)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:BlockingRoutine", + "span_start": 40, + "span_end": 47, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class ScenarioWorker(Worker):\n def __init__(self, name: str, routine: object, *, interval: float = 0.05) -> None:\n self._name = name\n self._routine = routine\n self._interval = interval\n self._thread: Thread | None = None\n self._stop_requested = Event()\n self._in_flight = 0\n self._runs = 0\n self._lock = Lock()\n\n @property\n def name(self) -> str:\n return self._name\n\n @property\n def critical(self) -> bool:\n return True\n\n def start(self) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._stop_requested.clear()\n self._thread = Thread(target=self._loop, name=f\"{self._name}-thread\", daemon=True)\n self._thread.start()\n\n def stop(self, force: bool = False) -> None:\n self._stop_requested.set()\n\n def health(self) -> WorkerHealth:\n return WorkerHealth(name=self.name, status=\"ok\", critical=True, meta={\"runs\": self._runs})\n\n def status(self) -> WorkerStatus:\n thread_alive = self._thread is not None and self._thread.is_alive()\n with self._lock:\n in_flight = self._in_flight\n runs = self._runs\n if not thread_alive:\n state = \"stopped\"\n elif self._stop_requested.is_set():\n state = \"stopping\"\n elif in_flight > 0:\n state = \"busy\"\n else:\n state = \"idle\"\n return WorkerStatus(name=self.name, state=state, in_flight=in_flight, meta={\"runs\": runs})\n\n def _loop(self) -> None:\n while not self._stop_requested.is_set():\n with self._lock:\n self._in_flight += 1\n try:\n self._routine.run()\n with self._lock:\n self._runs += 1\n finally:\n with self._lock:\n self._in_flight -= 1\n if self._stop_requested.is_set():\n return\n sleep(self._interval)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:ScenarioWorker", + "span_start": 50, + "span_end": 110, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 2, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class WorkerModule(ApplicationModule):\n def __init__(self, worker: Worker) -> None:\n self._worker = worker\n\n @property\n def name(self) -> str:\n return \"business-tests\"\n\n def register(self, registry: ModuleRegistry) -> None:\n registry.add_worker(self._worker)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:WorkerModule", + "span_start": 113, + "span_end": 122, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 3, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _http_call_json(\n base_url: str,\n path: str,\n *,\n method: str = \"GET\",\n headers: dict[str, str] | None = None,\n) -> tuple[int, dict[str, object]]:\n request = Request(f\"{base_url}{path}\", method=method, headers=headers or {})\n try:\n with urlopen(request, timeout=15.0) as response:\n status = response.status\n body = response.read()\n except HTTPError as error:\n status = error.code\n body = error.read()\n payload = json.loads(body.decode(\"utf-8\"))\n return status, payload", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_http_call_json", + "span_start": 125, + "span_end": 141, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 4, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class IntervalRoutine:\n calls: list[float] = field(default_factory=list)\n _lock: Lock = field(default_factory=Lock)\n\n def run(self) -> None:\n with self._lock:\n self.calls.append(monotonic())\n\n def wait_runs(self, count: int, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n with self._lock:\n if len(self.calls) >= count:\n return True\n sleep(0.01)\n return False\n\n def deltas(self) -> list[float]:\n with self._lock:\n return [self.calls[index + 1] - self.calls[index] for index in range(len(self.calls) - 1)]", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:IntervalRoutine", + "span_start": 18, + "span_end": 37, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _poll_until_stopped(base_url: str, timeout: float = 2.0) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n _, payload = _http_call_json(base_url, \"/actions/status\")\n if payload.get(\"detail\") == \"stopped\":\n return True\n sleep(0.05)\n return False", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_poll_until_stopped", + "span_start": 144, + "span_end": 151, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 5, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "Прямые тесты для `RuntimeManager` обнаружены в следующих местах:\n\n1. **tests/test_runtime.py**:\n - `test_runtime_graceful_stop_waits_until_worker_finishes`: Проверяет корректность остановки (`stop`) объекта `RuntimeManager`, ожидая завершения работы модуля.\n ✅ Близость проверки высокая — непосредственно проверяет поведение при вызове метода `stop`.\n \n - `test_runtime_runs_worker_routine_and_exposes_status`: Тестирует регистрацию модуля и запуск его рутины с последующим получением статуса.\n ✅ Близость проверки высокая — проверяет выполнение регистраций модулей и получение их статусов через `RuntimeManager`.\n\n2. **tests/test_business_control_actions.py**:\n - `_build_runtime`: Тест косвенный, так как здесь создаётся объект `RuntimeManager`, но сам метод не проверяет логику поведения объекта напрямую.\n ❌ Косвенная проверка.\n - `test_worker_wakes_up_with_configured_interval`: Аналогично предыдущему пункту, использует `RuntimeManager` без непосредственной проверки его функций.\n ❌ Косвенная проверка.\n\nИтоговый вывод:\n\n- Прямые тесты для методов и поведения `RuntimeManager` найдены в `tests/test_runtime.py`. Они охватывают важные аспекты использования объекта, такие как остановка и управление состояниями.\n- В `tests/test_business_control_actions.py` есть косвенные упоминания о создании экземпляров `RuntimeManager`, однако сами методы там не проверяются на функциональность.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C2_DEPENDENCY_GRAPH" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "test_file_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "test_symbol_patterns": [ + "test_runtime_manager", + "TestRuntimeManager", + "RuntimeManager" + ], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C0_SOURCE_CHUNKS": 10 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src", + "tests" + ], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src", + "tests" + ], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Где тесты для RuntimeManager? test_runtime_manager TestRuntimeManager RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Где тесты для RuntimeManager? test_runtime_manager TestRuntimeManager RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 10, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 0, + "candidates_after_filter": 0 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src", + "tests" + ], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src", + "tests" + ], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 10, + "candidates_after_filter": 10 + } + ], + "fallback": { + "used": true, + "reason": "scope_relaxed_no_hits" + }, + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "RuntimeManager" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "miss", + "hit_count": 0, + "fail_reason": "scope_relaxed_no_hits" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 10, + "fail_reason": null + } + ] + }, + "constraint_violations": [ + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C1_SYMBOL_CATALOG", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + } + ], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 150, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 81, + "C2_DEPENDENCY_GRAPH": 53, + "C0_SOURCE_CHUNKS": 15 + }, + "merge_rank": 0, + "prompt_build": 0, + "llm_call": 2314 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 858, + "evidence_rows": 16, + "evidence_chars": 7086 + }, + "evidence_summary": [ + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 2 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 10, + "unique_paths": 2 + } + ], + "prompt_template_id": "intent_code_qa_find_tests_ru_v1", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "RuntimeManager" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 16, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-fullchain-find-tests-runtime-manager", + "mode": "full_chain", + "run_started_at": "2026-03-12T11:57:51", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Где тесты для RuntimeManager?", + "normalized_query": "Где тесты для RuntimeManager?" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Где тесты для RuntimeManager?" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Где тесты для RuntimeManager?" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "test_file_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "test_symbol_patterns": [ + "test_runtime_manager", + "TestRuntimeManager", + "RuntimeManager" + ], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Где тесты для RuntimeManager?" + }, + "output": { + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "RuntimeManager" + ], + "confidence": 0.0 + }, + "rag_count": 16, + "rag_rows": [ + { + "path": "tests/test_runtime.py", + "content": "test_runtime_runs_worker_routine_and_exposes_status instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_runtime_runs_worker_routine_and_exposes_status:instantiates", + "span_start": 209, + "span_end": 209, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "c397a308e7824ba9fe400a754c7e15e66ea6f058d7f5d3e82bb002bb78b509d2", + "edge_type": "instantiates", + "src_symbol_id": "1c767eb5ee08e84f45b18c8ed7531ec0ed73c63fb1594823569672db7b21e992", + "src_qname": "test_runtime_runs_worker_routine_and_exposes_status", + "dst_symbol_id": "aeadc039653807b0da1ca6e3cc1078ee61cfc510b28e7f9c2ec04c59da43cc8d", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "test_runtime_graceful_stop_waits_until_worker_finishes instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_runtime_graceful_stop_waits_until_worker_finishes:instantiates", + "span_start": 229, + "span_end": 229, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "76b4701262ccaa0a7a41691407c4ebdb2ca74a2415d89f0a38ef0d4f608bda93", + "edge_type": "instantiates", + "src_symbol_id": "1076e788e4a03b10d7bc1313a8ad46caa170c13cc026c6e4de994af1a6ae57bf", + "src_qname": "test_runtime_graceful_stop_waits_until_worker_finishes", + "dst_symbol_id": "aeadc039653807b0da1ca6e3cc1078ee61cfc510b28e7f9c2ec04c59da43cc8d", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "_build_runtime instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "_build_runtime:instantiates", + "span_start": 155, + "span_end": 155, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "7eb254d564944bab6272757ee5ef688862bd321e6941e2495dc942e03b1c9a25", + "edge_type": "instantiates", + "src_symbol_id": "db94031d5245bf82be836a109b4584b43b8e83d37a0f318e03f6c8191896d469", + "src_qname": "_build_runtime", + "dst_symbol_id": "a1572ea8183dc0cd6ddbc74342bbde8c28cecfde37ad40b62feff09f8d103d11", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_worker_wakes_up_with_configured_interval instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_worker_wakes_up_with_configured_interval:instantiates", + "span_start": 167, + "span_end": 167, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "189aafc4de0b79c688668f25f0c87166a127df26bd2215452014713b65ef281a", + "edge_type": "instantiates", + "src_symbol_id": "65f877f78191d65e6a752e41cedc70ebc784c266804a55c1c56440336e1f0d6e", + "src_qname": "test_worker_wakes_up_with_configured_interval", + "dst_symbol_id": "a1572ea8183dc0cd6ddbc74342bbde8c28cecfde37ad40b62feff09f8d103d11", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_actions_stop_busy_worker_after_timeout\n -> BlockingRoutine\n -> BlockingRoutine.__init__\n -> BlockingRoutine._started\n -> BlockingRoutine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_actions_stop_busy_worker_after_timeout:dataflow_slice", + "span_start": 42, + "span_end": 238, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "8e7db3d2a9226f1c1d9942ac6373cfcafa0d2276758ddb8a3d3c455a3d58024d", + "edge_type": "dataflow_slice", + "src_symbol_id": "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "src_qname": "test_actions_stop_busy_worker_after_timeout", + "dst_symbol_id": "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04", + "dst_ref": "BlockingRoutine.run", + "resolution": "resolved", + "slice_id": "8e7db3d2a9226f1c1d9942ac6373cfcafa0d2276758ddb8a3d3c455a3d58024d", + "root_symbol_id": "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "path_symbols": [ + "test_actions_stop_busy_worker_after_timeout", + "BlockingRoutine", + "BlockingRoutine.__init__", + "BlockingRoutine._started", + "BlockingRoutine.run" + ], + "path_symbol_ids": [ + "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "a3349c5bc65e4003a4bbd6a8dbb7a54c337e12d1aed930caa701b12e520f1e67", + "486deeed3043c6db985aef258e96ddc67aa53608e67a83962fbd2471f649ddf1", + "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_actions_stop_busy_worker_before_timeout\n -> BlockingRoutine\n -> BlockingRoutine.__init__\n -> BlockingRoutine._release\n -> BlockingRoutine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_actions_stop_busy_worker_before_timeout:dataflow_slice", + "span_start": 43, + "span_end": 212, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "8bd726155ba387d3579763ee84dfd2f9a90bc917da88f3b2e89416ab5c1254d6", + "edge_type": "dataflow_slice", + "src_symbol_id": "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "src_qname": "test_actions_stop_busy_worker_before_timeout", + "dst_symbol_id": "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04", + "dst_ref": "BlockingRoutine.run", + "resolution": "resolved", + "slice_id": "8bd726155ba387d3579763ee84dfd2f9a90bc917da88f3b2e89416ab5c1254d6", + "root_symbol_id": "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "path_symbols": [ + "test_actions_stop_busy_worker_before_timeout", + "BlockingRoutine", + "BlockingRoutine.__init__", + "BlockingRoutine._release", + "BlockingRoutine.run" + ], + "path_symbol_ids": [ + "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "a3349c5bc65e4003a4bbd6a8dbb7a54c337e12d1aed930caa701b12e520f1e67", + "486deeed3043c6db985aef258e96ddc67aa53608e67a83962fbd2471f649ddf1", + "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "def test_runtime_graceful_stop_waits_until_worker_finishes() -> None:\n started = Event()\n release = Event()\n runtime = RuntimeManager()\n runtime.register_module(BlockingModule(started, release))\n runtime.start()\n assert started.wait(timeout=1.0) is True\n assert runtime.status()[\"runtime\"][\"state\"] == \"busy\"\n\n stop_thread = Thread(target=runtime.stop, kwargs={\"timeout\": 1.0}, daemon=True)\n stop_thread.start()\n sleep(0.1)\n assert stop_thread.is_alive() is True\n\n release.set()\n stop_thread.join(timeout=1.0)\n assert stop_thread.is_alive() is False\n assert runtime.status()[\"runtime\"][\"state\"] == \"stopped\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_runtime.py:test_runtime_graceful_stop_waits_until_worker_finishes", + "span_start": 226, + "span_end": 243, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 8, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "def test_runtime_runs_worker_routine_and_exposes_status(tmp_path) -> None:\n config_path = tmp_path / \"config.yml\"\n config_path.write_text(\n \"\"\"\nplatform:\n workers: 1\nlog:\n version: 1\n disable_existing_loggers: false\n handlers:\n console:\n class: logging.StreamHandler\n root:\n level: INFO\n handlers: [console]\n\"\"\".strip(),\n encoding=\"utf-8\",\n )\n runtime = RuntimeManager()\n runtime.add_config_file(config_path)\n module = ExampleModule()\n runtime.register_module(module)\n\n runtime.start()\n sleep(0.2)\n status = runtime.status()\n runtime.stop()\n\n assert module.routine.processed == [{\"id\": 1}]\n assert status[\"modules\"] == [\"example\"]\n assert status[\"runtime\"][\"state\"] == \"idle\"\n assert status[\"health\"][\"status\"] == \"ok\"\n assert status[\"config\"] == {\"platform\": {\"workers\": 1}, \"log\": status[\"config\"][\"log\"]}", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_runtime.py:test_runtime_runs_worker_routine_and_exposes_status", + "span_start": 191, + "span_end": 223, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 7, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _build_runtime(worker: Worker, *, control_timeout: int = 1) -> tuple[RuntimeManager, str]:\n runtime = RuntimeManager()\n channel = HttpControlChannel(host=\"127.0.0.1\", port=0, timeout=control_timeout)\n runtime.control_plane.register_channel(channel)\n runtime.register_module(WorkerModule(worker))\n runtime.start()\n return runtime, f\"http://127.0.0.1:{channel.port}\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_build_runtime", + "span_start": 154, + "span_end": 160, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 6, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def test_worker_wakes_up_with_configured_interval() -> None:\n interval = 0.15\n routine = IntervalRoutine()\n worker = ScenarioWorker(\"interval-worker\", routine, interval=interval)\n runtime = RuntimeManager()\n runtime.register_module(WorkerModule(worker))\n\n runtime.start()\n try:\n assert routine.wait_runs(count=3, timeout=2.0) is True\n finally:\n runtime.stop()\n\n deltas = routine.deltas()\n assert len(deltas) >= 2\n assert all(delta >= interval * 0.7 for delta in deltas[:2])", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:test_worker_wakes_up_with_configured_interval", + "span_start": 163, + "span_end": 178, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 7, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class BlockingRoutine:\n def __init__(self, started: Event, release: Event) -> None:\n self._started = started\n self._release = release\n\n def run(self) -> None:\n self._started.set()\n self._release.wait(timeout=5.0)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:BlockingRoutine", + "span_start": 40, + "span_end": 47, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class ScenarioWorker(Worker):\n def __init__(self, name: str, routine: object, *, interval: float = 0.05) -> None:\n self._name = name\n self._routine = routine\n self._interval = interval\n self._thread: Thread | None = None\n self._stop_requested = Event()\n self._in_flight = 0\n self._runs = 0\n self._lock = Lock()\n\n @property\n def name(self) -> str:\n return self._name\n\n @property\n def critical(self) -> bool:\n return True\n\n def start(self) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._stop_requested.clear()\n self._thread = Thread(target=self._loop, name=f\"{self._name}-thread\", daemon=True)\n self._thread.start()\n\n def stop(self, force: bool = False) -> None:\n self._stop_requested.set()\n\n def health(self) -> WorkerHealth:\n return WorkerHealth(name=self.name, status=\"ok\", critical=True, meta={\"runs\": self._runs})\n\n def status(self) -> WorkerStatus:\n thread_alive = self._thread is not None and self._thread.is_alive()\n with self._lock:\n in_flight = self._in_flight\n runs = self._runs\n if not thread_alive:\n state = \"stopped\"\n elif self._stop_requested.is_set():\n state = \"stopping\"\n elif in_flight > 0:\n state = \"busy\"\n else:\n state = \"idle\"\n return WorkerStatus(name=self.name, state=state, in_flight=in_flight, meta={\"runs\": runs})\n\n def _loop(self) -> None:\n while not self._stop_requested.is_set():\n with self._lock:\n self._in_flight += 1\n try:\n self._routine.run()\n with self._lock:\n self._runs += 1\n finally:\n with self._lock:\n self._in_flight -= 1\n if self._stop_requested.is_set():\n return\n sleep(self._interval)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:ScenarioWorker", + "span_start": 50, + "span_end": 110, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 2, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class WorkerModule(ApplicationModule):\n def __init__(self, worker: Worker) -> None:\n self._worker = worker\n\n @property\n def name(self) -> str:\n return \"business-tests\"\n\n def register(self, registry: ModuleRegistry) -> None:\n registry.add_worker(self._worker)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:WorkerModule", + "span_start": 113, + "span_end": 122, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 3, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _http_call_json(\n base_url: str,\n path: str,\n *,\n method: str = \"GET\",\n headers: dict[str, str] | None = None,\n) -> tuple[int, dict[str, object]]:\n request = Request(f\"{base_url}{path}\", method=method, headers=headers or {})\n try:\n with urlopen(request, timeout=15.0) as response:\n status = response.status\n body = response.read()\n except HTTPError as error:\n status = error.code\n body = error.read()\n payload = json.loads(body.decode(\"utf-8\"))\n return status, payload", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_http_call_json", + "span_start": 125, + "span_end": 141, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 4, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class IntervalRoutine:\n calls: list[float] = field(default_factory=list)\n _lock: Lock = field(default_factory=Lock)\n\n def run(self) -> None:\n with self._lock:\n self.calls.append(monotonic())\n\n def wait_runs(self, count: int, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n with self._lock:\n if len(self.calls) >= count:\n return True\n sleep(0.01)\n return False\n\n def deltas(self) -> list[float]:\n with self._lock:\n return [self.calls[index + 1] - self.calls[index] for index in range(len(self.calls) - 1)]", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:IntervalRoutine", + "span_start": 18, + "span_end": 37, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _poll_until_stopped(base_url: str, timeout: float = 2.0) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n _, payload = _http_call_json(base_url, \"/actions/status\")\n if payload.get(\"detail\") == \"stopped\":\n return True\n sleep(0.05)\n return False", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_poll_until_stopped", + "span_start": 144, + "span_end": 151, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 5, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C0_SOURCE_CHUNKS": 10 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src", + "tests" + ], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src", + "tests" + ], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Где тесты для RuntimeManager? test_runtime_manager TestRuntimeManager RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Где тесты для RuntimeManager? test_runtime_manager TestRuntimeManager RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 10, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 0, + "candidates_after_filter": 0 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src", + "tests" + ], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src", + "tests" + ], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 10, + "candidates_after_filter": 10 + } + ], + "fallback": { + "used": true, + "reason": "scope_relaxed_no_hits" + }, + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "RuntimeManager" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "miss", + "hit_count": 0, + "fail_reason": "scope_relaxed_no_hits" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 10, + "fail_reason": null + } + ] + }, + "constraint_violations": [ + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C1_SYMBOL_CATALOG", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + } + ], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 150, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 81, + "C2_DEPENDENCY_GRAPH": 53, + "C0_SOURCE_CHUNKS": 15 + }, + "merge_rank": 0 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Где тесты для RuntimeManager?", + "rag_count": 16 + }, + "output": { + "llm_answer": "Прямые тесты для `RuntimeManager` обнаружены в следующих местах:\n\n1. **tests/test_runtime.py**:\n - `test_runtime_graceful_stop_waits_until_worker_finishes`: Проверяет корректность остановки (`stop`) объекта `RuntimeManager`, ожидая завершения работы модуля.\n ✅ Близость проверки высокая — непосредственно проверяет поведение при вызове метода `stop`.\n \n - `test_runtime_runs_worker_routine_and_exposes_status`: Тестирует регистрацию модуля и запуск его рутины с последующим получением статуса.\n ✅ Близость проверки высокая — проверяет выполнение регистраций модулей и получение их статусов через `RuntimeManager`.\n\n2. **tests/test_business_control_actions.py**:\n - `_build_runtime`: Тест косвенный, так как здесь создаётся объект `RuntimeManager`, но сам метод не проверяет логику поведения объекта напрямую.\n ❌ Косвенная проверка.\n - `test_worker_wakes_up_with_configured_interval`: Аналогично предыдущему пункту, использует `RuntimeManager` без непосредственной проверки его функций.\n ❌ Косвенная проверка.\n\nИтоговый вывод:\n\n- Прямые тесты для методов и поведения `RuntimeManager` найдены в `tests/test_runtime.py`. Они охватывают важные аспекты использования объекта, такие как остановка и управление состояниями.\n- В `tests/test_business_control_actions.py` есть косвенные упоминания о создании экземпляров `RuntimeManager`, однако сами методы там не проверяются на функциональность." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 858, + "evidence_rows": 16, + "evidence_chars": 7086 + }, + "evidence_summary": [ + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 2 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 10, + "unique_paths": 2 + } + ], + "prompt_template_id": "intent_code_qa_find_tests_ru_v1", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 2314 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_115751/full_chain_plba_code_subintents_plba-fullchain-find-tests-runtime-manager.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_115751/full_chain_plba_code_subintents_plba-fullchain-find-tests-runtime-manager.md new file mode 100644 index 0000000..33b16c2 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_115751/full_chain_plba_code_subintents_plba-fullchain-find-tests-runtime-manager.md @@ -0,0 +1,32 @@ +# plba-fullchain-find-tests-runtime-manager + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Где тесты для RuntimeManager? + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 16, + "llm_answer": "Прямые тесты для `RuntimeManager` обнаружены в следующих местах:\n\n1. **tests/test_runtime.py**:\n - `test_runtime_graceful_stop_waits_until_worker_finishes`: Проверяет корректность остановки (`stop`) объекта `RuntimeManager`, ожидая завершения работы модуля.\n ✅ Близость проверки высокая — непосредственно проверяет поведение при вызове метода `stop`.\n \n - `test_runtime_runs_worker_routine_and_exposes_status`: Тестирует регистрацию модуля и запуск его рутины с последующим получением статуса.\n ✅ Близость проверки высокая — проверяет выполнение регистраций модулей и получение их статусов через `RuntimeManager`.\n\n2. **tests/test_business_control_actions.py**:\n - `_build_runtime`: Тест косвенный, так как здесь создаётся объект `RuntimeManager`, но сам метод не проверяет логику поведения объекта напрямую.\n ❌ Косвенная проверка.\n - `test_worker_wakes_up_with_configured_interval`: Аналогично предыдущему пункту, использует `RuntimeManager` без непосредственной проверки его функций.\n ❌ Косвенная проверка.\n\nИтоговый вывод:\n\n- Прямые тесты для методов и поведения `RuntimeManager` найдены в `tests/test_runtime.py`. Они охватывают важные аспекты использования объекта, такие как остановка и управление состояниями.\n- В `tests/test_business_control_actions.py` есть косвенные упоминания о создании экземпляров `RuntimeManager`, однако сами методы там не проверяются на функциональность.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_115751/full_chain_plba_code_subintents_plba-fullchain-open-file-runtime.json b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_115751/full_chain_plba_code_subintents_plba-fullchain-open-file-runtime.json new file mode 100644 index 0000000..56809b2 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_115751/full_chain_plba_code_subintents_plba-fullchain-open-file-runtime.json @@ -0,0 +1,492 @@ +{ + "case_id": "plba-fullchain-open-file-runtime", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 1, + "llm_answer": "Файл `src/app_runtime/core/runtime.py` содержит определение класса `RuntimeManager`, управляющего основными компонентами приложения во время его выполнения.\n\n## Важные сущности и их значение:\n- **`ConfigurationManager`, `ServiceContainer`, `TraceService`, `HealthRegistry`, `LogManager`, `WorkerSupervisor`, `ControlPlaneService`:** \n Эти классы представляют компоненты инфраструктуры, необходимые для работы приложения (конфигурация, сервисы, трассировка, здоровье системы, ведение логов, управление рабочими процессами и контрольная плоскость).\n \n- **`ModuleRegistry`:**\n Используется для регистрации модулей приложений, позволяя управлять ими централизованно.\n\n- **Параметры инициализации (`configuration`, `services`, `traces`, etc.):**\n Позволяют настраивать поведение экземпляра `RuntimeManager`.\n\n- **Методы класса:**\n - `_register_core_services()`: регистрирует основные службы, используемые приложением.\n - `register_module(module: ApplicationModule)`: позволяет зарегистрировать дополнительные модули приложения.\n\nЭтот класс является ключевым компонентом управления жизненным циклом приложения и обеспечивает интеграцию различных служб и компонентов в единое целое.", + "answer_mode": "answered", + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "symbol_candidates": [], + "layers": [ + "C0_SOURCE_CHUNKS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-fullchain-open-file-runtime", + "text": "Открой файл src/app_runtime/core/runtime.py", + "mode": "full_chain", + "run_started_at": "2026-03-12T11:57:51", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Открой файл src/app_runtime/core/runtime.py", + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [], + "confidence": 0.0 + }, + "rag_count": 1, + "rag_rows": [ + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "Файл `src/app_runtime/core/runtime.py` содержит определение класса `RuntimeManager`, управляющего основными компонентами приложения во время его выполнения.\n\n## Важные сущности и их значение:\n- **`ConfigurationManager`, `ServiceContainer`, `TraceService`, `HealthRegistry`, `LogManager`, `WorkerSupervisor`, `ControlPlaneService`:** \n Эти классы представляют компоненты инфраструктуры, необходимые для работы приложения (конфигурация, сервисы, трассировка, здоровье системы, ведение логов, управление рабочими процессами и контрольная плоскость).\n \n- **`ModuleRegistry`:**\n Используется для регистрации модулей приложений, позволяя управлять ими централизованно.\n\n- **Параметры инициализации (`configuration`, `services`, `traces`, etc.):**\n Позволяют настраивать поведение экземпляра `RuntimeManager`.\n\n- **Методы класса:**\n - `_register_core_services()`: регистрирует основные службы, используемые приложением.\n - `register_module(module: ApplicationModule)`: позволяет зарегистрировать дополнительные модули приложения.\n\nЭтот класс является ключевым компонентом управления жизненным циклом приложения и обеспечивает интеграцию различных служб и компонентов в единое целое.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "unknown", + "symbol_candidates": [], + "keyword_hints": [], + "path_hints": [ + "src/app_runtime/core/runtime.py" + ], + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/app_runtime/core/runtime.py" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": false, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C0_SOURCE_CHUNKS": 200 + }, + "filters_by_layer": { + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "include_globs": [], + "exclude_globs": [], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Открой файл src/app_runtime/core/runtime.py", + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "include_globs": [], + "exclude_globs": [], + "prefer_globs": [], + "top_k": 200, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "normalized_include_globs": [], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [] + }, + "layers": [ + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 1, + "symbol_resolution": 0, + "retrieval_total": 102, + "retrieval_by_layer": { + "C0_SOURCE_CHUNKS": 102 + }, + "merge_rank": 0, + "prompt_build": 0, + "llm_call": 1863 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 555, + "evidence_rows": 1, + "evidence_chars": 6265 + }, + "evidence_summary": [ + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_open_file_ru_v1", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [], + "path_scope": [ + "src/app_runtime/core/runtime.py" + ] + }, + "llm": { + "used_evidence_count": 1, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-fullchain-open-file-runtime", + "mode": "full_chain", + "run_started_at": "2026-03-12T11:57:51", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Открой файл src/app_runtime/core/runtime.py", + "normalized_query": "Открой файл src/app_runtime/core/runtime.py" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Открой файл src/app_runtime/core/runtime.py" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Открой файл src/app_runtime/core/runtime.py" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "unknown", + "symbol_candidates": [], + "keyword_hints": [], + "path_hints": [ + "src/app_runtime/core/runtime.py" + ], + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/app_runtime/core/runtime.py" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": false, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 1 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Открой файл src/app_runtime/core/runtime.py" + }, + "output": { + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [], + "confidence": 0.0 + }, + "rag_count": 1, + "rag_rows": [ + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C0_SOURCE_CHUNKS": 200 + }, + "filters_by_layer": { + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "include_globs": [], + "exclude_globs": [], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Открой файл src/app_runtime/core/runtime.py", + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "include_globs": [], + "exclude_globs": [], + "prefer_globs": [], + "top_k": 200, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "normalized_include_globs": [], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [] + }, + "layers": [ + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 102, + "retrieval_by_layer": { + "C0_SOURCE_CHUNKS": 102 + }, + "merge_rank": 0 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Открой файл src/app_runtime/core/runtime.py", + "rag_count": 1 + }, + "output": { + "llm_answer": "Файл `src/app_runtime/core/runtime.py` содержит определение класса `RuntimeManager`, управляющего основными компонентами приложения во время его выполнения.\n\n## Важные сущности и их значение:\n- **`ConfigurationManager`, `ServiceContainer`, `TraceService`, `HealthRegistry`, `LogManager`, `WorkerSupervisor`, `ControlPlaneService`:** \n Эти классы представляют компоненты инфраструктуры, необходимые для работы приложения (конфигурация, сервисы, трассировка, здоровье системы, ведение логов, управление рабочими процессами и контрольная плоскость).\n \n- **`ModuleRegistry`:**\n Используется для регистрации модулей приложений, позволяя управлять ими централизованно.\n\n- **Параметры инициализации (`configuration`, `services`, `traces`, etc.):**\n Позволяют настраивать поведение экземпляра `RuntimeManager`.\n\n- **Методы класса:**\n - `_register_core_services()`: регистрирует основные службы, используемые приложением.\n - `register_module(module: ApplicationModule)`: позволяет зарегистрировать дополнительные модули приложения.\n\nЭтот класс является ключевым компонентом управления жизненным циклом приложения и обеспечивает интеграцию различных служб и компонентов в единое целое." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 555, + "evidence_rows": 1, + "evidence_chars": 6265 + }, + "evidence_summary": [ + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_open_file_ru_v1", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 1863 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_115751/full_chain_plba_code_subintents_plba-fullchain-open-file-runtime.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_115751/full_chain_plba_code_subintents_plba-fullchain-open-file-runtime.md new file mode 100644 index 0000000..792e334 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_115751/full_chain_plba_code_subintents_plba-fullchain-open-file-runtime.md @@ -0,0 +1,30 @@ +# plba-fullchain-open-file-runtime + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Открой файл src/app_runtime/core/runtime.py + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 1, + "llm_answer": "Файл `src/app_runtime/core/runtime.py` содержит определение класса `RuntimeManager`, управляющего основными компонентами приложения во время его выполнения.\n\n## Важные сущности и их значение:\n- **`ConfigurationManager`, `ServiceContainer`, `TraceService`, `HealthRegistry`, `LogManager`, `WorkerSupervisor`, `ControlPlaneService`:** \n Эти классы представляют компоненты инфраструктуры, необходимые для работы приложения (конфигурация, сервисы, трассировка, здоровье системы, ведение логов, управление рабочими процессами и контрольная плоскость).\n \n- **`ModuleRegistry`:**\n Используется для регистрации модулей приложений, позволяя управлять ими централизованно.\n\n- **Параметры инициализации (`configuration`, `services`, `traces`, etc.):**\n Позволяют настраивать поведение экземпляра `RuntimeManager`.\n\n- **Методы класса:**\n - `_register_core_services()`: регистрирует основные службы, используемые приложением.\n - `register_module(module: ApplicationModule)`: позволяет зарегистрировать дополнительные модули приложения.\n\nЭтот класс является ключевым компонентом управления жизненным циклом приложения и обеспечивает интеграцию различных служб и компонентов в единое целое.", + "answer_mode": "answered", + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "symbol_candidates": [], + "layers": [ + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_115751/full_chain_plba_code_subintents_plba-fullchain-trace-flow-runtime-manager.json b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_115751/full_chain_plba_code_subintents_plba-fullchain-trace-flow-runtime-manager.json new file mode 100644 index 0000000..4ac1612 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_115751/full_chain_plba_code_subintents_plba-fullchain-trace-flow-runtime-manager.json @@ -0,0 +1,2964 @@ +{ + "case_id": "plba-fullchain-trace-flow-runtime-manager", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "TRACE_FLOW", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 23, + "llm_answer": "## Шаг 1: Инициализация потока выполнения\n\n### Источник начала потока:\nПроцесс начинается с вызова конструктора класса `RuntimeManager` (`__init__`) из внешнего контекста.\n\n### Слой информации: C2_DEPENDENCY_GRAPH\nВызовы метода `RuntimeManager.__init__` зависят от следующих методов и атрибутов:\n- `RuntimeManager.configuration`\n- `RuntimeManager.add_config_file`\n- `RuntimeManager.services`\n- Сам метод `RuntimeManager.__init__`\n\nЭти зависимости указывают на то, что при инициализации `RuntimeManager` происходит конфигурирование и настройка различных сервисов и конфигураций.\n\n## Шаг 2: Детали внутренней логики\n\n### Слой информации: C0_SOURCE_CHUNKS\nРассмотрим подробнее метод `__init__`:\n```python\ndef __init__(self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None):\n```\n\nПри вызове конструктора создаются и заполняются следующие поля объекта `RuntimeManager`:\n- `configuration`: объект конфигурации, если передан, иначе создается экземпляр `ConfigurationManager`.\n- `services`: контейнер сервисов, если передан, иначе создается экземпляр `ServiceContainer`.\n- `traces`, `health`, `logs`, `workers`, `control_plane`: соответствующие сервисы, которые либо передаются извне, либо создаются внутри.\n\n## Шаг 3: Регистрация модулей и состояние жизненного цикла\n\nПосле создания экземпляра класса выполняется регистрация внутренних компонентов и управление состоянием жизненного цикла:\n```python\nself.registry = ModuleRegistry(self.services)\nself._started = False\nself._state = LifecycleState.IDLE\nself._core_registered = False\nself._workers_registered = False\nself._register_core_services()\n```\n\nЗдесь создаётся реестр модулей (`ModuleRegistry`), устанавливаются начальные значения для флагов состояния системы и вызывается внутренняя функция `_register_core_services()`.\n\n## Шаг 4: Поток данных и завершение\n\nПосле инициализации и настройки, объект `RuntimeManager` готов к дальнейшей работе, управляя регистрацией и активацией сервисов и компонентов.\n\n### Итоговый путь выполнения:\n1. Внешний контекст вызывает конструктор `RuntimeManager`.\n2. Производится настройка основных атрибутов и служб (`configuration`, `services`, `traces`, etc.).\n3. Запускается инициализация модуля реестра и контрольных состояний системы.\n\n### Заключение:\nПоток выполнения начинается с вызова конструктора `RuntimeManager`, продолжается настройкой базовых атрибутов и завершается начальной регистрацией системных модулей и установкой начальных состояний системы. \n\nНа текущий момент не обнаружено явных пробелов или недостающих данных в потоке выполнения.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-fullchain-trace-flow-runtime-manager", + "text": "Покажи поток выполнения RuntimeManager", + "mode": "full_chain", + "run_started_at": "2026-03-12T11:57:51", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Покажи поток выполнения RuntimeManager", + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ], + "confidence": 0.99 + }, + "rag_count": 23, + "rag_rows": [ + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager\nRuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "qname": "RuntimeManager", + "kind": "class", + "signature": "RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests manager\n- orchestrates role-like calls (4)\n- reads and writes state attributes\n- participates in dataflow slices (50)", + "layer": "C4_SEMANTIC_ROLES", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 43, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "symbol_name": "RuntimeManager", + "qname": "RuntimeManager", + "role": "pipeline_stage", + "confidence": 0.67, + "dataflow_participation": 50, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 52, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.services\n -> RuntimeManager.__init__", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 33, + "span_end": 39, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d43af85989222ee6d788ce418cdcb217c7ff044cfb915e3bdbd184417dc7bd61", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "dst_ref": "RuntimeManager.__init__", + "resolution": "resolved", + "slice_id": "d43af85989222ee6d788ce418cdcb217c7ff044cfb915e3bdbd184417dc7bd61", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.services", + "RuntimeManager.__init__" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 59, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1", + "dst_ref": "RuntimeManager.start", + "resolution": "resolved", + "slice_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.start" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager._register_core_services", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 127, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6", + "dst_ref": "RuntimeManager._register_core_services", + "resolution": "resolved", + "slice_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager._register_core_services" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.services\n -> RuntimeManager._register_core_services", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 33, + "span_end": 127, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "aac6f9dda73963b977083a892bee39a48eca4fbd7404787e022ecf4ebedec65d", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6", + "dst_ref": "RuntimeManager._register_core_services", + "resolution": "resolved", + "slice_id": "aac6f9dda73963b977083a892bee39a48eca4fbd7404787e022ecf4ebedec65d", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.services", + "RuntimeManager._register_core_services" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "## Шаг 1: Инициализация потока выполнения\n\n### Источник начала потока:\nПроцесс начинается с вызова конструктора класса `RuntimeManager` (`__init__`) из внешнего контекста.\n\n### Слой информации: C2_DEPENDENCY_GRAPH\nВызовы метода `RuntimeManager.__init__` зависят от следующих методов и атрибутов:\n- `RuntimeManager.configuration`\n- `RuntimeManager.add_config_file`\n- `RuntimeManager.services`\n- Сам метод `RuntimeManager.__init__`\n\nЭти зависимости указывают на то, что при инициализации `RuntimeManager` происходит конфигурирование и настройка различных сервисов и конфигураций.\n\n## Шаг 2: Детали внутренней логики\n\n### Слой информации: C0_SOURCE_CHUNKS\nРассмотрим подробнее метод `__init__`:\n```python\ndef __init__(self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None):\n```\n\nПри вызове конструктора создаются и заполняются следующие поля объекта `RuntimeManager`:\n- `configuration`: объект конфигурации, если передан, иначе создается экземпляр `ConfigurationManager`.\n- `services`: контейнер сервисов, если передан, иначе создается экземпляр `ServiceContainer`.\n- `traces`, `health`, `logs`, `workers`, `control_plane`: соответствующие сервисы, которые либо передаются извне, либо создаются внутри.\n\n## Шаг 3: Регистрация модулей и состояние жизненного цикла\n\nПосле создания экземпляра класса выполняется регистрация внутренних компонентов и управление состоянием жизненного цикла:\n```python\nself.registry = ModuleRegistry(self.services)\nself._started = False\nself._state = LifecycleState.IDLE\nself._core_registered = False\nself._workers_registered = False\nself._register_core_services()\n```\n\nЗдесь создаётся реестр модулей (`ModuleRegistry`), устанавливаются начальные значения для флагов состояния системы и вызывается внутренняя функция `_register_core_services()`.\n\n## Шаг 4: Поток данных и завершение\n\nПосле инициализации и настройки, объект `RuntimeManager` готов к дальнейшей работе, управляя регистрацией и активацией сервисов и компонентов.\n\n### Итоговый путь выполнения:\n1. Внешний контекст вызывает конструктор `RuntimeManager`.\n2. Производится настройка основных атрибутов и служб (`configuration`, `services`, `traces`, etc.).\n3. Запускается инициализация модуля реестра и контрольных состояний системы.\n\n### Заключение:\nПоток выполнения начинается с вызова конструктора `RuntimeManager`, продолжается настройкой базовых атрибутов и завершается начальной регистрацией системных модулей и установкой начальных состояний системы. \n\nНа текущий момент не обнаружено явных пробелов или недостающих данных в потоке выполнения.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "TRACE_FLOW", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS", + "C4_SEMANTIC_ROLES" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "TRACE_FLOW", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 10, + "C3_ENTRYPOINTS": 10 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Покажи поток выполнения RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "Покажи поток выполнения RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Покажи поток выполнения RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 10, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "Покажи поток выполнения RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 10, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 10, + "candidates_after_filter": 10 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 8, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 10, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 1, + "symbol_resolution": 0, + "retrieval_total": 160, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 53, + "C0_SOURCE_CHUNKS": 22, + "C4_SEMANTIC_ROLES": 17, + "C2_DEPENDENCY_GRAPH": 56, + "C3_ENTRYPOINTS": 9 + }, + "merge_rank": 20, + "prompt_build": 0, + "llm_call": 4403 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 766, + "evidence_rows": 23, + "evidence_chars": 8302 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 8, + "unique_paths": 7 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 10, + "unique_paths": 2 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_trace_flow_ru_v1", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "RuntimeManager" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 23, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-fullchain-trace-flow-runtime-manager", + "mode": "full_chain", + "run_started_at": "2026-03-12T11:57:51", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Покажи поток выполнения RuntimeManager", + "normalized_query": "Покажи поток выполнения RuntimeManager" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Покажи поток выполнения RuntimeManager" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Покажи поток выполнения RuntimeManager" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "TRACE_FLOW", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 1 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Покажи поток выполнения RuntimeManager" + }, + "output": { + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ], + "confidence": 0.99 + }, + "rag_count": 23, + "rag_rows": [ + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager\nRuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "qname": "RuntimeManager", + "kind": "class", + "signature": "RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests manager\n- orchestrates role-like calls (4)\n- reads and writes state attributes\n- participates in dataflow slices (50)", + "layer": "C4_SEMANTIC_ROLES", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 43, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "symbol_name": "RuntimeManager", + "qname": "RuntimeManager", + "role": "pipeline_stage", + "confidence": 0.67, + "dataflow_participation": 50, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 52, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.services\n -> RuntimeManager.__init__", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 33, + "span_end": 39, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d43af85989222ee6d788ce418cdcb217c7ff044cfb915e3bdbd184417dc7bd61", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "dst_ref": "RuntimeManager.__init__", + "resolution": "resolved", + "slice_id": "d43af85989222ee6d788ce418cdcb217c7ff044cfb915e3bdbd184417dc7bd61", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.services", + "RuntimeManager.__init__" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 59, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1", + "dst_ref": "RuntimeManager.start", + "resolution": "resolved", + "slice_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.start" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager._register_core_services", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 127, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6", + "dst_ref": "RuntimeManager._register_core_services", + "resolution": "resolved", + "slice_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager._register_core_services" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.services\n -> RuntimeManager._register_core_services", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 33, + "span_end": 127, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "aac6f9dda73963b977083a892bee39a48eca4fbd7404787e022ecf4ebedec65d", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6", + "dst_ref": "RuntimeManager._register_core_services", + "resolution": "resolved", + "slice_id": "aac6f9dda73963b977083a892bee39a48eca4fbd7404787e022ecf4ebedec65d", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.services", + "RuntimeManager._register_core_services" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 10, + "C3_ENTRYPOINTS": 10 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Покажи поток выполнения RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "Покажи поток выполнения RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Покажи поток выполнения RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 10, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "Покажи поток выполнения RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 10, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 10, + "candidates_after_filter": 10 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 8, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 10, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 160, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 53, + "C0_SOURCE_CHUNKS": 22, + "C4_SEMANTIC_ROLES": 17, + "C2_DEPENDENCY_GRAPH": 56, + "C3_ENTRYPOINTS": 9 + }, + "merge_rank": 20 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Покажи поток выполнения RuntimeManager", + "rag_count": 23 + }, + "output": { + "llm_answer": "## Шаг 1: Инициализация потока выполнения\n\n### Источник начала потока:\nПроцесс начинается с вызова конструктора класса `RuntimeManager` (`__init__`) из внешнего контекста.\n\n### Слой информации: C2_DEPENDENCY_GRAPH\nВызовы метода `RuntimeManager.__init__` зависят от следующих методов и атрибутов:\n- `RuntimeManager.configuration`\n- `RuntimeManager.add_config_file`\n- `RuntimeManager.services`\n- Сам метод `RuntimeManager.__init__`\n\nЭти зависимости указывают на то, что при инициализации `RuntimeManager` происходит конфигурирование и настройка различных сервисов и конфигураций.\n\n## Шаг 2: Детали внутренней логики\n\n### Слой информации: C0_SOURCE_CHUNKS\nРассмотрим подробнее метод `__init__`:\n```python\ndef __init__(self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None):\n```\n\nПри вызове конструктора создаются и заполняются следующие поля объекта `RuntimeManager`:\n- `configuration`: объект конфигурации, если передан, иначе создается экземпляр `ConfigurationManager`.\n- `services`: контейнер сервисов, если передан, иначе создается экземпляр `ServiceContainer`.\n- `traces`, `health`, `logs`, `workers`, `control_plane`: соответствующие сервисы, которые либо передаются извне, либо создаются внутри.\n\n## Шаг 3: Регистрация модулей и состояние жизненного цикла\n\nПосле создания экземпляра класса выполняется регистрация внутренних компонентов и управление состоянием жизненного цикла:\n```python\nself.registry = ModuleRegistry(self.services)\nself._started = False\nself._state = LifecycleState.IDLE\nself._core_registered = False\nself._workers_registered = False\nself._register_core_services()\n```\n\nЗдесь создаётся реестр модулей (`ModuleRegistry`), устанавливаются начальные значения для флагов состояния системы и вызывается внутренняя функция `_register_core_services()`.\n\n## Шаг 4: Поток данных и завершение\n\nПосле инициализации и настройки, объект `RuntimeManager` готов к дальнейшей работе, управляя регистрацией и активацией сервисов и компонентов.\n\n### Итоговый путь выполнения:\n1. Внешний контекст вызывает конструктор `RuntimeManager`.\n2. Производится настройка основных атрибутов и служб (`configuration`, `services`, `traces`, etc.).\n3. Запускается инициализация модуля реестра и контрольных состояний системы.\n\n### Заключение:\nПоток выполнения начинается с вызова конструктора `RuntimeManager`, продолжается настройкой базовых атрибутов и завершается начальной регистрацией системных модулей и установкой начальных состояний системы. \n\nНа текущий момент не обнаружено явных пробелов или недостающих данных в потоке выполнения." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 766, + "evidence_rows": 23, + "evidence_chars": 8302 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 8, + "unique_paths": 7 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 10, + "unique_paths": 2 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_trace_flow_ru_v1", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 4403 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_115751/full_chain_plba_code_subintents_plba-fullchain-trace-flow-runtime-manager.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_115751/full_chain_plba_code_subintents_plba-fullchain-trace-flow-runtime-manager.md new file mode 100644 index 0000000..0730837 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_115751/full_chain_plba_code_subintents_plba-fullchain-trace-flow-runtime-manager.md @@ -0,0 +1,34 @@ +# plba-fullchain-trace-flow-runtime-manager + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Покажи поток выполнения RuntimeManager + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "TRACE_FLOW", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 23, + "llm_answer": "## Шаг 1: Инициализация потока выполнения\n\n### Источник начала потока:\nПроцесс начинается с вызова конструктора класса `RuntimeManager` (`__init__`) из внешнего контекста.\n\n### Слой информации: C2_DEPENDENCY_GRAPH\nВызовы метода `RuntimeManager.__init__` зависят от следующих методов и атрибутов:\n- `RuntimeManager.configuration`\n- `RuntimeManager.add_config_file`\n- `RuntimeManager.services`\n- Сам метод `RuntimeManager.__init__`\n\nЭти зависимости указывают на то, что при инициализации `RuntimeManager` происходит конфигурирование и настройка различных сервисов и конфигураций.\n\n## Шаг 2: Детали внутренней логики\n\n### Слой информации: C0_SOURCE_CHUNKS\nРассмотрим подробнее метод `__init__`:\n```python\ndef __init__(self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None):\n```\n\nПри вызове конструктора создаются и заполняются следующие поля объекта `RuntimeManager`:\n- `configuration`: объект конфигурации, если передан, иначе создается экземпляр `ConfigurationManager`.\n- `services`: контейнер сервисов, если передан, иначе создается экземпляр `ServiceContainer`.\n- `traces`, `health`, `logs`, `workers`, `control_plane`: соответствующие сервисы, которые либо передаются извне, либо создаются внутри.\n\n## Шаг 3: Регистрация модулей и состояние жизненного цикла\n\nПосле создания экземпляра класса выполняется регистрация внутренних компонентов и управление состоянием жизненного цикла:\n```python\nself.registry = ModuleRegistry(self.services)\nself._started = False\nself._state = LifecycleState.IDLE\nself._core_registered = False\nself._workers_registered = False\nself._register_core_services()\n```\n\nЗдесь создаётся реестр модулей (`ModuleRegistry`), устанавливаются начальные значения для флагов состояния системы и вызывается внутренняя функция `_register_core_services()`.\n\n## Шаг 4: Поток данных и завершение\n\nПосле инициализации и настройки, объект `RuntimeManager` готов к дальнейшей работе, управляя регистрацией и активацией сервисов и компонентов.\n\n### Итоговый путь выполнения:\n1. Внешний контекст вызывает конструктор `RuntimeManager`.\n2. Производится настройка основных атрибутов и служб (`configuration`, `services`, `traces`, etc.).\n3. Запускается инициализация модуля реестра и контрольных состояний системы.\n\n### Заключение:\nПоток выполнения начинается с вызова конструктора `RuntimeManager`, продолжается настройкой базовых атрибутов и завершается начальной регистрацией системных модулей и установкой начальных состояний системы. \n\nНа текущий момент не обнаружено явных пробелов или недостающих данных в потоке выполнения.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_115751/summary.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_115751/summary.md new file mode 100644 index 0000000..abfa34f --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_115751/summary.md @@ -0,0 +1,26 @@ +# pipeline_setup_v2 summary + +Passed: 7/7 + + +| File | Case | Query | Expected sub-intent | Intent | Actual sub-intent | RAG layers | Pass | +| ------------------------------------ | -------------------------------------------- | -------------------------------------------------------------------------------- | ------------------- | ------- | ----------------- | ------------------------------------------------------------------------------------------------------ | ---- | +| full_chain_plba_code_subintents.yaml | plba-fullchain-open-file-runtime | Открой файл src/app_runtime/core/runtime.py | OPEN_FILE | CODE_QA | OPEN_FILE | C0_SOURCE_CHUNKS:1 | ✓ | +| full_chain_plba_code_subintents.yaml | plba-fullchain-explain-runtime-manager | Объясни как работает класс RuntimeManager | EXPLAIN | CODE_QA | EXPLAIN | C0_SOURCE_CHUNKS:1, C1_SYMBOL_CATALOG:1, C2_DEPENDENCY_GRAPH:6, C3_ENTRYPOINTS:3, C4_SEMANTIC_ROLES:1 | ✓ | +| full_chain_plba_code_subintents.yaml | plba-fullchain-find-tests-runtime-manager | Где тесты для RuntimeManager? | FIND_TESTS | CODE_QA | FIND_TESTS | C0_SOURCE_CHUNKS:10, C2_DEPENDENCY_GRAPH:6 | ✓ | +| full_chain_plba_code_subintents.yaml | plba-fullchain-find-entrypoints | Найди точки входа в коде | FIND_ENTRYPOINTS | CODE_QA | FIND_ENTRYPOINTS | C0_SOURCE_CHUNKS:6, C3_ENTRYPOINTS:3 | ✓ | +| full_chain_plba_code_subintents.yaml | plba-fullchain-trace-flow-runtime-manager | Покажи поток выполнения RuntimeManager | TRACE_FLOW | CODE_QA | TRACE_FLOW | C0_SOURCE_CHUNKS:1, C1_SYMBOL_CATALOG:1, C2_DEPENDENCY_GRAPH:10, C3_ENTRYPOINTS:3, C4_SEMANTIC_ROLES:8 | ✓ | +| full_chain_plba_code_subintents.yaml | plba-fullchain-architecture-control-plane | Какие компоненты участвуют в RuntimeManager? | ARCHITECTURE | CODE_QA | ARCHITECTURE | C0_SOURCE_CHUNKS:1, C1_SYMBOL_CATALOG:1, C2_DEPENDENCY_GRAPH:8, C3_ENTRYPOINTS:3, C4_SEMANTIC_ROLES:12 | ✓ | +| full_chain_plba_code_subintents.yaml | plba-fullchain-explain-local-runtime-manager | Почему в файле src/app_runtime/core/runtime.py класс RuntimeManager устроен так? | EXPLAIN_LOCAL | CODE_QA | EXPLAIN_LOCAL | C0_SOURCE_CHUNKS:1, C1_SYMBOL_CATALOG:1, C2_DEPENDENCY_GRAPH:4 | ✓ | + + +## LLM Answers + +- **plba-fullchain-open-file-runtime**: Файл `src/app_runtime/core/runtime.py` содержит определение класса `RuntimeManager`, управляющего основными компонентами приложения во время его выполнения. ## Важные сущности и их значение: - `**ConfigurationManager`, `ServiceContainer`, `TraceService`, `HealthRegistry`, `LogManager`, `WorkerSupervisor`, `ControlPlaneService`:** Эти классы представляют компоненты инфраструктуры, необходимые для работы приложения (конфигурация, сервисы, трассировка, здоровье системы, ведение логов, управление рабочими процессами и контрольная плоскость). - `**ModuleRegistry`:** Используется для регистрации модулей приложений, позволяя управлять ими централизованно. - **Параметры инициализации (`configuration`, `services`, `traces`, etc.):** Позволяют настраивать поведение экземпляра `RuntimeManager`. - **Методы класса:** - `_register_core_services()`: регистрирует основные службы, ис… +- **plba-fullchain-explain-runtime-manager**: ## Назначение класса `RuntimeManager` Класс `RuntimeManager` играет роль менеджера выполнения системы и отвечает за координацию различных компонентов приложения во время его работы. Он управляет жизненным циклом, состоянием и регистрацией сервисов и модулей, обеспечивая их корректное взаимодействие. ## Ключевые зависимости Ключевые компоненты и зависимости для правильной работы класса включают: - `ConfigurationManager`: настройка конфигурации приложения; - `ServiceContainer`: контейнер хранения всех доступных сервисов; - `TraceService`: сервис отслеживания трассировок событий; - `HealthRegistry`: регистрация текущего состояния здоровья системы; - `LogManager`: управление логированием событий; - `WorkerSupervisor`: супервизор рабочих процессов; - `ControlPlaneService`: основной сервис управления приложением. Все эти зависимости передаются конструктору класса при иници… +- **plba-fullchain-find-tests-runtime-manager**: Прямые тесты для `RuntimeManager` обнаружены в следующих местах: 1. **tests/test_runtime.py**: - `test_runtime_graceful_stop_waits_until_worker_finishes`: Проверяет корректность остановки (`stop`) объекта `RuntimeManager`, ожидая завершения работы модуля. ✅ Близость проверки высокая — непосредственно проверяет поведение при вызове метода `stop`. - `test_runtime_runs_worker_routine_and_exposes_status`: Тестирует регистрацию модуля и запуск его рутины с последующим получением статуса. ✅ Близость проверки высокая — проверяет выполнение регистраций модулей и получение их статусов через `RuntimeManager`. 2. **tests/test_business_control_actions.py**: - `_build_runtime`: Тест косвенный, так как здесь создаётся объект `RuntimeManager`, но сам метод не проверяет логику поведения объекта напрямую. ❌ Косвенная проверка. - `test_worker_wakes_up_with_configured_interval`: Аналог… +- **plba-fullchain-find-entrypoints**: ## Финальный ответ: На основании предоставленного контекста и анализа слоев RAG можно выделить следующие **точки входа** и ключевые обработчики запуска в приложении: ### 1. `app.post` **Файл:** `src/app_runtime/control/http_app.py` **Сущность:** Метод класса FastAPI (`app`) **Роль:** Обрабатывает HTTP POST-запросы. Это основной маршрут для приёма данных от пользователей и их дальнейшей обработки внутри приложения. ### 2. `app.get` **Файл:** `src/app_runtime/control/http_app.py` **Сущность:** Метод класса FastAPI (`app`) **Роль:** Обрабатывает HTTP GET-запросы. Используется для получения информации из системы (например, статус задач, результаты вычислений). ### Наиболее вероятные точки входа (по контексту): - src/app_runtime/control/http_app.py: - Обработка запросов через методы `app.post` и `app.get`. ### Дополнительные наблюдения по контексту: - В файле `src/app_run… +- **plba-fullchain-trace-flow-runtime-manager**: ## Шаг 1: Инициализация потока выполнения ### Источник начала потока: Процесс начинается с вызова конструктора класса `RuntimeManager` (`__init_`_) из внешнего контекста. ### Слой информации: C2_DEPENDENCY_GRAPH Вызовы метода `RuntimeManager.__init_`_ зависят от следующих методов и атрибутов: - `RuntimeManager.configuration` - `RuntimeManager.add_config_file` - `RuntimeManager.services` - Сам метод `RuntimeManager.__init__` Эти зависимости указывают на то, что при инициализации `RuntimeManager` происходит конфигурирование и настройка различных сервисов и конфигураций. ## Шаг 2: Детали внутренней логики ### Слой информации: C0_SOURCE_CHUNKS Рассмотрим подробнее метод `__init_`_: ```python def **init**(self, configuration: ConfigurationManager | None = None, services: ServiceContainer | None = None, traces: TraceService | None = None, health: HealthRegistry | None = No… +- **plba-fullchain-architecture-control-plane**: ## Архитектурное объяснение RuntimeManager ### Основные компоненты и их роли 1. **RuntimeManager** - Роль: pipeline_stage - Описание: Менеджер выполнения этапов пайплайна. Оркеструет вызовы ролей, управляет состоянием приложения и участвует в потоках данных. - Ответственность: инициализация конфигурации, запуск процессов, чтение и запись состояния атрибутов. 2. **ControlActionSet** - Роль: model - Описание: Модель управления действиями. Выполняет стандартные действия модели. - Ответственность: обработка стандартных операций и моделей поведения системы. ### Связи и взаимодействия компонентов 1. **Связь с внешним API через FastAPI** - Интерфейс взаимодействия с пользователем через HTTP-запросы. - Пример: `app.post` из `src/app_runtime/control/http_app.py`. 2. **Управление данными и состояниями внутри пайплайна** - Данные передаются и обрабатываются между компонентами п… +- **plba-fullchain-explain-local-runtime-manager**: Класс `RuntimeManager` из файла `src/app_runtime/core/runtime.py` предназначен для управления жизненным циклом приложения во время его выполнения (runtime). ### Что делает класс? Этот класс служит центральной точкой координации различных компонентов системы. Он инициализирует основные службы и модули приложения, такие как конфигурация (`configuration`), сервисы (`services`), трассировка ошибок (`traces`), мониторинг здоровья (`health`), ведение логов (`logs`) и управление рабочими процессами (`workers`). Также `RuntimeManager` обеспечивает контроль над состоянием жизненного цикла приложения через переменные `_state`, которые могут принимать значения `IDLE`, `STARTED`, и другие состояния. Класс предоставляет методы регистрации модулей и служб, а также контроля их активности. ### Какие входные параметры принимает конструктор класса? Конструктор принимает несколько необ… + diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_120252/full_chain_plba_code_subintents_plba-fullchain-architecture-control-plane.json b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_120252/full_chain_plba_code_subintents_plba-fullchain-architecture-control-plane.json new file mode 100644 index 0000000..f8c5a74 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_120252/full_chain_plba_code_subintents_plba-fullchain-architecture-control-plane.json @@ -0,0 +1,3036 @@ +{ + "case_id": "plba-fullchain-architecture-control-plane", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "ARCHITECTURE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 25, + "llm_answer": "## Архитектурное объяснение подсистемы RuntimeManager\n\n### Основные компоненты и их роли\n\n1. **RuntimeManager**\n - Роль: Pipeline stage (этап конвейера).\n - Описание: Менеджер, отвечающий за оркестровку и координацию ролей-подсистем, участвующих в выполнении бизнес-требований. Читает и записывает состояние атрибутов системы, участвует в потоках данных.\n\n2. **ControlActionSet**\n - Роль: Модель поведения системы.\n - Описание: Базовый класс для определения действий управления системой, реализует модель по умолчанию.\n\n### Связи и границы ответственности\n\n- **RuntimeManager** взаимодействует с **ControlActionSet**, инициируя выполнение заданных моделей поведения через зависимости и вызовы методов модели.\n- Контейнер Dependency Injection (DI) обеспечивает внедрение зависимостей объектов из внешних систем или сервисов.\n- Потоки данных разделены на участки (slices), что позволяет разделить ответственность компонентов и улучшить масштабируемость и модульность системы.\n\n### Ключевые выводы по архитектуре\n\n1. **Конвейерный подход**: Система организована вокруг понятий pipeline stages, где каждый менеджер отвечает за конкретный этап выполнения задач.\n \n2. **Модульная структура**: Использование Dependency Injection и четкое разделение ответственности позволяет легко заменять и расширять отдельные модули без изменения общей архитектуры.\n\n3. **Управление состоянием**: RuntimeManager активно управляет состоянием системы, читая и записывая необходимые атрибуты, обеспечивая целостность и согласованность данных.\n\n4. **Масштабируемость**: Разделение потоков данных на slices улучшает производительность и облегчает параллельное выполнение задач.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-fullchain-architecture-control-plane", + "text": "Какие компоненты участвуют в RuntimeManager?", + "mode": "full_chain", + "run_started_at": "2026-03-12T12:02:52", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Какие компоненты участвуют в RuntimeManager?", + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ], + "confidence": 0.99 + }, + "rag_count": 25, + "rag_rows": [ + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests manager\n- orchestrates role-like calls (4)\n- reads and writes state attributes\n- participates in dataflow slices (50)", + "layer": "C4_SEMANTIC_ROLES", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 43, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "symbol_name": "RuntimeManager", + "qname": "RuntimeManager", + "role": "pipeline_stage", + "confidence": 0.67, + "dataflow_participation": 50, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/queue/in_memory.py", + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)", + "layer": "C4_SEMANTIC_ROLES", + "title": "InMemoryTaskQueue", + "span_start": 9, + "span_end": 38, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 22, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "2da04cb94544a3bcbf0943a95ad4bdd8710bcafaa32a02fd0e4de2178dcf3533", + "symbol_name": "InMemoryTaskQueue", + "qname": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 9, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "58f0cc001ccda0eee4c6bc32ed83bd05eafd6b6644f1e8b4aa9eed3103db73dc", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "ConfigFileLoader\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (8)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ConfigFileLoader", + "span_start": 11, + "span_end": 48, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 23, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "a8474eca8b6e9dc86ae67ed68b16fa5fb639ef08739c053e7b7195489765667f", + "symbol_name": "ConfigFileLoader", + "qname": "ConfigFileLoader", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 8, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/store.py", + "content": "TraceContextStore\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "TraceContextStore", + "span_start": 15, + "span_end": 52, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b2dad4fbe16ffb11b58deba311c7739955c39d59f291b22181f33e9c8cce4059", + "symbol_name": "TraceContextStore", + "qname": "TraceContextStore", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "d369554f08fc92039c6edd5a2a1e73b23901533e8974459170bbd9347d263dc5", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workers/supervisor.py", + "content": "WorkerSupervisor\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkerSupervisor", + "span_start": 10, + "span_end": 59, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "c17b44e8d9e97d490989b21fa67d7c346cdda8a0472e4c41fb243c8846faa124", + "symbol_name": "WorkerSupervisor", + "qname": "WorkerSupervisor", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "77609d9d5927171cce7fc3a54897c183fd63068710c6362029b700937aae5eee", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 59, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1", + "dst_ref": "RuntimeManager.start", + "resolution": "resolved", + "slice_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.start" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 52, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager._register_core_services", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 127, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6", + "dst_ref": "RuntimeManager._register_core_services", + "resolution": "resolved", + "slice_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager._register_core_services" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager\nRuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "qname": "RuntimeManager", + "kind": "class", + "signature": "RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "## Архитектурное объяснение подсистемы RuntimeManager\n\n### Основные компоненты и их роли\n\n1. **RuntimeManager**\n - Роль: Pipeline stage (этап конвейера).\n - Описание: Менеджер, отвечающий за оркестровку и координацию ролей-подсистем, участвующих в выполнении бизнес-требований. Читает и записывает состояние атрибутов системы, участвует в потоках данных.\n\n2. **ControlActionSet**\n - Роль: Модель поведения системы.\n - Описание: Базовый класс для определения действий управления системой, реализует модель по умолчанию.\n\n### Связи и границы ответственности\n\n- **RuntimeManager** взаимодействует с **ControlActionSet**, инициируя выполнение заданных моделей поведения через зависимости и вызовы методов модели.\n- Контейнер Dependency Injection (DI) обеспечивает внедрение зависимостей объектов из внешних систем или сервисов.\n- Потоки данных разделены на участки (slices), что позволяет разделить ответственность компонентов и улучшить масштабируемость и модульность системы.\n\n### Ключевые выводы по архитектуре\n\n1. **Конвейерный подход**: Система организована вокруг понятий pipeline stages, где каждый менеджер отвечает за конкретный этап выполнения задач.\n \n2. **Модульная структура**: Использование Dependency Injection и четкое разделение ответственности позволяет легко заменять и расширять отдельные модули без изменения общей архитектуры.\n\n3. **Управление состоянием**: RuntimeManager активно управляет состоянием системы, читая и записывая необходимые атрибуты, обеспечивая целостность и согласованность данных.\n\n4. **Масштабируемость**: Разделение потоков данных на slices улучшает производительность и облегчает параллельное выполнение задач.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "ARCHITECTURE", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS", + "C4_SEMANTIC_ROLES" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "ARCHITECTURE", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C4_SEMANTIC_ROLES": 12, + "C3_ENTRYPOINTS": 8, + "C2_DEPENDENCY_GRAPH": 8, + "C1_SYMBOL_CATALOG": 6, + "C0_SOURCE_CHUNKS": 4 + }, + "filters_by_layer": { + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C4_SEMANTIC_ROLES", + "query": "Какие компоненты участвуют в RuntimeManager?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 12, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "Какие компоненты участвуют в RuntimeManager?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Какие компоненты участвуют в RuntimeManager?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C1_SYMBOL_CATALOG", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Какие компоненты участвуют в RuntimeManager?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 4, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 12, + "candidates_after_filter": 12 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 4, + "candidates_after_filter": 4 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ] + }, + "layers": [ + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 12, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 8, + "fail_reason": null + }, + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 153, + "retrieval_by_layer": { + "C4_SEMANTIC_ROLES": 33, + "C3_ENTRYPOINTS": 17, + "C2_DEPENDENCY_GRAPH": 60, + "C1_SYMBOL_CATALOG": 26, + "C0_SOURCE_CHUNKS": 15 + }, + "merge_rank": 21, + "prompt_build": 0, + "llm_call": 2396 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 480, + "evidence_rows": 25, + "evidence_chars": 8651 + }, + "evidence_summary": [ + { + "layer": "C4_SEMANTIC_ROLES", + "count": 12, + "unique_paths": 11 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 8, + "unique_paths": 2 + }, + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_architecture_ru_v1", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "RuntimeManager" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 25, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-fullchain-architecture-control-plane", + "mode": "full_chain", + "run_started_at": "2026-03-12T12:02:52", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Какие компоненты участвуют в RuntimeManager?", + "normalized_query": "Какие компоненты участвуют в RuntimeManager?" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Какие компоненты участвуют в RuntimeManager?" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Какие компоненты участвуют в RuntimeManager?" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "ARCHITECTURE", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Какие компоненты участвуют в RuntimeManager?" + }, + "output": { + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ], + "confidence": 0.99 + }, + "rag_count": 25, + "rag_rows": [ + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests manager\n- orchestrates role-like calls (4)\n- reads and writes state attributes\n- participates in dataflow slices (50)", + "layer": "C4_SEMANTIC_ROLES", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 43, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "symbol_name": "RuntimeManager", + "qname": "RuntimeManager", + "role": "pipeline_stage", + "confidence": 0.67, + "dataflow_participation": 50, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/queue/in_memory.py", + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)", + "layer": "C4_SEMANTIC_ROLES", + "title": "InMemoryTaskQueue", + "span_start": 9, + "span_end": 38, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 22, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "2da04cb94544a3bcbf0943a95ad4bdd8710bcafaa32a02fd0e4de2178dcf3533", + "symbol_name": "InMemoryTaskQueue", + "qname": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 9, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "58f0cc001ccda0eee4c6bc32ed83bd05eafd6b6644f1e8b4aa9eed3103db73dc", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "ConfigFileLoader\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (8)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ConfigFileLoader", + "span_start": 11, + "span_end": 48, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 23, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "a8474eca8b6e9dc86ae67ed68b16fa5fb639ef08739c053e7b7195489765667f", + "symbol_name": "ConfigFileLoader", + "qname": "ConfigFileLoader", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 8, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/store.py", + "content": "TraceContextStore\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "TraceContextStore", + "span_start": 15, + "span_end": 52, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b2dad4fbe16ffb11b58deba311c7739955c39d59f291b22181f33e9c8cce4059", + "symbol_name": "TraceContextStore", + "qname": "TraceContextStore", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "d369554f08fc92039c6edd5a2a1e73b23901533e8974459170bbd9347d263dc5", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workers/supervisor.py", + "content": "WorkerSupervisor\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkerSupervisor", + "span_start": 10, + "span_end": 59, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "c17b44e8d9e97d490989b21fa67d7c346cdda8a0472e4c41fb243c8846faa124", + "symbol_name": "WorkerSupervisor", + "qname": "WorkerSupervisor", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "77609d9d5927171cce7fc3a54897c183fd63068710c6362029b700937aae5eee", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 59, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1", + "dst_ref": "RuntimeManager.start", + "resolution": "resolved", + "slice_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.start" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 52, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager._register_core_services", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 127, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6", + "dst_ref": "RuntimeManager._register_core_services", + "resolution": "resolved", + "slice_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager._register_core_services" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager\nRuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "qname": "RuntimeManager", + "kind": "class", + "signature": "RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C4_SEMANTIC_ROLES": 12, + "C3_ENTRYPOINTS": 8, + "C2_DEPENDENCY_GRAPH": 8, + "C1_SYMBOL_CATALOG": 6, + "C0_SOURCE_CHUNKS": 4 + }, + "filters_by_layer": { + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C4_SEMANTIC_ROLES", + "query": "Какие компоненты участвуют в RuntimeManager?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 12, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "Какие компоненты участвуют в RuntimeManager?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Какие компоненты участвуют в RuntimeManager?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C1_SYMBOL_CATALOG", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Какие компоненты участвуют в RuntimeManager?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 4, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 12, + "candidates_after_filter": 12 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 4, + "candidates_after_filter": 4 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ] + }, + "layers": [ + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 12, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 8, + "fail_reason": null + }, + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 153, + "retrieval_by_layer": { + "C4_SEMANTIC_ROLES": 33, + "C3_ENTRYPOINTS": 17, + "C2_DEPENDENCY_GRAPH": 60, + "C1_SYMBOL_CATALOG": 26, + "C0_SOURCE_CHUNKS": 15 + }, + "merge_rank": 21 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Какие компоненты участвуют в RuntimeManager?", + "rag_count": 25 + }, + "output": { + "llm_answer": "## Архитектурное объяснение подсистемы RuntimeManager\n\n### Основные компоненты и их роли\n\n1. **RuntimeManager**\n - Роль: Pipeline stage (этап конвейера).\n - Описание: Менеджер, отвечающий за оркестровку и координацию ролей-подсистем, участвующих в выполнении бизнес-требований. Читает и записывает состояние атрибутов системы, участвует в потоках данных.\n\n2. **ControlActionSet**\n - Роль: Модель поведения системы.\n - Описание: Базовый класс для определения действий управления системой, реализует модель по умолчанию.\n\n### Связи и границы ответственности\n\n- **RuntimeManager** взаимодействует с **ControlActionSet**, инициируя выполнение заданных моделей поведения через зависимости и вызовы методов модели.\n- Контейнер Dependency Injection (DI) обеспечивает внедрение зависимостей объектов из внешних систем или сервисов.\n- Потоки данных разделены на участки (slices), что позволяет разделить ответственность компонентов и улучшить масштабируемость и модульность системы.\n\n### Ключевые выводы по архитектуре\n\n1. **Конвейерный подход**: Система организована вокруг понятий pipeline stages, где каждый менеджер отвечает за конкретный этап выполнения задач.\n \n2. **Модульная структура**: Использование Dependency Injection и четкое разделение ответственности позволяет легко заменять и расширять отдельные модули без изменения общей архитектуры.\n\n3. **Управление состоянием**: RuntimeManager активно управляет состоянием системы, читая и записывая необходимые атрибуты, обеспечивая целостность и согласованность данных.\n\n4. **Масштабируемость**: Разделение потоков данных на slices улучшает производительность и облегчает параллельное выполнение задач." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 480, + "evidence_rows": 25, + "evidence_chars": 8651 + }, + "evidence_summary": [ + { + "layer": "C4_SEMANTIC_ROLES", + "count": 12, + "unique_paths": 11 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 8, + "unique_paths": 2 + }, + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_architecture_ru_v1", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 2396 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_120252/full_chain_plba_code_subintents_plba-fullchain-architecture-control-plane.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_120252/full_chain_plba_code_subintents_plba-fullchain-architecture-control-plane.md new file mode 100644 index 0000000..92f62c8 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_120252/full_chain_plba_code_subintents_plba-fullchain-architecture-control-plane.md @@ -0,0 +1,34 @@ +# plba-fullchain-architecture-control-plane + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Какие компоненты участвуют в RuntimeManager? + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "ARCHITECTURE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 25, + "llm_answer": "## Архитектурное объяснение подсистемы RuntimeManager\n\n### Основные компоненты и их роли\n\n1. **RuntimeManager**\n - Роль: Pipeline stage (этап конвейера).\n - Описание: Менеджер, отвечающий за оркестровку и координацию ролей-подсистем, участвующих в выполнении бизнес-требований. Читает и записывает состояние атрибутов системы, участвует в потоках данных.\n\n2. **ControlActionSet**\n - Роль: Модель поведения системы.\n - Описание: Базовый класс для определения действий управления системой, реализует модель по умолчанию.\n\n### Связи и границы ответственности\n\n- **RuntimeManager** взаимодействует с **ControlActionSet**, инициируя выполнение заданных моделей поведения через зависимости и вызовы методов модели.\n- Контейнер Dependency Injection (DI) обеспечивает внедрение зависимостей объектов из внешних систем или сервисов.\n- Потоки данных разделены на участки (slices), что позволяет разделить ответственность компонентов и улучшить масштабируемость и модульность системы.\n\n### Ключевые выводы по архитектуре\n\n1. **Конвейерный подход**: Система организована вокруг понятий pipeline stages, где каждый менеджер отвечает за конкретный этап выполнения задач.\n \n2. **Модульная структура**: Использование Dependency Injection и четкое разделение ответственности позволяет легко заменять и расширять отдельные модули без изменения общей архитектуры.\n\n3. **Управление состоянием**: RuntimeManager активно управляет состоянием системы, читая и записывая необходимые атрибуты, обеспечивая целостность и согласованность данных.\n\n4. **Масштабируемость**: Разделение потоков данных на slices улучшает производительность и облегчает параллельное выполнение задач.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_120252/full_chain_plba_code_subintents_plba-fullchain-explain-local-runtime-manager.json b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_120252/full_chain_plba_code_subintents_plba-fullchain-explain-local-runtime-manager.json new file mode 100644 index 0000000..6cbf580 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_120252/full_chain_plba_code_subintents_plba-fullchain-explain-local-runtime-manager.json @@ -0,0 +1,1333 @@ +{ + "case_id": "plba-fullchain-explain-local-runtime-manager", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN_LOCAL", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 6, + "llm_answer": "Класс `RuntimeManager` в файле `src/app_runtime/core/runtime.py` играет роль центрального координатора для инициализации и управления ресурсами приложения во время его выполнения.\n\n### Что делает класс:\n- При создании экземпляра класса (через метод `__init__`) происходит начальная настройка всех необходимых сервисов и компонентов через передачу параметров конфигурации (`configuration`), контейнер сервисов (`services`), сервис трассировки (`traces`), реестр здоровья (`health`), менеджер логирования (`logs`), супервизор рабочих процессов (`workers`) и служба контроля плоскости (`control_plane`).\n \n- В методе `__init__` все переданные параметры либо используются напрямую, либо заменяются дефолтными значениями при их отсутствии. Это позволяет гибко настраивать работу приложения даже без полного набора аргументов.\n\n- Важным аспектом является регистрация модулей (`self.registry = ModuleRegistry(self.services)`), которая позволяет отслеживать и управлять загруженными модулями приложения.\n\n### Входные данные:\n- Параметры настройки конфигурации и сервисов.\n\n### Выходные данные:\n- Настроенный объект `RuntimeManager`, готовый к работе с основными компонентами приложения.\n\n### Связь с окружением:\n- Метод `start()` вызывается после инициализации для начала работы основных сервисов и механизмов мониторинга состояния.\n- Класс взаимодействует с другими компонентами системы через свои атрибуты и методы регистрации, обеспечивая целостность и корректность работы всего runtime-среды приложения.", + "answer_mode": "answered", + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C2_DEPENDENCY_GRAPH" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-fullchain-explain-local-runtime-manager", + "text": "Почему в файле src/app_runtime/core/runtime.py класс RuntimeManager устроен так?", + "mode": "full_chain", + "run_started_at": "2026-03-12T12:02:52", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Почему в файле src/app_runtime/core/runtime.py класс RuntimeManager устроен так?", + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ], + "confidence": 0.99 + }, + "rag_count": 6, + "rag_rows": [ + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager\nRuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "qname": "RuntimeManager", + "kind": "class", + "signature": "RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 59, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1", + "dst_ref": "RuntimeManager.start", + "resolution": "resolved", + "slice_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.start" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager._register_core_services", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 127, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6", + "dst_ref": "RuntimeManager._register_core_services", + "resolution": "resolved", + "slice_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager._register_core_services" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 52, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.services\n -> RuntimeManager.__init__", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 33, + "span_end": 39, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d43af85989222ee6d788ce418cdcb217c7ff044cfb915e3bdbd184417dc7bd61", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "dst_ref": "RuntimeManager.__init__", + "resolution": "resolved", + "slice_id": "d43af85989222ee6d788ce418cdcb217c7ff044cfb915e3bdbd184417dc7bd61", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.services", + "RuntimeManager.__init__" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "Класс `RuntimeManager` в файле `src/app_runtime/core/runtime.py` играет роль центрального координатора для инициализации и управления ресурсами приложения во время его выполнения.\n\n### Что делает класс:\n- При создании экземпляра класса (через метод `__init__`) происходит начальная настройка всех необходимых сервисов и компонентов через передачу параметров конфигурации (`configuration`), контейнер сервисов (`services`), сервис трассировки (`traces`), реестр здоровья (`health`), менеджер логирования (`logs`), супервизор рабочих процессов (`workers`) и служба контроля плоскости (`control_plane`).\n \n- В методе `__init__` все переданные параметры либо используются напрямую, либо заменяются дефолтными значениями при их отсутствии. Это позволяет гибко настраивать работу приложения даже без полного набора аргументов.\n\n- Важным аспектом является регистрация модулей (`self.registry = ModuleRegistry(self.services)`), которая позволяет отслеживать и управлять загруженными модулями приложения.\n\n### Входные данные:\n- Параметры настройки конфигурации и сервисов.\n\n### Выходные данные:\n- Настроенный объект `RuntimeManager`, готовый к работе с основными компонентами приложения.\n\n### Связь с окружением:\n- Метод `start()` вызывается после инициализации для начала работы основных сервисов и механизмов мониторинга состояния.\n- Класс взаимодействует с другими компонентами системы через свои атрибуты и методы регистрации, обеспечивая целостность и корректность работы всего runtime-среды приложения.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN_LOCAL", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN_LOCAL", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C2_DEPENDENCY_GRAPH" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "RuntimeManager" + ], + "keyword_hints": [ + "src/app_runtime/core/runtime.py", + "RuntimeManager" + ], + "path_hints": [ + "src/app_runtime/core/runtime.py" + ], + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C2_DEPENDENCY_GRAPH" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 12, + "C2_DEPENDENCY_GRAPH": 4 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "RuntimeManager", + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Почему в файле src/app_runtime/core/runtime.py класс RuntimeManager устроен так?", + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 12, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Почему в файле src/app_runtime/core/runtime.py класс RuntimeManager устроен так?", + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 4, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 4, + "candidates_after_filter": 4 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 4, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 70, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 27, + "C0_SOURCE_CHUNKS": 19, + "C2_DEPENDENCY_GRAPH": 23 + }, + "merge_rank": 20, + "prompt_build": 0, + "llm_call": 2177 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 784, + "evidence_rows": 6, + "evidence_chars": 6650 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 4, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_explain_local_ru_v1", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "src/app_runtime/core/runtime.py", + "RuntimeManager" + ], + "path_scope": [ + "src/app_runtime/core/runtime.py" + ] + }, + "llm": { + "used_evidence_count": 6, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-fullchain-explain-local-runtime-manager", + "mode": "full_chain", + "run_started_at": "2026-03-12T12:02:52", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Почему в файле src/app_runtime/core/runtime.py класс RuntimeManager устроен так?", + "normalized_query": "Почему в файле src/app_runtime/core/runtime.py класс RuntimeManager устроен так?" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Почему в файле src/app_runtime/core/runtime.py класс RuntimeManager устроен так?" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Почему в файле src/app_runtime/core/runtime.py класс RuntimeManager устроен так?" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN_LOCAL", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C2_DEPENDENCY_GRAPH" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "RuntimeManager" + ], + "keyword_hints": [ + "src/app_runtime/core/runtime.py", + "RuntimeManager" + ], + "path_hints": [ + "src/app_runtime/core/runtime.py" + ], + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Почему в файле src/app_runtime/core/runtime.py класс RuntimeManager устроен так?" + }, + "output": { + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ], + "confidence": 0.99 + }, + "rag_count": 6, + "rag_rows": [ + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager\nRuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "qname": "RuntimeManager", + "kind": "class", + "signature": "RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 59, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1", + "dst_ref": "RuntimeManager.start", + "resolution": "resolved", + "slice_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.start" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager._register_core_services", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 127, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6", + "dst_ref": "RuntimeManager._register_core_services", + "resolution": "resolved", + "slice_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager._register_core_services" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 52, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.services\n -> RuntimeManager.__init__", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 33, + "span_end": 39, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d43af85989222ee6d788ce418cdcb217c7ff044cfb915e3bdbd184417dc7bd61", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "dst_ref": "RuntimeManager.__init__", + "resolution": "resolved", + "slice_id": "d43af85989222ee6d788ce418cdcb217c7ff044cfb915e3bdbd184417dc7bd61", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.services", + "RuntimeManager.__init__" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C2_DEPENDENCY_GRAPH" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 12, + "C2_DEPENDENCY_GRAPH": 4 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "RuntimeManager", + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Почему в файле src/app_runtime/core/runtime.py класс RuntimeManager устроен так?", + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 12, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Почему в файле src/app_runtime/core/runtime.py класс RuntimeManager устроен так?", + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 4, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 4, + "candidates_after_filter": 4 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 4, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 70, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 27, + "C0_SOURCE_CHUNKS": 19, + "C2_DEPENDENCY_GRAPH": 23 + }, + "merge_rank": 20 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Почему в файле src/app_runtime/core/runtime.py класс RuntimeManager устроен так?", + "rag_count": 6 + }, + "output": { + "llm_answer": "Класс `RuntimeManager` в файле `src/app_runtime/core/runtime.py` играет роль центрального координатора для инициализации и управления ресурсами приложения во время его выполнения.\n\n### Что делает класс:\n- При создании экземпляра класса (через метод `__init__`) происходит начальная настройка всех необходимых сервисов и компонентов через передачу параметров конфигурации (`configuration`), контейнер сервисов (`services`), сервис трассировки (`traces`), реестр здоровья (`health`), менеджер логирования (`logs`), супервизор рабочих процессов (`workers`) и служба контроля плоскости (`control_plane`).\n \n- В методе `__init__` все переданные параметры либо используются напрямую, либо заменяются дефолтными значениями при их отсутствии. Это позволяет гибко настраивать работу приложения даже без полного набора аргументов.\n\n- Важным аспектом является регистрация модулей (`self.registry = ModuleRegistry(self.services)`), которая позволяет отслеживать и управлять загруженными модулями приложения.\n\n### Входные данные:\n- Параметры настройки конфигурации и сервисов.\n\n### Выходные данные:\n- Настроенный объект `RuntimeManager`, готовый к работе с основными компонентами приложения.\n\n### Связь с окружением:\n- Метод `start()` вызывается после инициализации для начала работы основных сервисов и механизмов мониторинга состояния.\n- Класс взаимодействует с другими компонентами системы через свои атрибуты и методы регистрации, обеспечивая целостность и корректность работы всего runtime-среды приложения." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 784, + "evidence_rows": 6, + "evidence_chars": 6650 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 4, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_explain_local_ru_v1", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 2177 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_120252/full_chain_plba_code_subintents_plba-fullchain-explain-local-runtime-manager.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_120252/full_chain_plba_code_subintents_plba-fullchain-explain-local-runtime-manager.md new file mode 100644 index 0000000..5ddd657 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_120252/full_chain_plba_code_subintents_plba-fullchain-explain-local-runtime-manager.md @@ -0,0 +1,34 @@ +# plba-fullchain-explain-local-runtime-manager + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Почему в файле src/app_runtime/core/runtime.py класс RuntimeManager устроен так? + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "EXPLAIN_LOCAL", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 6, + "llm_answer": "Класс `RuntimeManager` в файле `src/app_runtime/core/runtime.py` играет роль центрального координатора для инициализации и управления ресурсами приложения во время его выполнения.\n\n### Что делает класс:\n- При создании экземпляра класса (через метод `__init__`) происходит начальная настройка всех необходимых сервисов и компонентов через передачу параметров конфигурации (`configuration`), контейнер сервисов (`services`), сервис трассировки (`traces`), реестр здоровья (`health`), менеджер логирования (`logs`), супервизор рабочих процессов (`workers`) и служба контроля плоскости (`control_plane`).\n \n- В методе `__init__` все переданные параметры либо используются напрямую, либо заменяются дефолтными значениями при их отсутствии. Это позволяет гибко настраивать работу приложения даже без полного набора аргументов.\n\n- Важным аспектом является регистрация модулей (`self.registry = ModuleRegistry(self.services)`), которая позволяет отслеживать и управлять загруженными модулями приложения.\n\n### Входные данные:\n- Параметры настройки конфигурации и сервисов.\n\n### Выходные данные:\n- Настроенный объект `RuntimeManager`, готовый к работе с основными компонентами приложения.\n\n### Связь с окружением:\n- Метод `start()` вызывается после инициализации для начала работы основных сервисов и механизмов мониторинга состояния.\n- Класс взаимодействует с другими компонентами системы через свои атрибуты и методы регистрации, обеспечивая целостность и корректность работы всего runtime-среды приложения.", + "answer_mode": "answered", + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C2_DEPENDENCY_GRAPH" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_120252/full_chain_plba_code_subintents_plba-fullchain-explain-runtime-manager.json b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_120252/full_chain_plba_code_subintents_plba-fullchain-explain-runtime-manager.json new file mode 100644 index 0000000..02396ae --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_120252/full_chain_plba_code_subintents_plba-fullchain-explain-runtime-manager.json @@ -0,0 +1,2088 @@ +{ + "case_id": "plba-fullchain-explain-runtime-manager", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 12, + "llm_answer": "## Назначение\n\nКласс `RuntimeManager` играет роль менеджера выполнения приложения, координирующего различные компоненты и сервисы, необходимые для управления жизненным циклом runtime-среды. Он отвечает за регистрацию сервисов, управление их состоянием и координацию действий по выполнению бизнес-процессов.\n\n## Ключевые зависимости\n\nКлючевыми зависимостями класса являются следующие сущности и библиотеки:\n\n- **ConfigurationManager** (`configuration`) — управляет конфигурацией runtime-среды.\n- **ServiceContainer** (`services`) — контейнер сервисов, предоставляющий доступ к различным сервисам runtime.\n- **TraceService** (`traces`) — сервис отслеживания событий и трассировки выполнения задач.\n- **HealthRegistry** (`health`) — служба мониторинга состояния и здоровья runtime-среды.\n- **LogManager** (`logs`) — менеджер логирования событий и сообщений от runtime-среды.\n- **WorkerSupervisor** (`workers`) — супервизор рабочих процессов, управляющий рабочими потоками и задачами.\n- **ControlPlaneService** (`control_plane`) — главный сервис управления жизненным циклом runtime.\n\n## Поток данных или вызовов\n\nПроцесс работы `RuntimeManager` можно описать следующим образом:\n\n1. При инициализации создается экземпляр класса с заданными параметрами конфигурации и сервисов.\n2. В конструкторе вызывается метод `_register_core_services`, который регистрирует основные модули и сервисы runtime-среды.\n3. Метод `register_module` позволяет динамически регистрировать дополнительные модули приложений.\n4. Управляющие методы позволяют менять состояние runtime-среды (например, переходы между состояниями жизненного цикла).\n5. Управление рабочим процессом осуществляется через супервизор рабочих потоков (`WorkerSupervisor`), который запускает задачи и следит за их выполнением.\n6. Сервис мониторинга (`TraceService`) фиксирует события и ошибки во время выполнения runtime-среды.\n7. Логирование событий и сообщений выполняется через `LogManager`.\n8. Контрольные проверки состояния среды выполняются службой мониторинга (`HealthRegistry`).\n9. Главный сервис управления (`ControlPlaneService`) обеспечивает синхронизацию и координацию различных компонентов runtime.\n\n## Важные детали реализации\n\n### Настройки и параметры\n\n- Константы `ACTION_TIMEOUT_SECONDS` и `ACTION_POLL_INTERVAL_SECONDS` задают таймауты и интервалы опроса для управления поведением runtime-среды.\n\n### Жизненный цикл runtime\n\nЖизненный цикл runtime-среды управляется посредством изменения состояния объекта `RuntimeManager`. Состояния могут изменяться следующими методами:\n\n- `start`: переводит runtime-среду в активное состояние.\n- `stop`: останавливает выполнение runtime-среды.\n- `restart`: перезапускает runtime-среду после остановки.\n\nЭти методы обеспечивают корректное завершение текущих операций и освобождение ресурсов перед остановкой runtime.\n\n### Динамическая регистрация модулей\n\nМетод `register_module` позволяет динамически добавлять новые модули приложений без необходимости перекомпиляции runtime-среды. Это делает систему гибкой и легко расширяемой.\n\n### Осторожные выводы\n\nНа основе косвенных признаков можно предположить следующее:\n\n- Поскольку атрибуты `_core_registered` и `_workers_registered` используются внутри метода `_register_core_services`, предполагается наличие дополнительных методов или механизмов регистрации основных сервисов и рабочих потоков.\n- Хотя зависимость `ControlPlaneService` явно указана в графе зависимостей, её точная реализация и функциональность остаются неизвестными без дополнительного анализа исходного кода.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-fullchain-explain-runtime-manager", + "text": "Объясни как работает класс RuntimeManager", + "mode": "full_chain", + "run_started_at": "2026-03-12T12:02:52", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни как работает класс RuntimeManager", + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ], + "confidence": 0.99 + }, + "rag_count": 12, + "rag_rows": [ + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager\nRuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "qname": "RuntimeManager", + "kind": "class", + "signature": "RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests manager\n- orchestrates role-like calls (4)\n- reads and writes state attributes\n- participates in dataflow slices (50)", + "layer": "C4_SEMANTIC_ROLES", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 43, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "symbol_name": "RuntimeManager", + "qname": "RuntimeManager", + "role": "pipeline_stage", + "confidence": 0.67, + "dataflow_participation": 50, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 52, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "## Назначение\n\nКласс `RuntimeManager` играет роль менеджера выполнения приложения, координирующего различные компоненты и сервисы, необходимые для управления жизненным циклом runtime-среды. Он отвечает за регистрацию сервисов, управление их состоянием и координацию действий по выполнению бизнес-процессов.\n\n## Ключевые зависимости\n\nКлючевыми зависимостями класса являются следующие сущности и библиотеки:\n\n- **ConfigurationManager** (`configuration`) — управляет конфигурацией runtime-среды.\n- **ServiceContainer** (`services`) — контейнер сервисов, предоставляющий доступ к различным сервисам runtime.\n- **TraceService** (`traces`) — сервис отслеживания событий и трассировки выполнения задач.\n- **HealthRegistry** (`health`) — служба мониторинга состояния и здоровья runtime-среды.\n- **LogManager** (`logs`) — менеджер логирования событий и сообщений от runtime-среды.\n- **WorkerSupervisor** (`workers`) — супервизор рабочих процессов, управляющий рабочими потоками и задачами.\n- **ControlPlaneService** (`control_plane`) — главный сервис управления жизненным циклом runtime.\n\n## Поток данных или вызовов\n\nПроцесс работы `RuntimeManager` можно описать следующим образом:\n\n1. При инициализации создается экземпляр класса с заданными параметрами конфигурации и сервисов.\n2. В конструкторе вызывается метод `_register_core_services`, который регистрирует основные модули и сервисы runtime-среды.\n3. Метод `register_module` позволяет динамически регистрировать дополнительные модули приложений.\n4. Управляющие методы позволяют менять состояние runtime-среды (например, переходы между состояниями жизненного цикла).\n5. Управление рабочим процессом осуществляется через супервизор рабочих потоков (`WorkerSupervisor`), который запускает задачи и следит за их выполнением.\n6. Сервис мониторинга (`TraceService`) фиксирует события и ошибки во время выполнения runtime-среды.\n7. Логирование событий и сообщений выполняется через `LogManager`.\n8. Контрольные проверки состояния среды выполняются службой мониторинга (`HealthRegistry`).\n9. Главный сервис управления (`ControlPlaneService`) обеспечивает синхронизацию и координацию различных компонентов runtime.\n\n## Важные детали реализации\n\n### Настройки и параметры\n\n- Константы `ACTION_TIMEOUT_SECONDS` и `ACTION_POLL_INTERVAL_SECONDS` задают таймауты и интервалы опроса для управления поведением runtime-среды.\n\n### Жизненный цикл runtime\n\nЖизненный цикл runtime-среды управляется посредством изменения состояния объекта `RuntimeManager`. Состояния могут изменяться следующими методами:\n\n- `start`: переводит runtime-среду в активное состояние.\n- `stop`: останавливает выполнение runtime-среды.\n- `restart`: перезапускает runtime-среду после остановки.\n\nЭти методы обеспечивают корректное завершение текущих операций и освобождение ресурсов перед остановкой runtime.\n\n### Динамическая регистрация модулей\n\nМетод `register_module` позволяет динамически добавлять новые модули приложений без необходимости перекомпиляции runtime-среды. Это делает систему гибкой и легко расширяемой.\n\n### Осторожные выводы\n\nНа основе косвенных признаков можно предположить следующее:\n\n- Поскольку атрибуты `_core_registered` и `_workers_registered` используются внутри метода `_register_core_services`, предполагается наличие дополнительных методов или механизмов регистрации основных сервисов и рабочих потоков.\n- Хотя зависимость `ControlPlaneService` явно указана в графе зависимостей, её точная реализация и функциональность остаются неизвестными без дополнительного анализа исходного кода.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS", + "C4_SEMANTIC_ROLES" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 169, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 39, + "C0_SOURCE_CHUNKS": 15, + "C4_SEMANTIC_ROLES": 13, + "C2_DEPENDENCY_GRAPH": 72, + "C3_ENTRYPOINTS": 8 + }, + "merge_rank": 15, + "prompt_build": 0, + "llm_call": 5054 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 797, + "evidence_rows": 12, + "evidence_chars": 7130 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 2 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_explain_ru_v1", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "RuntimeManager" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 12, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-fullchain-explain-runtime-manager", + "mode": "full_chain", + "run_started_at": "2026-03-12T12:02:52", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Объясни как работает класс RuntimeManager", + "normalized_query": "Объясни как работает класс RuntimeManager" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Объясни как работает класс RuntimeManager" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни как работает класс RuntimeManager" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Объясни как работает класс RuntimeManager" + }, + "output": { + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ], + "confidence": 0.99 + }, + "rag_count": 12, + "rag_rows": [ + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager\nRuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "qname": "RuntimeManager", + "kind": "class", + "signature": "RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests manager\n- orchestrates role-like calls (4)\n- reads and writes state attributes\n- participates in dataflow slices (50)", + "layer": "C4_SEMANTIC_ROLES", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 43, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "symbol_name": "RuntimeManager", + "qname": "RuntimeManager", + "role": "pipeline_stage", + "confidence": 0.67, + "dataflow_participation": 50, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 52, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 169, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 39, + "C0_SOURCE_CHUNKS": 15, + "C4_SEMANTIC_ROLES": 13, + "C2_DEPENDENCY_GRAPH": 72, + "C3_ENTRYPOINTS": 8 + }, + "merge_rank": 15 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Объясни как работает класс RuntimeManager", + "rag_count": 12 + }, + "output": { + "llm_answer": "## Назначение\n\nКласс `RuntimeManager` играет роль менеджера выполнения приложения, координирующего различные компоненты и сервисы, необходимые для управления жизненным циклом runtime-среды. Он отвечает за регистрацию сервисов, управление их состоянием и координацию действий по выполнению бизнес-процессов.\n\n## Ключевые зависимости\n\nКлючевыми зависимостями класса являются следующие сущности и библиотеки:\n\n- **ConfigurationManager** (`configuration`) — управляет конфигурацией runtime-среды.\n- **ServiceContainer** (`services`) — контейнер сервисов, предоставляющий доступ к различным сервисам runtime.\n- **TraceService** (`traces`) — сервис отслеживания событий и трассировки выполнения задач.\n- **HealthRegistry** (`health`) — служба мониторинга состояния и здоровья runtime-среды.\n- **LogManager** (`logs`) — менеджер логирования событий и сообщений от runtime-среды.\n- **WorkerSupervisor** (`workers`) — супервизор рабочих процессов, управляющий рабочими потоками и задачами.\n- **ControlPlaneService** (`control_plane`) — главный сервис управления жизненным циклом runtime.\n\n## Поток данных или вызовов\n\nПроцесс работы `RuntimeManager` можно описать следующим образом:\n\n1. При инициализации создается экземпляр класса с заданными параметрами конфигурации и сервисов.\n2. В конструкторе вызывается метод `_register_core_services`, который регистрирует основные модули и сервисы runtime-среды.\n3. Метод `register_module` позволяет динамически регистрировать дополнительные модули приложений.\n4. Управляющие методы позволяют менять состояние runtime-среды (например, переходы между состояниями жизненного цикла).\n5. Управление рабочим процессом осуществляется через супервизор рабочих потоков (`WorkerSupervisor`), который запускает задачи и следит за их выполнением.\n6. Сервис мониторинга (`TraceService`) фиксирует события и ошибки во время выполнения runtime-среды.\n7. Логирование событий и сообщений выполняется через `LogManager`.\n8. Контрольные проверки состояния среды выполняются службой мониторинга (`HealthRegistry`).\n9. Главный сервис управления (`ControlPlaneService`) обеспечивает синхронизацию и координацию различных компонентов runtime.\n\n## Важные детали реализации\n\n### Настройки и параметры\n\n- Константы `ACTION_TIMEOUT_SECONDS` и `ACTION_POLL_INTERVAL_SECONDS` задают таймауты и интервалы опроса для управления поведением runtime-среды.\n\n### Жизненный цикл runtime\n\nЖизненный цикл runtime-среды управляется посредством изменения состояния объекта `RuntimeManager`. Состояния могут изменяться следующими методами:\n\n- `start`: переводит runtime-среду в активное состояние.\n- `stop`: останавливает выполнение runtime-среды.\n- `restart`: перезапускает runtime-среду после остановки.\n\nЭти методы обеспечивают корректное завершение текущих операций и освобождение ресурсов перед остановкой runtime.\n\n### Динамическая регистрация модулей\n\nМетод `register_module` позволяет динамически добавлять новые модули приложений без необходимости перекомпиляции runtime-среды. Это делает систему гибкой и легко расширяемой.\n\n### Осторожные выводы\n\nНа основе косвенных признаков можно предположить следующее:\n\n- Поскольку атрибуты `_core_registered` и `_workers_registered` используются внутри метода `_register_core_services`, предполагается наличие дополнительных методов или механизмов регистрации основных сервисов и рабочих потоков.\n- Хотя зависимость `ControlPlaneService` явно указана в графе зависимостей, её точная реализация и функциональность остаются неизвестными без дополнительного анализа исходного кода." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 797, + "evidence_rows": 12, + "evidence_chars": 7130 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 2 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_explain_ru_v1", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 5054 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_120252/full_chain_plba_code_subintents_plba-fullchain-explain-runtime-manager.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_120252/full_chain_plba_code_subintents_plba-fullchain-explain-runtime-manager.md new file mode 100644 index 0000000..cab6df1 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_120252/full_chain_plba_code_subintents_plba-fullchain-explain-runtime-manager.md @@ -0,0 +1,34 @@ +# plba-fullchain-explain-runtime-manager + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Объясни как работает класс RuntimeManager + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 12, + "llm_answer": "## Назначение\n\nКласс `RuntimeManager` играет роль менеджера выполнения приложения, координирующего различные компоненты и сервисы, необходимые для управления жизненным циклом runtime-среды. Он отвечает за регистрацию сервисов, управление их состоянием и координацию действий по выполнению бизнес-процессов.\n\n## Ключевые зависимости\n\nКлючевыми зависимостями класса являются следующие сущности и библиотеки:\n\n- **ConfigurationManager** (`configuration`) — управляет конфигурацией runtime-среды.\n- **ServiceContainer** (`services`) — контейнер сервисов, предоставляющий доступ к различным сервисам runtime.\n- **TraceService** (`traces`) — сервис отслеживания событий и трассировки выполнения задач.\n- **HealthRegistry** (`health`) — служба мониторинга состояния и здоровья runtime-среды.\n- **LogManager** (`logs`) — менеджер логирования событий и сообщений от runtime-среды.\n- **WorkerSupervisor** (`workers`) — супервизор рабочих процессов, управляющий рабочими потоками и задачами.\n- **ControlPlaneService** (`control_plane`) — главный сервис управления жизненным циклом runtime.\n\n## Поток данных или вызовов\n\nПроцесс работы `RuntimeManager` можно описать следующим образом:\n\n1. При инициализации создается экземпляр класса с заданными параметрами конфигурации и сервисов.\n2. В конструкторе вызывается метод `_register_core_services`, который регистрирует основные модули и сервисы runtime-среды.\n3. Метод `register_module` позволяет динамически регистрировать дополнительные модули приложений.\n4. Управляющие методы позволяют менять состояние runtime-среды (например, переходы между состояниями жизненного цикла).\n5. Управление рабочим процессом осуществляется через супервизор рабочих потоков (`WorkerSupervisor`), который запускает задачи и следит за их выполнением.\n6. Сервис мониторинга (`TraceService`) фиксирует события и ошибки во время выполнения runtime-среды.\n7. Логирование событий и сообщений выполняется через `LogManager`.\n8. Контрольные проверки состояния среды выполняются службой мониторинга (`HealthRegistry`).\n9. Главный сервис управления (`ControlPlaneService`) обеспечивает синхронизацию и координацию различных компонентов runtime.\n\n## Важные детали реализации\n\n### Настройки и параметры\n\n- Константы `ACTION_TIMEOUT_SECONDS` и `ACTION_POLL_INTERVAL_SECONDS` задают таймауты и интервалы опроса для управления поведением runtime-среды.\n\n### Жизненный цикл runtime\n\nЖизненный цикл runtime-среды управляется посредством изменения состояния объекта `RuntimeManager`. Состояния могут изменяться следующими методами:\n\n- `start`: переводит runtime-среду в активное состояние.\n- `stop`: останавливает выполнение runtime-среды.\n- `restart`: перезапускает runtime-среду после остановки.\n\nЭти методы обеспечивают корректное завершение текущих операций и освобождение ресурсов перед остановкой runtime.\n\n### Динамическая регистрация модулей\n\nМетод `register_module` позволяет динамически добавлять новые модули приложений без необходимости перекомпиляции runtime-среды. Это делает систему гибкой и легко расширяемой.\n\n### Осторожные выводы\n\nНа основе косвенных признаков можно предположить следующее:\n\n- Поскольку атрибуты `_core_registered` и `_workers_registered` используются внутри метода `_register_core_services`, предполагается наличие дополнительных методов или механизмов регистрации основных сервисов и рабочих потоков.\n- Хотя зависимость `ControlPlaneService` явно указана в графе зависимостей, её точная реализация и функциональность остаются неизвестными без дополнительного анализа исходного кода.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_120252/full_chain_plba_code_subintents_plba-fullchain-find-entrypoints.json b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_120252/full_chain_plba_code_subintents_plba-fullchain-find-entrypoints.json new file mode 100644 index 0000000..3cfe42c --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_120252/full_chain_plba_code_subintents_plba-fullchain-find-entrypoints.json @@ -0,0 +1,1196 @@ +{ + "case_id": "plba-fullchain-find-entrypoints", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 9, + "llm_answer": "## Финальный ответ:\n\nНа основании предоставленного контекста и слоев анализа RAG, удалось выявить следующие **точки входа** и их возможные роли:\n\n### 1. `src/app_runtime/control/http_app.py`\n- **app.post**: \n - Роль: Обработчик HTTP POST-запросов FastAPI. Вероятно, используется для приема данных от клиента и инициирования последующих шагов обработки (например, вызова функций, выполняющих бизнес-логику).\n- **app.get**: \n - Роль: Обработчик HTTP GET-запросов FastAPI. Аналогично предыдущему пункту, вероятно обрабатывает запросы на получение информации.\n\n### Наиболее вероятные точки входа:\nЭти две точки (`app.post` и `app.get`) выглядят наиболее вероятными местами начальной обработки запросов в системе, поскольку они явно указаны в слое `C3_ENTRYPOINTS`.\n\n---\n\nОбратите внимание, что слой `C0_SOURCE_CHUNKS` содержит классы и функции без явных упоминаний точек входа, поэтому требуется дополнительное исследование исходного кода вокруг этих классов и функций, чтобы определить их контекст использования.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [], + "layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-fullchain-find-entrypoints", + "text": "Найди точки входа в коде", + "mode": "full_chain", + "run_started_at": "2026-03-12T12:02:52", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Найди точки входа в коде", + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [], + "confidence": 0.0 + }, + "rag_count": 9, + "rag_rows": [ + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/contracts/result.py", + "content": "class StepResult:\n transition: str = \"success\"\n updates: dict[str, Any] = field(default_factory=dict)\n status: str = \"completed\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/workflow/contracts/result.py:StepResult", + "span_start": 8, + "span_end": 11, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.workflow.contracts.result", + "is_test": false, + "blob_sha": "6e57dbfe22873f097f11228a26cffa415440a43b68a737b220906461cd86c353", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/__init__.py", + "content": "from app_runtime.config.file_loader import ConfigFileLoader\nfrom app_runtime.config.providers import FileConfigProvider\n\n__all__ = [\"ConfigFileLoader\", \"FileConfigProvider\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/config/__init__.py:1-4", + "span_start": 1, + "span_end": 4, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.config.__init__", + "is_test": false, + "blob_sha": "612918029820a2a983330ec92256142b55b9de4bdf3399ece18e2a02dbad9729", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/__init__.py", + "content": "__all__: list[str] = []", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/__init__.py:1-1", + "span_start": 1, + "span_end": 1, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.__init__", + "is_test": false, + "blob_sha": "8eea9df4f6d7b38ca0e39ccc27b04700e3d08dbeec8046d613d22706d19985fa", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "class ConfigFileLoader:\n def __init__(self, path: str | Path) -> None:\n self.path = Path(path)\n self.config: Any = None\n self.last_valid_config: Any = None\n self._last_seen_hash: str | None = None\n\n def read_text(self) -> str:\n return self.path.read_text(encoding=\"utf-8\")\n\n def parse(self, data: str) -> Any:\n suffix = self.path.suffix.lower()\n if suffix in {\".yml\", \".yaml\"}:\n return yaml.safe_load(data)\n return json.loads(data)\n\n def load_sync(self) -> Any:\n data = self.read_text()\n parsed = self.parse(data)\n self.config = parsed\n self.last_valid_config = parsed\n self._last_seen_hash = self._calculate_hash(data)\n return parsed\n\n def load_if_changed(self) -> tuple[bool, Any]:\n data = self.read_text()\n current_hash = self._calculate_hash(data)\n if current_hash == self._last_seen_hash:\n return False, self.config\n parsed = self.parse(data)\n self.config = parsed\n self.last_valid_config = parsed\n self._last_seen_hash = current_hash\n return True, parsed\n\n @staticmethod\n def _calculate_hash(data: str) -> str:\n return hashlib.sha256(data.encode(\"utf-8\")).hexdigest()", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/config/file_loader.py:ConfigFileLoader", + "span_start": 11, + "span_end": 48, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/providers.py", + "content": "class FileConfigProvider(ConfigProvider):\n def __init__(self, path: str | Path) -> None:\n self._loader = ConfigFileLoader(path)\n\n @property\n def loader(self) -> ConfigFileLoader:\n return self._loader\n\n def load(self) -> dict[str, Any]:\n config = self._loader.load_sync()\n if not isinstance(config, dict):\n raise TypeError(\"Config root must be a mapping\")\n return dict(config)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/config/providers.py:FileConfigProvider", + "span_start": 10, + "span_end": 22, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.config.providers", + "is_test": false, + "blob_sha": "8c53ca0122d6df6c5763bca15e99434bb4daebd5a618b8fc927e9ae90b022e64", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlActionSet:\n health: HealthHandler\n start: ActionHandler\n stop: ActionHandler\n status: ActionHandler", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "## Финальный ответ:\n\nНа основании предоставленного контекста и слоев анализа RAG, удалось выявить следующие **точки входа** и их возможные роли:\n\n### 1. `src/app_runtime/control/http_app.py`\n- **app.post**: \n - Роль: Обработчик HTTP POST-запросов FastAPI. Вероятно, используется для приема данных от клиента и инициирования последующих шагов обработки (например, вызова функций, выполняющих бизнес-логику).\n- **app.get**: \n - Роль: Обработчик HTTP GET-запросов FastAPI. Аналогично предыдущему пункту, вероятно обрабатывает запросы на получение информации.\n\n### Наиболее вероятные точки входа:\nЭти две точки (`app.post` и `app.get`) выглядят наиболее вероятными местами начальной обработки запросов в системе, поскольку они явно указаны в слое `C3_ENTRYPOINTS`.\n\n---\n\nОбратите внимание, что слой `C0_SOURCE_CHUNKS` содержит классы и функции без явных упоминаний точек входа, поэтому требуется дополнительное исследование исходного кода вокруг этих классов и функций, чтобы определить их контекст использования.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C3_ENTRYPOINTS" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "unknown", + "symbol_candidates": [], + "keyword_hints": [], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C3_ENTRYPOINTS": "exact_path_fetch", + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C3_ENTRYPOINTS": 12, + "C0_SOURCE_CHUNKS": 6 + }, + "filters_by_layer": { + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C3_ENTRYPOINTS", + "query": "Найди точки входа в коде", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 12, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Найди точки входа в коде", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [] + }, + "layers": [ + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 6, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 36, + "retrieval_by_layer": { + "C3_ENTRYPOINTS": 22, + "C0_SOURCE_CHUNKS": 13 + }, + "merge_rank": 0, + "prompt_build": 0, + "llm_call": 2109 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 458, + "evidence_rows": 9, + "evidence_chars": 2228 + }, + "evidence_summary": [ + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 6, + "unique_paths": 6 + } + ], + "prompt_template_id": "intent_code_qa_find_entrypoints_ru_v1", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 9, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-fullchain-find-entrypoints", + "mode": "full_chain", + "run_started_at": "2026-03-12T12:02:52", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Найди точки входа в коде", + "normalized_query": "Найди точки входа в коде" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Найди точки входа в коде" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Найди точки входа в коде" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "unknown", + "symbol_candidates": [], + "keyword_hints": [], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Найди точки входа в коде" + }, + "output": { + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [], + "confidence": 0.0 + }, + "rag_count": 9, + "rag_rows": [ + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/contracts/result.py", + "content": "class StepResult:\n transition: str = \"success\"\n updates: dict[str, Any] = field(default_factory=dict)\n status: str = \"completed\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/workflow/contracts/result.py:StepResult", + "span_start": 8, + "span_end": 11, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.workflow.contracts.result", + "is_test": false, + "blob_sha": "6e57dbfe22873f097f11228a26cffa415440a43b68a737b220906461cd86c353", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/__init__.py", + "content": "from app_runtime.config.file_loader import ConfigFileLoader\nfrom app_runtime.config.providers import FileConfigProvider\n\n__all__ = [\"ConfigFileLoader\", \"FileConfigProvider\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/config/__init__.py:1-4", + "span_start": 1, + "span_end": 4, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.config.__init__", + "is_test": false, + "blob_sha": "612918029820a2a983330ec92256142b55b9de4bdf3399ece18e2a02dbad9729", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/__init__.py", + "content": "__all__: list[str] = []", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/__init__.py:1-1", + "span_start": 1, + "span_end": 1, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.__init__", + "is_test": false, + "blob_sha": "8eea9df4f6d7b38ca0e39ccc27b04700e3d08dbeec8046d613d22706d19985fa", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "class ConfigFileLoader:\n def __init__(self, path: str | Path) -> None:\n self.path = Path(path)\n self.config: Any = None\n self.last_valid_config: Any = None\n self._last_seen_hash: str | None = None\n\n def read_text(self) -> str:\n return self.path.read_text(encoding=\"utf-8\")\n\n def parse(self, data: str) -> Any:\n suffix = self.path.suffix.lower()\n if suffix in {\".yml\", \".yaml\"}:\n return yaml.safe_load(data)\n return json.loads(data)\n\n def load_sync(self) -> Any:\n data = self.read_text()\n parsed = self.parse(data)\n self.config = parsed\n self.last_valid_config = parsed\n self._last_seen_hash = self._calculate_hash(data)\n return parsed\n\n def load_if_changed(self) -> tuple[bool, Any]:\n data = self.read_text()\n current_hash = self._calculate_hash(data)\n if current_hash == self._last_seen_hash:\n return False, self.config\n parsed = self.parse(data)\n self.config = parsed\n self.last_valid_config = parsed\n self._last_seen_hash = current_hash\n return True, parsed\n\n @staticmethod\n def _calculate_hash(data: str) -> str:\n return hashlib.sha256(data.encode(\"utf-8\")).hexdigest()", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/config/file_loader.py:ConfigFileLoader", + "span_start": 11, + "span_end": 48, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/providers.py", + "content": "class FileConfigProvider(ConfigProvider):\n def __init__(self, path: str | Path) -> None:\n self._loader = ConfigFileLoader(path)\n\n @property\n def loader(self) -> ConfigFileLoader:\n return self._loader\n\n def load(self) -> dict[str, Any]:\n config = self._loader.load_sync()\n if not isinstance(config, dict):\n raise TypeError(\"Config root must be a mapping\")\n return dict(config)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/config/providers.py:FileConfigProvider", + "span_start": 10, + "span_end": 22, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.config.providers", + "is_test": false, + "blob_sha": "8c53ca0122d6df6c5763bca15e99434bb4daebd5a618b8fc927e9ae90b022e64", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlActionSet:\n health: HealthHandler\n start: ActionHandler\n stop: ActionHandler\n status: ActionHandler", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C3_ENTRYPOINTS": "exact_path_fetch", + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C3_ENTRYPOINTS": 12, + "C0_SOURCE_CHUNKS": 6 + }, + "filters_by_layer": { + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C3_ENTRYPOINTS", + "query": "Найди точки входа в коде", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 12, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Найди точки входа в коде", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [] + }, + "layers": [ + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 6, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 36, + "retrieval_by_layer": { + "C3_ENTRYPOINTS": 22, + "C0_SOURCE_CHUNKS": 13 + }, + "merge_rank": 0 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Найди точки входа в коде", + "rag_count": 9 + }, + "output": { + "llm_answer": "## Финальный ответ:\n\nНа основании предоставленного контекста и слоев анализа RAG, удалось выявить следующие **точки входа** и их возможные роли:\n\n### 1. `src/app_runtime/control/http_app.py`\n- **app.post**: \n - Роль: Обработчик HTTP POST-запросов FastAPI. Вероятно, используется для приема данных от клиента и инициирования последующих шагов обработки (например, вызова функций, выполняющих бизнес-логику).\n- **app.get**: \n - Роль: Обработчик HTTP GET-запросов FastAPI. Аналогично предыдущему пункту, вероятно обрабатывает запросы на получение информации.\n\n### Наиболее вероятные точки входа:\nЭти две точки (`app.post` и `app.get`) выглядят наиболее вероятными местами начальной обработки запросов в системе, поскольку они явно указаны в слое `C3_ENTRYPOINTS`.\n\n---\n\nОбратите внимание, что слой `C0_SOURCE_CHUNKS` содержит классы и функции без явных упоминаний точек входа, поэтому требуется дополнительное исследование исходного кода вокруг этих классов и функций, чтобы определить их контекст использования." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 458, + "evidence_rows": 9, + "evidence_chars": 2228 + }, + "evidence_summary": [ + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 6, + "unique_paths": 6 + } + ], + "prompt_template_id": "intent_code_qa_find_entrypoints_ru_v1", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 2109 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_120252/full_chain_plba_code_subintents_plba-fullchain-find-entrypoints.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_120252/full_chain_plba_code_subintents_plba-fullchain-find-entrypoints.md new file mode 100644 index 0000000..9eaba77 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_120252/full_chain_plba_code_subintents_plba-fullchain-find-entrypoints.md @@ -0,0 +1,29 @@ +# plba-fullchain-find-entrypoints + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Найди точки входа в коде + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 9, + "llm_answer": "## Финальный ответ:\n\nНа основании предоставленного контекста и слоев анализа RAG, удалось выявить следующие **точки входа** и их возможные роли:\n\n### 1. `src/app_runtime/control/http_app.py`\n- **app.post**: \n - Роль: Обработчик HTTP POST-запросов FastAPI. Вероятно, используется для приема данных от клиента и инициирования последующих шагов обработки (например, вызова функций, выполняющих бизнес-логику).\n- **app.get**: \n - Роль: Обработчик HTTP GET-запросов FastAPI. Аналогично предыдущему пункту, вероятно обрабатывает запросы на получение информации.\n\n### Наиболее вероятные точки входа:\nЭти две точки (`app.post` и `app.get`) выглядят наиболее вероятными местами начальной обработки запросов в системе, поскольку они явно указаны в слое `C3_ENTRYPOINTS`.\n\n---\n\nОбратите внимание, что слой `C0_SOURCE_CHUNKS` содержит классы и функции без явных упоминаний точек входа, поэтому требуется дополнительное исследование исходного кода вокруг этих классов и функций, чтобы определить их контекст использования.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [], + "layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_120252/full_chain_plba_code_subintents_plba-fullchain-find-tests-runtime-manager.json b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_120252/full_chain_plba_code_subintents_plba-fullchain-find-tests-runtime-manager.json new file mode 100644 index 0000000..828fb08 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_120252/full_chain_plba_code_subintents_plba-fullchain-find-tests-runtime-manager.json @@ -0,0 +1,1879 @@ +{ + "case_id": "plba-fullchain-find-tests-runtime-manager", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 16, + "llm_answer": "Прямые тесты для `RuntimeManager` найдены в следующих местах:\n\n1. **tests/test_runtime.py:** \n - `test_runtime_graceful_stop_waits_until_worker_finishes`: Проверяет корректность остановки `RuntimeManager`, ожидание завершения работником (worker).\n - `test_runtime_runs_worker_routine_and_exposes_status`: Тестирует запуск рутины работника (`worker routine`) и отображение статуса работы через интерфейс состояния (`status interface`).\n \nЭти тесты непосредственно взаимодействуют с реализацией класса `RuntimeManager`.\n\n**Описание проверок:**\n- `test_runtime_graceful_stop_waits_until_worker_finishes` — проверка правильной логики поведения при остановке менеджера и завершении работником своих задач.\n- `test_runtime_runs_worker_routine_and_exposes_status` — тестирование процесса выполнения рабочего задания и доступности его результатов через статусное API.\n\n**Оценка покрытия:**\nОба теста обеспечивают хорошее покрытие основных функциональных возможностей `RuntimeManager`. Они затрагивают важные аспекты управления жизненным циклом менеджера, взаимодействия с работником и предоставления информации о состоянии системы.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-fullchain-find-tests-runtime-manager", + "text": "Где тесты для RuntimeManager?", + "mode": "full_chain", + "run_started_at": "2026-03-12T12:02:52", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Где тесты для RuntimeManager?", + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "RuntimeManager" + ], + "confidence": 0.0 + }, + "rag_count": 16, + "rag_rows": [ + { + "path": "tests/test_runtime.py", + "content": "test_runtime_runs_worker_routine_and_exposes_status instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_runtime_runs_worker_routine_and_exposes_status:instantiates", + "span_start": 209, + "span_end": 209, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "c397a308e7824ba9fe400a754c7e15e66ea6f058d7f5d3e82bb002bb78b509d2", + "edge_type": "instantiates", + "src_symbol_id": "1c767eb5ee08e84f45b18c8ed7531ec0ed73c63fb1594823569672db7b21e992", + "src_qname": "test_runtime_runs_worker_routine_and_exposes_status", + "dst_symbol_id": "aeadc039653807b0da1ca6e3cc1078ee61cfc510b28e7f9c2ec04c59da43cc8d", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "test_runtime_graceful_stop_waits_until_worker_finishes instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_runtime_graceful_stop_waits_until_worker_finishes:instantiates", + "span_start": 229, + "span_end": 229, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "76b4701262ccaa0a7a41691407c4ebdb2ca74a2415d89f0a38ef0d4f608bda93", + "edge_type": "instantiates", + "src_symbol_id": "1076e788e4a03b10d7bc1313a8ad46caa170c13cc026c6e4de994af1a6ae57bf", + "src_qname": "test_runtime_graceful_stop_waits_until_worker_finishes", + "dst_symbol_id": "aeadc039653807b0da1ca6e3cc1078ee61cfc510b28e7f9c2ec04c59da43cc8d", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "_build_runtime instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "_build_runtime:instantiates", + "span_start": 155, + "span_end": 155, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "7eb254d564944bab6272757ee5ef688862bd321e6941e2495dc942e03b1c9a25", + "edge_type": "instantiates", + "src_symbol_id": "db94031d5245bf82be836a109b4584b43b8e83d37a0f318e03f6c8191896d469", + "src_qname": "_build_runtime", + "dst_symbol_id": "a1572ea8183dc0cd6ddbc74342bbde8c28cecfde37ad40b62feff09f8d103d11", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_worker_wakes_up_with_configured_interval instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_worker_wakes_up_with_configured_interval:instantiates", + "span_start": 167, + "span_end": 167, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "189aafc4de0b79c688668f25f0c87166a127df26bd2215452014713b65ef281a", + "edge_type": "instantiates", + "src_symbol_id": "65f877f78191d65e6a752e41cedc70ebc784c266804a55c1c56440336e1f0d6e", + "src_qname": "test_worker_wakes_up_with_configured_interval", + "dst_symbol_id": "a1572ea8183dc0cd6ddbc74342bbde8c28cecfde37ad40b62feff09f8d103d11", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_actions_stop_busy_worker_after_timeout\n -> BlockingRoutine\n -> BlockingRoutine.__init__\n -> BlockingRoutine._started\n -> BlockingRoutine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_actions_stop_busy_worker_after_timeout:dataflow_slice", + "span_start": 42, + "span_end": 238, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "8e7db3d2a9226f1c1d9942ac6373cfcafa0d2276758ddb8a3d3c455a3d58024d", + "edge_type": "dataflow_slice", + "src_symbol_id": "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "src_qname": "test_actions_stop_busy_worker_after_timeout", + "dst_symbol_id": "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04", + "dst_ref": "BlockingRoutine.run", + "resolution": "resolved", + "slice_id": "8e7db3d2a9226f1c1d9942ac6373cfcafa0d2276758ddb8a3d3c455a3d58024d", + "root_symbol_id": "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "path_symbols": [ + "test_actions_stop_busy_worker_after_timeout", + "BlockingRoutine", + "BlockingRoutine.__init__", + "BlockingRoutine._started", + "BlockingRoutine.run" + ], + "path_symbol_ids": [ + "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "a3349c5bc65e4003a4bbd6a8dbb7a54c337e12d1aed930caa701b12e520f1e67", + "486deeed3043c6db985aef258e96ddc67aa53608e67a83962fbd2471f649ddf1", + "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_actions_stop_busy_worker_before_timeout\n -> BlockingRoutine\n -> BlockingRoutine.__init__\n -> BlockingRoutine._release\n -> BlockingRoutine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_actions_stop_busy_worker_before_timeout:dataflow_slice", + "span_start": 43, + "span_end": 212, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "8bd726155ba387d3579763ee84dfd2f9a90bc917da88f3b2e89416ab5c1254d6", + "edge_type": "dataflow_slice", + "src_symbol_id": "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "src_qname": "test_actions_stop_busy_worker_before_timeout", + "dst_symbol_id": "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04", + "dst_ref": "BlockingRoutine.run", + "resolution": "resolved", + "slice_id": "8bd726155ba387d3579763ee84dfd2f9a90bc917da88f3b2e89416ab5c1254d6", + "root_symbol_id": "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "path_symbols": [ + "test_actions_stop_busy_worker_before_timeout", + "BlockingRoutine", + "BlockingRoutine.__init__", + "BlockingRoutine._release", + "BlockingRoutine.run" + ], + "path_symbol_ids": [ + "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "a3349c5bc65e4003a4bbd6a8dbb7a54c337e12d1aed930caa701b12e520f1e67", + "486deeed3043c6db985aef258e96ddc67aa53608e67a83962fbd2471f649ddf1", + "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "def test_runtime_graceful_stop_waits_until_worker_finishes() -> None:\n started = Event()\n release = Event()\n runtime = RuntimeManager()\n runtime.register_module(BlockingModule(started, release))\n runtime.start()\n assert started.wait(timeout=1.0) is True\n assert runtime.status()[\"runtime\"][\"state\"] == \"busy\"\n\n stop_thread = Thread(target=runtime.stop, kwargs={\"timeout\": 1.0}, daemon=True)\n stop_thread.start()\n sleep(0.1)\n assert stop_thread.is_alive() is True\n\n release.set()\n stop_thread.join(timeout=1.0)\n assert stop_thread.is_alive() is False\n assert runtime.status()[\"runtime\"][\"state\"] == \"stopped\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_runtime.py:test_runtime_graceful_stop_waits_until_worker_finishes", + "span_start": 226, + "span_end": 243, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 8, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "def test_runtime_runs_worker_routine_and_exposes_status(tmp_path) -> None:\n config_path = tmp_path / \"config.yml\"\n config_path.write_text(\n \"\"\"\nplatform:\n workers: 1\nlog:\n version: 1\n disable_existing_loggers: false\n handlers:\n console:\n class: logging.StreamHandler\n root:\n level: INFO\n handlers: [console]\n\"\"\".strip(),\n encoding=\"utf-8\",\n )\n runtime = RuntimeManager()\n runtime.add_config_file(config_path)\n module = ExampleModule()\n runtime.register_module(module)\n\n runtime.start()\n sleep(0.2)\n status = runtime.status()\n runtime.stop()\n\n assert module.routine.processed == [{\"id\": 1}]\n assert status[\"modules\"] == [\"example\"]\n assert status[\"runtime\"][\"state\"] == \"idle\"\n assert status[\"health\"][\"status\"] == \"ok\"\n assert status[\"config\"] == {\"platform\": {\"workers\": 1}, \"log\": status[\"config\"][\"log\"]}", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_runtime.py:test_runtime_runs_worker_routine_and_exposes_status", + "span_start": 191, + "span_end": 223, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 7, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _build_runtime(worker: Worker, *, control_timeout: int = 1) -> tuple[RuntimeManager, str]:\n runtime = RuntimeManager()\n channel = HttpControlChannel(host=\"127.0.0.1\", port=0, timeout=control_timeout)\n runtime.control_plane.register_channel(channel)\n runtime.register_module(WorkerModule(worker))\n runtime.start()\n return runtime, f\"http://127.0.0.1:{channel.port}\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_build_runtime", + "span_start": 154, + "span_end": 160, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 6, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def test_worker_wakes_up_with_configured_interval() -> None:\n interval = 0.15\n routine = IntervalRoutine()\n worker = ScenarioWorker(\"interval-worker\", routine, interval=interval)\n runtime = RuntimeManager()\n runtime.register_module(WorkerModule(worker))\n\n runtime.start()\n try:\n assert routine.wait_runs(count=3, timeout=2.0) is True\n finally:\n runtime.stop()\n\n deltas = routine.deltas()\n assert len(deltas) >= 2\n assert all(delta >= interval * 0.7 for delta in deltas[:2])", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:test_worker_wakes_up_with_configured_interval", + "span_start": 163, + "span_end": 178, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 7, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class BlockingRoutine:\n def __init__(self, started: Event, release: Event) -> None:\n self._started = started\n self._release = release\n\n def run(self) -> None:\n self._started.set()\n self._release.wait(timeout=5.0)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:BlockingRoutine", + "span_start": 40, + "span_end": 47, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class ScenarioWorker(Worker):\n def __init__(self, name: str, routine: object, *, interval: float = 0.05) -> None:\n self._name = name\n self._routine = routine\n self._interval = interval\n self._thread: Thread | None = None\n self._stop_requested = Event()\n self._in_flight = 0\n self._runs = 0\n self._lock = Lock()\n\n @property\n def name(self) -> str:\n return self._name\n\n @property\n def critical(self) -> bool:\n return True\n\n def start(self) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._stop_requested.clear()\n self._thread = Thread(target=self._loop, name=f\"{self._name}-thread\", daemon=True)\n self._thread.start()\n\n def stop(self, force: bool = False) -> None:\n self._stop_requested.set()\n\n def health(self) -> WorkerHealth:\n return WorkerHealth(name=self.name, status=\"ok\", critical=True, meta={\"runs\": self._runs})\n\n def status(self) -> WorkerStatus:\n thread_alive = self._thread is not None and self._thread.is_alive()\n with self._lock:\n in_flight = self._in_flight\n runs = self._runs\n if not thread_alive:\n state = \"stopped\"\n elif self._stop_requested.is_set():\n state = \"stopping\"\n elif in_flight > 0:\n state = \"busy\"\n else:\n state = \"idle\"\n return WorkerStatus(name=self.name, state=state, in_flight=in_flight, meta={\"runs\": runs})\n\n def _loop(self) -> None:\n while not self._stop_requested.is_set():\n with self._lock:\n self._in_flight += 1\n try:\n self._routine.run()\n with self._lock:\n self._runs += 1\n finally:\n with self._lock:\n self._in_flight -= 1\n if self._stop_requested.is_set():\n return\n sleep(self._interval)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:ScenarioWorker", + "span_start": 50, + "span_end": 110, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 2, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class WorkerModule(ApplicationModule):\n def __init__(self, worker: Worker) -> None:\n self._worker = worker\n\n @property\n def name(self) -> str:\n return \"business-tests\"\n\n def register(self, registry: ModuleRegistry) -> None:\n registry.add_worker(self._worker)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:WorkerModule", + "span_start": 113, + "span_end": 122, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 3, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _http_call_json(\n base_url: str,\n path: str,\n *,\n method: str = \"GET\",\n headers: dict[str, str] | None = None,\n) -> tuple[int, dict[str, object]]:\n request = Request(f\"{base_url}{path}\", method=method, headers=headers or {})\n try:\n with urlopen(request, timeout=15.0) as response:\n status = response.status\n body = response.read()\n except HTTPError as error:\n status = error.code\n body = error.read()\n payload = json.loads(body.decode(\"utf-8\"))\n return status, payload", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_http_call_json", + "span_start": 125, + "span_end": 141, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 4, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class IntervalRoutine:\n calls: list[float] = field(default_factory=list)\n _lock: Lock = field(default_factory=Lock)\n\n def run(self) -> None:\n with self._lock:\n self.calls.append(monotonic())\n\n def wait_runs(self, count: int, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n with self._lock:\n if len(self.calls) >= count:\n return True\n sleep(0.01)\n return False\n\n def deltas(self) -> list[float]:\n with self._lock:\n return [self.calls[index + 1] - self.calls[index] for index in range(len(self.calls) - 1)]", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:IntervalRoutine", + "span_start": 18, + "span_end": 37, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _poll_until_stopped(base_url: str, timeout: float = 2.0) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n _, payload = _http_call_json(base_url, \"/actions/status\")\n if payload.get(\"detail\") == \"stopped\":\n return True\n sleep(0.05)\n return False", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_poll_until_stopped", + "span_start": 144, + "span_end": 151, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 5, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "Прямые тесты для `RuntimeManager` найдены в следующих местах:\n\n1. **tests/test_runtime.py:** \n - `test_runtime_graceful_stop_waits_until_worker_finishes`: Проверяет корректность остановки `RuntimeManager`, ожидание завершения работником (worker).\n - `test_runtime_runs_worker_routine_and_exposes_status`: Тестирует запуск рутины работника (`worker routine`) и отображение статуса работы через интерфейс состояния (`status interface`).\n \nЭти тесты непосредственно взаимодействуют с реализацией класса `RuntimeManager`.\n\n**Описание проверок:**\n- `test_runtime_graceful_stop_waits_until_worker_finishes` — проверка правильной логики поведения при остановке менеджера и завершении работником своих задач.\n- `test_runtime_runs_worker_routine_and_exposes_status` — тестирование процесса выполнения рабочего задания и доступности его результатов через статусное API.\n\n**Оценка покрытия:**\nОба теста обеспечивают хорошее покрытие основных функциональных возможностей `RuntimeManager`. Они затрагивают важные аспекты управления жизненным циклом менеджера, взаимодействия с работником и предоставления информации о состоянии системы.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C2_DEPENDENCY_GRAPH" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "test_file_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "test_symbol_patterns": [ + "test_runtime_manager", + "TestRuntimeManager", + "RuntimeManager" + ], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C0_SOURCE_CHUNKS": 10 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src", + "tests" + ], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src", + "tests" + ], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Где тесты для RuntimeManager? test_runtime_manager TestRuntimeManager RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Где тесты для RuntimeManager? test_runtime_manager TestRuntimeManager RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 10, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 0, + "candidates_after_filter": 0 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src", + "tests" + ], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src", + "tests" + ], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 10, + "candidates_after_filter": 10 + } + ], + "fallback": { + "used": true, + "reason": "scope_relaxed_no_hits" + }, + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "RuntimeManager" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "miss", + "hit_count": 0, + "fail_reason": "scope_relaxed_no_hits" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 10, + "fail_reason": null + } + ] + }, + "constraint_violations": [ + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C1_SYMBOL_CATALOG", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + } + ], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 128, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 57, + "C2_DEPENDENCY_GRAPH": 52, + "C0_SOURCE_CHUNKS": 17 + }, + "merge_rank": 0, + "prompt_build": 0, + "llm_call": 1842 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 858, + "evidence_rows": 16, + "evidence_chars": 7086 + }, + "evidence_summary": [ + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 2 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 10, + "unique_paths": 2 + } + ], + "prompt_template_id": "intent_code_qa_find_tests_ru_v1", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "RuntimeManager" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 16, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-fullchain-find-tests-runtime-manager", + "mode": "full_chain", + "run_started_at": "2026-03-12T12:02:52", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Где тесты для RuntimeManager?", + "normalized_query": "Где тесты для RuntimeManager?" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Где тесты для RuntimeManager?" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Где тесты для RuntimeManager?" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "test_file_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "test_symbol_patterns": [ + "test_runtime_manager", + "TestRuntimeManager", + "RuntimeManager" + ], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Где тесты для RuntimeManager?" + }, + "output": { + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "RuntimeManager" + ], + "confidence": 0.0 + }, + "rag_count": 16, + "rag_rows": [ + { + "path": "tests/test_runtime.py", + "content": "test_runtime_runs_worker_routine_and_exposes_status instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_runtime_runs_worker_routine_and_exposes_status:instantiates", + "span_start": 209, + "span_end": 209, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "c397a308e7824ba9fe400a754c7e15e66ea6f058d7f5d3e82bb002bb78b509d2", + "edge_type": "instantiates", + "src_symbol_id": "1c767eb5ee08e84f45b18c8ed7531ec0ed73c63fb1594823569672db7b21e992", + "src_qname": "test_runtime_runs_worker_routine_and_exposes_status", + "dst_symbol_id": "aeadc039653807b0da1ca6e3cc1078ee61cfc510b28e7f9c2ec04c59da43cc8d", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "test_runtime_graceful_stop_waits_until_worker_finishes instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_runtime_graceful_stop_waits_until_worker_finishes:instantiates", + "span_start": 229, + "span_end": 229, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "76b4701262ccaa0a7a41691407c4ebdb2ca74a2415d89f0a38ef0d4f608bda93", + "edge_type": "instantiates", + "src_symbol_id": "1076e788e4a03b10d7bc1313a8ad46caa170c13cc026c6e4de994af1a6ae57bf", + "src_qname": "test_runtime_graceful_stop_waits_until_worker_finishes", + "dst_symbol_id": "aeadc039653807b0da1ca6e3cc1078ee61cfc510b28e7f9c2ec04c59da43cc8d", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "_build_runtime instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "_build_runtime:instantiates", + "span_start": 155, + "span_end": 155, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "7eb254d564944bab6272757ee5ef688862bd321e6941e2495dc942e03b1c9a25", + "edge_type": "instantiates", + "src_symbol_id": "db94031d5245bf82be836a109b4584b43b8e83d37a0f318e03f6c8191896d469", + "src_qname": "_build_runtime", + "dst_symbol_id": "a1572ea8183dc0cd6ddbc74342bbde8c28cecfde37ad40b62feff09f8d103d11", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_worker_wakes_up_with_configured_interval instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_worker_wakes_up_with_configured_interval:instantiates", + "span_start": 167, + "span_end": 167, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "189aafc4de0b79c688668f25f0c87166a127df26bd2215452014713b65ef281a", + "edge_type": "instantiates", + "src_symbol_id": "65f877f78191d65e6a752e41cedc70ebc784c266804a55c1c56440336e1f0d6e", + "src_qname": "test_worker_wakes_up_with_configured_interval", + "dst_symbol_id": "a1572ea8183dc0cd6ddbc74342bbde8c28cecfde37ad40b62feff09f8d103d11", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_actions_stop_busy_worker_after_timeout\n -> BlockingRoutine\n -> BlockingRoutine.__init__\n -> BlockingRoutine._started\n -> BlockingRoutine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_actions_stop_busy_worker_after_timeout:dataflow_slice", + "span_start": 42, + "span_end": 238, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "8e7db3d2a9226f1c1d9942ac6373cfcafa0d2276758ddb8a3d3c455a3d58024d", + "edge_type": "dataflow_slice", + "src_symbol_id": "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "src_qname": "test_actions_stop_busy_worker_after_timeout", + "dst_symbol_id": "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04", + "dst_ref": "BlockingRoutine.run", + "resolution": "resolved", + "slice_id": "8e7db3d2a9226f1c1d9942ac6373cfcafa0d2276758ddb8a3d3c455a3d58024d", + "root_symbol_id": "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "path_symbols": [ + "test_actions_stop_busy_worker_after_timeout", + "BlockingRoutine", + "BlockingRoutine.__init__", + "BlockingRoutine._started", + "BlockingRoutine.run" + ], + "path_symbol_ids": [ + "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "a3349c5bc65e4003a4bbd6a8dbb7a54c337e12d1aed930caa701b12e520f1e67", + "486deeed3043c6db985aef258e96ddc67aa53608e67a83962fbd2471f649ddf1", + "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_actions_stop_busy_worker_before_timeout\n -> BlockingRoutine\n -> BlockingRoutine.__init__\n -> BlockingRoutine._release\n -> BlockingRoutine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_actions_stop_busy_worker_before_timeout:dataflow_slice", + "span_start": 43, + "span_end": 212, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "8bd726155ba387d3579763ee84dfd2f9a90bc917da88f3b2e89416ab5c1254d6", + "edge_type": "dataflow_slice", + "src_symbol_id": "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "src_qname": "test_actions_stop_busy_worker_before_timeout", + "dst_symbol_id": "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04", + "dst_ref": "BlockingRoutine.run", + "resolution": "resolved", + "slice_id": "8bd726155ba387d3579763ee84dfd2f9a90bc917da88f3b2e89416ab5c1254d6", + "root_symbol_id": "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "path_symbols": [ + "test_actions_stop_busy_worker_before_timeout", + "BlockingRoutine", + "BlockingRoutine.__init__", + "BlockingRoutine._release", + "BlockingRoutine.run" + ], + "path_symbol_ids": [ + "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "a3349c5bc65e4003a4bbd6a8dbb7a54c337e12d1aed930caa701b12e520f1e67", + "486deeed3043c6db985aef258e96ddc67aa53608e67a83962fbd2471f649ddf1", + "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "def test_runtime_graceful_stop_waits_until_worker_finishes() -> None:\n started = Event()\n release = Event()\n runtime = RuntimeManager()\n runtime.register_module(BlockingModule(started, release))\n runtime.start()\n assert started.wait(timeout=1.0) is True\n assert runtime.status()[\"runtime\"][\"state\"] == \"busy\"\n\n stop_thread = Thread(target=runtime.stop, kwargs={\"timeout\": 1.0}, daemon=True)\n stop_thread.start()\n sleep(0.1)\n assert stop_thread.is_alive() is True\n\n release.set()\n stop_thread.join(timeout=1.0)\n assert stop_thread.is_alive() is False\n assert runtime.status()[\"runtime\"][\"state\"] == \"stopped\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_runtime.py:test_runtime_graceful_stop_waits_until_worker_finishes", + "span_start": 226, + "span_end": 243, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 8, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "def test_runtime_runs_worker_routine_and_exposes_status(tmp_path) -> None:\n config_path = tmp_path / \"config.yml\"\n config_path.write_text(\n \"\"\"\nplatform:\n workers: 1\nlog:\n version: 1\n disable_existing_loggers: false\n handlers:\n console:\n class: logging.StreamHandler\n root:\n level: INFO\n handlers: [console]\n\"\"\".strip(),\n encoding=\"utf-8\",\n )\n runtime = RuntimeManager()\n runtime.add_config_file(config_path)\n module = ExampleModule()\n runtime.register_module(module)\n\n runtime.start()\n sleep(0.2)\n status = runtime.status()\n runtime.stop()\n\n assert module.routine.processed == [{\"id\": 1}]\n assert status[\"modules\"] == [\"example\"]\n assert status[\"runtime\"][\"state\"] == \"idle\"\n assert status[\"health\"][\"status\"] == \"ok\"\n assert status[\"config\"] == {\"platform\": {\"workers\": 1}, \"log\": status[\"config\"][\"log\"]}", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_runtime.py:test_runtime_runs_worker_routine_and_exposes_status", + "span_start": 191, + "span_end": 223, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 7, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _build_runtime(worker: Worker, *, control_timeout: int = 1) -> tuple[RuntimeManager, str]:\n runtime = RuntimeManager()\n channel = HttpControlChannel(host=\"127.0.0.1\", port=0, timeout=control_timeout)\n runtime.control_plane.register_channel(channel)\n runtime.register_module(WorkerModule(worker))\n runtime.start()\n return runtime, f\"http://127.0.0.1:{channel.port}\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_build_runtime", + "span_start": 154, + "span_end": 160, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 6, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def test_worker_wakes_up_with_configured_interval() -> None:\n interval = 0.15\n routine = IntervalRoutine()\n worker = ScenarioWorker(\"interval-worker\", routine, interval=interval)\n runtime = RuntimeManager()\n runtime.register_module(WorkerModule(worker))\n\n runtime.start()\n try:\n assert routine.wait_runs(count=3, timeout=2.0) is True\n finally:\n runtime.stop()\n\n deltas = routine.deltas()\n assert len(deltas) >= 2\n assert all(delta >= interval * 0.7 for delta in deltas[:2])", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:test_worker_wakes_up_with_configured_interval", + "span_start": 163, + "span_end": 178, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 7, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class BlockingRoutine:\n def __init__(self, started: Event, release: Event) -> None:\n self._started = started\n self._release = release\n\n def run(self) -> None:\n self._started.set()\n self._release.wait(timeout=5.0)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:BlockingRoutine", + "span_start": 40, + "span_end": 47, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class ScenarioWorker(Worker):\n def __init__(self, name: str, routine: object, *, interval: float = 0.05) -> None:\n self._name = name\n self._routine = routine\n self._interval = interval\n self._thread: Thread | None = None\n self._stop_requested = Event()\n self._in_flight = 0\n self._runs = 0\n self._lock = Lock()\n\n @property\n def name(self) -> str:\n return self._name\n\n @property\n def critical(self) -> bool:\n return True\n\n def start(self) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._stop_requested.clear()\n self._thread = Thread(target=self._loop, name=f\"{self._name}-thread\", daemon=True)\n self._thread.start()\n\n def stop(self, force: bool = False) -> None:\n self._stop_requested.set()\n\n def health(self) -> WorkerHealth:\n return WorkerHealth(name=self.name, status=\"ok\", critical=True, meta={\"runs\": self._runs})\n\n def status(self) -> WorkerStatus:\n thread_alive = self._thread is not None and self._thread.is_alive()\n with self._lock:\n in_flight = self._in_flight\n runs = self._runs\n if not thread_alive:\n state = \"stopped\"\n elif self._stop_requested.is_set():\n state = \"stopping\"\n elif in_flight > 0:\n state = \"busy\"\n else:\n state = \"idle\"\n return WorkerStatus(name=self.name, state=state, in_flight=in_flight, meta={\"runs\": runs})\n\n def _loop(self) -> None:\n while not self._stop_requested.is_set():\n with self._lock:\n self._in_flight += 1\n try:\n self._routine.run()\n with self._lock:\n self._runs += 1\n finally:\n with self._lock:\n self._in_flight -= 1\n if self._stop_requested.is_set():\n return\n sleep(self._interval)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:ScenarioWorker", + "span_start": 50, + "span_end": 110, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 2, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class WorkerModule(ApplicationModule):\n def __init__(self, worker: Worker) -> None:\n self._worker = worker\n\n @property\n def name(self) -> str:\n return \"business-tests\"\n\n def register(self, registry: ModuleRegistry) -> None:\n registry.add_worker(self._worker)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:WorkerModule", + "span_start": 113, + "span_end": 122, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 3, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _http_call_json(\n base_url: str,\n path: str,\n *,\n method: str = \"GET\",\n headers: dict[str, str] | None = None,\n) -> tuple[int, dict[str, object]]:\n request = Request(f\"{base_url}{path}\", method=method, headers=headers or {})\n try:\n with urlopen(request, timeout=15.0) as response:\n status = response.status\n body = response.read()\n except HTTPError as error:\n status = error.code\n body = error.read()\n payload = json.loads(body.decode(\"utf-8\"))\n return status, payload", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_http_call_json", + "span_start": 125, + "span_end": 141, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 4, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class IntervalRoutine:\n calls: list[float] = field(default_factory=list)\n _lock: Lock = field(default_factory=Lock)\n\n def run(self) -> None:\n with self._lock:\n self.calls.append(monotonic())\n\n def wait_runs(self, count: int, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n with self._lock:\n if len(self.calls) >= count:\n return True\n sleep(0.01)\n return False\n\n def deltas(self) -> list[float]:\n with self._lock:\n return [self.calls[index + 1] - self.calls[index] for index in range(len(self.calls) - 1)]", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:IntervalRoutine", + "span_start": 18, + "span_end": 37, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _poll_until_stopped(base_url: str, timeout: float = 2.0) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n _, payload = _http_call_json(base_url, \"/actions/status\")\n if payload.get(\"detail\") == \"stopped\":\n return True\n sleep(0.05)\n return False", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_poll_until_stopped", + "span_start": 144, + "span_end": 151, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 5, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C0_SOURCE_CHUNKS": 10 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src", + "tests" + ], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src", + "tests" + ], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Где тесты для RuntimeManager? test_runtime_manager TestRuntimeManager RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Где тесты для RuntimeManager? test_runtime_manager TestRuntimeManager RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 10, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 0, + "candidates_after_filter": 0 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src", + "tests" + ], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src", + "tests" + ], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 10, + "candidates_after_filter": 10 + } + ], + "fallback": { + "used": true, + "reason": "scope_relaxed_no_hits" + }, + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "RuntimeManager" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "miss", + "hit_count": 0, + "fail_reason": "scope_relaxed_no_hits" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 10, + "fail_reason": null + } + ] + }, + "constraint_violations": [ + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C1_SYMBOL_CATALOG", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + } + ], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 128, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 57, + "C2_DEPENDENCY_GRAPH": 52, + "C0_SOURCE_CHUNKS": 17 + }, + "merge_rank": 0 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Где тесты для RuntimeManager?", + "rag_count": 16 + }, + "output": { + "llm_answer": "Прямые тесты для `RuntimeManager` найдены в следующих местах:\n\n1. **tests/test_runtime.py:** \n - `test_runtime_graceful_stop_waits_until_worker_finishes`: Проверяет корректность остановки `RuntimeManager`, ожидание завершения работником (worker).\n - `test_runtime_runs_worker_routine_and_exposes_status`: Тестирует запуск рутины работника (`worker routine`) и отображение статуса работы через интерфейс состояния (`status interface`).\n \nЭти тесты непосредственно взаимодействуют с реализацией класса `RuntimeManager`.\n\n**Описание проверок:**\n- `test_runtime_graceful_stop_waits_until_worker_finishes` — проверка правильной логики поведения при остановке менеджера и завершении работником своих задач.\n- `test_runtime_runs_worker_routine_and_exposes_status` — тестирование процесса выполнения рабочего задания и доступности его результатов через статусное API.\n\n**Оценка покрытия:**\nОба теста обеспечивают хорошее покрытие основных функциональных возможностей `RuntimeManager`. Они затрагивают важные аспекты управления жизненным циклом менеджера, взаимодействия с работником и предоставления информации о состоянии системы." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 858, + "evidence_rows": 16, + "evidence_chars": 7086 + }, + "evidence_summary": [ + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 2 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 10, + "unique_paths": 2 + } + ], + "prompt_template_id": "intent_code_qa_find_tests_ru_v1", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 1842 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_120252/full_chain_plba_code_subintents_plba-fullchain-find-tests-runtime-manager.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_120252/full_chain_plba_code_subintents_plba-fullchain-find-tests-runtime-manager.md new file mode 100644 index 0000000..06292fb --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_120252/full_chain_plba_code_subintents_plba-fullchain-find-tests-runtime-manager.md @@ -0,0 +1,32 @@ +# plba-fullchain-find-tests-runtime-manager + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Где тесты для RuntimeManager? + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 16, + "llm_answer": "Прямые тесты для `RuntimeManager` найдены в следующих местах:\n\n1. **tests/test_runtime.py:** \n - `test_runtime_graceful_stop_waits_until_worker_finishes`: Проверяет корректность остановки `RuntimeManager`, ожидание завершения работником (worker).\n - `test_runtime_runs_worker_routine_and_exposes_status`: Тестирует запуск рутины работника (`worker routine`) и отображение статуса работы через интерфейс состояния (`status interface`).\n \nЭти тесты непосредственно взаимодействуют с реализацией класса `RuntimeManager`.\n\n**Описание проверок:**\n- `test_runtime_graceful_stop_waits_until_worker_finishes` — проверка правильной логики поведения при остановке менеджера и завершении работником своих задач.\n- `test_runtime_runs_worker_routine_and_exposes_status` — тестирование процесса выполнения рабочего задания и доступности его результатов через статусное API.\n\n**Оценка покрытия:**\nОба теста обеспечивают хорошее покрытие основных функциональных возможностей `RuntimeManager`. Они затрагивают важные аспекты управления жизненным циклом менеджера, взаимодействия с работником и предоставления информации о состоянии системы.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_120252/full_chain_plba_code_subintents_plba-fullchain-open-file-runtime.json b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_120252/full_chain_plba_code_subintents_plba-fullchain-open-file-runtime.json new file mode 100644 index 0000000..0c3cd0b --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_120252/full_chain_plba_code_subintents_plba-fullchain-open-file-runtime.json @@ -0,0 +1,492 @@ +{ + "case_id": "plba-fullchain-open-file-runtime", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 1, + "llm_answer": "Файл `src/app_runtime/core/runtime.py` содержит определение класса `RuntimeManager`, управляющего выполнением приложения в runtime режиме.\n\n## Важные сущности и их значение:\n- **ConfigurationManager**: управляет конфигурацией приложения.\n- **ServiceContainer**: контейнер сервисов, используемых приложением.\n- **TraceService**: сервис отслеживания трассировок выполнения программы.\n- **HealthRegistry**: регистрирует состояние здоровья компонентов системы.\n- **LogManager**: менеджер логирования событий.\n- **WorkerSupervisor**: супервизор рабочих процессов.\n- **ControlPlaneService**: компонент управления системой.\n- **ModuleRegistry**: реестр модулей, зарегистрированных в системе.\n- **LifecycleState**: состояния жизненного цикла менеджера (например, IDLE).\n \nЭтот класс отвечает за инициализацию и управление основными компонентами приложения во время его исполнения. Важно отметить метод `__init__`, который устанавливает начальные значения свойств объекта и вызывает метод `_register_core_services()`. \n\nОтвет основан на доступных фрагментах файла `src/app_runtime/core/runtime.py`.", + "answer_mode": "answered", + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "symbol_candidates": [], + "layers": [ + "C0_SOURCE_CHUNKS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-fullchain-open-file-runtime", + "text": "Открой файл src/app_runtime/core/runtime.py", + "mode": "full_chain", + "run_started_at": "2026-03-12T12:02:52", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Открой файл src/app_runtime/core/runtime.py", + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [], + "confidence": 0.0 + }, + "rag_count": 1, + "rag_rows": [ + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "Файл `src/app_runtime/core/runtime.py` содержит определение класса `RuntimeManager`, управляющего выполнением приложения в runtime режиме.\n\n## Важные сущности и их значение:\n- **ConfigurationManager**: управляет конфигурацией приложения.\n- **ServiceContainer**: контейнер сервисов, используемых приложением.\n- **TraceService**: сервис отслеживания трассировок выполнения программы.\n- **HealthRegistry**: регистрирует состояние здоровья компонентов системы.\n- **LogManager**: менеджер логирования событий.\n- **WorkerSupervisor**: супервизор рабочих процессов.\n- **ControlPlaneService**: компонент управления системой.\n- **ModuleRegistry**: реестр модулей, зарегистрированных в системе.\n- **LifecycleState**: состояния жизненного цикла менеджера (например, IDLE).\n \nЭтот класс отвечает за инициализацию и управление основными компонентами приложения во время его исполнения. Важно отметить метод `__init__`, который устанавливает начальные значения свойств объекта и вызывает метод `_register_core_services()`. \n\nОтвет основан на доступных фрагментах файла `src/app_runtime/core/runtime.py`.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "unknown", + "symbol_candidates": [], + "keyword_hints": [], + "path_hints": [ + "src/app_runtime/core/runtime.py" + ], + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/app_runtime/core/runtime.py" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": false, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C0_SOURCE_CHUNKS": 200 + }, + "filters_by_layer": { + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "include_globs": [], + "exclude_globs": [], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Открой файл src/app_runtime/core/runtime.py", + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "include_globs": [], + "exclude_globs": [], + "prefer_globs": [], + "top_k": 200, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "normalized_include_globs": [], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [] + }, + "layers": [ + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 129, + "retrieval_by_layer": { + "C0_SOURCE_CHUNKS": 129 + }, + "merge_rank": 0, + "prompt_build": 0, + "llm_call": 1603 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 555, + "evidence_rows": 1, + "evidence_chars": 6265 + }, + "evidence_summary": [ + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_open_file_ru_v1", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [], + "path_scope": [ + "src/app_runtime/core/runtime.py" + ] + }, + "llm": { + "used_evidence_count": 1, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-fullchain-open-file-runtime", + "mode": "full_chain", + "run_started_at": "2026-03-12T12:02:52", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Открой файл src/app_runtime/core/runtime.py", + "normalized_query": "Открой файл src/app_runtime/core/runtime.py" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Открой файл src/app_runtime/core/runtime.py" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Открой файл src/app_runtime/core/runtime.py" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "unknown", + "symbol_candidates": [], + "keyword_hints": [], + "path_hints": [ + "src/app_runtime/core/runtime.py" + ], + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/app_runtime/core/runtime.py" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": false, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Открой файл src/app_runtime/core/runtime.py" + }, + "output": { + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [], + "confidence": 0.0 + }, + "rag_count": 1, + "rag_rows": [ + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C0_SOURCE_CHUNKS": 200 + }, + "filters_by_layer": { + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "include_globs": [], + "exclude_globs": [], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Открой файл src/app_runtime/core/runtime.py", + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "include_globs": [], + "exclude_globs": [], + "prefer_globs": [], + "top_k": 200, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "normalized_include_globs": [], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [] + }, + "layers": [ + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 129, + "retrieval_by_layer": { + "C0_SOURCE_CHUNKS": 129 + }, + "merge_rank": 0 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Открой файл src/app_runtime/core/runtime.py", + "rag_count": 1 + }, + "output": { + "llm_answer": "Файл `src/app_runtime/core/runtime.py` содержит определение класса `RuntimeManager`, управляющего выполнением приложения в runtime режиме.\n\n## Важные сущности и их значение:\n- **ConfigurationManager**: управляет конфигурацией приложения.\n- **ServiceContainer**: контейнер сервисов, используемых приложением.\n- **TraceService**: сервис отслеживания трассировок выполнения программы.\n- **HealthRegistry**: регистрирует состояние здоровья компонентов системы.\n- **LogManager**: менеджер логирования событий.\n- **WorkerSupervisor**: супервизор рабочих процессов.\n- **ControlPlaneService**: компонент управления системой.\n- **ModuleRegistry**: реестр модулей, зарегистрированных в системе.\n- **LifecycleState**: состояния жизненного цикла менеджера (например, IDLE).\n \nЭтот класс отвечает за инициализацию и управление основными компонентами приложения во время его исполнения. Важно отметить метод `__init__`, который устанавливает начальные значения свойств объекта и вызывает метод `_register_core_services()`. \n\nОтвет основан на доступных фрагментах файла `src/app_runtime/core/runtime.py`." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 555, + "evidence_rows": 1, + "evidence_chars": 6265 + }, + "evidence_summary": [ + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_open_file_ru_v1", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 1603 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_120252/full_chain_plba_code_subintents_plba-fullchain-open-file-runtime.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_120252/full_chain_plba_code_subintents_plba-fullchain-open-file-runtime.md new file mode 100644 index 0000000..82d1037 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_120252/full_chain_plba_code_subintents_plba-fullchain-open-file-runtime.md @@ -0,0 +1,30 @@ +# plba-fullchain-open-file-runtime + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Открой файл src/app_runtime/core/runtime.py + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 1, + "llm_answer": "Файл `src/app_runtime/core/runtime.py` содержит определение класса `RuntimeManager`, управляющего выполнением приложения в runtime режиме.\n\n## Важные сущности и их значение:\n- **ConfigurationManager**: управляет конфигурацией приложения.\n- **ServiceContainer**: контейнер сервисов, используемых приложением.\n- **TraceService**: сервис отслеживания трассировок выполнения программы.\n- **HealthRegistry**: регистрирует состояние здоровья компонентов системы.\n- **LogManager**: менеджер логирования событий.\n- **WorkerSupervisor**: супервизор рабочих процессов.\n- **ControlPlaneService**: компонент управления системой.\n- **ModuleRegistry**: реестр модулей, зарегистрированных в системе.\n- **LifecycleState**: состояния жизненного цикла менеджера (например, IDLE).\n \nЭтот класс отвечает за инициализацию и управление основными компонентами приложения во время его исполнения. Важно отметить метод `__init__`, который устанавливает начальные значения свойств объекта и вызывает метод `_register_core_services()`. \n\nОтвет основан на доступных фрагментах файла `src/app_runtime/core/runtime.py`.", + "answer_mode": "answered", + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "symbol_candidates": [], + "layers": [ + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_120252/full_chain_plba_code_subintents_plba-fullchain-trace-flow-runtime-manager.json b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_120252/full_chain_plba_code_subintents_plba-fullchain-trace-flow-runtime-manager.json new file mode 100644 index 0000000..a814d48 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_120252/full_chain_plba_code_subintents_plba-fullchain-trace-flow-runtime-manager.json @@ -0,0 +1,2964 @@ +{ + "case_id": "plba-fullchain-trace-flow-runtime-manager", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "TRACE_FLOW", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 23, + "llm_answer": "## Шаги потока выполнения для `RuntimeManager`\n\n1. **Начало**: Точка вызова находится в файле `http_app.py` метода `app.post`, который является точкой входа (`C3_ENTRYPOINTS`).\n \n2. **Первый этап**:\n - Вызывается инициализация объекта класса `RuntimeManager` через конструктор `RuntimeManager.__init__`.\n - Источник: [C2_DEPENDENCY_GRAPH]\n - Конструктор принимает параметры конфигурации, сервисов, трассировки, состояния здоровья, логирования, управления рабочими процессами и контрольной плоскости.\n - Эти параметры могут быть переданы напрямую при вызове конструктора или использованы предустановленные значения по умолчанию.\n\n3. **Второй этап**:\n - Внутри конструктора выполняется инициализация атрибутов экземпляра объекта:\n - self.configuration\n - self.services\n - self.traces\n - self.health\n - self.logs\n - self.workers\n - self.control_plane\n - Остальные свойства также инициализируются с заданными значениями.\n\n4. **Третий этап**:\n - После инициализации атрибутов объект вызывает метод `_register_core_services()`, чтобы зарегистрировать основные сервисы.\n - Это действие подразумевает дальнейшее управление и координацию работы различных компонентов системы.\n\n5. **Завершение**:\n - Поток завершается после завершения регистрации основных сервисов и настройки всех необходимых внутренних атрибутов и связей внутри объекта `RuntimeManager`.\n\n## Недостатки информации\n\nНа данный момент отсутствует явная информация о том, как именно методы `add_config_file`, `register_module` и другие используемые внутри конструктора взаимодействуют друг с другом и внешними системами. Более детальная документация по этим методам помогла бы лучше понять детали их использования и зависимость от внешних факторов.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-fullchain-trace-flow-runtime-manager", + "text": "Покажи поток выполнения RuntimeManager", + "mode": "full_chain", + "run_started_at": "2026-03-12T12:02:52", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Покажи поток выполнения RuntimeManager", + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ], + "confidence": 0.99 + }, + "rag_count": 23, + "rag_rows": [ + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager\nRuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "qname": "RuntimeManager", + "kind": "class", + "signature": "RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests manager\n- orchestrates role-like calls (4)\n- reads and writes state attributes\n- participates in dataflow slices (50)", + "layer": "C4_SEMANTIC_ROLES", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 43, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "symbol_name": "RuntimeManager", + "qname": "RuntimeManager", + "role": "pipeline_stage", + "confidence": 0.67, + "dataflow_participation": 50, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 52, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.services\n -> RuntimeManager.__init__", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 33, + "span_end": 39, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d43af85989222ee6d788ce418cdcb217c7ff044cfb915e3bdbd184417dc7bd61", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "dst_ref": "RuntimeManager.__init__", + "resolution": "resolved", + "slice_id": "d43af85989222ee6d788ce418cdcb217c7ff044cfb915e3bdbd184417dc7bd61", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.services", + "RuntimeManager.__init__" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 59, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1", + "dst_ref": "RuntimeManager.start", + "resolution": "resolved", + "slice_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.start" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager._register_core_services", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 127, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6", + "dst_ref": "RuntimeManager._register_core_services", + "resolution": "resolved", + "slice_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager._register_core_services" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.services\n -> RuntimeManager._register_core_services", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 33, + "span_end": 127, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "aac6f9dda73963b977083a892bee39a48eca4fbd7404787e022ecf4ebedec65d", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6", + "dst_ref": "RuntimeManager._register_core_services", + "resolution": "resolved", + "slice_id": "aac6f9dda73963b977083a892bee39a48eca4fbd7404787e022ecf4ebedec65d", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.services", + "RuntimeManager._register_core_services" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "## Шаги потока выполнения для `RuntimeManager`\n\n1. **Начало**: Точка вызова находится в файле `http_app.py` метода `app.post`, который является точкой входа (`C3_ENTRYPOINTS`).\n \n2. **Первый этап**:\n - Вызывается инициализация объекта класса `RuntimeManager` через конструктор `RuntimeManager.__init__`.\n - Источник: [C2_DEPENDENCY_GRAPH]\n - Конструктор принимает параметры конфигурации, сервисов, трассировки, состояния здоровья, логирования, управления рабочими процессами и контрольной плоскости.\n - Эти параметры могут быть переданы напрямую при вызове конструктора или использованы предустановленные значения по умолчанию.\n\n3. **Второй этап**:\n - Внутри конструктора выполняется инициализация атрибутов экземпляра объекта:\n - self.configuration\n - self.services\n - self.traces\n - self.health\n - self.logs\n - self.workers\n - self.control_plane\n - Остальные свойства также инициализируются с заданными значениями.\n\n4. **Третий этап**:\n - После инициализации атрибутов объект вызывает метод `_register_core_services()`, чтобы зарегистрировать основные сервисы.\n - Это действие подразумевает дальнейшее управление и координацию работы различных компонентов системы.\n\n5. **Завершение**:\n - Поток завершается после завершения регистрации основных сервисов и настройки всех необходимых внутренних атрибутов и связей внутри объекта `RuntimeManager`.\n\n## Недостатки информации\n\nНа данный момент отсутствует явная информация о том, как именно методы `add_config_file`, `register_module` и другие используемые внутри конструктора взаимодействуют друг с другом и внешними системами. Более детальная документация по этим методам помогла бы лучше понять детали их использования и зависимость от внешних факторов.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "TRACE_FLOW", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS", + "C4_SEMANTIC_ROLES" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "TRACE_FLOW", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 10, + "C3_ENTRYPOINTS": 10 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Покажи поток выполнения RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "Покажи поток выполнения RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Покажи поток выполнения RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 10, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "Покажи поток выполнения RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 10, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 10, + "candidates_after_filter": 10 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 8, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 10, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 129, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 39, + "C0_SOURCE_CHUNKS": 14, + "C4_SEMANTIC_ROLES": 13, + "C2_DEPENDENCY_GRAPH": 52, + "C3_ENTRYPOINTS": 8 + }, + "merge_rank": 16, + "prompt_build": 0, + "llm_call": 2658 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 766, + "evidence_rows": 23, + "evidence_chars": 8302 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 8, + "unique_paths": 7 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 10, + "unique_paths": 2 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_trace_flow_ru_v1", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "RuntimeManager" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 23, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-fullchain-trace-flow-runtime-manager", + "mode": "full_chain", + "run_started_at": "2026-03-12T12:02:52", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Покажи поток выполнения RuntimeManager", + "normalized_query": "Покажи поток выполнения RuntimeManager" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Покажи поток выполнения RuntimeManager" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Покажи поток выполнения RuntimeManager" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "TRACE_FLOW", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Покажи поток выполнения RuntimeManager" + }, + "output": { + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ], + "confidence": 0.99 + }, + "rag_count": 23, + "rag_rows": [ + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager\nRuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "qname": "RuntimeManager", + "kind": "class", + "signature": "RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests manager\n- orchestrates role-like calls (4)\n- reads and writes state attributes\n- participates in dataflow slices (50)", + "layer": "C4_SEMANTIC_ROLES", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 43, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "symbol_name": "RuntimeManager", + "qname": "RuntimeManager", + "role": "pipeline_stage", + "confidence": 0.67, + "dataflow_participation": 50, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 52, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.services\n -> RuntimeManager.__init__", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 33, + "span_end": 39, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d43af85989222ee6d788ce418cdcb217c7ff044cfb915e3bdbd184417dc7bd61", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "dst_ref": "RuntimeManager.__init__", + "resolution": "resolved", + "slice_id": "d43af85989222ee6d788ce418cdcb217c7ff044cfb915e3bdbd184417dc7bd61", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.services", + "RuntimeManager.__init__" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 59, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1", + "dst_ref": "RuntimeManager.start", + "resolution": "resolved", + "slice_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.start" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager._register_core_services", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 127, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6", + "dst_ref": "RuntimeManager._register_core_services", + "resolution": "resolved", + "slice_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager._register_core_services" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.services\n -> RuntimeManager._register_core_services", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 33, + "span_end": 127, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "aac6f9dda73963b977083a892bee39a48eca4fbd7404787e022ecf4ebedec65d", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6", + "dst_ref": "RuntimeManager._register_core_services", + "resolution": "resolved", + "slice_id": "aac6f9dda73963b977083a892bee39a48eca4fbd7404787e022ecf4ebedec65d", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.services", + "RuntimeManager._register_core_services" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 10, + "C3_ENTRYPOINTS": 10 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Покажи поток выполнения RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "Покажи поток выполнения RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Покажи поток выполнения RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 10, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "Покажи поток выполнения RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 10, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 10, + "candidates_after_filter": 10 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 8, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 10, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 129, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 39, + "C0_SOURCE_CHUNKS": 14, + "C4_SEMANTIC_ROLES": 13, + "C2_DEPENDENCY_GRAPH": 52, + "C3_ENTRYPOINTS": 8 + }, + "merge_rank": 16 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Покажи поток выполнения RuntimeManager", + "rag_count": 23 + }, + "output": { + "llm_answer": "## Шаги потока выполнения для `RuntimeManager`\n\n1. **Начало**: Точка вызова находится в файле `http_app.py` метода `app.post`, который является точкой входа (`C3_ENTRYPOINTS`).\n \n2. **Первый этап**:\n - Вызывается инициализация объекта класса `RuntimeManager` через конструктор `RuntimeManager.__init__`.\n - Источник: [C2_DEPENDENCY_GRAPH]\n - Конструктор принимает параметры конфигурации, сервисов, трассировки, состояния здоровья, логирования, управления рабочими процессами и контрольной плоскости.\n - Эти параметры могут быть переданы напрямую при вызове конструктора или использованы предустановленные значения по умолчанию.\n\n3. **Второй этап**:\n - Внутри конструктора выполняется инициализация атрибутов экземпляра объекта:\n - self.configuration\n - self.services\n - self.traces\n - self.health\n - self.logs\n - self.workers\n - self.control_plane\n - Остальные свойства также инициализируются с заданными значениями.\n\n4. **Третий этап**:\n - После инициализации атрибутов объект вызывает метод `_register_core_services()`, чтобы зарегистрировать основные сервисы.\n - Это действие подразумевает дальнейшее управление и координацию работы различных компонентов системы.\n\n5. **Завершение**:\n - Поток завершается после завершения регистрации основных сервисов и настройки всех необходимых внутренних атрибутов и связей внутри объекта `RuntimeManager`.\n\n## Недостатки информации\n\nНа данный момент отсутствует явная информация о том, как именно методы `add_config_file`, `register_module` и другие используемые внутри конструктора взаимодействуют друг с другом и внешними системами. Более детальная документация по этим методам помогла бы лучше понять детали их использования и зависимость от внешних факторов." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 766, + "evidence_rows": 23, + "evidence_chars": 8302 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 8, + "unique_paths": 7 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 10, + "unique_paths": 2 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_trace_flow_ru_v1", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 2658 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_120252/full_chain_plba_code_subintents_plba-fullchain-trace-flow-runtime-manager.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_120252/full_chain_plba_code_subintents_plba-fullchain-trace-flow-runtime-manager.md new file mode 100644 index 0000000..2e1509b --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_120252/full_chain_plba_code_subintents_plba-fullchain-trace-flow-runtime-manager.md @@ -0,0 +1,34 @@ +# plba-fullchain-trace-flow-runtime-manager + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Покажи поток выполнения RuntimeManager + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "TRACE_FLOW", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 23, + "llm_answer": "## Шаги потока выполнения для `RuntimeManager`\n\n1. **Начало**: Точка вызова находится в файле `http_app.py` метода `app.post`, который является точкой входа (`C3_ENTRYPOINTS`).\n \n2. **Первый этап**:\n - Вызывается инициализация объекта класса `RuntimeManager` через конструктор `RuntimeManager.__init__`.\n - Источник: [C2_DEPENDENCY_GRAPH]\n - Конструктор принимает параметры конфигурации, сервисов, трассировки, состояния здоровья, логирования, управления рабочими процессами и контрольной плоскости.\n - Эти параметры могут быть переданы напрямую при вызове конструктора или использованы предустановленные значения по умолчанию.\n\n3. **Второй этап**:\n - Внутри конструктора выполняется инициализация атрибутов экземпляра объекта:\n - self.configuration\n - self.services\n - self.traces\n - self.health\n - self.logs\n - self.workers\n - self.control_plane\n - Остальные свойства также инициализируются с заданными значениями.\n\n4. **Третий этап**:\n - После инициализации атрибутов объект вызывает метод `_register_core_services()`, чтобы зарегистрировать основные сервисы.\n - Это действие подразумевает дальнейшее управление и координацию работы различных компонентов системы.\n\n5. **Завершение**:\n - Поток завершается после завершения регистрации основных сервисов и настройки всех необходимых внутренних атрибутов и связей внутри объекта `RuntimeManager`.\n\n## Недостатки информации\n\nНа данный момент отсутствует явная информация о том, как именно методы `add_config_file`, `register_module` и другие используемые внутри конструктора взаимодействуют друг с другом и внешними системами. Более детальная документация по этим методам помогла бы лучше понять детали их использования и зависимость от внешних факторов.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_120252/summary.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_120252/summary.md new file mode 100644 index 0000000..95a72ac --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_120252/summary.md @@ -0,0 +1,40 @@ +# pipeline_setup_v2 summary + +Passed: 7/7 + + +| File | Case | Query | Expected sub-intent | Intent | Actual sub-intent | RAG layers | Pass | +| ------------------------------------ | -------------------------------------------- | -------------------------------------------------------------------------------- | ------------------- | ------- | ----------------- | ------------------------------------------------------------------------------------------------------ | ---- | +| full_chain_plba_code_subintents.yaml | plba-fullchain-open-file-runtime | Открой файл src/app_runtime/core/runtime.py | OPEN_FILE | CODE_QA | OPEN_FILE | C0_SOURCE_CHUNKS:1 | ✓ | +| full_chain_plba_code_subintents.yaml | plba-fullchain-explain-runtime-manager | Объясни как работает класс RuntimeManager | EXPLAIN | CODE_QA | EXPLAIN | C0_SOURCE_CHUNKS:1, C1_SYMBOL_CATALOG:1, C2_DEPENDENCY_GRAPH:6, C3_ENTRYPOINTS:3, C4_SEMANTIC_ROLES:1 | ✓ | +| full_chain_plba_code_subintents.yaml | plba-fullchain-find-tests-runtime-manager | Где тесты для RuntimeManager? | FIND_TESTS | CODE_QA | FIND_TESTS | C0_SOURCE_CHUNKS:10, C2_DEPENDENCY_GRAPH:6 | ✓ | +| full_chain_plba_code_subintents.yaml | plba-fullchain-find-entrypoints | Найди точки входа в коде | FIND_ENTRYPOINTS | CODE_QA | FIND_ENTRYPOINTS | C0_SOURCE_CHUNKS:6, C3_ENTRYPOINTS:3 | ✓ | +| full_chain_plba_code_subintents.yaml | plba-fullchain-trace-flow-runtime-manager | Покажи поток выполнения RuntimeManager | TRACE_FLOW | CODE_QA | TRACE_FLOW | C0_SOURCE_CHUNKS:1, C1_SYMBOL_CATALOG:1, C2_DEPENDENCY_GRAPH:10, C3_ENTRYPOINTS:3, C4_SEMANTIC_ROLES:8 | ✓ | +| full_chain_plba_code_subintents.yaml | plba-fullchain-architecture-control-plane | Какие компоненты участвуют в RuntimeManager? | ARCHITECTURE | CODE_QA | ARCHITECTURE | C0_SOURCE_CHUNKS:1, C1_SYMBOL_CATALOG:1, C2_DEPENDENCY_GRAPH:8, C3_ENTRYPOINTS:3, C4_SEMANTIC_ROLES:12 | ✓ | +| full_chain_plba_code_subintents.yaml | plba-fullchain-explain-local-runtime-manager | Почему в файле src/app_runtime/core/runtime.py класс RuntimeManager устроен так? | EXPLAIN_LOCAL | CODE_QA | EXPLAIN_LOCAL | C0_SOURCE_CHUNKS:1, C1_SYMBOL_CATALOG:1, C2_DEPENDENCY_GRAPH:4 | ✓ | + + +## LLM Answers + +- **plba-fullchain-open-file-runtime** +Query: Открой файл src/app_runtime/core/runtime.py + > Файл `src/app_runtime/core/runtime.py` содержит определение класса `RuntimeManager`, управляющего выполнением приложения в runtime режиме. ## Важные сущности и их значение: - **ConfigurationManager**: управляет конфигурацией приложения. - **ServiceContainer**: контейнер сервисов, используемых приложением. - **TraceService**: сервис отслеживания трассировок выполнения программы. - **HealthRegistry**: регистрирует состояние здоровья компонентов системы. - **LogManager**: менеджер логирования событий. - **WorkerSupervisor**: супервизор рабочих процессов. - **ControlPlaneService**: компонент управления системой. - **ModuleRegistry**: реестр модулей, зарегистрированных в системе. - **LifecycleState**: состояния жизненного цикла менеджера (например, IDLE). Этот класс отвечает за инициализацию и управление основными компонентами приложения во время его исполнения. Важно отм… +- **plba-fullchain-explain-runtime-manager** +Query: Объясни как работает класс RuntimeManager + > ## Назначение Класс `RuntimeManager` играет роль менеджера выполнения приложения, координирующего различные компоненты и сервисы, необходимые для управления жизненным циклом runtime-среды. Он отвечает за регистрацию сервисов, управление их состоянием и координацию действий по выполнению бизнес-процессов. ## Ключевые зависимости Ключевыми зависимостями класса являются следующие сущности и библиотеки: - **ConfigurationManager** (`configuration`) — управляет конфигурацией runtime-среды. - **ServiceContainer** (`services`) — контейнер сервисов, предоставляющий доступ к различным сервисам runtime. - **TraceService** (`traces`) — сервис отслеживания событий и трассировки выполнения задач. - **HealthRegistry** (`health`) — служба мониторинга состояния и здоровья runtime-среды. - **LogManager** (`logs`) — менеджер логирования событий и сообщений от runtime-среды. - **WorkerS… +- **plba-fullchain-find-tests-runtime-manager** +Query: Где тесты для RuntimeManager? + > Прямые тесты для `RuntimeManager` найдены в следующих местах: 1. **tests/test_runtime.py:** - `test_runtime_graceful_stop_waits_until_worker_finishes`: Проверяет корректность остановки `RuntimeManager`, ожидание завершения работником (worker). - `test_runtime_runs_worker_routine_and_exposes_status`: Тестирует запуск рутины работника (`worker routine`) и отображение статуса работы через интерфейс состояния (`status interface`). Эти тесты непосредственно взаимодействуют с реализацией класса `RuntimeManager`. **Описание проверок:** - `test_runtime_graceful_stop_waits_until_worker_finishes` — проверка правильной логики поведения при остановке менеджера и завершении работником своих задач. - `test_runtime_runs_worker_routine_and_exposes_status` — тестирование процесса выполнения рабочего задания и доступности его результатов через статусное API. **Оценка покрытия:** Оба т… +- **plba-fullchain-find-entrypoints** +Query: Найди точки входа в коде + > ## Финальный ответ: На основании предоставленного контекста и слоев анализа RAG, удалось выявить следующие **точки входа** и их возможные роли: ### 1. `src/app_runtime/control/http_app.py` - **app.post**: - Роль: Обработчик HTTP POST-запросов FastAPI. Вероятно, используется для приема данных от клиента и инициирования последующих шагов обработки (например, вызова функций, выполняющих бизнес-логику). - **app.get**: - Роль: Обработчик HTTP GET-запросов FastAPI. Аналогично предыдущему пункту, вероятно обрабатывает запросы на получение информации. ### Наиболее вероятные точки входа: Эти две точки (`app.post` и `app.get`) выглядят наиболее вероятными местами начальной обработки запросов в системе, поскольку они явно указаны в слое `C3_ENTRYPOINTS`. --- Обратите внимание, что слой `C0_SOURCE_CHUNKS` содержит классы и функции без явных упоминаний точек входа, поэтому требуе… +- **plba-fullchain-trace-flow-runtime-manager** +Query: Покажи поток выполнения RuntimeManager + > ## Шаги потока выполнения для `RuntimeManager` 1. **Начало**: Точка вызова находится в файле `http_app.py` метода `app.post`, который является точкой входа (`C3_ENTRYPOINTS`). 2. **Первый этап**: - Вызывается инициализация объекта класса `RuntimeManager` через конструктор `RuntimeManager.__init_`_. - Источник: [C2_DEPENDENCY_GRAPH] - Конструктор принимает параметры конфигурации, сервисов, трассировки, состояния здоровья, логирования, управления рабочими процессами и контрольной плоскости. - Эти параметры могут быть переданы напрямую при вызове конструктора или использованы предустановленные значения по умолчанию. 3. **Второй этап**: - Внутри конструктора выполняется инициализация атрибутов экземпляра объекта: - self.configuration - self.services - self.traces - self.health - self.logs - self.workers - self.control_plane - Остальные свойства также инициализируются с з… +- **plba-fullchain-architecture-control-plane** +Query: Какие компоненты участвуют в RuntimeManager? + > ## Архитектурное объяснение подсистемы RuntimeManager ### Основные компоненты и их роли 1. **RuntimeManager** - Роль: Pipeline stage (этап конвейера). - Описание: Менеджер, отвечающий за оркестровку и координацию ролей-подсистем, участвующих в выполнении бизнес-требований. Читает и записывает состояние атрибутов системы, участвует в потоках данных. 2. **ControlActionSet** - Роль: Модель поведения системы. - Описание: Базовый класс для определения действий управления системой, реализует модель по умолчанию. ### Связи и границы ответственности - **RuntimeManager** взаимодействует с **ControlActionSet**, инициируя выполнение заданных моделей поведения через зависимости и вызовы методов модели. - Контейнер Dependency Injection (DI) обеспечивает внедрение зависимостей объектов из внешних систем или сервисов. - Потоки данных разделены на участки (slices), что позволяет раз… +- **plba-fullchain-explain-local-runtime-manager** +Query: Почему в файле src/app_runtime/core/runtime.py класс RuntimeManager устроен так? + > Класс `RuntimeManager` в файле `src/app_runtime/core/runtime.py` играет роль центрального координатора для инициализации и управления ресурсами приложения во время его выполнения. ### Что делает класс: - При создании экземпляра класса (через метод `__init_`_) происходит начальная настройка всех необходимых сервисов и компонентов через передачу параметров конфигурации (`configuration`), контейнер сервисов (`services`), сервис трассировки (`traces`), реестр здоровья (`health`), менеджер логирования (`logs`), супервизор рабочих процессов (`workers`) и служба контроля плоскости (`control_plane`). - В методе `__init__` все переданные параметры либо используются напрямую, либо заменяются дефолтными значениями при их отсутствии. Это позволяет гибко настраивать работу приложения даже без полного набора аргументов. - Важным аспектом является регистрация модулей (`self.registr… + diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_120855.zip b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_120855.zip new file mode 100644 index 0000000000000000000000000000000000000000..56af35210e71d5c066dc27d6992f948d53397e20 GIT binary patch literal 114500 zcmd?QV~{A#x9-`tjor3wd$(=dwr$(CZELq}+qS#!{=es(Idjgvb7SVi#C({F$jYj$ ztQDCnq9Q7u-+JUEfk99J{&kS+TWS4s@$V-D0DJ&OdPY`yCI&`b21a^z78W{ZH)sGr zkS9O@fPY?6R)Pfp?+$1%pZeSW)yw@84FUk-e~O0nH=3@lw1AMTq8c5o?tcsXzl-Y| z*kEp`hiYi5XP|d0Ev0e`uM#Hb2NZ_^Ooo6BXitC;_!@~B1{6a;ARtHjdjtmmSX6N! z3;|twdS*$IntW7ziHdxjPI5|eQc}iP&&VK*F7_O$gR&SFKu!`I!VH<1UFGkN3;(wN zTs^^m%Z29uA{QpkR#v)(X8Ptfx^`9u`nra;M#j31&IaZ-PR2G)j{gkO{AEFc7MP4HK&KVmo~znc_9y^1>|O1AU3SoK z4;-xBi7KM+ZFq2@UQiOeL1gX+xccJ_^c{|k*DK755Jx<)=&IXGK3z`V62Mo#RBG*hK3m4bMku1uY7t zKf2K^qBFZc8wXr+2UO>lpCrybEZ<&_zjQC7b7FP+eq8N`?r^+R^r~>o?7($+@O*2c zZenzz*Z^2hqX&b%zd&|*j;Hbno>{-y+=6!v@D`0iaeXAPXs8Nr#5%{#;5)W~%C3cS z0WyKUtQ^#y^X7=mLfHMb|L9UO-^Q+j5Uk0PWsH;{t|3tRovY1 zQ827-pF%E%B%p^O`+aeQpNrD0&^oHs)NN0hi~-xjIdpSM&TC2RRCn_cQ9D(8e8)wz2mx7*2Qp zjo{izvJ^VYEiNB2KXdkkd@?HxNpKXeGZREukQ$2sE(qq*CgVp*2k}b=CW#kgpVptn zUZq#x$I|YLQPc7nynBPWwpTFOTBbi@^WZiX(2s|A><-wAK$Q>T*$}{x4plm!l2O^s z2Y-%EL7Uu&mCV`z>x9b^*&WT_GcCcyu^>i@KX|1qmF@S*Hj$kRQ{%8_*1+h`;@Os7 zH`O3*gLLnp|3?f8?FXIW!=@K9K4{#x zBJFh+7ld|Z(O&DRcK~}*y-ulf`BAInB#kh1e!}_)dXc_4ia`o^8DqQ6F5!2SA$wym z$SJ95{@L>_Z>|g?V2~|AV`q`U3&dMzVW@&maw1sL#Y!1O(j9u4WpRW&B2crm(mUe= zyWo|M#pcJ=iNmIOGRV4w_zu_~M@$O$&QoeGm1A!cGpszCXV*il3_+1btCX2>| zrg@uJ`GCQuGl}7IPIo zrUPO9f>Dwb5|^1}F3{5N3FLkb{|P7*O#rFIgevGwnA{#r15&KXLd&}*Dk2Q&`hYk# zX);N??nA{8qHdLfaRAO?@hv+p#i8w@s-ElyT&X}tk(oV-Bnd{A4FsfWKStq(2&Y{D zQv`SP`VDdw9BWp}+6H!zH85_v^BE zr43leL_V{2mEnzkz2F#E^R*W!1pBorrqSD8!t$_RFzo|oPV$BbhEX@vvA8s3l~9F0 zId$tzV`E>2$NKnYWoSQPj(asXa3gldQApBE9iQm#q~WG;3tRYt;jdV*13Ur;Baj;R zgJYelNSOgxkmeFK_!&K=MLn!@c&ifLpad-8)>}uBQMq&c@Ekit)*Ml>algt_`vX0z zQWnZPf2j*PB7l?VFXG_7L@MLhFpM`I0xJ#J>g)6X^zkA``FD7!rqTMN85PekDW}f{ z7(%Vt#y+CQlD=gv(B}yK1Tar9!M(+5F_f-fdlF<~6Q2lTTFr$KYa)z#jkxbB>Psf> zngcc9-P@6<<9Uo%hKcb10z2^zRjN<34*0enV48A@WPS)-Y)<;@K`jPB56N%Gm~g5y(SyA z0A-pkGd%5XDU2F}$_@ognV5J3Q~zb0dUWfX5jdh)e>#X9c+3WJ2Swaf;gu*dVZVm2 zZTmD-PcQHB1&$gxt|@;fCIhjp$eX%|ker(F1gKjEtL1Yeuj-+BXBkV?=ViN= zHpjNh`}jQl0euIR$S{7r&Ef8A!Zz2s>nrnx?(>JL9SOPW!_$;ji|57V;C}eQ^g+bq zAiFVjTF33=GPu=u#qH%jU9xu!6)UoFwi z#);+Q;v2tfn(TL?TG(ozZOi)_>qK>nWJRsn3?+>05m07F5_nz)p~G^0@f#Xt^H zgorQ8hl3XpykY3Jp9pO3pGD;@9ffET>E4Pns)|kn^|!A^-isIez-U=XCRiFJA;U3) zmR=)^`kuq!lujez3LLlmJ&uyprVx%sgpu;CuY--Cr=!qqfKR(okJebE`hYFZsvUD! z`^}_RH3){aI@!!3H6NyA91_okT^>D>Gl;NcG>~uWw56#4=A}_ZO8H*|_Dlv>2n_kO zp17!9jOJ`8y3d?=N8s=5*a*hB0#`2s3qGwI2$!B%==L&^p-0zOC@ye9f>U*%21k6rg#i3wh*^2h)uC|$d{qo`GZEr75W zC+xH{30e}rOx|<$EJCgW)G9;~f>@;%o3u0+4rYyV&V+NW-+PdUZ1li9`U3djwI>z~ zM;sj0gzwBhE)wNolWmwGv$NKR3w#`5U)@$S*Tq(D0B4x*70mQ;l5ZF8N>-!eFM!|-U-&(F$ zWiXgV;Bjk(cXF$3YOU~CfQtEJlE z-xDv=B;*$%EpLNJ%FryaTzL1vIVu9TuHjcX&BC5+N~cKL6u^IT^Ix(ZkS4;xb!`|} z(_@}eJSK=2v+yGJ@`_{Oq}NbbVupRMMkL?_WA<4(J<~PvO4aVbWKyb6VEEZS*jvP?yz}VFjvfPA>i_{cXvQKWEdZ(%U29J9{?%v=XF7 zUE5D8(2~%=X+GicWHP>#X|rU>_JGl(S?$0CSGcLxlroeSZ;S=Dz#|zA%=OG1M?+-L zag`o_#Zix|k&jw7S)Uhj{DIJp8B?Mek9nq3W=;ZF6cg-4vsj=(&_d;A0UcjiL2Fnt z4x=3{Ju%PU4@T|aHP}M4V<2OsSyP;mQKO-OAX;x(nFsB)6@fE#SGiT%;fTbCk}2|4 z@Y9AMoN~^j$wVy#Jd6U?VanB0*pX6hZg15tfBC@)97I17X*k6O=oo`160=tkkEPrR z-cuG>KJ+Tyml_ndLDF9D5Y8`8bA(1G{;o4{)pY;65G#YChG&FHd}UsYvby+ z*crB}E8Z7J3wUP1>p0+QwlA)%#b(6h5VPeE^9US`@{=GBYt(3?V98sJWoAq{7{UWa z#Z{=jS=V-rfE5TXIVoCtMn0x!m1cfLdCXb54GM-mgq}tTmKY~Ukc^+dK8jiX5or85 zSINcA1WVk*4va)&@KS& z;2hF3tOF*ck(>Kxh*0CfrtPQz&kMGWd#``yMe36J>_f|!vmF{C1chPro6V$D7?<4rgZaQ0!OcvFzP8eqN%2|lQx-C zPk9thQLFYGOZJW%(H>m-C7i17G`A2NHGxC1j&os;-O!HmwT_z&6{C%gLQQ{5 z41YuVK9${}ygC@PKYCFwtx0l30O0DP>{c4n+uA5a`+Cp`l@yFspF zV&tf3Jp?Jsw}oZ>mUofp@CW#d{H&F>dZ$N7_T&UV-_EzNURw}ax(jLupc&U?HhPr= zLu9=Z#AB z&>EC0QJW@{I*b?bHZj>1y2!=)ylR`6=zqfYiXFjT2l}7-^EUhfJVNooPCsoF`!k@H zE*~wQ0VD7{C#>44yyqlVyqJw;>gM0z;bMNM=Dj+ADD~)73^&mUFqFAf0c*q|Mj%Og%k}Zl1i)7-XZ7q zCUAY0_*EX?<*^`$78GI#mH}=bwYQFNcUF&ku8(1f_*oiEddjRt5dwi1Rt4lNaK}|+ zxt?=;CDc9Dyt3D{g2k0|Psu`ePAgs03G?u@pdE4mvJ1ObQvs%8gspD|g1?_~u`7{$ zky(L$s@F?{`nL55vlXF5)-=ZweRY3*SbtVS*nX~*3XiLDDcWKo$`Hv+7N#}m=(Mv) zEvKH>COE<%s6BimvEK(T2p+`E>J6L4yumV=E8yJi=~B~voN=+rypnm~T+X`C?+qn{ z#*tr=&gw?V`MdX6U8CxwBN94gw=`|iv;!`fwT-31Pz0CxUi#-~UaQt`fn`OjHu9MB z)L8g)UtPo}x9mQppnSq2KjKkCz6|1tx=S0RQj}U{UbFd)>a%o4cpdjD#voY-^LN~0vAc;v~k#+CIq=x*>3b8r)Z7G9Ff&o&<+PTZuQDjU3XHf+O z-KmEB=o7e^2I|GFX0+w4SXy>JfRDEp@F?;&%i%#KN1&Lc3pY`(dxB{gMK(jT^Aqt1A2ZXst5e@yOMw}f%x0}JP z6Yn|9qQ={&?Y~7ZYgsL~(1bbqf0Tv@je%=OUaRiL%VlbH&sZvH(mG`rZXcrG=1r(Y zEDgOr=F-FAQ={OG}&A+^$1?^CqKx_#r%nN3FxwNdb|7M3LK030hn)&X$+oUr1 z<-)&QEs)}=mc~v5kwvcN_i}AAiOOktMTBQ0F(Dm8c@+d-Ke#Slks|)JVK{h$TF!Cp zcJFfd7EtV(zlZfNQn8Whgb@`qN||?YH8?WlGw6K>tTV)KUJHiDe<~!kc$j} zznc;&!wghmm`Jk6oWgHo=GBkSbCZP9h4B^F8nHrU_vEsWZI!ZR8X#B%a7r9^=_rfh zYM_6Y#iJi}h_@g)C%GX*BA5$sd{g9^*DSd5YVc)8Lp`M!Feh`A-&8~|u5a zUYWS<7u~yxFKk9!Jdx^=>z>^#EHgruwelg=0MAj%lrNi7ioP&wL^9y^)5&URq*Cin zTH#UMqLM2$T^i89X~FtN&snHSKs8)>rSFFAuf;}|wYA{?>29e@@T*g+5%ks%jsTV` z&j5;ES_qYBUi7L?^6DpU;!U@_5BKtIrKOVe33VN}nHt|YopyN2WeZrsZ1Eqw z7<`TvZN#b9gg)A6b60POr+QWkR3Yn<--J56=xWpDvSI@VdU)7`sNG#A`;uNDZeGUb zMn>L;R800(l~|)q@G&vZnc(QJX?8SMpyEg!(M?7UL_?x}81gD+UgVC~VgM}W#(rt? z(!2N4+A$<;&?XtC4d`&f>E1}`aa9s1Jdi3-iBHgk}UhF=b zdGOeVB-w%^+w~vOetcsNWQ5I}v5hQA)0-&O+%>+`$xArk4jJZ|Orl$LthH4e0XN>0 z6}c{h+VfZ0rw<$8Bc8f!#HiL6g*jRdFDhw|TIL7mSV_8(nMeU*w-3^qU*c!G9L-o; zszr%Jh`@O06jO(T0r!|GOE!Duehv53MQ!`!O2gtp3TE^FTfymmLw7SDBrFVE!0s?%&q40{cmN=nm zAdhg`3U1ngJZc!)NrG~aFL`Fi!;isL%vtJ83Sbe}NQ$h*pgC6lx+-saa;>?OrL30NT)d&-ImR`nft4?yM5o| zlp9DX5ZjW8ry|1(9Xf$!`=m1V80?>Sim-*iYf30Z(e?OQ#8TKlKo@L=44sI>4#RU} zbCz5lX+sdK?qxtJ1GjG7;!U20au<-6YAA<6wmBpIaaJ|*J62E4y*J9{_y`oehTbO_ zr<5=eD%3jjC1@&GrZ8GQUK54%hi`99&X}#0keMo191mZ5+*})5N;Fq_!fSh9kB65R zw%-R)iKmui$&_XJ`E^EC%<2G4dVgdtYJUMco-UaZOrIjT~OA6`AAlhCTw-G7CH%)Zoe@j$GT)$R17Qpb|6!duHtdj=Wfx3db zy-TKQqHsc79`#8tC4Hnrc~Jrc z)8a3n^4W}tsScB-1V#jRT%*X>EmIvxpXV3T*mCOrNkd=sD9 z$nb5bZhN2gAd){i9H=YQ%xwEXG%sazgmelG7RzOQDwrZjZSiFE=mjZpeGkEf*Oy?h zMVw?qvbH|wzJVfDpERU8AbV&N=tbp?%B7Rt^xQpuM<7+MPz0T821zSyg#;bnM<%m? ztgqJ^PSRH0Mdy_~$#+;rrdux9Pi7$qhw$t@I;!i-K-`R(B2^qmL*s&!Jar(-A$dphJ-k z82oj;hD_fOwQpi!C(ZOUR?^B9eLNq{ojI0+Ng<*ph$oE#r8Ri9=`AK+%6$1wd5liq*aj$Xl zI2a{DnsTOJ1dV#0qdZ)jdy=M3*}0pzRyFCj9lxlj#V?{8q>`kD(VAJ~u8l zRMEcmt5jAsG|Y{WqI5luEq5DC!8m{PXGbZszD^`hX0kfv-hHSgyE8Yc#rb44PwNG0 z$86rK_v`f5Pc!g7Z>x}%Ytb**Y8FVfzYB-NKg!iASZY46yLGj>cicWEmzYlIdNe6> z+|<(<_bjzUQgk?JrnK7|`)nMHn8{ULRu99lA494FQvX&Hgdz5Xlfd=QwH7@V*bOcY zV8zwp)I+$A)ydp<$*p1|7g7sL`&MtA!Ds0Aj)NIV$0ndJd-%L`tk!yAo4s!^-Rx(2 zB`0BGA)mr?2W!S1((Cm}C7%YyQ>H4h8$rQKndCuo48iyDE5IRsEU;xXfdN;#R1)NVCt$@lC#zVQt^(^jLnK;NDTYZ#6m|*1hAlyn z4^K8n%tcg0&h&ohR&I=j`&fVxy-}c8#JFK0^EU#0w>%<6!#gJW;S3x>?EE%S4_qqWk<&DAftrQ=PVgIg6twJ z7n$rMN21gieQq>(8sS>7p z4+=>hdMdR;6^VsQkay=W-0H|z?Zq!{MZMuG5y>g`=Z`Wp&7`0Xjt1RELm3#VGv!YS z@|NR_BUw7&g{j_Jj}<#UX^H12M9S}6z3ZVXQg^W_F+-sG_EC7ITSn1B9UE6Nwp+F= zKL9bSdptKb2G`CJl{$@^eNuiCkZgrBbLenb!K#tU7WzO&kC9(8M^jI%n$AyKznU z#ba8(yQj@Pr^^qw7I-UvpU2=*{N?cHC)PYLTRm^$7iiT92 z4{70im=&=@tsfeJ%;Ur_8vRV0anq0*E2tQNj&L+RlfH2*BSyXS{Z|pl#o$W_tpk(B zg@T6|k>*fURF)0PuRk7laat~Ms@Vlx_eX2-#R8`MozxkX;u9~99m823T4E~^EX1Dg z>r&t@5oBAGT%I7_8X%emSg^`{p%AnR8yPg5}iIoj=N(n|+xz%V#%mJO-6wv;^X7 zoMS`kW7Iv-nza~_W#r=7?iN@c2;pUEkb|V3!eX;E?*p23$VfOPX#Z{oSfXqo|ESP! zVLB9Z6z0^lsr6IgIE<~)Cqh01*?2S3zL@gCLoa8t#;>OtcKq(v$5xWu9E%2xvCch` zfuJ6q#Xu2j>?W@3A-3Vv)S%-Cfrjj<6AxTBGGM#alI)Gf@1t7?1R(z*w zlK zv%-`q;H#{Au|dj=*FCBw-&4NClf9esp*XAcPWF-yP*U=;4Xf-oN?66@JqLnvR!dUJ zXlo4>vOUfc~6(+qRT36CpF065Ki8rS(OQ{#Hu(QcqP*|bEfT{4A z*;6i({VYi?@*ZFAXTf#3TTU~nU`YeDL`p|xq5=ge7(G|ws{&T9`9$#eBB+pYuVl!0 zlE|R9McM%P(0Rkjk^+{tc={l9gz%&mNJ+u(=UhUjKu3jwNz1En@(tOf>ci`hoMrPX z*x5ISF`ijSspeJzveSwwxGa7RPbMdz{voM;_f6uXC4ut>u*m%k$wFj+dvRBse@Bjj zllfQz2Tv{rLJ zMTR#8<4vCR$WklYF*KBm+ws{{wY?OYN)?@ST!04e)oTUEO`VO2aAZ4qQ$G~x%LZ&C z1q>4%4J-XoIa?;F`Z=IIxuL49S|;B7!o8Txno|OaNTk#h{1s8^nUP~ZV1LZ5O040YPOp7dg(w%7ua7TJr}l3}6EVMSTFo zs71;r(MEhZVSib4RA9SG1ErIq1KuIq=`#(?fvrC>P3eQyh3dqPRkbWzeKuNZo3!F* zLMCo%B9%pLGlOPSlc?L4ZL4~vt}f`qg!KGyW7SE~x*JjwRk>X}YFbIflz4?kYl-=} z#lykuq9TfO^Q&A$hKS{usIXCbNWasJ!a-jQ5A5M~SelKeiIJyFRj7&?D5WEHS^is3 zesDP+-xr9+K-Ame^N;Snq%0z`scHf5L&n4F84$ z3;!JlYQ(%O2>3Og?8KC%b41I1|3pmF-Le+%dN3_UuY0> z+CGyC7fBqAXXx5v&CfWAG#mEiIe=VpeV{06%W;WZf3wZrr3y*L1JUJrYt{8w8qrZz zIPQEaTKPYmGYl?Bv9bO_d-un~q{WwBVwo{jLC|P{V*%p#!f?;A9!@zZtG5NP=XSj2 zJF=MmDqW{cGRRQ4?QyV4Qg#m5re+&|V9ssV<6)sMuBhIq$8-;=W|*oMl2q=Ni-je+ zuZlD8xmYhTtN zbMmDqSaR+v14V&D&kVB9qJKE zC~d0cw3|PZO+u0@usgHB$ZTKE3ysWMu{g(pU(BCs(OR;wPwaX%<)JZ{n0wggYVGwW zA2Brz0A4VCao7Pau+BS;>0lPj5Xu|C!4?~=ZKRX*P7t4l3oZs+tkP2n=ZocBzKn02 zb!^VRoN_%C10?8rp`FdZaysQ4(f^gCV9tncKKwVTjyKbuJ4q$lg~G7mn6r2v)@pjA zm>aD4VoZyobhL+GE0ErF5rQLOG%JpX z%CWI%zIbm$SZTUCQQ5%~*};IR!DL}1RrL>GY$gR#%S)p)2GYsm0Kc8UDaWhP_3ApC zx#WB(JNEuv4b_z@&ZA^e0-rJ^wGnOVzv00-vURazsU`k)KEClXAG<_8VPzWc#!qrx zHlURiW;9{{60QpDRSO9F^4hbWEB^*1X>I2xwTD9X2*Qau=>?+>bFmsU^Oi*-_A0z$ zuy}uHf((;gw8WCPkaG8sz4VyEk&?=@jfb0~bmzZQ z!tH;fgg)Ab6?z0PvhY&$I4LvS8+x>k-oS(x{H(K1!>jiUj&Z)7OLs&R6zt_St`^o< zN^MSe<4YB^Gdrc(pATdGsD?VhmITm(gABk^fo;on)`L)wYVc3=QOywF3xddxtk>hG z@*tB1K&gHVPFgEXJX2hGP`MY!hiA6MnJcUDZ5wta5qJhuL zr4}8PV|SLzTgK^8`v|u>UFBbD_yqeO)G(3rlzytQN$tfMoej1xl{tOJ2?xsBjz@VU zg4^scQvuWS?eU)Kl78liv6g;iqHE%yqtEe31G_TY{o}kn5*QV0LNU}aU;F;^WCd8nmYF;DiT0g1zLSmbB=nR#} zC%S59zVsa?K>Xa^(3k=piYKdHNqRxPvEyc}TbJ3X-)G7^|B%>UE zqi*3{JPJHQ$-`7yaO)siX8>KwOt<5=RXgQ*wCKIPf_E$s6Vu`(uhT$IBIfQSQ+C|) zo@@QQ5jyI3T|rjA(E@=fmxuDiAmn?>1kOF*MB7#BV76PP60iJeA%LE_p%_3|hpUMH zILK^mzTd=Xu@1On@}tA9^MB=!(+dB=AKl{qZ}G=*H@oYBPGfIbtU^ZH$K;}dDD)c*&71SkDB02z?^UjQVc(Ekh|3H~d9gf=kx3m{3KtwD1(rk>ZELETkH z<(q*B@d8_)C~Pc*5$@PD$r|kAo0Ca(9yhI;Z&^+0Q7!3 z$Z5)U%PBVR?>asqV|9b>ER!0qP*{Q+qp2*e3Yqev>yn)zBVwt`CyQO^C$A0!ah|LK5FaN`M$q&6c=9ja};kk_7 zshQ$2_Pl2zWszY*R8~_%@$d0~bp$q5w`HJmAZpwCjbdip+Q~U0r6gjqe3mF`-Vw|# zof|r2g>S7aFl04FJeppukEq|knm7%5+g1PZM|(-;cO6MNu|P~w3JUu3WBCTMDHa>U zmWA(*V=_jt!GOt{`!BikMsEvd9-;>ykIbATb@6$|iQc4vhKvHR^lYC(dBq+$wAz}# z{1m#;ei`)zd{7Tb_zRP7gVNNWwsKRw%|*sW=TRd;v%vTG@mQpmq`Nr9NXGu}kV4lb z@?`i_qzK!aZ0go5 zK|YYSxXSx{(OjdGlZ1;jdy!qlAe04;6gYtsrG5;EjJRy4XKtt#)B~sEHxRtJkd+p0 zR{dd@`U zo?A`!jl{2Zs*!z+7jv72KZqeR|Dof--Oh>1x5w;U`ca04sk0~5#vbV0V%6)R!;9_3 zR213#n??+P1sHjUfoj{0|CZ3MwiRn1SM_Y~S>m{zj56h}I^D_GTbbj!W$4;;GD$^| z!F02e<8B&>eSG=%rm;55+c?Ia=VLw8V5eMvHp`Jj#Bn;=vF6fe)nl6F8Fgv+A59N- zt>jOg>|V|z3cil}hV0A`D%1oQ**=ES9@^=++NV%vu=tBmDarnH7N!a!nwPM|hM0Ke z+8gyVsmv&#pNTFF%ju$GcTd+EN8@v8X?I8W~yF0&0Q7tMQ5bw$q|_g|;u zvTapr?7(ta<9z+q=Gfd{aSyvNqjG6^?Z#igv1B3M<7u32?T&aX{xjntekt)Pc@ROv zzP-4LZbjWTnxyp9nMJl(H_5lynkfkYub$RHzOs4ycH=7+3d=YDuP6mh^2_96>aT^5 zFXo5)+v4-=uc5FoDkp|jOg8xr?DNgOiLD3Nw{^tz_N#I3_;ul~bR1-(VfJB#u{+PS z@1*Yx1{}%FArDxt_p_Ms9Zu8-hTb~nCbk8!WzGdIVy>h?1H|Yb47gFU!xjQ;wchY#zLBzn`1^FnU+F|87AN@3nq1#s?)I&g=^@66Z#XqblG-vAzsE5I}a_{jRrD25hf6iELF zBXNC@ci;)-*URPsf=_5Bi;_pi-wTV{Y6mCRLIP@xnCEBHnm-O5U<8h3HPEG}CI|xi z6m{GdD#9-L+Dy|A))N#DVd&{+;}J~0x|g_);|pes8*^j8B#0!?A>y~4h^!B7_td+% zgCh=V^~n(v+DH6*lTb$V9En(yM9qJv_ty{PI^VA=g02~aWh`bCN+6a$FL|jv8LJ0L zjO^VwKSS0Id*2bu~x(8uZkH>DD$0XcIpql!>PaUKY3&%LYLo}=2LoXBAn_MpAG*U+pdKF>{jv`%NK(JBKqCdO5kZpOJxaU?j1b0UTQdjo8{J-*J+yIMyk|McI-~?Al&0lFe za`9yxh;sC72s9v)7kPW|VI>O@8oBwC$DD!D?@WIUrqdAfvvEL6w}!sFIYmI=dqJmf zk)U>pjqc#^B;8kJG3ROZii+e#_3~>|DMv*hlvx+dr>2McBNOidG;tpRMBSimVenF~ zh?CO{*}m>Wmpx-xlNrF1w-VgBD+t{I@7cg>vCRb|1mM(^%dyyP!2a|{`HT`(oT?~s zlNkWnXb0JEkubPP7mQD3vrpwWBkfC{aeDjn23=1!aq|zQ4Ie#_M@SokQH`&M2q4N1DDQiK=#4 z<8nx4Vl)UDe@Ww@K6O&6LeRC1JylBz>DnO5L6x8tJ=7;lY#Vq_OitXOQ8jTwxQ&tl z!t;m1@f>=&q{1RMkmR>qO0d4j!Qh&yh8U6vw?{+TTiF2dXknBf{-0_avxtLfAW5{6tKsYM&p?%^N$gYYkvX&q z_)M)+x^!`#=_Dz~!0SsS6KcN-OWF|_{B=cv@Y-kOKmd12Q}8_NjMmeX23P_t{MM=(;>$ej+;6ZcXc!$-m{b81y(WX*4$PV-$}I8*lHf+>7IsNz830R)0@5FWUrH(xXT)^ zK^x3G-ypDjy(ql zeuDoW#NAVnC=HY+__A%=wq140wr$&W%eJjswr$(CZrOI#)Ym;d(bGNCyRjRy`;?gv z`H~qK8F9|<{ErWfXG+y$E^OM`(g34iv}ovd)j0qV&@&0k~UU(}-&e&FToYM_TD9n<^T=ifdbqhLPyu-i%_ zvDf5q`{v(PM5g*?7uh|kyK$SGdz4;W&-jGd)f;bH>;Re82{tU)8b`M^dt9BFiq08n z%~t8C@VU&VRxQg0HofPb<8?jfuzu|973@8ut<{G3Vs>L(#eQ*YhO*D>?vM|Ny|8$i z>n!npi%eX3zI(p&PQK*|+%ysWwt&@x)r+};)r0fJ;;Rqg@7+KjKra9P@md_suw3G;=k z7Ga@RQJ!P?sMi;Z@7&`zsVKu@59Rgd__8wBBZOaP5VzNMc7bb zU<>1!y}Wk$&qz|x;}z~Xe9GJ0DZDdg<85CsH9DP-{oefR4hvtW=he8_aDeBX^;;e^ z<(&(!(OHN-aER;nNlS*dCG41UWPq(tiD#_0JXPS?9mJZyw}8SQXDegw_Shjxowb?s z{%sT;_aE)Bpry=8vR# zA6SmI9o3D=8^o>;KX5&w9NQ?L4^sJ2BboDVj$U)OUV~X1TNQM16GauVztfUuRimsc zKVKK2KJcv+UaV`7nJgLIjmhW#JDM}D{2F=*e(JGg71}#kX2`UsQPelYO)e>>yB{W_ zNNoP^H&Df>r>~rFkRaeNlr4L;&esDK!2WA2U)O`1DJs1snQ@21f#~zJeg`lsRJwY) zWzN}zYCY7c>K8vld|_MDhSE!$LG}!P@i^@I@3MuI<@YnWA`p9(7J;RA>}A$Z=y41` z?6hiA_nYKN)~{3l!K@nuVE0h)BK%}3`m$JyI5_7vF5 zHA}Hp9Xi&UJFM?_5n&cC;^L74C+VN+PsA zS?$0tMb;;B^3%H0Q&D)8O90D(k3;}m*z0OXHgHqm_1kJSvzof*^6rJY7sAKa)NXI9 zyWakGVF)v|oHbCrnnS?R)SL^GZEa8plRKpexzz7kekH!b#pU}7%2?y7tZum|_8QN| zFTy!v$*RWY-`Xz1d(cqMz-x7;TNG*c(a}QpOsmX&=Gow@!aX%A;C&w>I5~ng>8D1& zxcJYul&qIeu3Fn`lue8%7H_^mnvihYp`y!mf4=<#m(elkJ+Obqt z(YFyv=Hcv51()042u(Z-4GQAGKe=c7Ec5yfqi?)bxDiazzwk^=k~edTKK4^1kY|!X z1uP&0M++0KOK;=2d1+^ zgLI8>MTj~NM9JmjEskelZ*l)oq7$C)?wdtFN|=MLL7znV5WL0Ijvj;0<;p&qo`hqH z@fFIcf5%<0S^zkE0G~bbxk{5g=b0_y_p3fJA4w{m5h(crSQ>1Jp;WvC{d0jno6LKb z)}B|Cf!}5}6$vX%BOWqJyhnF@IYk$@s0a_MLNwC;5^_ zK7>6hR>a=`rTC^7#!Q}4`DusQ|Lkm?9*FvY-IX-N-plG8O;zIahKw3jEL;!NC{W>o zlQZ8X5B4Dr4#i(M99;_tQ9(;$_1K*pGedP$bw|bWD)D;VQKpBTX>93G@Sc7;IdDFd zAv;Vln;^$!*g`rou2CEP$MNU?h_jFCmtNC!3;&!1_7Uq@BXDklm0s|XQ&fpbO8>WXaK9Zie_btY)U)#djGK5Xs{@a$>-w_H zHZt2h>1p7M>d^YJ3|2R?8kzjSyBG1l#A*a@a*%o&Ws#B z?3uPxG0OVCblBGHZ=DN6i#xwlrk=Le!U0z~ts;x{f!9U`^-d5MCF7Z?&sRS)I(=%WhP<%I_x&3d?f-E;gy!ULF!17S_Mq&vpC5b zK2%Y}7AMd_<0N!2hd{I7c9`@zDLoJ7%ZGF``3pw$htNncE2s{8L4BC;++Kj8h|HM?OPD!dGZPCuwAMg6fG-b|&cQ#$Lo7zU83JJCck`o*EFw?aO&d;#= z7{v(})rq$!j&*wbf?ZxSj?$p2o2GE6N_O+aj@U|#aeSI6qSG>Eq~X@D=RK<@EO)%H#BlSK?A z2_#(I0di?Uk;<{vS8e)d73z)!{83ziux#6sD%w^dU?Mz%=S&GDENbvAn=v+bXc$CK zjgny$y~3XEQ6^d#t8oh80?9T588m6|8!X`dihB61bM^z%3QqI!FEH7XybP_+EfS0E z5PmJK)>X?(<6l*M;;6iQ9Cot=&{Dcqtag&nH-DB|WZO#Oi^O4|Lr9MRZU&?Oas^r<#*#sWmJ$Ajj`67EDDdqwThhMVzy_L<-4K5EuR&_YJl6 zA}34u3kxblvXItXf&X%vQ6(d9FQVOPfOfuX{!3+OQA&Wqj=yPp#WJC&Np#5Z3M(Sn zMTa-=Qh-Ofz}a%YQMr{;1w+Z`XuAYd7zepw1Iv;u)JvSFTnE@h@hcp&$Xp#>aoWKz z$>)Or)HGog+rf*?wH8FmG&SE5s4(<$P3Yc;RWhbV4MP>TF!=DqBuaA zw&$LJHJSpLlJv7|H3{CK#9+ZeSm^{T2U_47@hEIGMR8RDsddsxgdibojm2Q_p4T2u zaF-$XezwVIZ%`3oBs!3k#56=Inmep_eC& zybXJh5H(<)#2Hx)LCAyT4?~=RG|)aY-UcIZ-ab=Q|0&}lN(?qYd5ATnf>f9$f=H2+ z46_1Nk9k|zttmgXrGe2{0SqZ@c4erLWr$F0w=TuQz(Hs~Mie~(Qa=Mf6yULY!eCBf z?J7CLXkoq-ajnKi;_r)E2E%zL;=NU#1Vn#`*eT#(R%!M;1KvYIu$1ji;0Ytq;lV&b zPm=7gR)c+zgoZRo@+b>qr2w4hwqvEdFaw^kUm!4YodmVW0E!sK?NY`(WX8(xRgWJ2 zp3WaA&UFh`cDBS}Ix2(UA|pe2_%5+Pz9G7c1GzRK{JB2|H<%l-(c1w%BAyvH>y1YO z0m5e51O^zOVG9DHSaC>TC7=RDcpAIJiIf+& zte25T7ztj0-yq6IoXsl{zJJB3A(v!vc;29O=|ARH0DObQBxpEXgpnj>T67qM#&~9m z2%)t@SHmwEHsXUwNuUZLwq_qS_K{ELMFyXgUoyw=NV(gHqa53NNWV!@y7~)XEY!W~qdkgiYZn$M{7D6vgfp^+$pVfNT zWUpmId?cRS;|LuxEEqZ1ER=YYJXqzAI&~?WEZrh#;Ku)~-dc}$lDOJnXo141ql+NJ z1-DK`yYCCylb2y5(m%Dq2d;_>eITv^8S){Hx8+ZcK4Gy`6ifkBmBWXM)gOQ{^^@+Z z?GBR!AeJM)A@t7$IgWb>fqdlJql;F6XhWb9ITCY|3WW1b!QV$ZeISL1ALAefMgEgt_V7t5N|RaNv{Sx?uI5%DOxw#D zs=i|%3%FzHHo+<8&raD~zW^1*55l-;iLPilaYkf(Qwt}|EHn^&Xx^?=rc93i^JO~EDAV!L4Bz%(~4-%%E z(gjn_T2G|=(nI2Julrme0_)MHNwXSlw<+_sI%))`NKY%e#}G6U#&btF?H>^m1P<`5 z;e0uRQ8~^i0f~JGY|$5q6J~n-{J-(IAo&m)2ptL(=yJTJiynijq||wnFzZa`PJ_8itSA@;=I27MhO`2&#cn3n z#Ua%v0FD0nW^F1|l1r2e6X0fzMVk>y;#yZsOJfuI`rfT8Y32-%EBF8$hbXuJ97<0U zJ@J5k_JFNI^iaf-Wl7x-{c%#MLE1NI34XvRYt<8p97H+Jy>$>s?R1bJq5ko5+v@=O zb+F~|0FzTcSs{9r7&{^}xq{;`^$r%~BOCZ_okcA(O`fNhzQa24q&0Sh;;9Sok0hUh zC0-=Q{8c9Rq5v)(T^0u8w>Dt_JSz?)(LCJYpCm;3S}}2pvD$lLfb<3@AS4uaEaPGT3l9dO7zofart{=6#|Qvq_Qmn|3>cbTbT9)*^eB)<%0R-#2&4@4 zuKrGdFtotrgUJo+4Ek_G{L(nJ@&>90em|2Qo;VCGi)ZG{h3TQ{bze7(egE>fFSk$9 z^xN>=F_DubW(BY-eM_d~tj%|2*1q0FL%rE)QFqaUC)^ zVtQ${f`ap}!K!iZXPvBb9j3EexLL%rIDqsM`bps&vVuG}$y|3uZ7B@N_hzMMnvew( z8Q=^%tpx^yycB4x(OL<)<<0e%zlB90B9l+KQ3(H%+B*UT6I1Uo$&WU9Vp3$a76q)m zgEeY>aiT+?xk7i^M1m@uAdI(yXaQ9a@essM@D7Xb&aS3P?7k#O?7tH_VF08dh&b-m zr9te-jIVy7(V~Gcutk>H2@_i*g;bO4NZ6>6xc;r@h;k0;%rsNpK1Dv`U=y?BCgNmauw{7m$qfM>e{{9%!&4JU2y}Zp( z`JSBy;5SQ2zP~*R(HpNDwh?QH(LypA;;zNjo#@_A2DzF8evQ*x%@C7C5|^-=FN`aJ z1Ruf`B?_I1$l-t}fFcjb3OaclbqnzvF_DHWL3~9n3u4rgw(2*S1=1Y12|Ne|Om9jD z^Q4`Z?$yyNeaSB(U8`Q!eaR@84IwL=WN&PuEehGDN?#Df{`*niux_c~lH3x~ztaXV zu#hAkK#dPw7GVT2ng@S3`h^F`?%>tW8_+NZe>e!B^Ohn?eV4Jbf29uj&6S>Tuvr)f z4KWu0=HSc5oD62QHI6OzG7g9(w3*)KNZkDtVsBl70@T12Wg{MaQ4|)OB|vx(CKC06 zyD>%{abWKtB>1NUUe47$=P=;NXn@JC>~p0M zHiC=Qfsv}jeg|Q~@L{~mYhO#!KYGLxZgQfC*V?~l=TVD5hG+!XWCD|e!hz`Mk_r;( zEdh{V2zP)3K)&-0T^a}S2LQKb5-C5n6PeY zfXeo(muJ9|+VJft2ux$p8;%#orAL#N=SE;L&1xSkiF(bs@xhX(hr=a@!-3q42m}F` zi01(`^R6um!UE=)Wa$?QeuD#r1VzlsQr{c3Y>h&7tkNBZBDW3ff2e?#-Q5n#$b{MM z?t+YR;0I*y10ui6<^bw|x{ZX{CGRCl#}43Zmw@3LcI_(?&r}4!RRda=fE#Vx%(O>( zCZka;x7*(i@~~r5x0T|UtLt;r>JN{EJ?c8<@?WmAT@aF#QgD4^odA+O=r5Y8=xK9& zJ&?*gid2<(jl}CX@>FpfKMWjkAb0s(nYe$2yQ=d)cdOTW@}}He&1d;ZIi+}T&l0gE z;o%PhP8}Y+H`wh1##(1GRk#?+Ie$0UPvoe}W_meGV9t&1rz$4rwJ&i0wv#P3d9LM_ z-@yhq*)n*eJ_hpuB#l}Wf#y*Bu*}i#KH$pF>`kKzFY9O86hL>BD2yd<6~?w-0K7f~ z%JY;CkP9TVAH~5?9HMpthK>Sh!P0RpSu*%Ds6X{~83Q;+cshP)l}R0(ntPbj&4Cg1 zA>E=!KX-0^(nJ~yqN}CU9e=v$-M^CV$oh~Op(BehhyeSVZ!?l}gFBs#A-xF=oYe}I zZY9PD`hB@pdTskxUM>jm`F40}ke*%@58KryxhKmahz_ko0ZGXHC_)4ZX^_a7K-Y-w z7N8!W)g6H&Yu)`>1gRknT>o$QMA+YWe6A}iziN1Tns}>l?U4}eYuQDU_XMGr!8Q~? z^1(+!#eDrwk~{kzeprVuq0HdVZNI#qo9&<-reJ00%Ee>-(gXsy=?}O-rTO`Q}nGVhpgPr*1S_SgO==GUCUUq z4Z@!7fIVM18)@32V=LS#n~CQt5=CEGWs|P>8m=sHKm^ETkNBX+qX^&`GBXd8fGd$r zl^lD42aWO-+OB7ydTm4?PDU!SXC*C z5#{^5xF${twOvU)PB543sJQy;I%aGEzm0|$l2OA;Tc-O`l6@X6S7RwQ8p(4oTNXN_ zd2NH0sU;odktUU;%v-jotnkonAnAQ1 zi=wY^h*ZL0{G)*>#sSSbElIQSa!0i>FU!YW?W@e)z#y7 z%(m6OQ$Q6@XL0WQsL(*F%h}QSC^Yu1}vQT~vDEMT=rUxF)M zN<}wL7PTLts>@$wA7a8 zlvOUY`94l`hsNBT%p$9ga31JV9QEEs2&6&lcAuK7`#yzk^x&z7YK#|(LC`7-)X-W` zkLICpwedlUn>6Radg&Z1CS@l0XwY<>#$r!L+)va&(Ht>6eQiXr$jk{=u#)~KBAuLy zI=XYp#7*Dk42kZ+Gke>LeW$>)7PzHR%S_V5MUGj8;agx_$2>(+r)NmBqn_bho*4#n zMIHS%Wmx!rkX>Uh(SPVMd7oC0x*|lq#g-zQUNkmlmD+?C? zXe*1U;$0WC>EnE zMXWDWC1)Ofpm!V8dGGA*hpB*dur*!jROD5j?MK)ahtPY3Nz{fyoDU_Dv{-p%3n}=U ziZAdu=122tz|7+2F9(4NXRwjdwrz+o=o_tm`A=DJ_azJV*RqA>9b*kA=IRZZUHP07 zyOA~-H2G^^7)|hEl?z3iNoAa^igiuJGsKU##xj?IhoQ}{y7}&apokpa?8rd*KpP3x z4OX<^yGzdueZhmZ9dr!`AJVGlw{g+spe3eoDriV5K!ITAO>+`_e&x~OE2{z&Xj9?y zg*F?>k#{J2q_L6sK#BIeKEU z^yKi5^mKJ>Q+&3ha?kAA7d(oV)-7sXznyFxuDi@&zujKUU%Gy=RqpA9(1*Mi@WVat zO)=9eN0C)N@dNX=5yp3aB zX$_1NfQthp(T8}IXN3AW4P1-55w75edKJ)%>1p2JO>B(x+??TcdYkWgO@4wn@(=&< z4Zx=-INd(EI{CUGuSAwqfSe)VM*)FnkD%=~$Zn6X%HRG!)dU1AwE1psg+F2j*j)3n ztK^SrVL4|iKTe1OMeRj}O25uZSdNo!p*UG~D}NpZFJdaCi;cq_1xF#3Y!PiPcvsJw zPyXzryO5a+R%<)!mI>CZc6=b9-p%#z*onO|`h#{rRhmt;#~5}XRSCPjsdQSZ_uk$W zhfR^s%3o@^H+7OZC+rUV#PIQ3`cWJjRkC;dyZmoktm`dR&1VMS`>Nz9+)U{oiZ37N z_9w|hP*U8AFxC(LWb-rBW{tANlgvHjla(~!vbS#e&slBXh^}6>Rb}fZDXRywpP&Ef z3H4;2h9`;47kzC+Ks=w=Oe(0cf9B+PKUJ^;uyVs%p7nGpr_7K6HwHBeRJH8jF8M5kc|(j# z@ezl`-Va7l*&J87^sdUqSCQ5-UNQTZ{IKV`__vL9LfKICm02+}d=0u4*ZsBQB;|;& zzyzT#VA`uD_P4#9Meld%GgPB)aXjbv^{XYMTuF@cb2M=HsRLkpv=~)=JG6TW{-K#c zpNK!qVab5QgR|aJ`#99DsW5e-p_QE8JT^@c!MF=Gx?}WLWduuX5)AJbUp7YHZ58A~ zZtT@c22yFR2f&LB;z`qxN`5z87$AOIGh5EcD_v%Ly45~ddwy%^L2D|4A0o_Cy@JPQ zS|<{buHC}pD;b#Iq6WVtgw4Z%#n{!G_iS5^EJgK$o13fpwXE&DO0LZ*YO#S@Mk4kZ z-Mur(rWpRZquRt8uMLmCCk_^W6|F z7s-5LW0UHxomExl_E%(@1+pE+WR~jBqeMO3?o|$7+xyL-3H+3Vl5IyL8P4`#3)_SB zV7Y0X^^X_tgR{d(^lBN|xxZIt>hUcs%vk?4DDH}nw(?r2sl6?lTqAJim~&2JAYE?6 zyC^or>+3-kt)VIHB~dNvkCXdFEHx)0%PA3XD0C zyQr3nWHtR#+LhF8%Pe9gF_K|F#0|S~rVXVM*kWUv){!{9kI^ipDBSf7lw>f=8pRKS zsRNV>hl&)QVzax1T3fYrF&x09!pO+tRPvRG=;USPu6}>0^IO_~XEvKIH>qPDLRQgO z$86FMvS>mrfwn#Hj4Ug+SAH!6Df{c+r(b9Tyad;wvk0xJ%`4^leVTh^JoG?%etUU_ zDY$0pAXT+Sz?IAu$@(|t-kcJ%g{fS)BCYz~(-#go$OS@2m;_P` z=^bocb`*{$Y*^uS+0Y#p)MOSrcvr9aq(%ITVV9=olIO~RK98h~A~h+-Yyn2hN-xS1 zWD0WPVLDP5AW{`qXDPyL2tv#P*d`MiWKqKDwDxqElBahaw(c&J)TRlqIeROz!5s_E zkoW{Dw&ycuC&1Tsn4;41`yy#f>P2bv$G_LEs7{f=sSmF8Qch>9fE4*GtlX-2ps7VF z?BgnB_a`0}S)S%9HBqW1v1%nz>c_KV8MnIXp0Sw%neK=(7DOd*Zk9!?HWaDoXtF>D zS!Xw5UE%sX#MT*rx{^;I;;v^5-jwU?8jZ}w@+tj3u>G{M`ZS8|k5+_IeL2c~F}}xU zl($@{U7Wsz{)y5^JVEwSY%v_-=5C(cl}jJw5csitx}&I1PjI-7*;z%Ro*_spNG(a_ z&bK(Ucx#k%GAW2yb<#JDRnu*Xt!(wu<482#LTxARc4bCwjV&4@<8=~UF~QKWJgJf? zQd(4Ndr8)=FrCT`+UpyYrpaM85d)3zmF7wVw?#3B^V_DlPDiSYW=E|A234w)FH?7g zceZ-4Xyu`Qyb>Nq#KJ}(U(?T=m4x>?G=uBOy*4KGHpaJ$Gu2EdXQ~-4tTXeEW{rOHtn@L*tgFik1sINHag)1d`qK0uu)Z!!DWE;39@2(IwLt=FC1s~!#nAMfv%aX;kj*N@4!Ko306Q}g z-%us0_oNVD;T3j{VC!TymB^>%Bq6jybQNqBQ~SxWFN@NeD3?(=x}k%STPCQo^%{XX z4BoNZQ7k{nrNt;?1l4KV+|lu}r`=RQG;`zMSyiq(ST6h9xH0bVj}UrqbGwJj%qcn9 zp*1UORhDb{RVwf1eug>&J_Y6(`y%^g;S^4N4(avM$^!fSE0GN|t69|1Nf+yiMnT)F z@s!)q2?0$NHf?#5hC>+TWToO{7^P+ZB$dJxC)h^~k09erTOp6ZK^W&V%qWuB=> z+}7H4W~s!*b(5o0vs9EZp5s)My-G}$iB5B!(>PYIz4eTGXPYVY&gNoTy-X}-qnwEh zpJ@vrmh;NQKUogj5_6MIM-mN=<837lHjiex&I_=|xi>xZzZIU9H-Bp})2Uh{*3~hJ zWjf{v}! z7Z>RJWivl*f$!h3oikn^2vbqD*;Ud2Rn@h{l55*~z+$CzDN};kVcFxI-qiTCyif_M z)Dw_?ER&*JRd^MdX5ly$T&e+lho1yfI6*{C0taj0Z14|r(2x4Bn1c}V>Ni|ZGHYn< zEG_#ZI)jX$pRKhM^o3;$yP1bhara@uwc%_3EF)XnDgL~gSnKWVzlvDNVDdZwOI!1}wM)9GVNZ?TArTc2rknh&wHBLG1w4Y0lJWB4m^*iuZ>Hl`-_ahcy zRUuGi07N#SOs_*e46baw(we-weV%D4}f~BQrv(Dj;KMYh%O+X>S$LULAmK@<|gQ zU79@+@eu+Mj_5BM^?g5sj;zSuz2+!lQSrE-n9E;5h_<1>2~1ERR!W*PNt^(#V8Rap z-PkO^S|w|ade_bfOt7ZAf2YB2^*Z&9c?5A1)fb_-CV|l1;~<8S7_!M=+~7$I;> z9`iU~s&mw#3_2X>LpE@Zw*Z;WP^Rc51||YF9vn?V*>08fT_RbkY3mKMJ$hVl=(i6h zZo=-zK?zzQwTDwfi!zUsq|V}%mrQc3H0*Nsl@|k01**#zYrtT zXOl}h5ZM;(WEgl;uEUJ;LHo=nr|%4u z(d~3ilH(zdAwCrugheKg%NmmAFpwtBL`o8v8WepCAjtD_<8_+A;OZlSvmrj9C z%)?PZ*M|VQhl<{-;b#|It-owdS6j57w~7fT!8|?KSXl=J1^a_JS`v1gGtl90)G#S| z-MRxKe@8>}k@J8%5%-+y)#h_S0�C5(5m7s09HLy!d%IA0&vCK!h!~>`_$PQKMLr z`6poZn`8ewkHM7CJI+&h*h6sWRST0iw+rxqkR_xEIkFTd-fMQ~Nq!*B`>Y46A;wxganTqDPgo$xH{wwgJxn#DRC5W#PNM{dM#vD1uvEb>h63n!CiR71= zpc5+EQv>w|dP6gS6Vp*XUL%kb3K#BdCb~!+Y*8b?;57Ju*g}PPE=7562~JWLqr=eO zH{FO4CBp83v;=7AgggY)bBJ28jB|2`fseUlxT&ame#?_-1EGQ2O8=p_%bpFL%^*us znnott{SNBrMn|;&v1Oyt7isQr`GOEvOhj`?Nlr=R@JY9C28)diI>tZ`zz>ce_3>Vu z&{e+KM{P`Fj=gDKZ&!Tny<0wmddk|iCyy}j3@)L$YC1%;oB)PBIkdmQ#2(+8Uxxb0 z6#s`?c>j-XA;I-Tfo_w;6!8Pb&@?JoicTM|?GU#&>!F64?OCq_8^Q*&Z4fQsT^1!s z;esn?fRdO-ASZP9ch_p9(GFbaYD`(I5?ziM(uN7rmrlDs&f%C7aOlo{*Y?j$`;=gT zLzhj}XV1Jw`aZaSG>UXsNU`F`cJbaFPbiz!lTNHw8zURlA&jYClha_+6jc_!R4X5D zdBvDmfaMQmr~t)q*^fgcG76iu0Jv?pyB|%Bl0On-plQ*u3}qpNF?1sA^lPt%?(3iz zA_}wHq|T3!tMV}ksii3z4HjmkZbct32$u;%hQvhZ$4M25L2eTiKxQXNYL6msrYG8Y z>LhXGk>JG;9n9*Od^)2lTf5^`rBULWqt98@xD6l)?^9bNk`w^~&h}g2cqoGgWKK ztb|3eG!@#Tf!<|75N%Sr-7Rg-aiMbKGMqD7*MXO{xTFgV4s%+8@Z;-!3>eFf(ojHH z9Dp>f3Q-s?pD)k8OIu1YjlOAMaM=kZq>0{B1b?NcE;l1XT9VJsK1J5qQBbL3&LKA{ zbtF0ghm&6hB9zJV=zC@oAYwgUzzb~WfrR2go@SO*%J92ctQcvgwhaS0iiEuoeb1--1EgT3Xm{J z11TgRocs#_k%{buv;}h!nWk)XLu1op1TU7-PB}n0fUOz4bPDyOiXZLYi=;+o*4~EN+lB#v8b?*m8YTGo50)dP6Ne79cPbcZdX9@)* zffgh|$BPWV*&4i9***j902n@Fe6%r-lj)y*ETk^Gj2Mj3Mhiuh6X_L(!jlb2+Sfsc zL#Fd9g@!$>bLgx1-8XG59~zq+Be-riV!74#%wjP|!^Fas^Vm*IeZh^2MZ0pIl0R1$ zBnoh& z4IAKaN)V9N35Rkekl?{MV@AiA6rYNSNht_`E@Cm{G7l5;oRb*Il0>)Wav(;X7#Rk( z?2*(4|HaF*#&BnJ>Y8=(Kl0niJZh{H9+4X%{B~pgU5>mw7F!xqxi}GKiK&2!bt@{S zOl|~f7eMBs2A+Lm!gE&*u9lD>@)Ojo%^`>*#&YKkV7-42@lkaQoB|%U{~H4t$Zx8E z!O(x?Mu{>ed)CbflfD^uzc%azL>o4TKY(liAP3sweie?gHFx%@XbK0C9+yy?8?uOC zGRBbmE^1`al;&WHrAc^1Z6qIPqN%gI7Y)-0cY&^~p!|^=)rc1TA%$_-YR#m3^ssBC zd1~{fF4B#v7K!HpiAW<&eB~G~*dbZi2z^9tF`7q614$h03psS0D9TzkQ9Xq2(4QLT zD+Wx}0ErPzUTYY^2q09b`s&*-o*uH-e9{01+VAY0FNkd3!Mwj~@G)>uPCM0IR64tD z$~(WpXN2(CgvA90+IIw52v@^Dm2iFD!Q;62EfHUj^cFW?b`(8;ozffqD#GW{K zrh23eM*RdLmZO=Vn!JDjh9fd)*FVwS0EG+CBwwE;rP+b={4%!Cu-_X~49=xfok8$Y zU^dO+3@MlC$gBU^LZIs>NSec*#GVlj2|z>a4x~S6Kw3eDwP8R`4ma>66;MS%ot(d# ztDcMgpxi`T#e5JOSM3u=O}GoutE_k%rD;=Y2;&*qK8ePjXeXSw_7$NA1|kP(HlU4A zAUJby*Te=rtGtmC6u^aax8<*2{Y00t-IH$lLEQI7UFw-WyBKYY!qnBi7Q#O#U55^f zecjke0`TfB7KB|zC)}T9QcnL9dRX9llGjsZY)^j+2X{Lv+N(Ln=3kUZOCGX$Wbhp|UuH?GDVLLnlb z5v6t}4)r90X^m}pC-3&)9<&lPO}shxOCPdL3PRBDAc_wFse`}`YfYEp0WkJ6!2^LS zVcX_N8KgM^6j0n}BJ%hf8so5i$qINMik{MHP3z#H{Z}hsVj|3gi*BR45aG>{?pH6Q zgHIS4r9MVD508$Ru(q(D`h2pqB2+kEP>$D`J)I+> zl@LzG4t>?NwYDAcTHAdlzFzm@>c>kWbSnRrwRVU7*If~OwZ^s9pl%B^i5i_==PE#4 zxBVmjw9X_VPxNQ&X)K0Nh|EXkQ90>$ir>Ko_OjU7wF>LyMu(Er_L;Td7&^CB z!+LZt_gCyKGj!i)D|VpXr3IhlM=q&`M)U$MC1Qw3PP3XM?r9O{3iv`-S+Pl#J$IVsUT`# zWd2bQe@w!}|BomLpzZ%_1p%D+-xY-I|EwT5l>f7W5cppy2%;xk=zpTgmLE}_6iOAE zzznN}k4-E$7ZDit?V4p}&VDU5XS`s(|7=IvDF;`p1Jyax)0-0@#4=YKU#>}|Wg9A^ z8tkf}A+lpM(vmm;0juLvHydx=!6u4Za%A^?J#E_YW)!V?RuMdM2m=f_Ct-->rn353 z7SuhZH!p~pt@ckgS)((WGQR42j0Es86A?{)q+x~m#Rngl5O1OpgJ(8nd78(c`uWif zZCCK+V!Az{nw8To*L&V_aBh344wqtO)n^tZ(0lm8&0y2A#Ye5mU_m9@<$O~Nrs_Jn zecI^Iqj0LIF1;u`+}Qi`5f3KI5sv9n{Nu5(x+e~7zR5&N z)*OfK2alXe(B}lR#lJSB0u?bDE|bgwK3>`PLX&esS+!EBxE9Uns*KfPpM`#o8-ls$gOoEb**{S@L+_ zDC$lE{9vz+sLTHOeXmn~t59p&@|oycf?F?$9S%WHs1q111qAPkB55(o8g^1}4;5cv zNz5-cb)dOrZISzas;4k93Qk>!28z@2A}nIDT5=XUj#ZI~;UWcCzt4=o3q zWYDG0{9skU3skOUY^GE(S1LBNl#dXv1Qm0+GRS%Qr4TCId^f`y1d9N02SqM54)UfxjMy3+Vhh4 zxg_m+zS*~e9vm*;6U}ATYG-<7RE`~^IS7WXsdfM#aBS0CoJDlfdbkFal=fR7?IzbF zEPVMT-xoSuvgdx>-3<-DI%OXJ^yg}!kQ#1JI-$P~|J^hiDDoK3$cyB=E7Vv~B351q z0<4sPHA=Ykpc@vZpQ>s{g-=$RrCvSWPENssxlD^f$%ra$Ms2@TU^ zlG%EM?;DsfxV1KVdzai8n7 zD#@LbLLEwrybH8H2WzWL!Gdg2Qk&gsvYgEB?Wbk54?vz=q3qcWIjm&iVM=&PC0Rqw zn}d>4(@`w4l;s%SBs>aaM+RJU_EJmk+fo6dT(zjro(Nfc#TK(HUM({U4$7!r{&4&A1u(eI1LZ zDK+Ijz-n~VIHSlaS#}*|Imx)yq8y`mHdBSOB++~@A9H%loEo7Z=~IAOaHE|wH1hf4 z$!f9(SSpRAt=CS94UKct#NCCvZ25&8bQy{JehBruCDfl&bh6-&rz-wRZA%iAtAi4H zH3+u(KNF9=+0fDIWUZf4$GVJJy>tl;Ak^vd_-;I1i#o#dif&WwRuQLXF6=x{VZLRZ zA%#VEUmxS#J88yc-9Hy^%Y(4Pyatc{fj%UlIh@v-XVrujWgVtltXtMvHSN>>!!D3k zO@_mE8E8hX@0Pu0n>}Hvk53~VuTbHKsJYI-YI{)Uk~(i;v*V2uRU?$AHvCSN8kG#j zl9~BMOO>lhk`##EY)xiO9gi_QWI44)9Twd$rQv3*ZcA+93uzPvGR7X+Q85M-&hr^O zav|Vtk-13n!_Us*fzmg_+QPDL#O1AJH)EjusH!WQ? z&&+jEdu}NN8@iV4E|T1Cmv=S7$J%6Se!5RpC#ubd$L4VD|BbkJ3bHg>({*RswpnRA ztJ1b@+qP}nuC%k#wr$(CPOa{>WAC$~PscgY9jC9x&AgfyZ;bExzwx~DvlUl2>{fBi zUSEBUH4!TGP0Y5#jEfqpYwB6{lpsej7uKT}0KnwD%t7iW_HlMC=!2Mxe56KIHn`<8 zFFoIvM8oDLUXt6N7pSvj{B`Ves%*FQ54xMFtDc!8t%`i^f7^J%$hiOag(sy!U)-zy zOw*g|#9b1vau%@IyN*!xZxqNbl>vIkPOSf%?11K?Jl_{*dHug(v1t?9W&fd^O2{-Q zAy=a?RPKTK#Z`;4#Jj58BVy4PjMr!86PQVob+(7{;&gmhSM(d&dmw~AeOrf`JxTlj099aC@)trru0XD!fNa-4+Z7kROdl5X!V2 zSl-MYkhVSeA=|OP@y+uEpwwP2wa8beZ|`fsH~cBrkW*xrj--g-_hcy!c$;=AAA0LFhzcq8a>?&G!q zr8G=9lk5H6Y{~>0Ke*pQFxxrsw}Im7%oi%QZYyt}mWSduy;jd-LfE-v2eTB(Ex3IX zK67eJv6KYaTvKGb!)1I+XF>>q8+k;G@W^AzO}99`F$GAQ z4Eu^@5KTK=lALLJ`D+7|gF!m-fhm7hse@3Hcos@e%{}B)Ri!QcXo0fz95)!4p0M_buIS^ zt|;MN2p)C(m&RF`L|?geX?IT-;;*{w2^qQR_*!nogjHODrtbZL>E+{0 zOn`#vCk0XCEJEpz_VauGemso;w^6Y9h+$O%U6n)0>f9WnRj|-^VU*HXI><;zBdpSf$Y}0K zOhLV7)9kBl4xE3u*t&IPdZ;H;^$k`1B00jC71OR}d z0ssJIB{%@Y?|)jR{&5B?Ys(U=Vs;&?X6;B@_N-q0a0NBDEU$-tDq#z?=ct&6?Kd*1 zWtB!5+{_5M%y@8^Z|pp=MiH_X<^O;&{gTgp<_@e+c0v)FdUwuwcITZ+fb8IIf2lur zpYp$a8HZSTy*=uI-G>XB#rpeB@WNCc8D+?XX(R(Vm2j9cfs8s6TV`p!r$v;`PT z73xyZtQxCw=;AZrOO7pHi##j&@Urf-NP5r5!xd{8)ahwg{t6%!Id%FFthE}p8BR@t zQ(we6ybPHQed1X;aoCww+jF-zf1iD(B31l!O%cB*`OPBi5wKD70Ew%0PI?K2du@*y zFBg03T8hGr{DvON?*aVoZ)TGTiPIcA7cvjy1t@$Up{ zux^mw{A%m?(vwG?z^7m}47v#ibT9ZN60?+Q?dRubQrpyHF&ykx?v`w*Z#c7S<>{-4 z%N)3J$fr@yCSg*srzF_;hFW<6B)b5gej|Q1a;DpSxCt-aKND6M zQt;|yoaj4?GpWg2Cju*5!>(I;$3NMh86%a=#fdX|g~(_(k=|No!wIg(M6`Q zo)`q9gPp3-t4v&4zYo!^aIVTO*4Q<9&zeBj#V1Xh@u5T+#;CD|*c&tMp-QgA$F(V! zVk&CgD=Q!6W5U+lm)8xu!e+c*5LA8p7p`89^#92J*&8Ki1yBGW5)$x#gB7g3bgIfLeYvNr|@p1n~ zM|>H(dfraoS;l)*dGqn_+o?Zk?L=qEaHX661TTp8zGpreUnc~;rC-NB7m=q1FC2M3 z&Ye0f6_&{w{WgodzgHHIpl>?9pcEHJt(2~o{Bb){hB_PnPVk)34^#{}HZ|-UYuX1J z@4eekF(1;l7kJR$jy30a9>WFm)l*6uw3=6$zuDHOqCVoy^NS>4g5BTWwCel>Xtb$U z2o4J>uGb`s*CSs8vb)_qzg#6(scT=}+G_^anRmRF%J)l)NWEL;$~NrR211@UzUQ{@ zTRP&|5x0;S97z4Ds-HJ-Kq9qku5I_<>Xsi{K4|MkOgEroC_e1-(=s!cU!bZ6|A>cw zpn0C|Yj)G3U3yh#QK#6<>{WVK0Sx}Aq)q!;ZL3YtZcKbZr_`(kzuxT)!xXo^-YGm$ zRd$%tquCrDjXSz~)+y0w1^KC1MkhC(J8i^>i|Bg3>*)G1yb=0a`>OU_8~V}{MC6q}(+`v0*#JLd^rLIp+BRm?qHs^X=SVpdB*DQ(e}?91%y>@w0#Z7z zop-4%Jf&zP#{{9n8qiuXji>VZ92*Xssg=n)HEg$-&CjtAV@*DgUp<6HU|~k~=)OP& z@!h=}pVGj0ukH-s&AN4HKKb{Rba`UM6YHn-<_WSiC6Zm7tB!zaYFe_LnxIr>DocSN zut9aV3kp3!0zDRtP{52eN!6nP3zsX4t`9wIuPl0b(WE6JoLF6 zJ@sPg>pk`P)o)d*oIwqN1)O>c`a*ye_z?`aVLy-yQjB2eg9$=~=^~!sdvoy1x2ugE zN051CYjMW9ZNm((IiDs_pxcIP6*?jS-z#ZI$>yTNl$Mr)9s{kmz(m-++Xg)+ZdlQd zU#iUcSgP|i68i;^`==IK$8@UR6#i|jhjX%Jv!-+euvx07wl`%Vf93o&-$8)*g1UAB zE^UBlcD!qYB19H2vAsZjN$^1KkXRs{unP(zO~DaShVeFN&5i-+!#%+C1SUbwqiv)e zHISVmb_7D%v<$JLcHUA5z+(NrUm&}9JqD>}Ma&I-5-^r)8Q{w*A?T)@k-y|*F|UXD zPQskg3bZ6ZPM}8V!4Q6gd_m`GtKs$BLwu3xgV>h5BitY(7Kf4JJ&H-R3%wz-Ld5_7;!@3MxwzY?5;%2P1r{1fJ*uJg5AV56JclVZ zn5_rmgpTZZcS#L1t^wQIeD;Hz}yb&A%f;L*B+ayt#V} zFwL}^ZIgQL0bh9n#?Z&1a*q>u#OpswjU&G5tFd+m#r`D2nnt<;Mt+Jn)4C<_^j71a z?SOP~Ugc8+|K`JyZ#@z;kkuH(G&^Db?%+U7kXc$_V+v9ECVjS(f z-1zORbpwQRI}jjI`e|Nu<|GE=OMXlsCP)ahGrJ$2`O?1QsPAcVxu1;JW=^PNPgsTC zd-CJ*+9c>%cdjx;oce~J3CblP2v(aZD*=wUi0~ne3q2(_&McHD&fuJ%)p_?EUc5Zk z6njDcPMnJ_*yRhC6?pF|vD|~k`xHg*r-Y5HVMw?c8s^dYq;JNagg|(KXzKkU6{;Dg zem6NV>jxLDS{RBwYxM+7G!Z?Nttb$7pY=(hXc4(013w{{do(CiiRjP7Jx;zz0gV~c zXDC&c!FZZ@kNXFW2Yyuwhw`9c@df>SPGP{6 zt*KVO!=Y&DM3@L-)QyfMC__COx#Al#Ws0w=X%$9nY{j-1#2g_^m_vZX0#ZWdO!R_? zNk0K%SfPrWL1jrB7<0h$SU5sjr(7Ti8-kVWTL#cvB&+rOqN~OA%zN^%ld!_t-~1|C zqj8wwcUT|1WhJ$K#P$lnRoe9zzs%%%xQ#?@P^fA>lQY)qtU6#VpEEAI^}av_emgH2 z9X&{CsO0`hxW#DXBMUjb5Gytou&AWI$8-`oXIk)lDKkFD6A=BDbkA(nAyI~Bpj6<` zw1>?764r~_O(F!XK^ZO>804ck6t*jp*iq`p4{WA%JxlmGF#R2FC%AihYh&m1Eh3Sn6F1WOHd;1nlvB{j6V~sMyxD!{>JiCgnP* zcc&pIA}&y|jxlZ==1=p@ItXC798@p?YbUt(?YvxkDn6gRj?8m4_;&x5*BQIfWjG8| zZ)is=4JulE`Ce{#3nK@}wE#ypIS!>8s}m0z#v&6;yr?X>Mp1Q3Jf3lV#Hx+)?a z0r>g>cDtDP(S^Ojr-zA*^FAuAJstv{1RoY4LQV_m3K@O$-|9=YV!h6t`bWG&-pkZ@ z>@5tYG&Z9`@t99hfRctKCT?_o4{Qg7Gft!5?%;C=kb!_dl5hMAo$7S-VZn0>s}ho= zd0lZ5E&i{oE&5+E_uo5sxo;tr+Z31_sd4b&3x>KXA!yVn1++1>qN8MTBNa*s*oZ+_ zfyc;{`cy`RLuM(U+aO?wJCP7XzWwzHZzgHG2uL}kW|Hv+4@2DxGCy3Ewl2&Fm&f5m9pCJCwADTK+XHJS<(rsTFya$EYJ8KK zh6B$#uNNQ+NM@uUB*IjJst)M&8~Z0HEch+Nqi6BIsV6aHF5-!DPH1g_Q%Fj%H4)61 zO|Lv9$YW*k$xe$^n9@)tM+tjrNUD=NY>n`r;w~=2$bT&5-ltX>!;)lZuw&3rRZ;hJVm|53|T z6a5A~cSG|~0i4Gl6CvlY*w3tmn`Zx%)3;6gIYLa1$&gog@~6<`S3G4v9XCFeyp)!? zeUPGD3ZDagL_glK%@>N=FG5XkVSoGk4)jk!QjUyd0!$AsY2HM4y8Z2?koG03Ff>zT zvoGJ){RLIU0&JU8JiMp;cGatlTo{+n5+k2PF zXzfG!=E4kyZo?AhGx}d@@s+g_|o%PL+t62=o0!qNJ2^%v$y6JuqTs|%QCGw`}Smt=@SCbIIVb6sV2Y(*#b1=xeJZv65eFnZQnyJUQvMuDGI^pi^+zcCRul9+%% z8Nmq_0>P~hl6xd6BO5C_vt1gfX$%4zNR@-gQInjyX}noFJQDlJlVS;+Gi~WjYM}lF z+3vC9J#v_mgY81nP>jSnUvP*5>NT|kKwG-t8kg8mYv54c^}8Q67f%yte@ElUXDqta}x z<#b|5kB-VTcBH%I_P_CB19n5fe8S}J6^4=T~D z^Fw3z7c7)Whv-!Pp^TQCa7YM?FqDpId=+j6;rIgXtEWD6w%alG`MRMys(4%#0*PuVRgv%D92H{eyZHHU(k@-^A4h zXRJxUAPZ><{@BVJiwdz6)sET~Jq63a@lGmH2%T&j{%&eo6o~ofWt7pJj;&AhXU<8P zrZ29u)Qf&8LWZn&8e7*AL6H>`(_?hBo2;jhQA{Oo5bau#y5SG^vwp&o58!`bfI%1X z@N9ShK!W-I!~p*~1poNYF~I-3dH8=~nkW93Y5u>VGr+{$#)#I**wM-He=%HIYkeDi zQ)34@3rAa<|A^++{*ws&aCqPXpe} zr|POIiKl24vYAwM3mukiWXt@^C#}VM1?6`s-Lpd7Hk-XjaB* z%un29bBfdX%vDA?`>gGqS$yqAOe!?LyN<+KN`!6|-lQu$D0L)ktMviKgC$Fi9mL%yIoUI`W*QM91Q z0irp+M?6BYi4BKLUYnbp6ufAb2%#73!&R;A2(YggB-o9<4wA1-hmnX#oCAhWudNQz zQOCzDeKqX&u67EXdv0q#*KO*x?@Q!v6SZoMw)FgSsgVQWfCm=#d#I~#uJvM=V ztr)V%zP`l7qUE)Z7wshDkN2LXsKuJJywqvue?b6(Ao;2QHpZyWV<(78M_!&z~`3GuL(bVDGoT&aBZ#m!3ixj+tj77fUohvM&b8K zGhl5K5uE^uBK_;L59rweLs9)Net*+}^g#d1;0qF4SO-6MEA>eBn0{y2ly5~bZ=dr+ zpzDj`mcFOoQDyJ+BYdGf+`^qVe%tMYbh81|dp7kI+(mYlHmwdE$c<-LXi zY3Iuyw2CLo7YvT*n<8QOzUG)-j)GoJLaKVkDqE=X21@BQO8HT(kqFeC;J_21tPei! z>x~zUrxqgT`_a?<3xsS(_5}N6-d6ogaEs(Q9$*x8`^zlpm)Fqmu+mwY-h82W|Ut&y#0^gA*`{X?X$66;8(FB;;vOl~cerriXcRc?Xx?h$66??!`Z4!fBs6ylk`hcg(~<_H<~t=qR`lKD zj)oC^6m`g3pwpG0s+aR-%)Et@5fCREKL{Eo%F){nK1hXz~AWSK??j7 zu72$yKqj*2uX9qz``R0`t@e6}q$be$+PqOE=zh<9wy^<*Lii!FsCWSrp6ou6E?l># z#(#FzV1ZvO7r-6k;1yQigFb)dP0BdRbcb0uy<#VzCV+gfyBO>9etSsWKYsoB)c@`J zSfY2;oi|*&bp2w zoL|?m)McdEP{mgSwcA#C3WJ32(Kq}OhU;$0g2a+^Us09(BDTV5DsCPuUj z#(kY~IJWgj-_>h~0lj@U-H#qzs1ifr9>DO7`fHykk(m$%{TqJ~Jh^=6gOK%b!@$%e z=ex)!gNtaim*J@Zszhg75-)0B5QF0p&?A`ZhshBCgWsUF819LKmVHs{&Cg(Kfe;F=-S^2;;?u7T|=vnhV)>HG*c*(h2hT*A<2KEKR zOaF{ah3e?$^wUG?6BTdv?CGsLD8+)k#J(9z|69Y?fY6beUei7W7WhunTPu1Uv1ku# z4X{IWK1#h2lf;P=EGa>#iC+0b1ou-zqj`C z3#G)9m6{(t9rO=;o~1@!Fvybvb4C&%gagq-Qql*+uVRluG5iQI)Z&ag(6C|VI;Hzc zU`Zur!JxcCC21O7VmvgYxWK4DDG32r^~Vd_vPe*(G_yvT8qMYH15jmj;{!}i(*@8` z_KC>Mad7J`!2Qc*Rc+NY{k|!e*!BArU_>Qo>5VVQ8L_&KNXa2Y32*6`6=ZL z&i!rvL|m>ew7^Q|=fLW+OfLYdGU9Hku=YDiNj_?iE2EupSaiP04jUFN+$RrgYCG+-xNwJqW`k7_W_1gw2ry4SSNa`yv#|)vQ~C-v~x+ zgNH*|Uc{HAFU2W~i4eaY;6IkIA%6hB53&#hC(X<{X-AW&)?66yLW4~aa^(gMMyx%& z?7Un;SG!B`6Am}Cy!n))tzfhS9#$19QwZ!_MJDJL6&!H)TLv{g&K2zuRJMtf_s*>| znlkL27OZgH3#@2s#Xf6B&~LO~oaM+*Wt^FKhColEkFY2@Ixr%N!f~o6IK4#5m{Vq; zC9!cv82D-q2CfF&F_p|zd_{R(Pt|*0Z<$GZGXZT;i8~e%pjALk2K%>!)#>c5`V2{u zyu2E->k^b{)(U&13qP&?@@-(24${SV9CWAUw~W!GveC8!x3D6M0g5iWKf_?cuK%%r z=t;WLGZ2jvGQ|MtLhXj0`ii!O{L)Cf$d+nQ2cF{vIzEJjZcTgCbw(h~Z1@uz z>K-L;t%bzbNJWbq-Ph}V{sF1hLSV3qrgmKwDPiX4*Xot>% z#C^;=t%vO_45)s5{rAp(*3bCFh8Nz$fcebu{WtP6#G+3s6gOFF%Rm z(NNev*jmAu%dl3S88|WP2O~aLl`6laVn@uHWKQdqXrRhU7JSW8_Nl z;|>3|Ndzdlg=wHpCg2#FzvG==i^jWB<6iqtV6=-{`f z?wdi_(_jj>gx*p-m{Gf&TZ}UWn6wDC5RX#>Yz-Gz;O@1y7rl}>$}PYnN?#bXmBLLe zQotSckrA=v)|qJg!Sm{&+=_B+FmKFP>dW8pRyL_FMIP8#MZsD$m7USd?7|Hca?QY{ zY=FRaLl1EVU|FIOSD#=d8@wk8{Uumg<;rBx^Pe5C>jCZF!%Jw(uG;f;M)QtVnR1bS z#kU~q_Dbu|4}Nl+c22alPH7GhAtn{jJGtN}aO$>$S6BRXq<+kdHAR}G@=2BT?Jps8 z72O@h$p~qV54lQ-=K%+>!{|pSVa*f-E`~(IIym!$3*cS!N<(HctkR8CevY^C{|BA-J&Y0KK;`dV81e{t8vs#iFV$Wz1F5NdvUTs^^Z$>KbdObLEtM zrwS2UD>!>jtzE?#5&D0G{#t>o$Lpk`6*Qkgbm4IKMyih~Qe>@u&1faB#Z;#a1gle5 zYh_>@Iw7q(qYXZU?fxj#chb;YvVy6!uS-4+;0Kv!Nk^ z&yM2<)#a50I~(GKt<{b=FdcH7zJnhK0%qq>*F)Z;cgDrhqexWVgwCnZOikP;B z(>(Z{xb7Vkchpe3*osNj8dKnH*qpd5K813~{RczXCI?cGT%Jx4ahL9#l%Ml`(suS`DL|PBd-^P3yCJJA^!TXn26(&oOIX>5eSw~%yGCJ` z%CrdE(njKd26MVou74K@gK1KzAryQ57JaYbo}Mqn`pX7l{s=#ao_R{j#KL=NA%Mb5Npiq zzyDs^kKSf)LqXD6d z36(lQgm%_@g({Mahx&|Q;k`?^pfk9EI{OD>m*R81M8Vwj{lw040w6fQ-n~IX{rVlC z!->AYBVfEEx`#R~$2t(`7vH$lj6wCf6BSLOEplR#n}l*!2Tu` zy16GA6^rm`FQq(WzC8+B6E$y?$=W8ieoJOAdC4oY)N%eeZXQI}B449iZ}STJ;>BW^ zMFkESfD4*Qaw68w)?@wR2}qjMvrEcfk$_q~BOd>or#MsV#CqEV!4rG|2T*2l*%Duf zFZ2qnIkI%3b}N0cVj{FV+Ka3r5ZEwSJBh|+_%zs2IE-K#6J7q4`*9L5L)3g@7b+kL z#PL@uopIL12AVWNTy7#v#-&qPkBnubC2OC$?U3SN(l#F#D?PsK`cHj4ktY@4i}V0u z%SbDAsq1RcGJQy|T^nRBPhHZ;AD^gxZjNz2i-Emta3nE$oj5q=-s@a2z~yCCxlK)( zKJKH%?dU5PfGH!7j>Kt=xkHlO;(cPcdvwo>kH_kibwE>d8b%O+snEcB5(PLn2D#4! zsQ~ROuRZ`$VqqUDbM9Arf`&wpiyJYS@n;j*r?L2s+dUZ}f1|Uv=;pc>=UOg1Y72Ju zX8n4l8Xl1kuexC^@Ue$A?9vb)CP?#!Vl?BbxIQG8eO>2zEaFPtCiH;CO8 zF2LWlTIh}taVf(nsZ0krEb2FsGN5^+mcII*gVuo>n}=2CAT#cVe#>2{I^ntTnMl&t z95(eCH|eUt=404%a|5hJRgiO3GGyN?R-$ZC-hE)h=0~1aV)2nR4@T#3t3XVYn8Kv` zIW<;|Ajm2Z={JSoqUnWPlLnxYSkPC_Z%rA&whmWen_8#2m`HI1yk{$z(f|oH0H}?qK^dd`~ zcUvx|O9h5D-IFG4>K~<9`W8RE?*l&kr5jH zk41eH>tVkUoszpT|F#87Mz}I~P#@1kbTDPDp$>@)Ye(!?F#%J13=Zo|sf*jk7ZEQe ztE>#gC`IT~SoKCTP1ZP3)b_tMwzJt;TPz-0b&`x$4bCGbcbIL+xZD3KFJbL~!D#}= z-}(N`D%rfy)OI}k*$=KmZMMM!DVh}iO@n-~1U2Le7VX zakh3Wi?Yn~9pUvgw|3Q@I0`ugkA5KgGwb^f+^~H)kybx4_$>9#H66*w>#n8e2r1KQ zQm|4J2KrUD$2*+)zV2mH$TA~Uc*st|Q}|6a)_*X@Om|p$ZOML7)yLu_nJ=$7q=&^G z&c7l&vj^{!C@N+4CXoX>(oFzEm!CT`=H(9DH$)oU*EU>s<{)sylyc(nYcbhUT?>EW z)C+y{IP~u)653=vDPi|VpgVK}1_3S7sfK&7q{T)mtG zr535a4~haVgQcj_#qH$L?amV$WDwlt_`?5Ue= z=Q?zHP*HP0={-GenbGl2 zCRZb4mYPXq)z-5XC1i<^Tzozm@)tr6VODJ+&X9?BR(Sb6CnQSD-`TMI$q&ZfAwgb)k#j!n#0x zH2b_Z`x0V0S=S)qC{M%q@DfH+H9dv4u3TGJo|8BK>07|uBUmwSJdDKt>MoJ~vw(@} zPhu`+5}mZyMr}#Tvy%?Q>_f`U6}20(dUJFR^--20(O~M8)%{Tx3ETAH)cn%B>?!Uv8Q4AtRNk&YkC)-r+{Bo?^Cl5HE_RvTI?Pc1z%M<8=u29 zSN-j6Qwko+L3d2iWatL+rlP^NU0`P28Xsq3(bd$jIYs9NXAf&}sD@s7->IK#N;S@wv`?z6Jart4RHl2tS%ADg zwDwFiIh!S5)0zfyujbE*f#Ld@)FClX)T)SYY2mKVmiGDeJWM&u_(SnJub`m}($EV` z?zZIY@7h-|VpDksgP@V^EG-w$tNNp+4af=JnKHfD6uzSG%TFLWg1xYA!DqKLx{S?B zGBVv6Bw`)0P5AmK7-HC1;EV-mWl9^W`0>_1h#}k#WP6uCMp!ZAOGly?diZ2!fH+~e z(H{T0wNuvMT5+AI3#kX=qUYu<1~+g1KoV-MQN$$tDB7Y7k2H9Yj@Q#BU*0=M)!p|q zKL7JOPC~HBF&HDYY7c5uCnoyW^CFnRMj9Xt0ndT4C$*Z=L$eQYQGMGDseq~x80yBl zT1y!B>HSP)i+x3MExb)rZN_lB9sM+cABJ6kxUGfWNE@ZT#xeC*WefKyG|a|kA1(gv z%J=TN?+TOR&hN>{W}5RU-_2~@{^zGHRf+y?qil4MugVB`vE!7) z;z`y-ld@N<<*Yv(e&B`JUuNJUZo~CLFIPl zM{Hy}A<*Wh>aZ=7tJ{9 z_M<8~p9ngp$8d3JuJPT;vgG{(Lm&d1~sQPi&^+`8!YNbqhIt899AO>tUW)*O|Obw*9_P&;2q(rLB8 z=Dfx){>Y56`j{5UP_mYa7LBvHQLgBacw~yWyV)E@(p|VqN7+D9C>4#lStPAa>N4?< z$GEo1{zP(J}k8$B{A{0K71P*R=2SEtgRmQTfNzGB&LRq z-^Hc%SFW4W1Nt+a0x9~u&@>b68Fmt|ax?x(NX1HywDe=Xx@VykR9a{gawKB8R zaHG<8la_LR%)A&9+Z|;W=WW){Wu?;GbwL@9{DEhqNk+KI6k64%@I9nNi=5Jt6zSi; z-TX}{>MH^oL53CmvA8rZQSk0olo`gcfxOq%P?3k2QhS*D`%1Dd$-9L^k~cll;@9v= zDC%i`!sNJEpNHQl1z8{W!JJ-}_6wIZGw)F%Mao7*W<^d#mZG`jVjugWArxp$mPZZG zg?8z7eyU|OGN&Uptp~A?b{mro{BM@afG?yfM9nu#r`@4z+U4|Uc_$1o-& zUL%%N4d}+Ca|U54LS~J@GZMDhnEA99XT19t@G!>)Sd}H4U?UX*!Aq>yOU~Y~|D2FT znU|l%?0UvjD}b6!6P4TFngHa4Q&|VumC^)38JzQ*O^}6Mv^Hy6s}Y4OF;Fgj>So{?^jK5Dnt`r^wMr6JVAxMa)9l{ck2Koz`Z9-#>x$N~9{#fa z6uPPWVL))et58-p+}^#*{x3?HQ_M_GjWg zQm`QWlmvhgxU5&fC;*;%87_I){uiq$2EbGmDFkID=M_|L!68)CZN+BQP(y-E$wPJD z4nw{Fj%9DR*cnNC|2LK$`v;aS{wJ2jQA3$5f}YTs5NWKLMw+rGx2Jn=x>Q?_NeXM3 zaS7}2(uiJeD=rKlE;_z8-t;N;n6}&R=l5Wjm9+5jw-cm#al^0-P1(1Bm}UJZj6KU! zY`tu0{#Mf{pSut?DSJR)Y}8cM3&SRptQmq|MU@k|SKcct$D+vD`^5l7l=E9X1H+A! zkV%bjyb%_sXOWEI*Ns!ZpKO1MawpQcgo_!!FRKQzqN7q8_V4m)U~W2jsWX&G20h{* z?Kk~*a0cKRB4JjZA;qg*CUJbl8Q2s`wgb&=KQv^vQ|bk~49_FZ+pAC2>Q6bFrOSkS z0^a;DIm$0RJ^0FOINH$F+N{p}^HI=V!%ld*T<2 z)k%K38IjfLN2&dXbapyeL%O0>Ws}WY;&;tx+fjPg`3g9Y>q_l!km_7hjUdbn%5^!Q zzjXG4+b*})8eVGi_A_sEJCRQBfo>ZQi>cXV7`O$`VIwEx0#_q}rL_naB8+}6wG`GX z*ZZhyfo68iy{fn-dl|+_XK;5M=2@rIDd;#$r{!70I@)A9EjnD#d`&RSp#-B^(JfNJ$$wU!VrmpxtX@D~ZY-frPbufQ1|i{luB3p#7b z)wukZofp-V;Au_6#CL`*^}DL#1V!vA2(Q_qou~$b-WLV4K5G*u#T=5d=cM*h{{*wf zEl+z@diq*_I3*A07Lq3X&d=G|1`2U-JeO^26QN#`x5tCYsJk7qM;SPK_~D~;40Szb z-gu;4?mY^{b=#bAa)#PnZLNwDL7dDX{*}m{3hPQF?{e|>fM5lSHmdG4FUSX`9X+B! z`ydDJCp4y532dOb+k~62XFE$9w8gfnnldyI)jRStdN2N6_M5V?mzifce3id~J#RWl z&6rD~=c}-mG~z_p2~25Ta>mjSb({JbP?y!kmSoD5G>(UV`XdzO2|c>J>A)U910^Mx zA=w5RHk=4P97@tinmhq=qyT?A3DWryBKi;h`f>%AMvhl6!eP(268}&BDr52w{>qqR z51OIRw+}->xXwe3TvX-_;EKMH7lE2kzCWj1Jw3;R8s~rQT?D1++4byzJ?cFz9^onw zb!sH({NAPK-9xA^FFr3=L@_t&VJb`yI6eJTP$+B9upqPwc!zL_Cjxr8L`p+4CcarXo+ z@Ccr0e$Xq&|81$-2Ja(u!i=$JRCD&u2cl=>eyf(I?#9R2aFf@{7a9)lO|z_Z;TQ1Z z=ZNIwUZt8-MHS*TN<5OA_#!rEK(0U?r>|Qg)&HiiI_b}LQ-a3Hc}$|GPIwDV=d~n@ zz~@WVf<)tM&M&hz$aR?&lDqrd@R+~mc!0Fw&IhVD)`kgMJ=A?`c@ZFQo!A@b+v>6-#1~|8fAeNTnB!{ z)612Lb-i2FZ)>D55&UB|%yop*6(*GNcwfr|4+XhRu^dHgK zI@RgBMmw6dwywe}>n;VDM+XRua&p6;hCfj)^~LTq^?Fpe!qstVn}Dc4s^` zR%M{G8TOI<(L2*(0({zFTKZeS8sNBY+bz~_5XOy>1_1r9>Cp-yUj2+Pk>lY2BhyRz z%I-gKDi!S=&SrkX?!|>dSuqoY3bmvE*IlJ#EX-{Y{6>tgtouFXXWOXr?*7 zR?UTsLz;WQZ!Gt>u0w8tJ9D1D>_NDtl>o{x1qYLCa>kYIZQudik+4?d5 zGTFTgGu$6qWkwgN$S|{b!Ps{t?Ss5GJw7t$eYWB8;=xf!Ocd#xJ3~X8T5{y;9k^3c z=kiR8Yxk#y@^lQn`y_x8U3?1eF_aTMd1`GLfpF?w>VwBS?Ha8euaC~*oF&hSv^7Jo zdX*bZT`P;ryUTi?5}>I0t{^t}!Vo$BRdltIYH~D@)ggo6yo!(F3{HM6g^s}4{-2>L z2g$qt7jf?xTfw%M_5+ji2iI!<=Swrx-U&Ye4T=3nQc=1k4` z^i=KreB8U%yVkqV+`yzjbE^E!J_SW{j#l8&X<8;SiVUNowt0YqrbPMMcSBjvWJ|vi z(LnsgvW=ENIQ1$9^D}&DJNn$vhy(FGxACa8D)yQkz2$QDYrxml5!;2?)@i275)Q|; zw(#DgFjt}6yLo~^n*vi0t;PGD9zj+7SBi$;_(7@XzUz04H2WSUj8nZ|53g2po-{Kr zYqc#75+y^uG>?s;n)Sjfr9G>jGAl4zO!CY;Wz;ecp_y$ix%2mlHxGQK{E9CX(<(A& zpI5sG{eRyW2MeC0*C%sMuJO0nc#GN?btlJ7!*lMX>X#-Hd{jhj#X&b#Md%uJ ze3t$eBmS*1>TkV4DQQpiP@du7@RrUl+Q_uG1(uTS! zo+(hbn7jER>q28qcOg~3=+Gm*XWJ>K{_3(g#NJC4JNSKjPf5x&+-+Q3fOJN!I9q8Ka6Jp)fyQ2Qby6m^o ze{|U&@Tvb^mo<&$1Mpo^(r6RfkldQ zO3Q)g$s$z5lw5m|*}gkECcE0Enppk-0Ry-Fr@q^S6)GH~Itk#O-XtkgT-{T>ZNTDr zdV9yYy33O?s;ogW;utv5&=tPK9#zCh!O|LCOTwt|4L3|ws8PaDh9{~Hk9-!40Co_{ zRuwfH(FY&BwjMm4*=ttyeTD{LFaYBFfo`J^je^%*rnco$5gE1PwuCx|brQED6FXKa z^wIchaXz@LdrbM8m%_U%WIhp_sp4vC<;;`jGS&=gEIHuTceTo?m!3MyyY5erI^-w` zoHo)v4YrakzM(@|L|@B??%GUV@rQ{@pEUR;yC4Rm+oIP2jKOeE0D@t{-(vfw>=3Q_ zPWZQw6B*aoOw_PZ2u2tQ#u6x0xDk-(xN?(vMYQzIXQq)sl>LhC*nFJl2?{D!K?zT% zA-S2V9Mpw3Yn1Y{jZwwuhh}KQUndxR)|&c*uj2h)J4-(veSe>woZz3ftd~tBl?%Q% z=-uS%|A^%TB5mv$Mne3XlU4M(m^8zS#sjNN2d+5mn}%bsh+4yVn?p6kU=UCA3GcdXL_G4&Di)=CtN zR#&SLx5>S23jU~*$G1t}J}}o~@=mxU7+ry59HJKw)b#%*NeldS2DUzZj$hucq&_qJ zVZ~%#*khLJftE7LzO$c#v1V71kf2i2un?qC8=@$$x4{?1UtB7Ich8x}NyoMlk7t!z zX#Hy_M-VG)H?6gm=f0EO)jCSiwl(vx*fN&>@X_s{uPMqhcZn&OA@Wy=l)0Tm(q4cS z1R9CY6wm~Brz>vRh|5E3A<~*_wZd8UIY7K7>&x?V>VLMjUcbEop;EvG{dN4-7K#07 z^nQjNL`N}1>r~w+YR6>#xUNTK|IxhPxVY1Tn5PnU)-YkNv^%}R(jP9}y6>=K2Z{iy z8_ZoeI9$mYTN-A9{+as=ZyUq2BZMPOIYHzz?Zy|+>JVtA%e7&?!4=^!ySHi#TqVMJ zD~Pj)SJbzhiE6t*K3I7{Q1HCeFlb(L*~Yj((TtBe)yamxHZBBSJfVLqHm+46md`F|urT zd6KDdz44mHKQA)D7He`Gl+f}rjB0NzG9C8+neQ+H?%HemlE3@p%1EZVY^m4bZwbts z*k+2xYs(Z`7R8JQ8nuF=7Us{)YE>~Ca8u6il1OAaG)+nY-KN9`4>F|ezLi8-GQ>>{ z)ZKz&^rUcSBsyfn#|>DBJx?2}?O2IYZ9M;r$QU|Rluj^bIp*fcX_sUvn$EE0RcB`% zG1OGy;uhKHI~aAKQ_5ng^^k;V>$kJDD}L_L+B;*3B(mEVAazd~!b4E|F*o*c@M zj(L$uE+>YK`l=`W;P)aP6h=1PI}Hf?rZ|X7vWJJ})lUhw8Vh4XR>la_*69jt1?yZ^ z`H6PLVFVhC~Tv?#`pRE(*W07H4oW%r`Fo%razwGu6X z$qmY;;!a=h!-LR7*a2{7!O@89w%tufHd)+N`uOmeucs69GNi*9g|AtufhiUQ&XSkA zm%$fzsq1%cGjFn-%`AVU-X89c_j|>%FAjgF*Ah1Wk+TdzzQ0Rs#!M-J%`FShZWlH5 z1eQ(o8+0|LbiT5qQ}{5R>AmTKK@tgRqh(JeFTfYL=Nla4NAzP4#NPNiL78{B>+9?k z4<3J#2RkD?PEKOm&xMoTC=w*=?kDEKuc}T@3mp15Trz4BEt?J{3at;Qnt-tyKc+3T@FvvDCRk-XSaI*CVhGZC;F15w zkIb(Cm}j(3$k%(F)Ytf@F<&wOj`2Gp?m^G`+tl}Ce-z($@bu?wIQ+lnrlPxwU`6JX zD(S$do*|D^5oSv@=2BK|<9)G`A#;Hc3>E0wwIQ@L80=_EPs2(9FWo|#P zUys;$yDWwarJw@7OhOPjUySqGxPTcPRv(7|tD@Xq0AjCUj#qCn9YUq@P6A9s+C;k; zPhPSVk8fWi6T~YfE8uKqWi0rfkP9hj5a^AX^qaLp1Kqo~b{lDD1?dIQPZ^DsdI3>C zT3r8o_&N>st4yCoo3QVv_cEnXeeW1M;j<`-m@QW-F4OBFMf|mrkt+XiPrPQvXtowQ zZ7fFdr9jo;cUbb}J*v?#DmWYFi_O0lAv)4H=GSNh%FrSq5r_|a*uzgaFL>*ZShx=q zOu+q0>NIRn{5yB-8EDH>1Ebd0I@+%Y&4i!(SnwQ zO`?F-^D7Um|4I`6L;85l4Qgyi7TA1BaU@NnVsNX&U|Sofi`HWZxMy$Tvpg!e45FaJ z68L?eWQ|I540m!bSZM)Ry@7Tmw&y)~W?teukDb9DG2-MyyB-b*e-N=E037BTne&-A zL7MdMZWXQOD=(xoK0C=ug#0xb>=awwHyy$EX6atWkadcKybj(V7h@14g6H_Gl|xa@ z70s3zBgu)o@S06adShM%Fqy9>Uf4a+(xS{DBEj56O|xC;+4U^5V`RsOUXLx4U@BMF zdXX%1kLrlY9i2uUp9B-^4%1kgh>wAGhqc2nzbEIv?KfS-VhdS#sQ!v$jfq8fJ!nY9 zi*Iq2SYa_;(1y5{RQ<;tfx)^U)hKS04S6P z`FHIe|C)yR-`no=p9seMS44yUHRELX9~6CdEvq)f=wjspzuPPqy@WM73mvJConOuhU@W&EWU5{>QbI`$0 z0h{cd0}S<}fAv5@ituIUHGIW$hGZWQcZV5dlKq1-!XFKvyQqPNTa>XW=s#Y*IBS2r z9%s5fydKDEkj76H@GtL9{(`^w7%tJ@O)6i$cybHSf8;uUst(W1YGd$qq7A}c&6;h3 zVV~Qb>D;iLxQr1n_s#U<{P64Kd~qBYVrntoB&UVRlQ=r%=P;}3LxWp@_ehN2#|+1@0m%0Z^1mc zd^z}u41658yxDw9ramzVeu1ZxwinPqx!loJxa5QM&D}$f=Za8sgrp#{4Sap;L&~=m z;`AOP(wFxS`1&(`E}$#C)B~Q*xMSx3YV~O0`m1fz`|IPW<;35ZJFz=1JL7WZ(poG! zQ(92xO8yJVddxr!2r}0kHUyA{YVz&_h(P@j3_B8>Bmkf=7D>czA0kVWa-7p1=khBz z8jFL0J_6nY7J_8eUyz5~nS4Q~){Wso7wPQ-R>5};O{Bb<9PJ>u8<3FWA_(IEpw$kP z;BNyW`P<={9g6ECe*FEol0#iZD{Z=D6L>m38~FC$@yV`W9@9IU!ia=cZzbA#rKOrO z0mJv(aRIlq?Y<#$BI%_0-h`g8AjIX?JZk*9WX8o4D|mRZr+8xJvD4`@d?&*8^H{s7*dvZ+znU?3mj0?xT< zm>%69=?%8p=~`!6TwcCCV3tRb!v*_}azQQV69p=1se(5q=q7$XZT4E=apJI8IKp2l z+L-Y*dy@J~F)D||(`ii^W%7%}( zE$W$Vv;mDkB|8KIeN{IVNVGdoL3YSscLvizF~P!Hci%4p%o$%39>XHdjS;Z24o!e{ zd!ujsG<6hF!K7NzZvYO2*d>3~>fytr}uCU{1G;Y!tU1vpJWP1kXrvXi_t5 zL=YuU@S<@mTZZ;VoQfv1eXPDA+Ba|E^s^e_r2`G7wiW>=%q)C2Nl(9Xkw>F6r<4rC zwd9(Qd6tD-^KTUL8wjPfL0#uT08;n*(i@MC&?+(3Ln@fq7sF)apyE-O64x4Y&;oJS zCN0q-)Q3tQ-&!eSW5Y~XCr|Z-MhS`wi380L7(S(AH3FWZY_gDO=(-57cfZKR^5U2b7n5sT9mnW;WPq0>xi{VDd^wBr_xq@HeVMP3)u{VQ zOo|X^KRbL-6zuRB?tHIOtowM8FBqy9=yuv0Z$YZl?RvL9OUu*kyrJDheD9TQDhlMs zec{T(L827Mk_;)b^**;_wu&eup9u>npRmJ!B=F~JiT;!^s{^`hbW@K$Z%(wKv9D2*XV7|GD*vR#4r<)(s;CyQaIU%Arf{y zX@*|x&T#3d2Uc+ImUDt-%Ys4}>?P*p_RUKDSI6=+mbCY=RQx>4QbVF@e|h}G#zjy_ z>2lZR#EI)Zj})yFKP0XJml-YJOSlAB)*4vfiCO2+Rl()SMeK5`KP7loTd3O=$E^Yt zF8l`|y9RibVB?yA>Ce^*>4!wtnpFt_41mENVCr8vDSpFE38&)6F14lTvwmbRFu?nU z<6)$u#PyvtgTLh?bfY56YlEpjz}j`xQD=5e0%&t0vCZ+WP;}u64{TjiFyKKLb?_Nw z)@@p04srvcw}*!=Hnl}*AqcgJ8c`;->axLd3dc|mDt`m>hUPJj&^rlClI?GAD=1wk zbF?3D0iZjpDNU-WPO3TD($^Bi(j{Z6!k%A_rHyCXZ8b>fjIEOE+jA?dm7nzhXL*0X z=^BjM;asS%A-uOQEyhehBMh+w6F;Y!E;kP(&ZAC+?}6;$&ZDcX&wd5Y2#N$+=vC%A)y-hkDt;Z%ngKwjQ9Pp zgL@hsXE$oMe)dBQ#u@&pz}{u(?Zi{#Vb>?MUa~^(t9xp`^G|gWu9|O*L=AdDEU{J| zB0rd>E;UD>=Q@5AY?IJ~?sLvj-%#SMF$xAFqC zE(M#rUh9c(4*){Nw))$j@c?8|D45^%mS_?{mzUid|ubAAHjJvBsv?TaZJjazp|e#N)qaKe4fys9sXS?s`K?w=_)^I zS;z!;+IwB7T9jO}(|g%xWYog|fYe50siXY41EXhIHGPEslJMiyl(s8r_m@}k)hzgE zaYMjHIKD9#7aQgq%}o82B58wtGc%G$6Z9B^FxwKWw!Ec;@7R78AIwbkiHwIE>y^_4 z&gUWTFUI#!5iyjwf6`Xv4iX_;Etz~yG|`unZh;Y>BIzn?l6-;%J)@qQ^=e8l7>fjG zzk{BR5#|?fXM6+X>H~aUs}fZa&>{MONJ3G0VZ}rpbO5eS(C70qe63INTZ4DBOPsI9 zEwkcy_`e41a$mW(*4;~~b$N}b$0m^${rsQm=y3_9RfgMLU3N>o5lHHSuh*w3Y*aNB zlChJUz5}EYV6^S z9Q=q?abB4gj)$kho0IGuA_X-K+tkOsxjy``q`KI%sWR{&8*^dArS~vWV%;eHT`tlr z{S^sFfme20kIALcyf|H5x>OVAl*X71xJ-=wUig3gF8*BO2J-nGPDk93t+e8F2w>zo zrVOUPhO9_3L8BxJOr#ME2pWbx=+@>f)(IUf_Z&9!qKU1*IATH6@FDjw=#P;$#12iG zX;p3gYK|X9%PMe|?APPjNQYgIv9IREKPPyd6F$oz5>J#MJcZE8_H`>bH3a0ec0E{( zZYBJ@3V1&e+T$>4uC|{Z^GZIn)TddDQ+$tCe$J^2s#g_zy0aAL3{GOBvMl#`4sMDY z^Af*Rp11Ig;D((M=_1k5SJa_KQ%&aU`7|&8w<*DBfwmz&tf!@m>DyXVcs~i-xc61urQ=wTW1`Q-INg zh0O!=->sd6zWi^lu&T_s5%V&8TaF+7nq9+8x;Th$gM=GCiabG6@+U+y$@8bvw5C3v zy5sZ-;w4qQZdgAl3>S#aaZ%gSv2IEaMb&n*pgma{H1!kR<>+dtj5fL}n!`hAg zi8GykPdRLw&;0dd@RlQjgej;X^U%E2P=)3UN?_elG3&xlDN(MRC>inJ|&w7Eu%z+Bd@1+Wo}Q z1IZzP5Bx<^Yc`mmSp*!UYuypKBZE*<_ozJ6jO?5=o~gtD4q;p-{YM9Z5T?10M7F3% z#Lhbr@1`Zf7*Y4+6e@(eGRDPS6$H}`ZHPiT{!b-j4~b>+UAo1P%7McuRF6wMi|qOh zH)^bZYF9XP zXcDt5FljhN!OzOB{sNBm(s@8YwcNVjdkH+R^ore>S~q862}pGZ_ip%22^G}Y%| z+R=%xIV+Z`JJ1Mr+JMC%7?3GyI1J>=Y}h-I-n%kX*k2AlUt1i z&P$Y$QKGow^sdpVL&_~;EnZ>^#3z@EsBlB2@_@Nx2{t(k){PlXN9Xsz?$AVBr5onh z+q>B$Pv67SzWtmmgj^#F{^I`1B4cT)8Wrkou4ZhZ~hG;t3@2wl|_Eky{JNSHc zs%mVwirL+ZlEeHH&x~^e6KrP019|DtDHOlrckvj-OMoS9>IwN|?mEu`a9AjkV7#B7 z7;S;Y`e8e3hS;Tl<32*-7S2Blu>+S=LE+fxji{lioy>AYzuM4@YNPo|fGM$86l2eT zry$k>{oaIPqaEWlX$lgC*a*17U0B#0G?mPXqi0m!b6YctLeC%c8h^xh3LmxOP8B_x zm5PAMr2PEm-0b``d>lUwuqyA>E0p)JGtu>n5VvrDaF;ktZWu7 zwU@pN&h>b$$YaJ#muPw->ej(g;^=U9S6+2$RD8RGyQ7@#>LHPB4YOQ>VTzE~M7lGQ zF+e5cno8j{#f>%)p9D^=TcBj_+%-}C@|Z>?jU&|P6cx{dQT$5z)@gbb=1tFQf>wvg z?l_Fg!^C!??ke#E+A9JlTxT}viD~aMJ=JwJw9z9s4OXJcW=dP}7u0u#2wd9|Tbs8* zc|idQrAaq{%Fm1bWhV;5CD{kGC;6^z({P@qlpWrx&g4zSz+)vC7JHe|k2ODgaMC0Q zKkjwNwyq=McWN%zKe^IpDScPZ2W7 zjDy0uOGGcXLRyL_rbcW-FF$}bCe?9802z+5bkW{6iW0ts%8)8pcrn&P$?zTrL^8!E zyuKNYatbB&2gX`V_lY_6LXb1F?*GIX0{sb)|hH>3ToHjra@3yz2-ow_>NL}4&;p}L@+!W=gYmpZvG^-Z}S z#w5rtBin!v?Zz*_Hl`;FvgC^+2=5op2Wffzq&h^njoS&Fb zl|KJ4t~t#~O=)KvH|KUetbfF$WHLzla-4|`zY)L`k8etX(&<>t|FPF%5wkq7*KQ7S zr`P_yhFNp$8x@(JctBL+6K4Xd+NzjHB>O0XDwpz+7@Y#)O|iFl`y|gYkKs*ub9L$M z>3&<9lP%4eLXKvCP+f2gzh{B0_^9^&2kN@fwe2>gtz&6(Tz%`%<>&kp)?eOFsX@&| zpdrWa0h4z>(QKkS{a&U?X@Z$!`fHPRf0^$LT-#0?cKFtHlNiCMW4AmsymTE5kHqcZ zuq2#nioct#9LGVw5GgfR zd5~!KiX+B1|2YalL}fP@@u8D-Fgh-wOJ+*9H-c1JSIkWq0nXycTIj$Akj&?p0EEX8tEq->SG8)#;$Q=N9i>mJh; z`;JhDdeDYMgmTHbHkbuQ%_CG=GtHR*SXG2FJPxLv5#1ntfC|EfRqhQ$!YEJ^iYh}O ze||^Gtg2Bm>>@|aQmOSo$NZ4AP$hTgGhfZZr8|+}mA&A_pkMeXjo{YFp?GhzuDy7E zQ0KSsV&@0+&i=zmNB%=j+F?=g4<~K;H%@9;Ej)U9+B4^tvbf!kz7$TXmz7Tfg}pemW%cE4&;NB}HtAq>x8KEM@xj z6D_hhb7kJ0Hoh^Y(|DEV8GI(NzR`@QCUed5rPXek{yJZ{#_*3E>8vf|HDBEd2QET- zD~EP&g|}DL$25fUlp8YF57KhaoIbeIDeX1(Z%w9br=2^mkdWj*rUFQsOb5qIUK!fw zT2C^VUhG}uOihvqrBX5$8^Fq&;@`S(g-Sy151|w&)py0Wo1wGGNHG6Sm*aoSld8}t zxYeCMLr8553`M3}*m`hx`2nWeuyUS`Kgi_Md(a{ee8B5G@v1dGw#8bvs+n^DD=Xss z;DN8nwd26`T612DT~h9G@~Zk-(nM5iuuu`uyeBSgPJG=)Dnp|=Puur?C@DcX(it9& znUEkh#EXhk;pTHYWPGYxvnnoMSF=clY#PZ9_*+_${4Itz*_68}BOXaEbGXK`l8$0k zU!_u1C{B=;gywKYnY~1=%3|ys1TEN6^!j6FNyHfNy zb);<)G{A0>snEts8hI0rB$_`7SAoc`92wcc#mNqd`XU=PUg@g*6yW8yWQle+W0QJ-~UXx&iZMJR!|%-79m#f zIoce@ei=KoA$K^iS3)_mzH^Xakb<3}C6f}*ZTYjLxrP~jtsBo&t~iVR0+pcSfaU+< zkw=E|q$Yw@*jRAgdy0F})u@OOeScU`D3N^`51h$@{6HWkCG6neo-^vx13dc(iPKmd zCc>o(6eBw3cov8tkFZwG_4Z?mLL!`&TO6Zx$iweR03 zW9nVjp$Q1a@CKn6x1lKW3T=Mnpur@tdX$B-NUy-^&RSfHVS}5UG)GH7Fplpl#%Toj z)hxtjNeVybJX_lBSdu1@yL@2w3MEoFoEShDZC(9Hg#2$w6yr@Q zdsh@%uO7ms_dopaWZ$!`Rl=2cD!zGDUumy8N%{7qEY={!4{Pvcn;B6KFBJXG!qXl~?#`7$)C8GrLS zrmCYi*lnt6iw&BMI{Lcll#t+I??wK@{Gwa-tUOdol(Rqe2tKM*Q$n#4zW)Zw1*GOQ zHKuEk`z^>3DZ=y>vV$N`Ddd{b#8>#h#KrFZfW1EYqbk7~ulz7MJt)hD{x(Eo+J#0h zg3&(Mj&v?8fj;gE62c~?GJR&k=_L7`4Fv@StN2I|)%x(;XnyXjK`yH*ydOCO2blWr zg~-AzcWgmJP6eU7Xwp*AL|+<`eO5K^_LHVT6h~^e{WyP8m1~?Dy)iWHd7SJb*k3n9 z49B6(fVK^&9}nIIT|NqLN#&LGyPX)IVPg4$G1gUdME>vJE%4J**GtyZrE@n_to63c zS)UgQOI(L<#Sda_G^r=Y1aGGBD0$yEh(6TEc@< z*r0br0^|VkATbdV*UuDSm`M886`D+$+IeV|>-4LT%3j&3-B88*A5*J%ZmJTP+t^vc zjZE`q@iqI@Nnr2uJiBc=C9LOO=w-%#wtD%-pywDBB+*r!Qxae3WMHwj`owcl=UPqw@m( z$c|-g6V;m0$xLku*q0yCku4g8Rb)Tiak*)*2l1{}gR9~CIxOQyiFP{|Gie!qY-N5txEIq_Y zUh*5>=ac4y7+8Rb4pty}*&1fE856T9_Gs?OfhpbY;FJ zQU`5h|B8(w@&dw_Es#Zk%p|~-&7avbZ{`md7tbl_AgYFVe5j>-0?2R&&+dh4M=GbT zcF9NiJOcOuY{5ELL?K_SUcuhW)C004ms=P?Alu~%y_+N7rZ)Y*d~IL1G-JuGNX<*% zn%)ZY=jC2kyzE~EHANvwGZDi}`N<%qc+xk(Adz|UKe_q7K!)K{JV+%SoWqMz@E$Q- zW(cTP8U`@Hb5-cuO;V7AeV~Apvy=QIL4aDhRj zR)+$PcyABj*56RBV$HUk66oyf`G-}ZetQS;mtLL|L&vvv2X?ho3`bK4G4nr@Y5_r- zz4~6gz+J9L6$_9F8SJlr+2b75|;~ z=kf=yDw6hm0VX>or!Gj1_Ia#BY)~!ye`hpMhWm83wQlm(m9%%2%KIzgi#2(K+Ds?F zKf;U0RC|i+y+qz1@PauJv-f@So6CU92MK?W5_!kMMt|h^!Yy9i!Yp=tRJhz-*Uv16nYMK}7vWWX#t|DQ1pQhd2?sO5zB>o`7I5COx<;yH`FwKv%q@Il;7 zO7?w}9yUz4y*|#!S@^T+=^PYqrgM9wc|-5_>>dgwiYNRh`?p^xnt=yko3?*l3-Y$C z-jRj9gY*6pIDAdcE!YDajh1>v3s#G;Wd@Ehb0*$vr4@4(bs^|AIC5UZa=$GCUGGWh z&oJpBvuU_77IhT{G6zhBYh8@}@kBx$n?oW?bla|n%O7;sZm)!hkM-IV32o%6bMCc5 z<`g_)8CEoUn@LRzD|3_6jsFoYRI2T^>9E32=Cy-YP_xDuU}hN^#@2nWF26wj@c}Y_ z?1srv007}o|K11quhuu4|Mz;C7hfQC-S7M3oi#xAZ-ru4@4 zb}ml#HuQhpfp(_<536CF|GgvppVL)CUJ*|NedCTc*8mK94Mv)CQ?=F+%nC5d5ml}l z7r_sslF`7sLDn&U(;#JH&!*<HSS*GhC2PK8_fNgVjCAGe`D=RIF zb?r$zPLbVbq83w|DbVsgI;M6#cLqDPoO|(a4?@ujdU{1>ZB{{qM(KqqAMjya4rrC> zI>Aw5?NvizTZLPDVz!RS5|4Cf+D#<-BCVjL+|#&PZm4kj@Q8j(OxHyLTd8=4t{R&ZdUrMRntgLt9i z9`^>l*v{dB-G023iBXWYr#v1~7! zvz7^uc7}J&0MXwFNHn}Yd+g*FFA%(&7IN)dpYwI8Wbhjh4KxOGt?6ujGt{1(Muf`A z(Q6AqrY`s_aNTiKM<@Lby)+2RjNc6*@{i1@;~N=h?QSu*F~zH%gDO6Uj8-CWys& zJ{DpcDg74_-vOEe1b9o_vL2J45LzWGCly=lJPKDl>S&S^zV8 zH=$Hj*`ST2X9Nm$2-ImRjYR*ewZ}_|9XGDfq+KUtlYih7I-g6%G3%!M+h$@X=;qJt z!VUCBthqc3`q=(ql&BP$?+&+ODGFYLdMd$7SJ zs!r*1tLZ6hx=kE=qroXYFDYP*Zdypfo%0qP7&vx)IMeH29GercBTX($fh(<*W}p|w zf=e9ilvNkDx|}?sIw5~LU~8F$U| z`%Q|9?T>h^e4P6dH|pJ8xTRMbJ|PCw)NPM>2lw;S5qMI6w%B)puns~t6y9S@cpt7w zA~TVRoVh5gh2bj!x5^7V_?(8LQ&I)gChSrgsqW;pNMM)p5=lQIY8fZC2Y5!;9@;WL zv2FbjN#1FF1nUV13a=l;v$Xv?mgj?AUTlEjeWACJZp?UI&Q$E|1QZ&6vrl~Rkky(^ zgz7q;HbP(p>-ZHd;cAq38kF(7i90E*6!yC5>ayHQoKJVc^7w9+CnG_Co0Ang40RCnEo4qNUU>|rn zM6~&mV@YJkhyq52Vl9dmcys7jLiKtrd*fDfmn`(_5JF$+vp}`@-R7s?tXyCgGR6x< zuZyR=RnMCazjPf>6c()hZom-|rX^b=KVgD%yHqI8B~=yJOC9Mpen9J2DAhs>IMOL5 zfA?27y&CxpEA?Zy_G+~B$eOR=$YgukQ+(ZXGd~jt+gc0NYqEkAc(8;;OUHc-m4-j1 zcQuC6Z~oo+Zmh*Xcce}u>#3#ft4(!h$#x@!sZLXJG`vufBE!PNhy^=5FfL+9{-rBG zeGnP-Q4!Yo?(@>MP{xv1wVzunaH7Z;f3VP^+(UF1WlbxX%$*Uj^$h2?;?xFT*J;`L z?B8#L*utfwOO91xSL@DrJ%5w=BkGi#xyI(Ji6 zz;d;-P%|92s)#k3PE*Z0^(rg8RSmdIZKk+wHjy%7&6@e;AibKjg-(P~E$6paJA`eJ z-A+RW*obcuZiYLB&~1ZCDs6Pe*58vSQ<>QxwgWvDStdWIuduErzkd6l5qgl$U~JBw zd5Z3|?aX9wKJs3-UAa5Fub#a?eFkbC>8Pi8ZI{~&+nuyj^vc07Pc4^X4ZGB~Cokoi zma%fdm$x|3e7&`#oI3@UwaWkMC{k;)Kmz!u`Ua8mX<7bx658n0v;D)44yR$8+;~Qw z%lTldBpVg$+bty8vRYfZRC9%Zwgk#|MJmM%c=7s7Sd!%a+0TFwS_o`6jfz zUwpmg73+@h_0!B?SchlAUo?#Ov%&o*nDNy}SIC#72k9|N4_y012m(HK=S^J5)`Oii z&;fUEposxwGoYhVDGgH2JoNE(4SIO1;`A+#bQk0qF`vuIw`{kodI5=6>pGk4YAj!Uy$Aw*!ZA zc@X5OOKJpg67KmzOHj`hlnb4qqEZH87#+oYk)8`ajf6kpHf$DzE{oKM`a_pROVeH+^O&oJl*l_YK zjbHF|5}MMKdKs)tm97sl7GhqAkUy+Ar66^-$-g_i-fVbMuJ*gX+J;>Q`VPyGnHgrt zQ(!hgLFDLm%{}AWtR4|SxW`urk>jz}fPHekPyz6U5MuSFP?uv&hZowRQG*Tm4LP68 zwFzt~HW~txQWCokkiDW4MT7+~F){40pg&s;D4&lBUkmjSw=?yvzX_$t{W6j=0YA>$ zkq+96(3~`VQM!iD3+u!qFGrfwg`gQcHuu(R45L96nJD^IOO7(P4RIR2G!W*;#*^Ch z-$Q-7JjXAtC1CCr-IH;|Ha072RR^BI9Hkb7lq=uu(KFL+h)g>LCI4RUBlerZMRX4L2Gseot`EJ*_$^1#$8X6C-+8*nZWKz<%TH=c}IX!FkAsRQ(7U>Eh$uZ28rE7xNwHDC=n3<>@zJDvD#io z_!25q{4PE`5g9QaksZ(!C09!d`;$210{n|2l3LEGY+tmTJZyeskK2Lh%3PVYF}9L& zIoY1tZWX<$Rt~yfuDU!U0|jXUH@QSj2S^}5BNzk>L2e2%*`>>N6W1NCgw9sI4SvUI zEOH^J=UZi5SUpA%LW!Rm-7n>&2^-sv$01ADBwB&H%Gs{VP8CxXIQdhI;mMM|9i zU6K9qx>Sv5L1NPG#jqJdR9Zb`6WS!5+)h8S9w2U;^n3p#fg%X~MZg4R7`bFYh{jDu*w3jR&(=%E6rINmQfkRpYf9@!!PL z4Idd(HM1IdT9W6XoMnX!IPLrEjp8IKWhgW0fdPR} zUBoy@w#v`eCJUJ_G2Km`h)^NgrjT*6`e7nmHb&Hve;;>g$oL-VSvdtik~?5H7lr9J zWC1N6ud*@5^IdH%iQt%m5U$v!@7C7t3UsrGrR?I1|96(;IYUE!`2Ei-gO!qVh4P;# z4yh`~#xQYF9CXBJ^q3c&w{~WRr4#sW&4J`b7YQ=>R+!N6*VQhOS_}HWc@ic{*aFEoUt%p-EY&(?3>-^L7BC3Ua$5d%{-3*1%+LanAu?hn; z#DOVt^}bFp(M&=b>ii2bXqerFY$O;@&TQv{KZGiC5oE7F(c(bOadl_BCPfo zl`J z|Nfi6N>YzqPe$QVRN@n6OI2ZwPVrEEALUy|^I^>Pn1>(&9``6Rm_bcn~X; zSAy6>E;%VackL2Q5m!AV{ADMdrp9K{)4^Kb#7E4sc6Ad2MLCsigh}rbe7A)Tl^6In ziq4(wH2%EJ#;1)*3UxysTq0x0TBf|d6`LpiAvP0$k%@ZKq4MJ0CUG32P{JaYlXVH@ z492mE-rRHQ$LcnNGRR=hX@1gtx~l`)S^YQS-YH11aNE*N+qP}nS!vs@bXMB7 zZQHhO+qP|2=icYsdw1-(-4We=I{In7to5`a{`rqNzd42vExyTEfKD}Wf{g_GBa?$4 zsi|i9cm4QR^~#;xJ!QoRU<7;-uILEdg?K^f`zv1MeVg9%=4e_x%1moI@iol$w4n~v zhm>3pW{+s#l=@^rZCO6SSx7K0xlZiFcOme2iGj0FB;a>ZpbrwHxA0!gFq#~jlZRLX zRjjuDHN4MZj@7e^9?+2LTj!jb*x zAR-FQaXbP6eem9S?=kk)NqWc_lnrCU*X>UDC!1<7JkVXhHOGPY zVo?mXU+N}IoMZv+%7~w{Prv*$JQRP;+wMus@3nRBDh@uyPEtjq%*Q*iqkRrB;Zv&zhFhv<%HK=M2dR7k zwC>6tW6Mqfca~m%5K+zgTrPuHcJIg z+e@57p!Q{-)-D^yrcKuRr7vii+OLXjFcDy*E~o=)A{OMgEVKctAg2PJP2Ef; zN)7YAUQ2Olelte{&2U8@#2yggvsn#4e_5&G17VsrfYJ)gL%7z&8b4P)BTe|5Vef*I zQJ-;_b~^sn-rRPDlkZ2fT3wGAmCRw1{e)s0s(<)NEgKa7P)HfoMvmL5fYZ*o(CiKF zqDpC5dsZ#WRB}O3zzFxw#&6L1{@pCL??W6RpEK^{b)`{$Zu9!<%BIxAbcCfV_gI>K zR*lw7Z?c*B$o)(A-BNTqMp-8X$+XS zfIuR`3h3Pm38Aoc0!Ed>qLo0i#hSqWUxZIXpAC_MkF&h>9Bgga4%V*y?Q*`mu()A6 z&DPtLT2!;8RTQ^Ps%^}c)0I=qudSk+$EB_>hmUYcYzyL@(hGY1h_v(Inr*^DvJtFq z>yP+Xwv$Gt_0uI2o2lvPc_)y41#B4Tw}gLu7$ihXN>+SUY~6~T?xhF5m4vSqpN0cO zfamm>YJ#faB)Y=ZPumIRL35){RG5ADuY6K>OCI>w_$dN;b#K@>o5U_=Ox!se4dzHr z4mw@XzGggkbc1m$UUe9em%e9Hl0^Raf36sd;4RB_9)bXT2%-cz7O-rz5LH2MvNp;lJ+V|D%*F zT=1^L_{uv4oNeT(wdA%ma=jwH4R}z=6_$va!7+FYOyl@0%q_{9=%fuM4QOQ9E-=t zjfR|=oZwkVT+c^q{sy{@x#rYR5vT%i7i^I5Cvhfc%YTaT~ z|G4KCX2#G(!+p5D$3Fg2^_l%JE#INnqhY3lk(;smZOA#~S zz|y^L`6ynvPG6ple12Dlb;H)hy9Pw3O=)KGpBOcoU|JK()+#T_Th6v}5u4q#eTZAV zBH@91Zr5QJc;2m1@L)IgLZ{lD(hwf=0_+cmOZ-Hu-sLh!psd+;KhV5LQKP{e?Bl25^C^4L-xp5D5mc4=k~ z_ge+*d$xjKl(TW>>Y$y&^^P5VT(_Kll}m^r%ZbX7<-@#*>B;eAdUL#=dtH0g@4V@a z>5=*Nx?egpYORC+%RiLC-*;uRySy+q(mWlLFq6d{X1$H3Q#-P&`=a~8YV}^zeBAds z_PTcHQ2D{D{b{CE3oB%k!+lV4yK~44-p-5hm%%%{X{^{`PpEDV8vWWy&{t~uwI|m4 zekj?2o3(@)2QbLN`d&=`^zOB!FvoQE>if0hj*sQ@)l>DYW|rF)?zd_tt?4JeYU9@( z`#}%!)llIx;Nm+Ng)h|O!`b1)SWn-N)o)4yJsqjL0IG36ubUK`e{xGb zf!GLS$g!7LKkpFSsO5%~sLttatgGL=oa%r#!`&t>50m8-o#(u1E(fzlKP*2#{~4*j zLrLWj7!fDI`+J%R46uIr5?t`WT=WIHHMI_}@(tXspoC2!y|2;}va{S$*dPA93zl*qh<3t>_&g^!dtMOAxo)0dchn9<5mtR!P z?_#DBtrle1*k7?UqDMo^hyM-5)f|unMwFJ(b5Z3ct0lgn{7?pBfrf>OEe1{X){xmP zO+k~JDZ8lI9g4rCzTl4!cuRM4YKG(85e!XuIajJd8Lnz_*Ubn&2lJX>*vWQ-e+kjX z+#UMtb;>FB@{nStyP@DF)fWJ&Ru<5+snLOtV&%74c{DKfaD!uZsr!NJ-~OPgc=tae zrEnxO)COQpF|;K4c0Ru>Y-{gUMt64pl+4uES=yM~6K^K*{G`RkRIbycYVxdyP&+p8 zlLU)*Vr+c$ajD7DOq`;V?n>PLWn_V~@D){DshqS}oi$-wriu2S1n_wa_8T#UbT1J; zr35n8Oowwl#d7%vUl(O!2%d*MUYqL4c^HE%&he(L0%q!k}8<( zGbR1NDl1B{5ovT$gbxh4zpMrk(lC#OpYGY62HU}(6jH6?J!BhG)#}sizv@PDVu^-O zfuK+8Yx|-h`BarLz-@ zM^)bWQ{CgrjY-~hfzDb0g@&V(7Bs|C-7K1*0pgEi%T=YJ7>_>$yPVgO$^*S?J-EvdLhKsk;$MRFg#@k2Z({R(qigmZ$)$x*E({`uB(X&>Y(0uzx zMT?L3h3Lh3(iJtkbypg-y_Snjm&3_<)ACZwcH3Kwi_-G$NeJ8gO~l@;zAYctWf}>& z8NADo_?8?n<};Va>f0i6tu2YD zhj50L;oHZ8-{ItSV?0`HDT{J(VLmfc0A1*_w}BZeO!e8VWFt~b(;1a=NXJ+k?W?Ws zcPKk}7yLc$m-8|q5I{W_PU!@KOY?l@Tm3og z;;UGp*T5`x)usFli~?c_x3{D`_lMg&aWJVI#@C zos~8xQ7?f6^1&Pqi1=;e0dcY9Y|#)!i3Jc+B+7sg79R?HXVu+;J@SrOkcblPNO&cR z;^NCkPgvl-C`yJj7ET!)P@{8eVGy|zh93M2(99)?X(6DC(x976x|0NgZqQCAg$roH z8+&7t`cUgbuC|=lBwMdptnyIzylJ?El_(OjvaMim3dY%CAPZqAiACK5F92%OB7B1d zOAV2sP@$+$%+$>dQ%!+#It(Ux_#r5ei73pS_20WT4^@BmjtqV8mQUlN;M*DYP_7J> zsho?%UzF#q|3DIX2oG(8kDco@HHZzwt$})OfKo`@mIy8Q5x|f~IB&8wWd-DM7ehDT zf$;`Nmr@Reoay14Bqa+;a^LACBapKY8@qjx4M=9LaYZ4N$p5SOzS*&PmLlLb;$yP>3u$H#(bN~l2z zCNd$$90M=mM4jYW@M(alE`uK%qMS?^ES3{e-3#pi_r8Sbr*{mSrHtf}dln1hI_%A> zBk*CM@%c*#+_$txPVg1~` z9EE0Cr1AM_gi1ae!V^Z>Lo}4glcn&;lPVGGIVB687)}=!g8B$Fd0`|mJP8?n?Eqs4 ze(XAFywIRA5yY9y4;A2ymY-w@(n4Dqx<^=n1B7Pig?ZAvAbDht^+! zkK4210io=4aK#ibphSeHybNJ}d4UM=;ny$r8f`A<78c4G9)RVcgFWoobk9HBw#42; z+_qThi+7weskgJIqY<3~gMf^9QB95~{X5!OCv!H4dr&{+l#8}lLElxtQ&@)% z^`M&x2c?8%&?T|HmvoT<8FaqLyHo`Q3u=%qYyd-FF@p8A3hDFGyO-4WMzZHG^sJT5 zEyX}LM+c9zWTq+?CQioPB8;&&aAMs;5Yw<4ys?_u&EXF9`DJ)(tx%PE|d@r%< zq5VhgrQvb!#m*}zFVRLI&M_f?o8 zXTq5$PgG_kr7P-4F;Apdz^5(>+aM@nJ!G}CRAH`5rJ^o%C^(;B#niT1PQ44aS#9yQ zaSR4^Mn}==Jv_T6RltMTFUgoUX$8SwpGnZ)-SJsv*m;Ij`FtIBgHd^6-7(H*LDj&5K^}KNoD?(>OJv#ATRx?9-D*Aq= zJ24*0(4)?zFP<~V(o~oon@0X0LLQ126eQKkL}>mBo{nWY2ZFES{SZR97+qF$*Ha5_ zcu#1vRR|BS;e<0WhH8{6q>_I5u+j`vzPE8$xQwZGp2UW@qXf5|sj1@bLbgUM#B_s~ zgbNn1Zsa-7!&g}ouikbQ3&`%<#4#1g&*%c~1B!g;vk}p6jV%O%4#AtX2SeOmv)n;l z14Q>iGZctpy|z{P0;vQnT%jb8hSFJte2jJ2L6OuereukPdkCQS2>pEo+N~!=5+|~E z5;r*Ys6x7phNHxcdv;cZY~2QNcZGLBHC~8;aTgAI!!)y^6BNmDzlWWI2A6sP$kGLV z2OK#f%e zQouK;0NRBZrIKJ5!cq?Xl5WdSMxyd!8}B}_=POA#ow(*M5Y$w`<^Qgk>D!cx?(`egmd z#E?LUiNd^ovV&i$WhWo~AeZuRk$l_F)79`7wlTXq>BM{9_s=HEd*nejw|1d+NDT1hn7dw$P=d4M)1P$(FfYGkDo6aSK zyi-YHP?cWA(1;5aRGruaP=i_L)QX2kdJ{%Q_Llyyds z=KWmk;maAxZhr@zG=P;u?Bw)Yro!vG9~P^*wnG4Sm^erh%owo!bHg@d&(NBn2fe@7Y-xYFS;#-)OnEwn4G(&ggi*wPm=^ z#JjJayKp^iGKvP({h4hk8pB2yT1_L*qN8@GV@OV`BeYdN8r-XfOJMAKqcEu@h`Z8( z$YtZd(!F<#U_Lpal=m_(MgY5Ot~M!oyELJ-2R^#uob^6ATCoiJaT)Ry_7n37paGy4 zcZIjxU5eGACq42=xPzKV6~|RYuCsw9)Sf5y@Fsu{B{a-1^h*Y zBFewV7gm;w*lh!17j7DuhXMr*VYxZGfXi6mSaPDVeZiIT zEw^Q!m$3$oI>1TN2F!U8XFJXLXZkZmvjoRlW<~tcQ0rk|eISlxJ97oM6IHv4bcGrjlo+Q$30UDKxSrS2^*2|3OVwLXXh3{h`X;zl`sGyObo`qL>!tb3Of-1 z8GHJ+USTQPsfTFM9D<=57wkg``{)d+9G@CdMHqR?sh0!(Vem;>QgPCgBaqNouNrJb`ZDwa({9?&LZToH zsQS@+s)eDLN&nXD_43)^;%s}^$^e`!1arqtrw%W9aJ)cNmGz}RM6JI7}KrM z7l^(rQZ6)qEcsAKHyq?Wzhj|1r%@uFKS!|&f;B#qxx2rj-XuXmbKe_~k$=R>GNWMh zg_HDc{|E>zPOhmZvLFA+=qfrB%WftFvfZaE$Lrw_-$kb37z zO67afHBk%EBZWZ0o`3y?KyOONECaSPJ2aGh8jU6)I$yZ&cNUuQ)T1A`XO$ zDC2)yNEE=_lGY1B+9FEDHF9kvA?czMVRZ+zhZBgdaXiaUE<>NbGA8 zBQ|vbD#iVUXz2g*pC-Diax32pz=6rT`gT{RUxdJcFJQq;=`dWkE5Lvo0!}L6nC6)~ z90hdSU*IXiV0%?^S)d6;OE%#Fw#9Q>0~1LA4xterZdurXZi`(9MNXkVH<=v{Qao$? z90@g$GeLe~2fadDG36z(RmU?dQ1M4@_O|+CwvIIhqtG#>L!?Nhe1v%X)t@Hd5URAT z5B3ULhNm*&;EsS8aUMbEvR0=j%4}=hdqhXnY}kYBYMGBUcCGX^5Q%_{&FlKz2gK|h zI0h+AK!QdGBQOAj_OU*c(vbxJf^ob<^( ziY0CLvXTyG15@vm!l0}DR!9^QN*z0y?89Sg-|34)PSeHb>3POx%S@-M-s@<%iajND zKV#uLI6;%Z$|ieU&5p$ML4o#-Eaoi^H=s@T7e-Vfd{|&26@VZh7?6-bAO--zlsU<* z`R{*~we#ZUse%!|;Md0xX_nWEFw43YP;&!<{yYu=cos7ZDQ~vYF9Mf_f%o{f+>r7C zM7O0mOv*S;PCXhLMX}bfEn5jT1OBbn-s<+gFtPl2|7pK;HEgweT%A{C*larKx`cL| zp^01XwA&RpeH}kHasPc8kHR6GeRJhwjJH7M)_}05YYX}tT#T%jse_guLwjQJ&2%*V z<})oL&%zSZLwB4Z*&jnouG8I%3Ojc_U1kWM6$JGRa@(j%eCGvh>*O=xHu2qUB%IS% zAbKxr1FqRUx1llU;!gIMti+elQYYFjzIA?}IiqJR=W*B9s_bA~d7 zk`{p7Gx}`Gm13Dntyq4~rc-`TeGpX?3{!~vmfObuqjILd^Tbm8+qzllGc?F)`aa^l zV*xJqlep8QPG_ClR}}Wjcp+QpjL`crn$i@FphgZ}?jf^u>O4t80_t;qg0>Z>+Pl~2 zG*U}L3zip$(vC@6-{A_G>=@@(kqh&_Ll7GjOfp_pF$~eUHK%|T=8vu+F*7vPKlRi7Wq{ogK}d zbGQ9xs55!o{o6-Bt}f-4i>g1l=qB!QX##8Fc%3Jcc@+k7_eTwhR*7@W4t&z;`` z`$;BGj1?~SoiDz<--MSI7Sg7}!Frj#y?J36-nWq(_j4Rv8kL)1{&rgw2&FyfU_AQC z;|MWhUm0~@w}qI9->}$-GzuAH@STB6Y3Qq&45&>V?cwBR^J^(Y>Ct_QO*toIQNT6< z6wQ1@mG(TJX5*d~S9Q*f{pv~WpeQ2uy>z>U2wvL)!63nlMQg|?CFf_uzaj&}!ZeGs zI(6!oaS0=Q(pgOARbh~2fS`@-`M^sn^J*UF6+3KEeMd3k>>Drd0uj-UWLTcOer&F3h0&;Jtvwa}PWw^PCjFFRi zyr`HGrNiUNMcX7(Y|ypF)Bw6G#dxA}d3XY?(3Iam8O&HzIHko3s6}NQ{9NM1%CQ z@V;nF(w1PY+3C|25xDIpOZ1_@<#(9lQciQ0LD1Jarc>`0@b+`3jq^>n6CYz02kPpV zjodt*xxd-V)!2Yj4{}i}eX~^Iix|wP4IUd>BdH_-JDDwwx(%LnkDuy$HTrq`liAfn zf~ADckvdoD>HX7JV@!RJM-4r+<@?*B>o;9dRgpmv#z-4zNXkIIP-lteBssduqs0p= zs+4GxiWd)URQSvMK~DeHjego0Q@?FAx!~k2bc%V8UH;=Px^c@1>k>xZc>b;XB3QAt zbi60}=HM%#(QHKJ1wh5k`;_}y$)IsE6q4hy^=$Ta`Y`16Xzo+u@tch+Yb*H_j$d4K z)3S#1fM13$-IL9m>+N?Z|F`%3*x|yM*n#Omz+E>m|2Ny)%a~e1%-%5H=U)_?Z;+NA zKP@?O{0%OCS-u*pw$>Fd*o^OrDmMmiCU3SkoC|MwbpCZTtAN>!lj&E=PxiM-KWq45 z{>U7|KlNwYt@2in{h-kJDVcXZgjl2N$LGq*D?;F1I8IDYE4X@jNI7Sc?AMj}> zw?VEJ)$Cwl41bpoXRy5Z_p!K z{ZEM}C#hPxC)YP5ZE%!~InA3(@;T(TFI$ea?AB$E;C77wyj)d&Pjge<_RU-eoE7da zWmS|6pVSinLsKQJCC*9J)zwC{@c|`+oo{rUIM4SSXNs52-KVs~6d5iC3=~sz}wMDz{-SfYW@bzUL=eZNXb09Z<9Y?Ux!M&q<>*UU#7LjG*s@%0?pB|P&34!sa*%W6=E@q znurfHEGkNF9jLh1pIvM(EF;<^(DkN!^GnMEFq78}jMqNAKLeN(a1&jxd8u8g>Tz*> z0I$5mx(#$_hRVp%2CL@b!&!Hb>A6d39P+>Y&oc_?()V?GS+H8l-y1=kJMmZR>MC`sYA0u?7K|>>!1La zfgoIRij;TOAx|WT=315)N*dbi_VKm`ggX3pXdpUnPz!+s$rWVw1iLAaxd*^m0 zYlG(e^%ivn0EI8|?wL?@8qNHIleIX$a-{WSE(scz;g!?$1g{sxu;*qtDC&tieiJW#+D;@$FnMIbauL(oj$U-S0uTwOzhKc$UTwEoNc${)a7!y;_Hn6gIE5uNonFDOoBa0y-?f#Ihqcy6 zup7UEsAVhq$e$(IM)0x1vQto^&wSB%TYfKXUv~*>l@El zE&)C&=XM08#--YGXy?ASL0m&qg7=q&$7?E#=YKK~Zt-PejmI2-9B3w1&u4(eYRRM5 zHD&FRLo!sun%mRRS-<@fl6V`JW#%36T*L!1PT0z=mBSKG&zpyXD(h2=NE6qy@lwU` zAHgK(#VmTeiy5nQDE$(bkI#aTq+9+7dJUz0^^Fe92^9VcYKn7Kb9!zxzjAc1KR!a% z)@`@Vd%Hq=B$`$Dsa8g`#w@wo}3N!YwuBbn=L(qTC0;n3zZ`^s0-P&K%+%H zNbvkPTHm~a_fh?}1am&lQ&`io;OvyJ#@=!l9J!lJK+My;SD@A+`MUDtv{kqwq;psk zM9GM2=T~bUdStz)t5%-tvnpeJN`I3qyD&HgeJfIZOc6c{nSFZ?O-A6?r1(=S&R3&~ zgV9F}qX0)NZ~lln*C3zVt92&TQv}F?kC$R@z$YZjSRd$r_LaUt8xb|2T2XA(Qi8Y0 zirRv|uO;9lGBB5Ib?(KXR}TepB52XARu$z47NyMHypqfnkX$af+LSe&n^pd>xh`$m zFWod3?4_TMS%6?V>6I8R_Z;HI$omfHLXea*xIYX6(X-%efke7tb-mp21bg^VZa(Ck zWn(N`K3l8H!qBtUFiy*+d%v-U7t~e;EH7l~>}O^4nQ~{O9bxT$o#xU0GRUVt7$Q)_ z`rt#+vYm>(F>f3!M%lr84^ej5`p~e+>2{4&y%|dyZ~q>uMZUh3HU2J#Y{;tF#tE#Q z@v1C?Q#IZXegE2&rU%D7qZ2iT?KW+WXlZGTQ@9MJYFyF&=-_DC_gR2?i%2x|>3M>{>ncgB6+| zea3G0GSb$ifv{9MhMt6k#WJW1rzWD&1?PMM?CmmNGPOsVS0wF~p%p0L@%og#F?~Zu zQo)7^dxR`cuMW3H^`)^hQ+;DXTtf83%746FnTf*kk(%;Sx86yBmKBY1F6egUW@DBR zbez-#+Nj%DhyKuZU`49W%qwSjv21|5TFtzJBB zr`Mr&H0m}lt-N`oP8Fy{yR^}OJxFEeOtW4(z-62x?%2g*dUSdTf}w?zNIRwDrpOO? zjW%^OvGI85ro{kS8QO$t|5-VBIcyc9ck$(1W5n)=W(TjQ^T)*{xN2*ku6HflxE_G# zo?dJE`FE5%@drwnqNbL2>K3;*pkf8KnAsh`#XB!_XJbj(u^lJ1^W%?o5K0eiMlUAn-+eHu`Xw^6vrSNOsZa&%6+>U!;ZppQMUs&wvcG$wMNc!UWP5g zK@i$h#ElMyyARxfK3#MKvg@OFe*hOVdu&3wA$iQ( zf~~GZwXdSb(k!Xx(yTITHl`$ls^ls*>VfU~1#!)O>%|f}Sh}`Lq`Zwl>$bV%o0HKY zSxd8Ev%W<9ea3w4A-Xp*gcKg61u5;fInv@S0sA4>(>o2Xhg$f~_0IA$l}K2?{@zE{ z5W_hsj0c|L+zaQHAHImZ&V&9Q3O_BR`69uqKS3@*_LWdkkOsr%>l0!0jRx&V)Rt@0 z9?w!mG5b}u&&t475WiPKX68Y6O`{(f&23<4A-VoLspz*AYiDy~AYLY^o}Q+r>9leRE=7SV;XNK z3(>~YCrYWdT~sQmhDl51FshSIN!F{XH>dKzr*yUQ+no@8%XTX3^FQMGf7WQ?s-sL# zyu64r;7vD}X0Ekc&2;88TI)}7od3*e)V90+_$GJCURm33n_0uKTo9c%QcP7vOe)VF z-sY&L-D&(C8}ZNyt(i(*kem6GNUpn!4Cgjk1-G)Ca4zAs*f2Vv<9wY18tJC~Lh!!2 zB-rNY&`?Ur#Dn1saD^~h>`SJ1T8EDeutfV00ON9G7zblq_FjaEoD&SLhcEa2y8uxZ+iTv1@uNygEHr7Y)!s|C*m4YS38 zX&I9&_6+X?M`@<_ah>~?Gy-rDqIhj91 znixP%iA8gGfvhYGHpbID9Dr;+hV0}o*?%VRaw6i+gj3PauP!Hf0qKg=*Ens{nvXmC zW8-PKkm*P*`7r5}j2GT)+wPB*_7(Gs8}^yV&~h+R6zRCw=`3x(&+Nu}6eH!WjuA?2 z)Wqnd7_~#+j}pe1Hb)+d7a(5N2MueOB}-|ta}bV`*E9m#x3w3m4DBHuE6iGvW~-30 zuuk3m;^<%#e@8OJyo$QzMV2ln4#%N;q$8BK9xIp;NeCgCk?K%_D2)H&(FAiuU#EfZ zm_RV?wd}Hl>^w>ubHdxs=Gzq2J@sH%d;7&OrDN1MaWIR_w~!azW@}CpivP+W7)*%l zrx+KqlaeGFF!j4NcmwB13a~}(Cc+y1?uo|t&-f%zX^{%Wq#&)1@D3;zlLJN5Q z4QNpRSD*pDNd~O~aGkTzGF4~b5*ni644gCh*N??mDS2Hn<77Hl-BWmiW_2l|tHPtU z$N)~^$I|=>(3#-WqP=D;9Uz8~AwUfrjM}*xRb9qWu8JU4CkiC?q9I1j!K{sTp9| zr!P>D3BRb_-!fLDFX;2@Ne0Sv9y?i&xS6tqwEg*MQWlfS%_25HzS5rYr3*#)|U zEb7Eq7_Uerlw)UUCsH;qK1GcN92YAEdH9GT^|?qOHoq+|0L1^8bx85OC#_5tyFVJ0 zgB-1>>mB#Y6!qH!yn}UWQ;z%?x0P?4M{rRZ2TGA2kVX+tdCyZ-Frz@|Ab~UT_0)-& zwfEO$pI(mY~k!A)9&C0+~?Jo*J;9>JC2voTxO( z88h!=N||&iyEQs%i;W3^5#{^!CsK&#$`17d!4do1Zht}m6mMlyAQQbE%g_!tO}PIa zXMmO9;S&p!gWYZ2PT}oQFpUCO9mhT1b{hDHd(d3?f4K+r*Ua8WiKb&b7t%Y-JOhvg zQgTn&anA7u@NrjVa`*KkJ}SUNfS$~4t0QYVp$i|$i_L5m&fk-~J}&sYeOq269A&MY zqUWH@y_>k+-cIC_=0F73XI6I=X{E9@5jl%=jKdEqlj71%H4N7e61(7wFZsQwRFR%C z+Qx>~o1-O?9(5=<-!Mg`Q9)8ly-dy%asX2EIjUB8neQwJZNVOcOPZjOA&4n>4{7=S zp$JZReUBGXdgHyYUT2b6yYUe>39C^4P`wo?bP-JfgVhEOaDp3xGSp?E2h67$Ru=kg%Y!Z`$9Q)hKoTT} z>0VNIyJxc(xuC+RlR|^^QCgJER$LL56Bztskz#{r{q`cNlErR|O64GXE<)9ycf3(L zB-`i|pkR#j?NtB+pB7I;`>Zao5ibP5{7!}jf6XKNV;5lB5xzjBsan2HD`fM&HgC5& ztaZb$oI!TI+MTFq9iYqa1sD0y0pMlrRwwzhM5r1ZUkg1>!};=$yjcA@49Zp@iuc>o z6!BvaG;>6dKpJf20k+Ex+oJfb-Nwh92Ll;$ni+yn489ltfpDTVMR~2RA?_)8t8*8# zMBhIcI8qn4{u(SYoG^^u{VakYT0Ikl-5`KXTc9o)kGX=1q&5Sb`WqNA$fS!YyM)K% zHi~ZH`dS+=I=4V%v@7a6C?f87@03o}m2TF{keUM3F1p3P+qPq`%;3dATOba>>mWQ7 zur!*Ka6YCnuC+uv$aiJ)1@&P4gz@N?q9hR#vq@`sA`>3KIMQm@s+HTVZuooR?8oDZ zEDN;25uS8%-Tq<_Br^lnYzCB}5E4BQi)&>ltFOYajJM z3M&y>(->T5*ni9w{)=WA&;eL`P7x5gRH_X|C#69i0%AqxOS>ibrU7UtWGfjd03?6M zId;45vCCiz`*{$Q^>jJTcNc;23$-`O%=3YrTG%!v*X6|a!P2{< zsqg@F4LM>T65LAzHQJZ3cYW7Tb$D0a1$^+$xLhGT_p&@`fsX4S4kUq*eV-GFlqvWX zgHs70L@@p_P%4>cCcF#U0|ZGUL!yZcs=P2`WN-%YmXYM?R~gn+A}Ma)sd&3RN!)#| z>ex6E?!DdVNb$q)V+-h$-It4#X<@Sq0%ZONO;iuwP)Zx(Z%xq1(kUJjBT5KmFcA^961mNuP!kvAdFu@JRn5H zy90~`OtwQ5RbY?)qDU4hM)>1-Z0HjSECAk#zA))kw4uv>$L z37SP`(t^dLy#op*qtwUvPhNr?wyy9$c?sUFfASJF&XHNX+TMP^$EDpUo zWEoYe9UFK}nlJ6sMSl+#6$|MN;7(%IPydAN6<9l6%o^~C>`(Hi{~o_ucI=v^v!U1Y z&-U2OX}LWbwRlSE3}W`-D@DV%;hX*0NMi=L*H_Nqc;rZ7Aa&)db_)+R&(Y7kehUsk zNQSO%g2D`}<1s|o71fkC-^_L9>OF2))Ay^xxmXpsU5;h?HSAh#fWYa|Ehlc4hD`JG zCo|;1y$?I^@~Y(u=j~8h>3Z3o4q^kJY=N^Txe<-eb)1r(F3s*P6VVYdMy)CIi_p^B z^NJNI&f|Qc5Cz(iXJg-)45fo7ebJ0D4kYUp7$+N=z{L#6cQv9ur?5?A-CdoWADtEu zSHh@f5vW=I=B{8@ZRd{leKe;Ok3H5pTbIWf>=KqAMyZr3bH;a5z)@5wJCz}v4p4coLKE4PrF-R5ziHRzIhv{Zr44Sfl8)?UoM|OqK4_7x1N`h@22dRDH_z< zpp$vA$kB=*)n_V0EcI^e<&(4hH46)Zzty`xg(MUHiIE{>jC9Qx>gPRz78DXS23Vki zCWs;v1TZfG5MNHmDDolyQ)UTqUl4nPYNG3JsiI< z1}0h3w5R~`Kz zfp3uleB}UAcEF+7Z+L{Q%yJ__^1$ItgfT`$JhNs$`8gVarm%RF{^gjuV(_`D`p-@P zNf>9BBXT3oJ5HaC(K%4kl?Nq1#d`6gCpRPeGYJ31b!>oQI*b8vL@teK29|;(J-xvf z0|{*0MW@>Ar)eoX78aV{3(c!mK5F_8prQ#px$DzFd6ER2fpwiYk^xOguWb;P_gX}g zNqpT)e0fWKfg?U|P|n^`B5|h3S>#lt35Ra`agk#@8b_w8|NX+OT)(0LUm15JZAEa2 ztCWi2P6%9O#&QDrH)T~|c@Q{Ow|qtpTDR0=yqJPN6DFikB#2pIY|MDC3J-(7JmM`! zq)tpbVo;#+h^8ffVRi_;3m6wsI!IGSuHN~SoHxdZqDNhYTcy!)M_xV?ROtwWO0W>q z3`=$lG;->#Fe2vA7DJ>X$U@9Wfyjk?2#%&$bdIXQi<%R*@|rj~CP$Tt@M2xoYZ6rE zGIqZ1eeao7r6}wqoOhXFY+Sdkl;UBM4}47gDgXeuWCMad?f4e}Kn6&-l(-0R?>&M7 z&dhHzfYop@?ZEC^5Q28>o_vpjLg=xMT@r$IicBM4W3tBiVHG4pgrkr+>>r>9m_2Pd zc3w;rdC&gL{x8MN9xaZASagNz9?*qTS$W^|_x@tt)_YQT-ExEyy<6l{Ct8Un^CN`9uNlxTJ7oz9iB^pXX^;TK@^Fpof(WBv1l4$ z9lRMGh2B_0H*=TdkZ^h4iadxU#L!)brzn*ng___bhqP9F>oZT*Y|zX z2~RHPCe>2C(dDSZ64mA3@@iF9%!|t!P27z#y|Pe?E{mq<()mzHz>fh%ea9ND&TMpq zxaBRquCE6zc1^V!E4?ac4Jdp_rhncqk5-WvO2QGXxb;nt~rUc~A#_GN#zfcA& zN_-@7N)>=`Kyhe@pgBtbMb?tI-YwX;N0KB_$#SBc1&&8cF+1Tv1+n+sESxP<-csje z>l;T9L+OPn9=C0BU>!{SCdsag{ zT*elHo4AvNT7p~cxsEsM&&Y7BfbLM@EG?rx{yuGHEHs@x!$FQQ-6HhhP z?mr2ORjmJ0gvB(lk{#4Kt(ue}OhMi{J;J+XxY+1Il(W?$@e-rU-SF`fyR|lT!a573 zRC>CWG;0Hhu@}(K=!C&QGC|r~bu~iPzV1l-?1hk9c5`~$;&D&fE8_?(K`#RX>d-M| zdn$AWb)AAief=?(>Bp7k2%ydwg8w@$GHxSa`{NJqko@P0oK0RbmE%cm9+po!EPKaA zK0m44-%%Az3<#A`s(IRqFG!n$P6Sk zbth6Ac2$}Yn&tU}$CE4$qAXZN;}$#&10P}05k`ZV6UyGkB9uiy&u+?Gv&^7RL!cv)u-?`FU8iZ7rIxlR($a= z!I;=%gKpfMAfIM5B>#=LcMK9G+R`@5wokcE*)~tvwr$(CU8ii@wr$(CJ#{;}XFBdg z&wTOq{h}j(?8uD0|72$5dULO}-bc#12s|u%ocu_CHWZQorjp#m`MvXy7N@|7nz>d* z_K#dc+EBu6D%gO7uWSV{F8G-RDQAWnTgACzn=)nvrML{?xeW*L z6_F8#(kufXe<@@(mEx+I8F6H=?k}&;@l`cXM&9yyQ|=pA0hoU}RgEZTlerwa(Q2~I zX-)W4yIFNNCao68qR3+xs@sly07Uvl{wf7-`v*2~uJ-1DEa&-z-Jm521!t67iKNeg zB`LKg7L0p<0$$f}W-r{NS+^Nk(k6GMV(*6lyNe&SM%!!G$wg{knScN$!(}b`9`&KX z_yDWge*M5toxttv=g?r9YBPD#6l;Rv@ci58Ap>ecn4LQPPpQT4p|yE)*ILO!#~aD> z!sT&AYDro*p~)*{pa%1)w1Ekyqv~;xv&nMdoZpn?X&QE&+hDMVVPDS;&YKXX zSw7|+aKXxQ1w(&J|8A~taSRdt`Z($+d`vrxC_Em9@&ScLHFzP-vYdN3Fj444M^O`6>KexfF zUskcepPS2&*KymQ3TUjJmV!G?(gw|lx@$aVj*<$$=w)VES(*+N2PpA z?H!#7{bQ9`*LUWg)=aAlyc~s#t?p9LhT5K2ex@m3orc+lDFreCpfBX@Pp|&Eo#OOFv zuY6Iq3tB;2q5h}W@5;xV0yp~UfGawA(={CgOJR3h2dUCiq~Wa5!hlqWwy@UX*2LoxPq$UTjq5kU*jWt8&xuk_1`> z?q0fX;$6wYf|MD~;BpLVqpYIyWOo@8ajGIlQF?_fFb1V++~Tvvg4gZHe$TEf%)k@s zvCAw|S9|3@@_(Dzmf?RbUKXd&9KuzH1QG^)Jm)$Mv}$5Bx^LXk;FT0q9ES@V}w%aW8SH1F+ zNU<%BE6LS4Z3H%KTWa(cU+4dyMPgd@*X~B!nd!@edGm4n+$A2y^{fq$I+rveTx^zX zoA)YYRJ<7C&9bOd3*`?<9ik2N*A1O!V(xU)NET99KuL3`Y;%~n7m4a*h#j0Nbwk`< z!&6}fi-Q!;|dW#Sx)~jX9r<}o&QkcK( z#x(|Y%OGUa8mA_Q-9=6&6o9-8UJrTFCe6fc{qRt+-LqFu&%(qwRrZDM2KdfJ+7h3s zAnaN09{HF>_8-6|)tyI?-%PKjcdIYtj$OQ8xGz6%9pa6%?*wk-_rDiZAsZt@#yF1-< zte~6HuuU}KP{}At>|7}8qTX#(*mtBs4 zAvT9#kQWT|VLpR?sp>wOHevUlB?BrNNz`Mmj#c1oW4d_ZBm$cM zGXZD{1H)rQcAG`2yiTqoJ(@(49qq#(p=Y3gDe=-GycN;UsK6`ER>X*Lk;sE5^Pi263C4Y7&R zXgWfXnyI2CE_KBY?6E??1X(4{uW5M=?x1Xi)!C-*01X|D38}UhdoVO1C7g+x1vtv_ zpJFwcbA57Y?pl27ByZpFN@>9N`r2Dwa%CSTrC~qR zeKigl#ZJ2ppWQxXvCbv~Mez9JB)WjLVKk)K7T({?Y%4Do2iMn4^Cqh+jjW8Xh*#pc zbn`nR%2sHS)VP=ZsBNowNCHIKk(ZyknUti-Mh_84H$*Sr7?|M9e1xSI%Ert;{qk5A zXd-`%eY-vTd-m%=I_C)Z?OYv+^1aD@K2`p1| z>$eOmZ}4jTx!_8?XNC?{f~Y~`Yk8+Cd|Q%clR*mWYRuxvO!|VD`=-&GaqnSF^c(`2 z>dn>|7PaD4&=@VQ0K|q?iD4Wkk$#U;iogNI?+lsSSF|0i`-IdFJ_PWjh+}R|pHNpY zbn+$$&ZlgyUUs+oJyzVhv(I_(h>xYQ6B{Ik8pV^2S>*c=#k@*d>giIox#?^fgUZtz ziPeaBl<|!89uyzIunPZ+U^P9e;1hS0`!AaFY5-Co6-n zF~=#H7V&QHSSdz4AFCnX|7NL_A_li!Bmw{+00IOcD*+6G0s!%I{IjEw*}v3M>Aztv z^gm&*^w0iMivI^J`u;0ZrT=Wwcd2D%vmqS+b*1x1vP;yTdG8$t^uShFo23^Q+vdWP zO%QC6C>?2;F+(k$P-FDh&CsgHAG8!5+umJU9rzm(yS;(vdvxLNld|?vy#&iHQO3J5 zIPmt`U?nZBO)Vv@%}MX0dy9A`Te--~9;^$AfY*UP?O*x~b}@1YS8sn#F8Aodq>t+<$K5O8E`F$zw3FN@3LM0 zZ5vP**F=lWN!sm9yizqFwqcu+g*6Dt(x$!7Ws2&r3#XLU8Mi7jF+8RBtuRflNigc$jgdj9&Cr$_6D z-x;X*JXj~_q;l|_9(JpTuADPRi^oj97*qNM4(aFySf8!8JDC{x?iAc7LqtMmrq>$) zM-k0W2^J)Eo2s_S08-jp)U{pP9zg{6CLDzu6N9fGw7YKG*%P+ds+yYp|3#i z$*8Ci59#p=#ouuJ2l7U)LZJg3>%i|M!f(fi)fGvyG%m%(&?6vvuz9{e25FjzR)SLuYk9$JM zhN~CMx^*v0nT{?j&P3al%G-D&u3i&Xy^OUH5cfMFh9kuIsf=~Eyz*CenYB?n-#>g0(2TqAOcUnZIMniE{C3+P4U=6c&Um z2F}rj^5er&A$`67#kAQ{XW%PUiwp10r{b-n8}2(w!QbaBd6wgFbC&itkh4esMv2X*X5XCk!v*KZOT*1Hh24)Ejk!mc*~W7+}p zE4#J{LehjxuJJph>?1N#`$%CzxK;`Si-SgXemO_|sJa2P=S2V+z&px=P(HWXs|?Nf{%3a)-Nd9tiL^{>~Uws2Pd!AkVzYKAOt zXSxwkv4RPh7zk8nk3j6`%>X1v5M<?)L5|XBxg7{eDi zER_D0WgWg#g>V7_aw65p3tXQX5SOe%MulYJ0}i<}P^F2!FJoY@YTPVQuN*{KHVRBq z;}|>_c3T1aoovxG9?L=Qff`f$w1!KO@fnriBpmy=xLc7B3mK1Ox+$(`pu*Tk`f=fu z(6H!*!oc5vKx%2h!+mz~C?vK9yHtMxeSo&H6)&|16<8FYaQ()&LZKH@q2tfF71XJdJH4s!} zqSokYi#gNE)Ngn#qhObBsWUtmd z#O>|H_xF5ZRN}5gOvA;Ld!x+b2-B!_gIFVahKdvf-?fZCjlP7DgL-uS`|Mob*bU7SM2?@%iSZTuCH z1PpXjWE9+02S<)ng6f6dit`u~+-n3%B(Y2Ipb(c<8+hm>-#=hH10@v_Zs0{QQ-((? zxAb{&vxCv)QH~I?zk{@F!|-=XQo_BQWCY| zz<$S!)@@`+1`y>`*h)-y#x#^91+k`T3bxMK)YFuKFDQF!i5LT(Xmz2oyQ#j^aRAsa zfN08aMJ&Ap6GVn<(RE##c3d6GXJ6w{ICj(5jX{*Otd< zrJ%NZOQfb)>Z8h&Ee~#uD4}cyS_*-Ft55->F^ht3t2mA*IY!o$0nG+32;=_B0u73d zu2Q~mhefL9aqj$8TW+ROM-tkaV?uSP5&sTOpy&4!U1D)JQ}Dq=Z6v@0TzBJa z?Et8+-$VIN+&Bz)ZEUSZD#KdB?VWyCbx996#h~wUb3$-`}Z&c=nIm;+xX z0D**pyRxRiP--{RSzWX+keL*JgrZi|kvnOHm#lw3hUF-AGVJu~mCY|nW=K}Ds2CF! zT2h^7`n8l$X8t$4iX(Ve6?X||dYNgwFLolTHr#OW#{u19{+@`|tK<~Pe9b`e?D%~S zgety(hzRS|F~C~$LFcgJ>wR4UhvumJoc#*Jz|gJhDt&8Yc8Dgv*0{B*JQ`aKZ}es| zVK^(G7W$lKo)L9YVKL6qy+-^O7S9>Zv%Nitb&-umOycp0qY{t=6nTAAC5Ft$IZ|l? zHPM$)8>o+sMEf`XX5dk=&`5|a93-J2a9_R9*A~reYW%w)EU={@f0*CX24osY*5;Un z!V$*)43F@w_@BO3ida_izLEOTI0h?ZE5I8E*ibrGr@zexe^YvLp#y&5c6!mN5`A60 z=+;a|WaX0$nW-Sk6s65z^0{<*7$RcM+fNv_;Ws z+`kr5CrK$dNJHGB#$oZs|X(a?n z1#1?DWW-WUP_thHWR~9>Xmjn|D)p!*h#rDiD05-oC9N0u@ErT_4Jr`I!{9i~3=3+O zMQm^}n#?;Fm+MA29g-paNRah+2;w|HE?9CI=e%y;4DJaflrEnq&=Hd0VSBMK@C!)K z$FHWFZ$$_Hf)?Qk9pW825UYa^gZ3x9*?3pdSk9tTiRm8g#mf?5n#>?*PM;>VU5sO663^N8l+v_(kieV9?Ktc@1UO2kYZ)iSy{Oc?SWN< z9qkQMw{&19kF6CsFn-5FX0tUpFZ z(H<*d)}f(-OW&lEuWUwWy{(8e+SFLjvqOtEYBOyChlZg;TQXNw42->kE3@nyuT9*= zf2E+oQW6~||D#EFt$xC*8kw6|TH_4G?^1VD;{|e_cqTFEh}c%& z->u}?JQMKp$G{HE83?EfJ^T7X78}K*xW#tbl+%%0$g~l)SYl48Q-}gpx_KuZV-7I@ zjs#r@R8!$0hb_z8&hC_!=ly~S8QB1(bvR%QdcB6lnI!0Zq7bv?u}b|nX??3y@-W!* z%WmVHjvG}ke2qqzNV|I^_j{ct5i9dvW|M=ti3d(Lt73x;6Jdm+`5uq-#(wgc5b@pB zPBXFSu+y@D-1-@F(4ub`u_4^4rran?c$ZcV{V`?dv<^dz@$u#F+*KbHT+O@Lht{21 zDQ?y#D?lp_hwCuG*WLg_K(%^b6jJEos;8D#qa=XdcG-2)=YB`xV6hVi$8AciNdIQ$ ztI)V4buJNWFvLI7^J7@%2V@X=h7=-n*>bgw4s+rFIw^cmm1!w+2(uP*Ybda}R2_!R zmnzF->l_GhZp#aWu;e1(4wb1jNq3UcPp!cA)#ZtYOG1Tf zahB?74+d_(49v83$%537sB%dy9X!0U2fJjPZ)9pZj}B0#^2pObvgHs`osP++SJF9+ z?4m3g36k;R3qKGWk#|f;wTZht6@?D*>$R=LWWb@{tt%bwI&&~KF@~BV;$Z|RQ zgdPU-T&vhtgQyU9XQ4vNut7ahV&M=UH-a;|>&=b!&6KH|Q^m{DujN-sdoB50-o<;g z#OQ)jS(}Ony(&D9)y(LzzCHsz=YOXXGxf44613i*WrY+W(o!j@naV3*>%uX6Zt0!DF}4(=eGe zR%hnrs_B<`M3#hQC4? z&FFHPQZBQs&IIKBhFk@im^s=4tH}@YlJDpr(ry+lJfyXR@vYP+$rDJoe!skYUwuW& zleaot2$+C(w&oK8;2EQb-TQm6*$NBgFL}EWz()_3%e!C3!7Ev?0PsYX34bN0j(j6` z2JlMO=+7g5Ny;ciB73rnpFyjvK(jq*p=*J5pB+(Y3N7x>Ibl(Q1sUd0w}8b~o)1ek zJjU!u(E=Fi4+V|eIU~Ll5WpUX`WMm$Gn3((I$xysxjlrC)kQ|)%RT0n7REbA?`=n3^Uid^! zR;q_AZoV2EpT?3WIMz^cSMbC*nNfPFnPA_PVI`kMbDUm5i8aNh(zuxIz_18vl6i1{ zqrTa^M=w3O<~w)y=tl=`;r_{$j(->R(*1rg(}a7~^82cR1g$c>e6}{chzgScu#Q25 ze3vo>{P$r8#+FW%naaRngJ5$~$UJ<6+Aux0iD)WY@Dy%;6 zh%S#Jvupsl0P1O~*OhV>H%iHjvj~AvI}=f#qW65M-I%mKaS>kToH9abso0o=3+4xJtpwq!MU^p41D)fDflhsF_@>=l~%-Ku;6ew)! zdZ=}4EP=FH;TG@sH0`lrO~=%@E%fq=`KNy2vWCU{tnc4Xf{fAH*XKNXD+@ah$#VaAtO(#3 z&fpPh|M*+qs#`B7`K;)TXIUj#V*rr73IP=oIs73cE#iBkzr73d(m?V*Sb+1rfgS#cs5)VC(e3e!666+t) zc$q`)G3Nmpl4iUsice;Yt07g{2;4LUEaPQolvzbdtavgDF-R%JmA$Hxyu{{6Dskc^ zY3IWAR{nz7L?S^fVm!ZXN3U0%H5heb)CCAWKK8b@8~_eoD_RsF2+>LeAbG}6K9OgH zn}ys&d3|tKiMvw4MPUh34fV&So98A_2UrEu3Gu;_;)8nai<3}kF*i<`%45E=j+&kA zr-x0PRR*OpDSf-Psx-1_8IEClt@Vs^IWoJM(d9DPdS zB|uMQ#w+Ir%u-72s0G+sVRL?a)Kb;V_sTbsEEJ;wsE*CU0BPv6FN4Jc2<81kXqp3;|Amo!U14$9oz_#{lKtnf ziJ3K2TS-&wj!mXDOLJ0Rv;1pV{T_xMAD~oyHlf$vl*Mk>Nx~$tIE!0CEkYhy;n>bD%>&dIW8@M z19(X4GMhL!_W|>B%DE{<2$#|>9DUHKyK;5C-2Ddr2WkR49Lm}Z9RL8P?f(lkq4O`z zi~PS(6aRl%f&YnY2+2PIi~a>5az}eT10!lYM>0y=6jUL|hRkCK5EvQIJnCHDrBt>g5QN0@7=5EYjNq;)1J!*Oxl$rj` zJNky;$3HqwnK!YOeV4iAGl2v_NuW6;{)`JO>dp{AV}f=1*S`d zK4*7GoWsZE8?`%DgypJslTF;&HNuL)ZiJxyNAgV!J;x1rulJ3(>=DCUA@%xKx-PW( z_G_jt=L#AIsR#Gl;0zoXJZMycGy0kpgI90}V3D(brS39sKC@mB=~OPffNN<1cU9;* zDvlZpw^sE=sv)5`VzP{oEyVos3l^=ogGa{#IrTRb{4fPgD5Ntzp#sWj(6`MEp+3=Y z&djkbr!1GB(^LHqD}yaAGY!b-Lk58J1q`_=A)=4; zT@ir@T0goGQRXs#qGF}7E7&9WX5&PeB1BjXGpJ?f?g=?O%rAe5h`B#*Ih6&Qo%%Kb zS`5Rgr^K~0ZqR5n$m2MH=^Sl_HF&>X&{nyjoXzB|_K9?d(biU?e~=Y~oLn+5XXHM) zuwt$b6XW_st~l8GAdfqEgYwjkr8RsJ-{bGA`E4zdc{;?t=`aho(g=l@*N}nEqiq0Y zFo?U~{RwJvanmrRJB`~yns#9PFK}#dNskKQ{=p+k_V4^4ym}Sm7@b6*NpmjzcX%b? zWN$c&zZn1!fIqms?7mikF!f$<>sw>$39^Jq7ATU$4dyk<4F=OR5fPbe+UL|$2RcN* z1i~u*mP>_r6qAgNE+cI4y=!hJ?|FUwss~702UyUOqWYn2-tdtuQ!u2q2{OOHI#tW5 zB?KQh71}9XgZuPp9W2Wp;)fO zGm2HqoKQ2iaAMjdm7UsMJV6HbTtovHKGDB%C`}HKm+8Rs&&iRgB!O8vwFtj0c3h?$wlm21s_5KPEZqyNF?Rihz z8#A1gd*yRV2`NzrDcUCy}BLJK~Iz9_XLHmAICx*i$Hwt@_2*HfIFyar9f@RvvFNU@l}A@MDmA6z2X zB(8sC3E~p+XwYg(Fq;x!sRUFmUbtl+Dp-+24{tBjbUd%5WN0+$T(kiJP=6(9BnVMm zNMp3GpNKFd^0v(S4I0+g}!5E5XtT*_g;qA>O zXRfoNvuq?@E~9vNZ3hLcXb60)l)W`oF&%vC4WPYQUKBCpbnHH!C~PZpGQ=!&?g^xQ zek7(uv2590oU6(!hLM6i+^fR~9lY-iZ*8|o8CX7#u#>oA$krGJuaWLo-{ZF4)6OJm zX3aK0Ol0;s4E>kF@q`{Ru|y-9Yvt5# z?uIXPOCcQ8u%4a5I$wwqDw5kK^6sZ)MTc5S`{=LxXXOzKJF#F?^b6rahXl>rN6}!SJiiYGPJKe~6+rdu1#c z-is0uZ{=R}0Us;)rX-6q-p9Byr(u{;-@X8Q*||3{H9yFy>HN)3#g&fqc?v6**GXDQ-C+Gd zbXam+hOKTR+0@itY3cg}|A%1v5LrhDfdBx&NBhr$?Vr`kzZOFOzb#z;Cxjc>KMA*g zXjcY01{OL-dIlYO20AuoW?Ew>OG_OCQ#~_l9a~F%JskrZLn9prC;cCc&7uAe%%-J{fu806qIT>2ckT9%F-b*221^BH>s>{&7mTRK3{A@wxfP692@(O{ zJYPPF^eHOUnG1I^QcPB9l)lhR0&`)QLLBe3s9Zc+?}pFv9{uVg=quj)c%ydM8GFvU zr|X%k>ppY&vBLK9{b(G;rp&(9oWoeiJ#`}Q#=@zZ zC<;88+Tpjya!OVw%H3qNqd1ZgV(9aXB(>M{+g2kek^e)m;n<+om^Q`u2Q!RJK)5t#Jlk# z7#F^CK?*XYeTE{zU*uAbXwCU&BX-iJ&bA3dW0S$mwudLiGnd7f>=Ie0ec;@+-(TvD z3$5;z{JS27RDE(0KPG^12>A#*)n5$_n7?<^YTL9&s?GhvP1@Rn zm5ikX-AR2Cq#uk*k1hy!jdd5X16=V-D=$Ben!27Rpj<2JZ=YWWn#zMuU*HQx^3GoA z%Jy7U2O+(~ukj)7Qg-kai_5?Z;XaMZJb*;1_YH0akf;|)0$O5hOQsYD`W$B>ViZ*d zws%5TuJ)nJ1wRg{l)}kyybkIB*Ad%)7mC(=!VM6<1h>A(N;oePf7PKM6wBmt2gBSA z4cay|>|e0ekNka$xPr77ohYHRjxO?!FTmoAeoJQ>8pQa?h^vEu#pbmD0Rr;_GeGtL2W9r*jmR-FjQ z)Iq3SSufv48K~-Y2ld$mq&hCT5q^WfE?j~mgOaDhO(*9d;=Z5Zgn09r!#jK${Fbo< z3CuXfZ%D>z$4{l6UQ<#8?RY-%8wHR5-LdDLc*MM>Jr)M}d=1)#y+((~ut8Y9O1%}w zL{73M9r+9tT-3@=n5mnX5#?85TFI$BnGBN+3d~)f5#OzoBVsQx<{3D~xh$YU$1QyY zI&}V50!3!}v8kW+Uo`-as?>ltcEG?pQv%zV4%9i`sB9rS39Nu&00EZ;sh!lYgp^XD zUbQ(x*qXM{9l&MQa1mJYPmB#iU3gdjOR9rBu0IC$xtJvtOI zHQ5wvg!=dQlC%DduVFZU1IZ9f?#4n<(BZ?j-jM~GxEIGs3e*q0hmjIRN!Y@tlJ*1g zboGWd(Gc?N5ctqIj)h351f7C-ms0wjO9DU{T}Ni&-ZrC5+Dc)>8OQ9RLIT`V1PUE~|9deHTd=pgF zJyzG{IH|jQBf*?<#WM)`N!9Y!$PHXN{cs)fdFCbg5PzCjSr@jgSsHaKFQsJZfOk%s zMA>0tx!L~N`&K45VsosrY{Nj+)?#c~xxGnMff1zPvdpuFnWe*;tiqzal&rD@^&FX= z{u-rW$$gLdeb#FAs>DckDUR1Ykda3C4f+oW5Y-~BCIJQj5D535CBQ$&J@bF*p3Q$J z1pZH`0PKHK0ZRXU6<}j)WKC^sW@+>v3V`On+P5nG_t^iB@sdl+W<%8e`U^GiN=R9l z(9Cf32_J4}WsQ?id);Id(tpwa$kv@`2s>WHz9G#CP=%2V}!Two(ndH z79mm5}+n3Dz`SEY-CiKy{`sx{ZtLS?imJ_Q@KSeJhJpchfFI zETy;{15OPLzSdXYS6%9t?@j8jO-$~O!MMIa;Hzuxp3uI&?VMRWtR}pDL*`#?0KXPo zKVl7D7Vh{&clV>|zulkApPauQKVt5Eg6X%Xwt!ETnV{0T{EJlXQ|et-ZoHqYpO8P^ z3HP#ihfNChV8FOSid^nfhCV=NZNu5vK|`VGcY2yV$>M`B5bt0xxBG!y@6)fkny)|i z(1$K`0EeIH#wAn%cYFW`K1B<-von7^Y=1ltT};ooiVGsm@kDDgD=QoOh%afX+W8m_ z{{7^Pg+1{V|9Fn#Z_))tAgrwdMxHbOg6xvXeS|sUN#_ObL(;|kHn{-uN9q&fsty&R z4ZCn5WBPkV&4YqL_l=36i%~vw!D~uX6UM>Dp%(8IC@?b2YIC{S>NCC3et$akDdKT- zHC6fkY<M+9{(QZ~e7&*0?)K8mdR>Iz70?1s6_n}=?fW$W@RbMDr4f{cPPDI* zu}Ngtm8S6fRVmN*TC865d@I&h8&YhJ{|gq3AniJGm;@sQIh|zcgLHwAht+l;93+)j zL3u^&B_PiWyb?8%hJv&f%liW^_wYxmOy@YH2J`Xqc|}+O1l4h$=PYaiT|ED6RnqRB zw)Xgje?>YTfd>LXbqS=^8hwSVTA2Q+@=WK?w9mXSwFFWE#_9qD(V0C9Wat3L)V@Ew zA7T`k88v!9Gv-hAlllyt2i$?*pg8hrsn~ZNfy?+|o`qcjYudUV_$CMgevtlpPetIR z#+~h&rZV_Kl9W`|qj9`&`x7t)vl|1GTXf>yMf#%f+ju+ulU3}gm1uQgA3ycL0^)#D z{RGPqt($b%S-f23S59oXI3!>;gjrlHCkV7`8?b#MZ2A=#9Vz&R`G#- zXUV$4R*?NLV)kwOT=AXrYEjoikd6uoBB+O>>c~1wje!L8oh9RbeLOqV9GYynd`kyT zaNt4^5vu{oP)?9F_5FpFiXb_wd~Q-%W>sNz_rU7>dTabzO2!^1hzX-xxmU8(T-~Ty zzMNd7ZnCP>Ud4D+u3pzzR%Q)3Uk^BcI(jTusUpo^wF6K?nNUcJxG5;?_}&;Du_2+# z$VyM=PvJ*G_=+77t z@)G**4zZI1zkTsPAr0>P$RhXoedYGRBjXO`e2?t`TyKGQl;Ti?bI1U)x&Sy5!~o?- zfP52l0J2jg^b&u=Pw}3n-qX_N0>#tGm0%4Of7$NUIkH2!-1j3@!}s&lZiJe(85EpW zG3q}pIIq&MI9_jbwI_fVa#4=9jnP9*G5Ic-*tXnFkQUGxs54PF8Qg?)*)c+B4j-9| zNELEq)KsU7jC8kUF&iUY3t9kmRP4w?Gz1GIV1eLJK>*F3KfwZ!`1AO|SrfwZe?w$= zkj0^gk{rkbTK_^cdmv|Qra?j|*x3tVA~L)sdYCgaToYpj8KlJdGCk@T?s?Y2w}MB) z$8pGvD>IQ-VQ~{E%*XIP-lDz#%Hk5%+pMyIZ7kXdqC1ujl1+Y9>7|lq-qH52Ui&4f z&l?G)%4nLqVHBM^&hD;u7!zDckrJ+*mmXHsmnTOiBrg){j%|-y-h?vfjb9M8yOBNM zWdLFs3AjiC^7Dbe6W~l>|78^tOkIT6gzyy0`hHyeq)tf!|h#yZffIsyB}N*mkf zk2wNd)PjF3UcTCzSuZF`+S(D9EifF-3;aAw{{e_A?w$2)BE()ExmeX(?|(8Qvq+J? zl@&-}=-G$Cz~H*$sVgd|5sT&6;+Bm{RCM!?O6Vo8x-_H zp;@fMJ4&hT4;sqMfA~n#^Z+yJ^B`xrW+PUupFE4pHQJ@7yFereQ^_3vjr~P+#d$Y6 z>{>ac-c7C%mek*7*am;%43NC-JFvL^o_mKgfjvs0h|mNUf?eWb8E@&0Hlw1FYq;Tq&%@0V`tuHz_O zXa&r~RC(>q!5sf-9nn_Qx{_uO!`8n{V#RR8>#>eQb&;⁣@ljL?iW4gJ1FSi@$Bc zTdh}>)rI?AhEH9;Rt)jsBTxDMF&?d*(s`OPh+@caNOQ6NDhotUl~c1I_(OT6<~CJ< z+-*%NTLhvz8w?U^Tx`wAJmT0TXee?@LHsiAPLY5kTIr7VyvvLkZm|~-J}w5AOR=HX z2DT-O5cH(UM+m!`IF5Eoaz!>ug7kYX`r}JPZ_?imW=ISsF6=xP7(3qYivg#y-uLb$f0l!e+DWXCJ)y0=cvW-g1+GiOsiBI! z%M=?A`hgrtp0J%QB0#a9L)URFDcoP5lb56==kr1#3H4n_a|Cn`aKI@`Fv7v+XWlHP}ijNAx5v)suw*7#n1K0>`A^?D8(#bD} zltol3CV?&Y9D`r8X265C)D32hr9of9{ZshzX?MUwpJOW)r<`!E%N5hs`i|8Nc)2;7 zirn@iV;Lly@is%%wu{oPDuHC2+x!@|YM>HX6yc)aJ@Gte2AzE8-*W|7FkMEzwDBm}=A zdE{(Jr~<%r7zqIKb)ez;&C%FY@L2z2^i~KhC?m(}S|nOpNHsM%BzsdGwOn&V2cb^G zl!wY0+&p{zT5ySDB@ak;3M*n?Sxf|UZO#S0s7eE+Lie*^bEen3aWj7sePvU;Ba9fT zy9z%EGfzDcqN3O)*G^5=uB|?t-Q)#Nd-88e2jz>utFIQRW{j5G(+1(GdAWt@0i~&y z+u6#$`!~1fuewKQgsH%2j3i=Nr(1s9k0ioKeRp5jiYj~xT^K0_#k0Zg^<#bm^JFU2Er))ZIv7t~Tc4l7y_%+Oj$${Kx zVA0alhvfA@h))AsVlqUs5gz-xq$Rcq>Dx>=pLlI&iz@9J+!BVe^;Q*46i( zn}6Kw|27;HCgj>@*FO?Ds6P%d7yS_;AE#oRP! zjT9R8)cT?FS6rluL6)b9UkEi;x9 z|4QDXCt<%sW{%W6>^v>R(-WvAp914umi%p|cMW%uMzZ>-a=?-gF%kow;Wy+vj&q** zm=WS8m$~~LbbRz#KsAYHCJ1cxHmWL0`9gP>Ny1y4iX6mz)93Pu3`A}T^-h!)MawR- zjOcWv(PKC<#b>FokT3aK+*bamh)&^S#Yf}K#)xtS-@ZjV+QWnmd+vw(7H7DRzkRzu zy?*J7Bp@%D!^r@C(amDGG~&(kZm5%j7%csis!Ej*XW%+-0j_p^Z`IcYtKqh{QwE|> zem!mXF;g=uGqce$FS}9wAUd@jlW)`4qPg8{oxpCe{Sd)r{Gz-0X!QiB1HOORDhcCk9L{+%QReMwnnw#!s!8%%9lG3(m{7<=wkymZ~g1Z1$Y z$5b5#gJ-*7VBrs`ckZ~P-T&s5NoQ+#zoy=V06FRXx?&An-)ZEEv>PgEb6bmY+zYyn zly*7Y%k3@_wDv4IVUK(RD`nYwbc?S3J2r?(P>|@pfYlS*RRJnSyA$wfV!lLpw%!mq4L2 zZ2ehnA9-icYG5`(el|AnoW%rhV9S($&OOp2EO4%EN>-a}F~eJT=gu659iFmdF7aMc z#|vD3Sr|b{F8tBcefNq6bebEa7GZu$D*a%NtO|nqJsJYuAee@$fX)Fy&OyZB&G-qytU2Q4%GBtavz7XpBWSdg)plL$TIntelq!;wWic|($ps99(g znQS{~EBM6zl~rCfB>E)k{F4a1uUK^HwktavDRBiS&SRs<2b!lM)8Auz56z96PbZaj z-6OSq8zjzs2=H}j&JseE7m@Rc8rk1u@U5H?nHrBQ(2af9%Xv9^dU^iUc~o$-bGJL_=%MI_!~5_8APx!$ z0H}8w007#I58y8RU;mNze$E_aD23!NpSCD|d1I}sl9Z&B4`SO?>3G*0wfE@Ab2n z5rSpY=2L5rSx?t_kUj?upj+Z%#NP=8VGAbOI~uv$a`$OD~niv z^Spd7uA>G-E+I4Xpqwcc3zJb|!r3GUl-0dYTLEOR4g9hbq{{k1FhN337^ zw4sC$i&?cb?xkVJq|G;hu-k)`8q%+XP-)28)^J7Q$*D zjux)8G>O<7bFSKwU=kVWDl6FMymvOcEBC&aHQo!=LD|Rk!TV0tu?9P(C`ekoUT=*3 zW0YT#y=#@NWnEE7^~4m{i+ZKJm+U_WMsEF=eI_n=8u_UOa$0 z6#IP;PP`>q`$ZjIX7=SHBdl6dgZa`-J_7a4gag->XNTB)y*>on z4soqUJx?W zADEu(kXoG_R8_k*d$c*QAXcRA9Umq|Mhedn_#o`?f&9@iCFJr@e=)lzj7>=7=AdPK z-0uoAleOn!UzPDnH%7m`_HbL@2y8#%`i2DXsC<+<_LNjM$Agv~m7k_DL4mxQX~S#Y zxCA{pyb4jab3;{Hj8=z4^{RKz&g9{hW1COMh=cP)S8X(+Y_?B56bOogHGr-}G+Q)Y{S*>n#OvaDlr1}yyQyXp5DkYUEUX~Ojgsm__;Gdx6|SP zFA41OWq_*++OO4pX6IQmOE~;wa({sm*o9s2P;vsHGj!k)w?B`h2H%OC!iOE3ZQNan zhh3pI9~*jR9v>WB7x)x+IydyT?W%A!79r*cokAS+JXR1@LWOrJH9H+n zh&R&FpPTX#*@-VM6nt2OjM|z#t}K2~)d9vgi#yr8HgjWCKDV&vHhrB0uQT<*qu!RA zEX`D2sk|21{DpF#^RNw~MwnfGOMlA*d$Awo)>nc$ag-e?s#9uOv=dMb0_nF32--H6 zm9=j;sT=hLYVP~7EwZU3?UPnTVn9W?Zu3*+?!IN&$W-Ljs})z5WeCOOS;g^LY&wbY zt&sipeU~iJZsZAt0|1O6^eKutJhN6Pv*1YmZ)PeG+e&s?ssI4yEkk}l`1|*?m-oA9 zugt=kAF>T60HP^ejP(9HD(zAo+Ne$|q}9!-zt5uni_ni6WI+7}i$(3)ZD?w#q=;pD zz@LmSK^v7_dG>ESk(;XvcoWCr$27Z%{Oh^n5xq zV3a${NZ6#w{~!APFS5mCUj_iexIus&!|Xx37ES4|WiCHs^>-Q2l>sI{2=sRbWHx~XCxH32seg)?b`f4; zyem5oRaPX+2LSsS5U*teE!I|laTnhF!Rro_rP2`6Tk1guge^R*y){}h;Myw6N(L7Qk>)V;w_Y-4drh%LQ}+um`B~Wcol`TW zpBNk~X=DLh+N{$bm^EXV^%TcNQ~JYH|BT4r*&~(#S+*Z5iCi#9S{+Y+e1$Q|fo8z#6uW3re_R;-%*TJXe6wYM)|16bDi@BDwxXbKy)im@A7Rl1eh)u? pyc ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 59, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1", + "dst_ref": "RuntimeManager.start", + "resolution": "resolved", + "slice_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.start" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 52, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager._register_core_services", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 127, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6", + "dst_ref": "RuntimeManager._register_core_services", + "resolution": "resolved", + "slice_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager._register_core_services" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager\nRuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "qname": "RuntimeManager", + "kind": "class", + "signature": "RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "## Архитектурное объяснение подсистемы RuntimeManager\n\n### Основные компоненты и их роли\n\n1. **RuntimeManager**\n - Роль: Pipeline stage (этап конвейера)\n - Описание: Менеджер, координирующий роль-подобные вызовы, чтение и запись состояния атрибутов, участие в данных срезах потока выполнения.\n \n2. **ControlActionSet**\n - Роль: Модель\n - Описание: Представляет собой модель поведения системы управления действиями.\n\n### Связи и границы ответственности\n\n1. **Связь с HTTP приложением (app.post)**\n - Контроллер HTTP приложения инициирует выполнение контроллеров управления через метод `app.post`.\n\n2. **Связь с ControlPlaneService**\n - Инициализация сервиса (`ControlPlaneService.__init__`) запускает каналы передачи данных и асинхронную обработку (`_start_async`).\n\n3. **Связь с RuntimeManager**\n - Инициализация менеджера (`RuntimeManager.__init__`) устанавливает конфигурацию и запускает основной цикл работы (`start`).\n\n### Ключевые выводы по архитектуре\n\n1. **Централизованное управление**: RuntimeManager выступает координатором всего жизненного цикла обработки запросов, обеспечивая согласованность действий различных компонентов.\n2. **Модульность и независимость ролей**: Компоненты выполняют специализированные функции, что повышает гибкость и расширяемость архитектуры.\n3. **Асинхронная обработка**: Использование асинхронных механизмов позволяет эффективно обрабатывать данные и запросы в реальном времени.\n4. **HTTP-интерфейс**: Интеграция с FastAPI обеспечивает удобный доступ к системе через стандартные REST API интерфейсы.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "ARCHITECTURE", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS", + "C4_SEMANTIC_ROLES" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "ARCHITECTURE", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C4_SEMANTIC_ROLES": 12, + "C3_ENTRYPOINTS": 8, + "C2_DEPENDENCY_GRAPH": 8, + "C1_SYMBOL_CATALOG": 6, + "C0_SOURCE_CHUNKS": 4 + }, + "filters_by_layer": { + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C4_SEMANTIC_ROLES", + "query": "Какие компоненты участвуют в RuntimeManager?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 12, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "Какие компоненты участвуют в RuntimeManager?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Какие компоненты участвуют в RuntimeManager?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C1_SYMBOL_CATALOG", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Какие компоненты участвуют в RuntimeManager?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 4, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 12, + "candidates_after_filter": 12 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 4, + "candidates_after_filter": 4 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ] + }, + "layers": [ + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 12, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 8, + "fail_reason": null + }, + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 1, + "symbol_resolution": 0, + "retrieval_total": 222, + "retrieval_by_layer": { + "C4_SEMANTIC_ROLES": 54, + "C3_ENTRYPOINTS": 23, + "C2_DEPENDENCY_GRAPH": 92, + "C1_SYMBOL_CATALOG": 30, + "C0_SOURCE_CHUNKS": 21 + }, + "merge_rank": 29, + "prompt_build": 0, + "llm_call": 2494 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 480, + "evidence_rows": 25, + "evidence_chars": 8651 + }, + "evidence_summary": [ + { + "layer": "C4_SEMANTIC_ROLES", + "count": 12, + "unique_paths": 11 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 8, + "unique_paths": 2 + }, + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_architecture_ru_v1", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "RuntimeManager" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 25, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-fullchain-architecture-control-plane", + "mode": "full_chain", + "run_started_at": "2026-03-12T12:08:55", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Какие компоненты участвуют в RuntimeManager?", + "normalized_query": "Какие компоненты участвуют в RuntimeManager?" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Какие компоненты участвуют в RuntimeManager?" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Какие компоненты участвуют в RuntimeManager?" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "ARCHITECTURE", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 1 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Какие компоненты участвуют в RuntimeManager?" + }, + "output": { + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ], + "confidence": 0.99 + }, + "rag_count": 25, + "rag_rows": [ + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests manager\n- orchestrates role-like calls (4)\n- reads and writes state attributes\n- participates in dataflow slices (50)", + "layer": "C4_SEMANTIC_ROLES", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 43, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "symbol_name": "RuntimeManager", + "qname": "RuntimeManager", + "role": "pipeline_stage", + "confidence": 0.67, + "dataflow_participation": 50, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/queue/in_memory.py", + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)", + "layer": "C4_SEMANTIC_ROLES", + "title": "InMemoryTaskQueue", + "span_start": 9, + "span_end": 38, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 22, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "2da04cb94544a3bcbf0943a95ad4bdd8710bcafaa32a02fd0e4de2178dcf3533", + "symbol_name": "InMemoryTaskQueue", + "qname": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 9, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "58f0cc001ccda0eee4c6bc32ed83bd05eafd6b6644f1e8b4aa9eed3103db73dc", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "ConfigFileLoader\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (8)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ConfigFileLoader", + "span_start": 11, + "span_end": 48, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 23, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "a8474eca8b6e9dc86ae67ed68b16fa5fb639ef08739c053e7b7195489765667f", + "symbol_name": "ConfigFileLoader", + "qname": "ConfigFileLoader", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 8, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/store.py", + "content": "TraceContextStore\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "TraceContextStore", + "span_start": 15, + "span_end": 52, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b2dad4fbe16ffb11b58deba311c7739955c39d59f291b22181f33e9c8cce4059", + "symbol_name": "TraceContextStore", + "qname": "TraceContextStore", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "d369554f08fc92039c6edd5a2a1e73b23901533e8974459170bbd9347d263dc5", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workers/supervisor.py", + "content": "WorkerSupervisor\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkerSupervisor", + "span_start": 10, + "span_end": 59, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "c17b44e8d9e97d490989b21fa67d7c346cdda8a0472e4c41fb243c8846faa124", + "symbol_name": "WorkerSupervisor", + "qname": "WorkerSupervisor", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "77609d9d5927171cce7fc3a54897c183fd63068710c6362029b700937aae5eee", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 59, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1", + "dst_ref": "RuntimeManager.start", + "resolution": "resolved", + "slice_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.start" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 52, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager._register_core_services", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 127, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6", + "dst_ref": "RuntimeManager._register_core_services", + "resolution": "resolved", + "slice_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager._register_core_services" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager\nRuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "qname": "RuntimeManager", + "kind": "class", + "signature": "RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C4_SEMANTIC_ROLES": 12, + "C3_ENTRYPOINTS": 8, + "C2_DEPENDENCY_GRAPH": 8, + "C1_SYMBOL_CATALOG": 6, + "C0_SOURCE_CHUNKS": 4 + }, + "filters_by_layer": { + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C4_SEMANTIC_ROLES", + "query": "Какие компоненты участвуют в RuntimeManager?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 12, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "Какие компоненты участвуют в RuntimeManager?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Какие компоненты участвуют в RuntimeManager?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C1_SYMBOL_CATALOG", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Какие компоненты участвуют в RuntimeManager?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 4, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 12, + "candidates_after_filter": 12 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 4, + "candidates_after_filter": 4 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ] + }, + "layers": [ + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 12, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 8, + "fail_reason": null + }, + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 222, + "retrieval_by_layer": { + "C4_SEMANTIC_ROLES": 54, + "C3_ENTRYPOINTS": 23, + "C2_DEPENDENCY_GRAPH": 92, + "C1_SYMBOL_CATALOG": 30, + "C0_SOURCE_CHUNKS": 21 + }, + "merge_rank": 29 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Какие компоненты участвуют в RuntimeManager?", + "rag_count": 25 + }, + "output": { + "llm_answer": "## Архитектурное объяснение подсистемы RuntimeManager\n\n### Основные компоненты и их роли\n\n1. **RuntimeManager**\n - Роль: Pipeline stage (этап конвейера)\n - Описание: Менеджер, координирующий роль-подобные вызовы, чтение и запись состояния атрибутов, участие в данных срезах потока выполнения.\n \n2. **ControlActionSet**\n - Роль: Модель\n - Описание: Представляет собой модель поведения системы управления действиями.\n\n### Связи и границы ответственности\n\n1. **Связь с HTTP приложением (app.post)**\n - Контроллер HTTP приложения инициирует выполнение контроллеров управления через метод `app.post`.\n\n2. **Связь с ControlPlaneService**\n - Инициализация сервиса (`ControlPlaneService.__init__`) запускает каналы передачи данных и асинхронную обработку (`_start_async`).\n\n3. **Связь с RuntimeManager**\n - Инициализация менеджера (`RuntimeManager.__init__`) устанавливает конфигурацию и запускает основной цикл работы (`start`).\n\n### Ключевые выводы по архитектуре\n\n1. **Централизованное управление**: RuntimeManager выступает координатором всего жизненного цикла обработки запросов, обеспечивая согласованность действий различных компонентов.\n2. **Модульность и независимость ролей**: Компоненты выполняют специализированные функции, что повышает гибкость и расширяемость архитектуры.\n3. **Асинхронная обработка**: Использование асинхронных механизмов позволяет эффективно обрабатывать данные и запросы в реальном времени.\n4. **HTTP-интерфейс**: Интеграция с FastAPI обеспечивает удобный доступ к системе через стандартные REST API интерфейсы." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 480, + "evidence_rows": 25, + "evidence_chars": 8651 + }, + "evidence_summary": [ + { + "layer": "C4_SEMANTIC_ROLES", + "count": 12, + "unique_paths": 11 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 8, + "unique_paths": 2 + }, + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_architecture_ru_v1", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 2494 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_120855/full_chain_plba_code_subintents_plba-fullchain-architecture-control-plane.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_120855/full_chain_plba_code_subintents_plba-fullchain-architecture-control-plane.md new file mode 100644 index 0000000..8818aa9 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_120855/full_chain_plba_code_subintents_plba-fullchain-architecture-control-plane.md @@ -0,0 +1,34 @@ +# plba-fullchain-architecture-control-plane + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Какие компоненты участвуют в RuntimeManager? + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "ARCHITECTURE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 25, + "llm_answer": "## Архитектурное объяснение подсистемы RuntimeManager\n\n### Основные компоненты и их роли\n\n1. **RuntimeManager**\n - Роль: Pipeline stage (этап конвейера)\n - Описание: Менеджер, координирующий роль-подобные вызовы, чтение и запись состояния атрибутов, участие в данных срезах потока выполнения.\n \n2. **ControlActionSet**\n - Роль: Модель\n - Описание: Представляет собой модель поведения системы управления действиями.\n\n### Связи и границы ответственности\n\n1. **Связь с HTTP приложением (app.post)**\n - Контроллер HTTP приложения инициирует выполнение контроллеров управления через метод `app.post`.\n\n2. **Связь с ControlPlaneService**\n - Инициализация сервиса (`ControlPlaneService.__init__`) запускает каналы передачи данных и асинхронную обработку (`_start_async`).\n\n3. **Связь с RuntimeManager**\n - Инициализация менеджера (`RuntimeManager.__init__`) устанавливает конфигурацию и запускает основной цикл работы (`start`).\n\n### Ключевые выводы по архитектуре\n\n1. **Централизованное управление**: RuntimeManager выступает координатором всего жизненного цикла обработки запросов, обеспечивая согласованность действий различных компонентов.\n2. **Модульность и независимость ролей**: Компоненты выполняют специализированные функции, что повышает гибкость и расширяемость архитектуры.\n3. **Асинхронная обработка**: Использование асинхронных механизмов позволяет эффективно обрабатывать данные и запросы в реальном времени.\n4. **HTTP-интерфейс**: Интеграция с FastAPI обеспечивает удобный доступ к системе через стандартные REST API интерфейсы.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_120855/full_chain_plba_code_subintents_plba-fullchain-explain-local-runtime-manager.json b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_120855/full_chain_plba_code_subintents_plba-fullchain-explain-local-runtime-manager.json new file mode 100644 index 0000000..eb5dd4a --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_120855/full_chain_plba_code_subintents_plba-fullchain-explain-local-runtime-manager.json @@ -0,0 +1,1333 @@ +{ + "case_id": "plba-fullchain-explain-local-runtime-manager", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN_LOCAL", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 6, + "llm_answer": "Класс `RuntimeManager` в файле `src/app_runtime/core/runtime.py` предназначен для управления жизненным циклом приложения и координации различных компонентов системы.\n\n### Что делает класс `RuntimeManager`?\nЭтот класс инициализирует и запускает основные компоненты приложения, такие как конфигурация (`configuration`), сервисы (`services`), мониторинг состояния (`health`), логирование (`logs`), управление рабочими процессами (`workers`) и контрольную плоскость (`control_plane`).\n\n### Входные параметры конструктора класса:\n- `configuration`: Менеджер конфигурации (по умолчанию используется экземпляр `ConfigurationManager()`).\n- `services`: Контейнер сервисов (по умолчанию – `ServiceContainer()`).\n- `traces`: Сервис трассировки (по умолчанию – `TraceService()`).\n- `health`: Реестр здоровья (по умолчанию – `HealthRegistry()`).\n- `logs`: Менеджер логирования (по умолчанию – `LogManager()`).\n- `workers`: Надзор за рабочими процессами (по умолчанию – `WorkerSupervisor()`).\n- `control_plane`: Контрольная плоскость сервиса (по умолчанию – `ControlPlaneService()`)\n\n### Как связаны входы и выходы:\nКонструктор класса инициализирует указанные объекты и сохраняет их в соответствующих свойствах экземпляра. Он также вызывает внутренние методы регистрации, например `_register_core_services`, которые обеспечивают корректное подключение основных модулей к системе.\n\n### Связь с ближайшим контекстом:\nМетод `__init__` является точкой входа при создании нового объекта `RuntimeManager`. Далее управление передается методам, таким как `_register_core_services`, которые ответственны за начальную настройку системы перед её запуском.\n\nТаким образом, основная задача класса заключается в начальной настройке всех необходимых компонентов и подготовке их к дальнейшему использованию приложением.", + "answer_mode": "answered", + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C2_DEPENDENCY_GRAPH" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-fullchain-explain-local-runtime-manager", + "text": "Почему в файле src/app_runtime/core/runtime.py класс RuntimeManager устроен так?", + "mode": "full_chain", + "run_started_at": "2026-03-12T12:08:55", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Почему в файле src/app_runtime/core/runtime.py класс RuntimeManager устроен так?", + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ], + "confidence": 0.99 + }, + "rag_count": 6, + "rag_rows": [ + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager\nRuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "qname": "RuntimeManager", + "kind": "class", + "signature": "RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 59, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1", + "dst_ref": "RuntimeManager.start", + "resolution": "resolved", + "slice_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.start" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager._register_core_services", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 127, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6", + "dst_ref": "RuntimeManager._register_core_services", + "resolution": "resolved", + "slice_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager._register_core_services" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 52, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.services\n -> RuntimeManager.__init__", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 33, + "span_end": 39, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d43af85989222ee6d788ce418cdcb217c7ff044cfb915e3bdbd184417dc7bd61", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "dst_ref": "RuntimeManager.__init__", + "resolution": "resolved", + "slice_id": "d43af85989222ee6d788ce418cdcb217c7ff044cfb915e3bdbd184417dc7bd61", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.services", + "RuntimeManager.__init__" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "Класс `RuntimeManager` в файле `src/app_runtime/core/runtime.py` предназначен для управления жизненным циклом приложения и координации различных компонентов системы.\n\n### Что делает класс `RuntimeManager`?\nЭтот класс инициализирует и запускает основные компоненты приложения, такие как конфигурация (`configuration`), сервисы (`services`), мониторинг состояния (`health`), логирование (`logs`), управление рабочими процессами (`workers`) и контрольную плоскость (`control_plane`).\n\n### Входные параметры конструктора класса:\n- `configuration`: Менеджер конфигурации (по умолчанию используется экземпляр `ConfigurationManager()`).\n- `services`: Контейнер сервисов (по умолчанию – `ServiceContainer()`).\n- `traces`: Сервис трассировки (по умолчанию – `TraceService()`).\n- `health`: Реестр здоровья (по умолчанию – `HealthRegistry()`).\n- `logs`: Менеджер логирования (по умолчанию – `LogManager()`).\n- `workers`: Надзор за рабочими процессами (по умолчанию – `WorkerSupervisor()`).\n- `control_plane`: Контрольная плоскость сервиса (по умолчанию – `ControlPlaneService()`)\n\n### Как связаны входы и выходы:\nКонструктор класса инициализирует указанные объекты и сохраняет их в соответствующих свойствах экземпляра. Он также вызывает внутренние методы регистрации, например `_register_core_services`, которые обеспечивают корректное подключение основных модулей к системе.\n\n### Связь с ближайшим контекстом:\nМетод `__init__` является точкой входа при создании нового объекта `RuntimeManager`. Далее управление передается методам, таким как `_register_core_services`, которые ответственны за начальную настройку системы перед её запуском.\n\nТаким образом, основная задача класса заключается в начальной настройке всех необходимых компонентов и подготовке их к дальнейшему использованию приложением.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN_LOCAL", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN_LOCAL", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C2_DEPENDENCY_GRAPH" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "RuntimeManager" + ], + "keyword_hints": [ + "src/app_runtime/core/runtime.py", + "RuntimeManager" + ], + "path_hints": [ + "src/app_runtime/core/runtime.py" + ], + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C2_DEPENDENCY_GRAPH" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 12, + "C2_DEPENDENCY_GRAPH": 4 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "RuntimeManager", + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Почему в файле src/app_runtime/core/runtime.py класс RuntimeManager устроен так?", + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 12, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Почему в файле src/app_runtime/core/runtime.py класс RuntimeManager устроен так?", + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 4, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 4, + "candidates_after_filter": 4 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 4, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 1, + "symbol_resolution": 0, + "retrieval_total": 72, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 26, + "C0_SOURCE_CHUNKS": 18, + "C2_DEPENDENCY_GRAPH": 27 + }, + "merge_rank": 37, + "prompt_build": 0, + "llm_call": 2686 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 784, + "evidence_rows": 6, + "evidence_chars": 6650 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 4, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_explain_local_ru_v1", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "src/app_runtime/core/runtime.py", + "RuntimeManager" + ], + "path_scope": [ + "src/app_runtime/core/runtime.py" + ] + }, + "llm": { + "used_evidence_count": 6, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-fullchain-explain-local-runtime-manager", + "mode": "full_chain", + "run_started_at": "2026-03-12T12:08:55", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Почему в файле src/app_runtime/core/runtime.py класс RuntimeManager устроен так?", + "normalized_query": "Почему в файле src/app_runtime/core/runtime.py класс RuntimeManager устроен так?" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Почему в файле src/app_runtime/core/runtime.py класс RuntimeManager устроен так?" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Почему в файле src/app_runtime/core/runtime.py класс RuntimeManager устроен так?" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN_LOCAL", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C2_DEPENDENCY_GRAPH" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "RuntimeManager" + ], + "keyword_hints": [ + "src/app_runtime/core/runtime.py", + "RuntimeManager" + ], + "path_hints": [ + "src/app_runtime/core/runtime.py" + ], + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 1 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Почему в файле src/app_runtime/core/runtime.py класс RuntimeManager устроен так?" + }, + "output": { + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ], + "confidence": 0.99 + }, + "rag_count": 6, + "rag_rows": [ + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager\nRuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "qname": "RuntimeManager", + "kind": "class", + "signature": "RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 59, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1", + "dst_ref": "RuntimeManager.start", + "resolution": "resolved", + "slice_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.start" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager._register_core_services", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 127, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6", + "dst_ref": "RuntimeManager._register_core_services", + "resolution": "resolved", + "slice_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager._register_core_services" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 52, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.services\n -> RuntimeManager.__init__", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 33, + "span_end": 39, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d43af85989222ee6d788ce418cdcb217c7ff044cfb915e3bdbd184417dc7bd61", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "dst_ref": "RuntimeManager.__init__", + "resolution": "resolved", + "slice_id": "d43af85989222ee6d788ce418cdcb217c7ff044cfb915e3bdbd184417dc7bd61", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.services", + "RuntimeManager.__init__" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C2_DEPENDENCY_GRAPH" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 12, + "C2_DEPENDENCY_GRAPH": 4 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "RuntimeManager", + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Почему в файле src/app_runtime/core/runtime.py класс RuntimeManager устроен так?", + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 12, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Почему в файле src/app_runtime/core/runtime.py класс RuntimeManager устроен так?", + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 4, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 4, + "candidates_after_filter": 4 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 4, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 72, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 26, + "C0_SOURCE_CHUNKS": 18, + "C2_DEPENDENCY_GRAPH": 27 + }, + "merge_rank": 37 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Почему в файле src/app_runtime/core/runtime.py класс RuntimeManager устроен так?", + "rag_count": 6 + }, + "output": { + "llm_answer": "Класс `RuntimeManager` в файле `src/app_runtime/core/runtime.py` предназначен для управления жизненным циклом приложения и координации различных компонентов системы.\n\n### Что делает класс `RuntimeManager`?\nЭтот класс инициализирует и запускает основные компоненты приложения, такие как конфигурация (`configuration`), сервисы (`services`), мониторинг состояния (`health`), логирование (`logs`), управление рабочими процессами (`workers`) и контрольную плоскость (`control_plane`).\n\n### Входные параметры конструктора класса:\n- `configuration`: Менеджер конфигурации (по умолчанию используется экземпляр `ConfigurationManager()`).\n- `services`: Контейнер сервисов (по умолчанию – `ServiceContainer()`).\n- `traces`: Сервис трассировки (по умолчанию – `TraceService()`).\n- `health`: Реестр здоровья (по умолчанию – `HealthRegistry()`).\n- `logs`: Менеджер логирования (по умолчанию – `LogManager()`).\n- `workers`: Надзор за рабочими процессами (по умолчанию – `WorkerSupervisor()`).\n- `control_plane`: Контрольная плоскость сервиса (по умолчанию – `ControlPlaneService()`)\n\n### Как связаны входы и выходы:\nКонструктор класса инициализирует указанные объекты и сохраняет их в соответствующих свойствах экземпляра. Он также вызывает внутренние методы регистрации, например `_register_core_services`, которые обеспечивают корректное подключение основных модулей к системе.\n\n### Связь с ближайшим контекстом:\nМетод `__init__` является точкой входа при создании нового объекта `RuntimeManager`. Далее управление передается методам, таким как `_register_core_services`, которые ответственны за начальную настройку системы перед её запуском.\n\nТаким образом, основная задача класса заключается в начальной настройке всех необходимых компонентов и подготовке их к дальнейшему использованию приложением." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 784, + "evidence_rows": 6, + "evidence_chars": 6650 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 4, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_explain_local_ru_v1", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 2686 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_120855/full_chain_plba_code_subintents_plba-fullchain-explain-local-runtime-manager.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_120855/full_chain_plba_code_subintents_plba-fullchain-explain-local-runtime-manager.md new file mode 100644 index 0000000..7f87e28 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_120855/full_chain_plba_code_subintents_plba-fullchain-explain-local-runtime-manager.md @@ -0,0 +1,34 @@ +# plba-fullchain-explain-local-runtime-manager + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Почему в файле src/app_runtime/core/runtime.py класс RuntimeManager устроен так? + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "EXPLAIN_LOCAL", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 6, + "llm_answer": "Класс `RuntimeManager` в файле `src/app_runtime/core/runtime.py` предназначен для управления жизненным циклом приложения и координации различных компонентов системы.\n\n### Что делает класс `RuntimeManager`?\nЭтот класс инициализирует и запускает основные компоненты приложения, такие как конфигурация (`configuration`), сервисы (`services`), мониторинг состояния (`health`), логирование (`logs`), управление рабочими процессами (`workers`) и контрольную плоскость (`control_plane`).\n\n### Входные параметры конструктора класса:\n- `configuration`: Менеджер конфигурации (по умолчанию используется экземпляр `ConfigurationManager()`).\n- `services`: Контейнер сервисов (по умолчанию – `ServiceContainer()`).\n- `traces`: Сервис трассировки (по умолчанию – `TraceService()`).\n- `health`: Реестр здоровья (по умолчанию – `HealthRegistry()`).\n- `logs`: Менеджер логирования (по умолчанию – `LogManager()`).\n- `workers`: Надзор за рабочими процессами (по умолчанию – `WorkerSupervisor()`).\n- `control_plane`: Контрольная плоскость сервиса (по умолчанию – `ControlPlaneService()`)\n\n### Как связаны входы и выходы:\nКонструктор класса инициализирует указанные объекты и сохраняет их в соответствующих свойствах экземпляра. Он также вызывает внутренние методы регистрации, например `_register_core_services`, которые обеспечивают корректное подключение основных модулей к системе.\n\n### Связь с ближайшим контекстом:\nМетод `__init__` является точкой входа при создании нового объекта `RuntimeManager`. Далее управление передается методам, таким как `_register_core_services`, которые ответственны за начальную настройку системы перед её запуском.\n\nТаким образом, основная задача класса заключается в начальной настройке всех необходимых компонентов и подготовке их к дальнейшему использованию приложением.", + "answer_mode": "answered", + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C2_DEPENDENCY_GRAPH" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_120855/full_chain_plba_code_subintents_plba-fullchain-explain-runtime-manager.json b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_120855/full_chain_plba_code_subintents_plba-fullchain-explain-runtime-manager.json new file mode 100644 index 0000000..224f7d2 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_120855/full_chain_plba_code_subintents_plba-fullchain-explain-runtime-manager.json @@ -0,0 +1,2088 @@ +{ + "case_id": "plba-fullchain-explain-runtime-manager", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 12, + "llm_answer": "## Назначение класса `RuntimeManager`\nКласс `RuntimeManager` является ключевым компонентом системы управления жизненным циклом приложения. Он отвечает за координацию работы различных модулей и сервисов приложения, обеспечивая централизованное управление состоянием и конфигурацией всех компонентов. Этот компонент выступает в качестве управляющего слоя, обеспечивающего синхронизацию и интеграцию различных частей архитектуры.\n\n## Ключевые зависимости\nКлючевыми зависимостями являются следующие компоненты:\n\n- **ConfigurationManager**: Менеджер конфигурации для настройки параметров приложения.\n- **ServiceContainer**: Контейнер служб, содержащий различные сервисы и модули приложения.\n- **TraceService**: Сервис трассировки, предназначенный для отслеживания выполнения действий и операций внутри приложения.\n- **HealthRegistry**: Реестр состояния здоровья приложения, позволяющий отслеживать состояние различных его частей.\n- **LogManager**: Менеджер логирования, обеспечивающий сбор и хранение логов приложения.\n- **WorkerSupervisor**: Наблюдатель за рабочими процессами, управляющий их запуском и остановкой.\n- **ControlPlaneService**: Служба управления плоскостью контроля, отвечающая за координацию рабочих процессов и мониторинг состояния приложения.\n\nВсе эти компоненты передаются конструктору класса при создании экземпляра `RuntimeManager`.\n\n## Поток данных или вызовов\nПроцесс работы `RuntimeManager` включает несколько ключевых этапов:\n\n1. **Инициализация и регистрация модулей** (`__init__()`):\n - При инициализации создается экземпляр `RuntimeManager`, которому передаются необходимые службы и параметры. В методе `__init__()` происходит регистрация модулей с помощью метода `_register_core_services()`. Это позволяет системе начать работу с предварительно зарегистрированными модулями и сервисами.\n \n2. **Регистрация модулей** (`register_module(module)`):\n - Метод `register_module` предназначен для регистрации новых модулей и обеспечения их интеграции в систему через модульный реестр `registry`.\n\n3. **Управление рабочим процессом**:\n - Класс управляет рабочим процессом приложений, следя за состоянием жизненного цикла (например, IDLE, RUNNING). Для этого используется атрибут `_state`, значение которого обновляется в зависимости от текущего состояния приложения.\n\n4. **Мониторинг и контроль**:\n - Через службу `ControlPlaneService` обеспечивается мониторинг и контроль над различными частями приложения, что позволяет своевременно реагировать на изменения в состоянии системы и корректно завершать рабочие процессы.\n\n## Важные детали реализации\n- **Настройки тайм-аутов и интервалов опроса**:\n - Константы `ACTION_TIMEOUT_SECONDS` и `ACTION_POLL_INTERVAL_SECONDS` задают временные интервалы для ожиданий и периодических проверок состояний.\n \n- **Использование декораторов**:\n - Методы `@property` используются для создания геттеров и сеттеров для доступа к внутренним атрибутам объекта, таким как `configuration`, `services`, `traces`, `health`, `logs`, `workers`, `control_plane` и т.д.\n\n- **Централизованная обработка ошибок и исключений**:\n - Хотя конкретный механизм обработки исключений напрямую не указан в представленном фрагменте кода, предполагается наличие соответствующего механизма, позволяющего эффективно обрабатывать ошибки и восстанавливаться после сбоев.\n\n## Осторожные выводы\nНа основании представленного контекста сложно точно определить весь цикл работы `RuntimeManager`, однако можно предположить, что он играет ключевую роль в управлении жизненным циклом и координацией взаимодействий между различными модулями и сервисами приложения. Полная картина поведения и взаимодействия классов требует дополнительного анализа исходного кода вне предоставленных контекстных слоев.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-fullchain-explain-runtime-manager", + "text": "Объясни как работает класс RuntimeManager", + "mode": "full_chain", + "run_started_at": "2026-03-12T12:08:55", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни как работает класс RuntimeManager", + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ], + "confidence": 0.99 + }, + "rag_count": 12, + "rag_rows": [ + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager\nRuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "qname": "RuntimeManager", + "kind": "class", + "signature": "RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests manager\n- orchestrates role-like calls (4)\n- reads and writes state attributes\n- participates in dataflow slices (50)", + "layer": "C4_SEMANTIC_ROLES", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 43, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "symbol_name": "RuntimeManager", + "qname": "RuntimeManager", + "role": "pipeline_stage", + "confidence": 0.67, + "dataflow_participation": 50, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 52, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "## Назначение класса `RuntimeManager`\nКласс `RuntimeManager` является ключевым компонентом системы управления жизненным циклом приложения. Он отвечает за координацию работы различных модулей и сервисов приложения, обеспечивая централизованное управление состоянием и конфигурацией всех компонентов. Этот компонент выступает в качестве управляющего слоя, обеспечивающего синхронизацию и интеграцию различных частей архитектуры.\n\n## Ключевые зависимости\nКлючевыми зависимостями являются следующие компоненты:\n\n- **ConfigurationManager**: Менеджер конфигурации для настройки параметров приложения.\n- **ServiceContainer**: Контейнер служб, содержащий различные сервисы и модули приложения.\n- **TraceService**: Сервис трассировки, предназначенный для отслеживания выполнения действий и операций внутри приложения.\n- **HealthRegistry**: Реестр состояния здоровья приложения, позволяющий отслеживать состояние различных его частей.\n- **LogManager**: Менеджер логирования, обеспечивающий сбор и хранение логов приложения.\n- **WorkerSupervisor**: Наблюдатель за рабочими процессами, управляющий их запуском и остановкой.\n- **ControlPlaneService**: Служба управления плоскостью контроля, отвечающая за координацию рабочих процессов и мониторинг состояния приложения.\n\nВсе эти компоненты передаются конструктору класса при создании экземпляра `RuntimeManager`.\n\n## Поток данных или вызовов\nПроцесс работы `RuntimeManager` включает несколько ключевых этапов:\n\n1. **Инициализация и регистрация модулей** (`__init__()`):\n - При инициализации создается экземпляр `RuntimeManager`, которому передаются необходимые службы и параметры. В методе `__init__()` происходит регистрация модулей с помощью метода `_register_core_services()`. Это позволяет системе начать работу с предварительно зарегистрированными модулями и сервисами.\n \n2. **Регистрация модулей** (`register_module(module)`):\n - Метод `register_module` предназначен для регистрации новых модулей и обеспечения их интеграции в систему через модульный реестр `registry`.\n\n3. **Управление рабочим процессом**:\n - Класс управляет рабочим процессом приложений, следя за состоянием жизненного цикла (например, IDLE, RUNNING). Для этого используется атрибут `_state`, значение которого обновляется в зависимости от текущего состояния приложения.\n\n4. **Мониторинг и контроль**:\n - Через службу `ControlPlaneService` обеспечивается мониторинг и контроль над различными частями приложения, что позволяет своевременно реагировать на изменения в состоянии системы и корректно завершать рабочие процессы.\n\n## Важные детали реализации\n- **Настройки тайм-аутов и интервалов опроса**:\n - Константы `ACTION_TIMEOUT_SECONDS` и `ACTION_POLL_INTERVAL_SECONDS` задают временные интервалы для ожиданий и периодических проверок состояний.\n \n- **Использование декораторов**:\n - Методы `@property` используются для создания геттеров и сеттеров для доступа к внутренним атрибутам объекта, таким как `configuration`, `services`, `traces`, `health`, `logs`, `workers`, `control_plane` и т.д.\n\n- **Централизованная обработка ошибок и исключений**:\n - Хотя конкретный механизм обработки исключений напрямую не указан в представленном фрагменте кода, предполагается наличие соответствующего механизма, позволяющего эффективно обрабатывать ошибки и восстанавливаться после сбоев.\n\n## Осторожные выводы\nНа основании представленного контекста сложно точно определить весь цикл работы `RuntimeManager`, однако можно предположить, что он играет ключевую роль в управлении жизненным циклом и координацией взаимодействий между различными модулями и сервисами приложения. Полная картина поведения и взаимодействия классов требует дополнительного анализа исходного кода вне предоставленных контекстных слоев.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS", + "C4_SEMANTIC_ROLES" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 181, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 48, + "C0_SOURCE_CHUNKS": 21, + "C4_SEMANTIC_ROLES": 18, + "C2_DEPENDENCY_GRAPH": 60, + "C3_ENTRYPOINTS": 11 + }, + "merge_rank": 20, + "prompt_build": 0, + "llm_call": 5294 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 797, + "evidence_rows": 12, + "evidence_chars": 7130 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 2 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_explain_ru_v1", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "RuntimeManager" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 12, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-fullchain-explain-runtime-manager", + "mode": "full_chain", + "run_started_at": "2026-03-12T12:08:55", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Объясни как работает класс RuntimeManager", + "normalized_query": "Объясни как работает класс RuntimeManager" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Объясни как работает класс RuntimeManager" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни как работает класс RuntimeManager" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Объясни как работает класс RuntimeManager" + }, + "output": { + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ], + "confidence": 0.99 + }, + "rag_count": 12, + "rag_rows": [ + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager\nRuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "qname": "RuntimeManager", + "kind": "class", + "signature": "RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests manager\n- orchestrates role-like calls (4)\n- reads and writes state attributes\n- participates in dataflow slices (50)", + "layer": "C4_SEMANTIC_ROLES", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 43, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "symbol_name": "RuntimeManager", + "qname": "RuntimeManager", + "role": "pipeline_stage", + "confidence": 0.67, + "dataflow_participation": 50, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 52, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 181, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 48, + "C0_SOURCE_CHUNKS": 21, + "C4_SEMANTIC_ROLES": 18, + "C2_DEPENDENCY_GRAPH": 60, + "C3_ENTRYPOINTS": 11 + }, + "merge_rank": 20 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Объясни как работает класс RuntimeManager", + "rag_count": 12 + }, + "output": { + "llm_answer": "## Назначение класса `RuntimeManager`\nКласс `RuntimeManager` является ключевым компонентом системы управления жизненным циклом приложения. Он отвечает за координацию работы различных модулей и сервисов приложения, обеспечивая централизованное управление состоянием и конфигурацией всех компонентов. Этот компонент выступает в качестве управляющего слоя, обеспечивающего синхронизацию и интеграцию различных частей архитектуры.\n\n## Ключевые зависимости\nКлючевыми зависимостями являются следующие компоненты:\n\n- **ConfigurationManager**: Менеджер конфигурации для настройки параметров приложения.\n- **ServiceContainer**: Контейнер служб, содержащий различные сервисы и модули приложения.\n- **TraceService**: Сервис трассировки, предназначенный для отслеживания выполнения действий и операций внутри приложения.\n- **HealthRegistry**: Реестр состояния здоровья приложения, позволяющий отслеживать состояние различных его частей.\n- **LogManager**: Менеджер логирования, обеспечивающий сбор и хранение логов приложения.\n- **WorkerSupervisor**: Наблюдатель за рабочими процессами, управляющий их запуском и остановкой.\n- **ControlPlaneService**: Служба управления плоскостью контроля, отвечающая за координацию рабочих процессов и мониторинг состояния приложения.\n\nВсе эти компоненты передаются конструктору класса при создании экземпляра `RuntimeManager`.\n\n## Поток данных или вызовов\nПроцесс работы `RuntimeManager` включает несколько ключевых этапов:\n\n1. **Инициализация и регистрация модулей** (`__init__()`):\n - При инициализации создается экземпляр `RuntimeManager`, которому передаются необходимые службы и параметры. В методе `__init__()` происходит регистрация модулей с помощью метода `_register_core_services()`. Это позволяет системе начать работу с предварительно зарегистрированными модулями и сервисами.\n \n2. **Регистрация модулей** (`register_module(module)`):\n - Метод `register_module` предназначен для регистрации новых модулей и обеспечения их интеграции в систему через модульный реестр `registry`.\n\n3. **Управление рабочим процессом**:\n - Класс управляет рабочим процессом приложений, следя за состоянием жизненного цикла (например, IDLE, RUNNING). Для этого используется атрибут `_state`, значение которого обновляется в зависимости от текущего состояния приложения.\n\n4. **Мониторинг и контроль**:\n - Через службу `ControlPlaneService` обеспечивается мониторинг и контроль над различными частями приложения, что позволяет своевременно реагировать на изменения в состоянии системы и корректно завершать рабочие процессы.\n\n## Важные детали реализации\n- **Настройки тайм-аутов и интервалов опроса**:\n - Константы `ACTION_TIMEOUT_SECONDS` и `ACTION_POLL_INTERVAL_SECONDS` задают временные интервалы для ожиданий и периодических проверок состояний.\n \n- **Использование декораторов**:\n - Методы `@property` используются для создания геттеров и сеттеров для доступа к внутренним атрибутам объекта, таким как `configuration`, `services`, `traces`, `health`, `logs`, `workers`, `control_plane` и т.д.\n\n- **Централизованная обработка ошибок и исключений**:\n - Хотя конкретный механизм обработки исключений напрямую не указан в представленном фрагменте кода, предполагается наличие соответствующего механизма, позволяющего эффективно обрабатывать ошибки и восстанавливаться после сбоев.\n\n## Осторожные выводы\nНа основании представленного контекста сложно точно определить весь цикл работы `RuntimeManager`, однако можно предположить, что он играет ключевую роль в управлении жизненным циклом и координацией взаимодействий между различными модулями и сервисами приложения. Полная картина поведения и взаимодействия классов требует дополнительного анализа исходного кода вне предоставленных контекстных слоев." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 797, + "evidence_rows": 12, + "evidence_chars": 7130 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 2 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_explain_ru_v1", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 5294 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_120855/full_chain_plba_code_subintents_plba-fullchain-explain-runtime-manager.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_120855/full_chain_plba_code_subintents_plba-fullchain-explain-runtime-manager.md new file mode 100644 index 0000000..a5b16ac --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_120855/full_chain_plba_code_subintents_plba-fullchain-explain-runtime-manager.md @@ -0,0 +1,34 @@ +# plba-fullchain-explain-runtime-manager + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Объясни как работает класс RuntimeManager + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 12, + "llm_answer": "## Назначение класса `RuntimeManager`\nКласс `RuntimeManager` является ключевым компонентом системы управления жизненным циклом приложения. Он отвечает за координацию работы различных модулей и сервисов приложения, обеспечивая централизованное управление состоянием и конфигурацией всех компонентов. Этот компонент выступает в качестве управляющего слоя, обеспечивающего синхронизацию и интеграцию различных частей архитектуры.\n\n## Ключевые зависимости\nКлючевыми зависимостями являются следующие компоненты:\n\n- **ConfigurationManager**: Менеджер конфигурации для настройки параметров приложения.\n- **ServiceContainer**: Контейнер служб, содержащий различные сервисы и модули приложения.\n- **TraceService**: Сервис трассировки, предназначенный для отслеживания выполнения действий и операций внутри приложения.\n- **HealthRegistry**: Реестр состояния здоровья приложения, позволяющий отслеживать состояние различных его частей.\n- **LogManager**: Менеджер логирования, обеспечивающий сбор и хранение логов приложения.\n- **WorkerSupervisor**: Наблюдатель за рабочими процессами, управляющий их запуском и остановкой.\n- **ControlPlaneService**: Служба управления плоскостью контроля, отвечающая за координацию рабочих процессов и мониторинг состояния приложения.\n\nВсе эти компоненты передаются конструктору класса при создании экземпляра `RuntimeManager`.\n\n## Поток данных или вызовов\nПроцесс работы `RuntimeManager` включает несколько ключевых этапов:\n\n1. **Инициализация и регистрация модулей** (`__init__()`):\n - При инициализации создается экземпляр `RuntimeManager`, которому передаются необходимые службы и параметры. В методе `__init__()` происходит регистрация модулей с помощью метода `_register_core_services()`. Это позволяет системе начать работу с предварительно зарегистрированными модулями и сервисами.\n \n2. **Регистрация модулей** (`register_module(module)`):\n - Метод `register_module` предназначен для регистрации новых модулей и обеспечения их интеграции в систему через модульный реестр `registry`.\n\n3. **Управление рабочим процессом**:\n - Класс управляет рабочим процессом приложений, следя за состоянием жизненного цикла (например, IDLE, RUNNING). Для этого используется атрибут `_state`, значение которого обновляется в зависимости от текущего состояния приложения.\n\n4. **Мониторинг и контроль**:\n - Через службу `ControlPlaneService` обеспечивается мониторинг и контроль над различными частями приложения, что позволяет своевременно реагировать на изменения в состоянии системы и корректно завершать рабочие процессы.\n\n## Важные детали реализации\n- **Настройки тайм-аутов и интервалов опроса**:\n - Константы `ACTION_TIMEOUT_SECONDS` и `ACTION_POLL_INTERVAL_SECONDS` задают временные интервалы для ожиданий и периодических проверок состояний.\n \n- **Использование декораторов**:\n - Методы `@property` используются для создания геттеров и сеттеров для доступа к внутренним атрибутам объекта, таким как `configuration`, `services`, `traces`, `health`, `logs`, `workers`, `control_plane` и т.д.\n\n- **Централизованная обработка ошибок и исключений**:\n - Хотя конкретный механизм обработки исключений напрямую не указан в представленном фрагменте кода, предполагается наличие соответствующего механизма, позволяющего эффективно обрабатывать ошибки и восстанавливаться после сбоев.\n\n## Осторожные выводы\nНа основании представленного контекста сложно точно определить весь цикл работы `RuntimeManager`, однако можно предположить, что он играет ключевую роль в управлении жизненным циклом и координацией взаимодействий между различными модулями и сервисами приложения. Полная картина поведения и взаимодействия классов требует дополнительного анализа исходного кода вне предоставленных контекстных слоев.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_120855/full_chain_plba_code_subintents_plba-fullchain-find-entrypoints.json b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_120855/full_chain_plba_code_subintents_plba-fullchain-find-entrypoints.json new file mode 100644 index 0000000..2fa1e2c --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_120855/full_chain_plba_code_subintents_plba-fullchain-find-entrypoints.json @@ -0,0 +1,1196 @@ +{ + "case_id": "plba-fullchain-find-entrypoints", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 9, + "llm_answer": "## Финальный ответ:\n\nНа основании предоставленного контекста RAG, были найдены следующие **точки входа** (entrypoints) и их роли в приложении:\n\n### 1. `src/app_runtime/control/http_app.py` \n**app.post**: \n*Файл:* `http_app.py`, *сущность:* FastAPI приложение (`app`), метод:`post`. \n*Роль:* Обрабатывает HTTP POST-запросы.\n\n### 2. `src/app_runtime/control/http_app.py` \n**app.get**: \n*Файл:* `http_app.py`, *сущность:* FastAPI приложение (`app`), метод:`get`. \n*Роль:* Обрабатывает HTTP GET-запросы.\n\nЭти две точки являются основными точками входа для обработки HTTP запросов в приложении с использованием фреймворка FastAPI.\n\n---\n\nОстальные фрагменты информации касаются следующих аспектов приложения:\n\n- `src/app_runtime/workflow/contracts/result.py`: содержит класс `StepResult`, связанный с результатом выполнения шагов процесса (успешное завершение, статус).\n- `src/app_runtime/config/__init__.py`: импортирует классы для загрузки конфигураций из файлов.\n\nОднако они не являются точками входа, а представляют собой поддержку основной логики приложения. \n\nТаким образом, наиболее вероятными и важными точками входа являются методы `app.post` и `app.get` внутри файла `http_app.py`.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [], + "layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-fullchain-find-entrypoints", + "text": "Найди точки входа в коде", + "mode": "full_chain", + "run_started_at": "2026-03-12T12:08:55", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Найди точки входа в коде", + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [], + "confidence": 0.0 + }, + "rag_count": 9, + "rag_rows": [ + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/contracts/result.py", + "content": "class StepResult:\n transition: str = \"success\"\n updates: dict[str, Any] = field(default_factory=dict)\n status: str = \"completed\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/workflow/contracts/result.py:StepResult", + "span_start": 8, + "span_end": 11, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.workflow.contracts.result", + "is_test": false, + "blob_sha": "6e57dbfe22873f097f11228a26cffa415440a43b68a737b220906461cd86c353", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/__init__.py", + "content": "from app_runtime.config.file_loader import ConfigFileLoader\nfrom app_runtime.config.providers import FileConfigProvider\n\n__all__ = [\"ConfigFileLoader\", \"FileConfigProvider\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/config/__init__.py:1-4", + "span_start": 1, + "span_end": 4, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.config.__init__", + "is_test": false, + "blob_sha": "612918029820a2a983330ec92256142b55b9de4bdf3399ece18e2a02dbad9729", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/__init__.py", + "content": "__all__: list[str] = []", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/__init__.py:1-1", + "span_start": 1, + "span_end": 1, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.__init__", + "is_test": false, + "blob_sha": "8eea9df4f6d7b38ca0e39ccc27b04700e3d08dbeec8046d613d22706d19985fa", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "class ConfigFileLoader:\n def __init__(self, path: str | Path) -> None:\n self.path = Path(path)\n self.config: Any = None\n self.last_valid_config: Any = None\n self._last_seen_hash: str | None = None\n\n def read_text(self) -> str:\n return self.path.read_text(encoding=\"utf-8\")\n\n def parse(self, data: str) -> Any:\n suffix = self.path.suffix.lower()\n if suffix in {\".yml\", \".yaml\"}:\n return yaml.safe_load(data)\n return json.loads(data)\n\n def load_sync(self) -> Any:\n data = self.read_text()\n parsed = self.parse(data)\n self.config = parsed\n self.last_valid_config = parsed\n self._last_seen_hash = self._calculate_hash(data)\n return parsed\n\n def load_if_changed(self) -> tuple[bool, Any]:\n data = self.read_text()\n current_hash = self._calculate_hash(data)\n if current_hash == self._last_seen_hash:\n return False, self.config\n parsed = self.parse(data)\n self.config = parsed\n self.last_valid_config = parsed\n self._last_seen_hash = current_hash\n return True, parsed\n\n @staticmethod\n def _calculate_hash(data: str) -> str:\n return hashlib.sha256(data.encode(\"utf-8\")).hexdigest()", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/config/file_loader.py:ConfigFileLoader", + "span_start": 11, + "span_end": 48, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/providers.py", + "content": "class FileConfigProvider(ConfigProvider):\n def __init__(self, path: str | Path) -> None:\n self._loader = ConfigFileLoader(path)\n\n @property\n def loader(self) -> ConfigFileLoader:\n return self._loader\n\n def load(self) -> dict[str, Any]:\n config = self._loader.load_sync()\n if not isinstance(config, dict):\n raise TypeError(\"Config root must be a mapping\")\n return dict(config)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/config/providers.py:FileConfigProvider", + "span_start": 10, + "span_end": 22, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.config.providers", + "is_test": false, + "blob_sha": "8c53ca0122d6df6c5763bca15e99434bb4daebd5a618b8fc927e9ae90b022e64", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlActionSet:\n health: HealthHandler\n start: ActionHandler\n stop: ActionHandler\n status: ActionHandler", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "## Финальный ответ:\n\nНа основании предоставленного контекста RAG, были найдены следующие **точки входа** (entrypoints) и их роли в приложении:\n\n### 1. `src/app_runtime/control/http_app.py` \n**app.post**: \n*Файл:* `http_app.py`, *сущность:* FastAPI приложение (`app`), метод:`post`. \n*Роль:* Обрабатывает HTTP POST-запросы.\n\n### 2. `src/app_runtime/control/http_app.py` \n**app.get**: \n*Файл:* `http_app.py`, *сущность:* FastAPI приложение (`app`), метод:`get`. \n*Роль:* Обрабатывает HTTP GET-запросы.\n\nЭти две точки являются основными точками входа для обработки HTTP запросов в приложении с использованием фреймворка FastAPI.\n\n---\n\nОстальные фрагменты информации касаются следующих аспектов приложения:\n\n- `src/app_runtime/workflow/contracts/result.py`: содержит класс `StepResult`, связанный с результатом выполнения шагов процесса (успешное завершение, статус).\n- `src/app_runtime/config/__init__.py`: импортирует классы для загрузки конфигураций из файлов.\n\nОднако они не являются точками входа, а представляют собой поддержку основной логики приложения. \n\nТаким образом, наиболее вероятными и важными точками входа являются методы `app.post` и `app.get` внутри файла `http_app.py`.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C3_ENTRYPOINTS" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "unknown", + "symbol_candidates": [], + "keyword_hints": [], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C3_ENTRYPOINTS": "exact_path_fetch", + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C3_ENTRYPOINTS": 12, + "C0_SOURCE_CHUNKS": 6 + }, + "filters_by_layer": { + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C3_ENTRYPOINTS", + "query": "Найди точки входа в коде", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 12, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Найди точки входа в коде", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [] + }, + "layers": [ + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 6, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 1, + "symbol_resolution": 0, + "retrieval_total": 52, + "retrieval_by_layer": { + "C3_ENTRYPOINTS": 31, + "C0_SOURCE_CHUNKS": 20 + }, + "merge_rank": 0, + "prompt_build": 0, + "llm_call": 2323 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 458, + "evidence_rows": 9, + "evidence_chars": 2228 + }, + "evidence_summary": [ + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 6, + "unique_paths": 6 + } + ], + "prompt_template_id": "intent_code_qa_find_entrypoints_ru_v1", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 9, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-fullchain-find-entrypoints", + "mode": "full_chain", + "run_started_at": "2026-03-12T12:08:55", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Найди точки входа в коде", + "normalized_query": "Найди точки входа в коде" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Найди точки входа в коде" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Найди точки входа в коде" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "unknown", + "symbol_candidates": [], + "keyword_hints": [], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 1 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Найди точки входа в коде" + }, + "output": { + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [], + "confidence": 0.0 + }, + "rag_count": 9, + "rag_rows": [ + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/contracts/result.py", + "content": "class StepResult:\n transition: str = \"success\"\n updates: dict[str, Any] = field(default_factory=dict)\n status: str = \"completed\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/workflow/contracts/result.py:StepResult", + "span_start": 8, + "span_end": 11, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.workflow.contracts.result", + "is_test": false, + "blob_sha": "6e57dbfe22873f097f11228a26cffa415440a43b68a737b220906461cd86c353", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/__init__.py", + "content": "from app_runtime.config.file_loader import ConfigFileLoader\nfrom app_runtime.config.providers import FileConfigProvider\n\n__all__ = [\"ConfigFileLoader\", \"FileConfigProvider\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/config/__init__.py:1-4", + "span_start": 1, + "span_end": 4, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.config.__init__", + "is_test": false, + "blob_sha": "612918029820a2a983330ec92256142b55b9de4bdf3399ece18e2a02dbad9729", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/__init__.py", + "content": "__all__: list[str] = []", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/__init__.py:1-1", + "span_start": 1, + "span_end": 1, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.__init__", + "is_test": false, + "blob_sha": "8eea9df4f6d7b38ca0e39ccc27b04700e3d08dbeec8046d613d22706d19985fa", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "class ConfigFileLoader:\n def __init__(self, path: str | Path) -> None:\n self.path = Path(path)\n self.config: Any = None\n self.last_valid_config: Any = None\n self._last_seen_hash: str | None = None\n\n def read_text(self) -> str:\n return self.path.read_text(encoding=\"utf-8\")\n\n def parse(self, data: str) -> Any:\n suffix = self.path.suffix.lower()\n if suffix in {\".yml\", \".yaml\"}:\n return yaml.safe_load(data)\n return json.loads(data)\n\n def load_sync(self) -> Any:\n data = self.read_text()\n parsed = self.parse(data)\n self.config = parsed\n self.last_valid_config = parsed\n self._last_seen_hash = self._calculate_hash(data)\n return parsed\n\n def load_if_changed(self) -> tuple[bool, Any]:\n data = self.read_text()\n current_hash = self._calculate_hash(data)\n if current_hash == self._last_seen_hash:\n return False, self.config\n parsed = self.parse(data)\n self.config = parsed\n self.last_valid_config = parsed\n self._last_seen_hash = current_hash\n return True, parsed\n\n @staticmethod\n def _calculate_hash(data: str) -> str:\n return hashlib.sha256(data.encode(\"utf-8\")).hexdigest()", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/config/file_loader.py:ConfigFileLoader", + "span_start": 11, + "span_end": 48, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/providers.py", + "content": "class FileConfigProvider(ConfigProvider):\n def __init__(self, path: str | Path) -> None:\n self._loader = ConfigFileLoader(path)\n\n @property\n def loader(self) -> ConfigFileLoader:\n return self._loader\n\n def load(self) -> dict[str, Any]:\n config = self._loader.load_sync()\n if not isinstance(config, dict):\n raise TypeError(\"Config root must be a mapping\")\n return dict(config)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/config/providers.py:FileConfigProvider", + "span_start": 10, + "span_end": 22, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.config.providers", + "is_test": false, + "blob_sha": "8c53ca0122d6df6c5763bca15e99434bb4daebd5a618b8fc927e9ae90b022e64", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlActionSet:\n health: HealthHandler\n start: ActionHandler\n stop: ActionHandler\n status: ActionHandler", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C3_ENTRYPOINTS": "exact_path_fetch", + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C3_ENTRYPOINTS": 12, + "C0_SOURCE_CHUNKS": 6 + }, + "filters_by_layer": { + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C3_ENTRYPOINTS", + "query": "Найди точки входа в коде", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 12, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Найди точки входа в коде", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [] + }, + "layers": [ + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 6, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 52, + "retrieval_by_layer": { + "C3_ENTRYPOINTS": 31, + "C0_SOURCE_CHUNKS": 20 + }, + "merge_rank": 0 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Найди точки входа в коде", + "rag_count": 9 + }, + "output": { + "llm_answer": "## Финальный ответ:\n\nНа основании предоставленного контекста RAG, были найдены следующие **точки входа** (entrypoints) и их роли в приложении:\n\n### 1. `src/app_runtime/control/http_app.py` \n**app.post**: \n*Файл:* `http_app.py`, *сущность:* FastAPI приложение (`app`), метод:`post`. \n*Роль:* Обрабатывает HTTP POST-запросы.\n\n### 2. `src/app_runtime/control/http_app.py` \n**app.get**: \n*Файл:* `http_app.py`, *сущность:* FastAPI приложение (`app`), метод:`get`. \n*Роль:* Обрабатывает HTTP GET-запросы.\n\nЭти две точки являются основными точками входа для обработки HTTP запросов в приложении с использованием фреймворка FastAPI.\n\n---\n\nОстальные фрагменты информации касаются следующих аспектов приложения:\n\n- `src/app_runtime/workflow/contracts/result.py`: содержит класс `StepResult`, связанный с результатом выполнения шагов процесса (успешное завершение, статус).\n- `src/app_runtime/config/__init__.py`: импортирует классы для загрузки конфигураций из файлов.\n\nОднако они не являются точками входа, а представляют собой поддержку основной логики приложения. \n\nТаким образом, наиболее вероятными и важными точками входа являются методы `app.post` и `app.get` внутри файла `http_app.py`." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 458, + "evidence_rows": 9, + "evidence_chars": 2228 + }, + "evidence_summary": [ + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 6, + "unique_paths": 6 + } + ], + "prompt_template_id": "intent_code_qa_find_entrypoints_ru_v1", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 2323 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_120855/full_chain_plba_code_subintents_plba-fullchain-find-entrypoints.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_120855/full_chain_plba_code_subintents_plba-fullchain-find-entrypoints.md new file mode 100644 index 0000000..11a58df --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_120855/full_chain_plba_code_subintents_plba-fullchain-find-entrypoints.md @@ -0,0 +1,29 @@ +# plba-fullchain-find-entrypoints + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Найди точки входа в коде + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 9, + "llm_answer": "## Финальный ответ:\n\nНа основании предоставленного контекста RAG, были найдены следующие **точки входа** (entrypoints) и их роли в приложении:\n\n### 1. `src/app_runtime/control/http_app.py` \n**app.post**: \n*Файл:* `http_app.py`, *сущность:* FastAPI приложение (`app`), метод:`post`. \n*Роль:* Обрабатывает HTTP POST-запросы.\n\n### 2. `src/app_runtime/control/http_app.py` \n**app.get**: \n*Файл:* `http_app.py`, *сущность:* FastAPI приложение (`app`), метод:`get`. \n*Роль:* Обрабатывает HTTP GET-запросы.\n\nЭти две точки являются основными точками входа для обработки HTTP запросов в приложении с использованием фреймворка FastAPI.\n\n---\n\nОстальные фрагменты информации касаются следующих аспектов приложения:\n\n- `src/app_runtime/workflow/contracts/result.py`: содержит класс `StepResult`, связанный с результатом выполнения шагов процесса (успешное завершение, статус).\n- `src/app_runtime/config/__init__.py`: импортирует классы для загрузки конфигураций из файлов.\n\nОднако они не являются точками входа, а представляют собой поддержку основной логики приложения. \n\nТаким образом, наиболее вероятными и важными точками входа являются методы `app.post` и `app.get` внутри файла `http_app.py`.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [], + "layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_120855/full_chain_plba_code_subintents_plba-fullchain-find-tests-runtime-manager.json b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_120855/full_chain_plba_code_subintents_plba-fullchain-find-tests-runtime-manager.json new file mode 100644 index 0000000..76a73f0 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_120855/full_chain_plba_code_subintents_plba-fullchain-find-tests-runtime-manager.json @@ -0,0 +1,1879 @@ +{ + "case_id": "plba-fullchain-find-tests-runtime-manager", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 16, + "llm_answer": "Прямые тесты для `RuntimeManager` найдены в следующих местах:\n\n1. **tests/test_runtime.py**:\n - `test_runtime_graceful_stop_waits_until_worker_finishes`: Проверяет корректность остановки (`stop`) объекта `RuntimeManager`, ожидание завершения работающего модуля и корректное изменение статуса на «остановлен» после вызова метода `stop`.\n - `test_runtime_runs_worker_routine_and_exposes_status`: Тестирует запуск рутины модуля, регистрацию модуля и получение статусной информации от менеджера выполнения.\n\nЭти тесты напрямую создают объект `RuntimeManager`, регистрируют модули и выполняют различные операции с ним (запуск, остановка, проверка состояния).\n\nТесты находятся в слое зависимости (`C2_DEPENDENCY_GRAPH`), а также имеют соответствующие реализации в исходном коде (`C0_SOURCE_CHUNKS`).\n\nОбщий вывод:\n- Прямые тесты для `RuntimeManager` существуют и расположены в файле `tests/test_runtime.py`. Они проверяют базовые функциональные возможности создания, регистрации модулей, запуска и остановки менеджера выполнения.\n- Косвенно объекты `RuntimeManager` используются и в других тестах (`tests/test_business_control_actions.py`), однако эти тесты являются менее конкретными по отношению к самому классу `RuntimeManager`.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-fullchain-find-tests-runtime-manager", + "text": "Где тесты для RuntimeManager?", + "mode": "full_chain", + "run_started_at": "2026-03-12T12:08:55", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Где тесты для RuntimeManager?", + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "RuntimeManager" + ], + "confidence": 0.0 + }, + "rag_count": 16, + "rag_rows": [ + { + "path": "tests/test_runtime.py", + "content": "test_runtime_runs_worker_routine_and_exposes_status instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_runtime_runs_worker_routine_and_exposes_status:instantiates", + "span_start": 209, + "span_end": 209, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "c397a308e7824ba9fe400a754c7e15e66ea6f058d7f5d3e82bb002bb78b509d2", + "edge_type": "instantiates", + "src_symbol_id": "1c767eb5ee08e84f45b18c8ed7531ec0ed73c63fb1594823569672db7b21e992", + "src_qname": "test_runtime_runs_worker_routine_and_exposes_status", + "dst_symbol_id": "aeadc039653807b0da1ca6e3cc1078ee61cfc510b28e7f9c2ec04c59da43cc8d", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "test_runtime_graceful_stop_waits_until_worker_finishes instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_runtime_graceful_stop_waits_until_worker_finishes:instantiates", + "span_start": 229, + "span_end": 229, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "76b4701262ccaa0a7a41691407c4ebdb2ca74a2415d89f0a38ef0d4f608bda93", + "edge_type": "instantiates", + "src_symbol_id": "1076e788e4a03b10d7bc1313a8ad46caa170c13cc026c6e4de994af1a6ae57bf", + "src_qname": "test_runtime_graceful_stop_waits_until_worker_finishes", + "dst_symbol_id": "aeadc039653807b0da1ca6e3cc1078ee61cfc510b28e7f9c2ec04c59da43cc8d", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "_build_runtime instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "_build_runtime:instantiates", + "span_start": 155, + "span_end": 155, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "7eb254d564944bab6272757ee5ef688862bd321e6941e2495dc942e03b1c9a25", + "edge_type": "instantiates", + "src_symbol_id": "db94031d5245bf82be836a109b4584b43b8e83d37a0f318e03f6c8191896d469", + "src_qname": "_build_runtime", + "dst_symbol_id": "a1572ea8183dc0cd6ddbc74342bbde8c28cecfde37ad40b62feff09f8d103d11", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_worker_wakes_up_with_configured_interval instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_worker_wakes_up_with_configured_interval:instantiates", + "span_start": 167, + "span_end": 167, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "189aafc4de0b79c688668f25f0c87166a127df26bd2215452014713b65ef281a", + "edge_type": "instantiates", + "src_symbol_id": "65f877f78191d65e6a752e41cedc70ebc784c266804a55c1c56440336e1f0d6e", + "src_qname": "test_worker_wakes_up_with_configured_interval", + "dst_symbol_id": "a1572ea8183dc0cd6ddbc74342bbde8c28cecfde37ad40b62feff09f8d103d11", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_actions_stop_busy_worker_after_timeout\n -> BlockingRoutine\n -> BlockingRoutine.__init__\n -> BlockingRoutine._started\n -> BlockingRoutine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_actions_stop_busy_worker_after_timeout:dataflow_slice", + "span_start": 42, + "span_end": 238, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "8e7db3d2a9226f1c1d9942ac6373cfcafa0d2276758ddb8a3d3c455a3d58024d", + "edge_type": "dataflow_slice", + "src_symbol_id": "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "src_qname": "test_actions_stop_busy_worker_after_timeout", + "dst_symbol_id": "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04", + "dst_ref": "BlockingRoutine.run", + "resolution": "resolved", + "slice_id": "8e7db3d2a9226f1c1d9942ac6373cfcafa0d2276758ddb8a3d3c455a3d58024d", + "root_symbol_id": "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "path_symbols": [ + "test_actions_stop_busy_worker_after_timeout", + "BlockingRoutine", + "BlockingRoutine.__init__", + "BlockingRoutine._started", + "BlockingRoutine.run" + ], + "path_symbol_ids": [ + "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "a3349c5bc65e4003a4bbd6a8dbb7a54c337e12d1aed930caa701b12e520f1e67", + "486deeed3043c6db985aef258e96ddc67aa53608e67a83962fbd2471f649ddf1", + "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_actions_stop_busy_worker_before_timeout\n -> BlockingRoutine\n -> BlockingRoutine.__init__\n -> BlockingRoutine._release\n -> BlockingRoutine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_actions_stop_busy_worker_before_timeout:dataflow_slice", + "span_start": 43, + "span_end": 212, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "8bd726155ba387d3579763ee84dfd2f9a90bc917da88f3b2e89416ab5c1254d6", + "edge_type": "dataflow_slice", + "src_symbol_id": "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "src_qname": "test_actions_stop_busy_worker_before_timeout", + "dst_symbol_id": "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04", + "dst_ref": "BlockingRoutine.run", + "resolution": "resolved", + "slice_id": "8bd726155ba387d3579763ee84dfd2f9a90bc917da88f3b2e89416ab5c1254d6", + "root_symbol_id": "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "path_symbols": [ + "test_actions_stop_busy_worker_before_timeout", + "BlockingRoutine", + "BlockingRoutine.__init__", + "BlockingRoutine._release", + "BlockingRoutine.run" + ], + "path_symbol_ids": [ + "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "a3349c5bc65e4003a4bbd6a8dbb7a54c337e12d1aed930caa701b12e520f1e67", + "486deeed3043c6db985aef258e96ddc67aa53608e67a83962fbd2471f649ddf1", + "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "def test_runtime_graceful_stop_waits_until_worker_finishes() -> None:\n started = Event()\n release = Event()\n runtime = RuntimeManager()\n runtime.register_module(BlockingModule(started, release))\n runtime.start()\n assert started.wait(timeout=1.0) is True\n assert runtime.status()[\"runtime\"][\"state\"] == \"busy\"\n\n stop_thread = Thread(target=runtime.stop, kwargs={\"timeout\": 1.0}, daemon=True)\n stop_thread.start()\n sleep(0.1)\n assert stop_thread.is_alive() is True\n\n release.set()\n stop_thread.join(timeout=1.0)\n assert stop_thread.is_alive() is False\n assert runtime.status()[\"runtime\"][\"state\"] == \"stopped\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_runtime.py:test_runtime_graceful_stop_waits_until_worker_finishes", + "span_start": 226, + "span_end": 243, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 8, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "def test_runtime_runs_worker_routine_and_exposes_status(tmp_path) -> None:\n config_path = tmp_path / \"config.yml\"\n config_path.write_text(\n \"\"\"\nplatform:\n workers: 1\nlog:\n version: 1\n disable_existing_loggers: false\n handlers:\n console:\n class: logging.StreamHandler\n root:\n level: INFO\n handlers: [console]\n\"\"\".strip(),\n encoding=\"utf-8\",\n )\n runtime = RuntimeManager()\n runtime.add_config_file(config_path)\n module = ExampleModule()\n runtime.register_module(module)\n\n runtime.start()\n sleep(0.2)\n status = runtime.status()\n runtime.stop()\n\n assert module.routine.processed == [{\"id\": 1}]\n assert status[\"modules\"] == [\"example\"]\n assert status[\"runtime\"][\"state\"] == \"idle\"\n assert status[\"health\"][\"status\"] == \"ok\"\n assert status[\"config\"] == {\"platform\": {\"workers\": 1}, \"log\": status[\"config\"][\"log\"]}", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_runtime.py:test_runtime_runs_worker_routine_and_exposes_status", + "span_start": 191, + "span_end": 223, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 7, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _build_runtime(worker: Worker, *, control_timeout: int = 1) -> tuple[RuntimeManager, str]:\n runtime = RuntimeManager()\n channel = HttpControlChannel(host=\"127.0.0.1\", port=0, timeout=control_timeout)\n runtime.control_plane.register_channel(channel)\n runtime.register_module(WorkerModule(worker))\n runtime.start()\n return runtime, f\"http://127.0.0.1:{channel.port}\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_build_runtime", + "span_start": 154, + "span_end": 160, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 6, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def test_worker_wakes_up_with_configured_interval() -> None:\n interval = 0.15\n routine = IntervalRoutine()\n worker = ScenarioWorker(\"interval-worker\", routine, interval=interval)\n runtime = RuntimeManager()\n runtime.register_module(WorkerModule(worker))\n\n runtime.start()\n try:\n assert routine.wait_runs(count=3, timeout=2.0) is True\n finally:\n runtime.stop()\n\n deltas = routine.deltas()\n assert len(deltas) >= 2\n assert all(delta >= interval * 0.7 for delta in deltas[:2])", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:test_worker_wakes_up_with_configured_interval", + "span_start": 163, + "span_end": 178, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 7, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class BlockingRoutine:\n def __init__(self, started: Event, release: Event) -> None:\n self._started = started\n self._release = release\n\n def run(self) -> None:\n self._started.set()\n self._release.wait(timeout=5.0)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:BlockingRoutine", + "span_start": 40, + "span_end": 47, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class ScenarioWorker(Worker):\n def __init__(self, name: str, routine: object, *, interval: float = 0.05) -> None:\n self._name = name\n self._routine = routine\n self._interval = interval\n self._thread: Thread | None = None\n self._stop_requested = Event()\n self._in_flight = 0\n self._runs = 0\n self._lock = Lock()\n\n @property\n def name(self) -> str:\n return self._name\n\n @property\n def critical(self) -> bool:\n return True\n\n def start(self) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._stop_requested.clear()\n self._thread = Thread(target=self._loop, name=f\"{self._name}-thread\", daemon=True)\n self._thread.start()\n\n def stop(self, force: bool = False) -> None:\n self._stop_requested.set()\n\n def health(self) -> WorkerHealth:\n return WorkerHealth(name=self.name, status=\"ok\", critical=True, meta={\"runs\": self._runs})\n\n def status(self) -> WorkerStatus:\n thread_alive = self._thread is not None and self._thread.is_alive()\n with self._lock:\n in_flight = self._in_flight\n runs = self._runs\n if not thread_alive:\n state = \"stopped\"\n elif self._stop_requested.is_set():\n state = \"stopping\"\n elif in_flight > 0:\n state = \"busy\"\n else:\n state = \"idle\"\n return WorkerStatus(name=self.name, state=state, in_flight=in_flight, meta={\"runs\": runs})\n\n def _loop(self) -> None:\n while not self._stop_requested.is_set():\n with self._lock:\n self._in_flight += 1\n try:\n self._routine.run()\n with self._lock:\n self._runs += 1\n finally:\n with self._lock:\n self._in_flight -= 1\n if self._stop_requested.is_set():\n return\n sleep(self._interval)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:ScenarioWorker", + "span_start": 50, + "span_end": 110, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 2, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class WorkerModule(ApplicationModule):\n def __init__(self, worker: Worker) -> None:\n self._worker = worker\n\n @property\n def name(self) -> str:\n return \"business-tests\"\n\n def register(self, registry: ModuleRegistry) -> None:\n registry.add_worker(self._worker)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:WorkerModule", + "span_start": 113, + "span_end": 122, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 3, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _http_call_json(\n base_url: str,\n path: str,\n *,\n method: str = \"GET\",\n headers: dict[str, str] | None = None,\n) -> tuple[int, dict[str, object]]:\n request = Request(f\"{base_url}{path}\", method=method, headers=headers or {})\n try:\n with urlopen(request, timeout=15.0) as response:\n status = response.status\n body = response.read()\n except HTTPError as error:\n status = error.code\n body = error.read()\n payload = json.loads(body.decode(\"utf-8\"))\n return status, payload", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_http_call_json", + "span_start": 125, + "span_end": 141, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 4, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class IntervalRoutine:\n calls: list[float] = field(default_factory=list)\n _lock: Lock = field(default_factory=Lock)\n\n def run(self) -> None:\n with self._lock:\n self.calls.append(monotonic())\n\n def wait_runs(self, count: int, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n with self._lock:\n if len(self.calls) >= count:\n return True\n sleep(0.01)\n return False\n\n def deltas(self) -> list[float]:\n with self._lock:\n return [self.calls[index + 1] - self.calls[index] for index in range(len(self.calls) - 1)]", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:IntervalRoutine", + "span_start": 18, + "span_end": 37, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _poll_until_stopped(base_url: str, timeout: float = 2.0) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n _, payload = _http_call_json(base_url, \"/actions/status\")\n if payload.get(\"detail\") == \"stopped\":\n return True\n sleep(0.05)\n return False", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_poll_until_stopped", + "span_start": 144, + "span_end": 151, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 5, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "Прямые тесты для `RuntimeManager` найдены в следующих местах:\n\n1. **tests/test_runtime.py**:\n - `test_runtime_graceful_stop_waits_until_worker_finishes`: Проверяет корректность остановки (`stop`) объекта `RuntimeManager`, ожидание завершения работающего модуля и корректное изменение статуса на «остановлен» после вызова метода `stop`.\n - `test_runtime_runs_worker_routine_and_exposes_status`: Тестирует запуск рутины модуля, регистрацию модуля и получение статусной информации от менеджера выполнения.\n\nЭти тесты напрямую создают объект `RuntimeManager`, регистрируют модули и выполняют различные операции с ним (запуск, остановка, проверка состояния).\n\nТесты находятся в слое зависимости (`C2_DEPENDENCY_GRAPH`), а также имеют соответствующие реализации в исходном коде (`C0_SOURCE_CHUNKS`).\n\nОбщий вывод:\n- Прямые тесты для `RuntimeManager` существуют и расположены в файле `tests/test_runtime.py`. Они проверяют базовые функциональные возможности создания, регистрации модулей, запуска и остановки менеджера выполнения.\n- Косвенно объекты `RuntimeManager` используются и в других тестах (`tests/test_business_control_actions.py`), однако эти тесты являются менее конкретными по отношению к самому классу `RuntimeManager`.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C2_DEPENDENCY_GRAPH" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "test_file_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "test_symbol_patterns": [ + "test_runtime_manager", + "TestRuntimeManager", + "RuntimeManager" + ], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C0_SOURCE_CHUNKS": 10 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src", + "tests" + ], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src", + "tests" + ], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Где тесты для RuntimeManager? test_runtime_manager TestRuntimeManager RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Где тесты для RuntimeManager? test_runtime_manager TestRuntimeManager RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 10, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 0, + "candidates_after_filter": 0 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src", + "tests" + ], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src", + "tests" + ], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 10, + "candidates_after_filter": 10 + } + ], + "fallback": { + "used": true, + "reason": "scope_relaxed_no_hits" + }, + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "RuntimeManager" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "miss", + "hit_count": 0, + "fail_reason": "scope_relaxed_no_hits" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 10, + "fail_reason": null + } + ] + }, + "constraint_violations": [ + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C1_SYMBOL_CATALOG", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + } + ], + "timings_ms": { + "router": 1, + "symbol_resolution": 0, + "retrieval_total": 159, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 82, + "C2_DEPENDENCY_GRAPH": 60, + "C0_SOURCE_CHUNKS": 16 + }, + "merge_rank": 0, + "prompt_build": 0, + "llm_call": 1956 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 858, + "evidence_rows": 16, + "evidence_chars": 7086 + }, + "evidence_summary": [ + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 2 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 10, + "unique_paths": 2 + } + ], + "prompt_template_id": "intent_code_qa_find_tests_ru_v1", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "RuntimeManager" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 16, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-fullchain-find-tests-runtime-manager", + "mode": "full_chain", + "run_started_at": "2026-03-12T12:08:55", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Где тесты для RuntimeManager?", + "normalized_query": "Где тесты для RuntimeManager?" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Где тесты для RuntimeManager?" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Где тесты для RuntimeManager?" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "test_file_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "test_symbol_patterns": [ + "test_runtime_manager", + "TestRuntimeManager", + "RuntimeManager" + ], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 1 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Где тесты для RuntimeManager?" + }, + "output": { + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "RuntimeManager" + ], + "confidence": 0.0 + }, + "rag_count": 16, + "rag_rows": [ + { + "path": "tests/test_runtime.py", + "content": "test_runtime_runs_worker_routine_and_exposes_status instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_runtime_runs_worker_routine_and_exposes_status:instantiates", + "span_start": 209, + "span_end": 209, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "c397a308e7824ba9fe400a754c7e15e66ea6f058d7f5d3e82bb002bb78b509d2", + "edge_type": "instantiates", + "src_symbol_id": "1c767eb5ee08e84f45b18c8ed7531ec0ed73c63fb1594823569672db7b21e992", + "src_qname": "test_runtime_runs_worker_routine_and_exposes_status", + "dst_symbol_id": "aeadc039653807b0da1ca6e3cc1078ee61cfc510b28e7f9c2ec04c59da43cc8d", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "test_runtime_graceful_stop_waits_until_worker_finishes instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_runtime_graceful_stop_waits_until_worker_finishes:instantiates", + "span_start": 229, + "span_end": 229, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "76b4701262ccaa0a7a41691407c4ebdb2ca74a2415d89f0a38ef0d4f608bda93", + "edge_type": "instantiates", + "src_symbol_id": "1076e788e4a03b10d7bc1313a8ad46caa170c13cc026c6e4de994af1a6ae57bf", + "src_qname": "test_runtime_graceful_stop_waits_until_worker_finishes", + "dst_symbol_id": "aeadc039653807b0da1ca6e3cc1078ee61cfc510b28e7f9c2ec04c59da43cc8d", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "_build_runtime instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "_build_runtime:instantiates", + "span_start": 155, + "span_end": 155, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "7eb254d564944bab6272757ee5ef688862bd321e6941e2495dc942e03b1c9a25", + "edge_type": "instantiates", + "src_symbol_id": "db94031d5245bf82be836a109b4584b43b8e83d37a0f318e03f6c8191896d469", + "src_qname": "_build_runtime", + "dst_symbol_id": "a1572ea8183dc0cd6ddbc74342bbde8c28cecfde37ad40b62feff09f8d103d11", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_worker_wakes_up_with_configured_interval instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_worker_wakes_up_with_configured_interval:instantiates", + "span_start": 167, + "span_end": 167, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "189aafc4de0b79c688668f25f0c87166a127df26bd2215452014713b65ef281a", + "edge_type": "instantiates", + "src_symbol_id": "65f877f78191d65e6a752e41cedc70ebc784c266804a55c1c56440336e1f0d6e", + "src_qname": "test_worker_wakes_up_with_configured_interval", + "dst_symbol_id": "a1572ea8183dc0cd6ddbc74342bbde8c28cecfde37ad40b62feff09f8d103d11", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_actions_stop_busy_worker_after_timeout\n -> BlockingRoutine\n -> BlockingRoutine.__init__\n -> BlockingRoutine._started\n -> BlockingRoutine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_actions_stop_busy_worker_after_timeout:dataflow_slice", + "span_start": 42, + "span_end": 238, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "8e7db3d2a9226f1c1d9942ac6373cfcafa0d2276758ddb8a3d3c455a3d58024d", + "edge_type": "dataflow_slice", + "src_symbol_id": "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "src_qname": "test_actions_stop_busy_worker_after_timeout", + "dst_symbol_id": "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04", + "dst_ref": "BlockingRoutine.run", + "resolution": "resolved", + "slice_id": "8e7db3d2a9226f1c1d9942ac6373cfcafa0d2276758ddb8a3d3c455a3d58024d", + "root_symbol_id": "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "path_symbols": [ + "test_actions_stop_busy_worker_after_timeout", + "BlockingRoutine", + "BlockingRoutine.__init__", + "BlockingRoutine._started", + "BlockingRoutine.run" + ], + "path_symbol_ids": [ + "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "a3349c5bc65e4003a4bbd6a8dbb7a54c337e12d1aed930caa701b12e520f1e67", + "486deeed3043c6db985aef258e96ddc67aa53608e67a83962fbd2471f649ddf1", + "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_actions_stop_busy_worker_before_timeout\n -> BlockingRoutine\n -> BlockingRoutine.__init__\n -> BlockingRoutine._release\n -> BlockingRoutine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_actions_stop_busy_worker_before_timeout:dataflow_slice", + "span_start": 43, + "span_end": 212, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "8bd726155ba387d3579763ee84dfd2f9a90bc917da88f3b2e89416ab5c1254d6", + "edge_type": "dataflow_slice", + "src_symbol_id": "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "src_qname": "test_actions_stop_busy_worker_before_timeout", + "dst_symbol_id": "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04", + "dst_ref": "BlockingRoutine.run", + "resolution": "resolved", + "slice_id": "8bd726155ba387d3579763ee84dfd2f9a90bc917da88f3b2e89416ab5c1254d6", + "root_symbol_id": "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "path_symbols": [ + "test_actions_stop_busy_worker_before_timeout", + "BlockingRoutine", + "BlockingRoutine.__init__", + "BlockingRoutine._release", + "BlockingRoutine.run" + ], + "path_symbol_ids": [ + "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "a3349c5bc65e4003a4bbd6a8dbb7a54c337e12d1aed930caa701b12e520f1e67", + "486deeed3043c6db985aef258e96ddc67aa53608e67a83962fbd2471f649ddf1", + "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "def test_runtime_graceful_stop_waits_until_worker_finishes() -> None:\n started = Event()\n release = Event()\n runtime = RuntimeManager()\n runtime.register_module(BlockingModule(started, release))\n runtime.start()\n assert started.wait(timeout=1.0) is True\n assert runtime.status()[\"runtime\"][\"state\"] == \"busy\"\n\n stop_thread = Thread(target=runtime.stop, kwargs={\"timeout\": 1.0}, daemon=True)\n stop_thread.start()\n sleep(0.1)\n assert stop_thread.is_alive() is True\n\n release.set()\n stop_thread.join(timeout=1.0)\n assert stop_thread.is_alive() is False\n assert runtime.status()[\"runtime\"][\"state\"] == \"stopped\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_runtime.py:test_runtime_graceful_stop_waits_until_worker_finishes", + "span_start": 226, + "span_end": 243, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 8, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "def test_runtime_runs_worker_routine_and_exposes_status(tmp_path) -> None:\n config_path = tmp_path / \"config.yml\"\n config_path.write_text(\n \"\"\"\nplatform:\n workers: 1\nlog:\n version: 1\n disable_existing_loggers: false\n handlers:\n console:\n class: logging.StreamHandler\n root:\n level: INFO\n handlers: [console]\n\"\"\".strip(),\n encoding=\"utf-8\",\n )\n runtime = RuntimeManager()\n runtime.add_config_file(config_path)\n module = ExampleModule()\n runtime.register_module(module)\n\n runtime.start()\n sleep(0.2)\n status = runtime.status()\n runtime.stop()\n\n assert module.routine.processed == [{\"id\": 1}]\n assert status[\"modules\"] == [\"example\"]\n assert status[\"runtime\"][\"state\"] == \"idle\"\n assert status[\"health\"][\"status\"] == \"ok\"\n assert status[\"config\"] == {\"platform\": {\"workers\": 1}, \"log\": status[\"config\"][\"log\"]}", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_runtime.py:test_runtime_runs_worker_routine_and_exposes_status", + "span_start": 191, + "span_end": 223, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 7, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _build_runtime(worker: Worker, *, control_timeout: int = 1) -> tuple[RuntimeManager, str]:\n runtime = RuntimeManager()\n channel = HttpControlChannel(host=\"127.0.0.1\", port=0, timeout=control_timeout)\n runtime.control_plane.register_channel(channel)\n runtime.register_module(WorkerModule(worker))\n runtime.start()\n return runtime, f\"http://127.0.0.1:{channel.port}\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_build_runtime", + "span_start": 154, + "span_end": 160, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 6, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def test_worker_wakes_up_with_configured_interval() -> None:\n interval = 0.15\n routine = IntervalRoutine()\n worker = ScenarioWorker(\"interval-worker\", routine, interval=interval)\n runtime = RuntimeManager()\n runtime.register_module(WorkerModule(worker))\n\n runtime.start()\n try:\n assert routine.wait_runs(count=3, timeout=2.0) is True\n finally:\n runtime.stop()\n\n deltas = routine.deltas()\n assert len(deltas) >= 2\n assert all(delta >= interval * 0.7 for delta in deltas[:2])", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:test_worker_wakes_up_with_configured_interval", + "span_start": 163, + "span_end": 178, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 7, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class BlockingRoutine:\n def __init__(self, started: Event, release: Event) -> None:\n self._started = started\n self._release = release\n\n def run(self) -> None:\n self._started.set()\n self._release.wait(timeout=5.0)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:BlockingRoutine", + "span_start": 40, + "span_end": 47, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class ScenarioWorker(Worker):\n def __init__(self, name: str, routine: object, *, interval: float = 0.05) -> None:\n self._name = name\n self._routine = routine\n self._interval = interval\n self._thread: Thread | None = None\n self._stop_requested = Event()\n self._in_flight = 0\n self._runs = 0\n self._lock = Lock()\n\n @property\n def name(self) -> str:\n return self._name\n\n @property\n def critical(self) -> bool:\n return True\n\n def start(self) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._stop_requested.clear()\n self._thread = Thread(target=self._loop, name=f\"{self._name}-thread\", daemon=True)\n self._thread.start()\n\n def stop(self, force: bool = False) -> None:\n self._stop_requested.set()\n\n def health(self) -> WorkerHealth:\n return WorkerHealth(name=self.name, status=\"ok\", critical=True, meta={\"runs\": self._runs})\n\n def status(self) -> WorkerStatus:\n thread_alive = self._thread is not None and self._thread.is_alive()\n with self._lock:\n in_flight = self._in_flight\n runs = self._runs\n if not thread_alive:\n state = \"stopped\"\n elif self._stop_requested.is_set():\n state = \"stopping\"\n elif in_flight > 0:\n state = \"busy\"\n else:\n state = \"idle\"\n return WorkerStatus(name=self.name, state=state, in_flight=in_flight, meta={\"runs\": runs})\n\n def _loop(self) -> None:\n while not self._stop_requested.is_set():\n with self._lock:\n self._in_flight += 1\n try:\n self._routine.run()\n with self._lock:\n self._runs += 1\n finally:\n with self._lock:\n self._in_flight -= 1\n if self._stop_requested.is_set():\n return\n sleep(self._interval)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:ScenarioWorker", + "span_start": 50, + "span_end": 110, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 2, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class WorkerModule(ApplicationModule):\n def __init__(self, worker: Worker) -> None:\n self._worker = worker\n\n @property\n def name(self) -> str:\n return \"business-tests\"\n\n def register(self, registry: ModuleRegistry) -> None:\n registry.add_worker(self._worker)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:WorkerModule", + "span_start": 113, + "span_end": 122, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 3, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _http_call_json(\n base_url: str,\n path: str,\n *,\n method: str = \"GET\",\n headers: dict[str, str] | None = None,\n) -> tuple[int, dict[str, object]]:\n request = Request(f\"{base_url}{path}\", method=method, headers=headers or {})\n try:\n with urlopen(request, timeout=15.0) as response:\n status = response.status\n body = response.read()\n except HTTPError as error:\n status = error.code\n body = error.read()\n payload = json.loads(body.decode(\"utf-8\"))\n return status, payload", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_http_call_json", + "span_start": 125, + "span_end": 141, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 4, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class IntervalRoutine:\n calls: list[float] = field(default_factory=list)\n _lock: Lock = field(default_factory=Lock)\n\n def run(self) -> None:\n with self._lock:\n self.calls.append(monotonic())\n\n def wait_runs(self, count: int, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n with self._lock:\n if len(self.calls) >= count:\n return True\n sleep(0.01)\n return False\n\n def deltas(self) -> list[float]:\n with self._lock:\n return [self.calls[index + 1] - self.calls[index] for index in range(len(self.calls) - 1)]", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:IntervalRoutine", + "span_start": 18, + "span_end": 37, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _poll_until_stopped(base_url: str, timeout: float = 2.0) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n _, payload = _http_call_json(base_url, \"/actions/status\")\n if payload.get(\"detail\") == \"stopped\":\n return True\n sleep(0.05)\n return False", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_poll_until_stopped", + "span_start": 144, + "span_end": 151, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 5, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C0_SOURCE_CHUNKS": 10 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src", + "tests" + ], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src", + "tests" + ], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Где тесты для RuntimeManager? test_runtime_manager TestRuntimeManager RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Где тесты для RuntimeManager? test_runtime_manager TestRuntimeManager RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 10, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 0, + "candidates_after_filter": 0 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src", + "tests" + ], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src", + "tests" + ], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 10, + "candidates_after_filter": 10 + } + ], + "fallback": { + "used": true, + "reason": "scope_relaxed_no_hits" + }, + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "RuntimeManager" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "miss", + "hit_count": 0, + "fail_reason": "scope_relaxed_no_hits" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 10, + "fail_reason": null + } + ] + }, + "constraint_violations": [ + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C1_SYMBOL_CATALOG", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + } + ], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 159, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 82, + "C2_DEPENDENCY_GRAPH": 60, + "C0_SOURCE_CHUNKS": 16 + }, + "merge_rank": 0 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Где тесты для RuntimeManager?", + "rag_count": 16 + }, + "output": { + "llm_answer": "Прямые тесты для `RuntimeManager` найдены в следующих местах:\n\n1. **tests/test_runtime.py**:\n - `test_runtime_graceful_stop_waits_until_worker_finishes`: Проверяет корректность остановки (`stop`) объекта `RuntimeManager`, ожидание завершения работающего модуля и корректное изменение статуса на «остановлен» после вызова метода `stop`.\n - `test_runtime_runs_worker_routine_and_exposes_status`: Тестирует запуск рутины модуля, регистрацию модуля и получение статусной информации от менеджера выполнения.\n\nЭти тесты напрямую создают объект `RuntimeManager`, регистрируют модули и выполняют различные операции с ним (запуск, остановка, проверка состояния).\n\nТесты находятся в слое зависимости (`C2_DEPENDENCY_GRAPH`), а также имеют соответствующие реализации в исходном коде (`C0_SOURCE_CHUNKS`).\n\nОбщий вывод:\n- Прямые тесты для `RuntimeManager` существуют и расположены в файле `tests/test_runtime.py`. Они проверяют базовые функциональные возможности создания, регистрации модулей, запуска и остановки менеджера выполнения.\n- Косвенно объекты `RuntimeManager` используются и в других тестах (`tests/test_business_control_actions.py`), однако эти тесты являются менее конкретными по отношению к самому классу `RuntimeManager`." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 858, + "evidence_rows": 16, + "evidence_chars": 7086 + }, + "evidence_summary": [ + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 2 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 10, + "unique_paths": 2 + } + ], + "prompt_template_id": "intent_code_qa_find_tests_ru_v1", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 1956 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_120855/full_chain_plba_code_subintents_plba-fullchain-find-tests-runtime-manager.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_120855/full_chain_plba_code_subintents_plba-fullchain-find-tests-runtime-manager.md new file mode 100644 index 0000000..c0cba97 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_120855/full_chain_plba_code_subintents_plba-fullchain-find-tests-runtime-manager.md @@ -0,0 +1,32 @@ +# plba-fullchain-find-tests-runtime-manager + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Где тесты для RuntimeManager? + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 16, + "llm_answer": "Прямые тесты для `RuntimeManager` найдены в следующих местах:\n\n1. **tests/test_runtime.py**:\n - `test_runtime_graceful_stop_waits_until_worker_finishes`: Проверяет корректность остановки (`stop`) объекта `RuntimeManager`, ожидание завершения работающего модуля и корректное изменение статуса на «остановлен» после вызова метода `stop`.\n - `test_runtime_runs_worker_routine_and_exposes_status`: Тестирует запуск рутины модуля, регистрацию модуля и получение статусной информации от менеджера выполнения.\n\nЭти тесты напрямую создают объект `RuntimeManager`, регистрируют модули и выполняют различные операции с ним (запуск, остановка, проверка состояния).\n\nТесты находятся в слое зависимости (`C2_DEPENDENCY_GRAPH`), а также имеют соответствующие реализации в исходном коде (`C0_SOURCE_CHUNKS`).\n\nОбщий вывод:\n- Прямые тесты для `RuntimeManager` существуют и расположены в файле `tests/test_runtime.py`. Они проверяют базовые функциональные возможности создания, регистрации модулей, запуска и остановки менеджера выполнения.\n- Косвенно объекты `RuntimeManager` используются и в других тестах (`tests/test_business_control_actions.py`), однако эти тесты являются менее конкретными по отношению к самому классу `RuntimeManager`.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_120855/full_chain_plba_code_subintents_plba-fullchain-open-file-runtime.json b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_120855/full_chain_plba_code_subintents_plba-fullchain-open-file-runtime.json new file mode 100644 index 0000000..f7f7935 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_120855/full_chain_plba_code_subintents_plba-fullchain-open-file-runtime.json @@ -0,0 +1,492 @@ +{ + "case_id": "plba-fullchain-open-file-runtime", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 1, + "llm_answer": "Файл `src/app_runtime/core/runtime.py` содержит определение класса `RuntimeManager`, являющегося ключевым компонентом системы управления выполнением приложений.\n\n## Важные сущности и их значение:\n\n- **Класс `RuntimeManager`:** Основной управляющий класс, инициализирующий различные сервисы и модули приложения.\n - Переменные класса:\n - `ACTION_TIMEOUT_SECONDS` и `ACTION_POLL_INTERVAL_SECONDS`: настройки тайм-аутов и интервалов опроса действий.\n - Метод `__init__`: Конструктор класса, принимающий различные компоненты инфраструктуры (конфигурации, службы, трассировки, здоровье, логирование, управление рабочими процессами и контрольная плоскость).\n - Метод `_register_core_services`: Регистрация основных сервисов внутри runtime менеджера.\n \nЭтот класс является точкой входа и основным управляющим элементом при запуске и управлении приложением, обеспечивая интеграцию различных компонентов и сервисов.", + "answer_mode": "answered", + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "symbol_candidates": [], + "layers": [ + "C0_SOURCE_CHUNKS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-fullchain-open-file-runtime", + "text": "Открой файл src/app_runtime/core/runtime.py", + "mode": "full_chain", + "run_started_at": "2026-03-12T12:08:55", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Открой файл src/app_runtime/core/runtime.py", + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [], + "confidence": 0.0 + }, + "rag_count": 1, + "rag_rows": [ + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "Файл `src/app_runtime/core/runtime.py` содержит определение класса `RuntimeManager`, являющегося ключевым компонентом системы управления выполнением приложений.\n\n## Важные сущности и их значение:\n\n- **Класс `RuntimeManager`:** Основной управляющий класс, инициализирующий различные сервисы и модули приложения.\n - Переменные класса:\n - `ACTION_TIMEOUT_SECONDS` и `ACTION_POLL_INTERVAL_SECONDS`: настройки тайм-аутов и интервалов опроса действий.\n - Метод `__init__`: Конструктор класса, принимающий различные компоненты инфраструктуры (конфигурации, службы, трассировки, здоровье, логирование, управление рабочими процессами и контрольная плоскость).\n - Метод `_register_core_services`: Регистрация основных сервисов внутри runtime менеджера.\n \nЭтот класс является точкой входа и основным управляющим элементом при запуске и управлении приложением, обеспечивая интеграцию различных компонентов и сервисов.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "unknown", + "symbol_candidates": [], + "keyword_hints": [], + "path_hints": [ + "src/app_runtime/core/runtime.py" + ], + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/app_runtime/core/runtime.py" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": false, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C0_SOURCE_CHUNKS": 200 + }, + "filters_by_layer": { + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "include_globs": [], + "exclude_globs": [], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Открой файл src/app_runtime/core/runtime.py", + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "include_globs": [], + "exclude_globs": [], + "prefer_globs": [], + "top_k": 200, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "normalized_include_globs": [], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [] + }, + "layers": [ + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 1, + "symbol_resolution": 0, + "retrieval_total": 122, + "retrieval_by_layer": { + "C0_SOURCE_CHUNKS": 122 + }, + "merge_rank": 0, + "prompt_build": 0, + "llm_call": 1482 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 555, + "evidence_rows": 1, + "evidence_chars": 6265 + }, + "evidence_summary": [ + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_open_file_ru_v1", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [], + "path_scope": [ + "src/app_runtime/core/runtime.py" + ] + }, + "llm": { + "used_evidence_count": 1, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-fullchain-open-file-runtime", + "mode": "full_chain", + "run_started_at": "2026-03-12T12:08:55", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Открой файл src/app_runtime/core/runtime.py", + "normalized_query": "Открой файл src/app_runtime/core/runtime.py" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Открой файл src/app_runtime/core/runtime.py" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Открой файл src/app_runtime/core/runtime.py" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "unknown", + "symbol_candidates": [], + "keyword_hints": [], + "path_hints": [ + "src/app_runtime/core/runtime.py" + ], + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/app_runtime/core/runtime.py" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": false, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 1 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Открой файл src/app_runtime/core/runtime.py" + }, + "output": { + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [], + "confidence": 0.0 + }, + "rag_count": 1, + "rag_rows": [ + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C0_SOURCE_CHUNKS": 200 + }, + "filters_by_layer": { + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "include_globs": [], + "exclude_globs": [], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Открой файл src/app_runtime/core/runtime.py", + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "include_globs": [], + "exclude_globs": [], + "prefer_globs": [], + "top_k": 200, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "normalized_include_globs": [], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [] + }, + "layers": [ + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 122, + "retrieval_by_layer": { + "C0_SOURCE_CHUNKS": 122 + }, + "merge_rank": 0 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Открой файл src/app_runtime/core/runtime.py", + "rag_count": 1 + }, + "output": { + "llm_answer": "Файл `src/app_runtime/core/runtime.py` содержит определение класса `RuntimeManager`, являющегося ключевым компонентом системы управления выполнением приложений.\n\n## Важные сущности и их значение:\n\n- **Класс `RuntimeManager`:** Основной управляющий класс, инициализирующий различные сервисы и модули приложения.\n - Переменные класса:\n - `ACTION_TIMEOUT_SECONDS` и `ACTION_POLL_INTERVAL_SECONDS`: настройки тайм-аутов и интервалов опроса действий.\n - Метод `__init__`: Конструктор класса, принимающий различные компоненты инфраструктуры (конфигурации, службы, трассировки, здоровье, логирование, управление рабочими процессами и контрольная плоскость).\n - Метод `_register_core_services`: Регистрация основных сервисов внутри runtime менеджера.\n \nЭтот класс является точкой входа и основным управляющим элементом при запуске и управлении приложением, обеспечивая интеграцию различных компонентов и сервисов." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 555, + "evidence_rows": 1, + "evidence_chars": 6265 + }, + "evidence_summary": [ + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_open_file_ru_v1", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 1482 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_120855/full_chain_plba_code_subintents_plba-fullchain-open-file-runtime.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_120855/full_chain_plba_code_subintents_plba-fullchain-open-file-runtime.md new file mode 100644 index 0000000..b6be060 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_120855/full_chain_plba_code_subintents_plba-fullchain-open-file-runtime.md @@ -0,0 +1,30 @@ +# plba-fullchain-open-file-runtime + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Открой файл src/app_runtime/core/runtime.py + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 1, + "llm_answer": "Файл `src/app_runtime/core/runtime.py` содержит определение класса `RuntimeManager`, являющегося ключевым компонентом системы управления выполнением приложений.\n\n## Важные сущности и их значение:\n\n- **Класс `RuntimeManager`:** Основной управляющий класс, инициализирующий различные сервисы и модули приложения.\n - Переменные класса:\n - `ACTION_TIMEOUT_SECONDS` и `ACTION_POLL_INTERVAL_SECONDS`: настройки тайм-аутов и интервалов опроса действий.\n - Метод `__init__`: Конструктор класса, принимающий различные компоненты инфраструктуры (конфигурации, службы, трассировки, здоровье, логирование, управление рабочими процессами и контрольная плоскость).\n - Метод `_register_core_services`: Регистрация основных сервисов внутри runtime менеджера.\n \nЭтот класс является точкой входа и основным управляющим элементом при запуске и управлении приложением, обеспечивая интеграцию различных компонентов и сервисов.", + "answer_mode": "answered", + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "symbol_candidates": [], + "layers": [ + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_120855/full_chain_plba_code_subintents_plba-fullchain-trace-flow-runtime-manager.json b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_120855/full_chain_plba_code_subintents_plba-fullchain-trace-flow-runtime-manager.json new file mode 100644 index 0000000..05d2215 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_120855/full_chain_plba_code_subintents_plba-fullchain-trace-flow-runtime-manager.json @@ -0,0 +1,2964 @@ +{ + "case_id": "plba-fullchain-trace-flow-runtime-manager", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "TRACE_FLOW", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 23, + "llm_answer": "## Шаг 1: Инициализация RuntimeManager\n\n### Начало потока данных и выполнения:\nПроцесс начинается с вызова конструктора класса `RuntimeManager` (`__init__`), который является точкой входа для инициализации объекта менеджера времени выполнения.\n\n**Источник:** \n[C3_ENTRYPOINTS]: src/app_runtime/control/http_app.py | app.post \n[C2_DEPENDENCY_GRAPH]: src/app_runtime/core/runtime.py | RuntimeManager.__init__:dataflow_slice\n\n## Шаг 2: Передача параметров конструктору\n\nПри вызове конструктора передаются параметры конфигурации, сервисов, трассировки, здоровья, логирования, рабочих процессов и плоскости управления. Эти параметры используются для настройки нового экземпляра менеджера времени выполнения.\n\n**Обработка параметров:** \n[C0_SOURCE_CHUNKS]: src/app_runtime/core/runtime.py \n```python\ndef __init__(self, \n configuration: ConfigurationManager | None = None, \n services: ServiceContainer | None = None, \n traces: TraceService | None = None, \n health: HealthRegistry | None = None, \n logs: LogManager | None = None, \n workers: WorkerSupervisor | None = None, \n control_plane: ControlPlaneService | None = None):\n```\n\nПараметры могут быть переданы явно пользователем или приняты по умолчанию через соответствующие классы-конструкторы.\n\n## Шаг 3: Настройка внутренних атрибутов RuntimeManager\n\nПосле передачи параметров выполняется настройка внутренних атрибутов объекта `RuntimeManager`. В частности, создаются следующие внутренние компоненты:\n\n- `configuration`: объект для управления конфигурацией приложения.\n- `services`: контейнер для хранения различных сервисов, необходимых приложению.\n- `traces`: сервис для ведения журнала событий.\n- `health`: реестр состояния здоровья системы.\n- `logs`: менеджер логирования.\n- `workers`: супервизор рабочих процессов.\n- `control_plane`: плоскость управления, обеспечивающая связь с внешним миром.\n\nЭти компоненты играют важную роль в дальнейшей работе менеджера времени выполнения.\n\n**Настройки атрибутов:** \n[C0_SOURCE_CHUNKS]: src/app_runtime/core/runtime.py \n```python\nself.configuration = configuration or ConfigurationManager()\nself.services = services or ServiceContainer()\nself.traces = traces or TraceService()\nself.health = health or HealthRegistry()\nself.logs = logs or LogManager()\nself.workers = workers or WorkerSupervisor()\nself.control_plane = control_plane or ControlPlaneService()\n```\n\n## Шаг 4: Регистрация модулей\n\nДалее происходит регистрация модулей с использованием внутреннего реестра `registry`, что позволяет системе распознавать доступные модули и обеспечивать их корректную работу.\n\n**Регистрация модулей:** \n[C0_SOURCE_CHUNKS]: src/app_runtime/core/runtime.py \n```python\nself.registry = ModuleRegistry(self.services)\n```\n\n## Заключение\n\nТаким образом, процесс инициализации и настройки объекта `RuntimeManager` завершается созданием и настройкой всех необходимых компонентов и регистрацией доступных модулей. После этого экземпляр `RuntimeManager` готов к дальнейшему использованию и управлению временем выполнения приложения.\n\n---\n\n### Поток данных и выполнения кратко:\n1. Вызов конструктора `RuntimeManager`.\n2. Передача параметров.\n3. Настройка внутренних атрибутов и компонентов.\n4. Регистрация модулей.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-fullchain-trace-flow-runtime-manager", + "text": "Покажи поток выполнения RuntimeManager", + "mode": "full_chain", + "run_started_at": "2026-03-12T12:08:55", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Покажи поток выполнения RuntimeManager", + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ], + "confidence": 0.99 + }, + "rag_count": 23, + "rag_rows": [ + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager\nRuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "qname": "RuntimeManager", + "kind": "class", + "signature": "RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests manager\n- orchestrates role-like calls (4)\n- reads and writes state attributes\n- participates in dataflow slices (50)", + "layer": "C4_SEMANTIC_ROLES", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 43, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "symbol_name": "RuntimeManager", + "qname": "RuntimeManager", + "role": "pipeline_stage", + "confidence": 0.67, + "dataflow_participation": 50, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 52, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.services\n -> RuntimeManager.__init__", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 33, + "span_end": 39, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d43af85989222ee6d788ce418cdcb217c7ff044cfb915e3bdbd184417dc7bd61", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "dst_ref": "RuntimeManager.__init__", + "resolution": "resolved", + "slice_id": "d43af85989222ee6d788ce418cdcb217c7ff044cfb915e3bdbd184417dc7bd61", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.services", + "RuntimeManager.__init__" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 59, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1", + "dst_ref": "RuntimeManager.start", + "resolution": "resolved", + "slice_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.start" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager._register_core_services", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 127, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6", + "dst_ref": "RuntimeManager._register_core_services", + "resolution": "resolved", + "slice_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager._register_core_services" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.services\n -> RuntimeManager._register_core_services", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 33, + "span_end": 127, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "aac6f9dda73963b977083a892bee39a48eca4fbd7404787e022ecf4ebedec65d", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6", + "dst_ref": "RuntimeManager._register_core_services", + "resolution": "resolved", + "slice_id": "aac6f9dda73963b977083a892bee39a48eca4fbd7404787e022ecf4ebedec65d", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.services", + "RuntimeManager._register_core_services" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "## Шаг 1: Инициализация RuntimeManager\n\n### Начало потока данных и выполнения:\nПроцесс начинается с вызова конструктора класса `RuntimeManager` (`__init__`), который является точкой входа для инициализации объекта менеджера времени выполнения.\n\n**Источник:** \n[C3_ENTRYPOINTS]: src/app_runtime/control/http_app.py | app.post \n[C2_DEPENDENCY_GRAPH]: src/app_runtime/core/runtime.py | RuntimeManager.__init__:dataflow_slice\n\n## Шаг 2: Передача параметров конструктору\n\nПри вызове конструктора передаются параметры конфигурации, сервисов, трассировки, здоровья, логирования, рабочих процессов и плоскости управления. Эти параметры используются для настройки нового экземпляра менеджера времени выполнения.\n\n**Обработка параметров:** \n[C0_SOURCE_CHUNKS]: src/app_runtime/core/runtime.py \n```python\ndef __init__(self, \n configuration: ConfigurationManager | None = None, \n services: ServiceContainer | None = None, \n traces: TraceService | None = None, \n health: HealthRegistry | None = None, \n logs: LogManager | None = None, \n workers: WorkerSupervisor | None = None, \n control_plane: ControlPlaneService | None = None):\n```\n\nПараметры могут быть переданы явно пользователем или приняты по умолчанию через соответствующие классы-конструкторы.\n\n## Шаг 3: Настройка внутренних атрибутов RuntimeManager\n\nПосле передачи параметров выполняется настройка внутренних атрибутов объекта `RuntimeManager`. В частности, создаются следующие внутренние компоненты:\n\n- `configuration`: объект для управления конфигурацией приложения.\n- `services`: контейнер для хранения различных сервисов, необходимых приложению.\n- `traces`: сервис для ведения журнала событий.\n- `health`: реестр состояния здоровья системы.\n- `logs`: менеджер логирования.\n- `workers`: супервизор рабочих процессов.\n- `control_plane`: плоскость управления, обеспечивающая связь с внешним миром.\n\nЭти компоненты играют важную роль в дальнейшей работе менеджера времени выполнения.\n\n**Настройки атрибутов:** \n[C0_SOURCE_CHUNKS]: src/app_runtime/core/runtime.py \n```python\nself.configuration = configuration or ConfigurationManager()\nself.services = services or ServiceContainer()\nself.traces = traces or TraceService()\nself.health = health or HealthRegistry()\nself.logs = logs or LogManager()\nself.workers = workers or WorkerSupervisor()\nself.control_plane = control_plane or ControlPlaneService()\n```\n\n## Шаг 4: Регистрация модулей\n\nДалее происходит регистрация модулей с использованием внутреннего реестра `registry`, что позволяет системе распознавать доступные модули и обеспечивать их корректную работу.\n\n**Регистрация модулей:** \n[C0_SOURCE_CHUNKS]: src/app_runtime/core/runtime.py \n```python\nself.registry = ModuleRegistry(self.services)\n```\n\n## Заключение\n\nТаким образом, процесс инициализации и настройки объекта `RuntimeManager` завершается созданием и настройкой всех необходимых компонентов и регистрацией доступных модулей. После этого экземпляр `RuntimeManager` готов к дальнейшему использованию и управлению временем выполнения приложения.\n\n---\n\n### Поток данных и выполнения кратко:\n1. Вызов конструктора `RuntimeManager`.\n2. Передача параметров.\n3. Настройка внутренних атрибутов и компонентов.\n4. Регистрация модулей.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "TRACE_FLOW", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS", + "C4_SEMANTIC_ROLES" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "TRACE_FLOW", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 10, + "C3_ENTRYPOINTS": 10 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Покажи поток выполнения RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "Покажи поток выполнения RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Покажи поток выполнения RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 10, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "Покажи поток выполнения RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 10, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 10, + "candidates_after_filter": 10 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 8, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 10, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 1, + "symbol_resolution": 0, + "retrieval_total": 179, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 59, + "C0_SOURCE_CHUNKS": 27, + "C4_SEMANTIC_ROLES": 21, + "C2_DEPENDENCY_GRAPH": 59, + "C3_ENTRYPOINTS": 11 + }, + "merge_rank": 21, + "prompt_build": 0, + "llm_call": 4768 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 766, + "evidence_rows": 23, + "evidence_chars": 8302 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 8, + "unique_paths": 7 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 10, + "unique_paths": 2 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_trace_flow_ru_v1", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "RuntimeManager" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 23, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-fullchain-trace-flow-runtime-manager", + "mode": "full_chain", + "run_started_at": "2026-03-12T12:08:55", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Покажи поток выполнения RuntimeManager", + "normalized_query": "Покажи поток выполнения RuntimeManager" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Покажи поток выполнения RuntimeManager" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Покажи поток выполнения RuntimeManager" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "TRACE_FLOW", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 1 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Покажи поток выполнения RuntimeManager" + }, + "output": { + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ], + "confidence": 0.99 + }, + "rag_count": 23, + "rag_rows": [ + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager\nRuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "qname": "RuntimeManager", + "kind": "class", + "signature": "RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests manager\n- orchestrates role-like calls (4)\n- reads and writes state attributes\n- participates in dataflow slices (50)", + "layer": "C4_SEMANTIC_ROLES", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 43, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "symbol_name": "RuntimeManager", + "qname": "RuntimeManager", + "role": "pipeline_stage", + "confidence": 0.67, + "dataflow_participation": 50, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 52, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.services\n -> RuntimeManager.__init__", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 33, + "span_end": 39, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d43af85989222ee6d788ce418cdcb217c7ff044cfb915e3bdbd184417dc7bd61", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "dst_ref": "RuntimeManager.__init__", + "resolution": "resolved", + "slice_id": "d43af85989222ee6d788ce418cdcb217c7ff044cfb915e3bdbd184417dc7bd61", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.services", + "RuntimeManager.__init__" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 59, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1", + "dst_ref": "RuntimeManager.start", + "resolution": "resolved", + "slice_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.start" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager._register_core_services", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 127, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6", + "dst_ref": "RuntimeManager._register_core_services", + "resolution": "resolved", + "slice_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager._register_core_services" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.services\n -> RuntimeManager._register_core_services", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 33, + "span_end": 127, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "aac6f9dda73963b977083a892bee39a48eca4fbd7404787e022ecf4ebedec65d", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6", + "dst_ref": "RuntimeManager._register_core_services", + "resolution": "resolved", + "slice_id": "aac6f9dda73963b977083a892bee39a48eca4fbd7404787e022ecf4ebedec65d", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.services", + "RuntimeManager._register_core_services" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 10, + "C3_ENTRYPOINTS": 10 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Покажи поток выполнения RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "Покажи поток выполнения RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Покажи поток выполнения RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 10, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "Покажи поток выполнения RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 10, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 10, + "candidates_after_filter": 10 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 8, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 10, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 179, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 59, + "C0_SOURCE_CHUNKS": 27, + "C4_SEMANTIC_ROLES": 21, + "C2_DEPENDENCY_GRAPH": 59, + "C3_ENTRYPOINTS": 11 + }, + "merge_rank": 21 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Покажи поток выполнения RuntimeManager", + "rag_count": 23 + }, + "output": { + "llm_answer": "## Шаг 1: Инициализация RuntimeManager\n\n### Начало потока данных и выполнения:\nПроцесс начинается с вызова конструктора класса `RuntimeManager` (`__init__`), который является точкой входа для инициализации объекта менеджера времени выполнения.\n\n**Источник:** \n[C3_ENTRYPOINTS]: src/app_runtime/control/http_app.py | app.post \n[C2_DEPENDENCY_GRAPH]: src/app_runtime/core/runtime.py | RuntimeManager.__init__:dataflow_slice\n\n## Шаг 2: Передача параметров конструктору\n\nПри вызове конструктора передаются параметры конфигурации, сервисов, трассировки, здоровья, логирования, рабочих процессов и плоскости управления. Эти параметры используются для настройки нового экземпляра менеджера времени выполнения.\n\n**Обработка параметров:** \n[C0_SOURCE_CHUNKS]: src/app_runtime/core/runtime.py \n```python\ndef __init__(self, \n configuration: ConfigurationManager | None = None, \n services: ServiceContainer | None = None, \n traces: TraceService | None = None, \n health: HealthRegistry | None = None, \n logs: LogManager | None = None, \n workers: WorkerSupervisor | None = None, \n control_plane: ControlPlaneService | None = None):\n```\n\nПараметры могут быть переданы явно пользователем или приняты по умолчанию через соответствующие классы-конструкторы.\n\n## Шаг 3: Настройка внутренних атрибутов RuntimeManager\n\nПосле передачи параметров выполняется настройка внутренних атрибутов объекта `RuntimeManager`. В частности, создаются следующие внутренние компоненты:\n\n- `configuration`: объект для управления конфигурацией приложения.\n- `services`: контейнер для хранения различных сервисов, необходимых приложению.\n- `traces`: сервис для ведения журнала событий.\n- `health`: реестр состояния здоровья системы.\n- `logs`: менеджер логирования.\n- `workers`: супервизор рабочих процессов.\n- `control_plane`: плоскость управления, обеспечивающая связь с внешним миром.\n\nЭти компоненты играют важную роль в дальнейшей работе менеджера времени выполнения.\n\n**Настройки атрибутов:** \n[C0_SOURCE_CHUNKS]: src/app_runtime/core/runtime.py \n```python\nself.configuration = configuration or ConfigurationManager()\nself.services = services or ServiceContainer()\nself.traces = traces or TraceService()\nself.health = health or HealthRegistry()\nself.logs = logs or LogManager()\nself.workers = workers or WorkerSupervisor()\nself.control_plane = control_plane or ControlPlaneService()\n```\n\n## Шаг 4: Регистрация модулей\n\nДалее происходит регистрация модулей с использованием внутреннего реестра `registry`, что позволяет системе распознавать доступные модули и обеспечивать их корректную работу.\n\n**Регистрация модулей:** \n[C0_SOURCE_CHUNKS]: src/app_runtime/core/runtime.py \n```python\nself.registry = ModuleRegistry(self.services)\n```\n\n## Заключение\n\nТаким образом, процесс инициализации и настройки объекта `RuntimeManager` завершается созданием и настройкой всех необходимых компонентов и регистрацией доступных модулей. После этого экземпляр `RuntimeManager` готов к дальнейшему использованию и управлению временем выполнения приложения.\n\n---\n\n### Поток данных и выполнения кратко:\n1. Вызов конструктора `RuntimeManager`.\n2. Передача параметров.\n3. Настройка внутренних атрибутов и компонентов.\n4. Регистрация модулей." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 766, + "evidence_rows": 23, + "evidence_chars": 8302 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 8, + "unique_paths": 7 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 10, + "unique_paths": 2 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_trace_flow_ru_v1", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 4768 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_120855/full_chain_plba_code_subintents_plba-fullchain-trace-flow-runtime-manager.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_120855/full_chain_plba_code_subintents_plba-fullchain-trace-flow-runtime-manager.md new file mode 100644 index 0000000..2444250 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_120855/full_chain_plba_code_subintents_plba-fullchain-trace-flow-runtime-manager.md @@ -0,0 +1,34 @@ +# plba-fullchain-trace-flow-runtime-manager + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Покажи поток выполнения RuntimeManager + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "TRACE_FLOW", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 23, + "llm_answer": "## Шаг 1: Инициализация RuntimeManager\n\n### Начало потока данных и выполнения:\nПроцесс начинается с вызова конструктора класса `RuntimeManager` (`__init__`), который является точкой входа для инициализации объекта менеджера времени выполнения.\n\n**Источник:** \n[C3_ENTRYPOINTS]: src/app_runtime/control/http_app.py | app.post \n[C2_DEPENDENCY_GRAPH]: src/app_runtime/core/runtime.py | RuntimeManager.__init__:dataflow_slice\n\n## Шаг 2: Передача параметров конструктору\n\nПри вызове конструктора передаются параметры конфигурации, сервисов, трассировки, здоровья, логирования, рабочих процессов и плоскости управления. Эти параметры используются для настройки нового экземпляра менеджера времени выполнения.\n\n**Обработка параметров:** \n[C0_SOURCE_CHUNKS]: src/app_runtime/core/runtime.py \n```python\ndef __init__(self, \n configuration: ConfigurationManager | None = None, \n services: ServiceContainer | None = None, \n traces: TraceService | None = None, \n health: HealthRegistry | None = None, \n logs: LogManager | None = None, \n workers: WorkerSupervisor | None = None, \n control_plane: ControlPlaneService | None = None):\n```\n\nПараметры могут быть переданы явно пользователем или приняты по умолчанию через соответствующие классы-конструкторы.\n\n## Шаг 3: Настройка внутренних атрибутов RuntimeManager\n\nПосле передачи параметров выполняется настройка внутренних атрибутов объекта `RuntimeManager`. В частности, создаются следующие внутренние компоненты:\n\n- `configuration`: объект для управления конфигурацией приложения.\n- `services`: контейнер для хранения различных сервисов, необходимых приложению.\n- `traces`: сервис для ведения журнала событий.\n- `health`: реестр состояния здоровья системы.\n- `logs`: менеджер логирования.\n- `workers`: супервизор рабочих процессов.\n- `control_plane`: плоскость управления, обеспечивающая связь с внешним миром.\n\nЭти компоненты играют важную роль в дальнейшей работе менеджера времени выполнения.\n\n**Настройки атрибутов:** \n[C0_SOURCE_CHUNKS]: src/app_runtime/core/runtime.py \n```python\nself.configuration = configuration or ConfigurationManager()\nself.services = services or ServiceContainer()\nself.traces = traces or TraceService()\nself.health = health or HealthRegistry()\nself.logs = logs or LogManager()\nself.workers = workers or WorkerSupervisor()\nself.control_plane = control_plane or ControlPlaneService()\n```\n\n## Шаг 4: Регистрация модулей\n\nДалее происходит регистрация модулей с использованием внутреннего реестра `registry`, что позволяет системе распознавать доступные модули и обеспечивать их корректную работу.\n\n**Регистрация модулей:** \n[C0_SOURCE_CHUNKS]: src/app_runtime/core/runtime.py \n```python\nself.registry = ModuleRegistry(self.services)\n```\n\n## Заключение\n\nТаким образом, процесс инициализации и настройки объекта `RuntimeManager` завершается созданием и настройкой всех необходимых компонентов и регистрацией доступных модулей. После этого экземпляр `RuntimeManager` готов к дальнейшему использованию и управлению временем выполнения приложения.\n\n---\n\n### Поток данных и выполнения кратко:\n1. Вызов конструктора `RuntimeManager`.\n2. Передача параметров.\n3. Настройка внутренних атрибутов и компонентов.\n4. Регистрация модулей.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_120855/summary.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_120855/summary.md new file mode 100644 index 0000000..509e84d --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_120855/summary.md @@ -0,0 +1,36 @@ +# pipeline_setup_v2 summary + +Passed: 7/7 + +| File | Case | Query | Expected sub-intent | Intent | Actual sub-intent | RAG layers | Pass | +|------|------|-------|---------------------|--------|-------------------|------------|------| +| full_chain_plba_code_subintents.yaml | plba-fullchain-open-file-runtime | Открой файл src/app_runtime/core/runtime.py | OPEN_FILE | CODE_QA | OPEN_FILE | C0_SOURCE_CHUNKS:1 | ✓ | +| full_chain_plba_code_subintents.yaml | plba-fullchain-explain-runtime-manager | Объясни как работает класс RuntimeManager | EXPLAIN | CODE_QA | EXPLAIN | C0_SOURCE_CHUNKS:1, C1_SYMBOL_CATALOG:1, C2_DEPENDENCY_GRAPH:6, C3_ENTRYPOINTS:3, C4_SEMANTIC_ROLES:1 | ✓ | +| full_chain_plba_code_subintents.yaml | plba-fullchain-find-tests-runtime-manager | Где тесты для RuntimeManager? | FIND_TESTS | CODE_QA | FIND_TESTS | C0_SOURCE_CHUNKS:10, C2_DEPENDENCY_GRAPH:6 | ✓ | +| full_chain_plba_code_subintents.yaml | plba-fullchain-find-entrypoints | Найди точки входа в коде | FIND_ENTRYPOINTS | CODE_QA | FIND_ENTRYPOINTS | C0_SOURCE_CHUNKS:6, C3_ENTRYPOINTS:3 | ✓ | +| full_chain_plba_code_subintents.yaml | plba-fullchain-trace-flow-runtime-manager | Покажи поток выполнения RuntimeManager | TRACE_FLOW | CODE_QA | TRACE_FLOW | C0_SOURCE_CHUNKS:1, C1_SYMBOL_CATALOG:1, C2_DEPENDENCY_GRAPH:10, C3_ENTRYPOINTS:3, C4_SEMANTIC_ROLES:8 | ✓ | +| full_chain_plba_code_subintents.yaml | plba-fullchain-architecture-control-plane | Какие компоненты участвуют в RuntimeManager? | ARCHITECTURE | CODE_QA | ARCHITECTURE | C0_SOURCE_CHUNKS:1, C1_SYMBOL_CATALOG:1, C2_DEPENDENCY_GRAPH:8, C3_ENTRYPOINTS:3, C4_SEMANTIC_ROLES:12 | ✓ | +| full_chain_plba_code_subintents.yaml | plba-fullchain-explain-local-runtime-manager | Почему в файле src/app_runtime/core/runtime.py класс RuntimeManager устроен так? | EXPLAIN_LOCAL | CODE_QA | EXPLAIN_LOCAL | C0_SOURCE_CHUNKS:1, C1_SYMBOL_CATALOG:1, C2_DEPENDENCY_GRAPH:4 | ✓ | + +## LLM Answers +- **plba-fullchain-open-file-runtime** + Query: Открой файл src/app_runtime/core/runtime.py + > Файл \`src/app\_runtime/core/runtime.py\` содержит определение класса \`RuntimeManager\`, являющегося ключевым компонентом системы управления выполнением приложений. \#\# Важные сущности и их значение: \- \*\*Класс \`RuntimeManager\`:\*\* Основной управляющий класс, инициализирующий различные сервисы и модули приложения. \- Переменные класса: \- \`ACTION\_TIMEOUT\_SECONDS\` и \`ACTION\_POLL\_INTERVAL\_SECONDS\`: настройки тайм\-аутов и интервалов опроса действий. \- Метод \`\_\_init\_\_\`: Конструктор класса, принимающий различные компоненты инфраструктуры \(конфигурации, службы, трассировки, здоровье, логирование, управление рабочими процессами и контрольная плоскость\). \- Метод \`\_register\_core\_services\`: Регистрация основных сервисов внутри runtime менеджера. Этот класс является точкой входа и основным управляющим элементом при запуске и управлении приложением, обеспечивая интеграцию различных компо… +- **plba-fullchain-explain-runtime-manager** + Query: Объясни как работает класс RuntimeManager + > \#\# Назначение класса \`RuntimeManager\` Класс \`RuntimeManager\` является ключевым компонентом системы управления жизненным циклом приложения. Он отвечает за координацию работы различных модулей и сервисов приложения, обеспечивая централизованное управление состоянием и конфигурацией всех компонентов. Этот компонент выступает в качестве управляющего слоя, обеспечивающего синхронизацию и интеграцию различных частей архитектуры. \#\# Ключевые зависимости Ключевыми зависимостями являются следующие компоненты: \- \*\*ConfigurationManager\*\*: Менеджер конфигурации для настройки параметров приложения. \- \*\*ServiceContainer\*\*: Контейнер служб, содержащий различные сервисы и модули приложения. \- \*\*TraceService\*\*: Сервис трассировки, предназначенный для отслеживания выполнения действий и операций внутри приложения. \- \*\*HealthRegistry\*\*: Реестр состояния здоровья приложения, позволяющий… +- **plba-fullchain-find-tests-runtime-manager** + Query: Где тесты для RuntimeManager? + > Прямые тесты для \`RuntimeManager\` найдены в следующих местах: 1. \*\*tests/test\_runtime.py\*\*: \- \`test\_runtime\_graceful\_stop\_waits\_until\_worker\_finishes\`: Проверяет корректность остановки \(\`stop\`\) объекта \`RuntimeManager\`, ожидание завершения работающего модуля и корректное изменение статуса на «остановлен» после вызова метода \`stop\`. \- \`test\_runtime\_runs\_worker\_routine\_and\_exposes\_status\`: Тестирует запуск рутины модуля, регистрацию модуля и получение статусной информации от менеджера выполнения. Эти тесты напрямую создают объект \`RuntimeManager\`, регистрируют модули и выполняют различные операции с ним \(запуск, остановка, проверка состояния\). Тесты находятся в слое зависимости \(\`C2\_DEPENDENCY\_GRAPH\`\), а также имеют соответствующие реализации в исходном коде \(\`C0\_SOURCE\_CHUNKS\`\). Общий вывод: \- Прямые тесты для \`RuntimeManager\` существуют и расположены в файле \`tests/t… +- **plba-fullchain-find-entrypoints** + Query: Найди точки входа в коде + > \#\# Финальный ответ: На основании предоставленного контекста RAG, были найдены следующие \*\*точки входа\*\* \(entrypoints\) и их роли в приложении: \#\#\# 1. \`src/app\_runtime/control/http\_app.py\` \*\*app.post\*\*: \*Файл:\* \`http\_app.py\`, \*сущность:\* FastAPI приложение \(\`app\`\), метод:\`post\`. \*Роль:\* Обрабатывает HTTP POST\-запросы. \#\#\# 2. \`src/app\_runtime/control/http\_app.py\` \*\*app.get\*\*: \*Файл:\* \`http\_app.py\`, \*сущность:\* FastAPI приложение \(\`app\`\), метод:\`get\`. \*Роль:\* Обрабатывает HTTP GET\-запросы. Эти две точки являются основными точками входа для обработки HTTP запросов в приложении с использованием фреймворка FastAPI. \-\-\- Остальные фрагменты информации касаются следующих аспектов приложения: \- \`src/app\_runtime/workflow/contracts/result.py\`: содержит класс \`StepResult\`, связанный с результатом выполнения шагов процесса \(успешное завершение, статус\). \- \`src/app\_runtime/config/\_\_… +- **plba-fullchain-trace-flow-runtime-manager** + Query: Покажи поток выполнения RuntimeManager + > \#\# Шаг 1: Инициализация RuntimeManager \#\#\# Начало потока данных и выполнения: Процесс начинается с вызова конструктора класса \`RuntimeManager\` \(\`\_\_init\_\_\`\), который является точкой входа для инициализации объекта менеджера времени выполнения. \*\*Источник:\*\* \[C3\_ENTRYPOINTS\]: src/app\_runtime/control/http\_app.py \| app.post \[C2\_DEPENDENCY\_GRAPH\]: src/app\_runtime/core/runtime.py \| RuntimeManager.\_\_init\_\_:dataflow\_slice \#\# Шаг 2: Передача параметров конструктору При вызове конструктора передаются параметры конфигурации, сервисов, трассировки, здоровья, логирования, рабочих процессов и плоскости управления. Эти параметры используются для настройки нового экземпляра менеджера времени выполнения. \*\*Обработка параметров:\*\* \[C0\_SOURCE\_CHUNKS\]: src/app\_runtime/core/runtime.py \`\`\`python def \_\_init\_\_\(self, configuration: ConfigurationManager \| None = None, services: ServiceContain… +- **plba-fullchain-architecture-control-plane** + Query: Какие компоненты участвуют в RuntimeManager? + > \#\# Архитектурное объяснение подсистемы RuntimeManager \#\#\# Основные компоненты и их роли 1. \*\*RuntimeManager\*\* \- Роль: Pipeline stage \(этап конвейера\) \- Описание: Менеджер, координирующий роль\-подобные вызовы, чтение и запись состояния атрибутов, участие в данных срезах потока выполнения. 2. \*\*ControlActionSet\*\* \- Роль: Модель \- Описание: Представляет собой модель поведения системы управления действиями. \#\#\# Связи и границы ответственности 1. \*\*Связь с HTTP приложением \(app.post\)\*\* \- Контроллер HTTP приложения инициирует выполнение контроллеров управления через метод \`app.post\`. 2. \*\*Связь с ControlPlaneService\*\* \- Инициализация сервиса \(\`ControlPlaneService.\_\_init\_\_\`\) запускает каналы передачи данных и асинхронную обработку \(\`\_start\_async\`\). 3. \*\*Связь с RuntimeManager\*\* \- Инициализация менеджера \(\`RuntimeManager.\_\_init\_\_\`\) устанавливает конфигурацию и запускает осно… +- **plba-fullchain-explain-local-runtime-manager** + Query: Почему в файле src/app_runtime/core/runtime.py класс RuntimeManager устроен так? + > Класс \`RuntimeManager\` в файле \`src/app\_runtime/core/runtime.py\` предназначен для управления жизненным циклом приложения и координации различных компонентов системы. \#\#\# Что делает класс \`RuntimeManager\`? Этот класс инициализирует и запускает основные компоненты приложения, такие как конфигурация \(\`configuration\`\), сервисы \(\`services\`\), мониторинг состояния \(\`health\`\), логирование \(\`logs\`\), управление рабочими процессами \(\`workers\`\) и контрольную плоскость \(\`control\_plane\`\). \#\#\# Входные параметры конструктора класса: \- \`configuration\`: Менеджер конфигурации \(по умолчанию используется экземпляр \`ConfigurationManager\(\)\`\). \- \`services\`: Контейнер сервисов \(по умолчанию – \`ServiceContainer\(\)\`\). \- \`traces\`: Сервис трассировки \(по умолчанию – \`TraceService\(\)\`\). \- \`health\`: Реестр здоровья \(по умолчанию – \`HealthRegistry\(\)\`\). \- \`logs\`: Менеджер логирования \(по умолчанию – \`… \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_123945/full_chain_plba_code_subintents_plba-fullchain-architecture-control-plane.json b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_123945/full_chain_plba_code_subintents_plba-fullchain-architecture-control-plane.json new file mode 100644 index 0000000..c13104e --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_123945/full_chain_plba_code_subintents_plba-fullchain-architecture-control-plane.json @@ -0,0 +1,3036 @@ +{ + "case_id": "plba-fullchain-architecture-control-plane", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "ARCHITECTURE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 25, + "llm_answer": "1. **Компоненты, которые подтверждены контекстом**:\n - RuntimeManager\n - ControlActionSet\n - ControlPlaneService\n \n2. **Подтверждённые связи между ними**:\n - RuntimeManager вызывает метод `start` для инициализации.\n - ControlPlaneService инициализирует каналы данных через метод `_channels`.\n - ControlPlaneService запускает асинхронную обработку через метод `_start_async`.\n\n3. **Границы ответственности, если они реально видны в коде**:\n - RuntimeManager отвечает за управление жизненным циклом системы, включая чтение и запись состояния атрибутов.\n - ControlActionSet выполняет роль модели и предоставляет базовые функции поведения.\n - ControlPlaneService управляет сервисами канала данных и их асинхронной обработкой.\n\n4. **Что остаётся неизвестным или неполным**:\n - Детали реализации взаимодействия между ControlActionSet и RuntimeManager остаются неясными.\n - Полная структура данных потока и зависимость компонентов от внешних сервисов не раскрыты.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-fullchain-architecture-control-plane", + "text": "Какие компоненты участвуют в RuntimeManager?", + "mode": "full_chain", + "run_started_at": "2026-03-12T12:39:45", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Какие компоненты участвуют в RuntimeManager?", + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ], + "confidence": 0.99 + }, + "rag_count": 25, + "rag_rows": [ + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests manager\n- orchestrates role-like calls (4)\n- reads and writes state attributes\n- participates in dataflow slices (50)", + "layer": "C4_SEMANTIC_ROLES", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 43, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "symbol_name": "RuntimeManager", + "qname": "RuntimeManager", + "role": "pipeline_stage", + "confidence": 0.67, + "dataflow_participation": 50, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/queue/in_memory.py", + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)", + "layer": "C4_SEMANTIC_ROLES", + "title": "InMemoryTaskQueue", + "span_start": 9, + "span_end": 38, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 22, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "2da04cb94544a3bcbf0943a95ad4bdd8710bcafaa32a02fd0e4de2178dcf3533", + "symbol_name": "InMemoryTaskQueue", + "qname": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 9, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "58f0cc001ccda0eee4c6bc32ed83bd05eafd6b6644f1e8b4aa9eed3103db73dc", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "ConfigFileLoader\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (8)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ConfigFileLoader", + "span_start": 11, + "span_end": 48, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 23, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "a8474eca8b6e9dc86ae67ed68b16fa5fb639ef08739c053e7b7195489765667f", + "symbol_name": "ConfigFileLoader", + "qname": "ConfigFileLoader", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 8, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/store.py", + "content": "TraceContextStore\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "TraceContextStore", + "span_start": 15, + "span_end": 52, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b2dad4fbe16ffb11b58deba311c7739955c39d59f291b22181f33e9c8cce4059", + "symbol_name": "TraceContextStore", + "qname": "TraceContextStore", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "d369554f08fc92039c6edd5a2a1e73b23901533e8974459170bbd9347d263dc5", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workers/supervisor.py", + "content": "WorkerSupervisor\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkerSupervisor", + "span_start": 10, + "span_end": 59, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "c17b44e8d9e97d490989b21fa67d7c346cdda8a0472e4c41fb243c8846faa124", + "symbol_name": "WorkerSupervisor", + "qname": "WorkerSupervisor", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "77609d9d5927171cce7fc3a54897c183fd63068710c6362029b700937aae5eee", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 59, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1", + "dst_ref": "RuntimeManager.start", + "resolution": "resolved", + "slice_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.start" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 52, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager._register_core_services", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 127, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6", + "dst_ref": "RuntimeManager._register_core_services", + "resolution": "resolved", + "slice_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager._register_core_services" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager\nRuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "qname": "RuntimeManager", + "kind": "class", + "signature": "RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "1. **Компоненты, которые подтверждены контекстом**:\n - RuntimeManager\n - ControlActionSet\n - ControlPlaneService\n \n2. **Подтверждённые связи между ними**:\n - RuntimeManager вызывает метод `start` для инициализации.\n - ControlPlaneService инициализирует каналы данных через метод `_channels`.\n - ControlPlaneService запускает асинхронную обработку через метод `_start_async`.\n\n3. **Границы ответственности, если они реально видны в коде**:\n - RuntimeManager отвечает за управление жизненным циклом системы, включая чтение и запись состояния атрибутов.\n - ControlActionSet выполняет роль модели и предоставляет базовые функции поведения.\n - ControlPlaneService управляет сервисами канала данных и их асинхронной обработкой.\n\n4. **Что остаётся неизвестным или неполным**:\n - Детали реализации взаимодействия между ControlActionSet и RuntimeManager остаются неясными.\n - Полная структура данных потока и зависимость компонентов от внешних сервисов не раскрыты.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "ARCHITECTURE", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS", + "C4_SEMANTIC_ROLES" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "ARCHITECTURE", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C4_SEMANTIC_ROLES": 12, + "C3_ENTRYPOINTS": 8, + "C2_DEPENDENCY_GRAPH": 8, + "C1_SYMBOL_CATALOG": 6, + "C0_SOURCE_CHUNKS": 4 + }, + "filters_by_layer": { + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C4_SEMANTIC_ROLES", + "query": "Какие компоненты участвуют в RuntimeManager?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 12, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "Какие компоненты участвуют в RuntimeManager?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Какие компоненты участвуют в RuntimeManager?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C1_SYMBOL_CATALOG", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Какие компоненты участвуют в RuntimeManager?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 4, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 12, + "candidates_after_filter": 12 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 4, + "candidates_after_filter": 4 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ] + }, + "layers": [ + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 12, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 8, + "fail_reason": null + }, + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 155, + "retrieval_by_layer": { + "C4_SEMANTIC_ROLES": 30, + "C3_ENTRYPOINTS": 17, + "C2_DEPENDENCY_GRAPH": 65, + "C1_SYMBOL_CATALOG": 25, + "C0_SOURCE_CHUNKS": 16 + }, + "merge_rank": 19, + "prompt_build": 0, + "llm_call": 1669 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 537, + "evidence_rows": 25, + "evidence_chars": 8651 + }, + "evidence_summary": [ + { + "layer": "C4_SEMANTIC_ROLES", + "count": 12, + "unique_paths": 11 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 8, + "unique_paths": 2 + }, + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_architecture_ru_v2", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "RuntimeManager" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 25, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-fullchain-architecture-control-plane", + "mode": "full_chain", + "run_started_at": "2026-03-12T12:39:45", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Какие компоненты участвуют в RuntimeManager?", + "normalized_query": "Какие компоненты участвуют в RuntimeManager?" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Какие компоненты участвуют в RuntimeManager?" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Какие компоненты участвуют в RuntimeManager?" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "ARCHITECTURE", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Какие компоненты участвуют в RuntimeManager?" + }, + "output": { + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ], + "confidence": 0.99 + }, + "rag_count": 25, + "rag_rows": [ + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests manager\n- orchestrates role-like calls (4)\n- reads and writes state attributes\n- participates in dataflow slices (50)", + "layer": "C4_SEMANTIC_ROLES", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 43, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "symbol_name": "RuntimeManager", + "qname": "RuntimeManager", + "role": "pipeline_stage", + "confidence": 0.67, + "dataflow_participation": 50, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/queue/in_memory.py", + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)", + "layer": "C4_SEMANTIC_ROLES", + "title": "InMemoryTaskQueue", + "span_start": 9, + "span_end": 38, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 22, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "2da04cb94544a3bcbf0943a95ad4bdd8710bcafaa32a02fd0e4de2178dcf3533", + "symbol_name": "InMemoryTaskQueue", + "qname": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 9, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "58f0cc001ccda0eee4c6bc32ed83bd05eafd6b6644f1e8b4aa9eed3103db73dc", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "ConfigFileLoader\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (8)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ConfigFileLoader", + "span_start": 11, + "span_end": 48, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 23, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "a8474eca8b6e9dc86ae67ed68b16fa5fb639ef08739c053e7b7195489765667f", + "symbol_name": "ConfigFileLoader", + "qname": "ConfigFileLoader", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 8, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/store.py", + "content": "TraceContextStore\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "TraceContextStore", + "span_start": 15, + "span_end": 52, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b2dad4fbe16ffb11b58deba311c7739955c39d59f291b22181f33e9c8cce4059", + "symbol_name": "TraceContextStore", + "qname": "TraceContextStore", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "d369554f08fc92039c6edd5a2a1e73b23901533e8974459170bbd9347d263dc5", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workers/supervisor.py", + "content": "WorkerSupervisor\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkerSupervisor", + "span_start": 10, + "span_end": 59, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "c17b44e8d9e97d490989b21fa67d7c346cdda8a0472e4c41fb243c8846faa124", + "symbol_name": "WorkerSupervisor", + "qname": "WorkerSupervisor", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "77609d9d5927171cce7fc3a54897c183fd63068710c6362029b700937aae5eee", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 59, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1", + "dst_ref": "RuntimeManager.start", + "resolution": "resolved", + "slice_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.start" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 52, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager._register_core_services", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 127, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6", + "dst_ref": "RuntimeManager._register_core_services", + "resolution": "resolved", + "slice_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager._register_core_services" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager\nRuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "qname": "RuntimeManager", + "kind": "class", + "signature": "RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C4_SEMANTIC_ROLES": 12, + "C3_ENTRYPOINTS": 8, + "C2_DEPENDENCY_GRAPH": 8, + "C1_SYMBOL_CATALOG": 6, + "C0_SOURCE_CHUNKS": 4 + }, + "filters_by_layer": { + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C4_SEMANTIC_ROLES", + "query": "Какие компоненты участвуют в RuntimeManager?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 12, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "Какие компоненты участвуют в RuntimeManager?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Какие компоненты участвуют в RuntimeManager?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C1_SYMBOL_CATALOG", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Какие компоненты участвуют в RuntimeManager?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 4, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 12, + "candidates_after_filter": 12 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 4, + "candidates_after_filter": 4 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ] + }, + "layers": [ + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 12, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 8, + "fail_reason": null + }, + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 155, + "retrieval_by_layer": { + "C4_SEMANTIC_ROLES": 30, + "C3_ENTRYPOINTS": 17, + "C2_DEPENDENCY_GRAPH": 65, + "C1_SYMBOL_CATALOG": 25, + "C0_SOURCE_CHUNKS": 16 + }, + "merge_rank": 19 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Какие компоненты участвуют в RuntimeManager?", + "rag_count": 25 + }, + "output": { + "llm_answer": "1. **Компоненты, которые подтверждены контекстом**:\n - RuntimeManager\n - ControlActionSet\n - ControlPlaneService\n \n2. **Подтверждённые связи между ними**:\n - RuntimeManager вызывает метод `start` для инициализации.\n - ControlPlaneService инициализирует каналы данных через метод `_channels`.\n - ControlPlaneService запускает асинхронную обработку через метод `_start_async`.\n\n3. **Границы ответственности, если они реально видны в коде**:\n - RuntimeManager отвечает за управление жизненным циклом системы, включая чтение и запись состояния атрибутов.\n - ControlActionSet выполняет роль модели и предоставляет базовые функции поведения.\n - ControlPlaneService управляет сервисами канала данных и их асинхронной обработкой.\n\n4. **Что остаётся неизвестным или неполным**:\n - Детали реализации взаимодействия между ControlActionSet и RuntimeManager остаются неясными.\n - Полная структура данных потока и зависимость компонентов от внешних сервисов не раскрыты." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 537, + "evidence_rows": 25, + "evidence_chars": 8651 + }, + "evidence_summary": [ + { + "layer": "C4_SEMANTIC_ROLES", + "count": 12, + "unique_paths": 11 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 8, + "unique_paths": 2 + }, + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_architecture_ru_v2", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 1669 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_123945/full_chain_plba_code_subintents_plba-fullchain-architecture-control-plane.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_123945/full_chain_plba_code_subintents_plba-fullchain-architecture-control-plane.md new file mode 100644 index 0000000..0f4693b --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_123945/full_chain_plba_code_subintents_plba-fullchain-architecture-control-plane.md @@ -0,0 +1,34 @@ +# plba-fullchain-architecture-control-plane + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Какие компоненты участвуют в RuntimeManager? + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "ARCHITECTURE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 25, + "llm_answer": "1. **Компоненты, которые подтверждены контекстом**:\n - RuntimeManager\n - ControlActionSet\n - ControlPlaneService\n \n2. **Подтверждённые связи между ними**:\n - RuntimeManager вызывает метод `start` для инициализации.\n - ControlPlaneService инициализирует каналы данных через метод `_channels`.\n - ControlPlaneService запускает асинхронную обработку через метод `_start_async`.\n\n3. **Границы ответственности, если они реально видны в коде**:\n - RuntimeManager отвечает за управление жизненным циклом системы, включая чтение и запись состояния атрибутов.\n - ControlActionSet выполняет роль модели и предоставляет базовые функции поведения.\n - ControlPlaneService управляет сервисами канала данных и их асинхронной обработкой.\n\n4. **Что остаётся неизвестным или неполным**:\n - Детали реализации взаимодействия между ControlActionSet и RuntimeManager остаются неясными.\n - Полная структура данных потока и зависимость компонентов от внешних сервисов не раскрыты.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_123945/full_chain_plba_code_subintents_plba-fullchain-explain-local-runtime-manager.json b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_123945/full_chain_plba_code_subintents_plba-fullchain-explain-local-runtime-manager.json new file mode 100644 index 0000000..fea2f9f --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_123945/full_chain_plba_code_subintents_plba-fullchain-explain-local-runtime-manager.json @@ -0,0 +1,1333 @@ +{ + "case_id": "plba-fullchain-explain-local-runtime-manager", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN_LOCAL", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 6, + "llm_answer": "Класс `RuntimeManager` управляет инициализацией и запуском различных компонентов приложения во время выполнения (runtime).\n\n### Что делает данный класс:\n- Инициализирует основные компоненты системы (`configuration`, `services`, `traces`, `health`, `logs`, `workers`, `control_plane`) с возможностью передачи пользовательских значений через параметры конструктора. Если значения не переданы, используются дефолтные экземпляры соответствующих классов.\n \n- Содержит переменные состояния для отслеживания фазы жизненного цикла приложения:\n - `_started`: флаг, указывающий, запущен ли runtime.\n - `_state`: текущее состояние жизненного цикла (`IDLE`, `RUNNING`, etc.).\n - `_core_registered`: регистрированы ли базовые сервисы.\n - `_workers_registered`: зарегистрированы ли рабочие задачи.\n\n- Вызывает приватную функцию `_register_core_services()` сразу после создания объекта, чтобы зарегистрировать базовые службы.\n\n### Входные данные:\n- Параметры конструктора содержат объекты конфигурации, сервисов, трассировки, мониторинга здоровья, логирования, управления рабочими задачами и контрольной плоскости.\n\n### Выходные данные:\n- Взаимодействие происходит внутри самого класса при настройке его внутренних объектов и регистрации базовых служб.\n\n### Зависимости и ближайшие вызовы:\n- При создании нового экземпляра `RuntimeManager` автоматически регистрируются базовые сервисы и запускаются процессы, необходимые для функционирования runtime.\n- Класс напрямую зависит от нескольких других модулей (`ConfigurationManager`, `ServiceContainer`, `TraceService`, `HealthRegistry`, `LogManager`, `WorkerSupervisor`, `ControlPlaneService`), но сам по себе является точкой входа для настройки этих модулей.\n\nТаким образом, `RuntimeManager` выступает центральным компонентом, обеспечивающим координацию и запуск всех основных сервисов приложения в runtime-среде.", + "answer_mode": "answered", + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C2_DEPENDENCY_GRAPH" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-fullchain-explain-local-runtime-manager", + "text": "Почему в файле src/app_runtime/core/runtime.py класс RuntimeManager устроен так?", + "mode": "full_chain", + "run_started_at": "2026-03-12T12:39:45", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Почему в файле src/app_runtime/core/runtime.py класс RuntimeManager устроен так?", + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ], + "confidence": 0.99 + }, + "rag_count": 6, + "rag_rows": [ + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager\nRuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "qname": "RuntimeManager", + "kind": "class", + "signature": "RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 59, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1", + "dst_ref": "RuntimeManager.start", + "resolution": "resolved", + "slice_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.start" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager._register_core_services", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 127, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6", + "dst_ref": "RuntimeManager._register_core_services", + "resolution": "resolved", + "slice_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager._register_core_services" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 52, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.services\n -> RuntimeManager.__init__", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 33, + "span_end": 39, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d43af85989222ee6d788ce418cdcb217c7ff044cfb915e3bdbd184417dc7bd61", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "dst_ref": "RuntimeManager.__init__", + "resolution": "resolved", + "slice_id": "d43af85989222ee6d788ce418cdcb217c7ff044cfb915e3bdbd184417dc7bd61", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.services", + "RuntimeManager.__init__" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "Класс `RuntimeManager` управляет инициализацией и запуском различных компонентов приложения во время выполнения (runtime).\n\n### Что делает данный класс:\n- Инициализирует основные компоненты системы (`configuration`, `services`, `traces`, `health`, `logs`, `workers`, `control_plane`) с возможностью передачи пользовательских значений через параметры конструктора. Если значения не переданы, используются дефолтные экземпляры соответствующих классов.\n \n- Содержит переменные состояния для отслеживания фазы жизненного цикла приложения:\n - `_started`: флаг, указывающий, запущен ли runtime.\n - `_state`: текущее состояние жизненного цикла (`IDLE`, `RUNNING`, etc.).\n - `_core_registered`: регистрированы ли базовые сервисы.\n - `_workers_registered`: зарегистрированы ли рабочие задачи.\n\n- Вызывает приватную функцию `_register_core_services()` сразу после создания объекта, чтобы зарегистрировать базовые службы.\n\n### Входные данные:\n- Параметры конструктора содержат объекты конфигурации, сервисов, трассировки, мониторинга здоровья, логирования, управления рабочими задачами и контрольной плоскости.\n\n### Выходные данные:\n- Взаимодействие происходит внутри самого класса при настройке его внутренних объектов и регистрации базовых служб.\n\n### Зависимости и ближайшие вызовы:\n- При создании нового экземпляра `RuntimeManager` автоматически регистрируются базовые сервисы и запускаются процессы, необходимые для функционирования runtime.\n- Класс напрямую зависит от нескольких других модулей (`ConfigurationManager`, `ServiceContainer`, `TraceService`, `HealthRegistry`, `LogManager`, `WorkerSupervisor`, `ControlPlaneService`), но сам по себе является точкой входа для настройки этих модулей.\n\nТаким образом, `RuntimeManager` выступает центральным компонентом, обеспечивающим координацию и запуск всех основных сервисов приложения в runtime-среде.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN_LOCAL", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN_LOCAL", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C2_DEPENDENCY_GRAPH" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "RuntimeManager" + ], + "keyword_hints": [ + "src/app_runtime/core/runtime.py", + "RuntimeManager" + ], + "path_hints": [ + "src/app_runtime/core/runtime.py" + ], + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C2_DEPENDENCY_GRAPH" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 12, + "C2_DEPENDENCY_GRAPH": 4 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "RuntimeManager", + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Почему в файле src/app_runtime/core/runtime.py класс RuntimeManager устроен так?", + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 12, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Почему в файле src/app_runtime/core/runtime.py класс RuntimeManager устроен так?", + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 4, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 4, + "candidates_after_filter": 4 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 4, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 74, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 30, + "C0_SOURCE_CHUNKS": 18, + "C2_DEPENDENCY_GRAPH": 25 + }, + "merge_rank": 23, + "prompt_build": 0, + "llm_call": 2644 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 816, + "evidence_rows": 6, + "evidence_chars": 6650 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 4, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_explain_local_ru_v2", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "src/app_runtime/core/runtime.py", + "RuntimeManager" + ], + "path_scope": [ + "src/app_runtime/core/runtime.py" + ] + }, + "llm": { + "used_evidence_count": 6, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-fullchain-explain-local-runtime-manager", + "mode": "full_chain", + "run_started_at": "2026-03-12T12:39:45", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Почему в файле src/app_runtime/core/runtime.py класс RuntimeManager устроен так?", + "normalized_query": "Почему в файле src/app_runtime/core/runtime.py класс RuntimeManager устроен так?" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Почему в файле src/app_runtime/core/runtime.py класс RuntimeManager устроен так?" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Почему в файле src/app_runtime/core/runtime.py класс RuntimeManager устроен так?" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN_LOCAL", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C2_DEPENDENCY_GRAPH" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "RuntimeManager" + ], + "keyword_hints": [ + "src/app_runtime/core/runtime.py", + "RuntimeManager" + ], + "path_hints": [ + "src/app_runtime/core/runtime.py" + ], + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Почему в файле src/app_runtime/core/runtime.py класс RuntimeManager устроен так?" + }, + "output": { + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ], + "confidence": 0.99 + }, + "rag_count": 6, + "rag_rows": [ + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager\nRuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "qname": "RuntimeManager", + "kind": "class", + "signature": "RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 59, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1", + "dst_ref": "RuntimeManager.start", + "resolution": "resolved", + "slice_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.start" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager._register_core_services", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 127, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6", + "dst_ref": "RuntimeManager._register_core_services", + "resolution": "resolved", + "slice_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager._register_core_services" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 52, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.services\n -> RuntimeManager.__init__", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 33, + "span_end": 39, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d43af85989222ee6d788ce418cdcb217c7ff044cfb915e3bdbd184417dc7bd61", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "dst_ref": "RuntimeManager.__init__", + "resolution": "resolved", + "slice_id": "d43af85989222ee6d788ce418cdcb217c7ff044cfb915e3bdbd184417dc7bd61", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.services", + "RuntimeManager.__init__" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C2_DEPENDENCY_GRAPH" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 12, + "C2_DEPENDENCY_GRAPH": 4 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "RuntimeManager", + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Почему в файле src/app_runtime/core/runtime.py класс RuntimeManager устроен так?", + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 12, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Почему в файле src/app_runtime/core/runtime.py класс RuntimeManager устроен так?", + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 4, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 4, + "candidates_after_filter": 4 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 4, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 74, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 30, + "C0_SOURCE_CHUNKS": 18, + "C2_DEPENDENCY_GRAPH": 25 + }, + "merge_rank": 23 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Почему в файле src/app_runtime/core/runtime.py класс RuntimeManager устроен так?", + "rag_count": 6 + }, + "output": { + "llm_answer": "Класс `RuntimeManager` управляет инициализацией и запуском различных компонентов приложения во время выполнения (runtime).\n\n### Что делает данный класс:\n- Инициализирует основные компоненты системы (`configuration`, `services`, `traces`, `health`, `logs`, `workers`, `control_plane`) с возможностью передачи пользовательских значений через параметры конструктора. Если значения не переданы, используются дефолтные экземпляры соответствующих классов.\n \n- Содержит переменные состояния для отслеживания фазы жизненного цикла приложения:\n - `_started`: флаг, указывающий, запущен ли runtime.\n - `_state`: текущее состояние жизненного цикла (`IDLE`, `RUNNING`, etc.).\n - `_core_registered`: регистрированы ли базовые сервисы.\n - `_workers_registered`: зарегистрированы ли рабочие задачи.\n\n- Вызывает приватную функцию `_register_core_services()` сразу после создания объекта, чтобы зарегистрировать базовые службы.\n\n### Входные данные:\n- Параметры конструктора содержат объекты конфигурации, сервисов, трассировки, мониторинга здоровья, логирования, управления рабочими задачами и контрольной плоскости.\n\n### Выходные данные:\n- Взаимодействие происходит внутри самого класса при настройке его внутренних объектов и регистрации базовых служб.\n\n### Зависимости и ближайшие вызовы:\n- При создании нового экземпляра `RuntimeManager` автоматически регистрируются базовые сервисы и запускаются процессы, необходимые для функционирования runtime.\n- Класс напрямую зависит от нескольких других модулей (`ConfigurationManager`, `ServiceContainer`, `TraceService`, `HealthRegistry`, `LogManager`, `WorkerSupervisor`, `ControlPlaneService`), но сам по себе является точкой входа для настройки этих модулей.\n\nТаким образом, `RuntimeManager` выступает центральным компонентом, обеспечивающим координацию и запуск всех основных сервисов приложения в runtime-среде." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 816, + "evidence_rows": 6, + "evidence_chars": 6650 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 4, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_explain_local_ru_v2", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 2644 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_123945/full_chain_plba_code_subintents_plba-fullchain-explain-local-runtime-manager.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_123945/full_chain_plba_code_subintents_plba-fullchain-explain-local-runtime-manager.md new file mode 100644 index 0000000..6c156e2 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_123945/full_chain_plba_code_subintents_plba-fullchain-explain-local-runtime-manager.md @@ -0,0 +1,34 @@ +# plba-fullchain-explain-local-runtime-manager + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Почему в файле src/app_runtime/core/runtime.py класс RuntimeManager устроен так? + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "EXPLAIN_LOCAL", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 6, + "llm_answer": "Класс `RuntimeManager` управляет инициализацией и запуском различных компонентов приложения во время выполнения (runtime).\n\n### Что делает данный класс:\n- Инициализирует основные компоненты системы (`configuration`, `services`, `traces`, `health`, `logs`, `workers`, `control_plane`) с возможностью передачи пользовательских значений через параметры конструктора. Если значения не переданы, используются дефолтные экземпляры соответствующих классов.\n \n- Содержит переменные состояния для отслеживания фазы жизненного цикла приложения:\n - `_started`: флаг, указывающий, запущен ли runtime.\n - `_state`: текущее состояние жизненного цикла (`IDLE`, `RUNNING`, etc.).\n - `_core_registered`: регистрированы ли базовые сервисы.\n - `_workers_registered`: зарегистрированы ли рабочие задачи.\n\n- Вызывает приватную функцию `_register_core_services()` сразу после создания объекта, чтобы зарегистрировать базовые службы.\n\n### Входные данные:\n- Параметры конструктора содержат объекты конфигурации, сервисов, трассировки, мониторинга здоровья, логирования, управления рабочими задачами и контрольной плоскости.\n\n### Выходные данные:\n- Взаимодействие происходит внутри самого класса при настройке его внутренних объектов и регистрации базовых служб.\n\n### Зависимости и ближайшие вызовы:\n- При создании нового экземпляра `RuntimeManager` автоматически регистрируются базовые сервисы и запускаются процессы, необходимые для функционирования runtime.\n- Класс напрямую зависит от нескольких других модулей (`ConfigurationManager`, `ServiceContainer`, `TraceService`, `HealthRegistry`, `LogManager`, `WorkerSupervisor`, `ControlPlaneService`), но сам по себе является точкой входа для настройки этих модулей.\n\nТаким образом, `RuntimeManager` выступает центральным компонентом, обеспечивающим координацию и запуск всех основных сервисов приложения в runtime-среде.", + "answer_mode": "answered", + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C2_DEPENDENCY_GRAPH" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_123945/full_chain_plba_code_subintents_plba-fullchain-explain-runtime-manager.json b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_123945/full_chain_plba_code_subintents_plba-fullchain-explain-runtime-manager.json new file mode 100644 index 0000000..5c79a4d --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_123945/full_chain_plba_code_subintents_plba-fullchain-explain-runtime-manager.json @@ -0,0 +1,2088 @@ +{ + "case_id": "plba-fullchain-explain-runtime-manager", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 12, + "llm_answer": "1. Что это и где определено.\nСущность `RuntimeManager` объявлена в файле `src/app_runtime/core/runtime.py`.\n\n2. Назначение по наблюдаемому коду.\nКласс предназначен для управления жизненным циклом приложения и координации работы различных компонентов системы. Судя по документации и контекстным подсказкам, он играет роль менеджера, отвечающего за инициализацию и управление сервисами, регистрацией модулей и отслеживанием состояния системы.\n\n3. Подтверждённые зависимости или взаимодействия.\n`RuntimeManager` зависит от следующих сущностей:\n- `ConfigurationManager`\n- `ServiceContainer`\n- `TraceService`\n- `HealthRegistry`\n- `LogManager`\n- `WorkerSupervisor`\n- `ControlPlaneService`\n- `ApplicationModule`\n\nЭти зависимости передаются конструктору класса при его создании.\n\n4. Что делает по шагам, если это видно в контексте.\nПри инициализации объекта класса происходит следующее:\n- Проверяются аргументы конструктора на наличие необходимых зависимостей.\n- Если какой-либо аргумент отсутствует, создаётся соответствующий объект по умолчанию.\n- Заполняются атрибуты экземпляра, такие как `_started`, `_state`, `_core_registered`, `_workers_registered`.\n- Вызывается метод `_register_core_services()`, предположительно регистрирующий основные сервисы.\n\n5. Осторожные выводы.\nНа данный момент нельзя сделать полных выводов о работе метода `_register_core_services()` и других методов класса без дополнительного анализа исходного кода.\n\n6. Чего не хватает для полного объяснения.\nДля более глубокого понимания необходимо изучить реализацию методов класса и их взаимодействие с другими компонентами системы. Также требуется информация о внутренней логике метода `_register_core_services()`.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-fullchain-explain-runtime-manager", + "text": "Объясни как работает класс RuntimeManager", + "mode": "full_chain", + "run_started_at": "2026-03-12T12:39:45", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни как работает класс RuntimeManager", + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ], + "confidence": 0.99 + }, + "rag_count": 12, + "rag_rows": [ + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager\nRuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "qname": "RuntimeManager", + "kind": "class", + "signature": "RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests manager\n- orchestrates role-like calls (4)\n- reads and writes state attributes\n- participates in dataflow slices (50)", + "layer": "C4_SEMANTIC_ROLES", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 43, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "symbol_name": "RuntimeManager", + "qname": "RuntimeManager", + "role": "pipeline_stage", + "confidence": 0.67, + "dataflow_participation": 50, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 52, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "1. Что это и где определено.\nСущность `RuntimeManager` объявлена в файле `src/app_runtime/core/runtime.py`.\n\n2. Назначение по наблюдаемому коду.\nКласс предназначен для управления жизненным циклом приложения и координации работы различных компонентов системы. Судя по документации и контекстным подсказкам, он играет роль менеджера, отвечающего за инициализацию и управление сервисами, регистрацией модулей и отслеживанием состояния системы.\n\n3. Подтверждённые зависимости или взаимодействия.\n`RuntimeManager` зависит от следующих сущностей:\n- `ConfigurationManager`\n- `ServiceContainer`\n- `TraceService`\n- `HealthRegistry`\n- `LogManager`\n- `WorkerSupervisor`\n- `ControlPlaneService`\n- `ApplicationModule`\n\nЭти зависимости передаются конструктору класса при его создании.\n\n4. Что делает по шагам, если это видно в контексте.\nПри инициализации объекта класса происходит следующее:\n- Проверяются аргументы конструктора на наличие необходимых зависимостей.\n- Если какой-либо аргумент отсутствует, создаётся соответствующий объект по умолчанию.\n- Заполняются атрибуты экземпляра, такие как `_started`, `_state`, `_core_registered`, `_workers_registered`.\n- Вызывается метод `_register_core_services()`, предположительно регистрирующий основные сервисы.\n\n5. Осторожные выводы.\nНа данный момент нельзя сделать полных выводов о работе метода `_register_core_services()` и других методов класса без дополнительного анализа исходного кода.\n\n6. Чего не хватает для полного объяснения.\nДля более глубокого понимания необходимо изучить реализацию методов класса и их взаимодействие с другими компонентами системы. Также требуется информация о внутренней логике метода `_register_core_services()`.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS", + "C4_SEMANTIC_ROLES" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 184, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 42, + "C0_SOURCE_CHUNKS": 25, + "C4_SEMANTIC_ROLES": 17, + "C2_DEPENDENCY_GRAPH": 63, + "C3_ENTRYPOINTS": 12 + }, + "merge_rank": 23, + "prompt_build": 0, + "llm_call": 2501 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 854, + "evidence_rows": 12, + "evidence_chars": 7130 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 2 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_explain_ru_v2", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "RuntimeManager" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 12, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-fullchain-explain-runtime-manager", + "mode": "full_chain", + "run_started_at": "2026-03-12T12:39:45", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Объясни как работает класс RuntimeManager", + "normalized_query": "Объясни как работает класс RuntimeManager" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Объясни как работает класс RuntimeManager" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни как работает класс RuntimeManager" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Объясни как работает класс RuntimeManager" + }, + "output": { + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ], + "confidence": 0.99 + }, + "rag_count": 12, + "rag_rows": [ + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager\nRuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "qname": "RuntimeManager", + "kind": "class", + "signature": "RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests manager\n- orchestrates role-like calls (4)\n- reads and writes state attributes\n- participates in dataflow slices (50)", + "layer": "C4_SEMANTIC_ROLES", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 43, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "symbol_name": "RuntimeManager", + "qname": "RuntimeManager", + "role": "pipeline_stage", + "confidence": 0.67, + "dataflow_participation": 50, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 52, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 184, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 42, + "C0_SOURCE_CHUNKS": 25, + "C4_SEMANTIC_ROLES": 17, + "C2_DEPENDENCY_GRAPH": 63, + "C3_ENTRYPOINTS": 12 + }, + "merge_rank": 23 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Объясни как работает класс RuntimeManager", + "rag_count": 12 + }, + "output": { + "llm_answer": "1. Что это и где определено.\nСущность `RuntimeManager` объявлена в файле `src/app_runtime/core/runtime.py`.\n\n2. Назначение по наблюдаемому коду.\nКласс предназначен для управления жизненным циклом приложения и координации работы различных компонентов системы. Судя по документации и контекстным подсказкам, он играет роль менеджера, отвечающего за инициализацию и управление сервисами, регистрацией модулей и отслеживанием состояния системы.\n\n3. Подтверждённые зависимости или взаимодействия.\n`RuntimeManager` зависит от следующих сущностей:\n- `ConfigurationManager`\n- `ServiceContainer`\n- `TraceService`\n- `HealthRegistry`\n- `LogManager`\n- `WorkerSupervisor`\n- `ControlPlaneService`\n- `ApplicationModule`\n\nЭти зависимости передаются конструктору класса при его создании.\n\n4. Что делает по шагам, если это видно в контексте.\nПри инициализации объекта класса происходит следующее:\n- Проверяются аргументы конструктора на наличие необходимых зависимостей.\n- Если какой-либо аргумент отсутствует, создаётся соответствующий объект по умолчанию.\n- Заполняются атрибуты экземпляра, такие как `_started`, `_state`, `_core_registered`, `_workers_registered`.\n- Вызывается метод `_register_core_services()`, предположительно регистрирующий основные сервисы.\n\n5. Осторожные выводы.\nНа данный момент нельзя сделать полных выводов о работе метода `_register_core_services()` и других методов класса без дополнительного анализа исходного кода.\n\n6. Чего не хватает для полного объяснения.\nДля более глубокого понимания необходимо изучить реализацию методов класса и их взаимодействие с другими компонентами системы. Также требуется информация о внутренней логике метода `_register_core_services()`." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 854, + "evidence_rows": 12, + "evidence_chars": 7130 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 2 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_explain_ru_v2", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 2501 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_123945/full_chain_plba_code_subintents_plba-fullchain-explain-runtime-manager.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_123945/full_chain_plba_code_subintents_plba-fullchain-explain-runtime-manager.md new file mode 100644 index 0000000..fc81610 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_123945/full_chain_plba_code_subintents_plba-fullchain-explain-runtime-manager.md @@ -0,0 +1,34 @@ +# plba-fullchain-explain-runtime-manager + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Объясни как работает класс RuntimeManager + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 12, + "llm_answer": "1. Что это и где определено.\nСущность `RuntimeManager` объявлена в файле `src/app_runtime/core/runtime.py`.\n\n2. Назначение по наблюдаемому коду.\nКласс предназначен для управления жизненным циклом приложения и координации работы различных компонентов системы. Судя по документации и контекстным подсказкам, он играет роль менеджера, отвечающего за инициализацию и управление сервисами, регистрацией модулей и отслеживанием состояния системы.\n\n3. Подтверждённые зависимости или взаимодействия.\n`RuntimeManager` зависит от следующих сущностей:\n- `ConfigurationManager`\n- `ServiceContainer`\n- `TraceService`\n- `HealthRegistry`\n- `LogManager`\n- `WorkerSupervisor`\n- `ControlPlaneService`\n- `ApplicationModule`\n\nЭти зависимости передаются конструктору класса при его создании.\n\n4. Что делает по шагам, если это видно в контексте.\nПри инициализации объекта класса происходит следующее:\n- Проверяются аргументы конструктора на наличие необходимых зависимостей.\n- Если какой-либо аргумент отсутствует, создаётся соответствующий объект по умолчанию.\n- Заполняются атрибуты экземпляра, такие как `_started`, `_state`, `_core_registered`, `_workers_registered`.\n- Вызывается метод `_register_core_services()`, предположительно регистрирующий основные сервисы.\n\n5. Осторожные выводы.\nНа данный момент нельзя сделать полных выводов о работе метода `_register_core_services()` и других методов класса без дополнительного анализа исходного кода.\n\n6. Чего не хватает для полного объяснения.\nДля более глубокого понимания необходимо изучить реализацию методов класса и их взаимодействие с другими компонентами системы. Также требуется информация о внутренней логике метода `_register_core_services()`.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_123945/full_chain_plba_code_subintents_plba-fullchain-find-entrypoints.json b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_123945/full_chain_plba_code_subintents_plba-fullchain-find-entrypoints.json new file mode 100644 index 0000000..56a98bd --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_123945/full_chain_plba_code_subintents_plba-fullchain-find-entrypoints.json @@ -0,0 +1,1196 @@ +{ + "case_id": "plba-fullchain-find-entrypoints", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 9, + "llm_answer": "**Подтверждённые точки входа:**\n\n1. **src/app_runtime/control/http_app.py | app.post**\n - fastapi http app.post\n - Признак: декоратор FastAPI `app.post`, явно указывает на точку старта HTTP-запроса.\n\n2. **src/app_runtime/control/http_app.py | app.get**\n - fastapi http app.get\n - Признак: декоратор FastAPI `app.get`, явно указывает на точку старта HTTP-запроса.\n\n**Возможные кандидаты:**\n\nВ предоставленном контексте нет дополнительных сущностей или файлов, которые могли бы считаться возможными кандидатами на роль точек входа.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [], + "layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-fullchain-find-entrypoints", + "text": "Найди точки входа в коде", + "mode": "full_chain", + "run_started_at": "2026-03-12T12:39:45", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Найди точки входа в коде", + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [], + "confidence": 0.0 + }, + "rag_count": 9, + "rag_rows": [ + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/contracts/result.py", + "content": "class StepResult:\n transition: str = \"success\"\n updates: dict[str, Any] = field(default_factory=dict)\n status: str = \"completed\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/workflow/contracts/result.py:StepResult", + "span_start": 8, + "span_end": 11, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.workflow.contracts.result", + "is_test": false, + "blob_sha": "6e57dbfe22873f097f11228a26cffa415440a43b68a737b220906461cd86c353", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/__init__.py", + "content": "from app_runtime.config.file_loader import ConfigFileLoader\nfrom app_runtime.config.providers import FileConfigProvider\n\n__all__ = [\"ConfigFileLoader\", \"FileConfigProvider\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/config/__init__.py:1-4", + "span_start": 1, + "span_end": 4, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.config.__init__", + "is_test": false, + "blob_sha": "612918029820a2a983330ec92256142b55b9de4bdf3399ece18e2a02dbad9729", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/__init__.py", + "content": "__all__: list[str] = []", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/__init__.py:1-1", + "span_start": 1, + "span_end": 1, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.__init__", + "is_test": false, + "blob_sha": "8eea9df4f6d7b38ca0e39ccc27b04700e3d08dbeec8046d613d22706d19985fa", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "class ConfigFileLoader:\n def __init__(self, path: str | Path) -> None:\n self.path = Path(path)\n self.config: Any = None\n self.last_valid_config: Any = None\n self._last_seen_hash: str | None = None\n\n def read_text(self) -> str:\n return self.path.read_text(encoding=\"utf-8\")\n\n def parse(self, data: str) -> Any:\n suffix = self.path.suffix.lower()\n if suffix in {\".yml\", \".yaml\"}:\n return yaml.safe_load(data)\n return json.loads(data)\n\n def load_sync(self) -> Any:\n data = self.read_text()\n parsed = self.parse(data)\n self.config = parsed\n self.last_valid_config = parsed\n self._last_seen_hash = self._calculate_hash(data)\n return parsed\n\n def load_if_changed(self) -> tuple[bool, Any]:\n data = self.read_text()\n current_hash = self._calculate_hash(data)\n if current_hash == self._last_seen_hash:\n return False, self.config\n parsed = self.parse(data)\n self.config = parsed\n self.last_valid_config = parsed\n self._last_seen_hash = current_hash\n return True, parsed\n\n @staticmethod\n def _calculate_hash(data: str) -> str:\n return hashlib.sha256(data.encode(\"utf-8\")).hexdigest()", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/config/file_loader.py:ConfigFileLoader", + "span_start": 11, + "span_end": 48, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/providers.py", + "content": "class FileConfigProvider(ConfigProvider):\n def __init__(self, path: str | Path) -> None:\n self._loader = ConfigFileLoader(path)\n\n @property\n def loader(self) -> ConfigFileLoader:\n return self._loader\n\n def load(self) -> dict[str, Any]:\n config = self._loader.load_sync()\n if not isinstance(config, dict):\n raise TypeError(\"Config root must be a mapping\")\n return dict(config)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/config/providers.py:FileConfigProvider", + "span_start": 10, + "span_end": 22, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.config.providers", + "is_test": false, + "blob_sha": "8c53ca0122d6df6c5763bca15e99434bb4daebd5a618b8fc927e9ae90b022e64", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlActionSet:\n health: HealthHandler\n start: ActionHandler\n stop: ActionHandler\n status: ActionHandler", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "**Подтверждённые точки входа:**\n\n1. **src/app_runtime/control/http_app.py | app.post**\n - fastapi http app.post\n - Признак: декоратор FastAPI `app.post`, явно указывает на точку старта HTTP-запроса.\n\n2. **src/app_runtime/control/http_app.py | app.get**\n - fastapi http app.get\n - Признак: декоратор FastAPI `app.get`, явно указывает на точку старта HTTP-запроса.\n\n**Возможные кандидаты:**\n\nВ предоставленном контексте нет дополнительных сущностей или файлов, которые могли бы считаться возможными кандидатами на роль точек входа.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C3_ENTRYPOINTS" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "unknown", + "symbol_candidates": [], + "keyword_hints": [], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C3_ENTRYPOINTS": "exact_path_fetch", + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C3_ENTRYPOINTS": 12, + "C0_SOURCE_CHUNKS": 6 + }, + "filters_by_layer": { + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C3_ENTRYPOINTS", + "query": "Найди точки входа в коде", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 12, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Найди точки входа в коде", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [] + }, + "layers": [ + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 6, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 46, + "retrieval_by_layer": { + "C3_ENTRYPOINTS": 26, + "C0_SOURCE_CHUNKS": 19 + }, + "merge_rank": 0, + "prompt_build": 0, + "llm_call": 1148 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 534, + "evidence_rows": 9, + "evidence_chars": 2228 + }, + "evidence_summary": [ + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 6, + "unique_paths": 6 + } + ], + "prompt_template_id": "intent_code_qa_find_entrypoints_ru_v2", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 9, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-fullchain-find-entrypoints", + "mode": "full_chain", + "run_started_at": "2026-03-12T12:39:45", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Найди точки входа в коде", + "normalized_query": "Найди точки входа в коде" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Найди точки входа в коде" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Найди точки входа в коде" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "unknown", + "symbol_candidates": [], + "keyword_hints": [], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Найди точки входа в коде" + }, + "output": { + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [], + "confidence": 0.0 + }, + "rag_count": 9, + "rag_rows": [ + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/contracts/result.py", + "content": "class StepResult:\n transition: str = \"success\"\n updates: dict[str, Any] = field(default_factory=dict)\n status: str = \"completed\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/workflow/contracts/result.py:StepResult", + "span_start": 8, + "span_end": 11, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.workflow.contracts.result", + "is_test": false, + "blob_sha": "6e57dbfe22873f097f11228a26cffa415440a43b68a737b220906461cd86c353", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/__init__.py", + "content": "from app_runtime.config.file_loader import ConfigFileLoader\nfrom app_runtime.config.providers import FileConfigProvider\n\n__all__ = [\"ConfigFileLoader\", \"FileConfigProvider\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/config/__init__.py:1-4", + "span_start": 1, + "span_end": 4, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.config.__init__", + "is_test": false, + "blob_sha": "612918029820a2a983330ec92256142b55b9de4bdf3399ece18e2a02dbad9729", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/__init__.py", + "content": "__all__: list[str] = []", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/__init__.py:1-1", + "span_start": 1, + "span_end": 1, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.__init__", + "is_test": false, + "blob_sha": "8eea9df4f6d7b38ca0e39ccc27b04700e3d08dbeec8046d613d22706d19985fa", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "class ConfigFileLoader:\n def __init__(self, path: str | Path) -> None:\n self.path = Path(path)\n self.config: Any = None\n self.last_valid_config: Any = None\n self._last_seen_hash: str | None = None\n\n def read_text(self) -> str:\n return self.path.read_text(encoding=\"utf-8\")\n\n def parse(self, data: str) -> Any:\n suffix = self.path.suffix.lower()\n if suffix in {\".yml\", \".yaml\"}:\n return yaml.safe_load(data)\n return json.loads(data)\n\n def load_sync(self) -> Any:\n data = self.read_text()\n parsed = self.parse(data)\n self.config = parsed\n self.last_valid_config = parsed\n self._last_seen_hash = self._calculate_hash(data)\n return parsed\n\n def load_if_changed(self) -> tuple[bool, Any]:\n data = self.read_text()\n current_hash = self._calculate_hash(data)\n if current_hash == self._last_seen_hash:\n return False, self.config\n parsed = self.parse(data)\n self.config = parsed\n self.last_valid_config = parsed\n self._last_seen_hash = current_hash\n return True, parsed\n\n @staticmethod\n def _calculate_hash(data: str) -> str:\n return hashlib.sha256(data.encode(\"utf-8\")).hexdigest()", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/config/file_loader.py:ConfigFileLoader", + "span_start": 11, + "span_end": 48, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/providers.py", + "content": "class FileConfigProvider(ConfigProvider):\n def __init__(self, path: str | Path) -> None:\n self._loader = ConfigFileLoader(path)\n\n @property\n def loader(self) -> ConfigFileLoader:\n return self._loader\n\n def load(self) -> dict[str, Any]:\n config = self._loader.load_sync()\n if not isinstance(config, dict):\n raise TypeError(\"Config root must be a mapping\")\n return dict(config)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/config/providers.py:FileConfigProvider", + "span_start": 10, + "span_end": 22, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.config.providers", + "is_test": false, + "blob_sha": "8c53ca0122d6df6c5763bca15e99434bb4daebd5a618b8fc927e9ae90b022e64", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlActionSet:\n health: HealthHandler\n start: ActionHandler\n stop: ActionHandler\n status: ActionHandler", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C3_ENTRYPOINTS": "exact_path_fetch", + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C3_ENTRYPOINTS": 12, + "C0_SOURCE_CHUNKS": 6 + }, + "filters_by_layer": { + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C3_ENTRYPOINTS", + "query": "Найди точки входа в коде", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 12, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Найди точки входа в коде", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [] + }, + "layers": [ + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 6, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 46, + "retrieval_by_layer": { + "C3_ENTRYPOINTS": 26, + "C0_SOURCE_CHUNKS": 19 + }, + "merge_rank": 0 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Найди точки входа в коде", + "rag_count": 9 + }, + "output": { + "llm_answer": "**Подтверждённые точки входа:**\n\n1. **src/app_runtime/control/http_app.py | app.post**\n - fastapi http app.post\n - Признак: декоратор FastAPI `app.post`, явно указывает на точку старта HTTP-запроса.\n\n2. **src/app_runtime/control/http_app.py | app.get**\n - fastapi http app.get\n - Признак: декоратор FastAPI `app.get`, явно указывает на точку старта HTTP-запроса.\n\n**Возможные кандидаты:**\n\nВ предоставленном контексте нет дополнительных сущностей или файлов, которые могли бы считаться возможными кандидатами на роль точек входа." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 534, + "evidence_rows": 9, + "evidence_chars": 2228 + }, + "evidence_summary": [ + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 6, + "unique_paths": 6 + } + ], + "prompt_template_id": "intent_code_qa_find_entrypoints_ru_v2", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 1148 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_123945/full_chain_plba_code_subintents_plba-fullchain-find-entrypoints.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_123945/full_chain_plba_code_subintents_plba-fullchain-find-entrypoints.md new file mode 100644 index 0000000..b5afbd2 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_123945/full_chain_plba_code_subintents_plba-fullchain-find-entrypoints.md @@ -0,0 +1,29 @@ +# plba-fullchain-find-entrypoints + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Найди точки входа в коде + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 9, + "llm_answer": "**Подтверждённые точки входа:**\n\n1. **src/app_runtime/control/http_app.py | app.post**\n - fastapi http app.post\n - Признак: декоратор FastAPI `app.post`, явно указывает на точку старта HTTP-запроса.\n\n2. **src/app_runtime/control/http_app.py | app.get**\n - fastapi http app.get\n - Признак: декоратор FastAPI `app.get`, явно указывает на точку старта HTTP-запроса.\n\n**Возможные кандидаты:**\n\nВ предоставленном контексте нет дополнительных сущностей или файлов, которые могли бы считаться возможными кандидатами на роль точек входа.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [], + "layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_123945/full_chain_plba_code_subintents_plba-fullchain-find-tests-runtime-manager.json b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_123945/full_chain_plba_code_subintents_plba-fullchain-find-tests-runtime-manager.json new file mode 100644 index 0000000..bacfc24 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_123945/full_chain_plba_code_subintents_plba-fullchain-find-tests-runtime-manager.json @@ -0,0 +1,1879 @@ +{ + "case_id": "plba-fullchain-find-tests-runtime-manager", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 16, + "llm_answer": "1. Прямые тесты:\n - tests/test_runtime.py | test_runtime_runs_worker_routine_and_exposes_status\n - Проверка: RuntimeManager запускает worker routine и правильно выставляет статус.\n - tests/test_runtime.py | test_runtime_graceful_stop_waits_until_worker_finishes\n - Проверка: RuntimeManager корректно завершает работу после graceful stop.\n\n2. Косвенные или ближайшие тесты:\n - tests/test_business_control_actions.py | _build_runtime\n - Проверка: косвенно подтверждает создание экземпляра RuntimeManager в бизнес-контроллерах.\n - tests/test_business_control_actions.py | test_worker_wakes_up_with_configured_interval\n - Проверка: косвенно подтверждает использование RuntimeManager при настройке интервалов выполнения задач.\n\n3. Пробелы покрытия:\n - Не найдены явные тесты, которые покрывают все возможные сценарии использования RuntimeManager, такие как регистрация нескольких модулей, обработка ошибок, работа с конфигурацией и т.д.\n\nПрямых тестов, полностью подтверждающих различные аспекты работы RuntimeManager, недостаточно.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-fullchain-find-tests-runtime-manager", + "text": "Где тесты для RuntimeManager?", + "mode": "full_chain", + "run_started_at": "2026-03-12T12:39:45", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Где тесты для RuntimeManager?", + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "RuntimeManager" + ], + "confidence": 0.0 + }, + "rag_count": 16, + "rag_rows": [ + { + "path": "tests/test_runtime.py", + "content": "test_runtime_runs_worker_routine_and_exposes_status instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_runtime_runs_worker_routine_and_exposes_status:instantiates", + "span_start": 209, + "span_end": 209, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "c397a308e7824ba9fe400a754c7e15e66ea6f058d7f5d3e82bb002bb78b509d2", + "edge_type": "instantiates", + "src_symbol_id": "1c767eb5ee08e84f45b18c8ed7531ec0ed73c63fb1594823569672db7b21e992", + "src_qname": "test_runtime_runs_worker_routine_and_exposes_status", + "dst_symbol_id": "aeadc039653807b0da1ca6e3cc1078ee61cfc510b28e7f9c2ec04c59da43cc8d", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "test_runtime_graceful_stop_waits_until_worker_finishes instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_runtime_graceful_stop_waits_until_worker_finishes:instantiates", + "span_start": 229, + "span_end": 229, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "76b4701262ccaa0a7a41691407c4ebdb2ca74a2415d89f0a38ef0d4f608bda93", + "edge_type": "instantiates", + "src_symbol_id": "1076e788e4a03b10d7bc1313a8ad46caa170c13cc026c6e4de994af1a6ae57bf", + "src_qname": "test_runtime_graceful_stop_waits_until_worker_finishes", + "dst_symbol_id": "aeadc039653807b0da1ca6e3cc1078ee61cfc510b28e7f9c2ec04c59da43cc8d", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "_build_runtime instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "_build_runtime:instantiates", + "span_start": 155, + "span_end": 155, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "7eb254d564944bab6272757ee5ef688862bd321e6941e2495dc942e03b1c9a25", + "edge_type": "instantiates", + "src_symbol_id": "db94031d5245bf82be836a109b4584b43b8e83d37a0f318e03f6c8191896d469", + "src_qname": "_build_runtime", + "dst_symbol_id": "a1572ea8183dc0cd6ddbc74342bbde8c28cecfde37ad40b62feff09f8d103d11", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_worker_wakes_up_with_configured_interval instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_worker_wakes_up_with_configured_interval:instantiates", + "span_start": 167, + "span_end": 167, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "189aafc4de0b79c688668f25f0c87166a127df26bd2215452014713b65ef281a", + "edge_type": "instantiates", + "src_symbol_id": "65f877f78191d65e6a752e41cedc70ebc784c266804a55c1c56440336e1f0d6e", + "src_qname": "test_worker_wakes_up_with_configured_interval", + "dst_symbol_id": "a1572ea8183dc0cd6ddbc74342bbde8c28cecfde37ad40b62feff09f8d103d11", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_actions_stop_busy_worker_after_timeout\n -> BlockingRoutine\n -> BlockingRoutine.__init__\n -> BlockingRoutine._started\n -> BlockingRoutine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_actions_stop_busy_worker_after_timeout:dataflow_slice", + "span_start": 42, + "span_end": 238, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "8e7db3d2a9226f1c1d9942ac6373cfcafa0d2276758ddb8a3d3c455a3d58024d", + "edge_type": "dataflow_slice", + "src_symbol_id": "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "src_qname": "test_actions_stop_busy_worker_after_timeout", + "dst_symbol_id": "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04", + "dst_ref": "BlockingRoutine.run", + "resolution": "resolved", + "slice_id": "8e7db3d2a9226f1c1d9942ac6373cfcafa0d2276758ddb8a3d3c455a3d58024d", + "root_symbol_id": "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "path_symbols": [ + "test_actions_stop_busy_worker_after_timeout", + "BlockingRoutine", + "BlockingRoutine.__init__", + "BlockingRoutine._started", + "BlockingRoutine.run" + ], + "path_symbol_ids": [ + "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "a3349c5bc65e4003a4bbd6a8dbb7a54c337e12d1aed930caa701b12e520f1e67", + "486deeed3043c6db985aef258e96ddc67aa53608e67a83962fbd2471f649ddf1", + "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_actions_stop_busy_worker_before_timeout\n -> BlockingRoutine\n -> BlockingRoutine.__init__\n -> BlockingRoutine._release\n -> BlockingRoutine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_actions_stop_busy_worker_before_timeout:dataflow_slice", + "span_start": 43, + "span_end": 212, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "8bd726155ba387d3579763ee84dfd2f9a90bc917da88f3b2e89416ab5c1254d6", + "edge_type": "dataflow_slice", + "src_symbol_id": "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "src_qname": "test_actions_stop_busy_worker_before_timeout", + "dst_symbol_id": "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04", + "dst_ref": "BlockingRoutine.run", + "resolution": "resolved", + "slice_id": "8bd726155ba387d3579763ee84dfd2f9a90bc917da88f3b2e89416ab5c1254d6", + "root_symbol_id": "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "path_symbols": [ + "test_actions_stop_busy_worker_before_timeout", + "BlockingRoutine", + "BlockingRoutine.__init__", + "BlockingRoutine._release", + "BlockingRoutine.run" + ], + "path_symbol_ids": [ + "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "a3349c5bc65e4003a4bbd6a8dbb7a54c337e12d1aed930caa701b12e520f1e67", + "486deeed3043c6db985aef258e96ddc67aa53608e67a83962fbd2471f649ddf1", + "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "def test_runtime_graceful_stop_waits_until_worker_finishes() -> None:\n started = Event()\n release = Event()\n runtime = RuntimeManager()\n runtime.register_module(BlockingModule(started, release))\n runtime.start()\n assert started.wait(timeout=1.0) is True\n assert runtime.status()[\"runtime\"][\"state\"] == \"busy\"\n\n stop_thread = Thread(target=runtime.stop, kwargs={\"timeout\": 1.0}, daemon=True)\n stop_thread.start()\n sleep(0.1)\n assert stop_thread.is_alive() is True\n\n release.set()\n stop_thread.join(timeout=1.0)\n assert stop_thread.is_alive() is False\n assert runtime.status()[\"runtime\"][\"state\"] == \"stopped\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_runtime.py:test_runtime_graceful_stop_waits_until_worker_finishes", + "span_start": 226, + "span_end": 243, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 8, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "def test_runtime_runs_worker_routine_and_exposes_status(tmp_path) -> None:\n config_path = tmp_path / \"config.yml\"\n config_path.write_text(\n \"\"\"\nplatform:\n workers: 1\nlog:\n version: 1\n disable_existing_loggers: false\n handlers:\n console:\n class: logging.StreamHandler\n root:\n level: INFO\n handlers: [console]\n\"\"\".strip(),\n encoding=\"utf-8\",\n )\n runtime = RuntimeManager()\n runtime.add_config_file(config_path)\n module = ExampleModule()\n runtime.register_module(module)\n\n runtime.start()\n sleep(0.2)\n status = runtime.status()\n runtime.stop()\n\n assert module.routine.processed == [{\"id\": 1}]\n assert status[\"modules\"] == [\"example\"]\n assert status[\"runtime\"][\"state\"] == \"idle\"\n assert status[\"health\"][\"status\"] == \"ok\"\n assert status[\"config\"] == {\"platform\": {\"workers\": 1}, \"log\": status[\"config\"][\"log\"]}", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_runtime.py:test_runtime_runs_worker_routine_and_exposes_status", + "span_start": 191, + "span_end": 223, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 7, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _build_runtime(worker: Worker, *, control_timeout: int = 1) -> tuple[RuntimeManager, str]:\n runtime = RuntimeManager()\n channel = HttpControlChannel(host=\"127.0.0.1\", port=0, timeout=control_timeout)\n runtime.control_plane.register_channel(channel)\n runtime.register_module(WorkerModule(worker))\n runtime.start()\n return runtime, f\"http://127.0.0.1:{channel.port}\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_build_runtime", + "span_start": 154, + "span_end": 160, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 6, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def test_worker_wakes_up_with_configured_interval() -> None:\n interval = 0.15\n routine = IntervalRoutine()\n worker = ScenarioWorker(\"interval-worker\", routine, interval=interval)\n runtime = RuntimeManager()\n runtime.register_module(WorkerModule(worker))\n\n runtime.start()\n try:\n assert routine.wait_runs(count=3, timeout=2.0) is True\n finally:\n runtime.stop()\n\n deltas = routine.deltas()\n assert len(deltas) >= 2\n assert all(delta >= interval * 0.7 for delta in deltas[:2])", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:test_worker_wakes_up_with_configured_interval", + "span_start": 163, + "span_end": 178, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 7, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class BlockingRoutine:\n def __init__(self, started: Event, release: Event) -> None:\n self._started = started\n self._release = release\n\n def run(self) -> None:\n self._started.set()\n self._release.wait(timeout=5.0)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:BlockingRoutine", + "span_start": 40, + "span_end": 47, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class ScenarioWorker(Worker):\n def __init__(self, name: str, routine: object, *, interval: float = 0.05) -> None:\n self._name = name\n self._routine = routine\n self._interval = interval\n self._thread: Thread | None = None\n self._stop_requested = Event()\n self._in_flight = 0\n self._runs = 0\n self._lock = Lock()\n\n @property\n def name(self) -> str:\n return self._name\n\n @property\n def critical(self) -> bool:\n return True\n\n def start(self) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._stop_requested.clear()\n self._thread = Thread(target=self._loop, name=f\"{self._name}-thread\", daemon=True)\n self._thread.start()\n\n def stop(self, force: bool = False) -> None:\n self._stop_requested.set()\n\n def health(self) -> WorkerHealth:\n return WorkerHealth(name=self.name, status=\"ok\", critical=True, meta={\"runs\": self._runs})\n\n def status(self) -> WorkerStatus:\n thread_alive = self._thread is not None and self._thread.is_alive()\n with self._lock:\n in_flight = self._in_flight\n runs = self._runs\n if not thread_alive:\n state = \"stopped\"\n elif self._stop_requested.is_set():\n state = \"stopping\"\n elif in_flight > 0:\n state = \"busy\"\n else:\n state = \"idle\"\n return WorkerStatus(name=self.name, state=state, in_flight=in_flight, meta={\"runs\": runs})\n\n def _loop(self) -> None:\n while not self._stop_requested.is_set():\n with self._lock:\n self._in_flight += 1\n try:\n self._routine.run()\n with self._lock:\n self._runs += 1\n finally:\n with self._lock:\n self._in_flight -= 1\n if self._stop_requested.is_set():\n return\n sleep(self._interval)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:ScenarioWorker", + "span_start": 50, + "span_end": 110, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 2, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class WorkerModule(ApplicationModule):\n def __init__(self, worker: Worker) -> None:\n self._worker = worker\n\n @property\n def name(self) -> str:\n return \"business-tests\"\n\n def register(self, registry: ModuleRegistry) -> None:\n registry.add_worker(self._worker)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:WorkerModule", + "span_start": 113, + "span_end": 122, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 3, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _http_call_json(\n base_url: str,\n path: str,\n *,\n method: str = \"GET\",\n headers: dict[str, str] | None = None,\n) -> tuple[int, dict[str, object]]:\n request = Request(f\"{base_url}{path}\", method=method, headers=headers or {})\n try:\n with urlopen(request, timeout=15.0) as response:\n status = response.status\n body = response.read()\n except HTTPError as error:\n status = error.code\n body = error.read()\n payload = json.loads(body.decode(\"utf-8\"))\n return status, payload", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_http_call_json", + "span_start": 125, + "span_end": 141, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 4, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class IntervalRoutine:\n calls: list[float] = field(default_factory=list)\n _lock: Lock = field(default_factory=Lock)\n\n def run(self) -> None:\n with self._lock:\n self.calls.append(monotonic())\n\n def wait_runs(self, count: int, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n with self._lock:\n if len(self.calls) >= count:\n return True\n sleep(0.01)\n return False\n\n def deltas(self) -> list[float]:\n with self._lock:\n return [self.calls[index + 1] - self.calls[index] for index in range(len(self.calls) - 1)]", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:IntervalRoutine", + "span_start": 18, + "span_end": 37, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _poll_until_stopped(base_url: str, timeout: float = 2.0) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n _, payload = _http_call_json(base_url, \"/actions/status\")\n if payload.get(\"detail\") == \"stopped\":\n return True\n sleep(0.05)\n return False", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_poll_until_stopped", + "span_start": 144, + "span_end": 151, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 5, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "1. Прямые тесты:\n - tests/test_runtime.py | test_runtime_runs_worker_routine_and_exposes_status\n - Проверка: RuntimeManager запускает worker routine и правильно выставляет статус.\n - tests/test_runtime.py | test_runtime_graceful_stop_waits_until_worker_finishes\n - Проверка: RuntimeManager корректно завершает работу после graceful stop.\n\n2. Косвенные или ближайшие тесты:\n - tests/test_business_control_actions.py | _build_runtime\n - Проверка: косвенно подтверждает создание экземпляра RuntimeManager в бизнес-контроллерах.\n - tests/test_business_control_actions.py | test_worker_wakes_up_with_configured_interval\n - Проверка: косвенно подтверждает использование RuntimeManager при настройке интервалов выполнения задач.\n\n3. Пробелы покрытия:\n - Не найдены явные тесты, которые покрывают все возможные сценарии использования RuntimeManager, такие как регистрация нескольких модулей, обработка ошибок, работа с конфигурацией и т.д.\n\nПрямых тестов, полностью подтверждающих различные аспекты работы RuntimeManager, недостаточно.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C2_DEPENDENCY_GRAPH" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "test_file_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "test_symbol_patterns": [ + "test_runtime_manager", + "TestRuntimeManager", + "RuntimeManager" + ], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C0_SOURCE_CHUNKS": 10 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src", + "tests" + ], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src", + "tests" + ], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Где тесты для RuntimeManager? test_runtime_manager TestRuntimeManager RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Где тесты для RuntimeManager? test_runtime_manager TestRuntimeManager RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 10, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 0, + "candidates_after_filter": 0 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src", + "tests" + ], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src", + "tests" + ], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 10, + "candidates_after_filter": 10 + } + ], + "fallback": { + "used": true, + "reason": "scope_relaxed_no_hits" + }, + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "RuntimeManager" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "miss", + "hit_count": 0, + "fail_reason": "scope_relaxed_no_hits" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 10, + "fail_reason": null + } + ] + }, + "constraint_violations": [ + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C1_SYMBOL_CATALOG", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + } + ], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 152, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 82, + "C2_DEPENDENCY_GRAPH": 52, + "C0_SOURCE_CHUNKS": 17 + }, + "merge_rank": 0, + "prompt_build": 0, + "llm_call": 1762 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 904, + "evidence_rows": 16, + "evidence_chars": 7086 + }, + "evidence_summary": [ + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 2 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 10, + "unique_paths": 2 + } + ], + "prompt_template_id": "intent_code_qa_find_tests_ru_v2", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "RuntimeManager" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 16, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-fullchain-find-tests-runtime-manager", + "mode": "full_chain", + "run_started_at": "2026-03-12T12:39:45", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Где тесты для RuntimeManager?", + "normalized_query": "Где тесты для RuntimeManager?" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Где тесты для RuntimeManager?" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Где тесты для RuntimeManager?" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "test_file_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "test_symbol_patterns": [ + "test_runtime_manager", + "TestRuntimeManager", + "RuntimeManager" + ], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Где тесты для RuntimeManager?" + }, + "output": { + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "RuntimeManager" + ], + "confidence": 0.0 + }, + "rag_count": 16, + "rag_rows": [ + { + "path": "tests/test_runtime.py", + "content": "test_runtime_runs_worker_routine_and_exposes_status instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_runtime_runs_worker_routine_and_exposes_status:instantiates", + "span_start": 209, + "span_end": 209, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "c397a308e7824ba9fe400a754c7e15e66ea6f058d7f5d3e82bb002bb78b509d2", + "edge_type": "instantiates", + "src_symbol_id": "1c767eb5ee08e84f45b18c8ed7531ec0ed73c63fb1594823569672db7b21e992", + "src_qname": "test_runtime_runs_worker_routine_and_exposes_status", + "dst_symbol_id": "aeadc039653807b0da1ca6e3cc1078ee61cfc510b28e7f9c2ec04c59da43cc8d", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "test_runtime_graceful_stop_waits_until_worker_finishes instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_runtime_graceful_stop_waits_until_worker_finishes:instantiates", + "span_start": 229, + "span_end": 229, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "76b4701262ccaa0a7a41691407c4ebdb2ca74a2415d89f0a38ef0d4f608bda93", + "edge_type": "instantiates", + "src_symbol_id": "1076e788e4a03b10d7bc1313a8ad46caa170c13cc026c6e4de994af1a6ae57bf", + "src_qname": "test_runtime_graceful_stop_waits_until_worker_finishes", + "dst_symbol_id": "aeadc039653807b0da1ca6e3cc1078ee61cfc510b28e7f9c2ec04c59da43cc8d", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "_build_runtime instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "_build_runtime:instantiates", + "span_start": 155, + "span_end": 155, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "7eb254d564944bab6272757ee5ef688862bd321e6941e2495dc942e03b1c9a25", + "edge_type": "instantiates", + "src_symbol_id": "db94031d5245bf82be836a109b4584b43b8e83d37a0f318e03f6c8191896d469", + "src_qname": "_build_runtime", + "dst_symbol_id": "a1572ea8183dc0cd6ddbc74342bbde8c28cecfde37ad40b62feff09f8d103d11", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_worker_wakes_up_with_configured_interval instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_worker_wakes_up_with_configured_interval:instantiates", + "span_start": 167, + "span_end": 167, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "189aafc4de0b79c688668f25f0c87166a127df26bd2215452014713b65ef281a", + "edge_type": "instantiates", + "src_symbol_id": "65f877f78191d65e6a752e41cedc70ebc784c266804a55c1c56440336e1f0d6e", + "src_qname": "test_worker_wakes_up_with_configured_interval", + "dst_symbol_id": "a1572ea8183dc0cd6ddbc74342bbde8c28cecfde37ad40b62feff09f8d103d11", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_actions_stop_busy_worker_after_timeout\n -> BlockingRoutine\n -> BlockingRoutine.__init__\n -> BlockingRoutine._started\n -> BlockingRoutine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_actions_stop_busy_worker_after_timeout:dataflow_slice", + "span_start": 42, + "span_end": 238, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "8e7db3d2a9226f1c1d9942ac6373cfcafa0d2276758ddb8a3d3c455a3d58024d", + "edge_type": "dataflow_slice", + "src_symbol_id": "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "src_qname": "test_actions_stop_busy_worker_after_timeout", + "dst_symbol_id": "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04", + "dst_ref": "BlockingRoutine.run", + "resolution": "resolved", + "slice_id": "8e7db3d2a9226f1c1d9942ac6373cfcafa0d2276758ddb8a3d3c455a3d58024d", + "root_symbol_id": "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "path_symbols": [ + "test_actions_stop_busy_worker_after_timeout", + "BlockingRoutine", + "BlockingRoutine.__init__", + "BlockingRoutine._started", + "BlockingRoutine.run" + ], + "path_symbol_ids": [ + "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "a3349c5bc65e4003a4bbd6a8dbb7a54c337e12d1aed930caa701b12e520f1e67", + "486deeed3043c6db985aef258e96ddc67aa53608e67a83962fbd2471f649ddf1", + "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_actions_stop_busy_worker_before_timeout\n -> BlockingRoutine\n -> BlockingRoutine.__init__\n -> BlockingRoutine._release\n -> BlockingRoutine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_actions_stop_busy_worker_before_timeout:dataflow_slice", + "span_start": 43, + "span_end": 212, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "8bd726155ba387d3579763ee84dfd2f9a90bc917da88f3b2e89416ab5c1254d6", + "edge_type": "dataflow_slice", + "src_symbol_id": "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "src_qname": "test_actions_stop_busy_worker_before_timeout", + "dst_symbol_id": "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04", + "dst_ref": "BlockingRoutine.run", + "resolution": "resolved", + "slice_id": "8bd726155ba387d3579763ee84dfd2f9a90bc917da88f3b2e89416ab5c1254d6", + "root_symbol_id": "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "path_symbols": [ + "test_actions_stop_busy_worker_before_timeout", + "BlockingRoutine", + "BlockingRoutine.__init__", + "BlockingRoutine._release", + "BlockingRoutine.run" + ], + "path_symbol_ids": [ + "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "a3349c5bc65e4003a4bbd6a8dbb7a54c337e12d1aed930caa701b12e520f1e67", + "486deeed3043c6db985aef258e96ddc67aa53608e67a83962fbd2471f649ddf1", + "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "def test_runtime_graceful_stop_waits_until_worker_finishes() -> None:\n started = Event()\n release = Event()\n runtime = RuntimeManager()\n runtime.register_module(BlockingModule(started, release))\n runtime.start()\n assert started.wait(timeout=1.0) is True\n assert runtime.status()[\"runtime\"][\"state\"] == \"busy\"\n\n stop_thread = Thread(target=runtime.stop, kwargs={\"timeout\": 1.0}, daemon=True)\n stop_thread.start()\n sleep(0.1)\n assert stop_thread.is_alive() is True\n\n release.set()\n stop_thread.join(timeout=1.0)\n assert stop_thread.is_alive() is False\n assert runtime.status()[\"runtime\"][\"state\"] == \"stopped\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_runtime.py:test_runtime_graceful_stop_waits_until_worker_finishes", + "span_start": 226, + "span_end": 243, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 8, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "def test_runtime_runs_worker_routine_and_exposes_status(tmp_path) -> None:\n config_path = tmp_path / \"config.yml\"\n config_path.write_text(\n \"\"\"\nplatform:\n workers: 1\nlog:\n version: 1\n disable_existing_loggers: false\n handlers:\n console:\n class: logging.StreamHandler\n root:\n level: INFO\n handlers: [console]\n\"\"\".strip(),\n encoding=\"utf-8\",\n )\n runtime = RuntimeManager()\n runtime.add_config_file(config_path)\n module = ExampleModule()\n runtime.register_module(module)\n\n runtime.start()\n sleep(0.2)\n status = runtime.status()\n runtime.stop()\n\n assert module.routine.processed == [{\"id\": 1}]\n assert status[\"modules\"] == [\"example\"]\n assert status[\"runtime\"][\"state\"] == \"idle\"\n assert status[\"health\"][\"status\"] == \"ok\"\n assert status[\"config\"] == {\"platform\": {\"workers\": 1}, \"log\": status[\"config\"][\"log\"]}", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_runtime.py:test_runtime_runs_worker_routine_and_exposes_status", + "span_start": 191, + "span_end": 223, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 7, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _build_runtime(worker: Worker, *, control_timeout: int = 1) -> tuple[RuntimeManager, str]:\n runtime = RuntimeManager()\n channel = HttpControlChannel(host=\"127.0.0.1\", port=0, timeout=control_timeout)\n runtime.control_plane.register_channel(channel)\n runtime.register_module(WorkerModule(worker))\n runtime.start()\n return runtime, f\"http://127.0.0.1:{channel.port}\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_build_runtime", + "span_start": 154, + "span_end": 160, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 6, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def test_worker_wakes_up_with_configured_interval() -> None:\n interval = 0.15\n routine = IntervalRoutine()\n worker = ScenarioWorker(\"interval-worker\", routine, interval=interval)\n runtime = RuntimeManager()\n runtime.register_module(WorkerModule(worker))\n\n runtime.start()\n try:\n assert routine.wait_runs(count=3, timeout=2.0) is True\n finally:\n runtime.stop()\n\n deltas = routine.deltas()\n assert len(deltas) >= 2\n assert all(delta >= interval * 0.7 for delta in deltas[:2])", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:test_worker_wakes_up_with_configured_interval", + "span_start": 163, + "span_end": 178, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 7, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class BlockingRoutine:\n def __init__(self, started: Event, release: Event) -> None:\n self._started = started\n self._release = release\n\n def run(self) -> None:\n self._started.set()\n self._release.wait(timeout=5.0)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:BlockingRoutine", + "span_start": 40, + "span_end": 47, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class ScenarioWorker(Worker):\n def __init__(self, name: str, routine: object, *, interval: float = 0.05) -> None:\n self._name = name\n self._routine = routine\n self._interval = interval\n self._thread: Thread | None = None\n self._stop_requested = Event()\n self._in_flight = 0\n self._runs = 0\n self._lock = Lock()\n\n @property\n def name(self) -> str:\n return self._name\n\n @property\n def critical(self) -> bool:\n return True\n\n def start(self) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._stop_requested.clear()\n self._thread = Thread(target=self._loop, name=f\"{self._name}-thread\", daemon=True)\n self._thread.start()\n\n def stop(self, force: bool = False) -> None:\n self._stop_requested.set()\n\n def health(self) -> WorkerHealth:\n return WorkerHealth(name=self.name, status=\"ok\", critical=True, meta={\"runs\": self._runs})\n\n def status(self) -> WorkerStatus:\n thread_alive = self._thread is not None and self._thread.is_alive()\n with self._lock:\n in_flight = self._in_flight\n runs = self._runs\n if not thread_alive:\n state = \"stopped\"\n elif self._stop_requested.is_set():\n state = \"stopping\"\n elif in_flight > 0:\n state = \"busy\"\n else:\n state = \"idle\"\n return WorkerStatus(name=self.name, state=state, in_flight=in_flight, meta={\"runs\": runs})\n\n def _loop(self) -> None:\n while not self._stop_requested.is_set():\n with self._lock:\n self._in_flight += 1\n try:\n self._routine.run()\n with self._lock:\n self._runs += 1\n finally:\n with self._lock:\n self._in_flight -= 1\n if self._stop_requested.is_set():\n return\n sleep(self._interval)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:ScenarioWorker", + "span_start": 50, + "span_end": 110, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 2, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class WorkerModule(ApplicationModule):\n def __init__(self, worker: Worker) -> None:\n self._worker = worker\n\n @property\n def name(self) -> str:\n return \"business-tests\"\n\n def register(self, registry: ModuleRegistry) -> None:\n registry.add_worker(self._worker)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:WorkerModule", + "span_start": 113, + "span_end": 122, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 3, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _http_call_json(\n base_url: str,\n path: str,\n *,\n method: str = \"GET\",\n headers: dict[str, str] | None = None,\n) -> tuple[int, dict[str, object]]:\n request = Request(f\"{base_url}{path}\", method=method, headers=headers or {})\n try:\n with urlopen(request, timeout=15.0) as response:\n status = response.status\n body = response.read()\n except HTTPError as error:\n status = error.code\n body = error.read()\n payload = json.loads(body.decode(\"utf-8\"))\n return status, payload", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_http_call_json", + "span_start": 125, + "span_end": 141, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 4, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class IntervalRoutine:\n calls: list[float] = field(default_factory=list)\n _lock: Lock = field(default_factory=Lock)\n\n def run(self) -> None:\n with self._lock:\n self.calls.append(monotonic())\n\n def wait_runs(self, count: int, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n with self._lock:\n if len(self.calls) >= count:\n return True\n sleep(0.01)\n return False\n\n def deltas(self) -> list[float]:\n with self._lock:\n return [self.calls[index + 1] - self.calls[index] for index in range(len(self.calls) - 1)]", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:IntervalRoutine", + "span_start": 18, + "span_end": 37, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _poll_until_stopped(base_url: str, timeout: float = 2.0) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n _, payload = _http_call_json(base_url, \"/actions/status\")\n if payload.get(\"detail\") == \"stopped\":\n return True\n sleep(0.05)\n return False", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_poll_until_stopped", + "span_start": 144, + "span_end": 151, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 5, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C0_SOURCE_CHUNKS": 10 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src", + "tests" + ], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src", + "tests" + ], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Где тесты для RuntimeManager? test_runtime_manager TestRuntimeManager RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Где тесты для RuntimeManager? test_runtime_manager TestRuntimeManager RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 10, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 0, + "candidates_after_filter": 0 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src", + "tests" + ], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src", + "tests" + ], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 10, + "candidates_after_filter": 10 + } + ], + "fallback": { + "used": true, + "reason": "scope_relaxed_no_hits" + }, + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "RuntimeManager" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "miss", + "hit_count": 0, + "fail_reason": "scope_relaxed_no_hits" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 10, + "fail_reason": null + } + ] + }, + "constraint_violations": [ + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C1_SYMBOL_CATALOG", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + } + ], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 152, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 82, + "C2_DEPENDENCY_GRAPH": 52, + "C0_SOURCE_CHUNKS": 17 + }, + "merge_rank": 0 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Где тесты для RuntimeManager?", + "rag_count": 16 + }, + "output": { + "llm_answer": "1. Прямые тесты:\n - tests/test_runtime.py | test_runtime_runs_worker_routine_and_exposes_status\n - Проверка: RuntimeManager запускает worker routine и правильно выставляет статус.\n - tests/test_runtime.py | test_runtime_graceful_stop_waits_until_worker_finishes\n - Проверка: RuntimeManager корректно завершает работу после graceful stop.\n\n2. Косвенные или ближайшие тесты:\n - tests/test_business_control_actions.py | _build_runtime\n - Проверка: косвенно подтверждает создание экземпляра RuntimeManager в бизнес-контроллерах.\n - tests/test_business_control_actions.py | test_worker_wakes_up_with_configured_interval\n - Проверка: косвенно подтверждает использование RuntimeManager при настройке интервалов выполнения задач.\n\n3. Пробелы покрытия:\n - Не найдены явные тесты, которые покрывают все возможные сценарии использования RuntimeManager, такие как регистрация нескольких модулей, обработка ошибок, работа с конфигурацией и т.д.\n\nПрямых тестов, полностью подтверждающих различные аспекты работы RuntimeManager, недостаточно." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 904, + "evidence_rows": 16, + "evidence_chars": 7086 + }, + "evidence_summary": [ + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 2 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 10, + "unique_paths": 2 + } + ], + "prompt_template_id": "intent_code_qa_find_tests_ru_v2", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 1762 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_123945/full_chain_plba_code_subintents_plba-fullchain-find-tests-runtime-manager.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_123945/full_chain_plba_code_subintents_plba-fullchain-find-tests-runtime-manager.md new file mode 100644 index 0000000..4781aa8 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_123945/full_chain_plba_code_subintents_plba-fullchain-find-tests-runtime-manager.md @@ -0,0 +1,32 @@ +# plba-fullchain-find-tests-runtime-manager + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Где тесты для RuntimeManager? + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 16, + "llm_answer": "1. Прямые тесты:\n - tests/test_runtime.py | test_runtime_runs_worker_routine_and_exposes_status\n - Проверка: RuntimeManager запускает worker routine и правильно выставляет статус.\n - tests/test_runtime.py | test_runtime_graceful_stop_waits_until_worker_finishes\n - Проверка: RuntimeManager корректно завершает работу после graceful stop.\n\n2. Косвенные или ближайшие тесты:\n - tests/test_business_control_actions.py | _build_runtime\n - Проверка: косвенно подтверждает создание экземпляра RuntimeManager в бизнес-контроллерах.\n - tests/test_business_control_actions.py | test_worker_wakes_up_with_configured_interval\n - Проверка: косвенно подтверждает использование RuntimeManager при настройке интервалов выполнения задач.\n\n3. Пробелы покрытия:\n - Не найдены явные тесты, которые покрывают все возможные сценарии использования RuntimeManager, такие как регистрация нескольких модулей, обработка ошибок, работа с конфигурацией и т.д.\n\nПрямых тестов, полностью подтверждающих различные аспекты работы RuntimeManager, недостаточно.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_123945/full_chain_plba_code_subintents_plba-fullchain-open-file-runtime.json b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_123945/full_chain_plba_code_subintents_plba-fullchain-open-file-runtime.json new file mode 100644 index 0000000..5ab057f --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_123945/full_chain_plba_code_subintents_plba-fullchain-open-file-runtime.json @@ -0,0 +1,492 @@ +{ + "case_id": "plba-fullchain-open-file-runtime", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 1, + "llm_answer": "1. путь к файлу: src/app_runtime/core/runtime.py\n2. В доступных фрагментах видна начальная часть класса RuntimeManager.\n3. Top-level сущности и секции: класс RuntimeManager с методом __init__, методом _register_core_services и частично виден метод register_module.\n4. Важно для вопроса пользователя:\n- Класс RuntimeManager является основным управляющим объектом для runtime-среды.\n- В конструкторе инициализируются основные компоненты системы (ConfigurationManager, ServiceContainer, TraceService и др.).\n- Метод _register_core_services вероятно отвечает за регистрацию основных сервисов приложения.\n- Метод register_module используется для регистрации модулей приложения.", + "answer_mode": "answered", + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "symbol_candidates": [], + "layers": [ + "C0_SOURCE_CHUNKS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-fullchain-open-file-runtime", + "text": "Открой файл src/app_runtime/core/runtime.py", + "mode": "full_chain", + "run_started_at": "2026-03-12T12:39:45", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Открой файл src/app_runtime/core/runtime.py", + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [], + "confidence": 0.0 + }, + "rag_count": 1, + "rag_rows": [ + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "1. путь к файлу: src/app_runtime/core/runtime.py\n2. В доступных фрагментах видна начальная часть класса RuntimeManager.\n3. Top-level сущности и секции: класс RuntimeManager с методом __init__, методом _register_core_services и частично виден метод register_module.\n4. Важно для вопроса пользователя:\n- Класс RuntimeManager является основным управляющим объектом для runtime-среды.\n- В конструкторе инициализируются основные компоненты системы (ConfigurationManager, ServiceContainer, TraceService и др.).\n- Метод _register_core_services вероятно отвечает за регистрацию основных сервисов приложения.\n- Метод register_module используется для регистрации модулей приложения.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "unknown", + "symbol_candidates": [], + "keyword_hints": [], + "path_hints": [ + "src/app_runtime/core/runtime.py" + ], + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/app_runtime/core/runtime.py" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": false, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C0_SOURCE_CHUNKS": 200 + }, + "filters_by_layer": { + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "include_globs": [], + "exclude_globs": [], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Открой файл src/app_runtime/core/runtime.py", + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "include_globs": [], + "exclude_globs": [], + "prefer_globs": [], + "top_k": 200, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "normalized_include_globs": [], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [] + }, + "layers": [ + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 1, + "symbol_resolution": 0, + "retrieval_total": 251, + "retrieval_by_layer": { + "C0_SOURCE_CHUNKS": 251 + }, + "merge_rank": 0, + "prompt_build": 0, + "llm_call": 1139 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 600, + "evidence_rows": 1, + "evidence_chars": 6265 + }, + "evidence_summary": [ + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_open_file_ru_v2", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [], + "path_scope": [ + "src/app_runtime/core/runtime.py" + ] + }, + "llm": { + "used_evidence_count": 1, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-fullchain-open-file-runtime", + "mode": "full_chain", + "run_started_at": "2026-03-12T12:39:45", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Открой файл src/app_runtime/core/runtime.py", + "normalized_query": "Открой файл src/app_runtime/core/runtime.py" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Открой файл src/app_runtime/core/runtime.py" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Открой файл src/app_runtime/core/runtime.py" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "unknown", + "symbol_candidates": [], + "keyword_hints": [], + "path_hints": [ + "src/app_runtime/core/runtime.py" + ], + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/app_runtime/core/runtime.py" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": false, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 1 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Открой файл src/app_runtime/core/runtime.py" + }, + "output": { + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [], + "confidence": 0.0 + }, + "rag_count": 1, + "rag_rows": [ + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C0_SOURCE_CHUNKS": 200 + }, + "filters_by_layer": { + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "include_globs": [], + "exclude_globs": [], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Открой файл src/app_runtime/core/runtime.py", + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "include_globs": [], + "exclude_globs": [], + "prefer_globs": [], + "top_k": 200, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "normalized_include_globs": [], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [] + }, + "layers": [ + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 251, + "retrieval_by_layer": { + "C0_SOURCE_CHUNKS": 251 + }, + "merge_rank": 0 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Открой файл src/app_runtime/core/runtime.py", + "rag_count": 1 + }, + "output": { + "llm_answer": "1. путь к файлу: src/app_runtime/core/runtime.py\n2. В доступных фрагментах видна начальная часть класса RuntimeManager.\n3. Top-level сущности и секции: класс RuntimeManager с методом __init__, методом _register_core_services и частично виден метод register_module.\n4. Важно для вопроса пользователя:\n- Класс RuntimeManager является основным управляющим объектом для runtime-среды.\n- В конструкторе инициализируются основные компоненты системы (ConfigurationManager, ServiceContainer, TraceService и др.).\n- Метод _register_core_services вероятно отвечает за регистрацию основных сервисов приложения.\n- Метод register_module используется для регистрации модулей приложения." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 600, + "evidence_rows": 1, + "evidence_chars": 6265 + }, + "evidence_summary": [ + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_open_file_ru_v2", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 1139 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_123945/full_chain_plba_code_subintents_plba-fullchain-open-file-runtime.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_123945/full_chain_plba_code_subintents_plba-fullchain-open-file-runtime.md new file mode 100644 index 0000000..4522ac3 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_123945/full_chain_plba_code_subintents_plba-fullchain-open-file-runtime.md @@ -0,0 +1,30 @@ +# plba-fullchain-open-file-runtime + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Открой файл src/app_runtime/core/runtime.py + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 1, + "llm_answer": "1. путь к файлу: src/app_runtime/core/runtime.py\n2. В доступных фрагментах видна начальная часть класса RuntimeManager.\n3. Top-level сущности и секции: класс RuntimeManager с методом __init__, методом _register_core_services и частично виден метод register_module.\n4. Важно для вопроса пользователя:\n- Класс RuntimeManager является основным управляющим объектом для runtime-среды.\n- В конструкторе инициализируются основные компоненты системы (ConfigurationManager, ServiceContainer, TraceService и др.).\n- Метод _register_core_services вероятно отвечает за регистрацию основных сервисов приложения.\n- Метод register_module используется для регистрации модулей приложения.", + "answer_mode": "answered", + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "symbol_candidates": [], + "layers": [ + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_123945/full_chain_plba_code_subintents_plba-fullchain-trace-flow-runtime-manager.json b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_123945/full_chain_plba_code_subintents_plba-fullchain-trace-flow-runtime-manager.json new file mode 100644 index 0000000..cb7d2d1 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_123945/full_chain_plba_code_subintents_plba-fullchain-trace-flow-runtime-manager.json @@ -0,0 +1,2964 @@ +{ + "case_id": "plba-fullchain-trace-flow-runtime-manager", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "TRACE_FLOW", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 23, + "llm_answer": "1. Точка старта: fastapi http app.post [C3_ENTRYPOINTS]\n2. \n\n- 2.1 fastapi http app.post → RuntimeManager.__init__ [C2_DEPENDENCY_GRAPH]\n - В этой точке начинается инициализация объекта RuntimeManager через его конструктор __init__. Конструктор принимает несколько параметров типа ConfigurationManager, ServiceContainer, TraceService, HealthRegistry, LogManager, WorkerSupervisor и ControlPlaneService. Параметры могут быть переданы извне или приняты по умолчанию при отсутствии переданных значений.\n \n Связь между шагами подтверждена напрямую в [C2_DEPENDENCY_GRAPH].\n\n- 2.2 RuntimeManager.__init__ → RuntimeManager.configuration [C2_DEPENDENCY_GRAPH]\n - Внутри конструктора вызывается атрибут конфигурации runtime_manager.configuration, который устанавливается либо передаваемым значением, либо созданным по умолчанию экземпляром ConfigurationManager.\n\n Связь между шагами подтверждена напрямую в [C2_DEPENDENCY_GRAPH].\n\n- 2.3 RuntimeManager.__init__ → RuntimeManager.services [C2_DEPENDENCY_GRAPH]\n - Далее внутри конструктора вызывается атрибут сервисов runtime_manager.services, который устанавливается либо передаваемым значением, либо созданным по умолчанию экземпляром ServiceContainer.\n\n Связь между шагами подтверждена напрямую в [C2_DEPENDENCY_GRAPH].\n\n- 2.4 RuntimeManager.__init__ → RuntimeManager.traces [C2_DEPENDENCY_GRAPH]\n - Затем вызывается атрибут трассировки runtime_manager.traces, который устанавливается либо передаваемым значением, либо созданным по умолчанию экземпляром TraceService.\n\n Связь между шагами подтверждена напрямую в [C2_DEPENDENCY_GRAPH].\n\n- 2.5 RuntimeManager.__init__ → RuntimeManager.health [C2_DEPENDENCY_GRAPH]\n - После этого вызывается атрибут состояния здоровья runtime_manager.health, который устанавливается либо передаваемым значением, либо созданным по умолчанию экземпляром HealthRegistry.\n\n Связь между шагами подтверждена напрямую в [C2_DEPENDENCY_GRAPH].\n\n- 2.6 RuntimeManager.__init__ → RuntimeManager.logs [C2_DEPENDENCY_GRAPH]\n - Далее вызывается атрибут логирования runtime_manager.logs, который устанавливается либо передаваемым значением, либо созданным по умолчанию экземпляром LogManager.\n\n Связь между шагами подтверждена напрямую в [C2_DEPENDENCY_GRAPH].\n\n- 2.7 RuntimeManager.__init__ → RuntimeManager.workers [C2_DEPENDENCY_GRAPH]\n - Следующий шаг — установка атрибута рабочих процессов runtime_manager.workers, который устанавливается либо передаваемым значением, либо созданным по умолчанию экземпляром WorkerSupervisor.\n\n Связь между шагами подтверждена напрямую в [C2_DEPENDENCY_GRAPH].\n\n- 2.8 RuntimeManager.__init__ → RuntimeManager.control_plane [C2_DEPENDENCY_GRAPH]\n - Завершающий шаг конструктора — установка атрибута управления runtime_manager.control_plane, который устанавливается либо передаваемым значением, либо созданным по умолчанию экземпляром ControlPlaneService.\n\n Связь между шагами подтверждена напрямую в [C2_DEPENDENCY_GRAPH].\n\n3. Все связи между шагами подтверждены напрямую в предоставленных слоях RAG.\n4. Поток не содержит разрывы или участки с неполными данными.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-fullchain-trace-flow-runtime-manager", + "text": "Покажи поток выполнения RuntimeManager", + "mode": "full_chain", + "run_started_at": "2026-03-12T12:39:45", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Покажи поток выполнения RuntimeManager", + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ], + "confidence": 0.99 + }, + "rag_count": 23, + "rag_rows": [ + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager\nRuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "qname": "RuntimeManager", + "kind": "class", + "signature": "RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests manager\n- orchestrates role-like calls (4)\n- reads and writes state attributes\n- participates in dataflow slices (50)", + "layer": "C4_SEMANTIC_ROLES", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 43, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "symbol_name": "RuntimeManager", + "qname": "RuntimeManager", + "role": "pipeline_stage", + "confidence": 0.67, + "dataflow_participation": 50, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 52, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.services\n -> RuntimeManager.__init__", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 33, + "span_end": 39, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d43af85989222ee6d788ce418cdcb217c7ff044cfb915e3bdbd184417dc7bd61", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "dst_ref": "RuntimeManager.__init__", + "resolution": "resolved", + "slice_id": "d43af85989222ee6d788ce418cdcb217c7ff044cfb915e3bdbd184417dc7bd61", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.services", + "RuntimeManager.__init__" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 59, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1", + "dst_ref": "RuntimeManager.start", + "resolution": "resolved", + "slice_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.start" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager._register_core_services", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 127, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6", + "dst_ref": "RuntimeManager._register_core_services", + "resolution": "resolved", + "slice_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager._register_core_services" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.services\n -> RuntimeManager._register_core_services", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 33, + "span_end": 127, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "aac6f9dda73963b977083a892bee39a48eca4fbd7404787e022ecf4ebedec65d", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6", + "dst_ref": "RuntimeManager._register_core_services", + "resolution": "resolved", + "slice_id": "aac6f9dda73963b977083a892bee39a48eca4fbd7404787e022ecf4ebedec65d", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.services", + "RuntimeManager._register_core_services" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "1. Точка старта: fastapi http app.post [C3_ENTRYPOINTS]\n2. \n\n- 2.1 fastapi http app.post → RuntimeManager.__init__ [C2_DEPENDENCY_GRAPH]\n - В этой точке начинается инициализация объекта RuntimeManager через его конструктор __init__. Конструктор принимает несколько параметров типа ConfigurationManager, ServiceContainer, TraceService, HealthRegistry, LogManager, WorkerSupervisor и ControlPlaneService. Параметры могут быть переданы извне или приняты по умолчанию при отсутствии переданных значений.\n \n Связь между шагами подтверждена напрямую в [C2_DEPENDENCY_GRAPH].\n\n- 2.2 RuntimeManager.__init__ → RuntimeManager.configuration [C2_DEPENDENCY_GRAPH]\n - Внутри конструктора вызывается атрибут конфигурации runtime_manager.configuration, который устанавливается либо передаваемым значением, либо созданным по умолчанию экземпляром ConfigurationManager.\n\n Связь между шагами подтверждена напрямую в [C2_DEPENDENCY_GRAPH].\n\n- 2.3 RuntimeManager.__init__ → RuntimeManager.services [C2_DEPENDENCY_GRAPH]\n - Далее внутри конструктора вызывается атрибут сервисов runtime_manager.services, который устанавливается либо передаваемым значением, либо созданным по умолчанию экземпляром ServiceContainer.\n\n Связь между шагами подтверждена напрямую в [C2_DEPENDENCY_GRAPH].\n\n- 2.4 RuntimeManager.__init__ → RuntimeManager.traces [C2_DEPENDENCY_GRAPH]\n - Затем вызывается атрибут трассировки runtime_manager.traces, который устанавливается либо передаваемым значением, либо созданным по умолчанию экземпляром TraceService.\n\n Связь между шагами подтверждена напрямую в [C2_DEPENDENCY_GRAPH].\n\n- 2.5 RuntimeManager.__init__ → RuntimeManager.health [C2_DEPENDENCY_GRAPH]\n - После этого вызывается атрибут состояния здоровья runtime_manager.health, который устанавливается либо передаваемым значением, либо созданным по умолчанию экземпляром HealthRegistry.\n\n Связь между шагами подтверждена напрямую в [C2_DEPENDENCY_GRAPH].\n\n- 2.6 RuntimeManager.__init__ → RuntimeManager.logs [C2_DEPENDENCY_GRAPH]\n - Далее вызывается атрибут логирования runtime_manager.logs, который устанавливается либо передаваемым значением, либо созданным по умолчанию экземпляром LogManager.\n\n Связь между шагами подтверждена напрямую в [C2_DEPENDENCY_GRAPH].\n\n- 2.7 RuntimeManager.__init__ → RuntimeManager.workers [C2_DEPENDENCY_GRAPH]\n - Следующий шаг — установка атрибута рабочих процессов runtime_manager.workers, который устанавливается либо передаваемым значением, либо созданным по умолчанию экземпляром WorkerSupervisor.\n\n Связь между шагами подтверждена напрямую в [C2_DEPENDENCY_GRAPH].\n\n- 2.8 RuntimeManager.__init__ → RuntimeManager.control_plane [C2_DEPENDENCY_GRAPH]\n - Завершающий шаг конструктора — установка атрибута управления runtime_manager.control_plane, который устанавливается либо передаваемым значением, либо созданным по умолчанию экземпляром ControlPlaneService.\n\n Связь между шагами подтверждена напрямую в [C2_DEPENDENCY_GRAPH].\n\n3. Все связи между шагами подтверждены напрямую в предоставленных слоях RAG.\n4. Поток не содержит разрывы или участки с неполными данными.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "TRACE_FLOW", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS", + "C4_SEMANTIC_ROLES" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "TRACE_FLOW", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 10, + "C3_ENTRYPOINTS": 10 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Покажи поток выполнения RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "Покажи поток выполнения RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Покажи поток выполнения RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 10, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "Покажи поток выполнения RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 10, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 10, + "candidates_after_filter": 10 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 8, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 10, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 159, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 50, + "C0_SOURCE_CHUNKS": 22, + "C4_SEMANTIC_ROLES": 15, + "C2_DEPENDENCY_GRAPH": 56, + "C3_ENTRYPOINTS": 13 + }, + "merge_rank": 19, + "prompt_build": 0, + "llm_call": 4878 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 814, + "evidence_rows": 23, + "evidence_chars": 8302 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 8, + "unique_paths": 7 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 10, + "unique_paths": 2 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_trace_flow_ru_v2", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "RuntimeManager" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 23, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-fullchain-trace-flow-runtime-manager", + "mode": "full_chain", + "run_started_at": "2026-03-12T12:39:45", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Покажи поток выполнения RuntimeManager", + "normalized_query": "Покажи поток выполнения RuntimeManager" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Покажи поток выполнения RuntimeManager" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Покажи поток выполнения RuntimeManager" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "TRACE_FLOW", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Покажи поток выполнения RuntimeManager" + }, + "output": { + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ], + "confidence": 0.99 + }, + "rag_count": 23, + "rag_rows": [ + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager\nRuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "qname": "RuntimeManager", + "kind": "class", + "signature": "RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests manager\n- orchestrates role-like calls (4)\n- reads and writes state attributes\n- participates in dataflow slices (50)", + "layer": "C4_SEMANTIC_ROLES", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 43, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "symbol_name": "RuntimeManager", + "qname": "RuntimeManager", + "role": "pipeline_stage", + "confidence": 0.67, + "dataflow_participation": 50, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 52, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.services\n -> RuntimeManager.__init__", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 33, + "span_end": 39, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d43af85989222ee6d788ce418cdcb217c7ff044cfb915e3bdbd184417dc7bd61", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "dst_ref": "RuntimeManager.__init__", + "resolution": "resolved", + "slice_id": "d43af85989222ee6d788ce418cdcb217c7ff044cfb915e3bdbd184417dc7bd61", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.services", + "RuntimeManager.__init__" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 59, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1", + "dst_ref": "RuntimeManager.start", + "resolution": "resolved", + "slice_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.start" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager._register_core_services", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 127, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6", + "dst_ref": "RuntimeManager._register_core_services", + "resolution": "resolved", + "slice_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager._register_core_services" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.services\n -> RuntimeManager._register_core_services", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 33, + "span_end": 127, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "aac6f9dda73963b977083a892bee39a48eca4fbd7404787e022ecf4ebedec65d", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6", + "dst_ref": "RuntimeManager._register_core_services", + "resolution": "resolved", + "slice_id": "aac6f9dda73963b977083a892bee39a48eca4fbd7404787e022ecf4ebedec65d", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.services", + "RuntimeManager._register_core_services" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 10, + "C3_ENTRYPOINTS": 10 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Покажи поток выполнения RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "Покажи поток выполнения RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Покажи поток выполнения RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 10, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "Покажи поток выполнения RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 10, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 10, + "candidates_after_filter": 10 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 8, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 10, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 159, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 50, + "C0_SOURCE_CHUNKS": 22, + "C4_SEMANTIC_ROLES": 15, + "C2_DEPENDENCY_GRAPH": 56, + "C3_ENTRYPOINTS": 13 + }, + "merge_rank": 19 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Покажи поток выполнения RuntimeManager", + "rag_count": 23 + }, + "output": { + "llm_answer": "1. Точка старта: fastapi http app.post [C3_ENTRYPOINTS]\n2. \n\n- 2.1 fastapi http app.post → RuntimeManager.__init__ [C2_DEPENDENCY_GRAPH]\n - В этой точке начинается инициализация объекта RuntimeManager через его конструктор __init__. Конструктор принимает несколько параметров типа ConfigurationManager, ServiceContainer, TraceService, HealthRegistry, LogManager, WorkerSupervisor и ControlPlaneService. Параметры могут быть переданы извне или приняты по умолчанию при отсутствии переданных значений.\n \n Связь между шагами подтверждена напрямую в [C2_DEPENDENCY_GRAPH].\n\n- 2.2 RuntimeManager.__init__ → RuntimeManager.configuration [C2_DEPENDENCY_GRAPH]\n - Внутри конструктора вызывается атрибут конфигурации runtime_manager.configuration, который устанавливается либо передаваемым значением, либо созданным по умолчанию экземпляром ConfigurationManager.\n\n Связь между шагами подтверждена напрямую в [C2_DEPENDENCY_GRAPH].\n\n- 2.3 RuntimeManager.__init__ → RuntimeManager.services [C2_DEPENDENCY_GRAPH]\n - Далее внутри конструктора вызывается атрибут сервисов runtime_manager.services, который устанавливается либо передаваемым значением, либо созданным по умолчанию экземпляром ServiceContainer.\n\n Связь между шагами подтверждена напрямую в [C2_DEPENDENCY_GRAPH].\n\n- 2.4 RuntimeManager.__init__ → RuntimeManager.traces [C2_DEPENDENCY_GRAPH]\n - Затем вызывается атрибут трассировки runtime_manager.traces, который устанавливается либо передаваемым значением, либо созданным по умолчанию экземпляром TraceService.\n\n Связь между шагами подтверждена напрямую в [C2_DEPENDENCY_GRAPH].\n\n- 2.5 RuntimeManager.__init__ → RuntimeManager.health [C2_DEPENDENCY_GRAPH]\n - После этого вызывается атрибут состояния здоровья runtime_manager.health, который устанавливается либо передаваемым значением, либо созданным по умолчанию экземпляром HealthRegistry.\n\n Связь между шагами подтверждена напрямую в [C2_DEPENDENCY_GRAPH].\n\n- 2.6 RuntimeManager.__init__ → RuntimeManager.logs [C2_DEPENDENCY_GRAPH]\n - Далее вызывается атрибут логирования runtime_manager.logs, который устанавливается либо передаваемым значением, либо созданным по умолчанию экземпляром LogManager.\n\n Связь между шагами подтверждена напрямую в [C2_DEPENDENCY_GRAPH].\n\n- 2.7 RuntimeManager.__init__ → RuntimeManager.workers [C2_DEPENDENCY_GRAPH]\n - Следующий шаг — установка атрибута рабочих процессов runtime_manager.workers, который устанавливается либо передаваемым значением, либо созданным по умолчанию экземпляром WorkerSupervisor.\n\n Связь между шагами подтверждена напрямую в [C2_DEPENDENCY_GRAPH].\n\n- 2.8 RuntimeManager.__init__ → RuntimeManager.control_plane [C2_DEPENDENCY_GRAPH]\n - Завершающий шаг конструктора — установка атрибута управления runtime_manager.control_plane, который устанавливается либо передаваемым значением, либо созданным по умолчанию экземпляром ControlPlaneService.\n\n Связь между шагами подтверждена напрямую в [C2_DEPENDENCY_GRAPH].\n\n3. Все связи между шагами подтверждены напрямую в предоставленных слоях RAG.\n4. Поток не содержит разрывы или участки с неполными данными." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 814, + "evidence_rows": 23, + "evidence_chars": 8302 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 8, + "unique_paths": 7 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 10, + "unique_paths": 2 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_trace_flow_ru_v2", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 4878 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_123945/full_chain_plba_code_subintents_plba-fullchain-trace-flow-runtime-manager.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_123945/full_chain_plba_code_subintents_plba-fullchain-trace-flow-runtime-manager.md new file mode 100644 index 0000000..963eeb8 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_123945/full_chain_plba_code_subintents_plba-fullchain-trace-flow-runtime-manager.md @@ -0,0 +1,34 @@ +# plba-fullchain-trace-flow-runtime-manager + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Покажи поток выполнения RuntimeManager + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "TRACE_FLOW", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 23, + "llm_answer": "1. Точка старта: fastapi http app.post [C3_ENTRYPOINTS]\n2. \n\n- 2.1 fastapi http app.post → RuntimeManager.__init__ [C2_DEPENDENCY_GRAPH]\n - В этой точке начинается инициализация объекта RuntimeManager через его конструктор __init__. Конструктор принимает несколько параметров типа ConfigurationManager, ServiceContainer, TraceService, HealthRegistry, LogManager, WorkerSupervisor и ControlPlaneService. Параметры могут быть переданы извне или приняты по умолчанию при отсутствии переданных значений.\n \n Связь между шагами подтверждена напрямую в [C2_DEPENDENCY_GRAPH].\n\n- 2.2 RuntimeManager.__init__ → RuntimeManager.configuration [C2_DEPENDENCY_GRAPH]\n - Внутри конструктора вызывается атрибут конфигурации runtime_manager.configuration, который устанавливается либо передаваемым значением, либо созданным по умолчанию экземпляром ConfigurationManager.\n\n Связь между шагами подтверждена напрямую в [C2_DEPENDENCY_GRAPH].\n\n- 2.3 RuntimeManager.__init__ → RuntimeManager.services [C2_DEPENDENCY_GRAPH]\n - Далее внутри конструктора вызывается атрибут сервисов runtime_manager.services, который устанавливается либо передаваемым значением, либо созданным по умолчанию экземпляром ServiceContainer.\n\n Связь между шагами подтверждена напрямую в [C2_DEPENDENCY_GRAPH].\n\n- 2.4 RuntimeManager.__init__ → RuntimeManager.traces [C2_DEPENDENCY_GRAPH]\n - Затем вызывается атрибут трассировки runtime_manager.traces, который устанавливается либо передаваемым значением, либо созданным по умолчанию экземпляром TraceService.\n\n Связь между шагами подтверждена напрямую в [C2_DEPENDENCY_GRAPH].\n\n- 2.5 RuntimeManager.__init__ → RuntimeManager.health [C2_DEPENDENCY_GRAPH]\n - После этого вызывается атрибут состояния здоровья runtime_manager.health, который устанавливается либо передаваемым значением, либо созданным по умолчанию экземпляром HealthRegistry.\n\n Связь между шагами подтверждена напрямую в [C2_DEPENDENCY_GRAPH].\n\n- 2.6 RuntimeManager.__init__ → RuntimeManager.logs [C2_DEPENDENCY_GRAPH]\n - Далее вызывается атрибут логирования runtime_manager.logs, который устанавливается либо передаваемым значением, либо созданным по умолчанию экземпляром LogManager.\n\n Связь между шагами подтверждена напрямую в [C2_DEPENDENCY_GRAPH].\n\n- 2.7 RuntimeManager.__init__ → RuntimeManager.workers [C2_DEPENDENCY_GRAPH]\n - Следующий шаг — установка атрибута рабочих процессов runtime_manager.workers, который устанавливается либо передаваемым значением, либо созданным по умолчанию экземпляром WorkerSupervisor.\n\n Связь между шагами подтверждена напрямую в [C2_DEPENDENCY_GRAPH].\n\n- 2.8 RuntimeManager.__init__ → RuntimeManager.control_plane [C2_DEPENDENCY_GRAPH]\n - Завершающий шаг конструктора — установка атрибута управления runtime_manager.control_plane, который устанавливается либо передаваемым значением, либо созданным по умолчанию экземпляром ControlPlaneService.\n\n Связь между шагами подтверждена напрямую в [C2_DEPENDENCY_GRAPH].\n\n3. Все связи между шагами подтверждены напрямую в предоставленных слоях RAG.\n4. Поток не содержит разрывы или участки с неполными данными.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_123945/summary.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_123945/summary.md new file mode 100644 index 0000000..b19d874 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents/20260312_123945/summary.md @@ -0,0 +1,36 @@ +# pipeline_setup_v2 summary + +Passed: 7/7 + +| File | Case | Query | Expected sub-intent | Intent | Actual sub-intent | RAG layers | Pass | +|------|------|-------|---------------------|--------|-------------------|------------|------| +| full_chain_plba_code_subintents.yaml | plba-fullchain-open-file-runtime | Открой файл src/app_runtime/core/runtime.py | OPEN_FILE | CODE_QA | OPEN_FILE | C0_SOURCE_CHUNKS:1 | ✓ | +| full_chain_plba_code_subintents.yaml | plba-fullchain-explain-runtime-manager | Объясни как работает класс RuntimeManager | EXPLAIN | CODE_QA | EXPLAIN | C0_SOURCE_CHUNKS:1, C1_SYMBOL_CATALOG:1, C2_DEPENDENCY_GRAPH:6, C3_ENTRYPOINTS:3, C4_SEMANTIC_ROLES:1 | ✓ | +| full_chain_plba_code_subintents.yaml | plba-fullchain-find-tests-runtime-manager | Где тесты для RuntimeManager? | FIND_TESTS | CODE_QA | FIND_TESTS | C0_SOURCE_CHUNKS:10, C2_DEPENDENCY_GRAPH:6 | ✓ | +| full_chain_plba_code_subintents.yaml | plba-fullchain-find-entrypoints | Найди точки входа в коде | FIND_ENTRYPOINTS | CODE_QA | FIND_ENTRYPOINTS | C0_SOURCE_CHUNKS:6, C3_ENTRYPOINTS:3 | ✓ | +| full_chain_plba_code_subintents.yaml | plba-fullchain-trace-flow-runtime-manager | Покажи поток выполнения RuntimeManager | TRACE_FLOW | CODE_QA | TRACE_FLOW | C0_SOURCE_CHUNKS:1, C1_SYMBOL_CATALOG:1, C2_DEPENDENCY_GRAPH:10, C3_ENTRYPOINTS:3, C4_SEMANTIC_ROLES:8 | ✓ | +| full_chain_plba_code_subintents.yaml | plba-fullchain-architecture-control-plane | Какие компоненты участвуют в RuntimeManager? | ARCHITECTURE | CODE_QA | ARCHITECTURE | C0_SOURCE_CHUNKS:1, C1_SYMBOL_CATALOG:1, C2_DEPENDENCY_GRAPH:8, C3_ENTRYPOINTS:3, C4_SEMANTIC_ROLES:12 | ✓ | +| full_chain_plba_code_subintents.yaml | plba-fullchain-explain-local-runtime-manager | Почему в файле src/app_runtime/core/runtime.py класс RuntimeManager устроен так? | EXPLAIN_LOCAL | CODE_QA | EXPLAIN_LOCAL | C0_SOURCE_CHUNKS:1, C1_SYMBOL_CATALOG:1, C2_DEPENDENCY_GRAPH:4 | ✓ | + +## LLM Answers +- **plba-fullchain-open-file-runtime** + Query: Открой файл src/app_runtime/core/runtime.py + > 1. путь к файлу: src/app\_runtime/core/runtime.py 2. В доступных фрагментах видна начальная часть класса RuntimeManager. 3. Top\-level сущности и секции: класс RuntimeManager с методом \_\_init\_\_, методом \_register\_core\_services и частично виден метод register\_module. 4. Важно для вопроса пользователя: \- Класс RuntimeManager является основным управляющим объектом для runtime\-среды. \- В конструкторе инициализируются основные компоненты системы \(ConfigurationManager, ServiceContainer, TraceService и др.\). \- Метод \_register\_core\_services вероятно отвечает за регистрацию основных сервисов приложения. \- Метод register\_module используется для регистрации модулей приложения. +- **plba-fullchain-explain-runtime-manager** + Query: Объясни как работает класс RuntimeManager + > 1. Что это и где определено. Сущность \`RuntimeManager\` объявлена в файле \`src/app\_runtime/core/runtime.py\`. 2. Назначение по наблюдаемому коду. Класс предназначен для управления жизненным циклом приложения и координации работы различных компонентов системы. Судя по документации и контекстным подсказкам, он играет роль менеджера, отвечающего за инициализацию и управление сервисами, регистрацией модулей и отслеживанием состояния системы. 3. Подтверждённые зависимости или взаимодействия. \`RuntimeManager\` зависит от следующих сущностей: \- \`ConfigurationManager\` \- \`ServiceContainer\` \- \`TraceService\` \- \`HealthRegistry\` \- \`LogManager\` \- \`WorkerSupervisor\` \- \`ControlPlaneService\` \- \`ApplicationModule\` Эти зависимости передаются конструктору класса при его создании. 4. Что делает по шагам, если это видно в контексте. При инициализации объекта класса происходит следующее: \- Пр… +- **plba-fullchain-find-tests-runtime-manager** + Query: Где тесты для RuntimeManager? + > 1. Прямые тесты: \- tests/test\_runtime.py \| test\_runtime\_runs\_worker\_routine\_and\_exposes\_status \- Проверка: RuntimeManager запускает worker routine и правильно выставляет статус. \- tests/test\_runtime.py \| test\_runtime\_graceful\_stop\_waits\_until\_worker\_finishes \- Проверка: RuntimeManager корректно завершает работу после graceful stop. 2. Косвенные или ближайшие тесты: \- tests/test\_business\_control\_actions.py \| \_build\_runtime \- Проверка: косвенно подтверждает создание экземпляра RuntimeManager в бизнес\-контроллерах. \- tests/test\_business\_control\_actions.py \| test\_worker\_wakes\_up\_with\_configured\_interval \- Проверка: косвенно подтверждает использование RuntimeManager при настройке интервалов выполнения задач. 3. Пробелы покрытия: \- Не найдены явные тесты, которые покрывают все возможные сценарии использования RuntimeManager, такие как регистрация нескольких модулей, обрабо… +- **plba-fullchain-find-entrypoints** + Query: Найди точки входа в коде + > \*\*Подтверждённые точки входа:\*\* 1. \*\*src/app\_runtime/control/http\_app.py \| app.post\*\* \- fastapi http app.post \- Признак: декоратор FastAPI \`app.post\`, явно указывает на точку старта HTTP\-запроса. 2. \*\*src/app\_runtime/control/http\_app.py \| app.get\*\* \- fastapi http app.get \- Признак: декоратор FastAPI \`app.get\`, явно указывает на точку старта HTTP\-запроса. \*\*Возможные кандидаты:\*\* В предоставленном контексте нет дополнительных сущностей или файлов, которые могли бы считаться возможными кандидатами на роль точек входа. +- **plba-fullchain-trace-flow-runtime-manager** + Query: Покажи поток выполнения RuntimeManager + > 1. Точка старта: fastapi http app.post \[C3\_ENTRYPOINTS\] 2. \- 2.1 fastapi http app.post → RuntimeManager.\_\_init\_\_ \[C2\_DEPENDENCY\_GRAPH\] \- В этой точке начинается инициализация объекта RuntimeManager через его конструктор \_\_init\_\_. Конструктор принимает несколько параметров типа ConfigurationManager, ServiceContainer, TraceService, HealthRegistry, LogManager, WorkerSupervisor и ControlPlaneService. Параметры могут быть переданы извне или приняты по умолчанию при отсутствии переданных значений. Связь между шагами подтверждена напрямую в \[C2\_DEPENDENCY\_GRAPH\]. \- 2.2 RuntimeManager.\_\_init\_\_ → RuntimeManager.configuration \[C2\_DEPENDENCY\_GRAPH\] \- Внутри конструктора вызывается атрибут конфигурации runtime\_manager.configuration, который устанавливается либо передаваемым значением, либо созданным по умолчанию экземпляром ConfigurationManager. Связь между шагами подтверждена н… +- **plba-fullchain-architecture-control-plane** + Query: Какие компоненты участвуют в RuntimeManager? + > 1. \*\*Компоненты, которые подтверждены контекстом\*\*: \- RuntimeManager \- ControlActionSet \- ControlPlaneService 2. \*\*Подтверждённые связи между ними\*\*: \- RuntimeManager вызывает метод \`start\` для инициализации. \- ControlPlaneService инициализирует каналы данных через метод \`\_channels\`. \- ControlPlaneService запускает асинхронную обработку через метод \`\_start\_async\`. 3. \*\*Границы ответственности, если они реально видны в коде\*\*: \- RuntimeManager отвечает за управление жизненным циклом системы, включая чтение и запись состояния атрибутов. \- ControlActionSet выполняет роль модели и предоставляет базовые функции поведения. \- ControlPlaneService управляет сервисами канала данных и их асинхронной обработкой. 4. \*\*Что остаётся неизвестным или неполным\*\*: \- Детали реализации взаимодействия между ControlActionSet и RuntimeManager остаются неясными. \- Полная структура данных пот… +- **plba-fullchain-explain-local-runtime-manager** + Query: Почему в файле src/app_runtime/core/runtime.py класс RuntimeManager устроен так? + > Класс \`RuntimeManager\` управляет инициализацией и запуском различных компонентов приложения во время выполнения \(runtime\). \#\#\# Что делает данный класс: \- Инициализирует основные компоненты системы \(\`configuration\`, \`services\`, \`traces\`, \`health\`, \`logs\`, \`workers\`, \`control\_plane\`\) с возможностью передачи пользовательских значений через параметры конструктора. Если значения не переданы, используются дефолтные экземпляры соответствующих классов. \- Содержит переменные состояния для отслеживания фазы жизненного цикла приложения: \- \`\_started\`: флаг, указывающий, запущен ли runtime. \- \`\_state\`: текущее состояние жизненного цикла \(\`IDLE\`, \`RUNNING\`, etc.\). \- \`\_core\_registered\`: регистрированы ли базовые сервисы. \- \`\_workers\_registered\`: зарегистрированы ли рабочие задачи. \- Вызывает приватную функцию \`\_register\_core\_services\(\)\` сразу после создания объекта, чтобы зарегистр… \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-architecture-control-plane.json b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-architecture-control-plane.json new file mode 100644 index 0000000..be874e5 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-architecture-control-plane.json @@ -0,0 +1,2940 @@ +{ + "case_id": "plba-v2-architecture-control-plane", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "ARCHITECTURE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 25, + "llm_answer": "1. **Компоненты, которые подтверждены контекстом**:\n - ControlPlaneService\n - ControlActionSet\n\n2. **Подтверждённые связи между ними**:\n - ControlPlaneService зависит от ControlActionSet через регистрацию каналов (_channels):\n ```\n ControlPlaneService.__init__ -> ControlPlaneService._channels -> ControlPlaneService.register_channel(ControlActionSet)\n ```\n\n3. **Границы ответственности, если они реально видны в коде**:\n - ControlPlaneService отвечает за инициализацию и управление каналами данных, регистрируя экземпляры ControlActionSet для работы с данными потока.\n \n4. **Что остаётся неизвестным или неполным**:\n - Детали реализации метода `register_channel` и его взаимодействия с другими компонентами системы остаются неясными на основании предоставленного контекста.\n - Неизвестно точно, какие именно каналы и действия регистрируются и используются внутри `ControlPlaneService`.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "ControlPlaneService" + ], + "layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-v2-architecture-control-plane", + "text": "Какие компоненты участвуют в ControlPlaneService?", + "mode": "full_chain", + "run_started_at": "2026-03-12T12:55:37", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Какие компоненты участвуют в ControlPlaneService?", + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "ControlPlaneService", + "alternatives": [ + "ControlPlaneService" + ], + "confidence": 0.99 + }, + "rag_count": 25, + "rag_rows": [ + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/queue/in_memory.py", + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)", + "layer": "C4_SEMANTIC_ROLES", + "title": "InMemoryTaskQueue", + "span_start": 9, + "span_end": 38, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 22, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "2da04cb94544a3bcbf0943a95ad4bdd8710bcafaa32a02fd0e4de2178dcf3533", + "symbol_name": "InMemoryTaskQueue", + "qname": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 9, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "58f0cc001ccda0eee4c6bc32ed83bd05eafd6b6644f1e8b4aa9eed3103db73dc", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "ConfigFileLoader\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (8)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ConfigFileLoader", + "span_start": 11, + "span_end": 48, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 23, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "a8474eca8b6e9dc86ae67ed68b16fa5fb639ef08739c053e7b7195489765667f", + "symbol_name": "ConfigFileLoader", + "qname": "ConfigFileLoader", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 8, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/store.py", + "content": "TraceContextStore\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "TraceContextStore", + "span_start": 15, + "span_end": 52, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b2dad4fbe16ffb11b58deba311c7739955c39d59f291b22181f33e9c8cce4059", + "symbol_name": "TraceContextStore", + "qname": "TraceContextStore", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "d369554f08fc92039c6edd5a2a1e73b23901533e8974459170bbd9347d263dc5", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workers/supervisor.py", + "content": "WorkerSupervisor\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkerSupervisor", + "span_start": 10, + "span_end": 59, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "c17b44e8d9e97d490989b21fa67d7c346cdda8a0472e4c41fb243c8846faa124", + "symbol_name": "WorkerSupervisor", + "qname": "WorkerSupervisor", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "77609d9d5927171cce7fc3a54897c183fd63068710c6362029b700937aae5eee", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowEngine", + "span_start": 10, + "span_end": 86, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "57ec0a9f11c542c78e008684a888397e8d9ef4223671acb2567e631a0cbc70b4", + "symbol_name": "WorkflowEngine", + "qname": "WorkflowEngine", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.start calls asyncio.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.start:calls", + "span_start": 22, + "span_end": 22, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "4e0b3147fb867d48d26567570c259f4052a739e3098133802d4b8bafcf03be6b", + "edge_type": "calls", + "src_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "src_qname": "ControlPlaneService.start", + "dst_symbol_id": null, + "dst_ref": "asyncio.run", + "resolution": "partial", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.register_channel reads_attr ControlPlaneService._channels", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.register_channel:reads_attr", + "span_start": 17, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3101fdc99a7a9c5aebf18a024bc148d37b348248a6fd02b95724dff280f2908a", + "edge_type": "reads_attr", + "src_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "src_qname": "ControlPlaneService.register_channel", + "dst_symbol_id": null, + "dst_ref": "ControlPlaneService._channels", + "resolution": "partial", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.start reads_attr ControlPlaneService._channels", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.start:reads_attr", + "span_start": 20, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "9452e50ef27d47c30ee1c311c48fe73ecddbf7a6dbcf967a6345e98222d9f71a", + "edge_type": "reads_attr", + "src_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "src_qname": "ControlPlaneService.start", + "dst_symbol_id": null, + "dst_ref": "ControlPlaneService._channels", + "resolution": "partial", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "class ControlPlaneService\nControlPlaneService", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "qname": "ControlPlaneService", + "kind": "class", + "signature": "ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "class ControlPlaneService:\n def __init__(self) -> None:\n self._channels: list[ControlChannel] = []\n\n def register_channel(self, channel: ControlChannel) -> None:\n self._channels.append(channel)\n\n def start(self, runtime: RuntimeManager) -> None:\n if not self._channels:\n return\n asyncio.run(self._start_async(runtime))\n\n def stop(self) -> None:\n if not self._channels:\n return\n asyncio.run(self._stop_async())\n\n def snapshot(self, runtime: RuntimeManager) -> dict[str, object]:\n health = runtime.current_health()\n return {\n \"runtime\": {\"state\": runtime._state.value},\n \"modules\": list(runtime.registry.modules),\n \"services\": runtime.services.snapshot(),\n \"workers\": runtime.workers.snapshot(),\n \"health\": runtime.health.snapshot(runtime.workers.healths()) | {\"status\": health[\"status\"]},\n \"config\": runtime.configuration.get(),\n }\n\n async def _start_async(self, runtime: RuntimeManager) -> None:\n actions = ControlActionSet(\n health=runtime.health_status,\n start=runtime.start_runtime,\n stop=runtime.stop_runtime,\n status=runtime.runtime_status,\n )\n for channel in self._channels:\n await channel.start(actions)\n\n async def _stop_async(self) -> None:\n for channel in reversed(self._channels):\n await channel.stop()", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/service.py:ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "1. **Компоненты, которые подтверждены контекстом**:\n - ControlPlaneService\n - ControlActionSet\n\n2. **Подтверждённые связи между ними**:\n - ControlPlaneService зависит от ControlActionSet через регистрацию каналов (_channels):\n ```\n ControlPlaneService.__init__ -> ControlPlaneService._channels -> ControlPlaneService.register_channel(ControlActionSet)\n ```\n\n3. **Границы ответственности, если они реально видны в коде**:\n - ControlPlaneService отвечает за инициализацию и управление каналами данных, регистрируя экземпляры ControlActionSet для работы с данными потока.\n \n4. **Что остаётся неизвестным или неполным**:\n - Детали реализации метода `register_channel` и его взаимодействия с другими компонентами системы остаются неясными на основании предоставленного контекста.\n - Неизвестно точно, какие именно каналы и действия регистрируются и используются внутри `ControlPlaneService`.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "ARCHITECTURE", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS", + "C4_SEMANTIC_ROLES" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "ARCHITECTURE", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "ControlPlaneService" + ], + "keyword_hints": [ + "ControlPlaneService" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C4_SEMANTIC_ROLES": 12, + "C3_ENTRYPOINTS": 8, + "C2_DEPENDENCY_GRAPH": 8, + "C1_SYMBOL_CATALOG": 6, + "C0_SOURCE_CHUNKS": 4 + }, + "filters_by_layer": { + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C4_SEMANTIC_ROLES", + "query": "Какие компоненты участвуют в ControlPlaneService?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 12, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "Какие компоненты участвуют в ControlPlaneService?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Какие компоненты участвуют в ControlPlaneService?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C1_SYMBOL_CATALOG", + "query": "ControlPlaneService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Какие компоненты участвуют в ControlPlaneService?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 4, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 12, + "candidates_after_filter": 12 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 4, + "candidates_after_filter": 4 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "ControlPlaneService", + "alternatives": [ + "ControlPlaneService" + ] + }, + "layers": [ + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 12, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 8, + "fail_reason": null + }, + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 157, + "retrieval_by_layer": { + "C4_SEMANTIC_ROLES": 32, + "C3_ENTRYPOINTS": 15, + "C2_DEPENDENCY_GRAPH": 68, + "C1_SYMBOL_CATALOG": 25, + "C0_SOURCE_CHUNKS": 15 + }, + "merge_rank": 21, + "prompt_build": 0, + "llm_call": 1517 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 544, + "evidence_rows": 25, + "evidence_chars": 3723 + }, + "evidence_summary": [ + { + "layer": "C4_SEMANTIC_ROLES", + "count": 12, + "unique_paths": 11 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 8, + "unique_paths": 1 + }, + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_architecture_ru_v2", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "ControlPlaneService" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 25, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-v2-architecture-control-plane", + "mode": "full_chain", + "run_started_at": "2026-03-12T12:55:37", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Какие компоненты участвуют в ControlPlaneService?", + "normalized_query": "Какие компоненты участвуют в ControlPlaneService?" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Какие компоненты участвуют в ControlPlaneService?" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Какие компоненты участвуют в ControlPlaneService?" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "ARCHITECTURE", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "ControlPlaneService" + ], + "keyword_hints": [ + "ControlPlaneService" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Какие компоненты участвуют в ControlPlaneService?" + }, + "output": { + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "ControlPlaneService", + "alternatives": [ + "ControlPlaneService" + ], + "confidence": 0.99 + }, + "rag_count": 25, + "rag_rows": [ + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/queue/in_memory.py", + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)", + "layer": "C4_SEMANTIC_ROLES", + "title": "InMemoryTaskQueue", + "span_start": 9, + "span_end": 38, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 22, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "2da04cb94544a3bcbf0943a95ad4bdd8710bcafaa32a02fd0e4de2178dcf3533", + "symbol_name": "InMemoryTaskQueue", + "qname": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 9, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "58f0cc001ccda0eee4c6bc32ed83bd05eafd6b6644f1e8b4aa9eed3103db73dc", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "ConfigFileLoader\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (8)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ConfigFileLoader", + "span_start": 11, + "span_end": 48, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 23, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "a8474eca8b6e9dc86ae67ed68b16fa5fb639ef08739c053e7b7195489765667f", + "symbol_name": "ConfigFileLoader", + "qname": "ConfigFileLoader", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 8, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/store.py", + "content": "TraceContextStore\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "TraceContextStore", + "span_start": 15, + "span_end": 52, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b2dad4fbe16ffb11b58deba311c7739955c39d59f291b22181f33e9c8cce4059", + "symbol_name": "TraceContextStore", + "qname": "TraceContextStore", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "d369554f08fc92039c6edd5a2a1e73b23901533e8974459170bbd9347d263dc5", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workers/supervisor.py", + "content": "WorkerSupervisor\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkerSupervisor", + "span_start": 10, + "span_end": 59, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "c17b44e8d9e97d490989b21fa67d7c346cdda8a0472e4c41fb243c8846faa124", + "symbol_name": "WorkerSupervisor", + "qname": "WorkerSupervisor", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "77609d9d5927171cce7fc3a54897c183fd63068710c6362029b700937aae5eee", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowEngine", + "span_start": 10, + "span_end": 86, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "57ec0a9f11c542c78e008684a888397e8d9ef4223671acb2567e631a0cbc70b4", + "symbol_name": "WorkflowEngine", + "qname": "WorkflowEngine", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.start calls asyncio.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.start:calls", + "span_start": 22, + "span_end": 22, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "4e0b3147fb867d48d26567570c259f4052a739e3098133802d4b8bafcf03be6b", + "edge_type": "calls", + "src_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "src_qname": "ControlPlaneService.start", + "dst_symbol_id": null, + "dst_ref": "asyncio.run", + "resolution": "partial", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.register_channel reads_attr ControlPlaneService._channels", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.register_channel:reads_attr", + "span_start": 17, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3101fdc99a7a9c5aebf18a024bc148d37b348248a6fd02b95724dff280f2908a", + "edge_type": "reads_attr", + "src_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "src_qname": "ControlPlaneService.register_channel", + "dst_symbol_id": null, + "dst_ref": "ControlPlaneService._channels", + "resolution": "partial", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.start reads_attr ControlPlaneService._channels", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.start:reads_attr", + "span_start": 20, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "9452e50ef27d47c30ee1c311c48fe73ecddbf7a6dbcf967a6345e98222d9f71a", + "edge_type": "reads_attr", + "src_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "src_qname": "ControlPlaneService.start", + "dst_symbol_id": null, + "dst_ref": "ControlPlaneService._channels", + "resolution": "partial", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "class ControlPlaneService\nControlPlaneService", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "qname": "ControlPlaneService", + "kind": "class", + "signature": "ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "class ControlPlaneService:\n def __init__(self) -> None:\n self._channels: list[ControlChannel] = []\n\n def register_channel(self, channel: ControlChannel) -> None:\n self._channels.append(channel)\n\n def start(self, runtime: RuntimeManager) -> None:\n if not self._channels:\n return\n asyncio.run(self._start_async(runtime))\n\n def stop(self) -> None:\n if not self._channels:\n return\n asyncio.run(self._stop_async())\n\n def snapshot(self, runtime: RuntimeManager) -> dict[str, object]:\n health = runtime.current_health()\n return {\n \"runtime\": {\"state\": runtime._state.value},\n \"modules\": list(runtime.registry.modules),\n \"services\": runtime.services.snapshot(),\n \"workers\": runtime.workers.snapshot(),\n \"health\": runtime.health.snapshot(runtime.workers.healths()) | {\"status\": health[\"status\"]},\n \"config\": runtime.configuration.get(),\n }\n\n async def _start_async(self, runtime: RuntimeManager) -> None:\n actions = ControlActionSet(\n health=runtime.health_status,\n start=runtime.start_runtime,\n stop=runtime.stop_runtime,\n status=runtime.runtime_status,\n )\n for channel in self._channels:\n await channel.start(actions)\n\n async def _stop_async(self) -> None:\n for channel in reversed(self._channels):\n await channel.stop()", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/service.py:ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C4_SEMANTIC_ROLES": 12, + "C3_ENTRYPOINTS": 8, + "C2_DEPENDENCY_GRAPH": 8, + "C1_SYMBOL_CATALOG": 6, + "C0_SOURCE_CHUNKS": 4 + }, + "filters_by_layer": { + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C4_SEMANTIC_ROLES", + "query": "Какие компоненты участвуют в ControlPlaneService?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 12, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "Какие компоненты участвуют в ControlPlaneService?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Какие компоненты участвуют в ControlPlaneService?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C1_SYMBOL_CATALOG", + "query": "ControlPlaneService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Какие компоненты участвуют в ControlPlaneService?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 4, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 12, + "candidates_after_filter": 12 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 4, + "candidates_after_filter": 4 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "ControlPlaneService", + "alternatives": [ + "ControlPlaneService" + ] + }, + "layers": [ + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 12, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 8, + "fail_reason": null + }, + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 157, + "retrieval_by_layer": { + "C4_SEMANTIC_ROLES": 32, + "C3_ENTRYPOINTS": 15, + "C2_DEPENDENCY_GRAPH": 68, + "C1_SYMBOL_CATALOG": 25, + "C0_SOURCE_CHUNKS": 15 + }, + "merge_rank": 21 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Какие компоненты участвуют в ControlPlaneService?", + "rag_count": 25 + }, + "output": { + "llm_answer": "1. **Компоненты, которые подтверждены контекстом**:\n - ControlPlaneService\n - ControlActionSet\n\n2. **Подтверждённые связи между ними**:\n - ControlPlaneService зависит от ControlActionSet через регистрацию каналов (_channels):\n ```\n ControlPlaneService.__init__ -> ControlPlaneService._channels -> ControlPlaneService.register_channel(ControlActionSet)\n ```\n\n3. **Границы ответственности, если они реально видны в коде**:\n - ControlPlaneService отвечает за инициализацию и управление каналами данных, регистрируя экземпляры ControlActionSet для работы с данными потока.\n \n4. **Что остаётся неизвестным или неполным**:\n - Детали реализации метода `register_channel` и его взаимодействия с другими компонентами системы остаются неясными на основании предоставленного контекста.\n - Неизвестно точно, какие именно каналы и действия регистрируются и используются внутри `ControlPlaneService`." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 544, + "evidence_rows": 25, + "evidence_chars": 3723 + }, + "evidence_summary": [ + { + "layer": "C4_SEMANTIC_ROLES", + "count": 12, + "unique_paths": 11 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 8, + "unique_paths": 1 + }, + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_architecture_ru_v2", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 1517 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-architecture-control-plane.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-architecture-control-plane.md new file mode 100644 index 0000000..0a317f9 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-architecture-control-plane.md @@ -0,0 +1,34 @@ +# plba-v2-architecture-control-plane + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Какие компоненты участвуют в ControlPlaneService? + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "ARCHITECTURE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 25, + "llm_answer": "1. **Компоненты, которые подтверждены контекстом**:\n - ControlPlaneService\n - ControlActionSet\n\n2. **Подтверждённые связи между ними**:\n - ControlPlaneService зависит от ControlActionSet через регистрацию каналов (_channels):\n ```\n ControlPlaneService.__init__ -> ControlPlaneService._channels -> ControlPlaneService.register_channel(ControlActionSet)\n ```\n\n3. **Границы ответственности, если они реально видны в коде**:\n - ControlPlaneService отвечает за инициализацию и управление каналами данных, регистрируя экземпляры ControlActionSet для работы с данными потока.\n \n4. **Что остаётся неизвестным или неполным**:\n - Детали реализации метода `register_channel` и его взаимодействия с другими компонентами системы остаются неясными на основании предоставленного контекста.\n - Неизвестно точно, какие именно каналы и действия регистрируются и используются внутри `ControlPlaneService`.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "ControlPlaneService" + ], + "layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-architecture-runtime-manager.json b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-architecture-runtime-manager.json new file mode 100644 index 0000000..c819310 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-architecture-runtime-manager.json @@ -0,0 +1,3036 @@ +{ + "case_id": "plba-v2-architecture-runtime-manager", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "ARCHITECTURE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 25, + "llm_answer": "1. **Компоненты, которые подтверждены контекстом**:\n - RuntimeManager\n - ControlActionSet\n - ControlPlaneService\n \n2. **Подтверждённые связи между ними**:\n - RuntimeManager инициирует ControlPlaneService через его метод `__init__` (`ControlPlaneService.__init__:dataflow_slice`).\n - ControlPlaneService используется внутри RuntimeManager для управления данными потока (`ControlPlaneService._channels`, `ControlPlaneService._start_async`).\n \n3. **Границы ответственности, если они реально видны в коде**:\n - RuntimeManager отвечает за координацию и управление операциями, связанными с состоянием приложения и потоками данных. Он управляет конфигурацией и запуском.\n - ControlActionSet выступает в качестве модели, выполняющей стандартные действия или вызовы на основе поступающих запросов.\n - ControlPlaneService ответственен за инициализацию каналов и запуск асинхронных операций.\n\n4. **Что остаётся неизвестным или неполным**:\n - Не полностью раскрыто взаимодействие ControlActionSet с RuntimeManager относительно конкретных вызовов или событий.\n - Нет информации о точном взаимодействии с внешними сервисами или точными интерфейсами обмена данными между компонентами.\n - Непонятно, какие конкретно данные передаются между компонентами и как именно происходит обмен состояниями и событиями.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-v2-architecture-runtime-manager", + "text": "Какие компоненты участвуют в RuntimeManager?", + "mode": "full_chain", + "run_started_at": "2026-03-12T12:55:37", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Какие компоненты участвуют в RuntimeManager?", + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ], + "confidence": 0.99 + }, + "rag_count": 25, + "rag_rows": [ + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests manager\n- orchestrates role-like calls (4)\n- reads and writes state attributes\n- participates in dataflow slices (50)", + "layer": "C4_SEMANTIC_ROLES", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 43, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "symbol_name": "RuntimeManager", + "qname": "RuntimeManager", + "role": "pipeline_stage", + "confidence": 0.67, + "dataflow_participation": 50, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/queue/in_memory.py", + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)", + "layer": "C4_SEMANTIC_ROLES", + "title": "InMemoryTaskQueue", + "span_start": 9, + "span_end": 38, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 22, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "2da04cb94544a3bcbf0943a95ad4bdd8710bcafaa32a02fd0e4de2178dcf3533", + "symbol_name": "InMemoryTaskQueue", + "qname": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 9, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "58f0cc001ccda0eee4c6bc32ed83bd05eafd6b6644f1e8b4aa9eed3103db73dc", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "ConfigFileLoader\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (8)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ConfigFileLoader", + "span_start": 11, + "span_end": 48, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 23, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "a8474eca8b6e9dc86ae67ed68b16fa5fb639ef08739c053e7b7195489765667f", + "symbol_name": "ConfigFileLoader", + "qname": "ConfigFileLoader", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 8, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/store.py", + "content": "TraceContextStore\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "TraceContextStore", + "span_start": 15, + "span_end": 52, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b2dad4fbe16ffb11b58deba311c7739955c39d59f291b22181f33e9c8cce4059", + "symbol_name": "TraceContextStore", + "qname": "TraceContextStore", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "d369554f08fc92039c6edd5a2a1e73b23901533e8974459170bbd9347d263dc5", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workers/supervisor.py", + "content": "WorkerSupervisor\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkerSupervisor", + "span_start": 10, + "span_end": 59, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "c17b44e8d9e97d490989b21fa67d7c346cdda8a0472e4c41fb243c8846faa124", + "symbol_name": "WorkerSupervisor", + "qname": "WorkerSupervisor", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "77609d9d5927171cce7fc3a54897c183fd63068710c6362029b700937aae5eee", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 59, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1", + "dst_ref": "RuntimeManager.start", + "resolution": "resolved", + "slice_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.start" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 52, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager._register_core_services", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 127, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6", + "dst_ref": "RuntimeManager._register_core_services", + "resolution": "resolved", + "slice_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager._register_core_services" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager\nRuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "qname": "RuntimeManager", + "kind": "class", + "signature": "RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "1. **Компоненты, которые подтверждены контекстом**:\n - RuntimeManager\n - ControlActionSet\n - ControlPlaneService\n \n2. **Подтверждённые связи между ними**:\n - RuntimeManager инициирует ControlPlaneService через его метод `__init__` (`ControlPlaneService.__init__:dataflow_slice`).\n - ControlPlaneService используется внутри RuntimeManager для управления данными потока (`ControlPlaneService._channels`, `ControlPlaneService._start_async`).\n \n3. **Границы ответственности, если они реально видны в коде**:\n - RuntimeManager отвечает за координацию и управление операциями, связанными с состоянием приложения и потоками данных. Он управляет конфигурацией и запуском.\n - ControlActionSet выступает в качестве модели, выполняющей стандартные действия или вызовы на основе поступающих запросов.\n - ControlPlaneService ответственен за инициализацию каналов и запуск асинхронных операций.\n\n4. **Что остаётся неизвестным или неполным**:\n - Не полностью раскрыто взаимодействие ControlActionSet с RuntimeManager относительно конкретных вызовов или событий.\n - Нет информации о точном взаимодействии с внешними сервисами или точными интерфейсами обмена данными между компонентами.\n - Непонятно, какие конкретно данные передаются между компонентами и как именно происходит обмен состояниями и событиями.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "ARCHITECTURE", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS", + "C4_SEMANTIC_ROLES" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "ARCHITECTURE", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C4_SEMANTIC_ROLES": 12, + "C3_ENTRYPOINTS": 8, + "C2_DEPENDENCY_GRAPH": 8, + "C1_SYMBOL_CATALOG": 6, + "C0_SOURCE_CHUNKS": 4 + }, + "filters_by_layer": { + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C4_SEMANTIC_ROLES", + "query": "Какие компоненты участвуют в RuntimeManager?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 12, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "Какие компоненты участвуют в RuntimeManager?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Какие компоненты участвуют в RuntimeManager?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C1_SYMBOL_CATALOG", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Какие компоненты участвуют в RuntimeManager?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 4, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 12, + "candidates_after_filter": 12 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 4, + "candidates_after_filter": 4 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ] + }, + "layers": [ + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 12, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 8, + "fail_reason": null + }, + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 150, + "retrieval_by_layer": { + "C4_SEMANTIC_ROLES": 30, + "C3_ENTRYPOINTS": 16, + "C2_DEPENDENCY_GRAPH": 62, + "C1_SYMBOL_CATALOG": 24, + "C0_SOURCE_CHUNKS": 16 + }, + "merge_rank": 19, + "prompt_build": 0, + "llm_call": 2083 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 537, + "evidence_rows": 25, + "evidence_chars": 8651 + }, + "evidence_summary": [ + { + "layer": "C4_SEMANTIC_ROLES", + "count": 12, + "unique_paths": 11 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 8, + "unique_paths": 2 + }, + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_architecture_ru_v2", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "RuntimeManager" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 25, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-v2-architecture-runtime-manager", + "mode": "full_chain", + "run_started_at": "2026-03-12T12:55:37", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Какие компоненты участвуют в RuntimeManager?", + "normalized_query": "Какие компоненты участвуют в RuntimeManager?" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Какие компоненты участвуют в RuntimeManager?" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Какие компоненты участвуют в RuntimeManager?" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "ARCHITECTURE", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Какие компоненты участвуют в RuntimeManager?" + }, + "output": { + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ], + "confidence": 0.99 + }, + "rag_count": 25, + "rag_rows": [ + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests manager\n- orchestrates role-like calls (4)\n- reads and writes state attributes\n- participates in dataflow slices (50)", + "layer": "C4_SEMANTIC_ROLES", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 43, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "symbol_name": "RuntimeManager", + "qname": "RuntimeManager", + "role": "pipeline_stage", + "confidence": 0.67, + "dataflow_participation": 50, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/queue/in_memory.py", + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)", + "layer": "C4_SEMANTIC_ROLES", + "title": "InMemoryTaskQueue", + "span_start": 9, + "span_end": 38, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 22, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "2da04cb94544a3bcbf0943a95ad4bdd8710bcafaa32a02fd0e4de2178dcf3533", + "symbol_name": "InMemoryTaskQueue", + "qname": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 9, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "58f0cc001ccda0eee4c6bc32ed83bd05eafd6b6644f1e8b4aa9eed3103db73dc", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "ConfigFileLoader\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (8)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ConfigFileLoader", + "span_start": 11, + "span_end": 48, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 23, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "a8474eca8b6e9dc86ae67ed68b16fa5fb639ef08739c053e7b7195489765667f", + "symbol_name": "ConfigFileLoader", + "qname": "ConfigFileLoader", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 8, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/store.py", + "content": "TraceContextStore\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "TraceContextStore", + "span_start": 15, + "span_end": 52, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b2dad4fbe16ffb11b58deba311c7739955c39d59f291b22181f33e9c8cce4059", + "symbol_name": "TraceContextStore", + "qname": "TraceContextStore", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "d369554f08fc92039c6edd5a2a1e73b23901533e8974459170bbd9347d263dc5", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workers/supervisor.py", + "content": "WorkerSupervisor\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkerSupervisor", + "span_start": 10, + "span_end": 59, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "c17b44e8d9e97d490989b21fa67d7c346cdda8a0472e4c41fb243c8846faa124", + "symbol_name": "WorkerSupervisor", + "qname": "WorkerSupervisor", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "77609d9d5927171cce7fc3a54897c183fd63068710c6362029b700937aae5eee", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 59, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1", + "dst_ref": "RuntimeManager.start", + "resolution": "resolved", + "slice_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.start" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 52, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager._register_core_services", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 127, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6", + "dst_ref": "RuntimeManager._register_core_services", + "resolution": "resolved", + "slice_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager._register_core_services" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager\nRuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "qname": "RuntimeManager", + "kind": "class", + "signature": "RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C4_SEMANTIC_ROLES": 12, + "C3_ENTRYPOINTS": 8, + "C2_DEPENDENCY_GRAPH": 8, + "C1_SYMBOL_CATALOG": 6, + "C0_SOURCE_CHUNKS": 4 + }, + "filters_by_layer": { + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C4_SEMANTIC_ROLES", + "query": "Какие компоненты участвуют в RuntimeManager?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 12, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "Какие компоненты участвуют в RuntimeManager?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Какие компоненты участвуют в RuntimeManager?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C1_SYMBOL_CATALOG", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Какие компоненты участвуют в RuntimeManager?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 4, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 12, + "candidates_after_filter": 12 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 4, + "candidates_after_filter": 4 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ] + }, + "layers": [ + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 12, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 8, + "fail_reason": null + }, + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 150, + "retrieval_by_layer": { + "C4_SEMANTIC_ROLES": 30, + "C3_ENTRYPOINTS": 16, + "C2_DEPENDENCY_GRAPH": 62, + "C1_SYMBOL_CATALOG": 24, + "C0_SOURCE_CHUNKS": 16 + }, + "merge_rank": 19 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Какие компоненты участвуют в RuntimeManager?", + "rag_count": 25 + }, + "output": { + "llm_answer": "1. **Компоненты, которые подтверждены контекстом**:\n - RuntimeManager\n - ControlActionSet\n - ControlPlaneService\n \n2. **Подтверждённые связи между ними**:\n - RuntimeManager инициирует ControlPlaneService через его метод `__init__` (`ControlPlaneService.__init__:dataflow_slice`).\n - ControlPlaneService используется внутри RuntimeManager для управления данными потока (`ControlPlaneService._channels`, `ControlPlaneService._start_async`).\n \n3. **Границы ответственности, если они реально видны в коде**:\n - RuntimeManager отвечает за координацию и управление операциями, связанными с состоянием приложения и потоками данных. Он управляет конфигурацией и запуском.\n - ControlActionSet выступает в качестве модели, выполняющей стандартные действия или вызовы на основе поступающих запросов.\n - ControlPlaneService ответственен за инициализацию каналов и запуск асинхронных операций.\n\n4. **Что остаётся неизвестным или неполным**:\n - Не полностью раскрыто взаимодействие ControlActionSet с RuntimeManager относительно конкретных вызовов или событий.\n - Нет информации о точном взаимодействии с внешними сервисами или точными интерфейсами обмена данными между компонентами.\n - Непонятно, какие конкретно данные передаются между компонентами и как именно происходит обмен состояниями и событиями." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 537, + "evidence_rows": 25, + "evidence_chars": 8651 + }, + "evidence_summary": [ + { + "layer": "C4_SEMANTIC_ROLES", + "count": 12, + "unique_paths": 11 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 8, + "unique_paths": 2 + }, + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_architecture_ru_v2", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 2083 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-architecture-runtime-manager.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-architecture-runtime-manager.md new file mode 100644 index 0000000..d69ffd0 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-architecture-runtime-manager.md @@ -0,0 +1,34 @@ +# plba-v2-architecture-runtime-manager + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Какие компоненты участвуют в RuntimeManager? + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "ARCHITECTURE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 25, + "llm_answer": "1. **Компоненты, которые подтверждены контекстом**:\n - RuntimeManager\n - ControlActionSet\n - ControlPlaneService\n \n2. **Подтверждённые связи между ними**:\n - RuntimeManager инициирует ControlPlaneService через его метод `__init__` (`ControlPlaneService.__init__:dataflow_slice`).\n - ControlPlaneService используется внутри RuntimeManager для управления данными потока (`ControlPlaneService._channels`, `ControlPlaneService._start_async`).\n \n3. **Границы ответственности, если они реально видны в коде**:\n - RuntimeManager отвечает за координацию и управление операциями, связанными с состоянием приложения и потоками данных. Он управляет конфигурацией и запуском.\n - ControlActionSet выступает в качестве модели, выполняющей стандартные действия или вызовы на основе поступающих запросов.\n - ControlPlaneService ответственен за инициализацию каналов и запуск асинхронных операций.\n\n4. **Что остаётся неизвестным или неполным**:\n - Не полностью раскрыто взаимодействие ControlActionSet с RuntimeManager относительно конкретных вызовов или событий.\n - Нет информации о точном взаимодействии с внешними сервисами или точными интерфейсами обмена данными между компонентами.\n - Непонятно, какие конкретно данные передаются между компонентами и как именно происходит обмен состояниями и событиями.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-explain-create-runtime.json b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-explain-create-runtime.json new file mode 100644 index 0000000..c15f1be --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-explain-create-runtime.json @@ -0,0 +1,1896 @@ +{ + "case_id": "plba-v2-explain-create-runtime", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 12, + "llm_answer": "1. **Что это и где определено.** \nСущность `create_runtime` определена в файле `src/plba/bootstrap.py`. Это функция, принимающая параметры конфигурации и создающая экземпляр класса `RuntimeManager`.\n\n2. **Назначение по наблюдаемому коду.** \nФункция создаёт и инициализирует объект `RuntimeManager`, добавляя в него файл конфигурации (`config_path`), канал управления HTTP (`enable_http_control`) и регистрируя переданный модуль приложения (`module`).\n\n3. **Подтверждённые зависимости или взаимодействия.** \nФункция взаимодействует с экземпляром `RuntimeManager` через методы `add_config_file`, `register_channel` и `register_module`.\n\n4. **Что делает по шагам, если это видно в контексте.** \n- Создаёт экземпляр объекта `RuntimeManager`.\n- Если передан параметр `config_path`, добавляет указанный файл конфигурации в менеджер.\n- Если включён режим HTTP-контроля, регистрирует соответствующий канал управления.\n- Регистрирует переданный модуль приложения.\n- Возвращает созданный экземпляр менеджера.\n\n5. **Осторожные выводы.** \nНа данный момент недостаточно информации о внутреннем устройстве объектов `RuntimeManager`, `HttpControlChannel` и других компонентов, участвующих в работе функции.\n\n6. **Чего не хватает для полного объяснения.** \nДля более глубокого понимания необходимо детализировать работу следующих сущностей:\n- Внутреннее устройство классов `RuntimeManager`, `HttpControlChannel`.\n- Механизм регистрации и использования конфигурационных файлов.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "create_runtime" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-v2-explain-create-runtime", + "text": "Что делает функция create_runtime?", + "mode": "full_chain", + "run_started_at": "2026-03-12T12:55:37", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Что делает функция create_runtime?", + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "create_runtime", + "alternatives": [ + "create_runtime" + ], + "confidence": 0.99 + }, + "rag_count": 12, + "rag_rows": [ + { + "path": "src/plba/bootstrap.py", + "content": "function create_runtime\ncreate_runtime(module)", + "layer": "C1_SYMBOL_CATALOG", + "title": "create_runtime", + "span_start": 8, + "span_end": 29, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "qname": "create_runtime", + "kind": "function", + "signature": "create_runtime(module)", + "parent_symbol_id": null, + "package_or_module": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime calls runtime.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:calls", + "span_start": 19, + "span_end": 19, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "4eaeec4ac55a59d5f66fd01c4754955f8fedaf4bc3df13fa769b352c7bfaacbb", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.add_config_file", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime reads_attr runtime.register_module", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:reads_attr", + "span_start": 28, + "span_end": 28, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "45516c79ff358dbf9b650a081668df0f66d2fe989300f985a1a78be6be166f8f", + "edge_type": "reads_attr", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.register_module", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:instantiates", + "span_start": 17, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "0adba17984f850ea1608c9e734d2dd5c325cfde3a8133123aa239e44935ad18e", + "edge_type": "instantiates", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": "27158ca220022eeb5083c6addf8a50775d45f7161284fd60aac48410105f4b98", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime calls runtime.register_module", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:calls", + "span_start": 28, + "span_end": 28, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "ab6003c3441addc1ba1b81edeca009165559f652f6b2cf424e5ae61b1f617de8", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.register_module", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime calls runtime.control_plane.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:calls", + "span_start": 21, + "span_end": 27, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "2678250030b9ce47a3b3b55fac7897ac530367edc8374ac9d5e6ecafb1e483f0", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.control_plane.register_channel", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime reads_attr runtime.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:reads_attr", + "span_start": 19, + "span_end": 19, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "30d4e8aae984ab84d523e80d02f1caeda52d547fa3d2aa47be8845931cabbca2", + "edge_type": "reads_attr", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.add_config_file", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "def create_runtime(\n module: ApplicationModule,\n *,\n config_path: str | None = None,\n enable_http_control: bool = False,\n control_host: str = \"127.0.0.1\",\n control_port: int = 8080,\n control_timeout: int = 5,\n) -> RuntimeManager:\n runtime = RuntimeManager()\n if config_path is not None:\n runtime.add_config_file(config_path)\n if enable_http_control:\n runtime.control_plane.register_channel(\n HttpControlChannel(\n host=control_host,\n port=control_port,\n timeout=control_timeout,\n )\n )\n runtime.register_module(module)\n return runtime", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/bootstrap.py:create_runtime", + "span_start": 8, + "span_end": 29, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "1. **Что это и где определено.** \nСущность `create_runtime` определена в файле `src/plba/bootstrap.py`. Это функция, принимающая параметры конфигурации и создающая экземпляр класса `RuntimeManager`.\n\n2. **Назначение по наблюдаемому коду.** \nФункция создаёт и инициализирует объект `RuntimeManager`, добавляя в него файл конфигурации (`config_path`), канал управления HTTP (`enable_http_control`) и регистрируя переданный модуль приложения (`module`).\n\n3. **Подтверждённые зависимости или взаимодействия.** \nФункция взаимодействует с экземпляром `RuntimeManager` через методы `add_config_file`, `register_channel` и `register_module`.\n\n4. **Что делает по шагам, если это видно в контексте.** \n- Создаёт экземпляр объекта `RuntimeManager`.\n- Если передан параметр `config_path`, добавляет указанный файл конфигурации в менеджер.\n- Если включён режим HTTP-контроля, регистрирует соответствующий канал управления.\n- Регистрирует переданный модуль приложения.\n- Возвращает созданный экземпляр менеджера.\n\n5. **Осторожные выводы.** \nНа данный момент недостаточно информации о внутреннем устройстве объектов `RuntimeManager`, `HttpControlChannel` и других компонентов, участвующих в работе функции.\n\n6. **Чего не хватает для полного объяснения.** \nДля более глубокого понимания необходимо детализировать работу следующих сущностей:\n- Внутреннее устройство классов `RuntimeManager`, `HttpControlChannel`.\n- Механизм регистрации и использования конфигурационных файлов.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS", + "C4_SEMANTIC_ROLES" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "function", + "symbol_candidates": [ + "create_runtime" + ], + "keyword_hints": [ + "create_runtime" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "create_runtime", + "alternatives": [ + "create_runtime" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 133, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 39, + "C0_SOURCE_CHUNKS": 17, + "C4_SEMANTIC_ROLES": 18, + "C2_DEPENDENCY_GRAPH": 47, + "C3_ENTRYPOINTS": 10 + }, + "merge_rank": 18, + "prompt_build": 0, + "llm_call": 2417 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 659, + "evidence_rows": 12, + "evidence_chars": 1184 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 1 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_explain_ru_v2", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "create_runtime" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 12, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-v2-explain-create-runtime", + "mode": "full_chain", + "run_started_at": "2026-03-12T12:55:37", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Что делает функция create_runtime?", + "normalized_query": "Что делает функция create_runtime?" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Что делает функция create_runtime?" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Что делает функция create_runtime?" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "function", + "symbol_candidates": [ + "create_runtime" + ], + "keyword_hints": [ + "create_runtime" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Что делает функция create_runtime?" + }, + "output": { + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "create_runtime", + "alternatives": [ + "create_runtime" + ], + "confidence": 0.99 + }, + "rag_count": 12, + "rag_rows": [ + { + "path": "src/plba/bootstrap.py", + "content": "function create_runtime\ncreate_runtime(module)", + "layer": "C1_SYMBOL_CATALOG", + "title": "create_runtime", + "span_start": 8, + "span_end": 29, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "qname": "create_runtime", + "kind": "function", + "signature": "create_runtime(module)", + "parent_symbol_id": null, + "package_or_module": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime calls runtime.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:calls", + "span_start": 19, + "span_end": 19, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "4eaeec4ac55a59d5f66fd01c4754955f8fedaf4bc3df13fa769b352c7bfaacbb", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.add_config_file", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime reads_attr runtime.register_module", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:reads_attr", + "span_start": 28, + "span_end": 28, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "45516c79ff358dbf9b650a081668df0f66d2fe989300f985a1a78be6be166f8f", + "edge_type": "reads_attr", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.register_module", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:instantiates", + "span_start": 17, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "0adba17984f850ea1608c9e734d2dd5c325cfde3a8133123aa239e44935ad18e", + "edge_type": "instantiates", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": "27158ca220022eeb5083c6addf8a50775d45f7161284fd60aac48410105f4b98", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime calls runtime.register_module", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:calls", + "span_start": 28, + "span_end": 28, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "ab6003c3441addc1ba1b81edeca009165559f652f6b2cf424e5ae61b1f617de8", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.register_module", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime calls runtime.control_plane.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:calls", + "span_start": 21, + "span_end": 27, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "2678250030b9ce47a3b3b55fac7897ac530367edc8374ac9d5e6ecafb1e483f0", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.control_plane.register_channel", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime reads_attr runtime.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:reads_attr", + "span_start": 19, + "span_end": 19, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "30d4e8aae984ab84d523e80d02f1caeda52d547fa3d2aa47be8845931cabbca2", + "edge_type": "reads_attr", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.add_config_file", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "def create_runtime(\n module: ApplicationModule,\n *,\n config_path: str | None = None,\n enable_http_control: bool = False,\n control_host: str = \"127.0.0.1\",\n control_port: int = 8080,\n control_timeout: int = 5,\n) -> RuntimeManager:\n runtime = RuntimeManager()\n if config_path is not None:\n runtime.add_config_file(config_path)\n if enable_http_control:\n runtime.control_plane.register_channel(\n HttpControlChannel(\n host=control_host,\n port=control_port,\n timeout=control_timeout,\n )\n )\n runtime.register_module(module)\n return runtime", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/bootstrap.py:create_runtime", + "span_start": 8, + "span_end": 29, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "create_runtime", + "alternatives": [ + "create_runtime" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 133, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 39, + "C0_SOURCE_CHUNKS": 17, + "C4_SEMANTIC_ROLES": 18, + "C2_DEPENDENCY_GRAPH": 47, + "C3_ENTRYPOINTS": 10 + }, + "merge_rank": 18 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Что делает функция create_runtime?", + "rag_count": 12 + }, + "output": { + "llm_answer": "1. **Что это и где определено.** \nСущность `create_runtime` определена в файле `src/plba/bootstrap.py`. Это функция, принимающая параметры конфигурации и создающая экземпляр класса `RuntimeManager`.\n\n2. **Назначение по наблюдаемому коду.** \nФункция создаёт и инициализирует объект `RuntimeManager`, добавляя в него файл конфигурации (`config_path`), канал управления HTTP (`enable_http_control`) и регистрируя переданный модуль приложения (`module`).\n\n3. **Подтверждённые зависимости или взаимодействия.** \nФункция взаимодействует с экземпляром `RuntimeManager` через методы `add_config_file`, `register_channel` и `register_module`.\n\n4. **Что делает по шагам, если это видно в контексте.** \n- Создаёт экземпляр объекта `RuntimeManager`.\n- Если передан параметр `config_path`, добавляет указанный файл конфигурации в менеджер.\n- Если включён режим HTTP-контроля, регистрирует соответствующий канал управления.\n- Регистрирует переданный модуль приложения.\n- Возвращает созданный экземпляр менеджера.\n\n5. **Осторожные выводы.** \nНа данный момент недостаточно информации о внутреннем устройстве объектов `RuntimeManager`, `HttpControlChannel` и других компонентов, участвующих в работе функции.\n\n6. **Чего не хватает для полного объяснения.** \nДля более глубокого понимания необходимо детализировать работу следующих сущностей:\n- Внутреннее устройство классов `RuntimeManager`, `HttpControlChannel`.\n- Механизм регистрации и использования конфигурационных файлов." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 659, + "evidence_rows": 12, + "evidence_chars": 1184 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 1 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_explain_ru_v2", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 2417 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-explain-create-runtime.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-explain-create-runtime.md new file mode 100644 index 0000000..e48b5b9 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-explain-create-runtime.md @@ -0,0 +1,34 @@ +# plba-v2-explain-create-runtime + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Что делает функция create_runtime? + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 12, + "llm_answer": "1. **Что это и где определено.** \nСущность `create_runtime` определена в файле `src/plba/bootstrap.py`. Это функция, принимающая параметры конфигурации и создающая экземпляр класса `RuntimeManager`.\n\n2. **Назначение по наблюдаемому коду.** \nФункция создаёт и инициализирует объект `RuntimeManager`, добавляя в него файл конфигурации (`config_path`), канал управления HTTP (`enable_http_control`) и регистрируя переданный модуль приложения (`module`).\n\n3. **Подтверждённые зависимости или взаимодействия.** \nФункция взаимодействует с экземпляром `RuntimeManager` через методы `add_config_file`, `register_channel` и `register_module`.\n\n4. **Что делает по шагам, если это видно в контексте.** \n- Создаёт экземпляр объекта `RuntimeManager`.\n- Если передан параметр `config_path`, добавляет указанный файл конфигурации в менеджер.\n- Если включён режим HTTP-контроля, регистрирует соответствующий канал управления.\n- Регистрирует переданный модуль приложения.\n- Возвращает созданный экземпляр менеджера.\n\n5. **Осторожные выводы.** \nНа данный момент недостаточно информации о внутреннем устройстве объектов `RuntimeManager`, `HttpControlChannel` и других компонентов, участвующих в работе функции.\n\n6. **Чего не хватает для полного объяснения.** \nДля более глубокого понимания необходимо детализировать работу следующих сущностей:\n- Внутреннее устройство классов `RuntimeManager`, `HttpControlChannel`.\n- Механизм регистрации и использования конфигурационных файлов.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "create_runtime" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-explain-local-http-channel.json b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-explain-local-http-channel.json new file mode 100644 index 0000000..af801c5 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-explain-local-http-channel.json @@ -0,0 +1,1333 @@ +{ + "case_id": "plba-v2-explain-local-http-channel", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN_LOCAL", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 6, + "llm_answer": "Класс `HttpControlChannel` из файла `src/app_runtime/control/http_channel.py` реализует HTTP канал управления для взаимодействия с внешним миром через HTTP протокол.\n\n### Что делает класс:\n1. **Инициализация (`__init__`)**:\n - Принимает параметры `host`, `port` и `timeout`.\n - Создаёт объект `UvicornThreadRunner` (асинхронный веб-сервер), который будет слушать указанный порт.\n - Инициализирует фабрику приложений `HttpControlAppFactory()` для создания приложения HTTP.\n - Сохраняет значение тайм-аута (`_timeout`), но само управление действиями (`_actions`) инициализируется как `None`.\n\n2. **Запуск (`start`)**:\n - Запускает веб-сервер с приложением, созданным фабрикой.\n - Перед запуском проверяет наличие настроенных действий (`_actions`). Если они отсутствуют, возвращает сообщение об ошибке.\n - Возвращает результат вызова метода `_actions.health()`, ожидая его до истечения тайм-аута.\n\n3. **Остановка (`stop`)**:\n - Останавливает веб-сервер.\n\n4. **Получение порта (`port`)**:\n - Возврашает номер порта, на котором работает сервер.\n\n5. **Ответы на запросы управления (`_health_response`, `_action_response`)**:\n - Метод `_health_response` отвечает за проверку состояния системы. Он проверяет настройку действий, а затем вызывает метод health действия, возвращая результат.\n - Метод `_action_response` обрабатывает конкретные команды управления, передаваемые клиентом. Проверяет наличие настроенного обработчика действия, и возвращает соответствующий JSON-ответ.\n\n### Входные данные:\n- Параметры конструктора: `host`, `port`, `timeout`.\n- Настройки конфигурируемых действий (`ControlActionSet`).\n\n### Выходные данные:\n- Номер порта, на котором запущен сервер.\n- Ответы на запросы о состоянии системы и конкретные команды управления.\n\nТаким образом, класс управляет асинхронной работой HTTP-сервера, настраивает обработку запросов и отвечает за состояние и выполнение конкретных команд управления системой.", + "answer_mode": "answered", + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "symbol_candidates": [ + "HttpControlChannel" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C2_DEPENDENCY_GRAPH" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-v2-explain-local-http-channel", + "text": "Почему в файле src/app_runtime/control/http_channel.py класс HttpControlChannel устроен так?", + "mode": "full_chain", + "run_started_at": "2026-03-12T12:55:37", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Почему в файле src/app_runtime/control/http_channel.py класс HttpControlChannel устроен так?", + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "HttpControlChannel", + "alternatives": [ + "HttpControlChannel" + ], + "confidence": 0.99 + }, + "rag_count": 6, + "rag_rows": [ + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel\nHttpControlChannel(ControlChannel)", + "layer": "C1_SYMBOL_CATALOG", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "qname": "HttpControlChannel", + "kind": "class", + "signature": "HttpControlChannel(ControlChannel)", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._timeout\n -> HttpControlChannel._action_response", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "c3ef21fcae96c82c00be74b3ab827d4af2085d89cb3fa5521c19a174aad84dbb", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "e64969024ccaeb34d8d91473fad07b3b3d341875846392e7a006406c7ada1954", + "dst_ref": "HttpControlChannel._action_response", + "resolution": "resolved", + "slice_id": "c3ef21fcae96c82c00be74b3ab827d4af2085d89cb3fa5521c19a174aad84dbb", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._timeout", + "HttpControlChannel._action_response" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "e64969024ccaeb34d8d91473fad07b3b3d341875846392e7a006406c7ada1954" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._runner\n -> HttpControlChannel.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 15, + "span_end": 22, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "51d73913df709152258ed1b9a8c8f4eb3c575eccfe6b982aef0b28e0789a29da", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0", + "dst_ref": "HttpControlChannel.start", + "resolution": "resolved", + "slice_id": "51d73913df709152258ed1b9a8c8f4eb3c575eccfe6b982aef0b28e0789a29da", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._runner", + "HttpControlChannel.start" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._timeout\n -> HttpControlChannel._health_response", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 14, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "f858f5c9e575f6c4cdfe3853571b7ee21d1f628a443541d2037c3dc9d0790bef", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "e84bf04e9cd2127df235b7064d05f47e19f19a89c7c82f4c247231d4e8fa426a", + "dst_ref": "HttpControlChannel._health_response", + "resolution": "resolved", + "slice_id": "f858f5c9e575f6c4cdfe3853571b7ee21d1f628a443541d2037c3dc9d0790bef", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._timeout", + "HttpControlChannel._health_response" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "e84bf04e9cd2127df235b7064d05f47e19f19a89c7c82f4c247231d4e8fa426a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._runner\n -> HttpControlChannel.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 15, + "span_end": 25, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "0f827ef81a990258a8a74381c8564a8361afa6712dba3200592659c939adcb9d", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "f29ab212620093d72be20e26c5a399624c7939a6056a728762ed3f84a250bfa3", + "dst_ref": "HttpControlChannel.stop", + "resolution": "resolved", + "slice_id": "0f827ef81a990258a8a74381c8564a8361afa6712dba3200592659c939adcb9d", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._runner", + "HttpControlChannel.stop" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "f29ab212620093d72be20e26c5a399624c7939a6056a728762ed3f84a250bfa3" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel(ControlChannel):\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._timeout = timeout\n self._runner = UvicornThreadRunner(host, port, timeout)\n self._factory = HttpControlAppFactory()\n self._actions: ControlActionSet | None = None\n\n async def start(self, actions: ControlActionSet) -> None:\n self._actions = actions\n app = self._factory.create(self._health_response, self._action_response)\n await self._runner.start(app)\n\n async def stop(self) -> None:\n await self._runner.stop()\n\n @property\n def port(self) -> int:\n return self._runner.port\n\n async def _health_response(self) -> dict[str, object]:\n if self._actions is None:\n return {\"status\": \"unhealthy\", \"detail\": \"control actions are not configured\"}\n return await asyncio.wait_for(self._actions.health(), timeout=float(self._timeout))\n\n async def _action_response(self, action: str, _client_source: str = \"unknown\") -> JSONResponse:\n if self._actions is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"{action} handler is not configured\"}, status_code=404)\n callbacks = {\n \"start\": self._actions.start,\n \"stop\": self._actions.stop,\n \"status\": self._actions.status,\n }\n callback = callbacks.get(action)\n if callback is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"unsupported action: {action}\"}, status_code=404)\n action_timeout = max(float(self._timeout), 10.0) if action in {\"start\", \"stop\"} else float(self._timeout)\n try:\n detail = await asyncio.wait_for(callback(), timeout=action_timeout)\n except asyncio.TimeoutError:\n return JSONResponse(\n content={\"status\": \"accepted\", \"detail\": f\"{action} operation is still in progress\"},\n status_code=202,\n )\n except Exception as exc:\n return JSONResponse(content={\"status\": \"error\", \"detail\": str(exc)}, status_code=500)\n return JSONResponse(content={\"status\": \"ok\", \"detail\": detail or f\"{action} action accepted\"}, status_code=200)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_channel.py:HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "Класс `HttpControlChannel` из файла `src/app_runtime/control/http_channel.py` реализует HTTP канал управления для взаимодействия с внешним миром через HTTP протокол.\n\n### Что делает класс:\n1. **Инициализация (`__init__`)**:\n - Принимает параметры `host`, `port` и `timeout`.\n - Создаёт объект `UvicornThreadRunner` (асинхронный веб-сервер), который будет слушать указанный порт.\n - Инициализирует фабрику приложений `HttpControlAppFactory()` для создания приложения HTTP.\n - Сохраняет значение тайм-аута (`_timeout`), но само управление действиями (`_actions`) инициализируется как `None`.\n\n2. **Запуск (`start`)**:\n - Запускает веб-сервер с приложением, созданным фабрикой.\n - Перед запуском проверяет наличие настроенных действий (`_actions`). Если они отсутствуют, возвращает сообщение об ошибке.\n - Возвращает результат вызова метода `_actions.health()`, ожидая его до истечения тайм-аута.\n\n3. **Остановка (`stop`)**:\n - Останавливает веб-сервер.\n\n4. **Получение порта (`port`)**:\n - Возврашает номер порта, на котором работает сервер.\n\n5. **Ответы на запросы управления (`_health_response`, `_action_response`)**:\n - Метод `_health_response` отвечает за проверку состояния системы. Он проверяет настройку действий, а затем вызывает метод health действия, возвращая результат.\n - Метод `_action_response` обрабатывает конкретные команды управления, передаваемые клиентом. Проверяет наличие настроенного обработчика действия, и возвращает соответствующий JSON-ответ.\n\n### Входные данные:\n- Параметры конструктора: `host`, `port`, `timeout`.\n- Настройки конфигурируемых действий (`ControlActionSet`).\n\n### Выходные данные:\n- Номер порта, на котором запущен сервер.\n- Ответы на запросы о состоянии системы и конкретные команды управления.\n\nТаким образом, класс управляет асинхронной работой HTTP-сервера, настраивает обработку запросов и отвечает за состояние и выполнение конкретных команд управления системой.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN_LOCAL", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN_LOCAL", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C2_DEPENDENCY_GRAPH" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "HttpControlChannel" + ], + "keyword_hints": [ + "src/app_runtime/control/http_channel.py", + "HttpControlChannel" + ], + "path_hints": [ + "src/app_runtime/control/http_channel.py" + ], + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C2_DEPENDENCY_GRAPH" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 12, + "C2_DEPENDENCY_GRAPH": 4 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "HttpControlChannel", + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Почему в файле src/app_runtime/control/http_channel.py класс HttpControlChannel устроен так?", + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 12, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Почему в файле src/app_runtime/control/http_channel.py класс HttpControlChannel устроен так?", + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 4, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 4, + "candidates_after_filter": 4 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "HttpControlChannel", + "alternatives": [ + "HttpControlChannel" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 4, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 74, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 35, + "C0_SOURCE_CHUNKS": 17, + "C2_DEPENDENCY_GRAPH": 21 + }, + "merge_rank": 21, + "prompt_build": 0, + "llm_call": 3383 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 851, + "evidence_rows": 6, + "evidence_chars": 2660 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 4, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_explain_local_ru_v2", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "src/app_runtime/control/http_channel.py", + "HttpControlChannel" + ], + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ] + }, + "llm": { + "used_evidence_count": 6, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-v2-explain-local-http-channel", + "mode": "full_chain", + "run_started_at": "2026-03-12T12:55:37", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Почему в файле src/app_runtime/control/http_channel.py класс HttpControlChannel устроен так?", + "normalized_query": "Почему в файле src/app_runtime/control/http_channel.py класс HttpControlChannel устроен так?" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Почему в файле src/app_runtime/control/http_channel.py класс HttpControlChannel устроен так?" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Почему в файле src/app_runtime/control/http_channel.py класс HttpControlChannel устроен так?" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN_LOCAL", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C2_DEPENDENCY_GRAPH" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "HttpControlChannel" + ], + "keyword_hints": [ + "src/app_runtime/control/http_channel.py", + "HttpControlChannel" + ], + "path_hints": [ + "src/app_runtime/control/http_channel.py" + ], + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Почему в файле src/app_runtime/control/http_channel.py класс HttpControlChannel устроен так?" + }, + "output": { + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "HttpControlChannel", + "alternatives": [ + "HttpControlChannel" + ], + "confidence": 0.99 + }, + "rag_count": 6, + "rag_rows": [ + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel\nHttpControlChannel(ControlChannel)", + "layer": "C1_SYMBOL_CATALOG", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "qname": "HttpControlChannel", + "kind": "class", + "signature": "HttpControlChannel(ControlChannel)", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._timeout\n -> HttpControlChannel._action_response", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "c3ef21fcae96c82c00be74b3ab827d4af2085d89cb3fa5521c19a174aad84dbb", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "e64969024ccaeb34d8d91473fad07b3b3d341875846392e7a006406c7ada1954", + "dst_ref": "HttpControlChannel._action_response", + "resolution": "resolved", + "slice_id": "c3ef21fcae96c82c00be74b3ab827d4af2085d89cb3fa5521c19a174aad84dbb", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._timeout", + "HttpControlChannel._action_response" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "e64969024ccaeb34d8d91473fad07b3b3d341875846392e7a006406c7ada1954" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._runner\n -> HttpControlChannel.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 15, + "span_end": 22, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "51d73913df709152258ed1b9a8c8f4eb3c575eccfe6b982aef0b28e0789a29da", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0", + "dst_ref": "HttpControlChannel.start", + "resolution": "resolved", + "slice_id": "51d73913df709152258ed1b9a8c8f4eb3c575eccfe6b982aef0b28e0789a29da", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._runner", + "HttpControlChannel.start" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._timeout\n -> HttpControlChannel._health_response", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 14, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "f858f5c9e575f6c4cdfe3853571b7ee21d1f628a443541d2037c3dc9d0790bef", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "e84bf04e9cd2127df235b7064d05f47e19f19a89c7c82f4c247231d4e8fa426a", + "dst_ref": "HttpControlChannel._health_response", + "resolution": "resolved", + "slice_id": "f858f5c9e575f6c4cdfe3853571b7ee21d1f628a443541d2037c3dc9d0790bef", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._timeout", + "HttpControlChannel._health_response" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "e84bf04e9cd2127df235b7064d05f47e19f19a89c7c82f4c247231d4e8fa426a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._runner\n -> HttpControlChannel.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 15, + "span_end": 25, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "0f827ef81a990258a8a74381c8564a8361afa6712dba3200592659c939adcb9d", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "f29ab212620093d72be20e26c5a399624c7939a6056a728762ed3f84a250bfa3", + "dst_ref": "HttpControlChannel.stop", + "resolution": "resolved", + "slice_id": "0f827ef81a990258a8a74381c8564a8361afa6712dba3200592659c939adcb9d", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._runner", + "HttpControlChannel.stop" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "f29ab212620093d72be20e26c5a399624c7939a6056a728762ed3f84a250bfa3" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel(ControlChannel):\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._timeout = timeout\n self._runner = UvicornThreadRunner(host, port, timeout)\n self._factory = HttpControlAppFactory()\n self._actions: ControlActionSet | None = None\n\n async def start(self, actions: ControlActionSet) -> None:\n self._actions = actions\n app = self._factory.create(self._health_response, self._action_response)\n await self._runner.start(app)\n\n async def stop(self) -> None:\n await self._runner.stop()\n\n @property\n def port(self) -> int:\n return self._runner.port\n\n async def _health_response(self) -> dict[str, object]:\n if self._actions is None:\n return {\"status\": \"unhealthy\", \"detail\": \"control actions are not configured\"}\n return await asyncio.wait_for(self._actions.health(), timeout=float(self._timeout))\n\n async def _action_response(self, action: str, _client_source: str = \"unknown\") -> JSONResponse:\n if self._actions is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"{action} handler is not configured\"}, status_code=404)\n callbacks = {\n \"start\": self._actions.start,\n \"stop\": self._actions.stop,\n \"status\": self._actions.status,\n }\n callback = callbacks.get(action)\n if callback is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"unsupported action: {action}\"}, status_code=404)\n action_timeout = max(float(self._timeout), 10.0) if action in {\"start\", \"stop\"} else float(self._timeout)\n try:\n detail = await asyncio.wait_for(callback(), timeout=action_timeout)\n except asyncio.TimeoutError:\n return JSONResponse(\n content={\"status\": \"accepted\", \"detail\": f\"{action} operation is still in progress\"},\n status_code=202,\n )\n except Exception as exc:\n return JSONResponse(content={\"status\": \"error\", \"detail\": str(exc)}, status_code=500)\n return JSONResponse(content={\"status\": \"ok\", \"detail\": detail or f\"{action} action accepted\"}, status_code=200)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_channel.py:HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C2_DEPENDENCY_GRAPH" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 12, + "C2_DEPENDENCY_GRAPH": 4 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "HttpControlChannel", + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Почему в файле src/app_runtime/control/http_channel.py класс HttpControlChannel устроен так?", + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 12, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Почему в файле src/app_runtime/control/http_channel.py класс HttpControlChannel устроен так?", + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 4, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 4, + "candidates_after_filter": 4 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "HttpControlChannel", + "alternatives": [ + "HttpControlChannel" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 4, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 74, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 35, + "C0_SOURCE_CHUNKS": 17, + "C2_DEPENDENCY_GRAPH": 21 + }, + "merge_rank": 21 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Почему в файле src/app_runtime/control/http_channel.py класс HttpControlChannel устроен так?", + "rag_count": 6 + }, + "output": { + "llm_answer": "Класс `HttpControlChannel` из файла `src/app_runtime/control/http_channel.py` реализует HTTP канал управления для взаимодействия с внешним миром через HTTP протокол.\n\n### Что делает класс:\n1. **Инициализация (`__init__`)**:\n - Принимает параметры `host`, `port` и `timeout`.\n - Создаёт объект `UvicornThreadRunner` (асинхронный веб-сервер), который будет слушать указанный порт.\n - Инициализирует фабрику приложений `HttpControlAppFactory()` для создания приложения HTTP.\n - Сохраняет значение тайм-аута (`_timeout`), но само управление действиями (`_actions`) инициализируется как `None`.\n\n2. **Запуск (`start`)**:\n - Запускает веб-сервер с приложением, созданным фабрикой.\n - Перед запуском проверяет наличие настроенных действий (`_actions`). Если они отсутствуют, возвращает сообщение об ошибке.\n - Возвращает результат вызова метода `_actions.health()`, ожидая его до истечения тайм-аута.\n\n3. **Остановка (`stop`)**:\n - Останавливает веб-сервер.\n\n4. **Получение порта (`port`)**:\n - Возврашает номер порта, на котором работает сервер.\n\n5. **Ответы на запросы управления (`_health_response`, `_action_response`)**:\n - Метод `_health_response` отвечает за проверку состояния системы. Он проверяет настройку действий, а затем вызывает метод health действия, возвращая результат.\n - Метод `_action_response` обрабатывает конкретные команды управления, передаваемые клиентом. Проверяет наличие настроенного обработчика действия, и возвращает соответствующий JSON-ответ.\n\n### Входные данные:\n- Параметры конструктора: `host`, `port`, `timeout`.\n- Настройки конфигурируемых действий (`ControlActionSet`).\n\n### Выходные данные:\n- Номер порта, на котором запущен сервер.\n- Ответы на запросы о состоянии системы и конкретные команды управления.\n\nТаким образом, класс управляет асинхронной работой HTTP-сервера, настраивает обработку запросов и отвечает за состояние и выполнение конкретных команд управления системой." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 851, + "evidence_rows": 6, + "evidence_chars": 2660 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 4, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_explain_local_ru_v2", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 3383 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-explain-local-http-channel.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-explain-local-http-channel.md new file mode 100644 index 0000000..7970192 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-explain-local-http-channel.md @@ -0,0 +1,34 @@ +# plba-v2-explain-local-http-channel + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Почему в файле src/app_runtime/control/http_channel.py класс HttpControlChannel устроен так? + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "EXPLAIN_LOCAL", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 6, + "llm_answer": "Класс `HttpControlChannel` из файла `src/app_runtime/control/http_channel.py` реализует HTTP канал управления для взаимодействия с внешним миром через HTTP протокол.\n\n### Что делает класс:\n1. **Инициализация (`__init__`)**:\n - Принимает параметры `host`, `port` и `timeout`.\n - Создаёт объект `UvicornThreadRunner` (асинхронный веб-сервер), который будет слушать указанный порт.\n - Инициализирует фабрику приложений `HttpControlAppFactory()` для создания приложения HTTP.\n - Сохраняет значение тайм-аута (`_timeout`), но само управление действиями (`_actions`) инициализируется как `None`.\n\n2. **Запуск (`start`)**:\n - Запускает веб-сервер с приложением, созданным фабрикой.\n - Перед запуском проверяет наличие настроенных действий (`_actions`). Если они отсутствуют, возвращает сообщение об ошибке.\n - Возвращает результат вызова метода `_actions.health()`, ожидая его до истечения тайм-аута.\n\n3. **Остановка (`stop`)**:\n - Останавливает веб-сервер.\n\n4. **Получение порта (`port`)**:\n - Возврашает номер порта, на котором работает сервер.\n\n5. **Ответы на запросы управления (`_health_response`, `_action_response`)**:\n - Метод `_health_response` отвечает за проверку состояния системы. Он проверяет настройку действий, а затем вызывает метод health действия, возвращая результат.\n - Метод `_action_response` обрабатывает конкретные команды управления, передаваемые клиентом. Проверяет наличие настроенного обработчика действия, и возвращает соответствующий JSON-ответ.\n\n### Входные данные:\n- Параметры конструктора: `host`, `port`, `timeout`.\n- Настройки конфигурируемых действий (`ControlActionSet`).\n\n### Выходные данные:\n- Номер порта, на котором запущен сервер.\n- Ответы на запросы о состоянии системы и конкретные команды управления.\n\nТаким образом, класс управляет асинхронной работой HTTP-сервера, настраивает обработку запросов и отвечает за состояние и выполнение конкретных команд управления системой.", + "answer_mode": "answered", + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "symbol_candidates": [ + "HttpControlChannel" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C2_DEPENDENCY_GRAPH" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-explain-nonexistent-symbol.json b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-explain-nonexistent-symbol.json new file mode 100644 index 0000000..77e50fe --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-explain-nonexistent-symbol.json @@ -0,0 +1,1182 @@ +{ + "case_id": "plba-v2-explain-nonexistent-symbol", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 0, + "llm_answer": "Класс `RuntimeFactoryManager` не найден ни в предоставленном контексте, ни в стандартных библиотеках Python.\n\n**1. Что это и где определено.** \nНе удалось обнаружить определение класса `RuntimeFactoryManager`. Возможно, он определен в сторонней библиотеке или проекте с закрытым контекстом.\n\n**2. Назначение по наблюдаемому коду.** \nИз-за отсутствия контекста невозможно точно определить назначение данного класса. Если бы был доступ к кодовой базе, можно было бы проанализировать точку входа (entrypoint), методы и поля класса, чтобы понять его предназначение.\n\n**3. Подтверждённые зависимости или взаимодействия.** \nТак как сущность отсутствует, нельзя установить подтверждённые зависимости или взаимодействия.\n\n**4. Что делает по шагам, если это видно в контексте.** \nШагов выполнения нет, так как сущность неизвестна.\n\n**5. Осторожные выводы.** \nБез реального кода невозможно сделать какие-либо обоснованные выводы о поведении и функциях класса.\n\n**6. Чего не хватает для полного объяснения.** \nДля полноценного анализа необходимо иметь исходный код или хотя бы знать место определения класса (`runtime_factory_manager.py`, например). Без этого невозможно дать детальное объяснение работы сущности.", + "answer_mode": "insufficient_evidence", + "path_scope": [], + "symbol_candidates": [ + "RuntimeFactoryManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-v2-explain-nonexistent-symbol", + "text": "Объясни класс RuntimeFactoryManager", + "mode": "full_chain", + "run_started_at": "2026-03-12T12:55:37", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни класс RuntimeFactoryManager", + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "ControlChannel", + "ControlActionSet" + ], + "confidence": 0.0 + }, + "rag_count": 0, + "rag_rows": [], + "llm_answer": "Класс `RuntimeFactoryManager` не найден ни в предоставленном контексте, ни в стандартных библиотеках Python.\n\n**1. Что это и где определено.** \nНе удалось обнаружить определение класса `RuntimeFactoryManager`. Возможно, он определен в сторонней библиотеке или проекте с закрытым контекстом.\n\n**2. Назначение по наблюдаемому коду.** \nИз-за отсутствия контекста невозможно точно определить назначение данного класса. Если бы был доступ к кодовой базе, можно было бы проанализировать точку входа (entrypoint), методы и поля класса, чтобы понять его предназначение.\n\n**3. Подтверждённые зависимости или взаимодействия.** \nТак как сущность отсутствует, нельзя установить подтверждённые зависимости или взаимодействия.\n\n**4. Что делает по шагам, если это видно в контексте.** \nШагов выполнения нет, так как сущность неизвестна.\n\n**5. Осторожные выводы.** \nБез реального кода невозможно сделать какие-либо обоснованные выводы о поведении и функциях класса.\n\n**6. Чего не хватает для полного объяснения.** \nДля полноценного анализа необходимо иметь исходный код или хотя бы знать место определения класса (`runtime_factory_manager.py`, например). Без этого невозможно дать детальное объяснение работы сущности.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [], + "evidence_sufficient": false + }, + "llm": { + "answer_status": "insufficient_evidence", + "groundedness": "weakly_grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "RuntimeFactoryManager" + ], + "keyword_hints": [ + "RuntimeFactoryManager" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": null, + "workspace_id": null, + "returned_repo_ids": [], + "returned_workspace_ids": [] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "RuntimeFactoryManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "RuntimeFactoryManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "RuntimeFactoryManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "RuntimeFactoryManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "RuntimeFactoryManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 2, + "candidates_after_filter": 2 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "ControlChannel", + "ControlActionSet" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "miss", + "hit_count": 0, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "miss", + "hit_count": 0, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "miss", + "hit_count": 0, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "miss", + "hit_count": 0, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "miss", + "hit_count": 0, + "fail_reason": null + } + ] + }, + "constraint_violations": [ + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C1_SYMBOL_CATALOG", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + }, + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C0_SOURCE_CHUNKS", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + }, + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C4_SEMANTIC_ROLES", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + }, + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C2_DEPENDENCY_GRAPH", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + }, + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C3_ENTRYPOINTS", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + }, + { + "type": "SYMBOL_RESOLUTION_FAILED", + "severity": "warn", + "details": { + "status": "not_found", + "symbol_candidates": [ + "RuntimeFactoryManager" + ] + }, + "suggested_fix": "Increase symbol layer budget or improve fuzzy symbol resolution settings." + } + ], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 122, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 23, + "C0_SOURCE_CHUNKS": 13, + "C4_SEMANTIC_ROLES": 14, + "C2_DEPENDENCY_GRAPH": 60, + "C3_ENTRYPOINTS": 9 + }, + "merge_rank": 0, + "prompt_build": 0, + "llm_call": 1838 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 312, + "evidence_rows": 0, + "evidence_chars": 0 + }, + "evidence_summary": [], + "prompt_template_id": "intent_code_qa_explain_ru_v2", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "RuntimeFactoryManager" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 0, + "missing_evidence_reason": "empty_retrieval_context" + } + }, + "run_info": { + "case_id": "plba-v2-explain-nonexistent-symbol", + "mode": "full_chain", + "run_started_at": "2026-03-12T12:55:37", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Объясни класс RuntimeFactoryManager", + "normalized_query": "Объясни класс RuntimeFactoryManager" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Объясни класс RuntimeFactoryManager" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни класс RuntimeFactoryManager" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "RuntimeFactoryManager" + ], + "keyword_hints": [ + "RuntimeFactoryManager" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Объясни класс RuntimeFactoryManager" + }, + "output": { + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "ControlChannel", + "ControlActionSet" + ], + "confidence": 0.0 + }, + "rag_count": 0, + "rag_rows": [] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": null, + "workspace_id": null, + "returned_repo_ids": [], + "returned_workspace_ids": [] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "RuntimeFactoryManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "RuntimeFactoryManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "RuntimeFactoryManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "RuntimeFactoryManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "RuntimeFactoryManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 2, + "candidates_after_filter": 2 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "ControlChannel", + "ControlActionSet" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "miss", + "hit_count": 0, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "miss", + "hit_count": 0, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "miss", + "hit_count": 0, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "miss", + "hit_count": 0, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "miss", + "hit_count": 0, + "fail_reason": null + } + ] + }, + "constraint_violations": [ + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C1_SYMBOL_CATALOG", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + }, + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C0_SOURCE_CHUNKS", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + }, + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C4_SEMANTIC_ROLES", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + }, + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C2_DEPENDENCY_GRAPH", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + }, + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C3_ENTRYPOINTS", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + }, + { + "type": "SYMBOL_RESOLUTION_FAILED", + "severity": "warn", + "details": { + "status": "not_found", + "symbol_candidates": [ + "RuntimeFactoryManager" + ] + }, + "suggested_fix": "Increase symbol layer budget or improve fuzzy symbol resolution settings." + } + ], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 122, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 23, + "C0_SOURCE_CHUNKS": 13, + "C4_SEMANTIC_ROLES": 14, + "C2_DEPENDENCY_GRAPH": 60, + "C3_ENTRYPOINTS": 9 + }, + "merge_rank": 0 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Объясни класс RuntimeFactoryManager", + "rag_count": 0 + }, + "output": { + "llm_answer": "Класс `RuntimeFactoryManager` не найден ни в предоставленном контексте, ни в стандартных библиотеках Python.\n\n**1. Что это и где определено.** \nНе удалось обнаружить определение класса `RuntimeFactoryManager`. Возможно, он определен в сторонней библиотеке или проекте с закрытым контекстом.\n\n**2. Назначение по наблюдаемому коду.** \nИз-за отсутствия контекста невозможно точно определить назначение данного класса. Если бы был доступ к кодовой базе, можно было бы проанализировать точку входа (entrypoint), методы и поля класса, чтобы понять его предназначение.\n\n**3. Подтверждённые зависимости или взаимодействия.** \nТак как сущность отсутствует, нельзя установить подтверждённые зависимости или взаимодействия.\n\n**4. Что делает по шагам, если это видно в контексте.** \nШагов выполнения нет, так как сущность неизвестна.\n\n**5. Осторожные выводы.** \nБез реального кода невозможно сделать какие-либо обоснованные выводы о поведении и функциях класса.\n\n**6. Чего не хватает для полного объяснения.** \nДля полноценного анализа необходимо иметь исходный код или хотя бы знать место определения класса (`runtime_factory_manager.py`, например). Без этого невозможно дать детальное объяснение работы сущности." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 312, + "evidence_rows": 0, + "evidence_chars": 0 + }, + "evidence_summary": [], + "prompt_template_id": "intent_code_qa_explain_ru_v2", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 1838 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-explain-nonexistent-symbol.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-explain-nonexistent-symbol.md new file mode 100644 index 0000000..fcd5d61 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-explain-nonexistent-symbol.md @@ -0,0 +1,34 @@ +# plba-v2-explain-nonexistent-symbol + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Объясни класс RuntimeFactoryManager + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 0, + "llm_answer": "Класс `RuntimeFactoryManager` не найден ни в предоставленном контексте, ни в стандартных библиотеках Python.\n\n**1. Что это и где определено.** \nНе удалось обнаружить определение класса `RuntimeFactoryManager`. Возможно, он определен в сторонней библиотеке или проекте с закрытым контекстом.\n\n**2. Назначение по наблюдаемому коду.** \nИз-за отсутствия контекста невозможно точно определить назначение данного класса. Если бы был доступ к кодовой базе, можно было бы проанализировать точку входа (entrypoint), методы и поля класса, чтобы понять его предназначение.\n\n**3. Подтверждённые зависимости или взаимодействия.** \nТак как сущность отсутствует, нельзя установить подтверждённые зависимости или взаимодействия.\n\n**4. Что делает по шагам, если это видно в контексте.** \nШагов выполнения нет, так как сущность неизвестна.\n\n**5. Осторожные выводы.** \nБез реального кода невозможно сделать какие-либо обоснованные выводы о поведении и функциях класса.\n\n**6. Чего не хватает для полного объяснения.** \nДля полноценного анализа необходимо иметь исходный код или хотя бы знать место определения класса (`runtime_factory_manager.py`, например). Без этого невозможно дать детальное объяснение работы сущности.", + "answer_mode": "insufficient_evidence", + "path_scope": [], + "symbol_candidates": [ + "RuntimeFactoryManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-explain-runtime-manager.json b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-explain-runtime-manager.json new file mode 100644 index 0000000..95bb4aa --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-explain-runtime-manager.json @@ -0,0 +1,2088 @@ +{ + "case_id": "plba-v2-explain-runtime-manager", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 12, + "llm_answer": "1. Что это и где определено.\nСущность `RuntimeManager` определена в файле `src/app_runtime/core/runtime.py`.\n\n2. Назначение по наблюдаемому коду.\nИз контекста видно, что `RuntimeManager` играет роль менеджера, управляющего жизненным циклом приложения и координации различных компонентов системы. Он отвечает за инициализацию и регистрацию сервисов, отслеживание состояния и управление потоками работы.\n\n3. Подтверждённые зависимости или взаимодействия.\nКласс зависит от следующих классов и объектов:\n- `ConfigurationManager`\n- `ServiceContainer`\n- `TraceService`\n- `HealthRegistry`\n- `LogManager`\n- `WorkerSupervisor`\n- `ControlPlaneService`\n- `ApplicationModule`\n\nЭти зависимости передаются через конструктор класса при его создании.\n\n4. Что делает по шагам, если это видно в контексте.\nПо имеющемуся контексту видно следующее поведение:\n- Инициализация конструктора принимает параметры, которые могут быть опциональными экземплярами соответствующих служб.\n- Внутри конструктора производится регистрация этих служб в хранилище (`registry`), а также устанавливается начальное состояние объекта.\n- Метод `register_module` регистрирует модули приложения.\n\n5. Осторожные выводы.\nНа основании представленного контекста трудно сделать полные выводы о поведении метода `register_module`, так как он прерывается на середине.\n\n6. Чего не хватает для полного объяснения.\nДля более полного понимания сущности необходимо видеть реализацию метода `register_module` целиком и иметь доступ к остальной части файла `runtime.py`. Также важно увидеть взаимодействие с внешними компонентами, такими как `ControlPlaneService`, чтобы понять полный цикл управления жизненным состоянием приложения.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-v2-explain-runtime-manager", + "text": "Объясни как работает класс RuntimeManager", + "mode": "full_chain", + "run_started_at": "2026-03-12T12:55:37", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни как работает класс RuntimeManager", + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ], + "confidence": 0.99 + }, + "rag_count": 12, + "rag_rows": [ + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager\nRuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "qname": "RuntimeManager", + "kind": "class", + "signature": "RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests manager\n- orchestrates role-like calls (4)\n- reads and writes state attributes\n- participates in dataflow slices (50)", + "layer": "C4_SEMANTIC_ROLES", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 43, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "symbol_name": "RuntimeManager", + "qname": "RuntimeManager", + "role": "pipeline_stage", + "confidence": 0.67, + "dataflow_participation": 50, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 52, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "1. Что это и где определено.\nСущность `RuntimeManager` определена в файле `src/app_runtime/core/runtime.py`.\n\n2. Назначение по наблюдаемому коду.\nИз контекста видно, что `RuntimeManager` играет роль менеджера, управляющего жизненным циклом приложения и координации различных компонентов системы. Он отвечает за инициализацию и регистрацию сервисов, отслеживание состояния и управление потоками работы.\n\n3. Подтверждённые зависимости или взаимодействия.\nКласс зависит от следующих классов и объектов:\n- `ConfigurationManager`\n- `ServiceContainer`\n- `TraceService`\n- `HealthRegistry`\n- `LogManager`\n- `WorkerSupervisor`\n- `ControlPlaneService`\n- `ApplicationModule`\n\nЭти зависимости передаются через конструктор класса при его создании.\n\n4. Что делает по шагам, если это видно в контексте.\nПо имеющемуся контексту видно следующее поведение:\n- Инициализация конструктора принимает параметры, которые могут быть опциональными экземплярами соответствующих служб.\n- Внутри конструктора производится регистрация этих служб в хранилище (`registry`), а также устанавливается начальное состояние объекта.\n- Метод `register_module` регистрирует модули приложения.\n\n5. Осторожные выводы.\nНа основании представленного контекста трудно сделать полные выводы о поведении метода `register_module`, так как он прерывается на середине.\n\n6. Чего не хватает для полного объяснения.\nДля более полного понимания сущности необходимо видеть реализацию метода `register_module` целиком и иметь доступ к остальной части файла `runtime.py`. Также важно увидеть взаимодействие с внешними компонентами, такими как `ControlPlaneService`, чтобы понять полный цикл управления жизненным состоянием приложения.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS", + "C4_SEMANTIC_ROLES" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 174, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 47, + "C0_SOURCE_CHUNKS": 19, + "C4_SEMANTIC_ROLES": 17, + "C2_DEPENDENCY_GRAPH": 58, + "C3_ENTRYPOINTS": 9 + }, + "merge_rank": 19, + "prompt_build": 0, + "llm_call": 2467 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 854, + "evidence_rows": 12, + "evidence_chars": 7130 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 2 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_explain_ru_v2", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "RuntimeManager" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 12, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-v2-explain-runtime-manager", + "mode": "full_chain", + "run_started_at": "2026-03-12T12:55:37", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Объясни как работает класс RuntimeManager", + "normalized_query": "Объясни как работает класс RuntimeManager" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Объясни как работает класс RuntimeManager" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни как работает класс RuntimeManager" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Объясни как работает класс RuntimeManager" + }, + "output": { + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ], + "confidence": 0.99 + }, + "rag_count": 12, + "rag_rows": [ + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager\nRuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "qname": "RuntimeManager", + "kind": "class", + "signature": "RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests manager\n- orchestrates role-like calls (4)\n- reads and writes state attributes\n- participates in dataflow slices (50)", + "layer": "C4_SEMANTIC_ROLES", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 43, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "symbol_name": "RuntimeManager", + "qname": "RuntimeManager", + "role": "pipeline_stage", + "confidence": 0.67, + "dataflow_participation": 50, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 52, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 174, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 47, + "C0_SOURCE_CHUNKS": 19, + "C4_SEMANTIC_ROLES": 17, + "C2_DEPENDENCY_GRAPH": 58, + "C3_ENTRYPOINTS": 9 + }, + "merge_rank": 19 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Объясни как работает класс RuntimeManager", + "rag_count": 12 + }, + "output": { + "llm_answer": "1. Что это и где определено.\nСущность `RuntimeManager` определена в файле `src/app_runtime/core/runtime.py`.\n\n2. Назначение по наблюдаемому коду.\nИз контекста видно, что `RuntimeManager` играет роль менеджера, управляющего жизненным циклом приложения и координации различных компонентов системы. Он отвечает за инициализацию и регистрацию сервисов, отслеживание состояния и управление потоками работы.\n\n3. Подтверждённые зависимости или взаимодействия.\nКласс зависит от следующих классов и объектов:\n- `ConfigurationManager`\n- `ServiceContainer`\n- `TraceService`\n- `HealthRegistry`\n- `LogManager`\n- `WorkerSupervisor`\n- `ControlPlaneService`\n- `ApplicationModule`\n\nЭти зависимости передаются через конструктор класса при его создании.\n\n4. Что делает по шагам, если это видно в контексте.\nПо имеющемуся контексту видно следующее поведение:\n- Инициализация конструктора принимает параметры, которые могут быть опциональными экземплярами соответствующих служб.\n- Внутри конструктора производится регистрация этих служб в хранилище (`registry`), а также устанавливается начальное состояние объекта.\n- Метод `register_module` регистрирует модули приложения.\n\n5. Осторожные выводы.\nНа основании представленного контекста трудно сделать полные выводы о поведении метода `register_module`, так как он прерывается на середине.\n\n6. Чего не хватает для полного объяснения.\nДля более полного понимания сущности необходимо видеть реализацию метода `register_module` целиком и иметь доступ к остальной части файла `runtime.py`. Также важно увидеть взаимодействие с внешними компонентами, такими как `ControlPlaneService`, чтобы понять полный цикл управления жизненным состоянием приложения." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 854, + "evidence_rows": 12, + "evidence_chars": 7130 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 2 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_explain_ru_v2", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 2467 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-explain-runtime-manager.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-explain-runtime-manager.md new file mode 100644 index 0000000..3d75f58 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-explain-runtime-manager.md @@ -0,0 +1,34 @@ +# plba-v2-explain-runtime-manager + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Объясни как работает класс RuntimeManager + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 12, + "llm_answer": "1. Что это и где определено.\nСущность `RuntimeManager` определена в файле `src/app_runtime/core/runtime.py`.\n\n2. Назначение по наблюдаемому коду.\nИз контекста видно, что `RuntimeManager` играет роль менеджера, управляющего жизненным циклом приложения и координации различных компонентов системы. Он отвечает за инициализацию и регистрацию сервисов, отслеживание состояния и управление потоками работы.\n\n3. Подтверждённые зависимости или взаимодействия.\nКласс зависит от следующих классов и объектов:\n- `ConfigurationManager`\n- `ServiceContainer`\n- `TraceService`\n- `HealthRegistry`\n- `LogManager`\n- `WorkerSupervisor`\n- `ControlPlaneService`\n- `ApplicationModule`\n\nЭти зависимости передаются через конструктор класса при его создании.\n\n4. Что делает по шагам, если это видно в контексте.\nПо имеющемуся контексту видно следующее поведение:\n- Инициализация конструктора принимает параметры, которые могут быть опциональными экземплярами соответствующих служб.\n- Внутри конструктора производится регистрация этих служб в хранилище (`registry`), а также устанавливается начальное состояние объекта.\n- Метод `register_module` регистрирует модули приложения.\n\n5. Осторожные выводы.\nНа основании представленного контекста трудно сделать полные выводы о поведении метода `register_module`, так как он прерывается на середине.\n\n6. Чего не хватает для полного объяснения.\nДля более полного понимания сущности необходимо видеть реализацию метода `register_module` целиком и иметь доступ к остальной части файла `runtime.py`. Также важно увидеть взаимодействие с внешними компонентами, такими как `ControlPlaneService`, чтобы понять полный цикл управления жизненным состоянием приложения.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-explain-trace-service.json b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-explain-trace-service.json new file mode 100644 index 0000000..66e2a1f --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-explain-trace-service.json @@ -0,0 +1,2208 @@ +{ + "case_id": "plba-v2-explain-trace-service", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 14, + "llm_answer": "1. Что это и где определено.\nСущность `TraceService` объявлена в файле `src/app_runtime/tracing/service.py`. Это класс-наследник от `TraceContextFactory`.\n\n2. Назначение по наблюдаемому коду.\nКласс предназначен для работы с трассировкой контекста выполнения приложения. Он создаёт и управляет контекстами трассировки, записывает их в хранилище (`store`) и отправляет на транспорт (`transport`), обеспечивая запись логических сообщений и контекстных данных о выполнении программы.\n\n3. Подтверждённые зависимости или взаимодействия.\n- Создаёт и записывает записи контекста трассировки через метод `create_context()`, используя хранилище контекста (`store`) и транспорт (`transport`).\n- Использует контекстный менеджер `open_context()` для открытия временных контекстов.\n- Вызывает методы записи контекста и сообщений через экземпляр класса `TraceRecordWriter`.\n\n4. Что делает по шагам, если это видно в контексте.\n- В конструкторе инициализирует переменные `transport` и `store`, устанавливает транспорт по умолчанию как `NoOpTraceTransport()` и хранилище как `TraceContextStore()`.\n- Метод `create_context()` создает новую запись контекста трассировки с заданными параметрами, сохраняет её в хранилище и записывает через транспорт.\n- Контекстный менеджер `open_context()` открывает временный контекст, создавая запись контекста с помощью метода `create_context()`.\n\n5. Осторожные выводы.\nНа данный момент нет явных признаков критичных недостатков в понимании поведения класса. Однако более глубокий анализ его использования вне представленного контекста может выявить дополнительные аспекты его применения.\n\n6. Чего не хватает для полного объяснения.\nДля полной картины необходимо рассмотреть следующие моменты:\n- Реализацию методов, которые вызываются внутри класса, таких как работа транспорта и хранилища контекста.\n- Дополнительные контексты использования и интеграции с другими компонентами системы.\n- Возможное поведение при ошибках и исключениях, связанных с транспортом и хранилищем.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "TraceService" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-v2-explain-trace-service", + "text": "Объясни как работает класс TraceService", + "mode": "full_chain", + "run_started_at": "2026-03-12T12:55:37", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни как работает класс TraceService", + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "TraceService", + "alternatives": [ + "TraceService" + ], + "confidence": 0.99 + }, + "rag_count": 14, + "rag_rows": [ + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceService\nTraceService(TraceContextFactory)", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService", + "span_start": 39, + "span_end": 166, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "c2b2b976d99f2c600000b753731b26e0a69adcb4359398b93073590c5d5d04f4", + "qname": "TraceService", + "kind": "class", + "signature": "TraceService(TraceContextFactory)", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (13)", + "layer": "C4_SEMANTIC_ROLES", + "title": "TraceService", + "span_start": 39, + "span_end": 166, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 60, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "c2b2b976d99f2c600000b753731b26e0a69adcb4359398b93073590c5d5d04f4", + "symbol_name": "TraceService", + "qname": "TraceService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 13, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.create_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 61, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3b052062067a78aef3302ee1d996897e02a67d1b340397bea4f59fe147c0492a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a", + "dst_ref": "TraceService.create_context", + "resolution": "resolved", + "slice_id": "3b052062067a78aef3302ee1d996897e02a67d1b340397bea4f59fe147c0492a", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.create_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.close_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 84, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "7a9353ef57c9ae5d19b3a0c6ac50fad05e6d21d31bbe1cd1cd07af6332ba6505", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "01e14158dcced7e52d0c8ac84ac7b9a75225c261b6aca6a1d7da802d0994721c", + "dst_ref": "TraceService.close_context", + "resolution": "resolved", + "slice_id": "7a9353ef57c9ae5d19b3a0c6ac50fad05e6d21d31bbe1cd1cd07af6332ba6505", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.close_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "01e14158dcced7e52d0c8ac84ac7b9a75225c261b6aca6a1d7da802d0994721c" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.open_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 78, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a6e13b9ebc4fed84586afd53ed92a4d14757e440873f572b2337d5622ee96031", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426", + "dst_ref": "TraceService.open_context", + "resolution": "resolved", + "slice_id": "a6e13b9ebc4fed84586afd53ed92a4d14757e440873f572b2337d5622ee96031", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.open_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.transport\n -> TraceService.__init__", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 41, + "span_end": 43, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "1e923a93faa05c3c43ca9b19bd047007a8589ccce57d3cc1798ae7f9f200af98", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "dst_ref": "TraceService.__init__", + "resolution": "resolved", + "slice_id": "1e923a93faa05c3c43ca9b19bd047007a8589ccce57d3cc1798ae7f9f200af98", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.transport", + "TraceService.__init__" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.current_trace_id", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 81, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3ea17138634b1190bded77ddb84aa1595124f6519b246f24fc4b02bd62b5cac1", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c", + "dst_ref": "TraceService.current_trace_id", + "resolution": "resolved", + "slice_id": "3ea17138634b1190bded77ddb84aa1595124f6519b246f24fc4b02bd62b5cac1", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.current_trace_id" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.step", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 88, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "9f34c5da9b09fba99df6f6b1bde183a9aeb45111b8218a747c71590c2c9f60f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "c44bfbc66cf747283f30088da3e011a10395031d41e77b74e523c24997f641ca", + "dst_ref": "TraceService.step", + "resolution": "resolved", + "slice_id": "9f34c5da9b09fba99df6f6b1bde183a9aeb45111b8218a747c71590c2c9f60f2", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.step" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "c44bfbc66cf747283f30088da3e011a10395031d41e77b74e523c24997f641ca" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceRecordWriter:\n def __init__(self, transport: TraceTransport) -> None:\n self._logger = logging.getLogger(__name__)\n self._transport = transport\n\n def write_context(self, record: TraceContextRecord) -> None:\n try:\n self._transport.write_context(record)\n except Exception:\n self._logger.exception(\"Trace transport failed to write context %s\", record.trace_id)\n\n def write_message(self, record: TraceLogMessage) -> None:\n try:\n self._transport.write_message(record)\n except Exception:\n self._logger.exception(\"Trace transport failed to write message for %s\", record.trace_id)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/tracing/service.py:TraceRecordWriter", + "span_start": 21, + "span_end": 36, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceService(TraceContextFactory):\n def __init__(self, transport: TraceTransport | None = None, store: TraceContextStore | None = None) -> None:\n self.transport = transport or NoOpTraceTransport()\n self.store = store or TraceContextStore()\n self._writer = TraceRecordWriter(self.transport)\n\n def create_context(\n self,\n *,\n alias: str,\n parent_id: str | None = None,\n kind: str | None = None,\n attrs: dict[str, Any] | None = None,\n ) -> str:\n record = TraceContextRecord(\n trace_id=uuid4().hex,\n alias=str(alias or \"\"),\n parent_id=parent_id,\n type=kind,\n event_time=utc_now(),\n attrs=dict(attrs or {}),\n )\n self.store.push(record)\n self._writer.write_context(record)\n return record.trace_id\n\n @contextmanager\n def open_context(\n self,\n *,\n alias: str,\n parent_id: str | None = None,\n kind: str | None = None,\n attrs: dict[str, Any] | None = None,\n ) -> Iterator[str]:\n trace_id = self.create_context(alias=alias, parent_id=parent_id, kind=kind, attrs=attrs)\n try:\n yield trace_id\n finally:\n self.store.pop()\n\n def current_trace_id(self) -> str | None:\n return self.store.current_trace_id()\n\n def close_context(self) -> str | None:\n previous = self.store.pop()\n return previous.record.trace_id if previous else None\n\n def step(self, name: str) -> None:\n self.store.set_step(str(name or \"\"))\n\n def info(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"INFO\", message, status, attrs)\n\n def debug(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"DEBUG\", message, status, attrs)\n\n def warning(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"WARNING\", message, status, attrs)\n\n def error(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"ERROR\", message, status, attrs)\n\n def exception(self, message: str, *, status: str = \"failed\", attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"ERROR\", message, status, attrs)\n\n def new_root(self, operation: str) -> TraceContext:\n trace_id = self.create_context(alias=operation, kind=\"operation\", attrs={\"operation\": operation})\n return TraceContext(trace_id=trace_id, span_id=trace_id, attributes={\"operation\": operation})\n\n def child_of(self, parent: TraceContext, operation: str) -> TraceContext:\n trace_id = self.create_context(\n alias=operation,\n parent_id=parent.trace_id,\n kind=\"worker\",\n attrs={\"operation\": operation},\n )\n return TraceContext(\n trace_id=trace_id,\n span_id=trace_id,\n parent_span_id=parent.span_id,\n attributes={\"operation\": operation},\n )\n\n def attach(self, metadata: dict[str, object], context: TraceContext) -> dict[str, object]:\n updated = dict(metadata)\n updated[\"trace_id\"] = context.trace_id\n updated[\"span_id\"] = context.span_id\n updated[\"parent_span_id\"] = context.parent_span_id\n return updated\n\n def resume(self, metadata: dict[str, object], operation: str) -> TraceContext:\n trace_id = str(metadata.get(\"trace_id\") or uuid4().hex)\n span_id = str(metadata.get(\"span_id\") or trace_id)\n parent_id = metadata.get(\"parent_span_id\")\n self.create_context(\n alias=operation,\n parent_id=str(parent_id) if parent_id else None,\n kind=\"worker\",\n attrs=dict(metadata),\n )\n return TraceContext(\n trace_id=trace_id,\n span_id=span_id,\n parent_span_id=str(parent_id) if parent_id else None,\n attributes={\"operation\": operation},\n )\n\n def _write_message(\n self,\n level: TraceLevel,\n message: str,\n status: str | None,\n attrs: dict[str, Any] | None,\n ) -> None:\n active = self.store.current()\n if active is None:\n raise RuntimeError(\"Trace context is not bound. Call create_context() first.\")\n record = TraceLogMessage(\n trace_id=active.record.trace_id,\n step=active.step,\n status=str(status or \"\"),\n message=str(message or \"\"),\n level=level,\n event_time=utc_now(),\n attrs=dict(attrs or {}),\n )\n self._writer.write_message(record)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/tracing/service.py:TraceService", + "span_start": 39, + "span_end": 166, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceManager(TraceService):\n \"\"\"Compatibility alias during the transition from ConfigManager-shaped naming.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/tracing/service.py:TraceManager", + "span_start": 169, + "span_end": 170, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 2, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "1. Что это и где определено.\nСущность `TraceService` объявлена в файле `src/app_runtime/tracing/service.py`. Это класс-наследник от `TraceContextFactory`.\n\n2. Назначение по наблюдаемому коду.\nКласс предназначен для работы с трассировкой контекста выполнения приложения. Он создаёт и управляет контекстами трассировки, записывает их в хранилище (`store`) и отправляет на транспорт (`transport`), обеспечивая запись логических сообщений и контекстных данных о выполнении программы.\n\n3. Подтверждённые зависимости или взаимодействия.\n- Создаёт и записывает записи контекста трассировки через метод `create_context()`, используя хранилище контекста (`store`) и транспорт (`transport`).\n- Использует контекстный менеджер `open_context()` для открытия временных контекстов.\n- Вызывает методы записи контекста и сообщений через экземпляр класса `TraceRecordWriter`.\n\n4. Что делает по шагам, если это видно в контексте.\n- В конструкторе инициализирует переменные `transport` и `store`, устанавливает транспорт по умолчанию как `NoOpTraceTransport()` и хранилище как `TraceContextStore()`.\n- Метод `create_context()` создает новую запись контекста трассировки с заданными параметрами, сохраняет её в хранилище и записывает через транспорт.\n- Контекстный менеджер `open_context()` открывает временный контекст, создавая запись контекста с помощью метода `create_context()`.\n\n5. Осторожные выводы.\nНа данный момент нет явных признаков критичных недостатков в понимании поведения класса. Однако более глубокий анализ его использования вне представленного контекста может выявить дополнительные аспекты его применения.\n\n6. Чего не хватает для полного объяснения.\nДля полной картины необходимо рассмотреть следующие моменты:\n- Реализацию методов, которые вызываются внутри класса, таких как работа транспорта и хранилища контекста.\n- Дополнительные контексты использования и интеграции с другими компонентами системы.\n- Возможное поведение при ошибках и исключениях, связанных с транспортом и хранилищем.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS", + "C4_SEMANTIC_ROLES" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "TraceService" + ], + "keyword_hints": [ + "TraceService" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "TraceService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "TraceService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "TraceService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "TraceService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "TraceService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "TraceService", + "alternatives": [ + "TraceService" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 114, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 26, + "C0_SOURCE_CHUNKS": 13, + "C4_SEMANTIC_ROLES": 15, + "C2_DEPENDENCY_GRAPH": 49, + "C3_ENTRYPOINTS": 8 + }, + "merge_rank": 16, + "prompt_build": 0, + "llm_call": 2998 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 991, + "evidence_rows": 14, + "evidence_chars": 6323 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 1 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 3, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_explain_ru_v2", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "TraceService" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 14, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-v2-explain-trace-service", + "mode": "full_chain", + "run_started_at": "2026-03-12T12:55:37", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Объясни как работает класс TraceService", + "normalized_query": "Объясни как работает класс TraceService" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Объясни как работает класс TraceService" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни как работает класс TraceService" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "TraceService" + ], + "keyword_hints": [ + "TraceService" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Объясни как работает класс TraceService" + }, + "output": { + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "TraceService", + "alternatives": [ + "TraceService" + ], + "confidence": 0.99 + }, + "rag_count": 14, + "rag_rows": [ + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceService\nTraceService(TraceContextFactory)", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService", + "span_start": 39, + "span_end": 166, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "c2b2b976d99f2c600000b753731b26e0a69adcb4359398b93073590c5d5d04f4", + "qname": "TraceService", + "kind": "class", + "signature": "TraceService(TraceContextFactory)", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (13)", + "layer": "C4_SEMANTIC_ROLES", + "title": "TraceService", + "span_start": 39, + "span_end": 166, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 60, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "c2b2b976d99f2c600000b753731b26e0a69adcb4359398b93073590c5d5d04f4", + "symbol_name": "TraceService", + "qname": "TraceService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 13, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.create_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 61, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3b052062067a78aef3302ee1d996897e02a67d1b340397bea4f59fe147c0492a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a", + "dst_ref": "TraceService.create_context", + "resolution": "resolved", + "slice_id": "3b052062067a78aef3302ee1d996897e02a67d1b340397bea4f59fe147c0492a", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.create_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.close_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 84, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "7a9353ef57c9ae5d19b3a0c6ac50fad05e6d21d31bbe1cd1cd07af6332ba6505", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "01e14158dcced7e52d0c8ac84ac7b9a75225c261b6aca6a1d7da802d0994721c", + "dst_ref": "TraceService.close_context", + "resolution": "resolved", + "slice_id": "7a9353ef57c9ae5d19b3a0c6ac50fad05e6d21d31bbe1cd1cd07af6332ba6505", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.close_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "01e14158dcced7e52d0c8ac84ac7b9a75225c261b6aca6a1d7da802d0994721c" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.open_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 78, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a6e13b9ebc4fed84586afd53ed92a4d14757e440873f572b2337d5622ee96031", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426", + "dst_ref": "TraceService.open_context", + "resolution": "resolved", + "slice_id": "a6e13b9ebc4fed84586afd53ed92a4d14757e440873f572b2337d5622ee96031", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.open_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.transport\n -> TraceService.__init__", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 41, + "span_end": 43, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "1e923a93faa05c3c43ca9b19bd047007a8589ccce57d3cc1798ae7f9f200af98", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "dst_ref": "TraceService.__init__", + "resolution": "resolved", + "slice_id": "1e923a93faa05c3c43ca9b19bd047007a8589ccce57d3cc1798ae7f9f200af98", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.transport", + "TraceService.__init__" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.current_trace_id", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 81, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3ea17138634b1190bded77ddb84aa1595124f6519b246f24fc4b02bd62b5cac1", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c", + "dst_ref": "TraceService.current_trace_id", + "resolution": "resolved", + "slice_id": "3ea17138634b1190bded77ddb84aa1595124f6519b246f24fc4b02bd62b5cac1", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.current_trace_id" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.step", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 88, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "9f34c5da9b09fba99df6f6b1bde183a9aeb45111b8218a747c71590c2c9f60f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "c44bfbc66cf747283f30088da3e011a10395031d41e77b74e523c24997f641ca", + "dst_ref": "TraceService.step", + "resolution": "resolved", + "slice_id": "9f34c5da9b09fba99df6f6b1bde183a9aeb45111b8218a747c71590c2c9f60f2", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.step" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "c44bfbc66cf747283f30088da3e011a10395031d41e77b74e523c24997f641ca" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceRecordWriter:\n def __init__(self, transport: TraceTransport) -> None:\n self._logger = logging.getLogger(__name__)\n self._transport = transport\n\n def write_context(self, record: TraceContextRecord) -> None:\n try:\n self._transport.write_context(record)\n except Exception:\n self._logger.exception(\"Trace transport failed to write context %s\", record.trace_id)\n\n def write_message(self, record: TraceLogMessage) -> None:\n try:\n self._transport.write_message(record)\n except Exception:\n self._logger.exception(\"Trace transport failed to write message for %s\", record.trace_id)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/tracing/service.py:TraceRecordWriter", + "span_start": 21, + "span_end": 36, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceService(TraceContextFactory):\n def __init__(self, transport: TraceTransport | None = None, store: TraceContextStore | None = None) -> None:\n self.transport = transport or NoOpTraceTransport()\n self.store = store or TraceContextStore()\n self._writer = TraceRecordWriter(self.transport)\n\n def create_context(\n self,\n *,\n alias: str,\n parent_id: str | None = None,\n kind: str | None = None,\n attrs: dict[str, Any] | None = None,\n ) -> str:\n record = TraceContextRecord(\n trace_id=uuid4().hex,\n alias=str(alias or \"\"),\n parent_id=parent_id,\n type=kind,\n event_time=utc_now(),\n attrs=dict(attrs or {}),\n )\n self.store.push(record)\n self._writer.write_context(record)\n return record.trace_id\n\n @contextmanager\n def open_context(\n self,\n *,\n alias: str,\n parent_id: str | None = None,\n kind: str | None = None,\n attrs: dict[str, Any] | None = None,\n ) -> Iterator[str]:\n trace_id = self.create_context(alias=alias, parent_id=parent_id, kind=kind, attrs=attrs)\n try:\n yield trace_id\n finally:\n self.store.pop()\n\n def current_trace_id(self) -> str | None:\n return self.store.current_trace_id()\n\n def close_context(self) -> str | None:\n previous = self.store.pop()\n return previous.record.trace_id if previous else None\n\n def step(self, name: str) -> None:\n self.store.set_step(str(name or \"\"))\n\n def info(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"INFO\", message, status, attrs)\n\n def debug(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"DEBUG\", message, status, attrs)\n\n def warning(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"WARNING\", message, status, attrs)\n\n def error(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"ERROR\", message, status, attrs)\n\n def exception(self, message: str, *, status: str = \"failed\", attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"ERROR\", message, status, attrs)\n\n def new_root(self, operation: str) -> TraceContext:\n trace_id = self.create_context(alias=operation, kind=\"operation\", attrs={\"operation\": operation})\n return TraceContext(trace_id=trace_id, span_id=trace_id, attributes={\"operation\": operation})\n\n def child_of(self, parent: TraceContext, operation: str) -> TraceContext:\n trace_id = self.create_context(\n alias=operation,\n parent_id=parent.trace_id,\n kind=\"worker\",\n attrs={\"operation\": operation},\n )\n return TraceContext(\n trace_id=trace_id,\n span_id=trace_id,\n parent_span_id=parent.span_id,\n attributes={\"operation\": operation},\n )\n\n def attach(self, metadata: dict[str, object], context: TraceContext) -> dict[str, object]:\n updated = dict(metadata)\n updated[\"trace_id\"] = context.trace_id\n updated[\"span_id\"] = context.span_id\n updated[\"parent_span_id\"] = context.parent_span_id\n return updated\n\n def resume(self, metadata: dict[str, object], operation: str) -> TraceContext:\n trace_id = str(metadata.get(\"trace_id\") or uuid4().hex)\n span_id = str(metadata.get(\"span_id\") or trace_id)\n parent_id = metadata.get(\"parent_span_id\")\n self.create_context(\n alias=operation,\n parent_id=str(parent_id) if parent_id else None,\n kind=\"worker\",\n attrs=dict(metadata),\n )\n return TraceContext(\n trace_id=trace_id,\n span_id=span_id,\n parent_span_id=str(parent_id) if parent_id else None,\n attributes={\"operation\": operation},\n )\n\n def _write_message(\n self,\n level: TraceLevel,\n message: str,\n status: str | None,\n attrs: dict[str, Any] | None,\n ) -> None:\n active = self.store.current()\n if active is None:\n raise RuntimeError(\"Trace context is not bound. Call create_context() first.\")\n record = TraceLogMessage(\n trace_id=active.record.trace_id,\n step=active.step,\n status=str(status or \"\"),\n message=str(message or \"\"),\n level=level,\n event_time=utc_now(),\n attrs=dict(attrs or {}),\n )\n self._writer.write_message(record)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/tracing/service.py:TraceService", + "span_start": 39, + "span_end": 166, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceManager(TraceService):\n \"\"\"Compatibility alias during the transition from ConfigManager-shaped naming.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/tracing/service.py:TraceManager", + "span_start": 169, + "span_end": 170, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 2, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "TraceService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "TraceService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "TraceService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "TraceService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "TraceService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "TraceService", + "alternatives": [ + "TraceService" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 114, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 26, + "C0_SOURCE_CHUNKS": 13, + "C4_SEMANTIC_ROLES": 15, + "C2_DEPENDENCY_GRAPH": 49, + "C3_ENTRYPOINTS": 8 + }, + "merge_rank": 16 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Объясни как работает класс TraceService", + "rag_count": 14 + }, + "output": { + "llm_answer": "1. Что это и где определено.\nСущность `TraceService` объявлена в файле `src/app_runtime/tracing/service.py`. Это класс-наследник от `TraceContextFactory`.\n\n2. Назначение по наблюдаемому коду.\nКласс предназначен для работы с трассировкой контекста выполнения приложения. Он создаёт и управляет контекстами трассировки, записывает их в хранилище (`store`) и отправляет на транспорт (`transport`), обеспечивая запись логических сообщений и контекстных данных о выполнении программы.\n\n3. Подтверждённые зависимости или взаимодействия.\n- Создаёт и записывает записи контекста трассировки через метод `create_context()`, используя хранилище контекста (`store`) и транспорт (`transport`).\n- Использует контекстный менеджер `open_context()` для открытия временных контекстов.\n- Вызывает методы записи контекста и сообщений через экземпляр класса `TraceRecordWriter`.\n\n4. Что делает по шагам, если это видно в контексте.\n- В конструкторе инициализирует переменные `transport` и `store`, устанавливает транспорт по умолчанию как `NoOpTraceTransport()` и хранилище как `TraceContextStore()`.\n- Метод `create_context()` создает новую запись контекста трассировки с заданными параметрами, сохраняет её в хранилище и записывает через транспорт.\n- Контекстный менеджер `open_context()` открывает временный контекст, создавая запись контекста с помощью метода `create_context()`.\n\n5. Осторожные выводы.\nНа данный момент нет явных признаков критичных недостатков в понимании поведения класса. Однако более глубокий анализ его использования вне представленного контекста может выявить дополнительные аспекты его применения.\n\n6. Чего не хватает для полного объяснения.\nДля полной картины необходимо рассмотреть следующие моменты:\n- Реализацию методов, которые вызываются внутри класса, таких как работа транспорта и хранилища контекста.\n- Дополнительные контексты использования и интеграции с другими компонентами системы.\n- Возможное поведение при ошибках и исключениях, связанных с транспортом и хранилищем." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 991, + "evidence_rows": 14, + "evidence_chars": 6323 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 1 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 3, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_explain_ru_v2", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 2998 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-explain-trace-service.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-explain-trace-service.md new file mode 100644 index 0000000..908bc0a --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-explain-trace-service.md @@ -0,0 +1,34 @@ +# plba-v2-explain-trace-service + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Объясни как работает класс TraceService + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 14, + "llm_answer": "1. Что это и где определено.\nСущность `TraceService` объявлена в файле `src/app_runtime/tracing/service.py`. Это класс-наследник от `TraceContextFactory`.\n\n2. Назначение по наблюдаемому коду.\nКласс предназначен для работы с трассировкой контекста выполнения приложения. Он создаёт и управляет контекстами трассировки, записывает их в хранилище (`store`) и отправляет на транспорт (`transport`), обеспечивая запись логических сообщений и контекстных данных о выполнении программы.\n\n3. Подтверждённые зависимости или взаимодействия.\n- Создаёт и записывает записи контекста трассировки через метод `create_context()`, используя хранилище контекста (`store`) и транспорт (`transport`).\n- Использует контекстный менеджер `open_context()` для открытия временных контекстов.\n- Вызывает методы записи контекста и сообщений через экземпляр класса `TraceRecordWriter`.\n\n4. Что делает по шагам, если это видно в контексте.\n- В конструкторе инициализирует переменные `transport` и `store`, устанавливает транспорт по умолчанию как `NoOpTraceTransport()` и хранилище как `TraceContextStore()`.\n- Метод `create_context()` создает новую запись контекста трассировки с заданными параметрами, сохраняет её в хранилище и записывает через транспорт.\n- Контекстный менеджер `open_context()` открывает временный контекст, создавая запись контекста с помощью метода `create_context()`.\n\n5. Осторожные выводы.\nНа данный момент нет явных признаков критичных недостатков в понимании поведения класса. Однако более глубокий анализ его использования вне представленного контекста может выявить дополнительные аспекты его применения.\n\n6. Чего не хватает для полного объяснения.\nДля полной картины необходимо рассмотреть следующие моменты:\n- Реализацию методов, которые вызываются внутри класса, таких как работа транспорта и хранилища контекста.\n- Дополнительные контексты использования и интеграции с другими компонентами системы.\n- Возможное поведение при ошибках и исключениях, связанных с транспортом и хранилищем.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "TraceService" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-control-plane.json b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-control-plane.json new file mode 100644 index 0000000..f723538 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-control-plane.json @@ -0,0 +1,1236 @@ +{ + "case_id": "plba-v2-find-entrypoints-control-plane", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 9, + "llm_answer": "Подтверждённые точки входа:\nsrc/app_runtime/control/http_app.py | fastapi http app.get\n- Объявлена декоратором @app.get, что указывает на точку входа для HTTP-запросов.\nsrc/app_runtime/control/http_app.py | fastapi http app.post\n- Объявлена декоратором @app.post, что указывает на точку входа для HTTP-запросов.\n\nВозможные кандидаты:\nsrc/app_runtime/control/http_channel.py | HttpControlChannel.start\n- Метод класса, вызывающий инициализацию FastAPI приложения через фабрику HttpControlAppFactory, однако прямого признака точки входа нет.\nsrc/app_runtime/control/http_channel.py | HttpControlChannel._health_response\n- Внутренний метод, возвращающий здоровье системы, но явно не указан как точка входа.\nsrc/app_runtime/control/http_channel.py | HttpControlChannel._action_response\n- Внутренний метод, обрабатывающий запросы к действиям, но явно не указан как точка входа.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "HTTP", + "control", + "plane" + ], + "layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-v2-find-entrypoints-control-plane", + "text": "Найди точки входа HTTP control plane", + "mode": "full_chain", + "run_started_at": "2026-03-12T12:55:37", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Найди точки входа HTTP control plane", + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "HTTP", + "control", + "plane" + ], + "confidence": 0.0 + }, + "rag_count": 9, + "rag_rows": [ + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel(ControlChannel):\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._timeout = timeout\n self._runner = UvicornThreadRunner(host, port, timeout)\n self._factory = HttpControlAppFactory()\n self._actions: ControlActionSet | None = None\n\n async def start(self, actions: ControlActionSet) -> None:\n self._actions = actions\n app = self._factory.create(self._health_response, self._action_response)\n await self._runner.start(app)\n\n async def stop(self) -> None:\n await self._runner.stop()\n\n @property\n def port(self) -> int:\n return self._runner.port\n\n async def _health_response(self) -> dict[str, object]:\n if self._actions is None:\n return {\"status\": \"unhealthy\", \"detail\": \"control actions are not configured\"}\n return await asyncio.wait_for(self._actions.health(), timeout=float(self._timeout))\n\n async def _action_response(self, action: str, _client_source: str = \"unknown\") -> JSONResponse:\n if self._actions is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"{action} handler is not configured\"}, status_code=404)\n callbacks = {\n \"start\": self._actions.start,\n \"stop\": self._actions.stop,\n \"status\": self._actions.status,\n }\n callback = callbacks.get(action)\n if callback is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"unsupported action: {action}\"}, status_code=404)\n action_timeout = max(float(self._timeout), 10.0) if action in {\"start\", \"stop\"} else float(self._timeout)\n try:\n detail = await asyncio.wait_for(callback(), timeout=action_timeout)\n except asyncio.TimeoutError:\n return JSONResponse(\n content={\"status\": \"accepted\", \"detail\": f\"{action} operation is still in progress\"},\n status_code=202,\n )\n except Exception as exc:\n return JSONResponse(content={\"status\": \"error\", \"detail\": str(exc)}, status_code=500)\n return JSONResponse(content={\"status\": \"ok\", \"detail\": detail or f\"{action} action accepted\"}, status_code=200)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_channel.py:HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "class HttpControlAppFactory:\n def create(\n self,\n health_provider: Callable[[], Awaitable[HealthPayload]],\n action_provider: Callable[[str, str], Awaitable[JSONResponse]],\n ) -> FastAPI:\n app = FastAPI(title=\"PLBA Control API\")\n\n @app.middleware(\"http\")\n async def log_api_call(request: Request, call_next): # type: ignore[no-untyped-def]\n started = time.monotonic()\n response = await call_next(request)\n response.headers[\"X-Response-Time-Ms\"] = str(int((time.monotonic() - started) * 1000))\n return response\n\n @app.get(\"/health\")\n async def health() -> JSONResponse:\n payload = await health_provider()\n status_code = 200 if payload.get(\"status\") == \"ok\" else 503\n return JSONResponse(content=payload, status_code=status_code)\n\n @app.get(\"/actions/{action}\")\n @app.post(\"/actions/{action}\")\n async def action(action: str, request: Request) -> JSONResponse:\n client_source = self._client_source(request)\n if action in {\"start\", \"stop\"}:\n LOGGER.warning(\"Control action requested: /actions/%s client=%s\", action, client_source)\n return await action_provider(action, client_source)\n\n return app\n\n def _client_source(self, request: Request) -> str:\n explicit_header = request.headers.get(\"X-Client-Source\", \"\").strip()\n if explicit_header:\n return explicit_header\n user_agent = request.headers.get(\"User-Agent\", \"\").strip()\n if user_agent:\n return f\"user-agent:{user_agent}\"\n return \"unknown\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_app.py:HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlActionSet:\n health: HealthHandler\n start: ActionHandler\n stop: ActionHandler\n status: ActionHandler", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\"ControlActionSet\", \"ControlChannel\", \"ControlPlaneService\", \"HttpControlChannel\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/__init__.py:1-5", + "span_start": 1, + "span_end": 5, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlChannel(ABC):\n @abstractmethod\n async def start(self, actions: ControlActionSet) -> None:\n \"\"\"Start the control channel and bind handlers.\"\"\"\n\n @abstractmethod\n async def stop(self) -> None:\n \"\"\"Stop the control channel and release resources.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "class UvicornThreadRunner:\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._host = host\n self._port = port\n self._timeout = timeout\n self._server: Server | None = None\n self._thread: Thread | None = None\n self._error: BaseException | None = None\n\n async def start(self, app: FastAPI) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._error = None\n config = Config(app=app, host=self._host, port=self._port, log_level=\"warning\")\n self._server = Server(config)\n self._thread = Thread(target=self._serve, name=\"plba-http-control\", daemon=True)\n self._thread.start()\n await self._wait_until_started()\n\n async def stop(self) -> None:\n if self._server is None or self._thread is None:\n return\n self._server.should_exit = True\n await asyncio.to_thread(self._thread.join, self._timeout)\n self._server = None\n self._thread = None\n\n @property\n def port(self) -> int:\n if self._server is None or not getattr(self._server, \"servers\", None):\n return self._port\n socket = self._server.servers[0].sockets[0]\n return int(socket.getsockname()[1])\n\n async def _wait_until_started(self) -> None:\n if self._server is None:\n raise RuntimeError(\"Server is not initialized\")\n deadline = asyncio.get_running_loop().time() + max(float(self._timeout), 1.0)\n while not self._server.started:\n if self._error is not None:\n raise RuntimeError(\"HTTP control server failed to start\") from self._error\n if asyncio.get_running_loop().time() >= deadline:\n raise TimeoutError(\"HTTP control server startup timed out\")\n await asyncio.sleep(0.05)\n\n def _serve(self) -> None:\n if self._server is None:\n return\n try:\n asyncio.run(self._server.serve())\n except BaseException as exc: # noqa: BLE001\n self._error = exc", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_runner.py:UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_runner", + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "Подтверждённые точки входа:\nsrc/app_runtime/control/http_app.py | fastapi http app.get\n- Объявлена декоратором @app.get, что указывает на точку входа для HTTP-запросов.\nsrc/app_runtime/control/http_app.py | fastapi http app.post\n- Объявлена декоратором @app.post, что указывает на точку входа для HTTP-запросов.\n\nВозможные кандидаты:\nsrc/app_runtime/control/http_channel.py | HttpControlChannel.start\n- Метод класса, вызывающий инициализацию FastAPI приложения через фабрику HttpControlAppFactory, однако прямого признака точки входа нет.\nsrc/app_runtime/control/http_channel.py | HttpControlChannel._health_response\n- Внутренний метод, возвращающий здоровье системы, но явно не указан как точка входа.\nsrc/app_runtime/control/http_channel.py | HttpControlChannel._action_response\n- Внутренний метод, обрабатывающий запросы к действиям, но явно не указан как точка входа.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C3_ENTRYPOINTS" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "HTTP", + "control", + "plane" + ], + "keyword_hints": [ + "HTTP", + "control", + "plane" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C3_ENTRYPOINTS": "exact_path_fetch", + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C3_ENTRYPOINTS": 12, + "C0_SOURCE_CHUNKS": 6 + }, + "filters_by_layer": { + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C3_ENTRYPOINTS", + "query": "Найди точки входа HTTP control plane", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 12, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Найди точки входа HTTP control plane", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "HTTP", + "control", + "plane" + ] + }, + "layers": [ + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 6, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 50, + "retrieval_by_layer": { + "C3_ENTRYPOINTS": 24, + "C0_SOURCE_CHUNKS": 25 + }, + "merge_rank": 0, + "prompt_build": 0, + "llm_call": 1624 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 1094, + "evidence_rows": 9, + "evidence_chars": 6731 + }, + "evidence_summary": [ + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 6, + "unique_paths": 5 + } + ], + "prompt_template_id": "intent_code_qa_find_entrypoints_ru_v2", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "HTTP", + "control", + "plane" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 9, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-v2-find-entrypoints-control-plane", + "mode": "full_chain", + "run_started_at": "2026-03-12T12:55:37", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Найди точки входа HTTP control plane", + "normalized_query": "Найди точки входа HTTP control plane" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Найди точки входа HTTP control plane" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Найди точки входа HTTP control plane" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "HTTP", + "control", + "plane" + ], + "keyword_hints": [ + "HTTP", + "control", + "plane" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Найди точки входа HTTP control plane" + }, + "output": { + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "HTTP", + "control", + "plane" + ], + "confidence": 0.0 + }, + "rag_count": 9, + "rag_rows": [ + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel(ControlChannel):\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._timeout = timeout\n self._runner = UvicornThreadRunner(host, port, timeout)\n self._factory = HttpControlAppFactory()\n self._actions: ControlActionSet | None = None\n\n async def start(self, actions: ControlActionSet) -> None:\n self._actions = actions\n app = self._factory.create(self._health_response, self._action_response)\n await self._runner.start(app)\n\n async def stop(self) -> None:\n await self._runner.stop()\n\n @property\n def port(self) -> int:\n return self._runner.port\n\n async def _health_response(self) -> dict[str, object]:\n if self._actions is None:\n return {\"status\": \"unhealthy\", \"detail\": \"control actions are not configured\"}\n return await asyncio.wait_for(self._actions.health(), timeout=float(self._timeout))\n\n async def _action_response(self, action: str, _client_source: str = \"unknown\") -> JSONResponse:\n if self._actions is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"{action} handler is not configured\"}, status_code=404)\n callbacks = {\n \"start\": self._actions.start,\n \"stop\": self._actions.stop,\n \"status\": self._actions.status,\n }\n callback = callbacks.get(action)\n if callback is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"unsupported action: {action}\"}, status_code=404)\n action_timeout = max(float(self._timeout), 10.0) if action in {\"start\", \"stop\"} else float(self._timeout)\n try:\n detail = await asyncio.wait_for(callback(), timeout=action_timeout)\n except asyncio.TimeoutError:\n return JSONResponse(\n content={\"status\": \"accepted\", \"detail\": f\"{action} operation is still in progress\"},\n status_code=202,\n )\n except Exception as exc:\n return JSONResponse(content={\"status\": \"error\", \"detail\": str(exc)}, status_code=500)\n return JSONResponse(content={\"status\": \"ok\", \"detail\": detail or f\"{action} action accepted\"}, status_code=200)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_channel.py:HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "class HttpControlAppFactory:\n def create(\n self,\n health_provider: Callable[[], Awaitable[HealthPayload]],\n action_provider: Callable[[str, str], Awaitable[JSONResponse]],\n ) -> FastAPI:\n app = FastAPI(title=\"PLBA Control API\")\n\n @app.middleware(\"http\")\n async def log_api_call(request: Request, call_next): # type: ignore[no-untyped-def]\n started = time.monotonic()\n response = await call_next(request)\n response.headers[\"X-Response-Time-Ms\"] = str(int((time.monotonic() - started) * 1000))\n return response\n\n @app.get(\"/health\")\n async def health() -> JSONResponse:\n payload = await health_provider()\n status_code = 200 if payload.get(\"status\") == \"ok\" else 503\n return JSONResponse(content=payload, status_code=status_code)\n\n @app.get(\"/actions/{action}\")\n @app.post(\"/actions/{action}\")\n async def action(action: str, request: Request) -> JSONResponse:\n client_source = self._client_source(request)\n if action in {\"start\", \"stop\"}:\n LOGGER.warning(\"Control action requested: /actions/%s client=%s\", action, client_source)\n return await action_provider(action, client_source)\n\n return app\n\n def _client_source(self, request: Request) -> str:\n explicit_header = request.headers.get(\"X-Client-Source\", \"\").strip()\n if explicit_header:\n return explicit_header\n user_agent = request.headers.get(\"User-Agent\", \"\").strip()\n if user_agent:\n return f\"user-agent:{user_agent}\"\n return \"unknown\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_app.py:HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlActionSet:\n health: HealthHandler\n start: ActionHandler\n stop: ActionHandler\n status: ActionHandler", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\"ControlActionSet\", \"ControlChannel\", \"ControlPlaneService\", \"HttpControlChannel\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/__init__.py:1-5", + "span_start": 1, + "span_end": 5, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlChannel(ABC):\n @abstractmethod\n async def start(self, actions: ControlActionSet) -> None:\n \"\"\"Start the control channel and bind handlers.\"\"\"\n\n @abstractmethod\n async def stop(self) -> None:\n \"\"\"Stop the control channel and release resources.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "class UvicornThreadRunner:\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._host = host\n self._port = port\n self._timeout = timeout\n self._server: Server | None = None\n self._thread: Thread | None = None\n self._error: BaseException | None = None\n\n async def start(self, app: FastAPI) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._error = None\n config = Config(app=app, host=self._host, port=self._port, log_level=\"warning\")\n self._server = Server(config)\n self._thread = Thread(target=self._serve, name=\"plba-http-control\", daemon=True)\n self._thread.start()\n await self._wait_until_started()\n\n async def stop(self) -> None:\n if self._server is None or self._thread is None:\n return\n self._server.should_exit = True\n await asyncio.to_thread(self._thread.join, self._timeout)\n self._server = None\n self._thread = None\n\n @property\n def port(self) -> int:\n if self._server is None or not getattr(self._server, \"servers\", None):\n return self._port\n socket = self._server.servers[0].sockets[0]\n return int(socket.getsockname()[1])\n\n async def _wait_until_started(self) -> None:\n if self._server is None:\n raise RuntimeError(\"Server is not initialized\")\n deadline = asyncio.get_running_loop().time() + max(float(self._timeout), 1.0)\n while not self._server.started:\n if self._error is not None:\n raise RuntimeError(\"HTTP control server failed to start\") from self._error\n if asyncio.get_running_loop().time() >= deadline:\n raise TimeoutError(\"HTTP control server startup timed out\")\n await asyncio.sleep(0.05)\n\n def _serve(self) -> None:\n if self._server is None:\n return\n try:\n asyncio.run(self._server.serve())\n except BaseException as exc: # noqa: BLE001\n self._error = exc", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_runner.py:UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_runner", + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C3_ENTRYPOINTS": "exact_path_fetch", + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C3_ENTRYPOINTS": 12, + "C0_SOURCE_CHUNKS": 6 + }, + "filters_by_layer": { + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C3_ENTRYPOINTS", + "query": "Найди точки входа HTTP control plane", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 12, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Найди точки входа HTTP control plane", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "HTTP", + "control", + "plane" + ] + }, + "layers": [ + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 6, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 50, + "retrieval_by_layer": { + "C3_ENTRYPOINTS": 24, + "C0_SOURCE_CHUNKS": 25 + }, + "merge_rank": 0 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Найди точки входа HTTP control plane", + "rag_count": 9 + }, + "output": { + "llm_answer": "Подтверждённые точки входа:\nsrc/app_runtime/control/http_app.py | fastapi http app.get\n- Объявлена декоратором @app.get, что указывает на точку входа для HTTP-запросов.\nsrc/app_runtime/control/http_app.py | fastapi http app.post\n- Объявлена декоратором @app.post, что указывает на точку входа для HTTP-запросов.\n\nВозможные кандидаты:\nsrc/app_runtime/control/http_channel.py | HttpControlChannel.start\n- Метод класса, вызывающий инициализацию FastAPI приложения через фабрику HttpControlAppFactory, однако прямого признака точки входа нет.\nsrc/app_runtime/control/http_channel.py | HttpControlChannel._health_response\n- Внутренний метод, возвращающий здоровье системы, но явно не указан как точка входа.\nsrc/app_runtime/control/http_channel.py | HttpControlChannel._action_response\n- Внутренний метод, обрабатывающий запросы к действиям, но явно не указан как точка входа." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 1094, + "evidence_rows": 9, + "evidence_chars": 6731 + }, + "evidence_summary": [ + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 6, + "unique_paths": 5 + } + ], + "prompt_template_id": "intent_code_qa_find_entrypoints_ru_v2", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 1624 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-control-plane.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-control-plane.md new file mode 100644 index 0000000..8f025c3 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-control-plane.md @@ -0,0 +1,33 @@ +# plba-v2-find-entrypoints-control-plane + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Найди точки входа HTTP control plane + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 9, + "llm_answer": "Подтверждённые точки входа:\nsrc/app_runtime/control/http_app.py | fastapi http app.get\n- Объявлена декоратором @app.get, что указывает на точку входа для HTTP-запросов.\nsrc/app_runtime/control/http_app.py | fastapi http app.post\n- Объявлена декоратором @app.post, что указывает на точку входа для HTTP-запросов.\n\nВозможные кандидаты:\nsrc/app_runtime/control/http_channel.py | HttpControlChannel.start\n- Метод класса, вызывающий инициализацию FastAPI приложения через фабрику HttpControlAppFactory, однако прямого признака точки входа нет.\nsrc/app_runtime/control/http_channel.py | HttpControlChannel._health_response\n- Внутренний метод, возвращающий здоровье системы, но явно не указан как точка входа.\nsrc/app_runtime/control/http_channel.py | HttpControlChannel._action_response\n- Внутренний метод, обрабатывающий запросы к действиям, но явно не указан как точка входа.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "HTTP", + "control", + "plane" + ], + "layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-health-endpoint.json b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-health-endpoint.json new file mode 100644 index 0000000..f2e5f8f --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-health-endpoint.json @@ -0,0 +1,1197 @@ +{ + "case_id": "plba-v2-find-entrypoints-health-endpoint", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 0, + "llm_answer": "Не удалось найти информацию о health endpoint ни в одном из слоёв RAG.\n\n1. **Что это и где определено**: health endpoint обычно представляет собой конечную точку API, используемую для проверки доступности сервиса или приложения. Его точное местоположение зависит от архитектуры приложения и технологий, используемых для его разработки (например, Flask, Django Rest Framework и т.д.).\n \n2. **Назначение по наблюдаемому коду**: отсутствует.\n\n3. **Подтверждённые зависимости или взаимодействия**: отсутствуют.\n\n4. **Что делает по шагам, если это видно в контексте**: не найдено.\n\n5. **Осторожные выводы**: невозможно сделать ввиду отсутствия информации.\n\n6. **Чего не хватает для полного объяснения**: необходимо наличие исходного кода или файла, содержащего определение health endpoint. Без этого нельзя точно определить, где именно он расположен и какие технологии используются.", + "answer_mode": "insufficient_evidence", + "path_scope": [], + "symbol_candidates": [ + "health", + "endpoint" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": false, + "mismatches": [ + "sub_intent: expected FIND_ENTRYPOINTS, got EXPLAIN", + "retrieval: expected non-empty rag, got 0 rows" + ], + "details": { + "case_id": "plba-v2-find-entrypoints-health-endpoint", + "text": "Где health endpoint?", + "mode": "full_chain", + "run_started_at": "2026-03-12T12:55:37", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Где health endpoint?", + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "HealthContributor.health", + "HealthContributor", + "HealthPayload" + ], + "confidence": 0.0 + }, + "rag_count": 0, + "rag_rows": [], + "llm_answer": "Не удалось найти информацию о health endpoint ни в одном из слоёв RAG.\n\n1. **Что это и где определено**: health endpoint обычно представляет собой конечную точку API, используемую для проверки доступности сервиса или приложения. Его точное местоположение зависит от архитектуры приложения и технологий, используемых для его разработки (например, Flask, Django Rest Framework и т.д.).\n \n2. **Назначение по наблюдаемому коду**: отсутствует.\n\n3. **Подтверждённые зависимости или взаимодействия**: отсутствуют.\n\n4. **Что делает по шагам, если это видно в контексте**: не найдено.\n\n5. **Осторожные выводы**: невозможно сделать ввиду отсутствия информации.\n\n6. **Чего не хватает для полного объяснения**: необходимо наличие исходного кода или файла, содержащего определение health endpoint. Без этого нельзя точно определить, где именно он расположен и какие технологии используются.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [], + "evidence_sufficient": false + }, + "llm": { + "answer_status": "insufficient_evidence", + "groundedness": "weakly_grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "unknown", + "symbol_candidates": [ + "health", + "endpoint" + ], + "keyword_hints": [ + "health", + "endpoint" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": null, + "workspace_id": null, + "returned_repo_ids": [], + "returned_workspace_ids": [] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "health endpoint", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "health endpoint", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "health endpoint", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "health endpoint", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "health endpoint", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "HealthContributor.health", + "HealthContributor", + "HealthPayload" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "miss", + "hit_count": 0, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "miss", + "hit_count": 0, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "miss", + "hit_count": 0, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "miss", + "hit_count": 0, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "miss", + "hit_count": 0, + "fail_reason": null + } + ] + }, + "constraint_violations": [ + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C1_SYMBOL_CATALOG", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + }, + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C0_SOURCE_CHUNKS", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + }, + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C4_SEMANTIC_ROLES", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + }, + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C2_DEPENDENCY_GRAPH", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + }, + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C3_ENTRYPOINTS", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + }, + { + "type": "SYMBOL_RESOLUTION_FAILED", + "severity": "warn", + "details": { + "status": "not_found", + "symbol_candidates": [ + "health", + "endpoint" + ] + }, + "suggested_fix": "Increase symbol layer budget or improve fuzzy symbol resolution settings." + } + ], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 141, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 43, + "C0_SOURCE_CHUNKS": 19, + "C4_SEMANTIC_ROLES": 18, + "C2_DEPENDENCY_GRAPH": 47, + "C3_ENTRYPOINTS": 12 + }, + "merge_rank": 0, + "prompt_build": 0, + "llm_call": 1499 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 308, + "evidence_rows": 0, + "evidence_chars": 0 + }, + "evidence_summary": [], + "prompt_template_id": "intent_code_qa_explain_ru_v2", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "health", + "endpoint" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 0, + "missing_evidence_reason": "empty_retrieval_context" + } + }, + "run_info": { + "case_id": "plba-v2-find-entrypoints-health-endpoint", + "mode": "full_chain", + "run_started_at": "2026-03-12T12:55:37", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Где health endpoint?", + "normalized_query": "Где health endpoint?" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Где health endpoint?" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Где health endpoint?" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "unknown", + "symbol_candidates": [ + "health", + "endpoint" + ], + "keyword_hints": [ + "health", + "endpoint" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Где health endpoint?" + }, + "output": { + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "HealthContributor.health", + "HealthContributor", + "HealthPayload" + ], + "confidence": 0.0 + }, + "rag_count": 0, + "rag_rows": [] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": null, + "workspace_id": null, + "returned_repo_ids": [], + "returned_workspace_ids": [] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "health endpoint", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "health endpoint", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "health endpoint", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "health endpoint", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "health endpoint", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "HealthContributor.health", + "HealthContributor", + "HealthPayload" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "miss", + "hit_count": 0, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "miss", + "hit_count": 0, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "miss", + "hit_count": 0, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "miss", + "hit_count": 0, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "miss", + "hit_count": 0, + "fail_reason": null + } + ] + }, + "constraint_violations": [ + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C1_SYMBOL_CATALOG", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + }, + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C0_SOURCE_CHUNKS", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + }, + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C4_SEMANTIC_ROLES", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + }, + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C2_DEPENDENCY_GRAPH", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + }, + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C3_ENTRYPOINTS", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + }, + { + "type": "SYMBOL_RESOLUTION_FAILED", + "severity": "warn", + "details": { + "status": "not_found", + "symbol_candidates": [ + "health", + "endpoint" + ] + }, + "suggested_fix": "Increase symbol layer budget or improve fuzzy symbol resolution settings." + } + ], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 141, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 43, + "C0_SOURCE_CHUNKS": 19, + "C4_SEMANTIC_ROLES": 18, + "C2_DEPENDENCY_GRAPH": 47, + "C3_ENTRYPOINTS": 12 + }, + "merge_rank": 0 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Где health endpoint?", + "rag_count": 0 + }, + "output": { + "llm_answer": "Не удалось найти информацию о health endpoint ни в одном из слоёв RAG.\n\n1. **Что это и где определено**: health endpoint обычно представляет собой конечную точку API, используемую для проверки доступности сервиса или приложения. Его точное местоположение зависит от архитектуры приложения и технологий, используемых для его разработки (например, Flask, Django Rest Framework и т.д.).\n \n2. **Назначение по наблюдаемому коду**: отсутствует.\n\n3. **Подтверждённые зависимости или взаимодействия**: отсутствуют.\n\n4. **Что делает по шагам, если это видно в контексте**: не найдено.\n\n5. **Осторожные выводы**: невозможно сделать ввиду отсутствия информации.\n\n6. **Чего не хватает для полного объяснения**: необходимо наличие исходного кода или файла, содержащего определение health endpoint. Без этого нельзя точно определить, где именно он расположен и какие технологии используются." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 308, + "evidence_rows": 0, + "evidence_chars": 0 + }, + "evidence_summary": [], + "prompt_template_id": "intent_code_qa_explain_ru_v2", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 1499 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-health-endpoint.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-health-endpoint.md new file mode 100644 index 0000000..5027b13 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-health-endpoint.md @@ -0,0 +1,36 @@ +# plba-v2-find-entrypoints-health-endpoint + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: runtime +- mode: full_chain +- passed: False + +## Query +Где health endpoint? + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 0, + "llm_answer": "Не удалось найти информацию о health endpoint ни в одном из слоёв RAG.\n\n1. **Что это и где определено**: health endpoint обычно представляет собой конечную точку API, используемую для проверки доступности сервиса или приложения. Его точное местоположение зависит от архитектуры приложения и технологий, используемых для его разработки (например, Flask, Django Rest Framework и т.д.).\n \n2. **Назначение по наблюдаемому коду**: отсутствует.\n\n3. **Подтверждённые зависимости или взаимодействия**: отсутствуют.\n\n4. **Что делает по шагам, если это видно в контексте**: не найдено.\n\n5. **Осторожные выводы**: невозможно сделать ввиду отсутствия информации.\n\n6. **Чего не хватает для полного объяснения**: необходимо наличие исходного кода или файла, содержащего определение health endpoint. Без этого нельзя точно определить, где именно он расположен и какие технологии используются.", + "answer_mode": "insufficient_evidence", + "path_scope": [], + "symbol_candidates": [ + "health", + "endpoint" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] +} + +## Mismatches +- sub_intent: expected FIND_ENTRYPOINTS, got EXPLAIN +- retrieval: expected non-empty rag, got 0 rows \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-find-tests-create-runtime.json b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-find-tests-create-runtime.json new file mode 100644 index 0000000..bfe2b44 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-find-tests-create-runtime.json @@ -0,0 +1,1963 @@ +{ + "case_id": "plba-v2-find-tests-create-runtime", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 16, + "llm_answer": "1. Прямые тесты:\n - tests/test_runtime.py | test_public_plba_package_exports_runtime_builder_and_worker_contract\n - Проверка: импорты и вызовы create_runtime.\n - Недостаток покрытия: отсутствие проверки поведения функции `create_runtime`.\n\n2. Косвенные или ближайшие тесты:\n - tests/test_business_control_actions.py | _build_runtime\n - Проверка: создание экземпляра `RuntimeManager` и регистрация канала управления.\n - Недостаток покрытия: отсутствует проверка непосредственно создания и работы runtime через функцию `create_runtime`.\n\n3. Что именно проверяется:\n - В direct-тестах проверяются импорты и вызовы функции `create_runtime`, однако поведение самой функции не подтверждено.\n - В косвенных тестах проверяется создание объекта `RuntimeManager` и его начальная настройка, а также работа каналов управления.\n\n4. Пробелы покрытия:\n - Отсутствует прямое тестирование поведения функции `create_runtime`.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "create_runtime" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-v2-find-tests-create-runtime", + "text": "Где тесты для create_runtime?", + "mode": "full_chain", + "run_started_at": "2026-03-12T12:55:37", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Где тесты для create_runtime?", + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "create_runtime" + ], + "confidence": 0.0 + }, + "rag_count": 16, + "rag_rows": [ + { + "path": "tests/test_runtime.py", + "content": "test_public_plba_package_exports_runtime_builder_and_worker_contract imports plba.create_runtime", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_public_plba_package_exports_runtime_builder_and_worker_contract:imports", + "span_start": 349, + "span_end": 349, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e93f80075cd9988737ece3cb5ec659c542132c4d383646e376917bfd0cb6ea64", + "edge_type": "imports", + "src_symbol_id": "ed06ffc5afb8a863cf7da3e40921f17abe4eec2a0770139e3380d93ccaae604a", + "src_qname": "test_public_plba_package_exports_runtime_builder_and_worker_contract", + "dst_symbol_id": null, + "dst_ref": "plba.create_runtime", + "resolution": "partial", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "test_public_plba_package_exports_runtime_builder_and_worker_contract calls create_runtime", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_public_plba_package_exports_runtime_builder_and_worker_contract:calls", + "span_start": 399, + "span_end": 399, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "039939355230de826d8bf7607f55fc59c7d932e5570ecb78994d0f13e57e8488", + "edge_type": "calls", + "src_symbol_id": "ed06ffc5afb8a863cf7da3e40921f17abe4eec2a0770139e3380d93ccaae604a", + "src_qname": "test_public_plba_package_exports_runtime_builder_and_worker_contract", + "dst_symbol_id": null, + "dst_ref": "create_runtime", + "resolution": "partial", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_worker_wakes_up_with_configured_interval\n -> ScenarioWorker\n -> ScenarioWorker.__init__\n -> ScenarioWorker._name\n -> ScenarioWorker.name", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_worker_wakes_up_with_configured_interval:dataflow_slice", + "span_start": 52, + "span_end": 166, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "2fd137f5852febe907f44d3b3e4ea430f89ccfe962ae1442a16ab9df64c8f76c", + "edge_type": "dataflow_slice", + "src_symbol_id": "65f877f78191d65e6a752e41cedc70ebc784c266804a55c1c56440336e1f0d6e", + "src_qname": "test_worker_wakes_up_with_configured_interval", + "dst_symbol_id": "da022da2c49fd9cfd09d6e6da6bbd59aaa7d28efd669ce8444e88d327ddec2fc", + "dst_ref": "ScenarioWorker.name", + "resolution": "resolved", + "slice_id": "2fd137f5852febe907f44d3b3e4ea430f89ccfe962ae1442a16ab9df64c8f76c", + "root_symbol_id": "65f877f78191d65e6a752e41cedc70ebc784c266804a55c1c56440336e1f0d6e", + "path_symbols": [ + "test_worker_wakes_up_with_configured_interval", + "ScenarioWorker", + "ScenarioWorker.__init__", + "ScenarioWorker._name", + "ScenarioWorker.name" + ], + "path_symbol_ids": [ + "65f877f78191d65e6a752e41cedc70ebc784c266804a55c1c56440336e1f0d6e", + "9a1d08a7eb1831c9f2e0db361b5207f036e477c160773ae08c0b287239785c52", + "9c20be046ba06644d1432e0f20eb223663d2b116ee7d91fdc62bc68323f2e593", + "da022da2c49fd9cfd09d6e6da6bbd59aaa7d28efd669ce8444e88d327ddec2fc" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_actions_stop_busy_worker_after_timeout\n -> BlockingRoutine\n -> BlockingRoutine.__init__\n -> BlockingRoutine._started\n -> BlockingRoutine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_actions_stop_busy_worker_after_timeout:dataflow_slice", + "span_start": 42, + "span_end": 238, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "8e7db3d2a9226f1c1d9942ac6373cfcafa0d2276758ddb8a3d3c455a3d58024d", + "edge_type": "dataflow_slice", + "src_symbol_id": "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "src_qname": "test_actions_stop_busy_worker_after_timeout", + "dst_symbol_id": "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04", + "dst_ref": "BlockingRoutine.run", + "resolution": "resolved", + "slice_id": "8e7db3d2a9226f1c1d9942ac6373cfcafa0d2276758ddb8a3d3c455a3d58024d", + "root_symbol_id": "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "path_symbols": [ + "test_actions_stop_busy_worker_after_timeout", + "BlockingRoutine", + "BlockingRoutine.__init__", + "BlockingRoutine._started", + "BlockingRoutine.run" + ], + "path_symbol_ids": [ + "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "a3349c5bc65e4003a4bbd6a8dbb7a54c337e12d1aed930caa701b12e520f1e67", + "486deeed3043c6db985aef258e96ddc67aa53608e67a83962fbd2471f649ddf1", + "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_actions_stop_busy_worker_after_timeout\n -> BlockingRoutine\n -> BlockingRoutine.__init__\n -> BlockingRoutine._release\n -> BlockingRoutine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_actions_stop_busy_worker_after_timeout:dataflow_slice", + "span_start": 43, + "span_end": 238, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "b59da9da82f9dfc8a9b695a08213786385da1ae9e17561ec3a0450a574a8cb39", + "edge_type": "dataflow_slice", + "src_symbol_id": "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "src_qname": "test_actions_stop_busy_worker_after_timeout", + "dst_symbol_id": "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04", + "dst_ref": "BlockingRoutine.run", + "resolution": "resolved", + "slice_id": "b59da9da82f9dfc8a9b695a08213786385da1ae9e17561ec3a0450a574a8cb39", + "root_symbol_id": "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "path_symbols": [ + "test_actions_stop_busy_worker_after_timeout", + "BlockingRoutine", + "BlockingRoutine.__init__", + "BlockingRoutine._release", + "BlockingRoutine.run" + ], + "path_symbol_ids": [ + "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "a3349c5bc65e4003a4bbd6a8dbb7a54c337e12d1aed930caa701b12e520f1e67", + "486deeed3043c6db985aef258e96ddc67aa53608e67a83962fbd2471f649ddf1", + "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_actions_stop_busy_worker_before_timeout\n -> BlockingRoutine\n -> BlockingRoutine.__init__\n -> BlockingRoutine._started\n -> BlockingRoutine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_actions_stop_busy_worker_before_timeout:dataflow_slice", + "span_start": 42, + "span_end": 212, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "f9bcce108870e49afa8b32d4625115a10707a3b0e7473179e958e5752bf258b4", + "edge_type": "dataflow_slice", + "src_symbol_id": "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "src_qname": "test_actions_stop_busy_worker_before_timeout", + "dst_symbol_id": "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04", + "dst_ref": "BlockingRoutine.run", + "resolution": "resolved", + "slice_id": "f9bcce108870e49afa8b32d4625115a10707a3b0e7473179e958e5752bf258b4", + "root_symbol_id": "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "path_symbols": [ + "test_actions_stop_busy_worker_before_timeout", + "BlockingRoutine", + "BlockingRoutine.__init__", + "BlockingRoutine._started", + "BlockingRoutine.run" + ], + "path_symbol_ids": [ + "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "a3349c5bc65e4003a4bbd6a8dbb7a54c337e12d1aed930caa701b12e520f1e67", + "486deeed3043c6db985aef258e96ddc67aa53608e67a83962fbd2471f649ddf1", + "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "def test_public_plba_package_exports_runtime_builder_and_worker_contract(tmp_path) -> None:\n import plba\n from plba import ApplicationModule as PublicApplicationModule\n from plba import InMemoryTaskQueue\n from plba import Worker as PublicWorker\n from plba import WorkerHealth as PublicWorkerHealth\n from plba import WorkerStatus as PublicWorkerStatus\n from plba import create_runtime\n\n config_path = tmp_path / \"config.yml\"\n config_path.write_text(\"platform: {}\\n\", encoding=\"utf-8\")\n\n queue = InMemoryTaskQueue[int]()\n queue.put(2)\n assert queue.get(timeout=0.01) == 2\n queue.task_done()\n\n class PublicRoutine:\n def __init__(self) -> None:\n self.runs = 0\n\n def run(self) -> None:\n if self.runs == 0:\n self.runs += 1\n\n class PublicWorkerImpl(PublicWorker):\n def __init__(self, routine: PublicRoutine) -> None:\n self._inner = RoutineWorker(\"public-worker\", routine)\n\n @property\n def name(self) -> str:\n return self._inner.name\n\n @property\n def critical(self) -> bool:\n return self._inner.critical\n\n def start(self) -> None:\n self._inner.start()\n\n def stop(self, force: bool = False) -> None:\n self._inner.stop(force=force)\n\n def health(self) -> PublicWorkerHealth:\n return self._inner.health()\n\n def status(self) -> PublicWorkerStatus:\n return self._inner.status()\n\n class PublicExampleModule(PublicApplicationModule):\n @property\n def name(self) -> str:\n return \"public-example\"\n\n def register(self, registry: ModuleRegistry) -> None:\n registry.add_worker(PublicWorkerImpl(PublicRoutine()))\n\n runtime = create_runtime(PublicExampleModule(), config_path=str(config_path))\n runtime.start()\n sleep(0.2)\n assert runtime.configuration.get() == {\"platform\": {}}\n assert runtime.status()[\"workers\"][\"registered\"] == 1\n assert hasattr(plba, \"QueueWorker\") is False\n runtime.stop()", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_runtime.py:test_public_plba_package_exports_runtime_builder_and_worker_contract", + "span_start": 342, + "span_end": 405, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 13, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _build_runtime(worker: Worker, *, control_timeout: int = 1) -> tuple[RuntimeManager, str]:\n runtime = RuntimeManager()\n channel = HttpControlChannel(host=\"127.0.0.1\", port=0, timeout=control_timeout)\n runtime.control_plane.register_channel(channel)\n runtime.register_module(WorkerModule(worker))\n runtime.start()\n return runtime, f\"http://127.0.0.1:{channel.port}\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_build_runtime", + "span_start": 154, + "span_end": 160, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 6, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class IntervalRoutine:\n calls: list[float] = field(default_factory=list)\n _lock: Lock = field(default_factory=Lock)\n\n def run(self) -> None:\n with self._lock:\n self.calls.append(monotonic())\n\n def wait_runs(self, count: int, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n with self._lock:\n if len(self.calls) >= count:\n return True\n sleep(0.01)\n return False\n\n def deltas(self) -> list[float]:\n with self._lock:\n return [self.calls[index + 1] - self.calls[index] for index in range(len(self.calls) - 1)]", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:IntervalRoutine", + "span_start": 18, + "span_end": 37, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class ScenarioWorker(Worker):\n def __init__(self, name: str, routine: object, *, interval: float = 0.05) -> None:\n self._name = name\n self._routine = routine\n self._interval = interval\n self._thread: Thread | None = None\n self._stop_requested = Event()\n self._in_flight = 0\n self._runs = 0\n self._lock = Lock()\n\n @property\n def name(self) -> str:\n return self._name\n\n @property\n def critical(self) -> bool:\n return True\n\n def start(self) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._stop_requested.clear()\n self._thread = Thread(target=self._loop, name=f\"{self._name}-thread\", daemon=True)\n self._thread.start()\n\n def stop(self, force: bool = False) -> None:\n self._stop_requested.set()\n\n def health(self) -> WorkerHealth:\n return WorkerHealth(name=self.name, status=\"ok\", critical=True, meta={\"runs\": self._runs})\n\n def status(self) -> WorkerStatus:\n thread_alive = self._thread is not None and self._thread.is_alive()\n with self._lock:\n in_flight = self._in_flight\n runs = self._runs\n if not thread_alive:\n state = \"stopped\"\n elif self._stop_requested.is_set():\n state = \"stopping\"\n elif in_flight > 0:\n state = \"busy\"\n else:\n state = \"idle\"\n return WorkerStatus(name=self.name, state=state, in_flight=in_flight, meta={\"runs\": runs})\n\n def _loop(self) -> None:\n while not self._stop_requested.is_set():\n with self._lock:\n self._in_flight += 1\n try:\n self._routine.run()\n with self._lock:\n self._runs += 1\n finally:\n with self._lock:\n self._in_flight -= 1\n if self._stop_requested.is_set():\n return\n sleep(self._interval)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:ScenarioWorker", + "span_start": 50, + "span_end": 110, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 2, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _http_call_json(\n base_url: str,\n path: str,\n *,\n method: str = \"GET\",\n headers: dict[str, str] | None = None,\n) -> tuple[int, dict[str, object]]:\n request = Request(f\"{base_url}{path}\", method=method, headers=headers or {})\n try:\n with urlopen(request, timeout=15.0) as response:\n status = response.status\n body = response.read()\n except HTTPError as error:\n status = error.code\n body = error.read()\n payload = json.loads(body.decode(\"utf-8\"))\n return status, payload", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_http_call_json", + "span_start": 125, + "span_end": 141, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 4, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _poll_until_stopped(base_url: str, timeout: float = 2.0) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n _, payload = _http_call_json(base_url, \"/actions/status\")\n if payload.get(\"detail\") == \"stopped\":\n return True\n sleep(0.05)\n return False", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_poll_until_stopped", + "span_start": 144, + "span_end": 151, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 5, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def test_worker_wakes_up_with_configured_interval() -> None:\n interval = 0.15\n routine = IntervalRoutine()\n worker = ScenarioWorker(\"interval-worker\", routine, interval=interval)\n runtime = RuntimeManager()\n runtime.register_module(WorkerModule(worker))\n\n runtime.start()\n try:\n assert routine.wait_runs(count=3, timeout=2.0) is True\n finally:\n runtime.stop()\n\n deltas = routine.deltas()\n assert len(deltas) >= 2\n assert all(delta >= interval * 0.7 for delta in deltas[:2])", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:test_worker_wakes_up_with_configured_interval", + "span_start": 163, + "span_end": 178, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 7, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class WorkerModule(ApplicationModule):\n def __init__(self, worker: Worker) -> None:\n self._worker = worker\n\n @property\n def name(self) -> str:\n return \"business-tests\"\n\n def register(self, registry: ModuleRegistry) -> None:\n registry.add_worker(self._worker)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:WorkerModule", + "span_start": 113, + "span_end": 122, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 3, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class BlockingRoutine:\n def __init__(self, started: Event, release: Event) -> None:\n self._started = started\n self._release = release\n\n def run(self) -> None:\n self._started.set()\n self._release.wait(timeout=5.0)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:BlockingRoutine", + "span_start": 40, + "span_end": 47, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def test_actions_start_stop_and_health_when_worker_is_idle() -> None:\n runtime, base_url = _build_runtime(ScenarioWorker(\"idle-worker\", IntervalRoutine(), interval=0.2))\n try:\n stop_status, stop_payload = _http_call_json(base_url, \"/actions/stop\", method=\"POST\")\n assert stop_status == 200\n assert isinstance(stop_payload.get(\"detail\"), dict)\n assert stop_payload[\"detail\"][\"timed_out\"] is False\n assert stop_payload[\"detail\"][\"state\"] == \"stopped\"\n\n health_stopped_status, health_stopped_payload = _http_call_json(base_url, \"/health\")\n assert health_stopped_status == 503\n assert health_stopped_payload[\"state\"] == \"stopped\"\n assert health_stopped_payload[\"status\"] == \"unhealthy\"\n\n start_status, start_payload = _http_call_json(base_url, \"/actions/start\", method=\"POST\")\n assert start_status == 200\n assert isinstance(start_payload.get(\"detail\"), dict)\n assert start_payload[\"detail\"][\"timed_out\"] is False\n assert start_payload[\"detail\"][\"state\"] in {\"idle\", \"busy\"}\n\n health_started_status, health_started_payload = _http_call_json(base_url, \"/health\")\n assert health_started_status == 200\n assert health_started_payload[\"status\"] == \"ok\"\n assert health_started_payload[\"state\"] in {\"idle\", \"busy\"}\n finally:\n runtime.stop()", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:test_actions_start_stop_and_health_when_worker_is_idle", + "span_start": 181, + "span_end": 206, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 8, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "1. Прямые тесты:\n - tests/test_runtime.py | test_public_plba_package_exports_runtime_builder_and_worker_contract\n - Проверка: импорты и вызовы create_runtime.\n - Недостаток покрытия: отсутствие проверки поведения функции `create_runtime`.\n\n2. Косвенные или ближайшие тесты:\n - tests/test_business_control_actions.py | _build_runtime\n - Проверка: создание экземпляра `RuntimeManager` и регистрация канала управления.\n - Недостаток покрытия: отсутствует проверка непосредственно создания и работы runtime через функцию `create_runtime`.\n\n3. Что именно проверяется:\n - В direct-тестах проверяются импорты и вызовы функции `create_runtime`, однако поведение самой функции не подтверждено.\n - В косвенных тестах проверяется создание объекта `RuntimeManager` и его начальная настройка, а также работа каналов управления.\n\n4. Пробелы покрытия:\n - Отсутствует прямое тестирование поведения функции `create_runtime`.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C2_DEPENDENCY_GRAPH" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "function", + "symbol_candidates": [ + "create_runtime" + ], + "keyword_hints": [ + "create_runtime" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "test_file_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "test_symbol_patterns": [ + "test_create_runtime", + "Testcreate_runtime", + "create_runtime" + ], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C0_SOURCE_CHUNKS": 10 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src", + "tests" + ], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src", + "tests" + ], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "create_runtime", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Где тесты для create_runtime? test_create_runtime Testcreate_runtime create_runtime", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Где тесты для create_runtime? test_create_runtime Testcreate_runtime create_runtime", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 10, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 0, + "candidates_after_filter": 0 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src", + "tests" + ], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src", + "tests" + ], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 10, + "candidates_after_filter": 10 + } + ], + "fallback": { + "used": true, + "reason": "scope_relaxed_no_hits" + }, + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "create_runtime" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "miss", + "hit_count": 0, + "fail_reason": "scope_relaxed_no_hits" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 10, + "fail_reason": null + } + ] + }, + "constraint_violations": [ + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C1_SYMBOL_CATALOG", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + } + ], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 120, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 52, + "C2_DEPENDENCY_GRAPH": 52, + "C0_SOURCE_CHUNKS": 15 + }, + "merge_rank": 0, + "prompt_build": 0, + "llm_call": 1592 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 980, + "evidence_rows": 16, + "evidence_chars": 9185 + }, + "evidence_summary": [ + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 2 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 10, + "unique_paths": 2 + } + ], + "prompt_template_id": "intent_code_qa_find_tests_ru_v2", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "create_runtime" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 16, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-v2-find-tests-create-runtime", + "mode": "full_chain", + "run_started_at": "2026-03-12T12:55:37", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Где тесты для create_runtime?", + "normalized_query": "Где тесты для create_runtime?" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Где тесты для create_runtime?" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Где тесты для create_runtime?" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "function", + "symbol_candidates": [ + "create_runtime" + ], + "keyword_hints": [ + "create_runtime" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "test_file_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "test_symbol_patterns": [ + "test_create_runtime", + "Testcreate_runtime", + "create_runtime" + ], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Где тесты для create_runtime?" + }, + "output": { + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "create_runtime" + ], + "confidence": 0.0 + }, + "rag_count": 16, + "rag_rows": [ + { + "path": "tests/test_runtime.py", + "content": "test_public_plba_package_exports_runtime_builder_and_worker_contract imports plba.create_runtime", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_public_plba_package_exports_runtime_builder_and_worker_contract:imports", + "span_start": 349, + "span_end": 349, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e93f80075cd9988737ece3cb5ec659c542132c4d383646e376917bfd0cb6ea64", + "edge_type": "imports", + "src_symbol_id": "ed06ffc5afb8a863cf7da3e40921f17abe4eec2a0770139e3380d93ccaae604a", + "src_qname": "test_public_plba_package_exports_runtime_builder_and_worker_contract", + "dst_symbol_id": null, + "dst_ref": "plba.create_runtime", + "resolution": "partial", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "test_public_plba_package_exports_runtime_builder_and_worker_contract calls create_runtime", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_public_plba_package_exports_runtime_builder_and_worker_contract:calls", + "span_start": 399, + "span_end": 399, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "039939355230de826d8bf7607f55fc59c7d932e5570ecb78994d0f13e57e8488", + "edge_type": "calls", + "src_symbol_id": "ed06ffc5afb8a863cf7da3e40921f17abe4eec2a0770139e3380d93ccaae604a", + "src_qname": "test_public_plba_package_exports_runtime_builder_and_worker_contract", + "dst_symbol_id": null, + "dst_ref": "create_runtime", + "resolution": "partial", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_worker_wakes_up_with_configured_interval\n -> ScenarioWorker\n -> ScenarioWorker.__init__\n -> ScenarioWorker._name\n -> ScenarioWorker.name", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_worker_wakes_up_with_configured_interval:dataflow_slice", + "span_start": 52, + "span_end": 166, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "2fd137f5852febe907f44d3b3e4ea430f89ccfe962ae1442a16ab9df64c8f76c", + "edge_type": "dataflow_slice", + "src_symbol_id": "65f877f78191d65e6a752e41cedc70ebc784c266804a55c1c56440336e1f0d6e", + "src_qname": "test_worker_wakes_up_with_configured_interval", + "dst_symbol_id": "da022da2c49fd9cfd09d6e6da6bbd59aaa7d28efd669ce8444e88d327ddec2fc", + "dst_ref": "ScenarioWorker.name", + "resolution": "resolved", + "slice_id": "2fd137f5852febe907f44d3b3e4ea430f89ccfe962ae1442a16ab9df64c8f76c", + "root_symbol_id": "65f877f78191d65e6a752e41cedc70ebc784c266804a55c1c56440336e1f0d6e", + "path_symbols": [ + "test_worker_wakes_up_with_configured_interval", + "ScenarioWorker", + "ScenarioWorker.__init__", + "ScenarioWorker._name", + "ScenarioWorker.name" + ], + "path_symbol_ids": [ + "65f877f78191d65e6a752e41cedc70ebc784c266804a55c1c56440336e1f0d6e", + "9a1d08a7eb1831c9f2e0db361b5207f036e477c160773ae08c0b287239785c52", + "9c20be046ba06644d1432e0f20eb223663d2b116ee7d91fdc62bc68323f2e593", + "da022da2c49fd9cfd09d6e6da6bbd59aaa7d28efd669ce8444e88d327ddec2fc" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_actions_stop_busy_worker_after_timeout\n -> BlockingRoutine\n -> BlockingRoutine.__init__\n -> BlockingRoutine._started\n -> BlockingRoutine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_actions_stop_busy_worker_after_timeout:dataflow_slice", + "span_start": 42, + "span_end": 238, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "8e7db3d2a9226f1c1d9942ac6373cfcafa0d2276758ddb8a3d3c455a3d58024d", + "edge_type": "dataflow_slice", + "src_symbol_id": "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "src_qname": "test_actions_stop_busy_worker_after_timeout", + "dst_symbol_id": "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04", + "dst_ref": "BlockingRoutine.run", + "resolution": "resolved", + "slice_id": "8e7db3d2a9226f1c1d9942ac6373cfcafa0d2276758ddb8a3d3c455a3d58024d", + "root_symbol_id": "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "path_symbols": [ + "test_actions_stop_busy_worker_after_timeout", + "BlockingRoutine", + "BlockingRoutine.__init__", + "BlockingRoutine._started", + "BlockingRoutine.run" + ], + "path_symbol_ids": [ + "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "a3349c5bc65e4003a4bbd6a8dbb7a54c337e12d1aed930caa701b12e520f1e67", + "486deeed3043c6db985aef258e96ddc67aa53608e67a83962fbd2471f649ddf1", + "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_actions_stop_busy_worker_after_timeout\n -> BlockingRoutine\n -> BlockingRoutine.__init__\n -> BlockingRoutine._release\n -> BlockingRoutine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_actions_stop_busy_worker_after_timeout:dataflow_slice", + "span_start": 43, + "span_end": 238, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "b59da9da82f9dfc8a9b695a08213786385da1ae9e17561ec3a0450a574a8cb39", + "edge_type": "dataflow_slice", + "src_symbol_id": "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "src_qname": "test_actions_stop_busy_worker_after_timeout", + "dst_symbol_id": "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04", + "dst_ref": "BlockingRoutine.run", + "resolution": "resolved", + "slice_id": "b59da9da82f9dfc8a9b695a08213786385da1ae9e17561ec3a0450a574a8cb39", + "root_symbol_id": "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "path_symbols": [ + "test_actions_stop_busy_worker_after_timeout", + "BlockingRoutine", + "BlockingRoutine.__init__", + "BlockingRoutine._release", + "BlockingRoutine.run" + ], + "path_symbol_ids": [ + "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "a3349c5bc65e4003a4bbd6a8dbb7a54c337e12d1aed930caa701b12e520f1e67", + "486deeed3043c6db985aef258e96ddc67aa53608e67a83962fbd2471f649ddf1", + "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_actions_stop_busy_worker_before_timeout\n -> BlockingRoutine\n -> BlockingRoutine.__init__\n -> BlockingRoutine._started\n -> BlockingRoutine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_actions_stop_busy_worker_before_timeout:dataflow_slice", + "span_start": 42, + "span_end": 212, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "f9bcce108870e49afa8b32d4625115a10707a3b0e7473179e958e5752bf258b4", + "edge_type": "dataflow_slice", + "src_symbol_id": "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "src_qname": "test_actions_stop_busy_worker_before_timeout", + "dst_symbol_id": "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04", + "dst_ref": "BlockingRoutine.run", + "resolution": "resolved", + "slice_id": "f9bcce108870e49afa8b32d4625115a10707a3b0e7473179e958e5752bf258b4", + "root_symbol_id": "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "path_symbols": [ + "test_actions_stop_busy_worker_before_timeout", + "BlockingRoutine", + "BlockingRoutine.__init__", + "BlockingRoutine._started", + "BlockingRoutine.run" + ], + "path_symbol_ids": [ + "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "a3349c5bc65e4003a4bbd6a8dbb7a54c337e12d1aed930caa701b12e520f1e67", + "486deeed3043c6db985aef258e96ddc67aa53608e67a83962fbd2471f649ddf1", + "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "def test_public_plba_package_exports_runtime_builder_and_worker_contract(tmp_path) -> None:\n import plba\n from plba import ApplicationModule as PublicApplicationModule\n from plba import InMemoryTaskQueue\n from plba import Worker as PublicWorker\n from plba import WorkerHealth as PublicWorkerHealth\n from plba import WorkerStatus as PublicWorkerStatus\n from plba import create_runtime\n\n config_path = tmp_path / \"config.yml\"\n config_path.write_text(\"platform: {}\\n\", encoding=\"utf-8\")\n\n queue = InMemoryTaskQueue[int]()\n queue.put(2)\n assert queue.get(timeout=0.01) == 2\n queue.task_done()\n\n class PublicRoutine:\n def __init__(self) -> None:\n self.runs = 0\n\n def run(self) -> None:\n if self.runs == 0:\n self.runs += 1\n\n class PublicWorkerImpl(PublicWorker):\n def __init__(self, routine: PublicRoutine) -> None:\n self._inner = RoutineWorker(\"public-worker\", routine)\n\n @property\n def name(self) -> str:\n return self._inner.name\n\n @property\n def critical(self) -> bool:\n return self._inner.critical\n\n def start(self) -> None:\n self._inner.start()\n\n def stop(self, force: bool = False) -> None:\n self._inner.stop(force=force)\n\n def health(self) -> PublicWorkerHealth:\n return self._inner.health()\n\n def status(self) -> PublicWorkerStatus:\n return self._inner.status()\n\n class PublicExampleModule(PublicApplicationModule):\n @property\n def name(self) -> str:\n return \"public-example\"\n\n def register(self, registry: ModuleRegistry) -> None:\n registry.add_worker(PublicWorkerImpl(PublicRoutine()))\n\n runtime = create_runtime(PublicExampleModule(), config_path=str(config_path))\n runtime.start()\n sleep(0.2)\n assert runtime.configuration.get() == {\"platform\": {}}\n assert runtime.status()[\"workers\"][\"registered\"] == 1\n assert hasattr(plba, \"QueueWorker\") is False\n runtime.stop()", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_runtime.py:test_public_plba_package_exports_runtime_builder_and_worker_contract", + "span_start": 342, + "span_end": 405, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 13, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _build_runtime(worker: Worker, *, control_timeout: int = 1) -> tuple[RuntimeManager, str]:\n runtime = RuntimeManager()\n channel = HttpControlChannel(host=\"127.0.0.1\", port=0, timeout=control_timeout)\n runtime.control_plane.register_channel(channel)\n runtime.register_module(WorkerModule(worker))\n runtime.start()\n return runtime, f\"http://127.0.0.1:{channel.port}\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_build_runtime", + "span_start": 154, + "span_end": 160, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 6, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class IntervalRoutine:\n calls: list[float] = field(default_factory=list)\n _lock: Lock = field(default_factory=Lock)\n\n def run(self) -> None:\n with self._lock:\n self.calls.append(monotonic())\n\n def wait_runs(self, count: int, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n with self._lock:\n if len(self.calls) >= count:\n return True\n sleep(0.01)\n return False\n\n def deltas(self) -> list[float]:\n with self._lock:\n return [self.calls[index + 1] - self.calls[index] for index in range(len(self.calls) - 1)]", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:IntervalRoutine", + "span_start": 18, + "span_end": 37, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class ScenarioWorker(Worker):\n def __init__(self, name: str, routine: object, *, interval: float = 0.05) -> None:\n self._name = name\n self._routine = routine\n self._interval = interval\n self._thread: Thread | None = None\n self._stop_requested = Event()\n self._in_flight = 0\n self._runs = 0\n self._lock = Lock()\n\n @property\n def name(self) -> str:\n return self._name\n\n @property\n def critical(self) -> bool:\n return True\n\n def start(self) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._stop_requested.clear()\n self._thread = Thread(target=self._loop, name=f\"{self._name}-thread\", daemon=True)\n self._thread.start()\n\n def stop(self, force: bool = False) -> None:\n self._stop_requested.set()\n\n def health(self) -> WorkerHealth:\n return WorkerHealth(name=self.name, status=\"ok\", critical=True, meta={\"runs\": self._runs})\n\n def status(self) -> WorkerStatus:\n thread_alive = self._thread is not None and self._thread.is_alive()\n with self._lock:\n in_flight = self._in_flight\n runs = self._runs\n if not thread_alive:\n state = \"stopped\"\n elif self._stop_requested.is_set():\n state = \"stopping\"\n elif in_flight > 0:\n state = \"busy\"\n else:\n state = \"idle\"\n return WorkerStatus(name=self.name, state=state, in_flight=in_flight, meta={\"runs\": runs})\n\n def _loop(self) -> None:\n while not self._stop_requested.is_set():\n with self._lock:\n self._in_flight += 1\n try:\n self._routine.run()\n with self._lock:\n self._runs += 1\n finally:\n with self._lock:\n self._in_flight -= 1\n if self._stop_requested.is_set():\n return\n sleep(self._interval)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:ScenarioWorker", + "span_start": 50, + "span_end": 110, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 2, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _http_call_json(\n base_url: str,\n path: str,\n *,\n method: str = \"GET\",\n headers: dict[str, str] | None = None,\n) -> tuple[int, dict[str, object]]:\n request = Request(f\"{base_url}{path}\", method=method, headers=headers or {})\n try:\n with urlopen(request, timeout=15.0) as response:\n status = response.status\n body = response.read()\n except HTTPError as error:\n status = error.code\n body = error.read()\n payload = json.loads(body.decode(\"utf-8\"))\n return status, payload", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_http_call_json", + "span_start": 125, + "span_end": 141, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 4, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _poll_until_stopped(base_url: str, timeout: float = 2.0) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n _, payload = _http_call_json(base_url, \"/actions/status\")\n if payload.get(\"detail\") == \"stopped\":\n return True\n sleep(0.05)\n return False", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_poll_until_stopped", + "span_start": 144, + "span_end": 151, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 5, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def test_worker_wakes_up_with_configured_interval() -> None:\n interval = 0.15\n routine = IntervalRoutine()\n worker = ScenarioWorker(\"interval-worker\", routine, interval=interval)\n runtime = RuntimeManager()\n runtime.register_module(WorkerModule(worker))\n\n runtime.start()\n try:\n assert routine.wait_runs(count=3, timeout=2.0) is True\n finally:\n runtime.stop()\n\n deltas = routine.deltas()\n assert len(deltas) >= 2\n assert all(delta >= interval * 0.7 for delta in deltas[:2])", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:test_worker_wakes_up_with_configured_interval", + "span_start": 163, + "span_end": 178, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 7, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class WorkerModule(ApplicationModule):\n def __init__(self, worker: Worker) -> None:\n self._worker = worker\n\n @property\n def name(self) -> str:\n return \"business-tests\"\n\n def register(self, registry: ModuleRegistry) -> None:\n registry.add_worker(self._worker)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:WorkerModule", + "span_start": 113, + "span_end": 122, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 3, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class BlockingRoutine:\n def __init__(self, started: Event, release: Event) -> None:\n self._started = started\n self._release = release\n\n def run(self) -> None:\n self._started.set()\n self._release.wait(timeout=5.0)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:BlockingRoutine", + "span_start": 40, + "span_end": 47, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def test_actions_start_stop_and_health_when_worker_is_idle() -> None:\n runtime, base_url = _build_runtime(ScenarioWorker(\"idle-worker\", IntervalRoutine(), interval=0.2))\n try:\n stop_status, stop_payload = _http_call_json(base_url, \"/actions/stop\", method=\"POST\")\n assert stop_status == 200\n assert isinstance(stop_payload.get(\"detail\"), dict)\n assert stop_payload[\"detail\"][\"timed_out\"] is False\n assert stop_payload[\"detail\"][\"state\"] == \"stopped\"\n\n health_stopped_status, health_stopped_payload = _http_call_json(base_url, \"/health\")\n assert health_stopped_status == 503\n assert health_stopped_payload[\"state\"] == \"stopped\"\n assert health_stopped_payload[\"status\"] == \"unhealthy\"\n\n start_status, start_payload = _http_call_json(base_url, \"/actions/start\", method=\"POST\")\n assert start_status == 200\n assert isinstance(start_payload.get(\"detail\"), dict)\n assert start_payload[\"detail\"][\"timed_out\"] is False\n assert start_payload[\"detail\"][\"state\"] in {\"idle\", \"busy\"}\n\n health_started_status, health_started_payload = _http_call_json(base_url, \"/health\")\n assert health_started_status == 200\n assert health_started_payload[\"status\"] == \"ok\"\n assert health_started_payload[\"state\"] in {\"idle\", \"busy\"}\n finally:\n runtime.stop()", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:test_actions_start_stop_and_health_when_worker_is_idle", + "span_start": 181, + "span_end": 206, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 8, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C0_SOURCE_CHUNKS": 10 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src", + "tests" + ], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src", + "tests" + ], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "create_runtime", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Где тесты для create_runtime? test_create_runtime Testcreate_runtime create_runtime", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Где тесты для create_runtime? test_create_runtime Testcreate_runtime create_runtime", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 10, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 0, + "candidates_after_filter": 0 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src", + "tests" + ], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src", + "tests" + ], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 10, + "candidates_after_filter": 10 + } + ], + "fallback": { + "used": true, + "reason": "scope_relaxed_no_hits" + }, + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "create_runtime" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "miss", + "hit_count": 0, + "fail_reason": "scope_relaxed_no_hits" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 10, + "fail_reason": null + } + ] + }, + "constraint_violations": [ + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C1_SYMBOL_CATALOG", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + } + ], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 120, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 52, + "C2_DEPENDENCY_GRAPH": 52, + "C0_SOURCE_CHUNKS": 15 + }, + "merge_rank": 0 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Где тесты для create_runtime?", + "rag_count": 16 + }, + "output": { + "llm_answer": "1. Прямые тесты:\n - tests/test_runtime.py | test_public_plba_package_exports_runtime_builder_and_worker_contract\n - Проверка: импорты и вызовы create_runtime.\n - Недостаток покрытия: отсутствие проверки поведения функции `create_runtime`.\n\n2. Косвенные или ближайшие тесты:\n - tests/test_business_control_actions.py | _build_runtime\n - Проверка: создание экземпляра `RuntimeManager` и регистрация канала управления.\n - Недостаток покрытия: отсутствует проверка непосредственно создания и работы runtime через функцию `create_runtime`.\n\n3. Что именно проверяется:\n - В direct-тестах проверяются импорты и вызовы функции `create_runtime`, однако поведение самой функции не подтверждено.\n - В косвенных тестах проверяется создание объекта `RuntimeManager` и его начальная настройка, а также работа каналов управления.\n\n4. Пробелы покрытия:\n - Отсутствует прямое тестирование поведения функции `create_runtime`." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 980, + "evidence_rows": 16, + "evidence_chars": 9185 + }, + "evidence_summary": [ + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 2 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 10, + "unique_paths": 2 + } + ], + "prompt_template_id": "intent_code_qa_find_tests_ru_v2", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 1592 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-find-tests-create-runtime.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-find-tests-create-runtime.md new file mode 100644 index 0000000..b3ff280 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-find-tests-create-runtime.md @@ -0,0 +1,32 @@ +# plba-v2-find-tests-create-runtime + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Где тесты для create_runtime? + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 16, + "llm_answer": "1. Прямые тесты:\n - tests/test_runtime.py | test_public_plba_package_exports_runtime_builder_and_worker_contract\n - Проверка: импорты и вызовы create_runtime.\n - Недостаток покрытия: отсутствие проверки поведения функции `create_runtime`.\n\n2. Косвенные или ближайшие тесты:\n - tests/test_business_control_actions.py | _build_runtime\n - Проверка: создание экземпляра `RuntimeManager` и регистрация канала управления.\n - Недостаток покрытия: отсутствует проверка непосредственно создания и работы runtime через функцию `create_runtime`.\n\n3. Что именно проверяется:\n - В direct-тестах проверяются импорты и вызовы функции `create_runtime`, однако поведение самой функции не подтверждено.\n - В косвенных тестах проверяется создание объекта `RuntimeManager` и его начальная настройка, а также работа каналов управления.\n\n4. Пробелы покрытия:\n - Отсутствует прямое тестирование поведения функции `create_runtime`.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "create_runtime" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-find-tests-runtime-manager.json b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-find-tests-runtime-manager.json new file mode 100644 index 0000000..c83dbe0 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-find-tests-runtime-manager.json @@ -0,0 +1,1879 @@ +{ + "case_id": "plba-v2-find-tests-runtime-manager", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 16, + "llm_answer": "1. Прямые тесты:\n - tests/test_runtime.py | test_runtime_runs_worker_routine_and_exposes_status\n - tests/test_runtime.py | test_runtime_graceful_stop_waits_until_worker_finishes\nПроверка:\n - Создания и инициализации RuntimeManager.\n - Взаимодействия RuntimeManager с worker'ами и обработкой статуса.\n - Ожидания завершения работы worker'а при корректном завершении процесса остановки.\n - Проверки поведения RuntimeManager в разных состояниях (busy, stopped).\n\n2. Косвенные или ближайшие тесты:\n - tests/test_business_control_actions.py | _build_runtime\n - tests/test_business_control_actions.py | test_worker_wakes_up_with_configured_interval\nЭти тесты косвенно затрагивают RuntimeManager через инстанцирование его в других контекстах и использовании его методов, однако непосредственно поведение RuntimeManager не проверяется напрямую.\n\n3. Пробелы покрытия:\n - Не найдены явные тесты, которые проверяют обработку ошибок и исключений в RuntimeManager.\n - Нет тестов, которые покрывают интеграцию RuntimeManager с внешними компонентами или библиотеками.\n\nПрямых тестов, специально направленных на проверку различных аспектов жизненного цикла RuntimeManager, достаточно много, однако следует добавить тесты, направленные на проверку ошибок и интеграций.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-v2-find-tests-runtime-manager", + "text": "Где тесты для RuntimeManager?", + "mode": "full_chain", + "run_started_at": "2026-03-12T12:55:37", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Где тесты для RuntimeManager?", + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "RuntimeManager" + ], + "confidence": 0.0 + }, + "rag_count": 16, + "rag_rows": [ + { + "path": "tests/test_runtime.py", + "content": "test_runtime_runs_worker_routine_and_exposes_status instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_runtime_runs_worker_routine_and_exposes_status:instantiates", + "span_start": 209, + "span_end": 209, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "c397a308e7824ba9fe400a754c7e15e66ea6f058d7f5d3e82bb002bb78b509d2", + "edge_type": "instantiates", + "src_symbol_id": "1c767eb5ee08e84f45b18c8ed7531ec0ed73c63fb1594823569672db7b21e992", + "src_qname": "test_runtime_runs_worker_routine_and_exposes_status", + "dst_symbol_id": "aeadc039653807b0da1ca6e3cc1078ee61cfc510b28e7f9c2ec04c59da43cc8d", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "test_runtime_graceful_stop_waits_until_worker_finishes instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_runtime_graceful_stop_waits_until_worker_finishes:instantiates", + "span_start": 229, + "span_end": 229, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "76b4701262ccaa0a7a41691407c4ebdb2ca74a2415d89f0a38ef0d4f608bda93", + "edge_type": "instantiates", + "src_symbol_id": "1076e788e4a03b10d7bc1313a8ad46caa170c13cc026c6e4de994af1a6ae57bf", + "src_qname": "test_runtime_graceful_stop_waits_until_worker_finishes", + "dst_symbol_id": "aeadc039653807b0da1ca6e3cc1078ee61cfc510b28e7f9c2ec04c59da43cc8d", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "_build_runtime instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "_build_runtime:instantiates", + "span_start": 155, + "span_end": 155, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "7eb254d564944bab6272757ee5ef688862bd321e6941e2495dc942e03b1c9a25", + "edge_type": "instantiates", + "src_symbol_id": "db94031d5245bf82be836a109b4584b43b8e83d37a0f318e03f6c8191896d469", + "src_qname": "_build_runtime", + "dst_symbol_id": "a1572ea8183dc0cd6ddbc74342bbde8c28cecfde37ad40b62feff09f8d103d11", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_worker_wakes_up_with_configured_interval instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_worker_wakes_up_with_configured_interval:instantiates", + "span_start": 167, + "span_end": 167, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "189aafc4de0b79c688668f25f0c87166a127df26bd2215452014713b65ef281a", + "edge_type": "instantiates", + "src_symbol_id": "65f877f78191d65e6a752e41cedc70ebc784c266804a55c1c56440336e1f0d6e", + "src_qname": "test_worker_wakes_up_with_configured_interval", + "dst_symbol_id": "a1572ea8183dc0cd6ddbc74342bbde8c28cecfde37ad40b62feff09f8d103d11", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_actions_stop_busy_worker_after_timeout\n -> BlockingRoutine\n -> BlockingRoutine.__init__\n -> BlockingRoutine._started\n -> BlockingRoutine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_actions_stop_busy_worker_after_timeout:dataflow_slice", + "span_start": 42, + "span_end": 238, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "8e7db3d2a9226f1c1d9942ac6373cfcafa0d2276758ddb8a3d3c455a3d58024d", + "edge_type": "dataflow_slice", + "src_symbol_id": "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "src_qname": "test_actions_stop_busy_worker_after_timeout", + "dst_symbol_id": "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04", + "dst_ref": "BlockingRoutine.run", + "resolution": "resolved", + "slice_id": "8e7db3d2a9226f1c1d9942ac6373cfcafa0d2276758ddb8a3d3c455a3d58024d", + "root_symbol_id": "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "path_symbols": [ + "test_actions_stop_busy_worker_after_timeout", + "BlockingRoutine", + "BlockingRoutine.__init__", + "BlockingRoutine._started", + "BlockingRoutine.run" + ], + "path_symbol_ids": [ + "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "a3349c5bc65e4003a4bbd6a8dbb7a54c337e12d1aed930caa701b12e520f1e67", + "486deeed3043c6db985aef258e96ddc67aa53608e67a83962fbd2471f649ddf1", + "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_actions_stop_busy_worker_before_timeout\n -> BlockingRoutine\n -> BlockingRoutine.__init__\n -> BlockingRoutine._release\n -> BlockingRoutine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_actions_stop_busy_worker_before_timeout:dataflow_slice", + "span_start": 43, + "span_end": 212, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "8bd726155ba387d3579763ee84dfd2f9a90bc917da88f3b2e89416ab5c1254d6", + "edge_type": "dataflow_slice", + "src_symbol_id": "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "src_qname": "test_actions_stop_busy_worker_before_timeout", + "dst_symbol_id": "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04", + "dst_ref": "BlockingRoutine.run", + "resolution": "resolved", + "slice_id": "8bd726155ba387d3579763ee84dfd2f9a90bc917da88f3b2e89416ab5c1254d6", + "root_symbol_id": "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "path_symbols": [ + "test_actions_stop_busy_worker_before_timeout", + "BlockingRoutine", + "BlockingRoutine.__init__", + "BlockingRoutine._release", + "BlockingRoutine.run" + ], + "path_symbol_ids": [ + "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "a3349c5bc65e4003a4bbd6a8dbb7a54c337e12d1aed930caa701b12e520f1e67", + "486deeed3043c6db985aef258e96ddc67aa53608e67a83962fbd2471f649ddf1", + "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "def test_runtime_graceful_stop_waits_until_worker_finishes() -> None:\n started = Event()\n release = Event()\n runtime = RuntimeManager()\n runtime.register_module(BlockingModule(started, release))\n runtime.start()\n assert started.wait(timeout=1.0) is True\n assert runtime.status()[\"runtime\"][\"state\"] == \"busy\"\n\n stop_thread = Thread(target=runtime.stop, kwargs={\"timeout\": 1.0}, daemon=True)\n stop_thread.start()\n sleep(0.1)\n assert stop_thread.is_alive() is True\n\n release.set()\n stop_thread.join(timeout=1.0)\n assert stop_thread.is_alive() is False\n assert runtime.status()[\"runtime\"][\"state\"] == \"stopped\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_runtime.py:test_runtime_graceful_stop_waits_until_worker_finishes", + "span_start": 226, + "span_end": 243, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 8, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "def test_runtime_runs_worker_routine_and_exposes_status(tmp_path) -> None:\n config_path = tmp_path / \"config.yml\"\n config_path.write_text(\n \"\"\"\nplatform:\n workers: 1\nlog:\n version: 1\n disable_existing_loggers: false\n handlers:\n console:\n class: logging.StreamHandler\n root:\n level: INFO\n handlers: [console]\n\"\"\".strip(),\n encoding=\"utf-8\",\n )\n runtime = RuntimeManager()\n runtime.add_config_file(config_path)\n module = ExampleModule()\n runtime.register_module(module)\n\n runtime.start()\n sleep(0.2)\n status = runtime.status()\n runtime.stop()\n\n assert module.routine.processed == [{\"id\": 1}]\n assert status[\"modules\"] == [\"example\"]\n assert status[\"runtime\"][\"state\"] == \"idle\"\n assert status[\"health\"][\"status\"] == \"ok\"\n assert status[\"config\"] == {\"platform\": {\"workers\": 1}, \"log\": status[\"config\"][\"log\"]}", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_runtime.py:test_runtime_runs_worker_routine_and_exposes_status", + "span_start": 191, + "span_end": 223, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 7, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _build_runtime(worker: Worker, *, control_timeout: int = 1) -> tuple[RuntimeManager, str]:\n runtime = RuntimeManager()\n channel = HttpControlChannel(host=\"127.0.0.1\", port=0, timeout=control_timeout)\n runtime.control_plane.register_channel(channel)\n runtime.register_module(WorkerModule(worker))\n runtime.start()\n return runtime, f\"http://127.0.0.1:{channel.port}\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_build_runtime", + "span_start": 154, + "span_end": 160, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 6, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def test_worker_wakes_up_with_configured_interval() -> None:\n interval = 0.15\n routine = IntervalRoutine()\n worker = ScenarioWorker(\"interval-worker\", routine, interval=interval)\n runtime = RuntimeManager()\n runtime.register_module(WorkerModule(worker))\n\n runtime.start()\n try:\n assert routine.wait_runs(count=3, timeout=2.0) is True\n finally:\n runtime.stop()\n\n deltas = routine.deltas()\n assert len(deltas) >= 2\n assert all(delta >= interval * 0.7 for delta in deltas[:2])", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:test_worker_wakes_up_with_configured_interval", + "span_start": 163, + "span_end": 178, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 7, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class BlockingRoutine:\n def __init__(self, started: Event, release: Event) -> None:\n self._started = started\n self._release = release\n\n def run(self) -> None:\n self._started.set()\n self._release.wait(timeout=5.0)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:BlockingRoutine", + "span_start": 40, + "span_end": 47, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class ScenarioWorker(Worker):\n def __init__(self, name: str, routine: object, *, interval: float = 0.05) -> None:\n self._name = name\n self._routine = routine\n self._interval = interval\n self._thread: Thread | None = None\n self._stop_requested = Event()\n self._in_flight = 0\n self._runs = 0\n self._lock = Lock()\n\n @property\n def name(self) -> str:\n return self._name\n\n @property\n def critical(self) -> bool:\n return True\n\n def start(self) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._stop_requested.clear()\n self._thread = Thread(target=self._loop, name=f\"{self._name}-thread\", daemon=True)\n self._thread.start()\n\n def stop(self, force: bool = False) -> None:\n self._stop_requested.set()\n\n def health(self) -> WorkerHealth:\n return WorkerHealth(name=self.name, status=\"ok\", critical=True, meta={\"runs\": self._runs})\n\n def status(self) -> WorkerStatus:\n thread_alive = self._thread is not None and self._thread.is_alive()\n with self._lock:\n in_flight = self._in_flight\n runs = self._runs\n if not thread_alive:\n state = \"stopped\"\n elif self._stop_requested.is_set():\n state = \"stopping\"\n elif in_flight > 0:\n state = \"busy\"\n else:\n state = \"idle\"\n return WorkerStatus(name=self.name, state=state, in_flight=in_flight, meta={\"runs\": runs})\n\n def _loop(self) -> None:\n while not self._stop_requested.is_set():\n with self._lock:\n self._in_flight += 1\n try:\n self._routine.run()\n with self._lock:\n self._runs += 1\n finally:\n with self._lock:\n self._in_flight -= 1\n if self._stop_requested.is_set():\n return\n sleep(self._interval)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:ScenarioWorker", + "span_start": 50, + "span_end": 110, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 2, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class WorkerModule(ApplicationModule):\n def __init__(self, worker: Worker) -> None:\n self._worker = worker\n\n @property\n def name(self) -> str:\n return \"business-tests\"\n\n def register(self, registry: ModuleRegistry) -> None:\n registry.add_worker(self._worker)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:WorkerModule", + "span_start": 113, + "span_end": 122, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 3, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _http_call_json(\n base_url: str,\n path: str,\n *,\n method: str = \"GET\",\n headers: dict[str, str] | None = None,\n) -> tuple[int, dict[str, object]]:\n request = Request(f\"{base_url}{path}\", method=method, headers=headers or {})\n try:\n with urlopen(request, timeout=15.0) as response:\n status = response.status\n body = response.read()\n except HTTPError as error:\n status = error.code\n body = error.read()\n payload = json.loads(body.decode(\"utf-8\"))\n return status, payload", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_http_call_json", + "span_start": 125, + "span_end": 141, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 4, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class IntervalRoutine:\n calls: list[float] = field(default_factory=list)\n _lock: Lock = field(default_factory=Lock)\n\n def run(self) -> None:\n with self._lock:\n self.calls.append(monotonic())\n\n def wait_runs(self, count: int, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n with self._lock:\n if len(self.calls) >= count:\n return True\n sleep(0.01)\n return False\n\n def deltas(self) -> list[float]:\n with self._lock:\n return [self.calls[index + 1] - self.calls[index] for index in range(len(self.calls) - 1)]", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:IntervalRoutine", + "span_start": 18, + "span_end": 37, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _poll_until_stopped(base_url: str, timeout: float = 2.0) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n _, payload = _http_call_json(base_url, \"/actions/status\")\n if payload.get(\"detail\") == \"stopped\":\n return True\n sleep(0.05)\n return False", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_poll_until_stopped", + "span_start": 144, + "span_end": 151, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 5, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "1. Прямые тесты:\n - tests/test_runtime.py | test_runtime_runs_worker_routine_and_exposes_status\n - tests/test_runtime.py | test_runtime_graceful_stop_waits_until_worker_finishes\nПроверка:\n - Создания и инициализации RuntimeManager.\n - Взаимодействия RuntimeManager с worker'ами и обработкой статуса.\n - Ожидания завершения работы worker'а при корректном завершении процесса остановки.\n - Проверки поведения RuntimeManager в разных состояниях (busy, stopped).\n\n2. Косвенные или ближайшие тесты:\n - tests/test_business_control_actions.py | _build_runtime\n - tests/test_business_control_actions.py | test_worker_wakes_up_with_configured_interval\nЭти тесты косвенно затрагивают RuntimeManager через инстанцирование его в других контекстах и использовании его методов, однако непосредственно поведение RuntimeManager не проверяется напрямую.\n\n3. Пробелы покрытия:\n - Не найдены явные тесты, которые проверяют обработку ошибок и исключений в RuntimeManager.\n - Нет тестов, которые покрывают интеграцию RuntimeManager с внешними компонентами или библиотеками.\n\nПрямых тестов, специально направленных на проверку различных аспектов жизненного цикла RuntimeManager, достаточно много, однако следует добавить тесты, направленные на проверку ошибок и интеграций.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C2_DEPENDENCY_GRAPH" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "test_file_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "test_symbol_patterns": [ + "test_runtime_manager", + "TestRuntimeManager", + "RuntimeManager" + ], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C0_SOURCE_CHUNKS": 10 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src", + "tests" + ], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src", + "tests" + ], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Где тесты для RuntimeManager? test_runtime_manager TestRuntimeManager RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Где тесты для RuntimeManager? test_runtime_manager TestRuntimeManager RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 10, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 0, + "candidates_after_filter": 0 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src", + "tests" + ], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src", + "tests" + ], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 10, + "candidates_after_filter": 10 + } + ], + "fallback": { + "used": true, + "reason": "scope_relaxed_no_hits" + }, + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "RuntimeManager" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "miss", + "hit_count": 0, + "fail_reason": "scope_relaxed_no_hits" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 10, + "fail_reason": null + } + ] + }, + "constraint_violations": [ + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C1_SYMBOL_CATALOG", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + } + ], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 146, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 71, + "C2_DEPENDENCY_GRAPH": 56, + "C0_SOURCE_CHUNKS": 18 + }, + "merge_rank": 0, + "prompt_build": 0, + "llm_call": 2103 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 904, + "evidence_rows": 16, + "evidence_chars": 7086 + }, + "evidence_summary": [ + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 2 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 10, + "unique_paths": 2 + } + ], + "prompt_template_id": "intent_code_qa_find_tests_ru_v2", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "RuntimeManager" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 16, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-v2-find-tests-runtime-manager", + "mode": "full_chain", + "run_started_at": "2026-03-12T12:55:37", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Где тесты для RuntimeManager?", + "normalized_query": "Где тесты для RuntimeManager?" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Где тесты для RuntimeManager?" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Где тесты для RuntimeManager?" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "test_file_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "test_symbol_patterns": [ + "test_runtime_manager", + "TestRuntimeManager", + "RuntimeManager" + ], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Где тесты для RuntimeManager?" + }, + "output": { + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "RuntimeManager" + ], + "confidence": 0.0 + }, + "rag_count": 16, + "rag_rows": [ + { + "path": "tests/test_runtime.py", + "content": "test_runtime_runs_worker_routine_and_exposes_status instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_runtime_runs_worker_routine_and_exposes_status:instantiates", + "span_start": 209, + "span_end": 209, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "c397a308e7824ba9fe400a754c7e15e66ea6f058d7f5d3e82bb002bb78b509d2", + "edge_type": "instantiates", + "src_symbol_id": "1c767eb5ee08e84f45b18c8ed7531ec0ed73c63fb1594823569672db7b21e992", + "src_qname": "test_runtime_runs_worker_routine_and_exposes_status", + "dst_symbol_id": "aeadc039653807b0da1ca6e3cc1078ee61cfc510b28e7f9c2ec04c59da43cc8d", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "test_runtime_graceful_stop_waits_until_worker_finishes instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_runtime_graceful_stop_waits_until_worker_finishes:instantiates", + "span_start": 229, + "span_end": 229, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "76b4701262ccaa0a7a41691407c4ebdb2ca74a2415d89f0a38ef0d4f608bda93", + "edge_type": "instantiates", + "src_symbol_id": "1076e788e4a03b10d7bc1313a8ad46caa170c13cc026c6e4de994af1a6ae57bf", + "src_qname": "test_runtime_graceful_stop_waits_until_worker_finishes", + "dst_symbol_id": "aeadc039653807b0da1ca6e3cc1078ee61cfc510b28e7f9c2ec04c59da43cc8d", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "_build_runtime instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "_build_runtime:instantiates", + "span_start": 155, + "span_end": 155, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "7eb254d564944bab6272757ee5ef688862bd321e6941e2495dc942e03b1c9a25", + "edge_type": "instantiates", + "src_symbol_id": "db94031d5245bf82be836a109b4584b43b8e83d37a0f318e03f6c8191896d469", + "src_qname": "_build_runtime", + "dst_symbol_id": "a1572ea8183dc0cd6ddbc74342bbde8c28cecfde37ad40b62feff09f8d103d11", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_worker_wakes_up_with_configured_interval instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_worker_wakes_up_with_configured_interval:instantiates", + "span_start": 167, + "span_end": 167, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "189aafc4de0b79c688668f25f0c87166a127df26bd2215452014713b65ef281a", + "edge_type": "instantiates", + "src_symbol_id": "65f877f78191d65e6a752e41cedc70ebc784c266804a55c1c56440336e1f0d6e", + "src_qname": "test_worker_wakes_up_with_configured_interval", + "dst_symbol_id": "a1572ea8183dc0cd6ddbc74342bbde8c28cecfde37ad40b62feff09f8d103d11", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_actions_stop_busy_worker_after_timeout\n -> BlockingRoutine\n -> BlockingRoutine.__init__\n -> BlockingRoutine._started\n -> BlockingRoutine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_actions_stop_busy_worker_after_timeout:dataflow_slice", + "span_start": 42, + "span_end": 238, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "8e7db3d2a9226f1c1d9942ac6373cfcafa0d2276758ddb8a3d3c455a3d58024d", + "edge_type": "dataflow_slice", + "src_symbol_id": "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "src_qname": "test_actions_stop_busy_worker_after_timeout", + "dst_symbol_id": "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04", + "dst_ref": "BlockingRoutine.run", + "resolution": "resolved", + "slice_id": "8e7db3d2a9226f1c1d9942ac6373cfcafa0d2276758ddb8a3d3c455a3d58024d", + "root_symbol_id": "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "path_symbols": [ + "test_actions_stop_busy_worker_after_timeout", + "BlockingRoutine", + "BlockingRoutine.__init__", + "BlockingRoutine._started", + "BlockingRoutine.run" + ], + "path_symbol_ids": [ + "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "a3349c5bc65e4003a4bbd6a8dbb7a54c337e12d1aed930caa701b12e520f1e67", + "486deeed3043c6db985aef258e96ddc67aa53608e67a83962fbd2471f649ddf1", + "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_actions_stop_busy_worker_before_timeout\n -> BlockingRoutine\n -> BlockingRoutine.__init__\n -> BlockingRoutine._release\n -> BlockingRoutine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_actions_stop_busy_worker_before_timeout:dataflow_slice", + "span_start": 43, + "span_end": 212, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "8bd726155ba387d3579763ee84dfd2f9a90bc917da88f3b2e89416ab5c1254d6", + "edge_type": "dataflow_slice", + "src_symbol_id": "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "src_qname": "test_actions_stop_busy_worker_before_timeout", + "dst_symbol_id": "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04", + "dst_ref": "BlockingRoutine.run", + "resolution": "resolved", + "slice_id": "8bd726155ba387d3579763ee84dfd2f9a90bc917da88f3b2e89416ab5c1254d6", + "root_symbol_id": "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "path_symbols": [ + "test_actions_stop_busy_worker_before_timeout", + "BlockingRoutine", + "BlockingRoutine.__init__", + "BlockingRoutine._release", + "BlockingRoutine.run" + ], + "path_symbol_ids": [ + "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "a3349c5bc65e4003a4bbd6a8dbb7a54c337e12d1aed930caa701b12e520f1e67", + "486deeed3043c6db985aef258e96ddc67aa53608e67a83962fbd2471f649ddf1", + "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "def test_runtime_graceful_stop_waits_until_worker_finishes() -> None:\n started = Event()\n release = Event()\n runtime = RuntimeManager()\n runtime.register_module(BlockingModule(started, release))\n runtime.start()\n assert started.wait(timeout=1.0) is True\n assert runtime.status()[\"runtime\"][\"state\"] == \"busy\"\n\n stop_thread = Thread(target=runtime.stop, kwargs={\"timeout\": 1.0}, daemon=True)\n stop_thread.start()\n sleep(0.1)\n assert stop_thread.is_alive() is True\n\n release.set()\n stop_thread.join(timeout=1.0)\n assert stop_thread.is_alive() is False\n assert runtime.status()[\"runtime\"][\"state\"] == \"stopped\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_runtime.py:test_runtime_graceful_stop_waits_until_worker_finishes", + "span_start": 226, + "span_end": 243, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 8, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "def test_runtime_runs_worker_routine_and_exposes_status(tmp_path) -> None:\n config_path = tmp_path / \"config.yml\"\n config_path.write_text(\n \"\"\"\nplatform:\n workers: 1\nlog:\n version: 1\n disable_existing_loggers: false\n handlers:\n console:\n class: logging.StreamHandler\n root:\n level: INFO\n handlers: [console]\n\"\"\".strip(),\n encoding=\"utf-8\",\n )\n runtime = RuntimeManager()\n runtime.add_config_file(config_path)\n module = ExampleModule()\n runtime.register_module(module)\n\n runtime.start()\n sleep(0.2)\n status = runtime.status()\n runtime.stop()\n\n assert module.routine.processed == [{\"id\": 1}]\n assert status[\"modules\"] == [\"example\"]\n assert status[\"runtime\"][\"state\"] == \"idle\"\n assert status[\"health\"][\"status\"] == \"ok\"\n assert status[\"config\"] == {\"platform\": {\"workers\": 1}, \"log\": status[\"config\"][\"log\"]}", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_runtime.py:test_runtime_runs_worker_routine_and_exposes_status", + "span_start": 191, + "span_end": 223, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 7, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _build_runtime(worker: Worker, *, control_timeout: int = 1) -> tuple[RuntimeManager, str]:\n runtime = RuntimeManager()\n channel = HttpControlChannel(host=\"127.0.0.1\", port=0, timeout=control_timeout)\n runtime.control_plane.register_channel(channel)\n runtime.register_module(WorkerModule(worker))\n runtime.start()\n return runtime, f\"http://127.0.0.1:{channel.port}\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_build_runtime", + "span_start": 154, + "span_end": 160, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 6, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def test_worker_wakes_up_with_configured_interval() -> None:\n interval = 0.15\n routine = IntervalRoutine()\n worker = ScenarioWorker(\"interval-worker\", routine, interval=interval)\n runtime = RuntimeManager()\n runtime.register_module(WorkerModule(worker))\n\n runtime.start()\n try:\n assert routine.wait_runs(count=3, timeout=2.0) is True\n finally:\n runtime.stop()\n\n deltas = routine.deltas()\n assert len(deltas) >= 2\n assert all(delta >= interval * 0.7 for delta in deltas[:2])", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:test_worker_wakes_up_with_configured_interval", + "span_start": 163, + "span_end": 178, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 7, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class BlockingRoutine:\n def __init__(self, started: Event, release: Event) -> None:\n self._started = started\n self._release = release\n\n def run(self) -> None:\n self._started.set()\n self._release.wait(timeout=5.0)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:BlockingRoutine", + "span_start": 40, + "span_end": 47, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class ScenarioWorker(Worker):\n def __init__(self, name: str, routine: object, *, interval: float = 0.05) -> None:\n self._name = name\n self._routine = routine\n self._interval = interval\n self._thread: Thread | None = None\n self._stop_requested = Event()\n self._in_flight = 0\n self._runs = 0\n self._lock = Lock()\n\n @property\n def name(self) -> str:\n return self._name\n\n @property\n def critical(self) -> bool:\n return True\n\n def start(self) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._stop_requested.clear()\n self._thread = Thread(target=self._loop, name=f\"{self._name}-thread\", daemon=True)\n self._thread.start()\n\n def stop(self, force: bool = False) -> None:\n self._stop_requested.set()\n\n def health(self) -> WorkerHealth:\n return WorkerHealth(name=self.name, status=\"ok\", critical=True, meta={\"runs\": self._runs})\n\n def status(self) -> WorkerStatus:\n thread_alive = self._thread is not None and self._thread.is_alive()\n with self._lock:\n in_flight = self._in_flight\n runs = self._runs\n if not thread_alive:\n state = \"stopped\"\n elif self._stop_requested.is_set():\n state = \"stopping\"\n elif in_flight > 0:\n state = \"busy\"\n else:\n state = \"idle\"\n return WorkerStatus(name=self.name, state=state, in_flight=in_flight, meta={\"runs\": runs})\n\n def _loop(self) -> None:\n while not self._stop_requested.is_set():\n with self._lock:\n self._in_flight += 1\n try:\n self._routine.run()\n with self._lock:\n self._runs += 1\n finally:\n with self._lock:\n self._in_flight -= 1\n if self._stop_requested.is_set():\n return\n sleep(self._interval)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:ScenarioWorker", + "span_start": 50, + "span_end": 110, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 2, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class WorkerModule(ApplicationModule):\n def __init__(self, worker: Worker) -> None:\n self._worker = worker\n\n @property\n def name(self) -> str:\n return \"business-tests\"\n\n def register(self, registry: ModuleRegistry) -> None:\n registry.add_worker(self._worker)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:WorkerModule", + "span_start": 113, + "span_end": 122, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 3, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _http_call_json(\n base_url: str,\n path: str,\n *,\n method: str = \"GET\",\n headers: dict[str, str] | None = None,\n) -> tuple[int, dict[str, object]]:\n request = Request(f\"{base_url}{path}\", method=method, headers=headers or {})\n try:\n with urlopen(request, timeout=15.0) as response:\n status = response.status\n body = response.read()\n except HTTPError as error:\n status = error.code\n body = error.read()\n payload = json.loads(body.decode(\"utf-8\"))\n return status, payload", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_http_call_json", + "span_start": 125, + "span_end": 141, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 4, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class IntervalRoutine:\n calls: list[float] = field(default_factory=list)\n _lock: Lock = field(default_factory=Lock)\n\n def run(self) -> None:\n with self._lock:\n self.calls.append(monotonic())\n\n def wait_runs(self, count: int, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n with self._lock:\n if len(self.calls) >= count:\n return True\n sleep(0.01)\n return False\n\n def deltas(self) -> list[float]:\n with self._lock:\n return [self.calls[index + 1] - self.calls[index] for index in range(len(self.calls) - 1)]", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:IntervalRoutine", + "span_start": 18, + "span_end": 37, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _poll_until_stopped(base_url: str, timeout: float = 2.0) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n _, payload = _http_call_json(base_url, \"/actions/status\")\n if payload.get(\"detail\") == \"stopped\":\n return True\n sleep(0.05)\n return False", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_poll_until_stopped", + "span_start": 144, + "span_end": 151, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 5, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C0_SOURCE_CHUNKS": 10 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src", + "tests" + ], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src", + "tests" + ], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Где тесты для RuntimeManager? test_runtime_manager TestRuntimeManager RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Где тесты для RuntimeManager? test_runtime_manager TestRuntimeManager RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 10, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 0, + "candidates_after_filter": 0 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src", + "tests" + ], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src", + "tests" + ], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 10, + "candidates_after_filter": 10 + } + ], + "fallback": { + "used": true, + "reason": "scope_relaxed_no_hits" + }, + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "RuntimeManager" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "miss", + "hit_count": 0, + "fail_reason": "scope_relaxed_no_hits" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 10, + "fail_reason": null + } + ] + }, + "constraint_violations": [ + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C1_SYMBOL_CATALOG", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + } + ], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 146, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 71, + "C2_DEPENDENCY_GRAPH": 56, + "C0_SOURCE_CHUNKS": 18 + }, + "merge_rank": 0 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Где тесты для RuntimeManager?", + "rag_count": 16 + }, + "output": { + "llm_answer": "1. Прямые тесты:\n - tests/test_runtime.py | test_runtime_runs_worker_routine_and_exposes_status\n - tests/test_runtime.py | test_runtime_graceful_stop_waits_until_worker_finishes\nПроверка:\n - Создания и инициализации RuntimeManager.\n - Взаимодействия RuntimeManager с worker'ами и обработкой статуса.\n - Ожидания завершения работы worker'а при корректном завершении процесса остановки.\n - Проверки поведения RuntimeManager в разных состояниях (busy, stopped).\n\n2. Косвенные или ближайшие тесты:\n - tests/test_business_control_actions.py | _build_runtime\n - tests/test_business_control_actions.py | test_worker_wakes_up_with_configured_interval\nЭти тесты косвенно затрагивают RuntimeManager через инстанцирование его в других контекстах и использовании его методов, однако непосредственно поведение RuntimeManager не проверяется напрямую.\n\n3. Пробелы покрытия:\n - Не найдены явные тесты, которые проверяют обработку ошибок и исключений в RuntimeManager.\n - Нет тестов, которые покрывают интеграцию RuntimeManager с внешними компонентами или библиотеками.\n\nПрямых тестов, специально направленных на проверку различных аспектов жизненного цикла RuntimeManager, достаточно много, однако следует добавить тесты, направленные на проверку ошибок и интеграций." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 904, + "evidence_rows": 16, + "evidence_chars": 7086 + }, + "evidence_summary": [ + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 2 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 10, + "unique_paths": 2 + } + ], + "prompt_template_id": "intent_code_qa_find_tests_ru_v2", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 2103 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-find-tests-runtime-manager.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-find-tests-runtime-manager.md new file mode 100644 index 0000000..f82b0c9 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-find-tests-runtime-manager.md @@ -0,0 +1,32 @@ +# plba-v2-find-tests-runtime-manager + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Где тесты для RuntimeManager? + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 16, + "llm_answer": "1. Прямые тесты:\n - tests/test_runtime.py | test_runtime_runs_worker_routine_and_exposes_status\n - tests/test_runtime.py | test_runtime_graceful_stop_waits_until_worker_finishes\nПроверка:\n - Создания и инициализации RuntimeManager.\n - Взаимодействия RuntimeManager с worker'ами и обработкой статуса.\n - Ожидания завершения работы worker'а при корректном завершении процесса остановки.\n - Проверки поведения RuntimeManager в разных состояниях (busy, stopped).\n\n2. Косвенные или ближайшие тесты:\n - tests/test_business_control_actions.py | _build_runtime\n - tests/test_business_control_actions.py | test_worker_wakes_up_with_configured_interval\nЭти тесты косвенно затрагивают RuntimeManager через инстанцирование его в других контекстах и использовании его методов, однако непосредственно поведение RuntimeManager не проверяется напрямую.\n\n3. Пробелы покрытия:\n - Не найдены явные тесты, которые проверяют обработку ошибок и исключений в RuntimeManager.\n - Нет тестов, которые покрывают интеграцию RuntimeManager с внешними компонентами или библиотеками.\n\nПрямых тестов, специально направленных на проверку различных аспектов жизненного цикла RuntimeManager, достаточно много, однако следует добавить тесты, направленные на проверку ошибок и интеграций.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-find-tests-trace-service.json b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-find-tests-trace-service.json new file mode 100644 index 0000000..b47d505 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-find-tests-trace-service.json @@ -0,0 +1,2047 @@ +{ + "case_id": "plba-v2-find-tests-trace-service", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 16, + "llm_answer": "1. Прямые тесты:\n - tests/test_runtime.py | test_trace_service_writes_contexts_and_messages\n - Проверка записи контекстов и сообщений в TraceService.\n - tests/test_runtime.py | test_trace_service_supports_debug_warning_and_error_levels\n - Проверка поддержки различных уровней логирования (debug, warning, error).\n\n2. Косвенные или ближайшие тесты:\n - Нет явных связей с другими тестами через зависимости или имена, однако тесты касаются работы с Transport и записью контекста/сообщений, что близко к функционалу TraceService.\n\n3. Что именно проверяется:\n - Запись и корректность данных контекстов и сообщений в TraceService.\n - Поддержка различных уровней логирования и запись соответствующих сообщений.\n\n4. Пробелы покрытия:\n - Не найдены явные пробелы покрытия для TraceService напрямую. Однако могут быть аспекты поведения, которые не охвачены текущими тестами, например, обработка ошибок, особые случаи или взаимодействие с внешними компонентами, зависящими от окружения.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "TraceService" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-v2-find-tests-trace-service", + "text": "Где тесты для TraceService?", + "mode": "full_chain", + "run_started_at": "2026-03-12T12:55:37", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Где тесты для TraceService?", + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "TraceService" + ], + "confidence": 0.0 + }, + "rag_count": 16, + "rag_rows": [ + { + "path": "tests/test_runtime.py", + "content": "test_trace_service_writes_contexts_and_messages\n -> RecordingTransport\n -> RecordingTransport.__init__\n -> RecordingTransport.contexts\n -> test_trace_service_writes_contexts_and_messages", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_trace_service_writes_contexts_and_messages:dataflow_slice", + "span_start": 181, + "span_end": 256, + "lexical_rank": 4, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "1636a2f70dee79c804259dc114af6c1ab4db27099911e5f97ac97a2bcb59be8a", + "edge_type": "dataflow_slice", + "src_symbol_id": "1600da201da1d0150240b400e3232172354156decdd1a04e1ab1a1edcd3a7e99", + "src_qname": "test_trace_service_writes_contexts_and_messages", + "dst_symbol_id": "1600da201da1d0150240b400e3232172354156decdd1a04e1ab1a1edcd3a7e99", + "dst_ref": "test_trace_service_writes_contexts_and_messages", + "resolution": "resolved", + "slice_id": "1636a2f70dee79c804259dc114af6c1ab4db27099911e5f97ac97a2bcb59be8a", + "root_symbol_id": "1600da201da1d0150240b400e3232172354156decdd1a04e1ab1a1edcd3a7e99", + "path_symbols": [ + "test_trace_service_writes_contexts_and_messages", + "RecordingTransport", + "RecordingTransport.__init__", + "RecordingTransport.contexts", + "test_trace_service_writes_contexts_and_messages" + ], + "path_symbol_ids": [ + "1600da201da1d0150240b400e3232172354156decdd1a04e1ab1a1edcd3a7e99", + "e3d635de1f1880673b69bf73ca6a45caffa5c7fdc23d589d5e40f76b86bdcd33", + "e34d80da723a7115a7a7586b52dc8b5cfda05c581509eee0c1a0296df9a340cb", + "1600da201da1d0150240b400e3232172354156decdd1a04e1ab1a1edcd3a7e99" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "test_trace_service_writes_contexts_and_messages\n -> RecordingTransport\n -> RecordingTransport.__init__\n -> RecordingTransport.contexts\n -> test_trace_service_allows_messages_without_status", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_trace_service_writes_contexts_and_messages:dataflow_slice", + "span_start": 181, + "span_end": 293, + "lexical_rank": 4, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "5db5abe56b73f884c5178647bd25ef150064a94a41fc8c052aebaa09bd7fdb3d", + "edge_type": "dataflow_slice", + "src_symbol_id": "1600da201da1d0150240b400e3232172354156decdd1a04e1ab1a1edcd3a7e99", + "src_qname": "test_trace_service_writes_contexts_and_messages", + "dst_symbol_id": "7127ca85ce6447928e195e901d36f1e1f1e8205a686e567c2d1b187431f989df", + "dst_ref": "test_trace_service_allows_messages_without_status", + "resolution": "resolved", + "slice_id": "5db5abe56b73f884c5178647bd25ef150064a94a41fc8c052aebaa09bd7fdb3d", + "root_symbol_id": "1600da201da1d0150240b400e3232172354156decdd1a04e1ab1a1edcd3a7e99", + "path_symbols": [ + "test_trace_service_writes_contexts_and_messages", + "RecordingTransport", + "RecordingTransport.__init__", + "RecordingTransport.contexts", + "test_trace_service_allows_messages_without_status" + ], + "path_symbol_ids": [ + "1600da201da1d0150240b400e3232172354156decdd1a04e1ab1a1edcd3a7e99", + "e3d635de1f1880673b69bf73ca6a45caffa5c7fdc23d589d5e40f76b86bdcd33", + "e34d80da723a7115a7a7586b52dc8b5cfda05c581509eee0c1a0296df9a340cb", + "7127ca85ce6447928e195e901d36f1e1f1e8205a686e567c2d1b187431f989df" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "test_trace_service_writes_contexts_and_messages\n -> RecordingTransport\n -> RecordingTransport.__init__\n -> RecordingTransport.contexts\n -> RecordingTransport.write_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_trace_service_writes_contexts_and_messages:dataflow_slice", + "span_start": 181, + "span_end": 249, + "lexical_rank": 4, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "60d7a8655fa4c53d9130ce342fc023d24ccfa16baea47ad60c91d2d49f547565", + "edge_type": "dataflow_slice", + "src_symbol_id": "1600da201da1d0150240b400e3232172354156decdd1a04e1ab1a1edcd3a7e99", + "src_qname": "test_trace_service_writes_contexts_and_messages", + "dst_symbol_id": "b8bbf341e230198caafe54727e13f2db27b7200d6fd95684fc5cf748db1a0e88", + "dst_ref": "RecordingTransport.write_context", + "resolution": "resolved", + "slice_id": "60d7a8655fa4c53d9130ce342fc023d24ccfa16baea47ad60c91d2d49f547565", + "root_symbol_id": "1600da201da1d0150240b400e3232172354156decdd1a04e1ab1a1edcd3a7e99", + "path_symbols": [ + "test_trace_service_writes_contexts_and_messages", + "RecordingTransport", + "RecordingTransport.__init__", + "RecordingTransport.contexts", + "RecordingTransport.write_context" + ], + "path_symbol_ids": [ + "1600da201da1d0150240b400e3232172354156decdd1a04e1ab1a1edcd3a7e99", + "e3d635de1f1880673b69bf73ca6a45caffa5c7fdc23d589d5e40f76b86bdcd33", + "e34d80da723a7115a7a7586b52dc8b5cfda05c581509eee0c1a0296df9a340cb", + "b8bbf341e230198caafe54727e13f2db27b7200d6fd95684fc5cf748db1a0e88" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "test_trace_service_supports_debug_warning_and_error_levels\n -> RecordingTransport\n -> RecordingTransport.__init__\n -> RecordingTransport.contexts\n -> RecordingTransport.write_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_trace_service_supports_debug_warning_and_error_levels:dataflow_slice", + "span_start": 181, + "span_end": 265, + "lexical_rank": 4, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "1372a2241c7265705e5cf9dceeb5e59836fac1d679227c4279ed39e0798ddddf", + "edge_type": "dataflow_slice", + "src_symbol_id": "ede183f1c546725064e28ddab1ffdbae0d1a1258fd62a50eb556c10d10995415", + "src_qname": "test_trace_service_supports_debug_warning_and_error_levels", + "dst_symbol_id": "b8bbf341e230198caafe54727e13f2db27b7200d6fd95684fc5cf748db1a0e88", + "dst_ref": "RecordingTransport.write_context", + "resolution": "resolved", + "slice_id": "1372a2241c7265705e5cf9dceeb5e59836fac1d679227c4279ed39e0798ddddf", + "root_symbol_id": "ede183f1c546725064e28ddab1ffdbae0d1a1258fd62a50eb556c10d10995415", + "path_symbols": [ + "test_trace_service_supports_debug_warning_and_error_levels", + "RecordingTransport", + "RecordingTransport.__init__", + "RecordingTransport.contexts", + "RecordingTransport.write_context" + ], + "path_symbol_ids": [ + "ede183f1c546725064e28ddab1ffdbae0d1a1258fd62a50eb556c10d10995415", + "e3d635de1f1880673b69bf73ca6a45caffa5c7fdc23d589d5e40f76b86bdcd33", + "e34d80da723a7115a7a7586b52dc8b5cfda05c581509eee0c1a0296df9a340cb", + "b8bbf341e230198caafe54727e13f2db27b7200d6fd95684fc5cf748db1a0e88" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "test_trace_service_supports_debug_warning_and_error_levels\n -> RecordingTransport\n -> RecordingTransport.__init__\n -> RecordingTransport.contexts\n -> test_trace_service_writes_contexts_and_messages", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_trace_service_supports_debug_warning_and_error_levels:dataflow_slice", + "span_start": 181, + "span_end": 265, + "lexical_rank": 4, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "8b6a5a738525df160600d71c15915704172de20db436ea2f84b6e039be396a2d", + "edge_type": "dataflow_slice", + "src_symbol_id": "ede183f1c546725064e28ddab1ffdbae0d1a1258fd62a50eb556c10d10995415", + "src_qname": "test_trace_service_supports_debug_warning_and_error_levels", + "dst_symbol_id": "1600da201da1d0150240b400e3232172354156decdd1a04e1ab1a1edcd3a7e99", + "dst_ref": "test_trace_service_writes_contexts_and_messages", + "resolution": "resolved", + "slice_id": "8b6a5a738525df160600d71c15915704172de20db436ea2f84b6e039be396a2d", + "root_symbol_id": "ede183f1c546725064e28ddab1ffdbae0d1a1258fd62a50eb556c10d10995415", + "path_symbols": [ + "test_trace_service_supports_debug_warning_and_error_levels", + "RecordingTransport", + "RecordingTransport.__init__", + "RecordingTransport.contexts", + "test_trace_service_writes_contexts_and_messages" + ], + "path_symbol_ids": [ + "ede183f1c546725064e28ddab1ffdbae0d1a1258fd62a50eb556c10d10995415", + "e3d635de1f1880673b69bf73ca6a45caffa5c7fdc23d589d5e40f76b86bdcd33", + "e34d80da723a7115a7a7586b52dc8b5cfda05c581509eee0c1a0296df9a340cb", + "1600da201da1d0150240b400e3232172354156decdd1a04e1ab1a1edcd3a7e99" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "test_trace_service_supports_debug_warning_and_error_levels\n -> RecordingTransport\n -> RecordingTransport.__init__\n -> RecordingTransport.contexts\n -> test_trace_service_allows_messages_without_status", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_trace_service_supports_debug_warning_and_error_levels:dataflow_slice", + "span_start": 181, + "span_end": 293, + "lexical_rank": 4, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "f7d099f6d5746aa61a3025fd7eef791369bd3a3e5df4bc716de87e7b149ccde6", + "edge_type": "dataflow_slice", + "src_symbol_id": "ede183f1c546725064e28ddab1ffdbae0d1a1258fd62a50eb556c10d10995415", + "src_qname": "test_trace_service_supports_debug_warning_and_error_levels", + "dst_symbol_id": "7127ca85ce6447928e195e901d36f1e1f1e8205a686e567c2d1b187431f989df", + "dst_ref": "test_trace_service_allows_messages_without_status", + "resolution": "resolved", + "slice_id": "f7d099f6d5746aa61a3025fd7eef791369bd3a3e5df4bc716de87e7b149ccde6", + "root_symbol_id": "ede183f1c546725064e28ddab1ffdbae0d1a1258fd62a50eb556c10d10995415", + "path_symbols": [ + "test_trace_service_supports_debug_warning_and_error_levels", + "RecordingTransport", + "RecordingTransport.__init__", + "RecordingTransport.contexts", + "test_trace_service_allows_messages_without_status" + ], + "path_symbol_ids": [ + "ede183f1c546725064e28ddab1ffdbae0d1a1258fd62a50eb556c10d10995415", + "e3d635de1f1880673b69bf73ca6a45caffa5c7fdc23d589d5e40f76b86bdcd33", + "e34d80da723a7115a7a7586b52dc8b5cfda05c581509eee0c1a0296df9a340cb", + "7127ca85ce6447928e195e901d36f1e1f1e8205a686e567c2d1b187431f989df" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "def test_trace_service_writes_contexts_and_messages() -> None:\n from app_runtime.tracing.service import TraceService\n\n transport = RecordingTransport()\n manager = TraceService(transport=transport)\n\n with manager.open_context(alias=\"worker\", kind=\"worker\", attrs={\"routine\": \"incoming\"}):\n manager.step(\"parse\")\n manager.info(\"started\", status=\"ok\", attrs={\"attempt\": 1})\n\n assert len(transport.contexts) == 1\n assert len(transport.messages) == 1\n assert transport.contexts[0].alias == \"worker\"\n assert transport.messages[0].step == \"parse\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_runtime.py:test_trace_service_writes_contexts_and_messages", + "span_start": 246, + "span_end": 259, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 9, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "def test_trace_service_supports_debug_warning_and_error_levels() -> None:\n from app_runtime.tracing.service import TraceService\n\n transport = RecordingTransport()\n manager = TraceService(transport=transport)\n\n with manager.open_context(alias=\"worker\", kind=\"worker\", attrs={\"routine\": \"incoming\"}):\n manager.step(\"validate\")\n manager.debug(\"validation details\", attrs={\"rule\": \"basic\"})\n manager.warning(\"validation warning\", status=\"degraded\", attrs={\"attempt\": 1})\n manager.error(\"integration failed\", status=\"failed\", attrs={\"integration\": \"crm\"})\n manager.exception(\"caught exception\", attrs={\"exception_type\": \"RuntimeError\"})\n\n levels = [message.level for message in transport.messages]\n assert levels == [\"DEBUG\", \"WARNING\", \"ERROR\", \"ERROR\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_runtime.py:test_trace_service_supports_debug_warning_and_error_levels", + "span_start": 262, + "span_end": 276, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 10, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "def test_trace_service_allows_messages_without_status() -> None:\n from app_runtime.tracing.service import TraceService\n\n transport = RecordingTransport()\n manager = TraceService(transport=transport)\n\n with manager.open_context(alias=\"worker\", kind=\"worker\"):\n manager.step(\"optional-status\")\n manager.debug(\"debug without status\")\n manager.info(\"info without status\")\n manager.warning(\"warning without status\")\n manager.error(\"error without status\")\n\n assert [message.status for message in transport.messages] == [\"\", \"\", \"\", \"\"]\n assert all(message.trace_id == transport.contexts[0].trace_id for message in transport.messages)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_runtime.py:test_trace_service_allows_messages_without_status", + "span_start": 279, + "span_end": 293, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 11, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class ScenarioWorker(Worker):\n def __init__(self, name: str, routine: object, *, interval: float = 0.05) -> None:\n self._name = name\n self._routine = routine\n self._interval = interval\n self._thread: Thread | None = None\n self._stop_requested = Event()\n self._in_flight = 0\n self._runs = 0\n self._lock = Lock()\n\n @property\n def name(self) -> str:\n return self._name\n\n @property\n def critical(self) -> bool:\n return True\n\n def start(self) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._stop_requested.clear()\n self._thread = Thread(target=self._loop, name=f\"{self._name}-thread\", daemon=True)\n self._thread.start()\n\n def stop(self, force: bool = False) -> None:\n self._stop_requested.set()\n\n def health(self) -> WorkerHealth:\n return WorkerHealth(name=self.name, status=\"ok\", critical=True, meta={\"runs\": self._runs})\n\n def status(self) -> WorkerStatus:\n thread_alive = self._thread is not None and self._thread.is_alive()\n with self._lock:\n in_flight = self._in_flight\n runs = self._runs\n if not thread_alive:\n state = \"stopped\"\n elif self._stop_requested.is_set():\n state = \"stopping\"\n elif in_flight > 0:\n state = \"busy\"\n else:\n state = \"idle\"\n return WorkerStatus(name=self.name, state=state, in_flight=in_flight, meta={\"runs\": runs})\n\n def _loop(self) -> None:\n while not self._stop_requested.is_set():\n with self._lock:\n self._in_flight += 1\n try:\n self._routine.run()\n with self._lock:\n self._runs += 1\n finally:\n with self._lock:\n self._in_flight -= 1\n if self._stop_requested.is_set():\n return\n sleep(self._interval)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:ScenarioWorker", + "span_start": 50, + "span_end": 110, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 2, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class IntervalRoutine:\n calls: list[float] = field(default_factory=list)\n _lock: Lock = field(default_factory=Lock)\n\n def run(self) -> None:\n with self._lock:\n self.calls.append(monotonic())\n\n def wait_runs(self, count: int, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n with self._lock:\n if len(self.calls) >= count:\n return True\n sleep(0.01)\n return False\n\n def deltas(self) -> list[float]:\n with self._lock:\n return [self.calls[index + 1] - self.calls[index] for index in range(len(self.calls) - 1)]", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:IntervalRoutine", + "span_start": 18, + "span_end": 37, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class BlockingRoutine:\n def __init__(self, started: Event, release: Event) -> None:\n self._started = started\n self._release = release\n\n def run(self) -> None:\n self._started.set()\n self._release.wait(timeout=5.0)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:BlockingRoutine", + "span_start": 40, + "span_end": 47, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def test_worker_wakes_up_with_configured_interval() -> None:\n interval = 0.15\n routine = IntervalRoutine()\n worker = ScenarioWorker(\"interval-worker\", routine, interval=interval)\n runtime = RuntimeManager()\n runtime.register_module(WorkerModule(worker))\n\n runtime.start()\n try:\n assert routine.wait_runs(count=3, timeout=2.0) is True\n finally:\n runtime.stop()\n\n deltas = routine.deltas()\n assert len(deltas) >= 2\n assert all(delta >= interval * 0.7 for delta in deltas[:2])", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:test_worker_wakes_up_with_configured_interval", + "span_start": 163, + "span_end": 178, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 7, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _http_call_json(\n base_url: str,\n path: str,\n *,\n method: str = \"GET\",\n headers: dict[str, str] | None = None,\n) -> tuple[int, dict[str, object]]:\n request = Request(f\"{base_url}{path}\", method=method, headers=headers or {})\n try:\n with urlopen(request, timeout=15.0) as response:\n status = response.status\n body = response.read()\n except HTTPError as error:\n status = error.code\n body = error.read()\n payload = json.loads(body.decode(\"utf-8\"))\n return status, payload", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_http_call_json", + "span_start": 125, + "span_end": 141, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 4, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _build_runtime(worker: Worker, *, control_timeout: int = 1) -> tuple[RuntimeManager, str]:\n runtime = RuntimeManager()\n channel = HttpControlChannel(host=\"127.0.0.1\", port=0, timeout=control_timeout)\n runtime.control_plane.register_channel(channel)\n runtime.register_module(WorkerModule(worker))\n runtime.start()\n return runtime, f\"http://127.0.0.1:{channel.port}\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_build_runtime", + "span_start": 154, + "span_end": 160, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 6, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class WorkerModule(ApplicationModule):\n def __init__(self, worker: Worker) -> None:\n self._worker = worker\n\n @property\n def name(self) -> str:\n return \"business-tests\"\n\n def register(self, registry: ModuleRegistry) -> None:\n registry.add_worker(self._worker)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:WorkerModule", + "span_start": 113, + "span_end": 122, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 3, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "1. Прямые тесты:\n - tests/test_runtime.py | test_trace_service_writes_contexts_and_messages\n - Проверка записи контекстов и сообщений в TraceService.\n - tests/test_runtime.py | test_trace_service_supports_debug_warning_and_error_levels\n - Проверка поддержки различных уровней логирования (debug, warning, error).\n\n2. Косвенные или ближайшие тесты:\n - Нет явных связей с другими тестами через зависимости или имена, однако тесты касаются работы с Transport и записью контекста/сообщений, что близко к функционалу TraceService.\n\n3. Что именно проверяется:\n - Запись и корректность данных контекстов и сообщений в TraceService.\n - Поддержка различных уровней логирования и запись соответствующих сообщений.\n\n4. Пробелы покрытия:\n - Не найдены явные пробелы покрытия для TraceService напрямую. Однако могут быть аспекты поведения, которые не охвачены текущими тестами, например, обработка ошибок, особые случаи или взаимодействие с внешними компонентами, зависящими от окружения.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C2_DEPENDENCY_GRAPH" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "TraceService" + ], + "keyword_hints": [ + "TraceService" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "test_file_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "test_symbol_patterns": [ + "test_trace_service", + "TestTraceService", + "TraceService" + ], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C0_SOURCE_CHUNKS": 10 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src", + "tests" + ], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src", + "tests" + ], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "TraceService", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Где тесты для TraceService? test_trace_service TestTraceService TraceService", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Где тесты для TraceService? test_trace_service TestTraceService TraceService", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 10, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 0, + "candidates_after_filter": 0 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src", + "tests" + ], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src", + "tests" + ], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 10, + "candidates_after_filter": 10 + } + ], + "fallback": { + "used": true, + "reason": "scope_relaxed_no_hits" + }, + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "TraceService" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "miss", + "hit_count": 0, + "fail_reason": "scope_relaxed_no_hits" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 10, + "fail_reason": null + } + ] + }, + "constraint_violations": [ + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C1_SYMBOL_CATALOG", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + } + ], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 96, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 44, + "C2_DEPENDENCY_GRAPH": 39, + "C0_SOURCE_CHUNKS": 13 + }, + "merge_rank": 0, + "prompt_build": 0, + "llm_call": 1736 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 978, + "evidence_rows": 16, + "evidence_chars": 7847 + }, + "evidence_summary": [ + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 10, + "unique_paths": 2 + } + ], + "prompt_template_id": "intent_code_qa_find_tests_ru_v2", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "TraceService" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 16, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-v2-find-tests-trace-service", + "mode": "full_chain", + "run_started_at": "2026-03-12T12:55:37", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Где тесты для TraceService?", + "normalized_query": "Где тесты для TraceService?" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Где тесты для TraceService?" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Где тесты для TraceService?" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "TraceService" + ], + "keyword_hints": [ + "TraceService" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "test_file_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "test_symbol_patterns": [ + "test_trace_service", + "TestTraceService", + "TraceService" + ], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Где тесты для TraceService?" + }, + "output": { + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "TraceService" + ], + "confidence": 0.0 + }, + "rag_count": 16, + "rag_rows": [ + { + "path": "tests/test_runtime.py", + "content": "test_trace_service_writes_contexts_and_messages\n -> RecordingTransport\n -> RecordingTransport.__init__\n -> RecordingTransport.contexts\n -> test_trace_service_writes_contexts_and_messages", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_trace_service_writes_contexts_and_messages:dataflow_slice", + "span_start": 181, + "span_end": 256, + "lexical_rank": 4, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "1636a2f70dee79c804259dc114af6c1ab4db27099911e5f97ac97a2bcb59be8a", + "edge_type": "dataflow_slice", + "src_symbol_id": "1600da201da1d0150240b400e3232172354156decdd1a04e1ab1a1edcd3a7e99", + "src_qname": "test_trace_service_writes_contexts_and_messages", + "dst_symbol_id": "1600da201da1d0150240b400e3232172354156decdd1a04e1ab1a1edcd3a7e99", + "dst_ref": "test_trace_service_writes_contexts_and_messages", + "resolution": "resolved", + "slice_id": "1636a2f70dee79c804259dc114af6c1ab4db27099911e5f97ac97a2bcb59be8a", + "root_symbol_id": "1600da201da1d0150240b400e3232172354156decdd1a04e1ab1a1edcd3a7e99", + "path_symbols": [ + "test_trace_service_writes_contexts_and_messages", + "RecordingTransport", + "RecordingTransport.__init__", + "RecordingTransport.contexts", + "test_trace_service_writes_contexts_and_messages" + ], + "path_symbol_ids": [ + "1600da201da1d0150240b400e3232172354156decdd1a04e1ab1a1edcd3a7e99", + "e3d635de1f1880673b69bf73ca6a45caffa5c7fdc23d589d5e40f76b86bdcd33", + "e34d80da723a7115a7a7586b52dc8b5cfda05c581509eee0c1a0296df9a340cb", + "1600da201da1d0150240b400e3232172354156decdd1a04e1ab1a1edcd3a7e99" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "test_trace_service_writes_contexts_and_messages\n -> RecordingTransport\n -> RecordingTransport.__init__\n -> RecordingTransport.contexts\n -> test_trace_service_allows_messages_without_status", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_trace_service_writes_contexts_and_messages:dataflow_slice", + "span_start": 181, + "span_end": 293, + "lexical_rank": 4, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "5db5abe56b73f884c5178647bd25ef150064a94a41fc8c052aebaa09bd7fdb3d", + "edge_type": "dataflow_slice", + "src_symbol_id": "1600da201da1d0150240b400e3232172354156decdd1a04e1ab1a1edcd3a7e99", + "src_qname": "test_trace_service_writes_contexts_and_messages", + "dst_symbol_id": "7127ca85ce6447928e195e901d36f1e1f1e8205a686e567c2d1b187431f989df", + "dst_ref": "test_trace_service_allows_messages_without_status", + "resolution": "resolved", + "slice_id": "5db5abe56b73f884c5178647bd25ef150064a94a41fc8c052aebaa09bd7fdb3d", + "root_symbol_id": "1600da201da1d0150240b400e3232172354156decdd1a04e1ab1a1edcd3a7e99", + "path_symbols": [ + "test_trace_service_writes_contexts_and_messages", + "RecordingTransport", + "RecordingTransport.__init__", + "RecordingTransport.contexts", + "test_trace_service_allows_messages_without_status" + ], + "path_symbol_ids": [ + "1600da201da1d0150240b400e3232172354156decdd1a04e1ab1a1edcd3a7e99", + "e3d635de1f1880673b69bf73ca6a45caffa5c7fdc23d589d5e40f76b86bdcd33", + "e34d80da723a7115a7a7586b52dc8b5cfda05c581509eee0c1a0296df9a340cb", + "7127ca85ce6447928e195e901d36f1e1f1e8205a686e567c2d1b187431f989df" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "test_trace_service_writes_contexts_and_messages\n -> RecordingTransport\n -> RecordingTransport.__init__\n -> RecordingTransport.contexts\n -> RecordingTransport.write_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_trace_service_writes_contexts_and_messages:dataflow_slice", + "span_start": 181, + "span_end": 249, + "lexical_rank": 4, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "60d7a8655fa4c53d9130ce342fc023d24ccfa16baea47ad60c91d2d49f547565", + "edge_type": "dataflow_slice", + "src_symbol_id": "1600da201da1d0150240b400e3232172354156decdd1a04e1ab1a1edcd3a7e99", + "src_qname": "test_trace_service_writes_contexts_and_messages", + "dst_symbol_id": "b8bbf341e230198caafe54727e13f2db27b7200d6fd95684fc5cf748db1a0e88", + "dst_ref": "RecordingTransport.write_context", + "resolution": "resolved", + "slice_id": "60d7a8655fa4c53d9130ce342fc023d24ccfa16baea47ad60c91d2d49f547565", + "root_symbol_id": "1600da201da1d0150240b400e3232172354156decdd1a04e1ab1a1edcd3a7e99", + "path_symbols": [ + "test_trace_service_writes_contexts_and_messages", + "RecordingTransport", + "RecordingTransport.__init__", + "RecordingTransport.contexts", + "RecordingTransport.write_context" + ], + "path_symbol_ids": [ + "1600da201da1d0150240b400e3232172354156decdd1a04e1ab1a1edcd3a7e99", + "e3d635de1f1880673b69bf73ca6a45caffa5c7fdc23d589d5e40f76b86bdcd33", + "e34d80da723a7115a7a7586b52dc8b5cfda05c581509eee0c1a0296df9a340cb", + "b8bbf341e230198caafe54727e13f2db27b7200d6fd95684fc5cf748db1a0e88" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "test_trace_service_supports_debug_warning_and_error_levels\n -> RecordingTransport\n -> RecordingTransport.__init__\n -> RecordingTransport.contexts\n -> RecordingTransport.write_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_trace_service_supports_debug_warning_and_error_levels:dataflow_slice", + "span_start": 181, + "span_end": 265, + "lexical_rank": 4, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "1372a2241c7265705e5cf9dceeb5e59836fac1d679227c4279ed39e0798ddddf", + "edge_type": "dataflow_slice", + "src_symbol_id": "ede183f1c546725064e28ddab1ffdbae0d1a1258fd62a50eb556c10d10995415", + "src_qname": "test_trace_service_supports_debug_warning_and_error_levels", + "dst_symbol_id": "b8bbf341e230198caafe54727e13f2db27b7200d6fd95684fc5cf748db1a0e88", + "dst_ref": "RecordingTransport.write_context", + "resolution": "resolved", + "slice_id": "1372a2241c7265705e5cf9dceeb5e59836fac1d679227c4279ed39e0798ddddf", + "root_symbol_id": "ede183f1c546725064e28ddab1ffdbae0d1a1258fd62a50eb556c10d10995415", + "path_symbols": [ + "test_trace_service_supports_debug_warning_and_error_levels", + "RecordingTransport", + "RecordingTransport.__init__", + "RecordingTransport.contexts", + "RecordingTransport.write_context" + ], + "path_symbol_ids": [ + "ede183f1c546725064e28ddab1ffdbae0d1a1258fd62a50eb556c10d10995415", + "e3d635de1f1880673b69bf73ca6a45caffa5c7fdc23d589d5e40f76b86bdcd33", + "e34d80da723a7115a7a7586b52dc8b5cfda05c581509eee0c1a0296df9a340cb", + "b8bbf341e230198caafe54727e13f2db27b7200d6fd95684fc5cf748db1a0e88" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "test_trace_service_supports_debug_warning_and_error_levels\n -> RecordingTransport\n -> RecordingTransport.__init__\n -> RecordingTransport.contexts\n -> test_trace_service_writes_contexts_and_messages", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_trace_service_supports_debug_warning_and_error_levels:dataflow_slice", + "span_start": 181, + "span_end": 265, + "lexical_rank": 4, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "8b6a5a738525df160600d71c15915704172de20db436ea2f84b6e039be396a2d", + "edge_type": "dataflow_slice", + "src_symbol_id": "ede183f1c546725064e28ddab1ffdbae0d1a1258fd62a50eb556c10d10995415", + "src_qname": "test_trace_service_supports_debug_warning_and_error_levels", + "dst_symbol_id": "1600da201da1d0150240b400e3232172354156decdd1a04e1ab1a1edcd3a7e99", + "dst_ref": "test_trace_service_writes_contexts_and_messages", + "resolution": "resolved", + "slice_id": "8b6a5a738525df160600d71c15915704172de20db436ea2f84b6e039be396a2d", + "root_symbol_id": "ede183f1c546725064e28ddab1ffdbae0d1a1258fd62a50eb556c10d10995415", + "path_symbols": [ + "test_trace_service_supports_debug_warning_and_error_levels", + "RecordingTransport", + "RecordingTransport.__init__", + "RecordingTransport.contexts", + "test_trace_service_writes_contexts_and_messages" + ], + "path_symbol_ids": [ + "ede183f1c546725064e28ddab1ffdbae0d1a1258fd62a50eb556c10d10995415", + "e3d635de1f1880673b69bf73ca6a45caffa5c7fdc23d589d5e40f76b86bdcd33", + "e34d80da723a7115a7a7586b52dc8b5cfda05c581509eee0c1a0296df9a340cb", + "1600da201da1d0150240b400e3232172354156decdd1a04e1ab1a1edcd3a7e99" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "test_trace_service_supports_debug_warning_and_error_levels\n -> RecordingTransport\n -> RecordingTransport.__init__\n -> RecordingTransport.contexts\n -> test_trace_service_allows_messages_without_status", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_trace_service_supports_debug_warning_and_error_levels:dataflow_slice", + "span_start": 181, + "span_end": 293, + "lexical_rank": 4, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "f7d099f6d5746aa61a3025fd7eef791369bd3a3e5df4bc716de87e7b149ccde6", + "edge_type": "dataflow_slice", + "src_symbol_id": "ede183f1c546725064e28ddab1ffdbae0d1a1258fd62a50eb556c10d10995415", + "src_qname": "test_trace_service_supports_debug_warning_and_error_levels", + "dst_symbol_id": "7127ca85ce6447928e195e901d36f1e1f1e8205a686e567c2d1b187431f989df", + "dst_ref": "test_trace_service_allows_messages_without_status", + "resolution": "resolved", + "slice_id": "f7d099f6d5746aa61a3025fd7eef791369bd3a3e5df4bc716de87e7b149ccde6", + "root_symbol_id": "ede183f1c546725064e28ddab1ffdbae0d1a1258fd62a50eb556c10d10995415", + "path_symbols": [ + "test_trace_service_supports_debug_warning_and_error_levels", + "RecordingTransport", + "RecordingTransport.__init__", + "RecordingTransport.contexts", + "test_trace_service_allows_messages_without_status" + ], + "path_symbol_ids": [ + "ede183f1c546725064e28ddab1ffdbae0d1a1258fd62a50eb556c10d10995415", + "e3d635de1f1880673b69bf73ca6a45caffa5c7fdc23d589d5e40f76b86bdcd33", + "e34d80da723a7115a7a7586b52dc8b5cfda05c581509eee0c1a0296df9a340cb", + "7127ca85ce6447928e195e901d36f1e1f1e8205a686e567c2d1b187431f989df" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "def test_trace_service_writes_contexts_and_messages() -> None:\n from app_runtime.tracing.service import TraceService\n\n transport = RecordingTransport()\n manager = TraceService(transport=transport)\n\n with manager.open_context(alias=\"worker\", kind=\"worker\", attrs={\"routine\": \"incoming\"}):\n manager.step(\"parse\")\n manager.info(\"started\", status=\"ok\", attrs={\"attempt\": 1})\n\n assert len(transport.contexts) == 1\n assert len(transport.messages) == 1\n assert transport.contexts[0].alias == \"worker\"\n assert transport.messages[0].step == \"parse\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_runtime.py:test_trace_service_writes_contexts_and_messages", + "span_start": 246, + "span_end": 259, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 9, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "def test_trace_service_supports_debug_warning_and_error_levels() -> None:\n from app_runtime.tracing.service import TraceService\n\n transport = RecordingTransport()\n manager = TraceService(transport=transport)\n\n with manager.open_context(alias=\"worker\", kind=\"worker\", attrs={\"routine\": \"incoming\"}):\n manager.step(\"validate\")\n manager.debug(\"validation details\", attrs={\"rule\": \"basic\"})\n manager.warning(\"validation warning\", status=\"degraded\", attrs={\"attempt\": 1})\n manager.error(\"integration failed\", status=\"failed\", attrs={\"integration\": \"crm\"})\n manager.exception(\"caught exception\", attrs={\"exception_type\": \"RuntimeError\"})\n\n levels = [message.level for message in transport.messages]\n assert levels == [\"DEBUG\", \"WARNING\", \"ERROR\", \"ERROR\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_runtime.py:test_trace_service_supports_debug_warning_and_error_levels", + "span_start": 262, + "span_end": 276, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 10, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "def test_trace_service_allows_messages_without_status() -> None:\n from app_runtime.tracing.service import TraceService\n\n transport = RecordingTransport()\n manager = TraceService(transport=transport)\n\n with manager.open_context(alias=\"worker\", kind=\"worker\"):\n manager.step(\"optional-status\")\n manager.debug(\"debug without status\")\n manager.info(\"info without status\")\n manager.warning(\"warning without status\")\n manager.error(\"error without status\")\n\n assert [message.status for message in transport.messages] == [\"\", \"\", \"\", \"\"]\n assert all(message.trace_id == transport.contexts[0].trace_id for message in transport.messages)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_runtime.py:test_trace_service_allows_messages_without_status", + "span_start": 279, + "span_end": 293, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 11, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class ScenarioWorker(Worker):\n def __init__(self, name: str, routine: object, *, interval: float = 0.05) -> None:\n self._name = name\n self._routine = routine\n self._interval = interval\n self._thread: Thread | None = None\n self._stop_requested = Event()\n self._in_flight = 0\n self._runs = 0\n self._lock = Lock()\n\n @property\n def name(self) -> str:\n return self._name\n\n @property\n def critical(self) -> bool:\n return True\n\n def start(self) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._stop_requested.clear()\n self._thread = Thread(target=self._loop, name=f\"{self._name}-thread\", daemon=True)\n self._thread.start()\n\n def stop(self, force: bool = False) -> None:\n self._stop_requested.set()\n\n def health(self) -> WorkerHealth:\n return WorkerHealth(name=self.name, status=\"ok\", critical=True, meta={\"runs\": self._runs})\n\n def status(self) -> WorkerStatus:\n thread_alive = self._thread is not None and self._thread.is_alive()\n with self._lock:\n in_flight = self._in_flight\n runs = self._runs\n if not thread_alive:\n state = \"stopped\"\n elif self._stop_requested.is_set():\n state = \"stopping\"\n elif in_flight > 0:\n state = \"busy\"\n else:\n state = \"idle\"\n return WorkerStatus(name=self.name, state=state, in_flight=in_flight, meta={\"runs\": runs})\n\n def _loop(self) -> None:\n while not self._stop_requested.is_set():\n with self._lock:\n self._in_flight += 1\n try:\n self._routine.run()\n with self._lock:\n self._runs += 1\n finally:\n with self._lock:\n self._in_flight -= 1\n if self._stop_requested.is_set():\n return\n sleep(self._interval)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:ScenarioWorker", + "span_start": 50, + "span_end": 110, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 2, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class IntervalRoutine:\n calls: list[float] = field(default_factory=list)\n _lock: Lock = field(default_factory=Lock)\n\n def run(self) -> None:\n with self._lock:\n self.calls.append(monotonic())\n\n def wait_runs(self, count: int, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n with self._lock:\n if len(self.calls) >= count:\n return True\n sleep(0.01)\n return False\n\n def deltas(self) -> list[float]:\n with self._lock:\n return [self.calls[index + 1] - self.calls[index] for index in range(len(self.calls) - 1)]", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:IntervalRoutine", + "span_start": 18, + "span_end": 37, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class BlockingRoutine:\n def __init__(self, started: Event, release: Event) -> None:\n self._started = started\n self._release = release\n\n def run(self) -> None:\n self._started.set()\n self._release.wait(timeout=5.0)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:BlockingRoutine", + "span_start": 40, + "span_end": 47, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def test_worker_wakes_up_with_configured_interval() -> None:\n interval = 0.15\n routine = IntervalRoutine()\n worker = ScenarioWorker(\"interval-worker\", routine, interval=interval)\n runtime = RuntimeManager()\n runtime.register_module(WorkerModule(worker))\n\n runtime.start()\n try:\n assert routine.wait_runs(count=3, timeout=2.0) is True\n finally:\n runtime.stop()\n\n deltas = routine.deltas()\n assert len(deltas) >= 2\n assert all(delta >= interval * 0.7 for delta in deltas[:2])", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:test_worker_wakes_up_with_configured_interval", + "span_start": 163, + "span_end": 178, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 7, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _http_call_json(\n base_url: str,\n path: str,\n *,\n method: str = \"GET\",\n headers: dict[str, str] | None = None,\n) -> tuple[int, dict[str, object]]:\n request = Request(f\"{base_url}{path}\", method=method, headers=headers or {})\n try:\n with urlopen(request, timeout=15.0) as response:\n status = response.status\n body = response.read()\n except HTTPError as error:\n status = error.code\n body = error.read()\n payload = json.loads(body.decode(\"utf-8\"))\n return status, payload", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_http_call_json", + "span_start": 125, + "span_end": 141, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 4, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _build_runtime(worker: Worker, *, control_timeout: int = 1) -> tuple[RuntimeManager, str]:\n runtime = RuntimeManager()\n channel = HttpControlChannel(host=\"127.0.0.1\", port=0, timeout=control_timeout)\n runtime.control_plane.register_channel(channel)\n runtime.register_module(WorkerModule(worker))\n runtime.start()\n return runtime, f\"http://127.0.0.1:{channel.port}\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_build_runtime", + "span_start": 154, + "span_end": 160, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 6, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class WorkerModule(ApplicationModule):\n def __init__(self, worker: Worker) -> None:\n self._worker = worker\n\n @property\n def name(self) -> str:\n return \"business-tests\"\n\n def register(self, registry: ModuleRegistry) -> None:\n registry.add_worker(self._worker)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:WorkerModule", + "span_start": 113, + "span_end": 122, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 3, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C0_SOURCE_CHUNKS": 10 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src", + "tests" + ], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src", + "tests" + ], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "TraceService", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Где тесты для TraceService? test_trace_service TestTraceService TraceService", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Где тесты для TraceService? test_trace_service TestTraceService TraceService", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 10, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 0, + "candidates_after_filter": 0 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src", + "tests" + ], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src", + "tests" + ], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 10, + "candidates_after_filter": 10 + } + ], + "fallback": { + "used": true, + "reason": "scope_relaxed_no_hits" + }, + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "TraceService" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "miss", + "hit_count": 0, + "fail_reason": "scope_relaxed_no_hits" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 10, + "fail_reason": null + } + ] + }, + "constraint_violations": [ + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C1_SYMBOL_CATALOG", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + } + ], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 96, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 44, + "C2_DEPENDENCY_GRAPH": 39, + "C0_SOURCE_CHUNKS": 13 + }, + "merge_rank": 0 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Где тесты для TraceService?", + "rag_count": 16 + }, + "output": { + "llm_answer": "1. Прямые тесты:\n - tests/test_runtime.py | test_trace_service_writes_contexts_and_messages\n - Проверка записи контекстов и сообщений в TraceService.\n - tests/test_runtime.py | test_trace_service_supports_debug_warning_and_error_levels\n - Проверка поддержки различных уровней логирования (debug, warning, error).\n\n2. Косвенные или ближайшие тесты:\n - Нет явных связей с другими тестами через зависимости или имена, однако тесты касаются работы с Transport и записью контекста/сообщений, что близко к функционалу TraceService.\n\n3. Что именно проверяется:\n - Запись и корректность данных контекстов и сообщений в TraceService.\n - Поддержка различных уровней логирования и запись соответствующих сообщений.\n\n4. Пробелы покрытия:\n - Не найдены явные пробелы покрытия для TraceService напрямую. Однако могут быть аспекты поведения, которые не охвачены текущими тестами, например, обработка ошибок, особые случаи или взаимодействие с внешними компонентами, зависящими от окружения." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 978, + "evidence_rows": 16, + "evidence_chars": 7847 + }, + "evidence_summary": [ + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 10, + "unique_paths": 2 + } + ], + "prompt_template_id": "intent_code_qa_find_tests_ru_v2", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 1736 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-find-tests-trace-service.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-find-tests-trace-service.md new file mode 100644 index 0000000..1942c8d --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-find-tests-trace-service.md @@ -0,0 +1,32 @@ +# plba-v2-find-tests-trace-service + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Где тесты для TraceService? + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 16, + "llm_answer": "1. Прямые тесты:\n - tests/test_runtime.py | test_trace_service_writes_contexts_and_messages\n - Проверка записи контекстов и сообщений в TraceService.\n - tests/test_runtime.py | test_trace_service_supports_debug_warning_and_error_levels\n - Проверка поддержки различных уровней логирования (debug, warning, error).\n\n2. Косвенные или ближайшие тесты:\n - Нет явных связей с другими тестами через зависимости или имена, однако тесты касаются работы с Transport и записью контекста/сообщений, что близко к функционалу TraceService.\n\n3. Что именно проверяется:\n - Запись и корректность данных контекстов и сообщений в TraceService.\n - Поддержка различных уровней логирования и запись соответствующих сообщений.\n\n4. Пробелы покрытия:\n - Не найдены явные пробелы покрытия для TraceService напрямую. Однако могут быть аспекты поведения, которые не охвачены текущими тестами, например, обработка ошибок, особые случаи или взаимодействие с внешними компонентами, зависящими от окружения.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "TraceService" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-find-tests-workflow-runtime-factory-negative.json b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-find-tests-workflow-runtime-factory-negative.json new file mode 100644 index 0000000..d7463e9 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-find-tests-workflow-runtime-factory-negative.json @@ -0,0 +1,2049 @@ +{ + "case_id": "plba-v2-find-tests-workflow-runtime-factory-negative", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 16, + "llm_answer": "Прямых тестов для WorkflowRuntimeFactory в предоставленном контексте не обнаружено.\n\nКосвенные или ближайшие тесты:\n1. tests/test_business_control_actions.py | test_actions_stop_busy_worker_before_timeout:dataflow_slice\n - Проверяет поведение `BlockingRoutine` и его метод `_release`.\n2. tests/test_business_control_actions.py | test_actions_stop_busy_worker_after_timeout:dataflow_slice\n - Проверяет поведение `BlockingRoutine` и его метод `_started`.\n\nЧто именно проверяется:\n- Поведение и методы класса `BlockingRoutine`, такие как инициализация, запуск и освобождение (test_actions_stop_busy_worker_before_timeout).\n- Поведение и методы класса `ScenarioWorker`, такие как получение имени (test_worker_wakes_up_with_configured_interval).\n\nКакие пробелы покрытия видны:\n- Нет явных тестов конкретно для `WorkflowRuntimeFactory`. \n- Покрытие ограничено ближайшими классами и методами, связанными с рабочим процессом и управлением сценариями работы.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "WorkflowRuntimeFactory" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "passed": false, + "mismatches": [ + "retrieval: expected empty rag, got 16 rows" + ], + "details": { + "case_id": "plba-v2-find-tests-workflow-runtime-factory-negative", + "text": "Где тесты для WorkflowRuntimeFactory?", + "mode": "full_chain", + "run_started_at": "2026-03-12T12:55:37", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Где тесты для WorkflowRuntimeFactory?", + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "WorkflowRuntimeFactory" + ], + "confidence": 0.0 + }, + "rag_count": 16, + "rag_rows": [ + { + "path": "tests/test_business_control_actions.py", + "content": "test_actions_stop_busy_worker_before_timeout\n -> BlockingRoutine\n -> BlockingRoutine.__init__\n -> BlockingRoutine._release\n -> BlockingRoutine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_actions_stop_busy_worker_before_timeout:dataflow_slice", + "span_start": 43, + "span_end": 212, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "8bd726155ba387d3579763ee84dfd2f9a90bc917da88f3b2e89416ab5c1254d6", + "edge_type": "dataflow_slice", + "src_symbol_id": "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "src_qname": "test_actions_stop_busy_worker_before_timeout", + "dst_symbol_id": "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04", + "dst_ref": "BlockingRoutine.run", + "resolution": "resolved", + "slice_id": "8bd726155ba387d3579763ee84dfd2f9a90bc917da88f3b2e89416ab5c1254d6", + "root_symbol_id": "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "path_symbols": [ + "test_actions_stop_busy_worker_before_timeout", + "BlockingRoutine", + "BlockingRoutine.__init__", + "BlockingRoutine._release", + "BlockingRoutine.run" + ], + "path_symbol_ids": [ + "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "a3349c5bc65e4003a4bbd6a8dbb7a54c337e12d1aed930caa701b12e520f1e67", + "486deeed3043c6db985aef258e96ddc67aa53608e67a83962fbd2471f649ddf1", + "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_worker_wakes_up_with_configured_interval\n -> ScenarioWorker\n -> ScenarioWorker.__init__\n -> ScenarioWorker._name\n -> ScenarioWorker.name", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_worker_wakes_up_with_configured_interval:dataflow_slice", + "span_start": 52, + "span_end": 166, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "2fd137f5852febe907f44d3b3e4ea430f89ccfe962ae1442a16ab9df64c8f76c", + "edge_type": "dataflow_slice", + "src_symbol_id": "65f877f78191d65e6a752e41cedc70ebc784c266804a55c1c56440336e1f0d6e", + "src_qname": "test_worker_wakes_up_with_configured_interval", + "dst_symbol_id": "da022da2c49fd9cfd09d6e6da6bbd59aaa7d28efd669ce8444e88d327ddec2fc", + "dst_ref": "ScenarioWorker.name", + "resolution": "resolved", + "slice_id": "2fd137f5852febe907f44d3b3e4ea430f89ccfe962ae1442a16ab9df64c8f76c", + "root_symbol_id": "65f877f78191d65e6a752e41cedc70ebc784c266804a55c1c56440336e1f0d6e", + "path_symbols": [ + "test_worker_wakes_up_with_configured_interval", + "ScenarioWorker", + "ScenarioWorker.__init__", + "ScenarioWorker._name", + "ScenarioWorker.name" + ], + "path_symbol_ids": [ + "65f877f78191d65e6a752e41cedc70ebc784c266804a55c1c56440336e1f0d6e", + "9a1d08a7eb1831c9f2e0db361b5207f036e477c160773ae08c0b287239785c52", + "9c20be046ba06644d1432e0f20eb223663d2b116ee7d91fdc62bc68323f2e593", + "da022da2c49fd9cfd09d6e6da6bbd59aaa7d28efd669ce8444e88d327ddec2fc" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_actions_stop_busy_worker_before_timeout\n -> BlockingRoutine\n -> BlockingRoutine.__init__\n -> BlockingRoutine._started\n -> BlockingRoutine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_actions_stop_busy_worker_before_timeout:dataflow_slice", + "span_start": 42, + "span_end": 212, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "f9bcce108870e49afa8b32d4625115a10707a3b0e7473179e958e5752bf258b4", + "edge_type": "dataflow_slice", + "src_symbol_id": "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "src_qname": "test_actions_stop_busy_worker_before_timeout", + "dst_symbol_id": "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04", + "dst_ref": "BlockingRoutine.run", + "resolution": "resolved", + "slice_id": "f9bcce108870e49afa8b32d4625115a10707a3b0e7473179e958e5752bf258b4", + "root_symbol_id": "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "path_symbols": [ + "test_actions_stop_busy_worker_before_timeout", + "BlockingRoutine", + "BlockingRoutine.__init__", + "BlockingRoutine._started", + "BlockingRoutine.run" + ], + "path_symbol_ids": [ + "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "a3349c5bc65e4003a4bbd6a8dbb7a54c337e12d1aed930caa701b12e520f1e67", + "486deeed3043c6db985aef258e96ddc67aa53608e67a83962fbd2471f649ddf1", + "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_actions_stop_busy_worker_after_timeout\n -> BlockingRoutine\n -> BlockingRoutine.__init__\n -> BlockingRoutine._started\n -> BlockingRoutine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_actions_stop_busy_worker_after_timeout:dataflow_slice", + "span_start": 42, + "span_end": 238, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "8e7db3d2a9226f1c1d9942ac6373cfcafa0d2276758ddb8a3d3c455a3d58024d", + "edge_type": "dataflow_slice", + "src_symbol_id": "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "src_qname": "test_actions_stop_busy_worker_after_timeout", + "dst_symbol_id": "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04", + "dst_ref": "BlockingRoutine.run", + "resolution": "resolved", + "slice_id": "8e7db3d2a9226f1c1d9942ac6373cfcafa0d2276758ddb8a3d3c455a3d58024d", + "root_symbol_id": "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "path_symbols": [ + "test_actions_stop_busy_worker_after_timeout", + "BlockingRoutine", + "BlockingRoutine.__init__", + "BlockingRoutine._started", + "BlockingRoutine.run" + ], + "path_symbol_ids": [ + "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "a3349c5bc65e4003a4bbd6a8dbb7a54c337e12d1aed930caa701b12e520f1e67", + "486deeed3043c6db985aef258e96ddc67aa53608e67a83962fbd2471f649ddf1", + "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_actions_stop_busy_worker_after_timeout\n -> BlockingRoutine\n -> BlockingRoutine.__init__\n -> BlockingRoutine._release\n -> BlockingRoutine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_actions_stop_busy_worker_after_timeout:dataflow_slice", + "span_start": 43, + "span_end": 238, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "b59da9da82f9dfc8a9b695a08213786385da1ae9e17561ec3a0450a574a8cb39", + "edge_type": "dataflow_slice", + "src_symbol_id": "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "src_qname": "test_actions_stop_busy_worker_after_timeout", + "dst_symbol_id": "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04", + "dst_ref": "BlockingRoutine.run", + "resolution": "resolved", + "slice_id": "b59da9da82f9dfc8a9b695a08213786385da1ae9e17561ec3a0450a574a8cb39", + "root_symbol_id": "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "path_symbols": [ + "test_actions_stop_busy_worker_after_timeout", + "BlockingRoutine", + "BlockingRoutine.__init__", + "BlockingRoutine._release", + "BlockingRoutine.run" + ], + "path_symbol_ids": [ + "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "a3349c5bc65e4003a4bbd6a8dbb7a54c337e12d1aed930caa701b12e520f1e67", + "486deeed3043c6db985aef258e96ddc67aa53608e67a83962fbd2471f649ddf1", + "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_actions_start_stop_and_health_when_worker_is_idle\n -> ScenarioWorker\n -> ScenarioWorker.__init__\n -> ScenarioWorker._name\n -> ScenarioWorker.name", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_actions_start_stop_and_health_when_worker_is_idle:dataflow_slice", + "span_start": 52, + "span_end": 182, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "8fb3c9e775ad1cfa91eebb8b8cef367dc53c923584236122235446e0579b468e", + "edge_type": "dataflow_slice", + "src_symbol_id": "09a78d8eb31c2da14fee58da53b5da7a5065a4c23b6300748a6d44517a5284b8", + "src_qname": "test_actions_start_stop_and_health_when_worker_is_idle", + "dst_symbol_id": "da022da2c49fd9cfd09d6e6da6bbd59aaa7d28efd669ce8444e88d327ddec2fc", + "dst_ref": "ScenarioWorker.name", + "resolution": "resolved", + "slice_id": "8fb3c9e775ad1cfa91eebb8b8cef367dc53c923584236122235446e0579b468e", + "root_symbol_id": "09a78d8eb31c2da14fee58da53b5da7a5065a4c23b6300748a6d44517a5284b8", + "path_symbols": [ + "test_actions_start_stop_and_health_when_worker_is_idle", + "ScenarioWorker", + "ScenarioWorker.__init__", + "ScenarioWorker._name", + "ScenarioWorker.name" + ], + "path_symbol_ids": [ + "09a78d8eb31c2da14fee58da53b5da7a5065a4c23b6300748a6d44517a5284b8", + "9a1d08a7eb1831c9f2e0db361b5207f036e477c160773ae08c0b287239785c52", + "9c20be046ba06644d1432e0f20eb223663d2b116ee7d91fdc62bc68323f2e593", + "da022da2c49fd9cfd09d6e6da6bbd59aaa7d28efd669ce8444e88d327ddec2fc" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def test_actions_start_stop_and_health_when_worker_is_idle() -> None:\n runtime, base_url = _build_runtime(ScenarioWorker(\"idle-worker\", IntervalRoutine(), interval=0.2))\n try:\n stop_status, stop_payload = _http_call_json(base_url, \"/actions/stop\", method=\"POST\")\n assert stop_status == 200\n assert isinstance(stop_payload.get(\"detail\"), dict)\n assert stop_payload[\"detail\"][\"timed_out\"] is False\n assert stop_payload[\"detail\"][\"state\"] == \"stopped\"\n\n health_stopped_status, health_stopped_payload = _http_call_json(base_url, \"/health\")\n assert health_stopped_status == 503\n assert health_stopped_payload[\"state\"] == \"stopped\"\n assert health_stopped_payload[\"status\"] == \"unhealthy\"\n\n start_status, start_payload = _http_call_json(base_url, \"/actions/start\", method=\"POST\")\n assert start_status == 200\n assert isinstance(start_payload.get(\"detail\"), dict)\n assert start_payload[\"detail\"][\"timed_out\"] is False\n assert start_payload[\"detail\"][\"state\"] in {\"idle\", \"busy\"}\n\n health_started_status, health_started_payload = _http_call_json(base_url, \"/health\")\n assert health_started_status == 200\n assert health_started_payload[\"status\"] == \"ok\"\n assert health_started_payload[\"state\"] in {\"idle\", \"busy\"}\n finally:\n runtime.stop()", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:test_actions_start_stop_and_health_when_worker_is_idle", + "span_start": 181, + "span_end": 206, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 8, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _poll_until_stopped(base_url: str, timeout: float = 2.0) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n _, payload = _http_call_json(base_url, \"/actions/status\")\n if payload.get(\"detail\") == \"stopped\":\n return True\n sleep(0.05)\n return False", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_poll_until_stopped", + "span_start": 144, + "span_end": 151, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 5, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def test_worker_wakes_up_with_configured_interval() -> None:\n interval = 0.15\n routine = IntervalRoutine()\n worker = ScenarioWorker(\"interval-worker\", routine, interval=interval)\n runtime = RuntimeManager()\n runtime.register_module(WorkerModule(worker))\n\n runtime.start()\n try:\n assert routine.wait_runs(count=3, timeout=2.0) is True\n finally:\n runtime.stop()\n\n deltas = routine.deltas()\n assert len(deltas) >= 2\n assert all(delta >= interval * 0.7 for delta in deltas[:2])", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:test_worker_wakes_up_with_configured_interval", + "span_start": 163, + "span_end": 178, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 7, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class BlockingRoutine:\n def __init__(self, started: Event, release: Event) -> None:\n self._started = started\n self._release = release\n\n def run(self) -> None:\n self._started.set()\n self._release.wait(timeout=5.0)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:BlockingRoutine", + "span_start": 40, + "span_end": 47, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class WorkerModule(ApplicationModule):\n def __init__(self, worker: Worker) -> None:\n self._worker = worker\n\n @property\n def name(self) -> str:\n return \"business-tests\"\n\n def register(self, registry: ModuleRegistry) -> None:\n registry.add_worker(self._worker)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:WorkerModule", + "span_start": 113, + "span_end": 122, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 3, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _http_call_json(\n base_url: str,\n path: str,\n *,\n method: str = \"GET\",\n headers: dict[str, str] | None = None,\n) -> tuple[int, dict[str, object]]:\n request = Request(f\"{base_url}{path}\", method=method, headers=headers or {})\n try:\n with urlopen(request, timeout=15.0) as response:\n status = response.status\n body = response.read()\n except HTTPError as error:\n status = error.code\n body = error.read()\n payload = json.loads(body.decode(\"utf-8\"))\n return status, payload", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_http_call_json", + "span_start": 125, + "span_end": 141, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 4, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _build_runtime(worker: Worker, *, control_timeout: int = 1) -> tuple[RuntimeManager, str]:\n runtime = RuntimeManager()\n channel = HttpControlChannel(host=\"127.0.0.1\", port=0, timeout=control_timeout)\n runtime.control_plane.register_channel(channel)\n runtime.register_module(WorkerModule(worker))\n runtime.start()\n return runtime, f\"http://127.0.0.1:{channel.port}\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_build_runtime", + "span_start": 154, + "span_end": 160, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 6, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class ScenarioWorker(Worker):\n def __init__(self, name: str, routine: object, *, interval: float = 0.05) -> None:\n self._name = name\n self._routine = routine\n self._interval = interval\n self._thread: Thread | None = None\n self._stop_requested = Event()\n self._in_flight = 0\n self._runs = 0\n self._lock = Lock()\n\n @property\n def name(self) -> str:\n return self._name\n\n @property\n def critical(self) -> bool:\n return True\n\n def start(self) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._stop_requested.clear()\n self._thread = Thread(target=self._loop, name=f\"{self._name}-thread\", daemon=True)\n self._thread.start()\n\n def stop(self, force: bool = False) -> None:\n self._stop_requested.set()\n\n def health(self) -> WorkerHealth:\n return WorkerHealth(name=self.name, status=\"ok\", critical=True, meta={\"runs\": self._runs})\n\n def status(self) -> WorkerStatus:\n thread_alive = self._thread is not None and self._thread.is_alive()\n with self._lock:\n in_flight = self._in_flight\n runs = self._runs\n if not thread_alive:\n state = \"stopped\"\n elif self._stop_requested.is_set():\n state = \"stopping\"\n elif in_flight > 0:\n state = \"busy\"\n else:\n state = \"idle\"\n return WorkerStatus(name=self.name, state=state, in_flight=in_flight, meta={\"runs\": runs})\n\n def _loop(self) -> None:\n while not self._stop_requested.is_set():\n with self._lock:\n self._in_flight += 1\n try:\n self._routine.run()\n with self._lock:\n self._runs += 1\n finally:\n with self._lock:\n self._in_flight -= 1\n if self._stop_requested.is_set():\n return\n sleep(self._interval)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:ScenarioWorker", + "span_start": 50, + "span_end": 110, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 2, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class IntervalRoutine:\n calls: list[float] = field(default_factory=list)\n _lock: Lock = field(default_factory=Lock)\n\n def run(self) -> None:\n with self._lock:\n self.calls.append(monotonic())\n\n def wait_runs(self, count: int, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n with self._lock:\n if len(self.calls) >= count:\n return True\n sleep(0.01)\n return False\n\n def deltas(self) -> list[float]:\n with self._lock:\n return [self.calls[index + 1] - self.calls[index] for index in range(len(self.calls) - 1)]", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:IntervalRoutine", + "span_start": 18, + "span_end": 37, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def test_actions_stop_busy_worker_before_timeout() -> None:\n started = Event()\n release = Event()\n runtime, base_url = _build_runtime(ScenarioWorker(\"busy-worker\", BlockingRoutine(started, release)))\n assert started.wait(timeout=1.0) is True\n\n def release_later() -> None:\n sleep(0.2)\n release.set()\n\n Thread(target=release_later, daemon=True).start()\n try:\n status, payload = _http_call_json(base_url, \"/actions/stop\", method=\"POST\")\n assert status == 200\n assert isinstance(payload.get(\"detail\"), dict)\n assert payload[\"detail\"][\"timed_out\"] is False\n assert payload[\"detail\"][\"state\"] == \"stopped\"\n\n health_status, health_payload = _http_call_json(base_url, \"/health\")\n assert health_status == 503\n assert health_payload[\"status\"] == \"unhealthy\"\n assert health_payload[\"state\"] == \"stopped\"\n finally:\n runtime.stop()", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:test_actions_stop_busy_worker_before_timeout", + "span_start": 209, + "span_end": 232, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 9, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "Прямых тестов для WorkflowRuntimeFactory в предоставленном контексте не обнаружено.\n\nКосвенные или ближайшие тесты:\n1. tests/test_business_control_actions.py | test_actions_stop_busy_worker_before_timeout:dataflow_slice\n - Проверяет поведение `BlockingRoutine` и его метод `_release`.\n2. tests/test_business_control_actions.py | test_actions_stop_busy_worker_after_timeout:dataflow_slice\n - Проверяет поведение `BlockingRoutine` и его метод `_started`.\n\nЧто именно проверяется:\n- Поведение и методы класса `BlockingRoutine`, такие как инициализация, запуск и освобождение (test_actions_stop_busy_worker_before_timeout).\n- Поведение и методы класса `ScenarioWorker`, такие как получение имени (test_worker_wakes_up_with_configured_interval).\n\nКакие пробелы покрытия видны:\n- Нет явных тестов конкретно для `WorkflowRuntimeFactory`. \n- Покрытие ограничено ближайшими классами и методами, связанными с рабочим процессом и управлением сценариями работы.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C2_DEPENDENCY_GRAPH" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "WorkflowRuntimeFactory" + ], + "keyword_hints": [ + "WorkflowRuntimeFactory" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "test_file_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "test_symbol_patterns": [ + "test_workflow_runtime_factory", + "TestWorkflowRuntimeFactory", + "WorkflowRuntimeFactory" + ], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C0_SOURCE_CHUNKS": 10 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src", + "tests" + ], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src", + "tests" + ], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "WorkflowRuntimeFactory", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Где тесты для WorkflowRuntimeFactory? test_workflow_runtime_factory TestWorkflowRuntimeFactory WorkflowRuntimeFactory", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Где тесты для WorkflowRuntimeFactory? test_workflow_runtime_factory TestWorkflowRuntimeFactory WorkflowRuntimeFactory", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 10, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 0, + "candidates_after_filter": 0 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src", + "tests" + ], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src", + "tests" + ], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 10, + "candidates_after_filter": 10 + } + ], + "fallback": { + "used": true, + "reason": "scope_relaxed_no_hits" + }, + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "WorkflowRuntimeFactory" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "miss", + "hit_count": 0, + "fail_reason": "scope_relaxed_no_hits" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 10, + "fail_reason": null + } + ] + }, + "constraint_violations": [ + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C1_SYMBOL_CATALOG", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + } + ], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 112, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 50, + "C2_DEPENDENCY_GRAPH": 48, + "C0_SOURCE_CHUNKS": 13 + }, + "merge_rank": 0, + "prompt_build": 0, + "llm_call": 1640 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 998, + "evidence_rows": 16, + "evidence_chars": 8149 + }, + "evidence_summary": [ + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 10, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_find_tests_ru_v2", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "WorkflowRuntimeFactory" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 16, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-v2-find-tests-workflow-runtime-factory-negative", + "mode": "full_chain", + "run_started_at": "2026-03-12T12:55:37", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Где тесты для WorkflowRuntimeFactory?", + "normalized_query": "Где тесты для WorkflowRuntimeFactory?" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Где тесты для WorkflowRuntimeFactory?" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Где тесты для WorkflowRuntimeFactory?" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "WorkflowRuntimeFactory" + ], + "keyword_hints": [ + "WorkflowRuntimeFactory" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "test_file_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "test_symbol_patterns": [ + "test_workflow_runtime_factory", + "TestWorkflowRuntimeFactory", + "WorkflowRuntimeFactory" + ], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Где тесты для WorkflowRuntimeFactory?" + }, + "output": { + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "WorkflowRuntimeFactory" + ], + "confidence": 0.0 + }, + "rag_count": 16, + "rag_rows": [ + { + "path": "tests/test_business_control_actions.py", + "content": "test_actions_stop_busy_worker_before_timeout\n -> BlockingRoutine\n -> BlockingRoutine.__init__\n -> BlockingRoutine._release\n -> BlockingRoutine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_actions_stop_busy_worker_before_timeout:dataflow_slice", + "span_start": 43, + "span_end": 212, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "8bd726155ba387d3579763ee84dfd2f9a90bc917da88f3b2e89416ab5c1254d6", + "edge_type": "dataflow_slice", + "src_symbol_id": "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "src_qname": "test_actions_stop_busy_worker_before_timeout", + "dst_symbol_id": "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04", + "dst_ref": "BlockingRoutine.run", + "resolution": "resolved", + "slice_id": "8bd726155ba387d3579763ee84dfd2f9a90bc917da88f3b2e89416ab5c1254d6", + "root_symbol_id": "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "path_symbols": [ + "test_actions_stop_busy_worker_before_timeout", + "BlockingRoutine", + "BlockingRoutine.__init__", + "BlockingRoutine._release", + "BlockingRoutine.run" + ], + "path_symbol_ids": [ + "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "a3349c5bc65e4003a4bbd6a8dbb7a54c337e12d1aed930caa701b12e520f1e67", + "486deeed3043c6db985aef258e96ddc67aa53608e67a83962fbd2471f649ddf1", + "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_worker_wakes_up_with_configured_interval\n -> ScenarioWorker\n -> ScenarioWorker.__init__\n -> ScenarioWorker._name\n -> ScenarioWorker.name", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_worker_wakes_up_with_configured_interval:dataflow_slice", + "span_start": 52, + "span_end": 166, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "2fd137f5852febe907f44d3b3e4ea430f89ccfe962ae1442a16ab9df64c8f76c", + "edge_type": "dataflow_slice", + "src_symbol_id": "65f877f78191d65e6a752e41cedc70ebc784c266804a55c1c56440336e1f0d6e", + "src_qname": "test_worker_wakes_up_with_configured_interval", + "dst_symbol_id": "da022da2c49fd9cfd09d6e6da6bbd59aaa7d28efd669ce8444e88d327ddec2fc", + "dst_ref": "ScenarioWorker.name", + "resolution": "resolved", + "slice_id": "2fd137f5852febe907f44d3b3e4ea430f89ccfe962ae1442a16ab9df64c8f76c", + "root_symbol_id": "65f877f78191d65e6a752e41cedc70ebc784c266804a55c1c56440336e1f0d6e", + "path_symbols": [ + "test_worker_wakes_up_with_configured_interval", + "ScenarioWorker", + "ScenarioWorker.__init__", + "ScenarioWorker._name", + "ScenarioWorker.name" + ], + "path_symbol_ids": [ + "65f877f78191d65e6a752e41cedc70ebc784c266804a55c1c56440336e1f0d6e", + "9a1d08a7eb1831c9f2e0db361b5207f036e477c160773ae08c0b287239785c52", + "9c20be046ba06644d1432e0f20eb223663d2b116ee7d91fdc62bc68323f2e593", + "da022da2c49fd9cfd09d6e6da6bbd59aaa7d28efd669ce8444e88d327ddec2fc" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_actions_stop_busy_worker_before_timeout\n -> BlockingRoutine\n -> BlockingRoutine.__init__\n -> BlockingRoutine._started\n -> BlockingRoutine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_actions_stop_busy_worker_before_timeout:dataflow_slice", + "span_start": 42, + "span_end": 212, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "f9bcce108870e49afa8b32d4625115a10707a3b0e7473179e958e5752bf258b4", + "edge_type": "dataflow_slice", + "src_symbol_id": "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "src_qname": "test_actions_stop_busy_worker_before_timeout", + "dst_symbol_id": "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04", + "dst_ref": "BlockingRoutine.run", + "resolution": "resolved", + "slice_id": "f9bcce108870e49afa8b32d4625115a10707a3b0e7473179e958e5752bf258b4", + "root_symbol_id": "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "path_symbols": [ + "test_actions_stop_busy_worker_before_timeout", + "BlockingRoutine", + "BlockingRoutine.__init__", + "BlockingRoutine._started", + "BlockingRoutine.run" + ], + "path_symbol_ids": [ + "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "a3349c5bc65e4003a4bbd6a8dbb7a54c337e12d1aed930caa701b12e520f1e67", + "486deeed3043c6db985aef258e96ddc67aa53608e67a83962fbd2471f649ddf1", + "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_actions_stop_busy_worker_after_timeout\n -> BlockingRoutine\n -> BlockingRoutine.__init__\n -> BlockingRoutine._started\n -> BlockingRoutine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_actions_stop_busy_worker_after_timeout:dataflow_slice", + "span_start": 42, + "span_end": 238, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "8e7db3d2a9226f1c1d9942ac6373cfcafa0d2276758ddb8a3d3c455a3d58024d", + "edge_type": "dataflow_slice", + "src_symbol_id": "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "src_qname": "test_actions_stop_busy_worker_after_timeout", + "dst_symbol_id": "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04", + "dst_ref": "BlockingRoutine.run", + "resolution": "resolved", + "slice_id": "8e7db3d2a9226f1c1d9942ac6373cfcafa0d2276758ddb8a3d3c455a3d58024d", + "root_symbol_id": "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "path_symbols": [ + "test_actions_stop_busy_worker_after_timeout", + "BlockingRoutine", + "BlockingRoutine.__init__", + "BlockingRoutine._started", + "BlockingRoutine.run" + ], + "path_symbol_ids": [ + "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "a3349c5bc65e4003a4bbd6a8dbb7a54c337e12d1aed930caa701b12e520f1e67", + "486deeed3043c6db985aef258e96ddc67aa53608e67a83962fbd2471f649ddf1", + "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_actions_stop_busy_worker_after_timeout\n -> BlockingRoutine\n -> BlockingRoutine.__init__\n -> BlockingRoutine._release\n -> BlockingRoutine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_actions_stop_busy_worker_after_timeout:dataflow_slice", + "span_start": 43, + "span_end": 238, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "b59da9da82f9dfc8a9b695a08213786385da1ae9e17561ec3a0450a574a8cb39", + "edge_type": "dataflow_slice", + "src_symbol_id": "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "src_qname": "test_actions_stop_busy_worker_after_timeout", + "dst_symbol_id": "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04", + "dst_ref": "BlockingRoutine.run", + "resolution": "resolved", + "slice_id": "b59da9da82f9dfc8a9b695a08213786385da1ae9e17561ec3a0450a574a8cb39", + "root_symbol_id": "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "path_symbols": [ + "test_actions_stop_busy_worker_after_timeout", + "BlockingRoutine", + "BlockingRoutine.__init__", + "BlockingRoutine._release", + "BlockingRoutine.run" + ], + "path_symbol_ids": [ + "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "a3349c5bc65e4003a4bbd6a8dbb7a54c337e12d1aed930caa701b12e520f1e67", + "486deeed3043c6db985aef258e96ddc67aa53608e67a83962fbd2471f649ddf1", + "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_actions_start_stop_and_health_when_worker_is_idle\n -> ScenarioWorker\n -> ScenarioWorker.__init__\n -> ScenarioWorker._name\n -> ScenarioWorker.name", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_actions_start_stop_and_health_when_worker_is_idle:dataflow_slice", + "span_start": 52, + "span_end": 182, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "8fb3c9e775ad1cfa91eebb8b8cef367dc53c923584236122235446e0579b468e", + "edge_type": "dataflow_slice", + "src_symbol_id": "09a78d8eb31c2da14fee58da53b5da7a5065a4c23b6300748a6d44517a5284b8", + "src_qname": "test_actions_start_stop_and_health_when_worker_is_idle", + "dst_symbol_id": "da022da2c49fd9cfd09d6e6da6bbd59aaa7d28efd669ce8444e88d327ddec2fc", + "dst_ref": "ScenarioWorker.name", + "resolution": "resolved", + "slice_id": "8fb3c9e775ad1cfa91eebb8b8cef367dc53c923584236122235446e0579b468e", + "root_symbol_id": "09a78d8eb31c2da14fee58da53b5da7a5065a4c23b6300748a6d44517a5284b8", + "path_symbols": [ + "test_actions_start_stop_and_health_when_worker_is_idle", + "ScenarioWorker", + "ScenarioWorker.__init__", + "ScenarioWorker._name", + "ScenarioWorker.name" + ], + "path_symbol_ids": [ + "09a78d8eb31c2da14fee58da53b5da7a5065a4c23b6300748a6d44517a5284b8", + "9a1d08a7eb1831c9f2e0db361b5207f036e477c160773ae08c0b287239785c52", + "9c20be046ba06644d1432e0f20eb223663d2b116ee7d91fdc62bc68323f2e593", + "da022da2c49fd9cfd09d6e6da6bbd59aaa7d28efd669ce8444e88d327ddec2fc" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def test_actions_start_stop_and_health_when_worker_is_idle() -> None:\n runtime, base_url = _build_runtime(ScenarioWorker(\"idle-worker\", IntervalRoutine(), interval=0.2))\n try:\n stop_status, stop_payload = _http_call_json(base_url, \"/actions/stop\", method=\"POST\")\n assert stop_status == 200\n assert isinstance(stop_payload.get(\"detail\"), dict)\n assert stop_payload[\"detail\"][\"timed_out\"] is False\n assert stop_payload[\"detail\"][\"state\"] == \"stopped\"\n\n health_stopped_status, health_stopped_payload = _http_call_json(base_url, \"/health\")\n assert health_stopped_status == 503\n assert health_stopped_payload[\"state\"] == \"stopped\"\n assert health_stopped_payload[\"status\"] == \"unhealthy\"\n\n start_status, start_payload = _http_call_json(base_url, \"/actions/start\", method=\"POST\")\n assert start_status == 200\n assert isinstance(start_payload.get(\"detail\"), dict)\n assert start_payload[\"detail\"][\"timed_out\"] is False\n assert start_payload[\"detail\"][\"state\"] in {\"idle\", \"busy\"}\n\n health_started_status, health_started_payload = _http_call_json(base_url, \"/health\")\n assert health_started_status == 200\n assert health_started_payload[\"status\"] == \"ok\"\n assert health_started_payload[\"state\"] in {\"idle\", \"busy\"}\n finally:\n runtime.stop()", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:test_actions_start_stop_and_health_when_worker_is_idle", + "span_start": 181, + "span_end": 206, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 8, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _poll_until_stopped(base_url: str, timeout: float = 2.0) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n _, payload = _http_call_json(base_url, \"/actions/status\")\n if payload.get(\"detail\") == \"stopped\":\n return True\n sleep(0.05)\n return False", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_poll_until_stopped", + "span_start": 144, + "span_end": 151, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 5, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def test_worker_wakes_up_with_configured_interval() -> None:\n interval = 0.15\n routine = IntervalRoutine()\n worker = ScenarioWorker(\"interval-worker\", routine, interval=interval)\n runtime = RuntimeManager()\n runtime.register_module(WorkerModule(worker))\n\n runtime.start()\n try:\n assert routine.wait_runs(count=3, timeout=2.0) is True\n finally:\n runtime.stop()\n\n deltas = routine.deltas()\n assert len(deltas) >= 2\n assert all(delta >= interval * 0.7 for delta in deltas[:2])", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:test_worker_wakes_up_with_configured_interval", + "span_start": 163, + "span_end": 178, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 7, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class BlockingRoutine:\n def __init__(self, started: Event, release: Event) -> None:\n self._started = started\n self._release = release\n\n def run(self) -> None:\n self._started.set()\n self._release.wait(timeout=5.0)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:BlockingRoutine", + "span_start": 40, + "span_end": 47, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class WorkerModule(ApplicationModule):\n def __init__(self, worker: Worker) -> None:\n self._worker = worker\n\n @property\n def name(self) -> str:\n return \"business-tests\"\n\n def register(self, registry: ModuleRegistry) -> None:\n registry.add_worker(self._worker)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:WorkerModule", + "span_start": 113, + "span_end": 122, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 3, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _http_call_json(\n base_url: str,\n path: str,\n *,\n method: str = \"GET\",\n headers: dict[str, str] | None = None,\n) -> tuple[int, dict[str, object]]:\n request = Request(f\"{base_url}{path}\", method=method, headers=headers or {})\n try:\n with urlopen(request, timeout=15.0) as response:\n status = response.status\n body = response.read()\n except HTTPError as error:\n status = error.code\n body = error.read()\n payload = json.loads(body.decode(\"utf-8\"))\n return status, payload", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_http_call_json", + "span_start": 125, + "span_end": 141, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 4, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _build_runtime(worker: Worker, *, control_timeout: int = 1) -> tuple[RuntimeManager, str]:\n runtime = RuntimeManager()\n channel = HttpControlChannel(host=\"127.0.0.1\", port=0, timeout=control_timeout)\n runtime.control_plane.register_channel(channel)\n runtime.register_module(WorkerModule(worker))\n runtime.start()\n return runtime, f\"http://127.0.0.1:{channel.port}\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_build_runtime", + "span_start": 154, + "span_end": 160, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 6, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class ScenarioWorker(Worker):\n def __init__(self, name: str, routine: object, *, interval: float = 0.05) -> None:\n self._name = name\n self._routine = routine\n self._interval = interval\n self._thread: Thread | None = None\n self._stop_requested = Event()\n self._in_flight = 0\n self._runs = 0\n self._lock = Lock()\n\n @property\n def name(self) -> str:\n return self._name\n\n @property\n def critical(self) -> bool:\n return True\n\n def start(self) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._stop_requested.clear()\n self._thread = Thread(target=self._loop, name=f\"{self._name}-thread\", daemon=True)\n self._thread.start()\n\n def stop(self, force: bool = False) -> None:\n self._stop_requested.set()\n\n def health(self) -> WorkerHealth:\n return WorkerHealth(name=self.name, status=\"ok\", critical=True, meta={\"runs\": self._runs})\n\n def status(self) -> WorkerStatus:\n thread_alive = self._thread is not None and self._thread.is_alive()\n with self._lock:\n in_flight = self._in_flight\n runs = self._runs\n if not thread_alive:\n state = \"stopped\"\n elif self._stop_requested.is_set():\n state = \"stopping\"\n elif in_flight > 0:\n state = \"busy\"\n else:\n state = \"idle\"\n return WorkerStatus(name=self.name, state=state, in_flight=in_flight, meta={\"runs\": runs})\n\n def _loop(self) -> None:\n while not self._stop_requested.is_set():\n with self._lock:\n self._in_flight += 1\n try:\n self._routine.run()\n with self._lock:\n self._runs += 1\n finally:\n with self._lock:\n self._in_flight -= 1\n if self._stop_requested.is_set():\n return\n sleep(self._interval)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:ScenarioWorker", + "span_start": 50, + "span_end": 110, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 2, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class IntervalRoutine:\n calls: list[float] = field(default_factory=list)\n _lock: Lock = field(default_factory=Lock)\n\n def run(self) -> None:\n with self._lock:\n self.calls.append(monotonic())\n\n def wait_runs(self, count: int, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n with self._lock:\n if len(self.calls) >= count:\n return True\n sleep(0.01)\n return False\n\n def deltas(self) -> list[float]:\n with self._lock:\n return [self.calls[index + 1] - self.calls[index] for index in range(len(self.calls) - 1)]", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:IntervalRoutine", + "span_start": 18, + "span_end": 37, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def test_actions_stop_busy_worker_before_timeout() -> None:\n started = Event()\n release = Event()\n runtime, base_url = _build_runtime(ScenarioWorker(\"busy-worker\", BlockingRoutine(started, release)))\n assert started.wait(timeout=1.0) is True\n\n def release_later() -> None:\n sleep(0.2)\n release.set()\n\n Thread(target=release_later, daemon=True).start()\n try:\n status, payload = _http_call_json(base_url, \"/actions/stop\", method=\"POST\")\n assert status == 200\n assert isinstance(payload.get(\"detail\"), dict)\n assert payload[\"detail\"][\"timed_out\"] is False\n assert payload[\"detail\"][\"state\"] == \"stopped\"\n\n health_status, health_payload = _http_call_json(base_url, \"/health\")\n assert health_status == 503\n assert health_payload[\"status\"] == \"unhealthy\"\n assert health_payload[\"state\"] == \"stopped\"\n finally:\n runtime.stop()", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:test_actions_stop_busy_worker_before_timeout", + "span_start": 209, + "span_end": 232, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 9, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C0_SOURCE_CHUNKS": 10 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src", + "tests" + ], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src", + "tests" + ], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "WorkflowRuntimeFactory", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Где тесты для WorkflowRuntimeFactory? test_workflow_runtime_factory TestWorkflowRuntimeFactory WorkflowRuntimeFactory", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Где тесты для WorkflowRuntimeFactory? test_workflow_runtime_factory TestWorkflowRuntimeFactory WorkflowRuntimeFactory", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 10, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 0, + "candidates_after_filter": 0 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src", + "tests" + ], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src", + "tests" + ], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 10, + "candidates_after_filter": 10 + } + ], + "fallback": { + "used": true, + "reason": "scope_relaxed_no_hits" + }, + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "WorkflowRuntimeFactory" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "miss", + "hit_count": 0, + "fail_reason": "scope_relaxed_no_hits" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 10, + "fail_reason": null + } + ] + }, + "constraint_violations": [ + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C1_SYMBOL_CATALOG", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + } + ], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 112, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 50, + "C2_DEPENDENCY_GRAPH": 48, + "C0_SOURCE_CHUNKS": 13 + }, + "merge_rank": 0 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Где тесты для WorkflowRuntimeFactory?", + "rag_count": 16 + }, + "output": { + "llm_answer": "Прямых тестов для WorkflowRuntimeFactory в предоставленном контексте не обнаружено.\n\nКосвенные или ближайшие тесты:\n1. tests/test_business_control_actions.py | test_actions_stop_busy_worker_before_timeout:dataflow_slice\n - Проверяет поведение `BlockingRoutine` и его метод `_release`.\n2. tests/test_business_control_actions.py | test_actions_stop_busy_worker_after_timeout:dataflow_slice\n - Проверяет поведение `BlockingRoutine` и его метод `_started`.\n\nЧто именно проверяется:\n- Поведение и методы класса `BlockingRoutine`, такие как инициализация, запуск и освобождение (test_actions_stop_busy_worker_before_timeout).\n- Поведение и методы класса `ScenarioWorker`, такие как получение имени (test_worker_wakes_up_with_configured_interval).\n\nКакие пробелы покрытия видны:\n- Нет явных тестов конкретно для `WorkflowRuntimeFactory`. \n- Покрытие ограничено ближайшими классами и методами, связанными с рабочим процессом и управлением сценариями работы." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 998, + "evidence_rows": 16, + "evidence_chars": 8149 + }, + "evidence_summary": [ + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 10, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_find_tests_ru_v2", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 1640 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-find-tests-workflow-runtime-factory-negative.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-find-tests-workflow-runtime-factory-negative.md new file mode 100644 index 0000000..4c8abff --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-find-tests-workflow-runtime-factory-negative.md @@ -0,0 +1,32 @@ +# plba-v2-find-tests-workflow-runtime-factory-negative + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: runtime +- mode: full_chain +- passed: False + +## Query +Где тесты для WorkflowRuntimeFactory? + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 16, + "llm_answer": "Прямых тестов для WorkflowRuntimeFactory в предоставленном контексте не обнаружено.\n\nКосвенные или ближайшие тесты:\n1. tests/test_business_control_actions.py | test_actions_stop_busy_worker_before_timeout:dataflow_slice\n - Проверяет поведение `BlockingRoutine` и его метод `_release`.\n2. tests/test_business_control_actions.py | test_actions_stop_busy_worker_after_timeout:dataflow_slice\n - Проверяет поведение `BlockingRoutine` и его метод `_started`.\n\nЧто именно проверяется:\n- Поведение и методы класса `BlockingRoutine`, такие как инициализация, запуск и освобождение (test_actions_stop_busy_worker_before_timeout).\n- Поведение и методы класса `ScenarioWorker`, такие как получение имени (test_worker_wakes_up_with_configured_interval).\n\nКакие пробелы покрытия видны:\n- Нет явных тестов конкретно для `WorkflowRuntimeFactory`. \n- Покрытие ограничено ближайшими классами и методами, связанными с рабочим процессом и управлением сценариями работы.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "WorkflowRuntimeFactory" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- retrieval: expected empty rag, got 16 rows \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-open-file-nonexistent.json b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-open-file-nonexistent.json new file mode 100644 index 0000000..332460a --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-open-file-nonexistent.json @@ -0,0 +1,454 @@ +{ + "case_id": "plba-v2-open-file-nonexistent", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 0, + "llm_answer": "1. src/app_runtime/core/missing_runtime.py\n2. Основан только на имени файла и пути, так как сам контент файла недоступен.\n3. Top-level сущности или секции невозможно определить из-за отсутствия содержимого файла.\n4. Так как содержимое файла неизвестно, невозможно сказать, какие части этого файла могут быть важны для интерпретации слоёв RAG. Однако, исходя из названия файла, вероятно, он содержит информацию о работе с отсутствующими или пропущенными компонентами во время выполнения приложения. Это может включать обработку ошибок, логирование или механизмы замены недостающих компонентов.", + "answer_mode": "insufficient_evidence", + "path_scope": [ + "src/app_runtime/core/missing_runtime.py" + ], + "symbol_candidates": [], + "layers": [ + "C0_SOURCE_CHUNKS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-v2-open-file-nonexistent", + "text": "Открой файл src/app_runtime/core/missing_runtime.py", + "mode": "full_chain", + "run_started_at": "2026-03-12T12:55:37", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Открой файл src/app_runtime/core/missing_runtime.py", + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [], + "confidence": 0.0 + }, + "rag_count": 0, + "rag_rows": [], + "llm_answer": "1. src/app_runtime/core/missing_runtime.py\n2. Основан только на имени файла и пути, так как сам контент файла недоступен.\n3. Top-level сущности или секции невозможно определить из-за отсутствия содержимого файла.\n4. Так как содержимое файла неизвестно, невозможно сказать, какие части этого файла могут быть важны для интерпретации слоёв RAG. Однако, исходя из названия файла, вероятно, он содержит информацию о работе с отсутствующими или пропущенными компонентами во время выполнения приложения. Это может включать обработку ошибок, логирование или механизмы замены недостающих компонентов.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [], + "evidence_sufficient": false + }, + "llm": { + "answer_status": "insufficient_evidence", + "groundedness": "weakly_grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "unknown", + "symbol_candidates": [], + "keyword_hints": [], + "path_hints": [ + "src/app_runtime/core/missing_runtime.py" + ], + "path_scope": [ + "src/app_runtime/core/missing_runtime.py" + ], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/app_runtime/core/missing_runtime.py" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": false, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C0_SOURCE_CHUNKS": 200 + }, + "filters_by_layer": { + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src/app_runtime/core/missing_runtime.py" + ], + "include_globs": [], + "exclude_globs": [], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": null, + "workspace_id": null, + "returned_repo_ids": [], + "returned_workspace_ids": [] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Открой файл src/app_runtime/core/missing_runtime.py", + "path_scope": [ + "src/app_runtime/core/missing_runtime.py" + ], + "include_globs": [], + "exclude_globs": [], + "prefer_globs": [], + "top_k": 200, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src/app_runtime/core/missing_runtime.py" + ], + "normalized_include_globs": [], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 0, + "candidates_after_filter": 0 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [] + }, + "layers": [ + { + "layer": "C0_SOURCE_CHUNKS", + "status": "miss", + "hit_count": 0, + "fail_reason": null + } + ] + }, + "constraint_violations": [ + { + "type": "PATH_SCOPE_NOT_SATISFIED", + "severity": "error", + "details": { + "path_scope": [ + "src/app_runtime/core/missing_runtime.py" + ], + "returned_paths": [] + }, + "suggested_fix": "Use exact path_scope retrieval and disable broad fallback for OPEN_FILE." + }, + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C0_SOURCE_CHUNKS", + "requested_layers": [ + "C0_SOURCE_CHUNKS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + } + ], + "timings_ms": { + "router": 1, + "symbol_resolution": 0, + "retrieval_total": 37, + "retrieval_by_layer": { + "C0_SOURCE_CHUNKS": 37 + }, + "merge_rank": 0, + "prompt_build": 0, + "llm_call": 1016 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 278, + "evidence_rows": 0, + "evidence_chars": 0 + }, + "evidence_summary": [], + "prompt_template_id": "intent_code_qa_open_file_ru_v2", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [], + "path_scope": [ + "src/app_runtime/core/missing_runtime.py" + ] + }, + "llm": { + "used_evidence_count": 0, + "missing_evidence_reason": "empty_retrieval_context" + } + }, + "run_info": { + "case_id": "plba-v2-open-file-nonexistent", + "mode": "full_chain", + "run_started_at": "2026-03-12T12:55:37", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Открой файл src/app_runtime/core/missing_runtime.py", + "normalized_query": "Открой файл src/app_runtime/core/missing_runtime.py" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Открой файл src/app_runtime/core/missing_runtime.py" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Открой файл src/app_runtime/core/missing_runtime.py" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "unknown", + "symbol_candidates": [], + "keyword_hints": [], + "path_hints": [ + "src/app_runtime/core/missing_runtime.py" + ], + "path_scope": [ + "src/app_runtime/core/missing_runtime.py" + ], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/app_runtime/core/missing_runtime.py" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": false, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 1 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Открой файл src/app_runtime/core/missing_runtime.py" + }, + "output": { + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [], + "confidence": 0.0 + }, + "rag_count": 0, + "rag_rows": [] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C0_SOURCE_CHUNKS": 200 + }, + "filters_by_layer": { + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src/app_runtime/core/missing_runtime.py" + ], + "include_globs": [], + "exclude_globs": [], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": null, + "workspace_id": null, + "returned_repo_ids": [], + "returned_workspace_ids": [] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Открой файл src/app_runtime/core/missing_runtime.py", + "path_scope": [ + "src/app_runtime/core/missing_runtime.py" + ], + "include_globs": [], + "exclude_globs": [], + "prefer_globs": [], + "top_k": 200, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src/app_runtime/core/missing_runtime.py" + ], + "normalized_include_globs": [], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 0, + "candidates_after_filter": 0 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [] + }, + "layers": [ + { + "layer": "C0_SOURCE_CHUNKS", + "status": "miss", + "hit_count": 0, + "fail_reason": null + } + ] + }, + "constraint_violations": [ + { + "type": "PATH_SCOPE_NOT_SATISFIED", + "severity": "error", + "details": { + "path_scope": [ + "src/app_runtime/core/missing_runtime.py" + ], + "returned_paths": [] + }, + "suggested_fix": "Use exact path_scope retrieval and disable broad fallback for OPEN_FILE." + }, + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C0_SOURCE_CHUNKS", + "requested_layers": [ + "C0_SOURCE_CHUNKS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + } + ], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 37, + "retrieval_by_layer": { + "C0_SOURCE_CHUNKS": 37 + }, + "merge_rank": 0 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Открой файл src/app_runtime/core/missing_runtime.py", + "rag_count": 0 + }, + "output": { + "llm_answer": "1. src/app_runtime/core/missing_runtime.py\n2. Основан только на имени файла и пути, так как сам контент файла недоступен.\n3. Top-level сущности или секции невозможно определить из-за отсутствия содержимого файла.\n4. Так как содержимое файла неизвестно, невозможно сказать, какие части этого файла могут быть важны для интерпретации слоёв RAG. Однако, исходя из названия файла, вероятно, он содержит информацию о работе с отсутствующими или пропущенными компонентами во время выполнения приложения. Это может включать обработку ошибок, логирование или механизмы замены недостающих компонентов." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 278, + "evidence_rows": 0, + "evidence_chars": 0 + }, + "evidence_summary": [], + "prompt_template_id": "intent_code_qa_open_file_ru_v2", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 1016 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-open-file-nonexistent.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-open-file-nonexistent.md new file mode 100644 index 0000000..6a5292d --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-open-file-nonexistent.md @@ -0,0 +1,30 @@ +# plba-v2-open-file-nonexistent + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Открой файл src/app_runtime/core/missing_runtime.py + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 0, + "llm_answer": "1. src/app_runtime/core/missing_runtime.py\n2. Основан только на имени файла и пути, так как сам контент файла недоступен.\n3. Top-level сущности или секции невозможно определить из-за отсутствия содержимого файла.\n4. Так как содержимое файла неизвестно, невозможно сказать, какие части этого файла могут быть важны для интерпретации слоёв RAG. Однако, исходя из названия файла, вероятно, он содержит информацию о работе с отсутствующими или пропущенными компонентами во время выполнения приложения. Это может включать обработку ошибок, логирование или механизмы замены недостающих компонентов.", + "answer_mode": "insufficient_evidence", + "path_scope": [ + "src/app_runtime/core/missing_runtime.py" + ], + "symbol_candidates": [], + "layers": [ + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-open-file-public-api.json b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-open-file-public-api.json new file mode 100644 index 0000000..d197a25 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-open-file-public-api.json @@ -0,0 +1,492 @@ +{ + "case_id": "plba-v2-open-file-public-api", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 1, + "llm_answer": "1. src/plba/__init__.py\n2. Файл содержит импорт различных модулей и классов из разных пакетов проекта. Также определён список __all__, содержащий имена экспортируемых элементов.\n3. Top-level сущности и секции:\n - Импорты (модулей и классов).\n - Список __all__.\n4. В этом файле определены импорты основных компонентов системы управления рабочими процессами, конфигурацией, контролем и отслеживанием выполнения задач. Список __all__ указывает на основные экспортируемые элементы модуля, которые могут быть важны при использовании этого модуля в других частях приложения.", + "answer_mode": "answered", + "path_scope": [ + "src/plba/__init__.py" + ], + "symbol_candidates": [], + "layers": [ + "C0_SOURCE_CHUNKS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-v2-open-file-public-api", + "text": "Открой файл src/plba/__init__.py", + "mode": "full_chain", + "run_started_at": "2026-03-12T12:55:37", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Открой файл src/plba/__init__.py", + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [], + "confidence": 0.0 + }, + "rag_count": 1, + "rag_rows": [ + { + "path": "src/plba/__init__.py", + "content": "from plba.bootstrap import create_runtime\nfrom plba.config import ConfigFileLoader, FileConfigProvider\nfrom plba.control import ControlActionSet, ControlChannel, ControlPlaneService, HttpControlChannel\nfrom plba.contracts import (\n ApplicationModule,\n ConfigProvider,\n HealthContributor,\n TraceContext,\n TraceContextRecord,\n TraceLogMessage,\n TraceTransport,\n Worker,\n WorkerHealth,\n WorkerStatus,\n)\nfrom plba.core import ConfigurationManager, RuntimeManager, ServiceContainer\nfrom plba.health import HealthRegistry\nfrom plba.logging import LogManager\nfrom plba.queue import InMemoryTaskQueue\nfrom plba.tracing import MySqlTraceTransport, NoOpTraceTransport, TraceService\nfrom plba.workflow import (\n StepResult,\n WorkflowContext,\n WorkflowDefinition,\n WorkflowEngine,\n WorkflowEngineHooks,\n WorkflowNode,\n WorkflowRuntimeFactory,\n WorkflowStep,\n)\nfrom plba.workers import WorkerSupervisor\n\n__all__ = [\n \"ApplicationModule\",\n \"ConfigFileLoader\",\n \"ConfigProvider\",\n \"ConfigurationManager\",\n \"ControlActionSet\",\n \"ControlChannel\",\n \"ControlPlaneService\",\n \"create_runtime\",\n \"FileConfigProvider\",\n \"HealthContributor\",\n \"HealthRegistry\",\n \"HttpControlChannel\",\n \"InMemoryTaskQueue\",\n \"LogManager\",\n \"MySqlTraceTransport\",\n \"NoOpTraceTransport\",\n \"RuntimeManager\",\n \"ServiceContainer\",\n \"TraceContext\",\n \"TraceContextRecord\",\n \"TraceLogMessage\",\n \"TraceService\",\n \"TraceTransport\",\n \"StepResult\",\n \"Worker\",\n \"WorkerHealth\",\n \"WorkerStatus\",\n \"WorkflowContext\",\n \"WorkflowDefinition\",\n \"WorkflowEngine\",\n \"WorkflowEngineHooks\",\n \"WorkflowNode\",\n \"WorkflowRuntimeFactory\",\n \"WorkflowStep\",\n \"WorkerSupervisor\",\n]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/__init__.py:1-69", + "span_start": 1, + "span_end": 69, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "1. src/plba/__init__.py\n2. Файл содержит импорт различных модулей и классов из разных пакетов проекта. Также определён список __all__, содержащий имена экспортируемых элементов.\n3. Top-level сущности и секции:\n - Импорты (модулей и классов).\n - Список __all__.\n4. В этом файле определены импорты основных компонентов системы управления рабочими процессами, конфигурацией, контролем и отслеживанием выполнения задач. Список __all__ указывает на основные экспортируемые элементы модуля, которые могут быть важны при использовании этого модуля в других частях приложения.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "unknown", + "symbol_candidates": [], + "keyword_hints": [], + "path_hints": [ + "src/plba/__init__.py" + ], + "path_scope": [ + "src/plba/__init__.py" + ], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/plba/__init__.py" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": false, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C0_SOURCE_CHUNKS": 200 + }, + "filters_by_layer": { + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src/plba/__init__.py" + ], + "include_globs": [], + "exclude_globs": [], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Открой файл src/plba/__init__.py", + "path_scope": [ + "src/plba/__init__.py" + ], + "include_globs": [], + "exclude_globs": [], + "prefer_globs": [], + "top_k": 200, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src/plba/__init__.py" + ], + "normalized_include_globs": [], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [] + }, + "layers": [ + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 20, + "retrieval_by_layer": { + "C0_SOURCE_CHUNKS": 20 + }, + "merge_rank": 0, + "prompt_build": 0, + "llm_call": 1040 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 589, + "evidence_rows": 1, + "evidence_chars": 1768 + }, + "evidence_summary": [ + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_open_file_ru_v2", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [], + "path_scope": [ + "src/plba/__init__.py" + ] + }, + "llm": { + "used_evidence_count": 1, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-v2-open-file-public-api", + "mode": "full_chain", + "run_started_at": "2026-03-12T12:55:37", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Открой файл src/plba/__init__.py", + "normalized_query": "Открой файл src/plba/__init__.py" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Открой файл src/plba/__init__.py" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Открой файл src/plba/__init__.py" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "unknown", + "symbol_candidates": [], + "keyword_hints": [], + "path_hints": [ + "src/plba/__init__.py" + ], + "path_scope": [ + "src/plba/__init__.py" + ], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/plba/__init__.py" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": false, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Открой файл src/plba/__init__.py" + }, + "output": { + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [], + "confidence": 0.0 + }, + "rag_count": 1, + "rag_rows": [ + { + "path": "src/plba/__init__.py", + "content": "from plba.bootstrap import create_runtime\nfrom plba.config import ConfigFileLoader, FileConfigProvider\nfrom plba.control import ControlActionSet, ControlChannel, ControlPlaneService, HttpControlChannel\nfrom plba.contracts import (\n ApplicationModule,\n ConfigProvider,\n HealthContributor,\n TraceContext,\n TraceContextRecord,\n TraceLogMessage,\n TraceTransport,\n Worker,\n WorkerHealth,\n WorkerStatus,\n)\nfrom plba.core import ConfigurationManager, RuntimeManager, ServiceContainer\nfrom plba.health import HealthRegistry\nfrom plba.logging import LogManager\nfrom plba.queue import InMemoryTaskQueue\nfrom plba.tracing import MySqlTraceTransport, NoOpTraceTransport, TraceService\nfrom plba.workflow import (\n StepResult,\n WorkflowContext,\n WorkflowDefinition,\n WorkflowEngine,\n WorkflowEngineHooks,\n WorkflowNode,\n WorkflowRuntimeFactory,\n WorkflowStep,\n)\nfrom plba.workers import WorkerSupervisor\n\n__all__ = [\n \"ApplicationModule\",\n \"ConfigFileLoader\",\n \"ConfigProvider\",\n \"ConfigurationManager\",\n \"ControlActionSet\",\n \"ControlChannel\",\n \"ControlPlaneService\",\n \"create_runtime\",\n \"FileConfigProvider\",\n \"HealthContributor\",\n \"HealthRegistry\",\n \"HttpControlChannel\",\n \"InMemoryTaskQueue\",\n \"LogManager\",\n \"MySqlTraceTransport\",\n \"NoOpTraceTransport\",\n \"RuntimeManager\",\n \"ServiceContainer\",\n \"TraceContext\",\n \"TraceContextRecord\",\n \"TraceLogMessage\",\n \"TraceService\",\n \"TraceTransport\",\n \"StepResult\",\n \"Worker\",\n \"WorkerHealth\",\n \"WorkerStatus\",\n \"WorkflowContext\",\n \"WorkflowDefinition\",\n \"WorkflowEngine\",\n \"WorkflowEngineHooks\",\n \"WorkflowNode\",\n \"WorkflowRuntimeFactory\",\n \"WorkflowStep\",\n \"WorkerSupervisor\",\n]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/__init__.py:1-69", + "span_start": 1, + "span_end": 69, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C0_SOURCE_CHUNKS": 200 + }, + "filters_by_layer": { + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src/plba/__init__.py" + ], + "include_globs": [], + "exclude_globs": [], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Открой файл src/plba/__init__.py", + "path_scope": [ + "src/plba/__init__.py" + ], + "include_globs": [], + "exclude_globs": [], + "prefer_globs": [], + "top_k": 200, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src/plba/__init__.py" + ], + "normalized_include_globs": [], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [] + }, + "layers": [ + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 20, + "retrieval_by_layer": { + "C0_SOURCE_CHUNKS": 20 + }, + "merge_rank": 0 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Открой файл src/plba/__init__.py", + "rag_count": 1 + }, + "output": { + "llm_answer": "1. src/plba/__init__.py\n2. Файл содержит импорт различных модулей и классов из разных пакетов проекта. Также определён список __all__, содержащий имена экспортируемых элементов.\n3. Top-level сущности и секции:\n - Импорты (модулей и классов).\n - Список __all__.\n4. В этом файле определены импорты основных компонентов системы управления рабочими процессами, конфигурацией, контролем и отслеживанием выполнения задач. Список __all__ указывает на основные экспортируемые элементы модуля, которые могут быть важны при использовании этого модуля в других частях приложения." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 589, + "evidence_rows": 1, + "evidence_chars": 1768 + }, + "evidence_summary": [ + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_open_file_ru_v2", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 1040 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-open-file-public-api.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-open-file-public-api.md new file mode 100644 index 0000000..3ba3092 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-open-file-public-api.md @@ -0,0 +1,30 @@ +# plba-v2-open-file-public-api + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Открой файл src/plba/__init__.py + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 1, + "llm_answer": "1. src/plba/__init__.py\n2. Файл содержит импорт различных модулей и классов из разных пакетов проекта. Также определён список __all__, содержащий имена экспортируемых элементов.\n3. Top-level сущности и секции:\n - Импорты (модулей и классов).\n - Список __all__.\n4. В этом файле определены импорты основных компонентов системы управления рабочими процессами, конфигурацией, контролем и отслеживанием выполнения задач. Список __all__ указывает на основные экспортируемые элементы модуля, которые могут быть важны при использовании этого модуля в других частях приложения.", + "answer_mode": "answered", + "path_scope": [ + "src/plba/__init__.py" + ], + "symbol_candidates": [], + "layers": [ + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-open-file-runtime.json b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-open-file-runtime.json new file mode 100644 index 0000000..aac42d5 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-open-file-runtime.json @@ -0,0 +1,492 @@ +{ + "case_id": "plba-v2-open-file-runtime", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 1, + "llm_answer": "1. путь к файлу: src/app_runtime/core/runtime.py\n2. В доступных фрагментах видна реализация класса RuntimeManager.\n3. Top-level сущности и секции: класс RuntimeManager с методом __init__, методом _register_core_services и частично реализованным методом register_module.\n4. Важные элементы для вопроса пользователя:\n- Константы ACTION_TIMEOUT_SECONDS и ACTION_POLL_INTERVAL_SECONDS.\n- Инициализация различных служб (ConfigurationManager, ServiceContainer, TraceService и др.) через конструктор класса.\n- Метод _register_core_services, вероятно, отвечает за регистрацию основных сервисов. \n\nОтвет основан только на доступных фрагментах. Полный контекст файла может содержать дополнительную информацию.", + "answer_mode": "answered", + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "symbol_candidates": [], + "layers": [ + "C0_SOURCE_CHUNKS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-v2-open-file-runtime", + "text": "Открой файл src/app_runtime/core/runtime.py", + "mode": "full_chain", + "run_started_at": "2026-03-12T12:55:37", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Открой файл src/app_runtime/core/runtime.py", + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [], + "confidence": 0.0 + }, + "rag_count": 1, + "rag_rows": [ + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "1. путь к файлу: src/app_runtime/core/runtime.py\n2. В доступных фрагментах видна реализация класса RuntimeManager.\n3. Top-level сущности и секции: класс RuntimeManager с методом __init__, методом _register_core_services и частично реализованным методом register_module.\n4. Важные элементы для вопроса пользователя:\n- Константы ACTION_TIMEOUT_SECONDS и ACTION_POLL_INTERVAL_SECONDS.\n- Инициализация различных служб (ConfigurationManager, ServiceContainer, TraceService и др.) через конструктор класса.\n- Метод _register_core_services, вероятно, отвечает за регистрацию основных сервисов. \n\nОтвет основан только на доступных фрагментах. Полный контекст файла может содержать дополнительную информацию.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "unknown", + "symbol_candidates": [], + "keyword_hints": [], + "path_hints": [ + "src/app_runtime/core/runtime.py" + ], + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/app_runtime/core/runtime.py" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": false, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C0_SOURCE_CHUNKS": 200 + }, + "filters_by_layer": { + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "include_globs": [], + "exclude_globs": [], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Открой файл src/app_runtime/core/runtime.py", + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "include_globs": [], + "exclude_globs": [], + "prefer_globs": [], + "top_k": 200, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "normalized_include_globs": [], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [] + }, + "layers": [ + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 1, + "symbol_resolution": 0, + "retrieval_total": 127, + "retrieval_by_layer": { + "C0_SOURCE_CHUNKS": 127 + }, + "merge_rank": 0, + "prompt_build": 0, + "llm_call": 1212 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 600, + "evidence_rows": 1, + "evidence_chars": 6265 + }, + "evidence_summary": [ + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_open_file_ru_v2", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [], + "path_scope": [ + "src/app_runtime/core/runtime.py" + ] + }, + "llm": { + "used_evidence_count": 1, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-v2-open-file-runtime", + "mode": "full_chain", + "run_started_at": "2026-03-12T12:55:37", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Открой файл src/app_runtime/core/runtime.py", + "normalized_query": "Открой файл src/app_runtime/core/runtime.py" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Открой файл src/app_runtime/core/runtime.py" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Открой файл src/app_runtime/core/runtime.py" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "unknown", + "symbol_candidates": [], + "keyword_hints": [], + "path_hints": [ + "src/app_runtime/core/runtime.py" + ], + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/app_runtime/core/runtime.py" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": false, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 1 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Открой файл src/app_runtime/core/runtime.py" + }, + "output": { + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [], + "confidence": 0.0 + }, + "rag_count": 1, + "rag_rows": [ + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C0_SOURCE_CHUNKS": 200 + }, + "filters_by_layer": { + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "include_globs": [], + "exclude_globs": [], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Открой файл src/app_runtime/core/runtime.py", + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "include_globs": [], + "exclude_globs": [], + "prefer_globs": [], + "top_k": 200, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "normalized_include_globs": [], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [] + }, + "layers": [ + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 127, + "retrieval_by_layer": { + "C0_SOURCE_CHUNKS": 127 + }, + "merge_rank": 0 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Открой файл src/app_runtime/core/runtime.py", + "rag_count": 1 + }, + "output": { + "llm_answer": "1. путь к файлу: src/app_runtime/core/runtime.py\n2. В доступных фрагментах видна реализация класса RuntimeManager.\n3. Top-level сущности и секции: класс RuntimeManager с методом __init__, методом _register_core_services и частично реализованным методом register_module.\n4. Важные элементы для вопроса пользователя:\n- Константы ACTION_TIMEOUT_SECONDS и ACTION_POLL_INTERVAL_SECONDS.\n- Инициализация различных служб (ConfigurationManager, ServiceContainer, TraceService и др.) через конструктор класса.\n- Метод _register_core_services, вероятно, отвечает за регистрацию основных сервисов. \n\nОтвет основан только на доступных фрагментах. Полный контекст файла может содержать дополнительную информацию." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 600, + "evidence_rows": 1, + "evidence_chars": 6265 + }, + "evidence_summary": [ + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_open_file_ru_v2", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 1212 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-open-file-runtime.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-open-file-runtime.md new file mode 100644 index 0000000..2e20d89 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-open-file-runtime.md @@ -0,0 +1,30 @@ +# plba-v2-open-file-runtime + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Открой файл src/app_runtime/core/runtime.py + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 1, + "llm_answer": "1. путь к файлу: src/app_runtime/core/runtime.py\n2. В доступных фрагментах видна реализация класса RuntimeManager.\n3. Top-level сущности и секции: класс RuntimeManager с методом __init__, методом _register_core_services и частично реализованным методом register_module.\n4. Важные элементы для вопроса пользователя:\n- Константы ACTION_TIMEOUT_SECONDS и ACTION_POLL_INTERVAL_SECONDS.\n- Инициализация различных служб (ConfigurationManager, ServiceContainer, TraceService и др.) через конструктор класса.\n- Метод _register_core_services, вероятно, отвечает за регистрацию основных сервисов. \n\nОтвет основан только на доступных фрагментах. Полный контекст файла может содержать дополнительную информацию.", + "answer_mode": "answered", + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "symbol_candidates": [], + "layers": [ + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-health-endpoint.json b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-health-endpoint.json new file mode 100644 index 0000000..dd71e3a --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-health-endpoint.json @@ -0,0 +1,2306 @@ +{ + "case_id": "plba-v2-trace-flow-health-endpoint", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 15, + "llm_answer": "1. Что это и где определено.\nСущность `HttpControlAppFactory` определена в файле `src/app_runtime/control/http_app.py`.\n\n2. Назначение по наблюдаемому коду.\nПо предоставленному контексту видно, что `HttpControlAppFactory` является фабрикой для создания экземпляра класса `FastAPI`. В частности, он отвечает за создание конечных точек `/health` и `/actions/{action}`, а также применяет middleware для логирования времени выполнения запросов.\n\n3. Подтверждённые зависимости или взаимодействия.\nЗависит от двух провайдеров: \n- `health_provider`: предоставляет данные о состоянии системы (`HealthPayload`), которые затем используются при обработке запроса `/health`.\n- `action_provider`: предоставляет асинхронную функцию для выполнения действий на основе переданного действия (например, \"start\" или \"stop\").\n\n4. Что делает по шагам, если это видно в контексте.\n- Создаёт экземпляр `FastAPI` с названием \"PLBA Control API\".\n- Добавляет middleware для логирования времени выполнения HTTP-запросов.\n- Обрабатывает запрос `/health`, вызывая функцию `health_provider` и возвращая JSON-ответ с соответствующим статусом.\n- Обрабатывает запросы `/actions/{action}` и `/actions/{action} POST`, выполняя действие через `action_provider` и регистрируя предупреждение в журнале.\n\n5. Осторожные выводы.\nНа данный момент отсутствуют явные признаки проблем или потенциальных рисков использования данной сущности. Однако для более глубокого понимания её работы может потребоваться анализ дополнительных компонентов и их взаимодействий.\n\n6. Чего не хватает для полного объяснения.\nДля полной уверенности в понимании работы данного класса необходимо рассмотреть следующие аспекты:\n- Реализацию функций `health_provider` и `action_provider`, чтобы понять детали того, какие действия выполняются внутри них.\n- Логику журнала регистрации предупреждений, особенно когда инициируется контрольное действие (\"Control action requested\"). \n- Потенциально связанные классы и функции, такие как `ControlActionSet`, упомянутые в C1_SYMBOL_CATALOG, но не описанные явно в данном контексте.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "health", + "HttpControlAppFactory" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": false, + "mismatches": [ + "sub_intent: expected TRACE_FLOW, got EXPLAIN" + ], + "details": { + "case_id": "plba-v2-trace-flow-health-endpoint", + "text": "Покажи поток запроса /health в HttpControlAppFactory", + "mode": "full_chain", + "run_started_at": "2026-03-12T12:55:37", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Покажи поток запроса /health в HttpControlAppFactory", + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "HttpControlAppFactory", + "alternatives": [ + "HttpControlAppFactory", + "ControlActionSet", + "HealthContributor.health", + "HealthContributor" + ], + "confidence": 0.99 + }, + "rag_count": 15, + "rag_rows": [ + { + "path": "src/app_runtime/control/http_app.py", + "content": "class HttpControlAppFactory\nHttpControlAppFactory", + "layer": "C1_SYMBOL_CATALOG", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "qname": "HttpControlAppFactory", + "kind": "class", + "signature": "HttpControlAppFactory", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlActionSet\nControlActionSet", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "qname": "ControlActionSet", + "kind": "class", + "signature": "ControlActionSet", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/health.py", + "content": "method HealthContributor.health\nhealth(self)\nReturn contributor health state.", + "layer": "C1_SYMBOL_CATALOG", + "title": "HealthContributor.health", + "span_start": 9, + "span_end": 10, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "728cff18958d8a25e2661a0f08c83d68c3bbbfa8cef212b85dc0da2b11b3dc90", + "qname": "HealthContributor.health", + "kind": "method", + "signature": "health(self)", + "parent_symbol_id": "HealthContributor", + "package_or_module": "src.app_runtime.contracts.health", + "is_test": false, + "blob_sha": "6bd92611def7131e32d4dd34a8ed85e6cf3c67722ad27797032a632cb30dc097", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/health.py", + "content": "class HealthContributor\nHealthContributor(ABC)", + "layer": "C1_SYMBOL_CATALOG", + "title": "HealthContributor", + "span_start": 7, + "span_end": 10, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "db91ae387b89a2e9d83829754f27fa18a4055b3e72d7f31789a0b8e0bf5bba0b", + "qname": "HealthContributor", + "kind": "class", + "signature": "HealthContributor(ABC)", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.contracts.health", + "is_test": false, + "blob_sha": "6bd92611def7131e32d4dd34a8ed85e6cf3c67722ad27797032a632cb30dc097", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/health/registry.py", + "content": "HealthRegistry.__init__\n -> HealthRegistry._contributors\n -> HealthRegistry.register", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HealthRegistry.__init__:dataflow_slice", + "span_start": 10, + "span_end": 13, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "2381dfb339d541367c3251d2a610cac9d8b3f6bd6a352e119d00a93c5ccc2b7d", + "edge_type": "dataflow_slice", + "src_symbol_id": "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "src_qname": "HealthRegistry.__init__", + "dst_symbol_id": "a9e1f290c346c8bb1d67af0cafeebb5bcaf29c3ed7027e33c794532743df38f2", + "dst_ref": "HealthRegistry.register", + "resolution": "resolved", + "slice_id": "2381dfb339d541367c3251d2a610cac9d8b3f6bd6a352e119d00a93c5ccc2b7d", + "root_symbol_id": "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "path_symbols": [ + "HealthRegistry.__init__", + "HealthRegistry._contributors", + "HealthRegistry.register" + ], + "path_symbol_ids": [ + "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "a9e1f290c346c8bb1d67af0cafeebb5bcaf29c3ed7027e33c794532743df38f2" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "26e6a24daa43407ba5340b74497c20153020e79f8d7828ae502aaec378dfcf75", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "class HttpControlAppFactory:\n def create(\n self,\n health_provider: Callable[[], Awaitable[HealthPayload]],\n action_provider: Callable[[str, str], Awaitable[JSONResponse]],\n ) -> FastAPI:\n app = FastAPI(title=\"PLBA Control API\")\n\n @app.middleware(\"http\")\n async def log_api_call(request: Request, call_next): # type: ignore[no-untyped-def]\n started = time.monotonic()\n response = await call_next(request)\n response.headers[\"X-Response-Time-Ms\"] = str(int((time.monotonic() - started) * 1000))\n return response\n\n @app.get(\"/health\")\n async def health() -> JSONResponse:\n payload = await health_provider()\n status_code = 200 if payload.get(\"status\") == \"ok\" else 503\n return JSONResponse(content=payload, status_code=status_code)\n\n @app.get(\"/actions/{action}\")\n @app.post(\"/actions/{action}\")\n async def action(action: str, request: Request) -> JSONResponse:\n client_source = self._client_source(request)\n if action in {\"start\", \"stop\"}:\n LOGGER.warning(\"Control action requested: /actions/%s client=%s\", action, client_source)\n return await action_provider(action, client_source)\n\n return app\n\n def _client_source(self, request: Request) -> str:\n explicit_header = request.headers.get(\"X-Client-Source\", \"\").strip()\n if explicit_header:\n return explicit_header\n user_agent = request.headers.get(\"User-Agent\", \"\").strip()\n if user_agent:\n return f\"user-agent:{user_agent}\"\n return \"unknown\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_app.py:HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "1. Что это и где определено.\nСущность `HttpControlAppFactory` определена в файле `src/app_runtime/control/http_app.py`.\n\n2. Назначение по наблюдаемому коду.\nПо предоставленному контексту видно, что `HttpControlAppFactory` является фабрикой для создания экземпляра класса `FastAPI`. В частности, он отвечает за создание конечных точек `/health` и `/actions/{action}`, а также применяет middleware для логирования времени выполнения запросов.\n\n3. Подтверждённые зависимости или взаимодействия.\nЗависит от двух провайдеров: \n- `health_provider`: предоставляет данные о состоянии системы (`HealthPayload`), которые затем используются при обработке запроса `/health`.\n- `action_provider`: предоставляет асинхронную функцию для выполнения действий на основе переданного действия (например, \"start\" или \"stop\").\n\n4. Что делает по шагам, если это видно в контексте.\n- Создаёт экземпляр `FastAPI` с названием \"PLBA Control API\".\n- Добавляет middleware для логирования времени выполнения HTTP-запросов.\n- Обрабатывает запрос `/health`, вызывая функцию `health_provider` и возвращая JSON-ответ с соответствующим статусом.\n- Обрабатывает запросы `/actions/{action}` и `/actions/{action} POST`, выполняя действие через `action_provider` и регистрируя предупреждение в журнале.\n\n5. Осторожные выводы.\nНа данный момент отсутствуют явные признаки проблем или потенциальных рисков использования данной сущности. Однако для более глубокого понимания её работы может потребоваться анализ дополнительных компонентов и их взаимодействий.\n\n6. Чего не хватает для полного объяснения.\nДля полной уверенности в понимании работы данного класса необходимо рассмотреть следующие аспекты:\n- Реализацию функций `health_provider` и `action_provider`, чтобы понять детали того, какие действия выполняются внутри них.\n- Логику журнала регистрации предупреждений, особенно когда инициируется контрольное действие (\"Control action requested\"). \n- Потенциально связанные классы и функции, такие как `ControlActionSet`, упомянутые в C1_SYMBOL_CATALOG, но не описанные явно в данном контексте.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS", + "C4_SEMANTIC_ROLES" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "unknown", + "symbol_candidates": [ + "health", + "HttpControlAppFactory" + ], + "keyword_hints": [ + "health", + "HttpControlAppFactory" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "health HttpControlAppFactory", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "health HttpControlAppFactory", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "health HttpControlAppFactory", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "health HttpControlAppFactory", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "health HttpControlAppFactory", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 4, + "candidates_after_filter": 4 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "HttpControlAppFactory", + "alternatives": [ + "HttpControlAppFactory", + "ControlActionSet", + "HealthContributor.health", + "HealthContributor" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 4, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 124, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 35, + "C0_SOURCE_CHUNKS": 14, + "C4_SEMANTIC_ROLES": 12, + "C2_DEPENDENCY_GRAPH": 52, + "C3_ENTRYPOINTS": 10 + }, + "merge_rank": 33, + "prompt_build": 0, + "llm_call": 3151 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 820, + "evidence_rows": 15, + "evidence_chars": 2588 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 4, + "unique_paths": 3 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 2 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_explain_ru_v2", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "health", + "HttpControlAppFactory" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 15, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-v2-trace-flow-health-endpoint", + "mode": "full_chain", + "run_started_at": "2026-03-12T12:55:37", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Покажи поток запроса /health в HttpControlAppFactory", + "normalized_query": "Покажи поток запроса /health в HttpControlAppFactory" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Покажи поток запроса /health в HttpControlAppFactory" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Покажи поток запроса /health в HttpControlAppFactory" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "unknown", + "symbol_candidates": [ + "health", + "HttpControlAppFactory" + ], + "keyword_hints": [ + "health", + "HttpControlAppFactory" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Покажи поток запроса /health в HttpControlAppFactory" + }, + "output": { + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "HttpControlAppFactory", + "alternatives": [ + "HttpControlAppFactory", + "ControlActionSet", + "HealthContributor.health", + "HealthContributor" + ], + "confidence": 0.99 + }, + "rag_count": 15, + "rag_rows": [ + { + "path": "src/app_runtime/control/http_app.py", + "content": "class HttpControlAppFactory\nHttpControlAppFactory", + "layer": "C1_SYMBOL_CATALOG", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "qname": "HttpControlAppFactory", + "kind": "class", + "signature": "HttpControlAppFactory", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlActionSet\nControlActionSet", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "qname": "ControlActionSet", + "kind": "class", + "signature": "ControlActionSet", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/health.py", + "content": "method HealthContributor.health\nhealth(self)\nReturn contributor health state.", + "layer": "C1_SYMBOL_CATALOG", + "title": "HealthContributor.health", + "span_start": 9, + "span_end": 10, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "728cff18958d8a25e2661a0f08c83d68c3bbbfa8cef212b85dc0da2b11b3dc90", + "qname": "HealthContributor.health", + "kind": "method", + "signature": "health(self)", + "parent_symbol_id": "HealthContributor", + "package_or_module": "src.app_runtime.contracts.health", + "is_test": false, + "blob_sha": "6bd92611def7131e32d4dd34a8ed85e6cf3c67722ad27797032a632cb30dc097", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/health.py", + "content": "class HealthContributor\nHealthContributor(ABC)", + "layer": "C1_SYMBOL_CATALOG", + "title": "HealthContributor", + "span_start": 7, + "span_end": 10, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "db91ae387b89a2e9d83829754f27fa18a4055b3e72d7f31789a0b8e0bf5bba0b", + "qname": "HealthContributor", + "kind": "class", + "signature": "HealthContributor(ABC)", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.contracts.health", + "is_test": false, + "blob_sha": "6bd92611def7131e32d4dd34a8ed85e6cf3c67722ad27797032a632cb30dc097", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/health/registry.py", + "content": "HealthRegistry.__init__\n -> HealthRegistry._contributors\n -> HealthRegistry.register", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HealthRegistry.__init__:dataflow_slice", + "span_start": 10, + "span_end": 13, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "2381dfb339d541367c3251d2a610cac9d8b3f6bd6a352e119d00a93c5ccc2b7d", + "edge_type": "dataflow_slice", + "src_symbol_id": "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "src_qname": "HealthRegistry.__init__", + "dst_symbol_id": "a9e1f290c346c8bb1d67af0cafeebb5bcaf29c3ed7027e33c794532743df38f2", + "dst_ref": "HealthRegistry.register", + "resolution": "resolved", + "slice_id": "2381dfb339d541367c3251d2a610cac9d8b3f6bd6a352e119d00a93c5ccc2b7d", + "root_symbol_id": "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "path_symbols": [ + "HealthRegistry.__init__", + "HealthRegistry._contributors", + "HealthRegistry.register" + ], + "path_symbol_ids": [ + "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "a9e1f290c346c8bb1d67af0cafeebb5bcaf29c3ed7027e33c794532743df38f2" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "26e6a24daa43407ba5340b74497c20153020e79f8d7828ae502aaec378dfcf75", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "class HttpControlAppFactory:\n def create(\n self,\n health_provider: Callable[[], Awaitable[HealthPayload]],\n action_provider: Callable[[str, str], Awaitable[JSONResponse]],\n ) -> FastAPI:\n app = FastAPI(title=\"PLBA Control API\")\n\n @app.middleware(\"http\")\n async def log_api_call(request: Request, call_next): # type: ignore[no-untyped-def]\n started = time.monotonic()\n response = await call_next(request)\n response.headers[\"X-Response-Time-Ms\"] = str(int((time.monotonic() - started) * 1000))\n return response\n\n @app.get(\"/health\")\n async def health() -> JSONResponse:\n payload = await health_provider()\n status_code = 200 if payload.get(\"status\") == \"ok\" else 503\n return JSONResponse(content=payload, status_code=status_code)\n\n @app.get(\"/actions/{action}\")\n @app.post(\"/actions/{action}\")\n async def action(action: str, request: Request) -> JSONResponse:\n client_source = self._client_source(request)\n if action in {\"start\", \"stop\"}:\n LOGGER.warning(\"Control action requested: /actions/%s client=%s\", action, client_source)\n return await action_provider(action, client_source)\n\n return app\n\n def _client_source(self, request: Request) -> str:\n explicit_header = request.headers.get(\"X-Client-Source\", \"\").strip()\n if explicit_header:\n return explicit_header\n user_agent = request.headers.get(\"User-Agent\", \"\").strip()\n if user_agent:\n return f\"user-agent:{user_agent}\"\n return \"unknown\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_app.py:HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "health HttpControlAppFactory", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "health HttpControlAppFactory", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "health HttpControlAppFactory", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "health HttpControlAppFactory", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "health HttpControlAppFactory", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 4, + "candidates_after_filter": 4 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "HttpControlAppFactory", + "alternatives": [ + "HttpControlAppFactory", + "ControlActionSet", + "HealthContributor.health", + "HealthContributor" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 4, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 124, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 35, + "C0_SOURCE_CHUNKS": 14, + "C4_SEMANTIC_ROLES": 12, + "C2_DEPENDENCY_GRAPH": 52, + "C3_ENTRYPOINTS": 10 + }, + "merge_rank": 33 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Покажи поток запроса /health в HttpControlAppFactory", + "rag_count": 15 + }, + "output": { + "llm_answer": "1. Что это и где определено.\nСущность `HttpControlAppFactory` определена в файле `src/app_runtime/control/http_app.py`.\n\n2. Назначение по наблюдаемому коду.\nПо предоставленному контексту видно, что `HttpControlAppFactory` является фабрикой для создания экземпляра класса `FastAPI`. В частности, он отвечает за создание конечных точек `/health` и `/actions/{action}`, а также применяет middleware для логирования времени выполнения запросов.\n\n3. Подтверждённые зависимости или взаимодействия.\nЗависит от двух провайдеров: \n- `health_provider`: предоставляет данные о состоянии системы (`HealthPayload`), которые затем используются при обработке запроса `/health`.\n- `action_provider`: предоставляет асинхронную функцию для выполнения действий на основе переданного действия (например, \"start\" или \"stop\").\n\n4. Что делает по шагам, если это видно в контексте.\n- Создаёт экземпляр `FastAPI` с названием \"PLBA Control API\".\n- Добавляет middleware для логирования времени выполнения HTTP-запросов.\n- Обрабатывает запрос `/health`, вызывая функцию `health_provider` и возвращая JSON-ответ с соответствующим статусом.\n- Обрабатывает запросы `/actions/{action}` и `/actions/{action} POST`, выполняя действие через `action_provider` и регистрируя предупреждение в журнале.\n\n5. Осторожные выводы.\nНа данный момент отсутствуют явные признаки проблем или потенциальных рисков использования данной сущности. Однако для более глубокого понимания её работы может потребоваться анализ дополнительных компонентов и их взаимодействий.\n\n6. Чего не хватает для полного объяснения.\nДля полной уверенности в понимании работы данного класса необходимо рассмотреть следующие аспекты:\n- Реализацию функций `health_provider` и `action_provider`, чтобы понять детали того, какие действия выполняются внутри них.\n- Логику журнала регистрации предупреждений, особенно когда инициируется контрольное действие (\"Control action requested\"). \n- Потенциально связанные классы и функции, такие как `ControlActionSet`, упомянутые в C1_SYMBOL_CATALOG, но не описанные явно в данном контексте." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 820, + "evidence_rows": 15, + "evidence_chars": 2588 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 4, + "unique_paths": 3 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 2 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_explain_ru_v2", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 3151 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-health-endpoint.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-health-endpoint.md new file mode 100644 index 0000000..a6e9ece --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-health-endpoint.md @@ -0,0 +1,35 @@ +# plba-v2-trace-flow-health-endpoint + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: runtime +- mode: full_chain +- passed: False + +## Query +Покажи поток запроса /health в HttpControlAppFactory + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 15, + "llm_answer": "1. Что это и где определено.\nСущность `HttpControlAppFactory` определена в файле `src/app_runtime/control/http_app.py`.\n\n2. Назначение по наблюдаемому коду.\nПо предоставленному контексту видно, что `HttpControlAppFactory` является фабрикой для создания экземпляра класса `FastAPI`. В частности, он отвечает за создание конечных точек `/health` и `/actions/{action}`, а также применяет middleware для логирования времени выполнения запросов.\n\n3. Подтверждённые зависимости или взаимодействия.\nЗависит от двух провайдеров: \n- `health_provider`: предоставляет данные о состоянии системы (`HealthPayload`), которые затем используются при обработке запроса `/health`.\n- `action_provider`: предоставляет асинхронную функцию для выполнения действий на основе переданного действия (например, \"start\" или \"stop\").\n\n4. Что делает по шагам, если это видно в контексте.\n- Создаёт экземпляр `FastAPI` с названием \"PLBA Control API\".\n- Добавляет middleware для логирования времени выполнения HTTP-запросов.\n- Обрабатывает запрос `/health`, вызывая функцию `health_provider` и возвращая JSON-ответ с соответствующим статусом.\n- Обрабатывает запросы `/actions/{action}` и `/actions/{action} POST`, выполняя действие через `action_provider` и регистрируя предупреждение в журнале.\n\n5. Осторожные выводы.\nНа данный момент отсутствуют явные признаки проблем или потенциальных рисков использования данной сущности. Однако для более глубокого понимания её работы может потребоваться анализ дополнительных компонентов и их взаимодействий.\n\n6. Чего не хватает для полного объяснения.\nДля полной уверенности в понимании работы данного класса необходимо рассмотреть следующие аспекты:\n- Реализацию функций `health_provider` и `action_provider`, чтобы понять детали того, какие действия выполняются внутри них.\n- Логику журнала регистрации предупреждений, особенно когда инициируется контрольное действие (\"Control action requested\"). \n- Потенциально связанные классы и функции, такие как `ControlActionSet`, упомянутые в C1_SYMBOL_CATALOG, но не описанные явно в данном контексте.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "health", + "HttpControlAppFactory" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] +} + +## Mismatches +- sub_intent: expected TRACE_FLOW, got EXPLAIN \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-runtime-start.json b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-runtime-start.json new file mode 100644 index 0000000..87ce4c5 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-runtime-start.json @@ -0,0 +1,1219 @@ +{ + "case_id": "plba-v2-trace-flow-runtime-start", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 9, + "llm_answer": "Подтверждённые точки входа:\nsrc/app_runtime/control/http_app.py | fastapi http app.get\n- Объявлена как точка входа через декоратор fastapi http app.get\n\nsrc/app_runtime/control/http_app.py | fastapi http app.post\n- Объявлена как точка входа через декоратор fastapi http app.post\n\nВозможные кандидаты:\nsrc/app_runtime/control/http_channel.py | HttpControlChannel.start\n- Признак: метод класса с вызовом старта runner'а (_runner.start(app)), но сам запуск не виден явно извне.\n\nsrc/app_runtime/control/http_channel.py | HttpControlChannel.__init__\n- Признак: инициализация объекта, которая может быть точкой входа при использовании паттерна singleton, но признаков явного вызова нет.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ] + }, + "passed": false, + "mismatches": [ + "sub_intent: expected TRACE_FLOW, got FIND_ENTRYPOINTS", + "layers should include 'C2_DEPENDENCY_GRAPH', got ['C3_ENTRYPOINTS', 'C0_SOURCE_CHUNKS']" + ], + "details": { + "case_id": "plba-v2-trace-flow-runtime-start", + "text": "Покажи поток запуска RuntimeManager", + "mode": "full_chain", + "run_started_at": "2026-03-12T12:55:37", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Покажи поток запуска RuntimeManager", + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "RuntimeManager" + ], + "confidence": 0.0 + }, + "rag_count": 9, + "rag_rows": [ + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel(ControlChannel):\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._timeout = timeout\n self._runner = UvicornThreadRunner(host, port, timeout)\n self._factory = HttpControlAppFactory()\n self._actions: ControlActionSet | None = None\n\n async def start(self, actions: ControlActionSet) -> None:\n self._actions = actions\n app = self._factory.create(self._health_response, self._action_response)\n await self._runner.start(app)\n\n async def stop(self) -> None:\n await self._runner.stop()\n\n @property\n def port(self) -> int:\n return self._runner.port\n\n async def _health_response(self) -> dict[str, object]:\n if self._actions is None:\n return {\"status\": \"unhealthy\", \"detail\": \"control actions are not configured\"}\n return await asyncio.wait_for(self._actions.health(), timeout=float(self._timeout))\n\n async def _action_response(self, action: str, _client_source: str = \"unknown\") -> JSONResponse:\n if self._actions is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"{action} handler is not configured\"}, status_code=404)\n callbacks = {\n \"start\": self._actions.start,\n \"stop\": self._actions.stop,\n \"status\": self._actions.status,\n }\n callback = callbacks.get(action)\n if callback is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"unsupported action: {action}\"}, status_code=404)\n action_timeout = max(float(self._timeout), 10.0) if action in {\"start\", \"stop\"} else float(self._timeout)\n try:\n detail = await asyncio.wait_for(callback(), timeout=action_timeout)\n except asyncio.TimeoutError:\n return JSONResponse(\n content={\"status\": \"accepted\", \"detail\": f\"{action} operation is still in progress\"},\n status_code=202,\n )\n except Exception as exc:\n return JSONResponse(content={\"status\": \"error\", \"detail\": str(exc)}, status_code=500)\n return JSONResponse(content={\"status\": \"ok\", \"detail\": detail or f\"{action} action accepted\"}, status_code=200)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_channel.py:HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "class HttpControlAppFactory:\n def create(\n self,\n health_provider: Callable[[], Awaitable[HealthPayload]],\n action_provider: Callable[[str, str], Awaitable[JSONResponse]],\n ) -> FastAPI:\n app = FastAPI(title=\"PLBA Control API\")\n\n @app.middleware(\"http\")\n async def log_api_call(request: Request, call_next): # type: ignore[no-untyped-def]\n started = time.monotonic()\n response = await call_next(request)\n response.headers[\"X-Response-Time-Ms\"] = str(int((time.monotonic() - started) * 1000))\n return response\n\n @app.get(\"/health\")\n async def health() -> JSONResponse:\n payload = await health_provider()\n status_code = 200 if payload.get(\"status\") == \"ok\" else 503\n return JSONResponse(content=payload, status_code=status_code)\n\n @app.get(\"/actions/{action}\")\n @app.post(\"/actions/{action}\")\n async def action(action: str, request: Request) -> JSONResponse:\n client_source = self._client_source(request)\n if action in {\"start\", \"stop\"}:\n LOGGER.warning(\"Control action requested: /actions/%s client=%s\", action, client_source)\n return await action_provider(action, client_source)\n\n return app\n\n def _client_source(self, request: Request) -> str:\n explicit_header = request.headers.get(\"X-Client-Source\", \"\").strip()\n if explicit_header:\n return explicit_header\n user_agent = request.headers.get(\"User-Agent\", \"\").strip()\n if user_agent:\n return f\"user-agent:{user_agent}\"\n return \"unknown\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_app.py:HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlActionSet:\n health: HealthHandler\n start: ActionHandler\n stop: ActionHandler\n status: ActionHandler", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\"ControlActionSet\", \"ControlChannel\", \"ControlPlaneService\", \"HttpControlChannel\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/__init__.py:1-5", + "span_start": 1, + "span_end": 5, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlChannel(ABC):\n @abstractmethod\n async def start(self, actions: ControlActionSet) -> None:\n \"\"\"Start the control channel and bind handlers.\"\"\"\n\n @abstractmethod\n async def stop(self) -> None:\n \"\"\"Stop the control channel and release resources.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "class UvicornThreadRunner:\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._host = host\n self._port = port\n self._timeout = timeout\n self._server: Server | None = None\n self._thread: Thread | None = None\n self._error: BaseException | None = None\n\n async def start(self, app: FastAPI) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._error = None\n config = Config(app=app, host=self._host, port=self._port, log_level=\"warning\")\n self._server = Server(config)\n self._thread = Thread(target=self._serve, name=\"plba-http-control\", daemon=True)\n self._thread.start()\n await self._wait_until_started()\n\n async def stop(self) -> None:\n if self._server is None or self._thread is None:\n return\n self._server.should_exit = True\n await asyncio.to_thread(self._thread.join, self._timeout)\n self._server = None\n self._thread = None\n\n @property\n def port(self) -> int:\n if self._server is None or not getattr(self._server, \"servers\", None):\n return self._port\n socket = self._server.servers[0].sockets[0]\n return int(socket.getsockname()[1])\n\n async def _wait_until_started(self) -> None:\n if self._server is None:\n raise RuntimeError(\"Server is not initialized\")\n deadline = asyncio.get_running_loop().time() + max(float(self._timeout), 1.0)\n while not self._server.started:\n if self._error is not None:\n raise RuntimeError(\"HTTP control server failed to start\") from self._error\n if asyncio.get_running_loop().time() >= deadline:\n raise TimeoutError(\"HTTP control server startup timed out\")\n await asyncio.sleep(0.05)\n\n def _serve(self) -> None:\n if self._server is None:\n return\n try:\n asyncio.run(self._server.serve())\n except BaseException as exc: # noqa: BLE001\n self._error = exc", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_runner.py:UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_runner", + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "Подтверждённые точки входа:\nsrc/app_runtime/control/http_app.py | fastapi http app.get\n- Объявлена как точка входа через декоратор fastapi http app.get\n\nsrc/app_runtime/control/http_app.py | fastapi http app.post\n- Объявлена как точка входа через декоратор fastapi http app.post\n\nВозможные кандидаты:\nsrc/app_runtime/control/http_channel.py | HttpControlChannel.start\n- Признак: метод класса с вызовом старта runner'а (_runner.start(app)), но сам запуск не виден явно извне.\n\nsrc/app_runtime/control/http_channel.py | HttpControlChannel.__init__\n- Признак: инициализация объекта, которая может быть точкой входа при использовании паттерна singleton, но признаков явного вызова нет.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C3_ENTRYPOINTS" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C3_ENTRYPOINTS": "exact_path_fetch", + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C3_ENTRYPOINTS": 12, + "C0_SOURCE_CHUNKS": 6 + }, + "filters_by_layer": { + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C3_ENTRYPOINTS", + "query": "Покажи поток запуска RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 12, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Покажи поток запуска RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "RuntimeManager" + ] + }, + "layers": [ + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 6, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 48, + "retrieval_by_layer": { + "C3_ENTRYPOINTS": 24, + "C0_SOURCE_CHUNKS": 23 + }, + "merge_rank": 0, + "prompt_build": 0, + "llm_call": 1397 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 1094, + "evidence_rows": 9, + "evidence_chars": 6731 + }, + "evidence_summary": [ + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 6, + "unique_paths": 5 + } + ], + "prompt_template_id": "intent_code_qa_find_entrypoints_ru_v2", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "RuntimeManager" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 9, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-v2-trace-flow-runtime-start", + "mode": "full_chain", + "run_started_at": "2026-03-12T12:55:37", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Покажи поток запуска RuntimeManager", + "normalized_query": "Покажи поток запуска RuntimeManager" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Покажи поток запуска RuntimeManager" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Покажи поток запуска RuntimeManager" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Покажи поток запуска RuntimeManager" + }, + "output": { + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "RuntimeManager" + ], + "confidence": 0.0 + }, + "rag_count": 9, + "rag_rows": [ + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel(ControlChannel):\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._timeout = timeout\n self._runner = UvicornThreadRunner(host, port, timeout)\n self._factory = HttpControlAppFactory()\n self._actions: ControlActionSet | None = None\n\n async def start(self, actions: ControlActionSet) -> None:\n self._actions = actions\n app = self._factory.create(self._health_response, self._action_response)\n await self._runner.start(app)\n\n async def stop(self) -> None:\n await self._runner.stop()\n\n @property\n def port(self) -> int:\n return self._runner.port\n\n async def _health_response(self) -> dict[str, object]:\n if self._actions is None:\n return {\"status\": \"unhealthy\", \"detail\": \"control actions are not configured\"}\n return await asyncio.wait_for(self._actions.health(), timeout=float(self._timeout))\n\n async def _action_response(self, action: str, _client_source: str = \"unknown\") -> JSONResponse:\n if self._actions is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"{action} handler is not configured\"}, status_code=404)\n callbacks = {\n \"start\": self._actions.start,\n \"stop\": self._actions.stop,\n \"status\": self._actions.status,\n }\n callback = callbacks.get(action)\n if callback is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"unsupported action: {action}\"}, status_code=404)\n action_timeout = max(float(self._timeout), 10.0) if action in {\"start\", \"stop\"} else float(self._timeout)\n try:\n detail = await asyncio.wait_for(callback(), timeout=action_timeout)\n except asyncio.TimeoutError:\n return JSONResponse(\n content={\"status\": \"accepted\", \"detail\": f\"{action} operation is still in progress\"},\n status_code=202,\n )\n except Exception as exc:\n return JSONResponse(content={\"status\": \"error\", \"detail\": str(exc)}, status_code=500)\n return JSONResponse(content={\"status\": \"ok\", \"detail\": detail or f\"{action} action accepted\"}, status_code=200)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_channel.py:HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "class HttpControlAppFactory:\n def create(\n self,\n health_provider: Callable[[], Awaitable[HealthPayload]],\n action_provider: Callable[[str, str], Awaitable[JSONResponse]],\n ) -> FastAPI:\n app = FastAPI(title=\"PLBA Control API\")\n\n @app.middleware(\"http\")\n async def log_api_call(request: Request, call_next): # type: ignore[no-untyped-def]\n started = time.monotonic()\n response = await call_next(request)\n response.headers[\"X-Response-Time-Ms\"] = str(int((time.monotonic() - started) * 1000))\n return response\n\n @app.get(\"/health\")\n async def health() -> JSONResponse:\n payload = await health_provider()\n status_code = 200 if payload.get(\"status\") == \"ok\" else 503\n return JSONResponse(content=payload, status_code=status_code)\n\n @app.get(\"/actions/{action}\")\n @app.post(\"/actions/{action}\")\n async def action(action: str, request: Request) -> JSONResponse:\n client_source = self._client_source(request)\n if action in {\"start\", \"stop\"}:\n LOGGER.warning(\"Control action requested: /actions/%s client=%s\", action, client_source)\n return await action_provider(action, client_source)\n\n return app\n\n def _client_source(self, request: Request) -> str:\n explicit_header = request.headers.get(\"X-Client-Source\", \"\").strip()\n if explicit_header:\n return explicit_header\n user_agent = request.headers.get(\"User-Agent\", \"\").strip()\n if user_agent:\n return f\"user-agent:{user_agent}\"\n return \"unknown\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_app.py:HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlActionSet:\n health: HealthHandler\n start: ActionHandler\n stop: ActionHandler\n status: ActionHandler", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\"ControlActionSet\", \"ControlChannel\", \"ControlPlaneService\", \"HttpControlChannel\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/__init__.py:1-5", + "span_start": 1, + "span_end": 5, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlChannel(ABC):\n @abstractmethod\n async def start(self, actions: ControlActionSet) -> None:\n \"\"\"Start the control channel and bind handlers.\"\"\"\n\n @abstractmethod\n async def stop(self) -> None:\n \"\"\"Stop the control channel and release resources.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "class UvicornThreadRunner:\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._host = host\n self._port = port\n self._timeout = timeout\n self._server: Server | None = None\n self._thread: Thread | None = None\n self._error: BaseException | None = None\n\n async def start(self, app: FastAPI) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._error = None\n config = Config(app=app, host=self._host, port=self._port, log_level=\"warning\")\n self._server = Server(config)\n self._thread = Thread(target=self._serve, name=\"plba-http-control\", daemon=True)\n self._thread.start()\n await self._wait_until_started()\n\n async def stop(self) -> None:\n if self._server is None or self._thread is None:\n return\n self._server.should_exit = True\n await asyncio.to_thread(self._thread.join, self._timeout)\n self._server = None\n self._thread = None\n\n @property\n def port(self) -> int:\n if self._server is None or not getattr(self._server, \"servers\", None):\n return self._port\n socket = self._server.servers[0].sockets[0]\n return int(socket.getsockname()[1])\n\n async def _wait_until_started(self) -> None:\n if self._server is None:\n raise RuntimeError(\"Server is not initialized\")\n deadline = asyncio.get_running_loop().time() + max(float(self._timeout), 1.0)\n while not self._server.started:\n if self._error is not None:\n raise RuntimeError(\"HTTP control server failed to start\") from self._error\n if asyncio.get_running_loop().time() >= deadline:\n raise TimeoutError(\"HTTP control server startup timed out\")\n await asyncio.sleep(0.05)\n\n def _serve(self) -> None:\n if self._server is None:\n return\n try:\n asyncio.run(self._server.serve())\n except BaseException as exc: # noqa: BLE001\n self._error = exc", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_runner.py:UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_runner", + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C3_ENTRYPOINTS": "exact_path_fetch", + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C3_ENTRYPOINTS": 12, + "C0_SOURCE_CHUNKS": 6 + }, + "filters_by_layer": { + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C3_ENTRYPOINTS", + "query": "Покажи поток запуска RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 12, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Покажи поток запуска RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "RuntimeManager" + ] + }, + "layers": [ + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 6, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 48, + "retrieval_by_layer": { + "C3_ENTRYPOINTS": 24, + "C0_SOURCE_CHUNKS": 23 + }, + "merge_rank": 0 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Покажи поток запуска RuntimeManager", + "rag_count": 9 + }, + "output": { + "llm_answer": "Подтверждённые точки входа:\nsrc/app_runtime/control/http_app.py | fastapi http app.get\n- Объявлена как точка входа через декоратор fastapi http app.get\n\nsrc/app_runtime/control/http_app.py | fastapi http app.post\n- Объявлена как точка входа через декоратор fastapi http app.post\n\nВозможные кандидаты:\nsrc/app_runtime/control/http_channel.py | HttpControlChannel.start\n- Признак: метод класса с вызовом старта runner'а (_runner.start(app)), но сам запуск не виден явно извне.\n\nsrc/app_runtime/control/http_channel.py | HttpControlChannel.__init__\n- Признак: инициализация объекта, которая может быть точкой входа при использовании паттерна singleton, но признаков явного вызова нет." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 1094, + "evidence_rows": 9, + "evidence_chars": 6731 + }, + "evidence_summary": [ + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 6, + "unique_paths": 5 + } + ], + "prompt_template_id": "intent_code_qa_find_entrypoints_ru_v2", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 1397 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-runtime-start.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-runtime-start.md new file mode 100644 index 0000000..68a3fb0 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-runtime-start.md @@ -0,0 +1,32 @@ +# plba-v2-trace-flow-runtime-start + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: runtime +- mode: full_chain +- passed: False + +## Query +Покажи поток запуска RuntimeManager + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 9, + "llm_answer": "Подтверждённые точки входа:\nsrc/app_runtime/control/http_app.py | fastapi http app.get\n- Объявлена как точка входа через декоратор fastapi http app.get\n\nsrc/app_runtime/control/http_app.py | fastapi http app.post\n- Объявлена как точка входа через декоратор fastapi http app.post\n\nВозможные кандидаты:\nsrc/app_runtime/control/http_channel.py | HttpControlChannel.start\n- Признак: метод класса с вызовом старта runner'а (_runner.start(app)), но сам запуск не виден явно извне.\n\nsrc/app_runtime/control/http_channel.py | HttpControlChannel.__init__\n- Признак: инициализация объекта, которая может быть точкой входа при использовании паттерна singleton, но признаков явного вызова нет.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- sub_intent: expected TRACE_FLOW, got FIND_ENTRYPOINTS +- layers should include 'C2_DEPENDENCY_GRAPH', got ['C3_ENTRYPOINTS', 'C0_SOURCE_CHUNKS'] \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/summary.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/summary.md new file mode 100644 index 0000000..4582926 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_125536/summary.md @@ -0,0 +1,86 @@ +# pipeline_setup_v2 summary + +Passed: 14/18 + +| File | Case | Query | Expected sub-intent | Intent | Actual sub-intent | RAG layers | Pass | +|------|------|-------|---------------------|--------|-------------------|------------|------| +| full_chain_plba_code_subintents_v2.yaml | plba-v2-open-file-runtime | Открой файл src/app_runtime/core/runtime.py | OPEN_FILE | CODE_QA | OPEN_FILE | C0_SOURCE_CHUNKS:1 | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-open-file-public-api | Открой файл src/plba/__init__.py | OPEN_FILE | CODE_QA | OPEN_FILE | C0_SOURCE_CHUNKS:1 | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-explain-runtime-manager | Объясни как работает класс RuntimeManager | EXPLAIN | CODE_QA | EXPLAIN | C0_SOURCE_CHUNKS:1, C1_SYMBOL_CATALOG:1, C2_DEPENDENCY_GRAPH:6, C3_ENTRYPOINTS:3, C4_SEMANTIC_ROLES:1 | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-explain-trace-service | Объясни как работает класс TraceService | EXPLAIN | CODE_QA | EXPLAIN | C0_SOURCE_CHUNKS:3, C1_SYMBOL_CATALOG:1, C2_DEPENDENCY_GRAPH:6, C3_ENTRYPOINTS:3, C4_SEMANTIC_ROLES:1 | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-explain-create-runtime | Что делает функция create_runtime? | EXPLAIN | CODE_QA | EXPLAIN | C0_SOURCE_CHUNKS:1, C1_SYMBOL_CATALOG:1, C2_DEPENDENCY_GRAPH:6, C3_ENTRYPOINTS:3, C4_SEMANTIC_ROLES:1 | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-explain-local-http-channel | Почему в файле src/app_runtime/control/http_channel.py класс HttpControlChannel устроен так? | EXPLAIN_LOCAL | CODE_QA | EXPLAIN_LOCAL | C0_SOURCE_CHUNKS:1, C1_SYMBOL_CATALOG:1, C2_DEPENDENCY_GRAPH:4 | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-find-tests-runtime-manager | Где тесты для RuntimeManager? | FIND_TESTS | CODE_QA | FIND_TESTS | C0_SOURCE_CHUNKS:10, C2_DEPENDENCY_GRAPH:6 | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-find-tests-trace-service | Где тесты для TraceService? | FIND_TESTS | CODE_QA | FIND_TESTS | C0_SOURCE_CHUNKS:10, C2_DEPENDENCY_GRAPH:6 | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-find-tests-create-runtime | Где тесты для create_runtime? | FIND_TESTS | CODE_QA | FIND_TESTS | C0_SOURCE_CHUNKS:10, C2_DEPENDENCY_GRAPH:6 | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-find-tests-workflow-runtime-factory-negative | Где тесты для WorkflowRuntimeFactory? | FIND_TESTS | CODE_QA | FIND_TESTS | C0_SOURCE_CHUNKS:10, C2_DEPENDENCY_GRAPH:6 | ✗ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-find-entrypoints-control-plane | Найди точки входа HTTP control plane | FIND_ENTRYPOINTS | CODE_QA | FIND_ENTRYPOINTS | C0_SOURCE_CHUNKS:6, C3_ENTRYPOINTS:3 | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-find-entrypoints-health-endpoint | Где health endpoint? | FIND_ENTRYPOINTS | CODE_QA | EXPLAIN | — | ✗ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-trace-flow-runtime-start | Покажи поток запуска RuntimeManager | TRACE_FLOW | CODE_QA | FIND_ENTRYPOINTS | C0_SOURCE_CHUNKS:6, C3_ENTRYPOINTS:3 | ✗ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-trace-flow-health-endpoint | Покажи поток запроса /health в HttpControlAppFactory | TRACE_FLOW | CODE_QA | EXPLAIN | C0_SOURCE_CHUNKS:1, C1_SYMBOL_CATALOG:4, C2_DEPENDENCY_GRAPH:6, C3_ENTRYPOINTS:3, C4_SEMANTIC_ROLES:1 | ✗ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-architecture-runtime-manager | Какие компоненты участвуют в RuntimeManager? | ARCHITECTURE | CODE_QA | ARCHITECTURE | C0_SOURCE_CHUNKS:1, C1_SYMBOL_CATALOG:1, C2_DEPENDENCY_GRAPH:8, C3_ENTRYPOINTS:3, C4_SEMANTIC_ROLES:12 | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-architecture-control-plane | Какие компоненты участвуют в ControlPlaneService? | ARCHITECTURE | CODE_QA | ARCHITECTURE | C0_SOURCE_CHUNKS:1, C1_SYMBOL_CATALOG:1, C2_DEPENDENCY_GRAPH:8, C3_ENTRYPOINTS:3, C4_SEMANTIC_ROLES:12 | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-explain-nonexistent-symbol | Объясни класс RuntimeFactoryManager | EXPLAIN | CODE_QA | EXPLAIN | — | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-open-file-nonexistent | Открой файл src/app_runtime/core/missing_runtime.py | OPEN_FILE | CODE_QA | OPEN_FILE | — | ✓ | + +## Failures +- **plba-v2-find-tests-workflow-runtime-factory-negative**: retrieval: expected empty rag, got 16 rows +- **plba-v2-find-entrypoints-health-endpoint**: sub_intent: expected FIND_ENTRYPOINTS, got EXPLAIN; retrieval: expected non-empty rag, got 0 rows +- **plba-v2-trace-flow-runtime-start**: sub_intent: expected TRACE_FLOW, got FIND_ENTRYPOINTS; layers should include 'C2_DEPENDENCY_GRAPH', got ['C3_ENTRYPOINTS', 'C0_SOURCE_CHUNKS'] +- **plba-v2-trace-flow-health-endpoint**: sub_intent: expected TRACE_FLOW, got EXPLAIN + +## LLM Answers +- **plba-v2-open-file-runtime** + Query: Открой файл src/app_runtime/core/runtime.py + > 1. путь к файлу: src/app\_runtime/core/runtime.py 2. В доступных фрагментах видна реализация класса RuntimeManager. 3. Top\-level сущности и секции: класс RuntimeManager с методом \_\_init\_\_, методом \_register\_core\_services и частично реализованным методом register\_module. 4. Важные элементы для вопроса пользователя: \- Константы ACTION\_TIMEOUT\_SECONDS и ACTION\_POLL\_INTERVAL\_SECONDS. \- Инициализация различных служб \(ConfigurationManager, ServiceContainer, TraceService и др.\) через конструктор класса. \- Метод \_register\_core\_services, вероятно, отвечает за регистрацию основных сервисов. Ответ основан только на доступных фрагментах. Полный контекст файла может содержать дополнительную информацию. +- **plba-v2-open-file-public-api** + Query: Открой файл src/plba/__init__.py + > 1. src/plba/\_\_init\_\_.py 2. Файл содержит импорт различных модулей и классов из разных пакетов проекта. Также определён список \_\_all\_\_, содержащий имена экспортируемых элементов. 3. Top\-level сущности и секции: \- Импорты \(модулей и классов\). \- Список \_\_all\_\_. 4. В этом файле определены импорты основных компонентов системы управления рабочими процессами, конфигурацией, контролем и отслеживанием выполнения задач. Список \_\_all\_\_ указывает на основные экспортируемые элементы модуля, которые могут быть важны при использовании этого модуля в других частях приложения. +- **plba-v2-explain-runtime-manager** + Query: Объясни как работает класс RuntimeManager + > 1. Что это и где определено. Сущность \`RuntimeManager\` определена в файле \`src/app\_runtime/core/runtime.py\`. 2. Назначение по наблюдаемому коду. Из контекста видно, что \`RuntimeManager\` играет роль менеджера, управляющего жизненным циклом приложения и координации различных компонентов системы. Он отвечает за инициализацию и регистрацию сервисов, отслеживание состояния и управление потоками работы. 3. Подтверждённые зависимости или взаимодействия. Класс зависит от следующих классов и объектов: \- \`ConfigurationManager\` \- \`ServiceContainer\` \- \`TraceService\` \- \`HealthRegistry\` \- \`LogManager\` \- \`WorkerSupervisor\` \- \`ControlPlaneService\` \- \`ApplicationModule\` Эти зависимости передаются через конструктор класса при его создании. 4. Что делает по шагам, если это видно в контексте. По имеющемуся контексту видно следующее поведение: \- Инициализация конструктора принимает парам… +- **plba-v2-explain-trace-service** + Query: Объясни как работает класс TraceService + > 1. Что это и где определено. Сущность \`TraceService\` объявлена в файле \`src/app\_runtime/tracing/service.py\`. Это класс\-наследник от \`TraceContextFactory\`. 2. Назначение по наблюдаемому коду. Класс предназначен для работы с трассировкой контекста выполнения приложения. Он создаёт и управляет контекстами трассировки, записывает их в хранилище \(\`store\`\) и отправляет на транспорт \(\`transport\`\), обеспечивая запись логических сообщений и контекстных данных о выполнении программы. 3. Подтверждённые зависимости или взаимодействия. \- Создаёт и записывает записи контекста трассировки через метод \`create\_context\(\)\`, используя хранилище контекста \(\`store\`\) и транспорт \(\`transport\`\). \- Использует контекстный менеджер \`open\_context\(\)\` для открытия временных контекстов. \- Вызывает методы записи контекста и сообщений через экземпляр класса \`TraceRecordWriter\`. 4. Что делает по шагам… +- **plba-v2-explain-create-runtime** + Query: Что делает функция create_runtime? + > 1. \*\*Что это и где определено.\*\* Сущность \`create\_runtime\` определена в файле \`src/plba/bootstrap.py\`. Это функция, принимающая параметры конфигурации и создающая экземпляр класса \`RuntimeManager\`. 2. \*\*Назначение по наблюдаемому коду.\*\* Функция создаёт и инициализирует объект \`RuntimeManager\`, добавляя в него файл конфигурации \(\`config\_path\`\), канал управления HTTP \(\`enable\_http\_control\`\) и регистрируя переданный модуль приложения \(\`module\`\). 3. \*\*Подтверждённые зависимости или взаимодействия.\*\* Функция взаимодействует с экземпляром \`RuntimeManager\` через методы \`add\_config\_file\`, \`register\_channel\` и \`register\_module\`. 4. \*\*Что делает по шагам, если это видно в контексте.\*\* \- Создаёт экземпляр объекта \`RuntimeManager\`. \- Если передан параметр \`config\_path\`, добавляет указанный файл конфигурации в менеджер. \- Если включён режим HTTP\-контроля, регистрирует соответств… +- **plba-v2-explain-local-http-channel** + Query: Почему в файле src/app_runtime/control/http_channel.py класс HttpControlChannel устроен так? + > Класс \`HttpControlChannel\` из файла \`src/app\_runtime/control/http\_channel.py\` реализует HTTP канал управления для взаимодействия с внешним миром через HTTP протокол. \#\#\# Что делает класс: 1. \*\*Инициализация \(\`\_\_init\_\_\`\)\*\*: \- Принимает параметры \`host\`, \`port\` и \`timeout\`. \- Создаёт объект \`UvicornThreadRunner\` \(асинхронный веб\-сервер\), который будет слушать указанный порт. \- Инициализирует фабрику приложений \`HttpControlAppFactory\(\)\` для создания приложения HTTP. \- Сохраняет значение тайм\-аута \(\`\_timeout\`\), но само управление действиями \(\`\_actions\`\) инициализируется как \`None\`. 2. \*\*Запуск \(\`start\`\)\*\*: \- Запускает веб\-сервер с приложением, созданным фабрикой. \- Перед запуском проверяет наличие настроенных действий \(\`\_actions\`\). Если они отсутствуют, возвращает сообщение об ошибке. \- Возвращает результат вызова метода \`\_actions.health\(\)\`, ожидая его до истечения тайм\-… +- **plba-v2-find-tests-runtime-manager** + Query: Где тесты для RuntimeManager? + > 1. Прямые тесты: \- tests/test\_runtime.py \| test\_runtime\_runs\_worker\_routine\_and\_exposes\_status \- tests/test\_runtime.py \| test\_runtime\_graceful\_stop\_waits\_until\_worker\_finishes Проверка: \- Создания и инициализации RuntimeManager. \- Взаимодействия RuntimeManager с worker'ами и обработкой статуса. \- Ожидания завершения работы worker'а при корректном завершении процесса остановки. \- Проверки поведения RuntimeManager в разных состояниях \(busy, stopped\). 2. Косвенные или ближайшие тесты: \- tests/test\_business\_control\_actions.py \| \_build\_runtime \- tests/test\_business\_control\_actions.py \| test\_worker\_wakes\_up\_with\_configured\_interval Эти тесты косвенно затрагивают RuntimeManager через инстанцирование его в других контекстах и использовании его методов, однако непосредственно поведение RuntimeManager не проверяется напрямую. 3. Пробелы покрытия: \- Не найдены явные тесты, кото… +- **plba-v2-find-tests-trace-service** + Query: Где тесты для TraceService? + > 1. Прямые тесты: \- tests/test\_runtime.py \| test\_trace\_service\_writes\_contexts\_and\_messages \- Проверка записи контекстов и сообщений в TraceService. \- tests/test\_runtime.py \| test\_trace\_service\_supports\_debug\_warning\_and\_error\_levels \- Проверка поддержки различных уровней логирования \(debug, warning, error\). 2. Косвенные или ближайшие тесты: \- Нет явных связей с другими тестами через зависимости или имена, однако тесты касаются работы с Transport и записью контекста/сообщений, что близко к функционалу TraceService. 3. Что именно проверяется: \- Запись и корректность данных контекстов и сообщений в TraceService. \- Поддержка различных уровней логирования и запись соответствующих сообщений. 4. Пробелы покрытия: \- Не найдены явные пробелы покрытия для TraceService напрямую. Однако могут быть аспекты поведения, которые не охвачены текущими тестами, например, обработка ошибо… +- **plba-v2-find-tests-create-runtime** + Query: Где тесты для create_runtime? + > 1. Прямые тесты: \- tests/test\_runtime.py \| test\_public\_plba\_package\_exports\_runtime\_builder\_and\_worker\_contract \- Проверка: импорты и вызовы create\_runtime. \- Недостаток покрытия: отсутствие проверки поведения функции \`create\_runtime\`. 2. Косвенные или ближайшие тесты: \- tests/test\_business\_control\_actions.py \| \_build\_runtime \- Проверка: создание экземпляра \`RuntimeManager\` и регистрация канала управления. \- Недостаток покрытия: отсутствует проверка непосредственно создания и работы runtime через функцию \`create\_runtime\`. 3. Что именно проверяется: \- В direct\-тестах проверяются импорты и вызовы функции \`create\_runtime\`, однако поведение самой функции не подтверждено. \- В косвенных тестах проверяется создание объекта \`RuntimeManager\` и его начальная настройка, а также работа каналов управления. 4. Пробелы покрытия: \- Отсутствует прямое тестирование поведения функции \`… +- **plba-v2-find-tests-workflow-runtime-factory-negative** + Query: Где тесты для WorkflowRuntimeFactory? + > Прямых тестов для WorkflowRuntimeFactory в предоставленном контексте не обнаружено. Косвенные или ближайшие тесты: 1. tests/test\_business\_control\_actions.py \| test\_actions\_stop\_busy\_worker\_before\_timeout:dataflow\_slice \- Проверяет поведение \`BlockingRoutine\` и его метод \`\_release\`. 2. tests/test\_business\_control\_actions.py \| test\_actions\_stop\_busy\_worker\_after\_timeout:dataflow\_slice \- Проверяет поведение \`BlockingRoutine\` и его метод \`\_started\`. Что именно проверяется: \- Поведение и методы класса \`BlockingRoutine\`, такие как инициализация, запуск и освобождение \(test\_actions\_stop\_busy\_worker\_before\_timeout\). \- Поведение и методы класса \`ScenarioWorker\`, такие как получение имени \(test\_worker\_wakes\_up\_with\_configured\_interval\). Какие пробелы покрытия видны: \- Нет явных тестов конкретно для \`WorkflowRuntimeFactory\`. \- Покрытие ограничено ближайшими классами и методами,… +- **plba-v2-find-entrypoints-control-plane** + Query: Найди точки входа HTTP control plane + > Подтверждённые точки входа: src/app\_runtime/control/http\_app.py \| fastapi http app.get \- Объявлена декоратором @app.get, что указывает на точку входа для HTTP\-запросов. src/app\_runtime/control/http\_app.py \| fastapi http app.post \- Объявлена декоратором @app.post, что указывает на точку входа для HTTP\-запросов. Возможные кандидаты: src/app\_runtime/control/http\_channel.py \| HttpControlChannel.start \- Метод класса, вызывающий инициализацию FastAPI приложения через фабрику HttpControlAppFactory, однако прямого признака точки входа нет. src/app\_runtime/control/http\_channel.py \| HttpControlChannel.\_health\_response \- Внутренний метод, возвращающий здоровье системы, но явно не указан как точка входа. src/app\_runtime/control/http\_channel.py \| HttpControlChannel.\_action\_response \- Внутренний метод, обрабатывающий запросы к действиям, но явно не указан как точка входа. +- **plba-v2-find-entrypoints-health-endpoint** + Query: Где health endpoint? + > Не удалось найти информацию о health endpoint ни в одном из слоёв RAG. 1. \*\*Что это и где определено\*\*: health endpoint обычно представляет собой конечную точку API, используемую для проверки доступности сервиса или приложения. Его точное местоположение зависит от архитектуры приложения и технологий, используемых для его разработки \(например, Flask, Django Rest Framework и т.д.\). 2. \*\*Назначение по наблюдаемому коду\*\*: отсутствует. 3. \*\*Подтверждённые зависимости или взаимодействия\*\*: отсутствуют. 4. \*\*Что делает по шагам, если это видно в контексте\*\*: не найдено. 5. \*\*Осторожные выводы\*\*: невозможно сделать ввиду отсутствия информации. 6. \*\*Чего не хватает для полного объяснения\*\*: необходимо наличие исходного кода или файла, содержащего определение health endpoint. Без этого нельзя точно определить, где именно он расположен и какие технологии используются. +- **plba-v2-trace-flow-runtime-start** + Query: Покажи поток запуска RuntimeManager + > Подтверждённые точки входа: src/app\_runtime/control/http\_app.py \| fastapi http app.get \- Объявлена как точка входа через декоратор fastapi http app.get src/app\_runtime/control/http\_app.py \| fastapi http app.post \- Объявлена как точка входа через декоратор fastapi http app.post Возможные кандидаты: src/app\_runtime/control/http\_channel.py \| HttpControlChannel.start \- Признак: метод класса с вызовом старта runner'а \(\_runner.start\(app\)\), но сам запуск не виден явно извне. src/app\_runtime/control/http\_channel.py \| HttpControlChannel.\_\_init\_\_ \- Признак: инициализация объекта, которая может быть точкой входа при использовании паттерна singleton, но признаков явного вызова нет. +- **plba-v2-trace-flow-health-endpoint** + Query: Покажи поток запроса /health в HttpControlAppFactory + > 1. Что это и где определено. Сущность \`HttpControlAppFactory\` определена в файле \`src/app\_runtime/control/http\_app.py\`. 2. Назначение по наблюдаемому коду. По предоставленному контексту видно, что \`HttpControlAppFactory\` является фабрикой для создания экземпляра класса \`FastAPI\`. В частности, он отвечает за создание конечных точек \`/health\` и \`/actions/\{action\}\`, а также применяет middleware для логирования времени выполнения запросов. 3. Подтверждённые зависимости или взаимодействия. Зависит от двух провайдеров: \- \`health\_provider\`: предоставляет данные о состоянии системы \(\`HealthPayload\`\), которые затем используются при обработке запроса \`/health\`. \- \`action\_provider\`: предоставляет асинхронную функцию для выполнения действий на основе переданного действия \(например, "start" или "stop"\). 4. Что делает по шагам, если это видно в контексте. \- Создаёт экземпляр \`Fast… +- **plba-v2-architecture-runtime-manager** + Query: Какие компоненты участвуют в RuntimeManager? + > 1. \*\*Компоненты, которые подтверждены контекстом\*\*: \- RuntimeManager \- ControlActionSet \- ControlPlaneService 2. \*\*Подтверждённые связи между ними\*\*: \- RuntimeManager инициирует ControlPlaneService через его метод \`\_\_init\_\_\` \(\`ControlPlaneService.\_\_init\_\_:dataflow\_slice\`\). \- ControlPlaneService используется внутри RuntimeManager для управления данными потока \(\`ControlPlaneService.\_channels\`, \`ControlPlaneService.\_start\_async\`\). 3. \*\*Границы ответственности, если они реально видны в коде\*\*: \- RuntimeManager отвечает за координацию и управление операциями, связанными с состоянием приложения и потоками данных. Он управляет конфигурацией и запуском. \- ControlActionSet выступает в качестве модели, выполняющей стандартные действия или вызовы на основе поступающих запросов. \- ControlPlaneService ответственен за инициализацию каналов и запуск асинхронных операций. 4. \*\*Что о… +- **plba-v2-architecture-control-plane** + Query: Какие компоненты участвуют в ControlPlaneService? + > 1. \*\*Компоненты, которые подтверждены контекстом\*\*: \- ControlPlaneService \- ControlActionSet 2. \*\*Подтверждённые связи между ними\*\*: \- ControlPlaneService зависит от ControlActionSet через регистрацию каналов \(\_channels\): \`\`\` ControlPlaneService.\_\_init\_\_ \-> ControlPlaneService.\_channels \-> ControlPlaneService.register\_channel\(ControlActionSet\) \`\`\` 3. \*\*Границы ответственности, если они реально видны в коде\*\*: \- ControlPlaneService отвечает за инициализацию и управление каналами данных, регистрируя экземпляры ControlActionSet для работы с данными потока. 4. \*\*Что остаётся неизвестным или неполным\*\*: \- Детали реализации метода \`register\_channel\` и его взаимодействия с другими компонентами системы остаются неясными на основании предоставленного контекста. \- Неизвестно точно, какие именно каналы и действия регистрируются и используются внутри \`ControlPlaneService\`. +- **plba-v2-explain-nonexistent-symbol** + Query: Объясни класс RuntimeFactoryManager + > Класс \`RuntimeFactoryManager\` не найден ни в предоставленном контексте, ни в стандартных библиотеках Python. \*\*1. Что это и где определено.\*\* Не удалось обнаружить определение класса \`RuntimeFactoryManager\`. Возможно, он определен в сторонней библиотеке или проекте с закрытым контекстом. \*\*2. Назначение по наблюдаемому коду.\*\* Из\-за отсутствия контекста невозможно точно определить назначение данного класса. Если бы был доступ к кодовой базе, можно было бы проанализировать точку входа \(entrypoint\), методы и поля класса, чтобы понять его предназначение. \*\*3. Подтверждённые зависимости или взаимодействия.\*\* Так как сущность отсутствует, нельзя установить подтверждённые зависимости или взаимодействия. \*\*4. Что делает по шагам, если это видно в контексте.\*\* Шагов выполнения нет, так как сущность неизвестна. \*\*5. Осторожные выводы.\*\* Без реального кода невозможно сделать к… +- **plba-v2-open-file-nonexistent** + Query: Открой файл src/app_runtime/core/missing_runtime.py + > 1. src/app\_runtime/core/missing\_runtime.py 2. Основан только на имени файла и пути, так как сам контент файла недоступен. 3. Top\-level сущности или секции невозможно определить из\-за отсутствия содержимого файла. 4. Так как содержимое файла неизвестно, невозможно сказать, какие части этого файла могут быть важны для интерпретации слоёв RAG. Однако, исходя из названия файла, вероятно, он содержит информацию о работе с отсутствующими или пропущенными компонентами во время выполнения приложения. Это может включать обработку ошибок, логирование или механизмы замены недостающих компонентов. \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-architecture-control-plane.json b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-architecture-control-plane.json new file mode 100644 index 0000000..7053de4 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-architecture-control-plane.json @@ -0,0 +1,2940 @@ +{ + "case_id": "plba-v2-architecture-control-plane", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "ARCHITECTURE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 25, + "llm_answer": "1. **Компоненты, которые подтверждены контекстом**:\n - ControlPlaneService\n - ControlActionSet\n\n2. **Подтверждённые связи между ними**:\n - ControlPlaneService имеет метод `__init__`, который включает инициализацию внутренних каналов (`_channels`) и регистрацию этих каналов через метод `_register_channel`.\n - Контейнер `ControlActionSet` указан как модель с ролью «model», что подразумевает его использование внутри `ControlPlaneService`. Однако конкретные детали взаимодействия между этими двумя компонентами отсутствуют в представленном контексте.\n\n3. **Границы ответственности, если они реально видны в коде**:\n - ControlPlaneService отвечает за управление состоянием и участие в данных срезах (dataflow slices).\n - ControlActionSet является моделью с базовой ролью «model».\n\n4. **Что остаётся неизвестным или неполным**:\n - Детали взаимодействия между ControlPlaneService и ControlActionSet остаются неясными, так как отсутствует информация о конкретных методах и функциях, вызываемых между этими компонентами.\n - Неизвестно, какие именно данные передаются между компонентами и каким образом происходит обмен информацией.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "ControlPlaneService" + ], + "layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-v2-architecture-control-plane", + "text": "Какие компоненты участвуют в ControlPlaneService?", + "mode": "full_chain", + "run_started_at": "2026-03-12T13:23:57", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Какие компоненты участвуют в ControlPlaneService?", + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "ControlPlaneService", + "alternatives": [ + "ControlPlaneService" + ], + "confidence": 0.99 + }, + "rag_count": 25, + "rag_rows": [ + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/queue/in_memory.py", + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)", + "layer": "C4_SEMANTIC_ROLES", + "title": "InMemoryTaskQueue", + "span_start": 9, + "span_end": 38, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 22, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "2da04cb94544a3bcbf0943a95ad4bdd8710bcafaa32a02fd0e4de2178dcf3533", + "symbol_name": "InMemoryTaskQueue", + "qname": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 9, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "58f0cc001ccda0eee4c6bc32ed83bd05eafd6b6644f1e8b4aa9eed3103db73dc", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "ConfigFileLoader\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (8)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ConfigFileLoader", + "span_start": 11, + "span_end": 48, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 23, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "a8474eca8b6e9dc86ae67ed68b16fa5fb639ef08739c053e7b7195489765667f", + "symbol_name": "ConfigFileLoader", + "qname": "ConfigFileLoader", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 8, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/store.py", + "content": "TraceContextStore\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "TraceContextStore", + "span_start": 15, + "span_end": 52, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b2dad4fbe16ffb11b58deba311c7739955c39d59f291b22181f33e9c8cce4059", + "symbol_name": "TraceContextStore", + "qname": "TraceContextStore", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "d369554f08fc92039c6edd5a2a1e73b23901533e8974459170bbd9347d263dc5", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workers/supervisor.py", + "content": "WorkerSupervisor\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkerSupervisor", + "span_start": 10, + "span_end": 59, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "c17b44e8d9e97d490989b21fa67d7c346cdda8a0472e4c41fb243c8846faa124", + "symbol_name": "WorkerSupervisor", + "qname": "WorkerSupervisor", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "77609d9d5927171cce7fc3a54897c183fd63068710c6362029b700937aae5eee", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowEngine", + "span_start": 10, + "span_end": 86, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "57ec0a9f11c542c78e008684a888397e8d9ef4223671acb2567e631a0cbc70b4", + "symbol_name": "WorkflowEngine", + "qname": "WorkflowEngine", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.start calls asyncio.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.start:calls", + "span_start": 22, + "span_end": 22, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "4e0b3147fb867d48d26567570c259f4052a739e3098133802d4b8bafcf03be6b", + "edge_type": "calls", + "src_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "src_qname": "ControlPlaneService.start", + "dst_symbol_id": null, + "dst_ref": "asyncio.run", + "resolution": "partial", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.register_channel reads_attr ControlPlaneService._channels", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.register_channel:reads_attr", + "span_start": 17, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3101fdc99a7a9c5aebf18a024bc148d37b348248a6fd02b95724dff280f2908a", + "edge_type": "reads_attr", + "src_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "src_qname": "ControlPlaneService.register_channel", + "dst_symbol_id": null, + "dst_ref": "ControlPlaneService._channels", + "resolution": "partial", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.start reads_attr ControlPlaneService._channels", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.start:reads_attr", + "span_start": 20, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "9452e50ef27d47c30ee1c311c48fe73ecddbf7a6dbcf967a6345e98222d9f71a", + "edge_type": "reads_attr", + "src_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "src_qname": "ControlPlaneService.start", + "dst_symbol_id": null, + "dst_ref": "ControlPlaneService._channels", + "resolution": "partial", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "class ControlPlaneService\nControlPlaneService", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "qname": "ControlPlaneService", + "kind": "class", + "signature": "ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "class ControlPlaneService:\n def __init__(self) -> None:\n self._channels: list[ControlChannel] = []\n\n def register_channel(self, channel: ControlChannel) -> None:\n self._channels.append(channel)\n\n def start(self, runtime: RuntimeManager) -> None:\n if not self._channels:\n return\n asyncio.run(self._start_async(runtime))\n\n def stop(self) -> None:\n if not self._channels:\n return\n asyncio.run(self._stop_async())\n\n def snapshot(self, runtime: RuntimeManager) -> dict[str, object]:\n health = runtime.current_health()\n return {\n \"runtime\": {\"state\": runtime._state.value},\n \"modules\": list(runtime.registry.modules),\n \"services\": runtime.services.snapshot(),\n \"workers\": runtime.workers.snapshot(),\n \"health\": runtime.health.snapshot(runtime.workers.healths()) | {\"status\": health[\"status\"]},\n \"config\": runtime.configuration.get(),\n }\n\n async def _start_async(self, runtime: RuntimeManager) -> None:\n actions = ControlActionSet(\n health=runtime.health_status,\n start=runtime.start_runtime,\n stop=runtime.stop_runtime,\n status=runtime.runtime_status,\n )\n for channel in self._channels:\n await channel.start(actions)\n\n async def _stop_async(self) -> None:\n for channel in reversed(self._channels):\n await channel.stop()", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/service.py:ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "1. **Компоненты, которые подтверждены контекстом**:\n - ControlPlaneService\n - ControlActionSet\n\n2. **Подтверждённые связи между ними**:\n - ControlPlaneService имеет метод `__init__`, который включает инициализацию внутренних каналов (`_channels`) и регистрацию этих каналов через метод `_register_channel`.\n - Контейнер `ControlActionSet` указан как модель с ролью «model», что подразумевает его использование внутри `ControlPlaneService`. Однако конкретные детали взаимодействия между этими двумя компонентами отсутствуют в представленном контексте.\n\n3. **Границы ответственности, если они реально видны в коде**:\n - ControlPlaneService отвечает за управление состоянием и участие в данных срезах (dataflow slices).\n - ControlActionSet является моделью с базовой ролью «model».\n\n4. **Что остаётся неизвестным или неполным**:\n - Детали взаимодействия между ControlPlaneService и ControlActionSet остаются неясными, так как отсутствует информация о конкретных методах и функциях, вызываемых между этими компонентами.\n - Неизвестно, какие именно данные передаются между компонентами и каким образом происходит обмен информацией.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "ARCHITECTURE", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS", + "C4_SEMANTIC_ROLES" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "ARCHITECTURE", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "ControlPlaneService" + ], + "keyword_hints": [ + "ControlPlaneService" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C4_SEMANTIC_ROLES": 12, + "C3_ENTRYPOINTS": 8, + "C2_DEPENDENCY_GRAPH": 8, + "C1_SYMBOL_CATALOG": 6, + "C0_SOURCE_CHUNKS": 4 + }, + "filters_by_layer": { + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C4_SEMANTIC_ROLES", + "query": "Какие компоненты участвуют в ControlPlaneService?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 12, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "Какие компоненты участвуют в ControlPlaneService?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Какие компоненты участвуют в ControlPlaneService?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C1_SYMBOL_CATALOG", + "query": "ControlPlaneService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Какие компоненты участвуют в ControlPlaneService?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 4, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 12, + "candidates_after_filter": 12 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 4, + "candidates_after_filter": 4 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "ControlPlaneService", + "alternatives": [ + "ControlPlaneService" + ] + }, + "layers": [ + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 12, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 8, + "fail_reason": null + }, + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 137, + "retrieval_by_layer": { + "C4_SEMANTIC_ROLES": 31, + "C3_ENTRYPOINTS": 11, + "C2_DEPENDENCY_GRAPH": 54, + "C1_SYMBOL_CATALOG": 24, + "C0_SOURCE_CHUNKS": 15 + }, + "merge_rank": 20, + "prompt_build": 0, + "llm_call": 1849 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 544, + "evidence_rows": 25, + "evidence_chars": 3723 + }, + "evidence_summary": [ + { + "layer": "C4_SEMANTIC_ROLES", + "count": 12, + "unique_paths": 11 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 8, + "unique_paths": 1 + }, + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_architecture_ru_v2", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "ControlPlaneService" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 25, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-v2-architecture-control-plane", + "mode": "full_chain", + "run_started_at": "2026-03-12T13:23:57", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Какие компоненты участвуют в ControlPlaneService?", + "normalized_query": "Какие компоненты участвуют в ControlPlaneService?" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Какие компоненты участвуют в ControlPlaneService?" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Какие компоненты участвуют в ControlPlaneService?" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "ARCHITECTURE", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "ControlPlaneService" + ], + "keyword_hints": [ + "ControlPlaneService" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Какие компоненты участвуют в ControlPlaneService?" + }, + "output": { + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "ControlPlaneService", + "alternatives": [ + "ControlPlaneService" + ], + "confidence": 0.99 + }, + "rag_count": 25, + "rag_rows": [ + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/queue/in_memory.py", + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)", + "layer": "C4_SEMANTIC_ROLES", + "title": "InMemoryTaskQueue", + "span_start": 9, + "span_end": 38, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 22, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "2da04cb94544a3bcbf0943a95ad4bdd8710bcafaa32a02fd0e4de2178dcf3533", + "symbol_name": "InMemoryTaskQueue", + "qname": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 9, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "58f0cc001ccda0eee4c6bc32ed83bd05eafd6b6644f1e8b4aa9eed3103db73dc", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "ConfigFileLoader\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (8)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ConfigFileLoader", + "span_start": 11, + "span_end": 48, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 23, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "a8474eca8b6e9dc86ae67ed68b16fa5fb639ef08739c053e7b7195489765667f", + "symbol_name": "ConfigFileLoader", + "qname": "ConfigFileLoader", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 8, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/store.py", + "content": "TraceContextStore\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "TraceContextStore", + "span_start": 15, + "span_end": 52, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b2dad4fbe16ffb11b58deba311c7739955c39d59f291b22181f33e9c8cce4059", + "symbol_name": "TraceContextStore", + "qname": "TraceContextStore", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "d369554f08fc92039c6edd5a2a1e73b23901533e8974459170bbd9347d263dc5", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workers/supervisor.py", + "content": "WorkerSupervisor\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkerSupervisor", + "span_start": 10, + "span_end": 59, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "c17b44e8d9e97d490989b21fa67d7c346cdda8a0472e4c41fb243c8846faa124", + "symbol_name": "WorkerSupervisor", + "qname": "WorkerSupervisor", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "77609d9d5927171cce7fc3a54897c183fd63068710c6362029b700937aae5eee", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowEngine", + "span_start": 10, + "span_end": 86, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "57ec0a9f11c542c78e008684a888397e8d9ef4223671acb2567e631a0cbc70b4", + "symbol_name": "WorkflowEngine", + "qname": "WorkflowEngine", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.start calls asyncio.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.start:calls", + "span_start": 22, + "span_end": 22, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "4e0b3147fb867d48d26567570c259f4052a739e3098133802d4b8bafcf03be6b", + "edge_type": "calls", + "src_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "src_qname": "ControlPlaneService.start", + "dst_symbol_id": null, + "dst_ref": "asyncio.run", + "resolution": "partial", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.register_channel reads_attr ControlPlaneService._channels", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.register_channel:reads_attr", + "span_start": 17, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3101fdc99a7a9c5aebf18a024bc148d37b348248a6fd02b95724dff280f2908a", + "edge_type": "reads_attr", + "src_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "src_qname": "ControlPlaneService.register_channel", + "dst_symbol_id": null, + "dst_ref": "ControlPlaneService._channels", + "resolution": "partial", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.start reads_attr ControlPlaneService._channels", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.start:reads_attr", + "span_start": 20, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "9452e50ef27d47c30ee1c311c48fe73ecddbf7a6dbcf967a6345e98222d9f71a", + "edge_type": "reads_attr", + "src_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "src_qname": "ControlPlaneService.start", + "dst_symbol_id": null, + "dst_ref": "ControlPlaneService._channels", + "resolution": "partial", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "class ControlPlaneService\nControlPlaneService", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "qname": "ControlPlaneService", + "kind": "class", + "signature": "ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "class ControlPlaneService:\n def __init__(self) -> None:\n self._channels: list[ControlChannel] = []\n\n def register_channel(self, channel: ControlChannel) -> None:\n self._channels.append(channel)\n\n def start(self, runtime: RuntimeManager) -> None:\n if not self._channels:\n return\n asyncio.run(self._start_async(runtime))\n\n def stop(self) -> None:\n if not self._channels:\n return\n asyncio.run(self._stop_async())\n\n def snapshot(self, runtime: RuntimeManager) -> dict[str, object]:\n health = runtime.current_health()\n return {\n \"runtime\": {\"state\": runtime._state.value},\n \"modules\": list(runtime.registry.modules),\n \"services\": runtime.services.snapshot(),\n \"workers\": runtime.workers.snapshot(),\n \"health\": runtime.health.snapshot(runtime.workers.healths()) | {\"status\": health[\"status\"]},\n \"config\": runtime.configuration.get(),\n }\n\n async def _start_async(self, runtime: RuntimeManager) -> None:\n actions = ControlActionSet(\n health=runtime.health_status,\n start=runtime.start_runtime,\n stop=runtime.stop_runtime,\n status=runtime.runtime_status,\n )\n for channel in self._channels:\n await channel.start(actions)\n\n async def _stop_async(self) -> None:\n for channel in reversed(self._channels):\n await channel.stop()", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/service.py:ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C4_SEMANTIC_ROLES": 12, + "C3_ENTRYPOINTS": 8, + "C2_DEPENDENCY_GRAPH": 8, + "C1_SYMBOL_CATALOG": 6, + "C0_SOURCE_CHUNKS": 4 + }, + "filters_by_layer": { + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C4_SEMANTIC_ROLES", + "query": "Какие компоненты участвуют в ControlPlaneService?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 12, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "Какие компоненты участвуют в ControlPlaneService?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Какие компоненты участвуют в ControlPlaneService?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C1_SYMBOL_CATALOG", + "query": "ControlPlaneService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Какие компоненты участвуют в ControlPlaneService?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 4, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 12, + "candidates_after_filter": 12 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 4, + "candidates_after_filter": 4 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "ControlPlaneService", + "alternatives": [ + "ControlPlaneService" + ] + }, + "layers": [ + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 12, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 8, + "fail_reason": null + }, + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 137, + "retrieval_by_layer": { + "C4_SEMANTIC_ROLES": 31, + "C3_ENTRYPOINTS": 11, + "C2_DEPENDENCY_GRAPH": 54, + "C1_SYMBOL_CATALOG": 24, + "C0_SOURCE_CHUNKS": 15 + }, + "merge_rank": 20 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Какие компоненты участвуют в ControlPlaneService?", + "rag_count": 25 + }, + "output": { + "llm_answer": "1. **Компоненты, которые подтверждены контекстом**:\n - ControlPlaneService\n - ControlActionSet\n\n2. **Подтверждённые связи между ними**:\n - ControlPlaneService имеет метод `__init__`, который включает инициализацию внутренних каналов (`_channels`) и регистрацию этих каналов через метод `_register_channel`.\n - Контейнер `ControlActionSet` указан как модель с ролью «model», что подразумевает его использование внутри `ControlPlaneService`. Однако конкретные детали взаимодействия между этими двумя компонентами отсутствуют в представленном контексте.\n\n3. **Границы ответственности, если они реально видны в коде**:\n - ControlPlaneService отвечает за управление состоянием и участие в данных срезах (dataflow slices).\n - ControlActionSet является моделью с базовой ролью «model».\n\n4. **Что остаётся неизвестным или неполным**:\n - Детали взаимодействия между ControlPlaneService и ControlActionSet остаются неясными, так как отсутствует информация о конкретных методах и функциях, вызываемых между этими компонентами.\n - Неизвестно, какие именно данные передаются между компонентами и каким образом происходит обмен информацией." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 544, + "evidence_rows": 25, + "evidence_chars": 3723 + }, + "evidence_summary": [ + { + "layer": "C4_SEMANTIC_ROLES", + "count": 12, + "unique_paths": 11 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 8, + "unique_paths": 1 + }, + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_architecture_ru_v2", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 1849 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-architecture-control-plane.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-architecture-control-plane.md new file mode 100644 index 0000000..2c68ad7 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-architecture-control-plane.md @@ -0,0 +1,34 @@ +# plba-v2-architecture-control-plane + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Какие компоненты участвуют в ControlPlaneService? + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "ARCHITECTURE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 25, + "llm_answer": "1. **Компоненты, которые подтверждены контекстом**:\n - ControlPlaneService\n - ControlActionSet\n\n2. **Подтверждённые связи между ними**:\n - ControlPlaneService имеет метод `__init__`, который включает инициализацию внутренних каналов (`_channels`) и регистрацию этих каналов через метод `_register_channel`.\n - Контейнер `ControlActionSet` указан как модель с ролью «model», что подразумевает его использование внутри `ControlPlaneService`. Однако конкретные детали взаимодействия между этими двумя компонентами отсутствуют в представленном контексте.\n\n3. **Границы ответственности, если они реально видны в коде**:\n - ControlPlaneService отвечает за управление состоянием и участие в данных срезах (dataflow slices).\n - ControlActionSet является моделью с базовой ролью «model».\n\n4. **Что остаётся неизвестным или неполным**:\n - Детали взаимодействия между ControlPlaneService и ControlActionSet остаются неясными, так как отсутствует информация о конкретных методах и функциях, вызываемых между этими компонентами.\n - Неизвестно, какие именно данные передаются между компонентами и каким образом происходит обмен информацией.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "ControlPlaneService" + ], + "layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-architecture-runtime-manager.json b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-architecture-runtime-manager.json new file mode 100644 index 0000000..f1220d5 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-architecture-runtime-manager.json @@ -0,0 +1,3036 @@ +{ + "case_id": "plba-v2-architecture-runtime-manager", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "ARCHITECTURE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 25, + "llm_answer": "1. **Компоненты, которые подтверждены контекстом**:\n - RuntimeManager\n - ControlActionSet\n - ControlPlaneService\n \n2. **Подтверждённые связи между ними**:\n - RuntimeManager вызывает метод `start` для начала работы.\n - ControlPlaneService инициализирует каналы (`_channels`) и запускает асинхронную обработку (`_start_async`).\n \n3. **Границы ответственности, если они реально видны в коде**:\n - RuntimeManager отвечает за управление жизненным циклом runtime-среды и координирует выполнение различных ролей (название указывает на менеджерскую роль).\n - ControlActionSet выполняет действия модели, являясь стандартным модельным компонентом.\n - ControlPlaneService управляет сервисными каналами и инициирует асинхронные процессы.\n\n4. **Что остаётся неизвестным или неполным**:\n - Детали взаимодействия между конкретными ролями и точная структура обмена данными через каналы в ControlPlaneService.\n - Точный механизм, каким образом RuntimeManager организует и контролирует данные потоки внутри runtime-среды.\n - Полная картина зависимостей и связей между остальными сущностями приложения, которые могут влиять на работу RuntimeManager и его окружения.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-v2-architecture-runtime-manager", + "text": "Какие компоненты участвуют в RuntimeManager?", + "mode": "full_chain", + "run_started_at": "2026-03-12T13:23:57", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Какие компоненты участвуют в RuntimeManager?", + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ], + "confidence": 0.99 + }, + "rag_count": 25, + "rag_rows": [ + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests manager\n- orchestrates role-like calls (4)\n- reads and writes state attributes\n- participates in dataflow slices (50)", + "layer": "C4_SEMANTIC_ROLES", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 43, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "symbol_name": "RuntimeManager", + "qname": "RuntimeManager", + "role": "pipeline_stage", + "confidence": 0.67, + "dataflow_participation": 50, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/queue/in_memory.py", + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)", + "layer": "C4_SEMANTIC_ROLES", + "title": "InMemoryTaskQueue", + "span_start": 9, + "span_end": 38, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 22, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "2da04cb94544a3bcbf0943a95ad4bdd8710bcafaa32a02fd0e4de2178dcf3533", + "symbol_name": "InMemoryTaskQueue", + "qname": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 9, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "58f0cc001ccda0eee4c6bc32ed83bd05eafd6b6644f1e8b4aa9eed3103db73dc", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "ConfigFileLoader\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (8)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ConfigFileLoader", + "span_start": 11, + "span_end": 48, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 23, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "a8474eca8b6e9dc86ae67ed68b16fa5fb639ef08739c053e7b7195489765667f", + "symbol_name": "ConfigFileLoader", + "qname": "ConfigFileLoader", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 8, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/store.py", + "content": "TraceContextStore\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "TraceContextStore", + "span_start": 15, + "span_end": 52, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b2dad4fbe16ffb11b58deba311c7739955c39d59f291b22181f33e9c8cce4059", + "symbol_name": "TraceContextStore", + "qname": "TraceContextStore", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "d369554f08fc92039c6edd5a2a1e73b23901533e8974459170bbd9347d263dc5", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workers/supervisor.py", + "content": "WorkerSupervisor\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkerSupervisor", + "span_start": 10, + "span_end": 59, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "c17b44e8d9e97d490989b21fa67d7c346cdda8a0472e4c41fb243c8846faa124", + "symbol_name": "WorkerSupervisor", + "qname": "WorkerSupervisor", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "77609d9d5927171cce7fc3a54897c183fd63068710c6362029b700937aae5eee", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 59, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1", + "dst_ref": "RuntimeManager.start", + "resolution": "resolved", + "slice_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.start" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 52, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager._register_core_services", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 127, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6", + "dst_ref": "RuntimeManager._register_core_services", + "resolution": "resolved", + "slice_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager._register_core_services" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager\nRuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "qname": "RuntimeManager", + "kind": "class", + "signature": "RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "1. **Компоненты, которые подтверждены контекстом**:\n - RuntimeManager\n - ControlActionSet\n - ControlPlaneService\n \n2. **Подтверждённые связи между ними**:\n - RuntimeManager вызывает метод `start` для начала работы.\n - ControlPlaneService инициализирует каналы (`_channels`) и запускает асинхронную обработку (`_start_async`).\n \n3. **Границы ответственности, если они реально видны в коде**:\n - RuntimeManager отвечает за управление жизненным циклом runtime-среды и координирует выполнение различных ролей (название указывает на менеджерскую роль).\n - ControlActionSet выполняет действия модели, являясь стандартным модельным компонентом.\n - ControlPlaneService управляет сервисными каналами и инициирует асинхронные процессы.\n\n4. **Что остаётся неизвестным или неполным**:\n - Детали взаимодействия между конкретными ролями и точная структура обмена данными через каналы в ControlPlaneService.\n - Точный механизм, каким образом RuntimeManager организует и контролирует данные потоки внутри runtime-среды.\n - Полная картина зависимостей и связей между остальными сущностями приложения, которые могут влиять на работу RuntimeManager и его окружения.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "ARCHITECTURE", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS", + "C4_SEMANTIC_ROLES" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "ARCHITECTURE", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C4_SEMANTIC_ROLES": 12, + "C3_ENTRYPOINTS": 8, + "C2_DEPENDENCY_GRAPH": 8, + "C1_SYMBOL_CATALOG": 6, + "C0_SOURCE_CHUNKS": 4 + }, + "filters_by_layer": { + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C4_SEMANTIC_ROLES", + "query": "Какие компоненты участвуют в RuntimeManager?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 12, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "Какие компоненты участвуют в RuntimeManager?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Какие компоненты участвуют в RuntimeManager?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C1_SYMBOL_CATALOG", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Какие компоненты участвуют в RuntimeManager?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 4, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 12, + "candidates_after_filter": 12 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 4, + "candidates_after_filter": 4 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ] + }, + "layers": [ + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 12, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 8, + "fail_reason": null + }, + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 138, + "retrieval_by_layer": { + "C4_SEMANTIC_ROLES": 26, + "C3_ENTRYPOINTS": 11, + "C2_DEPENDENCY_GRAPH": 56, + "C1_SYMBOL_CATALOG": 24, + "C0_SOURCE_CHUNKS": 18 + }, + "merge_rank": 17, + "prompt_build": 0, + "llm_call": 2117 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 537, + "evidence_rows": 25, + "evidence_chars": 8651 + }, + "evidence_summary": [ + { + "layer": "C4_SEMANTIC_ROLES", + "count": 12, + "unique_paths": 11 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 8, + "unique_paths": 2 + }, + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_architecture_ru_v2", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "RuntimeManager" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 25, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-v2-architecture-runtime-manager", + "mode": "full_chain", + "run_started_at": "2026-03-12T13:23:57", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Какие компоненты участвуют в RuntimeManager?", + "normalized_query": "Какие компоненты участвуют в RuntimeManager?" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Какие компоненты участвуют в RuntimeManager?" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Какие компоненты участвуют в RuntimeManager?" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "ARCHITECTURE", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Какие компоненты участвуют в RuntimeManager?" + }, + "output": { + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ], + "confidence": 0.99 + }, + "rag_count": 25, + "rag_rows": [ + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests manager\n- orchestrates role-like calls (4)\n- reads and writes state attributes\n- participates in dataflow slices (50)", + "layer": "C4_SEMANTIC_ROLES", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 43, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "symbol_name": "RuntimeManager", + "qname": "RuntimeManager", + "role": "pipeline_stage", + "confidence": 0.67, + "dataflow_participation": 50, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/queue/in_memory.py", + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)", + "layer": "C4_SEMANTIC_ROLES", + "title": "InMemoryTaskQueue", + "span_start": 9, + "span_end": 38, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 22, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "2da04cb94544a3bcbf0943a95ad4bdd8710bcafaa32a02fd0e4de2178dcf3533", + "symbol_name": "InMemoryTaskQueue", + "qname": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 9, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "58f0cc001ccda0eee4c6bc32ed83bd05eafd6b6644f1e8b4aa9eed3103db73dc", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "ConfigFileLoader\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (8)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ConfigFileLoader", + "span_start": 11, + "span_end": 48, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 23, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "a8474eca8b6e9dc86ae67ed68b16fa5fb639ef08739c053e7b7195489765667f", + "symbol_name": "ConfigFileLoader", + "qname": "ConfigFileLoader", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 8, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/store.py", + "content": "TraceContextStore\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "TraceContextStore", + "span_start": 15, + "span_end": 52, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b2dad4fbe16ffb11b58deba311c7739955c39d59f291b22181f33e9c8cce4059", + "symbol_name": "TraceContextStore", + "qname": "TraceContextStore", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "d369554f08fc92039c6edd5a2a1e73b23901533e8974459170bbd9347d263dc5", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workers/supervisor.py", + "content": "WorkerSupervisor\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkerSupervisor", + "span_start": 10, + "span_end": 59, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "c17b44e8d9e97d490989b21fa67d7c346cdda8a0472e4c41fb243c8846faa124", + "symbol_name": "WorkerSupervisor", + "qname": "WorkerSupervisor", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "77609d9d5927171cce7fc3a54897c183fd63068710c6362029b700937aae5eee", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 59, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1", + "dst_ref": "RuntimeManager.start", + "resolution": "resolved", + "slice_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.start" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 52, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager._register_core_services", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 127, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6", + "dst_ref": "RuntimeManager._register_core_services", + "resolution": "resolved", + "slice_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager._register_core_services" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager\nRuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "qname": "RuntimeManager", + "kind": "class", + "signature": "RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C4_SEMANTIC_ROLES": 12, + "C3_ENTRYPOINTS": 8, + "C2_DEPENDENCY_GRAPH": 8, + "C1_SYMBOL_CATALOG": 6, + "C0_SOURCE_CHUNKS": 4 + }, + "filters_by_layer": { + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C4_SEMANTIC_ROLES", + "query": "Какие компоненты участвуют в RuntimeManager?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 12, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "Какие компоненты участвуют в RuntimeManager?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Какие компоненты участвуют в RuntimeManager?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C1_SYMBOL_CATALOG", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Какие компоненты участвуют в RuntimeManager?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 4, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 12, + "candidates_after_filter": 12 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 4, + "candidates_after_filter": 4 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ] + }, + "layers": [ + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 12, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 8, + "fail_reason": null + }, + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 138, + "retrieval_by_layer": { + "C4_SEMANTIC_ROLES": 26, + "C3_ENTRYPOINTS": 11, + "C2_DEPENDENCY_GRAPH": 56, + "C1_SYMBOL_CATALOG": 24, + "C0_SOURCE_CHUNKS": 18 + }, + "merge_rank": 17 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Какие компоненты участвуют в RuntimeManager?", + "rag_count": 25 + }, + "output": { + "llm_answer": "1. **Компоненты, которые подтверждены контекстом**:\n - RuntimeManager\n - ControlActionSet\n - ControlPlaneService\n \n2. **Подтверждённые связи между ними**:\n - RuntimeManager вызывает метод `start` для начала работы.\n - ControlPlaneService инициализирует каналы (`_channels`) и запускает асинхронную обработку (`_start_async`).\n \n3. **Границы ответственности, если они реально видны в коде**:\n - RuntimeManager отвечает за управление жизненным циклом runtime-среды и координирует выполнение различных ролей (название указывает на менеджерскую роль).\n - ControlActionSet выполняет действия модели, являясь стандартным модельным компонентом.\n - ControlPlaneService управляет сервисными каналами и инициирует асинхронные процессы.\n\n4. **Что остаётся неизвестным или неполным**:\n - Детали взаимодействия между конкретными ролями и точная структура обмена данными через каналы в ControlPlaneService.\n - Точный механизм, каким образом RuntimeManager организует и контролирует данные потоки внутри runtime-среды.\n - Полная картина зависимостей и связей между остальными сущностями приложения, которые могут влиять на работу RuntimeManager и его окружения." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 537, + "evidence_rows": 25, + "evidence_chars": 8651 + }, + "evidence_summary": [ + { + "layer": "C4_SEMANTIC_ROLES", + "count": 12, + "unique_paths": 11 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 8, + "unique_paths": 2 + }, + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_architecture_ru_v2", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 2117 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-architecture-runtime-manager.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-architecture-runtime-manager.md new file mode 100644 index 0000000..9ab0912 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-architecture-runtime-manager.md @@ -0,0 +1,34 @@ +# plba-v2-architecture-runtime-manager + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Какие компоненты участвуют в RuntimeManager? + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "ARCHITECTURE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 25, + "llm_answer": "1. **Компоненты, которые подтверждены контекстом**:\n - RuntimeManager\n - ControlActionSet\n - ControlPlaneService\n \n2. **Подтверждённые связи между ними**:\n - RuntimeManager вызывает метод `start` для начала работы.\n - ControlPlaneService инициализирует каналы (`_channels`) и запускает асинхронную обработку (`_start_async`).\n \n3. **Границы ответственности, если они реально видны в коде**:\n - RuntimeManager отвечает за управление жизненным циклом runtime-среды и координирует выполнение различных ролей (название указывает на менеджерскую роль).\n - ControlActionSet выполняет действия модели, являясь стандартным модельным компонентом.\n - ControlPlaneService управляет сервисными каналами и инициирует асинхронные процессы.\n\n4. **Что остаётся неизвестным или неполным**:\n - Детали взаимодействия между конкретными ролями и точная структура обмена данными через каналы в ControlPlaneService.\n - Точный механизм, каким образом RuntimeManager организует и контролирует данные потоки внутри runtime-среды.\n - Полная картина зависимостей и связей между остальными сущностями приложения, которые могут влиять на работу RuntimeManager и его окружения.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-explain-create-runtime.json b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-explain-create-runtime.json new file mode 100644 index 0000000..65fb33f --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-explain-create-runtime.json @@ -0,0 +1,1896 @@ +{ + "case_id": "plba-v2-explain-create-runtime", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 12, + "llm_answer": "1. **Что это и где определено.** \nСущность `create_runtime` определена в файле `src/plba/bootstrap.py`. Это функция, принимающая параметры конфигурации и модуля приложения, и возвращающая объект класса `RuntimeManager`.\n\n2. **Назначение по наблюдаемому коду.** \nФункция создаёт и инициализирует экземпляр объекта `RuntimeManager`, добавляя файл конфигурации и модуль приложения в его состояние. Если включено управление через HTTP, она также регистрирует канал управления.\n\n3. **Подтверждённые зависимости или взаимодействия.** \nФункция зависит от объекта `RuntimeManager` и использует метод `add_config_file` для добавления файла конфигурации и метод `register_module` для регистрации модуля приложения. Если включён режим управления через HTTP, используется метод `register_channel` для регистрации канала управления типа `HttpControlChannel`.\n\n4. **Что делает по шагам, если это видно в контексте.** \n- Создаёт новый экземпляр `RuntimeManager`.\n- При наличии переданного пути к конфигурационному файлу добавляет этот файл с помощью метода `add_config_file`.\n- Если включена опция HTTP-контроля, регистрирует HTTP-канал управления с указанными параметрами хоста, порта и тайм-аута.\n- Регистрирует указанный модуль приложения с помощью метода `register_module`.\n- Возвращает созданный экземпляр `RuntimeManager`.\n\n5. **Осторожные выводы.** \nНа основании представленного контекста трудно сделать полные выводы о последствиях вызова функции `create_runtime`. Например, непонятно, какие дополнительные действия происходят при регистрации модуля или что именно содержится в объектах, которые передаются в функцию (`ApplicationModule`, `HttpControlChannel`).\n\n6. **Чего не хватает для полного объяснения.** \nДля более детального понимания работы этой функции необходимы следующие детали:\n - Определение классов `ApplicationModule`, `RuntimeManager`, `HttpControlChannel`.\n - Детали поведения методов `add_config_file`, `register_module`, `register_channel`.\n - Логика и влияние других функций и методов, используемых внутри этих объектов.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "create_runtime" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-v2-explain-create-runtime", + "text": "Что делает функция create_runtime?", + "mode": "full_chain", + "run_started_at": "2026-03-12T13:23:57", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Что делает функция create_runtime?", + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "create_runtime", + "alternatives": [ + "create_runtime" + ], + "confidence": 0.99 + }, + "rag_count": 12, + "rag_rows": [ + { + "path": "src/plba/bootstrap.py", + "content": "function create_runtime\ncreate_runtime(module)", + "layer": "C1_SYMBOL_CATALOG", + "title": "create_runtime", + "span_start": 8, + "span_end": 29, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "qname": "create_runtime", + "kind": "function", + "signature": "create_runtime(module)", + "parent_symbol_id": null, + "package_or_module": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime calls runtime.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:calls", + "span_start": 19, + "span_end": 19, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "4eaeec4ac55a59d5f66fd01c4754955f8fedaf4bc3df13fa769b352c7bfaacbb", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.add_config_file", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime reads_attr runtime.register_module", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:reads_attr", + "span_start": 28, + "span_end": 28, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "45516c79ff358dbf9b650a081668df0f66d2fe989300f985a1a78be6be166f8f", + "edge_type": "reads_attr", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.register_module", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:instantiates", + "span_start": 17, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "0adba17984f850ea1608c9e734d2dd5c325cfde3a8133123aa239e44935ad18e", + "edge_type": "instantiates", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": "27158ca220022eeb5083c6addf8a50775d45f7161284fd60aac48410105f4b98", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime calls runtime.register_module", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:calls", + "span_start": 28, + "span_end": 28, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "ab6003c3441addc1ba1b81edeca009165559f652f6b2cf424e5ae61b1f617de8", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.register_module", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime calls runtime.control_plane.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:calls", + "span_start": 21, + "span_end": 27, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "2678250030b9ce47a3b3b55fac7897ac530367edc8374ac9d5e6ecafb1e483f0", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.control_plane.register_channel", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime reads_attr runtime.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:reads_attr", + "span_start": 19, + "span_end": 19, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "30d4e8aae984ab84d523e80d02f1caeda52d547fa3d2aa47be8845931cabbca2", + "edge_type": "reads_attr", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.add_config_file", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "def create_runtime(\n module: ApplicationModule,\n *,\n config_path: str | None = None,\n enable_http_control: bool = False,\n control_host: str = \"127.0.0.1\",\n control_port: int = 8080,\n control_timeout: int = 5,\n) -> RuntimeManager:\n runtime = RuntimeManager()\n if config_path is not None:\n runtime.add_config_file(config_path)\n if enable_http_control:\n runtime.control_plane.register_channel(\n HttpControlChannel(\n host=control_host,\n port=control_port,\n timeout=control_timeout,\n )\n )\n runtime.register_module(module)\n return runtime", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/bootstrap.py:create_runtime", + "span_start": 8, + "span_end": 29, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "1. **Что это и где определено.** \nСущность `create_runtime` определена в файле `src/plba/bootstrap.py`. Это функция, принимающая параметры конфигурации и модуля приложения, и возвращающая объект класса `RuntimeManager`.\n\n2. **Назначение по наблюдаемому коду.** \nФункция создаёт и инициализирует экземпляр объекта `RuntimeManager`, добавляя файл конфигурации и модуль приложения в его состояние. Если включено управление через HTTP, она также регистрирует канал управления.\n\n3. **Подтверждённые зависимости или взаимодействия.** \nФункция зависит от объекта `RuntimeManager` и использует метод `add_config_file` для добавления файла конфигурации и метод `register_module` для регистрации модуля приложения. Если включён режим управления через HTTP, используется метод `register_channel` для регистрации канала управления типа `HttpControlChannel`.\n\n4. **Что делает по шагам, если это видно в контексте.** \n- Создаёт новый экземпляр `RuntimeManager`.\n- При наличии переданного пути к конфигурационному файлу добавляет этот файл с помощью метода `add_config_file`.\n- Если включена опция HTTP-контроля, регистрирует HTTP-канал управления с указанными параметрами хоста, порта и тайм-аута.\n- Регистрирует указанный модуль приложения с помощью метода `register_module`.\n- Возвращает созданный экземпляр `RuntimeManager`.\n\n5. **Осторожные выводы.** \nНа основании представленного контекста трудно сделать полные выводы о последствиях вызова функции `create_runtime`. Например, непонятно, какие дополнительные действия происходят при регистрации модуля или что именно содержится в объектах, которые передаются в функцию (`ApplicationModule`, `HttpControlChannel`).\n\n6. **Чего не хватает для полного объяснения.** \nДля более детального понимания работы этой функции необходимы следующие детали:\n - Определение классов `ApplicationModule`, `RuntimeManager`, `HttpControlChannel`.\n - Детали поведения методов `add_config_file`, `register_module`, `register_channel`.\n - Логика и влияние других функций и методов, используемых внутри этих объектов.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS", + "C4_SEMANTIC_ROLES" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "function", + "symbol_candidates": [ + "create_runtime" + ], + "keyword_hints": [ + "create_runtime" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "create_runtime", + "alternatives": [ + "create_runtime" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 1, + "symbol_resolution": 0, + "retrieval_total": 137, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 42, + "C0_SOURCE_CHUNKS": 19, + "C4_SEMANTIC_ROLES": 15, + "C2_DEPENDENCY_GRAPH": 47, + "C3_ENTRYPOINTS": 11 + }, + "merge_rank": 19, + "prompt_build": 0, + "llm_call": 3092 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 659, + "evidence_rows": 12, + "evidence_chars": 1184 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 1 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_explain_ru_v2", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "create_runtime" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 12, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-v2-explain-create-runtime", + "mode": "full_chain", + "run_started_at": "2026-03-12T13:23:57", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Что делает функция create_runtime?", + "normalized_query": "Что делает функция create_runtime?" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Что делает функция create_runtime?" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Что делает функция create_runtime?" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "function", + "symbol_candidates": [ + "create_runtime" + ], + "keyword_hints": [ + "create_runtime" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 1 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Что делает функция create_runtime?" + }, + "output": { + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "create_runtime", + "alternatives": [ + "create_runtime" + ], + "confidence": 0.99 + }, + "rag_count": 12, + "rag_rows": [ + { + "path": "src/plba/bootstrap.py", + "content": "function create_runtime\ncreate_runtime(module)", + "layer": "C1_SYMBOL_CATALOG", + "title": "create_runtime", + "span_start": 8, + "span_end": 29, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "qname": "create_runtime", + "kind": "function", + "signature": "create_runtime(module)", + "parent_symbol_id": null, + "package_or_module": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime calls runtime.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:calls", + "span_start": 19, + "span_end": 19, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "4eaeec4ac55a59d5f66fd01c4754955f8fedaf4bc3df13fa769b352c7bfaacbb", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.add_config_file", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime reads_attr runtime.register_module", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:reads_attr", + "span_start": 28, + "span_end": 28, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "45516c79ff358dbf9b650a081668df0f66d2fe989300f985a1a78be6be166f8f", + "edge_type": "reads_attr", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.register_module", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:instantiates", + "span_start": 17, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "0adba17984f850ea1608c9e734d2dd5c325cfde3a8133123aa239e44935ad18e", + "edge_type": "instantiates", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": "27158ca220022eeb5083c6addf8a50775d45f7161284fd60aac48410105f4b98", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime calls runtime.register_module", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:calls", + "span_start": 28, + "span_end": 28, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "ab6003c3441addc1ba1b81edeca009165559f652f6b2cf424e5ae61b1f617de8", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.register_module", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime calls runtime.control_plane.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:calls", + "span_start": 21, + "span_end": 27, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "2678250030b9ce47a3b3b55fac7897ac530367edc8374ac9d5e6ecafb1e483f0", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.control_plane.register_channel", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime reads_attr runtime.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:reads_attr", + "span_start": 19, + "span_end": 19, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "30d4e8aae984ab84d523e80d02f1caeda52d547fa3d2aa47be8845931cabbca2", + "edge_type": "reads_attr", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.add_config_file", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "def create_runtime(\n module: ApplicationModule,\n *,\n config_path: str | None = None,\n enable_http_control: bool = False,\n control_host: str = \"127.0.0.1\",\n control_port: int = 8080,\n control_timeout: int = 5,\n) -> RuntimeManager:\n runtime = RuntimeManager()\n if config_path is not None:\n runtime.add_config_file(config_path)\n if enable_http_control:\n runtime.control_plane.register_channel(\n HttpControlChannel(\n host=control_host,\n port=control_port,\n timeout=control_timeout,\n )\n )\n runtime.register_module(module)\n return runtime", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/bootstrap.py:create_runtime", + "span_start": 8, + "span_end": 29, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "create_runtime", + "alternatives": [ + "create_runtime" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 137, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 42, + "C0_SOURCE_CHUNKS": 19, + "C4_SEMANTIC_ROLES": 15, + "C2_DEPENDENCY_GRAPH": 47, + "C3_ENTRYPOINTS": 11 + }, + "merge_rank": 19 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Что делает функция create_runtime?", + "rag_count": 12 + }, + "output": { + "llm_answer": "1. **Что это и где определено.** \nСущность `create_runtime` определена в файле `src/plba/bootstrap.py`. Это функция, принимающая параметры конфигурации и модуля приложения, и возвращающая объект класса `RuntimeManager`.\n\n2. **Назначение по наблюдаемому коду.** \nФункция создаёт и инициализирует экземпляр объекта `RuntimeManager`, добавляя файл конфигурации и модуль приложения в его состояние. Если включено управление через HTTP, она также регистрирует канал управления.\n\n3. **Подтверждённые зависимости или взаимодействия.** \nФункция зависит от объекта `RuntimeManager` и использует метод `add_config_file` для добавления файла конфигурации и метод `register_module` для регистрации модуля приложения. Если включён режим управления через HTTP, используется метод `register_channel` для регистрации канала управления типа `HttpControlChannel`.\n\n4. **Что делает по шагам, если это видно в контексте.** \n- Создаёт новый экземпляр `RuntimeManager`.\n- При наличии переданного пути к конфигурационному файлу добавляет этот файл с помощью метода `add_config_file`.\n- Если включена опция HTTP-контроля, регистрирует HTTP-канал управления с указанными параметрами хоста, порта и тайм-аута.\n- Регистрирует указанный модуль приложения с помощью метода `register_module`.\n- Возвращает созданный экземпляр `RuntimeManager`.\n\n5. **Осторожные выводы.** \nНа основании представленного контекста трудно сделать полные выводы о последствиях вызова функции `create_runtime`. Например, непонятно, какие дополнительные действия происходят при регистрации модуля или что именно содержится в объектах, которые передаются в функцию (`ApplicationModule`, `HttpControlChannel`).\n\n6. **Чего не хватает для полного объяснения.** \nДля более детального понимания работы этой функции необходимы следующие детали:\n - Определение классов `ApplicationModule`, `RuntimeManager`, `HttpControlChannel`.\n - Детали поведения методов `add_config_file`, `register_module`, `register_channel`.\n - Логика и влияние других функций и методов, используемых внутри этих объектов." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 659, + "evidence_rows": 12, + "evidence_chars": 1184 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 1 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_explain_ru_v2", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 3092 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-explain-create-runtime.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-explain-create-runtime.md new file mode 100644 index 0000000..6f1e0de --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-explain-create-runtime.md @@ -0,0 +1,34 @@ +# plba-v2-explain-create-runtime + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Что делает функция create_runtime? + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 12, + "llm_answer": "1. **Что это и где определено.** \nСущность `create_runtime` определена в файле `src/plba/bootstrap.py`. Это функция, принимающая параметры конфигурации и модуля приложения, и возвращающая объект класса `RuntimeManager`.\n\n2. **Назначение по наблюдаемому коду.** \nФункция создаёт и инициализирует экземпляр объекта `RuntimeManager`, добавляя файл конфигурации и модуль приложения в его состояние. Если включено управление через HTTP, она также регистрирует канал управления.\n\n3. **Подтверждённые зависимости или взаимодействия.** \nФункция зависит от объекта `RuntimeManager` и использует метод `add_config_file` для добавления файла конфигурации и метод `register_module` для регистрации модуля приложения. Если включён режим управления через HTTP, используется метод `register_channel` для регистрации канала управления типа `HttpControlChannel`.\n\n4. **Что делает по шагам, если это видно в контексте.** \n- Создаёт новый экземпляр `RuntimeManager`.\n- При наличии переданного пути к конфигурационному файлу добавляет этот файл с помощью метода `add_config_file`.\n- Если включена опция HTTP-контроля, регистрирует HTTP-канал управления с указанными параметрами хоста, порта и тайм-аута.\n- Регистрирует указанный модуль приложения с помощью метода `register_module`.\n- Возвращает созданный экземпляр `RuntimeManager`.\n\n5. **Осторожные выводы.** \nНа основании представленного контекста трудно сделать полные выводы о последствиях вызова функции `create_runtime`. Например, непонятно, какие дополнительные действия происходят при регистрации модуля или что именно содержится в объектах, которые передаются в функцию (`ApplicationModule`, `HttpControlChannel`).\n\n6. **Чего не хватает для полного объяснения.** \nДля более детального понимания работы этой функции необходимы следующие детали:\n - Определение классов `ApplicationModule`, `RuntimeManager`, `HttpControlChannel`.\n - Детали поведения методов `add_config_file`, `register_module`, `register_channel`.\n - Логика и влияние других функций и методов, используемых внутри этих объектов.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "create_runtime" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-explain-local-http-channel.json b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-explain-local-http-channel.json new file mode 100644 index 0000000..742f93f --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-explain-local-http-channel.json @@ -0,0 +1,1333 @@ +{ + "case_id": "plba-v2-explain-local-http-channel", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN_LOCAL", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 6, + "llm_answer": "Класс `HttpControlChannel` реализует HTTP-интерфейс для управления другим компонентом приложения через HTTP-запросы.\n\n### Что делает класс:\n1. **Инициализация (`__init__`)**:\n - Принимает параметры `host`, `port` и `timeout`.\n - Создаёт экземпляр `_runner` класса `UvicornThreadRunner`, отвечающего за выполнение HTTP-сервера с использованием uvicorn (асинхронного веб-фреймворка).\n - Инициализирует объект фабрики приложений `_factory` типа `HttpControlAppFactory`, которая отвечает за создание конкретных HTTP-приложений.\n - Опционально инициализирует коллекцию действий управления `_actions`.\n\n2. **Запуск (`start`)**:\n - Проверяет наличие конфигурации действий управления (_actions). Если конфигурация отсутствует, возвращает ошибку.\n - Использует фабрику `_factory` для создания HTTP-приложения, которое включает обработчики health-запросов и action-запросов.\n - Запускает сервер с помощью `_runner.start()`.\n\n3. **Остановка (`stop`)**:\n - Останавливает асинхронный HTTP-сервер, запущенный ранее методом `start`.\n\n4. **Методы внутренних ответов**:\n - Метод `_health_response` проверяет состояние системы управления действиями. Если действия не настроены, возвращает статус \"unhealthy\". В противном случае ожидает ответ от health-метода действий и возвращает его.\n - Метод `_action_response` обрабатывает запросы к определённым действиям, возвращая результат выполнения действия или сообщение об ошибке, если действие не сконфигурировано.\n\n### Входные данные:\n- Параметры при создании экземпляра: хост, порт и таймаут.\n- Конфигурация действий управления (опционально передаётся в метод `start`).\n\n### Выходные данные:\n- Управляющие HTTP-запросы, возвращающие результаты проверки состояния системы и выполнения конкретных действий.\n\nТаким образом, класс служит промежуточным слоем между внешним интерфейсом HTTP и внутренними компонентами управления системой, обеспечивая безопасную и асинхронную обработку запросов.", + "answer_mode": "answered", + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "symbol_candidates": [ + "HttpControlChannel" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C2_DEPENDENCY_GRAPH" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-v2-explain-local-http-channel", + "text": "Почему в файле src/app_runtime/control/http_channel.py класс HttpControlChannel устроен так?", + "mode": "full_chain", + "run_started_at": "2026-03-12T13:23:57", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Почему в файле src/app_runtime/control/http_channel.py класс HttpControlChannel устроен так?", + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "HttpControlChannel", + "alternatives": [ + "HttpControlChannel" + ], + "confidence": 0.99 + }, + "rag_count": 6, + "rag_rows": [ + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel\nHttpControlChannel(ControlChannel)", + "layer": "C1_SYMBOL_CATALOG", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "qname": "HttpControlChannel", + "kind": "class", + "signature": "HttpControlChannel(ControlChannel)", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._timeout\n -> HttpControlChannel._action_response", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "c3ef21fcae96c82c00be74b3ab827d4af2085d89cb3fa5521c19a174aad84dbb", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "e64969024ccaeb34d8d91473fad07b3b3d341875846392e7a006406c7ada1954", + "dst_ref": "HttpControlChannel._action_response", + "resolution": "resolved", + "slice_id": "c3ef21fcae96c82c00be74b3ab827d4af2085d89cb3fa5521c19a174aad84dbb", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._timeout", + "HttpControlChannel._action_response" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "e64969024ccaeb34d8d91473fad07b3b3d341875846392e7a006406c7ada1954" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._runner\n -> HttpControlChannel.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 15, + "span_end": 22, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "51d73913df709152258ed1b9a8c8f4eb3c575eccfe6b982aef0b28e0789a29da", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0", + "dst_ref": "HttpControlChannel.start", + "resolution": "resolved", + "slice_id": "51d73913df709152258ed1b9a8c8f4eb3c575eccfe6b982aef0b28e0789a29da", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._runner", + "HttpControlChannel.start" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._timeout\n -> HttpControlChannel._health_response", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 14, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "f858f5c9e575f6c4cdfe3853571b7ee21d1f628a443541d2037c3dc9d0790bef", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "e84bf04e9cd2127df235b7064d05f47e19f19a89c7c82f4c247231d4e8fa426a", + "dst_ref": "HttpControlChannel._health_response", + "resolution": "resolved", + "slice_id": "f858f5c9e575f6c4cdfe3853571b7ee21d1f628a443541d2037c3dc9d0790bef", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._timeout", + "HttpControlChannel._health_response" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "e84bf04e9cd2127df235b7064d05f47e19f19a89c7c82f4c247231d4e8fa426a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._runner\n -> HttpControlChannel.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 15, + "span_end": 25, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "0f827ef81a990258a8a74381c8564a8361afa6712dba3200592659c939adcb9d", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "f29ab212620093d72be20e26c5a399624c7939a6056a728762ed3f84a250bfa3", + "dst_ref": "HttpControlChannel.stop", + "resolution": "resolved", + "slice_id": "0f827ef81a990258a8a74381c8564a8361afa6712dba3200592659c939adcb9d", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._runner", + "HttpControlChannel.stop" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "f29ab212620093d72be20e26c5a399624c7939a6056a728762ed3f84a250bfa3" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel(ControlChannel):\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._timeout = timeout\n self._runner = UvicornThreadRunner(host, port, timeout)\n self._factory = HttpControlAppFactory()\n self._actions: ControlActionSet | None = None\n\n async def start(self, actions: ControlActionSet) -> None:\n self._actions = actions\n app = self._factory.create(self._health_response, self._action_response)\n await self._runner.start(app)\n\n async def stop(self) -> None:\n await self._runner.stop()\n\n @property\n def port(self) -> int:\n return self._runner.port\n\n async def _health_response(self) -> dict[str, object]:\n if self._actions is None:\n return {\"status\": \"unhealthy\", \"detail\": \"control actions are not configured\"}\n return await asyncio.wait_for(self._actions.health(), timeout=float(self._timeout))\n\n async def _action_response(self, action: str, _client_source: str = \"unknown\") -> JSONResponse:\n if self._actions is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"{action} handler is not configured\"}, status_code=404)\n callbacks = {\n \"start\": self._actions.start,\n \"stop\": self._actions.stop,\n \"status\": self._actions.status,\n }\n callback = callbacks.get(action)\n if callback is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"unsupported action: {action}\"}, status_code=404)\n action_timeout = max(float(self._timeout), 10.0) if action in {\"start\", \"stop\"} else float(self._timeout)\n try:\n detail = await asyncio.wait_for(callback(), timeout=action_timeout)\n except asyncio.TimeoutError:\n return JSONResponse(\n content={\"status\": \"accepted\", \"detail\": f\"{action} operation is still in progress\"},\n status_code=202,\n )\n except Exception as exc:\n return JSONResponse(content={\"status\": \"error\", \"detail\": str(exc)}, status_code=500)\n return JSONResponse(content={\"status\": \"ok\", \"detail\": detail or f\"{action} action accepted\"}, status_code=200)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_channel.py:HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "Класс `HttpControlChannel` реализует HTTP-интерфейс для управления другим компонентом приложения через HTTP-запросы.\n\n### Что делает класс:\n1. **Инициализация (`__init__`)**:\n - Принимает параметры `host`, `port` и `timeout`.\n - Создаёт экземпляр `_runner` класса `UvicornThreadRunner`, отвечающего за выполнение HTTP-сервера с использованием uvicorn (асинхронного веб-фреймворка).\n - Инициализирует объект фабрики приложений `_factory` типа `HttpControlAppFactory`, которая отвечает за создание конкретных HTTP-приложений.\n - Опционально инициализирует коллекцию действий управления `_actions`.\n\n2. **Запуск (`start`)**:\n - Проверяет наличие конфигурации действий управления (_actions). Если конфигурация отсутствует, возвращает ошибку.\n - Использует фабрику `_factory` для создания HTTP-приложения, которое включает обработчики health-запросов и action-запросов.\n - Запускает сервер с помощью `_runner.start()`.\n\n3. **Остановка (`stop`)**:\n - Останавливает асинхронный HTTP-сервер, запущенный ранее методом `start`.\n\n4. **Методы внутренних ответов**:\n - Метод `_health_response` проверяет состояние системы управления действиями. Если действия не настроены, возвращает статус \"unhealthy\". В противном случае ожидает ответ от health-метода действий и возвращает его.\n - Метод `_action_response` обрабатывает запросы к определённым действиям, возвращая результат выполнения действия или сообщение об ошибке, если действие не сконфигурировано.\n\n### Входные данные:\n- Параметры при создании экземпляра: хост, порт и таймаут.\n- Конфигурация действий управления (опционально передаётся в метод `start`).\n\n### Выходные данные:\n- Управляющие HTTP-запросы, возвращающие результаты проверки состояния системы и выполнения конкретных действий.\n\nТаким образом, класс служит промежуточным слоем между внешним интерфейсом HTTP и внутренними компонентами управления системой, обеспечивая безопасную и асинхронную обработку запросов.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN_LOCAL", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN_LOCAL", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C2_DEPENDENCY_GRAPH" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "HttpControlChannel" + ], + "keyword_hints": [ + "src/app_runtime/control/http_channel.py", + "HttpControlChannel" + ], + "path_hints": [ + "src/app_runtime/control/http_channel.py" + ], + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C2_DEPENDENCY_GRAPH" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 12, + "C2_DEPENDENCY_GRAPH": 4 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "HttpControlChannel", + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Почему в файле src/app_runtime/control/http_channel.py класс HttpControlChannel устроен так?", + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 12, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Почему в файле src/app_runtime/control/http_channel.py класс HttpControlChannel устроен так?", + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 4, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 4, + "candidates_after_filter": 4 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "HttpControlChannel", + "alternatives": [ + "HttpControlChannel" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 4, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 58, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 27, + "C0_SOURCE_CHUNKS": 14, + "C2_DEPENDENCY_GRAPH": 15 + }, + "merge_rank": 19, + "prompt_build": 0, + "llm_call": 3739 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 851, + "evidence_rows": 6, + "evidence_chars": 2660 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 4, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_explain_local_ru_v2", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "src/app_runtime/control/http_channel.py", + "HttpControlChannel" + ], + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ] + }, + "llm": { + "used_evidence_count": 6, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-v2-explain-local-http-channel", + "mode": "full_chain", + "run_started_at": "2026-03-12T13:23:57", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Почему в файле src/app_runtime/control/http_channel.py класс HttpControlChannel устроен так?", + "normalized_query": "Почему в файле src/app_runtime/control/http_channel.py класс HttpControlChannel устроен так?" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Почему в файле src/app_runtime/control/http_channel.py класс HttpControlChannel устроен так?" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Почему в файле src/app_runtime/control/http_channel.py класс HttpControlChannel устроен так?" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN_LOCAL", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C2_DEPENDENCY_GRAPH" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "HttpControlChannel" + ], + "keyword_hints": [ + "src/app_runtime/control/http_channel.py", + "HttpControlChannel" + ], + "path_hints": [ + "src/app_runtime/control/http_channel.py" + ], + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Почему в файле src/app_runtime/control/http_channel.py класс HttpControlChannel устроен так?" + }, + "output": { + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "HttpControlChannel", + "alternatives": [ + "HttpControlChannel" + ], + "confidence": 0.99 + }, + "rag_count": 6, + "rag_rows": [ + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel\nHttpControlChannel(ControlChannel)", + "layer": "C1_SYMBOL_CATALOG", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "qname": "HttpControlChannel", + "kind": "class", + "signature": "HttpControlChannel(ControlChannel)", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._timeout\n -> HttpControlChannel._action_response", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "c3ef21fcae96c82c00be74b3ab827d4af2085d89cb3fa5521c19a174aad84dbb", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "e64969024ccaeb34d8d91473fad07b3b3d341875846392e7a006406c7ada1954", + "dst_ref": "HttpControlChannel._action_response", + "resolution": "resolved", + "slice_id": "c3ef21fcae96c82c00be74b3ab827d4af2085d89cb3fa5521c19a174aad84dbb", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._timeout", + "HttpControlChannel._action_response" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "e64969024ccaeb34d8d91473fad07b3b3d341875846392e7a006406c7ada1954" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._runner\n -> HttpControlChannel.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 15, + "span_end": 22, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "51d73913df709152258ed1b9a8c8f4eb3c575eccfe6b982aef0b28e0789a29da", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0", + "dst_ref": "HttpControlChannel.start", + "resolution": "resolved", + "slice_id": "51d73913df709152258ed1b9a8c8f4eb3c575eccfe6b982aef0b28e0789a29da", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._runner", + "HttpControlChannel.start" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._timeout\n -> HttpControlChannel._health_response", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 14, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "f858f5c9e575f6c4cdfe3853571b7ee21d1f628a443541d2037c3dc9d0790bef", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "e84bf04e9cd2127df235b7064d05f47e19f19a89c7c82f4c247231d4e8fa426a", + "dst_ref": "HttpControlChannel._health_response", + "resolution": "resolved", + "slice_id": "f858f5c9e575f6c4cdfe3853571b7ee21d1f628a443541d2037c3dc9d0790bef", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._timeout", + "HttpControlChannel._health_response" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "e84bf04e9cd2127df235b7064d05f47e19f19a89c7c82f4c247231d4e8fa426a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._runner\n -> HttpControlChannel.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 15, + "span_end": 25, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "0f827ef81a990258a8a74381c8564a8361afa6712dba3200592659c939adcb9d", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "f29ab212620093d72be20e26c5a399624c7939a6056a728762ed3f84a250bfa3", + "dst_ref": "HttpControlChannel.stop", + "resolution": "resolved", + "slice_id": "0f827ef81a990258a8a74381c8564a8361afa6712dba3200592659c939adcb9d", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._runner", + "HttpControlChannel.stop" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "f29ab212620093d72be20e26c5a399624c7939a6056a728762ed3f84a250bfa3" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel(ControlChannel):\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._timeout = timeout\n self._runner = UvicornThreadRunner(host, port, timeout)\n self._factory = HttpControlAppFactory()\n self._actions: ControlActionSet | None = None\n\n async def start(self, actions: ControlActionSet) -> None:\n self._actions = actions\n app = self._factory.create(self._health_response, self._action_response)\n await self._runner.start(app)\n\n async def stop(self) -> None:\n await self._runner.stop()\n\n @property\n def port(self) -> int:\n return self._runner.port\n\n async def _health_response(self) -> dict[str, object]:\n if self._actions is None:\n return {\"status\": \"unhealthy\", \"detail\": \"control actions are not configured\"}\n return await asyncio.wait_for(self._actions.health(), timeout=float(self._timeout))\n\n async def _action_response(self, action: str, _client_source: str = \"unknown\") -> JSONResponse:\n if self._actions is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"{action} handler is not configured\"}, status_code=404)\n callbacks = {\n \"start\": self._actions.start,\n \"stop\": self._actions.stop,\n \"status\": self._actions.status,\n }\n callback = callbacks.get(action)\n if callback is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"unsupported action: {action}\"}, status_code=404)\n action_timeout = max(float(self._timeout), 10.0) if action in {\"start\", \"stop\"} else float(self._timeout)\n try:\n detail = await asyncio.wait_for(callback(), timeout=action_timeout)\n except asyncio.TimeoutError:\n return JSONResponse(\n content={\"status\": \"accepted\", \"detail\": f\"{action} operation is still in progress\"},\n status_code=202,\n )\n except Exception as exc:\n return JSONResponse(content={\"status\": \"error\", \"detail\": str(exc)}, status_code=500)\n return JSONResponse(content={\"status\": \"ok\", \"detail\": detail or f\"{action} action accepted\"}, status_code=200)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_channel.py:HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C2_DEPENDENCY_GRAPH" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 12, + "C2_DEPENDENCY_GRAPH": 4 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "HttpControlChannel", + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Почему в файле src/app_runtime/control/http_channel.py класс HttpControlChannel устроен так?", + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 12, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Почему в файле src/app_runtime/control/http_channel.py класс HttpControlChannel устроен так?", + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 4, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 4, + "candidates_after_filter": 4 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "HttpControlChannel", + "alternatives": [ + "HttpControlChannel" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 4, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 58, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 27, + "C0_SOURCE_CHUNKS": 14, + "C2_DEPENDENCY_GRAPH": 15 + }, + "merge_rank": 19 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Почему в файле src/app_runtime/control/http_channel.py класс HttpControlChannel устроен так?", + "rag_count": 6 + }, + "output": { + "llm_answer": "Класс `HttpControlChannel` реализует HTTP-интерфейс для управления другим компонентом приложения через HTTP-запросы.\n\n### Что делает класс:\n1. **Инициализация (`__init__`)**:\n - Принимает параметры `host`, `port` и `timeout`.\n - Создаёт экземпляр `_runner` класса `UvicornThreadRunner`, отвечающего за выполнение HTTP-сервера с использованием uvicorn (асинхронного веб-фреймворка).\n - Инициализирует объект фабрики приложений `_factory` типа `HttpControlAppFactory`, которая отвечает за создание конкретных HTTP-приложений.\n - Опционально инициализирует коллекцию действий управления `_actions`.\n\n2. **Запуск (`start`)**:\n - Проверяет наличие конфигурации действий управления (_actions). Если конфигурация отсутствует, возвращает ошибку.\n - Использует фабрику `_factory` для создания HTTP-приложения, которое включает обработчики health-запросов и action-запросов.\n - Запускает сервер с помощью `_runner.start()`.\n\n3. **Остановка (`stop`)**:\n - Останавливает асинхронный HTTP-сервер, запущенный ранее методом `start`.\n\n4. **Методы внутренних ответов**:\n - Метод `_health_response` проверяет состояние системы управления действиями. Если действия не настроены, возвращает статус \"unhealthy\". В противном случае ожидает ответ от health-метода действий и возвращает его.\n - Метод `_action_response` обрабатывает запросы к определённым действиям, возвращая результат выполнения действия или сообщение об ошибке, если действие не сконфигурировано.\n\n### Входные данные:\n- Параметры при создании экземпляра: хост, порт и таймаут.\n- Конфигурация действий управления (опционально передаётся в метод `start`).\n\n### Выходные данные:\n- Управляющие HTTP-запросы, возвращающие результаты проверки состояния системы и выполнения конкретных действий.\n\nТаким образом, класс служит промежуточным слоем между внешним интерфейсом HTTP и внутренними компонентами управления системой, обеспечивая безопасную и асинхронную обработку запросов." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 851, + "evidence_rows": 6, + "evidence_chars": 2660 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 4, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_explain_local_ru_v2", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 3739 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-explain-local-http-channel.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-explain-local-http-channel.md new file mode 100644 index 0000000..959f46b --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-explain-local-http-channel.md @@ -0,0 +1,34 @@ +# plba-v2-explain-local-http-channel + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Почему в файле src/app_runtime/control/http_channel.py класс HttpControlChannel устроен так? + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "EXPLAIN_LOCAL", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 6, + "llm_answer": "Класс `HttpControlChannel` реализует HTTP-интерфейс для управления другим компонентом приложения через HTTP-запросы.\n\n### Что делает класс:\n1. **Инициализация (`__init__`)**:\n - Принимает параметры `host`, `port` и `timeout`.\n - Создаёт экземпляр `_runner` класса `UvicornThreadRunner`, отвечающего за выполнение HTTP-сервера с использованием uvicorn (асинхронного веб-фреймворка).\n - Инициализирует объект фабрики приложений `_factory` типа `HttpControlAppFactory`, которая отвечает за создание конкретных HTTP-приложений.\n - Опционально инициализирует коллекцию действий управления `_actions`.\n\n2. **Запуск (`start`)**:\n - Проверяет наличие конфигурации действий управления (_actions). Если конфигурация отсутствует, возвращает ошибку.\n - Использует фабрику `_factory` для создания HTTP-приложения, которое включает обработчики health-запросов и action-запросов.\n - Запускает сервер с помощью `_runner.start()`.\n\n3. **Остановка (`stop`)**:\n - Останавливает асинхронный HTTP-сервер, запущенный ранее методом `start`.\n\n4. **Методы внутренних ответов**:\n - Метод `_health_response` проверяет состояние системы управления действиями. Если действия не настроены, возвращает статус \"unhealthy\". В противном случае ожидает ответ от health-метода действий и возвращает его.\n - Метод `_action_response` обрабатывает запросы к определённым действиям, возвращая результат выполнения действия или сообщение об ошибке, если действие не сконфигурировано.\n\n### Входные данные:\n- Параметры при создании экземпляра: хост, порт и таймаут.\n- Конфигурация действий управления (опционально передаётся в метод `start`).\n\n### Выходные данные:\n- Управляющие HTTP-запросы, возвращающие результаты проверки состояния системы и выполнения конкретных действий.\n\nТаким образом, класс служит промежуточным слоем между внешним интерфейсом HTTP и внутренними компонентами управления системой, обеспечивая безопасную и асинхронную обработку запросов.", + "answer_mode": "answered", + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "symbol_candidates": [ + "HttpControlChannel" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C2_DEPENDENCY_GRAPH" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-explain-nonexistent-symbol.json b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-explain-nonexistent-symbol.json new file mode 100644 index 0000000..0a875b1 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-explain-nonexistent-symbol.json @@ -0,0 +1,1182 @@ +{ + "case_id": "plba-v2-explain-nonexistent-symbol", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 0, + "llm_answer": "Класс `RuntimeFactoryManager` не найден ни в предоставленном контексте, ни в стандартных библиотеках Python. \n\n**Итог:** \nСущность не обнаружена. Невозможно предоставить полное объяснение её работы на основе доступного контекста. Рекомендую проверить наличие класса в реальном проекте или документации к нему. Если он существует вне представленного окружения, необходимо предоставить дополнительный контекст для анализа.", + "answer_mode": "insufficient_evidence", + "path_scope": [], + "symbol_candidates": [ + "RuntimeFactoryManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-v2-explain-nonexistent-symbol", + "text": "Объясни класс RuntimeFactoryManager", + "mode": "full_chain", + "run_started_at": "2026-03-12T13:23:57", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни класс RuntimeFactoryManager", + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "ControlChannel", + "ControlActionSet" + ], + "confidence": 0.0 + }, + "rag_count": 0, + "rag_rows": [], + "llm_answer": "Класс `RuntimeFactoryManager` не найден ни в предоставленном контексте, ни в стандартных библиотеках Python. \n\n**Итог:** \nСущность не обнаружена. Невозможно предоставить полное объяснение её работы на основе доступного контекста. Рекомендую проверить наличие класса в реальном проекте или документации к нему. Если он существует вне представленного окружения, необходимо предоставить дополнительный контекст для анализа.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [], + "evidence_sufficient": false + }, + "llm": { + "answer_status": "insufficient_evidence", + "groundedness": "weakly_grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "RuntimeFactoryManager" + ], + "keyword_hints": [ + "RuntimeFactoryManager" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": null, + "workspace_id": null, + "returned_repo_ids": [], + "returned_workspace_ids": [] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "RuntimeFactoryManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "RuntimeFactoryManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "RuntimeFactoryManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "RuntimeFactoryManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "RuntimeFactoryManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 2, + "candidates_after_filter": 2 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "ControlChannel", + "ControlActionSet" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "miss", + "hit_count": 0, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "miss", + "hit_count": 0, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "miss", + "hit_count": 0, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "miss", + "hit_count": 0, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "miss", + "hit_count": 0, + "fail_reason": null + } + ] + }, + "constraint_violations": [ + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C1_SYMBOL_CATALOG", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + }, + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C0_SOURCE_CHUNKS", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + }, + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C4_SEMANTIC_ROLES", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + }, + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C2_DEPENDENCY_GRAPH", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + }, + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C3_ENTRYPOINTS", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + }, + { + "type": "SYMBOL_RESOLUTION_FAILED", + "severity": "warn", + "details": { + "status": "not_found", + "symbol_candidates": [ + "RuntimeFactoryManager" + ] + }, + "suggested_fix": "Increase symbol layer budget or improve fuzzy symbol resolution settings." + } + ], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 136, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 42, + "C0_SOURCE_CHUNKS": 15, + "C4_SEMANTIC_ROLES": 12, + "C2_DEPENDENCY_GRAPH": 56, + "C3_ENTRYPOINTS": 9 + }, + "merge_rank": 0, + "prompt_build": 0, + "llm_call": 854 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 312, + "evidence_rows": 0, + "evidence_chars": 0 + }, + "evidence_summary": [], + "prompt_template_id": "intent_code_qa_explain_ru_v2", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "RuntimeFactoryManager" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 0, + "missing_evidence_reason": "empty_retrieval_context" + } + }, + "run_info": { + "case_id": "plba-v2-explain-nonexistent-symbol", + "mode": "full_chain", + "run_started_at": "2026-03-12T13:23:57", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Объясни класс RuntimeFactoryManager", + "normalized_query": "Объясни класс RuntimeFactoryManager" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Объясни класс RuntimeFactoryManager" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни класс RuntimeFactoryManager" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "RuntimeFactoryManager" + ], + "keyword_hints": [ + "RuntimeFactoryManager" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Объясни класс RuntimeFactoryManager" + }, + "output": { + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "ControlChannel", + "ControlActionSet" + ], + "confidence": 0.0 + }, + "rag_count": 0, + "rag_rows": [] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": null, + "workspace_id": null, + "returned_repo_ids": [], + "returned_workspace_ids": [] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "RuntimeFactoryManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "RuntimeFactoryManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "RuntimeFactoryManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "RuntimeFactoryManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "RuntimeFactoryManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 2, + "candidates_after_filter": 2 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "ControlChannel", + "ControlActionSet" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "miss", + "hit_count": 0, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "miss", + "hit_count": 0, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "miss", + "hit_count": 0, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "miss", + "hit_count": 0, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "miss", + "hit_count": 0, + "fail_reason": null + } + ] + }, + "constraint_violations": [ + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C1_SYMBOL_CATALOG", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + }, + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C0_SOURCE_CHUNKS", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + }, + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C4_SEMANTIC_ROLES", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + }, + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C2_DEPENDENCY_GRAPH", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + }, + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C3_ENTRYPOINTS", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + }, + { + "type": "SYMBOL_RESOLUTION_FAILED", + "severity": "warn", + "details": { + "status": "not_found", + "symbol_candidates": [ + "RuntimeFactoryManager" + ] + }, + "suggested_fix": "Increase symbol layer budget or improve fuzzy symbol resolution settings." + } + ], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 136, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 42, + "C0_SOURCE_CHUNKS": 15, + "C4_SEMANTIC_ROLES": 12, + "C2_DEPENDENCY_GRAPH": 56, + "C3_ENTRYPOINTS": 9 + }, + "merge_rank": 0 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Объясни класс RuntimeFactoryManager", + "rag_count": 0 + }, + "output": { + "llm_answer": "Класс `RuntimeFactoryManager` не найден ни в предоставленном контексте, ни в стандартных библиотеках Python. \n\n**Итог:** \nСущность не обнаружена. Невозможно предоставить полное объяснение её работы на основе доступного контекста. Рекомендую проверить наличие класса в реальном проекте или документации к нему. Если он существует вне представленного окружения, необходимо предоставить дополнительный контекст для анализа." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 312, + "evidence_rows": 0, + "evidence_chars": 0 + }, + "evidence_summary": [], + "prompt_template_id": "intent_code_qa_explain_ru_v2", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 854 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-explain-nonexistent-symbol.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-explain-nonexistent-symbol.md new file mode 100644 index 0000000..94657b1 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-explain-nonexistent-symbol.md @@ -0,0 +1,34 @@ +# plba-v2-explain-nonexistent-symbol + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Объясни класс RuntimeFactoryManager + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 0, + "llm_answer": "Класс `RuntimeFactoryManager` не найден ни в предоставленном контексте, ни в стандартных библиотеках Python. \n\n**Итог:** \nСущность не обнаружена. Невозможно предоставить полное объяснение её работы на основе доступного контекста. Рекомендую проверить наличие класса в реальном проекте или документации к нему. Если он существует вне представленного окружения, необходимо предоставить дополнительный контекст для анализа.", + "answer_mode": "insufficient_evidence", + "path_scope": [], + "symbol_candidates": [ + "RuntimeFactoryManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-explain-runtime-manager.json b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-explain-runtime-manager.json new file mode 100644 index 0000000..d68bb32 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-explain-runtime-manager.json @@ -0,0 +1,2088 @@ +{ + "case_id": "plba-v2-explain-runtime-manager", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 12, + "llm_answer": "1. **Что это и где определено**:\n - Класс `RuntimeManager` определен в файле `src/app_runtime/core/runtime.py`.\n \n2. **Назначение по наблюдаемому коду**:\n - Судя по комментариям и контексту, класс предназначен для управления жизненным циклом приложения и координации различных сервисов и модулей. Он выступает в роли менеджера, отвечающего за инициализацию, регистрацию и управление состоянием различных компонентов системы.\n - Из описания его ответственности (\"manager\", \"orchestrates role-like calls\") можно предположить, что он отвечает за координацию работы других сервисов и управляет их взаимодействием через чтение и запись состояния атрибутов.\n\n3. **Подтверждённые зависимости или взаимодействия**:\n - В конструкторе класса явно видны зависимости от следующих классов и объектов:\n - `ConfigurationManager`\n - `ServiceContainer`\n - `TraceService`\n - `HealthRegistry`\n - `LogManager`\n - `WorkerSupervisor`\n - `ControlPlaneService`\n - Эти зависимости передаются конструктору при создании экземпляра класса и могут быть использованы внутри методов класса.\n\n4. **Что делает по шагам, если это видно в контексте**:\n - Конструктор инициализирует экземпляр класса, присваивая значения параметров по умолчанию, если они не переданы явно.\n - Внутри конструктора вызывается метод `_register_core_services()`, вероятно, регистрирующий основные сервисы или модули.\n - Метод `register_module(module: ApplicationModule)` предназначен для регистрации модуля, хотя его реализация неполная и обрезана в предоставленном фрагменте.\n\n5. **Осторожные выводы**:\n - Несмотря на наличие явных зависимостей и общего назначения класса, невозможно точно понять весь функционал из предоставленного контекста. Не видна основная логика, выполняемая после начальной настройки.\n - Также отсутствует информация о том, какие методы используются чаще всего и как именно они влияют на состояние приложения.\n\n6. **Чего не хватает для полного объяснения**:\n - Полностью отсутствуют детали реализации методов, которые могли бы показать полный функционал класса (`_register_core_services()` и другие).\n - Отсутствует понимание того, как `RuntimeManager` участвует в общем потоке данных или управлении жизненным циклом приложения.\n - Нет информации о взаимодействии с внешними компонентами, такими как HTTP приложение или микросервисы, упомянутые в `ControlPlaneService`.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-v2-explain-runtime-manager", + "text": "Объясни как работает класс RuntimeManager", + "mode": "full_chain", + "run_started_at": "2026-03-12T13:23:57", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни как работает класс RuntimeManager", + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ], + "confidence": 0.99 + }, + "rag_count": 12, + "rag_rows": [ + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager\nRuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "qname": "RuntimeManager", + "kind": "class", + "signature": "RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests manager\n- orchestrates role-like calls (4)\n- reads and writes state attributes\n- participates in dataflow slices (50)", + "layer": "C4_SEMANTIC_ROLES", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 43, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "symbol_name": "RuntimeManager", + "qname": "RuntimeManager", + "role": "pipeline_stage", + "confidence": 0.67, + "dataflow_participation": 50, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 52, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "1. **Что это и где определено**:\n - Класс `RuntimeManager` определен в файле `src/app_runtime/core/runtime.py`.\n \n2. **Назначение по наблюдаемому коду**:\n - Судя по комментариям и контексту, класс предназначен для управления жизненным циклом приложения и координации различных сервисов и модулей. Он выступает в роли менеджера, отвечающего за инициализацию, регистрацию и управление состоянием различных компонентов системы.\n - Из описания его ответственности (\"manager\", \"orchestrates role-like calls\") можно предположить, что он отвечает за координацию работы других сервисов и управляет их взаимодействием через чтение и запись состояния атрибутов.\n\n3. **Подтверждённые зависимости или взаимодействия**:\n - В конструкторе класса явно видны зависимости от следующих классов и объектов:\n - `ConfigurationManager`\n - `ServiceContainer`\n - `TraceService`\n - `HealthRegistry`\n - `LogManager`\n - `WorkerSupervisor`\n - `ControlPlaneService`\n - Эти зависимости передаются конструктору при создании экземпляра класса и могут быть использованы внутри методов класса.\n\n4. **Что делает по шагам, если это видно в контексте**:\n - Конструктор инициализирует экземпляр класса, присваивая значения параметров по умолчанию, если они не переданы явно.\n - Внутри конструктора вызывается метод `_register_core_services()`, вероятно, регистрирующий основные сервисы или модули.\n - Метод `register_module(module: ApplicationModule)` предназначен для регистрации модуля, хотя его реализация неполная и обрезана в предоставленном фрагменте.\n\n5. **Осторожные выводы**:\n - Несмотря на наличие явных зависимостей и общего назначения класса, невозможно точно понять весь функционал из предоставленного контекста. Не видна основная логика, выполняемая после начальной настройки.\n - Также отсутствует информация о том, какие методы используются чаще всего и как именно они влияют на состояние приложения.\n\n6. **Чего не хватает для полного объяснения**:\n - Полностью отсутствуют детали реализации методов, которые могли бы показать полный функционал класса (`_register_core_services()` и другие).\n - Отсутствует понимание того, как `RuntimeManager` участвует в общем потоке данных или управлении жизненным циклом приложения.\n - Нет информации о взаимодействии с внешними компонентами, такими как HTTP приложение или микросервисы, упомянутые в `ControlPlaneService`.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS", + "C4_SEMANTIC_ROLES" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 176, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 51, + "C0_SOURCE_CHUNKS": 20, + "C4_SEMANTIC_ROLES": 14, + "C2_DEPENDENCY_GRAPH": 56, + "C3_ENTRYPOINTS": 10 + }, + "merge_rank": 21, + "prompt_build": 0, + "llm_call": 3992 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 854, + "evidence_rows": 12, + "evidence_chars": 7130 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 2 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_explain_ru_v2", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "RuntimeManager" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 12, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-v2-explain-runtime-manager", + "mode": "full_chain", + "run_started_at": "2026-03-12T13:23:57", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Объясни как работает класс RuntimeManager", + "normalized_query": "Объясни как работает класс RuntimeManager" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Объясни как работает класс RuntimeManager" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни как работает класс RuntimeManager" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Объясни как работает класс RuntimeManager" + }, + "output": { + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ], + "confidence": 0.99 + }, + "rag_count": 12, + "rag_rows": [ + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager\nRuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "qname": "RuntimeManager", + "kind": "class", + "signature": "RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests manager\n- orchestrates role-like calls (4)\n- reads and writes state attributes\n- participates in dataflow slices (50)", + "layer": "C4_SEMANTIC_ROLES", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 43, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "symbol_name": "RuntimeManager", + "qname": "RuntimeManager", + "role": "pipeline_stage", + "confidence": 0.67, + "dataflow_participation": 50, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 52, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 176, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 51, + "C0_SOURCE_CHUNKS": 20, + "C4_SEMANTIC_ROLES": 14, + "C2_DEPENDENCY_GRAPH": 56, + "C3_ENTRYPOINTS": 10 + }, + "merge_rank": 21 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Объясни как работает класс RuntimeManager", + "rag_count": 12 + }, + "output": { + "llm_answer": "1. **Что это и где определено**:\n - Класс `RuntimeManager` определен в файле `src/app_runtime/core/runtime.py`.\n \n2. **Назначение по наблюдаемому коду**:\n - Судя по комментариям и контексту, класс предназначен для управления жизненным циклом приложения и координации различных сервисов и модулей. Он выступает в роли менеджера, отвечающего за инициализацию, регистрацию и управление состоянием различных компонентов системы.\n - Из описания его ответственности (\"manager\", \"orchestrates role-like calls\") можно предположить, что он отвечает за координацию работы других сервисов и управляет их взаимодействием через чтение и запись состояния атрибутов.\n\n3. **Подтверждённые зависимости или взаимодействия**:\n - В конструкторе класса явно видны зависимости от следующих классов и объектов:\n - `ConfigurationManager`\n - `ServiceContainer`\n - `TraceService`\n - `HealthRegistry`\n - `LogManager`\n - `WorkerSupervisor`\n - `ControlPlaneService`\n - Эти зависимости передаются конструктору при создании экземпляра класса и могут быть использованы внутри методов класса.\n\n4. **Что делает по шагам, если это видно в контексте**:\n - Конструктор инициализирует экземпляр класса, присваивая значения параметров по умолчанию, если они не переданы явно.\n - Внутри конструктора вызывается метод `_register_core_services()`, вероятно, регистрирующий основные сервисы или модули.\n - Метод `register_module(module: ApplicationModule)` предназначен для регистрации модуля, хотя его реализация неполная и обрезана в предоставленном фрагменте.\n\n5. **Осторожные выводы**:\n - Несмотря на наличие явных зависимостей и общего назначения класса, невозможно точно понять весь функционал из предоставленного контекста. Не видна основная логика, выполняемая после начальной настройки.\n - Также отсутствует информация о том, какие методы используются чаще всего и как именно они влияют на состояние приложения.\n\n6. **Чего не хватает для полного объяснения**:\n - Полностью отсутствуют детали реализации методов, которые могли бы показать полный функционал класса (`_register_core_services()` и другие).\n - Отсутствует понимание того, как `RuntimeManager` участвует в общем потоке данных или управлении жизненным циклом приложения.\n - Нет информации о взаимодействии с внешними компонентами, такими как HTTP приложение или микросервисы, упомянутые в `ControlPlaneService`." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 854, + "evidence_rows": 12, + "evidence_chars": 7130 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 2 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_explain_ru_v2", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 3992 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-explain-runtime-manager.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-explain-runtime-manager.md new file mode 100644 index 0000000..8868997 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-explain-runtime-manager.md @@ -0,0 +1,34 @@ +# plba-v2-explain-runtime-manager + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Объясни как работает класс RuntimeManager + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 12, + "llm_answer": "1. **Что это и где определено**:\n - Класс `RuntimeManager` определен в файле `src/app_runtime/core/runtime.py`.\n \n2. **Назначение по наблюдаемому коду**:\n - Судя по комментариям и контексту, класс предназначен для управления жизненным циклом приложения и координации различных сервисов и модулей. Он выступает в роли менеджера, отвечающего за инициализацию, регистрацию и управление состоянием различных компонентов системы.\n - Из описания его ответственности (\"manager\", \"orchestrates role-like calls\") можно предположить, что он отвечает за координацию работы других сервисов и управляет их взаимодействием через чтение и запись состояния атрибутов.\n\n3. **Подтверждённые зависимости или взаимодействия**:\n - В конструкторе класса явно видны зависимости от следующих классов и объектов:\n - `ConfigurationManager`\n - `ServiceContainer`\n - `TraceService`\n - `HealthRegistry`\n - `LogManager`\n - `WorkerSupervisor`\n - `ControlPlaneService`\n - Эти зависимости передаются конструктору при создании экземпляра класса и могут быть использованы внутри методов класса.\n\n4. **Что делает по шагам, если это видно в контексте**:\n - Конструктор инициализирует экземпляр класса, присваивая значения параметров по умолчанию, если они не переданы явно.\n - Внутри конструктора вызывается метод `_register_core_services()`, вероятно, регистрирующий основные сервисы или модули.\n - Метод `register_module(module: ApplicationModule)` предназначен для регистрации модуля, хотя его реализация неполная и обрезана в предоставленном фрагменте.\n\n5. **Осторожные выводы**:\n - Несмотря на наличие явных зависимостей и общего назначения класса, невозможно точно понять весь функционал из предоставленного контекста. Не видна основная логика, выполняемая после начальной настройки.\n - Также отсутствует информация о том, какие методы используются чаще всего и как именно они влияют на состояние приложения.\n\n6. **Чего не хватает для полного объяснения**:\n - Полностью отсутствуют детали реализации методов, которые могли бы показать полный функционал класса (`_register_core_services()` и другие).\n - Отсутствует понимание того, как `RuntimeManager` участвует в общем потоке данных или управлении жизненным циклом приложения.\n - Нет информации о взаимодействии с внешними компонентами, такими как HTTP приложение или микросервисы, упомянутые в `ControlPlaneService`.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-explain-trace-service.json b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-explain-trace-service.json new file mode 100644 index 0000000..8242611 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-explain-trace-service.json @@ -0,0 +1,2208 @@ +{ + "case_id": "plba-v2-explain-trace-service", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 14, + "llm_answer": "1. **Что это и где определено.** \nСущность `TraceService` определена в файле `src/app_runtime/tracing/service.py`. Это класс, наследующий от `TraceContextFactory`.\n\n2. **Назначение по наблюдаемому коду.** \nКласс предназначен для управления контекстами трассировки и записи событий трассировки. Он участвует в обработке данных потока (slice 13), имеет роль «pipeline stage» и отвечает за создание и запись контекста трассировки (`create_context`, `open_context`), а также взаимодействие с транспортировкой контекста через `TraceRecordWriter`.\n\n3. **Подтверждённые зависимости или взаимодействия.** \n`TraceService` зависит от класса `TraceContextStore` и объекта транспорта трассировки (`TraceTransport`). Метод `create_context` использует метод записи контекста `_writer.write_context` для отправки данных в транспортировку. Транспортировка может быть либо реальной реализацией, либо заглушкой (`NoOpTraceTransport()`).\n\n4. **Что делает по шагам, если это видно в контексте.** \n- Конструктор класса инициализирует объект транспорта трассировки и хранилище контекста (если переданы аргументы, иначе создаёт заглушки).\n- Метод `create_context` генерирует уникальный идентификатор трассировки, записывает контекст в хранилище и отправляет его в транспортировку.\n- Метод `open_context` является менеджером контекста, создающим временный контекст трассировки внутри блока с использованием `create_context`.\n\n5. **Осторожные выводы.** \nНа данный момент недостаточно информации о внутреннем устройстве транспорта трассировки и логике хранения контекста. Также нет явных упоминаний о взаимодействии с внешними сервисами или компонентами приложения, кроме явно указанных зависимостей.\n\n6. **Чего не хватает для полного объяснения.** \n- Деталей реализации транспорта трассировки (`TraceTransport`) и хранилища контекста (`TraceContextStore`).\n- Подробности взаимодействия с остальной частью системы (контексты, события, API внешнего уровня).", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "TraceService" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-v2-explain-trace-service", + "text": "Объясни как работает класс TraceService", + "mode": "full_chain", + "run_started_at": "2026-03-12T13:23:57", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни как работает класс TraceService", + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "TraceService", + "alternatives": [ + "TraceService" + ], + "confidence": 0.99 + }, + "rag_count": 14, + "rag_rows": [ + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceService\nTraceService(TraceContextFactory)", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService", + "span_start": 39, + "span_end": 166, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "c2b2b976d99f2c600000b753731b26e0a69adcb4359398b93073590c5d5d04f4", + "qname": "TraceService", + "kind": "class", + "signature": "TraceService(TraceContextFactory)", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (13)", + "layer": "C4_SEMANTIC_ROLES", + "title": "TraceService", + "span_start": 39, + "span_end": 166, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 60, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "c2b2b976d99f2c600000b753731b26e0a69adcb4359398b93073590c5d5d04f4", + "symbol_name": "TraceService", + "qname": "TraceService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 13, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.create_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 61, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3b052062067a78aef3302ee1d996897e02a67d1b340397bea4f59fe147c0492a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a", + "dst_ref": "TraceService.create_context", + "resolution": "resolved", + "slice_id": "3b052062067a78aef3302ee1d996897e02a67d1b340397bea4f59fe147c0492a", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.create_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.close_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 84, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "7a9353ef57c9ae5d19b3a0c6ac50fad05e6d21d31bbe1cd1cd07af6332ba6505", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "01e14158dcced7e52d0c8ac84ac7b9a75225c261b6aca6a1d7da802d0994721c", + "dst_ref": "TraceService.close_context", + "resolution": "resolved", + "slice_id": "7a9353ef57c9ae5d19b3a0c6ac50fad05e6d21d31bbe1cd1cd07af6332ba6505", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.close_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "01e14158dcced7e52d0c8ac84ac7b9a75225c261b6aca6a1d7da802d0994721c" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.open_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 78, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a6e13b9ebc4fed84586afd53ed92a4d14757e440873f572b2337d5622ee96031", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426", + "dst_ref": "TraceService.open_context", + "resolution": "resolved", + "slice_id": "a6e13b9ebc4fed84586afd53ed92a4d14757e440873f572b2337d5622ee96031", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.open_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.transport\n -> TraceService.__init__", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 41, + "span_end": 43, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "1e923a93faa05c3c43ca9b19bd047007a8589ccce57d3cc1798ae7f9f200af98", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "dst_ref": "TraceService.__init__", + "resolution": "resolved", + "slice_id": "1e923a93faa05c3c43ca9b19bd047007a8589ccce57d3cc1798ae7f9f200af98", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.transport", + "TraceService.__init__" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.current_trace_id", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 81, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3ea17138634b1190bded77ddb84aa1595124f6519b246f24fc4b02bd62b5cac1", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c", + "dst_ref": "TraceService.current_trace_id", + "resolution": "resolved", + "slice_id": "3ea17138634b1190bded77ddb84aa1595124f6519b246f24fc4b02bd62b5cac1", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.current_trace_id" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.step", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 88, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "9f34c5da9b09fba99df6f6b1bde183a9aeb45111b8218a747c71590c2c9f60f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "c44bfbc66cf747283f30088da3e011a10395031d41e77b74e523c24997f641ca", + "dst_ref": "TraceService.step", + "resolution": "resolved", + "slice_id": "9f34c5da9b09fba99df6f6b1bde183a9aeb45111b8218a747c71590c2c9f60f2", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.step" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "c44bfbc66cf747283f30088da3e011a10395031d41e77b74e523c24997f641ca" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceRecordWriter:\n def __init__(self, transport: TraceTransport) -> None:\n self._logger = logging.getLogger(__name__)\n self._transport = transport\n\n def write_context(self, record: TraceContextRecord) -> None:\n try:\n self._transport.write_context(record)\n except Exception:\n self._logger.exception(\"Trace transport failed to write context %s\", record.trace_id)\n\n def write_message(self, record: TraceLogMessage) -> None:\n try:\n self._transport.write_message(record)\n except Exception:\n self._logger.exception(\"Trace transport failed to write message for %s\", record.trace_id)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/tracing/service.py:TraceRecordWriter", + "span_start": 21, + "span_end": 36, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceService(TraceContextFactory):\n def __init__(self, transport: TraceTransport | None = None, store: TraceContextStore | None = None) -> None:\n self.transport = transport or NoOpTraceTransport()\n self.store = store or TraceContextStore()\n self._writer = TraceRecordWriter(self.transport)\n\n def create_context(\n self,\n *,\n alias: str,\n parent_id: str | None = None,\n kind: str | None = None,\n attrs: dict[str, Any] | None = None,\n ) -> str:\n record = TraceContextRecord(\n trace_id=uuid4().hex,\n alias=str(alias or \"\"),\n parent_id=parent_id,\n type=kind,\n event_time=utc_now(),\n attrs=dict(attrs or {}),\n )\n self.store.push(record)\n self._writer.write_context(record)\n return record.trace_id\n\n @contextmanager\n def open_context(\n self,\n *,\n alias: str,\n parent_id: str | None = None,\n kind: str | None = None,\n attrs: dict[str, Any] | None = None,\n ) -> Iterator[str]:\n trace_id = self.create_context(alias=alias, parent_id=parent_id, kind=kind, attrs=attrs)\n try:\n yield trace_id\n finally:\n self.store.pop()\n\n def current_trace_id(self) -> str | None:\n return self.store.current_trace_id()\n\n def close_context(self) -> str | None:\n previous = self.store.pop()\n return previous.record.trace_id if previous else None\n\n def step(self, name: str) -> None:\n self.store.set_step(str(name or \"\"))\n\n def info(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"INFO\", message, status, attrs)\n\n def debug(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"DEBUG\", message, status, attrs)\n\n def warning(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"WARNING\", message, status, attrs)\n\n def error(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"ERROR\", message, status, attrs)\n\n def exception(self, message: str, *, status: str = \"failed\", attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"ERROR\", message, status, attrs)\n\n def new_root(self, operation: str) -> TraceContext:\n trace_id = self.create_context(alias=operation, kind=\"operation\", attrs={\"operation\": operation})\n return TraceContext(trace_id=trace_id, span_id=trace_id, attributes={\"operation\": operation})\n\n def child_of(self, parent: TraceContext, operation: str) -> TraceContext:\n trace_id = self.create_context(\n alias=operation,\n parent_id=parent.trace_id,\n kind=\"worker\",\n attrs={\"operation\": operation},\n )\n return TraceContext(\n trace_id=trace_id,\n span_id=trace_id,\n parent_span_id=parent.span_id,\n attributes={\"operation\": operation},\n )\n\n def attach(self, metadata: dict[str, object], context: TraceContext) -> dict[str, object]:\n updated = dict(metadata)\n updated[\"trace_id\"] = context.trace_id\n updated[\"span_id\"] = context.span_id\n updated[\"parent_span_id\"] = context.parent_span_id\n return updated\n\n def resume(self, metadata: dict[str, object], operation: str) -> TraceContext:\n trace_id = str(metadata.get(\"trace_id\") or uuid4().hex)\n span_id = str(metadata.get(\"span_id\") or trace_id)\n parent_id = metadata.get(\"parent_span_id\")\n self.create_context(\n alias=operation,\n parent_id=str(parent_id) if parent_id else None,\n kind=\"worker\",\n attrs=dict(metadata),\n )\n return TraceContext(\n trace_id=trace_id,\n span_id=span_id,\n parent_span_id=str(parent_id) if parent_id else None,\n attributes={\"operation\": operation},\n )\n\n def _write_message(\n self,\n level: TraceLevel,\n message: str,\n status: str | None,\n attrs: dict[str, Any] | None,\n ) -> None:\n active = self.store.current()\n if active is None:\n raise RuntimeError(\"Trace context is not bound. Call create_context() first.\")\n record = TraceLogMessage(\n trace_id=active.record.trace_id,\n step=active.step,\n status=str(status or \"\"),\n message=str(message or \"\"),\n level=level,\n event_time=utc_now(),\n attrs=dict(attrs or {}),\n )\n self._writer.write_message(record)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/tracing/service.py:TraceService", + "span_start": 39, + "span_end": 166, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceManager(TraceService):\n \"\"\"Compatibility alias during the transition from ConfigManager-shaped naming.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/tracing/service.py:TraceManager", + "span_start": 169, + "span_end": 170, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 2, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "1. **Что это и где определено.** \nСущность `TraceService` определена в файле `src/app_runtime/tracing/service.py`. Это класс, наследующий от `TraceContextFactory`.\n\n2. **Назначение по наблюдаемому коду.** \nКласс предназначен для управления контекстами трассировки и записи событий трассировки. Он участвует в обработке данных потока (slice 13), имеет роль «pipeline stage» и отвечает за создание и запись контекста трассировки (`create_context`, `open_context`), а также взаимодействие с транспортировкой контекста через `TraceRecordWriter`.\n\n3. **Подтверждённые зависимости или взаимодействия.** \n`TraceService` зависит от класса `TraceContextStore` и объекта транспорта трассировки (`TraceTransport`). Метод `create_context` использует метод записи контекста `_writer.write_context` для отправки данных в транспортировку. Транспортировка может быть либо реальной реализацией, либо заглушкой (`NoOpTraceTransport()`).\n\n4. **Что делает по шагам, если это видно в контексте.** \n- Конструктор класса инициализирует объект транспорта трассировки и хранилище контекста (если переданы аргументы, иначе создаёт заглушки).\n- Метод `create_context` генерирует уникальный идентификатор трассировки, записывает контекст в хранилище и отправляет его в транспортировку.\n- Метод `open_context` является менеджером контекста, создающим временный контекст трассировки внутри блока с использованием `create_context`.\n\n5. **Осторожные выводы.** \nНа данный момент недостаточно информации о внутреннем устройстве транспорта трассировки и логике хранения контекста. Также нет явных упоминаний о взаимодействии с внешними сервисами или компонентами приложения, кроме явно указанных зависимостей.\n\n6. **Чего не хватает для полного объяснения.** \n- Деталей реализации транспорта трассировки (`TraceTransport`) и хранилища контекста (`TraceContextStore`).\n- Подробности взаимодействия с остальной частью системы (контексты, события, API внешнего уровня).", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS", + "C4_SEMANTIC_ROLES" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "TraceService" + ], + "keyword_hints": [ + "TraceService" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "TraceService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "TraceService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "TraceService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "TraceService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "TraceService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "TraceService", + "alternatives": [ + "TraceService" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 110, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 32, + "C0_SOURCE_CHUNKS": 11, + "C4_SEMANTIC_ROLES": 12, + "C2_DEPENDENCY_GRAPH": 44, + "C3_ENTRYPOINTS": 9 + }, + "merge_rank": 18, + "prompt_build": 0, + "llm_call": 3201 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 991, + "evidence_rows": 14, + "evidence_chars": 6323 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 1 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 3, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_explain_ru_v2", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "TraceService" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 14, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-v2-explain-trace-service", + "mode": "full_chain", + "run_started_at": "2026-03-12T13:23:57", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Объясни как работает класс TraceService", + "normalized_query": "Объясни как работает класс TraceService" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Объясни как работает класс TraceService" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни как работает класс TraceService" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "TraceService" + ], + "keyword_hints": [ + "TraceService" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Объясни как работает класс TraceService" + }, + "output": { + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "TraceService", + "alternatives": [ + "TraceService" + ], + "confidence": 0.99 + }, + "rag_count": 14, + "rag_rows": [ + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceService\nTraceService(TraceContextFactory)", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService", + "span_start": 39, + "span_end": 166, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "c2b2b976d99f2c600000b753731b26e0a69adcb4359398b93073590c5d5d04f4", + "qname": "TraceService", + "kind": "class", + "signature": "TraceService(TraceContextFactory)", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (13)", + "layer": "C4_SEMANTIC_ROLES", + "title": "TraceService", + "span_start": 39, + "span_end": 166, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 60, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "c2b2b976d99f2c600000b753731b26e0a69adcb4359398b93073590c5d5d04f4", + "symbol_name": "TraceService", + "qname": "TraceService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 13, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.create_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 61, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3b052062067a78aef3302ee1d996897e02a67d1b340397bea4f59fe147c0492a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a", + "dst_ref": "TraceService.create_context", + "resolution": "resolved", + "slice_id": "3b052062067a78aef3302ee1d996897e02a67d1b340397bea4f59fe147c0492a", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.create_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.close_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 84, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "7a9353ef57c9ae5d19b3a0c6ac50fad05e6d21d31bbe1cd1cd07af6332ba6505", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "01e14158dcced7e52d0c8ac84ac7b9a75225c261b6aca6a1d7da802d0994721c", + "dst_ref": "TraceService.close_context", + "resolution": "resolved", + "slice_id": "7a9353ef57c9ae5d19b3a0c6ac50fad05e6d21d31bbe1cd1cd07af6332ba6505", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.close_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "01e14158dcced7e52d0c8ac84ac7b9a75225c261b6aca6a1d7da802d0994721c" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.open_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 78, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a6e13b9ebc4fed84586afd53ed92a4d14757e440873f572b2337d5622ee96031", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426", + "dst_ref": "TraceService.open_context", + "resolution": "resolved", + "slice_id": "a6e13b9ebc4fed84586afd53ed92a4d14757e440873f572b2337d5622ee96031", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.open_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.transport\n -> TraceService.__init__", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 41, + "span_end": 43, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "1e923a93faa05c3c43ca9b19bd047007a8589ccce57d3cc1798ae7f9f200af98", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "dst_ref": "TraceService.__init__", + "resolution": "resolved", + "slice_id": "1e923a93faa05c3c43ca9b19bd047007a8589ccce57d3cc1798ae7f9f200af98", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.transport", + "TraceService.__init__" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.current_trace_id", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 81, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3ea17138634b1190bded77ddb84aa1595124f6519b246f24fc4b02bd62b5cac1", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c", + "dst_ref": "TraceService.current_trace_id", + "resolution": "resolved", + "slice_id": "3ea17138634b1190bded77ddb84aa1595124f6519b246f24fc4b02bd62b5cac1", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.current_trace_id" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.step", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 88, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "9f34c5da9b09fba99df6f6b1bde183a9aeb45111b8218a747c71590c2c9f60f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "c44bfbc66cf747283f30088da3e011a10395031d41e77b74e523c24997f641ca", + "dst_ref": "TraceService.step", + "resolution": "resolved", + "slice_id": "9f34c5da9b09fba99df6f6b1bde183a9aeb45111b8218a747c71590c2c9f60f2", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.step" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "c44bfbc66cf747283f30088da3e011a10395031d41e77b74e523c24997f641ca" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceRecordWriter:\n def __init__(self, transport: TraceTransport) -> None:\n self._logger = logging.getLogger(__name__)\n self._transport = transport\n\n def write_context(self, record: TraceContextRecord) -> None:\n try:\n self._transport.write_context(record)\n except Exception:\n self._logger.exception(\"Trace transport failed to write context %s\", record.trace_id)\n\n def write_message(self, record: TraceLogMessage) -> None:\n try:\n self._transport.write_message(record)\n except Exception:\n self._logger.exception(\"Trace transport failed to write message for %s\", record.trace_id)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/tracing/service.py:TraceRecordWriter", + "span_start": 21, + "span_end": 36, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceService(TraceContextFactory):\n def __init__(self, transport: TraceTransport | None = None, store: TraceContextStore | None = None) -> None:\n self.transport = transport or NoOpTraceTransport()\n self.store = store or TraceContextStore()\n self._writer = TraceRecordWriter(self.transport)\n\n def create_context(\n self,\n *,\n alias: str,\n parent_id: str | None = None,\n kind: str | None = None,\n attrs: dict[str, Any] | None = None,\n ) -> str:\n record = TraceContextRecord(\n trace_id=uuid4().hex,\n alias=str(alias or \"\"),\n parent_id=parent_id,\n type=kind,\n event_time=utc_now(),\n attrs=dict(attrs or {}),\n )\n self.store.push(record)\n self._writer.write_context(record)\n return record.trace_id\n\n @contextmanager\n def open_context(\n self,\n *,\n alias: str,\n parent_id: str | None = None,\n kind: str | None = None,\n attrs: dict[str, Any] | None = None,\n ) -> Iterator[str]:\n trace_id = self.create_context(alias=alias, parent_id=parent_id, kind=kind, attrs=attrs)\n try:\n yield trace_id\n finally:\n self.store.pop()\n\n def current_trace_id(self) -> str | None:\n return self.store.current_trace_id()\n\n def close_context(self) -> str | None:\n previous = self.store.pop()\n return previous.record.trace_id if previous else None\n\n def step(self, name: str) -> None:\n self.store.set_step(str(name or \"\"))\n\n def info(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"INFO\", message, status, attrs)\n\n def debug(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"DEBUG\", message, status, attrs)\n\n def warning(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"WARNING\", message, status, attrs)\n\n def error(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"ERROR\", message, status, attrs)\n\n def exception(self, message: str, *, status: str = \"failed\", attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"ERROR\", message, status, attrs)\n\n def new_root(self, operation: str) -> TraceContext:\n trace_id = self.create_context(alias=operation, kind=\"operation\", attrs={\"operation\": operation})\n return TraceContext(trace_id=trace_id, span_id=trace_id, attributes={\"operation\": operation})\n\n def child_of(self, parent: TraceContext, operation: str) -> TraceContext:\n trace_id = self.create_context(\n alias=operation,\n parent_id=parent.trace_id,\n kind=\"worker\",\n attrs={\"operation\": operation},\n )\n return TraceContext(\n trace_id=trace_id,\n span_id=trace_id,\n parent_span_id=parent.span_id,\n attributes={\"operation\": operation},\n )\n\n def attach(self, metadata: dict[str, object], context: TraceContext) -> dict[str, object]:\n updated = dict(metadata)\n updated[\"trace_id\"] = context.trace_id\n updated[\"span_id\"] = context.span_id\n updated[\"parent_span_id\"] = context.parent_span_id\n return updated\n\n def resume(self, metadata: dict[str, object], operation: str) -> TraceContext:\n trace_id = str(metadata.get(\"trace_id\") or uuid4().hex)\n span_id = str(metadata.get(\"span_id\") or trace_id)\n parent_id = metadata.get(\"parent_span_id\")\n self.create_context(\n alias=operation,\n parent_id=str(parent_id) if parent_id else None,\n kind=\"worker\",\n attrs=dict(metadata),\n )\n return TraceContext(\n trace_id=trace_id,\n span_id=span_id,\n parent_span_id=str(parent_id) if parent_id else None,\n attributes={\"operation\": operation},\n )\n\n def _write_message(\n self,\n level: TraceLevel,\n message: str,\n status: str | None,\n attrs: dict[str, Any] | None,\n ) -> None:\n active = self.store.current()\n if active is None:\n raise RuntimeError(\"Trace context is not bound. Call create_context() first.\")\n record = TraceLogMessage(\n trace_id=active.record.trace_id,\n step=active.step,\n status=str(status or \"\"),\n message=str(message or \"\"),\n level=level,\n event_time=utc_now(),\n attrs=dict(attrs or {}),\n )\n self._writer.write_message(record)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/tracing/service.py:TraceService", + "span_start": 39, + "span_end": 166, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceManager(TraceService):\n \"\"\"Compatibility alias during the transition from ConfigManager-shaped naming.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/tracing/service.py:TraceManager", + "span_start": 169, + "span_end": 170, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 2, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "TraceService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "TraceService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "TraceService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "TraceService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "TraceService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "TraceService", + "alternatives": [ + "TraceService" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 110, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 32, + "C0_SOURCE_CHUNKS": 11, + "C4_SEMANTIC_ROLES": 12, + "C2_DEPENDENCY_GRAPH": 44, + "C3_ENTRYPOINTS": 9 + }, + "merge_rank": 18 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Объясни как работает класс TraceService", + "rag_count": 14 + }, + "output": { + "llm_answer": "1. **Что это и где определено.** \nСущность `TraceService` определена в файле `src/app_runtime/tracing/service.py`. Это класс, наследующий от `TraceContextFactory`.\n\n2. **Назначение по наблюдаемому коду.** \nКласс предназначен для управления контекстами трассировки и записи событий трассировки. Он участвует в обработке данных потока (slice 13), имеет роль «pipeline stage» и отвечает за создание и запись контекста трассировки (`create_context`, `open_context`), а также взаимодействие с транспортировкой контекста через `TraceRecordWriter`.\n\n3. **Подтверждённые зависимости или взаимодействия.** \n`TraceService` зависит от класса `TraceContextStore` и объекта транспорта трассировки (`TraceTransport`). Метод `create_context` использует метод записи контекста `_writer.write_context` для отправки данных в транспортировку. Транспортировка может быть либо реальной реализацией, либо заглушкой (`NoOpTraceTransport()`).\n\n4. **Что делает по шагам, если это видно в контексте.** \n- Конструктор класса инициализирует объект транспорта трассировки и хранилище контекста (если переданы аргументы, иначе создаёт заглушки).\n- Метод `create_context` генерирует уникальный идентификатор трассировки, записывает контекст в хранилище и отправляет его в транспортировку.\n- Метод `open_context` является менеджером контекста, создающим временный контекст трассировки внутри блока с использованием `create_context`.\n\n5. **Осторожные выводы.** \nНа данный момент недостаточно информации о внутреннем устройстве транспорта трассировки и логике хранения контекста. Также нет явных упоминаний о взаимодействии с внешними сервисами или компонентами приложения, кроме явно указанных зависимостей.\n\n6. **Чего не хватает для полного объяснения.** \n- Деталей реализации транспорта трассировки (`TraceTransport`) и хранилища контекста (`TraceContextStore`).\n- Подробности взаимодействия с остальной частью системы (контексты, события, API внешнего уровня)." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 991, + "evidence_rows": 14, + "evidence_chars": 6323 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 1 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 3, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_explain_ru_v2", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 3201 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-explain-trace-service.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-explain-trace-service.md new file mode 100644 index 0000000..64ccf81 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-explain-trace-service.md @@ -0,0 +1,34 @@ +# plba-v2-explain-trace-service + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Объясни как работает класс TraceService + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 14, + "llm_answer": "1. **Что это и где определено.** \nСущность `TraceService` определена в файле `src/app_runtime/tracing/service.py`. Это класс, наследующий от `TraceContextFactory`.\n\n2. **Назначение по наблюдаемому коду.** \nКласс предназначен для управления контекстами трассировки и записи событий трассировки. Он участвует в обработке данных потока (slice 13), имеет роль «pipeline stage» и отвечает за создание и запись контекста трассировки (`create_context`, `open_context`), а также взаимодействие с транспортировкой контекста через `TraceRecordWriter`.\n\n3. **Подтверждённые зависимости или взаимодействия.** \n`TraceService` зависит от класса `TraceContextStore` и объекта транспорта трассировки (`TraceTransport`). Метод `create_context` использует метод записи контекста `_writer.write_context` для отправки данных в транспортировку. Транспортировка может быть либо реальной реализацией, либо заглушкой (`NoOpTraceTransport()`).\n\n4. **Что делает по шагам, если это видно в контексте.** \n- Конструктор класса инициализирует объект транспорта трассировки и хранилище контекста (если переданы аргументы, иначе создаёт заглушки).\n- Метод `create_context` генерирует уникальный идентификатор трассировки, записывает контекст в хранилище и отправляет его в транспортировку.\n- Метод `open_context` является менеджером контекста, создающим временный контекст трассировки внутри блока с использованием `create_context`.\n\n5. **Осторожные выводы.** \nНа данный момент недостаточно информации о внутреннем устройстве транспорта трассировки и логике хранения контекста. Также нет явных упоминаний о взаимодействии с внешними сервисами или компонентами приложения, кроме явно указанных зависимостей.\n\n6. **Чего не хватает для полного объяснения.** \n- Деталей реализации транспорта трассировки (`TraceTransport`) и хранилища контекста (`TraceContextStore`).\n- Подробности взаимодействия с остальной частью системы (контексты, события, API внешнего уровня).", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "TraceService" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-control-plane.json b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-control-plane.json new file mode 100644 index 0000000..b341abd --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-control-plane.json @@ -0,0 +1,1236 @@ +{ + "case_id": "plba-v2-find-entrypoints-control-plane", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 9, + "llm_answer": "Подтверждённые точки входа:\nsrc/app_runtime/control/http_app.py | fastapi http app.get\n- Объявлена декоратором @app.get, что указывает на точку входа для HTTP-запросов.\nsrc/app_runtime/control/http_app.py | fastapi http app.post\n- Объявлена декоратором @app.post, что указывает на точку входа для HTTP-запросов.\n\nВозможные кандидаты:\nsrc/app_runtime/control/http_channel.py | HttpControlChannel.start\n- Содержит асинхронную операцию start, которая может запускать приложение, но явных признаков точки входа нет.\nsrc/app_runtime/control/http_channel.py | HttpControlChannel._health_response\n- Реализует логику обработки health-запроса, но сама по себе не является точкой входа.\nsrc/app_runtime/control/http_channel.py | HttpControlChannel._action_response\n- Реализует обработку запросов к действиям, но без явного декоратора или указания на точку входа.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "HTTP", + "control", + "plane" + ], + "layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-v2-find-entrypoints-control-plane", + "text": "Найди точки входа HTTP control plane", + "mode": "full_chain", + "run_started_at": "2026-03-12T13:23:57", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Найди точки входа HTTP control plane", + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "HTTP", + "control", + "plane" + ], + "confidence": 0.0 + }, + "rag_count": 9, + "rag_rows": [ + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel(ControlChannel):\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._timeout = timeout\n self._runner = UvicornThreadRunner(host, port, timeout)\n self._factory = HttpControlAppFactory()\n self._actions: ControlActionSet | None = None\n\n async def start(self, actions: ControlActionSet) -> None:\n self._actions = actions\n app = self._factory.create(self._health_response, self._action_response)\n await self._runner.start(app)\n\n async def stop(self) -> None:\n await self._runner.stop()\n\n @property\n def port(self) -> int:\n return self._runner.port\n\n async def _health_response(self) -> dict[str, object]:\n if self._actions is None:\n return {\"status\": \"unhealthy\", \"detail\": \"control actions are not configured\"}\n return await asyncio.wait_for(self._actions.health(), timeout=float(self._timeout))\n\n async def _action_response(self, action: str, _client_source: str = \"unknown\") -> JSONResponse:\n if self._actions is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"{action} handler is not configured\"}, status_code=404)\n callbacks = {\n \"start\": self._actions.start,\n \"stop\": self._actions.stop,\n \"status\": self._actions.status,\n }\n callback = callbacks.get(action)\n if callback is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"unsupported action: {action}\"}, status_code=404)\n action_timeout = max(float(self._timeout), 10.0) if action in {\"start\", \"stop\"} else float(self._timeout)\n try:\n detail = await asyncio.wait_for(callback(), timeout=action_timeout)\n except asyncio.TimeoutError:\n return JSONResponse(\n content={\"status\": \"accepted\", \"detail\": f\"{action} operation is still in progress\"},\n status_code=202,\n )\n except Exception as exc:\n return JSONResponse(content={\"status\": \"error\", \"detail\": str(exc)}, status_code=500)\n return JSONResponse(content={\"status\": \"ok\", \"detail\": detail or f\"{action} action accepted\"}, status_code=200)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_channel.py:HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "class HttpControlAppFactory:\n def create(\n self,\n health_provider: Callable[[], Awaitable[HealthPayload]],\n action_provider: Callable[[str, str], Awaitable[JSONResponse]],\n ) -> FastAPI:\n app = FastAPI(title=\"PLBA Control API\")\n\n @app.middleware(\"http\")\n async def log_api_call(request: Request, call_next): # type: ignore[no-untyped-def]\n started = time.monotonic()\n response = await call_next(request)\n response.headers[\"X-Response-Time-Ms\"] = str(int((time.monotonic() - started) * 1000))\n return response\n\n @app.get(\"/health\")\n async def health() -> JSONResponse:\n payload = await health_provider()\n status_code = 200 if payload.get(\"status\") == \"ok\" else 503\n return JSONResponse(content=payload, status_code=status_code)\n\n @app.get(\"/actions/{action}\")\n @app.post(\"/actions/{action}\")\n async def action(action: str, request: Request) -> JSONResponse:\n client_source = self._client_source(request)\n if action in {\"start\", \"stop\"}:\n LOGGER.warning(\"Control action requested: /actions/%s client=%s\", action, client_source)\n return await action_provider(action, client_source)\n\n return app\n\n def _client_source(self, request: Request) -> str:\n explicit_header = request.headers.get(\"X-Client-Source\", \"\").strip()\n if explicit_header:\n return explicit_header\n user_agent = request.headers.get(\"User-Agent\", \"\").strip()\n if user_agent:\n return f\"user-agent:{user_agent}\"\n return \"unknown\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_app.py:HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlActionSet:\n health: HealthHandler\n start: ActionHandler\n stop: ActionHandler\n status: ActionHandler", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\"ControlActionSet\", \"ControlChannel\", \"ControlPlaneService\", \"HttpControlChannel\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/__init__.py:1-5", + "span_start": 1, + "span_end": 5, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlChannel(ABC):\n @abstractmethod\n async def start(self, actions: ControlActionSet) -> None:\n \"\"\"Start the control channel and bind handlers.\"\"\"\n\n @abstractmethod\n async def stop(self) -> None:\n \"\"\"Stop the control channel and release resources.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "class UvicornThreadRunner:\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._host = host\n self._port = port\n self._timeout = timeout\n self._server: Server | None = None\n self._thread: Thread | None = None\n self._error: BaseException | None = None\n\n async def start(self, app: FastAPI) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._error = None\n config = Config(app=app, host=self._host, port=self._port, log_level=\"warning\")\n self._server = Server(config)\n self._thread = Thread(target=self._serve, name=\"plba-http-control\", daemon=True)\n self._thread.start()\n await self._wait_until_started()\n\n async def stop(self) -> None:\n if self._server is None or self._thread is None:\n return\n self._server.should_exit = True\n await asyncio.to_thread(self._thread.join, self._timeout)\n self._server = None\n self._thread = None\n\n @property\n def port(self) -> int:\n if self._server is None or not getattr(self._server, \"servers\", None):\n return self._port\n socket = self._server.servers[0].sockets[0]\n return int(socket.getsockname()[1])\n\n async def _wait_until_started(self) -> None:\n if self._server is None:\n raise RuntimeError(\"Server is not initialized\")\n deadline = asyncio.get_running_loop().time() + max(float(self._timeout), 1.0)\n while not self._server.started:\n if self._error is not None:\n raise RuntimeError(\"HTTP control server failed to start\") from self._error\n if asyncio.get_running_loop().time() >= deadline:\n raise TimeoutError(\"HTTP control server startup timed out\")\n await asyncio.sleep(0.05)\n\n def _serve(self) -> None:\n if self._server is None:\n return\n try:\n asyncio.run(self._server.serve())\n except BaseException as exc: # noqa: BLE001\n self._error = exc", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_runner.py:UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_runner", + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "Подтверждённые точки входа:\nsrc/app_runtime/control/http_app.py | fastapi http app.get\n- Объявлена декоратором @app.get, что указывает на точку входа для HTTP-запросов.\nsrc/app_runtime/control/http_app.py | fastapi http app.post\n- Объявлена декоратором @app.post, что указывает на точку входа для HTTP-запросов.\n\nВозможные кандидаты:\nsrc/app_runtime/control/http_channel.py | HttpControlChannel.start\n- Содержит асинхронную операцию start, которая может запускать приложение, но явных признаков точки входа нет.\nsrc/app_runtime/control/http_channel.py | HttpControlChannel._health_response\n- Реализует логику обработки health-запроса, но сама по себе не является точкой входа.\nsrc/app_runtime/control/http_channel.py | HttpControlChannel._action_response\n- Реализует обработку запросов к действиям, но без явного декоратора или указания на точку входа.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C3_ENTRYPOINTS" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "HTTP", + "control", + "plane" + ], + "keyword_hints": [ + "HTTP", + "control", + "plane" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C3_ENTRYPOINTS": "exact_path_fetch", + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C3_ENTRYPOINTS": 12, + "C0_SOURCE_CHUNKS": 6 + }, + "filters_by_layer": { + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C3_ENTRYPOINTS", + "query": "Найди точки входа HTTP control plane", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 12, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Найди точки входа HTTP control plane", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "HTTP", + "control", + "plane" + ] + }, + "layers": [ + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 6, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 53, + "retrieval_by_layer": { + "C3_ENTRYPOINTS": 28, + "C0_SOURCE_CHUNKS": 25 + }, + "merge_rank": 0, + "prompt_build": 0, + "llm_call": 1612 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 1094, + "evidence_rows": 9, + "evidence_chars": 6731 + }, + "evidence_summary": [ + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 6, + "unique_paths": 5 + } + ], + "prompt_template_id": "intent_code_qa_find_entrypoints_ru_v2", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "HTTP", + "control", + "plane" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 9, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-v2-find-entrypoints-control-plane", + "mode": "full_chain", + "run_started_at": "2026-03-12T13:23:57", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Найди точки входа HTTP control plane", + "normalized_query": "Найди точки входа HTTP control plane" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Найди точки входа HTTP control plane" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Найди точки входа HTTP control plane" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "HTTP", + "control", + "plane" + ], + "keyword_hints": [ + "HTTP", + "control", + "plane" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Найди точки входа HTTP control plane" + }, + "output": { + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "HTTP", + "control", + "plane" + ], + "confidence": 0.0 + }, + "rag_count": 9, + "rag_rows": [ + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel(ControlChannel):\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._timeout = timeout\n self._runner = UvicornThreadRunner(host, port, timeout)\n self._factory = HttpControlAppFactory()\n self._actions: ControlActionSet | None = None\n\n async def start(self, actions: ControlActionSet) -> None:\n self._actions = actions\n app = self._factory.create(self._health_response, self._action_response)\n await self._runner.start(app)\n\n async def stop(self) -> None:\n await self._runner.stop()\n\n @property\n def port(self) -> int:\n return self._runner.port\n\n async def _health_response(self) -> dict[str, object]:\n if self._actions is None:\n return {\"status\": \"unhealthy\", \"detail\": \"control actions are not configured\"}\n return await asyncio.wait_for(self._actions.health(), timeout=float(self._timeout))\n\n async def _action_response(self, action: str, _client_source: str = \"unknown\") -> JSONResponse:\n if self._actions is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"{action} handler is not configured\"}, status_code=404)\n callbacks = {\n \"start\": self._actions.start,\n \"stop\": self._actions.stop,\n \"status\": self._actions.status,\n }\n callback = callbacks.get(action)\n if callback is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"unsupported action: {action}\"}, status_code=404)\n action_timeout = max(float(self._timeout), 10.0) if action in {\"start\", \"stop\"} else float(self._timeout)\n try:\n detail = await asyncio.wait_for(callback(), timeout=action_timeout)\n except asyncio.TimeoutError:\n return JSONResponse(\n content={\"status\": \"accepted\", \"detail\": f\"{action} operation is still in progress\"},\n status_code=202,\n )\n except Exception as exc:\n return JSONResponse(content={\"status\": \"error\", \"detail\": str(exc)}, status_code=500)\n return JSONResponse(content={\"status\": \"ok\", \"detail\": detail or f\"{action} action accepted\"}, status_code=200)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_channel.py:HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "class HttpControlAppFactory:\n def create(\n self,\n health_provider: Callable[[], Awaitable[HealthPayload]],\n action_provider: Callable[[str, str], Awaitable[JSONResponse]],\n ) -> FastAPI:\n app = FastAPI(title=\"PLBA Control API\")\n\n @app.middleware(\"http\")\n async def log_api_call(request: Request, call_next): # type: ignore[no-untyped-def]\n started = time.monotonic()\n response = await call_next(request)\n response.headers[\"X-Response-Time-Ms\"] = str(int((time.monotonic() - started) * 1000))\n return response\n\n @app.get(\"/health\")\n async def health() -> JSONResponse:\n payload = await health_provider()\n status_code = 200 if payload.get(\"status\") == \"ok\" else 503\n return JSONResponse(content=payload, status_code=status_code)\n\n @app.get(\"/actions/{action}\")\n @app.post(\"/actions/{action}\")\n async def action(action: str, request: Request) -> JSONResponse:\n client_source = self._client_source(request)\n if action in {\"start\", \"stop\"}:\n LOGGER.warning(\"Control action requested: /actions/%s client=%s\", action, client_source)\n return await action_provider(action, client_source)\n\n return app\n\n def _client_source(self, request: Request) -> str:\n explicit_header = request.headers.get(\"X-Client-Source\", \"\").strip()\n if explicit_header:\n return explicit_header\n user_agent = request.headers.get(\"User-Agent\", \"\").strip()\n if user_agent:\n return f\"user-agent:{user_agent}\"\n return \"unknown\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_app.py:HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlActionSet:\n health: HealthHandler\n start: ActionHandler\n stop: ActionHandler\n status: ActionHandler", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\"ControlActionSet\", \"ControlChannel\", \"ControlPlaneService\", \"HttpControlChannel\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/__init__.py:1-5", + "span_start": 1, + "span_end": 5, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlChannel(ABC):\n @abstractmethod\n async def start(self, actions: ControlActionSet) -> None:\n \"\"\"Start the control channel and bind handlers.\"\"\"\n\n @abstractmethod\n async def stop(self) -> None:\n \"\"\"Stop the control channel and release resources.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "class UvicornThreadRunner:\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._host = host\n self._port = port\n self._timeout = timeout\n self._server: Server | None = None\n self._thread: Thread | None = None\n self._error: BaseException | None = None\n\n async def start(self, app: FastAPI) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._error = None\n config = Config(app=app, host=self._host, port=self._port, log_level=\"warning\")\n self._server = Server(config)\n self._thread = Thread(target=self._serve, name=\"plba-http-control\", daemon=True)\n self._thread.start()\n await self._wait_until_started()\n\n async def stop(self) -> None:\n if self._server is None or self._thread is None:\n return\n self._server.should_exit = True\n await asyncio.to_thread(self._thread.join, self._timeout)\n self._server = None\n self._thread = None\n\n @property\n def port(self) -> int:\n if self._server is None or not getattr(self._server, \"servers\", None):\n return self._port\n socket = self._server.servers[0].sockets[0]\n return int(socket.getsockname()[1])\n\n async def _wait_until_started(self) -> None:\n if self._server is None:\n raise RuntimeError(\"Server is not initialized\")\n deadline = asyncio.get_running_loop().time() + max(float(self._timeout), 1.0)\n while not self._server.started:\n if self._error is not None:\n raise RuntimeError(\"HTTP control server failed to start\") from self._error\n if asyncio.get_running_loop().time() >= deadline:\n raise TimeoutError(\"HTTP control server startup timed out\")\n await asyncio.sleep(0.05)\n\n def _serve(self) -> None:\n if self._server is None:\n return\n try:\n asyncio.run(self._server.serve())\n except BaseException as exc: # noqa: BLE001\n self._error = exc", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_runner.py:UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_runner", + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C3_ENTRYPOINTS": "exact_path_fetch", + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C3_ENTRYPOINTS": 12, + "C0_SOURCE_CHUNKS": 6 + }, + "filters_by_layer": { + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C3_ENTRYPOINTS", + "query": "Найди точки входа HTTP control plane", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 12, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Найди точки входа HTTP control plane", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "HTTP", + "control", + "plane" + ] + }, + "layers": [ + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 6, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 53, + "retrieval_by_layer": { + "C3_ENTRYPOINTS": 28, + "C0_SOURCE_CHUNKS": 25 + }, + "merge_rank": 0 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Найди точки входа HTTP control plane", + "rag_count": 9 + }, + "output": { + "llm_answer": "Подтверждённые точки входа:\nsrc/app_runtime/control/http_app.py | fastapi http app.get\n- Объявлена декоратором @app.get, что указывает на точку входа для HTTP-запросов.\nsrc/app_runtime/control/http_app.py | fastapi http app.post\n- Объявлена декоратором @app.post, что указывает на точку входа для HTTP-запросов.\n\nВозможные кандидаты:\nsrc/app_runtime/control/http_channel.py | HttpControlChannel.start\n- Содержит асинхронную операцию start, которая может запускать приложение, но явных признаков точки входа нет.\nsrc/app_runtime/control/http_channel.py | HttpControlChannel._health_response\n- Реализует логику обработки health-запроса, но сама по себе не является точкой входа.\nsrc/app_runtime/control/http_channel.py | HttpControlChannel._action_response\n- Реализует обработку запросов к действиям, но без явного декоратора или указания на точку входа." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 1094, + "evidence_rows": 9, + "evidence_chars": 6731 + }, + "evidence_summary": [ + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 6, + "unique_paths": 5 + } + ], + "prompt_template_id": "intent_code_qa_find_entrypoints_ru_v2", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 1612 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-control-plane.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-control-plane.md new file mode 100644 index 0000000..67b287e --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-control-plane.md @@ -0,0 +1,33 @@ +# plba-v2-find-entrypoints-control-plane + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Найди точки входа HTTP control plane + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 9, + "llm_answer": "Подтверждённые точки входа:\nsrc/app_runtime/control/http_app.py | fastapi http app.get\n- Объявлена декоратором @app.get, что указывает на точку входа для HTTP-запросов.\nsrc/app_runtime/control/http_app.py | fastapi http app.post\n- Объявлена декоратором @app.post, что указывает на точку входа для HTTP-запросов.\n\nВозможные кандидаты:\nsrc/app_runtime/control/http_channel.py | HttpControlChannel.start\n- Содержит асинхронную операцию start, которая может запускать приложение, но явных признаков точки входа нет.\nsrc/app_runtime/control/http_channel.py | HttpControlChannel._health_response\n- Реализует логику обработки health-запроса, но сама по себе не является точкой входа.\nsrc/app_runtime/control/http_channel.py | HttpControlChannel._action_response\n- Реализует обработку запросов к действиям, но без явного декоратора или указания на точку входа.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "HTTP", + "control", + "plane" + ], + "layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-health-endpoint.json b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-health-endpoint.json new file mode 100644 index 0000000..f325a96 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-health-endpoint.json @@ -0,0 +1,1226 @@ +{ + "case_id": "plba-v2-find-entrypoints-health-endpoint", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 9, + "llm_answer": "### Подтверждённые точки входа\n\nsrc/app_runtime/control/http_app.py | app.post \nFastAPI HTTP app.post \nОписание: FastAPI маршрутизатор автоматически регистрирует маршруты при старте приложения, что делает эту точку старта подтвержденной.\n\nsrc/app_runtime/control/http_app.py | app.get \nFastAPI HTTP app.get \nОписание: Аналогично предыдущему пункту, FastAPI маршрутизатор регистрирует маршруты при старте приложения, делая эту точку старта подтвержденной.\n\n### Возможные кандидаты\n\nsrc/app_runtime/health/registry.py | HealthRegistry \nОписание: Класс HealthRegistry используется для регистрации и управления health-конtributors. Сам по себе класс не является точкой входа, но может быть использован в контексте health-endpoint'а. Требуется дополнительная проверка в коде использования данного класса.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "health", + "endpoint" + ], + "layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-v2-find-entrypoints-health-endpoint", + "text": "Где health endpoint?", + "mode": "full_chain", + "run_started_at": "2026-03-12T13:23:57", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Где health endpoint?", + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "health", + "endpoint" + ], + "confidence": 0.0 + }, + "rag_count": 9, + "rag_rows": [ + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/health/registry.py", + "content": "class HealthRegistry:\n def __init__(self) -> None:\n self._contributors: list[HealthContributor] = []\n\n def register(self, contributor: HealthContributor) -> None:\n self._contributors.append(contributor)\n\n def contributor_healths(self) -> list[WorkerHealth]:\n return [contributor.health() for contributor in self._contributors]\n\n def snapshot(self, worker_healths: list[WorkerHealth]) -> dict[str, object]:\n component_healths = worker_healths + self.contributor_healths()\n return {\n \"status\": self._aggregate_status(component_healths),\n \"components\": [self._health_dict(item) for item in component_healths],\n }\n\n def payload(self, state: LifecycleState, worker_healths: list[WorkerHealth]) -> HealthPayload:\n component_healths = worker_healths + self.contributor_healths()\n if state == LifecycleState.STOPPED:\n return {\"status\": \"unhealthy\", \"detail\": \"state=stopped\", \"state\": state.value}\n if state in {LifecycleState.STARTING, LifecycleState.STOPPING}:\n return {\n \"status\": \"degraded\",\n \"detail\": f\"state={state.value}\",\n \"state\": state.value,\n \"components\": [self._health_dict(item) for item in component_healths],\n }\n return {\n \"status\": self._aggregate_status(component_healths),\n \"state\": state.value,\n \"components\": [self._health_dict(item) for item in component_healths],\n }\n\n def _aggregate_status(self, component_healths: list[WorkerHealth]) -> str:\n if any(item.status == \"unhealthy\" and item.critical for item in component_healths):\n return \"unhealthy\"\n if any(item.status in {\"degraded\", \"unhealthy\"} for item in component_healths):\n return \"degraded\"\n return \"ok\"\n\n def _health_dict(self, health: WorkerHealth) -> dict[str, object]:\n return {\n \"name\": health.name,\n \"status\": health.status,\n \"critical\": health.critical,\n \"detail\": health.detail,\n \"meta\": health.meta,\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/health/registry.py:HealthRegistry", + "span_start": 8, + "span_end": 56, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.health.registry", + "is_test": false, + "blob_sha": "26e6a24daa43407ba5340b74497c20153020e79f8d7828ae502aaec378dfcf75", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/health.py", + "content": "from app_runtime.health.registry import HealthRegistry\n\n__all__ = [\"HealthRegistry\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/health/__init__.py:1-3", + "span_start": 1, + "span_end": 3, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.health.__init__", + "is_test": false, + "blob_sha": "f7b15eed8b1f1cca8dfd467909a2612d8cb4e66e46b972ad89a0c9459ce283a0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/health.py", + "content": "class HealthContributor(ABC):\n @abstractmethod\n def health(self) -> WorkerHealth:\n \"\"\"Return contributor health state.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/contracts/health.py:HealthContributor", + "span_start": 7, + "span_end": 10, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.health", + "is_test": false, + "blob_sha": "6bd92611def7131e32d4dd34a8ed85e6cf3c67722ad27797032a632cb30dc097", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/health/__init__.py", + "content": "from app_runtime.health.registry import HealthRegistry\n\n__all__ = [\"HealthRegistry\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/health/__init__.py:1-3", + "span_start": 1, + "span_end": 3, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.health.__init__", + "is_test": false, + "blob_sha": "f7b15eed8b1f1cca8dfd467909a2612d8cb4e66e46b972ad89a0c9459ce283a0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/worker.py", + "content": "class WorkerHealth:\n name: str\n status: HealthState\n critical: bool\n detail: str | None = None\n meta: dict[str, Any] = field(default_factory=dict)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/contracts/worker.py:WorkerHealth", + "span_start": 13, + "span_end": 18, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.worker", + "is_test": false, + "blob_sha": "e4827d32220f322d8adc3e42769da3ca0cc680db6a5eab7a11f4d8773a75304e", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/worker.py", + "content": "class Worker(ABC):\n @property\n @abstractmethod\n def name(self) -> str:\n \"\"\"Stable worker name for diagnostics.\"\"\"\n\n @property\n @abstractmethod\n def critical(self) -> bool:\n \"\"\"Whether this worker is required for healthy app operation.\"\"\"\n\n @abstractmethod\n def start(self) -> None:\n \"\"\"Start worker execution.\"\"\"\n\n @abstractmethod\n def stop(self, force: bool = False) -> None:\n \"\"\"Request graceful or immediate stop.\"\"\"\n\n @abstractmethod\n def health(self) -> WorkerHealth:\n \"\"\"Return current health state.\"\"\"\n\n @abstractmethod\n def status(self) -> WorkerStatus:\n \"\"\"Return current runtime status.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/contracts/worker.py:Worker", + "span_start": 30, + "span_end": 55, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 2, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.worker", + "is_test": false, + "blob_sha": "e4827d32220f322d8adc3e42769da3ca0cc680db6a5eab7a11f4d8773a75304e", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "### Подтверждённые точки входа\n\nsrc/app_runtime/control/http_app.py | app.post \nFastAPI HTTP app.post \nОписание: FastAPI маршрутизатор автоматически регистрирует маршруты при старте приложения, что делает эту точку старта подтвержденной.\n\nsrc/app_runtime/control/http_app.py | app.get \nFastAPI HTTP app.get \nОписание: Аналогично предыдущему пункту, FastAPI маршрутизатор регистрирует маршруты при старте приложения, делая эту точку старта подтвержденной.\n\n### Возможные кандидаты\n\nsrc/app_runtime/health/registry.py | HealthRegistry \nОписание: Класс HealthRegistry используется для регистрации и управления health-конtributors. Сам по себе класс не является точкой входа, но может быть использован в контексте health-endpoint'а. Требуется дополнительная проверка в коде использования данного класса.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C3_ENTRYPOINTS" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "unknown", + "symbol_candidates": [ + "health", + "endpoint" + ], + "keyword_hints": [ + "health", + "endpoint" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C3_ENTRYPOINTS": "exact_path_fetch", + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C3_ENTRYPOINTS": 12, + "C0_SOURCE_CHUNKS": 6 + }, + "filters_by_layer": { + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C3_ENTRYPOINTS", + "query": "Где health endpoint?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 12, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Где health endpoint?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "health", + "endpoint" + ] + }, + "layers": [ + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 6, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 54, + "retrieval_by_layer": { + "C3_ENTRYPOINTS": 26, + "C0_SOURCE_CHUNKS": 27 + }, + "merge_rank": 0, + "prompt_build": 0, + "llm_call": 1313 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 803, + "evidence_rows": 9, + "evidence_chars": 3350 + }, + "evidence_summary": [ + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 6, + "unique_paths": 5 + } + ], + "prompt_template_id": "intent_code_qa_find_entrypoints_ru_v2", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "health", + "endpoint" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 9, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-v2-find-entrypoints-health-endpoint", + "mode": "full_chain", + "run_started_at": "2026-03-12T13:23:57", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Где health endpoint?", + "normalized_query": "Где health endpoint?" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Где health endpoint?" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Где health endpoint?" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "unknown", + "symbol_candidates": [ + "health", + "endpoint" + ], + "keyword_hints": [ + "health", + "endpoint" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Где health endpoint?" + }, + "output": { + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "health", + "endpoint" + ], + "confidence": 0.0 + }, + "rag_count": 9, + "rag_rows": [ + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/health/registry.py", + "content": "class HealthRegistry:\n def __init__(self) -> None:\n self._contributors: list[HealthContributor] = []\n\n def register(self, contributor: HealthContributor) -> None:\n self._contributors.append(contributor)\n\n def contributor_healths(self) -> list[WorkerHealth]:\n return [contributor.health() for contributor in self._contributors]\n\n def snapshot(self, worker_healths: list[WorkerHealth]) -> dict[str, object]:\n component_healths = worker_healths + self.contributor_healths()\n return {\n \"status\": self._aggregate_status(component_healths),\n \"components\": [self._health_dict(item) for item in component_healths],\n }\n\n def payload(self, state: LifecycleState, worker_healths: list[WorkerHealth]) -> HealthPayload:\n component_healths = worker_healths + self.contributor_healths()\n if state == LifecycleState.STOPPED:\n return {\"status\": \"unhealthy\", \"detail\": \"state=stopped\", \"state\": state.value}\n if state in {LifecycleState.STARTING, LifecycleState.STOPPING}:\n return {\n \"status\": \"degraded\",\n \"detail\": f\"state={state.value}\",\n \"state\": state.value,\n \"components\": [self._health_dict(item) for item in component_healths],\n }\n return {\n \"status\": self._aggregate_status(component_healths),\n \"state\": state.value,\n \"components\": [self._health_dict(item) for item in component_healths],\n }\n\n def _aggregate_status(self, component_healths: list[WorkerHealth]) -> str:\n if any(item.status == \"unhealthy\" and item.critical for item in component_healths):\n return \"unhealthy\"\n if any(item.status in {\"degraded\", \"unhealthy\"} for item in component_healths):\n return \"degraded\"\n return \"ok\"\n\n def _health_dict(self, health: WorkerHealth) -> dict[str, object]:\n return {\n \"name\": health.name,\n \"status\": health.status,\n \"critical\": health.critical,\n \"detail\": health.detail,\n \"meta\": health.meta,\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/health/registry.py:HealthRegistry", + "span_start": 8, + "span_end": 56, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.health.registry", + "is_test": false, + "blob_sha": "26e6a24daa43407ba5340b74497c20153020e79f8d7828ae502aaec378dfcf75", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/health.py", + "content": "from app_runtime.health.registry import HealthRegistry\n\n__all__ = [\"HealthRegistry\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/health/__init__.py:1-3", + "span_start": 1, + "span_end": 3, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.health.__init__", + "is_test": false, + "blob_sha": "f7b15eed8b1f1cca8dfd467909a2612d8cb4e66e46b972ad89a0c9459ce283a0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/health.py", + "content": "class HealthContributor(ABC):\n @abstractmethod\n def health(self) -> WorkerHealth:\n \"\"\"Return contributor health state.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/contracts/health.py:HealthContributor", + "span_start": 7, + "span_end": 10, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.health", + "is_test": false, + "blob_sha": "6bd92611def7131e32d4dd34a8ed85e6cf3c67722ad27797032a632cb30dc097", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/health/__init__.py", + "content": "from app_runtime.health.registry import HealthRegistry\n\n__all__ = [\"HealthRegistry\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/health/__init__.py:1-3", + "span_start": 1, + "span_end": 3, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.health.__init__", + "is_test": false, + "blob_sha": "f7b15eed8b1f1cca8dfd467909a2612d8cb4e66e46b972ad89a0c9459ce283a0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/worker.py", + "content": "class WorkerHealth:\n name: str\n status: HealthState\n critical: bool\n detail: str | None = None\n meta: dict[str, Any] = field(default_factory=dict)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/contracts/worker.py:WorkerHealth", + "span_start": 13, + "span_end": 18, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.worker", + "is_test": false, + "blob_sha": "e4827d32220f322d8adc3e42769da3ca0cc680db6a5eab7a11f4d8773a75304e", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/worker.py", + "content": "class Worker(ABC):\n @property\n @abstractmethod\n def name(self) -> str:\n \"\"\"Stable worker name for diagnostics.\"\"\"\n\n @property\n @abstractmethod\n def critical(self) -> bool:\n \"\"\"Whether this worker is required for healthy app operation.\"\"\"\n\n @abstractmethod\n def start(self) -> None:\n \"\"\"Start worker execution.\"\"\"\n\n @abstractmethod\n def stop(self, force: bool = False) -> None:\n \"\"\"Request graceful or immediate stop.\"\"\"\n\n @abstractmethod\n def health(self) -> WorkerHealth:\n \"\"\"Return current health state.\"\"\"\n\n @abstractmethod\n def status(self) -> WorkerStatus:\n \"\"\"Return current runtime status.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/contracts/worker.py:Worker", + "span_start": 30, + "span_end": 55, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 2, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.worker", + "is_test": false, + "blob_sha": "e4827d32220f322d8adc3e42769da3ca0cc680db6a5eab7a11f4d8773a75304e", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C3_ENTRYPOINTS": "exact_path_fetch", + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C3_ENTRYPOINTS": 12, + "C0_SOURCE_CHUNKS": 6 + }, + "filters_by_layer": { + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C3_ENTRYPOINTS", + "query": "Где health endpoint?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 12, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Где health endpoint?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "health", + "endpoint" + ] + }, + "layers": [ + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 6, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 54, + "retrieval_by_layer": { + "C3_ENTRYPOINTS": 26, + "C0_SOURCE_CHUNKS": 27 + }, + "merge_rank": 0 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Где health endpoint?", + "rag_count": 9 + }, + "output": { + "llm_answer": "### Подтверждённые точки входа\n\nsrc/app_runtime/control/http_app.py | app.post \nFastAPI HTTP app.post \nОписание: FastAPI маршрутизатор автоматически регистрирует маршруты при старте приложения, что делает эту точку старта подтвержденной.\n\nsrc/app_runtime/control/http_app.py | app.get \nFastAPI HTTP app.get \nОписание: Аналогично предыдущему пункту, FastAPI маршрутизатор регистрирует маршруты при старте приложения, делая эту точку старта подтвержденной.\n\n### Возможные кандидаты\n\nsrc/app_runtime/health/registry.py | HealthRegistry \nОписание: Класс HealthRegistry используется для регистрации и управления health-конtributors. Сам по себе класс не является точкой входа, но может быть использован в контексте health-endpoint'а. Требуется дополнительная проверка в коде использования данного класса." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 803, + "evidence_rows": 9, + "evidence_chars": 3350 + }, + "evidence_summary": [ + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 6, + "unique_paths": 5 + } + ], + "prompt_template_id": "intent_code_qa_find_entrypoints_ru_v2", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 1313 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-health-endpoint.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-health-endpoint.md new file mode 100644 index 0000000..a146141 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-health-endpoint.md @@ -0,0 +1,32 @@ +# plba-v2-find-entrypoints-health-endpoint + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Где health endpoint? + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 9, + "llm_answer": "### Подтверждённые точки входа\n\nsrc/app_runtime/control/http_app.py | app.post \nFastAPI HTTP app.post \nОписание: FastAPI маршрутизатор автоматически регистрирует маршруты при старте приложения, что делает эту точку старта подтвержденной.\n\nsrc/app_runtime/control/http_app.py | app.get \nFastAPI HTTP app.get \nОписание: Аналогично предыдущему пункту, FastAPI маршрутизатор регистрирует маршруты при старте приложения, делая эту точку старта подтвержденной.\n\n### Возможные кандидаты\n\nsrc/app_runtime/health/registry.py | HealthRegistry \nОписание: Класс HealthRegistry используется для регистрации и управления health-конtributors. Сам по себе класс не является точкой входа, но может быть использован в контексте health-endpoint'а. Требуется дополнительная проверка в коде использования данного класса.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "health", + "endpoint" + ], + "layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-find-tests-create-runtime.json b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-find-tests-create-runtime.json new file mode 100644 index 0000000..ca843b9 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-find-tests-create-runtime.json @@ -0,0 +1,1963 @@ +{ + "case_id": "plba-v2-find-tests-create-runtime", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 16, + "llm_answer": "1. Прямые тесты:\n - tests/test_runtime.py | test_public_plba_package_exports_runtime_builder_and_worker_contract\n - Проверка: импорты и вызов функции create_runtime.\n - Видны пробелы покрытия: отсутствуют проверки непосредственно созданного runtime.\n\n2. Косвенные или ближайшие тесты:\n - tests/test_business_control_actions.py | _build_runtime\n - Проверка: функция _build_runtime использует create_runtime в своем потоке зависимостей.\n\n3. Что именно проверяется:\n - В direct test проверяется доступность и работоспособность функции create_runtime через её импорт и вызов.\n - В indirect test проверяется использование create_runtime внутри другой функции.\n\n4. Пробелы покрытия:\n - Прямое тестирование runtime-сущности отсутствует.\n - Нет тестирования поведения или свойств созданного runtime.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "create_runtime" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-v2-find-tests-create-runtime", + "text": "Где тесты для create_runtime?", + "mode": "full_chain", + "run_started_at": "2026-03-12T13:23:57", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Где тесты для create_runtime?", + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "create_runtime" + ], + "confidence": 0.0 + }, + "rag_count": 16, + "rag_rows": [ + { + "path": "tests/test_runtime.py", + "content": "test_public_plba_package_exports_runtime_builder_and_worker_contract imports plba.create_runtime", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_public_plba_package_exports_runtime_builder_and_worker_contract:imports", + "span_start": 349, + "span_end": 349, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e93f80075cd9988737ece3cb5ec659c542132c4d383646e376917bfd0cb6ea64", + "edge_type": "imports", + "src_symbol_id": "ed06ffc5afb8a863cf7da3e40921f17abe4eec2a0770139e3380d93ccaae604a", + "src_qname": "test_public_plba_package_exports_runtime_builder_and_worker_contract", + "dst_symbol_id": null, + "dst_ref": "plba.create_runtime", + "resolution": "partial", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "test_public_plba_package_exports_runtime_builder_and_worker_contract calls create_runtime", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_public_plba_package_exports_runtime_builder_and_worker_contract:calls", + "span_start": 399, + "span_end": 399, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "039939355230de826d8bf7607f55fc59c7d932e5570ecb78994d0f13e57e8488", + "edge_type": "calls", + "src_symbol_id": "ed06ffc5afb8a863cf7da3e40921f17abe4eec2a0770139e3380d93ccaae604a", + "src_qname": "test_public_plba_package_exports_runtime_builder_and_worker_contract", + "dst_symbol_id": null, + "dst_ref": "create_runtime", + "resolution": "partial", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_worker_wakes_up_with_configured_interval\n -> ScenarioWorker\n -> ScenarioWorker.__init__\n -> ScenarioWorker._name\n -> ScenarioWorker.name", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_worker_wakes_up_with_configured_interval:dataflow_slice", + "span_start": 52, + "span_end": 166, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "2fd137f5852febe907f44d3b3e4ea430f89ccfe962ae1442a16ab9df64c8f76c", + "edge_type": "dataflow_slice", + "src_symbol_id": "65f877f78191d65e6a752e41cedc70ebc784c266804a55c1c56440336e1f0d6e", + "src_qname": "test_worker_wakes_up_with_configured_interval", + "dst_symbol_id": "da022da2c49fd9cfd09d6e6da6bbd59aaa7d28efd669ce8444e88d327ddec2fc", + "dst_ref": "ScenarioWorker.name", + "resolution": "resolved", + "slice_id": "2fd137f5852febe907f44d3b3e4ea430f89ccfe962ae1442a16ab9df64c8f76c", + "root_symbol_id": "65f877f78191d65e6a752e41cedc70ebc784c266804a55c1c56440336e1f0d6e", + "path_symbols": [ + "test_worker_wakes_up_with_configured_interval", + "ScenarioWorker", + "ScenarioWorker.__init__", + "ScenarioWorker._name", + "ScenarioWorker.name" + ], + "path_symbol_ids": [ + "65f877f78191d65e6a752e41cedc70ebc784c266804a55c1c56440336e1f0d6e", + "9a1d08a7eb1831c9f2e0db361b5207f036e477c160773ae08c0b287239785c52", + "9c20be046ba06644d1432e0f20eb223663d2b116ee7d91fdc62bc68323f2e593", + "da022da2c49fd9cfd09d6e6da6bbd59aaa7d28efd669ce8444e88d327ddec2fc" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_actions_stop_busy_worker_after_timeout\n -> BlockingRoutine\n -> BlockingRoutine.__init__\n -> BlockingRoutine._started\n -> BlockingRoutine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_actions_stop_busy_worker_after_timeout:dataflow_slice", + "span_start": 42, + "span_end": 238, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "8e7db3d2a9226f1c1d9942ac6373cfcafa0d2276758ddb8a3d3c455a3d58024d", + "edge_type": "dataflow_slice", + "src_symbol_id": "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "src_qname": "test_actions_stop_busy_worker_after_timeout", + "dst_symbol_id": "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04", + "dst_ref": "BlockingRoutine.run", + "resolution": "resolved", + "slice_id": "8e7db3d2a9226f1c1d9942ac6373cfcafa0d2276758ddb8a3d3c455a3d58024d", + "root_symbol_id": "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "path_symbols": [ + "test_actions_stop_busy_worker_after_timeout", + "BlockingRoutine", + "BlockingRoutine.__init__", + "BlockingRoutine._started", + "BlockingRoutine.run" + ], + "path_symbol_ids": [ + "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "a3349c5bc65e4003a4bbd6a8dbb7a54c337e12d1aed930caa701b12e520f1e67", + "486deeed3043c6db985aef258e96ddc67aa53608e67a83962fbd2471f649ddf1", + "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_actions_stop_busy_worker_after_timeout\n -> BlockingRoutine\n -> BlockingRoutine.__init__\n -> BlockingRoutine._release\n -> BlockingRoutine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_actions_stop_busy_worker_after_timeout:dataflow_slice", + "span_start": 43, + "span_end": 238, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "b59da9da82f9dfc8a9b695a08213786385da1ae9e17561ec3a0450a574a8cb39", + "edge_type": "dataflow_slice", + "src_symbol_id": "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "src_qname": "test_actions_stop_busy_worker_after_timeout", + "dst_symbol_id": "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04", + "dst_ref": "BlockingRoutine.run", + "resolution": "resolved", + "slice_id": "b59da9da82f9dfc8a9b695a08213786385da1ae9e17561ec3a0450a574a8cb39", + "root_symbol_id": "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "path_symbols": [ + "test_actions_stop_busy_worker_after_timeout", + "BlockingRoutine", + "BlockingRoutine.__init__", + "BlockingRoutine._release", + "BlockingRoutine.run" + ], + "path_symbol_ids": [ + "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "a3349c5bc65e4003a4bbd6a8dbb7a54c337e12d1aed930caa701b12e520f1e67", + "486deeed3043c6db985aef258e96ddc67aa53608e67a83962fbd2471f649ddf1", + "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_actions_stop_busy_worker_before_timeout\n -> BlockingRoutine\n -> BlockingRoutine.__init__\n -> BlockingRoutine._started\n -> BlockingRoutine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_actions_stop_busy_worker_before_timeout:dataflow_slice", + "span_start": 42, + "span_end": 212, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "f9bcce108870e49afa8b32d4625115a10707a3b0e7473179e958e5752bf258b4", + "edge_type": "dataflow_slice", + "src_symbol_id": "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "src_qname": "test_actions_stop_busy_worker_before_timeout", + "dst_symbol_id": "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04", + "dst_ref": "BlockingRoutine.run", + "resolution": "resolved", + "slice_id": "f9bcce108870e49afa8b32d4625115a10707a3b0e7473179e958e5752bf258b4", + "root_symbol_id": "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "path_symbols": [ + "test_actions_stop_busy_worker_before_timeout", + "BlockingRoutine", + "BlockingRoutine.__init__", + "BlockingRoutine._started", + "BlockingRoutine.run" + ], + "path_symbol_ids": [ + "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "a3349c5bc65e4003a4bbd6a8dbb7a54c337e12d1aed930caa701b12e520f1e67", + "486deeed3043c6db985aef258e96ddc67aa53608e67a83962fbd2471f649ddf1", + "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "def test_public_plba_package_exports_runtime_builder_and_worker_contract(tmp_path) -> None:\n import plba\n from plba import ApplicationModule as PublicApplicationModule\n from plba import InMemoryTaskQueue\n from plba import Worker as PublicWorker\n from plba import WorkerHealth as PublicWorkerHealth\n from plba import WorkerStatus as PublicWorkerStatus\n from plba import create_runtime\n\n config_path = tmp_path / \"config.yml\"\n config_path.write_text(\"platform: {}\\n\", encoding=\"utf-8\")\n\n queue = InMemoryTaskQueue[int]()\n queue.put(2)\n assert queue.get(timeout=0.01) == 2\n queue.task_done()\n\n class PublicRoutine:\n def __init__(self) -> None:\n self.runs = 0\n\n def run(self) -> None:\n if self.runs == 0:\n self.runs += 1\n\n class PublicWorkerImpl(PublicWorker):\n def __init__(self, routine: PublicRoutine) -> None:\n self._inner = RoutineWorker(\"public-worker\", routine)\n\n @property\n def name(self) -> str:\n return self._inner.name\n\n @property\n def critical(self) -> bool:\n return self._inner.critical\n\n def start(self) -> None:\n self._inner.start()\n\n def stop(self, force: bool = False) -> None:\n self._inner.stop(force=force)\n\n def health(self) -> PublicWorkerHealth:\n return self._inner.health()\n\n def status(self) -> PublicWorkerStatus:\n return self._inner.status()\n\n class PublicExampleModule(PublicApplicationModule):\n @property\n def name(self) -> str:\n return \"public-example\"\n\n def register(self, registry: ModuleRegistry) -> None:\n registry.add_worker(PublicWorkerImpl(PublicRoutine()))\n\n runtime = create_runtime(PublicExampleModule(), config_path=str(config_path))\n runtime.start()\n sleep(0.2)\n assert runtime.configuration.get() == {\"platform\": {}}\n assert runtime.status()[\"workers\"][\"registered\"] == 1\n assert hasattr(plba, \"QueueWorker\") is False\n runtime.stop()", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_runtime.py:test_public_plba_package_exports_runtime_builder_and_worker_contract", + "span_start": 342, + "span_end": 405, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 13, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _build_runtime(worker: Worker, *, control_timeout: int = 1) -> tuple[RuntimeManager, str]:\n runtime = RuntimeManager()\n channel = HttpControlChannel(host=\"127.0.0.1\", port=0, timeout=control_timeout)\n runtime.control_plane.register_channel(channel)\n runtime.register_module(WorkerModule(worker))\n runtime.start()\n return runtime, f\"http://127.0.0.1:{channel.port}\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_build_runtime", + "span_start": 154, + "span_end": 160, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 6, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class IntervalRoutine:\n calls: list[float] = field(default_factory=list)\n _lock: Lock = field(default_factory=Lock)\n\n def run(self) -> None:\n with self._lock:\n self.calls.append(monotonic())\n\n def wait_runs(self, count: int, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n with self._lock:\n if len(self.calls) >= count:\n return True\n sleep(0.01)\n return False\n\n def deltas(self) -> list[float]:\n with self._lock:\n return [self.calls[index + 1] - self.calls[index] for index in range(len(self.calls) - 1)]", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:IntervalRoutine", + "span_start": 18, + "span_end": 37, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class ScenarioWorker(Worker):\n def __init__(self, name: str, routine: object, *, interval: float = 0.05) -> None:\n self._name = name\n self._routine = routine\n self._interval = interval\n self._thread: Thread | None = None\n self._stop_requested = Event()\n self._in_flight = 0\n self._runs = 0\n self._lock = Lock()\n\n @property\n def name(self) -> str:\n return self._name\n\n @property\n def critical(self) -> bool:\n return True\n\n def start(self) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._stop_requested.clear()\n self._thread = Thread(target=self._loop, name=f\"{self._name}-thread\", daemon=True)\n self._thread.start()\n\n def stop(self, force: bool = False) -> None:\n self._stop_requested.set()\n\n def health(self) -> WorkerHealth:\n return WorkerHealth(name=self.name, status=\"ok\", critical=True, meta={\"runs\": self._runs})\n\n def status(self) -> WorkerStatus:\n thread_alive = self._thread is not None and self._thread.is_alive()\n with self._lock:\n in_flight = self._in_flight\n runs = self._runs\n if not thread_alive:\n state = \"stopped\"\n elif self._stop_requested.is_set():\n state = \"stopping\"\n elif in_flight > 0:\n state = \"busy\"\n else:\n state = \"idle\"\n return WorkerStatus(name=self.name, state=state, in_flight=in_flight, meta={\"runs\": runs})\n\n def _loop(self) -> None:\n while not self._stop_requested.is_set():\n with self._lock:\n self._in_flight += 1\n try:\n self._routine.run()\n with self._lock:\n self._runs += 1\n finally:\n with self._lock:\n self._in_flight -= 1\n if self._stop_requested.is_set():\n return\n sleep(self._interval)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:ScenarioWorker", + "span_start": 50, + "span_end": 110, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 2, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _http_call_json(\n base_url: str,\n path: str,\n *,\n method: str = \"GET\",\n headers: dict[str, str] | None = None,\n) -> tuple[int, dict[str, object]]:\n request = Request(f\"{base_url}{path}\", method=method, headers=headers or {})\n try:\n with urlopen(request, timeout=15.0) as response:\n status = response.status\n body = response.read()\n except HTTPError as error:\n status = error.code\n body = error.read()\n payload = json.loads(body.decode(\"utf-8\"))\n return status, payload", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_http_call_json", + "span_start": 125, + "span_end": 141, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 4, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _poll_until_stopped(base_url: str, timeout: float = 2.0) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n _, payload = _http_call_json(base_url, \"/actions/status\")\n if payload.get(\"detail\") == \"stopped\":\n return True\n sleep(0.05)\n return False", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_poll_until_stopped", + "span_start": 144, + "span_end": 151, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 5, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def test_worker_wakes_up_with_configured_interval() -> None:\n interval = 0.15\n routine = IntervalRoutine()\n worker = ScenarioWorker(\"interval-worker\", routine, interval=interval)\n runtime = RuntimeManager()\n runtime.register_module(WorkerModule(worker))\n\n runtime.start()\n try:\n assert routine.wait_runs(count=3, timeout=2.0) is True\n finally:\n runtime.stop()\n\n deltas = routine.deltas()\n assert len(deltas) >= 2\n assert all(delta >= interval * 0.7 for delta in deltas[:2])", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:test_worker_wakes_up_with_configured_interval", + "span_start": 163, + "span_end": 178, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 7, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class WorkerModule(ApplicationModule):\n def __init__(self, worker: Worker) -> None:\n self._worker = worker\n\n @property\n def name(self) -> str:\n return \"business-tests\"\n\n def register(self, registry: ModuleRegistry) -> None:\n registry.add_worker(self._worker)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:WorkerModule", + "span_start": 113, + "span_end": 122, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 3, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class BlockingRoutine:\n def __init__(self, started: Event, release: Event) -> None:\n self._started = started\n self._release = release\n\n def run(self) -> None:\n self._started.set()\n self._release.wait(timeout=5.0)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:BlockingRoutine", + "span_start": 40, + "span_end": 47, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def test_actions_start_stop_and_health_when_worker_is_idle() -> None:\n runtime, base_url = _build_runtime(ScenarioWorker(\"idle-worker\", IntervalRoutine(), interval=0.2))\n try:\n stop_status, stop_payload = _http_call_json(base_url, \"/actions/stop\", method=\"POST\")\n assert stop_status == 200\n assert isinstance(stop_payload.get(\"detail\"), dict)\n assert stop_payload[\"detail\"][\"timed_out\"] is False\n assert stop_payload[\"detail\"][\"state\"] == \"stopped\"\n\n health_stopped_status, health_stopped_payload = _http_call_json(base_url, \"/health\")\n assert health_stopped_status == 503\n assert health_stopped_payload[\"state\"] == \"stopped\"\n assert health_stopped_payload[\"status\"] == \"unhealthy\"\n\n start_status, start_payload = _http_call_json(base_url, \"/actions/start\", method=\"POST\")\n assert start_status == 200\n assert isinstance(start_payload.get(\"detail\"), dict)\n assert start_payload[\"detail\"][\"timed_out\"] is False\n assert start_payload[\"detail\"][\"state\"] in {\"idle\", \"busy\"}\n\n health_started_status, health_started_payload = _http_call_json(base_url, \"/health\")\n assert health_started_status == 200\n assert health_started_payload[\"status\"] == \"ok\"\n assert health_started_payload[\"state\"] in {\"idle\", \"busy\"}\n finally:\n runtime.stop()", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:test_actions_start_stop_and_health_when_worker_is_idle", + "span_start": 181, + "span_end": 206, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 8, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "1. Прямые тесты:\n - tests/test_runtime.py | test_public_plba_package_exports_runtime_builder_and_worker_contract\n - Проверка: импорты и вызов функции create_runtime.\n - Видны пробелы покрытия: отсутствуют проверки непосредственно созданного runtime.\n\n2. Косвенные или ближайшие тесты:\n - tests/test_business_control_actions.py | _build_runtime\n - Проверка: функция _build_runtime использует create_runtime в своем потоке зависимостей.\n\n3. Что именно проверяется:\n - В direct test проверяется доступность и работоспособность функции create_runtime через её импорт и вызов.\n - В indirect test проверяется использование create_runtime внутри другой функции.\n\n4. Пробелы покрытия:\n - Прямое тестирование runtime-сущности отсутствует.\n - Нет тестирования поведения или свойств созданного runtime.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C2_DEPENDENCY_GRAPH" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "function", + "symbol_candidates": [ + "create_runtime" + ], + "keyword_hints": [ + "create_runtime" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "test_file_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "test_symbol_patterns": [ + "test_create_runtime", + "Testcreate_runtime", + "create_runtime" + ], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C0_SOURCE_CHUNKS": 10 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src", + "tests" + ], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src", + "tests" + ], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "create_runtime", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Где тесты для create_runtime? test_create_runtime Testcreate_runtime create_runtime", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Где тесты для create_runtime? test_create_runtime Testcreate_runtime create_runtime", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 10, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 0, + "candidates_after_filter": 0 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src", + "tests" + ], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src", + "tests" + ], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 10, + "candidates_after_filter": 10 + } + ], + "fallback": { + "used": true, + "reason": "scope_relaxed_no_hits" + }, + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "create_runtime" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "miss", + "hit_count": 0, + "fail_reason": "scope_relaxed_no_hits" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 10, + "fail_reason": null + } + ] + }, + "constraint_violations": [ + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C1_SYMBOL_CATALOG", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + } + ], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 102, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 40, + "C2_DEPENDENCY_GRAPH": 47, + "C0_SOURCE_CHUNKS": 14 + }, + "merge_rank": 0, + "prompt_build": 0, + "llm_call": 1409 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 980, + "evidence_rows": 16, + "evidence_chars": 9185 + }, + "evidence_summary": [ + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 2 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 10, + "unique_paths": 2 + } + ], + "prompt_template_id": "intent_code_qa_find_tests_ru_v2", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "create_runtime" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 16, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-v2-find-tests-create-runtime", + "mode": "full_chain", + "run_started_at": "2026-03-12T13:23:57", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Где тесты для create_runtime?", + "normalized_query": "Где тесты для create_runtime?" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Где тесты для create_runtime?" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Где тесты для create_runtime?" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "function", + "symbol_candidates": [ + "create_runtime" + ], + "keyword_hints": [ + "create_runtime" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "test_file_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "test_symbol_patterns": [ + "test_create_runtime", + "Testcreate_runtime", + "create_runtime" + ], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Где тесты для create_runtime?" + }, + "output": { + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "create_runtime" + ], + "confidence": 0.0 + }, + "rag_count": 16, + "rag_rows": [ + { + "path": "tests/test_runtime.py", + "content": "test_public_plba_package_exports_runtime_builder_and_worker_contract imports plba.create_runtime", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_public_plba_package_exports_runtime_builder_and_worker_contract:imports", + "span_start": 349, + "span_end": 349, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e93f80075cd9988737ece3cb5ec659c542132c4d383646e376917bfd0cb6ea64", + "edge_type": "imports", + "src_symbol_id": "ed06ffc5afb8a863cf7da3e40921f17abe4eec2a0770139e3380d93ccaae604a", + "src_qname": "test_public_plba_package_exports_runtime_builder_and_worker_contract", + "dst_symbol_id": null, + "dst_ref": "plba.create_runtime", + "resolution": "partial", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "test_public_plba_package_exports_runtime_builder_and_worker_contract calls create_runtime", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_public_plba_package_exports_runtime_builder_and_worker_contract:calls", + "span_start": 399, + "span_end": 399, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "039939355230de826d8bf7607f55fc59c7d932e5570ecb78994d0f13e57e8488", + "edge_type": "calls", + "src_symbol_id": "ed06ffc5afb8a863cf7da3e40921f17abe4eec2a0770139e3380d93ccaae604a", + "src_qname": "test_public_plba_package_exports_runtime_builder_and_worker_contract", + "dst_symbol_id": null, + "dst_ref": "create_runtime", + "resolution": "partial", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_worker_wakes_up_with_configured_interval\n -> ScenarioWorker\n -> ScenarioWorker.__init__\n -> ScenarioWorker._name\n -> ScenarioWorker.name", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_worker_wakes_up_with_configured_interval:dataflow_slice", + "span_start": 52, + "span_end": 166, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "2fd137f5852febe907f44d3b3e4ea430f89ccfe962ae1442a16ab9df64c8f76c", + "edge_type": "dataflow_slice", + "src_symbol_id": "65f877f78191d65e6a752e41cedc70ebc784c266804a55c1c56440336e1f0d6e", + "src_qname": "test_worker_wakes_up_with_configured_interval", + "dst_symbol_id": "da022da2c49fd9cfd09d6e6da6bbd59aaa7d28efd669ce8444e88d327ddec2fc", + "dst_ref": "ScenarioWorker.name", + "resolution": "resolved", + "slice_id": "2fd137f5852febe907f44d3b3e4ea430f89ccfe962ae1442a16ab9df64c8f76c", + "root_symbol_id": "65f877f78191d65e6a752e41cedc70ebc784c266804a55c1c56440336e1f0d6e", + "path_symbols": [ + "test_worker_wakes_up_with_configured_interval", + "ScenarioWorker", + "ScenarioWorker.__init__", + "ScenarioWorker._name", + "ScenarioWorker.name" + ], + "path_symbol_ids": [ + "65f877f78191d65e6a752e41cedc70ebc784c266804a55c1c56440336e1f0d6e", + "9a1d08a7eb1831c9f2e0db361b5207f036e477c160773ae08c0b287239785c52", + "9c20be046ba06644d1432e0f20eb223663d2b116ee7d91fdc62bc68323f2e593", + "da022da2c49fd9cfd09d6e6da6bbd59aaa7d28efd669ce8444e88d327ddec2fc" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_actions_stop_busy_worker_after_timeout\n -> BlockingRoutine\n -> BlockingRoutine.__init__\n -> BlockingRoutine._started\n -> BlockingRoutine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_actions_stop_busy_worker_after_timeout:dataflow_slice", + "span_start": 42, + "span_end": 238, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "8e7db3d2a9226f1c1d9942ac6373cfcafa0d2276758ddb8a3d3c455a3d58024d", + "edge_type": "dataflow_slice", + "src_symbol_id": "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "src_qname": "test_actions_stop_busy_worker_after_timeout", + "dst_symbol_id": "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04", + "dst_ref": "BlockingRoutine.run", + "resolution": "resolved", + "slice_id": "8e7db3d2a9226f1c1d9942ac6373cfcafa0d2276758ddb8a3d3c455a3d58024d", + "root_symbol_id": "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "path_symbols": [ + "test_actions_stop_busy_worker_after_timeout", + "BlockingRoutine", + "BlockingRoutine.__init__", + "BlockingRoutine._started", + "BlockingRoutine.run" + ], + "path_symbol_ids": [ + "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "a3349c5bc65e4003a4bbd6a8dbb7a54c337e12d1aed930caa701b12e520f1e67", + "486deeed3043c6db985aef258e96ddc67aa53608e67a83962fbd2471f649ddf1", + "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_actions_stop_busy_worker_after_timeout\n -> BlockingRoutine\n -> BlockingRoutine.__init__\n -> BlockingRoutine._release\n -> BlockingRoutine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_actions_stop_busy_worker_after_timeout:dataflow_slice", + "span_start": 43, + "span_end": 238, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "b59da9da82f9dfc8a9b695a08213786385da1ae9e17561ec3a0450a574a8cb39", + "edge_type": "dataflow_slice", + "src_symbol_id": "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "src_qname": "test_actions_stop_busy_worker_after_timeout", + "dst_symbol_id": "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04", + "dst_ref": "BlockingRoutine.run", + "resolution": "resolved", + "slice_id": "b59da9da82f9dfc8a9b695a08213786385da1ae9e17561ec3a0450a574a8cb39", + "root_symbol_id": "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "path_symbols": [ + "test_actions_stop_busy_worker_after_timeout", + "BlockingRoutine", + "BlockingRoutine.__init__", + "BlockingRoutine._release", + "BlockingRoutine.run" + ], + "path_symbol_ids": [ + "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "a3349c5bc65e4003a4bbd6a8dbb7a54c337e12d1aed930caa701b12e520f1e67", + "486deeed3043c6db985aef258e96ddc67aa53608e67a83962fbd2471f649ddf1", + "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_actions_stop_busy_worker_before_timeout\n -> BlockingRoutine\n -> BlockingRoutine.__init__\n -> BlockingRoutine._started\n -> BlockingRoutine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_actions_stop_busy_worker_before_timeout:dataflow_slice", + "span_start": 42, + "span_end": 212, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "f9bcce108870e49afa8b32d4625115a10707a3b0e7473179e958e5752bf258b4", + "edge_type": "dataflow_slice", + "src_symbol_id": "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "src_qname": "test_actions_stop_busy_worker_before_timeout", + "dst_symbol_id": "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04", + "dst_ref": "BlockingRoutine.run", + "resolution": "resolved", + "slice_id": "f9bcce108870e49afa8b32d4625115a10707a3b0e7473179e958e5752bf258b4", + "root_symbol_id": "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "path_symbols": [ + "test_actions_stop_busy_worker_before_timeout", + "BlockingRoutine", + "BlockingRoutine.__init__", + "BlockingRoutine._started", + "BlockingRoutine.run" + ], + "path_symbol_ids": [ + "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "a3349c5bc65e4003a4bbd6a8dbb7a54c337e12d1aed930caa701b12e520f1e67", + "486deeed3043c6db985aef258e96ddc67aa53608e67a83962fbd2471f649ddf1", + "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "def test_public_plba_package_exports_runtime_builder_and_worker_contract(tmp_path) -> None:\n import plba\n from plba import ApplicationModule as PublicApplicationModule\n from plba import InMemoryTaskQueue\n from plba import Worker as PublicWorker\n from plba import WorkerHealth as PublicWorkerHealth\n from plba import WorkerStatus as PublicWorkerStatus\n from plba import create_runtime\n\n config_path = tmp_path / \"config.yml\"\n config_path.write_text(\"platform: {}\\n\", encoding=\"utf-8\")\n\n queue = InMemoryTaskQueue[int]()\n queue.put(2)\n assert queue.get(timeout=0.01) == 2\n queue.task_done()\n\n class PublicRoutine:\n def __init__(self) -> None:\n self.runs = 0\n\n def run(self) -> None:\n if self.runs == 0:\n self.runs += 1\n\n class PublicWorkerImpl(PublicWorker):\n def __init__(self, routine: PublicRoutine) -> None:\n self._inner = RoutineWorker(\"public-worker\", routine)\n\n @property\n def name(self) -> str:\n return self._inner.name\n\n @property\n def critical(self) -> bool:\n return self._inner.critical\n\n def start(self) -> None:\n self._inner.start()\n\n def stop(self, force: bool = False) -> None:\n self._inner.stop(force=force)\n\n def health(self) -> PublicWorkerHealth:\n return self._inner.health()\n\n def status(self) -> PublicWorkerStatus:\n return self._inner.status()\n\n class PublicExampleModule(PublicApplicationModule):\n @property\n def name(self) -> str:\n return \"public-example\"\n\n def register(self, registry: ModuleRegistry) -> None:\n registry.add_worker(PublicWorkerImpl(PublicRoutine()))\n\n runtime = create_runtime(PublicExampleModule(), config_path=str(config_path))\n runtime.start()\n sleep(0.2)\n assert runtime.configuration.get() == {\"platform\": {}}\n assert runtime.status()[\"workers\"][\"registered\"] == 1\n assert hasattr(plba, \"QueueWorker\") is False\n runtime.stop()", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_runtime.py:test_public_plba_package_exports_runtime_builder_and_worker_contract", + "span_start": 342, + "span_end": 405, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 13, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _build_runtime(worker: Worker, *, control_timeout: int = 1) -> tuple[RuntimeManager, str]:\n runtime = RuntimeManager()\n channel = HttpControlChannel(host=\"127.0.0.1\", port=0, timeout=control_timeout)\n runtime.control_plane.register_channel(channel)\n runtime.register_module(WorkerModule(worker))\n runtime.start()\n return runtime, f\"http://127.0.0.1:{channel.port}\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_build_runtime", + "span_start": 154, + "span_end": 160, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 6, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class IntervalRoutine:\n calls: list[float] = field(default_factory=list)\n _lock: Lock = field(default_factory=Lock)\n\n def run(self) -> None:\n with self._lock:\n self.calls.append(monotonic())\n\n def wait_runs(self, count: int, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n with self._lock:\n if len(self.calls) >= count:\n return True\n sleep(0.01)\n return False\n\n def deltas(self) -> list[float]:\n with self._lock:\n return [self.calls[index + 1] - self.calls[index] for index in range(len(self.calls) - 1)]", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:IntervalRoutine", + "span_start": 18, + "span_end": 37, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class ScenarioWorker(Worker):\n def __init__(self, name: str, routine: object, *, interval: float = 0.05) -> None:\n self._name = name\n self._routine = routine\n self._interval = interval\n self._thread: Thread | None = None\n self._stop_requested = Event()\n self._in_flight = 0\n self._runs = 0\n self._lock = Lock()\n\n @property\n def name(self) -> str:\n return self._name\n\n @property\n def critical(self) -> bool:\n return True\n\n def start(self) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._stop_requested.clear()\n self._thread = Thread(target=self._loop, name=f\"{self._name}-thread\", daemon=True)\n self._thread.start()\n\n def stop(self, force: bool = False) -> None:\n self._stop_requested.set()\n\n def health(self) -> WorkerHealth:\n return WorkerHealth(name=self.name, status=\"ok\", critical=True, meta={\"runs\": self._runs})\n\n def status(self) -> WorkerStatus:\n thread_alive = self._thread is not None and self._thread.is_alive()\n with self._lock:\n in_flight = self._in_flight\n runs = self._runs\n if not thread_alive:\n state = \"stopped\"\n elif self._stop_requested.is_set():\n state = \"stopping\"\n elif in_flight > 0:\n state = \"busy\"\n else:\n state = \"idle\"\n return WorkerStatus(name=self.name, state=state, in_flight=in_flight, meta={\"runs\": runs})\n\n def _loop(self) -> None:\n while not self._stop_requested.is_set():\n with self._lock:\n self._in_flight += 1\n try:\n self._routine.run()\n with self._lock:\n self._runs += 1\n finally:\n with self._lock:\n self._in_flight -= 1\n if self._stop_requested.is_set():\n return\n sleep(self._interval)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:ScenarioWorker", + "span_start": 50, + "span_end": 110, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 2, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _http_call_json(\n base_url: str,\n path: str,\n *,\n method: str = \"GET\",\n headers: dict[str, str] | None = None,\n) -> tuple[int, dict[str, object]]:\n request = Request(f\"{base_url}{path}\", method=method, headers=headers or {})\n try:\n with urlopen(request, timeout=15.0) as response:\n status = response.status\n body = response.read()\n except HTTPError as error:\n status = error.code\n body = error.read()\n payload = json.loads(body.decode(\"utf-8\"))\n return status, payload", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_http_call_json", + "span_start": 125, + "span_end": 141, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 4, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _poll_until_stopped(base_url: str, timeout: float = 2.0) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n _, payload = _http_call_json(base_url, \"/actions/status\")\n if payload.get(\"detail\") == \"stopped\":\n return True\n sleep(0.05)\n return False", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_poll_until_stopped", + "span_start": 144, + "span_end": 151, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 5, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def test_worker_wakes_up_with_configured_interval() -> None:\n interval = 0.15\n routine = IntervalRoutine()\n worker = ScenarioWorker(\"interval-worker\", routine, interval=interval)\n runtime = RuntimeManager()\n runtime.register_module(WorkerModule(worker))\n\n runtime.start()\n try:\n assert routine.wait_runs(count=3, timeout=2.0) is True\n finally:\n runtime.stop()\n\n deltas = routine.deltas()\n assert len(deltas) >= 2\n assert all(delta >= interval * 0.7 for delta in deltas[:2])", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:test_worker_wakes_up_with_configured_interval", + "span_start": 163, + "span_end": 178, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 7, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class WorkerModule(ApplicationModule):\n def __init__(self, worker: Worker) -> None:\n self._worker = worker\n\n @property\n def name(self) -> str:\n return \"business-tests\"\n\n def register(self, registry: ModuleRegistry) -> None:\n registry.add_worker(self._worker)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:WorkerModule", + "span_start": 113, + "span_end": 122, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 3, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class BlockingRoutine:\n def __init__(self, started: Event, release: Event) -> None:\n self._started = started\n self._release = release\n\n def run(self) -> None:\n self._started.set()\n self._release.wait(timeout=5.0)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:BlockingRoutine", + "span_start": 40, + "span_end": 47, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def test_actions_start_stop_and_health_when_worker_is_idle() -> None:\n runtime, base_url = _build_runtime(ScenarioWorker(\"idle-worker\", IntervalRoutine(), interval=0.2))\n try:\n stop_status, stop_payload = _http_call_json(base_url, \"/actions/stop\", method=\"POST\")\n assert stop_status == 200\n assert isinstance(stop_payload.get(\"detail\"), dict)\n assert stop_payload[\"detail\"][\"timed_out\"] is False\n assert stop_payload[\"detail\"][\"state\"] == \"stopped\"\n\n health_stopped_status, health_stopped_payload = _http_call_json(base_url, \"/health\")\n assert health_stopped_status == 503\n assert health_stopped_payload[\"state\"] == \"stopped\"\n assert health_stopped_payload[\"status\"] == \"unhealthy\"\n\n start_status, start_payload = _http_call_json(base_url, \"/actions/start\", method=\"POST\")\n assert start_status == 200\n assert isinstance(start_payload.get(\"detail\"), dict)\n assert start_payload[\"detail\"][\"timed_out\"] is False\n assert start_payload[\"detail\"][\"state\"] in {\"idle\", \"busy\"}\n\n health_started_status, health_started_payload = _http_call_json(base_url, \"/health\")\n assert health_started_status == 200\n assert health_started_payload[\"status\"] == \"ok\"\n assert health_started_payload[\"state\"] in {\"idle\", \"busy\"}\n finally:\n runtime.stop()", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:test_actions_start_stop_and_health_when_worker_is_idle", + "span_start": 181, + "span_end": 206, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 8, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C0_SOURCE_CHUNKS": 10 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src", + "tests" + ], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src", + "tests" + ], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "create_runtime", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Где тесты для create_runtime? test_create_runtime Testcreate_runtime create_runtime", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Где тесты для create_runtime? test_create_runtime Testcreate_runtime create_runtime", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 10, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 0, + "candidates_after_filter": 0 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src", + "tests" + ], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src", + "tests" + ], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 10, + "candidates_after_filter": 10 + } + ], + "fallback": { + "used": true, + "reason": "scope_relaxed_no_hits" + }, + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "create_runtime" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "miss", + "hit_count": 0, + "fail_reason": "scope_relaxed_no_hits" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 10, + "fail_reason": null + } + ] + }, + "constraint_violations": [ + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C1_SYMBOL_CATALOG", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + } + ], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 102, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 40, + "C2_DEPENDENCY_GRAPH": 47, + "C0_SOURCE_CHUNKS": 14 + }, + "merge_rank": 0 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Где тесты для create_runtime?", + "rag_count": 16 + }, + "output": { + "llm_answer": "1. Прямые тесты:\n - tests/test_runtime.py | test_public_plba_package_exports_runtime_builder_and_worker_contract\n - Проверка: импорты и вызов функции create_runtime.\n - Видны пробелы покрытия: отсутствуют проверки непосредственно созданного runtime.\n\n2. Косвенные или ближайшие тесты:\n - tests/test_business_control_actions.py | _build_runtime\n - Проверка: функция _build_runtime использует create_runtime в своем потоке зависимостей.\n\n3. Что именно проверяется:\n - В direct test проверяется доступность и работоспособность функции create_runtime через её импорт и вызов.\n - В indirect test проверяется использование create_runtime внутри другой функции.\n\n4. Пробелы покрытия:\n - Прямое тестирование runtime-сущности отсутствует.\n - Нет тестирования поведения или свойств созданного runtime." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 980, + "evidence_rows": 16, + "evidence_chars": 9185 + }, + "evidence_summary": [ + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 2 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 10, + "unique_paths": 2 + } + ], + "prompt_template_id": "intent_code_qa_find_tests_ru_v2", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 1409 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-find-tests-create-runtime.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-find-tests-create-runtime.md new file mode 100644 index 0000000..435607a --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-find-tests-create-runtime.md @@ -0,0 +1,32 @@ +# plba-v2-find-tests-create-runtime + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Где тесты для create_runtime? + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 16, + "llm_answer": "1. Прямые тесты:\n - tests/test_runtime.py | test_public_plba_package_exports_runtime_builder_and_worker_contract\n - Проверка: импорты и вызов функции create_runtime.\n - Видны пробелы покрытия: отсутствуют проверки непосредственно созданного runtime.\n\n2. Косвенные или ближайшие тесты:\n - tests/test_business_control_actions.py | _build_runtime\n - Проверка: функция _build_runtime использует create_runtime в своем потоке зависимостей.\n\n3. Что именно проверяется:\n - В direct test проверяется доступность и работоспособность функции create_runtime через её импорт и вызов.\n - В indirect test проверяется использование create_runtime внутри другой функции.\n\n4. Пробелы покрытия:\n - Прямое тестирование runtime-сущности отсутствует.\n - Нет тестирования поведения или свойств созданного runtime.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "create_runtime" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-find-tests-runtime-manager.json b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-find-tests-runtime-manager.json new file mode 100644 index 0000000..f7706ff --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-find-tests-runtime-manager.json @@ -0,0 +1,1879 @@ +{ + "case_id": "plba-v2-find-tests-runtime-manager", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 16, + "llm_answer": "1. Прямые тесты:\n - tests/test_runtime.py | test_runtime_runs_worker_routine_and_exposes_status\n - tests/test_runtime.py | test_runtime_graceful_stop_waits_until_worker_finishes\n \n2. Косвенные или ближайшие тесты:\n - tests/test_business_control_actions.py | _build_runtime\n - tests/test_business_control_actions.py | test_worker_wakes_up_with_configured_interval\n\n3. Что именно проверяется:\n - test_runtime_runs_worker_routine_and_exposes_status проверяет запуск рабочего потока, регистрацию модуля и получение статуса выполнения.\n - test_runtime_graceful_stop_waits_until_worker_finishes проверяет корректную остановку рабочего процесса и изменение состояния runtime после остановки.\n - tests/test_business_control_actions.py содержит косвенные тесты через инстанцирование RuntimeManager в методах _build_runtime и test_worker_wakes_up_with_configured_interval.\n\n4. Пробелы покрытия:\n - Прямое покрытие отсутствует для других аспектов работы RuntimeManager, таких как обработка ошибок, работа с конфигурацией, интеграция с внешними сервисами и т.д. Требуются дополнительные тесты для этих случаев.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-v2-find-tests-runtime-manager", + "text": "Где тесты для RuntimeManager?", + "mode": "full_chain", + "run_started_at": "2026-03-12T13:23:57", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Где тесты для RuntimeManager?", + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "RuntimeManager" + ], + "confidence": 0.0 + }, + "rag_count": 16, + "rag_rows": [ + { + "path": "tests/test_runtime.py", + "content": "test_runtime_runs_worker_routine_and_exposes_status instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_runtime_runs_worker_routine_and_exposes_status:instantiates", + "span_start": 209, + "span_end": 209, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "c397a308e7824ba9fe400a754c7e15e66ea6f058d7f5d3e82bb002bb78b509d2", + "edge_type": "instantiates", + "src_symbol_id": "1c767eb5ee08e84f45b18c8ed7531ec0ed73c63fb1594823569672db7b21e992", + "src_qname": "test_runtime_runs_worker_routine_and_exposes_status", + "dst_symbol_id": "aeadc039653807b0da1ca6e3cc1078ee61cfc510b28e7f9c2ec04c59da43cc8d", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "test_runtime_graceful_stop_waits_until_worker_finishes instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_runtime_graceful_stop_waits_until_worker_finishes:instantiates", + "span_start": 229, + "span_end": 229, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "76b4701262ccaa0a7a41691407c4ebdb2ca74a2415d89f0a38ef0d4f608bda93", + "edge_type": "instantiates", + "src_symbol_id": "1076e788e4a03b10d7bc1313a8ad46caa170c13cc026c6e4de994af1a6ae57bf", + "src_qname": "test_runtime_graceful_stop_waits_until_worker_finishes", + "dst_symbol_id": "aeadc039653807b0da1ca6e3cc1078ee61cfc510b28e7f9c2ec04c59da43cc8d", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "_build_runtime instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "_build_runtime:instantiates", + "span_start": 155, + "span_end": 155, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "7eb254d564944bab6272757ee5ef688862bd321e6941e2495dc942e03b1c9a25", + "edge_type": "instantiates", + "src_symbol_id": "db94031d5245bf82be836a109b4584b43b8e83d37a0f318e03f6c8191896d469", + "src_qname": "_build_runtime", + "dst_symbol_id": "a1572ea8183dc0cd6ddbc74342bbde8c28cecfde37ad40b62feff09f8d103d11", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_worker_wakes_up_with_configured_interval instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_worker_wakes_up_with_configured_interval:instantiates", + "span_start": 167, + "span_end": 167, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "189aafc4de0b79c688668f25f0c87166a127df26bd2215452014713b65ef281a", + "edge_type": "instantiates", + "src_symbol_id": "65f877f78191d65e6a752e41cedc70ebc784c266804a55c1c56440336e1f0d6e", + "src_qname": "test_worker_wakes_up_with_configured_interval", + "dst_symbol_id": "a1572ea8183dc0cd6ddbc74342bbde8c28cecfde37ad40b62feff09f8d103d11", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_actions_stop_busy_worker_after_timeout\n -> BlockingRoutine\n -> BlockingRoutine.__init__\n -> BlockingRoutine._started\n -> BlockingRoutine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_actions_stop_busy_worker_after_timeout:dataflow_slice", + "span_start": 42, + "span_end": 238, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "8e7db3d2a9226f1c1d9942ac6373cfcafa0d2276758ddb8a3d3c455a3d58024d", + "edge_type": "dataflow_slice", + "src_symbol_id": "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "src_qname": "test_actions_stop_busy_worker_after_timeout", + "dst_symbol_id": "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04", + "dst_ref": "BlockingRoutine.run", + "resolution": "resolved", + "slice_id": "8e7db3d2a9226f1c1d9942ac6373cfcafa0d2276758ddb8a3d3c455a3d58024d", + "root_symbol_id": "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "path_symbols": [ + "test_actions_stop_busy_worker_after_timeout", + "BlockingRoutine", + "BlockingRoutine.__init__", + "BlockingRoutine._started", + "BlockingRoutine.run" + ], + "path_symbol_ids": [ + "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "a3349c5bc65e4003a4bbd6a8dbb7a54c337e12d1aed930caa701b12e520f1e67", + "486deeed3043c6db985aef258e96ddc67aa53608e67a83962fbd2471f649ddf1", + "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_actions_stop_busy_worker_before_timeout\n -> BlockingRoutine\n -> BlockingRoutine.__init__\n -> BlockingRoutine._release\n -> BlockingRoutine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_actions_stop_busy_worker_before_timeout:dataflow_slice", + "span_start": 43, + "span_end": 212, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "8bd726155ba387d3579763ee84dfd2f9a90bc917da88f3b2e89416ab5c1254d6", + "edge_type": "dataflow_slice", + "src_symbol_id": "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "src_qname": "test_actions_stop_busy_worker_before_timeout", + "dst_symbol_id": "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04", + "dst_ref": "BlockingRoutine.run", + "resolution": "resolved", + "slice_id": "8bd726155ba387d3579763ee84dfd2f9a90bc917da88f3b2e89416ab5c1254d6", + "root_symbol_id": "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "path_symbols": [ + "test_actions_stop_busy_worker_before_timeout", + "BlockingRoutine", + "BlockingRoutine.__init__", + "BlockingRoutine._release", + "BlockingRoutine.run" + ], + "path_symbol_ids": [ + "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "a3349c5bc65e4003a4bbd6a8dbb7a54c337e12d1aed930caa701b12e520f1e67", + "486deeed3043c6db985aef258e96ddc67aa53608e67a83962fbd2471f649ddf1", + "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "def test_runtime_graceful_stop_waits_until_worker_finishes() -> None:\n started = Event()\n release = Event()\n runtime = RuntimeManager()\n runtime.register_module(BlockingModule(started, release))\n runtime.start()\n assert started.wait(timeout=1.0) is True\n assert runtime.status()[\"runtime\"][\"state\"] == \"busy\"\n\n stop_thread = Thread(target=runtime.stop, kwargs={\"timeout\": 1.0}, daemon=True)\n stop_thread.start()\n sleep(0.1)\n assert stop_thread.is_alive() is True\n\n release.set()\n stop_thread.join(timeout=1.0)\n assert stop_thread.is_alive() is False\n assert runtime.status()[\"runtime\"][\"state\"] == \"stopped\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_runtime.py:test_runtime_graceful_stop_waits_until_worker_finishes", + "span_start": 226, + "span_end": 243, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 8, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "def test_runtime_runs_worker_routine_and_exposes_status(tmp_path) -> None:\n config_path = tmp_path / \"config.yml\"\n config_path.write_text(\n \"\"\"\nplatform:\n workers: 1\nlog:\n version: 1\n disable_existing_loggers: false\n handlers:\n console:\n class: logging.StreamHandler\n root:\n level: INFO\n handlers: [console]\n\"\"\".strip(),\n encoding=\"utf-8\",\n )\n runtime = RuntimeManager()\n runtime.add_config_file(config_path)\n module = ExampleModule()\n runtime.register_module(module)\n\n runtime.start()\n sleep(0.2)\n status = runtime.status()\n runtime.stop()\n\n assert module.routine.processed == [{\"id\": 1}]\n assert status[\"modules\"] == [\"example\"]\n assert status[\"runtime\"][\"state\"] == \"idle\"\n assert status[\"health\"][\"status\"] == \"ok\"\n assert status[\"config\"] == {\"platform\": {\"workers\": 1}, \"log\": status[\"config\"][\"log\"]}", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_runtime.py:test_runtime_runs_worker_routine_and_exposes_status", + "span_start": 191, + "span_end": 223, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 7, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _build_runtime(worker: Worker, *, control_timeout: int = 1) -> tuple[RuntimeManager, str]:\n runtime = RuntimeManager()\n channel = HttpControlChannel(host=\"127.0.0.1\", port=0, timeout=control_timeout)\n runtime.control_plane.register_channel(channel)\n runtime.register_module(WorkerModule(worker))\n runtime.start()\n return runtime, f\"http://127.0.0.1:{channel.port}\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_build_runtime", + "span_start": 154, + "span_end": 160, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 6, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def test_worker_wakes_up_with_configured_interval() -> None:\n interval = 0.15\n routine = IntervalRoutine()\n worker = ScenarioWorker(\"interval-worker\", routine, interval=interval)\n runtime = RuntimeManager()\n runtime.register_module(WorkerModule(worker))\n\n runtime.start()\n try:\n assert routine.wait_runs(count=3, timeout=2.0) is True\n finally:\n runtime.stop()\n\n deltas = routine.deltas()\n assert len(deltas) >= 2\n assert all(delta >= interval * 0.7 for delta in deltas[:2])", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:test_worker_wakes_up_with_configured_interval", + "span_start": 163, + "span_end": 178, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 7, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class BlockingRoutine:\n def __init__(self, started: Event, release: Event) -> None:\n self._started = started\n self._release = release\n\n def run(self) -> None:\n self._started.set()\n self._release.wait(timeout=5.0)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:BlockingRoutine", + "span_start": 40, + "span_end": 47, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class ScenarioWorker(Worker):\n def __init__(self, name: str, routine: object, *, interval: float = 0.05) -> None:\n self._name = name\n self._routine = routine\n self._interval = interval\n self._thread: Thread | None = None\n self._stop_requested = Event()\n self._in_flight = 0\n self._runs = 0\n self._lock = Lock()\n\n @property\n def name(self) -> str:\n return self._name\n\n @property\n def critical(self) -> bool:\n return True\n\n def start(self) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._stop_requested.clear()\n self._thread = Thread(target=self._loop, name=f\"{self._name}-thread\", daemon=True)\n self._thread.start()\n\n def stop(self, force: bool = False) -> None:\n self._stop_requested.set()\n\n def health(self) -> WorkerHealth:\n return WorkerHealth(name=self.name, status=\"ok\", critical=True, meta={\"runs\": self._runs})\n\n def status(self) -> WorkerStatus:\n thread_alive = self._thread is not None and self._thread.is_alive()\n with self._lock:\n in_flight = self._in_flight\n runs = self._runs\n if not thread_alive:\n state = \"stopped\"\n elif self._stop_requested.is_set():\n state = \"stopping\"\n elif in_flight > 0:\n state = \"busy\"\n else:\n state = \"idle\"\n return WorkerStatus(name=self.name, state=state, in_flight=in_flight, meta={\"runs\": runs})\n\n def _loop(self) -> None:\n while not self._stop_requested.is_set():\n with self._lock:\n self._in_flight += 1\n try:\n self._routine.run()\n with self._lock:\n self._runs += 1\n finally:\n with self._lock:\n self._in_flight -= 1\n if self._stop_requested.is_set():\n return\n sleep(self._interval)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:ScenarioWorker", + "span_start": 50, + "span_end": 110, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 2, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class WorkerModule(ApplicationModule):\n def __init__(self, worker: Worker) -> None:\n self._worker = worker\n\n @property\n def name(self) -> str:\n return \"business-tests\"\n\n def register(self, registry: ModuleRegistry) -> None:\n registry.add_worker(self._worker)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:WorkerModule", + "span_start": 113, + "span_end": 122, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 3, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _http_call_json(\n base_url: str,\n path: str,\n *,\n method: str = \"GET\",\n headers: dict[str, str] | None = None,\n) -> tuple[int, dict[str, object]]:\n request = Request(f\"{base_url}{path}\", method=method, headers=headers or {})\n try:\n with urlopen(request, timeout=15.0) as response:\n status = response.status\n body = response.read()\n except HTTPError as error:\n status = error.code\n body = error.read()\n payload = json.loads(body.decode(\"utf-8\"))\n return status, payload", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_http_call_json", + "span_start": 125, + "span_end": 141, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 4, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class IntervalRoutine:\n calls: list[float] = field(default_factory=list)\n _lock: Lock = field(default_factory=Lock)\n\n def run(self) -> None:\n with self._lock:\n self.calls.append(monotonic())\n\n def wait_runs(self, count: int, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n with self._lock:\n if len(self.calls) >= count:\n return True\n sleep(0.01)\n return False\n\n def deltas(self) -> list[float]:\n with self._lock:\n return [self.calls[index + 1] - self.calls[index] for index in range(len(self.calls) - 1)]", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:IntervalRoutine", + "span_start": 18, + "span_end": 37, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _poll_until_stopped(base_url: str, timeout: float = 2.0) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n _, payload = _http_call_json(base_url, \"/actions/status\")\n if payload.get(\"detail\") == \"stopped\":\n return True\n sleep(0.05)\n return False", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_poll_until_stopped", + "span_start": 144, + "span_end": 151, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 5, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "1. Прямые тесты:\n - tests/test_runtime.py | test_runtime_runs_worker_routine_and_exposes_status\n - tests/test_runtime.py | test_runtime_graceful_stop_waits_until_worker_finishes\n \n2. Косвенные или ближайшие тесты:\n - tests/test_business_control_actions.py | _build_runtime\n - tests/test_business_control_actions.py | test_worker_wakes_up_with_configured_interval\n\n3. Что именно проверяется:\n - test_runtime_runs_worker_routine_and_exposes_status проверяет запуск рабочего потока, регистрацию модуля и получение статуса выполнения.\n - test_runtime_graceful_stop_waits_until_worker_finishes проверяет корректную остановку рабочего процесса и изменение состояния runtime после остановки.\n - tests/test_business_control_actions.py содержит косвенные тесты через инстанцирование RuntimeManager в методах _build_runtime и test_worker_wakes_up_with_configured_interval.\n\n4. Пробелы покрытия:\n - Прямое покрытие отсутствует для других аспектов работы RuntimeManager, таких как обработка ошибок, работа с конфигурацией, интеграция с внешними сервисами и т.д. Требуются дополнительные тесты для этих случаев.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C2_DEPENDENCY_GRAPH" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "test_file_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "test_symbol_patterns": [ + "test_runtime_manager", + "TestRuntimeManager", + "RuntimeManager" + ], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C0_SOURCE_CHUNKS": 10 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src", + "tests" + ], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src", + "tests" + ], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Где тесты для RuntimeManager? test_runtime_manager TestRuntimeManager RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Где тесты для RuntimeManager? test_runtime_manager TestRuntimeManager RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 10, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 0, + "candidates_after_filter": 0 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src", + "tests" + ], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src", + "tests" + ], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 10, + "candidates_after_filter": 10 + } + ], + "fallback": { + "used": true, + "reason": "scope_relaxed_no_hits" + }, + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "RuntimeManager" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "miss", + "hit_count": 0, + "fail_reason": "scope_relaxed_no_hits" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 10, + "fail_reason": null + } + ] + }, + "constraint_violations": [ + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C1_SYMBOL_CATALOG", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + } + ], + "timings_ms": { + "router": 1, + "symbol_resolution": 0, + "retrieval_total": 153, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 80, + "C2_DEPENDENCY_GRAPH": 56, + "C0_SOURCE_CHUNKS": 17 + }, + "merge_rank": 0, + "prompt_build": 0, + "llm_call": 2116 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 904, + "evidence_rows": 16, + "evidence_chars": 7086 + }, + "evidence_summary": [ + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 2 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 10, + "unique_paths": 2 + } + ], + "prompt_template_id": "intent_code_qa_find_tests_ru_v2", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "RuntimeManager" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 16, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-v2-find-tests-runtime-manager", + "mode": "full_chain", + "run_started_at": "2026-03-12T13:23:57", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Где тесты для RuntimeManager?", + "normalized_query": "Где тесты для RuntimeManager?" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Где тесты для RuntimeManager?" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Где тесты для RuntimeManager?" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "test_file_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "test_symbol_patterns": [ + "test_runtime_manager", + "TestRuntimeManager", + "RuntimeManager" + ], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 1 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Где тесты для RuntimeManager?" + }, + "output": { + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "RuntimeManager" + ], + "confidence": 0.0 + }, + "rag_count": 16, + "rag_rows": [ + { + "path": "tests/test_runtime.py", + "content": "test_runtime_runs_worker_routine_and_exposes_status instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_runtime_runs_worker_routine_and_exposes_status:instantiates", + "span_start": 209, + "span_end": 209, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "c397a308e7824ba9fe400a754c7e15e66ea6f058d7f5d3e82bb002bb78b509d2", + "edge_type": "instantiates", + "src_symbol_id": "1c767eb5ee08e84f45b18c8ed7531ec0ed73c63fb1594823569672db7b21e992", + "src_qname": "test_runtime_runs_worker_routine_and_exposes_status", + "dst_symbol_id": "aeadc039653807b0da1ca6e3cc1078ee61cfc510b28e7f9c2ec04c59da43cc8d", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "test_runtime_graceful_stop_waits_until_worker_finishes instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_runtime_graceful_stop_waits_until_worker_finishes:instantiates", + "span_start": 229, + "span_end": 229, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "76b4701262ccaa0a7a41691407c4ebdb2ca74a2415d89f0a38ef0d4f608bda93", + "edge_type": "instantiates", + "src_symbol_id": "1076e788e4a03b10d7bc1313a8ad46caa170c13cc026c6e4de994af1a6ae57bf", + "src_qname": "test_runtime_graceful_stop_waits_until_worker_finishes", + "dst_symbol_id": "aeadc039653807b0da1ca6e3cc1078ee61cfc510b28e7f9c2ec04c59da43cc8d", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "_build_runtime instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "_build_runtime:instantiates", + "span_start": 155, + "span_end": 155, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "7eb254d564944bab6272757ee5ef688862bd321e6941e2495dc942e03b1c9a25", + "edge_type": "instantiates", + "src_symbol_id": "db94031d5245bf82be836a109b4584b43b8e83d37a0f318e03f6c8191896d469", + "src_qname": "_build_runtime", + "dst_symbol_id": "a1572ea8183dc0cd6ddbc74342bbde8c28cecfde37ad40b62feff09f8d103d11", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_worker_wakes_up_with_configured_interval instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_worker_wakes_up_with_configured_interval:instantiates", + "span_start": 167, + "span_end": 167, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "189aafc4de0b79c688668f25f0c87166a127df26bd2215452014713b65ef281a", + "edge_type": "instantiates", + "src_symbol_id": "65f877f78191d65e6a752e41cedc70ebc784c266804a55c1c56440336e1f0d6e", + "src_qname": "test_worker_wakes_up_with_configured_interval", + "dst_symbol_id": "a1572ea8183dc0cd6ddbc74342bbde8c28cecfde37ad40b62feff09f8d103d11", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_actions_stop_busy_worker_after_timeout\n -> BlockingRoutine\n -> BlockingRoutine.__init__\n -> BlockingRoutine._started\n -> BlockingRoutine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_actions_stop_busy_worker_after_timeout:dataflow_slice", + "span_start": 42, + "span_end": 238, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "8e7db3d2a9226f1c1d9942ac6373cfcafa0d2276758ddb8a3d3c455a3d58024d", + "edge_type": "dataflow_slice", + "src_symbol_id": "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "src_qname": "test_actions_stop_busy_worker_after_timeout", + "dst_symbol_id": "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04", + "dst_ref": "BlockingRoutine.run", + "resolution": "resolved", + "slice_id": "8e7db3d2a9226f1c1d9942ac6373cfcafa0d2276758ddb8a3d3c455a3d58024d", + "root_symbol_id": "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "path_symbols": [ + "test_actions_stop_busy_worker_after_timeout", + "BlockingRoutine", + "BlockingRoutine.__init__", + "BlockingRoutine._started", + "BlockingRoutine.run" + ], + "path_symbol_ids": [ + "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "a3349c5bc65e4003a4bbd6a8dbb7a54c337e12d1aed930caa701b12e520f1e67", + "486deeed3043c6db985aef258e96ddc67aa53608e67a83962fbd2471f649ddf1", + "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_actions_stop_busy_worker_before_timeout\n -> BlockingRoutine\n -> BlockingRoutine.__init__\n -> BlockingRoutine._release\n -> BlockingRoutine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_actions_stop_busy_worker_before_timeout:dataflow_slice", + "span_start": 43, + "span_end": 212, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "8bd726155ba387d3579763ee84dfd2f9a90bc917da88f3b2e89416ab5c1254d6", + "edge_type": "dataflow_slice", + "src_symbol_id": "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "src_qname": "test_actions_stop_busy_worker_before_timeout", + "dst_symbol_id": "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04", + "dst_ref": "BlockingRoutine.run", + "resolution": "resolved", + "slice_id": "8bd726155ba387d3579763ee84dfd2f9a90bc917da88f3b2e89416ab5c1254d6", + "root_symbol_id": "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "path_symbols": [ + "test_actions_stop_busy_worker_before_timeout", + "BlockingRoutine", + "BlockingRoutine.__init__", + "BlockingRoutine._release", + "BlockingRoutine.run" + ], + "path_symbol_ids": [ + "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "a3349c5bc65e4003a4bbd6a8dbb7a54c337e12d1aed930caa701b12e520f1e67", + "486deeed3043c6db985aef258e96ddc67aa53608e67a83962fbd2471f649ddf1", + "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "def test_runtime_graceful_stop_waits_until_worker_finishes() -> None:\n started = Event()\n release = Event()\n runtime = RuntimeManager()\n runtime.register_module(BlockingModule(started, release))\n runtime.start()\n assert started.wait(timeout=1.0) is True\n assert runtime.status()[\"runtime\"][\"state\"] == \"busy\"\n\n stop_thread = Thread(target=runtime.stop, kwargs={\"timeout\": 1.0}, daemon=True)\n stop_thread.start()\n sleep(0.1)\n assert stop_thread.is_alive() is True\n\n release.set()\n stop_thread.join(timeout=1.0)\n assert stop_thread.is_alive() is False\n assert runtime.status()[\"runtime\"][\"state\"] == \"stopped\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_runtime.py:test_runtime_graceful_stop_waits_until_worker_finishes", + "span_start": 226, + "span_end": 243, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 8, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "def test_runtime_runs_worker_routine_and_exposes_status(tmp_path) -> None:\n config_path = tmp_path / \"config.yml\"\n config_path.write_text(\n \"\"\"\nplatform:\n workers: 1\nlog:\n version: 1\n disable_existing_loggers: false\n handlers:\n console:\n class: logging.StreamHandler\n root:\n level: INFO\n handlers: [console]\n\"\"\".strip(),\n encoding=\"utf-8\",\n )\n runtime = RuntimeManager()\n runtime.add_config_file(config_path)\n module = ExampleModule()\n runtime.register_module(module)\n\n runtime.start()\n sleep(0.2)\n status = runtime.status()\n runtime.stop()\n\n assert module.routine.processed == [{\"id\": 1}]\n assert status[\"modules\"] == [\"example\"]\n assert status[\"runtime\"][\"state\"] == \"idle\"\n assert status[\"health\"][\"status\"] == \"ok\"\n assert status[\"config\"] == {\"platform\": {\"workers\": 1}, \"log\": status[\"config\"][\"log\"]}", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_runtime.py:test_runtime_runs_worker_routine_and_exposes_status", + "span_start": 191, + "span_end": 223, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 7, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _build_runtime(worker: Worker, *, control_timeout: int = 1) -> tuple[RuntimeManager, str]:\n runtime = RuntimeManager()\n channel = HttpControlChannel(host=\"127.0.0.1\", port=0, timeout=control_timeout)\n runtime.control_plane.register_channel(channel)\n runtime.register_module(WorkerModule(worker))\n runtime.start()\n return runtime, f\"http://127.0.0.1:{channel.port}\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_build_runtime", + "span_start": 154, + "span_end": 160, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 6, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def test_worker_wakes_up_with_configured_interval() -> None:\n interval = 0.15\n routine = IntervalRoutine()\n worker = ScenarioWorker(\"interval-worker\", routine, interval=interval)\n runtime = RuntimeManager()\n runtime.register_module(WorkerModule(worker))\n\n runtime.start()\n try:\n assert routine.wait_runs(count=3, timeout=2.0) is True\n finally:\n runtime.stop()\n\n deltas = routine.deltas()\n assert len(deltas) >= 2\n assert all(delta >= interval * 0.7 for delta in deltas[:2])", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:test_worker_wakes_up_with_configured_interval", + "span_start": 163, + "span_end": 178, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 7, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class BlockingRoutine:\n def __init__(self, started: Event, release: Event) -> None:\n self._started = started\n self._release = release\n\n def run(self) -> None:\n self._started.set()\n self._release.wait(timeout=5.0)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:BlockingRoutine", + "span_start": 40, + "span_end": 47, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class ScenarioWorker(Worker):\n def __init__(self, name: str, routine: object, *, interval: float = 0.05) -> None:\n self._name = name\n self._routine = routine\n self._interval = interval\n self._thread: Thread | None = None\n self._stop_requested = Event()\n self._in_flight = 0\n self._runs = 0\n self._lock = Lock()\n\n @property\n def name(self) -> str:\n return self._name\n\n @property\n def critical(self) -> bool:\n return True\n\n def start(self) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._stop_requested.clear()\n self._thread = Thread(target=self._loop, name=f\"{self._name}-thread\", daemon=True)\n self._thread.start()\n\n def stop(self, force: bool = False) -> None:\n self._stop_requested.set()\n\n def health(self) -> WorkerHealth:\n return WorkerHealth(name=self.name, status=\"ok\", critical=True, meta={\"runs\": self._runs})\n\n def status(self) -> WorkerStatus:\n thread_alive = self._thread is not None and self._thread.is_alive()\n with self._lock:\n in_flight = self._in_flight\n runs = self._runs\n if not thread_alive:\n state = \"stopped\"\n elif self._stop_requested.is_set():\n state = \"stopping\"\n elif in_flight > 0:\n state = \"busy\"\n else:\n state = \"idle\"\n return WorkerStatus(name=self.name, state=state, in_flight=in_flight, meta={\"runs\": runs})\n\n def _loop(self) -> None:\n while not self._stop_requested.is_set():\n with self._lock:\n self._in_flight += 1\n try:\n self._routine.run()\n with self._lock:\n self._runs += 1\n finally:\n with self._lock:\n self._in_flight -= 1\n if self._stop_requested.is_set():\n return\n sleep(self._interval)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:ScenarioWorker", + "span_start": 50, + "span_end": 110, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 2, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class WorkerModule(ApplicationModule):\n def __init__(self, worker: Worker) -> None:\n self._worker = worker\n\n @property\n def name(self) -> str:\n return \"business-tests\"\n\n def register(self, registry: ModuleRegistry) -> None:\n registry.add_worker(self._worker)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:WorkerModule", + "span_start": 113, + "span_end": 122, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 3, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _http_call_json(\n base_url: str,\n path: str,\n *,\n method: str = \"GET\",\n headers: dict[str, str] | None = None,\n) -> tuple[int, dict[str, object]]:\n request = Request(f\"{base_url}{path}\", method=method, headers=headers or {})\n try:\n with urlopen(request, timeout=15.0) as response:\n status = response.status\n body = response.read()\n except HTTPError as error:\n status = error.code\n body = error.read()\n payload = json.loads(body.decode(\"utf-8\"))\n return status, payload", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_http_call_json", + "span_start": 125, + "span_end": 141, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 4, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class IntervalRoutine:\n calls: list[float] = field(default_factory=list)\n _lock: Lock = field(default_factory=Lock)\n\n def run(self) -> None:\n with self._lock:\n self.calls.append(monotonic())\n\n def wait_runs(self, count: int, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n with self._lock:\n if len(self.calls) >= count:\n return True\n sleep(0.01)\n return False\n\n def deltas(self) -> list[float]:\n with self._lock:\n return [self.calls[index + 1] - self.calls[index] for index in range(len(self.calls) - 1)]", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:IntervalRoutine", + "span_start": 18, + "span_end": 37, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _poll_until_stopped(base_url: str, timeout: float = 2.0) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n _, payload = _http_call_json(base_url, \"/actions/status\")\n if payload.get(\"detail\") == \"stopped\":\n return True\n sleep(0.05)\n return False", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_poll_until_stopped", + "span_start": 144, + "span_end": 151, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 5, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C0_SOURCE_CHUNKS": 10 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src", + "tests" + ], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src", + "tests" + ], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Где тесты для RuntimeManager? test_runtime_manager TestRuntimeManager RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Где тесты для RuntimeManager? test_runtime_manager TestRuntimeManager RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 10, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 0, + "candidates_after_filter": 0 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src", + "tests" + ], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src", + "tests" + ], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 10, + "candidates_after_filter": 10 + } + ], + "fallback": { + "used": true, + "reason": "scope_relaxed_no_hits" + }, + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "RuntimeManager" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "miss", + "hit_count": 0, + "fail_reason": "scope_relaxed_no_hits" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 10, + "fail_reason": null + } + ] + }, + "constraint_violations": [ + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C1_SYMBOL_CATALOG", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + } + ], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 153, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 80, + "C2_DEPENDENCY_GRAPH": 56, + "C0_SOURCE_CHUNKS": 17 + }, + "merge_rank": 0 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Где тесты для RuntimeManager?", + "rag_count": 16 + }, + "output": { + "llm_answer": "1. Прямые тесты:\n - tests/test_runtime.py | test_runtime_runs_worker_routine_and_exposes_status\n - tests/test_runtime.py | test_runtime_graceful_stop_waits_until_worker_finishes\n \n2. Косвенные или ближайшие тесты:\n - tests/test_business_control_actions.py | _build_runtime\n - tests/test_business_control_actions.py | test_worker_wakes_up_with_configured_interval\n\n3. Что именно проверяется:\n - test_runtime_runs_worker_routine_and_exposes_status проверяет запуск рабочего потока, регистрацию модуля и получение статуса выполнения.\n - test_runtime_graceful_stop_waits_until_worker_finishes проверяет корректную остановку рабочего процесса и изменение состояния runtime после остановки.\n - tests/test_business_control_actions.py содержит косвенные тесты через инстанцирование RuntimeManager в методах _build_runtime и test_worker_wakes_up_with_configured_interval.\n\n4. Пробелы покрытия:\n - Прямое покрытие отсутствует для других аспектов работы RuntimeManager, таких как обработка ошибок, работа с конфигурацией, интеграция с внешними сервисами и т.д. Требуются дополнительные тесты для этих случаев." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 904, + "evidence_rows": 16, + "evidence_chars": 7086 + }, + "evidence_summary": [ + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 2 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 10, + "unique_paths": 2 + } + ], + "prompt_template_id": "intent_code_qa_find_tests_ru_v2", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 2116 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-find-tests-runtime-manager.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-find-tests-runtime-manager.md new file mode 100644 index 0000000..01dd8fb --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-find-tests-runtime-manager.md @@ -0,0 +1,32 @@ +# plba-v2-find-tests-runtime-manager + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Где тесты для RuntimeManager? + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 16, + "llm_answer": "1. Прямые тесты:\n - tests/test_runtime.py | test_runtime_runs_worker_routine_and_exposes_status\n - tests/test_runtime.py | test_runtime_graceful_stop_waits_until_worker_finishes\n \n2. Косвенные или ближайшие тесты:\n - tests/test_business_control_actions.py | _build_runtime\n - tests/test_business_control_actions.py | test_worker_wakes_up_with_configured_interval\n\n3. Что именно проверяется:\n - test_runtime_runs_worker_routine_and_exposes_status проверяет запуск рабочего потока, регистрацию модуля и получение статуса выполнения.\n - test_runtime_graceful_stop_waits_until_worker_finishes проверяет корректную остановку рабочего процесса и изменение состояния runtime после остановки.\n - tests/test_business_control_actions.py содержит косвенные тесты через инстанцирование RuntimeManager в методах _build_runtime и test_worker_wakes_up_with_configured_interval.\n\n4. Пробелы покрытия:\n - Прямое покрытие отсутствует для других аспектов работы RuntimeManager, таких как обработка ошибок, работа с конфигурацией, интеграция с внешними сервисами и т.д. Требуются дополнительные тесты для этих случаев.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-find-tests-trace-service.json b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-find-tests-trace-service.json new file mode 100644 index 0000000..bfb131a --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-find-tests-trace-service.json @@ -0,0 +1,2047 @@ +{ + "case_id": "plba-v2-find-tests-trace-service", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 16, + "llm_answer": "1. Прямые тесты:\n - tests/test_runtime.py | test_trace_service_writes_contexts_and_messages\n - Проверка записи контекстов и сообщений в TraceService.\n - tests/test_runtime.py | test_trace_service_supports_debug_warning_and_error_levels\n - Проверка поддержки различных уровней логирования (DEBUG, WARNING, ERROR).\n\n2. Косвенные или ближайшие тесты:\n - Нет известных косвенных тестов, которые напрямую касаются TraceService.\n\n3. Что именно проверяется:\n - Запись и обработка контекста и сообщений в TraceService.\n - Поддержка различных уровней логирования и запись соответствующих сообщений.\n\n4. Пробелы покрытия:\n - Прямого тестирования работы самого класса TraceService без привязки к транспорту нет.\n - Тестирование сценариев ошибок и исключений при работе с TraceService отсутствует.\n - Отсутствие проверки взаимодействий с внешними сервисами через транспорт.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "TraceService" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-v2-find-tests-trace-service", + "text": "Где тесты для TraceService?", + "mode": "full_chain", + "run_started_at": "2026-03-12T13:23:57", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Где тесты для TraceService?", + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "TraceService" + ], + "confidence": 0.0 + }, + "rag_count": 16, + "rag_rows": [ + { + "path": "tests/test_runtime.py", + "content": "test_trace_service_writes_contexts_and_messages\n -> RecordingTransport\n -> RecordingTransport.__init__\n -> RecordingTransport.contexts\n -> test_trace_service_writes_contexts_and_messages", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_trace_service_writes_contexts_and_messages:dataflow_slice", + "span_start": 181, + "span_end": 256, + "lexical_rank": 4, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "1636a2f70dee79c804259dc114af6c1ab4db27099911e5f97ac97a2bcb59be8a", + "edge_type": "dataflow_slice", + "src_symbol_id": "1600da201da1d0150240b400e3232172354156decdd1a04e1ab1a1edcd3a7e99", + "src_qname": "test_trace_service_writes_contexts_and_messages", + "dst_symbol_id": "1600da201da1d0150240b400e3232172354156decdd1a04e1ab1a1edcd3a7e99", + "dst_ref": "test_trace_service_writes_contexts_and_messages", + "resolution": "resolved", + "slice_id": "1636a2f70dee79c804259dc114af6c1ab4db27099911e5f97ac97a2bcb59be8a", + "root_symbol_id": "1600da201da1d0150240b400e3232172354156decdd1a04e1ab1a1edcd3a7e99", + "path_symbols": [ + "test_trace_service_writes_contexts_and_messages", + "RecordingTransport", + "RecordingTransport.__init__", + "RecordingTransport.contexts", + "test_trace_service_writes_contexts_and_messages" + ], + "path_symbol_ids": [ + "1600da201da1d0150240b400e3232172354156decdd1a04e1ab1a1edcd3a7e99", + "e3d635de1f1880673b69bf73ca6a45caffa5c7fdc23d589d5e40f76b86bdcd33", + "e34d80da723a7115a7a7586b52dc8b5cfda05c581509eee0c1a0296df9a340cb", + "1600da201da1d0150240b400e3232172354156decdd1a04e1ab1a1edcd3a7e99" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "test_trace_service_writes_contexts_and_messages\n -> RecordingTransport\n -> RecordingTransport.__init__\n -> RecordingTransport.contexts\n -> test_trace_service_allows_messages_without_status", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_trace_service_writes_contexts_and_messages:dataflow_slice", + "span_start": 181, + "span_end": 293, + "lexical_rank": 4, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "5db5abe56b73f884c5178647bd25ef150064a94a41fc8c052aebaa09bd7fdb3d", + "edge_type": "dataflow_slice", + "src_symbol_id": "1600da201da1d0150240b400e3232172354156decdd1a04e1ab1a1edcd3a7e99", + "src_qname": "test_trace_service_writes_contexts_and_messages", + "dst_symbol_id": "7127ca85ce6447928e195e901d36f1e1f1e8205a686e567c2d1b187431f989df", + "dst_ref": "test_trace_service_allows_messages_without_status", + "resolution": "resolved", + "slice_id": "5db5abe56b73f884c5178647bd25ef150064a94a41fc8c052aebaa09bd7fdb3d", + "root_symbol_id": "1600da201da1d0150240b400e3232172354156decdd1a04e1ab1a1edcd3a7e99", + "path_symbols": [ + "test_trace_service_writes_contexts_and_messages", + "RecordingTransport", + "RecordingTransport.__init__", + "RecordingTransport.contexts", + "test_trace_service_allows_messages_without_status" + ], + "path_symbol_ids": [ + "1600da201da1d0150240b400e3232172354156decdd1a04e1ab1a1edcd3a7e99", + "e3d635de1f1880673b69bf73ca6a45caffa5c7fdc23d589d5e40f76b86bdcd33", + "e34d80da723a7115a7a7586b52dc8b5cfda05c581509eee0c1a0296df9a340cb", + "7127ca85ce6447928e195e901d36f1e1f1e8205a686e567c2d1b187431f989df" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "test_trace_service_writes_contexts_and_messages\n -> RecordingTransport\n -> RecordingTransport.__init__\n -> RecordingTransport.contexts\n -> RecordingTransport.write_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_trace_service_writes_contexts_and_messages:dataflow_slice", + "span_start": 181, + "span_end": 249, + "lexical_rank": 4, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "60d7a8655fa4c53d9130ce342fc023d24ccfa16baea47ad60c91d2d49f547565", + "edge_type": "dataflow_slice", + "src_symbol_id": "1600da201da1d0150240b400e3232172354156decdd1a04e1ab1a1edcd3a7e99", + "src_qname": "test_trace_service_writes_contexts_and_messages", + "dst_symbol_id": "b8bbf341e230198caafe54727e13f2db27b7200d6fd95684fc5cf748db1a0e88", + "dst_ref": "RecordingTransport.write_context", + "resolution": "resolved", + "slice_id": "60d7a8655fa4c53d9130ce342fc023d24ccfa16baea47ad60c91d2d49f547565", + "root_symbol_id": "1600da201da1d0150240b400e3232172354156decdd1a04e1ab1a1edcd3a7e99", + "path_symbols": [ + "test_trace_service_writes_contexts_and_messages", + "RecordingTransport", + "RecordingTransport.__init__", + "RecordingTransport.contexts", + "RecordingTransport.write_context" + ], + "path_symbol_ids": [ + "1600da201da1d0150240b400e3232172354156decdd1a04e1ab1a1edcd3a7e99", + "e3d635de1f1880673b69bf73ca6a45caffa5c7fdc23d589d5e40f76b86bdcd33", + "e34d80da723a7115a7a7586b52dc8b5cfda05c581509eee0c1a0296df9a340cb", + "b8bbf341e230198caafe54727e13f2db27b7200d6fd95684fc5cf748db1a0e88" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "test_trace_service_supports_debug_warning_and_error_levels\n -> RecordingTransport\n -> RecordingTransport.__init__\n -> RecordingTransport.contexts\n -> RecordingTransport.write_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_trace_service_supports_debug_warning_and_error_levels:dataflow_slice", + "span_start": 181, + "span_end": 265, + "lexical_rank": 4, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "1372a2241c7265705e5cf9dceeb5e59836fac1d679227c4279ed39e0798ddddf", + "edge_type": "dataflow_slice", + "src_symbol_id": "ede183f1c546725064e28ddab1ffdbae0d1a1258fd62a50eb556c10d10995415", + "src_qname": "test_trace_service_supports_debug_warning_and_error_levels", + "dst_symbol_id": "b8bbf341e230198caafe54727e13f2db27b7200d6fd95684fc5cf748db1a0e88", + "dst_ref": "RecordingTransport.write_context", + "resolution": "resolved", + "slice_id": "1372a2241c7265705e5cf9dceeb5e59836fac1d679227c4279ed39e0798ddddf", + "root_symbol_id": "ede183f1c546725064e28ddab1ffdbae0d1a1258fd62a50eb556c10d10995415", + "path_symbols": [ + "test_trace_service_supports_debug_warning_and_error_levels", + "RecordingTransport", + "RecordingTransport.__init__", + "RecordingTransport.contexts", + "RecordingTransport.write_context" + ], + "path_symbol_ids": [ + "ede183f1c546725064e28ddab1ffdbae0d1a1258fd62a50eb556c10d10995415", + "e3d635de1f1880673b69bf73ca6a45caffa5c7fdc23d589d5e40f76b86bdcd33", + "e34d80da723a7115a7a7586b52dc8b5cfda05c581509eee0c1a0296df9a340cb", + "b8bbf341e230198caafe54727e13f2db27b7200d6fd95684fc5cf748db1a0e88" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "test_trace_service_supports_debug_warning_and_error_levels\n -> RecordingTransport\n -> RecordingTransport.__init__\n -> RecordingTransport.contexts\n -> test_trace_service_writes_contexts_and_messages", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_trace_service_supports_debug_warning_and_error_levels:dataflow_slice", + "span_start": 181, + "span_end": 265, + "lexical_rank": 4, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "8b6a5a738525df160600d71c15915704172de20db436ea2f84b6e039be396a2d", + "edge_type": "dataflow_slice", + "src_symbol_id": "ede183f1c546725064e28ddab1ffdbae0d1a1258fd62a50eb556c10d10995415", + "src_qname": "test_trace_service_supports_debug_warning_and_error_levels", + "dst_symbol_id": "1600da201da1d0150240b400e3232172354156decdd1a04e1ab1a1edcd3a7e99", + "dst_ref": "test_trace_service_writes_contexts_and_messages", + "resolution": "resolved", + "slice_id": "8b6a5a738525df160600d71c15915704172de20db436ea2f84b6e039be396a2d", + "root_symbol_id": "ede183f1c546725064e28ddab1ffdbae0d1a1258fd62a50eb556c10d10995415", + "path_symbols": [ + "test_trace_service_supports_debug_warning_and_error_levels", + "RecordingTransport", + "RecordingTransport.__init__", + "RecordingTransport.contexts", + "test_trace_service_writes_contexts_and_messages" + ], + "path_symbol_ids": [ + "ede183f1c546725064e28ddab1ffdbae0d1a1258fd62a50eb556c10d10995415", + "e3d635de1f1880673b69bf73ca6a45caffa5c7fdc23d589d5e40f76b86bdcd33", + "e34d80da723a7115a7a7586b52dc8b5cfda05c581509eee0c1a0296df9a340cb", + "1600da201da1d0150240b400e3232172354156decdd1a04e1ab1a1edcd3a7e99" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "test_trace_service_supports_debug_warning_and_error_levels\n -> RecordingTransport\n -> RecordingTransport.__init__\n -> RecordingTransport.contexts\n -> test_trace_service_allows_messages_without_status", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_trace_service_supports_debug_warning_and_error_levels:dataflow_slice", + "span_start": 181, + "span_end": 293, + "lexical_rank": 4, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "f7d099f6d5746aa61a3025fd7eef791369bd3a3e5df4bc716de87e7b149ccde6", + "edge_type": "dataflow_slice", + "src_symbol_id": "ede183f1c546725064e28ddab1ffdbae0d1a1258fd62a50eb556c10d10995415", + "src_qname": "test_trace_service_supports_debug_warning_and_error_levels", + "dst_symbol_id": "7127ca85ce6447928e195e901d36f1e1f1e8205a686e567c2d1b187431f989df", + "dst_ref": "test_trace_service_allows_messages_without_status", + "resolution": "resolved", + "slice_id": "f7d099f6d5746aa61a3025fd7eef791369bd3a3e5df4bc716de87e7b149ccde6", + "root_symbol_id": "ede183f1c546725064e28ddab1ffdbae0d1a1258fd62a50eb556c10d10995415", + "path_symbols": [ + "test_trace_service_supports_debug_warning_and_error_levels", + "RecordingTransport", + "RecordingTransport.__init__", + "RecordingTransport.contexts", + "test_trace_service_allows_messages_without_status" + ], + "path_symbol_ids": [ + "ede183f1c546725064e28ddab1ffdbae0d1a1258fd62a50eb556c10d10995415", + "e3d635de1f1880673b69bf73ca6a45caffa5c7fdc23d589d5e40f76b86bdcd33", + "e34d80da723a7115a7a7586b52dc8b5cfda05c581509eee0c1a0296df9a340cb", + "7127ca85ce6447928e195e901d36f1e1f1e8205a686e567c2d1b187431f989df" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "def test_trace_service_writes_contexts_and_messages() -> None:\n from app_runtime.tracing.service import TraceService\n\n transport = RecordingTransport()\n manager = TraceService(transport=transport)\n\n with manager.open_context(alias=\"worker\", kind=\"worker\", attrs={\"routine\": \"incoming\"}):\n manager.step(\"parse\")\n manager.info(\"started\", status=\"ok\", attrs={\"attempt\": 1})\n\n assert len(transport.contexts) == 1\n assert len(transport.messages) == 1\n assert transport.contexts[0].alias == \"worker\"\n assert transport.messages[0].step == \"parse\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_runtime.py:test_trace_service_writes_contexts_and_messages", + "span_start": 246, + "span_end": 259, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 9, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "def test_trace_service_supports_debug_warning_and_error_levels() -> None:\n from app_runtime.tracing.service import TraceService\n\n transport = RecordingTransport()\n manager = TraceService(transport=transport)\n\n with manager.open_context(alias=\"worker\", kind=\"worker\", attrs={\"routine\": \"incoming\"}):\n manager.step(\"validate\")\n manager.debug(\"validation details\", attrs={\"rule\": \"basic\"})\n manager.warning(\"validation warning\", status=\"degraded\", attrs={\"attempt\": 1})\n manager.error(\"integration failed\", status=\"failed\", attrs={\"integration\": \"crm\"})\n manager.exception(\"caught exception\", attrs={\"exception_type\": \"RuntimeError\"})\n\n levels = [message.level for message in transport.messages]\n assert levels == [\"DEBUG\", \"WARNING\", \"ERROR\", \"ERROR\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_runtime.py:test_trace_service_supports_debug_warning_and_error_levels", + "span_start": 262, + "span_end": 276, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 10, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "def test_trace_service_allows_messages_without_status() -> None:\n from app_runtime.tracing.service import TraceService\n\n transport = RecordingTransport()\n manager = TraceService(transport=transport)\n\n with manager.open_context(alias=\"worker\", kind=\"worker\"):\n manager.step(\"optional-status\")\n manager.debug(\"debug without status\")\n manager.info(\"info without status\")\n manager.warning(\"warning without status\")\n manager.error(\"error without status\")\n\n assert [message.status for message in transport.messages] == [\"\", \"\", \"\", \"\"]\n assert all(message.trace_id == transport.contexts[0].trace_id for message in transport.messages)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_runtime.py:test_trace_service_allows_messages_without_status", + "span_start": 279, + "span_end": 293, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 11, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class ScenarioWorker(Worker):\n def __init__(self, name: str, routine: object, *, interval: float = 0.05) -> None:\n self._name = name\n self._routine = routine\n self._interval = interval\n self._thread: Thread | None = None\n self._stop_requested = Event()\n self._in_flight = 0\n self._runs = 0\n self._lock = Lock()\n\n @property\n def name(self) -> str:\n return self._name\n\n @property\n def critical(self) -> bool:\n return True\n\n def start(self) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._stop_requested.clear()\n self._thread = Thread(target=self._loop, name=f\"{self._name}-thread\", daemon=True)\n self._thread.start()\n\n def stop(self, force: bool = False) -> None:\n self._stop_requested.set()\n\n def health(self) -> WorkerHealth:\n return WorkerHealth(name=self.name, status=\"ok\", critical=True, meta={\"runs\": self._runs})\n\n def status(self) -> WorkerStatus:\n thread_alive = self._thread is not None and self._thread.is_alive()\n with self._lock:\n in_flight = self._in_flight\n runs = self._runs\n if not thread_alive:\n state = \"stopped\"\n elif self._stop_requested.is_set():\n state = \"stopping\"\n elif in_flight > 0:\n state = \"busy\"\n else:\n state = \"idle\"\n return WorkerStatus(name=self.name, state=state, in_flight=in_flight, meta={\"runs\": runs})\n\n def _loop(self) -> None:\n while not self._stop_requested.is_set():\n with self._lock:\n self._in_flight += 1\n try:\n self._routine.run()\n with self._lock:\n self._runs += 1\n finally:\n with self._lock:\n self._in_flight -= 1\n if self._stop_requested.is_set():\n return\n sleep(self._interval)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:ScenarioWorker", + "span_start": 50, + "span_end": 110, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 2, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class IntervalRoutine:\n calls: list[float] = field(default_factory=list)\n _lock: Lock = field(default_factory=Lock)\n\n def run(self) -> None:\n with self._lock:\n self.calls.append(monotonic())\n\n def wait_runs(self, count: int, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n with self._lock:\n if len(self.calls) >= count:\n return True\n sleep(0.01)\n return False\n\n def deltas(self) -> list[float]:\n with self._lock:\n return [self.calls[index + 1] - self.calls[index] for index in range(len(self.calls) - 1)]", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:IntervalRoutine", + "span_start": 18, + "span_end": 37, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class BlockingRoutine:\n def __init__(self, started: Event, release: Event) -> None:\n self._started = started\n self._release = release\n\n def run(self) -> None:\n self._started.set()\n self._release.wait(timeout=5.0)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:BlockingRoutine", + "span_start": 40, + "span_end": 47, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def test_worker_wakes_up_with_configured_interval() -> None:\n interval = 0.15\n routine = IntervalRoutine()\n worker = ScenarioWorker(\"interval-worker\", routine, interval=interval)\n runtime = RuntimeManager()\n runtime.register_module(WorkerModule(worker))\n\n runtime.start()\n try:\n assert routine.wait_runs(count=3, timeout=2.0) is True\n finally:\n runtime.stop()\n\n deltas = routine.deltas()\n assert len(deltas) >= 2\n assert all(delta >= interval * 0.7 for delta in deltas[:2])", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:test_worker_wakes_up_with_configured_interval", + "span_start": 163, + "span_end": 178, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 7, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _http_call_json(\n base_url: str,\n path: str,\n *,\n method: str = \"GET\",\n headers: dict[str, str] | None = None,\n) -> tuple[int, dict[str, object]]:\n request = Request(f\"{base_url}{path}\", method=method, headers=headers or {})\n try:\n with urlopen(request, timeout=15.0) as response:\n status = response.status\n body = response.read()\n except HTTPError as error:\n status = error.code\n body = error.read()\n payload = json.loads(body.decode(\"utf-8\"))\n return status, payload", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_http_call_json", + "span_start": 125, + "span_end": 141, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 4, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _build_runtime(worker: Worker, *, control_timeout: int = 1) -> tuple[RuntimeManager, str]:\n runtime = RuntimeManager()\n channel = HttpControlChannel(host=\"127.0.0.1\", port=0, timeout=control_timeout)\n runtime.control_plane.register_channel(channel)\n runtime.register_module(WorkerModule(worker))\n runtime.start()\n return runtime, f\"http://127.0.0.1:{channel.port}\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_build_runtime", + "span_start": 154, + "span_end": 160, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 6, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class WorkerModule(ApplicationModule):\n def __init__(self, worker: Worker) -> None:\n self._worker = worker\n\n @property\n def name(self) -> str:\n return \"business-tests\"\n\n def register(self, registry: ModuleRegistry) -> None:\n registry.add_worker(self._worker)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:WorkerModule", + "span_start": 113, + "span_end": 122, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 3, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "1. Прямые тесты:\n - tests/test_runtime.py | test_trace_service_writes_contexts_and_messages\n - Проверка записи контекстов и сообщений в TraceService.\n - tests/test_runtime.py | test_trace_service_supports_debug_warning_and_error_levels\n - Проверка поддержки различных уровней логирования (DEBUG, WARNING, ERROR).\n\n2. Косвенные или ближайшие тесты:\n - Нет известных косвенных тестов, которые напрямую касаются TraceService.\n\n3. Что именно проверяется:\n - Запись и обработка контекста и сообщений в TraceService.\n - Поддержка различных уровней логирования и запись соответствующих сообщений.\n\n4. Пробелы покрытия:\n - Прямого тестирования работы самого класса TraceService без привязки к транспорту нет.\n - Тестирование сценариев ошибок и исключений при работе с TraceService отсутствует.\n - Отсутствие проверки взаимодействий с внешними сервисами через транспорт.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C2_DEPENDENCY_GRAPH" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "TraceService" + ], + "keyword_hints": [ + "TraceService" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "test_file_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "test_symbol_patterns": [ + "test_trace_service", + "TestTraceService", + "TraceService" + ], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C0_SOURCE_CHUNKS": 10 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src", + "tests" + ], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src", + "tests" + ], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "TraceService", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Где тесты для TraceService? test_trace_service TestTraceService TraceService", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Где тесты для TraceService? test_trace_service TestTraceService TraceService", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 10, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 0, + "candidates_after_filter": 0 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src", + "tests" + ], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src", + "tests" + ], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 10, + "candidates_after_filter": 10 + } + ], + "fallback": { + "used": true, + "reason": "scope_relaxed_no_hits" + }, + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "TraceService" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "miss", + "hit_count": 0, + "fail_reason": "scope_relaxed_no_hits" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 10, + "fail_reason": null + } + ] + }, + "constraint_violations": [ + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C1_SYMBOL_CATALOG", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + } + ], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 128, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 58, + "C2_DEPENDENCY_GRAPH": 53, + "C0_SOURCE_CHUNKS": 16 + }, + "merge_rank": 0, + "prompt_build": 0, + "llm_call": 1543 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 978, + "evidence_rows": 16, + "evidence_chars": 7847 + }, + "evidence_summary": [ + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 10, + "unique_paths": 2 + } + ], + "prompt_template_id": "intent_code_qa_find_tests_ru_v2", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "TraceService" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 16, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-v2-find-tests-trace-service", + "mode": "full_chain", + "run_started_at": "2026-03-12T13:23:57", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Где тесты для TraceService?", + "normalized_query": "Где тесты для TraceService?" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Где тесты для TraceService?" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Где тесты для TraceService?" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "TraceService" + ], + "keyword_hints": [ + "TraceService" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "test_file_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "test_symbol_patterns": [ + "test_trace_service", + "TestTraceService", + "TraceService" + ], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Где тесты для TraceService?" + }, + "output": { + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "TraceService" + ], + "confidence": 0.0 + }, + "rag_count": 16, + "rag_rows": [ + { + "path": "tests/test_runtime.py", + "content": "test_trace_service_writes_contexts_and_messages\n -> RecordingTransport\n -> RecordingTransport.__init__\n -> RecordingTransport.contexts\n -> test_trace_service_writes_contexts_and_messages", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_trace_service_writes_contexts_and_messages:dataflow_slice", + "span_start": 181, + "span_end": 256, + "lexical_rank": 4, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "1636a2f70dee79c804259dc114af6c1ab4db27099911e5f97ac97a2bcb59be8a", + "edge_type": "dataflow_slice", + "src_symbol_id": "1600da201da1d0150240b400e3232172354156decdd1a04e1ab1a1edcd3a7e99", + "src_qname": "test_trace_service_writes_contexts_and_messages", + "dst_symbol_id": "1600da201da1d0150240b400e3232172354156decdd1a04e1ab1a1edcd3a7e99", + "dst_ref": "test_trace_service_writes_contexts_and_messages", + "resolution": "resolved", + "slice_id": "1636a2f70dee79c804259dc114af6c1ab4db27099911e5f97ac97a2bcb59be8a", + "root_symbol_id": "1600da201da1d0150240b400e3232172354156decdd1a04e1ab1a1edcd3a7e99", + "path_symbols": [ + "test_trace_service_writes_contexts_and_messages", + "RecordingTransport", + "RecordingTransport.__init__", + "RecordingTransport.contexts", + "test_trace_service_writes_contexts_and_messages" + ], + "path_symbol_ids": [ + "1600da201da1d0150240b400e3232172354156decdd1a04e1ab1a1edcd3a7e99", + "e3d635de1f1880673b69bf73ca6a45caffa5c7fdc23d589d5e40f76b86bdcd33", + "e34d80da723a7115a7a7586b52dc8b5cfda05c581509eee0c1a0296df9a340cb", + "1600da201da1d0150240b400e3232172354156decdd1a04e1ab1a1edcd3a7e99" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "test_trace_service_writes_contexts_and_messages\n -> RecordingTransport\n -> RecordingTransport.__init__\n -> RecordingTransport.contexts\n -> test_trace_service_allows_messages_without_status", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_trace_service_writes_contexts_and_messages:dataflow_slice", + "span_start": 181, + "span_end": 293, + "lexical_rank": 4, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "5db5abe56b73f884c5178647bd25ef150064a94a41fc8c052aebaa09bd7fdb3d", + "edge_type": "dataflow_slice", + "src_symbol_id": "1600da201da1d0150240b400e3232172354156decdd1a04e1ab1a1edcd3a7e99", + "src_qname": "test_trace_service_writes_contexts_and_messages", + "dst_symbol_id": "7127ca85ce6447928e195e901d36f1e1f1e8205a686e567c2d1b187431f989df", + "dst_ref": "test_trace_service_allows_messages_without_status", + "resolution": "resolved", + "slice_id": "5db5abe56b73f884c5178647bd25ef150064a94a41fc8c052aebaa09bd7fdb3d", + "root_symbol_id": "1600da201da1d0150240b400e3232172354156decdd1a04e1ab1a1edcd3a7e99", + "path_symbols": [ + "test_trace_service_writes_contexts_and_messages", + "RecordingTransport", + "RecordingTransport.__init__", + "RecordingTransport.contexts", + "test_trace_service_allows_messages_without_status" + ], + "path_symbol_ids": [ + "1600da201da1d0150240b400e3232172354156decdd1a04e1ab1a1edcd3a7e99", + "e3d635de1f1880673b69bf73ca6a45caffa5c7fdc23d589d5e40f76b86bdcd33", + "e34d80da723a7115a7a7586b52dc8b5cfda05c581509eee0c1a0296df9a340cb", + "7127ca85ce6447928e195e901d36f1e1f1e8205a686e567c2d1b187431f989df" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "test_trace_service_writes_contexts_and_messages\n -> RecordingTransport\n -> RecordingTransport.__init__\n -> RecordingTransport.contexts\n -> RecordingTransport.write_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_trace_service_writes_contexts_and_messages:dataflow_slice", + "span_start": 181, + "span_end": 249, + "lexical_rank": 4, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "60d7a8655fa4c53d9130ce342fc023d24ccfa16baea47ad60c91d2d49f547565", + "edge_type": "dataflow_slice", + "src_symbol_id": "1600da201da1d0150240b400e3232172354156decdd1a04e1ab1a1edcd3a7e99", + "src_qname": "test_trace_service_writes_contexts_and_messages", + "dst_symbol_id": "b8bbf341e230198caafe54727e13f2db27b7200d6fd95684fc5cf748db1a0e88", + "dst_ref": "RecordingTransport.write_context", + "resolution": "resolved", + "slice_id": "60d7a8655fa4c53d9130ce342fc023d24ccfa16baea47ad60c91d2d49f547565", + "root_symbol_id": "1600da201da1d0150240b400e3232172354156decdd1a04e1ab1a1edcd3a7e99", + "path_symbols": [ + "test_trace_service_writes_contexts_and_messages", + "RecordingTransport", + "RecordingTransport.__init__", + "RecordingTransport.contexts", + "RecordingTransport.write_context" + ], + "path_symbol_ids": [ + "1600da201da1d0150240b400e3232172354156decdd1a04e1ab1a1edcd3a7e99", + "e3d635de1f1880673b69bf73ca6a45caffa5c7fdc23d589d5e40f76b86bdcd33", + "e34d80da723a7115a7a7586b52dc8b5cfda05c581509eee0c1a0296df9a340cb", + "b8bbf341e230198caafe54727e13f2db27b7200d6fd95684fc5cf748db1a0e88" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "test_trace_service_supports_debug_warning_and_error_levels\n -> RecordingTransport\n -> RecordingTransport.__init__\n -> RecordingTransport.contexts\n -> RecordingTransport.write_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_trace_service_supports_debug_warning_and_error_levels:dataflow_slice", + "span_start": 181, + "span_end": 265, + "lexical_rank": 4, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "1372a2241c7265705e5cf9dceeb5e59836fac1d679227c4279ed39e0798ddddf", + "edge_type": "dataflow_slice", + "src_symbol_id": "ede183f1c546725064e28ddab1ffdbae0d1a1258fd62a50eb556c10d10995415", + "src_qname": "test_trace_service_supports_debug_warning_and_error_levels", + "dst_symbol_id": "b8bbf341e230198caafe54727e13f2db27b7200d6fd95684fc5cf748db1a0e88", + "dst_ref": "RecordingTransport.write_context", + "resolution": "resolved", + "slice_id": "1372a2241c7265705e5cf9dceeb5e59836fac1d679227c4279ed39e0798ddddf", + "root_symbol_id": "ede183f1c546725064e28ddab1ffdbae0d1a1258fd62a50eb556c10d10995415", + "path_symbols": [ + "test_trace_service_supports_debug_warning_and_error_levels", + "RecordingTransport", + "RecordingTransport.__init__", + "RecordingTransport.contexts", + "RecordingTransport.write_context" + ], + "path_symbol_ids": [ + "ede183f1c546725064e28ddab1ffdbae0d1a1258fd62a50eb556c10d10995415", + "e3d635de1f1880673b69bf73ca6a45caffa5c7fdc23d589d5e40f76b86bdcd33", + "e34d80da723a7115a7a7586b52dc8b5cfda05c581509eee0c1a0296df9a340cb", + "b8bbf341e230198caafe54727e13f2db27b7200d6fd95684fc5cf748db1a0e88" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "test_trace_service_supports_debug_warning_and_error_levels\n -> RecordingTransport\n -> RecordingTransport.__init__\n -> RecordingTransport.contexts\n -> test_trace_service_writes_contexts_and_messages", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_trace_service_supports_debug_warning_and_error_levels:dataflow_slice", + "span_start": 181, + "span_end": 265, + "lexical_rank": 4, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "8b6a5a738525df160600d71c15915704172de20db436ea2f84b6e039be396a2d", + "edge_type": "dataflow_slice", + "src_symbol_id": "ede183f1c546725064e28ddab1ffdbae0d1a1258fd62a50eb556c10d10995415", + "src_qname": "test_trace_service_supports_debug_warning_and_error_levels", + "dst_symbol_id": "1600da201da1d0150240b400e3232172354156decdd1a04e1ab1a1edcd3a7e99", + "dst_ref": "test_trace_service_writes_contexts_and_messages", + "resolution": "resolved", + "slice_id": "8b6a5a738525df160600d71c15915704172de20db436ea2f84b6e039be396a2d", + "root_symbol_id": "ede183f1c546725064e28ddab1ffdbae0d1a1258fd62a50eb556c10d10995415", + "path_symbols": [ + "test_trace_service_supports_debug_warning_and_error_levels", + "RecordingTransport", + "RecordingTransport.__init__", + "RecordingTransport.contexts", + "test_trace_service_writes_contexts_and_messages" + ], + "path_symbol_ids": [ + "ede183f1c546725064e28ddab1ffdbae0d1a1258fd62a50eb556c10d10995415", + "e3d635de1f1880673b69bf73ca6a45caffa5c7fdc23d589d5e40f76b86bdcd33", + "e34d80da723a7115a7a7586b52dc8b5cfda05c581509eee0c1a0296df9a340cb", + "1600da201da1d0150240b400e3232172354156decdd1a04e1ab1a1edcd3a7e99" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "test_trace_service_supports_debug_warning_and_error_levels\n -> RecordingTransport\n -> RecordingTransport.__init__\n -> RecordingTransport.contexts\n -> test_trace_service_allows_messages_without_status", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_trace_service_supports_debug_warning_and_error_levels:dataflow_slice", + "span_start": 181, + "span_end": 293, + "lexical_rank": 4, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "f7d099f6d5746aa61a3025fd7eef791369bd3a3e5df4bc716de87e7b149ccde6", + "edge_type": "dataflow_slice", + "src_symbol_id": "ede183f1c546725064e28ddab1ffdbae0d1a1258fd62a50eb556c10d10995415", + "src_qname": "test_trace_service_supports_debug_warning_and_error_levels", + "dst_symbol_id": "7127ca85ce6447928e195e901d36f1e1f1e8205a686e567c2d1b187431f989df", + "dst_ref": "test_trace_service_allows_messages_without_status", + "resolution": "resolved", + "slice_id": "f7d099f6d5746aa61a3025fd7eef791369bd3a3e5df4bc716de87e7b149ccde6", + "root_symbol_id": "ede183f1c546725064e28ddab1ffdbae0d1a1258fd62a50eb556c10d10995415", + "path_symbols": [ + "test_trace_service_supports_debug_warning_and_error_levels", + "RecordingTransport", + "RecordingTransport.__init__", + "RecordingTransport.contexts", + "test_trace_service_allows_messages_without_status" + ], + "path_symbol_ids": [ + "ede183f1c546725064e28ddab1ffdbae0d1a1258fd62a50eb556c10d10995415", + "e3d635de1f1880673b69bf73ca6a45caffa5c7fdc23d589d5e40f76b86bdcd33", + "e34d80da723a7115a7a7586b52dc8b5cfda05c581509eee0c1a0296df9a340cb", + "7127ca85ce6447928e195e901d36f1e1f1e8205a686e567c2d1b187431f989df" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "def test_trace_service_writes_contexts_and_messages() -> None:\n from app_runtime.tracing.service import TraceService\n\n transport = RecordingTransport()\n manager = TraceService(transport=transport)\n\n with manager.open_context(alias=\"worker\", kind=\"worker\", attrs={\"routine\": \"incoming\"}):\n manager.step(\"parse\")\n manager.info(\"started\", status=\"ok\", attrs={\"attempt\": 1})\n\n assert len(transport.contexts) == 1\n assert len(transport.messages) == 1\n assert transport.contexts[0].alias == \"worker\"\n assert transport.messages[0].step == \"parse\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_runtime.py:test_trace_service_writes_contexts_and_messages", + "span_start": 246, + "span_end": 259, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 9, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "def test_trace_service_supports_debug_warning_and_error_levels() -> None:\n from app_runtime.tracing.service import TraceService\n\n transport = RecordingTransport()\n manager = TraceService(transport=transport)\n\n with manager.open_context(alias=\"worker\", kind=\"worker\", attrs={\"routine\": \"incoming\"}):\n manager.step(\"validate\")\n manager.debug(\"validation details\", attrs={\"rule\": \"basic\"})\n manager.warning(\"validation warning\", status=\"degraded\", attrs={\"attempt\": 1})\n manager.error(\"integration failed\", status=\"failed\", attrs={\"integration\": \"crm\"})\n manager.exception(\"caught exception\", attrs={\"exception_type\": \"RuntimeError\"})\n\n levels = [message.level for message in transport.messages]\n assert levels == [\"DEBUG\", \"WARNING\", \"ERROR\", \"ERROR\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_runtime.py:test_trace_service_supports_debug_warning_and_error_levels", + "span_start": 262, + "span_end": 276, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 10, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "def test_trace_service_allows_messages_without_status() -> None:\n from app_runtime.tracing.service import TraceService\n\n transport = RecordingTransport()\n manager = TraceService(transport=transport)\n\n with manager.open_context(alias=\"worker\", kind=\"worker\"):\n manager.step(\"optional-status\")\n manager.debug(\"debug without status\")\n manager.info(\"info without status\")\n manager.warning(\"warning without status\")\n manager.error(\"error without status\")\n\n assert [message.status for message in transport.messages] == [\"\", \"\", \"\", \"\"]\n assert all(message.trace_id == transport.contexts[0].trace_id for message in transport.messages)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_runtime.py:test_trace_service_allows_messages_without_status", + "span_start": 279, + "span_end": 293, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 11, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class ScenarioWorker(Worker):\n def __init__(self, name: str, routine: object, *, interval: float = 0.05) -> None:\n self._name = name\n self._routine = routine\n self._interval = interval\n self._thread: Thread | None = None\n self._stop_requested = Event()\n self._in_flight = 0\n self._runs = 0\n self._lock = Lock()\n\n @property\n def name(self) -> str:\n return self._name\n\n @property\n def critical(self) -> bool:\n return True\n\n def start(self) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._stop_requested.clear()\n self._thread = Thread(target=self._loop, name=f\"{self._name}-thread\", daemon=True)\n self._thread.start()\n\n def stop(self, force: bool = False) -> None:\n self._stop_requested.set()\n\n def health(self) -> WorkerHealth:\n return WorkerHealth(name=self.name, status=\"ok\", critical=True, meta={\"runs\": self._runs})\n\n def status(self) -> WorkerStatus:\n thread_alive = self._thread is not None and self._thread.is_alive()\n with self._lock:\n in_flight = self._in_flight\n runs = self._runs\n if not thread_alive:\n state = \"stopped\"\n elif self._stop_requested.is_set():\n state = \"stopping\"\n elif in_flight > 0:\n state = \"busy\"\n else:\n state = \"idle\"\n return WorkerStatus(name=self.name, state=state, in_flight=in_flight, meta={\"runs\": runs})\n\n def _loop(self) -> None:\n while not self._stop_requested.is_set():\n with self._lock:\n self._in_flight += 1\n try:\n self._routine.run()\n with self._lock:\n self._runs += 1\n finally:\n with self._lock:\n self._in_flight -= 1\n if self._stop_requested.is_set():\n return\n sleep(self._interval)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:ScenarioWorker", + "span_start": 50, + "span_end": 110, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 2, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class IntervalRoutine:\n calls: list[float] = field(default_factory=list)\n _lock: Lock = field(default_factory=Lock)\n\n def run(self) -> None:\n with self._lock:\n self.calls.append(monotonic())\n\n def wait_runs(self, count: int, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n with self._lock:\n if len(self.calls) >= count:\n return True\n sleep(0.01)\n return False\n\n def deltas(self) -> list[float]:\n with self._lock:\n return [self.calls[index + 1] - self.calls[index] for index in range(len(self.calls) - 1)]", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:IntervalRoutine", + "span_start": 18, + "span_end": 37, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class BlockingRoutine:\n def __init__(self, started: Event, release: Event) -> None:\n self._started = started\n self._release = release\n\n def run(self) -> None:\n self._started.set()\n self._release.wait(timeout=5.0)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:BlockingRoutine", + "span_start": 40, + "span_end": 47, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def test_worker_wakes_up_with_configured_interval() -> None:\n interval = 0.15\n routine = IntervalRoutine()\n worker = ScenarioWorker(\"interval-worker\", routine, interval=interval)\n runtime = RuntimeManager()\n runtime.register_module(WorkerModule(worker))\n\n runtime.start()\n try:\n assert routine.wait_runs(count=3, timeout=2.0) is True\n finally:\n runtime.stop()\n\n deltas = routine.deltas()\n assert len(deltas) >= 2\n assert all(delta >= interval * 0.7 for delta in deltas[:2])", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:test_worker_wakes_up_with_configured_interval", + "span_start": 163, + "span_end": 178, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 7, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _http_call_json(\n base_url: str,\n path: str,\n *,\n method: str = \"GET\",\n headers: dict[str, str] | None = None,\n) -> tuple[int, dict[str, object]]:\n request = Request(f\"{base_url}{path}\", method=method, headers=headers or {})\n try:\n with urlopen(request, timeout=15.0) as response:\n status = response.status\n body = response.read()\n except HTTPError as error:\n status = error.code\n body = error.read()\n payload = json.loads(body.decode(\"utf-8\"))\n return status, payload", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_http_call_json", + "span_start": 125, + "span_end": 141, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 4, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _build_runtime(worker: Worker, *, control_timeout: int = 1) -> tuple[RuntimeManager, str]:\n runtime = RuntimeManager()\n channel = HttpControlChannel(host=\"127.0.0.1\", port=0, timeout=control_timeout)\n runtime.control_plane.register_channel(channel)\n runtime.register_module(WorkerModule(worker))\n runtime.start()\n return runtime, f\"http://127.0.0.1:{channel.port}\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_build_runtime", + "span_start": 154, + "span_end": 160, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 6, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class WorkerModule(ApplicationModule):\n def __init__(self, worker: Worker) -> None:\n self._worker = worker\n\n @property\n def name(self) -> str:\n return \"business-tests\"\n\n def register(self, registry: ModuleRegistry) -> None:\n registry.add_worker(self._worker)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:WorkerModule", + "span_start": 113, + "span_end": 122, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 3, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C0_SOURCE_CHUNKS": 10 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src", + "tests" + ], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src", + "tests" + ], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "TraceService", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Где тесты для TraceService? test_trace_service TestTraceService TraceService", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Где тесты для TraceService? test_trace_service TestTraceService TraceService", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 10, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 0, + "candidates_after_filter": 0 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src", + "tests" + ], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src", + "tests" + ], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 10, + "candidates_after_filter": 10 + } + ], + "fallback": { + "used": true, + "reason": "scope_relaxed_no_hits" + }, + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "TraceService" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "miss", + "hit_count": 0, + "fail_reason": "scope_relaxed_no_hits" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 10, + "fail_reason": null + } + ] + }, + "constraint_violations": [ + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C1_SYMBOL_CATALOG", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + } + ], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 128, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 58, + "C2_DEPENDENCY_GRAPH": 53, + "C0_SOURCE_CHUNKS": 16 + }, + "merge_rank": 0 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Где тесты для TraceService?", + "rag_count": 16 + }, + "output": { + "llm_answer": "1. Прямые тесты:\n - tests/test_runtime.py | test_trace_service_writes_contexts_and_messages\n - Проверка записи контекстов и сообщений в TraceService.\n - tests/test_runtime.py | test_trace_service_supports_debug_warning_and_error_levels\n - Проверка поддержки различных уровней логирования (DEBUG, WARNING, ERROR).\n\n2. Косвенные или ближайшие тесты:\n - Нет известных косвенных тестов, которые напрямую касаются TraceService.\n\n3. Что именно проверяется:\n - Запись и обработка контекста и сообщений в TraceService.\n - Поддержка различных уровней логирования и запись соответствующих сообщений.\n\n4. Пробелы покрытия:\n - Прямого тестирования работы самого класса TraceService без привязки к транспорту нет.\n - Тестирование сценариев ошибок и исключений при работе с TraceService отсутствует.\n - Отсутствие проверки взаимодействий с внешними сервисами через транспорт." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 978, + "evidence_rows": 16, + "evidence_chars": 7847 + }, + "evidence_summary": [ + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 10, + "unique_paths": 2 + } + ], + "prompt_template_id": "intent_code_qa_find_tests_ru_v2", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 1543 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-find-tests-trace-service.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-find-tests-trace-service.md new file mode 100644 index 0000000..0fea124 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-find-tests-trace-service.md @@ -0,0 +1,32 @@ +# plba-v2-find-tests-trace-service + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Где тесты для TraceService? + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 16, + "llm_answer": "1. Прямые тесты:\n - tests/test_runtime.py | test_trace_service_writes_contexts_and_messages\n - Проверка записи контекстов и сообщений в TraceService.\n - tests/test_runtime.py | test_trace_service_supports_debug_warning_and_error_levels\n - Проверка поддержки различных уровней логирования (DEBUG, WARNING, ERROR).\n\n2. Косвенные или ближайшие тесты:\n - Нет известных косвенных тестов, которые напрямую касаются TraceService.\n\n3. Что именно проверяется:\n - Запись и обработка контекста и сообщений в TraceService.\n - Поддержка различных уровней логирования и запись соответствующих сообщений.\n\n4. Пробелы покрытия:\n - Прямого тестирования работы самого класса TraceService без привязки к транспорту нет.\n - Тестирование сценариев ошибок и исключений при работе с TraceService отсутствует.\n - Отсутствие проверки взаимодействий с внешними сервисами через транспорт.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "TraceService" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-find-tests-workflow-runtime-factory-negative.json b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-find-tests-workflow-runtime-factory-negative.json new file mode 100644 index 0000000..9ff0f50 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-find-tests-workflow-runtime-factory-negative.json @@ -0,0 +1,2047 @@ +{ + "case_id": "plba-v2-find-tests-workflow-runtime-factory-negative", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 16, + "llm_answer": "Прямых тестов для WorkflowRuntimeFactory в предоставленном контексте не обнаружено.\n\nКосвенные или ближайшие тесты:\n1. tests/test_business_control_actions.py | test_actions_stop_busy_worker_before_timeout:dataflow_slice\n - Проверяет поведение после остановки занятого рабочего перед таймаутом.\n2. tests/test_business_control_actions.py | test_actions_stop_busy_worker_after_timeout:dataflow_slice\n - Проверяет поведение после остановки занятого рабочего после таймаута.\n\nЧто именно проверяется:\n- Поведение рабочих процессов при остановке и проверке их состояния здоровья (\"health\").\n- Запуск и остановка рабочих процессов.\n\nКакие пробелы покрытия видны:\n- Нет подтвержденных тестов конкретно для WorkflowRuntimeFactory. Тесты находятся ближе к поведению рабочих процессов и блокирующих рутин, а не напрямую связаны с созданием или использованием WorkflowRuntimeFactory.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "WorkflowRuntimeFactory" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-v2-find-tests-workflow-runtime-factory-negative", + "text": "Где тесты для WorkflowRuntimeFactory?", + "mode": "full_chain", + "run_started_at": "2026-03-12T13:23:57", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Где тесты для WorkflowRuntimeFactory?", + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "WorkflowRuntimeFactory" + ], + "confidence": 0.0 + }, + "rag_count": 16, + "rag_rows": [ + { + "path": "tests/test_business_control_actions.py", + "content": "test_actions_stop_busy_worker_before_timeout\n -> BlockingRoutine\n -> BlockingRoutine.__init__\n -> BlockingRoutine._release\n -> BlockingRoutine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_actions_stop_busy_worker_before_timeout:dataflow_slice", + "span_start": 43, + "span_end": 212, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "8bd726155ba387d3579763ee84dfd2f9a90bc917da88f3b2e89416ab5c1254d6", + "edge_type": "dataflow_slice", + "src_symbol_id": "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "src_qname": "test_actions_stop_busy_worker_before_timeout", + "dst_symbol_id": "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04", + "dst_ref": "BlockingRoutine.run", + "resolution": "resolved", + "slice_id": "8bd726155ba387d3579763ee84dfd2f9a90bc917da88f3b2e89416ab5c1254d6", + "root_symbol_id": "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "path_symbols": [ + "test_actions_stop_busy_worker_before_timeout", + "BlockingRoutine", + "BlockingRoutine.__init__", + "BlockingRoutine._release", + "BlockingRoutine.run" + ], + "path_symbol_ids": [ + "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "a3349c5bc65e4003a4bbd6a8dbb7a54c337e12d1aed930caa701b12e520f1e67", + "486deeed3043c6db985aef258e96ddc67aa53608e67a83962fbd2471f649ddf1", + "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_worker_wakes_up_with_configured_interval\n -> ScenarioWorker\n -> ScenarioWorker.__init__\n -> ScenarioWorker._name\n -> ScenarioWorker.name", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_worker_wakes_up_with_configured_interval:dataflow_slice", + "span_start": 52, + "span_end": 166, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "2fd137f5852febe907f44d3b3e4ea430f89ccfe962ae1442a16ab9df64c8f76c", + "edge_type": "dataflow_slice", + "src_symbol_id": "65f877f78191d65e6a752e41cedc70ebc784c266804a55c1c56440336e1f0d6e", + "src_qname": "test_worker_wakes_up_with_configured_interval", + "dst_symbol_id": "da022da2c49fd9cfd09d6e6da6bbd59aaa7d28efd669ce8444e88d327ddec2fc", + "dst_ref": "ScenarioWorker.name", + "resolution": "resolved", + "slice_id": "2fd137f5852febe907f44d3b3e4ea430f89ccfe962ae1442a16ab9df64c8f76c", + "root_symbol_id": "65f877f78191d65e6a752e41cedc70ebc784c266804a55c1c56440336e1f0d6e", + "path_symbols": [ + "test_worker_wakes_up_with_configured_interval", + "ScenarioWorker", + "ScenarioWorker.__init__", + "ScenarioWorker._name", + "ScenarioWorker.name" + ], + "path_symbol_ids": [ + "65f877f78191d65e6a752e41cedc70ebc784c266804a55c1c56440336e1f0d6e", + "9a1d08a7eb1831c9f2e0db361b5207f036e477c160773ae08c0b287239785c52", + "9c20be046ba06644d1432e0f20eb223663d2b116ee7d91fdc62bc68323f2e593", + "da022da2c49fd9cfd09d6e6da6bbd59aaa7d28efd669ce8444e88d327ddec2fc" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_actions_stop_busy_worker_before_timeout\n -> BlockingRoutine\n -> BlockingRoutine.__init__\n -> BlockingRoutine._started\n -> BlockingRoutine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_actions_stop_busy_worker_before_timeout:dataflow_slice", + "span_start": 42, + "span_end": 212, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "f9bcce108870e49afa8b32d4625115a10707a3b0e7473179e958e5752bf258b4", + "edge_type": "dataflow_slice", + "src_symbol_id": "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "src_qname": "test_actions_stop_busy_worker_before_timeout", + "dst_symbol_id": "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04", + "dst_ref": "BlockingRoutine.run", + "resolution": "resolved", + "slice_id": "f9bcce108870e49afa8b32d4625115a10707a3b0e7473179e958e5752bf258b4", + "root_symbol_id": "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "path_symbols": [ + "test_actions_stop_busy_worker_before_timeout", + "BlockingRoutine", + "BlockingRoutine.__init__", + "BlockingRoutine._started", + "BlockingRoutine.run" + ], + "path_symbol_ids": [ + "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "a3349c5bc65e4003a4bbd6a8dbb7a54c337e12d1aed930caa701b12e520f1e67", + "486deeed3043c6db985aef258e96ddc67aa53608e67a83962fbd2471f649ddf1", + "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_actions_stop_busy_worker_after_timeout\n -> BlockingRoutine\n -> BlockingRoutine.__init__\n -> BlockingRoutine._started\n -> BlockingRoutine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_actions_stop_busy_worker_after_timeout:dataflow_slice", + "span_start": 42, + "span_end": 238, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "8e7db3d2a9226f1c1d9942ac6373cfcafa0d2276758ddb8a3d3c455a3d58024d", + "edge_type": "dataflow_slice", + "src_symbol_id": "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "src_qname": "test_actions_stop_busy_worker_after_timeout", + "dst_symbol_id": "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04", + "dst_ref": "BlockingRoutine.run", + "resolution": "resolved", + "slice_id": "8e7db3d2a9226f1c1d9942ac6373cfcafa0d2276758ddb8a3d3c455a3d58024d", + "root_symbol_id": "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "path_symbols": [ + "test_actions_stop_busy_worker_after_timeout", + "BlockingRoutine", + "BlockingRoutine.__init__", + "BlockingRoutine._started", + "BlockingRoutine.run" + ], + "path_symbol_ids": [ + "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "a3349c5bc65e4003a4bbd6a8dbb7a54c337e12d1aed930caa701b12e520f1e67", + "486deeed3043c6db985aef258e96ddc67aa53608e67a83962fbd2471f649ddf1", + "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_actions_stop_busy_worker_after_timeout\n -> BlockingRoutine\n -> BlockingRoutine.__init__\n -> BlockingRoutine._release\n -> BlockingRoutine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_actions_stop_busy_worker_after_timeout:dataflow_slice", + "span_start": 43, + "span_end": 238, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "b59da9da82f9dfc8a9b695a08213786385da1ae9e17561ec3a0450a574a8cb39", + "edge_type": "dataflow_slice", + "src_symbol_id": "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "src_qname": "test_actions_stop_busy_worker_after_timeout", + "dst_symbol_id": "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04", + "dst_ref": "BlockingRoutine.run", + "resolution": "resolved", + "slice_id": "b59da9da82f9dfc8a9b695a08213786385da1ae9e17561ec3a0450a574a8cb39", + "root_symbol_id": "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "path_symbols": [ + "test_actions_stop_busy_worker_after_timeout", + "BlockingRoutine", + "BlockingRoutine.__init__", + "BlockingRoutine._release", + "BlockingRoutine.run" + ], + "path_symbol_ids": [ + "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "a3349c5bc65e4003a4bbd6a8dbb7a54c337e12d1aed930caa701b12e520f1e67", + "486deeed3043c6db985aef258e96ddc67aa53608e67a83962fbd2471f649ddf1", + "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_actions_start_stop_and_health_when_worker_is_idle\n -> ScenarioWorker\n -> ScenarioWorker.__init__\n -> ScenarioWorker._name\n -> ScenarioWorker.name", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_actions_start_stop_and_health_when_worker_is_idle:dataflow_slice", + "span_start": 52, + "span_end": 182, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "8fb3c9e775ad1cfa91eebb8b8cef367dc53c923584236122235446e0579b468e", + "edge_type": "dataflow_slice", + "src_symbol_id": "09a78d8eb31c2da14fee58da53b5da7a5065a4c23b6300748a6d44517a5284b8", + "src_qname": "test_actions_start_stop_and_health_when_worker_is_idle", + "dst_symbol_id": "da022da2c49fd9cfd09d6e6da6bbd59aaa7d28efd669ce8444e88d327ddec2fc", + "dst_ref": "ScenarioWorker.name", + "resolution": "resolved", + "slice_id": "8fb3c9e775ad1cfa91eebb8b8cef367dc53c923584236122235446e0579b468e", + "root_symbol_id": "09a78d8eb31c2da14fee58da53b5da7a5065a4c23b6300748a6d44517a5284b8", + "path_symbols": [ + "test_actions_start_stop_and_health_when_worker_is_idle", + "ScenarioWorker", + "ScenarioWorker.__init__", + "ScenarioWorker._name", + "ScenarioWorker.name" + ], + "path_symbol_ids": [ + "09a78d8eb31c2da14fee58da53b5da7a5065a4c23b6300748a6d44517a5284b8", + "9a1d08a7eb1831c9f2e0db361b5207f036e477c160773ae08c0b287239785c52", + "9c20be046ba06644d1432e0f20eb223663d2b116ee7d91fdc62bc68323f2e593", + "da022da2c49fd9cfd09d6e6da6bbd59aaa7d28efd669ce8444e88d327ddec2fc" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def test_actions_start_stop_and_health_when_worker_is_idle() -> None:\n runtime, base_url = _build_runtime(ScenarioWorker(\"idle-worker\", IntervalRoutine(), interval=0.2))\n try:\n stop_status, stop_payload = _http_call_json(base_url, \"/actions/stop\", method=\"POST\")\n assert stop_status == 200\n assert isinstance(stop_payload.get(\"detail\"), dict)\n assert stop_payload[\"detail\"][\"timed_out\"] is False\n assert stop_payload[\"detail\"][\"state\"] == \"stopped\"\n\n health_stopped_status, health_stopped_payload = _http_call_json(base_url, \"/health\")\n assert health_stopped_status == 503\n assert health_stopped_payload[\"state\"] == \"stopped\"\n assert health_stopped_payload[\"status\"] == \"unhealthy\"\n\n start_status, start_payload = _http_call_json(base_url, \"/actions/start\", method=\"POST\")\n assert start_status == 200\n assert isinstance(start_payload.get(\"detail\"), dict)\n assert start_payload[\"detail\"][\"timed_out\"] is False\n assert start_payload[\"detail\"][\"state\"] in {\"idle\", \"busy\"}\n\n health_started_status, health_started_payload = _http_call_json(base_url, \"/health\")\n assert health_started_status == 200\n assert health_started_payload[\"status\"] == \"ok\"\n assert health_started_payload[\"state\"] in {\"idle\", \"busy\"}\n finally:\n runtime.stop()", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:test_actions_start_stop_and_health_when_worker_is_idle", + "span_start": 181, + "span_end": 206, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 8, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _poll_until_stopped(base_url: str, timeout: float = 2.0) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n _, payload = _http_call_json(base_url, \"/actions/status\")\n if payload.get(\"detail\") == \"stopped\":\n return True\n sleep(0.05)\n return False", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_poll_until_stopped", + "span_start": 144, + "span_end": 151, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 5, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def test_worker_wakes_up_with_configured_interval() -> None:\n interval = 0.15\n routine = IntervalRoutine()\n worker = ScenarioWorker(\"interval-worker\", routine, interval=interval)\n runtime = RuntimeManager()\n runtime.register_module(WorkerModule(worker))\n\n runtime.start()\n try:\n assert routine.wait_runs(count=3, timeout=2.0) is True\n finally:\n runtime.stop()\n\n deltas = routine.deltas()\n assert len(deltas) >= 2\n assert all(delta >= interval * 0.7 for delta in deltas[:2])", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:test_worker_wakes_up_with_configured_interval", + "span_start": 163, + "span_end": 178, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 7, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class BlockingRoutine:\n def __init__(self, started: Event, release: Event) -> None:\n self._started = started\n self._release = release\n\n def run(self) -> None:\n self._started.set()\n self._release.wait(timeout=5.0)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:BlockingRoutine", + "span_start": 40, + "span_end": 47, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class WorkerModule(ApplicationModule):\n def __init__(self, worker: Worker) -> None:\n self._worker = worker\n\n @property\n def name(self) -> str:\n return \"business-tests\"\n\n def register(self, registry: ModuleRegistry) -> None:\n registry.add_worker(self._worker)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:WorkerModule", + "span_start": 113, + "span_end": 122, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 3, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _http_call_json(\n base_url: str,\n path: str,\n *,\n method: str = \"GET\",\n headers: dict[str, str] | None = None,\n) -> tuple[int, dict[str, object]]:\n request = Request(f\"{base_url}{path}\", method=method, headers=headers or {})\n try:\n with urlopen(request, timeout=15.0) as response:\n status = response.status\n body = response.read()\n except HTTPError as error:\n status = error.code\n body = error.read()\n payload = json.loads(body.decode(\"utf-8\"))\n return status, payload", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_http_call_json", + "span_start": 125, + "span_end": 141, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 4, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _build_runtime(worker: Worker, *, control_timeout: int = 1) -> tuple[RuntimeManager, str]:\n runtime = RuntimeManager()\n channel = HttpControlChannel(host=\"127.0.0.1\", port=0, timeout=control_timeout)\n runtime.control_plane.register_channel(channel)\n runtime.register_module(WorkerModule(worker))\n runtime.start()\n return runtime, f\"http://127.0.0.1:{channel.port}\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_build_runtime", + "span_start": 154, + "span_end": 160, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 6, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class ScenarioWorker(Worker):\n def __init__(self, name: str, routine: object, *, interval: float = 0.05) -> None:\n self._name = name\n self._routine = routine\n self._interval = interval\n self._thread: Thread | None = None\n self._stop_requested = Event()\n self._in_flight = 0\n self._runs = 0\n self._lock = Lock()\n\n @property\n def name(self) -> str:\n return self._name\n\n @property\n def critical(self) -> bool:\n return True\n\n def start(self) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._stop_requested.clear()\n self._thread = Thread(target=self._loop, name=f\"{self._name}-thread\", daemon=True)\n self._thread.start()\n\n def stop(self, force: bool = False) -> None:\n self._stop_requested.set()\n\n def health(self) -> WorkerHealth:\n return WorkerHealth(name=self.name, status=\"ok\", critical=True, meta={\"runs\": self._runs})\n\n def status(self) -> WorkerStatus:\n thread_alive = self._thread is not None and self._thread.is_alive()\n with self._lock:\n in_flight = self._in_flight\n runs = self._runs\n if not thread_alive:\n state = \"stopped\"\n elif self._stop_requested.is_set():\n state = \"stopping\"\n elif in_flight > 0:\n state = \"busy\"\n else:\n state = \"idle\"\n return WorkerStatus(name=self.name, state=state, in_flight=in_flight, meta={\"runs\": runs})\n\n def _loop(self) -> None:\n while not self._stop_requested.is_set():\n with self._lock:\n self._in_flight += 1\n try:\n self._routine.run()\n with self._lock:\n self._runs += 1\n finally:\n with self._lock:\n self._in_flight -= 1\n if self._stop_requested.is_set():\n return\n sleep(self._interval)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:ScenarioWorker", + "span_start": 50, + "span_end": 110, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 2, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class IntervalRoutine:\n calls: list[float] = field(default_factory=list)\n _lock: Lock = field(default_factory=Lock)\n\n def run(self) -> None:\n with self._lock:\n self.calls.append(monotonic())\n\n def wait_runs(self, count: int, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n with self._lock:\n if len(self.calls) >= count:\n return True\n sleep(0.01)\n return False\n\n def deltas(self) -> list[float]:\n with self._lock:\n return [self.calls[index + 1] - self.calls[index] for index in range(len(self.calls) - 1)]", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:IntervalRoutine", + "span_start": 18, + "span_end": 37, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def test_actions_stop_busy_worker_before_timeout() -> None:\n started = Event()\n release = Event()\n runtime, base_url = _build_runtime(ScenarioWorker(\"busy-worker\", BlockingRoutine(started, release)))\n assert started.wait(timeout=1.0) is True\n\n def release_later() -> None:\n sleep(0.2)\n release.set()\n\n Thread(target=release_later, daemon=True).start()\n try:\n status, payload = _http_call_json(base_url, \"/actions/stop\", method=\"POST\")\n assert status == 200\n assert isinstance(payload.get(\"detail\"), dict)\n assert payload[\"detail\"][\"timed_out\"] is False\n assert payload[\"detail\"][\"state\"] == \"stopped\"\n\n health_status, health_payload = _http_call_json(base_url, \"/health\")\n assert health_status == 503\n assert health_payload[\"status\"] == \"unhealthy\"\n assert health_payload[\"state\"] == \"stopped\"\n finally:\n runtime.stop()", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:test_actions_stop_busy_worker_before_timeout", + "span_start": 209, + "span_end": 232, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 9, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "Прямых тестов для WorkflowRuntimeFactory в предоставленном контексте не обнаружено.\n\nКосвенные или ближайшие тесты:\n1. tests/test_business_control_actions.py | test_actions_stop_busy_worker_before_timeout:dataflow_slice\n - Проверяет поведение после остановки занятого рабочего перед таймаутом.\n2. tests/test_business_control_actions.py | test_actions_stop_busy_worker_after_timeout:dataflow_slice\n - Проверяет поведение после остановки занятого рабочего после таймаута.\n\nЧто именно проверяется:\n- Поведение рабочих процессов при остановке и проверке их состояния здоровья (\"health\").\n- Запуск и остановка рабочих процессов.\n\nКакие пробелы покрытия видны:\n- Нет подтвержденных тестов конкретно для WorkflowRuntimeFactory. Тесты находятся ближе к поведению рабочих процессов и блокирующих рутин, а не напрямую связаны с созданием или использованием WorkflowRuntimeFactory.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C2_DEPENDENCY_GRAPH" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "WorkflowRuntimeFactory" + ], + "keyword_hints": [ + "WorkflowRuntimeFactory" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "test_file_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "test_symbol_patterns": [ + "test_workflow_runtime_factory", + "TestWorkflowRuntimeFactory", + "WorkflowRuntimeFactory" + ], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C0_SOURCE_CHUNKS": 10 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src", + "tests" + ], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src", + "tests" + ], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "WorkflowRuntimeFactory", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Где тесты для WorkflowRuntimeFactory? test_workflow_runtime_factory TestWorkflowRuntimeFactory WorkflowRuntimeFactory", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Где тесты для WorkflowRuntimeFactory? test_workflow_runtime_factory TestWorkflowRuntimeFactory WorkflowRuntimeFactory", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 10, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 0, + "candidates_after_filter": 0 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src", + "tests" + ], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src", + "tests" + ], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 10, + "candidates_after_filter": 10 + } + ], + "fallback": { + "used": true, + "reason": "scope_relaxed_no_hits" + }, + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "WorkflowRuntimeFactory" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "miss", + "hit_count": 0, + "fail_reason": "scope_relaxed_no_hits" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 10, + "fail_reason": null + } + ] + }, + "constraint_violations": [ + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C1_SYMBOL_CATALOG", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + } + ], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 91, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 39, + "C2_DEPENDENCY_GRAPH": 38, + "C0_SOURCE_CHUNKS": 12 + }, + "merge_rank": 0, + "prompt_build": 0, + "llm_call": 1637 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 998, + "evidence_rows": 16, + "evidence_chars": 8149 + }, + "evidence_summary": [ + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 10, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_find_tests_ru_v2", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "WorkflowRuntimeFactory" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 16, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-v2-find-tests-workflow-runtime-factory-negative", + "mode": "full_chain", + "run_started_at": "2026-03-12T13:23:57", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Где тесты для WorkflowRuntimeFactory?", + "normalized_query": "Где тесты для WorkflowRuntimeFactory?" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Где тесты для WorkflowRuntimeFactory?" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Где тесты для WorkflowRuntimeFactory?" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "WorkflowRuntimeFactory" + ], + "keyword_hints": [ + "WorkflowRuntimeFactory" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "test_file_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "test_symbol_patterns": [ + "test_workflow_runtime_factory", + "TestWorkflowRuntimeFactory", + "WorkflowRuntimeFactory" + ], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Где тесты для WorkflowRuntimeFactory?" + }, + "output": { + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "WorkflowRuntimeFactory" + ], + "confidence": 0.0 + }, + "rag_count": 16, + "rag_rows": [ + { + "path": "tests/test_business_control_actions.py", + "content": "test_actions_stop_busy_worker_before_timeout\n -> BlockingRoutine\n -> BlockingRoutine.__init__\n -> BlockingRoutine._release\n -> BlockingRoutine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_actions_stop_busy_worker_before_timeout:dataflow_slice", + "span_start": 43, + "span_end": 212, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "8bd726155ba387d3579763ee84dfd2f9a90bc917da88f3b2e89416ab5c1254d6", + "edge_type": "dataflow_slice", + "src_symbol_id": "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "src_qname": "test_actions_stop_busy_worker_before_timeout", + "dst_symbol_id": "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04", + "dst_ref": "BlockingRoutine.run", + "resolution": "resolved", + "slice_id": "8bd726155ba387d3579763ee84dfd2f9a90bc917da88f3b2e89416ab5c1254d6", + "root_symbol_id": "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "path_symbols": [ + "test_actions_stop_busy_worker_before_timeout", + "BlockingRoutine", + "BlockingRoutine.__init__", + "BlockingRoutine._release", + "BlockingRoutine.run" + ], + "path_symbol_ids": [ + "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "a3349c5bc65e4003a4bbd6a8dbb7a54c337e12d1aed930caa701b12e520f1e67", + "486deeed3043c6db985aef258e96ddc67aa53608e67a83962fbd2471f649ddf1", + "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_worker_wakes_up_with_configured_interval\n -> ScenarioWorker\n -> ScenarioWorker.__init__\n -> ScenarioWorker._name\n -> ScenarioWorker.name", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_worker_wakes_up_with_configured_interval:dataflow_slice", + "span_start": 52, + "span_end": 166, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "2fd137f5852febe907f44d3b3e4ea430f89ccfe962ae1442a16ab9df64c8f76c", + "edge_type": "dataflow_slice", + "src_symbol_id": "65f877f78191d65e6a752e41cedc70ebc784c266804a55c1c56440336e1f0d6e", + "src_qname": "test_worker_wakes_up_with_configured_interval", + "dst_symbol_id": "da022da2c49fd9cfd09d6e6da6bbd59aaa7d28efd669ce8444e88d327ddec2fc", + "dst_ref": "ScenarioWorker.name", + "resolution": "resolved", + "slice_id": "2fd137f5852febe907f44d3b3e4ea430f89ccfe962ae1442a16ab9df64c8f76c", + "root_symbol_id": "65f877f78191d65e6a752e41cedc70ebc784c266804a55c1c56440336e1f0d6e", + "path_symbols": [ + "test_worker_wakes_up_with_configured_interval", + "ScenarioWorker", + "ScenarioWorker.__init__", + "ScenarioWorker._name", + "ScenarioWorker.name" + ], + "path_symbol_ids": [ + "65f877f78191d65e6a752e41cedc70ebc784c266804a55c1c56440336e1f0d6e", + "9a1d08a7eb1831c9f2e0db361b5207f036e477c160773ae08c0b287239785c52", + "9c20be046ba06644d1432e0f20eb223663d2b116ee7d91fdc62bc68323f2e593", + "da022da2c49fd9cfd09d6e6da6bbd59aaa7d28efd669ce8444e88d327ddec2fc" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_actions_stop_busy_worker_before_timeout\n -> BlockingRoutine\n -> BlockingRoutine.__init__\n -> BlockingRoutine._started\n -> BlockingRoutine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_actions_stop_busy_worker_before_timeout:dataflow_slice", + "span_start": 42, + "span_end": 212, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "f9bcce108870e49afa8b32d4625115a10707a3b0e7473179e958e5752bf258b4", + "edge_type": "dataflow_slice", + "src_symbol_id": "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "src_qname": "test_actions_stop_busy_worker_before_timeout", + "dst_symbol_id": "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04", + "dst_ref": "BlockingRoutine.run", + "resolution": "resolved", + "slice_id": "f9bcce108870e49afa8b32d4625115a10707a3b0e7473179e958e5752bf258b4", + "root_symbol_id": "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "path_symbols": [ + "test_actions_stop_busy_worker_before_timeout", + "BlockingRoutine", + "BlockingRoutine.__init__", + "BlockingRoutine._started", + "BlockingRoutine.run" + ], + "path_symbol_ids": [ + "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "a3349c5bc65e4003a4bbd6a8dbb7a54c337e12d1aed930caa701b12e520f1e67", + "486deeed3043c6db985aef258e96ddc67aa53608e67a83962fbd2471f649ddf1", + "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_actions_stop_busy_worker_after_timeout\n -> BlockingRoutine\n -> BlockingRoutine.__init__\n -> BlockingRoutine._started\n -> BlockingRoutine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_actions_stop_busy_worker_after_timeout:dataflow_slice", + "span_start": 42, + "span_end": 238, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "8e7db3d2a9226f1c1d9942ac6373cfcafa0d2276758ddb8a3d3c455a3d58024d", + "edge_type": "dataflow_slice", + "src_symbol_id": "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "src_qname": "test_actions_stop_busy_worker_after_timeout", + "dst_symbol_id": "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04", + "dst_ref": "BlockingRoutine.run", + "resolution": "resolved", + "slice_id": "8e7db3d2a9226f1c1d9942ac6373cfcafa0d2276758ddb8a3d3c455a3d58024d", + "root_symbol_id": "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "path_symbols": [ + "test_actions_stop_busy_worker_after_timeout", + "BlockingRoutine", + "BlockingRoutine.__init__", + "BlockingRoutine._started", + "BlockingRoutine.run" + ], + "path_symbol_ids": [ + "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "a3349c5bc65e4003a4bbd6a8dbb7a54c337e12d1aed930caa701b12e520f1e67", + "486deeed3043c6db985aef258e96ddc67aa53608e67a83962fbd2471f649ddf1", + "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_actions_stop_busy_worker_after_timeout\n -> BlockingRoutine\n -> BlockingRoutine.__init__\n -> BlockingRoutine._release\n -> BlockingRoutine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_actions_stop_busy_worker_after_timeout:dataflow_slice", + "span_start": 43, + "span_end": 238, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "b59da9da82f9dfc8a9b695a08213786385da1ae9e17561ec3a0450a574a8cb39", + "edge_type": "dataflow_slice", + "src_symbol_id": "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "src_qname": "test_actions_stop_busy_worker_after_timeout", + "dst_symbol_id": "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04", + "dst_ref": "BlockingRoutine.run", + "resolution": "resolved", + "slice_id": "b59da9da82f9dfc8a9b695a08213786385da1ae9e17561ec3a0450a574a8cb39", + "root_symbol_id": "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "path_symbols": [ + "test_actions_stop_busy_worker_after_timeout", + "BlockingRoutine", + "BlockingRoutine.__init__", + "BlockingRoutine._release", + "BlockingRoutine.run" + ], + "path_symbol_ids": [ + "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "a3349c5bc65e4003a4bbd6a8dbb7a54c337e12d1aed930caa701b12e520f1e67", + "486deeed3043c6db985aef258e96ddc67aa53608e67a83962fbd2471f649ddf1", + "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_actions_start_stop_and_health_when_worker_is_idle\n -> ScenarioWorker\n -> ScenarioWorker.__init__\n -> ScenarioWorker._name\n -> ScenarioWorker.name", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_actions_start_stop_and_health_when_worker_is_idle:dataflow_slice", + "span_start": 52, + "span_end": 182, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "8fb3c9e775ad1cfa91eebb8b8cef367dc53c923584236122235446e0579b468e", + "edge_type": "dataflow_slice", + "src_symbol_id": "09a78d8eb31c2da14fee58da53b5da7a5065a4c23b6300748a6d44517a5284b8", + "src_qname": "test_actions_start_stop_and_health_when_worker_is_idle", + "dst_symbol_id": "da022da2c49fd9cfd09d6e6da6bbd59aaa7d28efd669ce8444e88d327ddec2fc", + "dst_ref": "ScenarioWorker.name", + "resolution": "resolved", + "slice_id": "8fb3c9e775ad1cfa91eebb8b8cef367dc53c923584236122235446e0579b468e", + "root_symbol_id": "09a78d8eb31c2da14fee58da53b5da7a5065a4c23b6300748a6d44517a5284b8", + "path_symbols": [ + "test_actions_start_stop_and_health_when_worker_is_idle", + "ScenarioWorker", + "ScenarioWorker.__init__", + "ScenarioWorker._name", + "ScenarioWorker.name" + ], + "path_symbol_ids": [ + "09a78d8eb31c2da14fee58da53b5da7a5065a4c23b6300748a6d44517a5284b8", + "9a1d08a7eb1831c9f2e0db361b5207f036e477c160773ae08c0b287239785c52", + "9c20be046ba06644d1432e0f20eb223663d2b116ee7d91fdc62bc68323f2e593", + "da022da2c49fd9cfd09d6e6da6bbd59aaa7d28efd669ce8444e88d327ddec2fc" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def test_actions_start_stop_and_health_when_worker_is_idle() -> None:\n runtime, base_url = _build_runtime(ScenarioWorker(\"idle-worker\", IntervalRoutine(), interval=0.2))\n try:\n stop_status, stop_payload = _http_call_json(base_url, \"/actions/stop\", method=\"POST\")\n assert stop_status == 200\n assert isinstance(stop_payload.get(\"detail\"), dict)\n assert stop_payload[\"detail\"][\"timed_out\"] is False\n assert stop_payload[\"detail\"][\"state\"] == \"stopped\"\n\n health_stopped_status, health_stopped_payload = _http_call_json(base_url, \"/health\")\n assert health_stopped_status == 503\n assert health_stopped_payload[\"state\"] == \"stopped\"\n assert health_stopped_payload[\"status\"] == \"unhealthy\"\n\n start_status, start_payload = _http_call_json(base_url, \"/actions/start\", method=\"POST\")\n assert start_status == 200\n assert isinstance(start_payload.get(\"detail\"), dict)\n assert start_payload[\"detail\"][\"timed_out\"] is False\n assert start_payload[\"detail\"][\"state\"] in {\"idle\", \"busy\"}\n\n health_started_status, health_started_payload = _http_call_json(base_url, \"/health\")\n assert health_started_status == 200\n assert health_started_payload[\"status\"] == \"ok\"\n assert health_started_payload[\"state\"] in {\"idle\", \"busy\"}\n finally:\n runtime.stop()", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:test_actions_start_stop_and_health_when_worker_is_idle", + "span_start": 181, + "span_end": 206, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 8, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _poll_until_stopped(base_url: str, timeout: float = 2.0) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n _, payload = _http_call_json(base_url, \"/actions/status\")\n if payload.get(\"detail\") == \"stopped\":\n return True\n sleep(0.05)\n return False", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_poll_until_stopped", + "span_start": 144, + "span_end": 151, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 5, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def test_worker_wakes_up_with_configured_interval() -> None:\n interval = 0.15\n routine = IntervalRoutine()\n worker = ScenarioWorker(\"interval-worker\", routine, interval=interval)\n runtime = RuntimeManager()\n runtime.register_module(WorkerModule(worker))\n\n runtime.start()\n try:\n assert routine.wait_runs(count=3, timeout=2.0) is True\n finally:\n runtime.stop()\n\n deltas = routine.deltas()\n assert len(deltas) >= 2\n assert all(delta >= interval * 0.7 for delta in deltas[:2])", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:test_worker_wakes_up_with_configured_interval", + "span_start": 163, + "span_end": 178, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 7, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class BlockingRoutine:\n def __init__(self, started: Event, release: Event) -> None:\n self._started = started\n self._release = release\n\n def run(self) -> None:\n self._started.set()\n self._release.wait(timeout=5.0)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:BlockingRoutine", + "span_start": 40, + "span_end": 47, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class WorkerModule(ApplicationModule):\n def __init__(self, worker: Worker) -> None:\n self._worker = worker\n\n @property\n def name(self) -> str:\n return \"business-tests\"\n\n def register(self, registry: ModuleRegistry) -> None:\n registry.add_worker(self._worker)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:WorkerModule", + "span_start": 113, + "span_end": 122, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 3, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _http_call_json(\n base_url: str,\n path: str,\n *,\n method: str = \"GET\",\n headers: dict[str, str] | None = None,\n) -> tuple[int, dict[str, object]]:\n request = Request(f\"{base_url}{path}\", method=method, headers=headers or {})\n try:\n with urlopen(request, timeout=15.0) as response:\n status = response.status\n body = response.read()\n except HTTPError as error:\n status = error.code\n body = error.read()\n payload = json.loads(body.decode(\"utf-8\"))\n return status, payload", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_http_call_json", + "span_start": 125, + "span_end": 141, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 4, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _build_runtime(worker: Worker, *, control_timeout: int = 1) -> tuple[RuntimeManager, str]:\n runtime = RuntimeManager()\n channel = HttpControlChannel(host=\"127.0.0.1\", port=0, timeout=control_timeout)\n runtime.control_plane.register_channel(channel)\n runtime.register_module(WorkerModule(worker))\n runtime.start()\n return runtime, f\"http://127.0.0.1:{channel.port}\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_build_runtime", + "span_start": 154, + "span_end": 160, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 6, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class ScenarioWorker(Worker):\n def __init__(self, name: str, routine: object, *, interval: float = 0.05) -> None:\n self._name = name\n self._routine = routine\n self._interval = interval\n self._thread: Thread | None = None\n self._stop_requested = Event()\n self._in_flight = 0\n self._runs = 0\n self._lock = Lock()\n\n @property\n def name(self) -> str:\n return self._name\n\n @property\n def critical(self) -> bool:\n return True\n\n def start(self) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._stop_requested.clear()\n self._thread = Thread(target=self._loop, name=f\"{self._name}-thread\", daemon=True)\n self._thread.start()\n\n def stop(self, force: bool = False) -> None:\n self._stop_requested.set()\n\n def health(self) -> WorkerHealth:\n return WorkerHealth(name=self.name, status=\"ok\", critical=True, meta={\"runs\": self._runs})\n\n def status(self) -> WorkerStatus:\n thread_alive = self._thread is not None and self._thread.is_alive()\n with self._lock:\n in_flight = self._in_flight\n runs = self._runs\n if not thread_alive:\n state = \"stopped\"\n elif self._stop_requested.is_set():\n state = \"stopping\"\n elif in_flight > 0:\n state = \"busy\"\n else:\n state = \"idle\"\n return WorkerStatus(name=self.name, state=state, in_flight=in_flight, meta={\"runs\": runs})\n\n def _loop(self) -> None:\n while not self._stop_requested.is_set():\n with self._lock:\n self._in_flight += 1\n try:\n self._routine.run()\n with self._lock:\n self._runs += 1\n finally:\n with self._lock:\n self._in_flight -= 1\n if self._stop_requested.is_set():\n return\n sleep(self._interval)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:ScenarioWorker", + "span_start": 50, + "span_end": 110, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 2, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class IntervalRoutine:\n calls: list[float] = field(default_factory=list)\n _lock: Lock = field(default_factory=Lock)\n\n def run(self) -> None:\n with self._lock:\n self.calls.append(monotonic())\n\n def wait_runs(self, count: int, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n with self._lock:\n if len(self.calls) >= count:\n return True\n sleep(0.01)\n return False\n\n def deltas(self) -> list[float]:\n with self._lock:\n return [self.calls[index + 1] - self.calls[index] for index in range(len(self.calls) - 1)]", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:IntervalRoutine", + "span_start": 18, + "span_end": 37, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def test_actions_stop_busy_worker_before_timeout() -> None:\n started = Event()\n release = Event()\n runtime, base_url = _build_runtime(ScenarioWorker(\"busy-worker\", BlockingRoutine(started, release)))\n assert started.wait(timeout=1.0) is True\n\n def release_later() -> None:\n sleep(0.2)\n release.set()\n\n Thread(target=release_later, daemon=True).start()\n try:\n status, payload = _http_call_json(base_url, \"/actions/stop\", method=\"POST\")\n assert status == 200\n assert isinstance(payload.get(\"detail\"), dict)\n assert payload[\"detail\"][\"timed_out\"] is False\n assert payload[\"detail\"][\"state\"] == \"stopped\"\n\n health_status, health_payload = _http_call_json(base_url, \"/health\")\n assert health_status == 503\n assert health_payload[\"status\"] == \"unhealthy\"\n assert health_payload[\"state\"] == \"stopped\"\n finally:\n runtime.stop()", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:test_actions_stop_busy_worker_before_timeout", + "span_start": 209, + "span_end": 232, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 9, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C0_SOURCE_CHUNKS": 10 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src", + "tests" + ], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src", + "tests" + ], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "WorkflowRuntimeFactory", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Где тесты для WorkflowRuntimeFactory? test_workflow_runtime_factory TestWorkflowRuntimeFactory WorkflowRuntimeFactory", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Где тесты для WorkflowRuntimeFactory? test_workflow_runtime_factory TestWorkflowRuntimeFactory WorkflowRuntimeFactory", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 10, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 0, + "candidates_after_filter": 0 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src", + "tests" + ], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src", + "tests" + ], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 10, + "candidates_after_filter": 10 + } + ], + "fallback": { + "used": true, + "reason": "scope_relaxed_no_hits" + }, + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "WorkflowRuntimeFactory" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "miss", + "hit_count": 0, + "fail_reason": "scope_relaxed_no_hits" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 10, + "fail_reason": null + } + ] + }, + "constraint_violations": [ + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C1_SYMBOL_CATALOG", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + } + ], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 91, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 39, + "C2_DEPENDENCY_GRAPH": 38, + "C0_SOURCE_CHUNKS": 12 + }, + "merge_rank": 0 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Где тесты для WorkflowRuntimeFactory?", + "rag_count": 16 + }, + "output": { + "llm_answer": "Прямых тестов для WorkflowRuntimeFactory в предоставленном контексте не обнаружено.\n\nКосвенные или ближайшие тесты:\n1. tests/test_business_control_actions.py | test_actions_stop_busy_worker_before_timeout:dataflow_slice\n - Проверяет поведение после остановки занятого рабочего перед таймаутом.\n2. tests/test_business_control_actions.py | test_actions_stop_busy_worker_after_timeout:dataflow_slice\n - Проверяет поведение после остановки занятого рабочего после таймаута.\n\nЧто именно проверяется:\n- Поведение рабочих процессов при остановке и проверке их состояния здоровья (\"health\").\n- Запуск и остановка рабочих процессов.\n\nКакие пробелы покрытия видны:\n- Нет подтвержденных тестов конкретно для WorkflowRuntimeFactory. Тесты находятся ближе к поведению рабочих процессов и блокирующих рутин, а не напрямую связаны с созданием или использованием WorkflowRuntimeFactory." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 998, + "evidence_rows": 16, + "evidence_chars": 8149 + }, + "evidence_summary": [ + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 10, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_find_tests_ru_v2", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 1637 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-find-tests-workflow-runtime-factory-negative.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-find-tests-workflow-runtime-factory-negative.md new file mode 100644 index 0000000..3817650 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-find-tests-workflow-runtime-factory-negative.md @@ -0,0 +1,32 @@ +# plba-v2-find-tests-workflow-runtime-factory-negative + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Где тесты для WorkflowRuntimeFactory? + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 16, + "llm_answer": "Прямых тестов для WorkflowRuntimeFactory в предоставленном контексте не обнаружено.\n\nКосвенные или ближайшие тесты:\n1. tests/test_business_control_actions.py | test_actions_stop_busy_worker_before_timeout:dataflow_slice\n - Проверяет поведение после остановки занятого рабочего перед таймаутом.\n2. tests/test_business_control_actions.py | test_actions_stop_busy_worker_after_timeout:dataflow_slice\n - Проверяет поведение после остановки занятого рабочего после таймаута.\n\nЧто именно проверяется:\n- Поведение рабочих процессов при остановке и проверке их состояния здоровья (\"health\").\n- Запуск и остановка рабочих процессов.\n\nКакие пробелы покрытия видны:\n- Нет подтвержденных тестов конкретно для WorkflowRuntimeFactory. Тесты находятся ближе к поведению рабочих процессов и блокирующих рутин, а не напрямую связаны с созданием или использованием WorkflowRuntimeFactory.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "WorkflowRuntimeFactory" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-open-file-nonexistent.json b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-open-file-nonexistent.json new file mode 100644 index 0000000..c2c7301 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-open-file-nonexistent.json @@ -0,0 +1,454 @@ +{ + "case_id": "plba-v2-open-file-nonexistent", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 0, + "llm_answer": "1. src/app_runtime/core/missing_runtime.py\n2. Основан только на заголовке и первой строке файла:\n```\nfrom __future__ import annotations\n```\nДальнейший контент недоступен.\n3. Top-level сущности и секции недоступны для анализа.\n4. Из доступного контента видно, что файл импортирует аннотации из будущего (__future__), что может указывать на потенциальное использование современных языковых возможностей Python. Однако без дополнительного контекста невозможно определить, какие части файла могут быть важны для конкретного вопроса о интерпретации слоёв RAG.", + "answer_mode": "insufficient_evidence", + "path_scope": [ + "src/app_runtime/core/missing_runtime.py" + ], + "symbol_candidates": [], + "layers": [ + "C0_SOURCE_CHUNKS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-v2-open-file-nonexistent", + "text": "Открой файл src/app_runtime/core/missing_runtime.py", + "mode": "full_chain", + "run_started_at": "2026-03-12T13:23:57", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Открой файл src/app_runtime/core/missing_runtime.py", + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [], + "confidence": 0.0 + }, + "rag_count": 0, + "rag_rows": [], + "llm_answer": "1. src/app_runtime/core/missing_runtime.py\n2. Основан только на заголовке и первой строке файла:\n```\nfrom __future__ import annotations\n```\nДальнейший контент недоступен.\n3. Top-level сущности и секции недоступны для анализа.\n4. Из доступного контента видно, что файл импортирует аннотации из будущего (__future__), что может указывать на потенциальное использование современных языковых возможностей Python. Однако без дополнительного контекста невозможно определить, какие части файла могут быть важны для конкретного вопроса о интерпретации слоёв RAG.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [], + "evidence_sufficient": false + }, + "llm": { + "answer_status": "insufficient_evidence", + "groundedness": "weakly_grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "unknown", + "symbol_candidates": [], + "keyword_hints": [], + "path_hints": [ + "src/app_runtime/core/missing_runtime.py" + ], + "path_scope": [ + "src/app_runtime/core/missing_runtime.py" + ], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/app_runtime/core/missing_runtime.py" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": false, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C0_SOURCE_CHUNKS": 200 + }, + "filters_by_layer": { + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src/app_runtime/core/missing_runtime.py" + ], + "include_globs": [], + "exclude_globs": [], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": null, + "workspace_id": null, + "returned_repo_ids": [], + "returned_workspace_ids": [] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Открой файл src/app_runtime/core/missing_runtime.py", + "path_scope": [ + "src/app_runtime/core/missing_runtime.py" + ], + "include_globs": [], + "exclude_globs": [], + "prefer_globs": [], + "top_k": 200, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src/app_runtime/core/missing_runtime.py" + ], + "normalized_include_globs": [], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 0, + "candidates_after_filter": 0 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [] + }, + "layers": [ + { + "layer": "C0_SOURCE_CHUNKS", + "status": "miss", + "hit_count": 0, + "fail_reason": null + } + ] + }, + "constraint_violations": [ + { + "type": "PATH_SCOPE_NOT_SATISFIED", + "severity": "error", + "details": { + "path_scope": [ + "src/app_runtime/core/missing_runtime.py" + ], + "returned_paths": [] + }, + "suggested_fix": "Use exact path_scope retrieval and disable broad fallback for OPEN_FILE." + }, + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C0_SOURCE_CHUNKS", + "requested_layers": [ + "C0_SOURCE_CHUNKS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + } + ], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 14, + "retrieval_by_layer": { + "C0_SOURCE_CHUNKS": 14 + }, + "merge_rank": 0, + "prompt_build": 0, + "llm_call": 1086 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 278, + "evidence_rows": 0, + "evidence_chars": 0 + }, + "evidence_summary": [], + "prompt_template_id": "intent_code_qa_open_file_ru_v2", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [], + "path_scope": [ + "src/app_runtime/core/missing_runtime.py" + ] + }, + "llm": { + "used_evidence_count": 0, + "missing_evidence_reason": "empty_retrieval_context" + } + }, + "run_info": { + "case_id": "plba-v2-open-file-nonexistent", + "mode": "full_chain", + "run_started_at": "2026-03-12T13:23:57", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Открой файл src/app_runtime/core/missing_runtime.py", + "normalized_query": "Открой файл src/app_runtime/core/missing_runtime.py" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Открой файл src/app_runtime/core/missing_runtime.py" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Открой файл src/app_runtime/core/missing_runtime.py" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "unknown", + "symbol_candidates": [], + "keyword_hints": [], + "path_hints": [ + "src/app_runtime/core/missing_runtime.py" + ], + "path_scope": [ + "src/app_runtime/core/missing_runtime.py" + ], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/app_runtime/core/missing_runtime.py" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": false, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Открой файл src/app_runtime/core/missing_runtime.py" + }, + "output": { + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [], + "confidence": 0.0 + }, + "rag_count": 0, + "rag_rows": [] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C0_SOURCE_CHUNKS": 200 + }, + "filters_by_layer": { + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src/app_runtime/core/missing_runtime.py" + ], + "include_globs": [], + "exclude_globs": [], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": null, + "workspace_id": null, + "returned_repo_ids": [], + "returned_workspace_ids": [] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Открой файл src/app_runtime/core/missing_runtime.py", + "path_scope": [ + "src/app_runtime/core/missing_runtime.py" + ], + "include_globs": [], + "exclude_globs": [], + "prefer_globs": [], + "top_k": 200, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src/app_runtime/core/missing_runtime.py" + ], + "normalized_include_globs": [], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 0, + "candidates_after_filter": 0 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [] + }, + "layers": [ + { + "layer": "C0_SOURCE_CHUNKS", + "status": "miss", + "hit_count": 0, + "fail_reason": null + } + ] + }, + "constraint_violations": [ + { + "type": "PATH_SCOPE_NOT_SATISFIED", + "severity": "error", + "details": { + "path_scope": [ + "src/app_runtime/core/missing_runtime.py" + ], + "returned_paths": [] + }, + "suggested_fix": "Use exact path_scope retrieval and disable broad fallback for OPEN_FILE." + }, + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C0_SOURCE_CHUNKS", + "requested_layers": [ + "C0_SOURCE_CHUNKS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + } + ], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 14, + "retrieval_by_layer": { + "C0_SOURCE_CHUNKS": 14 + }, + "merge_rank": 0 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Открой файл src/app_runtime/core/missing_runtime.py", + "rag_count": 0 + }, + "output": { + "llm_answer": "1. src/app_runtime/core/missing_runtime.py\n2. Основан только на заголовке и первой строке файла:\n```\nfrom __future__ import annotations\n```\nДальнейший контент недоступен.\n3. Top-level сущности и секции недоступны для анализа.\n4. Из доступного контента видно, что файл импортирует аннотации из будущего (__future__), что может указывать на потенциальное использование современных языковых возможностей Python. Однако без дополнительного контекста невозможно определить, какие части файла могут быть важны для конкретного вопроса о интерпретации слоёв RAG." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 278, + "evidence_rows": 0, + "evidence_chars": 0 + }, + "evidence_summary": [], + "prompt_template_id": "intent_code_qa_open_file_ru_v2", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 1086 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-open-file-nonexistent.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-open-file-nonexistent.md new file mode 100644 index 0000000..fd7702e --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-open-file-nonexistent.md @@ -0,0 +1,30 @@ +# plba-v2-open-file-nonexistent + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Открой файл src/app_runtime/core/missing_runtime.py + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 0, + "llm_answer": "1. src/app_runtime/core/missing_runtime.py\n2. Основан только на заголовке и первой строке файла:\n```\nfrom __future__ import annotations\n```\nДальнейший контент недоступен.\n3. Top-level сущности и секции недоступны для анализа.\n4. Из доступного контента видно, что файл импортирует аннотации из будущего (__future__), что может указывать на потенциальное использование современных языковых возможностей Python. Однако без дополнительного контекста невозможно определить, какие части файла могут быть важны для конкретного вопроса о интерпретации слоёв RAG.", + "answer_mode": "insufficient_evidence", + "path_scope": [ + "src/app_runtime/core/missing_runtime.py" + ], + "symbol_candidates": [], + "layers": [ + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-open-file-public-api.json b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-open-file-public-api.json new file mode 100644 index 0000000..0bfc6e9 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-open-file-public-api.json @@ -0,0 +1,492 @@ +{ + "case_id": "plba-v2-open-file-public-api", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 1, + "llm_answer": "1. src/plba/__init__.py\n2. Фрагмент файла содержит импорт различных модулей и классов, а также объявление переменной __all__, которая задает список экспортируемых объектов.\n3. Top-level сущности и секции:\n - Импорты различных модулей и классов.\n - Переменная __all__.\n4. В данном файле важны следующие части:\n - Список импортируемых классов и функций (ApplicationModule, ConfigFileLoader, ConfigProvider, и др.).\n - Переменная __all__, определяющая экспортируемые объекты.", + "answer_mode": "answered", + "path_scope": [ + "src/plba/__init__.py" + ], + "symbol_candidates": [], + "layers": [ + "C0_SOURCE_CHUNKS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-v2-open-file-public-api", + "text": "Открой файл src/plba/__init__.py", + "mode": "full_chain", + "run_started_at": "2026-03-12T13:23:57", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Открой файл src/plba/__init__.py", + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [], + "confidence": 0.0 + }, + "rag_count": 1, + "rag_rows": [ + { + "path": "src/plba/__init__.py", + "content": "from plba.bootstrap import create_runtime\nfrom plba.config import ConfigFileLoader, FileConfigProvider\nfrom plba.control import ControlActionSet, ControlChannel, ControlPlaneService, HttpControlChannel\nfrom plba.contracts import (\n ApplicationModule,\n ConfigProvider,\n HealthContributor,\n TraceContext,\n TraceContextRecord,\n TraceLogMessage,\n TraceTransport,\n Worker,\n WorkerHealth,\n WorkerStatus,\n)\nfrom plba.core import ConfigurationManager, RuntimeManager, ServiceContainer\nfrom plba.health import HealthRegistry\nfrom plba.logging import LogManager\nfrom plba.queue import InMemoryTaskQueue\nfrom plba.tracing import MySqlTraceTransport, NoOpTraceTransport, TraceService\nfrom plba.workflow import (\n StepResult,\n WorkflowContext,\n WorkflowDefinition,\n WorkflowEngine,\n WorkflowEngineHooks,\n WorkflowNode,\n WorkflowRuntimeFactory,\n WorkflowStep,\n)\nfrom plba.workers import WorkerSupervisor\n\n__all__ = [\n \"ApplicationModule\",\n \"ConfigFileLoader\",\n \"ConfigProvider\",\n \"ConfigurationManager\",\n \"ControlActionSet\",\n \"ControlChannel\",\n \"ControlPlaneService\",\n \"create_runtime\",\n \"FileConfigProvider\",\n \"HealthContributor\",\n \"HealthRegistry\",\n \"HttpControlChannel\",\n \"InMemoryTaskQueue\",\n \"LogManager\",\n \"MySqlTraceTransport\",\n \"NoOpTraceTransport\",\n \"RuntimeManager\",\n \"ServiceContainer\",\n \"TraceContext\",\n \"TraceContextRecord\",\n \"TraceLogMessage\",\n \"TraceService\",\n \"TraceTransport\",\n \"StepResult\",\n \"Worker\",\n \"WorkerHealth\",\n \"WorkerStatus\",\n \"WorkflowContext\",\n \"WorkflowDefinition\",\n \"WorkflowEngine\",\n \"WorkflowEngineHooks\",\n \"WorkflowNode\",\n \"WorkflowRuntimeFactory\",\n \"WorkflowStep\",\n \"WorkerSupervisor\",\n]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/__init__.py:1-69", + "span_start": 1, + "span_end": 69, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "1. src/plba/__init__.py\n2. Фрагмент файла содержит импорт различных модулей и классов, а также объявление переменной __all__, которая задает список экспортируемых объектов.\n3. Top-level сущности и секции:\n - Импорты различных модулей и классов.\n - Переменная __all__.\n4. В данном файле важны следующие части:\n - Список импортируемых классов и функций (ApplicationModule, ConfigFileLoader, ConfigProvider, и др.).\n - Переменная __all__, определяющая экспортируемые объекты.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "unknown", + "symbol_candidates": [], + "keyword_hints": [], + "path_hints": [ + "src/plba/__init__.py" + ], + "path_scope": [ + "src/plba/__init__.py" + ], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/plba/__init__.py" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": false, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C0_SOURCE_CHUNKS": 200 + }, + "filters_by_layer": { + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src/plba/__init__.py" + ], + "include_globs": [], + "exclude_globs": [], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Открой файл src/plba/__init__.py", + "path_scope": [ + "src/plba/__init__.py" + ], + "include_globs": [], + "exclude_globs": [], + "prefer_globs": [], + "top_k": 200, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src/plba/__init__.py" + ], + "normalized_include_globs": [], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [] + }, + "layers": [ + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 17, + "retrieval_by_layer": { + "C0_SOURCE_CHUNKS": 17 + }, + "merge_rank": 0, + "prompt_build": 0, + "llm_call": 1161 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 589, + "evidence_rows": 1, + "evidence_chars": 1768 + }, + "evidence_summary": [ + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_open_file_ru_v2", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [], + "path_scope": [ + "src/plba/__init__.py" + ] + }, + "llm": { + "used_evidence_count": 1, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-v2-open-file-public-api", + "mode": "full_chain", + "run_started_at": "2026-03-12T13:23:57", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Открой файл src/plba/__init__.py", + "normalized_query": "Открой файл src/plba/__init__.py" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Открой файл src/plba/__init__.py" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Открой файл src/plba/__init__.py" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "unknown", + "symbol_candidates": [], + "keyword_hints": [], + "path_hints": [ + "src/plba/__init__.py" + ], + "path_scope": [ + "src/plba/__init__.py" + ], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/plba/__init__.py" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": false, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Открой файл src/plba/__init__.py" + }, + "output": { + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [], + "confidence": 0.0 + }, + "rag_count": 1, + "rag_rows": [ + { + "path": "src/plba/__init__.py", + "content": "from plba.bootstrap import create_runtime\nfrom plba.config import ConfigFileLoader, FileConfigProvider\nfrom plba.control import ControlActionSet, ControlChannel, ControlPlaneService, HttpControlChannel\nfrom plba.contracts import (\n ApplicationModule,\n ConfigProvider,\n HealthContributor,\n TraceContext,\n TraceContextRecord,\n TraceLogMessage,\n TraceTransport,\n Worker,\n WorkerHealth,\n WorkerStatus,\n)\nfrom plba.core import ConfigurationManager, RuntimeManager, ServiceContainer\nfrom plba.health import HealthRegistry\nfrom plba.logging import LogManager\nfrom plba.queue import InMemoryTaskQueue\nfrom plba.tracing import MySqlTraceTransport, NoOpTraceTransport, TraceService\nfrom plba.workflow import (\n StepResult,\n WorkflowContext,\n WorkflowDefinition,\n WorkflowEngine,\n WorkflowEngineHooks,\n WorkflowNode,\n WorkflowRuntimeFactory,\n WorkflowStep,\n)\nfrom plba.workers import WorkerSupervisor\n\n__all__ = [\n \"ApplicationModule\",\n \"ConfigFileLoader\",\n \"ConfigProvider\",\n \"ConfigurationManager\",\n \"ControlActionSet\",\n \"ControlChannel\",\n \"ControlPlaneService\",\n \"create_runtime\",\n \"FileConfigProvider\",\n \"HealthContributor\",\n \"HealthRegistry\",\n \"HttpControlChannel\",\n \"InMemoryTaskQueue\",\n \"LogManager\",\n \"MySqlTraceTransport\",\n \"NoOpTraceTransport\",\n \"RuntimeManager\",\n \"ServiceContainer\",\n \"TraceContext\",\n \"TraceContextRecord\",\n \"TraceLogMessage\",\n \"TraceService\",\n \"TraceTransport\",\n \"StepResult\",\n \"Worker\",\n \"WorkerHealth\",\n \"WorkerStatus\",\n \"WorkflowContext\",\n \"WorkflowDefinition\",\n \"WorkflowEngine\",\n \"WorkflowEngineHooks\",\n \"WorkflowNode\",\n \"WorkflowRuntimeFactory\",\n \"WorkflowStep\",\n \"WorkerSupervisor\",\n]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/__init__.py:1-69", + "span_start": 1, + "span_end": 69, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C0_SOURCE_CHUNKS": 200 + }, + "filters_by_layer": { + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src/plba/__init__.py" + ], + "include_globs": [], + "exclude_globs": [], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Открой файл src/plba/__init__.py", + "path_scope": [ + "src/plba/__init__.py" + ], + "include_globs": [], + "exclude_globs": [], + "prefer_globs": [], + "top_k": 200, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src/plba/__init__.py" + ], + "normalized_include_globs": [], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [] + }, + "layers": [ + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 17, + "retrieval_by_layer": { + "C0_SOURCE_CHUNKS": 17 + }, + "merge_rank": 0 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Открой файл src/plba/__init__.py", + "rag_count": 1 + }, + "output": { + "llm_answer": "1. src/plba/__init__.py\n2. Фрагмент файла содержит импорт различных модулей и классов, а также объявление переменной __all__, которая задает список экспортируемых объектов.\n3. Top-level сущности и секции:\n - Импорты различных модулей и классов.\n - Переменная __all__.\n4. В данном файле важны следующие части:\n - Список импортируемых классов и функций (ApplicationModule, ConfigFileLoader, ConfigProvider, и др.).\n - Переменная __all__, определяющая экспортируемые объекты." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 589, + "evidence_rows": 1, + "evidence_chars": 1768 + }, + "evidence_summary": [ + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_open_file_ru_v2", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 1161 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-open-file-public-api.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-open-file-public-api.md new file mode 100644 index 0000000..8cad6d8 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-open-file-public-api.md @@ -0,0 +1,30 @@ +# plba-v2-open-file-public-api + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Открой файл src/plba/__init__.py + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 1, + "llm_answer": "1. src/plba/__init__.py\n2. Фрагмент файла содержит импорт различных модулей и классов, а также объявление переменной __all__, которая задает список экспортируемых объектов.\n3. Top-level сущности и секции:\n - Импорты различных модулей и классов.\n - Переменная __all__.\n4. В данном файле важны следующие части:\n - Список импортируемых классов и функций (ApplicationModule, ConfigFileLoader, ConfigProvider, и др.).\n - Переменная __all__, определяющая экспортируемые объекты.", + "answer_mode": "answered", + "path_scope": [ + "src/plba/__init__.py" + ], + "symbol_candidates": [], + "layers": [ + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-open-file-runtime.json b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-open-file-runtime.json new file mode 100644 index 0000000..ebcc0e1 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-open-file-runtime.json @@ -0,0 +1,492 @@ +{ + "case_id": "plba-v2-open-file-runtime", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 1, + "llm_answer": "1. путь к файлу: src/app_runtime/core/runtime.py\n2. В доступном фрагменте показан класс RuntimeManager с его атрибутами и методом __init__. Видно объявление нескольких параметров конструктора класса и инициализация соответствующих полей.\n3. Top-level сущности и секции: класс RuntimeManager, метод __init__\n4. Важные части для вопроса пользователя:\n- Класс RuntimeManager является основным управляющим объектом runtime-системы.\n- Метод __init__ устанавливает начальные значения полей объекта и регистрирует базовые сервисы приложения. \n- Параметры конструктора определяют компоненты системы, такие как конфигурация, службы, журналы, контроль состояния и другие.", + "answer_mode": "answered", + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "symbol_candidates": [], + "layers": [ + "C0_SOURCE_CHUNKS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-v2-open-file-runtime", + "text": "Открой файл src/app_runtime/core/runtime.py", + "mode": "full_chain", + "run_started_at": "2026-03-12T13:23:57", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Открой файл src/app_runtime/core/runtime.py", + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [], + "confidence": 0.0 + }, + "rag_count": 1, + "rag_rows": [ + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "1. путь к файлу: src/app_runtime/core/runtime.py\n2. В доступном фрагменте показан класс RuntimeManager с его атрибутами и методом __init__. Видно объявление нескольких параметров конструктора класса и инициализация соответствующих полей.\n3. Top-level сущности и секции: класс RuntimeManager, метод __init__\n4. Важные части для вопроса пользователя:\n- Класс RuntimeManager является основным управляющим объектом runtime-системы.\n- Метод __init__ устанавливает начальные значения полей объекта и регистрирует базовые сервисы приложения. \n- Параметры конструктора определяют компоненты системы, такие как конфигурация, службы, журналы, контроль состояния и другие.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "unknown", + "symbol_candidates": [], + "keyword_hints": [], + "path_hints": [ + "src/app_runtime/core/runtime.py" + ], + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/app_runtime/core/runtime.py" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": false, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C0_SOURCE_CHUNKS": 200 + }, + "filters_by_layer": { + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "include_globs": [], + "exclude_globs": [], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Открой файл src/app_runtime/core/runtime.py", + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "include_globs": [], + "exclude_globs": [], + "prefer_globs": [], + "top_k": 200, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "normalized_include_globs": [], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [] + }, + "layers": [ + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 1, + "symbol_resolution": 0, + "retrieval_total": 270, + "retrieval_by_layer": { + "C0_SOURCE_CHUNKS": 270 + }, + "merge_rank": 0, + "prompt_build": 0, + "llm_call": 1393 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 600, + "evidence_rows": 1, + "evidence_chars": 6265 + }, + "evidence_summary": [ + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_open_file_ru_v2", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [], + "path_scope": [ + "src/app_runtime/core/runtime.py" + ] + }, + "llm": { + "used_evidence_count": 1, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-v2-open-file-runtime", + "mode": "full_chain", + "run_started_at": "2026-03-12T13:23:57", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Открой файл src/app_runtime/core/runtime.py", + "normalized_query": "Открой файл src/app_runtime/core/runtime.py" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Открой файл src/app_runtime/core/runtime.py" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Открой файл src/app_runtime/core/runtime.py" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "unknown", + "symbol_candidates": [], + "keyword_hints": [], + "path_hints": [ + "src/app_runtime/core/runtime.py" + ], + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/app_runtime/core/runtime.py" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": false, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 1 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Открой файл src/app_runtime/core/runtime.py" + }, + "output": { + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [], + "confidence": 0.0 + }, + "rag_count": 1, + "rag_rows": [ + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C0_SOURCE_CHUNKS": 200 + }, + "filters_by_layer": { + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "include_globs": [], + "exclude_globs": [], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Открой файл src/app_runtime/core/runtime.py", + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "include_globs": [], + "exclude_globs": [], + "prefer_globs": [], + "top_k": 200, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "normalized_include_globs": [], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [] + }, + "layers": [ + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 270, + "retrieval_by_layer": { + "C0_SOURCE_CHUNKS": 270 + }, + "merge_rank": 0 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Открой файл src/app_runtime/core/runtime.py", + "rag_count": 1 + }, + "output": { + "llm_answer": "1. путь к файлу: src/app_runtime/core/runtime.py\n2. В доступном фрагменте показан класс RuntimeManager с его атрибутами и методом __init__. Видно объявление нескольких параметров конструктора класса и инициализация соответствующих полей.\n3. Top-level сущности и секции: класс RuntimeManager, метод __init__\n4. Важные части для вопроса пользователя:\n- Класс RuntimeManager является основным управляющим объектом runtime-системы.\n- Метод __init__ устанавливает начальные значения полей объекта и регистрирует базовые сервисы приложения. \n- Параметры конструктора определяют компоненты системы, такие как конфигурация, службы, журналы, контроль состояния и другие." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 600, + "evidence_rows": 1, + "evidence_chars": 6265 + }, + "evidence_summary": [ + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_open_file_ru_v2", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 1393 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-open-file-runtime.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-open-file-runtime.md new file mode 100644 index 0000000..e0fd4de --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-open-file-runtime.md @@ -0,0 +1,30 @@ +# plba-v2-open-file-runtime + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Открой файл src/app_runtime/core/runtime.py + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 1, + "llm_answer": "1. путь к файлу: src/app_runtime/core/runtime.py\n2. В доступном фрагменте показан класс RuntimeManager с его атрибутами и методом __init__. Видно объявление нескольких параметров конструктора класса и инициализация соответствующих полей.\n3. Top-level сущности и секции: класс RuntimeManager, метод __init__\n4. Важные части для вопроса пользователя:\n- Класс RuntimeManager является основным управляющим объектом runtime-системы.\n- Метод __init__ устанавливает начальные значения полей объекта и регистрирует базовые сервисы приложения. \n- Параметры конструктора определяют компоненты системы, такие как конфигурация, службы, журналы, контроль состояния и другие.", + "answer_mode": "answered", + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "symbol_candidates": [], + "layers": [ + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-health-endpoint.json b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-health-endpoint.json new file mode 100644 index 0000000..de4bf93 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-health-endpoint.json @@ -0,0 +1,3084 @@ +{ + "case_id": "plba-v2-trace-flow-health-endpoint", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "TRACE_FLOW", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 26, + "llm_answer": "1. Точка старта — вызовы `/health` и `/actions/{action}` через `HttpControlAppFactory.create`.\n2. \n\n- 2.1. HttpControlAppFactory.create → создание экземпляра FastAPI (`app = FastAPI(...)`)\n- 2.2. Внутри FastAPI создаётся middleware для логирования времени отклика запроса (`@app.middleware(\"http\")`)\n- 2.3. Добавляются маршруты: \n - GET `/health`: вызывает функцию `health_provider`, возвращает статус через JSONResponse. \n - GET/POST `/actions/{action}`: проверяет доступное действие, регистрирует клиентский источник и выполняет действия типа «запуск» или «остановка».\n \n3. Связь между шагами подтверждается непосредственно объявлением функций внутри класса `HttpControlAppFactory` (источник: [C0_SOURCE_CHUNKS]).\n4. Неполные данные отсутствуют. Весь описанный путь следования потока вызова документирован на основе доступных источников.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "health", + "HttpControlAppFactory" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-v2-trace-flow-health-endpoint", + "text": "Покажи как проходит запрос /health в HttpControlAppFactory", + "mode": "full_chain", + "run_started_at": "2026-03-12T13:23:57", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Покажи как проходит запрос /health в HttpControlAppFactory", + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "HttpControlAppFactory", + "alternatives": [ + "HttpControlAppFactory", + "ControlActionSet", + "HealthContributor.health", + "HealthContributor" + ], + "confidence": 0.99 + }, + "rag_count": 26, + "rag_rows": [ + { + "path": "src/app_runtime/control/http_app.py", + "content": "class HttpControlAppFactory\nHttpControlAppFactory", + "layer": "C1_SYMBOL_CATALOG", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "qname": "HttpControlAppFactory", + "kind": "class", + "signature": "HttpControlAppFactory", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlActionSet\nControlActionSet", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "qname": "ControlActionSet", + "kind": "class", + "signature": "ControlActionSet", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/health.py", + "content": "method HealthContributor.health\nhealth(self)\nReturn contributor health state.", + "layer": "C1_SYMBOL_CATALOG", + "title": "HealthContributor.health", + "span_start": 9, + "span_end": 10, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "728cff18958d8a25e2661a0f08c83d68c3bbbfa8cef212b85dc0da2b11b3dc90", + "qname": "HealthContributor.health", + "kind": "method", + "signature": "health(self)", + "parent_symbol_id": "HealthContributor", + "package_or_module": "src.app_runtime.contracts.health", + "is_test": false, + "blob_sha": "6bd92611def7131e32d4dd34a8ed85e6cf3c67722ad27797032a632cb30dc097", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/health.py", + "content": "class HealthContributor\nHealthContributor(ABC)", + "layer": "C1_SYMBOL_CATALOG", + "title": "HealthContributor", + "span_start": 7, + "span_end": 10, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "db91ae387b89a2e9d83829754f27fa18a4055b3e72d7f31789a0b8e0bf5bba0b", + "qname": "HealthContributor", + "kind": "class", + "signature": "HealthContributor(ABC)", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.contracts.health", + "is_test": false, + "blob_sha": "6bd92611def7131e32d4dd34a8ed85e6cf3c67722ad27797032a632cb30dc097", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/health/registry.py", + "content": "HealthRegistry\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (2)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HealthRegistry", + "span_start": 8, + "span_end": 56, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 29, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd3390eb0ba29c9979466b9c2117238e0da3bb829eeb4d505cb34c9c3df7a8e8", + "symbol_name": "HealthRegistry", + "qname": "HealthRegistry", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 2, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "26e6a24daa43407ba5340b74497c20153020e79f8d7828ae502aaec378dfcf75", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/types.py", + "content": "HealthPayload\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "HealthPayload", + "span_start": 7, + "span_end": 11, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "392235d63ddf752d6e419cb8528c93fe070d1bc02d3c87ba6a897baac810cf5d", + "symbol_name": "HealthPayload", + "qname": "HealthPayload", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "448a02e4a432b5ab65b246b2bd24a32a6f127b9d2091ea73b53ee3c0a2f53bb3", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/health.py", + "content": "HealthContributor\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "HealthContributor", + "span_start": 7, + "span_end": 10, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "db91ae387b89a2e9d83829754f27fa18a4055b3e72d7f31789a0b8e0bf5bba0b", + "symbol_name": "HealthContributor", + "qname": "HealthContributor", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "6bd92611def7131e32d4dd34a8ed85e6cf3c67722ad27797032a632cb30dc097", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/health/registry.py", + "content": "HealthRegistry.__init__\n -> HealthRegistry._contributors\n -> HealthRegistry.register", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HealthRegistry.__init__:dataflow_slice", + "span_start": 10, + "span_end": 13, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "2381dfb339d541367c3251d2a610cac9d8b3f6bd6a352e119d00a93c5ccc2b7d", + "edge_type": "dataflow_slice", + "src_symbol_id": "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "src_qname": "HealthRegistry.__init__", + "dst_symbol_id": "a9e1f290c346c8bb1d67af0cafeebb5bcaf29c3ed7027e33c794532743df38f2", + "dst_ref": "HealthRegistry.register", + "resolution": "resolved", + "slice_id": "2381dfb339d541367c3251d2a610cac9d8b3f6bd6a352e119d00a93c5ccc2b7d", + "root_symbol_id": "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "path_symbols": [ + "HealthRegistry.__init__", + "HealthRegistry._contributors", + "HealthRegistry.register" + ], + "path_symbol_ids": [ + "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "a9e1f290c346c8bb1d67af0cafeebb5bcaf29c3ed7027e33c794532743df38f2" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "26e6a24daa43407ba5340b74497c20153020e79f8d7828ae502aaec378dfcf75", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/health/registry.py", + "content": "HealthRegistry.__init__\n -> HealthRegistry._contributors\n -> HealthRegistry.contributor_healths", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HealthRegistry.__init__:dataflow_slice", + "span_start": 10, + "span_end": 16, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d3a88a7abf16359e903e809ffc24473658fdd8198f60641fe1584fc4ac663c31", + "edge_type": "dataflow_slice", + "src_symbol_id": "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "src_qname": "HealthRegistry.__init__", + "dst_symbol_id": "fa7bbd8f4b64a55a5088640c30f52e84075d65f531bd7e1f6c1d7bb8d24fcbf2", + "dst_ref": "HealthRegistry.contributor_healths", + "resolution": "resolved", + "slice_id": "d3a88a7abf16359e903e809ffc24473658fdd8198f60641fe1584fc4ac663c31", + "root_symbol_id": "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "path_symbols": [ + "HealthRegistry.__init__", + "HealthRegistry._contributors", + "HealthRegistry.contributor_healths" + ], + "path_symbol_ids": [ + "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "fa7bbd8f4b64a55a5088640c30f52e84075d65f531bd7e1f6c1d7bb8d24fcbf2" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "26e6a24daa43407ba5340b74497c20153020e79f8d7828ae502aaec378dfcf75", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory.create calls time.monotonic", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlAppFactory.create:calls", + "span_start": 25, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3fdd0a88d10225ee74f3b84ab57e13f09f5ccc72f00e31af9ae4655411c289c0", + "edge_type": "calls", + "src_symbol_id": "4af42c2a9275d652e710a98ec48b8247236b4453a093629f8958704ff6d3cb58", + "src_qname": "HttpControlAppFactory.create", + "dst_symbol_id": null, + "dst_ref": "time.monotonic", + "resolution": "partial", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory.create calls app.post", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlAppFactory.create:calls", + "span_start": 37, + "span_end": 37, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "0e545d4b5187db7bec5ceac03071d2ad68177550c42af748fee364639e533c90", + "edge_type": "calls", + "src_symbol_id": "4af42c2a9275d652e710a98ec48b8247236b4453a093629f8958704ff6d3cb58", + "src_qname": "HttpControlAppFactory.create", + "dst_symbol_id": null, + "dst_ref": "app.post", + "resolution": "partial", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory.create calls str", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlAppFactory.create:calls", + "span_start": 27, + "span_end": 27, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "2a87c51461e31cd556508cc37fdff37b4d24c26f7f1604db30af5e8f1bda96cb", + "edge_type": "calls", + "src_symbol_id": "4af42c2a9275d652e710a98ec48b8247236b4453a093629f8958704ff6d3cb58", + "src_qname": "HttpControlAppFactory.create", + "dst_symbol_id": null, + "dst_ref": "str", + "resolution": "partial", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "class HttpControlAppFactory:\n def create(\n self,\n health_provider: Callable[[], Awaitable[HealthPayload]],\n action_provider: Callable[[str, str], Awaitable[JSONResponse]],\n ) -> FastAPI:\n app = FastAPI(title=\"PLBA Control API\")\n\n @app.middleware(\"http\")\n async def log_api_call(request: Request, call_next): # type: ignore[no-untyped-def]\n started = time.monotonic()\n response = await call_next(request)\n response.headers[\"X-Response-Time-Ms\"] = str(int((time.monotonic() - started) * 1000))\n return response\n\n @app.get(\"/health\")\n async def health() -> JSONResponse:\n payload = await health_provider()\n status_code = 200 if payload.get(\"status\") == \"ok\" else 503\n return JSONResponse(content=payload, status_code=status_code)\n\n @app.get(\"/actions/{action}\")\n @app.post(\"/actions/{action}\")\n async def action(action: str, request: Request) -> JSONResponse:\n client_source = self._client_source(request)\n if action in {\"start\", \"stop\"}:\n LOGGER.warning(\"Control action requested: /actions/%s client=%s\", action, client_source)\n return await action_provider(action, client_source)\n\n return app\n\n def _client_source(self, request: Request) -> str:\n explicit_header = request.headers.get(\"X-Client-Source\", \"\").strip()\n if explicit_header:\n return explicit_header\n user_agent = request.headers.get(\"User-Agent\", \"\").strip()\n if user_agent:\n return f\"user-agent:{user_agent}\"\n return \"unknown\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_app.py:HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "1. Точка старта — вызовы `/health` и `/actions/{action}` через `HttpControlAppFactory.create`.\n2. \n\n- 2.1. HttpControlAppFactory.create → создание экземпляра FastAPI (`app = FastAPI(...)`)\n- 2.2. Внутри FastAPI создаётся middleware для логирования времени отклика запроса (`@app.middleware(\"http\")`)\n- 2.3. Добавляются маршруты: \n - GET `/health`: вызывает функцию `health_provider`, возвращает статус через JSONResponse. \n - GET/POST `/actions/{action}`: проверяет доступное действие, регистрирует клиентский источник и выполняет действия типа «запуск» или «остановка».\n \n3. Связь между шагами подтверждается непосредственно объявлением функций внутри класса `HttpControlAppFactory` (источник: [C0_SOURCE_CHUNKS]).\n4. Неполные данные отсутствуют. Весь описанный путь следования потока вызова документирован на основе доступных источников.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "TRACE_FLOW", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS", + "C4_SEMANTIC_ROLES" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "TRACE_FLOW", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "unknown", + "symbol_candidates": [ + "health", + "HttpControlAppFactory" + ], + "keyword_hints": [ + "health", + "HttpControlAppFactory" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 10, + "C3_ENTRYPOINTS": 10 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "health HttpControlAppFactory", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Покажи как проходит запрос /health в HttpControlAppFactory", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "Покажи как проходит запрос /health в HttpControlAppFactory", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Покажи как проходит запрос /health в HttpControlAppFactory", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 10, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "Покажи как проходит запрос /health в HttpControlAppFactory", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 10, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 4, + "candidates_after_filter": 4 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 10, + "candidates_after_filter": 10 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "HttpControlAppFactory", + "alternatives": [ + "HttpControlAppFactory", + "ControlActionSet", + "HealthContributor.health", + "HealthContributor" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 4, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 8, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 10, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 156, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 50, + "C0_SOURCE_CHUNKS": 22, + "C4_SEMANTIC_ROLES": 17, + "C2_DEPENDENCY_GRAPH": 55, + "C3_ENTRYPOINTS": 10 + }, + "merge_rank": 40, + "prompt_build": 0, + "llm_call": 1739 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 794, + "evidence_rows": 26, + "evidence_chars": 3507 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 4, + "unique_paths": 3 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 8, + "unique_paths": 7 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 10, + "unique_paths": 3 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_trace_flow_ru_v2", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "health", + "HttpControlAppFactory" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 26, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-v2-trace-flow-health-endpoint", + "mode": "full_chain", + "run_started_at": "2026-03-12T13:23:57", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Покажи как проходит запрос /health в HttpControlAppFactory", + "normalized_query": "Покажи как проходит запрос /health в HttpControlAppFactory" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Покажи как проходит запрос /health в HttpControlAppFactory" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Покажи как проходит запрос /health в HttpControlAppFactory" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "TRACE_FLOW", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "unknown", + "symbol_candidates": [ + "health", + "HttpControlAppFactory" + ], + "keyword_hints": [ + "health", + "HttpControlAppFactory" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Покажи как проходит запрос /health в HttpControlAppFactory" + }, + "output": { + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "HttpControlAppFactory", + "alternatives": [ + "HttpControlAppFactory", + "ControlActionSet", + "HealthContributor.health", + "HealthContributor" + ], + "confidence": 0.99 + }, + "rag_count": 26, + "rag_rows": [ + { + "path": "src/app_runtime/control/http_app.py", + "content": "class HttpControlAppFactory\nHttpControlAppFactory", + "layer": "C1_SYMBOL_CATALOG", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "qname": "HttpControlAppFactory", + "kind": "class", + "signature": "HttpControlAppFactory", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlActionSet\nControlActionSet", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "qname": "ControlActionSet", + "kind": "class", + "signature": "ControlActionSet", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/health.py", + "content": "method HealthContributor.health\nhealth(self)\nReturn contributor health state.", + "layer": "C1_SYMBOL_CATALOG", + "title": "HealthContributor.health", + "span_start": 9, + "span_end": 10, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "728cff18958d8a25e2661a0f08c83d68c3bbbfa8cef212b85dc0da2b11b3dc90", + "qname": "HealthContributor.health", + "kind": "method", + "signature": "health(self)", + "parent_symbol_id": "HealthContributor", + "package_or_module": "src.app_runtime.contracts.health", + "is_test": false, + "blob_sha": "6bd92611def7131e32d4dd34a8ed85e6cf3c67722ad27797032a632cb30dc097", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/health.py", + "content": "class HealthContributor\nHealthContributor(ABC)", + "layer": "C1_SYMBOL_CATALOG", + "title": "HealthContributor", + "span_start": 7, + "span_end": 10, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "db91ae387b89a2e9d83829754f27fa18a4055b3e72d7f31789a0b8e0bf5bba0b", + "qname": "HealthContributor", + "kind": "class", + "signature": "HealthContributor(ABC)", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.contracts.health", + "is_test": false, + "blob_sha": "6bd92611def7131e32d4dd34a8ed85e6cf3c67722ad27797032a632cb30dc097", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/health/registry.py", + "content": "HealthRegistry\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (2)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HealthRegistry", + "span_start": 8, + "span_end": 56, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 29, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd3390eb0ba29c9979466b9c2117238e0da3bb829eeb4d505cb34c9c3df7a8e8", + "symbol_name": "HealthRegistry", + "qname": "HealthRegistry", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 2, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "26e6a24daa43407ba5340b74497c20153020e79f8d7828ae502aaec378dfcf75", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/types.py", + "content": "HealthPayload\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "HealthPayload", + "span_start": 7, + "span_end": 11, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "392235d63ddf752d6e419cb8528c93fe070d1bc02d3c87ba6a897baac810cf5d", + "symbol_name": "HealthPayload", + "qname": "HealthPayload", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "448a02e4a432b5ab65b246b2bd24a32a6f127b9d2091ea73b53ee3c0a2f53bb3", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/health.py", + "content": "HealthContributor\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "HealthContributor", + "span_start": 7, + "span_end": 10, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "db91ae387b89a2e9d83829754f27fa18a4055b3e72d7f31789a0b8e0bf5bba0b", + "symbol_name": "HealthContributor", + "qname": "HealthContributor", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "6bd92611def7131e32d4dd34a8ed85e6cf3c67722ad27797032a632cb30dc097", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/health/registry.py", + "content": "HealthRegistry.__init__\n -> HealthRegistry._contributors\n -> HealthRegistry.register", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HealthRegistry.__init__:dataflow_slice", + "span_start": 10, + "span_end": 13, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "2381dfb339d541367c3251d2a610cac9d8b3f6bd6a352e119d00a93c5ccc2b7d", + "edge_type": "dataflow_slice", + "src_symbol_id": "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "src_qname": "HealthRegistry.__init__", + "dst_symbol_id": "a9e1f290c346c8bb1d67af0cafeebb5bcaf29c3ed7027e33c794532743df38f2", + "dst_ref": "HealthRegistry.register", + "resolution": "resolved", + "slice_id": "2381dfb339d541367c3251d2a610cac9d8b3f6bd6a352e119d00a93c5ccc2b7d", + "root_symbol_id": "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "path_symbols": [ + "HealthRegistry.__init__", + "HealthRegistry._contributors", + "HealthRegistry.register" + ], + "path_symbol_ids": [ + "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "a9e1f290c346c8bb1d67af0cafeebb5bcaf29c3ed7027e33c794532743df38f2" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "26e6a24daa43407ba5340b74497c20153020e79f8d7828ae502aaec378dfcf75", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/health/registry.py", + "content": "HealthRegistry.__init__\n -> HealthRegistry._contributors\n -> HealthRegistry.contributor_healths", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HealthRegistry.__init__:dataflow_slice", + "span_start": 10, + "span_end": 16, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d3a88a7abf16359e903e809ffc24473658fdd8198f60641fe1584fc4ac663c31", + "edge_type": "dataflow_slice", + "src_symbol_id": "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "src_qname": "HealthRegistry.__init__", + "dst_symbol_id": "fa7bbd8f4b64a55a5088640c30f52e84075d65f531bd7e1f6c1d7bb8d24fcbf2", + "dst_ref": "HealthRegistry.contributor_healths", + "resolution": "resolved", + "slice_id": "d3a88a7abf16359e903e809ffc24473658fdd8198f60641fe1584fc4ac663c31", + "root_symbol_id": "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "path_symbols": [ + "HealthRegistry.__init__", + "HealthRegistry._contributors", + "HealthRegistry.contributor_healths" + ], + "path_symbol_ids": [ + "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "fa7bbd8f4b64a55a5088640c30f52e84075d65f531bd7e1f6c1d7bb8d24fcbf2" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "26e6a24daa43407ba5340b74497c20153020e79f8d7828ae502aaec378dfcf75", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory.create calls time.monotonic", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlAppFactory.create:calls", + "span_start": 25, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3fdd0a88d10225ee74f3b84ab57e13f09f5ccc72f00e31af9ae4655411c289c0", + "edge_type": "calls", + "src_symbol_id": "4af42c2a9275d652e710a98ec48b8247236b4453a093629f8958704ff6d3cb58", + "src_qname": "HttpControlAppFactory.create", + "dst_symbol_id": null, + "dst_ref": "time.monotonic", + "resolution": "partial", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory.create calls app.post", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlAppFactory.create:calls", + "span_start": 37, + "span_end": 37, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "0e545d4b5187db7bec5ceac03071d2ad68177550c42af748fee364639e533c90", + "edge_type": "calls", + "src_symbol_id": "4af42c2a9275d652e710a98ec48b8247236b4453a093629f8958704ff6d3cb58", + "src_qname": "HttpControlAppFactory.create", + "dst_symbol_id": null, + "dst_ref": "app.post", + "resolution": "partial", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory.create calls str", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlAppFactory.create:calls", + "span_start": 27, + "span_end": 27, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "2a87c51461e31cd556508cc37fdff37b4d24c26f7f1604db30af5e8f1bda96cb", + "edge_type": "calls", + "src_symbol_id": "4af42c2a9275d652e710a98ec48b8247236b4453a093629f8958704ff6d3cb58", + "src_qname": "HttpControlAppFactory.create", + "dst_symbol_id": null, + "dst_ref": "str", + "resolution": "partial", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "class HttpControlAppFactory:\n def create(\n self,\n health_provider: Callable[[], Awaitable[HealthPayload]],\n action_provider: Callable[[str, str], Awaitable[JSONResponse]],\n ) -> FastAPI:\n app = FastAPI(title=\"PLBA Control API\")\n\n @app.middleware(\"http\")\n async def log_api_call(request: Request, call_next): # type: ignore[no-untyped-def]\n started = time.monotonic()\n response = await call_next(request)\n response.headers[\"X-Response-Time-Ms\"] = str(int((time.monotonic() - started) * 1000))\n return response\n\n @app.get(\"/health\")\n async def health() -> JSONResponse:\n payload = await health_provider()\n status_code = 200 if payload.get(\"status\") == \"ok\" else 503\n return JSONResponse(content=payload, status_code=status_code)\n\n @app.get(\"/actions/{action}\")\n @app.post(\"/actions/{action}\")\n async def action(action: str, request: Request) -> JSONResponse:\n client_source = self._client_source(request)\n if action in {\"start\", \"stop\"}:\n LOGGER.warning(\"Control action requested: /actions/%s client=%s\", action, client_source)\n return await action_provider(action, client_source)\n\n return app\n\n def _client_source(self, request: Request) -> str:\n explicit_header = request.headers.get(\"X-Client-Source\", \"\").strip()\n if explicit_header:\n return explicit_header\n user_agent = request.headers.get(\"User-Agent\", \"\").strip()\n if user_agent:\n return f\"user-agent:{user_agent}\"\n return \"unknown\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_app.py:HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 10, + "C3_ENTRYPOINTS": 10 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "health HttpControlAppFactory", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Покажи как проходит запрос /health в HttpControlAppFactory", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "Покажи как проходит запрос /health в HttpControlAppFactory", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Покажи как проходит запрос /health в HttpControlAppFactory", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 10, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "Покажи как проходит запрос /health в HttpControlAppFactory", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 10, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 4, + "candidates_after_filter": 4 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 10, + "candidates_after_filter": 10 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "HttpControlAppFactory", + "alternatives": [ + "HttpControlAppFactory", + "ControlActionSet", + "HealthContributor.health", + "HealthContributor" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 4, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 8, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 10, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 156, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 50, + "C0_SOURCE_CHUNKS": 22, + "C4_SEMANTIC_ROLES": 17, + "C2_DEPENDENCY_GRAPH": 55, + "C3_ENTRYPOINTS": 10 + }, + "merge_rank": 40 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Покажи как проходит запрос /health в HttpControlAppFactory", + "rag_count": 26 + }, + "output": { + "llm_answer": "1. Точка старта — вызовы `/health` и `/actions/{action}` через `HttpControlAppFactory.create`.\n2. \n\n- 2.1. HttpControlAppFactory.create → создание экземпляра FastAPI (`app = FastAPI(...)`)\n- 2.2. Внутри FastAPI создаётся middleware для логирования времени отклика запроса (`@app.middleware(\"http\")`)\n- 2.3. Добавляются маршруты: \n - GET `/health`: вызывает функцию `health_provider`, возвращает статус через JSONResponse. \n - GET/POST `/actions/{action}`: проверяет доступное действие, регистрирует клиентский источник и выполняет действия типа «запуск» или «остановка».\n \n3. Связь между шагами подтверждается непосредственно объявлением функций внутри класса `HttpControlAppFactory` (источник: [C0_SOURCE_CHUNKS]).\n4. Неполные данные отсутствуют. Весь описанный путь следования потока вызова документирован на основе доступных источников." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 794, + "evidence_rows": 26, + "evidence_chars": 3507 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 4, + "unique_paths": 3 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 8, + "unique_paths": 7 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 10, + "unique_paths": 3 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_trace_flow_ru_v2", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 1739 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-health-endpoint.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-health-endpoint.md new file mode 100644 index 0000000..dfef433 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-health-endpoint.md @@ -0,0 +1,35 @@ +# plba-v2-trace-flow-health-endpoint + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Покажи как проходит запрос /health в HttpControlAppFactory + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "TRACE_FLOW", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 26, + "llm_answer": "1. Точка старта — вызовы `/health` и `/actions/{action}` через `HttpControlAppFactory.create`.\n2. \n\n- 2.1. HttpControlAppFactory.create → создание экземпляра FastAPI (`app = FastAPI(...)`)\n- 2.2. Внутри FastAPI создаётся middleware для логирования времени отклика запроса (`@app.middleware(\"http\")`)\n- 2.3. Добавляются маршруты: \n - GET `/health`: вызывает функцию `health_provider`, возвращает статус через JSONResponse. \n - GET/POST `/actions/{action}`: проверяет доступное действие, регистрирует клиентский источник и выполняет действия типа «запуск» или «остановка».\n \n3. Связь между шагами подтверждается непосредственно объявлением функций внутри класса `HttpControlAppFactory` (источник: [C0_SOURCE_CHUNKS]).\n4. Неполные данные отсутствуют. Весь описанный путь следования потока вызова документирован на основе доступных источников.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "health", + "HttpControlAppFactory" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-runtime-start.json b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-runtime-start.json new file mode 100644 index 0000000..17dbbd7 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-runtime-start.json @@ -0,0 +1,2964 @@ +{ + "case_id": "plba-v2-trace-flow-runtime-start", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "TRACE_FLOW", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 23, + "llm_answer": "1. Точка старта: запуск приложения, точка app.post в http_app.py.\n2. \n\n- 2.1 [C3_ENTRYPOINTS] src/app_runtime/control/http_app.py | app.post → fastapi http app.post\n- 2.2 [C2_DEPENDENCY_GRAPH] src/app_runtime/core/runtime.py | RuntimeManager.__init__:dataflow_slice → RuntimeManager.__init__\n - 2.2.1 RuntimeManager.__init__ создает экземпляр класса RuntimeManager и инициализирует его атрибуты.\n3. Связь между шагами подтверждена напрямую через зависимости графов [C2_DEPENDENCY_GRAPH].\n4. Разрыв или участок с неполными данными: отсутствует прямое подтверждение вызова RuntimeManager из http_app.py → app.post. Предполагается косвенная инициализация через настройку FastAPI приложения, но прямых доказательств этого нет в предоставленных слоях. \n\nИтог: Прямое восстановление потока выполнения от точки app.post до RuntimeManager завершено. Дальнейший путь к непосредственному вызову RuntimeManager неясен без дополнительных данных.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-v2-trace-flow-runtime-start", + "text": "Покажи поток выполнения при запуске RuntimeManager", + "mode": "full_chain", + "run_started_at": "2026-03-12T13:23:57", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Покажи поток выполнения при запуске RuntimeManager", + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ], + "confidence": 0.99 + }, + "rag_count": 23, + "rag_rows": [ + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager\nRuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "qname": "RuntimeManager", + "kind": "class", + "signature": "RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests manager\n- orchestrates role-like calls (4)\n- reads and writes state attributes\n- participates in dataflow slices (50)", + "layer": "C4_SEMANTIC_ROLES", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 43, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "symbol_name": "RuntimeManager", + "qname": "RuntimeManager", + "role": "pipeline_stage", + "confidence": 0.67, + "dataflow_participation": 50, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 52, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.services\n -> RuntimeManager.__init__", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 33, + "span_end": 39, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d43af85989222ee6d788ce418cdcb217c7ff044cfb915e3bdbd184417dc7bd61", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "dst_ref": "RuntimeManager.__init__", + "resolution": "resolved", + "slice_id": "d43af85989222ee6d788ce418cdcb217c7ff044cfb915e3bdbd184417dc7bd61", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.services", + "RuntimeManager.__init__" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 59, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1", + "dst_ref": "RuntimeManager.start", + "resolution": "resolved", + "slice_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.start" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager._register_core_services", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 127, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6", + "dst_ref": "RuntimeManager._register_core_services", + "resolution": "resolved", + "slice_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager._register_core_services" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.services\n -> RuntimeManager._register_core_services", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 33, + "span_end": 127, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "aac6f9dda73963b977083a892bee39a48eca4fbd7404787e022ecf4ebedec65d", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6", + "dst_ref": "RuntimeManager._register_core_services", + "resolution": "resolved", + "slice_id": "aac6f9dda73963b977083a892bee39a48eca4fbd7404787e022ecf4ebedec65d", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.services", + "RuntimeManager._register_core_services" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "1. Точка старта: запуск приложения, точка app.post в http_app.py.\n2. \n\n- 2.1 [C3_ENTRYPOINTS] src/app_runtime/control/http_app.py | app.post → fastapi http app.post\n- 2.2 [C2_DEPENDENCY_GRAPH] src/app_runtime/core/runtime.py | RuntimeManager.__init__:dataflow_slice → RuntimeManager.__init__\n - 2.2.1 RuntimeManager.__init__ создает экземпляр класса RuntimeManager и инициализирует его атрибуты.\n3. Связь между шагами подтверждена напрямую через зависимости графов [C2_DEPENDENCY_GRAPH].\n4. Разрыв или участок с неполными данными: отсутствует прямое подтверждение вызова RuntimeManager из http_app.py → app.post. Предполагается косвенная инициализация через настройку FastAPI приложения, но прямых доказательств этого нет в предоставленных слоях. \n\nИтог: Прямое восстановление потока выполнения от точки app.post до RuntimeManager завершено. Дальнейший путь к непосредственному вызову RuntimeManager неясен без дополнительных данных.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "TRACE_FLOW", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS", + "C4_SEMANTIC_ROLES" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "TRACE_FLOW", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 10, + "C3_ENTRYPOINTS": 10 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Покажи поток выполнения при запуске RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "Покажи поток выполнения при запуске RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Покажи поток выполнения при запуске RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 10, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "Покажи поток выполнения при запуске RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 10, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 10, + "candidates_after_filter": 10 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 8, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 10, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 129, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 39, + "C0_SOURCE_CHUNKS": 14, + "C4_SEMANTIC_ROLES": 13, + "C2_DEPENDENCY_GRAPH": 53, + "C3_ENTRYPOINTS": 9 + }, + "merge_rank": 16, + "prompt_build": 0, + "llm_call": 1751 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 817, + "evidence_rows": 23, + "evidence_chars": 8302 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 8, + "unique_paths": 7 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 10, + "unique_paths": 2 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_trace_flow_ru_v2", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "RuntimeManager" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 23, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-v2-trace-flow-runtime-start", + "mode": "full_chain", + "run_started_at": "2026-03-12T13:23:57", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Покажи поток выполнения при запуске RuntimeManager", + "normalized_query": "Покажи поток выполнения при запуске RuntimeManager" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Покажи поток выполнения при запуске RuntimeManager" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Покажи поток выполнения при запуске RuntimeManager" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "TRACE_FLOW", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Покажи поток выполнения при запуске RuntimeManager" + }, + "output": { + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ], + "confidence": 0.99 + }, + "rag_count": 23, + "rag_rows": [ + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager\nRuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "qname": "RuntimeManager", + "kind": "class", + "signature": "RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests manager\n- orchestrates role-like calls (4)\n- reads and writes state attributes\n- participates in dataflow slices (50)", + "layer": "C4_SEMANTIC_ROLES", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 43, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "symbol_name": "RuntimeManager", + "qname": "RuntimeManager", + "role": "pipeline_stage", + "confidence": 0.67, + "dataflow_participation": 50, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 52, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.services\n -> RuntimeManager.__init__", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 33, + "span_end": 39, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d43af85989222ee6d788ce418cdcb217c7ff044cfb915e3bdbd184417dc7bd61", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "dst_ref": "RuntimeManager.__init__", + "resolution": "resolved", + "slice_id": "d43af85989222ee6d788ce418cdcb217c7ff044cfb915e3bdbd184417dc7bd61", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.services", + "RuntimeManager.__init__" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 59, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1", + "dst_ref": "RuntimeManager.start", + "resolution": "resolved", + "slice_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.start" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager._register_core_services", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 127, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6", + "dst_ref": "RuntimeManager._register_core_services", + "resolution": "resolved", + "slice_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager._register_core_services" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.services\n -> RuntimeManager._register_core_services", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 33, + "span_end": 127, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "aac6f9dda73963b977083a892bee39a48eca4fbd7404787e022ecf4ebedec65d", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6", + "dst_ref": "RuntimeManager._register_core_services", + "resolution": "resolved", + "slice_id": "aac6f9dda73963b977083a892bee39a48eca4fbd7404787e022ecf4ebedec65d", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.services", + "RuntimeManager._register_core_services" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 10, + "C3_ENTRYPOINTS": 10 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Покажи поток выполнения при запуске RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "Покажи поток выполнения при запуске RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Покажи поток выполнения при запуске RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 10, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "Покажи поток выполнения при запуске RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 10, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 10, + "candidates_after_filter": 10 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 8, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 10, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 129, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 39, + "C0_SOURCE_CHUNKS": 14, + "C4_SEMANTIC_ROLES": 13, + "C2_DEPENDENCY_GRAPH": 53, + "C3_ENTRYPOINTS": 9 + }, + "merge_rank": 16 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Покажи поток выполнения при запуске RuntimeManager", + "rag_count": 23 + }, + "output": { + "llm_answer": "1. Точка старта: запуск приложения, точка app.post в http_app.py.\n2. \n\n- 2.1 [C3_ENTRYPOINTS] src/app_runtime/control/http_app.py | app.post → fastapi http app.post\n- 2.2 [C2_DEPENDENCY_GRAPH] src/app_runtime/core/runtime.py | RuntimeManager.__init__:dataflow_slice → RuntimeManager.__init__\n - 2.2.1 RuntimeManager.__init__ создает экземпляр класса RuntimeManager и инициализирует его атрибуты.\n3. Связь между шагами подтверждена напрямую через зависимости графов [C2_DEPENDENCY_GRAPH].\n4. Разрыв или участок с неполными данными: отсутствует прямое подтверждение вызова RuntimeManager из http_app.py → app.post. Предполагается косвенная инициализация через настройку FastAPI приложения, но прямых доказательств этого нет в предоставленных слоях. \n\nИтог: Прямое восстановление потока выполнения от точки app.post до RuntimeManager завершено. Дальнейший путь к непосредственному вызову RuntimeManager неясен без дополнительных данных." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 817, + "evidence_rows": 23, + "evidence_chars": 8302 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 8, + "unique_paths": 7 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 10, + "unique_paths": 2 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_trace_flow_ru_v2", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 1751 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-runtime-start.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-runtime-start.md new file mode 100644 index 0000000..b55c07e --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-runtime-start.md @@ -0,0 +1,34 @@ +# plba-v2-trace-flow-runtime-start + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Покажи поток выполнения при запуске RuntimeManager + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "TRACE_FLOW", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 23, + "llm_answer": "1. Точка старта: запуск приложения, точка app.post в http_app.py.\n2. \n\n- 2.1 [C3_ENTRYPOINTS] src/app_runtime/control/http_app.py | app.post → fastapi http app.post\n- 2.2 [C2_DEPENDENCY_GRAPH] src/app_runtime/core/runtime.py | RuntimeManager.__init__:dataflow_slice → RuntimeManager.__init__\n - 2.2.1 RuntimeManager.__init__ создает экземпляр класса RuntimeManager и инициализирует его атрибуты.\n3. Связь между шагами подтверждена напрямую через зависимости графов [C2_DEPENDENCY_GRAPH].\n4. Разрыв или участок с неполными данными: отсутствует прямое подтверждение вызова RuntimeManager из http_app.py → app.post. Предполагается косвенная инициализация через настройку FastAPI приложения, но прямых доказательств этого нет в предоставленных слоях. \n\nИтог: Прямое восстановление потока выполнения от точки app.post до RuntimeManager завершено. Дальнейший путь к непосредственному вызову RuntimeManager неясен без дополнительных данных.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/summary.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/summary.md new file mode 100644 index 0000000..812ca36 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_132357/summary.md @@ -0,0 +1,80 @@ +# pipeline_setup_v2 summary + +Passed: 18/18 + +| File | Case | Query | Expected sub-intent | Intent | Actual sub-intent | RAG layers | Pass | +|------|------|-------|---------------------|--------|-------------------|------------|------| +| full_chain_plba_code_subintents_v2.yaml | plba-v2-open-file-runtime | Открой файл src/app_runtime/core/runtime.py | OPEN_FILE | CODE_QA | OPEN_FILE | C0_SOURCE_CHUNKS:1 | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-open-file-public-api | Открой файл src/plba/__init__.py | OPEN_FILE | CODE_QA | OPEN_FILE | C0_SOURCE_CHUNKS:1 | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-explain-runtime-manager | Объясни как работает класс RuntimeManager | EXPLAIN | CODE_QA | EXPLAIN | C0_SOURCE_CHUNKS:1, C1_SYMBOL_CATALOG:1, C2_DEPENDENCY_GRAPH:6, C3_ENTRYPOINTS:3, C4_SEMANTIC_ROLES:1 | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-explain-trace-service | Объясни как работает класс TraceService | EXPLAIN | CODE_QA | EXPLAIN | C0_SOURCE_CHUNKS:3, C1_SYMBOL_CATALOG:1, C2_DEPENDENCY_GRAPH:6, C3_ENTRYPOINTS:3, C4_SEMANTIC_ROLES:1 | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-explain-create-runtime | Что делает функция create_runtime? | EXPLAIN | CODE_QA | EXPLAIN | C0_SOURCE_CHUNKS:1, C1_SYMBOL_CATALOG:1, C2_DEPENDENCY_GRAPH:6, C3_ENTRYPOINTS:3, C4_SEMANTIC_ROLES:1 | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-explain-local-http-channel | Почему в файле src/app_runtime/control/http_channel.py класс HttpControlChannel устроен так? | EXPLAIN_LOCAL | CODE_QA | EXPLAIN_LOCAL | C0_SOURCE_CHUNKS:1, C1_SYMBOL_CATALOG:1, C2_DEPENDENCY_GRAPH:4 | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-find-tests-runtime-manager | Где тесты для RuntimeManager? | FIND_TESTS | CODE_QA | FIND_TESTS | C0_SOURCE_CHUNKS:10, C2_DEPENDENCY_GRAPH:6 | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-find-tests-trace-service | Где тесты для TraceService? | FIND_TESTS | CODE_QA | FIND_TESTS | C0_SOURCE_CHUNKS:10, C2_DEPENDENCY_GRAPH:6 | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-find-tests-create-runtime | Где тесты для create_runtime? | FIND_TESTS | CODE_QA | FIND_TESTS | C0_SOURCE_CHUNKS:10, C2_DEPENDENCY_GRAPH:6 | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-find-tests-workflow-runtime-factory-negative | Где тесты для WorkflowRuntimeFactory? | FIND_TESTS | CODE_QA | FIND_TESTS | C0_SOURCE_CHUNKS:10, C2_DEPENDENCY_GRAPH:6 | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-find-entrypoints-control-plane | Найди точки входа HTTP control plane | FIND_ENTRYPOINTS | CODE_QA | FIND_ENTRYPOINTS | C0_SOURCE_CHUNKS:6, C3_ENTRYPOINTS:3 | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-find-entrypoints-health-endpoint | Где health endpoint? | FIND_ENTRYPOINTS | CODE_QA | FIND_ENTRYPOINTS | C0_SOURCE_CHUNKS:6, C3_ENTRYPOINTS:3 | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-trace-flow-runtime-start | Покажи поток выполнения при запуске RuntimeManager | TRACE_FLOW | CODE_QA | TRACE_FLOW | C0_SOURCE_CHUNKS:1, C1_SYMBOL_CATALOG:1, C2_DEPENDENCY_GRAPH:10, C3_ENTRYPOINTS:3, C4_SEMANTIC_ROLES:8 | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-trace-flow-health-endpoint | Покажи как проходит запрос /health в HttpControlAppFactory | TRACE_FLOW | CODE_QA | TRACE_FLOW | C0_SOURCE_CHUNKS:1, C1_SYMBOL_CATALOG:4, C2_DEPENDENCY_GRAPH:10, C3_ENTRYPOINTS:3, C4_SEMANTIC_ROLES:8 | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-architecture-runtime-manager | Какие компоненты участвуют в RuntimeManager? | ARCHITECTURE | CODE_QA | ARCHITECTURE | C0_SOURCE_CHUNKS:1, C1_SYMBOL_CATALOG:1, C2_DEPENDENCY_GRAPH:8, C3_ENTRYPOINTS:3, C4_SEMANTIC_ROLES:12 | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-architecture-control-plane | Какие компоненты участвуют в ControlPlaneService? | ARCHITECTURE | CODE_QA | ARCHITECTURE | C0_SOURCE_CHUNKS:1, C1_SYMBOL_CATALOG:1, C2_DEPENDENCY_GRAPH:8, C3_ENTRYPOINTS:3, C4_SEMANTIC_ROLES:12 | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-explain-nonexistent-symbol | Объясни класс RuntimeFactoryManager | EXPLAIN | CODE_QA | EXPLAIN | — | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-open-file-nonexistent | Открой файл src/app_runtime/core/missing_runtime.py | OPEN_FILE | CODE_QA | OPEN_FILE | — | ✓ | + +## LLM Answers +- **plba-v2-open-file-runtime** + Query: Открой файл src/app_runtime/core/runtime.py + > 1. путь к файлу: src/app\_runtime/core/runtime.py 2. В доступном фрагменте показан класс RuntimeManager с его атрибутами и методом \_\_init\_\_. Видно объявление нескольких параметров конструктора класса и инициализация соответствующих полей. 3. Top\-level сущности и секции: класс RuntimeManager, метод \_\_init\_\_ 4. Важные части для вопроса пользователя: \- Класс RuntimeManager является основным управляющим объектом runtime\-системы. \- Метод \_\_init\_\_ устанавливает начальные значения полей объекта и регистрирует базовые сервисы приложения. \- Параметры конструктора определяют компоненты системы, такие как конфигурация, службы, журналы, контроль состояния и другие. +- **plba-v2-open-file-public-api** + Query: Открой файл src/plba/__init__.py + > 1. src/plba/\_\_init\_\_.py 2. Фрагмент файла содержит импорт различных модулей и классов, а также объявление переменной \_\_all\_\_, которая задает список экспортируемых объектов. 3. Top\-level сущности и секции: \- Импорты различных модулей и классов. \- Переменная \_\_all\_\_. 4. В данном файле важны следующие части: \- Список импортируемых классов и функций \(ApplicationModule, ConfigFileLoader, ConfigProvider, и др.\). \- Переменная \_\_all\_\_, определяющая экспортируемые объекты. +- **plba-v2-explain-runtime-manager** + Query: Объясни как работает класс RuntimeManager + > 1. \*\*Что это и где определено\*\*: \- Класс \`RuntimeManager\` определен в файле \`src/app\_runtime/core/runtime.py\`. 2. \*\*Назначение по наблюдаемому коду\*\*: \- Судя по комментариям и контексту, класс предназначен для управления жизненным циклом приложения и координации различных сервисов и модулей. Он выступает в роли менеджера, отвечающего за инициализацию, регистрацию и управление состоянием различных компонентов системы. \- Из описания его ответственности \("manager", "orchestrates role\-like calls"\) можно предположить, что он отвечает за координацию работы других сервисов и управляет их взаимодействием через чтение и запись состояния атрибутов. 3. \*\*Подтверждённые зависимости или взаимодействия\*\*: \- В конструкторе класса явно видны зависимости от следующих классов и объектов: \- \`ConfigurationManager\` \- \`ServiceContainer\` \- \`TraceService\` \- \`HealthRegistry\` \- \`LogManager\` \-… +- **plba-v2-explain-trace-service** + Query: Объясни как работает класс TraceService + > 1. \*\*Что это и где определено.\*\* Сущность \`TraceService\` определена в файле \`src/app\_runtime/tracing/service.py\`. Это класс, наследующий от \`TraceContextFactory\`. 2. \*\*Назначение по наблюдаемому коду.\*\* Класс предназначен для управления контекстами трассировки и записи событий трассировки. Он участвует в обработке данных потока \(slice 13\), имеет роль «pipeline stage» и отвечает за создание и запись контекста трассировки \(\`create\_context\`, \`open\_context\`\), а также взаимодействие с транспортировкой контекста через \`TraceRecordWriter\`. 3. \*\*Подтверждённые зависимости или взаимодействия.\*\* \`TraceService\` зависит от класса \`TraceContextStore\` и объекта транспорта трассировки \(\`TraceTransport\`\). Метод \`create\_context\` использует метод записи контекста \`\_writer.write\_context\` для отправки данных в транспортировку. Транспортировка может быть либо реальной реализацией, либо з… +- **plba-v2-explain-create-runtime** + Query: Что делает функция create_runtime? + > 1. \*\*Что это и где определено.\*\* Сущность \`create\_runtime\` определена в файле \`src/plba/bootstrap.py\`. Это функция, принимающая параметры конфигурации и модуля приложения, и возвращающая объект класса \`RuntimeManager\`. 2. \*\*Назначение по наблюдаемому коду.\*\* Функция создаёт и инициализирует экземпляр объекта \`RuntimeManager\`, добавляя файл конфигурации и модуль приложения в его состояние. Если включено управление через HTTP, она также регистрирует канал управления. 3. \*\*Подтверждённые зависимости или взаимодействия.\*\* Функция зависит от объекта \`RuntimeManager\` и использует метод \`add\_config\_file\` для добавления файла конфигурации и метод \`register\_module\` для регистрации модуля приложения. Если включён режим управления через HTTP, используется метод \`register\_channel\` для регистрации канала управления типа \`HttpControlChannel\`. 4. \*\*Что делает по шагам, если это вид… +- **plba-v2-explain-local-http-channel** + Query: Почему в файле src/app_runtime/control/http_channel.py класс HttpControlChannel устроен так? + > Класс \`HttpControlChannel\` реализует HTTP\-интерфейс для управления другим компонентом приложения через HTTP\-запросы. \#\#\# Что делает класс: 1. \*\*Инициализация \(\`\_\_init\_\_\`\)\*\*: \- Принимает параметры \`host\`, \`port\` и \`timeout\`. \- Создаёт экземпляр \`\_runner\` класса \`UvicornThreadRunner\`, отвечающего за выполнение HTTP\-сервера с использованием uvicorn \(асинхронного веб\-фреймворка\). \- Инициализирует объект фабрики приложений \`\_factory\` типа \`HttpControlAppFactory\`, которая отвечает за создание конкретных HTTP\-приложений. \- Опционально инициализирует коллекцию действий управления \`\_actions\`. 2. \*\*Запуск \(\`start\`\)\*\*: \- Проверяет наличие конфигурации действий управления \(\_actions\). Если конфигурация отсутствует, возвращает ошибку. \- Использует фабрику \`\_factory\` для создания HTTP\-приложения, которое включает обработчики health\-запросов и action\-запросов. \- Запускает сервер с п… +- **plba-v2-find-tests-runtime-manager** + Query: Где тесты для RuntimeManager? + > 1. Прямые тесты: \- tests/test\_runtime.py \| test\_runtime\_runs\_worker\_routine\_and\_exposes\_status \- tests/test\_runtime.py \| test\_runtime\_graceful\_stop\_waits\_until\_worker\_finishes 2. Косвенные или ближайшие тесты: \- tests/test\_business\_control\_actions.py \| \_build\_runtime \- tests/test\_business\_control\_actions.py \| test\_worker\_wakes\_up\_with\_configured\_interval 3. Что именно проверяется: \- test\_runtime\_runs\_worker\_routine\_and\_exposes\_status проверяет запуск рабочего потока, регистрацию модуля и получение статуса выполнения. \- test\_runtime\_graceful\_stop\_waits\_until\_worker\_finishes проверяет корректную остановку рабочего процесса и изменение состояния runtime после остановки. \- tests/test\_business\_control\_actions.py содержит косвенные тесты через инстанцирование RuntimeManager в методах \_build\_runtime и test\_worker\_wakes\_up\_with\_configured\_interval. 4. Пробелы покрытия: \- Пря… +- **plba-v2-find-tests-trace-service** + Query: Где тесты для TraceService? + > 1. Прямые тесты: \- tests/test\_runtime.py \| test\_trace\_service\_writes\_contexts\_and\_messages \- Проверка записи контекстов и сообщений в TraceService. \- tests/test\_runtime.py \| test\_trace\_service\_supports\_debug\_warning\_and\_error\_levels \- Проверка поддержки различных уровней логирования \(DEBUG, WARNING, ERROR\). 2. Косвенные или ближайшие тесты: \- Нет известных косвенных тестов, которые напрямую касаются TraceService. 3. Что именно проверяется: \- Запись и обработка контекста и сообщений в TraceService. \- Поддержка различных уровней логирования и запись соответствующих сообщений. 4. Пробелы покрытия: \- Прямого тестирования работы самого класса TraceService без привязки к транспорту нет. \- Тестирование сценариев ошибок и исключений при работе с TraceService отсутствует. \- Отсутствие проверки взаимодействий с внешними сервисами через транспорт. +- **plba-v2-find-tests-create-runtime** + Query: Где тесты для create_runtime? + > 1. Прямые тесты: \- tests/test\_runtime.py \| test\_public\_plba\_package\_exports\_runtime\_builder\_and\_worker\_contract \- Проверка: импорты и вызов функции create\_runtime. \- Видны пробелы покрытия: отсутствуют проверки непосредственно созданного runtime. 2. Косвенные или ближайшие тесты: \- tests/test\_business\_control\_actions.py \| \_build\_runtime \- Проверка: функция \_build\_runtime использует create\_runtime в своем потоке зависимостей. 3. Что именно проверяется: \- В direct test проверяется доступность и работоспособность функции create\_runtime через её импорт и вызов. \- В indirect test проверяется использование create\_runtime внутри другой функции. 4. Пробелы покрытия: \- Прямое тестирование runtime\-сущности отсутствует. \- Нет тестирования поведения или свойств созданного runtime. +- **plba-v2-find-tests-workflow-runtime-factory-negative** + Query: Где тесты для WorkflowRuntimeFactory? + > Прямых тестов для WorkflowRuntimeFactory в предоставленном контексте не обнаружено. Косвенные или ближайшие тесты: 1. tests/test\_business\_control\_actions.py \| test\_actions\_stop\_busy\_worker\_before\_timeout:dataflow\_slice \- Проверяет поведение после остановки занятого рабочего перед таймаутом. 2. tests/test\_business\_control\_actions.py \| test\_actions\_stop\_busy\_worker\_after\_timeout:dataflow\_slice \- Проверяет поведение после остановки занятого рабочего после таймаута. Что именно проверяется: \- Поведение рабочих процессов при остановке и проверке их состояния здоровья \("health"\). \- Запуск и остановка рабочих процессов. Какие пробелы покрытия видны: \- Нет подтвержденных тестов конкретно для WorkflowRuntimeFactory. Тесты находятся ближе к поведению рабочих процессов и блокирующих рутин, а не напрямую связаны с созданием или использованием WorkflowRuntimeFactory. +- **plba-v2-find-entrypoints-control-plane** + Query: Найди точки входа HTTP control plane + > Подтверждённые точки входа: src/app\_runtime/control/http\_app.py \| fastapi http app.get \- Объявлена декоратором @app.get, что указывает на точку входа для HTTP\-запросов. src/app\_runtime/control/http\_app.py \| fastapi http app.post \- Объявлена декоратором @app.post, что указывает на точку входа для HTTP\-запросов. Возможные кандидаты: src/app\_runtime/control/http\_channel.py \| HttpControlChannel.start \- Содержит асинхронную операцию start, которая может запускать приложение, но явных признаков точки входа нет. src/app\_runtime/control/http\_channel.py \| HttpControlChannel.\_health\_response \- Реализует логику обработки health\-запроса, но сама по себе не является точкой входа. src/app\_runtime/control/http\_channel.py \| HttpControlChannel.\_action\_response \- Реализует обработку запросов к действиям, но без явного декоратора или указания на точку входа. +- **plba-v2-find-entrypoints-health-endpoint** + Query: Где health endpoint? + > \#\#\# Подтверждённые точки входа src/app\_runtime/control/http\_app.py \| app.post FastAPI HTTP app.post Описание: FastAPI маршрутизатор автоматически регистрирует маршруты при старте приложения, что делает эту точку старта подтвержденной. src/app\_runtime/control/http\_app.py \| app.get FastAPI HTTP app.get Описание: Аналогично предыдущему пункту, FastAPI маршрутизатор регистрирует маршруты при старте приложения, делая эту точку старта подтвержденной. \#\#\# Возможные кандидаты src/app\_runtime/health/registry.py \| HealthRegistry Описание: Класс HealthRegistry используется для регистрации и управления health\-конtributors. Сам по себе класс не является точкой входа, но может быть использован в контексте health\-endpoint'а. Требуется дополнительная проверка в коде использования данного класса. +- **plba-v2-trace-flow-runtime-start** + Query: Покажи поток выполнения при запуске RuntimeManager + > 1. Точка старта: запуск приложения, точка app.post в http\_app.py. 2. \- 2.1 \[C3\_ENTRYPOINTS\] src/app\_runtime/control/http\_app.py \| app.post → fastapi http app.post \- 2.2 \[C2\_DEPENDENCY\_GRAPH\] src/app\_runtime/core/runtime.py \| RuntimeManager.\_\_init\_\_:dataflow\_slice → RuntimeManager.\_\_init\_\_ \- 2.2.1 RuntimeManager.\_\_init\_\_ создает экземпляр класса RuntimeManager и инициализирует его атрибуты. 3. Связь между шагами подтверждена напрямую через зависимости графов \[C2\_DEPENDENCY\_GRAPH\]. 4. Разрыв или участок с неполными данными: отсутствует прямое подтверждение вызова RuntimeManager из http\_app.py → app.post. Предполагается косвенная инициализация через настройку FastAPI приложения, но прямых доказательств этого нет в предоставленных слоях. Итог: Прямое восстановление потока выполнения от точки app.post до RuntimeManager завершено. Дальнейший путь к непосредственному вызову… +- **plba-v2-trace-flow-health-endpoint** + Query: Покажи как проходит запрос /health в HttpControlAppFactory + > 1. Точка старта — вызовы \`/health\` и \`/actions/\{action\}\` через \`HttpControlAppFactory.create\`. 2. \- 2.1. HttpControlAppFactory.create → создание экземпляра FastAPI \(\`app = FastAPI\(...\)\`\) \- 2.2. Внутри FastAPI создаётся middleware для логирования времени отклика запроса \(\`@app.middleware\("http"\)\`\) \- 2.3. Добавляются маршруты: \- GET \`/health\`: вызывает функцию \`health\_provider\`, возвращает статус через JSONResponse. \- GET/POST \`/actions/\{action\}\`: проверяет доступное действие, регистрирует клиентский источник и выполняет действия типа «запуск» или «остановка». 3. Связь между шагами подтверждается непосредственно объявлением функций внутри класса \`HttpControlAppFactory\` \(источник: \[C0\_SOURCE\_CHUNKS\]\). 4. Неполные данные отсутствуют. Весь описанный путь следования потока вызова документирован на основе доступных источников. +- **plba-v2-architecture-runtime-manager** + Query: Какие компоненты участвуют в RuntimeManager? + > 1. \*\*Компоненты, которые подтверждены контекстом\*\*: \- RuntimeManager \- ControlActionSet \- ControlPlaneService 2. \*\*Подтверждённые связи между ними\*\*: \- RuntimeManager вызывает метод \`start\` для начала работы. \- ControlPlaneService инициализирует каналы \(\`\_channels\`\) и запускает асинхронную обработку \(\`\_start\_async\`\). 3. \*\*Границы ответственности, если они реально видны в коде\*\*: \- RuntimeManager отвечает за управление жизненным циклом runtime\-среды и координирует выполнение различных ролей \(название указывает на менеджерскую роль\). \- ControlActionSet выполняет действия модели, являясь стандартным модельным компонентом. \- ControlPlaneService управляет сервисными каналами и инициирует асинхронные процессы. 4. \*\*Что остаётся неизвестным или неполным\*\*: \- Детали взаимодействия между конкретными ролями и точная структура обмена данными через каналы в ControlPlaneService.… +- **plba-v2-architecture-control-plane** + Query: Какие компоненты участвуют в ControlPlaneService? + > 1. \*\*Компоненты, которые подтверждены контекстом\*\*: \- ControlPlaneService \- ControlActionSet 2. \*\*Подтверждённые связи между ними\*\*: \- ControlPlaneService имеет метод \`\_\_init\_\_\`, который включает инициализацию внутренних каналов \(\`\_channels\`\) и регистрацию этих каналов через метод \`\_register\_channel\`. \- Контейнер \`ControlActionSet\` указан как модель с ролью «model», что подразумевает его использование внутри \`ControlPlaneService\`. Однако конкретные детали взаимодействия между этими двумя компонентами отсутствуют в представленном контексте. 3. \*\*Границы ответственности, если они реально видны в коде\*\*: \- ControlPlaneService отвечает за управление состоянием и участие в данных срезах \(dataflow slices\). \- ControlActionSet является моделью с базовой ролью «model». 4. \*\*Что остаётся неизвестным или неполным\*\*: \- Детали взаимодействия между ControlPlaneService и ControlAct… +- **plba-v2-explain-nonexistent-symbol** + Query: Объясни класс RuntimeFactoryManager + > Класс \`RuntimeFactoryManager\` не найден ни в предоставленном контексте, ни в стандартных библиотеках Python. \*\*Итог:\*\* Сущность не обнаружена. Невозможно предоставить полное объяснение её работы на основе доступного контекста. Рекомендую проверить наличие класса в реальном проекте или документации к нему. Если он существует вне представленного окружения, необходимо предоставить дополнительный контекст для анализа. +- **plba-v2-open-file-nonexistent** + Query: Открой файл src/app_runtime/core/missing_runtime.py + > 1. src/app\_runtime/core/missing\_runtime.py 2. Основан только на заголовке и первой строке файла: \`\`\` from \_\_future\_\_ import annotations \`\`\` Дальнейший контент недоступен. 3. Top\-level сущности и секции недоступны для анализа. 4. Из доступного контента видно, что файл импортирует аннотации из будущего \(\_\_future\_\_\), что может указывать на потенциальное использование современных языковых возможностей Python. Однако без дополнительного контекста невозможно определить, какие части файла могут быть важны для конкретного вопроса о интерпретации слоёв RAG. \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-architecture-control-plane.json b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-architecture-control-plane.json new file mode 100644 index 0000000..81a2821 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-architecture-control-plane.json @@ -0,0 +1,2940 @@ +{ + "case_id": "plba-v2-architecture-control-plane", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "ARCHITECTURE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 25, + "llm_answer": "В подсистеме `ControlPlaneService` наблюдаются следующие компоненты и связи:\n\n1. ControlPlaneService – главный компонент службы, управляющий потоками данных и состоянием системы. Он инициализируется через метод `__init__`, создавая каналы (`_channels`) и регистрируя их с помощью метода `_register_channel`.\n \n2. ControlActionSet – модель действий управления, используемая службой для обработки команд или запросов на выполнение определённых операций. Этот компонент участвует в создании каналов и запускает асинхронную обработку.\n\nСвязи и зависимости внутри подсистемы:\n- Контейнер `ControlPlaneService` отвечает за координацию выполнения различных задач и управление каналами данных.\n- Каналы (`_channels`), создаваемые при инициализации сервиса, служат механизмами передачи данных и уведомлений между различными частями системы.\n- Запуск асинхронных задач происходит через метод `_start_async`, который активирует логику обработки поступающих запросов.\n\nГраницы ответственности явно не декларированы напрямую в коде, однако можно предположить следующее распределение обязанностей:\n- Управление жизненным циклом и состоянием сервисов;\n- Обработка входных данных и передача их по соответствующим каналам;\n- Координация взаимодействия между сервисными модулями и компонентами приложения.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "ControlPlaneService" + ], + "layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-v2-architecture-control-plane", + "text": "Какие компоненты участвуют в ControlPlaneService?", + "mode": "full_chain", + "run_started_at": "2026-03-12T14:07:09", + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Какие компоненты участвуют в ControlPlaneService?", + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "ControlPlaneService", + "alternatives": [ + "ControlPlaneService" + ], + "confidence": 0.99 + }, + "rag_count": 25, + "rag_rows": [ + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/queue/in_memory.py", + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)", + "layer": "C4_SEMANTIC_ROLES", + "title": "InMemoryTaskQueue", + "span_start": 9, + "span_end": 38, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 22, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "2da04cb94544a3bcbf0943a95ad4bdd8710bcafaa32a02fd0e4de2178dcf3533", + "symbol_name": "InMemoryTaskQueue", + "qname": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 9, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "58f0cc001ccda0eee4c6bc32ed83bd05eafd6b6644f1e8b4aa9eed3103db73dc", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "ConfigFileLoader\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (8)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ConfigFileLoader", + "span_start": 11, + "span_end": 48, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 23, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "a8474eca8b6e9dc86ae67ed68b16fa5fb639ef08739c053e7b7195489765667f", + "symbol_name": "ConfigFileLoader", + "qname": "ConfigFileLoader", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 8, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/store.py", + "content": "TraceContextStore\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "TraceContextStore", + "span_start": 15, + "span_end": 52, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b2dad4fbe16ffb11b58deba311c7739955c39d59f291b22181f33e9c8cce4059", + "symbol_name": "TraceContextStore", + "qname": "TraceContextStore", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "d369554f08fc92039c6edd5a2a1e73b23901533e8974459170bbd9347d263dc5", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workers/supervisor.py", + "content": "WorkerSupervisor\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkerSupervisor", + "span_start": 10, + "span_end": 59, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "c17b44e8d9e97d490989b21fa67d7c346cdda8a0472e4c41fb243c8846faa124", + "symbol_name": "WorkerSupervisor", + "qname": "WorkerSupervisor", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "77609d9d5927171cce7fc3a54897c183fd63068710c6362029b700937aae5eee", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowEngine", + "span_start": 10, + "span_end": 86, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "57ec0a9f11c542c78e008684a888397e8d9ef4223671acb2567e631a0cbc70b4", + "symbol_name": "WorkflowEngine", + "qname": "WorkflowEngine", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.start calls asyncio.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.start:calls", + "span_start": 22, + "span_end": 22, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "4e0b3147fb867d48d26567570c259f4052a739e3098133802d4b8bafcf03be6b", + "edge_type": "calls", + "src_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "src_qname": "ControlPlaneService.start", + "dst_symbol_id": null, + "dst_ref": "asyncio.run", + "resolution": "partial", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.register_channel reads_attr ControlPlaneService._channels", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.register_channel:reads_attr", + "span_start": 17, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3101fdc99a7a9c5aebf18a024bc148d37b348248a6fd02b95724dff280f2908a", + "edge_type": "reads_attr", + "src_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "src_qname": "ControlPlaneService.register_channel", + "dst_symbol_id": null, + "dst_ref": "ControlPlaneService._channels", + "resolution": "partial", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.start reads_attr ControlPlaneService._channels", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.start:reads_attr", + "span_start": 20, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "9452e50ef27d47c30ee1c311c48fe73ecddbf7a6dbcf967a6345e98222d9f71a", + "edge_type": "reads_attr", + "src_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "src_qname": "ControlPlaneService.start", + "dst_symbol_id": null, + "dst_ref": "ControlPlaneService._channels", + "resolution": "partial", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "class ControlPlaneService\nControlPlaneService", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "qname": "ControlPlaneService", + "kind": "class", + "signature": "ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "class ControlPlaneService:\n def __init__(self) -> None:\n self._channels: list[ControlChannel] = []\n\n def register_channel(self, channel: ControlChannel) -> None:\n self._channels.append(channel)\n\n def start(self, runtime: RuntimeManager) -> None:\n if not self._channels:\n return\n asyncio.run(self._start_async(runtime))\n\n def stop(self) -> None:\n if not self._channels:\n return\n asyncio.run(self._stop_async())\n\n def snapshot(self, runtime: RuntimeManager) -> dict[str, object]:\n health = runtime.current_health()\n return {\n \"runtime\": {\"state\": runtime._state.value},\n \"modules\": list(runtime.registry.modules),\n \"services\": runtime.services.snapshot(),\n \"workers\": runtime.workers.snapshot(),\n \"health\": runtime.health.snapshot(runtime.workers.healths()) | {\"status\": health[\"status\"]},\n \"config\": runtime.configuration.get(),\n }\n\n async def _start_async(self, runtime: RuntimeManager) -> None:\n actions = ControlActionSet(\n health=runtime.health_status,\n start=runtime.start_runtime,\n stop=runtime.stop_runtime,\n status=runtime.runtime_status,\n )\n for channel in self._channels:\n await channel.start(actions)\n\n async def _stop_async(self) -> None:\n for channel in reversed(self._channels):\n await channel.stop()", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/service.py:ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "В подсистеме `ControlPlaneService` наблюдаются следующие компоненты и связи:\n\n1. ControlPlaneService – главный компонент службы, управляющий потоками данных и состоянием системы. Он инициализируется через метод `__init__`, создавая каналы (`_channels`) и регистрируя их с помощью метода `_register_channel`.\n \n2. ControlActionSet – модель действий управления, используемая службой для обработки команд или запросов на выполнение определённых операций. Этот компонент участвует в создании каналов и запускает асинхронную обработку.\n\nСвязи и зависимости внутри подсистемы:\n- Контейнер `ControlPlaneService` отвечает за координацию выполнения различных задач и управление каналами данных.\n- Каналы (`_channels`), создаваемые при инициализации сервиса, служат механизмами передачи данных и уведомлений между различными частями системы.\n- Запуск асинхронных задач происходит через метод `_start_async`, который активирует логику обработки поступающих запросов.\n\nГраницы ответственности явно не декларированы напрямую в коде, однако можно предположить следующее распределение обязанностей:\n- Управление жизненным циклом и состоянием сервисов;\n- Обработка входных данных и передача их по соответствующим каналам;\n- Координация взаимодействия между сервисными модулями и компонентами приложения.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "ARCHITECTURE", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS", + "C4_SEMANTIC_ROLES" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "ARCHITECTURE", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "ControlPlaneService" + ], + "keyword_hints": [ + "ControlPlaneService" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C4_SEMANTIC_ROLES": 12, + "C3_ENTRYPOINTS": 8, + "C2_DEPENDENCY_GRAPH": 8, + "C1_SYMBOL_CATALOG": 6, + "C0_SOURCE_CHUNKS": 4 + }, + "filters_by_layer": { + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C4_SEMANTIC_ROLES", + "query": "Какие компоненты участвуют в ControlPlaneService?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 12, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "Какие компоненты участвуют в ControlPlaneService?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Какие компоненты участвуют в ControlPlaneService?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C1_SYMBOL_CATALOG", + "query": "ControlPlaneService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Какие компоненты участвуют в ControlPlaneService?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 4, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 12, + "candidates_after_filter": 12 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 4, + "candidates_after_filter": 4 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "ControlPlaneService", + "alternatives": [ + "ControlPlaneService" + ] + }, + "layers": [ + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 12, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 8, + "fail_reason": null + }, + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 162, + "retrieval_by_layer": { + "C4_SEMANTIC_ROLES": 34, + "C3_ENTRYPOINTS": 20, + "C2_DEPENDENCY_GRAPH": 63, + "C1_SYMBOL_CATALOG": 23, + "C0_SOURCE_CHUNKS": 19 + }, + "merge_rank": 20, + "prompt_build": 0, + "llm_call": 1981 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 558, + "evidence_rows": 25, + "evidence_chars": 3723 + }, + "evidence_summary": [ + { + "layer": "C4_SEMANTIC_ROLES", + "count": 12, + "unique_paths": 11 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 8, + "unique_paths": 1 + }, + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_architecture_ru_v3", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "ControlPlaneService" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 25, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-v2-architecture-control-plane", + "mode": "full_chain", + "run_started_at": "2026-03-12T14:07:09", + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Какие компоненты участвуют в ControlPlaneService?", + "normalized_query": "Какие компоненты участвуют в ControlPlaneService?" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Какие компоненты участвуют в ControlPlaneService?" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Какие компоненты участвуют в ControlPlaneService?" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "ARCHITECTURE", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "ControlPlaneService" + ], + "keyword_hints": [ + "ControlPlaneService" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Какие компоненты участвуют в ControlPlaneService?" + }, + "output": { + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "ControlPlaneService", + "alternatives": [ + "ControlPlaneService" + ], + "confidence": 0.99 + }, + "rag_count": 25, + "rag_rows": [ + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/queue/in_memory.py", + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)", + "layer": "C4_SEMANTIC_ROLES", + "title": "InMemoryTaskQueue", + "span_start": 9, + "span_end": 38, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 22, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "2da04cb94544a3bcbf0943a95ad4bdd8710bcafaa32a02fd0e4de2178dcf3533", + "symbol_name": "InMemoryTaskQueue", + "qname": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 9, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "58f0cc001ccda0eee4c6bc32ed83bd05eafd6b6644f1e8b4aa9eed3103db73dc", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "ConfigFileLoader\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (8)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ConfigFileLoader", + "span_start": 11, + "span_end": 48, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 23, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "a8474eca8b6e9dc86ae67ed68b16fa5fb639ef08739c053e7b7195489765667f", + "symbol_name": "ConfigFileLoader", + "qname": "ConfigFileLoader", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 8, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/store.py", + "content": "TraceContextStore\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "TraceContextStore", + "span_start": 15, + "span_end": 52, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b2dad4fbe16ffb11b58deba311c7739955c39d59f291b22181f33e9c8cce4059", + "symbol_name": "TraceContextStore", + "qname": "TraceContextStore", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "d369554f08fc92039c6edd5a2a1e73b23901533e8974459170bbd9347d263dc5", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workers/supervisor.py", + "content": "WorkerSupervisor\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkerSupervisor", + "span_start": 10, + "span_end": 59, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "c17b44e8d9e97d490989b21fa67d7c346cdda8a0472e4c41fb243c8846faa124", + "symbol_name": "WorkerSupervisor", + "qname": "WorkerSupervisor", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "77609d9d5927171cce7fc3a54897c183fd63068710c6362029b700937aae5eee", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowEngine", + "span_start": 10, + "span_end": 86, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "57ec0a9f11c542c78e008684a888397e8d9ef4223671acb2567e631a0cbc70b4", + "symbol_name": "WorkflowEngine", + "qname": "WorkflowEngine", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.start calls asyncio.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.start:calls", + "span_start": 22, + "span_end": 22, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "4e0b3147fb867d48d26567570c259f4052a739e3098133802d4b8bafcf03be6b", + "edge_type": "calls", + "src_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "src_qname": "ControlPlaneService.start", + "dst_symbol_id": null, + "dst_ref": "asyncio.run", + "resolution": "partial", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.register_channel reads_attr ControlPlaneService._channels", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.register_channel:reads_attr", + "span_start": 17, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3101fdc99a7a9c5aebf18a024bc148d37b348248a6fd02b95724dff280f2908a", + "edge_type": "reads_attr", + "src_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "src_qname": "ControlPlaneService.register_channel", + "dst_symbol_id": null, + "dst_ref": "ControlPlaneService._channels", + "resolution": "partial", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.start reads_attr ControlPlaneService._channels", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.start:reads_attr", + "span_start": 20, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "9452e50ef27d47c30ee1c311c48fe73ecddbf7a6dbcf967a6345e98222d9f71a", + "edge_type": "reads_attr", + "src_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "src_qname": "ControlPlaneService.start", + "dst_symbol_id": null, + "dst_ref": "ControlPlaneService._channels", + "resolution": "partial", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "class ControlPlaneService\nControlPlaneService", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "qname": "ControlPlaneService", + "kind": "class", + "signature": "ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "class ControlPlaneService:\n def __init__(self) -> None:\n self._channels: list[ControlChannel] = []\n\n def register_channel(self, channel: ControlChannel) -> None:\n self._channels.append(channel)\n\n def start(self, runtime: RuntimeManager) -> None:\n if not self._channels:\n return\n asyncio.run(self._start_async(runtime))\n\n def stop(self) -> None:\n if not self._channels:\n return\n asyncio.run(self._stop_async())\n\n def snapshot(self, runtime: RuntimeManager) -> dict[str, object]:\n health = runtime.current_health()\n return {\n \"runtime\": {\"state\": runtime._state.value},\n \"modules\": list(runtime.registry.modules),\n \"services\": runtime.services.snapshot(),\n \"workers\": runtime.workers.snapshot(),\n \"health\": runtime.health.snapshot(runtime.workers.healths()) | {\"status\": health[\"status\"]},\n \"config\": runtime.configuration.get(),\n }\n\n async def _start_async(self, runtime: RuntimeManager) -> None:\n actions = ControlActionSet(\n health=runtime.health_status,\n start=runtime.start_runtime,\n stop=runtime.stop_runtime,\n status=runtime.runtime_status,\n )\n for channel in self._channels:\n await channel.start(actions)\n\n async def _stop_async(self) -> None:\n for channel in reversed(self._channels):\n await channel.stop()", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/service.py:ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C4_SEMANTIC_ROLES": 12, + "C3_ENTRYPOINTS": 8, + "C2_DEPENDENCY_GRAPH": 8, + "C1_SYMBOL_CATALOG": 6, + "C0_SOURCE_CHUNKS": 4 + }, + "filters_by_layer": { + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C4_SEMANTIC_ROLES", + "query": "Какие компоненты участвуют в ControlPlaneService?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 12, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "Какие компоненты участвуют в ControlPlaneService?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Какие компоненты участвуют в ControlPlaneService?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C1_SYMBOL_CATALOG", + "query": "ControlPlaneService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Какие компоненты участвуют в ControlPlaneService?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 4, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 12, + "candidates_after_filter": 12 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 4, + "candidates_after_filter": 4 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "ControlPlaneService", + "alternatives": [ + "ControlPlaneService" + ] + }, + "layers": [ + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 12, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 8, + "fail_reason": null + }, + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 162, + "retrieval_by_layer": { + "C4_SEMANTIC_ROLES": 34, + "C3_ENTRYPOINTS": 20, + "C2_DEPENDENCY_GRAPH": 63, + "C1_SYMBOL_CATALOG": 23, + "C0_SOURCE_CHUNKS": 19 + }, + "merge_rank": 20 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Какие компоненты участвуют в ControlPlaneService?", + "rag_count": 25 + }, + "output": { + "llm_answer": "В подсистеме `ControlPlaneService` наблюдаются следующие компоненты и связи:\n\n1. ControlPlaneService – главный компонент службы, управляющий потоками данных и состоянием системы. Он инициализируется через метод `__init__`, создавая каналы (`_channels`) и регистрируя их с помощью метода `_register_channel`.\n \n2. ControlActionSet – модель действий управления, используемая службой для обработки команд или запросов на выполнение определённых операций. Этот компонент участвует в создании каналов и запускает асинхронную обработку.\n\nСвязи и зависимости внутри подсистемы:\n- Контейнер `ControlPlaneService` отвечает за координацию выполнения различных задач и управление каналами данных.\n- Каналы (`_channels`), создаваемые при инициализации сервиса, служат механизмами передачи данных и уведомлений между различными частями системы.\n- Запуск асинхронных задач происходит через метод `_start_async`, который активирует логику обработки поступающих запросов.\n\nГраницы ответственности явно не декларированы напрямую в коде, однако можно предположить следующее распределение обязанностей:\n- Управление жизненным циклом и состоянием сервисов;\n- Обработка входных данных и передача их по соответствующим каналам;\n- Координация взаимодействия между сервисными модулями и компонентами приложения." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 558, + "evidence_rows": 25, + "evidence_chars": 3723 + }, + "evidence_summary": [ + { + "layer": "C4_SEMANTIC_ROLES", + "count": 12, + "unique_paths": 11 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 8, + "unique_paths": 1 + }, + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_architecture_ru_v3", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 1981 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-architecture-control-plane.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-architecture-control-plane.md new file mode 100644 index 0000000..89d198c --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-architecture-control-plane.md @@ -0,0 +1,34 @@ +# plba-v2-architecture-control-plane + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Какие компоненты участвуют в ControlPlaneService? + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "ARCHITECTURE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 25, + "llm_answer": "В подсистеме `ControlPlaneService` наблюдаются следующие компоненты и связи:\n\n1. ControlPlaneService – главный компонент службы, управляющий потоками данных и состоянием системы. Он инициализируется через метод `__init__`, создавая каналы (`_channels`) и регистрируя их с помощью метода `_register_channel`.\n \n2. ControlActionSet – модель действий управления, используемая службой для обработки команд или запросов на выполнение определённых операций. Этот компонент участвует в создании каналов и запускает асинхронную обработку.\n\nСвязи и зависимости внутри подсистемы:\n- Контейнер `ControlPlaneService` отвечает за координацию выполнения различных задач и управление каналами данных.\n- Каналы (`_channels`), создаваемые при инициализации сервиса, служат механизмами передачи данных и уведомлений между различными частями системы.\n- Запуск асинхронных задач происходит через метод `_start_async`, который активирует логику обработки поступающих запросов.\n\nГраницы ответственности явно не декларированы напрямую в коде, однако можно предположить следующее распределение обязанностей:\n- Управление жизненным циклом и состоянием сервисов;\n- Обработка входных данных и передача их по соответствующим каналам;\n- Координация взаимодействия между сервисными модулями и компонентами приложения.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "ControlPlaneService" + ], + "layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-architecture-runtime-manager.json b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-architecture-runtime-manager.json new file mode 100644 index 0000000..6aa8829 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-architecture-runtime-manager.json @@ -0,0 +1,3036 @@ +{ + "case_id": "plba-v2-architecture-runtime-manager", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "ARCHITECTURE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 25, + "llm_answer": "В подсистеме RuntimeManager участвуют следующие компоненты и устанавливаются явные связи между ними:\n\n1. RuntimeManager – центральный управляющий компонент, ответственный за координацию работы всей системы runtime. Он управляет состоянием приложения и отвечает за выполнение ключевых операций жизненного цикла, таких как инициализация конфигурации и запуск процессов.\n - Связи: чтение и запись атрибутов состояния (через конфигурационные данные и методы start).\n\n2. ControlActionSet – модель поведения или действия, выполняемые системой управления. Этот компонент играет роль дефолтного исполнителя для различных управляющих задач.\n - Связь: используется внутри RuntimeManager при выполнении действий управления.\n\n3. ControlPlaneService – сервис, обеспечивающий взаимодействие с плоскостью контроля. Его основная задача — управление каналами коммуникации и инициирование асинхронных процессов.\n - Связь: вызывается конструктором RuntimeManager через его метод `__init__`, обеспечивая начальную настройку среды выполнения.\n\nТаким образом, RuntimeManager выступает в качестве координатора всех основных операций системы runtime, взаимодействуя с внешними сервисами через ControlActionSet и другими необходимыми компонентами для корректной настройки и запуска приложения.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-v2-architecture-runtime-manager", + "text": "Какие компоненты участвуют в RuntimeManager?", + "mode": "full_chain", + "run_started_at": "2026-03-12T14:07:09", + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Какие компоненты участвуют в RuntimeManager?", + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ], + "confidence": 0.99 + }, + "rag_count": 25, + "rag_rows": [ + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests manager\n- orchestrates role-like calls (4)\n- reads and writes state attributes\n- participates in dataflow slices (50)", + "layer": "C4_SEMANTIC_ROLES", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 43, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "symbol_name": "RuntimeManager", + "qname": "RuntimeManager", + "role": "pipeline_stage", + "confidence": 0.67, + "dataflow_participation": 50, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/queue/in_memory.py", + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)", + "layer": "C4_SEMANTIC_ROLES", + "title": "InMemoryTaskQueue", + "span_start": 9, + "span_end": 38, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 22, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "2da04cb94544a3bcbf0943a95ad4bdd8710bcafaa32a02fd0e4de2178dcf3533", + "symbol_name": "InMemoryTaskQueue", + "qname": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 9, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "58f0cc001ccda0eee4c6bc32ed83bd05eafd6b6644f1e8b4aa9eed3103db73dc", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "ConfigFileLoader\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (8)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ConfigFileLoader", + "span_start": 11, + "span_end": 48, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 23, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "a8474eca8b6e9dc86ae67ed68b16fa5fb639ef08739c053e7b7195489765667f", + "symbol_name": "ConfigFileLoader", + "qname": "ConfigFileLoader", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 8, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/store.py", + "content": "TraceContextStore\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "TraceContextStore", + "span_start": 15, + "span_end": 52, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b2dad4fbe16ffb11b58deba311c7739955c39d59f291b22181f33e9c8cce4059", + "symbol_name": "TraceContextStore", + "qname": "TraceContextStore", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "d369554f08fc92039c6edd5a2a1e73b23901533e8974459170bbd9347d263dc5", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workers/supervisor.py", + "content": "WorkerSupervisor\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkerSupervisor", + "span_start": 10, + "span_end": 59, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "c17b44e8d9e97d490989b21fa67d7c346cdda8a0472e4c41fb243c8846faa124", + "symbol_name": "WorkerSupervisor", + "qname": "WorkerSupervisor", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "77609d9d5927171cce7fc3a54897c183fd63068710c6362029b700937aae5eee", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 59, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1", + "dst_ref": "RuntimeManager.start", + "resolution": "resolved", + "slice_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.start" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 52, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager._register_core_services", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 127, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6", + "dst_ref": "RuntimeManager._register_core_services", + "resolution": "resolved", + "slice_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager._register_core_services" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager\nRuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "qname": "RuntimeManager", + "kind": "class", + "signature": "RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "В подсистеме RuntimeManager участвуют следующие компоненты и устанавливаются явные связи между ними:\n\n1. RuntimeManager – центральный управляющий компонент, ответственный за координацию работы всей системы runtime. Он управляет состоянием приложения и отвечает за выполнение ключевых операций жизненного цикла, таких как инициализация конфигурации и запуск процессов.\n - Связи: чтение и запись атрибутов состояния (через конфигурационные данные и методы start).\n\n2. ControlActionSet – модель поведения или действия, выполняемые системой управления. Этот компонент играет роль дефолтного исполнителя для различных управляющих задач.\n - Связь: используется внутри RuntimeManager при выполнении действий управления.\n\n3. ControlPlaneService – сервис, обеспечивающий взаимодействие с плоскостью контроля. Его основная задача — управление каналами коммуникации и инициирование асинхронных процессов.\n - Связь: вызывается конструктором RuntimeManager через его метод `__init__`, обеспечивая начальную настройку среды выполнения.\n\nТаким образом, RuntimeManager выступает в качестве координатора всех основных операций системы runtime, взаимодействуя с внешними сервисами через ControlActionSet и другими необходимыми компонентами для корректной настройки и запуска приложения.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "ARCHITECTURE", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS", + "C4_SEMANTIC_ROLES" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "ARCHITECTURE", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C4_SEMANTIC_ROLES": 12, + "C3_ENTRYPOINTS": 8, + "C2_DEPENDENCY_GRAPH": 8, + "C1_SYMBOL_CATALOG": 6, + "C0_SOURCE_CHUNKS": 4 + }, + "filters_by_layer": { + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C4_SEMANTIC_ROLES", + "query": "Какие компоненты участвуют в RuntimeManager?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 12, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "Какие компоненты участвуют в RuntimeManager?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Какие компоненты участвуют в RuntimeManager?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C1_SYMBOL_CATALOG", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Какие компоненты участвуют в RuntimeManager?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 4, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 12, + "candidates_after_filter": 12 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 4, + "candidates_after_filter": 4 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ] + }, + "layers": [ + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 12, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 8, + "fail_reason": null + }, + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 145, + "retrieval_by_layer": { + "C4_SEMANTIC_ROLES": 24, + "C3_ENTRYPOINTS": 17, + "C2_DEPENDENCY_GRAPH": 60, + "C1_SYMBOL_CATALOG": 24, + "C0_SOURCE_CHUNKS": 17 + }, + "merge_rank": 23, + "prompt_build": 0, + "llm_call": 1932 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 550, + "evidence_rows": 25, + "evidence_chars": 8651 + }, + "evidence_summary": [ + { + "layer": "C4_SEMANTIC_ROLES", + "count": 12, + "unique_paths": 11 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 8, + "unique_paths": 2 + }, + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_architecture_ru_v3", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "RuntimeManager" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 25, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-v2-architecture-runtime-manager", + "mode": "full_chain", + "run_started_at": "2026-03-12T14:07:09", + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Какие компоненты участвуют в RuntimeManager?", + "normalized_query": "Какие компоненты участвуют в RuntimeManager?" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Какие компоненты участвуют в RuntimeManager?" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Какие компоненты участвуют в RuntimeManager?" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "ARCHITECTURE", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Какие компоненты участвуют в RuntimeManager?" + }, + "output": { + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ], + "confidence": 0.99 + }, + "rag_count": 25, + "rag_rows": [ + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests manager\n- orchestrates role-like calls (4)\n- reads and writes state attributes\n- participates in dataflow slices (50)", + "layer": "C4_SEMANTIC_ROLES", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 43, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "symbol_name": "RuntimeManager", + "qname": "RuntimeManager", + "role": "pipeline_stage", + "confidence": 0.67, + "dataflow_participation": 50, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/queue/in_memory.py", + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)", + "layer": "C4_SEMANTIC_ROLES", + "title": "InMemoryTaskQueue", + "span_start": 9, + "span_end": 38, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 22, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "2da04cb94544a3bcbf0943a95ad4bdd8710bcafaa32a02fd0e4de2178dcf3533", + "symbol_name": "InMemoryTaskQueue", + "qname": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 9, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "58f0cc001ccda0eee4c6bc32ed83bd05eafd6b6644f1e8b4aa9eed3103db73dc", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "ConfigFileLoader\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (8)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ConfigFileLoader", + "span_start": 11, + "span_end": 48, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 23, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "a8474eca8b6e9dc86ae67ed68b16fa5fb639ef08739c053e7b7195489765667f", + "symbol_name": "ConfigFileLoader", + "qname": "ConfigFileLoader", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 8, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/store.py", + "content": "TraceContextStore\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "TraceContextStore", + "span_start": 15, + "span_end": 52, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b2dad4fbe16ffb11b58deba311c7739955c39d59f291b22181f33e9c8cce4059", + "symbol_name": "TraceContextStore", + "qname": "TraceContextStore", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "d369554f08fc92039c6edd5a2a1e73b23901533e8974459170bbd9347d263dc5", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workers/supervisor.py", + "content": "WorkerSupervisor\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkerSupervisor", + "span_start": 10, + "span_end": 59, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "c17b44e8d9e97d490989b21fa67d7c346cdda8a0472e4c41fb243c8846faa124", + "symbol_name": "WorkerSupervisor", + "qname": "WorkerSupervisor", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "77609d9d5927171cce7fc3a54897c183fd63068710c6362029b700937aae5eee", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 59, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1", + "dst_ref": "RuntimeManager.start", + "resolution": "resolved", + "slice_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.start" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 52, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager._register_core_services", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 127, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6", + "dst_ref": "RuntimeManager._register_core_services", + "resolution": "resolved", + "slice_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager._register_core_services" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager\nRuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "qname": "RuntimeManager", + "kind": "class", + "signature": "RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C4_SEMANTIC_ROLES": 12, + "C3_ENTRYPOINTS": 8, + "C2_DEPENDENCY_GRAPH": 8, + "C1_SYMBOL_CATALOG": 6, + "C0_SOURCE_CHUNKS": 4 + }, + "filters_by_layer": { + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C4_SEMANTIC_ROLES", + "query": "Какие компоненты участвуют в RuntimeManager?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 12, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "Какие компоненты участвуют в RuntimeManager?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Какие компоненты участвуют в RuntimeManager?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C1_SYMBOL_CATALOG", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Какие компоненты участвуют в RuntimeManager?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 4, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 12, + "candidates_after_filter": 12 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 4, + "candidates_after_filter": 4 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ] + }, + "layers": [ + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 12, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 8, + "fail_reason": null + }, + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 145, + "retrieval_by_layer": { + "C4_SEMANTIC_ROLES": 24, + "C3_ENTRYPOINTS": 17, + "C2_DEPENDENCY_GRAPH": 60, + "C1_SYMBOL_CATALOG": 24, + "C0_SOURCE_CHUNKS": 17 + }, + "merge_rank": 23 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Какие компоненты участвуют в RuntimeManager?", + "rag_count": 25 + }, + "output": { + "llm_answer": "В подсистеме RuntimeManager участвуют следующие компоненты и устанавливаются явные связи между ними:\n\n1. RuntimeManager – центральный управляющий компонент, ответственный за координацию работы всей системы runtime. Он управляет состоянием приложения и отвечает за выполнение ключевых операций жизненного цикла, таких как инициализация конфигурации и запуск процессов.\n - Связи: чтение и запись атрибутов состояния (через конфигурационные данные и методы start).\n\n2. ControlActionSet – модель поведения или действия, выполняемые системой управления. Этот компонент играет роль дефолтного исполнителя для различных управляющих задач.\n - Связь: используется внутри RuntimeManager при выполнении действий управления.\n\n3. ControlPlaneService – сервис, обеспечивающий взаимодействие с плоскостью контроля. Его основная задача — управление каналами коммуникации и инициирование асинхронных процессов.\n - Связь: вызывается конструктором RuntimeManager через его метод `__init__`, обеспечивая начальную настройку среды выполнения.\n\nТаким образом, RuntimeManager выступает в качестве координатора всех основных операций системы runtime, взаимодействуя с внешними сервисами через ControlActionSet и другими необходимыми компонентами для корректной настройки и запуска приложения." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 550, + "evidence_rows": 25, + "evidence_chars": 8651 + }, + "evidence_summary": [ + { + "layer": "C4_SEMANTIC_ROLES", + "count": 12, + "unique_paths": 11 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 8, + "unique_paths": 2 + }, + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_architecture_ru_v3", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 1932 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-architecture-runtime-manager.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-architecture-runtime-manager.md new file mode 100644 index 0000000..3e60d2e --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-architecture-runtime-manager.md @@ -0,0 +1,34 @@ +# plba-v2-architecture-runtime-manager + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Какие компоненты участвуют в RuntimeManager? + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "ARCHITECTURE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 25, + "llm_answer": "В подсистеме RuntimeManager участвуют следующие компоненты и устанавливаются явные связи между ними:\n\n1. RuntimeManager – центральный управляющий компонент, ответственный за координацию работы всей системы runtime. Он управляет состоянием приложения и отвечает за выполнение ключевых операций жизненного цикла, таких как инициализация конфигурации и запуск процессов.\n - Связи: чтение и запись атрибутов состояния (через конфигурационные данные и методы start).\n\n2. ControlActionSet – модель поведения или действия, выполняемые системой управления. Этот компонент играет роль дефолтного исполнителя для различных управляющих задач.\n - Связь: используется внутри RuntimeManager при выполнении действий управления.\n\n3. ControlPlaneService – сервис, обеспечивающий взаимодействие с плоскостью контроля. Его основная задача — управление каналами коммуникации и инициирование асинхронных процессов.\n - Связь: вызывается конструктором RuntimeManager через его метод `__init__`, обеспечивая начальную настройку среды выполнения.\n\nТаким образом, RuntimeManager выступает в качестве координатора всех основных операций системы runtime, взаимодействуя с внешними сервисами через ControlActionSet и другими необходимыми компонентами для корректной настройки и запуска приложения.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-explain-create-runtime.json b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-explain-create-runtime.json new file mode 100644 index 0000000..3855c1e --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-explain-create-runtime.json @@ -0,0 +1,1896 @@ +{ + "case_id": "plba-v2-explain-create-runtime", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 12, + "llm_answer": "Функция `create_runtime` находится в файле `src/plba/bootstrap.py`. Её задача – инициализировать объект типа `RuntimeManager`.\n\nРеальные шаги её работы выглядят так:\n1. Создаётся пустой экземпляр объекта `RuntimeManager`.\n2. Если передан параметр `config_path`, то вызовом метода `add_config_file` загружается конфигурационный файл.\n3. При включённой опции `enable_http_control` создаётся канал управления через HTTP (`HttpControlChannel`) и регистрируется в объекте `runtime.control_plane`.\n4. Регистрируется переданный модуль приложения при помощи вызова метода `register_module`.\n\nНа основании представленного контекста можно уверенно утверждать, что функция выполняет основные действия по настройке и регистрации конфигурации и модуля приложения в объекте менеджера выполнения задач (`RuntimeManager`). Косвенные признаки указывают на возможное использование этого объекта для координации выполнения различных компонентов системы.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "create_runtime" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-v2-explain-create-runtime", + "text": "Что делает функция create_runtime?", + "mode": "full_chain", + "run_started_at": "2026-03-12T14:07:09", + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Что делает функция create_runtime?", + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "create_runtime", + "alternatives": [ + "create_runtime" + ], + "confidence": 0.99 + }, + "rag_count": 12, + "rag_rows": [ + { + "path": "src/plba/bootstrap.py", + "content": "function create_runtime\ncreate_runtime(module)", + "layer": "C1_SYMBOL_CATALOG", + "title": "create_runtime", + "span_start": 8, + "span_end": 29, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "qname": "create_runtime", + "kind": "function", + "signature": "create_runtime(module)", + "parent_symbol_id": null, + "package_or_module": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime calls runtime.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:calls", + "span_start": 19, + "span_end": 19, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "4eaeec4ac55a59d5f66fd01c4754955f8fedaf4bc3df13fa769b352c7bfaacbb", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.add_config_file", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime reads_attr runtime.register_module", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:reads_attr", + "span_start": 28, + "span_end": 28, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "45516c79ff358dbf9b650a081668df0f66d2fe989300f985a1a78be6be166f8f", + "edge_type": "reads_attr", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.register_module", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:instantiates", + "span_start": 17, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "0adba17984f850ea1608c9e734d2dd5c325cfde3a8133123aa239e44935ad18e", + "edge_type": "instantiates", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": "27158ca220022eeb5083c6addf8a50775d45f7161284fd60aac48410105f4b98", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime calls runtime.register_module", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:calls", + "span_start": 28, + "span_end": 28, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "ab6003c3441addc1ba1b81edeca009165559f652f6b2cf424e5ae61b1f617de8", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.register_module", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime calls runtime.control_plane.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:calls", + "span_start": 21, + "span_end": 27, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "2678250030b9ce47a3b3b55fac7897ac530367edc8374ac9d5e6ecafb1e483f0", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.control_plane.register_channel", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime reads_attr runtime.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:reads_attr", + "span_start": 19, + "span_end": 19, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "30d4e8aae984ab84d523e80d02f1caeda52d547fa3d2aa47be8845931cabbca2", + "edge_type": "reads_attr", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.add_config_file", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "def create_runtime(\n module: ApplicationModule,\n *,\n config_path: str | None = None,\n enable_http_control: bool = False,\n control_host: str = \"127.0.0.1\",\n control_port: int = 8080,\n control_timeout: int = 5,\n) -> RuntimeManager:\n runtime = RuntimeManager()\n if config_path is not None:\n runtime.add_config_file(config_path)\n if enable_http_control:\n runtime.control_plane.register_channel(\n HttpControlChannel(\n host=control_host,\n port=control_port,\n timeout=control_timeout,\n )\n )\n runtime.register_module(module)\n return runtime", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/bootstrap.py:create_runtime", + "span_start": 8, + "span_end": 29, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "Функция `create_runtime` находится в файле `src/plba/bootstrap.py`. Её задача – инициализировать объект типа `RuntimeManager`.\n\nРеальные шаги её работы выглядят так:\n1. Создаётся пустой экземпляр объекта `RuntimeManager`.\n2. Если передан параметр `config_path`, то вызовом метода `add_config_file` загружается конфигурационный файл.\n3. При включённой опции `enable_http_control` создаётся канал управления через HTTP (`HttpControlChannel`) и регистрируется в объекте `runtime.control_plane`.\n4. Регистрируется переданный модуль приложения при помощи вызова метода `register_module`.\n\nНа основании представленного контекста можно уверенно утверждать, что функция выполняет основные действия по настройке и регистрации конфигурации и модуля приложения в объекте менеджера выполнения задач (`RuntimeManager`). Косвенные признаки указывают на возможное использование этого объекта для координации выполнения различных компонентов системы.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS", + "C4_SEMANTIC_ROLES" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "function", + "symbol_candidates": [ + "create_runtime" + ], + "keyword_hints": [ + "create_runtime" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "create_runtime", + "alternatives": [ + "create_runtime" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 125, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 32, + "C0_SOURCE_CHUNKS": 17, + "C4_SEMANTIC_ROLES": 18, + "C2_DEPENDENCY_GRAPH": 45, + "C3_ENTRYPOINTS": 11 + }, + "merge_rank": 19, + "prompt_build": 0, + "llm_call": 1578 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 667, + "evidence_rows": 12, + "evidence_chars": 1184 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 1 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_explain_ru_v3", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "create_runtime" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 12, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-v2-explain-create-runtime", + "mode": "full_chain", + "run_started_at": "2026-03-12T14:07:09", + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Что делает функция create_runtime?", + "normalized_query": "Что делает функция create_runtime?" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Что делает функция create_runtime?" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Что делает функция create_runtime?" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "function", + "symbol_candidates": [ + "create_runtime" + ], + "keyword_hints": [ + "create_runtime" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Что делает функция create_runtime?" + }, + "output": { + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "create_runtime", + "alternatives": [ + "create_runtime" + ], + "confidence": 0.99 + }, + "rag_count": 12, + "rag_rows": [ + { + "path": "src/plba/bootstrap.py", + "content": "function create_runtime\ncreate_runtime(module)", + "layer": "C1_SYMBOL_CATALOG", + "title": "create_runtime", + "span_start": 8, + "span_end": 29, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "qname": "create_runtime", + "kind": "function", + "signature": "create_runtime(module)", + "parent_symbol_id": null, + "package_or_module": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime calls runtime.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:calls", + "span_start": 19, + "span_end": 19, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "4eaeec4ac55a59d5f66fd01c4754955f8fedaf4bc3df13fa769b352c7bfaacbb", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.add_config_file", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime reads_attr runtime.register_module", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:reads_attr", + "span_start": 28, + "span_end": 28, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "45516c79ff358dbf9b650a081668df0f66d2fe989300f985a1a78be6be166f8f", + "edge_type": "reads_attr", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.register_module", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:instantiates", + "span_start": 17, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "0adba17984f850ea1608c9e734d2dd5c325cfde3a8133123aa239e44935ad18e", + "edge_type": "instantiates", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": "27158ca220022eeb5083c6addf8a50775d45f7161284fd60aac48410105f4b98", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime calls runtime.register_module", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:calls", + "span_start": 28, + "span_end": 28, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "ab6003c3441addc1ba1b81edeca009165559f652f6b2cf424e5ae61b1f617de8", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.register_module", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime calls runtime.control_plane.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:calls", + "span_start": 21, + "span_end": 27, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "2678250030b9ce47a3b3b55fac7897ac530367edc8374ac9d5e6ecafb1e483f0", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.control_plane.register_channel", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime reads_attr runtime.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:reads_attr", + "span_start": 19, + "span_end": 19, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "30d4e8aae984ab84d523e80d02f1caeda52d547fa3d2aa47be8845931cabbca2", + "edge_type": "reads_attr", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.add_config_file", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "def create_runtime(\n module: ApplicationModule,\n *,\n config_path: str | None = None,\n enable_http_control: bool = False,\n control_host: str = \"127.0.0.1\",\n control_port: int = 8080,\n control_timeout: int = 5,\n) -> RuntimeManager:\n runtime = RuntimeManager()\n if config_path is not None:\n runtime.add_config_file(config_path)\n if enable_http_control:\n runtime.control_plane.register_channel(\n HttpControlChannel(\n host=control_host,\n port=control_port,\n timeout=control_timeout,\n )\n )\n runtime.register_module(module)\n return runtime", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/bootstrap.py:create_runtime", + "span_start": 8, + "span_end": 29, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "create_runtime", + "alternatives": [ + "create_runtime" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 125, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 32, + "C0_SOURCE_CHUNKS": 17, + "C4_SEMANTIC_ROLES": 18, + "C2_DEPENDENCY_GRAPH": 45, + "C3_ENTRYPOINTS": 11 + }, + "merge_rank": 19 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Что делает функция create_runtime?", + "rag_count": 12 + }, + "output": { + "llm_answer": "Функция `create_runtime` находится в файле `src/plba/bootstrap.py`. Её задача – инициализировать объект типа `RuntimeManager`.\n\nРеальные шаги её работы выглядят так:\n1. Создаётся пустой экземпляр объекта `RuntimeManager`.\n2. Если передан параметр `config_path`, то вызовом метода `add_config_file` загружается конфигурационный файл.\n3. При включённой опции `enable_http_control` создаётся канал управления через HTTP (`HttpControlChannel`) и регистрируется в объекте `runtime.control_plane`.\n4. Регистрируется переданный модуль приложения при помощи вызова метода `register_module`.\n\nНа основании представленного контекста можно уверенно утверждать, что функция выполняет основные действия по настройке и регистрации конфигурации и модуля приложения в объекте менеджера выполнения задач (`RuntimeManager`). Косвенные признаки указывают на возможное использование этого объекта для координации выполнения различных компонентов системы." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 667, + "evidence_rows": 12, + "evidence_chars": 1184 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 1 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_explain_ru_v3", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 1578 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-explain-create-runtime.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-explain-create-runtime.md new file mode 100644 index 0000000..e21f672 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-explain-create-runtime.md @@ -0,0 +1,34 @@ +# plba-v2-explain-create-runtime + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Что делает функция create_runtime? + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 12, + "llm_answer": "Функция `create_runtime` находится в файле `src/plba/bootstrap.py`. Её задача – инициализировать объект типа `RuntimeManager`.\n\nРеальные шаги её работы выглядят так:\n1. Создаётся пустой экземпляр объекта `RuntimeManager`.\n2. Если передан параметр `config_path`, то вызовом метода `add_config_file` загружается конфигурационный файл.\n3. При включённой опции `enable_http_control` создаётся канал управления через HTTP (`HttpControlChannel`) и регистрируется в объекте `runtime.control_plane`.\n4. Регистрируется переданный модуль приложения при помощи вызова метода `register_module`.\n\nНа основании представленного контекста можно уверенно утверждать, что функция выполняет основные действия по настройке и регистрации конфигурации и модуля приложения в объекте менеджера выполнения задач (`RuntimeManager`). Косвенные признаки указывают на возможное использование этого объекта для координации выполнения различных компонентов системы.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "create_runtime" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-explain-local-http-channel.json b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-explain-local-http-channel.json new file mode 100644 index 0000000..35fef0d --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-explain-local-http-channel.json @@ -0,0 +1,1333 @@ +{ + "case_id": "plba-v2-explain-local-http-channel", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN_LOCAL", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 6, + "llm_answer": "Класс `HttpControlChannel` из файла `http_channel.py` реализует механизм управления HTTP-каналами для взаимодействия с внешним миром приложения.\nЧто он делает:\n- При инициализации класса (`__init__`) создается объект `_runner`, управляющий сервером uvicorn (это веб-сервер на Python), и устанавливается таймаут соединения через параметр `timeout`.\n- Метод `start(actions)` запускает веб-приложение, передавая обработчики запросов на здоровье системы и выполнение действий (`_health_response` и `_action_response`), а также конфигурирует набор доступных команд (`actions`).\n- Метод `stop()` останавливает работу сервера.\n- Методы `_health_response` и `_action_response` возвращают ответы на запросы о состоянии системы и запросах на выполнение конкретных действий соответственно.\nВходные данные:\n- Параметры при создании объекта: строка `host`, целое число `port`, целое число `timeout`.\n- Набор действий (`actions`) передается через метод `start()`.\nВыходные данные:\n- Возвращаются асинхронно ответы на запросы состояния и выполнения действий.\n\nТаким образом, основная задача класса — предоставить интерфейс для работы с внешними клиентами через HTTP-запросы, обеспечивая возможность мониторинга состояния приложения и выполнения внешних операций.", + "answer_mode": "answered", + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "symbol_candidates": [ + "HttpControlChannel" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C2_DEPENDENCY_GRAPH" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-v2-explain-local-http-channel", + "text": "Почему в файле src/app_runtime/control/http_channel.py класс HttpControlChannel устроен так?", + "mode": "full_chain", + "run_started_at": "2026-03-12T14:07:09", + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Почему в файле src/app_runtime/control/http_channel.py класс HttpControlChannel устроен так?", + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "HttpControlChannel", + "alternatives": [ + "HttpControlChannel" + ], + "confidence": 0.99 + }, + "rag_count": 6, + "rag_rows": [ + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel\nHttpControlChannel(ControlChannel)", + "layer": "C1_SYMBOL_CATALOG", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "qname": "HttpControlChannel", + "kind": "class", + "signature": "HttpControlChannel(ControlChannel)", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._timeout\n -> HttpControlChannel._action_response", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "c3ef21fcae96c82c00be74b3ab827d4af2085d89cb3fa5521c19a174aad84dbb", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "e64969024ccaeb34d8d91473fad07b3b3d341875846392e7a006406c7ada1954", + "dst_ref": "HttpControlChannel._action_response", + "resolution": "resolved", + "slice_id": "c3ef21fcae96c82c00be74b3ab827d4af2085d89cb3fa5521c19a174aad84dbb", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._timeout", + "HttpControlChannel._action_response" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "e64969024ccaeb34d8d91473fad07b3b3d341875846392e7a006406c7ada1954" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._runner\n -> HttpControlChannel.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 15, + "span_end": 22, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "51d73913df709152258ed1b9a8c8f4eb3c575eccfe6b982aef0b28e0789a29da", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0", + "dst_ref": "HttpControlChannel.start", + "resolution": "resolved", + "slice_id": "51d73913df709152258ed1b9a8c8f4eb3c575eccfe6b982aef0b28e0789a29da", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._runner", + "HttpControlChannel.start" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._timeout\n -> HttpControlChannel._health_response", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 14, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "f858f5c9e575f6c4cdfe3853571b7ee21d1f628a443541d2037c3dc9d0790bef", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "e84bf04e9cd2127df235b7064d05f47e19f19a89c7c82f4c247231d4e8fa426a", + "dst_ref": "HttpControlChannel._health_response", + "resolution": "resolved", + "slice_id": "f858f5c9e575f6c4cdfe3853571b7ee21d1f628a443541d2037c3dc9d0790bef", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._timeout", + "HttpControlChannel._health_response" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "e84bf04e9cd2127df235b7064d05f47e19f19a89c7c82f4c247231d4e8fa426a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._runner\n -> HttpControlChannel.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 15, + "span_end": 25, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "0f827ef81a990258a8a74381c8564a8361afa6712dba3200592659c939adcb9d", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "f29ab212620093d72be20e26c5a399624c7939a6056a728762ed3f84a250bfa3", + "dst_ref": "HttpControlChannel.stop", + "resolution": "resolved", + "slice_id": "0f827ef81a990258a8a74381c8564a8361afa6712dba3200592659c939adcb9d", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._runner", + "HttpControlChannel.stop" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "f29ab212620093d72be20e26c5a399624c7939a6056a728762ed3f84a250bfa3" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel(ControlChannel):\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._timeout = timeout\n self._runner = UvicornThreadRunner(host, port, timeout)\n self._factory = HttpControlAppFactory()\n self._actions: ControlActionSet | None = None\n\n async def start(self, actions: ControlActionSet) -> None:\n self._actions = actions\n app = self._factory.create(self._health_response, self._action_response)\n await self._runner.start(app)\n\n async def stop(self) -> None:\n await self._runner.stop()\n\n @property\n def port(self) -> int:\n return self._runner.port\n\n async def _health_response(self) -> dict[str, object]:\n if self._actions is None:\n return {\"status\": \"unhealthy\", \"detail\": \"control actions are not configured\"}\n return await asyncio.wait_for(self._actions.health(), timeout=float(self._timeout))\n\n async def _action_response(self, action: str, _client_source: str = \"unknown\") -> JSONResponse:\n if self._actions is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"{action} handler is not configured\"}, status_code=404)\n callbacks = {\n \"start\": self._actions.start,\n \"stop\": self._actions.stop,\n \"status\": self._actions.status,\n }\n callback = callbacks.get(action)\n if callback is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"unsupported action: {action}\"}, status_code=404)\n action_timeout = max(float(self._timeout), 10.0) if action in {\"start\", \"stop\"} else float(self._timeout)\n try:\n detail = await asyncio.wait_for(callback(), timeout=action_timeout)\n except asyncio.TimeoutError:\n return JSONResponse(\n content={\"status\": \"accepted\", \"detail\": f\"{action} operation is still in progress\"},\n status_code=202,\n )\n except Exception as exc:\n return JSONResponse(content={\"status\": \"error\", \"detail\": str(exc)}, status_code=500)\n return JSONResponse(content={\"status\": \"ok\", \"detail\": detail or f\"{action} action accepted\"}, status_code=200)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_channel.py:HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "Класс `HttpControlChannel` из файла `http_channel.py` реализует механизм управления HTTP-каналами для взаимодействия с внешним миром приложения.\nЧто он делает:\n- При инициализации класса (`__init__`) создается объект `_runner`, управляющий сервером uvicorn (это веб-сервер на Python), и устанавливается таймаут соединения через параметр `timeout`.\n- Метод `start(actions)` запускает веб-приложение, передавая обработчики запросов на здоровье системы и выполнение действий (`_health_response` и `_action_response`), а также конфигурирует набор доступных команд (`actions`).\n- Метод `stop()` останавливает работу сервера.\n- Методы `_health_response` и `_action_response` возвращают ответы на запросы о состоянии системы и запросах на выполнение конкретных действий соответственно.\nВходные данные:\n- Параметры при создании объекта: строка `host`, целое число `port`, целое число `timeout`.\n- Набор действий (`actions`) передается через метод `start()`.\nВыходные данные:\n- Возвращаются асинхронно ответы на запросы состояния и выполнения действий.\n\nТаким образом, основная задача класса — предоставить интерфейс для работы с внешними клиентами через HTTP-запросы, обеспечивая возможность мониторинга состояния приложения и выполнения внешних операций.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN_LOCAL", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN_LOCAL", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C2_DEPENDENCY_GRAPH" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "HttpControlChannel" + ], + "keyword_hints": [ + "src/app_runtime/control/http_channel.py", + "HttpControlChannel" + ], + "path_hints": [ + "src/app_runtime/control/http_channel.py" + ], + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C2_DEPENDENCY_GRAPH" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 12, + "C2_DEPENDENCY_GRAPH": 4 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "HttpControlChannel", + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Почему в файле src/app_runtime/control/http_channel.py класс HttpControlChannel устроен так?", + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 12, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Почему в файле src/app_runtime/control/http_channel.py класс HttpControlChannel устроен так?", + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 4, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 4, + "candidates_after_filter": 4 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "HttpControlChannel", + "alternatives": [ + "HttpControlChannel" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 4, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 70, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 33, + "C0_SOURCE_CHUNKS": 18, + "C2_DEPENDENCY_GRAPH": 17 + }, + "merge_rank": 37, + "prompt_build": 0, + "llm_call": 2085 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 877, + "evidence_rows": 6, + "evidence_chars": 2660 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 4, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_explain_local_ru_v3", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "src/app_runtime/control/http_channel.py", + "HttpControlChannel" + ], + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ] + }, + "llm": { + "used_evidence_count": 6, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-v2-explain-local-http-channel", + "mode": "full_chain", + "run_started_at": "2026-03-12T14:07:09", + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Почему в файле src/app_runtime/control/http_channel.py класс HttpControlChannel устроен так?", + "normalized_query": "Почему в файле src/app_runtime/control/http_channel.py класс HttpControlChannel устроен так?" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Почему в файле src/app_runtime/control/http_channel.py класс HttpControlChannel устроен так?" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Почему в файле src/app_runtime/control/http_channel.py класс HttpControlChannel устроен так?" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN_LOCAL", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C2_DEPENDENCY_GRAPH" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "HttpControlChannel" + ], + "keyword_hints": [ + "src/app_runtime/control/http_channel.py", + "HttpControlChannel" + ], + "path_hints": [ + "src/app_runtime/control/http_channel.py" + ], + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Почему в файле src/app_runtime/control/http_channel.py класс HttpControlChannel устроен так?" + }, + "output": { + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "HttpControlChannel", + "alternatives": [ + "HttpControlChannel" + ], + "confidence": 0.99 + }, + "rag_count": 6, + "rag_rows": [ + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel\nHttpControlChannel(ControlChannel)", + "layer": "C1_SYMBOL_CATALOG", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "qname": "HttpControlChannel", + "kind": "class", + "signature": "HttpControlChannel(ControlChannel)", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._timeout\n -> HttpControlChannel._action_response", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "c3ef21fcae96c82c00be74b3ab827d4af2085d89cb3fa5521c19a174aad84dbb", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "e64969024ccaeb34d8d91473fad07b3b3d341875846392e7a006406c7ada1954", + "dst_ref": "HttpControlChannel._action_response", + "resolution": "resolved", + "slice_id": "c3ef21fcae96c82c00be74b3ab827d4af2085d89cb3fa5521c19a174aad84dbb", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._timeout", + "HttpControlChannel._action_response" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "e64969024ccaeb34d8d91473fad07b3b3d341875846392e7a006406c7ada1954" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._runner\n -> HttpControlChannel.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 15, + "span_end": 22, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "51d73913df709152258ed1b9a8c8f4eb3c575eccfe6b982aef0b28e0789a29da", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0", + "dst_ref": "HttpControlChannel.start", + "resolution": "resolved", + "slice_id": "51d73913df709152258ed1b9a8c8f4eb3c575eccfe6b982aef0b28e0789a29da", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._runner", + "HttpControlChannel.start" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._timeout\n -> HttpControlChannel._health_response", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 14, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "f858f5c9e575f6c4cdfe3853571b7ee21d1f628a443541d2037c3dc9d0790bef", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "e84bf04e9cd2127df235b7064d05f47e19f19a89c7c82f4c247231d4e8fa426a", + "dst_ref": "HttpControlChannel._health_response", + "resolution": "resolved", + "slice_id": "f858f5c9e575f6c4cdfe3853571b7ee21d1f628a443541d2037c3dc9d0790bef", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._timeout", + "HttpControlChannel._health_response" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "e84bf04e9cd2127df235b7064d05f47e19f19a89c7c82f4c247231d4e8fa426a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._runner\n -> HttpControlChannel.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 15, + "span_end": 25, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "0f827ef81a990258a8a74381c8564a8361afa6712dba3200592659c939adcb9d", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "f29ab212620093d72be20e26c5a399624c7939a6056a728762ed3f84a250bfa3", + "dst_ref": "HttpControlChannel.stop", + "resolution": "resolved", + "slice_id": "0f827ef81a990258a8a74381c8564a8361afa6712dba3200592659c939adcb9d", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._runner", + "HttpControlChannel.stop" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "f29ab212620093d72be20e26c5a399624c7939a6056a728762ed3f84a250bfa3" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel(ControlChannel):\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._timeout = timeout\n self._runner = UvicornThreadRunner(host, port, timeout)\n self._factory = HttpControlAppFactory()\n self._actions: ControlActionSet | None = None\n\n async def start(self, actions: ControlActionSet) -> None:\n self._actions = actions\n app = self._factory.create(self._health_response, self._action_response)\n await self._runner.start(app)\n\n async def stop(self) -> None:\n await self._runner.stop()\n\n @property\n def port(self) -> int:\n return self._runner.port\n\n async def _health_response(self) -> dict[str, object]:\n if self._actions is None:\n return {\"status\": \"unhealthy\", \"detail\": \"control actions are not configured\"}\n return await asyncio.wait_for(self._actions.health(), timeout=float(self._timeout))\n\n async def _action_response(self, action: str, _client_source: str = \"unknown\") -> JSONResponse:\n if self._actions is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"{action} handler is not configured\"}, status_code=404)\n callbacks = {\n \"start\": self._actions.start,\n \"stop\": self._actions.stop,\n \"status\": self._actions.status,\n }\n callback = callbacks.get(action)\n if callback is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"unsupported action: {action}\"}, status_code=404)\n action_timeout = max(float(self._timeout), 10.0) if action in {\"start\", \"stop\"} else float(self._timeout)\n try:\n detail = await asyncio.wait_for(callback(), timeout=action_timeout)\n except asyncio.TimeoutError:\n return JSONResponse(\n content={\"status\": \"accepted\", \"detail\": f\"{action} operation is still in progress\"},\n status_code=202,\n )\n except Exception as exc:\n return JSONResponse(content={\"status\": \"error\", \"detail\": str(exc)}, status_code=500)\n return JSONResponse(content={\"status\": \"ok\", \"detail\": detail or f\"{action} action accepted\"}, status_code=200)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_channel.py:HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C2_DEPENDENCY_GRAPH" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 12, + "C2_DEPENDENCY_GRAPH": 4 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "HttpControlChannel", + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Почему в файле src/app_runtime/control/http_channel.py класс HttpControlChannel устроен так?", + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 12, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Почему в файле src/app_runtime/control/http_channel.py класс HttpControlChannel устроен так?", + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 4, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 4, + "candidates_after_filter": 4 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "HttpControlChannel", + "alternatives": [ + "HttpControlChannel" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 4, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 70, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 33, + "C0_SOURCE_CHUNKS": 18, + "C2_DEPENDENCY_GRAPH": 17 + }, + "merge_rank": 37 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Почему в файле src/app_runtime/control/http_channel.py класс HttpControlChannel устроен так?", + "rag_count": 6 + }, + "output": { + "llm_answer": "Класс `HttpControlChannel` из файла `http_channel.py` реализует механизм управления HTTP-каналами для взаимодействия с внешним миром приложения.\nЧто он делает:\n- При инициализации класса (`__init__`) создается объект `_runner`, управляющий сервером uvicorn (это веб-сервер на Python), и устанавливается таймаут соединения через параметр `timeout`.\n- Метод `start(actions)` запускает веб-приложение, передавая обработчики запросов на здоровье системы и выполнение действий (`_health_response` и `_action_response`), а также конфигурирует набор доступных команд (`actions`).\n- Метод `stop()` останавливает работу сервера.\n- Методы `_health_response` и `_action_response` возвращают ответы на запросы о состоянии системы и запросах на выполнение конкретных действий соответственно.\nВходные данные:\n- Параметры при создании объекта: строка `host`, целое число `port`, целое число `timeout`.\n- Набор действий (`actions`) передается через метод `start()`.\nВыходные данные:\n- Возвращаются асинхронно ответы на запросы состояния и выполнения действий.\n\nТаким образом, основная задача класса — предоставить интерфейс для работы с внешними клиентами через HTTP-запросы, обеспечивая возможность мониторинга состояния приложения и выполнения внешних операций." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 877, + "evidence_rows": 6, + "evidence_chars": 2660 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 4, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_explain_local_ru_v3", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 2085 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-explain-local-http-channel.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-explain-local-http-channel.md new file mode 100644 index 0000000..6690454 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-explain-local-http-channel.md @@ -0,0 +1,34 @@ +# plba-v2-explain-local-http-channel + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Почему в файле src/app_runtime/control/http_channel.py класс HttpControlChannel устроен так? + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "EXPLAIN_LOCAL", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 6, + "llm_answer": "Класс `HttpControlChannel` из файла `http_channel.py` реализует механизм управления HTTP-каналами для взаимодействия с внешним миром приложения.\nЧто он делает:\n- При инициализации класса (`__init__`) создается объект `_runner`, управляющий сервером uvicorn (это веб-сервер на Python), и устанавливается таймаут соединения через параметр `timeout`.\n- Метод `start(actions)` запускает веб-приложение, передавая обработчики запросов на здоровье системы и выполнение действий (`_health_response` и `_action_response`), а также конфигурирует набор доступных команд (`actions`).\n- Метод `stop()` останавливает работу сервера.\n- Методы `_health_response` и `_action_response` возвращают ответы на запросы о состоянии системы и запросах на выполнение конкретных действий соответственно.\nВходные данные:\n- Параметры при создании объекта: строка `host`, целое число `port`, целое число `timeout`.\n- Набор действий (`actions`) передается через метод `start()`.\nВыходные данные:\n- Возвращаются асинхронно ответы на запросы состояния и выполнения действий.\n\nТаким образом, основная задача класса — предоставить интерфейс для работы с внешними клиентами через HTTP-запросы, обеспечивая возможность мониторинга состояния приложения и выполнения внешних операций.", + "answer_mode": "answered", + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "symbol_candidates": [ + "HttpControlChannel" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C2_DEPENDENCY_GRAPH" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-explain-nonexistent-symbol.json b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-explain-nonexistent-symbol.json new file mode 100644 index 0000000..02f429f --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-explain-nonexistent-symbol.json @@ -0,0 +1,1182 @@ +{ + "case_id": "plba-v2-explain-nonexistent-symbol", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 0, + "llm_answer": "Класс `RuntimeFactoryManager` не найден в предоставленном контексте. Учитывая, что контекста недостаточно для прямого анализа, я не могу точно подтвердить наличие этого класса или объяснить его работу на основе доступных данных.\n\nТем не менее, исходя из названия, можно сделать осторожный вывод о возможном предназначении данного класса:\n\n1. Назначение: \n Вероятно, этот класс предназначен для управления фабриками (factory) или создания экземпляров различных runtime-компонентов во время выполнения программы. Это может включать настройку и инициализацию объектов, регистрацию фабрик или управление жизненным циклом компонентов.\n\n2. Возможные функции:\n - Управление созданием и регистрацией фабрик для разных типов компонентов.\n - Предоставление интерфейса для динамического получения инстансов конкретных классов или объектов по запросу.\n - Возможное кэширование созданных экземпляров или их отслеживание через механизм регистрации.\n\nОднако без доступа к исходному коду или документации невозможно точно утверждать детали реализации и функциональность класса `RuntimeFactoryManager`.", + "answer_mode": "insufficient_evidence", + "path_scope": [], + "symbol_candidates": [ + "RuntimeFactoryManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-v2-explain-nonexistent-symbol", + "text": "Объясни класс RuntimeFactoryManager", + "mode": "full_chain", + "run_started_at": "2026-03-12T14:07:09", + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни класс RuntimeFactoryManager", + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "ControlChannel", + "ControlActionSet" + ], + "confidence": 0.0 + }, + "rag_count": 0, + "rag_rows": [], + "llm_answer": "Класс `RuntimeFactoryManager` не найден в предоставленном контексте. Учитывая, что контекста недостаточно для прямого анализа, я не могу точно подтвердить наличие этого класса или объяснить его работу на основе доступных данных.\n\nТем не менее, исходя из названия, можно сделать осторожный вывод о возможном предназначении данного класса:\n\n1. Назначение: \n Вероятно, этот класс предназначен для управления фабриками (factory) или создания экземпляров различных runtime-компонентов во время выполнения программы. Это может включать настройку и инициализацию объектов, регистрацию фабрик или управление жизненным циклом компонентов.\n\n2. Возможные функции:\n - Управление созданием и регистрацией фабрик для разных типов компонентов.\n - Предоставление интерфейса для динамического получения инстансов конкретных классов или объектов по запросу.\n - Возможное кэширование созданных экземпляров или их отслеживание через механизм регистрации.\n\nОднако без доступа к исходному коду или документации невозможно точно утверждать детали реализации и функциональность класса `RuntimeFactoryManager`.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [], + "evidence_sufficient": false + }, + "llm": { + "answer_status": "insufficient_evidence", + "groundedness": "weakly_grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "RuntimeFactoryManager" + ], + "keyword_hints": [ + "RuntimeFactoryManager" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": null, + "workspace_id": null, + "returned_repo_ids": [], + "returned_workspace_ids": [] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "RuntimeFactoryManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "RuntimeFactoryManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "RuntimeFactoryManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "RuntimeFactoryManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "RuntimeFactoryManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 2, + "candidates_after_filter": 2 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "ControlChannel", + "ControlActionSet" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "miss", + "hit_count": 0, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "miss", + "hit_count": 0, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "miss", + "hit_count": 0, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "miss", + "hit_count": 0, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "miss", + "hit_count": 0, + "fail_reason": null + } + ] + }, + "constraint_violations": [ + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C1_SYMBOL_CATALOG", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + }, + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C0_SOURCE_CHUNKS", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + }, + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C4_SEMANTIC_ROLES", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + }, + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C2_DEPENDENCY_GRAPH", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + }, + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C3_ENTRYPOINTS", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + }, + { + "type": "SYMBOL_RESOLUTION_FAILED", + "severity": "warn", + "details": { + "status": "not_found", + "symbol_candidates": [ + "RuntimeFactoryManager" + ] + }, + "suggested_fix": "Increase symbol layer budget or improve fuzzy symbol resolution settings." + } + ], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 133, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 32, + "C0_SOURCE_CHUNKS": 18, + "C4_SEMANTIC_ROLES": 15, + "C2_DEPENDENCY_GRAPH": 54, + "C3_ENTRYPOINTS": 11 + }, + "merge_rank": 0, + "prompt_build": 0, + "llm_call": 1703 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 320, + "evidence_rows": 0, + "evidence_chars": 0 + }, + "evidence_summary": [], + "prompt_template_id": "intent_code_qa_explain_ru_v3", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "RuntimeFactoryManager" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 0, + "missing_evidence_reason": "empty_retrieval_context" + } + }, + "run_info": { + "case_id": "plba-v2-explain-nonexistent-symbol", + "mode": "full_chain", + "run_started_at": "2026-03-12T14:07:09", + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Объясни класс RuntimeFactoryManager", + "normalized_query": "Объясни класс RuntimeFactoryManager" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Объясни класс RuntimeFactoryManager" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни класс RuntimeFactoryManager" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "RuntimeFactoryManager" + ], + "keyword_hints": [ + "RuntimeFactoryManager" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Объясни класс RuntimeFactoryManager" + }, + "output": { + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "ControlChannel", + "ControlActionSet" + ], + "confidence": 0.0 + }, + "rag_count": 0, + "rag_rows": [] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": null, + "workspace_id": null, + "returned_repo_ids": [], + "returned_workspace_ids": [] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "RuntimeFactoryManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "RuntimeFactoryManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "RuntimeFactoryManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "RuntimeFactoryManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "RuntimeFactoryManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 2, + "candidates_after_filter": 2 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "ControlChannel", + "ControlActionSet" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "miss", + "hit_count": 0, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "miss", + "hit_count": 0, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "miss", + "hit_count": 0, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "miss", + "hit_count": 0, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "miss", + "hit_count": 0, + "fail_reason": null + } + ] + }, + "constraint_violations": [ + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C1_SYMBOL_CATALOG", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + }, + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C0_SOURCE_CHUNKS", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + }, + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C4_SEMANTIC_ROLES", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + }, + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C2_DEPENDENCY_GRAPH", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + }, + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C3_ENTRYPOINTS", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + }, + { + "type": "SYMBOL_RESOLUTION_FAILED", + "severity": "warn", + "details": { + "status": "not_found", + "symbol_candidates": [ + "RuntimeFactoryManager" + ] + }, + "suggested_fix": "Increase symbol layer budget or improve fuzzy symbol resolution settings." + } + ], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 133, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 32, + "C0_SOURCE_CHUNKS": 18, + "C4_SEMANTIC_ROLES": 15, + "C2_DEPENDENCY_GRAPH": 54, + "C3_ENTRYPOINTS": 11 + }, + "merge_rank": 0 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Объясни класс RuntimeFactoryManager", + "rag_count": 0 + }, + "output": { + "llm_answer": "Класс `RuntimeFactoryManager` не найден в предоставленном контексте. Учитывая, что контекста недостаточно для прямого анализа, я не могу точно подтвердить наличие этого класса или объяснить его работу на основе доступных данных.\n\nТем не менее, исходя из названия, можно сделать осторожный вывод о возможном предназначении данного класса:\n\n1. Назначение: \n Вероятно, этот класс предназначен для управления фабриками (factory) или создания экземпляров различных runtime-компонентов во время выполнения программы. Это может включать настройку и инициализацию объектов, регистрацию фабрик или управление жизненным циклом компонентов.\n\n2. Возможные функции:\n - Управление созданием и регистрацией фабрик для разных типов компонентов.\n - Предоставление интерфейса для динамического получения инстансов конкретных классов или объектов по запросу.\n - Возможное кэширование созданных экземпляров или их отслеживание через механизм регистрации.\n\nОднако без доступа к исходному коду или документации невозможно точно утверждать детали реализации и функциональность класса `RuntimeFactoryManager`." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 320, + "evidence_rows": 0, + "evidence_chars": 0 + }, + "evidence_summary": [], + "prompt_template_id": "intent_code_qa_explain_ru_v3", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 1703 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-explain-nonexistent-symbol.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-explain-nonexistent-symbol.md new file mode 100644 index 0000000..17900c0 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-explain-nonexistent-symbol.md @@ -0,0 +1,34 @@ +# plba-v2-explain-nonexistent-symbol + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Объясни класс RuntimeFactoryManager + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 0, + "llm_answer": "Класс `RuntimeFactoryManager` не найден в предоставленном контексте. Учитывая, что контекста недостаточно для прямого анализа, я не могу точно подтвердить наличие этого класса или объяснить его работу на основе доступных данных.\n\nТем не менее, исходя из названия, можно сделать осторожный вывод о возможном предназначении данного класса:\n\n1. Назначение: \n Вероятно, этот класс предназначен для управления фабриками (factory) или создания экземпляров различных runtime-компонентов во время выполнения программы. Это может включать настройку и инициализацию объектов, регистрацию фабрик или управление жизненным циклом компонентов.\n\n2. Возможные функции:\n - Управление созданием и регистрацией фабрик для разных типов компонентов.\n - Предоставление интерфейса для динамического получения инстансов конкретных классов или объектов по запросу.\n - Возможное кэширование созданных экземпляров или их отслеживание через механизм регистрации.\n\nОднако без доступа к исходному коду или документации невозможно точно утверждать детали реализации и функциональность класса `RuntimeFactoryManager`.", + "answer_mode": "insufficient_evidence", + "path_scope": [], + "symbol_candidates": [ + "RuntimeFactoryManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-explain-runtime-manager.json b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-explain-runtime-manager.json new file mode 100644 index 0000000..57fe892 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-explain-runtime-manager.json @@ -0,0 +1,2088 @@ +{ + "case_id": "plba-v2-explain-runtime-manager", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 12, + "llm_answer": "Класс `RuntimeManager` играет роль менеджера жизненного цикла различных компонентов в приложении, обеспечивая координацию их инициализации и управления состоянием системы.\nКлючевые особенности класса:\n1. Инициализация (`__init__()`):\n - Класс принимает ряд аргументов: конфигурацию, сервисы, систему отслеживания трассировок, реестр здоровья, логгер, супервизор рабочих процессов и сервис управления каналами.\n - Все аргументы имеют значения по умолчанию, позволяя легко создать экземпляр класса без передачи всех параметров.\n \n2. Управление состояниями:\n - Свойства `_started`, `_state`, `_core_registered`, `_workers_registered` используются для отслеживания текущего состояния системы и её модулей.\n - Метод `_register_core_services()` регистрирует основные службы приложения.\n\n3. Регистрация модулей:\n - Метод `register_module(module)` позволяет зарегистрировать дополнительные модули приложения.\nКосвенные выводы о работе класса:\n- Судя по сигнатуре метода `__init__()`, класс должен быть активно задействован при старте системы и управлять основными компонентами приложения через передаваемые параметры.\n- Однако конкретные детали того, какие действия выполняются после регистрации служб и модулей, остаются неясными, так как напрямую из предоставленного контекста это невозможно подтвердить.\n\nТаким образом, хотя можно уверенно сказать, что `RuntimeManager` управляет жизненным циклом основных сервисов и состояний приложения, более точные детали его работы требуют дополнительного анализа исходного кода.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-v2-explain-runtime-manager", + "text": "Объясни как работает класс RuntimeManager", + "mode": "full_chain", + "run_started_at": "2026-03-12T14:07:09", + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни как работает класс RuntimeManager", + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ], + "confidence": 0.99 + }, + "rag_count": 12, + "rag_rows": [ + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager\nRuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "qname": "RuntimeManager", + "kind": "class", + "signature": "RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests manager\n- orchestrates role-like calls (4)\n- reads and writes state attributes\n- participates in dataflow slices (50)", + "layer": "C4_SEMANTIC_ROLES", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 43, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "symbol_name": "RuntimeManager", + "qname": "RuntimeManager", + "role": "pipeline_stage", + "confidence": 0.67, + "dataflow_participation": 50, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 52, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "Класс `RuntimeManager` играет роль менеджера жизненного цикла различных компонентов в приложении, обеспечивая координацию их инициализации и управления состоянием системы.\nКлючевые особенности класса:\n1. Инициализация (`__init__()`):\n - Класс принимает ряд аргументов: конфигурацию, сервисы, систему отслеживания трассировок, реестр здоровья, логгер, супервизор рабочих процессов и сервис управления каналами.\n - Все аргументы имеют значения по умолчанию, позволяя легко создать экземпляр класса без передачи всех параметров.\n \n2. Управление состояниями:\n - Свойства `_started`, `_state`, `_core_registered`, `_workers_registered` используются для отслеживания текущего состояния системы и её модулей.\n - Метод `_register_core_services()` регистрирует основные службы приложения.\n\n3. Регистрация модулей:\n - Метод `register_module(module)` позволяет зарегистрировать дополнительные модули приложения.\nКосвенные выводы о работе класса:\n- Судя по сигнатуре метода `__init__()`, класс должен быть активно задействован при старте системы и управлять основными компонентами приложения через передаваемые параметры.\n- Однако конкретные детали того, какие действия выполняются после регистрации служб и модулей, остаются неясными, так как напрямую из предоставленного контекста это невозможно подтвердить.\n\nТаким образом, хотя можно уверенно сказать, что `RuntimeManager` управляет жизненным циклом основных сервисов и состояний приложения, более точные детали его работы требуют дополнительного анализа исходного кода.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS", + "C4_SEMANTIC_ROLES" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 174, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 40, + "C0_SOURCE_CHUNKS": 23, + "C4_SEMANTIC_ROLES": 18, + "C2_DEPENDENCY_GRAPH": 57, + "C3_ENTRYPOINTS": 14 + }, + "merge_rank": 23, + "prompt_build": 0, + "llm_call": 2322 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 862, + "evidence_rows": 12, + "evidence_chars": 7130 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 2 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_explain_ru_v3", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "RuntimeManager" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 12, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-v2-explain-runtime-manager", + "mode": "full_chain", + "run_started_at": "2026-03-12T14:07:09", + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Объясни как работает класс RuntimeManager", + "normalized_query": "Объясни как работает класс RuntimeManager" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Объясни как работает класс RuntimeManager" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни как работает класс RuntimeManager" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Объясни как работает класс RuntimeManager" + }, + "output": { + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ], + "confidence": 0.99 + }, + "rag_count": 12, + "rag_rows": [ + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager\nRuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "qname": "RuntimeManager", + "kind": "class", + "signature": "RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests manager\n- orchestrates role-like calls (4)\n- reads and writes state attributes\n- participates in dataflow slices (50)", + "layer": "C4_SEMANTIC_ROLES", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 43, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "symbol_name": "RuntimeManager", + "qname": "RuntimeManager", + "role": "pipeline_stage", + "confidence": 0.67, + "dataflow_participation": 50, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 52, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 174, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 40, + "C0_SOURCE_CHUNKS": 23, + "C4_SEMANTIC_ROLES": 18, + "C2_DEPENDENCY_GRAPH": 57, + "C3_ENTRYPOINTS": 14 + }, + "merge_rank": 23 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Объясни как работает класс RuntimeManager", + "rag_count": 12 + }, + "output": { + "llm_answer": "Класс `RuntimeManager` играет роль менеджера жизненного цикла различных компонентов в приложении, обеспечивая координацию их инициализации и управления состоянием системы.\nКлючевые особенности класса:\n1. Инициализация (`__init__()`):\n - Класс принимает ряд аргументов: конфигурацию, сервисы, систему отслеживания трассировок, реестр здоровья, логгер, супервизор рабочих процессов и сервис управления каналами.\n - Все аргументы имеют значения по умолчанию, позволяя легко создать экземпляр класса без передачи всех параметров.\n \n2. Управление состояниями:\n - Свойства `_started`, `_state`, `_core_registered`, `_workers_registered` используются для отслеживания текущего состояния системы и её модулей.\n - Метод `_register_core_services()` регистрирует основные службы приложения.\n\n3. Регистрация модулей:\n - Метод `register_module(module)` позволяет зарегистрировать дополнительные модули приложения.\nКосвенные выводы о работе класса:\n- Судя по сигнатуре метода `__init__()`, класс должен быть активно задействован при старте системы и управлять основными компонентами приложения через передаваемые параметры.\n- Однако конкретные детали того, какие действия выполняются после регистрации служб и модулей, остаются неясными, так как напрямую из предоставленного контекста это невозможно подтвердить.\n\nТаким образом, хотя можно уверенно сказать, что `RuntimeManager` управляет жизненным циклом основных сервисов и состояний приложения, более точные детали его работы требуют дополнительного анализа исходного кода." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 862, + "evidence_rows": 12, + "evidence_chars": 7130 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 2 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_explain_ru_v3", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 2322 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-explain-runtime-manager.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-explain-runtime-manager.md new file mode 100644 index 0000000..4969102 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-explain-runtime-manager.md @@ -0,0 +1,34 @@ +# plba-v2-explain-runtime-manager + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Объясни как работает класс RuntimeManager + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 12, + "llm_answer": "Класс `RuntimeManager` играет роль менеджера жизненного цикла различных компонентов в приложении, обеспечивая координацию их инициализации и управления состоянием системы.\nКлючевые особенности класса:\n1. Инициализация (`__init__()`):\n - Класс принимает ряд аргументов: конфигурацию, сервисы, систему отслеживания трассировок, реестр здоровья, логгер, супервизор рабочих процессов и сервис управления каналами.\n - Все аргументы имеют значения по умолчанию, позволяя легко создать экземпляр класса без передачи всех параметров.\n \n2. Управление состояниями:\n - Свойства `_started`, `_state`, `_core_registered`, `_workers_registered` используются для отслеживания текущего состояния системы и её модулей.\n - Метод `_register_core_services()` регистрирует основные службы приложения.\n\n3. Регистрация модулей:\n - Метод `register_module(module)` позволяет зарегистрировать дополнительные модули приложения.\nКосвенные выводы о работе класса:\n- Судя по сигнатуре метода `__init__()`, класс должен быть активно задействован при старте системы и управлять основными компонентами приложения через передаваемые параметры.\n- Однако конкретные детали того, какие действия выполняются после регистрации служб и модулей, остаются неясными, так как напрямую из предоставленного контекста это невозможно подтвердить.\n\nТаким образом, хотя можно уверенно сказать, что `RuntimeManager` управляет жизненным циклом основных сервисов и состояний приложения, более точные детали его работы требуют дополнительного анализа исходного кода.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-explain-trace-service.json b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-explain-trace-service.json new file mode 100644 index 0000000..a8c86c4 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-explain-trace-service.json @@ -0,0 +1,2208 @@ +{ + "case_id": "plba-v2-explain-trace-service", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 14, + "llm_answer": "Класс `TraceService` представляет собой сервис для управления контекстами трассировки в приложении. Он является фабрикой контекста (`TraceContextFactory`), что указывает на его роль в создании и управлении объектами, связанными с трассировкой.\nКлючевые аспекты работы класса:\n\n1. Инициализация:\n - При инициализации создается объект записи трассировочных данных (`TraceRecordWriter`) и используется транспортная инфраструктура (`TraceTransport`). Если транспорт не указан, по умолчанию применяется заглушка (`NoOpTraceTransport()`).\n \n2. Создание контекста трассировки:\n - Метод `create_context` создает новый контекст трассировки с уникальным идентификатором, записывает его в хранилище (`store`) и отправляет запись через транспортную инфраструктуру.\n - Контекст можно создать с указанием следующих параметров:\n - `alias`: строка, идентифицирующая тип контекста;\n - `parent_id`: родительский идентификатор контекста (если этот контекст вложен);\n - `kind`: тип события (например, запрос, ответ и т.д.);\n - `attrs`: дополнительные атрибуты контекста.\n\n3. Обертка контекста:\n - С помощью декоратора контекста (`@contextmanager`) предоставляется механизм временной области видимости контекста. Внутри блока с этим декоратором вызывается метод создания контекста, возвращающий уникальный идентификатор созданного контекста.\nВозможности и ограничения:\n\n- Класс использует стандартное время UTC для маркировки событий, генерирует уникальные идентификаторы при помощи библиотеки UUID и поддерживает хранение записей в виде атрибутов словаря.\n \nОднако, исходя из представленного контекста, напрямую невозможно точно определить, какие именно транспортные механизмы используются и каким образом реализован механизм хранения контекста. Эти детали скрыты внутри методов `TraceContextStore` и `TraceTransport`, которые явно не описаны здесь.\n\nТаким образом, хотя основные функции класса понятны, детали конкретных реализаций связанных компонентов остаются неизвестными.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "TraceService" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-v2-explain-trace-service", + "text": "Объясни как работает класс TraceService", + "mode": "full_chain", + "run_started_at": "2026-03-12T14:07:09", + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни как работает класс TraceService", + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "TraceService", + "alternatives": [ + "TraceService" + ], + "confidence": 0.99 + }, + "rag_count": 14, + "rag_rows": [ + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceService\nTraceService(TraceContextFactory)", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService", + "span_start": 39, + "span_end": 166, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "c2b2b976d99f2c600000b753731b26e0a69adcb4359398b93073590c5d5d04f4", + "qname": "TraceService", + "kind": "class", + "signature": "TraceService(TraceContextFactory)", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (13)", + "layer": "C4_SEMANTIC_ROLES", + "title": "TraceService", + "span_start": 39, + "span_end": 166, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 60, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "c2b2b976d99f2c600000b753731b26e0a69adcb4359398b93073590c5d5d04f4", + "symbol_name": "TraceService", + "qname": "TraceService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 13, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.create_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 61, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3b052062067a78aef3302ee1d996897e02a67d1b340397bea4f59fe147c0492a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a", + "dst_ref": "TraceService.create_context", + "resolution": "resolved", + "slice_id": "3b052062067a78aef3302ee1d996897e02a67d1b340397bea4f59fe147c0492a", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.create_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.close_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 84, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "7a9353ef57c9ae5d19b3a0c6ac50fad05e6d21d31bbe1cd1cd07af6332ba6505", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "01e14158dcced7e52d0c8ac84ac7b9a75225c261b6aca6a1d7da802d0994721c", + "dst_ref": "TraceService.close_context", + "resolution": "resolved", + "slice_id": "7a9353ef57c9ae5d19b3a0c6ac50fad05e6d21d31bbe1cd1cd07af6332ba6505", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.close_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "01e14158dcced7e52d0c8ac84ac7b9a75225c261b6aca6a1d7da802d0994721c" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.open_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 78, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a6e13b9ebc4fed84586afd53ed92a4d14757e440873f572b2337d5622ee96031", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426", + "dst_ref": "TraceService.open_context", + "resolution": "resolved", + "slice_id": "a6e13b9ebc4fed84586afd53ed92a4d14757e440873f572b2337d5622ee96031", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.open_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.transport\n -> TraceService.__init__", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 41, + "span_end": 43, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "1e923a93faa05c3c43ca9b19bd047007a8589ccce57d3cc1798ae7f9f200af98", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "dst_ref": "TraceService.__init__", + "resolution": "resolved", + "slice_id": "1e923a93faa05c3c43ca9b19bd047007a8589ccce57d3cc1798ae7f9f200af98", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.transport", + "TraceService.__init__" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.current_trace_id", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 81, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3ea17138634b1190bded77ddb84aa1595124f6519b246f24fc4b02bd62b5cac1", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c", + "dst_ref": "TraceService.current_trace_id", + "resolution": "resolved", + "slice_id": "3ea17138634b1190bded77ddb84aa1595124f6519b246f24fc4b02bd62b5cac1", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.current_trace_id" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.step", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 88, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "9f34c5da9b09fba99df6f6b1bde183a9aeb45111b8218a747c71590c2c9f60f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "c44bfbc66cf747283f30088da3e011a10395031d41e77b74e523c24997f641ca", + "dst_ref": "TraceService.step", + "resolution": "resolved", + "slice_id": "9f34c5da9b09fba99df6f6b1bde183a9aeb45111b8218a747c71590c2c9f60f2", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.step" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "c44bfbc66cf747283f30088da3e011a10395031d41e77b74e523c24997f641ca" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceRecordWriter:\n def __init__(self, transport: TraceTransport) -> None:\n self._logger = logging.getLogger(__name__)\n self._transport = transport\n\n def write_context(self, record: TraceContextRecord) -> None:\n try:\n self._transport.write_context(record)\n except Exception:\n self._logger.exception(\"Trace transport failed to write context %s\", record.trace_id)\n\n def write_message(self, record: TraceLogMessage) -> None:\n try:\n self._transport.write_message(record)\n except Exception:\n self._logger.exception(\"Trace transport failed to write message for %s\", record.trace_id)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/tracing/service.py:TraceRecordWriter", + "span_start": 21, + "span_end": 36, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceService(TraceContextFactory):\n def __init__(self, transport: TraceTransport | None = None, store: TraceContextStore | None = None) -> None:\n self.transport = transport or NoOpTraceTransport()\n self.store = store or TraceContextStore()\n self._writer = TraceRecordWriter(self.transport)\n\n def create_context(\n self,\n *,\n alias: str,\n parent_id: str | None = None,\n kind: str | None = None,\n attrs: dict[str, Any] | None = None,\n ) -> str:\n record = TraceContextRecord(\n trace_id=uuid4().hex,\n alias=str(alias or \"\"),\n parent_id=parent_id,\n type=kind,\n event_time=utc_now(),\n attrs=dict(attrs or {}),\n )\n self.store.push(record)\n self._writer.write_context(record)\n return record.trace_id\n\n @contextmanager\n def open_context(\n self,\n *,\n alias: str,\n parent_id: str | None = None,\n kind: str | None = None,\n attrs: dict[str, Any] | None = None,\n ) -> Iterator[str]:\n trace_id = self.create_context(alias=alias, parent_id=parent_id, kind=kind, attrs=attrs)\n try:\n yield trace_id\n finally:\n self.store.pop()\n\n def current_trace_id(self) -> str | None:\n return self.store.current_trace_id()\n\n def close_context(self) -> str | None:\n previous = self.store.pop()\n return previous.record.trace_id if previous else None\n\n def step(self, name: str) -> None:\n self.store.set_step(str(name or \"\"))\n\n def info(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"INFO\", message, status, attrs)\n\n def debug(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"DEBUG\", message, status, attrs)\n\n def warning(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"WARNING\", message, status, attrs)\n\n def error(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"ERROR\", message, status, attrs)\n\n def exception(self, message: str, *, status: str = \"failed\", attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"ERROR\", message, status, attrs)\n\n def new_root(self, operation: str) -> TraceContext:\n trace_id = self.create_context(alias=operation, kind=\"operation\", attrs={\"operation\": operation})\n return TraceContext(trace_id=trace_id, span_id=trace_id, attributes={\"operation\": operation})\n\n def child_of(self, parent: TraceContext, operation: str) -> TraceContext:\n trace_id = self.create_context(\n alias=operation,\n parent_id=parent.trace_id,\n kind=\"worker\",\n attrs={\"operation\": operation},\n )\n return TraceContext(\n trace_id=trace_id,\n span_id=trace_id,\n parent_span_id=parent.span_id,\n attributes={\"operation\": operation},\n )\n\n def attach(self, metadata: dict[str, object], context: TraceContext) -> dict[str, object]:\n updated = dict(metadata)\n updated[\"trace_id\"] = context.trace_id\n updated[\"span_id\"] = context.span_id\n updated[\"parent_span_id\"] = context.parent_span_id\n return updated\n\n def resume(self, metadata: dict[str, object], operation: str) -> TraceContext:\n trace_id = str(metadata.get(\"trace_id\") or uuid4().hex)\n span_id = str(metadata.get(\"span_id\") or trace_id)\n parent_id = metadata.get(\"parent_span_id\")\n self.create_context(\n alias=operation,\n parent_id=str(parent_id) if parent_id else None,\n kind=\"worker\",\n attrs=dict(metadata),\n )\n return TraceContext(\n trace_id=trace_id,\n span_id=span_id,\n parent_span_id=str(parent_id) if parent_id else None,\n attributes={\"operation\": operation},\n )\n\n def _write_message(\n self,\n level: TraceLevel,\n message: str,\n status: str | None,\n attrs: dict[str, Any] | None,\n ) -> None:\n active = self.store.current()\n if active is None:\n raise RuntimeError(\"Trace context is not bound. Call create_context() first.\")\n record = TraceLogMessage(\n trace_id=active.record.trace_id,\n step=active.step,\n status=str(status or \"\"),\n message=str(message or \"\"),\n level=level,\n event_time=utc_now(),\n attrs=dict(attrs or {}),\n )\n self._writer.write_message(record)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/tracing/service.py:TraceService", + "span_start": 39, + "span_end": 166, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceManager(TraceService):\n \"\"\"Compatibility alias during the transition from ConfigManager-shaped naming.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/tracing/service.py:TraceManager", + "span_start": 169, + "span_end": 170, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 2, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "Класс `TraceService` представляет собой сервис для управления контекстами трассировки в приложении. Он является фабрикой контекста (`TraceContextFactory`), что указывает на его роль в создании и управлении объектами, связанными с трассировкой.\nКлючевые аспекты работы класса:\n\n1. Инициализация:\n - При инициализации создается объект записи трассировочных данных (`TraceRecordWriter`) и используется транспортная инфраструктура (`TraceTransport`). Если транспорт не указан, по умолчанию применяется заглушка (`NoOpTraceTransport()`).\n \n2. Создание контекста трассировки:\n - Метод `create_context` создает новый контекст трассировки с уникальным идентификатором, записывает его в хранилище (`store`) и отправляет запись через транспортную инфраструктуру.\n - Контекст можно создать с указанием следующих параметров:\n - `alias`: строка, идентифицирующая тип контекста;\n - `parent_id`: родительский идентификатор контекста (если этот контекст вложен);\n - `kind`: тип события (например, запрос, ответ и т.д.);\n - `attrs`: дополнительные атрибуты контекста.\n\n3. Обертка контекста:\n - С помощью декоратора контекста (`@contextmanager`) предоставляется механизм временной области видимости контекста. Внутри блока с этим декоратором вызывается метод создания контекста, возвращающий уникальный идентификатор созданного контекста.\nВозможности и ограничения:\n\n- Класс использует стандартное время UTC для маркировки событий, генерирует уникальные идентификаторы при помощи библиотеки UUID и поддерживает хранение записей в виде атрибутов словаря.\n \nОднако, исходя из представленного контекста, напрямую невозможно точно определить, какие именно транспортные механизмы используются и каким образом реализован механизм хранения контекста. Эти детали скрыты внутри методов `TraceContextStore` и `TraceTransport`, которые явно не описаны здесь.\n\nТаким образом, хотя основные функции класса понятны, детали конкретных реализаций связанных компонентов остаются неизвестными.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS", + "C4_SEMANTIC_ROLES" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "TraceService" + ], + "keyword_hints": [ + "TraceService" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "TraceService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "TraceService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "TraceService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "TraceService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "TraceService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "TraceService", + "alternatives": [ + "TraceService" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 143, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 48, + "C0_SOURCE_CHUNKS": 20, + "C4_SEMANTIC_ROLES": 16, + "C2_DEPENDENCY_GRAPH": 45, + "C3_ENTRYPOINTS": 11 + }, + "merge_rank": 21, + "prompt_build": 0, + "llm_call": 2992 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 999, + "evidence_rows": 14, + "evidence_chars": 6323 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 1 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 3, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_explain_ru_v3", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "TraceService" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 14, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-v2-explain-trace-service", + "mode": "full_chain", + "run_started_at": "2026-03-12T14:07:09", + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Объясни как работает класс TraceService", + "normalized_query": "Объясни как работает класс TraceService" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Объясни как работает класс TraceService" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни как работает класс TraceService" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "TraceService" + ], + "keyword_hints": [ + "TraceService" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Объясни как работает класс TraceService" + }, + "output": { + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "TraceService", + "alternatives": [ + "TraceService" + ], + "confidence": 0.99 + }, + "rag_count": 14, + "rag_rows": [ + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceService\nTraceService(TraceContextFactory)", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService", + "span_start": 39, + "span_end": 166, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "c2b2b976d99f2c600000b753731b26e0a69adcb4359398b93073590c5d5d04f4", + "qname": "TraceService", + "kind": "class", + "signature": "TraceService(TraceContextFactory)", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (13)", + "layer": "C4_SEMANTIC_ROLES", + "title": "TraceService", + "span_start": 39, + "span_end": 166, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 60, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "c2b2b976d99f2c600000b753731b26e0a69adcb4359398b93073590c5d5d04f4", + "symbol_name": "TraceService", + "qname": "TraceService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 13, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.create_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 61, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3b052062067a78aef3302ee1d996897e02a67d1b340397bea4f59fe147c0492a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a", + "dst_ref": "TraceService.create_context", + "resolution": "resolved", + "slice_id": "3b052062067a78aef3302ee1d996897e02a67d1b340397bea4f59fe147c0492a", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.create_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.close_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 84, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "7a9353ef57c9ae5d19b3a0c6ac50fad05e6d21d31bbe1cd1cd07af6332ba6505", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "01e14158dcced7e52d0c8ac84ac7b9a75225c261b6aca6a1d7da802d0994721c", + "dst_ref": "TraceService.close_context", + "resolution": "resolved", + "slice_id": "7a9353ef57c9ae5d19b3a0c6ac50fad05e6d21d31bbe1cd1cd07af6332ba6505", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.close_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "01e14158dcced7e52d0c8ac84ac7b9a75225c261b6aca6a1d7da802d0994721c" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.open_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 78, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a6e13b9ebc4fed84586afd53ed92a4d14757e440873f572b2337d5622ee96031", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426", + "dst_ref": "TraceService.open_context", + "resolution": "resolved", + "slice_id": "a6e13b9ebc4fed84586afd53ed92a4d14757e440873f572b2337d5622ee96031", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.open_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.transport\n -> TraceService.__init__", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 41, + "span_end": 43, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "1e923a93faa05c3c43ca9b19bd047007a8589ccce57d3cc1798ae7f9f200af98", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "dst_ref": "TraceService.__init__", + "resolution": "resolved", + "slice_id": "1e923a93faa05c3c43ca9b19bd047007a8589ccce57d3cc1798ae7f9f200af98", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.transport", + "TraceService.__init__" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.current_trace_id", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 81, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3ea17138634b1190bded77ddb84aa1595124f6519b246f24fc4b02bd62b5cac1", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c", + "dst_ref": "TraceService.current_trace_id", + "resolution": "resolved", + "slice_id": "3ea17138634b1190bded77ddb84aa1595124f6519b246f24fc4b02bd62b5cac1", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.current_trace_id" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.step", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 88, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "9f34c5da9b09fba99df6f6b1bde183a9aeb45111b8218a747c71590c2c9f60f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "c44bfbc66cf747283f30088da3e011a10395031d41e77b74e523c24997f641ca", + "dst_ref": "TraceService.step", + "resolution": "resolved", + "slice_id": "9f34c5da9b09fba99df6f6b1bde183a9aeb45111b8218a747c71590c2c9f60f2", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.step" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "c44bfbc66cf747283f30088da3e011a10395031d41e77b74e523c24997f641ca" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceRecordWriter:\n def __init__(self, transport: TraceTransport) -> None:\n self._logger = logging.getLogger(__name__)\n self._transport = transport\n\n def write_context(self, record: TraceContextRecord) -> None:\n try:\n self._transport.write_context(record)\n except Exception:\n self._logger.exception(\"Trace transport failed to write context %s\", record.trace_id)\n\n def write_message(self, record: TraceLogMessage) -> None:\n try:\n self._transport.write_message(record)\n except Exception:\n self._logger.exception(\"Trace transport failed to write message for %s\", record.trace_id)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/tracing/service.py:TraceRecordWriter", + "span_start": 21, + "span_end": 36, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceService(TraceContextFactory):\n def __init__(self, transport: TraceTransport | None = None, store: TraceContextStore | None = None) -> None:\n self.transport = transport or NoOpTraceTransport()\n self.store = store or TraceContextStore()\n self._writer = TraceRecordWriter(self.transport)\n\n def create_context(\n self,\n *,\n alias: str,\n parent_id: str | None = None,\n kind: str | None = None,\n attrs: dict[str, Any] | None = None,\n ) -> str:\n record = TraceContextRecord(\n trace_id=uuid4().hex,\n alias=str(alias or \"\"),\n parent_id=parent_id,\n type=kind,\n event_time=utc_now(),\n attrs=dict(attrs or {}),\n )\n self.store.push(record)\n self._writer.write_context(record)\n return record.trace_id\n\n @contextmanager\n def open_context(\n self,\n *,\n alias: str,\n parent_id: str | None = None,\n kind: str | None = None,\n attrs: dict[str, Any] | None = None,\n ) -> Iterator[str]:\n trace_id = self.create_context(alias=alias, parent_id=parent_id, kind=kind, attrs=attrs)\n try:\n yield trace_id\n finally:\n self.store.pop()\n\n def current_trace_id(self) -> str | None:\n return self.store.current_trace_id()\n\n def close_context(self) -> str | None:\n previous = self.store.pop()\n return previous.record.trace_id if previous else None\n\n def step(self, name: str) -> None:\n self.store.set_step(str(name or \"\"))\n\n def info(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"INFO\", message, status, attrs)\n\n def debug(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"DEBUG\", message, status, attrs)\n\n def warning(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"WARNING\", message, status, attrs)\n\n def error(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"ERROR\", message, status, attrs)\n\n def exception(self, message: str, *, status: str = \"failed\", attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"ERROR\", message, status, attrs)\n\n def new_root(self, operation: str) -> TraceContext:\n trace_id = self.create_context(alias=operation, kind=\"operation\", attrs={\"operation\": operation})\n return TraceContext(trace_id=trace_id, span_id=trace_id, attributes={\"operation\": operation})\n\n def child_of(self, parent: TraceContext, operation: str) -> TraceContext:\n trace_id = self.create_context(\n alias=operation,\n parent_id=parent.trace_id,\n kind=\"worker\",\n attrs={\"operation\": operation},\n )\n return TraceContext(\n trace_id=trace_id,\n span_id=trace_id,\n parent_span_id=parent.span_id,\n attributes={\"operation\": operation},\n )\n\n def attach(self, metadata: dict[str, object], context: TraceContext) -> dict[str, object]:\n updated = dict(metadata)\n updated[\"trace_id\"] = context.trace_id\n updated[\"span_id\"] = context.span_id\n updated[\"parent_span_id\"] = context.parent_span_id\n return updated\n\n def resume(self, metadata: dict[str, object], operation: str) -> TraceContext:\n trace_id = str(metadata.get(\"trace_id\") or uuid4().hex)\n span_id = str(metadata.get(\"span_id\") or trace_id)\n parent_id = metadata.get(\"parent_span_id\")\n self.create_context(\n alias=operation,\n parent_id=str(parent_id) if parent_id else None,\n kind=\"worker\",\n attrs=dict(metadata),\n )\n return TraceContext(\n trace_id=trace_id,\n span_id=span_id,\n parent_span_id=str(parent_id) if parent_id else None,\n attributes={\"operation\": operation},\n )\n\n def _write_message(\n self,\n level: TraceLevel,\n message: str,\n status: str | None,\n attrs: dict[str, Any] | None,\n ) -> None:\n active = self.store.current()\n if active is None:\n raise RuntimeError(\"Trace context is not bound. Call create_context() first.\")\n record = TraceLogMessage(\n trace_id=active.record.trace_id,\n step=active.step,\n status=str(status or \"\"),\n message=str(message or \"\"),\n level=level,\n event_time=utc_now(),\n attrs=dict(attrs or {}),\n )\n self._writer.write_message(record)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/tracing/service.py:TraceService", + "span_start": 39, + "span_end": 166, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceManager(TraceService):\n \"\"\"Compatibility alias during the transition from ConfigManager-shaped naming.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/tracing/service.py:TraceManager", + "span_start": 169, + "span_end": 170, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 2, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "TraceService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "TraceService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "TraceService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "TraceService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "TraceService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "TraceService", + "alternatives": [ + "TraceService" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 143, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 48, + "C0_SOURCE_CHUNKS": 20, + "C4_SEMANTIC_ROLES": 16, + "C2_DEPENDENCY_GRAPH": 45, + "C3_ENTRYPOINTS": 11 + }, + "merge_rank": 21 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Объясни как работает класс TraceService", + "rag_count": 14 + }, + "output": { + "llm_answer": "Класс `TraceService` представляет собой сервис для управления контекстами трассировки в приложении. Он является фабрикой контекста (`TraceContextFactory`), что указывает на его роль в создании и управлении объектами, связанными с трассировкой.\nКлючевые аспекты работы класса:\n\n1. Инициализация:\n - При инициализации создается объект записи трассировочных данных (`TraceRecordWriter`) и используется транспортная инфраструктура (`TraceTransport`). Если транспорт не указан, по умолчанию применяется заглушка (`NoOpTraceTransport()`).\n \n2. Создание контекста трассировки:\n - Метод `create_context` создает новый контекст трассировки с уникальным идентификатором, записывает его в хранилище (`store`) и отправляет запись через транспортную инфраструктуру.\n - Контекст можно создать с указанием следующих параметров:\n - `alias`: строка, идентифицирующая тип контекста;\n - `parent_id`: родительский идентификатор контекста (если этот контекст вложен);\n - `kind`: тип события (например, запрос, ответ и т.д.);\n - `attrs`: дополнительные атрибуты контекста.\n\n3. Обертка контекста:\n - С помощью декоратора контекста (`@contextmanager`) предоставляется механизм временной области видимости контекста. Внутри блока с этим декоратором вызывается метод создания контекста, возвращающий уникальный идентификатор созданного контекста.\nВозможности и ограничения:\n\n- Класс использует стандартное время UTC для маркировки событий, генерирует уникальные идентификаторы при помощи библиотеки UUID и поддерживает хранение записей в виде атрибутов словаря.\n \nОднако, исходя из представленного контекста, напрямую невозможно точно определить, какие именно транспортные механизмы используются и каким образом реализован механизм хранения контекста. Эти детали скрыты внутри методов `TraceContextStore` и `TraceTransport`, которые явно не описаны здесь.\n\nТаким образом, хотя основные функции класса понятны, детали конкретных реализаций связанных компонентов остаются неизвестными." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 999, + "evidence_rows": 14, + "evidence_chars": 6323 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 1 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 3, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_explain_ru_v3", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 2992 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-explain-trace-service.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-explain-trace-service.md new file mode 100644 index 0000000..e33de2c --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-explain-trace-service.md @@ -0,0 +1,34 @@ +# plba-v2-explain-trace-service + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Объясни как работает класс TraceService + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 14, + "llm_answer": "Класс `TraceService` представляет собой сервис для управления контекстами трассировки в приложении. Он является фабрикой контекста (`TraceContextFactory`), что указывает на его роль в создании и управлении объектами, связанными с трассировкой.\nКлючевые аспекты работы класса:\n\n1. Инициализация:\n - При инициализации создается объект записи трассировочных данных (`TraceRecordWriter`) и используется транспортная инфраструктура (`TraceTransport`). Если транспорт не указан, по умолчанию применяется заглушка (`NoOpTraceTransport()`).\n \n2. Создание контекста трассировки:\n - Метод `create_context` создает новый контекст трассировки с уникальным идентификатором, записывает его в хранилище (`store`) и отправляет запись через транспортную инфраструктуру.\n - Контекст можно создать с указанием следующих параметров:\n - `alias`: строка, идентифицирующая тип контекста;\n - `parent_id`: родительский идентификатор контекста (если этот контекст вложен);\n - `kind`: тип события (например, запрос, ответ и т.д.);\n - `attrs`: дополнительные атрибуты контекста.\n\n3. Обертка контекста:\n - С помощью декоратора контекста (`@contextmanager`) предоставляется механизм временной области видимости контекста. Внутри блока с этим декоратором вызывается метод создания контекста, возвращающий уникальный идентификатор созданного контекста.\nВозможности и ограничения:\n\n- Класс использует стандартное время UTC для маркировки событий, генерирует уникальные идентификаторы при помощи библиотеки UUID и поддерживает хранение записей в виде атрибутов словаря.\n \nОднако, исходя из представленного контекста, напрямую невозможно точно определить, какие именно транспортные механизмы используются и каким образом реализован механизм хранения контекста. Эти детали скрыты внутри методов `TraceContextStore` и `TraceTransport`, которые явно не описаны здесь.\n\nТаким образом, хотя основные функции класса понятны, детали конкретных реализаций связанных компонентов остаются неизвестными.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "TraceService" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-control-plane.json b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-control-plane.json new file mode 100644 index 0000000..57622d8 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-control-plane.json @@ -0,0 +1,1236 @@ +{ + "case_id": "plba-v2-find-entrypoints-control-plane", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 9, + "llm_answer": "Подтверждённые точки входа HTTP control plane:\n\n- GET /health \n Объявлен в `src/app_runtime/control/http_app.py`. Контекст — fastapi, метод обработчика: `health`.\n\n- GET /actions/{action}, POST /actions/{action} \n Объявлены в `src/app_runtime/control/http_app.py`. Контекст — fastapi, методы обработчиков: `action`.\n\nВозможные кандидаты (полезны, но требуют дополнительного подтверждения):\n\n- HTTP метод: неизвестно, путь: `/` \n Не имеет явных маркеров маршрута, однако может быть точкой старта приложения, так как используется uvicorn thread runner для запуска fastapi application. Требуется дополнительное исследование для точной идентификации маршрутов и контекста обработки.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "HTTP", + "control", + "plane" + ], + "layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-v2-find-entrypoints-control-plane", + "text": "Найди точки входа HTTP control plane", + "mode": "full_chain", + "run_started_at": "2026-03-12T14:07:09", + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Найди точки входа HTTP control plane", + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "HTTP", + "control", + "plane" + ], + "confidence": 0.0 + }, + "rag_count": 9, + "rag_rows": [ + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel(ControlChannel):\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._timeout = timeout\n self._runner = UvicornThreadRunner(host, port, timeout)\n self._factory = HttpControlAppFactory()\n self._actions: ControlActionSet | None = None\n\n async def start(self, actions: ControlActionSet) -> None:\n self._actions = actions\n app = self._factory.create(self._health_response, self._action_response)\n await self._runner.start(app)\n\n async def stop(self) -> None:\n await self._runner.stop()\n\n @property\n def port(self) -> int:\n return self._runner.port\n\n async def _health_response(self) -> dict[str, object]:\n if self._actions is None:\n return {\"status\": \"unhealthy\", \"detail\": \"control actions are not configured\"}\n return await asyncio.wait_for(self._actions.health(), timeout=float(self._timeout))\n\n async def _action_response(self, action: str, _client_source: str = \"unknown\") -> JSONResponse:\n if self._actions is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"{action} handler is not configured\"}, status_code=404)\n callbacks = {\n \"start\": self._actions.start,\n \"stop\": self._actions.stop,\n \"status\": self._actions.status,\n }\n callback = callbacks.get(action)\n if callback is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"unsupported action: {action}\"}, status_code=404)\n action_timeout = max(float(self._timeout), 10.0) if action in {\"start\", \"stop\"} else float(self._timeout)\n try:\n detail = await asyncio.wait_for(callback(), timeout=action_timeout)\n except asyncio.TimeoutError:\n return JSONResponse(\n content={\"status\": \"accepted\", \"detail\": f\"{action} operation is still in progress\"},\n status_code=202,\n )\n except Exception as exc:\n return JSONResponse(content={\"status\": \"error\", \"detail\": str(exc)}, status_code=500)\n return JSONResponse(content={\"status\": \"ok\", \"detail\": detail or f\"{action} action accepted\"}, status_code=200)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_channel.py:HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "class HttpControlAppFactory:\n def create(\n self,\n health_provider: Callable[[], Awaitable[HealthPayload]],\n action_provider: Callable[[str, str], Awaitable[JSONResponse]],\n ) -> FastAPI:\n app = FastAPI(title=\"PLBA Control API\")\n\n @app.middleware(\"http\")\n async def log_api_call(request: Request, call_next): # type: ignore[no-untyped-def]\n started = time.monotonic()\n response = await call_next(request)\n response.headers[\"X-Response-Time-Ms\"] = str(int((time.monotonic() - started) * 1000))\n return response\n\n @app.get(\"/health\")\n async def health() -> JSONResponse:\n payload = await health_provider()\n status_code = 200 if payload.get(\"status\") == \"ok\" else 503\n return JSONResponse(content=payload, status_code=status_code)\n\n @app.get(\"/actions/{action}\")\n @app.post(\"/actions/{action}\")\n async def action(action: str, request: Request) -> JSONResponse:\n client_source = self._client_source(request)\n if action in {\"start\", \"stop\"}:\n LOGGER.warning(\"Control action requested: /actions/%s client=%s\", action, client_source)\n return await action_provider(action, client_source)\n\n return app\n\n def _client_source(self, request: Request) -> str:\n explicit_header = request.headers.get(\"X-Client-Source\", \"\").strip()\n if explicit_header:\n return explicit_header\n user_agent = request.headers.get(\"User-Agent\", \"\").strip()\n if user_agent:\n return f\"user-agent:{user_agent}\"\n return \"unknown\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_app.py:HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlActionSet:\n health: HealthHandler\n start: ActionHandler\n stop: ActionHandler\n status: ActionHandler", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\"ControlActionSet\", \"ControlChannel\", \"ControlPlaneService\", \"HttpControlChannel\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/__init__.py:1-5", + "span_start": 1, + "span_end": 5, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlChannel(ABC):\n @abstractmethod\n async def start(self, actions: ControlActionSet) -> None:\n \"\"\"Start the control channel and bind handlers.\"\"\"\n\n @abstractmethod\n async def stop(self) -> None:\n \"\"\"Stop the control channel and release resources.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "class UvicornThreadRunner:\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._host = host\n self._port = port\n self._timeout = timeout\n self._server: Server | None = None\n self._thread: Thread | None = None\n self._error: BaseException | None = None\n\n async def start(self, app: FastAPI) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._error = None\n config = Config(app=app, host=self._host, port=self._port, log_level=\"warning\")\n self._server = Server(config)\n self._thread = Thread(target=self._serve, name=\"plba-http-control\", daemon=True)\n self._thread.start()\n await self._wait_until_started()\n\n async def stop(self) -> None:\n if self._server is None or self._thread is None:\n return\n self._server.should_exit = True\n await asyncio.to_thread(self._thread.join, self._timeout)\n self._server = None\n self._thread = None\n\n @property\n def port(self) -> int:\n if self._server is None or not getattr(self._server, \"servers\", None):\n return self._port\n socket = self._server.servers[0].sockets[0]\n return int(socket.getsockname()[1])\n\n async def _wait_until_started(self) -> None:\n if self._server is None:\n raise RuntimeError(\"Server is not initialized\")\n deadline = asyncio.get_running_loop().time() + max(float(self._timeout), 1.0)\n while not self._server.started:\n if self._error is not None:\n raise RuntimeError(\"HTTP control server failed to start\") from self._error\n if asyncio.get_running_loop().time() >= deadline:\n raise TimeoutError(\"HTTP control server startup timed out\")\n await asyncio.sleep(0.05)\n\n def _serve(self) -> None:\n if self._server is None:\n return\n try:\n asyncio.run(self._server.serve())\n except BaseException as exc: # noqa: BLE001\n self._error = exc", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_runner.py:UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_runner", + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "Подтверждённые точки входа HTTP control plane:\n\n- GET /health \n Объявлен в `src/app_runtime/control/http_app.py`. Контекст — fastapi, метод обработчика: `health`.\n\n- GET /actions/{action}, POST /actions/{action} \n Объявлены в `src/app_runtime/control/http_app.py`. Контекст — fastapi, методы обработчиков: `action`.\n\nВозможные кандидаты (полезны, но требуют дополнительного подтверждения):\n\n- HTTP метод: неизвестно, путь: `/` \n Не имеет явных маркеров маршрута, однако может быть точкой старта приложения, так как используется uvicorn thread runner для запуска fastapi application. Требуется дополнительное исследование для точной идентификации маршрутов и контекста обработки.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C3_ENTRYPOINTS" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "HTTP", + "control", + "plane" + ], + "keyword_hints": [ + "HTTP", + "control", + "plane" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C3_ENTRYPOINTS": "exact_path_fetch", + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C3_ENTRYPOINTS": 12, + "C0_SOURCE_CHUNKS": 6 + }, + "filters_by_layer": { + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C3_ENTRYPOINTS", + "query": "Найди точки входа HTTP control plane", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 12, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Найди точки входа HTTP control plane", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "HTTP", + "control", + "plane" + ] + }, + "layers": [ + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 6, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 46, + "retrieval_by_layer": { + "C3_ENTRYPOINTS": 28, + "C0_SOURCE_CHUNKS": 17 + }, + "merge_rank": 0, + "prompt_build": 0, + "llm_call": 1362 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 1139, + "evidence_rows": 9, + "evidence_chars": 6731 + }, + "evidence_summary": [ + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 6, + "unique_paths": 5 + } + ], + "prompt_template_id": "intent_code_qa_find_entrypoints_ru_v3", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "HTTP", + "control", + "plane" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 9, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-v2-find-entrypoints-control-plane", + "mode": "full_chain", + "run_started_at": "2026-03-12T14:07:09", + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Найди точки входа HTTP control plane", + "normalized_query": "Найди точки входа HTTP control plane" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Найди точки входа HTTP control plane" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Найди точки входа HTTP control plane" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "HTTP", + "control", + "plane" + ], + "keyword_hints": [ + "HTTP", + "control", + "plane" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Найди точки входа HTTP control plane" + }, + "output": { + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "HTTP", + "control", + "plane" + ], + "confidence": 0.0 + }, + "rag_count": 9, + "rag_rows": [ + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel(ControlChannel):\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._timeout = timeout\n self._runner = UvicornThreadRunner(host, port, timeout)\n self._factory = HttpControlAppFactory()\n self._actions: ControlActionSet | None = None\n\n async def start(self, actions: ControlActionSet) -> None:\n self._actions = actions\n app = self._factory.create(self._health_response, self._action_response)\n await self._runner.start(app)\n\n async def stop(self) -> None:\n await self._runner.stop()\n\n @property\n def port(self) -> int:\n return self._runner.port\n\n async def _health_response(self) -> dict[str, object]:\n if self._actions is None:\n return {\"status\": \"unhealthy\", \"detail\": \"control actions are not configured\"}\n return await asyncio.wait_for(self._actions.health(), timeout=float(self._timeout))\n\n async def _action_response(self, action: str, _client_source: str = \"unknown\") -> JSONResponse:\n if self._actions is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"{action} handler is not configured\"}, status_code=404)\n callbacks = {\n \"start\": self._actions.start,\n \"stop\": self._actions.stop,\n \"status\": self._actions.status,\n }\n callback = callbacks.get(action)\n if callback is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"unsupported action: {action}\"}, status_code=404)\n action_timeout = max(float(self._timeout), 10.0) if action in {\"start\", \"stop\"} else float(self._timeout)\n try:\n detail = await asyncio.wait_for(callback(), timeout=action_timeout)\n except asyncio.TimeoutError:\n return JSONResponse(\n content={\"status\": \"accepted\", \"detail\": f\"{action} operation is still in progress\"},\n status_code=202,\n )\n except Exception as exc:\n return JSONResponse(content={\"status\": \"error\", \"detail\": str(exc)}, status_code=500)\n return JSONResponse(content={\"status\": \"ok\", \"detail\": detail or f\"{action} action accepted\"}, status_code=200)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_channel.py:HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "class HttpControlAppFactory:\n def create(\n self,\n health_provider: Callable[[], Awaitable[HealthPayload]],\n action_provider: Callable[[str, str], Awaitable[JSONResponse]],\n ) -> FastAPI:\n app = FastAPI(title=\"PLBA Control API\")\n\n @app.middleware(\"http\")\n async def log_api_call(request: Request, call_next): # type: ignore[no-untyped-def]\n started = time.monotonic()\n response = await call_next(request)\n response.headers[\"X-Response-Time-Ms\"] = str(int((time.monotonic() - started) * 1000))\n return response\n\n @app.get(\"/health\")\n async def health() -> JSONResponse:\n payload = await health_provider()\n status_code = 200 if payload.get(\"status\") == \"ok\" else 503\n return JSONResponse(content=payload, status_code=status_code)\n\n @app.get(\"/actions/{action}\")\n @app.post(\"/actions/{action}\")\n async def action(action: str, request: Request) -> JSONResponse:\n client_source = self._client_source(request)\n if action in {\"start\", \"stop\"}:\n LOGGER.warning(\"Control action requested: /actions/%s client=%s\", action, client_source)\n return await action_provider(action, client_source)\n\n return app\n\n def _client_source(self, request: Request) -> str:\n explicit_header = request.headers.get(\"X-Client-Source\", \"\").strip()\n if explicit_header:\n return explicit_header\n user_agent = request.headers.get(\"User-Agent\", \"\").strip()\n if user_agent:\n return f\"user-agent:{user_agent}\"\n return \"unknown\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_app.py:HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlActionSet:\n health: HealthHandler\n start: ActionHandler\n stop: ActionHandler\n status: ActionHandler", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\"ControlActionSet\", \"ControlChannel\", \"ControlPlaneService\", \"HttpControlChannel\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/__init__.py:1-5", + "span_start": 1, + "span_end": 5, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlChannel(ABC):\n @abstractmethod\n async def start(self, actions: ControlActionSet) -> None:\n \"\"\"Start the control channel and bind handlers.\"\"\"\n\n @abstractmethod\n async def stop(self) -> None:\n \"\"\"Stop the control channel and release resources.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "class UvicornThreadRunner:\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._host = host\n self._port = port\n self._timeout = timeout\n self._server: Server | None = None\n self._thread: Thread | None = None\n self._error: BaseException | None = None\n\n async def start(self, app: FastAPI) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._error = None\n config = Config(app=app, host=self._host, port=self._port, log_level=\"warning\")\n self._server = Server(config)\n self._thread = Thread(target=self._serve, name=\"plba-http-control\", daemon=True)\n self._thread.start()\n await self._wait_until_started()\n\n async def stop(self) -> None:\n if self._server is None or self._thread is None:\n return\n self._server.should_exit = True\n await asyncio.to_thread(self._thread.join, self._timeout)\n self._server = None\n self._thread = None\n\n @property\n def port(self) -> int:\n if self._server is None or not getattr(self._server, \"servers\", None):\n return self._port\n socket = self._server.servers[0].sockets[0]\n return int(socket.getsockname()[1])\n\n async def _wait_until_started(self) -> None:\n if self._server is None:\n raise RuntimeError(\"Server is not initialized\")\n deadline = asyncio.get_running_loop().time() + max(float(self._timeout), 1.0)\n while not self._server.started:\n if self._error is not None:\n raise RuntimeError(\"HTTP control server failed to start\") from self._error\n if asyncio.get_running_loop().time() >= deadline:\n raise TimeoutError(\"HTTP control server startup timed out\")\n await asyncio.sleep(0.05)\n\n def _serve(self) -> None:\n if self._server is None:\n return\n try:\n asyncio.run(self._server.serve())\n except BaseException as exc: # noqa: BLE001\n self._error = exc", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_runner.py:UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_runner", + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C3_ENTRYPOINTS": "exact_path_fetch", + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C3_ENTRYPOINTS": 12, + "C0_SOURCE_CHUNKS": 6 + }, + "filters_by_layer": { + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C3_ENTRYPOINTS", + "query": "Найди точки входа HTTP control plane", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 12, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Найди точки входа HTTP control plane", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "HTTP", + "control", + "plane" + ] + }, + "layers": [ + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 6, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 46, + "retrieval_by_layer": { + "C3_ENTRYPOINTS": 28, + "C0_SOURCE_CHUNKS": 17 + }, + "merge_rank": 0 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Найди точки входа HTTP control plane", + "rag_count": 9 + }, + "output": { + "llm_answer": "Подтверждённые точки входа HTTP control plane:\n\n- GET /health \n Объявлен в `src/app_runtime/control/http_app.py`. Контекст — fastapi, метод обработчика: `health`.\n\n- GET /actions/{action}, POST /actions/{action} \n Объявлены в `src/app_runtime/control/http_app.py`. Контекст — fastapi, методы обработчиков: `action`.\n\nВозможные кандидаты (полезны, но требуют дополнительного подтверждения):\n\n- HTTP метод: неизвестно, путь: `/` \n Не имеет явных маркеров маршрута, однако может быть точкой старта приложения, так как используется uvicorn thread runner для запуска fastapi application. Требуется дополнительное исследование для точной идентификации маршрутов и контекста обработки." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 1139, + "evidence_rows": 9, + "evidence_chars": 6731 + }, + "evidence_summary": [ + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 6, + "unique_paths": 5 + } + ], + "prompt_template_id": "intent_code_qa_find_entrypoints_ru_v3", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 1362 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-control-plane.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-control-plane.md new file mode 100644 index 0000000..40a749d --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-control-plane.md @@ -0,0 +1,33 @@ +# plba-v2-find-entrypoints-control-plane + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Найди точки входа HTTP control plane + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 9, + "llm_answer": "Подтверждённые точки входа HTTP control plane:\n\n- GET /health \n Объявлен в `src/app_runtime/control/http_app.py`. Контекст — fastapi, метод обработчика: `health`.\n\n- GET /actions/{action}, POST /actions/{action} \n Объявлены в `src/app_runtime/control/http_app.py`. Контекст — fastapi, методы обработчиков: `action`.\n\nВозможные кандидаты (полезны, но требуют дополнительного подтверждения):\n\n- HTTP метод: неизвестно, путь: `/` \n Не имеет явных маркеров маршрута, однако может быть точкой старта приложения, так как используется uvicorn thread runner для запуска fastapi application. Требуется дополнительное исследование для точной идентификации маршрутов и контекста обработки.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "HTTP", + "control", + "plane" + ], + "layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-health-endpoint.json b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-health-endpoint.json new file mode 100644 index 0000000..0d10c71 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-health-endpoint.json @@ -0,0 +1,1226 @@ +{ + "case_id": "plba-v2-find-entrypoints-health-endpoint", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 9, + "llm_answer": "Подтверждённый health-endpoint обнаружен по следующим точкам входа:\n\n- HTTP GET `/health \n Объявлен в файле `src/app_runtime/control/http_app.py`, обслуживается FastAPI.\n\nКандидаты на health-endpoint (без явных маркеров route):\n- Нет явных неподтвержденных кандидатов.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "health", + "endpoint" + ], + "layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-v2-find-entrypoints-health-endpoint", + "text": "Где health endpoint?", + "mode": "full_chain", + "run_started_at": "2026-03-12T14:07:09", + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Где health endpoint?", + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "health", + "endpoint" + ], + "confidence": 0.0 + }, + "rag_count": 9, + "rag_rows": [ + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/health/registry.py", + "content": "class HealthRegistry:\n def __init__(self) -> None:\n self._contributors: list[HealthContributor] = []\n\n def register(self, contributor: HealthContributor) -> None:\n self._contributors.append(contributor)\n\n def contributor_healths(self) -> list[WorkerHealth]:\n return [contributor.health() for contributor in self._contributors]\n\n def snapshot(self, worker_healths: list[WorkerHealth]) -> dict[str, object]:\n component_healths = worker_healths + self.contributor_healths()\n return {\n \"status\": self._aggregate_status(component_healths),\n \"components\": [self._health_dict(item) for item in component_healths],\n }\n\n def payload(self, state: LifecycleState, worker_healths: list[WorkerHealth]) -> HealthPayload:\n component_healths = worker_healths + self.contributor_healths()\n if state == LifecycleState.STOPPED:\n return {\"status\": \"unhealthy\", \"detail\": \"state=stopped\", \"state\": state.value}\n if state in {LifecycleState.STARTING, LifecycleState.STOPPING}:\n return {\n \"status\": \"degraded\",\n \"detail\": f\"state={state.value}\",\n \"state\": state.value,\n \"components\": [self._health_dict(item) for item in component_healths],\n }\n return {\n \"status\": self._aggregate_status(component_healths),\n \"state\": state.value,\n \"components\": [self._health_dict(item) for item in component_healths],\n }\n\n def _aggregate_status(self, component_healths: list[WorkerHealth]) -> str:\n if any(item.status == \"unhealthy\" and item.critical for item in component_healths):\n return \"unhealthy\"\n if any(item.status in {\"degraded\", \"unhealthy\"} for item in component_healths):\n return \"degraded\"\n return \"ok\"\n\n def _health_dict(self, health: WorkerHealth) -> dict[str, object]:\n return {\n \"name\": health.name,\n \"status\": health.status,\n \"critical\": health.critical,\n \"detail\": health.detail,\n \"meta\": health.meta,\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/health/registry.py:HealthRegistry", + "span_start": 8, + "span_end": 56, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.health.registry", + "is_test": false, + "blob_sha": "26e6a24daa43407ba5340b74497c20153020e79f8d7828ae502aaec378dfcf75", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/health.py", + "content": "from app_runtime.health.registry import HealthRegistry\n\n__all__ = [\"HealthRegistry\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/health/__init__.py:1-3", + "span_start": 1, + "span_end": 3, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.health.__init__", + "is_test": false, + "blob_sha": "f7b15eed8b1f1cca8dfd467909a2612d8cb4e66e46b972ad89a0c9459ce283a0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/health.py", + "content": "class HealthContributor(ABC):\n @abstractmethod\n def health(self) -> WorkerHealth:\n \"\"\"Return contributor health state.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/contracts/health.py:HealthContributor", + "span_start": 7, + "span_end": 10, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.health", + "is_test": false, + "blob_sha": "6bd92611def7131e32d4dd34a8ed85e6cf3c67722ad27797032a632cb30dc097", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/health/__init__.py", + "content": "from app_runtime.health.registry import HealthRegistry\n\n__all__ = [\"HealthRegistry\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/health/__init__.py:1-3", + "span_start": 1, + "span_end": 3, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.health.__init__", + "is_test": false, + "blob_sha": "f7b15eed8b1f1cca8dfd467909a2612d8cb4e66e46b972ad89a0c9459ce283a0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/worker.py", + "content": "class WorkerHealth:\n name: str\n status: HealthState\n critical: bool\n detail: str | None = None\n meta: dict[str, Any] = field(default_factory=dict)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/contracts/worker.py:WorkerHealth", + "span_start": 13, + "span_end": 18, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.worker", + "is_test": false, + "blob_sha": "e4827d32220f322d8adc3e42769da3ca0cc680db6a5eab7a11f4d8773a75304e", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/worker.py", + "content": "class Worker(ABC):\n @property\n @abstractmethod\n def name(self) -> str:\n \"\"\"Stable worker name for diagnostics.\"\"\"\n\n @property\n @abstractmethod\n def critical(self) -> bool:\n \"\"\"Whether this worker is required for healthy app operation.\"\"\"\n\n @abstractmethod\n def start(self) -> None:\n \"\"\"Start worker execution.\"\"\"\n\n @abstractmethod\n def stop(self, force: bool = False) -> None:\n \"\"\"Request graceful or immediate stop.\"\"\"\n\n @abstractmethod\n def health(self) -> WorkerHealth:\n \"\"\"Return current health state.\"\"\"\n\n @abstractmethod\n def status(self) -> WorkerStatus:\n \"\"\"Return current runtime status.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/contracts/worker.py:Worker", + "span_start": 30, + "span_end": 55, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 2, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.worker", + "is_test": false, + "blob_sha": "e4827d32220f322d8adc3e42769da3ca0cc680db6a5eab7a11f4d8773a75304e", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "Подтверждённый health-endpoint обнаружен по следующим точкам входа:\n\n- HTTP GET `/health \n Объявлен в файле `src/app_runtime/control/http_app.py`, обслуживается FastAPI.\n\nКандидаты на health-endpoint (без явных маркеров route):\n- Нет явных неподтвержденных кандидатов.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C3_ENTRYPOINTS" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "unknown", + "symbol_candidates": [ + "health", + "endpoint" + ], + "keyword_hints": [ + "health", + "endpoint" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C3_ENTRYPOINTS": "exact_path_fetch", + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C3_ENTRYPOINTS": 12, + "C0_SOURCE_CHUNKS": 6 + }, + "filters_by_layer": { + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C3_ENTRYPOINTS", + "query": "Где health endpoint?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 12, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Где health endpoint?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "health", + "endpoint" + ] + }, + "layers": [ + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 6, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 33, + "retrieval_by_layer": { + "C3_ENTRYPOINTS": 19, + "C0_SOURCE_CHUNKS": 13 + }, + "merge_rank": 0, + "prompt_build": 0, + "llm_call": 717 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 848, + "evidence_rows": 9, + "evidence_chars": 3350 + }, + "evidence_summary": [ + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 6, + "unique_paths": 5 + } + ], + "prompt_template_id": "intent_code_qa_find_entrypoints_ru_v3", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "health", + "endpoint" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 9, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-v2-find-entrypoints-health-endpoint", + "mode": "full_chain", + "run_started_at": "2026-03-12T14:07:09", + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Где health endpoint?", + "normalized_query": "Где health endpoint?" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Где health endpoint?" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Где health endpoint?" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "unknown", + "symbol_candidates": [ + "health", + "endpoint" + ], + "keyword_hints": [ + "health", + "endpoint" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Где health endpoint?" + }, + "output": { + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "health", + "endpoint" + ], + "confidence": 0.0 + }, + "rag_count": 9, + "rag_rows": [ + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/health/registry.py", + "content": "class HealthRegistry:\n def __init__(self) -> None:\n self._contributors: list[HealthContributor] = []\n\n def register(self, contributor: HealthContributor) -> None:\n self._contributors.append(contributor)\n\n def contributor_healths(self) -> list[WorkerHealth]:\n return [contributor.health() for contributor in self._contributors]\n\n def snapshot(self, worker_healths: list[WorkerHealth]) -> dict[str, object]:\n component_healths = worker_healths + self.contributor_healths()\n return {\n \"status\": self._aggregate_status(component_healths),\n \"components\": [self._health_dict(item) for item in component_healths],\n }\n\n def payload(self, state: LifecycleState, worker_healths: list[WorkerHealth]) -> HealthPayload:\n component_healths = worker_healths + self.contributor_healths()\n if state == LifecycleState.STOPPED:\n return {\"status\": \"unhealthy\", \"detail\": \"state=stopped\", \"state\": state.value}\n if state in {LifecycleState.STARTING, LifecycleState.STOPPING}:\n return {\n \"status\": \"degraded\",\n \"detail\": f\"state={state.value}\",\n \"state\": state.value,\n \"components\": [self._health_dict(item) for item in component_healths],\n }\n return {\n \"status\": self._aggregate_status(component_healths),\n \"state\": state.value,\n \"components\": [self._health_dict(item) for item in component_healths],\n }\n\n def _aggregate_status(self, component_healths: list[WorkerHealth]) -> str:\n if any(item.status == \"unhealthy\" and item.critical for item in component_healths):\n return \"unhealthy\"\n if any(item.status in {\"degraded\", \"unhealthy\"} for item in component_healths):\n return \"degraded\"\n return \"ok\"\n\n def _health_dict(self, health: WorkerHealth) -> dict[str, object]:\n return {\n \"name\": health.name,\n \"status\": health.status,\n \"critical\": health.critical,\n \"detail\": health.detail,\n \"meta\": health.meta,\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/health/registry.py:HealthRegistry", + "span_start": 8, + "span_end": 56, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.health.registry", + "is_test": false, + "blob_sha": "26e6a24daa43407ba5340b74497c20153020e79f8d7828ae502aaec378dfcf75", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/health.py", + "content": "from app_runtime.health.registry import HealthRegistry\n\n__all__ = [\"HealthRegistry\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/health/__init__.py:1-3", + "span_start": 1, + "span_end": 3, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.health.__init__", + "is_test": false, + "blob_sha": "f7b15eed8b1f1cca8dfd467909a2612d8cb4e66e46b972ad89a0c9459ce283a0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/health.py", + "content": "class HealthContributor(ABC):\n @abstractmethod\n def health(self) -> WorkerHealth:\n \"\"\"Return contributor health state.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/contracts/health.py:HealthContributor", + "span_start": 7, + "span_end": 10, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.health", + "is_test": false, + "blob_sha": "6bd92611def7131e32d4dd34a8ed85e6cf3c67722ad27797032a632cb30dc097", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/health/__init__.py", + "content": "from app_runtime.health.registry import HealthRegistry\n\n__all__ = [\"HealthRegistry\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/health/__init__.py:1-3", + "span_start": 1, + "span_end": 3, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.health.__init__", + "is_test": false, + "blob_sha": "f7b15eed8b1f1cca8dfd467909a2612d8cb4e66e46b972ad89a0c9459ce283a0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/worker.py", + "content": "class WorkerHealth:\n name: str\n status: HealthState\n critical: bool\n detail: str | None = None\n meta: dict[str, Any] = field(default_factory=dict)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/contracts/worker.py:WorkerHealth", + "span_start": 13, + "span_end": 18, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.worker", + "is_test": false, + "blob_sha": "e4827d32220f322d8adc3e42769da3ca0cc680db6a5eab7a11f4d8773a75304e", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/worker.py", + "content": "class Worker(ABC):\n @property\n @abstractmethod\n def name(self) -> str:\n \"\"\"Stable worker name for diagnostics.\"\"\"\n\n @property\n @abstractmethod\n def critical(self) -> bool:\n \"\"\"Whether this worker is required for healthy app operation.\"\"\"\n\n @abstractmethod\n def start(self) -> None:\n \"\"\"Start worker execution.\"\"\"\n\n @abstractmethod\n def stop(self, force: bool = False) -> None:\n \"\"\"Request graceful or immediate stop.\"\"\"\n\n @abstractmethod\n def health(self) -> WorkerHealth:\n \"\"\"Return current health state.\"\"\"\n\n @abstractmethod\n def status(self) -> WorkerStatus:\n \"\"\"Return current runtime status.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/contracts/worker.py:Worker", + "span_start": 30, + "span_end": 55, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 2, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.worker", + "is_test": false, + "blob_sha": "e4827d32220f322d8adc3e42769da3ca0cc680db6a5eab7a11f4d8773a75304e", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C3_ENTRYPOINTS": "exact_path_fetch", + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C3_ENTRYPOINTS": 12, + "C0_SOURCE_CHUNKS": 6 + }, + "filters_by_layer": { + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C3_ENTRYPOINTS", + "query": "Где health endpoint?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 12, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Где health endpoint?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "health", + "endpoint" + ] + }, + "layers": [ + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 6, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 33, + "retrieval_by_layer": { + "C3_ENTRYPOINTS": 19, + "C0_SOURCE_CHUNKS": 13 + }, + "merge_rank": 0 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Где health endpoint?", + "rag_count": 9 + }, + "output": { + "llm_answer": "Подтверждённый health-endpoint обнаружен по следующим точкам входа:\n\n- HTTP GET `/health \n Объявлен в файле `src/app_runtime/control/http_app.py`, обслуживается FastAPI.\n\nКандидаты на health-endpoint (без явных маркеров route):\n- Нет явных неподтвержденных кандидатов." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 848, + "evidence_rows": 9, + "evidence_chars": 3350 + }, + "evidence_summary": [ + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 6, + "unique_paths": 5 + } + ], + "prompt_template_id": "intent_code_qa_find_entrypoints_ru_v3", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 717 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-health-endpoint.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-health-endpoint.md new file mode 100644 index 0000000..3b369c8 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-health-endpoint.md @@ -0,0 +1,32 @@ +# plba-v2-find-entrypoints-health-endpoint + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Где health endpoint? + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 9, + "llm_answer": "Подтверждённый health-endpoint обнаружен по следующим точкам входа:\n\n- HTTP GET `/health \n Объявлен в файле `src/app_runtime/control/http_app.py`, обслуживается FastAPI.\n\nКандидаты на health-endpoint (без явных маркеров route):\n- Нет явных неподтвержденных кандидатов.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "health", + "endpoint" + ], + "layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-find-tests-create-runtime.json b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-find-tests-create-runtime.json new file mode 100644 index 0000000..e86badd --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-find-tests-create-runtime.json @@ -0,0 +1,1963 @@ +{ + "case_id": "plba-v2-find-tests-create-runtime", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 16, + "llm_answer": "Прямых тестов конкретно для функции `create_runtime` в предоставленном контексте не обнаружено. Её имя не упоминается явно ни в объявлениях (C1), ни в зависимостях (C2), а также отсутствуют явные проверки поведения этой функции.\n\nОднако можно заметить косвенное упоминание о создании runtime через функцию `_build_runtime`, которая используется в тестах:\n\n- В тесте `tests/test_business_control_actions.py:_build_runtime` происходит создание runtime при помощи вызова функции `RuntimeManager()`.\n- Тесты `test_worker_wakes_up_with_configured_interval` и `test_actions_stop_busy_worker_after_timeout` используют блокирующий режим работы и взаимодействуют с worker'ами внутри runtime, но напрямую на `create_runtime` это не указывает.\n\nТаким образом, хотя тестов с прямым названием `create_runtime` нет, косвенно проверка создания runtime осуществляется через взаимодействие с её результатами в функциях `_build_runtime`.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "create_runtime" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-v2-find-tests-create-runtime", + "text": "Где тесты для create_runtime?", + "mode": "full_chain", + "run_started_at": "2026-03-12T14:07:09", + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Где тесты для create_runtime?", + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "create_runtime" + ], + "confidence": 0.0 + }, + "rag_count": 16, + "rag_rows": [ + { + "path": "tests/test_runtime.py", + "content": "test_public_plba_package_exports_runtime_builder_and_worker_contract imports plba.create_runtime", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_public_plba_package_exports_runtime_builder_and_worker_contract:imports", + "span_start": 349, + "span_end": 349, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e93f80075cd9988737ece3cb5ec659c542132c4d383646e376917bfd0cb6ea64", + "edge_type": "imports", + "src_symbol_id": "ed06ffc5afb8a863cf7da3e40921f17abe4eec2a0770139e3380d93ccaae604a", + "src_qname": "test_public_plba_package_exports_runtime_builder_and_worker_contract", + "dst_symbol_id": null, + "dst_ref": "plba.create_runtime", + "resolution": "partial", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "test_public_plba_package_exports_runtime_builder_and_worker_contract calls create_runtime", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_public_plba_package_exports_runtime_builder_and_worker_contract:calls", + "span_start": 399, + "span_end": 399, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "039939355230de826d8bf7607f55fc59c7d932e5570ecb78994d0f13e57e8488", + "edge_type": "calls", + "src_symbol_id": "ed06ffc5afb8a863cf7da3e40921f17abe4eec2a0770139e3380d93ccaae604a", + "src_qname": "test_public_plba_package_exports_runtime_builder_and_worker_contract", + "dst_symbol_id": null, + "dst_ref": "create_runtime", + "resolution": "partial", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_worker_wakes_up_with_configured_interval\n -> ScenarioWorker\n -> ScenarioWorker.__init__\n -> ScenarioWorker._name\n -> ScenarioWorker.name", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_worker_wakes_up_with_configured_interval:dataflow_slice", + "span_start": 52, + "span_end": 166, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "2fd137f5852febe907f44d3b3e4ea430f89ccfe962ae1442a16ab9df64c8f76c", + "edge_type": "dataflow_slice", + "src_symbol_id": "65f877f78191d65e6a752e41cedc70ebc784c266804a55c1c56440336e1f0d6e", + "src_qname": "test_worker_wakes_up_with_configured_interval", + "dst_symbol_id": "da022da2c49fd9cfd09d6e6da6bbd59aaa7d28efd669ce8444e88d327ddec2fc", + "dst_ref": "ScenarioWorker.name", + "resolution": "resolved", + "slice_id": "2fd137f5852febe907f44d3b3e4ea430f89ccfe962ae1442a16ab9df64c8f76c", + "root_symbol_id": "65f877f78191d65e6a752e41cedc70ebc784c266804a55c1c56440336e1f0d6e", + "path_symbols": [ + "test_worker_wakes_up_with_configured_interval", + "ScenarioWorker", + "ScenarioWorker.__init__", + "ScenarioWorker._name", + "ScenarioWorker.name" + ], + "path_symbol_ids": [ + "65f877f78191d65e6a752e41cedc70ebc784c266804a55c1c56440336e1f0d6e", + "9a1d08a7eb1831c9f2e0db361b5207f036e477c160773ae08c0b287239785c52", + "9c20be046ba06644d1432e0f20eb223663d2b116ee7d91fdc62bc68323f2e593", + "da022da2c49fd9cfd09d6e6da6bbd59aaa7d28efd669ce8444e88d327ddec2fc" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_actions_stop_busy_worker_after_timeout\n -> BlockingRoutine\n -> BlockingRoutine.__init__\n -> BlockingRoutine._started\n -> BlockingRoutine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_actions_stop_busy_worker_after_timeout:dataflow_slice", + "span_start": 42, + "span_end": 238, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "8e7db3d2a9226f1c1d9942ac6373cfcafa0d2276758ddb8a3d3c455a3d58024d", + "edge_type": "dataflow_slice", + "src_symbol_id": "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "src_qname": "test_actions_stop_busy_worker_after_timeout", + "dst_symbol_id": "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04", + "dst_ref": "BlockingRoutine.run", + "resolution": "resolved", + "slice_id": "8e7db3d2a9226f1c1d9942ac6373cfcafa0d2276758ddb8a3d3c455a3d58024d", + "root_symbol_id": "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "path_symbols": [ + "test_actions_stop_busy_worker_after_timeout", + "BlockingRoutine", + "BlockingRoutine.__init__", + "BlockingRoutine._started", + "BlockingRoutine.run" + ], + "path_symbol_ids": [ + "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "a3349c5bc65e4003a4bbd6a8dbb7a54c337e12d1aed930caa701b12e520f1e67", + "486deeed3043c6db985aef258e96ddc67aa53608e67a83962fbd2471f649ddf1", + "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_actions_stop_busy_worker_after_timeout\n -> BlockingRoutine\n -> BlockingRoutine.__init__\n -> BlockingRoutine._release\n -> BlockingRoutine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_actions_stop_busy_worker_after_timeout:dataflow_slice", + "span_start": 43, + "span_end": 238, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "b59da9da82f9dfc8a9b695a08213786385da1ae9e17561ec3a0450a574a8cb39", + "edge_type": "dataflow_slice", + "src_symbol_id": "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "src_qname": "test_actions_stop_busy_worker_after_timeout", + "dst_symbol_id": "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04", + "dst_ref": "BlockingRoutine.run", + "resolution": "resolved", + "slice_id": "b59da9da82f9dfc8a9b695a08213786385da1ae9e17561ec3a0450a574a8cb39", + "root_symbol_id": "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "path_symbols": [ + "test_actions_stop_busy_worker_after_timeout", + "BlockingRoutine", + "BlockingRoutine.__init__", + "BlockingRoutine._release", + "BlockingRoutine.run" + ], + "path_symbol_ids": [ + "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "a3349c5bc65e4003a4bbd6a8dbb7a54c337e12d1aed930caa701b12e520f1e67", + "486deeed3043c6db985aef258e96ddc67aa53608e67a83962fbd2471f649ddf1", + "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_actions_stop_busy_worker_before_timeout\n -> BlockingRoutine\n -> BlockingRoutine.__init__\n -> BlockingRoutine._started\n -> BlockingRoutine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_actions_stop_busy_worker_before_timeout:dataflow_slice", + "span_start": 42, + "span_end": 212, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "f9bcce108870e49afa8b32d4625115a10707a3b0e7473179e958e5752bf258b4", + "edge_type": "dataflow_slice", + "src_symbol_id": "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "src_qname": "test_actions_stop_busy_worker_before_timeout", + "dst_symbol_id": "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04", + "dst_ref": "BlockingRoutine.run", + "resolution": "resolved", + "slice_id": "f9bcce108870e49afa8b32d4625115a10707a3b0e7473179e958e5752bf258b4", + "root_symbol_id": "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "path_symbols": [ + "test_actions_stop_busy_worker_before_timeout", + "BlockingRoutine", + "BlockingRoutine.__init__", + "BlockingRoutine._started", + "BlockingRoutine.run" + ], + "path_symbol_ids": [ + "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "a3349c5bc65e4003a4bbd6a8dbb7a54c337e12d1aed930caa701b12e520f1e67", + "486deeed3043c6db985aef258e96ddc67aa53608e67a83962fbd2471f649ddf1", + "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "def test_public_plba_package_exports_runtime_builder_and_worker_contract(tmp_path) -> None:\n import plba\n from plba import ApplicationModule as PublicApplicationModule\n from plba import InMemoryTaskQueue\n from plba import Worker as PublicWorker\n from plba import WorkerHealth as PublicWorkerHealth\n from plba import WorkerStatus as PublicWorkerStatus\n from plba import create_runtime\n\n config_path = tmp_path / \"config.yml\"\n config_path.write_text(\"platform: {}\\n\", encoding=\"utf-8\")\n\n queue = InMemoryTaskQueue[int]()\n queue.put(2)\n assert queue.get(timeout=0.01) == 2\n queue.task_done()\n\n class PublicRoutine:\n def __init__(self) -> None:\n self.runs = 0\n\n def run(self) -> None:\n if self.runs == 0:\n self.runs += 1\n\n class PublicWorkerImpl(PublicWorker):\n def __init__(self, routine: PublicRoutine) -> None:\n self._inner = RoutineWorker(\"public-worker\", routine)\n\n @property\n def name(self) -> str:\n return self._inner.name\n\n @property\n def critical(self) -> bool:\n return self._inner.critical\n\n def start(self) -> None:\n self._inner.start()\n\n def stop(self, force: bool = False) -> None:\n self._inner.stop(force=force)\n\n def health(self) -> PublicWorkerHealth:\n return self._inner.health()\n\n def status(self) -> PublicWorkerStatus:\n return self._inner.status()\n\n class PublicExampleModule(PublicApplicationModule):\n @property\n def name(self) -> str:\n return \"public-example\"\n\n def register(self, registry: ModuleRegistry) -> None:\n registry.add_worker(PublicWorkerImpl(PublicRoutine()))\n\n runtime = create_runtime(PublicExampleModule(), config_path=str(config_path))\n runtime.start()\n sleep(0.2)\n assert runtime.configuration.get() == {\"platform\": {}}\n assert runtime.status()[\"workers\"][\"registered\"] == 1\n assert hasattr(plba, \"QueueWorker\") is False\n runtime.stop()", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_runtime.py:test_public_plba_package_exports_runtime_builder_and_worker_contract", + "span_start": 342, + "span_end": 405, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 13, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _build_runtime(worker: Worker, *, control_timeout: int = 1) -> tuple[RuntimeManager, str]:\n runtime = RuntimeManager()\n channel = HttpControlChannel(host=\"127.0.0.1\", port=0, timeout=control_timeout)\n runtime.control_plane.register_channel(channel)\n runtime.register_module(WorkerModule(worker))\n runtime.start()\n return runtime, f\"http://127.0.0.1:{channel.port}\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_build_runtime", + "span_start": 154, + "span_end": 160, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 6, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class IntervalRoutine:\n calls: list[float] = field(default_factory=list)\n _lock: Lock = field(default_factory=Lock)\n\n def run(self) -> None:\n with self._lock:\n self.calls.append(monotonic())\n\n def wait_runs(self, count: int, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n with self._lock:\n if len(self.calls) >= count:\n return True\n sleep(0.01)\n return False\n\n def deltas(self) -> list[float]:\n with self._lock:\n return [self.calls[index + 1] - self.calls[index] for index in range(len(self.calls) - 1)]", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:IntervalRoutine", + "span_start": 18, + "span_end": 37, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class ScenarioWorker(Worker):\n def __init__(self, name: str, routine: object, *, interval: float = 0.05) -> None:\n self._name = name\n self._routine = routine\n self._interval = interval\n self._thread: Thread | None = None\n self._stop_requested = Event()\n self._in_flight = 0\n self._runs = 0\n self._lock = Lock()\n\n @property\n def name(self) -> str:\n return self._name\n\n @property\n def critical(self) -> bool:\n return True\n\n def start(self) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._stop_requested.clear()\n self._thread = Thread(target=self._loop, name=f\"{self._name}-thread\", daemon=True)\n self._thread.start()\n\n def stop(self, force: bool = False) -> None:\n self._stop_requested.set()\n\n def health(self) -> WorkerHealth:\n return WorkerHealth(name=self.name, status=\"ok\", critical=True, meta={\"runs\": self._runs})\n\n def status(self) -> WorkerStatus:\n thread_alive = self._thread is not None and self._thread.is_alive()\n with self._lock:\n in_flight = self._in_flight\n runs = self._runs\n if not thread_alive:\n state = \"stopped\"\n elif self._stop_requested.is_set():\n state = \"stopping\"\n elif in_flight > 0:\n state = \"busy\"\n else:\n state = \"idle\"\n return WorkerStatus(name=self.name, state=state, in_flight=in_flight, meta={\"runs\": runs})\n\n def _loop(self) -> None:\n while not self._stop_requested.is_set():\n with self._lock:\n self._in_flight += 1\n try:\n self._routine.run()\n with self._lock:\n self._runs += 1\n finally:\n with self._lock:\n self._in_flight -= 1\n if self._stop_requested.is_set():\n return\n sleep(self._interval)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:ScenarioWorker", + "span_start": 50, + "span_end": 110, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 2, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _http_call_json(\n base_url: str,\n path: str,\n *,\n method: str = \"GET\",\n headers: dict[str, str] | None = None,\n) -> tuple[int, dict[str, object]]:\n request = Request(f\"{base_url}{path}\", method=method, headers=headers or {})\n try:\n with urlopen(request, timeout=15.0) as response:\n status = response.status\n body = response.read()\n except HTTPError as error:\n status = error.code\n body = error.read()\n payload = json.loads(body.decode(\"utf-8\"))\n return status, payload", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_http_call_json", + "span_start": 125, + "span_end": 141, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 4, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _poll_until_stopped(base_url: str, timeout: float = 2.0) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n _, payload = _http_call_json(base_url, \"/actions/status\")\n if payload.get(\"detail\") == \"stopped\":\n return True\n sleep(0.05)\n return False", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_poll_until_stopped", + "span_start": 144, + "span_end": 151, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 5, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def test_worker_wakes_up_with_configured_interval() -> None:\n interval = 0.15\n routine = IntervalRoutine()\n worker = ScenarioWorker(\"interval-worker\", routine, interval=interval)\n runtime = RuntimeManager()\n runtime.register_module(WorkerModule(worker))\n\n runtime.start()\n try:\n assert routine.wait_runs(count=3, timeout=2.0) is True\n finally:\n runtime.stop()\n\n deltas = routine.deltas()\n assert len(deltas) >= 2\n assert all(delta >= interval * 0.7 for delta in deltas[:2])", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:test_worker_wakes_up_with_configured_interval", + "span_start": 163, + "span_end": 178, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 7, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class WorkerModule(ApplicationModule):\n def __init__(self, worker: Worker) -> None:\n self._worker = worker\n\n @property\n def name(self) -> str:\n return \"business-tests\"\n\n def register(self, registry: ModuleRegistry) -> None:\n registry.add_worker(self._worker)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:WorkerModule", + "span_start": 113, + "span_end": 122, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 3, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class BlockingRoutine:\n def __init__(self, started: Event, release: Event) -> None:\n self._started = started\n self._release = release\n\n def run(self) -> None:\n self._started.set()\n self._release.wait(timeout=5.0)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:BlockingRoutine", + "span_start": 40, + "span_end": 47, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def test_actions_start_stop_and_health_when_worker_is_idle() -> None:\n runtime, base_url = _build_runtime(ScenarioWorker(\"idle-worker\", IntervalRoutine(), interval=0.2))\n try:\n stop_status, stop_payload = _http_call_json(base_url, \"/actions/stop\", method=\"POST\")\n assert stop_status == 200\n assert isinstance(stop_payload.get(\"detail\"), dict)\n assert stop_payload[\"detail\"][\"timed_out\"] is False\n assert stop_payload[\"detail\"][\"state\"] == \"stopped\"\n\n health_stopped_status, health_stopped_payload = _http_call_json(base_url, \"/health\")\n assert health_stopped_status == 503\n assert health_stopped_payload[\"state\"] == \"stopped\"\n assert health_stopped_payload[\"status\"] == \"unhealthy\"\n\n start_status, start_payload = _http_call_json(base_url, \"/actions/start\", method=\"POST\")\n assert start_status == 200\n assert isinstance(start_payload.get(\"detail\"), dict)\n assert start_payload[\"detail\"][\"timed_out\"] is False\n assert start_payload[\"detail\"][\"state\"] in {\"idle\", \"busy\"}\n\n health_started_status, health_started_payload = _http_call_json(base_url, \"/health\")\n assert health_started_status == 200\n assert health_started_payload[\"status\"] == \"ok\"\n assert health_started_payload[\"state\"] in {\"idle\", \"busy\"}\n finally:\n runtime.stop()", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:test_actions_start_stop_and_health_when_worker_is_idle", + "span_start": 181, + "span_end": 206, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 8, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "Прямых тестов конкретно для функции `create_runtime` в предоставленном контексте не обнаружено. Её имя не упоминается явно ни в объявлениях (C1), ни в зависимостях (C2), а также отсутствуют явные проверки поведения этой функции.\n\nОднако можно заметить косвенное упоминание о создании runtime через функцию `_build_runtime`, которая используется в тестах:\n\n- В тесте `tests/test_business_control_actions.py:_build_runtime` происходит создание runtime при помощи вызова функции `RuntimeManager()`.\n- Тесты `test_worker_wakes_up_with_configured_interval` и `test_actions_stop_busy_worker_after_timeout` используют блокирующий режим работы и взаимодействуют с worker'ами внутри runtime, но напрямую на `create_runtime` это не указывает.\n\nТаким образом, хотя тестов с прямым названием `create_runtime` нет, косвенно проверка создания runtime осуществляется через взаимодействие с её результатами в функциях `_build_runtime`.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C2_DEPENDENCY_GRAPH" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "function", + "symbol_candidates": [ + "create_runtime" + ], + "keyword_hints": [ + "create_runtime" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "test_file_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "test_symbol_patterns": [ + "test_create_runtime", + "Testcreate_runtime", + "create_runtime" + ], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C0_SOURCE_CHUNKS": 10 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src", + "tests" + ], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src", + "tests" + ], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "create_runtime", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Где тесты для create_runtime? test_create_runtime Testcreate_runtime create_runtime", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Где тесты для create_runtime? test_create_runtime Testcreate_runtime create_runtime", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 10, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 0, + "candidates_after_filter": 0 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src", + "tests" + ], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src", + "tests" + ], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 10, + "candidates_after_filter": 10 + } + ], + "fallback": { + "used": true, + "reason": "scope_relaxed_no_hits" + }, + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "create_runtime" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "miss", + "hit_count": 0, + "fail_reason": "scope_relaxed_no_hits" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 10, + "fail_reason": null + } + ] + }, + "constraint_violations": [ + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C1_SYMBOL_CATALOG", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + } + ], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 121, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 53, + "C2_DEPENDENCY_GRAPH": 48, + "C0_SOURCE_CHUNKS": 18 + }, + "merge_rank": 0, + "prompt_build": 0, + "llm_call": 1565 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 1001, + "evidence_rows": 16, + "evidence_chars": 9185 + }, + "evidence_summary": [ + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 2 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 10, + "unique_paths": 2 + } + ], + "prompt_template_id": "intent_code_qa_find_tests_ru_v3", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "create_runtime" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 16, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-v2-find-tests-create-runtime", + "mode": "full_chain", + "run_started_at": "2026-03-12T14:07:09", + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Где тесты для create_runtime?", + "normalized_query": "Где тесты для create_runtime?" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Где тесты для create_runtime?" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Где тесты для create_runtime?" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "function", + "symbol_candidates": [ + "create_runtime" + ], + "keyword_hints": [ + "create_runtime" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "test_file_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "test_symbol_patterns": [ + "test_create_runtime", + "Testcreate_runtime", + "create_runtime" + ], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Где тесты для create_runtime?" + }, + "output": { + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "create_runtime" + ], + "confidence": 0.0 + }, + "rag_count": 16, + "rag_rows": [ + { + "path": "tests/test_runtime.py", + "content": "test_public_plba_package_exports_runtime_builder_and_worker_contract imports plba.create_runtime", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_public_plba_package_exports_runtime_builder_and_worker_contract:imports", + "span_start": 349, + "span_end": 349, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e93f80075cd9988737ece3cb5ec659c542132c4d383646e376917bfd0cb6ea64", + "edge_type": "imports", + "src_symbol_id": "ed06ffc5afb8a863cf7da3e40921f17abe4eec2a0770139e3380d93ccaae604a", + "src_qname": "test_public_plba_package_exports_runtime_builder_and_worker_contract", + "dst_symbol_id": null, + "dst_ref": "plba.create_runtime", + "resolution": "partial", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "test_public_plba_package_exports_runtime_builder_and_worker_contract calls create_runtime", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_public_plba_package_exports_runtime_builder_and_worker_contract:calls", + "span_start": 399, + "span_end": 399, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "039939355230de826d8bf7607f55fc59c7d932e5570ecb78994d0f13e57e8488", + "edge_type": "calls", + "src_symbol_id": "ed06ffc5afb8a863cf7da3e40921f17abe4eec2a0770139e3380d93ccaae604a", + "src_qname": "test_public_plba_package_exports_runtime_builder_and_worker_contract", + "dst_symbol_id": null, + "dst_ref": "create_runtime", + "resolution": "partial", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_worker_wakes_up_with_configured_interval\n -> ScenarioWorker\n -> ScenarioWorker.__init__\n -> ScenarioWorker._name\n -> ScenarioWorker.name", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_worker_wakes_up_with_configured_interval:dataflow_slice", + "span_start": 52, + "span_end": 166, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "2fd137f5852febe907f44d3b3e4ea430f89ccfe962ae1442a16ab9df64c8f76c", + "edge_type": "dataflow_slice", + "src_symbol_id": "65f877f78191d65e6a752e41cedc70ebc784c266804a55c1c56440336e1f0d6e", + "src_qname": "test_worker_wakes_up_with_configured_interval", + "dst_symbol_id": "da022da2c49fd9cfd09d6e6da6bbd59aaa7d28efd669ce8444e88d327ddec2fc", + "dst_ref": "ScenarioWorker.name", + "resolution": "resolved", + "slice_id": "2fd137f5852febe907f44d3b3e4ea430f89ccfe962ae1442a16ab9df64c8f76c", + "root_symbol_id": "65f877f78191d65e6a752e41cedc70ebc784c266804a55c1c56440336e1f0d6e", + "path_symbols": [ + "test_worker_wakes_up_with_configured_interval", + "ScenarioWorker", + "ScenarioWorker.__init__", + "ScenarioWorker._name", + "ScenarioWorker.name" + ], + "path_symbol_ids": [ + "65f877f78191d65e6a752e41cedc70ebc784c266804a55c1c56440336e1f0d6e", + "9a1d08a7eb1831c9f2e0db361b5207f036e477c160773ae08c0b287239785c52", + "9c20be046ba06644d1432e0f20eb223663d2b116ee7d91fdc62bc68323f2e593", + "da022da2c49fd9cfd09d6e6da6bbd59aaa7d28efd669ce8444e88d327ddec2fc" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_actions_stop_busy_worker_after_timeout\n -> BlockingRoutine\n -> BlockingRoutine.__init__\n -> BlockingRoutine._started\n -> BlockingRoutine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_actions_stop_busy_worker_after_timeout:dataflow_slice", + "span_start": 42, + "span_end": 238, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "8e7db3d2a9226f1c1d9942ac6373cfcafa0d2276758ddb8a3d3c455a3d58024d", + "edge_type": "dataflow_slice", + "src_symbol_id": "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "src_qname": "test_actions_stop_busy_worker_after_timeout", + "dst_symbol_id": "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04", + "dst_ref": "BlockingRoutine.run", + "resolution": "resolved", + "slice_id": "8e7db3d2a9226f1c1d9942ac6373cfcafa0d2276758ddb8a3d3c455a3d58024d", + "root_symbol_id": "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "path_symbols": [ + "test_actions_stop_busy_worker_after_timeout", + "BlockingRoutine", + "BlockingRoutine.__init__", + "BlockingRoutine._started", + "BlockingRoutine.run" + ], + "path_symbol_ids": [ + "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "a3349c5bc65e4003a4bbd6a8dbb7a54c337e12d1aed930caa701b12e520f1e67", + "486deeed3043c6db985aef258e96ddc67aa53608e67a83962fbd2471f649ddf1", + "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_actions_stop_busy_worker_after_timeout\n -> BlockingRoutine\n -> BlockingRoutine.__init__\n -> BlockingRoutine._release\n -> BlockingRoutine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_actions_stop_busy_worker_after_timeout:dataflow_slice", + "span_start": 43, + "span_end": 238, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "b59da9da82f9dfc8a9b695a08213786385da1ae9e17561ec3a0450a574a8cb39", + "edge_type": "dataflow_slice", + "src_symbol_id": "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "src_qname": "test_actions_stop_busy_worker_after_timeout", + "dst_symbol_id": "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04", + "dst_ref": "BlockingRoutine.run", + "resolution": "resolved", + "slice_id": "b59da9da82f9dfc8a9b695a08213786385da1ae9e17561ec3a0450a574a8cb39", + "root_symbol_id": "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "path_symbols": [ + "test_actions_stop_busy_worker_after_timeout", + "BlockingRoutine", + "BlockingRoutine.__init__", + "BlockingRoutine._release", + "BlockingRoutine.run" + ], + "path_symbol_ids": [ + "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "a3349c5bc65e4003a4bbd6a8dbb7a54c337e12d1aed930caa701b12e520f1e67", + "486deeed3043c6db985aef258e96ddc67aa53608e67a83962fbd2471f649ddf1", + "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_actions_stop_busy_worker_before_timeout\n -> BlockingRoutine\n -> BlockingRoutine.__init__\n -> BlockingRoutine._started\n -> BlockingRoutine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_actions_stop_busy_worker_before_timeout:dataflow_slice", + "span_start": 42, + "span_end": 212, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "f9bcce108870e49afa8b32d4625115a10707a3b0e7473179e958e5752bf258b4", + "edge_type": "dataflow_slice", + "src_symbol_id": "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "src_qname": "test_actions_stop_busy_worker_before_timeout", + "dst_symbol_id": "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04", + "dst_ref": "BlockingRoutine.run", + "resolution": "resolved", + "slice_id": "f9bcce108870e49afa8b32d4625115a10707a3b0e7473179e958e5752bf258b4", + "root_symbol_id": "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "path_symbols": [ + "test_actions_stop_busy_worker_before_timeout", + "BlockingRoutine", + "BlockingRoutine.__init__", + "BlockingRoutine._started", + "BlockingRoutine.run" + ], + "path_symbol_ids": [ + "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "a3349c5bc65e4003a4bbd6a8dbb7a54c337e12d1aed930caa701b12e520f1e67", + "486deeed3043c6db985aef258e96ddc67aa53608e67a83962fbd2471f649ddf1", + "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "def test_public_plba_package_exports_runtime_builder_and_worker_contract(tmp_path) -> None:\n import plba\n from plba import ApplicationModule as PublicApplicationModule\n from plba import InMemoryTaskQueue\n from plba import Worker as PublicWorker\n from plba import WorkerHealth as PublicWorkerHealth\n from plba import WorkerStatus as PublicWorkerStatus\n from plba import create_runtime\n\n config_path = tmp_path / \"config.yml\"\n config_path.write_text(\"platform: {}\\n\", encoding=\"utf-8\")\n\n queue = InMemoryTaskQueue[int]()\n queue.put(2)\n assert queue.get(timeout=0.01) == 2\n queue.task_done()\n\n class PublicRoutine:\n def __init__(self) -> None:\n self.runs = 0\n\n def run(self) -> None:\n if self.runs == 0:\n self.runs += 1\n\n class PublicWorkerImpl(PublicWorker):\n def __init__(self, routine: PublicRoutine) -> None:\n self._inner = RoutineWorker(\"public-worker\", routine)\n\n @property\n def name(self) -> str:\n return self._inner.name\n\n @property\n def critical(self) -> bool:\n return self._inner.critical\n\n def start(self) -> None:\n self._inner.start()\n\n def stop(self, force: bool = False) -> None:\n self._inner.stop(force=force)\n\n def health(self) -> PublicWorkerHealth:\n return self._inner.health()\n\n def status(self) -> PublicWorkerStatus:\n return self._inner.status()\n\n class PublicExampleModule(PublicApplicationModule):\n @property\n def name(self) -> str:\n return \"public-example\"\n\n def register(self, registry: ModuleRegistry) -> None:\n registry.add_worker(PublicWorkerImpl(PublicRoutine()))\n\n runtime = create_runtime(PublicExampleModule(), config_path=str(config_path))\n runtime.start()\n sleep(0.2)\n assert runtime.configuration.get() == {\"platform\": {}}\n assert runtime.status()[\"workers\"][\"registered\"] == 1\n assert hasattr(plba, \"QueueWorker\") is False\n runtime.stop()", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_runtime.py:test_public_plba_package_exports_runtime_builder_and_worker_contract", + "span_start": 342, + "span_end": 405, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 13, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _build_runtime(worker: Worker, *, control_timeout: int = 1) -> tuple[RuntimeManager, str]:\n runtime = RuntimeManager()\n channel = HttpControlChannel(host=\"127.0.0.1\", port=0, timeout=control_timeout)\n runtime.control_plane.register_channel(channel)\n runtime.register_module(WorkerModule(worker))\n runtime.start()\n return runtime, f\"http://127.0.0.1:{channel.port}\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_build_runtime", + "span_start": 154, + "span_end": 160, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 6, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class IntervalRoutine:\n calls: list[float] = field(default_factory=list)\n _lock: Lock = field(default_factory=Lock)\n\n def run(self) -> None:\n with self._lock:\n self.calls.append(monotonic())\n\n def wait_runs(self, count: int, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n with self._lock:\n if len(self.calls) >= count:\n return True\n sleep(0.01)\n return False\n\n def deltas(self) -> list[float]:\n with self._lock:\n return [self.calls[index + 1] - self.calls[index] for index in range(len(self.calls) - 1)]", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:IntervalRoutine", + "span_start": 18, + "span_end": 37, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class ScenarioWorker(Worker):\n def __init__(self, name: str, routine: object, *, interval: float = 0.05) -> None:\n self._name = name\n self._routine = routine\n self._interval = interval\n self._thread: Thread | None = None\n self._stop_requested = Event()\n self._in_flight = 0\n self._runs = 0\n self._lock = Lock()\n\n @property\n def name(self) -> str:\n return self._name\n\n @property\n def critical(self) -> bool:\n return True\n\n def start(self) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._stop_requested.clear()\n self._thread = Thread(target=self._loop, name=f\"{self._name}-thread\", daemon=True)\n self._thread.start()\n\n def stop(self, force: bool = False) -> None:\n self._stop_requested.set()\n\n def health(self) -> WorkerHealth:\n return WorkerHealth(name=self.name, status=\"ok\", critical=True, meta={\"runs\": self._runs})\n\n def status(self) -> WorkerStatus:\n thread_alive = self._thread is not None and self._thread.is_alive()\n with self._lock:\n in_flight = self._in_flight\n runs = self._runs\n if not thread_alive:\n state = \"stopped\"\n elif self._stop_requested.is_set():\n state = \"stopping\"\n elif in_flight > 0:\n state = \"busy\"\n else:\n state = \"idle\"\n return WorkerStatus(name=self.name, state=state, in_flight=in_flight, meta={\"runs\": runs})\n\n def _loop(self) -> None:\n while not self._stop_requested.is_set():\n with self._lock:\n self._in_flight += 1\n try:\n self._routine.run()\n with self._lock:\n self._runs += 1\n finally:\n with self._lock:\n self._in_flight -= 1\n if self._stop_requested.is_set():\n return\n sleep(self._interval)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:ScenarioWorker", + "span_start": 50, + "span_end": 110, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 2, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _http_call_json(\n base_url: str,\n path: str,\n *,\n method: str = \"GET\",\n headers: dict[str, str] | None = None,\n) -> tuple[int, dict[str, object]]:\n request = Request(f\"{base_url}{path}\", method=method, headers=headers or {})\n try:\n with urlopen(request, timeout=15.0) as response:\n status = response.status\n body = response.read()\n except HTTPError as error:\n status = error.code\n body = error.read()\n payload = json.loads(body.decode(\"utf-8\"))\n return status, payload", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_http_call_json", + "span_start": 125, + "span_end": 141, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 4, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _poll_until_stopped(base_url: str, timeout: float = 2.0) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n _, payload = _http_call_json(base_url, \"/actions/status\")\n if payload.get(\"detail\") == \"stopped\":\n return True\n sleep(0.05)\n return False", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_poll_until_stopped", + "span_start": 144, + "span_end": 151, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 5, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def test_worker_wakes_up_with_configured_interval() -> None:\n interval = 0.15\n routine = IntervalRoutine()\n worker = ScenarioWorker(\"interval-worker\", routine, interval=interval)\n runtime = RuntimeManager()\n runtime.register_module(WorkerModule(worker))\n\n runtime.start()\n try:\n assert routine.wait_runs(count=3, timeout=2.0) is True\n finally:\n runtime.stop()\n\n deltas = routine.deltas()\n assert len(deltas) >= 2\n assert all(delta >= interval * 0.7 for delta in deltas[:2])", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:test_worker_wakes_up_with_configured_interval", + "span_start": 163, + "span_end": 178, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 7, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class WorkerModule(ApplicationModule):\n def __init__(self, worker: Worker) -> None:\n self._worker = worker\n\n @property\n def name(self) -> str:\n return \"business-tests\"\n\n def register(self, registry: ModuleRegistry) -> None:\n registry.add_worker(self._worker)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:WorkerModule", + "span_start": 113, + "span_end": 122, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 3, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class BlockingRoutine:\n def __init__(self, started: Event, release: Event) -> None:\n self._started = started\n self._release = release\n\n def run(self) -> None:\n self._started.set()\n self._release.wait(timeout=5.0)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:BlockingRoutine", + "span_start": 40, + "span_end": 47, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def test_actions_start_stop_and_health_when_worker_is_idle() -> None:\n runtime, base_url = _build_runtime(ScenarioWorker(\"idle-worker\", IntervalRoutine(), interval=0.2))\n try:\n stop_status, stop_payload = _http_call_json(base_url, \"/actions/stop\", method=\"POST\")\n assert stop_status == 200\n assert isinstance(stop_payload.get(\"detail\"), dict)\n assert stop_payload[\"detail\"][\"timed_out\"] is False\n assert stop_payload[\"detail\"][\"state\"] == \"stopped\"\n\n health_stopped_status, health_stopped_payload = _http_call_json(base_url, \"/health\")\n assert health_stopped_status == 503\n assert health_stopped_payload[\"state\"] == \"stopped\"\n assert health_stopped_payload[\"status\"] == \"unhealthy\"\n\n start_status, start_payload = _http_call_json(base_url, \"/actions/start\", method=\"POST\")\n assert start_status == 200\n assert isinstance(start_payload.get(\"detail\"), dict)\n assert start_payload[\"detail\"][\"timed_out\"] is False\n assert start_payload[\"detail\"][\"state\"] in {\"idle\", \"busy\"}\n\n health_started_status, health_started_payload = _http_call_json(base_url, \"/health\")\n assert health_started_status == 200\n assert health_started_payload[\"status\"] == \"ok\"\n assert health_started_payload[\"state\"] in {\"idle\", \"busy\"}\n finally:\n runtime.stop()", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:test_actions_start_stop_and_health_when_worker_is_idle", + "span_start": 181, + "span_end": 206, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 8, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C0_SOURCE_CHUNKS": 10 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src", + "tests" + ], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src", + "tests" + ], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "create_runtime", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Где тесты для create_runtime? test_create_runtime Testcreate_runtime create_runtime", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Где тесты для create_runtime? test_create_runtime Testcreate_runtime create_runtime", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 10, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 0, + "candidates_after_filter": 0 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src", + "tests" + ], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src", + "tests" + ], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 10, + "candidates_after_filter": 10 + } + ], + "fallback": { + "used": true, + "reason": "scope_relaxed_no_hits" + }, + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "create_runtime" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "miss", + "hit_count": 0, + "fail_reason": "scope_relaxed_no_hits" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 10, + "fail_reason": null + } + ] + }, + "constraint_violations": [ + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C1_SYMBOL_CATALOG", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + } + ], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 121, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 53, + "C2_DEPENDENCY_GRAPH": 48, + "C0_SOURCE_CHUNKS": 18 + }, + "merge_rank": 0 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Где тесты для create_runtime?", + "rag_count": 16 + }, + "output": { + "llm_answer": "Прямых тестов конкретно для функции `create_runtime` в предоставленном контексте не обнаружено. Её имя не упоминается явно ни в объявлениях (C1), ни в зависимостях (C2), а также отсутствуют явные проверки поведения этой функции.\n\nОднако можно заметить косвенное упоминание о создании runtime через функцию `_build_runtime`, которая используется в тестах:\n\n- В тесте `tests/test_business_control_actions.py:_build_runtime` происходит создание runtime при помощи вызова функции `RuntimeManager()`.\n- Тесты `test_worker_wakes_up_with_configured_interval` и `test_actions_stop_busy_worker_after_timeout` используют блокирующий режим работы и взаимодействуют с worker'ами внутри runtime, но напрямую на `create_runtime` это не указывает.\n\nТаким образом, хотя тестов с прямым названием `create_runtime` нет, косвенно проверка создания runtime осуществляется через взаимодействие с её результатами в функциях `_build_runtime`." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 1001, + "evidence_rows": 16, + "evidence_chars": 9185 + }, + "evidence_summary": [ + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 2 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 10, + "unique_paths": 2 + } + ], + "prompt_template_id": "intent_code_qa_find_tests_ru_v3", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 1565 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-find-tests-create-runtime.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-find-tests-create-runtime.md new file mode 100644 index 0000000..cf06fa1 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-find-tests-create-runtime.md @@ -0,0 +1,32 @@ +# plba-v2-find-tests-create-runtime + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Где тесты для create_runtime? + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 16, + "llm_answer": "Прямых тестов конкретно для функции `create_runtime` в предоставленном контексте не обнаружено. Её имя не упоминается явно ни в объявлениях (C1), ни в зависимостях (C2), а также отсутствуют явные проверки поведения этой функции.\n\nОднако можно заметить косвенное упоминание о создании runtime через функцию `_build_runtime`, которая используется в тестах:\n\n- В тесте `tests/test_business_control_actions.py:_build_runtime` происходит создание runtime при помощи вызова функции `RuntimeManager()`.\n- Тесты `test_worker_wakes_up_with_configured_interval` и `test_actions_stop_busy_worker_after_timeout` используют блокирующий режим работы и взаимодействуют с worker'ами внутри runtime, но напрямую на `create_runtime` это не указывает.\n\nТаким образом, хотя тестов с прямым названием `create_runtime` нет, косвенно проверка создания runtime осуществляется через взаимодействие с её результатами в функциях `_build_runtime`.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "create_runtime" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-find-tests-runtime-manager.json b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-find-tests-runtime-manager.json new file mode 100644 index 0000000..c8fb9d0 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-find-tests-runtime-manager.json @@ -0,0 +1,1879 @@ +{ + "case_id": "plba-v2-find-tests-runtime-manager", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 16, + "llm_answer": "Прямые тесты для `RuntimeManager` находятся в следующих файлах:\n\n1. tests/test_runtime.py:\n - `test_runtime_graceful_stop_waits_until_worker_finishes`: проверяет корректность остановки менеджера при завершении работы его рабочих процессов.\n - `test_runtime_runs_worker_routine_and_exposes_status`: тестирует запуск рабочего рутины и отображение статуса выполнения.\n\nЭти тесты непосредственно используют объект `RuntimeManager`, создавая его инстанс и проверяя поведение через регистрацию модулей и выполнение операций запуска/остановки.\n\nКосвенных тестов, которые могли бы касаться `RuntimeManager`, но напрямую не создают его экземпляр, в данном контексте не обнаружено.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-v2-find-tests-runtime-manager", + "text": "Где тесты для RuntimeManager?", + "mode": "full_chain", + "run_started_at": "2026-03-12T14:07:09", + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Где тесты для RuntimeManager?", + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "RuntimeManager" + ], + "confidence": 0.0 + }, + "rag_count": 16, + "rag_rows": [ + { + "path": "tests/test_runtime.py", + "content": "test_runtime_runs_worker_routine_and_exposes_status instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_runtime_runs_worker_routine_and_exposes_status:instantiates", + "span_start": 209, + "span_end": 209, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "c397a308e7824ba9fe400a754c7e15e66ea6f058d7f5d3e82bb002bb78b509d2", + "edge_type": "instantiates", + "src_symbol_id": "1c767eb5ee08e84f45b18c8ed7531ec0ed73c63fb1594823569672db7b21e992", + "src_qname": "test_runtime_runs_worker_routine_and_exposes_status", + "dst_symbol_id": "aeadc039653807b0da1ca6e3cc1078ee61cfc510b28e7f9c2ec04c59da43cc8d", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "test_runtime_graceful_stop_waits_until_worker_finishes instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_runtime_graceful_stop_waits_until_worker_finishes:instantiates", + "span_start": 229, + "span_end": 229, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "76b4701262ccaa0a7a41691407c4ebdb2ca74a2415d89f0a38ef0d4f608bda93", + "edge_type": "instantiates", + "src_symbol_id": "1076e788e4a03b10d7bc1313a8ad46caa170c13cc026c6e4de994af1a6ae57bf", + "src_qname": "test_runtime_graceful_stop_waits_until_worker_finishes", + "dst_symbol_id": "aeadc039653807b0da1ca6e3cc1078ee61cfc510b28e7f9c2ec04c59da43cc8d", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "_build_runtime instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "_build_runtime:instantiates", + "span_start": 155, + "span_end": 155, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "7eb254d564944bab6272757ee5ef688862bd321e6941e2495dc942e03b1c9a25", + "edge_type": "instantiates", + "src_symbol_id": "db94031d5245bf82be836a109b4584b43b8e83d37a0f318e03f6c8191896d469", + "src_qname": "_build_runtime", + "dst_symbol_id": "a1572ea8183dc0cd6ddbc74342bbde8c28cecfde37ad40b62feff09f8d103d11", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_worker_wakes_up_with_configured_interval instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_worker_wakes_up_with_configured_interval:instantiates", + "span_start": 167, + "span_end": 167, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "189aafc4de0b79c688668f25f0c87166a127df26bd2215452014713b65ef281a", + "edge_type": "instantiates", + "src_symbol_id": "65f877f78191d65e6a752e41cedc70ebc784c266804a55c1c56440336e1f0d6e", + "src_qname": "test_worker_wakes_up_with_configured_interval", + "dst_symbol_id": "a1572ea8183dc0cd6ddbc74342bbde8c28cecfde37ad40b62feff09f8d103d11", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_actions_stop_busy_worker_after_timeout\n -> BlockingRoutine\n -> BlockingRoutine.__init__\n -> BlockingRoutine._started\n -> BlockingRoutine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_actions_stop_busy_worker_after_timeout:dataflow_slice", + "span_start": 42, + "span_end": 238, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "8e7db3d2a9226f1c1d9942ac6373cfcafa0d2276758ddb8a3d3c455a3d58024d", + "edge_type": "dataflow_slice", + "src_symbol_id": "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "src_qname": "test_actions_stop_busy_worker_after_timeout", + "dst_symbol_id": "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04", + "dst_ref": "BlockingRoutine.run", + "resolution": "resolved", + "slice_id": "8e7db3d2a9226f1c1d9942ac6373cfcafa0d2276758ddb8a3d3c455a3d58024d", + "root_symbol_id": "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "path_symbols": [ + "test_actions_stop_busy_worker_after_timeout", + "BlockingRoutine", + "BlockingRoutine.__init__", + "BlockingRoutine._started", + "BlockingRoutine.run" + ], + "path_symbol_ids": [ + "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "a3349c5bc65e4003a4bbd6a8dbb7a54c337e12d1aed930caa701b12e520f1e67", + "486deeed3043c6db985aef258e96ddc67aa53608e67a83962fbd2471f649ddf1", + "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_actions_stop_busy_worker_before_timeout\n -> BlockingRoutine\n -> BlockingRoutine.__init__\n -> BlockingRoutine._release\n -> BlockingRoutine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_actions_stop_busy_worker_before_timeout:dataflow_slice", + "span_start": 43, + "span_end": 212, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "8bd726155ba387d3579763ee84dfd2f9a90bc917da88f3b2e89416ab5c1254d6", + "edge_type": "dataflow_slice", + "src_symbol_id": "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "src_qname": "test_actions_stop_busy_worker_before_timeout", + "dst_symbol_id": "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04", + "dst_ref": "BlockingRoutine.run", + "resolution": "resolved", + "slice_id": "8bd726155ba387d3579763ee84dfd2f9a90bc917da88f3b2e89416ab5c1254d6", + "root_symbol_id": "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "path_symbols": [ + "test_actions_stop_busy_worker_before_timeout", + "BlockingRoutine", + "BlockingRoutine.__init__", + "BlockingRoutine._release", + "BlockingRoutine.run" + ], + "path_symbol_ids": [ + "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "a3349c5bc65e4003a4bbd6a8dbb7a54c337e12d1aed930caa701b12e520f1e67", + "486deeed3043c6db985aef258e96ddc67aa53608e67a83962fbd2471f649ddf1", + "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "def test_runtime_graceful_stop_waits_until_worker_finishes() -> None:\n started = Event()\n release = Event()\n runtime = RuntimeManager()\n runtime.register_module(BlockingModule(started, release))\n runtime.start()\n assert started.wait(timeout=1.0) is True\n assert runtime.status()[\"runtime\"][\"state\"] == \"busy\"\n\n stop_thread = Thread(target=runtime.stop, kwargs={\"timeout\": 1.0}, daemon=True)\n stop_thread.start()\n sleep(0.1)\n assert stop_thread.is_alive() is True\n\n release.set()\n stop_thread.join(timeout=1.0)\n assert stop_thread.is_alive() is False\n assert runtime.status()[\"runtime\"][\"state\"] == \"stopped\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_runtime.py:test_runtime_graceful_stop_waits_until_worker_finishes", + "span_start": 226, + "span_end": 243, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 8, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "def test_runtime_runs_worker_routine_and_exposes_status(tmp_path) -> None:\n config_path = tmp_path / \"config.yml\"\n config_path.write_text(\n \"\"\"\nplatform:\n workers: 1\nlog:\n version: 1\n disable_existing_loggers: false\n handlers:\n console:\n class: logging.StreamHandler\n root:\n level: INFO\n handlers: [console]\n\"\"\".strip(),\n encoding=\"utf-8\",\n )\n runtime = RuntimeManager()\n runtime.add_config_file(config_path)\n module = ExampleModule()\n runtime.register_module(module)\n\n runtime.start()\n sleep(0.2)\n status = runtime.status()\n runtime.stop()\n\n assert module.routine.processed == [{\"id\": 1}]\n assert status[\"modules\"] == [\"example\"]\n assert status[\"runtime\"][\"state\"] == \"idle\"\n assert status[\"health\"][\"status\"] == \"ok\"\n assert status[\"config\"] == {\"platform\": {\"workers\": 1}, \"log\": status[\"config\"][\"log\"]}", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_runtime.py:test_runtime_runs_worker_routine_and_exposes_status", + "span_start": 191, + "span_end": 223, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 7, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _build_runtime(worker: Worker, *, control_timeout: int = 1) -> tuple[RuntimeManager, str]:\n runtime = RuntimeManager()\n channel = HttpControlChannel(host=\"127.0.0.1\", port=0, timeout=control_timeout)\n runtime.control_plane.register_channel(channel)\n runtime.register_module(WorkerModule(worker))\n runtime.start()\n return runtime, f\"http://127.0.0.1:{channel.port}\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_build_runtime", + "span_start": 154, + "span_end": 160, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 6, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def test_worker_wakes_up_with_configured_interval() -> None:\n interval = 0.15\n routine = IntervalRoutine()\n worker = ScenarioWorker(\"interval-worker\", routine, interval=interval)\n runtime = RuntimeManager()\n runtime.register_module(WorkerModule(worker))\n\n runtime.start()\n try:\n assert routine.wait_runs(count=3, timeout=2.0) is True\n finally:\n runtime.stop()\n\n deltas = routine.deltas()\n assert len(deltas) >= 2\n assert all(delta >= interval * 0.7 for delta in deltas[:2])", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:test_worker_wakes_up_with_configured_interval", + "span_start": 163, + "span_end": 178, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 7, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class BlockingRoutine:\n def __init__(self, started: Event, release: Event) -> None:\n self._started = started\n self._release = release\n\n def run(self) -> None:\n self._started.set()\n self._release.wait(timeout=5.0)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:BlockingRoutine", + "span_start": 40, + "span_end": 47, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class ScenarioWorker(Worker):\n def __init__(self, name: str, routine: object, *, interval: float = 0.05) -> None:\n self._name = name\n self._routine = routine\n self._interval = interval\n self._thread: Thread | None = None\n self._stop_requested = Event()\n self._in_flight = 0\n self._runs = 0\n self._lock = Lock()\n\n @property\n def name(self) -> str:\n return self._name\n\n @property\n def critical(self) -> bool:\n return True\n\n def start(self) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._stop_requested.clear()\n self._thread = Thread(target=self._loop, name=f\"{self._name}-thread\", daemon=True)\n self._thread.start()\n\n def stop(self, force: bool = False) -> None:\n self._stop_requested.set()\n\n def health(self) -> WorkerHealth:\n return WorkerHealth(name=self.name, status=\"ok\", critical=True, meta={\"runs\": self._runs})\n\n def status(self) -> WorkerStatus:\n thread_alive = self._thread is not None and self._thread.is_alive()\n with self._lock:\n in_flight = self._in_flight\n runs = self._runs\n if not thread_alive:\n state = \"stopped\"\n elif self._stop_requested.is_set():\n state = \"stopping\"\n elif in_flight > 0:\n state = \"busy\"\n else:\n state = \"idle\"\n return WorkerStatus(name=self.name, state=state, in_flight=in_flight, meta={\"runs\": runs})\n\n def _loop(self) -> None:\n while not self._stop_requested.is_set():\n with self._lock:\n self._in_flight += 1\n try:\n self._routine.run()\n with self._lock:\n self._runs += 1\n finally:\n with self._lock:\n self._in_flight -= 1\n if self._stop_requested.is_set():\n return\n sleep(self._interval)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:ScenarioWorker", + "span_start": 50, + "span_end": 110, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 2, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class WorkerModule(ApplicationModule):\n def __init__(self, worker: Worker) -> None:\n self._worker = worker\n\n @property\n def name(self) -> str:\n return \"business-tests\"\n\n def register(self, registry: ModuleRegistry) -> None:\n registry.add_worker(self._worker)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:WorkerModule", + "span_start": 113, + "span_end": 122, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 3, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _http_call_json(\n base_url: str,\n path: str,\n *,\n method: str = \"GET\",\n headers: dict[str, str] | None = None,\n) -> tuple[int, dict[str, object]]:\n request = Request(f\"{base_url}{path}\", method=method, headers=headers or {})\n try:\n with urlopen(request, timeout=15.0) as response:\n status = response.status\n body = response.read()\n except HTTPError as error:\n status = error.code\n body = error.read()\n payload = json.loads(body.decode(\"utf-8\"))\n return status, payload", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_http_call_json", + "span_start": 125, + "span_end": 141, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 4, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class IntervalRoutine:\n calls: list[float] = field(default_factory=list)\n _lock: Lock = field(default_factory=Lock)\n\n def run(self) -> None:\n with self._lock:\n self.calls.append(monotonic())\n\n def wait_runs(self, count: int, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n with self._lock:\n if len(self.calls) >= count:\n return True\n sleep(0.01)\n return False\n\n def deltas(self) -> list[float]:\n with self._lock:\n return [self.calls[index + 1] - self.calls[index] for index in range(len(self.calls) - 1)]", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:IntervalRoutine", + "span_start": 18, + "span_end": 37, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _poll_until_stopped(base_url: str, timeout: float = 2.0) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n _, payload = _http_call_json(base_url, \"/actions/status\")\n if payload.get(\"detail\") == \"stopped\":\n return True\n sleep(0.05)\n return False", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_poll_until_stopped", + "span_start": 144, + "span_end": 151, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 5, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "Прямые тесты для `RuntimeManager` находятся в следующих файлах:\n\n1. tests/test_runtime.py:\n - `test_runtime_graceful_stop_waits_until_worker_finishes`: проверяет корректность остановки менеджера при завершении работы его рабочих процессов.\n - `test_runtime_runs_worker_routine_and_exposes_status`: тестирует запуск рабочего рутины и отображение статуса выполнения.\n\nЭти тесты непосредственно используют объект `RuntimeManager`, создавая его инстанс и проверяя поведение через регистрацию модулей и выполнение операций запуска/остановки.\n\nКосвенных тестов, которые могли бы касаться `RuntimeManager`, но напрямую не создают его экземпляр, в данном контексте не обнаружено.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C2_DEPENDENCY_GRAPH" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "test_file_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "test_symbol_patterns": [ + "test_runtime_manager", + "TestRuntimeManager", + "RuntimeManager" + ], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C0_SOURCE_CHUNKS": 10 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src", + "tests" + ], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src", + "tests" + ], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Где тесты для RuntimeManager? test_runtime_manager TestRuntimeManager RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Где тесты для RuntimeManager? test_runtime_manager TestRuntimeManager RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 10, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 0, + "candidates_after_filter": 0 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src", + "tests" + ], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src", + "tests" + ], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 10, + "candidates_after_filter": 10 + } + ], + "fallback": { + "used": true, + "reason": "scope_relaxed_no_hits" + }, + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "RuntimeManager" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "miss", + "hit_count": 0, + "fail_reason": "scope_relaxed_no_hits" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 10, + "fail_reason": null + } + ] + }, + "constraint_violations": [ + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C1_SYMBOL_CATALOG", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + } + ], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 148, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 81, + "C2_DEPENDENCY_GRAPH": 50, + "C0_SOURCE_CHUNKS": 15 + }, + "merge_rank": 0, + "prompt_build": 0, + "llm_call": 1361 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 925, + "evidence_rows": 16, + "evidence_chars": 7086 + }, + "evidence_summary": [ + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 2 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 10, + "unique_paths": 2 + } + ], + "prompt_template_id": "intent_code_qa_find_tests_ru_v3", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "RuntimeManager" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 16, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-v2-find-tests-runtime-manager", + "mode": "full_chain", + "run_started_at": "2026-03-12T14:07:09", + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Где тесты для RuntimeManager?", + "normalized_query": "Где тесты для RuntimeManager?" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Где тесты для RuntimeManager?" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Где тесты для RuntimeManager?" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "test_file_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "test_symbol_patterns": [ + "test_runtime_manager", + "TestRuntimeManager", + "RuntimeManager" + ], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Где тесты для RuntimeManager?" + }, + "output": { + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "RuntimeManager" + ], + "confidence": 0.0 + }, + "rag_count": 16, + "rag_rows": [ + { + "path": "tests/test_runtime.py", + "content": "test_runtime_runs_worker_routine_and_exposes_status instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_runtime_runs_worker_routine_and_exposes_status:instantiates", + "span_start": 209, + "span_end": 209, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "c397a308e7824ba9fe400a754c7e15e66ea6f058d7f5d3e82bb002bb78b509d2", + "edge_type": "instantiates", + "src_symbol_id": "1c767eb5ee08e84f45b18c8ed7531ec0ed73c63fb1594823569672db7b21e992", + "src_qname": "test_runtime_runs_worker_routine_and_exposes_status", + "dst_symbol_id": "aeadc039653807b0da1ca6e3cc1078ee61cfc510b28e7f9c2ec04c59da43cc8d", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "test_runtime_graceful_stop_waits_until_worker_finishes instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_runtime_graceful_stop_waits_until_worker_finishes:instantiates", + "span_start": 229, + "span_end": 229, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "76b4701262ccaa0a7a41691407c4ebdb2ca74a2415d89f0a38ef0d4f608bda93", + "edge_type": "instantiates", + "src_symbol_id": "1076e788e4a03b10d7bc1313a8ad46caa170c13cc026c6e4de994af1a6ae57bf", + "src_qname": "test_runtime_graceful_stop_waits_until_worker_finishes", + "dst_symbol_id": "aeadc039653807b0da1ca6e3cc1078ee61cfc510b28e7f9c2ec04c59da43cc8d", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "_build_runtime instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "_build_runtime:instantiates", + "span_start": 155, + "span_end": 155, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "7eb254d564944bab6272757ee5ef688862bd321e6941e2495dc942e03b1c9a25", + "edge_type": "instantiates", + "src_symbol_id": "db94031d5245bf82be836a109b4584b43b8e83d37a0f318e03f6c8191896d469", + "src_qname": "_build_runtime", + "dst_symbol_id": "a1572ea8183dc0cd6ddbc74342bbde8c28cecfde37ad40b62feff09f8d103d11", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_worker_wakes_up_with_configured_interval instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_worker_wakes_up_with_configured_interval:instantiates", + "span_start": 167, + "span_end": 167, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "189aafc4de0b79c688668f25f0c87166a127df26bd2215452014713b65ef281a", + "edge_type": "instantiates", + "src_symbol_id": "65f877f78191d65e6a752e41cedc70ebc784c266804a55c1c56440336e1f0d6e", + "src_qname": "test_worker_wakes_up_with_configured_interval", + "dst_symbol_id": "a1572ea8183dc0cd6ddbc74342bbde8c28cecfde37ad40b62feff09f8d103d11", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_actions_stop_busy_worker_after_timeout\n -> BlockingRoutine\n -> BlockingRoutine.__init__\n -> BlockingRoutine._started\n -> BlockingRoutine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_actions_stop_busy_worker_after_timeout:dataflow_slice", + "span_start": 42, + "span_end": 238, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "8e7db3d2a9226f1c1d9942ac6373cfcafa0d2276758ddb8a3d3c455a3d58024d", + "edge_type": "dataflow_slice", + "src_symbol_id": "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "src_qname": "test_actions_stop_busy_worker_after_timeout", + "dst_symbol_id": "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04", + "dst_ref": "BlockingRoutine.run", + "resolution": "resolved", + "slice_id": "8e7db3d2a9226f1c1d9942ac6373cfcafa0d2276758ddb8a3d3c455a3d58024d", + "root_symbol_id": "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "path_symbols": [ + "test_actions_stop_busy_worker_after_timeout", + "BlockingRoutine", + "BlockingRoutine.__init__", + "BlockingRoutine._started", + "BlockingRoutine.run" + ], + "path_symbol_ids": [ + "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "a3349c5bc65e4003a4bbd6a8dbb7a54c337e12d1aed930caa701b12e520f1e67", + "486deeed3043c6db985aef258e96ddc67aa53608e67a83962fbd2471f649ddf1", + "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_actions_stop_busy_worker_before_timeout\n -> BlockingRoutine\n -> BlockingRoutine.__init__\n -> BlockingRoutine._release\n -> BlockingRoutine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_actions_stop_busy_worker_before_timeout:dataflow_slice", + "span_start": 43, + "span_end": 212, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "8bd726155ba387d3579763ee84dfd2f9a90bc917da88f3b2e89416ab5c1254d6", + "edge_type": "dataflow_slice", + "src_symbol_id": "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "src_qname": "test_actions_stop_busy_worker_before_timeout", + "dst_symbol_id": "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04", + "dst_ref": "BlockingRoutine.run", + "resolution": "resolved", + "slice_id": "8bd726155ba387d3579763ee84dfd2f9a90bc917da88f3b2e89416ab5c1254d6", + "root_symbol_id": "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "path_symbols": [ + "test_actions_stop_busy_worker_before_timeout", + "BlockingRoutine", + "BlockingRoutine.__init__", + "BlockingRoutine._release", + "BlockingRoutine.run" + ], + "path_symbol_ids": [ + "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "a3349c5bc65e4003a4bbd6a8dbb7a54c337e12d1aed930caa701b12e520f1e67", + "486deeed3043c6db985aef258e96ddc67aa53608e67a83962fbd2471f649ddf1", + "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "def test_runtime_graceful_stop_waits_until_worker_finishes() -> None:\n started = Event()\n release = Event()\n runtime = RuntimeManager()\n runtime.register_module(BlockingModule(started, release))\n runtime.start()\n assert started.wait(timeout=1.0) is True\n assert runtime.status()[\"runtime\"][\"state\"] == \"busy\"\n\n stop_thread = Thread(target=runtime.stop, kwargs={\"timeout\": 1.0}, daemon=True)\n stop_thread.start()\n sleep(0.1)\n assert stop_thread.is_alive() is True\n\n release.set()\n stop_thread.join(timeout=1.0)\n assert stop_thread.is_alive() is False\n assert runtime.status()[\"runtime\"][\"state\"] == \"stopped\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_runtime.py:test_runtime_graceful_stop_waits_until_worker_finishes", + "span_start": 226, + "span_end": 243, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 8, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "def test_runtime_runs_worker_routine_and_exposes_status(tmp_path) -> None:\n config_path = tmp_path / \"config.yml\"\n config_path.write_text(\n \"\"\"\nplatform:\n workers: 1\nlog:\n version: 1\n disable_existing_loggers: false\n handlers:\n console:\n class: logging.StreamHandler\n root:\n level: INFO\n handlers: [console]\n\"\"\".strip(),\n encoding=\"utf-8\",\n )\n runtime = RuntimeManager()\n runtime.add_config_file(config_path)\n module = ExampleModule()\n runtime.register_module(module)\n\n runtime.start()\n sleep(0.2)\n status = runtime.status()\n runtime.stop()\n\n assert module.routine.processed == [{\"id\": 1}]\n assert status[\"modules\"] == [\"example\"]\n assert status[\"runtime\"][\"state\"] == \"idle\"\n assert status[\"health\"][\"status\"] == \"ok\"\n assert status[\"config\"] == {\"platform\": {\"workers\": 1}, \"log\": status[\"config\"][\"log\"]}", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_runtime.py:test_runtime_runs_worker_routine_and_exposes_status", + "span_start": 191, + "span_end": 223, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 7, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _build_runtime(worker: Worker, *, control_timeout: int = 1) -> tuple[RuntimeManager, str]:\n runtime = RuntimeManager()\n channel = HttpControlChannel(host=\"127.0.0.1\", port=0, timeout=control_timeout)\n runtime.control_plane.register_channel(channel)\n runtime.register_module(WorkerModule(worker))\n runtime.start()\n return runtime, f\"http://127.0.0.1:{channel.port}\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_build_runtime", + "span_start": 154, + "span_end": 160, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 6, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def test_worker_wakes_up_with_configured_interval() -> None:\n interval = 0.15\n routine = IntervalRoutine()\n worker = ScenarioWorker(\"interval-worker\", routine, interval=interval)\n runtime = RuntimeManager()\n runtime.register_module(WorkerModule(worker))\n\n runtime.start()\n try:\n assert routine.wait_runs(count=3, timeout=2.0) is True\n finally:\n runtime.stop()\n\n deltas = routine.deltas()\n assert len(deltas) >= 2\n assert all(delta >= interval * 0.7 for delta in deltas[:2])", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:test_worker_wakes_up_with_configured_interval", + "span_start": 163, + "span_end": 178, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 7, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class BlockingRoutine:\n def __init__(self, started: Event, release: Event) -> None:\n self._started = started\n self._release = release\n\n def run(self) -> None:\n self._started.set()\n self._release.wait(timeout=5.0)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:BlockingRoutine", + "span_start": 40, + "span_end": 47, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class ScenarioWorker(Worker):\n def __init__(self, name: str, routine: object, *, interval: float = 0.05) -> None:\n self._name = name\n self._routine = routine\n self._interval = interval\n self._thread: Thread | None = None\n self._stop_requested = Event()\n self._in_flight = 0\n self._runs = 0\n self._lock = Lock()\n\n @property\n def name(self) -> str:\n return self._name\n\n @property\n def critical(self) -> bool:\n return True\n\n def start(self) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._stop_requested.clear()\n self._thread = Thread(target=self._loop, name=f\"{self._name}-thread\", daemon=True)\n self._thread.start()\n\n def stop(self, force: bool = False) -> None:\n self._stop_requested.set()\n\n def health(self) -> WorkerHealth:\n return WorkerHealth(name=self.name, status=\"ok\", critical=True, meta={\"runs\": self._runs})\n\n def status(self) -> WorkerStatus:\n thread_alive = self._thread is not None and self._thread.is_alive()\n with self._lock:\n in_flight = self._in_flight\n runs = self._runs\n if not thread_alive:\n state = \"stopped\"\n elif self._stop_requested.is_set():\n state = \"stopping\"\n elif in_flight > 0:\n state = \"busy\"\n else:\n state = \"idle\"\n return WorkerStatus(name=self.name, state=state, in_flight=in_flight, meta={\"runs\": runs})\n\n def _loop(self) -> None:\n while not self._stop_requested.is_set():\n with self._lock:\n self._in_flight += 1\n try:\n self._routine.run()\n with self._lock:\n self._runs += 1\n finally:\n with self._lock:\n self._in_flight -= 1\n if self._stop_requested.is_set():\n return\n sleep(self._interval)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:ScenarioWorker", + "span_start": 50, + "span_end": 110, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 2, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class WorkerModule(ApplicationModule):\n def __init__(self, worker: Worker) -> None:\n self._worker = worker\n\n @property\n def name(self) -> str:\n return \"business-tests\"\n\n def register(self, registry: ModuleRegistry) -> None:\n registry.add_worker(self._worker)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:WorkerModule", + "span_start": 113, + "span_end": 122, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 3, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _http_call_json(\n base_url: str,\n path: str,\n *,\n method: str = \"GET\",\n headers: dict[str, str] | None = None,\n) -> tuple[int, dict[str, object]]:\n request = Request(f\"{base_url}{path}\", method=method, headers=headers or {})\n try:\n with urlopen(request, timeout=15.0) as response:\n status = response.status\n body = response.read()\n except HTTPError as error:\n status = error.code\n body = error.read()\n payload = json.loads(body.decode(\"utf-8\"))\n return status, payload", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_http_call_json", + "span_start": 125, + "span_end": 141, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 4, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class IntervalRoutine:\n calls: list[float] = field(default_factory=list)\n _lock: Lock = field(default_factory=Lock)\n\n def run(self) -> None:\n with self._lock:\n self.calls.append(monotonic())\n\n def wait_runs(self, count: int, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n with self._lock:\n if len(self.calls) >= count:\n return True\n sleep(0.01)\n return False\n\n def deltas(self) -> list[float]:\n with self._lock:\n return [self.calls[index + 1] - self.calls[index] for index in range(len(self.calls) - 1)]", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:IntervalRoutine", + "span_start": 18, + "span_end": 37, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _poll_until_stopped(base_url: str, timeout: float = 2.0) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n _, payload = _http_call_json(base_url, \"/actions/status\")\n if payload.get(\"detail\") == \"stopped\":\n return True\n sleep(0.05)\n return False", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_poll_until_stopped", + "span_start": 144, + "span_end": 151, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 5, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C0_SOURCE_CHUNKS": 10 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src", + "tests" + ], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src", + "tests" + ], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Где тесты для RuntimeManager? test_runtime_manager TestRuntimeManager RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Где тесты для RuntimeManager? test_runtime_manager TestRuntimeManager RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 10, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 0, + "candidates_after_filter": 0 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src", + "tests" + ], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src", + "tests" + ], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 10, + "candidates_after_filter": 10 + } + ], + "fallback": { + "used": true, + "reason": "scope_relaxed_no_hits" + }, + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "RuntimeManager" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "miss", + "hit_count": 0, + "fail_reason": "scope_relaxed_no_hits" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 10, + "fail_reason": null + } + ] + }, + "constraint_violations": [ + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C1_SYMBOL_CATALOG", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + } + ], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 148, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 81, + "C2_DEPENDENCY_GRAPH": 50, + "C0_SOURCE_CHUNKS": 15 + }, + "merge_rank": 0 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Где тесты для RuntimeManager?", + "rag_count": 16 + }, + "output": { + "llm_answer": "Прямые тесты для `RuntimeManager` находятся в следующих файлах:\n\n1. tests/test_runtime.py:\n - `test_runtime_graceful_stop_waits_until_worker_finishes`: проверяет корректность остановки менеджера при завершении работы его рабочих процессов.\n - `test_runtime_runs_worker_routine_and_exposes_status`: тестирует запуск рабочего рутины и отображение статуса выполнения.\n\nЭти тесты непосредственно используют объект `RuntimeManager`, создавая его инстанс и проверяя поведение через регистрацию модулей и выполнение операций запуска/остановки.\n\nКосвенных тестов, которые могли бы касаться `RuntimeManager`, но напрямую не создают его экземпляр, в данном контексте не обнаружено." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 925, + "evidence_rows": 16, + "evidence_chars": 7086 + }, + "evidence_summary": [ + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 2 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 10, + "unique_paths": 2 + } + ], + "prompt_template_id": "intent_code_qa_find_tests_ru_v3", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 1361 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-find-tests-runtime-manager.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-find-tests-runtime-manager.md new file mode 100644 index 0000000..b1f5657 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-find-tests-runtime-manager.md @@ -0,0 +1,32 @@ +# plba-v2-find-tests-runtime-manager + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Где тесты для RuntimeManager? + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 16, + "llm_answer": "Прямые тесты для `RuntimeManager` находятся в следующих файлах:\n\n1. tests/test_runtime.py:\n - `test_runtime_graceful_stop_waits_until_worker_finishes`: проверяет корректность остановки менеджера при завершении работы его рабочих процессов.\n - `test_runtime_runs_worker_routine_and_exposes_status`: тестирует запуск рабочего рутины и отображение статуса выполнения.\n\nЭти тесты непосредственно используют объект `RuntimeManager`, создавая его инстанс и проверяя поведение через регистрацию модулей и выполнение операций запуска/остановки.\n\nКосвенных тестов, которые могли бы касаться `RuntimeManager`, но напрямую не создают его экземпляр, в данном контексте не обнаружено.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-find-tests-trace-service.json b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-find-tests-trace-service.json new file mode 100644 index 0000000..778a17b --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-find-tests-trace-service.json @@ -0,0 +1,2047 @@ +{ + "case_id": "plba-v2-find-tests-trace-service", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 16, + "llm_answer": "Прямые тесты для `TraceService` находятся в файле `tests/test_runtime.py`.\n\nВ этих тестах:\n- `test_trace_service_writes_contexts_and_messages` проверяет корректность записи контекста и сообщений при использовании сервиса трассировки.\n- `test_trace_service_supports_debug_warning_and_error_levels` подтверждает поддержку различных уровней логирования (DEBUG, WARNING, ERROR).\n\nОба теста непосредственно обращаются к классу `TraceService`, его методам и зависят от поведения самого класса через интерфейс взаимодействия с транспортом (`RecordingTransport`).", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "TraceService" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-v2-find-tests-trace-service", + "text": "Где тесты для TraceService?", + "mode": "full_chain", + "run_started_at": "2026-03-12T14:07:09", + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Где тесты для TraceService?", + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "TraceService" + ], + "confidence": 0.0 + }, + "rag_count": 16, + "rag_rows": [ + { + "path": "tests/test_runtime.py", + "content": "test_trace_service_writes_contexts_and_messages\n -> RecordingTransport\n -> RecordingTransport.__init__\n -> RecordingTransport.contexts\n -> test_trace_service_writes_contexts_and_messages", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_trace_service_writes_contexts_and_messages:dataflow_slice", + "span_start": 181, + "span_end": 256, + "lexical_rank": 4, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "1636a2f70dee79c804259dc114af6c1ab4db27099911e5f97ac97a2bcb59be8a", + "edge_type": "dataflow_slice", + "src_symbol_id": "1600da201da1d0150240b400e3232172354156decdd1a04e1ab1a1edcd3a7e99", + "src_qname": "test_trace_service_writes_contexts_and_messages", + "dst_symbol_id": "1600da201da1d0150240b400e3232172354156decdd1a04e1ab1a1edcd3a7e99", + "dst_ref": "test_trace_service_writes_contexts_and_messages", + "resolution": "resolved", + "slice_id": "1636a2f70dee79c804259dc114af6c1ab4db27099911e5f97ac97a2bcb59be8a", + "root_symbol_id": "1600da201da1d0150240b400e3232172354156decdd1a04e1ab1a1edcd3a7e99", + "path_symbols": [ + "test_trace_service_writes_contexts_and_messages", + "RecordingTransport", + "RecordingTransport.__init__", + "RecordingTransport.contexts", + "test_trace_service_writes_contexts_and_messages" + ], + "path_symbol_ids": [ + "1600da201da1d0150240b400e3232172354156decdd1a04e1ab1a1edcd3a7e99", + "e3d635de1f1880673b69bf73ca6a45caffa5c7fdc23d589d5e40f76b86bdcd33", + "e34d80da723a7115a7a7586b52dc8b5cfda05c581509eee0c1a0296df9a340cb", + "1600da201da1d0150240b400e3232172354156decdd1a04e1ab1a1edcd3a7e99" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "test_trace_service_writes_contexts_and_messages\n -> RecordingTransport\n -> RecordingTransport.__init__\n -> RecordingTransport.contexts\n -> test_trace_service_allows_messages_without_status", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_trace_service_writes_contexts_and_messages:dataflow_slice", + "span_start": 181, + "span_end": 293, + "lexical_rank": 4, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "5db5abe56b73f884c5178647bd25ef150064a94a41fc8c052aebaa09bd7fdb3d", + "edge_type": "dataflow_slice", + "src_symbol_id": "1600da201da1d0150240b400e3232172354156decdd1a04e1ab1a1edcd3a7e99", + "src_qname": "test_trace_service_writes_contexts_and_messages", + "dst_symbol_id": "7127ca85ce6447928e195e901d36f1e1f1e8205a686e567c2d1b187431f989df", + "dst_ref": "test_trace_service_allows_messages_without_status", + "resolution": "resolved", + "slice_id": "5db5abe56b73f884c5178647bd25ef150064a94a41fc8c052aebaa09bd7fdb3d", + "root_symbol_id": "1600da201da1d0150240b400e3232172354156decdd1a04e1ab1a1edcd3a7e99", + "path_symbols": [ + "test_trace_service_writes_contexts_and_messages", + "RecordingTransport", + "RecordingTransport.__init__", + "RecordingTransport.contexts", + "test_trace_service_allows_messages_without_status" + ], + "path_symbol_ids": [ + "1600da201da1d0150240b400e3232172354156decdd1a04e1ab1a1edcd3a7e99", + "e3d635de1f1880673b69bf73ca6a45caffa5c7fdc23d589d5e40f76b86bdcd33", + "e34d80da723a7115a7a7586b52dc8b5cfda05c581509eee0c1a0296df9a340cb", + "7127ca85ce6447928e195e901d36f1e1f1e8205a686e567c2d1b187431f989df" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "test_trace_service_writes_contexts_and_messages\n -> RecordingTransport\n -> RecordingTransport.__init__\n -> RecordingTransport.contexts\n -> RecordingTransport.write_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_trace_service_writes_contexts_and_messages:dataflow_slice", + "span_start": 181, + "span_end": 249, + "lexical_rank": 4, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "60d7a8655fa4c53d9130ce342fc023d24ccfa16baea47ad60c91d2d49f547565", + "edge_type": "dataflow_slice", + "src_symbol_id": "1600da201da1d0150240b400e3232172354156decdd1a04e1ab1a1edcd3a7e99", + "src_qname": "test_trace_service_writes_contexts_and_messages", + "dst_symbol_id": "b8bbf341e230198caafe54727e13f2db27b7200d6fd95684fc5cf748db1a0e88", + "dst_ref": "RecordingTransport.write_context", + "resolution": "resolved", + "slice_id": "60d7a8655fa4c53d9130ce342fc023d24ccfa16baea47ad60c91d2d49f547565", + "root_symbol_id": "1600da201da1d0150240b400e3232172354156decdd1a04e1ab1a1edcd3a7e99", + "path_symbols": [ + "test_trace_service_writes_contexts_and_messages", + "RecordingTransport", + "RecordingTransport.__init__", + "RecordingTransport.contexts", + "RecordingTransport.write_context" + ], + "path_symbol_ids": [ + "1600da201da1d0150240b400e3232172354156decdd1a04e1ab1a1edcd3a7e99", + "e3d635de1f1880673b69bf73ca6a45caffa5c7fdc23d589d5e40f76b86bdcd33", + "e34d80da723a7115a7a7586b52dc8b5cfda05c581509eee0c1a0296df9a340cb", + "b8bbf341e230198caafe54727e13f2db27b7200d6fd95684fc5cf748db1a0e88" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "test_trace_service_supports_debug_warning_and_error_levels\n -> RecordingTransport\n -> RecordingTransport.__init__\n -> RecordingTransport.contexts\n -> RecordingTransport.write_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_trace_service_supports_debug_warning_and_error_levels:dataflow_slice", + "span_start": 181, + "span_end": 265, + "lexical_rank": 4, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "1372a2241c7265705e5cf9dceeb5e59836fac1d679227c4279ed39e0798ddddf", + "edge_type": "dataflow_slice", + "src_symbol_id": "ede183f1c546725064e28ddab1ffdbae0d1a1258fd62a50eb556c10d10995415", + "src_qname": "test_trace_service_supports_debug_warning_and_error_levels", + "dst_symbol_id": "b8bbf341e230198caafe54727e13f2db27b7200d6fd95684fc5cf748db1a0e88", + "dst_ref": "RecordingTransport.write_context", + "resolution": "resolved", + "slice_id": "1372a2241c7265705e5cf9dceeb5e59836fac1d679227c4279ed39e0798ddddf", + "root_symbol_id": "ede183f1c546725064e28ddab1ffdbae0d1a1258fd62a50eb556c10d10995415", + "path_symbols": [ + "test_trace_service_supports_debug_warning_and_error_levels", + "RecordingTransport", + "RecordingTransport.__init__", + "RecordingTransport.contexts", + "RecordingTransport.write_context" + ], + "path_symbol_ids": [ + "ede183f1c546725064e28ddab1ffdbae0d1a1258fd62a50eb556c10d10995415", + "e3d635de1f1880673b69bf73ca6a45caffa5c7fdc23d589d5e40f76b86bdcd33", + "e34d80da723a7115a7a7586b52dc8b5cfda05c581509eee0c1a0296df9a340cb", + "b8bbf341e230198caafe54727e13f2db27b7200d6fd95684fc5cf748db1a0e88" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "test_trace_service_supports_debug_warning_and_error_levels\n -> RecordingTransport\n -> RecordingTransport.__init__\n -> RecordingTransport.contexts\n -> test_trace_service_writes_contexts_and_messages", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_trace_service_supports_debug_warning_and_error_levels:dataflow_slice", + "span_start": 181, + "span_end": 265, + "lexical_rank": 4, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "8b6a5a738525df160600d71c15915704172de20db436ea2f84b6e039be396a2d", + "edge_type": "dataflow_slice", + "src_symbol_id": "ede183f1c546725064e28ddab1ffdbae0d1a1258fd62a50eb556c10d10995415", + "src_qname": "test_trace_service_supports_debug_warning_and_error_levels", + "dst_symbol_id": "1600da201da1d0150240b400e3232172354156decdd1a04e1ab1a1edcd3a7e99", + "dst_ref": "test_trace_service_writes_contexts_and_messages", + "resolution": "resolved", + "slice_id": "8b6a5a738525df160600d71c15915704172de20db436ea2f84b6e039be396a2d", + "root_symbol_id": "ede183f1c546725064e28ddab1ffdbae0d1a1258fd62a50eb556c10d10995415", + "path_symbols": [ + "test_trace_service_supports_debug_warning_and_error_levels", + "RecordingTransport", + "RecordingTransport.__init__", + "RecordingTransport.contexts", + "test_trace_service_writes_contexts_and_messages" + ], + "path_symbol_ids": [ + "ede183f1c546725064e28ddab1ffdbae0d1a1258fd62a50eb556c10d10995415", + "e3d635de1f1880673b69bf73ca6a45caffa5c7fdc23d589d5e40f76b86bdcd33", + "e34d80da723a7115a7a7586b52dc8b5cfda05c581509eee0c1a0296df9a340cb", + "1600da201da1d0150240b400e3232172354156decdd1a04e1ab1a1edcd3a7e99" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "test_trace_service_supports_debug_warning_and_error_levels\n -> RecordingTransport\n -> RecordingTransport.__init__\n -> RecordingTransport.contexts\n -> test_trace_service_allows_messages_without_status", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_trace_service_supports_debug_warning_and_error_levels:dataflow_slice", + "span_start": 181, + "span_end": 293, + "lexical_rank": 4, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "f7d099f6d5746aa61a3025fd7eef791369bd3a3e5df4bc716de87e7b149ccde6", + "edge_type": "dataflow_slice", + "src_symbol_id": "ede183f1c546725064e28ddab1ffdbae0d1a1258fd62a50eb556c10d10995415", + "src_qname": "test_trace_service_supports_debug_warning_and_error_levels", + "dst_symbol_id": "7127ca85ce6447928e195e901d36f1e1f1e8205a686e567c2d1b187431f989df", + "dst_ref": "test_trace_service_allows_messages_without_status", + "resolution": "resolved", + "slice_id": "f7d099f6d5746aa61a3025fd7eef791369bd3a3e5df4bc716de87e7b149ccde6", + "root_symbol_id": "ede183f1c546725064e28ddab1ffdbae0d1a1258fd62a50eb556c10d10995415", + "path_symbols": [ + "test_trace_service_supports_debug_warning_and_error_levels", + "RecordingTransport", + "RecordingTransport.__init__", + "RecordingTransport.contexts", + "test_trace_service_allows_messages_without_status" + ], + "path_symbol_ids": [ + "ede183f1c546725064e28ddab1ffdbae0d1a1258fd62a50eb556c10d10995415", + "e3d635de1f1880673b69bf73ca6a45caffa5c7fdc23d589d5e40f76b86bdcd33", + "e34d80da723a7115a7a7586b52dc8b5cfda05c581509eee0c1a0296df9a340cb", + "7127ca85ce6447928e195e901d36f1e1f1e8205a686e567c2d1b187431f989df" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "def test_trace_service_writes_contexts_and_messages() -> None:\n from app_runtime.tracing.service import TraceService\n\n transport = RecordingTransport()\n manager = TraceService(transport=transport)\n\n with manager.open_context(alias=\"worker\", kind=\"worker\", attrs={\"routine\": \"incoming\"}):\n manager.step(\"parse\")\n manager.info(\"started\", status=\"ok\", attrs={\"attempt\": 1})\n\n assert len(transport.contexts) == 1\n assert len(transport.messages) == 1\n assert transport.contexts[0].alias == \"worker\"\n assert transport.messages[0].step == \"parse\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_runtime.py:test_trace_service_writes_contexts_and_messages", + "span_start": 246, + "span_end": 259, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 9, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "def test_trace_service_supports_debug_warning_and_error_levels() -> None:\n from app_runtime.tracing.service import TraceService\n\n transport = RecordingTransport()\n manager = TraceService(transport=transport)\n\n with manager.open_context(alias=\"worker\", kind=\"worker\", attrs={\"routine\": \"incoming\"}):\n manager.step(\"validate\")\n manager.debug(\"validation details\", attrs={\"rule\": \"basic\"})\n manager.warning(\"validation warning\", status=\"degraded\", attrs={\"attempt\": 1})\n manager.error(\"integration failed\", status=\"failed\", attrs={\"integration\": \"crm\"})\n manager.exception(\"caught exception\", attrs={\"exception_type\": \"RuntimeError\"})\n\n levels = [message.level for message in transport.messages]\n assert levels == [\"DEBUG\", \"WARNING\", \"ERROR\", \"ERROR\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_runtime.py:test_trace_service_supports_debug_warning_and_error_levels", + "span_start": 262, + "span_end": 276, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 10, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "def test_trace_service_allows_messages_without_status() -> None:\n from app_runtime.tracing.service import TraceService\n\n transport = RecordingTransport()\n manager = TraceService(transport=transport)\n\n with manager.open_context(alias=\"worker\", kind=\"worker\"):\n manager.step(\"optional-status\")\n manager.debug(\"debug without status\")\n manager.info(\"info without status\")\n manager.warning(\"warning without status\")\n manager.error(\"error without status\")\n\n assert [message.status for message in transport.messages] == [\"\", \"\", \"\", \"\"]\n assert all(message.trace_id == transport.contexts[0].trace_id for message in transport.messages)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_runtime.py:test_trace_service_allows_messages_without_status", + "span_start": 279, + "span_end": 293, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 11, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class ScenarioWorker(Worker):\n def __init__(self, name: str, routine: object, *, interval: float = 0.05) -> None:\n self._name = name\n self._routine = routine\n self._interval = interval\n self._thread: Thread | None = None\n self._stop_requested = Event()\n self._in_flight = 0\n self._runs = 0\n self._lock = Lock()\n\n @property\n def name(self) -> str:\n return self._name\n\n @property\n def critical(self) -> bool:\n return True\n\n def start(self) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._stop_requested.clear()\n self._thread = Thread(target=self._loop, name=f\"{self._name}-thread\", daemon=True)\n self._thread.start()\n\n def stop(self, force: bool = False) -> None:\n self._stop_requested.set()\n\n def health(self) -> WorkerHealth:\n return WorkerHealth(name=self.name, status=\"ok\", critical=True, meta={\"runs\": self._runs})\n\n def status(self) -> WorkerStatus:\n thread_alive = self._thread is not None and self._thread.is_alive()\n with self._lock:\n in_flight = self._in_flight\n runs = self._runs\n if not thread_alive:\n state = \"stopped\"\n elif self._stop_requested.is_set():\n state = \"stopping\"\n elif in_flight > 0:\n state = \"busy\"\n else:\n state = \"idle\"\n return WorkerStatus(name=self.name, state=state, in_flight=in_flight, meta={\"runs\": runs})\n\n def _loop(self) -> None:\n while not self._stop_requested.is_set():\n with self._lock:\n self._in_flight += 1\n try:\n self._routine.run()\n with self._lock:\n self._runs += 1\n finally:\n with self._lock:\n self._in_flight -= 1\n if self._stop_requested.is_set():\n return\n sleep(self._interval)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:ScenarioWorker", + "span_start": 50, + "span_end": 110, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 2, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class IntervalRoutine:\n calls: list[float] = field(default_factory=list)\n _lock: Lock = field(default_factory=Lock)\n\n def run(self) -> None:\n with self._lock:\n self.calls.append(monotonic())\n\n def wait_runs(self, count: int, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n with self._lock:\n if len(self.calls) >= count:\n return True\n sleep(0.01)\n return False\n\n def deltas(self) -> list[float]:\n with self._lock:\n return [self.calls[index + 1] - self.calls[index] for index in range(len(self.calls) - 1)]", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:IntervalRoutine", + "span_start": 18, + "span_end": 37, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class BlockingRoutine:\n def __init__(self, started: Event, release: Event) -> None:\n self._started = started\n self._release = release\n\n def run(self) -> None:\n self._started.set()\n self._release.wait(timeout=5.0)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:BlockingRoutine", + "span_start": 40, + "span_end": 47, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def test_worker_wakes_up_with_configured_interval() -> None:\n interval = 0.15\n routine = IntervalRoutine()\n worker = ScenarioWorker(\"interval-worker\", routine, interval=interval)\n runtime = RuntimeManager()\n runtime.register_module(WorkerModule(worker))\n\n runtime.start()\n try:\n assert routine.wait_runs(count=3, timeout=2.0) is True\n finally:\n runtime.stop()\n\n deltas = routine.deltas()\n assert len(deltas) >= 2\n assert all(delta >= interval * 0.7 for delta in deltas[:2])", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:test_worker_wakes_up_with_configured_interval", + "span_start": 163, + "span_end": 178, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 7, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _http_call_json(\n base_url: str,\n path: str,\n *,\n method: str = \"GET\",\n headers: dict[str, str] | None = None,\n) -> tuple[int, dict[str, object]]:\n request = Request(f\"{base_url}{path}\", method=method, headers=headers or {})\n try:\n with urlopen(request, timeout=15.0) as response:\n status = response.status\n body = response.read()\n except HTTPError as error:\n status = error.code\n body = error.read()\n payload = json.loads(body.decode(\"utf-8\"))\n return status, payload", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_http_call_json", + "span_start": 125, + "span_end": 141, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 4, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _build_runtime(worker: Worker, *, control_timeout: int = 1) -> tuple[RuntimeManager, str]:\n runtime = RuntimeManager()\n channel = HttpControlChannel(host=\"127.0.0.1\", port=0, timeout=control_timeout)\n runtime.control_plane.register_channel(channel)\n runtime.register_module(WorkerModule(worker))\n runtime.start()\n return runtime, f\"http://127.0.0.1:{channel.port}\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_build_runtime", + "span_start": 154, + "span_end": 160, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 6, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class WorkerModule(ApplicationModule):\n def __init__(self, worker: Worker) -> None:\n self._worker = worker\n\n @property\n def name(self) -> str:\n return \"business-tests\"\n\n def register(self, registry: ModuleRegistry) -> None:\n registry.add_worker(self._worker)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:WorkerModule", + "span_start": 113, + "span_end": 122, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 3, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "Прямые тесты для `TraceService` находятся в файле `tests/test_runtime.py`.\n\nВ этих тестах:\n- `test_trace_service_writes_contexts_and_messages` проверяет корректность записи контекста и сообщений при использовании сервиса трассировки.\n- `test_trace_service_supports_debug_warning_and_error_levels` подтверждает поддержку различных уровней логирования (DEBUG, WARNING, ERROR).\n\nОба теста непосредственно обращаются к классу `TraceService`, его методам и зависят от поведения самого класса через интерфейс взаимодействия с транспортом (`RecordingTransport`).", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C2_DEPENDENCY_GRAPH" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "TraceService" + ], + "keyword_hints": [ + "TraceService" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "test_file_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "test_symbol_patterns": [ + "test_trace_service", + "TestTraceService", + "TraceService" + ], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C0_SOURCE_CHUNKS": 10 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src", + "tests" + ], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src", + "tests" + ], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "TraceService", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Где тесты для TraceService? test_trace_service TestTraceService TraceService", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Где тесты для TraceService? test_trace_service TestTraceService TraceService", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 10, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 0, + "candidates_after_filter": 0 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src", + "tests" + ], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src", + "tests" + ], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 10, + "candidates_after_filter": 10 + } + ], + "fallback": { + "used": true, + "reason": "scope_relaxed_no_hits" + }, + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "TraceService" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "miss", + "hit_count": 0, + "fail_reason": "scope_relaxed_no_hits" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 10, + "fail_reason": null + } + ] + }, + "constraint_violations": [ + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C1_SYMBOL_CATALOG", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + } + ], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 123, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 62, + "C2_DEPENDENCY_GRAPH": 47, + "C0_SOURCE_CHUNKS": 13 + }, + "merge_rank": 0, + "prompt_build": 0, + "llm_call": 992 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 999, + "evidence_rows": 16, + "evidence_chars": 7847 + }, + "evidence_summary": [ + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 10, + "unique_paths": 2 + } + ], + "prompt_template_id": "intent_code_qa_find_tests_ru_v3", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "TraceService" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 16, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-v2-find-tests-trace-service", + "mode": "full_chain", + "run_started_at": "2026-03-12T14:07:09", + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Где тесты для TraceService?", + "normalized_query": "Где тесты для TraceService?" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Где тесты для TraceService?" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Где тесты для TraceService?" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "TraceService" + ], + "keyword_hints": [ + "TraceService" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "test_file_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "test_symbol_patterns": [ + "test_trace_service", + "TestTraceService", + "TraceService" + ], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Где тесты для TraceService?" + }, + "output": { + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "TraceService" + ], + "confidence": 0.0 + }, + "rag_count": 16, + "rag_rows": [ + { + "path": "tests/test_runtime.py", + "content": "test_trace_service_writes_contexts_and_messages\n -> RecordingTransport\n -> RecordingTransport.__init__\n -> RecordingTransport.contexts\n -> test_trace_service_writes_contexts_and_messages", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_trace_service_writes_contexts_and_messages:dataflow_slice", + "span_start": 181, + "span_end": 256, + "lexical_rank": 4, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "1636a2f70dee79c804259dc114af6c1ab4db27099911e5f97ac97a2bcb59be8a", + "edge_type": "dataflow_slice", + "src_symbol_id": "1600da201da1d0150240b400e3232172354156decdd1a04e1ab1a1edcd3a7e99", + "src_qname": "test_trace_service_writes_contexts_and_messages", + "dst_symbol_id": "1600da201da1d0150240b400e3232172354156decdd1a04e1ab1a1edcd3a7e99", + "dst_ref": "test_trace_service_writes_contexts_and_messages", + "resolution": "resolved", + "slice_id": "1636a2f70dee79c804259dc114af6c1ab4db27099911e5f97ac97a2bcb59be8a", + "root_symbol_id": "1600da201da1d0150240b400e3232172354156decdd1a04e1ab1a1edcd3a7e99", + "path_symbols": [ + "test_trace_service_writes_contexts_and_messages", + "RecordingTransport", + "RecordingTransport.__init__", + "RecordingTransport.contexts", + "test_trace_service_writes_contexts_and_messages" + ], + "path_symbol_ids": [ + "1600da201da1d0150240b400e3232172354156decdd1a04e1ab1a1edcd3a7e99", + "e3d635de1f1880673b69bf73ca6a45caffa5c7fdc23d589d5e40f76b86bdcd33", + "e34d80da723a7115a7a7586b52dc8b5cfda05c581509eee0c1a0296df9a340cb", + "1600da201da1d0150240b400e3232172354156decdd1a04e1ab1a1edcd3a7e99" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "test_trace_service_writes_contexts_and_messages\n -> RecordingTransport\n -> RecordingTransport.__init__\n -> RecordingTransport.contexts\n -> test_trace_service_allows_messages_without_status", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_trace_service_writes_contexts_and_messages:dataflow_slice", + "span_start": 181, + "span_end": 293, + "lexical_rank": 4, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "5db5abe56b73f884c5178647bd25ef150064a94a41fc8c052aebaa09bd7fdb3d", + "edge_type": "dataflow_slice", + "src_symbol_id": "1600da201da1d0150240b400e3232172354156decdd1a04e1ab1a1edcd3a7e99", + "src_qname": "test_trace_service_writes_contexts_and_messages", + "dst_symbol_id": "7127ca85ce6447928e195e901d36f1e1f1e8205a686e567c2d1b187431f989df", + "dst_ref": "test_trace_service_allows_messages_without_status", + "resolution": "resolved", + "slice_id": "5db5abe56b73f884c5178647bd25ef150064a94a41fc8c052aebaa09bd7fdb3d", + "root_symbol_id": "1600da201da1d0150240b400e3232172354156decdd1a04e1ab1a1edcd3a7e99", + "path_symbols": [ + "test_trace_service_writes_contexts_and_messages", + "RecordingTransport", + "RecordingTransport.__init__", + "RecordingTransport.contexts", + "test_trace_service_allows_messages_without_status" + ], + "path_symbol_ids": [ + "1600da201da1d0150240b400e3232172354156decdd1a04e1ab1a1edcd3a7e99", + "e3d635de1f1880673b69bf73ca6a45caffa5c7fdc23d589d5e40f76b86bdcd33", + "e34d80da723a7115a7a7586b52dc8b5cfda05c581509eee0c1a0296df9a340cb", + "7127ca85ce6447928e195e901d36f1e1f1e8205a686e567c2d1b187431f989df" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "test_trace_service_writes_contexts_and_messages\n -> RecordingTransport\n -> RecordingTransport.__init__\n -> RecordingTransport.contexts\n -> RecordingTransport.write_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_trace_service_writes_contexts_and_messages:dataflow_slice", + "span_start": 181, + "span_end": 249, + "lexical_rank": 4, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "60d7a8655fa4c53d9130ce342fc023d24ccfa16baea47ad60c91d2d49f547565", + "edge_type": "dataflow_slice", + "src_symbol_id": "1600da201da1d0150240b400e3232172354156decdd1a04e1ab1a1edcd3a7e99", + "src_qname": "test_trace_service_writes_contexts_and_messages", + "dst_symbol_id": "b8bbf341e230198caafe54727e13f2db27b7200d6fd95684fc5cf748db1a0e88", + "dst_ref": "RecordingTransport.write_context", + "resolution": "resolved", + "slice_id": "60d7a8655fa4c53d9130ce342fc023d24ccfa16baea47ad60c91d2d49f547565", + "root_symbol_id": "1600da201da1d0150240b400e3232172354156decdd1a04e1ab1a1edcd3a7e99", + "path_symbols": [ + "test_trace_service_writes_contexts_and_messages", + "RecordingTransport", + "RecordingTransport.__init__", + "RecordingTransport.contexts", + "RecordingTransport.write_context" + ], + "path_symbol_ids": [ + "1600da201da1d0150240b400e3232172354156decdd1a04e1ab1a1edcd3a7e99", + "e3d635de1f1880673b69bf73ca6a45caffa5c7fdc23d589d5e40f76b86bdcd33", + "e34d80da723a7115a7a7586b52dc8b5cfda05c581509eee0c1a0296df9a340cb", + "b8bbf341e230198caafe54727e13f2db27b7200d6fd95684fc5cf748db1a0e88" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "test_trace_service_supports_debug_warning_and_error_levels\n -> RecordingTransport\n -> RecordingTransport.__init__\n -> RecordingTransport.contexts\n -> RecordingTransport.write_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_trace_service_supports_debug_warning_and_error_levels:dataflow_slice", + "span_start": 181, + "span_end": 265, + "lexical_rank": 4, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "1372a2241c7265705e5cf9dceeb5e59836fac1d679227c4279ed39e0798ddddf", + "edge_type": "dataflow_slice", + "src_symbol_id": "ede183f1c546725064e28ddab1ffdbae0d1a1258fd62a50eb556c10d10995415", + "src_qname": "test_trace_service_supports_debug_warning_and_error_levels", + "dst_symbol_id": "b8bbf341e230198caafe54727e13f2db27b7200d6fd95684fc5cf748db1a0e88", + "dst_ref": "RecordingTransport.write_context", + "resolution": "resolved", + "slice_id": "1372a2241c7265705e5cf9dceeb5e59836fac1d679227c4279ed39e0798ddddf", + "root_symbol_id": "ede183f1c546725064e28ddab1ffdbae0d1a1258fd62a50eb556c10d10995415", + "path_symbols": [ + "test_trace_service_supports_debug_warning_and_error_levels", + "RecordingTransport", + "RecordingTransport.__init__", + "RecordingTransport.contexts", + "RecordingTransport.write_context" + ], + "path_symbol_ids": [ + "ede183f1c546725064e28ddab1ffdbae0d1a1258fd62a50eb556c10d10995415", + "e3d635de1f1880673b69bf73ca6a45caffa5c7fdc23d589d5e40f76b86bdcd33", + "e34d80da723a7115a7a7586b52dc8b5cfda05c581509eee0c1a0296df9a340cb", + "b8bbf341e230198caafe54727e13f2db27b7200d6fd95684fc5cf748db1a0e88" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "test_trace_service_supports_debug_warning_and_error_levels\n -> RecordingTransport\n -> RecordingTransport.__init__\n -> RecordingTransport.contexts\n -> test_trace_service_writes_contexts_and_messages", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_trace_service_supports_debug_warning_and_error_levels:dataflow_slice", + "span_start": 181, + "span_end": 265, + "lexical_rank": 4, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "8b6a5a738525df160600d71c15915704172de20db436ea2f84b6e039be396a2d", + "edge_type": "dataflow_slice", + "src_symbol_id": "ede183f1c546725064e28ddab1ffdbae0d1a1258fd62a50eb556c10d10995415", + "src_qname": "test_trace_service_supports_debug_warning_and_error_levels", + "dst_symbol_id": "1600da201da1d0150240b400e3232172354156decdd1a04e1ab1a1edcd3a7e99", + "dst_ref": "test_trace_service_writes_contexts_and_messages", + "resolution": "resolved", + "slice_id": "8b6a5a738525df160600d71c15915704172de20db436ea2f84b6e039be396a2d", + "root_symbol_id": "ede183f1c546725064e28ddab1ffdbae0d1a1258fd62a50eb556c10d10995415", + "path_symbols": [ + "test_trace_service_supports_debug_warning_and_error_levels", + "RecordingTransport", + "RecordingTransport.__init__", + "RecordingTransport.contexts", + "test_trace_service_writes_contexts_and_messages" + ], + "path_symbol_ids": [ + "ede183f1c546725064e28ddab1ffdbae0d1a1258fd62a50eb556c10d10995415", + "e3d635de1f1880673b69bf73ca6a45caffa5c7fdc23d589d5e40f76b86bdcd33", + "e34d80da723a7115a7a7586b52dc8b5cfda05c581509eee0c1a0296df9a340cb", + "1600da201da1d0150240b400e3232172354156decdd1a04e1ab1a1edcd3a7e99" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "test_trace_service_supports_debug_warning_and_error_levels\n -> RecordingTransport\n -> RecordingTransport.__init__\n -> RecordingTransport.contexts\n -> test_trace_service_allows_messages_without_status", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_trace_service_supports_debug_warning_and_error_levels:dataflow_slice", + "span_start": 181, + "span_end": 293, + "lexical_rank": 4, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "f7d099f6d5746aa61a3025fd7eef791369bd3a3e5df4bc716de87e7b149ccde6", + "edge_type": "dataflow_slice", + "src_symbol_id": "ede183f1c546725064e28ddab1ffdbae0d1a1258fd62a50eb556c10d10995415", + "src_qname": "test_trace_service_supports_debug_warning_and_error_levels", + "dst_symbol_id": "7127ca85ce6447928e195e901d36f1e1f1e8205a686e567c2d1b187431f989df", + "dst_ref": "test_trace_service_allows_messages_without_status", + "resolution": "resolved", + "slice_id": "f7d099f6d5746aa61a3025fd7eef791369bd3a3e5df4bc716de87e7b149ccde6", + "root_symbol_id": "ede183f1c546725064e28ddab1ffdbae0d1a1258fd62a50eb556c10d10995415", + "path_symbols": [ + "test_trace_service_supports_debug_warning_and_error_levels", + "RecordingTransport", + "RecordingTransport.__init__", + "RecordingTransport.contexts", + "test_trace_service_allows_messages_without_status" + ], + "path_symbol_ids": [ + "ede183f1c546725064e28ddab1ffdbae0d1a1258fd62a50eb556c10d10995415", + "e3d635de1f1880673b69bf73ca6a45caffa5c7fdc23d589d5e40f76b86bdcd33", + "e34d80da723a7115a7a7586b52dc8b5cfda05c581509eee0c1a0296df9a340cb", + "7127ca85ce6447928e195e901d36f1e1f1e8205a686e567c2d1b187431f989df" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "def test_trace_service_writes_contexts_and_messages() -> None:\n from app_runtime.tracing.service import TraceService\n\n transport = RecordingTransport()\n manager = TraceService(transport=transport)\n\n with manager.open_context(alias=\"worker\", kind=\"worker\", attrs={\"routine\": \"incoming\"}):\n manager.step(\"parse\")\n manager.info(\"started\", status=\"ok\", attrs={\"attempt\": 1})\n\n assert len(transport.contexts) == 1\n assert len(transport.messages) == 1\n assert transport.contexts[0].alias == \"worker\"\n assert transport.messages[0].step == \"parse\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_runtime.py:test_trace_service_writes_contexts_and_messages", + "span_start": 246, + "span_end": 259, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 9, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "def test_trace_service_supports_debug_warning_and_error_levels() -> None:\n from app_runtime.tracing.service import TraceService\n\n transport = RecordingTransport()\n manager = TraceService(transport=transport)\n\n with manager.open_context(alias=\"worker\", kind=\"worker\", attrs={\"routine\": \"incoming\"}):\n manager.step(\"validate\")\n manager.debug(\"validation details\", attrs={\"rule\": \"basic\"})\n manager.warning(\"validation warning\", status=\"degraded\", attrs={\"attempt\": 1})\n manager.error(\"integration failed\", status=\"failed\", attrs={\"integration\": \"crm\"})\n manager.exception(\"caught exception\", attrs={\"exception_type\": \"RuntimeError\"})\n\n levels = [message.level for message in transport.messages]\n assert levels == [\"DEBUG\", \"WARNING\", \"ERROR\", \"ERROR\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_runtime.py:test_trace_service_supports_debug_warning_and_error_levels", + "span_start": 262, + "span_end": 276, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 10, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "def test_trace_service_allows_messages_without_status() -> None:\n from app_runtime.tracing.service import TraceService\n\n transport = RecordingTransport()\n manager = TraceService(transport=transport)\n\n with manager.open_context(alias=\"worker\", kind=\"worker\"):\n manager.step(\"optional-status\")\n manager.debug(\"debug without status\")\n manager.info(\"info without status\")\n manager.warning(\"warning without status\")\n manager.error(\"error without status\")\n\n assert [message.status for message in transport.messages] == [\"\", \"\", \"\", \"\"]\n assert all(message.trace_id == transport.contexts[0].trace_id for message in transport.messages)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_runtime.py:test_trace_service_allows_messages_without_status", + "span_start": 279, + "span_end": 293, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 11, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class ScenarioWorker(Worker):\n def __init__(self, name: str, routine: object, *, interval: float = 0.05) -> None:\n self._name = name\n self._routine = routine\n self._interval = interval\n self._thread: Thread | None = None\n self._stop_requested = Event()\n self._in_flight = 0\n self._runs = 0\n self._lock = Lock()\n\n @property\n def name(self) -> str:\n return self._name\n\n @property\n def critical(self) -> bool:\n return True\n\n def start(self) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._stop_requested.clear()\n self._thread = Thread(target=self._loop, name=f\"{self._name}-thread\", daemon=True)\n self._thread.start()\n\n def stop(self, force: bool = False) -> None:\n self._stop_requested.set()\n\n def health(self) -> WorkerHealth:\n return WorkerHealth(name=self.name, status=\"ok\", critical=True, meta={\"runs\": self._runs})\n\n def status(self) -> WorkerStatus:\n thread_alive = self._thread is not None and self._thread.is_alive()\n with self._lock:\n in_flight = self._in_flight\n runs = self._runs\n if not thread_alive:\n state = \"stopped\"\n elif self._stop_requested.is_set():\n state = \"stopping\"\n elif in_flight > 0:\n state = \"busy\"\n else:\n state = \"idle\"\n return WorkerStatus(name=self.name, state=state, in_flight=in_flight, meta={\"runs\": runs})\n\n def _loop(self) -> None:\n while not self._stop_requested.is_set():\n with self._lock:\n self._in_flight += 1\n try:\n self._routine.run()\n with self._lock:\n self._runs += 1\n finally:\n with self._lock:\n self._in_flight -= 1\n if self._stop_requested.is_set():\n return\n sleep(self._interval)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:ScenarioWorker", + "span_start": 50, + "span_end": 110, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 2, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class IntervalRoutine:\n calls: list[float] = field(default_factory=list)\n _lock: Lock = field(default_factory=Lock)\n\n def run(self) -> None:\n with self._lock:\n self.calls.append(monotonic())\n\n def wait_runs(self, count: int, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n with self._lock:\n if len(self.calls) >= count:\n return True\n sleep(0.01)\n return False\n\n def deltas(self) -> list[float]:\n with self._lock:\n return [self.calls[index + 1] - self.calls[index] for index in range(len(self.calls) - 1)]", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:IntervalRoutine", + "span_start": 18, + "span_end": 37, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class BlockingRoutine:\n def __init__(self, started: Event, release: Event) -> None:\n self._started = started\n self._release = release\n\n def run(self) -> None:\n self._started.set()\n self._release.wait(timeout=5.0)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:BlockingRoutine", + "span_start": 40, + "span_end": 47, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def test_worker_wakes_up_with_configured_interval() -> None:\n interval = 0.15\n routine = IntervalRoutine()\n worker = ScenarioWorker(\"interval-worker\", routine, interval=interval)\n runtime = RuntimeManager()\n runtime.register_module(WorkerModule(worker))\n\n runtime.start()\n try:\n assert routine.wait_runs(count=3, timeout=2.0) is True\n finally:\n runtime.stop()\n\n deltas = routine.deltas()\n assert len(deltas) >= 2\n assert all(delta >= interval * 0.7 for delta in deltas[:2])", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:test_worker_wakes_up_with_configured_interval", + "span_start": 163, + "span_end": 178, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 7, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _http_call_json(\n base_url: str,\n path: str,\n *,\n method: str = \"GET\",\n headers: dict[str, str] | None = None,\n) -> tuple[int, dict[str, object]]:\n request = Request(f\"{base_url}{path}\", method=method, headers=headers or {})\n try:\n with urlopen(request, timeout=15.0) as response:\n status = response.status\n body = response.read()\n except HTTPError as error:\n status = error.code\n body = error.read()\n payload = json.loads(body.decode(\"utf-8\"))\n return status, payload", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_http_call_json", + "span_start": 125, + "span_end": 141, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 4, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _build_runtime(worker: Worker, *, control_timeout: int = 1) -> tuple[RuntimeManager, str]:\n runtime = RuntimeManager()\n channel = HttpControlChannel(host=\"127.0.0.1\", port=0, timeout=control_timeout)\n runtime.control_plane.register_channel(channel)\n runtime.register_module(WorkerModule(worker))\n runtime.start()\n return runtime, f\"http://127.0.0.1:{channel.port}\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_build_runtime", + "span_start": 154, + "span_end": 160, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 6, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class WorkerModule(ApplicationModule):\n def __init__(self, worker: Worker) -> None:\n self._worker = worker\n\n @property\n def name(self) -> str:\n return \"business-tests\"\n\n def register(self, registry: ModuleRegistry) -> None:\n registry.add_worker(self._worker)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:WorkerModule", + "span_start": 113, + "span_end": 122, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 3, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C0_SOURCE_CHUNKS": 10 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src", + "tests" + ], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src", + "tests" + ], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "TraceService", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Где тесты для TraceService? test_trace_service TestTraceService TraceService", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Где тесты для TraceService? test_trace_service TestTraceService TraceService", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 10, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 0, + "candidates_after_filter": 0 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src", + "tests" + ], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src", + "tests" + ], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 10, + "candidates_after_filter": 10 + } + ], + "fallback": { + "used": true, + "reason": "scope_relaxed_no_hits" + }, + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "TraceService" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "miss", + "hit_count": 0, + "fail_reason": "scope_relaxed_no_hits" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 10, + "fail_reason": null + } + ] + }, + "constraint_violations": [ + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C1_SYMBOL_CATALOG", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + } + ], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 123, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 62, + "C2_DEPENDENCY_GRAPH": 47, + "C0_SOURCE_CHUNKS": 13 + }, + "merge_rank": 0 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Где тесты для TraceService?", + "rag_count": 16 + }, + "output": { + "llm_answer": "Прямые тесты для `TraceService` находятся в файле `tests/test_runtime.py`.\n\nВ этих тестах:\n- `test_trace_service_writes_contexts_and_messages` проверяет корректность записи контекста и сообщений при использовании сервиса трассировки.\n- `test_trace_service_supports_debug_warning_and_error_levels` подтверждает поддержку различных уровней логирования (DEBUG, WARNING, ERROR).\n\nОба теста непосредственно обращаются к классу `TraceService`, его методам и зависят от поведения самого класса через интерфейс взаимодействия с транспортом (`RecordingTransport`)." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 999, + "evidence_rows": 16, + "evidence_chars": 7847 + }, + "evidence_summary": [ + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 10, + "unique_paths": 2 + } + ], + "prompt_template_id": "intent_code_qa_find_tests_ru_v3", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 992 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-find-tests-trace-service.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-find-tests-trace-service.md new file mode 100644 index 0000000..c3b6739 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-find-tests-trace-service.md @@ -0,0 +1,32 @@ +# plba-v2-find-tests-trace-service + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Где тесты для TraceService? + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 16, + "llm_answer": "Прямые тесты для `TraceService` находятся в файле `tests/test_runtime.py`.\n\nВ этих тестах:\n- `test_trace_service_writes_contexts_and_messages` проверяет корректность записи контекста и сообщений при использовании сервиса трассировки.\n- `test_trace_service_supports_debug_warning_and_error_levels` подтверждает поддержку различных уровней логирования (DEBUG, WARNING, ERROR).\n\nОба теста непосредственно обращаются к классу `TraceService`, его методам и зависят от поведения самого класса через интерфейс взаимодействия с транспортом (`RecordingTransport`).", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "TraceService" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-find-tests-workflow-runtime-factory-negative.json b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-find-tests-workflow-runtime-factory-negative.json new file mode 100644 index 0000000..d6bebb4 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-find-tests-workflow-runtime-factory-negative.json @@ -0,0 +1,2047 @@ +{ + "case_id": "plba-v2-find-tests-workflow-runtime-factory-negative", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 16, + "llm_answer": "Прямых тестов конкретно для `WorkflowRuntimeFactory` в предоставленном контексте не обнаружено. Имя класса, его импорты или вызовы не упоминаются ни в одном из перечисленных тестов.\n\nОднако можно найти косвенно связанные тесты, которые могут проверять функционал, связанный с управлением рабочими потоками или сценариями выполнения рабочих задач (например, блокирующие рутины, сценарии работы с интервалами). Эти тесты преимущественно проверяют поведение отдельных компонентов системы управления выполнением задач, таких как запуск, остановка и мониторинг активности работников.\n\nНапример:\n- tests/test_business_control_actions.py: Тесты проверяют взаимодействие с различными действиями, связанными с состоянием и здоровьем рабочего потока (`ScenarioWorker`, `BlockingRoutine`), но напрямую не касаются `WorkflowRuntimeFactory`.\n \nЭти тесты фокусируются на проверке правильности работы различных сценариев жизненного цикла процессов, таких как старт, остановка и проверка состояния работающих потоков.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "WorkflowRuntimeFactory" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-v2-find-tests-workflow-runtime-factory-negative", + "text": "Где тесты для WorkflowRuntimeFactory?", + "mode": "full_chain", + "run_started_at": "2026-03-12T14:07:09", + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Где тесты для WorkflowRuntimeFactory?", + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "WorkflowRuntimeFactory" + ], + "confidence": 0.0 + }, + "rag_count": 16, + "rag_rows": [ + { + "path": "tests/test_business_control_actions.py", + "content": "test_actions_stop_busy_worker_before_timeout\n -> BlockingRoutine\n -> BlockingRoutine.__init__\n -> BlockingRoutine._release\n -> BlockingRoutine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_actions_stop_busy_worker_before_timeout:dataflow_slice", + "span_start": 43, + "span_end": 212, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "8bd726155ba387d3579763ee84dfd2f9a90bc917da88f3b2e89416ab5c1254d6", + "edge_type": "dataflow_slice", + "src_symbol_id": "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "src_qname": "test_actions_stop_busy_worker_before_timeout", + "dst_symbol_id": "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04", + "dst_ref": "BlockingRoutine.run", + "resolution": "resolved", + "slice_id": "8bd726155ba387d3579763ee84dfd2f9a90bc917da88f3b2e89416ab5c1254d6", + "root_symbol_id": "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "path_symbols": [ + "test_actions_stop_busy_worker_before_timeout", + "BlockingRoutine", + "BlockingRoutine.__init__", + "BlockingRoutine._release", + "BlockingRoutine.run" + ], + "path_symbol_ids": [ + "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "a3349c5bc65e4003a4bbd6a8dbb7a54c337e12d1aed930caa701b12e520f1e67", + "486deeed3043c6db985aef258e96ddc67aa53608e67a83962fbd2471f649ddf1", + "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_worker_wakes_up_with_configured_interval\n -> ScenarioWorker\n -> ScenarioWorker.__init__\n -> ScenarioWorker._name\n -> ScenarioWorker.name", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_worker_wakes_up_with_configured_interval:dataflow_slice", + "span_start": 52, + "span_end": 166, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "2fd137f5852febe907f44d3b3e4ea430f89ccfe962ae1442a16ab9df64c8f76c", + "edge_type": "dataflow_slice", + "src_symbol_id": "65f877f78191d65e6a752e41cedc70ebc784c266804a55c1c56440336e1f0d6e", + "src_qname": "test_worker_wakes_up_with_configured_interval", + "dst_symbol_id": "da022da2c49fd9cfd09d6e6da6bbd59aaa7d28efd669ce8444e88d327ddec2fc", + "dst_ref": "ScenarioWorker.name", + "resolution": "resolved", + "slice_id": "2fd137f5852febe907f44d3b3e4ea430f89ccfe962ae1442a16ab9df64c8f76c", + "root_symbol_id": "65f877f78191d65e6a752e41cedc70ebc784c266804a55c1c56440336e1f0d6e", + "path_symbols": [ + "test_worker_wakes_up_with_configured_interval", + "ScenarioWorker", + "ScenarioWorker.__init__", + "ScenarioWorker._name", + "ScenarioWorker.name" + ], + "path_symbol_ids": [ + "65f877f78191d65e6a752e41cedc70ebc784c266804a55c1c56440336e1f0d6e", + "9a1d08a7eb1831c9f2e0db361b5207f036e477c160773ae08c0b287239785c52", + "9c20be046ba06644d1432e0f20eb223663d2b116ee7d91fdc62bc68323f2e593", + "da022da2c49fd9cfd09d6e6da6bbd59aaa7d28efd669ce8444e88d327ddec2fc" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_actions_stop_busy_worker_before_timeout\n -> BlockingRoutine\n -> BlockingRoutine.__init__\n -> BlockingRoutine._started\n -> BlockingRoutine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_actions_stop_busy_worker_before_timeout:dataflow_slice", + "span_start": 42, + "span_end": 212, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "f9bcce108870e49afa8b32d4625115a10707a3b0e7473179e958e5752bf258b4", + "edge_type": "dataflow_slice", + "src_symbol_id": "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "src_qname": "test_actions_stop_busy_worker_before_timeout", + "dst_symbol_id": "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04", + "dst_ref": "BlockingRoutine.run", + "resolution": "resolved", + "slice_id": "f9bcce108870e49afa8b32d4625115a10707a3b0e7473179e958e5752bf258b4", + "root_symbol_id": "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "path_symbols": [ + "test_actions_stop_busy_worker_before_timeout", + "BlockingRoutine", + "BlockingRoutine.__init__", + "BlockingRoutine._started", + "BlockingRoutine.run" + ], + "path_symbol_ids": [ + "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "a3349c5bc65e4003a4bbd6a8dbb7a54c337e12d1aed930caa701b12e520f1e67", + "486deeed3043c6db985aef258e96ddc67aa53608e67a83962fbd2471f649ddf1", + "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_actions_stop_busy_worker_after_timeout\n -> BlockingRoutine\n -> BlockingRoutine.__init__\n -> BlockingRoutine._started\n -> BlockingRoutine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_actions_stop_busy_worker_after_timeout:dataflow_slice", + "span_start": 42, + "span_end": 238, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "8e7db3d2a9226f1c1d9942ac6373cfcafa0d2276758ddb8a3d3c455a3d58024d", + "edge_type": "dataflow_slice", + "src_symbol_id": "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "src_qname": "test_actions_stop_busy_worker_after_timeout", + "dst_symbol_id": "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04", + "dst_ref": "BlockingRoutine.run", + "resolution": "resolved", + "slice_id": "8e7db3d2a9226f1c1d9942ac6373cfcafa0d2276758ddb8a3d3c455a3d58024d", + "root_symbol_id": "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "path_symbols": [ + "test_actions_stop_busy_worker_after_timeout", + "BlockingRoutine", + "BlockingRoutine.__init__", + "BlockingRoutine._started", + "BlockingRoutine.run" + ], + "path_symbol_ids": [ + "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "a3349c5bc65e4003a4bbd6a8dbb7a54c337e12d1aed930caa701b12e520f1e67", + "486deeed3043c6db985aef258e96ddc67aa53608e67a83962fbd2471f649ddf1", + "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_actions_stop_busy_worker_after_timeout\n -> BlockingRoutine\n -> BlockingRoutine.__init__\n -> BlockingRoutine._release\n -> BlockingRoutine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_actions_stop_busy_worker_after_timeout:dataflow_slice", + "span_start": 43, + "span_end": 238, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "b59da9da82f9dfc8a9b695a08213786385da1ae9e17561ec3a0450a574a8cb39", + "edge_type": "dataflow_slice", + "src_symbol_id": "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "src_qname": "test_actions_stop_busy_worker_after_timeout", + "dst_symbol_id": "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04", + "dst_ref": "BlockingRoutine.run", + "resolution": "resolved", + "slice_id": "b59da9da82f9dfc8a9b695a08213786385da1ae9e17561ec3a0450a574a8cb39", + "root_symbol_id": "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "path_symbols": [ + "test_actions_stop_busy_worker_after_timeout", + "BlockingRoutine", + "BlockingRoutine.__init__", + "BlockingRoutine._release", + "BlockingRoutine.run" + ], + "path_symbol_ids": [ + "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "a3349c5bc65e4003a4bbd6a8dbb7a54c337e12d1aed930caa701b12e520f1e67", + "486deeed3043c6db985aef258e96ddc67aa53608e67a83962fbd2471f649ddf1", + "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_actions_start_stop_and_health_when_worker_is_idle\n -> ScenarioWorker\n -> ScenarioWorker.__init__\n -> ScenarioWorker._name\n -> ScenarioWorker.name", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_actions_start_stop_and_health_when_worker_is_idle:dataflow_slice", + "span_start": 52, + "span_end": 182, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "8fb3c9e775ad1cfa91eebb8b8cef367dc53c923584236122235446e0579b468e", + "edge_type": "dataflow_slice", + "src_symbol_id": "09a78d8eb31c2da14fee58da53b5da7a5065a4c23b6300748a6d44517a5284b8", + "src_qname": "test_actions_start_stop_and_health_when_worker_is_idle", + "dst_symbol_id": "da022da2c49fd9cfd09d6e6da6bbd59aaa7d28efd669ce8444e88d327ddec2fc", + "dst_ref": "ScenarioWorker.name", + "resolution": "resolved", + "slice_id": "8fb3c9e775ad1cfa91eebb8b8cef367dc53c923584236122235446e0579b468e", + "root_symbol_id": "09a78d8eb31c2da14fee58da53b5da7a5065a4c23b6300748a6d44517a5284b8", + "path_symbols": [ + "test_actions_start_stop_and_health_when_worker_is_idle", + "ScenarioWorker", + "ScenarioWorker.__init__", + "ScenarioWorker._name", + "ScenarioWorker.name" + ], + "path_symbol_ids": [ + "09a78d8eb31c2da14fee58da53b5da7a5065a4c23b6300748a6d44517a5284b8", + "9a1d08a7eb1831c9f2e0db361b5207f036e477c160773ae08c0b287239785c52", + "9c20be046ba06644d1432e0f20eb223663d2b116ee7d91fdc62bc68323f2e593", + "da022da2c49fd9cfd09d6e6da6bbd59aaa7d28efd669ce8444e88d327ddec2fc" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def test_actions_start_stop_and_health_when_worker_is_idle() -> None:\n runtime, base_url = _build_runtime(ScenarioWorker(\"idle-worker\", IntervalRoutine(), interval=0.2))\n try:\n stop_status, stop_payload = _http_call_json(base_url, \"/actions/stop\", method=\"POST\")\n assert stop_status == 200\n assert isinstance(stop_payload.get(\"detail\"), dict)\n assert stop_payload[\"detail\"][\"timed_out\"] is False\n assert stop_payload[\"detail\"][\"state\"] == \"stopped\"\n\n health_stopped_status, health_stopped_payload = _http_call_json(base_url, \"/health\")\n assert health_stopped_status == 503\n assert health_stopped_payload[\"state\"] == \"stopped\"\n assert health_stopped_payload[\"status\"] == \"unhealthy\"\n\n start_status, start_payload = _http_call_json(base_url, \"/actions/start\", method=\"POST\")\n assert start_status == 200\n assert isinstance(start_payload.get(\"detail\"), dict)\n assert start_payload[\"detail\"][\"timed_out\"] is False\n assert start_payload[\"detail\"][\"state\"] in {\"idle\", \"busy\"}\n\n health_started_status, health_started_payload = _http_call_json(base_url, \"/health\")\n assert health_started_status == 200\n assert health_started_payload[\"status\"] == \"ok\"\n assert health_started_payload[\"state\"] in {\"idle\", \"busy\"}\n finally:\n runtime.stop()", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:test_actions_start_stop_and_health_when_worker_is_idle", + "span_start": 181, + "span_end": 206, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 8, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _poll_until_stopped(base_url: str, timeout: float = 2.0) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n _, payload = _http_call_json(base_url, \"/actions/status\")\n if payload.get(\"detail\") == \"stopped\":\n return True\n sleep(0.05)\n return False", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_poll_until_stopped", + "span_start": 144, + "span_end": 151, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 5, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def test_worker_wakes_up_with_configured_interval() -> None:\n interval = 0.15\n routine = IntervalRoutine()\n worker = ScenarioWorker(\"interval-worker\", routine, interval=interval)\n runtime = RuntimeManager()\n runtime.register_module(WorkerModule(worker))\n\n runtime.start()\n try:\n assert routine.wait_runs(count=3, timeout=2.0) is True\n finally:\n runtime.stop()\n\n deltas = routine.deltas()\n assert len(deltas) >= 2\n assert all(delta >= interval * 0.7 for delta in deltas[:2])", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:test_worker_wakes_up_with_configured_interval", + "span_start": 163, + "span_end": 178, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 7, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class BlockingRoutine:\n def __init__(self, started: Event, release: Event) -> None:\n self._started = started\n self._release = release\n\n def run(self) -> None:\n self._started.set()\n self._release.wait(timeout=5.0)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:BlockingRoutine", + "span_start": 40, + "span_end": 47, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class WorkerModule(ApplicationModule):\n def __init__(self, worker: Worker) -> None:\n self._worker = worker\n\n @property\n def name(self) -> str:\n return \"business-tests\"\n\n def register(self, registry: ModuleRegistry) -> None:\n registry.add_worker(self._worker)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:WorkerModule", + "span_start": 113, + "span_end": 122, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 3, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _http_call_json(\n base_url: str,\n path: str,\n *,\n method: str = \"GET\",\n headers: dict[str, str] | None = None,\n) -> tuple[int, dict[str, object]]:\n request = Request(f\"{base_url}{path}\", method=method, headers=headers or {})\n try:\n with urlopen(request, timeout=15.0) as response:\n status = response.status\n body = response.read()\n except HTTPError as error:\n status = error.code\n body = error.read()\n payload = json.loads(body.decode(\"utf-8\"))\n return status, payload", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_http_call_json", + "span_start": 125, + "span_end": 141, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 4, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _build_runtime(worker: Worker, *, control_timeout: int = 1) -> tuple[RuntimeManager, str]:\n runtime = RuntimeManager()\n channel = HttpControlChannel(host=\"127.0.0.1\", port=0, timeout=control_timeout)\n runtime.control_plane.register_channel(channel)\n runtime.register_module(WorkerModule(worker))\n runtime.start()\n return runtime, f\"http://127.0.0.1:{channel.port}\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_build_runtime", + "span_start": 154, + "span_end": 160, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 6, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class ScenarioWorker(Worker):\n def __init__(self, name: str, routine: object, *, interval: float = 0.05) -> None:\n self._name = name\n self._routine = routine\n self._interval = interval\n self._thread: Thread | None = None\n self._stop_requested = Event()\n self._in_flight = 0\n self._runs = 0\n self._lock = Lock()\n\n @property\n def name(self) -> str:\n return self._name\n\n @property\n def critical(self) -> bool:\n return True\n\n def start(self) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._stop_requested.clear()\n self._thread = Thread(target=self._loop, name=f\"{self._name}-thread\", daemon=True)\n self._thread.start()\n\n def stop(self, force: bool = False) -> None:\n self._stop_requested.set()\n\n def health(self) -> WorkerHealth:\n return WorkerHealth(name=self.name, status=\"ok\", critical=True, meta={\"runs\": self._runs})\n\n def status(self) -> WorkerStatus:\n thread_alive = self._thread is not None and self._thread.is_alive()\n with self._lock:\n in_flight = self._in_flight\n runs = self._runs\n if not thread_alive:\n state = \"stopped\"\n elif self._stop_requested.is_set():\n state = \"stopping\"\n elif in_flight > 0:\n state = \"busy\"\n else:\n state = \"idle\"\n return WorkerStatus(name=self.name, state=state, in_flight=in_flight, meta={\"runs\": runs})\n\n def _loop(self) -> None:\n while not self._stop_requested.is_set():\n with self._lock:\n self._in_flight += 1\n try:\n self._routine.run()\n with self._lock:\n self._runs += 1\n finally:\n with self._lock:\n self._in_flight -= 1\n if self._stop_requested.is_set():\n return\n sleep(self._interval)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:ScenarioWorker", + "span_start": 50, + "span_end": 110, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 2, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class IntervalRoutine:\n calls: list[float] = field(default_factory=list)\n _lock: Lock = field(default_factory=Lock)\n\n def run(self) -> None:\n with self._lock:\n self.calls.append(monotonic())\n\n def wait_runs(self, count: int, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n with self._lock:\n if len(self.calls) >= count:\n return True\n sleep(0.01)\n return False\n\n def deltas(self) -> list[float]:\n with self._lock:\n return [self.calls[index + 1] - self.calls[index] for index in range(len(self.calls) - 1)]", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:IntervalRoutine", + "span_start": 18, + "span_end": 37, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def test_actions_stop_busy_worker_before_timeout() -> None:\n started = Event()\n release = Event()\n runtime, base_url = _build_runtime(ScenarioWorker(\"busy-worker\", BlockingRoutine(started, release)))\n assert started.wait(timeout=1.0) is True\n\n def release_later() -> None:\n sleep(0.2)\n release.set()\n\n Thread(target=release_later, daemon=True).start()\n try:\n status, payload = _http_call_json(base_url, \"/actions/stop\", method=\"POST\")\n assert status == 200\n assert isinstance(payload.get(\"detail\"), dict)\n assert payload[\"detail\"][\"timed_out\"] is False\n assert payload[\"detail\"][\"state\"] == \"stopped\"\n\n health_status, health_payload = _http_call_json(base_url, \"/health\")\n assert health_status == 503\n assert health_payload[\"status\"] == \"unhealthy\"\n assert health_payload[\"state\"] == \"stopped\"\n finally:\n runtime.stop()", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:test_actions_stop_busy_worker_before_timeout", + "span_start": 209, + "span_end": 232, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 9, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "Прямых тестов конкретно для `WorkflowRuntimeFactory` в предоставленном контексте не обнаружено. Имя класса, его импорты или вызовы не упоминаются ни в одном из перечисленных тестов.\n\nОднако можно найти косвенно связанные тесты, которые могут проверять функционал, связанный с управлением рабочими потоками или сценариями выполнения рабочих задач (например, блокирующие рутины, сценарии работы с интервалами). Эти тесты преимущественно проверяют поведение отдельных компонентов системы управления выполнением задач, таких как запуск, остановка и мониторинг активности работников.\n\nНапример:\n- tests/test_business_control_actions.py: Тесты проверяют взаимодействие с различными действиями, связанными с состоянием и здоровьем рабочего потока (`ScenarioWorker`, `BlockingRoutine`), но напрямую не касаются `WorkflowRuntimeFactory`.\n \nЭти тесты фокусируются на проверке правильности работы различных сценариев жизненного цикла процессов, таких как старт, остановка и проверка состояния работающих потоков.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C2_DEPENDENCY_GRAPH" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "WorkflowRuntimeFactory" + ], + "keyword_hints": [ + "WorkflowRuntimeFactory" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "test_file_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "test_symbol_patterns": [ + "test_workflow_runtime_factory", + "TestWorkflowRuntimeFactory", + "WorkflowRuntimeFactory" + ], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C0_SOURCE_CHUNKS": 10 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src", + "tests" + ], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src", + "tests" + ], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "WorkflowRuntimeFactory", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Где тесты для WorkflowRuntimeFactory? test_workflow_runtime_factory TestWorkflowRuntimeFactory WorkflowRuntimeFactory", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Где тесты для WorkflowRuntimeFactory? test_workflow_runtime_factory TestWorkflowRuntimeFactory WorkflowRuntimeFactory", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 10, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 0, + "candidates_after_filter": 0 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src", + "tests" + ], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src", + "tests" + ], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 10, + "candidates_after_filter": 10 + } + ], + "fallback": { + "used": true, + "reason": "scope_relaxed_no_hits" + }, + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "WorkflowRuntimeFactory" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "miss", + "hit_count": 0, + "fail_reason": "scope_relaxed_no_hits" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 10, + "fail_reason": null + } + ] + }, + "constraint_violations": [ + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C1_SYMBOL_CATALOG", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + } + ], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 129, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 68, + "C2_DEPENDENCY_GRAPH": 45, + "C0_SOURCE_CHUNKS": 15 + }, + "merge_rank": 0, + "prompt_build": 0, + "llm_call": 1920 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 1019, + "evidence_rows": 16, + "evidence_chars": 8149 + }, + "evidence_summary": [ + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 10, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_find_tests_ru_v3", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "WorkflowRuntimeFactory" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 16, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-v2-find-tests-workflow-runtime-factory-negative", + "mode": "full_chain", + "run_started_at": "2026-03-12T14:07:09", + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Где тесты для WorkflowRuntimeFactory?", + "normalized_query": "Где тесты для WorkflowRuntimeFactory?" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Где тесты для WorkflowRuntimeFactory?" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Где тесты для WorkflowRuntimeFactory?" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "WorkflowRuntimeFactory" + ], + "keyword_hints": [ + "WorkflowRuntimeFactory" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "test_file_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "test_symbol_patterns": [ + "test_workflow_runtime_factory", + "TestWorkflowRuntimeFactory", + "WorkflowRuntimeFactory" + ], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Где тесты для WorkflowRuntimeFactory?" + }, + "output": { + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "WorkflowRuntimeFactory" + ], + "confidence": 0.0 + }, + "rag_count": 16, + "rag_rows": [ + { + "path": "tests/test_business_control_actions.py", + "content": "test_actions_stop_busy_worker_before_timeout\n -> BlockingRoutine\n -> BlockingRoutine.__init__\n -> BlockingRoutine._release\n -> BlockingRoutine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_actions_stop_busy_worker_before_timeout:dataflow_slice", + "span_start": 43, + "span_end": 212, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "8bd726155ba387d3579763ee84dfd2f9a90bc917da88f3b2e89416ab5c1254d6", + "edge_type": "dataflow_slice", + "src_symbol_id": "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "src_qname": "test_actions_stop_busy_worker_before_timeout", + "dst_symbol_id": "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04", + "dst_ref": "BlockingRoutine.run", + "resolution": "resolved", + "slice_id": "8bd726155ba387d3579763ee84dfd2f9a90bc917da88f3b2e89416ab5c1254d6", + "root_symbol_id": "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "path_symbols": [ + "test_actions_stop_busy_worker_before_timeout", + "BlockingRoutine", + "BlockingRoutine.__init__", + "BlockingRoutine._release", + "BlockingRoutine.run" + ], + "path_symbol_ids": [ + "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "a3349c5bc65e4003a4bbd6a8dbb7a54c337e12d1aed930caa701b12e520f1e67", + "486deeed3043c6db985aef258e96ddc67aa53608e67a83962fbd2471f649ddf1", + "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_worker_wakes_up_with_configured_interval\n -> ScenarioWorker\n -> ScenarioWorker.__init__\n -> ScenarioWorker._name\n -> ScenarioWorker.name", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_worker_wakes_up_with_configured_interval:dataflow_slice", + "span_start": 52, + "span_end": 166, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "2fd137f5852febe907f44d3b3e4ea430f89ccfe962ae1442a16ab9df64c8f76c", + "edge_type": "dataflow_slice", + "src_symbol_id": "65f877f78191d65e6a752e41cedc70ebc784c266804a55c1c56440336e1f0d6e", + "src_qname": "test_worker_wakes_up_with_configured_interval", + "dst_symbol_id": "da022da2c49fd9cfd09d6e6da6bbd59aaa7d28efd669ce8444e88d327ddec2fc", + "dst_ref": "ScenarioWorker.name", + "resolution": "resolved", + "slice_id": "2fd137f5852febe907f44d3b3e4ea430f89ccfe962ae1442a16ab9df64c8f76c", + "root_symbol_id": "65f877f78191d65e6a752e41cedc70ebc784c266804a55c1c56440336e1f0d6e", + "path_symbols": [ + "test_worker_wakes_up_with_configured_interval", + "ScenarioWorker", + "ScenarioWorker.__init__", + "ScenarioWorker._name", + "ScenarioWorker.name" + ], + "path_symbol_ids": [ + "65f877f78191d65e6a752e41cedc70ebc784c266804a55c1c56440336e1f0d6e", + "9a1d08a7eb1831c9f2e0db361b5207f036e477c160773ae08c0b287239785c52", + "9c20be046ba06644d1432e0f20eb223663d2b116ee7d91fdc62bc68323f2e593", + "da022da2c49fd9cfd09d6e6da6bbd59aaa7d28efd669ce8444e88d327ddec2fc" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_actions_stop_busy_worker_before_timeout\n -> BlockingRoutine\n -> BlockingRoutine.__init__\n -> BlockingRoutine._started\n -> BlockingRoutine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_actions_stop_busy_worker_before_timeout:dataflow_slice", + "span_start": 42, + "span_end": 212, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "f9bcce108870e49afa8b32d4625115a10707a3b0e7473179e958e5752bf258b4", + "edge_type": "dataflow_slice", + "src_symbol_id": "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "src_qname": "test_actions_stop_busy_worker_before_timeout", + "dst_symbol_id": "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04", + "dst_ref": "BlockingRoutine.run", + "resolution": "resolved", + "slice_id": "f9bcce108870e49afa8b32d4625115a10707a3b0e7473179e958e5752bf258b4", + "root_symbol_id": "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "path_symbols": [ + "test_actions_stop_busy_worker_before_timeout", + "BlockingRoutine", + "BlockingRoutine.__init__", + "BlockingRoutine._started", + "BlockingRoutine.run" + ], + "path_symbol_ids": [ + "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "a3349c5bc65e4003a4bbd6a8dbb7a54c337e12d1aed930caa701b12e520f1e67", + "486deeed3043c6db985aef258e96ddc67aa53608e67a83962fbd2471f649ddf1", + "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_actions_stop_busy_worker_after_timeout\n -> BlockingRoutine\n -> BlockingRoutine.__init__\n -> BlockingRoutine._started\n -> BlockingRoutine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_actions_stop_busy_worker_after_timeout:dataflow_slice", + "span_start": 42, + "span_end": 238, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "8e7db3d2a9226f1c1d9942ac6373cfcafa0d2276758ddb8a3d3c455a3d58024d", + "edge_type": "dataflow_slice", + "src_symbol_id": "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "src_qname": "test_actions_stop_busy_worker_after_timeout", + "dst_symbol_id": "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04", + "dst_ref": "BlockingRoutine.run", + "resolution": "resolved", + "slice_id": "8e7db3d2a9226f1c1d9942ac6373cfcafa0d2276758ddb8a3d3c455a3d58024d", + "root_symbol_id": "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "path_symbols": [ + "test_actions_stop_busy_worker_after_timeout", + "BlockingRoutine", + "BlockingRoutine.__init__", + "BlockingRoutine._started", + "BlockingRoutine.run" + ], + "path_symbol_ids": [ + "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "a3349c5bc65e4003a4bbd6a8dbb7a54c337e12d1aed930caa701b12e520f1e67", + "486deeed3043c6db985aef258e96ddc67aa53608e67a83962fbd2471f649ddf1", + "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_actions_stop_busy_worker_after_timeout\n -> BlockingRoutine\n -> BlockingRoutine.__init__\n -> BlockingRoutine._release\n -> BlockingRoutine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_actions_stop_busy_worker_after_timeout:dataflow_slice", + "span_start": 43, + "span_end": 238, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "b59da9da82f9dfc8a9b695a08213786385da1ae9e17561ec3a0450a574a8cb39", + "edge_type": "dataflow_slice", + "src_symbol_id": "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "src_qname": "test_actions_stop_busy_worker_after_timeout", + "dst_symbol_id": "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04", + "dst_ref": "BlockingRoutine.run", + "resolution": "resolved", + "slice_id": "b59da9da82f9dfc8a9b695a08213786385da1ae9e17561ec3a0450a574a8cb39", + "root_symbol_id": "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "path_symbols": [ + "test_actions_stop_busy_worker_after_timeout", + "BlockingRoutine", + "BlockingRoutine.__init__", + "BlockingRoutine._release", + "BlockingRoutine.run" + ], + "path_symbol_ids": [ + "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "a3349c5bc65e4003a4bbd6a8dbb7a54c337e12d1aed930caa701b12e520f1e67", + "486deeed3043c6db985aef258e96ddc67aa53608e67a83962fbd2471f649ddf1", + "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_actions_start_stop_and_health_when_worker_is_idle\n -> ScenarioWorker\n -> ScenarioWorker.__init__\n -> ScenarioWorker._name\n -> ScenarioWorker.name", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_actions_start_stop_and_health_when_worker_is_idle:dataflow_slice", + "span_start": 52, + "span_end": 182, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "8fb3c9e775ad1cfa91eebb8b8cef367dc53c923584236122235446e0579b468e", + "edge_type": "dataflow_slice", + "src_symbol_id": "09a78d8eb31c2da14fee58da53b5da7a5065a4c23b6300748a6d44517a5284b8", + "src_qname": "test_actions_start_stop_and_health_when_worker_is_idle", + "dst_symbol_id": "da022da2c49fd9cfd09d6e6da6bbd59aaa7d28efd669ce8444e88d327ddec2fc", + "dst_ref": "ScenarioWorker.name", + "resolution": "resolved", + "slice_id": "8fb3c9e775ad1cfa91eebb8b8cef367dc53c923584236122235446e0579b468e", + "root_symbol_id": "09a78d8eb31c2da14fee58da53b5da7a5065a4c23b6300748a6d44517a5284b8", + "path_symbols": [ + "test_actions_start_stop_and_health_when_worker_is_idle", + "ScenarioWorker", + "ScenarioWorker.__init__", + "ScenarioWorker._name", + "ScenarioWorker.name" + ], + "path_symbol_ids": [ + "09a78d8eb31c2da14fee58da53b5da7a5065a4c23b6300748a6d44517a5284b8", + "9a1d08a7eb1831c9f2e0db361b5207f036e477c160773ae08c0b287239785c52", + "9c20be046ba06644d1432e0f20eb223663d2b116ee7d91fdc62bc68323f2e593", + "da022da2c49fd9cfd09d6e6da6bbd59aaa7d28efd669ce8444e88d327ddec2fc" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def test_actions_start_stop_and_health_when_worker_is_idle() -> None:\n runtime, base_url = _build_runtime(ScenarioWorker(\"idle-worker\", IntervalRoutine(), interval=0.2))\n try:\n stop_status, stop_payload = _http_call_json(base_url, \"/actions/stop\", method=\"POST\")\n assert stop_status == 200\n assert isinstance(stop_payload.get(\"detail\"), dict)\n assert stop_payload[\"detail\"][\"timed_out\"] is False\n assert stop_payload[\"detail\"][\"state\"] == \"stopped\"\n\n health_stopped_status, health_stopped_payload = _http_call_json(base_url, \"/health\")\n assert health_stopped_status == 503\n assert health_stopped_payload[\"state\"] == \"stopped\"\n assert health_stopped_payload[\"status\"] == \"unhealthy\"\n\n start_status, start_payload = _http_call_json(base_url, \"/actions/start\", method=\"POST\")\n assert start_status == 200\n assert isinstance(start_payload.get(\"detail\"), dict)\n assert start_payload[\"detail\"][\"timed_out\"] is False\n assert start_payload[\"detail\"][\"state\"] in {\"idle\", \"busy\"}\n\n health_started_status, health_started_payload = _http_call_json(base_url, \"/health\")\n assert health_started_status == 200\n assert health_started_payload[\"status\"] == \"ok\"\n assert health_started_payload[\"state\"] in {\"idle\", \"busy\"}\n finally:\n runtime.stop()", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:test_actions_start_stop_and_health_when_worker_is_idle", + "span_start": 181, + "span_end": 206, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 8, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _poll_until_stopped(base_url: str, timeout: float = 2.0) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n _, payload = _http_call_json(base_url, \"/actions/status\")\n if payload.get(\"detail\") == \"stopped\":\n return True\n sleep(0.05)\n return False", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_poll_until_stopped", + "span_start": 144, + "span_end": 151, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 5, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def test_worker_wakes_up_with_configured_interval() -> None:\n interval = 0.15\n routine = IntervalRoutine()\n worker = ScenarioWorker(\"interval-worker\", routine, interval=interval)\n runtime = RuntimeManager()\n runtime.register_module(WorkerModule(worker))\n\n runtime.start()\n try:\n assert routine.wait_runs(count=3, timeout=2.0) is True\n finally:\n runtime.stop()\n\n deltas = routine.deltas()\n assert len(deltas) >= 2\n assert all(delta >= interval * 0.7 for delta in deltas[:2])", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:test_worker_wakes_up_with_configured_interval", + "span_start": 163, + "span_end": 178, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 7, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class BlockingRoutine:\n def __init__(self, started: Event, release: Event) -> None:\n self._started = started\n self._release = release\n\n def run(self) -> None:\n self._started.set()\n self._release.wait(timeout=5.0)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:BlockingRoutine", + "span_start": 40, + "span_end": 47, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class WorkerModule(ApplicationModule):\n def __init__(self, worker: Worker) -> None:\n self._worker = worker\n\n @property\n def name(self) -> str:\n return \"business-tests\"\n\n def register(self, registry: ModuleRegistry) -> None:\n registry.add_worker(self._worker)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:WorkerModule", + "span_start": 113, + "span_end": 122, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 3, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _http_call_json(\n base_url: str,\n path: str,\n *,\n method: str = \"GET\",\n headers: dict[str, str] | None = None,\n) -> tuple[int, dict[str, object]]:\n request = Request(f\"{base_url}{path}\", method=method, headers=headers or {})\n try:\n with urlopen(request, timeout=15.0) as response:\n status = response.status\n body = response.read()\n except HTTPError as error:\n status = error.code\n body = error.read()\n payload = json.loads(body.decode(\"utf-8\"))\n return status, payload", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_http_call_json", + "span_start": 125, + "span_end": 141, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 4, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _build_runtime(worker: Worker, *, control_timeout: int = 1) -> tuple[RuntimeManager, str]:\n runtime = RuntimeManager()\n channel = HttpControlChannel(host=\"127.0.0.1\", port=0, timeout=control_timeout)\n runtime.control_plane.register_channel(channel)\n runtime.register_module(WorkerModule(worker))\n runtime.start()\n return runtime, f\"http://127.0.0.1:{channel.port}\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_build_runtime", + "span_start": 154, + "span_end": 160, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 6, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class ScenarioWorker(Worker):\n def __init__(self, name: str, routine: object, *, interval: float = 0.05) -> None:\n self._name = name\n self._routine = routine\n self._interval = interval\n self._thread: Thread | None = None\n self._stop_requested = Event()\n self._in_flight = 0\n self._runs = 0\n self._lock = Lock()\n\n @property\n def name(self) -> str:\n return self._name\n\n @property\n def critical(self) -> bool:\n return True\n\n def start(self) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._stop_requested.clear()\n self._thread = Thread(target=self._loop, name=f\"{self._name}-thread\", daemon=True)\n self._thread.start()\n\n def stop(self, force: bool = False) -> None:\n self._stop_requested.set()\n\n def health(self) -> WorkerHealth:\n return WorkerHealth(name=self.name, status=\"ok\", critical=True, meta={\"runs\": self._runs})\n\n def status(self) -> WorkerStatus:\n thread_alive = self._thread is not None and self._thread.is_alive()\n with self._lock:\n in_flight = self._in_flight\n runs = self._runs\n if not thread_alive:\n state = \"stopped\"\n elif self._stop_requested.is_set():\n state = \"stopping\"\n elif in_flight > 0:\n state = \"busy\"\n else:\n state = \"idle\"\n return WorkerStatus(name=self.name, state=state, in_flight=in_flight, meta={\"runs\": runs})\n\n def _loop(self) -> None:\n while not self._stop_requested.is_set():\n with self._lock:\n self._in_flight += 1\n try:\n self._routine.run()\n with self._lock:\n self._runs += 1\n finally:\n with self._lock:\n self._in_flight -= 1\n if self._stop_requested.is_set():\n return\n sleep(self._interval)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:ScenarioWorker", + "span_start": 50, + "span_end": 110, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 2, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class IntervalRoutine:\n calls: list[float] = field(default_factory=list)\n _lock: Lock = field(default_factory=Lock)\n\n def run(self) -> None:\n with self._lock:\n self.calls.append(monotonic())\n\n def wait_runs(self, count: int, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n with self._lock:\n if len(self.calls) >= count:\n return True\n sleep(0.01)\n return False\n\n def deltas(self) -> list[float]:\n with self._lock:\n return [self.calls[index + 1] - self.calls[index] for index in range(len(self.calls) - 1)]", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:IntervalRoutine", + "span_start": 18, + "span_end": 37, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def test_actions_stop_busy_worker_before_timeout() -> None:\n started = Event()\n release = Event()\n runtime, base_url = _build_runtime(ScenarioWorker(\"busy-worker\", BlockingRoutine(started, release)))\n assert started.wait(timeout=1.0) is True\n\n def release_later() -> None:\n sleep(0.2)\n release.set()\n\n Thread(target=release_later, daemon=True).start()\n try:\n status, payload = _http_call_json(base_url, \"/actions/stop\", method=\"POST\")\n assert status == 200\n assert isinstance(payload.get(\"detail\"), dict)\n assert payload[\"detail\"][\"timed_out\"] is False\n assert payload[\"detail\"][\"state\"] == \"stopped\"\n\n health_status, health_payload = _http_call_json(base_url, \"/health\")\n assert health_status == 503\n assert health_payload[\"status\"] == \"unhealthy\"\n assert health_payload[\"state\"] == \"stopped\"\n finally:\n runtime.stop()", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:test_actions_stop_busy_worker_before_timeout", + "span_start": 209, + "span_end": 232, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 9, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C0_SOURCE_CHUNKS": 10 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src", + "tests" + ], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src", + "tests" + ], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "WorkflowRuntimeFactory", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Где тесты для WorkflowRuntimeFactory? test_workflow_runtime_factory TestWorkflowRuntimeFactory WorkflowRuntimeFactory", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Где тесты для WorkflowRuntimeFactory? test_workflow_runtime_factory TestWorkflowRuntimeFactory WorkflowRuntimeFactory", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 10, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 0, + "candidates_after_filter": 0 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src", + "tests" + ], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src", + "tests" + ], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 10, + "candidates_after_filter": 10 + } + ], + "fallback": { + "used": true, + "reason": "scope_relaxed_no_hits" + }, + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "WorkflowRuntimeFactory" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "miss", + "hit_count": 0, + "fail_reason": "scope_relaxed_no_hits" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 10, + "fail_reason": null + } + ] + }, + "constraint_violations": [ + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C1_SYMBOL_CATALOG", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + } + ], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 129, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 68, + "C2_DEPENDENCY_GRAPH": 45, + "C0_SOURCE_CHUNKS": 15 + }, + "merge_rank": 0 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Где тесты для WorkflowRuntimeFactory?", + "rag_count": 16 + }, + "output": { + "llm_answer": "Прямых тестов конкретно для `WorkflowRuntimeFactory` в предоставленном контексте не обнаружено. Имя класса, его импорты или вызовы не упоминаются ни в одном из перечисленных тестов.\n\nОднако можно найти косвенно связанные тесты, которые могут проверять функционал, связанный с управлением рабочими потоками или сценариями выполнения рабочих задач (например, блокирующие рутины, сценарии работы с интервалами). Эти тесты преимущественно проверяют поведение отдельных компонентов системы управления выполнением задач, таких как запуск, остановка и мониторинг активности работников.\n\nНапример:\n- tests/test_business_control_actions.py: Тесты проверяют взаимодействие с различными действиями, связанными с состоянием и здоровьем рабочего потока (`ScenarioWorker`, `BlockingRoutine`), но напрямую не касаются `WorkflowRuntimeFactory`.\n \nЭти тесты фокусируются на проверке правильности работы различных сценариев жизненного цикла процессов, таких как старт, остановка и проверка состояния работающих потоков." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 1019, + "evidence_rows": 16, + "evidence_chars": 8149 + }, + "evidence_summary": [ + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 10, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_find_tests_ru_v3", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 1920 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-find-tests-workflow-runtime-factory-negative.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-find-tests-workflow-runtime-factory-negative.md new file mode 100644 index 0000000..712bddd --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-find-tests-workflow-runtime-factory-negative.md @@ -0,0 +1,32 @@ +# plba-v2-find-tests-workflow-runtime-factory-negative + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Где тесты для WorkflowRuntimeFactory? + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 16, + "llm_answer": "Прямых тестов конкретно для `WorkflowRuntimeFactory` в предоставленном контексте не обнаружено. Имя класса, его импорты или вызовы не упоминаются ни в одном из перечисленных тестов.\n\nОднако можно найти косвенно связанные тесты, которые могут проверять функционал, связанный с управлением рабочими потоками или сценариями выполнения рабочих задач (например, блокирующие рутины, сценарии работы с интервалами). Эти тесты преимущественно проверяют поведение отдельных компонентов системы управления выполнением задач, таких как запуск, остановка и мониторинг активности работников.\n\nНапример:\n- tests/test_business_control_actions.py: Тесты проверяют взаимодействие с различными действиями, связанными с состоянием и здоровьем рабочего потока (`ScenarioWorker`, `BlockingRoutine`), но напрямую не касаются `WorkflowRuntimeFactory`.\n \nЭти тесты фокусируются на проверке правильности работы различных сценариев жизненного цикла процессов, таких как старт, остановка и проверка состояния работающих потоков.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "WorkflowRuntimeFactory" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-open-file-nonexistent.json b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-open-file-nonexistent.json new file mode 100644 index 0000000..ae6e64a --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-open-file-nonexistent.json @@ -0,0 +1,441 @@ +{ + "case_id": "plba-v2-open-file-nonexistent", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 0, + "llm_answer": "Файл src/app_runtime/core/missing_runtime.py не найден.", + "answer_mode": "degraded", + "path_scope": [ + "src/app_runtime/core/missing_runtime.py" + ], + "symbol_candidates": [], + "layers": [ + "C0_SOURCE_CHUNKS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-v2-open-file-nonexistent", + "text": "Открой файл src/app_runtime/core/missing_runtime.py", + "mode": "full_chain", + "run_started_at": "2026-03-12T14:07:09", + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Открой файл src/app_runtime/core/missing_runtime.py", + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [], + "confidence": 0.0 + }, + "rag_count": 0, + "rag_rows": [], + "llm_answer": "Файл src/app_runtime/core/missing_runtime.py не найден.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [], + "evidence_sufficient": false + }, + "llm": { + "answer_status": "degraded", + "groundedness": "weakly_grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "unknown", + "symbol_candidates": [], + "keyword_hints": [], + "path_hints": [ + "src/app_runtime/core/missing_runtime.py" + ], + "path_scope": [ + "src/app_runtime/core/missing_runtime.py" + ], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/app_runtime/core/missing_runtime.py" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": false, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C0_SOURCE_CHUNKS": 200 + }, + "filters_by_layer": { + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src/app_runtime/core/missing_runtime.py" + ], + "include_globs": [], + "exclude_globs": [], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": null, + "workspace_id": null, + "returned_repo_ids": [], + "returned_workspace_ids": [] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Открой файл src/app_runtime/core/missing_runtime.py", + "path_scope": [ + "src/app_runtime/core/missing_runtime.py" + ], + "include_globs": [], + "exclude_globs": [], + "prefer_globs": [], + "top_k": 200, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src/app_runtime/core/missing_runtime.py" + ], + "normalized_include_globs": [], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 0, + "candidates_after_filter": 0 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [] + }, + "layers": [ + { + "layer": "C0_SOURCE_CHUNKS", + "status": "miss", + "hit_count": 0, + "fail_reason": null + } + ] + }, + "constraint_violations": [ + { + "type": "PATH_SCOPE_NOT_SATISFIED", + "severity": "error", + "details": { + "path_scope": [ + "src/app_runtime/core/missing_runtime.py" + ], + "returned_paths": [] + }, + "suggested_fix": "Use exact path_scope retrieval and disable broad fallback for OPEN_FILE." + }, + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C0_SOURCE_CHUNKS", + "requested_layers": [ + "C0_SOURCE_CHUNKS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + } + ], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 20, + "retrieval_by_layer": { + "C0_SOURCE_CHUNKS": 19 + }, + "merge_rank": 0, + "prompt_build": 0, + "llm_call": 0 + }, + "prompt": null, + "answer_policy": { + "short_circuit": true, + "answer_mode": "degraded", + "failure_reason": "file_not_found" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [], + "path_scope": [ + "src/app_runtime/core/missing_runtime.py" + ] + }, + "llm": { + "used_evidence_count": 0, + "missing_evidence_reason": "file_not_found" + } + }, + "run_info": { + "case_id": "plba-v2-open-file-nonexistent", + "mode": "full_chain", + "run_started_at": "2026-03-12T14:07:09", + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Открой файл src/app_runtime/core/missing_runtime.py", + "normalized_query": "Открой файл src/app_runtime/core/missing_runtime.py" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Открой файл src/app_runtime/core/missing_runtime.py" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Открой файл src/app_runtime/core/missing_runtime.py" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "unknown", + "symbol_candidates": [], + "keyword_hints": [], + "path_hints": [ + "src/app_runtime/core/missing_runtime.py" + ], + "path_scope": [ + "src/app_runtime/core/missing_runtime.py" + ], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/app_runtime/core/missing_runtime.py" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": false, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Открой файл src/app_runtime/core/missing_runtime.py" + }, + "output": { + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [], + "confidence": 0.0 + }, + "rag_count": 0, + "rag_rows": [] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C0_SOURCE_CHUNKS": 200 + }, + "filters_by_layer": { + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src/app_runtime/core/missing_runtime.py" + ], + "include_globs": [], + "exclude_globs": [], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": null, + "workspace_id": null, + "returned_repo_ids": [], + "returned_workspace_ids": [] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Открой файл src/app_runtime/core/missing_runtime.py", + "path_scope": [ + "src/app_runtime/core/missing_runtime.py" + ], + "include_globs": [], + "exclude_globs": [], + "prefer_globs": [], + "top_k": 200, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src/app_runtime/core/missing_runtime.py" + ], + "normalized_include_globs": [], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 0, + "candidates_after_filter": 0 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [] + }, + "layers": [ + { + "layer": "C0_SOURCE_CHUNKS", + "status": "miss", + "hit_count": 0, + "fail_reason": null + } + ] + }, + "constraint_violations": [ + { + "type": "PATH_SCOPE_NOT_SATISFIED", + "severity": "error", + "details": { + "path_scope": [ + "src/app_runtime/core/missing_runtime.py" + ], + "returned_paths": [] + }, + "suggested_fix": "Use exact path_scope retrieval and disable broad fallback for OPEN_FILE." + }, + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C0_SOURCE_CHUNKS", + "requested_layers": [ + "C0_SOURCE_CHUNKS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + } + ], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 20, + "retrieval_by_layer": { + "C0_SOURCE_CHUNKS": 19 + }, + "merge_rank": 0 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Открой файл src/app_runtime/core/missing_runtime.py", + "rag_count": 0 + }, + "output": { + "llm_answer": "Файл src/app_runtime/core/missing_runtime.py не найден." + }, + "diagnostics": { + "prompt": null, + "timings_ms": { + "prompt_build": 0, + "llm_call": 0 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-open-file-nonexistent.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-open-file-nonexistent.md new file mode 100644 index 0000000..ab3d085 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-open-file-nonexistent.md @@ -0,0 +1,30 @@ +# plba-v2-open-file-nonexistent + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Открой файл src/app_runtime/core/missing_runtime.py + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 0, + "llm_answer": "Файл src/app_runtime/core/missing_runtime.py не найден.", + "answer_mode": "degraded", + "path_scope": [ + "src/app_runtime/core/missing_runtime.py" + ], + "symbol_candidates": [], + "layers": [ + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-open-file-public-api.json b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-open-file-public-api.json new file mode 100644 index 0000000..93e2f19 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-open-file-public-api.json @@ -0,0 +1,492 @@ +{ + "case_id": "plba-v2-open-file-public-api", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 1, + "llm_answer": "В файле `src/plba/__init__.py` видны импортированные модули и классы из различных подпакетов библиотеки PLBA. Файл экспортирует набор основных классов и функций, используемых для конфигурации, управления состоянием приложения, работы с очередями задач, выполнения рабочих процессов и контроля их здоровья. Ответ основан исключительно на содержимом указанного файла.", + "answer_mode": "answered", + "path_scope": [ + "src/plba/__init__.py" + ], + "symbol_candidates": [], + "layers": [ + "C0_SOURCE_CHUNKS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-v2-open-file-public-api", + "text": "Открой файл src/plba/__init__.py", + "mode": "full_chain", + "run_started_at": "2026-03-12T14:07:09", + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Открой файл src/plba/__init__.py", + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [], + "confidence": 0.0 + }, + "rag_count": 1, + "rag_rows": [ + { + "path": "src/plba/__init__.py", + "content": "from plba.bootstrap import create_runtime\nfrom plba.config import ConfigFileLoader, FileConfigProvider\nfrom plba.control import ControlActionSet, ControlChannel, ControlPlaneService, HttpControlChannel\nfrom plba.contracts import (\n ApplicationModule,\n ConfigProvider,\n HealthContributor,\n TraceContext,\n TraceContextRecord,\n TraceLogMessage,\n TraceTransport,\n Worker,\n WorkerHealth,\n WorkerStatus,\n)\nfrom plba.core import ConfigurationManager, RuntimeManager, ServiceContainer\nfrom plba.health import HealthRegistry\nfrom plba.logging import LogManager\nfrom plba.queue import InMemoryTaskQueue\nfrom plba.tracing import MySqlTraceTransport, NoOpTraceTransport, TraceService\nfrom plba.workflow import (\n StepResult,\n WorkflowContext,\n WorkflowDefinition,\n WorkflowEngine,\n WorkflowEngineHooks,\n WorkflowNode,\n WorkflowRuntimeFactory,\n WorkflowStep,\n)\nfrom plba.workers import WorkerSupervisor\n\n__all__ = [\n \"ApplicationModule\",\n \"ConfigFileLoader\",\n \"ConfigProvider\",\n \"ConfigurationManager\",\n \"ControlActionSet\",\n \"ControlChannel\",\n \"ControlPlaneService\",\n \"create_runtime\",\n \"FileConfigProvider\",\n \"HealthContributor\",\n \"HealthRegistry\",\n \"HttpControlChannel\",\n \"InMemoryTaskQueue\",\n \"LogManager\",\n \"MySqlTraceTransport\",\n \"NoOpTraceTransport\",\n \"RuntimeManager\",\n \"ServiceContainer\",\n \"TraceContext\",\n \"TraceContextRecord\",\n \"TraceLogMessage\",\n \"TraceService\",\n \"TraceTransport\",\n \"StepResult\",\n \"Worker\",\n \"WorkerHealth\",\n \"WorkerStatus\",\n \"WorkflowContext\",\n \"WorkflowDefinition\",\n \"WorkflowEngine\",\n \"WorkflowEngineHooks\",\n \"WorkflowNode\",\n \"WorkflowRuntimeFactory\",\n \"WorkflowStep\",\n \"WorkerSupervisor\",\n]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/__init__.py:1-69", + "span_start": 1, + "span_end": 69, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "В файле `src/plba/__init__.py` видны импортированные модули и классы из различных подпакетов библиотеки PLBA. Файл экспортирует набор основных классов и функций, используемых для конфигурации, управления состоянием приложения, работы с очередями задач, выполнения рабочих процессов и контроля их здоровья. Ответ основан исключительно на содержимом указанного файла.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "unknown", + "symbol_candidates": [], + "keyword_hints": [], + "path_hints": [ + "src/plba/__init__.py" + ], + "path_scope": [ + "src/plba/__init__.py" + ], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/plba/__init__.py" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": false, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C0_SOURCE_CHUNKS": 200 + }, + "filters_by_layer": { + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src/plba/__init__.py" + ], + "include_globs": [], + "exclude_globs": [], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Открой файл src/plba/__init__.py", + "path_scope": [ + "src/plba/__init__.py" + ], + "include_globs": [], + "exclude_globs": [], + "prefer_globs": [], + "top_k": 200, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src/plba/__init__.py" + ], + "normalized_include_globs": [], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [] + }, + "layers": [ + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 39, + "retrieval_by_layer": { + "C0_SOURCE_CHUNKS": 39 + }, + "merge_rank": 0, + "prompt_build": 0, + "llm_call": 715 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 612, + "evidence_rows": 1, + "evidence_chars": 1768 + }, + "evidence_summary": [ + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_open_file_ru_v3", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [], + "path_scope": [ + "src/plba/__init__.py" + ] + }, + "llm": { + "used_evidence_count": 1, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-v2-open-file-public-api", + "mode": "full_chain", + "run_started_at": "2026-03-12T14:07:09", + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Открой файл src/plba/__init__.py", + "normalized_query": "Открой файл src/plba/__init__.py" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Открой файл src/plba/__init__.py" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Открой файл src/plba/__init__.py" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "unknown", + "symbol_candidates": [], + "keyword_hints": [], + "path_hints": [ + "src/plba/__init__.py" + ], + "path_scope": [ + "src/plba/__init__.py" + ], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/plba/__init__.py" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": false, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Открой файл src/plba/__init__.py" + }, + "output": { + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [], + "confidence": 0.0 + }, + "rag_count": 1, + "rag_rows": [ + { + "path": "src/plba/__init__.py", + "content": "from plba.bootstrap import create_runtime\nfrom plba.config import ConfigFileLoader, FileConfigProvider\nfrom plba.control import ControlActionSet, ControlChannel, ControlPlaneService, HttpControlChannel\nfrom plba.contracts import (\n ApplicationModule,\n ConfigProvider,\n HealthContributor,\n TraceContext,\n TraceContextRecord,\n TraceLogMessage,\n TraceTransport,\n Worker,\n WorkerHealth,\n WorkerStatus,\n)\nfrom plba.core import ConfigurationManager, RuntimeManager, ServiceContainer\nfrom plba.health import HealthRegistry\nfrom plba.logging import LogManager\nfrom plba.queue import InMemoryTaskQueue\nfrom plba.tracing import MySqlTraceTransport, NoOpTraceTransport, TraceService\nfrom plba.workflow import (\n StepResult,\n WorkflowContext,\n WorkflowDefinition,\n WorkflowEngine,\n WorkflowEngineHooks,\n WorkflowNode,\n WorkflowRuntimeFactory,\n WorkflowStep,\n)\nfrom plba.workers import WorkerSupervisor\n\n__all__ = [\n \"ApplicationModule\",\n \"ConfigFileLoader\",\n \"ConfigProvider\",\n \"ConfigurationManager\",\n \"ControlActionSet\",\n \"ControlChannel\",\n \"ControlPlaneService\",\n \"create_runtime\",\n \"FileConfigProvider\",\n \"HealthContributor\",\n \"HealthRegistry\",\n \"HttpControlChannel\",\n \"InMemoryTaskQueue\",\n \"LogManager\",\n \"MySqlTraceTransport\",\n \"NoOpTraceTransport\",\n \"RuntimeManager\",\n \"ServiceContainer\",\n \"TraceContext\",\n \"TraceContextRecord\",\n \"TraceLogMessage\",\n \"TraceService\",\n \"TraceTransport\",\n \"StepResult\",\n \"Worker\",\n \"WorkerHealth\",\n \"WorkerStatus\",\n \"WorkflowContext\",\n \"WorkflowDefinition\",\n \"WorkflowEngine\",\n \"WorkflowEngineHooks\",\n \"WorkflowNode\",\n \"WorkflowRuntimeFactory\",\n \"WorkflowStep\",\n \"WorkerSupervisor\",\n]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/__init__.py:1-69", + "span_start": 1, + "span_end": 69, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C0_SOURCE_CHUNKS": 200 + }, + "filters_by_layer": { + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src/plba/__init__.py" + ], + "include_globs": [], + "exclude_globs": [], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Открой файл src/plba/__init__.py", + "path_scope": [ + "src/plba/__init__.py" + ], + "include_globs": [], + "exclude_globs": [], + "prefer_globs": [], + "top_k": 200, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src/plba/__init__.py" + ], + "normalized_include_globs": [], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [] + }, + "layers": [ + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 39, + "retrieval_by_layer": { + "C0_SOURCE_CHUNKS": 39 + }, + "merge_rank": 0 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Открой файл src/plba/__init__.py", + "rag_count": 1 + }, + "output": { + "llm_answer": "В файле `src/plba/__init__.py` видны импортированные модули и классы из различных подпакетов библиотеки PLBA. Файл экспортирует набор основных классов и функций, используемых для конфигурации, управления состоянием приложения, работы с очередями задач, выполнения рабочих процессов и контроля их здоровья. Ответ основан исключительно на содержимом указанного файла." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 612, + "evidence_rows": 1, + "evidence_chars": 1768 + }, + "evidence_summary": [ + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_open_file_ru_v3", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 715 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-open-file-public-api.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-open-file-public-api.md new file mode 100644 index 0000000..ea4e309 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-open-file-public-api.md @@ -0,0 +1,30 @@ +# plba-v2-open-file-public-api + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Открой файл src/plba/__init__.py + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 1, + "llm_answer": "В файле `src/plba/__init__.py` видны импортированные модули и классы из различных подпакетов библиотеки PLBA. Файл экспортирует набор основных классов и функций, используемых для конфигурации, управления состоянием приложения, работы с очередями задач, выполнения рабочих процессов и контроля их здоровья. Ответ основан исключительно на содержимом указанного файла.", + "answer_mode": "answered", + "path_scope": [ + "src/plba/__init__.py" + ], + "symbol_candidates": [], + "layers": [ + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-open-file-runtime.json b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-open-file-runtime.json new file mode 100644 index 0000000..2d8db8b --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-open-file-runtime.json @@ -0,0 +1,492 @@ +{ + "case_id": "plba-v2-open-file-runtime", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 1, + "llm_answer": "Файл src/app_runtime/core/runtime.py содержит определение класса `RuntimeManager`. В классе инициализируются параметры конфигурации, сервисы и другие компоненты системы. Видно также метод `__init__`, принимающий различные аргументы для настройки менеджера выполнения задач. Метод `_register_core_services` упоминается, но его реализация не видна в представленном фрагменте.", + "answer_mode": "answered", + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "symbol_candidates": [], + "layers": [ + "C0_SOURCE_CHUNKS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-v2-open-file-runtime", + "text": "Открой файл src/app_runtime/core/runtime.py", + "mode": "full_chain", + "run_started_at": "2026-03-12T14:07:09", + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Открой файл src/app_runtime/core/runtime.py", + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [], + "confidence": 0.0 + }, + "rag_count": 1, + "rag_rows": [ + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "Файл src/app_runtime/core/runtime.py содержит определение класса `RuntimeManager`. В классе инициализируются параметры конфигурации, сервисы и другие компоненты системы. Видно также метод `__init__`, принимающий различные аргументы для настройки менеджера выполнения задач. Метод `_register_core_services` упоминается, но его реализация не видна в представленном фрагменте.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "unknown", + "symbol_candidates": [], + "keyword_hints": [], + "path_hints": [ + "src/app_runtime/core/runtime.py" + ], + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/app_runtime/core/runtime.py" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": false, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C0_SOURCE_CHUNKS": 200 + }, + "filters_by_layer": { + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "include_globs": [], + "exclude_globs": [], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Открой файл src/app_runtime/core/runtime.py", + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "include_globs": [], + "exclude_globs": [], + "prefer_globs": [], + "top_k": 200, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "normalized_include_globs": [], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [] + }, + "layers": [ + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 1, + "symbol_resolution": 0, + "retrieval_total": 159, + "retrieval_by_layer": { + "C0_SOURCE_CHUNKS": 159 + }, + "merge_rank": 0, + "prompt_build": 0, + "llm_call": 1029 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 623, + "evidence_rows": 1, + "evidence_chars": 6265 + }, + "evidence_summary": [ + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_open_file_ru_v3", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [], + "path_scope": [ + "src/app_runtime/core/runtime.py" + ] + }, + "llm": { + "used_evidence_count": 1, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-v2-open-file-runtime", + "mode": "full_chain", + "run_started_at": "2026-03-12T14:07:09", + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Открой файл src/app_runtime/core/runtime.py", + "normalized_query": "Открой файл src/app_runtime/core/runtime.py" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Открой файл src/app_runtime/core/runtime.py" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Открой файл src/app_runtime/core/runtime.py" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "unknown", + "symbol_candidates": [], + "keyword_hints": [], + "path_hints": [ + "src/app_runtime/core/runtime.py" + ], + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/app_runtime/core/runtime.py" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": false, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 1 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Открой файл src/app_runtime/core/runtime.py" + }, + "output": { + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [], + "confidence": 0.0 + }, + "rag_count": 1, + "rag_rows": [ + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C0_SOURCE_CHUNKS": 200 + }, + "filters_by_layer": { + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "include_globs": [], + "exclude_globs": [], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Открой файл src/app_runtime/core/runtime.py", + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "include_globs": [], + "exclude_globs": [], + "prefer_globs": [], + "top_k": 200, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "normalized_include_globs": [], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [] + }, + "layers": [ + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 159, + "retrieval_by_layer": { + "C0_SOURCE_CHUNKS": 159 + }, + "merge_rank": 0 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Открой файл src/app_runtime/core/runtime.py", + "rag_count": 1 + }, + "output": { + "llm_answer": "Файл src/app_runtime/core/runtime.py содержит определение класса `RuntimeManager`. В классе инициализируются параметры конфигурации, сервисы и другие компоненты системы. Видно также метод `__init__`, принимающий различные аргументы для настройки менеджера выполнения задач. Метод `_register_core_services` упоминается, но его реализация не видна в представленном фрагменте." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 623, + "evidence_rows": 1, + "evidence_chars": 6265 + }, + "evidence_summary": [ + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_open_file_ru_v3", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 1029 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-open-file-runtime.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-open-file-runtime.md new file mode 100644 index 0000000..d5865ad --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-open-file-runtime.md @@ -0,0 +1,30 @@ +# plba-v2-open-file-runtime + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Открой файл src/app_runtime/core/runtime.py + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 1, + "llm_answer": "Файл src/app_runtime/core/runtime.py содержит определение класса `RuntimeManager`. В классе инициализируются параметры конфигурации, сервисы и другие компоненты системы. Видно также метод `__init__`, принимающий различные аргументы для настройки менеджера выполнения задач. Метод `_register_core_services` упоминается, но его реализация не видна в представленном фрагменте.", + "answer_mode": "answered", + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "symbol_candidates": [], + "layers": [ + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-health-endpoint.json b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-health-endpoint.json new file mode 100644 index 0000000..37db7d8 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-health-endpoint.json @@ -0,0 +1,3084 @@ +{ + "case_id": "plba-v2-trace-flow-health-endpoint", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "TRACE_FLOW", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 26, + "llm_answer": "Запрос `/health` обрабатывается следующим образом:\n\n1. В методе `create` класса `HttpControlAppFactory` создаётся экземпляр приложения FastAPI с маршрутом `/health`.\n2. Обработчик маршрута `/health` определяется через декоратор `@app.get(\"/health\")`, внутри которого вызывается функция `health_provider`, переданная при создании экземпляра фабрики.\n3. Результат вызова функции `health_provider` асинхронно преобразуется в объект типа `JSONResponse`. Статус-код ответа устанавливается на основе значения поля `\"status\"` возвращаемого объекта: \n - если `\"status\"` равно `\"ok\"`, статус-код равен 200;\n - иначе — 503.\n4. Вызываемая функция возвращает результат обработки запроса в формате JSON вместе со статусом-кодом.\n\nТаким образом, весь процесс обработки запроса `/health` ограничивается исключительно реализацией предоставленной функции `health_provider`, которая должна обеспечивать получение и возврат статуса системы.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "health", + "HttpControlAppFactory" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-v2-trace-flow-health-endpoint", + "text": "Покажи как проходит запрос /health в HttpControlAppFactory", + "mode": "full_chain", + "run_started_at": "2026-03-12T14:07:09", + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Покажи как проходит запрос /health в HttpControlAppFactory", + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "HttpControlAppFactory", + "alternatives": [ + "HttpControlAppFactory", + "ControlActionSet", + "HealthContributor.health", + "HealthContributor" + ], + "confidence": 0.99 + }, + "rag_count": 26, + "rag_rows": [ + { + "path": "src/app_runtime/control/http_app.py", + "content": "class HttpControlAppFactory\nHttpControlAppFactory", + "layer": "C1_SYMBOL_CATALOG", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "qname": "HttpControlAppFactory", + "kind": "class", + "signature": "HttpControlAppFactory", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlActionSet\nControlActionSet", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "qname": "ControlActionSet", + "kind": "class", + "signature": "ControlActionSet", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/health.py", + "content": "method HealthContributor.health\nhealth(self)\nReturn contributor health state.", + "layer": "C1_SYMBOL_CATALOG", + "title": "HealthContributor.health", + "span_start": 9, + "span_end": 10, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "728cff18958d8a25e2661a0f08c83d68c3bbbfa8cef212b85dc0da2b11b3dc90", + "qname": "HealthContributor.health", + "kind": "method", + "signature": "health(self)", + "parent_symbol_id": "HealthContributor", + "package_or_module": "src.app_runtime.contracts.health", + "is_test": false, + "blob_sha": "6bd92611def7131e32d4dd34a8ed85e6cf3c67722ad27797032a632cb30dc097", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/health.py", + "content": "class HealthContributor\nHealthContributor(ABC)", + "layer": "C1_SYMBOL_CATALOG", + "title": "HealthContributor", + "span_start": 7, + "span_end": 10, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "db91ae387b89a2e9d83829754f27fa18a4055b3e72d7f31789a0b8e0bf5bba0b", + "qname": "HealthContributor", + "kind": "class", + "signature": "HealthContributor(ABC)", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.contracts.health", + "is_test": false, + "blob_sha": "6bd92611def7131e32d4dd34a8ed85e6cf3c67722ad27797032a632cb30dc097", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/health/registry.py", + "content": "HealthRegistry\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (2)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HealthRegistry", + "span_start": 8, + "span_end": 56, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 29, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd3390eb0ba29c9979466b9c2117238e0da3bb829eeb4d505cb34c9c3df7a8e8", + "symbol_name": "HealthRegistry", + "qname": "HealthRegistry", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 2, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "26e6a24daa43407ba5340b74497c20153020e79f8d7828ae502aaec378dfcf75", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/types.py", + "content": "HealthPayload\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "HealthPayload", + "span_start": 7, + "span_end": 11, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "392235d63ddf752d6e419cb8528c93fe070d1bc02d3c87ba6a897baac810cf5d", + "symbol_name": "HealthPayload", + "qname": "HealthPayload", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "448a02e4a432b5ab65b246b2bd24a32a6f127b9d2091ea73b53ee3c0a2f53bb3", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/health.py", + "content": "HealthContributor\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "HealthContributor", + "span_start": 7, + "span_end": 10, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "db91ae387b89a2e9d83829754f27fa18a4055b3e72d7f31789a0b8e0bf5bba0b", + "symbol_name": "HealthContributor", + "qname": "HealthContributor", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "6bd92611def7131e32d4dd34a8ed85e6cf3c67722ad27797032a632cb30dc097", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/health/registry.py", + "content": "HealthRegistry.__init__\n -> HealthRegistry._contributors\n -> HealthRegistry.register", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HealthRegistry.__init__:dataflow_slice", + "span_start": 10, + "span_end": 13, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "2381dfb339d541367c3251d2a610cac9d8b3f6bd6a352e119d00a93c5ccc2b7d", + "edge_type": "dataflow_slice", + "src_symbol_id": "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "src_qname": "HealthRegistry.__init__", + "dst_symbol_id": "a9e1f290c346c8bb1d67af0cafeebb5bcaf29c3ed7027e33c794532743df38f2", + "dst_ref": "HealthRegistry.register", + "resolution": "resolved", + "slice_id": "2381dfb339d541367c3251d2a610cac9d8b3f6bd6a352e119d00a93c5ccc2b7d", + "root_symbol_id": "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "path_symbols": [ + "HealthRegistry.__init__", + "HealthRegistry._contributors", + "HealthRegistry.register" + ], + "path_symbol_ids": [ + "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "a9e1f290c346c8bb1d67af0cafeebb5bcaf29c3ed7027e33c794532743df38f2" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "26e6a24daa43407ba5340b74497c20153020e79f8d7828ae502aaec378dfcf75", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/health/registry.py", + "content": "HealthRegistry.__init__\n -> HealthRegistry._contributors\n -> HealthRegistry.contributor_healths", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HealthRegistry.__init__:dataflow_slice", + "span_start": 10, + "span_end": 16, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d3a88a7abf16359e903e809ffc24473658fdd8198f60641fe1584fc4ac663c31", + "edge_type": "dataflow_slice", + "src_symbol_id": "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "src_qname": "HealthRegistry.__init__", + "dst_symbol_id": "fa7bbd8f4b64a55a5088640c30f52e84075d65f531bd7e1f6c1d7bb8d24fcbf2", + "dst_ref": "HealthRegistry.contributor_healths", + "resolution": "resolved", + "slice_id": "d3a88a7abf16359e903e809ffc24473658fdd8198f60641fe1584fc4ac663c31", + "root_symbol_id": "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "path_symbols": [ + "HealthRegistry.__init__", + "HealthRegistry._contributors", + "HealthRegistry.contributor_healths" + ], + "path_symbol_ids": [ + "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "fa7bbd8f4b64a55a5088640c30f52e84075d65f531bd7e1f6c1d7bb8d24fcbf2" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "26e6a24daa43407ba5340b74497c20153020e79f8d7828ae502aaec378dfcf75", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory.create calls time.monotonic", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlAppFactory.create:calls", + "span_start": 25, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3fdd0a88d10225ee74f3b84ab57e13f09f5ccc72f00e31af9ae4655411c289c0", + "edge_type": "calls", + "src_symbol_id": "4af42c2a9275d652e710a98ec48b8247236b4453a093629f8958704ff6d3cb58", + "src_qname": "HttpControlAppFactory.create", + "dst_symbol_id": null, + "dst_ref": "time.monotonic", + "resolution": "partial", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory.create calls app.post", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlAppFactory.create:calls", + "span_start": 37, + "span_end": 37, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "0e545d4b5187db7bec5ceac03071d2ad68177550c42af748fee364639e533c90", + "edge_type": "calls", + "src_symbol_id": "4af42c2a9275d652e710a98ec48b8247236b4453a093629f8958704ff6d3cb58", + "src_qname": "HttpControlAppFactory.create", + "dst_symbol_id": null, + "dst_ref": "app.post", + "resolution": "partial", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory.create calls str", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlAppFactory.create:calls", + "span_start": 27, + "span_end": 27, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "2a87c51461e31cd556508cc37fdff37b4d24c26f7f1604db30af5e8f1bda96cb", + "edge_type": "calls", + "src_symbol_id": "4af42c2a9275d652e710a98ec48b8247236b4453a093629f8958704ff6d3cb58", + "src_qname": "HttpControlAppFactory.create", + "dst_symbol_id": null, + "dst_ref": "str", + "resolution": "partial", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "class HttpControlAppFactory:\n def create(\n self,\n health_provider: Callable[[], Awaitable[HealthPayload]],\n action_provider: Callable[[str, str], Awaitable[JSONResponse]],\n ) -> FastAPI:\n app = FastAPI(title=\"PLBA Control API\")\n\n @app.middleware(\"http\")\n async def log_api_call(request: Request, call_next): # type: ignore[no-untyped-def]\n started = time.monotonic()\n response = await call_next(request)\n response.headers[\"X-Response-Time-Ms\"] = str(int((time.monotonic() - started) * 1000))\n return response\n\n @app.get(\"/health\")\n async def health() -> JSONResponse:\n payload = await health_provider()\n status_code = 200 if payload.get(\"status\") == \"ok\" else 503\n return JSONResponse(content=payload, status_code=status_code)\n\n @app.get(\"/actions/{action}\")\n @app.post(\"/actions/{action}\")\n async def action(action: str, request: Request) -> JSONResponse:\n client_source = self._client_source(request)\n if action in {\"start\", \"stop\"}:\n LOGGER.warning(\"Control action requested: /actions/%s client=%s\", action, client_source)\n return await action_provider(action, client_source)\n\n return app\n\n def _client_source(self, request: Request) -> str:\n explicit_header = request.headers.get(\"X-Client-Source\", \"\").strip()\n if explicit_header:\n return explicit_header\n user_agent = request.headers.get(\"User-Agent\", \"\").strip()\n if user_agent:\n return f\"user-agent:{user_agent}\"\n return \"unknown\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_app.py:HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "Запрос `/health` обрабатывается следующим образом:\n\n1. В методе `create` класса `HttpControlAppFactory` создаётся экземпляр приложения FastAPI с маршрутом `/health`.\n2. Обработчик маршрута `/health` определяется через декоратор `@app.get(\"/health\")`, внутри которого вызывается функция `health_provider`, переданная при создании экземпляра фабрики.\n3. Результат вызова функции `health_provider` асинхронно преобразуется в объект типа `JSONResponse`. Статус-код ответа устанавливается на основе значения поля `\"status\"` возвращаемого объекта: \n - если `\"status\"` равно `\"ok\"`, статус-код равен 200;\n - иначе — 503.\n4. Вызываемая функция возвращает результат обработки запроса в формате JSON вместе со статусом-кодом.\n\nТаким образом, весь процесс обработки запроса `/health` ограничивается исключительно реализацией предоставленной функции `health_provider`, которая должна обеспечивать получение и возврат статуса системы.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "TRACE_FLOW", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS", + "C4_SEMANTIC_ROLES" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "TRACE_FLOW", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "unknown", + "symbol_candidates": [ + "health", + "HttpControlAppFactory" + ], + "keyword_hints": [ + "health", + "HttpControlAppFactory" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 10, + "C3_ENTRYPOINTS": 10 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "health HttpControlAppFactory", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Покажи как проходит запрос /health в HttpControlAppFactory", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "Покажи как проходит запрос /health в HttpControlAppFactory", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Покажи как проходит запрос /health в HttpControlAppFactory", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 10, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "Покажи как проходит запрос /health в HttpControlAppFactory", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 10, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 4, + "candidates_after_filter": 4 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 10, + "candidates_after_filter": 10 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "HttpControlAppFactory", + "alternatives": [ + "HttpControlAppFactory", + "ControlActionSet", + "HealthContributor.health", + "HealthContributor" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 4, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 8, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 10, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 1, + "symbol_resolution": 0, + "retrieval_total": 178, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 62, + "C0_SOURCE_CHUNKS": 23, + "C4_SEMANTIC_ROLES": 20, + "C2_DEPENDENCY_GRAPH": 57, + "C3_ENTRYPOINTS": 15 + }, + "merge_rank": 59, + "prompt_build": 0, + "llm_call": 1646 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 794, + "evidence_rows": 26, + "evidence_chars": 3507 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 4, + "unique_paths": 3 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 8, + "unique_paths": 7 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 10, + "unique_paths": 3 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_trace_flow_ru_v3", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "health", + "HttpControlAppFactory" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 26, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-v2-trace-flow-health-endpoint", + "mode": "full_chain", + "run_started_at": "2026-03-12T14:07:09", + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Покажи как проходит запрос /health в HttpControlAppFactory", + "normalized_query": "Покажи как проходит запрос /health в HttpControlAppFactory" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Покажи как проходит запрос /health в HttpControlAppFactory" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Покажи как проходит запрос /health в HttpControlAppFactory" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "TRACE_FLOW", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "unknown", + "symbol_candidates": [ + "health", + "HttpControlAppFactory" + ], + "keyword_hints": [ + "health", + "HttpControlAppFactory" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 1 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Покажи как проходит запрос /health в HttpControlAppFactory" + }, + "output": { + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "HttpControlAppFactory", + "alternatives": [ + "HttpControlAppFactory", + "ControlActionSet", + "HealthContributor.health", + "HealthContributor" + ], + "confidence": 0.99 + }, + "rag_count": 26, + "rag_rows": [ + { + "path": "src/app_runtime/control/http_app.py", + "content": "class HttpControlAppFactory\nHttpControlAppFactory", + "layer": "C1_SYMBOL_CATALOG", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "qname": "HttpControlAppFactory", + "kind": "class", + "signature": "HttpControlAppFactory", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlActionSet\nControlActionSet", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "qname": "ControlActionSet", + "kind": "class", + "signature": "ControlActionSet", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/health.py", + "content": "method HealthContributor.health\nhealth(self)\nReturn contributor health state.", + "layer": "C1_SYMBOL_CATALOG", + "title": "HealthContributor.health", + "span_start": 9, + "span_end": 10, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "728cff18958d8a25e2661a0f08c83d68c3bbbfa8cef212b85dc0da2b11b3dc90", + "qname": "HealthContributor.health", + "kind": "method", + "signature": "health(self)", + "parent_symbol_id": "HealthContributor", + "package_or_module": "src.app_runtime.contracts.health", + "is_test": false, + "blob_sha": "6bd92611def7131e32d4dd34a8ed85e6cf3c67722ad27797032a632cb30dc097", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/health.py", + "content": "class HealthContributor\nHealthContributor(ABC)", + "layer": "C1_SYMBOL_CATALOG", + "title": "HealthContributor", + "span_start": 7, + "span_end": 10, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "db91ae387b89a2e9d83829754f27fa18a4055b3e72d7f31789a0b8e0bf5bba0b", + "qname": "HealthContributor", + "kind": "class", + "signature": "HealthContributor(ABC)", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.contracts.health", + "is_test": false, + "blob_sha": "6bd92611def7131e32d4dd34a8ed85e6cf3c67722ad27797032a632cb30dc097", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/health/registry.py", + "content": "HealthRegistry\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (2)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HealthRegistry", + "span_start": 8, + "span_end": 56, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 29, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd3390eb0ba29c9979466b9c2117238e0da3bb829eeb4d505cb34c9c3df7a8e8", + "symbol_name": "HealthRegistry", + "qname": "HealthRegistry", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 2, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "26e6a24daa43407ba5340b74497c20153020e79f8d7828ae502aaec378dfcf75", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/types.py", + "content": "HealthPayload\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "HealthPayload", + "span_start": 7, + "span_end": 11, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "392235d63ddf752d6e419cb8528c93fe070d1bc02d3c87ba6a897baac810cf5d", + "symbol_name": "HealthPayload", + "qname": "HealthPayload", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "448a02e4a432b5ab65b246b2bd24a32a6f127b9d2091ea73b53ee3c0a2f53bb3", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/health.py", + "content": "HealthContributor\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "HealthContributor", + "span_start": 7, + "span_end": 10, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "db91ae387b89a2e9d83829754f27fa18a4055b3e72d7f31789a0b8e0bf5bba0b", + "symbol_name": "HealthContributor", + "qname": "HealthContributor", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "6bd92611def7131e32d4dd34a8ed85e6cf3c67722ad27797032a632cb30dc097", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/health/registry.py", + "content": "HealthRegistry.__init__\n -> HealthRegistry._contributors\n -> HealthRegistry.register", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HealthRegistry.__init__:dataflow_slice", + "span_start": 10, + "span_end": 13, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "2381dfb339d541367c3251d2a610cac9d8b3f6bd6a352e119d00a93c5ccc2b7d", + "edge_type": "dataflow_slice", + "src_symbol_id": "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "src_qname": "HealthRegistry.__init__", + "dst_symbol_id": "a9e1f290c346c8bb1d67af0cafeebb5bcaf29c3ed7027e33c794532743df38f2", + "dst_ref": "HealthRegistry.register", + "resolution": "resolved", + "slice_id": "2381dfb339d541367c3251d2a610cac9d8b3f6bd6a352e119d00a93c5ccc2b7d", + "root_symbol_id": "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "path_symbols": [ + "HealthRegistry.__init__", + "HealthRegistry._contributors", + "HealthRegistry.register" + ], + "path_symbol_ids": [ + "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "a9e1f290c346c8bb1d67af0cafeebb5bcaf29c3ed7027e33c794532743df38f2" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "26e6a24daa43407ba5340b74497c20153020e79f8d7828ae502aaec378dfcf75", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/health/registry.py", + "content": "HealthRegistry.__init__\n -> HealthRegistry._contributors\n -> HealthRegistry.contributor_healths", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HealthRegistry.__init__:dataflow_slice", + "span_start": 10, + "span_end": 16, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d3a88a7abf16359e903e809ffc24473658fdd8198f60641fe1584fc4ac663c31", + "edge_type": "dataflow_slice", + "src_symbol_id": "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "src_qname": "HealthRegistry.__init__", + "dst_symbol_id": "fa7bbd8f4b64a55a5088640c30f52e84075d65f531bd7e1f6c1d7bb8d24fcbf2", + "dst_ref": "HealthRegistry.contributor_healths", + "resolution": "resolved", + "slice_id": "d3a88a7abf16359e903e809ffc24473658fdd8198f60641fe1584fc4ac663c31", + "root_symbol_id": "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "path_symbols": [ + "HealthRegistry.__init__", + "HealthRegistry._contributors", + "HealthRegistry.contributor_healths" + ], + "path_symbol_ids": [ + "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "fa7bbd8f4b64a55a5088640c30f52e84075d65f531bd7e1f6c1d7bb8d24fcbf2" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "26e6a24daa43407ba5340b74497c20153020e79f8d7828ae502aaec378dfcf75", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory.create calls time.monotonic", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlAppFactory.create:calls", + "span_start": 25, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3fdd0a88d10225ee74f3b84ab57e13f09f5ccc72f00e31af9ae4655411c289c0", + "edge_type": "calls", + "src_symbol_id": "4af42c2a9275d652e710a98ec48b8247236b4453a093629f8958704ff6d3cb58", + "src_qname": "HttpControlAppFactory.create", + "dst_symbol_id": null, + "dst_ref": "time.monotonic", + "resolution": "partial", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory.create calls app.post", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlAppFactory.create:calls", + "span_start": 37, + "span_end": 37, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "0e545d4b5187db7bec5ceac03071d2ad68177550c42af748fee364639e533c90", + "edge_type": "calls", + "src_symbol_id": "4af42c2a9275d652e710a98ec48b8247236b4453a093629f8958704ff6d3cb58", + "src_qname": "HttpControlAppFactory.create", + "dst_symbol_id": null, + "dst_ref": "app.post", + "resolution": "partial", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory.create calls str", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlAppFactory.create:calls", + "span_start": 27, + "span_end": 27, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "2a87c51461e31cd556508cc37fdff37b4d24c26f7f1604db30af5e8f1bda96cb", + "edge_type": "calls", + "src_symbol_id": "4af42c2a9275d652e710a98ec48b8247236b4453a093629f8958704ff6d3cb58", + "src_qname": "HttpControlAppFactory.create", + "dst_symbol_id": null, + "dst_ref": "str", + "resolution": "partial", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "class HttpControlAppFactory:\n def create(\n self,\n health_provider: Callable[[], Awaitable[HealthPayload]],\n action_provider: Callable[[str, str], Awaitable[JSONResponse]],\n ) -> FastAPI:\n app = FastAPI(title=\"PLBA Control API\")\n\n @app.middleware(\"http\")\n async def log_api_call(request: Request, call_next): # type: ignore[no-untyped-def]\n started = time.monotonic()\n response = await call_next(request)\n response.headers[\"X-Response-Time-Ms\"] = str(int((time.monotonic() - started) * 1000))\n return response\n\n @app.get(\"/health\")\n async def health() -> JSONResponse:\n payload = await health_provider()\n status_code = 200 if payload.get(\"status\") == \"ok\" else 503\n return JSONResponse(content=payload, status_code=status_code)\n\n @app.get(\"/actions/{action}\")\n @app.post(\"/actions/{action}\")\n async def action(action: str, request: Request) -> JSONResponse:\n client_source = self._client_source(request)\n if action in {\"start\", \"stop\"}:\n LOGGER.warning(\"Control action requested: /actions/%s client=%s\", action, client_source)\n return await action_provider(action, client_source)\n\n return app\n\n def _client_source(self, request: Request) -> str:\n explicit_header = request.headers.get(\"X-Client-Source\", \"\").strip()\n if explicit_header:\n return explicit_header\n user_agent = request.headers.get(\"User-Agent\", \"\").strip()\n if user_agent:\n return f\"user-agent:{user_agent}\"\n return \"unknown\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_app.py:HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 10, + "C3_ENTRYPOINTS": 10 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "health HttpControlAppFactory", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Покажи как проходит запрос /health в HttpControlAppFactory", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "Покажи как проходит запрос /health в HttpControlAppFactory", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Покажи как проходит запрос /health в HttpControlAppFactory", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 10, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "Покажи как проходит запрос /health в HttpControlAppFactory", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 10, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 4, + "candidates_after_filter": 4 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 10, + "candidates_after_filter": 10 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "HttpControlAppFactory", + "alternatives": [ + "HttpControlAppFactory", + "ControlActionSet", + "HealthContributor.health", + "HealthContributor" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 4, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 8, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 10, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 178, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 62, + "C0_SOURCE_CHUNKS": 23, + "C4_SEMANTIC_ROLES": 20, + "C2_DEPENDENCY_GRAPH": 57, + "C3_ENTRYPOINTS": 15 + }, + "merge_rank": 59 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Покажи как проходит запрос /health в HttpControlAppFactory", + "rag_count": 26 + }, + "output": { + "llm_answer": "Запрос `/health` обрабатывается следующим образом:\n\n1. В методе `create` класса `HttpControlAppFactory` создаётся экземпляр приложения FastAPI с маршрутом `/health`.\n2. Обработчик маршрута `/health` определяется через декоратор `@app.get(\"/health\")`, внутри которого вызывается функция `health_provider`, переданная при создании экземпляра фабрики.\n3. Результат вызова функции `health_provider` асинхронно преобразуется в объект типа `JSONResponse`. Статус-код ответа устанавливается на основе значения поля `\"status\"` возвращаемого объекта: \n - если `\"status\"` равно `\"ok\"`, статус-код равен 200;\n - иначе — 503.\n4. Вызываемая функция возвращает результат обработки запроса в формате JSON вместе со статусом-кодом.\n\nТаким образом, весь процесс обработки запроса `/health` ограничивается исключительно реализацией предоставленной функции `health_provider`, которая должна обеспечивать получение и возврат статуса системы." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 794, + "evidence_rows": 26, + "evidence_chars": 3507 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 4, + "unique_paths": 3 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 8, + "unique_paths": 7 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 10, + "unique_paths": 3 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_trace_flow_ru_v3", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 1646 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-health-endpoint.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-health-endpoint.md new file mode 100644 index 0000000..a2d231f --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-health-endpoint.md @@ -0,0 +1,35 @@ +# plba-v2-trace-flow-health-endpoint + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Покажи как проходит запрос /health в HttpControlAppFactory + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "TRACE_FLOW", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 26, + "llm_answer": "Запрос `/health` обрабатывается следующим образом:\n\n1. В методе `create` класса `HttpControlAppFactory` создаётся экземпляр приложения FastAPI с маршрутом `/health`.\n2. Обработчик маршрута `/health` определяется через декоратор `@app.get(\"/health\")`, внутри которого вызывается функция `health_provider`, переданная при создании экземпляра фабрики.\n3. Результат вызова функции `health_provider` асинхронно преобразуется в объект типа `JSONResponse`. Статус-код ответа устанавливается на основе значения поля `\"status\"` возвращаемого объекта: \n - если `\"status\"` равно `\"ok\"`, статус-код равен 200;\n - иначе — 503.\n4. Вызываемая функция возвращает результат обработки запроса в формате JSON вместе со статусом-кодом.\n\nТаким образом, весь процесс обработки запроса `/health` ограничивается исключительно реализацией предоставленной функции `health_provider`, которая должна обеспечивать получение и возврат статуса системы.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "health", + "HttpControlAppFactory" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-runtime-start.json b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-runtime-start.json new file mode 100644 index 0000000..a76bff8 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-runtime-start.json @@ -0,0 +1,2964 @@ +{ + "case_id": "plba-v2-trace-flow-runtime-start", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "TRACE_FLOW", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 23, + "llm_answer": "При запуске объекта `RuntimeManager` происходит следующее:\n\n1. В методе `__init__` выполняется инициализация основных атрибутов класса:\n - Создаются объекты конфигурации (`configuration`), сервисов (`services`), трассировки (`traces`), мониторинга здоровья (`health`), логирования (`logs`) и управления рабочими процессами (`workers`).\n - При необходимости передаются параметры-конструкторы через аргументы метода.\n \n2. Далее вызывается приватный метод `_register_core_services`, предназначенный для регистрации базовых модулей системы, таких как регистрация модуля обработки («registry»).\n\nТаким образом, после создания экземпляра `RuntimeManager` объект конфигурируется с необходимыми сервисами и модулями, а затем начинает свою работу по управлению основными компонентами приложения. Однако сам механизм запуска методов и дальнейшей логики не показан напрямую в предоставленных артефактах.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-v2-trace-flow-runtime-start", + "text": "Покажи поток выполнения при запуске RuntimeManager", + "mode": "full_chain", + "run_started_at": "2026-03-12T14:07:09", + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Покажи поток выполнения при запуске RuntimeManager", + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ], + "confidence": 0.99 + }, + "rag_count": 23, + "rag_rows": [ + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager\nRuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "qname": "RuntimeManager", + "kind": "class", + "signature": "RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests manager\n- orchestrates role-like calls (4)\n- reads and writes state attributes\n- participates in dataflow slices (50)", + "layer": "C4_SEMANTIC_ROLES", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 43, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "symbol_name": "RuntimeManager", + "qname": "RuntimeManager", + "role": "pipeline_stage", + "confidence": 0.67, + "dataflow_participation": 50, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 52, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.services\n -> RuntimeManager.__init__", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 33, + "span_end": 39, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d43af85989222ee6d788ce418cdcb217c7ff044cfb915e3bdbd184417dc7bd61", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "dst_ref": "RuntimeManager.__init__", + "resolution": "resolved", + "slice_id": "d43af85989222ee6d788ce418cdcb217c7ff044cfb915e3bdbd184417dc7bd61", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.services", + "RuntimeManager.__init__" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 59, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1", + "dst_ref": "RuntimeManager.start", + "resolution": "resolved", + "slice_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.start" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager._register_core_services", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 127, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6", + "dst_ref": "RuntimeManager._register_core_services", + "resolution": "resolved", + "slice_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager._register_core_services" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.services\n -> RuntimeManager._register_core_services", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 33, + "span_end": 127, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "aac6f9dda73963b977083a892bee39a48eca4fbd7404787e022ecf4ebedec65d", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6", + "dst_ref": "RuntimeManager._register_core_services", + "resolution": "resolved", + "slice_id": "aac6f9dda73963b977083a892bee39a48eca4fbd7404787e022ecf4ebedec65d", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.services", + "RuntimeManager._register_core_services" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "При запуске объекта `RuntimeManager` происходит следующее:\n\n1. В методе `__init__` выполняется инициализация основных атрибутов класса:\n - Создаются объекты конфигурации (`configuration`), сервисов (`services`), трассировки (`traces`), мониторинга здоровья (`health`), логирования (`logs`) и управления рабочими процессами (`workers`).\n - При необходимости передаются параметры-конструкторы через аргументы метода.\n \n2. Далее вызывается приватный метод `_register_core_services`, предназначенный для регистрации базовых модулей системы, таких как регистрация модуля обработки («registry»).\n\nТаким образом, после создания экземпляра `RuntimeManager` объект конфигурируется с необходимыми сервисами и модулями, а затем начинает свою работу по управлению основными компонентами приложения. Однако сам механизм запуска методов и дальнейшей логики не показан напрямую в предоставленных артефактах.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "TRACE_FLOW", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS", + "C4_SEMANTIC_ROLES" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "TRACE_FLOW", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 10, + "C3_ENTRYPOINTS": 10 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Покажи поток выполнения при запуске RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "Покажи поток выполнения при запуске RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Покажи поток выполнения при запуске RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 10, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "Покажи поток выполнения при запуске RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 10, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 10, + "candidates_after_filter": 10 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 8, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 10, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 168, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 49, + "C0_SOURCE_CHUNKS": 21, + "C4_SEMANTIC_ROLES": 20, + "C2_DEPENDENCY_GRAPH": 61, + "C3_ENTRYPOINTS": 15 + }, + "merge_rank": 32, + "prompt_build": 0, + "llm_call": 1485 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 816, + "evidence_rows": 23, + "evidence_chars": 8302 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 8, + "unique_paths": 7 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 10, + "unique_paths": 2 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_trace_flow_ru_v3", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "RuntimeManager" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 23, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-v2-trace-flow-runtime-start", + "mode": "full_chain", + "run_started_at": "2026-03-12T14:07:09", + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Покажи поток выполнения при запуске RuntimeManager", + "normalized_query": "Покажи поток выполнения при запуске RuntimeManager" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Покажи поток выполнения при запуске RuntimeManager" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Покажи поток выполнения при запуске RuntimeManager" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "TRACE_FLOW", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Покажи поток выполнения при запуске RuntimeManager" + }, + "output": { + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ], + "confidence": 0.99 + }, + "rag_count": 23, + "rag_rows": [ + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager\nRuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "qname": "RuntimeManager", + "kind": "class", + "signature": "RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests manager\n- orchestrates role-like calls (4)\n- reads and writes state attributes\n- participates in dataflow slices (50)", + "layer": "C4_SEMANTIC_ROLES", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 43, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "symbol_name": "RuntimeManager", + "qname": "RuntimeManager", + "role": "pipeline_stage", + "confidence": 0.67, + "dataflow_participation": 50, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 52, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.services\n -> RuntimeManager.__init__", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 33, + "span_end": 39, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d43af85989222ee6d788ce418cdcb217c7ff044cfb915e3bdbd184417dc7bd61", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "dst_ref": "RuntimeManager.__init__", + "resolution": "resolved", + "slice_id": "d43af85989222ee6d788ce418cdcb217c7ff044cfb915e3bdbd184417dc7bd61", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.services", + "RuntimeManager.__init__" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 59, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1", + "dst_ref": "RuntimeManager.start", + "resolution": "resolved", + "slice_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.start" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager._register_core_services", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 127, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6", + "dst_ref": "RuntimeManager._register_core_services", + "resolution": "resolved", + "slice_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager._register_core_services" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.services\n -> RuntimeManager._register_core_services", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 33, + "span_end": 127, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "aac6f9dda73963b977083a892bee39a48eca4fbd7404787e022ecf4ebedec65d", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6", + "dst_ref": "RuntimeManager._register_core_services", + "resolution": "resolved", + "slice_id": "aac6f9dda73963b977083a892bee39a48eca4fbd7404787e022ecf4ebedec65d", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.services", + "RuntimeManager._register_core_services" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 10, + "C3_ENTRYPOINTS": 10 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Покажи поток выполнения при запуске RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "Покажи поток выполнения при запуске RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Покажи поток выполнения при запуске RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 10, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "Покажи поток выполнения при запуске RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 10, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 10, + "candidates_after_filter": 10 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 8, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 10, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 168, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 49, + "C0_SOURCE_CHUNKS": 21, + "C4_SEMANTIC_ROLES": 20, + "C2_DEPENDENCY_GRAPH": 61, + "C3_ENTRYPOINTS": 15 + }, + "merge_rank": 32 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Покажи поток выполнения при запуске RuntimeManager", + "rag_count": 23 + }, + "output": { + "llm_answer": "При запуске объекта `RuntimeManager` происходит следующее:\n\n1. В методе `__init__` выполняется инициализация основных атрибутов класса:\n - Создаются объекты конфигурации (`configuration`), сервисов (`services`), трассировки (`traces`), мониторинга здоровья (`health`), логирования (`logs`) и управления рабочими процессами (`workers`).\n - При необходимости передаются параметры-конструкторы через аргументы метода.\n \n2. Далее вызывается приватный метод `_register_core_services`, предназначенный для регистрации базовых модулей системы, таких как регистрация модуля обработки («registry»).\n\nТаким образом, после создания экземпляра `RuntimeManager` объект конфигурируется с необходимыми сервисами и модулями, а затем начинает свою работу по управлению основными компонентами приложения. Однако сам механизм запуска методов и дальнейшей логики не показан напрямую в предоставленных артефактах." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 816, + "evidence_rows": 23, + "evidence_chars": 8302 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 8, + "unique_paths": 7 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 10, + "unique_paths": 2 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_trace_flow_ru_v3", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 1485 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-runtime-start.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-runtime-start.md new file mode 100644 index 0000000..59256d7 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-runtime-start.md @@ -0,0 +1,34 @@ +# plba-v2-trace-flow-runtime-start + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Покажи поток выполнения при запуске RuntimeManager + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "TRACE_FLOW", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 23, + "llm_answer": "При запуске объекта `RuntimeManager` происходит следующее:\n\n1. В методе `__init__` выполняется инициализация основных атрибутов класса:\n - Создаются объекты конфигурации (`configuration`), сервисов (`services`), трассировки (`traces`), мониторинга здоровья (`health`), логирования (`logs`) и управления рабочими процессами (`workers`).\n - При необходимости передаются параметры-конструкторы через аргументы метода.\n \n2. Далее вызывается приватный метод `_register_core_services`, предназначенный для регистрации базовых модулей системы, таких как регистрация модуля обработки («registry»).\n\nТаким образом, после создания экземпляра `RuntimeManager` объект конфигурируется с необходимыми сервисами и модулями, а затем начинает свою работу по управлению основными компонентами приложения. Однако сам механизм запуска методов и дальнейшей логики не показан напрямую в предоставленных артефактах.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/summary.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/summary.md new file mode 100644 index 0000000..8e98828 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_140708/summary.md @@ -0,0 +1,80 @@ +# pipeline_setup_v2 summary + +Passed: 18/18 + +| File | Case | Query | Expected sub-intent | Intent | Actual sub-intent | RAG layers | Pass | +|------|------|-------|---------------------|--------|-------------------|------------|------| +| full_chain_plba_code_subintents_v2.yaml | plba-v2-open-file-runtime | Открой файл src/app_runtime/core/runtime.py | OPEN_FILE | CODE_QA | OPEN_FILE | C0_SOURCE_CHUNKS:1 | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-open-file-public-api | Открой файл src/plba/__init__.py | OPEN_FILE | CODE_QA | OPEN_FILE | C0_SOURCE_CHUNKS:1 | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-explain-runtime-manager | Объясни как работает класс RuntimeManager | EXPLAIN | CODE_QA | EXPLAIN | C0_SOURCE_CHUNKS:1, C1_SYMBOL_CATALOG:1, C2_DEPENDENCY_GRAPH:6, C3_ENTRYPOINTS:3, C4_SEMANTIC_ROLES:1 | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-explain-trace-service | Объясни как работает класс TraceService | EXPLAIN | CODE_QA | EXPLAIN | C0_SOURCE_CHUNKS:3, C1_SYMBOL_CATALOG:1, C2_DEPENDENCY_GRAPH:6, C3_ENTRYPOINTS:3, C4_SEMANTIC_ROLES:1 | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-explain-create-runtime | Что делает функция create_runtime? | EXPLAIN | CODE_QA | EXPLAIN | C0_SOURCE_CHUNKS:1, C1_SYMBOL_CATALOG:1, C2_DEPENDENCY_GRAPH:6, C3_ENTRYPOINTS:3, C4_SEMANTIC_ROLES:1 | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-explain-local-http-channel | Почему в файле src/app_runtime/control/http_channel.py класс HttpControlChannel устроен так? | EXPLAIN_LOCAL | CODE_QA | EXPLAIN_LOCAL | C0_SOURCE_CHUNKS:1, C1_SYMBOL_CATALOG:1, C2_DEPENDENCY_GRAPH:4 | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-find-tests-runtime-manager | Где тесты для RuntimeManager? | FIND_TESTS | CODE_QA | FIND_TESTS | C0_SOURCE_CHUNKS:10, C2_DEPENDENCY_GRAPH:6 | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-find-tests-trace-service | Где тесты для TraceService? | FIND_TESTS | CODE_QA | FIND_TESTS | C0_SOURCE_CHUNKS:10, C2_DEPENDENCY_GRAPH:6 | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-find-tests-create-runtime | Где тесты для create_runtime? | FIND_TESTS | CODE_QA | FIND_TESTS | C0_SOURCE_CHUNKS:10, C2_DEPENDENCY_GRAPH:6 | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-find-tests-workflow-runtime-factory-negative | Где тесты для WorkflowRuntimeFactory? | FIND_TESTS | CODE_QA | FIND_TESTS | C0_SOURCE_CHUNKS:10, C2_DEPENDENCY_GRAPH:6 | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-find-entrypoints-control-plane | Найди точки входа HTTP control plane | FIND_ENTRYPOINTS | CODE_QA | FIND_ENTRYPOINTS | C0_SOURCE_CHUNKS:6, C3_ENTRYPOINTS:3 | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-find-entrypoints-health-endpoint | Где health endpoint? | FIND_ENTRYPOINTS | CODE_QA | FIND_ENTRYPOINTS | C0_SOURCE_CHUNKS:6, C3_ENTRYPOINTS:3 | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-trace-flow-runtime-start | Покажи поток выполнения при запуске RuntimeManager | TRACE_FLOW | CODE_QA | TRACE_FLOW | C0_SOURCE_CHUNKS:1, C1_SYMBOL_CATALOG:1, C2_DEPENDENCY_GRAPH:10, C3_ENTRYPOINTS:3, C4_SEMANTIC_ROLES:8 | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-trace-flow-health-endpoint | Покажи как проходит запрос /health в HttpControlAppFactory | TRACE_FLOW | CODE_QA | TRACE_FLOW | C0_SOURCE_CHUNKS:1, C1_SYMBOL_CATALOG:4, C2_DEPENDENCY_GRAPH:10, C3_ENTRYPOINTS:3, C4_SEMANTIC_ROLES:8 | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-architecture-runtime-manager | Какие компоненты участвуют в RuntimeManager? | ARCHITECTURE | CODE_QA | ARCHITECTURE | C0_SOURCE_CHUNKS:1, C1_SYMBOL_CATALOG:1, C2_DEPENDENCY_GRAPH:8, C3_ENTRYPOINTS:3, C4_SEMANTIC_ROLES:12 | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-architecture-control-plane | Какие компоненты участвуют в ControlPlaneService? | ARCHITECTURE | CODE_QA | ARCHITECTURE | C0_SOURCE_CHUNKS:1, C1_SYMBOL_CATALOG:1, C2_DEPENDENCY_GRAPH:8, C3_ENTRYPOINTS:3, C4_SEMANTIC_ROLES:12 | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-explain-nonexistent-symbol | Объясни класс RuntimeFactoryManager | EXPLAIN | CODE_QA | EXPLAIN | — | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-open-file-nonexistent | Открой файл src/app_runtime/core/missing_runtime.py | OPEN_FILE | CODE_QA | OPEN_FILE | — | ✓ | + +## LLM Answers +- **plba-v2-open-file-runtime** + Query: Открой файл src/app_runtime/core/runtime.py + > Файл src/app\_runtime/core/runtime.py содержит определение класса \`RuntimeManager\`. В классе инициализируются параметры конфигурации, сервисы и другие компоненты системы. Видно также метод \`\_\_init\_\_\`, принимающий различные аргументы для настройки менеджера выполнения задач. Метод \`\_register\_core\_services\` упоминается, но его реализация не видна в представленном фрагменте. +- **plba-v2-open-file-public-api** + Query: Открой файл src/plba/__init__.py + > В файле \`src/plba/\_\_init\_\_.py\` видны импортированные модули и классы из различных подпакетов библиотеки PLBA. Файл экспортирует набор основных классов и функций, используемых для конфигурации, управления состоянием приложения, работы с очередями задач, выполнения рабочих процессов и контроля их здоровья. Ответ основан исключительно на содержимом указанного файла. +- **plba-v2-explain-runtime-manager** + Query: Объясни как работает класс RuntimeManager + > Класс \`RuntimeManager\` играет роль менеджера жизненного цикла различных компонентов в приложении, обеспечивая координацию их инициализации и управления состоянием системы. Ключевые особенности класса: 1. Инициализация \(\`\_\_init\_\_\(\)\`\): \- Класс принимает ряд аргументов: конфигурацию, сервисы, систему отслеживания трассировок, реестр здоровья, логгер, супервизор рабочих процессов и сервис управления каналами. \- Все аргументы имеют значения по умолчанию, позволяя легко создать экземпляр класса без передачи всех параметров. 2. Управление состояниями: \- Свойства \`\_started\`, \`\_state\`, \`\_core\_registered\`, \`\_workers\_registered\` используются для отслеживания текущего состояния системы и её модулей. \- Метод \`\_register\_core\_services\(\)\` регистрирует основные службы приложения. 3. Регистрация модулей: \- Метод \`register\_module\(module\)\` позволяет зарегистрировать дополнительные модул… +- **plba-v2-explain-trace-service** + Query: Объясни как работает класс TraceService + > Класс \`TraceService\` представляет собой сервис для управления контекстами трассировки в приложении. Он является фабрикой контекста \(\`TraceContextFactory\`\), что указывает на его роль в создании и управлении объектами, связанными с трассировкой. Ключевые аспекты работы класса: 1. Инициализация: \- При инициализации создается объект записи трассировочных данных \(\`TraceRecordWriter\`\) и используется транспортная инфраструктура \(\`TraceTransport\`\). Если транспорт не указан, по умолчанию применяется заглушка \(\`NoOpTraceTransport\(\)\`\). 2. Создание контекста трассировки: \- Метод \`create\_context\` создает новый контекст трассировки с уникальным идентификатором, записывает его в хранилище \(\`store\`\) и отправляет запись через транспортную инфраструктуру. \- Контекст можно создать с указанием следующих параметров: \- \`alias\`: строка, идентифицирующая тип контекста; \- \`parent\_id\`: родите… +- **plba-v2-explain-create-runtime** + Query: Что делает функция create_runtime? + > Функция \`create\_runtime\` находится в файле \`src/plba/bootstrap.py\`. Её задача – инициализировать объект типа \`RuntimeManager\`. Реальные шаги её работы выглядят так: 1. Создаётся пустой экземпляр объекта \`RuntimeManager\`. 2. Если передан параметр \`config\_path\`, то вызовом метода \`add\_config\_file\` загружается конфигурационный файл. 3. При включённой опции \`enable\_http\_control\` создаётся канал управления через HTTP \(\`HttpControlChannel\`\) и регистрируется в объекте \`runtime.control\_plane\`. 4. Регистрируется переданный модуль приложения при помощи вызова метода \`register\_module\`. На основании представленного контекста можно уверенно утверждать, что функция выполняет основные действия по настройке и регистрации конфигурации и модуля приложения в объекте менеджера выполнения задач \(\`RuntimeManager\`\). Косвенные признаки указывают на возможное использование этого объекта для… +- **plba-v2-explain-local-http-channel** + Query: Почему в файле src/app_runtime/control/http_channel.py класс HttpControlChannel устроен так? + > Класс \`HttpControlChannel\` из файла \`http\_channel.py\` реализует механизм управления HTTP\-каналами для взаимодействия с внешним миром приложения. Что он делает: \- При инициализации класса \(\`\_\_init\_\_\`\) создается объект \`\_runner\`, управляющий сервером uvicorn \(это веб\-сервер на Python\), и устанавливается таймаут соединения через параметр \`timeout\`. \- Метод \`start\(actions\)\` запускает веб\-приложение, передавая обработчики запросов на здоровье системы и выполнение действий \(\`\_health\_response\` и \`\_action\_response\`\), а также конфигурирует набор доступных команд \(\`actions\`\). \- Метод \`stop\(\)\` останавливает работу сервера. \- Методы \`\_health\_response\` и \`\_action\_response\` возвращают ответы на запросы о состоянии системы и запросах на выполнение конкретных действий соответственно. Входные данные: \- Параметры при создании объекта: строка \`host\`, целое число \`port\`, целое число \`ti… +- **plba-v2-find-tests-runtime-manager** + Query: Где тесты для RuntimeManager? + > Прямые тесты для \`RuntimeManager\` находятся в следующих файлах: 1. tests/test\_runtime.py: \- \`test\_runtime\_graceful\_stop\_waits\_until\_worker\_finishes\`: проверяет корректность остановки менеджера при завершении работы его рабочих процессов. \- \`test\_runtime\_runs\_worker\_routine\_and\_exposes\_status\`: тестирует запуск рабочего рутины и отображение статуса выполнения. Эти тесты непосредственно используют объект \`RuntimeManager\`, создавая его инстанс и проверяя поведение через регистрацию модулей и выполнение операций запуска/остановки. Косвенных тестов, которые могли бы касаться \`RuntimeManager\`, но напрямую не создают его экземпляр, в данном контексте не обнаружено. +- **plba-v2-find-tests-trace-service** + Query: Где тесты для TraceService? + > Прямые тесты для \`TraceService\` находятся в файле \`tests/test\_runtime.py\`. В этих тестах: \- \`test\_trace\_service\_writes\_contexts\_and\_messages\` проверяет корректность записи контекста и сообщений при использовании сервиса трассировки. \- \`test\_trace\_service\_supports\_debug\_warning\_and\_error\_levels\` подтверждает поддержку различных уровней логирования \(DEBUG, WARNING, ERROR\). Оба теста непосредственно обращаются к классу \`TraceService\`, его методам и зависят от поведения самого класса через интерфейс взаимодействия с транспортом \(\`RecordingTransport\`\). +- **plba-v2-find-tests-create-runtime** + Query: Где тесты для create_runtime? + > Прямых тестов конкретно для функции \`create\_runtime\` в предоставленном контексте не обнаружено. Её имя не упоминается явно ни в объявлениях \(C1\), ни в зависимостях \(C2\), а также отсутствуют явные проверки поведения этой функции. Однако можно заметить косвенное упоминание о создании runtime через функцию \`\_build\_runtime\`, которая используется в тестах: \- В тесте \`tests/test\_business\_control\_actions.py:\_build\_runtime\` происходит создание runtime при помощи вызова функции \`RuntimeManager\(\)\`. \- Тесты \`test\_worker\_wakes\_up\_with\_configured\_interval\` и \`test\_actions\_stop\_busy\_worker\_after\_timeout\` используют блокирующий режим работы и взаимодействуют с worker'ами внутри runtime, но напрямую на \`create\_runtime\` это не указывает. Таким образом, хотя тестов с прямым названием \`create\_runtime\` нет, косвенно проверка создания runtime осуществляется через взаимодействие с её резу… +- **plba-v2-find-tests-workflow-runtime-factory-negative** + Query: Где тесты для WorkflowRuntimeFactory? + > Прямых тестов конкретно для \`WorkflowRuntimeFactory\` в предоставленном контексте не обнаружено. Имя класса, его импорты или вызовы не упоминаются ни в одном из перечисленных тестов. Однако можно найти косвенно связанные тесты, которые могут проверять функционал, связанный с управлением рабочими потоками или сценариями выполнения рабочих задач \(например, блокирующие рутины, сценарии работы с интервалами\). Эти тесты преимущественно проверяют поведение отдельных компонентов системы управления выполнением задач, таких как запуск, остановка и мониторинг активности работников. Например: \- tests/test\_business\_control\_actions.py: Тесты проверяют взаимодействие с различными действиями, связанными с состоянием и здоровьем рабочего потока \(\`ScenarioWorker\`, \`BlockingRoutine\`\), но напрямую не касаются \`WorkflowRuntimeFactory\`. Эти тесты фокусируются на проверке правильности рабо… +- **plba-v2-find-entrypoints-control-plane** + Query: Найди точки входа HTTP control plane + > Подтверждённые точки входа HTTP control plane: \- GET /health Объявлен в \`src/app\_runtime/control/http\_app.py\`. Контекст — fastapi, метод обработчика: \`health\`. \- GET /actions/\{action\}, POST /actions/\{action\} Объявлены в \`src/app\_runtime/control/http\_app.py\`. Контекст — fastapi, методы обработчиков: \`action\`. Возможные кандидаты \(полезны, но требуют дополнительного подтверждения\): \- HTTP метод: неизвестно, путь: \`/\` Не имеет явных маркеров маршрута, однако может быть точкой старта приложения, так как используется uvicorn thread runner для запуска fastapi application. Требуется дополнительное исследование для точной идентификации маршрутов и контекста обработки. +- **plba-v2-find-entrypoints-health-endpoint** + Query: Где health endpoint? + > Подтверждённый health\-endpoint обнаружен по следующим точкам входа: \- HTTP GET \`/health Объявлен в файле \`src/app\_runtime/control/http\_app.py\`, обслуживается FastAPI. Кандидаты на health\-endpoint \(без явных маркеров route\): \- Нет явных неподтвержденных кандидатов. +- **plba-v2-trace-flow-runtime-start** + Query: Покажи поток выполнения при запуске RuntimeManager + > При запуске объекта \`RuntimeManager\` происходит следующее: 1. В методе \`\_\_init\_\_\` выполняется инициализация основных атрибутов класса: \- Создаются объекты конфигурации \(\`configuration\`\), сервисов \(\`services\`\), трассировки \(\`traces\`\), мониторинга здоровья \(\`health\`\), логирования \(\`logs\`\) и управления рабочими процессами \(\`workers\`\). \- При необходимости передаются параметры\-конструкторы через аргументы метода. 2. Далее вызывается приватный метод \`\_register\_core\_services\`, предназначенный для регистрации базовых модулей системы, таких как регистрация модуля обработки \(«registry»\). Таким образом, после создания экземпляра \`RuntimeManager\` объект конфигурируется с необходимыми сервисами и модулями, а затем начинает свою работу по управлению основными компонентами приложения. Однако сам механизм запуска методов и дальнейшей логики не показан напрямую в предоставленных арте… +- **plba-v2-trace-flow-health-endpoint** + Query: Покажи как проходит запрос /health в HttpControlAppFactory + > Запрос \`/health\` обрабатывается следующим образом: 1. В методе \`create\` класса \`HttpControlAppFactory\` создаётся экземпляр приложения FastAPI с маршрутом \`/health\`. 2. Обработчик маршрута \`/health\` определяется через декоратор \`@app.get\("/health"\)\`, внутри которого вызывается функция \`health\_provider\`, переданная при создании экземпляра фабрики. 3. Результат вызова функции \`health\_provider\` асинхронно преобразуется в объект типа \`JSONResponse\`. Статус\-код ответа устанавливается на основе значения поля \`"status"\` возвращаемого объекта: \- если \`"status"\` равно \`"ok"\`, статус\-код равен 200; \- иначе — 503. 4. Вызываемая функция возвращает результат обработки запроса в формате JSON вместе со статусом\-кодом. Таким образом, весь процесс обработки запроса \`/health\` ограничивается исключительно реализацией предоставленной функции \`health\_provider\`, которая должна обеспечивать… +- **plba-v2-architecture-runtime-manager** + Query: Какие компоненты участвуют в RuntimeManager? + > В подсистеме RuntimeManager участвуют следующие компоненты и устанавливаются явные связи между ними: 1. RuntimeManager – центральный управляющий компонент, ответственный за координацию работы всей системы runtime. Он управляет состоянием приложения и отвечает за выполнение ключевых операций жизненного цикла, таких как инициализация конфигурации и запуск процессов. \- Связи: чтение и запись атрибутов состояния \(через конфигурационные данные и методы start\). 2. ControlActionSet – модель поведения или действия, выполняемые системой управления. Этот компонент играет роль дефолтного исполнителя для различных управляющих задач. \- Связь: используется внутри RuntimeManager при выполнении действий управления. 3. ControlPlaneService – сервис, обеспечивающий взаимодействие с плоскостью контроля. Его основная задача — управление каналами коммуникации и инициирование асинхронных п… +- **plba-v2-architecture-control-plane** + Query: Какие компоненты участвуют в ControlPlaneService? + > В подсистеме \`ControlPlaneService\` наблюдаются следующие компоненты и связи: 1. ControlPlaneService – главный компонент службы, управляющий потоками данных и состоянием системы. Он инициализируется через метод \`\_\_init\_\_\`, создавая каналы \(\`\_channels\`\) и регистрируя их с помощью метода \`\_register\_channel\`. 2. ControlActionSet – модель действий управления, используемая службой для обработки команд или запросов на выполнение определённых операций. Этот компонент участвует в создании каналов и запускает асинхронную обработку. Связи и зависимости внутри подсистемы: \- Контейнер \`ControlPlaneService\` отвечает за координацию выполнения различных задач и управление каналами данных. \- Каналы \(\`\_channels\`\), создаваемые при инициализации сервиса, служат механизмами передачи данных и уведомлений между различными частями системы. \- Запуск асинхронных задач происходит через метод \`… +- **plba-v2-explain-nonexistent-symbol** + Query: Объясни класс RuntimeFactoryManager + > Класс \`RuntimeFactoryManager\` не найден в предоставленном контексте. Учитывая, что контекста недостаточно для прямого анализа, я не могу точно подтвердить наличие этого класса или объяснить его работу на основе доступных данных. Тем не менее, исходя из названия, можно сделать осторожный вывод о возможном предназначении данного класса: 1. Назначение: Вероятно, этот класс предназначен для управления фабриками \(factory\) или создания экземпляров различных runtime\-компонентов во время выполнения программы. Это может включать настройку и инициализацию объектов, регистрацию фабрик или управление жизненным циклом компонентов. 2. Возможные функции: \- Управление созданием и регистрацией фабрик для разных типов компонентов. \- Предоставление интерфейса для динамического получения инстансов конкретных классов или объектов по запросу. \- Возможное кэширование созданных экземпляров… +- **plba-v2-open-file-nonexistent** + Query: Открой файл src/app_runtime/core/missing_runtime.py + > Файл src/app\_runtime/core/missing\_runtime.py не найден. \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-architecture-control-plane.json b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-architecture-control-plane.json new file mode 100644 index 0000000..84d51bf --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-architecture-control-plane.json @@ -0,0 +1,2940 @@ +{ + "case_id": "plba-v2-architecture-control-plane", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "ARCHITECTURE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 25, + "llm_answer": "В подсистеме `ControlPlaneService` участвуют следующие компоненты и наблюдаются явные связи между ними:\n\n1. ControlPlaneService — главный компонент, создающий и инициализирующий другие компоненты:\n - Создаёт каналы (`_channels`) для передачи данных с помощью метода `_channels`.\n - Регистрирует каналы с помощью метода `register_channel`, который передаёт управление каналу.\n \n2. Каналы (_channels) — представляют собой элементы инфраструктуры для обмена данными внутри сервиса. Каналы создаются и регистрируются в `ControlPlaneService`. \n\nСвязи компонентов выражены следующим образом:\n- Контроллер службы создает и управляет каналами данных.\n- Каналы используются службой для передачи и приёма сообщений между различными частями системы.\n\nГраницы ответственности `ControlPlaneService` можно кратко описать так:\n- Управление жизненным циклом каналов данных.\n- Чтение и запись атрибутов состояния системы.\n- Участие в передаче данных между компонентами системы через зарегистрированные каналы.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "ControlPlaneService" + ], + "layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-v2-architecture-control-plane", + "text": "Какие компоненты участвуют в ControlPlaneService?", + "mode": "full_chain", + "run_started_at": "2026-03-12T14:36:36", + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Какие компоненты участвуют в ControlPlaneService?", + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "ControlPlaneService", + "alternatives": [ + "ControlPlaneService" + ], + "confidence": 0.99 + }, + "rag_count": 25, + "rag_rows": [ + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/queue/in_memory.py", + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)", + "layer": "C4_SEMANTIC_ROLES", + "title": "InMemoryTaskQueue", + "span_start": 9, + "span_end": 38, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 22, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "2da04cb94544a3bcbf0943a95ad4bdd8710bcafaa32a02fd0e4de2178dcf3533", + "symbol_name": "InMemoryTaskQueue", + "qname": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 9, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "58f0cc001ccda0eee4c6bc32ed83bd05eafd6b6644f1e8b4aa9eed3103db73dc", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "ConfigFileLoader\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (8)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ConfigFileLoader", + "span_start": 11, + "span_end": 48, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 23, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "a8474eca8b6e9dc86ae67ed68b16fa5fb639ef08739c053e7b7195489765667f", + "symbol_name": "ConfigFileLoader", + "qname": "ConfigFileLoader", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 8, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/store.py", + "content": "TraceContextStore\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "TraceContextStore", + "span_start": 15, + "span_end": 52, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b2dad4fbe16ffb11b58deba311c7739955c39d59f291b22181f33e9c8cce4059", + "symbol_name": "TraceContextStore", + "qname": "TraceContextStore", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "d369554f08fc92039c6edd5a2a1e73b23901533e8974459170bbd9347d263dc5", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workers/supervisor.py", + "content": "WorkerSupervisor\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkerSupervisor", + "span_start": 10, + "span_end": 59, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "c17b44e8d9e97d490989b21fa67d7c346cdda8a0472e4c41fb243c8846faa124", + "symbol_name": "WorkerSupervisor", + "qname": "WorkerSupervisor", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "77609d9d5927171cce7fc3a54897c183fd63068710c6362029b700937aae5eee", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowEngine", + "span_start": 10, + "span_end": 86, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "57ec0a9f11c542c78e008684a888397e8d9ef4223671acb2567e631a0cbc70b4", + "symbol_name": "WorkflowEngine", + "qname": "WorkflowEngine", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.start calls asyncio.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.start:calls", + "span_start": 22, + "span_end": 22, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "4e0b3147fb867d48d26567570c259f4052a739e3098133802d4b8bafcf03be6b", + "edge_type": "calls", + "src_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "src_qname": "ControlPlaneService.start", + "dst_symbol_id": null, + "dst_ref": "asyncio.run", + "resolution": "partial", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.register_channel reads_attr ControlPlaneService._channels", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.register_channel:reads_attr", + "span_start": 17, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3101fdc99a7a9c5aebf18a024bc148d37b348248a6fd02b95724dff280f2908a", + "edge_type": "reads_attr", + "src_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "src_qname": "ControlPlaneService.register_channel", + "dst_symbol_id": null, + "dst_ref": "ControlPlaneService._channels", + "resolution": "partial", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.start reads_attr ControlPlaneService._channels", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.start:reads_attr", + "span_start": 20, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "9452e50ef27d47c30ee1c311c48fe73ecddbf7a6dbcf967a6345e98222d9f71a", + "edge_type": "reads_attr", + "src_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "src_qname": "ControlPlaneService.start", + "dst_symbol_id": null, + "dst_ref": "ControlPlaneService._channels", + "resolution": "partial", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "class ControlPlaneService\nControlPlaneService", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "qname": "ControlPlaneService", + "kind": "class", + "signature": "ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "class ControlPlaneService:\n def __init__(self) -> None:\n self._channels: list[ControlChannel] = []\n\n def register_channel(self, channel: ControlChannel) -> None:\n self._channels.append(channel)\n\n def start(self, runtime: RuntimeManager) -> None:\n if not self._channels:\n return\n asyncio.run(self._start_async(runtime))\n\n def stop(self) -> None:\n if not self._channels:\n return\n asyncio.run(self._stop_async())\n\n def snapshot(self, runtime: RuntimeManager) -> dict[str, object]:\n health = runtime.current_health()\n return {\n \"runtime\": {\"state\": runtime._state.value},\n \"modules\": list(runtime.registry.modules),\n \"services\": runtime.services.snapshot(),\n \"workers\": runtime.workers.snapshot(),\n \"health\": runtime.health.snapshot(runtime.workers.healths()) | {\"status\": health[\"status\"]},\n \"config\": runtime.configuration.get(),\n }\n\n async def _start_async(self, runtime: RuntimeManager) -> None:\n actions = ControlActionSet(\n health=runtime.health_status,\n start=runtime.start_runtime,\n stop=runtime.stop_runtime,\n status=runtime.runtime_status,\n )\n for channel in self._channels:\n await channel.start(actions)\n\n async def _stop_async(self) -> None:\n for channel in reversed(self._channels):\n await channel.stop()", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/service.py:ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "В подсистеме `ControlPlaneService` участвуют следующие компоненты и наблюдаются явные связи между ними:\n\n1. ControlPlaneService — главный компонент, создающий и инициализирующий другие компоненты:\n - Создаёт каналы (`_channels`) для передачи данных с помощью метода `_channels`.\n - Регистрирует каналы с помощью метода `register_channel`, который передаёт управление каналу.\n \n2. Каналы (_channels) — представляют собой элементы инфраструктуры для обмена данными внутри сервиса. Каналы создаются и регистрируются в `ControlPlaneService`. \n\nСвязи компонентов выражены следующим образом:\n- Контроллер службы создает и управляет каналами данных.\n- Каналы используются службой для передачи и приёма сообщений между различными частями системы.\n\nГраницы ответственности `ControlPlaneService` можно кратко описать так:\n- Управление жизненным циклом каналов данных.\n- Чтение и запись атрибутов состояния системы.\n- Участие в передаче данных между компонентами системы через зарегистрированные каналы.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "ARCHITECTURE", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS", + "C4_SEMANTIC_ROLES" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "ARCHITECTURE", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "ControlPlaneService" + ], + "keyword_hints": [ + "ControlPlaneService" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C4_SEMANTIC_ROLES": 12, + "C3_ENTRYPOINTS": 8, + "C2_DEPENDENCY_GRAPH": 8, + "C1_SYMBOL_CATALOG": 6, + "C0_SOURCE_CHUNKS": 4 + }, + "filters_by_layer": { + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C4_SEMANTIC_ROLES", + "query": "Какие компоненты участвуют в ControlPlaneService?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 12, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "Какие компоненты участвуют в ControlPlaneService?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Какие компоненты участвуют в ControlPlaneService?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C1_SYMBOL_CATALOG", + "query": "ControlPlaneService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Какие компоненты участвуют в ControlPlaneService?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 4, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 12, + "candidates_after_filter": 12 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 4, + "candidates_after_filter": 4 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "ControlPlaneService", + "alternatives": [ + "ControlPlaneService" + ] + }, + "layers": [ + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 12, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 8, + "fail_reason": null + }, + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 1, + "symbol_resolution": 0, + "retrieval_total": 147, + "retrieval_by_layer": { + "C4_SEMANTIC_ROLES": 34, + "C3_ENTRYPOINTS": 14, + "C2_DEPENDENCY_GRAPH": 57, + "C1_SYMBOL_CATALOG": 25, + "C0_SOURCE_CHUNKS": 16 + }, + "merge_rank": 21, + "prompt_build": 0, + "llm_call": 1604 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 636, + "evidence_rows": 25, + "evidence_chars": 3723 + }, + "evidence_summary": [ + { + "layer": "C4_SEMANTIC_ROLES", + "count": 12, + "unique_paths": 11 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 8, + "unique_paths": 1 + }, + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_architecture_ru_v4", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "ControlPlaneService" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 25, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-v2-architecture-control-plane", + "mode": "full_chain", + "run_started_at": "2026-03-12T14:36:36", + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Какие компоненты участвуют в ControlPlaneService?", + "normalized_query": "Какие компоненты участвуют в ControlPlaneService?" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Какие компоненты участвуют в ControlPlaneService?" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Какие компоненты участвуют в ControlPlaneService?" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "ARCHITECTURE", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "ControlPlaneService" + ], + "keyword_hints": [ + "ControlPlaneService" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 1 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Какие компоненты участвуют в ControlPlaneService?" + }, + "output": { + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "ControlPlaneService", + "alternatives": [ + "ControlPlaneService" + ], + "confidence": 0.99 + }, + "rag_count": 25, + "rag_rows": [ + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/queue/in_memory.py", + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)", + "layer": "C4_SEMANTIC_ROLES", + "title": "InMemoryTaskQueue", + "span_start": 9, + "span_end": 38, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 22, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "2da04cb94544a3bcbf0943a95ad4bdd8710bcafaa32a02fd0e4de2178dcf3533", + "symbol_name": "InMemoryTaskQueue", + "qname": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 9, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "58f0cc001ccda0eee4c6bc32ed83bd05eafd6b6644f1e8b4aa9eed3103db73dc", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "ConfigFileLoader\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (8)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ConfigFileLoader", + "span_start": 11, + "span_end": 48, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 23, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "a8474eca8b6e9dc86ae67ed68b16fa5fb639ef08739c053e7b7195489765667f", + "symbol_name": "ConfigFileLoader", + "qname": "ConfigFileLoader", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 8, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/store.py", + "content": "TraceContextStore\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "TraceContextStore", + "span_start": 15, + "span_end": 52, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b2dad4fbe16ffb11b58deba311c7739955c39d59f291b22181f33e9c8cce4059", + "symbol_name": "TraceContextStore", + "qname": "TraceContextStore", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "d369554f08fc92039c6edd5a2a1e73b23901533e8974459170bbd9347d263dc5", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workers/supervisor.py", + "content": "WorkerSupervisor\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkerSupervisor", + "span_start": 10, + "span_end": 59, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "c17b44e8d9e97d490989b21fa67d7c346cdda8a0472e4c41fb243c8846faa124", + "symbol_name": "WorkerSupervisor", + "qname": "WorkerSupervisor", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "77609d9d5927171cce7fc3a54897c183fd63068710c6362029b700937aae5eee", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowEngine", + "span_start": 10, + "span_end": 86, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "57ec0a9f11c542c78e008684a888397e8d9ef4223671acb2567e631a0cbc70b4", + "symbol_name": "WorkflowEngine", + "qname": "WorkflowEngine", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.start calls asyncio.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.start:calls", + "span_start": 22, + "span_end": 22, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "4e0b3147fb867d48d26567570c259f4052a739e3098133802d4b8bafcf03be6b", + "edge_type": "calls", + "src_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "src_qname": "ControlPlaneService.start", + "dst_symbol_id": null, + "dst_ref": "asyncio.run", + "resolution": "partial", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.register_channel reads_attr ControlPlaneService._channels", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.register_channel:reads_attr", + "span_start": 17, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3101fdc99a7a9c5aebf18a024bc148d37b348248a6fd02b95724dff280f2908a", + "edge_type": "reads_attr", + "src_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "src_qname": "ControlPlaneService.register_channel", + "dst_symbol_id": null, + "dst_ref": "ControlPlaneService._channels", + "resolution": "partial", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.start reads_attr ControlPlaneService._channels", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.start:reads_attr", + "span_start": 20, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "9452e50ef27d47c30ee1c311c48fe73ecddbf7a6dbcf967a6345e98222d9f71a", + "edge_type": "reads_attr", + "src_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "src_qname": "ControlPlaneService.start", + "dst_symbol_id": null, + "dst_ref": "ControlPlaneService._channels", + "resolution": "partial", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "class ControlPlaneService\nControlPlaneService", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "qname": "ControlPlaneService", + "kind": "class", + "signature": "ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "class ControlPlaneService:\n def __init__(self) -> None:\n self._channels: list[ControlChannel] = []\n\n def register_channel(self, channel: ControlChannel) -> None:\n self._channels.append(channel)\n\n def start(self, runtime: RuntimeManager) -> None:\n if not self._channels:\n return\n asyncio.run(self._start_async(runtime))\n\n def stop(self) -> None:\n if not self._channels:\n return\n asyncio.run(self._stop_async())\n\n def snapshot(self, runtime: RuntimeManager) -> dict[str, object]:\n health = runtime.current_health()\n return {\n \"runtime\": {\"state\": runtime._state.value},\n \"modules\": list(runtime.registry.modules),\n \"services\": runtime.services.snapshot(),\n \"workers\": runtime.workers.snapshot(),\n \"health\": runtime.health.snapshot(runtime.workers.healths()) | {\"status\": health[\"status\"]},\n \"config\": runtime.configuration.get(),\n }\n\n async def _start_async(self, runtime: RuntimeManager) -> None:\n actions = ControlActionSet(\n health=runtime.health_status,\n start=runtime.start_runtime,\n stop=runtime.stop_runtime,\n status=runtime.runtime_status,\n )\n for channel in self._channels:\n await channel.start(actions)\n\n async def _stop_async(self) -> None:\n for channel in reversed(self._channels):\n await channel.stop()", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/service.py:ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C4_SEMANTIC_ROLES": 12, + "C3_ENTRYPOINTS": 8, + "C2_DEPENDENCY_GRAPH": 8, + "C1_SYMBOL_CATALOG": 6, + "C0_SOURCE_CHUNKS": 4 + }, + "filters_by_layer": { + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C4_SEMANTIC_ROLES", + "query": "Какие компоненты участвуют в ControlPlaneService?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 12, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "Какие компоненты участвуют в ControlPlaneService?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Какие компоненты участвуют в ControlPlaneService?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C1_SYMBOL_CATALOG", + "query": "ControlPlaneService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Какие компоненты участвуют в ControlPlaneService?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 4, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 12, + "candidates_after_filter": 12 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 4, + "candidates_after_filter": 4 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "ControlPlaneService", + "alternatives": [ + "ControlPlaneService" + ] + }, + "layers": [ + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 12, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 8, + "fail_reason": null + }, + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 147, + "retrieval_by_layer": { + "C4_SEMANTIC_ROLES": 34, + "C3_ENTRYPOINTS": 14, + "C2_DEPENDENCY_GRAPH": 57, + "C1_SYMBOL_CATALOG": 25, + "C0_SOURCE_CHUNKS": 16 + }, + "merge_rank": 21 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Какие компоненты участвуют в ControlPlaneService?", + "rag_count": 25 + }, + "output": { + "llm_answer": "В подсистеме `ControlPlaneService` участвуют следующие компоненты и наблюдаются явные связи между ними:\n\n1. ControlPlaneService — главный компонент, создающий и инициализирующий другие компоненты:\n - Создаёт каналы (`_channels`) для передачи данных с помощью метода `_channels`.\n - Регистрирует каналы с помощью метода `register_channel`, который передаёт управление каналу.\n \n2. Каналы (_channels) — представляют собой элементы инфраструктуры для обмена данными внутри сервиса. Каналы создаются и регистрируются в `ControlPlaneService`. \n\nСвязи компонентов выражены следующим образом:\n- Контроллер службы создает и управляет каналами данных.\n- Каналы используются службой для передачи и приёма сообщений между различными частями системы.\n\nГраницы ответственности `ControlPlaneService` можно кратко описать так:\n- Управление жизненным циклом каналов данных.\n- Чтение и запись атрибутов состояния системы.\n- Участие в передаче данных между компонентами системы через зарегистрированные каналы." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 636, + "evidence_rows": 25, + "evidence_chars": 3723 + }, + "evidence_summary": [ + { + "layer": "C4_SEMANTIC_ROLES", + "count": 12, + "unique_paths": 11 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 8, + "unique_paths": 1 + }, + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_architecture_ru_v4", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 1604 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-architecture-control-plane.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-architecture-control-plane.md new file mode 100644 index 0000000..6606c62 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-architecture-control-plane.md @@ -0,0 +1,34 @@ +# plba-v2-architecture-control-plane + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Какие компоненты участвуют в ControlPlaneService? + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "ARCHITECTURE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 25, + "llm_answer": "В подсистеме `ControlPlaneService` участвуют следующие компоненты и наблюдаются явные связи между ними:\n\n1. ControlPlaneService — главный компонент, создающий и инициализирующий другие компоненты:\n - Создаёт каналы (`_channels`) для передачи данных с помощью метода `_channels`.\n - Регистрирует каналы с помощью метода `register_channel`, который передаёт управление каналу.\n \n2. Каналы (_channels) — представляют собой элементы инфраструктуры для обмена данными внутри сервиса. Каналы создаются и регистрируются в `ControlPlaneService`. \n\nСвязи компонентов выражены следующим образом:\n- Контроллер службы создает и управляет каналами данных.\n- Каналы используются службой для передачи и приёма сообщений между различными частями системы.\n\nГраницы ответственности `ControlPlaneService` можно кратко описать так:\n- Управление жизненным циклом каналов данных.\n- Чтение и запись атрибутов состояния системы.\n- Участие в передаче данных между компонентами системы через зарегистрированные каналы.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "ControlPlaneService" + ], + "layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-architecture-runtime-manager.json b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-architecture-runtime-manager.json new file mode 100644 index 0000000..dfae77c --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-architecture-runtime-manager.json @@ -0,0 +1,3036 @@ +{ + "case_id": "plba-v2-architecture-runtime-manager", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "ARCHITECTURE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 25, + "llm_answer": "В подсистеме RuntimeManager участвуют следующие компоненты и устанавливаются явные связи между ними:\n\n1. RuntimeManager:\n - Создаёт экземпляры других компонентов и управляет их жизненным циклом.\n - Регистрирует состояние атрибутов системы и его изменения.\n - Вызывает методы для обработки различных событий и состояний внутри системы.\n \n2. ControlActionSet:\n - Получает команды от RuntimeManager и выполняет действия модели на основе этих команд.\n\nСвязи между компонентами:\n- Создает: RuntimeManager создает экземпляр ControlActionSet при своем инициализации.\n- Регистрирует: RuntimeManager отслеживает текущее состояние атрибутов системы и может регистрировать изменения состояния.\n- Передаёт данные: RuntimeManager передает команды и события в ControlActionSet для выполнения соответствующих действий.\n\nГраницы ответственности:\n- RuntimeManager отвечает за координацию работы различных компонентов и управление жизненным циклом всей runtime-подсистемы.\n- ControlActionSet реализует модель поведения приложения и исполняет необходимые операции на основе полученных команд.\n\nЭти наблюдения основаны исключительно на выявленных зависимостях вызовов и зарегистрированных точках входа в коде, а также сигнатур и ролей компонентов.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-v2-architecture-runtime-manager", + "text": "Какие компоненты участвуют в RuntimeManager?", + "mode": "full_chain", + "run_started_at": "2026-03-12T14:36:36", + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Какие компоненты участвуют в RuntimeManager?", + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ], + "confidence": 0.99 + }, + "rag_count": 25, + "rag_rows": [ + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests manager\n- orchestrates role-like calls (4)\n- reads and writes state attributes\n- participates in dataflow slices (50)", + "layer": "C4_SEMANTIC_ROLES", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 43, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "symbol_name": "RuntimeManager", + "qname": "RuntimeManager", + "role": "pipeline_stage", + "confidence": 0.67, + "dataflow_participation": 50, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/queue/in_memory.py", + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)", + "layer": "C4_SEMANTIC_ROLES", + "title": "InMemoryTaskQueue", + "span_start": 9, + "span_end": 38, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 22, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "2da04cb94544a3bcbf0943a95ad4bdd8710bcafaa32a02fd0e4de2178dcf3533", + "symbol_name": "InMemoryTaskQueue", + "qname": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 9, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "58f0cc001ccda0eee4c6bc32ed83bd05eafd6b6644f1e8b4aa9eed3103db73dc", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "ConfigFileLoader\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (8)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ConfigFileLoader", + "span_start": 11, + "span_end": 48, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 23, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "a8474eca8b6e9dc86ae67ed68b16fa5fb639ef08739c053e7b7195489765667f", + "symbol_name": "ConfigFileLoader", + "qname": "ConfigFileLoader", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 8, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/store.py", + "content": "TraceContextStore\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "TraceContextStore", + "span_start": 15, + "span_end": 52, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b2dad4fbe16ffb11b58deba311c7739955c39d59f291b22181f33e9c8cce4059", + "symbol_name": "TraceContextStore", + "qname": "TraceContextStore", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "d369554f08fc92039c6edd5a2a1e73b23901533e8974459170bbd9347d263dc5", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workers/supervisor.py", + "content": "WorkerSupervisor\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkerSupervisor", + "span_start": 10, + "span_end": 59, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "c17b44e8d9e97d490989b21fa67d7c346cdda8a0472e4c41fb243c8846faa124", + "symbol_name": "WorkerSupervisor", + "qname": "WorkerSupervisor", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "77609d9d5927171cce7fc3a54897c183fd63068710c6362029b700937aae5eee", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 59, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1", + "dst_ref": "RuntimeManager.start", + "resolution": "resolved", + "slice_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.start" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 52, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager._register_core_services", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 127, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6", + "dst_ref": "RuntimeManager._register_core_services", + "resolution": "resolved", + "slice_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager._register_core_services" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager\nRuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "qname": "RuntimeManager", + "kind": "class", + "signature": "RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "В подсистеме RuntimeManager участвуют следующие компоненты и устанавливаются явные связи между ними:\n\n1. RuntimeManager:\n - Создаёт экземпляры других компонентов и управляет их жизненным циклом.\n - Регистрирует состояние атрибутов системы и его изменения.\n - Вызывает методы для обработки различных событий и состояний внутри системы.\n \n2. ControlActionSet:\n - Получает команды от RuntimeManager и выполняет действия модели на основе этих команд.\n\nСвязи между компонентами:\n- Создает: RuntimeManager создает экземпляр ControlActionSet при своем инициализации.\n- Регистрирует: RuntimeManager отслеживает текущее состояние атрибутов системы и может регистрировать изменения состояния.\n- Передаёт данные: RuntimeManager передает команды и события в ControlActionSet для выполнения соответствующих действий.\n\nГраницы ответственности:\n- RuntimeManager отвечает за координацию работы различных компонентов и управление жизненным циклом всей runtime-подсистемы.\n- ControlActionSet реализует модель поведения приложения и исполняет необходимые операции на основе полученных команд.\n\nЭти наблюдения основаны исключительно на выявленных зависимостях вызовов и зарегистрированных точках входа в коде, а также сигнатур и ролей компонентов.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "ARCHITECTURE", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS", + "C4_SEMANTIC_ROLES" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "ARCHITECTURE", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C4_SEMANTIC_ROLES": 12, + "C3_ENTRYPOINTS": 8, + "C2_DEPENDENCY_GRAPH": 8, + "C1_SYMBOL_CATALOG": 6, + "C0_SOURCE_CHUNKS": 4 + }, + "filters_by_layer": { + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C4_SEMANTIC_ROLES", + "query": "Какие компоненты участвуют в RuntimeManager?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 12, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "Какие компоненты участвуют в RuntimeManager?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Какие компоненты участвуют в RuntimeManager?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C1_SYMBOL_CATALOG", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Какие компоненты участвуют в RuntimeManager?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 4, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 12, + "candidates_after_filter": 12 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 4, + "candidates_after_filter": 4 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ] + }, + "layers": [ + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 12, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 8, + "fail_reason": null + }, + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 1, + "symbol_resolution": 0, + "retrieval_total": 168, + "retrieval_by_layer": { + "C4_SEMANTIC_ROLES": 41, + "C3_ENTRYPOINTS": 20, + "C2_DEPENDENCY_GRAPH": 64, + "C1_SYMBOL_CATALOG": 25, + "C0_SOURCE_CHUNKS": 16 + }, + "merge_rank": 22, + "prompt_build": 0, + "llm_call": 2183 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 628, + "evidence_rows": 25, + "evidence_chars": 8651 + }, + "evidence_summary": [ + { + "layer": "C4_SEMANTIC_ROLES", + "count": 12, + "unique_paths": 11 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 8, + "unique_paths": 2 + }, + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_architecture_ru_v4", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "RuntimeManager" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 25, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-v2-architecture-runtime-manager", + "mode": "full_chain", + "run_started_at": "2026-03-12T14:36:36", + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Какие компоненты участвуют в RuntimeManager?", + "normalized_query": "Какие компоненты участвуют в RuntimeManager?" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Какие компоненты участвуют в RuntimeManager?" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Какие компоненты участвуют в RuntimeManager?" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "ARCHITECTURE", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 1 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Какие компоненты участвуют в RuntimeManager?" + }, + "output": { + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ], + "confidence": 0.99 + }, + "rag_count": 25, + "rag_rows": [ + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests manager\n- orchestrates role-like calls (4)\n- reads and writes state attributes\n- participates in dataflow slices (50)", + "layer": "C4_SEMANTIC_ROLES", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 43, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "symbol_name": "RuntimeManager", + "qname": "RuntimeManager", + "role": "pipeline_stage", + "confidence": 0.67, + "dataflow_participation": 50, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/queue/in_memory.py", + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)", + "layer": "C4_SEMANTIC_ROLES", + "title": "InMemoryTaskQueue", + "span_start": 9, + "span_end": 38, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 22, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "2da04cb94544a3bcbf0943a95ad4bdd8710bcafaa32a02fd0e4de2178dcf3533", + "symbol_name": "InMemoryTaskQueue", + "qname": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 9, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "58f0cc001ccda0eee4c6bc32ed83bd05eafd6b6644f1e8b4aa9eed3103db73dc", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "ConfigFileLoader\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (8)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ConfigFileLoader", + "span_start": 11, + "span_end": 48, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 23, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "a8474eca8b6e9dc86ae67ed68b16fa5fb639ef08739c053e7b7195489765667f", + "symbol_name": "ConfigFileLoader", + "qname": "ConfigFileLoader", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 8, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/store.py", + "content": "TraceContextStore\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "TraceContextStore", + "span_start": 15, + "span_end": 52, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b2dad4fbe16ffb11b58deba311c7739955c39d59f291b22181f33e9c8cce4059", + "symbol_name": "TraceContextStore", + "qname": "TraceContextStore", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "d369554f08fc92039c6edd5a2a1e73b23901533e8974459170bbd9347d263dc5", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workers/supervisor.py", + "content": "WorkerSupervisor\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkerSupervisor", + "span_start": 10, + "span_end": 59, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "c17b44e8d9e97d490989b21fa67d7c346cdda8a0472e4c41fb243c8846faa124", + "symbol_name": "WorkerSupervisor", + "qname": "WorkerSupervisor", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "77609d9d5927171cce7fc3a54897c183fd63068710c6362029b700937aae5eee", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 59, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1", + "dst_ref": "RuntimeManager.start", + "resolution": "resolved", + "slice_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.start" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 52, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager._register_core_services", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 127, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6", + "dst_ref": "RuntimeManager._register_core_services", + "resolution": "resolved", + "slice_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager._register_core_services" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager\nRuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "qname": "RuntimeManager", + "kind": "class", + "signature": "RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C4_SEMANTIC_ROLES": 12, + "C3_ENTRYPOINTS": 8, + "C2_DEPENDENCY_GRAPH": 8, + "C1_SYMBOL_CATALOG": 6, + "C0_SOURCE_CHUNKS": 4 + }, + "filters_by_layer": { + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C4_SEMANTIC_ROLES", + "query": "Какие компоненты участвуют в RuntimeManager?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 12, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "Какие компоненты участвуют в RuntimeManager?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Какие компоненты участвуют в RuntimeManager?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C1_SYMBOL_CATALOG", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Какие компоненты участвуют в RuntimeManager?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 4, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 12, + "candidates_after_filter": 12 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 4, + "candidates_after_filter": 4 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ] + }, + "layers": [ + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 12, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 8, + "fail_reason": null + }, + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 168, + "retrieval_by_layer": { + "C4_SEMANTIC_ROLES": 41, + "C3_ENTRYPOINTS": 20, + "C2_DEPENDENCY_GRAPH": 64, + "C1_SYMBOL_CATALOG": 25, + "C0_SOURCE_CHUNKS": 16 + }, + "merge_rank": 22 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Какие компоненты участвуют в RuntimeManager?", + "rag_count": 25 + }, + "output": { + "llm_answer": "В подсистеме RuntimeManager участвуют следующие компоненты и устанавливаются явные связи между ними:\n\n1. RuntimeManager:\n - Создаёт экземпляры других компонентов и управляет их жизненным циклом.\n - Регистрирует состояние атрибутов системы и его изменения.\n - Вызывает методы для обработки различных событий и состояний внутри системы.\n \n2. ControlActionSet:\n - Получает команды от RuntimeManager и выполняет действия модели на основе этих команд.\n\nСвязи между компонентами:\n- Создает: RuntimeManager создает экземпляр ControlActionSet при своем инициализации.\n- Регистрирует: RuntimeManager отслеживает текущее состояние атрибутов системы и может регистрировать изменения состояния.\n- Передаёт данные: RuntimeManager передает команды и события в ControlActionSet для выполнения соответствующих действий.\n\nГраницы ответственности:\n- RuntimeManager отвечает за координацию работы различных компонентов и управление жизненным циклом всей runtime-подсистемы.\n- ControlActionSet реализует модель поведения приложения и исполняет необходимые операции на основе полученных команд.\n\nЭти наблюдения основаны исключительно на выявленных зависимостях вызовов и зарегистрированных точках входа в коде, а также сигнатур и ролей компонентов." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 628, + "evidence_rows": 25, + "evidence_chars": 8651 + }, + "evidence_summary": [ + { + "layer": "C4_SEMANTIC_ROLES", + "count": 12, + "unique_paths": 11 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 8, + "unique_paths": 2 + }, + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_architecture_ru_v4", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 2183 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-architecture-runtime-manager.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-architecture-runtime-manager.md new file mode 100644 index 0000000..67fb0d9 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-architecture-runtime-manager.md @@ -0,0 +1,34 @@ +# plba-v2-architecture-runtime-manager + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Какие компоненты участвуют в RuntimeManager? + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "ARCHITECTURE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 25, + "llm_answer": "В подсистеме RuntimeManager участвуют следующие компоненты и устанавливаются явные связи между ними:\n\n1. RuntimeManager:\n - Создаёт экземпляры других компонентов и управляет их жизненным циклом.\n - Регистрирует состояние атрибутов системы и его изменения.\n - Вызывает методы для обработки различных событий и состояний внутри системы.\n \n2. ControlActionSet:\n - Получает команды от RuntimeManager и выполняет действия модели на основе этих команд.\n\nСвязи между компонентами:\n- Создает: RuntimeManager создает экземпляр ControlActionSet при своем инициализации.\n- Регистрирует: RuntimeManager отслеживает текущее состояние атрибутов системы и может регистрировать изменения состояния.\n- Передаёт данные: RuntimeManager передает команды и события в ControlActionSet для выполнения соответствующих действий.\n\nГраницы ответственности:\n- RuntimeManager отвечает за координацию работы различных компонентов и управление жизненным циклом всей runtime-подсистемы.\n- ControlActionSet реализует модель поведения приложения и исполняет необходимые операции на основе полученных команд.\n\nЭти наблюдения основаны исключительно на выявленных зависимостях вызовов и зарегистрированных точках входа в коде, а также сигнатур и ролей компонентов.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-explain-create-runtime.json b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-explain-create-runtime.json new file mode 100644 index 0000000..9762172 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-explain-create-runtime.json @@ -0,0 +1,1896 @@ +{ + "case_id": "plba-v2-explain-create-runtime", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 12, + "llm_answer": "Функция `create_runtime` находится в файле `src/plba/bootstrap.py`. Она отвечает за инициализацию и настройку основного объекта управления (`RuntimeManager`), используемого для координации различных компонентов приложения.\n\nКонкретно, эта функция выполняет следующие действия:\n\n1. Создаёт новый объект типа `RuntimeManager`.\n2. При наличии указанного пути к конфигурационному файлу добавляет этот файл в runtime при помощи вызова метода `runtime.add_config_file()`.\n3. Если указано включение HTTP-контроля, регистрирует канал управления через класс `HttpControlChannel`, указывая параметры хоста, порта и тайм-аута.\n4. Регистрирует переданный модуль приложения (`module`) в runtime посредством вызова `runtime.register_module()`.\n5. Возвращает созданный экземпляр `RuntimeManager`.\n\nТаким образом, основная цель функции – настройка базовой инфраструктуры приложения, включая загрузку конфигурации и регистрацию модуля приложения, после чего возвращая готовый объект управления, позволяющий дальше управлять работой всех компонент системы.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "create_runtime" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-v2-explain-create-runtime", + "text": "Что делает функция create_runtime?", + "mode": "full_chain", + "run_started_at": "2026-03-12T14:36:36", + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Что делает функция create_runtime?", + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "create_runtime", + "alternatives": [ + "create_runtime" + ], + "confidence": 0.99 + }, + "rag_count": 12, + "rag_rows": [ + { + "path": "src/plba/bootstrap.py", + "content": "function create_runtime\ncreate_runtime(module)", + "layer": "C1_SYMBOL_CATALOG", + "title": "create_runtime", + "span_start": 8, + "span_end": 29, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "qname": "create_runtime", + "kind": "function", + "signature": "create_runtime(module)", + "parent_symbol_id": null, + "package_or_module": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime calls runtime.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:calls", + "span_start": 19, + "span_end": 19, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "4eaeec4ac55a59d5f66fd01c4754955f8fedaf4bc3df13fa769b352c7bfaacbb", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.add_config_file", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime reads_attr runtime.register_module", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:reads_attr", + "span_start": 28, + "span_end": 28, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "45516c79ff358dbf9b650a081668df0f66d2fe989300f985a1a78be6be166f8f", + "edge_type": "reads_attr", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.register_module", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:instantiates", + "span_start": 17, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "0adba17984f850ea1608c9e734d2dd5c325cfde3a8133123aa239e44935ad18e", + "edge_type": "instantiates", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": "27158ca220022eeb5083c6addf8a50775d45f7161284fd60aac48410105f4b98", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime calls runtime.register_module", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:calls", + "span_start": 28, + "span_end": 28, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "ab6003c3441addc1ba1b81edeca009165559f652f6b2cf424e5ae61b1f617de8", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.register_module", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime calls runtime.control_plane.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:calls", + "span_start": 21, + "span_end": 27, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "2678250030b9ce47a3b3b55fac7897ac530367edc8374ac9d5e6ecafb1e483f0", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.control_plane.register_channel", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime reads_attr runtime.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:reads_attr", + "span_start": 19, + "span_end": 19, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "30d4e8aae984ab84d523e80d02f1caeda52d547fa3d2aa47be8845931cabbca2", + "edge_type": "reads_attr", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.add_config_file", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "def create_runtime(\n module: ApplicationModule,\n *,\n config_path: str | None = None,\n enable_http_control: bool = False,\n control_host: str = \"127.0.0.1\",\n control_port: int = 8080,\n control_timeout: int = 5,\n) -> RuntimeManager:\n runtime = RuntimeManager()\n if config_path is not None:\n runtime.add_config_file(config_path)\n if enable_http_control:\n runtime.control_plane.register_channel(\n HttpControlChannel(\n host=control_host,\n port=control_port,\n timeout=control_timeout,\n )\n )\n runtime.register_module(module)\n return runtime", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/bootstrap.py:create_runtime", + "span_start": 8, + "span_end": 29, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "Функция `create_runtime` находится в файле `src/plba/bootstrap.py`. Она отвечает за инициализацию и настройку основного объекта управления (`RuntimeManager`), используемого для координации различных компонентов приложения.\n\nКонкретно, эта функция выполняет следующие действия:\n\n1. Создаёт новый объект типа `RuntimeManager`.\n2. При наличии указанного пути к конфигурационному файлу добавляет этот файл в runtime при помощи вызова метода `runtime.add_config_file()`.\n3. Если указано включение HTTP-контроля, регистрирует канал управления через класс `HttpControlChannel`, указывая параметры хоста, порта и тайм-аута.\n4. Регистрирует переданный модуль приложения (`module`) в runtime посредством вызова `runtime.register_module()`.\n5. Возвращает созданный экземпляр `RuntimeManager`.\n\nТаким образом, основная цель функции – настройка базовой инфраструктуры приложения, включая загрузку конфигурации и регистрацию модуля приложения, после чего возвращая готовый объект управления, позволяющий дальше управлять работой всех компонент системы.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS", + "C4_SEMANTIC_ROLES" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "function", + "symbol_candidates": [ + "create_runtime" + ], + "keyword_hints": [ + "create_runtime" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "create_runtime", + "alternatives": [ + "create_runtime" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 115, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 31, + "C0_SOURCE_CHUNKS": 14, + "C4_SEMANTIC_ROLES": 15, + "C2_DEPENDENCY_GRAPH": 43, + "C3_ENTRYPOINTS": 10 + }, + "merge_rank": 20, + "prompt_build": 0, + "llm_call": 1571 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 723, + "evidence_rows": 12, + "evidence_chars": 1184 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 1 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_explain_ru_v4", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "create_runtime" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 12, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-v2-explain-create-runtime", + "mode": "full_chain", + "run_started_at": "2026-03-12T14:36:36", + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Что делает функция create_runtime?", + "normalized_query": "Что делает функция create_runtime?" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Что делает функция create_runtime?" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Что делает функция create_runtime?" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "function", + "symbol_candidates": [ + "create_runtime" + ], + "keyword_hints": [ + "create_runtime" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Что делает функция create_runtime?" + }, + "output": { + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "create_runtime", + "alternatives": [ + "create_runtime" + ], + "confidence": 0.99 + }, + "rag_count": 12, + "rag_rows": [ + { + "path": "src/plba/bootstrap.py", + "content": "function create_runtime\ncreate_runtime(module)", + "layer": "C1_SYMBOL_CATALOG", + "title": "create_runtime", + "span_start": 8, + "span_end": 29, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "qname": "create_runtime", + "kind": "function", + "signature": "create_runtime(module)", + "parent_symbol_id": null, + "package_or_module": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime calls runtime.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:calls", + "span_start": 19, + "span_end": 19, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "4eaeec4ac55a59d5f66fd01c4754955f8fedaf4bc3df13fa769b352c7bfaacbb", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.add_config_file", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime reads_attr runtime.register_module", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:reads_attr", + "span_start": 28, + "span_end": 28, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "45516c79ff358dbf9b650a081668df0f66d2fe989300f985a1a78be6be166f8f", + "edge_type": "reads_attr", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.register_module", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:instantiates", + "span_start": 17, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "0adba17984f850ea1608c9e734d2dd5c325cfde3a8133123aa239e44935ad18e", + "edge_type": "instantiates", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": "27158ca220022eeb5083c6addf8a50775d45f7161284fd60aac48410105f4b98", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime calls runtime.register_module", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:calls", + "span_start": 28, + "span_end": 28, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "ab6003c3441addc1ba1b81edeca009165559f652f6b2cf424e5ae61b1f617de8", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.register_module", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime calls runtime.control_plane.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:calls", + "span_start": 21, + "span_end": 27, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "2678250030b9ce47a3b3b55fac7897ac530367edc8374ac9d5e6ecafb1e483f0", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.control_plane.register_channel", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime reads_attr runtime.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:reads_attr", + "span_start": 19, + "span_end": 19, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "30d4e8aae984ab84d523e80d02f1caeda52d547fa3d2aa47be8845931cabbca2", + "edge_type": "reads_attr", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.add_config_file", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "def create_runtime(\n module: ApplicationModule,\n *,\n config_path: str | None = None,\n enable_http_control: bool = False,\n control_host: str = \"127.0.0.1\",\n control_port: int = 8080,\n control_timeout: int = 5,\n) -> RuntimeManager:\n runtime = RuntimeManager()\n if config_path is not None:\n runtime.add_config_file(config_path)\n if enable_http_control:\n runtime.control_plane.register_channel(\n HttpControlChannel(\n host=control_host,\n port=control_port,\n timeout=control_timeout,\n )\n )\n runtime.register_module(module)\n return runtime", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/bootstrap.py:create_runtime", + "span_start": 8, + "span_end": 29, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "create_runtime", + "alternatives": [ + "create_runtime" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 115, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 31, + "C0_SOURCE_CHUNKS": 14, + "C4_SEMANTIC_ROLES": 15, + "C2_DEPENDENCY_GRAPH": 43, + "C3_ENTRYPOINTS": 10 + }, + "merge_rank": 20 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Что делает функция create_runtime?", + "rag_count": 12 + }, + "output": { + "llm_answer": "Функция `create_runtime` находится в файле `src/plba/bootstrap.py`. Она отвечает за инициализацию и настройку основного объекта управления (`RuntimeManager`), используемого для координации различных компонентов приложения.\n\nКонкретно, эта функция выполняет следующие действия:\n\n1. Создаёт новый объект типа `RuntimeManager`.\n2. При наличии указанного пути к конфигурационному файлу добавляет этот файл в runtime при помощи вызова метода `runtime.add_config_file()`.\n3. Если указано включение HTTP-контроля, регистрирует канал управления через класс `HttpControlChannel`, указывая параметры хоста, порта и тайм-аута.\n4. Регистрирует переданный модуль приложения (`module`) в runtime посредством вызова `runtime.register_module()`.\n5. Возвращает созданный экземпляр `RuntimeManager`.\n\nТаким образом, основная цель функции – настройка базовой инфраструктуры приложения, включая загрузку конфигурации и регистрацию модуля приложения, после чего возвращая готовый объект управления, позволяющий дальше управлять работой всех компонент системы." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 723, + "evidence_rows": 12, + "evidence_chars": 1184 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 1 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_explain_ru_v4", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 1571 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-explain-create-runtime.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-explain-create-runtime.md new file mode 100644 index 0000000..a36bb33 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-explain-create-runtime.md @@ -0,0 +1,34 @@ +# plba-v2-explain-create-runtime + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Что делает функция create_runtime? + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 12, + "llm_answer": "Функция `create_runtime` находится в файле `src/plba/bootstrap.py`. Она отвечает за инициализацию и настройку основного объекта управления (`RuntimeManager`), используемого для координации различных компонентов приложения.\n\nКонкретно, эта функция выполняет следующие действия:\n\n1. Создаёт новый объект типа `RuntimeManager`.\n2. При наличии указанного пути к конфигурационному файлу добавляет этот файл в runtime при помощи вызова метода `runtime.add_config_file()`.\n3. Если указано включение HTTP-контроля, регистрирует канал управления через класс `HttpControlChannel`, указывая параметры хоста, порта и тайм-аута.\n4. Регистрирует переданный модуль приложения (`module`) в runtime посредством вызова `runtime.register_module()`.\n5. Возвращает созданный экземпляр `RuntimeManager`.\n\nТаким образом, основная цель функции – настройка базовой инфраструктуры приложения, включая загрузку конфигурации и регистрацию модуля приложения, после чего возвращая готовый объект управления, позволяющий дальше управлять работой всех компонент системы.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "create_runtime" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-explain-local-http-channel.json b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-explain-local-http-channel.json new file mode 100644 index 0000000..9449ee1 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-explain-local-http-channel.json @@ -0,0 +1,1333 @@ +{ + "case_id": "plba-v2-explain-local-http-channel", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN_LOCAL", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 6, + "llm_answer": "Класс `HttpControlChannel` реализует механизм управления HTTP-каналом для взаимодействия с внешним окружением приложения.\nЧто он делает:\n- При инициализации (`__init__`) создается объект, принимающий параметры хоста, порта и тайм-аута. Он устанавливает свойства `_timeout`, создает внутренний сервер через объект `UvicornThreadRunner` и фабрику приложений `HttpControlAppFactory`.\n \n- Метод `start(actions)` запускает приложение с заданным набором действий (`ControlActionSet`), если они предоставлены. Это включает создание приложения и его запуск с помощью внутреннего сервера.\n\n- Метод `stop()` останавливает запущенное ранее приложение.\n\n- Методы `_health_response` и `_action_response` обеспечивают обработку запросов от клиентов. Первый возвращает статус здоровья канала (здорово ли приложение), второй обрабатывает запросы конкретных действий.\nКлючевые детали:\n- Тайм-аут задается явно при создании объекта и используется для ограничения времени ожидания ответов на запросы.\n- Внутренний сервер реализован через `UvicornThreadRunner`, что позволяет удобно запускать и останавливать HTTP-сервер в многопоточной среде.\n- Канал поддерживает два типа клиентских запросов: запрос статуса здоровья и запрос выполнения конкретного действия.\n\nТаким образом, класс предоставляет простой интерфейс для запуска и остановки HTTP-сервера, а также обработки запросов, связанных с управлением состоянием приложения.", + "answer_mode": "answered", + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "symbol_candidates": [ + "HttpControlChannel" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C2_DEPENDENCY_GRAPH" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-v2-explain-local-http-channel", + "text": "Почему в файле src/app_runtime/control/http_channel.py класс HttpControlChannel устроен так?", + "mode": "full_chain", + "run_started_at": "2026-03-12T14:36:36", + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Почему в файле src/app_runtime/control/http_channel.py класс HttpControlChannel устроен так?", + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "HttpControlChannel", + "alternatives": [ + "HttpControlChannel" + ], + "confidence": 0.99 + }, + "rag_count": 6, + "rag_rows": [ + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel\nHttpControlChannel(ControlChannel)", + "layer": "C1_SYMBOL_CATALOG", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "qname": "HttpControlChannel", + "kind": "class", + "signature": "HttpControlChannel(ControlChannel)", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._timeout\n -> HttpControlChannel._action_response", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "c3ef21fcae96c82c00be74b3ab827d4af2085d89cb3fa5521c19a174aad84dbb", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "e64969024ccaeb34d8d91473fad07b3b3d341875846392e7a006406c7ada1954", + "dst_ref": "HttpControlChannel._action_response", + "resolution": "resolved", + "slice_id": "c3ef21fcae96c82c00be74b3ab827d4af2085d89cb3fa5521c19a174aad84dbb", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._timeout", + "HttpControlChannel._action_response" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "e64969024ccaeb34d8d91473fad07b3b3d341875846392e7a006406c7ada1954" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._runner\n -> HttpControlChannel.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 15, + "span_end": 22, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "51d73913df709152258ed1b9a8c8f4eb3c575eccfe6b982aef0b28e0789a29da", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0", + "dst_ref": "HttpControlChannel.start", + "resolution": "resolved", + "slice_id": "51d73913df709152258ed1b9a8c8f4eb3c575eccfe6b982aef0b28e0789a29da", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._runner", + "HttpControlChannel.start" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._timeout\n -> HttpControlChannel._health_response", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 14, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "f858f5c9e575f6c4cdfe3853571b7ee21d1f628a443541d2037c3dc9d0790bef", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "e84bf04e9cd2127df235b7064d05f47e19f19a89c7c82f4c247231d4e8fa426a", + "dst_ref": "HttpControlChannel._health_response", + "resolution": "resolved", + "slice_id": "f858f5c9e575f6c4cdfe3853571b7ee21d1f628a443541d2037c3dc9d0790bef", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._timeout", + "HttpControlChannel._health_response" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "e84bf04e9cd2127df235b7064d05f47e19f19a89c7c82f4c247231d4e8fa426a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._runner\n -> HttpControlChannel.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 15, + "span_end": 25, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "0f827ef81a990258a8a74381c8564a8361afa6712dba3200592659c939adcb9d", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "f29ab212620093d72be20e26c5a399624c7939a6056a728762ed3f84a250bfa3", + "dst_ref": "HttpControlChannel.stop", + "resolution": "resolved", + "slice_id": "0f827ef81a990258a8a74381c8564a8361afa6712dba3200592659c939adcb9d", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._runner", + "HttpControlChannel.stop" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "f29ab212620093d72be20e26c5a399624c7939a6056a728762ed3f84a250bfa3" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel(ControlChannel):\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._timeout = timeout\n self._runner = UvicornThreadRunner(host, port, timeout)\n self._factory = HttpControlAppFactory()\n self._actions: ControlActionSet | None = None\n\n async def start(self, actions: ControlActionSet) -> None:\n self._actions = actions\n app = self._factory.create(self._health_response, self._action_response)\n await self._runner.start(app)\n\n async def stop(self) -> None:\n await self._runner.stop()\n\n @property\n def port(self) -> int:\n return self._runner.port\n\n async def _health_response(self) -> dict[str, object]:\n if self._actions is None:\n return {\"status\": \"unhealthy\", \"detail\": \"control actions are not configured\"}\n return await asyncio.wait_for(self._actions.health(), timeout=float(self._timeout))\n\n async def _action_response(self, action: str, _client_source: str = \"unknown\") -> JSONResponse:\n if self._actions is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"{action} handler is not configured\"}, status_code=404)\n callbacks = {\n \"start\": self._actions.start,\n \"stop\": self._actions.stop,\n \"status\": self._actions.status,\n }\n callback = callbacks.get(action)\n if callback is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"unsupported action: {action}\"}, status_code=404)\n action_timeout = max(float(self._timeout), 10.0) if action in {\"start\", \"stop\"} else float(self._timeout)\n try:\n detail = await asyncio.wait_for(callback(), timeout=action_timeout)\n except asyncio.TimeoutError:\n return JSONResponse(\n content={\"status\": \"accepted\", \"detail\": f\"{action} operation is still in progress\"},\n status_code=202,\n )\n except Exception as exc:\n return JSONResponse(content={\"status\": \"error\", \"detail\": str(exc)}, status_code=500)\n return JSONResponse(content={\"status\": \"ok\", \"detail\": detail or f\"{action} action accepted\"}, status_code=200)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_channel.py:HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "Класс `HttpControlChannel` реализует механизм управления HTTP-каналом для взаимодействия с внешним окружением приложения.\nЧто он делает:\n- При инициализации (`__init__`) создается объект, принимающий параметры хоста, порта и тайм-аута. Он устанавливает свойства `_timeout`, создает внутренний сервер через объект `UvicornThreadRunner` и фабрику приложений `HttpControlAppFactory`.\n \n- Метод `start(actions)` запускает приложение с заданным набором действий (`ControlActionSet`), если они предоставлены. Это включает создание приложения и его запуск с помощью внутреннего сервера.\n\n- Метод `stop()` останавливает запущенное ранее приложение.\n\n- Методы `_health_response` и `_action_response` обеспечивают обработку запросов от клиентов. Первый возвращает статус здоровья канала (здорово ли приложение), второй обрабатывает запросы конкретных действий.\nКлючевые детали:\n- Тайм-аут задается явно при создании объекта и используется для ограничения времени ожидания ответов на запросы.\n- Внутренний сервер реализован через `UvicornThreadRunner`, что позволяет удобно запускать и останавливать HTTP-сервер в многопоточной среде.\n- Канал поддерживает два типа клиентских запросов: запрос статуса здоровья и запрос выполнения конкретного действия.\n\nТаким образом, класс предоставляет простой интерфейс для запуска и остановки HTTP-сервера, а также обработки запросов, связанных с управлением состоянием приложения.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN_LOCAL", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN_LOCAL", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C2_DEPENDENCY_GRAPH" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "HttpControlChannel" + ], + "keyword_hints": [ + "src/app_runtime/control/http_channel.py", + "HttpControlChannel" + ], + "path_hints": [ + "src/app_runtime/control/http_channel.py" + ], + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C2_DEPENDENCY_GRAPH" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 12, + "C2_DEPENDENCY_GRAPH": 4 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "HttpControlChannel", + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Почему в файле src/app_runtime/control/http_channel.py класс HttpControlChannel устроен так?", + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 12, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Почему в файле src/app_runtime/control/http_channel.py класс HttpControlChannel устроен так?", + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 4, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 4, + "candidates_after_filter": 4 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "HttpControlChannel", + "alternatives": [ + "HttpControlChannel" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 4, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 1, + "symbol_resolution": 0, + "retrieval_total": 77, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 31, + "C0_SOURCE_CHUNKS": 24, + "C2_DEPENDENCY_GRAPH": 21 + }, + "merge_rank": 28, + "prompt_build": 0, + "llm_call": 2074 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 898, + "evidence_rows": 6, + "evidence_chars": 2660 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 4, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_explain_local_ru_v4", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "src/app_runtime/control/http_channel.py", + "HttpControlChannel" + ], + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ] + }, + "llm": { + "used_evidence_count": 6, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-v2-explain-local-http-channel", + "mode": "full_chain", + "run_started_at": "2026-03-12T14:36:36", + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Почему в файле src/app_runtime/control/http_channel.py класс HttpControlChannel устроен так?", + "normalized_query": "Почему в файле src/app_runtime/control/http_channel.py класс HttpControlChannel устроен так?" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Почему в файле src/app_runtime/control/http_channel.py класс HttpControlChannel устроен так?" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Почему в файле src/app_runtime/control/http_channel.py класс HttpControlChannel устроен так?" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN_LOCAL", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C2_DEPENDENCY_GRAPH" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "HttpControlChannel" + ], + "keyword_hints": [ + "src/app_runtime/control/http_channel.py", + "HttpControlChannel" + ], + "path_hints": [ + "src/app_runtime/control/http_channel.py" + ], + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 1 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Почему в файле src/app_runtime/control/http_channel.py класс HttpControlChannel устроен так?" + }, + "output": { + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "HttpControlChannel", + "alternatives": [ + "HttpControlChannel" + ], + "confidence": 0.99 + }, + "rag_count": 6, + "rag_rows": [ + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel\nHttpControlChannel(ControlChannel)", + "layer": "C1_SYMBOL_CATALOG", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "qname": "HttpControlChannel", + "kind": "class", + "signature": "HttpControlChannel(ControlChannel)", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._timeout\n -> HttpControlChannel._action_response", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "c3ef21fcae96c82c00be74b3ab827d4af2085d89cb3fa5521c19a174aad84dbb", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "e64969024ccaeb34d8d91473fad07b3b3d341875846392e7a006406c7ada1954", + "dst_ref": "HttpControlChannel._action_response", + "resolution": "resolved", + "slice_id": "c3ef21fcae96c82c00be74b3ab827d4af2085d89cb3fa5521c19a174aad84dbb", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._timeout", + "HttpControlChannel._action_response" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "e64969024ccaeb34d8d91473fad07b3b3d341875846392e7a006406c7ada1954" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._runner\n -> HttpControlChannel.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 15, + "span_end": 22, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "51d73913df709152258ed1b9a8c8f4eb3c575eccfe6b982aef0b28e0789a29da", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0", + "dst_ref": "HttpControlChannel.start", + "resolution": "resolved", + "slice_id": "51d73913df709152258ed1b9a8c8f4eb3c575eccfe6b982aef0b28e0789a29da", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._runner", + "HttpControlChannel.start" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._timeout\n -> HttpControlChannel._health_response", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 14, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "f858f5c9e575f6c4cdfe3853571b7ee21d1f628a443541d2037c3dc9d0790bef", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "e84bf04e9cd2127df235b7064d05f47e19f19a89c7c82f4c247231d4e8fa426a", + "dst_ref": "HttpControlChannel._health_response", + "resolution": "resolved", + "slice_id": "f858f5c9e575f6c4cdfe3853571b7ee21d1f628a443541d2037c3dc9d0790bef", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._timeout", + "HttpControlChannel._health_response" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "e84bf04e9cd2127df235b7064d05f47e19f19a89c7c82f4c247231d4e8fa426a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._runner\n -> HttpControlChannel.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 15, + "span_end": 25, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "0f827ef81a990258a8a74381c8564a8361afa6712dba3200592659c939adcb9d", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "f29ab212620093d72be20e26c5a399624c7939a6056a728762ed3f84a250bfa3", + "dst_ref": "HttpControlChannel.stop", + "resolution": "resolved", + "slice_id": "0f827ef81a990258a8a74381c8564a8361afa6712dba3200592659c939adcb9d", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._runner", + "HttpControlChannel.stop" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "f29ab212620093d72be20e26c5a399624c7939a6056a728762ed3f84a250bfa3" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel(ControlChannel):\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._timeout = timeout\n self._runner = UvicornThreadRunner(host, port, timeout)\n self._factory = HttpControlAppFactory()\n self._actions: ControlActionSet | None = None\n\n async def start(self, actions: ControlActionSet) -> None:\n self._actions = actions\n app = self._factory.create(self._health_response, self._action_response)\n await self._runner.start(app)\n\n async def stop(self) -> None:\n await self._runner.stop()\n\n @property\n def port(self) -> int:\n return self._runner.port\n\n async def _health_response(self) -> dict[str, object]:\n if self._actions is None:\n return {\"status\": \"unhealthy\", \"detail\": \"control actions are not configured\"}\n return await asyncio.wait_for(self._actions.health(), timeout=float(self._timeout))\n\n async def _action_response(self, action: str, _client_source: str = \"unknown\") -> JSONResponse:\n if self._actions is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"{action} handler is not configured\"}, status_code=404)\n callbacks = {\n \"start\": self._actions.start,\n \"stop\": self._actions.stop,\n \"status\": self._actions.status,\n }\n callback = callbacks.get(action)\n if callback is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"unsupported action: {action}\"}, status_code=404)\n action_timeout = max(float(self._timeout), 10.0) if action in {\"start\", \"stop\"} else float(self._timeout)\n try:\n detail = await asyncio.wait_for(callback(), timeout=action_timeout)\n except asyncio.TimeoutError:\n return JSONResponse(\n content={\"status\": \"accepted\", \"detail\": f\"{action} operation is still in progress\"},\n status_code=202,\n )\n except Exception as exc:\n return JSONResponse(content={\"status\": \"error\", \"detail\": str(exc)}, status_code=500)\n return JSONResponse(content={\"status\": \"ok\", \"detail\": detail or f\"{action} action accepted\"}, status_code=200)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_channel.py:HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C2_DEPENDENCY_GRAPH" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 12, + "C2_DEPENDENCY_GRAPH": 4 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "HttpControlChannel", + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Почему в файле src/app_runtime/control/http_channel.py класс HttpControlChannel устроен так?", + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 12, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Почему в файле src/app_runtime/control/http_channel.py класс HttpControlChannel устроен так?", + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 4, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 4, + "candidates_after_filter": 4 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "HttpControlChannel", + "alternatives": [ + "HttpControlChannel" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 4, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 77, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 31, + "C0_SOURCE_CHUNKS": 24, + "C2_DEPENDENCY_GRAPH": 21 + }, + "merge_rank": 28 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Почему в файле src/app_runtime/control/http_channel.py класс HttpControlChannel устроен так?", + "rag_count": 6 + }, + "output": { + "llm_answer": "Класс `HttpControlChannel` реализует механизм управления HTTP-каналом для взаимодействия с внешним окружением приложения.\nЧто он делает:\n- При инициализации (`__init__`) создается объект, принимающий параметры хоста, порта и тайм-аута. Он устанавливает свойства `_timeout`, создает внутренний сервер через объект `UvicornThreadRunner` и фабрику приложений `HttpControlAppFactory`.\n \n- Метод `start(actions)` запускает приложение с заданным набором действий (`ControlActionSet`), если они предоставлены. Это включает создание приложения и его запуск с помощью внутреннего сервера.\n\n- Метод `stop()` останавливает запущенное ранее приложение.\n\n- Методы `_health_response` и `_action_response` обеспечивают обработку запросов от клиентов. Первый возвращает статус здоровья канала (здорово ли приложение), второй обрабатывает запросы конкретных действий.\nКлючевые детали:\n- Тайм-аут задается явно при создании объекта и используется для ограничения времени ожидания ответов на запросы.\n- Внутренний сервер реализован через `UvicornThreadRunner`, что позволяет удобно запускать и останавливать HTTP-сервер в многопоточной среде.\n- Канал поддерживает два типа клиентских запросов: запрос статуса здоровья и запрос выполнения конкретного действия.\n\nТаким образом, класс предоставляет простой интерфейс для запуска и остановки HTTP-сервера, а также обработки запросов, связанных с управлением состоянием приложения." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 898, + "evidence_rows": 6, + "evidence_chars": 2660 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 4, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_explain_local_ru_v4", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 2074 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-explain-local-http-channel.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-explain-local-http-channel.md new file mode 100644 index 0000000..bbc699b --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-explain-local-http-channel.md @@ -0,0 +1,34 @@ +# plba-v2-explain-local-http-channel + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Почему в файле src/app_runtime/control/http_channel.py класс HttpControlChannel устроен так? + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "EXPLAIN_LOCAL", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 6, + "llm_answer": "Класс `HttpControlChannel` реализует механизм управления HTTP-каналом для взаимодействия с внешним окружением приложения.\nЧто он делает:\n- При инициализации (`__init__`) создается объект, принимающий параметры хоста, порта и тайм-аута. Он устанавливает свойства `_timeout`, создает внутренний сервер через объект `UvicornThreadRunner` и фабрику приложений `HttpControlAppFactory`.\n \n- Метод `start(actions)` запускает приложение с заданным набором действий (`ControlActionSet`), если они предоставлены. Это включает создание приложения и его запуск с помощью внутреннего сервера.\n\n- Метод `stop()` останавливает запущенное ранее приложение.\n\n- Методы `_health_response` и `_action_response` обеспечивают обработку запросов от клиентов. Первый возвращает статус здоровья канала (здорово ли приложение), второй обрабатывает запросы конкретных действий.\nКлючевые детали:\n- Тайм-аут задается явно при создании объекта и используется для ограничения времени ожидания ответов на запросы.\n- Внутренний сервер реализован через `UvicornThreadRunner`, что позволяет удобно запускать и останавливать HTTP-сервер в многопоточной среде.\n- Канал поддерживает два типа клиентских запросов: запрос статуса здоровья и запрос выполнения конкретного действия.\n\nТаким образом, класс предоставляет простой интерфейс для запуска и остановки HTTP-сервера, а также обработки запросов, связанных с управлением состоянием приложения.", + "answer_mode": "answered", + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "symbol_candidates": [ + "HttpControlChannel" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C2_DEPENDENCY_GRAPH" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-explain-nonexistent-symbol.json b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-explain-nonexistent-symbol.json new file mode 100644 index 0000000..69d56a0 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-explain-nonexistent-symbol.json @@ -0,0 +1,1169 @@ +{ + "case_id": "plba-v2-explain-nonexistent-symbol", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 0, + "llm_answer": "Сущность RuntimeFactoryManager не найдена в доступном коде. Близкие совпадения: ControlChannel, ControlActionSet.", + "answer_mode": "degraded", + "path_scope": [], + "symbol_candidates": [ + "RuntimeFactoryManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-v2-explain-nonexistent-symbol", + "text": "Объясни класс RuntimeFactoryManager", + "mode": "full_chain", + "run_started_at": "2026-03-12T14:36:36", + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни класс RuntimeFactoryManager", + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "ControlChannel", + "ControlActionSet" + ], + "confidence": 0.0 + }, + "rag_count": 0, + "rag_rows": [], + "llm_answer": "Сущность RuntimeFactoryManager не найдена в доступном коде. Близкие совпадения: ControlChannel, ControlActionSet.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [], + "evidence_sufficient": false + }, + "llm": { + "answer_status": "degraded", + "groundedness": "weakly_grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "RuntimeFactoryManager" + ], + "keyword_hints": [ + "RuntimeFactoryManager" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": null, + "workspace_id": null, + "returned_repo_ids": [], + "returned_workspace_ids": [] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "RuntimeFactoryManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "RuntimeFactoryManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "RuntimeFactoryManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "RuntimeFactoryManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "RuntimeFactoryManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 2, + "candidates_after_filter": 2 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "ControlChannel", + "ControlActionSet" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "miss", + "hit_count": 0, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "miss", + "hit_count": 0, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "miss", + "hit_count": 0, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "miss", + "hit_count": 0, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "miss", + "hit_count": 0, + "fail_reason": null + } + ] + }, + "constraint_violations": [ + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C1_SYMBOL_CATALOG", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + }, + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C0_SOURCE_CHUNKS", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + }, + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C4_SEMANTIC_ROLES", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + }, + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C2_DEPENDENCY_GRAPH", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + }, + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C3_ENTRYPOINTS", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + }, + { + "type": "SYMBOL_RESOLUTION_FAILED", + "severity": "warn", + "details": { + "status": "not_found", + "symbol_candidates": [ + "RuntimeFactoryManager" + ] + }, + "suggested_fix": "Increase symbol layer budget or improve fuzzy symbol resolution settings." + } + ], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 139, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 34, + "C0_SOURCE_CHUNKS": 18, + "C4_SEMANTIC_ROLES": 15, + "C2_DEPENDENCY_GRAPH": 57, + "C3_ENTRYPOINTS": 12 + }, + "merge_rank": 0, + "prompt_build": 0, + "llm_call": 0 + }, + "prompt": null, + "answer_policy": { + "short_circuit": true, + "answer_mode": "degraded", + "failure_reason": "symbol_not_found" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "RuntimeFactoryManager" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 0, + "missing_evidence_reason": "symbol_not_found" + } + }, + "run_info": { + "case_id": "plba-v2-explain-nonexistent-symbol", + "mode": "full_chain", + "run_started_at": "2026-03-12T14:36:36", + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Объясни класс RuntimeFactoryManager", + "normalized_query": "Объясни класс RuntimeFactoryManager" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Объясни класс RuntimeFactoryManager" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни класс RuntimeFactoryManager" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "RuntimeFactoryManager" + ], + "keyword_hints": [ + "RuntimeFactoryManager" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Объясни класс RuntimeFactoryManager" + }, + "output": { + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "ControlChannel", + "ControlActionSet" + ], + "confidence": 0.0 + }, + "rag_count": 0, + "rag_rows": [] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": null, + "workspace_id": null, + "returned_repo_ids": [], + "returned_workspace_ids": [] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "RuntimeFactoryManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "RuntimeFactoryManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "RuntimeFactoryManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "RuntimeFactoryManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "RuntimeFactoryManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 2, + "candidates_after_filter": 2 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "ControlChannel", + "ControlActionSet" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "miss", + "hit_count": 0, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "miss", + "hit_count": 0, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "miss", + "hit_count": 0, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "miss", + "hit_count": 0, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "miss", + "hit_count": 0, + "fail_reason": null + } + ] + }, + "constraint_violations": [ + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C1_SYMBOL_CATALOG", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + }, + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C0_SOURCE_CHUNKS", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + }, + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C4_SEMANTIC_ROLES", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + }, + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C2_DEPENDENCY_GRAPH", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + }, + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C3_ENTRYPOINTS", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + }, + { + "type": "SYMBOL_RESOLUTION_FAILED", + "severity": "warn", + "details": { + "status": "not_found", + "symbol_candidates": [ + "RuntimeFactoryManager" + ] + }, + "suggested_fix": "Increase symbol layer budget or improve fuzzy symbol resolution settings." + } + ], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 139, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 34, + "C0_SOURCE_CHUNKS": 18, + "C4_SEMANTIC_ROLES": 15, + "C2_DEPENDENCY_GRAPH": 57, + "C3_ENTRYPOINTS": 12 + }, + "merge_rank": 0 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Объясни класс RuntimeFactoryManager", + "rag_count": 0 + }, + "output": { + "llm_answer": "Сущность RuntimeFactoryManager не найдена в доступном коде. Близкие совпадения: ControlChannel, ControlActionSet." + }, + "diagnostics": { + "prompt": null, + "timings_ms": { + "prompt_build": 0, + "llm_call": 0 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-explain-nonexistent-symbol.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-explain-nonexistent-symbol.md new file mode 100644 index 0000000..56d307f --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-explain-nonexistent-symbol.md @@ -0,0 +1,34 @@ +# plba-v2-explain-nonexistent-symbol + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Объясни класс RuntimeFactoryManager + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 0, + "llm_answer": "Сущность RuntimeFactoryManager не найдена в доступном коде. Близкие совпадения: ControlChannel, ControlActionSet.", + "answer_mode": "degraded", + "path_scope": [], + "symbol_candidates": [ + "RuntimeFactoryManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-explain-runtime-manager.json b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-explain-runtime-manager.json new file mode 100644 index 0000000..2f9d1b9 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-explain-runtime-manager.json @@ -0,0 +1,2088 @@ +{ + "case_id": "plba-v2-explain-runtime-manager", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 12, + "llm_answer": "Класс `RuntimeManager` выглядит как менеджер жизненного цикла и координатор для различных компонентов в приложении runtime. Судя по предоставленным данным, он работает как центрального управляющего элемента, координирующего действия других сервисов и модулей.\nОсновные характеристики класса:\n- Инициализация происходит через конструктор (`__init__`), которому передаются различные компоненты приложения (конфигурации, службы, регистраторы трассировок, системы здоровья, логгеры и супервайзеры рабочих процессов).\n \n- В конструкторе устанавливаются начальные значения полей и создаются внутренние структуры данных, такие как `registry`, представляющий собой модульный регистр служб.\n\n- Класс содержит два основных состояния управления:\n - `_state`: отслеживает текущее состояние жизненного цикла менеджера (например, IDLE, RUNNING).\n - `_core_registered`: флаг, указывающий, зарегистрированы ли основные сервисы.\n - `_workers_registered`: флаг, показывающий, зарегистрированы ли рабочие процессы.\n\n- Реализован метод регистрации модуля (`register_module`), позволяющий добавлять новые модули в систему.\n\nНа основании имеющихся доказательств можно предположить следующие функции:\n- Координация запуска и остановки всех зарегистрированных служб и рабочих процессов.\n- Управление жизненным циклом приложения (запуск, остановка, переход между стадиями выполнения).\n- Регистрация новых модулей и их интеграция в общую инфраструктуру.\n\nОднако точная логика поведения и детальная реализация некоторых методов (таких как `register_module`) скрыты от прямого просмотра, поэтому возможны дополнительные детали, которые не учтены здесь.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-v2-explain-runtime-manager", + "text": "Объясни как работает класс RuntimeManager", + "mode": "full_chain", + "run_started_at": "2026-03-12T14:36:36", + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни как работает класс RuntimeManager", + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ], + "confidence": 0.99 + }, + "rag_count": 12, + "rag_rows": [ + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager\nRuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "qname": "RuntimeManager", + "kind": "class", + "signature": "RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests manager\n- orchestrates role-like calls (4)\n- reads and writes state attributes\n- participates in dataflow slices (50)", + "layer": "C4_SEMANTIC_ROLES", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 43, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "symbol_name": "RuntimeManager", + "qname": "RuntimeManager", + "role": "pipeline_stage", + "confidence": 0.67, + "dataflow_participation": 50, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 52, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "Класс `RuntimeManager` выглядит как менеджер жизненного цикла и координатор для различных компонентов в приложении runtime. Судя по предоставленным данным, он работает как центрального управляющего элемента, координирующего действия других сервисов и модулей.\nОсновные характеристики класса:\n- Инициализация происходит через конструктор (`__init__`), которому передаются различные компоненты приложения (конфигурации, службы, регистраторы трассировок, системы здоровья, логгеры и супервайзеры рабочих процессов).\n \n- В конструкторе устанавливаются начальные значения полей и создаются внутренние структуры данных, такие как `registry`, представляющий собой модульный регистр служб.\n\n- Класс содержит два основных состояния управления:\n - `_state`: отслеживает текущее состояние жизненного цикла менеджера (например, IDLE, RUNNING).\n - `_core_registered`: флаг, указывающий, зарегистрированы ли основные сервисы.\n - `_workers_registered`: флаг, показывающий, зарегистрированы ли рабочие процессы.\n\n- Реализован метод регистрации модуля (`register_module`), позволяющий добавлять новые модули в систему.\n\nНа основании имеющихся доказательств можно предположить следующие функции:\n- Координация запуска и остановки всех зарегистрированных служб и рабочих процессов.\n- Управление жизненным циклом приложения (запуск, остановка, переход между стадиями выполнения).\n- Регистрация новых модулей и их интеграция в общую инфраструктуру.\n\nОднако точная логика поведения и детальная реализация некоторых методов (таких как `register_module`) скрыты от прямого просмотра, поэтому возможны дополнительные детали, которые не учтены здесь.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS", + "C4_SEMANTIC_ROLES" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 178, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 28, + "C0_SOURCE_CHUNKS": 16, + "C4_SEMANTIC_ROLES": 14, + "C2_DEPENDENCY_GRAPH": 56, + "C3_ENTRYPOINTS": 14 + }, + "merge_rank": 24, + "prompt_build": 0, + "llm_call": 2370 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 919, + "evidence_rows": 12, + "evidence_chars": 7130 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 2 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_explain_ru_v4", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "RuntimeManager" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 12, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-v2-explain-runtime-manager", + "mode": "full_chain", + "run_started_at": "2026-03-12T14:36:36", + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Объясни как работает класс RuntimeManager", + "normalized_query": "Объясни как работает класс RuntimeManager" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Объясни как работает класс RuntimeManager" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни как работает класс RuntimeManager" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Объясни как работает класс RuntimeManager" + }, + "output": { + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ], + "confidence": 0.99 + }, + "rag_count": 12, + "rag_rows": [ + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager\nRuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "qname": "RuntimeManager", + "kind": "class", + "signature": "RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests manager\n- orchestrates role-like calls (4)\n- reads and writes state attributes\n- participates in dataflow slices (50)", + "layer": "C4_SEMANTIC_ROLES", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 43, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "symbol_name": "RuntimeManager", + "qname": "RuntimeManager", + "role": "pipeline_stage", + "confidence": 0.67, + "dataflow_participation": 50, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 52, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 178, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 28, + "C0_SOURCE_CHUNKS": 16, + "C4_SEMANTIC_ROLES": 14, + "C2_DEPENDENCY_GRAPH": 56, + "C3_ENTRYPOINTS": 14 + }, + "merge_rank": 24 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Объясни как работает класс RuntimeManager", + "rag_count": 12 + }, + "output": { + "llm_answer": "Класс `RuntimeManager` выглядит как менеджер жизненного цикла и координатор для различных компонентов в приложении runtime. Судя по предоставленным данным, он работает как центрального управляющего элемента, координирующего действия других сервисов и модулей.\nОсновные характеристики класса:\n- Инициализация происходит через конструктор (`__init__`), которому передаются различные компоненты приложения (конфигурации, службы, регистраторы трассировок, системы здоровья, логгеры и супервайзеры рабочих процессов).\n \n- В конструкторе устанавливаются начальные значения полей и создаются внутренние структуры данных, такие как `registry`, представляющий собой модульный регистр служб.\n\n- Класс содержит два основных состояния управления:\n - `_state`: отслеживает текущее состояние жизненного цикла менеджера (например, IDLE, RUNNING).\n - `_core_registered`: флаг, указывающий, зарегистрированы ли основные сервисы.\n - `_workers_registered`: флаг, показывающий, зарегистрированы ли рабочие процессы.\n\n- Реализован метод регистрации модуля (`register_module`), позволяющий добавлять новые модули в систему.\n\nНа основании имеющихся доказательств можно предположить следующие функции:\n- Координация запуска и остановки всех зарегистрированных служб и рабочих процессов.\n- Управление жизненным циклом приложения (запуск, остановка, переход между стадиями выполнения).\n- Регистрация новых модулей и их интеграция в общую инфраструктуру.\n\nОднако точная логика поведения и детальная реализация некоторых методов (таких как `register_module`) скрыты от прямого просмотра, поэтому возможны дополнительные детали, которые не учтены здесь." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 919, + "evidence_rows": 12, + "evidence_chars": 7130 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 2 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_explain_ru_v4", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 2370 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-explain-runtime-manager.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-explain-runtime-manager.md new file mode 100644 index 0000000..2b0f4d4 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-explain-runtime-manager.md @@ -0,0 +1,34 @@ +# plba-v2-explain-runtime-manager + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Объясни как работает класс RuntimeManager + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 12, + "llm_answer": "Класс `RuntimeManager` выглядит как менеджер жизненного цикла и координатор для различных компонентов в приложении runtime. Судя по предоставленным данным, он работает как центрального управляющего элемента, координирующего действия других сервисов и модулей.\nОсновные характеристики класса:\n- Инициализация происходит через конструктор (`__init__`), которому передаются различные компоненты приложения (конфигурации, службы, регистраторы трассировок, системы здоровья, логгеры и супервайзеры рабочих процессов).\n \n- В конструкторе устанавливаются начальные значения полей и создаются внутренние структуры данных, такие как `registry`, представляющий собой модульный регистр служб.\n\n- Класс содержит два основных состояния управления:\n - `_state`: отслеживает текущее состояние жизненного цикла менеджера (например, IDLE, RUNNING).\n - `_core_registered`: флаг, указывающий, зарегистрированы ли основные сервисы.\n - `_workers_registered`: флаг, показывающий, зарегистрированы ли рабочие процессы.\n\n- Реализован метод регистрации модуля (`register_module`), позволяющий добавлять новые модули в систему.\n\nНа основании имеющихся доказательств можно предположить следующие функции:\n- Координация запуска и остановки всех зарегистрированных служб и рабочих процессов.\n- Управление жизненным циклом приложения (запуск, остановка, переход между стадиями выполнения).\n- Регистрация новых модулей и их интеграция в общую инфраструктуру.\n\nОднако точная логика поведения и детальная реализация некоторых методов (таких как `register_module`) скрыты от прямого просмотра, поэтому возможны дополнительные детали, которые не учтены здесь.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-explain-trace-service.json b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-explain-trace-service.json new file mode 100644 index 0000000..ace8c06 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-explain-trace-service.json @@ -0,0 +1,2208 @@ +{ + "case_id": "plba-v2-explain-trace-service", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 14, + "llm_answer": "Класс `TraceService` является частью системы отслеживания трассировок в приложении и реализует функционал управления контекстами трассировки и записи событий в журнал.\nКлючевые особенности класса:\n\n1. Инициализация (`__init__()`):\n - При создании экземпляра класса указывается транспорт для отправки данных трассировки (`transport`) и хранилище контекста трассировки (`store`). Если эти параметры не указаны, используются дефолтные реализации: `NoOpTraceTransport()` и `TraceContextStore()`.\n - Создаётся объект `TraceRecordWriter`, отвечающий за запись записей о контексте и сообщений в транспорт.\n\n2. Создание нового контекста трассировки (`create_context()`):\n - Метод создаёт новый контекст трассировки, генерируя уникальный идентификатор трассировки (`trace_id`), устанавливая атрибуты, такие как имя трека (`alias`), родительский идентификатор (`parent_id`), тип события (`kind`) и дополнительные атрибуты (`attrs`).\n - Контекст сохраняется в хранилище и записывается в транспорт через объект `TraceRecordWriter`.\n \n3. Обертка для создания контекста трассировки (`open_context()`):\n - Обеспечивает временную область видимости созданного контекста трассировки внутри блока с помощью генератора контекста (`context manager`). После завершения блока созданный ранее контекст автоматически освобождается.\nПотоки взаимодействия:\n- Транспорт трассировки используется для передачи информации во внешние сервисы мониторинга или журналы.\n- Хранилище контекста сохраняет текущие состояния контекста трассировки для дальнейшего использования.\n\nТаким образом, класс служит центральным компонентом для инициализации и управления контекстами трассировки приложения, обеспечивая единый интерфейс для интеграции различных инструментов мониторинга и логирования.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "TraceService" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-v2-explain-trace-service", + "text": "Объясни как работает класс TraceService", + "mode": "full_chain", + "run_started_at": "2026-03-12T14:36:36", + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни как работает класс TraceService", + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "TraceService", + "alternatives": [ + "TraceService" + ], + "confidence": 0.99 + }, + "rag_count": 14, + "rag_rows": [ + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceService\nTraceService(TraceContextFactory)", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService", + "span_start": 39, + "span_end": 166, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "c2b2b976d99f2c600000b753731b26e0a69adcb4359398b93073590c5d5d04f4", + "qname": "TraceService", + "kind": "class", + "signature": "TraceService(TraceContextFactory)", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (13)", + "layer": "C4_SEMANTIC_ROLES", + "title": "TraceService", + "span_start": 39, + "span_end": 166, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 60, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "c2b2b976d99f2c600000b753731b26e0a69adcb4359398b93073590c5d5d04f4", + "symbol_name": "TraceService", + "qname": "TraceService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 13, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.create_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 61, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3b052062067a78aef3302ee1d996897e02a67d1b340397bea4f59fe147c0492a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a", + "dst_ref": "TraceService.create_context", + "resolution": "resolved", + "slice_id": "3b052062067a78aef3302ee1d996897e02a67d1b340397bea4f59fe147c0492a", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.create_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.close_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 84, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "7a9353ef57c9ae5d19b3a0c6ac50fad05e6d21d31bbe1cd1cd07af6332ba6505", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "01e14158dcced7e52d0c8ac84ac7b9a75225c261b6aca6a1d7da802d0994721c", + "dst_ref": "TraceService.close_context", + "resolution": "resolved", + "slice_id": "7a9353ef57c9ae5d19b3a0c6ac50fad05e6d21d31bbe1cd1cd07af6332ba6505", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.close_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "01e14158dcced7e52d0c8ac84ac7b9a75225c261b6aca6a1d7da802d0994721c" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.open_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 78, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a6e13b9ebc4fed84586afd53ed92a4d14757e440873f572b2337d5622ee96031", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426", + "dst_ref": "TraceService.open_context", + "resolution": "resolved", + "slice_id": "a6e13b9ebc4fed84586afd53ed92a4d14757e440873f572b2337d5622ee96031", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.open_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.transport\n -> TraceService.__init__", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 41, + "span_end": 43, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "1e923a93faa05c3c43ca9b19bd047007a8589ccce57d3cc1798ae7f9f200af98", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "dst_ref": "TraceService.__init__", + "resolution": "resolved", + "slice_id": "1e923a93faa05c3c43ca9b19bd047007a8589ccce57d3cc1798ae7f9f200af98", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.transport", + "TraceService.__init__" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.current_trace_id", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 81, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3ea17138634b1190bded77ddb84aa1595124f6519b246f24fc4b02bd62b5cac1", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c", + "dst_ref": "TraceService.current_trace_id", + "resolution": "resolved", + "slice_id": "3ea17138634b1190bded77ddb84aa1595124f6519b246f24fc4b02bd62b5cac1", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.current_trace_id" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.step", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 88, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "9f34c5da9b09fba99df6f6b1bde183a9aeb45111b8218a747c71590c2c9f60f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "c44bfbc66cf747283f30088da3e011a10395031d41e77b74e523c24997f641ca", + "dst_ref": "TraceService.step", + "resolution": "resolved", + "slice_id": "9f34c5da9b09fba99df6f6b1bde183a9aeb45111b8218a747c71590c2c9f60f2", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.step" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "c44bfbc66cf747283f30088da3e011a10395031d41e77b74e523c24997f641ca" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceRecordWriter:\n def __init__(self, transport: TraceTransport) -> None:\n self._logger = logging.getLogger(__name__)\n self._transport = transport\n\n def write_context(self, record: TraceContextRecord) -> None:\n try:\n self._transport.write_context(record)\n except Exception:\n self._logger.exception(\"Trace transport failed to write context %s\", record.trace_id)\n\n def write_message(self, record: TraceLogMessage) -> None:\n try:\n self._transport.write_message(record)\n except Exception:\n self._logger.exception(\"Trace transport failed to write message for %s\", record.trace_id)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/tracing/service.py:TraceRecordWriter", + "span_start": 21, + "span_end": 36, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceService(TraceContextFactory):\n def __init__(self, transport: TraceTransport | None = None, store: TraceContextStore | None = None) -> None:\n self.transport = transport or NoOpTraceTransport()\n self.store = store or TraceContextStore()\n self._writer = TraceRecordWriter(self.transport)\n\n def create_context(\n self,\n *,\n alias: str,\n parent_id: str | None = None,\n kind: str | None = None,\n attrs: dict[str, Any] | None = None,\n ) -> str:\n record = TraceContextRecord(\n trace_id=uuid4().hex,\n alias=str(alias or \"\"),\n parent_id=parent_id,\n type=kind,\n event_time=utc_now(),\n attrs=dict(attrs or {}),\n )\n self.store.push(record)\n self._writer.write_context(record)\n return record.trace_id\n\n @contextmanager\n def open_context(\n self,\n *,\n alias: str,\n parent_id: str | None = None,\n kind: str | None = None,\n attrs: dict[str, Any] | None = None,\n ) -> Iterator[str]:\n trace_id = self.create_context(alias=alias, parent_id=parent_id, kind=kind, attrs=attrs)\n try:\n yield trace_id\n finally:\n self.store.pop()\n\n def current_trace_id(self) -> str | None:\n return self.store.current_trace_id()\n\n def close_context(self) -> str | None:\n previous = self.store.pop()\n return previous.record.trace_id if previous else None\n\n def step(self, name: str) -> None:\n self.store.set_step(str(name or \"\"))\n\n def info(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"INFO\", message, status, attrs)\n\n def debug(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"DEBUG\", message, status, attrs)\n\n def warning(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"WARNING\", message, status, attrs)\n\n def error(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"ERROR\", message, status, attrs)\n\n def exception(self, message: str, *, status: str = \"failed\", attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"ERROR\", message, status, attrs)\n\n def new_root(self, operation: str) -> TraceContext:\n trace_id = self.create_context(alias=operation, kind=\"operation\", attrs={\"operation\": operation})\n return TraceContext(trace_id=trace_id, span_id=trace_id, attributes={\"operation\": operation})\n\n def child_of(self, parent: TraceContext, operation: str) -> TraceContext:\n trace_id = self.create_context(\n alias=operation,\n parent_id=parent.trace_id,\n kind=\"worker\",\n attrs={\"operation\": operation},\n )\n return TraceContext(\n trace_id=trace_id,\n span_id=trace_id,\n parent_span_id=parent.span_id,\n attributes={\"operation\": operation},\n )\n\n def attach(self, metadata: dict[str, object], context: TraceContext) -> dict[str, object]:\n updated = dict(metadata)\n updated[\"trace_id\"] = context.trace_id\n updated[\"span_id\"] = context.span_id\n updated[\"parent_span_id\"] = context.parent_span_id\n return updated\n\n def resume(self, metadata: dict[str, object], operation: str) -> TraceContext:\n trace_id = str(metadata.get(\"trace_id\") or uuid4().hex)\n span_id = str(metadata.get(\"span_id\") or trace_id)\n parent_id = metadata.get(\"parent_span_id\")\n self.create_context(\n alias=operation,\n parent_id=str(parent_id) if parent_id else None,\n kind=\"worker\",\n attrs=dict(metadata),\n )\n return TraceContext(\n trace_id=trace_id,\n span_id=span_id,\n parent_span_id=str(parent_id) if parent_id else None,\n attributes={\"operation\": operation},\n )\n\n def _write_message(\n self,\n level: TraceLevel,\n message: str,\n status: str | None,\n attrs: dict[str, Any] | None,\n ) -> None:\n active = self.store.current()\n if active is None:\n raise RuntimeError(\"Trace context is not bound. Call create_context() first.\")\n record = TraceLogMessage(\n trace_id=active.record.trace_id,\n step=active.step,\n status=str(status or \"\"),\n message=str(message or \"\"),\n level=level,\n event_time=utc_now(),\n attrs=dict(attrs or {}),\n )\n self._writer.write_message(record)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/tracing/service.py:TraceService", + "span_start": 39, + "span_end": 166, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceManager(TraceService):\n \"\"\"Compatibility alias during the transition from ConfigManager-shaped naming.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/tracing/service.py:TraceManager", + "span_start": 169, + "span_end": 170, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 2, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "Класс `TraceService` является частью системы отслеживания трассировок в приложении и реализует функционал управления контекстами трассировки и записи событий в журнал.\nКлючевые особенности класса:\n\n1. Инициализация (`__init__()`):\n - При создании экземпляра класса указывается транспорт для отправки данных трассировки (`transport`) и хранилище контекста трассировки (`store`). Если эти параметры не указаны, используются дефолтные реализации: `NoOpTraceTransport()` и `TraceContextStore()`.\n - Создаётся объект `TraceRecordWriter`, отвечающий за запись записей о контексте и сообщений в транспорт.\n\n2. Создание нового контекста трассировки (`create_context()`):\n - Метод создаёт новый контекст трассировки, генерируя уникальный идентификатор трассировки (`trace_id`), устанавливая атрибуты, такие как имя трека (`alias`), родительский идентификатор (`parent_id`), тип события (`kind`) и дополнительные атрибуты (`attrs`).\n - Контекст сохраняется в хранилище и записывается в транспорт через объект `TraceRecordWriter`.\n \n3. Обертка для создания контекста трассировки (`open_context()`):\n - Обеспечивает временную область видимости созданного контекста трассировки внутри блока с помощью генератора контекста (`context manager`). После завершения блока созданный ранее контекст автоматически освобождается.\nПотоки взаимодействия:\n- Транспорт трассировки используется для передачи информации во внешние сервисы мониторинга или журналы.\n- Хранилище контекста сохраняет текущие состояния контекста трассировки для дальнейшего использования.\n\nТаким образом, класс служит центральным компонентом для инициализации и управления контекстами трассировки приложения, обеспечивая единый интерфейс для интеграции различных инструментов мониторинга и логирования.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS", + "C4_SEMANTIC_ROLES" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "TraceService" + ], + "keyword_hints": [ + "TraceService" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "TraceService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "TraceService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "TraceService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "TraceService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "TraceService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "TraceService", + "alternatives": [ + "TraceService" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 118, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 35, + "C0_SOURCE_CHUNKS": 14, + "C4_SEMANTIC_ROLES": 13, + "C2_DEPENDENCY_GRAPH": 43, + "C3_ENTRYPOINTS": 10 + }, + "merge_rank": 23, + "prompt_build": 0, + "llm_call": 2601 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 1055, + "evidence_rows": 14, + "evidence_chars": 6323 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 1 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 3, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_explain_ru_v4", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "TraceService" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 14, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-v2-explain-trace-service", + "mode": "full_chain", + "run_started_at": "2026-03-12T14:36:36", + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Объясни как работает класс TraceService", + "normalized_query": "Объясни как работает класс TraceService" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Объясни как работает класс TraceService" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни как работает класс TraceService" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "TraceService" + ], + "keyword_hints": [ + "TraceService" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Объясни как работает класс TraceService" + }, + "output": { + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "TraceService", + "alternatives": [ + "TraceService" + ], + "confidence": 0.99 + }, + "rag_count": 14, + "rag_rows": [ + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceService\nTraceService(TraceContextFactory)", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService", + "span_start": 39, + "span_end": 166, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "c2b2b976d99f2c600000b753731b26e0a69adcb4359398b93073590c5d5d04f4", + "qname": "TraceService", + "kind": "class", + "signature": "TraceService(TraceContextFactory)", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (13)", + "layer": "C4_SEMANTIC_ROLES", + "title": "TraceService", + "span_start": 39, + "span_end": 166, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 60, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "c2b2b976d99f2c600000b753731b26e0a69adcb4359398b93073590c5d5d04f4", + "symbol_name": "TraceService", + "qname": "TraceService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 13, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.create_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 61, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3b052062067a78aef3302ee1d996897e02a67d1b340397bea4f59fe147c0492a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a", + "dst_ref": "TraceService.create_context", + "resolution": "resolved", + "slice_id": "3b052062067a78aef3302ee1d996897e02a67d1b340397bea4f59fe147c0492a", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.create_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.close_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 84, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "7a9353ef57c9ae5d19b3a0c6ac50fad05e6d21d31bbe1cd1cd07af6332ba6505", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "01e14158dcced7e52d0c8ac84ac7b9a75225c261b6aca6a1d7da802d0994721c", + "dst_ref": "TraceService.close_context", + "resolution": "resolved", + "slice_id": "7a9353ef57c9ae5d19b3a0c6ac50fad05e6d21d31bbe1cd1cd07af6332ba6505", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.close_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "01e14158dcced7e52d0c8ac84ac7b9a75225c261b6aca6a1d7da802d0994721c" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.open_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 78, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a6e13b9ebc4fed84586afd53ed92a4d14757e440873f572b2337d5622ee96031", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426", + "dst_ref": "TraceService.open_context", + "resolution": "resolved", + "slice_id": "a6e13b9ebc4fed84586afd53ed92a4d14757e440873f572b2337d5622ee96031", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.open_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.transport\n -> TraceService.__init__", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 41, + "span_end": 43, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "1e923a93faa05c3c43ca9b19bd047007a8589ccce57d3cc1798ae7f9f200af98", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "dst_ref": "TraceService.__init__", + "resolution": "resolved", + "slice_id": "1e923a93faa05c3c43ca9b19bd047007a8589ccce57d3cc1798ae7f9f200af98", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.transport", + "TraceService.__init__" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.current_trace_id", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 81, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3ea17138634b1190bded77ddb84aa1595124f6519b246f24fc4b02bd62b5cac1", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c", + "dst_ref": "TraceService.current_trace_id", + "resolution": "resolved", + "slice_id": "3ea17138634b1190bded77ddb84aa1595124f6519b246f24fc4b02bd62b5cac1", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.current_trace_id" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.step", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 88, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "9f34c5da9b09fba99df6f6b1bde183a9aeb45111b8218a747c71590c2c9f60f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "c44bfbc66cf747283f30088da3e011a10395031d41e77b74e523c24997f641ca", + "dst_ref": "TraceService.step", + "resolution": "resolved", + "slice_id": "9f34c5da9b09fba99df6f6b1bde183a9aeb45111b8218a747c71590c2c9f60f2", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.step" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "c44bfbc66cf747283f30088da3e011a10395031d41e77b74e523c24997f641ca" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceRecordWriter:\n def __init__(self, transport: TraceTransport) -> None:\n self._logger = logging.getLogger(__name__)\n self._transport = transport\n\n def write_context(self, record: TraceContextRecord) -> None:\n try:\n self._transport.write_context(record)\n except Exception:\n self._logger.exception(\"Trace transport failed to write context %s\", record.trace_id)\n\n def write_message(self, record: TraceLogMessage) -> None:\n try:\n self._transport.write_message(record)\n except Exception:\n self._logger.exception(\"Trace transport failed to write message for %s\", record.trace_id)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/tracing/service.py:TraceRecordWriter", + "span_start": 21, + "span_end": 36, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceService(TraceContextFactory):\n def __init__(self, transport: TraceTransport | None = None, store: TraceContextStore | None = None) -> None:\n self.transport = transport or NoOpTraceTransport()\n self.store = store or TraceContextStore()\n self._writer = TraceRecordWriter(self.transport)\n\n def create_context(\n self,\n *,\n alias: str,\n parent_id: str | None = None,\n kind: str | None = None,\n attrs: dict[str, Any] | None = None,\n ) -> str:\n record = TraceContextRecord(\n trace_id=uuid4().hex,\n alias=str(alias or \"\"),\n parent_id=parent_id,\n type=kind,\n event_time=utc_now(),\n attrs=dict(attrs or {}),\n )\n self.store.push(record)\n self._writer.write_context(record)\n return record.trace_id\n\n @contextmanager\n def open_context(\n self,\n *,\n alias: str,\n parent_id: str | None = None,\n kind: str | None = None,\n attrs: dict[str, Any] | None = None,\n ) -> Iterator[str]:\n trace_id = self.create_context(alias=alias, parent_id=parent_id, kind=kind, attrs=attrs)\n try:\n yield trace_id\n finally:\n self.store.pop()\n\n def current_trace_id(self) -> str | None:\n return self.store.current_trace_id()\n\n def close_context(self) -> str | None:\n previous = self.store.pop()\n return previous.record.trace_id if previous else None\n\n def step(self, name: str) -> None:\n self.store.set_step(str(name or \"\"))\n\n def info(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"INFO\", message, status, attrs)\n\n def debug(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"DEBUG\", message, status, attrs)\n\n def warning(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"WARNING\", message, status, attrs)\n\n def error(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"ERROR\", message, status, attrs)\n\n def exception(self, message: str, *, status: str = \"failed\", attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"ERROR\", message, status, attrs)\n\n def new_root(self, operation: str) -> TraceContext:\n trace_id = self.create_context(alias=operation, kind=\"operation\", attrs={\"operation\": operation})\n return TraceContext(trace_id=trace_id, span_id=trace_id, attributes={\"operation\": operation})\n\n def child_of(self, parent: TraceContext, operation: str) -> TraceContext:\n trace_id = self.create_context(\n alias=operation,\n parent_id=parent.trace_id,\n kind=\"worker\",\n attrs={\"operation\": operation},\n )\n return TraceContext(\n trace_id=trace_id,\n span_id=trace_id,\n parent_span_id=parent.span_id,\n attributes={\"operation\": operation},\n )\n\n def attach(self, metadata: dict[str, object], context: TraceContext) -> dict[str, object]:\n updated = dict(metadata)\n updated[\"trace_id\"] = context.trace_id\n updated[\"span_id\"] = context.span_id\n updated[\"parent_span_id\"] = context.parent_span_id\n return updated\n\n def resume(self, metadata: dict[str, object], operation: str) -> TraceContext:\n trace_id = str(metadata.get(\"trace_id\") or uuid4().hex)\n span_id = str(metadata.get(\"span_id\") or trace_id)\n parent_id = metadata.get(\"parent_span_id\")\n self.create_context(\n alias=operation,\n parent_id=str(parent_id) if parent_id else None,\n kind=\"worker\",\n attrs=dict(metadata),\n )\n return TraceContext(\n trace_id=trace_id,\n span_id=span_id,\n parent_span_id=str(parent_id) if parent_id else None,\n attributes={\"operation\": operation},\n )\n\n def _write_message(\n self,\n level: TraceLevel,\n message: str,\n status: str | None,\n attrs: dict[str, Any] | None,\n ) -> None:\n active = self.store.current()\n if active is None:\n raise RuntimeError(\"Trace context is not bound. Call create_context() first.\")\n record = TraceLogMessage(\n trace_id=active.record.trace_id,\n step=active.step,\n status=str(status or \"\"),\n message=str(message or \"\"),\n level=level,\n event_time=utc_now(),\n attrs=dict(attrs or {}),\n )\n self._writer.write_message(record)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/tracing/service.py:TraceService", + "span_start": 39, + "span_end": 166, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceManager(TraceService):\n \"\"\"Compatibility alias during the transition from ConfigManager-shaped naming.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/tracing/service.py:TraceManager", + "span_start": 169, + "span_end": 170, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 2, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "TraceService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "TraceService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "TraceService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "TraceService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "TraceService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "TraceService", + "alternatives": [ + "TraceService" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 118, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 35, + "C0_SOURCE_CHUNKS": 14, + "C4_SEMANTIC_ROLES": 13, + "C2_DEPENDENCY_GRAPH": 43, + "C3_ENTRYPOINTS": 10 + }, + "merge_rank": 23 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Объясни как работает класс TraceService", + "rag_count": 14 + }, + "output": { + "llm_answer": "Класс `TraceService` является частью системы отслеживания трассировок в приложении и реализует функционал управления контекстами трассировки и записи событий в журнал.\nКлючевые особенности класса:\n\n1. Инициализация (`__init__()`):\n - При создании экземпляра класса указывается транспорт для отправки данных трассировки (`transport`) и хранилище контекста трассировки (`store`). Если эти параметры не указаны, используются дефолтные реализации: `NoOpTraceTransport()` и `TraceContextStore()`.\n - Создаётся объект `TraceRecordWriter`, отвечающий за запись записей о контексте и сообщений в транспорт.\n\n2. Создание нового контекста трассировки (`create_context()`):\n - Метод создаёт новый контекст трассировки, генерируя уникальный идентификатор трассировки (`trace_id`), устанавливая атрибуты, такие как имя трека (`alias`), родительский идентификатор (`parent_id`), тип события (`kind`) и дополнительные атрибуты (`attrs`).\n - Контекст сохраняется в хранилище и записывается в транспорт через объект `TraceRecordWriter`.\n \n3. Обертка для создания контекста трассировки (`open_context()`):\n - Обеспечивает временную область видимости созданного контекста трассировки внутри блока с помощью генератора контекста (`context manager`). После завершения блока созданный ранее контекст автоматически освобождается.\nПотоки взаимодействия:\n- Транспорт трассировки используется для передачи информации во внешние сервисы мониторинга или журналы.\n- Хранилище контекста сохраняет текущие состояния контекста трассировки для дальнейшего использования.\n\nТаким образом, класс служит центральным компонентом для инициализации и управления контекстами трассировки приложения, обеспечивая единый интерфейс для интеграции различных инструментов мониторинга и логирования." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 1055, + "evidence_rows": 14, + "evidence_chars": 6323 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 1 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 3, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_explain_ru_v4", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 2601 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-explain-trace-service.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-explain-trace-service.md new file mode 100644 index 0000000..4eea08d --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-explain-trace-service.md @@ -0,0 +1,34 @@ +# plba-v2-explain-trace-service + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Объясни как работает класс TraceService + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 14, + "llm_answer": "Класс `TraceService` является частью системы отслеживания трассировок в приложении и реализует функционал управления контекстами трассировки и записи событий в журнал.\nКлючевые особенности класса:\n\n1. Инициализация (`__init__()`):\n - При создании экземпляра класса указывается транспорт для отправки данных трассировки (`transport`) и хранилище контекста трассировки (`store`). Если эти параметры не указаны, используются дефолтные реализации: `NoOpTraceTransport()` и `TraceContextStore()`.\n - Создаётся объект `TraceRecordWriter`, отвечающий за запись записей о контексте и сообщений в транспорт.\n\n2. Создание нового контекста трассировки (`create_context()`):\n - Метод создаёт новый контекст трассировки, генерируя уникальный идентификатор трассировки (`trace_id`), устанавливая атрибуты, такие как имя трека (`alias`), родительский идентификатор (`parent_id`), тип события (`kind`) и дополнительные атрибуты (`attrs`).\n - Контекст сохраняется в хранилище и записывается в транспорт через объект `TraceRecordWriter`.\n \n3. Обертка для создания контекста трассировки (`open_context()`):\n - Обеспечивает временную область видимости созданного контекста трассировки внутри блока с помощью генератора контекста (`context manager`). После завершения блока созданный ранее контекст автоматически освобождается.\nПотоки взаимодействия:\n- Транспорт трассировки используется для передачи информации во внешние сервисы мониторинга или журналы.\n- Хранилище контекста сохраняет текущие состояния контекста трассировки для дальнейшего использования.\n\nТаким образом, класс служит центральным компонентом для инициализации и управления контекстами трассировки приложения, обеспечивая единый интерфейс для интеграции различных инструментов мониторинга и логирования.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "TraceService" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-control-plane.json b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-control-plane.json new file mode 100644 index 0000000..8ede8a9 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-control-plane.json @@ -0,0 +1,1236 @@ +{ + "case_id": "plba-v2-find-entrypoints-control-plane", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 9, + "llm_answer": "В данном приложении обнаружены следующие подтвержденные точки входа (entrypoints) HTTP control plane:\n\n1. HTTP GET `/health \n Объявлен в файле `src/app_runtime/control/http_app.py`. Контролируется методом `health()` класса `HttpControlAppFactory`, который возвращает статус здоровья приложения.\n\n2. HTTP POST/PUT/PATCH/DELETE `/actions/{action}` и HTTP GET `/actions/{action} \n Объявлены в том же файле `src/app_runtime/control/http_app.py`. Данные маршруты обрабатываются методами `action()` и контролируются классом `HttpControlAppFactory`.\n\nВсе обнаруженные маршруты объявлены напрямую в коде через декораторы FastAPI (`@app.get`, `@app.post`), что подтверждает их реальное существование и доступность.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "HTTP", + "control", + "plane" + ], + "layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-v2-find-entrypoints-control-plane", + "text": "Найди точки входа HTTP control plane", + "mode": "full_chain", + "run_started_at": "2026-03-12T14:36:36", + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Найди точки входа HTTP control plane", + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "HTTP", + "control", + "plane" + ], + "confidence": 0.0 + }, + "rag_count": 9, + "rag_rows": [ + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel(ControlChannel):\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._timeout = timeout\n self._runner = UvicornThreadRunner(host, port, timeout)\n self._factory = HttpControlAppFactory()\n self._actions: ControlActionSet | None = None\n\n async def start(self, actions: ControlActionSet) -> None:\n self._actions = actions\n app = self._factory.create(self._health_response, self._action_response)\n await self._runner.start(app)\n\n async def stop(self) -> None:\n await self._runner.stop()\n\n @property\n def port(self) -> int:\n return self._runner.port\n\n async def _health_response(self) -> dict[str, object]:\n if self._actions is None:\n return {\"status\": \"unhealthy\", \"detail\": \"control actions are not configured\"}\n return await asyncio.wait_for(self._actions.health(), timeout=float(self._timeout))\n\n async def _action_response(self, action: str, _client_source: str = \"unknown\") -> JSONResponse:\n if self._actions is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"{action} handler is not configured\"}, status_code=404)\n callbacks = {\n \"start\": self._actions.start,\n \"stop\": self._actions.stop,\n \"status\": self._actions.status,\n }\n callback = callbacks.get(action)\n if callback is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"unsupported action: {action}\"}, status_code=404)\n action_timeout = max(float(self._timeout), 10.0) if action in {\"start\", \"stop\"} else float(self._timeout)\n try:\n detail = await asyncio.wait_for(callback(), timeout=action_timeout)\n except asyncio.TimeoutError:\n return JSONResponse(\n content={\"status\": \"accepted\", \"detail\": f\"{action} operation is still in progress\"},\n status_code=202,\n )\n except Exception as exc:\n return JSONResponse(content={\"status\": \"error\", \"detail\": str(exc)}, status_code=500)\n return JSONResponse(content={\"status\": \"ok\", \"detail\": detail or f\"{action} action accepted\"}, status_code=200)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_channel.py:HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "class HttpControlAppFactory:\n def create(\n self,\n health_provider: Callable[[], Awaitable[HealthPayload]],\n action_provider: Callable[[str, str], Awaitable[JSONResponse]],\n ) -> FastAPI:\n app = FastAPI(title=\"PLBA Control API\")\n\n @app.middleware(\"http\")\n async def log_api_call(request: Request, call_next): # type: ignore[no-untyped-def]\n started = time.monotonic()\n response = await call_next(request)\n response.headers[\"X-Response-Time-Ms\"] = str(int((time.monotonic() - started) * 1000))\n return response\n\n @app.get(\"/health\")\n async def health() -> JSONResponse:\n payload = await health_provider()\n status_code = 200 if payload.get(\"status\") == \"ok\" else 503\n return JSONResponse(content=payload, status_code=status_code)\n\n @app.get(\"/actions/{action}\")\n @app.post(\"/actions/{action}\")\n async def action(action: str, request: Request) -> JSONResponse:\n client_source = self._client_source(request)\n if action in {\"start\", \"stop\"}:\n LOGGER.warning(\"Control action requested: /actions/%s client=%s\", action, client_source)\n return await action_provider(action, client_source)\n\n return app\n\n def _client_source(self, request: Request) -> str:\n explicit_header = request.headers.get(\"X-Client-Source\", \"\").strip()\n if explicit_header:\n return explicit_header\n user_agent = request.headers.get(\"User-Agent\", \"\").strip()\n if user_agent:\n return f\"user-agent:{user_agent}\"\n return \"unknown\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_app.py:HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlActionSet:\n health: HealthHandler\n start: ActionHandler\n stop: ActionHandler\n status: ActionHandler", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\"ControlActionSet\", \"ControlChannel\", \"ControlPlaneService\", \"HttpControlChannel\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/__init__.py:1-5", + "span_start": 1, + "span_end": 5, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlChannel(ABC):\n @abstractmethod\n async def start(self, actions: ControlActionSet) -> None:\n \"\"\"Start the control channel and bind handlers.\"\"\"\n\n @abstractmethod\n async def stop(self) -> None:\n \"\"\"Stop the control channel and release resources.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "class UvicornThreadRunner:\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._host = host\n self._port = port\n self._timeout = timeout\n self._server: Server | None = None\n self._thread: Thread | None = None\n self._error: BaseException | None = None\n\n async def start(self, app: FastAPI) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._error = None\n config = Config(app=app, host=self._host, port=self._port, log_level=\"warning\")\n self._server = Server(config)\n self._thread = Thread(target=self._serve, name=\"plba-http-control\", daemon=True)\n self._thread.start()\n await self._wait_until_started()\n\n async def stop(self) -> None:\n if self._server is None or self._thread is None:\n return\n self._server.should_exit = True\n await asyncio.to_thread(self._thread.join, self._timeout)\n self._server = None\n self._thread = None\n\n @property\n def port(self) -> int:\n if self._server is None or not getattr(self._server, \"servers\", None):\n return self._port\n socket = self._server.servers[0].sockets[0]\n return int(socket.getsockname()[1])\n\n async def _wait_until_started(self) -> None:\n if self._server is None:\n raise RuntimeError(\"Server is not initialized\")\n deadline = asyncio.get_running_loop().time() + max(float(self._timeout), 1.0)\n while not self._server.started:\n if self._error is not None:\n raise RuntimeError(\"HTTP control server failed to start\") from self._error\n if asyncio.get_running_loop().time() >= deadline:\n raise TimeoutError(\"HTTP control server startup timed out\")\n await asyncio.sleep(0.05)\n\n def _serve(self) -> None:\n if self._server is None:\n return\n try:\n asyncio.run(self._server.serve())\n except BaseException as exc: # noqa: BLE001\n self._error = exc", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_runner.py:UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_runner", + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "В данном приложении обнаружены следующие подтвержденные точки входа (entrypoints) HTTP control plane:\n\n1. HTTP GET `/health \n Объявлен в файле `src/app_runtime/control/http_app.py`. Контролируется методом `health()` класса `HttpControlAppFactory`, который возвращает статус здоровья приложения.\n\n2. HTTP POST/PUT/PATCH/DELETE `/actions/{action}` и HTTP GET `/actions/{action} \n Объявлены в том же файле `src/app_runtime/control/http_app.py`. Данные маршруты обрабатываются методами `action()` и контролируются классом `HttpControlAppFactory`.\n\nВсе обнаруженные маршруты объявлены напрямую в коде через декораторы FastAPI (`@app.get`, `@app.post`), что подтверждает их реальное существование и доступность.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C3_ENTRYPOINTS" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "HTTP", + "control", + "plane" + ], + "keyword_hints": [ + "HTTP", + "control", + "plane" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C3_ENTRYPOINTS": "exact_path_fetch", + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C3_ENTRYPOINTS": 12, + "C0_SOURCE_CHUNKS": 6 + }, + "filters_by_layer": { + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C3_ENTRYPOINTS", + "query": "Найди точки входа HTTP control plane", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 12, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Найди точки входа HTTP control plane", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "HTTP", + "control", + "plane" + ] + }, + "layers": [ + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 6, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 42, + "retrieval_by_layer": { + "C3_ENTRYPOINTS": 18, + "C0_SOURCE_CHUNKS": 24 + }, + "merge_rank": 0, + "prompt_build": 0, + "llm_call": 1368 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 1195, + "evidence_rows": 9, + "evidence_chars": 6731 + }, + "evidence_summary": [ + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 6, + "unique_paths": 5 + } + ], + "prompt_template_id": "intent_code_qa_find_entrypoints_ru_v4", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "HTTP", + "control", + "plane" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 9, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-v2-find-entrypoints-control-plane", + "mode": "full_chain", + "run_started_at": "2026-03-12T14:36:36", + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Найди точки входа HTTP control plane", + "normalized_query": "Найди точки входа HTTP control plane" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Найди точки входа HTTP control plane" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Найди точки входа HTTP control plane" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "HTTP", + "control", + "plane" + ], + "keyword_hints": [ + "HTTP", + "control", + "plane" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Найди точки входа HTTP control plane" + }, + "output": { + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "HTTP", + "control", + "plane" + ], + "confidence": 0.0 + }, + "rag_count": 9, + "rag_rows": [ + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel(ControlChannel):\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._timeout = timeout\n self._runner = UvicornThreadRunner(host, port, timeout)\n self._factory = HttpControlAppFactory()\n self._actions: ControlActionSet | None = None\n\n async def start(self, actions: ControlActionSet) -> None:\n self._actions = actions\n app = self._factory.create(self._health_response, self._action_response)\n await self._runner.start(app)\n\n async def stop(self) -> None:\n await self._runner.stop()\n\n @property\n def port(self) -> int:\n return self._runner.port\n\n async def _health_response(self) -> dict[str, object]:\n if self._actions is None:\n return {\"status\": \"unhealthy\", \"detail\": \"control actions are not configured\"}\n return await asyncio.wait_for(self._actions.health(), timeout=float(self._timeout))\n\n async def _action_response(self, action: str, _client_source: str = \"unknown\") -> JSONResponse:\n if self._actions is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"{action} handler is not configured\"}, status_code=404)\n callbacks = {\n \"start\": self._actions.start,\n \"stop\": self._actions.stop,\n \"status\": self._actions.status,\n }\n callback = callbacks.get(action)\n if callback is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"unsupported action: {action}\"}, status_code=404)\n action_timeout = max(float(self._timeout), 10.0) if action in {\"start\", \"stop\"} else float(self._timeout)\n try:\n detail = await asyncio.wait_for(callback(), timeout=action_timeout)\n except asyncio.TimeoutError:\n return JSONResponse(\n content={\"status\": \"accepted\", \"detail\": f\"{action} operation is still in progress\"},\n status_code=202,\n )\n except Exception as exc:\n return JSONResponse(content={\"status\": \"error\", \"detail\": str(exc)}, status_code=500)\n return JSONResponse(content={\"status\": \"ok\", \"detail\": detail or f\"{action} action accepted\"}, status_code=200)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_channel.py:HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "class HttpControlAppFactory:\n def create(\n self,\n health_provider: Callable[[], Awaitable[HealthPayload]],\n action_provider: Callable[[str, str], Awaitable[JSONResponse]],\n ) -> FastAPI:\n app = FastAPI(title=\"PLBA Control API\")\n\n @app.middleware(\"http\")\n async def log_api_call(request: Request, call_next): # type: ignore[no-untyped-def]\n started = time.monotonic()\n response = await call_next(request)\n response.headers[\"X-Response-Time-Ms\"] = str(int((time.monotonic() - started) * 1000))\n return response\n\n @app.get(\"/health\")\n async def health() -> JSONResponse:\n payload = await health_provider()\n status_code = 200 if payload.get(\"status\") == \"ok\" else 503\n return JSONResponse(content=payload, status_code=status_code)\n\n @app.get(\"/actions/{action}\")\n @app.post(\"/actions/{action}\")\n async def action(action: str, request: Request) -> JSONResponse:\n client_source = self._client_source(request)\n if action in {\"start\", \"stop\"}:\n LOGGER.warning(\"Control action requested: /actions/%s client=%s\", action, client_source)\n return await action_provider(action, client_source)\n\n return app\n\n def _client_source(self, request: Request) -> str:\n explicit_header = request.headers.get(\"X-Client-Source\", \"\").strip()\n if explicit_header:\n return explicit_header\n user_agent = request.headers.get(\"User-Agent\", \"\").strip()\n if user_agent:\n return f\"user-agent:{user_agent}\"\n return \"unknown\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_app.py:HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlActionSet:\n health: HealthHandler\n start: ActionHandler\n stop: ActionHandler\n status: ActionHandler", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\"ControlActionSet\", \"ControlChannel\", \"ControlPlaneService\", \"HttpControlChannel\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/__init__.py:1-5", + "span_start": 1, + "span_end": 5, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlChannel(ABC):\n @abstractmethod\n async def start(self, actions: ControlActionSet) -> None:\n \"\"\"Start the control channel and bind handlers.\"\"\"\n\n @abstractmethod\n async def stop(self) -> None:\n \"\"\"Stop the control channel and release resources.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "class UvicornThreadRunner:\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._host = host\n self._port = port\n self._timeout = timeout\n self._server: Server | None = None\n self._thread: Thread | None = None\n self._error: BaseException | None = None\n\n async def start(self, app: FastAPI) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._error = None\n config = Config(app=app, host=self._host, port=self._port, log_level=\"warning\")\n self._server = Server(config)\n self._thread = Thread(target=self._serve, name=\"plba-http-control\", daemon=True)\n self._thread.start()\n await self._wait_until_started()\n\n async def stop(self) -> None:\n if self._server is None or self._thread is None:\n return\n self._server.should_exit = True\n await asyncio.to_thread(self._thread.join, self._timeout)\n self._server = None\n self._thread = None\n\n @property\n def port(self) -> int:\n if self._server is None or not getattr(self._server, \"servers\", None):\n return self._port\n socket = self._server.servers[0].sockets[0]\n return int(socket.getsockname()[1])\n\n async def _wait_until_started(self) -> None:\n if self._server is None:\n raise RuntimeError(\"Server is not initialized\")\n deadline = asyncio.get_running_loop().time() + max(float(self._timeout), 1.0)\n while not self._server.started:\n if self._error is not None:\n raise RuntimeError(\"HTTP control server failed to start\") from self._error\n if asyncio.get_running_loop().time() >= deadline:\n raise TimeoutError(\"HTTP control server startup timed out\")\n await asyncio.sleep(0.05)\n\n def _serve(self) -> None:\n if self._server is None:\n return\n try:\n asyncio.run(self._server.serve())\n except BaseException as exc: # noqa: BLE001\n self._error = exc", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_runner.py:UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_runner", + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C3_ENTRYPOINTS": "exact_path_fetch", + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C3_ENTRYPOINTS": 12, + "C0_SOURCE_CHUNKS": 6 + }, + "filters_by_layer": { + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C3_ENTRYPOINTS", + "query": "Найди точки входа HTTP control plane", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 12, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Найди точки входа HTTP control plane", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "HTTP", + "control", + "plane" + ] + }, + "layers": [ + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 6, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 42, + "retrieval_by_layer": { + "C3_ENTRYPOINTS": 18, + "C0_SOURCE_CHUNKS": 24 + }, + "merge_rank": 0 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Найди точки входа HTTP control plane", + "rag_count": 9 + }, + "output": { + "llm_answer": "В данном приложении обнаружены следующие подтвержденные точки входа (entrypoints) HTTP control plane:\n\n1. HTTP GET `/health \n Объявлен в файле `src/app_runtime/control/http_app.py`. Контролируется методом `health()` класса `HttpControlAppFactory`, который возвращает статус здоровья приложения.\n\n2. HTTP POST/PUT/PATCH/DELETE `/actions/{action}` и HTTP GET `/actions/{action} \n Объявлены в том же файле `src/app_runtime/control/http_app.py`. Данные маршруты обрабатываются методами `action()` и контролируются классом `HttpControlAppFactory`.\n\nВсе обнаруженные маршруты объявлены напрямую в коде через декораторы FastAPI (`@app.get`, `@app.post`), что подтверждает их реальное существование и доступность." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 1195, + "evidence_rows": 9, + "evidence_chars": 6731 + }, + "evidence_summary": [ + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 6, + "unique_paths": 5 + } + ], + "prompt_template_id": "intent_code_qa_find_entrypoints_ru_v4", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 1368 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-control-plane.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-control-plane.md new file mode 100644 index 0000000..160dc77 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-control-plane.md @@ -0,0 +1,33 @@ +# plba-v2-find-entrypoints-control-plane + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Найди точки входа HTTP control plane + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 9, + "llm_answer": "В данном приложении обнаружены следующие подтвержденные точки входа (entrypoints) HTTP control plane:\n\n1. HTTP GET `/health \n Объявлен в файле `src/app_runtime/control/http_app.py`. Контролируется методом `health()` класса `HttpControlAppFactory`, который возвращает статус здоровья приложения.\n\n2. HTTP POST/PUT/PATCH/DELETE `/actions/{action}` и HTTP GET `/actions/{action} \n Объявлены в том же файле `src/app_runtime/control/http_app.py`. Данные маршруты обрабатываются методами `action()` и контролируются классом `HttpControlAppFactory`.\n\nВсе обнаруженные маршруты объявлены напрямую в коде через декораторы FastAPI (`@app.get`, `@app.post`), что подтверждает их реальное существование и доступность.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "HTTP", + "control", + "plane" + ], + "layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-health-endpoint.json b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-health-endpoint.json new file mode 100644 index 0000000..135d94d --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-health-endpoint.json @@ -0,0 +1,1228 @@ +{ + "case_id": "plba-v2-find-entrypoints-health-endpoint", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 9, + "llm_answer": "У тебя есть две подтвержденные точки HTTP-запросов (`GET /`, `POST /`), объявленные в файле `http_app.py`. Однако конкретно маршрут `/health` нигде явно не указан.\n\nТем не менее, исходя из предоставленного контекста, у нас есть компонент класса `HealthRegistry`, ответственный за сбор и обработку данных о здоровье системы. Вероятно, реализация проверки здоровья (`health check`) реализована через этот класс, хотя прямого указания на маршрут `/health` в предоставленных фрагментах кода нет.\n\nТаким образом, возможная кандидатура на роль health-endpoint — это обращение к экземпляру класса `HealthRegistry` с запросом на получение информации о текущем состоянии компонентов системы (хотя точный URL может отличаться от `/health`).\n\nОднако стоит отметить, что без дополнительных сведений точно утверждать наличие именно маршрута `/health` нельзя. Рекомендую проверить непосредственно код вашего приложения на предмет наличия маршрутов с этим конкретным именем.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "health", + "endpoint" + ], + "layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ] + }, + "passed": false, + "mismatches": [ + "llm: expected answer to contain 'GET /health'" + ], + "details": { + "case_id": "plba-v2-find-entrypoints-health-endpoint", + "text": "Где health endpoint?", + "mode": "full_chain", + "run_started_at": "2026-03-12T14:36:36", + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Где health endpoint?", + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "health", + "endpoint" + ], + "confidence": 0.0 + }, + "rag_count": 9, + "rag_rows": [ + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/health/registry.py", + "content": "class HealthRegistry:\n def __init__(self) -> None:\n self._contributors: list[HealthContributor] = []\n\n def register(self, contributor: HealthContributor) -> None:\n self._contributors.append(contributor)\n\n def contributor_healths(self) -> list[WorkerHealth]:\n return [contributor.health() for contributor in self._contributors]\n\n def snapshot(self, worker_healths: list[WorkerHealth]) -> dict[str, object]:\n component_healths = worker_healths + self.contributor_healths()\n return {\n \"status\": self._aggregate_status(component_healths),\n \"components\": [self._health_dict(item) for item in component_healths],\n }\n\n def payload(self, state: LifecycleState, worker_healths: list[WorkerHealth]) -> HealthPayload:\n component_healths = worker_healths + self.contributor_healths()\n if state == LifecycleState.STOPPED:\n return {\"status\": \"unhealthy\", \"detail\": \"state=stopped\", \"state\": state.value}\n if state in {LifecycleState.STARTING, LifecycleState.STOPPING}:\n return {\n \"status\": \"degraded\",\n \"detail\": f\"state={state.value}\",\n \"state\": state.value,\n \"components\": [self._health_dict(item) for item in component_healths],\n }\n return {\n \"status\": self._aggregate_status(component_healths),\n \"state\": state.value,\n \"components\": [self._health_dict(item) for item in component_healths],\n }\n\n def _aggregate_status(self, component_healths: list[WorkerHealth]) -> str:\n if any(item.status == \"unhealthy\" and item.critical for item in component_healths):\n return \"unhealthy\"\n if any(item.status in {\"degraded\", \"unhealthy\"} for item in component_healths):\n return \"degraded\"\n return \"ok\"\n\n def _health_dict(self, health: WorkerHealth) -> dict[str, object]:\n return {\n \"name\": health.name,\n \"status\": health.status,\n \"critical\": health.critical,\n \"detail\": health.detail,\n \"meta\": health.meta,\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/health/registry.py:HealthRegistry", + "span_start": 8, + "span_end": 56, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.health.registry", + "is_test": false, + "blob_sha": "26e6a24daa43407ba5340b74497c20153020e79f8d7828ae502aaec378dfcf75", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/health.py", + "content": "from app_runtime.health.registry import HealthRegistry\n\n__all__ = [\"HealthRegistry\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/health/__init__.py:1-3", + "span_start": 1, + "span_end": 3, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.health.__init__", + "is_test": false, + "blob_sha": "f7b15eed8b1f1cca8dfd467909a2612d8cb4e66e46b972ad89a0c9459ce283a0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/health.py", + "content": "class HealthContributor(ABC):\n @abstractmethod\n def health(self) -> WorkerHealth:\n \"\"\"Return contributor health state.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/contracts/health.py:HealthContributor", + "span_start": 7, + "span_end": 10, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.health", + "is_test": false, + "blob_sha": "6bd92611def7131e32d4dd34a8ed85e6cf3c67722ad27797032a632cb30dc097", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/health/__init__.py", + "content": "from app_runtime.health.registry import HealthRegistry\n\n__all__ = [\"HealthRegistry\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/health/__init__.py:1-3", + "span_start": 1, + "span_end": 3, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.health.__init__", + "is_test": false, + "blob_sha": "f7b15eed8b1f1cca8dfd467909a2612d8cb4e66e46b972ad89a0c9459ce283a0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/worker.py", + "content": "class WorkerHealth:\n name: str\n status: HealthState\n critical: bool\n detail: str | None = None\n meta: dict[str, Any] = field(default_factory=dict)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/contracts/worker.py:WorkerHealth", + "span_start": 13, + "span_end": 18, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.worker", + "is_test": false, + "blob_sha": "e4827d32220f322d8adc3e42769da3ca0cc680db6a5eab7a11f4d8773a75304e", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/worker.py", + "content": "class Worker(ABC):\n @property\n @abstractmethod\n def name(self) -> str:\n \"\"\"Stable worker name for diagnostics.\"\"\"\n\n @property\n @abstractmethod\n def critical(self) -> bool:\n \"\"\"Whether this worker is required for healthy app operation.\"\"\"\n\n @abstractmethod\n def start(self) -> None:\n \"\"\"Start worker execution.\"\"\"\n\n @abstractmethod\n def stop(self, force: bool = False) -> None:\n \"\"\"Request graceful or immediate stop.\"\"\"\n\n @abstractmethod\n def health(self) -> WorkerHealth:\n \"\"\"Return current health state.\"\"\"\n\n @abstractmethod\n def status(self) -> WorkerStatus:\n \"\"\"Return current runtime status.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/contracts/worker.py:Worker", + "span_start": 30, + "span_end": 55, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 2, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.worker", + "is_test": false, + "blob_sha": "e4827d32220f322d8adc3e42769da3ca0cc680db6a5eab7a11f4d8773a75304e", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "У тебя есть две подтвержденные точки HTTP-запросов (`GET /`, `POST /`), объявленные в файле `http_app.py`. Однако конкретно маршрут `/health` нигде явно не указан.\n\nТем не менее, исходя из предоставленного контекста, у нас есть компонент класса `HealthRegistry`, ответственный за сбор и обработку данных о здоровье системы. Вероятно, реализация проверки здоровья (`health check`) реализована через этот класс, хотя прямого указания на маршрут `/health` в предоставленных фрагментах кода нет.\n\nТаким образом, возможная кандидатура на роль health-endpoint — это обращение к экземпляру класса `HealthRegistry` с запросом на получение информации о текущем состоянии компонентов системы (хотя точный URL может отличаться от `/health`).\n\nОднако стоит отметить, что без дополнительных сведений точно утверждать наличие именно маршрута `/health` нельзя. Рекомендую проверить непосредственно код вашего приложения на предмет наличия маршрутов с этим конкретным именем.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C3_ENTRYPOINTS" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "unknown", + "symbol_candidates": [ + "health", + "endpoint" + ], + "keyword_hints": [ + "health", + "endpoint" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C3_ENTRYPOINTS": "exact_path_fetch", + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C3_ENTRYPOINTS": 12, + "C0_SOURCE_CHUNKS": 6 + }, + "filters_by_layer": { + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C3_ENTRYPOINTS", + "query": "Где health endpoint?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 12, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Где health endpoint?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "health", + "endpoint" + ] + }, + "layers": [ + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 6, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 1, + "symbol_resolution": 0, + "retrieval_total": 55, + "retrieval_by_layer": { + "C3_ENTRYPOINTS": 32, + "C0_SOURCE_CHUNKS": 22 + }, + "merge_rank": 0, + "prompt_build": 0, + "llm_call": 1508 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 904, + "evidence_rows": 9, + "evidence_chars": 3350 + }, + "evidence_summary": [ + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 6, + "unique_paths": 5 + } + ], + "prompt_template_id": "intent_code_qa_find_entrypoints_ru_v4", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "health", + "endpoint" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 9, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-v2-find-entrypoints-health-endpoint", + "mode": "full_chain", + "run_started_at": "2026-03-12T14:36:36", + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Где health endpoint?", + "normalized_query": "Где health endpoint?" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Где health endpoint?" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Где health endpoint?" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "unknown", + "symbol_candidates": [ + "health", + "endpoint" + ], + "keyword_hints": [ + "health", + "endpoint" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 1 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Где health endpoint?" + }, + "output": { + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "health", + "endpoint" + ], + "confidence": 0.0 + }, + "rag_count": 9, + "rag_rows": [ + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/health/registry.py", + "content": "class HealthRegistry:\n def __init__(self) -> None:\n self._contributors: list[HealthContributor] = []\n\n def register(self, contributor: HealthContributor) -> None:\n self._contributors.append(contributor)\n\n def contributor_healths(self) -> list[WorkerHealth]:\n return [contributor.health() for contributor in self._contributors]\n\n def snapshot(self, worker_healths: list[WorkerHealth]) -> dict[str, object]:\n component_healths = worker_healths + self.contributor_healths()\n return {\n \"status\": self._aggregate_status(component_healths),\n \"components\": [self._health_dict(item) for item in component_healths],\n }\n\n def payload(self, state: LifecycleState, worker_healths: list[WorkerHealth]) -> HealthPayload:\n component_healths = worker_healths + self.contributor_healths()\n if state == LifecycleState.STOPPED:\n return {\"status\": \"unhealthy\", \"detail\": \"state=stopped\", \"state\": state.value}\n if state in {LifecycleState.STARTING, LifecycleState.STOPPING}:\n return {\n \"status\": \"degraded\",\n \"detail\": f\"state={state.value}\",\n \"state\": state.value,\n \"components\": [self._health_dict(item) for item in component_healths],\n }\n return {\n \"status\": self._aggregate_status(component_healths),\n \"state\": state.value,\n \"components\": [self._health_dict(item) for item in component_healths],\n }\n\n def _aggregate_status(self, component_healths: list[WorkerHealth]) -> str:\n if any(item.status == \"unhealthy\" and item.critical for item in component_healths):\n return \"unhealthy\"\n if any(item.status in {\"degraded\", \"unhealthy\"} for item in component_healths):\n return \"degraded\"\n return \"ok\"\n\n def _health_dict(self, health: WorkerHealth) -> dict[str, object]:\n return {\n \"name\": health.name,\n \"status\": health.status,\n \"critical\": health.critical,\n \"detail\": health.detail,\n \"meta\": health.meta,\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/health/registry.py:HealthRegistry", + "span_start": 8, + "span_end": 56, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.health.registry", + "is_test": false, + "blob_sha": "26e6a24daa43407ba5340b74497c20153020e79f8d7828ae502aaec378dfcf75", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/health.py", + "content": "from app_runtime.health.registry import HealthRegistry\n\n__all__ = [\"HealthRegistry\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/health/__init__.py:1-3", + "span_start": 1, + "span_end": 3, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.health.__init__", + "is_test": false, + "blob_sha": "f7b15eed8b1f1cca8dfd467909a2612d8cb4e66e46b972ad89a0c9459ce283a0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/health.py", + "content": "class HealthContributor(ABC):\n @abstractmethod\n def health(self) -> WorkerHealth:\n \"\"\"Return contributor health state.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/contracts/health.py:HealthContributor", + "span_start": 7, + "span_end": 10, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.health", + "is_test": false, + "blob_sha": "6bd92611def7131e32d4dd34a8ed85e6cf3c67722ad27797032a632cb30dc097", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/health/__init__.py", + "content": "from app_runtime.health.registry import HealthRegistry\n\n__all__ = [\"HealthRegistry\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/health/__init__.py:1-3", + "span_start": 1, + "span_end": 3, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.health.__init__", + "is_test": false, + "blob_sha": "f7b15eed8b1f1cca8dfd467909a2612d8cb4e66e46b972ad89a0c9459ce283a0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/worker.py", + "content": "class WorkerHealth:\n name: str\n status: HealthState\n critical: bool\n detail: str | None = None\n meta: dict[str, Any] = field(default_factory=dict)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/contracts/worker.py:WorkerHealth", + "span_start": 13, + "span_end": 18, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.worker", + "is_test": false, + "blob_sha": "e4827d32220f322d8adc3e42769da3ca0cc680db6a5eab7a11f4d8773a75304e", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/worker.py", + "content": "class Worker(ABC):\n @property\n @abstractmethod\n def name(self) -> str:\n \"\"\"Stable worker name for diagnostics.\"\"\"\n\n @property\n @abstractmethod\n def critical(self) -> bool:\n \"\"\"Whether this worker is required for healthy app operation.\"\"\"\n\n @abstractmethod\n def start(self) -> None:\n \"\"\"Start worker execution.\"\"\"\n\n @abstractmethod\n def stop(self, force: bool = False) -> None:\n \"\"\"Request graceful or immediate stop.\"\"\"\n\n @abstractmethod\n def health(self) -> WorkerHealth:\n \"\"\"Return current health state.\"\"\"\n\n @abstractmethod\n def status(self) -> WorkerStatus:\n \"\"\"Return current runtime status.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/contracts/worker.py:Worker", + "span_start": 30, + "span_end": 55, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 2, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.worker", + "is_test": false, + "blob_sha": "e4827d32220f322d8adc3e42769da3ca0cc680db6a5eab7a11f4d8773a75304e", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C3_ENTRYPOINTS": "exact_path_fetch", + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C3_ENTRYPOINTS": 12, + "C0_SOURCE_CHUNKS": 6 + }, + "filters_by_layer": { + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C3_ENTRYPOINTS", + "query": "Где health endpoint?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 12, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Где health endpoint?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "health", + "endpoint" + ] + }, + "layers": [ + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 6, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 55, + "retrieval_by_layer": { + "C3_ENTRYPOINTS": 32, + "C0_SOURCE_CHUNKS": 22 + }, + "merge_rank": 0 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Где health endpoint?", + "rag_count": 9 + }, + "output": { + "llm_answer": "У тебя есть две подтвержденные точки HTTP-запросов (`GET /`, `POST /`), объявленные в файле `http_app.py`. Однако конкретно маршрут `/health` нигде явно не указан.\n\nТем не менее, исходя из предоставленного контекста, у нас есть компонент класса `HealthRegistry`, ответственный за сбор и обработку данных о здоровье системы. Вероятно, реализация проверки здоровья (`health check`) реализована через этот класс, хотя прямого указания на маршрут `/health` в предоставленных фрагментах кода нет.\n\nТаким образом, возможная кандидатура на роль health-endpoint — это обращение к экземпляру класса `HealthRegistry` с запросом на получение информации о текущем состоянии компонентов системы (хотя точный URL может отличаться от `/health`).\n\nОднако стоит отметить, что без дополнительных сведений точно утверждать наличие именно маршрута `/health` нельзя. Рекомендую проверить непосредственно код вашего приложения на предмет наличия маршрутов с этим конкретным именем." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 904, + "evidence_rows": 9, + "evidence_chars": 3350 + }, + "evidence_summary": [ + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 6, + "unique_paths": 5 + } + ], + "prompt_template_id": "intent_code_qa_find_entrypoints_ru_v4", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 1508 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-health-endpoint.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-health-endpoint.md new file mode 100644 index 0000000..d3ca5ae --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-health-endpoint.md @@ -0,0 +1,32 @@ +# plba-v2-find-entrypoints-health-endpoint + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: runtime +- mode: full_chain +- passed: False + +## Query +Где health endpoint? + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 9, + "llm_answer": "У тебя есть две подтвержденные точки HTTP-запросов (`GET /`, `POST /`), объявленные в файле `http_app.py`. Однако конкретно маршрут `/health` нигде явно не указан.\n\nТем не менее, исходя из предоставленного контекста, у нас есть компонент класса `HealthRegistry`, ответственный за сбор и обработку данных о здоровье системы. Вероятно, реализация проверки здоровья (`health check`) реализована через этот класс, хотя прямого указания на маршрут `/health` в предоставленных фрагментах кода нет.\n\nТаким образом, возможная кандидатура на роль health-endpoint — это обращение к экземпляру класса `HealthRegistry` с запросом на получение информации о текущем состоянии компонентов системы (хотя точный URL может отличаться от `/health`).\n\nОднако стоит отметить, что без дополнительных сведений точно утверждать наличие именно маршрута `/health` нельзя. Рекомендую проверить непосредственно код вашего приложения на предмет наличия маршрутов с этим конкретным именем.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "health", + "endpoint" + ], + "layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- llm: expected answer to contain 'GET /health' \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-find-tests-create-runtime.json b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-find-tests-create-runtime.json new file mode 100644 index 0000000..5f9bb4c --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-find-tests-create-runtime.json @@ -0,0 +1,1963 @@ +{ + "case_id": "plba-v2-find-tests-create-runtime", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 16, + "llm_answer": "Прямых тестов конкретно для функции `create_runtime` в предоставленном контексте не обнаружено.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "create_runtime" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-v2-find-tests-create-runtime", + "text": "Где тесты для create_runtime?", + "mode": "full_chain", + "run_started_at": "2026-03-12T14:36:36", + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Где тесты для create_runtime?", + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "create_runtime" + ], + "confidence": 0.0 + }, + "rag_count": 16, + "rag_rows": [ + { + "path": "tests/test_runtime.py", + "content": "test_public_plba_package_exports_runtime_builder_and_worker_contract imports plba.create_runtime", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_public_plba_package_exports_runtime_builder_and_worker_contract:imports", + "span_start": 349, + "span_end": 349, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e93f80075cd9988737ece3cb5ec659c542132c4d383646e376917bfd0cb6ea64", + "edge_type": "imports", + "src_symbol_id": "ed06ffc5afb8a863cf7da3e40921f17abe4eec2a0770139e3380d93ccaae604a", + "src_qname": "test_public_plba_package_exports_runtime_builder_and_worker_contract", + "dst_symbol_id": null, + "dst_ref": "plba.create_runtime", + "resolution": "partial", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "test_public_plba_package_exports_runtime_builder_and_worker_contract calls create_runtime", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_public_plba_package_exports_runtime_builder_and_worker_contract:calls", + "span_start": 399, + "span_end": 399, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "039939355230de826d8bf7607f55fc59c7d932e5570ecb78994d0f13e57e8488", + "edge_type": "calls", + "src_symbol_id": "ed06ffc5afb8a863cf7da3e40921f17abe4eec2a0770139e3380d93ccaae604a", + "src_qname": "test_public_plba_package_exports_runtime_builder_and_worker_contract", + "dst_symbol_id": null, + "dst_ref": "create_runtime", + "resolution": "partial", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_worker_wakes_up_with_configured_interval\n -> ScenarioWorker\n -> ScenarioWorker.__init__\n -> ScenarioWorker._name\n -> ScenarioWorker.name", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_worker_wakes_up_with_configured_interval:dataflow_slice", + "span_start": 52, + "span_end": 166, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "2fd137f5852febe907f44d3b3e4ea430f89ccfe962ae1442a16ab9df64c8f76c", + "edge_type": "dataflow_slice", + "src_symbol_id": "65f877f78191d65e6a752e41cedc70ebc784c266804a55c1c56440336e1f0d6e", + "src_qname": "test_worker_wakes_up_with_configured_interval", + "dst_symbol_id": "da022da2c49fd9cfd09d6e6da6bbd59aaa7d28efd669ce8444e88d327ddec2fc", + "dst_ref": "ScenarioWorker.name", + "resolution": "resolved", + "slice_id": "2fd137f5852febe907f44d3b3e4ea430f89ccfe962ae1442a16ab9df64c8f76c", + "root_symbol_id": "65f877f78191d65e6a752e41cedc70ebc784c266804a55c1c56440336e1f0d6e", + "path_symbols": [ + "test_worker_wakes_up_with_configured_interval", + "ScenarioWorker", + "ScenarioWorker.__init__", + "ScenarioWorker._name", + "ScenarioWorker.name" + ], + "path_symbol_ids": [ + "65f877f78191d65e6a752e41cedc70ebc784c266804a55c1c56440336e1f0d6e", + "9a1d08a7eb1831c9f2e0db361b5207f036e477c160773ae08c0b287239785c52", + "9c20be046ba06644d1432e0f20eb223663d2b116ee7d91fdc62bc68323f2e593", + "da022da2c49fd9cfd09d6e6da6bbd59aaa7d28efd669ce8444e88d327ddec2fc" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_actions_stop_busy_worker_after_timeout\n -> BlockingRoutine\n -> BlockingRoutine.__init__\n -> BlockingRoutine._started\n -> BlockingRoutine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_actions_stop_busy_worker_after_timeout:dataflow_slice", + "span_start": 42, + "span_end": 238, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "8e7db3d2a9226f1c1d9942ac6373cfcafa0d2276758ddb8a3d3c455a3d58024d", + "edge_type": "dataflow_slice", + "src_symbol_id": "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "src_qname": "test_actions_stop_busy_worker_after_timeout", + "dst_symbol_id": "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04", + "dst_ref": "BlockingRoutine.run", + "resolution": "resolved", + "slice_id": "8e7db3d2a9226f1c1d9942ac6373cfcafa0d2276758ddb8a3d3c455a3d58024d", + "root_symbol_id": "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "path_symbols": [ + "test_actions_stop_busy_worker_after_timeout", + "BlockingRoutine", + "BlockingRoutine.__init__", + "BlockingRoutine._started", + "BlockingRoutine.run" + ], + "path_symbol_ids": [ + "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "a3349c5bc65e4003a4bbd6a8dbb7a54c337e12d1aed930caa701b12e520f1e67", + "486deeed3043c6db985aef258e96ddc67aa53608e67a83962fbd2471f649ddf1", + "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_actions_stop_busy_worker_after_timeout\n -> BlockingRoutine\n -> BlockingRoutine.__init__\n -> BlockingRoutine._release\n -> BlockingRoutine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_actions_stop_busy_worker_after_timeout:dataflow_slice", + "span_start": 43, + "span_end": 238, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "b59da9da82f9dfc8a9b695a08213786385da1ae9e17561ec3a0450a574a8cb39", + "edge_type": "dataflow_slice", + "src_symbol_id": "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "src_qname": "test_actions_stop_busy_worker_after_timeout", + "dst_symbol_id": "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04", + "dst_ref": "BlockingRoutine.run", + "resolution": "resolved", + "slice_id": "b59da9da82f9dfc8a9b695a08213786385da1ae9e17561ec3a0450a574a8cb39", + "root_symbol_id": "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "path_symbols": [ + "test_actions_stop_busy_worker_after_timeout", + "BlockingRoutine", + "BlockingRoutine.__init__", + "BlockingRoutine._release", + "BlockingRoutine.run" + ], + "path_symbol_ids": [ + "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "a3349c5bc65e4003a4bbd6a8dbb7a54c337e12d1aed930caa701b12e520f1e67", + "486deeed3043c6db985aef258e96ddc67aa53608e67a83962fbd2471f649ddf1", + "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_actions_stop_busy_worker_before_timeout\n -> BlockingRoutine\n -> BlockingRoutine.__init__\n -> BlockingRoutine._started\n -> BlockingRoutine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_actions_stop_busy_worker_before_timeout:dataflow_slice", + "span_start": 42, + "span_end": 212, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "f9bcce108870e49afa8b32d4625115a10707a3b0e7473179e958e5752bf258b4", + "edge_type": "dataflow_slice", + "src_symbol_id": "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "src_qname": "test_actions_stop_busy_worker_before_timeout", + "dst_symbol_id": "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04", + "dst_ref": "BlockingRoutine.run", + "resolution": "resolved", + "slice_id": "f9bcce108870e49afa8b32d4625115a10707a3b0e7473179e958e5752bf258b4", + "root_symbol_id": "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "path_symbols": [ + "test_actions_stop_busy_worker_before_timeout", + "BlockingRoutine", + "BlockingRoutine.__init__", + "BlockingRoutine._started", + "BlockingRoutine.run" + ], + "path_symbol_ids": [ + "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "a3349c5bc65e4003a4bbd6a8dbb7a54c337e12d1aed930caa701b12e520f1e67", + "486deeed3043c6db985aef258e96ddc67aa53608e67a83962fbd2471f649ddf1", + "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "def test_public_plba_package_exports_runtime_builder_and_worker_contract(tmp_path) -> None:\n import plba\n from plba import ApplicationModule as PublicApplicationModule\n from plba import InMemoryTaskQueue\n from plba import Worker as PublicWorker\n from plba import WorkerHealth as PublicWorkerHealth\n from plba import WorkerStatus as PublicWorkerStatus\n from plba import create_runtime\n\n config_path = tmp_path / \"config.yml\"\n config_path.write_text(\"platform: {}\\n\", encoding=\"utf-8\")\n\n queue = InMemoryTaskQueue[int]()\n queue.put(2)\n assert queue.get(timeout=0.01) == 2\n queue.task_done()\n\n class PublicRoutine:\n def __init__(self) -> None:\n self.runs = 0\n\n def run(self) -> None:\n if self.runs == 0:\n self.runs += 1\n\n class PublicWorkerImpl(PublicWorker):\n def __init__(self, routine: PublicRoutine) -> None:\n self._inner = RoutineWorker(\"public-worker\", routine)\n\n @property\n def name(self) -> str:\n return self._inner.name\n\n @property\n def critical(self) -> bool:\n return self._inner.critical\n\n def start(self) -> None:\n self._inner.start()\n\n def stop(self, force: bool = False) -> None:\n self._inner.stop(force=force)\n\n def health(self) -> PublicWorkerHealth:\n return self._inner.health()\n\n def status(self) -> PublicWorkerStatus:\n return self._inner.status()\n\n class PublicExampleModule(PublicApplicationModule):\n @property\n def name(self) -> str:\n return \"public-example\"\n\n def register(self, registry: ModuleRegistry) -> None:\n registry.add_worker(PublicWorkerImpl(PublicRoutine()))\n\n runtime = create_runtime(PublicExampleModule(), config_path=str(config_path))\n runtime.start()\n sleep(0.2)\n assert runtime.configuration.get() == {\"platform\": {}}\n assert runtime.status()[\"workers\"][\"registered\"] == 1\n assert hasattr(plba, \"QueueWorker\") is False\n runtime.stop()", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_runtime.py:test_public_plba_package_exports_runtime_builder_and_worker_contract", + "span_start": 342, + "span_end": 405, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 13, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _build_runtime(worker: Worker, *, control_timeout: int = 1) -> tuple[RuntimeManager, str]:\n runtime = RuntimeManager()\n channel = HttpControlChannel(host=\"127.0.0.1\", port=0, timeout=control_timeout)\n runtime.control_plane.register_channel(channel)\n runtime.register_module(WorkerModule(worker))\n runtime.start()\n return runtime, f\"http://127.0.0.1:{channel.port}\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_build_runtime", + "span_start": 154, + "span_end": 160, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 6, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class IntervalRoutine:\n calls: list[float] = field(default_factory=list)\n _lock: Lock = field(default_factory=Lock)\n\n def run(self) -> None:\n with self._lock:\n self.calls.append(monotonic())\n\n def wait_runs(self, count: int, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n with self._lock:\n if len(self.calls) >= count:\n return True\n sleep(0.01)\n return False\n\n def deltas(self) -> list[float]:\n with self._lock:\n return [self.calls[index + 1] - self.calls[index] for index in range(len(self.calls) - 1)]", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:IntervalRoutine", + "span_start": 18, + "span_end": 37, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class ScenarioWorker(Worker):\n def __init__(self, name: str, routine: object, *, interval: float = 0.05) -> None:\n self._name = name\n self._routine = routine\n self._interval = interval\n self._thread: Thread | None = None\n self._stop_requested = Event()\n self._in_flight = 0\n self._runs = 0\n self._lock = Lock()\n\n @property\n def name(self) -> str:\n return self._name\n\n @property\n def critical(self) -> bool:\n return True\n\n def start(self) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._stop_requested.clear()\n self._thread = Thread(target=self._loop, name=f\"{self._name}-thread\", daemon=True)\n self._thread.start()\n\n def stop(self, force: bool = False) -> None:\n self._stop_requested.set()\n\n def health(self) -> WorkerHealth:\n return WorkerHealth(name=self.name, status=\"ok\", critical=True, meta={\"runs\": self._runs})\n\n def status(self) -> WorkerStatus:\n thread_alive = self._thread is not None and self._thread.is_alive()\n with self._lock:\n in_flight = self._in_flight\n runs = self._runs\n if not thread_alive:\n state = \"stopped\"\n elif self._stop_requested.is_set():\n state = \"stopping\"\n elif in_flight > 0:\n state = \"busy\"\n else:\n state = \"idle\"\n return WorkerStatus(name=self.name, state=state, in_flight=in_flight, meta={\"runs\": runs})\n\n def _loop(self) -> None:\n while not self._stop_requested.is_set():\n with self._lock:\n self._in_flight += 1\n try:\n self._routine.run()\n with self._lock:\n self._runs += 1\n finally:\n with self._lock:\n self._in_flight -= 1\n if self._stop_requested.is_set():\n return\n sleep(self._interval)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:ScenarioWorker", + "span_start": 50, + "span_end": 110, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 2, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _http_call_json(\n base_url: str,\n path: str,\n *,\n method: str = \"GET\",\n headers: dict[str, str] | None = None,\n) -> tuple[int, dict[str, object]]:\n request = Request(f\"{base_url}{path}\", method=method, headers=headers or {})\n try:\n with urlopen(request, timeout=15.0) as response:\n status = response.status\n body = response.read()\n except HTTPError as error:\n status = error.code\n body = error.read()\n payload = json.loads(body.decode(\"utf-8\"))\n return status, payload", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_http_call_json", + "span_start": 125, + "span_end": 141, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 4, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _poll_until_stopped(base_url: str, timeout: float = 2.0) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n _, payload = _http_call_json(base_url, \"/actions/status\")\n if payload.get(\"detail\") == \"stopped\":\n return True\n sleep(0.05)\n return False", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_poll_until_stopped", + "span_start": 144, + "span_end": 151, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 5, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def test_worker_wakes_up_with_configured_interval() -> None:\n interval = 0.15\n routine = IntervalRoutine()\n worker = ScenarioWorker(\"interval-worker\", routine, interval=interval)\n runtime = RuntimeManager()\n runtime.register_module(WorkerModule(worker))\n\n runtime.start()\n try:\n assert routine.wait_runs(count=3, timeout=2.0) is True\n finally:\n runtime.stop()\n\n deltas = routine.deltas()\n assert len(deltas) >= 2\n assert all(delta >= interval * 0.7 for delta in deltas[:2])", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:test_worker_wakes_up_with_configured_interval", + "span_start": 163, + "span_end": 178, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 7, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class WorkerModule(ApplicationModule):\n def __init__(self, worker: Worker) -> None:\n self._worker = worker\n\n @property\n def name(self) -> str:\n return \"business-tests\"\n\n def register(self, registry: ModuleRegistry) -> None:\n registry.add_worker(self._worker)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:WorkerModule", + "span_start": 113, + "span_end": 122, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 3, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class BlockingRoutine:\n def __init__(self, started: Event, release: Event) -> None:\n self._started = started\n self._release = release\n\n def run(self) -> None:\n self._started.set()\n self._release.wait(timeout=5.0)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:BlockingRoutine", + "span_start": 40, + "span_end": 47, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def test_actions_start_stop_and_health_when_worker_is_idle() -> None:\n runtime, base_url = _build_runtime(ScenarioWorker(\"idle-worker\", IntervalRoutine(), interval=0.2))\n try:\n stop_status, stop_payload = _http_call_json(base_url, \"/actions/stop\", method=\"POST\")\n assert stop_status == 200\n assert isinstance(stop_payload.get(\"detail\"), dict)\n assert stop_payload[\"detail\"][\"timed_out\"] is False\n assert stop_payload[\"detail\"][\"state\"] == \"stopped\"\n\n health_stopped_status, health_stopped_payload = _http_call_json(base_url, \"/health\")\n assert health_stopped_status == 503\n assert health_stopped_payload[\"state\"] == \"stopped\"\n assert health_stopped_payload[\"status\"] == \"unhealthy\"\n\n start_status, start_payload = _http_call_json(base_url, \"/actions/start\", method=\"POST\")\n assert start_status == 200\n assert isinstance(start_payload.get(\"detail\"), dict)\n assert start_payload[\"detail\"][\"timed_out\"] is False\n assert start_payload[\"detail\"][\"state\"] in {\"idle\", \"busy\"}\n\n health_started_status, health_started_payload = _http_call_json(base_url, \"/health\")\n assert health_started_status == 200\n assert health_started_payload[\"status\"] == \"ok\"\n assert health_started_payload[\"state\"] in {\"idle\", \"busy\"}\n finally:\n runtime.stop()", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:test_actions_start_stop_and_health_when_worker_is_idle", + "span_start": 181, + "span_end": 206, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 8, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "Прямых тестов конкретно для функции `create_runtime` в предоставленном контексте не обнаружено.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C2_DEPENDENCY_GRAPH" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "function", + "symbol_candidates": [ + "create_runtime" + ], + "keyword_hints": [ + "create_runtime" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "test_file_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "test_symbol_patterns": [ + "test_create_runtime", + "Testcreate_runtime", + "create_runtime" + ], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C0_SOURCE_CHUNKS": 10 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src", + "tests" + ], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src", + "tests" + ], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "create_runtime", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Где тесты для create_runtime? test_create_runtime Testcreate_runtime create_runtime", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Где тесты для create_runtime? test_create_runtime Testcreate_runtime create_runtime", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 10, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 0, + "candidates_after_filter": 0 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src", + "tests" + ], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src", + "tests" + ], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 10, + "candidates_after_filter": 10 + } + ], + "fallback": { + "used": true, + "reason": "scope_relaxed_no_hits" + }, + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "create_runtime" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "miss", + "hit_count": 0, + "fail_reason": "scope_relaxed_no_hits" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 10, + "fail_reason": null + } + ] + }, + "constraint_violations": [ + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C1_SYMBOL_CATALOG", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + } + ], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 132, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 58, + "C2_DEPENDENCY_GRAPH": 55, + "C0_SOURCE_CHUNKS": 18 + }, + "merge_rank": 0, + "prompt_build": 0, + "llm_call": 1210 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 1022, + "evidence_rows": 16, + "evidence_chars": 9185 + }, + "evidence_summary": [ + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 2 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 10, + "unique_paths": 2 + } + ], + "prompt_template_id": "intent_code_qa_find_tests_ru_v4", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "create_runtime" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 16, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-v2-find-tests-create-runtime", + "mode": "full_chain", + "run_started_at": "2026-03-12T14:36:36", + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Где тесты для create_runtime?", + "normalized_query": "Где тесты для create_runtime?" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Где тесты для create_runtime?" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Где тесты для create_runtime?" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "function", + "symbol_candidates": [ + "create_runtime" + ], + "keyword_hints": [ + "create_runtime" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "test_file_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "test_symbol_patterns": [ + "test_create_runtime", + "Testcreate_runtime", + "create_runtime" + ], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Где тесты для create_runtime?" + }, + "output": { + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "create_runtime" + ], + "confidence": 0.0 + }, + "rag_count": 16, + "rag_rows": [ + { + "path": "tests/test_runtime.py", + "content": "test_public_plba_package_exports_runtime_builder_and_worker_contract imports plba.create_runtime", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_public_plba_package_exports_runtime_builder_and_worker_contract:imports", + "span_start": 349, + "span_end": 349, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e93f80075cd9988737ece3cb5ec659c542132c4d383646e376917bfd0cb6ea64", + "edge_type": "imports", + "src_symbol_id": "ed06ffc5afb8a863cf7da3e40921f17abe4eec2a0770139e3380d93ccaae604a", + "src_qname": "test_public_plba_package_exports_runtime_builder_and_worker_contract", + "dst_symbol_id": null, + "dst_ref": "plba.create_runtime", + "resolution": "partial", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "test_public_plba_package_exports_runtime_builder_and_worker_contract calls create_runtime", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_public_plba_package_exports_runtime_builder_and_worker_contract:calls", + "span_start": 399, + "span_end": 399, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "039939355230de826d8bf7607f55fc59c7d932e5570ecb78994d0f13e57e8488", + "edge_type": "calls", + "src_symbol_id": "ed06ffc5afb8a863cf7da3e40921f17abe4eec2a0770139e3380d93ccaae604a", + "src_qname": "test_public_plba_package_exports_runtime_builder_and_worker_contract", + "dst_symbol_id": null, + "dst_ref": "create_runtime", + "resolution": "partial", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_worker_wakes_up_with_configured_interval\n -> ScenarioWorker\n -> ScenarioWorker.__init__\n -> ScenarioWorker._name\n -> ScenarioWorker.name", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_worker_wakes_up_with_configured_interval:dataflow_slice", + "span_start": 52, + "span_end": 166, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "2fd137f5852febe907f44d3b3e4ea430f89ccfe962ae1442a16ab9df64c8f76c", + "edge_type": "dataflow_slice", + "src_symbol_id": "65f877f78191d65e6a752e41cedc70ebc784c266804a55c1c56440336e1f0d6e", + "src_qname": "test_worker_wakes_up_with_configured_interval", + "dst_symbol_id": "da022da2c49fd9cfd09d6e6da6bbd59aaa7d28efd669ce8444e88d327ddec2fc", + "dst_ref": "ScenarioWorker.name", + "resolution": "resolved", + "slice_id": "2fd137f5852febe907f44d3b3e4ea430f89ccfe962ae1442a16ab9df64c8f76c", + "root_symbol_id": "65f877f78191d65e6a752e41cedc70ebc784c266804a55c1c56440336e1f0d6e", + "path_symbols": [ + "test_worker_wakes_up_with_configured_interval", + "ScenarioWorker", + "ScenarioWorker.__init__", + "ScenarioWorker._name", + "ScenarioWorker.name" + ], + "path_symbol_ids": [ + "65f877f78191d65e6a752e41cedc70ebc784c266804a55c1c56440336e1f0d6e", + "9a1d08a7eb1831c9f2e0db361b5207f036e477c160773ae08c0b287239785c52", + "9c20be046ba06644d1432e0f20eb223663d2b116ee7d91fdc62bc68323f2e593", + "da022da2c49fd9cfd09d6e6da6bbd59aaa7d28efd669ce8444e88d327ddec2fc" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_actions_stop_busy_worker_after_timeout\n -> BlockingRoutine\n -> BlockingRoutine.__init__\n -> BlockingRoutine._started\n -> BlockingRoutine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_actions_stop_busy_worker_after_timeout:dataflow_slice", + "span_start": 42, + "span_end": 238, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "8e7db3d2a9226f1c1d9942ac6373cfcafa0d2276758ddb8a3d3c455a3d58024d", + "edge_type": "dataflow_slice", + "src_symbol_id": "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "src_qname": "test_actions_stop_busy_worker_after_timeout", + "dst_symbol_id": "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04", + "dst_ref": "BlockingRoutine.run", + "resolution": "resolved", + "slice_id": "8e7db3d2a9226f1c1d9942ac6373cfcafa0d2276758ddb8a3d3c455a3d58024d", + "root_symbol_id": "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "path_symbols": [ + "test_actions_stop_busy_worker_after_timeout", + "BlockingRoutine", + "BlockingRoutine.__init__", + "BlockingRoutine._started", + "BlockingRoutine.run" + ], + "path_symbol_ids": [ + "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "a3349c5bc65e4003a4bbd6a8dbb7a54c337e12d1aed930caa701b12e520f1e67", + "486deeed3043c6db985aef258e96ddc67aa53608e67a83962fbd2471f649ddf1", + "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_actions_stop_busy_worker_after_timeout\n -> BlockingRoutine\n -> BlockingRoutine.__init__\n -> BlockingRoutine._release\n -> BlockingRoutine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_actions_stop_busy_worker_after_timeout:dataflow_slice", + "span_start": 43, + "span_end": 238, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "b59da9da82f9dfc8a9b695a08213786385da1ae9e17561ec3a0450a574a8cb39", + "edge_type": "dataflow_slice", + "src_symbol_id": "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "src_qname": "test_actions_stop_busy_worker_after_timeout", + "dst_symbol_id": "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04", + "dst_ref": "BlockingRoutine.run", + "resolution": "resolved", + "slice_id": "b59da9da82f9dfc8a9b695a08213786385da1ae9e17561ec3a0450a574a8cb39", + "root_symbol_id": "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "path_symbols": [ + "test_actions_stop_busy_worker_after_timeout", + "BlockingRoutine", + "BlockingRoutine.__init__", + "BlockingRoutine._release", + "BlockingRoutine.run" + ], + "path_symbol_ids": [ + "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "a3349c5bc65e4003a4bbd6a8dbb7a54c337e12d1aed930caa701b12e520f1e67", + "486deeed3043c6db985aef258e96ddc67aa53608e67a83962fbd2471f649ddf1", + "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_actions_stop_busy_worker_before_timeout\n -> BlockingRoutine\n -> BlockingRoutine.__init__\n -> BlockingRoutine._started\n -> BlockingRoutine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_actions_stop_busy_worker_before_timeout:dataflow_slice", + "span_start": 42, + "span_end": 212, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "f9bcce108870e49afa8b32d4625115a10707a3b0e7473179e958e5752bf258b4", + "edge_type": "dataflow_slice", + "src_symbol_id": "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "src_qname": "test_actions_stop_busy_worker_before_timeout", + "dst_symbol_id": "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04", + "dst_ref": "BlockingRoutine.run", + "resolution": "resolved", + "slice_id": "f9bcce108870e49afa8b32d4625115a10707a3b0e7473179e958e5752bf258b4", + "root_symbol_id": "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "path_symbols": [ + "test_actions_stop_busy_worker_before_timeout", + "BlockingRoutine", + "BlockingRoutine.__init__", + "BlockingRoutine._started", + "BlockingRoutine.run" + ], + "path_symbol_ids": [ + "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "a3349c5bc65e4003a4bbd6a8dbb7a54c337e12d1aed930caa701b12e520f1e67", + "486deeed3043c6db985aef258e96ddc67aa53608e67a83962fbd2471f649ddf1", + "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "def test_public_plba_package_exports_runtime_builder_and_worker_contract(tmp_path) -> None:\n import plba\n from plba import ApplicationModule as PublicApplicationModule\n from plba import InMemoryTaskQueue\n from plba import Worker as PublicWorker\n from plba import WorkerHealth as PublicWorkerHealth\n from plba import WorkerStatus as PublicWorkerStatus\n from plba import create_runtime\n\n config_path = tmp_path / \"config.yml\"\n config_path.write_text(\"platform: {}\\n\", encoding=\"utf-8\")\n\n queue = InMemoryTaskQueue[int]()\n queue.put(2)\n assert queue.get(timeout=0.01) == 2\n queue.task_done()\n\n class PublicRoutine:\n def __init__(self) -> None:\n self.runs = 0\n\n def run(self) -> None:\n if self.runs == 0:\n self.runs += 1\n\n class PublicWorkerImpl(PublicWorker):\n def __init__(self, routine: PublicRoutine) -> None:\n self._inner = RoutineWorker(\"public-worker\", routine)\n\n @property\n def name(self) -> str:\n return self._inner.name\n\n @property\n def critical(self) -> bool:\n return self._inner.critical\n\n def start(self) -> None:\n self._inner.start()\n\n def stop(self, force: bool = False) -> None:\n self._inner.stop(force=force)\n\n def health(self) -> PublicWorkerHealth:\n return self._inner.health()\n\n def status(self) -> PublicWorkerStatus:\n return self._inner.status()\n\n class PublicExampleModule(PublicApplicationModule):\n @property\n def name(self) -> str:\n return \"public-example\"\n\n def register(self, registry: ModuleRegistry) -> None:\n registry.add_worker(PublicWorkerImpl(PublicRoutine()))\n\n runtime = create_runtime(PublicExampleModule(), config_path=str(config_path))\n runtime.start()\n sleep(0.2)\n assert runtime.configuration.get() == {\"platform\": {}}\n assert runtime.status()[\"workers\"][\"registered\"] == 1\n assert hasattr(plba, \"QueueWorker\") is False\n runtime.stop()", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_runtime.py:test_public_plba_package_exports_runtime_builder_and_worker_contract", + "span_start": 342, + "span_end": 405, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 13, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _build_runtime(worker: Worker, *, control_timeout: int = 1) -> tuple[RuntimeManager, str]:\n runtime = RuntimeManager()\n channel = HttpControlChannel(host=\"127.0.0.1\", port=0, timeout=control_timeout)\n runtime.control_plane.register_channel(channel)\n runtime.register_module(WorkerModule(worker))\n runtime.start()\n return runtime, f\"http://127.0.0.1:{channel.port}\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_build_runtime", + "span_start": 154, + "span_end": 160, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 6, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class IntervalRoutine:\n calls: list[float] = field(default_factory=list)\n _lock: Lock = field(default_factory=Lock)\n\n def run(self) -> None:\n with self._lock:\n self.calls.append(monotonic())\n\n def wait_runs(self, count: int, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n with self._lock:\n if len(self.calls) >= count:\n return True\n sleep(0.01)\n return False\n\n def deltas(self) -> list[float]:\n with self._lock:\n return [self.calls[index + 1] - self.calls[index] for index in range(len(self.calls) - 1)]", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:IntervalRoutine", + "span_start": 18, + "span_end": 37, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class ScenarioWorker(Worker):\n def __init__(self, name: str, routine: object, *, interval: float = 0.05) -> None:\n self._name = name\n self._routine = routine\n self._interval = interval\n self._thread: Thread | None = None\n self._stop_requested = Event()\n self._in_flight = 0\n self._runs = 0\n self._lock = Lock()\n\n @property\n def name(self) -> str:\n return self._name\n\n @property\n def critical(self) -> bool:\n return True\n\n def start(self) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._stop_requested.clear()\n self._thread = Thread(target=self._loop, name=f\"{self._name}-thread\", daemon=True)\n self._thread.start()\n\n def stop(self, force: bool = False) -> None:\n self._stop_requested.set()\n\n def health(self) -> WorkerHealth:\n return WorkerHealth(name=self.name, status=\"ok\", critical=True, meta={\"runs\": self._runs})\n\n def status(self) -> WorkerStatus:\n thread_alive = self._thread is not None and self._thread.is_alive()\n with self._lock:\n in_flight = self._in_flight\n runs = self._runs\n if not thread_alive:\n state = \"stopped\"\n elif self._stop_requested.is_set():\n state = \"stopping\"\n elif in_flight > 0:\n state = \"busy\"\n else:\n state = \"idle\"\n return WorkerStatus(name=self.name, state=state, in_flight=in_flight, meta={\"runs\": runs})\n\n def _loop(self) -> None:\n while not self._stop_requested.is_set():\n with self._lock:\n self._in_flight += 1\n try:\n self._routine.run()\n with self._lock:\n self._runs += 1\n finally:\n with self._lock:\n self._in_flight -= 1\n if self._stop_requested.is_set():\n return\n sleep(self._interval)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:ScenarioWorker", + "span_start": 50, + "span_end": 110, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 2, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _http_call_json(\n base_url: str,\n path: str,\n *,\n method: str = \"GET\",\n headers: dict[str, str] | None = None,\n) -> tuple[int, dict[str, object]]:\n request = Request(f\"{base_url}{path}\", method=method, headers=headers or {})\n try:\n with urlopen(request, timeout=15.0) as response:\n status = response.status\n body = response.read()\n except HTTPError as error:\n status = error.code\n body = error.read()\n payload = json.loads(body.decode(\"utf-8\"))\n return status, payload", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_http_call_json", + "span_start": 125, + "span_end": 141, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 4, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _poll_until_stopped(base_url: str, timeout: float = 2.0) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n _, payload = _http_call_json(base_url, \"/actions/status\")\n if payload.get(\"detail\") == \"stopped\":\n return True\n sleep(0.05)\n return False", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_poll_until_stopped", + "span_start": 144, + "span_end": 151, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 5, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def test_worker_wakes_up_with_configured_interval() -> None:\n interval = 0.15\n routine = IntervalRoutine()\n worker = ScenarioWorker(\"interval-worker\", routine, interval=interval)\n runtime = RuntimeManager()\n runtime.register_module(WorkerModule(worker))\n\n runtime.start()\n try:\n assert routine.wait_runs(count=3, timeout=2.0) is True\n finally:\n runtime.stop()\n\n deltas = routine.deltas()\n assert len(deltas) >= 2\n assert all(delta >= interval * 0.7 for delta in deltas[:2])", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:test_worker_wakes_up_with_configured_interval", + "span_start": 163, + "span_end": 178, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 7, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class WorkerModule(ApplicationModule):\n def __init__(self, worker: Worker) -> None:\n self._worker = worker\n\n @property\n def name(self) -> str:\n return \"business-tests\"\n\n def register(self, registry: ModuleRegistry) -> None:\n registry.add_worker(self._worker)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:WorkerModule", + "span_start": 113, + "span_end": 122, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 3, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class BlockingRoutine:\n def __init__(self, started: Event, release: Event) -> None:\n self._started = started\n self._release = release\n\n def run(self) -> None:\n self._started.set()\n self._release.wait(timeout=5.0)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:BlockingRoutine", + "span_start": 40, + "span_end": 47, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def test_actions_start_stop_and_health_when_worker_is_idle() -> None:\n runtime, base_url = _build_runtime(ScenarioWorker(\"idle-worker\", IntervalRoutine(), interval=0.2))\n try:\n stop_status, stop_payload = _http_call_json(base_url, \"/actions/stop\", method=\"POST\")\n assert stop_status == 200\n assert isinstance(stop_payload.get(\"detail\"), dict)\n assert stop_payload[\"detail\"][\"timed_out\"] is False\n assert stop_payload[\"detail\"][\"state\"] == \"stopped\"\n\n health_stopped_status, health_stopped_payload = _http_call_json(base_url, \"/health\")\n assert health_stopped_status == 503\n assert health_stopped_payload[\"state\"] == \"stopped\"\n assert health_stopped_payload[\"status\"] == \"unhealthy\"\n\n start_status, start_payload = _http_call_json(base_url, \"/actions/start\", method=\"POST\")\n assert start_status == 200\n assert isinstance(start_payload.get(\"detail\"), dict)\n assert start_payload[\"detail\"][\"timed_out\"] is False\n assert start_payload[\"detail\"][\"state\"] in {\"idle\", \"busy\"}\n\n health_started_status, health_started_payload = _http_call_json(base_url, \"/health\")\n assert health_started_status == 200\n assert health_started_payload[\"status\"] == \"ok\"\n assert health_started_payload[\"state\"] in {\"idle\", \"busy\"}\n finally:\n runtime.stop()", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:test_actions_start_stop_and_health_when_worker_is_idle", + "span_start": 181, + "span_end": 206, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 8, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C0_SOURCE_CHUNKS": 10 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src", + "tests" + ], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src", + "tests" + ], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "create_runtime", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Где тесты для create_runtime? test_create_runtime Testcreate_runtime create_runtime", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Где тесты для create_runtime? test_create_runtime Testcreate_runtime create_runtime", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 10, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 0, + "candidates_after_filter": 0 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src", + "tests" + ], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src", + "tests" + ], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 10, + "candidates_after_filter": 10 + } + ], + "fallback": { + "used": true, + "reason": "scope_relaxed_no_hits" + }, + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "create_runtime" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "miss", + "hit_count": 0, + "fail_reason": "scope_relaxed_no_hits" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 10, + "fail_reason": null + } + ] + }, + "constraint_violations": [ + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C1_SYMBOL_CATALOG", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + } + ], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 132, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 58, + "C2_DEPENDENCY_GRAPH": 55, + "C0_SOURCE_CHUNKS": 18 + }, + "merge_rank": 0 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Где тесты для create_runtime?", + "rag_count": 16 + }, + "output": { + "llm_answer": "Прямых тестов конкретно для функции `create_runtime` в предоставленном контексте не обнаружено." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 1022, + "evidence_rows": 16, + "evidence_chars": 9185 + }, + "evidence_summary": [ + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 2 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 10, + "unique_paths": 2 + } + ], + "prompt_template_id": "intent_code_qa_find_tests_ru_v4", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 1210 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-find-tests-create-runtime.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-find-tests-create-runtime.md new file mode 100644 index 0000000..84fc128 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-find-tests-create-runtime.md @@ -0,0 +1,32 @@ +# plba-v2-find-tests-create-runtime + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Где тесты для create_runtime? + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 16, + "llm_answer": "Прямых тестов конкретно для функции `create_runtime` в предоставленном контексте не обнаружено.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "create_runtime" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-find-tests-runtime-manager.json b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-find-tests-runtime-manager.json new file mode 100644 index 0000000..535789c --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-find-tests-runtime-manager.json @@ -0,0 +1,1879 @@ +{ + "case_id": "plba-v2-find-tests-runtime-manager", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 16, + "llm_answer": "Прямые тесты для RuntimeManager обнаружены в следующих местах:\n\n1. tests/test_runtime.py | test_runtime_graceful_stop_waits_until_worker_finishes\n - Проверка корректного завершения работы менеджера при выполнении остановки (graceful stop).\n \n2. tests/test_runtime.py | test_runtime_runs_worker_routine_and_exposes_status\n - Тестирование запуска рабочей рутины и доступности статуса RuntimeManager после старта и остановки.\n\nЭти тесты напрямую подтверждают поведение RuntimeManager через его инстанцирование и выполнение конкретных методов. Косвенные тесты также найдены:\n\n1. tests/test_business_control_actions.py | _build_runtime\n - Инстанцирует RuntimeManager в контексте построения бизнес-контроля действий.\n \n2. tests/test_business_control_actions.py | test_worker_wakes_up_with_configured_interval\n - Опять же использует RuntimeManager внутри теста проверки пробуждения рабочего процесса с заданным интервалом.\n\nТаким образом, оба типа покрытия присутствуют — и прямое, и косвенное.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-v2-find-tests-runtime-manager", + "text": "Где тесты для RuntimeManager?", + "mode": "full_chain", + "run_started_at": "2026-03-12T14:36:36", + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Где тесты для RuntimeManager?", + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "RuntimeManager" + ], + "confidence": 0.0 + }, + "rag_count": 16, + "rag_rows": [ + { + "path": "tests/test_runtime.py", + "content": "test_runtime_runs_worker_routine_and_exposes_status instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_runtime_runs_worker_routine_and_exposes_status:instantiates", + "span_start": 209, + "span_end": 209, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "c397a308e7824ba9fe400a754c7e15e66ea6f058d7f5d3e82bb002bb78b509d2", + "edge_type": "instantiates", + "src_symbol_id": "1c767eb5ee08e84f45b18c8ed7531ec0ed73c63fb1594823569672db7b21e992", + "src_qname": "test_runtime_runs_worker_routine_and_exposes_status", + "dst_symbol_id": "aeadc039653807b0da1ca6e3cc1078ee61cfc510b28e7f9c2ec04c59da43cc8d", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "test_runtime_graceful_stop_waits_until_worker_finishes instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_runtime_graceful_stop_waits_until_worker_finishes:instantiates", + "span_start": 229, + "span_end": 229, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "76b4701262ccaa0a7a41691407c4ebdb2ca74a2415d89f0a38ef0d4f608bda93", + "edge_type": "instantiates", + "src_symbol_id": "1076e788e4a03b10d7bc1313a8ad46caa170c13cc026c6e4de994af1a6ae57bf", + "src_qname": "test_runtime_graceful_stop_waits_until_worker_finishes", + "dst_symbol_id": "aeadc039653807b0da1ca6e3cc1078ee61cfc510b28e7f9c2ec04c59da43cc8d", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "_build_runtime instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "_build_runtime:instantiates", + "span_start": 155, + "span_end": 155, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "7eb254d564944bab6272757ee5ef688862bd321e6941e2495dc942e03b1c9a25", + "edge_type": "instantiates", + "src_symbol_id": "db94031d5245bf82be836a109b4584b43b8e83d37a0f318e03f6c8191896d469", + "src_qname": "_build_runtime", + "dst_symbol_id": "a1572ea8183dc0cd6ddbc74342bbde8c28cecfde37ad40b62feff09f8d103d11", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_worker_wakes_up_with_configured_interval instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_worker_wakes_up_with_configured_interval:instantiates", + "span_start": 167, + "span_end": 167, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "189aafc4de0b79c688668f25f0c87166a127df26bd2215452014713b65ef281a", + "edge_type": "instantiates", + "src_symbol_id": "65f877f78191d65e6a752e41cedc70ebc784c266804a55c1c56440336e1f0d6e", + "src_qname": "test_worker_wakes_up_with_configured_interval", + "dst_symbol_id": "a1572ea8183dc0cd6ddbc74342bbde8c28cecfde37ad40b62feff09f8d103d11", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_actions_stop_busy_worker_after_timeout\n -> BlockingRoutine\n -> BlockingRoutine.__init__\n -> BlockingRoutine._started\n -> BlockingRoutine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_actions_stop_busy_worker_after_timeout:dataflow_slice", + "span_start": 42, + "span_end": 238, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "8e7db3d2a9226f1c1d9942ac6373cfcafa0d2276758ddb8a3d3c455a3d58024d", + "edge_type": "dataflow_slice", + "src_symbol_id": "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "src_qname": "test_actions_stop_busy_worker_after_timeout", + "dst_symbol_id": "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04", + "dst_ref": "BlockingRoutine.run", + "resolution": "resolved", + "slice_id": "8e7db3d2a9226f1c1d9942ac6373cfcafa0d2276758ddb8a3d3c455a3d58024d", + "root_symbol_id": "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "path_symbols": [ + "test_actions_stop_busy_worker_after_timeout", + "BlockingRoutine", + "BlockingRoutine.__init__", + "BlockingRoutine._started", + "BlockingRoutine.run" + ], + "path_symbol_ids": [ + "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "a3349c5bc65e4003a4bbd6a8dbb7a54c337e12d1aed930caa701b12e520f1e67", + "486deeed3043c6db985aef258e96ddc67aa53608e67a83962fbd2471f649ddf1", + "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_actions_stop_busy_worker_before_timeout\n -> BlockingRoutine\n -> BlockingRoutine.__init__\n -> BlockingRoutine._release\n -> BlockingRoutine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_actions_stop_busy_worker_before_timeout:dataflow_slice", + "span_start": 43, + "span_end": 212, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "8bd726155ba387d3579763ee84dfd2f9a90bc917da88f3b2e89416ab5c1254d6", + "edge_type": "dataflow_slice", + "src_symbol_id": "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "src_qname": "test_actions_stop_busy_worker_before_timeout", + "dst_symbol_id": "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04", + "dst_ref": "BlockingRoutine.run", + "resolution": "resolved", + "slice_id": "8bd726155ba387d3579763ee84dfd2f9a90bc917da88f3b2e89416ab5c1254d6", + "root_symbol_id": "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "path_symbols": [ + "test_actions_stop_busy_worker_before_timeout", + "BlockingRoutine", + "BlockingRoutine.__init__", + "BlockingRoutine._release", + "BlockingRoutine.run" + ], + "path_symbol_ids": [ + "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "a3349c5bc65e4003a4bbd6a8dbb7a54c337e12d1aed930caa701b12e520f1e67", + "486deeed3043c6db985aef258e96ddc67aa53608e67a83962fbd2471f649ddf1", + "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "def test_runtime_graceful_stop_waits_until_worker_finishes() -> None:\n started = Event()\n release = Event()\n runtime = RuntimeManager()\n runtime.register_module(BlockingModule(started, release))\n runtime.start()\n assert started.wait(timeout=1.0) is True\n assert runtime.status()[\"runtime\"][\"state\"] == \"busy\"\n\n stop_thread = Thread(target=runtime.stop, kwargs={\"timeout\": 1.0}, daemon=True)\n stop_thread.start()\n sleep(0.1)\n assert stop_thread.is_alive() is True\n\n release.set()\n stop_thread.join(timeout=1.0)\n assert stop_thread.is_alive() is False\n assert runtime.status()[\"runtime\"][\"state\"] == \"stopped\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_runtime.py:test_runtime_graceful_stop_waits_until_worker_finishes", + "span_start": 226, + "span_end": 243, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 8, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "def test_runtime_runs_worker_routine_and_exposes_status(tmp_path) -> None:\n config_path = tmp_path / \"config.yml\"\n config_path.write_text(\n \"\"\"\nplatform:\n workers: 1\nlog:\n version: 1\n disable_existing_loggers: false\n handlers:\n console:\n class: logging.StreamHandler\n root:\n level: INFO\n handlers: [console]\n\"\"\".strip(),\n encoding=\"utf-8\",\n )\n runtime = RuntimeManager()\n runtime.add_config_file(config_path)\n module = ExampleModule()\n runtime.register_module(module)\n\n runtime.start()\n sleep(0.2)\n status = runtime.status()\n runtime.stop()\n\n assert module.routine.processed == [{\"id\": 1}]\n assert status[\"modules\"] == [\"example\"]\n assert status[\"runtime\"][\"state\"] == \"idle\"\n assert status[\"health\"][\"status\"] == \"ok\"\n assert status[\"config\"] == {\"platform\": {\"workers\": 1}, \"log\": status[\"config\"][\"log\"]}", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_runtime.py:test_runtime_runs_worker_routine_and_exposes_status", + "span_start": 191, + "span_end": 223, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 7, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _build_runtime(worker: Worker, *, control_timeout: int = 1) -> tuple[RuntimeManager, str]:\n runtime = RuntimeManager()\n channel = HttpControlChannel(host=\"127.0.0.1\", port=0, timeout=control_timeout)\n runtime.control_plane.register_channel(channel)\n runtime.register_module(WorkerModule(worker))\n runtime.start()\n return runtime, f\"http://127.0.0.1:{channel.port}\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_build_runtime", + "span_start": 154, + "span_end": 160, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 6, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def test_worker_wakes_up_with_configured_interval() -> None:\n interval = 0.15\n routine = IntervalRoutine()\n worker = ScenarioWorker(\"interval-worker\", routine, interval=interval)\n runtime = RuntimeManager()\n runtime.register_module(WorkerModule(worker))\n\n runtime.start()\n try:\n assert routine.wait_runs(count=3, timeout=2.0) is True\n finally:\n runtime.stop()\n\n deltas = routine.deltas()\n assert len(deltas) >= 2\n assert all(delta >= interval * 0.7 for delta in deltas[:2])", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:test_worker_wakes_up_with_configured_interval", + "span_start": 163, + "span_end": 178, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 7, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class BlockingRoutine:\n def __init__(self, started: Event, release: Event) -> None:\n self._started = started\n self._release = release\n\n def run(self) -> None:\n self._started.set()\n self._release.wait(timeout=5.0)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:BlockingRoutine", + "span_start": 40, + "span_end": 47, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class ScenarioWorker(Worker):\n def __init__(self, name: str, routine: object, *, interval: float = 0.05) -> None:\n self._name = name\n self._routine = routine\n self._interval = interval\n self._thread: Thread | None = None\n self._stop_requested = Event()\n self._in_flight = 0\n self._runs = 0\n self._lock = Lock()\n\n @property\n def name(self) -> str:\n return self._name\n\n @property\n def critical(self) -> bool:\n return True\n\n def start(self) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._stop_requested.clear()\n self._thread = Thread(target=self._loop, name=f\"{self._name}-thread\", daemon=True)\n self._thread.start()\n\n def stop(self, force: bool = False) -> None:\n self._stop_requested.set()\n\n def health(self) -> WorkerHealth:\n return WorkerHealth(name=self.name, status=\"ok\", critical=True, meta={\"runs\": self._runs})\n\n def status(self) -> WorkerStatus:\n thread_alive = self._thread is not None and self._thread.is_alive()\n with self._lock:\n in_flight = self._in_flight\n runs = self._runs\n if not thread_alive:\n state = \"stopped\"\n elif self._stop_requested.is_set():\n state = \"stopping\"\n elif in_flight > 0:\n state = \"busy\"\n else:\n state = \"idle\"\n return WorkerStatus(name=self.name, state=state, in_flight=in_flight, meta={\"runs\": runs})\n\n def _loop(self) -> None:\n while not self._stop_requested.is_set():\n with self._lock:\n self._in_flight += 1\n try:\n self._routine.run()\n with self._lock:\n self._runs += 1\n finally:\n with self._lock:\n self._in_flight -= 1\n if self._stop_requested.is_set():\n return\n sleep(self._interval)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:ScenarioWorker", + "span_start": 50, + "span_end": 110, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 2, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class WorkerModule(ApplicationModule):\n def __init__(self, worker: Worker) -> None:\n self._worker = worker\n\n @property\n def name(self) -> str:\n return \"business-tests\"\n\n def register(self, registry: ModuleRegistry) -> None:\n registry.add_worker(self._worker)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:WorkerModule", + "span_start": 113, + "span_end": 122, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 3, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _http_call_json(\n base_url: str,\n path: str,\n *,\n method: str = \"GET\",\n headers: dict[str, str] | None = None,\n) -> tuple[int, dict[str, object]]:\n request = Request(f\"{base_url}{path}\", method=method, headers=headers or {})\n try:\n with urlopen(request, timeout=15.0) as response:\n status = response.status\n body = response.read()\n except HTTPError as error:\n status = error.code\n body = error.read()\n payload = json.loads(body.decode(\"utf-8\"))\n return status, payload", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_http_call_json", + "span_start": 125, + "span_end": 141, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 4, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class IntervalRoutine:\n calls: list[float] = field(default_factory=list)\n _lock: Lock = field(default_factory=Lock)\n\n def run(self) -> None:\n with self._lock:\n self.calls.append(monotonic())\n\n def wait_runs(self, count: int, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n with self._lock:\n if len(self.calls) >= count:\n return True\n sleep(0.01)\n return False\n\n def deltas(self) -> list[float]:\n with self._lock:\n return [self.calls[index + 1] - self.calls[index] for index in range(len(self.calls) - 1)]", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:IntervalRoutine", + "span_start": 18, + "span_end": 37, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _poll_until_stopped(base_url: str, timeout: float = 2.0) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n _, payload = _http_call_json(base_url, \"/actions/status\")\n if payload.get(\"detail\") == \"stopped\":\n return True\n sleep(0.05)\n return False", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_poll_until_stopped", + "span_start": 144, + "span_end": 151, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 5, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "Прямые тесты для RuntimeManager обнаружены в следующих местах:\n\n1. tests/test_runtime.py | test_runtime_graceful_stop_waits_until_worker_finishes\n - Проверка корректного завершения работы менеджера при выполнении остановки (graceful stop).\n \n2. tests/test_runtime.py | test_runtime_runs_worker_routine_and_exposes_status\n - Тестирование запуска рабочей рутины и доступности статуса RuntimeManager после старта и остановки.\n\nЭти тесты напрямую подтверждают поведение RuntimeManager через его инстанцирование и выполнение конкретных методов. Косвенные тесты также найдены:\n\n1. tests/test_business_control_actions.py | _build_runtime\n - Инстанцирует RuntimeManager в контексте построения бизнес-контроля действий.\n \n2. tests/test_business_control_actions.py | test_worker_wakes_up_with_configured_interval\n - Опять же использует RuntimeManager внутри теста проверки пробуждения рабочего процесса с заданным интервалом.\n\nТаким образом, оба типа покрытия присутствуют — и прямое, и косвенное.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C2_DEPENDENCY_GRAPH" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "test_file_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "test_symbol_patterns": [ + "test_runtime_manager", + "TestRuntimeManager", + "RuntimeManager" + ], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C0_SOURCE_CHUNKS": 10 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src", + "tests" + ], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src", + "tests" + ], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Где тесты для RuntimeManager? test_runtime_manager TestRuntimeManager RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Где тесты для RuntimeManager? test_runtime_manager TestRuntimeManager RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 10, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 0, + "candidates_after_filter": 0 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src", + "tests" + ], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src", + "tests" + ], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 10, + "candidates_after_filter": 10 + } + ], + "fallback": { + "used": true, + "reason": "scope_relaxed_no_hits" + }, + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "RuntimeManager" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "miss", + "hit_count": 0, + "fail_reason": "scope_relaxed_no_hits" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 10, + "fail_reason": null + } + ] + }, + "constraint_violations": [ + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C1_SYMBOL_CATALOG", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + } + ], + "timings_ms": { + "router": 1, + "symbol_resolution": 0, + "retrieval_total": 149, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 80, + "C2_DEPENDENCY_GRAPH": 51, + "C0_SOURCE_CHUNKS": 16 + }, + "merge_rank": 0, + "prompt_build": 0, + "llm_call": 1629 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 946, + "evidence_rows": 16, + "evidence_chars": 7086 + }, + "evidence_summary": [ + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 2 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 10, + "unique_paths": 2 + } + ], + "prompt_template_id": "intent_code_qa_find_tests_ru_v4", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "RuntimeManager" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 16, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-v2-find-tests-runtime-manager", + "mode": "full_chain", + "run_started_at": "2026-03-12T14:36:36", + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Где тесты для RuntimeManager?", + "normalized_query": "Где тесты для RuntimeManager?" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Где тесты для RuntimeManager?" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Где тесты для RuntimeManager?" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "test_file_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "test_symbol_patterns": [ + "test_runtime_manager", + "TestRuntimeManager", + "RuntimeManager" + ], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 1 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Где тесты для RuntimeManager?" + }, + "output": { + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "RuntimeManager" + ], + "confidence": 0.0 + }, + "rag_count": 16, + "rag_rows": [ + { + "path": "tests/test_runtime.py", + "content": "test_runtime_runs_worker_routine_and_exposes_status instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_runtime_runs_worker_routine_and_exposes_status:instantiates", + "span_start": 209, + "span_end": 209, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "c397a308e7824ba9fe400a754c7e15e66ea6f058d7f5d3e82bb002bb78b509d2", + "edge_type": "instantiates", + "src_symbol_id": "1c767eb5ee08e84f45b18c8ed7531ec0ed73c63fb1594823569672db7b21e992", + "src_qname": "test_runtime_runs_worker_routine_and_exposes_status", + "dst_symbol_id": "aeadc039653807b0da1ca6e3cc1078ee61cfc510b28e7f9c2ec04c59da43cc8d", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "test_runtime_graceful_stop_waits_until_worker_finishes instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_runtime_graceful_stop_waits_until_worker_finishes:instantiates", + "span_start": 229, + "span_end": 229, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "76b4701262ccaa0a7a41691407c4ebdb2ca74a2415d89f0a38ef0d4f608bda93", + "edge_type": "instantiates", + "src_symbol_id": "1076e788e4a03b10d7bc1313a8ad46caa170c13cc026c6e4de994af1a6ae57bf", + "src_qname": "test_runtime_graceful_stop_waits_until_worker_finishes", + "dst_symbol_id": "aeadc039653807b0da1ca6e3cc1078ee61cfc510b28e7f9c2ec04c59da43cc8d", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "_build_runtime instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "_build_runtime:instantiates", + "span_start": 155, + "span_end": 155, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "7eb254d564944bab6272757ee5ef688862bd321e6941e2495dc942e03b1c9a25", + "edge_type": "instantiates", + "src_symbol_id": "db94031d5245bf82be836a109b4584b43b8e83d37a0f318e03f6c8191896d469", + "src_qname": "_build_runtime", + "dst_symbol_id": "a1572ea8183dc0cd6ddbc74342bbde8c28cecfde37ad40b62feff09f8d103d11", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_worker_wakes_up_with_configured_interval instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_worker_wakes_up_with_configured_interval:instantiates", + "span_start": 167, + "span_end": 167, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "189aafc4de0b79c688668f25f0c87166a127df26bd2215452014713b65ef281a", + "edge_type": "instantiates", + "src_symbol_id": "65f877f78191d65e6a752e41cedc70ebc784c266804a55c1c56440336e1f0d6e", + "src_qname": "test_worker_wakes_up_with_configured_interval", + "dst_symbol_id": "a1572ea8183dc0cd6ddbc74342bbde8c28cecfde37ad40b62feff09f8d103d11", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_actions_stop_busy_worker_after_timeout\n -> BlockingRoutine\n -> BlockingRoutine.__init__\n -> BlockingRoutine._started\n -> BlockingRoutine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_actions_stop_busy_worker_after_timeout:dataflow_slice", + "span_start": 42, + "span_end": 238, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "8e7db3d2a9226f1c1d9942ac6373cfcafa0d2276758ddb8a3d3c455a3d58024d", + "edge_type": "dataflow_slice", + "src_symbol_id": "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "src_qname": "test_actions_stop_busy_worker_after_timeout", + "dst_symbol_id": "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04", + "dst_ref": "BlockingRoutine.run", + "resolution": "resolved", + "slice_id": "8e7db3d2a9226f1c1d9942ac6373cfcafa0d2276758ddb8a3d3c455a3d58024d", + "root_symbol_id": "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "path_symbols": [ + "test_actions_stop_busy_worker_after_timeout", + "BlockingRoutine", + "BlockingRoutine.__init__", + "BlockingRoutine._started", + "BlockingRoutine.run" + ], + "path_symbol_ids": [ + "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "a3349c5bc65e4003a4bbd6a8dbb7a54c337e12d1aed930caa701b12e520f1e67", + "486deeed3043c6db985aef258e96ddc67aa53608e67a83962fbd2471f649ddf1", + "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_actions_stop_busy_worker_before_timeout\n -> BlockingRoutine\n -> BlockingRoutine.__init__\n -> BlockingRoutine._release\n -> BlockingRoutine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_actions_stop_busy_worker_before_timeout:dataflow_slice", + "span_start": 43, + "span_end": 212, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "8bd726155ba387d3579763ee84dfd2f9a90bc917da88f3b2e89416ab5c1254d6", + "edge_type": "dataflow_slice", + "src_symbol_id": "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "src_qname": "test_actions_stop_busy_worker_before_timeout", + "dst_symbol_id": "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04", + "dst_ref": "BlockingRoutine.run", + "resolution": "resolved", + "slice_id": "8bd726155ba387d3579763ee84dfd2f9a90bc917da88f3b2e89416ab5c1254d6", + "root_symbol_id": "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "path_symbols": [ + "test_actions_stop_busy_worker_before_timeout", + "BlockingRoutine", + "BlockingRoutine.__init__", + "BlockingRoutine._release", + "BlockingRoutine.run" + ], + "path_symbol_ids": [ + "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "a3349c5bc65e4003a4bbd6a8dbb7a54c337e12d1aed930caa701b12e520f1e67", + "486deeed3043c6db985aef258e96ddc67aa53608e67a83962fbd2471f649ddf1", + "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "def test_runtime_graceful_stop_waits_until_worker_finishes() -> None:\n started = Event()\n release = Event()\n runtime = RuntimeManager()\n runtime.register_module(BlockingModule(started, release))\n runtime.start()\n assert started.wait(timeout=1.0) is True\n assert runtime.status()[\"runtime\"][\"state\"] == \"busy\"\n\n stop_thread = Thread(target=runtime.stop, kwargs={\"timeout\": 1.0}, daemon=True)\n stop_thread.start()\n sleep(0.1)\n assert stop_thread.is_alive() is True\n\n release.set()\n stop_thread.join(timeout=1.0)\n assert stop_thread.is_alive() is False\n assert runtime.status()[\"runtime\"][\"state\"] == \"stopped\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_runtime.py:test_runtime_graceful_stop_waits_until_worker_finishes", + "span_start": 226, + "span_end": 243, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 8, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "def test_runtime_runs_worker_routine_and_exposes_status(tmp_path) -> None:\n config_path = tmp_path / \"config.yml\"\n config_path.write_text(\n \"\"\"\nplatform:\n workers: 1\nlog:\n version: 1\n disable_existing_loggers: false\n handlers:\n console:\n class: logging.StreamHandler\n root:\n level: INFO\n handlers: [console]\n\"\"\".strip(),\n encoding=\"utf-8\",\n )\n runtime = RuntimeManager()\n runtime.add_config_file(config_path)\n module = ExampleModule()\n runtime.register_module(module)\n\n runtime.start()\n sleep(0.2)\n status = runtime.status()\n runtime.stop()\n\n assert module.routine.processed == [{\"id\": 1}]\n assert status[\"modules\"] == [\"example\"]\n assert status[\"runtime\"][\"state\"] == \"idle\"\n assert status[\"health\"][\"status\"] == \"ok\"\n assert status[\"config\"] == {\"platform\": {\"workers\": 1}, \"log\": status[\"config\"][\"log\"]}", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_runtime.py:test_runtime_runs_worker_routine_and_exposes_status", + "span_start": 191, + "span_end": 223, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 7, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _build_runtime(worker: Worker, *, control_timeout: int = 1) -> tuple[RuntimeManager, str]:\n runtime = RuntimeManager()\n channel = HttpControlChannel(host=\"127.0.0.1\", port=0, timeout=control_timeout)\n runtime.control_plane.register_channel(channel)\n runtime.register_module(WorkerModule(worker))\n runtime.start()\n return runtime, f\"http://127.0.0.1:{channel.port}\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_build_runtime", + "span_start": 154, + "span_end": 160, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 6, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def test_worker_wakes_up_with_configured_interval() -> None:\n interval = 0.15\n routine = IntervalRoutine()\n worker = ScenarioWorker(\"interval-worker\", routine, interval=interval)\n runtime = RuntimeManager()\n runtime.register_module(WorkerModule(worker))\n\n runtime.start()\n try:\n assert routine.wait_runs(count=3, timeout=2.0) is True\n finally:\n runtime.stop()\n\n deltas = routine.deltas()\n assert len(deltas) >= 2\n assert all(delta >= interval * 0.7 for delta in deltas[:2])", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:test_worker_wakes_up_with_configured_interval", + "span_start": 163, + "span_end": 178, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 7, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class BlockingRoutine:\n def __init__(self, started: Event, release: Event) -> None:\n self._started = started\n self._release = release\n\n def run(self) -> None:\n self._started.set()\n self._release.wait(timeout=5.0)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:BlockingRoutine", + "span_start": 40, + "span_end": 47, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class ScenarioWorker(Worker):\n def __init__(self, name: str, routine: object, *, interval: float = 0.05) -> None:\n self._name = name\n self._routine = routine\n self._interval = interval\n self._thread: Thread | None = None\n self._stop_requested = Event()\n self._in_flight = 0\n self._runs = 0\n self._lock = Lock()\n\n @property\n def name(self) -> str:\n return self._name\n\n @property\n def critical(self) -> bool:\n return True\n\n def start(self) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._stop_requested.clear()\n self._thread = Thread(target=self._loop, name=f\"{self._name}-thread\", daemon=True)\n self._thread.start()\n\n def stop(self, force: bool = False) -> None:\n self._stop_requested.set()\n\n def health(self) -> WorkerHealth:\n return WorkerHealth(name=self.name, status=\"ok\", critical=True, meta={\"runs\": self._runs})\n\n def status(self) -> WorkerStatus:\n thread_alive = self._thread is not None and self._thread.is_alive()\n with self._lock:\n in_flight = self._in_flight\n runs = self._runs\n if not thread_alive:\n state = \"stopped\"\n elif self._stop_requested.is_set():\n state = \"stopping\"\n elif in_flight > 0:\n state = \"busy\"\n else:\n state = \"idle\"\n return WorkerStatus(name=self.name, state=state, in_flight=in_flight, meta={\"runs\": runs})\n\n def _loop(self) -> None:\n while not self._stop_requested.is_set():\n with self._lock:\n self._in_flight += 1\n try:\n self._routine.run()\n with self._lock:\n self._runs += 1\n finally:\n with self._lock:\n self._in_flight -= 1\n if self._stop_requested.is_set():\n return\n sleep(self._interval)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:ScenarioWorker", + "span_start": 50, + "span_end": 110, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 2, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class WorkerModule(ApplicationModule):\n def __init__(self, worker: Worker) -> None:\n self._worker = worker\n\n @property\n def name(self) -> str:\n return \"business-tests\"\n\n def register(self, registry: ModuleRegistry) -> None:\n registry.add_worker(self._worker)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:WorkerModule", + "span_start": 113, + "span_end": 122, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 3, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _http_call_json(\n base_url: str,\n path: str,\n *,\n method: str = \"GET\",\n headers: dict[str, str] | None = None,\n) -> tuple[int, dict[str, object]]:\n request = Request(f\"{base_url}{path}\", method=method, headers=headers or {})\n try:\n with urlopen(request, timeout=15.0) as response:\n status = response.status\n body = response.read()\n except HTTPError as error:\n status = error.code\n body = error.read()\n payload = json.loads(body.decode(\"utf-8\"))\n return status, payload", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_http_call_json", + "span_start": 125, + "span_end": 141, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 4, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class IntervalRoutine:\n calls: list[float] = field(default_factory=list)\n _lock: Lock = field(default_factory=Lock)\n\n def run(self) -> None:\n with self._lock:\n self.calls.append(monotonic())\n\n def wait_runs(self, count: int, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n with self._lock:\n if len(self.calls) >= count:\n return True\n sleep(0.01)\n return False\n\n def deltas(self) -> list[float]:\n with self._lock:\n return [self.calls[index + 1] - self.calls[index] for index in range(len(self.calls) - 1)]", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:IntervalRoutine", + "span_start": 18, + "span_end": 37, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _poll_until_stopped(base_url: str, timeout: float = 2.0) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n _, payload = _http_call_json(base_url, \"/actions/status\")\n if payload.get(\"detail\") == \"stopped\":\n return True\n sleep(0.05)\n return False", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_poll_until_stopped", + "span_start": 144, + "span_end": 151, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 5, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C0_SOURCE_CHUNKS": 10 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src", + "tests" + ], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src", + "tests" + ], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Где тесты для RuntimeManager? test_runtime_manager TestRuntimeManager RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Где тесты для RuntimeManager? test_runtime_manager TestRuntimeManager RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 10, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 0, + "candidates_after_filter": 0 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src", + "tests" + ], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src", + "tests" + ], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 10, + "candidates_after_filter": 10 + } + ], + "fallback": { + "used": true, + "reason": "scope_relaxed_no_hits" + }, + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "RuntimeManager" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "miss", + "hit_count": 0, + "fail_reason": "scope_relaxed_no_hits" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 10, + "fail_reason": null + } + ] + }, + "constraint_violations": [ + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C1_SYMBOL_CATALOG", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + } + ], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 149, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 80, + "C2_DEPENDENCY_GRAPH": 51, + "C0_SOURCE_CHUNKS": 16 + }, + "merge_rank": 0 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Где тесты для RuntimeManager?", + "rag_count": 16 + }, + "output": { + "llm_answer": "Прямые тесты для RuntimeManager обнаружены в следующих местах:\n\n1. tests/test_runtime.py | test_runtime_graceful_stop_waits_until_worker_finishes\n - Проверка корректного завершения работы менеджера при выполнении остановки (graceful stop).\n \n2. tests/test_runtime.py | test_runtime_runs_worker_routine_and_exposes_status\n - Тестирование запуска рабочей рутины и доступности статуса RuntimeManager после старта и остановки.\n\nЭти тесты напрямую подтверждают поведение RuntimeManager через его инстанцирование и выполнение конкретных методов. Косвенные тесты также найдены:\n\n1. tests/test_business_control_actions.py | _build_runtime\n - Инстанцирует RuntimeManager в контексте построения бизнес-контроля действий.\n \n2. tests/test_business_control_actions.py | test_worker_wakes_up_with_configured_interval\n - Опять же использует RuntimeManager внутри теста проверки пробуждения рабочего процесса с заданным интервалом.\n\nТаким образом, оба типа покрытия присутствуют — и прямое, и косвенное." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 946, + "evidence_rows": 16, + "evidence_chars": 7086 + }, + "evidence_summary": [ + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 2 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 10, + "unique_paths": 2 + } + ], + "prompt_template_id": "intent_code_qa_find_tests_ru_v4", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 1629 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-find-tests-runtime-manager.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-find-tests-runtime-manager.md new file mode 100644 index 0000000..28efff7 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-find-tests-runtime-manager.md @@ -0,0 +1,32 @@ +# plba-v2-find-tests-runtime-manager + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Где тесты для RuntimeManager? + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 16, + "llm_answer": "Прямые тесты для RuntimeManager обнаружены в следующих местах:\n\n1. tests/test_runtime.py | test_runtime_graceful_stop_waits_until_worker_finishes\n - Проверка корректного завершения работы менеджера при выполнении остановки (graceful stop).\n \n2. tests/test_runtime.py | test_runtime_runs_worker_routine_and_exposes_status\n - Тестирование запуска рабочей рутины и доступности статуса RuntimeManager после старта и остановки.\n\nЭти тесты напрямую подтверждают поведение RuntimeManager через его инстанцирование и выполнение конкретных методов. Косвенные тесты также найдены:\n\n1. tests/test_business_control_actions.py | _build_runtime\n - Инстанцирует RuntimeManager в контексте построения бизнес-контроля действий.\n \n2. tests/test_business_control_actions.py | test_worker_wakes_up_with_configured_interval\n - Опять же использует RuntimeManager внутри теста проверки пробуждения рабочего процесса с заданным интервалом.\n\nТаким образом, оба типа покрытия присутствуют — и прямое, и косвенное.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-find-tests-trace-service.json b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-find-tests-trace-service.json new file mode 100644 index 0000000..52e7b6e --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-find-tests-trace-service.json @@ -0,0 +1,2047 @@ +{ + "case_id": "plba-v2-find-tests-trace-service", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 16, + "llm_answer": "Прямых тестов конкретно для `TraceService` в указанном контексте нет. Связь с сущностью не подтверждается именами функций, модулями или явными вызовами `TraceService`.\n\nОднако имеются косвенные тесты, которые косвенно затрагивают поведение `TraceService`, взаимодействуя через посредника (`RecordingTransport`), например:\n\n- tests/test_runtime.py: \n - Проверка записи контекстов и сообщений (метод `write_context`) при создании трассировочного сервиса.\n \nЭти тесты косвенно подтверждают корректность работы методов, связанных с `TraceService`. Тем не менее, напрямую тесты `TraceService` отсутствуют.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "TraceService" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-v2-find-tests-trace-service", + "text": "Где тесты для TraceService?", + "mode": "full_chain", + "run_started_at": "2026-03-12T14:36:36", + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Где тесты для TraceService?", + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "TraceService" + ], + "confidence": 0.0 + }, + "rag_count": 16, + "rag_rows": [ + { + "path": "tests/test_runtime.py", + "content": "test_trace_service_writes_contexts_and_messages\n -> RecordingTransport\n -> RecordingTransport.__init__\n -> RecordingTransport.contexts\n -> test_trace_service_writes_contexts_and_messages", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_trace_service_writes_contexts_and_messages:dataflow_slice", + "span_start": 181, + "span_end": 256, + "lexical_rank": 4, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "1636a2f70dee79c804259dc114af6c1ab4db27099911e5f97ac97a2bcb59be8a", + "edge_type": "dataflow_slice", + "src_symbol_id": "1600da201da1d0150240b400e3232172354156decdd1a04e1ab1a1edcd3a7e99", + "src_qname": "test_trace_service_writes_contexts_and_messages", + "dst_symbol_id": "1600da201da1d0150240b400e3232172354156decdd1a04e1ab1a1edcd3a7e99", + "dst_ref": "test_trace_service_writes_contexts_and_messages", + "resolution": "resolved", + "slice_id": "1636a2f70dee79c804259dc114af6c1ab4db27099911e5f97ac97a2bcb59be8a", + "root_symbol_id": "1600da201da1d0150240b400e3232172354156decdd1a04e1ab1a1edcd3a7e99", + "path_symbols": [ + "test_trace_service_writes_contexts_and_messages", + "RecordingTransport", + "RecordingTransport.__init__", + "RecordingTransport.contexts", + "test_trace_service_writes_contexts_and_messages" + ], + "path_symbol_ids": [ + "1600da201da1d0150240b400e3232172354156decdd1a04e1ab1a1edcd3a7e99", + "e3d635de1f1880673b69bf73ca6a45caffa5c7fdc23d589d5e40f76b86bdcd33", + "e34d80da723a7115a7a7586b52dc8b5cfda05c581509eee0c1a0296df9a340cb", + "1600da201da1d0150240b400e3232172354156decdd1a04e1ab1a1edcd3a7e99" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "test_trace_service_writes_contexts_and_messages\n -> RecordingTransport\n -> RecordingTransport.__init__\n -> RecordingTransport.contexts\n -> test_trace_service_allows_messages_without_status", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_trace_service_writes_contexts_and_messages:dataflow_slice", + "span_start": 181, + "span_end": 293, + "lexical_rank": 4, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "5db5abe56b73f884c5178647bd25ef150064a94a41fc8c052aebaa09bd7fdb3d", + "edge_type": "dataflow_slice", + "src_symbol_id": "1600da201da1d0150240b400e3232172354156decdd1a04e1ab1a1edcd3a7e99", + "src_qname": "test_trace_service_writes_contexts_and_messages", + "dst_symbol_id": "7127ca85ce6447928e195e901d36f1e1f1e8205a686e567c2d1b187431f989df", + "dst_ref": "test_trace_service_allows_messages_without_status", + "resolution": "resolved", + "slice_id": "5db5abe56b73f884c5178647bd25ef150064a94a41fc8c052aebaa09bd7fdb3d", + "root_symbol_id": "1600da201da1d0150240b400e3232172354156decdd1a04e1ab1a1edcd3a7e99", + "path_symbols": [ + "test_trace_service_writes_contexts_and_messages", + "RecordingTransport", + "RecordingTransport.__init__", + "RecordingTransport.contexts", + "test_trace_service_allows_messages_without_status" + ], + "path_symbol_ids": [ + "1600da201da1d0150240b400e3232172354156decdd1a04e1ab1a1edcd3a7e99", + "e3d635de1f1880673b69bf73ca6a45caffa5c7fdc23d589d5e40f76b86bdcd33", + "e34d80da723a7115a7a7586b52dc8b5cfda05c581509eee0c1a0296df9a340cb", + "7127ca85ce6447928e195e901d36f1e1f1e8205a686e567c2d1b187431f989df" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "test_trace_service_writes_contexts_and_messages\n -> RecordingTransport\n -> RecordingTransport.__init__\n -> RecordingTransport.contexts\n -> RecordingTransport.write_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_trace_service_writes_contexts_and_messages:dataflow_slice", + "span_start": 181, + "span_end": 249, + "lexical_rank": 4, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "60d7a8655fa4c53d9130ce342fc023d24ccfa16baea47ad60c91d2d49f547565", + "edge_type": "dataflow_slice", + "src_symbol_id": "1600da201da1d0150240b400e3232172354156decdd1a04e1ab1a1edcd3a7e99", + "src_qname": "test_trace_service_writes_contexts_and_messages", + "dst_symbol_id": "b8bbf341e230198caafe54727e13f2db27b7200d6fd95684fc5cf748db1a0e88", + "dst_ref": "RecordingTransport.write_context", + "resolution": "resolved", + "slice_id": "60d7a8655fa4c53d9130ce342fc023d24ccfa16baea47ad60c91d2d49f547565", + "root_symbol_id": "1600da201da1d0150240b400e3232172354156decdd1a04e1ab1a1edcd3a7e99", + "path_symbols": [ + "test_trace_service_writes_contexts_and_messages", + "RecordingTransport", + "RecordingTransport.__init__", + "RecordingTransport.contexts", + "RecordingTransport.write_context" + ], + "path_symbol_ids": [ + "1600da201da1d0150240b400e3232172354156decdd1a04e1ab1a1edcd3a7e99", + "e3d635de1f1880673b69bf73ca6a45caffa5c7fdc23d589d5e40f76b86bdcd33", + "e34d80da723a7115a7a7586b52dc8b5cfda05c581509eee0c1a0296df9a340cb", + "b8bbf341e230198caafe54727e13f2db27b7200d6fd95684fc5cf748db1a0e88" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "test_trace_service_supports_debug_warning_and_error_levels\n -> RecordingTransport\n -> RecordingTransport.__init__\n -> RecordingTransport.contexts\n -> RecordingTransport.write_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_trace_service_supports_debug_warning_and_error_levels:dataflow_slice", + "span_start": 181, + "span_end": 265, + "lexical_rank": 4, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "1372a2241c7265705e5cf9dceeb5e59836fac1d679227c4279ed39e0798ddddf", + "edge_type": "dataflow_slice", + "src_symbol_id": "ede183f1c546725064e28ddab1ffdbae0d1a1258fd62a50eb556c10d10995415", + "src_qname": "test_trace_service_supports_debug_warning_and_error_levels", + "dst_symbol_id": "b8bbf341e230198caafe54727e13f2db27b7200d6fd95684fc5cf748db1a0e88", + "dst_ref": "RecordingTransport.write_context", + "resolution": "resolved", + "slice_id": "1372a2241c7265705e5cf9dceeb5e59836fac1d679227c4279ed39e0798ddddf", + "root_symbol_id": "ede183f1c546725064e28ddab1ffdbae0d1a1258fd62a50eb556c10d10995415", + "path_symbols": [ + "test_trace_service_supports_debug_warning_and_error_levels", + "RecordingTransport", + "RecordingTransport.__init__", + "RecordingTransport.contexts", + "RecordingTransport.write_context" + ], + "path_symbol_ids": [ + "ede183f1c546725064e28ddab1ffdbae0d1a1258fd62a50eb556c10d10995415", + "e3d635de1f1880673b69bf73ca6a45caffa5c7fdc23d589d5e40f76b86bdcd33", + "e34d80da723a7115a7a7586b52dc8b5cfda05c581509eee0c1a0296df9a340cb", + "b8bbf341e230198caafe54727e13f2db27b7200d6fd95684fc5cf748db1a0e88" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "test_trace_service_supports_debug_warning_and_error_levels\n -> RecordingTransport\n -> RecordingTransport.__init__\n -> RecordingTransport.contexts\n -> test_trace_service_writes_contexts_and_messages", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_trace_service_supports_debug_warning_and_error_levels:dataflow_slice", + "span_start": 181, + "span_end": 265, + "lexical_rank": 4, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "8b6a5a738525df160600d71c15915704172de20db436ea2f84b6e039be396a2d", + "edge_type": "dataflow_slice", + "src_symbol_id": "ede183f1c546725064e28ddab1ffdbae0d1a1258fd62a50eb556c10d10995415", + "src_qname": "test_trace_service_supports_debug_warning_and_error_levels", + "dst_symbol_id": "1600da201da1d0150240b400e3232172354156decdd1a04e1ab1a1edcd3a7e99", + "dst_ref": "test_trace_service_writes_contexts_and_messages", + "resolution": "resolved", + "slice_id": "8b6a5a738525df160600d71c15915704172de20db436ea2f84b6e039be396a2d", + "root_symbol_id": "ede183f1c546725064e28ddab1ffdbae0d1a1258fd62a50eb556c10d10995415", + "path_symbols": [ + "test_trace_service_supports_debug_warning_and_error_levels", + "RecordingTransport", + "RecordingTransport.__init__", + "RecordingTransport.contexts", + "test_trace_service_writes_contexts_and_messages" + ], + "path_symbol_ids": [ + "ede183f1c546725064e28ddab1ffdbae0d1a1258fd62a50eb556c10d10995415", + "e3d635de1f1880673b69bf73ca6a45caffa5c7fdc23d589d5e40f76b86bdcd33", + "e34d80da723a7115a7a7586b52dc8b5cfda05c581509eee0c1a0296df9a340cb", + "1600da201da1d0150240b400e3232172354156decdd1a04e1ab1a1edcd3a7e99" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "test_trace_service_supports_debug_warning_and_error_levels\n -> RecordingTransport\n -> RecordingTransport.__init__\n -> RecordingTransport.contexts\n -> test_trace_service_allows_messages_without_status", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_trace_service_supports_debug_warning_and_error_levels:dataflow_slice", + "span_start": 181, + "span_end": 293, + "lexical_rank": 4, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "f7d099f6d5746aa61a3025fd7eef791369bd3a3e5df4bc716de87e7b149ccde6", + "edge_type": "dataflow_slice", + "src_symbol_id": "ede183f1c546725064e28ddab1ffdbae0d1a1258fd62a50eb556c10d10995415", + "src_qname": "test_trace_service_supports_debug_warning_and_error_levels", + "dst_symbol_id": "7127ca85ce6447928e195e901d36f1e1f1e8205a686e567c2d1b187431f989df", + "dst_ref": "test_trace_service_allows_messages_without_status", + "resolution": "resolved", + "slice_id": "f7d099f6d5746aa61a3025fd7eef791369bd3a3e5df4bc716de87e7b149ccde6", + "root_symbol_id": "ede183f1c546725064e28ddab1ffdbae0d1a1258fd62a50eb556c10d10995415", + "path_symbols": [ + "test_trace_service_supports_debug_warning_and_error_levels", + "RecordingTransport", + "RecordingTransport.__init__", + "RecordingTransport.contexts", + "test_trace_service_allows_messages_without_status" + ], + "path_symbol_ids": [ + "ede183f1c546725064e28ddab1ffdbae0d1a1258fd62a50eb556c10d10995415", + "e3d635de1f1880673b69bf73ca6a45caffa5c7fdc23d589d5e40f76b86bdcd33", + "e34d80da723a7115a7a7586b52dc8b5cfda05c581509eee0c1a0296df9a340cb", + "7127ca85ce6447928e195e901d36f1e1f1e8205a686e567c2d1b187431f989df" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "def test_trace_service_writes_contexts_and_messages() -> None:\n from app_runtime.tracing.service import TraceService\n\n transport = RecordingTransport()\n manager = TraceService(transport=transport)\n\n with manager.open_context(alias=\"worker\", kind=\"worker\", attrs={\"routine\": \"incoming\"}):\n manager.step(\"parse\")\n manager.info(\"started\", status=\"ok\", attrs={\"attempt\": 1})\n\n assert len(transport.contexts) == 1\n assert len(transport.messages) == 1\n assert transport.contexts[0].alias == \"worker\"\n assert transport.messages[0].step == \"parse\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_runtime.py:test_trace_service_writes_contexts_and_messages", + "span_start": 246, + "span_end": 259, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 9, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "def test_trace_service_supports_debug_warning_and_error_levels() -> None:\n from app_runtime.tracing.service import TraceService\n\n transport = RecordingTransport()\n manager = TraceService(transport=transport)\n\n with manager.open_context(alias=\"worker\", kind=\"worker\", attrs={\"routine\": \"incoming\"}):\n manager.step(\"validate\")\n manager.debug(\"validation details\", attrs={\"rule\": \"basic\"})\n manager.warning(\"validation warning\", status=\"degraded\", attrs={\"attempt\": 1})\n manager.error(\"integration failed\", status=\"failed\", attrs={\"integration\": \"crm\"})\n manager.exception(\"caught exception\", attrs={\"exception_type\": \"RuntimeError\"})\n\n levels = [message.level for message in transport.messages]\n assert levels == [\"DEBUG\", \"WARNING\", \"ERROR\", \"ERROR\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_runtime.py:test_trace_service_supports_debug_warning_and_error_levels", + "span_start": 262, + "span_end": 276, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 10, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "def test_trace_service_allows_messages_without_status() -> None:\n from app_runtime.tracing.service import TraceService\n\n transport = RecordingTransport()\n manager = TraceService(transport=transport)\n\n with manager.open_context(alias=\"worker\", kind=\"worker\"):\n manager.step(\"optional-status\")\n manager.debug(\"debug without status\")\n manager.info(\"info without status\")\n manager.warning(\"warning without status\")\n manager.error(\"error without status\")\n\n assert [message.status for message in transport.messages] == [\"\", \"\", \"\", \"\"]\n assert all(message.trace_id == transport.contexts[0].trace_id for message in transport.messages)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_runtime.py:test_trace_service_allows_messages_without_status", + "span_start": 279, + "span_end": 293, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 11, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class ScenarioWorker(Worker):\n def __init__(self, name: str, routine: object, *, interval: float = 0.05) -> None:\n self._name = name\n self._routine = routine\n self._interval = interval\n self._thread: Thread | None = None\n self._stop_requested = Event()\n self._in_flight = 0\n self._runs = 0\n self._lock = Lock()\n\n @property\n def name(self) -> str:\n return self._name\n\n @property\n def critical(self) -> bool:\n return True\n\n def start(self) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._stop_requested.clear()\n self._thread = Thread(target=self._loop, name=f\"{self._name}-thread\", daemon=True)\n self._thread.start()\n\n def stop(self, force: bool = False) -> None:\n self._stop_requested.set()\n\n def health(self) -> WorkerHealth:\n return WorkerHealth(name=self.name, status=\"ok\", critical=True, meta={\"runs\": self._runs})\n\n def status(self) -> WorkerStatus:\n thread_alive = self._thread is not None and self._thread.is_alive()\n with self._lock:\n in_flight = self._in_flight\n runs = self._runs\n if not thread_alive:\n state = \"stopped\"\n elif self._stop_requested.is_set():\n state = \"stopping\"\n elif in_flight > 0:\n state = \"busy\"\n else:\n state = \"idle\"\n return WorkerStatus(name=self.name, state=state, in_flight=in_flight, meta={\"runs\": runs})\n\n def _loop(self) -> None:\n while not self._stop_requested.is_set():\n with self._lock:\n self._in_flight += 1\n try:\n self._routine.run()\n with self._lock:\n self._runs += 1\n finally:\n with self._lock:\n self._in_flight -= 1\n if self._stop_requested.is_set():\n return\n sleep(self._interval)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:ScenarioWorker", + "span_start": 50, + "span_end": 110, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 2, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class IntervalRoutine:\n calls: list[float] = field(default_factory=list)\n _lock: Lock = field(default_factory=Lock)\n\n def run(self) -> None:\n with self._lock:\n self.calls.append(monotonic())\n\n def wait_runs(self, count: int, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n with self._lock:\n if len(self.calls) >= count:\n return True\n sleep(0.01)\n return False\n\n def deltas(self) -> list[float]:\n with self._lock:\n return [self.calls[index + 1] - self.calls[index] for index in range(len(self.calls) - 1)]", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:IntervalRoutine", + "span_start": 18, + "span_end": 37, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class BlockingRoutine:\n def __init__(self, started: Event, release: Event) -> None:\n self._started = started\n self._release = release\n\n def run(self) -> None:\n self._started.set()\n self._release.wait(timeout=5.0)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:BlockingRoutine", + "span_start": 40, + "span_end": 47, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def test_worker_wakes_up_with_configured_interval() -> None:\n interval = 0.15\n routine = IntervalRoutine()\n worker = ScenarioWorker(\"interval-worker\", routine, interval=interval)\n runtime = RuntimeManager()\n runtime.register_module(WorkerModule(worker))\n\n runtime.start()\n try:\n assert routine.wait_runs(count=3, timeout=2.0) is True\n finally:\n runtime.stop()\n\n deltas = routine.deltas()\n assert len(deltas) >= 2\n assert all(delta >= interval * 0.7 for delta in deltas[:2])", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:test_worker_wakes_up_with_configured_interval", + "span_start": 163, + "span_end": 178, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 7, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _http_call_json(\n base_url: str,\n path: str,\n *,\n method: str = \"GET\",\n headers: dict[str, str] | None = None,\n) -> tuple[int, dict[str, object]]:\n request = Request(f\"{base_url}{path}\", method=method, headers=headers or {})\n try:\n with urlopen(request, timeout=15.0) as response:\n status = response.status\n body = response.read()\n except HTTPError as error:\n status = error.code\n body = error.read()\n payload = json.loads(body.decode(\"utf-8\"))\n return status, payload", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_http_call_json", + "span_start": 125, + "span_end": 141, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 4, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _build_runtime(worker: Worker, *, control_timeout: int = 1) -> tuple[RuntimeManager, str]:\n runtime = RuntimeManager()\n channel = HttpControlChannel(host=\"127.0.0.1\", port=0, timeout=control_timeout)\n runtime.control_plane.register_channel(channel)\n runtime.register_module(WorkerModule(worker))\n runtime.start()\n return runtime, f\"http://127.0.0.1:{channel.port}\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_build_runtime", + "span_start": 154, + "span_end": 160, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 6, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class WorkerModule(ApplicationModule):\n def __init__(self, worker: Worker) -> None:\n self._worker = worker\n\n @property\n def name(self) -> str:\n return \"business-tests\"\n\n def register(self, registry: ModuleRegistry) -> None:\n registry.add_worker(self._worker)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:WorkerModule", + "span_start": 113, + "span_end": 122, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 3, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "Прямых тестов конкретно для `TraceService` в указанном контексте нет. Связь с сущностью не подтверждается именами функций, модулями или явными вызовами `TraceService`.\n\nОднако имеются косвенные тесты, которые косвенно затрагивают поведение `TraceService`, взаимодействуя через посредника (`RecordingTransport`), например:\n\n- tests/test_runtime.py: \n - Проверка записи контекстов и сообщений (метод `write_context`) при создании трассировочного сервиса.\n \nЭти тесты косвенно подтверждают корректность работы методов, связанных с `TraceService`. Тем не менее, напрямую тесты `TraceService` отсутствуют.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C2_DEPENDENCY_GRAPH" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "TraceService" + ], + "keyword_hints": [ + "TraceService" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "test_file_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "test_symbol_patterns": [ + "test_trace_service", + "TestTraceService", + "TraceService" + ], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C0_SOURCE_CHUNKS": 10 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src", + "tests" + ], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src", + "tests" + ], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "TraceService", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Где тесты для TraceService? test_trace_service TestTraceService TraceService", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Где тесты для TraceService? test_trace_service TestTraceService TraceService", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 10, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 0, + "candidates_after_filter": 0 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src", + "tests" + ], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src", + "tests" + ], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 10, + "candidates_after_filter": 10 + } + ], + "fallback": { + "used": true, + "reason": "scope_relaxed_no_hits" + }, + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "TraceService" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "miss", + "hit_count": 0, + "fail_reason": "scope_relaxed_no_hits" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 10, + "fail_reason": null + } + ] + }, + "constraint_violations": [ + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C1_SYMBOL_CATALOG", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + } + ], + "timings_ms": { + "router": 1, + "symbol_resolution": 0, + "retrieval_total": 128, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 63, + "C2_DEPENDENCY_GRAPH": 49, + "C0_SOURCE_CHUNKS": 14 + }, + "merge_rank": 0, + "prompt_build": 0, + "llm_call": 1118 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 1021, + "evidence_rows": 16, + "evidence_chars": 7847 + }, + "evidence_summary": [ + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 10, + "unique_paths": 2 + } + ], + "prompt_template_id": "intent_code_qa_find_tests_ru_v4", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "TraceService" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 16, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-v2-find-tests-trace-service", + "mode": "full_chain", + "run_started_at": "2026-03-12T14:36:36", + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Где тесты для TraceService?", + "normalized_query": "Где тесты для TraceService?" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Где тесты для TraceService?" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Где тесты для TraceService?" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "TraceService" + ], + "keyword_hints": [ + "TraceService" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "test_file_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "test_symbol_patterns": [ + "test_trace_service", + "TestTraceService", + "TraceService" + ], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 1 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Где тесты для TraceService?" + }, + "output": { + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "TraceService" + ], + "confidence": 0.0 + }, + "rag_count": 16, + "rag_rows": [ + { + "path": "tests/test_runtime.py", + "content": "test_trace_service_writes_contexts_and_messages\n -> RecordingTransport\n -> RecordingTransport.__init__\n -> RecordingTransport.contexts\n -> test_trace_service_writes_contexts_and_messages", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_trace_service_writes_contexts_and_messages:dataflow_slice", + "span_start": 181, + "span_end": 256, + "lexical_rank": 4, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "1636a2f70dee79c804259dc114af6c1ab4db27099911e5f97ac97a2bcb59be8a", + "edge_type": "dataflow_slice", + "src_symbol_id": "1600da201da1d0150240b400e3232172354156decdd1a04e1ab1a1edcd3a7e99", + "src_qname": "test_trace_service_writes_contexts_and_messages", + "dst_symbol_id": "1600da201da1d0150240b400e3232172354156decdd1a04e1ab1a1edcd3a7e99", + "dst_ref": "test_trace_service_writes_contexts_and_messages", + "resolution": "resolved", + "slice_id": "1636a2f70dee79c804259dc114af6c1ab4db27099911e5f97ac97a2bcb59be8a", + "root_symbol_id": "1600da201da1d0150240b400e3232172354156decdd1a04e1ab1a1edcd3a7e99", + "path_symbols": [ + "test_trace_service_writes_contexts_and_messages", + "RecordingTransport", + "RecordingTransport.__init__", + "RecordingTransport.contexts", + "test_trace_service_writes_contexts_and_messages" + ], + "path_symbol_ids": [ + "1600da201da1d0150240b400e3232172354156decdd1a04e1ab1a1edcd3a7e99", + "e3d635de1f1880673b69bf73ca6a45caffa5c7fdc23d589d5e40f76b86bdcd33", + "e34d80da723a7115a7a7586b52dc8b5cfda05c581509eee0c1a0296df9a340cb", + "1600da201da1d0150240b400e3232172354156decdd1a04e1ab1a1edcd3a7e99" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "test_trace_service_writes_contexts_and_messages\n -> RecordingTransport\n -> RecordingTransport.__init__\n -> RecordingTransport.contexts\n -> test_trace_service_allows_messages_without_status", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_trace_service_writes_contexts_and_messages:dataflow_slice", + "span_start": 181, + "span_end": 293, + "lexical_rank": 4, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "5db5abe56b73f884c5178647bd25ef150064a94a41fc8c052aebaa09bd7fdb3d", + "edge_type": "dataflow_slice", + "src_symbol_id": "1600da201da1d0150240b400e3232172354156decdd1a04e1ab1a1edcd3a7e99", + "src_qname": "test_trace_service_writes_contexts_and_messages", + "dst_symbol_id": "7127ca85ce6447928e195e901d36f1e1f1e8205a686e567c2d1b187431f989df", + "dst_ref": "test_trace_service_allows_messages_without_status", + "resolution": "resolved", + "slice_id": "5db5abe56b73f884c5178647bd25ef150064a94a41fc8c052aebaa09bd7fdb3d", + "root_symbol_id": "1600da201da1d0150240b400e3232172354156decdd1a04e1ab1a1edcd3a7e99", + "path_symbols": [ + "test_trace_service_writes_contexts_and_messages", + "RecordingTransport", + "RecordingTransport.__init__", + "RecordingTransport.contexts", + "test_trace_service_allows_messages_without_status" + ], + "path_symbol_ids": [ + "1600da201da1d0150240b400e3232172354156decdd1a04e1ab1a1edcd3a7e99", + "e3d635de1f1880673b69bf73ca6a45caffa5c7fdc23d589d5e40f76b86bdcd33", + "e34d80da723a7115a7a7586b52dc8b5cfda05c581509eee0c1a0296df9a340cb", + "7127ca85ce6447928e195e901d36f1e1f1e8205a686e567c2d1b187431f989df" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "test_trace_service_writes_contexts_and_messages\n -> RecordingTransport\n -> RecordingTransport.__init__\n -> RecordingTransport.contexts\n -> RecordingTransport.write_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_trace_service_writes_contexts_and_messages:dataflow_slice", + "span_start": 181, + "span_end": 249, + "lexical_rank": 4, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "60d7a8655fa4c53d9130ce342fc023d24ccfa16baea47ad60c91d2d49f547565", + "edge_type": "dataflow_slice", + "src_symbol_id": "1600da201da1d0150240b400e3232172354156decdd1a04e1ab1a1edcd3a7e99", + "src_qname": "test_trace_service_writes_contexts_and_messages", + "dst_symbol_id": "b8bbf341e230198caafe54727e13f2db27b7200d6fd95684fc5cf748db1a0e88", + "dst_ref": "RecordingTransport.write_context", + "resolution": "resolved", + "slice_id": "60d7a8655fa4c53d9130ce342fc023d24ccfa16baea47ad60c91d2d49f547565", + "root_symbol_id": "1600da201da1d0150240b400e3232172354156decdd1a04e1ab1a1edcd3a7e99", + "path_symbols": [ + "test_trace_service_writes_contexts_and_messages", + "RecordingTransport", + "RecordingTransport.__init__", + "RecordingTransport.contexts", + "RecordingTransport.write_context" + ], + "path_symbol_ids": [ + "1600da201da1d0150240b400e3232172354156decdd1a04e1ab1a1edcd3a7e99", + "e3d635de1f1880673b69bf73ca6a45caffa5c7fdc23d589d5e40f76b86bdcd33", + "e34d80da723a7115a7a7586b52dc8b5cfda05c581509eee0c1a0296df9a340cb", + "b8bbf341e230198caafe54727e13f2db27b7200d6fd95684fc5cf748db1a0e88" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "test_trace_service_supports_debug_warning_and_error_levels\n -> RecordingTransport\n -> RecordingTransport.__init__\n -> RecordingTransport.contexts\n -> RecordingTransport.write_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_trace_service_supports_debug_warning_and_error_levels:dataflow_slice", + "span_start": 181, + "span_end": 265, + "lexical_rank": 4, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "1372a2241c7265705e5cf9dceeb5e59836fac1d679227c4279ed39e0798ddddf", + "edge_type": "dataflow_slice", + "src_symbol_id": "ede183f1c546725064e28ddab1ffdbae0d1a1258fd62a50eb556c10d10995415", + "src_qname": "test_trace_service_supports_debug_warning_and_error_levels", + "dst_symbol_id": "b8bbf341e230198caafe54727e13f2db27b7200d6fd95684fc5cf748db1a0e88", + "dst_ref": "RecordingTransport.write_context", + "resolution": "resolved", + "slice_id": "1372a2241c7265705e5cf9dceeb5e59836fac1d679227c4279ed39e0798ddddf", + "root_symbol_id": "ede183f1c546725064e28ddab1ffdbae0d1a1258fd62a50eb556c10d10995415", + "path_symbols": [ + "test_trace_service_supports_debug_warning_and_error_levels", + "RecordingTransport", + "RecordingTransport.__init__", + "RecordingTransport.contexts", + "RecordingTransport.write_context" + ], + "path_symbol_ids": [ + "ede183f1c546725064e28ddab1ffdbae0d1a1258fd62a50eb556c10d10995415", + "e3d635de1f1880673b69bf73ca6a45caffa5c7fdc23d589d5e40f76b86bdcd33", + "e34d80da723a7115a7a7586b52dc8b5cfda05c581509eee0c1a0296df9a340cb", + "b8bbf341e230198caafe54727e13f2db27b7200d6fd95684fc5cf748db1a0e88" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "test_trace_service_supports_debug_warning_and_error_levels\n -> RecordingTransport\n -> RecordingTransport.__init__\n -> RecordingTransport.contexts\n -> test_trace_service_writes_contexts_and_messages", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_trace_service_supports_debug_warning_and_error_levels:dataflow_slice", + "span_start": 181, + "span_end": 265, + "lexical_rank": 4, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "8b6a5a738525df160600d71c15915704172de20db436ea2f84b6e039be396a2d", + "edge_type": "dataflow_slice", + "src_symbol_id": "ede183f1c546725064e28ddab1ffdbae0d1a1258fd62a50eb556c10d10995415", + "src_qname": "test_trace_service_supports_debug_warning_and_error_levels", + "dst_symbol_id": "1600da201da1d0150240b400e3232172354156decdd1a04e1ab1a1edcd3a7e99", + "dst_ref": "test_trace_service_writes_contexts_and_messages", + "resolution": "resolved", + "slice_id": "8b6a5a738525df160600d71c15915704172de20db436ea2f84b6e039be396a2d", + "root_symbol_id": "ede183f1c546725064e28ddab1ffdbae0d1a1258fd62a50eb556c10d10995415", + "path_symbols": [ + "test_trace_service_supports_debug_warning_and_error_levels", + "RecordingTransport", + "RecordingTransport.__init__", + "RecordingTransport.contexts", + "test_trace_service_writes_contexts_and_messages" + ], + "path_symbol_ids": [ + "ede183f1c546725064e28ddab1ffdbae0d1a1258fd62a50eb556c10d10995415", + "e3d635de1f1880673b69bf73ca6a45caffa5c7fdc23d589d5e40f76b86bdcd33", + "e34d80da723a7115a7a7586b52dc8b5cfda05c581509eee0c1a0296df9a340cb", + "1600da201da1d0150240b400e3232172354156decdd1a04e1ab1a1edcd3a7e99" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "test_trace_service_supports_debug_warning_and_error_levels\n -> RecordingTransport\n -> RecordingTransport.__init__\n -> RecordingTransport.contexts\n -> test_trace_service_allows_messages_without_status", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_trace_service_supports_debug_warning_and_error_levels:dataflow_slice", + "span_start": 181, + "span_end": 293, + "lexical_rank": 4, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "f7d099f6d5746aa61a3025fd7eef791369bd3a3e5df4bc716de87e7b149ccde6", + "edge_type": "dataflow_slice", + "src_symbol_id": "ede183f1c546725064e28ddab1ffdbae0d1a1258fd62a50eb556c10d10995415", + "src_qname": "test_trace_service_supports_debug_warning_and_error_levels", + "dst_symbol_id": "7127ca85ce6447928e195e901d36f1e1f1e8205a686e567c2d1b187431f989df", + "dst_ref": "test_trace_service_allows_messages_without_status", + "resolution": "resolved", + "slice_id": "f7d099f6d5746aa61a3025fd7eef791369bd3a3e5df4bc716de87e7b149ccde6", + "root_symbol_id": "ede183f1c546725064e28ddab1ffdbae0d1a1258fd62a50eb556c10d10995415", + "path_symbols": [ + "test_trace_service_supports_debug_warning_and_error_levels", + "RecordingTransport", + "RecordingTransport.__init__", + "RecordingTransport.contexts", + "test_trace_service_allows_messages_without_status" + ], + "path_symbol_ids": [ + "ede183f1c546725064e28ddab1ffdbae0d1a1258fd62a50eb556c10d10995415", + "e3d635de1f1880673b69bf73ca6a45caffa5c7fdc23d589d5e40f76b86bdcd33", + "e34d80da723a7115a7a7586b52dc8b5cfda05c581509eee0c1a0296df9a340cb", + "7127ca85ce6447928e195e901d36f1e1f1e8205a686e567c2d1b187431f989df" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "def test_trace_service_writes_contexts_and_messages() -> None:\n from app_runtime.tracing.service import TraceService\n\n transport = RecordingTransport()\n manager = TraceService(transport=transport)\n\n with manager.open_context(alias=\"worker\", kind=\"worker\", attrs={\"routine\": \"incoming\"}):\n manager.step(\"parse\")\n manager.info(\"started\", status=\"ok\", attrs={\"attempt\": 1})\n\n assert len(transport.contexts) == 1\n assert len(transport.messages) == 1\n assert transport.contexts[0].alias == \"worker\"\n assert transport.messages[0].step == \"parse\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_runtime.py:test_trace_service_writes_contexts_and_messages", + "span_start": 246, + "span_end": 259, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 9, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "def test_trace_service_supports_debug_warning_and_error_levels() -> None:\n from app_runtime.tracing.service import TraceService\n\n transport = RecordingTransport()\n manager = TraceService(transport=transport)\n\n with manager.open_context(alias=\"worker\", kind=\"worker\", attrs={\"routine\": \"incoming\"}):\n manager.step(\"validate\")\n manager.debug(\"validation details\", attrs={\"rule\": \"basic\"})\n manager.warning(\"validation warning\", status=\"degraded\", attrs={\"attempt\": 1})\n manager.error(\"integration failed\", status=\"failed\", attrs={\"integration\": \"crm\"})\n manager.exception(\"caught exception\", attrs={\"exception_type\": \"RuntimeError\"})\n\n levels = [message.level for message in transport.messages]\n assert levels == [\"DEBUG\", \"WARNING\", \"ERROR\", \"ERROR\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_runtime.py:test_trace_service_supports_debug_warning_and_error_levels", + "span_start": 262, + "span_end": 276, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 10, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "def test_trace_service_allows_messages_without_status() -> None:\n from app_runtime.tracing.service import TraceService\n\n transport = RecordingTransport()\n manager = TraceService(transport=transport)\n\n with manager.open_context(alias=\"worker\", kind=\"worker\"):\n manager.step(\"optional-status\")\n manager.debug(\"debug without status\")\n manager.info(\"info without status\")\n manager.warning(\"warning without status\")\n manager.error(\"error without status\")\n\n assert [message.status for message in transport.messages] == [\"\", \"\", \"\", \"\"]\n assert all(message.trace_id == transport.contexts[0].trace_id for message in transport.messages)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_runtime.py:test_trace_service_allows_messages_without_status", + "span_start": 279, + "span_end": 293, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 11, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class ScenarioWorker(Worker):\n def __init__(self, name: str, routine: object, *, interval: float = 0.05) -> None:\n self._name = name\n self._routine = routine\n self._interval = interval\n self._thread: Thread | None = None\n self._stop_requested = Event()\n self._in_flight = 0\n self._runs = 0\n self._lock = Lock()\n\n @property\n def name(self) -> str:\n return self._name\n\n @property\n def critical(self) -> bool:\n return True\n\n def start(self) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._stop_requested.clear()\n self._thread = Thread(target=self._loop, name=f\"{self._name}-thread\", daemon=True)\n self._thread.start()\n\n def stop(self, force: bool = False) -> None:\n self._stop_requested.set()\n\n def health(self) -> WorkerHealth:\n return WorkerHealth(name=self.name, status=\"ok\", critical=True, meta={\"runs\": self._runs})\n\n def status(self) -> WorkerStatus:\n thread_alive = self._thread is not None and self._thread.is_alive()\n with self._lock:\n in_flight = self._in_flight\n runs = self._runs\n if not thread_alive:\n state = \"stopped\"\n elif self._stop_requested.is_set():\n state = \"stopping\"\n elif in_flight > 0:\n state = \"busy\"\n else:\n state = \"idle\"\n return WorkerStatus(name=self.name, state=state, in_flight=in_flight, meta={\"runs\": runs})\n\n def _loop(self) -> None:\n while not self._stop_requested.is_set():\n with self._lock:\n self._in_flight += 1\n try:\n self._routine.run()\n with self._lock:\n self._runs += 1\n finally:\n with self._lock:\n self._in_flight -= 1\n if self._stop_requested.is_set():\n return\n sleep(self._interval)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:ScenarioWorker", + "span_start": 50, + "span_end": 110, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 2, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class IntervalRoutine:\n calls: list[float] = field(default_factory=list)\n _lock: Lock = field(default_factory=Lock)\n\n def run(self) -> None:\n with self._lock:\n self.calls.append(monotonic())\n\n def wait_runs(self, count: int, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n with self._lock:\n if len(self.calls) >= count:\n return True\n sleep(0.01)\n return False\n\n def deltas(self) -> list[float]:\n with self._lock:\n return [self.calls[index + 1] - self.calls[index] for index in range(len(self.calls) - 1)]", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:IntervalRoutine", + "span_start": 18, + "span_end": 37, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class BlockingRoutine:\n def __init__(self, started: Event, release: Event) -> None:\n self._started = started\n self._release = release\n\n def run(self) -> None:\n self._started.set()\n self._release.wait(timeout=5.0)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:BlockingRoutine", + "span_start": 40, + "span_end": 47, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def test_worker_wakes_up_with_configured_interval() -> None:\n interval = 0.15\n routine = IntervalRoutine()\n worker = ScenarioWorker(\"interval-worker\", routine, interval=interval)\n runtime = RuntimeManager()\n runtime.register_module(WorkerModule(worker))\n\n runtime.start()\n try:\n assert routine.wait_runs(count=3, timeout=2.0) is True\n finally:\n runtime.stop()\n\n deltas = routine.deltas()\n assert len(deltas) >= 2\n assert all(delta >= interval * 0.7 for delta in deltas[:2])", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:test_worker_wakes_up_with_configured_interval", + "span_start": 163, + "span_end": 178, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 7, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _http_call_json(\n base_url: str,\n path: str,\n *,\n method: str = \"GET\",\n headers: dict[str, str] | None = None,\n) -> tuple[int, dict[str, object]]:\n request = Request(f\"{base_url}{path}\", method=method, headers=headers or {})\n try:\n with urlopen(request, timeout=15.0) as response:\n status = response.status\n body = response.read()\n except HTTPError as error:\n status = error.code\n body = error.read()\n payload = json.loads(body.decode(\"utf-8\"))\n return status, payload", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_http_call_json", + "span_start": 125, + "span_end": 141, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 4, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _build_runtime(worker: Worker, *, control_timeout: int = 1) -> tuple[RuntimeManager, str]:\n runtime = RuntimeManager()\n channel = HttpControlChannel(host=\"127.0.0.1\", port=0, timeout=control_timeout)\n runtime.control_plane.register_channel(channel)\n runtime.register_module(WorkerModule(worker))\n runtime.start()\n return runtime, f\"http://127.0.0.1:{channel.port}\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_build_runtime", + "span_start": 154, + "span_end": 160, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 6, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class WorkerModule(ApplicationModule):\n def __init__(self, worker: Worker) -> None:\n self._worker = worker\n\n @property\n def name(self) -> str:\n return \"business-tests\"\n\n def register(self, registry: ModuleRegistry) -> None:\n registry.add_worker(self._worker)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:WorkerModule", + "span_start": 113, + "span_end": 122, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 3, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C0_SOURCE_CHUNKS": 10 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src", + "tests" + ], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src", + "tests" + ], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "TraceService", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Где тесты для TraceService? test_trace_service TestTraceService TraceService", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Где тесты для TraceService? test_trace_service TestTraceService TraceService", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 10, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 0, + "candidates_after_filter": 0 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src", + "tests" + ], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src", + "tests" + ], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 10, + "candidates_after_filter": 10 + } + ], + "fallback": { + "used": true, + "reason": "scope_relaxed_no_hits" + }, + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "TraceService" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "miss", + "hit_count": 0, + "fail_reason": "scope_relaxed_no_hits" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 10, + "fail_reason": null + } + ] + }, + "constraint_violations": [ + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C1_SYMBOL_CATALOG", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + } + ], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 128, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 63, + "C2_DEPENDENCY_GRAPH": 49, + "C0_SOURCE_CHUNKS": 14 + }, + "merge_rank": 0 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Где тесты для TraceService?", + "rag_count": 16 + }, + "output": { + "llm_answer": "Прямых тестов конкретно для `TraceService` в указанном контексте нет. Связь с сущностью не подтверждается именами функций, модулями или явными вызовами `TraceService`.\n\nОднако имеются косвенные тесты, которые косвенно затрагивают поведение `TraceService`, взаимодействуя через посредника (`RecordingTransport`), например:\n\n- tests/test_runtime.py: \n - Проверка записи контекстов и сообщений (метод `write_context`) при создании трассировочного сервиса.\n \nЭти тесты косвенно подтверждают корректность работы методов, связанных с `TraceService`. Тем не менее, напрямую тесты `TraceService` отсутствуют." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 1021, + "evidence_rows": 16, + "evidence_chars": 7847 + }, + "evidence_summary": [ + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 10, + "unique_paths": 2 + } + ], + "prompt_template_id": "intent_code_qa_find_tests_ru_v4", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 1118 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-find-tests-trace-service.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-find-tests-trace-service.md new file mode 100644 index 0000000..402aabc --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-find-tests-trace-service.md @@ -0,0 +1,32 @@ +# plba-v2-find-tests-trace-service + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Где тесты для TraceService? + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 16, + "llm_answer": "Прямых тестов конкретно для `TraceService` в указанном контексте нет. Связь с сущностью не подтверждается именами функций, модулями или явными вызовами `TraceService`.\n\nОднако имеются косвенные тесты, которые косвенно затрагивают поведение `TraceService`, взаимодействуя через посредника (`RecordingTransport`), например:\n\n- tests/test_runtime.py: \n - Проверка записи контекстов и сообщений (метод `write_context`) при создании трассировочного сервиса.\n \nЭти тесты косвенно подтверждают корректность работы методов, связанных с `TraceService`. Тем не менее, напрямую тесты `TraceService` отсутствуют.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "TraceService" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-find-tests-workflow-runtime-factory-negative.json b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-find-tests-workflow-runtime-factory-negative.json new file mode 100644 index 0000000..b60280c --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-find-tests-workflow-runtime-factory-negative.json @@ -0,0 +1,2047 @@ +{ + "case_id": "plba-v2-find-tests-workflow-runtime-factory-negative", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 16, + "llm_answer": "Прямых тестов конкретно для `WorkflowRuntimeFactory` в предоставленном контексте не обнаружено.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "WorkflowRuntimeFactory" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-v2-find-tests-workflow-runtime-factory-negative", + "text": "Где тесты для WorkflowRuntimeFactory?", + "mode": "full_chain", + "run_started_at": "2026-03-12T14:36:36", + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Где тесты для WorkflowRuntimeFactory?", + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "WorkflowRuntimeFactory" + ], + "confidence": 0.0 + }, + "rag_count": 16, + "rag_rows": [ + { + "path": "tests/test_business_control_actions.py", + "content": "test_actions_stop_busy_worker_before_timeout\n -> BlockingRoutine\n -> BlockingRoutine.__init__\n -> BlockingRoutine._release\n -> BlockingRoutine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_actions_stop_busy_worker_before_timeout:dataflow_slice", + "span_start": 43, + "span_end": 212, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "8bd726155ba387d3579763ee84dfd2f9a90bc917da88f3b2e89416ab5c1254d6", + "edge_type": "dataflow_slice", + "src_symbol_id": "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "src_qname": "test_actions_stop_busy_worker_before_timeout", + "dst_symbol_id": "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04", + "dst_ref": "BlockingRoutine.run", + "resolution": "resolved", + "slice_id": "8bd726155ba387d3579763ee84dfd2f9a90bc917da88f3b2e89416ab5c1254d6", + "root_symbol_id": "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "path_symbols": [ + "test_actions_stop_busy_worker_before_timeout", + "BlockingRoutine", + "BlockingRoutine.__init__", + "BlockingRoutine._release", + "BlockingRoutine.run" + ], + "path_symbol_ids": [ + "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "a3349c5bc65e4003a4bbd6a8dbb7a54c337e12d1aed930caa701b12e520f1e67", + "486deeed3043c6db985aef258e96ddc67aa53608e67a83962fbd2471f649ddf1", + "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_worker_wakes_up_with_configured_interval\n -> ScenarioWorker\n -> ScenarioWorker.__init__\n -> ScenarioWorker._name\n -> ScenarioWorker.name", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_worker_wakes_up_with_configured_interval:dataflow_slice", + "span_start": 52, + "span_end": 166, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "2fd137f5852febe907f44d3b3e4ea430f89ccfe962ae1442a16ab9df64c8f76c", + "edge_type": "dataflow_slice", + "src_symbol_id": "65f877f78191d65e6a752e41cedc70ebc784c266804a55c1c56440336e1f0d6e", + "src_qname": "test_worker_wakes_up_with_configured_interval", + "dst_symbol_id": "da022da2c49fd9cfd09d6e6da6bbd59aaa7d28efd669ce8444e88d327ddec2fc", + "dst_ref": "ScenarioWorker.name", + "resolution": "resolved", + "slice_id": "2fd137f5852febe907f44d3b3e4ea430f89ccfe962ae1442a16ab9df64c8f76c", + "root_symbol_id": "65f877f78191d65e6a752e41cedc70ebc784c266804a55c1c56440336e1f0d6e", + "path_symbols": [ + "test_worker_wakes_up_with_configured_interval", + "ScenarioWorker", + "ScenarioWorker.__init__", + "ScenarioWorker._name", + "ScenarioWorker.name" + ], + "path_symbol_ids": [ + "65f877f78191d65e6a752e41cedc70ebc784c266804a55c1c56440336e1f0d6e", + "9a1d08a7eb1831c9f2e0db361b5207f036e477c160773ae08c0b287239785c52", + "9c20be046ba06644d1432e0f20eb223663d2b116ee7d91fdc62bc68323f2e593", + "da022da2c49fd9cfd09d6e6da6bbd59aaa7d28efd669ce8444e88d327ddec2fc" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_actions_stop_busy_worker_before_timeout\n -> BlockingRoutine\n -> BlockingRoutine.__init__\n -> BlockingRoutine._started\n -> BlockingRoutine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_actions_stop_busy_worker_before_timeout:dataflow_slice", + "span_start": 42, + "span_end": 212, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "f9bcce108870e49afa8b32d4625115a10707a3b0e7473179e958e5752bf258b4", + "edge_type": "dataflow_slice", + "src_symbol_id": "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "src_qname": "test_actions_stop_busy_worker_before_timeout", + "dst_symbol_id": "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04", + "dst_ref": "BlockingRoutine.run", + "resolution": "resolved", + "slice_id": "f9bcce108870e49afa8b32d4625115a10707a3b0e7473179e958e5752bf258b4", + "root_symbol_id": "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "path_symbols": [ + "test_actions_stop_busy_worker_before_timeout", + "BlockingRoutine", + "BlockingRoutine.__init__", + "BlockingRoutine._started", + "BlockingRoutine.run" + ], + "path_symbol_ids": [ + "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "a3349c5bc65e4003a4bbd6a8dbb7a54c337e12d1aed930caa701b12e520f1e67", + "486deeed3043c6db985aef258e96ddc67aa53608e67a83962fbd2471f649ddf1", + "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_actions_stop_busy_worker_after_timeout\n -> BlockingRoutine\n -> BlockingRoutine.__init__\n -> BlockingRoutine._started\n -> BlockingRoutine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_actions_stop_busy_worker_after_timeout:dataflow_slice", + "span_start": 42, + "span_end": 238, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "8e7db3d2a9226f1c1d9942ac6373cfcafa0d2276758ddb8a3d3c455a3d58024d", + "edge_type": "dataflow_slice", + "src_symbol_id": "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "src_qname": "test_actions_stop_busy_worker_after_timeout", + "dst_symbol_id": "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04", + "dst_ref": "BlockingRoutine.run", + "resolution": "resolved", + "slice_id": "8e7db3d2a9226f1c1d9942ac6373cfcafa0d2276758ddb8a3d3c455a3d58024d", + "root_symbol_id": "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "path_symbols": [ + "test_actions_stop_busy_worker_after_timeout", + "BlockingRoutine", + "BlockingRoutine.__init__", + "BlockingRoutine._started", + "BlockingRoutine.run" + ], + "path_symbol_ids": [ + "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "a3349c5bc65e4003a4bbd6a8dbb7a54c337e12d1aed930caa701b12e520f1e67", + "486deeed3043c6db985aef258e96ddc67aa53608e67a83962fbd2471f649ddf1", + "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_actions_stop_busy_worker_after_timeout\n -> BlockingRoutine\n -> BlockingRoutine.__init__\n -> BlockingRoutine._release\n -> BlockingRoutine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_actions_stop_busy_worker_after_timeout:dataflow_slice", + "span_start": 43, + "span_end": 238, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "b59da9da82f9dfc8a9b695a08213786385da1ae9e17561ec3a0450a574a8cb39", + "edge_type": "dataflow_slice", + "src_symbol_id": "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "src_qname": "test_actions_stop_busy_worker_after_timeout", + "dst_symbol_id": "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04", + "dst_ref": "BlockingRoutine.run", + "resolution": "resolved", + "slice_id": "b59da9da82f9dfc8a9b695a08213786385da1ae9e17561ec3a0450a574a8cb39", + "root_symbol_id": "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "path_symbols": [ + "test_actions_stop_busy_worker_after_timeout", + "BlockingRoutine", + "BlockingRoutine.__init__", + "BlockingRoutine._release", + "BlockingRoutine.run" + ], + "path_symbol_ids": [ + "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "a3349c5bc65e4003a4bbd6a8dbb7a54c337e12d1aed930caa701b12e520f1e67", + "486deeed3043c6db985aef258e96ddc67aa53608e67a83962fbd2471f649ddf1", + "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_actions_start_stop_and_health_when_worker_is_idle\n -> ScenarioWorker\n -> ScenarioWorker.__init__\n -> ScenarioWorker._name\n -> ScenarioWorker.name", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_actions_start_stop_and_health_when_worker_is_idle:dataflow_slice", + "span_start": 52, + "span_end": 182, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "8fb3c9e775ad1cfa91eebb8b8cef367dc53c923584236122235446e0579b468e", + "edge_type": "dataflow_slice", + "src_symbol_id": "09a78d8eb31c2da14fee58da53b5da7a5065a4c23b6300748a6d44517a5284b8", + "src_qname": "test_actions_start_stop_and_health_when_worker_is_idle", + "dst_symbol_id": "da022da2c49fd9cfd09d6e6da6bbd59aaa7d28efd669ce8444e88d327ddec2fc", + "dst_ref": "ScenarioWorker.name", + "resolution": "resolved", + "slice_id": "8fb3c9e775ad1cfa91eebb8b8cef367dc53c923584236122235446e0579b468e", + "root_symbol_id": "09a78d8eb31c2da14fee58da53b5da7a5065a4c23b6300748a6d44517a5284b8", + "path_symbols": [ + "test_actions_start_stop_and_health_when_worker_is_idle", + "ScenarioWorker", + "ScenarioWorker.__init__", + "ScenarioWorker._name", + "ScenarioWorker.name" + ], + "path_symbol_ids": [ + "09a78d8eb31c2da14fee58da53b5da7a5065a4c23b6300748a6d44517a5284b8", + "9a1d08a7eb1831c9f2e0db361b5207f036e477c160773ae08c0b287239785c52", + "9c20be046ba06644d1432e0f20eb223663d2b116ee7d91fdc62bc68323f2e593", + "da022da2c49fd9cfd09d6e6da6bbd59aaa7d28efd669ce8444e88d327ddec2fc" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def test_actions_start_stop_and_health_when_worker_is_idle() -> None:\n runtime, base_url = _build_runtime(ScenarioWorker(\"idle-worker\", IntervalRoutine(), interval=0.2))\n try:\n stop_status, stop_payload = _http_call_json(base_url, \"/actions/stop\", method=\"POST\")\n assert stop_status == 200\n assert isinstance(stop_payload.get(\"detail\"), dict)\n assert stop_payload[\"detail\"][\"timed_out\"] is False\n assert stop_payload[\"detail\"][\"state\"] == \"stopped\"\n\n health_stopped_status, health_stopped_payload = _http_call_json(base_url, \"/health\")\n assert health_stopped_status == 503\n assert health_stopped_payload[\"state\"] == \"stopped\"\n assert health_stopped_payload[\"status\"] == \"unhealthy\"\n\n start_status, start_payload = _http_call_json(base_url, \"/actions/start\", method=\"POST\")\n assert start_status == 200\n assert isinstance(start_payload.get(\"detail\"), dict)\n assert start_payload[\"detail\"][\"timed_out\"] is False\n assert start_payload[\"detail\"][\"state\"] in {\"idle\", \"busy\"}\n\n health_started_status, health_started_payload = _http_call_json(base_url, \"/health\")\n assert health_started_status == 200\n assert health_started_payload[\"status\"] == \"ok\"\n assert health_started_payload[\"state\"] in {\"idle\", \"busy\"}\n finally:\n runtime.stop()", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:test_actions_start_stop_and_health_when_worker_is_idle", + "span_start": 181, + "span_end": 206, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 8, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _poll_until_stopped(base_url: str, timeout: float = 2.0) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n _, payload = _http_call_json(base_url, \"/actions/status\")\n if payload.get(\"detail\") == \"stopped\":\n return True\n sleep(0.05)\n return False", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_poll_until_stopped", + "span_start": 144, + "span_end": 151, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 5, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def test_worker_wakes_up_with_configured_interval() -> None:\n interval = 0.15\n routine = IntervalRoutine()\n worker = ScenarioWorker(\"interval-worker\", routine, interval=interval)\n runtime = RuntimeManager()\n runtime.register_module(WorkerModule(worker))\n\n runtime.start()\n try:\n assert routine.wait_runs(count=3, timeout=2.0) is True\n finally:\n runtime.stop()\n\n deltas = routine.deltas()\n assert len(deltas) >= 2\n assert all(delta >= interval * 0.7 for delta in deltas[:2])", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:test_worker_wakes_up_with_configured_interval", + "span_start": 163, + "span_end": 178, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 7, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class BlockingRoutine:\n def __init__(self, started: Event, release: Event) -> None:\n self._started = started\n self._release = release\n\n def run(self) -> None:\n self._started.set()\n self._release.wait(timeout=5.0)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:BlockingRoutine", + "span_start": 40, + "span_end": 47, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class WorkerModule(ApplicationModule):\n def __init__(self, worker: Worker) -> None:\n self._worker = worker\n\n @property\n def name(self) -> str:\n return \"business-tests\"\n\n def register(self, registry: ModuleRegistry) -> None:\n registry.add_worker(self._worker)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:WorkerModule", + "span_start": 113, + "span_end": 122, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 3, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _http_call_json(\n base_url: str,\n path: str,\n *,\n method: str = \"GET\",\n headers: dict[str, str] | None = None,\n) -> tuple[int, dict[str, object]]:\n request = Request(f\"{base_url}{path}\", method=method, headers=headers or {})\n try:\n with urlopen(request, timeout=15.0) as response:\n status = response.status\n body = response.read()\n except HTTPError as error:\n status = error.code\n body = error.read()\n payload = json.loads(body.decode(\"utf-8\"))\n return status, payload", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_http_call_json", + "span_start": 125, + "span_end": 141, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 4, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _build_runtime(worker: Worker, *, control_timeout: int = 1) -> tuple[RuntimeManager, str]:\n runtime = RuntimeManager()\n channel = HttpControlChannel(host=\"127.0.0.1\", port=0, timeout=control_timeout)\n runtime.control_plane.register_channel(channel)\n runtime.register_module(WorkerModule(worker))\n runtime.start()\n return runtime, f\"http://127.0.0.1:{channel.port}\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_build_runtime", + "span_start": 154, + "span_end": 160, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 6, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class ScenarioWorker(Worker):\n def __init__(self, name: str, routine: object, *, interval: float = 0.05) -> None:\n self._name = name\n self._routine = routine\n self._interval = interval\n self._thread: Thread | None = None\n self._stop_requested = Event()\n self._in_flight = 0\n self._runs = 0\n self._lock = Lock()\n\n @property\n def name(self) -> str:\n return self._name\n\n @property\n def critical(self) -> bool:\n return True\n\n def start(self) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._stop_requested.clear()\n self._thread = Thread(target=self._loop, name=f\"{self._name}-thread\", daemon=True)\n self._thread.start()\n\n def stop(self, force: bool = False) -> None:\n self._stop_requested.set()\n\n def health(self) -> WorkerHealth:\n return WorkerHealth(name=self.name, status=\"ok\", critical=True, meta={\"runs\": self._runs})\n\n def status(self) -> WorkerStatus:\n thread_alive = self._thread is not None and self._thread.is_alive()\n with self._lock:\n in_flight = self._in_flight\n runs = self._runs\n if not thread_alive:\n state = \"stopped\"\n elif self._stop_requested.is_set():\n state = \"stopping\"\n elif in_flight > 0:\n state = \"busy\"\n else:\n state = \"idle\"\n return WorkerStatus(name=self.name, state=state, in_flight=in_flight, meta={\"runs\": runs})\n\n def _loop(self) -> None:\n while not self._stop_requested.is_set():\n with self._lock:\n self._in_flight += 1\n try:\n self._routine.run()\n with self._lock:\n self._runs += 1\n finally:\n with self._lock:\n self._in_flight -= 1\n if self._stop_requested.is_set():\n return\n sleep(self._interval)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:ScenarioWorker", + "span_start": 50, + "span_end": 110, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 2, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class IntervalRoutine:\n calls: list[float] = field(default_factory=list)\n _lock: Lock = field(default_factory=Lock)\n\n def run(self) -> None:\n with self._lock:\n self.calls.append(monotonic())\n\n def wait_runs(self, count: int, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n with self._lock:\n if len(self.calls) >= count:\n return True\n sleep(0.01)\n return False\n\n def deltas(self) -> list[float]:\n with self._lock:\n return [self.calls[index + 1] - self.calls[index] for index in range(len(self.calls) - 1)]", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:IntervalRoutine", + "span_start": 18, + "span_end": 37, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def test_actions_stop_busy_worker_before_timeout() -> None:\n started = Event()\n release = Event()\n runtime, base_url = _build_runtime(ScenarioWorker(\"busy-worker\", BlockingRoutine(started, release)))\n assert started.wait(timeout=1.0) is True\n\n def release_later() -> None:\n sleep(0.2)\n release.set()\n\n Thread(target=release_later, daemon=True).start()\n try:\n status, payload = _http_call_json(base_url, \"/actions/stop\", method=\"POST\")\n assert status == 200\n assert isinstance(payload.get(\"detail\"), dict)\n assert payload[\"detail\"][\"timed_out\"] is False\n assert payload[\"detail\"][\"state\"] == \"stopped\"\n\n health_status, health_payload = _http_call_json(base_url, \"/health\")\n assert health_status == 503\n assert health_payload[\"status\"] == \"unhealthy\"\n assert health_payload[\"state\"] == \"stopped\"\n finally:\n runtime.stop()", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:test_actions_stop_busy_worker_before_timeout", + "span_start": 209, + "span_end": 232, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 9, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "Прямых тестов конкретно для `WorkflowRuntimeFactory` в предоставленном контексте не обнаружено.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C2_DEPENDENCY_GRAPH" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "WorkflowRuntimeFactory" + ], + "keyword_hints": [ + "WorkflowRuntimeFactory" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "test_file_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "test_symbol_patterns": [ + "test_workflow_runtime_factory", + "TestWorkflowRuntimeFactory", + "WorkflowRuntimeFactory" + ], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C0_SOURCE_CHUNKS": 10 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src", + "tests" + ], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src", + "tests" + ], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "WorkflowRuntimeFactory", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Где тесты для WorkflowRuntimeFactory? test_workflow_runtime_factory TestWorkflowRuntimeFactory WorkflowRuntimeFactory", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Где тесты для WorkflowRuntimeFactory? test_workflow_runtime_factory TestWorkflowRuntimeFactory WorkflowRuntimeFactory", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 10, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 0, + "candidates_after_filter": 0 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src", + "tests" + ], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src", + "tests" + ], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 10, + "candidates_after_filter": 10 + } + ], + "fallback": { + "used": true, + "reason": "scope_relaxed_no_hits" + }, + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "WorkflowRuntimeFactory" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "miss", + "hit_count": 0, + "fail_reason": "scope_relaxed_no_hits" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 10, + "fail_reason": null + } + ] + }, + "constraint_violations": [ + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C1_SYMBOL_CATALOG", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + } + ], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 100, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 44, + "C2_DEPENDENCY_GRAPH": 40, + "C0_SOURCE_CHUNKS": 15 + }, + "merge_rank": 0, + "prompt_build": 0, + "llm_call": 1178 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 1040, + "evidence_rows": 16, + "evidence_chars": 8149 + }, + "evidence_summary": [ + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 10, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_find_tests_ru_v4", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "WorkflowRuntimeFactory" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 16, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-v2-find-tests-workflow-runtime-factory-negative", + "mode": "full_chain", + "run_started_at": "2026-03-12T14:36:36", + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Где тесты для WorkflowRuntimeFactory?", + "normalized_query": "Где тесты для WorkflowRuntimeFactory?" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Где тесты для WorkflowRuntimeFactory?" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Где тесты для WorkflowRuntimeFactory?" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "WorkflowRuntimeFactory" + ], + "keyword_hints": [ + "WorkflowRuntimeFactory" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "test_file_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "test_symbol_patterns": [ + "test_workflow_runtime_factory", + "TestWorkflowRuntimeFactory", + "WorkflowRuntimeFactory" + ], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Где тесты для WorkflowRuntimeFactory?" + }, + "output": { + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "WorkflowRuntimeFactory" + ], + "confidence": 0.0 + }, + "rag_count": 16, + "rag_rows": [ + { + "path": "tests/test_business_control_actions.py", + "content": "test_actions_stop_busy_worker_before_timeout\n -> BlockingRoutine\n -> BlockingRoutine.__init__\n -> BlockingRoutine._release\n -> BlockingRoutine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_actions_stop_busy_worker_before_timeout:dataflow_slice", + "span_start": 43, + "span_end": 212, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "8bd726155ba387d3579763ee84dfd2f9a90bc917da88f3b2e89416ab5c1254d6", + "edge_type": "dataflow_slice", + "src_symbol_id": "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "src_qname": "test_actions_stop_busy_worker_before_timeout", + "dst_symbol_id": "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04", + "dst_ref": "BlockingRoutine.run", + "resolution": "resolved", + "slice_id": "8bd726155ba387d3579763ee84dfd2f9a90bc917da88f3b2e89416ab5c1254d6", + "root_symbol_id": "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "path_symbols": [ + "test_actions_stop_busy_worker_before_timeout", + "BlockingRoutine", + "BlockingRoutine.__init__", + "BlockingRoutine._release", + "BlockingRoutine.run" + ], + "path_symbol_ids": [ + "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "a3349c5bc65e4003a4bbd6a8dbb7a54c337e12d1aed930caa701b12e520f1e67", + "486deeed3043c6db985aef258e96ddc67aa53608e67a83962fbd2471f649ddf1", + "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_worker_wakes_up_with_configured_interval\n -> ScenarioWorker\n -> ScenarioWorker.__init__\n -> ScenarioWorker._name\n -> ScenarioWorker.name", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_worker_wakes_up_with_configured_interval:dataflow_slice", + "span_start": 52, + "span_end": 166, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "2fd137f5852febe907f44d3b3e4ea430f89ccfe962ae1442a16ab9df64c8f76c", + "edge_type": "dataflow_slice", + "src_symbol_id": "65f877f78191d65e6a752e41cedc70ebc784c266804a55c1c56440336e1f0d6e", + "src_qname": "test_worker_wakes_up_with_configured_interval", + "dst_symbol_id": "da022da2c49fd9cfd09d6e6da6bbd59aaa7d28efd669ce8444e88d327ddec2fc", + "dst_ref": "ScenarioWorker.name", + "resolution": "resolved", + "slice_id": "2fd137f5852febe907f44d3b3e4ea430f89ccfe962ae1442a16ab9df64c8f76c", + "root_symbol_id": "65f877f78191d65e6a752e41cedc70ebc784c266804a55c1c56440336e1f0d6e", + "path_symbols": [ + "test_worker_wakes_up_with_configured_interval", + "ScenarioWorker", + "ScenarioWorker.__init__", + "ScenarioWorker._name", + "ScenarioWorker.name" + ], + "path_symbol_ids": [ + "65f877f78191d65e6a752e41cedc70ebc784c266804a55c1c56440336e1f0d6e", + "9a1d08a7eb1831c9f2e0db361b5207f036e477c160773ae08c0b287239785c52", + "9c20be046ba06644d1432e0f20eb223663d2b116ee7d91fdc62bc68323f2e593", + "da022da2c49fd9cfd09d6e6da6bbd59aaa7d28efd669ce8444e88d327ddec2fc" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_actions_stop_busy_worker_before_timeout\n -> BlockingRoutine\n -> BlockingRoutine.__init__\n -> BlockingRoutine._started\n -> BlockingRoutine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_actions_stop_busy_worker_before_timeout:dataflow_slice", + "span_start": 42, + "span_end": 212, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "f9bcce108870e49afa8b32d4625115a10707a3b0e7473179e958e5752bf258b4", + "edge_type": "dataflow_slice", + "src_symbol_id": "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "src_qname": "test_actions_stop_busy_worker_before_timeout", + "dst_symbol_id": "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04", + "dst_ref": "BlockingRoutine.run", + "resolution": "resolved", + "slice_id": "f9bcce108870e49afa8b32d4625115a10707a3b0e7473179e958e5752bf258b4", + "root_symbol_id": "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "path_symbols": [ + "test_actions_stop_busy_worker_before_timeout", + "BlockingRoutine", + "BlockingRoutine.__init__", + "BlockingRoutine._started", + "BlockingRoutine.run" + ], + "path_symbol_ids": [ + "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "a3349c5bc65e4003a4bbd6a8dbb7a54c337e12d1aed930caa701b12e520f1e67", + "486deeed3043c6db985aef258e96ddc67aa53608e67a83962fbd2471f649ddf1", + "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_actions_stop_busy_worker_after_timeout\n -> BlockingRoutine\n -> BlockingRoutine.__init__\n -> BlockingRoutine._started\n -> BlockingRoutine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_actions_stop_busy_worker_after_timeout:dataflow_slice", + "span_start": 42, + "span_end": 238, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "8e7db3d2a9226f1c1d9942ac6373cfcafa0d2276758ddb8a3d3c455a3d58024d", + "edge_type": "dataflow_slice", + "src_symbol_id": "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "src_qname": "test_actions_stop_busy_worker_after_timeout", + "dst_symbol_id": "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04", + "dst_ref": "BlockingRoutine.run", + "resolution": "resolved", + "slice_id": "8e7db3d2a9226f1c1d9942ac6373cfcafa0d2276758ddb8a3d3c455a3d58024d", + "root_symbol_id": "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "path_symbols": [ + "test_actions_stop_busy_worker_after_timeout", + "BlockingRoutine", + "BlockingRoutine.__init__", + "BlockingRoutine._started", + "BlockingRoutine.run" + ], + "path_symbol_ids": [ + "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "a3349c5bc65e4003a4bbd6a8dbb7a54c337e12d1aed930caa701b12e520f1e67", + "486deeed3043c6db985aef258e96ddc67aa53608e67a83962fbd2471f649ddf1", + "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_actions_stop_busy_worker_after_timeout\n -> BlockingRoutine\n -> BlockingRoutine.__init__\n -> BlockingRoutine._release\n -> BlockingRoutine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_actions_stop_busy_worker_after_timeout:dataflow_slice", + "span_start": 43, + "span_end": 238, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "b59da9da82f9dfc8a9b695a08213786385da1ae9e17561ec3a0450a574a8cb39", + "edge_type": "dataflow_slice", + "src_symbol_id": "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "src_qname": "test_actions_stop_busy_worker_after_timeout", + "dst_symbol_id": "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04", + "dst_ref": "BlockingRoutine.run", + "resolution": "resolved", + "slice_id": "b59da9da82f9dfc8a9b695a08213786385da1ae9e17561ec3a0450a574a8cb39", + "root_symbol_id": "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "path_symbols": [ + "test_actions_stop_busy_worker_after_timeout", + "BlockingRoutine", + "BlockingRoutine.__init__", + "BlockingRoutine._release", + "BlockingRoutine.run" + ], + "path_symbol_ids": [ + "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "a3349c5bc65e4003a4bbd6a8dbb7a54c337e12d1aed930caa701b12e520f1e67", + "486deeed3043c6db985aef258e96ddc67aa53608e67a83962fbd2471f649ddf1", + "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_actions_start_stop_and_health_when_worker_is_idle\n -> ScenarioWorker\n -> ScenarioWorker.__init__\n -> ScenarioWorker._name\n -> ScenarioWorker.name", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_actions_start_stop_and_health_when_worker_is_idle:dataflow_slice", + "span_start": 52, + "span_end": 182, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "8fb3c9e775ad1cfa91eebb8b8cef367dc53c923584236122235446e0579b468e", + "edge_type": "dataflow_slice", + "src_symbol_id": "09a78d8eb31c2da14fee58da53b5da7a5065a4c23b6300748a6d44517a5284b8", + "src_qname": "test_actions_start_stop_and_health_when_worker_is_idle", + "dst_symbol_id": "da022da2c49fd9cfd09d6e6da6bbd59aaa7d28efd669ce8444e88d327ddec2fc", + "dst_ref": "ScenarioWorker.name", + "resolution": "resolved", + "slice_id": "8fb3c9e775ad1cfa91eebb8b8cef367dc53c923584236122235446e0579b468e", + "root_symbol_id": "09a78d8eb31c2da14fee58da53b5da7a5065a4c23b6300748a6d44517a5284b8", + "path_symbols": [ + "test_actions_start_stop_and_health_when_worker_is_idle", + "ScenarioWorker", + "ScenarioWorker.__init__", + "ScenarioWorker._name", + "ScenarioWorker.name" + ], + "path_symbol_ids": [ + "09a78d8eb31c2da14fee58da53b5da7a5065a4c23b6300748a6d44517a5284b8", + "9a1d08a7eb1831c9f2e0db361b5207f036e477c160773ae08c0b287239785c52", + "9c20be046ba06644d1432e0f20eb223663d2b116ee7d91fdc62bc68323f2e593", + "da022da2c49fd9cfd09d6e6da6bbd59aaa7d28efd669ce8444e88d327ddec2fc" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def test_actions_start_stop_and_health_when_worker_is_idle() -> None:\n runtime, base_url = _build_runtime(ScenarioWorker(\"idle-worker\", IntervalRoutine(), interval=0.2))\n try:\n stop_status, stop_payload = _http_call_json(base_url, \"/actions/stop\", method=\"POST\")\n assert stop_status == 200\n assert isinstance(stop_payload.get(\"detail\"), dict)\n assert stop_payload[\"detail\"][\"timed_out\"] is False\n assert stop_payload[\"detail\"][\"state\"] == \"stopped\"\n\n health_stopped_status, health_stopped_payload = _http_call_json(base_url, \"/health\")\n assert health_stopped_status == 503\n assert health_stopped_payload[\"state\"] == \"stopped\"\n assert health_stopped_payload[\"status\"] == \"unhealthy\"\n\n start_status, start_payload = _http_call_json(base_url, \"/actions/start\", method=\"POST\")\n assert start_status == 200\n assert isinstance(start_payload.get(\"detail\"), dict)\n assert start_payload[\"detail\"][\"timed_out\"] is False\n assert start_payload[\"detail\"][\"state\"] in {\"idle\", \"busy\"}\n\n health_started_status, health_started_payload = _http_call_json(base_url, \"/health\")\n assert health_started_status == 200\n assert health_started_payload[\"status\"] == \"ok\"\n assert health_started_payload[\"state\"] in {\"idle\", \"busy\"}\n finally:\n runtime.stop()", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:test_actions_start_stop_and_health_when_worker_is_idle", + "span_start": 181, + "span_end": 206, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 8, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _poll_until_stopped(base_url: str, timeout: float = 2.0) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n _, payload = _http_call_json(base_url, \"/actions/status\")\n if payload.get(\"detail\") == \"stopped\":\n return True\n sleep(0.05)\n return False", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_poll_until_stopped", + "span_start": 144, + "span_end": 151, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 5, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def test_worker_wakes_up_with_configured_interval() -> None:\n interval = 0.15\n routine = IntervalRoutine()\n worker = ScenarioWorker(\"interval-worker\", routine, interval=interval)\n runtime = RuntimeManager()\n runtime.register_module(WorkerModule(worker))\n\n runtime.start()\n try:\n assert routine.wait_runs(count=3, timeout=2.0) is True\n finally:\n runtime.stop()\n\n deltas = routine.deltas()\n assert len(deltas) >= 2\n assert all(delta >= interval * 0.7 for delta in deltas[:2])", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:test_worker_wakes_up_with_configured_interval", + "span_start": 163, + "span_end": 178, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 7, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class BlockingRoutine:\n def __init__(self, started: Event, release: Event) -> None:\n self._started = started\n self._release = release\n\n def run(self) -> None:\n self._started.set()\n self._release.wait(timeout=5.0)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:BlockingRoutine", + "span_start": 40, + "span_end": 47, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class WorkerModule(ApplicationModule):\n def __init__(self, worker: Worker) -> None:\n self._worker = worker\n\n @property\n def name(self) -> str:\n return \"business-tests\"\n\n def register(self, registry: ModuleRegistry) -> None:\n registry.add_worker(self._worker)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:WorkerModule", + "span_start": 113, + "span_end": 122, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 3, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _http_call_json(\n base_url: str,\n path: str,\n *,\n method: str = \"GET\",\n headers: dict[str, str] | None = None,\n) -> tuple[int, dict[str, object]]:\n request = Request(f\"{base_url}{path}\", method=method, headers=headers or {})\n try:\n with urlopen(request, timeout=15.0) as response:\n status = response.status\n body = response.read()\n except HTTPError as error:\n status = error.code\n body = error.read()\n payload = json.loads(body.decode(\"utf-8\"))\n return status, payload", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_http_call_json", + "span_start": 125, + "span_end": 141, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 4, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _build_runtime(worker: Worker, *, control_timeout: int = 1) -> tuple[RuntimeManager, str]:\n runtime = RuntimeManager()\n channel = HttpControlChannel(host=\"127.0.0.1\", port=0, timeout=control_timeout)\n runtime.control_plane.register_channel(channel)\n runtime.register_module(WorkerModule(worker))\n runtime.start()\n return runtime, f\"http://127.0.0.1:{channel.port}\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_build_runtime", + "span_start": 154, + "span_end": 160, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 6, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class ScenarioWorker(Worker):\n def __init__(self, name: str, routine: object, *, interval: float = 0.05) -> None:\n self._name = name\n self._routine = routine\n self._interval = interval\n self._thread: Thread | None = None\n self._stop_requested = Event()\n self._in_flight = 0\n self._runs = 0\n self._lock = Lock()\n\n @property\n def name(self) -> str:\n return self._name\n\n @property\n def critical(self) -> bool:\n return True\n\n def start(self) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._stop_requested.clear()\n self._thread = Thread(target=self._loop, name=f\"{self._name}-thread\", daemon=True)\n self._thread.start()\n\n def stop(self, force: bool = False) -> None:\n self._stop_requested.set()\n\n def health(self) -> WorkerHealth:\n return WorkerHealth(name=self.name, status=\"ok\", critical=True, meta={\"runs\": self._runs})\n\n def status(self) -> WorkerStatus:\n thread_alive = self._thread is not None and self._thread.is_alive()\n with self._lock:\n in_flight = self._in_flight\n runs = self._runs\n if not thread_alive:\n state = \"stopped\"\n elif self._stop_requested.is_set():\n state = \"stopping\"\n elif in_flight > 0:\n state = \"busy\"\n else:\n state = \"idle\"\n return WorkerStatus(name=self.name, state=state, in_flight=in_flight, meta={\"runs\": runs})\n\n def _loop(self) -> None:\n while not self._stop_requested.is_set():\n with self._lock:\n self._in_flight += 1\n try:\n self._routine.run()\n with self._lock:\n self._runs += 1\n finally:\n with self._lock:\n self._in_flight -= 1\n if self._stop_requested.is_set():\n return\n sleep(self._interval)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:ScenarioWorker", + "span_start": 50, + "span_end": 110, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 2, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class IntervalRoutine:\n calls: list[float] = field(default_factory=list)\n _lock: Lock = field(default_factory=Lock)\n\n def run(self) -> None:\n with self._lock:\n self.calls.append(monotonic())\n\n def wait_runs(self, count: int, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n with self._lock:\n if len(self.calls) >= count:\n return True\n sleep(0.01)\n return False\n\n def deltas(self) -> list[float]:\n with self._lock:\n return [self.calls[index + 1] - self.calls[index] for index in range(len(self.calls) - 1)]", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:IntervalRoutine", + "span_start": 18, + "span_end": 37, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def test_actions_stop_busy_worker_before_timeout() -> None:\n started = Event()\n release = Event()\n runtime, base_url = _build_runtime(ScenarioWorker(\"busy-worker\", BlockingRoutine(started, release)))\n assert started.wait(timeout=1.0) is True\n\n def release_later() -> None:\n sleep(0.2)\n release.set()\n\n Thread(target=release_later, daemon=True).start()\n try:\n status, payload = _http_call_json(base_url, \"/actions/stop\", method=\"POST\")\n assert status == 200\n assert isinstance(payload.get(\"detail\"), dict)\n assert payload[\"detail\"][\"timed_out\"] is False\n assert payload[\"detail\"][\"state\"] == \"stopped\"\n\n health_status, health_payload = _http_call_json(base_url, \"/health\")\n assert health_status == 503\n assert health_payload[\"status\"] == \"unhealthy\"\n assert health_payload[\"state\"] == \"stopped\"\n finally:\n runtime.stop()", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:test_actions_stop_busy_worker_before_timeout", + "span_start": 209, + "span_end": 232, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 9, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C0_SOURCE_CHUNKS": 10 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src", + "tests" + ], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src", + "tests" + ], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "WorkflowRuntimeFactory", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Где тесты для WorkflowRuntimeFactory? test_workflow_runtime_factory TestWorkflowRuntimeFactory WorkflowRuntimeFactory", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Где тесты для WorkflowRuntimeFactory? test_workflow_runtime_factory TestWorkflowRuntimeFactory WorkflowRuntimeFactory", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 10, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 0, + "candidates_after_filter": 0 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src", + "tests" + ], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src", + "tests" + ], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 10, + "candidates_after_filter": 10 + } + ], + "fallback": { + "used": true, + "reason": "scope_relaxed_no_hits" + }, + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "WorkflowRuntimeFactory" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "miss", + "hit_count": 0, + "fail_reason": "scope_relaxed_no_hits" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 10, + "fail_reason": null + } + ] + }, + "constraint_violations": [ + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C1_SYMBOL_CATALOG", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + } + ], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 100, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 44, + "C2_DEPENDENCY_GRAPH": 40, + "C0_SOURCE_CHUNKS": 15 + }, + "merge_rank": 0 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Где тесты для WorkflowRuntimeFactory?", + "rag_count": 16 + }, + "output": { + "llm_answer": "Прямых тестов конкретно для `WorkflowRuntimeFactory` в предоставленном контексте не обнаружено." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 1040, + "evidence_rows": 16, + "evidence_chars": 8149 + }, + "evidence_summary": [ + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 10, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_find_tests_ru_v4", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 1178 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-find-tests-workflow-runtime-factory-negative.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-find-tests-workflow-runtime-factory-negative.md new file mode 100644 index 0000000..b2f5045 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-find-tests-workflow-runtime-factory-negative.md @@ -0,0 +1,32 @@ +# plba-v2-find-tests-workflow-runtime-factory-negative + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Где тесты для WorkflowRuntimeFactory? + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 16, + "llm_answer": "Прямых тестов конкретно для `WorkflowRuntimeFactory` в предоставленном контексте не обнаружено.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "WorkflowRuntimeFactory" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-open-file-nonexistent.json b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-open-file-nonexistent.json new file mode 100644 index 0000000..14afe88 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-open-file-nonexistent.json @@ -0,0 +1,441 @@ +{ + "case_id": "plba-v2-open-file-nonexistent", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 0, + "llm_answer": "Файл src/app_runtime/core/missing_runtime.py не найден.", + "answer_mode": "degraded", + "path_scope": [ + "src/app_runtime/core/missing_runtime.py" + ], + "symbol_candidates": [], + "layers": [ + "C0_SOURCE_CHUNKS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-v2-open-file-nonexistent", + "text": "Открой файл src/app_runtime/core/missing_runtime.py", + "mode": "full_chain", + "run_started_at": "2026-03-12T14:36:36", + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Открой файл src/app_runtime/core/missing_runtime.py", + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [], + "confidence": 0.0 + }, + "rag_count": 0, + "rag_rows": [], + "llm_answer": "Файл src/app_runtime/core/missing_runtime.py не найден.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [], + "evidence_sufficient": false + }, + "llm": { + "answer_status": "degraded", + "groundedness": "weakly_grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "unknown", + "symbol_candidates": [], + "keyword_hints": [], + "path_hints": [ + "src/app_runtime/core/missing_runtime.py" + ], + "path_scope": [ + "src/app_runtime/core/missing_runtime.py" + ], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/app_runtime/core/missing_runtime.py" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": false, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C0_SOURCE_CHUNKS": 200 + }, + "filters_by_layer": { + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src/app_runtime/core/missing_runtime.py" + ], + "include_globs": [], + "exclude_globs": [], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": null, + "workspace_id": null, + "returned_repo_ids": [], + "returned_workspace_ids": [] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Открой файл src/app_runtime/core/missing_runtime.py", + "path_scope": [ + "src/app_runtime/core/missing_runtime.py" + ], + "include_globs": [], + "exclude_globs": [], + "prefer_globs": [], + "top_k": 200, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src/app_runtime/core/missing_runtime.py" + ], + "normalized_include_globs": [], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 0, + "candidates_after_filter": 0 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [] + }, + "layers": [ + { + "layer": "C0_SOURCE_CHUNKS", + "status": "miss", + "hit_count": 0, + "fail_reason": null + } + ] + }, + "constraint_violations": [ + { + "type": "PATH_SCOPE_NOT_SATISFIED", + "severity": "error", + "details": { + "path_scope": [ + "src/app_runtime/core/missing_runtime.py" + ], + "returned_paths": [] + }, + "suggested_fix": "Use exact path_scope retrieval and disable broad fallback for OPEN_FILE." + }, + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C0_SOURCE_CHUNKS", + "requested_layers": [ + "C0_SOURCE_CHUNKS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + } + ], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 8, + "retrieval_by_layer": { + "C0_SOURCE_CHUNKS": 8 + }, + "merge_rank": 0, + "prompt_build": 0, + "llm_call": 0 + }, + "prompt": null, + "answer_policy": { + "short_circuit": true, + "answer_mode": "degraded", + "failure_reason": "file_not_found" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [], + "path_scope": [ + "src/app_runtime/core/missing_runtime.py" + ] + }, + "llm": { + "used_evidence_count": 0, + "missing_evidence_reason": "file_not_found" + } + }, + "run_info": { + "case_id": "plba-v2-open-file-nonexistent", + "mode": "full_chain", + "run_started_at": "2026-03-12T14:36:36", + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Открой файл src/app_runtime/core/missing_runtime.py", + "normalized_query": "Открой файл src/app_runtime/core/missing_runtime.py" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Открой файл src/app_runtime/core/missing_runtime.py" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Открой файл src/app_runtime/core/missing_runtime.py" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "unknown", + "symbol_candidates": [], + "keyword_hints": [], + "path_hints": [ + "src/app_runtime/core/missing_runtime.py" + ], + "path_scope": [ + "src/app_runtime/core/missing_runtime.py" + ], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/app_runtime/core/missing_runtime.py" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": false, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Открой файл src/app_runtime/core/missing_runtime.py" + }, + "output": { + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [], + "confidence": 0.0 + }, + "rag_count": 0, + "rag_rows": [] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C0_SOURCE_CHUNKS": 200 + }, + "filters_by_layer": { + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src/app_runtime/core/missing_runtime.py" + ], + "include_globs": [], + "exclude_globs": [], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": null, + "workspace_id": null, + "returned_repo_ids": [], + "returned_workspace_ids": [] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Открой файл src/app_runtime/core/missing_runtime.py", + "path_scope": [ + "src/app_runtime/core/missing_runtime.py" + ], + "include_globs": [], + "exclude_globs": [], + "prefer_globs": [], + "top_k": 200, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src/app_runtime/core/missing_runtime.py" + ], + "normalized_include_globs": [], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 0, + "candidates_after_filter": 0 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [] + }, + "layers": [ + { + "layer": "C0_SOURCE_CHUNKS", + "status": "miss", + "hit_count": 0, + "fail_reason": null + } + ] + }, + "constraint_violations": [ + { + "type": "PATH_SCOPE_NOT_SATISFIED", + "severity": "error", + "details": { + "path_scope": [ + "src/app_runtime/core/missing_runtime.py" + ], + "returned_paths": [] + }, + "suggested_fix": "Use exact path_scope retrieval and disable broad fallback for OPEN_FILE." + }, + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C0_SOURCE_CHUNKS", + "requested_layers": [ + "C0_SOURCE_CHUNKS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + } + ], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 8, + "retrieval_by_layer": { + "C0_SOURCE_CHUNKS": 8 + }, + "merge_rank": 0 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Открой файл src/app_runtime/core/missing_runtime.py", + "rag_count": 0 + }, + "output": { + "llm_answer": "Файл src/app_runtime/core/missing_runtime.py не найден." + }, + "diagnostics": { + "prompt": null, + "timings_ms": { + "prompt_build": 0, + "llm_call": 0 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-open-file-nonexistent.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-open-file-nonexistent.md new file mode 100644 index 0000000..ab3d085 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-open-file-nonexistent.md @@ -0,0 +1,30 @@ +# plba-v2-open-file-nonexistent + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Открой файл src/app_runtime/core/missing_runtime.py + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 0, + "llm_answer": "Файл src/app_runtime/core/missing_runtime.py не найден.", + "answer_mode": "degraded", + "path_scope": [ + "src/app_runtime/core/missing_runtime.py" + ], + "symbol_candidates": [], + "layers": [ + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-open-file-public-api.json b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-open-file-public-api.json new file mode 100644 index 0000000..e3902b7 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-open-file-public-api.json @@ -0,0 +1,492 @@ +{ + "case_id": "plba-v2-open-file-public-api", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 1, + "llm_answer": "В модуле src/plba/__init__.py видны следующие импорты и объявления:\nИмпорты:\n- plba.bootstrap.create_runtime\n- plba.config.ConfigFileLoader, FileConfigProvider\n- plba.control.ControlActionSet, ControlChannel, ControlPlaneService, HttpControlChannel\n- plba.contracts.ApplicationModule, ConfigProvider, HealthContributor, TraceContext, TraceContextRecord, TraceLogMessage, TraceTransport, Worker, WorkerHealth, WorkerStatus\n- plba.core.ConfigurationManager, RuntimeManager, ServiceContainer\n- plba.health.HealthRegistry\n- plba.logging.LogManager\n- plba.queue.InMemoryTaskQueue\n- plba.tracing.MySqlTraceTransport, NoOpTraceTransport, TraceService\n- plba.workflow.StepResult, WorkflowContext, WorkflowDefinition, WorkflowEngine, WorkflowEngineHooks, WorkflowNode, WorkflowRuntimeFactory, WorkflowStep\n- plba.workers.WorkerSupervisor\n\nОбъявления:\n- __all__\n\nТакже здесь определены несколько функций и классов из указанных модулей.", + "answer_mode": "answered", + "path_scope": [ + "src/plba/__init__.py" + ], + "symbol_candidates": [], + "layers": [ + "C0_SOURCE_CHUNKS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-v2-open-file-public-api", + "text": "Открой файл src/plba/__init__.py", + "mode": "full_chain", + "run_started_at": "2026-03-12T14:36:36", + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Открой файл src/plba/__init__.py", + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [], + "confidence": 0.0 + }, + "rag_count": 1, + "rag_rows": [ + { + "path": "src/plba/__init__.py", + "content": "from plba.bootstrap import create_runtime\nfrom plba.config import ConfigFileLoader, FileConfigProvider\nfrom plba.control import ControlActionSet, ControlChannel, ControlPlaneService, HttpControlChannel\nfrom plba.contracts import (\n ApplicationModule,\n ConfigProvider,\n HealthContributor,\n TraceContext,\n TraceContextRecord,\n TraceLogMessage,\n TraceTransport,\n Worker,\n WorkerHealth,\n WorkerStatus,\n)\nfrom plba.core import ConfigurationManager, RuntimeManager, ServiceContainer\nfrom plba.health import HealthRegistry\nfrom plba.logging import LogManager\nfrom plba.queue import InMemoryTaskQueue\nfrom plba.tracing import MySqlTraceTransport, NoOpTraceTransport, TraceService\nfrom plba.workflow import (\n StepResult,\n WorkflowContext,\n WorkflowDefinition,\n WorkflowEngine,\n WorkflowEngineHooks,\n WorkflowNode,\n WorkflowRuntimeFactory,\n WorkflowStep,\n)\nfrom plba.workers import WorkerSupervisor\n\n__all__ = [\n \"ApplicationModule\",\n \"ConfigFileLoader\",\n \"ConfigProvider\",\n \"ConfigurationManager\",\n \"ControlActionSet\",\n \"ControlChannel\",\n \"ControlPlaneService\",\n \"create_runtime\",\n \"FileConfigProvider\",\n \"HealthContributor\",\n \"HealthRegistry\",\n \"HttpControlChannel\",\n \"InMemoryTaskQueue\",\n \"LogManager\",\n \"MySqlTraceTransport\",\n \"NoOpTraceTransport\",\n \"RuntimeManager\",\n \"ServiceContainer\",\n \"TraceContext\",\n \"TraceContextRecord\",\n \"TraceLogMessage\",\n \"TraceService\",\n \"TraceTransport\",\n \"StepResult\",\n \"Worker\",\n \"WorkerHealth\",\n \"WorkerStatus\",\n \"WorkflowContext\",\n \"WorkflowDefinition\",\n \"WorkflowEngine\",\n \"WorkflowEngineHooks\",\n \"WorkflowNode\",\n \"WorkflowRuntimeFactory\",\n \"WorkflowStep\",\n \"WorkerSupervisor\",\n]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/__init__.py:1-69", + "span_start": 1, + "span_end": 69, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "В модуле src/plba/__init__.py видны следующие импорты и объявления:\nИмпорты:\n- plba.bootstrap.create_runtime\n- plba.config.ConfigFileLoader, FileConfigProvider\n- plba.control.ControlActionSet, ControlChannel, ControlPlaneService, HttpControlChannel\n- plba.contracts.ApplicationModule, ConfigProvider, HealthContributor, TraceContext, TraceContextRecord, TraceLogMessage, TraceTransport, Worker, WorkerHealth, WorkerStatus\n- plba.core.ConfigurationManager, RuntimeManager, ServiceContainer\n- plba.health.HealthRegistry\n- plba.logging.LogManager\n- plba.queue.InMemoryTaskQueue\n- plba.tracing.MySqlTraceTransport, NoOpTraceTransport, TraceService\n- plba.workflow.StepResult, WorkflowContext, WorkflowDefinition, WorkflowEngine, WorkflowEngineHooks, WorkflowNode, WorkflowRuntimeFactory, WorkflowStep\n- plba.workers.WorkerSupervisor\n\nОбъявления:\n- __all__\n\nТакже здесь определены несколько функций и классов из указанных модулей.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "unknown", + "symbol_candidates": [], + "keyword_hints": [], + "path_hints": [ + "src/plba/__init__.py" + ], + "path_scope": [ + "src/plba/__init__.py" + ], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/plba/__init__.py" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": false, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C0_SOURCE_CHUNKS": 200 + }, + "filters_by_layer": { + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src/plba/__init__.py" + ], + "include_globs": [], + "exclude_globs": [], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Открой файл src/plba/__init__.py", + "path_scope": [ + "src/plba/__init__.py" + ], + "include_globs": [], + "exclude_globs": [], + "prefer_globs": [], + "top_k": 200, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src/plba/__init__.py" + ], + "normalized_include_globs": [], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [] + }, + "layers": [ + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 14, + "retrieval_by_layer": { + "C0_SOURCE_CHUNKS": 14 + }, + "merge_rank": 0, + "prompt_build": 0, + "llm_call": 1717 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 673, + "evidence_rows": 1, + "evidence_chars": 1768 + }, + "evidence_summary": [ + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_open_file_ru_v4", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [], + "path_scope": [ + "src/plba/__init__.py" + ] + }, + "llm": { + "used_evidence_count": 1, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-v2-open-file-public-api", + "mode": "full_chain", + "run_started_at": "2026-03-12T14:36:36", + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Открой файл src/plba/__init__.py", + "normalized_query": "Открой файл src/plba/__init__.py" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Открой файл src/plba/__init__.py" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Открой файл src/plba/__init__.py" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "unknown", + "symbol_candidates": [], + "keyword_hints": [], + "path_hints": [ + "src/plba/__init__.py" + ], + "path_scope": [ + "src/plba/__init__.py" + ], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/plba/__init__.py" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": false, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Открой файл src/plba/__init__.py" + }, + "output": { + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [], + "confidence": 0.0 + }, + "rag_count": 1, + "rag_rows": [ + { + "path": "src/plba/__init__.py", + "content": "from plba.bootstrap import create_runtime\nfrom plba.config import ConfigFileLoader, FileConfigProvider\nfrom plba.control import ControlActionSet, ControlChannel, ControlPlaneService, HttpControlChannel\nfrom plba.contracts import (\n ApplicationModule,\n ConfigProvider,\n HealthContributor,\n TraceContext,\n TraceContextRecord,\n TraceLogMessage,\n TraceTransport,\n Worker,\n WorkerHealth,\n WorkerStatus,\n)\nfrom plba.core import ConfigurationManager, RuntimeManager, ServiceContainer\nfrom plba.health import HealthRegistry\nfrom plba.logging import LogManager\nfrom plba.queue import InMemoryTaskQueue\nfrom plba.tracing import MySqlTraceTransport, NoOpTraceTransport, TraceService\nfrom plba.workflow import (\n StepResult,\n WorkflowContext,\n WorkflowDefinition,\n WorkflowEngine,\n WorkflowEngineHooks,\n WorkflowNode,\n WorkflowRuntimeFactory,\n WorkflowStep,\n)\nfrom plba.workers import WorkerSupervisor\n\n__all__ = [\n \"ApplicationModule\",\n \"ConfigFileLoader\",\n \"ConfigProvider\",\n \"ConfigurationManager\",\n \"ControlActionSet\",\n \"ControlChannel\",\n \"ControlPlaneService\",\n \"create_runtime\",\n \"FileConfigProvider\",\n \"HealthContributor\",\n \"HealthRegistry\",\n \"HttpControlChannel\",\n \"InMemoryTaskQueue\",\n \"LogManager\",\n \"MySqlTraceTransport\",\n \"NoOpTraceTransport\",\n \"RuntimeManager\",\n \"ServiceContainer\",\n \"TraceContext\",\n \"TraceContextRecord\",\n \"TraceLogMessage\",\n \"TraceService\",\n \"TraceTransport\",\n \"StepResult\",\n \"Worker\",\n \"WorkerHealth\",\n \"WorkerStatus\",\n \"WorkflowContext\",\n \"WorkflowDefinition\",\n \"WorkflowEngine\",\n \"WorkflowEngineHooks\",\n \"WorkflowNode\",\n \"WorkflowRuntimeFactory\",\n \"WorkflowStep\",\n \"WorkerSupervisor\",\n]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/__init__.py:1-69", + "span_start": 1, + "span_end": 69, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C0_SOURCE_CHUNKS": 200 + }, + "filters_by_layer": { + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src/plba/__init__.py" + ], + "include_globs": [], + "exclude_globs": [], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Открой файл src/plba/__init__.py", + "path_scope": [ + "src/plba/__init__.py" + ], + "include_globs": [], + "exclude_globs": [], + "prefer_globs": [], + "top_k": 200, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src/plba/__init__.py" + ], + "normalized_include_globs": [], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [] + }, + "layers": [ + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 14, + "retrieval_by_layer": { + "C0_SOURCE_CHUNKS": 14 + }, + "merge_rank": 0 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Открой файл src/plba/__init__.py", + "rag_count": 1 + }, + "output": { + "llm_answer": "В модуле src/plba/__init__.py видны следующие импорты и объявления:\nИмпорты:\n- plba.bootstrap.create_runtime\n- plba.config.ConfigFileLoader, FileConfigProvider\n- plba.control.ControlActionSet, ControlChannel, ControlPlaneService, HttpControlChannel\n- plba.contracts.ApplicationModule, ConfigProvider, HealthContributor, TraceContext, TraceContextRecord, TraceLogMessage, TraceTransport, Worker, WorkerHealth, WorkerStatus\n- plba.core.ConfigurationManager, RuntimeManager, ServiceContainer\n- plba.health.HealthRegistry\n- plba.logging.LogManager\n- plba.queue.InMemoryTaskQueue\n- plba.tracing.MySqlTraceTransport, NoOpTraceTransport, TraceService\n- plba.workflow.StepResult, WorkflowContext, WorkflowDefinition, WorkflowEngine, WorkflowEngineHooks, WorkflowNode, WorkflowRuntimeFactory, WorkflowStep\n- plba.workers.WorkerSupervisor\n\nОбъявления:\n- __all__\n\nТакже здесь определены несколько функций и классов из указанных модулей." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 673, + "evidence_rows": 1, + "evidence_chars": 1768 + }, + "evidence_summary": [ + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_open_file_ru_v4", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 1717 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-open-file-public-api.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-open-file-public-api.md new file mode 100644 index 0000000..2c1c102 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-open-file-public-api.md @@ -0,0 +1,30 @@ +# plba-v2-open-file-public-api + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Открой файл src/plba/__init__.py + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 1, + "llm_answer": "В модуле src/plba/__init__.py видны следующие импорты и объявления:\nИмпорты:\n- plba.bootstrap.create_runtime\n- plba.config.ConfigFileLoader, FileConfigProvider\n- plba.control.ControlActionSet, ControlChannel, ControlPlaneService, HttpControlChannel\n- plba.contracts.ApplicationModule, ConfigProvider, HealthContributor, TraceContext, TraceContextRecord, TraceLogMessage, TraceTransport, Worker, WorkerHealth, WorkerStatus\n- plba.core.ConfigurationManager, RuntimeManager, ServiceContainer\n- plba.health.HealthRegistry\n- plba.logging.LogManager\n- plba.queue.InMemoryTaskQueue\n- plba.tracing.MySqlTraceTransport, NoOpTraceTransport, TraceService\n- plba.workflow.StepResult, WorkflowContext, WorkflowDefinition, WorkflowEngine, WorkflowEngineHooks, WorkflowNode, WorkflowRuntimeFactory, WorkflowStep\n- plba.workers.WorkerSupervisor\n\nОбъявления:\n- __all__\n\nТакже здесь определены несколько функций и классов из указанных модулей.", + "answer_mode": "answered", + "path_scope": [ + "src/plba/__init__.py" + ], + "symbol_candidates": [], + "layers": [ + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-open-file-runtime.json b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-open-file-runtime.json new file mode 100644 index 0000000..c00f60f --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-open-file-runtime.json @@ -0,0 +1,492 @@ +{ + "case_id": "plba-v2-open-file-runtime", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 1, + "llm_answer": "В файле src/app_runtime/core/runtime.py определен класс RuntimeManager. Видны следующие элементы:\n- Константы: ACTION_TIMEOUT_SECONDS, ACTION_POLL_INTERVAL_SECONDS.\n- Инициализация с параметрами конфигурации, сервисов, трассировки, здоровья, логирования, супервизора рабочих процессов и службы управления плоскостью контроля.\n- Метод регистрации модуля приложения.", + "answer_mode": "answered", + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "symbol_candidates": [], + "layers": [ + "C0_SOURCE_CHUNKS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-v2-open-file-runtime", + "text": "Открой файл src/app_runtime/core/runtime.py", + "mode": "full_chain", + "run_started_at": "2026-03-12T14:36:36", + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Открой файл src/app_runtime/core/runtime.py", + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [], + "confidence": 0.0 + }, + "rag_count": 1, + "rag_rows": [ + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "В файле src/app_runtime/core/runtime.py определен класс RuntimeManager. Видны следующие элементы:\n- Константы: ACTION_TIMEOUT_SECONDS, ACTION_POLL_INTERVAL_SECONDS.\n- Инициализация с параметрами конфигурации, сервисов, трассировки, здоровья, логирования, супервизора рабочих процессов и службы управления плоскостью контроля.\n- Метод регистрации модуля приложения.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "unknown", + "symbol_candidates": [], + "keyword_hints": [], + "path_hints": [ + "src/app_runtime/core/runtime.py" + ], + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/app_runtime/core/runtime.py" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": false, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C0_SOURCE_CHUNKS": 200 + }, + "filters_by_layer": { + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "include_globs": [], + "exclude_globs": [], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Открой файл src/app_runtime/core/runtime.py", + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "include_globs": [], + "exclude_globs": [], + "prefer_globs": [], + "top_k": 200, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "normalized_include_globs": [], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [] + }, + "layers": [ + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 1, + "symbol_resolution": 0, + "retrieval_total": 212, + "retrieval_by_layer": { + "C0_SOURCE_CHUNKS": 212 + }, + "merge_rank": 0, + "prompt_build": 0, + "llm_call": 903 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 684, + "evidence_rows": 1, + "evidence_chars": 6265 + }, + "evidence_summary": [ + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_open_file_ru_v4", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [], + "path_scope": [ + "src/app_runtime/core/runtime.py" + ] + }, + "llm": { + "used_evidence_count": 1, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-v2-open-file-runtime", + "mode": "full_chain", + "run_started_at": "2026-03-12T14:36:36", + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Открой файл src/app_runtime/core/runtime.py", + "normalized_query": "Открой файл src/app_runtime/core/runtime.py" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Открой файл src/app_runtime/core/runtime.py" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Открой файл src/app_runtime/core/runtime.py" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "unknown", + "symbol_candidates": [], + "keyword_hints": [], + "path_hints": [ + "src/app_runtime/core/runtime.py" + ], + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/app_runtime/core/runtime.py" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": false, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 1 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Открой файл src/app_runtime/core/runtime.py" + }, + "output": { + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [], + "confidence": 0.0 + }, + "rag_count": 1, + "rag_rows": [ + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C0_SOURCE_CHUNKS": 200 + }, + "filters_by_layer": { + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "include_globs": [], + "exclude_globs": [], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Открой файл src/app_runtime/core/runtime.py", + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "include_globs": [], + "exclude_globs": [], + "prefer_globs": [], + "top_k": 200, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "normalized_include_globs": [], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [] + }, + "layers": [ + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 212, + "retrieval_by_layer": { + "C0_SOURCE_CHUNKS": 212 + }, + "merge_rank": 0 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Открой файл src/app_runtime/core/runtime.py", + "rag_count": 1 + }, + "output": { + "llm_answer": "В файле src/app_runtime/core/runtime.py определен класс RuntimeManager. Видны следующие элементы:\n- Константы: ACTION_TIMEOUT_SECONDS, ACTION_POLL_INTERVAL_SECONDS.\n- Инициализация с параметрами конфигурации, сервисов, трассировки, здоровья, логирования, супервизора рабочих процессов и службы управления плоскостью контроля.\n- Метод регистрации модуля приложения." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 684, + "evidence_rows": 1, + "evidence_chars": 6265 + }, + "evidence_summary": [ + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_open_file_ru_v4", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 903 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-open-file-runtime.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-open-file-runtime.md new file mode 100644 index 0000000..74a0240 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-open-file-runtime.md @@ -0,0 +1,30 @@ +# plba-v2-open-file-runtime + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Открой файл src/app_runtime/core/runtime.py + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 1, + "llm_answer": "В файле src/app_runtime/core/runtime.py определен класс RuntimeManager. Видны следующие элементы:\n- Константы: ACTION_TIMEOUT_SECONDS, ACTION_POLL_INTERVAL_SECONDS.\n- Инициализация с параметрами конфигурации, сервисов, трассировки, здоровья, логирования, супервизора рабочих процессов и службы управления плоскостью контроля.\n- Метод регистрации модуля приложения.", + "answer_mode": "answered", + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "symbol_candidates": [], + "layers": [ + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-health-endpoint.json b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-health-endpoint.json new file mode 100644 index 0000000..433fe10 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-health-endpoint.json @@ -0,0 +1,3084 @@ +{ + "case_id": "plba-v2-trace-flow-health-endpoint", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "TRACE_FLOW", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 26, + "llm_answer": "Когда пользователь делает запрос `/health` к приложению, созданному с помощью `HttpControlAppFactory`, происходят следующие шаги:\n\n1. Запрос поступает на уровень middleware (`log_api_call`) приложения FastAPI, где измеряется время обработки запроса.\n2. После middleware запрос обрабатывается маршрутизатором FastAPI и достигает обработчика маршрута `/health`.\n3. В обработчике `/health` вызывается предоставленный внешним компонентом callable-функции `health_provider`, которая должна вернуть объект типа `HealthPayload`.\n4. Полученный от `health_provider` объект проверяется на статус «ok». Если он соответствует этому значению, возвращается успешный ответ (статус-код 200), иначе — ошибка (статус-код 503).\n5. Ответ формируется в виде объекта `JSONResponse`, содержащего результат вызова `health_provider`. \n\nТаким образом, поток начинается с входящего HTTP-запроса, проходит через middleware для логирования времени отклика и затем направляется на конечный обработчик маршрута `/health`, после чего ответ отправляется обратно клиенту.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "health", + "HttpControlAppFactory" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-v2-trace-flow-health-endpoint", + "text": "Покажи как проходит запрос /health в HttpControlAppFactory", + "mode": "full_chain", + "run_started_at": "2026-03-12T14:36:36", + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Покажи как проходит запрос /health в HttpControlAppFactory", + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "HttpControlAppFactory", + "alternatives": [ + "HttpControlAppFactory", + "ControlActionSet", + "HealthContributor.health", + "HealthContributor" + ], + "confidence": 0.99 + }, + "rag_count": 26, + "rag_rows": [ + { + "path": "src/app_runtime/control/http_app.py", + "content": "class HttpControlAppFactory\nHttpControlAppFactory", + "layer": "C1_SYMBOL_CATALOG", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "qname": "HttpControlAppFactory", + "kind": "class", + "signature": "HttpControlAppFactory", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlActionSet\nControlActionSet", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "qname": "ControlActionSet", + "kind": "class", + "signature": "ControlActionSet", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/health.py", + "content": "method HealthContributor.health\nhealth(self)\nReturn contributor health state.", + "layer": "C1_SYMBOL_CATALOG", + "title": "HealthContributor.health", + "span_start": 9, + "span_end": 10, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "728cff18958d8a25e2661a0f08c83d68c3bbbfa8cef212b85dc0da2b11b3dc90", + "qname": "HealthContributor.health", + "kind": "method", + "signature": "health(self)", + "parent_symbol_id": "HealthContributor", + "package_or_module": "src.app_runtime.contracts.health", + "is_test": false, + "blob_sha": "6bd92611def7131e32d4dd34a8ed85e6cf3c67722ad27797032a632cb30dc097", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/health.py", + "content": "class HealthContributor\nHealthContributor(ABC)", + "layer": "C1_SYMBOL_CATALOG", + "title": "HealthContributor", + "span_start": 7, + "span_end": 10, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "db91ae387b89a2e9d83829754f27fa18a4055b3e72d7f31789a0b8e0bf5bba0b", + "qname": "HealthContributor", + "kind": "class", + "signature": "HealthContributor(ABC)", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.contracts.health", + "is_test": false, + "blob_sha": "6bd92611def7131e32d4dd34a8ed85e6cf3c67722ad27797032a632cb30dc097", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/health/registry.py", + "content": "HealthRegistry\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (2)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HealthRegistry", + "span_start": 8, + "span_end": 56, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 29, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd3390eb0ba29c9979466b9c2117238e0da3bb829eeb4d505cb34c9c3df7a8e8", + "symbol_name": "HealthRegistry", + "qname": "HealthRegistry", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 2, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "26e6a24daa43407ba5340b74497c20153020e79f8d7828ae502aaec378dfcf75", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/types.py", + "content": "HealthPayload\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "HealthPayload", + "span_start": 7, + "span_end": 11, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "392235d63ddf752d6e419cb8528c93fe070d1bc02d3c87ba6a897baac810cf5d", + "symbol_name": "HealthPayload", + "qname": "HealthPayload", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "448a02e4a432b5ab65b246b2bd24a32a6f127b9d2091ea73b53ee3c0a2f53bb3", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/health.py", + "content": "HealthContributor\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "HealthContributor", + "span_start": 7, + "span_end": 10, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "db91ae387b89a2e9d83829754f27fa18a4055b3e72d7f31789a0b8e0bf5bba0b", + "symbol_name": "HealthContributor", + "qname": "HealthContributor", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "6bd92611def7131e32d4dd34a8ed85e6cf3c67722ad27797032a632cb30dc097", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/health/registry.py", + "content": "HealthRegistry.__init__\n -> HealthRegistry._contributors\n -> HealthRegistry.register", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HealthRegistry.__init__:dataflow_slice", + "span_start": 10, + "span_end": 13, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "2381dfb339d541367c3251d2a610cac9d8b3f6bd6a352e119d00a93c5ccc2b7d", + "edge_type": "dataflow_slice", + "src_symbol_id": "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "src_qname": "HealthRegistry.__init__", + "dst_symbol_id": "a9e1f290c346c8bb1d67af0cafeebb5bcaf29c3ed7027e33c794532743df38f2", + "dst_ref": "HealthRegistry.register", + "resolution": "resolved", + "slice_id": "2381dfb339d541367c3251d2a610cac9d8b3f6bd6a352e119d00a93c5ccc2b7d", + "root_symbol_id": "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "path_symbols": [ + "HealthRegistry.__init__", + "HealthRegistry._contributors", + "HealthRegistry.register" + ], + "path_symbol_ids": [ + "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "a9e1f290c346c8bb1d67af0cafeebb5bcaf29c3ed7027e33c794532743df38f2" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "26e6a24daa43407ba5340b74497c20153020e79f8d7828ae502aaec378dfcf75", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/health/registry.py", + "content": "HealthRegistry.__init__\n -> HealthRegistry._contributors\n -> HealthRegistry.contributor_healths", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HealthRegistry.__init__:dataflow_slice", + "span_start": 10, + "span_end": 16, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d3a88a7abf16359e903e809ffc24473658fdd8198f60641fe1584fc4ac663c31", + "edge_type": "dataflow_slice", + "src_symbol_id": "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "src_qname": "HealthRegistry.__init__", + "dst_symbol_id": "fa7bbd8f4b64a55a5088640c30f52e84075d65f531bd7e1f6c1d7bb8d24fcbf2", + "dst_ref": "HealthRegistry.contributor_healths", + "resolution": "resolved", + "slice_id": "d3a88a7abf16359e903e809ffc24473658fdd8198f60641fe1584fc4ac663c31", + "root_symbol_id": "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "path_symbols": [ + "HealthRegistry.__init__", + "HealthRegistry._contributors", + "HealthRegistry.contributor_healths" + ], + "path_symbol_ids": [ + "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "fa7bbd8f4b64a55a5088640c30f52e84075d65f531bd7e1f6c1d7bb8d24fcbf2" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "26e6a24daa43407ba5340b74497c20153020e79f8d7828ae502aaec378dfcf75", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory.create calls time.monotonic", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlAppFactory.create:calls", + "span_start": 25, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3fdd0a88d10225ee74f3b84ab57e13f09f5ccc72f00e31af9ae4655411c289c0", + "edge_type": "calls", + "src_symbol_id": "4af42c2a9275d652e710a98ec48b8247236b4453a093629f8958704ff6d3cb58", + "src_qname": "HttpControlAppFactory.create", + "dst_symbol_id": null, + "dst_ref": "time.monotonic", + "resolution": "partial", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory.create calls app.post", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlAppFactory.create:calls", + "span_start": 37, + "span_end": 37, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "0e545d4b5187db7bec5ceac03071d2ad68177550c42af748fee364639e533c90", + "edge_type": "calls", + "src_symbol_id": "4af42c2a9275d652e710a98ec48b8247236b4453a093629f8958704ff6d3cb58", + "src_qname": "HttpControlAppFactory.create", + "dst_symbol_id": null, + "dst_ref": "app.post", + "resolution": "partial", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory.create calls str", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlAppFactory.create:calls", + "span_start": 27, + "span_end": 27, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "2a87c51461e31cd556508cc37fdff37b4d24c26f7f1604db30af5e8f1bda96cb", + "edge_type": "calls", + "src_symbol_id": "4af42c2a9275d652e710a98ec48b8247236b4453a093629f8958704ff6d3cb58", + "src_qname": "HttpControlAppFactory.create", + "dst_symbol_id": null, + "dst_ref": "str", + "resolution": "partial", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "class HttpControlAppFactory:\n def create(\n self,\n health_provider: Callable[[], Awaitable[HealthPayload]],\n action_provider: Callable[[str, str], Awaitable[JSONResponse]],\n ) -> FastAPI:\n app = FastAPI(title=\"PLBA Control API\")\n\n @app.middleware(\"http\")\n async def log_api_call(request: Request, call_next): # type: ignore[no-untyped-def]\n started = time.monotonic()\n response = await call_next(request)\n response.headers[\"X-Response-Time-Ms\"] = str(int((time.monotonic() - started) * 1000))\n return response\n\n @app.get(\"/health\")\n async def health() -> JSONResponse:\n payload = await health_provider()\n status_code = 200 if payload.get(\"status\") == \"ok\" else 503\n return JSONResponse(content=payload, status_code=status_code)\n\n @app.get(\"/actions/{action}\")\n @app.post(\"/actions/{action}\")\n async def action(action: str, request: Request) -> JSONResponse:\n client_source = self._client_source(request)\n if action in {\"start\", \"stop\"}:\n LOGGER.warning(\"Control action requested: /actions/%s client=%s\", action, client_source)\n return await action_provider(action, client_source)\n\n return app\n\n def _client_source(self, request: Request) -> str:\n explicit_header = request.headers.get(\"X-Client-Source\", \"\").strip()\n if explicit_header:\n return explicit_header\n user_agent = request.headers.get(\"User-Agent\", \"\").strip()\n if user_agent:\n return f\"user-agent:{user_agent}\"\n return \"unknown\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_app.py:HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "Когда пользователь делает запрос `/health` к приложению, созданному с помощью `HttpControlAppFactory`, происходят следующие шаги:\n\n1. Запрос поступает на уровень middleware (`log_api_call`) приложения FastAPI, где измеряется время обработки запроса.\n2. После middleware запрос обрабатывается маршрутизатором FastAPI и достигает обработчика маршрута `/health`.\n3. В обработчике `/health` вызывается предоставленный внешним компонентом callable-функции `health_provider`, которая должна вернуть объект типа `HealthPayload`.\n4. Полученный от `health_provider` объект проверяется на статус «ok». Если он соответствует этому значению, возвращается успешный ответ (статус-код 200), иначе — ошибка (статус-код 503).\n5. Ответ формируется в виде объекта `JSONResponse`, содержащего результат вызова `health_provider`. \n\nТаким образом, поток начинается с входящего HTTP-запроса, проходит через middleware для логирования времени отклика и затем направляется на конечный обработчик маршрута `/health`, после чего ответ отправляется обратно клиенту.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "TRACE_FLOW", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS", + "C4_SEMANTIC_ROLES" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "TRACE_FLOW", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "unknown", + "symbol_candidates": [ + "health", + "HttpControlAppFactory" + ], + "keyword_hints": [ + "health", + "HttpControlAppFactory" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 10, + "C3_ENTRYPOINTS": 10 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "health HttpControlAppFactory", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Покажи как проходит запрос /health в HttpControlAppFactory", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "Покажи как проходит запрос /health в HttpControlAppFactory", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Покажи как проходит запрос /health в HttpControlAppFactory", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 10, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "Покажи как проходит запрос /health в HttpControlAppFactory", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 10, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 4, + "candidates_after_filter": 4 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 10, + "candidates_after_filter": 10 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "HttpControlAppFactory", + "alternatives": [ + "HttpControlAppFactory", + "ControlActionSet", + "HealthContributor.health", + "HealthContributor" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 4, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 8, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 10, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 145, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 48, + "C0_SOURCE_CHUNKS": 16, + "C4_SEMANTIC_ROLES": 14, + "C2_DEPENDENCY_GRAPH": 56, + "C3_ENTRYPOINTS": 11 + }, + "merge_rank": 44, + "prompt_build": 0, + "llm_call": 1683 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 837, + "evidence_rows": 26, + "evidence_chars": 3507 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 4, + "unique_paths": 3 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 8, + "unique_paths": 7 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 10, + "unique_paths": 3 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_trace_flow_ru_v4", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "health", + "HttpControlAppFactory" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 26, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-v2-trace-flow-health-endpoint", + "mode": "full_chain", + "run_started_at": "2026-03-12T14:36:36", + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Покажи как проходит запрос /health в HttpControlAppFactory", + "normalized_query": "Покажи как проходит запрос /health в HttpControlAppFactory" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Покажи как проходит запрос /health в HttpControlAppFactory" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Покажи как проходит запрос /health в HttpControlAppFactory" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "TRACE_FLOW", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "unknown", + "symbol_candidates": [ + "health", + "HttpControlAppFactory" + ], + "keyword_hints": [ + "health", + "HttpControlAppFactory" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Покажи как проходит запрос /health в HttpControlAppFactory" + }, + "output": { + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "HttpControlAppFactory", + "alternatives": [ + "HttpControlAppFactory", + "ControlActionSet", + "HealthContributor.health", + "HealthContributor" + ], + "confidence": 0.99 + }, + "rag_count": 26, + "rag_rows": [ + { + "path": "src/app_runtime/control/http_app.py", + "content": "class HttpControlAppFactory\nHttpControlAppFactory", + "layer": "C1_SYMBOL_CATALOG", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "qname": "HttpControlAppFactory", + "kind": "class", + "signature": "HttpControlAppFactory", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlActionSet\nControlActionSet", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "qname": "ControlActionSet", + "kind": "class", + "signature": "ControlActionSet", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/health.py", + "content": "method HealthContributor.health\nhealth(self)\nReturn contributor health state.", + "layer": "C1_SYMBOL_CATALOG", + "title": "HealthContributor.health", + "span_start": 9, + "span_end": 10, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "728cff18958d8a25e2661a0f08c83d68c3bbbfa8cef212b85dc0da2b11b3dc90", + "qname": "HealthContributor.health", + "kind": "method", + "signature": "health(self)", + "parent_symbol_id": "HealthContributor", + "package_or_module": "src.app_runtime.contracts.health", + "is_test": false, + "blob_sha": "6bd92611def7131e32d4dd34a8ed85e6cf3c67722ad27797032a632cb30dc097", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/health.py", + "content": "class HealthContributor\nHealthContributor(ABC)", + "layer": "C1_SYMBOL_CATALOG", + "title": "HealthContributor", + "span_start": 7, + "span_end": 10, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "db91ae387b89a2e9d83829754f27fa18a4055b3e72d7f31789a0b8e0bf5bba0b", + "qname": "HealthContributor", + "kind": "class", + "signature": "HealthContributor(ABC)", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.contracts.health", + "is_test": false, + "blob_sha": "6bd92611def7131e32d4dd34a8ed85e6cf3c67722ad27797032a632cb30dc097", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/health/registry.py", + "content": "HealthRegistry\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (2)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HealthRegistry", + "span_start": 8, + "span_end": 56, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 29, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd3390eb0ba29c9979466b9c2117238e0da3bb829eeb4d505cb34c9c3df7a8e8", + "symbol_name": "HealthRegistry", + "qname": "HealthRegistry", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 2, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "26e6a24daa43407ba5340b74497c20153020e79f8d7828ae502aaec378dfcf75", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/types.py", + "content": "HealthPayload\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "HealthPayload", + "span_start": 7, + "span_end": 11, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "392235d63ddf752d6e419cb8528c93fe070d1bc02d3c87ba6a897baac810cf5d", + "symbol_name": "HealthPayload", + "qname": "HealthPayload", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "448a02e4a432b5ab65b246b2bd24a32a6f127b9d2091ea73b53ee3c0a2f53bb3", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/health.py", + "content": "HealthContributor\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "HealthContributor", + "span_start": 7, + "span_end": 10, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "db91ae387b89a2e9d83829754f27fa18a4055b3e72d7f31789a0b8e0bf5bba0b", + "symbol_name": "HealthContributor", + "qname": "HealthContributor", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "6bd92611def7131e32d4dd34a8ed85e6cf3c67722ad27797032a632cb30dc097", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/health/registry.py", + "content": "HealthRegistry.__init__\n -> HealthRegistry._contributors\n -> HealthRegistry.register", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HealthRegistry.__init__:dataflow_slice", + "span_start": 10, + "span_end": 13, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "2381dfb339d541367c3251d2a610cac9d8b3f6bd6a352e119d00a93c5ccc2b7d", + "edge_type": "dataflow_slice", + "src_symbol_id": "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "src_qname": "HealthRegistry.__init__", + "dst_symbol_id": "a9e1f290c346c8bb1d67af0cafeebb5bcaf29c3ed7027e33c794532743df38f2", + "dst_ref": "HealthRegistry.register", + "resolution": "resolved", + "slice_id": "2381dfb339d541367c3251d2a610cac9d8b3f6bd6a352e119d00a93c5ccc2b7d", + "root_symbol_id": "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "path_symbols": [ + "HealthRegistry.__init__", + "HealthRegistry._contributors", + "HealthRegistry.register" + ], + "path_symbol_ids": [ + "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "a9e1f290c346c8bb1d67af0cafeebb5bcaf29c3ed7027e33c794532743df38f2" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "26e6a24daa43407ba5340b74497c20153020e79f8d7828ae502aaec378dfcf75", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/health/registry.py", + "content": "HealthRegistry.__init__\n -> HealthRegistry._contributors\n -> HealthRegistry.contributor_healths", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HealthRegistry.__init__:dataflow_slice", + "span_start": 10, + "span_end": 16, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d3a88a7abf16359e903e809ffc24473658fdd8198f60641fe1584fc4ac663c31", + "edge_type": "dataflow_slice", + "src_symbol_id": "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "src_qname": "HealthRegistry.__init__", + "dst_symbol_id": "fa7bbd8f4b64a55a5088640c30f52e84075d65f531bd7e1f6c1d7bb8d24fcbf2", + "dst_ref": "HealthRegistry.contributor_healths", + "resolution": "resolved", + "slice_id": "d3a88a7abf16359e903e809ffc24473658fdd8198f60641fe1584fc4ac663c31", + "root_symbol_id": "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "path_symbols": [ + "HealthRegistry.__init__", + "HealthRegistry._contributors", + "HealthRegistry.contributor_healths" + ], + "path_symbol_ids": [ + "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "fa7bbd8f4b64a55a5088640c30f52e84075d65f531bd7e1f6c1d7bb8d24fcbf2" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "26e6a24daa43407ba5340b74497c20153020e79f8d7828ae502aaec378dfcf75", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory.create calls time.monotonic", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlAppFactory.create:calls", + "span_start": 25, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3fdd0a88d10225ee74f3b84ab57e13f09f5ccc72f00e31af9ae4655411c289c0", + "edge_type": "calls", + "src_symbol_id": "4af42c2a9275d652e710a98ec48b8247236b4453a093629f8958704ff6d3cb58", + "src_qname": "HttpControlAppFactory.create", + "dst_symbol_id": null, + "dst_ref": "time.monotonic", + "resolution": "partial", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory.create calls app.post", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlAppFactory.create:calls", + "span_start": 37, + "span_end": 37, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "0e545d4b5187db7bec5ceac03071d2ad68177550c42af748fee364639e533c90", + "edge_type": "calls", + "src_symbol_id": "4af42c2a9275d652e710a98ec48b8247236b4453a093629f8958704ff6d3cb58", + "src_qname": "HttpControlAppFactory.create", + "dst_symbol_id": null, + "dst_ref": "app.post", + "resolution": "partial", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory.create calls str", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlAppFactory.create:calls", + "span_start": 27, + "span_end": 27, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "2a87c51461e31cd556508cc37fdff37b4d24c26f7f1604db30af5e8f1bda96cb", + "edge_type": "calls", + "src_symbol_id": "4af42c2a9275d652e710a98ec48b8247236b4453a093629f8958704ff6d3cb58", + "src_qname": "HttpControlAppFactory.create", + "dst_symbol_id": null, + "dst_ref": "str", + "resolution": "partial", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "class HttpControlAppFactory:\n def create(\n self,\n health_provider: Callable[[], Awaitable[HealthPayload]],\n action_provider: Callable[[str, str], Awaitable[JSONResponse]],\n ) -> FastAPI:\n app = FastAPI(title=\"PLBA Control API\")\n\n @app.middleware(\"http\")\n async def log_api_call(request: Request, call_next): # type: ignore[no-untyped-def]\n started = time.monotonic()\n response = await call_next(request)\n response.headers[\"X-Response-Time-Ms\"] = str(int((time.monotonic() - started) * 1000))\n return response\n\n @app.get(\"/health\")\n async def health() -> JSONResponse:\n payload = await health_provider()\n status_code = 200 if payload.get(\"status\") == \"ok\" else 503\n return JSONResponse(content=payload, status_code=status_code)\n\n @app.get(\"/actions/{action}\")\n @app.post(\"/actions/{action}\")\n async def action(action: str, request: Request) -> JSONResponse:\n client_source = self._client_source(request)\n if action in {\"start\", \"stop\"}:\n LOGGER.warning(\"Control action requested: /actions/%s client=%s\", action, client_source)\n return await action_provider(action, client_source)\n\n return app\n\n def _client_source(self, request: Request) -> str:\n explicit_header = request.headers.get(\"X-Client-Source\", \"\").strip()\n if explicit_header:\n return explicit_header\n user_agent = request.headers.get(\"User-Agent\", \"\").strip()\n if user_agent:\n return f\"user-agent:{user_agent}\"\n return \"unknown\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_app.py:HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 10, + "C3_ENTRYPOINTS": 10 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "health HttpControlAppFactory", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Покажи как проходит запрос /health в HttpControlAppFactory", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "Покажи как проходит запрос /health в HttpControlAppFactory", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Покажи как проходит запрос /health в HttpControlAppFactory", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 10, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "Покажи как проходит запрос /health в HttpControlAppFactory", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 10, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 4, + "candidates_after_filter": 4 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 10, + "candidates_after_filter": 10 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "HttpControlAppFactory", + "alternatives": [ + "HttpControlAppFactory", + "ControlActionSet", + "HealthContributor.health", + "HealthContributor" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 4, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 8, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 10, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 145, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 48, + "C0_SOURCE_CHUNKS": 16, + "C4_SEMANTIC_ROLES": 14, + "C2_DEPENDENCY_GRAPH": 56, + "C3_ENTRYPOINTS": 11 + }, + "merge_rank": 44 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Покажи как проходит запрос /health в HttpControlAppFactory", + "rag_count": 26 + }, + "output": { + "llm_answer": "Когда пользователь делает запрос `/health` к приложению, созданному с помощью `HttpControlAppFactory`, происходят следующие шаги:\n\n1. Запрос поступает на уровень middleware (`log_api_call`) приложения FastAPI, где измеряется время обработки запроса.\n2. После middleware запрос обрабатывается маршрутизатором FastAPI и достигает обработчика маршрута `/health`.\n3. В обработчике `/health` вызывается предоставленный внешним компонентом callable-функции `health_provider`, которая должна вернуть объект типа `HealthPayload`.\n4. Полученный от `health_provider` объект проверяется на статус «ok». Если он соответствует этому значению, возвращается успешный ответ (статус-код 200), иначе — ошибка (статус-код 503).\n5. Ответ формируется в виде объекта `JSONResponse`, содержащего результат вызова `health_provider`. \n\nТаким образом, поток начинается с входящего HTTP-запроса, проходит через middleware для логирования времени отклика и затем направляется на конечный обработчик маршрута `/health`, после чего ответ отправляется обратно клиенту." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 837, + "evidence_rows": 26, + "evidence_chars": 3507 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 4, + "unique_paths": 3 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 8, + "unique_paths": 7 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 10, + "unique_paths": 3 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_trace_flow_ru_v4", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 1683 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-health-endpoint.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-health-endpoint.md new file mode 100644 index 0000000..c6116b4 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-health-endpoint.md @@ -0,0 +1,35 @@ +# plba-v2-trace-flow-health-endpoint + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Покажи как проходит запрос /health в HttpControlAppFactory + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "TRACE_FLOW", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 26, + "llm_answer": "Когда пользователь делает запрос `/health` к приложению, созданному с помощью `HttpControlAppFactory`, происходят следующие шаги:\n\n1. Запрос поступает на уровень middleware (`log_api_call`) приложения FastAPI, где измеряется время обработки запроса.\n2. После middleware запрос обрабатывается маршрутизатором FastAPI и достигает обработчика маршрута `/health`.\n3. В обработчике `/health` вызывается предоставленный внешним компонентом callable-функции `health_provider`, которая должна вернуть объект типа `HealthPayload`.\n4. Полученный от `health_provider` объект проверяется на статус «ok». Если он соответствует этому значению, возвращается успешный ответ (статус-код 200), иначе — ошибка (статус-код 503).\n5. Ответ формируется в виде объекта `JSONResponse`, содержащего результат вызова `health_provider`. \n\nТаким образом, поток начинается с входящего HTTP-запроса, проходит через middleware для логирования времени отклика и затем направляется на конечный обработчик маршрута `/health`, после чего ответ отправляется обратно клиенту.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "health", + "HttpControlAppFactory" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-runtime-start.json b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-runtime-start.json new file mode 100644 index 0000000..6c361e9 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-runtime-start.json @@ -0,0 +1,2964 @@ +{ + "case_id": "plba-v2-trace-flow-runtime-start", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "TRACE_FLOW", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 23, + "llm_answer": "При запуске объекта `RuntimeManager` выполняются следующие последовательные шаги:\n\n1. В конструкторе класса (`__init__`) происходит инициализация атрибутов объекта с использованием переданных параметров или дефолтных значений для конфигураций, служб, трассировки, здоровья, логирования и управления рабочими процессами.\n \n2. Метод `self._register_core_services()` регистрирует основные сервисы внутри модуля регистрации (`registry`), что подразумевает первоначальную настройку среды исполнения.\n\nТаким образом, общий поток выглядит следующим образом:\n\n```python\nИнициализация объектов и их атрибутов\nruntime_manager = RuntimeManager(config, services, traces, health, logs, workers, control_plane)\nРегистрация основных сервисов приложения\nruntime_manager._register_core_services()\n```\n\nНа текущий момент восстановить дальнейший точный поток выполнения не представляется возможным ввиду недостаточной информации о следующих шагах после вызова `_register_core_services()`.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-v2-trace-flow-runtime-start", + "text": "Покажи поток выполнения при запуске RuntimeManager", + "mode": "full_chain", + "run_started_at": "2026-03-12T14:36:36", + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Покажи поток выполнения при запуске RuntimeManager", + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ], + "confidence": 0.99 + }, + "rag_count": 23, + "rag_rows": [ + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager\nRuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "qname": "RuntimeManager", + "kind": "class", + "signature": "RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests manager\n- orchestrates role-like calls (4)\n- reads and writes state attributes\n- participates in dataflow slices (50)", + "layer": "C4_SEMANTIC_ROLES", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 43, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "symbol_name": "RuntimeManager", + "qname": "RuntimeManager", + "role": "pipeline_stage", + "confidence": 0.67, + "dataflow_participation": 50, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 52, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.services\n -> RuntimeManager.__init__", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 33, + "span_end": 39, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d43af85989222ee6d788ce418cdcb217c7ff044cfb915e3bdbd184417dc7bd61", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "dst_ref": "RuntimeManager.__init__", + "resolution": "resolved", + "slice_id": "d43af85989222ee6d788ce418cdcb217c7ff044cfb915e3bdbd184417dc7bd61", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.services", + "RuntimeManager.__init__" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 59, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1", + "dst_ref": "RuntimeManager.start", + "resolution": "resolved", + "slice_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.start" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager._register_core_services", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 127, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6", + "dst_ref": "RuntimeManager._register_core_services", + "resolution": "resolved", + "slice_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager._register_core_services" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.services\n -> RuntimeManager._register_core_services", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 33, + "span_end": 127, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "aac6f9dda73963b977083a892bee39a48eca4fbd7404787e022ecf4ebedec65d", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6", + "dst_ref": "RuntimeManager._register_core_services", + "resolution": "resolved", + "slice_id": "aac6f9dda73963b977083a892bee39a48eca4fbd7404787e022ecf4ebedec65d", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.services", + "RuntimeManager._register_core_services" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "При запуске объекта `RuntimeManager` выполняются следующие последовательные шаги:\n\n1. В конструкторе класса (`__init__`) происходит инициализация атрибутов объекта с использованием переданных параметров или дефолтных значений для конфигураций, служб, трассировки, здоровья, логирования и управления рабочими процессами.\n \n2. Метод `self._register_core_services()` регистрирует основные сервисы внутри модуля регистрации (`registry`), что подразумевает первоначальную настройку среды исполнения.\n\nТаким образом, общий поток выглядит следующим образом:\n\n```python\nИнициализация объектов и их атрибутов\nruntime_manager = RuntimeManager(config, services, traces, health, logs, workers, control_plane)\nРегистрация основных сервисов приложения\nruntime_manager._register_core_services()\n```\n\nНа текущий момент восстановить дальнейший точный поток выполнения не представляется возможным ввиду недостаточной информации о следующих шагах после вызова `_register_core_services()`.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "TRACE_FLOW", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS", + "C4_SEMANTIC_ROLES" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "TRACE_FLOW", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 10, + "C3_ENTRYPOINTS": 10 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Покажи поток выполнения при запуске RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "Покажи поток выполнения при запуске RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Покажи поток выполнения при запуске RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 10, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "Покажи поток выполнения при запуске RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 10, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 10, + "candidates_after_filter": 10 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 8, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 10, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 170, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 55, + "C0_SOURCE_CHUNKS": 24, + "C4_SEMANTIC_ROLES": 19, + "C2_DEPENDENCY_GRAPH": 57, + "C3_ENTRYPOINTS": 13 + }, + "merge_rank": 23, + "prompt_build": 0, + "llm_call": 1454 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 859, + "evidence_rows": 23, + "evidence_chars": 8302 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 8, + "unique_paths": 7 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 10, + "unique_paths": 2 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_trace_flow_ru_v4", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "RuntimeManager" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 23, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-v2-trace-flow-runtime-start", + "mode": "full_chain", + "run_started_at": "2026-03-12T14:36:36", + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Покажи поток выполнения при запуске RuntimeManager", + "normalized_query": "Покажи поток выполнения при запуске RuntimeManager" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Покажи поток выполнения при запуске RuntimeManager" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Покажи поток выполнения при запуске RuntimeManager" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "TRACE_FLOW", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Покажи поток выполнения при запуске RuntimeManager" + }, + "output": { + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ], + "confidence": 0.99 + }, + "rag_count": 23, + "rag_rows": [ + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager\nRuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "qname": "RuntimeManager", + "kind": "class", + "signature": "RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests manager\n- orchestrates role-like calls (4)\n- reads and writes state attributes\n- participates in dataflow slices (50)", + "layer": "C4_SEMANTIC_ROLES", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 43, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "symbol_name": "RuntimeManager", + "qname": "RuntimeManager", + "role": "pipeline_stage", + "confidence": 0.67, + "dataflow_participation": 50, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 52, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.services\n -> RuntimeManager.__init__", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 33, + "span_end": 39, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d43af85989222ee6d788ce418cdcb217c7ff044cfb915e3bdbd184417dc7bd61", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "dst_ref": "RuntimeManager.__init__", + "resolution": "resolved", + "slice_id": "d43af85989222ee6d788ce418cdcb217c7ff044cfb915e3bdbd184417dc7bd61", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.services", + "RuntimeManager.__init__" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 59, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1", + "dst_ref": "RuntimeManager.start", + "resolution": "resolved", + "slice_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.start" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager._register_core_services", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 127, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6", + "dst_ref": "RuntimeManager._register_core_services", + "resolution": "resolved", + "slice_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager._register_core_services" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.services\n -> RuntimeManager._register_core_services", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 33, + "span_end": 127, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "aac6f9dda73963b977083a892bee39a48eca4fbd7404787e022ecf4ebedec65d", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6", + "dst_ref": "RuntimeManager._register_core_services", + "resolution": "resolved", + "slice_id": "aac6f9dda73963b977083a892bee39a48eca4fbd7404787e022ecf4ebedec65d", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.services", + "RuntimeManager._register_core_services" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 10, + "C3_ENTRYPOINTS": 10 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Покажи поток выполнения при запуске RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "Покажи поток выполнения при запуске RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Покажи поток выполнения при запуске RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 10, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "Покажи поток выполнения при запуске RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 10, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 10, + "candidates_after_filter": 10 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 8, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 10, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 170, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 55, + "C0_SOURCE_CHUNKS": 24, + "C4_SEMANTIC_ROLES": 19, + "C2_DEPENDENCY_GRAPH": 57, + "C3_ENTRYPOINTS": 13 + }, + "merge_rank": 23 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Покажи поток выполнения при запуске RuntimeManager", + "rag_count": 23 + }, + "output": { + "llm_answer": "При запуске объекта `RuntimeManager` выполняются следующие последовательные шаги:\n\n1. В конструкторе класса (`__init__`) происходит инициализация атрибутов объекта с использованием переданных параметров или дефолтных значений для конфигураций, служб, трассировки, здоровья, логирования и управления рабочими процессами.\n \n2. Метод `self._register_core_services()` регистрирует основные сервисы внутри модуля регистрации (`registry`), что подразумевает первоначальную настройку среды исполнения.\n\nТаким образом, общий поток выглядит следующим образом:\n\n```python\nИнициализация объектов и их атрибутов\nruntime_manager = RuntimeManager(config, services, traces, health, logs, workers, control_plane)\nРегистрация основных сервисов приложения\nruntime_manager._register_core_services()\n```\n\nНа текущий момент восстановить дальнейший точный поток выполнения не представляется возможным ввиду недостаточной информации о следующих шагах после вызова `_register_core_services()`." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 859, + "evidence_rows": 23, + "evidence_chars": 8302 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 8, + "unique_paths": 7 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 10, + "unique_paths": 2 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_trace_flow_ru_v4", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 1454 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-runtime-start.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-runtime-start.md new file mode 100644 index 0000000..52cafa6 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-runtime-start.md @@ -0,0 +1,34 @@ +# plba-v2-trace-flow-runtime-start + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Покажи поток выполнения при запуске RuntimeManager + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "TRACE_FLOW", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 23, + "llm_answer": "При запуске объекта `RuntimeManager` выполняются следующие последовательные шаги:\n\n1. В конструкторе класса (`__init__`) происходит инициализация атрибутов объекта с использованием переданных параметров или дефолтных значений для конфигураций, служб, трассировки, здоровья, логирования и управления рабочими процессами.\n \n2. Метод `self._register_core_services()` регистрирует основные сервисы внутри модуля регистрации (`registry`), что подразумевает первоначальную настройку среды исполнения.\n\nТаким образом, общий поток выглядит следующим образом:\n\n```python\nИнициализация объектов и их атрибутов\nruntime_manager = RuntimeManager(config, services, traces, health, logs, workers, control_plane)\nРегистрация основных сервисов приложения\nruntime_manager._register_core_services()\n```\n\nНа текущий момент восстановить дальнейший точный поток выполнения не представляется возможным ввиду недостаточной информации о следующих шагах после вызова `_register_core_services()`.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/summary.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/summary.md new file mode 100644 index 0000000..79b43c4 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143636/summary.md @@ -0,0 +1,83 @@ +# pipeline_setup_v2 summary + +Passed: 17/18 + +| File | Case | Query | Expected sub-intent | Intent | Actual sub-intent | RAG layers | Pass | +|------|------|-------|---------------------|--------|-------------------|------------|------| +| full_chain_plba_code_subintents_v2.yaml | plba-v2-open-file-runtime | Открой файл src/app_runtime/core/runtime.py | OPEN_FILE | CODE_QA | OPEN_FILE | C0_SOURCE_CHUNKS:1 | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-open-file-public-api | Открой файл src/plba/__init__.py | OPEN_FILE | CODE_QA | OPEN_FILE | C0_SOURCE_CHUNKS:1 | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-explain-runtime-manager | Объясни как работает класс RuntimeManager | EXPLAIN | CODE_QA | EXPLAIN | C0_SOURCE_CHUNKS:1, C1_SYMBOL_CATALOG:1, C2_DEPENDENCY_GRAPH:6, C3_ENTRYPOINTS:3, C4_SEMANTIC_ROLES:1 | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-explain-trace-service | Объясни как работает класс TraceService | EXPLAIN | CODE_QA | EXPLAIN | C0_SOURCE_CHUNKS:3, C1_SYMBOL_CATALOG:1, C2_DEPENDENCY_GRAPH:6, C3_ENTRYPOINTS:3, C4_SEMANTIC_ROLES:1 | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-explain-create-runtime | Что делает функция create_runtime? | EXPLAIN | CODE_QA | EXPLAIN | C0_SOURCE_CHUNKS:1, C1_SYMBOL_CATALOG:1, C2_DEPENDENCY_GRAPH:6, C3_ENTRYPOINTS:3, C4_SEMANTIC_ROLES:1 | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-explain-local-http-channel | Почему в файле src/app_runtime/control/http_channel.py класс HttpControlChannel устроен так? | EXPLAIN_LOCAL | CODE_QA | EXPLAIN_LOCAL | C0_SOURCE_CHUNKS:1, C1_SYMBOL_CATALOG:1, C2_DEPENDENCY_GRAPH:4 | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-find-tests-runtime-manager | Где тесты для RuntimeManager? | FIND_TESTS | CODE_QA | FIND_TESTS | C0_SOURCE_CHUNKS:10, C2_DEPENDENCY_GRAPH:6 | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-find-tests-trace-service | Где тесты для TraceService? | FIND_TESTS | CODE_QA | FIND_TESTS | C0_SOURCE_CHUNKS:10, C2_DEPENDENCY_GRAPH:6 | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-find-tests-create-runtime | Где тесты для create_runtime? | FIND_TESTS | CODE_QA | FIND_TESTS | C0_SOURCE_CHUNKS:10, C2_DEPENDENCY_GRAPH:6 | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-find-tests-workflow-runtime-factory-negative | Где тесты для WorkflowRuntimeFactory? | FIND_TESTS | CODE_QA | FIND_TESTS | C0_SOURCE_CHUNKS:10, C2_DEPENDENCY_GRAPH:6 | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-find-entrypoints-control-plane | Найди точки входа HTTP control plane | FIND_ENTRYPOINTS | CODE_QA | FIND_ENTRYPOINTS | C0_SOURCE_CHUNKS:6, C3_ENTRYPOINTS:3 | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-find-entrypoints-health-endpoint | Где health endpoint? | FIND_ENTRYPOINTS | CODE_QA | FIND_ENTRYPOINTS | C0_SOURCE_CHUNKS:6, C3_ENTRYPOINTS:3 | ✗ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-trace-flow-runtime-start | Покажи поток выполнения при запуске RuntimeManager | TRACE_FLOW | CODE_QA | TRACE_FLOW | C0_SOURCE_CHUNKS:1, C1_SYMBOL_CATALOG:1, C2_DEPENDENCY_GRAPH:10, C3_ENTRYPOINTS:3, C4_SEMANTIC_ROLES:8 | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-trace-flow-health-endpoint | Покажи как проходит запрос /health в HttpControlAppFactory | TRACE_FLOW | CODE_QA | TRACE_FLOW | C0_SOURCE_CHUNKS:1, C1_SYMBOL_CATALOG:4, C2_DEPENDENCY_GRAPH:10, C3_ENTRYPOINTS:3, C4_SEMANTIC_ROLES:8 | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-architecture-runtime-manager | Какие компоненты участвуют в RuntimeManager? | ARCHITECTURE | CODE_QA | ARCHITECTURE | C0_SOURCE_CHUNKS:1, C1_SYMBOL_CATALOG:1, C2_DEPENDENCY_GRAPH:8, C3_ENTRYPOINTS:3, C4_SEMANTIC_ROLES:12 | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-architecture-control-plane | Какие компоненты участвуют в ControlPlaneService? | ARCHITECTURE | CODE_QA | ARCHITECTURE | C0_SOURCE_CHUNKS:1, C1_SYMBOL_CATALOG:1, C2_DEPENDENCY_GRAPH:8, C3_ENTRYPOINTS:3, C4_SEMANTIC_ROLES:12 | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-explain-nonexistent-symbol | Объясни класс RuntimeFactoryManager | EXPLAIN | CODE_QA | EXPLAIN | — | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-open-file-nonexistent | Открой файл src/app_runtime/core/missing_runtime.py | OPEN_FILE | CODE_QA | OPEN_FILE | — | ✓ | + +## Failures +- **plba-v2-find-entrypoints-health-endpoint**: llm: expected answer to contain 'GET /health' + +## LLM Answers +- **plba-v2-open-file-runtime** + Query: Открой файл src/app_runtime/core/runtime.py + > В файле src/app\_runtime/core/runtime.py определен класс RuntimeManager. Видны следующие элементы: \- Константы: ACTION\_TIMEOUT\_SECONDS, ACTION\_POLL\_INTERVAL\_SECONDS. \- Инициализация с параметрами конфигурации, сервисов, трассировки, здоровья, логирования, супервизора рабочих процессов и службы управления плоскостью контроля. \- Метод регистрации модуля приложения. +- **plba-v2-open-file-public-api** + Query: Открой файл src/plba/__init__.py + > В модуле src/plba/\_\_init\_\_.py видны следующие импорты и объявления: Импорты: \- plba.bootstrap.create\_runtime \- plba.config.ConfigFileLoader, FileConfigProvider \- plba.control.ControlActionSet, ControlChannel, ControlPlaneService, HttpControlChannel \- plba.contracts.ApplicationModule, ConfigProvider, HealthContributor, TraceContext, TraceContextRecord, TraceLogMessage, TraceTransport, Worker, WorkerHealth, WorkerStatus \- plba.core.ConfigurationManager, RuntimeManager, ServiceContainer \- plba.health.HealthRegistry \- plba.logging.LogManager \- plba.queue.InMemoryTaskQueue \- plba.tracing.MySqlTraceTransport, NoOpTraceTransport, TraceService \- plba.workflow.StepResult, WorkflowContext, WorkflowDefinition, WorkflowEngine, WorkflowEngineHooks, WorkflowNode, WorkflowRuntimeFactory, WorkflowStep \- plba.workers.WorkerSupervisor Объявления: \- \_\_all\_\_ Также здесь определены неско… +- **plba-v2-explain-runtime-manager** + Query: Объясни как работает класс RuntimeManager + > Класс \`RuntimeManager\` выглядит как менеджер жизненного цикла и координатор для различных компонентов в приложении runtime. Судя по предоставленным данным, он работает как центрального управляющего элемента, координирующего действия других сервисов и модулей. Основные характеристики класса: \- Инициализация происходит через конструктор \(\`\_\_init\_\_\`\), которому передаются различные компоненты приложения \(конфигурации, службы, регистраторы трассировок, системы здоровья, логгеры и супервайзеры рабочих процессов\). \- В конструкторе устанавливаются начальные значения полей и создаются внутренние структуры данных, такие как \`registry\`, представляющий собой модульный регистр служб. \- Класс содержит два основных состояния управления: \- \`\_state\`: отслеживает текущее состояние жизненного цикла менеджера \(например, IDLE, RUNNING\). \- \`\_core\_registered\`: флаг, указывающий, зарегистри… +- **plba-v2-explain-trace-service** + Query: Объясни как работает класс TraceService + > Класс \`TraceService\` является частью системы отслеживания трассировок в приложении и реализует функционал управления контекстами трассировки и записи событий в журнал. Ключевые особенности класса: 1. Инициализация \(\`\_\_init\_\_\(\)\`\): \- При создании экземпляра класса указывается транспорт для отправки данных трассировки \(\`transport\`\) и хранилище контекста трассировки \(\`store\`\). Если эти параметры не указаны, используются дефолтные реализации: \`NoOpTraceTransport\(\)\` и \`TraceContextStore\(\)\`. \- Создаётся объект \`TraceRecordWriter\`, отвечающий за запись записей о контексте и сообщений в транспорт. 2. Создание нового контекста трассировки \(\`create\_context\(\)\`\): \- Метод создаёт новый контекст трассировки, генерируя уникальный идентификатор трассировки \(\`trace\_id\`\), устанавливая атрибуты, такие как имя трека \(\`alias\`\), родительский идентификатор \(\`parent\_id\`\), тип события \(\`kind\`… +- **plba-v2-explain-create-runtime** + Query: Что делает функция create_runtime? + > Функция \`create\_runtime\` находится в файле \`src/plba/bootstrap.py\`. Она отвечает за инициализацию и настройку основного объекта управления \(\`RuntimeManager\`\), используемого для координации различных компонентов приложения. Конкретно, эта функция выполняет следующие действия: 1. Создаёт новый объект типа \`RuntimeManager\`. 2. При наличии указанного пути к конфигурационному файлу добавляет этот файл в runtime при помощи вызова метода \`runtime.add\_config\_file\(\)\`. 3. Если указано включение HTTP\-контроля, регистрирует канал управления через класс \`HttpControlChannel\`, указывая параметры хоста, порта и тайм\-аута. 4. Регистрирует переданный модуль приложения \(\`module\`\) в runtime посредством вызова \`runtime.register\_module\(\)\`. 5. Возвращает созданный экземпляр \`RuntimeManager\`. Таким образом, основная цель функции – настройка базовой инфраструктуры приложения, включая загрузк… +- **plba-v2-explain-local-http-channel** + Query: Почему в файле src/app_runtime/control/http_channel.py класс HttpControlChannel устроен так? + > Класс \`HttpControlChannel\` реализует механизм управления HTTP\-каналом для взаимодействия с внешним окружением приложения. Что он делает: \- При инициализации \(\`\_\_init\_\_\`\) создается объект, принимающий параметры хоста, порта и тайм\-аута. Он устанавливает свойства \`\_timeout\`, создает внутренний сервер через объект \`UvicornThreadRunner\` и фабрику приложений \`HttpControlAppFactory\`. \- Метод \`start\(actions\)\` запускает приложение с заданным набором действий \(\`ControlActionSet\`\), если они предоставлены. Это включает создание приложения и его запуск с помощью внутреннего сервера. \- Метод \`stop\(\)\` останавливает запущенное ранее приложение. \- Методы \`\_health\_response\` и \`\_action\_response\` обеспечивают обработку запросов от клиентов. Первый возвращает статус здоровья канала \(здорово ли приложение\), второй обрабатывает запросы конкретных действий. Ключевые детали: \- Тайм\-аут зада… +- **plba-v2-find-tests-runtime-manager** + Query: Где тесты для RuntimeManager? + > Прямые тесты для RuntimeManager обнаружены в следующих местах: 1. tests/test\_runtime.py \| test\_runtime\_graceful\_stop\_waits\_until\_worker\_finishes \- Проверка корректного завершения работы менеджера при выполнении остановки \(graceful stop\). 2. tests/test\_runtime.py \| test\_runtime\_runs\_worker\_routine\_and\_exposes\_status \- Тестирование запуска рабочей рутины и доступности статуса RuntimeManager после старта и остановки. Эти тесты напрямую подтверждают поведение RuntimeManager через его инстанцирование и выполнение конкретных методов. Косвенные тесты также найдены: 1. tests/test\_business\_control\_actions.py \| \_build\_runtime \- Инстанцирует RuntimeManager в контексте построения бизнес\-контроля действий. 2. tests/test\_business\_control\_actions.py \| test\_worker\_wakes\_up\_with\_configured\_interval \- Опять же использует RuntimeManager внутри теста проверки пробуждения рабочего процес… +- **plba-v2-find-tests-trace-service** + Query: Где тесты для TraceService? + > Прямых тестов конкретно для \`TraceService\` в указанном контексте нет. Связь с сущностью не подтверждается именами функций, модулями или явными вызовами \`TraceService\`. Однако имеются косвенные тесты, которые косвенно затрагивают поведение \`TraceService\`, взаимодействуя через посредника \(\`RecordingTransport\`\), например: \- tests/test\_runtime.py: \- Проверка записи контекстов и сообщений \(метод \`write\_context\`\) при создании трассировочного сервиса. Эти тесты косвенно подтверждают корректность работы методов, связанных с \`TraceService\`. Тем не менее, напрямую тесты \`TraceService\` отсутствуют. +- **plba-v2-find-tests-create-runtime** + Query: Где тесты для create_runtime? + > Прямых тестов конкретно для функции \`create\_runtime\` в предоставленном контексте не обнаружено. +- **plba-v2-find-tests-workflow-runtime-factory-negative** + Query: Где тесты для WorkflowRuntimeFactory? + > Прямых тестов конкретно для \`WorkflowRuntimeFactory\` в предоставленном контексте не обнаружено. +- **plba-v2-find-entrypoints-control-plane** + Query: Найди точки входа HTTP control plane + > В данном приложении обнаружены следующие подтвержденные точки входа \(entrypoints\) HTTP control plane: 1. HTTP GET \`/health Объявлен в файле \`src/app\_runtime/control/http\_app.py\`. Контролируется методом \`health\(\)\` класса \`HttpControlAppFactory\`, который возвращает статус здоровья приложения. 2. HTTP POST/PUT/PATCH/DELETE \`/actions/\{action\}\` и HTTP GET \`/actions/\{action\} Объявлены в том же файле \`src/app\_runtime/control/http\_app.py\`. Данные маршруты обрабатываются методами \`action\(\)\` и контролируются классом \`HttpControlAppFactory\`. Все обнаруженные маршруты объявлены напрямую в коде через декораторы FastAPI \(\`@app.get\`, \`@app.post\`\), что подтверждает их реальное существование и доступность. +- **plba-v2-find-entrypoints-health-endpoint** + Query: Где health endpoint? + > У тебя есть две подтвержденные точки HTTP\-запросов \(\`GET /\`, \`POST /\`\), объявленные в файле \`http\_app.py\`. Однако конкретно маршрут \`/health\` нигде явно не указан. Тем не менее, исходя из предоставленного контекста, у нас есть компонент класса \`HealthRegistry\`, ответственный за сбор и обработку данных о здоровье системы. Вероятно, реализация проверки здоровья \(\`health check\`\) реализована через этот класс, хотя прямого указания на маршрут \`/health\` в предоставленных фрагментах кода нет. Таким образом, возможная кандидатура на роль health\-endpoint — это обращение к экземпляру класса \`HealthRegistry\` с запросом на получение информации о текущем состоянии компонентов системы \(хотя точный URL может отличаться от \`/health\`\). Однако стоит отметить, что без дополнительных сведений точно утверждать наличие именно маршрута \`/health\` нельзя. Рекомендую проверить непосредственно… +- **plba-v2-trace-flow-runtime-start** + Query: Покажи поток выполнения при запуске RuntimeManager + > При запуске объекта \`RuntimeManager\` выполняются следующие последовательные шаги: 1. В конструкторе класса \(\`\_\_init\_\_\`\) происходит инициализация атрибутов объекта с использованием переданных параметров или дефолтных значений для конфигураций, служб, трассировки, здоровья, логирования и управления рабочими процессами. 2. Метод \`self.\_register\_core\_services\(\)\` регистрирует основные сервисы внутри модуля регистрации \(\`registry\`\), что подразумевает первоначальную настройку среды исполнения. Таким образом, общий поток выглядит следующим образом: \`\`\`python Инициализация объектов и их атрибутов runtime\_manager = RuntimeManager\(config, services, traces, health, logs, workers, control\_plane\) Регистрация основных сервисов приложения runtime\_manager.\_register\_core\_services\(\) \`\`\` На текущий момент восстановить дальнейший точный поток выполнения не представляется возможным ввиду… +- **plba-v2-trace-flow-health-endpoint** + Query: Покажи как проходит запрос /health в HttpControlAppFactory + > Когда пользователь делает запрос \`/health\` к приложению, созданному с помощью \`HttpControlAppFactory\`, происходят следующие шаги: 1. Запрос поступает на уровень middleware \(\`log\_api\_call\`\) приложения FastAPI, где измеряется время обработки запроса. 2. После middleware запрос обрабатывается маршрутизатором FastAPI и достигает обработчика маршрута \`/health\`. 3. В обработчике \`/health\` вызывается предоставленный внешним компонентом callable\-функции \`health\_provider\`, которая должна вернуть объект типа \`HealthPayload\`. 4. Полученный от \`health\_provider\` объект проверяется на статус «ok». Если он соответствует этому значению, возвращается успешный ответ \(статус\-код 200\), иначе — ошибка \(статус\-код 503\). 5. Ответ формируется в виде объекта \`JSONResponse\`, содержащего результат вызова \`health\_provider\`. Таким образом, поток начинается с входящего HTTP\-запроса, проходит чере… +- **plba-v2-architecture-runtime-manager** + Query: Какие компоненты участвуют в RuntimeManager? + > В подсистеме RuntimeManager участвуют следующие компоненты и устанавливаются явные связи между ними: 1. RuntimeManager: \- Создаёт экземпляры других компонентов и управляет их жизненным циклом. \- Регистрирует состояние атрибутов системы и его изменения. \- Вызывает методы для обработки различных событий и состояний внутри системы. 2. ControlActionSet: \- Получает команды от RuntimeManager и выполняет действия модели на основе этих команд. Связи между компонентами: \- Создает: RuntimeManager создает экземпляр ControlActionSet при своем инициализации. \- Регистрирует: RuntimeManager отслеживает текущее состояние атрибутов системы и может регистрировать изменения состояния. \- Передаёт данные: RuntimeManager передает команды и события в ControlActionSet для выполнения соответствующих действий. Границы ответственности: \- RuntimeManager отвечает за координацию работы различных… +- **plba-v2-architecture-control-plane** + Query: Какие компоненты участвуют в ControlPlaneService? + > В подсистеме \`ControlPlaneService\` участвуют следующие компоненты и наблюдаются явные связи между ними: 1. ControlPlaneService — главный компонент, создающий и инициализирующий другие компоненты: \- Создаёт каналы \(\`\_channels\`\) для передачи данных с помощью метода \`\_channels\`. \- Регистрирует каналы с помощью метода \`register\_channel\`, который передаёт управление каналу. 2. Каналы \(\_channels\) — представляют собой элементы инфраструктуры для обмена данными внутри сервиса. Каналы создаются и регистрируются в \`ControlPlaneService\`. Связи компонентов выражены следующим образом: \- Контроллер службы создает и управляет каналами данных. \- Каналы используются службой для передачи и приёма сообщений между различными частями системы. Границы ответственности \`ControlPlaneService\` можно кратко описать так: \- Управление жизненным циклом каналов данных. \- Чтение и запись атрибутов с… +- **plba-v2-explain-nonexistent-symbol** + Query: Объясни класс RuntimeFactoryManager + > Сущность RuntimeFactoryManager не найдена в доступном коде. Близкие совпадения: ControlChannel, ControlActionSet. +- **plba-v2-open-file-nonexistent** + Query: Открой файл src/app_runtime/core/missing_runtime.py + > Файл src/app\_runtime/core/missing\_runtime.py не найден. \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856.zip b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856.zip new file mode 100644 index 0000000000000000000000000000000000000000..25a4913a3b57a041653610072ef35e239619f0a4 GIT binary patch literal 228856 zcmd42V~}jof~H+MW!tuGSDmtL+qP}nwtdRBZQC~H+&dlfP2BG3i7%ojW->DO%E-uE zvG@9s&t6Zwubd<>2r|Gw9@kD*TK|0WZwGh)d;mszMpk+z21Z>5W+rwPRyt=lC;&i^ zCqMvzfBr~W2?hY{wz$E(xun7TAEVqqX9EWS|97)t{+&%%S6V@)p#f5)g z|KHgk{L5M>{s(Je;%sH5YiOo#Zlh~wWuUKXXlrDw>*#D?ZsTNZP1=W>}9c? zPi8fD>D3}b_AW!(;zR)OAQ&TtgTECU- z&d_KgtNB2=1a#_0roJiH&+zPg38d-wzNp@Z3}tjT(_x#q;RfO;f(YQUxdb5{3n2sv zY&UZ2YsT#QgKOgIFh%o&yyY1O2kdC?9RR<%YYxx8eaFV zHUj4FIAHIg-P)R6L8z?-HvVF529V4_04Y${bME=2zx8Jzrzyy{4*w@5chUA-srg9m zIqh;n>^Yq?h%fh045x3WhO_^P3ZuNmA`lS2jP)1{8fB`^com9|mOf=}m+@B$g|h0z zr#M4n&;&rHZ0q=rO%>V-rHADRTc@@S%NcC1kAhbimB)fpw)gG^IL*o)I&x0MQe>uc z*9{g|uVm!pwkN-2OVccH)mtodz{JwgaWU9KmQURA8f+l#TkmiL`|MYA?|`p-4mBzYJuK& z(ljd~LFckL26m6&)w^q!Rja~sNA58AC5XJ-o2JYSmpIucnJ=JiPI$Pym{D#6UIkl3 z&UktKjWw6+qqI*ygo<21Rgeyz$EY0u;g&uDG?h_zm->2ev{go6v{4}}1^{{QplVnQ zhGn7}P(%3~;2Ln3-fe=prKMgdM}u6fmn?Qsc&$mHgd{6qh8&rb|)ha529PhQCC+8iWkkgvvSLc3-pA>VXa-TW1cc!qXFRumeDtwyY0 zKo-(OU`xMrJMIZ<)}-~@eIBszIE!{h^D9&wAV$ic5~sV*pn%t_%Y`J&Zs?NWQ;?A5 z80kS}M2O!eFhnVAQcMNf3s7ZQlv5+)JP?a&3vL}I(W_mm5cO!HXh{4J)1)(&5`$z zeh0CO%h4!8LoL0jjX~<@d)MI^0!I z^}qI6xGVSlaGr_*<39TRUBWC4~N zkIrWtt`laKP)z))CbV)Gtib)SX>FPzV#eLNg+^Vc4*=Q11pWk48%35&K>QL%$xACn z{gc?%sHJD%L-w(_6vCc_tq5UgiOy(%feyw4duv{(kn|HD5OW-*QZ~+Hkb;TC+BQ=M z%Vrp`56i-(d1ihlA`~D1qyhT8*cWuX_{WsnGjE+YR{2j6mau9pU#~SBf%G~jD>0@+ zQ*xU6R&yCW{;jHqN#-ckT9cSwSCYr;zBqzI=0aivZa5iJ(>G;?#{yHoHg4K%q25i$ z&C{q)-OFUKFCKKMxj(Y7pJpAP=9mB{u;hDyHFj?qFOPEjh@~u^ud?<@u|Zdxj<;C1 z-2rW_ax1H(v5rTR@>@Hrx^J)L(a4a5cl97!<;Bt2Fr+SxZ4y=Gk;EB=Z=3q28}nNG z%tZ40@j~>uMzIbNJrv)ZFG*~*-VFGZHbO5SU(7|=58ywbWuP)^g$xP+Z~^n5K}+X< zM()1=_b-C~5A*B)1#Bz-pTM?-qpi*V4%}DXA2!&cE-ybH$kBj6aX{ivUxNGsO%2Nk zyqXS17@0!~W-6|#i8wH(!&^)VZ7~278f0s3jUvyv)Tn)+?tTDTYYj%~sj6x2g*RCh z-L6lQx1{n)3yd5K&RovZLBx}?k5&OMF3YT9LPV&91|t6~lJ z7oLKKU5Rp^m+4&@vj%yc2g+pY2Zv_xS^kKJY~x56)?G z#*La03q;5!9uksX&i1|Tr;#2U?vrEA`7r0%2#zEopbB{;M2-<-Dyph%Q4b8+&EIr< z)6O0dX4mjR=PeFKf*O{=YHqHQd3wv3aAQE5MIrZ>+Bc;t^ne-P>dT|~%6#4hJrW#2 zy@KwzXQw@kN5j>$|JbD)4_wP~w~BSX$L4xDy{$h{+mn$NZY3qF<`w(4eG>4FC4BAe z($Ysp74G#;k-t4IA7!>SU^A@w+eoV&Mda{azPxBLie2AbOZ{+vnS0QCvU`$S?+D&` zjTbl4NaIO1?#RHE@Ck;H&AT9ep!wg}tp7xkPngv?G9(`loB3*HcyoDke?j>0rF;KU z_Mwu_mDQEjmC_x!NnIdYNNudW{m5YU{*{Ycy0%It=F9P6@-CRcn~f{hD7vuHNSA*% zvdUh>1B|FIwIk28L z&`GTH22YXYJyxEGe<3TzmEsNK%sW`oJrX6he`%Sgvw4~rT@85e_#C>{BWM|$&&U4+ zScz-?ZSf4_LU{D@sOM-|$0EmCbe3Be+UN_|4vYVU(Gs=e7nW>|_DF=;aXo(iOo<$~ zOkxJ~b_;I~Ai^WsV5%z-WjKRgtHaOJt6B8UV26~!r^n;n#}1pz`pX;bS#x$qb@opZ zoN-B&RiFrT!W=!WZ7t!8sqO=+AMWYGrK=!Bi@2>Z7Y3YRdslm3$0y(DgQ!#-pTI}e z`Whaw$dTpq?aM-GqiFA&(p??WPTzrOqi-N2oNxoLpGpm!ZB*L&&Ulz8Z)^OIhSU%w z9*1fOecVkf-|znVl%&U>;7!?h<;I`MFi)1Ri_4uq5{rvfuR!bT!`O?oukS|h%s7o~ z<$O_ry2AkWch8^}$?ftMZO)%fjytgwfSr%-sS@okJ7t3GS$Y7;T%-a-wQ1u&t7c`z z>CGjt-O0Qkm+N5Zq(GJN_b2R>_`s~UIAQ>}-nju|O#I|2{;~ecxWxspwNV}X#|KtX zi{ZaFkw(8Uz^buR*vFHJSwDEF*0EJd?C%gpS5=ce6`83vUgUC&5sJEAi4HytmuGg0 zyUH3PCi0WzN%r;tLT0SThnvKKt>1|*`k`VL<6FfKt^C29S?#y%pV$dTP;R0E{L%>5q_O5g3gTVu|C3AVmpHDyL?QenKP;^?nZ*I39Q5 zzFd$lzXh&GWObR1Dtct1V1TlZlPs6=st~GGr;-|kaco_J8chrO+T)=(3j|KGdWu`D ztrt6f>jc^J858m1#J7L-%_f{sM4t4md&j8g5-vSN!0HEwp(7bK-eo^MfMT|`BA5Az zHJ?=lT7hi7=NeWAl>)cp>vbegXC(h!R$@EURSb#mPXrj}pY~2@>R7px_=a0%&1ah5(fJ8)%MR!N~J1BQ(6FzB?g?NX9WI6^rYso zjQzFvLoM@Yf~ZmF1u5??a?$s@%W?0`jl0n8*BE{nKY>|5I5h;~1gvu`&t$~Y7;oG4 zQKu^M%Yv@==ifWhKdQ7l?Voeea0@OB;x2q$cWYBrs#{dPKWk4vFXj}#UHQ7+?~X27 zYqafcw_i^!IK-X#+TO>OF7ULve2!GFL)qwj?_Y|Ar@B18mZx;R9S+u?G;>Re`fk9e zJuu>l^Uw6|TMmXo7PSb?HiohLUQC5{Q=#v*M~Z$k3XjVrPeBl8!F4c~;R%M7>p)(hZk4(bk?Aq zq>*%+gx|GIl9MaZ(pI#vuvbzWxd1s@f{!4TxsLDYpE25o4pYq>Ym5+cjF#gx)H|Vq zwHQOp3XHTxM(iahp>y>V9J#eQp@NMNf&N)oYi%ar%5@7V(Sd~YGSYx)5rVowoEs*t zjZcx31=R26;5eiO;QJs#fH6)P(~j0K+F_^vs-UNCneIB=gRps@ZhNGve# z>jl6xWGCGHDn<7gu(MJy_54KPB1+V7Zo@|k+j)@pRAHUP*kJ_ew2jzyI+8^CsOy2; zY@96Z1kX5P*arbwHWnKww31NoV($NV-< zPJ@qk&!Dx8Ig&334M9@)-Rh<8y0~s;fKp0SzA|nRPN6omaXz+qkHaL#BC7~oaEj|M z+fe$e!DOP_WjoeW(^t|39&4nJOXme2c5YR&A_MzeCbm_!TH-mzwDx=n!MpU z9TWy8T>;6%8Wht`h^%EF5LSNX)_E%xNAW>uYqmK~Zl?iebhZi?xj;awvc>dH3l)&{ zfM;9U=&~G~5f^r(lmegk&%k*tXg;-b{or{zdd}pO{DCvY$rbB(-U-mYOcKI8MA`ah z&7qLOEXuWb`>D`!xxqE5Y`QLAS_X~@bA^n6>AAau>A9w~w{KdOzNBsH)SG+VBdR^K z5U?NME8!wI^2kEiW#%B;VH`+<0N`R001#R%r4PW5QDjg_NjWY9%o=-XijGPzC}jxF zD=!SSMVbHQ#$c=SzGjXPwU9E5E(>6AxU5tGhzh?Ih66{8O?gC5QL(N3GZFfGV)6k8 z^COB%E)JKk)$fZ-ukiEf=^iSV?#|i6%XIe%UQ?5tG^IK2P>*ih`QBxi4Pt!&P$EBk zSvdS{ChCfd25WOYK_%HGW~g4tV6{00V`+|36I`=dpaDf=AhUCS4iNfh6!nKP*u8qw za(z8ZcoHN{5*@wwcEh#ya&>t9x0ITUiS##AZN7kHK6Qp1J}TY4$2Erg5tYX2(bTf* zs84mK`?m~7febyP9&@7FMa8!G6)Ke%Y;^Zv&I(X_eA;+Muc;N5Ty|XH0RJjY#zD^( zeJ)-Q%n%f_?pn1N=`s|~e98%8r%OkRL)nxpRw6pm<2ul9qu;MJ7_Zo($H(K9oLr#a zt543L-NMeMyE7U7w%OIWgI3|#y88&fZ0AN>rB`!1R3DPaQwr8fN<1U>M|JptCm?}l zmLcS!N92@vm|^HKDr`b-*H(DcgUbY;pmSeOSQ1uHelsC!!qUJ283EO!^1}ovrNsQm zE8Ba42m5O+6y;kXO#m-c1i^E7MqHjv$gH+rd>}-9jYZsRGd)XAuC4s>c7gt`U#ez$ zC8^*F{Ha0rI{iL{#(aBV)xHVJxW)nu@@YWw7_<+Vg_f2Dgvwuq$3r|n3zNyIrUamE zKhlJx#aHnrV?L7ODHYjXai)9pT6h#XZM3k=C!J`)fsY=K5JXmYgjQDs(#}sg0))k? zIIe6zP|Gi;`cAmGvEcLp8SrV?=kg87wtu}ue=w|6Hl37IavlCm8^)e;=DyV3#EBK9 zC2rDufG;B|6zk7IoZyhs*e+3R#f+qGEc0@Piq)1CKbf0Q`D5aZ@-}5-K%L6f2?*MK zQ#x*$#yktCs|5BfKf>xo=i~&|3xdG^gbW1K<*Lm}R5143%pG6BEn9D92e0~9VWtu1y1ELyQ=&yPR8XoVAifazh8 z_t9N|xKrm{A(vPUo9e7Nr`L3WT!oMyQw|uhF5D=%|CADv!i#a)M%1u_mykECH~qeq z53oRRmWY+ReXfkVP3!Gx$Bs_{oVBkASHKWfkK@Mz-3lWMqg>bGQwDO|vwu;tN8Vmr zApjtlBG8^upwUvD8MBWKw9EO)iR*JUYuKk+?S|5&u?=M5sPfp|aa!zOxNnwWKG9$b zQgZx}0T#GfM{pQOm+!_M+p0a*pp8CJ@bkCWDb z8^kO}O$Q)5qySNqndIz8yVKB1kT@_~*SGcT1r_36h7=r-X=eG31yBoD>$19}zf!Kh z@^R=sMylKwY;ck9{d-RORz(T@C&G|CUjm;S*cnXscWF=sC2_{?`e+IQyIj~J+gg|P zr3V;xEo{d$mJUE3Rze!Fxq^>Yv6Cz z&2Kx?(BXL!2)^AlGI}jugBcYqmn8p-n&pYZDgOHTgoc2sbM>gKmb52)5^A35;1>yD zY(Igs%)GN`3#`s(#Nx+pSy96?$`9ZSqN-?DpFopzm6q2})j2Bk9{F6*dACt6l42MM z-$bjY1{rH3x^9(Bsa4=50xqRN5WR;H?k9HaQA{^OY%#2)e*Mk`^$k+8dCM0K?KjPWPx1tufQHXs(ht^rN$-9%?<#s-`SMt z4~}uO1~LG`3eT=51kTT;UqP&U`dXrOqVs%AZNMM?zRSeVlm!-8t9`ReUezj6W^u&5 zWOM#Y%?(xNH2NV z>B9cq4ej-kH?_)*bv`-)pen0mNdqcyGhx*x6P`X4KS~q+L_dhnozGd@##BoDKXlT= z-CXF~n&qm~ZT1l9_5Hkr2)f+lCy3|M!)6JWtW&n?il`h^48H;y$~NYtT)$~)zyx4c zx7y^&#tCL`ayYetr{Q<;kGr(*yxe~5BUo8Fvx7#-3 z&H3P?WXmruA#ohra#;X(^6aW1Kzc--YU7K@XbE|!1 z!3-K`I$k_Gtbn4Vxf@XW{oWRZ*)k%eTtYhNg&z-~k=27*f!ToILOYTCO#elB+Ao-|@*zKp28ra$hF8daNgLahAL?qkr880D zSJ7bFU}HoJ;l5z(pZZ1YM3giVJzKx~4&+ zB3U`XSzR>Qkw%)x(++(T!^+<)IchQVHkQm7sxs$F{tML@E$f9}OK96!MZg@iw#2>4 ztJ*5t)4BCW7?f!~%U9FbM@>flIt)iYOm*p|DYV(GXj$Y*zTKm$PlqkWx?T~lf7pjr zJ2F?&9ED4#B7ZM{8iOENs4zo-j5p^+*ZE+9KL2tYcxOIKUZFNXJXyGRBGU`=l=7jl z;cVMV0}B#1#BdBt2DC54>6bz7d(#l*ps+pTcA1&CGi_els*NJ1j0w+jStYzMxVp^e zrkIEb)7Bo|1}Th!fc8FqFIlZ-1Eag{`3i9~Un!%nTsCgm)M4&7^?N2S)F<>z9@Q2! zr{tx{tgI#Imm#lbs{*e3+9HSGoXQQP6VfDVhpJv~2ZREBcs_x7XJ&VNWZatqI^0VU zmD}fsjK&pb**JLT1mK#G^8rc@Z$MFXD`A*Hi$EAjE*rQ!7r1`-4MR{}&s(wa)>Pkr z{@j(8eSQY-aAxVjOs?LFrMgqDy_#QXf~|F;x?J-8JS?18saXlQ-FIk8Xw3!6mQqMOM@Q<8kRAxlQZ86%ilOD7Dk`JPae)SUHv zq%{qhxF&xjnr82;Z|g$~)2zT2xAmZ{sjc36nq<5hWH*)qj!K}HeeO~Xk8b!d2@Jc0 z4jE&=Pb|S~E9Awy&9LB7uQX&jWryF`NF15tYNw4=GYaeg%bK z?qv2}vNS>5-kD-lI!+G0+RXoW=?yor#?EKw5+|VB5G&tdpH{HD_9F>{LTvy8B!ky3 zPN#I_nd`lg1v8%9>=7h{gM?`Y!Kn`<$PkoV@+JC*PT4&@y8zNW8e}SZlgL zd-#x-k}sK0->H{2LXo+vXF!{`FBC3pjEn?FuWOS_rYQIfMolV>k=KPC!t+EBy$pt~ zOFgaS=t2 zX#;VwKZACKkxaoXoh0Jy1ZjBF;)tb-233198XKQ%aoA+gg9fV6?Ph~eE2TXuWyN5T zh{}UVAser9I$R}nb~Ht8riN$a2^#^oT0XPaTqs*beG2M;Q(oEQt>rfhTgkPN^4ZZw z%2EJCjEqLI4lM=ELsQYx_jo>%QgLc2dD*9JK{$@9~VF-zW|E;x;{n@bl-RY}VfYja6f^|9;a>J(SpmFipima0q-vlgr? zf3BIUlKz54N>gK?DOg@W?A<%|)%9GlAu%Wza%xI|fkeDJnN*g1=Ai@%h|=|3>6{id zDBN~^ET;sD?|3+pCqNqqe(~d1>PFM#W(ql4%{IG3kdhM;+V>LTUi<|dnbjYqt$|@j zEiHyz+0lBPjHdRAYyk7f&-&J}mLU@_^Ye3)U68WO$nR3(c_3yV6{2QUY7fU7kpW)K zEw$jzZT5cc;_wbtZB$k2jbyZ45sogkB4*r}HBXeG`QWoq^%(;tS39T_g)$G8&|R8t zjY{EHptZV+^z$3qmmKBULuNf}Z7*UMQt(d*X%&Q_&of(u!jI9w{Bs5j)-Q8-1; z%+MFQ#{^s)twqb~3Dy9vb*GVE~=hN2n?`={-dm2gfj}&E1SqI8x%`YYa zyl`E5N?NuX)xPE`rYx2nq-NjoH#0g9>mDp_yMZUh#+4@*=`Ra*mC~bD>UR zZ7e2p7Q{GZUhh`~BD}IX97Ozzb8dpOATVT4n5glB{Ny~$0#6Ao)GTemJPr!$^>CQCn{x^2GwY>*z^0VI&7eiyT ziJ)&M_Fr}85u@%}Oyrg(t3D-}F=mrR4Qj?&B;hfZCdXz;CSh!R$$!KjkT>SerH}&u zPS{u5Rev4cx_^7O(12qK0V)>RdPF@%X8z}jBUIm9Gj3D?^$#B5OGCP$Kh@m64l7eL z^~Xr=d)6SMrrS7%X6s#@lr@8EmW~u@@{wr!ozpNncY+lbfVmy!l)Ueu`t?GJc9_`jtRdvSSPQQFXH| z(tZ(C3*_ERU~aQ_WsS0Rc(A$#0vy!Wyt}BhaY(J2ts7|cb^(Qe`Cd_;Q=7SfdEek} zeqC_`iQ2YZmI_AU0r`EzLJ>1{O~Sli91#w#O5C~+#K^MVUNZI+W-4q=@jQc`<00V` z2UT4bEjt5!VcFAcZIpkt>z=Vw3oby4JpGGKC!^{8#w+HSwd-N=7>#M5F-THv+Jmy} z6ZQl&Hkp#Q;xOI}BeSF;_fiof0}kSAP7OxP@oG-tSV~Ci6qY~2s7G1k?2jWik8gh2 ztcd8R2zNYRuXwbJUXt{_i1h>ox}uv;nPvIRQ)1J7);CVWfDF&UN$wM@`?b2pOxD88 zJa(xIsD{Q*C&`U@%I}kW<4;>26q>174^|C|uCJgbX2lH-a}0z?SxHGpT23aKO1tkd z^UqQfkIJPi)EX58Wv4U~(^ zHu|QBz`o(+^d`7JlU$B)Bb3w7X?d!GUP~EOO_U(=H3Y4dXtfiv&bUHWBhB_3r`;Ly z+HG}-|9GJFxHqs!znED_wMC0Mhh+*RWUFwDv^dMwd_3MPxHnF`iBUCT%g%Y3plS#! z#K80;0btA*$z#tEG1?*SCI}^tgMp;427#~hP`U$tCDSBkW|4jhGanuHJVqIVbOVdf z2kVvvj>NRU|6skd&VEfffuE359#EC8V;&?Ul?S52Z-M@UE!wIy#FwPX>?(${M!^Xa z-Xkg_|C`)&hm5nO--TEH1W7sU)T_YQyWsxq?IuRjXiZvShblGfUzHvylbuolScDA* z>XP$X3p0H|MX5!`FT1LWB+im5ikoyvkViBBy>dpt$UXl;0MHRtqp8AnbFQ4?5dUg* zCDIm&&fZ7okp^eQM*RI}8f_N11H>sDdC})E8KK>qSW%_;u{GDQnChBrp+yd16hh9> zvg_Bwl^BS54TMu`PGRZL;zRf|Albt%hcM*xGE95sO$fu+j9N=xd+wn-AoW(GHNt;t zy|jO)^n*Rc@~1H>;O97mBzqV# z2dxm8b?;GGL{HPR2^w}jiiQ7Eub1&Zyq=lDKfK<}26TK4c}D)KgPD8A34B-=ATGgR zi_>RpMZ|$+FOM>lH0C&KJ+~cal3byG>1d8mTdGN<$WlB`;R5`7#|=8o*LD?cYU2$y zj;1x&Ntt5|rLfcVT*EZN#=-kFyYS5i6%*N_(++sp!I;b`!U%*Q6En{*t0Du-L4w5v z1X~_WWdL&LiB{yz(}H&yv+?}*91h{`8qfTb%o02xIwegg7WI}ZKQkp2H3&`^fgU~?_{5<#SFf1roa}=I4qg<(ZT%6j z>NN!?&PWV8#gINxJ&a0i)~lT=&rPm_KFRM%xy_uigormdl>EJ z>-ptw`BlwT?j}#B*N~99NmNmNuDw(z5*dW7;fV}f4*(&PxO*cEP2+g?H-b65ISktA zE)ZemXBpK(b`nCeFitzFO8ZzXvM3e}Jn{`TRG9clGJP^g=V_R$P?=^bV%+jVk@@wq zw|}?Pe+?f$IV5exmVTvjAaw5L>!S+N)I=z|DIZ)6Y_u`Fs@J&ybFF6t@N9GozZv3 zI#+S(=W!gh_gVOkCoFV=CTm5MZ9P_a@wMdb5V*yVj{DFhRUitkRLnm+Q7B&f(W@ZVPYVQwalRL%zTXs{~iO_6qVCYTxg(xy9w8hQ% zv=Z-|9Wpx?t1mw&yN~;@mKOfi`-%I|8}a?q`z7&g(11>+6OtoqjgMyWj!S0w*?1?U)B z_-_gjDemN?cP08iRDi8Y7)X>lqY_KpCc~HWMu@-O$IpjpyLwcn`rq9lFxB*PY@=WB zz(^SDS#8=X>UJyzgY}XeaKwzqeQHxQ%RT}>5U#)!`raWti&;uz7*)09%)@m%@aIR27wdRJ zDnWrXyDV3H?Sa4UAH|pL)+K^B{X7!0TcvNnRDHkKLM0KsVh4fkz_wY(dOE!x-kUEb z5Ty^?(0i;CYPUPx4~`o^PVROQg>?h;djo~5zN+WA^Io*HW>XTNLr6_TbAaslkR2*!HJ^*lrdYkTx*fV^5gh+O`qTl_wpcPZ> z92K3_W#i-tZ_4yGyh_POt~I)oR@i^R=m^W6el;-(U4n*#%=fO%VZX3f|ZmnSq9YvzBJi|ZL*wy4+8&|WqtG2R|xPQRQpc5`h41kw>y zp_(qQN#baV=oX@=Bk$Pl1lz~FuW5voXpCW*GCZ<0zSykn_#$IWi$DI{pnMo`h;R_S z1Q+V8@G0e~8X{_Dt%#jpGK6_gfyIgU#3K#{5-2GZF+OcYQ}$4i!$H&wiov!lnB+_qx`XDySBol3Y><;!;QGd=z8J86ooIu0H${X*nr z^Hc*M)VtWQ(f|C%lIT|=dPd@K$64kK_z+p}ot$SRdLm5M)&d!eTfnWj+W0x@RW$*sZT z{<>`^;`Y_W3)}X( zVgF2+S(Dl1IMEK#^ybQJbDwFAYnq93hCdWJQrxx6&O&68WdrNaJYB0vWk59Vt$bh&Iz31Z~PWMmcgq*)r9_jvPcaM557Vz48ZA21j`B_5WsdcNSn?NIPol z1;sgLUk8Uj)W6Fhw-U5Z=*tFoEgcd9cUg@}f{VBBx&yVCPJSww?Lm6_gYeYPktMTy zBC;$gHS9dkYi-VU+$1Bp{@}Xn8o)adP~%lQu z^nK2@_ljq2wOr}$14kqoy*?`BUftdcs&haIe*9LoJfM>o0|cQaQc5c}L}+wO@;}=5lWN@JS&f?OZ(h}o>-ExW1J`jXvGb&tE2ryS zsEwr+?v!_0=m5?s6k_KLs%5P?^TVr*N*u}xDDj>fgrAsG z@TV7&v;ETXC7|e**Ob8RPD!x)q(`fkU`KGCzp5P`+myzZi}J{Fto7u%!Z~@PzHl!9 zr6c||tljMLeE>p}mpmfGZlH35Hdhfm0QPr-Shj51p|RIaL4<>YM)U{Cv}BYYJCNS2|O4_Hfqs z_=oue@%z*H-QpSL)0^=FGWUm>CyghICrRTUBBCRa*V5N+=xW03QM zeQKCj;C*6^Z2@im@$8X5gD0cg#L7J?nyAqaLm6kP|)vG0#?V}%o96p19Pl$EXrRi^c21?z=(4Ji0 zY#yNL(umOPS6E!Wj4v!$ruZtjJd`;BgR8?HRK@xR8g@-;vM*nP7e%9`OFpK39Rg^( zxQb_(wVjKm;CcU8Dz!1HKH;VM`px{G{w+yrEg-Xaj z$@XZYURr+E$!dc<{+GG-v*Y^Vg<9eUjXRA6Q})V;Xn6in-pYU2em6E~^JrDcmGLol z^O<~oYOhCfR<>blU??Nv!s@+lmRLz;GS8OqHPCkMiov|KVV3GWqg-(R4G7a*1lDO* zW2$mIR>e4z{6C*5t+jLiN1$~4zsJiFGi%kffzu1k6zs*)#|anI=yJuYWce6Iwbo)n zz1t~_lW)c0{@0n(^e3uN`20=@6Rr5U*^ z5>ArXRd^9IHwp$?;1K~l-8^$cA^Ue4}yhp7Fc-Mwh!P=?-1gnx){H~ENmUgarGDtD?R=Z z-wE#)t*-IBA>>Q-2{*NMMUXX{$Drwltf|mKw>GwlkEJ)q#Ws5;lYuZBw@_Hb+Y>Fw zr)z)z-#gl@Q6h3eHzI&IukfYNH}xAB8TLv!Lpvl^-y@4k);5QUsbZv_oSls_g zdvFsgdd3%VyiyD1wS*H{>AD{FvBzCgxNp9H)KS0_A$ZQ|0Ra4+0soT@rQZMHI?Dg9 zm+^n2kaGAhJyNCrnnH@9gR#DoF^z+>jgz_c|Efs3`ENzie~ig0nzDb3q&_FA*zu{t z4fcZbXfOE=(I|3#o7m-LN~Wp*Xp&Z`c35I6DFY=kOXmxeFOHN{E0x#A7=|91eD|;U zF4`WuS&K~x5nEc%Os4-Wl1}7s5#F+1eoi~-@IY~IJUz&iU8)@ol;Cx2SQrq}6^Jl7 zC3&5DRFFf;5~7Iw+EAQ$i)j!}m8jRmer(LZn3%!oH55@rj!W8{2?~j~09t%|; zv0nz?=6|oHJ0>rGe+%Nvc75JEzoWf$##!@a zK1D3I6zp9gx0vsYmmFJ7alE#{lYV;Pa3?zJU|9@#Mu45)Nk5UQb%G?B@PAU zZk-IeDdlJjrlvrev*kDFJla&;#6j}xkRITet5xgQ1Vn<$B@OdplgIon2-=Lx=RW30 zZd=WDpT{o9F_j-j;BIH69ugd*K?X>KRoVtQp3izSmXc3|q1O9YK7yT75799F} zhu%ouIqQ6+SD8_^q7yg4(Rdvpl03`O4|A$5AwNYuc6_!E_?NwioSVL9014a(Txu@% zF4>yeTQdKJ?r%Q_xwM0FXWy+A+cDdcQ0!N*;`LHw^5jS7cgP6bDgb@Bcc=!jm-&JH z_FOd7GAoa9N}xEO)b9XA)5E-AA$Ec)1$eibfhIci1?=Jl!w0lMv>|D@Ckp2YjW`4!*oS8uC44>0|OLs$+d2}G5=g|E&OYxv&pA|9^n zr32UzrbyAn!i z${9jV)T|ukWi^#Sd3T%F1I0i=uC|#ljp$JqK+dsO``A zZJ8u(n$&7VZ4ukc1Ju@I6CQGpE~*XdW-emWR$sO>X9iL>~6XmweZ)LCy z0P_t&0(2+_dK}PEHQ?^OD{?G;vZA~}4Ve>|dq$B42M_s^2Cq@BTGB9T4i5KiI}y%C zT`FYz%g!+k2N{Emc>-@rL&h$F8|-n2*u*v_1!Hc{g_mW_m1D0e3gdTCd@S?{~vN&-7UH^8m&bBwJcg~xz-|2|KiwxBj!2t8*E z`^eh4!7Xy*L~Z__8|iVjAktlo9<8XN*cZzrp{SAb;tt}>g1#y6t_Cg553+w!KCODh{@8^@Z@R`tO- zd^{v%d)8)~q?DjpjN3EqH8oMkJ@B9QmfNHKPU=*P;}cedqx1d5WQX4=rnyQz z8aU&4V@uIG&F0c3d=6jZiF7J18Nwr+UJ-t2^*7|rIT70wTF=h|nWqeT&YsTZq z7_9CFfp^1@C{-nRE-We0_yGHveU;(af=upfgxttQTdcDY(5wsC*oKm#VvACB6UN}YG9O!yXg(Mv*vaz(#c8p^Hv;*;4 zw0Y}1YGDZ>PCYqGM3OItyaCh|*D)E{1c;^=|3jEN7*7Jc8-5%w_5qSyB+i^T+$1mP zp54~L@VHdlPIr>eQb{1_4!-by^}XaD*N64u%9V%yY6J`$)5%U~ny-c8);n<>DX=fk zUTQ`e&@cMZ!{y`R7gonGgtY)0X%L5jN!(`-E`qaCys^LKOw0F!$GdN`k6bg??L=)) z)$x;@Ae-Ge(w2_nNrzOy4|0f65qhkf9|bSo6jb`WC7)X!fgQ_41Olg z9IfB2-qkX{0qp1i-#gB5leo8k2AphvEUnv1uY6g*AaeMIO@ynv&J?A&-9X`^^@Z$_Um49C2el^$(BZ?Q!%`786vUeFG+(6P^&eK%4bPOLxMWTph3hc4X3i zhw#CtV+7R(~^F60`&Wa?WFMm>A_4%S^C==NHA-f6_X-1^V`CCd-W|7EJLKN*|sZbeb>e zi`qh#4(;X986#l<==iOwx0Ps-Mnz62?CC>T28xUk_>Gkg+|v`NbKI3kJ*s@R`Now| z*N7oQU^=GEoP!o7tG2!%!Stb9Gu`y=Xaz!(*H6eS(APhy^+LQO!7c#x>8 z<6Y|nUhwejQO;L}0+*S^|J#dpoDV7Ct$P~G=oxA6wYS#H6*9-~Bm41{;|-7+!H5qS zQ~oX-KXG?#vms)9B51-c%7bZhbLelB$4^NDWZstR^G5f`)psq5DrR)NkMg^a z-!r~l0xEAX%Ze1|&_@??g?{iMwY2XV$^mAH5{7RHhVhzo5Cf*lJ7h_x6-QgUBsuN4 z|Jc&Rd200NsMlDX#%f-gNnBfxD0)G_f-mJTnS{6E%^33%FKl;4-%k~1Id9603_*ft z3|D7acVoMU6D{+0SfDNgviTjf;7Xd1MsYBcu@~yGe?#jZt{&&d3WSMPAqC$!g4tl{ zxvtmX@)9_2de*(){5x=(IS`pdb3W>%EkDn!UX z8a%dj;#{vE;lE6)jhP;`mX5(_aIb&&Bu2<^NR?fCew*)j;~LHA%XW)KZQvy=@i1b< zg%49_0A$V;#`n{@Q{oGgfuF!+=-_9JVN^kEAIQx-?&G6d2b1AK)ju}jAKV?>$OGro z6Zxbtq9rKNB8e!fCd@>6W~g7r=wK8~&L+j&FWGN@K1Q1F9!jRAR&Bd-nxjQM-7iNz zZ*_W*bbU|1FMr)Dl?}sMYr4G7KTeh>_r2I_bSTj?_OsM%b=!YVQZCc{kbAy&O0sT~ zp{nmDo~K`ZogPP)FSA;i7WQs|5$WJ1G96)@MvEZR0$dVr;u*J7aZz&A4ZNijb-AJ{ z;M1)HVi1Sfw%a*@LlyM^pfKeDO)Vp=hKQs4B*U_3w&k>*SPX5D1kR%4!& z8rZ4-gdV0GI{#5rggG+t<1xjEP9M>f4(~Bll3jr?!}*C1zqHkFW1F@T&Lb2Jbk%Hx z$%t)A!{?lTvmX%e935Yio)zc8eIi@4C3K+)Hn&cUG=`bHMHMTW&J9Ka2BOpwsCm*q zx)H9uQJE?qj)zi8go!{N`9$F?s09z8aGy(Y*&m$WD{>UZpT!a}5?5SA?1mV(N&kB* z3e!wy%D)oU33{Cvs-4*c{-R`bbnPqE>ZC_tynO*QrAGB-cE@L# zybpTZ^8OthNEiF(myW4cnFZ$_1ILi%40<2SM3bNuKCBC#XtR1*vfs?#GtQJFD1T?Q zt2jDQa8Illq&DfYBoNo0c~4V9;&6g0W1YNJLjOI~yrfGJ?HNoV-Imx&t!-Z{ z!Auh@&YD=C4!BlKd(nv(%PCGiE?Dm5g$%cSg;x4 zi8-PlJoHe9F_Wz$JMcG|uT)_OtSLlJJYOAt>GQ6>IfU7DLpIh@20Pk*2tSUYZXV%LlfHeD^$xvTncFN+ zJROmoW|`n;o)3!@g51$5CVI4pB(o0~1gmh&f(a!&u_yEe=M@a!!U8@?^*XyKPt9v+ zTNhAo17}i9u8HsdSFS+WwkQXt5j%Ty0!S2+Y>Z)_f%Pg zrXby55cBGDTvjn{VL=IPxHi8G#i+Eve3GU@l6DT6AMPPoZ=rxv_E^bC*_6C27jCT zPjXEW_4_}N*1&CofrwF>@Tm2gjO06SYEV=w&LUxWgkd-@l_SoSQ=JdP7%ilt=~PRs z=hF#X3HqSgP%&EYweZSFh^8I_AUiBTg1Hf0w2=vj^a)J__qgg0Jv^mp^qutSjRKj` zk%P_i2_@VnH)#+rS*y+3TOfrktuLA{(VS=A}&nw?R^fNg=|6Kfk%7Q;A4V8@73cY%o1`mTAtT? zv=oK>0soZ-8f3*N<9mdRw?GubT(v0vjL-1uxpB-<$HCK#4p@ERWDds@@s#h9p)a@% zN8^g#Lm(Wyhk9X!!o)J<;B^>GSa!fSlb(l zYlrnHv(Ox3BF5Ic$Z*}mAdBFY)qkq{Q^m|bM@SpfW|y_pm?1jrUbi<2NSOQg5kgFH zFIcW$Ng)Y@j=hgmRM`#KUbg0P0APxCGFXJZMTb7rdM7ma*53}dBGWG%V&A>w9ZM7< z@wJSchNIztb}$fWd9rRV1s?in%zHwQXU)u(s{fSCi09=>z@2%sAlYlEHQh*^i`hC1 zJoi=si9w8)+V!iil_%*fI=wCM%UT>fK~NhHG}VF=k$7r}*HkPxvt>UsxDC!pXOTH) zthH*ak;9()!O&hEt&9<71UyU9oY8+!ni!{2UayFtfGBVgnHom}Hm&|Y9#hpFbk$wW zFhujf1e_BohyhKq{6lnD5eNirGA$Oix@k9wR{OprJYleF9`v07Pt z9>N&YHULhvZB~cf2$%t*(bT>4W=p$8=M;PTzUL?^_8DR$Lk=qpG|nbdeFJc>&)EYneA{}|xG>ah4LMx;{j)jN@Z!PKXqE4*|gIPuFB)R!OJL5#@pRFo1ee5})>hkNAY zS8$2kvZ#(gp`7$dp(j=|g_cAJ2h8~O{l zg28J*Icw!;#tI5kLU5sreYN)EuU^1{moaEGdU@sDohdpz4p&YjkN3e#^x)x6#3pX0 z^LYwW&BVn3Jfe>~+V?S)c zQ_mT8i|9g2>$Uv2Jq&v)scP6(MF|EXeNHaeqBxnm!rxW*GKSc2>^1h<%1cN_e`R-a!|N=`LBYmgtcYvq_B1> zvxc4=29OR=vXE^v<=Et=;h05;K906 zg8R?*0C=mA#9&cC`J>|l@FqzBGbMonobCej(4~o0NAi&TO7@ceULaW#U>-v~hrZNs zjQu^64e5Nge6M$rzox|jK^ZnGKG#HY>X7pKLgQ2K{Wxi+cA48SXt%-0Iz4R>Y{?PS zdVzdq)(8=vJBow7Ua(&aA`mOj;i+nt33Ga>u7vl{8C63h-7%4K+H*q1K?Sl>TEYxC zb75xzKm+Lp1zixcjRku}Qhk&EVxPhzOvAE2MMx0JGd&?Y84Ck-e<@Km86qURM4wK! zK<`LU@HSBSfw9^l#)9z_*f=pSG`2-jd#+MuvGNuyK@LOE?f!Ay-i3~vKVui8lT;ch zn)d9>ke?Zk3)MieBc_w*JKg5+ zXe!EVsT~$;qT@;YImPuD`lf~cr$`uj3^3BMmG?x5tGW$aksq>eXJ$~f| z!2mTfU-@TaX?A6_%1eP<==n>&e5J;tGZT_Hq@+=L0wMTJ7LyDI4kXgCXR2j3HKS=W zl?Wt6sfs)q8UW-66LGcE-6kO5pG|9nVax|xs=?IKt1-XI}jUT>e) zs4%bBq@R^*R932`a#di3R>Di9gy-Ogy=|vPSB2(gkhmQwPhK89_|Qn&Geu7?Q7$O7 zLLEr0UY*vpDLGc1E$jiJ2{ffONi=eV@aKLm<`JK&Z~@iJ?XTz0R^P|`J6$^nkqaJ? z{lHBUhB)p*%M|qI9@^OR{Ajw$bA5LvO|DrLeAQ3cKfvfrL?WCb^{gze_l#gdyvu$0 zI4)eujQ9~3l7qKOd^lEFNP{W!<_sU})34>kYXOwFEg6bB+l`X2d42@PHSwg9tG5X| z!D^mzcUeNR-35sXqzwnTHE;(&xvEttW4Ctxs+% z;K>|`pnyJql?`M9#~R7kF6n16E5rCYX6`nS0d!$KA$#6*y|{TSFGOFu z0^v{rfBPtCnE+lN#tB{aHC5(fzQMXp)-^SSvz8>rY)NdC`-e|AHw06VVJCW^Os7@Z#Cl9Jq z$JObRT8wF}hIDqr|1KYvCg5G%vygcY9!c2Rd*>CElPVy?7uwvcX#lWDYF?A%Q-ak7Mw#OPwOm)61Vg zYFx?xXB1K<%aTB-=5Q(Grjx#M0>O36?}jvkl-9z03G$*E$W!UF*hL7IB?Ltm1Y(Y9oOLy`jWpdKOARVa-6sZdSX{rzx zs*s`>_JNNPU9@EO{5u)aE_$)BVzyTZwEG1;(|tFe$Sx+HXfDZIDxOcin7pl2fGCU3 z$U*{T(-ca~TNrZx7S%)M&W!H8n<*RsxQ)#zlcjcS5DBStaiK z1rXPI;`Mv;X?uB`5j#CYZR z^Pr+Ke_nay?eRL_)-u)VA6zMjfkTYd!0p3*#KG$y{U%}0@mm4}ZqFkfAy?O+J4NzS zi-hdUL3BqgA(hZJCU7;`l|9qNdxIe(?Jgp#8fDqrzd?x@39|%o+>V+T>VL0jF4cK` z%~u(J*MNIU5>qBpC0#j4v+&F4maCLqQY6Jvy!2TwVQSN`RH?Wpu}o>J3|6+P z2*|p1Mb5TAj;=^h{|Y&oO@t>kt&J+6B%66RmH?(?!BVxEO%5)-;vUI0k`g#Eji3hR zTq7@iwWq-}O&z9|tJNHHIH$5)Qqh4{p$-(q!;u*Rs_;(4N(9m<-+!bBUg{+_c`&Zi zOKg4>cpF??2=_C}uW|y>NULuLIU}<<;q+D{bTDZFq3=k6@z(FuU%c3x887Tg4(41C zwXX~5I>p{n+#YAqYGA>S9MDFcw@o|*RoT{eMG7m>R51im1s~+}XlX?kdFNa$-!1JL zV>RM*TqV1{nMa*!;Y~kybPUexn{mJuNh}z#>h6=VLEYe1wuP?7=Tvnl>McZ{$tPf0 zVT}fLcI65EK^X8)zv^=bMhH;2R;c%MXLotX zLr`5mhA%v5Z#u@=I%(@oE}@iNoa+HRyr!sg%Afhv-#iqgsD-dr+SMeaf1TT&TJJ@> zTiL7>1)=6BHav&mnPKcIo@`G1kBcDHTW>GPxXHAxz&I_|vD5es-b?NoQ%ie9I!>0~ zr5i99Vp%Z~eq_pUY7l2Tyb0fpO!wJeub1Re3s9376Gd5WCe;a@xdRocfDd)iLh5)b z?%OZm%ihH@)uR+lo%~~-nYlkMAJad1FZdDDL0-eMq{DEf-knNP>bf&wk!gJ5Bf94> zYb$kCH>BS~g^2~Gr78=u{ox;Hu2asc)(~^Rh>>EQY?U+wA07vK-D^Mp1(URKqI)6HzB+s!M_ zFPfrL*%@>;KfVQ+b6vc`K#ns#gn*4>JA~sCvERa?R@YwPBn zs3zl%De0laoNp>P%v_yxM{V1;#_NI$R@Kjero-M|n-WULj>8^GoHEsAvd34J-60fZ zP0t_|*?}|I5ffeGlUXrM+p@{1tvIqN$nrf~qlaveG`n@ud0aiVqKGa5j4g+qp_ocp z;4Py-i{wL5hWri0%m)g_io1|gYfj!Nqjv2=8laK;0$L;l5i%`(HDpDg_plKhYMood zANw+(B;C;JcgeIK?qd^zGwT!a&e<&~g4t^sT9`jI&o`K3U5~AfvaPuTDS%D6!zxsE z{0Y>+mfUI7hTgKRJTH@nPkk!f~%@d!ptW3obc zHGeoUmBDKYZ)N$n-041akjW;pTre(AAo-!`%i2js2M?|t>)SI~J1fUL)1=p0ZQHvO z{v+G2H;bjd)rqf9Ai#<$TV)7DHKyr(m3{7WG!`gx^Mn)ECv|(YR7QP z891vw06lA|K(^Rv77!u`VKP6}EFG>f15Kw(f{U;kifdcQtt0MmjVZbiw2Bjl_k}1&&oC z`>a29kR%$Q!A~#E5))`cRv2XkBmx>yLIbHm=FTk}9Rk`1d13OU5~MpUQ$=t{Nol({ zO@S`THbr>y{MVzPk8m@1X3-~K(OHVUNmHjCgqz-sf7lOGXZ<>S#!Pa3DRCu z(iyC1*_~^kY%L1Np)_MX$V5ZUhFgK%VFunZOGI5N&|q}Q$ZW*_K$K0PpCFh+V90fE zttYXc%}_Bp0f#G-6a17muPmxs#$V3Wz(gNZVIr?WXo#td%UPbOqeCF5*FH93K1J7S znt;k4ldc8lM%lHs1{Tnj0*2_W%pN!jc$j-B9@-D&eg!_{1kvMD_q68COI-OU zj4>P})QUmY=LDHxohX{AX7SIf%!T{^%`f}Mj+{&pc*CFao3z_j{)ij1t}emh>gEJP z(F|6W_R0E1yBIg?j;K#!R0<6-jc|pc`(ccASq7vSrd(g5sxw}2*Y`)@J8hQ4{x`w= z$ojts=2z2y63oAt;#;jU7wc1nwHErv|4lFrVfNzX`a2c>lVHY({RhD;uelU5ANWTw zhxq>yOjn~#Hk=Z(3V*s8us1WQaIm2mY?`O*6uc#)sT zp07r|PfDu1tmyl-M&SKCn=r*2#9hN!gY&66Ts-$4afv>R=c=`P;N1u517^bmu*+5E z#7LNf2Z}oB$p{RC(i=u*qNOI-Rgxi>^vlfLbCDhs(cIyHs08$&q-Ks7LTSz^6qT|J zTwl)%kfC0f@`?ejZ-?cCWe-d>+QSMc#9C)g}t#kb)S{q{(ZAKGyxp z&?(?iMO7!ESr0@NrstQa;)sip-i8=Fh6x6q9r*2BAzjHBWDdagsU0>KJ($?R!_kbR z%r=`RrPoZm`k|H45V2U|=ZKB=L_-WT-owTiLk%%~4M3ZZQ)@4-9{ox%yaaT z?1dJ#y`Q8rt>yZNx$kg>of$7gs$* z0>>h7HeJ5gSPRu#mx^MC^1xXsJW-W-0wI9u0cp-7Jd3lVhbd9?8MyzY?&hg{{KG_Y zpYN(}ANDMn4>VhjgRoyca5AP!QN-*n-jcDmhPOp~;E01!(-UBY!-U=UG`CLq>IoWS zm0_pdqIm<=z!J81{259pipyKTtBtS#wz?dw8qX&u!7WaI@o;t+Q+3(|Jw#|{W1|5c zG$-9?$(f9jGLuKZf_`BwgLX$+naGUtX}HWGVM23nH*NJn!kqV|cC&v!O1vM@_}Nyg zL{y%qWM(xUrc{|zysvp0k3A4YYHMmQ69%=T6sdv4kKgcSHa><{g2sZ!#^>juuKSp9 zPrR0fmxx{eHTn9Y%~m1#W*Lzo5RdXXxnvDzW9klhQ{PD&V#9G5+fOb%(pX-!T{6f1 z5#hC$_z$evsI#jm+w?6R`+iL=)mugT?HKS7{dR0Jv~`{4l9q+=p*WEt4m;>dn90%~ zh8bWqM8@djZ2?eUJPpY%L*Y#Lw8R?*Dj%^XiOucf`;H2ip606oMDyJs;-LucZo73u zyjC)qrDmrM&tBW(bv*K!wO>u0W~c49Wylu_{R7kH@b%Sw8f6=`1|CV|+Mi zlla745w6smKk#3Ovz7Dh{u=fg_x?S1ZHRHh2J{xT1>mu{e}$)G{yw0^*8G>KXDbsX zA>MgTml)f981c+oxVcV3FyhhVvIt@E-MIC1k#w zJOrS*fnL6hCJwAC8Mx0(51@xCQ4AIZv@Z(YKX<$sFk>9Z|IrRWFHNdQRTMALuVgpT z&jpe-KH4$FQ`k!lM@rMVY+&27`3nrH`~?k;FYmx3d7Sj^K=zBA(6BiKS0UQjGK=be;G}5%>m&NbziO zYHKK~!~ihYhf)R8A)Me-l-Xn>#MT%^Pd$ZyF!MDWEC?^Yg)@^PBWp;7ml|~%OHclM zC7A{7O)6bz_OM#4(_l9+A?=yDBZywv9u&;cBx zz#Ira`ssjBjY4O4VsljjUeD0Z@}3+2x!ty|LXl96B`bmpb^{%vhte3qp`7Qb>2;x{ z6(rtM_LHZ3CNm7G)?CTcOQbUjjYua_i*KiGeMX*TM;m*vXfkbST?&mX0m5aFi)r+y zI$}W8O6U9KtKIjB;C}ZGLimzL_yFj?gaV$M$TAiEg^w1_q9EqKCW8Ju<0j|aO1`R> zoOm!gW07#ja6>Ees{3azj3(<&@CfGH;F*Hqub)qIvzN#;jWf@j757 zE^FqJjt;XFEWTfX2^~VIgDD}>dHv< zR@xN0qJ(t^1-&2b;zAsZsK|#?B2>l|x{CccQ7V%WrKL$U4JM_mEJm?BA(2#2nwi+cexN&aGcS6-M{^8X5|=PCv9tBYeF?G zG#x>3hvHWwh-Z}t6ldjQJ!pug8B~}y4j$qxvcsj`|1@4u{P6ZDOCf4!FsCI&JB%Sv z_W%%R{i12<_~&Rz?>*knEQ$M6oKY%OOwuZ4RyzJ&>@R&?RWm z9Q~K7i@>icj1vszvYYO!y$1Us4&(Uz(=RvXnGdlu*NUNudT(?{LxX zHs*&%d^;oSs@bvR3h1KeftxKCtpck$H$1hl=EQUCHA+v(Z)k!c96z)#< z{ek){tbFB)mk?<5;jLxRWu|kSgFpuEV2*593Vo50Qps%j{9-@${%xS50FFOE=oZ4Z z+IC(0?A#^1^zV95THM?Nx!iG$$t|v~#oc|$TZ%gy5tE&atuBfWH#?~9D9x@FqB`$7 zd9b4{*ALZ0^Oy|gPGw58@6q=TFnr|u&YFxLU z<#^_FscH+&|916uJ6bsrIaBlo;tO*A9gc*Ci9h>X0(h0DC`B;E;(SoPrg2wB6`zEFG7DamzKc8DnPad@Z8bQbY# zBl8+_d7t#7igmM;Hqg@6xY2OEFfo6xPoo>18M_JPGzS`_`e;cz%*EW;p03->Gp@U6UtDrNbBO)J}9omqbF*YYGC#-*^BC8Mgz!uAiPwlYe!D<{Zte=sweR= zINmlgxbFSAviMS9JpMa@OwyQN{morbT*jBoY=Dp zU=2Ul`>&W#S2!^K^0M`FEcW}KD^a#cF8_kU{R+AFAr^Q@Z|+%3Qha_0yG3MNWwqEF zeuB7eM1s#v|M3CA{#j+=k6kVf@(EvX$`3%aC%FTB_4TL?>d(~|?epXCOZ|ls7Y`Q? zR`{*_bU}U9_j8KHg z!~53U(ET*?u0jYY(S8IUE`m%;T&*Vnu4}wt!(as82|G3Id`|ur(Dg4PEL}c=-VQS? z-2aj33W?$e5>rV17)%XE#fW!|uFP!#6V=c#o$ve$O^%r#NT`#~zuEL-uKOEuu zJt7}V-WcY?&KU0N2hMZdRdX3vW^Em&EWYvRLTdjKAg`{eEXDMtS3Aez`E(6JQy@gt zJTNdMqy6SzDWiQL+SMI@UXa2F$Vote%jt-dPI z52e^^p$fdIQI20B9;C-WroH6CH81*J6@h=?g%SVvL@|XBI^x2YAe?X^kCO2II97sx z^6(*;SFuxV+#9_UZ)L`71(~?{zI`54uCeuif{@ASrylg~BZt?E;|H(j)=PZxNx-~2 z3ybYJ%v>^F3Xbo(79^!4r-0quk!o_i=IBoAzIh#URhYxD6C)dI5{NV*n41SbY?AL7 z;4NIVJ^(7lG(qNJzq=3A;l>`ZgQC-8-6>G8Ei&Wo9%kwerUg3d!uSjvBH~^Btb+6L zaFQ=jLTmb#blex3Yl8HT8L??SN;maqO@a|#M0R_-o0_IiRkVhFW*G2y?_$z!|>IbC7Y;6&dC9m;(+{1nXc$&3|sb(#w^v zEY+v^7+O7>+)JL5?J+Mi)4a3rTf8_V^TSL}K_oj)LT^Yjuc=NbdpmTLXknFO{i&z3 zjFg^t9??Z_0MqxALGbtO&Cvt92ILXdPLBZZnb_~A9CLGye*uU39lQkq%H+od0}n~~ z)IX$nUV*KLIW%Y`7zfn75o*6cv^p$GAi#Gl`C7A?kHFCk)*OY)EO~xj((Y)fajYCcVJV1B%xQiqhZh61%dY-d7QDRv9Otd)f zisbOU&A0vTp6+}3J>SlQ%H$NQ79nV7+w5-zQ+nG!89kB$1*=X8Sd-rj^h;=XJv?9U z7g30X%I11dt4&6Br%$1wLGPhgs-E+jDr;BywS9b^^Db8}d#m-VE_-W#yM7$Lub0)- zcB_7Y=>57rfcxL6y}y1gvMTv?zkR=f`#-_;|BY?y(dzB_fMVz+Zv(;hzx%jV`|bYe zeTLuo=&bxDO24#gmdoYyDRwZKD`&#N10M~j&wH4Bo7foWF=Pj&S8y~PmTe=MGb8^? zLyzVPvF#7E>V{Yj45)|zAd%9=k%aM=+pnJ`(N}7GdL9%)rP#ra;2h^cw>6jN>+8Pz zbER93&+o2Qjsy4YHPLbqX_%2LCryNU>S-hnox))TBd%#AHwyV^_E6ixmaQ;fKTuE6 zMe}#|WAphpaLCVm8=ev}#IP|ze;6_n=}I$P)#&2HT@L>W^F+zWog*DDmaK56|12uP zupw1id(b|?;>rW!+)Eg|h&NaV=9d8b@-TxDkITa1%MsED|3U!{pKWI8E(UxCof=2S znnJ234Ka4`JyJQvg%Oa9LL));7SzDdgF$RtyWTv(2?2l@P#y3|98ByHL>$oGPj~LQ zp+)McyZk<5hFN;n&0!Bg>FvK&;5%0e556I{QU)|MBZLm1pl zqM-?(uD6Tganfr^n4qwv7EwCJFw}wQV8KC>Tb++*-2V=lt$S=@RBDJ7ivetr2?Sik zE3{Od*!P?}-xU!m7ucFal63$NgN_@?S22Z*t3q)cl zH3s1@MDsPnfbu1iZ_sozfSe$ae^vg|m>uRk7;vS+a(RZcY}*Bg7-WuOO5oV;Jh}Pf z%J{M|{Zmb0?uO9_xiR4Gk!9u#_whPa197wqdID?0j~M9s4ED0sq#fyDW3-Uz5kEA} zQHKdZc)Z>ZO=|8QMBbe=%0L%qUiv$V36a2gL~D<8EeFgC!@Pt2EzIdKHb!hgVltya z2{xXkMqIIGZFjx026qiSL+DPI8DCz@nz4)kBEc zoz)pBgE2Hk`|m&>tEv3oh-B{qDTbI}(s|4GrUcW%uU~larKrJGvJL^r2oD%V{?af< zPrgbX^y*x?M6xsKmK=y~nvB`3>c8Er*Yq13&i-3gQeM4I;Kt*a=?f*~%ajG{u#%pa z&s#sSXTduc*$rz9;B+iQHscvOnZwSqn{Y+#lrrgv=gsy|a;t*Zf$tm{axDv59}*EZ z0wIHjNn_4{!BKkcnqO*6xR%zB_YyYNH)G3%3$^QW_VMm*)Xq8XV4ZxPyzh8oWb5~F z#JQ5i8N`U~S7J1H!fs61&ln3%u!HHB!!!(*LH0MYw|W{M%Mm1G5wS}<{=nqW$vO4} zr%eOiz}Rcw@Z{_>tnvYBdsT1usuJmab2+`^AQ08LvPeA!_che`#+dEaxrRx_4Z~Us z*RjDAyPJnk)QPDBA`bQ4oPY7H=7l&vQJDay?6h;BxuzJVC$75|@%Qt+3GxptGeZ=+ zG5TncvouXHeZEeHL|}z2g3c#sy1#LJNA%jQMG;UAIS{5DF4@i76ZwSS0LvHoiMQcU zgcwE-5FQq?VM&Wf4A(^If`~uOa|CIK@=~^*?E!ZDW1rW}GpOG@J2nDYPP7&TG=9}Q zr~Cx;E+IJd8SPVUDZbKVFHxCTPhSH1hMDu4rqDK|;FwT}aNd|rP#!KoKftgIA{q$N zJE7XX%_+L-mT0C-Dx75%kQ|@3^G}S~U}OxI^b{qLl!X zY->?stPtExAkEUD;M@^e=e5;Y#gZfu*D?0g)lAoXJJ*PRd1#YBY4-EE!)D*+=>;W)x+a^x>K`)2L=RWm!OFf+^fsb8CoD}kq z0;;INx%+U3T6M5wI_gXix2JJXk%GKJwcf@peNNkB_xW7oFXkXcCeKfMPkOjR8NSdmxxEm74MQcl>>0fnq;Zj{`ss;Y?e4o9(G z;L=_wg)-mYSfg1y-f85>0uscNK**--6hM#I4y_!pGpbw(H|FBv-gG8#tAFsD@?JQn z54@?oYc6ompw4#ncBV7UF7<_ z+#SZ<@`J6iKz;3@YJ4qG_aEQo4mlrIyzc$?N=! zh@We9?9fDpRI`-;h1GDN=u97Px%FY12_qLzL6;b%SdH1e-poV2UEl-JIdUQ$bk>5YvD1Nt_8!^jBh!W z@fBOVD1I`>iyX?JVTE@Mf|l#GpNw1JtB>}o|URP4tL%!Df| zCcKFm2g71-#x+vI_edtpg4Kq+nnk$%6winiN9N9v0W-JeP%6Cb3eM&l(?6H%40e7YkKvZfoobn)hg!Y}05YmO=^C4-zz;5_J7Hsn(z`@2J;e*~&wf
8`UWPi#un~tZv26!V`$?peQ_y*HpMiU zi>w^^p^qvNH?ZA7<%vIUHMcfZW$YaeGO(O4xFFhy#dGV;A}g+DI+T)GPZVB`g3%>c z9NlI1%ti{E_JS1MvzVMC@P#X#NkYS(M*_bI!t;78iz{v!gk{%+C=b8m*nRL1?QSU* zVo?mwlDg5Q!};Hbf)_xT*st;rF1O~?x<4oXYFi78)wD5`&byH%^VW0`+u(tbroWxG zb`xx$B|K`IqI4_*R$tG+9Vss%e$2W(liiRmH;cNgT+a)paPkh{=N;ng2+>?D+Yh)tpuX+oLFWEsWby&tVft zj+URGZGLsmz&kT9kfi>WEfp0PAFX!Ts1Xws9?$JkNGyDs!-VDP&B;C01>{dQ>o8ye zT`~Y3kZ_Ajgp8l@F3P=N0==uRf0Bti!brRBjguGpe&?8tL|i>&iTKt0B|kPL#Luo8 zoeEuq=J&CmYCsavAAR~D}969@r`?( zcS$FC9ffYBoBi(OI$cL0yRwD!sX?5vjtG-+gd@4JGGOP{Ud{tT)24}J`Q>dTUR3E< zP;pVOUIgLmlN=#Ep6&i9*^gsl(Om45Sec;lSB(pt8gAJ=_P(L^_Od8vpdF30_3uk^ zmBe$V<^*VXu^ukoch1Fe)j`!Ly?Mgp3&9sqfAQP8j}E)!XkSPM_?_K32IZqA9BFQp zrj5VV{ z#?iXiI#}!;Y4Dw?7PB>sEZ|x#_9hMXxn2#Hm{yLBKV6zM2(XXwAtw3!QISxVH82MQ z7EKUGLX6OeXdvSzmo)O_BoFuP2m+x!VDJ>MNy0T*%2!&}Ir9$0KOhw|dlo6XHzxVW z0c?C`TblP1kKUtZG9(4kRMEoZ=o%*u+7ATiC4cBp&RK{Q=1hiMVW9Riy)QO7$T5kL`=r2rj)KF)xej^&bz zQ%MK;?oFxDwa6OO{Qbd5_&{~L3GWr-p=^T4PVG3L=|e?WqwVQ+3LEKZxIt;vR9wU5 zB1cMZFuc(*enu-u=9oX#1gT*q&__xZ3k2=)Qz)A%%-gH(`FbECMK(g=H0z##=k1@a zKMhfrEWrX<9i|B|5VTR~m2~%c*L_#AoxYR0N5)12mT zmrXLcbAyv$%i6?E%LE4{cav?*lFMI+ZO61&ySXC8JV@F!rxu<1cZiW(@fYKn`sRIQ z)ZqER>kO@|SxumNH#Z<;to34{DJ>E$=rUzFfIJ(M)c-}?UB%WBZD|5FGsVno$IMJI zGc)rsGcz+YvtwpDW@e6=nJH$r|^E}ACHAokit-sG`_$RJL%+a21M}ZSJ zMS-tpf>St&sZic~&s>AM?J+J88&0K1lif@?ReSdoeKM#&u&hy&GOhdW#12+8j&Cg9 z9d>DNs5&AUqvrA!&FQB-ZD+L93qCY+h9`VXPA>?aFcn^tQlZ?M8$a>{U$RIpt7!O` z2Mg0rdQ9Nw!b0M7c(PSTTzb^eUiCZmFTHICPoK4;U!Jv1Abe_G z4=d%<;ewumk7ycR%p$3-rtcBaw;E%YHz3oDQs^-f&tN67JAD#hDe!@$ z-_BDPRot!CiWIWnT%X-G$bS?AOoScfH;R_l*=MYEWTdR!?Ys#BEBO@RDsqVc3{qFx zrPH3Z5#@XfC6cHLx@XaoUAHv;u4upL)hhVjrwb>pTHja=qvntCGe|jVM%Z7?^h<=a z@5A!cn@Y;qZO$!SH@sNPaF?gF?>!yk7G2C_nek>~spYeqOeiO^?hmRt9&uPq^qk^k z^Cq8FccLUrqu5bHk1oh7XtkfSV_bwMk-4|i#;Yxp3x_#Gs$#=RYr=FIIOjvSF~%+C z54pj9rU-}gV-!0z5gQ59>QFB2QLNXTH@`vf;)~(j=!Iwu_LSvN)s2)UDd{K3X{qWb z%i)xF)6q(cHX`@+S4KDCSGNgF7PhA4lnEN((B+x1hsB(D)GRzYd~C!M&C*u3L*%#` z%hA1dRiS@7;udDlMD~`axn`iCW7C5_wrIut3R|e-Jv^a0e;>ye@|4jEsJfKA-1zJZketMLW?hO)2`lS4d7DjT&y~f9aIetJJv{Tew{;sWSE-04%41K7rku9_}j8m`)bY7yuG~z za*d4AQc3x_vZ^a}We2*NUR0$!xfq5w@LIW5R%6(bCRsi5#_GH><#ndG$2Ptr=P631 zJ&*Gfjlj}n`yuaveo zclOkleH^@O2dBGr=5#zc;C4Wdre01Z5b)W{PgWxjpJtUv%AEmI`x8b6=ZemGm_-IP zy5!L&O+V)E^Ypf@Dw*Ybnm`hx;%|-B@AlK~cJ46d%UR}4_c;{wr+gGq7UI6ZH+vsNANLioTWQ&Yl= zY&h?ScFHsN0I55_t}zHmTxa<{GOOWhR%Q z3dmZcMPBhNW(7A`PVAoI$bweFCduzb37(;sBBjl&e@D*9bKaiWDk@S0&Q$mGsKIo@H46R^?8eBXdGy>vNpyI2clEK*| zK85jN9B5ae$idgjQ*b?$sYl*I;VNAePb8BjnzPExvv?v7+w#xplO;~a!hSV=zkiCf z=TfOj+ELtml1iI6Wsgi7YjRCqIjeUi_B9Zi#RlRjg;#=7eU^Qap8aUBdlawXPt4^X8oy)U>-;!cwNvL$?D0h$BiwMkTvyivHgyfl&<|y}K}nD_ z$Yt`i?kPh)-VyRVAEJl8O=F2QTrIb$Hk3elO~YQQDV#SH&6k}y#AB_IyeKnpaSW`T ziCH3lE9zR5U)qp*6O(F@{7_4jtC3SZ$u|K@IWC~(;AZ7|U~Je;zt;P=A-9PXweKxB zARvp=|8cJ0e+`%{|Hops|7O(xr5GwVpd3SeNYM8{R) z&6=H+sv-O&pDV-y#rz8dzlil*=9)Jq8OQup^~G7q!$p+Sx_V5H`{!=(^=Cp4xpSN| zkYzxc`BDr|-F0{i*b#Uv0L=|SjA5X6gQ-k#x1sqzxnwnxZVS*LYb2VbQ2`C%MzhFF zHNZEXe#gcrFrS7u{PaRTyTY}Y*p_3`%HJ;#SzdZE%?6B1qE)lL`B z>ei1OuyCb4x#03oIT zD%ovED@ylKtiX2)suA z0ZS$VeVxAW{qagm-_pCGZY!Nbzt7dMB~lLiC?ecf9NTfxOxuOL(whewaq5~aSasubz~(TLfj4sc=8 zXt04kq4fiHbw5kZYzr;?ZkZu& zABB}Fay$eSG&hn0t_fxF;qatL*ABBS{7QsUuxX+6pv{HVQ8FV&<6+bLoZoFO8)zGc z)`WcbDnf8RV6h$se^cy7pV^ax^FreORKLi@L&E#VPE}<9*YbGA# z5eIF)rFt2u#14V;aHXU-edQyLwRNR7$+YYhkj#@`eP$QNBrqabi6e3m!518)NHtqA zT&wjYju6wOqC`q6cdqA~$ep5zT#VfTml`!RNp8+&Fky(=S2y_aJ7Ub&HhFFtI7)2F zf#pz8!7gO+;13uww#1|g^Vmm{L_;KRg;=ITAD7Td5(Ga0YL_((jIAL9tx2*sp$$B( zF;d|1hj&K+Gq%B_(ZL2NAOdyDfE6#{NSg$u)?6I|Aa()PP;~4ufGOj*5N0%lg~Ri*I7N$OLL!S4mk z`}|24J(>R{Z{}P%`OFKF*F-*|a#D@QEowYZW>j_+34oDVoiN=_C{N2yGqhf1fo)hv z&MFpeU=`R$Rm#YEYrZj(XiEzYBskq-Np3AE36tGT(S~UHRV*vud7EPB<7zDhuupw8 z*C)`^W@1bjMy;R=@@y}~ZY*IAR0PKp-EOa~$n#G$8$wzMNMgHKe9X(BuBz_a#|11@ zip#ny%4W51jh!J)NOcZyBy|KQDL=Q1OS%h7YFm?y43?vWnVK`fICl*f(?XH z64nNyO|nOe7<-=BTI9rliP^~DI4{lDaqCCky5pF{(aDHimoBFa-$4(w7oNG)n|kF| zO%yPkS8`>qEU!jQTDtKd+LZ-cEpgdyNPET%IRCiRm@zv~i`Op9{Adt2TPNAeNp<0;ifd*lIjJJ8lEv4Ad9tv#kp*|l(3QT7owW>rAxbZ6O4 zSDT5`cFr+@J|(c*ENBgK)aVN#LkdBAo}9m0j}*&kb)`GGM4@6{5Q`R!hj)~=4d=`~ zHbi?8mA;6DDdP=}6|^|UkT#=Ej(HSQNZ}1S+OAam^xu_HQbzDPF0(2(1-&52XHowi z2${Lr%EOUe;Z_ygWPjVr!*{Ukph8BQoK2Rd`OhSBgEtf09xu=5r0CF{XuV#bfatP$Km3z4KuzDSs%}EfZkkSbVuMD z7lRV%Lt<|NrB?6kIC(Y+V9M`Q3D%@Cd^&Ey=F$TqRSF(1TpKMt#a~rIIBZaHu(@eya+i z3@5!4&3}{TC~#;Nor#Y+*Jx`x%}wE7zPKfHGZvp~8rm;(w`&R|;NW@|HzTY#B50|V zKaCbca%lN08ayttd3F{1O2@n$sSB-F?)y+9sQo z#uE>`js;j!m@CQV5dU~$NrU@d7OQ!ehy&-E!s3<2`j}cez+f&4$mqZqYE^9rEfq}N zS*IndHhr3NCeb{Evg#5)HkwCXgiHdLNDI-|N~Y0yFDyUUZ>At#7dXM5I!P{w ziIH`U&9T>^aiM;4mK zVGQ0RnpClO#$k098+wgpEzw)xaNXjtZgP{cu)WFP_D(NsGreIE-6&%&Ko+Y)fwq9d{FLr*Eii#YmdUI04rgn;2-!2UVT;!mbd>PWu zw@oE}j!+oZ&(ot+X?#Q%2~C@6l#*tG-U9Z0H!^VZGi!3&(f78U3&lkum#jnA8EUgxP)9tXZC9^~FO4tV;|GE#u^VHaT zR^CQxf9X0C-&cF-PHE#V%WqwW>4fWr9^lY+Z+Qk!QM@7mL9l86PHaEmrV$Wh*2XAU zBJPOV;tqXCeDw+XFn8MS%!N0YM}42P#6(!YjIeT6$o-b(9cF>t7w`y!kb&HfueRc# zs(R}lpi)ZdOEa0Pbjp$6o!B08i(+cWA8HxGV8RDc$eUBeZk*0+r+As_T$zp9Ni7>! z$bpK*^t*hh#QiZq#~&Ho_Zawu&kBN5+w{dE!m-l&yZSc+B2@KcO`RV?gTy*$x+d=~rY&^!ty>?i zBeV^(yAzK_>f!neuw4&u5DSAa=s*h=jAt+Y3x%~e+T~>A(inHAU8plt)ZK1%x#lJv zyP*pL&i-yx{(Xyx$BAG*fxEC2UoA{2y=)?&sRj)xa~xr|gn5^3I&fnMthN$i>bCWv zLBep;^tiEfR7V3be5q{?VR<0E6o|l(fqYHIWMmwobz=R0KpSq{UV94)9(&xk!+G!#f zJS%18+pS-!`Z8H0DyrTah`||@il19NkP9jAu2!lcpEBvmlO>a1;Q#0VrQ}kFIYs~h z!3q11rRjgI#sL3grRjg8F#G>emLC7lmZkqJ%v}J^f7?I*Ut3`J{=F>y$NkDz#~yz) z^~+m8ELcG#6#wy4n6CT6HD&dM*KJw39){dlaZ63kjV*^z;aSnR8G_C``EnreGr`xu za0e@afH&=ELj&6{^ppI{xw7&)9Y+~|A}tJzjn$R^WU*q0Tg|oOVr~{4KuZjZC+1?U zu$C3)+vr_%9X1#8yOd5Ud27ulNqp4iIYV}gB-{4NFqJ%S7K{U~n0e5O(?7dj%PBc# zZ7{pn@O$wY-5-AVc~h679r8qB^EudTDpMXc;_rr1PH3!1YvkSIyzShvr8f9-t5im3 zK2b{v<%ec0@yZ;^k4oyhW?V$^68+yIDapv)(1*~iravu`gq>FpZc^~$Au|QvAtbjC zb`szdeGpuk8Z2afCKKl-GavE=8QkbJM^fx~JY%(rf8FsghF#8nDkZ*7wr;-;pU%{5 zxZ9b(hO@HpCz1Ms^Sr08_=i$!xuGb?3+j`{?vGQE9Y5u+>~tolW+aO2+RSXM*kp1M z62*^^dlGYLe>}fJpX4+2@PB#SmN@;{+n>B2Jt4~TucqtK^l|=EahGTKvSPfLGVC7x z{ls6_r}t(5Lxt)ITbfQlV}^*aN6QD+k|@{T=}&%i*@?gE%$M)2=`B0C$ZfZGvNxJ- zc?9#omxOZM;2E_kO{X-sBZLh!LI{uaya$h$ASpKT6mC4>P}92&)Ei4=5?LD6*K@x= zbu`h;50D@M=!wKc#@QdLn6sEWgYn1#e>XeKyGy2nN%i3f#&nA6bx3t%ooC8$hU7t7Z9dK%;xJePfFyCKB1{w?9ZD5o4ZE>&?;Nu*z=ndQGE8l&&ufb-v^J9|p@_~9?X zP;*VOhzn*^kQN~xuDpD33dte&cKI8nMcU%iS+reRDZx?7GdjX}!FwUBWFO5!QMS@d zMTk~~LRSVeP|+*WBVtUYA|4dwC*(2T z1P;UgU@CrLp21TG0h5&3&NWyZERh>@Q~2&NlJaEoQV~joUE!EDve~vDZF23_E6!+9}U=7j222MeS<%O9)Ojxjn3}$|O3x4jE6b5t@ zN#+Mu`oxI#vq4aJO+>z+`3QiPh*$9U8=T}{Qu)|@AdUvXE0m@;!#DPZ8522rInwy3 z%+qtH_CPD${v2*q#-K%uX;NP3Ldbylb67y($C3q5fJIP89a5R<_D<+OI%`0d#_Z#Z zq6$fZ|Zar1=}{)bu$HOwP-=2#Xx zl8T$s(t*7E2;EjGEy*GW9dm!b6pg0jlB5+cy0>V6e)zZl)VXU0z0nCuh8gt~^1#Nj z+SayOte#wNai(`zr#UxZ157fl;P%^3UeyJvxt6U26xS65>@|uQmY4V!*%tn3j^JvJ zU1Ci)Ze*R<;`*Yk*I8Tqo&2V?GXMnDqr*s&2jA$^ec+HR(&g$Uxx54kwt;pza-9>H zZZu`VA_Nr4ETu``PuK(><+&@QtC>d~2R!iRI@{A+3*s&Dr9jA2|VI zB30uvuipsF51et{vE+8)7yH(9(cIgy1Oi_LpJnB9P?c!-#$|prYLu32TCh+!X$wwv zoG&%4hH$X-1;>K@+Q!M;443UpVb5(qfw?_^)j(^J6;S2}p#2J7&{hWv07ElY|9g6r zD=2_loH|&13|%AIeT=sx#-xuJL`ivGFK_152udt)k9$Z_@3^hw42{vWv=Vic1w7mm zv&mNcQn5w%JOq_FR)9y8C8qR~H8+`@9JEC?G+bh8bS2VOi8vqptxnfe9H#PiSP zmTwIAfrtvMTBq%@?zXe6>>@34hHdhzYz&z#R+Lj^RDZW?xfI2O7?*1jds>;!aiLrR zkBNV~tHuyTgz7dmEsz67L6S!oJV-%ml+0ue`T9~sjfS*&p)qh+f1?CnvrJ}8$mERM zn`@O+L2NEz$^Gq}p-pZgy*$^euj+NFzgX=#E6=jK5CVxqcZ{eAyoXqzWy)0WNBH+tY?xc|CY@(c{`|P?3&urK5)pAOeE)@{JH4Pg3uW`@RnSxkGD)n| zgrECOBX|aky?~>{Z#N?hR)7a!SI`LxFFX-|VpU08oe)}h9?Gz!3ch^Dh>Q9y4|JB` zyy@3G2v|)(7RZK>VbCo}-~nVkW&!Z}TQultCyyh(n)?)pI>Qt^XTl39$*pl`y|t^f zMv1YQU`sBNV2x=PdH`I4s3dlPd)XV)7Kn)L2BIsiD)`ErjUfA0VWHi->Po*(gNqs~ z!SszSi0;Zy~QjfIy!|tZSu7zL;4Uj>|gE@}Ms# zl4i*HsH<{calMgOydHSc5yA~Yhlr>*yP$`gL1I*Tlqr6iQGbX;Ke)u+_X8Xgw{k6V z>oeI{4CKUEf3kjNpG)t=Au?Ha+wW1bDuXE<`$q}M3dI_C96kN_Z?;<8_#?`Z!3?EB z<@7!V6)|%;xM7ha+#n}os%pU*yN;_vkiKpa0I0A%Cb=?Pqea%m02GNOA35{gIw5bM ziv6sM?F4plm=$gy;)T`<>FzHrhF}aDM4NDw$$B-cO4OB`zGP5n6#QNk%_V2ZUiI(!&hpxF{pd`1pGOCMDek{rzoFlcuLt3d{eHA3WzH}Xwy)e%T8 z-i5Qe!4L++nCHc>5rfwlMCUgyp-B~E^| zV8|9w5C%)TPOJ9ei!VnruiX%BkmPvBhdP{A7PGx!<=%b4e4yv&e!rG+5|>gTp|tk+ zcVdo)?gN&W6F?xIj1YhN`*Z(M!6k`lJMVPYRA!o8P`pYD+^R8Z{5}p0=R~^acs(Cx zHcY<8%xN_yA)jP?8QEo>o#&7x=`2{rv@|s*D8K0P&4Wiwxh^f=;mkZt{v&pT>_>3W zi#-cLGJ4me$#x_$1E_2dC(dX%pBxgFf(m+u!VvUU*lR8bcsLoA+gMcy4j3V*f{E+| zbzrK}2*gL2W6-`P@;S17SwQKieH4!-6c$J0O-640ZQk87Z?BIA`Jo)GJD>?V;35aD zZ%vDhz~&mAu2BkPor!z1x0PLCQ15v=ZK|ulkuqhXSocrHSpm6@ma?n|+aKidTbHSy zYx>5A!=r9?nd>p0W)}~e>bK#9Pk6^A+v0o#hx9Vh*=y8q`Z*0lSFo&vvns>IrRb-7eRn83P^KbQ<5u||eOGA711=IkF?0V+I-ptYk zPEiB$HwxgLC9(%v9d*B{*5-eT>m&YY(iQBN8vi|}4}Iqx>4`d! zP%0}~?!Lus0)miCXDhEe18mPc|O<5nZVm3`$=xppoS zQTDWSV7WqUGccwv70|7yXljy7AAh!`0m4of$v7Yv)ZA(c+?<~Uk#vE6Z3WM;X`;e} z;b?13ZE2;AA}*L%cDw6&YGRyicU=L^=I_g#k$;X-lL7jYce`x<+}qv{_~GAekIo@z zZ*v^_Enuo`Q~NzApwUtKg+};^6xE71qCgZpv7x35Sa+H#dn#dStS+F>Y1oAiiElp# zX*$;P`}Z02hPA}|WZ3?4aTBk6HhbCkq3iF~2+O;=_A&h<*peoFt={L%l-@W9f!`V8 z-JxOe!g<#!hV!_@$C3FCuRC)4epIKAZi4>AxE)Fb8wQml{7^;#r5b-XSoeEfEtqqA zEFT7Q(dXTD%`aKmH(zuUW%VZH)KYkvY7xu=1~$_{Y3tNWTM8IBstA$v~+;NW(Nzu%moy0D&-w92c?2hJoCJ3Gm;{4KOb7w z-r48CP{k9;*~F9u1YXYyss~ctS6iT zL&Gyb>*-(w&y?~6p?@%6v$kQ>{@kKp$0&mc?Hm5^PA=n+sLJ8p^|{l(*@)wVSj8HJ z=WT~_katIK=E80WfSZU%aB}6ZVxB-Ywu0EgWDKK$K}|vhkJ+A}XfCoqNarZ=R8~p9 z^QoHd%hHc**Kkl*(j~8ub*;hjt1nhH#+H_FIMBVf28X-6VZO3Q)Xf%mhSaH}wlaUD z6D=vva#7J2h_kYY#U4#Ya<|?Ui^0nufueDU+3v62*jM;W_?}o+n#N8OS&{=`(*Bf&^AIjEy zoA!!8t>2Xbq8>a1E*{Jj3nxljUK=dm98tdwPP||K5E_oc=|N}NNmIk>Hj3pc;Pn~t z6*kKUT_tZ&@7iFiBYE_wKP&F;Q~($9Os_{Rh#6yP3z|wNsz1UZxs8f}Llx1k{$>F5H(&zCr@SGC>c2oUXeEZr|;+Xe{$=^)6g#54Xt}ej?z8RXzLK}*W`Q*eouykSss=RJAs7nc3BOxvcc+^|5l5h_Hl4%0Q3alFJ`Rp(6lkebJe*2Q-covH3`u z!oAvUcYsE+psJ(BKYA7e@9wLudvLOC!tpJu{Bf$6Bfz!E0K!@}txTXi-+!2wqBall{;j2UOD z)=GKa@Y~1E^J(UDD9I*T@(nNUEmv#sM6F|5gv1ZlURN9E+5O|Z;c5QpY;R11UH<6t zkC%)ao!@ux=MHHOk~FW5dg+(r9A5SnM*y1V+0=Swcieu{pG^_DDZhu0#uv15w*ExF zCn0{P#367T)b#6C%-1Mx?mcIiW$c!=h|Yyck{IVhC?-b5FT$}^MApRUb zXl_Eq%ea4uKbfnqWT@m3L)NG`oEuBo?;+n$4N}%{w+AZE+)|UfdY+Ysa}E`*uR$Vt)*>`yAz7 zc>15>&ite5BA3x^Vw~Fk-D|P_q?pa=2rLGls_l>_~jE~3K zT3j}dMq0a;((UxP7AwePd{P?I=>9}?vdD09eJNQwbEKBKulZu-p!^ZP(r;T|yHM`z z(aVdSNp&*d&s|uQq0+mUh};bZ@qzTDI8F*B$+OF?SL)4@-CtwIk?`N;J+!_XkoKh` zSXW+~d@*ZT9-4=Bmq311lr_om@Ho|`)wBUIeMX9?)M+V5wo-CrR#kFBgsQQ|Ut!|N zzO^U#>d-nP^nb6UpESEMc-ZB<>GpnTnRu`teo2Ti^2FS%V}w7Ex>zRJ7EX+aHX5pZ zi-{cRSt$SMdoOKQtj3U5@t~fAA-C^>zOSU{n@Md~n3$bs8wdlDnTN7Copxk0 zyKGH6Uc;M~&fyE`KdLm}_5cpSxqn+l|BEmQ2C}v2R~^zJeAI11L-;NarW$PRP>}97 zh#FaKlhTI;^{M#$rSdHrq;T=?N_>>0tL4@B7_Ku#+1q}f?ycK+pKmoAtvg<2!1mmF zG>&MGh~;H)mMXn|a?-tXXeBJ=_K&^mr)hV6GcB?Sn#!UF+oAMft#1`510Oevzp%xz zsezBnH2dlXI5aq>3)!H%3 z{+y$Z(VSqF!CB_q#Zpe+Xx}q7O8i!x^;~a_uhA|{)AMe{ScqG@OaOrTEjbLlcw|LM zW@=-KTNzn=2U=;#o0$Fm9FKjFHb^Iy2XySQ*G*DEjLZRn@p1iDLa?*dgrbLY&`mF( zzyeoOXo(P7U~z{V?Pv*87~QG~1)o7&yxt9Gz9`dmoAVIz?^@gso`#yb1NBKp32MOT zi~OrixCVrHj6)!oSH58e-qGZ&DO+~D{6y;nU@y2amlVYDLUhCGR7%HU+N%GX1{#NA zH3!~Lb}-Ff&o~&;X;NJuq_S)WZKVusEyI2F{w^hPDq&s%7|SQHF| z);p;i%$<+-$2GF*BoCp<#57aT*Wx{k_M#qa;kD;awN{r_Zv@kutegCk)EM8xi$f^5 zT#``2t#BzifOx1yzq3HeIzyD8zP{yG0L#|Q_T20n!c{bp#|(i_3EA|hKmVRSmxnqz zVEd+8LV9Syl3TVGtuT=^q9e@ENTTkdrwyv>p;IG`FPm8os19$TFdR#Jy2=#2R2Sf=GW z$;#>K7*dC!rNz2Lpg#!h(6FD*d%qkG#k)Y@rgh?dW_}l$^+;43nDyufc#}w<9JkLm zJy+AM`KqVc6w-cXpCUTaOmfbrmgt;mjQ>)0N)N5kqvzHj-bo!;i%R+=vF+NNujkOO zv{!DKYbPIyP1mBBip9Ewcb)XUKypXhw}AB=>}|?-{j977@T#Zt)oB_5y^eh2znR4e zeVe}#&J6lf|EniU2;6<$}6hg$~pYg_5)roq2nBTPqhPlA(h zAiLvb(jc>r@M14(CB6gPM!{29(hW%IbH@8_@QuqEoOQPzBC+;M)`uFV`i!!MZL+`d zs?w+P6pA4ppZC;N-sB&=rJXBvBR1aiRt^son>UBJD|M&p!Q*cj^$cSx9%U6;{+*7} z7Q>TP*dQ3nC~k;XSf`bDb{+=s1{SOA+`7hk>eGs?j=#TvwaJ|8>SVK37<`|FK~x=V zq90TvFenj)kC=`j{-rt!m|6~Es%KkT5n37~NO$g4D2T1Je!N3}6^^zq`@Z%T4 zG%-VADWa%V92~4r!MU3uYcg1QCi!B7T*lGM-mvT#;5Q5-l#z)ThdMdgewn41y7zlb zwE+ul3-oE-pss3XR|L*4x~f@(Ww>uU&hV4FwWstvE9!hC3{;6MHTL#P zKg+eMe##?%O1!Od3iY8ZV_u5Mgv&((uIM%`2u-7wtf^iAX}H>#h0U>G_-Nc(dK|bmLtXP_UJzRZT)zmtb-Q5hCxQqKFnWE-@bdG zS3{s3+sQAw;(-4Ho8o}VB1ryfetzWD1W+~Mke*pMF-hEHq!&zLrA4O~PvC@85c4m3 z<<|^J_)D*3FyN@D7<38$px51VR80biQb2#%QDw(klq&{rvuT$$eWI-g4_&Ow)?y%G zz6D3|P(7WdWQD+oL%G=HFD4kJtv)A&bX-hWSF_W?ktuZ>Ywe`D%DqcEl$m6PrDy3ko>HsqLO@#wREBNefFgVPYN1-`c4*8uq9}Hn zKDxMtN92kK*!}KiXnm?#-g#+}Ct8dNN7vzbRC5j5*x((im58_UsIo_XJBu=R&m&OZ%mN5v-i= zYzs`=VA>>~!zb7V$qM_@`q&OvoyKX`L>WWfrgv@wv%u~{QTGas zHk2D-_KSMK z-gZ|v(sOEgPo1TkAm4d~{w|KFJ3XE(stO`FUDAJ5SU9|YD6Dfwom!~(>*or)h2Vm} z-e`tE?^lOQdEIzms^Ysb{wh1d^hn?qS3Mr|(~+~G2Ez4VX8;4%FSha>lJDtH6Fp8B z5ZXkC8pjTOHsq6I@t^B~2K4?JdR=^|8m$N{5veQElk)D3c0lVTPrqeKDO3&_R^jlm zP2yf3bVkmoqZ3#BJNAqR->h`@z*tCYH=XAr)zR5coJ|KOu1Z*Q~ zbr>|`DY&P+BNMZ)`McQD>fjg1@T$(bp-Zni@~ue>0P&{Pai)IL&YvS-9f1;#aq$=h zqqe37;!;*y)T!P+JF-L?2wjzy*|Ccm3nGSVhlel6-#7)?>u6c zn@l>9@MN*!Xw0{kQt2M8aHLC2*YwI(S=QOfmFM5%&W0JW`ZJ=aKc-mwbTdZGpLe%n zzF1Qd0luqch})<B=o`ApKjO3bC%&w8X?mc zx0xMtAd*K3omoZ=H)Y~8^35U)Hr75bz&N~1I-~IE+YQ^u&m2_ED$LfW+p@Z6^lIqG z@K%+2kbhIw^z{Fvtonv|>@}OI(}V%^`#Ax&8Db0lPxAew*$@TH$%CICl(w0kLg7J* zG{H<+cM)GWE3y8S7s>09APzcJ5(2yrMeoCGq&ARUO zZ{RX6s*73QJzHMIvK4B#U z$XmYPImKHsQm}+rw$%++PK>>{Dds2N$GTA;7=;F7dipnNMeO3#W6RnZ#FM+h)Q|N> zJ;Semvs;?K+U@RMYuTHeG6Gq49~epaGRu%%TTu0HWkYn8$nNI2H`YpuSF_9v;HywWho&>0(@o~$RP*NK;2 z5g$1#0%Y;$HVJ3f^gtuXkG5PDYD5y?a@x|jtE)* z%~HN9Xlg@ScSY+(f%f(-Gb1&A1reJuyw_R%Pz-HtWsCpQ@LijJ@t(g;(VwN1vsA=6 zEsVSu49aFYIwKZz1G|2HhX)aR2d-Ko{|fL6mX;95f?0BvYja$F?`f#P&@bS-|B5Z% zAER!*AZ)`n53^$B0xpNC!F@PVkTuUQnGHswVD|M|LIQ0=rCN-i>BH@dq!-#u^@2vu zX9tlh7@E(*Mr{pSz`#93gs%{zw&SVj_$xcM5f7P7!TckEKY6I{z2Ub9-b$~*bJARK zQWF~3l}m_4tN7>x@lYYh@JU*Px4P7d+9Re07h<9X{dqCvihp9!K#y*VBTsH!Qg(Ed zkVUB7dErLq_P&|d3bD~qtj~W#ApW#{p<0IhV#^&?xp`86w=5=x>jXDuVB{F8RU>K3 za|_Z+A?3ibeRbrs<4}*g=<_l@S_HiO!(Md>Ehd zKjN@6Wyi2df|J&euWk8hAY6g8=X(>)I20=O-I@YvM_}-L%;1Kv7y;cXl#Raj0%|BK2)uTz3~4p^aio#Y(4q1rLc#8nya0i&&L`+09+R5Sth>~EI&z0znBOxu|Xx-!W?ZuC*6Al9^8_tmC zz$-+XFLI-75oYnF8+d$)UWNV07?G#j_4ZdAI$)wGuAA;3UlG57P3|b_**%$@fBNhF zzXTLY=~ zzHjoK%+$bdU#>8IMq44j{RG)IP%0C_)O|RzDGV9{PAVV)!sVxH$@iiFKo0_VZQ7lQ zmo~%TvlRLN(O;c2{^_sGn*Y&Xb8-H&zc#d132FY*UoQ}wD$h??&`O_sw^nSz_Isiz ztLI)uLTqJM73M=CQzhu}X}o(N1;O*p13jJ7iCpnP9zdH+ct9p4jt^Wyig9Pv4n;bt?O3Z!gNbv=$@Q|wnpzv_TeRsrFC^D?qJ1dR|MzuyIL>wlIbiOB# zcUeb5qrwhq;Hsi_E%@N8(%wO!!+HzvdJ1(1DNcY^!qB}Fq!IFZ&(l6yEGDIX?Th_~ z!aCpeFaA~79NPb^umM5;QrLRNe=6+ZzZAB1DQKB;lm&hr;gAML(FD!trarbW_H%P} zHvi}6p-i78!gh-XjecG=VkLZEmMWh*fvcJ z=EAmacdhRYYPk+>S*921?wVF#VV1D5;6OkxarpFf)NR{tafsr zF>pLOSEI-Sc{q?~+@KbtvAM-KHyWtzi>b8<>1!00Rr|Nqep-S;n`(JcA8ruFUP7Kh z)&ySiN#A%@hOXB~fA2cT#@`+{d~8WS6ZqluGQjYNy0B#K3s%QvEK>qx2<(zhvY!cz zUG*%iLic7YcPJx9vjdk;Ye)FdBieO4z7`ygZ8W3a(+K8HzG`VA?3{hcI|J_+E zCNJMTEDx{Wi7CM9DtAveo3PGfJGW!JRljH|Vrk(SR{IF&{zsP}YNyMwSfY;C`LDLh zWaHUd&sPs2{(gE&?K8(}Vqr9d)5GwlO`O?^;TQ#7g2NPj$@-gdjkputPCMK*o+ENP zG;5rw-+)ePx4vBLM-Qh@yoN_J&JyMOd;Dnt>+R+KYJTdw`Jui8bfr^HS=(>GT1m_^n5e7L#$PgQW4BvYu&3E(482yVfh& z!%cQ%j_9Qmw03-w{;@qNDrMqF{Po6sqbA3}$QcRIh-FMN;WOdJ6V!N!IQkBDUiZAd z>NO7uO;j{qPSpI0VRNU;F7Aj+u|)cE@v=Lq>v>|gT~)hMQGO9>%X+mP{XDM2qIIh< zOIV4AL$9rjVV*gqn+lOSAf4h_BP8NDt5>C7I3$huA4xahj=q+%IS_JpB5OvB zNnG?l@#4WzeT`i-MG}rz&-cfzO*iYuvu3Mp@3YM0zWjj98udYGmnPg;6^WE8cK2#* zv(d@05{GX@!)IS)s%A00vGTKG3XaeI?t}Eds*4-B85|Lp!;Xg~;?x_J%^OglXk77s z^2HT8sq9&%V)UM%fB7O-D03F|cLf0RjxeBPl9AIEcAyGVwYlLr9c{E?&ulq{j%j)% zE+_l+p5IGiN{XoDChX{zP8+vLqhLxfa#FQ6LC=+@PP5*h66VZC6)I& zm)x1fkNfN3RxCWTice{J!w=$PX>KsBqUehgwCP(0m!ID88<3b6Vx#AScAXOhricrK82 z0a^#}3*zweIEX)O@P;o!7a`a~vwr!#hgLO}Q@I4^w)h(IH(#<{7}yz)qXtdAd(!zf zKG9LW;}8M)Atpaj<67{(?7u?LJHLbw$>$M--k=o^^oSsf@JVMBWCyZ$@4!iz#V^3V z*}e^hckTDA*ie7D(sdU8j{RUpcn_Tqm)}W?w;m~d;0g^VqV7s4S4q*$NJu}nXxLYf zjTm!8#+EvRPcFVQSvcaiEWGgqVxUWlIc@rtn}xu8MB zfVobj!{W%JsNs0<1;JT&%j8)ax`<6FOL33Q=)Nno@O&Hju>F(&Qj) zs6opJhpVM5-pbs`J|WHexV-!V{-=q-Hol&?P746=A^1OUasRIcg#Y)N82=Bt2>*XH zF|PiXCWhAkvw;A82SYP+Cu2h=X9wf|+g*(7|JKF$&-L2d+7V0C<>vJpMe&RHU1I5J zbBgKmqok=}#YH%!3(;FqlL~FC7MT#f4=9h?xVExu!&$3*dnj3&=eqUCv!bm5d7L)k z7w8@BLGtE22av87Knw_3nBO=t>wJ;Bbary_^vUV<>&2A6E`MmQX~V;iYVFLmsO<|t z7xj;GEjNQj6DwURnCG^<=c?8YigvvrC|0UgvA(Tsp44Ou=ZJFG!}uI@h^o*iSJy+1 z``iVbhcDc6Xf@bdgc+E}oR40I|Jmywa(NTBt^-IHDOV?BqmaV=WS>r3j_Vq8m}#@x z+Y0uU5Y-URK2fTnYWjYZ&eij#CGPo~7VJ)%qU8;&gY%y71~-4hShKG^$b*#s12`($HQ`H~Y8F!BMbTSRXDo)Ge9M5BZ9^y}Q>?UA(K$ z2eP}@UThxNya71AuO;1|#eS$Vr#tSZr$XCX669_!FR!=Jy}jVdYm1w~?e9P`xoeQG zE!XP4Z`*)D+r5Y5eY|`SvnL2Go=}OH=)hl>YcRQ65UrlIj?L~(;Y{O`pVLWSIM|+G zlh;O<9!V-r+#CUk>`ER(Z5^kyl><5FgO`0 z*gg=gzaDpx#QU63)%>M8fYXuFo!fg3c6WG*D?iH+XSw-j?Ww1-V7%Bqhi!I19`0{o zW_y}uc$i#YqHmwVcKeKTCDylBFkKwHooUT)rh6akUvLKjHe4^?4{+X?UM$$*{b!Am zef767wr6*f;T%1c=Z%J+C{C9oTV4mgK+AAE%p`<(CE(rlm1>*-W~~B&WC1#;4&8J3qscr}S~0Io_rV zI_l!>rf=)QwNvFzFWtx7v#edWQ@9mA$GPX2 zfcO4Uus0Z ze75F=+c29;Y6mzG&?&hAJ_9-kkvxmrUT&}d) zf7qK>DX4Gl(+B*PlZ02NR(G7B492ELAU%d_JskL6l%t(bsVnFdxL&L|Y{zpn zZUOst8>O~&O9!{q7G}L}dmjFRWoOeK)|*Sg-`~mVT>E`1m-E~Y`0hu)Q*d2&P8s>X zPusJ_#e5{n5p*+oXlo)K7dOsh+IRuwEpQ_@0f2~BXG*@n_+HQI9sv@`CY<(QPG+$O*;(0kd+TI#f z_0Q6JC9R+h=G*%(o7I^vxYclPp%6LKUgzBog|HCK-$0l4Z`mJcm9a3udB=hM(XzOJ z$ybn00s&P=e%Ot|vIgf{3}eQrin4+D)x$nGa}fJW)D?Y(D&C@&6^lS1f!l%4aIId2 zumDszsS+$m);;?O_i_E?Kl6%HIq2U3M4>{(ctlmfN~bzPB>6iZ^qLe} zFA;gQa}7kDQLUE|8@<;O__1lScIzB!y?)aqYR&j0Xr_9Vq1R?={Ymh(v2Ne4RmW*_ z;V_5AR*DUS{Q_KbJemFCjYK|w4jl;fR8WY4o*xRxr*!w8cYT%>B84wf$gg?R4G&9utOy3f}<25_NQTW@x-tVAc^_ev6q028z!+Q~A&_k&L1Zc|g(P86bwS9Y znqw9?f@G!`Wj&LEK{8#8^;AL@a;Y?DU^;~z7-S?oyWxYJ4&4%=^!Q>yn;ZvA{>oB| zLYbbv{|pz?M4=eel^OwR7K=3mQkX*6g}nMk|ch?zO$38PXn%|TC@BP>v1g^@IT zB8mf!1%N5S0efUBOM`p^|6m{ps%YqZQUk6intbXAIs`&WaTmRh?yWWzYA5YRfWzu} zB0Nkd{XU8dkPyG7&1AxDMf1*P64-St$`>A4GVKaDPbTbi?Y>rRzXW7oN+ujYAAmsN z%@*nFLH>E1#bEi_Va`DNQc`4HBVTX&nkIOK54*dFAozR?ipISA3bZvGMohzEtaXlP z`0{8J&un>#WBNN_Hf581jB>L-3MA8f!YY7D`xpKZA|e7&MZ^SQazjxC^-^^!=$kKii%T^8aYVKHR;qqCuA@Y?WWkDlRKzoeD zVJG?Y97ilA0SGvjlfq%ueAEVXVng%@@d^+y#iR>nbN*4Q@Xs6s7aAOqFCPGuhIt4% zbQPgwUa@7Ri0HfJ3LK=AObJjy2AOej_P}|_r1DnKvCPqSV%6Hf zITa5zfTbD*%uLn!=HhcqQe+D!1&Tf^))?<6c3Vpe4&#YM3C!76F$;Fw&^BP9EQitFo@5$;A6}T#I2Iz1QLY|a1D-#DN!Qn9xtT1&GNLLZCs^ zZ|Rdp(A8UhX_EXHOLAra-u=m|kkyk#`JD^jAy(qFe>$V((S92&1@INKr)nNx;@_$x zFWL(dp%bwuG?0)p6C@Nch^q@56(M8FkFP^uK-Q!gOuu7QJaK=@6m1i@6Rebpv`56i zB`~oYD<;gM805E;5cCSA4;Ki6p%*6>oHD3RSkuFYjgO}3D?+ur(ab2X9xF>g&YMz(+q| znMgK<-@=e$H(*deAglU5#j`Gs^G@P8&`ob62s`LO_LZR z5F`-?Ccth{(=Vo8xZ_noZcqjm1YgNe#FZEVAFu}!1QqpyF_HvrnDq?&oI$L4(k}HA ztxFr9R=F`@9Qf82`Mytj3#;G0N+xy-rxKTQN_eX+DUB{$ugeIUH<=5XvPXfS)8w`q zQ3#DYRVbn6N3|@`;u??}BAhZq3>FxMSR_{(aS#i|P|47sVEe+5)HfM8u_{01cl>)y zY1n5rJeM96qKIr!O*laCnVdvdP{&8;!XTvwZh(k*KpvG2O%kKUF@@ehfCB1MlkYe_ z_nyh!Xj;?MS*_g&b!f}T=d<=brf3zp|E=30QA_fCOvc|Mfre=xyLyP5e*fUg+!lI& zVGm~sxL$LVBu^Qpv=EYo*q=V9WRX2Yo+P100Pa%z*V&9bD3)9Xe+lrGgwftMW$Lkv zHPj|JZB!N7ow`0>K|d@Bh#w1GPYHORh=qfI?tqS{D#i#|-XdO{7$pF!5CW3GBsN^d za!k`_!*Y{Tb!%o$rIhTcN)`89q*NE+97gtCgO8Sde{)9wE`#wX1cmnLiT@UP1vWBh zWQja}Y|O4YK`f1&g+qckqDnHGfQOz%%3wfwEG*nOicQF$E5wd2;Rg^B%yVaRFxDly*_zSCQOuGUbqlq=Cjmp z1Hmjs%l39V12%u)v{~!*(=Dmh)Zjdh=!eGMjnKMvF_dU7LRNi~v9OyfA^O2{wbg>>^3BV?Xr6{ zDMDD>fS*3fC;>EP{JfuA+z7h+akK6=Xgdhbo8PiJKfyMAjSZe?Uzw6$p zUG43P9E>MpKv(Z$lPhVGE$&6Kr`-_HJo$$_asN+t8Q*eu1H| zSy2-zgi$YjNL3Ue6+Ows^nzeZBwaRy2cr>gQpsb+_>SIKKjw9QK{2FZcGTtJ2uLBK@JIhn zc36XKucxbX5^@EDzlzU{rGQ{V`R>m7dt)#g!PDbx>RD*_xcIL@DjFES`jp@rtwSbQ zi{nUmw~<~inam^=5szWZx2tqTXiv>fAdeW5(7#uW9KUx!9WGubPiO|-k7SGhmEEl< zL$@eiMQB0SjKD*4wLx*KT^;=nfq!0-X;PAXU;61-9BaJXxRu zJ!?xrY!x{cQ9u^3W2d)Aq=wm{8oGTar;I8JI^+(50e_TU2Uv0c_Vh zO1_L>SvtC)pddbCVH5$fX9#dOA!%B;^AIAczzjA6adL||atMG!+B*8Macank>2*Q& znqYkf=ycKxVB{DdaTK6;(;QnAbBcg|1R=E$aK3$z;gpd;SX4Nm`S@B#J8dC#6q|js zdtIbR&IJzsSd0f29;_-i>}GS6HWfr0d+X5{leuY|fh|6E}rpoJzthmp$$Rt7@9{JvxK8x&YK6b1SNC3*rm zsk$gVIRXS?S@H<{ad-ed4WdFOB*gQu4Td&6UP8OkJ$QXV;PdE^BTxtd1hSw-wh`0@ z+^BLnmMErJfe~u5DZLTqR0;WiB^p{GV3-m*GW0Nl?F2SR|8RKzjDBe5HEGJ=EXZ^_ zV}esDy1gE8{8nPR9mugYe0IQ-B%$d3K5Ru^5r8@^9F;$Q#}_6p0Ciyv6-FRJ>4KS% zUvGoo3dIQ2{c}5K`##=#XX#isy01%p<6ytaGZ1?N?Ovz&Ky#G(s2K5Tf<(h~Zz#}M zOYdkUak6^)hD2g!IA`ZUp^%#9h!M(C%<{*pyr)(&`1M+0=%Ju-YJS9s$EE}zvCsj~ zLX>?}W5NaG3DEEndX;I#@>WEW6b4Q7&}u^uu?SGqs+qR)Mt$Og0midHS!;JYXLWkq zP<60Sl&~9@x!YxVb!E?7LLgCy26U$R$??bF0yYIOF>K2Su{0`D^cWdwfFOtg_`(K3 z=_Qzs!Ez2gg+S%%4UM%q{dgAi|PsP%L zI%8AeF-6c3VW-7|pd$zlp#@&Y4)24++->Wz>0?-L>gA|L{kp*tdBfJBLn z;!_ja8e#c22uepxx?xeR9!24tDMpx$A6?+49^ap?Db;6SSzN-hv}GZwhE7GD2(B1V z$AF%|TCfeF32+%OOh_LQYM*rmoR|JkI2|X3Vsq0Kf%H604cD8lR+c$>kS1D$WC>RyP9tp4`SJW1iL=1Ek ziF4AvxCY;sc>sY%k96ZWOWbtoRqYQ=ppJwsEQWP_hqgv6KxHjJqFmXN)^o}OF^ zoD@_Ybd8Kocf&J;ku|f=uxektJ}e17qO%qiy*#d8OE`tkB!(FB`{tev_{=2koR~f_ z0O&(8Pu+<{zvmf`NI|VeW%jd5AQ5tA=4v23`aU`aaitN;)+i~@uUX%`u6L70XBF<@ ze@i8N{Rw*5uWi}NK?Yt<^1V<*9a!*|6Ko%X@Yd=7u1do9ha1F+iIo$ck@xWh(Yb{I z0xV#Y4Rl9K5htr*Qq)VJkFuDM$eN?`M+&`eo+D7}Y!)MwcQ2yg2ew;34Fgz}&! zEl-k+DTBgy>kIg-M20dUg~rGA19dj(QNBcZMwG03!;!43E|@F=Y8dFj`Zjj>RKy8# zo>EzS*gP+HjRu=%86g@|`VT=b5iQfZZbeVS?RMICOI-xM*^BLN8IY!fkY6tTS$(7+ zl`>oCA9sCGh|{qGQT_BDn^9wCTewK#V7wvK6JtF%mfUPnsS>78mN#&$ z$iTq8PEs&lhMl_8p*$?0ZD00DZ`ron*~H>s0yV(qR|EzFzsEGeDtnA5&nh_*)9 z*fvQ`wmsjEf=rT&<8Y)npKo8euB5wu&o&59;%M;U-G!0(SKdxPze?n=ZD5srxI8Rb zGk-AmjTYyT{o)QR%TBtfEIZ2AHG7{${M_l-8mKIeR(AW(A}g4tHN?Ya;gyEc;Kl|w zjZa_ojX<&YYf)0tlK`(~*qxx2c>FMs(MXnucL#t+XjhtZJIK_RK7C8scdT3xG?zo%|Jhjg>1-5(wh;=U7 z>%RNt8-R5%b#=xA1>3OqKJ@ssUe#mBC==Xh-y*ojroTy`l7WXk_j5A#f47hVwJY76 z%<{HBR??E5J=fTl@xYb)?~%exCC1chBnh|MMz%UB@t;mNt?EW6&jel^YV1Z(+YyjC zNWWxnP@;Ceq5sL(+3u6$yqKaJz86zs!F-fU{~=$K(QM;Ee*!JN=^?}EkC`&>9Z#M( z$x*J*`-zY0>`S5D_QL1zETOxciwlv;Swp^0dB_(&$h1FP96GoWxfi|}Db7%9rAVG( zO*9!z{5U@*L|OE=SD^3KDk_L0CaPTBXY7)m14BStQ<_B=E!(r5cRFknY0IGSmmm8f5V3QXX{fbcQWP#WdMdI z@)WUBR+MFpsxZmOXD1^uEHFzvh55!}YbOg4L>AD;`NJPuu=1b&e8e ze4AERykuTPgNlts`GLfwjJaCZ!VbbT7=2r>38(y8%aK8%rpW!amPdAFZ8+W8Uc+p( zE0;RhbO25U$P?hu--ws}OKFt2Z&`^96{C0=*-oju)Ef+=>1yNc@VW84(hSGb{@(h$ zJD&E~VsgpcT?7;RnZRP@A-Z|T9&P8(+H|p_^XgN%y?nAS^6uzozV0@x^a7;h;&I_~ zudUB9d#U4dPmAk zRzq*GJMBz=_sB+>oXj*F-bl87F8itCf^MmsK(jqSm}pr5*ZzWm{nDFX>t_4?U_|72 zy8k%c4eqnXK#}F8hWh$}_5{D=_Ye98_38qn@lX*n=W0)Bd@#n( zQg=H!{%W?oDyIb*#`6IQ$f{cSy(&;WQR4XAdB{1%+Hp03Q|^73b&B?T;}Ze%&A$73 z+w-L3H)DO32dvHQ+z$K=SU`I=;jKUN9#vn~^vU8mZm+!I< z&TZ}1AXy0T(D@bC*L$F%UjN6R*?)I&m+?;d^^PnvW|8C1{eTBhkZx@CbGzjp3e%nS z$nE3OL3UKB3y`&kzL894?&8@{0GE&7&Vq>I_TY9OhJnRlsP9AvYqC_dM|SjEk1zB7 z*=Utw-mLHA!pqA6we?o+D8-%ojSdHxgGH^P+Rh*Bhy3ie35In+;J^EtDka!ykRd%iUH42_OHOvvR(GvAdcO^ z+uhDyOfBDn^zuv9ef-nv^0{9m8!z2MgjC8KI_L3kioafXY=={JhP#{nlCfsB6$#!~ zwJ+H@*m2&(`^yX;7D(#Se|B`lZ?(1+-Q#?QcS0A;A z(hZG_p{kh^sZks&HT$O=BcWLa0%qI9v<|5g=sZ0&thf3Kxj zOAi%^c11tFBki_!x`cT?EGOX%vKSYwz6V~lHGLhF4&!oCMBWLn!YKD-{A9`PDd~Nr zQZ}N?CY`7ncuka1B=xPb4Y?s?y3#T z32s2%kCjzGvgUQ-WV?t6Ddb*% zdfLCrQO0M3Q)sNVs4ikGE7I82vAlq`r~uVp_23BfsEBd2WX^_QUKYXnFXKt!m4(c-i9WrlX04+qTuKz&p_}8mgY{vQ-*IWEH)Pi!YM>C8J2#Vp zjy#i1gUiXL{zugp^ZL!EWypA@t1rYZ`x?^p-7)rGiKS%5Ubj=_c+GvGsnVv~upHi| zS;=;m7QS+5U8N}-`ZB0H>C8iaW@3IF5j_(xiDpXMT}~Is^>O53*tx@N=L8y%%D_4T zo0p2dlV1C9)no3)`72cmgfr*O+jdZmo@!8Tqlz+y7C z!6Ov)NM4&QK=QcR64gM1xWZjKhZl&a%v&+?KtpMRIS_|&M^^1E#oKpo^Ey_;p>}(o zM7aU=Yl&{{5@=ve=SCfV4_4ZSVCWd^%|YiRwUI{gpXjl_Kcc3AnsWkQ z%FR8q%S+BFR6z2D>HU8q@eaCH8|Y!#D|67<4ugQ$WcyQ;Mqgzckd1di6L`q6oH%D(8|X!&J+5O&UC`KxHtZmBi7Vgj>B2 zLL-EoSr0+coY`FRju|@M4^{a$W6{hveil*ZjA ztjV9R!?PJR5tr^*52m^-)A^Qy>*{#Y=&_-TDCwrI)LE>>=u_EB&@mj<=u_!xT!d4| zE()QUS*#VCAQ{g6PAW;o%fcp29(xWW`vh-hdm24k=DV!^nKkI3 zXlKHrhrI|WepF!Rp+x~tPk&$M$z8qjI9o3r=3Gw!%m1rba7a4}@{?&YhYCfj(%F9J z#9ue28ptp(Vp#rg%p9s1?QX$UU{SR+QVS8yZp~F=F~xs8M=5b(%$ROjfz0Y{OipFP zHf}N1H_^kU4;-3~&AF&g#g}Rx- z`@AGv0;jK4w(3atxK|TpU_9y?UCeCwDj>peOI{mQ_0CsYPo5d`Jdw}Tv`tBx%GVkZLIt=@IbZJoH#!R1{(nXE6$k?nmN`SD@#G@$ zDhx>i_{CBKiNbuYH8T%&o#6NAZr#o_eyv>$Z8HO#i=mtUApL;eXdHe<=*U^zW*Vf3 zQxy#wK?_iQSU&*9sF08Z$&xp!5+)2s;ytE~W6~**O>MF1b~a4ibXxkK<~GP+_OfBi zvTeVxam>Hq0vX^{#i%KK*uu#R^z!-fTKLGDK|xVO0BdyN28M1`=0SoM*9UT&MfI3@ z+58&#O<{&bn%qWb(r)47kWQS8zCZRN$&s??Sp1to)z1*eplC-~XQlDbeuqRfJm z=KLMNdSUT^T`_Jz`SlGd3N-3hb*nhD7k&bv!p4eqo1>X9^w32d=ie7>al6AX$+bL$s#AH z_SY}{A2QDK6ayWK+LAT&Gw^NHkQD&HiO>t#5a>zBn+OmH=*85A3=5Gm=ET;(F(Rr{ z_JQPj{8k>sdeGk~0Nt5U)!5?>i5a*AruO0_h1nEC0`rnX+OP}}gTb*362wB%hBZj) z`}wd5u{8a>v?CWR@p&`(U_nFy?km54X!!)Y`wQt~Ht&z+OSBs#CP$Abd>{4NBP!k1 zYSdNlIrP$(su4R`tbql&q}v;y18f2*M5RP13$z^n*y~_h zgbh0z#DGsSBCq;QHCjgXw~sH#L`;;zP5cA;2mgRRd#o5DzgaYmiW)^E(^o8VG`c9A zmq9iAalTL#J~kPhmc!6$UREKOXWo^}xl@Wu@of;mH$Z3BmesM%jNoPOyYdPJceL;1F(8kx`REQ zAVMTvp*S)m3Yk=)9LA({8eJ7rvx40lV@d%F>R%YZ$TJ#V0BSK`je2*di$Oj_Od0vI z<_Pduq`wsULi+wfS4KH~cay}443LJTg5gB0#{>Tj?1%beAFpG9`ZSupOeMRtHe0$7 z*rbEK;JNTVIBgoZ{ifDjSf=ajPYT>ixSr^_F>}r6v!!>29XHWouXcHI(?E}E1SyHj zU=#<4kywvWAY?&E7q5s%36uw+1n9LE3513SsKp)t3rO&xHUNaou4>@+qZROweAN)? z(0DZtg-8SwC_o|`>e(qH1U;{v1@)OtM%8g7$P1MVlg2B7+eDF)2W?T2YE__y0CvqJ-oCB+BkYN-m$8cGQ9;%o64{`L!wq_BFL1=O4 zNPuzZdtZ-tM%k+D$E zt=Zn~<6@6?PNT|hG;`fe7)cVYGAw~SuI>Bf`mdH*eDUz!ofrszGuf&l1BU1#3>HRVT+ft=F|?s4QyLPZvQ=CL0eW$*zI11t;^2jroo-9 zz0X^(XilULR;>QXZuWUXK^E7@&rN_m$l(NqM6(;$m%BJJEdwKhy~TP$CIyX1p&+J_ zxN$`zk`keIRvQ)YAj?#;)hWN(B@MZZpBzyyn|;oh!Z=G-odfh?8%awm6a=1Cd2#|3 z(SO80D&>DB{%tlFqaDm%xhQWu7Y)cz-0Z0tK*#E zGT@?c_IZd&aNE^KG?a@fI#w&+PfmmO4mDj{CPV$&eREZAyzRa8xc)?{t*mkNcxbP6 zDZ0Lm-siQqloK+{W~q=muDWFT8j=2Y1%Q982ss`=>Ax!g`hWkU0H7)S4+X%-drYhJ zi&PIa!6EaEyl4XxCcaAsJhnbB3=sbhb*DIbu%M;7L2(=t#h4jFG=9dApMDslQGH+dCK*gUG4p^PbTC3t zj{X!=s6@cZ$J+YfF)N#%&f&kaYe$Zo#+S2g8rChEJFn#{om;WAet7w5gj*mS|Bd7e z+WyCwu9OUoc|b|fdzmLjvS}rK4EFKx+(CYt`ty6XH66cvLA4&t=*d-vnrp>1$9Xtw z3~=PHiiM>(Ljnzv)Xpv&4?i6jxk$mt6;h{VSFJ3CA9W1j55PJP)ETR`1PfO4es4x6 zs_xHvMd)TJhJk2kW(F=alSCh6Fq?%hKLpHJAEP!P5MehKr?f#Tj}ByIXkv)GItasM zv=UB^bXieZRVo@8E9;IB?|%jQN5vxF9^H~UcmP>gEew1i8+5oEEy))yu zh&sBdC0vXH9N?tIk!?yQ$ol^BVPS1%Oq-1GK61UlGn_~F`~^w|Zr5$@0#h2U@~kxT z2)bJkrMs~*rE*LWtqWMt%32|c7=u~>JMGRe1PhZ3z4z?8gDu--`*W?(;=^z*RN+Gm zo+y=Ehn!I>k8GKkQ_W$;VUC|}M5#pZd51RoQ?`c%#X_91I)Tz3ThYjzv8zIolb$}_ z(|IK5kiV5qwBh}S@ev565fJ_c0mi_Cl;QZ%BJ#lI#Q9+BabluND{xk1(K%ay z$wF)J{0@}_&B6h4LlFB+G4;V&Xoi$YFhtXZarBcAjA{1M#R^JGy@*sovM?dda(l>v z2Q>D`K!OATzzG-@b(vf+>?jQT6BlYE=pt;1dRH-HL_iL%Vx0c+B=cE)<^-V}E_F?i z)~bQU%4fFmdgk`cD&bITEppLH%#+a3D)_B>5TKtb!6KKlLRpVtjbmX$n3xnH{iphSMKiDT!CZ(?SXlf5mwH-cTuN&aiE>p272y@WBwjbC z8Hkg?VfJQvO$hk;LhtQv{X~KIgGrEds1DQQ5yXF#NY*G#%#k<86e85DJJ?NY%*X8) zDW7_Bj5PScn={snk+AMGQ3R?@Q&$L<%7f&(FC;%0@%Wdm7Tr1t$weUO(;DX{#vFjl zk>)`~vo69$QK?GOprxn$fFSte2*xU7TwK!J@7Y-kXXi7}z74HMcLL1R()m)lnF|CFJWdE@XEOK^PNFNROM;_y}< zmI5JNzL{fG=6HOwI?W?xe%i-6;)>YE1c|qOCQ;<;2NBFKWeJVtu_;hPw-2PiU&E4! z5{eUIF3ME|#nT~5lyCf*obg3B4nG1Y5m6L^CqQLHDWEIKBGo_?+rS{c%wJw3Wk|V6 z+|nQ%Zd=L^Ggp}0{}Pss)^WKqvq0I<6;%Y$&i>B37#itF{n(XI=r(1kxwO1>2pAtBQ9HZ^m>{9y1i}%dX)HX8wJJF z%I)Cb7$(5pf0Tim;D5?Mo%}y#K#2*6Iu<9QlQA6upyj_P14;k|p)WMrSR{gCJ0PM6 z3nK0GplYQ5MHwIfmH(fVfh3;)rVJcj4Q5_ijK)-|=mTB4msbqT{2VQXPk&TL)UPBe zo^p+NXeTOGQ#b*@Ra1{u3d~~U6a{>J(ZE&xM;MUM2NzZe0)YLm!oZ;oa-b(L!;X-H zfuW&X8oU&A1N5AhUQdFnx2Z=;#HiY!q9FnW0kZ4vF{1)OV0#4hKAn{~^2ejo0elD< zXu1_5BL#VsBeGcxi)3?IEDmRdM)1$>%6bKx6aVFMY(v58lT7z{^LD)BKOkPKQy~% z*Hed_pAxewaz82JhS68TGL^R`u&oz6^-C(9B-Ray_yR(gSdYFX(k&kvV(`c8?;8Ku_6z-D3>1^Z%01vZXMT;kq>v-JL=B&Q(;SW2@!PTq3+ zrYEKpFAeGN0}t0MGv$1kqQcM00Rl_gwYMRo28`_8h`b!}Ic+Je7Xs9D{`+Crj{Ydg z5@zNQ`(|9|7&w)tff0A@bkzUQGTq?c^p2|EK5wJ_J0Ms8M;mizTg+deHA~lBw^#FJ z4Z5@f{ctZP)tizE^Wc<5sbcxR{5%ffS zRF!6;V5@allcOT<(PZPYc0}To|JlCURv5J{4ym2=Q^p!4Qrj!aU#`|huMEf8B<;YB zm=Y`6y-dm%*{YOA3lG{OP|a7GjW7snU^M=MoHI&<{0zBnq5 zv`2bjuiES}+n;pHoMkSrnBWec;^c~L3|WC`zd>=l1uPWhr5UItGosrG>FleheKTz7 zsPr`Cq{rLI_BBtM^fx7(blj17*Lrgz592Sq>eRv}~D%KyDsq?%uX>$0}B>E1}Q=f0=7CGVQxp zK_QOAe_o4RvcZ^Qd6`wfYLu@O45yT)ZoU^eMv5@LPO8eEGtMJ}M@J!jL10isU#$MZ z3c%DGep#&wq4-$ImO`W?&Hl8IM|5JXJKow@MXR?dk=|Rg2S@qRh zD@TBgmOl?`CDWR8OTzvy@<3w`3hU|j^a_UOvK9&3Naab!qA}V}kyf+ai>HaRZLMeT z@{Pq~UCm37L6^v1Pjf0xZs*<`ZW9jIE1k9fA`e_{JYQ~1EI)m^wx_n~4gO<@fm|{$ zk|`bfxR}g3G-^!yRp56Mo?_b^)zOy7AtA9fJ6k_@8kaBCSgV$ECOfHAXd2L6eL(4u zHz?o|m;HUv1eh#-YceDyBzVmu02=O_+Si4S(V;VZ-w_O!A{RSbKC~*OBB+tdRb!@* zWP(JX&CU}*m7WV#&VX1pJ7+)f#-SCG^;8WNF(l6g<@uHILQP`3=TkKsE~ZBgQH3ro zCQ4$eZWTGBEgQ+PeixC|W>&7srf^fPV0@kSIL8Ck>7h_fCn2%>$sZu;HC6d#$D`T$ zmCJHHP=Y#&jV<4E)xH*#xG^tB)G?^qZkeE1i8HCa#2W80X3G|<6EcxA#SNDCrq%aN zXId6rCdBHOoHQK&2XpTjWb2b|`<89nwr$(C?OJ86vTfV0TD8iyZF`k%-THU$*wLr& z-S@=VyKnT3`5`~eh&kWLC&!yP^7)O_*P0;^YnM{dV}VWPLhjt8m}IT+v!miF-%GP^ zLvB*VPOeodS&m(hE4fL%w&)(Qcs&_U9($a>JzsQMu61w-rhy>SGDk%g9{h;iOHXhy zbm@8Whp(007{tQNZO`N%8=Ut;gRh;pKy>hFpy!9v?~59_JICXJ=HT@3`1qfU9Pb~y z%iwQ+zs3Rb`I*{3+}oQt*Ra=Zxy8ozxS!Z^ob0xx*%m64*o1d8#jXCHwao1@UO9|% zL206ec{q_=Vb>nd9M0gtdr&n`N_`tE8T$tg%C!8Z*4a%vBr}GWr*|T zBW>khY}=l9)#Gd#lkA!vef4Zx83j!@Yy+_3(Aa9({MG;YrPKx1bvoMh%ZZMu2sv@6 z@2Q_Xxiv%X-BgLQ*=yK8n$ay}_%f*QJE+2;MDI}ZM64iMv-Cn%sv*z=EzNrE`l};Tcd%EyrJO2WUHvC*jz|_uZ0dt zkEuTrv`2iejSfJIX*qI$SG+NL@vfuC!3~NAU6IaB)f>Iib92{%U~Nd(>*B&})S^QBMG?C>4P4gHRmyWP<`#V)l&X{(y zRq4@>?TkS@iX6zacC$L;p>+_3aqAQF!)`K{QX)WZCLeRr|7d1MC-5uWyts;%V$wO3 zc^DEnm#Jb~&U~-9+1e@#DaZMWY2*jbN&Q=&`!1$C*aj~(Z+nbj*)=c%|3m86!bWo- zdd=_3R(Q83_#A;I^lRtsCZMNoNVsnQ@$b7gL1=liJ2btR(vX=KKrMxI>rfS_B~Hd=iqmCu z(Up0*UEco`y%bPz`q@))%O^cN((7@>`fuEvb0f%g?UJ#yv-e*Sm9a z7`om#`$+bB9*FzN!RrU~`TzSC^_zN#=(QWZ#MYjbcV$3<$d?qQpr;t;XYg3XZf8D7 zm#)z5ZZ|*HmQN98<>lHw!6|L!{4aAhwiMnyr9s>hx>o+d;45JBEKIv|FK+h}#0yo` zhS-nAuK7gZhFYsCZga)p_`Q1jc@OEw1y6W@&m7a!PcGb}p#cL=+uWcd4VS!Yxb!=AbDJ^=GFKn|C88ze>+W88_B9QTeX5 zJneXxFTU{;gnM_5R-Yz^iIWGDlb+_Jzf9HS2(z=3%Trc3S0iUdZx=LQHk3>o1%Nz} z^vtGmO)oi^+I=L*h9gtgKf|_Cw9RH;qb*uH125toGs}86AGP4e@PV-G{U^0D?aDUY zf8Hu9>CbBvPPvWBO9T_~N>`#uhSf&Ybx`B0T;{viSY zVEyrrn3#X2qnQ880(<{Qpp<_HDCVEDi#7g*pcrF&yB|*WHs48&hIXcOwk9s_&;WoS z4}bswASeI;0IDjm0N_{u0g3r*3|5ns#}>!vx}z35N|5-8yr$<}u44>HmHV4BPbnJR z>t}V!gO#~#K!ub+MnMXN+Pw6l^15{G(9TYp!Drt&|LI*eGC$Jnvl)|DQ!Azorrl)L#_Yl(^fq{6? zkEKFEMw89ymG!_ag=A%WQxp-N4vEE8!Ixd%+5x(){`_M% zUwjq8B`jhroQjoIYinM0?-UDf=a)I1jp$957`8%27DyTB_)%8T5e`Um*~MrMOWG8r zzZ63QASrp-73L*124eXJWDgJmIRdPWosM7zlF4lb&nnX6gcmm(q)0h2c~ns${D&6Q z9llj5H~Yr`XTLLoU(;D9nXB39~Zn{2Dex)Sc z>-s5y#9HKqL8Zn4!g};R@kwpA+u%RtHEdD=PI6<#k87NW3;RjCOeJ*57)}OE!e@OC z7zF0KrbEzXX;Y8FIKRpa00tmDk4_V*iG7VdK7-lyBf;(s3kwB5<>=}|i?gu0m*0*8 zTw3CGfTJCxq?5Fain`nP31Vx$JBJhJNQ>ri=81SwU0K9yGAONN5}xJ(J#)8eS4@T> zdZZtSb{~y>;p4o=iP^*VI*;`+CA3 zi)vVb5`6BeI~U-enz5f7cb{F*vnyG`2@rmS@>d9eAz2@DhPF(JC-J8q?m77uH)zBa zFBTi63n%O_YwDCIu`R2it5ZFdHagX`sOh9r*PyT+dQ*1)j*G|{zdgEDuas_xt360n zJ67&x*3{diK#gdqtE<0tNl#3F_W$alY4_X?xAKzO$4}h8UhMu$piZGtlCD7j07#+! z-xB4G|GyEa|C0s!-yu$a{)u9y{y!6^e_*&7JDD2(_)nDCf1ynW|DjEPjjBr0cIyl% z8)qm%oz(>ck#rrDD%vg)WUe@)k$DstTAsf(N0JDX?4pSTPJeBh#EZhuP!|d6g1oe- z=h-cYQ~r*Rmgw?e&hjwIF1m?ZZ4BYvBWggEAiZD!F6o(a%6~?o87E^JZAADJHatTz zB_KqGi`H*m3d@{fHYyI0T+|rS&k@eV2P~+Ofg~anH^_)PmL`aSAKqx<})zN&agpo_65vYMoGxPT-idUvd z<1SbTk;Wg>ndUpJrn!R17kskbct$ z@_-DGl5zNr{k%SAwjsiU;@hq929#mtv7mR5^pnNzh`T*0ew5U~Ct0G-Id+ll-P^LO z2xl5Phi0u|nl4my(p%x}Q*EbLo<~Z?1HX`vk4mL0t?fTvJp5RgAJ;{;HNvR#btGXs z=EZ*dM_9bNf4WHxo0Lh*Y3!NQ#KWi^E_Ahq=uQ>rfpS=fV}_ht@BGn@s$z?06-r2AB*~*XS312tf>FH z6Z_v$)0h8L)5`y|nznZ^wWBq&v@xZ%v$r#Kw{-qtYWL&6sORhdsOP`NWF_esWJZL| zC(0@l>0!l`&Pb+RVgn(vQ7FQ3$7K>RyXHeD_IV)*2uC=zZxBEu#*72lu~7w~W*6Mgi_F)rnroJ_BYc=hL1&o1k$|20z5H&(L6~;E9`@vifZ1+z!4*hOW zRE1y6bga~!cD+m|IK*OrMDhdvMeYDFBiXJ7zd-#Fuu|ueL*Wgq#BZCKo~ zQEh%{=+X>&@_8m1IMGfmoG#uf@%TO(amInuZz}$2m?qjjdr1s}DXOrQ22K@RRx7Ge zS}^18UW4mM1;>(^hnDvmNRyI?yy_{Pd4BlfGP>d0Dj_%ZiEX~|WkSIs`O>2Bw@Foi zD@xp@P?&{8e9DMhxa&s6QM}JIl+bOewbY+WX-oP+D`}k-< zNtbKy8GkO^9g~Vhjk$mrmy#p*!v2?V0>eI|bpiqa?0?spf;8~=jsoKQ^Ut$O?_XA9 z|DB2U@2Iccf2uFl|5<&Rx_|H9Ebabp(9i$p-Q3cDRM=mmkD9JMmN<&fv3gWist8ab zhsQ1UAWOZK@$isRVH*}3L+?5r^qOv#hAJrzxubGvzDH!m?}}Gw1~$VBfKTYgud?GU z&910Sbk|n5$Enui94~Xb@V2`JsSEnzg~&GJRl70k7JpsU@`^(()I(Av%H3rwJ;_n? z--Rinp2O-nxxaB9h&l@%O*bn)@}&IfpHk;iXvcCoYjq44&wz3gZa-K!sm5UE{BMEz zb(_z|>UBwdP+3mzHAiogb04u?^A0viIkn<^mmF|3*MO-cDNM`NhSZ}=e`6EiT(r0w zsNxcUSg3o96M?}?qgtm9k^srLj6bP*Xrgq4NRilWBE@2laZCK^ez3f^UWkBu5C|30 zKmFZ>qKF);%p0Y*w;HXN@X=@|9y*)9!qi?Biy>4dLusKQw^tg301dX)*PtMSj8L2fP!@3_og=Rh-cdKUCdQ)0!|>pt>GBq1OA% zTM1-_h4Z+Dl!;SHMZ4@*!=qLCg+WX|B}5-lR?Pj%>>E#{_ABV}jL!Yfsq+WqPzm0t zuMz`%wmV|C;UodqtWUmIo9qEheMxw&ko(#!Hm=we=%1*VdsOFe+viFJH`rEQjJ`iB zL5u^&^ghA*YkoZwje$Tx8oVSDC;<+x01><(O_4Z!195a9DZvo@7=;}OAYoK3EoVr$ zvtBkEi@48iNgISl*%^oT@Ykd68-w-Pb)CV9sG6L}$byPbN52P>- zLhzGBuBU$c}BE@QA<1(jmS;tNITfl1Mbu2m=9dycryjt?B#7p zbvsJyIG)7MfnV|pGs#wqBAxie-NB2)M#G2$75`kA#ubZ3U=;L2;(Ydtp%Gujgc4I~ z^C_ihnI>awoeEhboR%HfmphxXLCz*2uke-4Q~;k)5TPAG8M?s2+A1*;0-dEkX9F-U zYKp`L2O|G6aHPUl5_QgjL^8_#5Z6hMJmW!F#l`bZqb}e$0x4|XEn7bVl)`X@$0+}# zMdDpH&Y_eG8hDCnz>ArOE!EDVNbiA4&s<_}e>kbPEDLa!ja@dgB}cMle8sa7txK2M#kgm@~sdpLBOcB^#zEVrYe;5v;inm=c~_cXvcQpnC4o(>)pA8Of_ zOxTo1s%&`};zJ$zn)b6V@jV)tz3> zkzX9B8(%EW+vuHN`j!$WqZhpmGkZyVkF2lTF4U{@ewBJ}G;d~9eggj`#>0adWPd;b z01ROMQH=jtiVXf`V*KAzrGJMU|MU5(*8fb7|CjUS|8@IrFzdK>Q@X?O_#&CbV z`9=)!NQSUfSgWW0`~Z(o)1=>9mtsPL9?v`FG8!PXOdytSXEYdJ#Rx~IHn~GOS58Rn z7&EqJrPjVx-|;T|DnBJ#C25z8G2_4*MX?D#=Tdb!)$w(ab5Xr{;+IaKEqtw+{iU6n zSZya=8Tm9Ky2$L70c;ND#p^cvV=Yjx)TMr1$+p>rQ02t!(Q}B^yYWz{NgDrAx7JUx zY2!n>+u;doQ|~x8&#BunR!3=a;4$M#hg)&e4v2K<;Vo6DH^v&C4pzr+rhCEGRkw20 zHM$G?+(o#lN99Y&55C2MU=9OO=hmxQt$#yt(v_HDodFlR>G4M+@6RKl*md{?J8JXB z=4HEfy&VKT*o=12r*;K$o~&QV{OSyPivbDS{p`;<&6pImU0;#b(faz~CWg;mZH$y1 zP9LZ1-EAHhr<3rt`q+x+_bN|vgbS53o3*v?OgxyVff85#0}FYpmh58Z8!aA(uak(P z@)tcTk4Er8=!3B`qV85+_Bt)KszIg*Zjfb^hV>9%^#!F@iX)-)xIgzPjiVMVfUgUf6Iy-J#qI-V6t@PWxxN6!`q#+ zRaej*8!IRU7(8}&+Yi*z8_tH$zpIPG8>E2uod@QGAc`&t2vq_`%Lk_$7X>B$tQ(BX z|6I}Ok}d7UwRs+YgReXL?$$i+N%`3iU&|e-1+pMePtbYv!obg$HsbNkC_RO2(%KOFS1nV_RpXALc4-x_!I>k^dx!V91Z6FoX==cAY-2Z$pH$5 zq&*r22>L>^jakiQz5TU9^r3z*w1-sQOz+xB^S+D&Vt#p^fgz{-7MV8;U-W77W$A$h zHylwnGl8E4oITsI1&bn6cw(Hsz)?I=#=sTi*A(}UgV&B0pK6&=$v%T1wXM5g9?f5% zEWL6-{qp0l>)@Z=6YDigU%@0}KvYMUiq9fI(IAdVDkYyG z<|;xg@dgF-1xdG5H_CLU&$KHx>3mPgp!bjvmfhEy2s3W2UKhuBARAL&m+;8#?pQn! zo>5Z_Xyh<-W$ah9scK55vhrqCn3FXUGsowgW==z)-#ONP0=?GZ1hDkq?o#CfvW4Z_WDR zCED)a$!iRO1H0{>H9uDM$j4fS57`#WD3gc-{|=4^6bY0}I``_f8ZjNAfNoLHCA{Am z29)TQa$2U5WknA#47m-g2mY`%(E=Rp`Uyu==Bqv8>e;i;cWjnfP(`y)4;PsEp}`aD zjY{G3OyBcztWYa3aWSisF`c$=$@X=6Ue;0x=7!}ne-bhm%ZDd>1MlhrUI4uKTeePr z89un40+RVPi|n`2YMHAv@6QvT3MlK1mdDHFC%ey6tNquvE1h=5ANUa#`)gk8wO@~c zPks+ulef-u&x1|yHJwk9)>pb8w)?5ewcgjRtpEE$9{AG>+@S9#?cSe?kgb^rau?0JOoycZi_t|qvDw0fE4TslWKlQ zu(-T3K~lhO{6i89`Nw9u$l5afNEnVm#Za7In`MU?1az^lw~%A2ArYO(B6E>pdIJY! zW~r90>5)!Zpz&t>AVx1cL4zw)0rZ~5Goof$ZDm<5*Qs-G#Ym+SQC975x){9o%Ggv# zjHW&>^}vJjk2+Vqo+3KW0@DxN)tx=PD;Pq%0E@k#~YgK*&6K9U%od zM-zFqsH8m?`%aCzKJ~i8aAF&ist*=l_vp%zl}`aMvpeOK4rG8TES)1;FDkc zUUQN3n|?d;c{VpEFOrn>TUZz@I!?ME|0y?G%IhFV0qoNv0t?nzvK0vKUj{8V!!l{t zQ(LquXZ9VmgTt?nCm>Qi;!CRmnra7kTV)?F73lv%bvINXYSbp&8a(s(@Hmc-4VFV% zzUc}~HYK8s_ZYC>r4-i|F7*X)mZhx*R_xxOL=7K-?&o~bBugglRawzQm@UwDD`#iv z7B%WQ5Cs@v3QqnxWh=I|OnOfYu+j)k(~x^D=Yv#fnpv7j)JPKafNn+kSdmkfq;!0| zoDq346{O?bkGjx9A$a#XCeym%up?zOPFd!CEghNUnDcT*#$Pz3&nW5bS26>!LwTi9 z(Br^QneCIBF2Pal+YqNg$9he#b`>(sTy3-6g+zaxE1G_&7^QenWhrWDW>^v-_6ioP zT_*tqi}hhs3-07V`*#$u9VSdd^to^sr`xtML`?uku!F%H1?|=lp7-7~>S_f4@LvbzSqB{%={1WfDefUOsIho0sXWKI-*B=`yBAuS$A-0% zxzW5iX;dsGCMXOcFr=hOVQRra?jKmH2<{`=9xG3~QtHh%~cUH+*7 zQ;lD*0Tm;pR7eSW-nW5C_Cu_SbijOqIV>zJUd^n}6bl+AuOwa#3VWX^-L#TGEqQ=? zry|5ANOcwrO(-d;QV>OpS;SPvp+t6!(I7@-N|U71AVQhCDisQ`mLW8}hmo*MDtZ)S zF2%}R5M0ZK;8ay;VbNRlauHCaSAdoWQ3qE305*txKRUE0Oh``*wSJ9CKAdR+gSt#m zPCB^$8dDU(`I{C&gE}Q?s40bT=Zor|k?ID@p^9XiX9+Az4kGIY7Wj;?QY&5tPnd9Z zzs7zQgmUdk!e?aX!PH7@I4p@rEvASck#AKc?Z~@y!)ky#bT-Uo&nZtS6cvbV6jU|M zM3_X_Cl!+oY|{^5gJV>mq&P}59(A=gP+${G_trxZgyt6K# zid&LR^=bG6=RFgDV0L+G;G_?q6ZE-X%+nUu5HlsFG|V5FYmk#T9VyD_08urJtBNP3 zZ#Bx4MwM?c2GO2X3&IcDR8OqiG{_o+zvFTz)}%a<^57Xn(zfhiND=`jXl?{qNI59H zkWQMFNJj&hk{{40h!3_7@AZggiQ zsMM2UpH)Fj9(}A#hd)VDmXj#LYf_;kJa0!AK~@3C5j%0n8R8Ph5Xm_^BT14PcK{zq zGwj9YNG+s6s(v|76ZZmQ=ICPg+^l|uqldniB}J)(MVc^(I0wThY8dTvIHXv|C`~A= zDM7M`u{13VrUWMZ5Nt#aV}$SG{t`^OWdSx22(Q;@2p+pQ^a0{2GvGB4@&?hkU5?(y z7yujEP`k{dezD^WsV7lwL~}aV;5`+O{Ie3nlGe(MHE;A(5SeM%g`~&(qmJ^IXxuTA z9nWBnhMf>kpW~QvpJob?smKtm*pLV02?O~MQ*ClktPpiG0voz?CrpMkkkyzZliU(2n-;6XRvgL3Yt;ehmNdspTKcl$dvk!e@urrsM%QqUSV2~I_bE5W(v>1d6OA?vlP?ivVW0D zCrbx6T9!DT3ZKHRnlBJ*>7%!=8mUPA#|9QHBc2OaE;4P#!R-&!8J1uEt1j0bber!nu z8LaZgzX;V_f~@&Sh7ifP6Zlb%;h=MCQe#2ED9cz~f*q_hkRge?ADwn9{##cx5VyX_ zmiAGU`uq!-xV`c0zZ_o30&;qVn2(sK_j7o{O~_b#@qiGiVNA>G)lB0)pnx#l?hOj&m0K1)!jO@8_RG2whvmGVY=IStb@-slg5 zmQfyN7KLO-I5=5g7FV)kl%KErkp}{@0)%K(tez3Nj4eWRh$_LozOzNWKD6i0y=Y73 z&xE;|q6EvcNWMQ_rmX4*Wp6RLuKb&zS7$f{S+o5R1Q*;^prjL=xX#}u)KV%e=qqcY zWmbnqS0x564wxJ<58BUN#f8DXw70*aOy4B6QA1jqTD3Pn6&iXm0F znVdmQmJDI5GXNwIkFT|qJSI<`vCBH=Br;2;&4`13*ik zQ!e3%SB^(D!4fd}lZ>IcNrs{;)Xc-UHTJ<8!SY(%St+th{sJOIZj_@MMwBL0JQU#7 zaDuTs%4i=gDncnkDGs4Rnvg~yNHY=@WyutpQzw|pB_XtH9k855o=t;#5^7~!hnmP8;SZqjPj0HH7vW~g3eGgL_Sx=8>t z3-_SZrUJQw7g^!#U=_1_zsj|D!L6iR4-7iI>3I{X@aVPyOJ94WX3d^;Ooxf%8-x1AfM%#% zvh5}McqDs$U%YW}&N}3=fG6=BGdBGWJDncE3ip_<6%Fc6ipVVrb%Zi8>oCvawT2dX zUyY&-DbG|95{?qJB;{?Rw6MKa$4`n9sXY{JbEZs6gG4IpDq*q0C=57A?bEmdI6Nh5 z%-i%v4Z`yH1Mx_7G>+c!0T}X%m0X1hhSCsb6n30t9CpX=V0zh&>$PFnmmfZAfuKw- zKHJy`G#ZJHvDsrC#^t*~3Zmg=l<(3QBxE8UyC@TQDjp`x;V?IAriS)#jSC&Sy+TLD zN&y6=hGd|UCS-KxROwtWaYe9Fq(7B2N*DmSrNY@a8daVbm_srfY@BA|H^*9d+5a(QYRlUy}%xd~fx zpRk%yitidGF!cHL_qu%kfIQ#uvysxyDMTXkSJ0*_CUevm=psqO)W7jubPdGu&}w$-uQ2=IB(_I z`;wD`w;NJ;<|VCKt^(*^w0QHrFo?SvX4 z!sLnVk`(3x{uTNhn|4^MF1<8aCm(4l}4oiaqe+y{1Z4&XAbeiSNJ!^Tf3 zRmPHIG9lTbBDxM2*gHeTvvY6=3>5Db1m1Y4{CTO?zGujKv^x~N-Szf#)ji+hd3f~Q z3-WbX5vGoRxA;-A7O>!k>!z>>{2fr&GnqwEC}S{8c$A=N6@8=Ue3~rBILR=I0cegG zCY&R!isl{u_gxzJPnHYZ$UM`GTRUccZyZMRu6a#U98jhYfRA3{u0N{J`0aDo_)JE)Pq_I z0)<3U6VF~k-Bhu&iqsbc=gBXo3|!q4Z?8*_d(77p&5M%@oIM8T42PUWkB`k;&VE>% zdMWWlZ5d`|p0roDeQ;;11{r6XT_g591Q!*4L1vxrBcZ$D2)yCW++e6ZdLriC1~?y+ z7jZU@UX_MASXY*LQ13ieSG%hlKl51CA?Dg_D_8SAtp=}-adtfj2OD@3bE22qUG=&O zI{4O@?Gk=C=@*)>8=p)pQ`g+ks#D|9RwPFj>QMSIl{2qv=xu>Fk$&+YP3WDo(Z5*S z{@M3vJ?N%TyrlO7y0ZlsbpRYfNzIM6AzqWZ{4jmvZGbL^81ku$nw`EF1ZU6Nw$!_u zefQR)iT1W&?vH?prgVOcuy;<%whOPDuP%n(jG~P6JNBYaufMt%(?Gq1)%}xus=SC3 zRpuNrjT*qIPkCM6xRl=~bH$5JMsGeX+vw;Ei4VZd+MHQ16#c~C;rpPqf4Yv}^%VP^ zkw}y4OxN9ajofMT9DZ6bow4pX165zz+PK^W-B{-G)NE$|G%+p)>4Z2V=wNy&2hPVC z5Nu!vZ?-Q>@uU^%bhEwJ`K(siw61XRS=xF9`;`Ubhtq}eeGWT#y>lJeAKFjej~^mm zVe|_GN)P6X%bU+T9_9(Y8_yT~*S2tVXsDk|-s{u#Lwi3x{MV0X`+i^xqi2{Azp!fl z(1K%uCl@9jh@!X9*bw<$<3CVZL0XVAI6cdO*Sn5P-he7Ivkv?$_qxwei`_v(IrzRl z&!HU`$MNgt@n`Rj2YaAA8{jlppQf5$0zu7{$omIIOz-$*FDP7o-p}}<@bu)()DZT< zfiq4!JB;sdwFJ@A{*&Z0%jlu80>46YLkV$%W`mXTfWieUWA~c_1BjeHmU~Fzc%`N` z@pR`r-rilO#&ZR?v@AM551+zqWiPy-_Vxbj%Ww5&PcQXJ$TBD@d>L`%{5snIjM0vmNS8gn}B{rK*3&j2~^9SRYgh{}bBblXHO@!MQz*@b~LCShnIR55?+m`Te0J zptkzx;Bfw}yJhM5A-NpjhdetOhHV9ljE4)e}tZM^|{Co~mcO}zJY!IVC#Q;K3i5Al$LhG22 zHveYmcqpecCxY?|)XPjuN1KGlPik2dr=z6HXxxA?(^s?EO(J7{pFv~$1{&L?p<v*3<*1 zYYe8W$60khsD0#Ux%nAB#63R<1EZJZc0Vi?r(t!ocJlF1c~P51O+Jh1LA9n1f=dR_{79__bgjOB4VJjJG`9Gj!z)Kd}SJA*-s@!@;J(bp;V zBwT=>J<{&q+UQ_2enLIe-Z7U2Lv}_Ryhwv4r3#NsO;O7Z>cyGh&7esWYZJU{E-ju( zhmBu}1LuBC075N}ITQ6HTX?LZ31`pTj6Th=W8|(=96SiYIW&TaLX)G;V<%#B&W?p@ z+K%hoTtT_rfxmU7hWY^R)mHQLxfeev=zv*-roAX8X|5od+|@a|fVrRo+GltF1MGo? zf7*882ibxOrtN^b7_q6$ASSdvS@6^0M-5i48!Wwy`L<|qG&q7U`h^OKRQ>8)VQeKf z#gpo+)Op*+Sb$2t*5m;_|?U~xnBu6{)DNJg{ZJoM-{H5xsE z`u4ax^P+%FFs8Wjc|<1SZO)D<^$(q#3pzMVPts$TdvAJN9|Me*6$ zBVO61z1rJ(IvhlA>a8yPB*z+udDOzqv%O;R9XBX5d2)XANrVj=2mOx|<7FGE98ruGfdlVqR|Y(rygYU$|ii&mDVms507 zR}aPw41Q$=$0~l_Aci^$dM9*`cru$13_d0v9kMmAzQeQgMpxrh)F9eaQ7zR0FSV|X zMw3#mmN?1lntEKu88BQnFyC1H#6S6BQo$I(P_j-+{<|e2yM#1aQg>ej-^SXL2)~=~;7IYYM8(mX^$2HbZ zgj^Oq8!H>Z<>WL{b0>_^>?%)OxkDGx9c?Qciil?A1izd{inCV>J8#H=Mw`Ogm+gET zQbQGQ#$pRYt)Ky$;pENRb%8UM{15Bf^}v!{9GuT%Qg?R7@3k>0P%jxA+I4$=&z?Pd zEBg>v^|J9PM%S%3a60TB(58Lp?d!d4{P{y+HamB~aJ|@c{C*u6jsmZcq(+M+)dxOe*V;d`T&ASb(DT$jL_N1))RG=^cvvad?kfVMz=+b zJ|57mfrHV70VgTbH&7kl!*h=+P|DeQ$Kr|{3)zREvN11@AW2W;iI|v~rdzUlIOh|j z&D%8pr`>l(zc;K7LtFG(v=*gpBuW`Qxe@MDX_tMPRBrX4HIz;(ObDyozjc7#-p zPK)lSMWKTkc~6rg&!Nc-Vx98rM?pUyHO3Ire#^B~h?dVD^V(kqTiaxf^>;V8J}~?;gpS(>oq(P)yY{5u{KLK|!tU)TNzPyw z{MY$82!_;aVF}%lIyL!Dr{w22?agoM)F5g1Oe~pB{IEUIUnQ%spSX5O8LbY=l~UpxOIsMMMh2H#Wh|8`)9#Q~H7%D= z-wCltOy!8c*6mY2+5%N;*=Vh*y-}?M@o9LEN|k@>iE{35>8Q*^`RUpiO>vgoK<(X7 zZh{3N#2E{RdE%D@TYW!R`xz>VCD+&`2@PmC0Thz)%LS^DQ~M<>$%aecY9)^kT5V9p zO2GKu})C%@kJ}2dQ^qJ&btoNpr9E_6DB`6LU&gN+|nDr?Lxs3R}PO%u4 zrer!L^*sPHSeC_gjC6^bzqwwQ&Z>Ys(UD>u*tM3S9JITVyoma^zL&P?hd$dO5c9Pn z9AICmgDlZG=n{^mKF@N58z|>A5M1PdiiNZ&Lfdjzv>zpdV0O|;_8=Q*=;FDsb)8x_ z(%h{urM^Zccu?c~EDio^wBHWa&txN;aw0YDLrTREOk+^i5zBH0G`>OzBSQdZWO38MU^xPRRzD9+-oJi=Aco;1D%*sO{;Oo%Ms>;6B5E@ zp#8H(42-_rtYk?E^*jXSY$IW%9@l7A@6obULsj6?AhoGtY#RPd4ZgNJKghIh*k6mg zcjZQ$V&uVxcfed*T6Y@-`<4E;5hA+_c{tc7O{_tt8eBO2&?@2$s`Oq}D;}U6Hm& zXsEJz$mE~3!N%`ev_cMFf@9Tz#(%(3%E6};m*5}{cA8Plizr-shpkcgyJtx5bAoKf zFod_t$&M8z!|n0-(+upfIg1A!f<{yd9u2aJ?dX_W)^1Bdvcc79Fhmz8QBEpBRELv? zVC>fif7KgO#`0T9S0&33MRN{{m@w!{(Xi*~6nsNkacX`-r?{452LbE@wBzvGB;nBs zpKYVK@TIA68cl4Tq;u2R1VZor_`AcE;1ESx6`94~+rq49?B4fV!zH`5#sGZ29d3}xTIiIpUWW1{s~AJ@lC+E!`pw&o2NSQyB(xl@ew0>QSXbrCpm0%dFQr9$?43f3Uu0 zTTu{7N{t3_sUn+FWUdr7rM#uCdCl?9^n-5xcjgzbykUauU*?x-hs1vhKzHY_!|(YdXPVISD?l=9AcUSy6zDszqzf{Is&r@KB1_H;0hP4LmB2v zCw1#H5IxqTt@(3KC*cDb2w8^m<%wj>LyQ1PsC8bgYhyc|-%l?8>7+JWBO_o0Qzm6g zBEXl0aCRyrAQpQj#uT{}@&z4g3p+ zQD9WAA|L7KSgaHs$4tHHLg)hc12@ky*lVX$ZbLg+NvyGsZHFMNc>+TwX*b<*rMO&y zNSLNy1!*#?M~5?ADV6glBOrz9;;fT_P5E`8(y5@kvPyY`j;b3MDnAq#+4If^HoLj~ z^Y{Brj@RSrIPgB^N?1$p(QLDN@FcgYx>pAdi#i)?^aQj%>|F8N-IljW$+tyDNG9}c zk@-aDWBrWyyG0ha5OkANxDzZR)M3hOs1)`)O@6de_=xIo8L;s`4KlQ~5ch0~5KaK5 z9w!Y6b`Xzg=2}#dGXTjP%JV20W-ZK?TqK6C+cmJ%L|D4mOmATa4`fFAA=4x-p!{0K zDX2h3X~GPWpN1Mv=ix+}ExoWtl1E9zAW+H>yzx6~LZpLKKIiAVx7Iie_70rnD?3hG z2d|g9n|3T27e{%sEsJt=pWPMhF3sZLCvVUaME7heUxHq~Z^w$hfh3yVmZxd!>=ao~Cv9R^BPX-F9GSN|7r?-boj z+im+MGq!Ep){Jdu#&+_LZF9!9ZF|PHZQD-ve808YKC6A_>~=2JYHim|)ibJ9T|F07 z{Wp3aRVre1!$fjs8P znMNauVVPLRn2{ry`4(enu6@P4`(XwFoJ&J*w4#vu8Fmb{r6D*c#?rie4 z0adG*3J+U~Ov1}(3B8UL=W8?ES;xY5W7|vMsm^wYnv#ifxFXTw zu_eEl>lT&NJzrle;mB*lYmU&Kum?1T+0JF7n!@XfQ&;{je%IXz967^OQu{<*l%Q$+ z`u{*^h5tfmIsXqrGb3wQ_z(f9n2;_46_gW>0!AK_(OytzcK$m894Ao$@t1NpGXVn1Wfj;42jqE5|9<%08o?uhq-WWf`&88_ zUfereI7;%W*sHp@|FSr}&7ThsO~zx;)DsxMokL~WbxwwcL6lI+hNh1t()I}9R166C zCP@RJiwl71}*9aU1xsFXW4k=P!)&d#p57SrqOe%~oP{6H~5%2((Uf%cUe1V`7ab9tO z$j3cEz-F-K_XYky;VZ{a&5t6H1948%?>T7N#?qQ}wb7u-F)w4x=IQ`C9bgeW9C zWB*oZHq~D@j^uQrV%*_)K$c0<^Z`TEZyl2#O3CIbNp9;K7Bq;fir8Q~AX++L)*WLT zsyw$Ln0BLG8%uxqo29?%bY6yCdb)?q)o!K()61_qFBU-?MBu zw>Q=EQQ?aLh^HqXHq|!2vZko}>SS47Aj#ukB*ni`T2F_`=&v|aU9S9o57#y=M>3{j zWb*J6O{U5E@bd*}X^Bp18C|oUT`&aE#iWmhTJvMAB zc-HSA+D3Zl>TxjP3>B- z(Y>2Jm>s@%81<#7+tB+0&G!Rp*rl$gqUXn16>Ch|cprcAG{#UuntIpA3g*`fN3a#> zneRL*cztcuzlOM| z$tge57s+Drsz#i6mGY0tYJx{I^|)?hJmm7UO^?2pegRtf^&$=Z@2$`IJa8$~LMhYw zh z0!kcUT4(f!ucQWCBTx_;Da%@j&U5c%`&*GF_ zNPVoD^D=mlu<0@-SU+T8bj7`8$3U^4O+{`2IWt6E87grrooQ>g(3(V_NB$#d&qBcn z+^f7AQWq+VdM-+hb)>rUa_mVO9d=u3MqNxaYh(z@jhe<&OqPW5J&)?D%y^Zc`8Wn` ze}Gz=w_%_=H;4FQ{lx!?gAbcSdNUoli_lN7dwu*DVjhPgAoR$=_wasL{vDS257_j6 z`6%fR9kuH@!yDaRB#^}By0`awn9~AewPpwU65DOK7m6a2$PYpD+$aD~ztP zwl=XUsuD4g{^gD{Dt71|T~OM27Mi@Ae`iuN#J*zJ3}<4?@qh$ta`t{94YYXKe3!yR zf&Yj5y8pb)v)VoY%BW+0UA5}yn(%^ub)# zwAn@z?f00~F^@pnay3k;^ut)FuGGOfTscRxmSSVwrsaB7dv@NI(<#-!E6#lta3QQ5t~DKG>qE^v*tb>H!gYDL<*;-sL4#;WN!uPF&K+n{Y!9W}|T zvaqNSFyIyEx7;W_7tdF71`>na28Lwaf8Ra3c?^GTlP4bZSz1 zkycj-<)IvTBtf2-H`n=OtEaxm`5#(z(s*b1=vZ-Ie&v>=UkdK)Hq1vrh#$pyS$=Rk$&HQQ!Flt95&M zyy40H#JA+*{V@8m*b`c_JxKJS^=TLS-}W~N-buef5O?Z$BmQhlh5d%G{24s;H<5IB zw|{)}61s1FhOiNr(+&3fi$-GKQU4z5;c;-61o3kB*gyipz$p*4RKRfNZ2#plH#bcC zn~f35I40h)MYW}4^YQ_rWg2kY`GIxtiTbr2ik=N>8*q}VKBMj6>7{Y%61(_3^Mm!x z_{FAL@rC#5@|QjfGjKi_6+#bGQ9nT74?NxRAB~kg-aFsp zotKuMdJ_4xxrSHx!Sa4u;{U^Drej#s!?E((VhWZe6;>=!rx!|zeZtne`&rDpfV$BS zOoHw(Q}?Tcp5Env~vSV7aj$1RYSkQ8x~;sO3J1zP{l72u7n- zpki;^_th+O+M~|-5x!BvYcW4)Y3qRM{9@{GFeeM3IDo@^qRL-+$GoHr7;`xTDEdp9 zV(ni_w5PuDqF{+A;OU>)?a^?6QvLp z(C!F12hRi&KoEXXkLonAE^0%DV2vRR!9TRzIzdW2fjJ=xKCTNj&x7DUb8)PrnwaGM zcE;Se7~XR~s1P{q_XVEf5A^^uv<0Y6Rl-c!ID2MoUR@OO_~6I%PeHg6J)CbiU-}fR z+H#t^V#HtGP-jnt@?YuBw>SH{72jL|=j+ZR((rq@c*t zV;n_$UXlmN*!xrKPC9go))iUo=SSHkCn=9WU=(>!j7?F8Z{-J_h@|}@3gm%jfJw=R zcExSoq&GGyfa{xdD-kET&@lJP$KLhQb=>LuWn$OTHPp45&`@AhENYb?T%q-B=PrBP zkkrtbPu8_;y&3_^0D8TP5BLgCL9USgb_KY`{W))F;skB}V-qhM z&J>zS##P_++i&BL&Ycs~UA|lB$_@v#wZjYi6{qM8Ayl?LqmY$kxS7+{YPvRJ@t;F= z^I-b=%3@8|5Bg$ocPp;BMarwu*Y-->9{Xy)ae_hZS7!3y7nYc$J9vtahru;cTiwW# zyI&Wj9An$-&HInzK_aP}^?ruiwwAF5-#>!C+>VckBAOUurtQn~7NtO>{37>a5#{pI z`jIhA>{}z$Im4AN&|0-?Mr=fy_G&eT$)23%D=^^;oa5bku_BaXN-w~ELAq9XE5HrJ zp(D`GFdJANowE*d%_4Ru-6A)POSgt$fc2!w^t~Q*F!bE{yr$O2 zUDbHkkbmv1m*{!u@$vb5Jx_PPKb_u2Mx3*XSFqS_QOq1L5ctYgs~iwYPxo4uMl~!{ zsCd|ayu8{E#uX@^Y^OKZ?<~g~pXN2X^|w1e=BR&rK88N`w7q>UPG5hYp7rd$_vn1S zp8Z`so|#={?C+atW>@tNtSu5$f4zLQXj(DG=oZz?d0(E_{B9B!o6{{?TlCfby!!0v z{HBBa++Unl_g$*?srghm=p};99fosa3>*ehwIj>gL@|&;(eEmNLkf z@3v~ZVMUQj^>d2M=m-^(64v|J1K)V=k30yG5es54qVIXj(~hRbpSM5nbzJB0zm9p{ zO+L$iKY^uy`06TAXy)brF`gLricaeo97Im)#hQ<7ZpGL`9+XskUz05%-q74@SwN`y z!n1y7Auy`id#i|$-F>u9cM}c2Lk`8y&zISBdUCefW{iP*A4w;e)Sjg>utXoQO6#^Y z$0TBo{)8m*-iBvf6XzVbfw-%?qJaz<+^FF^*>u1NnL4lBLi9U42EgSY9t0uQkH zLUV488p;VLf$#{DrQ356j(eb)-G!9lrOqK@ihep3=1zYmKH`;03@Y|(5PNrl(o8Lp zm?6u^Y2`pUveiMm9!=E6w@zq7-oHP+g-V~g)i%R0^2G+%kL8fk8;(_Y8ElVw7%2#w zU;0!4J0H82(w!!=&m2)6>6%(!Gcfe1X<;ybb2x%{3u7pk3#YQ=q)b3Vh}17P81#CN z1OX-I{dJ-@?^3I{&F_1E&Tk^V3qd|xC<^uo8x9S&Qjll%>_0~5XSG|W4GV596~+~;jK3# zZvH!vWMH;4$cfn=G){5Gl-5|OXk_7R>lwkI33 z-?zc#In822c8&$97D&<(&ehj0&QebNaLGs%`cb+!bO9$_${n**M?i+1@D zBl&Q`c{3;YHyUU%LV_2&D;*!}(Z~`;x5ad3njG(zuEr55a;?M}c$40vLzQW?La2PeX0jQch?tVdL>qiQXF%=#~g zxti_%uoYr|Yc*V^h;@^#JHHRpsZ8XXxTTWm`4GZu|1ncN)17xQ&GkH6kysndImgQ& zw?B7(g~1t)Z~pFE#ux140DecbjKGUcZRD$C>TX|1MtDeu@>)oqX|89^AU~3PY<&M-Is~$K4WR^#K$GbbHfncj>=UXt!y^PJLFb*yRg$PjFoMijr4_D|{o}loAjG zLcaS2LO151*oa<&yov42pwvh`RUiNS31`!!bSjY#y~r39ct-|1OG0-)ie6K?GXz0H zrGH(lamkRX#!SL{^6;SJ9qgrhE1ROe!&V76c|a9I6cjK{e8+>s=d~PPsa4=&NFyA& zjGNkwG2mwMj0X(F;+0VZEJ)85^X}LuAQ#=lJ-ONk1x6C~GK^f$CYx^OFom}m9C8|B zTk3hu&fV?|-nvd_dp{m3&bwt8Ac5~KZgHE`Gw5FO1>{&8CB&7!Fhnp1QXw%jcZrC{ zvOE2bXX{Qp0X6kqRy@1C-v{LQd`gtlA=0b9u~#?igqM1y7sOgp8dZ6ss_J+w&*=JO zRF)_W>3EVpkNMDCm@-G7?9)xRRuI;<$R? zku+PJIzru(?rv*zs$WnQEY42xVt|2N(_aHt#3s?AvtU#S_-)9wQLd@}}Eg(uYaN z*e#qEGZ(ksr5c{N(w15$s9THebAQ3289txbB`MhvSaJdPyUIc<;*99lEe{1uwcwv08dx3CN@(!?80fGa{=0YR2P9 zG?!2Ut-lmxpLcjlxCE$(BRMrBAeCQ6kxWk47mf*y41slNy^DLu0W$@D42}#e#{^ZS z4WEK>AppOV?s{t|%y3ijF^~N6xdk)uw8MEF9%2?Zyk1lsiVwvys{YL~b&P4|lHkdB zzD>KK?`hkfXOdow-xha;X!3jrx z_ox7pBihh3$&4m51p}lBE?mmlWPXFetOz=YoWJ)2GvaQZ@03xj#6nG=l-f;J*@h~{ zrXAYJ`JQygdF^`{#dBc5!yjSM|%j49fz~+L{pl4d?9#A>c zfU{NUtG>tWlu_&cU1#B}OVaopP~{GCc`NzHWW%s`L$`K8Ui9>?$ddgXHigMxYVG-6)-M8{>dktdm883kUE7IkasIv6EnezwfxK zBkF;LzIYZbbEj!cfsek0mF2o8?CK4ybk57rPLu^%f6Fz$M6;xb3c++v?EYC*!1*Gn zZ1UBu_sOk#9?d`Il%DWhVJFcUf1}d#jNPr#^-gMxw+Vc&1|E@c zsD;{J#gbl}@2a;?{!JFMRYNov*ifr0>?BWgbm6>O2+&pnUu8FY*J(B#uek*S^`SE!LnmW_NzpUW8p6PXv219<-m$hYs(?#Ym`S!==)=HVrL2WaG5NHkJ}MuI$`NSt)DjyI@5&b1J!lfy``#*#QY zuv}RV5dV6k_3dI&;PF1?I291udT`xBB_(m6)s#+X^yo0?+VO?aC1lAHllTLZMQo(P zk23k2_AG}gEEg5mK%U{!6>A9T`_`YG#J1*arbvJSgqE;+%DPBO)q2^2QFcpgs^DMhd58_Bs?nO$dvkr=J7qR=)hbJ7u(dLqv4k%_?WXq>ndNN4Cc z{hn=#RSskkF$*)9bg~Ey-h4TmF??SwOs73(4XI3{_j*`xSXLHgL(#k(Yq^(eFVNXL zq$Xm3sZUS3ykLPHC5RITdgcYTn;u`@YJ*%+%Br=uc*NS=YO7neM_EOhZQcA_UxBHC zN&20irHoY%?cOxb=6^sr%uEj*zq$OkQA&E!5i5WhvqX`cwF&GjZwbV_R0m;BVI6rv z0SDNs6z&I(Wxu$D_tre4b7u8Y(eN{?h-XY-gte(!pox8fMJfRe*Z?6BRKst1gx<2! zwaXo@>emqAejP$B;)?51K+tFC(9Z0W$2bB*S`0NjqxgeN$B^KWxwQE{JZp{7-$B3< zR9!TQv=k?Fctdzj5tU>8a$}^j-e{u$^^9)69+2Cy{+aahjo~wX)FN6VcrmJdgdO zX=m|)s&{RjC2xzoEJ}$4iE1f?bF4MjyQ`L?Wv-w62M#PMaWSQ%;;M(j&aX?i!Vzp6 zbphmqc<7XL4+c-Cpy3&LyNl_+2T6`xqbmFweg1Za<`0aboa!`oN+sY=bdIr)m59)g zB~3@DQ9t}-qFxhGVs)%PJ5`iZ;}sq&YYDO1h^-k|+1Cz~@XQ3T&M_VLc(3qnDNOg* zW(Z#R?^J|J0S^pgwR4VKIL@`XP$?Rm+-gj@SaEu5`)qTun4cy#!WICQuZAs~WH*{XiYvyMd{?vA|CDFL^*&^kX7NxpP5%s_bZc{qA8a&d; zXXiNBcCk)|>!D`7Mx9LKc<>i;grG|DE*_!HlaG5%2%k`1;zdn!jgZ`o{bmw9lIOI@ zCT1~8C1yc!CyBE5xeiL?BQlYfSVd8K`Y)GeL5Y(;3kbkbtVV4V8ro>lT$&}Wh|Sfx zY3eRH`@h9US2vqB$`39CODyeRfB33Y*#vh_2E(e`wS){z9>!2ci6z@9f2w@8i+vUj zJRWrtpgTDlrDp{*vH_Wy=z+nONL=~Zt9i&7RG>7IB4(@dXaT!B5G})K@PIuY+?Dt} z&RV}b7{%RZ@I#5*MTfT_crA-k)P%_TE7HezNE{|@DHC=Ee^g-{W=gl|@@`P=ai#DN z_Q#OpKkb#=dzJ**N}Uu3$tCiG)y9zfJq9xVeUZt*bM&EW+A&=IA9awjz5t9<9g!C) zGqM$1wo+FH_ABP$1c3(!s%4lsp5XJtyAs6LUqK^KRX#!$Js{?fUdS6)#5@lhMaIqv z1uN=nTWyD`Ph0zqopR&nw#n+dDY&?05ZD6n%Cxa63WJFzEeuOBf%M62UaUZRwCZ9m z>Uw)~2qv`46>ySN%l)S|E#HVdow01nm>$iFu`6D~D6+cy0 z_s@)LPau9UpG(37{94fg6?~qsHh!_wz%|PD?06oID^&<1pHmpR103m%ct7 zl*z+2GRpwHG(Lx-804J=SCnt`*+__E5$r1na48-@66igchsx~={HY=++rM?xI%sgc z5VDNpw`ltjYy?|??zhUY(;3G%*nY69BI>Ci{%$f}UTo4g*F`qDTcbw$x2t8?H6&8%cI z$;AO{XN5ym^wcdj&04!}jHSQ$7Z6tyw<1O9PDh^nFEy#haXmE-i}`6H6Ad_R#+E`Y zIQ(*D-QN@&wP=^u)R;TWPCvue@Nmp+jBRE$p4YbDa$kddxm8v!I$xl10H%#Rc6Fm5|XiA4DTk45gGxSyF`%`lnXOmz@& zI{D{MNOcS=kA#KFIvy!ko4G~GiX@2hJk6)knU)(qrUFzhz76A5zWp!wuP(2?|KwEi zI{JC<{GC06RQF$VD*s)LwfY~ErT^Q)?EejM`uyL->Hp?PASVX{BNIAPYk=$j4v}_r zGH`JEKZ??4|0zoUbH4OG|BWLafA#GiA@m*ZrCBwmrGq^TF*AZ4Q&(S@v}UFs1xsDC zsa+=t&rsj!2&-{7h25b$0TlV!^XI3(ShMjf@hjR2z=^n_e55`8!dA()iE>4@o|&12 znfPuztaCBPci&wr9>KYys@bKh%18W08sVmB)=%1d)X5`94?C)(;3==075BE++-ltv z^JxgAOsjZvmVN$EKE#8ubAsn>_YmPBP|bJdoq|rhe+k4Zt%Z-xoPS0q=J_4JP=XIv zw;Afaou{35u7CE%p=WbB%SF8<#Dn!}-8#8w_i(qBZ;pF_2sgSfJYqyJH71qq$c23mU-*IL(|cVgBklfp z1hK67?KT*JFAN?AhUtW{-^}2w8f}v~lIiVy$?{_!12k)!> z-9|=d_Q&VRHpMgrKR#a?@8i{`+}bD8bwDe`GcVyMvbiok-_JJ~FCU2QY`55Fijh0K z#JlAJ-$1~$>$S_Z%j|ECS9yd8Z$5Xh2l?OKyl-Pk@7QB*wkSU7yum@k3bO~Rvm6Q6 zyWeJirW|v1}OCsre%!E)WtzrVn# zYH~?Scd2;a(WyVNlyn92wt@7v$gc4rXBwY}K`44XJA&2BV83A&Al&mn)hWWx`noD! zz0zdpZ9UcS6Z8nz<;A~&t6nUZ0{%u&%G0?vlO>bo-rFsS#iNb03~yV-&IfzC#>39UBdyr< zb*r)+_yB+4@jYeg_qgJA+XZ~I&B4Bxb`w!)RX-zK+ju_1vtCERU$n>pw)tK=Ia(2x zta<|Q#R7F9JczF?*Fm)+R3FbrTNKuo)A04Uc-;47t|4|%3m@I1KusH_U>B&DR6ny^YuIMqFLxyna$DeOJ;>HN?QXYz zUkWCC+ef%t9NNgDo`I?gkTh4R@`lvwX&JRB*+bh8ew`GJd7K7unS9x=jcR9?$bQ~g zl<9R(w12qD;WFHjErpT9`CarX4vq@|*5ToB ztsyB$C+h>;zV^g_^9E5w1=<+0xOk>Aoq4)_oszyTOalLgwo9w;aqwW3lCN-qZ5))S z{c^~Of!7pXJzrno_emD~ED#1pr*~IxLJOT8BX1{_pv^x|_RKW7xDlU`zFSaNJfA8d z_UKDPZWEbncQLwtDrvFxaWcA=8^iwi?2C5t{)ubJ!y655 zlob_zxl2Sa8d&IGjie<7GUOD}0DRl(^TQbHG_=6DwZ0f`%xhQ1!SuYXnp^pf!P!Vl za?Jt^F3_F%tp%4sv#HhS$2({1L4q{oHBq~Cz7G14xb_Wah>L`rCMIhMYY?naMD z(NRjP8upi6-Y20LaMCZ^&su~p_=WisX3}m^$G0+_5dP@Lomow?ESF$^{3mXs@sR~a z>%Fj;A>m`o)dz@qpTo)Q#&~2}MH@IZ89bnQde(cvyb`vDCJTTxsqvbWYY|#>56Uq8 zZlpVWk~imxcXrLmbOSUUzJ^*Th&z_{vYO>q3f-KZobSa0fvmf{+sFb9&&;4yK9^(#8}9glw(?Y zK)glhV&X8V5U6;(=uade@EL`%d>{jovfmb^hPd|l&?r#UwKGEcSap~gv7%g5YhMe8 zq4%P2BG2n`nc>ZmlKoFVS8m;EYomS=_)Rw6$)5g5PBK669$7tW+qKGE0m3|zn__gW zG`Knd$+CEQsx@f>OM|_JbtaN^^2lf7t~F{+>sa2nI}^2|)%0@6?lmLl+UQpJM}(yMoQ<0AgD-Dh#v$YD6trPJwe^ ztV}D%ZhYaL9Td1YhVPH!3JGbya_yXeubl^s7E}4KUR-5G1F?R2LLWu66p3jZov!2+ z=krcH-pE`@RRG(1;IW)BxIp4&y*az?0Xd1&EZQ-T-}H!>UnZT+<_O?qFaAXQ`SfhV zdxd8zs&nT7a*q0k5dr;RHJ-tF?YRlUZ5GP|<3v=NWkws0&n~WW8p1}}O#H8EHfuhE zZsevP{-$R1#7On6!$-o=$!)sOu;pUr1k7o4Zfb%biDPa>AD$Z>wA64v;GPuArmiQcq z%J-8HY;)iw6(y`0a#)Je7Saiyx(GV_p(%_@C@(y0+HfH5p@49K8y*d=Rz5lnMk)Gk zDsX`}AGR>_>DW+tYcMNR_B^CGEF|j349h@xgm+aEK}M{Dm`bV4gts-PA#mVd#0rH_ z7*)!Eilj*-B--jCIzi$2Si;~z?pt6JQ?Q(C%_hKLud)2NE1-%1Z+ekwOJ4I z^HgbpdT-J|ZDGuCbUrAaE!sLnNE;y-w&xcmZ2qHgp5GJ(F`TUiqPU;q9A>$?SYIpHI|zA?{W*$JU<1!oAP``$-OP%p zA=-NigRmBG{!{^_iT*U03dqW$BvhEpYY0Nv;P<>h| zKP|ueB!DVU5krvrg8ndO`=!8zhyAf5u?Nb|7x>{LGBAM7qUaaCy0guFD^JcsItldR znOmM?wTRlvDNL^i_lbNA>J?aUkfQ%78di;RQ873$N+KVe@ z!XI%B6g;rLVOkYtXf|*|g0vYR8S3tTqB99dX~DeI-#)kfjXeX!v7XW{j_rl^Sm!P6 ztcR3Y66?SzNdV|$68my-i-NysA@7;Y#1se&D`Ew%e*gmXZ`RFe;Xsb%jIc?_e_#n9 z;#l4A3+ee!mk@WcCN4&F0Z*ozvj|kI^^e9`ZwiDIf`34l2{4J2l0yFp?gy8qEfR$O z5|0;ZjL?Vdl^SGy0y6~NWegx95xWH+QG+#hnQm?h8uwnO+(Du>eXC9KT#2&tl_&#D zhQ*w&Pi{*FsJAA7f|cBUTWYR_rNebdV%mVqhT$$F0X01Kn^Gns*wdTLAsW{j&b^Vq zg3UQ3!i-BL!PmqRV+3Ua2DaY`m3jFA!H#PRi$zaLI?wuD z(g@>LV&_qo96+-uRT@v?(xky|_T01F%3wRTdbKcsXU_fum#g;;TnD6^?JAk1#Gm7@ zHVFcUi-Key)CeSx7`lT2-W^5MCz=Yu6r}NU&?g9PZwG{WP)LRfjDkr4Nr{rOO0qp* z-lu7i(sDXY%i#PvS?8E^;{`HK;}nrdjxqu&+yc`Oq?cnTQFOl*)jx;J$=vBt$}~LCNY#*8`-W%So=s0HH-i(v@Z-*U6*U`GS(e!$^`I@8gbA zilSChr5`hl`FQ>`lJC+0C1ifca?;qKmjCS}V5~7?iIvP=Kx^rd*72}&fz-t3l@ar@ z!yx!CNa>JCIEZGcO~AvdlC3;F18e~k9wrU|6FNSP_awpl5VuGD)a06ACl&%7onjN>2d|NKQu>bzRDx@XM zNOo}%dsj|r!Mb$R28g}u*{d5{EYuW9q|Ap-lJ+as_?Gwj;+u_o0LgZA*&B@A^11;< zA?Mpqc#-@-Avw_!vA`Wr0kb!+HI9eU3x%abJO-6SCZ0f5$?*x=!9UL#z$`j7Glad2SO4< z1VVu=wnub;tilRroT!z+nyLf$KVf7?{G}YL4Vh;mLEPc6bOKIm@IrA5qEL7`Em-HDdEsdb5B{R9H=3SbVu%%%J3wUA`C#HR1q{N0^Y zEr?4}U9ghBkBUGU~;jyn>j2kxVyGK$%PQ7#xLp3qoH+dc4lYC^7&f zqp2u@NCeJuO2S{r6rD&Y_9G+eP0Ro#Tw!G#JW(KiQ0SGn5Q#t8N&)aqaf7HH}|wlI^Dt4@TKpDH!P z1r3Gn&rSrzx=aa4EXN6ysw5#j*eXDsTO4(HY+gqgv?855Hi?Np+I!?pC8Knqc1&5c-_%7V8g2L=OhKnIArM0~1Z9a3NROGDJqMd&CH6JILk18#pbkKgrBUCc zq`||`f@SQWd-1{2i&|i48^2IqKr0r{+@GP+RqR|kgOqXhhondByKa%U-WCIY#Z=+j z@GDD0o^*1-Vv`gASN|xJpcIKRLI>*16BuG#s|AW>XiUWr`9b8zfhEp_fYqY@g1o(R z-xWmY6#yBd=m!*X`DLSz@`Jssks+AC!0%`Tp>aAqBvgdzEJK23;8Wv;2?nPt#K0L6sH~3`TD@h?(GM7*?UX zF)JKt|4s}FZRz7UQ#4i|Zl64SK`30Z3hFyDP98~wi3D2Q@y4$(nF;qWZ#sQaFiDZQ zO|ss70TMq_BBCi^JLmu)aD7=wcEq-MLRSAgR3;BvGXpRhxQfLio&%yxmsx{F+ukxb zz&`px>sBimpi3(@YQoHmgP6}%87gi_$^vC>B@fF)=`2=Ugh|9Jm~!48GdO-&YBUxT zeGmzXDF$`;X*2kEod+=tLURBVg&b9V1py6R+c4tCg!>;A#2rKyBqU;?d_hfORv--# zX^_C%+hSyF?mv>nNNVK^t|O9^r8^fde>ZJ^bj?4TmL{_e4*I@^o-@!B1>2UH)7KM) zGsWNEARv?!J}fLxPxL7omQhY1=72TeN+Q~iX{dy;(44>s2(KLYvJupH?Lw9_(i26k zVzI>@&{xlaW8M6>H)UJDfo^x=6?}Zl(Z-Kw3*ebN=a|@K&|eQ^q0>?4`aZA4!QWn| z?mKI#^R*YYY1c)a<@mb8eN|}dx0q6DJe#~xyZ z^e2%cEJW6l27wU?c(3~DyKri+ifl*x7N`rCFFaS3;ri4Jjle(t`L^fAct^A8(6dQsa5HXOK>&1XafHjR^xVE-d2?wro9oqfbvH`Xd`)flQ0PMW2^!?h#% zVr;Q1#&*m6();1IDI@2i=}No9<9-Ojwey+p;Q9qDUW=nf4*;C1)A8wBqdkrE1Fzv4 zyRJ|Qhap3_J(jorJEYyH*^D1XT+8Ls@bQ-*E&emf+-n3wI-^#Kn#O-Ox`mj!#5q|K%)3*UIR-@Uj zqh8XcuvU0U7IZYY9zJb}bNr;;?-GuZ>Zm$aT2FG-Pd(?AN^&52Ep>`4!y=`OYh3Hj zE$6^glgd&o8QKJe9d#M@vRq$?Xre5lmb#cwVJQ*UDpL8y2ExZHVXS>2{WMpivhKnO zA&$t4P+oo>snx&@OKdRCK8>f`S!%k*D{d{1tnRvef z{31#Mr^`bqH5A=B({#KHRFcPy4h`?F;#Jl9{RMebclkKL@89wE3v0UEgC4rM8BS-5 z0RN%bl&wPdHw4Jd%iI*B5eXJ2fXtw8R6`zhO5^aBPkV8XgS^C=m~`DYferx zSqa4x3<)(uP1$XZUs>JlH}oHifShq@11j@}E88MA&rYM1Ykc=7yvNI{ug$8r{7O+a zm)JM%_|6ScJ~}W(=MF~$wHh{?8XLWZb7`kgqL<^{m&GJjTY@SnhDk*pNk-QIm0uvTy306YRxN&3m6Klq2 zolJ4#z07@4Ps*q!rtV!pI$ss1`C=;DZQA*Q9tIRE7Vv{PgSdHz4%0*>RVBQ%(zW^8 z81Cnw2Ymyiah|){{tXzq<$9uVIXgv0P&!EHJUb}@b$MwPM(M0r_upju`h;G^BUxh^ z8I-YGc|q1;++jk!>OOMDN~{lb0qbCEs?y1dtJeM(stkMRuLu*FSIU#_1Ek_OYJ!V% z#XIv>n8TFZRZ{W_bOs*Ua)r1}*5c)TRYr>Ymu*Ke zCWOu-+i3L`YOde@rEq#bYM!56^S9k1JkoT+s9Cv0(lAdRpJJm2C~_WiZ*wtlJj=Hu zUl2GFt>_tIY2Zh7JZoK6&mpvoF`UcI)dz1lMXNe_-1*p3F{T|ioj2{#B^tNK9FzAXUq9;y`7!h9t@8<0`5HS zo(p_)cym779*pl6I@B+e{(q?goj^Vw;4TLr_1)tR`XmR}+x;Pl=9w+=c7yzb)g2lt zCNF=qp#VU>-Tyu9mvt=g{&E7?IygK)Q@N?Rc||qX)6~6WkO+{O&fOreZc8xRnq7{C zg3j`~#`}c(ixDIh`jy?D=v3ZV3OfUYdg_2YM?2KRNUko?HM5vL7!(K&f|0ee2+Luf z&ypXmbT*zUdC7YOnsa`CfoR??R)TE{!(?k-SxeJO3mkI&roCOBp{`P{d4m5iyrZs(zI(gv6cV;T@fpOn|o!pKgiXty}X z3DYdBQq{_eH=b+Vear1Gy!Alx?|sz!xv}+h$_1!$KQU{q3O87jp5`IjqCM2Th|gK+ zq{lfZ$FYz7#)LLr`HZ*2d8Hn&H0RgrOitYc=}IJVV&HY)9tQ-QcRenh1?g?I*kz^Y zi)Ox*-e&&b%+YD_?G|=5SgNww%)dz4T-ERh5PI z`_ti`F840y$FZ%Xa}Iu5vT44(lgZTM;V}ru{Rpqi~6Zx5{HU$ zRpGM#Mcg|DXBO~Zx5#$ z?b`SIV%P6k>seT1V6175qUij&<6$ATpP=oN?^sFX&4;2CBzq z$fej3!NL^QtMhpd5u-hVqVp56|J@4;jz?kJ2>gLsLMT9biUhc>((@$a*xHT`xwIwO zt<-M<4nBtGj=N*>e$qFJws1E|6NqMgr92&^lk0}qL`qiMMeWYqZ!p7Isa{Pwro{>o zuBXjDau-S_<0TI>OskOo8cL56DKE^`77i%rU!SNyM5RxVYElB3L%9gFT7eqe%)AcyOwsm zi4ZUhuAj<=7b~uM_4k#&(#VOR7-MZoLf%qIp1s?*u#~l|R3~Q3>Kxvtf^XJ7$&DgO z?ZUq8F<1^8LeLZ_6P(?F_w@R3j?)QZXb@3%;j$Z8dbB7eQ?t5RICBm+x}vTcRmo#G zo~4y<++mgXkIiF%9>btvV-00%bM<@Zh>eq10}wp1ZWHCAf6n4z5T&YUcb;tJ9?-=@ zX`(+sfxF*b_OMw4(sD&TI4`Dv3S_gfHK0n>Tt4i*%DO!)&&HycBRM(lvurHwU8Kjc zfAEKV;OFGpq4LXcaX{-a>M$?7vmVdX@OFkZOXhJjkY6kF&A8Jj^L^tNe7BxCCFd2; z*#Bc~dO4i})!{zATeyLXcc<{4+fUE$kC#Au`4L9eF2TT3Xm-3%qYUI#{XQ|Sc@Szv zI<)Z3p{%c7fk{tS59pJbt2o&0v5u?1$K&Eo6lYuF(!MiKabQ$$dTwE9GuWG&QL;7+ zeccUDx>%pAP0|o-WPvUSw&YK_&vSC5$nwr`NThHuH!v|UbuA$4Z8Iur#Dz0xl>wUw ztpu`wvbhw8mVFCTD4`SUaON{llS_tsIsEdRLv(4+Tl+2b`VRDgd);RU_v_q1ThG=k zE`<#CC14yK`9NXHW$ac;Lqo2;*G5#G!ZNK(ZJ_)zhPS!wy#~ROX5Yqszn}M5GSqMM zI!;e$t&B#NkV#9sFuY#s`VRID^i`i(p!+7qED3O}(BS*GuFhR+lap&>F9ze6@^(Uq&kFz7?GbO|)caN~jo2TTj zJkM3a=E1ftWpeE`Rc@45Ac0Wg3I`?S`N0KHXeYPk}cXQb%3DOzdH7d z$@0GYZ2yZoe!TVeb8M2u7{(z~q~Fe%yF(8y?m?csi|zKPsRX;S3j3*5gN)|kHc{7j z+v8;Bc@%K$S3tTcjf9+4N9WdT!vBqxj=l!imW69LQ{(1~NIAzaU{8O_s@ViY+7|C2 zw$`G@C<|FSa%|2cz9XfyYgL@J4P&GhGQ(@TQeogPrCCxzAh&jY*89UGZsf(M-b)F( zsnBJBydk>YWCB`o)c=*U68&pENxm!LLSE@IlvP-iq}8{?5GOFdXB5Y7gjO zXiq-XuI;~>DoGpKaltl+$aNJ1#OUey9oq|)N08lAZ_ZRO+S%O=Y?DobqUU#;H6n2U zx~qXluK;s^;t>pPoDz4zu~m=GeV6dXSn-ga=aljF9H7d|Uo$yC?SNWFzvG{B5|9AcyaZ;C~-5k+~LJBPix`ZYph zz-Nk?{{1?7hwYOFh~fa ztp68`>nyeXfgQgszp(DdP53a64F-imIX;Lz1bMQ+vAPL;at7pN?==oYO!Jhu;Fj-*eja?bLCIp`iS&{*)H0nl;5V)_L9N7 z#n&4Mj0(T0?{(~Ezh)H#~2;ww;-VLF|TmC@6NWt$XZ4zDs!C z^cib*d&+KkGLZ8n-XgDcl$UIIugUXRnb@|zYHy_%)t>C-LR`Td!9T%Sp-zvxK=-_f zIq=cxzdH?x3F^xz2d@{wEGwjYl@!*35?`BGvBb#AL#aHSn%MIDGkqqa_YbM-+=t&$ zsW;=xq3}Nz+x~DkWkG+?xh3%Jt8<00HxHY#1?VRkTmfJV3QhPit;i+`D;yH0CMa`w zTU*o!d0#cjo(@Q>%)>AUW=Gu|GbJ?jKs`znE*O5MOt}b&KfMV+$%S zASw=iscM=6vI&7R0S+{ohj+@>rw?jeA~GkK?(t5GwHl>@cY${Y1A5+JasLI`onO_cr^8=vB0p@Cs6 zAdH_-%`l7;#z+8(+1!xl1Ht_BI8TB2T0%Wn4S1+$n!gXzYGB80b()~ZZU4AI9topI z$bNgdM{I*!)c%fS2D=nu!9`rFLIQ~H{LKrf;M)iDqp;_{Z3$>J<9*_YRFUNc@o4ba zS5U+Vzs>Xfu$zza{iNSeMPG06JoI4hmH|g(@TTC*Drgd5L^|P2At)3-!s^iq$fd-7 zgy}?r-|Rx5+>nw`w7kTD$=OhracBi_)ay~)2SoRMJPYXxQhrL*<5k;zFEi#XcpsrZ zU#FZN^ItFEz%SqBecQ%DOsi3 zV+1{twW5zZoQUrwCaQe{vxRcOgW&mzw6Gc%O2(YX11T&E5x_Z2c7wbuCK+_Y43``u z5*xHCNx=s4T7gl_DHOmFgogqE-TyBL8|L#3VF8)n5Vk~rUaoTF5IZp1s6DFETdQVG z^VYVHMZ3%$sH_HW~B%WC3RFO5QHIVDXMoy zl={FXt2s5Yls~E{5$pc$Q(am7H>?uvAY()#V-6E6J&l8JeDWRdFEHDj*NkE&97vF-T zLkXBtP{^4=8i)KzaLHv?pRYUewb62aU99smv5XEKhQ_M&L&r5InuQ_9Q2s^DHK}46 z0{+;$ zQ>T|A@%L0s${XpxwlkU@Im7Oj3ir57g;_b?BRxmqQ#K{_8V=cMbzelP<31WZPG(vN zC_OI7qU!}o7@7a8kMZi3C%8ETZ`>7^y@IqIUMVVq010nT%aLUQNXaP3D(+u8Or-Od17K6AhYjln6O7(a%}l6T0f( z?G~2S1h$m-3CsC6_j}~#yDez9O^1!w*x4P6v6fA@F|cx7OF47ap6jW6MLJP#qO*1B zW?biwn#WXA2X|iE^B)UJZ5D5zTX!i~h~6eqt*T zO~WLRiKS6jIME?jK!h*&$kN<>O4**<2K$R*i&DjeY7kQj_i-)c!)gusMb*vx`NIMB z1lq`DK_O=Rc|6nA$~M!H;*uU>BCrBV5<>){>cqNFbeK=b3~StO9M6(viV!?+YzM!O zMuy{3EP}Fz{s6(SFu!$iD6oLDXz-Z6oIh&rS7LhJN-Y`YJz?oAqf`8^2@=MKmTAXx zJa9eBcMkSjmn7r3ap99WSumelck z{a_f9dFwg}fjB5aIiuNN1fdf(xi{w)m8clJQ3bmA4`dUjM1ea|oCPTu6SBI=GDkFy zc<9h>D;XFvZMvixQJf{0w!YYml?jE*|M(4Y9V_xG8?V)}*V8x^mWIn|m~J(A)q9r( zO84RTT}XHuJ2ST*Av(E8pk2%Jb4BAMS;Ux=V_eZt=)mknP^@Z{k;Jl`ewh{jNr`d} zQWKK@Z1bqWycCI8g81oYG%BeqmR^GMu7)jGq9<0*Mw5gbhO8iowb97{t%)X-1XifB z$l%4!xVq$7miR7XJNxviRn7aAQzFJ*=@z@(Xy9q{+rLz=aLQ+Em|Z8@_6JC>BceLI zPD;4O0q_^=B^`0sjo2smb4r9o{MH*akq!H1c$;+MFRT(jGZ0KHKGI*q@ez?Q%@P4( zOmm}5&~Ds-6_y3JlI~)zL0B6EZzAs0dj5-|P%)el7ACT=2m>NQ3EW5#L+ddR^TIzc z3fhBIvv{t)3km+0gI^0g5C3Z36y?Wx-U*h3 zhefYDT#K1ma6q{JM1_b9a#?_aaKM_uAJD^rOo&GB3zH#%^`$tY-T!fZuRzrED>M3nK*t{!L|7!4S ziAT<;F-22-mBzn{{VIW{TDw&W75{Z<5q!NLq=kfXo|GZ zng~0rEy_sP-Y?X866u&?5pP%#m!^{HiJU`35^drS4atu32n`GK3Gq`i2q8EbnzZLX z%sB8^5Q)$bE({QMXfP*vHsVz&3oE3IKBXuv`Vxjsi=O$V9`{rK1Nmy>Jx6|q#c~9% z0}*?@GB8wJOdE9EDd8i>GX>YTX+>pm9NJ=eDbw(oB4JvOzu-Jh-bB2FvU~MHwOjD`Zr;G$lP_K{YL>NNQN76Hry*U!s#@ViC}hkknDL zAfqVs2yN7q=>-`ZQwjq7&5)0dcohW=(>;dnHm=(*>bSiXeS^AJnx8nDqTT4e<;UA- z&1Nmls(`)^3c(L9AJGd zI1d&vF~_3Ai6E=cA;A${CJ_Vt=)LIDjM$(_P>GEFR0MCxjx4`o)&234v41rh?>Hnh zCcgE%@Xc4};B);%^wykO5||a$tK}i;9C(pI|L;848aD{vV555Wzj&@i=4d!_a9^8( z@u`vCU#nVDd}pwrmaFmPeWrt zxA0x&R==m#Y7OBspC8Bb+FQycb};22#AHZ7%Cykd zr8gr~1u?MrD33P`q)daq&s^B68=vw@z4-gFM6TI)nZMHi!*ucN{wLFQc8$XNRx3CB z7t?jbWBq2jU}V_i@hQ$o@$25LoIfTB4K{WgTKkWz<4=C1auVG8={9?7QqRo<#0Ozi`h1YdN2Ec&1y;yj~W9s=%&)CtD!NLbp$*yoPElj~y4q za2p=gnXR3!4Q;7dB4PaR>Blx?0<*skpgOm&w@&OiuXw!{rMAzmM8{Tq-=kkz`k<_p?cmOewvvFFYb$ zoAbQbG}4&&486cwHkE&O2PtE_oc`V_ovZsTAu;3D9hr*g(R_ zkX5(TIsy^Gl2t4h%bhtvMH^oEa@RSUP3UFHqfmHRmnP5VG^o`zri2g?QLr)J6S`U0 zmRj(q`*k7X&<44J3!veLH*(Gp4&_d2792Y5Mp~mB9Ghe&+Pp6``o9+#!^4W@eFQ({ zaPNEGbv2}lg=J5{E3}Z?I+pd`^A=Gh4~z>OX%&}J3I)OZ?0ore6?bm}G=>{1a-xH) z?L||c!=bv%wWlgl5Bfp)dYV`#SEV4Qb)}75STGVuJm+_hMHHAe#K|c_W}8d0+VR5y zy-kTJ#fyUm!as&eme6t@W)_Ka3c;K*c2Dk9v|w?%J9Vw62(DMfFC_^+fGwTxo~`H6 z4H!$S!si!KcP^Nm&1hmDSJR=|-OEkgE&j3ooeTBX72)|Ngc)pIoyj1fHfsS#Z*N;J zaq`X;u+G<=-!?nug`R{r7(74!)9muyFTH~xyVT6r4Mm{e+Ynm!wkO2W2r)a-W>Jv% zyt8(6168a2YXX4wv@8AT?V^5OT*+VMLN^hDVJXrs-oLUXYKTE__*bPSC(|N;$5oCQ zH*#E}kWgle(A!rUW(D&1_HL}_&H}(_TIgb5VKiY5U04%_o<;kpPwy9x<{Rmdrknh8P64K~)&^2f~{j8<4br^ok zLqHiv{k*mYb`Z?+eJyI?yH%Sc;`o=CxLw;^SY?ad@ZOg!+m)t^$&c2y2Okmz?)P62!XXbA9_*A<;KId+}gnM7Cz%4s^L|3v#D8m5joiJDui#c2?j@e%=sVB3lu4_hYcP9)~mb zmDZjT9HU$gwzgrRhd0TW+)kDJNk8g(HjN8CG(Comdf$Jo$4X|UFvtt)6|nIJz%#Do zCO23kNYiuP!0T3rJ&0o6XGF1Ig)@a+lpO9^(H%QCU8c7UZlrPabaj_Ew3kmiaGon9 zOc!_9B3Tt)lbz|EcY4r$8-JyFQgIl0A#lwprB8&`T)TNOlPzSbU)-ZjG&sFkFYnLL zp*&RDWs)a3h53?GG;52BqUH}|qAf#@E*z-l>Qx!)nM3GCEikCm5B>&yEv!Z+Pi@^az)*m+ zho>N4$C_MD;PkVXqaf$mpis>&(M_G26x?fPPE9(+%aq;o^mgw9-YaTYYXDbmOfNf@ zz_)aaiPo+VetMUF&LI7);wYI!|8NLTuZyse8{bl~YpG3Qb>+(J)l4)Uo;06qcO# zJ-Zw{bKFw(%`?hP_tUw4u0LYZG+$xQ)^8YSW1?bjw~#o_&*6yVHxA#i5Zu&z)!hHm zn7nrZ%-oXcbKX>^U4{PLs^_Zt-8lr0sm$6s*EcsROVjoA< z)cO8*+1T6D2|On`Bx^&C_dIq}hWRPe8qoPWfxg)|N$q;Ba-%jhb&CZ@t#+%@0o&Xa z^!~rFQXNRRH~nYHhkb@81xg+1R;$M18D5K*=ZiP!UF-VRmzP??US>wiHqOmwImE#l zR@RQ|Hg22^)@1XLv$iI))AM(X0}2@Mqa@eoIVxsTcGVvtOYr~H3%vp*Z90(uTKH{Z zsAvHCnOMje*W+^36ULIW5t2)xNW90ac4&6b|M3rg)%#~tT(zA65Ai3hp8&*qYKrDN zTmsPoE7dcUF7Pnj^MTzgScG!NS2FN-lBN>M;tg7kKV0&c-4H@(fGHxC{v8l~dT)D! zzKO^5#V}7`6pp-&M_3ILxTGKHe!bsfc@%H;bSjvKZaAfL!{4-9el*=O*ziLw=U@~i z5aFtU{(~0nc2oM+Jk)w-9TDv*`5i7+K59o=Cjq~_IacZ=0BkLw4$|YH_d9%Z)E zy=yG}d55_1d{}i2{@iwc8GyMvkzu_odbiMQmjRTBITe{AHLnses=32xYHKYQ3AW_-k{PRi0c+7>8LmVx2a+gI;1Cw;EtbSBGyTA`SCyA5Qq z{NuVZW0+Ye33zQetzMpAG0IB_L_IGJn#t_k&v1uZ$z^nxY)&tyI< zEGscgPqHq~5PiZwSw0kUJ5i&T=Ci!$7~}`eqN(nN-cL*ra77dz!qa@_XV`Ss%6gJli7cyd=I1u2X0u$TjE-_=*#Il9k$+3 z9ovJdj<&5huv!U{9Ia-iiAv0;6xba2gsSB;B=+imHRk^BU3}C3Yiff3&$ayjKa>Qg|C^FP z`~QM3*UjAZ+mvhSVs7ka{y)tG|3@dm;s05du=WHUPmZYps)ldbj$f>cBX-Yvh@bxtO*o6x0`wCv!TXTA0d51eB%$5Uj z?{(uGOOa6VWLnjSAc~hFV?mAlaq}jbz;-7svqgo4FJ1V$ND75{E{rwQFD$V@$A5#F zWcFZGAJb?hA^EOFBA)`6+hNRBtaW~KLakpEZYE=hA0WrL`7J#le{5XrRzj2}gNQy2 z9!5$34%pmUXAqbSV8=F!YK-jhWh_{usd5&txd4WcN*|c?C9vJim!??p!Y0lZA7`Y| zIwLACC_$5Se3Y|5xvHF9q%Bkd6uWo}5GGoG10cU&P? zV#hlxDE^3t^uEh7J8?Ltbd~de;w!y9nv~7+mBJGPHA*)jkrjbmMk1_V@$RQ?|FN&( zDyXtqy5ski$SCMa$j|5fvX+_~k-;qOE*S8!bigPO@G(^AxT)9^@Um2zEVkzVb~Mu) z@UZIta5mHXvQk<=@De!mVy-ZsWI|~fO@5SxUd)>CdV;4LHb<3*9a&;Mrh$vdNtHOK z8M9LJ4@Cc7e{P4fccQaJAwF<=;<1j05Z56iUR(k^m1(u2Dg&y)Bd?4yDxhdhGEDtQ z5-X0Hg>GaM7LA;!!UYM1gz!{=94Z77?F%_>yreL#BR93A_LvAEFJ~KcNYWtiEgNdF zRkow83jq`Ym%%DSE)}}>R8nqIs%0<-e@OZ`jLGPCg0EIQoE1A1XuHX22uZpeYexj= zQ8bS2Gm~fkc2~18+U)9x#W-qucP~x?-iu3oSJm=;M-}1-VM|c7$w%%Af4U*Y)gJoE z=UNk3)6zCnH+-KGD>}bp-jol z`w5Gd&B>Y!i@G#ZS3$5rQncHV6%*MRHPOkW0T#$KathQ@f}xpC`0gQI3lf;XUw?q5 zs9|Mxm-cHjl#~^Qw$SN@5pn_Sbu+~MD_(Pi{TH14L^aXnA0LGp*;P5qE&5+tyO{p? z&lC+V(uz%jTBgcv#;uzTb1?WZ+qnDyTZ0$fAEqm4lz!Y_$q z#9Q;rCUvYvL=n&=bXo7WpK(83NiE39v*JyVrCgOQI@96MgaKb**|Yjw!StW)&eNl= zsdy0ZGb>uoxH<~PN*HtvP;0$aluaJR23dY|9CmLO2*JMn;w+cX8oVaOEy_!~rcUcR zY%%C;m|!bpJ*6{hPMfIJ$e|7r0G&b(MZT)SgPchk&I6lM(LRi&anXx3)b!3L4EBR) zXO%A|%rG+7dW=>tRjlH<&elrKm(M7~4yzagZB}Qk>z-vXr)7gj@&Gsn!K;=VYq31? zV>JT^M)M1l{}!}3Y=E0IOCKW2lmQQ|lNktu`5sfO2Y)digAx$O5S+n+(sBXGy@gdh zxjhXfm{84+AJ<%nk7=XfSomX$e-p|o`v1X;rg{ymQd{YagcC2AbnirUc5^GKGj_G? z?{csODA9#392RGO_jS6zH?%s*>rFB~6SU%w=toUVHwv^6z{SDaZE z3gM{~*t%Hp_7JL!sKKba>61rE8%2aOO*9Ley@MCDrLOCA-S;E^*Szzz&4 zmDjwm-3Y^Z^_XAu*ko{w8veaO-(hmshg23zR{A;l^Ts{Biy;mk&d@5cs)FhB*_{#| zkC4tEiiQ*1#K*vhD+GyF$sPx?6Zk|Cx;htM>v#(Y`}@@r9@-= ztnS&Wc!Jr+B@+g-r>1dwEw`sNbv12(&j=R#Z%4 z2!gZajPE@)S}eEpBbEH41I4t=k>#=0i2ab5+=cMb-XbVpoZDw84-Q^G8A9R#Km6g6D-c3aEg{sKtf!!)>WL@9)Oe zD>*JB5>!{$1cgF;5De9>14ZT5f7oPk5*_DJT%|5MxC zfxD%~E9fL0K%UuSx)Gwo1Vag$#t5*1>LEa>zy;KVruTPE`v;w$KoI9N^2`h;8-=(yjtvXw+LI6 z;c#f(f?{c55QkZebD)v8K&JSgLR2_V8!hk(Bhk<&UepxYTDn}x)ntzisbIRvNUy6t zgR@f}AYY$8Tu;~IO{_fa%^p)v(%U!;W`HQ#rsdS^miBydrCtho z{(B0GKl5Bpve81Wx#q!qULHi;Kfn4|NFyP-drBsx_UM2pd1v2PH^#I_StPqLx|Rzjjg_~I<|%< zx{Fg|<@3pQABmwia z;_?T*5(LAA72u=DwwK*y91v$Qjq{%W`-*2{@h&f*7<`l@LzdiQa@v&OBg7XeSlVdj z>@6~nDX2SdZYV$?p*+A?F!RP5DAWJM?TE4G2n8o#{;r(?@w$-{{HQgtkY;&sOBK^L zU!Sy~&6A|?3QTSsJF@fPu`$nKQr_KnD7~eICrAharU$vZyTj&5zN5tY8x6i(zPL3_ z4uHSAHKne+(xV{T*djk^qgl?3_$KQmzOvv}?jtzt2Z!B+u)^B)vv1Y&#V7Nhy=bXa zinD@TK=#oc6j%^SNGY)7r~RPZgIZ(P^gT#Y_)F1wL?|a3nj%7ai0APWbo=|88nE#O znU$*5yqT*naxs~>^5 z>826>GVhT(p0!SOZ<-~dkNhzlPPTb=RrlVJ9RB)v92lf0&AKSSZcKLUjocj zNfgN=+uO|*XYVf<7#DR8Aa=8fQta~+>^L+i!lrWS>H&kv)s<%G9rGej4d3e!;-q?SyyLnHh>FseqqklYm{0R+)Kji z`@+X9Jr|5uxV;_@Fwqe{otw)+EA|^?(}gfKt=;gP-^AQJ;j-3dlYH)CE@&sOAE_^x zU>6+O*yJtT8LHjSWjw%SdH{cef8XZiqNq zenqVpE*4O=z}1K=`u=5abjtVxf5`=d!-6nOls@K?(Y}hyR4X{lC(_n78Y4MxdDF|u zOMzi=Q&G+aEJ0?4hwLx~4l-r`;fCKd;*;GclieRByk0u@k|wc`D;ij}lyqUTSBAbI zjcjhT<-k@#*|nCOEs=qkmsDx@NIUQ)khi8^5JWG=9Yy3s5LBiD4UC!407?rAV3f7G z9!NqzCyE1mXsF0bKpPq~DIzupRv9AEXRRe@So>j7tG3v|o*GeJE#=BU=aNq5gBJb% z;hjvP%%BAMklbS9bLs|yM18(4Co7u@J=l_V>S9|j`<6!^W;2YVdUjaJc9ivKI_o`q zczE&5VY-E2_z#_>dwDJ6XX2yrR<&D63IfGAIv(ItO`(6XMEdVFlYtVbV2WEw(Tf^j z9+ugu)|!t^JHK8^@fh#S_cD_a2?ns=H<<50e0snf7J-`i_<<(jTsK#`|Fw4W$Z@80 z2R|F|)(;dsdc$USKC85C+t6rVx7qHk*k}QtmhrTgcT7GC+iGZ!)}KZHl*seoR+h$F zM4==S8)fUrJLpyrXP5hm6f8EIqv$Dn(Rw(=n&mHCb5=Mso92GNI@YR{7177Pap5wC zhlViS!@}JL?>@8d$u4bgRHwG@v+qdt#hWN-ttdBLR?vX^TF2ZrOCzLYtjp$xs!IXN zmN^3qbNBN-sd=zuJ-Th!nt+MGTM1X0+n)y!bHenTS$YYjLDBr@t% znPK!zNV+aO0}Ppkgw2yer4T2aJZKqz-`uct&~lsmlBeFBZObd@0LE001=fPc%6-|u zY`wpob&0mS5MMit&O8hO&D^C^taiJPid1PqfWw`T;7a?)61J~0C!Z5SJ)Kk9R;s_2 z6;*8kkLXHAJ|^tUF?~r{9>#SrHx2$!)i@kxG9PT_jFk~nYUezU0h?c<9D&!?@Uf&? zhYpE`%G-+n5<41S?+3G|dhsy@d2;o$b~=0I61^rvgTf{67%){GHts#O%pYHaULX|& z6v0vk9;PYd6#Mpft&L`X2yKy4M|@mjXHw?9_d589ZjZZwy22!{z1r=2*PHYW;nZN= z7@9U+xwzFDkS1ta-8fYNURMGDqxCN-384>fGE#3HCPw>MMnMSpapLYr!NDeShy3u+ zIz9>pRm>EnX&TY}VIzI9Go-|3%`PQyMRALF- z^JuS&d1gJ&i4-@>e_xgT_695bnF?B3llB&KF`lg!q`b`R+EeH^C2fjeffZVn%9e~D<;i1d^Q?kKpwK-peNE!x~dk)2$8r0 z_ZE&B-o#rd!jqG$hfL7zmQU(s@^x9X1w#rn3$Q$&?)s`eNpdbK61QIDo9I0bYOmwA zDwZCUTRZPKT8+x~EJDM}gOxO1KeuBJ>`mpF>a2y&IF{62V|Pd%CG6OJEh~>A3G1qd zd!li_M>C^07LM#BR=d}Rl2_U$`_`4~Mc!+!Fqpc=ySD}X?}kQzV+W;_inzm8-i7X= zd7)!)ekt@MQ8iyWQ}^O15_(<6Vv4d{B|vUm`K7<3VMWD@{@?q=2HakDVvJnl4ju4+ zN8`NUoG+W}pdiZ*rrP`IuMtle&*3&K;kuNvAV(e2C<6(W(&&0$cq2x&vx>A2ORv66 zbbGGb7s9U1YM(QBXO(Fg9c$ezD{0Z6&p31c9Zt+_N+K!}1Uwy4R=&Fg{z2#Q)rq*m zM6T$ISRm6I*7In-f6b#Q{DtqfBGmeB@$6&HcuHQTVK7$>Qg?6@HD8VPM^_GOMMbHk zAp{s~E+}FdWI#@$DvuyhFQ^Z>$PaG5;0$8aaf3+6XO(k35}WY!4u#lOe3vI+Kea%> zq`s0JHbACWO}0D(UsQ`T$^k$-#E?`}1;)5B>Qr(4OsZD*m-S)Z4ekw!6)GC^hl>2U z*#oDoKs4b55Fl_YU?Z(P7nQHR#zIK#eOodIxXO$T2s+l$-3iNeQL8@67fLTG)k7{( zTnDR9P9xQH^}H$HYnDTt(w?7CPHOyM4n$B5ZKd8HM+Ts*J~C|ix!n3-rO#KOlNm&A zA#-3?i%l+li#%FCZ0#A#|_~f=q{(n%Omu86P%WG$m$aN`aAthrU(;<(bd@JQ@rT?#^u9m z#h;INqp-Ne^PxTHq z0+q52C)uO3CIq$G13|sI#ig1`frWFhIPaJ&aYvh6FGs&J^#?9K>fsb%?BLfyGwP8- z;8C@@;aZP&QcDdq*g(78idwi8qI5`zZsO@P<)LhhbG$RiUI|?Vsh+M-4<&LFhfQ@n zON=hJK)_<3hguDMJEk%VIiE=WI3Bylv?z&y@5|Id?bb{#pa0uobeJt~F{T@GeH&m- zw!unobr>9wQK^Jmujg!`)OwM9qzxga6RuuF%;}e$#h&0oLN_zb1uzcTBQK<61}r4W zOs1LRJ~Z4@C2OJHWFZc}s(cSi9#MDkCq{iB_re;7*Bcr^mIA93R$P`0wTT-lK)H@G zL{iKqr;1J`EZ-;yTpITP*B)ytslgq7PadUmnR7$fQ-#6j%u-`^Ik#HN5-4GwMnX8Y zdDcx5kc>PwkPJjzc%{{$i*(+?2WT@r!GJgmqQo^J^^0&)^gXEPL-JsyNub%kET(A> zw2f0c7jgh`+>@4UUMN`XH{4gbdz~4P2gPZ;u6Qn##fDi%({9RV4*40CO-X@Mx2%~&Yxc!i zmSTe1Aofg@ACP#Spvt=_!yf_R^rHtcQAXdWv$$#BSFlY9@z1^==MJdjrtrcV%eXYU zh&mT!fr@{f&fSaLKmqr+7X;DlN=R7|?Nh2T4!$xWJFA^q{<}&~ppi!fs+|1$57Mj9 zGc`96Ti#8aml_BD(4uUkubAPKu>esEt!MaVOhhidFw)OMEp!LgL27m!$y>klqmv_b znAp}D`+Y>(%9=?Kj;D&H_}_CZwJc7d2TbKGZ-YkVH@LQ1s%hIOxj4_@SY=h>Jh;=VV^7^T%9SaG<4iD7cQ!o_K25=PA95 zOr`(Xyo}?UKZg~0N9DjW5Hs61?^RMku4A&x&}O@TU1~G#N8-^}&3?(#7_N9!cs3hTqK07ElRo1+(;$;b1H( zzH_Wd)8?|RgSJ2tY|eu{wvsR#2)`ed1~~k(CAud#-||T2Z1TKU2lVe^RM9x!yHzJ| zw&Kf@J==|=lwV5tIM}L4!r5!LzzaIzZM3jOzp35x|9&gkdkL$d$vD3Vval_2P?-w0 z&N>PWy7Z+WFWDxaiH5sg>nbWOY@3UhwF;6W%KYwEkv-U%WM&ZRfXx38$UFquXkW6Ssv{pCgQca z=@kz3nz+k8nspm}VSjzL8xoALYE+Q%8(J$!I>he7i%HD#f{v}i z@@-s%?3du}7@OqQU=hGWnh$h|eyiJHrO5dsl0_9lxs+Kg)|FLnJjtNXZOIe11+Sik zWjmDl1FLYCdBG%;9BHE6XYlxAZ!a_7tU2_rDPALuwj%d|tsbzrWzQ96%l2!?uoF%h zU2dv>e&S0l)|Oen!klB0w=-k%ilT5ay>vaRjaE`YZ*RGaPsZ7^UY}iC~1%o#8zc$ zntnJhd0Tut4eo~Q^0;o1#xGHhX&nr|M~h^rpe!88-9KHT?|o&@IniL6R5X@;_2Esy zfRBWyr-MhNfim+mGU16tpqFtVfG@cD&5m>^*z?Y+(LxKUhGm;omF2sK8OmZF31ld^ z7+KoILtscJ*!QZo-{&mNUlAt*w^vjW-!2ZR56^wlecu|h6V2_8Y+o%diq1A;$s6qR zH9;ywlZ09##rcPp`@~?>X`pf}XmawwJjay2*Vqj~FP7$^lkE+k)HYPuM;Z`zlzj8v zDlV0^Ir&L4e@Wz>8r_WN!+KRzSY+tr`9zthz?RgZK=zdT^jObYF0X?BoG*l92E zUKQ|W)_mW+^YGQa@7{!ncH}rnQ@_eP8GLVyARw7Vf!5ZcJqL)Z2^DgLw#nSmYM22i1m$oQD06#|tvhW&g8w(--Z4hE_DlCI+cs9&cGW7|wr$(1Y}>YN+qP|6XT81qBz^v; z_s-7VopdsjJM;PQe7eV#nco=KxSTMmHBaZ8U{^F>8W;1wG}2Tss=Xatx;9teUMxDd zeP?nh^2|B0D1N67v{PFOfeX$OvqmCDV6@kmqbV=)5i;8`uYrHasc?f*ODThu7B9gn z|NqhVWCaktGK~PtRH8KipB3z}Mjm=;dr>d-1mqvNGX|X-P7l}Ni)pti({;=m+buU5 zT4^`esFmiW7A76b;R;iBK!09M*erra>wP~MHa^+1aFexS6Kp_0)C0L8Mya58EHO(# z(%>TGjTdH9)6VXL;R{v_J=0DbqfRJ}4kn#{`|~Z#nx#y9zdOq5A~#*_ny2HfiW_Bf zGGDV}%Tu>*S=6;=nzVB`$gnGOi`!qH^oh-1yQ;^V~R;4LfcY0{^3sbiDWM>J2C}{itA4wAO+* z4b#?_ZJ#YL@W!hZ>&LULtCb|}FG4rnmRS}qU>DQgYnauS89!}DULpIH16;wLzxaE4 zTHbscV9b@j&f0ljpyA)Rx5CA+U0C6~DomD&0(>ah-HB5&HLa}J`@X4U`{l%lV7tVt zaH5UxvFsYE>C~^!E4{vwPl+}W{_o}zJ)V1>9@LnTNrrui5d|63Gda#9F6J51lm>I3 zJ1vrjKuCOa**lD!=-W=L*<7Yt#u}NwyPb6N>)NpKemUAFP~tBnbtwHS>tjrpC zhACCyKQUCQ9}_V_6jpHG61l#=z1Q`J@vU!r1U8K4`q%Qdk1{#F zVAa96qmQ?}ds&H|?68ia#ED_&VJoTjL#I1E%LNdrby}deHq?ir6Q!26bMkb@$J$va zGQm+w({bXEr{h{z@&7>F8n^}9{Sy*tDhM7;EXrwI_Zu~T!6cR9mW*zgxEO8 zK)a|ca3gL+@_u3Crx?n>1Z1i0M+0#6ssHqtrLihTbE`g!T&G@l z9j7fghV&WjwDKk+LrfU%7@--IVhkDp26Dgm+*|_5wpGCLtw2aM( z`Y*XM;@<@aCKvF%81CO9sAh(CmGik*e2eF0Ov^I9E`+TMIb2_Fa2GT0+3)sS$lH6M zqP%;E)0vcTcY_}!kN6ousALIt&Vj$b!>pXnL})z`ag2~mD;DEH+{Cm|0M(jc+_hs1 z92O;MBweB>T1Dp}Ka#(r2m#;jD$-IwSy9lV_=-o+`O5BeIyBfaMNCgHb$iVSw5hEY zcVye7{g(yLMyy*6RNM3|v-ip+d;S7#RUhe<txOh30@ z3#WggUpSL4=-+?|oT|IIAs@N06?6~J}< zd`GcW5}SL|s=rV!$a{JU&rX7pq1f)@3)-+7YHwC^?qm_s3#fTrrP5R})DkKScV55< zK{Jq)5nVNQe5^~sJZ;?l6bTVvqMBAFQ-p=&*D{s4pR_LV@uTE=&8E6}&}5b+PvRzn!$ZM|GnwUGz=qpWWK zbxxH#-gInXfZ;FCb=9wjyleacr@>-1n)qryuA_pOp}pjM{zV4~JEf?SNwLU2Txl3B zclW?jgY?e#cR0k@O;9G>l7f0GIXBod3F?v9%9=@e0`TND`{smqy*9P-@^X~Z5t%~8``$h zoJDafTrg70uSzV5NDc6yrGuoca8K={sm-hL;+!dzm6hrC=u{)7c8J-JDF@A5=|>`U zBaurZ_j@R$JmhE#Oe0EvU0p!_%!+1sA9|GTB&n${^0Oq>rhZWnNf~rZNiO} zQ`T>EG5yWtHXQ+*Np9L{*%$*Y;;gcHjdlCm+7(&Uiv|T-F-3f1%oM zE;DpIq))z-V}6u74U;z>2Wdb63>0q93jgq7IKFIU&AHYwEUS4&q2dwIZe?Pd$Ur^2 z`qm&>e%gZoF(g}-uXMGJS_^y1QuAdSdKV$1jM4P88z+Hr&&LorM1{tWdfM0&I$q-U zFuXfI6|5i0s&tfXtvMGCaXmNZAylCx)qY5e7^vEOc_G^a@RnKXwSwio7t&+ zxU@0#U{gxva8pS#_|ls$_o$$(M1`tT)aOEdmMN#l1Cc{M>govL%m+NTU;UcM4H`!B zIFo_iwNj33O5UN?z2@`(snn`*8Kt40Nv6!bT9-1Q;R^=$MWi~ zCPik&%0TW?anL`Eoz!0;Q*EA^#L~)Ibt7Q5CNr3YLA!f1c-ui83=J;l&W`qo20zkg zJ;~iZ4qYARnr%?1ZM$-P^9plMEfq0E;fC zF+6q+1o6YT!t>c_1zk?|A{s;>QIP^NmyOW>;N6>t11PzFBpkK5(-$zf~4XHjo0Mr6AS6y`@5UKq`x6#Z&<*{p4i0SB-gh!?=5NHIKRg7sjmN&Ac z0d^%~{c0oKrzbe2?*Zc;(0^NZA2yCIAJ*2_H>p+rnR@3|p>UEUy$F$elt4K!N94|R z>gncnsZd!E-MSv%*!)8{o`H&23?-m`gzWPmvli9VKMt#Lg*tdH zUwIFI47So@q1)`W$o1i1s=Hm_t?urj^I5Hy)jM%WEi+GjzW~+~{SR0znOMeDC-&bp zBr3Wvo0uaS@_wH>;eESjdYKzY2+8q&6W7$MbhdDk++Jd2mT3XO8%IL~r9wIr*S?vb z0yUjz{+q)X-JBR72`e2dQtnsJYAgR0OYJpjW05`h za5#6UK8AGPA6d5HIzh4f1goz=*n3lL(bRt!v;cgLzuY;G28;G1j>?44p@(VFylPZ9 zC%n>;hdDx8H)jU0+Z3Lrc#}2apDWcJivN`xqvSLIM zCAI_b;SkBg#fl8gC2!5w@50x;0B~Tht&I0wz??7cQ-|my4m|n>S90*-;zRfCeuVa# zIsRY&)gx$Z{^*y#Y`EN6uE9$-!S-l;@6}adPGoIr^+GL^DK@qAP#xB&IhI<=zcAhb} zVBFm7s-zg)LpX3RHpH{^LgC!?uM<&llCdvc%sdb5a5 zpkKpbo_H+ci;sd3BX(EgO)6JjM+lao36ro1#+!BUbUh`~n~O^aH~5IeGE%WGo|)jV z9k#1cvt}|iJKxjgJ%xSL5?tu%eyg+_Yzqa=0!V~;Y^Rl13fet6++EI?)Rw~)&*A%r&3s(I3?2dH#MiQ^>h6#Hbg5xflEgN{^F!vsUlZEYJDk0R&TFz7O^-o2OSG3x z?k>aj@I+d6csyb9Hib$C$S}<`)LbzNVJxt+cX~w9lpS=&?ohS|g@j~OvMl^jh@|ww z;#=w+@SH{F0oYWM?&|RjbS3%NUGA*fPK;bCo$ac_>kJ^;l7`Q@ty%w|USO#5^=e|> z?+S7aR^VWkEW;h?5~h^Fvx)UKMS9m9x`yNZzt;I+Ea-lahss3cq9j#q4w+c{ zzHvVCBM<0EXy3flU~fI9x8H7GB^Nz?54;GIPdlJim2kOw!8gQW{=Pf9Kk%QgM7xh0 z7eB_J-8Hoj=@a|(C)raOSG3y=xdpUkz{v0D%rbYe%os6qFzbUxb|XIM9*CgK&v{d0 z6N%1zzG#0b^xyp5W`@x}!eLGv8HmH!*k|8QPRFsFTEmETBus~hhRz$~c5*XS0w%LS zsM=X`nA>rQH8jH1%ge%|ksmaG?%3dyM*%BfZRk^;jt{R0fEAIfnA+sZh@MT&a;ULt z1U4buLvdk<&Qh`I$|h$B0+-lL6H77G-@O0$HmXK+x}oR+0H)Rdqi^G14GTv9WxkDn ziNf|i zqi{y*vjl=-j|l@2kf5JG1u>gSxlLX{KVn*COius6R;-?6dfv2+nEx6pA=YZ{$3#{a z3zDZ&r`LB%MYE%DBj-S5h7c%>P$)u~!6;z}CrzisMU>GM)oveDK&3OcVAg5=)h}1P z8V@B@DAZf1bTNwTh=G7v9u-ZTkjTVeS6rOfO-+)1E|xMW=e64J`o~PgA$kE+AIP(T zorbZLvSb%&{VfcfD&EnqRD!TH{A;B)6DU4_RpbK>Ks=vi${?{6Y1x8xuC~wub(PM= zx@RM5i_lfycGL3%IQn_KtAWk0dQLt*Gj~I7)|y;yOGaAU?Ut0URG!OXuyhX7$#cmzTAEu zkA$UW6i0!g;v1eS@Bs%oPgnk^=$Xmk#N}jKzoF{OxCO%H-J<4dJ*!Rf1Gd-lWzN#4 z-~NDhi|nQEy7Rha2XDOkayiT2;h;$e_VDKzB_~|b{wMcYqvO3p*tqz}UkB0RV6T|Hn+&f4#V-|Fs4D ze|m@iJ8Jm)UuqcZKdE6yXKQPH2lxL;1>XL91^#nxX<6H1k7W7Y$ky3yvjd91m4)zu zYLwRFR3woI$HzhQ`Dw&arO^x5Yt2Uk^vnj}vPEIDNW;65d!$_K*?HTu`xOg?Q2E(TW805}TTup8U}F{2ZJE*XUG(CpoZ?2l6*4({XoQ1ywyc z_te>6t#{%F^P6vWJl(BU#nfnfUT@K<0^PK+orS#KnNyir^`0!EKjp5%NZ1`nG;3M^ z9TA9>nV>@+GMT7JMMo$7eMk8%G7GT>{(IQd=gK|#n~8U^37vA@Ky5sWrqAE$EE%oW*i0LJUEgBW-$f8Z1{8KCg zuDeuKul>-~Wvk}hl0V=Xw+r*jrIBkr987*D;=T5v8{Da}fNc)J%tG{U&TTZl=+)e^ z*@WgU3tl-%@wdB=iGjy*t}wQwT>KrWEh-wX?`uR`TL0nT{NUs!8M9l5oh_7_ovnq- z{X;()H1Y%d@DF704N9>|3fk|SoQ!O34V)feB3I}LMR+oklwvYyXh$YR)uBw20XncX zdNXbs^Z-|bDWvM!QnXeA!|TqPND5Y<9&?=K9-t>dy7icLF|IoOM}tOSuk)DhNRI;T zn4388my;hp3xzV&FNtUS2KAZ#uO$n=g!~(RA{{_384)g>MR^DWXIu;wYgUUS2CX~- z6+X4u$5TM9^h5K6eZ&IX)_UpJ`6w_vb6s6SOMMd?2ZQ0E&DU{bHLn+iPE8tB$u$!M zRzY+S?~w37V&|~o8u_|t{t&4`euEp?nQba+X&PD@ti<#INJiUYvnl1cM1W}KKTck5 zzGLEeFU%hCA)jA`r|MOAMokKy#fi2{bgY(9QC2K!4;e=#rbusTt?Fh6-rY~$#Atul z1D>;_f(jVDjslq|hjsdr@vVak2Cu@ZEs16a@JsfKw043D1}w(y|5R*5u`^{mE2W{40-$*@J^sx^&K5#vNG#SeqaVuKOEfENgHHA(f$91(VwAZ<{+pJKu+)kLCM2QM2vbSjzKGrV1eVTs z_45EV=waQ3E;&YxE=0erU8Pk|M_}iz3I6x3i3y$u^3q?{3Q=R+74utSD%tCCjwPl+ z=-?)q)qlhHSlHJNgyL;cN^%iUc&B8QhzA{jsPxCkw^txaXW@>WpQDAs?acqymE0wd z|MdqXK-7ibjymKczXKfShEHydEW{W&Mm+`wPbiiC1LK<~P&dP?S?|5N^8r+AJwP8~ zi34Y&@ckiBe!8I`>MNiPh}hC9H;AO{bYs9>cPhT9qAs!ZM5 z+^?@<{m+rikYH?8$SW>-3S@vP{ZkRMh;DpFTTlhS)Q_;3gCB7`#mG=7F)SyF;%!-b zfCQ1~ocM2O=1T-NE}RVfJE-0$A_EtATO~~pLJxY?)xOd!N%;=;8Ry?q4ahna=OPRD zLEO@VveHvvqb)Rvg5Xu+l; zO^0tW(VtDV`nu~FclA?&T|ta?560mwi&RK*hZ?tfIS+?tC61EN^vr?}q;Vj-&C+|& zfY^6Q7+4iGJuw0aar7Agev}40ssP#a9|I~L$an?6HLTvJR7$U!5h13VusW58gCc{F zF=Y{AG5{-=-Nw4rqH`J$Dgp5Vz)5RVEG#Yk8aXy={czmRR;qGQ4~r|{1DtE|Bz;~F z6>;QO;$qw`2BL;^Rjq!RS~@y=PL3XpDH{=_Xl2ryQ0UUOHnB=)h$LTm<$PS+^i4iFKn zlNqrSz+-~RAO@2kV|>BEy(e?aalU@lzVU*Y6&|KZZ?ecS zP)+qi%ERgX!I0eG1*FDDVs{~#oyXzJJ`Dr{5z!L*@vi5xlISL^+#y`F8sQ$A1cbxM zR|hIAF;3;4U`T9^vCEzuHItD^O?dH#@RDOo`z1J4|6B(2G-tenSuP-RBwr^#!*>DA=dIh4-I+18Tc^ zJNgX4jE73-p9H#dYee1rq|#sN;rKgiLOEYAuo_ZGT2shv9($-~p3ZDO8lv{=5NZ=F z?NjF^X%(p+Af(pB%WrJlIqk#x0xh?JuPiWk&?+}a?`{x&(4y7{q?Vs3n^@gc`xiMo zYCR8#ihh2E+6XNK68R-dx%nkV+~P-VS zQHo)8WkST?6}G?Q$Qo}1SBcMiX*~-=oI+_->dgIgYvL~R@>@#&E^{T`)}Wh;#0Yzu zz(m~2B$E#HK@DSpVh7-JaU$*vW2j@f)ygsX*~GM;_Gso7r!~X9#%;3Wi6c@ZiixbZ&lP z+4)lg`_GC)`pbIcfRZ*k0DM~oR10|o#K1wqMK`z%&zBYV8jcyEQ@^h9w> z1iA}Hg18h@vi44#@q;<>NSSBug~KE=7TlcVRx9h5ubJ^FuohdgW9;!mqT7aCp-v>b zmN>h7-1~-yfA%1x_@Xuza)`GCsV9yb?lEFxV}hJv%D$14|NYcb&M^u&HZS9!cfM+b7lyCu|6~ixB9EB(4!SV>5!8c0>0uYkE%lkNsHi z6-#lrZbI#z|9p~lxf$*zN@y2X7G9`8862g2DTER8{TV8xxW+e3^vwfaSRjrd?9wc+ zVLFQoY0sPLvDH7%^F(5hG*+o<$4{pDa&?~$nL)7T~8#<4y zCe1H~JuAd7WmWLj2i0{cBoqCP<#Cg~5GFiyhKOPk zE$`fIFm8}W3U0Q`nbY7(nyfYN@w&z`zhMqqI7SFuqsuV|(~@j%6nXZ&L;jEZ#l0O_4(C&8bU{@kICeN6P^mz{oSgam?;kWFdfPSMC)-|u}jpR zmSQu#a?iP9`Y#XL2*R7?)h{!}zk_wk1*UNw?Lnqm{ig+yy4jCU84(BJ%o{T1ofr0+ zEz{#|aKK3^rJCamHXU>9c)$aH&qeio)$j{^*p4U!>_XwWUr?sE!BKG5`8P5Sofm)} z?yo>=>ZE?v15%li*KIQ>+YE;#yLva_4jJiwCKGzt??z%)X(X9jSu4)WYFun{# zmS}0u6j4-u|3)3xI=^uVKwe`SGBn^sDg+{gZeR@c^B$kMV8$v9x&=QmBLK)1ZEp(8 z!w@K~-w*0olquh0fQ zc}df?34R08sU9U}ua@;cB?TuX2*!megHhy%utj#0SO%Qp4a-RR zl)eNhJMiZY_b%Sb3_yBC8s@TD)R=NW4gR8JPu$H~>?b%}^rp&!5jg` zq8I{o&u5W$2CzWx--XyqJSqlAw0n-CPK#=eXGkQ49s4%@MmBPVW+{(MR!1xNgGBnP z&)@r8)qo*%fMQV3R*J>6Hb|l|vX)>+4td;1!CfcpPuLP&e=Wf#0idxcl8*-tgQ1H; z?ZMM2Hp1?Yd}Cpb)}cktxGpZ{VzCJ(l786uZ;YiNDG7CE{Y%7gtCYwU~NSGY59@;tKYSUYm12srzVlw*jT|=~4Nt2E?B%NM_)- zMXTgWIY~qbcU?l{?e%(J+U~-~Yh3}rO{#C-Tau=Zo!!BqjZbCIWHbeK*QEIbX9n$!gI;>dPj`d_FzjoD$bfOx7j zQQIgTL__;`0~Qm@$k5Bbz3cms-pwr&EQkUeRM= z9~Q&TcAURr%$erI`JGm?Jbwk?nu@V=F&CynDh8BSThIOxw6Pf6rd>M%1{orJ&bAmk z&yGX)l`N3iq`z$YXjl4}#y_jm_DXe`ZR`dp;cBvMQ$&}n?XD^jcE95}?1TZN*E{h6 z>C$mB(gTf%!rC^HfTskIcT(;>bPdHJg4VBn?EVKq}! zRM5;De|k&Pl^PYXgg@3!37Mz-oV~v|QYb^>e!%vh_e%u(ffJ8SVCWLUQiD47Q_ARP z<%ydVw)CTAJ~3v`TXmHLz2FiNp&2u@;~{WZ!i4Q#aifvgrX_MK7h~UF-X6SwVQ54< z&yUJ1EO8aZYg24pTn!KpPHDs;1I|xmq$}w@`HGU5q8sBOo1YdCZX|Yf=wYi~$<|77 z*9RgAedeemb!1p%^OK|0)Cp0!&OFbgd_F|B_AoG22hs~w>D*Xh`XWEtV6z>+`Z_$u zEg52Qjh}iFJwoCmy<8 z0AfX_bZVWX7(>P&M!G2PHR{*>gDbas)-Ss{7ZLGHp7IXY{rh5hEvNS}%&rbmi@+C!!liTj`ziVWM=}urrbR!)W9sew|Ero!fyZi?|_T2Zw9JQW9lt{+6pgd8c@G_poT{g4*e2#xh$!1Ci2x zVeX>~c|1W+)0u;prKoOkcZkfI_C6VHk9dW9{@WczXR9RF#&c7%wYSUWr}%Is;wq%d z@ewVpIpCVrO-HBrMEbWd72~Y1@NVp|=GM8CQk&^-9rHM?c?mEmyfQeI{7>Pn+M%p+2r3j zJHwgg9I4t^kMdK|iWjfVC2~+)b!1p?ZAcqKU;zDPO!%@Qc~r_FPy|bC1?ho?{JGT+1fjTUH}>?Rj8OWzk@N z(5mKUl%<^sS>iubEyxfo&v3`m~J?G;E?72537l0{O zVcH}mS#NP3EG?CQTZlm6C~8vvDEBCv>-5lPpDnz#W-@5ET02=0d90)W%RQH@rErC` z1rX(Np>j^vCgQX&HaUq?kJ+wYDeNQ2KJd-g;;U!njk^*VQ@lyz8@kd}+Mz`;>eq-Y zieyfPb1`+@Mch(fZnb7e6iTZBZryN_V2f|oL_<(JnifFBwt8W?PMV|Y{M~FVLR6pj z&ClKvY1Z#qY{}~RY%AFobj(|M z8RT7NEKjaxskrmDD%xe8>KTh{`>uwI_y;1$O!jZRaNW#r(8N!Uec}Go^V+51x$8y! z+w)TTkI4LAIWfuq8kzs^A>;oJ;Qg=7JB$AWc$+v|S?L;@>6_c=+F2Rs>l)e`8S6Sa z8~p7`{bl=(x-N|W_B)LWBh7#4*tyy|SejVby8gfW#%N6R4V`Qq+-Yo#P4%73UH)e+ ztfPMi=>MG73LQ2Ze_L2jsDWK7^80xKDFR8TC1wUA$&tUvp@QSgGOC0iiH%ptp$cg^ zjYntUPw5Kzw+P{1&`WvGiw;*M(ZV`UvIiV#*M!_1_%GEb@R;y6!X-$q+(~~&C0N-+ z{Gm!#@Ra(M6c#jf7D&!okZeqphWabtZ4zl+WLivt5I25yMkZw1j6h5=A?j+gUFTgF=_0U#$Qiv+J3!14(y%iq0auLWRsv)U5qS#y z&PoaKc!U04)@IdJSC_tc`rf=8?Z2AZ7pDKupE>3|fXYA_j`BpH;{9-i` zb(`83{BwKS`3M-=gxl01knDJW0Dx2X16Tk{3js9xDeWFtzkr5>l`q4~wmi?x8- z7!DM+fj6HIJF6(`9?TjFO%|1vIqD0$a^t@1wM8VdiJE;b5BZRrCe`81C7T5O0!ot?GOCW<#dvUbv zyQtI8nSReN)8I3XBX{#4{_JZX+_><`L@fj7v;&FxRDngTDA$mKa5k%8<=diz8VR9L zP~&+Wzp(PX8PWi|Co?$WPWY8Q!Bz?%qM?gYwBIPasJ03;ZZ#-l)%#Mt(Oh z<{5CLS|j~XJr0(Vh*~WSW0K^{bKgPM{wA{9C=~H<42C7ZdK03DB%+th?qlV!li5-2 zyh+plAnnjFoJdK+FWrPD&$1Q@@bQCWqvN>?bA`%dz#1vV?R0u6A~YI5WN|4q0mcEv z3Bc-&Y1F`E_9&iof7HoZ!gZY=WjMJKX#_hTcUKG=C*~Bs&{sYdsZNOL(|fU9bkNa> zReFKZAHHi+fu&ls8a|>915~ZXIu8PeA5-M;3u3HbXgDcBG=EhaG2>K=(g_U_$15}Z zLZCY0oF1M4J?23@|AomhD_E;*UtHHvhhSMr#{ld`j!*7vv$Bggy{u6l z(GnBoS5|e0G0-(?$C~hN+!-CG83fvI?)GvT>jY5*!-f!5;1Z$e8f1B_OH4;}3+nsp zGYqBY0La6eO$K7b_z~~qm2}$tPEskp7R<+Q?M#ehW61UA3 zF|6Y(E^Aigyu-q=3Jp03J7FyIguROuOC?c{YSQPb^d&GldM3E*_Z4m?t~V29R-+HK z>!IHUsN)(Ab+vXG@hAL0V#&3d^XBwdD2>4W!k+fSCZ9x}4~CLe3I7aE&lquO$WEV0+uYtd^RJBB%YJXa0Hf3(>5t@>x8 zioe9`2UeEjytz}O1+GWLV+`Y=dGR0SUV$#|Hqd?gUBC9sZf&_UBfqo{fFv8u5-;z& zhl2%S$qDge=m_*9UdYf%y|^)TF-QfsCEqvkAI6+Q$7%%*pbyL$_quIfF$aR&)-T@n zSd}J6!r%7@{wOUFoXHY!QQv*yHZLSB1#-T;L0GDle!&&?g-moFI-<)LniWGy|{X<W0F`+Yw@w+;+(%ry`>4zq-f$r0z$CS+#I0cM7LcrP zfP?txZ38ds8LadTqyvvVi&)z+`N&VTo!L3vIi2~Ad^2%!gL_I*{^K+YVm1Dm@pj{1 z3$G;?3zq5ApO|=1^`SpQ93{7G!!50f=Br0*8;PfY&i>^A4%l+cz0rC zNZ_IODc^?1w>3cW%*+)NUw@Ps|EIlA_|mhVKN{S@PBVPfa&d1wD65L{($wA$=}PM( zmGGxb>w)pGqldn;$3l*?>-@w5LjvcoBl<DB3@LOvah4EAG|0s zdAC1k&2?mfpC2TtgO3GMjWb2DjE@r_ zbO>U#Vi>*AKN#3REFr@H9i)|3vW*wE{jtKbzIkDsP`L}+kc1{gBi?Jm=%=3nR-Z(3 zyHZh}0xD)H{hhmnPLZamV2_Wc;X> z0PMyL^dXe}yt^NdY_36q?E=;LBns{FMaGefotC0_g|pnTORgHa_J)i(>XLq&_PoC0 z^S+Jtc%8i$#r%FFpurSx|5+pB?QwYv_kA14(fvA^aX^{)xf~x!sn+>9GyYj8!`B{5 zfcYU){oUp8M5bD;^Bwfl*Cd(alS-8Som8<>^R>Sq>*MkCZfd@?d!oHJ47=twIro(w zS**qBHRcu~-EY0dHy7FzDyue+P1n^m(AFEP*KZ5`WBcrzc6AjorwruN$4@nWk6({t zfg^v`_I?0~E$w#5Bp;rK{mik&EgE?-xK6(Xdwz&3a+^GIDnAa!j!1~eG}@NR@Rf<` z;1YcoIslJmxApvY;9cFqjQI6jPNu4Z>TBQQJ&tFauGq`z#4KM*+I?^&U>ikJgB&dk znKdnXh#TOnBf=+-Cg+tA+=x>B`%lu7UhJ75mkTscQE?5mM+6Fgrcfuo!N$`=HW`F# z29A#xJJ#kn`eTK$|7uQMxkQhTyrH^7ag*CR{NF7hh});=Jvng&r)yrc`9082%Px+W z2xCIi;Fchv=@|8kwf-|S$Zq)7qqp}Y4;#C60S4+nq~o-rSkZ1UvFI@G0xiV4$f?Tj zg11_p30y@=1cel<4`yj4CrO&=^7rZ@y9V@Sy%m=h(Y3&QK)YiOU@0wPYczkZ$EY+93zLlV=n^%0SR;q13o>z&D%agY0V26N@jj*UXUie_BWL1CrX zkO`-P)*}|}>p_#baVhHMG5l&<5m)1KY?bl#Dh83aK}Oc`jjGiw@=xZ3X6U3EQ|%d_ z<+XdU8n#o>&G>B*UJtBEDaWG73w6xc0ilTo4m^wy;0vMlodh)QWJ5@e@>vv$vA0 zP?iU60iL*kBN&*npH6gZ?VT~uyT!UAk!h*3W7x*L=*RNW=_RsQ^x3n0UDza-f?2NG zrKXJqIWfBNPr@82Nb!WUE=5s!V0 z7w;c2aEXB&!D^*kuaXBsD7paj!b@JxlFaUwUfji7{tfR zVyMK@t8f;+?=3bHrfEmihP7oa3t`L80qI3l0Jj^i1JuHix5#L>kuS!cjU;!`9?_rG zB#J?rc3vTsF_NEgwwidX9CaA*i^u3h9C5f*0GDc*)~i;(bmy}=5=ubM>eh1-&K@_@ zz8o$Sf0NWq;90MQ^7>?j4{$S+NHmnQJ@nm@MSi zqhEpUf(RXiu|mRfITQkf+>Njt)Zv`Xf1D1#!+NBJ?ye)rQp%kn2;w@ z7=S6=URy^1T?&XV0VA2;byOz<5P$le;*KJ=Kc~VP(!hSe-KZu;QJ^DaxDid16__kY z6EnXWBCPa@Q7rFLGo*`ESIcnH7?eDp=E6J|=`&|PXhN`L^k1Uu*vI3N`z~=t6+nG;< zqD~NF(=ef39^jx&+PS!6uz8Do8F1wn(Q)>L{|l-ot#P2gZ|@ZVm^ZdwHQ;EXgU`TR z+TtVT>Op+ z0QIzp>}-N%c2qZ)3=XuFHk;r=J%rO;EC2!+?H(e0TD9k3aiT|^bkr(bBz-eXgyOI@ zQY=QwRO^PHx9yr$qV&d|{AqghkN{o&CRkwva6ipT6}G zhKs%cB!c02BZ$hc6PPMFZD9{?AcQs+jIBxYrp^WfPDIU~UM<(uP0!+447)!M$WMH~ zKsOtHnPeoNY1Cccv(x{gf(ZlcF2r`|x8Bf?uF#|feEpkPhLDQy$(qZw+XNYkQwc}2 z8@?Bo%GCuJApw+}zk??<^p!<%wjlevqg%!8)%|*7YXDFjZ&z#-n9rVy!0)~JY@HM~ zaup(qK2jXyCteu`^VMPhjjixGr67t4-&WYJ&&!eT7VH@1w*!z}99-10NUh-#+hLu8ZD+ z0sW1-ma2JA>%wf*BdUYbotl~3TvbEC`w zTBJuT=}c{j6PHQ~WhP6V$=)Vu0K7{~dn90=xlVM)!d*H?{9`(k5$b&j;V%Z_n z6E&vL@w7dTlW=@RQaHmY-74BF6R^3?WLgh`rS(i!oyi3b?-Ovz@;%eZy{ik(Cfa`pry5a<3PNWX0R?KnnM(hhOnOKGBO+dhyIpg0vxyLP`?@)j}F zw1Ooz#=>-PzylTusA^o74l{HSdlrK1@B0+jdaL2gsQ#;S#`?#-hZWx>iBTF^43c{z z`bT?~fa8>u3svqERc@3yk>AI0Kfx|XMI=OGZ+*DDnrH9Ij$Fx>%w;a=*v2GTCI`nH9>c)XLUN-+?(tFt_>$U&A}<= zDVkOVnE{f{*F0m9Df?k5IH2TU20jG(B}tI_Tb276lsVd4mwy8@kWE>AXw14(O;Q+3 zwwPc0?BFbi88V9k#(@5Rtgi8 zx8RNh(>8)SnX2Y=QirU1nY4PWlclU?nY3n&WDZX6uFUSsg#U-RcM1~i`?q`Bwr$() z-L`Gpwr$(CZQHipyY1cX?BDt4=AJrra&Ib0Rr0jv%X*uu)*Ro@m}4xeePM^os?^D< zMD;yZ`M|hEhJ!8{IS9Dp9I=(?+~69r(!s-hX4O3fa1r&u`_?no35Vgx}l{O^~|7|)><2wURD#B_UQHxW}S>| zRKV1z^0ELbwcQ_v4+O^R-P=Gdq(F7DNvmlNR~B@Fc-gemQD$fA2!^<9YhR~$aq4=e zHd|BOfYBfxEHL4zZ%C^L5-Cr-r)OWTX|%BAUAe5*_)zF|xSka3V_2?n099)@Fa@%x zSwrI7rc`#eZUdd&k_F|iKd1-yu%5e0_*q@uqOecU{&~2dT~8>ZZ=;a`L%vT9Nw<7A zaBWK;8Rv_PK@CRZM7e#EuwagTaA{m=Gz!Czl;1okqV467%j+|9yzXGTP3Nu2nw&)1ph_Mid zVddO51u}tjpfyQy;!bF?*&hoWcNu5ACfAcLxn%LJXo+T%=57ew0<40Ii`8}}###xO zNszL^T-Ozym)xVchC%LSzAAtx+!LOnJ^n@4`L4&n7lR887uuKAw@1pYo?+U^liATK zg_gC0?xWyRZ_r|MJk})Q*|Du#p=pxG*BScVNSp?g36+{-%rh!-L5f8&ntG_}7ag4S zbREB>O%@se4V~N_1S}ef&B) z0y(b`_=!dZvty=?jD{}J(VPB~n++H_nhIV|yjDHWNFYR^svx~Yn2d_DS-Sj;Y?Jst z9CHQFT4t+i-n{DjZfde&UX?S*8I5sS>Jzwls!)zIN+lNMCV#}Bnqk@cd{oxGSbr#y z!((@C@z<}pS>fDrS8DKkK4T^KP(#sb51l>l6p^MX`y4Uarph4m{o1KSK=T9JyygJ6 zdG!HJ)5;URrc!z;GiBBH!E9pL^1Y-1i$~U-`jpsbsasHT6Bui)qh&3%4;EoMXG@x@?{E>6Df@jbog#el zCnu%F&V^dl(x68WIOde}{btp~BdyOc?>iR7xO)9(XD5*xgNaZQcwpQge!er6=C+02cYfhIUGFs7# z;zrEh+8|VhqxluZAs(_f8+yBUjN(02hW?M?o-FdVg>!8CYw%*@NBubMZlY+q!a?us_E7R6tM%fvN zK?a3&V#s;Ki(523mRQn8X^nQ$85j#^r1p{nCZ6Ph;y~MtQ8G(}cddbTsflO`7Fg1- zb}RN|T~b{fdc5Bgb>w8gN5q%K6i^n_N!3C16AyK`IP{X9RHW1EcTKy2`pehoBoN20ExL?!hAge8I;7Iz82F>KJT02yWI6i6dh3xmdBKVNR1u4-5njVOlpu2;9WL`2SXc~J0rGHkfL`fE z2`%9X6J@sfRf#rXnEk}oA;ZZ!9AXTm%nDu-rO6e}B~nk&p%8xqQJ{{J@>=u8Sil&o z!fNsG1rhw&@0Hgfjjvrs`O@TdLJoxni5&`nzKK$pTa-)xg#<*Wx#xcBSl%?I z!G8E7SAf|R*!Uf&N!U!!%lM9&S8n5*c+Q{a<9N>B#612s2a>|~q5DaJ$KDAxxs6L8 zlTa7jV3S-?K%zKvErw|q*@#+hLUG)ssF(`ELQDAuI1Wi2!z>YixLXXou?n6%>I9M7i|46aezfz1LqFy`dT)2#3 z>TbJJP*L9QH!CVloyP zeo~%8!X=lu^<+i*)(XU}0L0N$1Bc0W86c!1CT2CF<*xR_g|`)4lsr)iTe#$B&4iA~ zY!74KGhXW`aa$0-9-eXwM~JSXir1434pC0BQp&Qha>`6!Auz?LI_`zcnV z9--5;3qV|XH~yTTcgeI;y@jg5l(f>WKOr+1HWvvaI-~7>!x-#q!m-HQp2gV>k(lrp zErpjI4NXPCj8c*9*ILTWfEXbJO`8p$x|&&bdRVUF-`3+jo*7Oo4omeb!A_C>;`Rl-N2sWy-d?z#@x z43{kI{qIo1xa@d@DX_Rj02JbX(?$FYh5>vLTluiS;cV@BokGO$NQ_b&Q?mF>eFL&i zVbh5PLZ%rfQ+2FjJao9DznqHVq#wSXLR}&2HsMDKD&j_pTqOMXzH(}Z4Pe<=C=@?h zLIpybqYl+3N$ObdMgS6G(Xg?W8^Eo9NVq16nD60CvB~~Sl3s=VM- z44d{4Y~?=Kzl!niw}WlZB=4GVbxur}D}gWGKrB=u+HYOzEpw*wR+9aH<~Qik2GJxoyOA;aP^Q(4nFB ze*$+gx^xy&i{yf3wNljX{p7TA)SUkAE31`yx9JvJ+-o=$1JunHwRQ-{4!aSzlqvb# zZ(FAGh#?G>S6i6v^1!A=)9dZog$aEk-Dsqy+_QRYu$hZf_mN-Bf>qj)*Al`Fw+bCq zBbo+5B#c=1j$v`FuZK^0No$Kbzb@nKa_pVY0wqw6cjQ@@QTgj0^V#1HTGlgMaw_+u+NE!RTu**uf7}B$z;Dlo`s4o%!+HAWR4;2dRlKK_ug{#W)7AnTW&eAHO{4dys16;odrkQY^DM2Q`mT%wKO1eoyy zpSe>Zr};GjQh_0%%jZ$OBKqoGjx{lbj$m-{>Pd1N1*{9v)lCE03=pi+77eb!&}5eU z8(-wNL;TYDCw$YHq>XQnZtEGa{4B7-Q1nj$N|2&LNG9!ZrHv|lhrtO=`S#ChGT21| zCNC1`uQVOo0Cn?AsQmII>EGK}X#d-xCA!eG5F|<={wMhNaxf2nemvh3Lhv$viD`jM z)P=yeiwzP4b!Jcz(D-Q;O+o4e$cJM^U5!;?LLvS>J>jtRaXWq2IZ%#Ye2gCnR(6Gh z+&I*=VmdlcaO^$Il7H?ujL6Xv`TB*K-~k0jb!q%k&q#Vyk2=qo z3Yd%c`@}xkZQNJ!t<$(0_%`gmWAp`XjJH~-|8$^Q(giFWbgF$;LQT zOKmwR?xWya7_am7sh!@4cGCVa8T4=T>9e)~h%X10XSb;}B$G0crRY>Mxiwb_UzdxU zN#s?QGX2aaq7iM>GjexE)_9nlQ?07>8tra;VAl#?be$AYmTCSS7~i-VqooTPHSRo{BJ=)|J`2a%m3;s`saD= z^G`BK%g={zBq%-9cmV0#(M`3#_OioHaZkndCX{W|c>bBfZXadhiK4GLLcWB;{x5Wj zo2rjPv_IJGw%Z)8SKgo(*k5y3bQ7cQ%EPmL~gUQL!4&5kK9enO?sac5LlX} ztr_W~uJh-u$=lxIY#+Q8*QHi2cs9FjjVpb97F(rT5}RM6CVo&Jt7aTeaS) zo4TGNtyf3Xd@b-{U4X^rS*2>;gSj?;>Yi*i=yR@!0f>Mu)Uexv0!pR^PWC-ta4oY)+}_cUH!ml ze?R4d5Ztc~?ZM~5eRH{czCIuH!RHQ~o!$Me8sY;DvOAc9kN-TqtJ>d9*`EDFCuB?T z3cUSpdG~%N7xtqPj_(VKo(td0`3bE3zBUjw@VI}cM-bKrt80DR>bB)hjq!=U{ajPG zSROz0gVP->H3z;Ylv+p7wFl0ZWbt!RlP459u+JLqo3(P$GUssTQ@_>z{98;dsE`&A z;)bo&bqmDt$8HY?!RM42E2TaUW2rIDcn(bdfqJiAEyGmzwG{U8B`t3NR4?J|TTp}D z4z4d$bFd`s?)f%8s_$ziIFNq|`;TT$Pw5qz46Rm;S6aR*isf^klk(^NbIuGTE4*$j zE9@WetbzSG`?}01$_4e zf|#9NP5D5hOg6yp?y2RUFNgR{J$gd@>>PDIu_;bT#rfgr`_<)wyz-1mw-e;8rlyefjv(FeSLXIH&prjM^(dexEX z1@*I=5NVYs{2b96`#w&eu@K(aO>l3$hDrNN=MNFjr@f zJufLRFxfJbQw5yZbRq&)4~J z>9nPaTaB;h?Vh90s@&u3)T|Bgq}JzQBgU^&Nz!13d(F?|d31KJj@54O^U0Glg2m7C zYxNnMugCXj(=HQ#uh;W3Ns-7#x39tJgT2l6`*U_Q z_@lAz_Uw8VYk{GaK1r2p^s)%v*j{Px*Q~tv9Xf*n8~`X%H_iLO0Y39l?_E#Xc1BdJ zHgw+*l4WR?x3^`f&&H+JQnCgu1knLmVOIK;eyhv~Tim1(P;^8EKFfpXUpY?y(vJ8|8=n>$5a0G(jTZOtFj_O|9hi(iR+FP zlQT^2YU*1cvjH&g+kW{Z@IJ*fHwZmbEnZEn%FfHi{AMVkSAFY)E)Fy_Vsq^-_Bw6J zaeABt$pyg8R>tLqDnm5E)lHeZJ~T+7pr!|NUKPg-Qg5~h{oAnav3xt7e$>QM`9V{{ z>m3TA!&IQW_Pm=`?MA4`!2ZhCg*@{j3EFLu_IzdKbjyZ*StC>}<8oy%`F2`@&#V~w zQL3x)+>0Rg%^4~mMEk5+8~B4GAfay~=^9+OqNLb%j*H)U#lq}6WQrBYck61CP5o+O zS%)$o`>A7>V~!)&_MV|6yF?;?x5LD49J?gg2S6AD+j!#lW8i~sg4>R|LTvc4EF%d@ z1O?$Tg|x&tMO4cX1g4aFbO)5nxFNC@|7g?*TR{WF3QY3w<$aQn^ZEyrS>>ugs6lkksO5)t8mz__*Q5S7|b%^jEqqUgV}~i zkOKgvM-z%(ty`3^MoAI-^%1}+EFW@AfecGm%NIberis#GYv+???oYKH4UZJ?MW)bR zi7(f`^e24VmS#WRqG8m#ZfWD&hgH$wcDEaCFgAEDf5T$4CcZYlKAqf^66YrZiPl3T zlrFfp@xtfDg$q44W(E_e!V0J_3nBQ(5r&7T0?sW&DoSIXsy2y3o?`}c4B!B33b6ph zg;&dS3>GXvQBpRnstyY-^Uvex-~;-co;5n|-{X1m%p=kqO8<^Gl8}k6W~FdNOv=t2 zZ&xQeBsnFFqlqG-5~=|env^$zHP;cbn&*U_2c#_l)v5u(MSD{85A zvuOL#3VLP@?n#4z;=Qh<+2w+i+YGXk-CxlTRyzL{R1pqwjf2LBE-F4q3n@gCAS4KF zDOgaUI4Mz3L!3@A5F?5ZOBs#I%2jJ38Kt5dShcNky05aKf@Y{9a&9ku{^0vJmCNLS zTA7TD5Tt%pB;8Od!eCUMEQB?1OP;%Oh=NEM3rU2ZpE7}vl);=}-l;pZ&JA2ogoOQC z5@AF}Z?pY(J%Fu|ooPaSNP>cxUA;dV`NyJ82`j{e? zABr-3JNZa*V9dnfclzIcI(&7`C{3Y-j^M%)vJ}hGr2VRARr+2}s1!luC1KK<;=FZd zueKgc_c{1Q;IqWBJ2SgEzDS&1WmwIYrk&fLZR8peI!Dp7+{o%U24I)u4XRr~UFTK& zz{uY#6E_f^cX2qGI(s`Vizy;$qR56X4J#WYF3et%2YJW5vM)&%S~X_{q7%2c@h3%# zDY-jAzDr(A;A2b!TOr#B{i9Pv?+hrbhw5{ZNnnjOfnq%%IHd5eO{$DTh~QiU&eatThzRhE_?H*Uyi(_tA))7NzYVAXIUOen#00S=2cwf2 z%=5)1;QW+_)p0BW0p<_{*dlWn5(oq}`3}XQ>nWm_=nk#owK%mdH>h=meiM09rwYOx z%j6IXJyq*{_h95F!6vy$~RO;kr(RJ#Ss-Y&4LZSj|{ z$U3PIDPJ3}H6|I};w#pibIY=eV|hBTb51(s|2tOF>UB4}lW5gajor`)}s<_C19loIlGkqZaXzMQy=2yWm>Uk=cG!j;_~P zFL=XN#$A^O*n}*QA8Ji`7@sn%-$8bVuP@Xc`AI%A4+aH(7zL{_i)koi4TmdQ2x8RW+a0^!Z9(hbTZ{FuUZfpvPK0)W-( zyx3xGN}!{NSXdH6sG%4#LI#l#RBy!P5j*77@ci#OU3~BPz z)%~&*BoB|Ie&)~yPOZYA%@vd)Dx0`%?x87SBkbI!;^-Wp)&(x}BJuz>tC!HOZpeD} zBb1Vc1DGX-#bkTya2Uo#q|O}q<&eqXdDMsz4mOC1bj#WnGOA3^t8^3XrwY-U%An~L zGPM=00{|mXqxn8cwp0OobCGh&Rw(4ia)VR~Z~z$hd_YJTWo&{$@!%W=PqvRt5gcN* z^zNZzrKwNS{7B%75=!V6d8jOgL^$WeY89yV^k8L~nh1mlni8%^%rcU|NNy^ej2S%b z!a^?8T|AVmimX10 zoldMkFe<7J#Sjo``?fb3Oqc1%(qrqU-yWyVHB6G3Wz%!`p}9TQ2nEO%m!J|J4_@p~ zdB%$7mY;RW^KZtcn)Hcr!{h}3kCm+~@Z}x|VyD$;?(`o13xV9$CH80l;mCrdq>+Gi zp}vrWa0zsci9}+6DbWD=M6wzK;j!rjnbnct7y3#~L6mISzWnx>#8m$J?RQSC)5NEyXsL+D0P4B?C;n^ z(8EZ9XG9j$!=d^JZ^Ntemv{*&)hih3Q78dc@^EGC4coMw0u^i4viEz=KxFm=vY31p zSIttf?l|E^_M|KkK59UTUZ$KVg$M)uhlW{((ZmoOh){&YB`P91TGgQt8^Z}f4Jbtl zmNl0iWnghs7y*)4VU(mRh_#8MiO`r0P(lb|gzQ7J31!R0C&W36>Q5V(#6_jYi4}q@ zfB3+J)N5qu5rinT_OB2^khu>sDUvOF$e?b|90L>ind<~SiBjz~si9AC_V09&K!gm! z;}ewO!ji|>M3#92qqTulOii&aE9N(IR{ z_qiT~C>K#UWvlfm4o8g;M<#{Qy5x<3-5`Ycc`e^kKp$~`IFKQzTh2Z7jO9zdkDP*3 z>ex9NkbBp*^?P>rqaA{n86yBnxsIA3s=eI@JP06F)eS#IJ<-e(;Epu6#Gx!XO2_p_ zZEzyQr`9oW6~;tp%!P~Z%0RSGa&I+2LQKq6q#;ix#f9XJ!xI@c4-xJtK!V{Ugxisl zE5kMCQzLOen3pZlop4r|LWrIHjqZY1u$~QNh@)lfT~85ZuR?EG)zs&Rt2+jh$L+uF zgk(Tpn&?scOh4p5PK3bM)-zej^&2K^e`y8u~E?id5kO!x+rx~Z6-`52%FhA zCXo<|Ql?Qtknqhu2f#{+l7&&Cns|atF`y7M3CjZ_)=)z7>H(w?sF6=|Zv$C!4mdOQ z3IlosvvkHG%tKgmmoZj5iWScp?A_~xS1l}_GCSa(i$j+2-JJS83%Bf>LL6f(lq3)umFnjr~BEg}NjIw~8=HiBDd+sQ2 zM}C4rEr&~C$uc~`=|g_9Wz5VJ|`M zM6G5mOYAtSIepxPQkiWrSiTa|}f`P;k&%~MgT)-hhT3Cz;V`$5q zPem-w@OPmbZx~|45iMdh!UGa4{QTj>1ck~RM+Nwc z(+TIj1kpKhh)hvL79FT@R7C~->*%mbOTIe7_^S`D3ncCUDb;2^Le{gHVdakG>pa~B$pgvf-;)MiJj??e6a)=l=SBmqPWm5V z;fYZhfp7_o)A^+-<5iecwH?qx2Se032~3ru_#d*v08V09Gj2Qq@Zz|7z)7=Yn@8E4w?RM-gOoBV!1TvU zL5u5$pdt}yRGtKskZyU+*xqj@NPvP5tzFN~P6#a4WVyLwA*0`>_WF3RV0eh#wTjjy z6|Cj*BD!DCaI)sD;z-GCybaM|iBOfYpg>Umz!B}MKy`A+WAqIU_H7WW2764NeC3QJ z+XFk(7^gCz%kqJ9vtDgx{gUcK>MS<&t;sP9n8m`OBsRxEoL~SS2ijj$5M~wdbt+O) z{0+g?VT7cG8y48u2B3qlr$@Yo)gcSpK?ip!SU}33*W60Bi1DH3jfwAbkZvSKg7_VP zd52IlOwK{kix*aKc{6{C#~+tK)E3OpqVWvk1E-liJ*;df-rXW);7 z&6EzF-^?GHS0^8QveB2;Agjie#7YyspU<0<{R`rZrzSgOJHqb2N3x*lYSj#2{y7sq zX!e99`kU=;h3se>F-)C@sCr+p_rC*yv#pZuuATj%gXb6+bG~hx?f0jmsv%S@K$0sq zy0@d&F!rzEDjPn=`8fOuyk=gZXle80Iz6w9-(@Qsz^vpld~3}MO?|xnxgEIMvwYgK zWJp;yAMJh?+z{V{cf6+D;xC)}*K=DrG7MPSj9KwZI}SG)nY^c3z%6;+qHPWqinVIy zKp-V*3+=-OHkP*QKvMyoOLK16eY-dpPEO!ZTc0MKTkX)8fv4<=u6{;Folpa(^}cC= z@IcWBoh(XF(HPeX2Fw?r+aNt?SzngQS>(3HrL@>SUXA5I*P>AA591agZ%2#pis$X4 zm(c_$B(~{d3N_jwmZ;vZ2K8I#JnJ?fXz^_O;i_y++Fdb)Q9kO&9v#|;VI^}-ztkv5 zZxMc{&_BTI$(Emy52^bV9IGdIT!?;~agTehG*{6rHrkTTmz(}G<*eg?2iBU2sA7dn zgQ4DsFZ>}|vaRdeYR7qv!#!8ilSMu8`}KErGqz@DC-7rMe$8usS>J`GfhwZWgd5#_ zchp>d62>R%^ZoWbm84Slvb60~8gE`i7vz98wAHn9pi*~B*+NckPv!BNbaeK5^1i`0#AZek`_~!2z4F}rf&-@KHFljP1ea!D?&U}RgXtpMi-Xbo z-8YYocs=wDG>bf6da*fwD4Zr{+%I$TuR$;^QfzBfwsovc{V#%}tHs4Dy9ScR1Ao)aNA^AJU+LqA z_Q2>{d0CEX^zZ!a*V=j|iv;0*obHh5c=5gAHF^WDeEE(e;|&*GtjbBX zJt6ge;5uHn_M|Bwn!6q9riE{H0yP!NSAJ#{7=yjDkS+1LajZP2Zml4|{6f8YbJ%9! zi#q+lS3KbU7Mi`2^?ASI6FAvLhImZ%OlJZq#_ze!?@#0OZpaN7YPf_4FP^%GqQZDi75YEP2B0o+(TP2c6Q-I@tWc|;oF;onuXdz`WNeV(6|%~+|q z)dKy=mdx$iB~E8}p_0EMf#-4Pn%F-+p5fx`&NyuA2nYf@m3WQXHKZ%&dW#-(#maD5 zSL=IKmn)E0O6diG>e0yS<#%WLG6bj`V2r6`Tr#5~wEsne=LVD59 z?XGK&7t=IJb7Sd`8F?O|vqDX@y{B@PWi@>PN?d$}v7fEx3ri6Xr4FAQm+$pDiR4LI zjYV(Sm*3R{-bUtygcHV{FJm9>QGRv(>}Tj(j%%EcbkZ}Y*$1=RG>hv!Eh?0{_foN9 zthM@E3rrnPGEwcArrWwrK0yWf11iiE`v|4K^ktlb6-Sek-m zf?myxGuVvsLf4urSCDJv@On$hY<@{8cxOw(Y;XeAhA7(}FUu&%Tsk-M4f=es4kuUj zfoK`;*XHxp0qor^QC_4t#=;uU9)kzXTx<;?&dO2nty$>nDKhM@Q~NTEuzJ&DeKe*+@IUD?4ZU|x>nD`YhFm=_gyWlko4WR$jGkLY z#wgE551~u-R@v~&x^1%LW+SQ>&!6K=R$uVSy3t?oeCX!FCT-hN>I~E&MVe;cTCm`4 z9)l0WyOy@nYL4CbmF4gqnOcD_g_iarV|+o~yf0lu`f25x~yGhK^&tC10_su_ng>2x^q z5D_utO7?(P*IV^#)ZM*BoouO`o50-CrNhoi>m5%1*|X3jaIS#A73ynt*>^?%Rj|23Or80+`MwWZ2KzU5>qo4Q}%Wb-Be$#DIv|Q)Alyg zbt`U~9%EUWcANJ+^tUMG6UbnOCwlpi;5_x;#uxLODZ1A@l4-kOs*;|4G6rZ)C@QTT zEnMF0U4A49I^Z1OHz(}i9Vb&|x4`=IC9v`OM`p~u;T+5M=q0Q~k#HlW!&!Dqrwn7u;1wj#YpyNS;2&Olg9 zS~UU)kZg%MBPQTXx0J2ZcF7jcCwfdRmF!jui4q3Z#RJ)MlFgGWsM$+c(R?L-!0Iu= zti8=WhJM`$mZy)nxnwC|>1P9D%$P=PEtKUAYD>Cn-Hu+G-}VDbGnZIm|7fHle3FN_$?f8Y3) z4hkHZ`xC?|_ZkE`_Zs9O_f|#Kq|e2m-hFRP(`^2zLDr!UtVz~1P1dZP;>1=MBU!Z< zovPMjD3tm0_8{i6N46%kHhizK$&p%jy!8O*=0c6M4 zOQMFJR|Ap8lUZnFD5yM z&KwcP83+C$sN}egXw;K%@f#E&!Gv%m!I+07ljufu?%4Q-;F0ty`7j!`h7_XMc!5z& z1BI1-mLD4^6*u<>X2)8p0G5rQS>JhX%~qX_soAH@$IQ@#VqbzkjY_c(kFi){yl3U( z=Cc-JA;T3p9?Hjjc70-mjpv_51&da40#qQDbAnVQYkA?y5Gy%REY-t@O9@aDB4#A8 z%-Md5ir>s5kYr7qOs!NIndS# zgh-Yml%+6ERT{-0Pnv?+`mvbN5n!(<38+wF94wlIq@=5xk?P?c{GIcfVx#jWjy$BV zPdx|6^OWkt8H8fYTQp_G^>LA_^BRdf zMe~rJvQgnCh~B4T#^5g2K5aVL(wFcr-OXFQIrtJ4V}T=>%^MSSu2w49F2DB;fNabR zs$p82#N7}2*@y(W!@i<=qT_?LkV4go!h+G3g9VjJl9L3r#26F;v16i1po~Ojo}^Ht zfJUobG>TIA+1>g=%C%evNfFzKs(BCrK7O&535Wq7$Y-PnV_;trNjH=XGZ;}M4PqVW zz1@_<6@?>Mh@%Ls^GCo?1_&Sph#ay)q>=9VA<&(ImEyX#@j6)?U5Krjdi6*0y8?EK zS~+Bj;A{B(V(Z0x$4fUJ zOXdUP_ww>tRC*xunD2JaJP*x4E``2-I}KdQ{EJ)*#r`;BqiF8L^X!Rz*+WzQ{=5i^ zieGIbv+?S>o$L4H#!5Z$!NNwuh+(sB-6O|_TxCs9Zb^V;3E4-)u?S!E8 z?64jBq7cIkna-BvCflBzQq%-5wG7sHD_ocIWysbPO*ZNTMsl6_miH zB#ZVYfm6k!!kt$kEwsOvYhqjU)&bGBFL!rFx6rn0=pu#&UyYO@?wG>#p!`UtJ`N&O zzcq;pRC#ktBxWqfJX@)eOiYyjzKSfM+|i47&l+hvWTSPYZ1}tp*S+gdNf31f*+#=NqGEfTf&G65DEy8X&L~o#m{DEu(oT^)2sH}kZo%>Q?6S_ml^8D0#!?`ANbzeC4tan)g z-f9fZU9@6qfKUjn{!0cl{+Jf0NF{QW@QQw61|;BI0*DOM6r$ABrgiyZBWxoKD60EH zti`j;8lW}w3H*-;oV<*o%&-S$YI|ASlO~V7|Hz=wNCYX%0J{mQy4d&hC$YJxT1j~MhltZe`7MG z7J5s3u(NU)nbzK{Fyj0Rq%ehqNl^HkpO?OpsYUc@RvH3?r47ngNI<~q>I3NmJJ*l+ z;2>+F(^u7fP3u2}rw&>(XNq&4vSxN%>)+xAoDD7dbTlaw(lkM{#W-#l%XJReDtBMX zg-nk6BkZy0wHtZ3_k5_NQqP8-tREuuH#2(U@AFvh?LF_mUoR)s}Uq{tetqH=fD^{WY-4kvV+R5>uXL5%!`P_U=UBWfU6 zM^p_25m~2^PW1Hww-^1@!7>5lO-Tl2F?7_#XC68ej8t~a7At6dkmBb7pI4GYG$}%4 zFeJb`9apJ9wbcbHOIL-%g;N!AN1~OG1c-4^W0z5ZWK|SeHh-a_jNQV(-&SxJliPKx zeNkd{ul;_K+Y5f^wG&0V?+{hqqA-mLjLt7ENLQzJq?zc&^ zJ1qZLV`Dt~l$m>}vdRhp_jrFe86@aRgNpiHMiZ@lu1|BE zvJ_5w*zEno#pc2V+cl?Hwp4%2wER09thUQ2+;eI#QOhC)JtkshkWvo=nCsi#b`GJQu7H zbh<{4GZv~Btq@NLGjB%yg@$5(L613`I@*NWqGh+U+T? zZ;Rw2DlmqYP=iQHmtd=4g<(Uo=t6{MCy3Pq=3z)wN=!;KlvN&8u!-=9Ni4d2g-6eg zhK*$lb-$TXGHaI?iIs>P51GorhKPVH9=Y)kgMz@N+E;z zw9>aa{arIF0ztonaX4NcXb?B1G63lUW+ciORdK;W@a`}QeRn< zlJ$#uWt2#Hb^Y)waGZMfNJq4l4KZc;K{`E5v`GtvoJ1tLq1}{VBhsf;ho{E zEG3Olm7yesnkZHvkx()SUZ7C_Jc4LJyl^nJKt*IZC~f7qK)qy*E8|#-*9H2V?222H zkyGUo!;hz@<)XTopYO%+jdy|jil?vTOw}$>9oCH&W@NA1Hk6*btw?>-GCqz4MQ{OQ zghx2(NI@*>7>}|&CmS17$l&_0y~Z%pVd6x(ptzSnT0XTfCcQ|Kp~Bsm(S^d* zSIJ8l2Z(2MQQ*vs@K2QjD`G>fH~JQcL?xRdD!bt#fw}e`Bn~^|v-+vG4H7dHEXm=YoD@_=i)DC8q6iIGNEaQvv$)1I7&t_Qu4!YP|!t zlwPo_6d>1BDRP~i)eB@H)|`*r$jD`Au$6JgQP`k<5n)l0Nz2-r5u-~lWX??v?@v_uF!){_FXNOKA7obCCL?XqU zri5Un)n5a#IFPWoyO`ht&4!`;b8tGx_TlLYC=z2e_Uf3JVVw`Og6QaZRoZ^AGgjtw ze!Q&auJb?}GC=fwC`zR>m+Y>#Kc}lRd3);_ZlSh5x=G6JH(lWygUs`LvjZJb`L1kn zNdmO%cM=N)?&blIO8*bT%2&g}6Qwc);W8U%SU^M^r^2MJ<$xAC5Uj>QIGr4E@%R?1 ze=e;{bmaB#7t7fVO3YK{BjY&VGA%pfp6<2I63Kr2HQvncmc(KEpCK$T=zk$B{#+^O zbCbUaD->6QvzP{KG}Zc+wQJ<^SCw=^)`f4GD-u44?M`3^eHU`G1=Q2tO5e{WZw?v-Ft5Atxn z^u+%|vxYhUp;@YYE`HSG+9sb|`l*p`DOAD{$F^j^zz@~tseV-@YX(bUK@9oK3BUT8(~@3(Ka*d$Ndym`PcDgK#Ww9 zV~-#*0Yy*bC@GwklG6~HI^1%OZ|~OY^QnAZ7PtKRDgDyUsLnV7OJ73s$KM1N6$rMl z=Pnd)1pVOok_<(CZ>u<{ECqUf_VX4F=X}u?k3&(@&Blc`@+hi1mtud)xNOyQKaEuZ zD4lKh9K_(jVc18C%9JSnnm~9y7+35Z@UEDCph0k)g-O#?t2PDa2KXo*`ZTG}`X`Uo zGpLedT%w)_k?(^k$mdUE4z*@^$Let&7vi5LT;m?gO%-$tjW#56W#(&~r)IV6uz;G= z;T5bfsZi9rI>L|t+xV8g;{PDu%DiPe9YOk+gZi)EU-#p<3HyhIK2zP0Wv3R08vS}C zy=yj}-aBNG<}ojl&lEHk(T~O*{(1Y(h|R(GuHZK4cc#SF`k0Da97*Vb(7;hZ;RX1A zA?}@HWbLi+{KkImRf?+UA*tdqpiKyI-H%3sbEa%IchO7lU$*X6)bp* zj+Dsaiko14v4Nb|gMDGYq|c=v3pfMkQ-2yZMebjv{RQABn>K7m-mknnHmUZmdLL>r zhyA*0f;yye*)QlTyGli`XZ@gbg^#LeUo9HBo(+(lxw$p!Ge3A|9XX;bfL{d9}e`g%*;snBURT)ara zTJJ}0#bz=0thZ4-tElv$Brs~#8=a%J4KB^MP zY3#f&a4@?bt2MN`qZsK3=?lvhzU74629Ri%x< z6vVQ>;vK~+H@@FkgttADg~M>3j(=#Q#`mnbivm|u;d%qd*Bm{n=PPl~U`==-I1kj` zbLGtwA`9Os1ERFiUiFT7A#d-51L1!~@(f8VhRzn8ZEezF!IWeB+@TL(4@my2H3_c` zvKpM+yA%9}*Rh53g{aVl*}?I_h2aUkd>^g@IvAg%dt-UYa6F)gHU(SBYfRDblrj{z z-nYcZjKa0f$INZxqAtVi!@0Gl6C`xJqC?gt%TFJ(X-(~8U2k7zk$Ep$hqrbFB|Pq2 z+)S@AdQBkk%PK)_>_s0ugH)7eKkxM(_`AoG-a)X1+~-P@u-s^!8i2lQT7h@Ruma9zc_OS!>U)27R6CPoJ|I;W&% z2(h>o5>1>PtGdR_@uaKQ>`pgF@-+#>clCGFT z((5w$>JA;ou*BOvX0qpYHPX3k9uBrfevkfwJxsjG4Dc3(m5jVy{J<}n*v{dSwHSvL z*sGQs{=c=jS{Q?t9sTeS9Uqxm+1t@o>JN z4{n-!!>zh^p=>|{z60939+k0B?O(EUdTn;Qt_jCgV>YjYxdjOOb#Jglx+l#a*N!<} z_)69g+Zxx&V%~k;k9<#c@xQ=FHqzHLPX8MeALRGI;Qt%B=SQs_GL!e=<40dIm#a7A z!t=4_nj#W7bWtlP~-=`58-{f312m2qu)fj6!3JIQVV(dX2Bo;A*_r11De89nvT^~45_$qp_jH79d|SY+>W&iA#+!*a>Rxr1}3 zui10^JOe}96>-wnMa@2V;S}(?3}J_*&`iR``#zpuq7u%OW#@4ND}mLqd|I!3XGj-4 zGn6D}*pdG8Nz{X`kB)IloBbMh^ekQja?c%&p=>!(Wnz54TZc^<(`+bJJF%43n*AJR~@CIFt2??XWKzql&+{-==qq{!7 z|Jolq=-2B@fdHH{j_4$9c=i573JDOP; z{Y$dv+&{>kf7wf%OY4oH+wN@t7M(ikOvgH!RUxgO#KeIT1J0z4yc!_=Kcn2Wd$BO1 z+~<2xA(suGu{nTm0H3quwtO2aQ(`*14?i+jwc^^x4~Nz4X8~LoJcl<|S65%xRu3bx zH0vs&gptfWtWDO>M7*;rq?T0sLcpkjr;Dj?IevB`UeXX7B1IVludVpal*1!qk(Un? zlb1K24n*zU$S#N@d(?GF@Qg=xLc-D@iK0Dlu!yVF8vG1!WGxg=tN5WU;zgh1EHrNy z*dLQ*$cpJf*|@xP38U-8@Z`15Nu;ey9NC22#$dkj?2j_D8?i}=`I;e>!SA-Nk-u%Q$M$ur#M z71+Vc@!ZRDv@Me%1)%-s*>Ath**YKF^IkzP#CSp)%ZZt1k@V|mOC*x$S9jy@nkl~Q z&XmrqPX-S&(%O2cjmAML)l7z>^1WPa>B?31de!=CV|o*QwR(1jy}{M_`r;*ExEn%9 z0hC%$+WKr``spm7k?DH;sjk55KTFt6s%dGc3|e4L(CU%UZXI?}x0WdZD;TmZb>pOo3|98TWQ()a_+ z0ADW3jR;`L-e6P#eRXP%@d2K@{c`AOeqd`L?g6806YP$o?R-Z`!_u1Q5MiY}9`Ak3a1*YS@}ZjRDTsxAm+U1t0sI+ycG1NSMM=O%>2mLN+CL>I)Lbv%lb*i#?lce>6sk1NO@3f`rsgLMy!{bZL2sU3ICd z>R}1q9s3W@*G6YOP8yp>!@p^Iblcv8H@V_j1uU?l(vl;g0^v;ICHmoX?I?2VC@4O% zh#c`nIi+}x)ec`})5m)IVKilE-oZhULS8C<27lkM)v%VC^c2Hr6S5CQS9gqL(g`Cq zq@Sz@EDDSOI7VVi`XgZoutG17f?Q{-$H8o8r){atqT;h*=v-d|hcAhhi&*g&a@?x* zEGB5GAr8Kh&VAo{FrfeD8fQzr%QRoh{qEIPKd^_7i^=uYrPq1UB5)pR%)5un^_t5S z?gih=XJtDQL5~(U3`dD1coHntZedgBK>AI*oKKA=57QRRFk}2@QzJ3IvByAmrH7sX zAg?#=c*$NUIQDx}R*gvRX(#F>Z*#0@o@rX`h%Z}Sb%jD?8rfoR9QF#=!(G#61Z<#LHl9~ zUJHUZ$G+Qf03PE>9*E{awkr8+2#J7sQB72agNSgpyb!{M?zSL-zp^l0O0k0sswTbW zSGq-eW4sBh0gCXE9k~N5PZw0_-z7;5KizOYZ!LfF-eVLxy%X9+7H#~tn#zXCrMaz+ zQ#&y4=>*YfT*fcf%Sfm}n-OX)#}Q6;c&Ho02i8!gOY9VBMv#sa&6gW1fFpR|*yB;L zq7?7{`4hYO-ZsNp16bDps-&vVxWf`wh=b{v$>c}-M9^e4Dgv5Tf$_y=ceQEIkkhY} zUvtv8v}g|TpViO>4LN9czLaz$t#ykRTT3*Eed2UB2gT=q)|uJjkE^T-S#c1{#A1NeMX4E%~-q4b;Zx!EJ+3{L0RD z?5Uz7Xz}Y|A;=H|Z@QWOcCs*tBXwO9+k6|}`({_2)=VNt4k5jus^U4J+?FL{&|X%T zjFaQ0YSR5Do2F**<=z^X9%5K4V<8Aef%?>DmhZe^LcH@sx*JaBN{s8Fj)l48aFGh< zz6L9i`wU;%>DO*9HLaA9Wm4j*E{r7y_s0s>ziF1%GZF9u$WE93bUEUtf1%!*ALp{& zN(Xgt{K9cgC_!^mjB+ZEnq$K9=9(J5A7%r79ZG>eh_(XLugHY&4`vGpygk?-a7fP` zdm>^kGo=MJJ!GbiPLJ4dHJTOqA+nX5?Sry3(Hh;$Vb(`w zV!HByrD+LSkyxH6%6`q}J!O;;z=tX(6HMemON2tMj0A5smL6x-6VInW`I54!RRXSF z#O(SbQDt99)3@40?@b<}0}6Ort6#y`5_n!ASqYQ5 zwAh0!U6zu+*X6uw33eI1@_87^D=cs!Q)^>TutYE@Vbl3APuGLHo2(`0{sK7>H5ixi zTF-==SWgXHuLU6o1t3AdArFzqhr;i0eYpt@+F0y-d@e@uwGhhVd}Pb?lpdQjXF<}f zNvMB4&FV2SB7!J1#C0*aI;85Hm!)Ufyt5LU$?RdkA;e~wgk#7>MnM%s-%q+2AMC;? zdE>VlqO%C_N>7nGI)wX$@4^HJCb<+Y-37Er$8%hoSdJB)c<94hWFxoO{?5u1P;yoY z@m-fAmYww-yPFrkV-zUax}d!APo=&JFqu})FlmGk_2=R*@#2Ge#) zvJ0#A;MB~x#V?4D8t_KJ3}lRBD*^;(A&W<3h64PKT{FBVY$y@IhYI3I?_9!AAZP=E z0b%{(cha<2v;s%7xWjsl-C(Q4f&^0vvf>j8d#9YyspH;Ikd?`tBQdZXPq^v>3_C*gLJiBG8B(gcMelj97igWbU^BOD;o)BK!=$Ia z2+0w^LhyzFDENcY+kVtaUJ_bPyb&GeO6EowaWC#2mgcKgQLM8x=(P6LNnBE!pGhyd z{1!!PL=GRJ$yU8I8j&}%01TY-ZDGJ11z;s2FO#S&*IUy4I4z!skrooaz%h#uLjx_i zuAl5gArGZ2=&{i{ACk0*K&}>_EKYvV`CXq!zAzi#cxMc8Hf<30J1@6z{j)R^^ikG4 zRu9J2UmmkQ98lU%auDet1`C}Ve(SN3m6#~TGi<#dr-UU}IgQ~wvtN^?lQlIDPOgp; zH>cp;_)ty+T;8Dx=QnEOEeqcD&dPzIS%xcYVeq~y7w908D-54+Ze_zhjvr4lAauI= zkb(gS>TckO!a}S?oQ;E=kuQ3jk(%u(dZ8_UB<^bcw{)rSTFX90lZPZYBq zX3h#1tUtxN#;JrtSfo;YuB0DsG~5o5uZzN*mUh?Z{RdvulSOuZ6^ym%H^ zTAcrxzV$RbO$b|&b1kglhK)9h@#U@&gzQB8g(zUDy)DN=%O4&_^OV)P%t<6Q&$i57 zjk!#nX;$y>DQaqzI2Q>FZyC{%u5Fv320oP!Lrg#%iMUV6zxblmzkNDZuQkHFj z8LwRy*)$Bhb*f;QQhdxYcJ``a%~OHrc(zK!;xq{GGhYj$iw1zEN8DD2)^S+(^9&bw zsmHaKAb}p^h+?+Z{LG@_mCCZhVQJ+TZJA}o5LY_dGJz9T{>>6}o?X}K2uxQ<8yPDI zhsjE54D1t%^1`HUvSC(V1_`X8Z_X`yBuHfodXk)U$(R>T38 zEp~Xh%R2{ zojJ=pwU@MM{qIYEJ`68g|F6q@QvdsH!#Q9J&p@0hcE^_5${7CV(CJ0YUB z0LdHSR&Cgn3{C#5su)EDSWIkPm7qFzV1_y?b2OS#c1fpp7BvywtU9SI-BKpNvT&_m z-Rg={)h#JKMn$-;C{x|3E*C{0kVfqSs%V>11yE9Xm-t*{?FK3-yJIKLYyDCcU{eM( zfjGDDdo6zJ?BEP&B|{w5lp=9bMnz$ad98C>Lq$(TTt>q%J2%2GhmI^eiV2UD`iUJD zRW^g=DQv}t5Rk$=J`}U2KX$|j$f`_k>u&)Shf!{hsj8Nt^svP7`-q6tuc%Zmv|5B( zrB9Yqve;-ADPR#g8Dl7^mH9}BY}SazxG!2Te@zVFST=$2beLW{*8(YDLR7Y*S#%fK zTWNeIGp`i_ivKv#Zrq;&%!9BlHJ?Kw*oL(BNmK!*!|2bhI4d2R!hmHIsoi4j7t}$; zis~}oFeepMphR99hdlLjrN*RD^CHJabtLNj@OyOuty)yz63Q0+&qh&IOUg1=>P}Aw zL^R-X$pXugc6|oeMpdkd4EYGn0A=;u!e#x@ik5=!vhk;cubN42ndb_b2$mnSMX6LQ`Zjo6Y1YCh>qe~zU_ScwqEIAUXC3Gswc=nH2xeYL|pt5I0Q z+8Xam25C5qSa{ta(z_53%`Ul3Qu<@y3QA^?D{?LSK- z{vFxT{EtCg|NlWAo#Hw(16@=D6J34X8)+$(8+ervIbWa{3}A8uY(P6ggn*ZD%n+a` zLP9|~vY*2+1V=v<`$7=VrKhGBC21%|#22Y4#^@y{B_||hjC2k4L+GQ=klLsUVFCX7 z{iety94Y_+0QrAja+1IxC;$+Do)>>Zw*Jk1W_tDpre=;t298elM*pv3w3VK-sLpUgf2l!C{qUVxAatKBzh&8oaz+CT5- z4yJ!zDu_|s;zgWS0iMC|k={M@Vs{MvXlwJDbwFg@P5!w`CfDz*zRdVoQuRl~HURjm zy&xR9AsluT@%V7kr9>Xpcq5bwE1V@e0L~?ckGV1~1BjWbTR0I}bS%{oT^I=dJ1FvbV;|?%*@n$y_#fk3XPGNIT=Em zJ+Ulh{v_w$=tRFSFPI`zbX$+I1U#r~EUF4X%v5RZ5Yx18ULvjtPfLCB`4S z74aq)uR+O|qo$mqna>C|r{WEZj3Pk)h|(MlXJ?~JKAW;u!Z2c;p(Q=u;37c{Rf{^D>Ty;6T72-u`!0N9(G$ct6{#kLv*vpuVp0M> z6uOd`8)R60WZDkMX2Fa(wi|S!PqF|nf(1z$djivs{|F#qTPGl_0L(P@kwrZx^vx;s z9trXWnoD>7nsc2;tuF}ln9mN-0>%fBpMBF!&bKN?3V)d&G+emhgGk&3eon_118v5_ zNx#)V`}Em!=l{vcaO8+V!G)c;Z!9q-;^EuyhGBWjZoIjBj8)4K&FiA4ePC|AvzS3U zY_BZuM((UuJMjyewH8fVP%U>(O>^#-qQvY%>X@CZ`4b-XutBIZ59QPoaQXazBhWb~j#?jkF>zj>;$8-jwFnRERWu3-VyjEKS&X$a2vp((!j8@gVFB?84WIQMH+-(%p%gCocCQObFc&9{q^HJz2OF+#pTB#14 zwnj++U;xcw&-S6)0=qqA-8u}r`5*&ST+Wbb_=QQ|v^4{z7{tiod>1?SP$tDONxa<+ z`X3Qj`vr2-+iF%%(41B&vhz5e6IHUXB1YLNHMddW&|qajM7^4IPWYn;>%k)C^{TMe*GI=$rM6yIG+cx~4wF00_ge6Ohx9$ep{)XBqBD7S^}#X+mHciv5l-cZpVco$?+wI9WNUzJ=Ms`?{ghTK@u(;?a&KaNaWlg_6 z@X}i&JFWG{{XaTdp;BDFPU3X&lm|i1RcvWK?JH$!tGgM|baD_2mV*;%0o zeP{OjCUj?L>?#yDe#E)8P8%|IXKhkc9vSL6(CQp)QrwhI*d#!;YowQB7aBSW(j7M6 zVN1S7Zd7T~88)l@$W^UtY5zJrN}Di}Ty2~@l;0_&vA#n2BOar%y82Q!VyM7>cWJTt zRIVb&r^0vTZat~|4ft2|Zf^Oxj|K_=unYD76}|s+4Vr%=kpEAlvCF@uv0wjQgXaHP zNNR0kZRBd^;Amv+NbBHcrEg>TFOt~xKa$vA)=F{QdS2kKB=+O9sZ>%oG1E>;BbLML zLP7~5vgpZ**_5ftcqkX~EYA^CsO$xhDNyzG_btBNaM5HDHvbjp^AzXsGIjxq zSVjAZ({2Mw#CR1ANrt_ZKw6ddR5aACn^s=9gpojWt1sUzJPXAoGhp!-09u36pv6c; zQFzug$0(|fFG&RrBoU_RCHD>p`5RcntoNuSf+oRm7NNqXS-W;SOxi#&oW{!}uIAq!NRnRmbwZp;Fs5?-SL=o$OS6mqskBvdV zg=$Vx)~99n68_ov+s0QdwZ6}q&Qlp*_4H^%=2L`Gk=!_9yy>6mK|y0GvW{jv!b}zE zVp*(8CgQ zx@k=<`s5fQixHdFR6-M!@o%scVvRay;cvX^t)lSPXVLKO1V3BslBwVOz3bVpLRT#O zr>(Ysf1Vq!Y}3VPh^-PmA^)ha+pewavxd1?(k8w>`wmq0S|!&bjHD9bFnAFkINIbU z3kpJF(5Q@5x#{f1VMxHaL!(JemCr;i?APuxzqee9HI_Q!F=>&269UKu$8|=q;0D#u z&#`cS2_Xy4FWx7F4Pe2Da!C`$t&xtu?PZBDZSg?hm%TcdHARZ_=h%ckb>xXy5{QP& z6Gws1S6HJ%cEOL>Z>Y)tBtB_0pp2jSU|$&Lii!kQfjl#|M(r93T?=8@Unb#NUO4j<^ktILb%_jxxau@98MwAySgx z?gMO%q4UJeiARxZw815&nBj@iBqH@SM^vY(Yxi^8*A^8nm1ZBZfQ*2@fOexwhq^r- zEponIq0AmU-Gi3;*>v&xNOyI-9Cd(HE2L?nkMRI&Z)bXws!G)0i($*5PrBm7DkP1U z&o`@*{*X|usl^$U4R2)7M8*o$Xw2T^cmCe^?08>9F69RtjMEQ5=9gJDocz5rTc*h) z-n4bqyeWGp-1S(!Dcim+BVin7O8T=$;KLV`lp}YQ6_JkvSiq-;wbW0~QY_@VSix%j zkq9huo?-_ObX+owl%YUFE^KPwQi5)~!^6W_W~$5k`3*i9l<}oQ%z;!1f-EtkkW(?} zP+yw)TRk7ofjL=+`7 zhUW}ude_V6#h^pCXZj{7LS|3#e6KQzV?X}ouFt4i8*hrrpIG>({%SwZWEIcab9 zEstX23tZ9LRp=vWG`7r^11Ac`KwKjOTBJ8L2k}&A#!<0$6bDXoclcFAuBh4VGEk!_ zxxZet?Nio*_UbMzKblB2$1xov+q(DD9vDeW15&{b^hA5!Cds~OmZ@BV#!NE{pDFa5 zMVXFZna6@cv+e4~t$#wdrhPW`Xc7xb#UMJ%`oS;5wl%^CP1P1Q4A>MWm@e}D5 z(!;wF!+8eho>QtY(IKzdC3YMo7Osl9&D-S#E<1`gb~#oD(^5>;%TqPJw%)Lrj$L_x zCnb%s{B(-0$RAcL=d->L?3Nzb#bH07Lrj!FXMb;;XD}Hx<9S7sV-IxYnQu#3anwYO zD5w*7&4BL2;vdPqR`j{*S-%n9v62iB_lfH$TMZBAn@m3L8_=AL*kxuotuV&Qk?)fj zNkXKC*&v4v6f$!oLYV;Fk4{+is?WCH(DIh0qCA@H2d3 zv?tO4QIM2KL^uFv3_`a0Jx(_sz7yYTWR9=k-cQC?st4ttGZLzEXG{PX)+#SZC0ihR zP`(Nm3NXkd!9Z1~^>z*cu(!i+zB-zdf+S5J^wxk=_M2uBM$Ui-M(%bu&9ES<*BTKu z==WTaz#@~`HC6^mAozp-)?OfhxI2yfSu)MFvxDx2<>!FPLgS~Dd(r@tx<0ibkAPB` zdO8>cD%sy0X=QqwLuzc5{w)rEHo}Ks0!C6e8=0_Jfmwl9LXNodM=uQX=dM8dL;Nh@~>F#D%sihC(MZJn;<3XQzYk_!wr zm6pUFt8q2su0TL~t&ag&yynU@H-r||jpZC2z$DCJTOMU#mW6unu#>WI!jjV@Rn%jL zXG!x?p5!ufu5CCYy?>q4ls8|-?6f~gi(9Bi~O%})Bd83p^g{zpU?Z|7T@W>#;e ze}}h&D4lFI9bI<^htJ|dovtnA4knpwQjy&nNIGsJ)D1|jIxa_?>btF_HL*_ROmNTR z^?~*lkWXxWrT0V8Y&6C4i&Yjs;l=C5*`@~&>q&#w>K*Zsl6 z!@=|FwnR_KdDEOIaBd@1!KXC@yS8)Tg-_c_ZIP}A{iEGc|Ff~G)|;3{@NNaPId0kZ z83LI?53Rz%=C(djIDVMiXX>D7AV=<$~KH z7~7Vr_y`(%JTS1I&HC#-6*vt)Q^^weEtS>AW}waaxK$5ea7wdR~%wsVicii5@buil)K? zCm+oxIC^f4PCOQq#7NY(J_MiKO4?W{IeWA?`{PGSexhby<)vXe124L5b$6pC@nd5$ zVtw&o1c&h2ghXPMio;-4`(}k{9wn7rWJ@~qfn_Q?oc$^A?tDD`h&?}6Zk>N`a+GHYDe}GEcjGObym=y!){m zO^yM;<=enuAUyXncJa;{9!fx79{O>i_hr@{;oTD&s`TLXIWB9H`{6M@2(sGYlBa=(Q-eNGNrBA+IFp=eu=1i;3!3ftM>>q;h5pm|^VDn55_kT+A>uai7B3gN$> zr{1-7Dh*fyTQbT#OjWJMF*cl1P`(Gh2W=g{@&Bq@q2(w3Fh2nRJedEvZvA_~ru!eO zTmO5t+y6w-`uDL)m4B~j{ij*Ve~c5-IymatJN}DX)w6$8t$$f3<#lT!F$Aw;YW1gZ zRVL%)Nn{%kdUyNua)?Xs9<&RGL#w%p6&TsxjeEx`lkdxV{@xE8Bos%U=*@0 z&4!&DVH{VUMkW>f;1mSc;Tk*DtR8+!uLZOcPz6CBPCxM%)ywZxI70 z!WuGpU~da8nuW*~{{Vb?39QoE`_kHoZok0^jT3J#)I@mXbY6m59~1wGL(m`H(HaXW z)U@NJcd3&scZ4Ck>s6vOa&UW{G`{6FsC*x@_}M;WO;8`dnS*T5pl%JWESI}!Pby!i zaVXKG#OSQEn5&XbT&!~+yU$W+A3%ILzj?Cnz$5Ua_(49REgaxi!gr|5dSQZ)huz(O z4VvW+)WvSwDvkM^t9>qyqFg9g$BVLUevN3F1yD!oJlwo0>eHF5JZPm`$rQD z2GAt1T`SJLFYP;O8}Ld7g8DN6Qbu^7Gp}VC);X%6S&0{f z7nm*I1uM^+{`>q!qk%PQIz4Qq0otDL|mg*<`JjJb!?yQflEhHGQ zkeCz%k~QQHk!0E4aEvao5X5qhSD=O*XOS8{pMVO;ZsQbPByKk2h@Ti6ye(St-9zLB zNTW=Kp3El=3bfeZ43Lb-V0?*KTLwGf?f$PPx({`m63at@L~|9U^BhFDwHEBgyyo_o+JO{G9Q`Ubz?kut zcQx&og4=D8y7z}bhU^~1W8fhj$DPu!ti+LpIy#tif}i7|Z!Cg%u|g(HB|Ma!z#UCITOd z&_rbtfJjtIsoO$$^Nq=svo2^ADj59ohI-R_4>kLaP~ z0AAb^-e%j=W~pW)@l?$*uT?@h6MWq#B5w|vpv*o1Ab)!TXQp3u7>ov4W>jA@UL)2| zOS>>%S;)AzyZVp_o&^$TRi^$nXFL8ZWA$;G#Nb6`Gt_P5sq^{{P`etQ1b%2L+(^?> zbiI#-1WU=XUL?iALKnj|V8XjP)E>RtT3Q~IP90aNOCN-t`Vo{|r@2A9>lEuzukq64 z>GPFHbKG3_du%;}29^CDKBz%++U6Mg{8h+W);ghX-R4TV+Nev8^3n=@8;!~cEdC{N zTUWz*Mk#l325>9WdVKM}kV`UqvJPDk003Huf6fDckAeR=F`@rvIQ*YT1jm0vFaAx` z(%8(}kk--2!O?;Czy1UVBYS5vgMU3;zW0w*@Rz;x+O*#os=e{b0%}y1{H+Q2>x1T3 z@Mx^jpo&*h#!sn2%{(YP0AQq9q!oZ)5)p9ao*83_^!BmfBh(y}+~|B!*?yk+)gHz- z-}UVa3Qa#pjIQX4ivN0i8#CM=p~tbon@FHI+VN_Ec$i9-iBVM!R# zClm~oj6dK*!X-}v~DLSfv_T3 zbS8#3r_Cgg0>o|N;3O}0kTLFn5ym3^eM1W?1NvAj2ab={^5U>pB*_#U$9@Ct?T`WS zdQ%UNzuN85(^K;>bMz zBE(I6w7MHm9E>R<6_slu8KlEF(Es|eK&E#W_Iz@Oud1W{d3hIHUS0h~rS+#}y}9_^ zw~bH#O{(P$kN@5J@pUHY`hx2DF5mX?boX8LMdoD}BK#T=eSnVC=k4(dD*!NY2%kr^ z=RX#5$qgy7Gaa4$9Z0_|5a84L!JYv0LPDIVnBWrdU7)SfL2w$H*)j_xncY2t;p%-R z(&K^T?k6SyRuh9NsFyl|=#iqF9`CTDf%%lH&;R~056|~L;Qg|5(@UQ1MY1+XwD@&1 zYlF}GdNUgzoV||E>vgjpE&03d^P+y6-|J<>`{njJ`=i?=5BJ5RS42-RE^zOq@HWmq z7cx#Uu8llH<;UzuJ|*OlI3Z)Y3`t4c+_F>{-8Y=UtrlOLs*Xv3it%uDy*e(@gwd9a z0#flpJ!F5ySXnK(>@&)v-0V|vz1JqqIOaq>2xx4)m3!D8qVnoJWb89bavZM^FO*M+ zuu;DP%;co`{4#XP;f&0&$S!kP`$r}DSauQ%-*$$V(3gIi$UUk4bT9(6VjP{FoS0t1 z8lRMKH3E*xA1Yh}xW4Y3?{iMek_@7lp7kNCftM}o2R=)82 zC(5mf?4lMNmo?y;oqIYOB|W2iJlC)`9N5@kgN6%eOy=ETg5P9p!0xbXs7K{qPMhG5v77k+X=i9(&L$5`Crl%_QX_dIwHT2dxC}8Ll3^sIZVg3~m8G3o)QS|H%BYIC7Fk8vdCuIkgbX8r zjG*L8j@=dY6~@i;z7>DUR1=dZOW`ea3JM|ehKy;%tIdYA)|E4Y2Jij|;*H9~K16c) zf$>%5Oh>lBiV41$4rRqEQiZ$>Fd0%3U@hTX`V>xg1@Nqa(XiOtqsI3bQF_nXQH8euo|b9RaJh8f*6LWZ=Po!mVG?D%a{QjW>0Jfr(y|B$i4vABe+o_;1>UQD|*Yzn8}E5wxf4tPVO z9fq1Nzm!-+_+Et~=fLk5=UC;oM{C^F04G^{s0&p=cO+Ux4UWC*L<5sV+_LqZmD8+z z;ge$QD9%R{=E+4=2V>Ks{Zg(ecg!M|T9!P@E^Y@SEz$+QnOS?DnT@H1c893U(vl)c z<2FfHX=YldAE=VWXb60)o}iJqnWc3y5vhQhtXhkTI7WY#`+=eq9=@h?I9p6-ShP5= z9b4O8l}%|u0}zwvAAQ~(vYaQq+6P^v8XBLp z$@XN(@3C$yQdwVrj%g6gO2BKP|=E-YkI0ULK#6l8%E?1r0ov)bljy#BzZA?p?r)+@}D$<;cI+ zIBuw1y=;EojtCQWg8pDPGA|QRW*ubBbttM(oN-J#RygZXwE&BywnLrvwMFySkY=Sl zlcuFgUz!N;`D*%LhZ@pndqh=ThEZG;O!qau<*8xry7p5g4A_-d@;dSel5oTU&kGb)M`DCxV(HgYvMu(P-S;@!ki6Ibs_I;%XWR= z*g4Qz9!=*21H9zQJT1F=MYu3%v7xHU(}3atz!G`EQ#P8OEdnDg)Jgn zGDgs+Fr+GPyG~7bD=L%{j154_P`H6-8D>SDiDQmWivp79dn~a_&g@yQ1GH&pVrcQZ zp4RSYKZ1bsxRnqMAb!c>^2d8*pKObCnUVDX(%Jw|hW&cAa|{C~J*Xt4n~_EKlZKL! zmsH*|=Yw+FWSQ5S6AZWE*xHpVCJ9V3@TJ_xI8KDWv*E_nU$9W?6bIo`SW0C~1t;O; z!0HU!OJ?E2x|E;~m?`J!;f%xS-~<8&X`(L>>nS5nab{=`*qS}j7jx_s*#H6aVdV3d z4?!-enFoOo;s*k_&EszBPo!hP?W|yd);T#P8Z=G}?~r_P=VyQ#$UkwbdUGiV02V(5 zoCvB0tqHws{m}1w3G4wi;W9TWsYSE*Q$>m}eV#rS!*t|4hUMJy3CFP;WK?C%*G}j> z-l+dwr)i=Q)oQe;wtxm^d6C*qK7K>`f`I208F|4r&UCGw;v~0sHD2ZqD&3f&h>ep@ z`a<-YBQ+MlgcUKc$%16T)gRD#(ui*2iys|t#)=tH4~hVhPBLXv$_5>u(0m$0Vq4ow zM#spfY`Ld5h~f6YL59~Xmq}I{l^OZ+5|YUevWRJq4^fHPwkIFesub|t8!5Z)A)wRl z=w~|&Ko>5Phgg=b*Rs^aK&Eh%F z*pd^g$ARVTW){5r8-kJx>vOkvo;*4`1V1{9@AJa!@I2f_7mpoY-6CmDj+>@%)q!Zl z!-5jkjUh3hbfc>DV!Ca^9eUN^i>Ro0)HAw1ZyBmiR{TchtdxL=_Tv|LM@_`uI#(i7 zz%buBmC}T;wI)Xo)*mG-Bx~9-pYkMdLyHW(V+C~AU#+}l-HTQ5*^KX*e%Hf9U zxM-y|@`s;|KgV=q!NM1;V>6797z{Z^4G=*3USb{7DbOjT3QXvJy5flV=u){)@H6p7 zs?cb7V~{&uT}!k8HNl_JZY7Gu)YFT?Wu>%HZ>}fKghmrqtt5ZAiOf8WAgficvwj4h zkg??f6MU4QLq5o*i7K-CR?zy6bS(+aAxk-5O9o#kzTy7>>Dd>B#}+S|)JEB(s{fQ|Y^x-7&~m5B%01(BL}#BC!jS z0Koxb;;7m5COZFlk=^1Tu}5|<+7GTTGAwY#C=JgARb*?OA;VMg!k{s{9>-pt1k;Nuf zuE}NmX;`__`~!(I9$;x+3z8N_7BLVKtnYV=_5#-!&n%YU^vXPvV1}ZnuOIYsY#0#c zJw>>i0&?=5XZd7Ln&xe*>O%!l%TI;WGj-|}n+wRJ!~8)Y2V_uy%;Pv6Y`GIS?0IiX zntBCcRmXGHxD7Sjg*UfG^Eqj^9lf_=Ve=P+CJ9)cp6+%~Y4F$Pq5~GAAn6X7!rL>F z6vd%0X^s_oH&p$&^ZrGsd1oUss z%cgq5xdT2`8ln$^MEiP!fn9G-c z$!zc3e}nLS8!(P$LxE?N1E=uc8|tJ5eDIk}y+bol&BV5{gOSQ6-7gHyhV0z~2O>(u zTQD50IQtvu4eI91U9zBej>V!fNRWe6IG#lIriRZ^z--*g6h^9&=+0UZZLm2*yz>2k zYDfCfG2?<*(9k-J_X6pF=aqmJ=m7 ziz>rd2{)TuH-7_>GOuo&Bz8E=aB_{+l-3cA+D&=>!Z-08E2rB`=Kj4FD8kFTae|T%0HL zQsJG4wjTP-SOyYA_`^j9Wa>;$mx4`mQIQP?@hJ7B*@;#e)CX;?c`qx65es_WE=Tqt z-KE;X^HRx7J=mvmQzp?F81q4}5SFU4>uemI=Th~6RQlr3ztUv&A}eFxh=vYVC^)}% zPh-q%99i@jK3vLmQhpQ#&IWGGV%4*&6pZ=;)uIkaBetA>B*1$XM+d3T$>8f!v1@^| zDoIw~9VR|@I~#OfxB}O6%;)9_Dw(G|;aKHXk5!O(iLrh{YPW~^`&l>b{SutYR8EQ+ zP1}ZfRe=SAc8pWi(J`F$cj%3$3l_Jr8{mES;t&@#^+29y$5pRu>O}sbks!sIdslT= ziAa<`Q6{Fqh@G~Lu9wz2^I&_D( z3{n9o+b-vKBItWjq|{4H{q3QaxTIK*Td>d$0qVX|t{wb#OhWKIMIhdnqdevDdJ>?W zKb;1HSXaScOwn9{sqnEB^aD@4+Cg!gQ%G;wAqdzXVDi44+C^Vm7p4vIY6`V^ z<7w-Y2pcW6C8LJToN|wF4mp&~b2z2}oFh=+4z|okJ!)VM^y^Nf9S2^uBIC|8h9`G8 ztQ3}VloH~8Ry|43l*99Z!lzz>tl$Kl~bqAX^N++_Q^XITLy zLW61%SEC^r7KU>|N&@dyU9LnhZK>oWQWss zMlO{bPy=sP>N`~m4`MYtc+F!dS*mc9tYD8(s-lbp4C=!PAK0aSrB6#Ffahs| zQfY~UD|aSR*>aWiRNTOo3p`Q6ZDLFw7qdaet9n9df9;=*mv?J@**-ol>fCGW())CL zBs;$HdVU<=y_eJP?yBBg4queL(2reTdlC{}G$(HZfb?j75l|7)l|-y`#pi&0eYn2L zzTCmGyd;nN2vhpX4q!ya9iCF^sV*Epj~lEdAgax62v&LHdq3?Gzq`OwDSDl*fcDtn z@xRXSc|Kg+s7d>wqmLxFB&I_m$9e4l}A{goJ(~q)O z>$`fl_cV>bFv-w>-JPGePxKtvv4l#Or+B~a1EzRu@p#!iuSZPqDsjg)wB<~3%yNI< zXtBl?$LBMc1GN(0FI%j`s*l~(cV;HvW5Y1n>|rjf#PPUoh(MYW73ouvlu)P%cns(R z=q2>1BLONhSPL9aCgV27^aeIy%P0J~{P1{Ml`arh&)RAq>J0Z#!lR>VAA(W!z%Y-i zXi!w;Sqkl{Le$`T41Ghy(Q>oM;~LRlunS&Som<-fAw+BF;dk{pw4+W|@V!j}Bs3gi zX-s3FU3!ATO)FE++$kcy`~5C^ipd^XT>q(nw2~Z%!0vF|d8reBMsTE4;Y=Tk#?m=h z|Kw(X?sN-kLPke{jf z68VMMO0i5~T{(Z-VWo2jaV7M51#=&>yhLGN*<2T@_}JM}P)3TIE0KljLZwM_WARYA zh({!`*y+zlxLu<8xoJMP#NxI)9a+=D%vxV>ktE#tnUT&}pwW!kV8N*3MU)1EUp)0M z?{x}e?NdEEQWyRKXl@$i-?polESjm z4yhNE7>&+)fL(rTDB}^M@oj)Oa#w*7{&W1%YBP39$=u*zI!U*BFKnUah98nCXULKq z4KYhNK!S#)hj6_a=TwxT(QQHQ;-P?&{07kj&)etE>!fG?41%OizntJqXX-C`mCx)mg9=OQ%?Nb3n{?X_#vPA=H^ zK`+oA*7VM!nY`tj8dVRgBpaE5A1Hf_`tZF@Qi>!kb)W4dpbe~MQEsy`8Vp?Ca{11R z)PO4{0?cHd0Rn35lzkZ&rqBDmM=@Ee*}UG5=QqFA3Au7jnBkV2V4QdL8x^r_*Cj10 z>Fi(P$S=a2!Rn#H8lp>nd5JwSa#2wqNUGxEIbePOxP(OFhFFhl|1zqg_9!IhfkX;( z0%Tic8c7zXvWFp^x{wrK74;lb+8~F$CO-YcTY1~4x}>5^UUB=Gst-yKC7+}y-|%=V zb-Odj3F+SXeKU?mh|gldteBa%Xr(CY6fN)AG49qXy^(M|)35zN)Ka5pB?Y77w4{p# zaAt?wsv@OmMgo)6wE-T+(-w*~LQ1jm)!w|T7e88?q~hdJ|0$4ugw-T%W%XcII>?f5 zNFBHM;p?ZaelTtX zFEW?*s)@SOM)m~;l54n@Xg-tCJVHX#2GiMv&+_1=FX6l;!s2qSe{_sisOsR=?M$iZ z07DM#e#1bCB3tR7vFX8nR|zY>t)yxBEUzoc4I%Hl&R7p>=z0|$MO-7#+gy?i00BKN zRifQO&-9uJ%(4nhk6T9>Ie1hnAI`O<2_$xoCgim38Y7n)xBmh}E3aEb?;n5!0dJg* z-lEeG?dC{KdvQaR+Ra}76!h)lYf{ghQ`azN-|TNaIOq!ZlPvl4bE_xPb04)*x02}f z=gl@C*B20*S135qxYL+Z>cjuaDMg$2O3zSNu}R*CHs-;6U+Ia)re))zHjN*ZE+z_ zh5zPU#!!OVzQ8Vdk0=C>7Kx0$s@dL}`=a@9>yUR^PmCiyW5fM_MoXq2`I&AHsyE z74oyPGiRGo@(4=~53XAuUZPi@T{kS%$S7KC_|{3UHn>+7&2MdXel2gaH;nww{kb#e zB1fS6E1@o3=7~;~cR}Tm{#{ffW9yc!DViuQoqi>T91W*HG(P3gV<>hf*V`FScPNfH% zx9Rw8U*BhznD!pnU8Gu}$GD9ke_C_u7RZzP74r{zn<-_pD2WNKowh30tEy?c-WQhk zxt^KpwK7l34PS~LYh8%KN*(VkgN;+vg{fDn&Ut7 z*Qm@ljzy!K48~x#YmQ1Xb_uDaQmC?*Nk=x9gf{Ga)fdEDfuS(cx9tw`D#Ih&q&9O> z-WDwMEh7QxnxL5L``Iz+>p(rjBPFdk+O@_k?RLc-`a+MAj7*LjWZRdLJka-H&|pH} zS{WJn@3eA0=3ljP8x=Y)^FMH<@ZY)8e&L%dlmEe${TAO`X_|au+0;k1>B_0S2H6D} zhMuvFW$&*NKCpdfJ$K}FCdT{R5iq3zis`vo#wwizt!NN-A!p)dxp&6g!hw~@*j@_o z=PGj2rtz(v6uRjQ5{riRIP*3zv9uIPX#r&k#5ko+TEImkOQIB5r*dT;AT!rB*sQed z#JtQ*&cgCEo;Wd!;OPf1B4pPxzwuDtZH;d(h$i3B}WNBa4`kRh5WK}j@9{`pARN! z2C{DE9FFD~KRe?tP_EkBJvG?ywgM|)Ht#MrL%7-J`g!+zQ)vOfOw#f@h$io4nn_;B z?2516FAcZuzayi9i__BtLUUtFD^9yiq!_gp73M1v=Va<4g61Tzc6n}KjWRaMy+^B~!BZHc?X+L;znXp%h|pv#r2pI& zGS0;K?ZzJ;kRR8=;MPF31F4n>&W`sxfKBxLJq7=7V95)V%Ry_R%i(THgg1G+xh`gn);q)%YXXA0UwU- zB)P4XxF$?-xUg<+5V<^1%9!?D$-O4nf5h027h-n6TYIi<0>7>nLI(yofA0n06)Sv~ z12y_gIDw0Pp!m@w`io3-3Ts;sD(_Y^r3uobPg>`POaZ=S?KGV^9FQomYqSU+@9Xvx z9)YlEJ|DO1>;4V$&ECvhaW+q-r`Jui)T@&MILnzeGaO!ps*A$`q@hbs+fobzogd7h z7yT8V$K7UjMEiqs=a8Z3cvI{Pu8DBHcILc-z|V%~S~yp|iGgM(N+XdpuO_9E zl!kSDdtVmnJbIt?KBX_^N|ND4_WsF2+Upv7kNXUviUQpuob)-VAEf2V^OkAF6G?zq z{-{>eiEzpdAdIRrSj~BpjF75CCGq+Q%zdt@6^!NQ?f@sL&<-?kd3^NsjE8usRsv(` zG-Xl9oKG$!ny{PTiP%@-gemLEghw&--tDuUT95&S=)28cBiW)L7lqt$4{bDqKB3n7 zM4SM9G465v@P%sg>cGRRK%wUrIK(`?!pUAIv0ma|{h8AHs#JDWKj# z)$*~w^b+ig1Vfc6GJM^E$POc;$Fjs{9QoeJE;Hg=Mm%S({m^F^Vm&110wPCd{3VY4 ze3;!8=uh=ymV^wh5Zy6@z?W~}&XFerGbwfQf>Ho=_q7n*_sOPjuoz`bn?0A@6Q?mZ zk)eVw3v}7DeemjwCuS&e`#_N4{?3#gNB;>^`v12~ zS+(*r0`$-q3V?Hpq?kKlT(Qh+B z*zV&{qD1yGt?~_!z4ne3id8`S-llq{FIX__>$EMIg}FEZUPn)%8L#BNh2l+#%urZ0 zulWy%uwowboccq_&$x8_W?EXab}yp{J+URzE~kvV);1%IwiAx|CDc#}$ECRvs`jd) z6h=F#u?3s~ChUk~N78hr#FV0nw6rs68uP~PcAh^JS6&&ns^mq*gvZ;IFjt~dkA)oL z=||Mtu7JS^oLo5q=>`*>K-p! zl(NS-?!H~cTGOi$Y0lPL?wtacxxq);zBED6H z)M$J?o*_uV)piyP12?FnbMs5*HED<0{x-`#o*u@zl)szh(6?Fs*bzid~9xLJy%A!CQ0ca5rLX2NT z{d-aL_+hAhZE7Xd!Ou-Mj9?lsX!B=n`;)!?{;j&sy=C+@K9%U4I%U<~KT#d>yHfZ^ z!baoJ_PjC6`drcXAl+mJfnfci~hJJRc@g?%f5y~ z0d$v{K$ci|QcHTht7=Gxq~7&0XXS8HLmkWCy6wx11utpP=oqpA;v?sZ{dm?zk4q78 z>wlBWmKXsQp8rHHo5HMclcDqFzva^1=x=iAm-2VHtWNxvOP1W1zvNOG4fW>V$t9Mn zM#~bdBA8dA+I0G9gC$y|UJPJb(BR``FExzuPA4<8XH-GnJuWqxL&}V5Cf~^liWUpO zh6TDCt+e6#ra2z{8uqYz`w+V?*OxdnrC=^J)Qb#+Ch=x!@vaM2CB}K6YZktnX3^J% zam8prowya%2P8$~i}JCS;uUaLIYJ8=>glI?zIm33dev7` ziw0ru2w%Oz5irvp?0gFzO1z3`FWn1P$LDWfbT4SDzu)A+omsbtU}p;T7(clP=oxs1 zIV4NrUpw7YFJL0epRnT3^|ytX`tk$7pyr8?vOOq`Zpjt)AhCvpuc3DMJC1RkoR*JW zRee64mX}wPJb(D8_>^bd-kc>Nix&vFDuTs>-6UF9J~xpF+5GfWF;WFv!7+3ZTCw7R zveeqSh>C(VmQ(ZBJCg={@RDrJkn?Cf4wCZ}KkUt3Ic##-pG#WRl=vxrZL@dMqrX1$xg#KdZ%f4L9f*n{P2D zch;s?jE%u&MFURYju%w&@jNO`A&+@lvSj^Y2tE)Ak@KRpe~_ z#eA}6~C`y!7fasROgXR@0LY3m`#|A zt|l2bRZ_DNwmL;u6}56QNpzQukYCRuL#X@HH%|GRNI-Atar^Zj^|yP3VzY-F}NJPo%H5LYK_xp;!XbfJ*N zjGAV>P;S&dP5h&99BI5rLUOR}OxN9ENpMYYxk6OEP|v-}Uj&Nbc6Yxb;d+B^d5@R8=1DI8zw1+U6_a1m+zQrxb(FhO{LIK4 zTP>2sm-i9t2ayTzFGb7n59yyTUtQ0Zo&t&qrX3c%r_@`&0JD>Um}5DVWb!Das*a^*T+KtfqLL1jv`L~#SZTMRKbbOxf5b@7Y=-U} z8FpxZj`ox9ui+N_kF*O)DgXdly?@Tj{*V2<|8qmx|J$v-|2Nv2|6_0W|6yD6KQ(ll z8tGX&n$j3q8`|2KS^rlPE@%JJ*8JDeOHsoHQxwJfNG0-Gf*MrFb`5-!6&rL3wz_=n=l1!>S z0hS1A1jVh~T408Bglk12>1uF^KTCJghQlWXpl$1RrDL2d>FHao6Ex97u~#(qbHlSg){E3?W7qI0qU}tNbK>|5Ji5$+$sq ziMF!}Rl@PBV*Dm4P%OlmlNLDpbta1 zDey}JJVl<@?_sn`5R#pf$t7`(WJYm z%_~gW$2D)gI&;9}ucQEd*u;I0>c-$(dCiM9Y|_nuw!`M#sLR85Sob{=hq-$~iK|N! z#2E4G5@A*8mbl~>AJj$6iLFOCC8b%j$7ou;($+S# zr4J2W6jP_L7Q~HV@#*TyD!@pRV^ajbPDEcx@SJZ!t9f7c6Vt=y3{p&WTe9xG9-Qh7 z-7_72NW^j!88KGqp7;Y-?L(C)c6^+{{pwHNUaklUs+Xqa&5f$xD_$T{pLe_{aj*G9 zacG+Fu0BLdl_W!@!>s%$W18<+p>*F*Sg8^tZXud=nP^@(s$DA2oe%C*sjS`VY*w1L zG-bZfAHFI3os3iR;BECRD@8)u-h)ClD3HHPa#S=`&$f;I<#l>QW=|hQC7{`!T4-vEc)>O)WSPMHV%IM12aB-&QLKm0jS|Jk(7zBwMwHzHzus=s-bH+*_%>c)4FQj z*}GKcAVUu0`%e4t0Z-+$Y0j)6m26c^xN_)c(+s$$?i5Bydom#RV>g^Slt>z;q->?E zs#%j4)haZ0Z8BnOSr*;7B~($SNU{8jnd^{WC#CbNH}ph;hwlgSS@Y?-X7tR*mIjQ0(lb| zFfw0p*u(Bsy$HRWTy{;q*2no%_jUCgU>Y$NIS!f0&^@oZW*M*ul3WXkHW(oVaG|g= zD`i7;zp6C2gx)J$aOsw)P1Ao4P^dqS_h;0?QD0e&1SJjkp>K7YU;3b%$Q%`6_86O3 zO0fC!F38x(g{N?CZWA)t(TMR$S(<0{?dVCz!}h6p|2oV zI{JiXg~{I%c@mYg4#|%E}T5!7mY%A?L_T z1WXX#GX(^Ku9!%G%$s@mSbR5ZCJ^`=jsc*Y@IdUkmT)zqqSdEA79~-l`9BQT0v)JK zk4o<^yd>HQJL+{|tn5bT{X=5comvoqsWVLSPb?*+xIuEO@7cMrQ{f@J{2HnzJDRPA zF_~(pkt-dY4xWwt8uYyo1?krWE`3PO8d5m#=0JPfDxpo6 z=BM=oN41j1!cn=zBeQsdTjxz)t-MXey!LJ3!)b&`b7^r$Yg?_h#r0}^R3ct_lgEzA zTLm3>84)9VHG(%;9((-X12$#R>-zqx#8}|}T#5f<3HqO_#Q$_n{Qs>Q{okm>$N!-c zTmGNTeE-vTcd@azFt)UD`PaBjV?6^$8+$hzYaFUDdi?L;U#jz8#|y7Dd+g@M z$Ik3Li>hEKj?+88##BpTWy_^2A$^9%F_OB~W3aSy(`BB^%iIFf`q8yg&6mC(ZoVD< zd*Kc{%cE4WHurScubwFc97Gb1bF>qZz@0S!)D;hUdVsDk(Zo`o2}o>zetVhKrFfWL zX>LIGL0lOTPt10j*xfRx3{5@88zlsp7}D{3qmj`)659LMU1vx-Q^YZAlk(aH*h-V< zzWGRs#czr_+`fOd@2_hS-(-ho7hbl0O97Jf_P{T}h#(LOUa`41=AFQwD_+XyAHps8 zcl3nT;&li9T_P)zSH)xWL{$}SZozN8_Pj113MeA9Mq3XCFg7%u^rODmGpU*Ixx$qL|?;MIwVTZA|NZ!3R(!UQqpGVqb*7>+~S4 zoZ#_zcs(H>hMI5rnRTD?Dh}Gxp_UWPxP{g1juCTN%E^x zc6U6z5A(>q1}z+4p33Q}yIS9GPS47_#Z`2)ynP;guCKnireF+jd#`v5uc|9BM5nh| zW%huN?#t^T>i*>`^ztKtZRpDN$eVVi`BUglXiz0``n%ar>l4fS>*rSYyBtE{0f1iG zjt8XtcD73LmoMEG5YzX3;17?T1?p1zdayfv7c09SWbN>L9%pR6+W@`(8W0T0?jU2&5i5JU%-`aB zeclko<9i?Xx|##;_UVo%Z;#=7*(-*}YlYwX+8g@1swD^i?9>IS=Qk5Kr860cx1E8S zV@h}_&afDq0r?FRbk~qjE(Ifi|2ytT@{{%ptn<-}09ZxmXk%kTwR>di3Ioh@y~Qjz zK2rBbEu*3u%aftiUoA0SI`vPm<&@?0$_kX@9r9?(D3OYw?4q|>m&gqv5Tw`ex1pAt z;iYdcYx^%i%%BN#T+7cT=Q7<7x^Mbo{DIapv4Z-@@q>3HG{wi}X(_puVq88*1F2X& zIfI41wJMXjj~O8Q;Wg9lz?fmY(uZX$ zjd`dgNrX^WLaVIZ>nv#$<)qA^{1R3Jx&Y|l$112Fh{(&!_}u}#VnO(0Sgj+6S-VB? zT0p~>oIL)~o94qA_f4k%cwfO4D9DL7qZOY>@34)h6fzYV-F2fB|3=9; z6-p0?B?tEy0fxyMuv($eYuY^2IV*iqC|mKQ5Smy77h$2%7%HqJp*&pOD3Kf93mp$K zJZsiF;Xr(skN}W|FFFN6`8WCyG?HIrrzvq^&ZO=%35inv3agu7qA)hlk>)I~2%ZYk zBtPIRr%EuWhxD~r6}T0=Mp-F(a0v5SUz#3AQYoVT8GDcUHooYir)VvG-39-hqCQuf zKH=0g>cVubn%SQW+eiPEL@^tSxir!)ba#JvVvnr66khupBCf7{f(2H|Il-Tc4L$wg zR_s~fh)wVObHH13P8tj>qC|dTI;OwB2n9`+(Be2TVCWWG{zO+&;XZQD)f&#ZSYjdS z&irJr!4Yk&tp*Q04$immD;z7rMNg}wOd_#p3o-1J!rc!e31X4I%2o3Vqv-v9d6SQN5LaC zhqHCl6nA-BAxP1sE;hN8do!+fzm%3~adZ(J zQJGME?9L{b#uQQtOd-HgGJ&06kSrLiW(rap&>*UEvZ$y1Ui@wh6`~n#w#hME2&Oty z(NhDM9YpyPMN0*-aSRTu@MO);=r!G6vj}lH301Xe z*Y}j3e?t9xTyB7Dx!G{{C8_eQ%xtwT8m0%dOYf8u9rri6U*rVbtdBr8KinOc?s7of!9HF=hyI@m2)jeAd}$Iyy&Unfa&OsY08VqjEP1*HjQ zmJ0cfU!g%bBme+KK=bu1N&)e(q87cCYta>m)={=+ut6Ht8)GEvO*V1K<>2-k!gMOz zu3a)HD@_71XK+xl7iN@;QVX&uz!Y^P8o%xg^-q$DROy5D;4FL}pN=gT=h#47Md+4{ zJ2lfUmS)Bl^5?%_9Uoxosm%Bgol|aVVmapm6otD$IW3qwT1*$NxWGBC(8E6Hiicw> zu>cRK)a)Ho-bzi(zW0C|&=@E+N{-bqJX#j$O)S9z^TKKTqDdgSC|1yrR4u49Zhu2^4O+gmlX zTL-khzFk>`XkuCIA=*d9Qkl31YP#Use?;zRvIS^*&1kwH*t-P>=wU`#ve?>guMGo6 znfSt~pib0DO|a4fk(?t8FiHkJV;-{#i3ArCtvxZD1Zvt4@2^@mN5`HWg&trMEJ3u2 z3_C61|7f6B(I@Y_qyR**J>}&hk*k{GCl%zriu~h#=igSPRjDEBvf^S>Is?Z&;Sy?u z0YT;Miyee8RnN0V=4Y(F%!aSF0HdM8q5$ZSgVAP z^o|i@G92+Xd4_=svD6u*sXKFS;3NA+{z%omUuYO={ou)DRYJ%J?l6;+Nl0=63Ej`s z`hX@Y_@#C0qew-b4X=jkMn=wpj3u;Nim(MPB-pQNGLXBOWJaF` z&(c^3?ekb19KrepTe%z##8pzhjMB$rJ)9q?bZ8)WQqg(wp~qHn%FO0_H)#`NTc_qj zlltTu!4;LGnv0dqyh{W%lF(3Np+}x_Horaj_iu%Lv^09Q3t31is4Zy_%WdnsB9*k; za$_G9$lXaI3z9v3=hE<`N{UZS?Pn;gJ?Fe7)}Qw#zM~~mx)v{JJ7{Qb<_P4@+}&D~ z$P@7c-IhDb)&h4kO5Hh8jkutk(EoIukhqJI;p`q4Yg+9BMCJQFW%S=)qZHH z%Q%Jb9oCNWiEr|&20)Pc0FrCAy4QaJDHl8I*YEJpHt-K4F@cP0Lh{)|l&tgep=wCZ zE!`=be(V$;K(_FQRbXrF2#y*Nhgh=cL*2c@9&orh;|wi8KR~I7g9J12LqFR~gbq3$ zPH>={5;x0;=ZyxG`Roohl^-Cl zO45L)pq8kwr`~BS2Q^WFZq3*n9O~R}=kz7Ox#oO;2B6?xWO@pb zs>i?Yod2kH+r;Qot>OOOo#%z4dJ*caSbU$$`Or9Y-GPQ$5=BWbgRQjf{GJ2LMzjR! zBtz~a5>fHlMaKK0jx7;a5^&Qg8bZ%;WL6BKXS(6l&a7K7)D6*iib&cT^ZTb`7Tk}B}sfX!r|-&35v z-OFu;!=+e33ewciJ-R5b#lEXbmLKBIM3*=yOGd0eBCR?M^@M3Bukzql|2;1)L?mV3 zH-Ym zeV`WZBG^aZ_T>fGmMz%b@8$=vg;ATU$(<;9Z4Pm&y5#R*p=s0uo%{y!psc?>Kk`W5 z=!9pO)bZ$b*OqD+>ws>J*?jp9+N@)k0pa zLM%IML5GdKbq?{Z-;Dc*VZRe6Dath?PK*+qd5Zf{vV0)$4(e7Wu<4BYVW)3?)90(# z6evNWlp^d|cpZ4GtKPd+_2(>BIo8sLGi{cT_ci{(AV*||pBiy2W@y-xnPS&M;*b6YO5JqV;Gt&W47 z)79-KouYV*?sM|4`%DRW;jG~?gNM3aXfw){Zre|L;8IgbhcUZZgyd6Ki^!f}&6`@4 z#R}4vghI+CobPMK2N0a!ZUiq;a6zXvyf{T@B4jl7MvdMyBc0WEva_eq9 zdCryOG`pXnC@5VnX4iU=*$A{3ZK{>}Sc2j|S)AyoLO~Z7tWF;@&pS2tF}aL97BNr{ zto6N}{=B>GhQ2fhzF^&03rfl2nY7VO2zY1HUwgxdfKoCJDahWMa!hI3eeD5G5G9Z< z>B1~O8W)Fgor#FTP>Ck>uxAp~%pztf6Q)`iCHPrmH`Us*9TJ#}D7f_QJ?NKWbe|0< zR99hs07psZ?~kh2{o0+~HgPmWT@_;jNd&2Q0-4Hc(M?9dHKfrj90kZw^HjKoZsx*tER1UsOTR#uoz$+or1NMqk$%%TvF$1KGLNW6!2{ zjFVOU85mn@)uu$}Cfc#n=Ea83N0F70){{tR8={I)@mhHK>ITfZy$Dkl*{A;m`x^@Q zfaKvF(+}YjCf=WPU)~P~3v9`J+Fo7{OS_XVV=Bp8V#$0xLo&&HnqH9b-TpS!w-LvD zS6xpZ4q;sncxiZyUHXAto$r^oTi0)7ub&4o{^T^^5OXkF60tyE9c}O6o-b%AFJlMY z%h1)vd0(U_x92bSDxwPEMeo%~%(5^Svzg_TJeOzS~fF-7AnBMYZlQ=_&GnoBrYu-!NG~JxOHpA>GfYKQ9`? zhxmwHiiK-Kdz!v;>S{%Yz!GXbfDFwbScyFUBG zl6va8C=u?+#a<8!mzYQP}<*y3;nliA7re29<~9QuXrMvrsn2bn2S4@|O4Nc8_QFHUWk-pO~qaJqHJv!o7 zzGv})xhu_9Ku$8qrZivj*f~^)PVOI1C{ba)5x;yiOQbM245!3bJ1Zm|(y~do(9EQn z#%)Erd&E3XD{oQQm$udoG(joV49O05eLS^K;;e{hWwnm1(`=PAmr4KLL4Qa&v7#X2 zlu$8q8bDK98orr`W;wRM>=`hz#G$)l$YxWpDvOf=rl62QD{JRV=fuovGULbquGoBUqqOGBVP?EGD5QM5#$fz6bZmdmsoh#NsAX6x0KFuv4oij+9=JnXQQro=fYPCKe zQxeRuKwpOWM`;b|WKCHwb^v>NIqGOW?7J>jwrXedo+c)usuohxB>S|#A00deeeIu~ ztt-vah;+w+$(7E-3wc09+pEpLN5x4vXxMY?vtb6+ZJOlEh9d>aQr^NA)H%Qf9}|FD z(zYS?OZfY?ZB2!7QIpDLWaPR%n>atuCS7Y5MkZ=$jCdd?EaeQ6>CF>(^tI_D&Xr>w zm&p&sa`p)I#>3c{&bC=CZmNM2b2PtM#^6O=QVcjk}mctz`3VFa0kov+o05U}LVmDRY z?BG@r#l)IlB|8mS*;^vYHru%}fl&PfLT=?eCA4a1{KBwv4&2=US#|M_T2kXj06%aW zHF|^4062L8Y>V-pjr2+~_T0k+U~oET>7=dIjJr^osnw!7k#S11eMZOJwzGWI_bI8z zEy_)qM~Tf+JK0bFt+XroG8-|xuJ6wQF<6(k2^qhM4Qq*in~sV=HmK(OT9$YCKhilygf-{%G+h&jvnf`5yQb}+(SvAf3P^HVg~q8+Y`x|51`(jNc!}U zBI`QGsq$pNBR^?>X$(ph4i!=wffJ}RH9C5O`dp}k`}zTWs?cD6f@YMaj)U?a`m!F< zWGjV#oKuqBv8C!F`9A|%R*<99d3IV>B8DM>d4(OM zZk1tj967oBX6tJF@7|;lA{gY17S?|^@(A-N-g`}KvQ>yXJMI<{7iLnb*4O0e7EsFa z#y>e`=kWZb_w$JrHJp=^?EHC%eCr9Q0A`n9?}9%Ka#{<5!x3wsgfJb8u#m6dJ1Q~x0gfKV--ayVFB7!xxqf`4rsGvHq=!LC*dabT(hEY0n)F; z^a%E+REJ#R0eJ3$F z_~W+nFhTk4urP7+MM~L}q`ln#f^}>XY}KU_zk~58&Cm5bs4?J1_0ma1Lj_bBhq&Bn1$8<|4ntYT$k_||z;ucrD z{3B$R6ZfZC5d2N>Ygf|&f7V0QFnz`bOEZF)K9uHBY2kuRhfDoF>k#?UO0*No3{F%O zPC_Pp#9NJre8d`Bo4i0_gId?1rIxv+xJI-48?ed@Q`y59a>J!#ExeRjX<+Y$soT)w zrPvtNVmlMfQEnsO#If}lcdJ%ZSEV^&t4V*_FQX@;2&w}f%hDo!blh1>Xp7(j)gqD5 z$~}N`zX0r&JDh>O;U?e-g|Lg`@G$Ov6-A*T<76lDs=Xr6ietKHtJ9@vqLuvQh_~V1 z==103V8u0hDQHBsIUsndrX5#Gk>y)pDR@trC98pX>?jaYuiWZby5-7?C6pFg{TAl_ z41@FKwq3m`CL9S?uc0PHKxe5y;59o%tT%VxP;2%!G}SiCQ@`AmGJUnWB9C8-Z%}|@ z`TI*4o~`;55B9mnTp9t7185}pVSAQuUZaSdRE1bzV$GN4r3=p%MwE(YX{|wJT6Am| zAIe>5i)GC+CXyw?O+i(;iY!vaZ(?5mgw0@KK`v~D0DX;NLgjLy2u z)0!%Xfaw!#Qrh5x7m3C34eFa?IbAz@wNj1Fny0Dam1?fas<{B2-vP$p==Jpt{YO}_ zL7FhiSs`o8IC-}PwaA*HSQh$Hp3SFMB2n+#Ca>EW+&6+D8fMN|Ii0NT-6Oh^(ki>9 zvrxAiC8nwpe;ch6+inO}11N!0s5Zq3a}O+{Y(Xj#8ptrA!snEt4qvxft99v*CKUpT zGxqn1T41E+lvVK*}d!wyMPJ%X9IUqEKM>D2J)eu^tQWIQqBRPOOxO_{Ems*3r>67Y3EB)|sGj zV2~;YDkcew&B+YD&2^fI1%2i9#dUJeg^95`IB0pFeh`CXmGN7ScM{>)tiM>(@yMC0rWX~BKz z-AnN-U)_gm;k9v++0+gC7DTrDR+1rbbnnjFb@3Ji;$kv9;J%4WphNbC6v7-8Pw>;I z_^=khe)oPPMmA8|SChvpDHd54NLGsXy{Kb4<{4fa*GXz#N59Q(^`sV|9<+Ds90Q8! zlu)erykZo%vL*z49Hx)Ef*G~^5P}0MWt<75KI0#rO33OJ}1l!78kI+C@4eqpl&Lr+nsGD8P7XcfZaa@M~XcUcqa7`;41^R8STHrC>q zMrD9S_`^>p;k@BY`8hG$r)hF-ryGB^mNYUvFbx+1=WQpFSO;L)TON)7+oCud`k))C zsZBDZ?Lyu9g+}3b0OG=$K{G!4As^tEWG7>8#Ey37ANOz9>Au^>@vpO`jU^fN;GAUr z`>Jk+Id8tobsLuXvgV&nA1W2rB@x&*jx{5vIo_X9Xj&iMvR=0jb}5ANp)a1XaIvI> z7fJXq-t{vob-BNkfu4`lUUf^D3AjG|I;CPwCWf-OAt~tT8b-Er`59wk@19Y7_;4N` zuWc80&2AY@pY}IrvUrjZjwbxd3;@8KgA}1JO}kdd?-YwAQt}$ z!tC0ql0q4DS4ehfQxWv^5bY^d%Bw^smpl;Bc;mtT-RHeIR@fO&9s4-mp?U)Ry zxZ%H}j9e0Hi80d=7E5ZytZ!QjSvf+sY>M2WS6Y;1Rwww~j%zVbfr0B`2-v3Nlp(&0 z3g(j{f>01$U>jWf;Xjd9o236Ht5x0SS2pRx&{=2Qzen!#k6{O}<^WkITwGU#*Go#abHrJ#kQ0LoI!ldbKDNC=cNcrv9a*CLXQ7?8KXq@+4a z&Q!DbOJKeHo4}f@(1eb$FXGd}ra7VqjeF4)Lhlgh?&dH~xnkgfS*$%%&ggf9*Z;H4 z$(yNEYt0VW>7978%!bxn8EBGn@Y%!j1((gvn~FhS&Qi5q4{r$5RtaTKV;^P_IV1GQ zsC@wwm38x-$yY{h-o{J*+W&Zt;+LmjePCz&0ch$hFy{dc_IH(X&rg3)(L?GOII|(o zvQ(Asb=n)jC_j7|F9eVEoL=xq4Q!33iX{nZon$9>Kl`;^ulKH*oMz9;3{K+*qvBcH z4g)ZcUZQ4KXh=O4V@GeN>svEH(0hmwUy2&^=m-T$=@8t8Qq&MP$s4#5NguYjh!C#) zA7rrh(euBKlQq%Hv8`W-S)PEs5=x+*^_pz zZ*nT?E~&*iXFe zx@5FA*aXf05;TR3TEGM{LfkVqUJGCFu+Ie`4srpN2 zr4s(GG}EYu(EQd}jn6jG`ZXwbunNu_<)T*e)mc-*?r2_%2th1eqw_wBj6NY1^JdM) z>l(>ea`776^m0g|h~*B+jMl3@a*ED>^r*b8Vf>(aB89`0vxedJ+#cFBoKcE1ThRkR$108d}T@tu<{!`f@lH8+cuBC^wiHg&IZAMR(7Rc)PWgKFVx zDRlAc2ZNVU^X47#7_q3jv$;ygwY|N8Sm{8mhT~Rhv!1g&@`~+CMDb`G$ITys;9-T} zq3nr?yh7y%s*jQ>V4o7?vmQMQ;wJO)88+086G1ZbWmRa0OU>l|KZV66)M1UIw&q4H z8leL(j<|ekNJyzzGf$+y#J1CV(2jMOltLO3@*CNe1GijO@MLk98g2giY4psdV-HIR z7MU_uACC*Drc&Q6Wiveag}ypMcn6FiM}DD`Ciio>gm-FjK9j(A@fCsq{ll5m*#WY= zBoBBtsl*&j^7II;t46`wPIfInSjGia6GwpBHA5;*Yfac&NsE_942;Zd<8`A3 zcuG_-sM}%d@rR9BmT99Iz!TM=2c4(m~ZyihOAL7g~sj<6JXS*}FwUD+ITtZ?jN2y(8| z9QLY_Iw)kOX1Jf}IPv!x*AB&#O~OS9U##TqfsDC+is(UmJAdYe4g)E2k{$HaRp@@3im=lXaa_ z(e)mgCFL-TFWoU_5OpW4ptLN>e@m8stLNu)rI$bPxP9LHMsOzNDLBZ)N0+0?X5{AW zn}K5W%xIIs2hYNt5c_s|f`)Iag`_l8-;0zd% z!6Gv!|0eSlnnwPLCr#c;t>+E~cU+!LP1a=zmKKuHt4L@!z2H4wtbjGIqJ}rIALcHN zu(|)!b}5*$#%opRc`-(}k00eOAe z-}nB*TEa8=?#Z1kFjw-v`fK(*?go|U{^GZ5>Q~4P-`o?OFN&}^2Y;H$vrYiY^U>08 zzTJtI-br2BuOS^b<@h6(m394F?`AWVR=4Sb4$viWSSp1Dm80Pt@3k0qP` z%w@ZNbJ@DO(gH%VifVL>^o*?ZObm>=49raIEUa|2x+cz6R=S2}`sOyec2)-Zx`wt! z#=4Hq2H(Yq-yYG9x-N`=`<%vwk>=luX#Y%adAS=ad2koEuVD{N(JsBcAM=Hz5Y z^ZiHK*ce;=mj=5#e+Sh68ZUS@Y_NZ(T)jkuCw=&d5Ym-`J&Uaqs@AG za=~gzbNDNA3-cbPM12Zvz-EQFL4BsXq-Ax$67QFE^~TvdJkx7)bGgn!X2hDMO?`8L zYX?*##$i~z?%{5S#Ug$Z@-$YWB7ZtM(zOH z>+A#JQEWVKJH@vbXCR?RaM&r!&X*lLU$>7PTT472r-Ro}xKR(;t8HY3F2IA2_t%;0 z@C7TU^-O%muATEnme3s8E3L1?7~r{u75_FsSb4-5jcQnF+YNYj*#o}V*x`;uvP81+ zbsD+3Xqk?kvql>`k!p&>iyOO6X!^pN%CUtTyZXYY*uC8EMzoN;Kk%ro-@*MhaIOG1 z5%6SnC|fQ!U(_)1kT4$kKznaKpCK{;E>XF$0Sgq}n1A5)K6728ya5tiuRy}wpu*a5 z;}T#I1IPid()u#@{{(>b+gN-EH%sR({5fz#6+Frr%v#UlZKq;So`#hkGk9KKeju=qM zl&fq0{yBL{Kkos|a=fakf$n*uTBQSk%5e}!M)MfIEz^8~oIb(KxJb5a9l6vsgEsjBZ)%PFo^w`~_dR5bcbF3fXysC}s3}k+BSKM!xPC ze!U&U8}iON1f=ZSY6~u!9TEf8iD?#xiAG}rj^@_K||m_JM_#8UFAZCHZSGraNnhd#Lzh;Nm-XeA_a=5XmVi!3ic zIOP@gJjXo-^S*wNR#)zlw3Vxw1dwf z|B~uG*)@;`W&&AMK$ln`V*bTqIOlg%yy0s!Q_Ob{=DqR&*guXY3aU_a1_@G02R_4W zZQHX@Kz!%0QKah}a*cX`;dLF@aATeX49ehEHe<~@k!_k2YX!O|^5k+rtE+DzPg}&^ zjmVBNU&-h|3xJJ(tub?UJ=R+m3gI^P0*e;m?M--<;5%e(@-y1Yw1n!RMA0dv#SH9sNnSOFi-SKwDJcPW$X;%O>Fh;P^$3xGzcC3<@Ap`bE zFMy{5iA{uec0*33v)H#shZ$=f_#!TRbl00aJ?Qw_o73Ranu0m07m7{3tP7?7z8neM zCUE^@I7#nyKDP)%{l{%3U#Kf-7m_V1YK%MXy?09S(I1$f6Xp<&N}!ul+h9Vn^f`|x z)+Y4eh?WGLH>d5_rwry2gt&d05M``mg03*Bs~1AP+IVQU07ZbyBjmd{Sd6jBwg6_{?q)(~iRY3f~-c1>uI zueOG?wRJNmJ)EMJsgm*m52;}c9o1*9mU|kt;ZYtNltx+K8{MzhxzP3KGuIm5=eZe> zvDKs%-jCx3S)0v8o6XnrM_(Vxrm}T#Hok86x4_I6+jqgYHL?}HZjxdDFTRo?b=4N@ zkco01+umo!8gtuY@6j}KuL83^Bk!)Y`Yx8u`$)~>MN@clW42H1Dck;qN4HVVJa@*z zGUG(piG&hv+YH3Wa9@|vF!j>g;A&C-p!5uxq6+t>`YbwH^hK`Vd5gMcjhb;PaW$!p zG+BFbr76L_#ijoG;eS7}kq*?C zMX!fuDnDMoB0kwgBbZo?rOE2*${TRzBi1kPg$Ly!&jNcG2$VfFTK1}UwOUx9wR;Z3 z0IqhpvESw_(#x!JaWBap*;u$_R#dwUI!FH8%S5(PFf3yB%ex78?Sx^!APYf1u?cQF zF0LCyzE(&uNkD(p7p<}f!fl@4WtW366i&CdUlaM!l=Y!4i)PZO{@z;~AQgtKE^WCg zbSo~giB(6a!_H<+7Z4x~UGuJ zQLa*PtWw-7QDMw_n}9IKxA7|4-UxW@lSn)s-M3@Jw$ir`-i5&pNh(0PUPux-Xn<{C z0x;ZKTgy}}lz8fw3BGzCVYEQiU!rQ1`3S$%$g)W4)O?>Z4!a62fN9cVTVct7L|0Bdeu*-=Q==wBw0c|#U>d!uLb);!=%esat%YdH z;8T=-hqPo#!#8r?AK{FZNw^V;B^`%IRA)87o}J4OXqy@d&=p z@Aa)LxMayFJ}}U_MGgB8^`yNAoFeU@;mwL+>B8iI@+y!jbJ|{pxAcJXZ$1&>dQ{kv z6PVW<0DtM|<5skIDC0;g+ThCLFO|wW{sv9yz@eX=3QmJmB*LAypu(L7TD?>`WV;NG zTVwB0gbj-U#>cw}qS7q4FJP4^SR!5Wij^kfEsI{&R?DZNg=PXMO3abEFAjBTWvCV+OY@d55<;rjO%XbjLf6$vl^%sv zD-$ML0kS-`suCFRN(uTyNa%NN|ULxc{E1(`6D57vD31f=f;O*v#$?Bj=<+IFD?t;sj zR!;8e6tum@M4vy@ahgn)bYaRMc+~j=DdRl6aDUQ65C{B8AOD%|PeR(T|7s0F1@9pZ zq5do7^eI5;AhuzF!r@xEz_32d8t2BROq%aXM@TXwOQOOhO1(=8=${H(Y# zjwA`%q)CkqMY=Mh7Ja-zqlTejw(N|h&?FfjAM>|GI%dcaWweL%QhKs&8B0oSz+3r4 z9Mtyd{CV=F+bXcWat%7a`-oGty?2uV%JP;TK@|N#|uSZkhpds)cVa9-h~Z86s!mVl&##D18p?+ISk+HV+xtbW%yp7Q+q9s zc-RJCT&`{~F@f#UB4vXGXqOH+dgaMIZIcSU#cv7mT2v~~t$C`Y01MXpf{dBeGmBy^ zwo?&1-a>h{TBiiPa%UVgOAAnpTJ))kbwB!{#R&Q3$OjJ*8cbyrVG`Y%W9255>as~{ zji!W}lsi~SI++&V-G)~tVz36~-`Lq0Qgz+{3O(Fyy=|~IIndvWbM((;Mi1knLFEPu zBs<G3m%v6i$)dNuf7wg%v~+yAJf;YVy17 z-nSNe25^(|dz^XJzu|hCt>McrjbvxUTg0)Y2;(V*6a7Zey4Ytzo>2&FxVTZZj&;IAB+@q0=(a+g9q@Pe(uiAMFl>bHI01N z*UL`2%Xh+)tU86iH`yUG=qBrc5TX&OTRxeWlRx~q-;cZwm*ac#$f>=2X6sHG#CeAh z5H9xY0h3VPj7QKPItF!nq0gKt`ju*wkPY_9d+!M8y8tEDX%4QQFzV){n$^+?z3t$t zKl{hfW=ngtPt^w^jSaHLak2E6r=*d~J6J}%2Hs<`v*Vh5kTezdX7Rjg7k%pV9?cu2 z=9&RLRg1|NPl36s=h(5J7-9%iy4N(P-~5AbAU{;kdi3;z6{M#Fnt1N(`Mz)?7lPUp ztt84w9wh$>7|EndrxZP@#@Tfb5pS;!2yo0wK*}#(aDR&82kM8~(}zMg@ftVr2Yn&N z)7%j5%NP++f zeh@yhjX+vXd?xJy`=oe62Yqjyq@7tjTG4bH8Hz*ITgg#`D_{nJR@@4bBdCwMetb;% z0z0>XM^8;a2D=dYX3>sJB9XPB_d&_yHK9Of9%5JaUTG9vu#-0ev7NcsS=b+7Q=HrA z^fjkiI;_X}YZm#t_}evsBO7Je*LL;oi=9}05O?m0pM4BY*tt`y{rH>IK+DB`1j%_GD0WoF1Y^-XhtW2I)6tZ$8i2O}-v zU)YSs9z3!}dD3t2Yna!Ee&X6>Ht-Rkx%>iRxO`Iuf3IT6X~*UFXs73M{1~S5IM#i7 z(!Il`_`{|!Xfze9;=grmz|q4V&!~diD9IYX$S3;x1Lk zZ%`W;->yhI>!)6K?k~wogr{I=>gm@m(v2jWv%--rosqUggcfK)F3@I|ShW0G=#HXl zV3HTtKN9^@sPmNJ0BfX2Vh!LaOUxNsU~cImVH|2oFKbAt{%)!;AT_`QdCs$7)JxJ@ z{RB~W-hC~0j+cP+nXeulhEJIxILl?r)+ZNhl`JoW5Is6gAj&1%7z7mDMdv8aq#J@N z#*rTg?_FGKS@$xw1TZM>H&B3sJCD0~7rYxDvnMz4f?_4Uh#W(s_Z6>N1H*-|+cu6q zjjdgRYCH*iv5h>v7Ehk-0Jj(6EE}ShdW_axOXk9zuRmY6z1cpucs`| zw!KqnC6=~fEh1XFB;O2qyM;obo_PzoYI>663Oh)EAOb-zc0Y&_<*;9cdN?XSrG+f7 z&vb1$%&bbDqC5d#3c}Vs3V(N;kkJP;MwWwR=ntYO2|7`ueWvM<~i%L?94J3lc`VN(5#T`?|(o@;p*J!fJ>UxIEG z)9Bp$k`I za#*BYt%YT`pvr#awI^F3%x z>JO8Nx?6%tqB)=c{6_Y6$hO62hD`^LZ3P)YN4t9NpixHgO%t1qL2V)jAU9tjn%^C3 zTq9TmCl4jlpe_^2zJN1yyk}fPj{cDgd&@xXAl!oKK^w)i^c>5t-A)|a2$D4vqEZ{l ztQL6M5%Bl@kL$e++y(2WvWgA-+MC20DfEDtE>>+AhN-2KMUux?Cktthrr(-9VQ-4O!e z8#c;k@!fTO9%qwX5(3>FxG8YhTiweT%$g>CvfQjOJ(mKFOCA)&uG`K8Zq2}R`G`T= zKh@L5`oW~n|{}!nGDWfmBddVA!W{T;WokP@m|{1O1JSpB*{3kkQtc5q3yd_ z%-Hk+WfHr*1t>(a4zfItliVE9Qiw`v^?!Ib&w8*nE{PBkQ0*zD)rfoS)xSt6T}wc6W#^$^Yp^=V-)Wo zsVnL-`s03eWDJnx?t2)xJmxt^g*o~)e8?nqrOc&-MBZVMTj3JCUE=uaGImIM>nbTo zA3kKlNeQ1ZKgHc93X3|Ao z#RwbHK|6;J3JZh`&%nWRF0qE78yA-?kO|M=t#zIn!3S_4wgn9Vi-D#)qZZm@2wPm}2Hp%t(1C7);t2 zmmqujU1XaI9;iltH5-jYpzX{M_FkM1rH$VRG)DT_{^j~PrAb`mIx77GN=)#GI* z8q@NkzR64#=_%()VCf}x-yTfO%%_BnK11_mqo+S^uJe&{-yKgBO4U<7rS$D{IHwfJ zFmGvOvZv*J7E!m2x6>#?Gm#g8;SaqAX6M z%Yz)szUQg0R8J9?{+>sBs)6czp6Qwrs-@HMGleV3;O}XIEJ~aO|C%O0!<<6RJdOgY zKSIY;vVd0bM3p)`!$WgimovqeR(qRyBB7pwdit)!eVbTFC%V&IXW8Yyc(b-w(R>+o ziwbSOq>G1Z`rns+RLfxO!f*-br?nci7I3r^*O*CdgG-Rdo&}20B%DRLd@8g7EqLXl zne`w+vz%z&vlv6Rzzd^u#%JtDWFw58y}bA|1CcX;czmMCgOFtGFC__**J%kmOKBLA zp^JnYm!$*;htX%N;FCo3Ckay2F^dL`4ORj|>`Scx?~++yQ+T@FC}O79G_9~STNZ@k}f*+&Kyvqaj=DlHMfirGosk;l^v!*puG@ykMtm?&M^kZbMfzqajQDYHh5JHda zlJ&Qgw9W{mmxRIi>ne;yw{{~*XYTDz!6PGeF1P7GS)Tkk_3@_j3@Gj=4(UAqD-pyR6Mju)Ucv4mr{$R|u=)sfNdB+Yu z366lEK5;onS{DXM)XF6XV7%xU2+K7sU8dZZGk=H>yj2i%jx-wUMt-L{5jCYYE^4^| zw-uxT|Jtti@~<1I9~8bfo`iY42@+h%Hpt@; z2?*CA(kGv2OM%MyhUwS=$j%@G{-C&xK5%{Fo`a7NsryI<;T8B_#6I=ncMJbQoD~4h zO6Uz4+}Nh9S5lL=nVZucY8{Ds8{gNs9=%&f`gISEazznW7djx7Gay%{)He;Mfh*xG z3_si7qk;zLfhW32D&W5u6J}_HAcgn;nsG>$#$kT{H>4Z;{5a9AT*3wa*_NcfZLv05lO)QF$5EV5_CXAY_z64f6P^_{aZ|c@v|J*X;F#T5 zmaiF*W$qUMoU%?^v7=c-V(KHz8=qtN*bZD-$j8wWK>^=L(Fdi$(^?RD0jfd_?B&OB zCV??g=JA(!U}fF8++JuiW3e21s7FFr(V%8UveVW+)Qdo~wGy#6q`=cBfWb8)St#}5 zYb2;@X4riuC(n_kB7A%k7X{{_aqol=IBu`8EjRXU@bG+2El0kR8=2NMnQpKb+Cae< zTgzpY7mx={VxRiNJL!+aRG>M3#$CQ%4Hs*t(Lgk}-mrTjuk;xd;h02hG1BRiM}+eN zL_&srS80A&W1XD@Asi3Ii~oCyVbGRUPL2%7C$j{e5i~9Z+1(pCgUNE=2^(>ub@+?0 zr;KTj~2Na%b2f5Y(OFwkq*kjI`XO1TosreKU!T1G;Z?`Y~_(pUFMF&Q!m#m-6;T?%gWuTI7jEjM= zkfipZB;ELosX9jTMtnV&F(4n2ZvwG9?(biJ0SqxccDkRq006^h|JYyepR@GF|2BZ( zUr5;hPv8pw+Zy=~A zNExXjA&#@iX33^e!kyHB@Uj7wnCa@D5Gceea|YPMp>_Q6sb?S)Ac~w|)coXR6t~CR z;ULlZNy-@6%n=juanv0^?|=Qo1D)=aLc*fKL|f;*YGc2887^ni68`?$>Wn&0UD`lH0jE(j;OEV?iIkezS+z*NW~r_y^|? z>y_B;Q(fVmgIm>|6;%wagPq5^v58V`9i+mpg_bh@XrJd?GYkFt@@4|D>xL!1nx{H8_sQ#cj39tHMMoT%CP+xl zy{t#dt1vM1Qo0ecMMt40BW|l{#=M{4pXq#9&qP-Na5GyC2RNKXeQq9?FN<6`G20;0 z&S#E}Q>9uZQX-OZ&lbX@yLf-aZ#X9GJ2DUe0NHnsOgTy5@4W-@{rcx^tN(9{-~Z+g z{-225-G4%jl>W8YwY4+0`R1>zjA`tg4Xn%!Y4q*P|4Ybd@$ZrQ*LZmvm&%G}mvtBi67HYnaLYy#~W=?G>|pFc3PO&_7o ze*f+Vd*Frid>J?VxeJF>DxcFDg%1aQ-kDlYyp<2wvFYB6Ml4gX!@wpvW?&ooI?a58 zPVHp&gUioeJ>wGJV7T9k%+NgLa?ocIh|h@FSRMC(UQ4Du@sH2&=p`-%gi9wkM3|@O zN8B!BIJUID67S6b%<5iLAxSp4LAp3@2z4K7f6HVp6JX8&28c>0NLIVL3~;X(jO;bF z8{zM<1#tMWjwcRG8@}8)sF(ZfP}$MKmTe!kJX6T%nIdXgy&Bi6FDwGk_2_=kut*ah zlmr8s(wT3wG#xo&Cot>@j<>oX(7vo$`Ywbw^^XDdFZ+kurIpIBnr?^r!7Tyva|E@N zTtvo*)ald6rHQ4~O4}7*=jEQC^-HN|d{tlFpGI#8Uot}yQP1e>7PaXo&q_eC7YEq5e_uNe`tk(H zxOEXOrEWXebp`Y$3rFMaU1U&40%eEz+HsW^Ev4=_5E~uC3?_mdKXL`as#i>*_DbEd z-=3^jBU|Jc04yzhvxjM)EdFB8_yc$_nY09eCmMJj<#nkpE!z4G3k!RvHDpC^L*X^JCsF4v+`nrF zCAlRL!FhLbf6&vjy%2j~Wzv6Auc$k;`FVQ^I5BWesl7)PyW@)l^(xGQ?gHM)H3%S} zp6f$!>HWFOly}Ne=_S+CT}njRCXxeL)c_q~F{1*0`!SX{W~k+k;diwM9iYo`)>Exx55PtS;0v@%*BjF#!lnHM2^n|AHi``a zz(JW6K>s|%?#+~QHrg}_)W*-eG`|T9Y1`QkQfkCgwZQr(I%1}117B2%o(ih!E}(O zqIZv;9q;X9FoCHQ5W%3^edgq_qvxbBKil^U7{Eh@4N`PFA?(i{_$hWp8&P^aMp5i& zY?cKW-6$bQ0w`xGGa&M!icbS!$|%Kzl>t5!c5M6a?^d~oRW^mwXr9yOnhO#ETkw?* zY(xfyYy}L$dr^yF`av&P4DE+%Ax1*r$otxms<85%%aBT(gQAvL^B`6^Lw;K07zNqj zgikQXs)yVd2sNAOfL!QuTtWNLfw2_(GPEl0N*z?^OF*+Cwg;S;P34`H_3K$eEDfSo z?S)eY4b3TyX1pxh70XbCwQH8gIbT%UMck_LM?z7pw$oCHZRwy2PuWo=od#p|_H(3< zjtiuxz3Ma9wANFBk}EZWA>7vb|4tSFrz$b;Q~F~r0A*<X6Sx1~h`!u`AE zqMT7y*gFr*ASd$HYeY%_wP12aSiB!?`6@aTe1y^&OELXU*<2`CkDx>qeB=~sm4qF9 z)Z5H0Mm;Pb0{M@C2XDAw&Sx2Ul|90!$sR^37!);Ss1jY>-JxbPL5W_3l8GRc8=N`I z;kAR6y z=OO-c!DYNlWSW99+@V3Jf{Nq`6Ijyx0_Obp-A7Dkhk1a2(0#~z)pQiB$_iRr3SX({ z?bfK~nj-5e@jl(kMa;P~6g@Ags*l9uOqcLU8}^EO0=H&VzK%#2^)=7MRK;)rCVglU zUD<&L#FX2VdgeVT07ZvUBY98Cs%CT&6h5(vb-`+g;*K+S+PYPEXG%>&{+WxZB$2kt z&I9B<_63+?NCxL9*^KijGr&`*=p>QlvZne;Cf%9KvVnuU2|8Etjj2)hOawF|v+9}( zaAzLiB+ybvagn{|ku(AcNP^rri(^&Ek}`JFDSE*HKViqtib+JFtD;#H9rKqn&O*59 zLwBjqC#qsV4rAgKkj!7Q@!AD=jg7#@lH0PUhs-AShQ?G(_Jg-BHZ*)duQys=I=CG) zYjaUsH@Hcxveisxe|K`GF#XK7B8lS!1P?S8hF;3jImK!yEgjJLoclQuAU$rjpMyCs ziWuyKbX`@IvO7+Z1mZozZz?ZEpW9RES8J2LL#aDRn{Jt+E=ix6kg29otZg=GR8Kra zb9SI&@?_`pO`(ChQ3F#bYs%H~wysG(UtU~lVD^of9)Gau8UN5ItaGqRjm8+aVB$>7 zGZ7;dklwq%%FjmMw2$C1d$aBO(4z%X)o5`Wx&^Vp`STl+HlM&O@z9XLYr1*PO%m)> z3ys#xB3Ux>4_gt$ZE?WZCi^AtZy*`B4>p2iGoROrrQM+3O&AyzY<#*}V*r&cC2z7Fm2Sb z(I9ubOd^9KooYt$^3X}D@#(}sd@v-Z8R^`F(nkz%G_i&HLw#o@>njLQfe}wZ4%v+k zK^X;4T{G<%7Ev8lmdfG-u(Y2rPt45_b(o={k<#_7P^1X_-2N&d8Vtp2h zjIyw%>ROjBTrxk0RLup@j5j}U)$6c94v5a$Ce;}YA1y4HW0@GoKJ+ZmL;^XC>;P*l zyqsEfky9`LNQ0Dj2H5V4T3fls(Z>zBmU#-briMeo zA7QCnXZLYGIhE?g4{m3{2li>1FMdN6o9D`dN9pRQgc7(7>@3>#c|5CCAy zzRyN3QudmB(91~bMmDIMMmi2`qm}-2ja*pUnJ?6uE1}46`=FnmfG8Y)UY8d3_|+rx zSw@3EO=@GNAdqC>H?N1{e2~e+v)-gyWX?w)a6)~)0VU4^S95lK`Hrtyr@9f;&8D>J zVYPgs=zd0nTB-|bgAB;}oA<|p7Ey0(dgEi|czIEDGKb9Kp8*a5!(f@oI{W>vb~>bs zWG(ptU=w zwKF914$#mnY7v2<6B~Zi0!i*7o3eV;e70C_OG8=5A7TAgnuqErj(`EtZjl5SP zma=iX%@&g*tJNyX5$2|7W}LbU`ZmH~(uSUZAWVc8P=9*oSQ2 z5G2m5Sw^TsF605>dkB!4VMUa&Y>u#t;h7+QTt*D9Z;ss^DG>b_cww<5WG#OFQrb$f zP_3Q{GW2ZB*!|f8xNx+#A#?4xuyDQ>&~IMri;vw{n0DV4Q|_w?MRv88(Qp3NQkr&1 zLqqv&&UX{yf*NCKp}sd-vK-lNcu~XqSi|>N#lLP5S1oBZiD^^uXnjGGl~+6ze4x3Z z^{jG#VC}TOWlfh=RZYA-chYaJ(V-0!0ehEFxJl z1+_W#uBC@-38l3uIQHPJ@y5P?S%o*de|_5YTm(mJHBhlniGeK#8)XL zmS9TZO0i<4xB#5Z>fEaEG0Cc+;KVc_@;HX0JHBA&@e;uB7&zu=IU$MB+x*mXa ztn6;v%XFe8K1&4|pyV>n8Q(C?A$l{Q5Zv(;g2bCiSdZDA_c~S~0TogBMO-o<10!4w zlHEXV_*GY+R7wD%<@U=^*+f8MU^cXZzJli_fTI$b9jjcv{V5tSO%l`3R0mylUuO<;=0T)dnSsmYR1rr7EmGxVnT^;jgS?=Xi3B9%RTzV zJ}klz@I1s7cNRt)5HVq&X?=cmg>OS1azutt?qL9-iSG((iAbK&t3du5hF7)EVF%JZ zthWz}i4iW=kC$)JpOQkT1!Rt3H9v>k6j)ALTZ_@g;?IOUOOGhzQ1LwLV-~qHgw3G; z%N2ib*Xg3ena--YoW4C-Dfl*jmmp&`?gH8i-GvKO`WUg4Gsdh*RY# zYpV??_$2%8aEn!23C^tT)Is;zDsOEyzgQ1pC$e2(q{+S`eXzLlUSr%un1wL38WY_b zqu5igL82efVh9QY7{n0B8eU*7Uw|$0xVPf1QSs=Yr85{3QVWSYF(slt=KRdszCTP) zkXS<%g16`kHWkOd+|Ag0P4_Q`fXgqK%XT0p5CytT{moT^1>^b z88LcJNJjotKn_kpW27Wgy=&OR>hh?cYxQSHDtMuH)+h4lY<$No{M<=$0xEQ92&!Wz zh#bn_%@aq7%D}pRJ(mH*T^@-qVO+ps2^e@5yi{)g;H1 ziZ*d%8D+BIU7SCDrU2tvc~#*Juua-jVk(GOj8V8N4DJOG4%fH-?INKvu8!?Jh9X$z z0D{Ld^-BuFETdCxvE569c zGe1;tTip?BrJ%DC!!lOd_R)ZPJ@NZdex?v<1E)4(8+To*^fB;!?ddZPU)F1>-$nZ+}Il)|Wau(iM`z|7!W-#KG%z*!w2ga%Q3( zy0W9Rvaf02F*zT*H^!J;y*>YkyZK?|saUDFK|1Qe^H3ln9$Y3*|Y#mWm z{UX5}XY3#^f^Xt?udWzpWD1dDxrsVYZJuPzz~*{0wxeeM_!&Y{`{RnLAPPR*{&O~)t+oxV>g zCz9pZ-YA6!*ryXu%zXY!P3|l<#2iGW4mW;C=>(LUpz0^f}MZdUMD8QE}-MMIt?rUE03JjmBPjG*$vzJdIlhyPXF zxqw5N?{WMc%!A~vDRoq9OTr**xnw(CR~I7p6b3^WGizotX-^leZo4N%9Z4*YlBBlF z*{F6EM;l2}S-I8LQPRjJs}jli|8*ws|21RqzMb>*r04NGz4M*V`~O}4H-jts&Gh9a z8K&_bg*g%5dib@PMqRpn(!AcX@lH;4cf;$6o8F6^8)m$je#71-;V){N=cHP2uFfd& z=(JpyT$-DiKk57WdM=mS^Git21gA&w85fXt~!f4!A*X&siKXcF70No_L!@-FI;h^IxI9kJYkd8l}SZA zv4C!$^rGb8-?K2|(D>VmScj5Q*}-PhAA&a+zZ&PVHRZ)tjf!WV|EZO$7O&~b2ozjW zi8K}l{*1NPriWF%S6^6qHCABY>*$o`*Yv$o_rV`+44bc(XNuD=ryRLfc`LU~>3QPi zEyh7P8`*t+(N3+_Wq(ub+|}~UjqRs)=P8fte5bZAGUZU$Pp@qGOm(-~^Kb6Cay+N) zRjs(`+PL^w_pu#}CES#!R|`+%jxVx2#;wVIa?{}720DR->2Z_q_11UM4_O?T*HJdZ zI$3ml%uDUR{$XGk^KDg zy@{?YbUM?D;(yp5&2HS5ov)`+ zTQl2FxoZEaWy#HJj2Vy5{ZwX|mzHH_Hr}3V{&r2)0(TSoG2Qnr6|_XVYcXZP^mv;B z#yO3pD^%U8x%*3WDy%wwe|J70@!A~Up3Pog3EjQ<`kQvCgnzNt&)|+&UDW;jOhdhj zrI@w1`p@2CjaJR1Bi_m-z4NUifG6YfyemA8FbOLh?7C*8dja0=r1)rFC?C;9c zXHL7Bes}C{=fX6OmWRMMot3xp_>(z|uHBa^^Q<{-ypmaEzrILbF#)OBA;&t=f}eKaLk!%KT+^ZjwcG$KIEP zGy2-hGyOO=bH5b7^5wnQ&>rOR^s6bY${nj}?L^@kj43H5dhh5kb7;>H=U4#4UX9G? z6Nh#aa7oTi|s2p7j-*dGK-*TN?B{~rEmn-6~yk69VCzJ`v`+JS|-F8}aU zxNHJGb)D`sTQBhckAS}u@lTC&0l)d^OU(laA26KfH-YB|c~x=rKw{VmT2Ah`=O2w5 zOB<|u1V_V2GC;Wti@+DJCwy@z4FARb5n;vP?$wW9oba_rc6<$4jVk+99mSRy7Pp>; zc_JE1R6YT`2my~P?Y+vw7l=r6wg0sEhO6>1c*$e-zR?V$W7xAX80LYf^l+dAU@)J} z60#-N#!5@X!SHJ&3_qw0Kl}m^Wov;wQ#<@dCGrsvsn@mb=j&D&##u+hyb+Os3n;-y zymMIAyR9J*gyQf7gAj3*>!~I-N`KU|9D;8UbZp zCMlHtuUp6#2n7=F$c$ofSz&Cx^i_la@Lg?N}@h{Cw>G>U=_C1RlwiPiKDw1aAY zI*8pqh}geRpbg4*N02!p3Q?aaWoB*|CLWBaGo1WMP>x0@JeaX>kz4mnP+zSC^%WY! zXHFr75oa~SN-!Q11|$@RACPDafAbkt6v^s@Rg$857o!l=D@_0-TE+All7cwUX2OLW z8EK@v@(oQc{H9X{kc>u{sFnVjYSaRf@IVl;(JE%G5h-|*5J=36%OQwFNUyTwRE<-RRc0i{fED-ayb3$ktg62tbi(Fn0R zV=F1FAG$lC9G>W77AX+2_(GXEq?mvcs>9<%W3_1!RX9lth2ij2ssH6Mpx;yJOT&DT z_ihDDpV*2TLCPaL2Fe~r=8%@QJf=!Xs_{>2jJ{qww{dvfAd|5OOj7tx+NqjW!^y|Sm1?!`tSp3*gW--%| zfpu@J!cZ_q_EFHpRL;(7oCQWkBp4YH$VX+WD^O%&A|5{yaap0PU?Gnm%jB}dSiVbq5w>43E z(g!yr;-f3ng%1a75ncJ?s6t9YBJ2*AY!-y)8Up_XCP};yi3JQ&=p@M~p<|+E zS%@|zd#dn}lnH}A(?8mOu`PxrRuYqDRR>ZCagm-lK`skpD`6B8lM=K?_*y^}Mhc|D z6&7i24b=|XAYuL*!`zTJ-X|o5a==O?i!5Xjglm}ab_`|V?HCR6bvvjcIC_P!-&SzJ zsfht9-$$T@h4!iIc9H^zR71lnf93T9(J^>%4^;#ykP2(yFm71rauBz7f`Ec{12Ypy zp_I59T>nMV@|PY`CFHNJ0Avu-MZ5x5j(}AEX%>)zhXk>OyCj}7at0e~gq0*H;3gy+gXk>QFqKY6% znee2JslBOfCZ-r><DoypE7Uh^rkx$dnv6BP*)FgJ$qi1**eG71WfCZczo1v`{z_ zYb_fb?gMXl6QtLuM`Tu!!iamt!~{qBSd^FEpcv0oQ-zVVP&mQpI^o>EAjU~x)enlX z;5SkjaW7e7(2@yI=@{irf1()e>#4#>S}3ej@i&8UkQ{M-163I17pJleU0!7^LKN4j zC=S(h_*9kkaK*!275H<^(9E(^Rgp{^Ly~0-_l7ahwtyQK@m>__!+TLQvrL^y6%k0wTQU#EdNN6nh%~NOy%5WrwZwL#KJ_hBPG8%$97Ey(ew9x)G1#XMTO2nbR zT}%q&zzdeNDWubr*Q7ulwfj=4=#5q%oNB}`zeg7kxGf_Et>3NSXG(^bOUj!LMOP=9 bIa9@ulw3MU!7*$F_>&8k(%HFybQ1dy&(?8a literal 0 HcmV?d00001 diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-architecture-control-plane.json b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-architecture-control-plane.json new file mode 100644 index 0000000..8f9048c --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-architecture-control-plane.json @@ -0,0 +1,2940 @@ +{ + "case_id": "plba-v2-architecture-control-plane", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "ARCHITECTURE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 25, + "llm_answer": "В подсистеме ControlPlaneService можно выделить следующие компоненты и связи между ними на основе доступных контекстных слоев:\nКомпоненты и связи:\n1. ControlPlaneService\n - Создаёт: `ControlPlaneService` инстанцируется при инициализации приложения (`app.post`).\n - Вызывает: метод `_channels` для регистрации каналов обработки данных, а также асинхронно запускает начальные действия (`_start_async`).\n - Читает и записывает состояние атрибутов сервиса.\n \n2. ControlActionSet\n - Используется внутри `ControlPlaneService`, роль модели указывается как \"default\".\nГраницы ответственности:\nГраница ответственности явно видна в коде следующим образом:\n- Сервис участвует в обработке данных, разделяя их на отдельные потоки (`dataflow slices`), что подтверждается методами и полями класса.\n- Регистрация каналов и управление ими выполняется непосредственно через инициализацию объекта сервиса.\n\nТаким образом, ControlPlaneService играет ключевую роль в управлении данными и потоками задач в системе, взаимодействуя с другими сервисами и компонентами через каналы передачи информации.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "ControlPlaneService" + ], + "layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-v2-architecture-control-plane", + "text": "Какие компоненты участвуют в ControlPlaneService?", + "mode": "full_chain", + "run_started_at": "2026-03-12T14:38:57", + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Какие компоненты участвуют в ControlPlaneService?", + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "ControlPlaneService", + "alternatives": [ + "ControlPlaneService" + ], + "confidence": 0.99 + }, + "rag_count": 25, + "rag_rows": [ + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/queue/in_memory.py", + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)", + "layer": "C4_SEMANTIC_ROLES", + "title": "InMemoryTaskQueue", + "span_start": 9, + "span_end": 38, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 22, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "2da04cb94544a3bcbf0943a95ad4bdd8710bcafaa32a02fd0e4de2178dcf3533", + "symbol_name": "InMemoryTaskQueue", + "qname": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 9, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "58f0cc001ccda0eee4c6bc32ed83bd05eafd6b6644f1e8b4aa9eed3103db73dc", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "ConfigFileLoader\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (8)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ConfigFileLoader", + "span_start": 11, + "span_end": 48, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 23, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "a8474eca8b6e9dc86ae67ed68b16fa5fb639ef08739c053e7b7195489765667f", + "symbol_name": "ConfigFileLoader", + "qname": "ConfigFileLoader", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 8, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/store.py", + "content": "TraceContextStore\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "TraceContextStore", + "span_start": 15, + "span_end": 52, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b2dad4fbe16ffb11b58deba311c7739955c39d59f291b22181f33e9c8cce4059", + "symbol_name": "TraceContextStore", + "qname": "TraceContextStore", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "d369554f08fc92039c6edd5a2a1e73b23901533e8974459170bbd9347d263dc5", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workers/supervisor.py", + "content": "WorkerSupervisor\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkerSupervisor", + "span_start": 10, + "span_end": 59, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "c17b44e8d9e97d490989b21fa67d7c346cdda8a0472e4c41fb243c8846faa124", + "symbol_name": "WorkerSupervisor", + "qname": "WorkerSupervisor", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "77609d9d5927171cce7fc3a54897c183fd63068710c6362029b700937aae5eee", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowEngine", + "span_start": 10, + "span_end": 86, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "57ec0a9f11c542c78e008684a888397e8d9ef4223671acb2567e631a0cbc70b4", + "symbol_name": "WorkflowEngine", + "qname": "WorkflowEngine", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.start calls asyncio.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.start:calls", + "span_start": 22, + "span_end": 22, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "4e0b3147fb867d48d26567570c259f4052a739e3098133802d4b8bafcf03be6b", + "edge_type": "calls", + "src_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "src_qname": "ControlPlaneService.start", + "dst_symbol_id": null, + "dst_ref": "asyncio.run", + "resolution": "partial", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.register_channel reads_attr ControlPlaneService._channels", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.register_channel:reads_attr", + "span_start": 17, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3101fdc99a7a9c5aebf18a024bc148d37b348248a6fd02b95724dff280f2908a", + "edge_type": "reads_attr", + "src_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "src_qname": "ControlPlaneService.register_channel", + "dst_symbol_id": null, + "dst_ref": "ControlPlaneService._channels", + "resolution": "partial", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.start reads_attr ControlPlaneService._channels", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.start:reads_attr", + "span_start": 20, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "9452e50ef27d47c30ee1c311c48fe73ecddbf7a6dbcf967a6345e98222d9f71a", + "edge_type": "reads_attr", + "src_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "src_qname": "ControlPlaneService.start", + "dst_symbol_id": null, + "dst_ref": "ControlPlaneService._channels", + "resolution": "partial", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "class ControlPlaneService\nControlPlaneService", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "qname": "ControlPlaneService", + "kind": "class", + "signature": "ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "class ControlPlaneService:\n def __init__(self) -> None:\n self._channels: list[ControlChannel] = []\n\n def register_channel(self, channel: ControlChannel) -> None:\n self._channels.append(channel)\n\n def start(self, runtime: RuntimeManager) -> None:\n if not self._channels:\n return\n asyncio.run(self._start_async(runtime))\n\n def stop(self) -> None:\n if not self._channels:\n return\n asyncio.run(self._stop_async())\n\n def snapshot(self, runtime: RuntimeManager) -> dict[str, object]:\n health = runtime.current_health()\n return {\n \"runtime\": {\"state\": runtime._state.value},\n \"modules\": list(runtime.registry.modules),\n \"services\": runtime.services.snapshot(),\n \"workers\": runtime.workers.snapshot(),\n \"health\": runtime.health.snapshot(runtime.workers.healths()) | {\"status\": health[\"status\"]},\n \"config\": runtime.configuration.get(),\n }\n\n async def _start_async(self, runtime: RuntimeManager) -> None:\n actions = ControlActionSet(\n health=runtime.health_status,\n start=runtime.start_runtime,\n stop=runtime.stop_runtime,\n status=runtime.runtime_status,\n )\n for channel in self._channels:\n await channel.start(actions)\n\n async def _stop_async(self) -> None:\n for channel in reversed(self._channels):\n await channel.stop()", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/service.py:ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "В подсистеме ControlPlaneService можно выделить следующие компоненты и связи между ними на основе доступных контекстных слоев:\nКомпоненты и связи:\n1. ControlPlaneService\n - Создаёт: `ControlPlaneService` инстанцируется при инициализации приложения (`app.post`).\n - Вызывает: метод `_channels` для регистрации каналов обработки данных, а также асинхронно запускает начальные действия (`_start_async`).\n - Читает и записывает состояние атрибутов сервиса.\n \n2. ControlActionSet\n - Используется внутри `ControlPlaneService`, роль модели указывается как \"default\".\nГраницы ответственности:\nГраница ответственности явно видна в коде следующим образом:\n- Сервис участвует в обработке данных, разделяя их на отдельные потоки (`dataflow slices`), что подтверждается методами и полями класса.\n- Регистрация каналов и управление ими выполняется непосредственно через инициализацию объекта сервиса.\n\nТаким образом, ControlPlaneService играет ключевую роль в управлении данными и потоками задач в системе, взаимодействуя с другими сервисами и компонентами через каналы передачи информации.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "ARCHITECTURE", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS", + "C4_SEMANTIC_ROLES" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "ARCHITECTURE", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "ControlPlaneService" + ], + "keyword_hints": [ + "ControlPlaneService" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C4_SEMANTIC_ROLES": 12, + "C3_ENTRYPOINTS": 8, + "C2_DEPENDENCY_GRAPH": 8, + "C1_SYMBOL_CATALOG": 6, + "C0_SOURCE_CHUNKS": 4 + }, + "filters_by_layer": { + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C4_SEMANTIC_ROLES", + "query": "Какие компоненты участвуют в ControlPlaneService?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 12, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "Какие компоненты участвуют в ControlPlaneService?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Какие компоненты участвуют в ControlPlaneService?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C1_SYMBOL_CATALOG", + "query": "ControlPlaneService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Какие компоненты участвуют в ControlPlaneService?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 4, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 12, + "candidates_after_filter": 12 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 4, + "candidates_after_filter": 4 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "ControlPlaneService", + "alternatives": [ + "ControlPlaneService" + ] + }, + "layers": [ + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 12, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 8, + "fail_reason": null + }, + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 183, + "retrieval_by_layer": { + "C4_SEMANTIC_ROLES": 37, + "C3_ENTRYPOINTS": 23, + "C2_DEPENDENCY_GRAPH": 75, + "C1_SYMBOL_CATALOG": 26, + "C0_SOURCE_CHUNKS": 19 + }, + "merge_rank": 23, + "prompt_build": 0, + "llm_call": 1814 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 636, + "evidence_rows": 25, + "evidence_chars": 3723 + }, + "evidence_summary": [ + { + "layer": "C4_SEMANTIC_ROLES", + "count": 12, + "unique_paths": 11 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 8, + "unique_paths": 1 + }, + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_architecture_ru_v4", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "ControlPlaneService" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 25, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-v2-architecture-control-plane", + "mode": "full_chain", + "run_started_at": "2026-03-12T14:38:57", + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Какие компоненты участвуют в ControlPlaneService?", + "normalized_query": "Какие компоненты участвуют в ControlPlaneService?" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Какие компоненты участвуют в ControlPlaneService?" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Какие компоненты участвуют в ControlPlaneService?" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "ARCHITECTURE", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "ControlPlaneService" + ], + "keyword_hints": [ + "ControlPlaneService" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Какие компоненты участвуют в ControlPlaneService?" + }, + "output": { + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "ControlPlaneService", + "alternatives": [ + "ControlPlaneService" + ], + "confidence": 0.99 + }, + "rag_count": 25, + "rag_rows": [ + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/queue/in_memory.py", + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)", + "layer": "C4_SEMANTIC_ROLES", + "title": "InMemoryTaskQueue", + "span_start": 9, + "span_end": 38, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 22, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "2da04cb94544a3bcbf0943a95ad4bdd8710bcafaa32a02fd0e4de2178dcf3533", + "symbol_name": "InMemoryTaskQueue", + "qname": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 9, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "58f0cc001ccda0eee4c6bc32ed83bd05eafd6b6644f1e8b4aa9eed3103db73dc", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "ConfigFileLoader\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (8)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ConfigFileLoader", + "span_start": 11, + "span_end": 48, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 23, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "a8474eca8b6e9dc86ae67ed68b16fa5fb639ef08739c053e7b7195489765667f", + "symbol_name": "ConfigFileLoader", + "qname": "ConfigFileLoader", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 8, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/store.py", + "content": "TraceContextStore\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "TraceContextStore", + "span_start": 15, + "span_end": 52, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b2dad4fbe16ffb11b58deba311c7739955c39d59f291b22181f33e9c8cce4059", + "symbol_name": "TraceContextStore", + "qname": "TraceContextStore", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "d369554f08fc92039c6edd5a2a1e73b23901533e8974459170bbd9347d263dc5", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workers/supervisor.py", + "content": "WorkerSupervisor\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkerSupervisor", + "span_start": 10, + "span_end": 59, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "c17b44e8d9e97d490989b21fa67d7c346cdda8a0472e4c41fb243c8846faa124", + "symbol_name": "WorkerSupervisor", + "qname": "WorkerSupervisor", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "77609d9d5927171cce7fc3a54897c183fd63068710c6362029b700937aae5eee", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowEngine", + "span_start": 10, + "span_end": 86, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "57ec0a9f11c542c78e008684a888397e8d9ef4223671acb2567e631a0cbc70b4", + "symbol_name": "WorkflowEngine", + "qname": "WorkflowEngine", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.start calls asyncio.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.start:calls", + "span_start": 22, + "span_end": 22, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "4e0b3147fb867d48d26567570c259f4052a739e3098133802d4b8bafcf03be6b", + "edge_type": "calls", + "src_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "src_qname": "ControlPlaneService.start", + "dst_symbol_id": null, + "dst_ref": "asyncio.run", + "resolution": "partial", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.register_channel reads_attr ControlPlaneService._channels", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.register_channel:reads_attr", + "span_start": 17, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3101fdc99a7a9c5aebf18a024bc148d37b348248a6fd02b95724dff280f2908a", + "edge_type": "reads_attr", + "src_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "src_qname": "ControlPlaneService.register_channel", + "dst_symbol_id": null, + "dst_ref": "ControlPlaneService._channels", + "resolution": "partial", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.start reads_attr ControlPlaneService._channels", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.start:reads_attr", + "span_start": 20, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "9452e50ef27d47c30ee1c311c48fe73ecddbf7a6dbcf967a6345e98222d9f71a", + "edge_type": "reads_attr", + "src_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "src_qname": "ControlPlaneService.start", + "dst_symbol_id": null, + "dst_ref": "ControlPlaneService._channels", + "resolution": "partial", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "class ControlPlaneService\nControlPlaneService", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "qname": "ControlPlaneService", + "kind": "class", + "signature": "ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "class ControlPlaneService:\n def __init__(self) -> None:\n self._channels: list[ControlChannel] = []\n\n def register_channel(self, channel: ControlChannel) -> None:\n self._channels.append(channel)\n\n def start(self, runtime: RuntimeManager) -> None:\n if not self._channels:\n return\n asyncio.run(self._start_async(runtime))\n\n def stop(self) -> None:\n if not self._channels:\n return\n asyncio.run(self._stop_async())\n\n def snapshot(self, runtime: RuntimeManager) -> dict[str, object]:\n health = runtime.current_health()\n return {\n \"runtime\": {\"state\": runtime._state.value},\n \"modules\": list(runtime.registry.modules),\n \"services\": runtime.services.snapshot(),\n \"workers\": runtime.workers.snapshot(),\n \"health\": runtime.health.snapshot(runtime.workers.healths()) | {\"status\": health[\"status\"]},\n \"config\": runtime.configuration.get(),\n }\n\n async def _start_async(self, runtime: RuntimeManager) -> None:\n actions = ControlActionSet(\n health=runtime.health_status,\n start=runtime.start_runtime,\n stop=runtime.stop_runtime,\n status=runtime.runtime_status,\n )\n for channel in self._channels:\n await channel.start(actions)\n\n async def _stop_async(self) -> None:\n for channel in reversed(self._channels):\n await channel.stop()", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/service.py:ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C4_SEMANTIC_ROLES": 12, + "C3_ENTRYPOINTS": 8, + "C2_DEPENDENCY_GRAPH": 8, + "C1_SYMBOL_CATALOG": 6, + "C0_SOURCE_CHUNKS": 4 + }, + "filters_by_layer": { + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C4_SEMANTIC_ROLES", + "query": "Какие компоненты участвуют в ControlPlaneService?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 12, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "Какие компоненты участвуют в ControlPlaneService?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Какие компоненты участвуют в ControlPlaneService?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C1_SYMBOL_CATALOG", + "query": "ControlPlaneService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Какие компоненты участвуют в ControlPlaneService?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 4, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 12, + "candidates_after_filter": 12 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 4, + "candidates_after_filter": 4 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "ControlPlaneService", + "alternatives": [ + "ControlPlaneService" + ] + }, + "layers": [ + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 12, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 8, + "fail_reason": null + }, + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 183, + "retrieval_by_layer": { + "C4_SEMANTIC_ROLES": 37, + "C3_ENTRYPOINTS": 23, + "C2_DEPENDENCY_GRAPH": 75, + "C1_SYMBOL_CATALOG": 26, + "C0_SOURCE_CHUNKS": 19 + }, + "merge_rank": 23 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Какие компоненты участвуют в ControlPlaneService?", + "rag_count": 25 + }, + "output": { + "llm_answer": "В подсистеме ControlPlaneService можно выделить следующие компоненты и связи между ними на основе доступных контекстных слоев:\nКомпоненты и связи:\n1. ControlPlaneService\n - Создаёт: `ControlPlaneService` инстанцируется при инициализации приложения (`app.post`).\n - Вызывает: метод `_channels` для регистрации каналов обработки данных, а также асинхронно запускает начальные действия (`_start_async`).\n - Читает и записывает состояние атрибутов сервиса.\n \n2. ControlActionSet\n - Используется внутри `ControlPlaneService`, роль модели указывается как \"default\".\nГраницы ответственности:\nГраница ответственности явно видна в коде следующим образом:\n- Сервис участвует в обработке данных, разделяя их на отдельные потоки (`dataflow slices`), что подтверждается методами и полями класса.\n- Регистрация каналов и управление ими выполняется непосредственно через инициализацию объекта сервиса.\n\nТаким образом, ControlPlaneService играет ключевую роль в управлении данными и потоками задач в системе, взаимодействуя с другими сервисами и компонентами через каналы передачи информации." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 636, + "evidence_rows": 25, + "evidence_chars": 3723 + }, + "evidence_summary": [ + { + "layer": "C4_SEMANTIC_ROLES", + "count": 12, + "unique_paths": 11 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 8, + "unique_paths": 1 + }, + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_architecture_ru_v4", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 1814 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-architecture-control-plane.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-architecture-control-plane.md new file mode 100644 index 0000000..9e874ab --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-architecture-control-plane.md @@ -0,0 +1,34 @@ +# plba-v2-architecture-control-plane + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Какие компоненты участвуют в ControlPlaneService? + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "ARCHITECTURE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 25, + "llm_answer": "В подсистеме ControlPlaneService можно выделить следующие компоненты и связи между ними на основе доступных контекстных слоев:\nКомпоненты и связи:\n1. ControlPlaneService\n - Создаёт: `ControlPlaneService` инстанцируется при инициализации приложения (`app.post`).\n - Вызывает: метод `_channels` для регистрации каналов обработки данных, а также асинхронно запускает начальные действия (`_start_async`).\n - Читает и записывает состояние атрибутов сервиса.\n \n2. ControlActionSet\n - Используется внутри `ControlPlaneService`, роль модели указывается как \"default\".\nГраницы ответственности:\nГраница ответственности явно видна в коде следующим образом:\n- Сервис участвует в обработке данных, разделяя их на отдельные потоки (`dataflow slices`), что подтверждается методами и полями класса.\n- Регистрация каналов и управление ими выполняется непосредственно через инициализацию объекта сервиса.\n\nТаким образом, ControlPlaneService играет ключевую роль в управлении данными и потоками задач в системе, взаимодействуя с другими сервисами и компонентами через каналы передачи информации.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "ControlPlaneService" + ], + "layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-architecture-runtime-manager.json b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-architecture-runtime-manager.json new file mode 100644 index 0000000..3389771 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-architecture-runtime-manager.json @@ -0,0 +1,3036 @@ +{ + "case_id": "plba-v2-architecture-runtime-manager", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "ARCHITECTURE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 25, + "llm_answer": "В подсистеме RuntimeManager участвуют следующие компоненты и устанавливаются явные связи между ними:\n\n1. RuntimeManager — главный менеджер выполнения, создающий и запускающий рабочие потоки.\n - Создаёт экземпляр конфигурации (`configuration`).\n - Вызывает метод `start`, инициирующий выполнение основной логики.\n \n2. ControlPlaneService — сервис управления каналами и рабочими потоками.\n - Контролирует каналы передачи данных (`_channels`) и инициализирует асинхронную обработку (`_start_async`).\n\nЭти компоненты связаны следующим образом:\n- RuntimeManager управляет созданием экземпляра Configuration и вызовом метода start для запуска процессов.\n- ControlPlaneService отвечает за организацию каналов обмена данными и старт задач с использованием асинхронных механизмов.\n\nГраницы ответственности:\n- RuntimeManager выполняет диспетчеризацию и координацию рабочих потоков на уровне runtime.\n- ControlPlaneService реализует низкоуровневую инфраструктуру управления задачами и каналами данных.\n\nТаким образом, RuntimeManager работает как центрального координатора всех процессов исполнения, тогда как ControlPlaneService обеспечивает необходимую инфраструктуру и контроль над каналами взаимодействия.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-v2-architecture-runtime-manager", + "text": "Какие компоненты участвуют в RuntimeManager?", + "mode": "full_chain", + "run_started_at": "2026-03-12T14:38:57", + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Какие компоненты участвуют в RuntimeManager?", + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ], + "confidence": 0.99 + }, + "rag_count": 25, + "rag_rows": [ + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests manager\n- orchestrates role-like calls (4)\n- reads and writes state attributes\n- participates in dataflow slices (50)", + "layer": "C4_SEMANTIC_ROLES", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 43, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "symbol_name": "RuntimeManager", + "qname": "RuntimeManager", + "role": "pipeline_stage", + "confidence": 0.67, + "dataflow_participation": 50, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/queue/in_memory.py", + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)", + "layer": "C4_SEMANTIC_ROLES", + "title": "InMemoryTaskQueue", + "span_start": 9, + "span_end": 38, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 22, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "2da04cb94544a3bcbf0943a95ad4bdd8710bcafaa32a02fd0e4de2178dcf3533", + "symbol_name": "InMemoryTaskQueue", + "qname": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 9, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "58f0cc001ccda0eee4c6bc32ed83bd05eafd6b6644f1e8b4aa9eed3103db73dc", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "ConfigFileLoader\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (8)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ConfigFileLoader", + "span_start": 11, + "span_end": 48, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 23, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "a8474eca8b6e9dc86ae67ed68b16fa5fb639ef08739c053e7b7195489765667f", + "symbol_name": "ConfigFileLoader", + "qname": "ConfigFileLoader", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 8, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/store.py", + "content": "TraceContextStore\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "TraceContextStore", + "span_start": 15, + "span_end": 52, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b2dad4fbe16ffb11b58deba311c7739955c39d59f291b22181f33e9c8cce4059", + "symbol_name": "TraceContextStore", + "qname": "TraceContextStore", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "d369554f08fc92039c6edd5a2a1e73b23901533e8974459170bbd9347d263dc5", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workers/supervisor.py", + "content": "WorkerSupervisor\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkerSupervisor", + "span_start": 10, + "span_end": 59, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "c17b44e8d9e97d490989b21fa67d7c346cdda8a0472e4c41fb243c8846faa124", + "symbol_name": "WorkerSupervisor", + "qname": "WorkerSupervisor", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "77609d9d5927171cce7fc3a54897c183fd63068710c6362029b700937aae5eee", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 59, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1", + "dst_ref": "RuntimeManager.start", + "resolution": "resolved", + "slice_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.start" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 52, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager._register_core_services", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 127, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6", + "dst_ref": "RuntimeManager._register_core_services", + "resolution": "resolved", + "slice_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager._register_core_services" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager\nRuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "qname": "RuntimeManager", + "kind": "class", + "signature": "RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "В подсистеме RuntimeManager участвуют следующие компоненты и устанавливаются явные связи между ними:\n\n1. RuntimeManager — главный менеджер выполнения, создающий и запускающий рабочие потоки.\n - Создаёт экземпляр конфигурации (`configuration`).\n - Вызывает метод `start`, инициирующий выполнение основной логики.\n \n2. ControlPlaneService — сервис управления каналами и рабочими потоками.\n - Контролирует каналы передачи данных (`_channels`) и инициализирует асинхронную обработку (`_start_async`).\n\nЭти компоненты связаны следующим образом:\n- RuntimeManager управляет созданием экземпляра Configuration и вызовом метода start для запуска процессов.\n- ControlPlaneService отвечает за организацию каналов обмена данными и старт задач с использованием асинхронных механизмов.\n\nГраницы ответственности:\n- RuntimeManager выполняет диспетчеризацию и координацию рабочих потоков на уровне runtime.\n- ControlPlaneService реализует низкоуровневую инфраструктуру управления задачами и каналами данных.\n\nТаким образом, RuntimeManager работает как центрального координатора всех процессов исполнения, тогда как ControlPlaneService обеспечивает необходимую инфраструктуру и контроль над каналами взаимодействия.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "ARCHITECTURE", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS", + "C4_SEMANTIC_ROLES" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "ARCHITECTURE", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C4_SEMANTIC_ROLES": 12, + "C3_ENTRYPOINTS": 8, + "C2_DEPENDENCY_GRAPH": 8, + "C1_SYMBOL_CATALOG": 6, + "C0_SOURCE_CHUNKS": 4 + }, + "filters_by_layer": { + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C4_SEMANTIC_ROLES", + "query": "Какие компоненты участвуют в RuntimeManager?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 12, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "Какие компоненты участвуют в RuntimeManager?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Какие компоненты участвуют в RuntimeManager?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C1_SYMBOL_CATALOG", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Какие компоненты участвуют в RuntimeManager?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 4, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 12, + "candidates_after_filter": 12 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 4, + "candidates_after_filter": 4 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ] + }, + "layers": [ + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 12, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 8, + "fail_reason": null + }, + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 1, + "symbol_resolution": 0, + "retrieval_total": 181, + "retrieval_by_layer": { + "C4_SEMANTIC_ROLES": 41, + "C3_ENTRYPOINTS": 21, + "C2_DEPENDENCY_GRAPH": 74, + "C1_SYMBOL_CATALOG": 27, + "C0_SOURCE_CHUNKS": 17 + }, + "merge_rank": 25, + "prompt_build": 0, + "llm_call": 1787 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 628, + "evidence_rows": 25, + "evidence_chars": 8651 + }, + "evidence_summary": [ + { + "layer": "C4_SEMANTIC_ROLES", + "count": 12, + "unique_paths": 11 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 8, + "unique_paths": 2 + }, + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_architecture_ru_v4", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "RuntimeManager" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 25, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-v2-architecture-runtime-manager", + "mode": "full_chain", + "run_started_at": "2026-03-12T14:38:57", + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Какие компоненты участвуют в RuntimeManager?", + "normalized_query": "Какие компоненты участвуют в RuntimeManager?" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Какие компоненты участвуют в RuntimeManager?" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Какие компоненты участвуют в RuntimeManager?" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "ARCHITECTURE", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 1 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Какие компоненты участвуют в RuntimeManager?" + }, + "output": { + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ], + "confidence": 0.99 + }, + "rag_count": 25, + "rag_rows": [ + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests manager\n- orchestrates role-like calls (4)\n- reads and writes state attributes\n- participates in dataflow slices (50)", + "layer": "C4_SEMANTIC_ROLES", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 43, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "symbol_name": "RuntimeManager", + "qname": "RuntimeManager", + "role": "pipeline_stage", + "confidence": 0.67, + "dataflow_participation": 50, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/queue/in_memory.py", + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)", + "layer": "C4_SEMANTIC_ROLES", + "title": "InMemoryTaskQueue", + "span_start": 9, + "span_end": 38, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 22, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "2da04cb94544a3bcbf0943a95ad4bdd8710bcafaa32a02fd0e4de2178dcf3533", + "symbol_name": "InMemoryTaskQueue", + "qname": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 9, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "58f0cc001ccda0eee4c6bc32ed83bd05eafd6b6644f1e8b4aa9eed3103db73dc", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "ConfigFileLoader\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (8)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ConfigFileLoader", + "span_start": 11, + "span_end": 48, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 23, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "a8474eca8b6e9dc86ae67ed68b16fa5fb639ef08739c053e7b7195489765667f", + "symbol_name": "ConfigFileLoader", + "qname": "ConfigFileLoader", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 8, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/store.py", + "content": "TraceContextStore\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "TraceContextStore", + "span_start": 15, + "span_end": 52, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b2dad4fbe16ffb11b58deba311c7739955c39d59f291b22181f33e9c8cce4059", + "symbol_name": "TraceContextStore", + "qname": "TraceContextStore", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "d369554f08fc92039c6edd5a2a1e73b23901533e8974459170bbd9347d263dc5", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workers/supervisor.py", + "content": "WorkerSupervisor\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkerSupervisor", + "span_start": 10, + "span_end": 59, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "c17b44e8d9e97d490989b21fa67d7c346cdda8a0472e4c41fb243c8846faa124", + "symbol_name": "WorkerSupervisor", + "qname": "WorkerSupervisor", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "77609d9d5927171cce7fc3a54897c183fd63068710c6362029b700937aae5eee", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 59, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1", + "dst_ref": "RuntimeManager.start", + "resolution": "resolved", + "slice_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.start" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 52, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager._register_core_services", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 127, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6", + "dst_ref": "RuntimeManager._register_core_services", + "resolution": "resolved", + "slice_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager._register_core_services" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager\nRuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "qname": "RuntimeManager", + "kind": "class", + "signature": "RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C4_SEMANTIC_ROLES": 12, + "C3_ENTRYPOINTS": 8, + "C2_DEPENDENCY_GRAPH": 8, + "C1_SYMBOL_CATALOG": 6, + "C0_SOURCE_CHUNKS": 4 + }, + "filters_by_layer": { + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C4_SEMANTIC_ROLES", + "query": "Какие компоненты участвуют в RuntimeManager?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 12, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "Какие компоненты участвуют в RuntimeManager?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Какие компоненты участвуют в RuntimeManager?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C1_SYMBOL_CATALOG", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Какие компоненты участвуют в RuntimeManager?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 4, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 12, + "candidates_after_filter": 12 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 4, + "candidates_after_filter": 4 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ] + }, + "layers": [ + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 12, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 8, + "fail_reason": null + }, + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 181, + "retrieval_by_layer": { + "C4_SEMANTIC_ROLES": 41, + "C3_ENTRYPOINTS": 21, + "C2_DEPENDENCY_GRAPH": 74, + "C1_SYMBOL_CATALOG": 27, + "C0_SOURCE_CHUNKS": 17 + }, + "merge_rank": 25 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Какие компоненты участвуют в RuntimeManager?", + "rag_count": 25 + }, + "output": { + "llm_answer": "В подсистеме RuntimeManager участвуют следующие компоненты и устанавливаются явные связи между ними:\n\n1. RuntimeManager — главный менеджер выполнения, создающий и запускающий рабочие потоки.\n - Создаёт экземпляр конфигурации (`configuration`).\n - Вызывает метод `start`, инициирующий выполнение основной логики.\n \n2. ControlPlaneService — сервис управления каналами и рабочими потоками.\n - Контролирует каналы передачи данных (`_channels`) и инициализирует асинхронную обработку (`_start_async`).\n\nЭти компоненты связаны следующим образом:\n- RuntimeManager управляет созданием экземпляра Configuration и вызовом метода start для запуска процессов.\n- ControlPlaneService отвечает за организацию каналов обмена данными и старт задач с использованием асинхронных механизмов.\n\nГраницы ответственности:\n- RuntimeManager выполняет диспетчеризацию и координацию рабочих потоков на уровне runtime.\n- ControlPlaneService реализует низкоуровневую инфраструктуру управления задачами и каналами данных.\n\nТаким образом, RuntimeManager работает как центрального координатора всех процессов исполнения, тогда как ControlPlaneService обеспечивает необходимую инфраструктуру и контроль над каналами взаимодействия." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 628, + "evidence_rows": 25, + "evidence_chars": 8651 + }, + "evidence_summary": [ + { + "layer": "C4_SEMANTIC_ROLES", + "count": 12, + "unique_paths": 11 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 8, + "unique_paths": 2 + }, + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_architecture_ru_v4", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 1787 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-architecture-runtime-manager.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-architecture-runtime-manager.md new file mode 100644 index 0000000..ad0a7a9 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-architecture-runtime-manager.md @@ -0,0 +1,34 @@ +# plba-v2-architecture-runtime-manager + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Какие компоненты участвуют в RuntimeManager? + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "ARCHITECTURE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 25, + "llm_answer": "В подсистеме RuntimeManager участвуют следующие компоненты и устанавливаются явные связи между ними:\n\n1. RuntimeManager — главный менеджер выполнения, создающий и запускающий рабочие потоки.\n - Создаёт экземпляр конфигурации (`configuration`).\n - Вызывает метод `start`, инициирующий выполнение основной логики.\n \n2. ControlPlaneService — сервис управления каналами и рабочими потоками.\n - Контролирует каналы передачи данных (`_channels`) и инициализирует асинхронную обработку (`_start_async`).\n\nЭти компоненты связаны следующим образом:\n- RuntimeManager управляет созданием экземпляра Configuration и вызовом метода start для запуска процессов.\n- ControlPlaneService отвечает за организацию каналов обмена данными и старт задач с использованием асинхронных механизмов.\n\nГраницы ответственности:\n- RuntimeManager выполняет диспетчеризацию и координацию рабочих потоков на уровне runtime.\n- ControlPlaneService реализует низкоуровневую инфраструктуру управления задачами и каналами данных.\n\nТаким образом, RuntimeManager работает как центрального координатора всех процессов исполнения, тогда как ControlPlaneService обеспечивает необходимую инфраструктуру и контроль над каналами взаимодействия.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-explain-create-runtime.json b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-explain-create-runtime.json new file mode 100644 index 0000000..4d060a0 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-explain-create-runtime.json @@ -0,0 +1,1896 @@ +{ + "case_id": "plba-v2-explain-create-runtime", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 12, + "llm_answer": "Функция `create_runtime` в модуле `src/plba/bootstrap.py` отвечает за инициализацию и настройку основного runtime-сервиса приложения.\n\nОна принимает следующие параметры:\n- `module`: объект типа `ApplicationModule`, необходимый для регистрации в runtime;\n- дополнительные необязательные параметры включают путь к конфигурационному файлу (`config_path`), флаг включения HTTP-контроля (`enable_http_control`) и настройки для HTTP-интерфейса управления.\n\nОсновные действия функции:\n1. Создаёт экземпляр класса `RuntimeManager`.\n2. При наличии пути к конфигурационному файлу добавляет файл конфигурации в runtime через метод `add_config_file`.\n3. Если включён HTTP-контроль, регистрирует HTTP-канал управления через класс `HttpControlChannel`.\n4. Регистрирует переданный модуль приложения через метод `register_module`.\n5. Возвращает созданный runtime-менеджер.\n\nНа основании представленного контекста нельзя точно утверждать о дальнейшей логике использования runtime-менеджера после вызова данной функции, так как соответствующий код не приведён напрямую. Однако можно осторожно предположить, что далее runtime будет использоваться для координации и обработки запросов, возможно, связанных с управлением приложением и его модулями.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "create_runtime" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-v2-explain-create-runtime", + "text": "Что делает функция create_runtime?", + "mode": "full_chain", + "run_started_at": "2026-03-12T14:38:57", + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Что делает функция create_runtime?", + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "create_runtime", + "alternatives": [ + "create_runtime" + ], + "confidence": 0.99 + }, + "rag_count": 12, + "rag_rows": [ + { + "path": "src/plba/bootstrap.py", + "content": "function create_runtime\ncreate_runtime(module)", + "layer": "C1_SYMBOL_CATALOG", + "title": "create_runtime", + "span_start": 8, + "span_end": 29, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "qname": "create_runtime", + "kind": "function", + "signature": "create_runtime(module)", + "parent_symbol_id": null, + "package_or_module": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime calls runtime.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:calls", + "span_start": 19, + "span_end": 19, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "4eaeec4ac55a59d5f66fd01c4754955f8fedaf4bc3df13fa769b352c7bfaacbb", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.add_config_file", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime reads_attr runtime.register_module", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:reads_attr", + "span_start": 28, + "span_end": 28, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "45516c79ff358dbf9b650a081668df0f66d2fe989300f985a1a78be6be166f8f", + "edge_type": "reads_attr", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.register_module", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:instantiates", + "span_start": 17, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "0adba17984f850ea1608c9e734d2dd5c325cfde3a8133123aa239e44935ad18e", + "edge_type": "instantiates", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": "27158ca220022eeb5083c6addf8a50775d45f7161284fd60aac48410105f4b98", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime calls runtime.register_module", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:calls", + "span_start": 28, + "span_end": 28, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "ab6003c3441addc1ba1b81edeca009165559f652f6b2cf424e5ae61b1f617de8", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.register_module", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime calls runtime.control_plane.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:calls", + "span_start": 21, + "span_end": 27, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "2678250030b9ce47a3b3b55fac7897ac530367edc8374ac9d5e6ecafb1e483f0", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.control_plane.register_channel", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime reads_attr runtime.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:reads_attr", + "span_start": 19, + "span_end": 19, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "30d4e8aae984ab84d523e80d02f1caeda52d547fa3d2aa47be8845931cabbca2", + "edge_type": "reads_attr", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.add_config_file", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "def create_runtime(\n module: ApplicationModule,\n *,\n config_path: str | None = None,\n enable_http_control: bool = False,\n control_host: str = \"127.0.0.1\",\n control_port: int = 8080,\n control_timeout: int = 5,\n) -> RuntimeManager:\n runtime = RuntimeManager()\n if config_path is not None:\n runtime.add_config_file(config_path)\n if enable_http_control:\n runtime.control_plane.register_channel(\n HttpControlChannel(\n host=control_host,\n port=control_port,\n timeout=control_timeout,\n )\n )\n runtime.register_module(module)\n return runtime", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/bootstrap.py:create_runtime", + "span_start": 8, + "span_end": 29, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "Функция `create_runtime` в модуле `src/plba/bootstrap.py` отвечает за инициализацию и настройку основного runtime-сервиса приложения.\n\nОна принимает следующие параметры:\n- `module`: объект типа `ApplicationModule`, необходимый для регистрации в runtime;\n- дополнительные необязательные параметры включают путь к конфигурационному файлу (`config_path`), флаг включения HTTP-контроля (`enable_http_control`) и настройки для HTTP-интерфейса управления.\n\nОсновные действия функции:\n1. Создаёт экземпляр класса `RuntimeManager`.\n2. При наличии пути к конфигурационному файлу добавляет файл конфигурации в runtime через метод `add_config_file`.\n3. Если включён HTTP-контроль, регистрирует HTTP-канал управления через класс `HttpControlChannel`.\n4. Регистрирует переданный модуль приложения через метод `register_module`.\n5. Возвращает созданный runtime-менеджер.\n\nНа основании представленного контекста нельзя точно утверждать о дальнейшей логике использования runtime-менеджера после вызова данной функции, так как соответствующий код не приведён напрямую. Однако можно осторожно предположить, что далее runtime будет использоваться для координации и обработки запросов, возможно, связанных с управлением приложением и его модулями.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS", + "C4_SEMANTIC_ROLES" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "function", + "symbol_candidates": [ + "create_runtime" + ], + "keyword_hints": [ + "create_runtime" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "create_runtime", + "alternatives": [ + "create_runtime" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 130, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 39, + "C0_SOURCE_CHUNKS": 15, + "C4_SEMANTIC_ROLES": 16, + "C2_DEPENDENCY_GRAPH": 46, + "C3_ENTRYPOINTS": 12 + }, + "merge_rank": 17, + "prompt_build": 0, + "llm_call": 2051 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 723, + "evidence_rows": 12, + "evidence_chars": 1184 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 1 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_explain_ru_v4", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "create_runtime" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 12, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-v2-explain-create-runtime", + "mode": "full_chain", + "run_started_at": "2026-03-12T14:38:57", + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Что делает функция create_runtime?", + "normalized_query": "Что делает функция create_runtime?" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Что делает функция create_runtime?" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Что делает функция create_runtime?" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "function", + "symbol_candidates": [ + "create_runtime" + ], + "keyword_hints": [ + "create_runtime" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Что делает функция create_runtime?" + }, + "output": { + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "create_runtime", + "alternatives": [ + "create_runtime" + ], + "confidence": 0.99 + }, + "rag_count": 12, + "rag_rows": [ + { + "path": "src/plba/bootstrap.py", + "content": "function create_runtime\ncreate_runtime(module)", + "layer": "C1_SYMBOL_CATALOG", + "title": "create_runtime", + "span_start": 8, + "span_end": 29, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "qname": "create_runtime", + "kind": "function", + "signature": "create_runtime(module)", + "parent_symbol_id": null, + "package_or_module": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime calls runtime.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:calls", + "span_start": 19, + "span_end": 19, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "4eaeec4ac55a59d5f66fd01c4754955f8fedaf4bc3df13fa769b352c7bfaacbb", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.add_config_file", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime reads_attr runtime.register_module", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:reads_attr", + "span_start": 28, + "span_end": 28, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "45516c79ff358dbf9b650a081668df0f66d2fe989300f985a1a78be6be166f8f", + "edge_type": "reads_attr", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.register_module", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:instantiates", + "span_start": 17, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "0adba17984f850ea1608c9e734d2dd5c325cfde3a8133123aa239e44935ad18e", + "edge_type": "instantiates", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": "27158ca220022eeb5083c6addf8a50775d45f7161284fd60aac48410105f4b98", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime calls runtime.register_module", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:calls", + "span_start": 28, + "span_end": 28, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "ab6003c3441addc1ba1b81edeca009165559f652f6b2cf424e5ae61b1f617de8", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.register_module", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime calls runtime.control_plane.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:calls", + "span_start": 21, + "span_end": 27, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "2678250030b9ce47a3b3b55fac7897ac530367edc8374ac9d5e6ecafb1e483f0", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.control_plane.register_channel", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime reads_attr runtime.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:reads_attr", + "span_start": 19, + "span_end": 19, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "30d4e8aae984ab84d523e80d02f1caeda52d547fa3d2aa47be8845931cabbca2", + "edge_type": "reads_attr", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.add_config_file", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "def create_runtime(\n module: ApplicationModule,\n *,\n config_path: str | None = None,\n enable_http_control: bool = False,\n control_host: str = \"127.0.0.1\",\n control_port: int = 8080,\n control_timeout: int = 5,\n) -> RuntimeManager:\n runtime = RuntimeManager()\n if config_path is not None:\n runtime.add_config_file(config_path)\n if enable_http_control:\n runtime.control_plane.register_channel(\n HttpControlChannel(\n host=control_host,\n port=control_port,\n timeout=control_timeout,\n )\n )\n runtime.register_module(module)\n return runtime", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/bootstrap.py:create_runtime", + "span_start": 8, + "span_end": 29, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "create_runtime", + "alternatives": [ + "create_runtime" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 130, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 39, + "C0_SOURCE_CHUNKS": 15, + "C4_SEMANTIC_ROLES": 16, + "C2_DEPENDENCY_GRAPH": 46, + "C3_ENTRYPOINTS": 12 + }, + "merge_rank": 17 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Что делает функция create_runtime?", + "rag_count": 12 + }, + "output": { + "llm_answer": "Функция `create_runtime` в модуле `src/plba/bootstrap.py` отвечает за инициализацию и настройку основного runtime-сервиса приложения.\n\nОна принимает следующие параметры:\n- `module`: объект типа `ApplicationModule`, необходимый для регистрации в runtime;\n- дополнительные необязательные параметры включают путь к конфигурационному файлу (`config_path`), флаг включения HTTP-контроля (`enable_http_control`) и настройки для HTTP-интерфейса управления.\n\nОсновные действия функции:\n1. Создаёт экземпляр класса `RuntimeManager`.\n2. При наличии пути к конфигурационному файлу добавляет файл конфигурации в runtime через метод `add_config_file`.\n3. Если включён HTTP-контроль, регистрирует HTTP-канал управления через класс `HttpControlChannel`.\n4. Регистрирует переданный модуль приложения через метод `register_module`.\n5. Возвращает созданный runtime-менеджер.\n\nНа основании представленного контекста нельзя точно утверждать о дальнейшей логике использования runtime-менеджера после вызова данной функции, так как соответствующий код не приведён напрямую. Однако можно осторожно предположить, что далее runtime будет использоваться для координации и обработки запросов, возможно, связанных с управлением приложением и его модулями." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 723, + "evidence_rows": 12, + "evidence_chars": 1184 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 1 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_explain_ru_v4", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 2051 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-explain-create-runtime.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-explain-create-runtime.md new file mode 100644 index 0000000..6e4d82d --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-explain-create-runtime.md @@ -0,0 +1,34 @@ +# plba-v2-explain-create-runtime + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Что делает функция create_runtime? + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 12, + "llm_answer": "Функция `create_runtime` в модуле `src/plba/bootstrap.py` отвечает за инициализацию и настройку основного runtime-сервиса приложения.\n\nОна принимает следующие параметры:\n- `module`: объект типа `ApplicationModule`, необходимый для регистрации в runtime;\n- дополнительные необязательные параметры включают путь к конфигурационному файлу (`config_path`), флаг включения HTTP-контроля (`enable_http_control`) и настройки для HTTP-интерфейса управления.\n\nОсновные действия функции:\n1. Создаёт экземпляр класса `RuntimeManager`.\n2. При наличии пути к конфигурационному файлу добавляет файл конфигурации в runtime через метод `add_config_file`.\n3. Если включён HTTP-контроль, регистрирует HTTP-канал управления через класс `HttpControlChannel`.\n4. Регистрирует переданный модуль приложения через метод `register_module`.\n5. Возвращает созданный runtime-менеджер.\n\nНа основании представленного контекста нельзя точно утверждать о дальнейшей логике использования runtime-менеджера после вызова данной функции, так как соответствующий код не приведён напрямую. Однако можно осторожно предположить, что далее runtime будет использоваться для координации и обработки запросов, возможно, связанных с управлением приложением и его модулями.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "create_runtime" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-explain-local-http-channel.json b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-explain-local-http-channel.json new file mode 100644 index 0000000..d1a8d79 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-explain-local-http-channel.json @@ -0,0 +1,1333 @@ +{ + "case_id": "plba-v2-explain-local-http-channel", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN_LOCAL", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 6, + "llm_answer": "Класс `HttpControlChannel` реализует механизм управления HTTP каналом для взаимодействия с внешними клиентами или сервисами через протокол HTTP.\n\nЕго основная задача — обеспечивать старт и останов канала приема запросов, а также обработку двух типов ответов:\n\n1. Health check (`_health_response`) – возвращает статус системы (здорово ли она функционирует). Проверяет наличие настроенных действий контроля и возвращает состояние («здорова» или «нездорова») вместе с дополнительной информацией.\n \n Входные данные: \n - нет явных входных данных, кроме конфигурации каналов и настроенных действий;\n - выходные данные: словарь состояния и детализированного сообщения.\n\n2. Обработка пользовательских действий (`_action_response`) – отвечает за выполнение конкретного действия, указанного клиентом (например, изменение настроек, перезапуск сервиса).\n \n Входные данные:\n - строка с именем действия (`action`);\n - необязательное поле `_client_source`, указывающее источник запроса.\n \n Выходные данные:\n - либо успешное сообщение о выполненном действии,\n - либо ошибка, если действие не настроено или истекло время ожидания выполнения.\n\nПри инициализации класса создаются следующие компоненты:\n- `_runner`: объект, управляющий uvicorn-сервером (используется для запуска сервера);\n- `_factory`: фабрика приложений, создающая серверное приложение для обработки запросов;\n- `_actions`: набор доступных контролируемых действий.\n\nМетод `start()` запускает сервер и привязывает к нему обработчики, предоставленные пользователем при настройке системы.\nМетод `stop()` останавливает запущенный сервер.\n\nТаким образом, класс обеспечивает простую и удобную инфраструктуру для развертывания и мониторинга удалённых сервисов через HTTP-протокол.", + "answer_mode": "answered", + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "symbol_candidates": [ + "HttpControlChannel" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C2_DEPENDENCY_GRAPH" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-v2-explain-local-http-channel", + "text": "Почему в файле src/app_runtime/control/http_channel.py класс HttpControlChannel устроен так?", + "mode": "full_chain", + "run_started_at": "2026-03-12T14:38:57", + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Почему в файле src/app_runtime/control/http_channel.py класс HttpControlChannel устроен так?", + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "HttpControlChannel", + "alternatives": [ + "HttpControlChannel" + ], + "confidence": 0.99 + }, + "rag_count": 6, + "rag_rows": [ + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel\nHttpControlChannel(ControlChannel)", + "layer": "C1_SYMBOL_CATALOG", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "qname": "HttpControlChannel", + "kind": "class", + "signature": "HttpControlChannel(ControlChannel)", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._timeout\n -> HttpControlChannel._action_response", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "c3ef21fcae96c82c00be74b3ab827d4af2085d89cb3fa5521c19a174aad84dbb", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "e64969024ccaeb34d8d91473fad07b3b3d341875846392e7a006406c7ada1954", + "dst_ref": "HttpControlChannel._action_response", + "resolution": "resolved", + "slice_id": "c3ef21fcae96c82c00be74b3ab827d4af2085d89cb3fa5521c19a174aad84dbb", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._timeout", + "HttpControlChannel._action_response" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "e64969024ccaeb34d8d91473fad07b3b3d341875846392e7a006406c7ada1954" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._runner\n -> HttpControlChannel.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 15, + "span_end": 22, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "51d73913df709152258ed1b9a8c8f4eb3c575eccfe6b982aef0b28e0789a29da", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0", + "dst_ref": "HttpControlChannel.start", + "resolution": "resolved", + "slice_id": "51d73913df709152258ed1b9a8c8f4eb3c575eccfe6b982aef0b28e0789a29da", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._runner", + "HttpControlChannel.start" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._timeout\n -> HttpControlChannel._health_response", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 14, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "f858f5c9e575f6c4cdfe3853571b7ee21d1f628a443541d2037c3dc9d0790bef", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "e84bf04e9cd2127df235b7064d05f47e19f19a89c7c82f4c247231d4e8fa426a", + "dst_ref": "HttpControlChannel._health_response", + "resolution": "resolved", + "slice_id": "f858f5c9e575f6c4cdfe3853571b7ee21d1f628a443541d2037c3dc9d0790bef", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._timeout", + "HttpControlChannel._health_response" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "e84bf04e9cd2127df235b7064d05f47e19f19a89c7c82f4c247231d4e8fa426a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._runner\n -> HttpControlChannel.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 15, + "span_end": 25, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "0f827ef81a990258a8a74381c8564a8361afa6712dba3200592659c939adcb9d", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "f29ab212620093d72be20e26c5a399624c7939a6056a728762ed3f84a250bfa3", + "dst_ref": "HttpControlChannel.stop", + "resolution": "resolved", + "slice_id": "0f827ef81a990258a8a74381c8564a8361afa6712dba3200592659c939adcb9d", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._runner", + "HttpControlChannel.stop" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "f29ab212620093d72be20e26c5a399624c7939a6056a728762ed3f84a250bfa3" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel(ControlChannel):\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._timeout = timeout\n self._runner = UvicornThreadRunner(host, port, timeout)\n self._factory = HttpControlAppFactory()\n self._actions: ControlActionSet | None = None\n\n async def start(self, actions: ControlActionSet) -> None:\n self._actions = actions\n app = self._factory.create(self._health_response, self._action_response)\n await self._runner.start(app)\n\n async def stop(self) -> None:\n await self._runner.stop()\n\n @property\n def port(self) -> int:\n return self._runner.port\n\n async def _health_response(self) -> dict[str, object]:\n if self._actions is None:\n return {\"status\": \"unhealthy\", \"detail\": \"control actions are not configured\"}\n return await asyncio.wait_for(self._actions.health(), timeout=float(self._timeout))\n\n async def _action_response(self, action: str, _client_source: str = \"unknown\") -> JSONResponse:\n if self._actions is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"{action} handler is not configured\"}, status_code=404)\n callbacks = {\n \"start\": self._actions.start,\n \"stop\": self._actions.stop,\n \"status\": self._actions.status,\n }\n callback = callbacks.get(action)\n if callback is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"unsupported action: {action}\"}, status_code=404)\n action_timeout = max(float(self._timeout), 10.0) if action in {\"start\", \"stop\"} else float(self._timeout)\n try:\n detail = await asyncio.wait_for(callback(), timeout=action_timeout)\n except asyncio.TimeoutError:\n return JSONResponse(\n content={\"status\": \"accepted\", \"detail\": f\"{action} operation is still in progress\"},\n status_code=202,\n )\n except Exception as exc:\n return JSONResponse(content={\"status\": \"error\", \"detail\": str(exc)}, status_code=500)\n return JSONResponse(content={\"status\": \"ok\", \"detail\": detail or f\"{action} action accepted\"}, status_code=200)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_channel.py:HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "Класс `HttpControlChannel` реализует механизм управления HTTP каналом для взаимодействия с внешними клиентами или сервисами через протокол HTTP.\n\nЕго основная задача — обеспечивать старт и останов канала приема запросов, а также обработку двух типов ответов:\n\n1. Health check (`_health_response`) – возвращает статус системы (здорово ли она функционирует). Проверяет наличие настроенных действий контроля и возвращает состояние («здорова» или «нездорова») вместе с дополнительной информацией.\n \n Входные данные: \n - нет явных входных данных, кроме конфигурации каналов и настроенных действий;\n - выходные данные: словарь состояния и детализированного сообщения.\n\n2. Обработка пользовательских действий (`_action_response`) – отвечает за выполнение конкретного действия, указанного клиентом (например, изменение настроек, перезапуск сервиса).\n \n Входные данные:\n - строка с именем действия (`action`);\n - необязательное поле `_client_source`, указывающее источник запроса.\n \n Выходные данные:\n - либо успешное сообщение о выполненном действии,\n - либо ошибка, если действие не настроено или истекло время ожидания выполнения.\n\nПри инициализации класса создаются следующие компоненты:\n- `_runner`: объект, управляющий uvicorn-сервером (используется для запуска сервера);\n- `_factory`: фабрика приложений, создающая серверное приложение для обработки запросов;\n- `_actions`: набор доступных контролируемых действий.\n\nМетод `start()` запускает сервер и привязывает к нему обработчики, предоставленные пользователем при настройке системы.\nМетод `stop()` останавливает запущенный сервер.\n\nТаким образом, класс обеспечивает простую и удобную инфраструктуру для развертывания и мониторинга удалённых сервисов через HTTP-протокол.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN_LOCAL", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN_LOCAL", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C2_DEPENDENCY_GRAPH" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "HttpControlChannel" + ], + "keyword_hints": [ + "src/app_runtime/control/http_channel.py", + "HttpControlChannel" + ], + "path_hints": [ + "src/app_runtime/control/http_channel.py" + ], + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C2_DEPENDENCY_GRAPH" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 12, + "C2_DEPENDENCY_GRAPH": 4 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "HttpControlChannel", + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Почему в файле src/app_runtime/control/http_channel.py класс HttpControlChannel устроен так?", + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 12, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Почему в файле src/app_runtime/control/http_channel.py класс HttpControlChannel устроен так?", + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 4, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 4, + "candidates_after_filter": 4 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "HttpControlChannel", + "alternatives": [ + "HttpControlChannel" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 4, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 1, + "symbol_resolution": 0, + "retrieval_total": 90, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 34, + "C0_SOURCE_CHUNKS": 25, + "C2_DEPENDENCY_GRAPH": 29 + }, + "merge_rank": 39, + "prompt_build": 0, + "llm_call": 2794 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 898, + "evidence_rows": 6, + "evidence_chars": 2660 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 4, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_explain_local_ru_v4", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "src/app_runtime/control/http_channel.py", + "HttpControlChannel" + ], + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ] + }, + "llm": { + "used_evidence_count": 6, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-v2-explain-local-http-channel", + "mode": "full_chain", + "run_started_at": "2026-03-12T14:38:57", + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Почему в файле src/app_runtime/control/http_channel.py класс HttpControlChannel устроен так?", + "normalized_query": "Почему в файле src/app_runtime/control/http_channel.py класс HttpControlChannel устроен так?" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Почему в файле src/app_runtime/control/http_channel.py класс HttpControlChannel устроен так?" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Почему в файле src/app_runtime/control/http_channel.py класс HttpControlChannel устроен так?" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN_LOCAL", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C2_DEPENDENCY_GRAPH" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "HttpControlChannel" + ], + "keyword_hints": [ + "src/app_runtime/control/http_channel.py", + "HttpControlChannel" + ], + "path_hints": [ + "src/app_runtime/control/http_channel.py" + ], + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 1 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Почему в файле src/app_runtime/control/http_channel.py класс HttpControlChannel устроен так?" + }, + "output": { + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "HttpControlChannel", + "alternatives": [ + "HttpControlChannel" + ], + "confidence": 0.99 + }, + "rag_count": 6, + "rag_rows": [ + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel\nHttpControlChannel(ControlChannel)", + "layer": "C1_SYMBOL_CATALOG", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "qname": "HttpControlChannel", + "kind": "class", + "signature": "HttpControlChannel(ControlChannel)", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._timeout\n -> HttpControlChannel._action_response", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "c3ef21fcae96c82c00be74b3ab827d4af2085d89cb3fa5521c19a174aad84dbb", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "e64969024ccaeb34d8d91473fad07b3b3d341875846392e7a006406c7ada1954", + "dst_ref": "HttpControlChannel._action_response", + "resolution": "resolved", + "slice_id": "c3ef21fcae96c82c00be74b3ab827d4af2085d89cb3fa5521c19a174aad84dbb", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._timeout", + "HttpControlChannel._action_response" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "e64969024ccaeb34d8d91473fad07b3b3d341875846392e7a006406c7ada1954" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._runner\n -> HttpControlChannel.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 15, + "span_end": 22, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "51d73913df709152258ed1b9a8c8f4eb3c575eccfe6b982aef0b28e0789a29da", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0", + "dst_ref": "HttpControlChannel.start", + "resolution": "resolved", + "slice_id": "51d73913df709152258ed1b9a8c8f4eb3c575eccfe6b982aef0b28e0789a29da", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._runner", + "HttpControlChannel.start" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._timeout\n -> HttpControlChannel._health_response", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 14, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "f858f5c9e575f6c4cdfe3853571b7ee21d1f628a443541d2037c3dc9d0790bef", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "e84bf04e9cd2127df235b7064d05f47e19f19a89c7c82f4c247231d4e8fa426a", + "dst_ref": "HttpControlChannel._health_response", + "resolution": "resolved", + "slice_id": "f858f5c9e575f6c4cdfe3853571b7ee21d1f628a443541d2037c3dc9d0790bef", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._timeout", + "HttpControlChannel._health_response" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "e84bf04e9cd2127df235b7064d05f47e19f19a89c7c82f4c247231d4e8fa426a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._runner\n -> HttpControlChannel.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 15, + "span_end": 25, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "0f827ef81a990258a8a74381c8564a8361afa6712dba3200592659c939adcb9d", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "f29ab212620093d72be20e26c5a399624c7939a6056a728762ed3f84a250bfa3", + "dst_ref": "HttpControlChannel.stop", + "resolution": "resolved", + "slice_id": "0f827ef81a990258a8a74381c8564a8361afa6712dba3200592659c939adcb9d", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._runner", + "HttpControlChannel.stop" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "f29ab212620093d72be20e26c5a399624c7939a6056a728762ed3f84a250bfa3" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel(ControlChannel):\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._timeout = timeout\n self._runner = UvicornThreadRunner(host, port, timeout)\n self._factory = HttpControlAppFactory()\n self._actions: ControlActionSet | None = None\n\n async def start(self, actions: ControlActionSet) -> None:\n self._actions = actions\n app = self._factory.create(self._health_response, self._action_response)\n await self._runner.start(app)\n\n async def stop(self) -> None:\n await self._runner.stop()\n\n @property\n def port(self) -> int:\n return self._runner.port\n\n async def _health_response(self) -> dict[str, object]:\n if self._actions is None:\n return {\"status\": \"unhealthy\", \"detail\": \"control actions are not configured\"}\n return await asyncio.wait_for(self._actions.health(), timeout=float(self._timeout))\n\n async def _action_response(self, action: str, _client_source: str = \"unknown\") -> JSONResponse:\n if self._actions is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"{action} handler is not configured\"}, status_code=404)\n callbacks = {\n \"start\": self._actions.start,\n \"stop\": self._actions.stop,\n \"status\": self._actions.status,\n }\n callback = callbacks.get(action)\n if callback is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"unsupported action: {action}\"}, status_code=404)\n action_timeout = max(float(self._timeout), 10.0) if action in {\"start\", \"stop\"} else float(self._timeout)\n try:\n detail = await asyncio.wait_for(callback(), timeout=action_timeout)\n except asyncio.TimeoutError:\n return JSONResponse(\n content={\"status\": \"accepted\", \"detail\": f\"{action} operation is still in progress\"},\n status_code=202,\n )\n except Exception as exc:\n return JSONResponse(content={\"status\": \"error\", \"detail\": str(exc)}, status_code=500)\n return JSONResponse(content={\"status\": \"ok\", \"detail\": detail or f\"{action} action accepted\"}, status_code=200)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_channel.py:HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C2_DEPENDENCY_GRAPH" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 12, + "C2_DEPENDENCY_GRAPH": 4 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "HttpControlChannel", + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Почему в файле src/app_runtime/control/http_channel.py класс HttpControlChannel устроен так?", + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 12, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Почему в файле src/app_runtime/control/http_channel.py класс HttpControlChannel устроен так?", + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 4, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 4, + "candidates_after_filter": 4 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "HttpControlChannel", + "alternatives": [ + "HttpControlChannel" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 4, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 90, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 34, + "C0_SOURCE_CHUNKS": 25, + "C2_DEPENDENCY_GRAPH": 29 + }, + "merge_rank": 39 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Почему в файле src/app_runtime/control/http_channel.py класс HttpControlChannel устроен так?", + "rag_count": 6 + }, + "output": { + "llm_answer": "Класс `HttpControlChannel` реализует механизм управления HTTP каналом для взаимодействия с внешними клиентами или сервисами через протокол HTTP.\n\nЕго основная задача — обеспечивать старт и останов канала приема запросов, а также обработку двух типов ответов:\n\n1. Health check (`_health_response`) – возвращает статус системы (здорово ли она функционирует). Проверяет наличие настроенных действий контроля и возвращает состояние («здорова» или «нездорова») вместе с дополнительной информацией.\n \n Входные данные: \n - нет явных входных данных, кроме конфигурации каналов и настроенных действий;\n - выходные данные: словарь состояния и детализированного сообщения.\n\n2. Обработка пользовательских действий (`_action_response`) – отвечает за выполнение конкретного действия, указанного клиентом (например, изменение настроек, перезапуск сервиса).\n \n Входные данные:\n - строка с именем действия (`action`);\n - необязательное поле `_client_source`, указывающее источник запроса.\n \n Выходные данные:\n - либо успешное сообщение о выполненном действии,\n - либо ошибка, если действие не настроено или истекло время ожидания выполнения.\n\nПри инициализации класса создаются следующие компоненты:\n- `_runner`: объект, управляющий uvicorn-сервером (используется для запуска сервера);\n- `_factory`: фабрика приложений, создающая серверное приложение для обработки запросов;\n- `_actions`: набор доступных контролируемых действий.\n\nМетод `start()` запускает сервер и привязывает к нему обработчики, предоставленные пользователем при настройке системы.\nМетод `stop()` останавливает запущенный сервер.\n\nТаким образом, класс обеспечивает простую и удобную инфраструктуру для развертывания и мониторинга удалённых сервисов через HTTP-протокол." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 898, + "evidence_rows": 6, + "evidence_chars": 2660 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 4, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_explain_local_ru_v4", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 2794 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-explain-local-http-channel.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-explain-local-http-channel.md new file mode 100644 index 0000000..f248caf --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-explain-local-http-channel.md @@ -0,0 +1,34 @@ +# plba-v2-explain-local-http-channel + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Почему в файле src/app_runtime/control/http_channel.py класс HttpControlChannel устроен так? + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "EXPLAIN_LOCAL", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 6, + "llm_answer": "Класс `HttpControlChannel` реализует механизм управления HTTP каналом для взаимодействия с внешними клиентами или сервисами через протокол HTTP.\n\nЕго основная задача — обеспечивать старт и останов канала приема запросов, а также обработку двух типов ответов:\n\n1. Health check (`_health_response`) – возвращает статус системы (здорово ли она функционирует). Проверяет наличие настроенных действий контроля и возвращает состояние («здорова» или «нездорова») вместе с дополнительной информацией.\n \n Входные данные: \n - нет явных входных данных, кроме конфигурации каналов и настроенных действий;\n - выходные данные: словарь состояния и детализированного сообщения.\n\n2. Обработка пользовательских действий (`_action_response`) – отвечает за выполнение конкретного действия, указанного клиентом (например, изменение настроек, перезапуск сервиса).\n \n Входные данные:\n - строка с именем действия (`action`);\n - необязательное поле `_client_source`, указывающее источник запроса.\n \n Выходные данные:\n - либо успешное сообщение о выполненном действии,\n - либо ошибка, если действие не настроено или истекло время ожидания выполнения.\n\nПри инициализации класса создаются следующие компоненты:\n- `_runner`: объект, управляющий uvicorn-сервером (используется для запуска сервера);\n- `_factory`: фабрика приложений, создающая серверное приложение для обработки запросов;\n- `_actions`: набор доступных контролируемых действий.\n\nМетод `start()` запускает сервер и привязывает к нему обработчики, предоставленные пользователем при настройке системы.\nМетод `stop()` останавливает запущенный сервер.\n\nТаким образом, класс обеспечивает простую и удобную инфраструктуру для развертывания и мониторинга удалённых сервисов через HTTP-протокол.", + "answer_mode": "answered", + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "symbol_candidates": [ + "HttpControlChannel" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C2_DEPENDENCY_GRAPH" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-explain-nonexistent-symbol.json b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-explain-nonexistent-symbol.json new file mode 100644 index 0000000..fe33d48 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-explain-nonexistent-symbol.json @@ -0,0 +1,1169 @@ +{ + "case_id": "plba-v2-explain-nonexistent-symbol", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 0, + "llm_answer": "Сущность RuntimeFactoryManager не найдена в доступном коде. Близкие совпадения: ControlChannel, ControlActionSet.", + "answer_mode": "degraded", + "path_scope": [], + "symbol_candidates": [ + "RuntimeFactoryManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-v2-explain-nonexistent-symbol", + "text": "Объясни класс RuntimeFactoryManager", + "mode": "full_chain", + "run_started_at": "2026-03-12T14:38:57", + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни класс RuntimeFactoryManager", + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "ControlChannel", + "ControlActionSet" + ], + "confidence": 0.0 + }, + "rag_count": 0, + "rag_rows": [], + "llm_answer": "Сущность RuntimeFactoryManager не найдена в доступном коде. Близкие совпадения: ControlChannel, ControlActionSet.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [], + "evidence_sufficient": false + }, + "llm": { + "answer_status": "degraded", + "groundedness": "weakly_grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "RuntimeFactoryManager" + ], + "keyword_hints": [ + "RuntimeFactoryManager" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": null, + "workspace_id": null, + "returned_repo_ids": [], + "returned_workspace_ids": [] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "RuntimeFactoryManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "RuntimeFactoryManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "RuntimeFactoryManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "RuntimeFactoryManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "RuntimeFactoryManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 2, + "candidates_after_filter": 2 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "ControlChannel", + "ControlActionSet" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "miss", + "hit_count": 0, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "miss", + "hit_count": 0, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "miss", + "hit_count": 0, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "miss", + "hit_count": 0, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "miss", + "hit_count": 0, + "fail_reason": null + } + ] + }, + "constraint_violations": [ + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C1_SYMBOL_CATALOG", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + }, + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C0_SOURCE_CHUNKS", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + }, + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C4_SEMANTIC_ROLES", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + }, + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C2_DEPENDENCY_GRAPH", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + }, + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C3_ENTRYPOINTS", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + }, + { + "type": "SYMBOL_RESOLUTION_FAILED", + "severity": "warn", + "details": { + "status": "not_found", + "symbol_candidates": [ + "RuntimeFactoryManager" + ] + }, + "suggested_fix": "Increase symbol layer budget or improve fuzzy symbol resolution settings." + } + ], + "timings_ms": { + "router": 1, + "symbol_resolution": 0, + "retrieval_total": 179, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 53, + "C0_SOURCE_CHUNKS": 27, + "C4_SEMANTIC_ROLES": 20, + "C2_DEPENDENCY_GRAPH": 63, + "C3_ENTRYPOINTS": 13 + }, + "merge_rank": 0, + "prompt_build": 0, + "llm_call": 0 + }, + "prompt": null, + "answer_policy": { + "short_circuit": true, + "answer_mode": "degraded", + "failure_reason": "symbol_not_found" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "RuntimeFactoryManager" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 0, + "missing_evidence_reason": "symbol_not_found" + } + }, + "run_info": { + "case_id": "plba-v2-explain-nonexistent-symbol", + "mode": "full_chain", + "run_started_at": "2026-03-12T14:38:57", + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Объясни класс RuntimeFactoryManager", + "normalized_query": "Объясни класс RuntimeFactoryManager" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Объясни класс RuntimeFactoryManager" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни класс RuntimeFactoryManager" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "RuntimeFactoryManager" + ], + "keyword_hints": [ + "RuntimeFactoryManager" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 1 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Объясни класс RuntimeFactoryManager" + }, + "output": { + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "ControlChannel", + "ControlActionSet" + ], + "confidence": 0.0 + }, + "rag_count": 0, + "rag_rows": [] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": null, + "workspace_id": null, + "returned_repo_ids": [], + "returned_workspace_ids": [] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "RuntimeFactoryManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "RuntimeFactoryManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "RuntimeFactoryManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "RuntimeFactoryManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "RuntimeFactoryManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 2, + "candidates_after_filter": 2 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "ControlChannel", + "ControlActionSet" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "miss", + "hit_count": 0, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "miss", + "hit_count": 0, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "miss", + "hit_count": 0, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "miss", + "hit_count": 0, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "miss", + "hit_count": 0, + "fail_reason": null + } + ] + }, + "constraint_violations": [ + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C1_SYMBOL_CATALOG", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + }, + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C0_SOURCE_CHUNKS", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + }, + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C4_SEMANTIC_ROLES", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + }, + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C2_DEPENDENCY_GRAPH", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + }, + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C3_ENTRYPOINTS", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + }, + { + "type": "SYMBOL_RESOLUTION_FAILED", + "severity": "warn", + "details": { + "status": "not_found", + "symbol_candidates": [ + "RuntimeFactoryManager" + ] + }, + "suggested_fix": "Increase symbol layer budget or improve fuzzy symbol resolution settings." + } + ], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 179, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 53, + "C0_SOURCE_CHUNKS": 27, + "C4_SEMANTIC_ROLES": 20, + "C2_DEPENDENCY_GRAPH": 63, + "C3_ENTRYPOINTS": 13 + }, + "merge_rank": 0 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Объясни класс RuntimeFactoryManager", + "rag_count": 0 + }, + "output": { + "llm_answer": "Сущность RuntimeFactoryManager не найдена в доступном коде. Близкие совпадения: ControlChannel, ControlActionSet." + }, + "diagnostics": { + "prompt": null, + "timings_ms": { + "prompt_build": 0, + "llm_call": 0 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-explain-nonexistent-symbol.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-explain-nonexistent-symbol.md new file mode 100644 index 0000000..56d307f --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-explain-nonexistent-symbol.md @@ -0,0 +1,34 @@ +# plba-v2-explain-nonexistent-symbol + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Объясни класс RuntimeFactoryManager + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 0, + "llm_answer": "Сущность RuntimeFactoryManager не найдена в доступном коде. Близкие совпадения: ControlChannel, ControlActionSet.", + "answer_mode": "degraded", + "path_scope": [], + "symbol_candidates": [ + "RuntimeFactoryManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-explain-runtime-manager.json b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-explain-runtime-manager.json new file mode 100644 index 0000000..3889d62 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-explain-runtime-manager.json @@ -0,0 +1,2088 @@ +{ + "case_id": "plba-v2-explain-runtime-manager", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 12, + "llm_answer": "Класс `RuntimeManager` является менеджером, ответственным за координацию и управление различными компонентами приложения в определённый жизненный цикл.\nКлючевые особенности класса:\n\n1. Инициализация:\n - Конструктор принимает несколько необязательных аргументов (`configuration`, `services`, `traces`, `health`, `logs`, `workers`, `control_plane`), которые по умолчанию инициализируются пустыми значениями соответствующих классов.\n \n2. Атрибуты состояния:\n - Имеет атрибуты `_started`, `_state`, `_core_registered`, `_workers_registered`, используемые для отслеживания текущего состояния системы и этапов её запуска.\n\n3. Регистрация сервисов:\n - Метод `_register_core_services()` регистрирует основные сервисы, необходимые для выполнения основных функций приложения.\n\n4. Методы регистрации модулей:\n - Методы вроде `register_module(module)` позволяют зарегистрировать дополнительные модули, расширяя функциональность runtime-системы.\n\nНесмотря на то, что непосредственно в предоставленных данных не указаны подробности вызова методов после инициализации, можно осторожно предположить, что методы могут быть вызваны позже через различные события или HTTP-запросы, учитывая наличие модуля FastAPI в графе зависимостей.\n\nТаким образом, класс `RuntimeManager` работает как центрального координатора различных компонентов приложения, обеспечивая их регистрацию, настройку и управление состоянием во время исполнения программы.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-v2-explain-runtime-manager", + "text": "Объясни как работает класс RuntimeManager", + "mode": "full_chain", + "run_started_at": "2026-03-12T14:38:57", + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни как работает класс RuntimeManager", + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ], + "confidence": 0.99 + }, + "rag_count": 12, + "rag_rows": [ + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager\nRuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "qname": "RuntimeManager", + "kind": "class", + "signature": "RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests manager\n- orchestrates role-like calls (4)\n- reads and writes state attributes\n- participates in dataflow slices (50)", + "layer": "C4_SEMANTIC_ROLES", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 43, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "symbol_name": "RuntimeManager", + "qname": "RuntimeManager", + "role": "pipeline_stage", + "confidence": 0.67, + "dataflow_participation": 50, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 52, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "Класс `RuntimeManager` является менеджером, ответственным за координацию и управление различными компонентами приложения в определённый жизненный цикл.\nКлючевые особенности класса:\n\n1. Инициализация:\n - Конструктор принимает несколько необязательных аргументов (`configuration`, `services`, `traces`, `health`, `logs`, `workers`, `control_plane`), которые по умолчанию инициализируются пустыми значениями соответствующих классов.\n \n2. Атрибуты состояния:\n - Имеет атрибуты `_started`, `_state`, `_core_registered`, `_workers_registered`, используемые для отслеживания текущего состояния системы и этапов её запуска.\n\n3. Регистрация сервисов:\n - Метод `_register_core_services()` регистрирует основные сервисы, необходимые для выполнения основных функций приложения.\n\n4. Методы регистрации модулей:\n - Методы вроде `register_module(module)` позволяют зарегистрировать дополнительные модули, расширяя функциональность runtime-системы.\n\nНесмотря на то, что непосредственно в предоставленных данных не указаны подробности вызова методов после инициализации, можно осторожно предположить, что методы могут быть вызваны позже через различные события или HTTP-запросы, учитывая наличие модуля FastAPI в графе зависимостей.\n\nТаким образом, класс `RuntimeManager` работает как центрального координатора различных компонентов приложения, обеспечивая их регистрацию, настройку и управление состоянием во время исполнения программы.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS", + "C4_SEMANTIC_ROLES" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 2, + "symbol_resolution": 0, + "retrieval_total": 256, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 37, + "C0_SOURCE_CHUNKS": 29, + "C4_SEMANTIC_ROLES": 66, + "C2_DEPENDENCY_GRAPH": 79, + "C3_ENTRYPOINTS": 11 + }, + "merge_rank": 21, + "prompt_build": 0, + "llm_call": 2617 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 919, + "evidence_rows": 12, + "evidence_chars": 7130 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 2 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_explain_ru_v4", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "RuntimeManager" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 12, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-v2-explain-runtime-manager", + "mode": "full_chain", + "run_started_at": "2026-03-12T14:38:57", + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Объясни как работает класс RuntimeManager", + "normalized_query": "Объясни как работает класс RuntimeManager" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Объясни как работает класс RuntimeManager" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни как работает класс RuntimeManager" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 2 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Объясни как работает класс RuntimeManager" + }, + "output": { + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ], + "confidence": 0.99 + }, + "rag_count": 12, + "rag_rows": [ + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager\nRuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "qname": "RuntimeManager", + "kind": "class", + "signature": "RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests manager\n- orchestrates role-like calls (4)\n- reads and writes state attributes\n- participates in dataflow slices (50)", + "layer": "C4_SEMANTIC_ROLES", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 43, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "symbol_name": "RuntimeManager", + "qname": "RuntimeManager", + "role": "pipeline_stage", + "confidence": 0.67, + "dataflow_participation": 50, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 52, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 256, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 37, + "C0_SOURCE_CHUNKS": 29, + "C4_SEMANTIC_ROLES": 66, + "C2_DEPENDENCY_GRAPH": 79, + "C3_ENTRYPOINTS": 11 + }, + "merge_rank": 21 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Объясни как работает класс RuntimeManager", + "rag_count": 12 + }, + "output": { + "llm_answer": "Класс `RuntimeManager` является менеджером, ответственным за координацию и управление различными компонентами приложения в определённый жизненный цикл.\nКлючевые особенности класса:\n\n1. Инициализация:\n - Конструктор принимает несколько необязательных аргументов (`configuration`, `services`, `traces`, `health`, `logs`, `workers`, `control_plane`), которые по умолчанию инициализируются пустыми значениями соответствующих классов.\n \n2. Атрибуты состояния:\n - Имеет атрибуты `_started`, `_state`, `_core_registered`, `_workers_registered`, используемые для отслеживания текущего состояния системы и этапов её запуска.\n\n3. Регистрация сервисов:\n - Метод `_register_core_services()` регистрирует основные сервисы, необходимые для выполнения основных функций приложения.\n\n4. Методы регистрации модулей:\n - Методы вроде `register_module(module)` позволяют зарегистрировать дополнительные модули, расширяя функциональность runtime-системы.\n\nНесмотря на то, что непосредственно в предоставленных данных не указаны подробности вызова методов после инициализации, можно осторожно предположить, что методы могут быть вызваны позже через различные события или HTTP-запросы, учитывая наличие модуля FastAPI в графе зависимостей.\n\nТаким образом, класс `RuntimeManager` работает как центрального координатора различных компонентов приложения, обеспечивая их регистрацию, настройку и управление состоянием во время исполнения программы." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 919, + "evidence_rows": 12, + "evidence_chars": 7130 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 2 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_explain_ru_v4", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 2617 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-explain-runtime-manager.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-explain-runtime-manager.md new file mode 100644 index 0000000..1527d12 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-explain-runtime-manager.md @@ -0,0 +1,34 @@ +# plba-v2-explain-runtime-manager + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Объясни как работает класс RuntimeManager + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 12, + "llm_answer": "Класс `RuntimeManager` является менеджером, ответственным за координацию и управление различными компонентами приложения в определённый жизненный цикл.\nКлючевые особенности класса:\n\n1. Инициализация:\n - Конструктор принимает несколько необязательных аргументов (`configuration`, `services`, `traces`, `health`, `logs`, `workers`, `control_plane`), которые по умолчанию инициализируются пустыми значениями соответствующих классов.\n \n2. Атрибуты состояния:\n - Имеет атрибуты `_started`, `_state`, `_core_registered`, `_workers_registered`, используемые для отслеживания текущего состояния системы и этапов её запуска.\n\n3. Регистрация сервисов:\n - Метод `_register_core_services()` регистрирует основные сервисы, необходимые для выполнения основных функций приложения.\n\n4. Методы регистрации модулей:\n - Методы вроде `register_module(module)` позволяют зарегистрировать дополнительные модули, расширяя функциональность runtime-системы.\n\nНесмотря на то, что непосредственно в предоставленных данных не указаны подробности вызова методов после инициализации, можно осторожно предположить, что методы могут быть вызваны позже через различные события или HTTP-запросы, учитывая наличие модуля FastAPI в графе зависимостей.\n\nТаким образом, класс `RuntimeManager` работает как центрального координатора различных компонентов приложения, обеспечивая их регистрацию, настройку и управление состоянием во время исполнения программы.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-explain-trace-service.json b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-explain-trace-service.json new file mode 100644 index 0000000..6e69a27 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-explain-trace-service.json @@ -0,0 +1,2208 @@ +{ + "case_id": "plba-v2-explain-trace-service", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 14, + "llm_answer": "Класс `TraceService` в файле `src/app_runtime/tracing/service.py` является компонентом, ответственным за управление контекстами трассировки и взаимодействие с транспортом для записи данных о трассировке.\nКлючевые аспекты класса:\n\n1. Инициализация (`__init__()`):\n - Конструктор принимает два параметра: транспорт для записи трассировочных данных (`transport`) и хранилище контекста трассировки (`store`).\n - По умолчанию используются заглушка транспорта (`NoOpTraceTransport()`) и хранилище по умолчанию (`TraceContextStore()`).\n - Создаётся объект записи записей трассировки через `TraceRecordWriter`.\n\n2. Создание контекста трассировки (`create_context()`):\n - Метод создаёт новый контекст трассировки, используя UUID для уникального идентификатора трассировки.\n - Записывает контекст в хранилище и отправляет запись в транспорт через метод записи контекста (`write_context()`).\n - Возвращает уникальный идентификатор созданной трассировки.\n\n3. Временная область видимости контекста трассировки (`open_context()`):\n - Контекст создаётся при входе в блок, а затем автоматически удаляется после выхода из блока.\n - Используется генератор контекста для автоматического управления жизненным циклом трассировки.\nКосвенные выводы:\n- Класс предназначен для участия в конвейере обработки данных (pipeline stage), судя по аннотации ролей (`role: pipeline_stage`).\n- Предполагается участие в потоках данных (\"dataflow slices\"), хотя конкретный механизм этого не указан напрямую.\n\nЭтот компонент играет важную роль в управлении и записи информации о трассировке приложения, обеспечивая унифицированный интерфейс для создания и управления контекстами трассировок.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "TraceService" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-v2-explain-trace-service", + "text": "Объясни как работает класс TraceService", + "mode": "full_chain", + "run_started_at": "2026-03-12T14:38:57", + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни как работает класс TraceService", + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "TraceService", + "alternatives": [ + "TraceService" + ], + "confidence": 0.99 + }, + "rag_count": 14, + "rag_rows": [ + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceService\nTraceService(TraceContextFactory)", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService", + "span_start": 39, + "span_end": 166, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "c2b2b976d99f2c600000b753731b26e0a69adcb4359398b93073590c5d5d04f4", + "qname": "TraceService", + "kind": "class", + "signature": "TraceService(TraceContextFactory)", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (13)", + "layer": "C4_SEMANTIC_ROLES", + "title": "TraceService", + "span_start": 39, + "span_end": 166, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 60, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "c2b2b976d99f2c600000b753731b26e0a69adcb4359398b93073590c5d5d04f4", + "symbol_name": "TraceService", + "qname": "TraceService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 13, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.create_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 61, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3b052062067a78aef3302ee1d996897e02a67d1b340397bea4f59fe147c0492a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a", + "dst_ref": "TraceService.create_context", + "resolution": "resolved", + "slice_id": "3b052062067a78aef3302ee1d996897e02a67d1b340397bea4f59fe147c0492a", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.create_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.close_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 84, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "7a9353ef57c9ae5d19b3a0c6ac50fad05e6d21d31bbe1cd1cd07af6332ba6505", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "01e14158dcced7e52d0c8ac84ac7b9a75225c261b6aca6a1d7da802d0994721c", + "dst_ref": "TraceService.close_context", + "resolution": "resolved", + "slice_id": "7a9353ef57c9ae5d19b3a0c6ac50fad05e6d21d31bbe1cd1cd07af6332ba6505", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.close_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "01e14158dcced7e52d0c8ac84ac7b9a75225c261b6aca6a1d7da802d0994721c" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.open_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 78, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a6e13b9ebc4fed84586afd53ed92a4d14757e440873f572b2337d5622ee96031", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426", + "dst_ref": "TraceService.open_context", + "resolution": "resolved", + "slice_id": "a6e13b9ebc4fed84586afd53ed92a4d14757e440873f572b2337d5622ee96031", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.open_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.transport\n -> TraceService.__init__", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 41, + "span_end": 43, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "1e923a93faa05c3c43ca9b19bd047007a8589ccce57d3cc1798ae7f9f200af98", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "dst_ref": "TraceService.__init__", + "resolution": "resolved", + "slice_id": "1e923a93faa05c3c43ca9b19bd047007a8589ccce57d3cc1798ae7f9f200af98", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.transport", + "TraceService.__init__" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.current_trace_id", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 81, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3ea17138634b1190bded77ddb84aa1595124f6519b246f24fc4b02bd62b5cac1", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c", + "dst_ref": "TraceService.current_trace_id", + "resolution": "resolved", + "slice_id": "3ea17138634b1190bded77ddb84aa1595124f6519b246f24fc4b02bd62b5cac1", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.current_trace_id" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.step", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 88, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "9f34c5da9b09fba99df6f6b1bde183a9aeb45111b8218a747c71590c2c9f60f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "c44bfbc66cf747283f30088da3e011a10395031d41e77b74e523c24997f641ca", + "dst_ref": "TraceService.step", + "resolution": "resolved", + "slice_id": "9f34c5da9b09fba99df6f6b1bde183a9aeb45111b8218a747c71590c2c9f60f2", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.step" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "c44bfbc66cf747283f30088da3e011a10395031d41e77b74e523c24997f641ca" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceRecordWriter:\n def __init__(self, transport: TraceTransport) -> None:\n self._logger = logging.getLogger(__name__)\n self._transport = transport\n\n def write_context(self, record: TraceContextRecord) -> None:\n try:\n self._transport.write_context(record)\n except Exception:\n self._logger.exception(\"Trace transport failed to write context %s\", record.trace_id)\n\n def write_message(self, record: TraceLogMessage) -> None:\n try:\n self._transport.write_message(record)\n except Exception:\n self._logger.exception(\"Trace transport failed to write message for %s\", record.trace_id)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/tracing/service.py:TraceRecordWriter", + "span_start": 21, + "span_end": 36, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceService(TraceContextFactory):\n def __init__(self, transport: TraceTransport | None = None, store: TraceContextStore | None = None) -> None:\n self.transport = transport or NoOpTraceTransport()\n self.store = store or TraceContextStore()\n self._writer = TraceRecordWriter(self.transport)\n\n def create_context(\n self,\n *,\n alias: str,\n parent_id: str | None = None,\n kind: str | None = None,\n attrs: dict[str, Any] | None = None,\n ) -> str:\n record = TraceContextRecord(\n trace_id=uuid4().hex,\n alias=str(alias or \"\"),\n parent_id=parent_id,\n type=kind,\n event_time=utc_now(),\n attrs=dict(attrs or {}),\n )\n self.store.push(record)\n self._writer.write_context(record)\n return record.trace_id\n\n @contextmanager\n def open_context(\n self,\n *,\n alias: str,\n parent_id: str | None = None,\n kind: str | None = None,\n attrs: dict[str, Any] | None = None,\n ) -> Iterator[str]:\n trace_id = self.create_context(alias=alias, parent_id=parent_id, kind=kind, attrs=attrs)\n try:\n yield trace_id\n finally:\n self.store.pop()\n\n def current_trace_id(self) -> str | None:\n return self.store.current_trace_id()\n\n def close_context(self) -> str | None:\n previous = self.store.pop()\n return previous.record.trace_id if previous else None\n\n def step(self, name: str) -> None:\n self.store.set_step(str(name or \"\"))\n\n def info(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"INFO\", message, status, attrs)\n\n def debug(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"DEBUG\", message, status, attrs)\n\n def warning(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"WARNING\", message, status, attrs)\n\n def error(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"ERROR\", message, status, attrs)\n\n def exception(self, message: str, *, status: str = \"failed\", attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"ERROR\", message, status, attrs)\n\n def new_root(self, operation: str) -> TraceContext:\n trace_id = self.create_context(alias=operation, kind=\"operation\", attrs={\"operation\": operation})\n return TraceContext(trace_id=trace_id, span_id=trace_id, attributes={\"operation\": operation})\n\n def child_of(self, parent: TraceContext, operation: str) -> TraceContext:\n trace_id = self.create_context(\n alias=operation,\n parent_id=parent.trace_id,\n kind=\"worker\",\n attrs={\"operation\": operation},\n )\n return TraceContext(\n trace_id=trace_id,\n span_id=trace_id,\n parent_span_id=parent.span_id,\n attributes={\"operation\": operation},\n )\n\n def attach(self, metadata: dict[str, object], context: TraceContext) -> dict[str, object]:\n updated = dict(metadata)\n updated[\"trace_id\"] = context.trace_id\n updated[\"span_id\"] = context.span_id\n updated[\"parent_span_id\"] = context.parent_span_id\n return updated\n\n def resume(self, metadata: dict[str, object], operation: str) -> TraceContext:\n trace_id = str(metadata.get(\"trace_id\") or uuid4().hex)\n span_id = str(metadata.get(\"span_id\") or trace_id)\n parent_id = metadata.get(\"parent_span_id\")\n self.create_context(\n alias=operation,\n parent_id=str(parent_id) if parent_id else None,\n kind=\"worker\",\n attrs=dict(metadata),\n )\n return TraceContext(\n trace_id=trace_id,\n span_id=span_id,\n parent_span_id=str(parent_id) if parent_id else None,\n attributes={\"operation\": operation},\n )\n\n def _write_message(\n self,\n level: TraceLevel,\n message: str,\n status: str | None,\n attrs: dict[str, Any] | None,\n ) -> None:\n active = self.store.current()\n if active is None:\n raise RuntimeError(\"Trace context is not bound. Call create_context() first.\")\n record = TraceLogMessage(\n trace_id=active.record.trace_id,\n step=active.step,\n status=str(status or \"\"),\n message=str(message or \"\"),\n level=level,\n event_time=utc_now(),\n attrs=dict(attrs or {}),\n )\n self._writer.write_message(record)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/tracing/service.py:TraceService", + "span_start": 39, + "span_end": 166, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceManager(TraceService):\n \"\"\"Compatibility alias during the transition from ConfigManager-shaped naming.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/tracing/service.py:TraceManager", + "span_start": 169, + "span_end": 170, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 2, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "Класс `TraceService` в файле `src/app_runtime/tracing/service.py` является компонентом, ответственным за управление контекстами трассировки и взаимодействие с транспортом для записи данных о трассировке.\nКлючевые аспекты класса:\n\n1. Инициализация (`__init__()`):\n - Конструктор принимает два параметра: транспорт для записи трассировочных данных (`transport`) и хранилище контекста трассировки (`store`).\n - По умолчанию используются заглушка транспорта (`NoOpTraceTransport()`) и хранилище по умолчанию (`TraceContextStore()`).\n - Создаётся объект записи записей трассировки через `TraceRecordWriter`.\n\n2. Создание контекста трассировки (`create_context()`):\n - Метод создаёт новый контекст трассировки, используя UUID для уникального идентификатора трассировки.\n - Записывает контекст в хранилище и отправляет запись в транспорт через метод записи контекста (`write_context()`).\n - Возвращает уникальный идентификатор созданной трассировки.\n\n3. Временная область видимости контекста трассировки (`open_context()`):\n - Контекст создаётся при входе в блок, а затем автоматически удаляется после выхода из блока.\n - Используется генератор контекста для автоматического управления жизненным циклом трассировки.\nКосвенные выводы:\n- Класс предназначен для участия в конвейере обработки данных (pipeline stage), судя по аннотации ролей (`role: pipeline_stage`).\n- Предполагается участие в потоках данных (\"dataflow slices\"), хотя конкретный механизм этого не указан напрямую.\n\nЭтот компонент играет важную роль в управлении и записи информации о трассировке приложения, обеспечивая унифицированный интерфейс для создания и управления контекстами трассировок.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS", + "C4_SEMANTIC_ROLES" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "TraceService" + ], + "keyword_hints": [ + "TraceService" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "TraceService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "TraceService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "TraceService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "TraceService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "TraceService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "TraceService", + "alternatives": [ + "TraceService" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 174, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 51, + "C0_SOURCE_CHUNKS": 24, + "C4_SEMANTIC_ROLES": 21, + "C2_DEPENDENCY_GRAPH": 57, + "C3_ENTRYPOINTS": 18 + }, + "merge_rank": 34, + "prompt_build": 0, + "llm_call": 3070 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 1055, + "evidence_rows": 14, + "evidence_chars": 6323 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 1 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 3, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_explain_ru_v4", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "TraceService" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 14, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-v2-explain-trace-service", + "mode": "full_chain", + "run_started_at": "2026-03-12T14:38:57", + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Объясни как работает класс TraceService", + "normalized_query": "Объясни как работает класс TraceService" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Объясни как работает класс TraceService" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни как работает класс TraceService" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "TraceService" + ], + "keyword_hints": [ + "TraceService" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Объясни как работает класс TraceService" + }, + "output": { + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "TraceService", + "alternatives": [ + "TraceService" + ], + "confidence": 0.99 + }, + "rag_count": 14, + "rag_rows": [ + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceService\nTraceService(TraceContextFactory)", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService", + "span_start": 39, + "span_end": 166, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "c2b2b976d99f2c600000b753731b26e0a69adcb4359398b93073590c5d5d04f4", + "qname": "TraceService", + "kind": "class", + "signature": "TraceService(TraceContextFactory)", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (13)", + "layer": "C4_SEMANTIC_ROLES", + "title": "TraceService", + "span_start": 39, + "span_end": 166, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 60, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "c2b2b976d99f2c600000b753731b26e0a69adcb4359398b93073590c5d5d04f4", + "symbol_name": "TraceService", + "qname": "TraceService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 13, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.create_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 61, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3b052062067a78aef3302ee1d996897e02a67d1b340397bea4f59fe147c0492a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a", + "dst_ref": "TraceService.create_context", + "resolution": "resolved", + "slice_id": "3b052062067a78aef3302ee1d996897e02a67d1b340397bea4f59fe147c0492a", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.create_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.close_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 84, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "7a9353ef57c9ae5d19b3a0c6ac50fad05e6d21d31bbe1cd1cd07af6332ba6505", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "01e14158dcced7e52d0c8ac84ac7b9a75225c261b6aca6a1d7da802d0994721c", + "dst_ref": "TraceService.close_context", + "resolution": "resolved", + "slice_id": "7a9353ef57c9ae5d19b3a0c6ac50fad05e6d21d31bbe1cd1cd07af6332ba6505", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.close_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "01e14158dcced7e52d0c8ac84ac7b9a75225c261b6aca6a1d7da802d0994721c" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.open_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 78, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a6e13b9ebc4fed84586afd53ed92a4d14757e440873f572b2337d5622ee96031", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426", + "dst_ref": "TraceService.open_context", + "resolution": "resolved", + "slice_id": "a6e13b9ebc4fed84586afd53ed92a4d14757e440873f572b2337d5622ee96031", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.open_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.transport\n -> TraceService.__init__", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 41, + "span_end": 43, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "1e923a93faa05c3c43ca9b19bd047007a8589ccce57d3cc1798ae7f9f200af98", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "dst_ref": "TraceService.__init__", + "resolution": "resolved", + "slice_id": "1e923a93faa05c3c43ca9b19bd047007a8589ccce57d3cc1798ae7f9f200af98", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.transport", + "TraceService.__init__" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.current_trace_id", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 81, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3ea17138634b1190bded77ddb84aa1595124f6519b246f24fc4b02bd62b5cac1", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c", + "dst_ref": "TraceService.current_trace_id", + "resolution": "resolved", + "slice_id": "3ea17138634b1190bded77ddb84aa1595124f6519b246f24fc4b02bd62b5cac1", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.current_trace_id" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.step", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 88, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "9f34c5da9b09fba99df6f6b1bde183a9aeb45111b8218a747c71590c2c9f60f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "c44bfbc66cf747283f30088da3e011a10395031d41e77b74e523c24997f641ca", + "dst_ref": "TraceService.step", + "resolution": "resolved", + "slice_id": "9f34c5da9b09fba99df6f6b1bde183a9aeb45111b8218a747c71590c2c9f60f2", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.step" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "c44bfbc66cf747283f30088da3e011a10395031d41e77b74e523c24997f641ca" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceRecordWriter:\n def __init__(self, transport: TraceTransport) -> None:\n self._logger = logging.getLogger(__name__)\n self._transport = transport\n\n def write_context(self, record: TraceContextRecord) -> None:\n try:\n self._transport.write_context(record)\n except Exception:\n self._logger.exception(\"Trace transport failed to write context %s\", record.trace_id)\n\n def write_message(self, record: TraceLogMessage) -> None:\n try:\n self._transport.write_message(record)\n except Exception:\n self._logger.exception(\"Trace transport failed to write message for %s\", record.trace_id)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/tracing/service.py:TraceRecordWriter", + "span_start": 21, + "span_end": 36, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceService(TraceContextFactory):\n def __init__(self, transport: TraceTransport | None = None, store: TraceContextStore | None = None) -> None:\n self.transport = transport or NoOpTraceTransport()\n self.store = store or TraceContextStore()\n self._writer = TraceRecordWriter(self.transport)\n\n def create_context(\n self,\n *,\n alias: str,\n parent_id: str | None = None,\n kind: str | None = None,\n attrs: dict[str, Any] | None = None,\n ) -> str:\n record = TraceContextRecord(\n trace_id=uuid4().hex,\n alias=str(alias or \"\"),\n parent_id=parent_id,\n type=kind,\n event_time=utc_now(),\n attrs=dict(attrs or {}),\n )\n self.store.push(record)\n self._writer.write_context(record)\n return record.trace_id\n\n @contextmanager\n def open_context(\n self,\n *,\n alias: str,\n parent_id: str | None = None,\n kind: str | None = None,\n attrs: dict[str, Any] | None = None,\n ) -> Iterator[str]:\n trace_id = self.create_context(alias=alias, parent_id=parent_id, kind=kind, attrs=attrs)\n try:\n yield trace_id\n finally:\n self.store.pop()\n\n def current_trace_id(self) -> str | None:\n return self.store.current_trace_id()\n\n def close_context(self) -> str | None:\n previous = self.store.pop()\n return previous.record.trace_id if previous else None\n\n def step(self, name: str) -> None:\n self.store.set_step(str(name or \"\"))\n\n def info(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"INFO\", message, status, attrs)\n\n def debug(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"DEBUG\", message, status, attrs)\n\n def warning(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"WARNING\", message, status, attrs)\n\n def error(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"ERROR\", message, status, attrs)\n\n def exception(self, message: str, *, status: str = \"failed\", attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"ERROR\", message, status, attrs)\n\n def new_root(self, operation: str) -> TraceContext:\n trace_id = self.create_context(alias=operation, kind=\"operation\", attrs={\"operation\": operation})\n return TraceContext(trace_id=trace_id, span_id=trace_id, attributes={\"operation\": operation})\n\n def child_of(self, parent: TraceContext, operation: str) -> TraceContext:\n trace_id = self.create_context(\n alias=operation,\n parent_id=parent.trace_id,\n kind=\"worker\",\n attrs={\"operation\": operation},\n )\n return TraceContext(\n trace_id=trace_id,\n span_id=trace_id,\n parent_span_id=parent.span_id,\n attributes={\"operation\": operation},\n )\n\n def attach(self, metadata: dict[str, object], context: TraceContext) -> dict[str, object]:\n updated = dict(metadata)\n updated[\"trace_id\"] = context.trace_id\n updated[\"span_id\"] = context.span_id\n updated[\"parent_span_id\"] = context.parent_span_id\n return updated\n\n def resume(self, metadata: dict[str, object], operation: str) -> TraceContext:\n trace_id = str(metadata.get(\"trace_id\") or uuid4().hex)\n span_id = str(metadata.get(\"span_id\") or trace_id)\n parent_id = metadata.get(\"parent_span_id\")\n self.create_context(\n alias=operation,\n parent_id=str(parent_id) if parent_id else None,\n kind=\"worker\",\n attrs=dict(metadata),\n )\n return TraceContext(\n trace_id=trace_id,\n span_id=span_id,\n parent_span_id=str(parent_id) if parent_id else None,\n attributes={\"operation\": operation},\n )\n\n def _write_message(\n self,\n level: TraceLevel,\n message: str,\n status: str | None,\n attrs: dict[str, Any] | None,\n ) -> None:\n active = self.store.current()\n if active is None:\n raise RuntimeError(\"Trace context is not bound. Call create_context() first.\")\n record = TraceLogMessage(\n trace_id=active.record.trace_id,\n step=active.step,\n status=str(status or \"\"),\n message=str(message or \"\"),\n level=level,\n event_time=utc_now(),\n attrs=dict(attrs or {}),\n )\n self._writer.write_message(record)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/tracing/service.py:TraceService", + "span_start": 39, + "span_end": 166, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceManager(TraceService):\n \"\"\"Compatibility alias during the transition from ConfigManager-shaped naming.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/tracing/service.py:TraceManager", + "span_start": 169, + "span_end": 170, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 2, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "TraceService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "TraceService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "TraceService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "TraceService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "TraceService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "TraceService", + "alternatives": [ + "TraceService" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 174, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 51, + "C0_SOURCE_CHUNKS": 24, + "C4_SEMANTIC_ROLES": 21, + "C2_DEPENDENCY_GRAPH": 57, + "C3_ENTRYPOINTS": 18 + }, + "merge_rank": 34 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Объясни как работает класс TraceService", + "rag_count": 14 + }, + "output": { + "llm_answer": "Класс `TraceService` в файле `src/app_runtime/tracing/service.py` является компонентом, ответственным за управление контекстами трассировки и взаимодействие с транспортом для записи данных о трассировке.\nКлючевые аспекты класса:\n\n1. Инициализация (`__init__()`):\n - Конструктор принимает два параметра: транспорт для записи трассировочных данных (`transport`) и хранилище контекста трассировки (`store`).\n - По умолчанию используются заглушка транспорта (`NoOpTraceTransport()`) и хранилище по умолчанию (`TraceContextStore()`).\n - Создаётся объект записи записей трассировки через `TraceRecordWriter`.\n\n2. Создание контекста трассировки (`create_context()`):\n - Метод создаёт новый контекст трассировки, используя UUID для уникального идентификатора трассировки.\n - Записывает контекст в хранилище и отправляет запись в транспорт через метод записи контекста (`write_context()`).\n - Возвращает уникальный идентификатор созданной трассировки.\n\n3. Временная область видимости контекста трассировки (`open_context()`):\n - Контекст создаётся при входе в блок, а затем автоматически удаляется после выхода из блока.\n - Используется генератор контекста для автоматического управления жизненным циклом трассировки.\nКосвенные выводы:\n- Класс предназначен для участия в конвейере обработки данных (pipeline stage), судя по аннотации ролей (`role: pipeline_stage`).\n- Предполагается участие в потоках данных (\"dataflow slices\"), хотя конкретный механизм этого не указан напрямую.\n\nЭтот компонент играет важную роль в управлении и записи информации о трассировке приложения, обеспечивая унифицированный интерфейс для создания и управления контекстами трассировок." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 1055, + "evidence_rows": 14, + "evidence_chars": 6323 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 1 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 3, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_explain_ru_v4", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 3070 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-explain-trace-service.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-explain-trace-service.md new file mode 100644 index 0000000..550216d --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-explain-trace-service.md @@ -0,0 +1,34 @@ +# plba-v2-explain-trace-service + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Объясни как работает класс TraceService + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 14, + "llm_answer": "Класс `TraceService` в файле `src/app_runtime/tracing/service.py` является компонентом, ответственным за управление контекстами трассировки и взаимодействие с транспортом для записи данных о трассировке.\nКлючевые аспекты класса:\n\n1. Инициализация (`__init__()`):\n - Конструктор принимает два параметра: транспорт для записи трассировочных данных (`transport`) и хранилище контекста трассировки (`store`).\n - По умолчанию используются заглушка транспорта (`NoOpTraceTransport()`) и хранилище по умолчанию (`TraceContextStore()`).\n - Создаётся объект записи записей трассировки через `TraceRecordWriter`.\n\n2. Создание контекста трассировки (`create_context()`):\n - Метод создаёт новый контекст трассировки, используя UUID для уникального идентификатора трассировки.\n - Записывает контекст в хранилище и отправляет запись в транспорт через метод записи контекста (`write_context()`).\n - Возвращает уникальный идентификатор созданной трассировки.\n\n3. Временная область видимости контекста трассировки (`open_context()`):\n - Контекст создаётся при входе в блок, а затем автоматически удаляется после выхода из блока.\n - Используется генератор контекста для автоматического управления жизненным циклом трассировки.\nКосвенные выводы:\n- Класс предназначен для участия в конвейере обработки данных (pipeline stage), судя по аннотации ролей (`role: pipeline_stage`).\n- Предполагается участие в потоках данных (\"dataflow slices\"), хотя конкретный механизм этого не указан напрямую.\n\nЭтот компонент играет важную роль в управлении и записи информации о трассировке приложения, обеспечивая унифицированный интерфейс для создания и управления контекстами трассировок.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "TraceService" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-control-plane.json b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-control-plane.json new file mode 100644 index 0000000..81a07e0 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-control-plane.json @@ -0,0 +1,1236 @@ +{ + "case_id": "plba-v2-find-entrypoints-control-plane", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 9, + "llm_answer": "В системе обнаружены следующие подтвержденные точки входа HTTP control plane:\n\n1.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "HTTP", + "control", + "plane" + ], + "layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-v2-find-entrypoints-control-plane", + "text": "Найди точки входа HTTP control plane", + "mode": "full_chain", + "run_started_at": "2026-03-12T14:38:57", + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Найди точки входа HTTP control plane", + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "HTTP", + "control", + "plane" + ], + "confidence": 0.0 + }, + "rag_count": 9, + "rag_rows": [ + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel(ControlChannel):\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._timeout = timeout\n self._runner = UvicornThreadRunner(host, port, timeout)\n self._factory = HttpControlAppFactory()\n self._actions: ControlActionSet | None = None\n\n async def start(self, actions: ControlActionSet) -> None:\n self._actions = actions\n app = self._factory.create(self._health_response, self._action_response)\n await self._runner.start(app)\n\n async def stop(self) -> None:\n await self._runner.stop()\n\n @property\n def port(self) -> int:\n return self._runner.port\n\n async def _health_response(self) -> dict[str, object]:\n if self._actions is None:\n return {\"status\": \"unhealthy\", \"detail\": \"control actions are not configured\"}\n return await asyncio.wait_for(self._actions.health(), timeout=float(self._timeout))\n\n async def _action_response(self, action: str, _client_source: str = \"unknown\") -> JSONResponse:\n if self._actions is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"{action} handler is not configured\"}, status_code=404)\n callbacks = {\n \"start\": self._actions.start,\n \"stop\": self._actions.stop,\n \"status\": self._actions.status,\n }\n callback = callbacks.get(action)\n if callback is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"unsupported action: {action}\"}, status_code=404)\n action_timeout = max(float(self._timeout), 10.0) if action in {\"start\", \"stop\"} else float(self._timeout)\n try:\n detail = await asyncio.wait_for(callback(), timeout=action_timeout)\n except asyncio.TimeoutError:\n return JSONResponse(\n content={\"status\": \"accepted\", \"detail\": f\"{action} operation is still in progress\"},\n status_code=202,\n )\n except Exception as exc:\n return JSONResponse(content={\"status\": \"error\", \"detail\": str(exc)}, status_code=500)\n return JSONResponse(content={\"status\": \"ok\", \"detail\": detail or f\"{action} action accepted\"}, status_code=200)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_channel.py:HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "class HttpControlAppFactory:\n def create(\n self,\n health_provider: Callable[[], Awaitable[HealthPayload]],\n action_provider: Callable[[str, str], Awaitable[JSONResponse]],\n ) -> FastAPI:\n app = FastAPI(title=\"PLBA Control API\")\n\n @app.middleware(\"http\")\n async def log_api_call(request: Request, call_next): # type: ignore[no-untyped-def]\n started = time.monotonic()\n response = await call_next(request)\n response.headers[\"X-Response-Time-Ms\"] = str(int((time.monotonic() - started) * 1000))\n return response\n\n @app.get(\"/health\")\n async def health() -> JSONResponse:\n payload = await health_provider()\n status_code = 200 if payload.get(\"status\") == \"ok\" else 503\n return JSONResponse(content=payload, status_code=status_code)\n\n @app.get(\"/actions/{action}\")\n @app.post(\"/actions/{action}\")\n async def action(action: str, request: Request) -> JSONResponse:\n client_source = self._client_source(request)\n if action in {\"start\", \"stop\"}:\n LOGGER.warning(\"Control action requested: /actions/%s client=%s\", action, client_source)\n return await action_provider(action, client_source)\n\n return app\n\n def _client_source(self, request: Request) -> str:\n explicit_header = request.headers.get(\"X-Client-Source\", \"\").strip()\n if explicit_header:\n return explicit_header\n user_agent = request.headers.get(\"User-Agent\", \"\").strip()\n if user_agent:\n return f\"user-agent:{user_agent}\"\n return \"unknown\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_app.py:HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlActionSet:\n health: HealthHandler\n start: ActionHandler\n stop: ActionHandler\n status: ActionHandler", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\"ControlActionSet\", \"ControlChannel\", \"ControlPlaneService\", \"HttpControlChannel\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/__init__.py:1-5", + "span_start": 1, + "span_end": 5, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlChannel(ABC):\n @abstractmethod\n async def start(self, actions: ControlActionSet) -> None:\n \"\"\"Start the control channel and bind handlers.\"\"\"\n\n @abstractmethod\n async def stop(self) -> None:\n \"\"\"Stop the control channel and release resources.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "class UvicornThreadRunner:\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._host = host\n self._port = port\n self._timeout = timeout\n self._server: Server | None = None\n self._thread: Thread | None = None\n self._error: BaseException | None = None\n\n async def start(self, app: FastAPI) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._error = None\n config = Config(app=app, host=self._host, port=self._port, log_level=\"warning\")\n self._server = Server(config)\n self._thread = Thread(target=self._serve, name=\"plba-http-control\", daemon=True)\n self._thread.start()\n await self._wait_until_started()\n\n async def stop(self) -> None:\n if self._server is None or self._thread is None:\n return\n self._server.should_exit = True\n await asyncio.to_thread(self._thread.join, self._timeout)\n self._server = None\n self._thread = None\n\n @property\n def port(self) -> int:\n if self._server is None or not getattr(self._server, \"servers\", None):\n return self._port\n socket = self._server.servers[0].sockets[0]\n return int(socket.getsockname()[1])\n\n async def _wait_until_started(self) -> None:\n if self._server is None:\n raise RuntimeError(\"Server is not initialized\")\n deadline = asyncio.get_running_loop().time() + max(float(self._timeout), 1.0)\n while not self._server.started:\n if self._error is not None:\n raise RuntimeError(\"HTTP control server failed to start\") from self._error\n if asyncio.get_running_loop().time() >= deadline:\n raise TimeoutError(\"HTTP control server startup timed out\")\n await asyncio.sleep(0.05)\n\n def _serve(self) -> None:\n if self._server is None:\n return\n try:\n asyncio.run(self._server.serve())\n except BaseException as exc: # noqa: BLE001\n self._error = exc", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_runner.py:UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_runner", + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "В системе обнаружены следующие подтвержденные точки входа HTTP control plane:\n\n1.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C3_ENTRYPOINTS" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "HTTP", + "control", + "plane" + ], + "keyword_hints": [ + "HTTP", + "control", + "plane" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C3_ENTRYPOINTS": "exact_path_fetch", + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C3_ENTRYPOINTS": 12, + "C0_SOURCE_CHUNKS": 6 + }, + "filters_by_layer": { + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C3_ENTRYPOINTS", + "query": "Найди точки входа HTTP control plane", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 12, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Найди точки входа HTTP control plane", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "HTTP", + "control", + "plane" + ] + }, + "layers": [ + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 6, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 1, + "symbol_resolution": 0, + "retrieval_total": 53, + "retrieval_by_layer": { + "C3_ENTRYPOINTS": 34, + "C0_SOURCE_CHUNKS": 19 + }, + "merge_rank": 0, + "prompt_build": 0, + "llm_call": 1472 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 1195, + "evidence_rows": 9, + "evidence_chars": 6731 + }, + "evidence_summary": [ + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 6, + "unique_paths": 5 + } + ], + "prompt_template_id": "intent_code_qa_find_entrypoints_ru_v4", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "HTTP", + "control", + "plane" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 9, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-v2-find-entrypoints-control-plane", + "mode": "full_chain", + "run_started_at": "2026-03-12T14:38:57", + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Найди точки входа HTTP control plane", + "normalized_query": "Найди точки входа HTTP control plane" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Найди точки входа HTTP control plane" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Найди точки входа HTTP control plane" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "HTTP", + "control", + "plane" + ], + "keyword_hints": [ + "HTTP", + "control", + "plane" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 1 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Найди точки входа HTTP control plane" + }, + "output": { + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "HTTP", + "control", + "plane" + ], + "confidence": 0.0 + }, + "rag_count": 9, + "rag_rows": [ + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel(ControlChannel):\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._timeout = timeout\n self._runner = UvicornThreadRunner(host, port, timeout)\n self._factory = HttpControlAppFactory()\n self._actions: ControlActionSet | None = None\n\n async def start(self, actions: ControlActionSet) -> None:\n self._actions = actions\n app = self._factory.create(self._health_response, self._action_response)\n await self._runner.start(app)\n\n async def stop(self) -> None:\n await self._runner.stop()\n\n @property\n def port(self) -> int:\n return self._runner.port\n\n async def _health_response(self) -> dict[str, object]:\n if self._actions is None:\n return {\"status\": \"unhealthy\", \"detail\": \"control actions are not configured\"}\n return await asyncio.wait_for(self._actions.health(), timeout=float(self._timeout))\n\n async def _action_response(self, action: str, _client_source: str = \"unknown\") -> JSONResponse:\n if self._actions is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"{action} handler is not configured\"}, status_code=404)\n callbacks = {\n \"start\": self._actions.start,\n \"stop\": self._actions.stop,\n \"status\": self._actions.status,\n }\n callback = callbacks.get(action)\n if callback is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"unsupported action: {action}\"}, status_code=404)\n action_timeout = max(float(self._timeout), 10.0) if action in {\"start\", \"stop\"} else float(self._timeout)\n try:\n detail = await asyncio.wait_for(callback(), timeout=action_timeout)\n except asyncio.TimeoutError:\n return JSONResponse(\n content={\"status\": \"accepted\", \"detail\": f\"{action} operation is still in progress\"},\n status_code=202,\n )\n except Exception as exc:\n return JSONResponse(content={\"status\": \"error\", \"detail\": str(exc)}, status_code=500)\n return JSONResponse(content={\"status\": \"ok\", \"detail\": detail or f\"{action} action accepted\"}, status_code=200)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_channel.py:HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "class HttpControlAppFactory:\n def create(\n self,\n health_provider: Callable[[], Awaitable[HealthPayload]],\n action_provider: Callable[[str, str], Awaitable[JSONResponse]],\n ) -> FastAPI:\n app = FastAPI(title=\"PLBA Control API\")\n\n @app.middleware(\"http\")\n async def log_api_call(request: Request, call_next): # type: ignore[no-untyped-def]\n started = time.monotonic()\n response = await call_next(request)\n response.headers[\"X-Response-Time-Ms\"] = str(int((time.monotonic() - started) * 1000))\n return response\n\n @app.get(\"/health\")\n async def health() -> JSONResponse:\n payload = await health_provider()\n status_code = 200 if payload.get(\"status\") == \"ok\" else 503\n return JSONResponse(content=payload, status_code=status_code)\n\n @app.get(\"/actions/{action}\")\n @app.post(\"/actions/{action}\")\n async def action(action: str, request: Request) -> JSONResponse:\n client_source = self._client_source(request)\n if action in {\"start\", \"stop\"}:\n LOGGER.warning(\"Control action requested: /actions/%s client=%s\", action, client_source)\n return await action_provider(action, client_source)\n\n return app\n\n def _client_source(self, request: Request) -> str:\n explicit_header = request.headers.get(\"X-Client-Source\", \"\").strip()\n if explicit_header:\n return explicit_header\n user_agent = request.headers.get(\"User-Agent\", \"\").strip()\n if user_agent:\n return f\"user-agent:{user_agent}\"\n return \"unknown\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_app.py:HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlActionSet:\n health: HealthHandler\n start: ActionHandler\n stop: ActionHandler\n status: ActionHandler", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\"ControlActionSet\", \"ControlChannel\", \"ControlPlaneService\", \"HttpControlChannel\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/__init__.py:1-5", + "span_start": 1, + "span_end": 5, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlChannel(ABC):\n @abstractmethod\n async def start(self, actions: ControlActionSet) -> None:\n \"\"\"Start the control channel and bind handlers.\"\"\"\n\n @abstractmethod\n async def stop(self) -> None:\n \"\"\"Stop the control channel and release resources.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "class UvicornThreadRunner:\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._host = host\n self._port = port\n self._timeout = timeout\n self._server: Server | None = None\n self._thread: Thread | None = None\n self._error: BaseException | None = None\n\n async def start(self, app: FastAPI) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._error = None\n config = Config(app=app, host=self._host, port=self._port, log_level=\"warning\")\n self._server = Server(config)\n self._thread = Thread(target=self._serve, name=\"plba-http-control\", daemon=True)\n self._thread.start()\n await self._wait_until_started()\n\n async def stop(self) -> None:\n if self._server is None or self._thread is None:\n return\n self._server.should_exit = True\n await asyncio.to_thread(self._thread.join, self._timeout)\n self._server = None\n self._thread = None\n\n @property\n def port(self) -> int:\n if self._server is None or not getattr(self._server, \"servers\", None):\n return self._port\n socket = self._server.servers[0].sockets[0]\n return int(socket.getsockname()[1])\n\n async def _wait_until_started(self) -> None:\n if self._server is None:\n raise RuntimeError(\"Server is not initialized\")\n deadline = asyncio.get_running_loop().time() + max(float(self._timeout), 1.0)\n while not self._server.started:\n if self._error is not None:\n raise RuntimeError(\"HTTP control server failed to start\") from self._error\n if asyncio.get_running_loop().time() >= deadline:\n raise TimeoutError(\"HTTP control server startup timed out\")\n await asyncio.sleep(0.05)\n\n def _serve(self) -> None:\n if self._server is None:\n return\n try:\n asyncio.run(self._server.serve())\n except BaseException as exc: # noqa: BLE001\n self._error = exc", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_runner.py:UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_runner", + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C3_ENTRYPOINTS": "exact_path_fetch", + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C3_ENTRYPOINTS": 12, + "C0_SOURCE_CHUNKS": 6 + }, + "filters_by_layer": { + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C3_ENTRYPOINTS", + "query": "Найди точки входа HTTP control plane", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 12, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Найди точки входа HTTP control plane", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "HTTP", + "control", + "plane" + ] + }, + "layers": [ + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 6, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 53, + "retrieval_by_layer": { + "C3_ENTRYPOINTS": 34, + "C0_SOURCE_CHUNKS": 19 + }, + "merge_rank": 0 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Найди точки входа HTTP control plane", + "rag_count": 9 + }, + "output": { + "llm_answer": "В системе обнаружены следующие подтвержденные точки входа HTTP control plane:\n\n1." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 1195, + "evidence_rows": 9, + "evidence_chars": 6731 + }, + "evidence_summary": [ + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 6, + "unique_paths": 5 + } + ], + "prompt_template_id": "intent_code_qa_find_entrypoints_ru_v4", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 1472 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-control-plane.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-control-plane.md new file mode 100644 index 0000000..3912163 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-control-plane.md @@ -0,0 +1,33 @@ +# plba-v2-find-entrypoints-control-plane + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Найди точки входа HTTP control plane + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 9, + "llm_answer": "В системе обнаружены следующие подтвержденные точки входа HTTP control plane:\n\n1.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "HTTP", + "control", + "plane" + ], + "layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-health-endpoint.json b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-health-endpoint.json new file mode 100644 index 0000000..c9f2543 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-health-endpoint.json @@ -0,0 +1,1226 @@ +{ + "case_id": "plba-v2-find-entrypoints-health-endpoint", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 9, + "llm_answer": "Подтверждённые HTTP routes для health-endpoint:\n\n- GET /health \n Объявлен в `src/app_runtime/control/http_app.py`, обслуживается методом `http_app.get`.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "health", + "endpoint" + ], + "layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-v2-find-entrypoints-health-endpoint", + "text": "Где health endpoint?", + "mode": "full_chain", + "run_started_at": "2026-03-12T14:38:57", + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Где health endpoint?", + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "health", + "endpoint" + ], + "confidence": 0.0 + }, + "rag_count": 9, + "rag_rows": [ + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/health/registry.py", + "content": "class HealthRegistry:\n def __init__(self) -> None:\n self._contributors: list[HealthContributor] = []\n\n def register(self, contributor: HealthContributor) -> None:\n self._contributors.append(contributor)\n\n def contributor_healths(self) -> list[WorkerHealth]:\n return [contributor.health() for contributor in self._contributors]\n\n def snapshot(self, worker_healths: list[WorkerHealth]) -> dict[str, object]:\n component_healths = worker_healths + self.contributor_healths()\n return {\n \"status\": self._aggregate_status(component_healths),\n \"components\": [self._health_dict(item) for item in component_healths],\n }\n\n def payload(self, state: LifecycleState, worker_healths: list[WorkerHealth]) -> HealthPayload:\n component_healths = worker_healths + self.contributor_healths()\n if state == LifecycleState.STOPPED:\n return {\"status\": \"unhealthy\", \"detail\": \"state=stopped\", \"state\": state.value}\n if state in {LifecycleState.STARTING, LifecycleState.STOPPING}:\n return {\n \"status\": \"degraded\",\n \"detail\": f\"state={state.value}\",\n \"state\": state.value,\n \"components\": [self._health_dict(item) for item in component_healths],\n }\n return {\n \"status\": self._aggregate_status(component_healths),\n \"state\": state.value,\n \"components\": [self._health_dict(item) for item in component_healths],\n }\n\n def _aggregate_status(self, component_healths: list[WorkerHealth]) -> str:\n if any(item.status == \"unhealthy\" and item.critical for item in component_healths):\n return \"unhealthy\"\n if any(item.status in {\"degraded\", \"unhealthy\"} for item in component_healths):\n return \"degraded\"\n return \"ok\"\n\n def _health_dict(self, health: WorkerHealth) -> dict[str, object]:\n return {\n \"name\": health.name,\n \"status\": health.status,\n \"critical\": health.critical,\n \"detail\": health.detail,\n \"meta\": health.meta,\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/health/registry.py:HealthRegistry", + "span_start": 8, + "span_end": 56, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.health.registry", + "is_test": false, + "blob_sha": "26e6a24daa43407ba5340b74497c20153020e79f8d7828ae502aaec378dfcf75", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/health.py", + "content": "from app_runtime.health.registry import HealthRegistry\n\n__all__ = [\"HealthRegistry\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/health/__init__.py:1-3", + "span_start": 1, + "span_end": 3, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.health.__init__", + "is_test": false, + "blob_sha": "f7b15eed8b1f1cca8dfd467909a2612d8cb4e66e46b972ad89a0c9459ce283a0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/health.py", + "content": "class HealthContributor(ABC):\n @abstractmethod\n def health(self) -> WorkerHealth:\n \"\"\"Return contributor health state.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/contracts/health.py:HealthContributor", + "span_start": 7, + "span_end": 10, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.health", + "is_test": false, + "blob_sha": "6bd92611def7131e32d4dd34a8ed85e6cf3c67722ad27797032a632cb30dc097", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/health/__init__.py", + "content": "from app_runtime.health.registry import HealthRegistry\n\n__all__ = [\"HealthRegistry\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/health/__init__.py:1-3", + "span_start": 1, + "span_end": 3, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.health.__init__", + "is_test": false, + "blob_sha": "f7b15eed8b1f1cca8dfd467909a2612d8cb4e66e46b972ad89a0c9459ce283a0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/worker.py", + "content": "class WorkerHealth:\n name: str\n status: HealthState\n critical: bool\n detail: str | None = None\n meta: dict[str, Any] = field(default_factory=dict)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/contracts/worker.py:WorkerHealth", + "span_start": 13, + "span_end": 18, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.worker", + "is_test": false, + "blob_sha": "e4827d32220f322d8adc3e42769da3ca0cc680db6a5eab7a11f4d8773a75304e", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/worker.py", + "content": "class Worker(ABC):\n @property\n @abstractmethod\n def name(self) -> str:\n \"\"\"Stable worker name for diagnostics.\"\"\"\n\n @property\n @abstractmethod\n def critical(self) -> bool:\n \"\"\"Whether this worker is required for healthy app operation.\"\"\"\n\n @abstractmethod\n def start(self) -> None:\n \"\"\"Start worker execution.\"\"\"\n\n @abstractmethod\n def stop(self, force: bool = False) -> None:\n \"\"\"Request graceful or immediate stop.\"\"\"\n\n @abstractmethod\n def health(self) -> WorkerHealth:\n \"\"\"Return current health state.\"\"\"\n\n @abstractmethod\n def status(self) -> WorkerStatus:\n \"\"\"Return current runtime status.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/contracts/worker.py:Worker", + "span_start": 30, + "span_end": 55, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 2, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.worker", + "is_test": false, + "blob_sha": "e4827d32220f322d8adc3e42769da3ca0cc680db6a5eab7a11f4d8773a75304e", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "Подтверждённые HTTP routes для health-endpoint:\n\n- GET /health \n Объявлен в `src/app_runtime/control/http_app.py`, обслуживается методом `http_app.get`.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C3_ENTRYPOINTS" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "unknown", + "symbol_candidates": [ + "health", + "endpoint" + ], + "keyword_hints": [ + "health", + "endpoint" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C3_ENTRYPOINTS": "exact_path_fetch", + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C3_ENTRYPOINTS": 12, + "C0_SOURCE_CHUNKS": 6 + }, + "filters_by_layer": { + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C3_ENTRYPOINTS", + "query": "Где health endpoint?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 12, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Где health endpoint?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "health", + "endpoint" + ] + }, + "layers": [ + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 6, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 37, + "retrieval_by_layer": { + "C3_ENTRYPOINTS": 23, + "C0_SOURCE_CHUNKS": 13 + }, + "merge_rank": 0, + "prompt_build": 0, + "llm_call": 1159 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 904, + "evidence_rows": 9, + "evidence_chars": 3350 + }, + "evidence_summary": [ + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 6, + "unique_paths": 5 + } + ], + "prompt_template_id": "intent_code_qa_find_entrypoints_ru_v4", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "health", + "endpoint" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 9, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-v2-find-entrypoints-health-endpoint", + "mode": "full_chain", + "run_started_at": "2026-03-12T14:38:57", + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Где health endpoint?", + "normalized_query": "Где health endpoint?" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Где health endpoint?" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Где health endpoint?" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "unknown", + "symbol_candidates": [ + "health", + "endpoint" + ], + "keyword_hints": [ + "health", + "endpoint" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Где health endpoint?" + }, + "output": { + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "health", + "endpoint" + ], + "confidence": 0.0 + }, + "rag_count": 9, + "rag_rows": [ + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/health/registry.py", + "content": "class HealthRegistry:\n def __init__(self) -> None:\n self._contributors: list[HealthContributor] = []\n\n def register(self, contributor: HealthContributor) -> None:\n self._contributors.append(contributor)\n\n def contributor_healths(self) -> list[WorkerHealth]:\n return [contributor.health() for contributor in self._contributors]\n\n def snapshot(self, worker_healths: list[WorkerHealth]) -> dict[str, object]:\n component_healths = worker_healths + self.contributor_healths()\n return {\n \"status\": self._aggregate_status(component_healths),\n \"components\": [self._health_dict(item) for item in component_healths],\n }\n\n def payload(self, state: LifecycleState, worker_healths: list[WorkerHealth]) -> HealthPayload:\n component_healths = worker_healths + self.contributor_healths()\n if state == LifecycleState.STOPPED:\n return {\"status\": \"unhealthy\", \"detail\": \"state=stopped\", \"state\": state.value}\n if state in {LifecycleState.STARTING, LifecycleState.STOPPING}:\n return {\n \"status\": \"degraded\",\n \"detail\": f\"state={state.value}\",\n \"state\": state.value,\n \"components\": [self._health_dict(item) for item in component_healths],\n }\n return {\n \"status\": self._aggregate_status(component_healths),\n \"state\": state.value,\n \"components\": [self._health_dict(item) for item in component_healths],\n }\n\n def _aggregate_status(self, component_healths: list[WorkerHealth]) -> str:\n if any(item.status == \"unhealthy\" and item.critical for item in component_healths):\n return \"unhealthy\"\n if any(item.status in {\"degraded\", \"unhealthy\"} for item in component_healths):\n return \"degraded\"\n return \"ok\"\n\n def _health_dict(self, health: WorkerHealth) -> dict[str, object]:\n return {\n \"name\": health.name,\n \"status\": health.status,\n \"critical\": health.critical,\n \"detail\": health.detail,\n \"meta\": health.meta,\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/health/registry.py:HealthRegistry", + "span_start": 8, + "span_end": 56, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.health.registry", + "is_test": false, + "blob_sha": "26e6a24daa43407ba5340b74497c20153020e79f8d7828ae502aaec378dfcf75", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/health.py", + "content": "from app_runtime.health.registry import HealthRegistry\n\n__all__ = [\"HealthRegistry\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/health/__init__.py:1-3", + "span_start": 1, + "span_end": 3, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.health.__init__", + "is_test": false, + "blob_sha": "f7b15eed8b1f1cca8dfd467909a2612d8cb4e66e46b972ad89a0c9459ce283a0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/health.py", + "content": "class HealthContributor(ABC):\n @abstractmethod\n def health(self) -> WorkerHealth:\n \"\"\"Return contributor health state.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/contracts/health.py:HealthContributor", + "span_start": 7, + "span_end": 10, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.health", + "is_test": false, + "blob_sha": "6bd92611def7131e32d4dd34a8ed85e6cf3c67722ad27797032a632cb30dc097", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/health/__init__.py", + "content": "from app_runtime.health.registry import HealthRegistry\n\n__all__ = [\"HealthRegistry\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/health/__init__.py:1-3", + "span_start": 1, + "span_end": 3, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.health.__init__", + "is_test": false, + "blob_sha": "f7b15eed8b1f1cca8dfd467909a2612d8cb4e66e46b972ad89a0c9459ce283a0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/worker.py", + "content": "class WorkerHealth:\n name: str\n status: HealthState\n critical: bool\n detail: str | None = None\n meta: dict[str, Any] = field(default_factory=dict)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/contracts/worker.py:WorkerHealth", + "span_start": 13, + "span_end": 18, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.worker", + "is_test": false, + "blob_sha": "e4827d32220f322d8adc3e42769da3ca0cc680db6a5eab7a11f4d8773a75304e", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/worker.py", + "content": "class Worker(ABC):\n @property\n @abstractmethod\n def name(self) -> str:\n \"\"\"Stable worker name for diagnostics.\"\"\"\n\n @property\n @abstractmethod\n def critical(self) -> bool:\n \"\"\"Whether this worker is required for healthy app operation.\"\"\"\n\n @abstractmethod\n def start(self) -> None:\n \"\"\"Start worker execution.\"\"\"\n\n @abstractmethod\n def stop(self, force: bool = False) -> None:\n \"\"\"Request graceful or immediate stop.\"\"\"\n\n @abstractmethod\n def health(self) -> WorkerHealth:\n \"\"\"Return current health state.\"\"\"\n\n @abstractmethod\n def status(self) -> WorkerStatus:\n \"\"\"Return current runtime status.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/contracts/worker.py:Worker", + "span_start": 30, + "span_end": 55, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 2, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.worker", + "is_test": false, + "blob_sha": "e4827d32220f322d8adc3e42769da3ca0cc680db6a5eab7a11f4d8773a75304e", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C3_ENTRYPOINTS": "exact_path_fetch", + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C3_ENTRYPOINTS": 12, + "C0_SOURCE_CHUNKS": 6 + }, + "filters_by_layer": { + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C3_ENTRYPOINTS", + "query": "Где health endpoint?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 12, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Где health endpoint?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "health", + "endpoint" + ] + }, + "layers": [ + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 6, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 37, + "retrieval_by_layer": { + "C3_ENTRYPOINTS": 23, + "C0_SOURCE_CHUNKS": 13 + }, + "merge_rank": 0 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Где health endpoint?", + "rag_count": 9 + }, + "output": { + "llm_answer": "Подтверждённые HTTP routes для health-endpoint:\n\n- GET /health \n Объявлен в `src/app_runtime/control/http_app.py`, обслуживается методом `http_app.get`." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 904, + "evidence_rows": 9, + "evidence_chars": 3350 + }, + "evidence_summary": [ + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 6, + "unique_paths": 5 + } + ], + "prompt_template_id": "intent_code_qa_find_entrypoints_ru_v4", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 1159 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-health-endpoint.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-health-endpoint.md new file mode 100644 index 0000000..6b8cf3e --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-health-endpoint.md @@ -0,0 +1,32 @@ +# plba-v2-find-entrypoints-health-endpoint + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Где health endpoint? + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 9, + "llm_answer": "Подтверждённые HTTP routes для health-endpoint:\n\n- GET /health \n Объявлен в `src/app_runtime/control/http_app.py`, обслуживается методом `http_app.get`.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "health", + "endpoint" + ], + "layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-find-tests-create-runtime.json b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-find-tests-create-runtime.json new file mode 100644 index 0000000..a80292b --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-find-tests-create-runtime.json @@ -0,0 +1,1963 @@ +{ + "case_id": "plba-v2-find-tests-create-runtime", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 16, + "llm_answer": "Прямых тестов конкретно для функции `create_runtime` в предоставленном контексте не обнаружено.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "create_runtime" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-v2-find-tests-create-runtime", + "text": "Где тесты для create_runtime?", + "mode": "full_chain", + "run_started_at": "2026-03-12T14:38:57", + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Где тесты для create_runtime?", + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "create_runtime" + ], + "confidence": 0.0 + }, + "rag_count": 16, + "rag_rows": [ + { + "path": "tests/test_runtime.py", + "content": "test_public_plba_package_exports_runtime_builder_and_worker_contract imports plba.create_runtime", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_public_plba_package_exports_runtime_builder_and_worker_contract:imports", + "span_start": 349, + "span_end": 349, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e93f80075cd9988737ece3cb5ec659c542132c4d383646e376917bfd0cb6ea64", + "edge_type": "imports", + "src_symbol_id": "ed06ffc5afb8a863cf7da3e40921f17abe4eec2a0770139e3380d93ccaae604a", + "src_qname": "test_public_plba_package_exports_runtime_builder_and_worker_contract", + "dst_symbol_id": null, + "dst_ref": "plba.create_runtime", + "resolution": "partial", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "test_public_plba_package_exports_runtime_builder_and_worker_contract calls create_runtime", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_public_plba_package_exports_runtime_builder_and_worker_contract:calls", + "span_start": 399, + "span_end": 399, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "039939355230de826d8bf7607f55fc59c7d932e5570ecb78994d0f13e57e8488", + "edge_type": "calls", + "src_symbol_id": "ed06ffc5afb8a863cf7da3e40921f17abe4eec2a0770139e3380d93ccaae604a", + "src_qname": "test_public_plba_package_exports_runtime_builder_and_worker_contract", + "dst_symbol_id": null, + "dst_ref": "create_runtime", + "resolution": "partial", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_worker_wakes_up_with_configured_interval\n -> ScenarioWorker\n -> ScenarioWorker.__init__\n -> ScenarioWorker._name\n -> ScenarioWorker.name", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_worker_wakes_up_with_configured_interval:dataflow_slice", + "span_start": 52, + "span_end": 166, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "2fd137f5852febe907f44d3b3e4ea430f89ccfe962ae1442a16ab9df64c8f76c", + "edge_type": "dataflow_slice", + "src_symbol_id": "65f877f78191d65e6a752e41cedc70ebc784c266804a55c1c56440336e1f0d6e", + "src_qname": "test_worker_wakes_up_with_configured_interval", + "dst_symbol_id": "da022da2c49fd9cfd09d6e6da6bbd59aaa7d28efd669ce8444e88d327ddec2fc", + "dst_ref": "ScenarioWorker.name", + "resolution": "resolved", + "slice_id": "2fd137f5852febe907f44d3b3e4ea430f89ccfe962ae1442a16ab9df64c8f76c", + "root_symbol_id": "65f877f78191d65e6a752e41cedc70ebc784c266804a55c1c56440336e1f0d6e", + "path_symbols": [ + "test_worker_wakes_up_with_configured_interval", + "ScenarioWorker", + "ScenarioWorker.__init__", + "ScenarioWorker._name", + "ScenarioWorker.name" + ], + "path_symbol_ids": [ + "65f877f78191d65e6a752e41cedc70ebc784c266804a55c1c56440336e1f0d6e", + "9a1d08a7eb1831c9f2e0db361b5207f036e477c160773ae08c0b287239785c52", + "9c20be046ba06644d1432e0f20eb223663d2b116ee7d91fdc62bc68323f2e593", + "da022da2c49fd9cfd09d6e6da6bbd59aaa7d28efd669ce8444e88d327ddec2fc" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_actions_stop_busy_worker_after_timeout\n -> BlockingRoutine\n -> BlockingRoutine.__init__\n -> BlockingRoutine._started\n -> BlockingRoutine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_actions_stop_busy_worker_after_timeout:dataflow_slice", + "span_start": 42, + "span_end": 238, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "8e7db3d2a9226f1c1d9942ac6373cfcafa0d2276758ddb8a3d3c455a3d58024d", + "edge_type": "dataflow_slice", + "src_symbol_id": "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "src_qname": "test_actions_stop_busy_worker_after_timeout", + "dst_symbol_id": "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04", + "dst_ref": "BlockingRoutine.run", + "resolution": "resolved", + "slice_id": "8e7db3d2a9226f1c1d9942ac6373cfcafa0d2276758ddb8a3d3c455a3d58024d", + "root_symbol_id": "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "path_symbols": [ + "test_actions_stop_busy_worker_after_timeout", + "BlockingRoutine", + "BlockingRoutine.__init__", + "BlockingRoutine._started", + "BlockingRoutine.run" + ], + "path_symbol_ids": [ + "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "a3349c5bc65e4003a4bbd6a8dbb7a54c337e12d1aed930caa701b12e520f1e67", + "486deeed3043c6db985aef258e96ddc67aa53608e67a83962fbd2471f649ddf1", + "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_actions_stop_busy_worker_after_timeout\n -> BlockingRoutine\n -> BlockingRoutine.__init__\n -> BlockingRoutine._release\n -> BlockingRoutine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_actions_stop_busy_worker_after_timeout:dataflow_slice", + "span_start": 43, + "span_end": 238, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "b59da9da82f9dfc8a9b695a08213786385da1ae9e17561ec3a0450a574a8cb39", + "edge_type": "dataflow_slice", + "src_symbol_id": "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "src_qname": "test_actions_stop_busy_worker_after_timeout", + "dst_symbol_id": "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04", + "dst_ref": "BlockingRoutine.run", + "resolution": "resolved", + "slice_id": "b59da9da82f9dfc8a9b695a08213786385da1ae9e17561ec3a0450a574a8cb39", + "root_symbol_id": "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "path_symbols": [ + "test_actions_stop_busy_worker_after_timeout", + "BlockingRoutine", + "BlockingRoutine.__init__", + "BlockingRoutine._release", + "BlockingRoutine.run" + ], + "path_symbol_ids": [ + "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "a3349c5bc65e4003a4bbd6a8dbb7a54c337e12d1aed930caa701b12e520f1e67", + "486deeed3043c6db985aef258e96ddc67aa53608e67a83962fbd2471f649ddf1", + "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_actions_stop_busy_worker_before_timeout\n -> BlockingRoutine\n -> BlockingRoutine.__init__\n -> BlockingRoutine._started\n -> BlockingRoutine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_actions_stop_busy_worker_before_timeout:dataflow_slice", + "span_start": 42, + "span_end": 212, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "f9bcce108870e49afa8b32d4625115a10707a3b0e7473179e958e5752bf258b4", + "edge_type": "dataflow_slice", + "src_symbol_id": "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "src_qname": "test_actions_stop_busy_worker_before_timeout", + "dst_symbol_id": "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04", + "dst_ref": "BlockingRoutine.run", + "resolution": "resolved", + "slice_id": "f9bcce108870e49afa8b32d4625115a10707a3b0e7473179e958e5752bf258b4", + "root_symbol_id": "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "path_symbols": [ + "test_actions_stop_busy_worker_before_timeout", + "BlockingRoutine", + "BlockingRoutine.__init__", + "BlockingRoutine._started", + "BlockingRoutine.run" + ], + "path_symbol_ids": [ + "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "a3349c5bc65e4003a4bbd6a8dbb7a54c337e12d1aed930caa701b12e520f1e67", + "486deeed3043c6db985aef258e96ddc67aa53608e67a83962fbd2471f649ddf1", + "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "def test_public_plba_package_exports_runtime_builder_and_worker_contract(tmp_path) -> None:\n import plba\n from plba import ApplicationModule as PublicApplicationModule\n from plba import InMemoryTaskQueue\n from plba import Worker as PublicWorker\n from plba import WorkerHealth as PublicWorkerHealth\n from plba import WorkerStatus as PublicWorkerStatus\n from plba import create_runtime\n\n config_path = tmp_path / \"config.yml\"\n config_path.write_text(\"platform: {}\\n\", encoding=\"utf-8\")\n\n queue = InMemoryTaskQueue[int]()\n queue.put(2)\n assert queue.get(timeout=0.01) == 2\n queue.task_done()\n\n class PublicRoutine:\n def __init__(self) -> None:\n self.runs = 0\n\n def run(self) -> None:\n if self.runs == 0:\n self.runs += 1\n\n class PublicWorkerImpl(PublicWorker):\n def __init__(self, routine: PublicRoutine) -> None:\n self._inner = RoutineWorker(\"public-worker\", routine)\n\n @property\n def name(self) -> str:\n return self._inner.name\n\n @property\n def critical(self) -> bool:\n return self._inner.critical\n\n def start(self) -> None:\n self._inner.start()\n\n def stop(self, force: bool = False) -> None:\n self._inner.stop(force=force)\n\n def health(self) -> PublicWorkerHealth:\n return self._inner.health()\n\n def status(self) -> PublicWorkerStatus:\n return self._inner.status()\n\n class PublicExampleModule(PublicApplicationModule):\n @property\n def name(self) -> str:\n return \"public-example\"\n\n def register(self, registry: ModuleRegistry) -> None:\n registry.add_worker(PublicWorkerImpl(PublicRoutine()))\n\n runtime = create_runtime(PublicExampleModule(), config_path=str(config_path))\n runtime.start()\n sleep(0.2)\n assert runtime.configuration.get() == {\"platform\": {}}\n assert runtime.status()[\"workers\"][\"registered\"] == 1\n assert hasattr(plba, \"QueueWorker\") is False\n runtime.stop()", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_runtime.py:test_public_plba_package_exports_runtime_builder_and_worker_contract", + "span_start": 342, + "span_end": 405, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 13, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _build_runtime(worker: Worker, *, control_timeout: int = 1) -> tuple[RuntimeManager, str]:\n runtime = RuntimeManager()\n channel = HttpControlChannel(host=\"127.0.0.1\", port=0, timeout=control_timeout)\n runtime.control_plane.register_channel(channel)\n runtime.register_module(WorkerModule(worker))\n runtime.start()\n return runtime, f\"http://127.0.0.1:{channel.port}\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_build_runtime", + "span_start": 154, + "span_end": 160, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 6, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class IntervalRoutine:\n calls: list[float] = field(default_factory=list)\n _lock: Lock = field(default_factory=Lock)\n\n def run(self) -> None:\n with self._lock:\n self.calls.append(monotonic())\n\n def wait_runs(self, count: int, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n with self._lock:\n if len(self.calls) >= count:\n return True\n sleep(0.01)\n return False\n\n def deltas(self) -> list[float]:\n with self._lock:\n return [self.calls[index + 1] - self.calls[index] for index in range(len(self.calls) - 1)]", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:IntervalRoutine", + "span_start": 18, + "span_end": 37, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class ScenarioWorker(Worker):\n def __init__(self, name: str, routine: object, *, interval: float = 0.05) -> None:\n self._name = name\n self._routine = routine\n self._interval = interval\n self._thread: Thread | None = None\n self._stop_requested = Event()\n self._in_flight = 0\n self._runs = 0\n self._lock = Lock()\n\n @property\n def name(self) -> str:\n return self._name\n\n @property\n def critical(self) -> bool:\n return True\n\n def start(self) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._stop_requested.clear()\n self._thread = Thread(target=self._loop, name=f\"{self._name}-thread\", daemon=True)\n self._thread.start()\n\n def stop(self, force: bool = False) -> None:\n self._stop_requested.set()\n\n def health(self) -> WorkerHealth:\n return WorkerHealth(name=self.name, status=\"ok\", critical=True, meta={\"runs\": self._runs})\n\n def status(self) -> WorkerStatus:\n thread_alive = self._thread is not None and self._thread.is_alive()\n with self._lock:\n in_flight = self._in_flight\n runs = self._runs\n if not thread_alive:\n state = \"stopped\"\n elif self._stop_requested.is_set():\n state = \"stopping\"\n elif in_flight > 0:\n state = \"busy\"\n else:\n state = \"idle\"\n return WorkerStatus(name=self.name, state=state, in_flight=in_flight, meta={\"runs\": runs})\n\n def _loop(self) -> None:\n while not self._stop_requested.is_set():\n with self._lock:\n self._in_flight += 1\n try:\n self._routine.run()\n with self._lock:\n self._runs += 1\n finally:\n with self._lock:\n self._in_flight -= 1\n if self._stop_requested.is_set():\n return\n sleep(self._interval)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:ScenarioWorker", + "span_start": 50, + "span_end": 110, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 2, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _http_call_json(\n base_url: str,\n path: str,\n *,\n method: str = \"GET\",\n headers: dict[str, str] | None = None,\n) -> tuple[int, dict[str, object]]:\n request = Request(f\"{base_url}{path}\", method=method, headers=headers or {})\n try:\n with urlopen(request, timeout=15.0) as response:\n status = response.status\n body = response.read()\n except HTTPError as error:\n status = error.code\n body = error.read()\n payload = json.loads(body.decode(\"utf-8\"))\n return status, payload", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_http_call_json", + "span_start": 125, + "span_end": 141, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 4, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _poll_until_stopped(base_url: str, timeout: float = 2.0) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n _, payload = _http_call_json(base_url, \"/actions/status\")\n if payload.get(\"detail\") == \"stopped\":\n return True\n sleep(0.05)\n return False", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_poll_until_stopped", + "span_start": 144, + "span_end": 151, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 5, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def test_worker_wakes_up_with_configured_interval() -> None:\n interval = 0.15\n routine = IntervalRoutine()\n worker = ScenarioWorker(\"interval-worker\", routine, interval=interval)\n runtime = RuntimeManager()\n runtime.register_module(WorkerModule(worker))\n\n runtime.start()\n try:\n assert routine.wait_runs(count=3, timeout=2.0) is True\n finally:\n runtime.stop()\n\n deltas = routine.deltas()\n assert len(deltas) >= 2\n assert all(delta >= interval * 0.7 for delta in deltas[:2])", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:test_worker_wakes_up_with_configured_interval", + "span_start": 163, + "span_end": 178, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 7, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class WorkerModule(ApplicationModule):\n def __init__(self, worker: Worker) -> None:\n self._worker = worker\n\n @property\n def name(self) -> str:\n return \"business-tests\"\n\n def register(self, registry: ModuleRegistry) -> None:\n registry.add_worker(self._worker)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:WorkerModule", + "span_start": 113, + "span_end": 122, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 3, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class BlockingRoutine:\n def __init__(self, started: Event, release: Event) -> None:\n self._started = started\n self._release = release\n\n def run(self) -> None:\n self._started.set()\n self._release.wait(timeout=5.0)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:BlockingRoutine", + "span_start": 40, + "span_end": 47, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def test_actions_start_stop_and_health_when_worker_is_idle() -> None:\n runtime, base_url = _build_runtime(ScenarioWorker(\"idle-worker\", IntervalRoutine(), interval=0.2))\n try:\n stop_status, stop_payload = _http_call_json(base_url, \"/actions/stop\", method=\"POST\")\n assert stop_status == 200\n assert isinstance(stop_payload.get(\"detail\"), dict)\n assert stop_payload[\"detail\"][\"timed_out\"] is False\n assert stop_payload[\"detail\"][\"state\"] == \"stopped\"\n\n health_stopped_status, health_stopped_payload = _http_call_json(base_url, \"/health\")\n assert health_stopped_status == 503\n assert health_stopped_payload[\"state\"] == \"stopped\"\n assert health_stopped_payload[\"status\"] == \"unhealthy\"\n\n start_status, start_payload = _http_call_json(base_url, \"/actions/start\", method=\"POST\")\n assert start_status == 200\n assert isinstance(start_payload.get(\"detail\"), dict)\n assert start_payload[\"detail\"][\"timed_out\"] is False\n assert start_payload[\"detail\"][\"state\"] in {\"idle\", \"busy\"}\n\n health_started_status, health_started_payload = _http_call_json(base_url, \"/health\")\n assert health_started_status == 200\n assert health_started_payload[\"status\"] == \"ok\"\n assert health_started_payload[\"state\"] in {\"idle\", \"busy\"}\n finally:\n runtime.stop()", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:test_actions_start_stop_and_health_when_worker_is_idle", + "span_start": 181, + "span_end": 206, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 8, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "Прямых тестов конкретно для функции `create_runtime` в предоставленном контексте не обнаружено.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C2_DEPENDENCY_GRAPH" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "function", + "symbol_candidates": [ + "create_runtime" + ], + "keyword_hints": [ + "create_runtime" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "test_file_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "test_symbol_patterns": [ + "test_create_runtime", + "Testcreate_runtime", + "create_runtime" + ], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C0_SOURCE_CHUNKS": 10 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src", + "tests" + ], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src", + "tests" + ], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "create_runtime", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Где тесты для create_runtime? test_create_runtime Testcreate_runtime create_runtime", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Где тесты для create_runtime? test_create_runtime Testcreate_runtime create_runtime", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 10, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 0, + "candidates_after_filter": 0 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src", + "tests" + ], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src", + "tests" + ], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 10, + "candidates_after_filter": 10 + } + ], + "fallback": { + "used": true, + "reason": "scope_relaxed_no_hits" + }, + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "create_runtime" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "miss", + "hit_count": 0, + "fail_reason": "scope_relaxed_no_hits" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 10, + "fail_reason": null + } + ] + }, + "constraint_violations": [ + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C1_SYMBOL_CATALOG", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + } + ], + "timings_ms": { + "router": 1, + "symbol_resolution": 0, + "retrieval_total": 145, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 66, + "C2_DEPENDENCY_GRAPH": 60, + "C0_SOURCE_CHUNKS": 18 + }, + "merge_rank": 0, + "prompt_build": 0, + "llm_call": 1465 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 1022, + "evidence_rows": 16, + "evidence_chars": 9185 + }, + "evidence_summary": [ + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 2 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 10, + "unique_paths": 2 + } + ], + "prompt_template_id": "intent_code_qa_find_tests_ru_v4", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "create_runtime" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 16, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-v2-find-tests-create-runtime", + "mode": "full_chain", + "run_started_at": "2026-03-12T14:38:57", + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Где тесты для create_runtime?", + "normalized_query": "Где тесты для create_runtime?" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Где тесты для create_runtime?" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Где тесты для create_runtime?" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "function", + "symbol_candidates": [ + "create_runtime" + ], + "keyword_hints": [ + "create_runtime" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "test_file_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "test_symbol_patterns": [ + "test_create_runtime", + "Testcreate_runtime", + "create_runtime" + ], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 1 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Где тесты для create_runtime?" + }, + "output": { + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "create_runtime" + ], + "confidence": 0.0 + }, + "rag_count": 16, + "rag_rows": [ + { + "path": "tests/test_runtime.py", + "content": "test_public_plba_package_exports_runtime_builder_and_worker_contract imports plba.create_runtime", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_public_plba_package_exports_runtime_builder_and_worker_contract:imports", + "span_start": 349, + "span_end": 349, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e93f80075cd9988737ece3cb5ec659c542132c4d383646e376917bfd0cb6ea64", + "edge_type": "imports", + "src_symbol_id": "ed06ffc5afb8a863cf7da3e40921f17abe4eec2a0770139e3380d93ccaae604a", + "src_qname": "test_public_plba_package_exports_runtime_builder_and_worker_contract", + "dst_symbol_id": null, + "dst_ref": "plba.create_runtime", + "resolution": "partial", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "test_public_plba_package_exports_runtime_builder_and_worker_contract calls create_runtime", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_public_plba_package_exports_runtime_builder_and_worker_contract:calls", + "span_start": 399, + "span_end": 399, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "039939355230de826d8bf7607f55fc59c7d932e5570ecb78994d0f13e57e8488", + "edge_type": "calls", + "src_symbol_id": "ed06ffc5afb8a863cf7da3e40921f17abe4eec2a0770139e3380d93ccaae604a", + "src_qname": "test_public_plba_package_exports_runtime_builder_and_worker_contract", + "dst_symbol_id": null, + "dst_ref": "create_runtime", + "resolution": "partial", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_worker_wakes_up_with_configured_interval\n -> ScenarioWorker\n -> ScenarioWorker.__init__\n -> ScenarioWorker._name\n -> ScenarioWorker.name", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_worker_wakes_up_with_configured_interval:dataflow_slice", + "span_start": 52, + "span_end": 166, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "2fd137f5852febe907f44d3b3e4ea430f89ccfe962ae1442a16ab9df64c8f76c", + "edge_type": "dataflow_slice", + "src_symbol_id": "65f877f78191d65e6a752e41cedc70ebc784c266804a55c1c56440336e1f0d6e", + "src_qname": "test_worker_wakes_up_with_configured_interval", + "dst_symbol_id": "da022da2c49fd9cfd09d6e6da6bbd59aaa7d28efd669ce8444e88d327ddec2fc", + "dst_ref": "ScenarioWorker.name", + "resolution": "resolved", + "slice_id": "2fd137f5852febe907f44d3b3e4ea430f89ccfe962ae1442a16ab9df64c8f76c", + "root_symbol_id": "65f877f78191d65e6a752e41cedc70ebc784c266804a55c1c56440336e1f0d6e", + "path_symbols": [ + "test_worker_wakes_up_with_configured_interval", + "ScenarioWorker", + "ScenarioWorker.__init__", + "ScenarioWorker._name", + "ScenarioWorker.name" + ], + "path_symbol_ids": [ + "65f877f78191d65e6a752e41cedc70ebc784c266804a55c1c56440336e1f0d6e", + "9a1d08a7eb1831c9f2e0db361b5207f036e477c160773ae08c0b287239785c52", + "9c20be046ba06644d1432e0f20eb223663d2b116ee7d91fdc62bc68323f2e593", + "da022da2c49fd9cfd09d6e6da6bbd59aaa7d28efd669ce8444e88d327ddec2fc" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_actions_stop_busy_worker_after_timeout\n -> BlockingRoutine\n -> BlockingRoutine.__init__\n -> BlockingRoutine._started\n -> BlockingRoutine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_actions_stop_busy_worker_after_timeout:dataflow_slice", + "span_start": 42, + "span_end": 238, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "8e7db3d2a9226f1c1d9942ac6373cfcafa0d2276758ddb8a3d3c455a3d58024d", + "edge_type": "dataflow_slice", + "src_symbol_id": "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "src_qname": "test_actions_stop_busy_worker_after_timeout", + "dst_symbol_id": "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04", + "dst_ref": "BlockingRoutine.run", + "resolution": "resolved", + "slice_id": "8e7db3d2a9226f1c1d9942ac6373cfcafa0d2276758ddb8a3d3c455a3d58024d", + "root_symbol_id": "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "path_symbols": [ + "test_actions_stop_busy_worker_after_timeout", + "BlockingRoutine", + "BlockingRoutine.__init__", + "BlockingRoutine._started", + "BlockingRoutine.run" + ], + "path_symbol_ids": [ + "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "a3349c5bc65e4003a4bbd6a8dbb7a54c337e12d1aed930caa701b12e520f1e67", + "486deeed3043c6db985aef258e96ddc67aa53608e67a83962fbd2471f649ddf1", + "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_actions_stop_busy_worker_after_timeout\n -> BlockingRoutine\n -> BlockingRoutine.__init__\n -> BlockingRoutine._release\n -> BlockingRoutine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_actions_stop_busy_worker_after_timeout:dataflow_slice", + "span_start": 43, + "span_end": 238, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "b59da9da82f9dfc8a9b695a08213786385da1ae9e17561ec3a0450a574a8cb39", + "edge_type": "dataflow_slice", + "src_symbol_id": "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "src_qname": "test_actions_stop_busy_worker_after_timeout", + "dst_symbol_id": "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04", + "dst_ref": "BlockingRoutine.run", + "resolution": "resolved", + "slice_id": "b59da9da82f9dfc8a9b695a08213786385da1ae9e17561ec3a0450a574a8cb39", + "root_symbol_id": "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "path_symbols": [ + "test_actions_stop_busy_worker_after_timeout", + "BlockingRoutine", + "BlockingRoutine.__init__", + "BlockingRoutine._release", + "BlockingRoutine.run" + ], + "path_symbol_ids": [ + "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "a3349c5bc65e4003a4bbd6a8dbb7a54c337e12d1aed930caa701b12e520f1e67", + "486deeed3043c6db985aef258e96ddc67aa53608e67a83962fbd2471f649ddf1", + "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_actions_stop_busy_worker_before_timeout\n -> BlockingRoutine\n -> BlockingRoutine.__init__\n -> BlockingRoutine._started\n -> BlockingRoutine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_actions_stop_busy_worker_before_timeout:dataflow_slice", + "span_start": 42, + "span_end": 212, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "f9bcce108870e49afa8b32d4625115a10707a3b0e7473179e958e5752bf258b4", + "edge_type": "dataflow_slice", + "src_symbol_id": "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "src_qname": "test_actions_stop_busy_worker_before_timeout", + "dst_symbol_id": "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04", + "dst_ref": "BlockingRoutine.run", + "resolution": "resolved", + "slice_id": "f9bcce108870e49afa8b32d4625115a10707a3b0e7473179e958e5752bf258b4", + "root_symbol_id": "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "path_symbols": [ + "test_actions_stop_busy_worker_before_timeout", + "BlockingRoutine", + "BlockingRoutine.__init__", + "BlockingRoutine._started", + "BlockingRoutine.run" + ], + "path_symbol_ids": [ + "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "a3349c5bc65e4003a4bbd6a8dbb7a54c337e12d1aed930caa701b12e520f1e67", + "486deeed3043c6db985aef258e96ddc67aa53608e67a83962fbd2471f649ddf1", + "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "def test_public_plba_package_exports_runtime_builder_and_worker_contract(tmp_path) -> None:\n import plba\n from plba import ApplicationModule as PublicApplicationModule\n from plba import InMemoryTaskQueue\n from plba import Worker as PublicWorker\n from plba import WorkerHealth as PublicWorkerHealth\n from plba import WorkerStatus as PublicWorkerStatus\n from plba import create_runtime\n\n config_path = tmp_path / \"config.yml\"\n config_path.write_text(\"platform: {}\\n\", encoding=\"utf-8\")\n\n queue = InMemoryTaskQueue[int]()\n queue.put(2)\n assert queue.get(timeout=0.01) == 2\n queue.task_done()\n\n class PublicRoutine:\n def __init__(self) -> None:\n self.runs = 0\n\n def run(self) -> None:\n if self.runs == 0:\n self.runs += 1\n\n class PublicWorkerImpl(PublicWorker):\n def __init__(self, routine: PublicRoutine) -> None:\n self._inner = RoutineWorker(\"public-worker\", routine)\n\n @property\n def name(self) -> str:\n return self._inner.name\n\n @property\n def critical(self) -> bool:\n return self._inner.critical\n\n def start(self) -> None:\n self._inner.start()\n\n def stop(self, force: bool = False) -> None:\n self._inner.stop(force=force)\n\n def health(self) -> PublicWorkerHealth:\n return self._inner.health()\n\n def status(self) -> PublicWorkerStatus:\n return self._inner.status()\n\n class PublicExampleModule(PublicApplicationModule):\n @property\n def name(self) -> str:\n return \"public-example\"\n\n def register(self, registry: ModuleRegistry) -> None:\n registry.add_worker(PublicWorkerImpl(PublicRoutine()))\n\n runtime = create_runtime(PublicExampleModule(), config_path=str(config_path))\n runtime.start()\n sleep(0.2)\n assert runtime.configuration.get() == {\"platform\": {}}\n assert runtime.status()[\"workers\"][\"registered\"] == 1\n assert hasattr(plba, \"QueueWorker\") is False\n runtime.stop()", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_runtime.py:test_public_plba_package_exports_runtime_builder_and_worker_contract", + "span_start": 342, + "span_end": 405, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 13, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _build_runtime(worker: Worker, *, control_timeout: int = 1) -> tuple[RuntimeManager, str]:\n runtime = RuntimeManager()\n channel = HttpControlChannel(host=\"127.0.0.1\", port=0, timeout=control_timeout)\n runtime.control_plane.register_channel(channel)\n runtime.register_module(WorkerModule(worker))\n runtime.start()\n return runtime, f\"http://127.0.0.1:{channel.port}\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_build_runtime", + "span_start": 154, + "span_end": 160, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 6, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class IntervalRoutine:\n calls: list[float] = field(default_factory=list)\n _lock: Lock = field(default_factory=Lock)\n\n def run(self) -> None:\n with self._lock:\n self.calls.append(monotonic())\n\n def wait_runs(self, count: int, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n with self._lock:\n if len(self.calls) >= count:\n return True\n sleep(0.01)\n return False\n\n def deltas(self) -> list[float]:\n with self._lock:\n return [self.calls[index + 1] - self.calls[index] for index in range(len(self.calls) - 1)]", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:IntervalRoutine", + "span_start": 18, + "span_end": 37, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class ScenarioWorker(Worker):\n def __init__(self, name: str, routine: object, *, interval: float = 0.05) -> None:\n self._name = name\n self._routine = routine\n self._interval = interval\n self._thread: Thread | None = None\n self._stop_requested = Event()\n self._in_flight = 0\n self._runs = 0\n self._lock = Lock()\n\n @property\n def name(self) -> str:\n return self._name\n\n @property\n def critical(self) -> bool:\n return True\n\n def start(self) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._stop_requested.clear()\n self._thread = Thread(target=self._loop, name=f\"{self._name}-thread\", daemon=True)\n self._thread.start()\n\n def stop(self, force: bool = False) -> None:\n self._stop_requested.set()\n\n def health(self) -> WorkerHealth:\n return WorkerHealth(name=self.name, status=\"ok\", critical=True, meta={\"runs\": self._runs})\n\n def status(self) -> WorkerStatus:\n thread_alive = self._thread is not None and self._thread.is_alive()\n with self._lock:\n in_flight = self._in_flight\n runs = self._runs\n if not thread_alive:\n state = \"stopped\"\n elif self._stop_requested.is_set():\n state = \"stopping\"\n elif in_flight > 0:\n state = \"busy\"\n else:\n state = \"idle\"\n return WorkerStatus(name=self.name, state=state, in_flight=in_flight, meta={\"runs\": runs})\n\n def _loop(self) -> None:\n while not self._stop_requested.is_set():\n with self._lock:\n self._in_flight += 1\n try:\n self._routine.run()\n with self._lock:\n self._runs += 1\n finally:\n with self._lock:\n self._in_flight -= 1\n if self._stop_requested.is_set():\n return\n sleep(self._interval)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:ScenarioWorker", + "span_start": 50, + "span_end": 110, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 2, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _http_call_json(\n base_url: str,\n path: str,\n *,\n method: str = \"GET\",\n headers: dict[str, str] | None = None,\n) -> tuple[int, dict[str, object]]:\n request = Request(f\"{base_url}{path}\", method=method, headers=headers or {})\n try:\n with urlopen(request, timeout=15.0) as response:\n status = response.status\n body = response.read()\n except HTTPError as error:\n status = error.code\n body = error.read()\n payload = json.loads(body.decode(\"utf-8\"))\n return status, payload", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_http_call_json", + "span_start": 125, + "span_end": 141, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 4, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _poll_until_stopped(base_url: str, timeout: float = 2.0) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n _, payload = _http_call_json(base_url, \"/actions/status\")\n if payload.get(\"detail\") == \"stopped\":\n return True\n sleep(0.05)\n return False", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_poll_until_stopped", + "span_start": 144, + "span_end": 151, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 5, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def test_worker_wakes_up_with_configured_interval() -> None:\n interval = 0.15\n routine = IntervalRoutine()\n worker = ScenarioWorker(\"interval-worker\", routine, interval=interval)\n runtime = RuntimeManager()\n runtime.register_module(WorkerModule(worker))\n\n runtime.start()\n try:\n assert routine.wait_runs(count=3, timeout=2.0) is True\n finally:\n runtime.stop()\n\n deltas = routine.deltas()\n assert len(deltas) >= 2\n assert all(delta >= interval * 0.7 for delta in deltas[:2])", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:test_worker_wakes_up_with_configured_interval", + "span_start": 163, + "span_end": 178, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 7, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class WorkerModule(ApplicationModule):\n def __init__(self, worker: Worker) -> None:\n self._worker = worker\n\n @property\n def name(self) -> str:\n return \"business-tests\"\n\n def register(self, registry: ModuleRegistry) -> None:\n registry.add_worker(self._worker)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:WorkerModule", + "span_start": 113, + "span_end": 122, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 3, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class BlockingRoutine:\n def __init__(self, started: Event, release: Event) -> None:\n self._started = started\n self._release = release\n\n def run(self) -> None:\n self._started.set()\n self._release.wait(timeout=5.0)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:BlockingRoutine", + "span_start": 40, + "span_end": 47, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def test_actions_start_stop_and_health_when_worker_is_idle() -> None:\n runtime, base_url = _build_runtime(ScenarioWorker(\"idle-worker\", IntervalRoutine(), interval=0.2))\n try:\n stop_status, stop_payload = _http_call_json(base_url, \"/actions/stop\", method=\"POST\")\n assert stop_status == 200\n assert isinstance(stop_payload.get(\"detail\"), dict)\n assert stop_payload[\"detail\"][\"timed_out\"] is False\n assert stop_payload[\"detail\"][\"state\"] == \"stopped\"\n\n health_stopped_status, health_stopped_payload = _http_call_json(base_url, \"/health\")\n assert health_stopped_status == 503\n assert health_stopped_payload[\"state\"] == \"stopped\"\n assert health_stopped_payload[\"status\"] == \"unhealthy\"\n\n start_status, start_payload = _http_call_json(base_url, \"/actions/start\", method=\"POST\")\n assert start_status == 200\n assert isinstance(start_payload.get(\"detail\"), dict)\n assert start_payload[\"detail\"][\"timed_out\"] is False\n assert start_payload[\"detail\"][\"state\"] in {\"idle\", \"busy\"}\n\n health_started_status, health_started_payload = _http_call_json(base_url, \"/health\")\n assert health_started_status == 200\n assert health_started_payload[\"status\"] == \"ok\"\n assert health_started_payload[\"state\"] in {\"idle\", \"busy\"}\n finally:\n runtime.stop()", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:test_actions_start_stop_and_health_when_worker_is_idle", + "span_start": 181, + "span_end": 206, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 8, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C0_SOURCE_CHUNKS": 10 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src", + "tests" + ], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src", + "tests" + ], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "create_runtime", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Где тесты для create_runtime? test_create_runtime Testcreate_runtime create_runtime", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Где тесты для create_runtime? test_create_runtime Testcreate_runtime create_runtime", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 10, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 0, + "candidates_after_filter": 0 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src", + "tests" + ], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src", + "tests" + ], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 10, + "candidates_after_filter": 10 + } + ], + "fallback": { + "used": true, + "reason": "scope_relaxed_no_hits" + }, + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "create_runtime" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "miss", + "hit_count": 0, + "fail_reason": "scope_relaxed_no_hits" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 10, + "fail_reason": null + } + ] + }, + "constraint_violations": [ + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C1_SYMBOL_CATALOG", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + } + ], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 145, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 66, + "C2_DEPENDENCY_GRAPH": 60, + "C0_SOURCE_CHUNKS": 18 + }, + "merge_rank": 0 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Где тесты для create_runtime?", + "rag_count": 16 + }, + "output": { + "llm_answer": "Прямых тестов конкретно для функции `create_runtime` в предоставленном контексте не обнаружено." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 1022, + "evidence_rows": 16, + "evidence_chars": 9185 + }, + "evidence_summary": [ + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 2 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 10, + "unique_paths": 2 + } + ], + "prompt_template_id": "intent_code_qa_find_tests_ru_v4", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 1465 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-find-tests-create-runtime.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-find-tests-create-runtime.md new file mode 100644 index 0000000..84fc128 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-find-tests-create-runtime.md @@ -0,0 +1,32 @@ +# plba-v2-find-tests-create-runtime + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Где тесты для create_runtime? + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 16, + "llm_answer": "Прямых тестов конкретно для функции `create_runtime` в предоставленном контексте не обнаружено.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "create_runtime" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-find-tests-runtime-manager.json b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-find-tests-runtime-manager.json new file mode 100644 index 0000000..9ee6f7f --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-find-tests-runtime-manager.json @@ -0,0 +1,1879 @@ +{ + "case_id": "plba-v2-find-tests-runtime-manager", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 16, + "llm_answer": "Прямые тесты для RuntimeManager находятся в следующих файлах:\n\n1. tests/test_runtime.py:\n - test_runtime_graceful_stop_waits_until_worker_finishes — проверяет корректную остановку RuntimeManager после завершения работы модуля.\n - test_runtime_runs_worker_routine_and_exposes_status — проверяет запуск рутины модуля и отображение статуса RuntimeManager.\n\nТакже косвенно связан тест:\n\n2. tests/test_business_control_actions.py:\n - _build_runtime — использует RuntimeManager при построении бизнес-контроля.\n - test_worker_wakes_up_with_configured_interval — применяет RuntimeManager для тестирования пробуждения рабочего процесса с заданной периодичностью.\n\nЭти тесты покрывают инициализацию, регистрацию модулей, управление состоянием и остановкой RuntimeManager.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-v2-find-tests-runtime-manager", + "text": "Где тесты для RuntimeManager?", + "mode": "full_chain", + "run_started_at": "2026-03-12T14:38:57", + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Где тесты для RuntimeManager?", + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "RuntimeManager" + ], + "confidence": 0.0 + }, + "rag_count": 16, + "rag_rows": [ + { + "path": "tests/test_runtime.py", + "content": "test_runtime_runs_worker_routine_and_exposes_status instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_runtime_runs_worker_routine_and_exposes_status:instantiates", + "span_start": 209, + "span_end": 209, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "c397a308e7824ba9fe400a754c7e15e66ea6f058d7f5d3e82bb002bb78b509d2", + "edge_type": "instantiates", + "src_symbol_id": "1c767eb5ee08e84f45b18c8ed7531ec0ed73c63fb1594823569672db7b21e992", + "src_qname": "test_runtime_runs_worker_routine_and_exposes_status", + "dst_symbol_id": "aeadc039653807b0da1ca6e3cc1078ee61cfc510b28e7f9c2ec04c59da43cc8d", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "test_runtime_graceful_stop_waits_until_worker_finishes instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_runtime_graceful_stop_waits_until_worker_finishes:instantiates", + "span_start": 229, + "span_end": 229, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "76b4701262ccaa0a7a41691407c4ebdb2ca74a2415d89f0a38ef0d4f608bda93", + "edge_type": "instantiates", + "src_symbol_id": "1076e788e4a03b10d7bc1313a8ad46caa170c13cc026c6e4de994af1a6ae57bf", + "src_qname": "test_runtime_graceful_stop_waits_until_worker_finishes", + "dst_symbol_id": "aeadc039653807b0da1ca6e3cc1078ee61cfc510b28e7f9c2ec04c59da43cc8d", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "_build_runtime instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "_build_runtime:instantiates", + "span_start": 155, + "span_end": 155, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "7eb254d564944bab6272757ee5ef688862bd321e6941e2495dc942e03b1c9a25", + "edge_type": "instantiates", + "src_symbol_id": "db94031d5245bf82be836a109b4584b43b8e83d37a0f318e03f6c8191896d469", + "src_qname": "_build_runtime", + "dst_symbol_id": "a1572ea8183dc0cd6ddbc74342bbde8c28cecfde37ad40b62feff09f8d103d11", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_worker_wakes_up_with_configured_interval instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_worker_wakes_up_with_configured_interval:instantiates", + "span_start": 167, + "span_end": 167, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "189aafc4de0b79c688668f25f0c87166a127df26bd2215452014713b65ef281a", + "edge_type": "instantiates", + "src_symbol_id": "65f877f78191d65e6a752e41cedc70ebc784c266804a55c1c56440336e1f0d6e", + "src_qname": "test_worker_wakes_up_with_configured_interval", + "dst_symbol_id": "a1572ea8183dc0cd6ddbc74342bbde8c28cecfde37ad40b62feff09f8d103d11", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_actions_stop_busy_worker_after_timeout\n -> BlockingRoutine\n -> BlockingRoutine.__init__\n -> BlockingRoutine._started\n -> BlockingRoutine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_actions_stop_busy_worker_after_timeout:dataflow_slice", + "span_start": 42, + "span_end": 238, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "8e7db3d2a9226f1c1d9942ac6373cfcafa0d2276758ddb8a3d3c455a3d58024d", + "edge_type": "dataflow_slice", + "src_symbol_id": "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "src_qname": "test_actions_stop_busy_worker_after_timeout", + "dst_symbol_id": "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04", + "dst_ref": "BlockingRoutine.run", + "resolution": "resolved", + "slice_id": "8e7db3d2a9226f1c1d9942ac6373cfcafa0d2276758ddb8a3d3c455a3d58024d", + "root_symbol_id": "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "path_symbols": [ + "test_actions_stop_busy_worker_after_timeout", + "BlockingRoutine", + "BlockingRoutine.__init__", + "BlockingRoutine._started", + "BlockingRoutine.run" + ], + "path_symbol_ids": [ + "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "a3349c5bc65e4003a4bbd6a8dbb7a54c337e12d1aed930caa701b12e520f1e67", + "486deeed3043c6db985aef258e96ddc67aa53608e67a83962fbd2471f649ddf1", + "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_actions_stop_busy_worker_before_timeout\n -> BlockingRoutine\n -> BlockingRoutine.__init__\n -> BlockingRoutine._release\n -> BlockingRoutine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_actions_stop_busy_worker_before_timeout:dataflow_slice", + "span_start": 43, + "span_end": 212, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "8bd726155ba387d3579763ee84dfd2f9a90bc917da88f3b2e89416ab5c1254d6", + "edge_type": "dataflow_slice", + "src_symbol_id": "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "src_qname": "test_actions_stop_busy_worker_before_timeout", + "dst_symbol_id": "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04", + "dst_ref": "BlockingRoutine.run", + "resolution": "resolved", + "slice_id": "8bd726155ba387d3579763ee84dfd2f9a90bc917da88f3b2e89416ab5c1254d6", + "root_symbol_id": "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "path_symbols": [ + "test_actions_stop_busy_worker_before_timeout", + "BlockingRoutine", + "BlockingRoutine.__init__", + "BlockingRoutine._release", + "BlockingRoutine.run" + ], + "path_symbol_ids": [ + "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "a3349c5bc65e4003a4bbd6a8dbb7a54c337e12d1aed930caa701b12e520f1e67", + "486deeed3043c6db985aef258e96ddc67aa53608e67a83962fbd2471f649ddf1", + "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "def test_runtime_graceful_stop_waits_until_worker_finishes() -> None:\n started = Event()\n release = Event()\n runtime = RuntimeManager()\n runtime.register_module(BlockingModule(started, release))\n runtime.start()\n assert started.wait(timeout=1.0) is True\n assert runtime.status()[\"runtime\"][\"state\"] == \"busy\"\n\n stop_thread = Thread(target=runtime.stop, kwargs={\"timeout\": 1.0}, daemon=True)\n stop_thread.start()\n sleep(0.1)\n assert stop_thread.is_alive() is True\n\n release.set()\n stop_thread.join(timeout=1.0)\n assert stop_thread.is_alive() is False\n assert runtime.status()[\"runtime\"][\"state\"] == \"stopped\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_runtime.py:test_runtime_graceful_stop_waits_until_worker_finishes", + "span_start": 226, + "span_end": 243, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 8, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "def test_runtime_runs_worker_routine_and_exposes_status(tmp_path) -> None:\n config_path = tmp_path / \"config.yml\"\n config_path.write_text(\n \"\"\"\nplatform:\n workers: 1\nlog:\n version: 1\n disable_existing_loggers: false\n handlers:\n console:\n class: logging.StreamHandler\n root:\n level: INFO\n handlers: [console]\n\"\"\".strip(),\n encoding=\"utf-8\",\n )\n runtime = RuntimeManager()\n runtime.add_config_file(config_path)\n module = ExampleModule()\n runtime.register_module(module)\n\n runtime.start()\n sleep(0.2)\n status = runtime.status()\n runtime.stop()\n\n assert module.routine.processed == [{\"id\": 1}]\n assert status[\"modules\"] == [\"example\"]\n assert status[\"runtime\"][\"state\"] == \"idle\"\n assert status[\"health\"][\"status\"] == \"ok\"\n assert status[\"config\"] == {\"platform\": {\"workers\": 1}, \"log\": status[\"config\"][\"log\"]}", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_runtime.py:test_runtime_runs_worker_routine_and_exposes_status", + "span_start": 191, + "span_end": 223, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 7, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _build_runtime(worker: Worker, *, control_timeout: int = 1) -> tuple[RuntimeManager, str]:\n runtime = RuntimeManager()\n channel = HttpControlChannel(host=\"127.0.0.1\", port=0, timeout=control_timeout)\n runtime.control_plane.register_channel(channel)\n runtime.register_module(WorkerModule(worker))\n runtime.start()\n return runtime, f\"http://127.0.0.1:{channel.port}\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_build_runtime", + "span_start": 154, + "span_end": 160, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 6, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def test_worker_wakes_up_with_configured_interval() -> None:\n interval = 0.15\n routine = IntervalRoutine()\n worker = ScenarioWorker(\"interval-worker\", routine, interval=interval)\n runtime = RuntimeManager()\n runtime.register_module(WorkerModule(worker))\n\n runtime.start()\n try:\n assert routine.wait_runs(count=3, timeout=2.0) is True\n finally:\n runtime.stop()\n\n deltas = routine.deltas()\n assert len(deltas) >= 2\n assert all(delta >= interval * 0.7 for delta in deltas[:2])", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:test_worker_wakes_up_with_configured_interval", + "span_start": 163, + "span_end": 178, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 7, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class BlockingRoutine:\n def __init__(self, started: Event, release: Event) -> None:\n self._started = started\n self._release = release\n\n def run(self) -> None:\n self._started.set()\n self._release.wait(timeout=5.0)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:BlockingRoutine", + "span_start": 40, + "span_end": 47, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class ScenarioWorker(Worker):\n def __init__(self, name: str, routine: object, *, interval: float = 0.05) -> None:\n self._name = name\n self._routine = routine\n self._interval = interval\n self._thread: Thread | None = None\n self._stop_requested = Event()\n self._in_flight = 0\n self._runs = 0\n self._lock = Lock()\n\n @property\n def name(self) -> str:\n return self._name\n\n @property\n def critical(self) -> bool:\n return True\n\n def start(self) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._stop_requested.clear()\n self._thread = Thread(target=self._loop, name=f\"{self._name}-thread\", daemon=True)\n self._thread.start()\n\n def stop(self, force: bool = False) -> None:\n self._stop_requested.set()\n\n def health(self) -> WorkerHealth:\n return WorkerHealth(name=self.name, status=\"ok\", critical=True, meta={\"runs\": self._runs})\n\n def status(self) -> WorkerStatus:\n thread_alive = self._thread is not None and self._thread.is_alive()\n with self._lock:\n in_flight = self._in_flight\n runs = self._runs\n if not thread_alive:\n state = \"stopped\"\n elif self._stop_requested.is_set():\n state = \"stopping\"\n elif in_flight > 0:\n state = \"busy\"\n else:\n state = \"idle\"\n return WorkerStatus(name=self.name, state=state, in_flight=in_flight, meta={\"runs\": runs})\n\n def _loop(self) -> None:\n while not self._stop_requested.is_set():\n with self._lock:\n self._in_flight += 1\n try:\n self._routine.run()\n with self._lock:\n self._runs += 1\n finally:\n with self._lock:\n self._in_flight -= 1\n if self._stop_requested.is_set():\n return\n sleep(self._interval)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:ScenarioWorker", + "span_start": 50, + "span_end": 110, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 2, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class WorkerModule(ApplicationModule):\n def __init__(self, worker: Worker) -> None:\n self._worker = worker\n\n @property\n def name(self) -> str:\n return \"business-tests\"\n\n def register(self, registry: ModuleRegistry) -> None:\n registry.add_worker(self._worker)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:WorkerModule", + "span_start": 113, + "span_end": 122, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 3, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _http_call_json(\n base_url: str,\n path: str,\n *,\n method: str = \"GET\",\n headers: dict[str, str] | None = None,\n) -> tuple[int, dict[str, object]]:\n request = Request(f\"{base_url}{path}\", method=method, headers=headers or {})\n try:\n with urlopen(request, timeout=15.0) as response:\n status = response.status\n body = response.read()\n except HTTPError as error:\n status = error.code\n body = error.read()\n payload = json.loads(body.decode(\"utf-8\"))\n return status, payload", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_http_call_json", + "span_start": 125, + "span_end": 141, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 4, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class IntervalRoutine:\n calls: list[float] = field(default_factory=list)\n _lock: Lock = field(default_factory=Lock)\n\n def run(self) -> None:\n with self._lock:\n self.calls.append(monotonic())\n\n def wait_runs(self, count: int, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n with self._lock:\n if len(self.calls) >= count:\n return True\n sleep(0.01)\n return False\n\n def deltas(self) -> list[float]:\n with self._lock:\n return [self.calls[index + 1] - self.calls[index] for index in range(len(self.calls) - 1)]", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:IntervalRoutine", + "span_start": 18, + "span_end": 37, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _poll_until_stopped(base_url: str, timeout: float = 2.0) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n _, payload = _http_call_json(base_url, \"/actions/status\")\n if payload.get(\"detail\") == \"stopped\":\n return True\n sleep(0.05)\n return False", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_poll_until_stopped", + "span_start": 144, + "span_end": 151, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 5, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "Прямые тесты для RuntimeManager находятся в следующих файлах:\n\n1. tests/test_runtime.py:\n - test_runtime_graceful_stop_waits_until_worker_finishes — проверяет корректную остановку RuntimeManager после завершения работы модуля.\n - test_runtime_runs_worker_routine_and_exposes_status — проверяет запуск рутины модуля и отображение статуса RuntimeManager.\n\nТакже косвенно связан тест:\n\n2. tests/test_business_control_actions.py:\n - _build_runtime — использует RuntimeManager при построении бизнес-контроля.\n - test_worker_wakes_up_with_configured_interval — применяет RuntimeManager для тестирования пробуждения рабочего процесса с заданной периодичностью.\n\nЭти тесты покрывают инициализацию, регистрацию модулей, управление состоянием и остановкой RuntimeManager.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C2_DEPENDENCY_GRAPH" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "test_file_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "test_symbol_patterns": [ + "test_runtime_manager", + "TestRuntimeManager", + "RuntimeManager" + ], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C0_SOURCE_CHUNKS": 10 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src", + "tests" + ], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src", + "tests" + ], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Где тесты для RuntimeManager? test_runtime_manager TestRuntimeManager RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Где тесты для RuntimeManager? test_runtime_manager TestRuntimeManager RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 10, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 0, + "candidates_after_filter": 0 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src", + "tests" + ], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src", + "tests" + ], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 10, + "candidates_after_filter": 10 + } + ], + "fallback": { + "used": true, + "reason": "scope_relaxed_no_hits" + }, + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "RuntimeManager" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "miss", + "hit_count": 0, + "fail_reason": "scope_relaxed_no_hits" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 10, + "fail_reason": null + } + ] + }, + "constraint_violations": [ + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C1_SYMBOL_CATALOG", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + } + ], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 139, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 70, + "C2_DEPENDENCY_GRAPH": 50, + "C0_SOURCE_CHUNKS": 18 + }, + "merge_rank": 0, + "prompt_build": 0, + "llm_call": 1557 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 946, + "evidence_rows": 16, + "evidence_chars": 7086 + }, + "evidence_summary": [ + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 2 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 10, + "unique_paths": 2 + } + ], + "prompt_template_id": "intent_code_qa_find_tests_ru_v4", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "RuntimeManager" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 16, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-v2-find-tests-runtime-manager", + "mode": "full_chain", + "run_started_at": "2026-03-12T14:38:57", + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Где тесты для RuntimeManager?", + "normalized_query": "Где тесты для RuntimeManager?" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Где тесты для RuntimeManager?" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Где тесты для RuntimeManager?" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "test_file_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "test_symbol_patterns": [ + "test_runtime_manager", + "TestRuntimeManager", + "RuntimeManager" + ], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Где тесты для RuntimeManager?" + }, + "output": { + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "RuntimeManager" + ], + "confidence": 0.0 + }, + "rag_count": 16, + "rag_rows": [ + { + "path": "tests/test_runtime.py", + "content": "test_runtime_runs_worker_routine_and_exposes_status instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_runtime_runs_worker_routine_and_exposes_status:instantiates", + "span_start": 209, + "span_end": 209, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "c397a308e7824ba9fe400a754c7e15e66ea6f058d7f5d3e82bb002bb78b509d2", + "edge_type": "instantiates", + "src_symbol_id": "1c767eb5ee08e84f45b18c8ed7531ec0ed73c63fb1594823569672db7b21e992", + "src_qname": "test_runtime_runs_worker_routine_and_exposes_status", + "dst_symbol_id": "aeadc039653807b0da1ca6e3cc1078ee61cfc510b28e7f9c2ec04c59da43cc8d", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "test_runtime_graceful_stop_waits_until_worker_finishes instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_runtime_graceful_stop_waits_until_worker_finishes:instantiates", + "span_start": 229, + "span_end": 229, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "76b4701262ccaa0a7a41691407c4ebdb2ca74a2415d89f0a38ef0d4f608bda93", + "edge_type": "instantiates", + "src_symbol_id": "1076e788e4a03b10d7bc1313a8ad46caa170c13cc026c6e4de994af1a6ae57bf", + "src_qname": "test_runtime_graceful_stop_waits_until_worker_finishes", + "dst_symbol_id": "aeadc039653807b0da1ca6e3cc1078ee61cfc510b28e7f9c2ec04c59da43cc8d", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "_build_runtime instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "_build_runtime:instantiates", + "span_start": 155, + "span_end": 155, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "7eb254d564944bab6272757ee5ef688862bd321e6941e2495dc942e03b1c9a25", + "edge_type": "instantiates", + "src_symbol_id": "db94031d5245bf82be836a109b4584b43b8e83d37a0f318e03f6c8191896d469", + "src_qname": "_build_runtime", + "dst_symbol_id": "a1572ea8183dc0cd6ddbc74342bbde8c28cecfde37ad40b62feff09f8d103d11", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_worker_wakes_up_with_configured_interval instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_worker_wakes_up_with_configured_interval:instantiates", + "span_start": 167, + "span_end": 167, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "189aafc4de0b79c688668f25f0c87166a127df26bd2215452014713b65ef281a", + "edge_type": "instantiates", + "src_symbol_id": "65f877f78191d65e6a752e41cedc70ebc784c266804a55c1c56440336e1f0d6e", + "src_qname": "test_worker_wakes_up_with_configured_interval", + "dst_symbol_id": "a1572ea8183dc0cd6ddbc74342bbde8c28cecfde37ad40b62feff09f8d103d11", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_actions_stop_busy_worker_after_timeout\n -> BlockingRoutine\n -> BlockingRoutine.__init__\n -> BlockingRoutine._started\n -> BlockingRoutine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_actions_stop_busy_worker_after_timeout:dataflow_slice", + "span_start": 42, + "span_end": 238, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "8e7db3d2a9226f1c1d9942ac6373cfcafa0d2276758ddb8a3d3c455a3d58024d", + "edge_type": "dataflow_slice", + "src_symbol_id": "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "src_qname": "test_actions_stop_busy_worker_after_timeout", + "dst_symbol_id": "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04", + "dst_ref": "BlockingRoutine.run", + "resolution": "resolved", + "slice_id": "8e7db3d2a9226f1c1d9942ac6373cfcafa0d2276758ddb8a3d3c455a3d58024d", + "root_symbol_id": "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "path_symbols": [ + "test_actions_stop_busy_worker_after_timeout", + "BlockingRoutine", + "BlockingRoutine.__init__", + "BlockingRoutine._started", + "BlockingRoutine.run" + ], + "path_symbol_ids": [ + "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "a3349c5bc65e4003a4bbd6a8dbb7a54c337e12d1aed930caa701b12e520f1e67", + "486deeed3043c6db985aef258e96ddc67aa53608e67a83962fbd2471f649ddf1", + "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_actions_stop_busy_worker_before_timeout\n -> BlockingRoutine\n -> BlockingRoutine.__init__\n -> BlockingRoutine._release\n -> BlockingRoutine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_actions_stop_busy_worker_before_timeout:dataflow_slice", + "span_start": 43, + "span_end": 212, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "8bd726155ba387d3579763ee84dfd2f9a90bc917da88f3b2e89416ab5c1254d6", + "edge_type": "dataflow_slice", + "src_symbol_id": "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "src_qname": "test_actions_stop_busy_worker_before_timeout", + "dst_symbol_id": "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04", + "dst_ref": "BlockingRoutine.run", + "resolution": "resolved", + "slice_id": "8bd726155ba387d3579763ee84dfd2f9a90bc917da88f3b2e89416ab5c1254d6", + "root_symbol_id": "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "path_symbols": [ + "test_actions_stop_busy_worker_before_timeout", + "BlockingRoutine", + "BlockingRoutine.__init__", + "BlockingRoutine._release", + "BlockingRoutine.run" + ], + "path_symbol_ids": [ + "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "a3349c5bc65e4003a4bbd6a8dbb7a54c337e12d1aed930caa701b12e520f1e67", + "486deeed3043c6db985aef258e96ddc67aa53608e67a83962fbd2471f649ddf1", + "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "def test_runtime_graceful_stop_waits_until_worker_finishes() -> None:\n started = Event()\n release = Event()\n runtime = RuntimeManager()\n runtime.register_module(BlockingModule(started, release))\n runtime.start()\n assert started.wait(timeout=1.0) is True\n assert runtime.status()[\"runtime\"][\"state\"] == \"busy\"\n\n stop_thread = Thread(target=runtime.stop, kwargs={\"timeout\": 1.0}, daemon=True)\n stop_thread.start()\n sleep(0.1)\n assert stop_thread.is_alive() is True\n\n release.set()\n stop_thread.join(timeout=1.0)\n assert stop_thread.is_alive() is False\n assert runtime.status()[\"runtime\"][\"state\"] == \"stopped\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_runtime.py:test_runtime_graceful_stop_waits_until_worker_finishes", + "span_start": 226, + "span_end": 243, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 8, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "def test_runtime_runs_worker_routine_and_exposes_status(tmp_path) -> None:\n config_path = tmp_path / \"config.yml\"\n config_path.write_text(\n \"\"\"\nplatform:\n workers: 1\nlog:\n version: 1\n disable_existing_loggers: false\n handlers:\n console:\n class: logging.StreamHandler\n root:\n level: INFO\n handlers: [console]\n\"\"\".strip(),\n encoding=\"utf-8\",\n )\n runtime = RuntimeManager()\n runtime.add_config_file(config_path)\n module = ExampleModule()\n runtime.register_module(module)\n\n runtime.start()\n sleep(0.2)\n status = runtime.status()\n runtime.stop()\n\n assert module.routine.processed == [{\"id\": 1}]\n assert status[\"modules\"] == [\"example\"]\n assert status[\"runtime\"][\"state\"] == \"idle\"\n assert status[\"health\"][\"status\"] == \"ok\"\n assert status[\"config\"] == {\"platform\": {\"workers\": 1}, \"log\": status[\"config\"][\"log\"]}", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_runtime.py:test_runtime_runs_worker_routine_and_exposes_status", + "span_start": 191, + "span_end": 223, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 7, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _build_runtime(worker: Worker, *, control_timeout: int = 1) -> tuple[RuntimeManager, str]:\n runtime = RuntimeManager()\n channel = HttpControlChannel(host=\"127.0.0.1\", port=0, timeout=control_timeout)\n runtime.control_plane.register_channel(channel)\n runtime.register_module(WorkerModule(worker))\n runtime.start()\n return runtime, f\"http://127.0.0.1:{channel.port}\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_build_runtime", + "span_start": 154, + "span_end": 160, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 6, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def test_worker_wakes_up_with_configured_interval() -> None:\n interval = 0.15\n routine = IntervalRoutine()\n worker = ScenarioWorker(\"interval-worker\", routine, interval=interval)\n runtime = RuntimeManager()\n runtime.register_module(WorkerModule(worker))\n\n runtime.start()\n try:\n assert routine.wait_runs(count=3, timeout=2.0) is True\n finally:\n runtime.stop()\n\n deltas = routine.deltas()\n assert len(deltas) >= 2\n assert all(delta >= interval * 0.7 for delta in deltas[:2])", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:test_worker_wakes_up_with_configured_interval", + "span_start": 163, + "span_end": 178, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 7, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class BlockingRoutine:\n def __init__(self, started: Event, release: Event) -> None:\n self._started = started\n self._release = release\n\n def run(self) -> None:\n self._started.set()\n self._release.wait(timeout=5.0)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:BlockingRoutine", + "span_start": 40, + "span_end": 47, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class ScenarioWorker(Worker):\n def __init__(self, name: str, routine: object, *, interval: float = 0.05) -> None:\n self._name = name\n self._routine = routine\n self._interval = interval\n self._thread: Thread | None = None\n self._stop_requested = Event()\n self._in_flight = 0\n self._runs = 0\n self._lock = Lock()\n\n @property\n def name(self) -> str:\n return self._name\n\n @property\n def critical(self) -> bool:\n return True\n\n def start(self) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._stop_requested.clear()\n self._thread = Thread(target=self._loop, name=f\"{self._name}-thread\", daemon=True)\n self._thread.start()\n\n def stop(self, force: bool = False) -> None:\n self._stop_requested.set()\n\n def health(self) -> WorkerHealth:\n return WorkerHealth(name=self.name, status=\"ok\", critical=True, meta={\"runs\": self._runs})\n\n def status(self) -> WorkerStatus:\n thread_alive = self._thread is not None and self._thread.is_alive()\n with self._lock:\n in_flight = self._in_flight\n runs = self._runs\n if not thread_alive:\n state = \"stopped\"\n elif self._stop_requested.is_set():\n state = \"stopping\"\n elif in_flight > 0:\n state = \"busy\"\n else:\n state = \"idle\"\n return WorkerStatus(name=self.name, state=state, in_flight=in_flight, meta={\"runs\": runs})\n\n def _loop(self) -> None:\n while not self._stop_requested.is_set():\n with self._lock:\n self._in_flight += 1\n try:\n self._routine.run()\n with self._lock:\n self._runs += 1\n finally:\n with self._lock:\n self._in_flight -= 1\n if self._stop_requested.is_set():\n return\n sleep(self._interval)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:ScenarioWorker", + "span_start": 50, + "span_end": 110, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 2, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class WorkerModule(ApplicationModule):\n def __init__(self, worker: Worker) -> None:\n self._worker = worker\n\n @property\n def name(self) -> str:\n return \"business-tests\"\n\n def register(self, registry: ModuleRegistry) -> None:\n registry.add_worker(self._worker)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:WorkerModule", + "span_start": 113, + "span_end": 122, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 3, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _http_call_json(\n base_url: str,\n path: str,\n *,\n method: str = \"GET\",\n headers: dict[str, str] | None = None,\n) -> tuple[int, dict[str, object]]:\n request = Request(f\"{base_url}{path}\", method=method, headers=headers or {})\n try:\n with urlopen(request, timeout=15.0) as response:\n status = response.status\n body = response.read()\n except HTTPError as error:\n status = error.code\n body = error.read()\n payload = json.loads(body.decode(\"utf-8\"))\n return status, payload", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_http_call_json", + "span_start": 125, + "span_end": 141, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 4, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class IntervalRoutine:\n calls: list[float] = field(default_factory=list)\n _lock: Lock = field(default_factory=Lock)\n\n def run(self) -> None:\n with self._lock:\n self.calls.append(monotonic())\n\n def wait_runs(self, count: int, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n with self._lock:\n if len(self.calls) >= count:\n return True\n sleep(0.01)\n return False\n\n def deltas(self) -> list[float]:\n with self._lock:\n return [self.calls[index + 1] - self.calls[index] for index in range(len(self.calls) - 1)]", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:IntervalRoutine", + "span_start": 18, + "span_end": 37, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _poll_until_stopped(base_url: str, timeout: float = 2.0) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n _, payload = _http_call_json(base_url, \"/actions/status\")\n if payload.get(\"detail\") == \"stopped\":\n return True\n sleep(0.05)\n return False", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_poll_until_stopped", + "span_start": 144, + "span_end": 151, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 5, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C0_SOURCE_CHUNKS": 10 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src", + "tests" + ], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src", + "tests" + ], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Где тесты для RuntimeManager? test_runtime_manager TestRuntimeManager RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Где тесты для RuntimeManager? test_runtime_manager TestRuntimeManager RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 10, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 0, + "candidates_after_filter": 0 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src", + "tests" + ], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src", + "tests" + ], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 10, + "candidates_after_filter": 10 + } + ], + "fallback": { + "used": true, + "reason": "scope_relaxed_no_hits" + }, + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "RuntimeManager" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "miss", + "hit_count": 0, + "fail_reason": "scope_relaxed_no_hits" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 10, + "fail_reason": null + } + ] + }, + "constraint_violations": [ + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C1_SYMBOL_CATALOG", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + } + ], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 139, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 70, + "C2_DEPENDENCY_GRAPH": 50, + "C0_SOURCE_CHUNKS": 18 + }, + "merge_rank": 0 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Где тесты для RuntimeManager?", + "rag_count": 16 + }, + "output": { + "llm_answer": "Прямые тесты для RuntimeManager находятся в следующих файлах:\n\n1. tests/test_runtime.py:\n - test_runtime_graceful_stop_waits_until_worker_finishes — проверяет корректную остановку RuntimeManager после завершения работы модуля.\n - test_runtime_runs_worker_routine_and_exposes_status — проверяет запуск рутины модуля и отображение статуса RuntimeManager.\n\nТакже косвенно связан тест:\n\n2. tests/test_business_control_actions.py:\n - _build_runtime — использует RuntimeManager при построении бизнес-контроля.\n - test_worker_wakes_up_with_configured_interval — применяет RuntimeManager для тестирования пробуждения рабочего процесса с заданной периодичностью.\n\nЭти тесты покрывают инициализацию, регистрацию модулей, управление состоянием и остановкой RuntimeManager." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 946, + "evidence_rows": 16, + "evidence_chars": 7086 + }, + "evidence_summary": [ + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 2 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 10, + "unique_paths": 2 + } + ], + "prompt_template_id": "intent_code_qa_find_tests_ru_v4", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 1557 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-find-tests-runtime-manager.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-find-tests-runtime-manager.md new file mode 100644 index 0000000..ebd9050 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-find-tests-runtime-manager.md @@ -0,0 +1,32 @@ +# plba-v2-find-tests-runtime-manager + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Где тесты для RuntimeManager? + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 16, + "llm_answer": "Прямые тесты для RuntimeManager находятся в следующих файлах:\n\n1. tests/test_runtime.py:\n - test_runtime_graceful_stop_waits_until_worker_finishes — проверяет корректную остановку RuntimeManager после завершения работы модуля.\n - test_runtime_runs_worker_routine_and_exposes_status — проверяет запуск рутины модуля и отображение статуса RuntimeManager.\n\nТакже косвенно связан тест:\n\n2. tests/test_business_control_actions.py:\n - _build_runtime — использует RuntimeManager при построении бизнес-контроля.\n - test_worker_wakes_up_with_configured_interval — применяет RuntimeManager для тестирования пробуждения рабочего процесса с заданной периодичностью.\n\nЭти тесты покрывают инициализацию, регистрацию модулей, управление состоянием и остановкой RuntimeManager.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-find-tests-trace-service.json b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-find-tests-trace-service.json new file mode 100644 index 0000000..177991a --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-find-tests-trace-service.json @@ -0,0 +1,2047 @@ +{ + "case_id": "plba-v2-find-tests-trace-service", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 16, + "llm_answer": "Прямых тестов конкретно для `TraceService` в данном контексте не обнаружено.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "TraceService" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-v2-find-tests-trace-service", + "text": "Где тесты для TraceService?", + "mode": "full_chain", + "run_started_at": "2026-03-12T14:38:57", + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Где тесты для TraceService?", + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "TraceService" + ], + "confidence": 0.0 + }, + "rag_count": 16, + "rag_rows": [ + { + "path": "tests/test_runtime.py", + "content": "test_trace_service_writes_contexts_and_messages\n -> RecordingTransport\n -> RecordingTransport.__init__\n -> RecordingTransport.contexts\n -> test_trace_service_writes_contexts_and_messages", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_trace_service_writes_contexts_and_messages:dataflow_slice", + "span_start": 181, + "span_end": 256, + "lexical_rank": 4, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "1636a2f70dee79c804259dc114af6c1ab4db27099911e5f97ac97a2bcb59be8a", + "edge_type": "dataflow_slice", + "src_symbol_id": "1600da201da1d0150240b400e3232172354156decdd1a04e1ab1a1edcd3a7e99", + "src_qname": "test_trace_service_writes_contexts_and_messages", + "dst_symbol_id": "1600da201da1d0150240b400e3232172354156decdd1a04e1ab1a1edcd3a7e99", + "dst_ref": "test_trace_service_writes_contexts_and_messages", + "resolution": "resolved", + "slice_id": "1636a2f70dee79c804259dc114af6c1ab4db27099911e5f97ac97a2bcb59be8a", + "root_symbol_id": "1600da201da1d0150240b400e3232172354156decdd1a04e1ab1a1edcd3a7e99", + "path_symbols": [ + "test_trace_service_writes_contexts_and_messages", + "RecordingTransport", + "RecordingTransport.__init__", + "RecordingTransport.contexts", + "test_trace_service_writes_contexts_and_messages" + ], + "path_symbol_ids": [ + "1600da201da1d0150240b400e3232172354156decdd1a04e1ab1a1edcd3a7e99", + "e3d635de1f1880673b69bf73ca6a45caffa5c7fdc23d589d5e40f76b86bdcd33", + "e34d80da723a7115a7a7586b52dc8b5cfda05c581509eee0c1a0296df9a340cb", + "1600da201da1d0150240b400e3232172354156decdd1a04e1ab1a1edcd3a7e99" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "test_trace_service_writes_contexts_and_messages\n -> RecordingTransport\n -> RecordingTransport.__init__\n -> RecordingTransport.contexts\n -> test_trace_service_allows_messages_without_status", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_trace_service_writes_contexts_and_messages:dataflow_slice", + "span_start": 181, + "span_end": 293, + "lexical_rank": 4, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "5db5abe56b73f884c5178647bd25ef150064a94a41fc8c052aebaa09bd7fdb3d", + "edge_type": "dataflow_slice", + "src_symbol_id": "1600da201da1d0150240b400e3232172354156decdd1a04e1ab1a1edcd3a7e99", + "src_qname": "test_trace_service_writes_contexts_and_messages", + "dst_symbol_id": "7127ca85ce6447928e195e901d36f1e1f1e8205a686e567c2d1b187431f989df", + "dst_ref": "test_trace_service_allows_messages_without_status", + "resolution": "resolved", + "slice_id": "5db5abe56b73f884c5178647bd25ef150064a94a41fc8c052aebaa09bd7fdb3d", + "root_symbol_id": "1600da201da1d0150240b400e3232172354156decdd1a04e1ab1a1edcd3a7e99", + "path_symbols": [ + "test_trace_service_writes_contexts_and_messages", + "RecordingTransport", + "RecordingTransport.__init__", + "RecordingTransport.contexts", + "test_trace_service_allows_messages_without_status" + ], + "path_symbol_ids": [ + "1600da201da1d0150240b400e3232172354156decdd1a04e1ab1a1edcd3a7e99", + "e3d635de1f1880673b69bf73ca6a45caffa5c7fdc23d589d5e40f76b86bdcd33", + "e34d80da723a7115a7a7586b52dc8b5cfda05c581509eee0c1a0296df9a340cb", + "7127ca85ce6447928e195e901d36f1e1f1e8205a686e567c2d1b187431f989df" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "test_trace_service_writes_contexts_and_messages\n -> RecordingTransport\n -> RecordingTransport.__init__\n -> RecordingTransport.contexts\n -> RecordingTransport.write_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_trace_service_writes_contexts_and_messages:dataflow_slice", + "span_start": 181, + "span_end": 249, + "lexical_rank": 4, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "60d7a8655fa4c53d9130ce342fc023d24ccfa16baea47ad60c91d2d49f547565", + "edge_type": "dataflow_slice", + "src_symbol_id": "1600da201da1d0150240b400e3232172354156decdd1a04e1ab1a1edcd3a7e99", + "src_qname": "test_trace_service_writes_contexts_and_messages", + "dst_symbol_id": "b8bbf341e230198caafe54727e13f2db27b7200d6fd95684fc5cf748db1a0e88", + "dst_ref": "RecordingTransport.write_context", + "resolution": "resolved", + "slice_id": "60d7a8655fa4c53d9130ce342fc023d24ccfa16baea47ad60c91d2d49f547565", + "root_symbol_id": "1600da201da1d0150240b400e3232172354156decdd1a04e1ab1a1edcd3a7e99", + "path_symbols": [ + "test_trace_service_writes_contexts_and_messages", + "RecordingTransport", + "RecordingTransport.__init__", + "RecordingTransport.contexts", + "RecordingTransport.write_context" + ], + "path_symbol_ids": [ + "1600da201da1d0150240b400e3232172354156decdd1a04e1ab1a1edcd3a7e99", + "e3d635de1f1880673b69bf73ca6a45caffa5c7fdc23d589d5e40f76b86bdcd33", + "e34d80da723a7115a7a7586b52dc8b5cfda05c581509eee0c1a0296df9a340cb", + "b8bbf341e230198caafe54727e13f2db27b7200d6fd95684fc5cf748db1a0e88" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "test_trace_service_supports_debug_warning_and_error_levels\n -> RecordingTransport\n -> RecordingTransport.__init__\n -> RecordingTransport.contexts\n -> RecordingTransport.write_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_trace_service_supports_debug_warning_and_error_levels:dataflow_slice", + "span_start": 181, + "span_end": 265, + "lexical_rank": 4, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "1372a2241c7265705e5cf9dceeb5e59836fac1d679227c4279ed39e0798ddddf", + "edge_type": "dataflow_slice", + "src_symbol_id": "ede183f1c546725064e28ddab1ffdbae0d1a1258fd62a50eb556c10d10995415", + "src_qname": "test_trace_service_supports_debug_warning_and_error_levels", + "dst_symbol_id": "b8bbf341e230198caafe54727e13f2db27b7200d6fd95684fc5cf748db1a0e88", + "dst_ref": "RecordingTransport.write_context", + "resolution": "resolved", + "slice_id": "1372a2241c7265705e5cf9dceeb5e59836fac1d679227c4279ed39e0798ddddf", + "root_symbol_id": "ede183f1c546725064e28ddab1ffdbae0d1a1258fd62a50eb556c10d10995415", + "path_symbols": [ + "test_trace_service_supports_debug_warning_and_error_levels", + "RecordingTransport", + "RecordingTransport.__init__", + "RecordingTransport.contexts", + "RecordingTransport.write_context" + ], + "path_symbol_ids": [ + "ede183f1c546725064e28ddab1ffdbae0d1a1258fd62a50eb556c10d10995415", + "e3d635de1f1880673b69bf73ca6a45caffa5c7fdc23d589d5e40f76b86bdcd33", + "e34d80da723a7115a7a7586b52dc8b5cfda05c581509eee0c1a0296df9a340cb", + "b8bbf341e230198caafe54727e13f2db27b7200d6fd95684fc5cf748db1a0e88" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "test_trace_service_supports_debug_warning_and_error_levels\n -> RecordingTransport\n -> RecordingTransport.__init__\n -> RecordingTransport.contexts\n -> test_trace_service_writes_contexts_and_messages", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_trace_service_supports_debug_warning_and_error_levels:dataflow_slice", + "span_start": 181, + "span_end": 265, + "lexical_rank": 4, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "8b6a5a738525df160600d71c15915704172de20db436ea2f84b6e039be396a2d", + "edge_type": "dataflow_slice", + "src_symbol_id": "ede183f1c546725064e28ddab1ffdbae0d1a1258fd62a50eb556c10d10995415", + "src_qname": "test_trace_service_supports_debug_warning_and_error_levels", + "dst_symbol_id": "1600da201da1d0150240b400e3232172354156decdd1a04e1ab1a1edcd3a7e99", + "dst_ref": "test_trace_service_writes_contexts_and_messages", + "resolution": "resolved", + "slice_id": "8b6a5a738525df160600d71c15915704172de20db436ea2f84b6e039be396a2d", + "root_symbol_id": "ede183f1c546725064e28ddab1ffdbae0d1a1258fd62a50eb556c10d10995415", + "path_symbols": [ + "test_trace_service_supports_debug_warning_and_error_levels", + "RecordingTransport", + "RecordingTransport.__init__", + "RecordingTransport.contexts", + "test_trace_service_writes_contexts_and_messages" + ], + "path_symbol_ids": [ + "ede183f1c546725064e28ddab1ffdbae0d1a1258fd62a50eb556c10d10995415", + "e3d635de1f1880673b69bf73ca6a45caffa5c7fdc23d589d5e40f76b86bdcd33", + "e34d80da723a7115a7a7586b52dc8b5cfda05c581509eee0c1a0296df9a340cb", + "1600da201da1d0150240b400e3232172354156decdd1a04e1ab1a1edcd3a7e99" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "test_trace_service_supports_debug_warning_and_error_levels\n -> RecordingTransport\n -> RecordingTransport.__init__\n -> RecordingTransport.contexts\n -> test_trace_service_allows_messages_without_status", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_trace_service_supports_debug_warning_and_error_levels:dataflow_slice", + "span_start": 181, + "span_end": 293, + "lexical_rank": 4, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "f7d099f6d5746aa61a3025fd7eef791369bd3a3e5df4bc716de87e7b149ccde6", + "edge_type": "dataflow_slice", + "src_symbol_id": "ede183f1c546725064e28ddab1ffdbae0d1a1258fd62a50eb556c10d10995415", + "src_qname": "test_trace_service_supports_debug_warning_and_error_levels", + "dst_symbol_id": "7127ca85ce6447928e195e901d36f1e1f1e8205a686e567c2d1b187431f989df", + "dst_ref": "test_trace_service_allows_messages_without_status", + "resolution": "resolved", + "slice_id": "f7d099f6d5746aa61a3025fd7eef791369bd3a3e5df4bc716de87e7b149ccde6", + "root_symbol_id": "ede183f1c546725064e28ddab1ffdbae0d1a1258fd62a50eb556c10d10995415", + "path_symbols": [ + "test_trace_service_supports_debug_warning_and_error_levels", + "RecordingTransport", + "RecordingTransport.__init__", + "RecordingTransport.contexts", + "test_trace_service_allows_messages_without_status" + ], + "path_symbol_ids": [ + "ede183f1c546725064e28ddab1ffdbae0d1a1258fd62a50eb556c10d10995415", + "e3d635de1f1880673b69bf73ca6a45caffa5c7fdc23d589d5e40f76b86bdcd33", + "e34d80da723a7115a7a7586b52dc8b5cfda05c581509eee0c1a0296df9a340cb", + "7127ca85ce6447928e195e901d36f1e1f1e8205a686e567c2d1b187431f989df" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "def test_trace_service_writes_contexts_and_messages() -> None:\n from app_runtime.tracing.service import TraceService\n\n transport = RecordingTransport()\n manager = TraceService(transport=transport)\n\n with manager.open_context(alias=\"worker\", kind=\"worker\", attrs={\"routine\": \"incoming\"}):\n manager.step(\"parse\")\n manager.info(\"started\", status=\"ok\", attrs={\"attempt\": 1})\n\n assert len(transport.contexts) == 1\n assert len(transport.messages) == 1\n assert transport.contexts[0].alias == \"worker\"\n assert transport.messages[0].step == \"parse\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_runtime.py:test_trace_service_writes_contexts_and_messages", + "span_start": 246, + "span_end": 259, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 9, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "def test_trace_service_supports_debug_warning_and_error_levels() -> None:\n from app_runtime.tracing.service import TraceService\n\n transport = RecordingTransport()\n manager = TraceService(transport=transport)\n\n with manager.open_context(alias=\"worker\", kind=\"worker\", attrs={\"routine\": \"incoming\"}):\n manager.step(\"validate\")\n manager.debug(\"validation details\", attrs={\"rule\": \"basic\"})\n manager.warning(\"validation warning\", status=\"degraded\", attrs={\"attempt\": 1})\n manager.error(\"integration failed\", status=\"failed\", attrs={\"integration\": \"crm\"})\n manager.exception(\"caught exception\", attrs={\"exception_type\": \"RuntimeError\"})\n\n levels = [message.level for message in transport.messages]\n assert levels == [\"DEBUG\", \"WARNING\", \"ERROR\", \"ERROR\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_runtime.py:test_trace_service_supports_debug_warning_and_error_levels", + "span_start": 262, + "span_end": 276, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 10, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "def test_trace_service_allows_messages_without_status() -> None:\n from app_runtime.tracing.service import TraceService\n\n transport = RecordingTransport()\n manager = TraceService(transport=transport)\n\n with manager.open_context(alias=\"worker\", kind=\"worker\"):\n manager.step(\"optional-status\")\n manager.debug(\"debug without status\")\n manager.info(\"info without status\")\n manager.warning(\"warning without status\")\n manager.error(\"error without status\")\n\n assert [message.status for message in transport.messages] == [\"\", \"\", \"\", \"\"]\n assert all(message.trace_id == transport.contexts[0].trace_id for message in transport.messages)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_runtime.py:test_trace_service_allows_messages_without_status", + "span_start": 279, + "span_end": 293, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 11, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class ScenarioWorker(Worker):\n def __init__(self, name: str, routine: object, *, interval: float = 0.05) -> None:\n self._name = name\n self._routine = routine\n self._interval = interval\n self._thread: Thread | None = None\n self._stop_requested = Event()\n self._in_flight = 0\n self._runs = 0\n self._lock = Lock()\n\n @property\n def name(self) -> str:\n return self._name\n\n @property\n def critical(self) -> bool:\n return True\n\n def start(self) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._stop_requested.clear()\n self._thread = Thread(target=self._loop, name=f\"{self._name}-thread\", daemon=True)\n self._thread.start()\n\n def stop(self, force: bool = False) -> None:\n self._stop_requested.set()\n\n def health(self) -> WorkerHealth:\n return WorkerHealth(name=self.name, status=\"ok\", critical=True, meta={\"runs\": self._runs})\n\n def status(self) -> WorkerStatus:\n thread_alive = self._thread is not None and self._thread.is_alive()\n with self._lock:\n in_flight = self._in_flight\n runs = self._runs\n if not thread_alive:\n state = \"stopped\"\n elif self._stop_requested.is_set():\n state = \"stopping\"\n elif in_flight > 0:\n state = \"busy\"\n else:\n state = \"idle\"\n return WorkerStatus(name=self.name, state=state, in_flight=in_flight, meta={\"runs\": runs})\n\n def _loop(self) -> None:\n while not self._stop_requested.is_set():\n with self._lock:\n self._in_flight += 1\n try:\n self._routine.run()\n with self._lock:\n self._runs += 1\n finally:\n with self._lock:\n self._in_flight -= 1\n if self._stop_requested.is_set():\n return\n sleep(self._interval)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:ScenarioWorker", + "span_start": 50, + "span_end": 110, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 2, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class IntervalRoutine:\n calls: list[float] = field(default_factory=list)\n _lock: Lock = field(default_factory=Lock)\n\n def run(self) -> None:\n with self._lock:\n self.calls.append(monotonic())\n\n def wait_runs(self, count: int, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n with self._lock:\n if len(self.calls) >= count:\n return True\n sleep(0.01)\n return False\n\n def deltas(self) -> list[float]:\n with self._lock:\n return [self.calls[index + 1] - self.calls[index] for index in range(len(self.calls) - 1)]", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:IntervalRoutine", + "span_start": 18, + "span_end": 37, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class BlockingRoutine:\n def __init__(self, started: Event, release: Event) -> None:\n self._started = started\n self._release = release\n\n def run(self) -> None:\n self._started.set()\n self._release.wait(timeout=5.0)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:BlockingRoutine", + "span_start": 40, + "span_end": 47, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def test_worker_wakes_up_with_configured_interval() -> None:\n interval = 0.15\n routine = IntervalRoutine()\n worker = ScenarioWorker(\"interval-worker\", routine, interval=interval)\n runtime = RuntimeManager()\n runtime.register_module(WorkerModule(worker))\n\n runtime.start()\n try:\n assert routine.wait_runs(count=3, timeout=2.0) is True\n finally:\n runtime.stop()\n\n deltas = routine.deltas()\n assert len(deltas) >= 2\n assert all(delta >= interval * 0.7 for delta in deltas[:2])", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:test_worker_wakes_up_with_configured_interval", + "span_start": 163, + "span_end": 178, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 7, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _http_call_json(\n base_url: str,\n path: str,\n *,\n method: str = \"GET\",\n headers: dict[str, str] | None = None,\n) -> tuple[int, dict[str, object]]:\n request = Request(f\"{base_url}{path}\", method=method, headers=headers or {})\n try:\n with urlopen(request, timeout=15.0) as response:\n status = response.status\n body = response.read()\n except HTTPError as error:\n status = error.code\n body = error.read()\n payload = json.loads(body.decode(\"utf-8\"))\n return status, payload", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_http_call_json", + "span_start": 125, + "span_end": 141, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 4, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _build_runtime(worker: Worker, *, control_timeout: int = 1) -> tuple[RuntimeManager, str]:\n runtime = RuntimeManager()\n channel = HttpControlChannel(host=\"127.0.0.1\", port=0, timeout=control_timeout)\n runtime.control_plane.register_channel(channel)\n runtime.register_module(WorkerModule(worker))\n runtime.start()\n return runtime, f\"http://127.0.0.1:{channel.port}\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_build_runtime", + "span_start": 154, + "span_end": 160, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 6, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class WorkerModule(ApplicationModule):\n def __init__(self, worker: Worker) -> None:\n self._worker = worker\n\n @property\n def name(self) -> str:\n return \"business-tests\"\n\n def register(self, registry: ModuleRegistry) -> None:\n registry.add_worker(self._worker)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:WorkerModule", + "span_start": 113, + "span_end": 122, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 3, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "Прямых тестов конкретно для `TraceService` в данном контексте не обнаружено.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C2_DEPENDENCY_GRAPH" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "TraceService" + ], + "keyword_hints": [ + "TraceService" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "test_file_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "test_symbol_patterns": [ + "test_trace_service", + "TestTraceService", + "TraceService" + ], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C0_SOURCE_CHUNKS": 10 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src", + "tests" + ], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src", + "tests" + ], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "TraceService", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Где тесты для TraceService? test_trace_service TestTraceService TraceService", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Где тесты для TraceService? test_trace_service TestTraceService TraceService", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 10, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 0, + "candidates_after_filter": 0 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src", + "tests" + ], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src", + "tests" + ], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 10, + "candidates_after_filter": 10 + } + ], + "fallback": { + "used": true, + "reason": "scope_relaxed_no_hits" + }, + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "TraceService" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "miss", + "hit_count": 0, + "fail_reason": "scope_relaxed_no_hits" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 10, + "fail_reason": null + } + ] + }, + "constraint_violations": [ + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C1_SYMBOL_CATALOG", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + } + ], + "timings_ms": { + "router": 1, + "symbol_resolution": 0, + "retrieval_total": 140, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 68, + "C2_DEPENDENCY_GRAPH": 53, + "C0_SOURCE_CHUNKS": 18 + }, + "merge_rank": 0, + "prompt_build": 0, + "llm_call": 1607 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 1021, + "evidence_rows": 16, + "evidence_chars": 7847 + }, + "evidence_summary": [ + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 10, + "unique_paths": 2 + } + ], + "prompt_template_id": "intent_code_qa_find_tests_ru_v4", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "TraceService" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 16, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-v2-find-tests-trace-service", + "mode": "full_chain", + "run_started_at": "2026-03-12T14:38:57", + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Где тесты для TraceService?", + "normalized_query": "Где тесты для TraceService?" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Где тесты для TraceService?" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Где тесты для TraceService?" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "TraceService" + ], + "keyword_hints": [ + "TraceService" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "test_file_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "test_symbol_patterns": [ + "test_trace_service", + "TestTraceService", + "TraceService" + ], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 1 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Где тесты для TraceService?" + }, + "output": { + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "TraceService" + ], + "confidence": 0.0 + }, + "rag_count": 16, + "rag_rows": [ + { + "path": "tests/test_runtime.py", + "content": "test_trace_service_writes_contexts_and_messages\n -> RecordingTransport\n -> RecordingTransport.__init__\n -> RecordingTransport.contexts\n -> test_trace_service_writes_contexts_and_messages", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_trace_service_writes_contexts_and_messages:dataflow_slice", + "span_start": 181, + "span_end": 256, + "lexical_rank": 4, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "1636a2f70dee79c804259dc114af6c1ab4db27099911e5f97ac97a2bcb59be8a", + "edge_type": "dataflow_slice", + "src_symbol_id": "1600da201da1d0150240b400e3232172354156decdd1a04e1ab1a1edcd3a7e99", + "src_qname": "test_trace_service_writes_contexts_and_messages", + "dst_symbol_id": "1600da201da1d0150240b400e3232172354156decdd1a04e1ab1a1edcd3a7e99", + "dst_ref": "test_trace_service_writes_contexts_and_messages", + "resolution": "resolved", + "slice_id": "1636a2f70dee79c804259dc114af6c1ab4db27099911e5f97ac97a2bcb59be8a", + "root_symbol_id": "1600da201da1d0150240b400e3232172354156decdd1a04e1ab1a1edcd3a7e99", + "path_symbols": [ + "test_trace_service_writes_contexts_and_messages", + "RecordingTransport", + "RecordingTransport.__init__", + "RecordingTransport.contexts", + "test_trace_service_writes_contexts_and_messages" + ], + "path_symbol_ids": [ + "1600da201da1d0150240b400e3232172354156decdd1a04e1ab1a1edcd3a7e99", + "e3d635de1f1880673b69bf73ca6a45caffa5c7fdc23d589d5e40f76b86bdcd33", + "e34d80da723a7115a7a7586b52dc8b5cfda05c581509eee0c1a0296df9a340cb", + "1600da201da1d0150240b400e3232172354156decdd1a04e1ab1a1edcd3a7e99" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "test_trace_service_writes_contexts_and_messages\n -> RecordingTransport\n -> RecordingTransport.__init__\n -> RecordingTransport.contexts\n -> test_trace_service_allows_messages_without_status", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_trace_service_writes_contexts_and_messages:dataflow_slice", + "span_start": 181, + "span_end": 293, + "lexical_rank": 4, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "5db5abe56b73f884c5178647bd25ef150064a94a41fc8c052aebaa09bd7fdb3d", + "edge_type": "dataflow_slice", + "src_symbol_id": "1600da201da1d0150240b400e3232172354156decdd1a04e1ab1a1edcd3a7e99", + "src_qname": "test_trace_service_writes_contexts_and_messages", + "dst_symbol_id": "7127ca85ce6447928e195e901d36f1e1f1e8205a686e567c2d1b187431f989df", + "dst_ref": "test_trace_service_allows_messages_without_status", + "resolution": "resolved", + "slice_id": "5db5abe56b73f884c5178647bd25ef150064a94a41fc8c052aebaa09bd7fdb3d", + "root_symbol_id": "1600da201da1d0150240b400e3232172354156decdd1a04e1ab1a1edcd3a7e99", + "path_symbols": [ + "test_trace_service_writes_contexts_and_messages", + "RecordingTransport", + "RecordingTransport.__init__", + "RecordingTransport.contexts", + "test_trace_service_allows_messages_without_status" + ], + "path_symbol_ids": [ + "1600da201da1d0150240b400e3232172354156decdd1a04e1ab1a1edcd3a7e99", + "e3d635de1f1880673b69bf73ca6a45caffa5c7fdc23d589d5e40f76b86bdcd33", + "e34d80da723a7115a7a7586b52dc8b5cfda05c581509eee0c1a0296df9a340cb", + "7127ca85ce6447928e195e901d36f1e1f1e8205a686e567c2d1b187431f989df" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "test_trace_service_writes_contexts_and_messages\n -> RecordingTransport\n -> RecordingTransport.__init__\n -> RecordingTransport.contexts\n -> RecordingTransport.write_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_trace_service_writes_contexts_and_messages:dataflow_slice", + "span_start": 181, + "span_end": 249, + "lexical_rank": 4, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "60d7a8655fa4c53d9130ce342fc023d24ccfa16baea47ad60c91d2d49f547565", + "edge_type": "dataflow_slice", + "src_symbol_id": "1600da201da1d0150240b400e3232172354156decdd1a04e1ab1a1edcd3a7e99", + "src_qname": "test_trace_service_writes_contexts_and_messages", + "dst_symbol_id": "b8bbf341e230198caafe54727e13f2db27b7200d6fd95684fc5cf748db1a0e88", + "dst_ref": "RecordingTransport.write_context", + "resolution": "resolved", + "slice_id": "60d7a8655fa4c53d9130ce342fc023d24ccfa16baea47ad60c91d2d49f547565", + "root_symbol_id": "1600da201da1d0150240b400e3232172354156decdd1a04e1ab1a1edcd3a7e99", + "path_symbols": [ + "test_trace_service_writes_contexts_and_messages", + "RecordingTransport", + "RecordingTransport.__init__", + "RecordingTransport.contexts", + "RecordingTransport.write_context" + ], + "path_symbol_ids": [ + "1600da201da1d0150240b400e3232172354156decdd1a04e1ab1a1edcd3a7e99", + "e3d635de1f1880673b69bf73ca6a45caffa5c7fdc23d589d5e40f76b86bdcd33", + "e34d80da723a7115a7a7586b52dc8b5cfda05c581509eee0c1a0296df9a340cb", + "b8bbf341e230198caafe54727e13f2db27b7200d6fd95684fc5cf748db1a0e88" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "test_trace_service_supports_debug_warning_and_error_levels\n -> RecordingTransport\n -> RecordingTransport.__init__\n -> RecordingTransport.contexts\n -> RecordingTransport.write_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_trace_service_supports_debug_warning_and_error_levels:dataflow_slice", + "span_start": 181, + "span_end": 265, + "lexical_rank": 4, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "1372a2241c7265705e5cf9dceeb5e59836fac1d679227c4279ed39e0798ddddf", + "edge_type": "dataflow_slice", + "src_symbol_id": "ede183f1c546725064e28ddab1ffdbae0d1a1258fd62a50eb556c10d10995415", + "src_qname": "test_trace_service_supports_debug_warning_and_error_levels", + "dst_symbol_id": "b8bbf341e230198caafe54727e13f2db27b7200d6fd95684fc5cf748db1a0e88", + "dst_ref": "RecordingTransport.write_context", + "resolution": "resolved", + "slice_id": "1372a2241c7265705e5cf9dceeb5e59836fac1d679227c4279ed39e0798ddddf", + "root_symbol_id": "ede183f1c546725064e28ddab1ffdbae0d1a1258fd62a50eb556c10d10995415", + "path_symbols": [ + "test_trace_service_supports_debug_warning_and_error_levels", + "RecordingTransport", + "RecordingTransport.__init__", + "RecordingTransport.contexts", + "RecordingTransport.write_context" + ], + "path_symbol_ids": [ + "ede183f1c546725064e28ddab1ffdbae0d1a1258fd62a50eb556c10d10995415", + "e3d635de1f1880673b69bf73ca6a45caffa5c7fdc23d589d5e40f76b86bdcd33", + "e34d80da723a7115a7a7586b52dc8b5cfda05c581509eee0c1a0296df9a340cb", + "b8bbf341e230198caafe54727e13f2db27b7200d6fd95684fc5cf748db1a0e88" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "test_trace_service_supports_debug_warning_and_error_levels\n -> RecordingTransport\n -> RecordingTransport.__init__\n -> RecordingTransport.contexts\n -> test_trace_service_writes_contexts_and_messages", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_trace_service_supports_debug_warning_and_error_levels:dataflow_slice", + "span_start": 181, + "span_end": 265, + "lexical_rank": 4, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "8b6a5a738525df160600d71c15915704172de20db436ea2f84b6e039be396a2d", + "edge_type": "dataflow_slice", + "src_symbol_id": "ede183f1c546725064e28ddab1ffdbae0d1a1258fd62a50eb556c10d10995415", + "src_qname": "test_trace_service_supports_debug_warning_and_error_levels", + "dst_symbol_id": "1600da201da1d0150240b400e3232172354156decdd1a04e1ab1a1edcd3a7e99", + "dst_ref": "test_trace_service_writes_contexts_and_messages", + "resolution": "resolved", + "slice_id": "8b6a5a738525df160600d71c15915704172de20db436ea2f84b6e039be396a2d", + "root_symbol_id": "ede183f1c546725064e28ddab1ffdbae0d1a1258fd62a50eb556c10d10995415", + "path_symbols": [ + "test_trace_service_supports_debug_warning_and_error_levels", + "RecordingTransport", + "RecordingTransport.__init__", + "RecordingTransport.contexts", + "test_trace_service_writes_contexts_and_messages" + ], + "path_symbol_ids": [ + "ede183f1c546725064e28ddab1ffdbae0d1a1258fd62a50eb556c10d10995415", + "e3d635de1f1880673b69bf73ca6a45caffa5c7fdc23d589d5e40f76b86bdcd33", + "e34d80da723a7115a7a7586b52dc8b5cfda05c581509eee0c1a0296df9a340cb", + "1600da201da1d0150240b400e3232172354156decdd1a04e1ab1a1edcd3a7e99" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "test_trace_service_supports_debug_warning_and_error_levels\n -> RecordingTransport\n -> RecordingTransport.__init__\n -> RecordingTransport.contexts\n -> test_trace_service_allows_messages_without_status", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_trace_service_supports_debug_warning_and_error_levels:dataflow_slice", + "span_start": 181, + "span_end": 293, + "lexical_rank": 4, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "f7d099f6d5746aa61a3025fd7eef791369bd3a3e5df4bc716de87e7b149ccde6", + "edge_type": "dataflow_slice", + "src_symbol_id": "ede183f1c546725064e28ddab1ffdbae0d1a1258fd62a50eb556c10d10995415", + "src_qname": "test_trace_service_supports_debug_warning_and_error_levels", + "dst_symbol_id": "7127ca85ce6447928e195e901d36f1e1f1e8205a686e567c2d1b187431f989df", + "dst_ref": "test_trace_service_allows_messages_without_status", + "resolution": "resolved", + "slice_id": "f7d099f6d5746aa61a3025fd7eef791369bd3a3e5df4bc716de87e7b149ccde6", + "root_symbol_id": "ede183f1c546725064e28ddab1ffdbae0d1a1258fd62a50eb556c10d10995415", + "path_symbols": [ + "test_trace_service_supports_debug_warning_and_error_levels", + "RecordingTransport", + "RecordingTransport.__init__", + "RecordingTransport.contexts", + "test_trace_service_allows_messages_without_status" + ], + "path_symbol_ids": [ + "ede183f1c546725064e28ddab1ffdbae0d1a1258fd62a50eb556c10d10995415", + "e3d635de1f1880673b69bf73ca6a45caffa5c7fdc23d589d5e40f76b86bdcd33", + "e34d80da723a7115a7a7586b52dc8b5cfda05c581509eee0c1a0296df9a340cb", + "7127ca85ce6447928e195e901d36f1e1f1e8205a686e567c2d1b187431f989df" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "def test_trace_service_writes_contexts_and_messages() -> None:\n from app_runtime.tracing.service import TraceService\n\n transport = RecordingTransport()\n manager = TraceService(transport=transport)\n\n with manager.open_context(alias=\"worker\", kind=\"worker\", attrs={\"routine\": \"incoming\"}):\n manager.step(\"parse\")\n manager.info(\"started\", status=\"ok\", attrs={\"attempt\": 1})\n\n assert len(transport.contexts) == 1\n assert len(transport.messages) == 1\n assert transport.contexts[0].alias == \"worker\"\n assert transport.messages[0].step == \"parse\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_runtime.py:test_trace_service_writes_contexts_and_messages", + "span_start": 246, + "span_end": 259, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 9, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "def test_trace_service_supports_debug_warning_and_error_levels() -> None:\n from app_runtime.tracing.service import TraceService\n\n transport = RecordingTransport()\n manager = TraceService(transport=transport)\n\n with manager.open_context(alias=\"worker\", kind=\"worker\", attrs={\"routine\": \"incoming\"}):\n manager.step(\"validate\")\n manager.debug(\"validation details\", attrs={\"rule\": \"basic\"})\n manager.warning(\"validation warning\", status=\"degraded\", attrs={\"attempt\": 1})\n manager.error(\"integration failed\", status=\"failed\", attrs={\"integration\": \"crm\"})\n manager.exception(\"caught exception\", attrs={\"exception_type\": \"RuntimeError\"})\n\n levels = [message.level for message in transport.messages]\n assert levels == [\"DEBUG\", \"WARNING\", \"ERROR\", \"ERROR\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_runtime.py:test_trace_service_supports_debug_warning_and_error_levels", + "span_start": 262, + "span_end": 276, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 10, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "def test_trace_service_allows_messages_without_status() -> None:\n from app_runtime.tracing.service import TraceService\n\n transport = RecordingTransport()\n manager = TraceService(transport=transport)\n\n with manager.open_context(alias=\"worker\", kind=\"worker\"):\n manager.step(\"optional-status\")\n manager.debug(\"debug without status\")\n manager.info(\"info without status\")\n manager.warning(\"warning without status\")\n manager.error(\"error without status\")\n\n assert [message.status for message in transport.messages] == [\"\", \"\", \"\", \"\"]\n assert all(message.trace_id == transport.contexts[0].trace_id for message in transport.messages)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_runtime.py:test_trace_service_allows_messages_without_status", + "span_start": 279, + "span_end": 293, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 11, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class ScenarioWorker(Worker):\n def __init__(self, name: str, routine: object, *, interval: float = 0.05) -> None:\n self._name = name\n self._routine = routine\n self._interval = interval\n self._thread: Thread | None = None\n self._stop_requested = Event()\n self._in_flight = 0\n self._runs = 0\n self._lock = Lock()\n\n @property\n def name(self) -> str:\n return self._name\n\n @property\n def critical(self) -> bool:\n return True\n\n def start(self) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._stop_requested.clear()\n self._thread = Thread(target=self._loop, name=f\"{self._name}-thread\", daemon=True)\n self._thread.start()\n\n def stop(self, force: bool = False) -> None:\n self._stop_requested.set()\n\n def health(self) -> WorkerHealth:\n return WorkerHealth(name=self.name, status=\"ok\", critical=True, meta={\"runs\": self._runs})\n\n def status(self) -> WorkerStatus:\n thread_alive = self._thread is not None and self._thread.is_alive()\n with self._lock:\n in_flight = self._in_flight\n runs = self._runs\n if not thread_alive:\n state = \"stopped\"\n elif self._stop_requested.is_set():\n state = \"stopping\"\n elif in_flight > 0:\n state = \"busy\"\n else:\n state = \"idle\"\n return WorkerStatus(name=self.name, state=state, in_flight=in_flight, meta={\"runs\": runs})\n\n def _loop(self) -> None:\n while not self._stop_requested.is_set():\n with self._lock:\n self._in_flight += 1\n try:\n self._routine.run()\n with self._lock:\n self._runs += 1\n finally:\n with self._lock:\n self._in_flight -= 1\n if self._stop_requested.is_set():\n return\n sleep(self._interval)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:ScenarioWorker", + "span_start": 50, + "span_end": 110, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 2, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class IntervalRoutine:\n calls: list[float] = field(default_factory=list)\n _lock: Lock = field(default_factory=Lock)\n\n def run(self) -> None:\n with self._lock:\n self.calls.append(monotonic())\n\n def wait_runs(self, count: int, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n with self._lock:\n if len(self.calls) >= count:\n return True\n sleep(0.01)\n return False\n\n def deltas(self) -> list[float]:\n with self._lock:\n return [self.calls[index + 1] - self.calls[index] for index in range(len(self.calls) - 1)]", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:IntervalRoutine", + "span_start": 18, + "span_end": 37, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class BlockingRoutine:\n def __init__(self, started: Event, release: Event) -> None:\n self._started = started\n self._release = release\n\n def run(self) -> None:\n self._started.set()\n self._release.wait(timeout=5.0)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:BlockingRoutine", + "span_start": 40, + "span_end": 47, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def test_worker_wakes_up_with_configured_interval() -> None:\n interval = 0.15\n routine = IntervalRoutine()\n worker = ScenarioWorker(\"interval-worker\", routine, interval=interval)\n runtime = RuntimeManager()\n runtime.register_module(WorkerModule(worker))\n\n runtime.start()\n try:\n assert routine.wait_runs(count=3, timeout=2.0) is True\n finally:\n runtime.stop()\n\n deltas = routine.deltas()\n assert len(deltas) >= 2\n assert all(delta >= interval * 0.7 for delta in deltas[:2])", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:test_worker_wakes_up_with_configured_interval", + "span_start": 163, + "span_end": 178, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 7, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _http_call_json(\n base_url: str,\n path: str,\n *,\n method: str = \"GET\",\n headers: dict[str, str] | None = None,\n) -> tuple[int, dict[str, object]]:\n request = Request(f\"{base_url}{path}\", method=method, headers=headers or {})\n try:\n with urlopen(request, timeout=15.0) as response:\n status = response.status\n body = response.read()\n except HTTPError as error:\n status = error.code\n body = error.read()\n payload = json.loads(body.decode(\"utf-8\"))\n return status, payload", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_http_call_json", + "span_start": 125, + "span_end": 141, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 4, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _build_runtime(worker: Worker, *, control_timeout: int = 1) -> tuple[RuntimeManager, str]:\n runtime = RuntimeManager()\n channel = HttpControlChannel(host=\"127.0.0.1\", port=0, timeout=control_timeout)\n runtime.control_plane.register_channel(channel)\n runtime.register_module(WorkerModule(worker))\n runtime.start()\n return runtime, f\"http://127.0.0.1:{channel.port}\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_build_runtime", + "span_start": 154, + "span_end": 160, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 6, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class WorkerModule(ApplicationModule):\n def __init__(self, worker: Worker) -> None:\n self._worker = worker\n\n @property\n def name(self) -> str:\n return \"business-tests\"\n\n def register(self, registry: ModuleRegistry) -> None:\n registry.add_worker(self._worker)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:WorkerModule", + "span_start": 113, + "span_end": 122, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 3, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C0_SOURCE_CHUNKS": 10 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src", + "tests" + ], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src", + "tests" + ], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "TraceService", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Где тесты для TraceService? test_trace_service TestTraceService TraceService", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Где тесты для TraceService? test_trace_service TestTraceService TraceService", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 10, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 0, + "candidates_after_filter": 0 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src", + "tests" + ], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src", + "tests" + ], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 10, + "candidates_after_filter": 10 + } + ], + "fallback": { + "used": true, + "reason": "scope_relaxed_no_hits" + }, + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "TraceService" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "miss", + "hit_count": 0, + "fail_reason": "scope_relaxed_no_hits" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 10, + "fail_reason": null + } + ] + }, + "constraint_violations": [ + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C1_SYMBOL_CATALOG", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + } + ], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 140, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 68, + "C2_DEPENDENCY_GRAPH": 53, + "C0_SOURCE_CHUNKS": 18 + }, + "merge_rank": 0 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Где тесты для TraceService?", + "rag_count": 16 + }, + "output": { + "llm_answer": "Прямых тестов конкретно для `TraceService` в данном контексте не обнаружено." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 1021, + "evidence_rows": 16, + "evidence_chars": 7847 + }, + "evidence_summary": [ + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 10, + "unique_paths": 2 + } + ], + "prompt_template_id": "intent_code_qa_find_tests_ru_v4", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 1607 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-find-tests-trace-service.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-find-tests-trace-service.md new file mode 100644 index 0000000..9d3d9dd --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-find-tests-trace-service.md @@ -0,0 +1,32 @@ +# plba-v2-find-tests-trace-service + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Где тесты для TraceService? + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 16, + "llm_answer": "Прямых тестов конкретно для `TraceService` в данном контексте не обнаружено.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "TraceService" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-find-tests-workflow-runtime-factory-negative.json b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-find-tests-workflow-runtime-factory-negative.json new file mode 100644 index 0000000..8a52766 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-find-tests-workflow-runtime-factory-negative.json @@ -0,0 +1,2047 @@ +{ + "case_id": "plba-v2-find-tests-workflow-runtime-factory-negative", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 16, + "llm_answer": "Прямых тестов конкретно для `WorkflowRuntimeFactory` в предоставленном контексте не обнаружено.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "WorkflowRuntimeFactory" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-v2-find-tests-workflow-runtime-factory-negative", + "text": "Где тесты для WorkflowRuntimeFactory?", + "mode": "full_chain", + "run_started_at": "2026-03-12T14:38:57", + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Где тесты для WorkflowRuntimeFactory?", + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "WorkflowRuntimeFactory" + ], + "confidence": 0.0 + }, + "rag_count": 16, + "rag_rows": [ + { + "path": "tests/test_business_control_actions.py", + "content": "test_actions_stop_busy_worker_before_timeout\n -> BlockingRoutine\n -> BlockingRoutine.__init__\n -> BlockingRoutine._release\n -> BlockingRoutine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_actions_stop_busy_worker_before_timeout:dataflow_slice", + "span_start": 43, + "span_end": 212, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "8bd726155ba387d3579763ee84dfd2f9a90bc917da88f3b2e89416ab5c1254d6", + "edge_type": "dataflow_slice", + "src_symbol_id": "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "src_qname": "test_actions_stop_busy_worker_before_timeout", + "dst_symbol_id": "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04", + "dst_ref": "BlockingRoutine.run", + "resolution": "resolved", + "slice_id": "8bd726155ba387d3579763ee84dfd2f9a90bc917da88f3b2e89416ab5c1254d6", + "root_symbol_id": "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "path_symbols": [ + "test_actions_stop_busy_worker_before_timeout", + "BlockingRoutine", + "BlockingRoutine.__init__", + "BlockingRoutine._release", + "BlockingRoutine.run" + ], + "path_symbol_ids": [ + "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "a3349c5bc65e4003a4bbd6a8dbb7a54c337e12d1aed930caa701b12e520f1e67", + "486deeed3043c6db985aef258e96ddc67aa53608e67a83962fbd2471f649ddf1", + "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_worker_wakes_up_with_configured_interval\n -> ScenarioWorker\n -> ScenarioWorker.__init__\n -> ScenarioWorker._name\n -> ScenarioWorker.name", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_worker_wakes_up_with_configured_interval:dataflow_slice", + "span_start": 52, + "span_end": 166, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "2fd137f5852febe907f44d3b3e4ea430f89ccfe962ae1442a16ab9df64c8f76c", + "edge_type": "dataflow_slice", + "src_symbol_id": "65f877f78191d65e6a752e41cedc70ebc784c266804a55c1c56440336e1f0d6e", + "src_qname": "test_worker_wakes_up_with_configured_interval", + "dst_symbol_id": "da022da2c49fd9cfd09d6e6da6bbd59aaa7d28efd669ce8444e88d327ddec2fc", + "dst_ref": "ScenarioWorker.name", + "resolution": "resolved", + "slice_id": "2fd137f5852febe907f44d3b3e4ea430f89ccfe962ae1442a16ab9df64c8f76c", + "root_symbol_id": "65f877f78191d65e6a752e41cedc70ebc784c266804a55c1c56440336e1f0d6e", + "path_symbols": [ + "test_worker_wakes_up_with_configured_interval", + "ScenarioWorker", + "ScenarioWorker.__init__", + "ScenarioWorker._name", + "ScenarioWorker.name" + ], + "path_symbol_ids": [ + "65f877f78191d65e6a752e41cedc70ebc784c266804a55c1c56440336e1f0d6e", + "9a1d08a7eb1831c9f2e0db361b5207f036e477c160773ae08c0b287239785c52", + "9c20be046ba06644d1432e0f20eb223663d2b116ee7d91fdc62bc68323f2e593", + "da022da2c49fd9cfd09d6e6da6bbd59aaa7d28efd669ce8444e88d327ddec2fc" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_actions_stop_busy_worker_before_timeout\n -> BlockingRoutine\n -> BlockingRoutine.__init__\n -> BlockingRoutine._started\n -> BlockingRoutine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_actions_stop_busy_worker_before_timeout:dataflow_slice", + "span_start": 42, + "span_end": 212, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "f9bcce108870e49afa8b32d4625115a10707a3b0e7473179e958e5752bf258b4", + "edge_type": "dataflow_slice", + "src_symbol_id": "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "src_qname": "test_actions_stop_busy_worker_before_timeout", + "dst_symbol_id": "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04", + "dst_ref": "BlockingRoutine.run", + "resolution": "resolved", + "slice_id": "f9bcce108870e49afa8b32d4625115a10707a3b0e7473179e958e5752bf258b4", + "root_symbol_id": "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "path_symbols": [ + "test_actions_stop_busy_worker_before_timeout", + "BlockingRoutine", + "BlockingRoutine.__init__", + "BlockingRoutine._started", + "BlockingRoutine.run" + ], + "path_symbol_ids": [ + "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "a3349c5bc65e4003a4bbd6a8dbb7a54c337e12d1aed930caa701b12e520f1e67", + "486deeed3043c6db985aef258e96ddc67aa53608e67a83962fbd2471f649ddf1", + "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_actions_stop_busy_worker_after_timeout\n -> BlockingRoutine\n -> BlockingRoutine.__init__\n -> BlockingRoutine._started\n -> BlockingRoutine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_actions_stop_busy_worker_after_timeout:dataflow_slice", + "span_start": 42, + "span_end": 238, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "8e7db3d2a9226f1c1d9942ac6373cfcafa0d2276758ddb8a3d3c455a3d58024d", + "edge_type": "dataflow_slice", + "src_symbol_id": "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "src_qname": "test_actions_stop_busy_worker_after_timeout", + "dst_symbol_id": "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04", + "dst_ref": "BlockingRoutine.run", + "resolution": "resolved", + "slice_id": "8e7db3d2a9226f1c1d9942ac6373cfcafa0d2276758ddb8a3d3c455a3d58024d", + "root_symbol_id": "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "path_symbols": [ + "test_actions_stop_busy_worker_after_timeout", + "BlockingRoutine", + "BlockingRoutine.__init__", + "BlockingRoutine._started", + "BlockingRoutine.run" + ], + "path_symbol_ids": [ + "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "a3349c5bc65e4003a4bbd6a8dbb7a54c337e12d1aed930caa701b12e520f1e67", + "486deeed3043c6db985aef258e96ddc67aa53608e67a83962fbd2471f649ddf1", + "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_actions_stop_busy_worker_after_timeout\n -> BlockingRoutine\n -> BlockingRoutine.__init__\n -> BlockingRoutine._release\n -> BlockingRoutine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_actions_stop_busy_worker_after_timeout:dataflow_slice", + "span_start": 43, + "span_end": 238, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "b59da9da82f9dfc8a9b695a08213786385da1ae9e17561ec3a0450a574a8cb39", + "edge_type": "dataflow_slice", + "src_symbol_id": "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "src_qname": "test_actions_stop_busy_worker_after_timeout", + "dst_symbol_id": "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04", + "dst_ref": "BlockingRoutine.run", + "resolution": "resolved", + "slice_id": "b59da9da82f9dfc8a9b695a08213786385da1ae9e17561ec3a0450a574a8cb39", + "root_symbol_id": "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "path_symbols": [ + "test_actions_stop_busy_worker_after_timeout", + "BlockingRoutine", + "BlockingRoutine.__init__", + "BlockingRoutine._release", + "BlockingRoutine.run" + ], + "path_symbol_ids": [ + "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "a3349c5bc65e4003a4bbd6a8dbb7a54c337e12d1aed930caa701b12e520f1e67", + "486deeed3043c6db985aef258e96ddc67aa53608e67a83962fbd2471f649ddf1", + "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_actions_start_stop_and_health_when_worker_is_idle\n -> ScenarioWorker\n -> ScenarioWorker.__init__\n -> ScenarioWorker._name\n -> ScenarioWorker.name", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_actions_start_stop_and_health_when_worker_is_idle:dataflow_slice", + "span_start": 52, + "span_end": 182, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "8fb3c9e775ad1cfa91eebb8b8cef367dc53c923584236122235446e0579b468e", + "edge_type": "dataflow_slice", + "src_symbol_id": "09a78d8eb31c2da14fee58da53b5da7a5065a4c23b6300748a6d44517a5284b8", + "src_qname": "test_actions_start_stop_and_health_when_worker_is_idle", + "dst_symbol_id": "da022da2c49fd9cfd09d6e6da6bbd59aaa7d28efd669ce8444e88d327ddec2fc", + "dst_ref": "ScenarioWorker.name", + "resolution": "resolved", + "slice_id": "8fb3c9e775ad1cfa91eebb8b8cef367dc53c923584236122235446e0579b468e", + "root_symbol_id": "09a78d8eb31c2da14fee58da53b5da7a5065a4c23b6300748a6d44517a5284b8", + "path_symbols": [ + "test_actions_start_stop_and_health_when_worker_is_idle", + "ScenarioWorker", + "ScenarioWorker.__init__", + "ScenarioWorker._name", + "ScenarioWorker.name" + ], + "path_symbol_ids": [ + "09a78d8eb31c2da14fee58da53b5da7a5065a4c23b6300748a6d44517a5284b8", + "9a1d08a7eb1831c9f2e0db361b5207f036e477c160773ae08c0b287239785c52", + "9c20be046ba06644d1432e0f20eb223663d2b116ee7d91fdc62bc68323f2e593", + "da022da2c49fd9cfd09d6e6da6bbd59aaa7d28efd669ce8444e88d327ddec2fc" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def test_actions_start_stop_and_health_when_worker_is_idle() -> None:\n runtime, base_url = _build_runtime(ScenarioWorker(\"idle-worker\", IntervalRoutine(), interval=0.2))\n try:\n stop_status, stop_payload = _http_call_json(base_url, \"/actions/stop\", method=\"POST\")\n assert stop_status == 200\n assert isinstance(stop_payload.get(\"detail\"), dict)\n assert stop_payload[\"detail\"][\"timed_out\"] is False\n assert stop_payload[\"detail\"][\"state\"] == \"stopped\"\n\n health_stopped_status, health_stopped_payload = _http_call_json(base_url, \"/health\")\n assert health_stopped_status == 503\n assert health_stopped_payload[\"state\"] == \"stopped\"\n assert health_stopped_payload[\"status\"] == \"unhealthy\"\n\n start_status, start_payload = _http_call_json(base_url, \"/actions/start\", method=\"POST\")\n assert start_status == 200\n assert isinstance(start_payload.get(\"detail\"), dict)\n assert start_payload[\"detail\"][\"timed_out\"] is False\n assert start_payload[\"detail\"][\"state\"] in {\"idle\", \"busy\"}\n\n health_started_status, health_started_payload = _http_call_json(base_url, \"/health\")\n assert health_started_status == 200\n assert health_started_payload[\"status\"] == \"ok\"\n assert health_started_payload[\"state\"] in {\"idle\", \"busy\"}\n finally:\n runtime.stop()", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:test_actions_start_stop_and_health_when_worker_is_idle", + "span_start": 181, + "span_end": 206, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 8, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _poll_until_stopped(base_url: str, timeout: float = 2.0) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n _, payload = _http_call_json(base_url, \"/actions/status\")\n if payload.get(\"detail\") == \"stopped\":\n return True\n sleep(0.05)\n return False", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_poll_until_stopped", + "span_start": 144, + "span_end": 151, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 5, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def test_worker_wakes_up_with_configured_interval() -> None:\n interval = 0.15\n routine = IntervalRoutine()\n worker = ScenarioWorker(\"interval-worker\", routine, interval=interval)\n runtime = RuntimeManager()\n runtime.register_module(WorkerModule(worker))\n\n runtime.start()\n try:\n assert routine.wait_runs(count=3, timeout=2.0) is True\n finally:\n runtime.stop()\n\n deltas = routine.deltas()\n assert len(deltas) >= 2\n assert all(delta >= interval * 0.7 for delta in deltas[:2])", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:test_worker_wakes_up_with_configured_interval", + "span_start": 163, + "span_end": 178, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 7, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class BlockingRoutine:\n def __init__(self, started: Event, release: Event) -> None:\n self._started = started\n self._release = release\n\n def run(self) -> None:\n self._started.set()\n self._release.wait(timeout=5.0)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:BlockingRoutine", + "span_start": 40, + "span_end": 47, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class WorkerModule(ApplicationModule):\n def __init__(self, worker: Worker) -> None:\n self._worker = worker\n\n @property\n def name(self) -> str:\n return \"business-tests\"\n\n def register(self, registry: ModuleRegistry) -> None:\n registry.add_worker(self._worker)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:WorkerModule", + "span_start": 113, + "span_end": 122, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 3, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _http_call_json(\n base_url: str,\n path: str,\n *,\n method: str = \"GET\",\n headers: dict[str, str] | None = None,\n) -> tuple[int, dict[str, object]]:\n request = Request(f\"{base_url}{path}\", method=method, headers=headers or {})\n try:\n with urlopen(request, timeout=15.0) as response:\n status = response.status\n body = response.read()\n except HTTPError as error:\n status = error.code\n body = error.read()\n payload = json.loads(body.decode(\"utf-8\"))\n return status, payload", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_http_call_json", + "span_start": 125, + "span_end": 141, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 4, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _build_runtime(worker: Worker, *, control_timeout: int = 1) -> tuple[RuntimeManager, str]:\n runtime = RuntimeManager()\n channel = HttpControlChannel(host=\"127.0.0.1\", port=0, timeout=control_timeout)\n runtime.control_plane.register_channel(channel)\n runtime.register_module(WorkerModule(worker))\n runtime.start()\n return runtime, f\"http://127.0.0.1:{channel.port}\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_build_runtime", + "span_start": 154, + "span_end": 160, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 6, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class ScenarioWorker(Worker):\n def __init__(self, name: str, routine: object, *, interval: float = 0.05) -> None:\n self._name = name\n self._routine = routine\n self._interval = interval\n self._thread: Thread | None = None\n self._stop_requested = Event()\n self._in_flight = 0\n self._runs = 0\n self._lock = Lock()\n\n @property\n def name(self) -> str:\n return self._name\n\n @property\n def critical(self) -> bool:\n return True\n\n def start(self) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._stop_requested.clear()\n self._thread = Thread(target=self._loop, name=f\"{self._name}-thread\", daemon=True)\n self._thread.start()\n\n def stop(self, force: bool = False) -> None:\n self._stop_requested.set()\n\n def health(self) -> WorkerHealth:\n return WorkerHealth(name=self.name, status=\"ok\", critical=True, meta={\"runs\": self._runs})\n\n def status(self) -> WorkerStatus:\n thread_alive = self._thread is not None and self._thread.is_alive()\n with self._lock:\n in_flight = self._in_flight\n runs = self._runs\n if not thread_alive:\n state = \"stopped\"\n elif self._stop_requested.is_set():\n state = \"stopping\"\n elif in_flight > 0:\n state = \"busy\"\n else:\n state = \"idle\"\n return WorkerStatus(name=self.name, state=state, in_flight=in_flight, meta={\"runs\": runs})\n\n def _loop(self) -> None:\n while not self._stop_requested.is_set():\n with self._lock:\n self._in_flight += 1\n try:\n self._routine.run()\n with self._lock:\n self._runs += 1\n finally:\n with self._lock:\n self._in_flight -= 1\n if self._stop_requested.is_set():\n return\n sleep(self._interval)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:ScenarioWorker", + "span_start": 50, + "span_end": 110, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 2, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class IntervalRoutine:\n calls: list[float] = field(default_factory=list)\n _lock: Lock = field(default_factory=Lock)\n\n def run(self) -> None:\n with self._lock:\n self.calls.append(monotonic())\n\n def wait_runs(self, count: int, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n with self._lock:\n if len(self.calls) >= count:\n return True\n sleep(0.01)\n return False\n\n def deltas(self) -> list[float]:\n with self._lock:\n return [self.calls[index + 1] - self.calls[index] for index in range(len(self.calls) - 1)]", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:IntervalRoutine", + "span_start": 18, + "span_end": 37, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def test_actions_stop_busy_worker_before_timeout() -> None:\n started = Event()\n release = Event()\n runtime, base_url = _build_runtime(ScenarioWorker(\"busy-worker\", BlockingRoutine(started, release)))\n assert started.wait(timeout=1.0) is True\n\n def release_later() -> None:\n sleep(0.2)\n release.set()\n\n Thread(target=release_later, daemon=True).start()\n try:\n status, payload = _http_call_json(base_url, \"/actions/stop\", method=\"POST\")\n assert status == 200\n assert isinstance(payload.get(\"detail\"), dict)\n assert payload[\"detail\"][\"timed_out\"] is False\n assert payload[\"detail\"][\"state\"] == \"stopped\"\n\n health_status, health_payload = _http_call_json(base_url, \"/health\")\n assert health_status == 503\n assert health_payload[\"status\"] == \"unhealthy\"\n assert health_payload[\"state\"] == \"stopped\"\n finally:\n runtime.stop()", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:test_actions_stop_busy_worker_before_timeout", + "span_start": 209, + "span_end": 232, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 9, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "Прямых тестов конкретно для `WorkflowRuntimeFactory` в предоставленном контексте не обнаружено.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C2_DEPENDENCY_GRAPH" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "WorkflowRuntimeFactory" + ], + "keyword_hints": [ + "WorkflowRuntimeFactory" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "test_file_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "test_symbol_patterns": [ + "test_workflow_runtime_factory", + "TestWorkflowRuntimeFactory", + "WorkflowRuntimeFactory" + ], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C0_SOURCE_CHUNKS": 10 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src", + "tests" + ], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src", + "tests" + ], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "WorkflowRuntimeFactory", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Где тесты для WorkflowRuntimeFactory? test_workflow_runtime_factory TestWorkflowRuntimeFactory WorkflowRuntimeFactory", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Где тесты для WorkflowRuntimeFactory? test_workflow_runtime_factory TestWorkflowRuntimeFactory WorkflowRuntimeFactory", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 10, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 0, + "candidates_after_filter": 0 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src", + "tests" + ], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src", + "tests" + ], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 10, + "candidates_after_filter": 10 + } + ], + "fallback": { + "used": true, + "reason": "scope_relaxed_no_hits" + }, + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "WorkflowRuntimeFactory" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "miss", + "hit_count": 0, + "fail_reason": "scope_relaxed_no_hits" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 10, + "fail_reason": null + } + ] + }, + "constraint_violations": [ + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C1_SYMBOL_CATALOG", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + } + ], + "timings_ms": { + "router": 1, + "symbol_resolution": 0, + "retrieval_total": 145, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 65, + "C2_DEPENDENCY_GRAPH": 58, + "C0_SOURCE_CHUNKS": 20 + }, + "merge_rank": 0, + "prompt_build": 0, + "llm_call": 1167 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 1040, + "evidence_rows": 16, + "evidence_chars": 8149 + }, + "evidence_summary": [ + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 10, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_find_tests_ru_v4", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "WorkflowRuntimeFactory" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 16, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-v2-find-tests-workflow-runtime-factory-negative", + "mode": "full_chain", + "run_started_at": "2026-03-12T14:38:57", + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Где тесты для WorkflowRuntimeFactory?", + "normalized_query": "Где тесты для WorkflowRuntimeFactory?" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Где тесты для WorkflowRuntimeFactory?" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Где тесты для WorkflowRuntimeFactory?" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "WorkflowRuntimeFactory" + ], + "keyword_hints": [ + "WorkflowRuntimeFactory" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "test_file_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "test_symbol_patterns": [ + "test_workflow_runtime_factory", + "TestWorkflowRuntimeFactory", + "WorkflowRuntimeFactory" + ], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 1 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Где тесты для WorkflowRuntimeFactory?" + }, + "output": { + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "WorkflowRuntimeFactory" + ], + "confidence": 0.0 + }, + "rag_count": 16, + "rag_rows": [ + { + "path": "tests/test_business_control_actions.py", + "content": "test_actions_stop_busy_worker_before_timeout\n -> BlockingRoutine\n -> BlockingRoutine.__init__\n -> BlockingRoutine._release\n -> BlockingRoutine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_actions_stop_busy_worker_before_timeout:dataflow_slice", + "span_start": 43, + "span_end": 212, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "8bd726155ba387d3579763ee84dfd2f9a90bc917da88f3b2e89416ab5c1254d6", + "edge_type": "dataflow_slice", + "src_symbol_id": "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "src_qname": "test_actions_stop_busy_worker_before_timeout", + "dst_symbol_id": "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04", + "dst_ref": "BlockingRoutine.run", + "resolution": "resolved", + "slice_id": "8bd726155ba387d3579763ee84dfd2f9a90bc917da88f3b2e89416ab5c1254d6", + "root_symbol_id": "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "path_symbols": [ + "test_actions_stop_busy_worker_before_timeout", + "BlockingRoutine", + "BlockingRoutine.__init__", + "BlockingRoutine._release", + "BlockingRoutine.run" + ], + "path_symbol_ids": [ + "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "a3349c5bc65e4003a4bbd6a8dbb7a54c337e12d1aed930caa701b12e520f1e67", + "486deeed3043c6db985aef258e96ddc67aa53608e67a83962fbd2471f649ddf1", + "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_worker_wakes_up_with_configured_interval\n -> ScenarioWorker\n -> ScenarioWorker.__init__\n -> ScenarioWorker._name\n -> ScenarioWorker.name", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_worker_wakes_up_with_configured_interval:dataflow_slice", + "span_start": 52, + "span_end": 166, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "2fd137f5852febe907f44d3b3e4ea430f89ccfe962ae1442a16ab9df64c8f76c", + "edge_type": "dataflow_slice", + "src_symbol_id": "65f877f78191d65e6a752e41cedc70ebc784c266804a55c1c56440336e1f0d6e", + "src_qname": "test_worker_wakes_up_with_configured_interval", + "dst_symbol_id": "da022da2c49fd9cfd09d6e6da6bbd59aaa7d28efd669ce8444e88d327ddec2fc", + "dst_ref": "ScenarioWorker.name", + "resolution": "resolved", + "slice_id": "2fd137f5852febe907f44d3b3e4ea430f89ccfe962ae1442a16ab9df64c8f76c", + "root_symbol_id": "65f877f78191d65e6a752e41cedc70ebc784c266804a55c1c56440336e1f0d6e", + "path_symbols": [ + "test_worker_wakes_up_with_configured_interval", + "ScenarioWorker", + "ScenarioWorker.__init__", + "ScenarioWorker._name", + "ScenarioWorker.name" + ], + "path_symbol_ids": [ + "65f877f78191d65e6a752e41cedc70ebc784c266804a55c1c56440336e1f0d6e", + "9a1d08a7eb1831c9f2e0db361b5207f036e477c160773ae08c0b287239785c52", + "9c20be046ba06644d1432e0f20eb223663d2b116ee7d91fdc62bc68323f2e593", + "da022da2c49fd9cfd09d6e6da6bbd59aaa7d28efd669ce8444e88d327ddec2fc" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_actions_stop_busy_worker_before_timeout\n -> BlockingRoutine\n -> BlockingRoutine.__init__\n -> BlockingRoutine._started\n -> BlockingRoutine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_actions_stop_busy_worker_before_timeout:dataflow_slice", + "span_start": 42, + "span_end": 212, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "f9bcce108870e49afa8b32d4625115a10707a3b0e7473179e958e5752bf258b4", + "edge_type": "dataflow_slice", + "src_symbol_id": "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "src_qname": "test_actions_stop_busy_worker_before_timeout", + "dst_symbol_id": "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04", + "dst_ref": "BlockingRoutine.run", + "resolution": "resolved", + "slice_id": "f9bcce108870e49afa8b32d4625115a10707a3b0e7473179e958e5752bf258b4", + "root_symbol_id": "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "path_symbols": [ + "test_actions_stop_busy_worker_before_timeout", + "BlockingRoutine", + "BlockingRoutine.__init__", + "BlockingRoutine._started", + "BlockingRoutine.run" + ], + "path_symbol_ids": [ + "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "a3349c5bc65e4003a4bbd6a8dbb7a54c337e12d1aed930caa701b12e520f1e67", + "486deeed3043c6db985aef258e96ddc67aa53608e67a83962fbd2471f649ddf1", + "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_actions_stop_busy_worker_after_timeout\n -> BlockingRoutine\n -> BlockingRoutine.__init__\n -> BlockingRoutine._started\n -> BlockingRoutine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_actions_stop_busy_worker_after_timeout:dataflow_slice", + "span_start": 42, + "span_end": 238, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "8e7db3d2a9226f1c1d9942ac6373cfcafa0d2276758ddb8a3d3c455a3d58024d", + "edge_type": "dataflow_slice", + "src_symbol_id": "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "src_qname": "test_actions_stop_busy_worker_after_timeout", + "dst_symbol_id": "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04", + "dst_ref": "BlockingRoutine.run", + "resolution": "resolved", + "slice_id": "8e7db3d2a9226f1c1d9942ac6373cfcafa0d2276758ddb8a3d3c455a3d58024d", + "root_symbol_id": "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "path_symbols": [ + "test_actions_stop_busy_worker_after_timeout", + "BlockingRoutine", + "BlockingRoutine.__init__", + "BlockingRoutine._started", + "BlockingRoutine.run" + ], + "path_symbol_ids": [ + "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "a3349c5bc65e4003a4bbd6a8dbb7a54c337e12d1aed930caa701b12e520f1e67", + "486deeed3043c6db985aef258e96ddc67aa53608e67a83962fbd2471f649ddf1", + "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_actions_stop_busy_worker_after_timeout\n -> BlockingRoutine\n -> BlockingRoutine.__init__\n -> BlockingRoutine._release\n -> BlockingRoutine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_actions_stop_busy_worker_after_timeout:dataflow_slice", + "span_start": 43, + "span_end": 238, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "b59da9da82f9dfc8a9b695a08213786385da1ae9e17561ec3a0450a574a8cb39", + "edge_type": "dataflow_slice", + "src_symbol_id": "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "src_qname": "test_actions_stop_busy_worker_after_timeout", + "dst_symbol_id": "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04", + "dst_ref": "BlockingRoutine.run", + "resolution": "resolved", + "slice_id": "b59da9da82f9dfc8a9b695a08213786385da1ae9e17561ec3a0450a574a8cb39", + "root_symbol_id": "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "path_symbols": [ + "test_actions_stop_busy_worker_after_timeout", + "BlockingRoutine", + "BlockingRoutine.__init__", + "BlockingRoutine._release", + "BlockingRoutine.run" + ], + "path_symbol_ids": [ + "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "a3349c5bc65e4003a4bbd6a8dbb7a54c337e12d1aed930caa701b12e520f1e67", + "486deeed3043c6db985aef258e96ddc67aa53608e67a83962fbd2471f649ddf1", + "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_actions_start_stop_and_health_when_worker_is_idle\n -> ScenarioWorker\n -> ScenarioWorker.__init__\n -> ScenarioWorker._name\n -> ScenarioWorker.name", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_actions_start_stop_and_health_when_worker_is_idle:dataflow_slice", + "span_start": 52, + "span_end": 182, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "8fb3c9e775ad1cfa91eebb8b8cef367dc53c923584236122235446e0579b468e", + "edge_type": "dataflow_slice", + "src_symbol_id": "09a78d8eb31c2da14fee58da53b5da7a5065a4c23b6300748a6d44517a5284b8", + "src_qname": "test_actions_start_stop_and_health_when_worker_is_idle", + "dst_symbol_id": "da022da2c49fd9cfd09d6e6da6bbd59aaa7d28efd669ce8444e88d327ddec2fc", + "dst_ref": "ScenarioWorker.name", + "resolution": "resolved", + "slice_id": "8fb3c9e775ad1cfa91eebb8b8cef367dc53c923584236122235446e0579b468e", + "root_symbol_id": "09a78d8eb31c2da14fee58da53b5da7a5065a4c23b6300748a6d44517a5284b8", + "path_symbols": [ + "test_actions_start_stop_and_health_when_worker_is_idle", + "ScenarioWorker", + "ScenarioWorker.__init__", + "ScenarioWorker._name", + "ScenarioWorker.name" + ], + "path_symbol_ids": [ + "09a78d8eb31c2da14fee58da53b5da7a5065a4c23b6300748a6d44517a5284b8", + "9a1d08a7eb1831c9f2e0db361b5207f036e477c160773ae08c0b287239785c52", + "9c20be046ba06644d1432e0f20eb223663d2b116ee7d91fdc62bc68323f2e593", + "da022da2c49fd9cfd09d6e6da6bbd59aaa7d28efd669ce8444e88d327ddec2fc" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def test_actions_start_stop_and_health_when_worker_is_idle() -> None:\n runtime, base_url = _build_runtime(ScenarioWorker(\"idle-worker\", IntervalRoutine(), interval=0.2))\n try:\n stop_status, stop_payload = _http_call_json(base_url, \"/actions/stop\", method=\"POST\")\n assert stop_status == 200\n assert isinstance(stop_payload.get(\"detail\"), dict)\n assert stop_payload[\"detail\"][\"timed_out\"] is False\n assert stop_payload[\"detail\"][\"state\"] == \"stopped\"\n\n health_stopped_status, health_stopped_payload = _http_call_json(base_url, \"/health\")\n assert health_stopped_status == 503\n assert health_stopped_payload[\"state\"] == \"stopped\"\n assert health_stopped_payload[\"status\"] == \"unhealthy\"\n\n start_status, start_payload = _http_call_json(base_url, \"/actions/start\", method=\"POST\")\n assert start_status == 200\n assert isinstance(start_payload.get(\"detail\"), dict)\n assert start_payload[\"detail\"][\"timed_out\"] is False\n assert start_payload[\"detail\"][\"state\"] in {\"idle\", \"busy\"}\n\n health_started_status, health_started_payload = _http_call_json(base_url, \"/health\")\n assert health_started_status == 200\n assert health_started_payload[\"status\"] == \"ok\"\n assert health_started_payload[\"state\"] in {\"idle\", \"busy\"}\n finally:\n runtime.stop()", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:test_actions_start_stop_and_health_when_worker_is_idle", + "span_start": 181, + "span_end": 206, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 8, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _poll_until_stopped(base_url: str, timeout: float = 2.0) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n _, payload = _http_call_json(base_url, \"/actions/status\")\n if payload.get(\"detail\") == \"stopped\":\n return True\n sleep(0.05)\n return False", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_poll_until_stopped", + "span_start": 144, + "span_end": 151, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 5, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def test_worker_wakes_up_with_configured_interval() -> None:\n interval = 0.15\n routine = IntervalRoutine()\n worker = ScenarioWorker(\"interval-worker\", routine, interval=interval)\n runtime = RuntimeManager()\n runtime.register_module(WorkerModule(worker))\n\n runtime.start()\n try:\n assert routine.wait_runs(count=3, timeout=2.0) is True\n finally:\n runtime.stop()\n\n deltas = routine.deltas()\n assert len(deltas) >= 2\n assert all(delta >= interval * 0.7 for delta in deltas[:2])", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:test_worker_wakes_up_with_configured_interval", + "span_start": 163, + "span_end": 178, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 7, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class BlockingRoutine:\n def __init__(self, started: Event, release: Event) -> None:\n self._started = started\n self._release = release\n\n def run(self) -> None:\n self._started.set()\n self._release.wait(timeout=5.0)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:BlockingRoutine", + "span_start": 40, + "span_end": 47, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class WorkerModule(ApplicationModule):\n def __init__(self, worker: Worker) -> None:\n self._worker = worker\n\n @property\n def name(self) -> str:\n return \"business-tests\"\n\n def register(self, registry: ModuleRegistry) -> None:\n registry.add_worker(self._worker)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:WorkerModule", + "span_start": 113, + "span_end": 122, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 3, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _http_call_json(\n base_url: str,\n path: str,\n *,\n method: str = \"GET\",\n headers: dict[str, str] | None = None,\n) -> tuple[int, dict[str, object]]:\n request = Request(f\"{base_url}{path}\", method=method, headers=headers or {})\n try:\n with urlopen(request, timeout=15.0) as response:\n status = response.status\n body = response.read()\n except HTTPError as error:\n status = error.code\n body = error.read()\n payload = json.loads(body.decode(\"utf-8\"))\n return status, payload", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_http_call_json", + "span_start": 125, + "span_end": 141, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 4, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _build_runtime(worker: Worker, *, control_timeout: int = 1) -> tuple[RuntimeManager, str]:\n runtime = RuntimeManager()\n channel = HttpControlChannel(host=\"127.0.0.1\", port=0, timeout=control_timeout)\n runtime.control_plane.register_channel(channel)\n runtime.register_module(WorkerModule(worker))\n runtime.start()\n return runtime, f\"http://127.0.0.1:{channel.port}\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_build_runtime", + "span_start": 154, + "span_end": 160, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 6, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class ScenarioWorker(Worker):\n def __init__(self, name: str, routine: object, *, interval: float = 0.05) -> None:\n self._name = name\n self._routine = routine\n self._interval = interval\n self._thread: Thread | None = None\n self._stop_requested = Event()\n self._in_flight = 0\n self._runs = 0\n self._lock = Lock()\n\n @property\n def name(self) -> str:\n return self._name\n\n @property\n def critical(self) -> bool:\n return True\n\n def start(self) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._stop_requested.clear()\n self._thread = Thread(target=self._loop, name=f\"{self._name}-thread\", daemon=True)\n self._thread.start()\n\n def stop(self, force: bool = False) -> None:\n self._stop_requested.set()\n\n def health(self) -> WorkerHealth:\n return WorkerHealth(name=self.name, status=\"ok\", critical=True, meta={\"runs\": self._runs})\n\n def status(self) -> WorkerStatus:\n thread_alive = self._thread is not None and self._thread.is_alive()\n with self._lock:\n in_flight = self._in_flight\n runs = self._runs\n if not thread_alive:\n state = \"stopped\"\n elif self._stop_requested.is_set():\n state = \"stopping\"\n elif in_flight > 0:\n state = \"busy\"\n else:\n state = \"idle\"\n return WorkerStatus(name=self.name, state=state, in_flight=in_flight, meta={\"runs\": runs})\n\n def _loop(self) -> None:\n while not self._stop_requested.is_set():\n with self._lock:\n self._in_flight += 1\n try:\n self._routine.run()\n with self._lock:\n self._runs += 1\n finally:\n with self._lock:\n self._in_flight -= 1\n if self._stop_requested.is_set():\n return\n sleep(self._interval)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:ScenarioWorker", + "span_start": 50, + "span_end": 110, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 2, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class IntervalRoutine:\n calls: list[float] = field(default_factory=list)\n _lock: Lock = field(default_factory=Lock)\n\n def run(self) -> None:\n with self._lock:\n self.calls.append(monotonic())\n\n def wait_runs(self, count: int, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n with self._lock:\n if len(self.calls) >= count:\n return True\n sleep(0.01)\n return False\n\n def deltas(self) -> list[float]:\n with self._lock:\n return [self.calls[index + 1] - self.calls[index] for index in range(len(self.calls) - 1)]", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:IntervalRoutine", + "span_start": 18, + "span_end": 37, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def test_actions_stop_busy_worker_before_timeout() -> None:\n started = Event()\n release = Event()\n runtime, base_url = _build_runtime(ScenarioWorker(\"busy-worker\", BlockingRoutine(started, release)))\n assert started.wait(timeout=1.0) is True\n\n def release_later() -> None:\n sleep(0.2)\n release.set()\n\n Thread(target=release_later, daemon=True).start()\n try:\n status, payload = _http_call_json(base_url, \"/actions/stop\", method=\"POST\")\n assert status == 200\n assert isinstance(payload.get(\"detail\"), dict)\n assert payload[\"detail\"][\"timed_out\"] is False\n assert payload[\"detail\"][\"state\"] == \"stopped\"\n\n health_status, health_payload = _http_call_json(base_url, \"/health\")\n assert health_status == 503\n assert health_payload[\"status\"] == \"unhealthy\"\n assert health_payload[\"state\"] == \"stopped\"\n finally:\n runtime.stop()", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:test_actions_stop_busy_worker_before_timeout", + "span_start": 209, + "span_end": 232, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 9, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C0_SOURCE_CHUNKS": 10 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src", + "tests" + ], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src", + "tests" + ], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "WorkflowRuntimeFactory", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Где тесты для WorkflowRuntimeFactory? test_workflow_runtime_factory TestWorkflowRuntimeFactory WorkflowRuntimeFactory", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Где тесты для WorkflowRuntimeFactory? test_workflow_runtime_factory TestWorkflowRuntimeFactory WorkflowRuntimeFactory", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 10, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 0, + "candidates_after_filter": 0 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src", + "tests" + ], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src", + "tests" + ], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 10, + "candidates_after_filter": 10 + } + ], + "fallback": { + "used": true, + "reason": "scope_relaxed_no_hits" + }, + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "WorkflowRuntimeFactory" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "miss", + "hit_count": 0, + "fail_reason": "scope_relaxed_no_hits" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 10, + "fail_reason": null + } + ] + }, + "constraint_violations": [ + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C1_SYMBOL_CATALOG", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + } + ], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 145, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 65, + "C2_DEPENDENCY_GRAPH": 58, + "C0_SOURCE_CHUNKS": 20 + }, + "merge_rank": 0 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Где тесты для WorkflowRuntimeFactory?", + "rag_count": 16 + }, + "output": { + "llm_answer": "Прямых тестов конкретно для `WorkflowRuntimeFactory` в предоставленном контексте не обнаружено." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 1040, + "evidence_rows": 16, + "evidence_chars": 8149 + }, + "evidence_summary": [ + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 10, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_find_tests_ru_v4", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 1167 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-find-tests-workflow-runtime-factory-negative.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-find-tests-workflow-runtime-factory-negative.md new file mode 100644 index 0000000..b2f5045 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-find-tests-workflow-runtime-factory-negative.md @@ -0,0 +1,32 @@ +# plba-v2-find-tests-workflow-runtime-factory-negative + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Где тесты для WorkflowRuntimeFactory? + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 16, + "llm_answer": "Прямых тестов конкретно для `WorkflowRuntimeFactory` в предоставленном контексте не обнаружено.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "WorkflowRuntimeFactory" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-open-file-nonexistent.json b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-open-file-nonexistent.json new file mode 100644 index 0000000..ca6ffd0 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-open-file-nonexistent.json @@ -0,0 +1,441 @@ +{ + "case_id": "plba-v2-open-file-nonexistent", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 0, + "llm_answer": "Файл src/app_runtime/core/missing_runtime.py не найден.", + "answer_mode": "degraded", + "path_scope": [ + "src/app_runtime/core/missing_runtime.py" + ], + "symbol_candidates": [], + "layers": [ + "C0_SOURCE_CHUNKS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-v2-open-file-nonexistent", + "text": "Открой файл src/app_runtime/core/missing_runtime.py", + "mode": "full_chain", + "run_started_at": "2026-03-12T14:38:57", + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Открой файл src/app_runtime/core/missing_runtime.py", + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [], + "confidence": 0.0 + }, + "rag_count": 0, + "rag_rows": [], + "llm_answer": "Файл src/app_runtime/core/missing_runtime.py не найден.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [], + "evidence_sufficient": false + }, + "llm": { + "answer_status": "degraded", + "groundedness": "weakly_grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "unknown", + "symbol_candidates": [], + "keyword_hints": [], + "path_hints": [ + "src/app_runtime/core/missing_runtime.py" + ], + "path_scope": [ + "src/app_runtime/core/missing_runtime.py" + ], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/app_runtime/core/missing_runtime.py" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": false, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C0_SOURCE_CHUNKS": 200 + }, + "filters_by_layer": { + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src/app_runtime/core/missing_runtime.py" + ], + "include_globs": [], + "exclude_globs": [], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": null, + "workspace_id": null, + "returned_repo_ids": [], + "returned_workspace_ids": [] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Открой файл src/app_runtime/core/missing_runtime.py", + "path_scope": [ + "src/app_runtime/core/missing_runtime.py" + ], + "include_globs": [], + "exclude_globs": [], + "prefer_globs": [], + "top_k": 200, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src/app_runtime/core/missing_runtime.py" + ], + "normalized_include_globs": [], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 0, + "candidates_after_filter": 0 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [] + }, + "layers": [ + { + "layer": "C0_SOURCE_CHUNKS", + "status": "miss", + "hit_count": 0, + "fail_reason": null + } + ] + }, + "constraint_violations": [ + { + "type": "PATH_SCOPE_NOT_SATISFIED", + "severity": "error", + "details": { + "path_scope": [ + "src/app_runtime/core/missing_runtime.py" + ], + "returned_paths": [] + }, + "suggested_fix": "Use exact path_scope retrieval and disable broad fallback for OPEN_FILE." + }, + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C0_SOURCE_CHUNKS", + "requested_layers": [ + "C0_SOURCE_CHUNKS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + } + ], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 11, + "retrieval_by_layer": { + "C0_SOURCE_CHUNKS": 11 + }, + "merge_rank": 0, + "prompt_build": 0, + "llm_call": 0 + }, + "prompt": null, + "answer_policy": { + "short_circuit": true, + "answer_mode": "degraded", + "failure_reason": "file_not_found" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [], + "path_scope": [ + "src/app_runtime/core/missing_runtime.py" + ] + }, + "llm": { + "used_evidence_count": 0, + "missing_evidence_reason": "file_not_found" + } + }, + "run_info": { + "case_id": "plba-v2-open-file-nonexistent", + "mode": "full_chain", + "run_started_at": "2026-03-12T14:38:57", + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Открой файл src/app_runtime/core/missing_runtime.py", + "normalized_query": "Открой файл src/app_runtime/core/missing_runtime.py" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Открой файл src/app_runtime/core/missing_runtime.py" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Открой файл src/app_runtime/core/missing_runtime.py" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "unknown", + "symbol_candidates": [], + "keyword_hints": [], + "path_hints": [ + "src/app_runtime/core/missing_runtime.py" + ], + "path_scope": [ + "src/app_runtime/core/missing_runtime.py" + ], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/app_runtime/core/missing_runtime.py" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": false, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Открой файл src/app_runtime/core/missing_runtime.py" + }, + "output": { + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [], + "confidence": 0.0 + }, + "rag_count": 0, + "rag_rows": [] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C0_SOURCE_CHUNKS": 200 + }, + "filters_by_layer": { + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src/app_runtime/core/missing_runtime.py" + ], + "include_globs": [], + "exclude_globs": [], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": null, + "workspace_id": null, + "returned_repo_ids": [], + "returned_workspace_ids": [] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Открой файл src/app_runtime/core/missing_runtime.py", + "path_scope": [ + "src/app_runtime/core/missing_runtime.py" + ], + "include_globs": [], + "exclude_globs": [], + "prefer_globs": [], + "top_k": 200, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src/app_runtime/core/missing_runtime.py" + ], + "normalized_include_globs": [], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 0, + "candidates_after_filter": 0 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [] + }, + "layers": [ + { + "layer": "C0_SOURCE_CHUNKS", + "status": "miss", + "hit_count": 0, + "fail_reason": null + } + ] + }, + "constraint_violations": [ + { + "type": "PATH_SCOPE_NOT_SATISFIED", + "severity": "error", + "details": { + "path_scope": [ + "src/app_runtime/core/missing_runtime.py" + ], + "returned_paths": [] + }, + "suggested_fix": "Use exact path_scope retrieval and disable broad fallback for OPEN_FILE." + }, + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C0_SOURCE_CHUNKS", + "requested_layers": [ + "C0_SOURCE_CHUNKS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + } + ], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 11, + "retrieval_by_layer": { + "C0_SOURCE_CHUNKS": 11 + }, + "merge_rank": 0 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Открой файл src/app_runtime/core/missing_runtime.py", + "rag_count": 0 + }, + "output": { + "llm_answer": "Файл src/app_runtime/core/missing_runtime.py не найден." + }, + "diagnostics": { + "prompt": null, + "timings_ms": { + "prompt_build": 0, + "llm_call": 0 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-open-file-nonexistent.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-open-file-nonexistent.md new file mode 100644 index 0000000..ab3d085 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-open-file-nonexistent.md @@ -0,0 +1,30 @@ +# plba-v2-open-file-nonexistent + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Открой файл src/app_runtime/core/missing_runtime.py + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 0, + "llm_answer": "Файл src/app_runtime/core/missing_runtime.py не найден.", + "answer_mode": "degraded", + "path_scope": [ + "src/app_runtime/core/missing_runtime.py" + ], + "symbol_candidates": [], + "layers": [ + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-open-file-public-api.json b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-open-file-public-api.json new file mode 100644 index 0000000..5ef153a --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-open-file-public-api.json @@ -0,0 +1,492 @@ +{ + "case_id": "plba-v2-open-file-public-api", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 1, + "llm_answer": "В файле src/plba/__init__.py видны следующие импорты и объявления:\nИмпорты:\n- plba.bootstrap.create_runtime\n- plba.config.ConfigFileLoader, FileConfigProvider\n- plba.control.ControlActionSet, ControlChannel, ControlPlaneService, HttpControlChannel\n- plba.contracts.ApplicationModule, ConfigProvider, HealthContributor, TraceContext, TraceContextRecord, TraceLogMessage, TraceTransport, Worker, WorkerHealth, WorkerStatus\n- plba.core.ConfigurationManager, RuntimeManager, ServiceContainer\n- plba.health.HealthRegistry\n- plba.logging.LogManager\n- plba.queue.InMemoryTaskQueue\n- plba.tracing.MySqlTraceTransport, NoOpTraceTransport, TraceService\n- plba.workflow.StepResult, WorkflowContext, WorkflowDefinition, WorkflowEngine, WorkflowEngineHooks, WorkflowNode, WorkflowRuntimeFactory, WorkflowStep\n- plba.workers.WorkerSupervisor\n\nОбъявления:\n- __all__ содержит список экспортированных элементов.", + "answer_mode": "answered", + "path_scope": [ + "src/plba/__init__.py" + ], + "symbol_candidates": [], + "layers": [ + "C0_SOURCE_CHUNKS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-v2-open-file-public-api", + "text": "Открой файл src/plba/__init__.py", + "mode": "full_chain", + "run_started_at": "2026-03-12T14:38:57", + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Открой файл src/plba/__init__.py", + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [], + "confidence": 0.0 + }, + "rag_count": 1, + "rag_rows": [ + { + "path": "src/plba/__init__.py", + "content": "from plba.bootstrap import create_runtime\nfrom plba.config import ConfigFileLoader, FileConfigProvider\nfrom plba.control import ControlActionSet, ControlChannel, ControlPlaneService, HttpControlChannel\nfrom plba.contracts import (\n ApplicationModule,\n ConfigProvider,\n HealthContributor,\n TraceContext,\n TraceContextRecord,\n TraceLogMessage,\n TraceTransport,\n Worker,\n WorkerHealth,\n WorkerStatus,\n)\nfrom plba.core import ConfigurationManager, RuntimeManager, ServiceContainer\nfrom plba.health import HealthRegistry\nfrom plba.logging import LogManager\nfrom plba.queue import InMemoryTaskQueue\nfrom plba.tracing import MySqlTraceTransport, NoOpTraceTransport, TraceService\nfrom plba.workflow import (\n StepResult,\n WorkflowContext,\n WorkflowDefinition,\n WorkflowEngine,\n WorkflowEngineHooks,\n WorkflowNode,\n WorkflowRuntimeFactory,\n WorkflowStep,\n)\nfrom plba.workers import WorkerSupervisor\n\n__all__ = [\n \"ApplicationModule\",\n \"ConfigFileLoader\",\n \"ConfigProvider\",\n \"ConfigurationManager\",\n \"ControlActionSet\",\n \"ControlChannel\",\n \"ControlPlaneService\",\n \"create_runtime\",\n \"FileConfigProvider\",\n \"HealthContributor\",\n \"HealthRegistry\",\n \"HttpControlChannel\",\n \"InMemoryTaskQueue\",\n \"LogManager\",\n \"MySqlTraceTransport\",\n \"NoOpTraceTransport\",\n \"RuntimeManager\",\n \"ServiceContainer\",\n \"TraceContext\",\n \"TraceContextRecord\",\n \"TraceLogMessage\",\n \"TraceService\",\n \"TraceTransport\",\n \"StepResult\",\n \"Worker\",\n \"WorkerHealth\",\n \"WorkerStatus\",\n \"WorkflowContext\",\n \"WorkflowDefinition\",\n \"WorkflowEngine\",\n \"WorkflowEngineHooks\",\n \"WorkflowNode\",\n \"WorkflowRuntimeFactory\",\n \"WorkflowStep\",\n \"WorkerSupervisor\",\n]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/__init__.py:1-69", + "span_start": 1, + "span_end": 69, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "В файле src/plba/__init__.py видны следующие импорты и объявления:\nИмпорты:\n- plba.bootstrap.create_runtime\n- plba.config.ConfigFileLoader, FileConfigProvider\n- plba.control.ControlActionSet, ControlChannel, ControlPlaneService, HttpControlChannel\n- plba.contracts.ApplicationModule, ConfigProvider, HealthContributor, TraceContext, TraceContextRecord, TraceLogMessage, TraceTransport, Worker, WorkerHealth, WorkerStatus\n- plba.core.ConfigurationManager, RuntimeManager, ServiceContainer\n- plba.health.HealthRegistry\n- plba.logging.LogManager\n- plba.queue.InMemoryTaskQueue\n- plba.tracing.MySqlTraceTransport, NoOpTraceTransport, TraceService\n- plba.workflow.StepResult, WorkflowContext, WorkflowDefinition, WorkflowEngine, WorkflowEngineHooks, WorkflowNode, WorkflowRuntimeFactory, WorkflowStep\n- plba.workers.WorkerSupervisor\n\nОбъявления:\n- __all__ содержит список экспортированных элементов.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "unknown", + "symbol_candidates": [], + "keyword_hints": [], + "path_hints": [ + "src/plba/__init__.py" + ], + "path_scope": [ + "src/plba/__init__.py" + ], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/plba/__init__.py" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": false, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C0_SOURCE_CHUNKS": 200 + }, + "filters_by_layer": { + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src/plba/__init__.py" + ], + "include_globs": [], + "exclude_globs": [], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Открой файл src/plba/__init__.py", + "path_scope": [ + "src/plba/__init__.py" + ], + "include_globs": [], + "exclude_globs": [], + "prefer_globs": [], + "top_k": 200, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src/plba/__init__.py" + ], + "normalized_include_globs": [], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [] + }, + "layers": [ + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 8, + "retrieval_by_layer": { + "C0_SOURCE_CHUNKS": 8 + }, + "merge_rank": 0, + "prompt_build": 0, + "llm_call": 1874 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 673, + "evidence_rows": 1, + "evidence_chars": 1768 + }, + "evidence_summary": [ + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_open_file_ru_v4", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [], + "path_scope": [ + "src/plba/__init__.py" + ] + }, + "llm": { + "used_evidence_count": 1, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-v2-open-file-public-api", + "mode": "full_chain", + "run_started_at": "2026-03-12T14:38:57", + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Открой файл src/plba/__init__.py", + "normalized_query": "Открой файл src/plba/__init__.py" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Открой файл src/plba/__init__.py" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Открой файл src/plba/__init__.py" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "unknown", + "symbol_candidates": [], + "keyword_hints": [], + "path_hints": [ + "src/plba/__init__.py" + ], + "path_scope": [ + "src/plba/__init__.py" + ], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/plba/__init__.py" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": false, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Открой файл src/plba/__init__.py" + }, + "output": { + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [], + "confidence": 0.0 + }, + "rag_count": 1, + "rag_rows": [ + { + "path": "src/plba/__init__.py", + "content": "from plba.bootstrap import create_runtime\nfrom plba.config import ConfigFileLoader, FileConfigProvider\nfrom plba.control import ControlActionSet, ControlChannel, ControlPlaneService, HttpControlChannel\nfrom plba.contracts import (\n ApplicationModule,\n ConfigProvider,\n HealthContributor,\n TraceContext,\n TraceContextRecord,\n TraceLogMessage,\n TraceTransport,\n Worker,\n WorkerHealth,\n WorkerStatus,\n)\nfrom plba.core import ConfigurationManager, RuntimeManager, ServiceContainer\nfrom plba.health import HealthRegistry\nfrom plba.logging import LogManager\nfrom plba.queue import InMemoryTaskQueue\nfrom plba.tracing import MySqlTraceTransport, NoOpTraceTransport, TraceService\nfrom plba.workflow import (\n StepResult,\n WorkflowContext,\n WorkflowDefinition,\n WorkflowEngine,\n WorkflowEngineHooks,\n WorkflowNode,\n WorkflowRuntimeFactory,\n WorkflowStep,\n)\nfrom plba.workers import WorkerSupervisor\n\n__all__ = [\n \"ApplicationModule\",\n \"ConfigFileLoader\",\n \"ConfigProvider\",\n \"ConfigurationManager\",\n \"ControlActionSet\",\n \"ControlChannel\",\n \"ControlPlaneService\",\n \"create_runtime\",\n \"FileConfigProvider\",\n \"HealthContributor\",\n \"HealthRegistry\",\n \"HttpControlChannel\",\n \"InMemoryTaskQueue\",\n \"LogManager\",\n \"MySqlTraceTransport\",\n \"NoOpTraceTransport\",\n \"RuntimeManager\",\n \"ServiceContainer\",\n \"TraceContext\",\n \"TraceContextRecord\",\n \"TraceLogMessage\",\n \"TraceService\",\n \"TraceTransport\",\n \"StepResult\",\n \"Worker\",\n \"WorkerHealth\",\n \"WorkerStatus\",\n \"WorkflowContext\",\n \"WorkflowDefinition\",\n \"WorkflowEngine\",\n \"WorkflowEngineHooks\",\n \"WorkflowNode\",\n \"WorkflowRuntimeFactory\",\n \"WorkflowStep\",\n \"WorkerSupervisor\",\n]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/__init__.py:1-69", + "span_start": 1, + "span_end": 69, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C0_SOURCE_CHUNKS": 200 + }, + "filters_by_layer": { + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src/plba/__init__.py" + ], + "include_globs": [], + "exclude_globs": [], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Открой файл src/plba/__init__.py", + "path_scope": [ + "src/plba/__init__.py" + ], + "include_globs": [], + "exclude_globs": [], + "prefer_globs": [], + "top_k": 200, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src/plba/__init__.py" + ], + "normalized_include_globs": [], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [] + }, + "layers": [ + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 8, + "retrieval_by_layer": { + "C0_SOURCE_CHUNKS": 8 + }, + "merge_rank": 0 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Открой файл src/plba/__init__.py", + "rag_count": 1 + }, + "output": { + "llm_answer": "В файле src/plba/__init__.py видны следующие импорты и объявления:\nИмпорты:\n- plba.bootstrap.create_runtime\n- plba.config.ConfigFileLoader, FileConfigProvider\n- plba.control.ControlActionSet, ControlChannel, ControlPlaneService, HttpControlChannel\n- plba.contracts.ApplicationModule, ConfigProvider, HealthContributor, TraceContext, TraceContextRecord, TraceLogMessage, TraceTransport, Worker, WorkerHealth, WorkerStatus\n- plba.core.ConfigurationManager, RuntimeManager, ServiceContainer\n- plba.health.HealthRegistry\n- plba.logging.LogManager\n- plba.queue.InMemoryTaskQueue\n- plba.tracing.MySqlTraceTransport, NoOpTraceTransport, TraceService\n- plba.workflow.StepResult, WorkflowContext, WorkflowDefinition, WorkflowEngine, WorkflowEngineHooks, WorkflowNode, WorkflowRuntimeFactory, WorkflowStep\n- plba.workers.WorkerSupervisor\n\nОбъявления:\n- __all__ содержит список экспортированных элементов." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 673, + "evidence_rows": 1, + "evidence_chars": 1768 + }, + "evidence_summary": [ + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_open_file_ru_v4", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 1874 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-open-file-public-api.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-open-file-public-api.md new file mode 100644 index 0000000..cef8d0d --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-open-file-public-api.md @@ -0,0 +1,30 @@ +# plba-v2-open-file-public-api + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Открой файл src/plba/__init__.py + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 1, + "llm_answer": "В файле src/plba/__init__.py видны следующие импорты и объявления:\nИмпорты:\n- plba.bootstrap.create_runtime\n- plba.config.ConfigFileLoader, FileConfigProvider\n- plba.control.ControlActionSet, ControlChannel, ControlPlaneService, HttpControlChannel\n- plba.contracts.ApplicationModule, ConfigProvider, HealthContributor, TraceContext, TraceContextRecord, TraceLogMessage, TraceTransport, Worker, WorkerHealth, WorkerStatus\n- plba.core.ConfigurationManager, RuntimeManager, ServiceContainer\n- plba.health.HealthRegistry\n- plba.logging.LogManager\n- plba.queue.InMemoryTaskQueue\n- plba.tracing.MySqlTraceTransport, NoOpTraceTransport, TraceService\n- plba.workflow.StepResult, WorkflowContext, WorkflowDefinition, WorkflowEngine, WorkflowEngineHooks, WorkflowNode, WorkflowRuntimeFactory, WorkflowStep\n- plba.workers.WorkerSupervisor\n\nОбъявления:\n- __all__ содержит список экспортированных элементов.", + "answer_mode": "answered", + "path_scope": [ + "src/plba/__init__.py" + ], + "symbol_candidates": [], + "layers": [ + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-open-file-runtime.json b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-open-file-runtime.json new file mode 100644 index 0000000..9b1cfa3 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-open-file-runtime.json @@ -0,0 +1,492 @@ +{ + "case_id": "plba-v2-open-file-runtime", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 1, + "llm_answer": "В файле src/app_runtime/core/runtime.py виден класс RuntimeManager с несколькими атрибутами и методами. В конструкторе инициализируются конфигурация, сервисы, службы трассировки, здоровья, логирования и супервайзеры рабочих процессов. Также присутствуют константы для тайм-аутов действий и интервала опроса.", + "answer_mode": "answered", + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "symbol_candidates": [], + "layers": [ + "C0_SOURCE_CHUNKS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-v2-open-file-runtime", + "text": "Открой файл src/app_runtime/core/runtime.py", + "mode": "full_chain", + "run_started_at": "2026-03-12T14:38:57", + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Открой файл src/app_runtime/core/runtime.py", + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [], + "confidence": 0.0 + }, + "rag_count": 1, + "rag_rows": [ + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "В файле src/app_runtime/core/runtime.py виден класс RuntimeManager с несколькими атрибутами и методами. В конструкторе инициализируются конфигурация, сервисы, службы трассировки, здоровья, логирования и супервайзеры рабочих процессов. Также присутствуют константы для тайм-аутов действий и интервала опроса.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "unknown", + "symbol_candidates": [], + "keyword_hints": [], + "path_hints": [ + "src/app_runtime/core/runtime.py" + ], + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/app_runtime/core/runtime.py" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": false, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C0_SOURCE_CHUNKS": 200 + }, + "filters_by_layer": { + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "include_globs": [], + "exclude_globs": [], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Открой файл src/app_runtime/core/runtime.py", + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "include_globs": [], + "exclude_globs": [], + "prefer_globs": [], + "top_k": 200, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "normalized_include_globs": [], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [] + }, + "layers": [ + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 1, + "symbol_resolution": 0, + "retrieval_total": 144, + "retrieval_by_layer": { + "C0_SOURCE_CHUNKS": 144 + }, + "merge_rank": 0, + "prompt_build": 0, + "llm_call": 775 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 684, + "evidence_rows": 1, + "evidence_chars": 6265 + }, + "evidence_summary": [ + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_open_file_ru_v4", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [], + "path_scope": [ + "src/app_runtime/core/runtime.py" + ] + }, + "llm": { + "used_evidence_count": 1, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-v2-open-file-runtime", + "mode": "full_chain", + "run_started_at": "2026-03-12T14:38:57", + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Открой файл src/app_runtime/core/runtime.py", + "normalized_query": "Открой файл src/app_runtime/core/runtime.py" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Открой файл src/app_runtime/core/runtime.py" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Открой файл src/app_runtime/core/runtime.py" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "unknown", + "symbol_candidates": [], + "keyword_hints": [], + "path_hints": [ + "src/app_runtime/core/runtime.py" + ], + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/app_runtime/core/runtime.py" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": false, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 1 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Открой файл src/app_runtime/core/runtime.py" + }, + "output": { + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [], + "confidence": 0.0 + }, + "rag_count": 1, + "rag_rows": [ + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C0_SOURCE_CHUNKS": 200 + }, + "filters_by_layer": { + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "include_globs": [], + "exclude_globs": [], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Открой файл src/app_runtime/core/runtime.py", + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "include_globs": [], + "exclude_globs": [], + "prefer_globs": [], + "top_k": 200, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "normalized_include_globs": [], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [] + }, + "layers": [ + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 144, + "retrieval_by_layer": { + "C0_SOURCE_CHUNKS": 144 + }, + "merge_rank": 0 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Открой файл src/app_runtime/core/runtime.py", + "rag_count": 1 + }, + "output": { + "llm_answer": "В файле src/app_runtime/core/runtime.py виден класс RuntimeManager с несколькими атрибутами и методами. В конструкторе инициализируются конфигурация, сервисы, службы трассировки, здоровья, логирования и супервайзеры рабочих процессов. Также присутствуют константы для тайм-аутов действий и интервала опроса." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 684, + "evidence_rows": 1, + "evidence_chars": 6265 + }, + "evidence_summary": [ + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_open_file_ru_v4", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 775 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-open-file-runtime.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-open-file-runtime.md new file mode 100644 index 0000000..ef9d834 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-open-file-runtime.md @@ -0,0 +1,30 @@ +# plba-v2-open-file-runtime + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Открой файл src/app_runtime/core/runtime.py + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 1, + "llm_answer": "В файле src/app_runtime/core/runtime.py виден класс RuntimeManager с несколькими атрибутами и методами. В конструкторе инициализируются конфигурация, сервисы, службы трассировки, здоровья, логирования и супервайзеры рабочих процессов. Также присутствуют константы для тайм-аутов действий и интервала опроса.", + "answer_mode": "answered", + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "symbol_candidates": [], + "layers": [ + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-health-endpoint.json b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-health-endpoint.json new file mode 100644 index 0000000..b9ff0f3 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-health-endpoint.json @@ -0,0 +1,3084 @@ +{ + "case_id": "plba-v2-trace-flow-health-endpoint", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "TRACE_FLOW", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 26, + "llm_answer": "Когда в HttpControlAppFactory обрабатывается запрос `/health`, выполняются следующие шаги:\n\n1. Создается экземпляр FastAPI с названием \"PLBA Control API\".\n2. Добавляется middleware для логирования времени обработки каждого запроса (`log_api_call`).\n3. Обрабатывается GET-запрос к `/health`.\n - Вызывается провайдер здоровья `health_provider`, который возвращает асинхронно объект типа `HealthPayload`.\n - Проверяется статус здоровья (\"ok\" или иное). В зависимости от статуса устанавливается соответствующий HTTP-код ответа (200 или 503).\n - Возвращается JSON-ответ с содержимым `HealthPayload`.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "health", + "HttpControlAppFactory" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-v2-trace-flow-health-endpoint", + "text": "Покажи как проходит запрос /health в HttpControlAppFactory", + "mode": "full_chain", + "run_started_at": "2026-03-12T14:38:57", + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Покажи как проходит запрос /health в HttpControlAppFactory", + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "HttpControlAppFactory", + "alternatives": [ + "HttpControlAppFactory", + "ControlActionSet", + "HealthContributor.health", + "HealthContributor" + ], + "confidence": 0.99 + }, + "rag_count": 26, + "rag_rows": [ + { + "path": "src/app_runtime/control/http_app.py", + "content": "class HttpControlAppFactory\nHttpControlAppFactory", + "layer": "C1_SYMBOL_CATALOG", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "qname": "HttpControlAppFactory", + "kind": "class", + "signature": "HttpControlAppFactory", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlActionSet\nControlActionSet", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "qname": "ControlActionSet", + "kind": "class", + "signature": "ControlActionSet", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/health.py", + "content": "method HealthContributor.health\nhealth(self)\nReturn contributor health state.", + "layer": "C1_SYMBOL_CATALOG", + "title": "HealthContributor.health", + "span_start": 9, + "span_end": 10, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "728cff18958d8a25e2661a0f08c83d68c3bbbfa8cef212b85dc0da2b11b3dc90", + "qname": "HealthContributor.health", + "kind": "method", + "signature": "health(self)", + "parent_symbol_id": "HealthContributor", + "package_or_module": "src.app_runtime.contracts.health", + "is_test": false, + "blob_sha": "6bd92611def7131e32d4dd34a8ed85e6cf3c67722ad27797032a632cb30dc097", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/health.py", + "content": "class HealthContributor\nHealthContributor(ABC)", + "layer": "C1_SYMBOL_CATALOG", + "title": "HealthContributor", + "span_start": 7, + "span_end": 10, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "db91ae387b89a2e9d83829754f27fa18a4055b3e72d7f31789a0b8e0bf5bba0b", + "qname": "HealthContributor", + "kind": "class", + "signature": "HealthContributor(ABC)", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.contracts.health", + "is_test": false, + "blob_sha": "6bd92611def7131e32d4dd34a8ed85e6cf3c67722ad27797032a632cb30dc097", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/health/registry.py", + "content": "HealthRegistry\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (2)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HealthRegistry", + "span_start": 8, + "span_end": 56, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 29, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd3390eb0ba29c9979466b9c2117238e0da3bb829eeb4d505cb34c9c3df7a8e8", + "symbol_name": "HealthRegistry", + "qname": "HealthRegistry", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 2, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "26e6a24daa43407ba5340b74497c20153020e79f8d7828ae502aaec378dfcf75", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/types.py", + "content": "HealthPayload\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "HealthPayload", + "span_start": 7, + "span_end": 11, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "392235d63ddf752d6e419cb8528c93fe070d1bc02d3c87ba6a897baac810cf5d", + "symbol_name": "HealthPayload", + "qname": "HealthPayload", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "448a02e4a432b5ab65b246b2bd24a32a6f127b9d2091ea73b53ee3c0a2f53bb3", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/health.py", + "content": "HealthContributor\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "HealthContributor", + "span_start": 7, + "span_end": 10, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "db91ae387b89a2e9d83829754f27fa18a4055b3e72d7f31789a0b8e0bf5bba0b", + "symbol_name": "HealthContributor", + "qname": "HealthContributor", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "6bd92611def7131e32d4dd34a8ed85e6cf3c67722ad27797032a632cb30dc097", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/health/registry.py", + "content": "HealthRegistry.__init__\n -> HealthRegistry._contributors\n -> HealthRegistry.register", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HealthRegistry.__init__:dataflow_slice", + "span_start": 10, + "span_end": 13, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "2381dfb339d541367c3251d2a610cac9d8b3f6bd6a352e119d00a93c5ccc2b7d", + "edge_type": "dataflow_slice", + "src_symbol_id": "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "src_qname": "HealthRegistry.__init__", + "dst_symbol_id": "a9e1f290c346c8bb1d67af0cafeebb5bcaf29c3ed7027e33c794532743df38f2", + "dst_ref": "HealthRegistry.register", + "resolution": "resolved", + "slice_id": "2381dfb339d541367c3251d2a610cac9d8b3f6bd6a352e119d00a93c5ccc2b7d", + "root_symbol_id": "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "path_symbols": [ + "HealthRegistry.__init__", + "HealthRegistry._contributors", + "HealthRegistry.register" + ], + "path_symbol_ids": [ + "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "a9e1f290c346c8bb1d67af0cafeebb5bcaf29c3ed7027e33c794532743df38f2" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "26e6a24daa43407ba5340b74497c20153020e79f8d7828ae502aaec378dfcf75", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/health/registry.py", + "content": "HealthRegistry.__init__\n -> HealthRegistry._contributors\n -> HealthRegistry.contributor_healths", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HealthRegistry.__init__:dataflow_slice", + "span_start": 10, + "span_end": 16, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d3a88a7abf16359e903e809ffc24473658fdd8198f60641fe1584fc4ac663c31", + "edge_type": "dataflow_slice", + "src_symbol_id": "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "src_qname": "HealthRegistry.__init__", + "dst_symbol_id": "fa7bbd8f4b64a55a5088640c30f52e84075d65f531bd7e1f6c1d7bb8d24fcbf2", + "dst_ref": "HealthRegistry.contributor_healths", + "resolution": "resolved", + "slice_id": "d3a88a7abf16359e903e809ffc24473658fdd8198f60641fe1584fc4ac663c31", + "root_symbol_id": "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "path_symbols": [ + "HealthRegistry.__init__", + "HealthRegistry._contributors", + "HealthRegistry.contributor_healths" + ], + "path_symbol_ids": [ + "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "fa7bbd8f4b64a55a5088640c30f52e84075d65f531bd7e1f6c1d7bb8d24fcbf2" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "26e6a24daa43407ba5340b74497c20153020e79f8d7828ae502aaec378dfcf75", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory.create calls time.monotonic", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlAppFactory.create:calls", + "span_start": 25, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3fdd0a88d10225ee74f3b84ab57e13f09f5ccc72f00e31af9ae4655411c289c0", + "edge_type": "calls", + "src_symbol_id": "4af42c2a9275d652e710a98ec48b8247236b4453a093629f8958704ff6d3cb58", + "src_qname": "HttpControlAppFactory.create", + "dst_symbol_id": null, + "dst_ref": "time.monotonic", + "resolution": "partial", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory.create calls app.post", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlAppFactory.create:calls", + "span_start": 37, + "span_end": 37, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "0e545d4b5187db7bec5ceac03071d2ad68177550c42af748fee364639e533c90", + "edge_type": "calls", + "src_symbol_id": "4af42c2a9275d652e710a98ec48b8247236b4453a093629f8958704ff6d3cb58", + "src_qname": "HttpControlAppFactory.create", + "dst_symbol_id": null, + "dst_ref": "app.post", + "resolution": "partial", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory.create calls str", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlAppFactory.create:calls", + "span_start": 27, + "span_end": 27, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "2a87c51461e31cd556508cc37fdff37b4d24c26f7f1604db30af5e8f1bda96cb", + "edge_type": "calls", + "src_symbol_id": "4af42c2a9275d652e710a98ec48b8247236b4453a093629f8958704ff6d3cb58", + "src_qname": "HttpControlAppFactory.create", + "dst_symbol_id": null, + "dst_ref": "str", + "resolution": "partial", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "class HttpControlAppFactory:\n def create(\n self,\n health_provider: Callable[[], Awaitable[HealthPayload]],\n action_provider: Callable[[str, str], Awaitable[JSONResponse]],\n ) -> FastAPI:\n app = FastAPI(title=\"PLBA Control API\")\n\n @app.middleware(\"http\")\n async def log_api_call(request: Request, call_next): # type: ignore[no-untyped-def]\n started = time.monotonic()\n response = await call_next(request)\n response.headers[\"X-Response-Time-Ms\"] = str(int((time.monotonic() - started) * 1000))\n return response\n\n @app.get(\"/health\")\n async def health() -> JSONResponse:\n payload = await health_provider()\n status_code = 200 if payload.get(\"status\") == \"ok\" else 503\n return JSONResponse(content=payload, status_code=status_code)\n\n @app.get(\"/actions/{action}\")\n @app.post(\"/actions/{action}\")\n async def action(action: str, request: Request) -> JSONResponse:\n client_source = self._client_source(request)\n if action in {\"start\", \"stop\"}:\n LOGGER.warning(\"Control action requested: /actions/%s client=%s\", action, client_source)\n return await action_provider(action, client_source)\n\n return app\n\n def _client_source(self, request: Request) -> str:\n explicit_header = request.headers.get(\"X-Client-Source\", \"\").strip()\n if explicit_header:\n return explicit_header\n user_agent = request.headers.get(\"User-Agent\", \"\").strip()\n if user_agent:\n return f\"user-agent:{user_agent}\"\n return \"unknown\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_app.py:HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "Когда в HttpControlAppFactory обрабатывается запрос `/health`, выполняются следующие шаги:\n\n1. Создается экземпляр FastAPI с названием \"PLBA Control API\".\n2. Добавляется middleware для логирования времени обработки каждого запроса (`log_api_call`).\n3. Обрабатывается GET-запрос к `/health`.\n - Вызывается провайдер здоровья `health_provider`, который возвращает асинхронно объект типа `HealthPayload`.\n - Проверяется статус здоровья (\"ok\" или иное). В зависимости от статуса устанавливается соответствующий HTTP-код ответа (200 или 503).\n - Возвращается JSON-ответ с содержимым `HealthPayload`.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "TRACE_FLOW", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS", + "C4_SEMANTIC_ROLES" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "TRACE_FLOW", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "unknown", + "symbol_candidates": [ + "health", + "HttpControlAppFactory" + ], + "keyword_hints": [ + "health", + "HttpControlAppFactory" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 10, + "C3_ENTRYPOINTS": 10 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "health HttpControlAppFactory", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Покажи как проходит запрос /health в HttpControlAppFactory", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "Покажи как проходит запрос /health в HttpControlAppFactory", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Покажи как проходит запрос /health в HttpControlAppFactory", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 10, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "Покажи как проходит запрос /health в HttpControlAppFactory", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 10, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 4, + "candidates_after_filter": 4 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 10, + "candidates_after_filter": 10 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "HttpControlAppFactory", + "alternatives": [ + "HttpControlAppFactory", + "ControlActionSet", + "HealthContributor.health", + "HealthContributor" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 4, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 8, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 10, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 1, + "symbol_resolution": 0, + "retrieval_total": 239, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 61, + "C0_SOURCE_CHUNKS": 58, + "C4_SEMANTIC_ROLES": 35, + "C2_DEPENDENCY_GRAPH": 68, + "C3_ENTRYPOINTS": 16 + }, + "merge_rank": 49, + "prompt_build": 0, + "llm_call": 1326 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 837, + "evidence_rows": 26, + "evidence_chars": 3507 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 4, + "unique_paths": 3 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 8, + "unique_paths": 7 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 10, + "unique_paths": 3 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_trace_flow_ru_v4", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "health", + "HttpControlAppFactory" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 26, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-v2-trace-flow-health-endpoint", + "mode": "full_chain", + "run_started_at": "2026-03-12T14:38:57", + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Покажи как проходит запрос /health в HttpControlAppFactory", + "normalized_query": "Покажи как проходит запрос /health в HttpControlAppFactory" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Покажи как проходит запрос /health в HttpControlAppFactory" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Покажи как проходит запрос /health в HttpControlAppFactory" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "TRACE_FLOW", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "unknown", + "symbol_candidates": [ + "health", + "HttpControlAppFactory" + ], + "keyword_hints": [ + "health", + "HttpControlAppFactory" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 1 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Покажи как проходит запрос /health в HttpControlAppFactory" + }, + "output": { + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "HttpControlAppFactory", + "alternatives": [ + "HttpControlAppFactory", + "ControlActionSet", + "HealthContributor.health", + "HealthContributor" + ], + "confidence": 0.99 + }, + "rag_count": 26, + "rag_rows": [ + { + "path": "src/app_runtime/control/http_app.py", + "content": "class HttpControlAppFactory\nHttpControlAppFactory", + "layer": "C1_SYMBOL_CATALOG", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "qname": "HttpControlAppFactory", + "kind": "class", + "signature": "HttpControlAppFactory", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlActionSet\nControlActionSet", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "qname": "ControlActionSet", + "kind": "class", + "signature": "ControlActionSet", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/health.py", + "content": "method HealthContributor.health\nhealth(self)\nReturn contributor health state.", + "layer": "C1_SYMBOL_CATALOG", + "title": "HealthContributor.health", + "span_start": 9, + "span_end": 10, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "728cff18958d8a25e2661a0f08c83d68c3bbbfa8cef212b85dc0da2b11b3dc90", + "qname": "HealthContributor.health", + "kind": "method", + "signature": "health(self)", + "parent_symbol_id": "HealthContributor", + "package_or_module": "src.app_runtime.contracts.health", + "is_test": false, + "blob_sha": "6bd92611def7131e32d4dd34a8ed85e6cf3c67722ad27797032a632cb30dc097", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/health.py", + "content": "class HealthContributor\nHealthContributor(ABC)", + "layer": "C1_SYMBOL_CATALOG", + "title": "HealthContributor", + "span_start": 7, + "span_end": 10, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "db91ae387b89a2e9d83829754f27fa18a4055b3e72d7f31789a0b8e0bf5bba0b", + "qname": "HealthContributor", + "kind": "class", + "signature": "HealthContributor(ABC)", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.contracts.health", + "is_test": false, + "blob_sha": "6bd92611def7131e32d4dd34a8ed85e6cf3c67722ad27797032a632cb30dc097", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/health/registry.py", + "content": "HealthRegistry\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (2)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HealthRegistry", + "span_start": 8, + "span_end": 56, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 29, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd3390eb0ba29c9979466b9c2117238e0da3bb829eeb4d505cb34c9c3df7a8e8", + "symbol_name": "HealthRegistry", + "qname": "HealthRegistry", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 2, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "26e6a24daa43407ba5340b74497c20153020e79f8d7828ae502aaec378dfcf75", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/types.py", + "content": "HealthPayload\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "HealthPayload", + "span_start": 7, + "span_end": 11, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "392235d63ddf752d6e419cb8528c93fe070d1bc02d3c87ba6a897baac810cf5d", + "symbol_name": "HealthPayload", + "qname": "HealthPayload", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "448a02e4a432b5ab65b246b2bd24a32a6f127b9d2091ea73b53ee3c0a2f53bb3", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/health.py", + "content": "HealthContributor\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "HealthContributor", + "span_start": 7, + "span_end": 10, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "db91ae387b89a2e9d83829754f27fa18a4055b3e72d7f31789a0b8e0bf5bba0b", + "symbol_name": "HealthContributor", + "qname": "HealthContributor", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "6bd92611def7131e32d4dd34a8ed85e6cf3c67722ad27797032a632cb30dc097", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/health/registry.py", + "content": "HealthRegistry.__init__\n -> HealthRegistry._contributors\n -> HealthRegistry.register", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HealthRegistry.__init__:dataflow_slice", + "span_start": 10, + "span_end": 13, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "2381dfb339d541367c3251d2a610cac9d8b3f6bd6a352e119d00a93c5ccc2b7d", + "edge_type": "dataflow_slice", + "src_symbol_id": "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "src_qname": "HealthRegistry.__init__", + "dst_symbol_id": "a9e1f290c346c8bb1d67af0cafeebb5bcaf29c3ed7027e33c794532743df38f2", + "dst_ref": "HealthRegistry.register", + "resolution": "resolved", + "slice_id": "2381dfb339d541367c3251d2a610cac9d8b3f6bd6a352e119d00a93c5ccc2b7d", + "root_symbol_id": "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "path_symbols": [ + "HealthRegistry.__init__", + "HealthRegistry._contributors", + "HealthRegistry.register" + ], + "path_symbol_ids": [ + "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "a9e1f290c346c8bb1d67af0cafeebb5bcaf29c3ed7027e33c794532743df38f2" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "26e6a24daa43407ba5340b74497c20153020e79f8d7828ae502aaec378dfcf75", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/health/registry.py", + "content": "HealthRegistry.__init__\n -> HealthRegistry._contributors\n -> HealthRegistry.contributor_healths", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HealthRegistry.__init__:dataflow_slice", + "span_start": 10, + "span_end": 16, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d3a88a7abf16359e903e809ffc24473658fdd8198f60641fe1584fc4ac663c31", + "edge_type": "dataflow_slice", + "src_symbol_id": "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "src_qname": "HealthRegistry.__init__", + "dst_symbol_id": "fa7bbd8f4b64a55a5088640c30f52e84075d65f531bd7e1f6c1d7bb8d24fcbf2", + "dst_ref": "HealthRegistry.contributor_healths", + "resolution": "resolved", + "slice_id": "d3a88a7abf16359e903e809ffc24473658fdd8198f60641fe1584fc4ac663c31", + "root_symbol_id": "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "path_symbols": [ + "HealthRegistry.__init__", + "HealthRegistry._contributors", + "HealthRegistry.contributor_healths" + ], + "path_symbol_ids": [ + "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "fa7bbd8f4b64a55a5088640c30f52e84075d65f531bd7e1f6c1d7bb8d24fcbf2" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "26e6a24daa43407ba5340b74497c20153020e79f8d7828ae502aaec378dfcf75", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory.create calls time.monotonic", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlAppFactory.create:calls", + "span_start": 25, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3fdd0a88d10225ee74f3b84ab57e13f09f5ccc72f00e31af9ae4655411c289c0", + "edge_type": "calls", + "src_symbol_id": "4af42c2a9275d652e710a98ec48b8247236b4453a093629f8958704ff6d3cb58", + "src_qname": "HttpControlAppFactory.create", + "dst_symbol_id": null, + "dst_ref": "time.monotonic", + "resolution": "partial", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory.create calls app.post", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlAppFactory.create:calls", + "span_start": 37, + "span_end": 37, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "0e545d4b5187db7bec5ceac03071d2ad68177550c42af748fee364639e533c90", + "edge_type": "calls", + "src_symbol_id": "4af42c2a9275d652e710a98ec48b8247236b4453a093629f8958704ff6d3cb58", + "src_qname": "HttpControlAppFactory.create", + "dst_symbol_id": null, + "dst_ref": "app.post", + "resolution": "partial", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory.create calls str", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlAppFactory.create:calls", + "span_start": 27, + "span_end": 27, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "2a87c51461e31cd556508cc37fdff37b4d24c26f7f1604db30af5e8f1bda96cb", + "edge_type": "calls", + "src_symbol_id": "4af42c2a9275d652e710a98ec48b8247236b4453a093629f8958704ff6d3cb58", + "src_qname": "HttpControlAppFactory.create", + "dst_symbol_id": null, + "dst_ref": "str", + "resolution": "partial", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "class HttpControlAppFactory:\n def create(\n self,\n health_provider: Callable[[], Awaitable[HealthPayload]],\n action_provider: Callable[[str, str], Awaitable[JSONResponse]],\n ) -> FastAPI:\n app = FastAPI(title=\"PLBA Control API\")\n\n @app.middleware(\"http\")\n async def log_api_call(request: Request, call_next): # type: ignore[no-untyped-def]\n started = time.monotonic()\n response = await call_next(request)\n response.headers[\"X-Response-Time-Ms\"] = str(int((time.monotonic() - started) * 1000))\n return response\n\n @app.get(\"/health\")\n async def health() -> JSONResponse:\n payload = await health_provider()\n status_code = 200 if payload.get(\"status\") == \"ok\" else 503\n return JSONResponse(content=payload, status_code=status_code)\n\n @app.get(\"/actions/{action}\")\n @app.post(\"/actions/{action}\")\n async def action(action: str, request: Request) -> JSONResponse:\n client_source = self._client_source(request)\n if action in {\"start\", \"stop\"}:\n LOGGER.warning(\"Control action requested: /actions/%s client=%s\", action, client_source)\n return await action_provider(action, client_source)\n\n return app\n\n def _client_source(self, request: Request) -> str:\n explicit_header = request.headers.get(\"X-Client-Source\", \"\").strip()\n if explicit_header:\n return explicit_header\n user_agent = request.headers.get(\"User-Agent\", \"\").strip()\n if user_agent:\n return f\"user-agent:{user_agent}\"\n return \"unknown\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_app.py:HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 10, + "C3_ENTRYPOINTS": 10 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "health HttpControlAppFactory", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Покажи как проходит запрос /health в HttpControlAppFactory", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "Покажи как проходит запрос /health в HttpControlAppFactory", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Покажи как проходит запрос /health в HttpControlAppFactory", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 10, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "Покажи как проходит запрос /health в HttpControlAppFactory", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 10, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 4, + "candidates_after_filter": 4 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 10, + "candidates_after_filter": 10 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "HttpControlAppFactory", + "alternatives": [ + "HttpControlAppFactory", + "ControlActionSet", + "HealthContributor.health", + "HealthContributor" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 4, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 8, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 10, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 239, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 61, + "C0_SOURCE_CHUNKS": 58, + "C4_SEMANTIC_ROLES": 35, + "C2_DEPENDENCY_GRAPH": 68, + "C3_ENTRYPOINTS": 16 + }, + "merge_rank": 49 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Покажи как проходит запрос /health в HttpControlAppFactory", + "rag_count": 26 + }, + "output": { + "llm_answer": "Когда в HttpControlAppFactory обрабатывается запрос `/health`, выполняются следующие шаги:\n\n1. Создается экземпляр FastAPI с названием \"PLBA Control API\".\n2. Добавляется middleware для логирования времени обработки каждого запроса (`log_api_call`).\n3. Обрабатывается GET-запрос к `/health`.\n - Вызывается провайдер здоровья `health_provider`, который возвращает асинхронно объект типа `HealthPayload`.\n - Проверяется статус здоровья (\"ok\" или иное). В зависимости от статуса устанавливается соответствующий HTTP-код ответа (200 или 503).\n - Возвращается JSON-ответ с содержимым `HealthPayload`." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 837, + "evidence_rows": 26, + "evidence_chars": 3507 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 4, + "unique_paths": 3 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 8, + "unique_paths": 7 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 10, + "unique_paths": 3 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_trace_flow_ru_v4", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 1326 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-health-endpoint.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-health-endpoint.md new file mode 100644 index 0000000..f8ae0b6 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-health-endpoint.md @@ -0,0 +1,35 @@ +# plba-v2-trace-flow-health-endpoint + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Покажи как проходит запрос /health в HttpControlAppFactory + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "TRACE_FLOW", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 26, + "llm_answer": "Когда в HttpControlAppFactory обрабатывается запрос `/health`, выполняются следующие шаги:\n\n1. Создается экземпляр FastAPI с названием \"PLBA Control API\".\n2. Добавляется middleware для логирования времени обработки каждого запроса (`log_api_call`).\n3. Обрабатывается GET-запрос к `/health`.\n - Вызывается провайдер здоровья `health_provider`, который возвращает асинхронно объект типа `HealthPayload`.\n - Проверяется статус здоровья (\"ok\" или иное). В зависимости от статуса устанавливается соответствующий HTTP-код ответа (200 или 503).\n - Возвращается JSON-ответ с содержимым `HealthPayload`.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "health", + "HttpControlAppFactory" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-runtime-start.json b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-runtime-start.json new file mode 100644 index 0000000..69b3994 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-runtime-start.json @@ -0,0 +1,2964 @@ +{ + "case_id": "plba-v2-trace-flow-runtime-start", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "TRACE_FLOW", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 23, + "llm_answer": "При запуске объекта `RuntimeManager` происходит следующее:\n\n1. В конструкторе класса вызывается инициализация свойств через явные аргументы:\n - `configuration`: объект конфигурации (`ConfigurationManager`), используется значение по умолчанию, если аргумент отсутствует.\n - `services`: контейнер сервисов (`ServiceContainer`), также с возможным значением по умолчанию.\n - `traces`, `health`, `logs`, `workers`, `control_plane`: аналогичные настройки для соответствующих служб и компонентов.\n \n2. Далее выполняется регистрация модулей приложения через метод `_register_core_services()`.\n\nТаким образом, основной поток начинается с вызова конструктора класса и продолжается регистрацией внутренних компонентов и служб приложения, необходимых для последующего управления жизненным циклом runtime-среды.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-v2-trace-flow-runtime-start", + "text": "Покажи поток выполнения при запуске RuntimeManager", + "mode": "full_chain", + "run_started_at": "2026-03-12T14:38:57", + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Покажи поток выполнения при запуске RuntimeManager", + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ], + "confidence": 0.99 + }, + "rag_count": 23, + "rag_rows": [ + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager\nRuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "qname": "RuntimeManager", + "kind": "class", + "signature": "RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests manager\n- orchestrates role-like calls (4)\n- reads and writes state attributes\n- participates in dataflow slices (50)", + "layer": "C4_SEMANTIC_ROLES", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 43, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "symbol_name": "RuntimeManager", + "qname": "RuntimeManager", + "role": "pipeline_stage", + "confidence": 0.67, + "dataflow_participation": 50, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 52, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.services\n -> RuntimeManager.__init__", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 33, + "span_end": 39, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d43af85989222ee6d788ce418cdcb217c7ff044cfb915e3bdbd184417dc7bd61", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "dst_ref": "RuntimeManager.__init__", + "resolution": "resolved", + "slice_id": "d43af85989222ee6d788ce418cdcb217c7ff044cfb915e3bdbd184417dc7bd61", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.services", + "RuntimeManager.__init__" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 59, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1", + "dst_ref": "RuntimeManager.start", + "resolution": "resolved", + "slice_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.start" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager._register_core_services", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 127, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6", + "dst_ref": "RuntimeManager._register_core_services", + "resolution": "resolved", + "slice_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager._register_core_services" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.services\n -> RuntimeManager._register_core_services", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 33, + "span_end": 127, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "aac6f9dda73963b977083a892bee39a48eca4fbd7404787e022ecf4ebedec65d", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6", + "dst_ref": "RuntimeManager._register_core_services", + "resolution": "resolved", + "slice_id": "aac6f9dda73963b977083a892bee39a48eca4fbd7404787e022ecf4ebedec65d", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.services", + "RuntimeManager._register_core_services" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "При запуске объекта `RuntimeManager` происходит следующее:\n\n1. В конструкторе класса вызывается инициализация свойств через явные аргументы:\n - `configuration`: объект конфигурации (`ConfigurationManager`), используется значение по умолчанию, если аргумент отсутствует.\n - `services`: контейнер сервисов (`ServiceContainer`), также с возможным значением по умолчанию.\n - `traces`, `health`, `logs`, `workers`, `control_plane`: аналогичные настройки для соответствующих служб и компонентов.\n \n2. Далее выполняется регистрация модулей приложения через метод `_register_core_services()`.\n\nТаким образом, основной поток начинается с вызова конструктора класса и продолжается регистрацией внутренних компонентов и служб приложения, необходимых для последующего управления жизненным циклом runtime-среды.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "TRACE_FLOW", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS", + "C4_SEMANTIC_ROLES" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "TRACE_FLOW", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 10, + "C3_ENTRYPOINTS": 10 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Покажи поток выполнения при запуске RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "Покажи поток выполнения при запуске RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Покажи поток выполнения при запуске RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 10, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "Покажи поток выполнения при запуске RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 10, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 10, + "candidates_after_filter": 10 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 8, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 10, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 1, + "symbol_resolution": 0, + "retrieval_total": 200, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 58, + "C0_SOURCE_CHUNKS": 32, + "C4_SEMANTIC_ROLES": 28, + "C2_DEPENDENCY_GRAPH": 65, + "C3_ENTRYPOINTS": 15 + }, + "merge_rank": 27, + "prompt_build": 0, + "llm_call": 1458 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 859, + "evidence_rows": 23, + "evidence_chars": 8302 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 8, + "unique_paths": 7 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 10, + "unique_paths": 2 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_trace_flow_ru_v4", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "RuntimeManager" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 23, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-v2-trace-flow-runtime-start", + "mode": "full_chain", + "run_started_at": "2026-03-12T14:38:57", + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Покажи поток выполнения при запуске RuntimeManager", + "normalized_query": "Покажи поток выполнения при запуске RuntimeManager" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Покажи поток выполнения при запуске RuntimeManager" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Покажи поток выполнения при запуске RuntimeManager" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "TRACE_FLOW", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 1 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Покажи поток выполнения при запуске RuntimeManager" + }, + "output": { + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ], + "confidence": 0.99 + }, + "rag_count": 23, + "rag_rows": [ + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager\nRuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "qname": "RuntimeManager", + "kind": "class", + "signature": "RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests manager\n- orchestrates role-like calls (4)\n- reads and writes state attributes\n- participates in dataflow slices (50)", + "layer": "C4_SEMANTIC_ROLES", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 43, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "symbol_name": "RuntimeManager", + "qname": "RuntimeManager", + "role": "pipeline_stage", + "confidence": 0.67, + "dataflow_participation": 50, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 52, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.services\n -> RuntimeManager.__init__", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 33, + "span_end": 39, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d43af85989222ee6d788ce418cdcb217c7ff044cfb915e3bdbd184417dc7bd61", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "dst_ref": "RuntimeManager.__init__", + "resolution": "resolved", + "slice_id": "d43af85989222ee6d788ce418cdcb217c7ff044cfb915e3bdbd184417dc7bd61", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.services", + "RuntimeManager.__init__" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 59, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1", + "dst_ref": "RuntimeManager.start", + "resolution": "resolved", + "slice_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.start" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager._register_core_services", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 127, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6", + "dst_ref": "RuntimeManager._register_core_services", + "resolution": "resolved", + "slice_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager._register_core_services" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.services\n -> RuntimeManager._register_core_services", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 33, + "span_end": 127, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "aac6f9dda73963b977083a892bee39a48eca4fbd7404787e022ecf4ebedec65d", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6", + "dst_ref": "RuntimeManager._register_core_services", + "resolution": "resolved", + "slice_id": "aac6f9dda73963b977083a892bee39a48eca4fbd7404787e022ecf4ebedec65d", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.services", + "RuntimeManager._register_core_services" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 10, + "C3_ENTRYPOINTS": 10 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Покажи поток выполнения при запуске RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "Покажи поток выполнения при запуске RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Покажи поток выполнения при запуске RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 10, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "Покажи поток выполнения при запуске RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 10, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 10, + "candidates_after_filter": 10 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 8, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 10, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 200, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 58, + "C0_SOURCE_CHUNKS": 32, + "C4_SEMANTIC_ROLES": 28, + "C2_DEPENDENCY_GRAPH": 65, + "C3_ENTRYPOINTS": 15 + }, + "merge_rank": 27 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Покажи поток выполнения при запуске RuntimeManager", + "rag_count": 23 + }, + "output": { + "llm_answer": "При запуске объекта `RuntimeManager` происходит следующее:\n\n1. В конструкторе класса вызывается инициализация свойств через явные аргументы:\n - `configuration`: объект конфигурации (`ConfigurationManager`), используется значение по умолчанию, если аргумент отсутствует.\n - `services`: контейнер сервисов (`ServiceContainer`), также с возможным значением по умолчанию.\n - `traces`, `health`, `logs`, `workers`, `control_plane`: аналогичные настройки для соответствующих служб и компонентов.\n \n2. Далее выполняется регистрация модулей приложения через метод `_register_core_services()`.\n\nТаким образом, основной поток начинается с вызова конструктора класса и продолжается регистрацией внутренних компонентов и служб приложения, необходимых для последующего управления жизненным циклом runtime-среды." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 859, + "evidence_rows": 23, + "evidence_chars": 8302 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 8, + "unique_paths": 7 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 10, + "unique_paths": 2 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 3, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_trace_flow_ru_v4", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 1458 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-runtime-start.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-runtime-start.md new file mode 100644 index 0000000..908d07b --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-runtime-start.md @@ -0,0 +1,34 @@ +# plba-v2-trace-flow-runtime-start + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Покажи поток выполнения при запуске RuntimeManager + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "TRACE_FLOW", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 23, + "llm_answer": "При запуске объекта `RuntimeManager` происходит следующее:\n\n1. В конструкторе класса вызывается инициализация свойств через явные аргументы:\n - `configuration`: объект конфигурации (`ConfigurationManager`), используется значение по умолчанию, если аргумент отсутствует.\n - `services`: контейнер сервисов (`ServiceContainer`), также с возможным значением по умолчанию.\n - `traces`, `health`, `logs`, `workers`, `control_plane`: аналогичные настройки для соответствующих служб и компонентов.\n \n2. Далее выполняется регистрация модулей приложения через метод `_register_core_services()`.\n\nТаким образом, основной поток начинается с вызова конструктора класса и продолжается регистрацией внутренних компонентов и служб приложения, необходимых для последующего управления жизненным циклом runtime-среды.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/summary.md b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/summary.md new file mode 100644 index 0000000..ecbd43f --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_full_chain_subintents_v2/20260312_143856/summary.md @@ -0,0 +1,80 @@ +# pipeline_setup_v2 summary + +Passed: 18/18 + +| File | Case | Query | Expected sub-intent | Intent | Actual sub-intent | RAG layers | Pass | +|------|------|-------|---------------------|--------|-------------------|------------|------| +| full_chain_plba_code_subintents_v2.yaml | plba-v2-open-file-runtime | Открой файл src/app_runtime/core/runtime.py | OPEN_FILE | CODE_QA | OPEN_FILE | C0_SOURCE_CHUNKS:1 | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-open-file-public-api | Открой файл src/plba/__init__.py | OPEN_FILE | CODE_QA | OPEN_FILE | C0_SOURCE_CHUNKS:1 | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-explain-runtime-manager | Объясни как работает класс RuntimeManager | EXPLAIN | CODE_QA | EXPLAIN | C0_SOURCE_CHUNKS:1, C1_SYMBOL_CATALOG:1, C2_DEPENDENCY_GRAPH:6, C3_ENTRYPOINTS:3, C4_SEMANTIC_ROLES:1 | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-explain-trace-service | Объясни как работает класс TraceService | EXPLAIN | CODE_QA | EXPLAIN | C0_SOURCE_CHUNKS:3, C1_SYMBOL_CATALOG:1, C2_DEPENDENCY_GRAPH:6, C3_ENTRYPOINTS:3, C4_SEMANTIC_ROLES:1 | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-explain-create-runtime | Что делает функция create_runtime? | EXPLAIN | CODE_QA | EXPLAIN | C0_SOURCE_CHUNKS:1, C1_SYMBOL_CATALOG:1, C2_DEPENDENCY_GRAPH:6, C3_ENTRYPOINTS:3, C4_SEMANTIC_ROLES:1 | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-explain-local-http-channel | Почему в файле src/app_runtime/control/http_channel.py класс HttpControlChannel устроен так? | EXPLAIN_LOCAL | CODE_QA | EXPLAIN_LOCAL | C0_SOURCE_CHUNKS:1, C1_SYMBOL_CATALOG:1, C2_DEPENDENCY_GRAPH:4 | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-find-tests-runtime-manager | Где тесты для RuntimeManager? | FIND_TESTS | CODE_QA | FIND_TESTS | C0_SOURCE_CHUNKS:10, C2_DEPENDENCY_GRAPH:6 | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-find-tests-trace-service | Где тесты для TraceService? | FIND_TESTS | CODE_QA | FIND_TESTS | C0_SOURCE_CHUNKS:10, C2_DEPENDENCY_GRAPH:6 | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-find-tests-create-runtime | Где тесты для create_runtime? | FIND_TESTS | CODE_QA | FIND_TESTS | C0_SOURCE_CHUNKS:10, C2_DEPENDENCY_GRAPH:6 | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-find-tests-workflow-runtime-factory-negative | Где тесты для WorkflowRuntimeFactory? | FIND_TESTS | CODE_QA | FIND_TESTS | C0_SOURCE_CHUNKS:10, C2_DEPENDENCY_GRAPH:6 | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-find-entrypoints-control-plane | Найди точки входа HTTP control plane | FIND_ENTRYPOINTS | CODE_QA | FIND_ENTRYPOINTS | C0_SOURCE_CHUNKS:6, C3_ENTRYPOINTS:3 | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-find-entrypoints-health-endpoint | Где health endpoint? | FIND_ENTRYPOINTS | CODE_QA | FIND_ENTRYPOINTS | C0_SOURCE_CHUNKS:6, C3_ENTRYPOINTS:3 | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-trace-flow-runtime-start | Покажи поток выполнения при запуске RuntimeManager | TRACE_FLOW | CODE_QA | TRACE_FLOW | C0_SOURCE_CHUNKS:1, C1_SYMBOL_CATALOG:1, C2_DEPENDENCY_GRAPH:10, C3_ENTRYPOINTS:3, C4_SEMANTIC_ROLES:8 | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-trace-flow-health-endpoint | Покажи как проходит запрос /health в HttpControlAppFactory | TRACE_FLOW | CODE_QA | TRACE_FLOW | C0_SOURCE_CHUNKS:1, C1_SYMBOL_CATALOG:4, C2_DEPENDENCY_GRAPH:10, C3_ENTRYPOINTS:3, C4_SEMANTIC_ROLES:8 | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-architecture-runtime-manager | Какие компоненты участвуют в RuntimeManager? | ARCHITECTURE | CODE_QA | ARCHITECTURE | C0_SOURCE_CHUNKS:1, C1_SYMBOL_CATALOG:1, C2_DEPENDENCY_GRAPH:8, C3_ENTRYPOINTS:3, C4_SEMANTIC_ROLES:12 | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-architecture-control-plane | Какие компоненты участвуют в ControlPlaneService? | ARCHITECTURE | CODE_QA | ARCHITECTURE | C0_SOURCE_CHUNKS:1, C1_SYMBOL_CATALOG:1, C2_DEPENDENCY_GRAPH:8, C3_ENTRYPOINTS:3, C4_SEMANTIC_ROLES:12 | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-explain-nonexistent-symbol | Объясни класс RuntimeFactoryManager | EXPLAIN | CODE_QA | EXPLAIN | — | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-open-file-nonexistent | Открой файл src/app_runtime/core/missing_runtime.py | OPEN_FILE | CODE_QA | OPEN_FILE | — | ✓ | + +## LLM Answers +- **plba-v2-open-file-runtime** + Query: Открой файл src/app_runtime/core/runtime.py + > В файле src/app\_runtime/core/runtime.py виден класс RuntimeManager с несколькими атрибутами и методами. В конструкторе инициализируются конфигурация, сервисы, службы трассировки, здоровья, логирования и супервайзеры рабочих процессов. Также присутствуют константы для тайм\-аутов действий и интервала опроса. +- **plba-v2-open-file-public-api** + Query: Открой файл src/plba/__init__.py + > В файле src/plba/\_\_init\_\_.py видны следующие импорты и объявления: Импорты: \- plba.bootstrap.create\_runtime \- plba.config.ConfigFileLoader, FileConfigProvider \- plba.control.ControlActionSet, ControlChannel, ControlPlaneService, HttpControlChannel \- plba.contracts.ApplicationModule, ConfigProvider, HealthContributor, TraceContext, TraceContextRecord, TraceLogMessage, TraceTransport, Worker, WorkerHealth, WorkerStatus \- plba.core.ConfigurationManager, RuntimeManager, ServiceContainer \- plba.health.HealthRegistry \- plba.logging.LogManager \- plba.queue.InMemoryTaskQueue \- plba.tracing.MySqlTraceTransport, NoOpTraceTransport, TraceService \- plba.workflow.StepResult, WorkflowContext, WorkflowDefinition, WorkflowEngine, WorkflowEngineHooks, WorkflowNode, WorkflowRuntimeFactory, WorkflowStep \- plba.workers.WorkerSupervisor Объявления: \- \_\_all\_\_ содержит список экспортирован… +- **plba-v2-explain-runtime-manager** + Query: Объясни как работает класс RuntimeManager + > Класс \`RuntimeManager\` является менеджером, ответственным за координацию и управление различными компонентами приложения в определённый жизненный цикл. Ключевые особенности класса: 1. Инициализация: \- Конструктор принимает несколько необязательных аргументов \(\`configuration\`, \`services\`, \`traces\`, \`health\`, \`logs\`, \`workers\`, \`control\_plane\`\), которые по умолчанию инициализируются пустыми значениями соответствующих классов. 2. Атрибуты состояния: \- Имеет атрибуты \`\_started\`, \`\_state\`, \`\_core\_registered\`, \`\_workers\_registered\`, используемые для отслеживания текущего состояния системы и этапов её запуска. 3. Регистрация сервисов: \- Метод \`\_register\_core\_services\(\)\` регистрирует основные сервисы, необходимые для выполнения основных функций приложения. 4. Методы регистрации модулей: \- Методы вроде \`register\_module\(module\)\` позволяют зарегистрировать дополнительные модули… +- **plba-v2-explain-trace-service** + Query: Объясни как работает класс TraceService + > Класс \`TraceService\` в файле \`src/app\_runtime/tracing/service.py\` является компонентом, ответственным за управление контекстами трассировки и взаимодействие с транспортом для записи данных о трассировке. Ключевые аспекты класса: 1. Инициализация \(\`\_\_init\_\_\(\)\`\): \- Конструктор принимает два параметра: транспорт для записи трассировочных данных \(\`transport\`\) и хранилище контекста трассировки \(\`store\`\). \- По умолчанию используются заглушка транспорта \(\`NoOpTraceTransport\(\)\`\) и хранилище по умолчанию \(\`TraceContextStore\(\)\`\). \- Создаётся объект записи записей трассировки через \`TraceRecordWriter\`. 2. Создание контекста трассировки \(\`create\_context\(\)\`\): \- Метод создаёт новый контекст трассировки, используя UUID для уникального идентификатора трассировки. \- Записывает контекст в хранилище и отправляет запись в транспорт через метод записи контекста \(\`write\_context\(\)\`\). \- Воз… +- **plba-v2-explain-create-runtime** + Query: Что делает функция create_runtime? + > Функция \`create\_runtime\` в модуле \`src/plba/bootstrap.py\` отвечает за инициализацию и настройку основного runtime\-сервиса приложения. Она принимает следующие параметры: \- \`module\`: объект типа \`ApplicationModule\`, необходимый для регистрации в runtime; \- дополнительные необязательные параметры включают путь к конфигурационному файлу \(\`config\_path\`\), флаг включения HTTP\-контроля \(\`enable\_http\_control\`\) и настройки для HTTP\-интерфейса управления. Основные действия функции: 1. Создаёт экземпляр класса \`RuntimeManager\`. 2. При наличии пути к конфигурационному файлу добавляет файл конфигурации в runtime через метод \`add\_config\_file\`. 3. Если включён HTTP\-контроль, регистрирует HTTP\-канал управления через класс \`HttpControlChannel\`. 4. Регистрирует переданный модуль приложения через метод \`register\_module\`. 5. Возвращает созданный runtime\-менеджер. На основании представлен… +- **plba-v2-explain-local-http-channel** + Query: Почему в файле src/app_runtime/control/http_channel.py класс HttpControlChannel устроен так? + > Класс \`HttpControlChannel\` реализует механизм управления HTTP каналом для взаимодействия с внешними клиентами или сервисами через протокол HTTP. Его основная задача — обеспечивать старт и останов канала приема запросов, а также обработку двух типов ответов: 1. Health check \(\`\_health\_response\`\) – возвращает статус системы \(здорово ли она функционирует\). Проверяет наличие настроенных действий контроля и возвращает состояние \(«здорова» или «нездорова»\) вместе с дополнительной информацией. Входные данные: \- нет явных входных данных, кроме конфигурации каналов и настроенных действий; \- выходные данные: словарь состояния и детализированного сообщения. 2. Обработка пользовательских действий \(\`\_action\_response\`\) – отвечает за выполнение конкретного действия, указанного клиентом \(например, изменение настроек, перезапуск сервиса\). Входные данные: \- строка с именем действия \(\`a… +- **plba-v2-find-tests-runtime-manager** + Query: Где тесты для RuntimeManager? + > Прямые тесты для RuntimeManager находятся в следующих файлах: 1. tests/test\_runtime.py: \- test\_runtime\_graceful\_stop\_waits\_until\_worker\_finishes — проверяет корректную остановку RuntimeManager после завершения работы модуля. \- test\_runtime\_runs\_worker\_routine\_and\_exposes\_status — проверяет запуск рутины модуля и отображение статуса RuntimeManager. Также косвенно связан тест: 2. tests/test\_business\_control\_actions.py: \- \_build\_runtime — использует RuntimeManager при построении бизнес\-контроля. \- test\_worker\_wakes\_up\_with\_configured\_interval — применяет RuntimeManager для тестирования пробуждения рабочего процесса с заданной периодичностью. Эти тесты покрывают инициализацию, регистрацию модулей, управление состоянием и остановкой RuntimeManager. +- **plba-v2-find-tests-trace-service** + Query: Где тесты для TraceService? + > Прямых тестов конкретно для \`TraceService\` в данном контексте не обнаружено. +- **plba-v2-find-tests-create-runtime** + Query: Где тесты для create_runtime? + > Прямых тестов конкретно для функции \`create\_runtime\` в предоставленном контексте не обнаружено. +- **plba-v2-find-tests-workflow-runtime-factory-negative** + Query: Где тесты для WorkflowRuntimeFactory? + > Прямых тестов конкретно для \`WorkflowRuntimeFactory\` в предоставленном контексте не обнаружено. +- **plba-v2-find-entrypoints-control-plane** + Query: Найди точки входа HTTP control plane + > В системе обнаружены следующие подтвержденные точки входа HTTP control plane: 1. +- **plba-v2-find-entrypoints-health-endpoint** + Query: Где health endpoint? + > Подтверждённые HTTP routes для health\-endpoint: \- GET /health Объявлен в \`src/app\_runtime/control/http\_app.py\`, обслуживается методом \`http\_app.get\`. +- **plba-v2-trace-flow-runtime-start** + Query: Покажи поток выполнения при запуске RuntimeManager + > При запуске объекта \`RuntimeManager\` происходит следующее: 1. В конструкторе класса вызывается инициализация свойств через явные аргументы: \- \`configuration\`: объект конфигурации \(\`ConfigurationManager\`\), используется значение по умолчанию, если аргумент отсутствует. \- \`services\`: контейнер сервисов \(\`ServiceContainer\`\), также с возможным значением по умолчанию. \- \`traces\`, \`health\`, \`logs\`, \`workers\`, \`control\_plane\`: аналогичные настройки для соответствующих служб и компонентов. 2. Далее выполняется регистрация модулей приложения через метод \`\_register\_core\_services\(\)\`. Таким образом, основной поток начинается с вызова конструктора класса и продолжается регистрацией внутренних компонентов и служб приложения, необходимых для последующего управления жизненным циклом runtime\-среды. +- **plba-v2-trace-flow-health-endpoint** + Query: Покажи как проходит запрос /health в HttpControlAppFactory + > Когда в HttpControlAppFactory обрабатывается запрос \`/health\`, выполняются следующие шаги: 1. Создается экземпляр FastAPI с названием "PLBA Control API". 2. Добавляется middleware для логирования времени обработки каждого запроса \(\`log\_api\_call\`\). 3. Обрабатывается GET\-запрос к \`/health\`. \- Вызывается провайдер здоровья \`health\_provider\`, который возвращает асинхронно объект типа \`HealthPayload\`. \- Проверяется статус здоровья \("ok" или иное\). В зависимости от статуса устанавливается соответствующий HTTP\-код ответа \(200 или 503\). \- Возвращается JSON\-ответ с содержимым \`HealthPayload\`. +- **plba-v2-architecture-runtime-manager** + Query: Какие компоненты участвуют в RuntimeManager? + > В подсистеме RuntimeManager участвуют следующие компоненты и устанавливаются явные связи между ними: 1. RuntimeManager — главный менеджер выполнения, создающий и запускающий рабочие потоки. \- Создаёт экземпляр конфигурации \(\`configuration\`\). \- Вызывает метод \`start\`, инициирующий выполнение основной логики. 2. ControlPlaneService — сервис управления каналами и рабочими потоками. \- Контролирует каналы передачи данных \(\`\_channels\`\) и инициализирует асинхронную обработку \(\`\_start\_async\`\). Эти компоненты связаны следующим образом: \- RuntimeManager управляет созданием экземпляра Configuration и вызовом метода start для запуска процессов. \- ControlPlaneService отвечает за организацию каналов обмена данными и старт задач с использованием асинхронных механизмов. Границы ответственности: \- RuntimeManager выполняет диспетчеризацию и координацию рабочих потоков на уровне runtim… +- **plba-v2-architecture-control-plane** + Query: Какие компоненты участвуют в ControlPlaneService? + > В подсистеме ControlPlaneService можно выделить следующие компоненты и связи между ними на основе доступных контекстных слоев: Компоненты и связи: 1. ControlPlaneService \- Создаёт: \`ControlPlaneService\` инстанцируется при инициализации приложения \(\`app.post\`\). \- Вызывает: метод \`\_channels\` для регистрации каналов обработки данных, а также асинхронно запускает начальные действия \(\`\_start\_async\`\). \- Читает и записывает состояние атрибутов сервиса. 2. ControlActionSet \- Используется внутри \`ControlPlaneService\`, роль модели указывается как "default". Границы ответственности: Граница ответственности явно видна в коде следующим образом: \- Сервис участвует в обработке данных, разделяя их на отдельные потоки \(\`dataflow slices\`\), что подтверждается методами и полями класса. \- Регистрация каналов и управление ими выполняется непосредственно через инициализацию объекта сервиса… +- **plba-v2-explain-nonexistent-symbol** + Query: Объясни класс RuntimeFactoryManager + > Сущность RuntimeFactoryManager не найдена в доступном коде. Близкие совпадения: ControlChannel, ControlActionSet. +- **plba-v2-open-file-nonexistent** + Query: Открой файл src/app_runtime/core/missing_runtime.py + > Файл src/app\_runtime/core/missing\_runtime.py не найден. \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084200/router_only_plba_code_retrieval_plba-explain-http-control-channel.json b/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084200/router_only_plba_code_retrieval_plba-explain-http-control-channel.json new file mode 100644 index 0000000..8fb2a41 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084200/router_only_plba_code_retrieval_plba-explain-http-control-channel.json @@ -0,0 +1,221 @@ +{ + "case_id": "plba-explain-http-control-channel", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/router_only_plba_code_retrieval.yaml", + "runner": "runtime", + "mode": "router_only", + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 0, + "llm_answer": "", + "answer_mode": "partial", + "path_scope": [], + "symbol_candidates": [ + "HttpControlChannel" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-explain-http-control-channel", + "text": "Объясни класс HttpControlChannel", + "mode": "router_only", + "run_started_at": "2026-03-12T08:42:00", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни класс HttpControlChannel", + "symbol_resolution": { + "status": "pending", + "resolved_symbol": null, + "alternatives": [ + "HttpControlChannel" + ], + "confidence": 0.0 + }, + "rag_count": 0, + "rag_rows": [], + "llm_answer": null, + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [], + "evidence_sufficient": false + }, + "llm": { + "answer_status": "partial", + "groundedness": "not_applicable" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "HttpControlChannel" + ], + "keyword_hints": [ + "HttpControlChannel" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [], + "retrieval_mode_by_layer": {}, + "top_k_by_layer": {}, + "filters_by_layer": {}, + "repo_scope": { + "repo_id": null, + "workspace_id": null + } + }, + "retrieval": null, + "constraint_violations": [], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 0, + "retrieval_by_layer": {}, + "merge_rank": 0, + "prompt_build": 0, + "llm_call": 0 + }, + "prompt": null, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "HttpControlChannel" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 0, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-explain-http-control-channel", + "mode": "router_only", + "run_started_at": "2026-03-12T08:42:00", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Объясни класс HttpControlChannel", + "normalized_query": "Объясни класс HttpControlChannel" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Объясни класс HttpControlChannel" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни класс HttpControlChannel" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "HttpControlChannel" + ], + "keyword_hints": [ + "HttpControlChannel" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084200/router_only_plba_code_retrieval_plba-explain-http-control-channel.md b/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084200/router_only_plba_code_retrieval_plba-explain-http-control-channel.md new file mode 100644 index 0000000..ae60689 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084200/router_only_plba_code_retrieval_plba-explain-http-control-channel.md @@ -0,0 +1,34 @@ +# plba-explain-http-control-channel + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/router_only_plba_code_retrieval.yaml +- runner: runtime +- mode: router_only +- passed: True + +## Query +Объясни класс HttpControlChannel + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 0, + "llm_answer": "", + "answer_mode": "partial", + "path_scope": [], + "symbol_candidates": [ + "HttpControlChannel" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084200/router_only_plba_code_retrieval_plba-explain-runtime-manager.json b/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084200/router_only_plba_code_retrieval_plba-explain-runtime-manager.json new file mode 100644 index 0000000..3ba1905 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084200/router_only_plba_code_retrieval_plba-explain-runtime-manager.json @@ -0,0 +1,221 @@ +{ + "case_id": "plba-explain-runtime-manager", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/router_only_plba_code_retrieval.yaml", + "runner": "runtime", + "mode": "router_only", + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 0, + "llm_answer": "", + "answer_mode": "partial", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-explain-runtime-manager", + "text": "Объясни как работает класс RuntimeManager", + "mode": "router_only", + "run_started_at": "2026-03-12T08:42:00", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни как работает класс RuntimeManager", + "symbol_resolution": { + "status": "pending", + "resolved_symbol": null, + "alternatives": [ + "RuntimeManager" + ], + "confidence": 0.0 + }, + "rag_count": 0, + "rag_rows": [], + "llm_answer": null, + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [], + "evidence_sufficient": false + }, + "llm": { + "answer_status": "partial", + "groundedness": "not_applicable" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [], + "retrieval_mode_by_layer": {}, + "top_k_by_layer": {}, + "filters_by_layer": {}, + "repo_scope": { + "repo_id": null, + "workspace_id": null + } + }, + "retrieval": null, + "constraint_violations": [], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 0, + "retrieval_by_layer": {}, + "merge_rank": 0, + "prompt_build": 0, + "llm_call": 0 + }, + "prompt": null, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "RuntimeManager" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 0, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-explain-runtime-manager", + "mode": "router_only", + "run_started_at": "2026-03-12T08:42:00", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Объясни как работает класс RuntimeManager", + "normalized_query": "Объясни как работает класс RuntimeManager" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Объясни как работает класс RuntimeManager" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни как работает класс RuntimeManager" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084200/router_only_plba_code_retrieval_plba-explain-runtime-manager.md b/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084200/router_only_plba_code_retrieval_plba-explain-runtime-manager.md new file mode 100644 index 0000000..23226ea --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084200/router_only_plba_code_retrieval_plba-explain-runtime-manager.md @@ -0,0 +1,34 @@ +# plba-explain-runtime-manager + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/router_only_plba_code_retrieval.yaml +- runner: runtime +- mode: router_only +- passed: True + +## Query +Объясни как работает класс RuntimeManager + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 0, + "llm_answer": "", + "answer_mode": "partial", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084200/router_only_plba_code_retrieval_plba-explain-trace-service.json b/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084200/router_only_plba_code_retrieval_plba-explain-trace-service.json new file mode 100644 index 0000000..4900f8d --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084200/router_only_plba_code_retrieval_plba-explain-trace-service.json @@ -0,0 +1,221 @@ +{ + "case_id": "plba-explain-trace-service", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/router_only_plba_code_retrieval.yaml", + "runner": "runtime", + "mode": "router_only", + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 0, + "llm_answer": "", + "answer_mode": "partial", + "path_scope": [], + "symbol_candidates": [ + "TraceService" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-explain-trace-service", + "text": "Как работает TraceService?", + "mode": "router_only", + "run_started_at": "2026-03-12T08:42:00", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Как работает TraceService?", + "symbol_resolution": { + "status": "pending", + "resolved_symbol": null, + "alternatives": [ + "TraceService" + ], + "confidence": 0.0 + }, + "rag_count": 0, + "rag_rows": [], + "llm_answer": null, + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [], + "evidence_sufficient": false + }, + "llm": { + "answer_status": "partial", + "groundedness": "not_applicable" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "TraceService" + ], + "keyword_hints": [ + "TraceService" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [], + "retrieval_mode_by_layer": {}, + "top_k_by_layer": {}, + "filters_by_layer": {}, + "repo_scope": { + "repo_id": null, + "workspace_id": null + } + }, + "retrieval": null, + "constraint_violations": [], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 0, + "retrieval_by_layer": {}, + "merge_rank": 0, + "prompt_build": 0, + "llm_call": 0 + }, + "prompt": null, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "TraceService" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 0, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-explain-trace-service", + "mode": "router_only", + "run_started_at": "2026-03-12T08:42:00", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Как работает TraceService?", + "normalized_query": "Как работает TraceService?" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Как работает TraceService?" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Как работает TraceService?" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "TraceService" + ], + "keyword_hints": [ + "TraceService" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084200/router_only_plba_code_retrieval_plba-explain-trace-service.md b/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084200/router_only_plba_code_retrieval_plba-explain-trace-service.md new file mode 100644 index 0000000..4004971 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084200/router_only_plba_code_retrieval_plba-explain-trace-service.md @@ -0,0 +1,34 @@ +# plba-explain-trace-service + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/router_only_plba_code_retrieval.yaml +- runner: runtime +- mode: router_only +- passed: True + +## Query +Как работает TraceService? + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 0, + "llm_answer": "", + "answer_mode": "partial", + "path_scope": [], + "symbol_candidates": [ + "TraceService" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084200/router_only_plba_code_retrieval_plba-find-entrypoints-bootstrap.json b/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084200/router_only_plba_code_retrieval_plba-find-entrypoints-bootstrap.json new file mode 100644 index 0000000..dc8821e --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084200/router_only_plba_code_retrieval_plba-find-entrypoints-bootstrap.json @@ -0,0 +1,222 @@ +{ + "case_id": "plba-find-entrypoints-bootstrap", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/router_only_plba_code_retrieval.yaml", + "runner": "runtime", + "mode": "router_only", + "actual": { + "intent": "PROJECT_MISC", + "sub_intent": "EXPLAIN", + "graph_id": "ProjectMiscGraph", + "conversation_mode": "START", + "rag_count": 0, + "llm_answer": "", + "answer_mode": "partial", + "path_scope": [], + "symbol_candidates": [ + "create_runtime" + ], + "layers": [ + "D1_MODULE_CATALOG", + "D3_SECTION_INDEX", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ] + }, + "passed": false, + "mismatches": [ + "intent: expected CODE_QA, got PROJECT_MISC", + "sub_intent: expected FIND_ENTRYPOINTS, got EXPLAIN", + "graph_id: expected CodeQAGraph, got ProjectMiscGraph" + ], + "details": { + "case_id": "plba-find-entrypoints-bootstrap", + "text": "Где находится create_runtime?", + "mode": "router_only", + "run_started_at": "2026-03-12T08:42:00", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "PROJECT_MISC", + "graph_id": "ProjectMiscGraph", + "conversation_mode": "START", + "query": "Где находится create_runtime?", + "symbol_resolution": { + "status": "pending", + "resolved_symbol": null, + "alternatives": [ + "create_runtime" + ], + "confidence": 0.0 + }, + "rag_count": 0, + "rag_rows": [], + "llm_answer": null, + "summary": { + "router": { + "intent": "PROJECT_MISC", + "sub_intent": "EXPLAIN", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [], + "evidence_sufficient": false + }, + "llm": { + "answer_status": "partial", + "groundedness": "not_applicable" + } + }, + "diagnostics": { + "router_plan": { + "intent": "PROJECT_MISC", + "sub_intent": "EXPLAIN", + "graph_id": "ProjectMiscGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "D1_MODULE_CATALOG", + "D3_SECTION_INDEX", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "function", + "symbol_candidates": [ + "create_runtime" + ], + "keyword_hints": [ + "create_runtime" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [], + "retrieval_mode_by_layer": {}, + "top_k_by_layer": {}, + "filters_by_layer": {}, + "repo_scope": { + "repo_id": null, + "workspace_id": null + } + }, + "retrieval": null, + "constraint_violations": [], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 0, + "retrieval_by_layer": {}, + "merge_rank": 0, + "prompt_build": 0, + "llm_call": 0 + }, + "prompt": null, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "create_runtime" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 0, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-find-entrypoints-bootstrap", + "mode": "router_only", + "run_started_at": "2026-03-12T08:42:00", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "PROJECT_MISC", + "graph_id": "ProjectMiscGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Где находится create_runtime?", + "normalized_query": "Где находится create_runtime?" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Где находится create_runtime?" + }, + "output": { + "intent": "PROJECT_MISC", + "graph_id": "ProjectMiscGraph", + "conversation_mode": "START", + "query": "Где находится create_runtime?" + }, + "diagnostics": { + "router_plan": { + "intent": "PROJECT_MISC", + "sub_intent": "EXPLAIN", + "graph_id": "ProjectMiscGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "D1_MODULE_CATALOG", + "D3_SECTION_INDEX", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "function", + "symbol_candidates": [ + "create_runtime" + ], + "keyword_hints": [ + "create_runtime" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084200/router_only_plba_code_retrieval_plba-find-entrypoints-bootstrap.md b/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084200/router_only_plba_code_retrieval_plba-find-entrypoints-bootstrap.md new file mode 100644 index 0000000..be4e0a9 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084200/router_only_plba_code_retrieval_plba-find-entrypoints-bootstrap.md @@ -0,0 +1,35 @@ +# plba-find-entrypoints-bootstrap + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/router_only_plba_code_retrieval.yaml +- runner: runtime +- mode: router_only +- passed: False + +## Query +Где находится create_runtime? + +## Actual +{ + "intent": "PROJECT_MISC", + "sub_intent": "EXPLAIN", + "graph_id": "ProjectMiscGraph", + "conversation_mode": "START", + "rag_count": 0, + "llm_answer": "", + "answer_mode": "partial", + "path_scope": [], + "symbol_candidates": [ + "create_runtime" + ], + "layers": [ + "D1_MODULE_CATALOG", + "D3_SECTION_INDEX", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- intent: expected CODE_QA, got PROJECT_MISC +- sub_intent: expected FIND_ENTRYPOINTS, got EXPLAIN +- graph_id: expected CodeQAGraph, got ProjectMiscGraph \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084200/router_only_plba_code_retrieval_plba-find-entrypoints-create-runtime.json b/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084200/router_only_plba_code_retrieval_plba-find-entrypoints-create-runtime.json new file mode 100644 index 0000000..d54b658 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084200/router_only_plba_code_retrieval_plba-find-entrypoints-create-runtime.json @@ -0,0 +1,221 @@ +{ + "case_id": "plba-find-entrypoints-create-runtime", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/router_only_plba_code_retrieval.yaml", + "runner": "runtime", + "mode": "router_only", + "actual": { + "intent": "PROJECT_MISC", + "sub_intent": "FIND_ENTRYPOINTS", + "graph_id": "ProjectMiscGraph", + "conversation_mode": "START", + "rag_count": 0, + "llm_answer": "", + "answer_mode": "partial", + "path_scope": [], + "symbol_candidates": [ + "runtime" + ], + "layers": [ + "D1_MODULE_CATALOG", + "D3_SECTION_INDEX", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ] + }, + "passed": false, + "mismatches": [ + "intent: expected CODE_QA, got PROJECT_MISC", + "graph_id: expected CodeQAGraph, got ProjectMiscGraph" + ], + "details": { + "case_id": "plba-find-entrypoints-create-runtime", + "text": "Какие точки входа в runtime?", + "mode": "router_only", + "run_started_at": "2026-03-12T08:42:00", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "PROJECT_MISC", + "graph_id": "ProjectMiscGraph", + "conversation_mode": "START", + "query": "Какие точки входа в runtime?", + "symbol_resolution": { + "status": "pending", + "resolved_symbol": null, + "alternatives": [ + "runtime" + ], + "confidence": 0.0 + }, + "rag_count": 0, + "rag_rows": [], + "llm_answer": null, + "summary": { + "router": { + "intent": "PROJECT_MISC", + "sub_intent": "FIND_ENTRYPOINTS", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [], + "evidence_sufficient": false + }, + "llm": { + "answer_status": "partial", + "groundedness": "not_applicable" + } + }, + "diagnostics": { + "router_plan": { + "intent": "PROJECT_MISC", + "sub_intent": "FIND_ENTRYPOINTS", + "graph_id": "ProjectMiscGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "D1_MODULE_CATALOG", + "D3_SECTION_INDEX", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "unknown", + "symbol_candidates": [ + "runtime" + ], + "keyword_hints": [ + "runtime" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [], + "retrieval_mode_by_layer": {}, + "top_k_by_layer": {}, + "filters_by_layer": {}, + "repo_scope": { + "repo_id": null, + "workspace_id": null + } + }, + "retrieval": null, + "constraint_violations": [], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 0, + "retrieval_by_layer": {}, + "merge_rank": 0, + "prompt_build": 0, + "llm_call": 0 + }, + "prompt": null, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "runtime" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 0, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-find-entrypoints-create-runtime", + "mode": "router_only", + "run_started_at": "2026-03-12T08:42:00", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "PROJECT_MISC", + "graph_id": "ProjectMiscGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Какие точки входа в runtime?", + "normalized_query": "Какие точки входа в runtime?" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Какие точки входа в runtime?" + }, + "output": { + "intent": "PROJECT_MISC", + "graph_id": "ProjectMiscGraph", + "conversation_mode": "START", + "query": "Какие точки входа в runtime?" + }, + "diagnostics": { + "router_plan": { + "intent": "PROJECT_MISC", + "sub_intent": "FIND_ENTRYPOINTS", + "graph_id": "ProjectMiscGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "D1_MODULE_CATALOG", + "D3_SECTION_INDEX", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "unknown", + "symbol_candidates": [ + "runtime" + ], + "keyword_hints": [ + "runtime" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084200/router_only_plba_code_retrieval_plba-find-entrypoints-create-runtime.md b/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084200/router_only_plba_code_retrieval_plba-find-entrypoints-create-runtime.md new file mode 100644 index 0000000..eafb098 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084200/router_only_plba_code_retrieval_plba-find-entrypoints-create-runtime.md @@ -0,0 +1,34 @@ +# plba-find-entrypoints-create-runtime + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/router_only_plba_code_retrieval.yaml +- runner: runtime +- mode: router_only +- passed: False + +## Query +Какие точки входа в runtime? + +## Actual +{ + "intent": "PROJECT_MISC", + "sub_intent": "FIND_ENTRYPOINTS", + "graph_id": "ProjectMiscGraph", + "conversation_mode": "START", + "rag_count": 0, + "llm_answer": "", + "answer_mode": "partial", + "path_scope": [], + "symbol_candidates": [ + "runtime" + ], + "layers": [ + "D1_MODULE_CATALOG", + "D3_SECTION_INDEX", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- intent: expected CODE_QA, got PROJECT_MISC +- graph_id: expected CodeQAGraph, got ProjectMiscGraph \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084200/router_only_plba_code_retrieval_plba-find-tests-http-control-channel.json b/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084200/router_only_plba_code_retrieval_plba-find-tests-http-control-channel.json new file mode 100644 index 0000000..dd3fcea --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084200/router_only_plba_code_retrieval_plba-find-tests-http-control-channel.json @@ -0,0 +1,241 @@ +{ + "case_id": "plba-find-tests-http-control-channel", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/router_only_plba_code_retrieval.yaml", + "runner": "runtime", + "mode": "router_only", + "actual": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 0, + "llm_answer": "", + "answer_mode": "partial", + "path_scope": [], + "symbol_candidates": [ + "HttpControlChannel" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-find-tests-http-control-channel", + "text": "Найди тесты для HttpControlChannel", + "mode": "router_only", + "run_started_at": "2026-03-12T08:42:00", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Найди тесты для HttpControlChannel", + "symbol_resolution": { + "status": "pending", + "resolved_symbol": null, + "alternatives": [ + "HttpControlChannel" + ], + "confidence": 0.0 + }, + "rag_count": 0, + "rag_rows": [], + "llm_answer": null, + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [], + "evidence_sufficient": false + }, + "llm": { + "answer_status": "partial", + "groundedness": "not_applicable" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "HttpControlChannel" + ], + "keyword_hints": [ + "HttpControlChannel" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "test_file_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "test_symbol_patterns": [ + "test_http_control_channel", + "TestHttpControlChannel", + "HttpControlChannel" + ], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [], + "retrieval_mode_by_layer": {}, + "top_k_by_layer": {}, + "filters_by_layer": {}, + "repo_scope": { + "repo_id": null, + "workspace_id": null + } + }, + "retrieval": null, + "constraint_violations": [], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 0, + "retrieval_by_layer": {}, + "merge_rank": 0, + "prompt_build": 0, + "llm_call": 0 + }, + "prompt": null, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "HttpControlChannel" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 0, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-find-tests-http-control-channel", + "mode": "router_only", + "run_started_at": "2026-03-12T08:42:00", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Найди тесты для HttpControlChannel", + "normalized_query": "Найди тесты для HttpControlChannel" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Найди тесты для HttpControlChannel" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Найди тесты для HttpControlChannel" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "HttpControlChannel" + ], + "keyword_hints": [ + "HttpControlChannel" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "test_file_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "test_symbol_patterns": [ + "test_http_control_channel", + "TestHttpControlChannel", + "HttpControlChannel" + ], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084200/router_only_plba_code_retrieval_plba-find-tests-http-control-channel.md b/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084200/router_only_plba_code_retrieval_plba-find-tests-http-control-channel.md new file mode 100644 index 0000000..6408e6d --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084200/router_only_plba_code_retrieval_plba-find-tests-http-control-channel.md @@ -0,0 +1,32 @@ +# plba-find-tests-http-control-channel + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/router_only_plba_code_retrieval.yaml +- runner: runtime +- mode: router_only +- passed: True + +## Query +Найди тесты для HttpControlChannel + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 0, + "llm_answer": "", + "answer_mode": "partial", + "path_scope": [], + "symbol_candidates": [ + "HttpControlChannel" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084200/router_only_plba_code_retrieval_plba-find-tests-runtime-manager.json b/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084200/router_only_plba_code_retrieval_plba-find-tests-runtime-manager.json new file mode 100644 index 0000000..98cf4f7 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084200/router_only_plba_code_retrieval_plba-find-tests-runtime-manager.json @@ -0,0 +1,241 @@ +{ + "case_id": "plba-find-tests-runtime-manager", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/router_only_plba_code_retrieval.yaml", + "runner": "runtime", + "mode": "router_only", + "actual": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 0, + "llm_answer": "", + "answer_mode": "partial", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-find-tests-runtime-manager", + "text": "Где тесты для RuntimeManager?", + "mode": "router_only", + "run_started_at": "2026-03-12T08:42:00", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Где тесты для RuntimeManager?", + "symbol_resolution": { + "status": "pending", + "resolved_symbol": null, + "alternatives": [ + "RuntimeManager" + ], + "confidence": 0.0 + }, + "rag_count": 0, + "rag_rows": [], + "llm_answer": null, + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [], + "evidence_sufficient": false + }, + "llm": { + "answer_status": "partial", + "groundedness": "not_applicable" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "test_file_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "test_symbol_patterns": [ + "test_runtime_manager", + "TestRuntimeManager", + "RuntimeManager" + ], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [], + "retrieval_mode_by_layer": {}, + "top_k_by_layer": {}, + "filters_by_layer": {}, + "repo_scope": { + "repo_id": null, + "workspace_id": null + } + }, + "retrieval": null, + "constraint_violations": [], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 0, + "retrieval_by_layer": {}, + "merge_rank": 0, + "prompt_build": 0, + "llm_call": 0 + }, + "prompt": null, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "RuntimeManager" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 0, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-find-tests-runtime-manager", + "mode": "router_only", + "run_started_at": "2026-03-12T08:42:00", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Где тесты для RuntimeManager?", + "normalized_query": "Где тесты для RuntimeManager?" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Где тесты для RuntimeManager?" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Где тесты для RuntimeManager?" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "test_file_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "test_symbol_patterns": [ + "test_runtime_manager", + "TestRuntimeManager", + "RuntimeManager" + ], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084200/router_only_plba_code_retrieval_plba-find-tests-runtime-manager.md b/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084200/router_only_plba_code_retrieval_plba-find-tests-runtime-manager.md new file mode 100644 index 0000000..efd5f2d --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084200/router_only_plba_code_retrieval_plba-find-tests-runtime-manager.md @@ -0,0 +1,32 @@ +# plba-find-tests-runtime-manager + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/router_only_plba_code_retrieval.yaml +- runner: runtime +- mode: router_only +- passed: True + +## Query +Где тесты для RuntimeManager? + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 0, + "llm_answer": "", + "answer_mode": "partial", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084200/router_only_plba_code_retrieval_plba-general-qa-control-plane.json b/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084200/router_only_plba_code_retrieval_plba-general-qa-control-plane.json new file mode 100644 index 0000000..17ca479 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084200/router_only_plba_code_retrieval_plba-general-qa-control-plane.json @@ -0,0 +1,228 @@ +{ + "case_id": "plba-general-qa-control-plane", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/router_only_plba_code_retrieval.yaml", + "runner": "runtime", + "mode": "router_only", + "actual": { + "intent": "PROJECT_MISC", + "sub_intent": "EXPLAIN", + "graph_id": "ProjectMiscGraph", + "conversation_mode": "START", + "rag_count": 0, + "llm_answer": "", + "answer_mode": "partial", + "path_scope": [], + "symbol_candidates": [ + "control", + "plane" + ], + "layers": [ + "D1_MODULE_CATALOG", + "D3_SECTION_INDEX", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ] + }, + "passed": false, + "mismatches": [ + "intent: expected CODE_QA, got PROJECT_MISC", + "graph_id: expected CodeQAGraph, got ProjectMiscGraph" + ], + "details": { + "case_id": "plba-general-qa-control-plane", + "text": "Как в проекте устроен control plane?", + "mode": "router_only", + "run_started_at": "2026-03-12T08:42:00", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "PROJECT_MISC", + "graph_id": "ProjectMiscGraph", + "conversation_mode": "START", + "query": "Как в проекте устроен control plane?", + "symbol_resolution": { + "status": "pending", + "resolved_symbol": null, + "alternatives": [ + "control", + "plane" + ], + "confidence": 0.0 + }, + "rag_count": 0, + "rag_rows": [], + "llm_answer": null, + "summary": { + "router": { + "intent": "PROJECT_MISC", + "sub_intent": "EXPLAIN", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [], + "evidence_sufficient": false + }, + "llm": { + "answer_status": "partial", + "groundedness": "not_applicable" + } + }, + "diagnostics": { + "router_plan": { + "intent": "PROJECT_MISC", + "sub_intent": "EXPLAIN", + "graph_id": "ProjectMiscGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "D1_MODULE_CATALOG", + "D3_SECTION_INDEX", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "unknown", + "symbol_candidates": [ + "control", + "plane" + ], + "keyword_hints": [ + "control", + "plane" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [], + "retrieval_mode_by_layer": {}, + "top_k_by_layer": {}, + "filters_by_layer": {}, + "repo_scope": { + "repo_id": null, + "workspace_id": null + } + }, + "retrieval": null, + "constraint_violations": [], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 0, + "retrieval_by_layer": {}, + "merge_rank": 0, + "prompt_build": 0, + "llm_call": 0 + }, + "prompt": null, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "control", + "plane" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 0, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-general-qa-control-plane", + "mode": "router_only", + "run_started_at": "2026-03-12T08:42:00", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "PROJECT_MISC", + "graph_id": "ProjectMiscGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Как в проекте устроен control plane?", + "normalized_query": "Как в проекте устроен control plane?" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Как в проекте устроен control plane?" + }, + "output": { + "intent": "PROJECT_MISC", + "graph_id": "ProjectMiscGraph", + "conversation_mode": "START", + "query": "Как в проекте устроен control plane?" + }, + "diagnostics": { + "router_plan": { + "intent": "PROJECT_MISC", + "sub_intent": "EXPLAIN", + "graph_id": "ProjectMiscGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "D1_MODULE_CATALOG", + "D3_SECTION_INDEX", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "unknown", + "symbol_candidates": [ + "control", + "plane" + ], + "keyword_hints": [ + "control", + "plane" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084200/router_only_plba_code_retrieval_plba-general-qa-control-plane.md b/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084200/router_only_plba_code_retrieval_plba-general-qa-control-plane.md new file mode 100644 index 0000000..de8e7e2 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084200/router_only_plba_code_retrieval_plba-general-qa-control-plane.md @@ -0,0 +1,35 @@ +# plba-general-qa-control-plane + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/router_only_plba_code_retrieval.yaml +- runner: runtime +- mode: router_only +- passed: False + +## Query +Как в проекте устроен control plane? + +## Actual +{ + "intent": "PROJECT_MISC", + "sub_intent": "EXPLAIN", + "graph_id": "ProjectMiscGraph", + "conversation_mode": "START", + "rag_count": 0, + "llm_answer": "", + "answer_mode": "partial", + "path_scope": [], + "symbol_candidates": [ + "control", + "plane" + ], + "layers": [ + "D1_MODULE_CATALOG", + "D3_SECTION_INDEX", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- intent: expected CODE_QA, got PROJECT_MISC +- graph_id: expected CodeQAGraph, got ProjectMiscGraph \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084200/router_only_plba_code_retrieval_plba-general-qa-runtime.json b/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084200/router_only_plba_code_retrieval_plba-general-qa-runtime.json new file mode 100644 index 0000000..7e18b0f --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084200/router_only_plba_code_retrieval_plba-general-qa-runtime.json @@ -0,0 +1,221 @@ +{ + "case_id": "plba-general-qa-runtime", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/router_only_plba_code_retrieval.yaml", + "runner": "runtime", + "mode": "router_only", + "actual": { + "intent": "PROJECT_MISC", + "sub_intent": "EXPLAIN", + "graph_id": "ProjectMiscGraph", + "conversation_mode": "START", + "rag_count": 0, + "llm_answer": "", + "answer_mode": "partial", + "path_scope": [], + "symbol_candidates": [ + "runtime" + ], + "layers": [ + "D1_MODULE_CATALOG", + "D3_SECTION_INDEX", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ] + }, + "passed": false, + "mismatches": [ + "intent: expected CODE_QA, got PROJECT_MISC", + "graph_id: expected CodeQAGraph, got ProjectMiscGraph" + ], + "details": { + "case_id": "plba-general-qa-runtime", + "text": "Как устроен runtime в проекте?", + "mode": "router_only", + "run_started_at": "2026-03-12T08:42:00", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "PROJECT_MISC", + "graph_id": "ProjectMiscGraph", + "conversation_mode": "START", + "query": "Как устроен runtime в проекте?", + "symbol_resolution": { + "status": "pending", + "resolved_symbol": null, + "alternatives": [ + "runtime" + ], + "confidence": 0.0 + }, + "rag_count": 0, + "rag_rows": [], + "llm_answer": null, + "summary": { + "router": { + "intent": "PROJECT_MISC", + "sub_intent": "EXPLAIN", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [], + "evidence_sufficient": false + }, + "llm": { + "answer_status": "partial", + "groundedness": "not_applicable" + } + }, + "diagnostics": { + "router_plan": { + "intent": "PROJECT_MISC", + "sub_intent": "EXPLAIN", + "graph_id": "ProjectMiscGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "D1_MODULE_CATALOG", + "D3_SECTION_INDEX", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "unknown", + "symbol_candidates": [ + "runtime" + ], + "keyword_hints": [ + "runtime" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [], + "retrieval_mode_by_layer": {}, + "top_k_by_layer": {}, + "filters_by_layer": {}, + "repo_scope": { + "repo_id": null, + "workspace_id": null + } + }, + "retrieval": null, + "constraint_violations": [], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 0, + "retrieval_by_layer": {}, + "merge_rank": 0, + "prompt_build": 0, + "llm_call": 0 + }, + "prompt": null, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "runtime" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 0, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-general-qa-runtime", + "mode": "router_only", + "run_started_at": "2026-03-12T08:42:00", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "PROJECT_MISC", + "graph_id": "ProjectMiscGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Как устроен runtime в проекте?", + "normalized_query": "Как устроен runtime в проекте?" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Как устроен runtime в проекте?" + }, + "output": { + "intent": "PROJECT_MISC", + "graph_id": "ProjectMiscGraph", + "conversation_mode": "START", + "query": "Как устроен runtime в проекте?" + }, + "diagnostics": { + "router_plan": { + "intent": "PROJECT_MISC", + "sub_intent": "EXPLAIN", + "graph_id": "ProjectMiscGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "D1_MODULE_CATALOG", + "D3_SECTION_INDEX", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "unknown", + "symbol_candidates": [ + "runtime" + ], + "keyword_hints": [ + "runtime" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084200/router_only_plba_code_retrieval_plba-general-qa-runtime.md b/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084200/router_only_plba_code_retrieval_plba-general-qa-runtime.md new file mode 100644 index 0000000..bcad0d8 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084200/router_only_plba_code_retrieval_plba-general-qa-runtime.md @@ -0,0 +1,34 @@ +# plba-general-qa-runtime + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/router_only_plba_code_retrieval.yaml +- runner: runtime +- mode: router_only +- passed: False + +## Query +Как устроен runtime в проекте? + +## Actual +{ + "intent": "PROJECT_MISC", + "sub_intent": "EXPLAIN", + "graph_id": "ProjectMiscGraph", + "conversation_mode": "START", + "rag_count": 0, + "llm_answer": "", + "answer_mode": "partial", + "path_scope": [], + "symbol_candidates": [ + "runtime" + ], + "layers": [ + "D1_MODULE_CATALOG", + "D3_SECTION_INDEX", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- intent: expected CODE_QA, got PROJECT_MISC +- graph_id: expected CodeQAGraph, got ProjectMiscGraph \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084200/router_only_plba_code_retrieval_plba-open-http-control-channel-file.json b/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084200/router_only_plba_code_retrieval_plba-open-http-control-channel-file.json new file mode 100644 index 0000000..813adf2 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084200/router_only_plba_code_retrieval_plba-open-http-control-channel-file.json @@ -0,0 +1,207 @@ +{ + "case_id": "plba-open-http-control-channel-file", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/router_only_plba_code_retrieval.yaml", + "runner": "runtime", + "mode": "router_only", + "actual": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 0, + "llm_answer": "", + "answer_mode": "partial", + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "symbol_candidates": [], + "layers": [ + "C0_SOURCE_CHUNKS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-open-http-control-channel-file", + "text": "Покажи файл src/app_runtime/control/http_channel.py", + "mode": "router_only", + "run_started_at": "2026-03-12T08:42:00", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Покажи файл src/app_runtime/control/http_channel.py", + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [], + "confidence": 0.0 + }, + "rag_count": 0, + "rag_rows": [], + "llm_answer": null, + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [], + "evidence_sufficient": false + }, + "llm": { + "answer_status": "partial", + "groundedness": "not_applicable" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "unknown", + "symbol_candidates": [], + "keyword_hints": [], + "path_hints": [ + "src/app_runtime/control/http_channel.py" + ], + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/app_runtime/control/http_channel.py" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": false, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [], + "retrieval_mode_by_layer": {}, + "top_k_by_layer": {}, + "filters_by_layer": {}, + "repo_scope": { + "repo_id": null, + "workspace_id": null + } + }, + "retrieval": null, + "constraint_violations": [], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 0, + "retrieval_by_layer": {}, + "merge_rank": 0, + "prompt_build": 0, + "llm_call": 0 + }, + "prompt": null, + "router": { + "conversation_mode": "START", + "keyword_hints": [], + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ] + }, + "llm": { + "used_evidence_count": 0, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-open-http-control-channel-file", + "mode": "router_only", + "run_started_at": "2026-03-12T08:42:00", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Покажи файл src/app_runtime/control/http_channel.py", + "normalized_query": "Покажи файл src/app_runtime/control/http_channel.py" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Покажи файл src/app_runtime/control/http_channel.py" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Покажи файл src/app_runtime/control/http_channel.py" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "unknown", + "symbol_candidates": [], + "keyword_hints": [], + "path_hints": [ + "src/app_runtime/control/http_channel.py" + ], + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/app_runtime/control/http_channel.py" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": false, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084200/router_only_plba_code_retrieval_plba-open-http-control-channel-file.md b/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084200/router_only_plba_code_retrieval_plba-open-http-control-channel-file.md new file mode 100644 index 0000000..9295e3d --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084200/router_only_plba_code_retrieval_plba-open-http-control-channel-file.md @@ -0,0 +1,30 @@ +# plba-open-http-control-channel-file + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/router_only_plba_code_retrieval.yaml +- runner: runtime +- mode: router_only +- passed: True + +## Query +Покажи файл src/app_runtime/control/http_channel.py + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 0, + "llm_answer": "", + "answer_mode": "partial", + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "symbol_candidates": [], + "layers": [ + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084200/router_only_plba_code_retrieval_plba-open-runtime-manager-file.json b/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084200/router_only_plba_code_retrieval_plba-open-runtime-manager-file.json new file mode 100644 index 0000000..b50a6b2 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084200/router_only_plba_code_retrieval_plba-open-runtime-manager-file.json @@ -0,0 +1,207 @@ +{ + "case_id": "plba-open-runtime-manager-file", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/router_only_plba_code_retrieval.yaml", + "runner": "runtime", + "mode": "router_only", + "actual": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 0, + "llm_answer": "", + "answer_mode": "partial", + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "symbol_candidates": [], + "layers": [ + "C0_SOURCE_CHUNKS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-open-runtime-manager-file", + "text": "Открой файл src/app_runtime/core/runtime.py", + "mode": "router_only", + "run_started_at": "2026-03-12T08:42:00", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Открой файл src/app_runtime/core/runtime.py", + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [], + "confidence": 0.0 + }, + "rag_count": 0, + "rag_rows": [], + "llm_answer": null, + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [], + "evidence_sufficient": false + }, + "llm": { + "answer_status": "partial", + "groundedness": "not_applicable" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "unknown", + "symbol_candidates": [], + "keyword_hints": [], + "path_hints": [ + "src/app_runtime/core/runtime.py" + ], + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/app_runtime/core/runtime.py" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": false, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [], + "retrieval_mode_by_layer": {}, + "top_k_by_layer": {}, + "filters_by_layer": {}, + "repo_scope": { + "repo_id": null, + "workspace_id": null + } + }, + "retrieval": null, + "constraint_violations": [], + "timings_ms": { + "router": 1, + "symbol_resolution": 0, + "retrieval_total": 0, + "retrieval_by_layer": {}, + "merge_rank": 0, + "prompt_build": 0, + "llm_call": 0 + }, + "prompt": null, + "router": { + "conversation_mode": "START", + "keyword_hints": [], + "path_scope": [ + "src/app_runtime/core/runtime.py" + ] + }, + "llm": { + "used_evidence_count": 0, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-open-runtime-manager-file", + "mode": "router_only", + "run_started_at": "2026-03-12T08:42:00", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Открой файл src/app_runtime/core/runtime.py", + "normalized_query": "Открой файл src/app_runtime/core/runtime.py" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Открой файл src/app_runtime/core/runtime.py" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Открой файл src/app_runtime/core/runtime.py" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "unknown", + "symbol_candidates": [], + "keyword_hints": [], + "path_hints": [ + "src/app_runtime/core/runtime.py" + ], + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/app_runtime/core/runtime.py" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": false, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 1 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084200/router_only_plba_code_retrieval_plba-open-runtime-manager-file.md b/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084200/router_only_plba_code_retrieval_plba-open-runtime-manager-file.md new file mode 100644 index 0000000..5c4114d --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084200/router_only_plba_code_retrieval_plba-open-runtime-manager-file.md @@ -0,0 +1,30 @@ +# plba-open-runtime-manager-file + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/router_only_plba_code_retrieval.yaml +- runner: runtime +- mode: router_only +- passed: True + +## Query +Открой файл src/app_runtime/core/runtime.py + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 0, + "llm_answer": "", + "answer_mode": "partial", + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "symbol_candidates": [], + "layers": [ + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084200/summary.md b/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084200/summary.md new file mode 100644 index 0000000..50ee39f --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084200/summary.md @@ -0,0 +1,23 @@ +# pipeline_setup_v2 summary + +Passed: 7/11 + +| File | Case | Runner | Mode | Intent | Sub-intent | Pass | +|------|------|--------|------|--------|------------|------| +| router_only_plba_code_retrieval.yaml | plba-open-runtime-manager-file | runtime | router_only | CODE_QA | OPEN_FILE | ✓ | +| router_only_plba_code_retrieval.yaml | plba-open-http-control-channel-file | runtime | router_only | CODE_QA | OPEN_FILE | ✓ | +| router_only_plba_code_retrieval.yaml | plba-explain-runtime-manager | runtime | router_only | CODE_QA | EXPLAIN | ✓ | +| router_only_plba_code_retrieval.yaml | plba-explain-http-control-channel | runtime | router_only | CODE_QA | EXPLAIN | ✓ | +| router_only_plba_code_retrieval.yaml | plba-explain-trace-service | runtime | router_only | CODE_QA | EXPLAIN | ✓ | +| router_only_plba_code_retrieval.yaml | plba-find-tests-runtime-manager | runtime | router_only | CODE_QA | FIND_TESTS | ✓ | +| router_only_plba_code_retrieval.yaml | plba-find-tests-http-control-channel | runtime | router_only | CODE_QA | FIND_TESTS | ✓ | +| router_only_plba_code_retrieval.yaml | plba-find-entrypoints-create-runtime | runtime | router_only | PROJECT_MISC | FIND_ENTRYPOINTS | ✗ | +| router_only_plba_code_retrieval.yaml | plba-find-entrypoints-bootstrap | runtime | router_only | PROJECT_MISC | EXPLAIN | ✗ | +| router_only_plba_code_retrieval.yaml | plba-general-qa-runtime | runtime | router_only | PROJECT_MISC | EXPLAIN | ✗ | +| router_only_plba_code_retrieval.yaml | plba-general-qa-control-plane | runtime | router_only | PROJECT_MISC | EXPLAIN | ✗ | + +## Failures +- **plba-find-entrypoints-create-runtime**: intent: expected CODE_QA, got PROJECT_MISC; graph_id: expected CodeQAGraph, got ProjectMiscGraph +- **plba-find-entrypoints-bootstrap**: intent: expected CODE_QA, got PROJECT_MISC; sub_intent: expected FIND_ENTRYPOINTS, got EXPLAIN; graph_id: expected CodeQAGraph, got ProjectMiscGraph +- **plba-general-qa-runtime**: intent: expected CODE_QA, got PROJECT_MISC; graph_id: expected CodeQAGraph, got ProjectMiscGraph +- **plba-general-qa-control-plane**: intent: expected CODE_QA, got PROJECT_MISC; graph_id: expected CodeQAGraph, got ProjectMiscGraph \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084313/router_only_plba_code_retrieval_plba-explain-http-control-channel.json b/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084313/router_only_plba_code_retrieval_plba-explain-http-control-channel.json new file mode 100644 index 0000000..ffde555 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084313/router_only_plba_code_retrieval_plba-explain-http-control-channel.json @@ -0,0 +1,221 @@ +{ + "case_id": "plba-explain-http-control-channel", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/router_only_plba_code_retrieval.yaml", + "runner": "runtime", + "mode": "router_only", + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 0, + "llm_answer": "", + "answer_mode": "partial", + "path_scope": [], + "symbol_candidates": [ + "HttpControlChannel" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-explain-http-control-channel", + "text": "Объясни класс HttpControlChannel", + "mode": "router_only", + "run_started_at": "2026-03-12T08:43:13", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни класс HttpControlChannel", + "symbol_resolution": { + "status": "pending", + "resolved_symbol": null, + "alternatives": [ + "HttpControlChannel" + ], + "confidence": 0.0 + }, + "rag_count": 0, + "rag_rows": [], + "llm_answer": null, + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [], + "evidence_sufficient": false + }, + "llm": { + "answer_status": "partial", + "groundedness": "not_applicable" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "HttpControlChannel" + ], + "keyword_hints": [ + "HttpControlChannel" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [], + "retrieval_mode_by_layer": {}, + "top_k_by_layer": {}, + "filters_by_layer": {}, + "repo_scope": { + "repo_id": null, + "workspace_id": null + } + }, + "retrieval": null, + "constraint_violations": [], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 0, + "retrieval_by_layer": {}, + "merge_rank": 0, + "prompt_build": 0, + "llm_call": 0 + }, + "prompt": null, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "HttpControlChannel" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 0, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-explain-http-control-channel", + "mode": "router_only", + "run_started_at": "2026-03-12T08:43:13", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Объясни класс HttpControlChannel", + "normalized_query": "Объясни класс HttpControlChannel" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Объясни класс HttpControlChannel" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни класс HttpControlChannel" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "HttpControlChannel" + ], + "keyword_hints": [ + "HttpControlChannel" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084313/router_only_plba_code_retrieval_plba-explain-http-control-channel.md b/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084313/router_only_plba_code_retrieval_plba-explain-http-control-channel.md new file mode 100644 index 0000000..ae60689 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084313/router_only_plba_code_retrieval_plba-explain-http-control-channel.md @@ -0,0 +1,34 @@ +# plba-explain-http-control-channel + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/router_only_plba_code_retrieval.yaml +- runner: runtime +- mode: router_only +- passed: True + +## Query +Объясни класс HttpControlChannel + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 0, + "llm_answer": "", + "answer_mode": "partial", + "path_scope": [], + "symbol_candidates": [ + "HttpControlChannel" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084313/router_only_plba_code_retrieval_plba-explain-runtime-manager.json b/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084313/router_only_plba_code_retrieval_plba-explain-runtime-manager.json new file mode 100644 index 0000000..d49c0cb --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084313/router_only_plba_code_retrieval_plba-explain-runtime-manager.json @@ -0,0 +1,221 @@ +{ + "case_id": "plba-explain-runtime-manager", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/router_only_plba_code_retrieval.yaml", + "runner": "runtime", + "mode": "router_only", + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 0, + "llm_answer": "", + "answer_mode": "partial", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-explain-runtime-manager", + "text": "Объясни как работает класс RuntimeManager", + "mode": "router_only", + "run_started_at": "2026-03-12T08:43:13", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни как работает класс RuntimeManager", + "symbol_resolution": { + "status": "pending", + "resolved_symbol": null, + "alternatives": [ + "RuntimeManager" + ], + "confidence": 0.0 + }, + "rag_count": 0, + "rag_rows": [], + "llm_answer": null, + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [], + "evidence_sufficient": false + }, + "llm": { + "answer_status": "partial", + "groundedness": "not_applicable" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [], + "retrieval_mode_by_layer": {}, + "top_k_by_layer": {}, + "filters_by_layer": {}, + "repo_scope": { + "repo_id": null, + "workspace_id": null + } + }, + "retrieval": null, + "constraint_violations": [], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 0, + "retrieval_by_layer": {}, + "merge_rank": 0, + "prompt_build": 0, + "llm_call": 0 + }, + "prompt": null, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "RuntimeManager" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 0, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-explain-runtime-manager", + "mode": "router_only", + "run_started_at": "2026-03-12T08:43:13", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Объясни как работает класс RuntimeManager", + "normalized_query": "Объясни как работает класс RuntimeManager" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Объясни как работает класс RuntimeManager" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни как работает класс RuntimeManager" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084313/router_only_plba_code_retrieval_plba-explain-runtime-manager.md b/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084313/router_only_plba_code_retrieval_plba-explain-runtime-manager.md new file mode 100644 index 0000000..23226ea --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084313/router_only_plba_code_retrieval_plba-explain-runtime-manager.md @@ -0,0 +1,34 @@ +# plba-explain-runtime-manager + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/router_only_plba_code_retrieval.yaml +- runner: runtime +- mode: router_only +- passed: True + +## Query +Объясни как работает класс RuntimeManager + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 0, + "llm_answer": "", + "answer_mode": "partial", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084313/router_only_plba_code_retrieval_plba-explain-trace-service.json b/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084313/router_only_plba_code_retrieval_plba-explain-trace-service.json new file mode 100644 index 0000000..86a08a6 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084313/router_only_plba_code_retrieval_plba-explain-trace-service.json @@ -0,0 +1,221 @@ +{ + "case_id": "plba-explain-trace-service", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/router_only_plba_code_retrieval.yaml", + "runner": "runtime", + "mode": "router_only", + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 0, + "llm_answer": "", + "answer_mode": "partial", + "path_scope": [], + "symbol_candidates": [ + "TraceService" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-explain-trace-service", + "text": "Как работает TraceService?", + "mode": "router_only", + "run_started_at": "2026-03-12T08:43:13", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Как работает TraceService?", + "symbol_resolution": { + "status": "pending", + "resolved_symbol": null, + "alternatives": [ + "TraceService" + ], + "confidence": 0.0 + }, + "rag_count": 0, + "rag_rows": [], + "llm_answer": null, + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [], + "evidence_sufficient": false + }, + "llm": { + "answer_status": "partial", + "groundedness": "not_applicable" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "TraceService" + ], + "keyword_hints": [ + "TraceService" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [], + "retrieval_mode_by_layer": {}, + "top_k_by_layer": {}, + "filters_by_layer": {}, + "repo_scope": { + "repo_id": null, + "workspace_id": null + } + }, + "retrieval": null, + "constraint_violations": [], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 0, + "retrieval_by_layer": {}, + "merge_rank": 0, + "prompt_build": 0, + "llm_call": 0 + }, + "prompt": null, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "TraceService" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 0, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-explain-trace-service", + "mode": "router_only", + "run_started_at": "2026-03-12T08:43:13", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Как работает TraceService?", + "normalized_query": "Как работает TraceService?" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Как работает TraceService?" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Как работает TraceService?" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "TraceService" + ], + "keyword_hints": [ + "TraceService" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084313/router_only_plba_code_retrieval_plba-explain-trace-service.md b/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084313/router_only_plba_code_retrieval_plba-explain-trace-service.md new file mode 100644 index 0000000..4004971 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084313/router_only_plba_code_retrieval_plba-explain-trace-service.md @@ -0,0 +1,34 @@ +# plba-explain-trace-service + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/router_only_plba_code_retrieval.yaml +- runner: runtime +- mode: router_only +- passed: True + +## Query +Как работает TraceService? + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 0, + "llm_answer": "", + "answer_mode": "partial", + "path_scope": [], + "symbol_candidates": [ + "TraceService" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084313/router_only_plba_code_retrieval_plba-find-entrypoints-bootstrap.json b/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084313/router_only_plba_code_retrieval_plba-find-entrypoints-bootstrap.json new file mode 100644 index 0000000..7c3542b --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084313/router_only_plba_code_retrieval_plba-find-entrypoints-bootstrap.json @@ -0,0 +1,221 @@ +{ + "case_id": "plba-find-entrypoints-bootstrap", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/router_only_plba_code_retrieval.yaml", + "runner": "runtime", + "mode": "router_only", + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 0, + "llm_answer": "", + "answer_mode": "partial", + "path_scope": [], + "symbol_candidates": [ + "create_runtime" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-find-entrypoints-bootstrap", + "text": "Объясни функцию create_runtime", + "mode": "router_only", + "run_started_at": "2026-03-12T08:43:13", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни функцию create_runtime", + "symbol_resolution": { + "status": "pending", + "resolved_symbol": null, + "alternatives": [ + "create_runtime" + ], + "confidence": 0.0 + }, + "rag_count": 0, + "rag_rows": [], + "llm_answer": null, + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [], + "evidence_sufficient": false + }, + "llm": { + "answer_status": "partial", + "groundedness": "not_applicable" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "function", + "symbol_candidates": [ + "create_runtime" + ], + "keyword_hints": [ + "create_runtime" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [], + "retrieval_mode_by_layer": {}, + "top_k_by_layer": {}, + "filters_by_layer": {}, + "repo_scope": { + "repo_id": null, + "workspace_id": null + } + }, + "retrieval": null, + "constraint_violations": [], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 0, + "retrieval_by_layer": {}, + "merge_rank": 0, + "prompt_build": 0, + "llm_call": 0 + }, + "prompt": null, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "create_runtime" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 0, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-find-entrypoints-bootstrap", + "mode": "router_only", + "run_started_at": "2026-03-12T08:43:13", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Объясни функцию create_runtime", + "normalized_query": "Объясни функцию create_runtime" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Объясни функцию create_runtime" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни функцию create_runtime" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "function", + "symbol_candidates": [ + "create_runtime" + ], + "keyword_hints": [ + "create_runtime" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084313/router_only_plba_code_retrieval_plba-find-entrypoints-bootstrap.md b/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084313/router_only_plba_code_retrieval_plba-find-entrypoints-bootstrap.md new file mode 100644 index 0000000..4e23988 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084313/router_only_plba_code_retrieval_plba-find-entrypoints-bootstrap.md @@ -0,0 +1,34 @@ +# plba-find-entrypoints-bootstrap + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/router_only_plba_code_retrieval.yaml +- runner: runtime +- mode: router_only +- passed: True + +## Query +Объясни функцию create_runtime + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 0, + "llm_answer": "", + "answer_mode": "partial", + "path_scope": [], + "symbol_candidates": [ + "create_runtime" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084313/router_only_plba_code_retrieval_plba-find-entrypoints-create-runtime.json b/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084313/router_only_plba_code_retrieval_plba-find-entrypoints-create-runtime.json new file mode 100644 index 0000000..587e0b2 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084313/router_only_plba_code_retrieval_plba-find-entrypoints-create-runtime.json @@ -0,0 +1,198 @@ +{ + "case_id": "plba-find-entrypoints-create-runtime", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/router_only_plba_code_retrieval.yaml", + "runner": "runtime", + "mode": "router_only", + "actual": { + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 0, + "llm_answer": "", + "answer_mode": "partial", + "path_scope": [], + "symbol_candidates": [], + "layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-find-entrypoints-create-runtime", + "text": "Найди точки входа в коде", + "mode": "router_only", + "run_started_at": "2026-03-12T08:43:13", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Найди точки входа в коде", + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [], + "confidence": 0.0 + }, + "rag_count": 0, + "rag_rows": [], + "llm_answer": null, + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [], + "evidence_sufficient": false + }, + "llm": { + "answer_status": "partial", + "groundedness": "not_applicable" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "unknown", + "symbol_candidates": [], + "keyword_hints": [], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [], + "retrieval_mode_by_layer": {}, + "top_k_by_layer": {}, + "filters_by_layer": {}, + "repo_scope": { + "repo_id": null, + "workspace_id": null + } + }, + "retrieval": null, + "constraint_violations": [], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 0, + "retrieval_by_layer": {}, + "merge_rank": 0, + "prompt_build": 0, + "llm_call": 0 + }, + "prompt": null, + "router": { + "conversation_mode": "START", + "keyword_hints": [], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 0, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-find-entrypoints-create-runtime", + "mode": "router_only", + "run_started_at": "2026-03-12T08:43:13", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Найди точки входа в коде", + "normalized_query": "Найди точки входа в коде" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Найди точки входа в коде" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Найди точки входа в коде" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "unknown", + "symbol_candidates": [], + "keyword_hints": [], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084313/router_only_plba_code_retrieval_plba-find-entrypoints-create-runtime.md b/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084313/router_only_plba_code_retrieval_plba-find-entrypoints-create-runtime.md new file mode 100644 index 0000000..3e0cc41 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084313/router_only_plba_code_retrieval_plba-find-entrypoints-create-runtime.md @@ -0,0 +1,29 @@ +# plba-find-entrypoints-create-runtime + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/router_only_plba_code_retrieval.yaml +- runner: runtime +- mode: router_only +- passed: True + +## Query +Найди точки входа в коде + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 0, + "llm_answer": "", + "answer_mode": "partial", + "path_scope": [], + "symbol_candidates": [], + "layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084313/router_only_plba_code_retrieval_plba-find-tests-http-control-channel.json b/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084313/router_only_plba_code_retrieval_plba-find-tests-http-control-channel.json new file mode 100644 index 0000000..169ab24 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084313/router_only_plba_code_retrieval_plba-find-tests-http-control-channel.json @@ -0,0 +1,241 @@ +{ + "case_id": "plba-find-tests-http-control-channel", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/router_only_plba_code_retrieval.yaml", + "runner": "runtime", + "mode": "router_only", + "actual": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 0, + "llm_answer": "", + "answer_mode": "partial", + "path_scope": [], + "symbol_candidates": [ + "HttpControlChannel" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-find-tests-http-control-channel", + "text": "Найди тесты для HttpControlChannel", + "mode": "router_only", + "run_started_at": "2026-03-12T08:43:13", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Найди тесты для HttpControlChannel", + "symbol_resolution": { + "status": "pending", + "resolved_symbol": null, + "alternatives": [ + "HttpControlChannel" + ], + "confidence": 0.0 + }, + "rag_count": 0, + "rag_rows": [], + "llm_answer": null, + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [], + "evidence_sufficient": false + }, + "llm": { + "answer_status": "partial", + "groundedness": "not_applicable" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "HttpControlChannel" + ], + "keyword_hints": [ + "HttpControlChannel" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "test_file_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "test_symbol_patterns": [ + "test_http_control_channel", + "TestHttpControlChannel", + "HttpControlChannel" + ], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [], + "retrieval_mode_by_layer": {}, + "top_k_by_layer": {}, + "filters_by_layer": {}, + "repo_scope": { + "repo_id": null, + "workspace_id": null + } + }, + "retrieval": null, + "constraint_violations": [], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 0, + "retrieval_by_layer": {}, + "merge_rank": 0, + "prompt_build": 0, + "llm_call": 0 + }, + "prompt": null, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "HttpControlChannel" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 0, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-find-tests-http-control-channel", + "mode": "router_only", + "run_started_at": "2026-03-12T08:43:13", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Найди тесты для HttpControlChannel", + "normalized_query": "Найди тесты для HttpControlChannel" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Найди тесты для HttpControlChannel" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Найди тесты для HttpControlChannel" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "HttpControlChannel" + ], + "keyword_hints": [ + "HttpControlChannel" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "test_file_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "test_symbol_patterns": [ + "test_http_control_channel", + "TestHttpControlChannel", + "HttpControlChannel" + ], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084313/router_only_plba_code_retrieval_plba-find-tests-http-control-channel.md b/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084313/router_only_plba_code_retrieval_plba-find-tests-http-control-channel.md new file mode 100644 index 0000000..6408e6d --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084313/router_only_plba_code_retrieval_plba-find-tests-http-control-channel.md @@ -0,0 +1,32 @@ +# plba-find-tests-http-control-channel + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/router_only_plba_code_retrieval.yaml +- runner: runtime +- mode: router_only +- passed: True + +## Query +Найди тесты для HttpControlChannel + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 0, + "llm_answer": "", + "answer_mode": "partial", + "path_scope": [], + "symbol_candidates": [ + "HttpControlChannel" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084313/router_only_plba_code_retrieval_plba-find-tests-runtime-manager.json b/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084313/router_only_plba_code_retrieval_plba-find-tests-runtime-manager.json new file mode 100644 index 0000000..652c5f4 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084313/router_only_plba_code_retrieval_plba-find-tests-runtime-manager.json @@ -0,0 +1,241 @@ +{ + "case_id": "plba-find-tests-runtime-manager", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/router_only_plba_code_retrieval.yaml", + "runner": "runtime", + "mode": "router_only", + "actual": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 0, + "llm_answer": "", + "answer_mode": "partial", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-find-tests-runtime-manager", + "text": "Где тесты для RuntimeManager?", + "mode": "router_only", + "run_started_at": "2026-03-12T08:43:13", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Где тесты для RuntimeManager?", + "symbol_resolution": { + "status": "pending", + "resolved_symbol": null, + "alternatives": [ + "RuntimeManager" + ], + "confidence": 0.0 + }, + "rag_count": 0, + "rag_rows": [], + "llm_answer": null, + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [], + "evidence_sufficient": false + }, + "llm": { + "answer_status": "partial", + "groundedness": "not_applicable" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "test_file_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "test_symbol_patterns": [ + "test_runtime_manager", + "TestRuntimeManager", + "RuntimeManager" + ], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [], + "retrieval_mode_by_layer": {}, + "top_k_by_layer": {}, + "filters_by_layer": {}, + "repo_scope": { + "repo_id": null, + "workspace_id": null + } + }, + "retrieval": null, + "constraint_violations": [], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 0, + "retrieval_by_layer": {}, + "merge_rank": 0, + "prompt_build": 0, + "llm_call": 0 + }, + "prompt": null, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "RuntimeManager" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 0, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-find-tests-runtime-manager", + "mode": "router_only", + "run_started_at": "2026-03-12T08:43:13", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Где тесты для RuntimeManager?", + "normalized_query": "Где тесты для RuntimeManager?" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Где тесты для RuntimeManager?" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Где тесты для RuntimeManager?" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "test_file_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "test_symbol_patterns": [ + "test_runtime_manager", + "TestRuntimeManager", + "RuntimeManager" + ], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084313/router_only_plba_code_retrieval_plba-find-tests-runtime-manager.md b/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084313/router_only_plba_code_retrieval_plba-find-tests-runtime-manager.md new file mode 100644 index 0000000..efd5f2d --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084313/router_only_plba_code_retrieval_plba-find-tests-runtime-manager.md @@ -0,0 +1,32 @@ +# plba-find-tests-runtime-manager + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/router_only_plba_code_retrieval.yaml +- runner: runtime +- mode: router_only +- passed: True + +## Query +Где тесты для RuntimeManager? + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 0, + "llm_answer": "", + "answer_mode": "partial", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084313/router_only_plba_code_retrieval_plba-general-qa-control-plane.json b/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084313/router_only_plba_code_retrieval_plba-general-qa-control-plane.json new file mode 100644 index 0000000..8287a38 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084313/router_only_plba_code_retrieval_plba-general-qa-control-plane.json @@ -0,0 +1,228 @@ +{ + "case_id": "plba-general-qa-control-plane", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/router_only_plba_code_retrieval.yaml", + "runner": "runtime", + "mode": "router_only", + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 0, + "llm_answer": "", + "answer_mode": "partial", + "path_scope": [], + "symbol_candidates": [ + "control", + "plane" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-general-qa-control-plane", + "text": "Объясни код control plane", + "mode": "router_only", + "run_started_at": "2026-03-12T08:43:13", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни код control plane", + "symbol_resolution": { + "status": "pending", + "resolved_symbol": null, + "alternatives": [ + "control", + "plane" + ], + "confidence": 0.0 + }, + "rag_count": 0, + "rag_rows": [], + "llm_answer": null, + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [], + "evidence_sufficient": false + }, + "llm": { + "answer_status": "partial", + "groundedness": "not_applicable" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "unknown", + "symbol_candidates": [ + "control", + "plane" + ], + "keyword_hints": [ + "control", + "plane" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [], + "retrieval_mode_by_layer": {}, + "top_k_by_layer": {}, + "filters_by_layer": {}, + "repo_scope": { + "repo_id": null, + "workspace_id": null + } + }, + "retrieval": null, + "constraint_violations": [], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 0, + "retrieval_by_layer": {}, + "merge_rank": 0, + "prompt_build": 0, + "llm_call": 0 + }, + "prompt": null, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "control", + "plane" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 0, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-general-qa-control-plane", + "mode": "router_only", + "run_started_at": "2026-03-12T08:43:13", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Объясни код control plane", + "normalized_query": "Объясни код control plane" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Объясни код control plane" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни код control plane" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "unknown", + "symbol_candidates": [ + "control", + "plane" + ], + "keyword_hints": [ + "control", + "plane" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084313/router_only_plba_code_retrieval_plba-general-qa-control-plane.md b/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084313/router_only_plba_code_retrieval_plba-general-qa-control-plane.md new file mode 100644 index 0000000..1ed75ac --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084313/router_only_plba_code_retrieval_plba-general-qa-control-plane.md @@ -0,0 +1,35 @@ +# plba-general-qa-control-plane + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/router_only_plba_code_retrieval.yaml +- runner: runtime +- mode: router_only +- passed: True + +## Query +Объясни код control plane + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 0, + "llm_answer": "", + "answer_mode": "partial", + "path_scope": [], + "symbol_candidates": [ + "control", + "plane" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084313/router_only_plba_code_retrieval_plba-general-qa-runtime.json b/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084313/router_only_plba_code_retrieval_plba-general-qa-runtime.json new file mode 100644 index 0000000..3d6b712 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084313/router_only_plba_code_retrieval_plba-general-qa-runtime.json @@ -0,0 +1,221 @@ +{ + "case_id": "plba-general-qa-runtime", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/router_only_plba_code_retrieval.yaml", + "runner": "runtime", + "mode": "router_only", + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 0, + "llm_answer": "", + "answer_mode": "partial", + "path_scope": [], + "symbol_candidates": [ + "runtime" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-general-qa-runtime", + "text": "Объясни модуль runtime", + "mode": "router_only", + "run_started_at": "2026-03-12T08:43:13", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни модуль runtime", + "symbol_resolution": { + "status": "pending", + "resolved_symbol": null, + "alternatives": [ + "runtime" + ], + "confidence": 0.0 + }, + "rag_count": 0, + "rag_rows": [], + "llm_answer": null, + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [], + "evidence_sufficient": false + }, + "llm": { + "answer_status": "partial", + "groundedness": "not_applicable" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "module", + "symbol_candidates": [ + "runtime" + ], + "keyword_hints": [ + "runtime" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [], + "retrieval_mode_by_layer": {}, + "top_k_by_layer": {}, + "filters_by_layer": {}, + "repo_scope": { + "repo_id": null, + "workspace_id": null + } + }, + "retrieval": null, + "constraint_violations": [], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 0, + "retrieval_by_layer": {}, + "merge_rank": 0, + "prompt_build": 0, + "llm_call": 0 + }, + "prompt": null, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "runtime" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 0, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-general-qa-runtime", + "mode": "router_only", + "run_started_at": "2026-03-12T08:43:13", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Объясни модуль runtime", + "normalized_query": "Объясни модуль runtime" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Объясни модуль runtime" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни модуль runtime" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "module", + "symbol_candidates": [ + "runtime" + ], + "keyword_hints": [ + "runtime" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084313/router_only_plba_code_retrieval_plba-general-qa-runtime.md b/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084313/router_only_plba_code_retrieval_plba-general-qa-runtime.md new file mode 100644 index 0000000..89e83a3 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084313/router_only_plba_code_retrieval_plba-general-qa-runtime.md @@ -0,0 +1,34 @@ +# plba-general-qa-runtime + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/router_only_plba_code_retrieval.yaml +- runner: runtime +- mode: router_only +- passed: True + +## Query +Объясни модуль runtime + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 0, + "llm_answer": "", + "answer_mode": "partial", + "path_scope": [], + "symbol_candidates": [ + "runtime" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084313/router_only_plba_code_retrieval_plba-open-http-control-channel-file.json b/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084313/router_only_plba_code_retrieval_plba-open-http-control-channel-file.json new file mode 100644 index 0000000..f3ad9de --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084313/router_only_plba_code_retrieval_plba-open-http-control-channel-file.json @@ -0,0 +1,207 @@ +{ + "case_id": "plba-open-http-control-channel-file", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/router_only_plba_code_retrieval.yaml", + "runner": "runtime", + "mode": "router_only", + "actual": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 0, + "llm_answer": "", + "answer_mode": "partial", + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "symbol_candidates": [], + "layers": [ + "C0_SOURCE_CHUNKS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-open-http-control-channel-file", + "text": "Покажи файл src/app_runtime/control/http_channel.py", + "mode": "router_only", + "run_started_at": "2026-03-12T08:43:13", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Покажи файл src/app_runtime/control/http_channel.py", + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [], + "confidence": 0.0 + }, + "rag_count": 0, + "rag_rows": [], + "llm_answer": null, + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [], + "evidence_sufficient": false + }, + "llm": { + "answer_status": "partial", + "groundedness": "not_applicable" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "unknown", + "symbol_candidates": [], + "keyword_hints": [], + "path_hints": [ + "src/app_runtime/control/http_channel.py" + ], + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/app_runtime/control/http_channel.py" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": false, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [], + "retrieval_mode_by_layer": {}, + "top_k_by_layer": {}, + "filters_by_layer": {}, + "repo_scope": { + "repo_id": null, + "workspace_id": null + } + }, + "retrieval": null, + "constraint_violations": [], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 0, + "retrieval_by_layer": {}, + "merge_rank": 0, + "prompt_build": 0, + "llm_call": 0 + }, + "prompt": null, + "router": { + "conversation_mode": "START", + "keyword_hints": [], + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ] + }, + "llm": { + "used_evidence_count": 0, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-open-http-control-channel-file", + "mode": "router_only", + "run_started_at": "2026-03-12T08:43:13", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Покажи файл src/app_runtime/control/http_channel.py", + "normalized_query": "Покажи файл src/app_runtime/control/http_channel.py" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Покажи файл src/app_runtime/control/http_channel.py" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Покажи файл src/app_runtime/control/http_channel.py" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "unknown", + "symbol_candidates": [], + "keyword_hints": [], + "path_hints": [ + "src/app_runtime/control/http_channel.py" + ], + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/app_runtime/control/http_channel.py" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": false, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084313/router_only_plba_code_retrieval_plba-open-http-control-channel-file.md b/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084313/router_only_plba_code_retrieval_plba-open-http-control-channel-file.md new file mode 100644 index 0000000..9295e3d --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084313/router_only_plba_code_retrieval_plba-open-http-control-channel-file.md @@ -0,0 +1,30 @@ +# plba-open-http-control-channel-file + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/router_only_plba_code_retrieval.yaml +- runner: runtime +- mode: router_only +- passed: True + +## Query +Покажи файл src/app_runtime/control/http_channel.py + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 0, + "llm_answer": "", + "answer_mode": "partial", + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "symbol_candidates": [], + "layers": [ + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084313/router_only_plba_code_retrieval_plba-open-runtime-manager-file.json b/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084313/router_only_plba_code_retrieval_plba-open-runtime-manager-file.json new file mode 100644 index 0000000..2bd910e --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084313/router_only_plba_code_retrieval_plba-open-runtime-manager-file.json @@ -0,0 +1,207 @@ +{ + "case_id": "plba-open-runtime-manager-file", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/router_only_plba_code_retrieval.yaml", + "runner": "runtime", + "mode": "router_only", + "actual": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 0, + "llm_answer": "", + "answer_mode": "partial", + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "symbol_candidates": [], + "layers": [ + "C0_SOURCE_CHUNKS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-open-runtime-manager-file", + "text": "Открой файл src/app_runtime/core/runtime.py", + "mode": "router_only", + "run_started_at": "2026-03-12T08:43:13", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Открой файл src/app_runtime/core/runtime.py", + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [], + "confidence": 0.0 + }, + "rag_count": 0, + "rag_rows": [], + "llm_answer": null, + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [], + "evidence_sufficient": false + }, + "llm": { + "answer_status": "partial", + "groundedness": "not_applicable" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "unknown", + "symbol_candidates": [], + "keyword_hints": [], + "path_hints": [ + "src/app_runtime/core/runtime.py" + ], + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/app_runtime/core/runtime.py" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": false, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [], + "retrieval_mode_by_layer": {}, + "top_k_by_layer": {}, + "filters_by_layer": {}, + "repo_scope": { + "repo_id": null, + "workspace_id": null + } + }, + "retrieval": null, + "constraint_violations": [], + "timings_ms": { + "router": 1, + "symbol_resolution": 0, + "retrieval_total": 0, + "retrieval_by_layer": {}, + "merge_rank": 0, + "prompt_build": 0, + "llm_call": 0 + }, + "prompt": null, + "router": { + "conversation_mode": "START", + "keyword_hints": [], + "path_scope": [ + "src/app_runtime/core/runtime.py" + ] + }, + "llm": { + "used_evidence_count": 0, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-open-runtime-manager-file", + "mode": "router_only", + "run_started_at": "2026-03-12T08:43:13", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Открой файл src/app_runtime/core/runtime.py", + "normalized_query": "Открой файл src/app_runtime/core/runtime.py" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Открой файл src/app_runtime/core/runtime.py" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Открой файл src/app_runtime/core/runtime.py" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "unknown", + "symbol_candidates": [], + "keyword_hints": [], + "path_hints": [ + "src/app_runtime/core/runtime.py" + ], + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/app_runtime/core/runtime.py" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": false, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 1 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084313/router_only_plba_code_retrieval_plba-open-runtime-manager-file.md b/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084313/router_only_plba_code_retrieval_plba-open-runtime-manager-file.md new file mode 100644 index 0000000..5c4114d --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084313/router_only_plba_code_retrieval_plba-open-runtime-manager-file.md @@ -0,0 +1,30 @@ +# plba-open-runtime-manager-file + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/router_only_plba_code_retrieval.yaml +- runner: runtime +- mode: router_only +- passed: True + +## Query +Открой файл src/app_runtime/core/runtime.py + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 0, + "llm_answer": "", + "answer_mode": "partial", + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "symbol_candidates": [], + "layers": [ + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084313/summary.md b/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084313/summary.md new file mode 100644 index 0000000..5072b9f --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_router_only/20260312_084313/summary.md @@ -0,0 +1,20 @@ +# pipeline_setup_v2 summary + +Passed: 11/11 + + +| File | Case | Runner | Mode | Intent | Sub-intent | Pass | +| ------------------------------------ | ------------------------------------ | ------- | ----------- | ------- | ---------------- | ---- | +| router_only_plba_code_retrieval.yaml | plba-open-runtime-manager-file | runtime | router_only | CODE_QA | OPEN_FILE | ✓ | +| router_only_plba_code_retrieval.yaml | plba-open-http-control-channel-file | runtime | router_only | CODE_QA | OPEN_FILE | ✓ | +| router_only_plba_code_retrieval.yaml | plba-explain-runtime-manager | runtime | router_only | CODE_QA | EXPLAIN | ✓ | +| router_only_plba_code_retrieval.yaml | plba-explain-http-control-channel | runtime | router_only | CODE_QA | EXPLAIN | ✓ | +| router_only_plba_code_retrieval.yaml | plba-explain-trace-service | runtime | router_only | CODE_QA | EXPLAIN | ✓ | +| router_only_plba_code_retrieval.yaml | plba-find-tests-runtime-manager | runtime | router_only | CODE_QA | FIND_TESTS | ✓ | +| router_only_plba_code_retrieval.yaml | plba-find-tests-http-control-channel | runtime | router_only | CODE_QA | FIND_TESTS | ✓ | +| router_only_plba_code_retrieval.yaml | plba-find-entrypoints-create-runtime | runtime | router_only | CODE_QA | FIND_ENTRYPOINTS | ✓ | +| router_only_plba_code_retrieval.yaml | plba-find-entrypoints-bootstrap | runtime | router_only | CODE_QA | EXPLAIN | ✓ | +| router_only_plba_code_retrieval.yaml | plba-general-qa-runtime | runtime | router_only | CODE_QA | EXPLAIN | ✓ | +| router_only_plba_code_retrieval.yaml | plba-general-qa-control-plane | runtime | router_only | CODE_QA | EXPLAIN | ✓ | + + diff --git a/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_084838/router_rag_plba_code_retrieval_plba-rag-explain-control-plane.json b/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_084838/router_rag_plba_code_retrieval_plba-rag-explain-control-plane.json new file mode 100644 index 0000000..1f50c85 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_084838/router_rag_plba_code_retrieval_plba-rag-explain-control-plane.json @@ -0,0 +1,1165 @@ +{ + "case_id": "plba-rag-explain-control-plane", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/router_rag_plba_code_retrieval.yaml", + "runner": "runtime", + "mode": "router_rag", + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 0, + "llm_answer": "", + "answer_mode": "partial", + "path_scope": [], + "symbol_candidates": [ + "control", + "plane" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": false, + "mismatches": [ + "retrieval: expected non-empty rag, got 0 rows" + ], + "details": { + "case_id": "plba-rag-explain-control-plane", + "text": "Объясни код control plane", + "mode": "router_rag", + "run_started_at": "2026-03-12T08:48:39", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни код control plane", + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "ControlChannel.start", + "ControlChannel.stop", + "ControlActionSet", + "ControlChannel" + ], + "confidence": 0.0 + }, + "rag_count": 0, + "rag_rows": [], + "llm_answer": null, + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [], + "evidence_sufficient": false + }, + "llm": { + "answer_status": "partial", + "groundedness": "not_applicable" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "unknown", + "symbol_candidates": [ + "control", + "plane" + ], + "keyword_hints": [ + "control", + "plane" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": null, + "workspace_id": null, + "returned_repo_ids": [], + "returned_workspace_ids": [] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "control plane", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Объясни код control plane", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "Объясни код control plane", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Объясни код control plane", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "Объясни код control plane", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 4, + "candidates_after_filter": 4 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "ControlChannel.start", + "ControlChannel.stop", + "ControlActionSet", + "ControlChannel" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "miss", + "hit_count": 0, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "miss", + "hit_count": 0, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "miss", + "hit_count": 0, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "miss", + "hit_count": 0, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "miss", + "hit_count": 0, + "fail_reason": null + } + ] + }, + "constraint_violations": [ + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C1_SYMBOL_CATALOG", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + }, + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C0_SOURCE_CHUNKS", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + }, + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C4_SEMANTIC_ROLES", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + }, + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C2_DEPENDENCY_GRAPH", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + }, + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C3_ENTRYPOINTS", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + }, + { + "type": "SYMBOL_RESOLUTION_FAILED", + "severity": "warn", + "details": { + "status": "not_found", + "symbol_candidates": [ + "control", + "plane" + ] + }, + "suggested_fix": "Increase symbol layer budget or improve fuzzy symbol resolution settings." + } + ], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 109, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 22, + "C0_SOURCE_CHUNKS": 13, + "C4_SEMANTIC_ROLES": 11, + "C2_DEPENDENCY_GRAPH": 51, + "C3_ENTRYPOINTS": 9 + }, + "merge_rank": 0, + "prompt_build": 0, + "llm_call": 0 + }, + "prompt": null, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "control", + "plane" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 0, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-rag-explain-control-plane", + "mode": "router_rag", + "run_started_at": "2026-03-12T08:48:39", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Объясни код control plane", + "normalized_query": "Объясни код control plane" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Объясни код control plane" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни код control plane" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "unknown", + "symbol_candidates": [ + "control", + "plane" + ], + "keyword_hints": [ + "control", + "plane" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Объясни код control plane" + }, + "output": { + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "ControlChannel.start", + "ControlChannel.stop", + "ControlActionSet", + "ControlChannel" + ], + "confidence": 0.0 + }, + "rag_count": 0, + "rag_rows": [] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": null, + "workspace_id": null, + "returned_repo_ids": [], + "returned_workspace_ids": [] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "control plane", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Объясни код control plane", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "Объясни код control plane", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Объясни код control plane", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "Объясни код control plane", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 4, + "candidates_after_filter": 4 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "ControlChannel.start", + "ControlChannel.stop", + "ControlActionSet", + "ControlChannel" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "miss", + "hit_count": 0, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "miss", + "hit_count": 0, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "miss", + "hit_count": 0, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "miss", + "hit_count": 0, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "miss", + "hit_count": 0, + "fail_reason": null + } + ] + }, + "constraint_violations": [ + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C1_SYMBOL_CATALOG", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + }, + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C0_SOURCE_CHUNKS", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + }, + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C4_SEMANTIC_ROLES", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + }, + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C2_DEPENDENCY_GRAPH", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + }, + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C3_ENTRYPOINTS", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + }, + { + "type": "SYMBOL_RESOLUTION_FAILED", + "severity": "warn", + "details": { + "status": "not_found", + "symbol_candidates": [ + "control", + "plane" + ] + }, + "suggested_fix": "Increase symbol layer budget or improve fuzzy symbol resolution settings." + } + ], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 109, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 22, + "C0_SOURCE_CHUNKS": 13, + "C4_SEMANTIC_ROLES": 11, + "C2_DEPENDENCY_GRAPH": 51, + "C3_ENTRYPOINTS": 9 + }, + "merge_rank": 0 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_084838/router_rag_plba_code_retrieval_plba-rag-explain-control-plane.md b/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_084838/router_rag_plba_code_retrieval_plba-rag-explain-control-plane.md new file mode 100644 index 0000000..9b07411 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_084838/router_rag_plba_code_retrieval_plba-rag-explain-control-plane.md @@ -0,0 +1,35 @@ +# plba-rag-explain-control-plane + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/router_rag_plba_code_retrieval.yaml +- runner: runtime +- mode: router_rag +- passed: False + +## Query +Объясни код control plane + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 0, + "llm_answer": "", + "answer_mode": "partial", + "path_scope": [], + "symbol_candidates": [ + "control", + "plane" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] +} + +## Mismatches +- retrieval: expected non-empty rag, got 0 rows \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_084838/router_rag_plba_code_retrieval_plba-rag-explain-create-runtime.json b/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_084838/router_rag_plba_code_retrieval_plba-rag-explain-create-runtime.json new file mode 100644 index 0000000..5585e5a --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_084838/router_rag_plba_code_retrieval_plba-rag-explain-create-runtime.json @@ -0,0 +1,2285 @@ +{ + "case_id": "plba-rag-explain-create-runtime", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/router_rag_plba_code_retrieval.yaml", + "runner": "runtime", + "mode": "router_rag", + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 19, + "llm_answer": "", + "answer_mode": "partial", + "path_scope": [], + "symbol_candidates": [ + "create_runtime" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-rag-explain-create-runtime", + "text": "Объясни функцию create_runtime", + "mode": "router_rag", + "run_started_at": "2026-03-12T08:48:39", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни функцию create_runtime", + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "create_runtime", + "alternatives": [ + "create_runtime" + ], + "confidence": 0.99 + }, + "rag_count": 19, + "rag_rows": [ + { + "path": "src/plba/bootstrap.py", + "content": "function create_runtime\ncreate_runtime(module)", + "layer": "C1_SYMBOL_CATALOG", + "title": "create_runtime", + "span_start": 8, + "span_end": 29, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "qname": "create_runtime", + "kind": "function", + "signature": "create_runtime(module)", + "parent_symbol_id": null, + "package_or_module": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/queue/in_memory.py", + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)", + "layer": "C4_SEMANTIC_ROLES", + "title": "InMemoryTaskQueue", + "span_start": 9, + "span_end": 38, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 22, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "2da04cb94544a3bcbf0943a95ad4bdd8710bcafaa32a02fd0e4de2178dcf3533", + "symbol_name": "InMemoryTaskQueue", + "qname": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 9, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "58f0cc001ccda0eee4c6bc32ed83bd05eafd6b6644f1e8b4aa9eed3103db73dc", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "ConfigFileLoader\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (8)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ConfigFileLoader", + "span_start": 11, + "span_end": 48, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 23, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "a8474eca8b6e9dc86ae67ed68b16fa5fb639ef08739c053e7b7195489765667f", + "symbol_name": "ConfigFileLoader", + "qname": "ConfigFileLoader", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 8, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workers/supervisor.py", + "content": "WorkerSupervisor\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkerSupervisor", + "span_start": 10, + "span_end": 59, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "c17b44e8d9e97d490989b21fa67d7c346cdda8a0472e4c41fb243c8846faa124", + "symbol_name": "WorkerSupervisor", + "qname": "WorkerSupervisor", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "77609d9d5927171cce7fc3a54897c183fd63068710c6362029b700937aae5eee", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowEngine", + "span_start": 10, + "span_end": 86, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "57ec0a9f11c542c78e008684a888397e8d9ef4223671acb2567e631a0cbc70b4", + "symbol_name": "WorkflowEngine", + "qname": "WorkflowEngine", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/store.py", + "content": "TraceContextStore\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "TraceContextStore", + "span_start": 15, + "span_end": 52, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b2dad4fbe16ffb11b58deba311c7739955c39d59f291b22181f33e9c8cce4059", + "symbol_name": "TraceContextStore", + "qname": "TraceContextStore", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "d369554f08fc92039c6edd5a2a1e73b23901533e8974459170bbd9347d263dc5", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime calls runtime.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:calls", + "span_start": 19, + "span_end": 19, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "4eaeec4ac55a59d5f66fd01c4754955f8fedaf4bc3df13fa769b352c7bfaacbb", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.add_config_file", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime reads_attr runtime.register_module", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:reads_attr", + "span_start": 28, + "span_end": 28, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "45516c79ff358dbf9b650a081668df0f66d2fe989300f985a1a78be6be166f8f", + "edge_type": "reads_attr", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.register_module", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:instantiates", + "span_start": 17, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "0adba17984f850ea1608c9e734d2dd5c325cfde3a8133123aa239e44935ad18e", + "edge_type": "instantiates", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": "27158ca220022eeb5083c6addf8a50775d45f7161284fd60aac48410105f4b98", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime calls runtime.register_module", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:calls", + "span_start": 28, + "span_end": 28, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "ab6003c3441addc1ba1b81edeca009165559f652f6b2cf424e5ae61b1f617de8", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.register_module", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime calls runtime.control_plane.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:calls", + "span_start": 21, + "span_end": 27, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "2678250030b9ce47a3b3b55fac7897ac530367edc8374ac9d5e6ecafb1e483f0", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.control_plane.register_channel", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime reads_attr runtime.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:reads_attr", + "span_start": 19, + "span_end": 19, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "30d4e8aae984ab84d523e80d02f1caeda52d547fa3d2aa47be8845931cabbca2", + "edge_type": "reads_attr", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.add_config_file", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "def create_runtime(\n module: ApplicationModule,\n *,\n config_path: str | None = None,\n enable_http_control: bool = False,\n control_host: str = \"127.0.0.1\",\n control_port: int = 8080,\n control_timeout: int = 5,\n) -> RuntimeManager:\n runtime = RuntimeManager()\n if config_path is not None:\n runtime.add_config_file(config_path)\n if enable_http_control:\n runtime.control_plane.register_channel(\n HttpControlChannel(\n host=control_host,\n port=control_port,\n timeout=control_timeout,\n )\n )\n runtime.register_module(module)\n return runtime", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/bootstrap.py:create_runtime", + "span_start": 8, + "span_end": 29, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": null, + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS", + "C4_SEMANTIC_ROLES" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "partial", + "groundedness": "not_applicable" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "function", + "symbol_candidates": [ + "create_runtime" + ], + "keyword_hints": [ + "create_runtime" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Объясни функцию create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "Объясни функцию create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Объясни функцию create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "Объясни функцию create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "create_runtime", + "alternatives": [ + "create_runtime" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 8, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 92, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 18, + "C0_SOURCE_CHUNKS": 11, + "C4_SEMANTIC_ROLES": 12, + "C2_DEPENDENCY_GRAPH": 41, + "C3_ENTRYPOINTS": 8 + }, + "merge_rank": 15, + "prompt_build": 0, + "llm_call": 0 + }, + "prompt": null, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "create_runtime" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 19, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-rag-explain-create-runtime", + "mode": "router_rag", + "run_started_at": "2026-03-12T08:48:39", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Объясни функцию create_runtime", + "normalized_query": "Объясни функцию create_runtime" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Объясни функцию create_runtime" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни функцию create_runtime" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "function", + "symbol_candidates": [ + "create_runtime" + ], + "keyword_hints": [ + "create_runtime" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Объясни функцию create_runtime" + }, + "output": { + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "create_runtime", + "alternatives": [ + "create_runtime" + ], + "confidence": 0.99 + }, + "rag_count": 19, + "rag_rows": [ + { + "path": "src/plba/bootstrap.py", + "content": "function create_runtime\ncreate_runtime(module)", + "layer": "C1_SYMBOL_CATALOG", + "title": "create_runtime", + "span_start": 8, + "span_end": 29, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "qname": "create_runtime", + "kind": "function", + "signature": "create_runtime(module)", + "parent_symbol_id": null, + "package_or_module": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/queue/in_memory.py", + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)", + "layer": "C4_SEMANTIC_ROLES", + "title": "InMemoryTaskQueue", + "span_start": 9, + "span_end": 38, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 22, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "2da04cb94544a3bcbf0943a95ad4bdd8710bcafaa32a02fd0e4de2178dcf3533", + "symbol_name": "InMemoryTaskQueue", + "qname": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 9, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "58f0cc001ccda0eee4c6bc32ed83bd05eafd6b6644f1e8b4aa9eed3103db73dc", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "ConfigFileLoader\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (8)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ConfigFileLoader", + "span_start": 11, + "span_end": 48, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 23, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "a8474eca8b6e9dc86ae67ed68b16fa5fb639ef08739c053e7b7195489765667f", + "symbol_name": "ConfigFileLoader", + "qname": "ConfigFileLoader", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 8, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workers/supervisor.py", + "content": "WorkerSupervisor\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkerSupervisor", + "span_start": 10, + "span_end": 59, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "c17b44e8d9e97d490989b21fa67d7c346cdda8a0472e4c41fb243c8846faa124", + "symbol_name": "WorkerSupervisor", + "qname": "WorkerSupervisor", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "77609d9d5927171cce7fc3a54897c183fd63068710c6362029b700937aae5eee", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowEngine", + "span_start": 10, + "span_end": 86, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "57ec0a9f11c542c78e008684a888397e8d9ef4223671acb2567e631a0cbc70b4", + "symbol_name": "WorkflowEngine", + "qname": "WorkflowEngine", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/store.py", + "content": "TraceContextStore\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "TraceContextStore", + "span_start": 15, + "span_end": 52, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b2dad4fbe16ffb11b58deba311c7739955c39d59f291b22181f33e9c8cce4059", + "symbol_name": "TraceContextStore", + "qname": "TraceContextStore", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "d369554f08fc92039c6edd5a2a1e73b23901533e8974459170bbd9347d263dc5", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime calls runtime.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:calls", + "span_start": 19, + "span_end": 19, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "4eaeec4ac55a59d5f66fd01c4754955f8fedaf4bc3df13fa769b352c7bfaacbb", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.add_config_file", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime reads_attr runtime.register_module", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:reads_attr", + "span_start": 28, + "span_end": 28, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "45516c79ff358dbf9b650a081668df0f66d2fe989300f985a1a78be6be166f8f", + "edge_type": "reads_attr", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.register_module", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:instantiates", + "span_start": 17, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "0adba17984f850ea1608c9e734d2dd5c325cfde3a8133123aa239e44935ad18e", + "edge_type": "instantiates", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": "27158ca220022eeb5083c6addf8a50775d45f7161284fd60aac48410105f4b98", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime calls runtime.register_module", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:calls", + "span_start": 28, + "span_end": 28, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "ab6003c3441addc1ba1b81edeca009165559f652f6b2cf424e5ae61b1f617de8", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.register_module", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime calls runtime.control_plane.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:calls", + "span_start": 21, + "span_end": 27, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "2678250030b9ce47a3b3b55fac7897ac530367edc8374ac9d5e6ecafb1e483f0", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.control_plane.register_channel", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime reads_attr runtime.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:reads_attr", + "span_start": 19, + "span_end": 19, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "30d4e8aae984ab84d523e80d02f1caeda52d547fa3d2aa47be8845931cabbca2", + "edge_type": "reads_attr", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.add_config_file", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "def create_runtime(\n module: ApplicationModule,\n *,\n config_path: str | None = None,\n enable_http_control: bool = False,\n control_host: str = \"127.0.0.1\",\n control_port: int = 8080,\n control_timeout: int = 5,\n) -> RuntimeManager:\n runtime = RuntimeManager()\n if config_path is not None:\n runtime.add_config_file(config_path)\n if enable_http_control:\n runtime.control_plane.register_channel(\n HttpControlChannel(\n host=control_host,\n port=control_port,\n timeout=control_timeout,\n )\n )\n runtime.register_module(module)\n return runtime", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/bootstrap.py:create_runtime", + "span_start": 8, + "span_end": 29, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Объясни функцию create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "Объясни функцию create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Объясни функцию create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "Объясни функцию create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "create_runtime", + "alternatives": [ + "create_runtime" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 8, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 92, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 18, + "C0_SOURCE_CHUNKS": 11, + "C4_SEMANTIC_ROLES": 12, + "C2_DEPENDENCY_GRAPH": 41, + "C3_ENTRYPOINTS": 8 + }, + "merge_rank": 15 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_084838/router_rag_plba_code_retrieval_plba-rag-explain-create-runtime.md b/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_084838/router_rag_plba_code_retrieval_plba-rag-explain-create-runtime.md new file mode 100644 index 0000000..3a38698 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_084838/router_rag_plba_code_retrieval_plba-rag-explain-create-runtime.md @@ -0,0 +1,34 @@ +# plba-rag-explain-create-runtime + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/router_rag_plba_code_retrieval.yaml +- runner: runtime +- mode: router_rag +- passed: True + +## Query +Объясни функцию create_runtime + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 19, + "llm_answer": "", + "answer_mode": "partial", + "path_scope": [], + "symbol_candidates": [ + "create_runtime" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_084838/router_rag_plba_code_retrieval_plba-rag-explain-http-control-channel.json b/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_084838/router_rag_plba_code_retrieval_plba-rag-explain-http-control-channel.json new file mode 100644 index 0000000..878f481 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_084838/router_rag_plba_code_retrieval_plba-rag-explain-http-control-channel.json @@ -0,0 +1,2477 @@ +{ + "case_id": "plba-rag-explain-http-control-channel", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/router_rag_plba_code_retrieval.yaml", + "runner": "runtime", + "mode": "router_rag", + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 19, + "llm_answer": "", + "answer_mode": "partial", + "path_scope": [], + "symbol_candidates": [ + "HttpControlChannel" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-rag-explain-http-control-channel", + "text": "Объясни класс HttpControlChannel", + "mode": "router_rag", + "run_started_at": "2026-03-12T08:48:39", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни класс HttpControlChannel", + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "HttpControlChannel", + "alternatives": [ + "HttpControlChannel" + ], + "confidence": 0.99 + }, + "rag_count": 19, + "rag_rows": [ + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel\nHttpControlChannel(ControlChannel)", + "layer": "C1_SYMBOL_CATALOG", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "qname": "HttpControlChannel", + "kind": "class", + "signature": "HttpControlChannel(ControlChannel)", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/queue/in_memory.py", + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)", + "layer": "C4_SEMANTIC_ROLES", + "title": "InMemoryTaskQueue", + "span_start": 9, + "span_end": 38, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 22, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "2da04cb94544a3bcbf0943a95ad4bdd8710bcafaa32a02fd0e4de2178dcf3533", + "symbol_name": "InMemoryTaskQueue", + "qname": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 9, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "58f0cc001ccda0eee4c6bc32ed83bd05eafd6b6644f1e8b4aa9eed3103db73dc", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._runner\n -> HttpControlChannel.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 15, + "span_end": 22, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "51d73913df709152258ed1b9a8c8f4eb3c575eccfe6b982aef0b28e0789a29da", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0", + "dst_ref": "HttpControlChannel.start", + "resolution": "resolved", + "slice_id": "51d73913df709152258ed1b9a8c8f4eb3c575eccfe6b982aef0b28e0789a29da", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._runner", + "HttpControlChannel.start" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._runner\n -> HttpControlChannel.port", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 15, + "span_end": 29, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "c7167bab7218bb768ad7c11bfb40d1a3096e6071dd7817bba5fd864cf8f6de13", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "3632ce8227f4a31e0768f2fb021a4d1ba28e1202633aa0f2fac902295931280f", + "dst_ref": "HttpControlChannel.port", + "resolution": "resolved", + "slice_id": "c7167bab7218bb768ad7c11bfb40d1a3096e6071dd7817bba5fd864cf8f6de13", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._runner", + "HttpControlChannel.port" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "3632ce8227f4a31e0768f2fb021a4d1ba28e1202633aa0f2fac902295931280f" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._timeout\n -> HttpControlChannel._health_response", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 14, + "span_end": 34, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "f858f5c9e575f6c4cdfe3853571b7ee21d1f628a443541d2037c3dc9d0790bef", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "e84bf04e9cd2127df235b7064d05f47e19f19a89c7c82f4c247231d4e8fa426a", + "dst_ref": "HttpControlChannel._health_response", + "resolution": "resolved", + "slice_id": "f858f5c9e575f6c4cdfe3853571b7ee21d1f628a443541d2037c3dc9d0790bef", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._timeout", + "HttpControlChannel._health_response" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "e84bf04e9cd2127df235b7064d05f47e19f19a89c7c82f4c247231d4e8fa426a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._timeout\n -> HttpControlChannel._action_response", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "c3ef21fcae96c82c00be74b3ab827d4af2085d89cb3fa5521c19a174aad84dbb", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "e64969024ccaeb34d8d91473fad07b3b3d341875846392e7a006406c7ada1954", + "dst_ref": "HttpControlChannel._action_response", + "resolution": "resolved", + "slice_id": "c3ef21fcae96c82c00be74b3ab827d4af2085d89cb3fa5521c19a174aad84dbb", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._timeout", + "HttpControlChannel._action_response" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "e64969024ccaeb34d8d91473fad07b3b3d341875846392e7a006406c7ada1954" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._runner\n -> HttpControlChannel.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 15, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "0f827ef81a990258a8a74381c8564a8361afa6712dba3200592659c939adcb9d", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "f29ab212620093d72be20e26c5a399624c7939a6056a728762ed3f84a250bfa3", + "dst_ref": "HttpControlChannel.stop", + "resolution": "resolved", + "slice_id": "0f827ef81a990258a8a74381c8564a8361afa6712dba3200592659c939adcb9d", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._runner", + "HttpControlChannel.stop" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "f29ab212620093d72be20e26c5a399624c7939a6056a728762ed3f84a250bfa3" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._factory\n -> HttpControlChannel.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 16, + "span_end": 21, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e61ec25ded7dbe380d95ce2abcbc1d7a2d2afde5aa8453866df8706dfb7d6ddb", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0", + "dst_ref": "HttpControlChannel.start", + "resolution": "resolved", + "slice_id": "e61ec25ded7dbe380d95ce2abcbc1d7a2d2afde5aa8453866df8706dfb7d6ddb", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._factory", + "HttpControlChannel.start" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel(ControlChannel):\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._timeout = timeout\n self._runner = UvicornThreadRunner(host, port, timeout)\n self._factory = HttpControlAppFactory()\n self._actions: ControlActionSet | None = None\n\n async def start(self, actions: ControlActionSet) -> None:\n self._actions = actions\n app = self._factory.create(self._health_response, self._action_response)\n await self._runner.start(app)\n\n async def stop(self) -> None:\n await self._runner.stop()\n\n @property\n def port(self) -> int:\n return self._runner.port\n\n async def _health_response(self) -> dict[str, object]:\n if self._actions is None:\n return {\"status\": \"unhealthy\", \"detail\": \"control actions are not configured\"}\n return await asyncio.wait_for(self._actions.health(), timeout=float(self._timeout))\n\n async def _action_response(self, action: str, _client_source: str = \"unknown\") -> JSONResponse:\n if self._actions is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"{action} handler is not configured\"}, status_code=404)\n callbacks = {\n \"start\": self._actions.start,\n \"stop\": self._actions.stop,\n \"status\": self._actions.status,\n }\n callback = callbacks.get(action)\n if callback is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"unsupported action: {action}\"}, status_code=404)\n action_timeout = max(float(self._timeout), 10.0) if action in {\"start\", \"stop\"} else float(self._timeout)\n try:\n detail = await asyncio.wait_for(callback(), timeout=action_timeout)\n except asyncio.TimeoutError:\n return JSONResponse(\n content={\"status\": \"accepted\", \"detail\": f\"{action} operation is still in progress\"},\n status_code=202,\n )\n except Exception as exc:\n return JSONResponse(content={\"status\": \"error\", \"detail\": str(exc)}, status_code=500)\n return JSONResponse(content={\"status\": \"ok\", \"detail\": detail or f\"{action} action accepted\"}, status_code=200)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_channel.py:HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": null, + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS", + "C4_SEMANTIC_ROLES" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "partial", + "groundedness": "not_applicable" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "HttpControlChannel" + ], + "keyword_hints": [ + "HttpControlChannel" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "HttpControlChannel", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Объясни класс HttpControlChannel", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "Объясни класс HttpControlChannel", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Объясни класс HttpControlChannel", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "Объясни класс HttpControlChannel", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "HttpControlChannel", + "alternatives": [ + "HttpControlChannel" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 8, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 115, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 25, + "C0_SOURCE_CHUNKS": 13, + "C4_SEMANTIC_ROLES": 11, + "C2_DEPENDENCY_GRAPH": 54, + "C3_ENTRYPOINTS": 9 + }, + "merge_rank": 15, + "prompt_build": 0, + "llm_call": 0 + }, + "prompt": null, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "HttpControlChannel" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 19, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-rag-explain-http-control-channel", + "mode": "router_rag", + "run_started_at": "2026-03-12T08:48:39", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Объясни класс HttpControlChannel", + "normalized_query": "Объясни класс HttpControlChannel" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Объясни класс HttpControlChannel" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни класс HttpControlChannel" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "HttpControlChannel" + ], + "keyword_hints": [ + "HttpControlChannel" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Объясни класс HttpControlChannel" + }, + "output": { + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "HttpControlChannel", + "alternatives": [ + "HttpControlChannel" + ], + "confidence": 0.99 + }, + "rag_count": 19, + "rag_rows": [ + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel\nHttpControlChannel(ControlChannel)", + "layer": "C1_SYMBOL_CATALOG", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "qname": "HttpControlChannel", + "kind": "class", + "signature": "HttpControlChannel(ControlChannel)", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/queue/in_memory.py", + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)", + "layer": "C4_SEMANTIC_ROLES", + "title": "InMemoryTaskQueue", + "span_start": 9, + "span_end": 38, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 22, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "2da04cb94544a3bcbf0943a95ad4bdd8710bcafaa32a02fd0e4de2178dcf3533", + "symbol_name": "InMemoryTaskQueue", + "qname": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 9, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "58f0cc001ccda0eee4c6bc32ed83bd05eafd6b6644f1e8b4aa9eed3103db73dc", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._runner\n -> HttpControlChannel.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 15, + "span_end": 22, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "51d73913df709152258ed1b9a8c8f4eb3c575eccfe6b982aef0b28e0789a29da", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0", + "dst_ref": "HttpControlChannel.start", + "resolution": "resolved", + "slice_id": "51d73913df709152258ed1b9a8c8f4eb3c575eccfe6b982aef0b28e0789a29da", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._runner", + "HttpControlChannel.start" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._runner\n -> HttpControlChannel.port", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 15, + "span_end": 29, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "c7167bab7218bb768ad7c11bfb40d1a3096e6071dd7817bba5fd864cf8f6de13", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "3632ce8227f4a31e0768f2fb021a4d1ba28e1202633aa0f2fac902295931280f", + "dst_ref": "HttpControlChannel.port", + "resolution": "resolved", + "slice_id": "c7167bab7218bb768ad7c11bfb40d1a3096e6071dd7817bba5fd864cf8f6de13", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._runner", + "HttpControlChannel.port" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "3632ce8227f4a31e0768f2fb021a4d1ba28e1202633aa0f2fac902295931280f" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._timeout\n -> HttpControlChannel._health_response", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 14, + "span_end": 34, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "f858f5c9e575f6c4cdfe3853571b7ee21d1f628a443541d2037c3dc9d0790bef", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "e84bf04e9cd2127df235b7064d05f47e19f19a89c7c82f4c247231d4e8fa426a", + "dst_ref": "HttpControlChannel._health_response", + "resolution": "resolved", + "slice_id": "f858f5c9e575f6c4cdfe3853571b7ee21d1f628a443541d2037c3dc9d0790bef", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._timeout", + "HttpControlChannel._health_response" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "e84bf04e9cd2127df235b7064d05f47e19f19a89c7c82f4c247231d4e8fa426a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._timeout\n -> HttpControlChannel._action_response", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "c3ef21fcae96c82c00be74b3ab827d4af2085d89cb3fa5521c19a174aad84dbb", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "e64969024ccaeb34d8d91473fad07b3b3d341875846392e7a006406c7ada1954", + "dst_ref": "HttpControlChannel._action_response", + "resolution": "resolved", + "slice_id": "c3ef21fcae96c82c00be74b3ab827d4af2085d89cb3fa5521c19a174aad84dbb", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._timeout", + "HttpControlChannel._action_response" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "e64969024ccaeb34d8d91473fad07b3b3d341875846392e7a006406c7ada1954" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._runner\n -> HttpControlChannel.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 15, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "0f827ef81a990258a8a74381c8564a8361afa6712dba3200592659c939adcb9d", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "f29ab212620093d72be20e26c5a399624c7939a6056a728762ed3f84a250bfa3", + "dst_ref": "HttpControlChannel.stop", + "resolution": "resolved", + "slice_id": "0f827ef81a990258a8a74381c8564a8361afa6712dba3200592659c939adcb9d", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._runner", + "HttpControlChannel.stop" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "f29ab212620093d72be20e26c5a399624c7939a6056a728762ed3f84a250bfa3" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._factory\n -> HttpControlChannel.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 16, + "span_end": 21, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e61ec25ded7dbe380d95ce2abcbc1d7a2d2afde5aa8453866df8706dfb7d6ddb", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0", + "dst_ref": "HttpControlChannel.start", + "resolution": "resolved", + "slice_id": "e61ec25ded7dbe380d95ce2abcbc1d7a2d2afde5aa8453866df8706dfb7d6ddb", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._factory", + "HttpControlChannel.start" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel(ControlChannel):\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._timeout = timeout\n self._runner = UvicornThreadRunner(host, port, timeout)\n self._factory = HttpControlAppFactory()\n self._actions: ControlActionSet | None = None\n\n async def start(self, actions: ControlActionSet) -> None:\n self._actions = actions\n app = self._factory.create(self._health_response, self._action_response)\n await self._runner.start(app)\n\n async def stop(self) -> None:\n await self._runner.stop()\n\n @property\n def port(self) -> int:\n return self._runner.port\n\n async def _health_response(self) -> dict[str, object]:\n if self._actions is None:\n return {\"status\": \"unhealthy\", \"detail\": \"control actions are not configured\"}\n return await asyncio.wait_for(self._actions.health(), timeout=float(self._timeout))\n\n async def _action_response(self, action: str, _client_source: str = \"unknown\") -> JSONResponse:\n if self._actions is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"{action} handler is not configured\"}, status_code=404)\n callbacks = {\n \"start\": self._actions.start,\n \"stop\": self._actions.stop,\n \"status\": self._actions.status,\n }\n callback = callbacks.get(action)\n if callback is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"unsupported action: {action}\"}, status_code=404)\n action_timeout = max(float(self._timeout), 10.0) if action in {\"start\", \"stop\"} else float(self._timeout)\n try:\n detail = await asyncio.wait_for(callback(), timeout=action_timeout)\n except asyncio.TimeoutError:\n return JSONResponse(\n content={\"status\": \"accepted\", \"detail\": f\"{action} operation is still in progress\"},\n status_code=202,\n )\n except Exception as exc:\n return JSONResponse(content={\"status\": \"error\", \"detail\": str(exc)}, status_code=500)\n return JSONResponse(content={\"status\": \"ok\", \"detail\": detail or f\"{action} action accepted\"}, status_code=200)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_channel.py:HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "HttpControlChannel", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Объясни класс HttpControlChannel", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "Объясни класс HttpControlChannel", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Объясни класс HttpControlChannel", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "Объясни класс HttpControlChannel", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "HttpControlChannel", + "alternatives": [ + "HttpControlChannel" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 8, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 115, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 25, + "C0_SOURCE_CHUNKS": 13, + "C4_SEMANTIC_ROLES": 11, + "C2_DEPENDENCY_GRAPH": 54, + "C3_ENTRYPOINTS": 9 + }, + "merge_rank": 15 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_084838/router_rag_plba_code_retrieval_plba-rag-explain-http-control-channel.md b/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_084838/router_rag_plba_code_retrieval_plba-rag-explain-http-control-channel.md new file mode 100644 index 0000000..7b16505 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_084838/router_rag_plba_code_retrieval_plba-rag-explain-http-control-channel.md @@ -0,0 +1,34 @@ +# plba-rag-explain-http-control-channel + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/router_rag_plba_code_retrieval.yaml +- runner: runtime +- mode: router_rag +- passed: True + +## Query +Объясни класс HttpControlChannel + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 19, + "llm_answer": "", + "answer_mode": "partial", + "path_scope": [], + "symbol_candidates": [ + "HttpControlChannel" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_084838/router_rag_plba_code_retrieval_plba-rag-explain-runtime-manager.json b/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_084838/router_rag_plba_code_retrieval_plba-rag-explain-runtime-manager.json new file mode 100644 index 0000000..21fe959 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_084838/router_rag_plba_code_retrieval_plba-rag-explain-runtime-manager.json @@ -0,0 +1,2477 @@ +{ + "case_id": "plba-rag-explain-runtime-manager", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/router_rag_plba_code_retrieval.yaml", + "runner": "runtime", + "mode": "router_rag", + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 19, + "llm_answer": "", + "answer_mode": "partial", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-rag-explain-runtime-manager", + "text": "Объясни как работает класс RuntimeManager", + "mode": "router_rag", + "run_started_at": "2026-03-12T08:48:39", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни как работает класс RuntimeManager", + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ], + "confidence": 0.99 + }, + "rag_count": 19, + "rag_rows": [ + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager\nRuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "qname": "RuntimeManager", + "kind": "class", + "signature": "RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests manager\n- orchestrates role-like calls (4)\n- reads and writes state attributes\n- participates in dataflow slices (50)", + "layer": "C4_SEMANTIC_ROLES", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 43, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "symbol_name": "RuntimeManager", + "qname": "RuntimeManager", + "role": "pipeline_stage", + "confidence": 0.67, + "dataflow_participation": 50, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 52, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": null, + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS", + "C4_SEMANTIC_ROLES" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "partial", + "groundedness": "not_applicable" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Объясни как работает класс RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "Объясни как работает класс RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Объясни как работает класс RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "Объясни как работает класс RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 8, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 226, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 39, + "C0_SOURCE_CHUNKS": 15, + "C4_SEMANTIC_ROLES": 14, + "C2_DEPENDENCY_GRAPH": 59, + "C3_ENTRYPOINTS": 9 + }, + "merge_rank": 18, + "prompt_build": 0, + "llm_call": 0 + }, + "prompt": null, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "RuntimeManager" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 19, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-rag-explain-runtime-manager", + "mode": "router_rag", + "run_started_at": "2026-03-12T08:48:39", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Объясни как работает класс RuntimeManager", + "normalized_query": "Объясни как работает класс RuntimeManager" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Объясни как работает класс RuntimeManager" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни как работает класс RuntimeManager" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Объясни как работает класс RuntimeManager" + }, + "output": { + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ], + "confidence": 0.99 + }, + "rag_count": 19, + "rag_rows": [ + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager\nRuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "qname": "RuntimeManager", + "kind": "class", + "signature": "RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests manager\n- orchestrates role-like calls (4)\n- reads and writes state attributes\n- participates in dataflow slices (50)", + "layer": "C4_SEMANTIC_ROLES", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 43, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "symbol_name": "RuntimeManager", + "qname": "RuntimeManager", + "role": "pipeline_stage", + "confidence": 0.67, + "dataflow_participation": 50, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 52, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Объясни как работает класс RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "Объясни как работает класс RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Объясни как работает класс RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "Объясни как работает класс RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 8, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 226, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 39, + "C0_SOURCE_CHUNKS": 15, + "C4_SEMANTIC_ROLES": 14, + "C2_DEPENDENCY_GRAPH": 59, + "C3_ENTRYPOINTS": 9 + }, + "merge_rank": 18 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_084838/router_rag_plba_code_retrieval_plba-rag-explain-runtime-manager.md b/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_084838/router_rag_plba_code_retrieval_plba-rag-explain-runtime-manager.md new file mode 100644 index 0000000..fd2e3dc --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_084838/router_rag_plba_code_retrieval_plba-rag-explain-runtime-manager.md @@ -0,0 +1,34 @@ +# plba-rag-explain-runtime-manager + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/router_rag_plba_code_retrieval.yaml +- runner: runtime +- mode: router_rag +- passed: True + +## Query +Объясни как работает класс RuntimeManager + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 19, + "llm_answer": "", + "answer_mode": "partial", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_084838/router_rag_plba_code_retrieval_plba-rag-explain-runtime-module.json b/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_084838/router_rag_plba_code_retrieval_plba-rag-explain-runtime-module.json new file mode 100644 index 0000000..6e2402c --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_084838/router_rag_plba_code_retrieval_plba-rag-explain-runtime-module.json @@ -0,0 +1,1137 @@ +{ + "case_id": "plba-rag-explain-runtime-module", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/router_rag_plba_code_retrieval.yaml", + "runner": "runtime", + "mode": "router_rag", + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 0, + "llm_answer": "", + "answer_mode": "partial", + "path_scope": [], + "symbol_candidates": [ + "runtime" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": false, + "mismatches": [ + "retrieval: expected non-empty rag, got 0 rows" + ], + "details": { + "case_id": "plba-rag-explain-runtime-module", + "text": "Объясни модуль runtime", + "mode": "router_rag", + "run_started_at": "2026-03-12T08:48:39", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни модуль runtime", + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "runtime" + ], + "confidence": 0.0 + }, + "rag_count": 0, + "rag_rows": [], + "llm_answer": null, + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [], + "evidence_sufficient": false + }, + "llm": { + "answer_status": "partial", + "groundedness": "not_applicable" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "module", + "symbol_candidates": [ + "runtime" + ], + "keyword_hints": [ + "runtime" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": null, + "workspace_id": null, + "returned_repo_ids": [], + "returned_workspace_ids": [] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Объясни модуль runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "Объясни модуль runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Объясни модуль runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "Объясни модуль runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 0, + "candidates_after_filter": 0 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "runtime" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "miss", + "hit_count": 0, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "miss", + "hit_count": 0, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "miss", + "hit_count": 0, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "miss", + "hit_count": 0, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "miss", + "hit_count": 0, + "fail_reason": null + } + ] + }, + "constraint_violations": [ + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C1_SYMBOL_CATALOG", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + }, + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C0_SOURCE_CHUNKS", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + }, + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C4_SEMANTIC_ROLES", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + }, + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C2_DEPENDENCY_GRAPH", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + }, + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C3_ENTRYPOINTS", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + }, + { + "type": "SYMBOL_RESOLUTION_FAILED", + "severity": "warn", + "details": { + "status": "not_found", + "symbol_candidates": [ + "runtime" + ] + }, + "suggested_fix": "Increase symbol layer budget or improve fuzzy symbol resolution settings." + } + ], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 87, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 18, + "C0_SOURCE_CHUNKS": 9, + "C4_SEMANTIC_ROLES": 12, + "C2_DEPENDENCY_GRAPH": 38, + "C3_ENTRYPOINTS": 8 + }, + "merge_rank": 0, + "prompt_build": 0, + "llm_call": 0 + }, + "prompt": null, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "runtime" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 0, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-rag-explain-runtime-module", + "mode": "router_rag", + "run_started_at": "2026-03-12T08:48:39", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Объясни модуль runtime", + "normalized_query": "Объясни модуль runtime" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Объясни модуль runtime" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни модуль runtime" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "module", + "symbol_candidates": [ + "runtime" + ], + "keyword_hints": [ + "runtime" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Объясни модуль runtime" + }, + "output": { + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "runtime" + ], + "confidence": 0.0 + }, + "rag_count": 0, + "rag_rows": [] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": null, + "workspace_id": null, + "returned_repo_ids": [], + "returned_workspace_ids": [] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Объясни модуль runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "Объясни модуль runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Объясни модуль runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "Объясни модуль runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 0, + "candidates_after_filter": 0 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "runtime" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "miss", + "hit_count": 0, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "miss", + "hit_count": 0, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "miss", + "hit_count": 0, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "miss", + "hit_count": 0, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "miss", + "hit_count": 0, + "fail_reason": null + } + ] + }, + "constraint_violations": [ + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C1_SYMBOL_CATALOG", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + }, + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C0_SOURCE_CHUNKS", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + }, + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C4_SEMANTIC_ROLES", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + }, + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C2_DEPENDENCY_GRAPH", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + }, + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C3_ENTRYPOINTS", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + }, + { + "type": "SYMBOL_RESOLUTION_FAILED", + "severity": "warn", + "details": { + "status": "not_found", + "symbol_candidates": [ + "runtime" + ] + }, + "suggested_fix": "Increase symbol layer budget or improve fuzzy symbol resolution settings." + } + ], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 87, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 18, + "C0_SOURCE_CHUNKS": 9, + "C4_SEMANTIC_ROLES": 12, + "C2_DEPENDENCY_GRAPH": 38, + "C3_ENTRYPOINTS": 8 + }, + "merge_rank": 0 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_084838/router_rag_plba_code_retrieval_plba-rag-explain-runtime-module.md b/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_084838/router_rag_plba_code_retrieval_plba-rag-explain-runtime-module.md new file mode 100644 index 0000000..a20986f --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_084838/router_rag_plba_code_retrieval_plba-rag-explain-runtime-module.md @@ -0,0 +1,34 @@ +# plba-rag-explain-runtime-module + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/router_rag_plba_code_retrieval.yaml +- runner: runtime +- mode: router_rag +- passed: False + +## Query +Объясни модуль runtime + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 0, + "llm_answer": "", + "answer_mode": "partial", + "path_scope": [], + "symbol_candidates": [ + "runtime" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] +} + +## Mismatches +- retrieval: expected non-empty rag, got 0 rows \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_084838/router_rag_plba_code_retrieval_plba-rag-explain-trace-service.json b/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_084838/router_rag_plba_code_retrieval_plba-rag-explain-trace-service.json new file mode 100644 index 0000000..6ccd825 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_084838/router_rag_plba_code_retrieval_plba-rag-explain-trace-service.json @@ -0,0 +1,2597 @@ +{ + "case_id": "plba-rag-explain-trace-service", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/router_rag_plba_code_retrieval.yaml", + "runner": "runtime", + "mode": "router_rag", + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 21, + "llm_answer": "", + "answer_mode": "partial", + "path_scope": [], + "symbol_candidates": [ + "TraceService" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-rag-explain-trace-service", + "text": "Как работает TraceService?", + "mode": "router_rag", + "run_started_at": "2026-03-12T08:48:39", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Как работает TraceService?", + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "TraceService", + "alternatives": [ + "TraceService" + ], + "confidence": 0.99 + }, + "rag_count": 21, + "rag_rows": [ + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceService\nTraceService(TraceContextFactory)", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService", + "span_start": 39, + "span_end": 166, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "c2b2b976d99f2c600000b753731b26e0a69adcb4359398b93073590c5d5d04f4", + "qname": "TraceService", + "kind": "class", + "signature": "TraceService(TraceContextFactory)", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (13)", + "layer": "C4_SEMANTIC_ROLES", + "title": "TraceService", + "span_start": 39, + "span_end": 166, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 60, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "c2b2b976d99f2c600000b753731b26e0a69adcb4359398b93073590c5d5d04f4", + "symbol_name": "TraceService", + "qname": "TraceService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 13, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/queue/in_memory.py", + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)", + "layer": "C4_SEMANTIC_ROLES", + "title": "InMemoryTaskQueue", + "span_start": 9, + "span_end": 38, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 22, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "2da04cb94544a3bcbf0943a95ad4bdd8710bcafaa32a02fd0e4de2178dcf3533", + "symbol_name": "InMemoryTaskQueue", + "qname": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 9, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "58f0cc001ccda0eee4c6bc32ed83bd05eafd6b6644f1e8b4aa9eed3103db73dc", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "ConfigFileLoader\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (8)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ConfigFileLoader", + "span_start": 11, + "span_end": 48, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 23, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "a8474eca8b6e9dc86ae67ed68b16fa5fb639ef08739c053e7b7195489765667f", + "symbol_name": "ConfigFileLoader", + "qname": "ConfigFileLoader", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 8, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/store.py", + "content": "TraceContextStore\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "TraceContextStore", + "span_start": 15, + "span_end": 52, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b2dad4fbe16ffb11b58deba311c7739955c39d59f291b22181f33e9c8cce4059", + "symbol_name": "TraceContextStore", + "qname": "TraceContextStore", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "d369554f08fc92039c6edd5a2a1e73b23901533e8974459170bbd9347d263dc5", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workers/supervisor.py", + "content": "WorkerSupervisor\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkerSupervisor", + "span_start": 10, + "span_end": 59, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "c17b44e8d9e97d490989b21fa67d7c346cdda8a0472e4c41fb243c8846faa124", + "symbol_name": "WorkerSupervisor", + "qname": "WorkerSupervisor", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "77609d9d5927171cce7fc3a54897c183fd63068710c6362029b700937aae5eee", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.create_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 61, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3b052062067a78aef3302ee1d996897e02a67d1b340397bea4f59fe147c0492a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a", + "dst_ref": "TraceService.create_context", + "resolution": "resolved", + "slice_id": "3b052062067a78aef3302ee1d996897e02a67d1b340397bea4f59fe147c0492a", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.create_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.close_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 84, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "7a9353ef57c9ae5d19b3a0c6ac50fad05e6d21d31bbe1cd1cd07af6332ba6505", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "01e14158dcced7e52d0c8ac84ac7b9a75225c261b6aca6a1d7da802d0994721c", + "dst_ref": "TraceService.close_context", + "resolution": "resolved", + "slice_id": "7a9353ef57c9ae5d19b3a0c6ac50fad05e6d21d31bbe1cd1cd07af6332ba6505", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.close_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "01e14158dcced7e52d0c8ac84ac7b9a75225c261b6aca6a1d7da802d0994721c" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.open_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 78, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a6e13b9ebc4fed84586afd53ed92a4d14757e440873f572b2337d5622ee96031", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426", + "dst_ref": "TraceService.open_context", + "resolution": "resolved", + "slice_id": "a6e13b9ebc4fed84586afd53ed92a4d14757e440873f572b2337d5622ee96031", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.open_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.transport\n -> TraceService.__init__", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 41, + "span_end": 43, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "1e923a93faa05c3c43ca9b19bd047007a8589ccce57d3cc1798ae7f9f200af98", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "dst_ref": "TraceService.__init__", + "resolution": "resolved", + "slice_id": "1e923a93faa05c3c43ca9b19bd047007a8589ccce57d3cc1798ae7f9f200af98", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.transport", + "TraceService.__init__" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.current_trace_id", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 81, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3ea17138634b1190bded77ddb84aa1595124f6519b246f24fc4b02bd62b5cac1", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c", + "dst_ref": "TraceService.current_trace_id", + "resolution": "resolved", + "slice_id": "3ea17138634b1190bded77ddb84aa1595124f6519b246f24fc4b02bd62b5cac1", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.current_trace_id" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.step", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 88, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "9f34c5da9b09fba99df6f6b1bde183a9aeb45111b8218a747c71590c2c9f60f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "c44bfbc66cf747283f30088da3e011a10395031d41e77b74e523c24997f641ca", + "dst_ref": "TraceService.step", + "resolution": "resolved", + "slice_id": "9f34c5da9b09fba99df6f6b1bde183a9aeb45111b8218a747c71590c2c9f60f2", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.step" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "c44bfbc66cf747283f30088da3e011a10395031d41e77b74e523c24997f641ca" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceRecordWriter:\n def __init__(self, transport: TraceTransport) -> None:\n self._logger = logging.getLogger(__name__)\n self._transport = transport\n\n def write_context(self, record: TraceContextRecord) -> None:\n try:\n self._transport.write_context(record)\n except Exception:\n self._logger.exception(\"Trace transport failed to write context %s\", record.trace_id)\n\n def write_message(self, record: TraceLogMessage) -> None:\n try:\n self._transport.write_message(record)\n except Exception:\n self._logger.exception(\"Trace transport failed to write message for %s\", record.trace_id)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/tracing/service.py:TraceRecordWriter", + "span_start": 21, + "span_end": 36, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceService(TraceContextFactory):\n def __init__(self, transport: TraceTransport | None = None, store: TraceContextStore | None = None) -> None:\n self.transport = transport or NoOpTraceTransport()\n self.store = store or TraceContextStore()\n self._writer = TraceRecordWriter(self.transport)\n\n def create_context(\n self,\n *,\n alias: str,\n parent_id: str | None = None,\n kind: str | None = None,\n attrs: dict[str, Any] | None = None,\n ) -> str:\n record = TraceContextRecord(\n trace_id=uuid4().hex,\n alias=str(alias or \"\"),\n parent_id=parent_id,\n type=kind,\n event_time=utc_now(),\n attrs=dict(attrs or {}),\n )\n self.store.push(record)\n self._writer.write_context(record)\n return record.trace_id\n\n @contextmanager\n def open_context(\n self,\n *,\n alias: str,\n parent_id: str | None = None,\n kind: str | None = None,\n attrs: dict[str, Any] | None = None,\n ) -> Iterator[str]:\n trace_id = self.create_context(alias=alias, parent_id=parent_id, kind=kind, attrs=attrs)\n try:\n yield trace_id\n finally:\n self.store.pop()\n\n def current_trace_id(self) -> str | None:\n return self.store.current_trace_id()\n\n def close_context(self) -> str | None:\n previous = self.store.pop()\n return previous.record.trace_id if previous else None\n\n def step(self, name: str) -> None:\n self.store.set_step(str(name or \"\"))\n\n def info(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"INFO\", message, status, attrs)\n\n def debug(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"DEBUG\", message, status, attrs)\n\n def warning(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"WARNING\", message, status, attrs)\n\n def error(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"ERROR\", message, status, attrs)\n\n def exception(self, message: str, *, status: str = \"failed\", attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"ERROR\", message, status, attrs)\n\n def new_root(self, operation: str) -> TraceContext:\n trace_id = self.create_context(alias=operation, kind=\"operation\", attrs={\"operation\": operation})\n return TraceContext(trace_id=trace_id, span_id=trace_id, attributes={\"operation\": operation})\n\n def child_of(self, parent: TraceContext, operation: str) -> TraceContext:\n trace_id = self.create_context(\n alias=operation,\n parent_id=parent.trace_id,\n kind=\"worker\",\n attrs={\"operation\": operation},\n )\n return TraceContext(\n trace_id=trace_id,\n span_id=trace_id,\n parent_span_id=parent.span_id,\n attributes={\"operation\": operation},\n )\n\n def attach(self, metadata: dict[str, object], context: TraceContext) -> dict[str, object]:\n updated = dict(metadata)\n updated[\"trace_id\"] = context.trace_id\n updated[\"span_id\"] = context.span_id\n updated[\"parent_span_id\"] = context.parent_span_id\n return updated\n\n def resume(self, metadata: dict[str, object], operation: str) -> TraceContext:\n trace_id = str(metadata.get(\"trace_id\") or uuid4().hex)\n span_id = str(metadata.get(\"span_id\") or trace_id)\n parent_id = metadata.get(\"parent_span_id\")\n self.create_context(\n alias=operation,\n parent_id=str(parent_id) if parent_id else None,\n kind=\"worker\",\n attrs=dict(metadata),\n )\n return TraceContext(\n trace_id=trace_id,\n span_id=span_id,\n parent_span_id=str(parent_id) if parent_id else None,\n attributes={\"operation\": operation},\n )\n\n def _write_message(\n self,\n level: TraceLevel,\n message: str,\n status: str | None,\n attrs: dict[str, Any] | None,\n ) -> None:\n active = self.store.current()\n if active is None:\n raise RuntimeError(\"Trace context is not bound. Call create_context() first.\")\n record = TraceLogMessage(\n trace_id=active.record.trace_id,\n step=active.step,\n status=str(status or \"\"),\n message=str(message or \"\"),\n level=level,\n event_time=utc_now(),\n attrs=dict(attrs or {}),\n )\n self._writer.write_message(record)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/tracing/service.py:TraceService", + "span_start": 39, + "span_end": 166, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceManager(TraceService):\n \"\"\"Compatibility alias during the transition from ConfigManager-shaped naming.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/tracing/service.py:TraceManager", + "span_start": 169, + "span_end": 170, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 2, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": null, + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS", + "C4_SEMANTIC_ROLES" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "partial", + "groundedness": "not_applicable" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "TraceService" + ], + "keyword_hints": [ + "TraceService" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "TraceService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Как работает TraceService?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "Как работает TraceService?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Как работает TraceService?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "Как работает TraceService?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "TraceService", + "alternatives": [ + "TraceService" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 8, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 123, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 38, + "C0_SOURCE_CHUNKS": 15, + "C4_SEMANTIC_ROLES": 13, + "C2_DEPENDENCY_GRAPH": 46, + "C3_ENTRYPOINTS": 8 + }, + "merge_rank": 17, + "prompt_build": 0, + "llm_call": 0 + }, + "prompt": null, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "TraceService" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 21, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-rag-explain-trace-service", + "mode": "router_rag", + "run_started_at": "2026-03-12T08:48:39", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Как работает TraceService?", + "normalized_query": "Как работает TraceService?" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Как работает TraceService?" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Как работает TraceService?" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "TraceService" + ], + "keyword_hints": [ + "TraceService" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Как работает TraceService?" + }, + "output": { + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "TraceService", + "alternatives": [ + "TraceService" + ], + "confidence": 0.99 + }, + "rag_count": 21, + "rag_rows": [ + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceService\nTraceService(TraceContextFactory)", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService", + "span_start": 39, + "span_end": 166, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "c2b2b976d99f2c600000b753731b26e0a69adcb4359398b93073590c5d5d04f4", + "qname": "TraceService", + "kind": "class", + "signature": "TraceService(TraceContextFactory)", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (13)", + "layer": "C4_SEMANTIC_ROLES", + "title": "TraceService", + "span_start": 39, + "span_end": 166, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 60, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "c2b2b976d99f2c600000b753731b26e0a69adcb4359398b93073590c5d5d04f4", + "symbol_name": "TraceService", + "qname": "TraceService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 13, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/queue/in_memory.py", + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)", + "layer": "C4_SEMANTIC_ROLES", + "title": "InMemoryTaskQueue", + "span_start": 9, + "span_end": 38, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 22, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "2da04cb94544a3bcbf0943a95ad4bdd8710bcafaa32a02fd0e4de2178dcf3533", + "symbol_name": "InMemoryTaskQueue", + "qname": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 9, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "58f0cc001ccda0eee4c6bc32ed83bd05eafd6b6644f1e8b4aa9eed3103db73dc", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "ConfigFileLoader\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (8)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ConfigFileLoader", + "span_start": 11, + "span_end": 48, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 23, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "a8474eca8b6e9dc86ae67ed68b16fa5fb639ef08739c053e7b7195489765667f", + "symbol_name": "ConfigFileLoader", + "qname": "ConfigFileLoader", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 8, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/store.py", + "content": "TraceContextStore\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "TraceContextStore", + "span_start": 15, + "span_end": 52, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b2dad4fbe16ffb11b58deba311c7739955c39d59f291b22181f33e9c8cce4059", + "symbol_name": "TraceContextStore", + "qname": "TraceContextStore", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "d369554f08fc92039c6edd5a2a1e73b23901533e8974459170bbd9347d263dc5", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workers/supervisor.py", + "content": "WorkerSupervisor\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkerSupervisor", + "span_start": 10, + "span_end": 59, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "c17b44e8d9e97d490989b21fa67d7c346cdda8a0472e4c41fb243c8846faa124", + "symbol_name": "WorkerSupervisor", + "qname": "WorkerSupervisor", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "77609d9d5927171cce7fc3a54897c183fd63068710c6362029b700937aae5eee", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.create_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 61, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3b052062067a78aef3302ee1d996897e02a67d1b340397bea4f59fe147c0492a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a", + "dst_ref": "TraceService.create_context", + "resolution": "resolved", + "slice_id": "3b052062067a78aef3302ee1d996897e02a67d1b340397bea4f59fe147c0492a", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.create_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.close_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 84, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "7a9353ef57c9ae5d19b3a0c6ac50fad05e6d21d31bbe1cd1cd07af6332ba6505", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "01e14158dcced7e52d0c8ac84ac7b9a75225c261b6aca6a1d7da802d0994721c", + "dst_ref": "TraceService.close_context", + "resolution": "resolved", + "slice_id": "7a9353ef57c9ae5d19b3a0c6ac50fad05e6d21d31bbe1cd1cd07af6332ba6505", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.close_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "01e14158dcced7e52d0c8ac84ac7b9a75225c261b6aca6a1d7da802d0994721c" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.open_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 78, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a6e13b9ebc4fed84586afd53ed92a4d14757e440873f572b2337d5622ee96031", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426", + "dst_ref": "TraceService.open_context", + "resolution": "resolved", + "slice_id": "a6e13b9ebc4fed84586afd53ed92a4d14757e440873f572b2337d5622ee96031", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.open_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.transport\n -> TraceService.__init__", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 41, + "span_end": 43, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "1e923a93faa05c3c43ca9b19bd047007a8589ccce57d3cc1798ae7f9f200af98", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "dst_ref": "TraceService.__init__", + "resolution": "resolved", + "slice_id": "1e923a93faa05c3c43ca9b19bd047007a8589ccce57d3cc1798ae7f9f200af98", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.transport", + "TraceService.__init__" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.current_trace_id", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 81, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3ea17138634b1190bded77ddb84aa1595124f6519b246f24fc4b02bd62b5cac1", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c", + "dst_ref": "TraceService.current_trace_id", + "resolution": "resolved", + "slice_id": "3ea17138634b1190bded77ddb84aa1595124f6519b246f24fc4b02bd62b5cac1", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.current_trace_id" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.step", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 88, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "9f34c5da9b09fba99df6f6b1bde183a9aeb45111b8218a747c71590c2c9f60f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "c44bfbc66cf747283f30088da3e011a10395031d41e77b74e523c24997f641ca", + "dst_ref": "TraceService.step", + "resolution": "resolved", + "slice_id": "9f34c5da9b09fba99df6f6b1bde183a9aeb45111b8218a747c71590c2c9f60f2", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.step" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "c44bfbc66cf747283f30088da3e011a10395031d41e77b74e523c24997f641ca" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceRecordWriter:\n def __init__(self, transport: TraceTransport) -> None:\n self._logger = logging.getLogger(__name__)\n self._transport = transport\n\n def write_context(self, record: TraceContextRecord) -> None:\n try:\n self._transport.write_context(record)\n except Exception:\n self._logger.exception(\"Trace transport failed to write context %s\", record.trace_id)\n\n def write_message(self, record: TraceLogMessage) -> None:\n try:\n self._transport.write_message(record)\n except Exception:\n self._logger.exception(\"Trace transport failed to write message for %s\", record.trace_id)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/tracing/service.py:TraceRecordWriter", + "span_start": 21, + "span_end": 36, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceService(TraceContextFactory):\n def __init__(self, transport: TraceTransport | None = None, store: TraceContextStore | None = None) -> None:\n self.transport = transport or NoOpTraceTransport()\n self.store = store or TraceContextStore()\n self._writer = TraceRecordWriter(self.transport)\n\n def create_context(\n self,\n *,\n alias: str,\n parent_id: str | None = None,\n kind: str | None = None,\n attrs: dict[str, Any] | None = None,\n ) -> str:\n record = TraceContextRecord(\n trace_id=uuid4().hex,\n alias=str(alias or \"\"),\n parent_id=parent_id,\n type=kind,\n event_time=utc_now(),\n attrs=dict(attrs or {}),\n )\n self.store.push(record)\n self._writer.write_context(record)\n return record.trace_id\n\n @contextmanager\n def open_context(\n self,\n *,\n alias: str,\n parent_id: str | None = None,\n kind: str | None = None,\n attrs: dict[str, Any] | None = None,\n ) -> Iterator[str]:\n trace_id = self.create_context(alias=alias, parent_id=parent_id, kind=kind, attrs=attrs)\n try:\n yield trace_id\n finally:\n self.store.pop()\n\n def current_trace_id(self) -> str | None:\n return self.store.current_trace_id()\n\n def close_context(self) -> str | None:\n previous = self.store.pop()\n return previous.record.trace_id if previous else None\n\n def step(self, name: str) -> None:\n self.store.set_step(str(name or \"\"))\n\n def info(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"INFO\", message, status, attrs)\n\n def debug(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"DEBUG\", message, status, attrs)\n\n def warning(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"WARNING\", message, status, attrs)\n\n def error(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"ERROR\", message, status, attrs)\n\n def exception(self, message: str, *, status: str = \"failed\", attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"ERROR\", message, status, attrs)\n\n def new_root(self, operation: str) -> TraceContext:\n trace_id = self.create_context(alias=operation, kind=\"operation\", attrs={\"operation\": operation})\n return TraceContext(trace_id=trace_id, span_id=trace_id, attributes={\"operation\": operation})\n\n def child_of(self, parent: TraceContext, operation: str) -> TraceContext:\n trace_id = self.create_context(\n alias=operation,\n parent_id=parent.trace_id,\n kind=\"worker\",\n attrs={\"operation\": operation},\n )\n return TraceContext(\n trace_id=trace_id,\n span_id=trace_id,\n parent_span_id=parent.span_id,\n attributes={\"operation\": operation},\n )\n\n def attach(self, metadata: dict[str, object], context: TraceContext) -> dict[str, object]:\n updated = dict(metadata)\n updated[\"trace_id\"] = context.trace_id\n updated[\"span_id\"] = context.span_id\n updated[\"parent_span_id\"] = context.parent_span_id\n return updated\n\n def resume(self, metadata: dict[str, object], operation: str) -> TraceContext:\n trace_id = str(metadata.get(\"trace_id\") or uuid4().hex)\n span_id = str(metadata.get(\"span_id\") or trace_id)\n parent_id = metadata.get(\"parent_span_id\")\n self.create_context(\n alias=operation,\n parent_id=str(parent_id) if parent_id else None,\n kind=\"worker\",\n attrs=dict(metadata),\n )\n return TraceContext(\n trace_id=trace_id,\n span_id=span_id,\n parent_span_id=str(parent_id) if parent_id else None,\n attributes={\"operation\": operation},\n )\n\n def _write_message(\n self,\n level: TraceLevel,\n message: str,\n status: str | None,\n attrs: dict[str, Any] | None,\n ) -> None:\n active = self.store.current()\n if active is None:\n raise RuntimeError(\"Trace context is not bound. Call create_context() first.\")\n record = TraceLogMessage(\n trace_id=active.record.trace_id,\n step=active.step,\n status=str(status or \"\"),\n message=str(message or \"\"),\n level=level,\n event_time=utc_now(),\n attrs=dict(attrs or {}),\n )\n self._writer.write_message(record)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/tracing/service.py:TraceService", + "span_start": 39, + "span_end": 166, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceManager(TraceService):\n \"\"\"Compatibility alias during the transition from ConfigManager-shaped naming.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/tracing/service.py:TraceManager", + "span_start": 169, + "span_end": 170, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 2, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "TraceService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Как работает TraceService?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "Как работает TraceService?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Как работает TraceService?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "Как работает TraceService?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "TraceService", + "alternatives": [ + "TraceService" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 8, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 123, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 38, + "C0_SOURCE_CHUNKS": 15, + "C4_SEMANTIC_ROLES": 13, + "C2_DEPENDENCY_GRAPH": 46, + "C3_ENTRYPOINTS": 8 + }, + "merge_rank": 17 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_084838/router_rag_plba_code_retrieval_plba-rag-explain-trace-service.md b/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_084838/router_rag_plba_code_retrieval_plba-rag-explain-trace-service.md new file mode 100644 index 0000000..7e7f53f --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_084838/router_rag_plba_code_retrieval_plba-rag-explain-trace-service.md @@ -0,0 +1,34 @@ +# plba-rag-explain-trace-service + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/router_rag_plba_code_retrieval.yaml +- runner: runtime +- mode: router_rag +- passed: True + +## Query +Как работает TraceService? + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 21, + "llm_answer": "", + "answer_mode": "partial", + "path_scope": [], + "symbol_candidates": [ + "TraceService" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_084838/router_rag_plba_code_retrieval_plba-rag-find-entrypoints.json b/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_084838/router_rag_plba_code_retrieval_plba-rag-find-entrypoints.json new file mode 100644 index 0000000..d1c4a7f --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_084838/router_rag_plba_code_retrieval_plba-rag-find-entrypoints.json @@ -0,0 +1,1139 @@ +{ + "case_id": "plba-rag-find-entrypoints", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/router_rag_plba_code_retrieval.yaml", + "runner": "runtime", + "mode": "router_rag", + "actual": { + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 9, + "llm_answer": "", + "answer_mode": "partial", + "path_scope": [], + "symbol_candidates": [], + "layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-rag-find-entrypoints", + "text": "Найди точки входа в коде", + "mode": "router_rag", + "run_started_at": "2026-03-12T08:48:39", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Найди точки входа в коде", + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [], + "confidence": 0.0 + }, + "rag_count": 9, + "rag_rows": [ + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/contracts/result.py", + "content": "class StepResult:\n transition: str = \"success\"\n updates: dict[str, Any] = field(default_factory=dict)\n status: str = \"completed\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/workflow/contracts/result.py:StepResult", + "span_start": 8, + "span_end": 11, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.workflow.contracts.result", + "is_test": false, + "blob_sha": "6e57dbfe22873f097f11228a26cffa415440a43b68a737b220906461cd86c353", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/__init__.py", + "content": "from app_runtime.config.file_loader import ConfigFileLoader\nfrom app_runtime.config.providers import FileConfigProvider\n\n__all__ = [\"ConfigFileLoader\", \"FileConfigProvider\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/config/__init__.py:1-4", + "span_start": 1, + "span_end": 4, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.config.__init__", + "is_test": false, + "blob_sha": "612918029820a2a983330ec92256142b55b9de4bdf3399ece18e2a02dbad9729", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/__init__.py", + "content": "__all__: list[str] = []", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/__init__.py:1-1", + "span_start": 1, + "span_end": 1, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.__init__", + "is_test": false, + "blob_sha": "8eea9df4f6d7b38ca0e39ccc27b04700e3d08dbeec8046d613d22706d19985fa", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "class ConfigFileLoader:\n def __init__(self, path: str | Path) -> None:\n self.path = Path(path)\n self.config: Any = None\n self.last_valid_config: Any = None\n self._last_seen_hash: str | None = None\n\n def read_text(self) -> str:\n return self.path.read_text(encoding=\"utf-8\")\n\n def parse(self, data: str) -> Any:\n suffix = self.path.suffix.lower()\n if suffix in {\".yml\", \".yaml\"}:\n return yaml.safe_load(data)\n return json.loads(data)\n\n def load_sync(self) -> Any:\n data = self.read_text()\n parsed = self.parse(data)\n self.config = parsed\n self.last_valid_config = parsed\n self._last_seen_hash = self._calculate_hash(data)\n return parsed\n\n def load_if_changed(self) -> tuple[bool, Any]:\n data = self.read_text()\n current_hash = self._calculate_hash(data)\n if current_hash == self._last_seen_hash:\n return False, self.config\n parsed = self.parse(data)\n self.config = parsed\n self.last_valid_config = parsed\n self._last_seen_hash = current_hash\n return True, parsed\n\n @staticmethod\n def _calculate_hash(data: str) -> str:\n return hashlib.sha256(data.encode(\"utf-8\")).hexdigest()", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/config/file_loader.py:ConfigFileLoader", + "span_start": 11, + "span_end": 48, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/providers.py", + "content": "class FileConfigProvider(ConfigProvider):\n def __init__(self, path: str | Path) -> None:\n self._loader = ConfigFileLoader(path)\n\n @property\n def loader(self) -> ConfigFileLoader:\n return self._loader\n\n def load(self) -> dict[str, Any]:\n config = self._loader.load_sync()\n if not isinstance(config, dict):\n raise TypeError(\"Config root must be a mapping\")\n return dict(config)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/config/providers.py:FileConfigProvider", + "span_start": 10, + "span_end": 22, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.config.providers", + "is_test": false, + "blob_sha": "8c53ca0122d6df6c5763bca15e99434bb4daebd5a618b8fc927e9ae90b022e64", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlActionSet:\n health: HealthHandler\n start: ActionHandler\n stop: ActionHandler\n status: ActionHandler", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": null, + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C3_ENTRYPOINTS" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "partial", + "groundedness": "not_applicable" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "unknown", + "symbol_candidates": [], + "keyword_hints": [], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C3_ENTRYPOINTS": "exact_path_fetch", + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C3_ENTRYPOINTS": 12, + "C0_SOURCE_CHUNKS": 6 + }, + "filters_by_layer": { + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C3_ENTRYPOINTS", + "query": "Найди точки входа в коде", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 12, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Найди точки входа в коде", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [] + }, + "layers": [ + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 6, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 18, + "retrieval_by_layer": { + "C3_ENTRYPOINTS": 8, + "C0_SOURCE_CHUNKS": 9 + }, + "merge_rank": 0, + "prompt_build": 0, + "llm_call": 0 + }, + "prompt": null, + "router": { + "conversation_mode": "START", + "keyword_hints": [], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 9, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-rag-find-entrypoints", + "mode": "router_rag", + "run_started_at": "2026-03-12T08:48:39", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Найди точки входа в коде", + "normalized_query": "Найди точки входа в коде" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Найди точки входа в коде" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Найди точки входа в коде" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "unknown", + "symbol_candidates": [], + "keyword_hints": [], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Найди точки входа в коде" + }, + "output": { + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [], + "confidence": 0.0 + }, + "rag_count": 9, + "rag_rows": [ + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/contracts/result.py", + "content": "class StepResult:\n transition: str = \"success\"\n updates: dict[str, Any] = field(default_factory=dict)\n status: str = \"completed\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/workflow/contracts/result.py:StepResult", + "span_start": 8, + "span_end": 11, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.workflow.contracts.result", + "is_test": false, + "blob_sha": "6e57dbfe22873f097f11228a26cffa415440a43b68a737b220906461cd86c353", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/__init__.py", + "content": "from app_runtime.config.file_loader import ConfigFileLoader\nfrom app_runtime.config.providers import FileConfigProvider\n\n__all__ = [\"ConfigFileLoader\", \"FileConfigProvider\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/config/__init__.py:1-4", + "span_start": 1, + "span_end": 4, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.config.__init__", + "is_test": false, + "blob_sha": "612918029820a2a983330ec92256142b55b9de4bdf3399ece18e2a02dbad9729", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/__init__.py", + "content": "__all__: list[str] = []", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/__init__.py:1-1", + "span_start": 1, + "span_end": 1, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.__init__", + "is_test": false, + "blob_sha": "8eea9df4f6d7b38ca0e39ccc27b04700e3d08dbeec8046d613d22706d19985fa", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "class ConfigFileLoader:\n def __init__(self, path: str | Path) -> None:\n self.path = Path(path)\n self.config: Any = None\n self.last_valid_config: Any = None\n self._last_seen_hash: str | None = None\n\n def read_text(self) -> str:\n return self.path.read_text(encoding=\"utf-8\")\n\n def parse(self, data: str) -> Any:\n suffix = self.path.suffix.lower()\n if suffix in {\".yml\", \".yaml\"}:\n return yaml.safe_load(data)\n return json.loads(data)\n\n def load_sync(self) -> Any:\n data = self.read_text()\n parsed = self.parse(data)\n self.config = parsed\n self.last_valid_config = parsed\n self._last_seen_hash = self._calculate_hash(data)\n return parsed\n\n def load_if_changed(self) -> tuple[bool, Any]:\n data = self.read_text()\n current_hash = self._calculate_hash(data)\n if current_hash == self._last_seen_hash:\n return False, self.config\n parsed = self.parse(data)\n self.config = parsed\n self.last_valid_config = parsed\n self._last_seen_hash = current_hash\n return True, parsed\n\n @staticmethod\n def _calculate_hash(data: str) -> str:\n return hashlib.sha256(data.encode(\"utf-8\")).hexdigest()", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/config/file_loader.py:ConfigFileLoader", + "span_start": 11, + "span_end": 48, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/providers.py", + "content": "class FileConfigProvider(ConfigProvider):\n def __init__(self, path: str | Path) -> None:\n self._loader = ConfigFileLoader(path)\n\n @property\n def loader(self) -> ConfigFileLoader:\n return self._loader\n\n def load(self) -> dict[str, Any]:\n config = self._loader.load_sync()\n if not isinstance(config, dict):\n raise TypeError(\"Config root must be a mapping\")\n return dict(config)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/config/providers.py:FileConfigProvider", + "span_start": 10, + "span_end": 22, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.config.providers", + "is_test": false, + "blob_sha": "8c53ca0122d6df6c5763bca15e99434bb4daebd5a618b8fc927e9ae90b022e64", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlActionSet:\n health: HealthHandler\n start: ActionHandler\n stop: ActionHandler\n status: ActionHandler", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C3_ENTRYPOINTS": "exact_path_fetch", + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C3_ENTRYPOINTS": 12, + "C0_SOURCE_CHUNKS": 6 + }, + "filters_by_layer": { + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C3_ENTRYPOINTS", + "query": "Найди точки входа в коде", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 12, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Найди точки входа в коде", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [] + }, + "layers": [ + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 6, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 18, + "retrieval_by_layer": { + "C3_ENTRYPOINTS": 8, + "C0_SOURCE_CHUNKS": 9 + }, + "merge_rank": 0 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_084838/router_rag_plba_code_retrieval_plba-rag-find-entrypoints.md b/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_084838/router_rag_plba_code_retrieval_plba-rag-find-entrypoints.md new file mode 100644 index 0000000..fa2a4bb --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_084838/router_rag_plba_code_retrieval_plba-rag-find-entrypoints.md @@ -0,0 +1,29 @@ +# plba-rag-find-entrypoints + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/router_rag_plba_code_retrieval.yaml +- runner: runtime +- mode: router_rag +- passed: True + +## Query +Найди точки входа в коде + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 9, + "llm_answer": "", + "answer_mode": "partial", + "path_scope": [], + "symbol_candidates": [], + "layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_084838/router_rag_plba_code_retrieval_plba-rag-find-tests-http-control-channel.json b/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_084838/router_rag_plba_code_retrieval_plba-rag-find-tests-http-control-channel.json new file mode 100644 index 0000000..d208bbe --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_084838/router_rag_plba_code_retrieval_plba-rag-find-tests-http-control-channel.json @@ -0,0 +1,1738 @@ +{ + "case_id": "plba-rag-find-tests-http-control-channel", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/router_rag_plba_code_retrieval.yaml", + "runner": "runtime", + "mode": "router_rag", + "actual": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 16, + "llm_answer": "", + "answer_mode": "partial", + "path_scope": [], + "symbol_candidates": [ + "HttpControlChannel" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-rag-find-tests-http-control-channel", + "text": "Найди тесты для HttpControlChannel", + "mode": "router_rag", + "run_started_at": "2026-03-12T08:48:39", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Найди тесты для HttpControlChannel", + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "HttpControlChannel" + ], + "confidence": 0.0 + }, + "rag_count": 16, + "rag_rows": [ + { + "path": "tests/test_runtime.py", + "content": "test_http_control_channel_exposes_health_and_actions reads_attr asyncio.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_http_control_channel_exposes_health_and_actions:reads_attr", + "span_start": 339, + "span_end": 339, + "lexical_rank": 4, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "8cc58b96c744ee7cf7d1a8ad7bb92a891a43107869065c004a1a3ce0dd490a6b", + "edge_type": "reads_attr", + "src_symbol_id": "a5f91bbdc86d497cf0b20a6c10caf97bee5148eae96d13c175399533be193291", + "src_qname": "test_http_control_channel_exposes_health_and_actions", + "dst_symbol_id": null, + "dst_ref": "asyncio.run", + "resolution": "partial", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "test_http_control_channel_exposes_health_and_actions calls channel.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_http_control_channel_exposes_health_and_actions:calls", + "span_start": 318, + "span_end": 325, + "lexical_rank": 4, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3f96da44a1e918ac0c2bf7a4a847deced1acc5dfe285d888e8f5d1f6c1716c04", + "edge_type": "calls", + "src_symbol_id": "a5f91bbdc86d497cf0b20a6c10caf97bee5148eae96d13c175399533be193291", + "src_qname": "test_http_control_channel_exposes_health_and_actions", + "dst_symbol_id": null, + "dst_ref": "channel.start", + "resolution": "partial", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "test_http_control_channel_exposes_health_and_actions calls asyncio.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_http_control_channel_exposes_health_and_actions:calls", + "span_start": 339, + "span_end": 339, + "lexical_rank": 4, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "91fb36608973c49de1ebe925be4cfbf215788cbb472a85de8c749572fbc1348e", + "edge_type": "calls", + "src_symbol_id": "a5f91bbdc86d497cf0b20a6c10caf97bee5148eae96d13c175399533be193291", + "src_qname": "test_http_control_channel_exposes_health_and_actions", + "dst_symbol_id": null, + "dst_ref": "asyncio.run", + "resolution": "partial", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "test_http_control_channel_exposes_health_and_actions instantiates HttpControlChannel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_http_control_channel_exposes_health_and_actions:instantiates", + "span_start": 317, + "span_end": 317, + "lexical_rank": 4, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "da9945affedec9dad344f9fede71b834f44c79992678439b144d0a10bcf52efa", + "edge_type": "instantiates", + "src_symbol_id": "a5f91bbdc86d497cf0b20a6c10caf97bee5148eae96d13c175399533be193291", + "src_qname": "test_http_control_channel_exposes_health_and_actions", + "dst_symbol_id": null, + "dst_ref": "HttpControlChannel", + "resolution": "partial", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "test_http_control_channel_exposes_health_and_actions calls scenario", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_http_control_channel_exposes_health_and_actions:calls", + "span_start": 339, + "span_end": 339, + "lexical_rank": 4, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "4820478ea2620cc3f71ba0143219550671279e5e0d642bd7fb2458259a9cf4fd", + "edge_type": "calls", + "src_symbol_id": "a5f91bbdc86d497cf0b20a6c10caf97bee5148eae96d13c175399533be193291", + "src_qname": "test_http_control_channel_exposes_health_and_actions", + "dst_symbol_id": null, + "dst_ref": "scenario", + "resolution": "partial", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "test_http_control_channel_exposes_health_and_actions calls channel._action_response", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_http_control_channel_exposes_health_and_actions:calls", + "span_start": 327, + "span_end": 327, + "lexical_rank": 4, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "1a5f8d1e30343961f5e934d1fd6c5f464d27dbd09ad89b9f3240d78f5cdea464", + "edge_type": "calls", + "src_symbol_id": "a5f91bbdc86d497cf0b20a6c10caf97bee5148eae96d13c175399533be193291", + "src_qname": "test_http_control_channel_exposes_health_and_actions", + "dst_symbol_id": null, + "dst_ref": "channel._action_response", + "resolution": "partial", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _build_runtime(worker: Worker, *, control_timeout: int = 1) -> tuple[RuntimeManager, str]:\n runtime = RuntimeManager()\n channel = HttpControlChannel(host=\"127.0.0.1\", port=0, timeout=control_timeout)\n runtime.control_plane.register_channel(channel)\n runtime.register_module(WorkerModule(worker))\n runtime.start()\n return runtime, f\"http://127.0.0.1:{channel.port}\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_build_runtime", + "span_start": 154, + "span_end": 160, + "lexical_rank": 5, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 6, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def test_actions_start_stop_and_health_when_worker_is_idle() -> None:\n runtime, base_url = _build_runtime(ScenarioWorker(\"idle-worker\", IntervalRoutine(), interval=0.2))\n try:\n stop_status, stop_payload = _http_call_json(base_url, \"/actions/stop\", method=\"POST\")\n assert stop_status == 200\n assert isinstance(stop_payload.get(\"detail\"), dict)\n assert stop_payload[\"detail\"][\"timed_out\"] is False\n assert stop_payload[\"detail\"][\"state\"] == \"stopped\"\n\n health_stopped_status, health_stopped_payload = _http_call_json(base_url, \"/health\")\n assert health_stopped_status == 503\n assert health_stopped_payload[\"state\"] == \"stopped\"\n assert health_stopped_payload[\"status\"] == \"unhealthy\"\n\n start_status, start_payload = _http_call_json(base_url, \"/actions/start\", method=\"POST\")\n assert start_status == 200\n assert isinstance(start_payload.get(\"detail\"), dict)\n assert start_payload[\"detail\"][\"timed_out\"] is False\n assert start_payload[\"detail\"][\"state\"] in {\"idle\", \"busy\"}\n\n health_started_status, health_started_payload = _http_call_json(base_url, \"/health\")\n assert health_started_status == 200\n assert health_started_payload[\"status\"] == \"ok\"\n assert health_started_payload[\"state\"] in {\"idle\", \"busy\"}\n finally:\n runtime.stop()", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:test_actions_start_stop_and_health_when_worker_is_idle", + "span_start": 181, + "span_end": 206, + "lexical_rank": 5, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 8, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class WorkerModule(ApplicationModule):\n def __init__(self, worker: Worker) -> None:\n self._worker = worker\n\n @property\n def name(self) -> str:\n return \"business-tests\"\n\n def register(self, registry: ModuleRegistry) -> None:\n registry.add_worker(self._worker)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:WorkerModule", + "span_start": 113, + "span_end": 122, + "lexical_rank": 5, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 3, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _poll_until_stopped(base_url: str, timeout: float = 2.0) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n _, payload = _http_call_json(base_url, \"/actions/status\")\n if payload.get(\"detail\") == \"stopped\":\n return True\n sleep(0.05)\n return False", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_poll_until_stopped", + "span_start": 144, + "span_end": 151, + "lexical_rank": 5, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 5, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class IntervalRoutine:\n calls: list[float] = field(default_factory=list)\n _lock: Lock = field(default_factory=Lock)\n\n def run(self) -> None:\n with self._lock:\n self.calls.append(monotonic())\n\n def wait_runs(self, count: int, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n with self._lock:\n if len(self.calls) >= count:\n return True\n sleep(0.01)\n return False\n\n def deltas(self) -> list[float]:\n with self._lock:\n return [self.calls[index + 1] - self.calls[index] for index in range(len(self.calls) - 1)]", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:IntervalRoutine", + "span_start": 18, + "span_end": 37, + "lexical_rank": 5, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def test_worker_wakes_up_with_configured_interval() -> None:\n interval = 0.15\n routine = IntervalRoutine()\n worker = ScenarioWorker(\"interval-worker\", routine, interval=interval)\n runtime = RuntimeManager()\n runtime.register_module(WorkerModule(worker))\n\n runtime.start()\n try:\n assert routine.wait_runs(count=3, timeout=2.0) is True\n finally:\n runtime.stop()\n\n deltas = routine.deltas()\n assert len(deltas) >= 2\n assert all(delta >= interval * 0.7 for delta in deltas[:2])", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:test_worker_wakes_up_with_configured_interval", + "span_start": 163, + "span_end": 178, + "lexical_rank": 5, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 7, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class BlockingRoutine:\n def __init__(self, started: Event, release: Event) -> None:\n self._started = started\n self._release = release\n\n def run(self) -> None:\n self._started.set()\n self._release.wait(timeout=5.0)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:BlockingRoutine", + "span_start": 40, + "span_end": 47, + "lexical_rank": 5, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class ScenarioWorker(Worker):\n def __init__(self, name: str, routine: object, *, interval: float = 0.05) -> None:\n self._name = name\n self._routine = routine\n self._interval = interval\n self._thread: Thread | None = None\n self._stop_requested = Event()\n self._in_flight = 0\n self._runs = 0\n self._lock = Lock()\n\n @property\n def name(self) -> str:\n return self._name\n\n @property\n def critical(self) -> bool:\n return True\n\n def start(self) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._stop_requested.clear()\n self._thread = Thread(target=self._loop, name=f\"{self._name}-thread\", daemon=True)\n self._thread.start()\n\n def stop(self, force: bool = False) -> None:\n self._stop_requested.set()\n\n def health(self) -> WorkerHealth:\n return WorkerHealth(name=self.name, status=\"ok\", critical=True, meta={\"runs\": self._runs})\n\n def status(self) -> WorkerStatus:\n thread_alive = self._thread is not None and self._thread.is_alive()\n with self._lock:\n in_flight = self._in_flight\n runs = self._runs\n if not thread_alive:\n state = \"stopped\"\n elif self._stop_requested.is_set():\n state = \"stopping\"\n elif in_flight > 0:\n state = \"busy\"\n else:\n state = \"idle\"\n return WorkerStatus(name=self.name, state=state, in_flight=in_flight, meta={\"runs\": runs})\n\n def _loop(self) -> None:\n while not self._stop_requested.is_set():\n with self._lock:\n self._in_flight += 1\n try:\n self._routine.run()\n with self._lock:\n self._runs += 1\n finally:\n with self._lock:\n self._in_flight -= 1\n if self._stop_requested.is_set():\n return\n sleep(self._interval)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:ScenarioWorker", + "span_start": 50, + "span_end": 110, + "lexical_rank": 5, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 2, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _http_call_json(\n base_url: str,\n path: str,\n *,\n method: str = \"GET\",\n headers: dict[str, str] | None = None,\n) -> tuple[int, dict[str, object]]:\n request = Request(f\"{base_url}{path}\", method=method, headers=headers or {})\n try:\n with urlopen(request, timeout=15.0) as response:\n status = response.status\n body = response.read()\n except HTTPError as error:\n status = error.code\n body = error.read()\n payload = json.loads(body.decode(\"utf-8\"))\n return status, payload", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_http_call_json", + "span_start": 125, + "span_end": 141, + "lexical_rank": 5, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 4, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def test_actions_stop_busy_worker_before_timeout() -> None:\n started = Event()\n release = Event()\n runtime, base_url = _build_runtime(ScenarioWorker(\"busy-worker\", BlockingRoutine(started, release)))\n assert started.wait(timeout=1.0) is True\n\n def release_later() -> None:\n sleep(0.2)\n release.set()\n\n Thread(target=release_later, daemon=True).start()\n try:\n status, payload = _http_call_json(base_url, \"/actions/stop\", method=\"POST\")\n assert status == 200\n assert isinstance(payload.get(\"detail\"), dict)\n assert payload[\"detail\"][\"timed_out\"] is False\n assert payload[\"detail\"][\"state\"] == \"stopped\"\n\n health_status, health_payload = _http_call_json(base_url, \"/health\")\n assert health_status == 503\n assert health_payload[\"status\"] == \"unhealthy\"\n assert health_payload[\"state\"] == \"stopped\"\n finally:\n runtime.stop()", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:test_actions_stop_busy_worker_before_timeout", + "span_start": 209, + "span_end": 232, + "lexical_rank": 5, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 9, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": null, + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C2_DEPENDENCY_GRAPH" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "partial", + "groundedness": "not_applicable" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "HttpControlChannel" + ], + "keyword_hints": [ + "HttpControlChannel" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "test_file_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "test_symbol_patterns": [ + "test_http_control_channel", + "TestHttpControlChannel", + "HttpControlChannel" + ], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C0_SOURCE_CHUNKS": 10 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src", + "tests" + ], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src", + "tests" + ], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "HttpControlChannel", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Найди тесты для HttpControlChannel test_http_control_channel TestHttpControlChannel HttpControlChannel", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Найди тесты для HttpControlChannel test_http_control_channel TestHttpControlChannel HttpControlChannel", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 10, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 0, + "candidates_after_filter": 0 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src", + "tests" + ], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src", + "tests" + ], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 10, + "candidates_after_filter": 10 + } + ], + "fallback": { + "used": true, + "reason": "scope_relaxed_no_hits" + }, + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "HttpControlChannel" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "miss", + "hit_count": 0, + "fail_reason": "scope_relaxed_no_hits" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 10, + "fail_reason": null + } + ] + }, + "constraint_violations": [ + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C1_SYMBOL_CATALOG", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + } + ], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 94, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 36, + "C2_DEPENDENCY_GRAPH": 44, + "C0_SOURCE_CHUNKS": 13 + }, + "merge_rank": 0, + "prompt_build": 0, + "llm_call": 0 + }, + "prompt": null, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "HttpControlChannel" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 16, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-rag-find-tests-http-control-channel", + "mode": "router_rag", + "run_started_at": "2026-03-12T08:48:39", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Найди тесты для HttpControlChannel", + "normalized_query": "Найди тесты для HttpControlChannel" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Найди тесты для HttpControlChannel" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Найди тесты для HttpControlChannel" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "HttpControlChannel" + ], + "keyword_hints": [ + "HttpControlChannel" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "test_file_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "test_symbol_patterns": [ + "test_http_control_channel", + "TestHttpControlChannel", + "HttpControlChannel" + ], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Найди тесты для HttpControlChannel" + }, + "output": { + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "HttpControlChannel" + ], + "confidence": 0.0 + }, + "rag_count": 16, + "rag_rows": [ + { + "path": "tests/test_runtime.py", + "content": "test_http_control_channel_exposes_health_and_actions reads_attr asyncio.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_http_control_channel_exposes_health_and_actions:reads_attr", + "span_start": 339, + "span_end": 339, + "lexical_rank": 4, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "8cc58b96c744ee7cf7d1a8ad7bb92a891a43107869065c004a1a3ce0dd490a6b", + "edge_type": "reads_attr", + "src_symbol_id": "a5f91bbdc86d497cf0b20a6c10caf97bee5148eae96d13c175399533be193291", + "src_qname": "test_http_control_channel_exposes_health_and_actions", + "dst_symbol_id": null, + "dst_ref": "asyncio.run", + "resolution": "partial", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "test_http_control_channel_exposes_health_and_actions calls channel.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_http_control_channel_exposes_health_and_actions:calls", + "span_start": 318, + "span_end": 325, + "lexical_rank": 4, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3f96da44a1e918ac0c2bf7a4a847deced1acc5dfe285d888e8f5d1f6c1716c04", + "edge_type": "calls", + "src_symbol_id": "a5f91bbdc86d497cf0b20a6c10caf97bee5148eae96d13c175399533be193291", + "src_qname": "test_http_control_channel_exposes_health_and_actions", + "dst_symbol_id": null, + "dst_ref": "channel.start", + "resolution": "partial", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "test_http_control_channel_exposes_health_and_actions calls asyncio.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_http_control_channel_exposes_health_and_actions:calls", + "span_start": 339, + "span_end": 339, + "lexical_rank": 4, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "91fb36608973c49de1ebe925be4cfbf215788cbb472a85de8c749572fbc1348e", + "edge_type": "calls", + "src_symbol_id": "a5f91bbdc86d497cf0b20a6c10caf97bee5148eae96d13c175399533be193291", + "src_qname": "test_http_control_channel_exposes_health_and_actions", + "dst_symbol_id": null, + "dst_ref": "asyncio.run", + "resolution": "partial", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "test_http_control_channel_exposes_health_and_actions instantiates HttpControlChannel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_http_control_channel_exposes_health_and_actions:instantiates", + "span_start": 317, + "span_end": 317, + "lexical_rank": 4, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "da9945affedec9dad344f9fede71b834f44c79992678439b144d0a10bcf52efa", + "edge_type": "instantiates", + "src_symbol_id": "a5f91bbdc86d497cf0b20a6c10caf97bee5148eae96d13c175399533be193291", + "src_qname": "test_http_control_channel_exposes_health_and_actions", + "dst_symbol_id": null, + "dst_ref": "HttpControlChannel", + "resolution": "partial", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "test_http_control_channel_exposes_health_and_actions calls scenario", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_http_control_channel_exposes_health_and_actions:calls", + "span_start": 339, + "span_end": 339, + "lexical_rank": 4, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "4820478ea2620cc3f71ba0143219550671279e5e0d642bd7fb2458259a9cf4fd", + "edge_type": "calls", + "src_symbol_id": "a5f91bbdc86d497cf0b20a6c10caf97bee5148eae96d13c175399533be193291", + "src_qname": "test_http_control_channel_exposes_health_and_actions", + "dst_symbol_id": null, + "dst_ref": "scenario", + "resolution": "partial", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "test_http_control_channel_exposes_health_and_actions calls channel._action_response", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_http_control_channel_exposes_health_and_actions:calls", + "span_start": 327, + "span_end": 327, + "lexical_rank": 4, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "1a5f8d1e30343961f5e934d1fd6c5f464d27dbd09ad89b9f3240d78f5cdea464", + "edge_type": "calls", + "src_symbol_id": "a5f91bbdc86d497cf0b20a6c10caf97bee5148eae96d13c175399533be193291", + "src_qname": "test_http_control_channel_exposes_health_and_actions", + "dst_symbol_id": null, + "dst_ref": "channel._action_response", + "resolution": "partial", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _build_runtime(worker: Worker, *, control_timeout: int = 1) -> tuple[RuntimeManager, str]:\n runtime = RuntimeManager()\n channel = HttpControlChannel(host=\"127.0.0.1\", port=0, timeout=control_timeout)\n runtime.control_plane.register_channel(channel)\n runtime.register_module(WorkerModule(worker))\n runtime.start()\n return runtime, f\"http://127.0.0.1:{channel.port}\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_build_runtime", + "span_start": 154, + "span_end": 160, + "lexical_rank": 5, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 6, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def test_actions_start_stop_and_health_when_worker_is_idle() -> None:\n runtime, base_url = _build_runtime(ScenarioWorker(\"idle-worker\", IntervalRoutine(), interval=0.2))\n try:\n stop_status, stop_payload = _http_call_json(base_url, \"/actions/stop\", method=\"POST\")\n assert stop_status == 200\n assert isinstance(stop_payload.get(\"detail\"), dict)\n assert stop_payload[\"detail\"][\"timed_out\"] is False\n assert stop_payload[\"detail\"][\"state\"] == \"stopped\"\n\n health_stopped_status, health_stopped_payload = _http_call_json(base_url, \"/health\")\n assert health_stopped_status == 503\n assert health_stopped_payload[\"state\"] == \"stopped\"\n assert health_stopped_payload[\"status\"] == \"unhealthy\"\n\n start_status, start_payload = _http_call_json(base_url, \"/actions/start\", method=\"POST\")\n assert start_status == 200\n assert isinstance(start_payload.get(\"detail\"), dict)\n assert start_payload[\"detail\"][\"timed_out\"] is False\n assert start_payload[\"detail\"][\"state\"] in {\"idle\", \"busy\"}\n\n health_started_status, health_started_payload = _http_call_json(base_url, \"/health\")\n assert health_started_status == 200\n assert health_started_payload[\"status\"] == \"ok\"\n assert health_started_payload[\"state\"] in {\"idle\", \"busy\"}\n finally:\n runtime.stop()", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:test_actions_start_stop_and_health_when_worker_is_idle", + "span_start": 181, + "span_end": 206, + "lexical_rank": 5, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 8, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class WorkerModule(ApplicationModule):\n def __init__(self, worker: Worker) -> None:\n self._worker = worker\n\n @property\n def name(self) -> str:\n return \"business-tests\"\n\n def register(self, registry: ModuleRegistry) -> None:\n registry.add_worker(self._worker)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:WorkerModule", + "span_start": 113, + "span_end": 122, + "lexical_rank": 5, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 3, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _poll_until_stopped(base_url: str, timeout: float = 2.0) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n _, payload = _http_call_json(base_url, \"/actions/status\")\n if payload.get(\"detail\") == \"stopped\":\n return True\n sleep(0.05)\n return False", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_poll_until_stopped", + "span_start": 144, + "span_end": 151, + "lexical_rank": 5, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 5, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class IntervalRoutine:\n calls: list[float] = field(default_factory=list)\n _lock: Lock = field(default_factory=Lock)\n\n def run(self) -> None:\n with self._lock:\n self.calls.append(monotonic())\n\n def wait_runs(self, count: int, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n with self._lock:\n if len(self.calls) >= count:\n return True\n sleep(0.01)\n return False\n\n def deltas(self) -> list[float]:\n with self._lock:\n return [self.calls[index + 1] - self.calls[index] for index in range(len(self.calls) - 1)]", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:IntervalRoutine", + "span_start": 18, + "span_end": 37, + "lexical_rank": 5, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def test_worker_wakes_up_with_configured_interval() -> None:\n interval = 0.15\n routine = IntervalRoutine()\n worker = ScenarioWorker(\"interval-worker\", routine, interval=interval)\n runtime = RuntimeManager()\n runtime.register_module(WorkerModule(worker))\n\n runtime.start()\n try:\n assert routine.wait_runs(count=3, timeout=2.0) is True\n finally:\n runtime.stop()\n\n deltas = routine.deltas()\n assert len(deltas) >= 2\n assert all(delta >= interval * 0.7 for delta in deltas[:2])", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:test_worker_wakes_up_with_configured_interval", + "span_start": 163, + "span_end": 178, + "lexical_rank": 5, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 7, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class BlockingRoutine:\n def __init__(self, started: Event, release: Event) -> None:\n self._started = started\n self._release = release\n\n def run(self) -> None:\n self._started.set()\n self._release.wait(timeout=5.0)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:BlockingRoutine", + "span_start": 40, + "span_end": 47, + "lexical_rank": 5, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class ScenarioWorker(Worker):\n def __init__(self, name: str, routine: object, *, interval: float = 0.05) -> None:\n self._name = name\n self._routine = routine\n self._interval = interval\n self._thread: Thread | None = None\n self._stop_requested = Event()\n self._in_flight = 0\n self._runs = 0\n self._lock = Lock()\n\n @property\n def name(self) -> str:\n return self._name\n\n @property\n def critical(self) -> bool:\n return True\n\n def start(self) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._stop_requested.clear()\n self._thread = Thread(target=self._loop, name=f\"{self._name}-thread\", daemon=True)\n self._thread.start()\n\n def stop(self, force: bool = False) -> None:\n self._stop_requested.set()\n\n def health(self) -> WorkerHealth:\n return WorkerHealth(name=self.name, status=\"ok\", critical=True, meta={\"runs\": self._runs})\n\n def status(self) -> WorkerStatus:\n thread_alive = self._thread is not None and self._thread.is_alive()\n with self._lock:\n in_flight = self._in_flight\n runs = self._runs\n if not thread_alive:\n state = \"stopped\"\n elif self._stop_requested.is_set():\n state = \"stopping\"\n elif in_flight > 0:\n state = \"busy\"\n else:\n state = \"idle\"\n return WorkerStatus(name=self.name, state=state, in_flight=in_flight, meta={\"runs\": runs})\n\n def _loop(self) -> None:\n while not self._stop_requested.is_set():\n with self._lock:\n self._in_flight += 1\n try:\n self._routine.run()\n with self._lock:\n self._runs += 1\n finally:\n with self._lock:\n self._in_flight -= 1\n if self._stop_requested.is_set():\n return\n sleep(self._interval)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:ScenarioWorker", + "span_start": 50, + "span_end": 110, + "lexical_rank": 5, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 2, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _http_call_json(\n base_url: str,\n path: str,\n *,\n method: str = \"GET\",\n headers: dict[str, str] | None = None,\n) -> tuple[int, dict[str, object]]:\n request = Request(f\"{base_url}{path}\", method=method, headers=headers or {})\n try:\n with urlopen(request, timeout=15.0) as response:\n status = response.status\n body = response.read()\n except HTTPError as error:\n status = error.code\n body = error.read()\n payload = json.loads(body.decode(\"utf-8\"))\n return status, payload", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_http_call_json", + "span_start": 125, + "span_end": 141, + "lexical_rank": 5, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 4, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def test_actions_stop_busy_worker_before_timeout() -> None:\n started = Event()\n release = Event()\n runtime, base_url = _build_runtime(ScenarioWorker(\"busy-worker\", BlockingRoutine(started, release)))\n assert started.wait(timeout=1.0) is True\n\n def release_later() -> None:\n sleep(0.2)\n release.set()\n\n Thread(target=release_later, daemon=True).start()\n try:\n status, payload = _http_call_json(base_url, \"/actions/stop\", method=\"POST\")\n assert status == 200\n assert isinstance(payload.get(\"detail\"), dict)\n assert payload[\"detail\"][\"timed_out\"] is False\n assert payload[\"detail\"][\"state\"] == \"stopped\"\n\n health_status, health_payload = _http_call_json(base_url, \"/health\")\n assert health_status == 503\n assert health_payload[\"status\"] == \"unhealthy\"\n assert health_payload[\"state\"] == \"stopped\"\n finally:\n runtime.stop()", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:test_actions_stop_busy_worker_before_timeout", + "span_start": 209, + "span_end": 232, + "lexical_rank": 5, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 9, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C0_SOURCE_CHUNKS": 10 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src", + "tests" + ], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src", + "tests" + ], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "HttpControlChannel", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Найди тесты для HttpControlChannel test_http_control_channel TestHttpControlChannel HttpControlChannel", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Найди тесты для HttpControlChannel test_http_control_channel TestHttpControlChannel HttpControlChannel", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 10, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 0, + "candidates_after_filter": 0 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src", + "tests" + ], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src", + "tests" + ], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 10, + "candidates_after_filter": 10 + } + ], + "fallback": { + "used": true, + "reason": "scope_relaxed_no_hits" + }, + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "HttpControlChannel" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "miss", + "hit_count": 0, + "fail_reason": "scope_relaxed_no_hits" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 10, + "fail_reason": null + } + ] + }, + "constraint_violations": [ + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C1_SYMBOL_CATALOG", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + } + ], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 94, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 36, + "C2_DEPENDENCY_GRAPH": 44, + "C0_SOURCE_CHUNKS": 13 + }, + "merge_rank": 0 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_084838/router_rag_plba_code_retrieval_plba-rag-find-tests-http-control-channel.md b/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_084838/router_rag_plba_code_retrieval_plba-rag-find-tests-http-control-channel.md new file mode 100644 index 0000000..0d90aff --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_084838/router_rag_plba_code_retrieval_plba-rag-find-tests-http-control-channel.md @@ -0,0 +1,32 @@ +# plba-rag-find-tests-http-control-channel + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/router_rag_plba_code_retrieval.yaml +- runner: runtime +- mode: router_rag +- passed: True + +## Query +Найди тесты для HttpControlChannel + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 16, + "llm_answer": "", + "answer_mode": "partial", + "path_scope": [], + "symbol_candidates": [ + "HttpControlChannel" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_084838/router_rag_plba_code_retrieval_plba-rag-find-tests-runtime-manager.json b/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_084838/router_rag_plba_code_retrieval_plba-rag-find-tests-runtime-manager.json new file mode 100644 index 0000000..0a990e5 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_084838/router_rag_plba_code_retrieval_plba-rag-find-tests-runtime-manager.json @@ -0,0 +1,1822 @@ +{ + "case_id": "plba-rag-find-tests-runtime-manager", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/router_rag_plba_code_retrieval.yaml", + "runner": "runtime", + "mode": "router_rag", + "actual": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 16, + "llm_answer": "", + "answer_mode": "partial", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-rag-find-tests-runtime-manager", + "text": "Где тесты для RuntimeManager?", + "mode": "router_rag", + "run_started_at": "2026-03-12T08:48:39", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Где тесты для RuntimeManager?", + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "RuntimeManager" + ], + "confidence": 0.0 + }, + "rag_count": 16, + "rag_rows": [ + { + "path": "tests/test_runtime.py", + "content": "test_runtime_runs_worker_routine_and_exposes_status instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_runtime_runs_worker_routine_and_exposes_status:instantiates", + "span_start": 209, + "span_end": 209, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "c397a308e7824ba9fe400a754c7e15e66ea6f058d7f5d3e82bb002bb78b509d2", + "edge_type": "instantiates", + "src_symbol_id": "1c767eb5ee08e84f45b18c8ed7531ec0ed73c63fb1594823569672db7b21e992", + "src_qname": "test_runtime_runs_worker_routine_and_exposes_status", + "dst_symbol_id": "aeadc039653807b0da1ca6e3cc1078ee61cfc510b28e7f9c2ec04c59da43cc8d", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "test_runtime_graceful_stop_waits_until_worker_finishes instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_runtime_graceful_stop_waits_until_worker_finishes:instantiates", + "span_start": 229, + "span_end": 229, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "76b4701262ccaa0a7a41691407c4ebdb2ca74a2415d89f0a38ef0d4f608bda93", + "edge_type": "instantiates", + "src_symbol_id": "1076e788e4a03b10d7bc1313a8ad46caa170c13cc026c6e4de994af1a6ae57bf", + "src_qname": "test_runtime_graceful_stop_waits_until_worker_finishes", + "dst_symbol_id": "aeadc039653807b0da1ca6e3cc1078ee61cfc510b28e7f9c2ec04c59da43cc8d", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "_build_runtime instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "_build_runtime:instantiates", + "span_start": 155, + "span_end": 155, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "7eb254d564944bab6272757ee5ef688862bd321e6941e2495dc942e03b1c9a25", + "edge_type": "instantiates", + "src_symbol_id": "db94031d5245bf82be836a109b4584b43b8e83d37a0f318e03f6c8191896d469", + "src_qname": "_build_runtime", + "dst_symbol_id": "a1572ea8183dc0cd6ddbc74342bbde8c28cecfde37ad40b62feff09f8d103d11", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_worker_wakes_up_with_configured_interval instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_worker_wakes_up_with_configured_interval:instantiates", + "span_start": 167, + "span_end": 167, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "189aafc4de0b79c688668f25f0c87166a127df26bd2215452014713b65ef281a", + "edge_type": "instantiates", + "src_symbol_id": "65f877f78191d65e6a752e41cedc70ebc784c266804a55c1c56440336e1f0d6e", + "src_qname": "test_worker_wakes_up_with_configured_interval", + "dst_symbol_id": "a1572ea8183dc0cd6ddbc74342bbde8c28cecfde37ad40b62feff09f8d103d11", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_actions_stop_busy_worker_after_timeout\n -> BlockingRoutine\n -> BlockingRoutine.__init__\n -> BlockingRoutine._started\n -> BlockingRoutine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_actions_stop_busy_worker_after_timeout:dataflow_slice", + "span_start": 42, + "span_end": 238, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "8e7db3d2a9226f1c1d9942ac6373cfcafa0d2276758ddb8a3d3c455a3d58024d", + "edge_type": "dataflow_slice", + "src_symbol_id": "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "src_qname": "test_actions_stop_busy_worker_after_timeout", + "dst_symbol_id": "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04", + "dst_ref": "BlockingRoutine.run", + "resolution": "resolved", + "slice_id": "8e7db3d2a9226f1c1d9942ac6373cfcafa0d2276758ddb8a3d3c455a3d58024d", + "root_symbol_id": "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "path_symbols": [ + "test_actions_stop_busy_worker_after_timeout", + "BlockingRoutine", + "BlockingRoutine.__init__", + "BlockingRoutine._started", + "BlockingRoutine.run" + ], + "path_symbol_ids": [ + "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "a3349c5bc65e4003a4bbd6a8dbb7a54c337e12d1aed930caa701b12e520f1e67", + "486deeed3043c6db985aef258e96ddc67aa53608e67a83962fbd2471f649ddf1", + "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_actions_stop_busy_worker_before_timeout\n -> BlockingRoutine\n -> BlockingRoutine.__init__\n -> BlockingRoutine._release\n -> BlockingRoutine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_actions_stop_busy_worker_before_timeout:dataflow_slice", + "span_start": 43, + "span_end": 212, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "8bd726155ba387d3579763ee84dfd2f9a90bc917da88f3b2e89416ab5c1254d6", + "edge_type": "dataflow_slice", + "src_symbol_id": "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "src_qname": "test_actions_stop_busy_worker_before_timeout", + "dst_symbol_id": "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04", + "dst_ref": "BlockingRoutine.run", + "resolution": "resolved", + "slice_id": "8bd726155ba387d3579763ee84dfd2f9a90bc917da88f3b2e89416ab5c1254d6", + "root_symbol_id": "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "path_symbols": [ + "test_actions_stop_busy_worker_before_timeout", + "BlockingRoutine", + "BlockingRoutine.__init__", + "BlockingRoutine._release", + "BlockingRoutine.run" + ], + "path_symbol_ids": [ + "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "a3349c5bc65e4003a4bbd6a8dbb7a54c337e12d1aed930caa701b12e520f1e67", + "486deeed3043c6db985aef258e96ddc67aa53608e67a83962fbd2471f649ddf1", + "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "def test_runtime_graceful_stop_waits_until_worker_finishes() -> None:\n started = Event()\n release = Event()\n runtime = RuntimeManager()\n runtime.register_module(BlockingModule(started, release))\n runtime.start()\n assert started.wait(timeout=1.0) is True\n assert runtime.status()[\"runtime\"][\"state\"] == \"busy\"\n\n stop_thread = Thread(target=runtime.stop, kwargs={\"timeout\": 1.0}, daemon=True)\n stop_thread.start()\n sleep(0.1)\n assert stop_thread.is_alive() is True\n\n release.set()\n stop_thread.join(timeout=1.0)\n assert stop_thread.is_alive() is False\n assert runtime.status()[\"runtime\"][\"state\"] == \"stopped\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_runtime.py:test_runtime_graceful_stop_waits_until_worker_finishes", + "span_start": 226, + "span_end": 243, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 8, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "def test_runtime_runs_worker_routine_and_exposes_status(tmp_path) -> None:\n config_path = tmp_path / \"config.yml\"\n config_path.write_text(\n \"\"\"\nplatform:\n workers: 1\nlog:\n version: 1\n disable_existing_loggers: false\n handlers:\n console:\n class: logging.StreamHandler\n root:\n level: INFO\n handlers: [console]\n\"\"\".strip(),\n encoding=\"utf-8\",\n )\n runtime = RuntimeManager()\n runtime.add_config_file(config_path)\n module = ExampleModule()\n runtime.register_module(module)\n\n runtime.start()\n sleep(0.2)\n status = runtime.status()\n runtime.stop()\n\n assert module.routine.processed == [{\"id\": 1}]\n assert status[\"modules\"] == [\"example\"]\n assert status[\"runtime\"][\"state\"] == \"idle\"\n assert status[\"health\"][\"status\"] == \"ok\"\n assert status[\"config\"] == {\"platform\": {\"workers\": 1}, \"log\": status[\"config\"][\"log\"]}", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_runtime.py:test_runtime_runs_worker_routine_and_exposes_status", + "span_start": 191, + "span_end": 223, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 7, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _build_runtime(worker: Worker, *, control_timeout: int = 1) -> tuple[RuntimeManager, str]:\n runtime = RuntimeManager()\n channel = HttpControlChannel(host=\"127.0.0.1\", port=0, timeout=control_timeout)\n runtime.control_plane.register_channel(channel)\n runtime.register_module(WorkerModule(worker))\n runtime.start()\n return runtime, f\"http://127.0.0.1:{channel.port}\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_build_runtime", + "span_start": 154, + "span_end": 160, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 6, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def test_worker_wakes_up_with_configured_interval() -> None:\n interval = 0.15\n routine = IntervalRoutine()\n worker = ScenarioWorker(\"interval-worker\", routine, interval=interval)\n runtime = RuntimeManager()\n runtime.register_module(WorkerModule(worker))\n\n runtime.start()\n try:\n assert routine.wait_runs(count=3, timeout=2.0) is True\n finally:\n runtime.stop()\n\n deltas = routine.deltas()\n assert len(deltas) >= 2\n assert all(delta >= interval * 0.7 for delta in deltas[:2])", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:test_worker_wakes_up_with_configured_interval", + "span_start": 163, + "span_end": 178, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 7, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class BlockingRoutine:\n def __init__(self, started: Event, release: Event) -> None:\n self._started = started\n self._release = release\n\n def run(self) -> None:\n self._started.set()\n self._release.wait(timeout=5.0)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:BlockingRoutine", + "span_start": 40, + "span_end": 47, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class ScenarioWorker(Worker):\n def __init__(self, name: str, routine: object, *, interval: float = 0.05) -> None:\n self._name = name\n self._routine = routine\n self._interval = interval\n self._thread: Thread | None = None\n self._stop_requested = Event()\n self._in_flight = 0\n self._runs = 0\n self._lock = Lock()\n\n @property\n def name(self) -> str:\n return self._name\n\n @property\n def critical(self) -> bool:\n return True\n\n def start(self) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._stop_requested.clear()\n self._thread = Thread(target=self._loop, name=f\"{self._name}-thread\", daemon=True)\n self._thread.start()\n\n def stop(self, force: bool = False) -> None:\n self._stop_requested.set()\n\n def health(self) -> WorkerHealth:\n return WorkerHealth(name=self.name, status=\"ok\", critical=True, meta={\"runs\": self._runs})\n\n def status(self) -> WorkerStatus:\n thread_alive = self._thread is not None and self._thread.is_alive()\n with self._lock:\n in_flight = self._in_flight\n runs = self._runs\n if not thread_alive:\n state = \"stopped\"\n elif self._stop_requested.is_set():\n state = \"stopping\"\n elif in_flight > 0:\n state = \"busy\"\n else:\n state = \"idle\"\n return WorkerStatus(name=self.name, state=state, in_flight=in_flight, meta={\"runs\": runs})\n\n def _loop(self) -> None:\n while not self._stop_requested.is_set():\n with self._lock:\n self._in_flight += 1\n try:\n self._routine.run()\n with self._lock:\n self._runs += 1\n finally:\n with self._lock:\n self._in_flight -= 1\n if self._stop_requested.is_set():\n return\n sleep(self._interval)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:ScenarioWorker", + "span_start": 50, + "span_end": 110, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 2, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class WorkerModule(ApplicationModule):\n def __init__(self, worker: Worker) -> None:\n self._worker = worker\n\n @property\n def name(self) -> str:\n return \"business-tests\"\n\n def register(self, registry: ModuleRegistry) -> None:\n registry.add_worker(self._worker)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:WorkerModule", + "span_start": 113, + "span_end": 122, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 3, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _http_call_json(\n base_url: str,\n path: str,\n *,\n method: str = \"GET\",\n headers: dict[str, str] | None = None,\n) -> tuple[int, dict[str, object]]:\n request = Request(f\"{base_url}{path}\", method=method, headers=headers or {})\n try:\n with urlopen(request, timeout=15.0) as response:\n status = response.status\n body = response.read()\n except HTTPError as error:\n status = error.code\n body = error.read()\n payload = json.loads(body.decode(\"utf-8\"))\n return status, payload", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_http_call_json", + "span_start": 125, + "span_end": 141, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 4, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class IntervalRoutine:\n calls: list[float] = field(default_factory=list)\n _lock: Lock = field(default_factory=Lock)\n\n def run(self) -> None:\n with self._lock:\n self.calls.append(monotonic())\n\n def wait_runs(self, count: int, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n with self._lock:\n if len(self.calls) >= count:\n return True\n sleep(0.01)\n return False\n\n def deltas(self) -> list[float]:\n with self._lock:\n return [self.calls[index + 1] - self.calls[index] for index in range(len(self.calls) - 1)]", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:IntervalRoutine", + "span_start": 18, + "span_end": 37, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _poll_until_stopped(base_url: str, timeout: float = 2.0) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n _, payload = _http_call_json(base_url, \"/actions/status\")\n if payload.get(\"detail\") == \"stopped\":\n return True\n sleep(0.05)\n return False", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_poll_until_stopped", + "span_start": 144, + "span_end": 151, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 5, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": null, + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C2_DEPENDENCY_GRAPH" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "partial", + "groundedness": "not_applicable" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "test_file_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "test_symbol_patterns": [ + "test_runtime_manager", + "TestRuntimeManager", + "RuntimeManager" + ], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C0_SOURCE_CHUNKS": 10 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src", + "tests" + ], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src", + "tests" + ], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Где тесты для RuntimeManager? test_runtime_manager TestRuntimeManager RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Где тесты для RuntimeManager? test_runtime_manager TestRuntimeManager RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 10, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 0, + "candidates_after_filter": 0 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src", + "tests" + ], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src", + "tests" + ], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 10, + "candidates_after_filter": 10 + } + ], + "fallback": { + "used": true, + "reason": "scope_relaxed_no_hits" + }, + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "RuntimeManager" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "miss", + "hit_count": 0, + "fail_reason": "scope_relaxed_no_hits" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 10, + "fail_reason": null + } + ] + }, + "constraint_violations": [ + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C1_SYMBOL_CATALOG", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + } + ], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 106, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 36, + "C2_DEPENDENCY_GRAPH": 48, + "C0_SOURCE_CHUNKS": 21 + }, + "merge_rank": 0, + "prompt_build": 0, + "llm_call": 0 + }, + "prompt": null, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "RuntimeManager" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 16, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-rag-find-tests-runtime-manager", + "mode": "router_rag", + "run_started_at": "2026-03-12T08:48:39", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Где тесты для RuntimeManager?", + "normalized_query": "Где тесты для RuntimeManager?" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Где тесты для RuntimeManager?" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Где тесты для RuntimeManager?" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "test_file_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "test_symbol_patterns": [ + "test_runtime_manager", + "TestRuntimeManager", + "RuntimeManager" + ], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Где тесты для RuntimeManager?" + }, + "output": { + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "RuntimeManager" + ], + "confidence": 0.0 + }, + "rag_count": 16, + "rag_rows": [ + { + "path": "tests/test_runtime.py", + "content": "test_runtime_runs_worker_routine_and_exposes_status instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_runtime_runs_worker_routine_and_exposes_status:instantiates", + "span_start": 209, + "span_end": 209, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "c397a308e7824ba9fe400a754c7e15e66ea6f058d7f5d3e82bb002bb78b509d2", + "edge_type": "instantiates", + "src_symbol_id": "1c767eb5ee08e84f45b18c8ed7531ec0ed73c63fb1594823569672db7b21e992", + "src_qname": "test_runtime_runs_worker_routine_and_exposes_status", + "dst_symbol_id": "aeadc039653807b0da1ca6e3cc1078ee61cfc510b28e7f9c2ec04c59da43cc8d", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "test_runtime_graceful_stop_waits_until_worker_finishes instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_runtime_graceful_stop_waits_until_worker_finishes:instantiates", + "span_start": 229, + "span_end": 229, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "76b4701262ccaa0a7a41691407c4ebdb2ca74a2415d89f0a38ef0d4f608bda93", + "edge_type": "instantiates", + "src_symbol_id": "1076e788e4a03b10d7bc1313a8ad46caa170c13cc026c6e4de994af1a6ae57bf", + "src_qname": "test_runtime_graceful_stop_waits_until_worker_finishes", + "dst_symbol_id": "aeadc039653807b0da1ca6e3cc1078ee61cfc510b28e7f9c2ec04c59da43cc8d", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "_build_runtime instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "_build_runtime:instantiates", + "span_start": 155, + "span_end": 155, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "7eb254d564944bab6272757ee5ef688862bd321e6941e2495dc942e03b1c9a25", + "edge_type": "instantiates", + "src_symbol_id": "db94031d5245bf82be836a109b4584b43b8e83d37a0f318e03f6c8191896d469", + "src_qname": "_build_runtime", + "dst_symbol_id": "a1572ea8183dc0cd6ddbc74342bbde8c28cecfde37ad40b62feff09f8d103d11", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_worker_wakes_up_with_configured_interval instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_worker_wakes_up_with_configured_interval:instantiates", + "span_start": 167, + "span_end": 167, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "189aafc4de0b79c688668f25f0c87166a127df26bd2215452014713b65ef281a", + "edge_type": "instantiates", + "src_symbol_id": "65f877f78191d65e6a752e41cedc70ebc784c266804a55c1c56440336e1f0d6e", + "src_qname": "test_worker_wakes_up_with_configured_interval", + "dst_symbol_id": "a1572ea8183dc0cd6ddbc74342bbde8c28cecfde37ad40b62feff09f8d103d11", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_actions_stop_busy_worker_after_timeout\n -> BlockingRoutine\n -> BlockingRoutine.__init__\n -> BlockingRoutine._started\n -> BlockingRoutine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_actions_stop_busy_worker_after_timeout:dataflow_slice", + "span_start": 42, + "span_end": 238, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "8e7db3d2a9226f1c1d9942ac6373cfcafa0d2276758ddb8a3d3c455a3d58024d", + "edge_type": "dataflow_slice", + "src_symbol_id": "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "src_qname": "test_actions_stop_busy_worker_after_timeout", + "dst_symbol_id": "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04", + "dst_ref": "BlockingRoutine.run", + "resolution": "resolved", + "slice_id": "8e7db3d2a9226f1c1d9942ac6373cfcafa0d2276758ddb8a3d3c455a3d58024d", + "root_symbol_id": "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "path_symbols": [ + "test_actions_stop_busy_worker_after_timeout", + "BlockingRoutine", + "BlockingRoutine.__init__", + "BlockingRoutine._started", + "BlockingRoutine.run" + ], + "path_symbol_ids": [ + "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "a3349c5bc65e4003a4bbd6a8dbb7a54c337e12d1aed930caa701b12e520f1e67", + "486deeed3043c6db985aef258e96ddc67aa53608e67a83962fbd2471f649ddf1", + "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_actions_stop_busy_worker_before_timeout\n -> BlockingRoutine\n -> BlockingRoutine.__init__\n -> BlockingRoutine._release\n -> BlockingRoutine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_actions_stop_busy_worker_before_timeout:dataflow_slice", + "span_start": 43, + "span_end": 212, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "8bd726155ba387d3579763ee84dfd2f9a90bc917da88f3b2e89416ab5c1254d6", + "edge_type": "dataflow_slice", + "src_symbol_id": "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "src_qname": "test_actions_stop_busy_worker_before_timeout", + "dst_symbol_id": "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04", + "dst_ref": "BlockingRoutine.run", + "resolution": "resolved", + "slice_id": "8bd726155ba387d3579763ee84dfd2f9a90bc917da88f3b2e89416ab5c1254d6", + "root_symbol_id": "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "path_symbols": [ + "test_actions_stop_busy_worker_before_timeout", + "BlockingRoutine", + "BlockingRoutine.__init__", + "BlockingRoutine._release", + "BlockingRoutine.run" + ], + "path_symbol_ids": [ + "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "a3349c5bc65e4003a4bbd6a8dbb7a54c337e12d1aed930caa701b12e520f1e67", + "486deeed3043c6db985aef258e96ddc67aa53608e67a83962fbd2471f649ddf1", + "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "def test_runtime_graceful_stop_waits_until_worker_finishes() -> None:\n started = Event()\n release = Event()\n runtime = RuntimeManager()\n runtime.register_module(BlockingModule(started, release))\n runtime.start()\n assert started.wait(timeout=1.0) is True\n assert runtime.status()[\"runtime\"][\"state\"] == \"busy\"\n\n stop_thread = Thread(target=runtime.stop, kwargs={\"timeout\": 1.0}, daemon=True)\n stop_thread.start()\n sleep(0.1)\n assert stop_thread.is_alive() is True\n\n release.set()\n stop_thread.join(timeout=1.0)\n assert stop_thread.is_alive() is False\n assert runtime.status()[\"runtime\"][\"state\"] == \"stopped\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_runtime.py:test_runtime_graceful_stop_waits_until_worker_finishes", + "span_start": 226, + "span_end": 243, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 8, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "def test_runtime_runs_worker_routine_and_exposes_status(tmp_path) -> None:\n config_path = tmp_path / \"config.yml\"\n config_path.write_text(\n \"\"\"\nplatform:\n workers: 1\nlog:\n version: 1\n disable_existing_loggers: false\n handlers:\n console:\n class: logging.StreamHandler\n root:\n level: INFO\n handlers: [console]\n\"\"\".strip(),\n encoding=\"utf-8\",\n )\n runtime = RuntimeManager()\n runtime.add_config_file(config_path)\n module = ExampleModule()\n runtime.register_module(module)\n\n runtime.start()\n sleep(0.2)\n status = runtime.status()\n runtime.stop()\n\n assert module.routine.processed == [{\"id\": 1}]\n assert status[\"modules\"] == [\"example\"]\n assert status[\"runtime\"][\"state\"] == \"idle\"\n assert status[\"health\"][\"status\"] == \"ok\"\n assert status[\"config\"] == {\"platform\": {\"workers\": 1}, \"log\": status[\"config\"][\"log\"]}", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_runtime.py:test_runtime_runs_worker_routine_and_exposes_status", + "span_start": 191, + "span_end": 223, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 7, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _build_runtime(worker: Worker, *, control_timeout: int = 1) -> tuple[RuntimeManager, str]:\n runtime = RuntimeManager()\n channel = HttpControlChannel(host=\"127.0.0.1\", port=0, timeout=control_timeout)\n runtime.control_plane.register_channel(channel)\n runtime.register_module(WorkerModule(worker))\n runtime.start()\n return runtime, f\"http://127.0.0.1:{channel.port}\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_build_runtime", + "span_start": 154, + "span_end": 160, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 6, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def test_worker_wakes_up_with_configured_interval() -> None:\n interval = 0.15\n routine = IntervalRoutine()\n worker = ScenarioWorker(\"interval-worker\", routine, interval=interval)\n runtime = RuntimeManager()\n runtime.register_module(WorkerModule(worker))\n\n runtime.start()\n try:\n assert routine.wait_runs(count=3, timeout=2.0) is True\n finally:\n runtime.stop()\n\n deltas = routine.deltas()\n assert len(deltas) >= 2\n assert all(delta >= interval * 0.7 for delta in deltas[:2])", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:test_worker_wakes_up_with_configured_interval", + "span_start": 163, + "span_end": 178, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 7, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class BlockingRoutine:\n def __init__(self, started: Event, release: Event) -> None:\n self._started = started\n self._release = release\n\n def run(self) -> None:\n self._started.set()\n self._release.wait(timeout=5.0)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:BlockingRoutine", + "span_start": 40, + "span_end": 47, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class ScenarioWorker(Worker):\n def __init__(self, name: str, routine: object, *, interval: float = 0.05) -> None:\n self._name = name\n self._routine = routine\n self._interval = interval\n self._thread: Thread | None = None\n self._stop_requested = Event()\n self._in_flight = 0\n self._runs = 0\n self._lock = Lock()\n\n @property\n def name(self) -> str:\n return self._name\n\n @property\n def critical(self) -> bool:\n return True\n\n def start(self) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._stop_requested.clear()\n self._thread = Thread(target=self._loop, name=f\"{self._name}-thread\", daemon=True)\n self._thread.start()\n\n def stop(self, force: bool = False) -> None:\n self._stop_requested.set()\n\n def health(self) -> WorkerHealth:\n return WorkerHealth(name=self.name, status=\"ok\", critical=True, meta={\"runs\": self._runs})\n\n def status(self) -> WorkerStatus:\n thread_alive = self._thread is not None and self._thread.is_alive()\n with self._lock:\n in_flight = self._in_flight\n runs = self._runs\n if not thread_alive:\n state = \"stopped\"\n elif self._stop_requested.is_set():\n state = \"stopping\"\n elif in_flight > 0:\n state = \"busy\"\n else:\n state = \"idle\"\n return WorkerStatus(name=self.name, state=state, in_flight=in_flight, meta={\"runs\": runs})\n\n def _loop(self) -> None:\n while not self._stop_requested.is_set():\n with self._lock:\n self._in_flight += 1\n try:\n self._routine.run()\n with self._lock:\n self._runs += 1\n finally:\n with self._lock:\n self._in_flight -= 1\n if self._stop_requested.is_set():\n return\n sleep(self._interval)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:ScenarioWorker", + "span_start": 50, + "span_end": 110, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 2, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class WorkerModule(ApplicationModule):\n def __init__(self, worker: Worker) -> None:\n self._worker = worker\n\n @property\n def name(self) -> str:\n return \"business-tests\"\n\n def register(self, registry: ModuleRegistry) -> None:\n registry.add_worker(self._worker)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:WorkerModule", + "span_start": 113, + "span_end": 122, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 3, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _http_call_json(\n base_url: str,\n path: str,\n *,\n method: str = \"GET\",\n headers: dict[str, str] | None = None,\n) -> tuple[int, dict[str, object]]:\n request = Request(f\"{base_url}{path}\", method=method, headers=headers or {})\n try:\n with urlopen(request, timeout=15.0) as response:\n status = response.status\n body = response.read()\n except HTTPError as error:\n status = error.code\n body = error.read()\n payload = json.loads(body.decode(\"utf-8\"))\n return status, payload", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_http_call_json", + "span_start": 125, + "span_end": 141, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 4, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class IntervalRoutine:\n calls: list[float] = field(default_factory=list)\n _lock: Lock = field(default_factory=Lock)\n\n def run(self) -> None:\n with self._lock:\n self.calls.append(monotonic())\n\n def wait_runs(self, count: int, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n with self._lock:\n if len(self.calls) >= count:\n return True\n sleep(0.01)\n return False\n\n def deltas(self) -> list[float]:\n with self._lock:\n return [self.calls[index + 1] - self.calls[index] for index in range(len(self.calls) - 1)]", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:IntervalRoutine", + "span_start": 18, + "span_end": 37, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _poll_until_stopped(base_url: str, timeout: float = 2.0) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n _, payload = _http_call_json(base_url, \"/actions/status\")\n if payload.get(\"detail\") == \"stopped\":\n return True\n sleep(0.05)\n return False", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_poll_until_stopped", + "span_start": 144, + "span_end": 151, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 5, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C0_SOURCE_CHUNKS": 10 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src", + "tests" + ], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src", + "tests" + ], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Где тесты для RuntimeManager? test_runtime_manager TestRuntimeManager RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Где тесты для RuntimeManager? test_runtime_manager TestRuntimeManager RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 10, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 0, + "candidates_after_filter": 0 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src", + "tests" + ], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src", + "tests" + ], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 10, + "candidates_after_filter": 10 + } + ], + "fallback": { + "used": true, + "reason": "scope_relaxed_no_hits" + }, + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "RuntimeManager" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "miss", + "hit_count": 0, + "fail_reason": "scope_relaxed_no_hits" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 10, + "fail_reason": null + } + ] + }, + "constraint_violations": [ + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C1_SYMBOL_CATALOG", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + } + ], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 106, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 36, + "C2_DEPENDENCY_GRAPH": 48, + "C0_SOURCE_CHUNKS": 21 + }, + "merge_rank": 0 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_084838/router_rag_plba_code_retrieval_plba-rag-find-tests-runtime-manager.md b/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_084838/router_rag_plba_code_retrieval_plba-rag-find-tests-runtime-manager.md new file mode 100644 index 0000000..0e95f34 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_084838/router_rag_plba_code_retrieval_plba-rag-find-tests-runtime-manager.md @@ -0,0 +1,32 @@ +# plba-rag-find-tests-runtime-manager + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/router_rag_plba_code_retrieval.yaml +- runner: runtime +- mode: router_rag +- passed: True + +## Query +Где тесты для RuntimeManager? + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 16, + "llm_answer": "", + "answer_mode": "partial", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_084838/router_rag_plba_code_retrieval_plba-rag-open-http-control-channel-file.json b/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_084838/router_rag_plba_code_retrieval_plba-rag-open-http-control-channel-file.json new file mode 100644 index 0000000..3a71fd9 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_084838/router_rag_plba_code_retrieval_plba-rag-open-http-control-channel-file.json @@ -0,0 +1,445 @@ +{ + "case_id": "plba-rag-open-http-control-channel-file", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/router_rag_plba_code_retrieval.yaml", + "runner": "runtime", + "mode": "router_rag", + "actual": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 1, + "llm_answer": "", + "answer_mode": "partial", + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "symbol_candidates": [], + "layers": [ + "C0_SOURCE_CHUNKS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-rag-open-http-control-channel-file", + "text": "Покажи файл src/app_runtime/control/http_channel.py", + "mode": "router_rag", + "run_started_at": "2026-03-12T08:48:39", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Покажи файл src/app_runtime/control/http_channel.py", + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [], + "confidence": 0.0 + }, + "rag_count": 1, + "rag_rows": [ + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel(ControlChannel):\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._timeout = timeout\n self._runner = UvicornThreadRunner(host, port, timeout)\n self._factory = HttpControlAppFactory()\n self._actions: ControlActionSet | None = None\n\n async def start(self, actions: ControlActionSet) -> None:\n self._actions = actions\n app = self._factory.create(self._health_response, self._action_response)\n await self._runner.start(app)\n\n async def stop(self) -> None:\n await self._runner.stop()\n\n @property\n def port(self) -> int:\n return self._runner.port\n\n async def _health_response(self) -> dict[str, object]:\n if self._actions is None:\n return {\"status\": \"unhealthy\", \"detail\": \"control actions are not configured\"}\n return await asyncio.wait_for(self._actions.health(), timeout=float(self._timeout))\n\n async def _action_response(self, action: str, _client_source: str = \"unknown\") -> JSONResponse:\n if self._actions is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"{action} handler is not configured\"}, status_code=404)\n callbacks = {\n \"start\": self._actions.start,\n \"stop\": self._actions.stop,\n \"status\": self._actions.status,\n }\n callback = callbacks.get(action)\n if callback is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"unsupported action: {action}\"}, status_code=404)\n action_timeout = max(float(self._timeout), 10.0) if action in {\"start\", \"stop\"} else float(self._timeout)\n try:\n detail = await asyncio.wait_for(callback(), timeout=action_timeout)\n except asyncio.TimeoutError:\n return JSONResponse(\n content={\"status\": \"accepted\", \"detail\": f\"{action} operation is still in progress\"},\n status_code=202,\n )\n except Exception as exc:\n return JSONResponse(content={\"status\": \"error\", \"detail\": str(exc)}, status_code=500)\n return JSONResponse(content={\"status\": \"ok\", \"detail\": detail or f\"{action} action accepted\"}, status_code=200)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_channel.py:HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": null, + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "partial", + "groundedness": "not_applicable" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "unknown", + "symbol_candidates": [], + "keyword_hints": [], + "path_hints": [ + "src/app_runtime/control/http_channel.py" + ], + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/app_runtime/control/http_channel.py" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": false, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C0_SOURCE_CHUNKS": 200 + }, + "filters_by_layer": { + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "include_globs": [], + "exclude_globs": [], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Покажи файл src/app_runtime/control/http_channel.py", + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "include_globs": [], + "exclude_globs": [], + "prefer_globs": [], + "top_k": 200, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "normalized_include_globs": [], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [] + }, + "layers": [ + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 9, + "retrieval_by_layer": { + "C0_SOURCE_CHUNKS": 9 + }, + "merge_rank": 0, + "prompt_build": 0, + "llm_call": 0 + }, + "prompt": null, + "router": { + "conversation_mode": "START", + "keyword_hints": [], + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ] + }, + "llm": { + "used_evidence_count": 1, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-rag-open-http-control-channel-file", + "mode": "router_rag", + "run_started_at": "2026-03-12T08:48:39", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Покажи файл src/app_runtime/control/http_channel.py", + "normalized_query": "Покажи файл src/app_runtime/control/http_channel.py" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Покажи файл src/app_runtime/control/http_channel.py" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Покажи файл src/app_runtime/control/http_channel.py" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "unknown", + "symbol_candidates": [], + "keyword_hints": [], + "path_hints": [ + "src/app_runtime/control/http_channel.py" + ], + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/app_runtime/control/http_channel.py" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": false, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Покажи файл src/app_runtime/control/http_channel.py" + }, + "output": { + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [], + "confidence": 0.0 + }, + "rag_count": 1, + "rag_rows": [ + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel(ControlChannel):\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._timeout = timeout\n self._runner = UvicornThreadRunner(host, port, timeout)\n self._factory = HttpControlAppFactory()\n self._actions: ControlActionSet | None = None\n\n async def start(self, actions: ControlActionSet) -> None:\n self._actions = actions\n app = self._factory.create(self._health_response, self._action_response)\n await self._runner.start(app)\n\n async def stop(self) -> None:\n await self._runner.stop()\n\n @property\n def port(self) -> int:\n return self._runner.port\n\n async def _health_response(self) -> dict[str, object]:\n if self._actions is None:\n return {\"status\": \"unhealthy\", \"detail\": \"control actions are not configured\"}\n return await asyncio.wait_for(self._actions.health(), timeout=float(self._timeout))\n\n async def _action_response(self, action: str, _client_source: str = \"unknown\") -> JSONResponse:\n if self._actions is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"{action} handler is not configured\"}, status_code=404)\n callbacks = {\n \"start\": self._actions.start,\n \"stop\": self._actions.stop,\n \"status\": self._actions.status,\n }\n callback = callbacks.get(action)\n if callback is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"unsupported action: {action}\"}, status_code=404)\n action_timeout = max(float(self._timeout), 10.0) if action in {\"start\", \"stop\"} else float(self._timeout)\n try:\n detail = await asyncio.wait_for(callback(), timeout=action_timeout)\n except asyncio.TimeoutError:\n return JSONResponse(\n content={\"status\": \"accepted\", \"detail\": f\"{action} operation is still in progress\"},\n status_code=202,\n )\n except Exception as exc:\n return JSONResponse(content={\"status\": \"error\", \"detail\": str(exc)}, status_code=500)\n return JSONResponse(content={\"status\": \"ok\", \"detail\": detail or f\"{action} action accepted\"}, status_code=200)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_channel.py:HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C0_SOURCE_CHUNKS": 200 + }, + "filters_by_layer": { + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "include_globs": [], + "exclude_globs": [], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Покажи файл src/app_runtime/control/http_channel.py", + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "include_globs": [], + "exclude_globs": [], + "prefer_globs": [], + "top_k": 200, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "normalized_include_globs": [], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [] + }, + "layers": [ + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 9, + "retrieval_by_layer": { + "C0_SOURCE_CHUNKS": 9 + }, + "merge_rank": 0 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_084838/router_rag_plba_code_retrieval_plba-rag-open-http-control-channel-file.md b/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_084838/router_rag_plba_code_retrieval_plba-rag-open-http-control-channel-file.md new file mode 100644 index 0000000..ceac477 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_084838/router_rag_plba_code_retrieval_plba-rag-open-http-control-channel-file.md @@ -0,0 +1,30 @@ +# plba-rag-open-http-control-channel-file + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/router_rag_plba_code_retrieval.yaml +- runner: runtime +- mode: router_rag +- passed: True + +## Query +Покажи файл src/app_runtime/control/http_channel.py + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 1, + "llm_answer": "", + "answer_mode": "partial", + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "symbol_candidates": [], + "layers": [ + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_084838/router_rag_plba_code_retrieval_plba-rag-open-runtime-manager-file.json b/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_084838/router_rag_plba_code_retrieval_plba-rag-open-runtime-manager-file.json new file mode 100644 index 0000000..c38fc7f --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_084838/router_rag_plba_code_retrieval_plba-rag-open-runtime-manager-file.json @@ -0,0 +1,445 @@ +{ + "case_id": "plba-rag-open-runtime-manager-file", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/router_rag_plba_code_retrieval.yaml", + "runner": "runtime", + "mode": "router_rag", + "actual": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 1, + "llm_answer": "", + "answer_mode": "partial", + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "symbol_candidates": [], + "layers": [ + "C0_SOURCE_CHUNKS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-rag-open-runtime-manager-file", + "text": "Открой файл src/app_runtime/core/runtime.py", + "mode": "router_rag", + "run_started_at": "2026-03-12T08:48:39", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Открой файл src/app_runtime/core/runtime.py", + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [], + "confidence": 0.0 + }, + "rag_count": 1, + "rag_rows": [ + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": null, + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "partial", + "groundedness": "not_applicable" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "unknown", + "symbol_candidates": [], + "keyword_hints": [], + "path_hints": [ + "src/app_runtime/core/runtime.py" + ], + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/app_runtime/core/runtime.py" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": false, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C0_SOURCE_CHUNKS": 200 + }, + "filters_by_layer": { + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "include_globs": [], + "exclude_globs": [], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Открой файл src/app_runtime/core/runtime.py", + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "include_globs": [], + "exclude_globs": [], + "prefer_globs": [], + "top_k": 200, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "normalized_include_globs": [], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [] + }, + "layers": [ + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 210, + "retrieval_by_layer": { + "C0_SOURCE_CHUNKS": 210 + }, + "merge_rank": 0, + "prompt_build": 0, + "llm_call": 0 + }, + "prompt": null, + "router": { + "conversation_mode": "START", + "keyword_hints": [], + "path_scope": [ + "src/app_runtime/core/runtime.py" + ] + }, + "llm": { + "used_evidence_count": 1, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-rag-open-runtime-manager-file", + "mode": "router_rag", + "run_started_at": "2026-03-12T08:48:39", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Открой файл src/app_runtime/core/runtime.py", + "normalized_query": "Открой файл src/app_runtime/core/runtime.py" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Открой файл src/app_runtime/core/runtime.py" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Открой файл src/app_runtime/core/runtime.py" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "unknown", + "symbol_candidates": [], + "keyword_hints": [], + "path_hints": [ + "src/app_runtime/core/runtime.py" + ], + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/app_runtime/core/runtime.py" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": false, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Открой файл src/app_runtime/core/runtime.py" + }, + "output": { + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [], + "confidence": 0.0 + }, + "rag_count": 1, + "rag_rows": [ + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C0_SOURCE_CHUNKS": 200 + }, + "filters_by_layer": { + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "include_globs": [], + "exclude_globs": [], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Открой файл src/app_runtime/core/runtime.py", + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "include_globs": [], + "exclude_globs": [], + "prefer_globs": [], + "top_k": 200, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "normalized_include_globs": [], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [] + }, + "layers": [ + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 210, + "retrieval_by_layer": { + "C0_SOURCE_CHUNKS": 210 + }, + "merge_rank": 0 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_084838/router_rag_plba_code_retrieval_plba-rag-open-runtime-manager-file.md b/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_084838/router_rag_plba_code_retrieval_plba-rag-open-runtime-manager-file.md new file mode 100644 index 0000000..fc55328 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_084838/router_rag_plba_code_retrieval_plba-rag-open-runtime-manager-file.md @@ -0,0 +1,30 @@ +# plba-rag-open-runtime-manager-file + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/router_rag_plba_code_retrieval.yaml +- runner: runtime +- mode: router_rag +- passed: True + +## Query +Открой файл src/app_runtime/core/runtime.py + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 1, + "llm_answer": "", + "answer_mode": "partial", + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "symbol_candidates": [], + "layers": [ + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_084838/summary.md b/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_084838/summary.md new file mode 100644 index 0000000..4b0aab5 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_084838/summary.md @@ -0,0 +1,21 @@ +# pipeline_setup_v2 summary + +Passed: 9/11 + +| File | Case | Runner | Mode | Intent | Sub-intent | Pass | +|------|------|--------|------|--------|------------|------| +| router_rag_plba_code_retrieval.yaml | plba-rag-open-runtime-manager-file | runtime | router_rag | CODE_QA | OPEN_FILE | ✓ | +| router_rag_plba_code_retrieval.yaml | plba-rag-open-http-control-channel-file | runtime | router_rag | CODE_QA | OPEN_FILE | ✓ | +| router_rag_plba_code_retrieval.yaml | plba-rag-explain-runtime-manager | runtime | router_rag | CODE_QA | EXPLAIN | ✓ | +| router_rag_plba_code_retrieval.yaml | plba-rag-explain-http-control-channel | runtime | router_rag | CODE_QA | EXPLAIN | ✓ | +| router_rag_plba_code_retrieval.yaml | plba-rag-explain-trace-service | runtime | router_rag | CODE_QA | EXPLAIN | ✓ | +| router_rag_plba_code_retrieval.yaml | plba-rag-find-tests-runtime-manager | runtime | router_rag | CODE_QA | FIND_TESTS | ✓ | +| router_rag_plba_code_retrieval.yaml | plba-rag-find-tests-http-control-channel | runtime | router_rag | CODE_QA | FIND_TESTS | ✓ | +| router_rag_plba_code_retrieval.yaml | plba-rag-find-entrypoints | runtime | router_rag | CODE_QA | FIND_ENTRYPOINTS | ✓ | +| router_rag_plba_code_retrieval.yaml | plba-rag-explain-create-runtime | runtime | router_rag | CODE_QA | EXPLAIN | ✓ | +| router_rag_plba_code_retrieval.yaml | plba-rag-explain-runtime-module | runtime | router_rag | CODE_QA | EXPLAIN | ✗ | +| router_rag_plba_code_retrieval.yaml | plba-rag-explain-control-plane | runtime | router_rag | CODE_QA | EXPLAIN | ✗ | + +## Failures +- **plba-rag-explain-runtime-module**: retrieval: expected non-empty rag, got 0 rows +- **plba-rag-explain-control-plane**: retrieval: expected non-empty rag, got 0 rows \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_085312/router_rag_plba_code_retrieval_plba-rag-explain-control-plane-service.json b/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_085312/router_rag_plba_code_retrieval_plba-rag-explain-control-plane-service.json new file mode 100644 index 0000000..25dbfb1 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_085312/router_rag_plba_code_retrieval_plba-rag-explain-control-plane-service.json @@ -0,0 +1,2445 @@ +{ + "case_id": "plba-rag-explain-control-plane-service", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/router_rag_plba_code_retrieval.yaml", + "runner": "runtime", + "mode": "router_rag", + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 19, + "llm_answer": "", + "answer_mode": "partial", + "path_scope": [], + "symbol_candidates": [ + "ControlPlaneService" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-rag-explain-control-plane-service", + "text": "Объясни класс ControlPlaneService", + "mode": "router_rag", + "run_started_at": "2026-03-12T08:53:12", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни класс ControlPlaneService", + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "ControlPlaneService", + "alternatives": [ + "ControlPlaneService" + ], + "confidence": 0.99 + }, + "rag_count": 19, + "rag_rows": [ + { + "path": "src/app_runtime/control/service.py", + "content": "class ControlPlaneService\nControlPlaneService", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "qname": "ControlPlaneService", + "kind": "class", + "signature": "ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/queue/in_memory.py", + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)", + "layer": "C4_SEMANTIC_ROLES", + "title": "InMemoryTaskQueue", + "span_start": 9, + "span_end": 38, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 22, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "2da04cb94544a3bcbf0943a95ad4bdd8710bcafaa32a02fd0e4de2178dcf3533", + "symbol_name": "InMemoryTaskQueue", + "qname": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 9, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "58f0cc001ccda0eee4c6bc32ed83bd05eafd6b6644f1e8b4aa9eed3103db73dc", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.register_channel reads_attr self._channels.append", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.register_channel:reads_attr", + "span_start": 17, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "1ee5925deffdc38ba15b88bf7c89e5fcd1a78f493fe30f2deb827d714a1b18e8", + "edge_type": "reads_attr", + "src_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "src_qname": "ControlPlaneService.register_channel", + "dst_symbol_id": null, + "dst_ref": "self._channels.append", + "resolution": "partial", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "class ControlPlaneService:\n def __init__(self) -> None:\n self._channels: list[ControlChannel] = []\n\n def register_channel(self, channel: ControlChannel) -> None:\n self._channels.append(channel)\n\n def start(self, runtime: RuntimeManager) -> None:\n if not self._channels:\n return\n asyncio.run(self._start_async(runtime))\n\n def stop(self) -> None:\n if not self._channels:\n return\n asyncio.run(self._stop_async())\n\n def snapshot(self, runtime: RuntimeManager) -> dict[str, object]:\n health = runtime.current_health()\n return {\n \"runtime\": {\"state\": runtime._state.value},\n \"modules\": list(runtime.registry.modules),\n \"services\": runtime.services.snapshot(),\n \"workers\": runtime.workers.snapshot(),\n \"health\": runtime.health.snapshot(runtime.workers.healths()) | {\"status\": health[\"status\"]},\n \"config\": runtime.configuration.get(),\n }\n\n async def _start_async(self, runtime: RuntimeManager) -> None:\n actions = ControlActionSet(\n health=runtime.health_status,\n start=runtime.start_runtime,\n stop=runtime.stop_runtime,\n status=runtime.runtime_status,\n )\n for channel in self._channels:\n await channel.start(actions)\n\n async def _stop_async(self) -> None:\n for channel in reversed(self._channels):\n await channel.stop()", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/service.py:ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": null, + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS", + "C4_SEMANTIC_ROLES" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "partial", + "groundedness": "not_applicable" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "ControlPlaneService" + ], + "keyword_hints": [ + "ControlPlaneService" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "ControlPlaneService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Объясни класс ControlPlaneService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "Объясни класс ControlPlaneService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Объясни класс ControlPlaneService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "Объясни класс ControlPlaneService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "ControlPlaneService", + "alternatives": [ + "ControlPlaneService" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 8, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 103, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 21, + "C0_SOURCE_CHUNKS": 12, + "C4_SEMANTIC_ROLES": 10, + "C2_DEPENDENCY_GRAPH": 50, + "C3_ENTRYPOINTS": 8 + }, + "merge_rank": 15, + "prompt_build": 0, + "llm_call": 0 + }, + "prompt": null, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "ControlPlaneService" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 19, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-rag-explain-control-plane-service", + "mode": "router_rag", + "run_started_at": "2026-03-12T08:53:12", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Объясни класс ControlPlaneService", + "normalized_query": "Объясни класс ControlPlaneService" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Объясни класс ControlPlaneService" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни класс ControlPlaneService" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "ControlPlaneService" + ], + "keyword_hints": [ + "ControlPlaneService" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Объясни класс ControlPlaneService" + }, + "output": { + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "ControlPlaneService", + "alternatives": [ + "ControlPlaneService" + ], + "confidence": 0.99 + }, + "rag_count": 19, + "rag_rows": [ + { + "path": "src/app_runtime/control/service.py", + "content": "class ControlPlaneService\nControlPlaneService", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "qname": "ControlPlaneService", + "kind": "class", + "signature": "ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/queue/in_memory.py", + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)", + "layer": "C4_SEMANTIC_ROLES", + "title": "InMemoryTaskQueue", + "span_start": 9, + "span_end": 38, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 22, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "2da04cb94544a3bcbf0943a95ad4bdd8710bcafaa32a02fd0e4de2178dcf3533", + "symbol_name": "InMemoryTaskQueue", + "qname": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 9, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "58f0cc001ccda0eee4c6bc32ed83bd05eafd6b6644f1e8b4aa9eed3103db73dc", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.register_channel reads_attr self._channels.append", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.register_channel:reads_attr", + "span_start": 17, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "1ee5925deffdc38ba15b88bf7c89e5fcd1a78f493fe30f2deb827d714a1b18e8", + "edge_type": "reads_attr", + "src_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "src_qname": "ControlPlaneService.register_channel", + "dst_symbol_id": null, + "dst_ref": "self._channels.append", + "resolution": "partial", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "class ControlPlaneService:\n def __init__(self) -> None:\n self._channels: list[ControlChannel] = []\n\n def register_channel(self, channel: ControlChannel) -> None:\n self._channels.append(channel)\n\n def start(self, runtime: RuntimeManager) -> None:\n if not self._channels:\n return\n asyncio.run(self._start_async(runtime))\n\n def stop(self) -> None:\n if not self._channels:\n return\n asyncio.run(self._stop_async())\n\n def snapshot(self, runtime: RuntimeManager) -> dict[str, object]:\n health = runtime.current_health()\n return {\n \"runtime\": {\"state\": runtime._state.value},\n \"modules\": list(runtime.registry.modules),\n \"services\": runtime.services.snapshot(),\n \"workers\": runtime.workers.snapshot(),\n \"health\": runtime.health.snapshot(runtime.workers.healths()) | {\"status\": health[\"status\"]},\n \"config\": runtime.configuration.get(),\n }\n\n async def _start_async(self, runtime: RuntimeManager) -> None:\n actions = ControlActionSet(\n health=runtime.health_status,\n start=runtime.start_runtime,\n stop=runtime.stop_runtime,\n status=runtime.runtime_status,\n )\n for channel in self._channels:\n await channel.start(actions)\n\n async def _stop_async(self) -> None:\n for channel in reversed(self._channels):\n await channel.stop()", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/service.py:ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "ControlPlaneService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Объясни класс ControlPlaneService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "Объясни класс ControlPlaneService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Объясни класс ControlPlaneService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "Объясни класс ControlPlaneService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "ControlPlaneService", + "alternatives": [ + "ControlPlaneService" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 8, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 103, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 21, + "C0_SOURCE_CHUNKS": 12, + "C4_SEMANTIC_ROLES": 10, + "C2_DEPENDENCY_GRAPH": 50, + "C3_ENTRYPOINTS": 8 + }, + "merge_rank": 15 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_085312/router_rag_plba_code_retrieval_plba-rag-explain-control-plane-service.md b/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_085312/router_rag_plba_code_retrieval_plba-rag-explain-control-plane-service.md new file mode 100644 index 0000000..e02505f --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_085312/router_rag_plba_code_retrieval_plba-rag-explain-control-plane-service.md @@ -0,0 +1,38 @@ +# plba-rag-explain-control-plane-service + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/router_rag_plba_code_retrieval.yaml +- runner: runtime +- mode: router_rag +- passed: True + +## Query + +Объясни класс ControlPlaneService + +## Actual + +{ + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 19, + "llm_answer": "", + "answer_mode": "partial", + "path_scope": [], + "symbol_candidates": [ + "ControlPlaneService" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] +} + +## Mismatches + +- none + diff --git a/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_085312/router_rag_plba_code_retrieval_plba-rag-explain-create-runtime.json b/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_085312/router_rag_plba_code_retrieval_plba-rag-explain-create-runtime.json new file mode 100644 index 0000000..27c7d31 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_085312/router_rag_plba_code_retrieval_plba-rag-explain-create-runtime.json @@ -0,0 +1,2285 @@ +{ + "case_id": "plba-rag-explain-create-runtime", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/router_rag_plba_code_retrieval.yaml", + "runner": "runtime", + "mode": "router_rag", + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 19, + "llm_answer": "", + "answer_mode": "partial", + "path_scope": [], + "symbol_candidates": [ + "create_runtime" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-rag-explain-create-runtime", + "text": "Объясни функцию create_runtime", + "mode": "router_rag", + "run_started_at": "2026-03-12T08:53:12", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни функцию create_runtime", + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "create_runtime", + "alternatives": [ + "create_runtime" + ], + "confidence": 0.99 + }, + "rag_count": 19, + "rag_rows": [ + { + "path": "src/plba/bootstrap.py", + "content": "function create_runtime\ncreate_runtime(module)", + "layer": "C1_SYMBOL_CATALOG", + "title": "create_runtime", + "span_start": 8, + "span_end": 29, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "qname": "create_runtime", + "kind": "function", + "signature": "create_runtime(module)", + "parent_symbol_id": null, + "package_or_module": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/queue/in_memory.py", + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)", + "layer": "C4_SEMANTIC_ROLES", + "title": "InMemoryTaskQueue", + "span_start": 9, + "span_end": 38, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 22, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "2da04cb94544a3bcbf0943a95ad4bdd8710bcafaa32a02fd0e4de2178dcf3533", + "symbol_name": "InMemoryTaskQueue", + "qname": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 9, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "58f0cc001ccda0eee4c6bc32ed83bd05eafd6b6644f1e8b4aa9eed3103db73dc", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "ConfigFileLoader\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (8)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ConfigFileLoader", + "span_start": 11, + "span_end": 48, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 23, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "a8474eca8b6e9dc86ae67ed68b16fa5fb639ef08739c053e7b7195489765667f", + "symbol_name": "ConfigFileLoader", + "qname": "ConfigFileLoader", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 8, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workers/supervisor.py", + "content": "WorkerSupervisor\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkerSupervisor", + "span_start": 10, + "span_end": 59, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "c17b44e8d9e97d490989b21fa67d7c346cdda8a0472e4c41fb243c8846faa124", + "symbol_name": "WorkerSupervisor", + "qname": "WorkerSupervisor", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "77609d9d5927171cce7fc3a54897c183fd63068710c6362029b700937aae5eee", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowEngine", + "span_start": 10, + "span_end": 86, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "57ec0a9f11c542c78e008684a888397e8d9ef4223671acb2567e631a0cbc70b4", + "symbol_name": "WorkflowEngine", + "qname": "WorkflowEngine", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/store.py", + "content": "TraceContextStore\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "TraceContextStore", + "span_start": 15, + "span_end": 52, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b2dad4fbe16ffb11b58deba311c7739955c39d59f291b22181f33e9c8cce4059", + "symbol_name": "TraceContextStore", + "qname": "TraceContextStore", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "d369554f08fc92039c6edd5a2a1e73b23901533e8974459170bbd9347d263dc5", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime calls runtime.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:calls", + "span_start": 19, + "span_end": 19, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "4eaeec4ac55a59d5f66fd01c4754955f8fedaf4bc3df13fa769b352c7bfaacbb", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.add_config_file", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime reads_attr runtime.register_module", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:reads_attr", + "span_start": 28, + "span_end": 28, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "45516c79ff358dbf9b650a081668df0f66d2fe989300f985a1a78be6be166f8f", + "edge_type": "reads_attr", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.register_module", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:instantiates", + "span_start": 17, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "0adba17984f850ea1608c9e734d2dd5c325cfde3a8133123aa239e44935ad18e", + "edge_type": "instantiates", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": "27158ca220022eeb5083c6addf8a50775d45f7161284fd60aac48410105f4b98", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime calls runtime.register_module", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:calls", + "span_start": 28, + "span_end": 28, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "ab6003c3441addc1ba1b81edeca009165559f652f6b2cf424e5ae61b1f617de8", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.register_module", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime calls runtime.control_plane.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:calls", + "span_start": 21, + "span_end": 27, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "2678250030b9ce47a3b3b55fac7897ac530367edc8374ac9d5e6ecafb1e483f0", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.control_plane.register_channel", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime reads_attr runtime.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:reads_attr", + "span_start": 19, + "span_end": 19, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "30d4e8aae984ab84d523e80d02f1caeda52d547fa3d2aa47be8845931cabbca2", + "edge_type": "reads_attr", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.add_config_file", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "def create_runtime(\n module: ApplicationModule,\n *,\n config_path: str | None = None,\n enable_http_control: bool = False,\n control_host: str = \"127.0.0.1\",\n control_port: int = 8080,\n control_timeout: int = 5,\n) -> RuntimeManager:\n runtime = RuntimeManager()\n if config_path is not None:\n runtime.add_config_file(config_path)\n if enable_http_control:\n runtime.control_plane.register_channel(\n HttpControlChannel(\n host=control_host,\n port=control_port,\n timeout=control_timeout,\n )\n )\n runtime.register_module(module)\n return runtime", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/bootstrap.py:create_runtime", + "span_start": 8, + "span_end": 29, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": null, + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS", + "C4_SEMANTIC_ROLES" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "partial", + "groundedness": "not_applicable" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "function", + "symbol_candidates": [ + "create_runtime" + ], + "keyword_hints": [ + "create_runtime" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Объясни функцию create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "Объясни функцию create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Объясни функцию create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "Объясни функцию create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "create_runtime", + "alternatives": [ + "create_runtime" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 8, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 91, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 17, + "C0_SOURCE_CHUNKS": 12, + "C4_SEMANTIC_ROLES": 11, + "C2_DEPENDENCY_GRAPH": 41, + "C3_ENTRYPOINTS": 8 + }, + "merge_rank": 13, + "prompt_build": 0, + "llm_call": 0 + }, + "prompt": null, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "create_runtime" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 19, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-rag-explain-create-runtime", + "mode": "router_rag", + "run_started_at": "2026-03-12T08:53:12", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Объясни функцию create_runtime", + "normalized_query": "Объясни функцию create_runtime" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Объясни функцию create_runtime" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни функцию create_runtime" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "function", + "symbol_candidates": [ + "create_runtime" + ], + "keyword_hints": [ + "create_runtime" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Объясни функцию create_runtime" + }, + "output": { + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "create_runtime", + "alternatives": [ + "create_runtime" + ], + "confidence": 0.99 + }, + "rag_count": 19, + "rag_rows": [ + { + "path": "src/plba/bootstrap.py", + "content": "function create_runtime\ncreate_runtime(module)", + "layer": "C1_SYMBOL_CATALOG", + "title": "create_runtime", + "span_start": 8, + "span_end": 29, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "qname": "create_runtime", + "kind": "function", + "signature": "create_runtime(module)", + "parent_symbol_id": null, + "package_or_module": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/queue/in_memory.py", + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)", + "layer": "C4_SEMANTIC_ROLES", + "title": "InMemoryTaskQueue", + "span_start": 9, + "span_end": 38, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 22, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "2da04cb94544a3bcbf0943a95ad4bdd8710bcafaa32a02fd0e4de2178dcf3533", + "symbol_name": "InMemoryTaskQueue", + "qname": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 9, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "58f0cc001ccda0eee4c6bc32ed83bd05eafd6b6644f1e8b4aa9eed3103db73dc", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "ConfigFileLoader\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (8)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ConfigFileLoader", + "span_start": 11, + "span_end": 48, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 23, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "a8474eca8b6e9dc86ae67ed68b16fa5fb639ef08739c053e7b7195489765667f", + "symbol_name": "ConfigFileLoader", + "qname": "ConfigFileLoader", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 8, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workers/supervisor.py", + "content": "WorkerSupervisor\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkerSupervisor", + "span_start": 10, + "span_end": 59, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "c17b44e8d9e97d490989b21fa67d7c346cdda8a0472e4c41fb243c8846faa124", + "symbol_name": "WorkerSupervisor", + "qname": "WorkerSupervisor", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "77609d9d5927171cce7fc3a54897c183fd63068710c6362029b700937aae5eee", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowEngine", + "span_start": 10, + "span_end": 86, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "57ec0a9f11c542c78e008684a888397e8d9ef4223671acb2567e631a0cbc70b4", + "symbol_name": "WorkflowEngine", + "qname": "WorkflowEngine", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/store.py", + "content": "TraceContextStore\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "TraceContextStore", + "span_start": 15, + "span_end": 52, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b2dad4fbe16ffb11b58deba311c7739955c39d59f291b22181f33e9c8cce4059", + "symbol_name": "TraceContextStore", + "qname": "TraceContextStore", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "d369554f08fc92039c6edd5a2a1e73b23901533e8974459170bbd9347d263dc5", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime calls runtime.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:calls", + "span_start": 19, + "span_end": 19, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "4eaeec4ac55a59d5f66fd01c4754955f8fedaf4bc3df13fa769b352c7bfaacbb", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.add_config_file", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime reads_attr runtime.register_module", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:reads_attr", + "span_start": 28, + "span_end": 28, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "45516c79ff358dbf9b650a081668df0f66d2fe989300f985a1a78be6be166f8f", + "edge_type": "reads_attr", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.register_module", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:instantiates", + "span_start": 17, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "0adba17984f850ea1608c9e734d2dd5c325cfde3a8133123aa239e44935ad18e", + "edge_type": "instantiates", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": "27158ca220022eeb5083c6addf8a50775d45f7161284fd60aac48410105f4b98", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime calls runtime.register_module", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:calls", + "span_start": 28, + "span_end": 28, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "ab6003c3441addc1ba1b81edeca009165559f652f6b2cf424e5ae61b1f617de8", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.register_module", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime calls runtime.control_plane.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:calls", + "span_start": 21, + "span_end": 27, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "2678250030b9ce47a3b3b55fac7897ac530367edc8374ac9d5e6ecafb1e483f0", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.control_plane.register_channel", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime reads_attr runtime.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:reads_attr", + "span_start": 19, + "span_end": 19, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "30d4e8aae984ab84d523e80d02f1caeda52d547fa3d2aa47be8845931cabbca2", + "edge_type": "reads_attr", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.add_config_file", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "def create_runtime(\n module: ApplicationModule,\n *,\n config_path: str | None = None,\n enable_http_control: bool = False,\n control_host: str = \"127.0.0.1\",\n control_port: int = 8080,\n control_timeout: int = 5,\n) -> RuntimeManager:\n runtime = RuntimeManager()\n if config_path is not None:\n runtime.add_config_file(config_path)\n if enable_http_control:\n runtime.control_plane.register_channel(\n HttpControlChannel(\n host=control_host,\n port=control_port,\n timeout=control_timeout,\n )\n )\n runtime.register_module(module)\n return runtime", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/bootstrap.py:create_runtime", + "span_start": 8, + "span_end": 29, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Объясни функцию create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "Объясни функцию create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Объясни функцию create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "Объясни функцию create_runtime", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "create_runtime", + "alternatives": [ + "create_runtime" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 8, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 91, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 17, + "C0_SOURCE_CHUNKS": 12, + "C4_SEMANTIC_ROLES": 11, + "C2_DEPENDENCY_GRAPH": 41, + "C3_ENTRYPOINTS": 8 + }, + "merge_rank": 13 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_085312/router_rag_plba_code_retrieval_plba-rag-explain-create-runtime.md b/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_085312/router_rag_plba_code_retrieval_plba-rag-explain-create-runtime.md new file mode 100644 index 0000000..3a38698 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_085312/router_rag_plba_code_retrieval_plba-rag-explain-create-runtime.md @@ -0,0 +1,34 @@ +# plba-rag-explain-create-runtime + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/router_rag_plba_code_retrieval.yaml +- runner: runtime +- mode: router_rag +- passed: True + +## Query +Объясни функцию create_runtime + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 19, + "llm_answer": "", + "answer_mode": "partial", + "path_scope": [], + "symbol_candidates": [ + "create_runtime" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_085312/router_rag_plba_code_retrieval_plba-rag-explain-http-control-channel.json b/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_085312/router_rag_plba_code_retrieval_plba-rag-explain-http-control-channel.json new file mode 100644 index 0000000..ba62517 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_085312/router_rag_plba_code_retrieval_plba-rag-explain-http-control-channel.json @@ -0,0 +1,2477 @@ +{ + "case_id": "plba-rag-explain-http-control-channel", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/router_rag_plba_code_retrieval.yaml", + "runner": "runtime", + "mode": "router_rag", + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 19, + "llm_answer": "", + "answer_mode": "partial", + "path_scope": [], + "symbol_candidates": [ + "HttpControlChannel" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-rag-explain-http-control-channel", + "text": "Объясни класс HttpControlChannel", + "mode": "router_rag", + "run_started_at": "2026-03-12T08:53:12", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни класс HttpControlChannel", + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "HttpControlChannel", + "alternatives": [ + "HttpControlChannel" + ], + "confidence": 0.99 + }, + "rag_count": 19, + "rag_rows": [ + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel\nHttpControlChannel(ControlChannel)", + "layer": "C1_SYMBOL_CATALOG", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "qname": "HttpControlChannel", + "kind": "class", + "signature": "HttpControlChannel(ControlChannel)", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/queue/in_memory.py", + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)", + "layer": "C4_SEMANTIC_ROLES", + "title": "InMemoryTaskQueue", + "span_start": 9, + "span_end": 38, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 22, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "2da04cb94544a3bcbf0943a95ad4bdd8710bcafaa32a02fd0e4de2178dcf3533", + "symbol_name": "InMemoryTaskQueue", + "qname": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 9, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "58f0cc001ccda0eee4c6bc32ed83bd05eafd6b6644f1e8b4aa9eed3103db73dc", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._runner\n -> HttpControlChannel.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 15, + "span_end": 22, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "51d73913df709152258ed1b9a8c8f4eb3c575eccfe6b982aef0b28e0789a29da", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0", + "dst_ref": "HttpControlChannel.start", + "resolution": "resolved", + "slice_id": "51d73913df709152258ed1b9a8c8f4eb3c575eccfe6b982aef0b28e0789a29da", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._runner", + "HttpControlChannel.start" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._runner\n -> HttpControlChannel.port", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 15, + "span_end": 29, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "c7167bab7218bb768ad7c11bfb40d1a3096e6071dd7817bba5fd864cf8f6de13", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "3632ce8227f4a31e0768f2fb021a4d1ba28e1202633aa0f2fac902295931280f", + "dst_ref": "HttpControlChannel.port", + "resolution": "resolved", + "slice_id": "c7167bab7218bb768ad7c11bfb40d1a3096e6071dd7817bba5fd864cf8f6de13", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._runner", + "HttpControlChannel.port" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "3632ce8227f4a31e0768f2fb021a4d1ba28e1202633aa0f2fac902295931280f" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._timeout\n -> HttpControlChannel._health_response", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 14, + "span_end": 34, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "f858f5c9e575f6c4cdfe3853571b7ee21d1f628a443541d2037c3dc9d0790bef", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "e84bf04e9cd2127df235b7064d05f47e19f19a89c7c82f4c247231d4e8fa426a", + "dst_ref": "HttpControlChannel._health_response", + "resolution": "resolved", + "slice_id": "f858f5c9e575f6c4cdfe3853571b7ee21d1f628a443541d2037c3dc9d0790bef", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._timeout", + "HttpControlChannel._health_response" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "e84bf04e9cd2127df235b7064d05f47e19f19a89c7c82f4c247231d4e8fa426a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._timeout\n -> HttpControlChannel._action_response", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "c3ef21fcae96c82c00be74b3ab827d4af2085d89cb3fa5521c19a174aad84dbb", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "e64969024ccaeb34d8d91473fad07b3b3d341875846392e7a006406c7ada1954", + "dst_ref": "HttpControlChannel._action_response", + "resolution": "resolved", + "slice_id": "c3ef21fcae96c82c00be74b3ab827d4af2085d89cb3fa5521c19a174aad84dbb", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._timeout", + "HttpControlChannel._action_response" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "e64969024ccaeb34d8d91473fad07b3b3d341875846392e7a006406c7ada1954" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._runner\n -> HttpControlChannel.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 15, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "0f827ef81a990258a8a74381c8564a8361afa6712dba3200592659c939adcb9d", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "f29ab212620093d72be20e26c5a399624c7939a6056a728762ed3f84a250bfa3", + "dst_ref": "HttpControlChannel.stop", + "resolution": "resolved", + "slice_id": "0f827ef81a990258a8a74381c8564a8361afa6712dba3200592659c939adcb9d", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._runner", + "HttpControlChannel.stop" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "f29ab212620093d72be20e26c5a399624c7939a6056a728762ed3f84a250bfa3" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._factory\n -> HttpControlChannel.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 16, + "span_end": 21, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e61ec25ded7dbe380d95ce2abcbc1d7a2d2afde5aa8453866df8706dfb7d6ddb", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0", + "dst_ref": "HttpControlChannel.start", + "resolution": "resolved", + "slice_id": "e61ec25ded7dbe380d95ce2abcbc1d7a2d2afde5aa8453866df8706dfb7d6ddb", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._factory", + "HttpControlChannel.start" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel(ControlChannel):\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._timeout = timeout\n self._runner = UvicornThreadRunner(host, port, timeout)\n self._factory = HttpControlAppFactory()\n self._actions: ControlActionSet | None = None\n\n async def start(self, actions: ControlActionSet) -> None:\n self._actions = actions\n app = self._factory.create(self._health_response, self._action_response)\n await self._runner.start(app)\n\n async def stop(self) -> None:\n await self._runner.stop()\n\n @property\n def port(self) -> int:\n return self._runner.port\n\n async def _health_response(self) -> dict[str, object]:\n if self._actions is None:\n return {\"status\": \"unhealthy\", \"detail\": \"control actions are not configured\"}\n return await asyncio.wait_for(self._actions.health(), timeout=float(self._timeout))\n\n async def _action_response(self, action: str, _client_source: str = \"unknown\") -> JSONResponse:\n if self._actions is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"{action} handler is not configured\"}, status_code=404)\n callbacks = {\n \"start\": self._actions.start,\n \"stop\": self._actions.stop,\n \"status\": self._actions.status,\n }\n callback = callbacks.get(action)\n if callback is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"unsupported action: {action}\"}, status_code=404)\n action_timeout = max(float(self._timeout), 10.0) if action in {\"start\", \"stop\"} else float(self._timeout)\n try:\n detail = await asyncio.wait_for(callback(), timeout=action_timeout)\n except asyncio.TimeoutError:\n return JSONResponse(\n content={\"status\": \"accepted\", \"detail\": f\"{action} operation is still in progress\"},\n status_code=202,\n )\n except Exception as exc:\n return JSONResponse(content={\"status\": \"error\", \"detail\": str(exc)}, status_code=500)\n return JSONResponse(content={\"status\": \"ok\", \"detail\": detail or f\"{action} action accepted\"}, status_code=200)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_channel.py:HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": null, + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS", + "C4_SEMANTIC_ROLES" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "partial", + "groundedness": "not_applicable" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "HttpControlChannel" + ], + "keyword_hints": [ + "HttpControlChannel" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "HttpControlChannel", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Объясни класс HttpControlChannel", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "Объясни класс HttpControlChannel", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Объясни класс HttpControlChannel", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "Объясни класс HttpControlChannel", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "HttpControlChannel", + "alternatives": [ + "HttpControlChannel" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 8, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 103, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 21, + "C0_SOURCE_CHUNKS": 12, + "C4_SEMANTIC_ROLES": 10, + "C2_DEPENDENCY_GRAPH": 50, + "C3_ENTRYPOINTS": 9 + }, + "merge_rank": 16, + "prompt_build": 0, + "llm_call": 0 + }, + "prompt": null, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "HttpControlChannel" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 19, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-rag-explain-http-control-channel", + "mode": "router_rag", + "run_started_at": "2026-03-12T08:53:12", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Объясни класс HttpControlChannel", + "normalized_query": "Объясни класс HttpControlChannel" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Объясни класс HttpControlChannel" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни класс HttpControlChannel" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "HttpControlChannel" + ], + "keyword_hints": [ + "HttpControlChannel" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Объясни класс HttpControlChannel" + }, + "output": { + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "HttpControlChannel", + "alternatives": [ + "HttpControlChannel" + ], + "confidence": 0.99 + }, + "rag_count": 19, + "rag_rows": [ + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel\nHttpControlChannel(ControlChannel)", + "layer": "C1_SYMBOL_CATALOG", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "qname": "HttpControlChannel", + "kind": "class", + "signature": "HttpControlChannel(ControlChannel)", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/queue/in_memory.py", + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)", + "layer": "C4_SEMANTIC_ROLES", + "title": "InMemoryTaskQueue", + "span_start": 9, + "span_end": 38, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 22, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "2da04cb94544a3bcbf0943a95ad4bdd8710bcafaa32a02fd0e4de2178dcf3533", + "symbol_name": "InMemoryTaskQueue", + "qname": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 9, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "58f0cc001ccda0eee4c6bc32ed83bd05eafd6b6644f1e8b4aa9eed3103db73dc", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._runner\n -> HttpControlChannel.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 15, + "span_end": 22, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "51d73913df709152258ed1b9a8c8f4eb3c575eccfe6b982aef0b28e0789a29da", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0", + "dst_ref": "HttpControlChannel.start", + "resolution": "resolved", + "slice_id": "51d73913df709152258ed1b9a8c8f4eb3c575eccfe6b982aef0b28e0789a29da", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._runner", + "HttpControlChannel.start" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._runner\n -> HttpControlChannel.port", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 15, + "span_end": 29, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "c7167bab7218bb768ad7c11bfb40d1a3096e6071dd7817bba5fd864cf8f6de13", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "3632ce8227f4a31e0768f2fb021a4d1ba28e1202633aa0f2fac902295931280f", + "dst_ref": "HttpControlChannel.port", + "resolution": "resolved", + "slice_id": "c7167bab7218bb768ad7c11bfb40d1a3096e6071dd7817bba5fd864cf8f6de13", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._runner", + "HttpControlChannel.port" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "3632ce8227f4a31e0768f2fb021a4d1ba28e1202633aa0f2fac902295931280f" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._timeout\n -> HttpControlChannel._health_response", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 14, + "span_end": 34, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "f858f5c9e575f6c4cdfe3853571b7ee21d1f628a443541d2037c3dc9d0790bef", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "e84bf04e9cd2127df235b7064d05f47e19f19a89c7c82f4c247231d4e8fa426a", + "dst_ref": "HttpControlChannel._health_response", + "resolution": "resolved", + "slice_id": "f858f5c9e575f6c4cdfe3853571b7ee21d1f628a443541d2037c3dc9d0790bef", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._timeout", + "HttpControlChannel._health_response" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "e84bf04e9cd2127df235b7064d05f47e19f19a89c7c82f4c247231d4e8fa426a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._timeout\n -> HttpControlChannel._action_response", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "c3ef21fcae96c82c00be74b3ab827d4af2085d89cb3fa5521c19a174aad84dbb", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "e64969024ccaeb34d8d91473fad07b3b3d341875846392e7a006406c7ada1954", + "dst_ref": "HttpControlChannel._action_response", + "resolution": "resolved", + "slice_id": "c3ef21fcae96c82c00be74b3ab827d4af2085d89cb3fa5521c19a174aad84dbb", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._timeout", + "HttpControlChannel._action_response" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "e64969024ccaeb34d8d91473fad07b3b3d341875846392e7a006406c7ada1954" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._runner\n -> HttpControlChannel.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 15, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "0f827ef81a990258a8a74381c8564a8361afa6712dba3200592659c939adcb9d", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "f29ab212620093d72be20e26c5a399624c7939a6056a728762ed3f84a250bfa3", + "dst_ref": "HttpControlChannel.stop", + "resolution": "resolved", + "slice_id": "0f827ef81a990258a8a74381c8564a8361afa6712dba3200592659c939adcb9d", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._runner", + "HttpControlChannel.stop" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "f29ab212620093d72be20e26c5a399624c7939a6056a728762ed3f84a250bfa3" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._factory\n -> HttpControlChannel.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 16, + "span_end": 21, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e61ec25ded7dbe380d95ce2abcbc1d7a2d2afde5aa8453866df8706dfb7d6ddb", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0", + "dst_ref": "HttpControlChannel.start", + "resolution": "resolved", + "slice_id": "e61ec25ded7dbe380d95ce2abcbc1d7a2d2afde5aa8453866df8706dfb7d6ddb", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._factory", + "HttpControlChannel.start" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel(ControlChannel):\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._timeout = timeout\n self._runner = UvicornThreadRunner(host, port, timeout)\n self._factory = HttpControlAppFactory()\n self._actions: ControlActionSet | None = None\n\n async def start(self, actions: ControlActionSet) -> None:\n self._actions = actions\n app = self._factory.create(self._health_response, self._action_response)\n await self._runner.start(app)\n\n async def stop(self) -> None:\n await self._runner.stop()\n\n @property\n def port(self) -> int:\n return self._runner.port\n\n async def _health_response(self) -> dict[str, object]:\n if self._actions is None:\n return {\"status\": \"unhealthy\", \"detail\": \"control actions are not configured\"}\n return await asyncio.wait_for(self._actions.health(), timeout=float(self._timeout))\n\n async def _action_response(self, action: str, _client_source: str = \"unknown\") -> JSONResponse:\n if self._actions is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"{action} handler is not configured\"}, status_code=404)\n callbacks = {\n \"start\": self._actions.start,\n \"stop\": self._actions.stop,\n \"status\": self._actions.status,\n }\n callback = callbacks.get(action)\n if callback is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"unsupported action: {action}\"}, status_code=404)\n action_timeout = max(float(self._timeout), 10.0) if action in {\"start\", \"stop\"} else float(self._timeout)\n try:\n detail = await asyncio.wait_for(callback(), timeout=action_timeout)\n except asyncio.TimeoutError:\n return JSONResponse(\n content={\"status\": \"accepted\", \"detail\": f\"{action} operation is still in progress\"},\n status_code=202,\n )\n except Exception as exc:\n return JSONResponse(content={\"status\": \"error\", \"detail\": str(exc)}, status_code=500)\n return JSONResponse(content={\"status\": \"ok\", \"detail\": detail or f\"{action} action accepted\"}, status_code=200)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_channel.py:HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "HttpControlChannel", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Объясни класс HttpControlChannel", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "Объясни класс HttpControlChannel", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Объясни класс HttpControlChannel", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "Объясни класс HttpControlChannel", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "HttpControlChannel", + "alternatives": [ + "HttpControlChannel" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 8, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 103, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 21, + "C0_SOURCE_CHUNKS": 12, + "C4_SEMANTIC_ROLES": 10, + "C2_DEPENDENCY_GRAPH": 50, + "C3_ENTRYPOINTS": 9 + }, + "merge_rank": 16 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_085312/router_rag_plba_code_retrieval_plba-rag-explain-http-control-channel.md b/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_085312/router_rag_plba_code_retrieval_plba-rag-explain-http-control-channel.md new file mode 100644 index 0000000..7b16505 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_085312/router_rag_plba_code_retrieval_plba-rag-explain-http-control-channel.md @@ -0,0 +1,34 @@ +# plba-rag-explain-http-control-channel + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/router_rag_plba_code_retrieval.yaml +- runner: runtime +- mode: router_rag +- passed: True + +## Query +Объясни класс HttpControlChannel + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 19, + "llm_answer": "", + "answer_mode": "partial", + "path_scope": [], + "symbol_candidates": [ + "HttpControlChannel" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_085312/router_rag_plba_code_retrieval_plba-rag-explain-runtime-manager.json b/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_085312/router_rag_plba_code_retrieval_plba-rag-explain-runtime-manager.json new file mode 100644 index 0000000..9a98077 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_085312/router_rag_plba_code_retrieval_plba-rag-explain-runtime-manager.json @@ -0,0 +1,2477 @@ +{ + "case_id": "plba-rag-explain-runtime-manager", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/router_rag_plba_code_retrieval.yaml", + "runner": "runtime", + "mode": "router_rag", + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 19, + "llm_answer": "", + "answer_mode": "partial", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-rag-explain-runtime-manager", + "text": "Объясни как работает класс RuntimeManager", + "mode": "router_rag", + "run_started_at": "2026-03-12T08:53:12", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни как работает класс RuntimeManager", + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ], + "confidence": 0.99 + }, + "rag_count": 19, + "rag_rows": [ + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager\nRuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "qname": "RuntimeManager", + "kind": "class", + "signature": "RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests manager\n- orchestrates role-like calls (4)\n- reads and writes state attributes\n- participates in dataflow slices (50)", + "layer": "C4_SEMANTIC_ROLES", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 43, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "symbol_name": "RuntimeManager", + "qname": "RuntimeManager", + "role": "pipeline_stage", + "confidence": 0.67, + "dataflow_participation": 50, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 52, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": null, + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS", + "C4_SEMANTIC_ROLES" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "partial", + "groundedness": "not_applicable" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Объясни как работает класс RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "Объясни как работает класс RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Объясни как работает класс RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "Объясни как работает класс RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 8, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 121, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 23, + "C0_SOURCE_CHUNKS": 12, + "C4_SEMANTIC_ROLES": 11, + "C2_DEPENDENCY_GRAPH": 51, + "C3_ENTRYPOINTS": 11 + }, + "merge_rank": 15, + "prompt_build": 0, + "llm_call": 0 + }, + "prompt": null, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "RuntimeManager" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 19, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-rag-explain-runtime-manager", + "mode": "router_rag", + "run_started_at": "2026-03-12T08:53:12", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Объясни как работает класс RuntimeManager", + "normalized_query": "Объясни как работает класс RuntimeManager" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Объясни как работает класс RuntimeManager" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни как работает класс RuntimeManager" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Объясни как работает класс RuntimeManager" + }, + "output": { + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ], + "confidence": 0.99 + }, + "rag_count": 19, + "rag_rows": [ + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager\nRuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "qname": "RuntimeManager", + "kind": "class", + "signature": "RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests manager\n- orchestrates role-like calls (4)\n- reads and writes state attributes\n- participates in dataflow slices (50)", + "layer": "C4_SEMANTIC_ROLES", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 43, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "symbol_name": "RuntimeManager", + "qname": "RuntimeManager", + "role": "pipeline_stage", + "confidence": 0.67, + "dataflow_participation": 50, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 52, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Объясни как работает класс RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "Объясни как работает класс RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Объясни как работает класс RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "Объясни как работает класс RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 8, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 121, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 23, + "C0_SOURCE_CHUNKS": 12, + "C4_SEMANTIC_ROLES": 11, + "C2_DEPENDENCY_GRAPH": 51, + "C3_ENTRYPOINTS": 11 + }, + "merge_rank": 15 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_085312/router_rag_plba_code_retrieval_plba-rag-explain-runtime-manager.md b/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_085312/router_rag_plba_code_retrieval_plba-rag-explain-runtime-manager.md new file mode 100644 index 0000000..fd2e3dc --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_085312/router_rag_plba_code_retrieval_plba-rag-explain-runtime-manager.md @@ -0,0 +1,34 @@ +# plba-rag-explain-runtime-manager + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/router_rag_plba_code_retrieval.yaml +- runner: runtime +- mode: router_rag +- passed: True + +## Query +Объясни как работает класс RuntimeManager + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 19, + "llm_answer": "", + "answer_mode": "partial", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_085312/router_rag_plba_code_retrieval_plba-rag-explain-trace-service.json b/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_085312/router_rag_plba_code_retrieval_plba-rag-explain-trace-service.json new file mode 100644 index 0000000..f26fbd7 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_085312/router_rag_plba_code_retrieval_plba-rag-explain-trace-service.json @@ -0,0 +1,2597 @@ +{ + "case_id": "plba-rag-explain-trace-service", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/router_rag_plba_code_retrieval.yaml", + "runner": "runtime", + "mode": "router_rag", + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 21, + "llm_answer": "", + "answer_mode": "partial", + "path_scope": [], + "symbol_candidates": [ + "TraceService" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-rag-explain-trace-service", + "text": "Как работает TraceService?", + "mode": "router_rag", + "run_started_at": "2026-03-12T08:53:12", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Как работает TraceService?", + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "TraceService", + "alternatives": [ + "TraceService" + ], + "confidence": 0.99 + }, + "rag_count": 21, + "rag_rows": [ + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceService\nTraceService(TraceContextFactory)", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService", + "span_start": 39, + "span_end": 166, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "c2b2b976d99f2c600000b753731b26e0a69adcb4359398b93073590c5d5d04f4", + "qname": "TraceService", + "kind": "class", + "signature": "TraceService(TraceContextFactory)", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (13)", + "layer": "C4_SEMANTIC_ROLES", + "title": "TraceService", + "span_start": 39, + "span_end": 166, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 60, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "c2b2b976d99f2c600000b753731b26e0a69adcb4359398b93073590c5d5d04f4", + "symbol_name": "TraceService", + "qname": "TraceService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 13, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/queue/in_memory.py", + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)", + "layer": "C4_SEMANTIC_ROLES", + "title": "InMemoryTaskQueue", + "span_start": 9, + "span_end": 38, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 22, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "2da04cb94544a3bcbf0943a95ad4bdd8710bcafaa32a02fd0e4de2178dcf3533", + "symbol_name": "InMemoryTaskQueue", + "qname": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 9, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "58f0cc001ccda0eee4c6bc32ed83bd05eafd6b6644f1e8b4aa9eed3103db73dc", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "ConfigFileLoader\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (8)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ConfigFileLoader", + "span_start": 11, + "span_end": 48, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 23, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "a8474eca8b6e9dc86ae67ed68b16fa5fb639ef08739c053e7b7195489765667f", + "symbol_name": "ConfigFileLoader", + "qname": "ConfigFileLoader", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 8, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/store.py", + "content": "TraceContextStore\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "TraceContextStore", + "span_start": 15, + "span_end": 52, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b2dad4fbe16ffb11b58deba311c7739955c39d59f291b22181f33e9c8cce4059", + "symbol_name": "TraceContextStore", + "qname": "TraceContextStore", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "d369554f08fc92039c6edd5a2a1e73b23901533e8974459170bbd9347d263dc5", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workers/supervisor.py", + "content": "WorkerSupervisor\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkerSupervisor", + "span_start": 10, + "span_end": 59, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "c17b44e8d9e97d490989b21fa67d7c346cdda8a0472e4c41fb243c8846faa124", + "symbol_name": "WorkerSupervisor", + "qname": "WorkerSupervisor", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "77609d9d5927171cce7fc3a54897c183fd63068710c6362029b700937aae5eee", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.create_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 61, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3b052062067a78aef3302ee1d996897e02a67d1b340397bea4f59fe147c0492a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a", + "dst_ref": "TraceService.create_context", + "resolution": "resolved", + "slice_id": "3b052062067a78aef3302ee1d996897e02a67d1b340397bea4f59fe147c0492a", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.create_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.close_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 84, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "7a9353ef57c9ae5d19b3a0c6ac50fad05e6d21d31bbe1cd1cd07af6332ba6505", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "01e14158dcced7e52d0c8ac84ac7b9a75225c261b6aca6a1d7da802d0994721c", + "dst_ref": "TraceService.close_context", + "resolution": "resolved", + "slice_id": "7a9353ef57c9ae5d19b3a0c6ac50fad05e6d21d31bbe1cd1cd07af6332ba6505", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.close_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "01e14158dcced7e52d0c8ac84ac7b9a75225c261b6aca6a1d7da802d0994721c" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.open_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 78, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a6e13b9ebc4fed84586afd53ed92a4d14757e440873f572b2337d5622ee96031", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426", + "dst_ref": "TraceService.open_context", + "resolution": "resolved", + "slice_id": "a6e13b9ebc4fed84586afd53ed92a4d14757e440873f572b2337d5622ee96031", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.open_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.transport\n -> TraceService.__init__", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 41, + "span_end": 43, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "1e923a93faa05c3c43ca9b19bd047007a8589ccce57d3cc1798ae7f9f200af98", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "dst_ref": "TraceService.__init__", + "resolution": "resolved", + "slice_id": "1e923a93faa05c3c43ca9b19bd047007a8589ccce57d3cc1798ae7f9f200af98", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.transport", + "TraceService.__init__" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.current_trace_id", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 81, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3ea17138634b1190bded77ddb84aa1595124f6519b246f24fc4b02bd62b5cac1", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c", + "dst_ref": "TraceService.current_trace_id", + "resolution": "resolved", + "slice_id": "3ea17138634b1190bded77ddb84aa1595124f6519b246f24fc4b02bd62b5cac1", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.current_trace_id" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.step", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 88, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "9f34c5da9b09fba99df6f6b1bde183a9aeb45111b8218a747c71590c2c9f60f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "c44bfbc66cf747283f30088da3e011a10395031d41e77b74e523c24997f641ca", + "dst_ref": "TraceService.step", + "resolution": "resolved", + "slice_id": "9f34c5da9b09fba99df6f6b1bde183a9aeb45111b8218a747c71590c2c9f60f2", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.step" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "c44bfbc66cf747283f30088da3e011a10395031d41e77b74e523c24997f641ca" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceRecordWriter:\n def __init__(self, transport: TraceTransport) -> None:\n self._logger = logging.getLogger(__name__)\n self._transport = transport\n\n def write_context(self, record: TraceContextRecord) -> None:\n try:\n self._transport.write_context(record)\n except Exception:\n self._logger.exception(\"Trace transport failed to write context %s\", record.trace_id)\n\n def write_message(self, record: TraceLogMessage) -> None:\n try:\n self._transport.write_message(record)\n except Exception:\n self._logger.exception(\"Trace transport failed to write message for %s\", record.trace_id)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/tracing/service.py:TraceRecordWriter", + "span_start": 21, + "span_end": 36, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceService(TraceContextFactory):\n def __init__(self, transport: TraceTransport | None = None, store: TraceContextStore | None = None) -> None:\n self.transport = transport or NoOpTraceTransport()\n self.store = store or TraceContextStore()\n self._writer = TraceRecordWriter(self.transport)\n\n def create_context(\n self,\n *,\n alias: str,\n parent_id: str | None = None,\n kind: str | None = None,\n attrs: dict[str, Any] | None = None,\n ) -> str:\n record = TraceContextRecord(\n trace_id=uuid4().hex,\n alias=str(alias or \"\"),\n parent_id=parent_id,\n type=kind,\n event_time=utc_now(),\n attrs=dict(attrs or {}),\n )\n self.store.push(record)\n self._writer.write_context(record)\n return record.trace_id\n\n @contextmanager\n def open_context(\n self,\n *,\n alias: str,\n parent_id: str | None = None,\n kind: str | None = None,\n attrs: dict[str, Any] | None = None,\n ) -> Iterator[str]:\n trace_id = self.create_context(alias=alias, parent_id=parent_id, kind=kind, attrs=attrs)\n try:\n yield trace_id\n finally:\n self.store.pop()\n\n def current_trace_id(self) -> str | None:\n return self.store.current_trace_id()\n\n def close_context(self) -> str | None:\n previous = self.store.pop()\n return previous.record.trace_id if previous else None\n\n def step(self, name: str) -> None:\n self.store.set_step(str(name or \"\"))\n\n def info(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"INFO\", message, status, attrs)\n\n def debug(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"DEBUG\", message, status, attrs)\n\n def warning(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"WARNING\", message, status, attrs)\n\n def error(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"ERROR\", message, status, attrs)\n\n def exception(self, message: str, *, status: str = \"failed\", attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"ERROR\", message, status, attrs)\n\n def new_root(self, operation: str) -> TraceContext:\n trace_id = self.create_context(alias=operation, kind=\"operation\", attrs={\"operation\": operation})\n return TraceContext(trace_id=trace_id, span_id=trace_id, attributes={\"operation\": operation})\n\n def child_of(self, parent: TraceContext, operation: str) -> TraceContext:\n trace_id = self.create_context(\n alias=operation,\n parent_id=parent.trace_id,\n kind=\"worker\",\n attrs={\"operation\": operation},\n )\n return TraceContext(\n trace_id=trace_id,\n span_id=trace_id,\n parent_span_id=parent.span_id,\n attributes={\"operation\": operation},\n )\n\n def attach(self, metadata: dict[str, object], context: TraceContext) -> dict[str, object]:\n updated = dict(metadata)\n updated[\"trace_id\"] = context.trace_id\n updated[\"span_id\"] = context.span_id\n updated[\"parent_span_id\"] = context.parent_span_id\n return updated\n\n def resume(self, metadata: dict[str, object], operation: str) -> TraceContext:\n trace_id = str(metadata.get(\"trace_id\") or uuid4().hex)\n span_id = str(metadata.get(\"span_id\") or trace_id)\n parent_id = metadata.get(\"parent_span_id\")\n self.create_context(\n alias=operation,\n parent_id=str(parent_id) if parent_id else None,\n kind=\"worker\",\n attrs=dict(metadata),\n )\n return TraceContext(\n trace_id=trace_id,\n span_id=span_id,\n parent_span_id=str(parent_id) if parent_id else None,\n attributes={\"operation\": operation},\n )\n\n def _write_message(\n self,\n level: TraceLevel,\n message: str,\n status: str | None,\n attrs: dict[str, Any] | None,\n ) -> None:\n active = self.store.current()\n if active is None:\n raise RuntimeError(\"Trace context is not bound. Call create_context() first.\")\n record = TraceLogMessage(\n trace_id=active.record.trace_id,\n step=active.step,\n status=str(status or \"\"),\n message=str(message or \"\"),\n level=level,\n event_time=utc_now(),\n attrs=dict(attrs or {}),\n )\n self._writer.write_message(record)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/tracing/service.py:TraceService", + "span_start": 39, + "span_end": 166, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceManager(TraceService):\n \"\"\"Compatibility alias during the transition from ConfigManager-shaped naming.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/tracing/service.py:TraceManager", + "span_start": 169, + "span_end": 170, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 2, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": null, + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS", + "C4_SEMANTIC_ROLES" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "partial", + "groundedness": "not_applicable" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "TraceService" + ], + "keyword_hints": [ + "TraceService" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "TraceService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Как работает TraceService?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "Как работает TraceService?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Как работает TraceService?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "Как работает TraceService?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "TraceService", + "alternatives": [ + "TraceService" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 8, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 89, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 18, + "C0_SOURCE_CHUNKS": 11, + "C4_SEMANTIC_ROLES": 10, + "C2_DEPENDENCY_GRAPH": 41, + "C3_ENTRYPOINTS": 8 + }, + "merge_rank": 15, + "prompt_build": 0, + "llm_call": 0 + }, + "prompt": null, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "TraceService" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 21, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-rag-explain-trace-service", + "mode": "router_rag", + "run_started_at": "2026-03-12T08:53:12", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Как работает TraceService?", + "normalized_query": "Как работает TraceService?" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Как работает TraceService?" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Как работает TraceService?" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "TraceService" + ], + "keyword_hints": [ + "TraceService" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Как работает TraceService?" + }, + "output": { + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "TraceService", + "alternatives": [ + "TraceService" + ], + "confidence": 0.99 + }, + "rag_count": 21, + "rag_rows": [ + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceService\nTraceService(TraceContextFactory)", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService", + "span_start": 39, + "span_end": 166, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "c2b2b976d99f2c600000b753731b26e0a69adcb4359398b93073590c5d5d04f4", + "qname": "TraceService", + "kind": "class", + "signature": "TraceService(TraceContextFactory)", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (13)", + "layer": "C4_SEMANTIC_ROLES", + "title": "TraceService", + "span_start": 39, + "span_end": 166, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 60, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "c2b2b976d99f2c600000b753731b26e0a69adcb4359398b93073590c5d5d04f4", + "symbol_name": "TraceService", + "qname": "TraceService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 13, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/queue/in_memory.py", + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)", + "layer": "C4_SEMANTIC_ROLES", + "title": "InMemoryTaskQueue", + "span_start": 9, + "span_end": 38, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 22, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "2da04cb94544a3bcbf0943a95ad4bdd8710bcafaa32a02fd0e4de2178dcf3533", + "symbol_name": "InMemoryTaskQueue", + "qname": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 9, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "58f0cc001ccda0eee4c6bc32ed83bd05eafd6b6644f1e8b4aa9eed3103db73dc", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "ConfigFileLoader\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (8)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ConfigFileLoader", + "span_start": 11, + "span_end": 48, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 23, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "a8474eca8b6e9dc86ae67ed68b16fa5fb639ef08739c053e7b7195489765667f", + "symbol_name": "ConfigFileLoader", + "qname": "ConfigFileLoader", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 8, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/store.py", + "content": "TraceContextStore\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "TraceContextStore", + "span_start": 15, + "span_end": 52, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b2dad4fbe16ffb11b58deba311c7739955c39d59f291b22181f33e9c8cce4059", + "symbol_name": "TraceContextStore", + "qname": "TraceContextStore", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "d369554f08fc92039c6edd5a2a1e73b23901533e8974459170bbd9347d263dc5", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workers/supervisor.py", + "content": "WorkerSupervisor\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkerSupervisor", + "span_start": 10, + "span_end": 59, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "c17b44e8d9e97d490989b21fa67d7c346cdda8a0472e4c41fb243c8846faa124", + "symbol_name": "WorkerSupervisor", + "qname": "WorkerSupervisor", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "77609d9d5927171cce7fc3a54897c183fd63068710c6362029b700937aae5eee", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.create_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 61, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3b052062067a78aef3302ee1d996897e02a67d1b340397bea4f59fe147c0492a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a", + "dst_ref": "TraceService.create_context", + "resolution": "resolved", + "slice_id": "3b052062067a78aef3302ee1d996897e02a67d1b340397bea4f59fe147c0492a", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.create_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.close_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 84, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "7a9353ef57c9ae5d19b3a0c6ac50fad05e6d21d31bbe1cd1cd07af6332ba6505", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "01e14158dcced7e52d0c8ac84ac7b9a75225c261b6aca6a1d7da802d0994721c", + "dst_ref": "TraceService.close_context", + "resolution": "resolved", + "slice_id": "7a9353ef57c9ae5d19b3a0c6ac50fad05e6d21d31bbe1cd1cd07af6332ba6505", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.close_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "01e14158dcced7e52d0c8ac84ac7b9a75225c261b6aca6a1d7da802d0994721c" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.open_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 78, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a6e13b9ebc4fed84586afd53ed92a4d14757e440873f572b2337d5622ee96031", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426", + "dst_ref": "TraceService.open_context", + "resolution": "resolved", + "slice_id": "a6e13b9ebc4fed84586afd53ed92a4d14757e440873f572b2337d5622ee96031", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.open_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.transport\n -> TraceService.__init__", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 41, + "span_end": 43, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "1e923a93faa05c3c43ca9b19bd047007a8589ccce57d3cc1798ae7f9f200af98", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "dst_ref": "TraceService.__init__", + "resolution": "resolved", + "slice_id": "1e923a93faa05c3c43ca9b19bd047007a8589ccce57d3cc1798ae7f9f200af98", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.transport", + "TraceService.__init__" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.current_trace_id", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 81, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3ea17138634b1190bded77ddb84aa1595124f6519b246f24fc4b02bd62b5cac1", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c", + "dst_ref": "TraceService.current_trace_id", + "resolution": "resolved", + "slice_id": "3ea17138634b1190bded77ddb84aa1595124f6519b246f24fc4b02bd62b5cac1", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.current_trace_id" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.step", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 88, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "9f34c5da9b09fba99df6f6b1bde183a9aeb45111b8218a747c71590c2c9f60f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "c44bfbc66cf747283f30088da3e011a10395031d41e77b74e523c24997f641ca", + "dst_ref": "TraceService.step", + "resolution": "resolved", + "slice_id": "9f34c5da9b09fba99df6f6b1bde183a9aeb45111b8218a747c71590c2c9f60f2", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.step" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "c44bfbc66cf747283f30088da3e011a10395031d41e77b74e523c24997f641ca" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceRecordWriter:\n def __init__(self, transport: TraceTransport) -> None:\n self._logger = logging.getLogger(__name__)\n self._transport = transport\n\n def write_context(self, record: TraceContextRecord) -> None:\n try:\n self._transport.write_context(record)\n except Exception:\n self._logger.exception(\"Trace transport failed to write context %s\", record.trace_id)\n\n def write_message(self, record: TraceLogMessage) -> None:\n try:\n self._transport.write_message(record)\n except Exception:\n self._logger.exception(\"Trace transport failed to write message for %s\", record.trace_id)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/tracing/service.py:TraceRecordWriter", + "span_start": 21, + "span_end": 36, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceService(TraceContextFactory):\n def __init__(self, transport: TraceTransport | None = None, store: TraceContextStore | None = None) -> None:\n self.transport = transport or NoOpTraceTransport()\n self.store = store or TraceContextStore()\n self._writer = TraceRecordWriter(self.transport)\n\n def create_context(\n self,\n *,\n alias: str,\n parent_id: str | None = None,\n kind: str | None = None,\n attrs: dict[str, Any] | None = None,\n ) -> str:\n record = TraceContextRecord(\n trace_id=uuid4().hex,\n alias=str(alias or \"\"),\n parent_id=parent_id,\n type=kind,\n event_time=utc_now(),\n attrs=dict(attrs or {}),\n )\n self.store.push(record)\n self._writer.write_context(record)\n return record.trace_id\n\n @contextmanager\n def open_context(\n self,\n *,\n alias: str,\n parent_id: str | None = None,\n kind: str | None = None,\n attrs: dict[str, Any] | None = None,\n ) -> Iterator[str]:\n trace_id = self.create_context(alias=alias, parent_id=parent_id, kind=kind, attrs=attrs)\n try:\n yield trace_id\n finally:\n self.store.pop()\n\n def current_trace_id(self) -> str | None:\n return self.store.current_trace_id()\n\n def close_context(self) -> str | None:\n previous = self.store.pop()\n return previous.record.trace_id if previous else None\n\n def step(self, name: str) -> None:\n self.store.set_step(str(name or \"\"))\n\n def info(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"INFO\", message, status, attrs)\n\n def debug(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"DEBUG\", message, status, attrs)\n\n def warning(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"WARNING\", message, status, attrs)\n\n def error(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"ERROR\", message, status, attrs)\n\n def exception(self, message: str, *, status: str = \"failed\", attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"ERROR\", message, status, attrs)\n\n def new_root(self, operation: str) -> TraceContext:\n trace_id = self.create_context(alias=operation, kind=\"operation\", attrs={\"operation\": operation})\n return TraceContext(trace_id=trace_id, span_id=trace_id, attributes={\"operation\": operation})\n\n def child_of(self, parent: TraceContext, operation: str) -> TraceContext:\n trace_id = self.create_context(\n alias=operation,\n parent_id=parent.trace_id,\n kind=\"worker\",\n attrs={\"operation\": operation},\n )\n return TraceContext(\n trace_id=trace_id,\n span_id=trace_id,\n parent_span_id=parent.span_id,\n attributes={\"operation\": operation},\n )\n\n def attach(self, metadata: dict[str, object], context: TraceContext) -> dict[str, object]:\n updated = dict(metadata)\n updated[\"trace_id\"] = context.trace_id\n updated[\"span_id\"] = context.span_id\n updated[\"parent_span_id\"] = context.parent_span_id\n return updated\n\n def resume(self, metadata: dict[str, object], operation: str) -> TraceContext:\n trace_id = str(metadata.get(\"trace_id\") or uuid4().hex)\n span_id = str(metadata.get(\"span_id\") or trace_id)\n parent_id = metadata.get(\"parent_span_id\")\n self.create_context(\n alias=operation,\n parent_id=str(parent_id) if parent_id else None,\n kind=\"worker\",\n attrs=dict(metadata),\n )\n return TraceContext(\n trace_id=trace_id,\n span_id=span_id,\n parent_span_id=str(parent_id) if parent_id else None,\n attributes={\"operation\": operation},\n )\n\n def _write_message(\n self,\n level: TraceLevel,\n message: str,\n status: str | None,\n attrs: dict[str, Any] | None,\n ) -> None:\n active = self.store.current()\n if active is None:\n raise RuntimeError(\"Trace context is not bound. Call create_context() first.\")\n record = TraceLogMessage(\n trace_id=active.record.trace_id,\n step=active.step,\n status=str(status or \"\"),\n message=str(message or \"\"),\n level=level,\n event_time=utc_now(),\n attrs=dict(attrs or {}),\n )\n self._writer.write_message(record)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/tracing/service.py:TraceService", + "span_start": 39, + "span_end": 166, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceManager(TraceService):\n \"\"\"Compatibility alias during the transition from ConfigManager-shaped naming.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/tracing/service.py:TraceManager", + "span_start": 169, + "span_end": 170, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 2, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "TraceService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Как работает TraceService?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "Как работает TraceService?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Как работает TraceService?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "Как работает TraceService?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "TraceService", + "alternatives": [ + "TraceService" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 8, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 89, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 18, + "C0_SOURCE_CHUNKS": 11, + "C4_SEMANTIC_ROLES": 10, + "C2_DEPENDENCY_GRAPH": 41, + "C3_ENTRYPOINTS": 8 + }, + "merge_rank": 15 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_085312/router_rag_plba_code_retrieval_plba-rag-explain-trace-service.md b/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_085312/router_rag_plba_code_retrieval_plba-rag-explain-trace-service.md new file mode 100644 index 0000000..7e7f53f --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_085312/router_rag_plba_code_retrieval_plba-rag-explain-trace-service.md @@ -0,0 +1,34 @@ +# plba-rag-explain-trace-service + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/router_rag_plba_code_retrieval.yaml +- runner: runtime +- mode: router_rag +- passed: True + +## Query +Как работает TraceService? + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 21, + "llm_answer": "", + "answer_mode": "partial", + "path_scope": [], + "symbol_candidates": [ + "TraceService" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_085312/router_rag_plba_code_retrieval_plba-rag-explain-workflow-engine.json b/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_085312/router_rag_plba_code_retrieval_plba-rag-explain-workflow-engine.json new file mode 100644 index 0000000..4c38fb6 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_085312/router_rag_plba_code_retrieval_plba-rag-explain-workflow-engine.json @@ -0,0 +1,2547 @@ +{ + "case_id": "plba-rag-explain-workflow-engine", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/router_rag_plba_code_retrieval.yaml", + "runner": "runtime", + "mode": "router_rag", + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 20, + "llm_answer": "", + "answer_mode": "partial", + "path_scope": [], + "symbol_candidates": [ + "WorkflowEngine" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-rag-explain-workflow-engine", + "text": "Объясни класс WorkflowEngine", + "mode": "router_rag", + "run_started_at": "2026-03-12T08:53:12", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни класс WorkflowEngine", + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "WorkflowEngine", + "alternatives": [ + "WorkflowEngine", + "WorkflowEngineHooks" + ], + "confidence": 0.99 + }, + "rag_count": 20, + "rag_rows": [ + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "class WorkflowEngine\nWorkflowEngine", + "layer": "C1_SYMBOL_CATALOG", + "title": "WorkflowEngine", + "span_start": 10, + "span_end": 86, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "57ec0a9f11c542c78e008684a888397e8d9ef4223671acb2567e631a0cbc70b4", + "qname": "WorkflowEngine", + "kind": "class", + "signature": "WorkflowEngine", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.workflow.engine.workflow_engine", + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/hooks.py", + "content": "class WorkflowEngineHooks\nWorkflowEngineHooks", + "layer": "C1_SYMBOL_CATALOG", + "title": "WorkflowEngineHooks", + "span_start": 6, + "span_end": 14, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "914123ed510540061e116100fc87bba4195595ba696f8bfde2fd77ac6a5cd7e4", + "qname": "WorkflowEngineHooks", + "kind": "class", + "signature": "WorkflowEngineHooks", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.workflow.engine.hooks", + "is_test": false, + "blob_sha": "4b11672b0a9af1ae04bfce9d8e1f96572997d3e65e68108d7c797b88fa5fa47a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowEngine", + "span_start": 10, + "span_end": 86, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "57ec0a9f11c542c78e008684a888397e8d9ef4223671acb2567e631a0cbc70b4", + "symbol_name": "WorkflowEngine", + "qname": "WorkflowEngine", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/hooks.py", + "content": "WorkflowEngineHooks\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowEngineHooks", + "span_start": 6, + "span_end": 14, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "914123ed510540061e116100fc87bba4195595ba696f8bfde2fd77ac6a5cd7e4", + "symbol_name": "WorkflowEngineHooks", + "qname": "WorkflowEngineHooks", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "4b11672b0a9af1ae04bfce9d8e1f96572997d3e65e68108d7c797b88fa5fa47a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/transition_resolver.py", + "content": "TransitionResolver\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "TransitionResolver", + "span_start": 7, + "span_end": 9, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "d1979f0b23d354338debf7771373226833d57c1e7830ce66ca0b82cdf209b958", + "symbol_name": "TransitionResolver", + "qname": "TransitionResolver", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "2c518f4c77fb5dcc2970b88f55a7b121d05959578fb0d196af92ff5193574838", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/queue/in_memory.py", + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)", + "layer": "C4_SEMANTIC_ROLES", + "title": "InMemoryTaskQueue", + "span_start": 9, + "span_end": 38, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 22, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "2da04cb94544a3bcbf0943a95ad4bdd8710bcafaa32a02fd0e4de2178dcf3533", + "symbol_name": "InMemoryTaskQueue", + "qname": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 9, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "58f0cc001ccda0eee4c6bc32ed83bd05eafd6b6644f1e8b4aa9eed3103db73dc", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "ConfigFileLoader\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (8)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ConfigFileLoader", + "span_start": 11, + "span_end": 48, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 23, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "a8474eca8b6e9dc86ae67ed68b16fa5fb639ef08739c053e7b7195489765667f", + "symbol_name": "ConfigFileLoader", + "qname": "ConfigFileLoader", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 8, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine.__init__\n -> WorkflowEngine._transition_resolver\n -> WorkflowEngine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowEngine.__init__:dataflow_slice", + "span_start": 14, + "span_end": 63, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3abf07e5c245e0fe59785ba2d569c2ee56018715fc7f625a044ddaf6201f903d", + "edge_type": "dataflow_slice", + "src_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "src_qname": "WorkflowEngine.__init__", + "dst_symbol_id": "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8", + "dst_ref": "WorkflowEngine.run", + "resolution": "resolved", + "slice_id": "3abf07e5c245e0fe59785ba2d569c2ee56018715fc7f625a044ddaf6201f903d", + "root_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "path_symbols": [ + "WorkflowEngine.__init__", + "WorkflowEngine._transition_resolver", + "WorkflowEngine.run" + ], + "path_symbol_ids": [ + "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine.__init__\n -> WorkflowEngine._hooks\n -> WorkflowEngine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowEngine.__init__:dataflow_slice", + "span_start": 16, + "span_end": 34, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d73db644b69c1eb35afd6eae9d6ac8674e49e30e9bcf9c020f9fdbfe754851b2", + "edge_type": "dataflow_slice", + "src_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "src_qname": "WorkflowEngine.__init__", + "dst_symbol_id": "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8", + "dst_ref": "WorkflowEngine.run", + "resolution": "resolved", + "slice_id": "d73db644b69c1eb35afd6eae9d6ac8674e49e30e9bcf9c020f9fdbfe754851b2", + "root_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "path_symbols": [ + "WorkflowEngine.__init__", + "WorkflowEngine._hooks", + "WorkflowEngine.run" + ], + "path_symbol_ids": [ + "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine.__init__\n -> WorkflowEngine._workflow\n -> WorkflowEngine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowEngine.__init__:dataflow_slice", + "span_start": 12, + "span_end": 29, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "b45ef3c54669b4910a8aed3a565804f275424a24007bc7e3c953389521f80249", + "edge_type": "dataflow_slice", + "src_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "src_qname": "WorkflowEngine.__init__", + "dst_symbol_id": "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8", + "dst_ref": "WorkflowEngine.run", + "resolution": "resolved", + "slice_id": "b45ef3c54669b4910a8aed3a565804f275424a24007bc7e3c953389521f80249", + "root_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "path_symbols": [ + "WorkflowEngine.__init__", + "WorkflowEngine._workflow", + "WorkflowEngine.run" + ], + "path_symbol_ids": [ + "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine.__init__\n -> WorkflowEngine._persistence\n -> WorkflowEngine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowEngine.__init__:dataflow_slice", + "span_start": 13, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "8101338770016324ce05d61daa9935a444c75e6c94a0fae4275d5b50fcbcc70b", + "edge_type": "dataflow_slice", + "src_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "src_qname": "WorkflowEngine.__init__", + "dst_symbol_id": "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8", + "dst_ref": "WorkflowEngine.run", + "resolution": "resolved", + "slice_id": "8101338770016324ce05d61daa9935a444c75e6c94a0fae4275d5b50fcbcc70b", + "root_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "path_symbols": [ + "WorkflowEngine.__init__", + "WorkflowEngine._persistence", + "WorkflowEngine.run" + ], + "path_symbol_ids": [ + "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine.__init__\n -> WorkflowEngine._traces\n -> WorkflowEngine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowEngine.__init__:dataflow_slice", + "span_start": 15, + "span_end": 27, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "5006266616d534d721648391565e2ac0c9e7e9d9f8df00c17fba8989afb533a5", + "edge_type": "dataflow_slice", + "src_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "src_qname": "WorkflowEngine.__init__", + "dst_symbol_id": "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8", + "dst_ref": "WorkflowEngine.run", + "resolution": "resolved", + "slice_id": "5006266616d534d721648391565e2ac0c9e7e9d9f8df00c17fba8989afb533a5", + "root_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "path_symbols": [ + "WorkflowEngine.__init__", + "WorkflowEngine._traces", + "WorkflowEngine.run" + ], + "path_symbol_ids": [ + "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine.__init__\n -> WorkflowEngine._logger\n -> WorkflowEngine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowEngine.__init__:dataflow_slice", + "span_start": 17, + "span_end": 85, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "2f9927abb24794adb056b94bfb5d8538a5cbafb160da2079f52fca97fd694a2b", + "edge_type": "dataflow_slice", + "src_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "src_qname": "WorkflowEngine.__init__", + "dst_symbol_id": "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8", + "dst_ref": "WorkflowEngine.run", + "resolution": "resolved", + "slice_id": "2f9927abb24794adb056b94bfb5d8538a5cbafb160da2079f52fca97fd694a2b", + "root_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "path_symbols": [ + "WorkflowEngine.__init__", + "WorkflowEngine._logger", + "WorkflowEngine.run" + ], + "path_symbol_ids": [ + "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "class WorkflowEngine:\n def __init__(self, workflow, persistence, *, traces, hooks: WorkflowEngineHooks | None = None) -> None:\n self._workflow = workflow\n self._persistence = persistence\n self._transition_resolver = TransitionResolver()\n self._traces = traces\n self._hooks = hooks or WorkflowEngineHooks()\n self._logger = logging.getLogger(__name__)\n\n def run(self, context: WorkflowContext) -> dict[str, object]:\n run_id = self._persistence.start_run(\n self._workflow.definition.name,\n self._workflow.definition.start_at,\n context.snapshot(),\n )\n context.state.setdefault(\"runtime\", {})\n context.state[\"runtime\"][\"workflow_run_id\"] = run_id\n self._traces.step(\"workflow\")\n self._traces.info(\"Workflow started.\", status=\"started\", attrs={\"workflow_run_id\": run_id})\n current_name = self._workflow.definition.start_at\n while current_name is not None:\n node = self._workflow.definition.nodes[current_name]\n context.state[\"runtime\"][\"current_node\"] = current_name\n self._logger.info(\"Workflow run %s: step '%s' started.\", run_id, current_name)\n self._hooks.on_step_started(context, current_name)\n self._persistence.start_step(run_id, current_name, context.snapshot())\n self._traces.step(current_name)\n self._traces.debug(\n f\"Step '{current_name}' started.\",\n status=\"started\",\n attrs={\"workflow_run_id\": run_id, \"node\": current_name},\n )\n try:\n result = node.step.run(context)\n except Exception as error:\n self._persistence.fail_step(run_id, current_name, context.snapshot(), error)\n self._persistence.fail_run(run_id, context.snapshot())\n self._traces.error(\n f\"Step '{current_name}' failed: {error}\",\n status=\"failed\",\n attrs={\"exception_type\": type(error).__name__},\n )\n self._logger.exception(\"Workflow run %s: step '%s' failed.\", run_id, current_name)\n self._hooks.on_step_failed(context, current_name)\n raise\n context.state.update(result.updates)\n self._persistence.complete_step(\n run_id,\n current_name,\n result.status,\n result.transition,\n context.snapshot(),\n )\n next_node = self._transition_resolver.resolve(node, result)\n self._traces.debug(\n f\"Step '{current_name}' completed with transition '{result.transition}'.\",\n status=result.status,\n attrs={\n \"workflow_run_id\": run_id,\n \"from_node\": current_name,\n \"transition\": result.transition,\n \"to_node\": next_node,\n },\n )\n self._logger.info(\n \"Workflow run %s: step '%s' completed with transition '%s'.\",\n run_id,\n current_name,\n result.transition,\n )\n self._hooks.on_step_finished(context, current_name)\n current_name = next_node\n self._persistence.complete_run(run_id, context.snapshot())\n self._traces.step(\"workflow\")\n self._traces.info(\"Workflow completed.\", status=\"completed\", attrs={\"workflow_run_id\": run_id})\n self._logger.info(\"Workflow run %s completed.\", run_id)\n return {\"run_id\": run_id, \"status\": \"completed\", \"context\": context.snapshot()}", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/workflow/engine/workflow_engine.py:WorkflowEngine", + "span_start": 10, + "span_end": 86, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.workflow.engine.workflow_engine", + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": null, + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS", + "C4_SEMANTIC_ROLES" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "partial", + "groundedness": "not_applicable" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "WorkflowEngine" + ], + "keyword_hints": [ + "WorkflowEngine" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "WorkflowEngine", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Объясни класс WorkflowEngine", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "Объясни класс WorkflowEngine", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Объясни класс WorkflowEngine", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "Объясни класс WorkflowEngine", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 2, + "candidates_after_filter": 2 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "WorkflowEngine", + "alternatives": [ + "WorkflowEngine", + "WorkflowEngineHooks" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 2, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 8, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 89, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 17, + "C0_SOURCE_CHUNKS": 10, + "C4_SEMANTIC_ROLES": 10, + "C2_DEPENDENCY_GRAPH": 42, + "C3_ENTRYPOINTS": 7 + }, + "merge_rank": 22, + "prompt_build": 0, + "llm_call": 0 + }, + "prompt": null, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "WorkflowEngine" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 20, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-rag-explain-workflow-engine", + "mode": "router_rag", + "run_started_at": "2026-03-12T08:53:12", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Объясни класс WorkflowEngine", + "normalized_query": "Объясни класс WorkflowEngine" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Объясни класс WorkflowEngine" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни класс WorkflowEngine" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "WorkflowEngine" + ], + "keyword_hints": [ + "WorkflowEngine" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Объясни класс WorkflowEngine" + }, + "output": { + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "WorkflowEngine", + "alternatives": [ + "WorkflowEngine", + "WorkflowEngineHooks" + ], + "confidence": 0.99 + }, + "rag_count": 20, + "rag_rows": [ + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "class WorkflowEngine\nWorkflowEngine", + "layer": "C1_SYMBOL_CATALOG", + "title": "WorkflowEngine", + "span_start": 10, + "span_end": 86, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "57ec0a9f11c542c78e008684a888397e8d9ef4223671acb2567e631a0cbc70b4", + "qname": "WorkflowEngine", + "kind": "class", + "signature": "WorkflowEngine", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.workflow.engine.workflow_engine", + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/hooks.py", + "content": "class WorkflowEngineHooks\nWorkflowEngineHooks", + "layer": "C1_SYMBOL_CATALOG", + "title": "WorkflowEngineHooks", + "span_start": 6, + "span_end": 14, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "914123ed510540061e116100fc87bba4195595ba696f8bfde2fd77ac6a5cd7e4", + "qname": "WorkflowEngineHooks", + "kind": "class", + "signature": "WorkflowEngineHooks", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.workflow.engine.hooks", + "is_test": false, + "blob_sha": "4b11672b0a9af1ae04bfce9d8e1f96572997d3e65e68108d7c797b88fa5fa47a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowEngine", + "span_start": 10, + "span_end": 86, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "57ec0a9f11c542c78e008684a888397e8d9ef4223671acb2567e631a0cbc70b4", + "symbol_name": "WorkflowEngine", + "qname": "WorkflowEngine", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/hooks.py", + "content": "WorkflowEngineHooks\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowEngineHooks", + "span_start": 6, + "span_end": 14, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "914123ed510540061e116100fc87bba4195595ba696f8bfde2fd77ac6a5cd7e4", + "symbol_name": "WorkflowEngineHooks", + "qname": "WorkflowEngineHooks", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "4b11672b0a9af1ae04bfce9d8e1f96572997d3e65e68108d7c797b88fa5fa47a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/transition_resolver.py", + "content": "TransitionResolver\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "TransitionResolver", + "span_start": 7, + "span_end": 9, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "d1979f0b23d354338debf7771373226833d57c1e7830ce66ca0b82cdf209b958", + "symbol_name": "TransitionResolver", + "qname": "TransitionResolver", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "2c518f4c77fb5dcc2970b88f55a7b121d05959578fb0d196af92ff5193574838", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/queue/in_memory.py", + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)", + "layer": "C4_SEMANTIC_ROLES", + "title": "InMemoryTaskQueue", + "span_start": 9, + "span_end": 38, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 22, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "2da04cb94544a3bcbf0943a95ad4bdd8710bcafaa32a02fd0e4de2178dcf3533", + "symbol_name": "InMemoryTaskQueue", + "qname": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 9, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "58f0cc001ccda0eee4c6bc32ed83bd05eafd6b6644f1e8b4aa9eed3103db73dc", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "ConfigFileLoader\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (8)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ConfigFileLoader", + "span_start": 11, + "span_end": 48, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 23, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "a8474eca8b6e9dc86ae67ed68b16fa5fb639ef08739c053e7b7195489765667f", + "symbol_name": "ConfigFileLoader", + "qname": "ConfigFileLoader", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 8, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine.__init__\n -> WorkflowEngine._transition_resolver\n -> WorkflowEngine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowEngine.__init__:dataflow_slice", + "span_start": 14, + "span_end": 63, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3abf07e5c245e0fe59785ba2d569c2ee56018715fc7f625a044ddaf6201f903d", + "edge_type": "dataflow_slice", + "src_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "src_qname": "WorkflowEngine.__init__", + "dst_symbol_id": "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8", + "dst_ref": "WorkflowEngine.run", + "resolution": "resolved", + "slice_id": "3abf07e5c245e0fe59785ba2d569c2ee56018715fc7f625a044ddaf6201f903d", + "root_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "path_symbols": [ + "WorkflowEngine.__init__", + "WorkflowEngine._transition_resolver", + "WorkflowEngine.run" + ], + "path_symbol_ids": [ + "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine.__init__\n -> WorkflowEngine._hooks\n -> WorkflowEngine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowEngine.__init__:dataflow_slice", + "span_start": 16, + "span_end": 34, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d73db644b69c1eb35afd6eae9d6ac8674e49e30e9bcf9c020f9fdbfe754851b2", + "edge_type": "dataflow_slice", + "src_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "src_qname": "WorkflowEngine.__init__", + "dst_symbol_id": "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8", + "dst_ref": "WorkflowEngine.run", + "resolution": "resolved", + "slice_id": "d73db644b69c1eb35afd6eae9d6ac8674e49e30e9bcf9c020f9fdbfe754851b2", + "root_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "path_symbols": [ + "WorkflowEngine.__init__", + "WorkflowEngine._hooks", + "WorkflowEngine.run" + ], + "path_symbol_ids": [ + "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine.__init__\n -> WorkflowEngine._workflow\n -> WorkflowEngine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowEngine.__init__:dataflow_slice", + "span_start": 12, + "span_end": 29, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "b45ef3c54669b4910a8aed3a565804f275424a24007bc7e3c953389521f80249", + "edge_type": "dataflow_slice", + "src_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "src_qname": "WorkflowEngine.__init__", + "dst_symbol_id": "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8", + "dst_ref": "WorkflowEngine.run", + "resolution": "resolved", + "slice_id": "b45ef3c54669b4910a8aed3a565804f275424a24007bc7e3c953389521f80249", + "root_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "path_symbols": [ + "WorkflowEngine.__init__", + "WorkflowEngine._workflow", + "WorkflowEngine.run" + ], + "path_symbol_ids": [ + "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine.__init__\n -> WorkflowEngine._persistence\n -> WorkflowEngine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowEngine.__init__:dataflow_slice", + "span_start": 13, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "8101338770016324ce05d61daa9935a444c75e6c94a0fae4275d5b50fcbcc70b", + "edge_type": "dataflow_slice", + "src_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "src_qname": "WorkflowEngine.__init__", + "dst_symbol_id": "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8", + "dst_ref": "WorkflowEngine.run", + "resolution": "resolved", + "slice_id": "8101338770016324ce05d61daa9935a444c75e6c94a0fae4275d5b50fcbcc70b", + "root_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "path_symbols": [ + "WorkflowEngine.__init__", + "WorkflowEngine._persistence", + "WorkflowEngine.run" + ], + "path_symbol_ids": [ + "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine.__init__\n -> WorkflowEngine._traces\n -> WorkflowEngine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowEngine.__init__:dataflow_slice", + "span_start": 15, + "span_end": 27, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "5006266616d534d721648391565e2ac0c9e7e9d9f8df00c17fba8989afb533a5", + "edge_type": "dataflow_slice", + "src_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "src_qname": "WorkflowEngine.__init__", + "dst_symbol_id": "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8", + "dst_ref": "WorkflowEngine.run", + "resolution": "resolved", + "slice_id": "5006266616d534d721648391565e2ac0c9e7e9d9f8df00c17fba8989afb533a5", + "root_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "path_symbols": [ + "WorkflowEngine.__init__", + "WorkflowEngine._traces", + "WorkflowEngine.run" + ], + "path_symbol_ids": [ + "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine.__init__\n -> WorkflowEngine._logger\n -> WorkflowEngine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowEngine.__init__:dataflow_slice", + "span_start": 17, + "span_end": 85, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "2f9927abb24794adb056b94bfb5d8538a5cbafb160da2079f52fca97fd694a2b", + "edge_type": "dataflow_slice", + "src_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "src_qname": "WorkflowEngine.__init__", + "dst_symbol_id": "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8", + "dst_ref": "WorkflowEngine.run", + "resolution": "resolved", + "slice_id": "2f9927abb24794adb056b94bfb5d8538a5cbafb160da2079f52fca97fd694a2b", + "root_symbol_id": "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "path_symbols": [ + "WorkflowEngine.__init__", + "WorkflowEngine._logger", + "WorkflowEngine.run" + ], + "path_symbol_ids": [ + "41d117301feff3d6ba65af470b97a598ed548912942f094dc11a0706948550bd", + "a12cad0f5b238287e02f6d8d156cc764351d8c83246930487fa09d5ce6f2ace8" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "class WorkflowEngine:\n def __init__(self, workflow, persistence, *, traces, hooks: WorkflowEngineHooks | None = None) -> None:\n self._workflow = workflow\n self._persistence = persistence\n self._transition_resolver = TransitionResolver()\n self._traces = traces\n self._hooks = hooks or WorkflowEngineHooks()\n self._logger = logging.getLogger(__name__)\n\n def run(self, context: WorkflowContext) -> dict[str, object]:\n run_id = self._persistence.start_run(\n self._workflow.definition.name,\n self._workflow.definition.start_at,\n context.snapshot(),\n )\n context.state.setdefault(\"runtime\", {})\n context.state[\"runtime\"][\"workflow_run_id\"] = run_id\n self._traces.step(\"workflow\")\n self._traces.info(\"Workflow started.\", status=\"started\", attrs={\"workflow_run_id\": run_id})\n current_name = self._workflow.definition.start_at\n while current_name is not None:\n node = self._workflow.definition.nodes[current_name]\n context.state[\"runtime\"][\"current_node\"] = current_name\n self._logger.info(\"Workflow run %s: step '%s' started.\", run_id, current_name)\n self._hooks.on_step_started(context, current_name)\n self._persistence.start_step(run_id, current_name, context.snapshot())\n self._traces.step(current_name)\n self._traces.debug(\n f\"Step '{current_name}' started.\",\n status=\"started\",\n attrs={\"workflow_run_id\": run_id, \"node\": current_name},\n )\n try:\n result = node.step.run(context)\n except Exception as error:\n self._persistence.fail_step(run_id, current_name, context.snapshot(), error)\n self._persistence.fail_run(run_id, context.snapshot())\n self._traces.error(\n f\"Step '{current_name}' failed: {error}\",\n status=\"failed\",\n attrs={\"exception_type\": type(error).__name__},\n )\n self._logger.exception(\"Workflow run %s: step '%s' failed.\", run_id, current_name)\n self._hooks.on_step_failed(context, current_name)\n raise\n context.state.update(result.updates)\n self._persistence.complete_step(\n run_id,\n current_name,\n result.status,\n result.transition,\n context.snapshot(),\n )\n next_node = self._transition_resolver.resolve(node, result)\n self._traces.debug(\n f\"Step '{current_name}' completed with transition '{result.transition}'.\",\n status=result.status,\n attrs={\n \"workflow_run_id\": run_id,\n \"from_node\": current_name,\n \"transition\": result.transition,\n \"to_node\": next_node,\n },\n )\n self._logger.info(\n \"Workflow run %s: step '%s' completed with transition '%s'.\",\n run_id,\n current_name,\n result.transition,\n )\n self._hooks.on_step_finished(context, current_name)\n current_name = next_node\n self._persistence.complete_run(run_id, context.snapshot())\n self._traces.step(\"workflow\")\n self._traces.info(\"Workflow completed.\", status=\"completed\", attrs={\"workflow_run_id\": run_id})\n self._logger.info(\"Workflow run %s completed.\", run_id)\n return {\"run_id\": run_id, \"status\": \"completed\", \"context\": context.snapshot()}", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/workflow/engine/workflow_engine.py:WorkflowEngine", + "span_start": 10, + "span_end": 86, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.workflow.engine.workflow_engine", + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "WorkflowEngine", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Объясни класс WorkflowEngine", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "Объясни класс WorkflowEngine", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Объясни класс WorkflowEngine", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "Объясни класс WorkflowEngine", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 2, + "candidates_after_filter": 2 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "WorkflowEngine", + "alternatives": [ + "WorkflowEngine", + "WorkflowEngineHooks" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 2, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 8, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 89, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 17, + "C0_SOURCE_CHUNKS": 10, + "C4_SEMANTIC_ROLES": 10, + "C2_DEPENDENCY_GRAPH": 42, + "C3_ENTRYPOINTS": 7 + }, + "merge_rank": 22 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_085312/router_rag_plba_code_retrieval_plba-rag-explain-workflow-engine.md b/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_085312/router_rag_plba_code_retrieval_plba-rag-explain-workflow-engine.md new file mode 100644 index 0000000..9c7003f --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_085312/router_rag_plba_code_retrieval_plba-rag-explain-workflow-engine.md @@ -0,0 +1,34 @@ +# plba-rag-explain-workflow-engine + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/router_rag_plba_code_retrieval.yaml +- runner: runtime +- mode: router_rag +- passed: True + +## Query +Объясни класс WorkflowEngine + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 20, + "llm_answer": "", + "answer_mode": "partial", + "path_scope": [], + "symbol_candidates": [ + "WorkflowEngine" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_085312/router_rag_plba_code_retrieval_plba-rag-find-entrypoints.json b/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_085312/router_rag_plba_code_retrieval_plba-rag-find-entrypoints.json new file mode 100644 index 0000000..d9546af --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_085312/router_rag_plba_code_retrieval_plba-rag-find-entrypoints.json @@ -0,0 +1,1139 @@ +{ + "case_id": "plba-rag-find-entrypoints", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/router_rag_plba_code_retrieval.yaml", + "runner": "runtime", + "mode": "router_rag", + "actual": { + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 9, + "llm_answer": "", + "answer_mode": "partial", + "path_scope": [], + "symbol_candidates": [], + "layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-rag-find-entrypoints", + "text": "Найди точки входа в коде", + "mode": "router_rag", + "run_started_at": "2026-03-12T08:53:12", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Найди точки входа в коде", + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [], + "confidence": 0.0 + }, + "rag_count": 9, + "rag_rows": [ + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/contracts/result.py", + "content": "class StepResult:\n transition: str = \"success\"\n updates: dict[str, Any] = field(default_factory=dict)\n status: str = \"completed\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/workflow/contracts/result.py:StepResult", + "span_start": 8, + "span_end": 11, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.workflow.contracts.result", + "is_test": false, + "blob_sha": "6e57dbfe22873f097f11228a26cffa415440a43b68a737b220906461cd86c353", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/__init__.py", + "content": "from app_runtime.config.file_loader import ConfigFileLoader\nfrom app_runtime.config.providers import FileConfigProvider\n\n__all__ = [\"ConfigFileLoader\", \"FileConfigProvider\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/config/__init__.py:1-4", + "span_start": 1, + "span_end": 4, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.config.__init__", + "is_test": false, + "blob_sha": "612918029820a2a983330ec92256142b55b9de4bdf3399ece18e2a02dbad9729", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/__init__.py", + "content": "__all__: list[str] = []", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/__init__.py:1-1", + "span_start": 1, + "span_end": 1, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.__init__", + "is_test": false, + "blob_sha": "8eea9df4f6d7b38ca0e39ccc27b04700e3d08dbeec8046d613d22706d19985fa", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "class ConfigFileLoader:\n def __init__(self, path: str | Path) -> None:\n self.path = Path(path)\n self.config: Any = None\n self.last_valid_config: Any = None\n self._last_seen_hash: str | None = None\n\n def read_text(self) -> str:\n return self.path.read_text(encoding=\"utf-8\")\n\n def parse(self, data: str) -> Any:\n suffix = self.path.suffix.lower()\n if suffix in {\".yml\", \".yaml\"}:\n return yaml.safe_load(data)\n return json.loads(data)\n\n def load_sync(self) -> Any:\n data = self.read_text()\n parsed = self.parse(data)\n self.config = parsed\n self.last_valid_config = parsed\n self._last_seen_hash = self._calculate_hash(data)\n return parsed\n\n def load_if_changed(self) -> tuple[bool, Any]:\n data = self.read_text()\n current_hash = self._calculate_hash(data)\n if current_hash == self._last_seen_hash:\n return False, self.config\n parsed = self.parse(data)\n self.config = parsed\n self.last_valid_config = parsed\n self._last_seen_hash = current_hash\n return True, parsed\n\n @staticmethod\n def _calculate_hash(data: str) -> str:\n return hashlib.sha256(data.encode(\"utf-8\")).hexdigest()", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/config/file_loader.py:ConfigFileLoader", + "span_start": 11, + "span_end": 48, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/providers.py", + "content": "class FileConfigProvider(ConfigProvider):\n def __init__(self, path: str | Path) -> None:\n self._loader = ConfigFileLoader(path)\n\n @property\n def loader(self) -> ConfigFileLoader:\n return self._loader\n\n def load(self) -> dict[str, Any]:\n config = self._loader.load_sync()\n if not isinstance(config, dict):\n raise TypeError(\"Config root must be a mapping\")\n return dict(config)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/config/providers.py:FileConfigProvider", + "span_start": 10, + "span_end": 22, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.config.providers", + "is_test": false, + "blob_sha": "8c53ca0122d6df6c5763bca15e99434bb4daebd5a618b8fc927e9ae90b022e64", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlActionSet:\n health: HealthHandler\n start: ActionHandler\n stop: ActionHandler\n status: ActionHandler", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": null, + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C3_ENTRYPOINTS" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "partial", + "groundedness": "not_applicable" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "unknown", + "symbol_candidates": [], + "keyword_hints": [], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C3_ENTRYPOINTS": "exact_path_fetch", + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C3_ENTRYPOINTS": 12, + "C0_SOURCE_CHUNKS": 6 + }, + "filters_by_layer": { + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C3_ENTRYPOINTS", + "query": "Найди точки входа в коде", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 12, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Найди точки входа в коде", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [] + }, + "layers": [ + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 6, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 18, + "retrieval_by_layer": { + "C3_ENTRYPOINTS": 8, + "C0_SOURCE_CHUNKS": 10 + }, + "merge_rank": 0, + "prompt_build": 0, + "llm_call": 0 + }, + "prompt": null, + "router": { + "conversation_mode": "START", + "keyword_hints": [], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 9, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-rag-find-entrypoints", + "mode": "router_rag", + "run_started_at": "2026-03-12T08:53:12", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Найди точки входа в коде", + "normalized_query": "Найди точки входа в коде" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Найди точки входа в коде" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Найди точки входа в коде" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "unknown", + "symbol_candidates": [], + "keyword_hints": [], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Найди точки входа в коде" + }, + "output": { + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [], + "confidence": 0.0 + }, + "rag_count": 9, + "rag_rows": [ + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/contracts/result.py", + "content": "class StepResult:\n transition: str = \"success\"\n updates: dict[str, Any] = field(default_factory=dict)\n status: str = \"completed\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/workflow/contracts/result.py:StepResult", + "span_start": 8, + "span_end": 11, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.workflow.contracts.result", + "is_test": false, + "blob_sha": "6e57dbfe22873f097f11228a26cffa415440a43b68a737b220906461cd86c353", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/__init__.py", + "content": "from app_runtime.config.file_loader import ConfigFileLoader\nfrom app_runtime.config.providers import FileConfigProvider\n\n__all__ = [\"ConfigFileLoader\", \"FileConfigProvider\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/config/__init__.py:1-4", + "span_start": 1, + "span_end": 4, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.config.__init__", + "is_test": false, + "blob_sha": "612918029820a2a983330ec92256142b55b9de4bdf3399ece18e2a02dbad9729", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/__init__.py", + "content": "__all__: list[str] = []", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/__init__.py:1-1", + "span_start": 1, + "span_end": 1, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.__init__", + "is_test": false, + "blob_sha": "8eea9df4f6d7b38ca0e39ccc27b04700e3d08dbeec8046d613d22706d19985fa", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "class ConfigFileLoader:\n def __init__(self, path: str | Path) -> None:\n self.path = Path(path)\n self.config: Any = None\n self.last_valid_config: Any = None\n self._last_seen_hash: str | None = None\n\n def read_text(self) -> str:\n return self.path.read_text(encoding=\"utf-8\")\n\n def parse(self, data: str) -> Any:\n suffix = self.path.suffix.lower()\n if suffix in {\".yml\", \".yaml\"}:\n return yaml.safe_load(data)\n return json.loads(data)\n\n def load_sync(self) -> Any:\n data = self.read_text()\n parsed = self.parse(data)\n self.config = parsed\n self.last_valid_config = parsed\n self._last_seen_hash = self._calculate_hash(data)\n return parsed\n\n def load_if_changed(self) -> tuple[bool, Any]:\n data = self.read_text()\n current_hash = self._calculate_hash(data)\n if current_hash == self._last_seen_hash:\n return False, self.config\n parsed = self.parse(data)\n self.config = parsed\n self.last_valid_config = parsed\n self._last_seen_hash = current_hash\n return True, parsed\n\n @staticmethod\n def _calculate_hash(data: str) -> str:\n return hashlib.sha256(data.encode(\"utf-8\")).hexdigest()", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/config/file_loader.py:ConfigFileLoader", + "span_start": 11, + "span_end": 48, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/providers.py", + "content": "class FileConfigProvider(ConfigProvider):\n def __init__(self, path: str | Path) -> None:\n self._loader = ConfigFileLoader(path)\n\n @property\n def loader(self) -> ConfigFileLoader:\n return self._loader\n\n def load(self) -> dict[str, Any]:\n config = self._loader.load_sync()\n if not isinstance(config, dict):\n raise TypeError(\"Config root must be a mapping\")\n return dict(config)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/config/providers.py:FileConfigProvider", + "span_start": 10, + "span_end": 22, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.config.providers", + "is_test": false, + "blob_sha": "8c53ca0122d6df6c5763bca15e99434bb4daebd5a618b8fc927e9ae90b022e64", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlActionSet:\n health: HealthHandler\n start: ActionHandler\n stop: ActionHandler\n status: ActionHandler", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C3_ENTRYPOINTS": "exact_path_fetch", + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C3_ENTRYPOINTS": 12, + "C0_SOURCE_CHUNKS": 6 + }, + "filters_by_layer": { + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C3_ENTRYPOINTS", + "query": "Найди точки входа в коде", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 12, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Найди точки входа в коде", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [] + }, + "layers": [ + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 3, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 6, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 18, + "retrieval_by_layer": { + "C3_ENTRYPOINTS": 8, + "C0_SOURCE_CHUNKS": 10 + }, + "merge_rank": 0 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_085312/router_rag_plba_code_retrieval_plba-rag-find-entrypoints.md b/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_085312/router_rag_plba_code_retrieval_plba-rag-find-entrypoints.md new file mode 100644 index 0000000..fa2a4bb --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_085312/router_rag_plba_code_retrieval_plba-rag-find-entrypoints.md @@ -0,0 +1,29 @@ +# plba-rag-find-entrypoints + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/router_rag_plba_code_retrieval.yaml +- runner: runtime +- mode: router_rag +- passed: True + +## Query +Найди точки входа в коде + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 9, + "llm_answer": "", + "answer_mode": "partial", + "path_scope": [], + "symbol_candidates": [], + "layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_085312/router_rag_plba_code_retrieval_plba-rag-find-tests-http-control-channel.json b/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_085312/router_rag_plba_code_retrieval_plba-rag-find-tests-http-control-channel.json new file mode 100644 index 0000000..0054a69 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_085312/router_rag_plba_code_retrieval_plba-rag-find-tests-http-control-channel.json @@ -0,0 +1,1738 @@ +{ + "case_id": "plba-rag-find-tests-http-control-channel", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/router_rag_plba_code_retrieval.yaml", + "runner": "runtime", + "mode": "router_rag", + "actual": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 16, + "llm_answer": "", + "answer_mode": "partial", + "path_scope": [], + "symbol_candidates": [ + "HttpControlChannel" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-rag-find-tests-http-control-channel", + "text": "Найди тесты для HttpControlChannel", + "mode": "router_rag", + "run_started_at": "2026-03-12T08:53:12", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Найди тесты для HttpControlChannel", + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "HttpControlChannel" + ], + "confidence": 0.0 + }, + "rag_count": 16, + "rag_rows": [ + { + "path": "tests/test_runtime.py", + "content": "test_http_control_channel_exposes_health_and_actions reads_attr asyncio.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_http_control_channel_exposes_health_and_actions:reads_attr", + "span_start": 339, + "span_end": 339, + "lexical_rank": 4, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "8cc58b96c744ee7cf7d1a8ad7bb92a891a43107869065c004a1a3ce0dd490a6b", + "edge_type": "reads_attr", + "src_symbol_id": "a5f91bbdc86d497cf0b20a6c10caf97bee5148eae96d13c175399533be193291", + "src_qname": "test_http_control_channel_exposes_health_and_actions", + "dst_symbol_id": null, + "dst_ref": "asyncio.run", + "resolution": "partial", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "test_http_control_channel_exposes_health_and_actions calls channel.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_http_control_channel_exposes_health_and_actions:calls", + "span_start": 318, + "span_end": 325, + "lexical_rank": 4, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3f96da44a1e918ac0c2bf7a4a847deced1acc5dfe285d888e8f5d1f6c1716c04", + "edge_type": "calls", + "src_symbol_id": "a5f91bbdc86d497cf0b20a6c10caf97bee5148eae96d13c175399533be193291", + "src_qname": "test_http_control_channel_exposes_health_and_actions", + "dst_symbol_id": null, + "dst_ref": "channel.start", + "resolution": "partial", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "test_http_control_channel_exposes_health_and_actions calls asyncio.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_http_control_channel_exposes_health_and_actions:calls", + "span_start": 339, + "span_end": 339, + "lexical_rank": 4, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "91fb36608973c49de1ebe925be4cfbf215788cbb472a85de8c749572fbc1348e", + "edge_type": "calls", + "src_symbol_id": "a5f91bbdc86d497cf0b20a6c10caf97bee5148eae96d13c175399533be193291", + "src_qname": "test_http_control_channel_exposes_health_and_actions", + "dst_symbol_id": null, + "dst_ref": "asyncio.run", + "resolution": "partial", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "test_http_control_channel_exposes_health_and_actions instantiates HttpControlChannel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_http_control_channel_exposes_health_and_actions:instantiates", + "span_start": 317, + "span_end": 317, + "lexical_rank": 4, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "da9945affedec9dad344f9fede71b834f44c79992678439b144d0a10bcf52efa", + "edge_type": "instantiates", + "src_symbol_id": "a5f91bbdc86d497cf0b20a6c10caf97bee5148eae96d13c175399533be193291", + "src_qname": "test_http_control_channel_exposes_health_and_actions", + "dst_symbol_id": null, + "dst_ref": "HttpControlChannel", + "resolution": "partial", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "test_http_control_channel_exposes_health_and_actions calls scenario", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_http_control_channel_exposes_health_and_actions:calls", + "span_start": 339, + "span_end": 339, + "lexical_rank": 4, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "4820478ea2620cc3f71ba0143219550671279e5e0d642bd7fb2458259a9cf4fd", + "edge_type": "calls", + "src_symbol_id": "a5f91bbdc86d497cf0b20a6c10caf97bee5148eae96d13c175399533be193291", + "src_qname": "test_http_control_channel_exposes_health_and_actions", + "dst_symbol_id": null, + "dst_ref": "scenario", + "resolution": "partial", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "test_http_control_channel_exposes_health_and_actions calls channel._action_response", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_http_control_channel_exposes_health_and_actions:calls", + "span_start": 327, + "span_end": 327, + "lexical_rank": 4, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "1a5f8d1e30343961f5e934d1fd6c5f464d27dbd09ad89b9f3240d78f5cdea464", + "edge_type": "calls", + "src_symbol_id": "a5f91bbdc86d497cf0b20a6c10caf97bee5148eae96d13c175399533be193291", + "src_qname": "test_http_control_channel_exposes_health_and_actions", + "dst_symbol_id": null, + "dst_ref": "channel._action_response", + "resolution": "partial", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _build_runtime(worker: Worker, *, control_timeout: int = 1) -> tuple[RuntimeManager, str]:\n runtime = RuntimeManager()\n channel = HttpControlChannel(host=\"127.0.0.1\", port=0, timeout=control_timeout)\n runtime.control_plane.register_channel(channel)\n runtime.register_module(WorkerModule(worker))\n runtime.start()\n return runtime, f\"http://127.0.0.1:{channel.port}\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_build_runtime", + "span_start": 154, + "span_end": 160, + "lexical_rank": 5, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 6, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def test_actions_start_stop_and_health_when_worker_is_idle() -> None:\n runtime, base_url = _build_runtime(ScenarioWorker(\"idle-worker\", IntervalRoutine(), interval=0.2))\n try:\n stop_status, stop_payload = _http_call_json(base_url, \"/actions/stop\", method=\"POST\")\n assert stop_status == 200\n assert isinstance(stop_payload.get(\"detail\"), dict)\n assert stop_payload[\"detail\"][\"timed_out\"] is False\n assert stop_payload[\"detail\"][\"state\"] == \"stopped\"\n\n health_stopped_status, health_stopped_payload = _http_call_json(base_url, \"/health\")\n assert health_stopped_status == 503\n assert health_stopped_payload[\"state\"] == \"stopped\"\n assert health_stopped_payload[\"status\"] == \"unhealthy\"\n\n start_status, start_payload = _http_call_json(base_url, \"/actions/start\", method=\"POST\")\n assert start_status == 200\n assert isinstance(start_payload.get(\"detail\"), dict)\n assert start_payload[\"detail\"][\"timed_out\"] is False\n assert start_payload[\"detail\"][\"state\"] in {\"idle\", \"busy\"}\n\n health_started_status, health_started_payload = _http_call_json(base_url, \"/health\")\n assert health_started_status == 200\n assert health_started_payload[\"status\"] == \"ok\"\n assert health_started_payload[\"state\"] in {\"idle\", \"busy\"}\n finally:\n runtime.stop()", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:test_actions_start_stop_and_health_when_worker_is_idle", + "span_start": 181, + "span_end": 206, + "lexical_rank": 5, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 8, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class WorkerModule(ApplicationModule):\n def __init__(self, worker: Worker) -> None:\n self._worker = worker\n\n @property\n def name(self) -> str:\n return \"business-tests\"\n\n def register(self, registry: ModuleRegistry) -> None:\n registry.add_worker(self._worker)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:WorkerModule", + "span_start": 113, + "span_end": 122, + "lexical_rank": 5, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 3, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _poll_until_stopped(base_url: str, timeout: float = 2.0) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n _, payload = _http_call_json(base_url, \"/actions/status\")\n if payload.get(\"detail\") == \"stopped\":\n return True\n sleep(0.05)\n return False", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_poll_until_stopped", + "span_start": 144, + "span_end": 151, + "lexical_rank": 5, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 5, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class IntervalRoutine:\n calls: list[float] = field(default_factory=list)\n _lock: Lock = field(default_factory=Lock)\n\n def run(self) -> None:\n with self._lock:\n self.calls.append(monotonic())\n\n def wait_runs(self, count: int, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n with self._lock:\n if len(self.calls) >= count:\n return True\n sleep(0.01)\n return False\n\n def deltas(self) -> list[float]:\n with self._lock:\n return [self.calls[index + 1] - self.calls[index] for index in range(len(self.calls) - 1)]", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:IntervalRoutine", + "span_start": 18, + "span_end": 37, + "lexical_rank": 5, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def test_worker_wakes_up_with_configured_interval() -> None:\n interval = 0.15\n routine = IntervalRoutine()\n worker = ScenarioWorker(\"interval-worker\", routine, interval=interval)\n runtime = RuntimeManager()\n runtime.register_module(WorkerModule(worker))\n\n runtime.start()\n try:\n assert routine.wait_runs(count=3, timeout=2.0) is True\n finally:\n runtime.stop()\n\n deltas = routine.deltas()\n assert len(deltas) >= 2\n assert all(delta >= interval * 0.7 for delta in deltas[:2])", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:test_worker_wakes_up_with_configured_interval", + "span_start": 163, + "span_end": 178, + "lexical_rank": 5, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 7, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class BlockingRoutine:\n def __init__(self, started: Event, release: Event) -> None:\n self._started = started\n self._release = release\n\n def run(self) -> None:\n self._started.set()\n self._release.wait(timeout=5.0)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:BlockingRoutine", + "span_start": 40, + "span_end": 47, + "lexical_rank": 5, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class ScenarioWorker(Worker):\n def __init__(self, name: str, routine: object, *, interval: float = 0.05) -> None:\n self._name = name\n self._routine = routine\n self._interval = interval\n self._thread: Thread | None = None\n self._stop_requested = Event()\n self._in_flight = 0\n self._runs = 0\n self._lock = Lock()\n\n @property\n def name(self) -> str:\n return self._name\n\n @property\n def critical(self) -> bool:\n return True\n\n def start(self) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._stop_requested.clear()\n self._thread = Thread(target=self._loop, name=f\"{self._name}-thread\", daemon=True)\n self._thread.start()\n\n def stop(self, force: bool = False) -> None:\n self._stop_requested.set()\n\n def health(self) -> WorkerHealth:\n return WorkerHealth(name=self.name, status=\"ok\", critical=True, meta={\"runs\": self._runs})\n\n def status(self) -> WorkerStatus:\n thread_alive = self._thread is not None and self._thread.is_alive()\n with self._lock:\n in_flight = self._in_flight\n runs = self._runs\n if not thread_alive:\n state = \"stopped\"\n elif self._stop_requested.is_set():\n state = \"stopping\"\n elif in_flight > 0:\n state = \"busy\"\n else:\n state = \"idle\"\n return WorkerStatus(name=self.name, state=state, in_flight=in_flight, meta={\"runs\": runs})\n\n def _loop(self) -> None:\n while not self._stop_requested.is_set():\n with self._lock:\n self._in_flight += 1\n try:\n self._routine.run()\n with self._lock:\n self._runs += 1\n finally:\n with self._lock:\n self._in_flight -= 1\n if self._stop_requested.is_set():\n return\n sleep(self._interval)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:ScenarioWorker", + "span_start": 50, + "span_end": 110, + "lexical_rank": 5, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 2, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _http_call_json(\n base_url: str,\n path: str,\n *,\n method: str = \"GET\",\n headers: dict[str, str] | None = None,\n) -> tuple[int, dict[str, object]]:\n request = Request(f\"{base_url}{path}\", method=method, headers=headers or {})\n try:\n with urlopen(request, timeout=15.0) as response:\n status = response.status\n body = response.read()\n except HTTPError as error:\n status = error.code\n body = error.read()\n payload = json.loads(body.decode(\"utf-8\"))\n return status, payload", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_http_call_json", + "span_start": 125, + "span_end": 141, + "lexical_rank": 5, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 4, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def test_actions_stop_busy_worker_before_timeout() -> None:\n started = Event()\n release = Event()\n runtime, base_url = _build_runtime(ScenarioWorker(\"busy-worker\", BlockingRoutine(started, release)))\n assert started.wait(timeout=1.0) is True\n\n def release_later() -> None:\n sleep(0.2)\n release.set()\n\n Thread(target=release_later, daemon=True).start()\n try:\n status, payload = _http_call_json(base_url, \"/actions/stop\", method=\"POST\")\n assert status == 200\n assert isinstance(payload.get(\"detail\"), dict)\n assert payload[\"detail\"][\"timed_out\"] is False\n assert payload[\"detail\"][\"state\"] == \"stopped\"\n\n health_status, health_payload = _http_call_json(base_url, \"/health\")\n assert health_status == 503\n assert health_payload[\"status\"] == \"unhealthy\"\n assert health_payload[\"state\"] == \"stopped\"\n finally:\n runtime.stop()", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:test_actions_stop_busy_worker_before_timeout", + "span_start": 209, + "span_end": 232, + "lexical_rank": 5, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 9, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": null, + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C2_DEPENDENCY_GRAPH" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "partial", + "groundedness": "not_applicable" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "HttpControlChannel" + ], + "keyword_hints": [ + "HttpControlChannel" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "test_file_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "test_symbol_patterns": [ + "test_http_control_channel", + "TestHttpControlChannel", + "HttpControlChannel" + ], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C0_SOURCE_CHUNKS": 10 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src", + "tests" + ], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src", + "tests" + ], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "HttpControlChannel", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Найди тесты для HttpControlChannel test_http_control_channel TestHttpControlChannel HttpControlChannel", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Найди тесты для HttpControlChannel test_http_control_channel TestHttpControlChannel HttpControlChannel", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 10, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 0, + "candidates_after_filter": 0 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src", + "tests" + ], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src", + "tests" + ], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 10, + "candidates_after_filter": 10 + } + ], + "fallback": { + "used": true, + "reason": "scope_relaxed_no_hits" + }, + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "HttpControlChannel" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "miss", + "hit_count": 0, + "fail_reason": "scope_relaxed_no_hits" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 10, + "fail_reason": null + } + ] + }, + "constraint_violations": [ + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C1_SYMBOL_CATALOG", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + } + ], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 92, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 33, + "C2_DEPENDENCY_GRAPH": 46, + "C0_SOURCE_CHUNKS": 12 + }, + "merge_rank": 0, + "prompt_build": 0, + "llm_call": 0 + }, + "prompt": null, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "HttpControlChannel" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 16, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-rag-find-tests-http-control-channel", + "mode": "router_rag", + "run_started_at": "2026-03-12T08:53:12", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Найди тесты для HttpControlChannel", + "normalized_query": "Найди тесты для HttpControlChannel" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Найди тесты для HttpControlChannel" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Найди тесты для HttpControlChannel" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "HttpControlChannel" + ], + "keyword_hints": [ + "HttpControlChannel" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "test_file_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "test_symbol_patterns": [ + "test_http_control_channel", + "TestHttpControlChannel", + "HttpControlChannel" + ], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Найди тесты для HttpControlChannel" + }, + "output": { + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "HttpControlChannel" + ], + "confidence": 0.0 + }, + "rag_count": 16, + "rag_rows": [ + { + "path": "tests/test_runtime.py", + "content": "test_http_control_channel_exposes_health_and_actions reads_attr asyncio.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_http_control_channel_exposes_health_and_actions:reads_attr", + "span_start": 339, + "span_end": 339, + "lexical_rank": 4, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "8cc58b96c744ee7cf7d1a8ad7bb92a891a43107869065c004a1a3ce0dd490a6b", + "edge_type": "reads_attr", + "src_symbol_id": "a5f91bbdc86d497cf0b20a6c10caf97bee5148eae96d13c175399533be193291", + "src_qname": "test_http_control_channel_exposes_health_and_actions", + "dst_symbol_id": null, + "dst_ref": "asyncio.run", + "resolution": "partial", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "test_http_control_channel_exposes_health_and_actions calls channel.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_http_control_channel_exposes_health_and_actions:calls", + "span_start": 318, + "span_end": 325, + "lexical_rank": 4, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3f96da44a1e918ac0c2bf7a4a847deced1acc5dfe285d888e8f5d1f6c1716c04", + "edge_type": "calls", + "src_symbol_id": "a5f91bbdc86d497cf0b20a6c10caf97bee5148eae96d13c175399533be193291", + "src_qname": "test_http_control_channel_exposes_health_and_actions", + "dst_symbol_id": null, + "dst_ref": "channel.start", + "resolution": "partial", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "test_http_control_channel_exposes_health_and_actions calls asyncio.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_http_control_channel_exposes_health_and_actions:calls", + "span_start": 339, + "span_end": 339, + "lexical_rank": 4, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "91fb36608973c49de1ebe925be4cfbf215788cbb472a85de8c749572fbc1348e", + "edge_type": "calls", + "src_symbol_id": "a5f91bbdc86d497cf0b20a6c10caf97bee5148eae96d13c175399533be193291", + "src_qname": "test_http_control_channel_exposes_health_and_actions", + "dst_symbol_id": null, + "dst_ref": "asyncio.run", + "resolution": "partial", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "test_http_control_channel_exposes_health_and_actions instantiates HttpControlChannel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_http_control_channel_exposes_health_and_actions:instantiates", + "span_start": 317, + "span_end": 317, + "lexical_rank": 4, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "da9945affedec9dad344f9fede71b834f44c79992678439b144d0a10bcf52efa", + "edge_type": "instantiates", + "src_symbol_id": "a5f91bbdc86d497cf0b20a6c10caf97bee5148eae96d13c175399533be193291", + "src_qname": "test_http_control_channel_exposes_health_and_actions", + "dst_symbol_id": null, + "dst_ref": "HttpControlChannel", + "resolution": "partial", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "test_http_control_channel_exposes_health_and_actions calls scenario", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_http_control_channel_exposes_health_and_actions:calls", + "span_start": 339, + "span_end": 339, + "lexical_rank": 4, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "4820478ea2620cc3f71ba0143219550671279e5e0d642bd7fb2458259a9cf4fd", + "edge_type": "calls", + "src_symbol_id": "a5f91bbdc86d497cf0b20a6c10caf97bee5148eae96d13c175399533be193291", + "src_qname": "test_http_control_channel_exposes_health_and_actions", + "dst_symbol_id": null, + "dst_ref": "scenario", + "resolution": "partial", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "test_http_control_channel_exposes_health_and_actions calls channel._action_response", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_http_control_channel_exposes_health_and_actions:calls", + "span_start": 327, + "span_end": 327, + "lexical_rank": 4, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "1a5f8d1e30343961f5e934d1fd6c5f464d27dbd09ad89b9f3240d78f5cdea464", + "edge_type": "calls", + "src_symbol_id": "a5f91bbdc86d497cf0b20a6c10caf97bee5148eae96d13c175399533be193291", + "src_qname": "test_http_control_channel_exposes_health_and_actions", + "dst_symbol_id": null, + "dst_ref": "channel._action_response", + "resolution": "partial", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _build_runtime(worker: Worker, *, control_timeout: int = 1) -> tuple[RuntimeManager, str]:\n runtime = RuntimeManager()\n channel = HttpControlChannel(host=\"127.0.0.1\", port=0, timeout=control_timeout)\n runtime.control_plane.register_channel(channel)\n runtime.register_module(WorkerModule(worker))\n runtime.start()\n return runtime, f\"http://127.0.0.1:{channel.port}\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_build_runtime", + "span_start": 154, + "span_end": 160, + "lexical_rank": 5, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 6, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def test_actions_start_stop_and_health_when_worker_is_idle() -> None:\n runtime, base_url = _build_runtime(ScenarioWorker(\"idle-worker\", IntervalRoutine(), interval=0.2))\n try:\n stop_status, stop_payload = _http_call_json(base_url, \"/actions/stop\", method=\"POST\")\n assert stop_status == 200\n assert isinstance(stop_payload.get(\"detail\"), dict)\n assert stop_payload[\"detail\"][\"timed_out\"] is False\n assert stop_payload[\"detail\"][\"state\"] == \"stopped\"\n\n health_stopped_status, health_stopped_payload = _http_call_json(base_url, \"/health\")\n assert health_stopped_status == 503\n assert health_stopped_payload[\"state\"] == \"stopped\"\n assert health_stopped_payload[\"status\"] == \"unhealthy\"\n\n start_status, start_payload = _http_call_json(base_url, \"/actions/start\", method=\"POST\")\n assert start_status == 200\n assert isinstance(start_payload.get(\"detail\"), dict)\n assert start_payload[\"detail\"][\"timed_out\"] is False\n assert start_payload[\"detail\"][\"state\"] in {\"idle\", \"busy\"}\n\n health_started_status, health_started_payload = _http_call_json(base_url, \"/health\")\n assert health_started_status == 200\n assert health_started_payload[\"status\"] == \"ok\"\n assert health_started_payload[\"state\"] in {\"idle\", \"busy\"}\n finally:\n runtime.stop()", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:test_actions_start_stop_and_health_when_worker_is_idle", + "span_start": 181, + "span_end": 206, + "lexical_rank": 5, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 8, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class WorkerModule(ApplicationModule):\n def __init__(self, worker: Worker) -> None:\n self._worker = worker\n\n @property\n def name(self) -> str:\n return \"business-tests\"\n\n def register(self, registry: ModuleRegistry) -> None:\n registry.add_worker(self._worker)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:WorkerModule", + "span_start": 113, + "span_end": 122, + "lexical_rank": 5, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 3, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _poll_until_stopped(base_url: str, timeout: float = 2.0) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n _, payload = _http_call_json(base_url, \"/actions/status\")\n if payload.get(\"detail\") == \"stopped\":\n return True\n sleep(0.05)\n return False", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_poll_until_stopped", + "span_start": 144, + "span_end": 151, + "lexical_rank": 5, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 5, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class IntervalRoutine:\n calls: list[float] = field(default_factory=list)\n _lock: Lock = field(default_factory=Lock)\n\n def run(self) -> None:\n with self._lock:\n self.calls.append(monotonic())\n\n def wait_runs(self, count: int, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n with self._lock:\n if len(self.calls) >= count:\n return True\n sleep(0.01)\n return False\n\n def deltas(self) -> list[float]:\n with self._lock:\n return [self.calls[index + 1] - self.calls[index] for index in range(len(self.calls) - 1)]", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:IntervalRoutine", + "span_start": 18, + "span_end": 37, + "lexical_rank": 5, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def test_worker_wakes_up_with_configured_interval() -> None:\n interval = 0.15\n routine = IntervalRoutine()\n worker = ScenarioWorker(\"interval-worker\", routine, interval=interval)\n runtime = RuntimeManager()\n runtime.register_module(WorkerModule(worker))\n\n runtime.start()\n try:\n assert routine.wait_runs(count=3, timeout=2.0) is True\n finally:\n runtime.stop()\n\n deltas = routine.deltas()\n assert len(deltas) >= 2\n assert all(delta >= interval * 0.7 for delta in deltas[:2])", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:test_worker_wakes_up_with_configured_interval", + "span_start": 163, + "span_end": 178, + "lexical_rank": 5, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 7, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class BlockingRoutine:\n def __init__(self, started: Event, release: Event) -> None:\n self._started = started\n self._release = release\n\n def run(self) -> None:\n self._started.set()\n self._release.wait(timeout=5.0)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:BlockingRoutine", + "span_start": 40, + "span_end": 47, + "lexical_rank": 5, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class ScenarioWorker(Worker):\n def __init__(self, name: str, routine: object, *, interval: float = 0.05) -> None:\n self._name = name\n self._routine = routine\n self._interval = interval\n self._thread: Thread | None = None\n self._stop_requested = Event()\n self._in_flight = 0\n self._runs = 0\n self._lock = Lock()\n\n @property\n def name(self) -> str:\n return self._name\n\n @property\n def critical(self) -> bool:\n return True\n\n def start(self) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._stop_requested.clear()\n self._thread = Thread(target=self._loop, name=f\"{self._name}-thread\", daemon=True)\n self._thread.start()\n\n def stop(self, force: bool = False) -> None:\n self._stop_requested.set()\n\n def health(self) -> WorkerHealth:\n return WorkerHealth(name=self.name, status=\"ok\", critical=True, meta={\"runs\": self._runs})\n\n def status(self) -> WorkerStatus:\n thread_alive = self._thread is not None and self._thread.is_alive()\n with self._lock:\n in_flight = self._in_flight\n runs = self._runs\n if not thread_alive:\n state = \"stopped\"\n elif self._stop_requested.is_set():\n state = \"stopping\"\n elif in_flight > 0:\n state = \"busy\"\n else:\n state = \"idle\"\n return WorkerStatus(name=self.name, state=state, in_flight=in_flight, meta={\"runs\": runs})\n\n def _loop(self) -> None:\n while not self._stop_requested.is_set():\n with self._lock:\n self._in_flight += 1\n try:\n self._routine.run()\n with self._lock:\n self._runs += 1\n finally:\n with self._lock:\n self._in_flight -= 1\n if self._stop_requested.is_set():\n return\n sleep(self._interval)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:ScenarioWorker", + "span_start": 50, + "span_end": 110, + "lexical_rank": 5, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 2, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _http_call_json(\n base_url: str,\n path: str,\n *,\n method: str = \"GET\",\n headers: dict[str, str] | None = None,\n) -> tuple[int, dict[str, object]]:\n request = Request(f\"{base_url}{path}\", method=method, headers=headers or {})\n try:\n with urlopen(request, timeout=15.0) as response:\n status = response.status\n body = response.read()\n except HTTPError as error:\n status = error.code\n body = error.read()\n payload = json.loads(body.decode(\"utf-8\"))\n return status, payload", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_http_call_json", + "span_start": 125, + "span_end": 141, + "lexical_rank": 5, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 4, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def test_actions_stop_busy_worker_before_timeout() -> None:\n started = Event()\n release = Event()\n runtime, base_url = _build_runtime(ScenarioWorker(\"busy-worker\", BlockingRoutine(started, release)))\n assert started.wait(timeout=1.0) is True\n\n def release_later() -> None:\n sleep(0.2)\n release.set()\n\n Thread(target=release_later, daemon=True).start()\n try:\n status, payload = _http_call_json(base_url, \"/actions/stop\", method=\"POST\")\n assert status == 200\n assert isinstance(payload.get(\"detail\"), dict)\n assert payload[\"detail\"][\"timed_out\"] is False\n assert payload[\"detail\"][\"state\"] == \"stopped\"\n\n health_status, health_payload = _http_call_json(base_url, \"/health\")\n assert health_status == 503\n assert health_payload[\"status\"] == \"unhealthy\"\n assert health_payload[\"state\"] == \"stopped\"\n finally:\n runtime.stop()", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:test_actions_stop_busy_worker_before_timeout", + "span_start": 209, + "span_end": 232, + "lexical_rank": 5, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 9, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C0_SOURCE_CHUNKS": 10 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src", + "tests" + ], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src", + "tests" + ], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "HttpControlChannel", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Найди тесты для HttpControlChannel test_http_control_channel TestHttpControlChannel HttpControlChannel", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Найди тесты для HttpControlChannel test_http_control_channel TestHttpControlChannel HttpControlChannel", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 10, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 0, + "candidates_after_filter": 0 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src", + "tests" + ], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src", + "tests" + ], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 10, + "candidates_after_filter": 10 + } + ], + "fallback": { + "used": true, + "reason": "scope_relaxed_no_hits" + }, + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "HttpControlChannel" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "miss", + "hit_count": 0, + "fail_reason": "scope_relaxed_no_hits" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 10, + "fail_reason": null + } + ] + }, + "constraint_violations": [ + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C1_SYMBOL_CATALOG", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + } + ], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 92, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 33, + "C2_DEPENDENCY_GRAPH": 46, + "C0_SOURCE_CHUNKS": 12 + }, + "merge_rank": 0 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_085312/router_rag_plba_code_retrieval_plba-rag-find-tests-http-control-channel.md b/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_085312/router_rag_plba_code_retrieval_plba-rag-find-tests-http-control-channel.md new file mode 100644 index 0000000..0d90aff --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_085312/router_rag_plba_code_retrieval_plba-rag-find-tests-http-control-channel.md @@ -0,0 +1,32 @@ +# plba-rag-find-tests-http-control-channel + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/router_rag_plba_code_retrieval.yaml +- runner: runtime +- mode: router_rag +- passed: True + +## Query +Найди тесты для HttpControlChannel + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 16, + "llm_answer": "", + "answer_mode": "partial", + "path_scope": [], + "symbol_candidates": [ + "HttpControlChannel" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_085312/router_rag_plba_code_retrieval_plba-rag-find-tests-runtime-manager.json b/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_085312/router_rag_plba_code_retrieval_plba-rag-find-tests-runtime-manager.json new file mode 100644 index 0000000..8417303 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_085312/router_rag_plba_code_retrieval_plba-rag-find-tests-runtime-manager.json @@ -0,0 +1,1822 @@ +{ + "case_id": "plba-rag-find-tests-runtime-manager", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/router_rag_plba_code_retrieval.yaml", + "runner": "runtime", + "mode": "router_rag", + "actual": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 16, + "llm_answer": "", + "answer_mode": "partial", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-rag-find-tests-runtime-manager", + "text": "Где тесты для RuntimeManager?", + "mode": "router_rag", + "run_started_at": "2026-03-12T08:53:12", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Где тесты для RuntimeManager?", + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "RuntimeManager" + ], + "confidence": 0.0 + }, + "rag_count": 16, + "rag_rows": [ + { + "path": "tests/test_runtime.py", + "content": "test_runtime_runs_worker_routine_and_exposes_status instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_runtime_runs_worker_routine_and_exposes_status:instantiates", + "span_start": 209, + "span_end": 209, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "c397a308e7824ba9fe400a754c7e15e66ea6f058d7f5d3e82bb002bb78b509d2", + "edge_type": "instantiates", + "src_symbol_id": "1c767eb5ee08e84f45b18c8ed7531ec0ed73c63fb1594823569672db7b21e992", + "src_qname": "test_runtime_runs_worker_routine_and_exposes_status", + "dst_symbol_id": "aeadc039653807b0da1ca6e3cc1078ee61cfc510b28e7f9c2ec04c59da43cc8d", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "test_runtime_graceful_stop_waits_until_worker_finishes instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_runtime_graceful_stop_waits_until_worker_finishes:instantiates", + "span_start": 229, + "span_end": 229, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "76b4701262ccaa0a7a41691407c4ebdb2ca74a2415d89f0a38ef0d4f608bda93", + "edge_type": "instantiates", + "src_symbol_id": "1076e788e4a03b10d7bc1313a8ad46caa170c13cc026c6e4de994af1a6ae57bf", + "src_qname": "test_runtime_graceful_stop_waits_until_worker_finishes", + "dst_symbol_id": "aeadc039653807b0da1ca6e3cc1078ee61cfc510b28e7f9c2ec04c59da43cc8d", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "_build_runtime instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "_build_runtime:instantiates", + "span_start": 155, + "span_end": 155, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "7eb254d564944bab6272757ee5ef688862bd321e6941e2495dc942e03b1c9a25", + "edge_type": "instantiates", + "src_symbol_id": "db94031d5245bf82be836a109b4584b43b8e83d37a0f318e03f6c8191896d469", + "src_qname": "_build_runtime", + "dst_symbol_id": "a1572ea8183dc0cd6ddbc74342bbde8c28cecfde37ad40b62feff09f8d103d11", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_worker_wakes_up_with_configured_interval instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_worker_wakes_up_with_configured_interval:instantiates", + "span_start": 167, + "span_end": 167, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "189aafc4de0b79c688668f25f0c87166a127df26bd2215452014713b65ef281a", + "edge_type": "instantiates", + "src_symbol_id": "65f877f78191d65e6a752e41cedc70ebc784c266804a55c1c56440336e1f0d6e", + "src_qname": "test_worker_wakes_up_with_configured_interval", + "dst_symbol_id": "a1572ea8183dc0cd6ddbc74342bbde8c28cecfde37ad40b62feff09f8d103d11", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_actions_stop_busy_worker_after_timeout\n -> BlockingRoutine\n -> BlockingRoutine.__init__\n -> BlockingRoutine._started\n -> BlockingRoutine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_actions_stop_busy_worker_after_timeout:dataflow_slice", + "span_start": 42, + "span_end": 238, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "8e7db3d2a9226f1c1d9942ac6373cfcafa0d2276758ddb8a3d3c455a3d58024d", + "edge_type": "dataflow_slice", + "src_symbol_id": "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "src_qname": "test_actions_stop_busy_worker_after_timeout", + "dst_symbol_id": "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04", + "dst_ref": "BlockingRoutine.run", + "resolution": "resolved", + "slice_id": "8e7db3d2a9226f1c1d9942ac6373cfcafa0d2276758ddb8a3d3c455a3d58024d", + "root_symbol_id": "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "path_symbols": [ + "test_actions_stop_busy_worker_after_timeout", + "BlockingRoutine", + "BlockingRoutine.__init__", + "BlockingRoutine._started", + "BlockingRoutine.run" + ], + "path_symbol_ids": [ + "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "a3349c5bc65e4003a4bbd6a8dbb7a54c337e12d1aed930caa701b12e520f1e67", + "486deeed3043c6db985aef258e96ddc67aa53608e67a83962fbd2471f649ddf1", + "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_actions_stop_busy_worker_before_timeout\n -> BlockingRoutine\n -> BlockingRoutine.__init__\n -> BlockingRoutine._release\n -> BlockingRoutine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_actions_stop_busy_worker_before_timeout:dataflow_slice", + "span_start": 43, + "span_end": 212, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "8bd726155ba387d3579763ee84dfd2f9a90bc917da88f3b2e89416ab5c1254d6", + "edge_type": "dataflow_slice", + "src_symbol_id": "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "src_qname": "test_actions_stop_busy_worker_before_timeout", + "dst_symbol_id": "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04", + "dst_ref": "BlockingRoutine.run", + "resolution": "resolved", + "slice_id": "8bd726155ba387d3579763ee84dfd2f9a90bc917da88f3b2e89416ab5c1254d6", + "root_symbol_id": "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "path_symbols": [ + "test_actions_stop_busy_worker_before_timeout", + "BlockingRoutine", + "BlockingRoutine.__init__", + "BlockingRoutine._release", + "BlockingRoutine.run" + ], + "path_symbol_ids": [ + "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "a3349c5bc65e4003a4bbd6a8dbb7a54c337e12d1aed930caa701b12e520f1e67", + "486deeed3043c6db985aef258e96ddc67aa53608e67a83962fbd2471f649ddf1", + "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "def test_runtime_graceful_stop_waits_until_worker_finishes() -> None:\n started = Event()\n release = Event()\n runtime = RuntimeManager()\n runtime.register_module(BlockingModule(started, release))\n runtime.start()\n assert started.wait(timeout=1.0) is True\n assert runtime.status()[\"runtime\"][\"state\"] == \"busy\"\n\n stop_thread = Thread(target=runtime.stop, kwargs={\"timeout\": 1.0}, daemon=True)\n stop_thread.start()\n sleep(0.1)\n assert stop_thread.is_alive() is True\n\n release.set()\n stop_thread.join(timeout=1.0)\n assert stop_thread.is_alive() is False\n assert runtime.status()[\"runtime\"][\"state\"] == \"stopped\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_runtime.py:test_runtime_graceful_stop_waits_until_worker_finishes", + "span_start": 226, + "span_end": 243, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 8, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "def test_runtime_runs_worker_routine_and_exposes_status(tmp_path) -> None:\n config_path = tmp_path / \"config.yml\"\n config_path.write_text(\n \"\"\"\nplatform:\n workers: 1\nlog:\n version: 1\n disable_existing_loggers: false\n handlers:\n console:\n class: logging.StreamHandler\n root:\n level: INFO\n handlers: [console]\n\"\"\".strip(),\n encoding=\"utf-8\",\n )\n runtime = RuntimeManager()\n runtime.add_config_file(config_path)\n module = ExampleModule()\n runtime.register_module(module)\n\n runtime.start()\n sleep(0.2)\n status = runtime.status()\n runtime.stop()\n\n assert module.routine.processed == [{\"id\": 1}]\n assert status[\"modules\"] == [\"example\"]\n assert status[\"runtime\"][\"state\"] == \"idle\"\n assert status[\"health\"][\"status\"] == \"ok\"\n assert status[\"config\"] == {\"platform\": {\"workers\": 1}, \"log\": status[\"config\"][\"log\"]}", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_runtime.py:test_runtime_runs_worker_routine_and_exposes_status", + "span_start": 191, + "span_end": 223, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 7, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _build_runtime(worker: Worker, *, control_timeout: int = 1) -> tuple[RuntimeManager, str]:\n runtime = RuntimeManager()\n channel = HttpControlChannel(host=\"127.0.0.1\", port=0, timeout=control_timeout)\n runtime.control_plane.register_channel(channel)\n runtime.register_module(WorkerModule(worker))\n runtime.start()\n return runtime, f\"http://127.0.0.1:{channel.port}\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_build_runtime", + "span_start": 154, + "span_end": 160, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 6, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def test_worker_wakes_up_with_configured_interval() -> None:\n interval = 0.15\n routine = IntervalRoutine()\n worker = ScenarioWorker(\"interval-worker\", routine, interval=interval)\n runtime = RuntimeManager()\n runtime.register_module(WorkerModule(worker))\n\n runtime.start()\n try:\n assert routine.wait_runs(count=3, timeout=2.0) is True\n finally:\n runtime.stop()\n\n deltas = routine.deltas()\n assert len(deltas) >= 2\n assert all(delta >= interval * 0.7 for delta in deltas[:2])", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:test_worker_wakes_up_with_configured_interval", + "span_start": 163, + "span_end": 178, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 7, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class BlockingRoutine:\n def __init__(self, started: Event, release: Event) -> None:\n self._started = started\n self._release = release\n\n def run(self) -> None:\n self._started.set()\n self._release.wait(timeout=5.0)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:BlockingRoutine", + "span_start": 40, + "span_end": 47, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class ScenarioWorker(Worker):\n def __init__(self, name: str, routine: object, *, interval: float = 0.05) -> None:\n self._name = name\n self._routine = routine\n self._interval = interval\n self._thread: Thread | None = None\n self._stop_requested = Event()\n self._in_flight = 0\n self._runs = 0\n self._lock = Lock()\n\n @property\n def name(self) -> str:\n return self._name\n\n @property\n def critical(self) -> bool:\n return True\n\n def start(self) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._stop_requested.clear()\n self._thread = Thread(target=self._loop, name=f\"{self._name}-thread\", daemon=True)\n self._thread.start()\n\n def stop(self, force: bool = False) -> None:\n self._stop_requested.set()\n\n def health(self) -> WorkerHealth:\n return WorkerHealth(name=self.name, status=\"ok\", critical=True, meta={\"runs\": self._runs})\n\n def status(self) -> WorkerStatus:\n thread_alive = self._thread is not None and self._thread.is_alive()\n with self._lock:\n in_flight = self._in_flight\n runs = self._runs\n if not thread_alive:\n state = \"stopped\"\n elif self._stop_requested.is_set():\n state = \"stopping\"\n elif in_flight > 0:\n state = \"busy\"\n else:\n state = \"idle\"\n return WorkerStatus(name=self.name, state=state, in_flight=in_flight, meta={\"runs\": runs})\n\n def _loop(self) -> None:\n while not self._stop_requested.is_set():\n with self._lock:\n self._in_flight += 1\n try:\n self._routine.run()\n with self._lock:\n self._runs += 1\n finally:\n with self._lock:\n self._in_flight -= 1\n if self._stop_requested.is_set():\n return\n sleep(self._interval)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:ScenarioWorker", + "span_start": 50, + "span_end": 110, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 2, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class WorkerModule(ApplicationModule):\n def __init__(self, worker: Worker) -> None:\n self._worker = worker\n\n @property\n def name(self) -> str:\n return \"business-tests\"\n\n def register(self, registry: ModuleRegistry) -> None:\n registry.add_worker(self._worker)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:WorkerModule", + "span_start": 113, + "span_end": 122, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 3, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _http_call_json(\n base_url: str,\n path: str,\n *,\n method: str = \"GET\",\n headers: dict[str, str] | None = None,\n) -> tuple[int, dict[str, object]]:\n request = Request(f\"{base_url}{path}\", method=method, headers=headers or {})\n try:\n with urlopen(request, timeout=15.0) as response:\n status = response.status\n body = response.read()\n except HTTPError as error:\n status = error.code\n body = error.read()\n payload = json.loads(body.decode(\"utf-8\"))\n return status, payload", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_http_call_json", + "span_start": 125, + "span_end": 141, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 4, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class IntervalRoutine:\n calls: list[float] = field(default_factory=list)\n _lock: Lock = field(default_factory=Lock)\n\n def run(self) -> None:\n with self._lock:\n self.calls.append(monotonic())\n\n def wait_runs(self, count: int, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n with self._lock:\n if len(self.calls) >= count:\n return True\n sleep(0.01)\n return False\n\n def deltas(self) -> list[float]:\n with self._lock:\n return [self.calls[index + 1] - self.calls[index] for index in range(len(self.calls) - 1)]", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:IntervalRoutine", + "span_start": 18, + "span_end": 37, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _poll_until_stopped(base_url: str, timeout: float = 2.0) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n _, payload = _http_call_json(base_url, \"/actions/status\")\n if payload.get(\"detail\") == \"stopped\":\n return True\n sleep(0.05)\n return False", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_poll_until_stopped", + "span_start": 144, + "span_end": 151, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 5, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": null, + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C2_DEPENDENCY_GRAPH" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "partial", + "groundedness": "not_applicable" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "test_file_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "test_symbol_patterns": [ + "test_runtime_manager", + "TestRuntimeManager", + "RuntimeManager" + ], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C0_SOURCE_CHUNKS": 10 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src", + "tests" + ], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src", + "tests" + ], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Где тесты для RuntimeManager? test_runtime_manager TestRuntimeManager RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Где тесты для RuntimeManager? test_runtime_manager TestRuntimeManager RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 10, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 0, + "candidates_after_filter": 0 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src", + "tests" + ], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src", + "tests" + ], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 10, + "candidates_after_filter": 10 + } + ], + "fallback": { + "used": true, + "reason": "scope_relaxed_no_hits" + }, + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "RuntimeManager" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "miss", + "hit_count": 0, + "fail_reason": "scope_relaxed_no_hits" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 10, + "fail_reason": null + } + ] + }, + "constraint_violations": [ + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C1_SYMBOL_CATALOG", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + } + ], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 91, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 35, + "C2_DEPENDENCY_GRAPH": 43, + "C0_SOURCE_CHUNKS": 12 + }, + "merge_rank": 0, + "prompt_build": 0, + "llm_call": 0 + }, + "prompt": null, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "RuntimeManager" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 16, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-rag-find-tests-runtime-manager", + "mode": "router_rag", + "run_started_at": "2026-03-12T08:53:12", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Где тесты для RuntimeManager?", + "normalized_query": "Где тесты для RuntimeManager?" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Где тесты для RuntimeManager?" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Где тесты для RuntimeManager?" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "test_file_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "test_symbol_patterns": [ + "test_runtime_manager", + "TestRuntimeManager", + "RuntimeManager" + ], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Где тесты для RuntimeManager?" + }, + "output": { + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "RuntimeManager" + ], + "confidence": 0.0 + }, + "rag_count": 16, + "rag_rows": [ + { + "path": "tests/test_runtime.py", + "content": "test_runtime_runs_worker_routine_and_exposes_status instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_runtime_runs_worker_routine_and_exposes_status:instantiates", + "span_start": 209, + "span_end": 209, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "c397a308e7824ba9fe400a754c7e15e66ea6f058d7f5d3e82bb002bb78b509d2", + "edge_type": "instantiates", + "src_symbol_id": "1c767eb5ee08e84f45b18c8ed7531ec0ed73c63fb1594823569672db7b21e992", + "src_qname": "test_runtime_runs_worker_routine_and_exposes_status", + "dst_symbol_id": "aeadc039653807b0da1ca6e3cc1078ee61cfc510b28e7f9c2ec04c59da43cc8d", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "test_runtime_graceful_stop_waits_until_worker_finishes instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_runtime_graceful_stop_waits_until_worker_finishes:instantiates", + "span_start": 229, + "span_end": 229, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "76b4701262ccaa0a7a41691407c4ebdb2ca74a2415d89f0a38ef0d4f608bda93", + "edge_type": "instantiates", + "src_symbol_id": "1076e788e4a03b10d7bc1313a8ad46caa170c13cc026c6e4de994af1a6ae57bf", + "src_qname": "test_runtime_graceful_stop_waits_until_worker_finishes", + "dst_symbol_id": "aeadc039653807b0da1ca6e3cc1078ee61cfc510b28e7f9c2ec04c59da43cc8d", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "_build_runtime instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "_build_runtime:instantiates", + "span_start": 155, + "span_end": 155, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "7eb254d564944bab6272757ee5ef688862bd321e6941e2495dc942e03b1c9a25", + "edge_type": "instantiates", + "src_symbol_id": "db94031d5245bf82be836a109b4584b43b8e83d37a0f318e03f6c8191896d469", + "src_qname": "_build_runtime", + "dst_symbol_id": "a1572ea8183dc0cd6ddbc74342bbde8c28cecfde37ad40b62feff09f8d103d11", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_worker_wakes_up_with_configured_interval instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_worker_wakes_up_with_configured_interval:instantiates", + "span_start": 167, + "span_end": 167, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "189aafc4de0b79c688668f25f0c87166a127df26bd2215452014713b65ef281a", + "edge_type": "instantiates", + "src_symbol_id": "65f877f78191d65e6a752e41cedc70ebc784c266804a55c1c56440336e1f0d6e", + "src_qname": "test_worker_wakes_up_with_configured_interval", + "dst_symbol_id": "a1572ea8183dc0cd6ddbc74342bbde8c28cecfde37ad40b62feff09f8d103d11", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_actions_stop_busy_worker_after_timeout\n -> BlockingRoutine\n -> BlockingRoutine.__init__\n -> BlockingRoutine._started\n -> BlockingRoutine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_actions_stop_busy_worker_after_timeout:dataflow_slice", + "span_start": 42, + "span_end": 238, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "8e7db3d2a9226f1c1d9942ac6373cfcafa0d2276758ddb8a3d3c455a3d58024d", + "edge_type": "dataflow_slice", + "src_symbol_id": "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "src_qname": "test_actions_stop_busy_worker_after_timeout", + "dst_symbol_id": "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04", + "dst_ref": "BlockingRoutine.run", + "resolution": "resolved", + "slice_id": "8e7db3d2a9226f1c1d9942ac6373cfcafa0d2276758ddb8a3d3c455a3d58024d", + "root_symbol_id": "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "path_symbols": [ + "test_actions_stop_busy_worker_after_timeout", + "BlockingRoutine", + "BlockingRoutine.__init__", + "BlockingRoutine._started", + "BlockingRoutine.run" + ], + "path_symbol_ids": [ + "66392d3222421d9ba16eda3554940b16e7d5a6f33aa08c5738d35af2e32f1e4a", + "a3349c5bc65e4003a4bbd6a8dbb7a54c337e12d1aed930caa701b12e520f1e67", + "486deeed3043c6db985aef258e96ddc67aa53608e67a83962fbd2471f649ddf1", + "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "test_actions_stop_busy_worker_before_timeout\n -> BlockingRoutine\n -> BlockingRoutine.__init__\n -> BlockingRoutine._release\n -> BlockingRoutine.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "test_actions_stop_busy_worker_before_timeout:dataflow_slice", + "span_start": 43, + "span_end": 212, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 5, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "8bd726155ba387d3579763ee84dfd2f9a90bc917da88f3b2e89416ab5c1254d6", + "edge_type": "dataflow_slice", + "src_symbol_id": "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "src_qname": "test_actions_stop_busy_worker_before_timeout", + "dst_symbol_id": "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04", + "dst_ref": "BlockingRoutine.run", + "resolution": "resolved", + "slice_id": "8bd726155ba387d3579763ee84dfd2f9a90bc917da88f3b2e89416ab5c1254d6", + "root_symbol_id": "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "path_symbols": [ + "test_actions_stop_busy_worker_before_timeout", + "BlockingRoutine", + "BlockingRoutine.__init__", + "BlockingRoutine._release", + "BlockingRoutine.run" + ], + "path_symbol_ids": [ + "a0bb116ca9d909c93a285667ae033fbd1859b2dad7cf34fcb44816393ef6909c", + "a3349c5bc65e4003a4bbd6a8dbb7a54c337e12d1aed930caa701b12e520f1e67", + "486deeed3043c6db985aef258e96ddc67aa53608e67a83962fbd2471f649ddf1", + "d9841bdbb69706c988ae7ae6adf89928dc4fae45943f74064f5382177034ba04" + ], + "path_edge_types": [ + "instantiates", + "writes_attr", + "reads_attr" + ], + "path_length": 5, + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "def test_runtime_graceful_stop_waits_until_worker_finishes() -> None:\n started = Event()\n release = Event()\n runtime = RuntimeManager()\n runtime.register_module(BlockingModule(started, release))\n runtime.start()\n assert started.wait(timeout=1.0) is True\n assert runtime.status()[\"runtime\"][\"state\"] == \"busy\"\n\n stop_thread = Thread(target=runtime.stop, kwargs={\"timeout\": 1.0}, daemon=True)\n stop_thread.start()\n sleep(0.1)\n assert stop_thread.is_alive() is True\n\n release.set()\n stop_thread.join(timeout=1.0)\n assert stop_thread.is_alive() is False\n assert runtime.status()[\"runtime\"][\"state\"] == \"stopped\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_runtime.py:test_runtime_graceful_stop_waits_until_worker_finishes", + "span_start": 226, + "span_end": 243, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 8, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "def test_runtime_runs_worker_routine_and_exposes_status(tmp_path) -> None:\n config_path = tmp_path / \"config.yml\"\n config_path.write_text(\n \"\"\"\nplatform:\n workers: 1\nlog:\n version: 1\n disable_existing_loggers: false\n handlers:\n console:\n class: logging.StreamHandler\n root:\n level: INFO\n handlers: [console]\n\"\"\".strip(),\n encoding=\"utf-8\",\n )\n runtime = RuntimeManager()\n runtime.add_config_file(config_path)\n module = ExampleModule()\n runtime.register_module(module)\n\n runtime.start()\n sleep(0.2)\n status = runtime.status()\n runtime.stop()\n\n assert module.routine.processed == [{\"id\": 1}]\n assert status[\"modules\"] == [\"example\"]\n assert status[\"runtime\"][\"state\"] == \"idle\"\n assert status[\"health\"][\"status\"] == \"ok\"\n assert status[\"config\"] == {\"platform\": {\"workers\": 1}, \"log\": status[\"config\"][\"log\"]}", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_runtime.py:test_runtime_runs_worker_routine_and_exposes_status", + "span_start": 191, + "span_end": 223, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 7, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _build_runtime(worker: Worker, *, control_timeout: int = 1) -> tuple[RuntimeManager, str]:\n runtime = RuntimeManager()\n channel = HttpControlChannel(host=\"127.0.0.1\", port=0, timeout=control_timeout)\n runtime.control_plane.register_channel(channel)\n runtime.register_module(WorkerModule(worker))\n runtime.start()\n return runtime, f\"http://127.0.0.1:{channel.port}\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_build_runtime", + "span_start": 154, + "span_end": 160, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 6, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def test_worker_wakes_up_with_configured_interval() -> None:\n interval = 0.15\n routine = IntervalRoutine()\n worker = ScenarioWorker(\"interval-worker\", routine, interval=interval)\n runtime = RuntimeManager()\n runtime.register_module(WorkerModule(worker))\n\n runtime.start()\n try:\n assert routine.wait_runs(count=3, timeout=2.0) is True\n finally:\n runtime.stop()\n\n deltas = routine.deltas()\n assert len(deltas) >= 2\n assert all(delta >= interval * 0.7 for delta in deltas[:2])", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:test_worker_wakes_up_with_configured_interval", + "span_start": 163, + "span_end": 178, + "lexical_rank": 6, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 7, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class BlockingRoutine:\n def __init__(self, started: Event, release: Event) -> None:\n self._started = started\n self._release = release\n\n def run(self) -> None:\n self._started.set()\n self._release.wait(timeout=5.0)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:BlockingRoutine", + "span_start": 40, + "span_end": 47, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class ScenarioWorker(Worker):\n def __init__(self, name: str, routine: object, *, interval: float = 0.05) -> None:\n self._name = name\n self._routine = routine\n self._interval = interval\n self._thread: Thread | None = None\n self._stop_requested = Event()\n self._in_flight = 0\n self._runs = 0\n self._lock = Lock()\n\n @property\n def name(self) -> str:\n return self._name\n\n @property\n def critical(self) -> bool:\n return True\n\n def start(self) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._stop_requested.clear()\n self._thread = Thread(target=self._loop, name=f\"{self._name}-thread\", daemon=True)\n self._thread.start()\n\n def stop(self, force: bool = False) -> None:\n self._stop_requested.set()\n\n def health(self) -> WorkerHealth:\n return WorkerHealth(name=self.name, status=\"ok\", critical=True, meta={\"runs\": self._runs})\n\n def status(self) -> WorkerStatus:\n thread_alive = self._thread is not None and self._thread.is_alive()\n with self._lock:\n in_flight = self._in_flight\n runs = self._runs\n if not thread_alive:\n state = \"stopped\"\n elif self._stop_requested.is_set():\n state = \"stopping\"\n elif in_flight > 0:\n state = \"busy\"\n else:\n state = \"idle\"\n return WorkerStatus(name=self.name, state=state, in_flight=in_flight, meta={\"runs\": runs})\n\n def _loop(self) -> None:\n while not self._stop_requested.is_set():\n with self._lock:\n self._in_flight += 1\n try:\n self._routine.run()\n with self._lock:\n self._runs += 1\n finally:\n with self._lock:\n self._in_flight -= 1\n if self._stop_requested.is_set():\n return\n sleep(self._interval)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:ScenarioWorker", + "span_start": 50, + "span_end": 110, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 2, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class WorkerModule(ApplicationModule):\n def __init__(self, worker: Worker) -> None:\n self._worker = worker\n\n @property\n def name(self) -> str:\n return \"business-tests\"\n\n def register(self, registry: ModuleRegistry) -> None:\n registry.add_worker(self._worker)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:WorkerModule", + "span_start": 113, + "span_end": 122, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 3, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _http_call_json(\n base_url: str,\n path: str,\n *,\n method: str = \"GET\",\n headers: dict[str, str] | None = None,\n) -> tuple[int, dict[str, object]]:\n request = Request(f\"{base_url}{path}\", method=method, headers=headers or {})\n try:\n with urlopen(request, timeout=15.0) as response:\n status = response.status\n body = response.read()\n except HTTPError as error:\n status = error.code\n body = error.read()\n payload = json.loads(body.decode(\"utf-8\"))\n return status, payload", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_http_call_json", + "span_start": 125, + "span_end": 141, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 4, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class IntervalRoutine:\n calls: list[float] = field(default_factory=list)\n _lock: Lock = field(default_factory=Lock)\n\n def run(self) -> None:\n with self._lock:\n self.calls.append(monotonic())\n\n def wait_runs(self, count: int, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n with self._lock:\n if len(self.calls) >= count:\n return True\n sleep(0.01)\n return False\n\n def deltas(self) -> list[float]:\n with self._lock:\n return [self.calls[index + 1] - self.calls[index] for index in range(len(self.calls) - 1)]", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:IntervalRoutine", + "span_start": 18, + "span_end": 37, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "def _poll_until_stopped(base_url: str, timeout: float = 2.0) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n _, payload = _http_call_json(base_url, \"/actions/status\")\n if payload.get(\"detail\") == \"stopped\":\n return True\n sleep(0.05)\n return False", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:_poll_until_stopped", + "span_start": 144, + "span_end": 151, + "lexical_rank": 100, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 5, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C0_SOURCE_CHUNKS": 10 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src", + "tests" + ], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src", + "tests" + ], + "include_globs": [ + "src", + "tests" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests" + ] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Где тесты для RuntimeManager? test_runtime_manager TestRuntimeManager RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Где тесты для RuntimeManager? test_runtime_manager TestRuntimeManager RuntimeManager", + "path_scope": [], + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "top_k": 10, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 0, + "candidates_after_filter": 0 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src", + "tests" + ], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src", + "tests" + ], + "normalized_include_globs": [ + "src", + "tests" + ], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [ + "tests" + ], + "filter_stage": "post_rank", + "candidates_before_filter": 10, + "candidates_after_filter": 10 + } + ], + "fallback": { + "used": true, + "reason": "scope_relaxed_no_hits" + }, + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [ + "RuntimeManager" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "miss", + "hit_count": 0, + "fail_reason": "scope_relaxed_no_hits" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 10, + "fail_reason": null + } + ] + }, + "constraint_violations": [ + { + "type": "LAYER_MISSING", + "severity": "warn", + "details": { + "layer": "C1_SYMBOL_CATALOG", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "suggested_fix": "Increase top_k for this layer or relax constraints for retrieval." + } + ], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 91, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 35, + "C2_DEPENDENCY_GRAPH": 43, + "C0_SOURCE_CHUNKS": 12 + }, + "merge_rank": 0 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_085312/router_rag_plba_code_retrieval_plba-rag-find-tests-runtime-manager.md b/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_085312/router_rag_plba_code_retrieval_plba-rag-find-tests-runtime-manager.md new file mode 100644 index 0000000..0e95f34 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_085312/router_rag_plba_code_retrieval_plba-rag-find-tests-runtime-manager.md @@ -0,0 +1,32 @@ +# plba-rag-find-tests-runtime-manager + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/router_rag_plba_code_retrieval.yaml +- runner: runtime +- mode: router_rag +- passed: True + +## Query +Где тесты для RuntimeManager? + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 16, + "llm_answer": "", + "answer_mode": "partial", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_085312/router_rag_plba_code_retrieval_plba-rag-open-http-control-channel-file.json b/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_085312/router_rag_plba_code_retrieval_plba-rag-open-http-control-channel-file.json new file mode 100644 index 0000000..f331fb6 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_085312/router_rag_plba_code_retrieval_plba-rag-open-http-control-channel-file.json @@ -0,0 +1,445 @@ +{ + "case_id": "plba-rag-open-http-control-channel-file", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/router_rag_plba_code_retrieval.yaml", + "runner": "runtime", + "mode": "router_rag", + "actual": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 1, + "llm_answer": "", + "answer_mode": "partial", + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "symbol_candidates": [], + "layers": [ + "C0_SOURCE_CHUNKS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-rag-open-http-control-channel-file", + "text": "Покажи файл src/app_runtime/control/http_channel.py", + "mode": "router_rag", + "run_started_at": "2026-03-12T08:53:12", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Покажи файл src/app_runtime/control/http_channel.py", + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [], + "confidence": 0.0 + }, + "rag_count": 1, + "rag_rows": [ + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel(ControlChannel):\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._timeout = timeout\n self._runner = UvicornThreadRunner(host, port, timeout)\n self._factory = HttpControlAppFactory()\n self._actions: ControlActionSet | None = None\n\n async def start(self, actions: ControlActionSet) -> None:\n self._actions = actions\n app = self._factory.create(self._health_response, self._action_response)\n await self._runner.start(app)\n\n async def stop(self) -> None:\n await self._runner.stop()\n\n @property\n def port(self) -> int:\n return self._runner.port\n\n async def _health_response(self) -> dict[str, object]:\n if self._actions is None:\n return {\"status\": \"unhealthy\", \"detail\": \"control actions are not configured\"}\n return await asyncio.wait_for(self._actions.health(), timeout=float(self._timeout))\n\n async def _action_response(self, action: str, _client_source: str = \"unknown\") -> JSONResponse:\n if self._actions is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"{action} handler is not configured\"}, status_code=404)\n callbacks = {\n \"start\": self._actions.start,\n \"stop\": self._actions.stop,\n \"status\": self._actions.status,\n }\n callback = callbacks.get(action)\n if callback is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"unsupported action: {action}\"}, status_code=404)\n action_timeout = max(float(self._timeout), 10.0) if action in {\"start\", \"stop\"} else float(self._timeout)\n try:\n detail = await asyncio.wait_for(callback(), timeout=action_timeout)\n except asyncio.TimeoutError:\n return JSONResponse(\n content={\"status\": \"accepted\", \"detail\": f\"{action} operation is still in progress\"},\n status_code=202,\n )\n except Exception as exc:\n return JSONResponse(content={\"status\": \"error\", \"detail\": str(exc)}, status_code=500)\n return JSONResponse(content={\"status\": \"ok\", \"detail\": detail or f\"{action} action accepted\"}, status_code=200)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_channel.py:HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": null, + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "partial", + "groundedness": "not_applicable" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "unknown", + "symbol_candidates": [], + "keyword_hints": [], + "path_hints": [ + "src/app_runtime/control/http_channel.py" + ], + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/app_runtime/control/http_channel.py" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": false, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C0_SOURCE_CHUNKS": 200 + }, + "filters_by_layer": { + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "include_globs": [], + "exclude_globs": [], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Покажи файл src/app_runtime/control/http_channel.py", + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "include_globs": [], + "exclude_globs": [], + "prefer_globs": [], + "top_k": 200, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "normalized_include_globs": [], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [] + }, + "layers": [ + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 11, + "retrieval_by_layer": { + "C0_SOURCE_CHUNKS": 11 + }, + "merge_rank": 0, + "prompt_build": 0, + "llm_call": 0 + }, + "prompt": null, + "router": { + "conversation_mode": "START", + "keyword_hints": [], + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ] + }, + "llm": { + "used_evidence_count": 1, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-rag-open-http-control-channel-file", + "mode": "router_rag", + "run_started_at": "2026-03-12T08:53:12", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Покажи файл src/app_runtime/control/http_channel.py", + "normalized_query": "Покажи файл src/app_runtime/control/http_channel.py" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Покажи файл src/app_runtime/control/http_channel.py" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Покажи файл src/app_runtime/control/http_channel.py" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "unknown", + "symbol_candidates": [], + "keyword_hints": [], + "path_hints": [ + "src/app_runtime/control/http_channel.py" + ], + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/app_runtime/control/http_channel.py" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": false, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Покажи файл src/app_runtime/control/http_channel.py" + }, + "output": { + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [], + "confidence": 0.0 + }, + "rag_count": 1, + "rag_rows": [ + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel(ControlChannel):\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._timeout = timeout\n self._runner = UvicornThreadRunner(host, port, timeout)\n self._factory = HttpControlAppFactory()\n self._actions: ControlActionSet | None = None\n\n async def start(self, actions: ControlActionSet) -> None:\n self._actions = actions\n app = self._factory.create(self._health_response, self._action_response)\n await self._runner.start(app)\n\n async def stop(self) -> None:\n await self._runner.stop()\n\n @property\n def port(self) -> int:\n return self._runner.port\n\n async def _health_response(self) -> dict[str, object]:\n if self._actions is None:\n return {\"status\": \"unhealthy\", \"detail\": \"control actions are not configured\"}\n return await asyncio.wait_for(self._actions.health(), timeout=float(self._timeout))\n\n async def _action_response(self, action: str, _client_source: str = \"unknown\") -> JSONResponse:\n if self._actions is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"{action} handler is not configured\"}, status_code=404)\n callbacks = {\n \"start\": self._actions.start,\n \"stop\": self._actions.stop,\n \"status\": self._actions.status,\n }\n callback = callbacks.get(action)\n if callback is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"unsupported action: {action}\"}, status_code=404)\n action_timeout = max(float(self._timeout), 10.0) if action in {\"start\", \"stop\"} else float(self._timeout)\n try:\n detail = await asyncio.wait_for(callback(), timeout=action_timeout)\n except asyncio.TimeoutError:\n return JSONResponse(\n content={\"status\": \"accepted\", \"detail\": f\"{action} operation is still in progress\"},\n status_code=202,\n )\n except Exception as exc:\n return JSONResponse(content={\"status\": \"error\", \"detail\": str(exc)}, status_code=500)\n return JSONResponse(content={\"status\": \"ok\", \"detail\": detail or f\"{action} action accepted\"}, status_code=200)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_channel.py:HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C0_SOURCE_CHUNKS": 200 + }, + "filters_by_layer": { + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "include_globs": [], + "exclude_globs": [], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Покажи файл src/app_runtime/control/http_channel.py", + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "include_globs": [], + "exclude_globs": [], + "prefer_globs": [], + "top_k": 200, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "normalized_include_globs": [], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [] + }, + "layers": [ + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 11, + "retrieval_by_layer": { + "C0_SOURCE_CHUNKS": 11 + }, + "merge_rank": 0 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_085312/router_rag_plba_code_retrieval_plba-rag-open-http-control-channel-file.md b/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_085312/router_rag_plba_code_retrieval_plba-rag-open-http-control-channel-file.md new file mode 100644 index 0000000..ceac477 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_085312/router_rag_plba_code_retrieval_plba-rag-open-http-control-channel-file.md @@ -0,0 +1,30 @@ +# plba-rag-open-http-control-channel-file + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/router_rag_plba_code_retrieval.yaml +- runner: runtime +- mode: router_rag +- passed: True + +## Query +Покажи файл src/app_runtime/control/http_channel.py + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 1, + "llm_answer": "", + "answer_mode": "partial", + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "symbol_candidates": [], + "layers": [ + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_085312/router_rag_plba_code_retrieval_plba-rag-open-runtime-manager-file.json b/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_085312/router_rag_plba_code_retrieval_plba-rag-open-runtime-manager-file.json new file mode 100644 index 0000000..de0ce6e --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_085312/router_rag_plba_code_retrieval_plba-rag-open-runtime-manager-file.json @@ -0,0 +1,445 @@ +{ + "case_id": "plba-rag-open-runtime-manager-file", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/router_rag_plba_code_retrieval.yaml", + "runner": "runtime", + "mode": "router_rag", + "actual": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 1, + "llm_answer": "", + "answer_mode": "partial", + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "symbol_candidates": [], + "layers": [ + "C0_SOURCE_CHUNKS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "plba-rag-open-runtime-manager-file", + "text": "Открой файл src/app_runtime/core/runtime.py", + "mode": "router_rag", + "run_started_at": "2026-03-12T08:53:12", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Открой файл src/app_runtime/core/runtime.py", + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [], + "confidence": 0.0 + }, + "rag_count": 1, + "rag_rows": [ + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": null, + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "partial", + "groundedness": "not_applicable" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "unknown", + "symbol_candidates": [], + "keyword_hints": [], + "path_hints": [ + "src/app_runtime/core/runtime.py" + ], + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/app_runtime/core/runtime.py" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": false, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C0_SOURCE_CHUNKS": 200 + }, + "filters_by_layer": { + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "include_globs": [], + "exclude_globs": [], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Открой файл src/app_runtime/core/runtime.py", + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "include_globs": [], + "exclude_globs": [], + "prefer_globs": [], + "top_k": 200, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "normalized_include_globs": [], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [] + }, + "layers": [ + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 111, + "retrieval_by_layer": { + "C0_SOURCE_CHUNKS": 111 + }, + "merge_rank": 0, + "prompt_build": 0, + "llm_call": 0 + }, + "prompt": null, + "router": { + "conversation_mode": "START", + "keyword_hints": [], + "path_scope": [ + "src/app_runtime/core/runtime.py" + ] + }, + "llm": { + "used_evidence_count": 1, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "plba-rag-open-runtime-manager-file", + "mode": "router_rag", + "run_started_at": "2026-03-12T08:53:12", + "rag_session_id": "1431c0c3-5e6a-41f2-9c58-3d06b9c39749", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Открой файл src/app_runtime/core/runtime.py", + "normalized_query": "Открой файл src/app_runtime/core/runtime.py" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Открой файл src/app_runtime/core/runtime.py" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Открой файл src/app_runtime/core/runtime.py" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "unknown", + "symbol_candidates": [], + "keyword_hints": [], + "path_hints": [ + "src/app_runtime/core/runtime.py" + ], + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/app_runtime/core/runtime.py" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": false, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Открой файл src/app_runtime/core/runtime.py" + }, + "output": { + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [], + "confidence": 0.0 + }, + "rag_count": 1, + "rag_rows": [ + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C0_SOURCE_CHUNKS": 200 + }, + "filters_by_layer": { + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "include_globs": [], + "exclude_globs": [], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "plba", + "workspace_id": "None", + "returned_repo_ids": [ + "plba" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Открой файл src/app_runtime/core/runtime.py", + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "include_globs": [], + "exclude_globs": [], + "prefer_globs": [], + "top_k": 200, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "normalized_include_globs": [], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [] + }, + "layers": [ + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 111, + "retrieval_by_layer": { + "C0_SOURCE_CHUNKS": 111 + }, + "merge_rank": 0 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_085312/router_rag_plba_code_retrieval_plba-rag-open-runtime-manager-file.md b/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_085312/router_rag_plba_code_retrieval_plba-rag-open-runtime-manager-file.md new file mode 100644 index 0000000..fc55328 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_085312/router_rag_plba_code_retrieval_plba-rag-open-runtime-manager-file.md @@ -0,0 +1,30 @@ +# plba-rag-open-runtime-manager-file + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/router_rag_plba_code_retrieval.yaml +- runner: runtime +- mode: router_rag +- passed: True + +## Query +Открой файл src/app_runtime/core/runtime.py + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 1, + "llm_answer": "", + "answer_mode": "partial", + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "symbol_candidates": [], + "layers": [ + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_085312/summary.md b/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_085312/summary.md new file mode 100644 index 0000000..1d5d392 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/plba_router_rag/20260312_085312/summary.md @@ -0,0 +1,17 @@ +# pipeline_setup_v2 summary + +Passed: 11/11 + +| File | Case | Runner | Mode | Intent | Sub-intent | Pass | +|------|------|--------|------|--------|------------|------| +| router_rag_plba_code_retrieval.yaml | plba-rag-open-runtime-manager-file | runtime | router_rag | CODE_QA | OPEN_FILE | ✓ | +| router_rag_plba_code_retrieval.yaml | plba-rag-open-http-control-channel-file | runtime | router_rag | CODE_QA | OPEN_FILE | ✓ | +| router_rag_plba_code_retrieval.yaml | plba-rag-explain-runtime-manager | runtime | router_rag | CODE_QA | EXPLAIN | ✓ | +| router_rag_plba_code_retrieval.yaml | plba-rag-explain-http-control-channel | runtime | router_rag | CODE_QA | EXPLAIN | ✓ | +| router_rag_plba_code_retrieval.yaml | plba-rag-explain-trace-service | runtime | router_rag | CODE_QA | EXPLAIN | ✓ | +| router_rag_plba_code_retrieval.yaml | plba-rag-find-tests-runtime-manager | runtime | router_rag | CODE_QA | FIND_TESTS | ✓ | +| router_rag_plba_code_retrieval.yaml | plba-rag-find-tests-http-control-channel | runtime | router_rag | CODE_QA | FIND_TESTS | ✓ | +| router_rag_plba_code_retrieval.yaml | plba-rag-find-entrypoints | runtime | router_rag | CODE_QA | FIND_ENTRYPOINTS | ✓ | +| router_rag_plba_code_retrieval.yaml | plba-rag-explain-create-runtime | runtime | router_rag | CODE_QA | EXPLAIN | ✓ | +| router_rag_plba_code_retrieval.yaml | plba-rag-explain-control-plane-service | runtime | router_rag | CODE_QA | EXPLAIN | ✓ | +| router_rag_plba_code_retrieval.yaml | plba-rag-explain-workflow-engine | runtime | router_rag | CODE_QA | EXPLAIN | ✓ | \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/router_only_smoke/20260312_082745/full_chain_smoke_full_chain_explain_order_service.json b/tests/pipeline_setup_v2/test_results/router_only_smoke/20260312_082745/full_chain_smoke_full_chain_explain_order_service.json new file mode 100644 index 0000000..315a147 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/router_only_smoke/20260312_082745/full_chain_smoke_full_chain_explain_order_service.json @@ -0,0 +1,2198 @@ +{ + "case_id": "full_chain_explain_order_service", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_smoke.yaml", + "runner": "runtime", + "mode": "full_chain", + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 15, + "llm_answer": "## Архитектура и Поведение `OrderService`\n\n### Описание\n\n`OrderService` является основным компонентом сервиса заказа в приложении. Он отвечает за управление жизненным циклом заказов и взаимодействие с другими сущностями приложения через интерфейс репозитория (`OrderRepository`).\n\n### Ключевые компоненты и их роль\n\n1. **OrderService**\n - **Роль**: Сервисный компонент, который управляет основными операциями заказа.\n - **Ответственность**:\n - Чтение и запись состояния атрибутов заказа.\n - Участие в данных потоков (dataflow slices).\n \n2. **Order**\n - Представляет заказ как объект с состоянием и атрибутами.\n\n3. **OrderRepository**\n - Репозиторий для хранения и управления данными о заказе.\n - Обеспечивает доступ к данным о заказах из базы данных или другого хранилища.\n\n### Поток данных и логика работы\n\n#### Инициализация OrderService\n\nПри создании экземпляра класса `OrderService`, выполняется следующая последовательность действий:\n\n```python\ndef __init__(self):\n self._repo = OrderRepository() # Инициализируем репозиторий заказов\n```\n\nТаким образом, создается экземпляр репозитория заказов, который будет использоваться при выполнении операций над заказами.\n\n#### Основные операции\n\n##### Получение существующего заказа\n\nМетод `get_order` позволяет получить информацию о существующем заказе из репозитория:\n\n```python\ndef get_order(self, order_id):\n return self._repo.find_by_id(order_id) # Вызываем метод репозитория для поиска заказа по идентификатору\n```\n\n##### Создание нового заказа\n\nМетод `create_order` создает новый заказ и сохраняет его в репозитории:\n\n```python\ndef create_order(self, new_order_data):\n order = Order(**new_order_data) # Создаем новый заказ на основе переданных данных\n self._repo.save(order) # Сохраняем заказ в репозитории\n```\n\n### Итоговое описание поведения\n\n`OrderService` предоставляет сервисы для взаимодействия с заказами. При инициализации создается репозиторий заказов, который используется для чтения и записи информации о заказах. Основной функционал включает получение существующих заказов и создание новых заказов. Эти действия реализуются методами `get_order` и `create_order`.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "OrderService" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "full_chain_explain_order_service", + "text": "Как работает OrderService?", + "mode": "full_chain", + "run_started_at": "2026-03-12T08:27:46", + "rag_session_id": "223298d3-6e55-405d-933a-3c14ec38cb1f", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Как работает OrderService?", + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "OrderService", + "alternatives": [ + "OrderService" + ], + "confidence": 0.99 + }, + "rag_count": 15, + "rag_rows": [ + { + "path": "src/order_app/services/order_service.py", + "content": "class OrderService\nOrderService", + "layer": "C1_SYMBOL_CATALOG", + "title": "OrderService", + "span_start": 7, + "span_end": 16, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "42b4f9dfe7edcf06b3ad38543ad457eb56b88834f0d114cb6e18872b7306e62c", + "qname": "OrderService", + "kind": "class", + "signature": "OrderService", + "parent_symbol_id": null, + "package_or_module": "src.order_app.services.order_service", + "is_test": false, + "blob_sha": "ae64718f6a024640edf9c936f72e5954897442af3840f7429a2d514128ce2447", + "repo_id": "code_qa_repo_full_chain", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/order_app/services/order_service.py", + "content": "OrderService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (2)", + "layer": "C4_SEMANTIC_ROLES", + "title": "OrderService", + "span_start": 7, + "span_end": 16, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 71, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "42b4f9dfe7edcf06b3ad38543ad457eb56b88834f0d114cb6e18872b7306e62c", + "symbol_name": "OrderService", + "qname": "OrderService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 2, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "ae64718f6a024640edf9c936f72e5954897442af3840f7429a2d514128ce2447", + "repo_id": "code_qa_repo_full_chain", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/order_app/domain/order.py", + "content": "Order\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes", + "layer": "C4_SEMANTIC_ROLES", + "title": "Order", + "span_start": 6, + "span_end": 11, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 31, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b60768ee227c0dc0caca658c2eafcbad554f462e363734f5c4f597dd4d413f5c", + "symbol_name": "Order", + "qname": "Order", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f2a88a24ade1930ed3e1bedf66ea7e9ef825f10fe4ee830a233fb7911ef32626", + "repo_id": "code_qa_repo_full_chain", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/order_app/repositories/order_repository.py", + "content": "OrderRepository\nrole: repository\n\nResponsibilities:\n- name suffix suggests repository", + "layer": "C4_SEMANTIC_ROLES", + "title": "OrderRepository", + "span_start": 6, + "span_end": 14, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 36, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "4ff9dd82d0e928179af4cc55bcab5b1082be515832a6c92978b54779539c4a48", + "symbol_name": "OrderRepository", + "qname": "OrderRepository", + "role": "repository", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "a9a07d097b3a075dc55ede70766180dff42f2165ac73c791ad024f46db27b9f2", + "repo_id": "code_qa_repo_full_chain", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/order_app/services/order_service.py", + "content": "OrderService.__init__\n -> OrderService._repo\n -> OrderService.get_order", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "OrderService.__init__:dataflow_slice", + "span_start": 9, + "span_end": 16, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "9f06b4fc5cc95467d5dc324689b15228600bc31ee0a53dae49f9aab490ec4ee3", + "edge_type": "dataflow_slice", + "src_symbol_id": "0ea1a03958593fe152e67e8c49837b3a7a69a6d0a65fa04e97ad7a2209655b4e", + "src_qname": "OrderService.__init__", + "dst_symbol_id": "2b0346b72716cf0289a80089ca36ae37ec9c0ae387850f5ca4b5e79d2f6e500e", + "dst_ref": "OrderService.get_order", + "resolution": "resolved", + "slice_id": "9f06b4fc5cc95467d5dc324689b15228600bc31ee0a53dae49f9aab490ec4ee3", + "root_symbol_id": "0ea1a03958593fe152e67e8c49837b3a7a69a6d0a65fa04e97ad7a2209655b4e", + "path_symbols": [ + "OrderService.__init__", + "OrderService._repo", + "OrderService.get_order" + ], + "path_symbol_ids": [ + "0ea1a03958593fe152e67e8c49837b3a7a69a6d0a65fa04e97ad7a2209655b4e", + "2b0346b72716cf0289a80089ca36ae37ec9c0ae387850f5ca4b5e79d2f6e500e" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "ae64718f6a024640edf9c936f72e5954897442af3840f7429a2d514128ce2447", + "repo_id": "code_qa_repo_full_chain", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/order_app/services/order_service.py", + "content": "OrderService.__init__\n -> OrderService._repo\n -> OrderService.create_order", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "OrderService.__init__:dataflow_slice", + "span_start": 9, + "span_end": 13, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "7f1d6f7110575a74f1a7153db3a16f80ee81e0c9d56aee502dbe58cf6017e0c8", + "edge_type": "dataflow_slice", + "src_symbol_id": "0ea1a03958593fe152e67e8c49837b3a7a69a6d0a65fa04e97ad7a2209655b4e", + "src_qname": "OrderService.__init__", + "dst_symbol_id": "830ecc3aea935f4787cde49b096954d26c88d3b0a050003c7b1e77287d18ed49", + "dst_ref": "OrderService.create_order", + "resolution": "resolved", + "slice_id": "7f1d6f7110575a74f1a7153db3a16f80ee81e0c9d56aee502dbe58cf6017e0c8", + "root_symbol_id": "0ea1a03958593fe152e67e8c49837b3a7a69a6d0a65fa04e97ad7a2209655b4e", + "path_symbols": [ + "OrderService.__init__", + "OrderService._repo", + "OrderService.create_order" + ], + "path_symbol_ids": [ + "0ea1a03958593fe152e67e8c49837b3a7a69a6d0a65fa04e97ad7a2209655b4e", + "830ecc3aea935f4787cde49b096954d26c88d3b0a050003c7b1e77287d18ed49" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "ae64718f6a024640edf9c936f72e5954897442af3840f7429a2d514128ce2447", + "repo_id": "code_qa_repo_full_chain", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/order_app/services/order_service.py", + "content": "OrderService.create_order reads_attr self._repo.save", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "OrderService.create_order:reads_attr", + "span_start": 13, + "span_end": 13, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "f1d9cdc1eab33373c59ca0937d86a02dcd46ae18d8f9ecd8bfa016fee792814c", + "edge_type": "reads_attr", + "src_symbol_id": "830ecc3aea935f4787cde49b096954d26c88d3b0a050003c7b1e77287d18ed49", + "src_qname": "OrderService.create_order", + "dst_symbol_id": null, + "dst_ref": "self._repo.save", + "resolution": "partial", + "is_test": false, + "blob_sha": "ae64718f6a024640edf9c936f72e5954897442af3840f7429a2d514128ce2447", + "repo_id": "code_qa_repo_full_chain", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/order_app/services/order_service.py", + "content": "OrderService.__init__ writes_attr OrderService._repo", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "OrderService.__init__:writes_attr", + "span_start": 9, + "span_end": 9, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "ea0ac983d364893b1215f560c86734bab4962cad622ac417bd3ecf205626b664", + "edge_type": "writes_attr", + "src_symbol_id": "0ea1a03958593fe152e67e8c49837b3a7a69a6d0a65fa04e97ad7a2209655b4e", + "src_qname": "OrderService.__init__", + "dst_symbol_id": null, + "dst_ref": "OrderService._repo", + "resolution": "partial", + "is_test": false, + "blob_sha": "ae64718f6a024640edf9c936f72e5954897442af3840f7429a2d514128ce2447", + "repo_id": "code_qa_repo_full_chain", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/order_app/services/order_service.py", + "content": "OrderService.create_order calls self._repo.save", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "OrderService.create_order:calls", + "span_start": 13, + "span_end": 13, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "9726557100771150a85f999afcf652ab89ca7d79db13143ebf989fb90de7b24a", + "edge_type": "calls", + "src_symbol_id": "830ecc3aea935f4787cde49b096954d26c88d3b0a050003c7b1e77287d18ed49", + "src_qname": "OrderService.create_order", + "dst_symbol_id": null, + "dst_ref": "self._repo.save", + "resolution": "partial", + "is_test": false, + "blob_sha": "ae64718f6a024640edf9c936f72e5954897442af3840f7429a2d514128ce2447", + "repo_id": "code_qa_repo_full_chain", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/order_app/services/order_service.py", + "content": "OrderService.create_order reads_attr OrderService._repo", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "OrderService.create_order:reads_attr", + "span_start": 13, + "span_end": 13, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3f0e571901e31de616f7e560e20cc7cdd85f7350060bb59e6dfc56d431197a0e", + "edge_type": "reads_attr", + "src_symbol_id": "830ecc3aea935f4787cde49b096954d26c88d3b0a050003c7b1e77287d18ed49", + "src_qname": "OrderService.create_order", + "dst_symbol_id": null, + "dst_ref": "OrderService._repo", + "resolution": "partial", + "is_test": false, + "blob_sha": "ae64718f6a024640edf9c936f72e5954897442af3840f7429a2d514128ce2447", + "repo_id": "code_qa_repo_full_chain", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/order_app/api/orders.py", + "content": "create_app.get_order\n -> jsonify", + "layer": "C3_ENTRYPOINTS", + "title": "create_app.get_order:execution_trace", + "span_start": 3, + "span_end": 28, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 2, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "edge_id": "a1a3ed8655ca7992651e6a480d2a9b8b1a6081ed4fafc6b218a6b9db03d3f829", + "edge_type": "execution_trace", + "src_symbol_id": "087d884b60e3cd267f285f861c866b84768a56e07e693e71c460a67aa099eb65", + "src_qname": "create_app.get_order", + "dst_symbol_id": "66d26c57dd7a75745acf1cd3e825f74cc312bafc7fc90619b1a6d25fcde57efd", + "dst_ref": "jsonify", + "resolution": "resolved", + "trace_id": "a1a3ed8655ca7992651e6a480d2a9b8b1a6081ed4fafc6b218a6b9db03d3f829", + "entry_id": "0c15b2acb96e575fc73553b943025314dd58c6f6dcb969b698e6a704a1c0e69d", + "entry_symbol_id": "087d884b60e3cd267f285f861c866b84768a56e07e693e71c460a67aa099eb65", + "path_symbols": [ + "create_app.get_order", + "jsonify" + ], + "path_symbol_ids": [ + "087d884b60e3cd267f285f861c866b84768a56e07e693e71c460a67aa099eb65", + "66d26c57dd7a75745acf1cd3e825f74cc312bafc7fc90619b1a6d25fcde57efd" + ], + "path_length": 2, + "is_test": false, + "blob_sha": "02fcc02cabba2c3659fb06047892e602e773619ea0be8c96d048701035b950a7", + "repo_id": "code_qa_repo_full_chain", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/order_app/api/orders.py", + "content": "create_app.create_order\n -> jsonify", + "layer": "C3_ENTRYPOINTS", + "title": "create_app.create_order:execution_trace", + "span_start": 3, + "span_end": 21, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 2, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "edge_id": "95a9ec7cfc456854d50b78db55737a140085fe398414f9166494cb4eddfa6ef5", + "edge_type": "execution_trace", + "src_symbol_id": "9b7d3951f6099cb9c6eca7c8fce1caf659b82ef5f67e6dc8e26c6277af011473", + "src_qname": "create_app.create_order", + "dst_symbol_id": "66d26c57dd7a75745acf1cd3e825f74cc312bafc7fc90619b1a6d25fcde57efd", + "dst_ref": "jsonify", + "resolution": "resolved", + "trace_id": "95a9ec7cfc456854d50b78db55737a140085fe398414f9166494cb4eddfa6ef5", + "entry_id": "0212a881f45888e5b6467d0731b8d5dd04500b5f0679dcff450e5891ea14e20f", + "entry_symbol_id": "9b7d3951f6099cb9c6eca7c8fce1caf659b82ef5f67e6dc8e26c6277af011473", + "path_symbols": [ + "create_app.create_order", + "jsonify" + ], + "path_symbol_ids": [ + "9b7d3951f6099cb9c6eca7c8fce1caf659b82ef5f67e6dc8e26c6277af011473", + "66d26c57dd7a75745acf1cd3e825f74cc312bafc7fc90619b1a6d25fcde57efd" + ], + "path_length": 2, + "is_test": false, + "blob_sha": "02fcc02cabba2c3659fb06047892e602e773619ea0be8c96d048701035b950a7", + "repo_id": "code_qa_repo_full_chain", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/order_app/api/orders.py", + "content": "fastapi http app.route", + "layer": "C3_ENTRYPOINTS", + "title": "app.route", + "span_start": 15, + "span_end": 21, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "0212a881f45888e5b6467d0731b8d5dd04500b5f0679dcff450e5891ea14e20f", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.route", + "handler_symbol_id": "9b7d3951f6099cb9c6eca7c8fce1caf659b82ef5f67e6dc8e26c6277af011473", + "is_test": false, + "lang_payload": { + "methods": [] + }, + "artifact_type": null, + "blob_sha": "02fcc02cabba2c3659fb06047892e602e773619ea0be8c96d048701035b950a7", + "repo_id": "code_qa_repo_full_chain", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/order_app/api/orders.py", + "content": "fastapi http app.route", + "layer": "C3_ENTRYPOINTS", + "title": "app.route", + "span_start": 24, + "span_end": 28, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "864ea5b326fb62dc34d91b9968f4e3f85e457b0a586ec8c30bf36a5893373d52", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.route", + "handler_symbol_id": "087d884b60e3cd267f285f861c866b84768a56e07e693e71c460a67aa099eb65", + "is_test": false, + "lang_payload": { + "methods": [] + }, + "artifact_type": null, + "blob_sha": "02fcc02cabba2c3659fb06047892e602e773619ea0be8c96d048701035b950a7", + "repo_id": "code_qa_repo_full_chain", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/order_app/services/order_service.py", + "content": "class OrderService:\n def __init__(self, repository: OrderRepository) -> None:\n self._repo = repository\n\n def create_order(self, product_id: str | None = None, quantity: int = 1) -> Order:\n order = Order(product_id=product_id or \"\", quantity=quantity)\n return self._repo.save(order)\n\n def get_order(self, order_id: str) -> Order | None:\n return self._repo.find_by_id(order_id)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/order_app/services/order_service.py:OrderService", + "span_start": 7, + "span_end": 16, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.order_app.services.order_service", + "is_test": false, + "blob_sha": "ae64718f6a024640edf9c936f72e5954897442af3840f7429a2d514128ce2447", + "repo_id": "code_qa_repo_full_chain", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": "## Архитектура и Поведение `OrderService`\n\n### Описание\n\n`OrderService` является основным компонентом сервиса заказа в приложении. Он отвечает за управление жизненным циклом заказов и взаимодействие с другими сущностями приложения через интерфейс репозитория (`OrderRepository`).\n\n### Ключевые компоненты и их роль\n\n1. **OrderService**\n - **Роль**: Сервисный компонент, который управляет основными операциями заказа.\n - **Ответственность**:\n - Чтение и запись состояния атрибутов заказа.\n - Участие в данных потоков (dataflow slices).\n \n2. **Order**\n - Представляет заказ как объект с состоянием и атрибутами.\n\n3. **OrderRepository**\n - Репозиторий для хранения и управления данными о заказе.\n - Обеспечивает доступ к данным о заказах из базы данных или другого хранилища.\n\n### Поток данных и логика работы\n\n#### Инициализация OrderService\n\nПри создании экземпляра класса `OrderService`, выполняется следующая последовательность действий:\n\n```python\ndef __init__(self):\n self._repo = OrderRepository() # Инициализируем репозиторий заказов\n```\n\nТаким образом, создается экземпляр репозитория заказов, который будет использоваться при выполнении операций над заказами.\n\n#### Основные операции\n\n##### Получение существующего заказа\n\nМетод `get_order` позволяет получить информацию о существующем заказе из репозитория:\n\n```python\ndef get_order(self, order_id):\n return self._repo.find_by_id(order_id) # Вызываем метод репозитория для поиска заказа по идентификатору\n```\n\n##### Создание нового заказа\n\nМетод `create_order` создает новый заказ и сохраняет его в репозитории:\n\n```python\ndef create_order(self, new_order_data):\n order = Order(**new_order_data) # Создаем новый заказ на основе переданных данных\n self._repo.save(order) # Сохраняем заказ в репозитории\n```\n\n### Итоговое описание поведения\n\n`OrderService` предоставляет сервисы для взаимодействия с заказами. При инициализации создается репозиторий заказов, который используется для чтения и записи информации о заказах. Основной функционал включает получение существующих заказов и создание новых заказов. Эти действия реализуются методами `get_order` и `create_order`.", + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS", + "C4_SEMANTIC_ROLES" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "answered", + "groundedness": "grounded" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "OrderService" + ], + "keyword_hints": [ + "OrderService" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "code_qa_repo_full_chain", + "workspace_id": "None", + "returned_repo_ids": [ + "code_qa_repo_full_chain" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "OrderService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Как работает OrderService?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "Как работает OrderService?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Как работает OrderService?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "Как работает OrderService?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "OrderService", + "alternatives": [ + "OrderService" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 3, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 4, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 1, + "symbol_resolution": 0, + "retrieval_total": 55, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 10, + "C0_SOURCE_CHUNKS": 9, + "C4_SEMANTIC_ROLES": 9, + "C2_DEPENDENCY_GRAPH": 10, + "C3_ENTRYPOINTS": 7 + }, + "merge_rank": 13, + "prompt_build": 0, + "llm_call": 5268 + }, + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 304, + "evidence_rows": 15, + "evidence_chars": 1228 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 3, + "unique_paths": 3 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 1 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 4, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_v1", + "system_prompt_version": "v1" + }, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "OrderService" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 15, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "full_chain_explain_order_service", + "mode": "full_chain", + "run_started_at": "2026-03-12T08:27:46", + "rag_session_id": "223298d3-6e55-405d-933a-3c14ec38cb1f", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Как работает OrderService?", + "normalized_query": "Как работает OrderService?" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Как работает OrderService?" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Как работает OrderService?" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "OrderService" + ], + "keyword_hints": [ + "OrderService" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 1 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Как работает OrderService?" + }, + "output": { + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "OrderService", + "alternatives": [ + "OrderService" + ], + "confidence": 0.99 + }, + "rag_count": 15, + "rag_rows": [ + { + "path": "src/order_app/services/order_service.py", + "content": "class OrderService\nOrderService", + "layer": "C1_SYMBOL_CATALOG", + "title": "OrderService", + "span_start": 7, + "span_end": 16, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "42b4f9dfe7edcf06b3ad38543ad457eb56b88834f0d114cb6e18872b7306e62c", + "qname": "OrderService", + "kind": "class", + "signature": "OrderService", + "parent_symbol_id": null, + "package_or_module": "src.order_app.services.order_service", + "is_test": false, + "blob_sha": "ae64718f6a024640edf9c936f72e5954897442af3840f7429a2d514128ce2447", + "repo_id": "code_qa_repo_full_chain", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/order_app/services/order_service.py", + "content": "OrderService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (2)", + "layer": "C4_SEMANTIC_ROLES", + "title": "OrderService", + "span_start": 7, + "span_end": 16, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 71, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "42b4f9dfe7edcf06b3ad38543ad457eb56b88834f0d114cb6e18872b7306e62c", + "symbol_name": "OrderService", + "qname": "OrderService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 2, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "ae64718f6a024640edf9c936f72e5954897442af3840f7429a2d514128ce2447", + "repo_id": "code_qa_repo_full_chain", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/order_app/domain/order.py", + "content": "Order\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes", + "layer": "C4_SEMANTIC_ROLES", + "title": "Order", + "span_start": 6, + "span_end": 11, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 31, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b60768ee227c0dc0caca658c2eafcbad554f462e363734f5c4f597dd4d413f5c", + "symbol_name": "Order", + "qname": "Order", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f2a88a24ade1930ed3e1bedf66ea7e9ef825f10fe4ee830a233fb7911ef32626", + "repo_id": "code_qa_repo_full_chain", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/order_app/repositories/order_repository.py", + "content": "OrderRepository\nrole: repository\n\nResponsibilities:\n- name suffix suggests repository", + "layer": "C4_SEMANTIC_ROLES", + "title": "OrderRepository", + "span_start": 6, + "span_end": 14, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 36, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "4ff9dd82d0e928179af4cc55bcab5b1082be515832a6c92978b54779539c4a48", + "symbol_name": "OrderRepository", + "qname": "OrderRepository", + "role": "repository", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "a9a07d097b3a075dc55ede70766180dff42f2165ac73c791ad024f46db27b9f2", + "repo_id": "code_qa_repo_full_chain", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/order_app/services/order_service.py", + "content": "OrderService.__init__\n -> OrderService._repo\n -> OrderService.get_order", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "OrderService.__init__:dataflow_slice", + "span_start": 9, + "span_end": 16, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "9f06b4fc5cc95467d5dc324689b15228600bc31ee0a53dae49f9aab490ec4ee3", + "edge_type": "dataflow_slice", + "src_symbol_id": "0ea1a03958593fe152e67e8c49837b3a7a69a6d0a65fa04e97ad7a2209655b4e", + "src_qname": "OrderService.__init__", + "dst_symbol_id": "2b0346b72716cf0289a80089ca36ae37ec9c0ae387850f5ca4b5e79d2f6e500e", + "dst_ref": "OrderService.get_order", + "resolution": "resolved", + "slice_id": "9f06b4fc5cc95467d5dc324689b15228600bc31ee0a53dae49f9aab490ec4ee3", + "root_symbol_id": "0ea1a03958593fe152e67e8c49837b3a7a69a6d0a65fa04e97ad7a2209655b4e", + "path_symbols": [ + "OrderService.__init__", + "OrderService._repo", + "OrderService.get_order" + ], + "path_symbol_ids": [ + "0ea1a03958593fe152e67e8c49837b3a7a69a6d0a65fa04e97ad7a2209655b4e", + "2b0346b72716cf0289a80089ca36ae37ec9c0ae387850f5ca4b5e79d2f6e500e" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "ae64718f6a024640edf9c936f72e5954897442af3840f7429a2d514128ce2447", + "repo_id": "code_qa_repo_full_chain", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/order_app/services/order_service.py", + "content": "OrderService.__init__\n -> OrderService._repo\n -> OrderService.create_order", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "OrderService.__init__:dataflow_slice", + "span_start": 9, + "span_end": 13, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "7f1d6f7110575a74f1a7153db3a16f80ee81e0c9d56aee502dbe58cf6017e0c8", + "edge_type": "dataflow_slice", + "src_symbol_id": "0ea1a03958593fe152e67e8c49837b3a7a69a6d0a65fa04e97ad7a2209655b4e", + "src_qname": "OrderService.__init__", + "dst_symbol_id": "830ecc3aea935f4787cde49b096954d26c88d3b0a050003c7b1e77287d18ed49", + "dst_ref": "OrderService.create_order", + "resolution": "resolved", + "slice_id": "7f1d6f7110575a74f1a7153db3a16f80ee81e0c9d56aee502dbe58cf6017e0c8", + "root_symbol_id": "0ea1a03958593fe152e67e8c49837b3a7a69a6d0a65fa04e97ad7a2209655b4e", + "path_symbols": [ + "OrderService.__init__", + "OrderService._repo", + "OrderService.create_order" + ], + "path_symbol_ids": [ + "0ea1a03958593fe152e67e8c49837b3a7a69a6d0a65fa04e97ad7a2209655b4e", + "830ecc3aea935f4787cde49b096954d26c88d3b0a050003c7b1e77287d18ed49" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "ae64718f6a024640edf9c936f72e5954897442af3840f7429a2d514128ce2447", + "repo_id": "code_qa_repo_full_chain", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/order_app/services/order_service.py", + "content": "OrderService.create_order reads_attr self._repo.save", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "OrderService.create_order:reads_attr", + "span_start": 13, + "span_end": 13, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "f1d9cdc1eab33373c59ca0937d86a02dcd46ae18d8f9ecd8bfa016fee792814c", + "edge_type": "reads_attr", + "src_symbol_id": "830ecc3aea935f4787cde49b096954d26c88d3b0a050003c7b1e77287d18ed49", + "src_qname": "OrderService.create_order", + "dst_symbol_id": null, + "dst_ref": "self._repo.save", + "resolution": "partial", + "is_test": false, + "blob_sha": "ae64718f6a024640edf9c936f72e5954897442af3840f7429a2d514128ce2447", + "repo_id": "code_qa_repo_full_chain", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/order_app/services/order_service.py", + "content": "OrderService.__init__ writes_attr OrderService._repo", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "OrderService.__init__:writes_attr", + "span_start": 9, + "span_end": 9, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "ea0ac983d364893b1215f560c86734bab4962cad622ac417bd3ecf205626b664", + "edge_type": "writes_attr", + "src_symbol_id": "0ea1a03958593fe152e67e8c49837b3a7a69a6d0a65fa04e97ad7a2209655b4e", + "src_qname": "OrderService.__init__", + "dst_symbol_id": null, + "dst_ref": "OrderService._repo", + "resolution": "partial", + "is_test": false, + "blob_sha": "ae64718f6a024640edf9c936f72e5954897442af3840f7429a2d514128ce2447", + "repo_id": "code_qa_repo_full_chain", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/order_app/services/order_service.py", + "content": "OrderService.create_order calls self._repo.save", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "OrderService.create_order:calls", + "span_start": 13, + "span_end": 13, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "9726557100771150a85f999afcf652ab89ca7d79db13143ebf989fb90de7b24a", + "edge_type": "calls", + "src_symbol_id": "830ecc3aea935f4787cde49b096954d26c88d3b0a050003c7b1e77287d18ed49", + "src_qname": "OrderService.create_order", + "dst_symbol_id": null, + "dst_ref": "self._repo.save", + "resolution": "partial", + "is_test": false, + "blob_sha": "ae64718f6a024640edf9c936f72e5954897442af3840f7429a2d514128ce2447", + "repo_id": "code_qa_repo_full_chain", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/order_app/services/order_service.py", + "content": "OrderService.create_order reads_attr OrderService._repo", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "OrderService.create_order:reads_attr", + "span_start": 13, + "span_end": 13, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3f0e571901e31de616f7e560e20cc7cdd85f7350060bb59e6dfc56d431197a0e", + "edge_type": "reads_attr", + "src_symbol_id": "830ecc3aea935f4787cde49b096954d26c88d3b0a050003c7b1e77287d18ed49", + "src_qname": "OrderService.create_order", + "dst_symbol_id": null, + "dst_ref": "OrderService._repo", + "resolution": "partial", + "is_test": false, + "blob_sha": "ae64718f6a024640edf9c936f72e5954897442af3840f7429a2d514128ce2447", + "repo_id": "code_qa_repo_full_chain", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/order_app/api/orders.py", + "content": "create_app.get_order\n -> jsonify", + "layer": "C3_ENTRYPOINTS", + "title": "create_app.get_order:execution_trace", + "span_start": 3, + "span_end": 28, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 2, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "edge_id": "a1a3ed8655ca7992651e6a480d2a9b8b1a6081ed4fafc6b218a6b9db03d3f829", + "edge_type": "execution_trace", + "src_symbol_id": "087d884b60e3cd267f285f861c866b84768a56e07e693e71c460a67aa099eb65", + "src_qname": "create_app.get_order", + "dst_symbol_id": "66d26c57dd7a75745acf1cd3e825f74cc312bafc7fc90619b1a6d25fcde57efd", + "dst_ref": "jsonify", + "resolution": "resolved", + "trace_id": "a1a3ed8655ca7992651e6a480d2a9b8b1a6081ed4fafc6b218a6b9db03d3f829", + "entry_id": "0c15b2acb96e575fc73553b943025314dd58c6f6dcb969b698e6a704a1c0e69d", + "entry_symbol_id": "087d884b60e3cd267f285f861c866b84768a56e07e693e71c460a67aa099eb65", + "path_symbols": [ + "create_app.get_order", + "jsonify" + ], + "path_symbol_ids": [ + "087d884b60e3cd267f285f861c866b84768a56e07e693e71c460a67aa099eb65", + "66d26c57dd7a75745acf1cd3e825f74cc312bafc7fc90619b1a6d25fcde57efd" + ], + "path_length": 2, + "is_test": false, + "blob_sha": "02fcc02cabba2c3659fb06047892e602e773619ea0be8c96d048701035b950a7", + "repo_id": "code_qa_repo_full_chain", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/order_app/api/orders.py", + "content": "create_app.create_order\n -> jsonify", + "layer": "C3_ENTRYPOINTS", + "title": "create_app.create_order:execution_trace", + "span_start": 3, + "span_end": 21, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 2, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "edge_id": "95a9ec7cfc456854d50b78db55737a140085fe398414f9166494cb4eddfa6ef5", + "edge_type": "execution_trace", + "src_symbol_id": "9b7d3951f6099cb9c6eca7c8fce1caf659b82ef5f67e6dc8e26c6277af011473", + "src_qname": "create_app.create_order", + "dst_symbol_id": "66d26c57dd7a75745acf1cd3e825f74cc312bafc7fc90619b1a6d25fcde57efd", + "dst_ref": "jsonify", + "resolution": "resolved", + "trace_id": "95a9ec7cfc456854d50b78db55737a140085fe398414f9166494cb4eddfa6ef5", + "entry_id": "0212a881f45888e5b6467d0731b8d5dd04500b5f0679dcff450e5891ea14e20f", + "entry_symbol_id": "9b7d3951f6099cb9c6eca7c8fce1caf659b82ef5f67e6dc8e26c6277af011473", + "path_symbols": [ + "create_app.create_order", + "jsonify" + ], + "path_symbol_ids": [ + "9b7d3951f6099cb9c6eca7c8fce1caf659b82ef5f67e6dc8e26c6277af011473", + "66d26c57dd7a75745acf1cd3e825f74cc312bafc7fc90619b1a6d25fcde57efd" + ], + "path_length": 2, + "is_test": false, + "blob_sha": "02fcc02cabba2c3659fb06047892e602e773619ea0be8c96d048701035b950a7", + "repo_id": "code_qa_repo_full_chain", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/order_app/api/orders.py", + "content": "fastapi http app.route", + "layer": "C3_ENTRYPOINTS", + "title": "app.route", + "span_start": 15, + "span_end": 21, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "0212a881f45888e5b6467d0731b8d5dd04500b5f0679dcff450e5891ea14e20f", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.route", + "handler_symbol_id": "9b7d3951f6099cb9c6eca7c8fce1caf659b82ef5f67e6dc8e26c6277af011473", + "is_test": false, + "lang_payload": { + "methods": [] + }, + "artifact_type": null, + "blob_sha": "02fcc02cabba2c3659fb06047892e602e773619ea0be8c96d048701035b950a7", + "repo_id": "code_qa_repo_full_chain", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/order_app/api/orders.py", + "content": "fastapi http app.route", + "layer": "C3_ENTRYPOINTS", + "title": "app.route", + "span_start": 24, + "span_end": 28, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "864ea5b326fb62dc34d91b9968f4e3f85e457b0a586ec8c30bf36a5893373d52", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.route", + "handler_symbol_id": "087d884b60e3cd267f285f861c866b84768a56e07e693e71c460a67aa099eb65", + "is_test": false, + "lang_payload": { + "methods": [] + }, + "artifact_type": null, + "blob_sha": "02fcc02cabba2c3659fb06047892e602e773619ea0be8c96d048701035b950a7", + "repo_id": "code_qa_repo_full_chain", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/order_app/services/order_service.py", + "content": "class OrderService:\n def __init__(self, repository: OrderRepository) -> None:\n self._repo = repository\n\n def create_order(self, product_id: str | None = None, quantity: int = 1) -> Order:\n order = Order(product_id=product_id or \"\", quantity=quantity)\n return self._repo.save(order)\n\n def get_order(self, order_id: str) -> Order | None:\n return self._repo.find_by_id(order_id)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/order_app/services/order_service.py:OrderService", + "span_start": 7, + "span_end": 16, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.order_app.services.order_service", + "is_test": false, + "blob_sha": "ae64718f6a024640edf9c936f72e5954897442af3840f7429a2d514128ce2447", + "repo_id": "code_qa_repo_full_chain", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "code_qa_repo_full_chain", + "workspace_id": "None", + "returned_repo_ids": [ + "code_qa_repo_full_chain" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "OrderService", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Как работает OrderService?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "Как работает OrderService?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Как работает OrderService?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "Как работает OrderService?", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "OrderService", + "alternatives": [ + "OrderService" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 3, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 4, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 55, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 10, + "C0_SOURCE_CHUNKS": 9, + "C4_SEMANTIC_ROLES": 9, + "C2_DEPENDENCY_GRAPH": 10, + "C3_ENTRYPOINTS": 7 + }, + "merge_rank": 13 + } + } + }, + { + "step": "llm_answer", + "input": { + "query": "Как работает OrderService?", + "rag_count": 15 + }, + "output": { + "llm_answer": "## Архитектура и Поведение `OrderService`\n\n### Описание\n\n`OrderService` является основным компонентом сервиса заказа в приложении. Он отвечает за управление жизненным циклом заказов и взаимодействие с другими сущностями приложения через интерфейс репозитория (`OrderRepository`).\n\n### Ключевые компоненты и их роль\n\n1. **OrderService**\n - **Роль**: Сервисный компонент, который управляет основными операциями заказа.\n - **Ответственность**:\n - Чтение и запись состояния атрибутов заказа.\n - Участие в данных потоков (dataflow slices).\n \n2. **Order**\n - Представляет заказ как объект с состоянием и атрибутами.\n\n3. **OrderRepository**\n - Репозиторий для хранения и управления данными о заказе.\n - Обеспечивает доступ к данным о заказах из базы данных или другого хранилища.\n\n### Поток данных и логика работы\n\n#### Инициализация OrderService\n\nПри создании экземпляра класса `OrderService`, выполняется следующая последовательность действий:\n\n```python\ndef __init__(self):\n self._repo = OrderRepository() # Инициализируем репозиторий заказов\n```\n\nТаким образом, создается экземпляр репозитория заказов, который будет использоваться при выполнении операций над заказами.\n\n#### Основные операции\n\n##### Получение существующего заказа\n\nМетод `get_order` позволяет получить информацию о существующем заказе из репозитория:\n\n```python\ndef get_order(self, order_id):\n return self._repo.find_by_id(order_id) # Вызываем метод репозитория для поиска заказа по идентификатору\n```\n\n##### Создание нового заказа\n\nМетод `create_order` создает новый заказ и сохраняет его в репозитории:\n\n```python\ndef create_order(self, new_order_data):\n order = Order(**new_order_data) # Создаем новый заказ на основе переданных данных\n self._repo.save(order) # Сохраняем заказ в репозитории\n```\n\n### Итоговое описание поведения\n\n`OrderService` предоставляет сервисы для взаимодействия с заказами. При инициализации создается репозиторий заказов, который используется для чтения и записи информации о заказах. Основной функционал включает получение существующих заказов и создание новых заказов. Эти действия реализуются методами `get_order` и `create_order`." + }, + "diagnostics": { + "prompt": { + "prompt_stats": { + "tokens_in_estimate": 304, + "evidence_rows": 15, + "evidence_chars": 1228 + }, + "evidence_summary": [ + { + "layer": "C1_SYMBOL_CATALOG", + "count": 1, + "unique_paths": 1 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "count": 3, + "unique_paths": 3 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "count": 6, + "unique_paths": 1 + }, + { + "layer": "C3_ENTRYPOINTS", + "count": 4, + "unique_paths": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "count": 1, + "unique_paths": 1 + } + ], + "prompt_template_id": "intent_code_qa_v1", + "system_prompt_version": "v1" + }, + "timings_ms": { + "prompt_build": 0, + "llm_call": 5268 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/router_only_smoke/20260312_082745/full_chain_smoke_full_chain_explain_order_service.md b/tests/pipeline_setup_v2/test_results/router_only_smoke/20260312_082745/full_chain_smoke_full_chain_explain_order_service.md new file mode 100644 index 0000000..d714aae --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/router_only_smoke/20260312_082745/full_chain_smoke_full_chain_explain_order_service.md @@ -0,0 +1,34 @@ +# full_chain_explain_order_service + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_smoke.yaml +- runner: runtime +- mode: full_chain +- passed: True + +## Query +Как работает OrderService? + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 15, + "llm_answer": "## Архитектура и Поведение `OrderService`\n\n### Описание\n\n`OrderService` является основным компонентом сервиса заказа в приложении. Он отвечает за управление жизненным циклом заказов и взаимодействие с другими сущностями приложения через интерфейс репозитория (`OrderRepository`).\n\n### Ключевые компоненты и их роль\n\n1. **OrderService**\n - **Роль**: Сервисный компонент, который управляет основными операциями заказа.\n - **Ответственность**:\n - Чтение и запись состояния атрибутов заказа.\n - Участие в данных потоков (dataflow slices).\n \n2. **Order**\n - Представляет заказ как объект с состоянием и атрибутами.\n\n3. **OrderRepository**\n - Репозиторий для хранения и управления данными о заказе.\n - Обеспечивает доступ к данным о заказах из базы данных или другого хранилища.\n\n### Поток данных и логика работы\n\n#### Инициализация OrderService\n\nПри создании экземпляра класса `OrderService`, выполняется следующая последовательность действий:\n\n```python\ndef __init__(self):\n self._repo = OrderRepository() # Инициализируем репозиторий заказов\n```\n\nТаким образом, создается экземпляр репозитория заказов, который будет использоваться при выполнении операций над заказами.\n\n#### Основные операции\n\n##### Получение существующего заказа\n\nМетод `get_order` позволяет получить информацию о существующем заказе из репозитория:\n\n```python\ndef get_order(self, order_id):\n return self._repo.find_by_id(order_id) # Вызываем метод репозитория для поиска заказа по идентификатору\n```\n\n##### Создание нового заказа\n\nМетод `create_order` создает новый заказ и сохраняет его в репозитории:\n\n```python\ndef create_order(self, new_order_data):\n order = Order(**new_order_data) # Создаем новый заказ на основе переданных данных\n self._repo.save(order) # Сохраняем заказ в репозитории\n```\n\n### Итоговое описание поведения\n\n`OrderService` предоставляет сервисы для взаимодействия с заказами. При инициализации создается репозиторий заказов, который используется для чтения и записи информации о заказах. Основной функционал включает получение существующих заказов и создание новых заказов. Эти действия реализуются методами `get_order` и `create_order`.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "OrderService" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/router_only_smoke/20260312_082745/router_only_smoke_router_only_docs_question.json b/tests/pipeline_setup_v2/test_results/router_only_smoke/20260312_082745/router_only_smoke_router_only_docs_question.json new file mode 100644 index 0000000..6480133 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/router_only_smoke/20260312_082745/router_only_smoke_router_only_docs_question.json @@ -0,0 +1,228 @@ +{ + "case_id": "router_only_docs_question", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/router_only_smoke.yaml", + "runner": "runtime", + "mode": "router_only", + "actual": { + "intent": "DOCS_QA", + "sub_intent": "EXPLAIN", + "graph_id": "DocsQAGraph", + "conversation_mode": "START", + "rag_count": 0, + "llm_answer": "", + "answer_mode": "partial", + "path_scope": [], + "symbol_candidates": [], + "layers": [ + "D1_MODULE_CATALOG", + "D2_FACT_INDEX", + "D3_SECTION_INDEX", + "D4_POLICY_INDEX" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "router_only_docs_question", + "text": "Что сказано в README?", + "mode": "router_only", + "run_started_at": "2026-03-12T08:27:46", + "rag_session_id": null, + "expected_intent": "DOCS_QA", + "actual_intent": "DOCS_QA", + "graph_id": "DocsQAGraph", + "conversation_mode": "START", + "query": "Что сказано в README?", + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [], + "confidence": 0.0 + }, + "rag_count": 0, + "rag_rows": [], + "llm_answer": null, + "summary": { + "router": { + "intent": "DOCS_QA", + "sub_intent": "EXPLAIN", + "confidence": null + }, + "retrieval": { + "profile": "docs", + "layers_hit": [], + "evidence_sufficient": false + }, + "llm": { + "answer_status": "partial", + "groundedness": "not_applicable" + } + }, + "diagnostics": { + "router_plan": { + "intent": "DOCS_QA", + "sub_intent": "EXPLAIN", + "graph_id": "DocsQAGraph", + "retrieval_profile": "docs", + "conversation_mode": "START", + "layers": [ + "D1_MODULE_CATALOG", + "D2_FACT_INDEX", + "D3_SECTION_INDEX", + "D4_POLICY_INDEX" + ], + "symbol_kind_hint": "unknown", + "symbol_candidates": [], + "keyword_hints": [ + "README" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [ + "README*", + "docs/**", + "**/*.md", + "README" + ], + "retrieval_constraints": { + "include_globs": [ + "docs/**", + "README*", + "**/*.md" + ], + "exclude_globs": [ + ".venv/**", + "node_modules/**", + "**/*.bin", + "**/*.png", + "**/*.jpg" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [], + "retrieval_mode_by_layer": {}, + "top_k_by_layer": {}, + "filters_by_layer": {}, + "repo_scope": { + "repo_id": null, + "workspace_id": null + } + }, + "retrieval": null, + "constraint_violations": [], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 0, + "retrieval_by_layer": {}, + "merge_rank": 0, + "prompt_build": 0, + "llm_call": 0 + }, + "prompt": null, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "README" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 0, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "router_only_docs_question", + "mode": "router_only", + "run_started_at": "2026-03-12T08:27:46", + "rag_session_id": null, + "expected_intent": "DOCS_QA", + "actual_intent": "DOCS_QA", + "graph_id": "DocsQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Что сказано в README?", + "normalized_query": "Что сказано в README?" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Что сказано в README?" + }, + "output": { + "intent": "DOCS_QA", + "graph_id": "DocsQAGraph", + "conversation_mode": "START", + "query": "Что сказано в README?" + }, + "diagnostics": { + "router_plan": { + "intent": "DOCS_QA", + "sub_intent": "EXPLAIN", + "graph_id": "DocsQAGraph", + "retrieval_profile": "docs", + "conversation_mode": "START", + "layers": [ + "D1_MODULE_CATALOG", + "D2_FACT_INDEX", + "D3_SECTION_INDEX", + "D4_POLICY_INDEX" + ], + "symbol_kind_hint": "unknown", + "symbol_candidates": [], + "keyword_hints": [ + "README" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [ + "README*", + "docs/**", + "**/*.md", + "README" + ], + "retrieval_constraints": { + "include_globs": [ + "docs/**", + "README*", + "**/*.md" + ], + "exclude_globs": [ + ".venv/**", + "node_modules/**", + "**/*.bin", + "**/*.png", + "**/*.jpg" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/router_only_smoke/20260312_082745/router_only_smoke_router_only_docs_question.md b/tests/pipeline_setup_v2/test_results/router_only_smoke/20260312_082745/router_only_smoke_router_only_docs_question.md new file mode 100644 index 0000000..253c7d9 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/router_only_smoke/20260312_082745/router_only_smoke_router_only_docs_question.md @@ -0,0 +1,31 @@ +# router_only_docs_question + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/router_only_smoke.yaml +- runner: runtime +- mode: router_only +- passed: True + +## Query +Что сказано в README? + +## Actual +{ + "intent": "DOCS_QA", + "sub_intent": "EXPLAIN", + "graph_id": "DocsQAGraph", + "conversation_mode": "START", + "rag_count": 0, + "llm_answer": "", + "answer_mode": "partial", + "path_scope": [], + "symbol_candidates": [], + "layers": [ + "D1_MODULE_CATALOG", + "D2_FACT_INDEX", + "D3_SECTION_INDEX", + "D4_POLICY_INDEX" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/router_only_smoke/20260312_082745/router_only_smoke_router_only_open_fixture_main.json b/tests/pipeline_setup_v2/test_results/router_only_smoke/20260312_082745/router_only_smoke_router_only_open_fixture_main.json new file mode 100644 index 0000000..08e121f --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/router_only_smoke/20260312_082745/router_only_smoke_router_only_open_fixture_main.json @@ -0,0 +1,207 @@ +{ + "case_id": "router_only_open_fixture_main", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/router_only_smoke.yaml", + "runner": "runtime", + "mode": "router_only", + "actual": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 0, + "llm_answer": "", + "answer_mode": "partial", + "path_scope": [ + "main.py" + ], + "symbol_candidates": [], + "layers": [ + "C0_SOURCE_CHUNKS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "router_only_open_fixture_main", + "text": "Открой файл main.py", + "mode": "router_only", + "run_started_at": "2026-03-12T08:27:46", + "rag_session_id": null, + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Открой файл main.py", + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [], + "confidence": 0.0 + }, + "rag_count": 0, + "rag_rows": [], + "llm_answer": null, + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [], + "evidence_sufficient": false + }, + "llm": { + "answer_status": "partial", + "groundedness": "not_applicable" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "unknown", + "symbol_candidates": [], + "keyword_hints": [], + "path_hints": [ + "main.py" + ], + "path_scope": [ + "main.py" + ], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "main.py" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": false, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [], + "retrieval_mode_by_layer": {}, + "top_k_by_layer": {}, + "filters_by_layer": {}, + "repo_scope": { + "repo_id": null, + "workspace_id": null + } + }, + "retrieval": null, + "constraint_violations": [], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 0, + "retrieval_by_layer": {}, + "merge_rank": 0, + "prompt_build": 0, + "llm_call": 0 + }, + "prompt": null, + "router": { + "conversation_mode": "START", + "keyword_hints": [], + "path_scope": [ + "main.py" + ] + }, + "llm": { + "used_evidence_count": 0, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "router_only_open_fixture_main", + "mode": "router_only", + "run_started_at": "2026-03-12T08:27:46", + "rag_session_id": null, + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Открой файл main.py", + "normalized_query": "Открой файл main.py" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Открой файл main.py" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Открой файл main.py" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "unknown", + "symbol_candidates": [], + "keyword_hints": [], + "path_hints": [ + "main.py" + ], + "path_scope": [ + "main.py" + ], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "main.py" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": false, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/router_only_smoke/20260312_082745/router_only_smoke_router_only_open_fixture_main.md b/tests/pipeline_setup_v2/test_results/router_only_smoke/20260312_082745/router_only_smoke_router_only_open_fixture_main.md new file mode 100644 index 0000000..658643b --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/router_only_smoke/20260312_082745/router_only_smoke_router_only_open_fixture_main.md @@ -0,0 +1,30 @@ +# router_only_open_fixture_main + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/router_only_smoke.yaml +- runner: runtime +- mode: router_only +- passed: True + +## Query +Открой файл main.py + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 0, + "llm_answer": "", + "answer_mode": "partial", + "path_scope": [ + "main.py" + ], + "symbol_candidates": [], + "layers": [ + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/router_only_smoke/20260312_082745/router_rag_smoke_router_rag_explain_order.json b/tests/pipeline_setup_v2/test_results/router_only_smoke/20260312_082745/router_rag_smoke_router_rag_explain_order.json new file mode 100644 index 0000000..31ae3e9 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/router_only_smoke/20260312_082745/router_rag_smoke_router_rag_explain_order.json @@ -0,0 +1,2111 @@ +{ + "case_id": "router_rag_explain_order", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/router_rag_smoke.yaml", + "runner": "runtime", + "mode": "router_rag", + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 15, + "llm_answer": "", + "answer_mode": "partial", + "path_scope": [], + "symbol_candidates": [ + "Order" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "router_rag_explain_order", + "text": "Объясни класс Order", + "mode": "router_rag", + "run_started_at": "2026-03-12T08:27:46", + "rag_session_id": "c224dbc0-132c-4fd7-a106-3684df6455e1", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни класс Order", + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "Order", + "alternatives": [ + "Order" + ], + "confidence": 0.99 + }, + "rag_count": 15, + "rag_rows": [ + { + "path": "src/order_app/domain/order.py", + "content": "class Order\nOrder", + "layer": "C1_SYMBOL_CATALOG", + "title": "Order", + "span_start": 6, + "span_end": 11, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "b60768ee227c0dc0caca658c2eafcbad554f462e363734f5c4f597dd4d413f5c", + "qname": "Order", + "kind": "class", + "signature": "Order", + "parent_symbol_id": null, + "package_or_module": "src.order_app.domain.order", + "is_test": false, + "blob_sha": "f2a88a24ade1930ed3e1bedf66ea7e9ef825f10fe4ee830a233fb7911ef32626", + "repo_id": "code_qa_repo_runtime", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/order_app/domain/order.py", + "content": "Order\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes", + "layer": "C4_SEMANTIC_ROLES", + "title": "Order", + "span_start": 6, + "span_end": 11, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 31, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b60768ee227c0dc0caca658c2eafcbad554f462e363734f5c4f597dd4d413f5c", + "symbol_name": "Order", + "qname": "Order", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f2a88a24ade1930ed3e1bedf66ea7e9ef825f10fe4ee830a233fb7911ef32626", + "repo_id": "code_qa_repo_runtime", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/order_app/repositories/order_repository.py", + "content": "OrderRepository\nrole: repository\n\nResponsibilities:\n- name suffix suggests repository", + "layer": "C4_SEMANTIC_ROLES", + "title": "OrderRepository", + "span_start": 6, + "span_end": 14, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 36, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "4ff9dd82d0e928179af4cc55bcab5b1082be515832a6c92978b54779539c4a48", + "symbol_name": "OrderRepository", + "qname": "OrderRepository", + "role": "repository", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "a9a07d097b3a075dc55ede70766180dff42f2165ac73c791ad024f46db27b9f2", + "repo_id": "code_qa_repo_runtime", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/order_app/services/order_service.py", + "content": "OrderService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (2)", + "layer": "C4_SEMANTIC_ROLES", + "title": "OrderService", + "span_start": 7, + "span_end": 16, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 71, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "42b4f9dfe7edcf06b3ad38543ad457eb56b88834f0d114cb6e18872b7306e62c", + "symbol_name": "OrderService", + "qname": "OrderService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 2, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "ae64718f6a024640edf9c936f72e5954897442af3840f7429a2d514128ce2447", + "repo_id": "code_qa_repo_runtime", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/order_app/services/order_service.py", + "content": "OrderService.__init__\n -> OrderService._repo\n -> OrderService.get_order", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "OrderService.__init__:dataflow_slice", + "span_start": 9, + "span_end": 16, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "9f06b4fc5cc95467d5dc324689b15228600bc31ee0a53dae49f9aab490ec4ee3", + "edge_type": "dataflow_slice", + "src_symbol_id": "0ea1a03958593fe152e67e8c49837b3a7a69a6d0a65fa04e97ad7a2209655b4e", + "src_qname": "OrderService.__init__", + "dst_symbol_id": "2b0346b72716cf0289a80089ca36ae37ec9c0ae387850f5ca4b5e79d2f6e500e", + "dst_ref": "OrderService.get_order", + "resolution": "resolved", + "slice_id": "9f06b4fc5cc95467d5dc324689b15228600bc31ee0a53dae49f9aab490ec4ee3", + "root_symbol_id": "0ea1a03958593fe152e67e8c49837b3a7a69a6d0a65fa04e97ad7a2209655b4e", + "path_symbols": [ + "OrderService.__init__", + "OrderService._repo", + "OrderService.get_order" + ], + "path_symbol_ids": [ + "0ea1a03958593fe152e67e8c49837b3a7a69a6d0a65fa04e97ad7a2209655b4e", + "2b0346b72716cf0289a80089ca36ae37ec9c0ae387850f5ca4b5e79d2f6e500e" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "ae64718f6a024640edf9c936f72e5954897442af3840f7429a2d514128ce2447", + "repo_id": "code_qa_repo_runtime", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/order_app/services/order_service.py", + "content": "OrderService.__init__\n -> OrderService._repo\n -> OrderService.create_order", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "OrderService.__init__:dataflow_slice", + "span_start": 9, + "span_end": 13, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "7f1d6f7110575a74f1a7153db3a16f80ee81e0c9d56aee502dbe58cf6017e0c8", + "edge_type": "dataflow_slice", + "src_symbol_id": "0ea1a03958593fe152e67e8c49837b3a7a69a6d0a65fa04e97ad7a2209655b4e", + "src_qname": "OrderService.__init__", + "dst_symbol_id": "830ecc3aea935f4787cde49b096954d26c88d3b0a050003c7b1e77287d18ed49", + "dst_ref": "OrderService.create_order", + "resolution": "resolved", + "slice_id": "7f1d6f7110575a74f1a7153db3a16f80ee81e0c9d56aee502dbe58cf6017e0c8", + "root_symbol_id": "0ea1a03958593fe152e67e8c49837b3a7a69a6d0a65fa04e97ad7a2209655b4e", + "path_symbols": [ + "OrderService.__init__", + "OrderService._repo", + "OrderService.create_order" + ], + "path_symbol_ids": [ + "0ea1a03958593fe152e67e8c49837b3a7a69a6d0a65fa04e97ad7a2209655b4e", + "830ecc3aea935f4787cde49b096954d26c88d3b0a050003c7b1e77287d18ed49" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "ae64718f6a024640edf9c936f72e5954897442af3840f7429a2d514128ce2447", + "repo_id": "code_qa_repo_runtime", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/order_app/domain/order.py", + "content": "Order.__init__ calls str", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "Order.__init__:calls", + "span_start": 8, + "span_end": 8, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "afa121e7984a7d20f5ab88ea5251ae74b3d1823a684c2faaa62a08d4c2a070c0", + "edge_type": "calls", + "src_symbol_id": "86fda5e23a666d7f72ef79ded051a2c767aff487ef3183a14eae2006dab0f285", + "src_qname": "Order.__init__", + "dst_symbol_id": null, + "dst_ref": "str", + "resolution": "partial", + "is_test": false, + "blob_sha": "f2a88a24ade1930ed3e1bedf66ea7e9ef825f10fe4ee830a233fb7911ef32626", + "repo_id": "code_qa_repo_runtime", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/order_app/domain/order.py", + "content": "Order.__init__ writes_attr Order.product_id", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "Order.__init__:writes_attr", + "span_start": 9, + "span_end": 9, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "8589c20fc4c9066bec24edf3fd01207d13e64a786ff56ebd19fbaeddf696fd0c", + "edge_type": "writes_attr", + "src_symbol_id": "86fda5e23a666d7f72ef79ded051a2c767aff487ef3183a14eae2006dab0f285", + "src_qname": "Order.__init__", + "dst_symbol_id": null, + "dst_ref": "Order.product_id", + "resolution": "partial", + "is_test": false, + "blob_sha": "f2a88a24ade1930ed3e1bedf66ea7e9ef825f10fe4ee830a233fb7911ef32626", + "repo_id": "code_qa_repo_runtime", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/order_app/domain/order.py", + "content": "Order.__init__ writes_attr Order.status", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "Order.__init__:writes_attr", + "span_start": 11, + "span_end": 11, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "1500e4d8e532efafd8fe01ee033ddceffc80ff013ef6353dba9c90f527aaaf0f", + "edge_type": "writes_attr", + "src_symbol_id": "86fda5e23a666d7f72ef79ded051a2c767aff487ef3183a14eae2006dab0f285", + "src_qname": "Order.__init__", + "dst_symbol_id": null, + "dst_ref": "Order.status", + "resolution": "partial", + "is_test": false, + "blob_sha": "f2a88a24ade1930ed3e1bedf66ea7e9ef825f10fe4ee830a233fb7911ef32626", + "repo_id": "code_qa_repo_runtime", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/order_app/domain/order.py", + "content": "Order.__init__ writes_attr Order.id", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "Order.__init__:writes_attr", + "span_start": 8, + "span_end": 8, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "89b59cc43b6c2346674a947ae3ca4bc117b44361e03adc41f6d124cdfd8a6620", + "edge_type": "writes_attr", + "src_symbol_id": "86fda5e23a666d7f72ef79ded051a2c767aff487ef3183a14eae2006dab0f285", + "src_qname": "Order.__init__", + "dst_symbol_id": null, + "dst_ref": "Order.id", + "resolution": "partial", + "is_test": false, + "blob_sha": "f2a88a24ade1930ed3e1bedf66ea7e9ef825f10fe4ee830a233fb7911ef32626", + "repo_id": "code_qa_repo_runtime", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/order_app/api/orders.py", + "content": "create_app.get_order\n -> jsonify", + "layer": "C3_ENTRYPOINTS", + "title": "create_app.get_order:execution_trace", + "span_start": 3, + "span_end": 28, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 2, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "edge_id": "a1a3ed8655ca7992651e6a480d2a9b8b1a6081ed4fafc6b218a6b9db03d3f829", + "edge_type": "execution_trace", + "src_symbol_id": "087d884b60e3cd267f285f861c866b84768a56e07e693e71c460a67aa099eb65", + "src_qname": "create_app.get_order", + "dst_symbol_id": "66d26c57dd7a75745acf1cd3e825f74cc312bafc7fc90619b1a6d25fcde57efd", + "dst_ref": "jsonify", + "resolution": "resolved", + "trace_id": "a1a3ed8655ca7992651e6a480d2a9b8b1a6081ed4fafc6b218a6b9db03d3f829", + "entry_id": "0c15b2acb96e575fc73553b943025314dd58c6f6dcb969b698e6a704a1c0e69d", + "entry_symbol_id": "087d884b60e3cd267f285f861c866b84768a56e07e693e71c460a67aa099eb65", + "path_symbols": [ + "create_app.get_order", + "jsonify" + ], + "path_symbol_ids": [ + "087d884b60e3cd267f285f861c866b84768a56e07e693e71c460a67aa099eb65", + "66d26c57dd7a75745acf1cd3e825f74cc312bafc7fc90619b1a6d25fcde57efd" + ], + "path_length": 2, + "is_test": false, + "blob_sha": "02fcc02cabba2c3659fb06047892e602e773619ea0be8c96d048701035b950a7", + "repo_id": "code_qa_repo_runtime", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/order_app/api/orders.py", + "content": "create_app.create_order\n -> jsonify", + "layer": "C3_ENTRYPOINTS", + "title": "create_app.create_order:execution_trace", + "span_start": 3, + "span_end": 21, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 2, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "edge_id": "95a9ec7cfc456854d50b78db55737a140085fe398414f9166494cb4eddfa6ef5", + "edge_type": "execution_trace", + "src_symbol_id": "9b7d3951f6099cb9c6eca7c8fce1caf659b82ef5f67e6dc8e26c6277af011473", + "src_qname": "create_app.create_order", + "dst_symbol_id": "66d26c57dd7a75745acf1cd3e825f74cc312bafc7fc90619b1a6d25fcde57efd", + "dst_ref": "jsonify", + "resolution": "resolved", + "trace_id": "95a9ec7cfc456854d50b78db55737a140085fe398414f9166494cb4eddfa6ef5", + "entry_id": "0212a881f45888e5b6467d0731b8d5dd04500b5f0679dcff450e5891ea14e20f", + "entry_symbol_id": "9b7d3951f6099cb9c6eca7c8fce1caf659b82ef5f67e6dc8e26c6277af011473", + "path_symbols": [ + "create_app.create_order", + "jsonify" + ], + "path_symbol_ids": [ + "9b7d3951f6099cb9c6eca7c8fce1caf659b82ef5f67e6dc8e26c6277af011473", + "66d26c57dd7a75745acf1cd3e825f74cc312bafc7fc90619b1a6d25fcde57efd" + ], + "path_length": 2, + "is_test": false, + "blob_sha": "02fcc02cabba2c3659fb06047892e602e773619ea0be8c96d048701035b950a7", + "repo_id": "code_qa_repo_runtime", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/order_app/api/orders.py", + "content": "fastapi http app.route", + "layer": "C3_ENTRYPOINTS", + "title": "app.route", + "span_start": 15, + "span_end": 21, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "0212a881f45888e5b6467d0731b8d5dd04500b5f0679dcff450e5891ea14e20f", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.route", + "handler_symbol_id": "9b7d3951f6099cb9c6eca7c8fce1caf659b82ef5f67e6dc8e26c6277af011473", + "is_test": false, + "lang_payload": { + "methods": [] + }, + "artifact_type": null, + "blob_sha": "02fcc02cabba2c3659fb06047892e602e773619ea0be8c96d048701035b950a7", + "repo_id": "code_qa_repo_runtime", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/order_app/api/orders.py", + "content": "fastapi http app.route", + "layer": "C3_ENTRYPOINTS", + "title": "app.route", + "span_start": 24, + "span_end": 28, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "864ea5b326fb62dc34d91b9968f4e3f85e457b0a586ec8c30bf36a5893373d52", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.route", + "handler_symbol_id": "087d884b60e3cd267f285f861c866b84768a56e07e693e71c460a67aa099eb65", + "is_test": false, + "lang_payload": { + "methods": [] + }, + "artifact_type": null, + "blob_sha": "02fcc02cabba2c3659fb06047892e602e773619ea0be8c96d048701035b950a7", + "repo_id": "code_qa_repo_runtime", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/order_app/domain/order.py", + "content": "class Order:\n def __init__(self, product_id: str = \"\", quantity: int = 1) -> None:\n self.id = str(uuid.uuid4())\n self.product_id = product_id\n self.quantity = quantity\n self.status = \"pending\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/order_app/domain/order.py:Order", + "span_start": 6, + "span_end": 11, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.order_app.domain.order", + "is_test": false, + "blob_sha": "f2a88a24ade1930ed3e1bedf66ea7e9ef825f10fe4ee830a233fb7911ef32626", + "repo_id": "code_qa_repo_runtime", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": null, + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS", + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS", + "C4_SEMANTIC_ROLES" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "partial", + "groundedness": "not_applicable" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "Order" + ], + "keyword_hints": [ + "Order" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "code_qa_repo_runtime", + "workspace_id": "None", + "returned_repo_ids": [ + "code_qa_repo_runtime" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "Order", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Объясни класс Order", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "Объясни класс Order", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Объясни класс Order", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "Объясни класс Order", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "Order", + "alternatives": [ + "Order" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 3, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 4, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 44, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 7, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 7, + "C2_DEPENDENCY_GRAPH": 7, + "C3_ENTRYPOINTS": 6 + }, + "merge_rank": 12, + "prompt_build": 0, + "llm_call": 0 + }, + "prompt": null, + "router": { + "conversation_mode": "START", + "keyword_hints": [ + "Order" + ], + "path_scope": [] + }, + "llm": { + "used_evidence_count": 15, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "router_rag_explain_order", + "mode": "router_rag", + "run_started_at": "2026-03-12T08:27:46", + "rag_session_id": "c224dbc0-132c-4fd7-a106-3684df6455e1", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Объясни класс Order", + "normalized_query": "Объясни класс Order" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Объясни класс Order" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Объясни класс Order" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_kind_hint": "class", + "symbol_candidates": [ + "Order" + ], + "keyword_hints": [ + "Order" + ], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Объясни класс Order" + }, + "output": { + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "Order", + "alternatives": [ + "Order" + ], + "confidence": 0.99 + }, + "rag_count": 15, + "rag_rows": [ + { + "path": "src/order_app/domain/order.py", + "content": "class Order\nOrder", + "layer": "C1_SYMBOL_CATALOG", + "title": "Order", + "span_start": 6, + "span_end": 11, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "b60768ee227c0dc0caca658c2eafcbad554f462e363734f5c4f597dd4d413f5c", + "qname": "Order", + "kind": "class", + "signature": "Order", + "parent_symbol_id": null, + "package_or_module": "src.order_app.domain.order", + "is_test": false, + "blob_sha": "f2a88a24ade1930ed3e1bedf66ea7e9ef825f10fe4ee830a233fb7911ef32626", + "repo_id": "code_qa_repo_runtime", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/order_app/domain/order.py", + "content": "Order\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes", + "layer": "C4_SEMANTIC_ROLES", + "title": "Order", + "span_start": 6, + "span_end": 11, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 31, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b60768ee227c0dc0caca658c2eafcbad554f462e363734f5c4f597dd4d413f5c", + "symbol_name": "Order", + "qname": "Order", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f2a88a24ade1930ed3e1bedf66ea7e9ef825f10fe4ee830a233fb7911ef32626", + "repo_id": "code_qa_repo_runtime", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/order_app/repositories/order_repository.py", + "content": "OrderRepository\nrole: repository\n\nResponsibilities:\n- name suffix suggests repository", + "layer": "C4_SEMANTIC_ROLES", + "title": "OrderRepository", + "span_start": 6, + "span_end": 14, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 36, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "4ff9dd82d0e928179af4cc55bcab5b1082be515832a6c92978b54779539c4a48", + "symbol_name": "OrderRepository", + "qname": "OrderRepository", + "role": "repository", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "a9a07d097b3a075dc55ede70766180dff42f2165ac73c791ad024f46db27b9f2", + "repo_id": "code_qa_repo_runtime", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/order_app/services/order_service.py", + "content": "OrderService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (2)", + "layer": "C4_SEMANTIC_ROLES", + "title": "OrderService", + "span_start": 7, + "span_end": 16, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 71, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "42b4f9dfe7edcf06b3ad38543ad457eb56b88834f0d114cb6e18872b7306e62c", + "symbol_name": "OrderService", + "qname": "OrderService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 2, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "ae64718f6a024640edf9c936f72e5954897442af3840f7429a2d514128ce2447", + "repo_id": "code_qa_repo_runtime", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/order_app/services/order_service.py", + "content": "OrderService.__init__\n -> OrderService._repo\n -> OrderService.get_order", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "OrderService.__init__:dataflow_slice", + "span_start": 9, + "span_end": 16, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "9f06b4fc5cc95467d5dc324689b15228600bc31ee0a53dae49f9aab490ec4ee3", + "edge_type": "dataflow_slice", + "src_symbol_id": "0ea1a03958593fe152e67e8c49837b3a7a69a6d0a65fa04e97ad7a2209655b4e", + "src_qname": "OrderService.__init__", + "dst_symbol_id": "2b0346b72716cf0289a80089ca36ae37ec9c0ae387850f5ca4b5e79d2f6e500e", + "dst_ref": "OrderService.get_order", + "resolution": "resolved", + "slice_id": "9f06b4fc5cc95467d5dc324689b15228600bc31ee0a53dae49f9aab490ec4ee3", + "root_symbol_id": "0ea1a03958593fe152e67e8c49837b3a7a69a6d0a65fa04e97ad7a2209655b4e", + "path_symbols": [ + "OrderService.__init__", + "OrderService._repo", + "OrderService.get_order" + ], + "path_symbol_ids": [ + "0ea1a03958593fe152e67e8c49837b3a7a69a6d0a65fa04e97ad7a2209655b4e", + "2b0346b72716cf0289a80089ca36ae37ec9c0ae387850f5ca4b5e79d2f6e500e" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "ae64718f6a024640edf9c936f72e5954897442af3840f7429a2d514128ce2447", + "repo_id": "code_qa_repo_runtime", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/order_app/services/order_service.py", + "content": "OrderService.__init__\n -> OrderService._repo\n -> OrderService.create_order", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "OrderService.__init__:dataflow_slice", + "span_start": 9, + "span_end": 13, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "7f1d6f7110575a74f1a7153db3a16f80ee81e0c9d56aee502dbe58cf6017e0c8", + "edge_type": "dataflow_slice", + "src_symbol_id": "0ea1a03958593fe152e67e8c49837b3a7a69a6d0a65fa04e97ad7a2209655b4e", + "src_qname": "OrderService.__init__", + "dst_symbol_id": "830ecc3aea935f4787cde49b096954d26c88d3b0a050003c7b1e77287d18ed49", + "dst_ref": "OrderService.create_order", + "resolution": "resolved", + "slice_id": "7f1d6f7110575a74f1a7153db3a16f80ee81e0c9d56aee502dbe58cf6017e0c8", + "root_symbol_id": "0ea1a03958593fe152e67e8c49837b3a7a69a6d0a65fa04e97ad7a2209655b4e", + "path_symbols": [ + "OrderService.__init__", + "OrderService._repo", + "OrderService.create_order" + ], + "path_symbol_ids": [ + "0ea1a03958593fe152e67e8c49837b3a7a69a6d0a65fa04e97ad7a2209655b4e", + "830ecc3aea935f4787cde49b096954d26c88d3b0a050003c7b1e77287d18ed49" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "ae64718f6a024640edf9c936f72e5954897442af3840f7429a2d514128ce2447", + "repo_id": "code_qa_repo_runtime", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/order_app/domain/order.py", + "content": "Order.__init__ calls str", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "Order.__init__:calls", + "span_start": 8, + "span_end": 8, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "afa121e7984a7d20f5ab88ea5251ae74b3d1823a684c2faaa62a08d4c2a070c0", + "edge_type": "calls", + "src_symbol_id": "86fda5e23a666d7f72ef79ded051a2c767aff487ef3183a14eae2006dab0f285", + "src_qname": "Order.__init__", + "dst_symbol_id": null, + "dst_ref": "str", + "resolution": "partial", + "is_test": false, + "blob_sha": "f2a88a24ade1930ed3e1bedf66ea7e9ef825f10fe4ee830a233fb7911ef32626", + "repo_id": "code_qa_repo_runtime", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/order_app/domain/order.py", + "content": "Order.__init__ writes_attr Order.product_id", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "Order.__init__:writes_attr", + "span_start": 9, + "span_end": 9, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "8589c20fc4c9066bec24edf3fd01207d13e64a786ff56ebd19fbaeddf696fd0c", + "edge_type": "writes_attr", + "src_symbol_id": "86fda5e23a666d7f72ef79ded051a2c767aff487ef3183a14eae2006dab0f285", + "src_qname": "Order.__init__", + "dst_symbol_id": null, + "dst_ref": "Order.product_id", + "resolution": "partial", + "is_test": false, + "blob_sha": "f2a88a24ade1930ed3e1bedf66ea7e9ef825f10fe4ee830a233fb7911ef32626", + "repo_id": "code_qa_repo_runtime", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/order_app/domain/order.py", + "content": "Order.__init__ writes_attr Order.status", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "Order.__init__:writes_attr", + "span_start": 11, + "span_end": 11, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "1500e4d8e532efafd8fe01ee033ddceffc80ff013ef6353dba9c90f527aaaf0f", + "edge_type": "writes_attr", + "src_symbol_id": "86fda5e23a666d7f72ef79ded051a2c767aff487ef3183a14eae2006dab0f285", + "src_qname": "Order.__init__", + "dst_symbol_id": null, + "dst_ref": "Order.status", + "resolution": "partial", + "is_test": false, + "blob_sha": "f2a88a24ade1930ed3e1bedf66ea7e9ef825f10fe4ee830a233fb7911ef32626", + "repo_id": "code_qa_repo_runtime", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/order_app/domain/order.py", + "content": "Order.__init__ writes_attr Order.id", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "Order.__init__:writes_attr", + "span_start": 8, + "span_end": 8, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "89b59cc43b6c2346674a947ae3ca4bc117b44361e03adc41f6d124cdfd8a6620", + "edge_type": "writes_attr", + "src_symbol_id": "86fda5e23a666d7f72ef79ded051a2c767aff487ef3183a14eae2006dab0f285", + "src_qname": "Order.__init__", + "dst_symbol_id": null, + "dst_ref": "Order.id", + "resolution": "partial", + "is_test": false, + "blob_sha": "f2a88a24ade1930ed3e1bedf66ea7e9ef825f10fe4ee830a233fb7911ef32626", + "repo_id": "code_qa_repo_runtime", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/order_app/api/orders.py", + "content": "create_app.get_order\n -> jsonify", + "layer": "C3_ENTRYPOINTS", + "title": "create_app.get_order:execution_trace", + "span_start": 3, + "span_end": 28, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 2, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "edge_id": "a1a3ed8655ca7992651e6a480d2a9b8b1a6081ed4fafc6b218a6b9db03d3f829", + "edge_type": "execution_trace", + "src_symbol_id": "087d884b60e3cd267f285f861c866b84768a56e07e693e71c460a67aa099eb65", + "src_qname": "create_app.get_order", + "dst_symbol_id": "66d26c57dd7a75745acf1cd3e825f74cc312bafc7fc90619b1a6d25fcde57efd", + "dst_ref": "jsonify", + "resolution": "resolved", + "trace_id": "a1a3ed8655ca7992651e6a480d2a9b8b1a6081ed4fafc6b218a6b9db03d3f829", + "entry_id": "0c15b2acb96e575fc73553b943025314dd58c6f6dcb969b698e6a704a1c0e69d", + "entry_symbol_id": "087d884b60e3cd267f285f861c866b84768a56e07e693e71c460a67aa099eb65", + "path_symbols": [ + "create_app.get_order", + "jsonify" + ], + "path_symbol_ids": [ + "087d884b60e3cd267f285f861c866b84768a56e07e693e71c460a67aa099eb65", + "66d26c57dd7a75745acf1cd3e825f74cc312bafc7fc90619b1a6d25fcde57efd" + ], + "path_length": 2, + "is_test": false, + "blob_sha": "02fcc02cabba2c3659fb06047892e602e773619ea0be8c96d048701035b950a7", + "repo_id": "code_qa_repo_runtime", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/order_app/api/orders.py", + "content": "create_app.create_order\n -> jsonify", + "layer": "C3_ENTRYPOINTS", + "title": "create_app.create_order:execution_trace", + "span_start": 3, + "span_end": 21, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 2, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "edge_id": "95a9ec7cfc456854d50b78db55737a140085fe398414f9166494cb4eddfa6ef5", + "edge_type": "execution_trace", + "src_symbol_id": "9b7d3951f6099cb9c6eca7c8fce1caf659b82ef5f67e6dc8e26c6277af011473", + "src_qname": "create_app.create_order", + "dst_symbol_id": "66d26c57dd7a75745acf1cd3e825f74cc312bafc7fc90619b1a6d25fcde57efd", + "dst_ref": "jsonify", + "resolution": "resolved", + "trace_id": "95a9ec7cfc456854d50b78db55737a140085fe398414f9166494cb4eddfa6ef5", + "entry_id": "0212a881f45888e5b6467d0731b8d5dd04500b5f0679dcff450e5891ea14e20f", + "entry_symbol_id": "9b7d3951f6099cb9c6eca7c8fce1caf659b82ef5f67e6dc8e26c6277af011473", + "path_symbols": [ + "create_app.create_order", + "jsonify" + ], + "path_symbol_ids": [ + "9b7d3951f6099cb9c6eca7c8fce1caf659b82ef5f67e6dc8e26c6277af011473", + "66d26c57dd7a75745acf1cd3e825f74cc312bafc7fc90619b1a6d25fcde57efd" + ], + "path_length": 2, + "is_test": false, + "blob_sha": "02fcc02cabba2c3659fb06047892e602e773619ea0be8c96d048701035b950a7", + "repo_id": "code_qa_repo_runtime", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/order_app/api/orders.py", + "content": "fastapi http app.route", + "layer": "C3_ENTRYPOINTS", + "title": "app.route", + "span_start": 15, + "span_end": 21, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "0212a881f45888e5b6467d0731b8d5dd04500b5f0679dcff450e5891ea14e20f", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.route", + "handler_symbol_id": "9b7d3951f6099cb9c6eca7c8fce1caf659b82ef5f67e6dc8e26c6277af011473", + "is_test": false, + "lang_payload": { + "methods": [] + }, + "artifact_type": null, + "blob_sha": "02fcc02cabba2c3659fb06047892e602e773619ea0be8c96d048701035b950a7", + "repo_id": "code_qa_repo_runtime", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/order_app/api/orders.py", + "content": "fastapi http app.route", + "layer": "C3_ENTRYPOINTS", + "title": "app.route", + "span_start": 24, + "span_end": 28, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "864ea5b326fb62dc34d91b9968f4e3f85e457b0a586ec8c30bf36a5893373d52", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.route", + "handler_symbol_id": "087d884b60e3cd267f285f861c866b84768a56e07e693e71c460a67aa099eb65", + "is_test": false, + "lang_payload": { + "methods": [] + }, + "artifact_type": null, + "blob_sha": "02fcc02cabba2c3659fb06047892e602e773619ea0be8c96d048701035b950a7", + "repo_id": "code_qa_repo_runtime", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/order_app/domain/order.py", + "content": "class Order:\n def __init__(self, product_id: str = \"\", quantity: int = 1) -> None:\n self.id = str(uuid.uuid4())\n self.product_id = product_id\n self.quantity = quantity\n self.status = \"pending\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/order_app/domain/order.py:Order", + "span_start": 6, + "span_end": 11, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.order_app.domain.order", + "is_test": false, + "blob_sha": "f2a88a24ade1930ed3e1bedf66ea7e9ef825f10fe4ee830a233fb7911ef32626", + "repo_id": "code_qa_repo_runtime", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "symbol_search", + "C0_SOURCE_CHUNKS": "exact_path_fetch", + "C4_SEMANTIC_ROLES": "exact_path_fetch", + "C2_DEPENDENCY_GRAPH": "exact_path_fetch", + "C3_ENTRYPOINTS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [ + "src" + ], + "include_globs": [ + "src" + ], + "exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "code_qa_repo_runtime", + "workspace_id": "None", + "returned_repo_ids": [ + "code_qa_repo_runtime" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C1_SYMBOL_CATALOG", + "query": "Order", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Объясни класс Order", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C4_SEMANTIC_ROLES", + "query": "Объясни класс Order", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 8, + "ranking_profile": "code" + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "query": "Объясни класс Order", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + }, + { + "layer": "C3_ENTRYPOINTS", + "query": "Объясни класс Order", + "path_scope": [], + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "top_k": 6, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C1_SYMBOL_CATALOG", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + }, + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 8, + "candidates_after_filter": 8 + }, + { + "layer": "C4_SEMANTIC_ROLES", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 3, + "candidates_after_filter": 3 + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + }, + { + "layer": "C3_ENTRYPOINTS", + "effective_path_scope": [ + "src" + ], + "normalized_include_globs": [ + "src" + ], + "normalized_exclude_globs": [ + "tests/", + "test/", + "__tests__/", + "mocks/", + "fixtures/", + "stubs/", + "tests" + ], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 6, + "candidates_after_filter": 6 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "Order", + "alternatives": [ + "Order" + ] + }, + "layers": [ + { + "layer": "C1_SYMBOL_CATALOG", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + }, + { + "layer": "C4_SEMANTIC_ROLES", + "status": "hit", + "hit_count": 3, + "fail_reason": null + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "status": "hit", + "hit_count": 6, + "fail_reason": null + }, + { + "layer": "C3_ENTRYPOINTS", + "status": "hit", + "hit_count": 4, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 44, + "retrieval_by_layer": { + "C1_SYMBOL_CATALOG": 7, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 7, + "C2_DEPENDENCY_GRAPH": 7, + "C3_ENTRYPOINTS": 6 + }, + "merge_rank": 12 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/router_only_smoke/20260312_082745/router_rag_smoke_router_rag_explain_order.md b/tests/pipeline_setup_v2/test_results/router_only_smoke/20260312_082745/router_rag_smoke_router_rag_explain_order.md new file mode 100644 index 0000000..2d340ed --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/router_only_smoke/20260312_082745/router_rag_smoke_router_rag_explain_order.md @@ -0,0 +1,34 @@ +# router_rag_explain_order + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/router_rag_smoke.yaml +- runner: runtime +- mode: router_rag +- passed: True + +## Query +Объясни класс Order + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 15, + "llm_answer": "", + "answer_mode": "partial", + "path_scope": [], + "symbol_candidates": [ + "Order" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/router_only_smoke/20260312_082745/router_rag_smoke_router_rag_open_fixture_main.json b/tests/pipeline_setup_v2/test_results/router_only_smoke/20260312_082745/router_rag_smoke_router_rag_open_fixture_main.json new file mode 100644 index 0000000..d8970fd --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/router_only_smoke/20260312_082745/router_rag_smoke_router_rag_open_fixture_main.json @@ -0,0 +1,445 @@ +{ + "case_id": "router_rag_open_fixture_main", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/router_rag_smoke.yaml", + "runner": "runtime", + "mode": "router_rag", + "actual": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 1, + "llm_answer": "", + "answer_mode": "partial", + "path_scope": [ + "main.py" + ], + "symbol_candidates": [], + "layers": [ + "C0_SOURCE_CHUNKS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "router_rag_open_fixture_main", + "text": "Открой файл main.py", + "mode": "router_rag", + "run_started_at": "2026-03-12T08:27:46", + "rag_session_id": "c224dbc0-132c-4fd7-a106-3684df6455e1", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Открой файл main.py", + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [], + "confidence": 0.0 + }, + "rag_count": 1, + "rag_rows": [ + { + "path": "main.py", + "content": "\"\"\"Entrypoint: runs the orders API. Uses src layout (package order_app under src/).\"\"\"\n\nimport sys\nfrom pathlib import Path\n\n# Add src to path so \"order_app\" is importable from repo root\n_root = Path(__file__).resolve().parent\n_src = _root / \"src\"\nif str(_src) not in sys.path:\n sys.path.insert(0, str(_src))\n\nfrom order_app.api.orders import create_app\n\napp = create_app()\n\nif __name__ == \"__main__\":\n app.run(host=\"0.0.0.0\", port=8000)", + "layer": "C0_SOURCE_CHUNKS", + "title": "main.py:1-17", + "span_start": 1, + "span_end": 17, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "main", + "is_test": false, + "blob_sha": "978551aab97fa4171d023ff0c96439cb8961da8cfb5a1b8123b33c8e32518db5", + "repo_id": "code_qa_repo_runtime", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "llm_answer": null, + "summary": { + "router": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "confidence": null + }, + "retrieval": { + "profile": "code", + "layers_hit": [ + "C0_SOURCE_CHUNKS" + ], + "evidence_sufficient": true + }, + "llm": { + "answer_status": "partial", + "groundedness": "not_applicable" + } + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "unknown", + "symbol_candidates": [], + "keyword_hints": [], + "path_hints": [ + "main.py" + ], + "path_scope": [ + "main.py" + ], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "main.py" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": false, + "max_distance": 2, + "top_k": 5 + } + } + }, + "execution": { + "executed_layers": [ + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C0_SOURCE_CHUNKS": 200 + }, + "filters_by_layer": { + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "main.py" + ], + "include_globs": [], + "exclude_globs": [], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "code_qa_repo_runtime", + "workspace_id": "None", + "returned_repo_ids": [ + "code_qa_repo_runtime" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Открой файл main.py", + "path_scope": [ + "main.py" + ], + "include_globs": [], + "exclude_globs": [], + "prefer_globs": [], + "top_k": 200, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "main.py" + ], + "normalized_include_globs": [], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [] + }, + "layers": [ + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "router": 0, + "symbol_resolution": 0, + "retrieval_total": 6, + "retrieval_by_layer": { + "C0_SOURCE_CHUNKS": 6 + }, + "merge_rank": 0, + "prompt_build": 0, + "llm_call": 0 + }, + "prompt": null, + "router": { + "conversation_mode": "START", + "keyword_hints": [], + "path_scope": [ + "main.py" + ] + }, + "llm": { + "used_evidence_count": 1, + "missing_evidence_reason": null + } + }, + "run_info": { + "case_id": "router_rag_open_fixture_main", + "mode": "router_rag", + "run_started_at": "2026-03-12T08:27:46", + "rag_session_id": "c224dbc0-132c-4fd7-a106-3684df6455e1", + "expected_intent": "CODE_QA", + "actual_intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + }, + "input_request": { + "text": "Открой файл main.py", + "normalized_query": "Открой файл main.py" + }, + "steps": [ + { + "step": "intent_router", + "input": { + "query": "Открой файл main.py" + }, + "output": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query": "Открой файл main.py" + }, + "diagnostics": { + "router_plan": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "retrieval_profile": "code", + "conversation_mode": "START", + "layers": [ + "C0_SOURCE_CHUNKS" + ], + "symbol_kind_hint": "unknown", + "symbol_candidates": [], + "keyword_hints": [], + "path_hints": [ + "main.py" + ], + "path_scope": [ + "main.py" + ], + "doc_scope_hints": [], + "retrieval_constraints": { + "include_globs": [ + "main.py" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": false, + "max_distance": 2, + "top_k": 5 + } + } + }, + "timings_ms": { + "router": 0 + } + } + }, + { + "step": "retrieval", + "input": { + "query": "Открой файл main.py" + }, + "output": { + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [], + "confidence": 0.0 + }, + "rag_count": 1, + "rag_rows": [ + { + "path": "main.py", + "content": "\"\"\"Entrypoint: runs the orders API. Uses src layout (package order_app under src/).\"\"\"\n\nimport sys\nfrom pathlib import Path\n\n# Add src to path so \"order_app\" is importable from repo root\n_root = Path(__file__).resolve().parent\n_src = _root / \"src\"\nif str(_src) not in sys.path:\n sys.path.insert(0, str(_src))\n\nfrom order_app.api.orders import create_app\n\napp = create_app()\n\nif __name__ == \"__main__\":\n app.run(host=\"0.0.0.0\", port=8000)", + "layer": "C0_SOURCE_CHUNKS", + "title": "main.py:1-17", + "span_start": 1, + "span_end": 17, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "main", + "is_test": false, + "blob_sha": "978551aab97fa4171d023ff0c96439cb8961da8cfb5a1b8123b33c8e32518db5", + "repo_id": "code_qa_repo_runtime", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ] + }, + "diagnostics": { + "execution": { + "executed_layers": [ + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C0_SOURCE_CHUNKS": 200 + }, + "filters_by_layer": { + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "main.py" + ], + "include_globs": [], + "exclude_globs": [], + "prefer_globs": [] + } + }, + "repo_scope": { + "repo_id": "code_qa_repo_runtime", + "workspace_id": "None", + "returned_repo_ids": [ + "code_qa_repo_runtime" + ], + "returned_workspace_ids": [ + "None" + ] + } + }, + "retrieval": { + "requests": [ + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Открой файл main.py", + "path_scope": [ + "main.py" + ], + "include_globs": [], + "exclude_globs": [], + "prefer_globs": [], + "top_k": 200, + "ranking_profile": "code" + } + ], + "applied": [ + { + "layer": "C0_SOURCE_CHUNKS", + "effective_path_scope": [ + "main.py" + ], + "normalized_include_globs": [], + "normalized_exclude_globs": [], + "normalized_prefer_globs": [], + "filter_stage": "pre_rank", + "candidates_before_filter": 1, + "candidates_after_filter": 1 + } + ], + "fallback": { + "used": false, + "reason": null + }, + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [] + }, + "layers": [ + { + "layer": "C0_SOURCE_CHUNKS", + "status": "hit", + "hit_count": 1, + "fail_reason": null + } + ] + }, + "constraint_violations": [], + "timings_ms": { + "symbol_resolution": 0, + "retrieval_total": 6, + "retrieval_by_layer": { + "C0_SOURCE_CHUNKS": 6 + }, + "merge_rank": 0 + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/router_only_smoke/20260312_082745/router_rag_smoke_router_rag_open_fixture_main.md b/tests/pipeline_setup_v2/test_results/router_only_smoke/20260312_082745/router_rag_smoke_router_rag_open_fixture_main.md new file mode 100644 index 0000000..b6d2d46 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/router_only_smoke/20260312_082745/router_rag_smoke_router_rag_open_fixture_main.md @@ -0,0 +1,30 @@ +# router_rag_open_fixture_main + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/router_rag_smoke.yaml +- runner: runtime +- mode: router_rag +- passed: True + +## Query +Открой файл main.py + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 1, + "llm_answer": "", + "answer_mode": "partial", + "path_scope": [ + "main.py" + ], + "symbol_candidates": [], + "layers": [ + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/router_only_smoke/20260312_082745/summary.md b/tests/pipeline_setup_v2/test_results/router_only_smoke/20260312_082745/summary.md new file mode 100644 index 0000000..f1075a9 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/router_only_smoke/20260312_082745/summary.md @@ -0,0 +1,14 @@ +# pipeline_setup_v2 summary + +Passed: 5/5 + + +| File | Case | Runner | Mode | Intent | Sub-intent | Pass | +| ---------------------- | -------------------------------- | ------- | ----------- | ------- | ---------- | ---- | +| full_chain_smoke.yaml | full_chain_explain_order_service | runtime | full_chain | CODE_QA | EXPLAIN | ✓ | +| router_only_smoke.yaml | router_only_open_fixture_main | runtime | router_only | CODE_QA | OPEN_FILE | ✓ | +| router_only_smoke.yaml | router_only_docs_question | runtime | router_only | DOCS_QA | EXPLAIN | ✓ | +| router_rag_smoke.yaml | router_rag_open_fixture_main | runtime | router_rag | CODE_QA | OPEN_FILE | ✓ | +| router_rag_smoke.yaml | router_rag_explain_order | runtime | router_rag | CODE_QA | EXPLAIN | ✓ | + + diff --git a/tests/pipeline_setup_v2/test_results/suite_01_smoke/20260312_082358/code_qa_eval_explain_order_positive.json b/tests/pipeline_setup_v2/test_results/suite_01_smoke/20260312_082358/code_qa_eval_explain_order_positive.json new file mode 100644 index 0000000..620f7e5 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/suite_01_smoke/20260312_082358/code_qa_eval_explain_order_positive.json @@ -0,0 +1,58 @@ +{ + "case_id": "explain_order_positive", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_01_synthetic/code_qa_eval.yaml", + "runner": "code_qa_eval", + "mode": "router_rag", + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 15, + "llm_answer": "", + "answer_mode": "normal", + "path_scope": [], + "symbol_candidates": [ + "Order" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "explain_order_positive", + "query": "Объясни класс Order", + "rag_session_id": "44202d36-4a5a-4f4e-956c-a40debbd5e5d", + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 15, + "llm_answer": "", + "answer_mode": "normal", + "path_scope": [], + "symbol_candidates": [ + "Order" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "timings_ms": { + "router": 0, + "retrieval_total": 58, + "symbol_resolution": 0 + } + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/suite_01_smoke/20260312_082358/code_qa_eval_explain_order_positive.md b/tests/pipeline_setup_v2/test_results/suite_01_smoke/20260312_082358/code_qa_eval_explain_order_positive.md new file mode 100644 index 0000000..26e4c92 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/suite_01_smoke/20260312_082358/code_qa_eval_explain_order_positive.md @@ -0,0 +1,34 @@ +# explain_order_positive + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_01_synthetic/code_qa_eval.yaml +- runner: code_qa_eval +- mode: router_rag +- passed: True + +## Query +Объясни класс Order + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 15, + "llm_answer": "", + "answer_mode": "normal", + "path_scope": [], + "symbol_candidates": [ + "Order" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/suite_01_smoke/20260312_082358/code_qa_eval_explain_order_service_positive.json b/tests/pipeline_setup_v2/test_results/suite_01_smoke/20260312_082358/code_qa_eval_explain_order_service_positive.json new file mode 100644 index 0000000..69ec576 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/suite_01_smoke/20260312_082358/code_qa_eval_explain_order_service_positive.json @@ -0,0 +1,58 @@ +{ + "case_id": "explain_order_service_positive", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_01_synthetic/code_qa_eval.yaml", + "runner": "code_qa_eval", + "mode": "router_rag", + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 15, + "llm_answer": "", + "answer_mode": "normal", + "path_scope": [], + "symbol_candidates": [ + "OrderService" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "explain_order_service_positive", + "query": "Как работает OrderService?", + "rag_session_id": "44202d36-4a5a-4f4e-956c-a40debbd5e5d", + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 15, + "llm_answer": "", + "answer_mode": "normal", + "path_scope": [], + "symbol_candidates": [ + "OrderService" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "timings_ms": { + "router": 0, + "retrieval_total": 49, + "symbol_resolution": 0 + } + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/suite_01_smoke/20260312_082358/code_qa_eval_explain_order_service_positive.md b/tests/pipeline_setup_v2/test_results/suite_01_smoke/20260312_082358/code_qa_eval_explain_order_service_positive.md new file mode 100644 index 0000000..2c6a184 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/suite_01_smoke/20260312_082358/code_qa_eval_explain_order_service_positive.md @@ -0,0 +1,34 @@ +# explain_order_service_positive + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_01_synthetic/code_qa_eval.yaml +- runner: code_qa_eval +- mode: router_rag +- passed: True + +## Query +Как работает OrderService? + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 15, + "llm_answer": "", + "answer_mode": "normal", + "path_scope": [], + "symbol_candidates": [ + "OrderService" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/suite_01_smoke/20260312_082358/code_qa_eval_find_entrypoints_positive.json b/tests/pipeline_setup_v2/test_results/suite_01_smoke/20260312_082358/code_qa_eval_find_entrypoints_positive.json new file mode 100644 index 0000000..f7e2c1d --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/suite_01_smoke/20260312_082358/code_qa_eval_find_entrypoints_positive.json @@ -0,0 +1,55 @@ +{ + "case_id": "find_entrypoints_positive", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_01_synthetic/code_qa_eval.yaml", + "runner": "code_qa_eval", + "mode": "router_rag", + "actual": { + "intent": "PROJECT_MISC", + "sub_intent": "FIND_ENTRYPOINTS", + "graph_id": "ProjectMiscGraph", + "conversation_mode": "START", + "rag_count": 8, + "llm_answer": "", + "answer_mode": "degraded", + "path_scope": [], + "symbol_candidates": [], + "layers": [ + "D1_MODULE_CATALOG", + "D3_SECTION_INDEX", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ] + }, + "passed": false, + "mismatches": [ + "intent: expected CODE_QA, got PROJECT_MISC", + "answer_mode: expected normal, got degraded" + ], + "details": { + "case_id": "find_entrypoints_positive", + "query": "Какие точки входа в приложение?", + "rag_session_id": "44202d36-4a5a-4f4e-956c-a40debbd5e5d", + "actual": { + "intent": "PROJECT_MISC", + "sub_intent": "FIND_ENTRYPOINTS", + "graph_id": "ProjectMiscGraph", + "conversation_mode": "START", + "rag_count": 8, + "llm_answer": "", + "answer_mode": "degraded", + "path_scope": [], + "symbol_candidates": [], + "layers": [ + "D1_MODULE_CATALOG", + "D3_SECTION_INDEX", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ] + }, + "timings_ms": { + "router": 0, + "retrieval_total": 51, + "symbol_resolution": 0 + } + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/suite_01_smoke/20260312_082358/code_qa_eval_find_entrypoints_positive.md b/tests/pipeline_setup_v2/test_results/suite_01_smoke/20260312_082358/code_qa_eval_find_entrypoints_positive.md new file mode 100644 index 0000000..6a9c4b8 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/suite_01_smoke/20260312_082358/code_qa_eval_find_entrypoints_positive.md @@ -0,0 +1,32 @@ +# find_entrypoints_positive + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_01_synthetic/code_qa_eval.yaml +- runner: code_qa_eval +- mode: router_rag +- passed: False + +## Query +Какие точки входа в приложение? + +## Actual +{ + "intent": "PROJECT_MISC", + "sub_intent": "FIND_ENTRYPOINTS", + "graph_id": "ProjectMiscGraph", + "conversation_mode": "START", + "rag_count": 8, + "llm_answer": "", + "answer_mode": "degraded", + "path_scope": [], + "symbol_candidates": [], + "layers": [ + "D1_MODULE_CATALOG", + "D3_SECTION_INDEX", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- intent: expected CODE_QA, got PROJECT_MISC +- answer_mode: expected normal, got degraded \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/suite_01_smoke/20260312_082358/code_qa_eval_find_tests_positive.json b/tests/pipeline_setup_v2/test_results/suite_01_smoke/20260312_082358/code_qa_eval_find_tests_positive.json new file mode 100644 index 0000000..bfc236d --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/suite_01_smoke/20260312_082358/code_qa_eval_find_tests_positive.json @@ -0,0 +1,54 @@ +{ + "case_id": "find_tests_positive", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_01_synthetic/code_qa_eval.yaml", + "runner": "code_qa_eval", + "mode": "router_rag", + "actual": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 8, + "llm_answer": "", + "answer_mode": "normal", + "path_scope": [], + "symbol_candidates": [ + "OrderService" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "find_tests_positive", + "query": "Где тесты для OrderService?", + "rag_session_id": "44202d36-4a5a-4f4e-956c-a40debbd5e5d", + "actual": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 8, + "llm_answer": "", + "answer_mode": "normal", + "path_scope": [], + "symbol_candidates": [ + "OrderService" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "timings_ms": { + "router": 0, + "retrieval_total": 35, + "symbol_resolution": 0 + } + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/suite_01_smoke/20260312_082358/code_qa_eval_find_tests_positive.md b/tests/pipeline_setup_v2/test_results/suite_01_smoke/20260312_082358/code_qa_eval_find_tests_positive.md new file mode 100644 index 0000000..a0dde14 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/suite_01_smoke/20260312_082358/code_qa_eval_find_tests_positive.md @@ -0,0 +1,32 @@ +# find_tests_positive + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_01_synthetic/code_qa_eval.yaml +- runner: code_qa_eval +- mode: router_rag +- passed: True + +## Query +Где тесты для OrderService? + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 8, + "llm_answer": "", + "answer_mode": "normal", + "path_scope": [], + "symbol_candidates": [ + "OrderService" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/suite_01_smoke/20260312_082358/code_qa_eval_general_qa_positive.json b/tests/pipeline_setup_v2/test_results/suite_01_smoke/20260312_082358/code_qa_eval_general_qa_positive.json new file mode 100644 index 0000000..1aecab1 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/suite_01_smoke/20260312_082358/code_qa_eval_general_qa_positive.json @@ -0,0 +1,55 @@ +{ + "case_id": "general_qa_positive", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_01_synthetic/code_qa_eval.yaml", + "runner": "code_qa_eval", + "mode": "router_rag", + "actual": { + "intent": "PROJECT_MISC", + "sub_intent": "EXPLAIN", + "graph_id": "ProjectMiscGraph", + "conversation_mode": "START", + "rag_count": 8, + "llm_answer": "", + "answer_mode": "normal", + "path_scope": [], + "symbol_candidates": [], + "layers": [ + "D1_MODULE_CATALOG", + "D3_SECTION_INDEX", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ] + }, + "passed": false, + "mismatches": [ + "intent: expected CODE_QA, got PROJECT_MISC", + "sub_intent: expected GENERAL_QA, got EXPLAIN" + ], + "details": { + "case_id": "general_qa_positive", + "query": "Что делает этот проект?", + "rag_session_id": "44202d36-4a5a-4f4e-956c-a40debbd5e5d", + "actual": { + "intent": "PROJECT_MISC", + "sub_intent": "EXPLAIN", + "graph_id": "ProjectMiscGraph", + "conversation_mode": "START", + "rag_count": 8, + "llm_answer": "", + "answer_mode": "normal", + "path_scope": [], + "symbol_candidates": [], + "layers": [ + "D1_MODULE_CATALOG", + "D3_SECTION_INDEX", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ] + }, + "timings_ms": { + "router": 0, + "retrieval_total": 53, + "symbol_resolution": 0 + } + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/suite_01_smoke/20260312_082358/code_qa_eval_general_qa_positive.md b/tests/pipeline_setup_v2/test_results/suite_01_smoke/20260312_082358/code_qa_eval_general_qa_positive.md new file mode 100644 index 0000000..b98d2dc --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/suite_01_smoke/20260312_082358/code_qa_eval_general_qa_positive.md @@ -0,0 +1,32 @@ +# general_qa_positive + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_01_synthetic/code_qa_eval.yaml +- runner: code_qa_eval +- mode: router_rag +- passed: False + +## Query +Что делает этот проект? + +## Actual +{ + "intent": "PROJECT_MISC", + "sub_intent": "EXPLAIN", + "graph_id": "ProjectMiscGraph", + "conversation_mode": "START", + "rag_count": 8, + "llm_answer": "", + "answer_mode": "normal", + "path_scope": [], + "symbol_candidates": [], + "layers": [ + "D1_MODULE_CATALOG", + "D3_SECTION_INDEX", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- intent: expected CODE_QA, got PROJECT_MISC +- sub_intent: expected GENERAL_QA, got EXPLAIN \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/suite_01_smoke/20260312_082358/code_qa_eval_open_file_api_positive.json b/tests/pipeline_setup_v2/test_results/suite_01_smoke/20260312_082358/code_qa_eval_open_file_api_positive.json new file mode 100644 index 0000000..f7a362c --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/suite_01_smoke/20260312_082358/code_qa_eval_open_file_api_positive.json @@ -0,0 +1,50 @@ +{ + "case_id": "open_file_api_positive", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_01_synthetic/code_qa_eval.yaml", + "runner": "code_qa_eval", + "mode": "router_rag", + "actual": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 1, + "llm_answer": "", + "answer_mode": "normal", + "path_scope": [ + "src/order_app/api/orders.py" + ], + "symbol_candidates": [], + "layers": [ + "C0_SOURCE_CHUNKS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "open_file_api_positive", + "query": "Покажи src/order_app/api/orders.py", + "rag_session_id": "44202d36-4a5a-4f4e-956c-a40debbd5e5d", + "actual": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 1, + "llm_answer": "", + "answer_mode": "normal", + "path_scope": [ + "src/order_app/api/orders.py" + ], + "symbol_candidates": [], + "layers": [ + "C0_SOURCE_CHUNKS" + ] + }, + "timings_ms": { + "router": 0, + "retrieval_total": 6, + "symbol_resolution": 0 + } + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/suite_01_smoke/20260312_082358/code_qa_eval_open_file_api_positive.md b/tests/pipeline_setup_v2/test_results/suite_01_smoke/20260312_082358/code_qa_eval_open_file_api_positive.md new file mode 100644 index 0000000..1085ed6 --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/suite_01_smoke/20260312_082358/code_qa_eval_open_file_api_positive.md @@ -0,0 +1,30 @@ +# open_file_api_positive + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_01_synthetic/code_qa_eval.yaml +- runner: code_qa_eval +- mode: router_rag +- passed: True + +## Query +Покажи src/order_app/api/orders.py + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 1, + "llm_answer": "", + "answer_mode": "normal", + "path_scope": [ + "src/order_app/api/orders.py" + ], + "symbol_candidates": [], + "layers": [ + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/suite_01_smoke/20260312_082358/code_qa_eval_open_file_main_positive.json b/tests/pipeline_setup_v2/test_results/suite_01_smoke/20260312_082358/code_qa_eval_open_file_main_positive.json new file mode 100644 index 0000000..75a115c --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/suite_01_smoke/20260312_082358/code_qa_eval_open_file_main_positive.json @@ -0,0 +1,50 @@ +{ + "case_id": "open_file_main_positive", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_01_synthetic/code_qa_eval.yaml", + "runner": "code_qa_eval", + "mode": "router_rag", + "actual": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 1, + "llm_answer": "", + "answer_mode": "normal", + "path_scope": [ + "main.py" + ], + "symbol_candidates": [], + "layers": [ + "C0_SOURCE_CHUNKS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "case_id": "open_file_main_positive", + "query": "Открой файл main.py", + "rag_session_id": "44202d36-4a5a-4f4e-956c-a40debbd5e5d", + "actual": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 1, + "llm_answer": "", + "answer_mode": "normal", + "path_scope": [ + "main.py" + ], + "symbol_candidates": [], + "layers": [ + "C0_SOURCE_CHUNKS" + ] + }, + "timings_ms": { + "router": 0, + "retrieval_total": 7, + "symbol_resolution": 0 + } + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/suite_01_smoke/20260312_082358/code_qa_eval_open_file_main_positive.md b/tests/pipeline_setup_v2/test_results/suite_01_smoke/20260312_082358/code_qa_eval_open_file_main_positive.md new file mode 100644 index 0000000..d487c4e --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/suite_01_smoke/20260312_082358/code_qa_eval_open_file_main_positive.md @@ -0,0 +1,30 @@ +# open_file_main_positive + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_01_synthetic/code_qa_eval.yaml +- runner: code_qa_eval +- mode: router_rag +- passed: True + +## Query +Открой файл main.py + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 1, + "llm_answer": "", + "answer_mode": "normal", + "path_scope": [ + "main.py" + ], + "symbol_candidates": [], + "layers": [ + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v2/test_results/suite_01_smoke/20260312_082358/summary.md b/tests/pipeline_setup_v2/test_results/suite_01_smoke/20260312_082358/summary.md new file mode 100644 index 0000000..f9cad4f --- /dev/null +++ b/tests/pipeline_setup_v2/test_results/suite_01_smoke/20260312_082358/summary.md @@ -0,0 +1,17 @@ +# pipeline_setup_v2 summary + +Passed: 5/7 + +| File | Case | Runner | Mode | Intent | Sub-intent | Pass | +|------|------|--------|------|--------|------------|------| +| code_qa_eval.yaml | open_file_main_positive | code_qa_eval | router_rag | CODE_QA | OPEN_FILE | ✓ | +| code_qa_eval.yaml | open_file_api_positive | code_qa_eval | router_rag | CODE_QA | OPEN_FILE | ✓ | +| code_qa_eval.yaml | explain_order_positive | code_qa_eval | router_rag | CODE_QA | EXPLAIN | ✓ | +| code_qa_eval.yaml | explain_order_service_positive | code_qa_eval | router_rag | CODE_QA | EXPLAIN | ✓ | +| code_qa_eval.yaml | find_tests_positive | code_qa_eval | router_rag | CODE_QA | FIND_TESTS | ✓ | +| code_qa_eval.yaml | find_entrypoints_positive | code_qa_eval | router_rag | PROJECT_MISC | FIND_ENTRYPOINTS | ✗ | +| code_qa_eval.yaml | general_qa_positive | code_qa_eval | router_rag | PROJECT_MISC | EXPLAIN | ✗ | + +## Failures +- **find_entrypoints_positive**: intent: expected CODE_QA, got PROJECT_MISC; answer_mode: expected normal, got degraded +- **general_qa_positive**: intent: expected CODE_QA, got PROJECT_MISC; sub_intent: expected GENERAL_QA, got EXPLAIN \ No newline at end of file diff --git a/tests/pipeline_setup_v3/README.md b/tests/pipeline_setup_v3/README.md new file mode 100644 index 0000000..c2a2dcf --- /dev/null +++ b/tests/pipeline_setup_v3/README.md @@ -0,0 +1,34 @@ +# pipeline_setup_v3 + +`pipeline_setup_v3` is a test harness over agent runtime components. + +It keeps the same high-level workflow as the previous pipeline setups: + +- declare YAML test cases; +- resolve or build `rag_session_id`; +- run `router_only`, `router_rag`, or `full_chain`; +- write per-case JSON/Markdown details; +- write a Markdown summary. + +The important difference is that `v3` does not assemble a local test-only pipeline. +It uses agent components directly: + +- `IntentRouterV2` +- `CodeQaRetrievalAdapter` +- `CodeQaRuntimeExecutor` + +## Run + +```bash +PYTHONPATH=. python -m tests.pipeline_setup_v3.run \ + --cases-dir tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_smoke.yaml \ + --run-name smoke_v3 +``` + +## Reindex a repo into RAG + +```bash +PYTHONPATH=. python -m tests.pipeline_setup_v3.cli.index_repo \ + --repo-path /abs/path/to/repo \ + --project-id my_repo +``` diff --git a/tests/pipeline_setup_v3/__init__.py b/tests/pipeline_setup_v3/__init__.py new file mode 100644 index 0000000..80bcf4f --- /dev/null +++ b/tests/pipeline_setup_v3/__init__.py @@ -0,0 +1,3 @@ +from tests.pipeline_setup_v3.core.runner import V3Runner + +__all__ = ["V3Runner"] diff --git a/tests/pipeline_setup_v3/cases/suite_01_synthetic/code_qa_eval.yaml b/tests/pipeline_setup_v3/cases/suite_01_synthetic/code_qa_eval.yaml new file mode 100644 index 0000000..0afe259 --- /dev/null +++ b/tests/pipeline_setup_v3/cases/suite_01_synthetic/code_qa_eval.yaml @@ -0,0 +1,80 @@ +defaults: + runner: code_qa_eval + mode: router_rag + input: + repo_path: "../../../pipeline_setup/suite_01_synthetic/fixtures/code_qa_repo" + project_id: code_qa_repo + +cases: + - id: open_file_main_positive + query: "Открой файл main.py" + expected: + router: + intent: CODE_QA + sub_intent: OPEN_FILE + retrieval: + path_scope_contains: ["main.py"] + pipeline: + answer_mode: normal + + - id: open_file_api_positive + query: "Покажи src/order_app/api/orders.py" + expected: + router: + intent: CODE_QA + sub_intent: OPEN_FILE + retrieval: + path_scope_contains: ["src/order_app/api/orders.py"] + pipeline: + answer_mode: normal + + - id: explain_order_positive + query: "Объясни класс Order" + expected: + router: + intent: CODE_QA + sub_intent: EXPLAIN + retrieval: + symbol_candidates_contain: ["Order"] + pipeline: + answer_mode: normal + + - id: explain_order_service_positive + query: "Как работает OrderService?" + expected: + router: + intent: CODE_QA + sub_intent: EXPLAIN + retrieval: + symbol_candidates_contain: ["OrderService"] + pipeline: + answer_mode: normal + + - id: find_tests_positive + query: "Где тесты для OrderService?" + expected: + router: + intent: CODE_QA + sub_intent: FIND_TESTS + retrieval: + symbol_candidates_contain: ["OrderService"] + pipeline: + answer_mode: normal + + - id: find_entrypoints_positive + query: "Какие точки входа в приложение?" + expected: + router: + intent: CODE_QA + sub_intent: FIND_ENTRYPOINTS + pipeline: + answer_mode: normal + + - id: general_qa_positive + query: "Что делает этот проект?" + expected: + router: + intent: CODE_QA + sub_intent: GENERAL_QA + pipeline: + answer_mode: normal diff --git a/tests/pipeline_setup_v3/cases/suite_02_pipeline/full_chain_plba_code_retrieval.yaml b/tests/pipeline_setup_v3/cases/suite_02_pipeline/full_chain_plba_code_retrieval.yaml new file mode 100644 index 0000000..3b9e8f0 --- /dev/null +++ b/tests/pipeline_setup_v3/cases/suite_02_pipeline/full_chain_plba_code_retrieval.yaml @@ -0,0 +1,96 @@ +defaults: + runner: runtime + mode: full_chain + input: + rag_session_id: "7d11da21-faa0-4cea-aede-aeabe069164c" + +cases: + - id: plba-fullchain-explain-runtime-manager + query: "Объясни как работает класс RuntimeManager" + expected: + router: + intent: CODE_QA + sub_intent: EXPLAIN + graph_id: CodeQAGraph + conversation_mode: START + retrieval: + non_empty: true + symbol_candidates_contain: ["RuntimeManager"] + layers_include: ["C1_SYMBOL_CATALOG", "C0_SOURCE_CHUNKS"] + llm: + non_empty: true + + - id: plba-fullchain-explain-http-control-channel + query: "Объясни класс HttpControlChannel" + expected: + router: + intent: CODE_QA + sub_intent: EXPLAIN + graph_id: CodeQAGraph + conversation_mode: START + retrieval: + non_empty: true + symbol_candidates_contain: ["HttpControlChannel"] + layers_include: ["C1_SYMBOL_CATALOG", "C0_SOURCE_CHUNKS"] + llm: + non_empty: true + + - id: plba-fullchain-explain-control-plane-service + query: "Объясни класс ControlPlaneService" + expected: + router: + intent: CODE_QA + sub_intent: EXPLAIN + graph_id: CodeQAGraph + conversation_mode: START + retrieval: + non_empty: true + symbol_candidates_contain: ["ControlPlaneService"] + layers_include: ["C1_SYMBOL_CATALOG", "C0_SOURCE_CHUNKS"] + llm: + non_empty: true + + - id: plba-fullchain-explain-trace-service + query: "Как работает TraceService?" + expected: + router: + intent: CODE_QA + sub_intent: EXPLAIN + graph_id: CodeQAGraph + conversation_mode: START + retrieval: + non_empty: true + symbol_candidates_contain: ["TraceService"] + layers_include: ["C1_SYMBOL_CATALOG", "C0_SOURCE_CHUNKS"] + llm: + non_empty: true + + - id: plba-fullchain-explain-create-runtime + query: "Объясни функцию create_runtime" + expected: + router: + intent: CODE_QA + sub_intent: EXPLAIN + graph_id: CodeQAGraph + conversation_mode: START + retrieval: + non_empty: true + symbol_candidates_contain: ["create_runtime"] + layers_include: ["C1_SYMBOL_CATALOG", "C0_SOURCE_CHUNKS"] + llm: + non_empty: true + + - id: plba-fullchain-explain-workflow-engine + query: "Объясни класс WorkflowEngine" + expected: + router: + intent: CODE_QA + sub_intent: EXPLAIN + graph_id: CodeQAGraph + conversation_mode: START + retrieval: + non_empty: true + symbol_candidates_contain: ["WorkflowEngine"] + layers_include: ["C1_SYMBOL_CATALOG", "C0_SOURCE_CHUNKS"] + llm: + non_empty: true diff --git a/tests/pipeline_setup_v3/cases/suite_02_pipeline/full_chain_plba_code_subintents.yaml b/tests/pipeline_setup_v3/cases/suite_02_pipeline/full_chain_plba_code_subintents.yaml new file mode 100644 index 0000000..68055c8 --- /dev/null +++ b/tests/pipeline_setup_v3/cases/suite_02_pipeline/full_chain_plba_code_subintents.yaml @@ -0,0 +1,110 @@ +defaults: + runner: runtime + mode: full_chain + input: + rag_session_id: "7d11da21-faa0-4cea-aede-aeabe069164c" + +cases: + - id: plba-fullchain-open-file-runtime + query: "Открой файл src/app_runtime/core/runtime.py" + expected: + router: + intent: CODE_QA + sub_intent: OPEN_FILE + graph_id: CodeQAGraph + conversation_mode: START + retrieval: + non_empty: true + path_scope_contains: ["src/app_runtime/core/runtime.py"] + layers_include: ["C0_SOURCE_CHUNKS"] + llm: + non_empty: true + + - id: plba-fullchain-explain-runtime-manager + query: "Объясни как работает класс RuntimeManager" + expected: + router: + intent: CODE_QA + sub_intent: EXPLAIN + graph_id: CodeQAGraph + conversation_mode: START + retrieval: + non_empty: true + symbol_candidates_contain: ["RuntimeManager"] + layers_include: ["C1_SYMBOL_CATALOG", "C0_SOURCE_CHUNKS"] + llm: + non_empty: true + + - id: plba-fullchain-find-tests-runtime-manager + query: "Где тесты для RuntimeManager?" + expected: + router: + intent: CODE_QA + sub_intent: FIND_TESTS + graph_id: CodeQAGraph + conversation_mode: START + retrieval: + non_empty: true + symbol_candidates_contain: ["RuntimeManager"] + layers_include: ["C1_SYMBOL_CATALOG", "C2_DEPENDENCY_GRAPH", "C0_SOURCE_CHUNKS"] + llm: + non_empty: true + + - id: plba-fullchain-find-entrypoints + query: "Найди точки входа в коде" + expected: + router: + intent: CODE_QA + sub_intent: FIND_ENTRYPOINTS + graph_id: CodeQAGraph + conversation_mode: START + retrieval: + non_empty: true + layers_include: ["C3_ENTRYPOINTS", "C0_SOURCE_CHUNKS"] + llm: + non_empty: true + + - id: plba-fullchain-trace-flow-runtime-manager + query: "Покажи поток выполнения RuntimeManager" + expected: + router: + intent: CODE_QA + sub_intent: TRACE_FLOW + graph_id: CodeQAGraph + conversation_mode: START + retrieval: + non_empty: true + symbol_candidates_contain: ["RuntimeManager"] + layers_include: ["C2_DEPENDENCY_GRAPH", "C3_ENTRYPOINTS"] + llm: + non_empty: true + + - id: plba-fullchain-architecture-control-plane + query: "Какие компоненты участвуют в RuntimeManager?" + expected: + router: + intent: CODE_QA + sub_intent: ARCHITECTURE + graph_id: CodeQAGraph + conversation_mode: START + retrieval: + non_empty: true + layers_include: ["C4_SEMANTIC_ROLES", "C2_DEPENDENCY_GRAPH", "C3_ENTRYPOINTS"] + llm: + non_empty: true + + - id: plba-fullchain-explain-local-runtime-manager + query: "Почему в файле src/app_runtime/core/runtime.py класс RuntimeManager устроен так?" + expected: + router: + intent: CODE_QA + sub_intent: EXPLAIN_LOCAL + graph_id: CodeQAGraph + conversation_mode: START + retrieval: + non_empty: true + path_scope_contains: ["src/app_runtime/core/runtime.py"] + symbol_candidates_contain: ["RuntimeManager"] + layers_include: ["C1_SYMBOL_CATALOG", "C0_SOURCE_CHUNKS", "C2_DEPENDENCY_GRAPH"] + llm: + non_empty: true diff --git a/tests/pipeline_setup_v3/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml b/tests/pipeline_setup_v3/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml new file mode 100644 index 0000000..a00ca29 --- /dev/null +++ b/tests/pipeline_setup_v3/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml @@ -0,0 +1,305 @@ +defaults: + runner: runtime + mode: full_chain + input: + rag_session_id: "7d11da21-faa0-4cea-aede-aeabe069164c" + +cases: + # OPEN_FILE + - id: plba-v2-open-file-runtime + query: "Открой файл src/app_runtime/core/runtime.py" + expected: + router: + intent: CODE_QA + sub_intent: OPEN_FILE + graph_id: CodeQAGraph + conversation_mode: START + retrieval: + non_empty: true + path_scope_contains: ["src/app_runtime/core/runtime.py"] + layers_include: ["C0_SOURCE_CHUNKS"] + llm: + non_empty: true + answer_mode: answered + + - id: plba-v2-open-file-public-api + query: "Открой файл src/plba/__init__.py" + expected: + router: + intent: CODE_QA + sub_intent: OPEN_FILE + graph_id: CodeQAGraph + conversation_mode: START + retrieval: + non_empty: true + path_scope_contains: ["src/plba/__init__.py"] + layers_include: ["C0_SOURCE_CHUNKS"] + llm: + non_empty: true + excludes: ["из различных подпакетов", "ответ основан исключительно"] + + # EXPLAIN + - id: plba-v2-explain-runtime-manager + query: "Объясни как работает класс RuntimeManager" + expected: + router: + intent: CODE_QA + sub_intent: EXPLAIN + graph_id: CodeQAGraph + conversation_mode: START + retrieval: + non_empty: true + symbol_candidates_contain: ["RuntimeManager"] + layers_include: ["C1_SYMBOL_CATALOG", "C0_SOURCE_CHUNKS", "C2_DEPENDENCY_GRAPH"] + llm: + non_empty: true + excludes: ["ряд аргументов", "основные службы"] + + - id: plba-v2-explain-trace-service + query: "Объясни как работает класс TraceService" + expected: + router: + intent: CODE_QA + sub_intent: EXPLAIN + graph_id: CodeQAGraph + conversation_mode: START + retrieval: + non_empty: true + symbol_candidates_contain: ["TraceService"] + layers_include: ["C1_SYMBOL_CATALOG", "C0_SOURCE_CHUNKS", "C2_DEPENDENCY_GRAPH"] + llm: + non_empty: true + answer_mode: answered + + - id: plba-v2-explain-create-runtime + query: "Что делает функция create_runtime?" + expected: + router: + intent: CODE_QA + sub_intent: EXPLAIN + graph_id: CodeQAGraph + conversation_mode: START + retrieval: + non_empty: true + symbol_candidates_contain: ["create_runtime"] + layers_include: ["C1_SYMBOL_CATALOG", "C0_SOURCE_CHUNKS"] + llm: + non_empty: true + answer_mode: answered + + - id: plba-v2-explain-local-http-channel + query: "Почему в файле src/app_runtime/control/http_channel.py класс HttpControlChannel устроен так?" + expected: + router: + intent: CODE_QA + sub_intent: EXPLAIN_LOCAL + graph_id: CodeQAGraph + conversation_mode: START + retrieval: + non_empty: true + path_scope_contains: ["src/app_runtime/control/http_channel.py"] + symbol_candidates_contain: ["HttpControlChannel"] + layers_include: ["C1_SYMBOL_CATALOG", "C0_SOURCE_CHUNKS", "C2_DEPENDENCY_GRAPH"] + llm: + non_empty: true + answer_mode: answered + + # FIND_TESTS + - id: plba-v2-find-tests-runtime-manager + query: "Где тесты для RuntimeManager?" + expected: + router: + intent: CODE_QA + sub_intent: FIND_TESTS + graph_id: CodeQAGraph + conversation_mode: START + retrieval: + non_empty: true + symbol_candidates_contain: ["RuntimeManager"] + layers_include: ["C1_SYMBOL_CATALOG", "C2_DEPENDENCY_GRAPH", "C0_SOURCE_CHUNKS"] + llm: + non_empty: true + answer_mode: answered + + - id: plba-v2-find-tests-trace-service + query: "Где тесты для TraceService?" + expected: + router: + intent: CODE_QA + sub_intent: FIND_TESTS + graph_id: CodeQAGraph + conversation_mode: START + retrieval: + non_empty: true + symbol_candidates_contain: ["TraceService"] + layers_include: ["C1_SYMBOL_CATALOG", "C2_DEPENDENCY_GRAPH", "C0_SOURCE_CHUNKS"] + llm: + non_empty: true + answer_mode: answered + + - id: plba-v2-find-tests-create-runtime + query: "Где тесты для create_runtime?" + expected: + router: + intent: CODE_QA + sub_intent: FIND_TESTS + graph_id: CodeQAGraph + conversation_mode: START + retrieval: + non_empty: true + symbol_candidates_contain: ["create_runtime"] + layers_include: ["C1_SYMBOL_CATALOG", "C2_DEPENDENCY_GRAPH", "C0_SOURCE_CHUNKS"] + llm: + non_empty: true + answer_mode: answered + + - id: plba-v2-find-tests-workflow-runtime-factory-negative + query: "Где тесты для WorkflowRuntimeFactory?" + expected: + router: + intent: CODE_QA + sub_intent: FIND_TESTS + graph_id: CodeQAGraph + conversation_mode: START + retrieval: + direct_symbol_test_hits_max: 0 + symbol_candidates_contain: ["WorkflowRuntimeFactory"] + layers_include: ["C1_SYMBOL_CATALOG", "C2_DEPENDENCY_GRAPH", "C0_SOURCE_CHUNKS"] + llm: + non_empty: true + + # FIND_ENTRYPOINTS + - id: plba-v2-find-entrypoints-control-plane + query: "Найди точки входа HTTP control plane" + expected: + router: + intent: CODE_QA + sub_intent: FIND_ENTRYPOINTS + graph_id: CodeQAGraph + conversation_mode: START + retrieval: + non_empty: true + layers_include: ["C3_ENTRYPOINTS", "C0_SOURCE_CHUNKS"] + llm: + non_empty: true + answer_mode: answered + + - id: plba-v2-find-entrypoints-health-endpoint + query: "Где health endpoint?" + expected: + router: + intent: CODE_QA + sub_intent: FIND_ENTRYPOINTS + graph_id: CodeQAGraph + conversation_mode: START + retrieval: + non_empty: true + layers_include: ["C3_ENTRYPOINTS", "C0_SOURCE_CHUNKS"] + llm: + non_empty: true + contains_all: ["GET /health"] + excludes: ["нет явных неподтвержденных кандидатов", "кандидаты на health-endpoint"] + + # TRACE_FLOW + - id: plba-v2-trace-flow-runtime-start + query: "Покажи поток выполнения при запуске RuntimeManager" + expected: + router: + intent: CODE_QA + sub_intent: TRACE_FLOW + graph_id: CodeQAGraph + conversation_mode: START + retrieval: + non_empty: true + symbol_candidates_contain: ["RuntimeManager"] + layers_include: ["C2_DEPENDENCY_GRAPH", "C3_ENTRYPOINTS", "C0_SOURCE_CHUNKS"] + llm: + non_empty: true + answer_mode: answered + + - id: plba-v2-trace-flow-health-endpoint + query: "Покажи как проходит запрос /health в HttpControlAppFactory" + expected: + router: + intent: CODE_QA + sub_intent: TRACE_FLOW + graph_id: CodeQAGraph + conversation_mode: START + retrieval: + non_empty: true + symbol_candidates_contain: ["HttpControlAppFactory"] + layers_include: ["C2_DEPENDENCY_GRAPH", "C3_ENTRYPOINTS", "C0_SOURCE_CHUNKS"] + llm: + non_empty: true + answer_mode: answered + + # ARCHITECTURE + - id: plba-v2-architecture-runtime-manager + query: "Какие компоненты участвуют в RuntimeManager?" + expected: + router: + intent: CODE_QA + sub_intent: ARCHITECTURE + graph_id: CodeQAGraph + conversation_mode: START + retrieval: + non_empty: true + symbol_candidates_contain: ["RuntimeManager"] + layers_include: ["C4_SEMANTIC_ROLES", "C2_DEPENDENCY_GRAPH", "C0_SOURCE_CHUNKS"] + llm: + non_empty: true + answer_mode: answered + + - id: plba-v2-architecture-control-plane + query: "Какие компоненты участвуют в ControlPlaneService?" + expected: + router: + intent: CODE_QA + sub_intent: ARCHITECTURE + graph_id: CodeQAGraph + conversation_mode: START + retrieval: + non_empty: true + symbol_candidates_contain: ["ControlPlaneService"] + layers_include: ["C4_SEMANTIC_ROLES", "C2_DEPENDENCY_GRAPH", "C0_SOURCE_CHUNKS"] + llm: + non_empty: true + answer_mode: answered + + # NEGATIVE / NOT FOUND + - id: plba-v2-explain-nonexistent-symbol + query: "Объясни класс RuntimeFactoryManager" + expected: + router: + intent: CODE_QA + sub_intent: EXPLAIN + graph_id: CodeQAGraph + conversation_mode: START + retrieval: + non_empty: false + symbol_candidates_contain: ["RuntimeFactoryManager"] + layers_include: ["C1_SYMBOL_CATALOG", "C0_SOURCE_CHUNKS"] + llm: + non_empty: true + contains_all: ["не найдена"] + excludes: ["исходя из названия", "вероятно этот класс", "возможное предназначение"] + pipeline: + answer_mode: degraded + + - id: plba-v2-open-file-nonexistent + query: "Открой файл src/app_runtime/core/missing_runtime.py" + expected: + router: + intent: CODE_QA + sub_intent: OPEN_FILE + graph_id: CodeQAGraph + conversation_mode: START + retrieval: + non_empty: false + path_scope_contains: ["src/app_runtime/core/missing_runtime.py"] + layers_include: ["C0_SOURCE_CHUNKS"] + llm: + non_empty: true + contains_all: ["Файл src/app_runtime/core/missing_runtime.py не найден."] + pipeline: + answer_mode: degraded diff --git a/tests/pipeline_setup_v3/cases/suite_02_pipeline/full_chain_smoke.yaml b/tests/pipeline_setup_v3/cases/suite_02_pipeline/full_chain_smoke.yaml new file mode 100644 index 0000000..ee1b4b9 --- /dev/null +++ b/tests/pipeline_setup_v3/cases/suite_02_pipeline/full_chain_smoke.yaml @@ -0,0 +1,17 @@ +defaults: + runner: runtime + mode: full_chain + input: + repo_path: "../../../pipeline_setup/suite_01_synthetic/fixtures/code_qa_repo" + project_id: code_qa_repo_full_chain + +cases: + - id: full_chain_explain_order_service + query: "Как работает OrderService?" + expected: + router: + intent: CODE_QA + retrieval: + non_empty: true + llm: + non_empty: true diff --git a/tests/pipeline_setup_v3/cases/suite_02_pipeline/router_only_plba_code_retrieval.yaml b/tests/pipeline_setup_v3/cases/suite_02_pipeline/router_only_plba_code_retrieval.yaml new file mode 100644 index 0000000..ea2a24f --- /dev/null +++ b/tests/pipeline_setup_v3/cases/suite_02_pipeline/router_only_plba_code_retrieval.yaml @@ -0,0 +1,123 @@ +defaults: + runner: runtime + mode: router_only + input: + repo_path: "/Users/alex/Dev_projects_v2/apps/plba" + rag_session_id: "7d11da21-faa0-4cea-aede-aeabe069164c" + project_id: plba + +cases: + - id: plba-open-runtime-manager-file + query: "Открой файл src/app_runtime/core/runtime.py" + expected: + router: + intent: CODE_QA + sub_intent: OPEN_FILE + graph_id: CodeQAGraph + conversation_mode: START + + - id: plba-open-http-control-channel-file + query: "Покажи файл src/app_runtime/control/http_channel.py" + expected: + router: + intent: CODE_QA + sub_intent: OPEN_FILE + graph_id: CodeQAGraph + conversation_mode: START + + - id: plba-explain-runtime-manager + query: "Объясни как работает класс RuntimeManager" + expected: + router: + intent: CODE_QA + sub_intent: EXPLAIN + graph_id: CodeQAGraph + conversation_mode: START + retrieval: + symbol_candidates_contain: ["RuntimeManager"] + + - id: plba-explain-http-control-channel + query: "Объясни класс HttpControlChannel" + expected: + router: + intent: CODE_QA + sub_intent: EXPLAIN + graph_id: CodeQAGraph + conversation_mode: START + retrieval: + symbol_candidates_contain: ["HttpControlChannel"] + + - id: plba-explain-trace-service + query: "Как работает TraceService?" + expected: + router: + intent: CODE_QA + sub_intent: EXPLAIN + graph_id: CodeQAGraph + conversation_mode: START + retrieval: + symbol_candidates_contain: ["TraceService"] + + - id: plba-find-tests-runtime-manager + query: "Где тесты для RuntimeManager?" + expected: + router: + intent: CODE_QA + sub_intent: FIND_TESTS + graph_id: CodeQAGraph + conversation_mode: START + retrieval: + symbol_candidates_contain: ["RuntimeManager"] + + - id: plba-find-tests-http-control-channel + query: "Найди тесты для HttpControlChannel" + expected: + router: + intent: CODE_QA + sub_intent: FIND_TESTS + graph_id: CodeQAGraph + conversation_mode: START + retrieval: + symbol_candidates_contain: ["HttpControlChannel"] + + - id: plba-find-entrypoints-create-runtime + query: "Найди точки входа в коде" + expected: + router: + intent: CODE_QA + sub_intent: FIND_ENTRYPOINTS + graph_id: CodeQAGraph + conversation_mode: START + + - id: plba-find-entrypoints-bootstrap + query: "Объясни функцию create_runtime" + expected: + router: + intent: CODE_QA + sub_intent: EXPLAIN + graph_id: CodeQAGraph + conversation_mode: START + retrieval: + symbol_candidates_contain: ["create_runtime"] + + - id: plba-general-qa-runtime + query: "Объясни модуль runtime" + expected: + router: + intent: CODE_QA + sub_intent: EXPLAIN + graph_id: CodeQAGraph + conversation_mode: START + retrieval: + symbol_candidates_contain: ["runtime"] + + - id: plba-general-qa-control-plane + query: "Объясни код control plane" + expected: + router: + intent: CODE_QA + sub_intent: EXPLAIN + graph_id: CodeQAGraph + conversation_mode: START + retrieval: + symbol_candidates_contain: ["control", "plane"] diff --git a/tests/pipeline_setup_v3/cases/suite_02_pipeline/router_only_smoke.yaml b/tests/pipeline_setup_v3/cases/suite_02_pipeline/router_only_smoke.yaml new file mode 100644 index 0000000..afc1c4e --- /dev/null +++ b/tests/pipeline_setup_v3/cases/suite_02_pipeline/router_only_smoke.yaml @@ -0,0 +1,16 @@ +defaults: + runner: runtime + mode: router_only + +cases: + - id: router_only_open_fixture_main + query: "Открой файл main.py" + expected: + router: + intent: CODE_QA + + - id: router_only_docs_question + query: "Что сказано в README?" + expected: + router: + intent: DOCS_QA diff --git a/tests/pipeline_setup_v3/cases/suite_02_pipeline/router_rag_plba_code_retrieval.yaml b/tests/pipeline_setup_v3/cases/suite_02_pipeline/router_rag_plba_code_retrieval.yaml new file mode 100644 index 0000000..a9d8e4c --- /dev/null +++ b/tests/pipeline_setup_v3/cases/suite_02_pipeline/router_rag_plba_code_retrieval.yaml @@ -0,0 +1,148 @@ +defaults: + runner: runtime + mode: router_rag + input: + rag_session_id: "7d11da21-faa0-4cea-aede-aeabe069164c" + +cases: + - id: plba-rag-open-runtime-manager-file + query: "Открой файл src/app_runtime/core/runtime.py" + expected: + router: + intent: CODE_QA + sub_intent: OPEN_FILE + graph_id: CodeQAGraph + conversation_mode: START + retrieval: + non_empty: true + path_scope_contains: ["src/app_runtime/core/runtime.py"] + layers_include: ["C0_SOURCE_CHUNKS"] + + - id: plba-rag-open-http-control-channel-file + query: "Покажи файл src/app_runtime/control/http_channel.py" + expected: + router: + intent: CODE_QA + sub_intent: OPEN_FILE + graph_id: CodeQAGraph + conversation_mode: START + retrieval: + non_empty: true + path_scope_contains: ["src/app_runtime/control/http_channel.py"] + layers_include: ["C0_SOURCE_CHUNKS"] + + - id: plba-rag-explain-runtime-manager + query: "Объясни как работает класс RuntimeManager" + expected: + router: + intent: CODE_QA + sub_intent: EXPLAIN + graph_id: CodeQAGraph + conversation_mode: START + retrieval: + non_empty: true + symbol_candidates_contain: ["RuntimeManager"] + layers_include: ["C1_SYMBOL_CATALOG", "C0_SOURCE_CHUNKS"] + + - id: plba-rag-explain-http-control-channel + query: "Объясни класс HttpControlChannel" + expected: + router: + intent: CODE_QA + sub_intent: EXPLAIN + graph_id: CodeQAGraph + conversation_mode: START + retrieval: + non_empty: true + symbol_candidates_contain: ["HttpControlChannel"] + layers_include: ["C1_SYMBOL_CATALOG", "C0_SOURCE_CHUNKS"] + + - id: plba-rag-explain-trace-service + query: "Как работает TraceService?" + expected: + router: + intent: CODE_QA + sub_intent: EXPLAIN + graph_id: CodeQAGraph + conversation_mode: START + retrieval: + non_empty: true + symbol_candidates_contain: ["TraceService"] + layers_include: ["C1_SYMBOL_CATALOG", "C0_SOURCE_CHUNKS"] + + - id: plba-rag-find-tests-runtime-manager + query: "Где тесты для RuntimeManager?" + expected: + router: + intent: CODE_QA + sub_intent: FIND_TESTS + graph_id: CodeQAGraph + conversation_mode: START + retrieval: + non_empty: true + symbol_candidates_contain: ["RuntimeManager"] + layers_include: ["C1_SYMBOL_CATALOG", "C2_DEPENDENCY_GRAPH", "C0_SOURCE_CHUNKS"] + + - id: plba-rag-find-tests-http-control-channel + query: "Найди тесты для HttpControlChannel" + expected: + router: + intent: CODE_QA + sub_intent: FIND_TESTS + graph_id: CodeQAGraph + conversation_mode: START + retrieval: + non_empty: true + symbol_candidates_contain: ["HttpControlChannel"] + layers_include: ["C1_SYMBOL_CATALOG", "C2_DEPENDENCY_GRAPH", "C0_SOURCE_CHUNKS"] + + - id: plba-rag-find-entrypoints + query: "Найди точки входа в коде" + expected: + router: + intent: CODE_QA + sub_intent: FIND_ENTRYPOINTS + graph_id: CodeQAGraph + conversation_mode: START + retrieval: + non_empty: true + layers_include: ["C3_ENTRYPOINTS", "C0_SOURCE_CHUNKS"] + + - id: plba-rag-explain-create-runtime + query: "Объясни функцию create_runtime" + expected: + router: + intent: CODE_QA + sub_intent: EXPLAIN + graph_id: CodeQAGraph + conversation_mode: START + retrieval: + non_empty: true + symbol_candidates_contain: ["create_runtime"] + layers_include: ["C1_SYMBOL_CATALOG", "C0_SOURCE_CHUNKS"] + + - id: plba-rag-explain-control-plane-service + query: "Объясни класс ControlPlaneService" + expected: + router: + intent: CODE_QA + sub_intent: EXPLAIN + graph_id: CodeQAGraph + conversation_mode: START + retrieval: + non_empty: true + symbol_candidates_contain: ["ControlPlaneService"] + layers_include: ["C1_SYMBOL_CATALOG", "C0_SOURCE_CHUNKS"] + + - id: plba-rag-explain-workflow-engine + query: "Объясни класс WorkflowEngine" + expected: + router: + intent: CODE_QA + sub_intent: EXPLAIN + graph_id: CodeQAGraph + conversation_mode: START + retrieval: + non_empty: true + symbol_candidates_contain: ["WorkflowEngine"] + layers_include: ["C1_SYMBOL_CATALOG", "C0_SOURCE_CHUNKS"] diff --git a/tests/pipeline_setup_v3/cases/suite_02_pipeline/router_rag_smoke.yaml b/tests/pipeline_setup_v3/cases/suite_02_pipeline/router_rag_smoke.yaml new file mode 100644 index 0000000..48796f5 --- /dev/null +++ b/tests/pipeline_setup_v3/cases/suite_02_pipeline/router_rag_smoke.yaml @@ -0,0 +1,23 @@ +defaults: + runner: runtime + mode: router_rag + input: + repo_path: "../../../pipeline_setup/suite_01_synthetic/fixtures/code_qa_repo" + project_id: code_qa_repo_runtime + +cases: + - id: router_rag_open_fixture_main + query: "Открой файл main.py" + expected: + router: + intent: CODE_QA + retrieval: + non_empty: true + + - id: router_rag_explain_order + query: "Объясни класс Order" + expected: + router: + intent: CODE_QA + retrieval: + non_empty: true diff --git a/tests/pipeline_setup_v3/cli/__init__.py b/tests/pipeline_setup_v3/cli/__init__.py new file mode 100644 index 0000000..b13cdcd --- /dev/null +++ b/tests/pipeline_setup_v3/cli/__init__.py @@ -0,0 +1 @@ +# CLI entrypoints for pipeline_setup_v3. diff --git a/tests/pipeline_setup_v3/cli/index_repo.py b/tests/pipeline_setup_v3/cli/index_repo.py new file mode 100644 index 0000000..53f7923 --- /dev/null +++ b/tests/pipeline_setup_v3/cli/index_repo.py @@ -0,0 +1,22 @@ +from __future__ import annotations + +import sys +from pathlib import Path + +_agent_root = Path(__file__).resolve().parents[3] +if str(_agent_root) not in sys.path: + sys.path.insert(0, str(_agent_root)) +_src = _agent_root / "src" +if _src.exists() and str(_src) not in sys.path: + sys.path.insert(0, str(_src)) + + +def main() -> int: + argv = ["reindex", *sys.argv[1:]] + from tests.pipeline_setup.suite_02_pipeline.pipeline_intent_rag.cli import main as cli_main + + return cli_main(argv) + + +if __name__ == "__main__": + raise SystemExit(main()) diff --git a/tests/pipeline_setup_v3/core/__init__.py b/tests/pipeline_setup_v3/core/__init__.py new file mode 100644 index 0000000..80bcf4f --- /dev/null +++ b/tests/pipeline_setup_v3/core/__init__.py @@ -0,0 +1,3 @@ +from tests.pipeline_setup_v3.core.runner import V3Runner + +__all__ = ["V3Runner"] diff --git a/tests/pipeline_setup_v3/core/artifacts.py b/tests/pipeline_setup_v3/core/artifacts.py new file mode 100644 index 0000000..17b90cf --- /dev/null +++ b/tests/pipeline_setup_v3/core/artifacts.py @@ -0,0 +1,134 @@ +from __future__ import annotations + +import json +from datetime import datetime +from pathlib import Path + +from tests.pipeline_setup_v3.core.models import V3CaseResult + + +class ArtifactWriter: + def __init__(self, root: Path, run_name: str, started_at: datetime) -> None: + stamp = started_at.strftime("%Y%m%d_%H%M%S") + self.run_dir = root / run_name / stamp + self.run_dir.mkdir(parents=True, exist_ok=True) + + 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, + } + (self.run_dir / f"{stem}.json").write_text(json.dumps(payload, ensure_ascii=False, indent=2), encoding="utf-8") + lines = [ + f"# {result.case.case_id}", + "", + f"- source_file: {result.case.source_file.as_posix()}", + f"- runner: {result.case.runner}", + f"- mode: {result.case.mode}", + f"- passed: {result.passed}", + "", + "## Query", + result.case.query, + "", + "## Actual", + json.dumps(result.actual, ensure_ascii=False, indent=2), + "", + "## Steps", + json.dumps(result.details.get("steps") or [], ensure_ascii=False, indent=2), + "", + "## Diagnostics", + json.dumps(result.details.get("diagnostics") or {}, ensure_ascii=False, indent=2), + "", + "## 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 write_summary(self, results: list[V3CaseResult]) -> Path: + path = self.run_dir / "summary.md" + path.write_text(SummaryComposer().compose(results), encoding="utf-8") + return path + + +class SummaryComposer: + def compose(self, results: list[V3CaseResult]) -> str: + passed = sum(1 for item in results if item.passed) + lines = [ + "# pipeline_setup_v3 summary", + "", + f"Passed: {passed}/{len(results)}", + "", + "| File | Case | Mode | Query | Actual sub-intent | RAG layers | Pass |", + "|------|------|------|-------|-------------------|------------|------|", + ] + lines.extend(self._rows(results)) + failures = [item for item in results if not item.passed] + if failures: + lines.extend(["", "## Failures"]) + for item in failures: + lines.append(f"- **{item.case.case_id}**: {'; '.join(item.mismatches)}") + lines.extend(self._llm_section(results)) + return "\n".join(lines) + + def _rows(self, results: list[V3CaseResult]) -> list[str]: + rows: list[str] = [] + for item in results: + rows.append( + f"| {item.case.source_file.name} | {item.case.case_id} | {item.case.mode} | " + f"{self._cell(item.case.query)} | {item.actual.get('sub_intent') or '—'} | " + f"{self._layer_text(item.details)} | {'✓' if item.passed else '✗'} |" + ) + return rows + + def _layer_text(self, details: dict) -> str: + counts: dict[str, int] = {} + for row in details.get("rag_rows") or []: + layer = str(row.get("layer") or "").strip() + if layer: + counts[layer] = counts.get(layer, 0) + 1 + if not counts: + return "—" + return self._cell(", ".join(f"{key}:{value}" for key, value in sorted(counts.items())), limit=120) + + def _cell(self, text: str, limit: int = 140) -> str: + compact = " ".join(str(text).split()).replace("|", "\\|") + if len(compact) <= limit: + return compact + return compact[: limit - 1].rstrip() + "…" + + def _llm_section(self, results: list[V3CaseResult]) -> list[str]: + llm_results = [item for item in results if str(item.actual.get("llm_answer") or "").strip()] + if not llm_results: + return [] + lines = ["", "## LLM Answers"] + for item in llm_results: + lines.append(f"- **{item.case.case_id}**") + lines.append(f" Query: {self._cell(item.case.query, limit=400)}") + lines.extend(self._quote_block(self._snippet(str(item.actual.get("llm_answer") or "")))) + return lines + + def _snippet(self, text: str, limit: int = 880) -> str: + compact = " ".join(text.split()) + if len(compact) <= limit: + return compact + return compact[: limit - 1].rstrip() + "…" + + def _quote_block(self, text: str) -> list[str]: + quoted = text.strip() + if not quoted: + return [" > —"] + return [f" > {self._escape_markdown(line)}" for line in quoted.splitlines()] + + def _escape_markdown(self, text: str) -> str: + escaped = text + for char in ("\\", "`", "*", "_", "{", "}", "[", "]", "(", ")", "#", "+", "-", "!", "|"): + escaped = escaped.replace(char, f"\\{char}") + return escaped diff --git a/tests/pipeline_setup_v3/core/case_loader.py b/tests/pipeline_setup_v3/core/case_loader.py new file mode 100644 index 0000000..17a1398 --- /dev/null +++ b/tests/pipeline_setup_v3/core/case_loader.py @@ -0,0 +1,111 @@ +from __future__ import annotations + +from pathlib import Path + +import yaml + +from tests.pipeline_setup_v3.core.models import ( + CaseExpectations, + CaseInput, + LlmExpectation, + PipelineExpectation, + RetrievalExpectation, + RouterExpectation, + V3Case, +) + + +class CaseDirectoryLoader: + def load(self, cases_dir: Path) -> list[V3Case]: + if cases_dir.is_file(): + return self._load_file(cases_dir) + files = sorted(path for path in cases_dir.rglob("*.yaml") if path.is_file()) + if not files: + raise ValueError(f"No YAML case files found in: {cases_dir}") + cases: list[V3Case] = [] + for path in files: + cases.extend(self._load_file(path)) + return cases + + def _load_file(self, path: Path) -> list[V3Case]: + payload = yaml.safe_load(path.read_text(encoding="utf-8")) or {} + if not isinstance(payload, dict): + raise ValueError(f"Invalid case file {path}: expected mapping") + defaults = payload.get("defaults") or {} + items = payload.get("cases") or [] + if not isinstance(items, list): + raise ValueError(f"Invalid case file {path}: `cases` must be a list") + return [self._to_case(path, raw, defaults) for raw in items] + + def _to_case(self, path: Path, raw: object, defaults: dict) -> V3Case: + if not isinstance(raw, dict): + raise ValueError(f"Invalid case in {path}: expected object") + merged_input = {**dict(defaults.get("input") or {}), **dict(raw.get("input") or {})} + runner = self._normalize_runner(str(raw.get("runner") or defaults.get("runner") or "agent_runtime").strip()) + mode = str(raw.get("mode") or defaults.get("mode") or "").strip() + case_id = str(raw.get("id") or "").strip() + query = str(raw.get("query") or "").strip() + if not case_id or not query or not runner or not mode: + raise ValueError(f"Invalid case in {path}: `id`, `query`, `runner`, `mode` are required") + expected = dict(raw.get("expected") or {}) + return V3Case( + case_id=case_id, + runner=runner, # type: ignore[arg-type] + mode=mode, # type: ignore[arg-type] + query=query, + source_file=path, + input=self._to_input(path.parent, merged_input), + expectations=self._to_expectations(expected), + notes=str(raw.get("notes") or ""), + tags=tuple(str(item).strip() for item in raw.get("tags", []) if str(item).strip()), + ) + + def _to_input(self, base_dir: Path, raw: dict) -> CaseInput: + repo_path_raw = str(raw.get("repo_path") or "").strip() + repo_path = None + if repo_path_raw: + repo_path = Path(repo_path_raw).expanduser() + if not repo_path.is_absolute(): + repo_path = (base_dir / repo_path).resolve() + return CaseInput( + repo_path=repo_path, + project_id=str(raw.get("project_id") or "").strip() or None, + rag_session_id=str(raw.get("rag_session_id") or "").strip() or None, + ) + + def _to_expectations(self, raw: dict) -> CaseExpectations: + router = dict(raw.get("router") or {}) + retrieval = dict(raw.get("retrieval") or {}) + llm = dict(raw.get("llm") or {}) + pipeline = dict(raw.get("pipeline") or {}) + return CaseExpectations( + router=RouterExpectation( + intent=str(router.get("intent") or "").strip() or None, + sub_intent=str(router.get("sub_intent") or "").strip() or None, + graph_id=str(router.get("graph_id") or "").strip() or None, + conversation_mode=str(router.get("conversation_mode") or "").strip() or None, + ), + retrieval=RetrievalExpectation( + non_empty=retrieval.get("non_empty"), + min_rows=int(retrieval["min_rows"]) if retrieval.get("min_rows") is not None else None, + direct_symbol_test_hits_max=( + int(retrieval["direct_symbol_test_hits_max"]) + if retrieval.get("direct_symbol_test_hits_max") is not None + else None + ), + path_scope_contains=tuple(str(item) for item in retrieval.get("path_scope_contains") or []), + symbol_candidates_contain=tuple(str(item) for item in retrieval.get("symbol_candidates_contain") or []), + layers_include=tuple(str(item) for item in retrieval.get("layers_include") or []), + ), + 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 []), + ), + pipeline=PipelineExpectation(answer_mode=str(pipeline.get("answer_mode") or "").strip() or None), + ) + + def _normalize_runner(self, value: str) -> str: + if value in {"agent_runtime", "runtime", "code_qa_eval"}: + return "agent_runtime" + return value diff --git a/tests/pipeline_setup_v3/core/models.py b/tests/pipeline_setup_v3/core/models.py new file mode 100644 index 0000000..e2e5cf8 --- /dev/null +++ b/tests/pipeline_setup_v3/core/models.py @@ -0,0 +1,82 @@ +from __future__ import annotations + +from dataclasses import dataclass, field +from pathlib import Path +from typing import Literal + + +RunnerKind = Literal["agent_runtime"] +ModeKind = Literal["router_only", "router_rag", "full_chain"] + + +@dataclass(slots=True, frozen=True) +class CaseInput: + repo_path: Path | None = None + project_id: str | None = None + rag_session_id: str | None = None + + +@dataclass(slots=True, frozen=True) +class RouterExpectation: + intent: str | None = None + sub_intent: str | None = None + graph_id: str | None = None + conversation_mode: str | None = None + + +@dataclass(slots=True, frozen=True) +class RetrievalExpectation: + non_empty: bool | None = None + min_rows: int | None = None + direct_symbol_test_hits_max: int | None = None + path_scope_contains: tuple[str, ...] = () + symbol_candidates_contain: tuple[str, ...] = () + layers_include: tuple[str, ...] = () + + +@dataclass(slots=True, frozen=True) +class LlmExpectation: + non_empty: bool | None = None + contains_all: tuple[str, ...] = () + excludes: tuple[str, ...] = () + + +@dataclass(slots=True, frozen=True) +class PipelineExpectation: + answer_mode: str | None = None + + +@dataclass(slots=True, frozen=True) +class CaseExpectations: + router: RouterExpectation = RouterExpectation() + retrieval: RetrievalExpectation = RetrievalExpectation() + llm: LlmExpectation = LlmExpectation() + pipeline: PipelineExpectation = PipelineExpectation() + + +@dataclass(slots=True, frozen=True) +class V3Case: + case_id: str + runner: RunnerKind + mode: ModeKind + query: str + source_file: Path + input: CaseInput = CaseInput() + expectations: CaseExpectations = CaseExpectations() + notes: str = "" + tags: tuple[str, ...] = () + + +@dataclass(slots=True, frozen=True) +class ExecutionPayload: + actual: dict + details: dict + + +@dataclass(slots=True) +class V3CaseResult: + case: V3Case + actual: dict + details: dict + passed: bool + mismatches: list[str] = field(default_factory=list) diff --git a/tests/pipeline_setup_v3/core/runner.py b/tests/pipeline_setup_v3/core/runner.py new file mode 100644 index 0000000..cc6a511 --- /dev/null +++ b/tests/pipeline_setup_v3/core/runner.py @@ -0,0 +1,52 @@ +from __future__ import annotations + +from datetime import datetime +from pathlib import Path + +from tests.pipeline_setup_v3.core.artifacts import ArtifactWriter +from tests.pipeline_setup_v3.core.case_loader import CaseDirectoryLoader +from tests.pipeline_setup_v3.core.models import V3CaseResult +from tests.pipeline_setup_v3.core.session_provider import RagSessionProvider +from tests.pipeline_setup_v3.core.validators import CaseValidator + + +class V3Runner: + def __init__(self, cases_dir: Path, results_dir: Path, run_name: str) -> None: + self._cases_dir = cases_dir + self._validator = CaseValidator() + self._sessions = RagSessionProvider() + self._agent_runtime = None + self._writer = ArtifactWriter(results_dir, run_name=run_name, started_at=datetime.now()) + + @property + def run_dir(self) -> Path: + return self._writer.run_dir + + def run(self) -> tuple[list[V3CaseResult], Path]: + results: list[V3CaseResult] = [] + for case in CaseDirectoryLoader().load(self._cases_dir): + rag_session_id = self._sessions.resolve(case.input) + payload = self._execute(case, rag_session_id) + mismatches = self._validator.validate(case, payload.actual, payload.details) + result = V3CaseResult( + case=case, + actual=payload.actual, + details=payload.details, + passed=not mismatches, + mismatches=mismatches, + ) + self._writer.write_case(result) + results.append(result) + return results, self._writer.write_summary(results) + + def _execute(self, case, rag_session_id): + if case.runner != "agent_runtime": + raise ValueError(f"Unsupported runner: {case.runner}") + return self._agent_runtime_adapter().execute(case, rag_session_id) + + def _agent_runtime_adapter(self): + if self._agent_runtime is None: + from tests.pipeline_setup_v3.runtime.agent_runtime_adapter import AgentRuntimeAdapter + + self._agent_runtime = AgentRuntimeAdapter() + return self._agent_runtime diff --git a/tests/pipeline_setup_v3/core/session_provider.py b/tests/pipeline_setup_v3/core/session_provider.py new file mode 100644 index 0000000..fa99b27 --- /dev/null +++ b/tests/pipeline_setup_v3/core/session_provider.py @@ -0,0 +1,32 @@ +from __future__ import annotations + +from pathlib import Path + +from tests.pipeline_setup_v3.core.models import CaseInput + + +class RagSessionProvider: + def __init__(self) -> None: + self._repository = None + self._cache: dict[tuple[Path, str | None], str] = {} + + def resolve(self, case_input: CaseInput) -> str | None: + if case_input.rag_session_id: + return case_input.rag_session_id + if not case_input.repo_path: + return None + key = (case_input.repo_path, case_input.project_id) + if key not in self._cache: + self._cache[key] = self._build_indexer().index_repo( + case_input.repo_path, + project_id=case_input.project_id, + ) + return self._cache[key] + + def _build_indexer(self): + from app.modules.rag.persistence.repository import RagRepository + from tests.pipeline_setup.utils.rag_indexer import RagSessionIndexer + + if self._repository is None: + self._repository = RagRepository() + return RagSessionIndexer(self._repository) diff --git a/tests/pipeline_setup_v3/core/test_validators.py b/tests/pipeline_setup_v3/core/test_validators.py new file mode 100644 index 0000000..4488c88 --- /dev/null +++ b/tests/pipeline_setup_v3/core/test_validators.py @@ -0,0 +1,68 @@ +from __future__ import annotations + +from pathlib import Path + +from tests.pipeline_setup_v3.core.models import CaseExpectations, LlmExpectation, RetrievalExpectation, RouterExpectation, V3Case +from tests.pipeline_setup_v3.core.validators import CaseValidator + + +def test_direct_symbol_test_hits_allows_related_context_when_symbol_not_in_rows() -> None: + case = V3Case( + case_id="negative-find-tests", + runner="agent_runtime", + mode="full_chain", + query="Где тесты для WorkflowRuntimeFactory?", + source_file=Path("cases.yaml"), + expectations=CaseExpectations( + router=RouterExpectation(intent="CODE_QA", sub_intent="FIND_TESTS"), + retrieval=RetrievalExpectation( + direct_symbol_test_hits_max=0, + symbol_candidates_contain=("WorkflowRuntimeFactory",), + ), + ), + ) + actual = { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "rag_count": 2, + "symbol_candidates": ("WorkflowRuntimeFactory",), + "layers": ("C2_DEPENDENCY_GRAPH",), + } + details = { + "rag_rows": [ + { + "path": "tests/test_business_control_actions.py", + "title": "test_worker_wakes_up_with_configured_interval:dataflow_slice", + "content": "ScenarioWorker.name", + "metadata": {"is_test": True, "src_qname": "test_worker_wakes_up_with_configured_interval"}, + } + ] + } + + assert CaseValidator().validate(case, actual, details) == [] + + +def test_llm_contains_and_excludes_checks() -> None: + case = V3Case( + case_id="llm-quality", + runner="agent_runtime", + mode="full_chain", + query="Где health endpoint?", + source_file=Path("cases.yaml"), + expectations=CaseExpectations( + router=RouterExpectation(intent="CODE_QA", sub_intent="FIND_ENTRYPOINTS"), + llm=LlmExpectation( + non_empty=True, + contains_all=("GET /health",), + excludes=("нет явных неподтвержденных кандидатов",), + ), + ), + ) + actual = { + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "rag_count": 3, + "llm_answer": "GET /health объявлен в HttpControlAppFactory.", + } + + assert CaseValidator().validate(case, actual, {}) == [] diff --git a/tests/pipeline_setup_v3/core/validators.py b/tests/pipeline_setup_v3/core/validators.py new file mode 100644 index 0000000..e8d91c4 --- /dev/null +++ b/tests/pipeline_setup_v3/core/validators.py @@ -0,0 +1,98 @@ +from __future__ import annotations + +from tests.pipeline_setup_v3.core.models import V3Case + + +class CaseValidator: + def validate(self, case: V3Case, actual: dict, details: dict | None = None) -> list[str]: + mismatches: list[str] = [] + self._check(case.expectations.router.intent, actual.get("intent"), "intent", mismatches) + self._check(case.expectations.router.sub_intent, actual.get("sub_intent"), "sub_intent", mismatches) + self._check(case.expectations.router.graph_id, actual.get("graph_id"), "graph_id", mismatches) + self._check(case.expectations.router.conversation_mode, actual.get("conversation_mode"), "conversation_mode", mismatches) + self._check(case.expectations.pipeline.answer_mode, actual.get("answer_mode"), "answer_mode", mismatches) + self._check_retrieval(case, actual, details or {}, mismatches) + self._check_llm(case, actual, mismatches) + return mismatches + + def _check(self, expected, actual, label: str, mismatches: list[str]) -> None: + if label == "answer_mode" and expected == "degraded" and actual == "not_found": + return + if expected is not None and expected != actual: + mismatches.append(f"{label}: expected {expected}, got {actual}") + + def _check_retrieval(self, case: V3Case, actual: dict, details: dict, mismatches: list[str]) -> None: + rag_count = int(actual.get("rag_count") or 0) + retrieval = case.expectations.retrieval + if retrieval.non_empty is True and rag_count == 0: + mismatches.append("retrieval: expected non-empty rag, got 0 rows") + if retrieval.non_empty is False and rag_count != 0: + mismatches.append(f"retrieval: expected empty rag, got {rag_count} rows") + if retrieval.min_rows is not None and rag_count < retrieval.min_rows: + mismatches.append(f"retrieval: expected at least {retrieval.min_rows} rows, got {rag_count}") + if retrieval.direct_symbol_test_hits_max is not None: + direct_hits = self._direct_symbol_test_hits(case, details) + if direct_hits > retrieval.direct_symbol_test_hits_max: + mismatches.append( + f"retrieval: expected direct symbol-linked test hits <= {retrieval.direct_symbol_test_hits_max}, got {direct_hits}" + ) + 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 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 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 ())}") + + def _check_llm(self, case: V3Case, actual: dict, mismatches: list[str]) -> None: + llm = case.expectations.llm + answer = str(actual.get("llm_answer") or "").strip() + if llm.non_empty and not answer: + mismatches.append("llm: expected non-empty answer") + if llm.non_empty is False and answer: + mismatches.append("llm: expected empty answer") + lowered = answer.lower() + for value in llm.contains_all: + if value.lower() not in lowered: + mismatches.append(f"llm: expected answer to contain '{value}'") + for value in llm.excludes: + if value.lower() in lowered: + mismatches.append(f"llm: expected answer to exclude '{value}'") + + def _direct_symbol_test_hits(self, case: V3Case, details: dict) -> int: + symbols = tuple( + symbol.strip().lower() + for symbol in case.expectations.retrieval.symbol_candidates_contain + if symbol.strip() + ) + if not symbols: + return 0 + hits = 0 + for row in details.get("rag_rows") or []: + if not self._is_test_row(row): + continue + haystacks = self._row_search_texts(row) + if any(symbol in text for symbol in symbols for text in haystacks): + hits += 1 + return hits + + def _is_test_row(self, row: dict) -> bool: + path = str(row.get("path") or "").lower() + metadata = dict(row.get("metadata") or {}) + if bool(metadata.get("is_test")): + return True + return "/tests/" in f"/{path}" or path.startswith("tests/") or "/test_" in path or path.endswith("_test.py") + + def _row_search_texts(self, row: dict) -> tuple[str, ...]: + metadata = dict(row.get("metadata") or {}) + values = [ + str(row.get("title") or ""), + str(row.get("content") or ""), + str(metadata.get("qname") or ""), + str(metadata.get("symbol_name") or ""), + str(metadata.get("src_qname") or ""), + str(metadata.get("dst_ref") or ""), + ] + return tuple(value.lower() for value in values if value) diff --git a/tests/pipeline_setup_v3/run.py b/tests/pipeline_setup_v3/run.py new file mode 100644 index 0000000..31b9353 --- /dev/null +++ b/tests/pipeline_setup_v3/run.py @@ -0,0 +1,43 @@ +from __future__ import annotations + +import argparse +import sys +from pathlib import Path + +_agent_root = Path(__file__).resolve().parents[2] +if str(_agent_root) not in sys.path: + sys.path.insert(0, str(_agent_root)) +_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.core.runner import V3Runner + + +def main(argv: list[str] | None = None) -> int: + parser = argparse.ArgumentParser(description="Run agent-backed pipeline_setup_v3 cases") + 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") + 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") + + runner = V3Runner(cases_dir=cases_dir, results_dir=results_dir, run_name=str(ns.run_name).strip() or "manual_run") + print(f"Cases dir: {cases_dir}") + print(f"Run dir: {runner.run_dir}") + results, summary_path = runner.run() + passed = sum(1 for item in results if item.passed) + print(f"Passed: {passed}/{len(results)}") + print(f"Summary: {summary_path}") + for item in results: + if not item.passed: + print(f"FAIL {item.case.case_id}: {'; '.join(item.mismatches)}") + return 0 if passed == len(results) else 1 + + +if __name__ == "__main__": + raise SystemExit(main()) diff --git a/tests/pipeline_setup_v3/runtime/__init__.py b/tests/pipeline_setup_v3/runtime/__init__.py new file mode 100644 index 0000000..275f5d9 --- /dev/null +++ b/tests/pipeline_setup_v3/runtime/__init__.py @@ -0,0 +1,3 @@ +from tests.pipeline_setup_v3.runtime.agent_runtime_adapter import AgentRuntimeAdapter + +__all__ = ["AgentRuntimeAdapter"] diff --git a/tests/pipeline_setup_v3/runtime/agent_runtime_adapter.py b/tests/pipeline_setup_v3/runtime/agent_runtime_adapter.py new file mode 100644 index 0000000..8bf35f8 --- /dev/null +++ b/tests/pipeline_setup_v3/runtime/agent_runtime_adapter.py @@ -0,0 +1,171 @@ +from __future__ import annotations + +from app.modules.agent.code_qa_runtime import CodeQaRuntimeExecutor +from app.modules.agent.code_qa_runtime.repo_context import CodeQaRepoContextFactory +from app.modules.agent.code_qa_runtime.retrieval_adapter import CodeQaRetrievalAdapter +from app.modules.agent.llm import AgentLlmService +from app.modules.agent.prompt_loader import PromptLoader +from app.modules.rag.code_qa_pipeline.retrieval_request_builder import build_retrieval_request +from app.modules.rag.code_qa_pipeline.retrieval_result_builder import build_retrieval_result +from app.modules.rag.intent_router_v2 import ConversationState, IntentRouterV2 +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 +from tests.pipeline_setup_v3.core.models import ExecutionPayload, V3Case + + +class AgentRuntimeAdapter: + def __init__(self) -> None: + self._router = IntentRouterV2() + self._repo_context_factory = CodeQaRepoContextFactory() + self._retrieval = CodeQaRetrievalAdapter() + self._executor: CodeQaRuntimeExecutor | None = None + + def execute(self, case: V3Case, rag_session_id: str | None) -> ExecutionPayload: + if case.mode == "router_only": + return self._run_router_only(case) + if not rag_session_id: + raise ValueError(f"Case '{case.case_id}' requires rag_session_id or repo_path") + if case.mode == "router_rag": + return self._run_router_rag(case, rag_session_id) + if case.mode == "full_chain": + return self._run_full_chain(case, rag_session_id) + raise ValueError(f"Unsupported mode: {case.mode}") + + def _run_router_only(self, case: V3Case) -> ExecutionPayload: + route = self._route(case.query) + actual = self._actual_from_route(route) + details = { + "query": case.query, + "router_result": route.model_dump(mode="json"), + "rag_rows": [], + } + return ExecutionPayload(actual=actual, details=details) + + def _run_router_rag(self, case: V3Case, rag_session_id: str) -> ExecutionPayload: + route = self._route(case.query) + request = build_retrieval_request(route, rag_session_id) + raw_rows = self._retrieve_rows(rag_session_id, request) + symbol_resolution = self._resolve_symbol(route.symbol_resolution.model_dump(), raw_rows) + retrieval_result = build_retrieval_result(raw_rows, self._retrieval.consume_retrieval_report(), symbol_resolution) + actual = self._actual_from_route( + route, + rag_rows=raw_rows, + answer_mode="partial", + path_scope=list(request.path_scope or []), + layers=list(request.requested_layers or []), + symbol_candidates=list(request.symbol_candidates or []), + ) + details = { + "query": case.query, + "router_result": 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) + + def _run_full_chain(self, case: V3Case, rag_session_id: str) -> ExecutionPayload: + result = self._executor_instance().execute(user_query=case.query, rag_session_id=rag_session_id) + route = result.router_result + request = result.retrieval_request + actual = self._actual_from_route( + route, + rag_rows=list(result.retrieval_result.raw_rows) if result.retrieval_result else [], + llm_answer=result.final_answer, + answer_mode=_answer_status(result.answer_mode, result.llm_used), + path_scope=list(request.path_scope or []) if request else [], + layers=list(request.requested_layers or []) if request else [], + symbol_candidates=list(route.query_plan.symbol_candidates or []) if route else [], + ) + details = { + "query": case.query, + "router_result": route.model_dump(mode="json") if route else {}, + "retrieval_request": request.model_dump(mode="json") if request else {}, + "retrieval_result": result.retrieval_result.model_dump(mode="json") if result.retrieval_result else {}, + "diagnostics": result.diagnostics.model_dump(mode="json"), + "rag_rows": list(result.retrieval_result.raw_rows) if result.retrieval_result else [], + "validation": result.validation.model_dump(mode="json"), + "steps": 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 _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( + rag_session_id, + paths=list(request.path_scope), + layers=["C0_SOURCE_CHUNKS"], + limit=200, + query=request.query, + ranking_profile=str(getattr(request.retrieval_spec, "rerank_profile", "") or ""), + ) + return self._retrieval.retrieve_with_plan( + rag_session_id, + request.query, + request.retrieval_spec, + request.retrieval_constraints, + query_plan=request.query_plan, + ) + + def _resolve_symbol(self, initial: dict, rag_rows: list[dict]) -> dict: + if str(initial.get("status") or "") != "pending": + return initial + candidates = [str(item).strip() for item in initial.get("alternatives", []) if str(item).strip()] + found = [ + str(row.get("title") or "").strip() + for row in rag_rows + if str(row.get("layer") or "") == "C1_SYMBOL_CATALOG" and str(row.get("title") or "").strip() + ] + exact = next((item for item in found if item in candidates), None) + if exact: + return {"status": "resolved", "resolved_symbol": exact, "alternatives": found[:5], "confidence": 0.99} + if found: + return {"status": "ambiguous", "resolved_symbol": None, "alternatives": found[:5], "confidence": 0.55} + return {"status": "not_found", "resolved_symbol": None, "alternatives": [], "confidence": 0.0} + + def _actual_from_route( + self, + route, + *, + rag_rows: list[dict] | None = None, + llm_answer: str = "", + answer_mode: str = "partial", + path_scope: list[str] | None = None, + layers: list[str] | None = None, + symbol_candidates: list[str] | None = None, + ) -> dict: + route_dump = route.model_dump(mode="json") if route else {} + return { + "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"), + "rag_count": len(rag_rows or []), + "llm_answer": llm_answer, + "answer_mode": answer_mode, + "path_scope": tuple(path_scope or []), + "symbol_candidates": tuple(symbol_candidates or []), + "layers": tuple(layers or []), + } + + def _executor_instance(self) -> CodeQaRuntimeExecutor: + if self._executor is None: + self._executor = CodeQaRuntimeExecutor(_build_llm()) + return self._executor + + +def _build_llm() -> AgentLlmService: + settings = GigaChatSettings.from_env() + client = GigaChatClient(settings, GigaChatTokenProvider(settings)) + return AgentLlmService(client=client, prompts=PromptLoader()) + + +def _answer_status(answer_mode: str, llm_used: bool) -> str: + if answer_mode == "normal" and llm_used: + return "answered" + return answer_mode diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-architecture-control-plane.json b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-architecture-control-plane.json new file mode 100644 index 0000000..246a76b --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-architecture-control-plane.json @@ -0,0 +1,4171 @@ +{ + "case_id": "plba-v2-architecture-control-plane", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "agent_runtime", + "mode": "full_chain", + "query": "Какие компоненты участвуют в ControlPlaneService?", + "actual": { + "intent": "CODE_QA", + "sub_intent": "ARCHITECTURE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 33, + "llm_answer": "Подтвержденные связи и роли компонентов в контексте ControlPlaneService:\n\n### Компоненты и их роли\n\n1. **ControlPlaneService**\n - Роль: pipeline_stage\n - Описание: Инициализирует каналы управления и управляет ими.\n \n2. **ControlChannel**\n - Роль: model\n - Описание: Абстрактный класс для каналов управления с методами старта и остановки.\n\n3. **ControlActionSet**\n - Роль: model\n - Описание: Представляет набор действий контроля.\n\n4. **UvicornThreadRunner**\n - Роль: pipeline_stage\n - Описание: Управляет uvicorn сервером и участвует в потоках данных.\n\n5. **HttpControlChannel**\n - Роль: pipeline_stage\n - Описание: Канал управления HTTP-соединениями, участвующий в потоках данных.\n\n6. **HttpControlAppFactory**\n - Роль: factory\n - Описание: Фабрика для создания fastAPI приложений.\n\n7. **WorkflowPersistence**\n - Роль: pipeline_stage\n - Описание: Хранит информацию о процессах и взаимодействует с ними.\n\n8. **InMemoryTaskQueue**\n - Роль: pipeline_stage\n - Описание: Очередь задач, используемая для хранения промежуточных результатов.\n\n9. **ConfigFileLoader**\n - Роль: pipeline_stage\n - Описание: Загружает конфигурационные файлы и участвует в управлении состоянием приложения.\n\n10. **TraceContextStore**\n - Роль: pipeline_stage\n - Описание: Сохраняет контекст трассировки и управляет им.\n\n11. **WorkerSupervisor**\n - Роль: pipeline_stage\n - Описание: Наблюдает за рабочими процессами и обеспечивает их корректное выполнение.\n\n12. **WorkflowEngine**\n - Роль: pipeline_stage\n - Описание: Координирует выполнение рабочих процессов и управление ими.\n\n### Ограничения и замечания\n\nВсе перечисленные компоненты прямо или косвенно связаны с ControlPlaneService через зависимости или вызовы методов внутри ControlPlaneService. Они активно участвуют в его работе и обеспечивают функциональность и инфраструктуру, необходимую для выполнения его обязанностей.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "ControlPlaneService" + ], + "layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "query": "Какие компоненты участвуют в ControlPlaneService?", + "router_result": { + "schema_version": "1.1", + "intent": "CODE_QA", + "retrieval_profile": "code", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query_plan": { + "raw": "Какие компоненты участвуют в ControlPlaneService?", + "normalized": "Какие компоненты участвуют в ControlPlaneService?", + "sub_intent": "ARCHITECTURE", + "negations": [], + "expansions": [ + "ControlPlaneService" + ], + "keyword_hints": [ + "ControlPlaneService" + ], + "path_hints": [], + "doc_scope_hints": [], + "symbol_candidates": [ + "ControlPlaneService" + ], + "symbol_kind_hint": "class", + "anchors": [ + { + "type": "SYMBOL", + "value": "ControlPlaneService", + "source": "user_text", + "subtype": null, + "span": { + "start": 29, + "end": 48 + }, + "confidence": 0.88 + } + ] + }, + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C4_SEMANTIC_ROLES", + "top_k": 12 + }, + { + "layer_id": "C3_ENTRYPOINTS", + "top_k": 8 + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "top_k": 8 + }, + { + "layer_id": "C1_SYMBOL_CATALOG", + "top_k": 6 + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 4 + } + ], + "filters": { + "test_policy": "EXCLUDE", + "path_scope": [], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + }, + "symbol_resolution": { + "status": "pending", + "resolved_symbol": null, + "alternatives": [ + "ControlPlaneService" + ], + "confidence": 0.0 + }, + "evidence_policy": { + "require_def": true, + "require_flow": true, + "require_spec": false, + "allow_answer_without_evidence": false + } + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Какие компоненты участвуют в ControlPlaneService?", + "sub_intent": "ARCHITECTURE", + "path_scope": [], + "keyword_hints": [ + "ControlPlaneService" + ], + "symbol_candidates": [ + "ControlPlaneService" + ], + "requested_layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ], + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C4_SEMANTIC_ROLES", + "top_k": 12 + }, + { + "layer_id": "C3_ENTRYPOINTS", + "top_k": 8 + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "top_k": 8 + }, + { + "layer_id": "C1_SYMBOL_CATALOG", + "top_k": 6 + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 4 + } + ], + "filters": { + "test_policy": "EXCLUDE", + "path_scope": [], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + }, + "query_plan": { + "raw": "Какие компоненты участвуют в ControlPlaneService?", + "normalized": "Какие компоненты участвуют в ControlPlaneService?", + "sub_intent": "ARCHITECTURE", + "negations": [], + "expansions": [ + "ControlPlaneService" + ], + "keyword_hints": [ + "ControlPlaneService" + ], + "path_hints": [], + "doc_scope_hints": [], + "symbol_candidates": [ + "ControlPlaneService" + ], + "symbol_kind_hint": "class", + "anchors": [ + { + "type": "SYMBOL", + "value": "ControlPlaneService", + "source": "user_text", + "subtype": null, + "span": { + "start": 29, + "end": 48 + }, + "confidence": 0.88 + } + ] + } + }, + "retrieval_result": { + "target_symbol_candidates": [ + "ControlPlaneService", + "ControlChannel" + ], + "resolved_symbol": "ControlPlaneService", + "symbol_resolution_status": "resolved", + "file_candidates": [ + "src/app_runtime/control/service.py", + "src/app_runtime/control/base.py", + "src/app_runtime/control/http_runner.py", + "src/app_runtime/control/http_channel.py", + "src/app_runtime/control/http_app.py", + "src/app_runtime/workflow/persistence/workflow_persistence.py", + "src/app_runtime/queue/in_memory.py", + "src/app_runtime/config/file_loader.py", + "src/app_runtime/tracing/store.py", + "src/app_runtime/workers/supervisor.py", + "src/app_runtime/workflow/engine/workflow_engine.py", + "src/app_runtime/core/runtime.py", + "src/plba/control.py", + "src/app_runtime/control/__init__.py", + "src/plba/__init__.py" + ], + "code_chunks": [ + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "start_line": 12, + "end_line": 52, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/base.py", + "title": "ControlActionSet", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "start_line": 14, + "end_line": 18, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/base.py", + "title": "ControlChannel", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "start_line": 21, + "end_line": 28, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/http_runner.py", + "title": "UvicornThreadRunner", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "start_line": 10, + "end_line": 61, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/http_channel.py", + "title": "HttpControlChannel", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "start_line": 12, + "end_line": 57, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/http_app.py", + "title": "HttpControlAppFactory", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "start_line": 15, + "end_line": 53, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "title": "WorkflowPersistence", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "start_line": 8, + "end_line": 54, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/queue/in_memory.py", + "title": "InMemoryTaskQueue", + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)", + "start_line": 9, + "end_line": 38, + "metadata": { + "symbol_id": "2da04cb94544a3bcbf0943a95ad4bdd8710bcafaa32a02fd0e4de2178dcf3533", + "symbol_name": "InMemoryTaskQueue", + "qname": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 9, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "58f0cc001ccda0eee4c6bc32ed83bd05eafd6b6644f1e8b4aa9eed3103db73dc", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/config/file_loader.py", + "title": "ConfigFileLoader", + "content": "ConfigFileLoader\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (8)", + "start_line": 11, + "end_line": 48, + "metadata": { + "symbol_id": "a8474eca8b6e9dc86ae67ed68b16fa5fb639ef08739c053e7b7195489765667f", + "symbol_name": "ConfigFileLoader", + "qname": "ConfigFileLoader", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 8, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/tracing/store.py", + "title": "TraceContextStore", + "content": "TraceContextStore\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "start_line": 15, + "end_line": 52, + "metadata": { + "symbol_id": "b2dad4fbe16ffb11b58deba311c7739955c39d59f291b22181f33e9c8cce4059", + "symbol_name": "TraceContextStore", + "qname": "TraceContextStore", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "d369554f08fc92039c6edd5a2a1e73b23901533e8974459170bbd9347d263dc5", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/workers/supervisor.py", + "title": "WorkerSupervisor", + "content": "WorkerSupervisor\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "start_line": 10, + "end_line": 59, + "metadata": { + "symbol_id": "c17b44e8d9e97d490989b21fa67d7c346cdda8a0472e4c41fb243c8846faa124", + "symbol_name": "WorkerSupervisor", + "qname": "WorkerSupervisor", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "77609d9d5927171cce7fc3a54897c183fd63068710c6362029b700937aae5eee", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "title": "WorkflowEngine", + "content": "WorkflowEngine\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "start_line": 10, + "end_line": 86, + "metadata": { + "symbol_id": "57ec0a9f11c542c78e008684a888397e8d9ef4223671acb2567e631a0cbc70b4", + "symbol_name": "WorkflowEngine", + "qname": "WorkflowEngine", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C3_ENTRYPOINTS", + "path": "src/app_runtime/control/http_app.py", + "title": "app.post", + "content": "fastapi http app.post", + "start_line": 38, + "end_line": 42, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C3_ENTRYPOINTS", + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "content": "fastapi http app.get", + "start_line": 31, + "end_line": 34, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C3_ENTRYPOINTS", + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "content": "fastapi http app.get", + "start_line": 38, + "end_line": 42, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "start_line": 14, + "end_line": 47, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "start_line": 14, + "end_line": 17, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "start_line": 14, + "end_line": 20, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "start_line": 14, + "end_line": 25, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "start_line": 14, + "end_line": 51, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.start:calls", + "content": "ControlPlaneService.start calls asyncio.run", + "start_line": 22, + "end_line": 22, + "metadata": { + "edge_id": "4e0b3147fb867d48d26567570c259f4052a739e3098133802d4b8bafcf03be6b", + "edge_type": "calls", + "src_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "src_qname": "ControlPlaneService.start", + "dst_symbol_id": null, + "dst_ref": "asyncio.run", + "resolution": "partial", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.register_channel:reads_attr", + "content": "ControlPlaneService.register_channel reads_attr ControlPlaneService._channels", + "start_line": 17, + "end_line": 17, + "metadata": { + "edge_id": "3101fdc99a7a9c5aebf18a024bc148d37b348248a6fd02b95724dff280f2908a", + "edge_type": "reads_attr", + "src_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "src_qname": "ControlPlaneService.register_channel", + "dst_symbol_id": null, + "dst_ref": "ControlPlaneService._channels", + "resolution": "partial", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.start:reads_attr", + "content": "ControlPlaneService.start reads_attr ControlPlaneService._channels", + "start_line": 20, + "end_line": 20, + "metadata": { + "edge_id": "9452e50ef27d47c30ee1c311c48fe73ecddbf7a6dbcf967a6345e98222d9f71a", + "edge_type": "reads_attr", + "src_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "src_qname": "ControlPlaneService.start", + "dst_symbol_id": null, + "dst_ref": "ControlPlaneService._channels", + "resolution": "partial", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/core/runtime.py", + "title": "ControlPlaneService", + "content": "const ControlPlaneService\nControlPlaneService = app_runtime.control.service.ControlPlaneService", + "start_line": 7, + "end_line": 7, + "metadata": { + "symbol_id": "3030804d119fa1d4b8a6c32616062a5e11080b03d33818c9280bcc5bdd8fd512", + "qname": "ControlPlaneService", + "kind": "const", + "signature": "ControlPlaneService = app_runtime.control.service.ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/plba/control.py", + "title": "ControlPlaneService", + "content": "const ControlPlaneService\nControlPlaneService = app_runtime.control.service.ControlPlaneService", + "start_line": 3, + "end_line": 3, + "metadata": { + "symbol_id": "bd7f620031a049b8d791534536941ce75071029542395a7bb14817742827070a", + "qname": "ControlPlaneService", + "kind": "const", + "signature": "ControlPlaneService = app_runtime.control.service.ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.plba.control", + "is_test": false, + "blob_sha": "31bd5c4481bfa7fbca8fae56d4860a67e3953ca74474ac8439e1f39b685d7bc8", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService", + "content": "class ControlPlaneService\nControlPlaneService", + "start_line": 12, + "end_line": 52, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "qname": "ControlPlaneService", + "kind": "class", + "signature": "ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/__init__.py", + "title": "ControlPlaneService", + "content": "const ControlPlaneService\nControlPlaneService = app_runtime.control.service.ControlPlaneService", + "start_line": 3, + "end_line": 3, + "metadata": { + "symbol_id": "217e8f044d1c01644bf7b81e5046af9e84469210c692a2fb0c476a19bb069ae1", + "qname": "ControlPlaneService", + "kind": "const", + "signature": "ControlPlaneService = app_runtime.control.service.ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/plba/__init__.py", + "title": "ControlPlaneService", + "content": "const ControlPlaneService\nControlPlaneService = plba.control.ControlPlaneService", + "start_line": 3, + "end_line": 3, + "metadata": { + "symbol_id": "90b154d49d544efb7c448e91bf5b75231578a6571b98c06a2a555fa5dcffb152", + "qname": "ControlPlaneService", + "kind": "const", + "signature": "ControlPlaneService = plba.control.ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/__init__.py", + "title": "ControlChannel", + "content": "const ControlChannel\nControlChannel = app_runtime.control.base.ControlChannel", + "start_line": 1, + "end_line": 1, + "metadata": { + "symbol_id": "268420f7aa4ed74082b9276cae0cded4f00bac090ffd58fa020a65be0fe19c27", + "qname": "ControlChannel", + "kind": "const", + "signature": "ControlChannel = app_runtime.control.base.ControlChannel", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/base.py", + "title": "src/app_runtime/control/base.py:ControlChannel", + "content": "class ControlChannel(ABC):\n @abstractmethod\n async def start(self, actions: ControlActionSet) -> None:\n \"\"\"Start the control channel and bind handlers.\"\"\"\n\n @abstractmethod\n async def stop(self) -> None:\n \"\"\"Stop the control channel and release resources.\"\"\"", + "start_line": 21, + "end_line": 28, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/__init__.py", + "title": "src/app_runtime/control/__init__.py:1-5", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\"ControlActionSet\", \"ControlChannel\", \"ControlPlaneService\", \"HttpControlChannel\"]", + "start_line": 1, + "end_line": 5, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/base.py", + "title": "src/app_runtime/control/base.py:ControlActionSet", + "content": "class ControlActionSet:\n health: HealthHandler\n start: ActionHandler\n stop: ActionHandler\n status: ActionHandler", + "start_line": 14, + "end_line": 18, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/http_app.py", + "title": "src/app_runtime/control/http_app.py:HttpControlAppFactory", + "content": "class HttpControlAppFactory:\n def create(\n self,\n health_provider: Callable[[], Awaitable[HealthPayload]],\n action_provider: Callable[[str, str], Awaitable[JSONResponse]],\n ) -> FastAPI:\n app = FastAPI(title=\"PLBA Control API\")\n\n @app.middleware(\"http\")\n async def log_api_call(request: Request, call_next): # type: ignore[no-untyped-def]\n started = time.monotonic()\n response = await call_next(request)\n response.headers[\"X-Response-Time-Ms\"] = str(int((time.monotonic() - started) * 1000))\n return response\n\n @app.get(\"/health\")\n async def health() -> JSONResponse:\n payload = await health_provider()\n status_code = 200 if payload.get(\"status\") == \"ok\" else 503\n return JSONResponse(content=payload, status_code=status_code)\n\n @app.get(\"/actions/{action}\")\n @app.post(\"/actions/{action}\")\n async def action(action: str, request: Request) -> JSONResponse:\n client_source = self._client_source(request)\n if action in {\"start\", \"stop\"}:\n LOGGER.warning(\"Control action requested: /actions/%s client=%s\", action, client_source)\n return await action_provider(action, client_source)\n\n return app\n\n def _client_source(self, request: Request) -> str:\n explicit_header = request.headers.get(\"X-Client-Source\", \"\").strip()\n if explicit_header:\n return explicit_header\n user_agent = request.headers.get(\"User-Agent\", \"\").strip()\n if user_agent:\n return f\"user-agent:{user_agent}\"\n return \"unknown\"", + "start_line": 15, + "end_line": 53, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "relations": [ + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async" + }, + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel" + }, + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start" + }, + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop" + }, + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async" + }, + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "4e0b3147fb867d48d26567570c259f4052a739e3098133802d4b8bafcf03be6b", + "edge_type": "calls", + "src_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "src_qname": "ControlPlaneService.start", + "dst_symbol_id": null, + "dst_ref": "asyncio.run", + "resolution": "partial", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.start calls asyncio.run" + }, + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "3101fdc99a7a9c5aebf18a024bc148d37b348248a6fd02b95724dff280f2908a", + "edge_type": "reads_attr", + "src_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "src_qname": "ControlPlaneService.register_channel", + "dst_symbol_id": null, + "dst_ref": "ControlPlaneService._channels", + "resolution": "partial", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.register_channel reads_attr ControlPlaneService._channels" + }, + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "9452e50ef27d47c30ee1c311c48fe73ecddbf7a6dbcf967a6345e98222d9f71a", + "edge_type": "reads_attr", + "src_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "src_qname": "ControlPlaneService.start", + "dst_symbol_id": null, + "dst_ref": "ControlPlaneService._channels", + "resolution": "partial", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.start reads_attr ControlPlaneService._channels" + } + ], + "entrypoints": [ + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.post", + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "test_candidates": [], + "layer_outcomes": [ + { + "layer_id": "C4_SEMANTIC_ROLES", + "hit_count": 12, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C3_ENTRYPOINTS", + "hit_count": 3, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 6, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 4, + "empty": false, + "fallback_used": false + } + ], + "missing_layers": [], + "raw_rows": [ + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/queue/in_memory.py", + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)", + "layer": "C4_SEMANTIC_ROLES", + "title": "InMemoryTaskQueue", + "span_start": 9, + "span_end": 38, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 22, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "2da04cb94544a3bcbf0943a95ad4bdd8710bcafaa32a02fd0e4de2178dcf3533", + "symbol_name": "InMemoryTaskQueue", + "qname": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 9, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "58f0cc001ccda0eee4c6bc32ed83bd05eafd6b6644f1e8b4aa9eed3103db73dc", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "ConfigFileLoader\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (8)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ConfigFileLoader", + "span_start": 11, + "span_end": 48, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 23, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "a8474eca8b6e9dc86ae67ed68b16fa5fb639ef08739c053e7b7195489765667f", + "symbol_name": "ConfigFileLoader", + "qname": "ConfigFileLoader", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 8, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/store.py", + "content": "TraceContextStore\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "TraceContextStore", + "span_start": 15, + "span_end": 52, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "b2dad4fbe16ffb11b58deba311c7739955c39d59f291b22181f33e9c8cce4059", + "symbol_name": "TraceContextStore", + "qname": "TraceContextStore", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "d369554f08fc92039c6edd5a2a1e73b23901533e8974459170bbd9347d263dc5", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workers/supervisor.py", + "content": "WorkerSupervisor\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkerSupervisor", + "span_start": 10, + "span_end": 59, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "c17b44e8d9e97d490989b21fa67d7c346cdda8a0472e4c41fb243c8846faa124", + "symbol_name": "WorkerSupervisor", + "qname": "WorkerSupervisor", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "77609d9d5927171cce7fc3a54897c183fd63068710c6362029b700937aae5eee", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowEngine", + "span_start": 10, + "span_end": 86, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "57ec0a9f11c542c78e008684a888397e8d9ef4223671acb2567e631a0cbc70b4", + "symbol_name": "WorkflowEngine", + "qname": "WorkflowEngine", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": null, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": null, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": null, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.start calls asyncio.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.start:calls", + "span_start": 22, + "span_end": 22, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "4e0b3147fb867d48d26567570c259f4052a739e3098133802d4b8bafcf03be6b", + "edge_type": "calls", + "src_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "src_qname": "ControlPlaneService.start", + "dst_symbol_id": null, + "dst_ref": "asyncio.run", + "resolution": "partial", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.register_channel reads_attr ControlPlaneService._channels", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.register_channel:reads_attr", + "span_start": 17, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "3101fdc99a7a9c5aebf18a024bc148d37b348248a6fd02b95724dff280f2908a", + "edge_type": "reads_attr", + "src_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "src_qname": "ControlPlaneService.register_channel", + "dst_symbol_id": null, + "dst_ref": "ControlPlaneService._channels", + "resolution": "partial", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.start reads_attr ControlPlaneService._channels", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.start:reads_attr", + "span_start": 20, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "9452e50ef27d47c30ee1c311c48fe73ecddbf7a6dbcf967a6345e98222d9f71a", + "edge_type": "reads_attr", + "src_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "src_qname": "ControlPlaneService.start", + "dst_symbol_id": null, + "dst_ref": "ControlPlaneService._channels", + "resolution": "partial", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "const ControlPlaneService\nControlPlaneService = app_runtime.control.service.ControlPlaneService", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlPlaneService", + "span_start": 7, + "span_end": 7, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "3030804d119fa1d4b8a6c32616062a5e11080b03d33818c9280bcc5bdd8fd512", + "qname": "ControlPlaneService", + "kind": "const", + "signature": "ControlPlaneService = app_runtime.control.service.ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/control.py", + "content": "const ControlPlaneService\nControlPlaneService = app_runtime.control.service.ControlPlaneService", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlPlaneService", + "span_start": 3, + "span_end": 3, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "bd7f620031a049b8d791534536941ce75071029542395a7bb14817742827070a", + "qname": "ControlPlaneService", + "kind": "const", + "signature": "ControlPlaneService = app_runtime.control.service.ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.plba.control", + "is_test": false, + "blob_sha": "31bd5c4481bfa7fbca8fae56d4860a67e3953ca74474ac8439e1f39b685d7bc8", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "class ControlPlaneService\nControlPlaneService", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "qname": "ControlPlaneService", + "kind": "class", + "signature": "ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "const ControlPlaneService\nControlPlaneService = app_runtime.control.service.ControlPlaneService", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlPlaneService", + "span_start": 3, + "span_end": 3, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "217e8f044d1c01644bf7b81e5046af9e84469210c692a2fb0c476a19bb069ae1", + "qname": "ControlPlaneService", + "kind": "const", + "signature": "ControlPlaneService = app_runtime.control.service.ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/__init__.py", + "content": "const ControlPlaneService\nControlPlaneService = plba.control.ControlPlaneService", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlPlaneService", + "span_start": 3, + "span_end": 3, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "90b154d49d544efb7c448e91bf5b75231578a6571b98c06a2a555fa5dcffb152", + "qname": "ControlPlaneService", + "kind": "const", + "signature": "ControlPlaneService = plba.control.ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "const ControlChannel\nControlChannel = app_runtime.control.base.ControlChannel", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlChannel", + "span_start": 1, + "span_end": 1, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "268420f7aa4ed74082b9276cae0cded4f00bac090ffd58fa020a65be0fe19c27", + "qname": "ControlChannel", + "kind": "const", + "signature": "ControlChannel = app_runtime.control.base.ControlChannel", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlChannel(ABC):\n @abstractmethod\n async def start(self, actions: ControlActionSet) -> None:\n \"\"\"Start the control channel and bind handlers.\"\"\"\n\n @abstractmethod\n async def stop(self) -> None:\n \"\"\"Stop the control channel and release resources.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\"ControlActionSet\", \"ControlChannel\", \"ControlPlaneService\", \"HttpControlChannel\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/__init__.py:1-5", + "span_start": 1, + "span_end": 5, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlActionSet:\n health: HealthHandler\n start: ActionHandler\n stop: ActionHandler\n status: ActionHandler", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "class HttpControlAppFactory:\n def create(\n self,\n health_provider: Callable[[], Awaitable[HealthPayload]],\n action_provider: Callable[[str, str], Awaitable[JSONResponse]],\n ) -> FastAPI:\n app = FastAPI(title=\"PLBA Control API\")\n\n @app.middleware(\"http\")\n async def log_api_call(request: Request, call_next): # type: ignore[no-untyped-def]\n started = time.monotonic()\n response = await call_next(request)\n response.headers[\"X-Response-Time-Ms\"] = str(int((time.monotonic() - started) * 1000))\n return response\n\n @app.get(\"/health\")\n async def health() -> JSONResponse:\n payload = await health_provider()\n status_code = 200 if payload.get(\"status\") == \"ok\" else 503\n return JSONResponse(content=payload, status_code=status_code)\n\n @app.get(\"/actions/{action}\")\n @app.post(\"/actions/{action}\")\n async def action(action: str, request: Request) -> JSONResponse:\n client_source = self._client_source(request)\n if action in {\"start\", \"stop\"}:\n LOGGER.warning(\"Control action requested: /actions/%s client=%s\", action, client_source)\n return await action_provider(action, client_source)\n\n return app\n\n def _client_source(self, request: Request) -> str:\n explicit_header = request.headers.get(\"X-Client-Source\", \"\").strip()\n if explicit_header:\n return explicit_header\n user_agent = request.headers.get(\"User-Agent\", \"\").strip()\n if user_agent:\n return f\"user-agent:{user_agent}\"\n return \"unknown\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_app.py:HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "retrieval_report": { + "executed_layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C4_SEMANTIC_ROLES": "vector", + "C3_ENTRYPOINTS": "vector", + "C2_DEPENDENCY_GRAPH": "vector", + "C1_SYMBOL_CATALOG": "vector", + "C0_SOURCE_CHUNKS": "vector" + }, + "top_k_by_layer": { + "C4_SEMANTIC_ROLES": 12, + "C3_ENTRYPOINTS": 8, + "C2_DEPENDENCY_GRAPH": 8, + "C1_SYMBOL_CATALOG": 6, + "C0_SOURCE_CHUNKS": 4 + }, + "filters_by_layer": { + "C4_SEMANTIC_ROLES": { + "path_scope": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [] + }, + "C1_SYMBOL_CATALOG": { + "path_scope": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [] + } + }, + "fallback": { + "used": false, + "reason": null + }, + "retrieval_by_layer_ms": { + "C4_SEMANTIC_ROLES": 40, + "C3_ENTRYPOINTS": 20, + "C2_DEPENDENCY_GRAPH": 60, + "C1_SYMBOL_CATALOG": 25, + "C0_SOURCE_CHUNKS": 17 + } + } + }, + "diagnostics": { + "intent_correct": null, + "target_found": true, + "layers_used": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ], + "retrieval_sufficient": true, + "answer_mode": "normal", + "router_result": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "ARCHITECTURE", + "path_scope": [], + "layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ], + "symbol_resolution_status": "pending" + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Какие компоненты участвуют в ControlPlaneService?", + "sub_intent": "ARCHITECTURE", + "path_scope": [], + "requested_layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "C4_SEMANTIC_ROLES", + "hit_count": 12, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C3_ENTRYPOINTS", + "hit_count": 3, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 6, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 4, + "empty": false, + "fallback_used": false + } + ], + "empty_layers": [], + "evidence_gate_decision": { + "sufficient": true, + "failure_reasons": [], + "evidence_count": 33 + }, + "failure_reasons": [], + "timings_ms": {} + }, + "rag_rows": [ + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/queue/in_memory.py", + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)", + "layer": "C4_SEMANTIC_ROLES", + "title": "InMemoryTaskQueue", + "span_start": 9, + "span_end": 38, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 22, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "2da04cb94544a3bcbf0943a95ad4bdd8710bcafaa32a02fd0e4de2178dcf3533", + "symbol_name": "InMemoryTaskQueue", + "qname": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 9, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "58f0cc001ccda0eee4c6bc32ed83bd05eafd6b6644f1e8b4aa9eed3103db73dc", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "ConfigFileLoader\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (8)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ConfigFileLoader", + "span_start": 11, + "span_end": 48, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 23, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "a8474eca8b6e9dc86ae67ed68b16fa5fb639ef08739c053e7b7195489765667f", + "symbol_name": "ConfigFileLoader", + "qname": "ConfigFileLoader", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 8, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/store.py", + "content": "TraceContextStore\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "TraceContextStore", + "span_start": 15, + "span_end": 52, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b2dad4fbe16ffb11b58deba311c7739955c39d59f291b22181f33e9c8cce4059", + "symbol_name": "TraceContextStore", + "qname": "TraceContextStore", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "d369554f08fc92039c6edd5a2a1e73b23901533e8974459170bbd9347d263dc5", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workers/supervisor.py", + "content": "WorkerSupervisor\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkerSupervisor", + "span_start": 10, + "span_end": 59, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "c17b44e8d9e97d490989b21fa67d7c346cdda8a0472e4c41fb243c8846faa124", + "symbol_name": "WorkerSupervisor", + "qname": "WorkerSupervisor", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "77609d9d5927171cce7fc3a54897c183fd63068710c6362029b700937aae5eee", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowEngine", + "span_start": 10, + "span_end": 86, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "57ec0a9f11c542c78e008684a888397e8d9ef4223671acb2567e631a0cbc70b4", + "symbol_name": "WorkflowEngine", + "qname": "WorkflowEngine", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.start calls asyncio.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.start:calls", + "span_start": 22, + "span_end": 22, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "4e0b3147fb867d48d26567570c259f4052a739e3098133802d4b8bafcf03be6b", + "edge_type": "calls", + "src_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "src_qname": "ControlPlaneService.start", + "dst_symbol_id": null, + "dst_ref": "asyncio.run", + "resolution": "partial", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.register_channel reads_attr ControlPlaneService._channels", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.register_channel:reads_attr", + "span_start": 17, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3101fdc99a7a9c5aebf18a024bc148d37b348248a6fd02b95724dff280f2908a", + "edge_type": "reads_attr", + "src_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "src_qname": "ControlPlaneService.register_channel", + "dst_symbol_id": null, + "dst_ref": "ControlPlaneService._channels", + "resolution": "partial", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.start reads_attr ControlPlaneService._channels", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.start:reads_attr", + "span_start": 20, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "9452e50ef27d47c30ee1c311c48fe73ecddbf7a6dbcf967a6345e98222d9f71a", + "edge_type": "reads_attr", + "src_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "src_qname": "ControlPlaneService.start", + "dst_symbol_id": null, + "dst_ref": "ControlPlaneService._channels", + "resolution": "partial", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "const ControlPlaneService\nControlPlaneService = app_runtime.control.service.ControlPlaneService", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlPlaneService", + "span_start": 7, + "span_end": 7, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "3030804d119fa1d4b8a6c32616062a5e11080b03d33818c9280bcc5bdd8fd512", + "qname": "ControlPlaneService", + "kind": "const", + "signature": "ControlPlaneService = app_runtime.control.service.ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/control.py", + "content": "const ControlPlaneService\nControlPlaneService = app_runtime.control.service.ControlPlaneService", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlPlaneService", + "span_start": 3, + "span_end": 3, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "bd7f620031a049b8d791534536941ce75071029542395a7bb14817742827070a", + "qname": "ControlPlaneService", + "kind": "const", + "signature": "ControlPlaneService = app_runtime.control.service.ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.plba.control", + "is_test": false, + "blob_sha": "31bd5c4481bfa7fbca8fae56d4860a67e3953ca74474ac8439e1f39b685d7bc8", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "class ControlPlaneService\nControlPlaneService", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "qname": "ControlPlaneService", + "kind": "class", + "signature": "ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "const ControlPlaneService\nControlPlaneService = app_runtime.control.service.ControlPlaneService", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlPlaneService", + "span_start": 3, + "span_end": 3, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "217e8f044d1c01644bf7b81e5046af9e84469210c692a2fb0c476a19bb069ae1", + "qname": "ControlPlaneService", + "kind": "const", + "signature": "ControlPlaneService = app_runtime.control.service.ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/__init__.py", + "content": "const ControlPlaneService\nControlPlaneService = plba.control.ControlPlaneService", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlPlaneService", + "span_start": 3, + "span_end": 3, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "90b154d49d544efb7c448e91bf5b75231578a6571b98c06a2a555fa5dcffb152", + "qname": "ControlPlaneService", + "kind": "const", + "signature": "ControlPlaneService = plba.control.ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "const ControlChannel\nControlChannel = app_runtime.control.base.ControlChannel", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlChannel", + "span_start": 1, + "span_end": 1, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "268420f7aa4ed74082b9276cae0cded4f00bac090ffd58fa020a65be0fe19c27", + "qname": "ControlChannel", + "kind": "const", + "signature": "ControlChannel = app_runtime.control.base.ControlChannel", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlChannel(ABC):\n @abstractmethod\n async def start(self, actions: ControlActionSet) -> None:\n \"\"\"Start the control channel and bind handlers.\"\"\"\n\n @abstractmethod\n async def stop(self) -> None:\n \"\"\"Stop the control channel and release resources.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\"ControlActionSet\", \"ControlChannel\", \"ControlPlaneService\", \"HttpControlChannel\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/__init__.py:1-5", + "span_start": 1, + "span_end": 5, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlActionSet:\n health: HealthHandler\n start: ActionHandler\n stop: ActionHandler\n status: ActionHandler", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "class HttpControlAppFactory:\n def create(\n self,\n health_provider: Callable[[], Awaitable[HealthPayload]],\n action_provider: Callable[[str, str], Awaitable[JSONResponse]],\n ) -> FastAPI:\n app = FastAPI(title=\"PLBA Control API\")\n\n @app.middleware(\"http\")\n async def log_api_call(request: Request, call_next): # type: ignore[no-untyped-def]\n started = time.monotonic()\n response = await call_next(request)\n response.headers[\"X-Response-Time-Ms\"] = str(int((time.monotonic() - started) * 1000))\n return response\n\n @app.get(\"/health\")\n async def health() -> JSONResponse:\n payload = await health_provider()\n status_code = 200 if payload.get(\"status\") == \"ok\" else 503\n return JSONResponse(content=payload, status_code=status_code)\n\n @app.get(\"/actions/{action}\")\n @app.post(\"/actions/{action}\")\n async def action(action: str, request: Request) -> JSONResponse:\n client_source = self._client_source(request)\n if action in {\"start\", \"stop\"}:\n LOGGER.warning(\"Control action requested: /actions/%s client=%s\", action, client_source)\n return await action_provider(action, client_source)\n\n return app\n\n def _client_source(self, request: Request) -> str:\n explicit_header = request.headers.get(\"X-Client-Source\", \"\").strip()\n if explicit_header:\n return explicit_header\n user_agent = request.headers.get(\"User-Agent\", \"\").strip()\n if user_agent:\n return f\"user-agent:{user_agent}\"\n return \"unknown\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_app.py:HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "validation": { + "passed": true, + "action": "return", + "reasons": [] + } + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-architecture-control-plane.md b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-architecture-control-plane.md new file mode 100644 index 0000000..37bd2fd --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-architecture-control-plane.md @@ -0,0 +1,34 @@ +# plba-v2-architecture-control-plane + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: agent_runtime +- mode: full_chain +- passed: True + +## Query +Какие компоненты участвуют в ControlPlaneService? + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "ARCHITECTURE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 33, + "llm_answer": "Подтвержденные связи и роли компонентов в контексте ControlPlaneService:\n\n### Компоненты и их роли\n\n1. **ControlPlaneService**\n - Роль: pipeline_stage\n - Описание: Инициализирует каналы управления и управляет ими.\n \n2. **ControlChannel**\n - Роль: model\n - Описание: Абстрактный класс для каналов управления с методами старта и остановки.\n\n3. **ControlActionSet**\n - Роль: model\n - Описание: Представляет набор действий контроля.\n\n4. **UvicornThreadRunner**\n - Роль: pipeline_stage\n - Описание: Управляет uvicorn сервером и участвует в потоках данных.\n\n5. **HttpControlChannel**\n - Роль: pipeline_stage\n - Описание: Канал управления HTTP-соединениями, участвующий в потоках данных.\n\n6. **HttpControlAppFactory**\n - Роль: factory\n - Описание: Фабрика для создания fastAPI приложений.\n\n7. **WorkflowPersistence**\n - Роль: pipeline_stage\n - Описание: Хранит информацию о процессах и взаимодействует с ними.\n\n8. **InMemoryTaskQueue**\n - Роль: pipeline_stage\n - Описание: Очередь задач, используемая для хранения промежуточных результатов.\n\n9. **ConfigFileLoader**\n - Роль: pipeline_stage\n - Описание: Загружает конфигурационные файлы и участвует в управлении состоянием приложения.\n\n10. **TraceContextStore**\n - Роль: pipeline_stage\n - Описание: Сохраняет контекст трассировки и управляет им.\n\n11. **WorkerSupervisor**\n - Роль: pipeline_stage\n - Описание: Наблюдает за рабочими процессами и обеспечивает их корректное выполнение.\n\n12. **WorkflowEngine**\n - Роль: pipeline_stage\n - Описание: Координирует выполнение рабочих процессов и управление ими.\n\n### Ограничения и замечания\n\nВсе перечисленные компоненты прямо или косвенно связаны с ControlPlaneService через зависимости или вызовы методов внутри ControlPlaneService. Они активно участвуют в его работе и обеспечивают функциональность и инфраструктуру, необходимую для выполнения его обязанностей.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "ControlPlaneService" + ], + "layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-architecture-runtime-manager.json b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-architecture-runtime-manager.json new file mode 100644 index 0000000..9235c24 --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-architecture-runtime-manager.json @@ -0,0 +1,4363 @@ +{ + "case_id": "plba-v2-architecture-runtime-manager", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "agent_runtime", + "mode": "full_chain", + "query": "Какие компоненты участвуют в RuntimeManager?", + "actual": { + "intent": "CODE_QA", + "sub_intent": "ARCHITECTURE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 33, + "llm_answer": "### Компоненты, участвующие в RuntimeManager\n\n#### Подтвержденные связи\n1. **RuntimeManager**\n - Role: Pipeline Stage\n - Responsibilities:\n - Manager responsibilities\n - Orchestration of role-like calls\n - State attribute reading/writing\n - Participation in dataflow slices\n\n2. **ControlPlaneService**\n - Role: Pipeline Stage\n - Responsibilities:\n - Service responsibilities\n - State attribute reading/writing\n - Participation in dataflow slices\n\n3. **UvicornThreadRunner**\n - Role: Pipeline Stage\n - Responsibilities:\n - State attribute reading/writing\n - Participation in dataflow slices\n\n4. **HttpControlChannel**\n - Role: Pipeline Stage\n - Responsibilities:\n - State attribute reading/writing\n - Participation in dataflow slices\n\n5. **WorkflowPersistence**\n - Role: Pipeline Stage\n - Responsibilities:\n - Orchestration of role-like calls\n - State attribute reading/writing\n - Participation in dataflow slices\n\n6. **InMemoryTaskQueue**\n - Role: Pipeline Stage\n - Responsibilities:\n - State attribute reading/writing\n - Participation in dataflow slices\n\n7. **ConfigFileLoader**\n - Role: Pipeline Stage\n - Responsibilities:\n - State attribute reading/writing\n - Participation in dataflow slices\n\n8. **TraceContextStore**\n - Role: Pipeline Stage\n - Responsibilities:\n - State attribute reading/writing\n - Participation in dataflow slices\n\n9. **WorkerSupervisor**\n - Role: Pipeline Stage\n - Responsibilities:\n - State attribute reading/writing\n - Participation in dataflow slices\n\n### Ограничения найденного контекста\n- Все перечисленные компоненты являются участниками данных потоков выполнения (dataflow slices).\n- Каждый компонент выполняет операции чтения и записи состояния атрибутов.\n- Некоторые из них выполняют дополнительные обязанности, такие как участие в оркестрации или инициировании ролей.\n\nТаким образом, участники RuntimeManager включают перечисленные выше компоненты.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "query": "Какие компоненты участвуют в RuntimeManager?", + "router_result": { + "schema_version": "1.1", + "intent": "CODE_QA", + "retrieval_profile": "code", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query_plan": { + "raw": "Какие компоненты участвуют в RuntimeManager?", + "normalized": "Какие компоненты участвуют в RuntimeManager?", + "sub_intent": "ARCHITECTURE", + "negations": [], + "expansions": [ + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "doc_scope_hints": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "symbol_kind_hint": "class", + "anchors": [ + { + "type": "SYMBOL", + "value": "RuntimeManager", + "source": "user_text", + "subtype": null, + "span": { + "start": 29, + "end": 43 + }, + "confidence": 0.88 + } + ] + }, + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C4_SEMANTIC_ROLES", + "top_k": 12 + }, + { + "layer_id": "C3_ENTRYPOINTS", + "top_k": 8 + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "top_k": 8 + }, + { + "layer_id": "C1_SYMBOL_CATALOG", + "top_k": 6 + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 4 + } + ], + "filters": { + "test_policy": "EXCLUDE", + "path_scope": [], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + }, + "symbol_resolution": { + "status": "pending", + "resolved_symbol": null, + "alternatives": [ + "RuntimeManager" + ], + "confidence": 0.0 + }, + "evidence_policy": { + "require_def": true, + "require_flow": true, + "require_spec": false, + "allow_answer_without_evidence": false + } + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Какие компоненты участвуют в RuntimeManager?", + "sub_intent": "ARCHITECTURE", + "path_scope": [], + "keyword_hints": [ + "RuntimeManager" + ], + "symbol_candidates": [ + "RuntimeManager" + ], + "requested_layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ], + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C4_SEMANTIC_ROLES", + "top_k": 12 + }, + { + "layer_id": "C3_ENTRYPOINTS", + "top_k": 8 + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "top_k": 8 + }, + { + "layer_id": "C1_SYMBOL_CATALOG", + "top_k": 6 + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 4 + } + ], + "filters": { + "test_policy": "EXCLUDE", + "path_scope": [], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + }, + "query_plan": { + "raw": "Какие компоненты участвуют в RuntimeManager?", + "normalized": "Какие компоненты участвуют в RuntimeManager?", + "sub_intent": "ARCHITECTURE", + "negations": [], + "expansions": [ + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "doc_scope_hints": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "symbol_kind_hint": "class", + "anchors": [ + { + "type": "SYMBOL", + "value": "RuntimeManager", + "source": "user_text", + "subtype": null, + "span": { + "start": 29, + "end": 43 + }, + "confidence": 0.88 + } + ] + } + }, + "retrieval_result": { + "target_symbol_candidates": [ + "RuntimeManager", + "ControlChannel" + ], + "resolved_symbol": "RuntimeManager", + "symbol_resolution_status": "resolved", + "file_candidates": [ + "src/app_runtime/core/runtime.py", + "src/app_runtime/control/base.py", + "src/app_runtime/control/service.py", + "src/app_runtime/control/http_runner.py", + "src/app_runtime/control/http_channel.py", + "src/app_runtime/control/http_app.py", + "src/app_runtime/workflow/persistence/workflow_persistence.py", + "src/app_runtime/queue/in_memory.py", + "src/app_runtime/config/file_loader.py", + "src/app_runtime/tracing/store.py", + "src/app_runtime/workers/supervisor.py", + "src/plba/__init__.py", + "src/plba/core.py", + "src/plba/bootstrap.py", + "src/app_runtime/control/__init__.py" + ], + "code_chunks": [ + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/core/runtime.py", + "title": "RuntimeManager", + "content": "RuntimeManager\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests manager\n- orchestrates role-like calls (4)\n- reads and writes state attributes\n- participates in dataflow slices (50)", + "start_line": 18, + "end_line": 179, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "symbol_name": "RuntimeManager", + "qname": "RuntimeManager", + "role": "pipeline_stage", + "confidence": 0.67, + "dataflow_participation": 50, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/base.py", + "title": "ControlActionSet", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "start_line": 14, + "end_line": 18, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/base.py", + "title": "ControlChannel", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "start_line": 21, + "end_line": 28, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "start_line": 12, + "end_line": 52, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/http_runner.py", + "title": "UvicornThreadRunner", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "start_line": 10, + "end_line": 61, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/http_channel.py", + "title": "HttpControlChannel", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "start_line": 12, + "end_line": 57, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/http_app.py", + "title": "HttpControlAppFactory", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "start_line": 15, + "end_line": 53, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "title": "WorkflowPersistence", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "start_line": 8, + "end_line": 54, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/queue/in_memory.py", + "title": "InMemoryTaskQueue", + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)", + "start_line": 9, + "end_line": 38, + "metadata": { + "symbol_id": "2da04cb94544a3bcbf0943a95ad4bdd8710bcafaa32a02fd0e4de2178dcf3533", + "symbol_name": "InMemoryTaskQueue", + "qname": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 9, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "58f0cc001ccda0eee4c6bc32ed83bd05eafd6b6644f1e8b4aa9eed3103db73dc", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/config/file_loader.py", + "title": "ConfigFileLoader", + "content": "ConfigFileLoader\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (8)", + "start_line": 11, + "end_line": 48, + "metadata": { + "symbol_id": "a8474eca8b6e9dc86ae67ed68b16fa5fb639ef08739c053e7b7195489765667f", + "symbol_name": "ConfigFileLoader", + "qname": "ConfigFileLoader", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 8, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/tracing/store.py", + "title": "TraceContextStore", + "content": "TraceContextStore\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "start_line": 15, + "end_line": 52, + "metadata": { + "symbol_id": "b2dad4fbe16ffb11b58deba311c7739955c39d59f291b22181f33e9c8cce4059", + "symbol_name": "TraceContextStore", + "qname": "TraceContextStore", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "d369554f08fc92039c6edd5a2a1e73b23901533e8974459170bbd9347d263dc5", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/workers/supervisor.py", + "title": "WorkerSupervisor", + "content": "WorkerSupervisor\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "start_line": 10, + "end_line": 59, + "metadata": { + "symbol_id": "c17b44e8d9e97d490989b21fa67d7c346cdda8a0472e4c41fb243c8846faa124", + "symbol_name": "WorkerSupervisor", + "qname": "WorkerSupervisor", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "77609d9d5927171cce7fc3a54897c183fd63068710c6362029b700937aae5eee", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C3_ENTRYPOINTS", + "path": "src/app_runtime/control/http_app.py", + "title": "app.post", + "content": "fastapi http app.post", + "start_line": 38, + "end_line": 42, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C3_ENTRYPOINTS", + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "content": "fastapi http app.get", + "start_line": 31, + "end_line": 34, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C3_ENTRYPOINTS", + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "content": "fastapi http app.get", + "start_line": 38, + "end_line": 42, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "start_line": 14, + "end_line": 47, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/core/runtime.py", + "title": "RuntimeManager.__init__:dataflow_slice", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.start", + "start_line": 32, + "end_line": 59, + "metadata": { + "edge_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1", + "dst_ref": "RuntimeManager.start", + "resolution": "resolved", + "slice_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.start" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "start_line": 14, + "end_line": 20, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "start_line": 14, + "end_line": 25, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "start_line": 14, + "end_line": 51, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/core/runtime.py", + "title": "RuntimeManager.__init__:dataflow_slice", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file", + "start_line": 32, + "end_line": 52, + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "start_line": 14, + "end_line": 17, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/core/runtime.py", + "title": "RuntimeManager.__init__:dataflow_slice", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager._register_core_services", + "start_line": 32, + "end_line": 127, + "metadata": { + "edge_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6", + "dst_ref": "RuntimeManager._register_core_services", + "resolution": "resolved", + "slice_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager._register_core_services" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/plba/__init__.py", + "title": "RuntimeManager", + "content": "const RuntimeManager\nRuntimeManager = plba.core.RuntimeManager", + "start_line": 16, + "end_line": 16, + "metadata": { + "symbol_id": "7eacec84f9b8d6c4201374591faecdac7493091c263681495c338973f2971ad9", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = plba.core.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/plba/core.py", + "title": "RuntimeManager", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "start_line": 2, + "end_line": 2, + "metadata": { + "symbol_id": "e1684562d978b7af7fe9b27dc5869d770348a87b5dc19a50360f58544668578b", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.core", + "is_test": false, + "blob_sha": "c0ae25110d20e665216616e26b68adfe035b624ba45d31d1272fb21f906f9ca8", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/service.py", + "title": "RuntimeManager", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "start_line": 9, + "end_line": 9, + "metadata": { + "symbol_id": "62a9575c77aad894120d18b4f2a08cf2ba42f77e9be4a8a432b767d157701afe", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/core/runtime.py", + "title": "RuntimeManager", + "content": "class RuntimeManager\nRuntimeManager", + "start_line": 18, + "end_line": 179, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "qname": "RuntimeManager", + "kind": "class", + "signature": "RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/plba/bootstrap.py", + "title": "RuntimeManager", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "start_line": 4, + "end_line": 4, + "metadata": { + "symbol_id": "27158ca220022eeb5083c6addf8a50775d45f7161284fd60aac48410105f4b98", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/__init__.py", + "title": "ControlChannel", + "content": "const ControlChannel\nControlChannel = app_runtime.control.base.ControlChannel", + "start_line": 1, + "end_line": 1, + "metadata": { + "symbol_id": "268420f7aa4ed74082b9276cae0cded4f00bac090ffd58fa020a65be0fe19c27", + "qname": "ControlChannel", + "kind": "const", + "signature": "ControlChannel = app_runtime.control.base.ControlChannel", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/base.py", + "title": "src/app_runtime/control/base.py:ControlChannel", + "content": "class ControlChannel(ABC):\n @abstractmethod\n async def start(self, actions: ControlActionSet) -> None:\n \"\"\"Start the control channel and bind handlers.\"\"\"\n\n @abstractmethod\n async def stop(self) -> None:\n \"\"\"Stop the control channel and release resources.\"\"\"", + "start_line": 21, + "end_line": 28, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/__init__.py", + "title": "src/app_runtime/control/__init__.py:1-5", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\"ControlActionSet\", \"ControlChannel\", \"ControlPlaneService\", \"HttpControlChannel\"]", + "start_line": 1, + "end_line": 5, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/base.py", + "title": "src/app_runtime/control/base.py:ControlActionSet", + "content": "class ControlActionSet:\n health: HealthHandler\n start: ActionHandler\n stop: ActionHandler\n status: ActionHandler", + "start_line": 14, + "end_line": 18, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/http_app.py", + "title": "src/app_runtime/control/http_app.py:HttpControlAppFactory", + "content": "class HttpControlAppFactory:\n def create(\n self,\n health_provider: Callable[[], Awaitable[HealthPayload]],\n action_provider: Callable[[str, str], Awaitable[JSONResponse]],\n ) -> FastAPI:\n app = FastAPI(title=\"PLBA Control API\")\n\n @app.middleware(\"http\")\n async def log_api_call(request: Request, call_next): # type: ignore[no-untyped-def]\n started = time.monotonic()\n response = await call_next(request)\n response.headers[\"X-Response-Time-Ms\"] = str(int((time.monotonic() - started) * 1000))\n return response\n\n @app.get(\"/health\")\n async def health() -> JSONResponse:\n payload = await health_provider()\n status_code = 200 if payload.get(\"status\") == \"ok\" else 503\n return JSONResponse(content=payload, status_code=status_code)\n\n @app.get(\"/actions/{action}\")\n @app.post(\"/actions/{action}\")\n async def action(action: str, request: Request) -> JSONResponse:\n client_source = self._client_source(request)\n if action in {\"start\", \"stop\"}:\n LOGGER.warning(\"Control action requested: /actions/%s client=%s\", action, client_source)\n return await action_provider(action, client_source)\n\n return app\n\n def _client_source(self, request: Request) -> str:\n explicit_header = request.headers.get(\"X-Client-Source\", \"\").strip()\n if explicit_header:\n return explicit_header\n user_agent = request.headers.get(\"User-Agent\", \"\").strip()\n if user_agent:\n return f\"user-agent:{user_agent}\"\n return \"unknown\"", + "start_line": 15, + "end_line": 53, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "relations": [ + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async" + }, + { + "path": "src/app_runtime/core/runtime.py", + "metadata": { + "edge_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1", + "dst_ref": "RuntimeManager.start", + "resolution": "resolved", + "slice_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.start" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.start" + }, + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start" + }, + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop" + }, + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async" + }, + { + "path": "src/app_runtime/core/runtime.py", + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file" + }, + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel" + }, + { + "path": "src/app_runtime/core/runtime.py", + "metadata": { + "edge_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6", + "dst_ref": "RuntimeManager._register_core_services", + "resolution": "resolved", + "slice_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager._register_core_services" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager._register_core_services" + } + ], + "entrypoints": [ + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.post", + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "test_candidates": [], + "layer_outcomes": [ + { + "layer_id": "C4_SEMANTIC_ROLES", + "hit_count": 12, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C3_ENTRYPOINTS", + "hit_count": 3, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 6, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 4, + "empty": false, + "fallback_used": false + } + ], + "missing_layers": [], + "raw_rows": [ + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests manager\n- orchestrates role-like calls (4)\n- reads and writes state attributes\n- participates in dataflow slices (50)", + "layer": "C4_SEMANTIC_ROLES", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 43, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "symbol_name": "RuntimeManager", + "qname": "RuntimeManager", + "role": "pipeline_stage", + "confidence": 0.67, + "dataflow_participation": 50, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/queue/in_memory.py", + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)", + "layer": "C4_SEMANTIC_ROLES", + "title": "InMemoryTaskQueue", + "span_start": 9, + "span_end": 38, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 22, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "2da04cb94544a3bcbf0943a95ad4bdd8710bcafaa32a02fd0e4de2178dcf3533", + "symbol_name": "InMemoryTaskQueue", + "qname": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 9, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "58f0cc001ccda0eee4c6bc32ed83bd05eafd6b6644f1e8b4aa9eed3103db73dc", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "ConfigFileLoader\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (8)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ConfigFileLoader", + "span_start": 11, + "span_end": 48, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 23, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "a8474eca8b6e9dc86ae67ed68b16fa5fb639ef08739c053e7b7195489765667f", + "symbol_name": "ConfigFileLoader", + "qname": "ConfigFileLoader", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 8, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/store.py", + "content": "TraceContextStore\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "TraceContextStore", + "span_start": 15, + "span_end": 52, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "b2dad4fbe16ffb11b58deba311c7739955c39d59f291b22181f33e9c8cce4059", + "symbol_name": "TraceContextStore", + "qname": "TraceContextStore", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "d369554f08fc92039c6edd5a2a1e73b23901533e8974459170bbd9347d263dc5", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workers/supervisor.py", + "content": "WorkerSupervisor\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkerSupervisor", + "span_start": 10, + "span_end": 59, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "c17b44e8d9e97d490989b21fa67d7c346cdda8a0472e4c41fb243c8846faa124", + "symbol_name": "WorkerSupervisor", + "qname": "WorkerSupervisor", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "77609d9d5927171cce7fc3a54897c183fd63068710c6362029b700937aae5eee", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": null, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": null, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": null, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 59, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1", + "dst_ref": "RuntimeManager.start", + "resolution": "resolved", + "slice_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.start" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 52, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager._register_core_services", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 127, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6", + "dst_ref": "RuntimeManager._register_core_services", + "resolution": "resolved", + "slice_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager._register_core_services" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/__init__.py", + "content": "const RuntimeManager\nRuntimeManager = plba.core.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 16, + "span_end": 16, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "7eacec84f9b8d6c4201374591faecdac7493091c263681495c338973f2971ad9", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = plba.core.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/core.py", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 2, + "span_end": 2, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "e1684562d978b7af7fe9b27dc5869d770348a87b5dc19a50360f58544668578b", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.core", + "is_test": false, + "blob_sha": "c0ae25110d20e665216616e26b68adfe035b624ba45d31d1272fb21f906f9ca8", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 9, + "span_end": 9, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "62a9575c77aad894120d18b4f2a08cf2ba42f77e9be4a8a432b767d157701afe", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager\nRuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "qname": "RuntimeManager", + "kind": "class", + "signature": "RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 4, + "span_end": 4, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "27158ca220022eeb5083c6addf8a50775d45f7161284fd60aac48410105f4b98", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "const ControlChannel\nControlChannel = app_runtime.control.base.ControlChannel", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlChannel", + "span_start": 1, + "span_end": 1, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "268420f7aa4ed74082b9276cae0cded4f00bac090ffd58fa020a65be0fe19c27", + "qname": "ControlChannel", + "kind": "const", + "signature": "ControlChannel = app_runtime.control.base.ControlChannel", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlChannel(ABC):\n @abstractmethod\n async def start(self, actions: ControlActionSet) -> None:\n \"\"\"Start the control channel and bind handlers.\"\"\"\n\n @abstractmethod\n async def stop(self) -> None:\n \"\"\"Stop the control channel and release resources.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\"ControlActionSet\", \"ControlChannel\", \"ControlPlaneService\", \"HttpControlChannel\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/__init__.py:1-5", + "span_start": 1, + "span_end": 5, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlActionSet:\n health: HealthHandler\n start: ActionHandler\n stop: ActionHandler\n status: ActionHandler", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "class HttpControlAppFactory:\n def create(\n self,\n health_provider: Callable[[], Awaitable[HealthPayload]],\n action_provider: Callable[[str, str], Awaitable[JSONResponse]],\n ) -> FastAPI:\n app = FastAPI(title=\"PLBA Control API\")\n\n @app.middleware(\"http\")\n async def log_api_call(request: Request, call_next): # type: ignore[no-untyped-def]\n started = time.monotonic()\n response = await call_next(request)\n response.headers[\"X-Response-Time-Ms\"] = str(int((time.monotonic() - started) * 1000))\n return response\n\n @app.get(\"/health\")\n async def health() -> JSONResponse:\n payload = await health_provider()\n status_code = 200 if payload.get(\"status\") == \"ok\" else 503\n return JSONResponse(content=payload, status_code=status_code)\n\n @app.get(\"/actions/{action}\")\n @app.post(\"/actions/{action}\")\n async def action(action: str, request: Request) -> JSONResponse:\n client_source = self._client_source(request)\n if action in {\"start\", \"stop\"}:\n LOGGER.warning(\"Control action requested: /actions/%s client=%s\", action, client_source)\n return await action_provider(action, client_source)\n\n return app\n\n def _client_source(self, request: Request) -> str:\n explicit_header = request.headers.get(\"X-Client-Source\", \"\").strip()\n if explicit_header:\n return explicit_header\n user_agent = request.headers.get(\"User-Agent\", \"\").strip()\n if user_agent:\n return f\"user-agent:{user_agent}\"\n return \"unknown\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_app.py:HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "retrieval_report": { + "executed_layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C4_SEMANTIC_ROLES": "vector", + "C3_ENTRYPOINTS": "vector", + "C2_DEPENDENCY_GRAPH": "vector", + "C1_SYMBOL_CATALOG": "vector", + "C0_SOURCE_CHUNKS": "vector" + }, + "top_k_by_layer": { + "C4_SEMANTIC_ROLES": 12, + "C3_ENTRYPOINTS": 8, + "C2_DEPENDENCY_GRAPH": 8, + "C1_SYMBOL_CATALOG": 6, + "C0_SOURCE_CHUNKS": 4 + }, + "filters_by_layer": { + "C4_SEMANTIC_ROLES": { + "path_scope": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [] + }, + "C1_SYMBOL_CATALOG": { + "path_scope": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [] + } + }, + "fallback": { + "used": false, + "reason": null + }, + "retrieval_by_layer_ms": { + "C4_SEMANTIC_ROLES": 36, + "C3_ENTRYPOINTS": 15, + "C2_DEPENDENCY_GRAPH": 59, + "C1_SYMBOL_CATALOG": 27, + "C0_SOURCE_CHUNKS": 17 + } + } + }, + "diagnostics": { + "intent_correct": null, + "target_found": true, + "layers_used": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ], + "retrieval_sufficient": true, + "answer_mode": "normal", + "router_result": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "ARCHITECTURE", + "path_scope": [], + "layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ], + "symbol_resolution_status": "pending" + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Какие компоненты участвуют в RuntimeManager?", + "sub_intent": "ARCHITECTURE", + "path_scope": [], + "requested_layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "C4_SEMANTIC_ROLES", + "hit_count": 12, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C3_ENTRYPOINTS", + "hit_count": 3, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 6, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 4, + "empty": false, + "fallback_used": false + } + ], + "empty_layers": [], + "evidence_gate_decision": { + "sufficient": true, + "failure_reasons": [], + "evidence_count": 33 + }, + "failure_reasons": [], + "timings_ms": {} + }, + "rag_rows": [ + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests manager\n- orchestrates role-like calls (4)\n- reads and writes state attributes\n- participates in dataflow slices (50)", + "layer": "C4_SEMANTIC_ROLES", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 43, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "symbol_name": "RuntimeManager", + "qname": "RuntimeManager", + "role": "pipeline_stage", + "confidence": 0.67, + "dataflow_participation": 50, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/queue/in_memory.py", + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)", + "layer": "C4_SEMANTIC_ROLES", + "title": "InMemoryTaskQueue", + "span_start": 9, + "span_end": 38, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 22, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "2da04cb94544a3bcbf0943a95ad4bdd8710bcafaa32a02fd0e4de2178dcf3533", + "symbol_name": "InMemoryTaskQueue", + "qname": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 9, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "58f0cc001ccda0eee4c6bc32ed83bd05eafd6b6644f1e8b4aa9eed3103db73dc", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "ConfigFileLoader\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (8)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ConfigFileLoader", + "span_start": 11, + "span_end": 48, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 23, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "a8474eca8b6e9dc86ae67ed68b16fa5fb639ef08739c053e7b7195489765667f", + "symbol_name": "ConfigFileLoader", + "qname": "ConfigFileLoader", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 8, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/store.py", + "content": "TraceContextStore\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "TraceContextStore", + "span_start": 15, + "span_end": 52, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b2dad4fbe16ffb11b58deba311c7739955c39d59f291b22181f33e9c8cce4059", + "symbol_name": "TraceContextStore", + "qname": "TraceContextStore", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "d369554f08fc92039c6edd5a2a1e73b23901533e8974459170bbd9347d263dc5", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workers/supervisor.py", + "content": "WorkerSupervisor\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkerSupervisor", + "span_start": 10, + "span_end": 59, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "c17b44e8d9e97d490989b21fa67d7c346cdda8a0472e4c41fb243c8846faa124", + "symbol_name": "WorkerSupervisor", + "qname": "WorkerSupervisor", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "77609d9d5927171cce7fc3a54897c183fd63068710c6362029b700937aae5eee", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 59, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1", + "dst_ref": "RuntimeManager.start", + "resolution": "resolved", + "slice_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.start" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 52, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager._register_core_services", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 127, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6", + "dst_ref": "RuntimeManager._register_core_services", + "resolution": "resolved", + "slice_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager._register_core_services" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/__init__.py", + "content": "const RuntimeManager\nRuntimeManager = plba.core.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 16, + "span_end": 16, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "7eacec84f9b8d6c4201374591faecdac7493091c263681495c338973f2971ad9", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = plba.core.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/core.py", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 2, + "span_end": 2, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "e1684562d978b7af7fe9b27dc5869d770348a87b5dc19a50360f58544668578b", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.core", + "is_test": false, + "blob_sha": "c0ae25110d20e665216616e26b68adfe035b624ba45d31d1272fb21f906f9ca8", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 9, + "span_end": 9, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "62a9575c77aad894120d18b4f2a08cf2ba42f77e9be4a8a432b767d157701afe", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager\nRuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "qname": "RuntimeManager", + "kind": "class", + "signature": "RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 4, + "span_end": 4, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "27158ca220022eeb5083c6addf8a50775d45f7161284fd60aac48410105f4b98", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "const ControlChannel\nControlChannel = app_runtime.control.base.ControlChannel", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlChannel", + "span_start": 1, + "span_end": 1, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "268420f7aa4ed74082b9276cae0cded4f00bac090ffd58fa020a65be0fe19c27", + "qname": "ControlChannel", + "kind": "const", + "signature": "ControlChannel = app_runtime.control.base.ControlChannel", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlChannel(ABC):\n @abstractmethod\n async def start(self, actions: ControlActionSet) -> None:\n \"\"\"Start the control channel and bind handlers.\"\"\"\n\n @abstractmethod\n async def stop(self) -> None:\n \"\"\"Stop the control channel and release resources.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\"ControlActionSet\", \"ControlChannel\", \"ControlPlaneService\", \"HttpControlChannel\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/__init__.py:1-5", + "span_start": 1, + "span_end": 5, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlActionSet:\n health: HealthHandler\n start: ActionHandler\n stop: ActionHandler\n status: ActionHandler", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "class HttpControlAppFactory:\n def create(\n self,\n health_provider: Callable[[], Awaitable[HealthPayload]],\n action_provider: Callable[[str, str], Awaitable[JSONResponse]],\n ) -> FastAPI:\n app = FastAPI(title=\"PLBA Control API\")\n\n @app.middleware(\"http\")\n async def log_api_call(request: Request, call_next): # type: ignore[no-untyped-def]\n started = time.monotonic()\n response = await call_next(request)\n response.headers[\"X-Response-Time-Ms\"] = str(int((time.monotonic() - started) * 1000))\n return response\n\n @app.get(\"/health\")\n async def health() -> JSONResponse:\n payload = await health_provider()\n status_code = 200 if payload.get(\"status\") == \"ok\" else 503\n return JSONResponse(content=payload, status_code=status_code)\n\n @app.get(\"/actions/{action}\")\n @app.post(\"/actions/{action}\")\n async def action(action: str, request: Request) -> JSONResponse:\n client_source = self._client_source(request)\n if action in {\"start\", \"stop\"}:\n LOGGER.warning(\"Control action requested: /actions/%s client=%s\", action, client_source)\n return await action_provider(action, client_source)\n\n return app\n\n def _client_source(self, request: Request) -> str:\n explicit_header = request.headers.get(\"X-Client-Source\", \"\").strip()\n if explicit_header:\n return explicit_header\n user_agent = request.headers.get(\"User-Agent\", \"\").strip()\n if user_agent:\n return f\"user-agent:{user_agent}\"\n return \"unknown\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_app.py:HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "validation": { + "passed": true, + "action": "return", + "reasons": [] + } + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-architecture-runtime-manager.md b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-architecture-runtime-manager.md new file mode 100644 index 0000000..4aedcac --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-architecture-runtime-manager.md @@ -0,0 +1,34 @@ +# plba-v2-architecture-runtime-manager + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: agent_runtime +- mode: full_chain +- passed: True + +## Query +Какие компоненты участвуют в RuntimeManager? + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "ARCHITECTURE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 33, + "llm_answer": "### Компоненты, участвующие в RuntimeManager\n\n#### Подтвержденные связи\n1. **RuntimeManager**\n - Role: Pipeline Stage\n - Responsibilities:\n - Manager responsibilities\n - Orchestration of role-like calls\n - State attribute reading/writing\n - Participation in dataflow slices\n\n2. **ControlPlaneService**\n - Role: Pipeline Stage\n - Responsibilities:\n - Service responsibilities\n - State attribute reading/writing\n - Participation in dataflow slices\n\n3. **UvicornThreadRunner**\n - Role: Pipeline Stage\n - Responsibilities:\n - State attribute reading/writing\n - Participation in dataflow slices\n\n4. **HttpControlChannel**\n - Role: Pipeline Stage\n - Responsibilities:\n - State attribute reading/writing\n - Participation in dataflow slices\n\n5. **WorkflowPersistence**\n - Role: Pipeline Stage\n - Responsibilities:\n - Orchestration of role-like calls\n - State attribute reading/writing\n - Participation in dataflow slices\n\n6. **InMemoryTaskQueue**\n - Role: Pipeline Stage\n - Responsibilities:\n - State attribute reading/writing\n - Participation in dataflow slices\n\n7. **ConfigFileLoader**\n - Role: Pipeline Stage\n - Responsibilities:\n - State attribute reading/writing\n - Participation in dataflow slices\n\n8. **TraceContextStore**\n - Role: Pipeline Stage\n - Responsibilities:\n - State attribute reading/writing\n - Participation in dataflow slices\n\n9. **WorkerSupervisor**\n - Role: Pipeline Stage\n - Responsibilities:\n - State attribute reading/writing\n - Participation in dataflow slices\n\n### Ограничения найденного контекста\n- Все перечисленные компоненты являются участниками данных потоков выполнения (dataflow slices).\n- Каждый компонент выполняет операции чтения и записи состояния атрибутов.\n- Некоторые из них выполняют дополнительные обязанности, такие как участие в оркестрации или инициировании ролей.\n\nТаким образом, участники RuntimeManager включают перечисленные выше компоненты.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-explain-create-runtime.json b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-explain-create-runtime.json new file mode 100644 index 0000000..e334c5c --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-explain-create-runtime.json @@ -0,0 +1,3779 @@ +{ + "case_id": "plba-v2-explain-create-runtime", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "agent_runtime", + "mode": "full_chain", + "query": "Что делает функция create_runtime?", + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 33, + "llm_answer": "Функция `create_runtime` инициализирует и настраивает менеджер выполнения приложения.\n\n**Ключевые шаги:**\n1. Инициализация менеджера выполнения (`RuntimeManager()`).\n2. Добавление конфигурационного файла, если указан путь (`add_config_file`).\n3. Регистрация HTTP-канала управления, если включен режим управления (`register_channel`).\n4. Регистрация модуля приложения в менеджере выполнения (`register_module`).\n\n**Опорные файлы:**\n- `src/plba/bootstrap.py:8-29`\n\nЭтот процесс позволяет настроить и запустить приложение с учетом заданных конфигураций и режимов управления.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "create_runtime" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "query": "Что делает функция create_runtime?", + "router_result": { + "schema_version": "1.1", + "intent": "CODE_QA", + "retrieval_profile": "code", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query_plan": { + "raw": "Что делает функция create_runtime?", + "normalized": "Что делает функция create_runtime?", + "sub_intent": "EXPLAIN", + "negations": [], + "expansions": [ + "function", + "create_runtime" + ], + "keyword_hints": [ + "create_runtime" + ], + "path_hints": [], + "doc_scope_hints": [], + "symbol_candidates": [ + "create_runtime" + ], + "symbol_kind_hint": "function", + "anchors": [ + { + "type": "SYMBOL", + "value": "create_runtime", + "source": "user_text", + "subtype": null, + "span": { + "start": 19, + "end": 33 + }, + "confidence": 0.88 + }, + { + "type": "KEY_TERM", + "value": "функция", + "source": "user_text", + "subtype": null, + "span": { + "start": 11, + "end": 18 + }, + "confidence": 0.9 + } + ] + }, + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "top_k": 8 + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 8 + }, + { + "layer_id": "C4_SEMANTIC_ROLES", + "top_k": 8 + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "top_k": 6 + }, + { + "layer_id": "C3_ENTRYPOINTS", + "top_k": 6 + } + ], + "filters": { + "test_policy": "EXCLUDE", + "path_scope": [], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + }, + "symbol_resolution": { + "status": "pending", + "resolved_symbol": null, + "alternatives": [ + "create_runtime" + ], + "confidence": 0.0 + }, + "evidence_policy": { + "require_def": true, + "require_flow": true, + "require_spec": false, + "allow_answer_without_evidence": false + } + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Что делает функция create_runtime?", + "sub_intent": "EXPLAIN", + "path_scope": [], + "keyword_hints": [ + "create_runtime" + ], + "symbol_candidates": [ + "create_runtime" + ], + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "top_k": 8 + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 8 + }, + { + "layer_id": "C4_SEMANTIC_ROLES", + "top_k": 8 + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "top_k": 6 + }, + { + "layer_id": "C3_ENTRYPOINTS", + "top_k": 6 + } + ], + "filters": { + "test_policy": "EXCLUDE", + "path_scope": [], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + }, + "query_plan": { + "raw": "Что делает функция create_runtime?", + "normalized": "Что делает функция create_runtime?", + "sub_intent": "EXPLAIN", + "negations": [], + "expansions": [ + "function", + "create_runtime" + ], + "keyword_hints": [ + "create_runtime" + ], + "path_hints": [], + "doc_scope_hints": [], + "symbol_candidates": [ + "create_runtime" + ], + "symbol_kind_hint": "function", + "anchors": [ + { + "type": "SYMBOL", + "value": "create_runtime", + "source": "user_text", + "subtype": null, + "span": { + "start": 19, + "end": 33 + }, + "confidence": 0.88 + }, + { + "type": "KEY_TERM", + "value": "функция", + "source": "user_text", + "subtype": null, + "span": { + "start": 11, + "end": 18 + }, + "confidence": 0.9 + } + ] + } + }, + "retrieval_result": { + "target_symbol_candidates": [ + "create_runtime", + "annotations", + "json", + "Path", + "Any", + "yaml", + "hashlib" + ], + "resolved_symbol": "create_runtime", + "symbol_resolution_status": "resolved", + "file_candidates": [ + "src/plba/__init__.py", + "src/plba/bootstrap.py", + "src/app_runtime/config/file_loader.py", + "src/app_runtime/config/__init__.py", + "src/app_runtime/config/providers.py", + "src/app_runtime/contracts/__init__.py", + "src/app_runtime/contracts/application.py", + "src/app_runtime/__init__.py", + "src/app_runtime/control/http_runner.py", + "src/app_runtime/workflow/persistence/workflow_persistence.py", + "src/app_runtime/control/http_channel.py", + "src/app_runtime/queue/in_memory.py", + "src/app_runtime/workers/supervisor.py", + "src/app_runtime/workflow/engine/workflow_engine.py", + "src/app_runtime/tracing/store.py", + "src/app_runtime/control/http_app.py" + ], + "code_chunks": [ + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/plba/__init__.py", + "title": "create_runtime", + "content": "const create_runtime\ncreate_runtime = plba.bootstrap.create_runtime", + "start_line": 1, + "end_line": 1, + "metadata": { + "symbol_id": "fa1e84f16c8c659bcd5448637386af4d15d431064e07714e34689ee64233cb51", + "qname": "create_runtime", + "kind": "const", + "signature": "create_runtime = plba.bootstrap.create_runtime", + "parent_symbol_id": null, + "package_or_module": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/plba/bootstrap.py", + "title": "create_runtime", + "content": "function create_runtime\ncreate_runtime(module)", + "start_line": 8, + "end_line": 29, + "metadata": { + "symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "qname": "create_runtime", + "kind": "function", + "signature": "create_runtime(module)", + "parent_symbol_id": null, + "package_or_module": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/config/file_loader.py", + "title": "annotations", + "content": "const annotations\nannotations = __future__.annotations", + "start_line": 1, + "end_line": 1, + "metadata": { + "symbol_id": "5ed640ccec43a78659d50ec24f3717bf1144a182c22588f37456649ac6a4a815", + "qname": "annotations", + "kind": "const", + "signature": "annotations = __future__.annotations", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/config/file_loader.py", + "title": "json", + "content": "const json\nimport json", + "start_line": 4, + "end_line": 4, + "metadata": { + "symbol_id": "bb9e2eaf992bfd050f7072d72eed87c55b1a4b001daa034a0f7c630a61bb1d78", + "qname": "json", + "kind": "const", + "signature": "import json", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/config/file_loader.py", + "title": "Path", + "content": "const Path\nPath = pathlib.Path", + "start_line": 5, + "end_line": 5, + "metadata": { + "symbol_id": "b785967ed1fb83aa62d5724c6d6e9c6d2b1505523db39bd941cc39b48db48306", + "qname": "Path", + "kind": "const", + "signature": "Path = pathlib.Path", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/config/file_loader.py", + "title": "Any", + "content": "const Any\nAny = typing.Any", + "start_line": 6, + "end_line": 6, + "metadata": { + "symbol_id": "8e330833b8073585db1c4b4315947c400683a23e4c3d2e2ccbcb260f347541b6", + "qname": "Any", + "kind": "const", + "signature": "Any = typing.Any", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/config/file_loader.py", + "title": "yaml", + "content": "const yaml\nimport yaml", + "start_line": 8, + "end_line": 8, + "metadata": { + "symbol_id": "223502bbfc2b82aea662f7466403cc99a3cd44f1b0507d637cd674874f751e4f", + "qname": "yaml", + "kind": "const", + "signature": "import yaml", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/config/file_loader.py", + "title": "hashlib", + "content": "const hashlib\nimport hashlib", + "start_line": 3, + "end_line": 3, + "metadata": { + "symbol_id": "e7375824bd473da3d73d316d22e3cb6428930e2db1ffbd900ce5a8b88427bf05", + "qname": "hashlib", + "kind": "const", + "signature": "import hashlib", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/plba/__init__.py", + "title": "src/plba/__init__.py:1-69", + "content": "from plba.bootstrap import create_runtime\nfrom plba.config import ConfigFileLoader, FileConfigProvider\nfrom plba.control import ControlActionSet, ControlChannel, ControlPlaneService, HttpControlChannel\nfrom plba.contracts import (\n ApplicationModule,\n ConfigProvider,\n HealthContributor,\n TraceContext,\n TraceContextRecord,\n TraceLogMessage,\n TraceTransport,\n Worker,\n WorkerHealth,\n WorkerStatus,\n)\nfrom plba.core import ConfigurationManager, RuntimeManager, ServiceContainer\nfrom plba.health import HealthRegistry\nfrom plba.logging import LogManager\nfrom plba.queue import InMemoryTaskQueue\nfrom plba.tracing import MySqlTraceTransport, NoOpTraceTransport, TraceService\nfrom plba.workflow import (\n StepResult,\n WorkflowContext,\n WorkflowDefinition,\n WorkflowEngine,\n WorkflowEngineHooks,\n WorkflowNode,\n WorkflowRuntimeFactory,\n WorkflowStep,\n)\nfrom plba.workers import WorkerSupervisor\n\n__all__ = [\n \"ApplicationModule\",\n \"ConfigFileLoader\",\n \"ConfigProvider\",\n \"ConfigurationManager\",\n \"ControlActionSet\",\n \"ControlChannel\",\n \"ControlPlaneService\",\n \"create_runtime\",\n \"FileConfigProvider\",\n \"HealthContributor\",\n \"HealthRegistry\",\n \"HttpControlChannel\",\n \"InMemoryTaskQueue\",\n \"LogManager\",\n \"MySqlTraceTransport\",\n \"NoOpTraceTransport\",\n \"RuntimeManager\",\n \"ServiceContainer\",\n \"TraceContext\",\n \"TraceContextRecord\",\n \"TraceLogMessage\",\n \"TraceService\",\n \"TraceTransport\",\n \"StepResult\",\n \"Worker\",\n \"WorkerHealth\",\n \"WorkerStatus\",\n \"WorkflowContext\",\n \"WorkflowDefinition\",\n \"WorkflowEngine\",\n \"WorkflowEngineHooks\",\n \"WorkflowNode\",\n \"WorkflowRuntimeFactory\",\n \"WorkflowStep\",\n \"WorkerSupervisor\",\n]", + "start_line": 1, + "end_line": 69, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/plba/bootstrap.py", + "title": "src/plba/bootstrap.py:create_runtime", + "content": "def create_runtime(\n module: ApplicationModule,\n *,\n config_path: str | None = None,\n enable_http_control: bool = False,\n control_host: str = \"127.0.0.1\",\n control_port: int = 8080,\n control_timeout: int = 5,\n) -> RuntimeManager:\n runtime = RuntimeManager()\n if config_path is not None:\n runtime.add_config_file(config_path)\n if enable_http_control:\n runtime.control_plane.register_channel(\n HttpControlChannel(\n host=control_host,\n port=control_port,\n timeout=control_timeout,\n )\n )\n runtime.register_module(module)\n return runtime", + "start_line": 8, + "end_line": 29, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/config/__init__.py", + "title": "src/app_runtime/config/__init__.py:1-4", + "content": "from app_runtime.config.file_loader import ConfigFileLoader\nfrom app_runtime.config.providers import FileConfigProvider\n\n__all__ = [\"ConfigFileLoader\", \"FileConfigProvider\"]", + "start_line": 1, + "end_line": 4, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.config.__init__", + "is_test": false, + "blob_sha": "612918029820a2a983330ec92256142b55b9de4bdf3399ece18e2a02dbad9729", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/config/file_loader.py", + "title": "src/app_runtime/config/file_loader.py:ConfigFileLoader", + "content": "class ConfigFileLoader:\n def __init__(self, path: str | Path) -> None:\n self.path = Path(path)\n self.config: Any = None\n self.last_valid_config: Any = None\n self._last_seen_hash: str | None = None\n\n def read_text(self) -> str:\n return self.path.read_text(encoding=\"utf-8\")\n\n def parse(self, data: str) -> Any:\n suffix = self.path.suffix.lower()\n if suffix in {\".yml\", \".yaml\"}:\n return yaml.safe_load(data)\n return json.loads(data)\n\n def load_sync(self) -> Any:\n data = self.read_text()\n parsed = self.parse(data)\n self.config = parsed\n self.last_valid_config = parsed\n self._last_seen_hash = self._calculate_hash(data)\n return parsed\n\n def load_if_changed(self) -> tuple[bool, Any]:\n data = self.read_text()\n current_hash = self._calculate_hash(data)\n if current_hash == self._last_seen_hash:\n return False, self.config\n parsed = self.parse(data)\n self.config = parsed\n self.last_valid_config = parsed\n self._last_seen_hash = current_hash\n return True, parsed\n\n @staticmethod\n def _calculate_hash(data: str) -> str:\n return hashlib.sha256(data.encode(\"utf-8\")).hexdigest()", + "start_line": 11, + "end_line": 48, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/config/providers.py", + "title": "src/app_runtime/config/providers.py:FileConfigProvider", + "content": "class FileConfigProvider(ConfigProvider):\n def __init__(self, path: str | Path) -> None:\n self._loader = ConfigFileLoader(path)\n\n @property\n def loader(self) -> ConfigFileLoader:\n return self._loader\n\n def load(self) -> dict[str, Any]:\n config = self._loader.load_sync()\n if not isinstance(config, dict):\n raise TypeError(\"Config root must be a mapping\")\n return dict(config)", + "start_line": 10, + "end_line": 22, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.config.providers", + "is_test": false, + "blob_sha": "8c53ca0122d6df6c5763bca15e99434bb4daebd5a618b8fc927e9ae90b022e64", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/contracts/__init__.py", + "title": "src/app_runtime/__init__.py:1-1", + "content": "__all__: list[str] = []", + "start_line": 1, + "end_line": 1, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.__init__", + "is_test": false, + "blob_sha": "8eea9df4f6d7b38ca0e39ccc27b04700e3d08dbeec8046d613d22706d19985fa", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/contracts/application.py", + "title": "src/app_runtime/contracts/application.py:ApplicationModule", + "content": "class ApplicationModule(ABC):\n @property\n @abstractmethod\n def name(self) -> str:\n \"\"\"Module name used for runtime status and diagnostics.\"\"\"\n\n @abstractmethod\n def register(self, registry: ModuleRegistry) -> None:\n \"\"\"Register workers, services, and health contributors.\"\"\"", + "start_line": 8, + "end_line": 16, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.application", + "is_test": false, + "blob_sha": "197c35634dca49c352ce3f230295a485fbffb672ce7bb8c08e752bfdf61e7fa4", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/__init__.py", + "title": "src/app_runtime/__init__.py:1-1", + "content": "__all__: list[str] = []", + "start_line": 1, + "end_line": 1, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.__init__", + "is_test": false, + "blob_sha": "8eea9df4f6d7b38ca0e39ccc27b04700e3d08dbeec8046d613d22706d19985fa", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/http_runner.py", + "title": "UvicornThreadRunner", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "start_line": 10, + "end_line": 61, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "title": "WorkflowPersistence", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "start_line": 8, + "end_line": 54, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/http_channel.py", + "title": "HttpControlChannel", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "start_line": 12, + "end_line": 57, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/queue/in_memory.py", + "title": "InMemoryTaskQueue", + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)", + "start_line": 9, + "end_line": 38, + "metadata": { + "symbol_id": "2da04cb94544a3bcbf0943a95ad4bdd8710bcafaa32a02fd0e4de2178dcf3533", + "symbol_name": "InMemoryTaskQueue", + "qname": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 9, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "58f0cc001ccda0eee4c6bc32ed83bd05eafd6b6644f1e8b4aa9eed3103db73dc", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/config/file_loader.py", + "title": "ConfigFileLoader", + "content": "ConfigFileLoader\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (8)", + "start_line": 11, + "end_line": 48, + "metadata": { + "symbol_id": "a8474eca8b6e9dc86ae67ed68b16fa5fb639ef08739c053e7b7195489765667f", + "symbol_name": "ConfigFileLoader", + "qname": "ConfigFileLoader", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 8, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/workers/supervisor.py", + "title": "WorkerSupervisor", + "content": "WorkerSupervisor\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "start_line": 10, + "end_line": 59, + "metadata": { + "symbol_id": "c17b44e8d9e97d490989b21fa67d7c346cdda8a0472e4c41fb243c8846faa124", + "symbol_name": "WorkerSupervisor", + "qname": "WorkerSupervisor", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "77609d9d5927171cce7fc3a54897c183fd63068710c6362029b700937aae5eee", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "title": "WorkflowEngine", + "content": "WorkflowEngine\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "start_line": 10, + "end_line": 86, + "metadata": { + "symbol_id": "57ec0a9f11c542c78e008684a888397e8d9ef4223671acb2567e631a0cbc70b4", + "symbol_name": "WorkflowEngine", + "qname": "WorkflowEngine", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/tracing/store.py", + "title": "TraceContextStore", + "content": "TraceContextStore\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "start_line": 15, + "end_line": 52, + "metadata": { + "symbol_id": "b2dad4fbe16ffb11b58deba311c7739955c39d59f291b22181f33e9c8cce4059", + "symbol_name": "TraceContextStore", + "qname": "TraceContextStore", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "d369554f08fc92039c6edd5a2a1e73b23901533e8974459170bbd9347d263dc5", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/plba/bootstrap.py", + "title": "create_runtime:calls", + "content": "create_runtime calls runtime.add_config_file", + "start_line": 19, + "end_line": 19, + "metadata": { + "edge_id": "4eaeec4ac55a59d5f66fd01c4754955f8fedaf4bc3df13fa769b352c7bfaacbb", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.add_config_file", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/plba/bootstrap.py", + "title": "create_runtime:reads_attr", + "content": "create_runtime reads_attr runtime.register_module", + "start_line": 28, + "end_line": 28, + "metadata": { + "edge_id": "45516c79ff358dbf9b650a081668df0f66d2fe989300f985a1a78be6be166f8f", + "edge_type": "reads_attr", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.register_module", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/plba/bootstrap.py", + "title": "create_runtime:instantiates", + "content": "create_runtime instantiates RuntimeManager", + "start_line": 17, + "end_line": 17, + "metadata": { + "edge_id": "0adba17984f850ea1608c9e734d2dd5c325cfde3a8133123aa239e44935ad18e", + "edge_type": "instantiates", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": "27158ca220022eeb5083c6addf8a50775d45f7161284fd60aac48410105f4b98", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/plba/bootstrap.py", + "title": "create_runtime:calls", + "content": "create_runtime calls runtime.register_module", + "start_line": 28, + "end_line": 28, + "metadata": { + "edge_id": "ab6003c3441addc1ba1b81edeca009165559f652f6b2cf424e5ae61b1f617de8", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.register_module", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/plba/bootstrap.py", + "title": "create_runtime:calls", + "content": "create_runtime calls runtime.control_plane.register_channel", + "start_line": 21, + "end_line": 27, + "metadata": { + "edge_id": "2678250030b9ce47a3b3b55fac7897ac530367edc8374ac9d5e6ecafb1e483f0", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.control_plane.register_channel", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/plba/bootstrap.py", + "title": "create_runtime:reads_attr", + "content": "create_runtime reads_attr runtime.add_config_file", + "start_line": 19, + "end_line": 19, + "metadata": { + "edge_id": "30d4e8aae984ab84d523e80d02f1caeda52d547fa3d2aa47be8845931cabbca2", + "edge_type": "reads_attr", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.add_config_file", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C3_ENTRYPOINTS", + "path": "src/app_runtime/control/http_app.py", + "title": "app.post", + "content": "fastapi http app.post", + "start_line": 38, + "end_line": 42, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C3_ENTRYPOINTS", + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "content": "fastapi http app.get", + "start_line": 31, + "end_line": 34, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C3_ENTRYPOINTS", + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "content": "fastapi http app.get", + "start_line": 38, + "end_line": 42, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "relations": [ + { + "path": "src/plba/bootstrap.py", + "metadata": { + "edge_id": "4eaeec4ac55a59d5f66fd01c4754955f8fedaf4bc3df13fa769b352c7bfaacbb", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.add_config_file", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "create_runtime calls runtime.add_config_file" + }, + { + "path": "src/plba/bootstrap.py", + "metadata": { + "edge_id": "45516c79ff358dbf9b650a081668df0f66d2fe989300f985a1a78be6be166f8f", + "edge_type": "reads_attr", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.register_module", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "create_runtime reads_attr runtime.register_module" + }, + { + "path": "src/plba/bootstrap.py", + "metadata": { + "edge_id": "0adba17984f850ea1608c9e734d2dd5c325cfde3a8133123aa239e44935ad18e", + "edge_type": "instantiates", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": "27158ca220022eeb5083c6addf8a50775d45f7161284fd60aac48410105f4b98", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "create_runtime instantiates RuntimeManager" + }, + { + "path": "src/plba/bootstrap.py", + "metadata": { + "edge_id": "ab6003c3441addc1ba1b81edeca009165559f652f6b2cf424e5ae61b1f617de8", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.register_module", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "create_runtime calls runtime.register_module" + }, + { + "path": "src/plba/bootstrap.py", + "metadata": { + "edge_id": "2678250030b9ce47a3b3b55fac7897ac530367edc8374ac9d5e6ecafb1e483f0", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.control_plane.register_channel", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "create_runtime calls runtime.control_plane.register_channel" + }, + { + "path": "src/plba/bootstrap.py", + "metadata": { + "edge_id": "30d4e8aae984ab84d523e80d02f1caeda52d547fa3d2aa47be8845931cabbca2", + "edge_type": "reads_attr", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.add_config_file", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "create_runtime reads_attr runtime.add_config_file" + } + ], + "entrypoints": [ + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.post", + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "test_candidates": [], + "layer_outcomes": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C4_SEMANTIC_ROLES", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 6, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C3_ENTRYPOINTS", + "hit_count": 3, + "empty": false, + "fallback_used": false + } + ], + "missing_layers": [], + "raw_rows": [ + { + "path": "src/plba/__init__.py", + "content": "const create_runtime\ncreate_runtime = plba.bootstrap.create_runtime", + "layer": "C1_SYMBOL_CATALOG", + "title": "create_runtime", + "span_start": 1, + "span_end": 1, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "fa1e84f16c8c659bcd5448637386af4d15d431064e07714e34689ee64233cb51", + "qname": "create_runtime", + "kind": "const", + "signature": "create_runtime = plba.bootstrap.create_runtime", + "parent_symbol_id": null, + "package_or_module": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "function create_runtime\ncreate_runtime(module)", + "layer": "C1_SYMBOL_CATALOG", + "title": "create_runtime", + "span_start": 8, + "span_end": 29, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "qname": "create_runtime", + "kind": "function", + "signature": "create_runtime(module)", + "parent_symbol_id": null, + "package_or_module": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "const annotations\nannotations = __future__.annotations", + "layer": "C1_SYMBOL_CATALOG", + "title": "annotations", + "span_start": 1, + "span_end": 1, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "5ed640ccec43a78659d50ec24f3717bf1144a182c22588f37456649ac6a4a815", + "qname": "annotations", + "kind": "const", + "signature": "annotations = __future__.annotations", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "const json\nimport json", + "layer": "C1_SYMBOL_CATALOG", + "title": "json", + "span_start": 4, + "span_end": 4, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "bb9e2eaf992bfd050f7072d72eed87c55b1a4b001daa034a0f7c630a61bb1d78", + "qname": "json", + "kind": "const", + "signature": "import json", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "const Path\nPath = pathlib.Path", + "layer": "C1_SYMBOL_CATALOG", + "title": "Path", + "span_start": 5, + "span_end": 5, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "b785967ed1fb83aa62d5724c6d6e9c6d2b1505523db39bd941cc39b48db48306", + "qname": "Path", + "kind": "const", + "signature": "Path = pathlib.Path", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "const Any\nAny = typing.Any", + "layer": "C1_SYMBOL_CATALOG", + "title": "Any", + "span_start": 6, + "span_end": 6, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "8e330833b8073585db1c4b4315947c400683a23e4c3d2e2ccbcb260f347541b6", + "qname": "Any", + "kind": "const", + "signature": "Any = typing.Any", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "const yaml\nimport yaml", + "layer": "C1_SYMBOL_CATALOG", + "title": "yaml", + "span_start": 8, + "span_end": 8, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "223502bbfc2b82aea662f7466403cc99a3cd44f1b0507d637cd674874f751e4f", + "qname": "yaml", + "kind": "const", + "signature": "import yaml", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "const hashlib\nimport hashlib", + "layer": "C1_SYMBOL_CATALOG", + "title": "hashlib", + "span_start": 3, + "span_end": 3, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "e7375824bd473da3d73d316d22e3cb6428930e2db1ffbd900ce5a8b88427bf05", + "qname": "hashlib", + "kind": "const", + "signature": "import hashlib", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/__init__.py", + "content": "from plba.bootstrap import create_runtime\nfrom plba.config import ConfigFileLoader, FileConfigProvider\nfrom plba.control import ControlActionSet, ControlChannel, ControlPlaneService, HttpControlChannel\nfrom plba.contracts import (\n ApplicationModule,\n ConfigProvider,\n HealthContributor,\n TraceContext,\n TraceContextRecord,\n TraceLogMessage,\n TraceTransport,\n Worker,\n WorkerHealth,\n WorkerStatus,\n)\nfrom plba.core import ConfigurationManager, RuntimeManager, ServiceContainer\nfrom plba.health import HealthRegistry\nfrom plba.logging import LogManager\nfrom plba.queue import InMemoryTaskQueue\nfrom plba.tracing import MySqlTraceTransport, NoOpTraceTransport, TraceService\nfrom plba.workflow import (\n StepResult,\n WorkflowContext,\n WorkflowDefinition,\n WorkflowEngine,\n WorkflowEngineHooks,\n WorkflowNode,\n WorkflowRuntimeFactory,\n WorkflowStep,\n)\nfrom plba.workers import WorkerSupervisor\n\n__all__ = [\n \"ApplicationModule\",\n \"ConfigFileLoader\",\n \"ConfigProvider\",\n \"ConfigurationManager\",\n \"ControlActionSet\",\n \"ControlChannel\",\n \"ControlPlaneService\",\n \"create_runtime\",\n \"FileConfigProvider\",\n \"HealthContributor\",\n \"HealthRegistry\",\n \"HttpControlChannel\",\n \"InMemoryTaskQueue\",\n \"LogManager\",\n \"MySqlTraceTransport\",\n \"NoOpTraceTransport\",\n \"RuntimeManager\",\n \"ServiceContainer\",\n \"TraceContext\",\n \"TraceContextRecord\",\n \"TraceLogMessage\",\n \"TraceService\",\n \"TraceTransport\",\n \"StepResult\",\n \"Worker\",\n \"WorkerHealth\",\n \"WorkerStatus\",\n \"WorkflowContext\",\n \"WorkflowDefinition\",\n \"WorkflowEngine\",\n \"WorkflowEngineHooks\",\n \"WorkflowNode\",\n \"WorkflowRuntimeFactory\",\n \"WorkflowStep\",\n \"WorkerSupervisor\",\n]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/__init__.py:1-69", + "span_start": 1, + "span_end": 69, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "def create_runtime(\n module: ApplicationModule,\n *,\n config_path: str | None = None,\n enable_http_control: bool = False,\n control_host: str = \"127.0.0.1\",\n control_port: int = 8080,\n control_timeout: int = 5,\n) -> RuntimeManager:\n runtime = RuntimeManager()\n if config_path is not None:\n runtime.add_config_file(config_path)\n if enable_http_control:\n runtime.control_plane.register_channel(\n HttpControlChannel(\n host=control_host,\n port=control_port,\n timeout=control_timeout,\n )\n )\n runtime.register_module(module)\n return runtime", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/bootstrap.py:create_runtime", + "span_start": 8, + "span_end": 29, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/__init__.py", + "content": "from app_runtime.config.file_loader import ConfigFileLoader\nfrom app_runtime.config.providers import FileConfigProvider\n\n__all__ = [\"ConfigFileLoader\", \"FileConfigProvider\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/config/__init__.py:1-4", + "span_start": 1, + "span_end": 4, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.config.__init__", + "is_test": false, + "blob_sha": "612918029820a2a983330ec92256142b55b9de4bdf3399ece18e2a02dbad9729", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "class ConfigFileLoader:\n def __init__(self, path: str | Path) -> None:\n self.path = Path(path)\n self.config: Any = None\n self.last_valid_config: Any = None\n self._last_seen_hash: str | None = None\n\n def read_text(self) -> str:\n return self.path.read_text(encoding=\"utf-8\")\n\n def parse(self, data: str) -> Any:\n suffix = self.path.suffix.lower()\n if suffix in {\".yml\", \".yaml\"}:\n return yaml.safe_load(data)\n return json.loads(data)\n\n def load_sync(self) -> Any:\n data = self.read_text()\n parsed = self.parse(data)\n self.config = parsed\n self.last_valid_config = parsed\n self._last_seen_hash = self._calculate_hash(data)\n return parsed\n\n def load_if_changed(self) -> tuple[bool, Any]:\n data = self.read_text()\n current_hash = self._calculate_hash(data)\n if current_hash == self._last_seen_hash:\n return False, self.config\n parsed = self.parse(data)\n self.config = parsed\n self.last_valid_config = parsed\n self._last_seen_hash = current_hash\n return True, parsed\n\n @staticmethod\n def _calculate_hash(data: str) -> str:\n return hashlib.sha256(data.encode(\"utf-8\")).hexdigest()", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/config/file_loader.py:ConfigFileLoader", + "span_start": 11, + "span_end": 48, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/providers.py", + "content": "class FileConfigProvider(ConfigProvider):\n def __init__(self, path: str | Path) -> None:\n self._loader = ConfigFileLoader(path)\n\n @property\n def loader(self) -> ConfigFileLoader:\n return self._loader\n\n def load(self) -> dict[str, Any]:\n config = self._loader.load_sync()\n if not isinstance(config, dict):\n raise TypeError(\"Config root must be a mapping\")\n return dict(config)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/config/providers.py:FileConfigProvider", + "span_start": 10, + "span_end": 22, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.config.providers", + "is_test": false, + "blob_sha": "8c53ca0122d6df6c5763bca15e99434bb4daebd5a618b8fc927e9ae90b022e64", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/__init__.py", + "content": "__all__: list[str] = []", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/__init__.py:1-1", + "span_start": 1, + "span_end": 1, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.__init__", + "is_test": false, + "blob_sha": "8eea9df4f6d7b38ca0e39ccc27b04700e3d08dbeec8046d613d22706d19985fa", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/application.py", + "content": "class ApplicationModule(ABC):\n @property\n @abstractmethod\n def name(self) -> str:\n \"\"\"Module name used for runtime status and diagnostics.\"\"\"\n\n @abstractmethod\n def register(self, registry: ModuleRegistry) -> None:\n \"\"\"Register workers, services, and health contributors.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/contracts/application.py:ApplicationModule", + "span_start": 8, + "span_end": 16, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.application", + "is_test": false, + "blob_sha": "197c35634dca49c352ce3f230295a485fbffb672ce7bb8c08e752bfdf61e7fa4", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/__init__.py", + "content": "__all__: list[str] = []", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/__init__.py:1-1", + "span_start": 1, + "span_end": 1, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.__init__", + "is_test": false, + "blob_sha": "8eea9df4f6d7b38ca0e39ccc27b04700e3d08dbeec8046d613d22706d19985fa", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/queue/in_memory.py", + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)", + "layer": "C4_SEMANTIC_ROLES", + "title": "InMemoryTaskQueue", + "span_start": 9, + "span_end": 38, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 22, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "2da04cb94544a3bcbf0943a95ad4bdd8710bcafaa32a02fd0e4de2178dcf3533", + "symbol_name": "InMemoryTaskQueue", + "qname": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 9, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "58f0cc001ccda0eee4c6bc32ed83bd05eafd6b6644f1e8b4aa9eed3103db73dc", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "ConfigFileLoader\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (8)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ConfigFileLoader", + "span_start": 11, + "span_end": 48, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 23, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "a8474eca8b6e9dc86ae67ed68b16fa5fb639ef08739c053e7b7195489765667f", + "symbol_name": "ConfigFileLoader", + "qname": "ConfigFileLoader", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 8, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workers/supervisor.py", + "content": "WorkerSupervisor\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkerSupervisor", + "span_start": 10, + "span_end": 59, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "c17b44e8d9e97d490989b21fa67d7c346cdda8a0472e4c41fb243c8846faa124", + "symbol_name": "WorkerSupervisor", + "qname": "WorkerSupervisor", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "77609d9d5927171cce7fc3a54897c183fd63068710c6362029b700937aae5eee", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowEngine", + "span_start": 10, + "span_end": 86, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "57ec0a9f11c542c78e008684a888397e8d9ef4223671acb2567e631a0cbc70b4", + "symbol_name": "WorkflowEngine", + "qname": "WorkflowEngine", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/store.py", + "content": "TraceContextStore\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "TraceContextStore", + "span_start": 15, + "span_end": 52, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "b2dad4fbe16ffb11b58deba311c7739955c39d59f291b22181f33e9c8cce4059", + "symbol_name": "TraceContextStore", + "qname": "TraceContextStore", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "d369554f08fc92039c6edd5a2a1e73b23901533e8974459170bbd9347d263dc5", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime calls runtime.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:calls", + "span_start": 19, + "span_end": 19, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "4eaeec4ac55a59d5f66fd01c4754955f8fedaf4bc3df13fa769b352c7bfaacbb", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.add_config_file", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime reads_attr runtime.register_module", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:reads_attr", + "span_start": 28, + "span_end": 28, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "45516c79ff358dbf9b650a081668df0f66d2fe989300f985a1a78be6be166f8f", + "edge_type": "reads_attr", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.register_module", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:instantiates", + "span_start": 17, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "0adba17984f850ea1608c9e734d2dd5c325cfde3a8133123aa239e44935ad18e", + "edge_type": "instantiates", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": "27158ca220022eeb5083c6addf8a50775d45f7161284fd60aac48410105f4b98", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime calls runtime.register_module", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:calls", + "span_start": 28, + "span_end": 28, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "ab6003c3441addc1ba1b81edeca009165559f652f6b2cf424e5ae61b1f617de8", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.register_module", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime calls runtime.control_plane.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:calls", + "span_start": 21, + "span_end": 27, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "2678250030b9ce47a3b3b55fac7897ac530367edc8374ac9d5e6ecafb1e483f0", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.control_plane.register_channel", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime reads_attr runtime.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:reads_attr", + "span_start": 19, + "span_end": 19, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "30d4e8aae984ab84d523e80d02f1caeda52d547fa3d2aa47be8845931cabbca2", + "edge_type": "reads_attr", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.add_config_file", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": null, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": null, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": null, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "retrieval_report": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "vector", + "C0_SOURCE_CHUNKS": "vector", + "C4_SEMANTIC_ROLES": "vector", + "C2_DEPENDENCY_GRAPH": "vector", + "C3_ENTRYPOINTS": "vector" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [] + } + }, + "fallback": { + "used": false, + "reason": null + }, + "retrieval_by_layer_ms": { + "C1_SYMBOL_CATALOG": 46, + "C0_SOURCE_CHUNKS": 20, + "C4_SEMANTIC_ROLES": 17, + "C2_DEPENDENCY_GRAPH": 69, + "C3_ENTRYPOINTS": 13 + } + } + }, + "diagnostics": { + "intent_correct": null, + "target_found": true, + "layers_used": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_sufficient": true, + "answer_mode": "normal", + "router_result": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "EXPLAIN", + "path_scope": [], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_resolution_status": "pending" + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Что делает функция create_runtime?", + "sub_intent": "EXPLAIN", + "path_scope": [], + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C4_SEMANTIC_ROLES", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 6, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C3_ENTRYPOINTS", + "hit_count": 3, + "empty": false, + "fallback_used": false + } + ], + "empty_layers": [], + "evidence_gate_decision": { + "sufficient": true, + "failure_reasons": [], + "evidence_count": 33 + }, + "failure_reasons": [], + "timings_ms": {} + }, + "rag_rows": [ + { + "path": "src/plba/__init__.py", + "content": "const create_runtime\ncreate_runtime = plba.bootstrap.create_runtime", + "layer": "C1_SYMBOL_CATALOG", + "title": "create_runtime", + "span_start": 1, + "span_end": 1, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "fa1e84f16c8c659bcd5448637386af4d15d431064e07714e34689ee64233cb51", + "qname": "create_runtime", + "kind": "const", + "signature": "create_runtime = plba.bootstrap.create_runtime", + "parent_symbol_id": null, + "package_or_module": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "function create_runtime\ncreate_runtime(module)", + "layer": "C1_SYMBOL_CATALOG", + "title": "create_runtime", + "span_start": 8, + "span_end": 29, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "qname": "create_runtime", + "kind": "function", + "signature": "create_runtime(module)", + "parent_symbol_id": null, + "package_or_module": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "const annotations\nannotations = __future__.annotations", + "layer": "C1_SYMBOL_CATALOG", + "title": "annotations", + "span_start": 1, + "span_end": 1, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "5ed640ccec43a78659d50ec24f3717bf1144a182c22588f37456649ac6a4a815", + "qname": "annotations", + "kind": "const", + "signature": "annotations = __future__.annotations", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "const json\nimport json", + "layer": "C1_SYMBOL_CATALOG", + "title": "json", + "span_start": 4, + "span_end": 4, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "bb9e2eaf992bfd050f7072d72eed87c55b1a4b001daa034a0f7c630a61bb1d78", + "qname": "json", + "kind": "const", + "signature": "import json", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "const Path\nPath = pathlib.Path", + "layer": "C1_SYMBOL_CATALOG", + "title": "Path", + "span_start": 5, + "span_end": 5, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "b785967ed1fb83aa62d5724c6d6e9c6d2b1505523db39bd941cc39b48db48306", + "qname": "Path", + "kind": "const", + "signature": "Path = pathlib.Path", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "const Any\nAny = typing.Any", + "layer": "C1_SYMBOL_CATALOG", + "title": "Any", + "span_start": 6, + "span_end": 6, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "8e330833b8073585db1c4b4315947c400683a23e4c3d2e2ccbcb260f347541b6", + "qname": "Any", + "kind": "const", + "signature": "Any = typing.Any", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "const yaml\nimport yaml", + "layer": "C1_SYMBOL_CATALOG", + "title": "yaml", + "span_start": 8, + "span_end": 8, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "223502bbfc2b82aea662f7466403cc99a3cd44f1b0507d637cd674874f751e4f", + "qname": "yaml", + "kind": "const", + "signature": "import yaml", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "const hashlib\nimport hashlib", + "layer": "C1_SYMBOL_CATALOG", + "title": "hashlib", + "span_start": 3, + "span_end": 3, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "e7375824bd473da3d73d316d22e3cb6428930e2db1ffbd900ce5a8b88427bf05", + "qname": "hashlib", + "kind": "const", + "signature": "import hashlib", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/__init__.py", + "content": "from plba.bootstrap import create_runtime\nfrom plba.config import ConfigFileLoader, FileConfigProvider\nfrom plba.control import ControlActionSet, ControlChannel, ControlPlaneService, HttpControlChannel\nfrom plba.contracts import (\n ApplicationModule,\n ConfigProvider,\n HealthContributor,\n TraceContext,\n TraceContextRecord,\n TraceLogMessage,\n TraceTransport,\n Worker,\n WorkerHealth,\n WorkerStatus,\n)\nfrom plba.core import ConfigurationManager, RuntimeManager, ServiceContainer\nfrom plba.health import HealthRegistry\nfrom plba.logging import LogManager\nfrom plba.queue import InMemoryTaskQueue\nfrom plba.tracing import MySqlTraceTransport, NoOpTraceTransport, TraceService\nfrom plba.workflow import (\n StepResult,\n WorkflowContext,\n WorkflowDefinition,\n WorkflowEngine,\n WorkflowEngineHooks,\n WorkflowNode,\n WorkflowRuntimeFactory,\n WorkflowStep,\n)\nfrom plba.workers import WorkerSupervisor\n\n__all__ = [\n \"ApplicationModule\",\n \"ConfigFileLoader\",\n \"ConfigProvider\",\n \"ConfigurationManager\",\n \"ControlActionSet\",\n \"ControlChannel\",\n \"ControlPlaneService\",\n \"create_runtime\",\n \"FileConfigProvider\",\n \"HealthContributor\",\n \"HealthRegistry\",\n \"HttpControlChannel\",\n \"InMemoryTaskQueue\",\n \"LogManager\",\n \"MySqlTraceTransport\",\n \"NoOpTraceTransport\",\n \"RuntimeManager\",\n \"ServiceContainer\",\n \"TraceContext\",\n \"TraceContextRecord\",\n \"TraceLogMessage\",\n \"TraceService\",\n \"TraceTransport\",\n \"StepResult\",\n \"Worker\",\n \"WorkerHealth\",\n \"WorkerStatus\",\n \"WorkflowContext\",\n \"WorkflowDefinition\",\n \"WorkflowEngine\",\n \"WorkflowEngineHooks\",\n \"WorkflowNode\",\n \"WorkflowRuntimeFactory\",\n \"WorkflowStep\",\n \"WorkerSupervisor\",\n]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/__init__.py:1-69", + "span_start": 1, + "span_end": 69, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "def create_runtime(\n module: ApplicationModule,\n *,\n config_path: str | None = None,\n enable_http_control: bool = False,\n control_host: str = \"127.0.0.1\",\n control_port: int = 8080,\n control_timeout: int = 5,\n) -> RuntimeManager:\n runtime = RuntimeManager()\n if config_path is not None:\n runtime.add_config_file(config_path)\n if enable_http_control:\n runtime.control_plane.register_channel(\n HttpControlChannel(\n host=control_host,\n port=control_port,\n timeout=control_timeout,\n )\n )\n runtime.register_module(module)\n return runtime", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/bootstrap.py:create_runtime", + "span_start": 8, + "span_end": 29, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/__init__.py", + "content": "from app_runtime.config.file_loader import ConfigFileLoader\nfrom app_runtime.config.providers import FileConfigProvider\n\n__all__ = [\"ConfigFileLoader\", \"FileConfigProvider\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/config/__init__.py:1-4", + "span_start": 1, + "span_end": 4, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.config.__init__", + "is_test": false, + "blob_sha": "612918029820a2a983330ec92256142b55b9de4bdf3399ece18e2a02dbad9729", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "class ConfigFileLoader:\n def __init__(self, path: str | Path) -> None:\n self.path = Path(path)\n self.config: Any = None\n self.last_valid_config: Any = None\n self._last_seen_hash: str | None = None\n\n def read_text(self) -> str:\n return self.path.read_text(encoding=\"utf-8\")\n\n def parse(self, data: str) -> Any:\n suffix = self.path.suffix.lower()\n if suffix in {\".yml\", \".yaml\"}:\n return yaml.safe_load(data)\n return json.loads(data)\n\n def load_sync(self) -> Any:\n data = self.read_text()\n parsed = self.parse(data)\n self.config = parsed\n self.last_valid_config = parsed\n self._last_seen_hash = self._calculate_hash(data)\n return parsed\n\n def load_if_changed(self) -> tuple[bool, Any]:\n data = self.read_text()\n current_hash = self._calculate_hash(data)\n if current_hash == self._last_seen_hash:\n return False, self.config\n parsed = self.parse(data)\n self.config = parsed\n self.last_valid_config = parsed\n self._last_seen_hash = current_hash\n return True, parsed\n\n @staticmethod\n def _calculate_hash(data: str) -> str:\n return hashlib.sha256(data.encode(\"utf-8\")).hexdigest()", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/config/file_loader.py:ConfigFileLoader", + "span_start": 11, + "span_end": 48, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/providers.py", + "content": "class FileConfigProvider(ConfigProvider):\n def __init__(self, path: str | Path) -> None:\n self._loader = ConfigFileLoader(path)\n\n @property\n def loader(self) -> ConfigFileLoader:\n return self._loader\n\n def load(self) -> dict[str, Any]:\n config = self._loader.load_sync()\n if not isinstance(config, dict):\n raise TypeError(\"Config root must be a mapping\")\n return dict(config)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/config/providers.py:FileConfigProvider", + "span_start": 10, + "span_end": 22, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.config.providers", + "is_test": false, + "blob_sha": "8c53ca0122d6df6c5763bca15e99434bb4daebd5a618b8fc927e9ae90b022e64", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/__init__.py", + "content": "__all__: list[str] = []", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/__init__.py:1-1", + "span_start": 1, + "span_end": 1, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.__init__", + "is_test": false, + "blob_sha": "8eea9df4f6d7b38ca0e39ccc27b04700e3d08dbeec8046d613d22706d19985fa", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/application.py", + "content": "class ApplicationModule(ABC):\n @property\n @abstractmethod\n def name(self) -> str:\n \"\"\"Module name used for runtime status and diagnostics.\"\"\"\n\n @abstractmethod\n def register(self, registry: ModuleRegistry) -> None:\n \"\"\"Register workers, services, and health contributors.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/contracts/application.py:ApplicationModule", + "span_start": 8, + "span_end": 16, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.application", + "is_test": false, + "blob_sha": "197c35634dca49c352ce3f230295a485fbffb672ce7bb8c08e752bfdf61e7fa4", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/__init__.py", + "content": "__all__: list[str] = []", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/__init__.py:1-1", + "span_start": 1, + "span_end": 1, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.__init__", + "is_test": false, + "blob_sha": "8eea9df4f6d7b38ca0e39ccc27b04700e3d08dbeec8046d613d22706d19985fa", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/queue/in_memory.py", + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)", + "layer": "C4_SEMANTIC_ROLES", + "title": "InMemoryTaskQueue", + "span_start": 9, + "span_end": 38, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 22, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "2da04cb94544a3bcbf0943a95ad4bdd8710bcafaa32a02fd0e4de2178dcf3533", + "symbol_name": "InMemoryTaskQueue", + "qname": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 9, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "58f0cc001ccda0eee4c6bc32ed83bd05eafd6b6644f1e8b4aa9eed3103db73dc", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "ConfigFileLoader\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (8)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ConfigFileLoader", + "span_start": 11, + "span_end": 48, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 23, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "a8474eca8b6e9dc86ae67ed68b16fa5fb639ef08739c053e7b7195489765667f", + "symbol_name": "ConfigFileLoader", + "qname": "ConfigFileLoader", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 8, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workers/supervisor.py", + "content": "WorkerSupervisor\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkerSupervisor", + "span_start": 10, + "span_end": 59, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "c17b44e8d9e97d490989b21fa67d7c346cdda8a0472e4c41fb243c8846faa124", + "symbol_name": "WorkerSupervisor", + "qname": "WorkerSupervisor", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "77609d9d5927171cce7fc3a54897c183fd63068710c6362029b700937aae5eee", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowEngine", + "span_start": 10, + "span_end": 86, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "57ec0a9f11c542c78e008684a888397e8d9ef4223671acb2567e631a0cbc70b4", + "symbol_name": "WorkflowEngine", + "qname": "WorkflowEngine", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/store.py", + "content": "TraceContextStore\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "TraceContextStore", + "span_start": 15, + "span_end": 52, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b2dad4fbe16ffb11b58deba311c7739955c39d59f291b22181f33e9c8cce4059", + "symbol_name": "TraceContextStore", + "qname": "TraceContextStore", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "d369554f08fc92039c6edd5a2a1e73b23901533e8974459170bbd9347d263dc5", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime calls runtime.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:calls", + "span_start": 19, + "span_end": 19, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "4eaeec4ac55a59d5f66fd01c4754955f8fedaf4bc3df13fa769b352c7bfaacbb", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.add_config_file", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime reads_attr runtime.register_module", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:reads_attr", + "span_start": 28, + "span_end": 28, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "45516c79ff358dbf9b650a081668df0f66d2fe989300f985a1a78be6be166f8f", + "edge_type": "reads_attr", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.register_module", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:instantiates", + "span_start": 17, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "0adba17984f850ea1608c9e734d2dd5c325cfde3a8133123aa239e44935ad18e", + "edge_type": "instantiates", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": "27158ca220022eeb5083c6addf8a50775d45f7161284fd60aac48410105f4b98", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime calls runtime.register_module", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:calls", + "span_start": 28, + "span_end": 28, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "ab6003c3441addc1ba1b81edeca009165559f652f6b2cf424e5ae61b1f617de8", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.register_module", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime calls runtime.control_plane.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:calls", + "span_start": 21, + "span_end": 27, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "2678250030b9ce47a3b3b55fac7897ac530367edc8374ac9d5e6ecafb1e483f0", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.control_plane.register_channel", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime reads_attr runtime.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:reads_attr", + "span_start": 19, + "span_end": 19, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "30d4e8aae984ab84d523e80d02f1caeda52d547fa3d2aa47be8845931cabbca2", + "edge_type": "reads_attr", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.add_config_file", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "validation": { + "passed": true, + "action": "return", + "reasons": [] + } + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-explain-create-runtime.md b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-explain-create-runtime.md new file mode 100644 index 0000000..d04c416 --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-explain-create-runtime.md @@ -0,0 +1,34 @@ +# plba-v2-explain-create-runtime + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: agent_runtime +- mode: full_chain +- passed: True + +## Query +Что делает функция create_runtime? + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 33, + "llm_answer": "Функция `create_runtime` инициализирует и настраивает менеджер выполнения приложения.\n\n**Ключевые шаги:**\n1. Инициализация менеджера выполнения (`RuntimeManager()`).\n2. Добавление конфигурационного файла, если указан путь (`add_config_file`).\n3. Регистрация HTTP-канала управления, если включен режим управления (`register_channel`).\n4. Регистрация модуля приложения в менеджере выполнения (`register_module`).\n\n**Опорные файлы:**\n- `src/plba/bootstrap.py:8-29`\n\nЭтот процесс позволяет настроить и запустить приложение с учетом заданных конфигураций и режимов управления.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "create_runtime" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-explain-local-http-channel.json b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-explain-local-http-channel.json new file mode 100644 index 0000000..a2ca778 --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-explain-local-http-channel.json @@ -0,0 +1,2033 @@ +{ + "case_id": "plba-v2-explain-local-http-channel", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "agent_runtime", + "mode": "full_chain", + "query": "Почему в файле src/app_runtime/control/http_channel.py класс HttpControlChannel устроен так?", + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN_LOCAL", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 13, + "llm_answer": "Класс `HttpControlChannel` предназначен для управления HTTP каналом контроля в приложении.\n\n**Ключевые шаги его реализации:**\n1. Инициализация (`__init__`) – принимает параметры хоста, порта и тайм-аута, создаёт внутренние объекты управления и инициализирует состояние канала.\n2. Запуск (`start`) – запускает сервер с заданными действиями контроля, создавая приложение и вызывая runner для запуска сервера.\n3. Остановка (`stop`) – останавливает запущенный сервер.\n4. Свойство `port` – возвращает порт, используемый сервером.\n5. Метод `_health_response` – генерирует ответ о состоянии здоровья системы (здоров или нет).\n\nОпорные файлы:\n- `src/app_runtime/control/http_channel.py:12-57` (определение класса и методов)\n- `src/app_runtime/control/http_channel.py:13-17` (инициализация)\n- `src/app_runtime/control/http_channel.py:19-22` (запуск)", + "answer_mode": "answered", + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "symbol_candidates": [ + "HttpControlChannel" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C2_DEPENDENCY_GRAPH" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "query": "Почему в файле src/app_runtime/control/http_channel.py класс HttpControlChannel устроен так?", + "router_result": { + "schema_version": "1.1", + "intent": "CODE_QA", + "retrieval_profile": "code", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query_plan": { + "raw": "Почему в файле src/app_runtime/control/http_channel.py класс HttpControlChannel устроен так?", + "normalized": "Почему в файле src/app_runtime/control/http_channel.py класс HttpControlChannel устроен так?", + "sub_intent": "EXPLAIN_LOCAL", + "negations": [], + "expansions": [ + "file", + "HttpControlChannel" + ], + "keyword_hints": [ + "src/app_runtime/control/http_channel.py", + "HttpControlChannel" + ], + "path_hints": [ + "src/app_runtime/control/http_channel.py" + ], + "doc_scope_hints": [], + "symbol_candidates": [ + "HttpControlChannel" + ], + "symbol_kind_hint": "class", + "anchors": [ + { + "type": "FILE_PATH", + "value": "src/app_runtime/control/http_channel.py", + "source": "user_text", + "subtype": null, + "span": { + "start": 15, + "end": 54 + }, + "confidence": 0.95 + }, + { + "type": "SYMBOL", + "value": "HttpControlChannel", + "source": "user_text", + "subtype": null, + "span": { + "start": 61, + "end": 79 + }, + "confidence": 0.88 + }, + { + "type": "KEY_TERM", + "value": "файл", + "source": "user_text", + "subtype": null, + "span": { + "start": 9, + "end": 14 + }, + "confidence": 0.9 + }, + { + "type": "KEY_TERM", + "value": "класс", + "source": "user_text", + "subtype": null, + "span": { + "start": 55, + "end": 60 + }, + "confidence": 0.9 + } + ] + }, + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "top_k": 8 + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 12 + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "top_k": 4 + } + ], + "filters": { + "test_policy": "EXCLUDE", + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + }, + "symbol_resolution": { + "status": "pending", + "resolved_symbol": null, + "alternatives": [ + "HttpControlChannel" + ], + "confidence": 0.0 + }, + "evidence_policy": { + "require_def": true, + "require_flow": false, + "require_spec": false, + "allow_answer_without_evidence": false + } + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Почему в файле src/app_runtime/control/http_channel.py класс HttpControlChannel устроен так?", + "sub_intent": "EXPLAIN_LOCAL", + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "keyword_hints": [ + "src/app_runtime/control/http_channel.py", + "HttpControlChannel" + ], + "symbol_candidates": [ + "HttpControlChannel" + ], + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C2_DEPENDENCY_GRAPH" + ], + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "top_k": 8 + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 12 + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "top_k": 4 + } + ], + "filters": { + "test_policy": "EXCLUDE", + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + }, + "query_plan": { + "raw": "Почему в файле src/app_runtime/control/http_channel.py класс HttpControlChannel устроен так?", + "normalized": "Почему в файле src/app_runtime/control/http_channel.py класс HttpControlChannel устроен так?", + "sub_intent": "EXPLAIN_LOCAL", + "negations": [], + "expansions": [ + "file", + "HttpControlChannel" + ], + "keyword_hints": [ + "src/app_runtime/control/http_channel.py", + "HttpControlChannel" + ], + "path_hints": [ + "src/app_runtime/control/http_channel.py" + ], + "doc_scope_hints": [], + "symbol_candidates": [ + "HttpControlChannel" + ], + "symbol_kind_hint": "class", + "anchors": [ + { + "type": "FILE_PATH", + "value": "src/app_runtime/control/http_channel.py", + "source": "user_text", + "subtype": null, + "span": { + "start": 15, + "end": 54 + }, + "confidence": 0.95 + }, + { + "type": "SYMBOL", + "value": "HttpControlChannel", + "source": "user_text", + "subtype": null, + "span": { + "start": 61, + "end": 79 + }, + "confidence": 0.88 + }, + { + "type": "KEY_TERM", + "value": "файл", + "source": "user_text", + "subtype": null, + "span": { + "start": 9, + "end": 14 + }, + "confidence": 0.9 + }, + { + "type": "KEY_TERM", + "value": "класс", + "source": "user_text", + "subtype": null, + "span": { + "start": 55, + "end": 60 + }, + "confidence": 0.9 + } + ] + } + }, + "retrieval_result": { + "target_symbol_candidates": [ + "ControlChannel", + "ControlActionSet", + "JSONResponse", + "HttpControlAppFactory", + "UvicornThreadRunner", + "HttpControlChannel", + "HttpControlChannel.__init__", + "HttpControlChannel.start" + ], + "resolved_symbol": "HttpControlChannel", + "symbol_resolution_status": "resolved", + "file_candidates": [ + "src/app_runtime/control/http_channel.py" + ], + "code_chunks": [ + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/http_channel.py", + "title": "ControlChannel", + "content": "const ControlChannel\nControlChannel = app_runtime.control.base.ControlChannel", + "start_line": 7, + "end_line": 7, + "metadata": { + "symbol_id": "6e69a934202b6e11891af8fb72b2033e8ae3071eb7577c64f5545b5b7ddfb51e", + "qname": "ControlChannel", + "kind": "const", + "signature": "ControlChannel = app_runtime.control.base.ControlChannel", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/http_channel.py", + "title": "ControlActionSet", + "content": "const ControlActionSet\nControlActionSet = app_runtime.control.base.ControlActionSet", + "start_line": 7, + "end_line": 7, + "metadata": { + "symbol_id": "2132a5717c57061e3488a1bf4d43650a60ea903a42278f4d494c014bc80d2df9", + "qname": "ControlActionSet", + "kind": "const", + "signature": "ControlActionSet = app_runtime.control.base.ControlActionSet", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/http_channel.py", + "title": "JSONResponse", + "content": "const JSONResponse\nJSONResponse = fastapi.responses.JSONResponse", + "start_line": 5, + "end_line": 5, + "metadata": { + "symbol_id": "238f600ea55013e25a3e1451f7fd65caabea125b314b89247900cdab5b801a23", + "qname": "JSONResponse", + "kind": "const", + "signature": "JSONResponse = fastapi.responses.JSONResponse", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/http_channel.py", + "title": "HttpControlAppFactory", + "content": "const HttpControlAppFactory\nHttpControlAppFactory = app_runtime.control.http_app.HttpControlAppFactory", + "start_line": 8, + "end_line": 8, + "metadata": { + "symbol_id": "9ee00379ee797cd2386e88a6e37dc69e3e31de9144fc4b95f0206cd1430e8983", + "qname": "HttpControlAppFactory", + "kind": "const", + "signature": "HttpControlAppFactory = app_runtime.control.http_app.HttpControlAppFactory", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/http_channel.py", + "title": "UvicornThreadRunner", + "content": "const UvicornThreadRunner\nUvicornThreadRunner = app_runtime.control.http_runner.UvicornThreadRunner", + "start_line": 9, + "end_line": 9, + "metadata": { + "symbol_id": "c6ee53f4ff75d5b34ee95854cb63bb3ecfa163023717cd969b8cba937a0cd3b3", + "qname": "UvicornThreadRunner", + "kind": "const", + "signature": "UvicornThreadRunner = app_runtime.control.http_runner.UvicornThreadRunner", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/http_channel.py", + "title": "HttpControlChannel", + "content": "class HttpControlChannel\nHttpControlChannel(ControlChannel)", + "start_line": 12, + "end_line": 57, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "qname": "HttpControlChannel", + "kind": "class", + "signature": "HttpControlChannel(ControlChannel)", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/http_channel.py", + "title": "HttpControlChannel.__init__", + "content": "method HttpControlChannel.__init__\n__init__(self, host, port, timeout)", + "start_line": 13, + "end_line": 17, + "metadata": { + "symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "qname": "HttpControlChannel.__init__", + "kind": "method", + "signature": "__init__(self, host, port, timeout)", + "parent_symbol_id": "HttpControlChannel", + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/http_channel.py", + "title": "HttpControlChannel.start", + "content": "method HttpControlChannel.start\nstart(self, actions)", + "start_line": 19, + "end_line": 22, + "metadata": { + "symbol_id": "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0", + "qname": "HttpControlChannel.start", + "kind": "method", + "signature": "start(self, actions)", + "parent_symbol_id": "HttpControlChannel", + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/http_channel.py", + "title": "src/app_runtime/control/http_channel.py:HttpControlChannel", + "content": "class HttpControlChannel(ControlChannel):\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._timeout = timeout\n self._runner = UvicornThreadRunner(host, port, timeout)\n self._factory = HttpControlAppFactory()\n self._actions: ControlActionSet | None = None\n\n async def start(self, actions: ControlActionSet) -> None:\n self._actions = actions\n app = self._factory.create(self._health_response, self._action_response)\n await self._runner.start(app)\n\n async def stop(self) -> None:\n await self._runner.stop()\n\n @property\n def port(self) -> int:\n return self._runner.port\n\n async def _health_response(self) -> dict[str, object]:\n if self._actions is None:\n return {\"status\": \"unhealthy\", \"detail\": \"control actions are not configured\"}\n return await asyncio.wait_for(self._actions.health(), timeout=float(self._timeout))\n\n async def _action_response(self, action: str, _client_source: str = \"unknown\") -> JSONResponse:\n if self._actions is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"{action} handler is not configured\"}, status_code=404)\n callbacks = {\n \"start\": self._actions.start,\n \"stop\": self._actions.stop,\n \"status\": self._actions.status,\n }\n callback = callbacks.get(action)\n if callback is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"unsupported action: {action}\"}, status_code=404)\n action_timeout = max(float(self._timeout), 10.0) if action in {\"start\", \"stop\"} else float(self._timeout)\n try:\n detail = await asyncio.wait_for(callback(), timeout=action_timeout)\n except asyncio.TimeoutError:\n return JSONResponse(\n content={\"status\": \"accepted\", \"detail\": f\"{action} operation is still in progress\"},\n status_code=202,\n )\n except Exception as exc:\n return JSONResponse(content={\"status\": \"error\", \"detail\": str(exc)}, status_code=500)\n return JSONResponse(content={\"status\": \"ok\", \"detail\": detail or f\"{action} action accepted\"}, status_code=200)", + "start_line": 12, + "end_line": 57, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/http_channel.py", + "title": "HttpControlChannel.__init__:dataflow_slice", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._timeout\n -> HttpControlChannel._action_response", + "start_line": 14, + "end_line": 47, + "metadata": { + "edge_id": "c3ef21fcae96c82c00be74b3ab827d4af2085d89cb3fa5521c19a174aad84dbb", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "e64969024ccaeb34d8d91473fad07b3b3d341875846392e7a006406c7ada1954", + "dst_ref": "HttpControlChannel._action_response", + "resolution": "resolved", + "slice_id": "c3ef21fcae96c82c00be74b3ab827d4af2085d89cb3fa5521c19a174aad84dbb", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._timeout", + "HttpControlChannel._action_response" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "e64969024ccaeb34d8d91473fad07b3b3d341875846392e7a006406c7ada1954" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/http_channel.py", + "title": "HttpControlChannel.__init__:dataflow_slice", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._runner\n -> HttpControlChannel.start", + "start_line": 15, + "end_line": 22, + "metadata": { + "edge_id": "51d73913df709152258ed1b9a8c8f4eb3c575eccfe6b982aef0b28e0789a29da", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0", + "dst_ref": "HttpControlChannel.start", + "resolution": "resolved", + "slice_id": "51d73913df709152258ed1b9a8c8f4eb3c575eccfe6b982aef0b28e0789a29da", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._runner", + "HttpControlChannel.start" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/http_channel.py", + "title": "HttpControlChannel.__init__:dataflow_slice", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._timeout\n -> HttpControlChannel._health_response", + "start_line": 14, + "end_line": 34, + "metadata": { + "edge_id": "f858f5c9e575f6c4cdfe3853571b7ee21d1f628a443541d2037c3dc9d0790bef", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "e84bf04e9cd2127df235b7064d05f47e19f19a89c7c82f4c247231d4e8fa426a", + "dst_ref": "HttpControlChannel._health_response", + "resolution": "resolved", + "slice_id": "f858f5c9e575f6c4cdfe3853571b7ee21d1f628a443541d2037c3dc9d0790bef", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._timeout", + "HttpControlChannel._health_response" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "e84bf04e9cd2127df235b7064d05f47e19f19a89c7c82f4c247231d4e8fa426a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/http_channel.py", + "title": "HttpControlChannel.__init__:dataflow_slice", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._runner\n -> HttpControlChannel.stop", + "start_line": 15, + "end_line": 25, + "metadata": { + "edge_id": "0f827ef81a990258a8a74381c8564a8361afa6712dba3200592659c939adcb9d", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "f29ab212620093d72be20e26c5a399624c7939a6056a728762ed3f84a250bfa3", + "dst_ref": "HttpControlChannel.stop", + "resolution": "resolved", + "slice_id": "0f827ef81a990258a8a74381c8564a8361afa6712dba3200592659c939adcb9d", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._runner", + "HttpControlChannel.stop" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "f29ab212620093d72be20e26c5a399624c7939a6056a728762ed3f84a250bfa3" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "relations": [ + { + "path": "src/app_runtime/control/http_channel.py", + "metadata": { + "edge_id": "c3ef21fcae96c82c00be74b3ab827d4af2085d89cb3fa5521c19a174aad84dbb", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "e64969024ccaeb34d8d91473fad07b3b3d341875846392e7a006406c7ada1954", + "dst_ref": "HttpControlChannel._action_response", + "resolution": "resolved", + "slice_id": "c3ef21fcae96c82c00be74b3ab827d4af2085d89cb3fa5521c19a174aad84dbb", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._timeout", + "HttpControlChannel._action_response" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "e64969024ccaeb34d8d91473fad07b3b3d341875846392e7a006406c7ada1954" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._timeout\n -> HttpControlChannel._action_response" + }, + { + "path": "src/app_runtime/control/http_channel.py", + "metadata": { + "edge_id": "51d73913df709152258ed1b9a8c8f4eb3c575eccfe6b982aef0b28e0789a29da", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0", + "dst_ref": "HttpControlChannel.start", + "resolution": "resolved", + "slice_id": "51d73913df709152258ed1b9a8c8f4eb3c575eccfe6b982aef0b28e0789a29da", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._runner", + "HttpControlChannel.start" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._runner\n -> HttpControlChannel.start" + }, + { + "path": "src/app_runtime/control/http_channel.py", + "metadata": { + "edge_id": "f858f5c9e575f6c4cdfe3853571b7ee21d1f628a443541d2037c3dc9d0790bef", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "e84bf04e9cd2127df235b7064d05f47e19f19a89c7c82f4c247231d4e8fa426a", + "dst_ref": "HttpControlChannel._health_response", + "resolution": "resolved", + "slice_id": "f858f5c9e575f6c4cdfe3853571b7ee21d1f628a443541d2037c3dc9d0790bef", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._timeout", + "HttpControlChannel._health_response" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "e84bf04e9cd2127df235b7064d05f47e19f19a89c7c82f4c247231d4e8fa426a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._timeout\n -> HttpControlChannel._health_response" + }, + { + "path": "src/app_runtime/control/http_channel.py", + "metadata": { + "edge_id": "0f827ef81a990258a8a74381c8564a8361afa6712dba3200592659c939adcb9d", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "f29ab212620093d72be20e26c5a399624c7939a6056a728762ed3f84a250bfa3", + "dst_ref": "HttpControlChannel.stop", + "resolution": "resolved", + "slice_id": "0f827ef81a990258a8a74381c8564a8361afa6712dba3200592659c939adcb9d", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._runner", + "HttpControlChannel.stop" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "f29ab212620093d72be20e26c5a399624c7939a6056a728762ed3f84a250bfa3" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._runner\n -> HttpControlChannel.stop" + } + ], + "entrypoints": [], + "test_candidates": [], + "layer_outcomes": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 1, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 4, + "empty": false, + "fallback_used": false + } + ], + "missing_layers": [], + "raw_rows": [ + { + "path": "src/app_runtime/control/http_channel.py", + "content": "const ControlChannel\nControlChannel = app_runtime.control.base.ControlChannel", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlChannel", + "span_start": 7, + "span_end": 7, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "6e69a934202b6e11891af8fb72b2033e8ae3071eb7577c64f5545b5b7ddfb51e", + "qname": "ControlChannel", + "kind": "const", + "signature": "ControlChannel = app_runtime.control.base.ControlChannel", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "const ControlActionSet\nControlActionSet = app_runtime.control.base.ControlActionSet", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlActionSet", + "span_start": 7, + "span_end": 7, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "2132a5717c57061e3488a1bf4d43650a60ea903a42278f4d494c014bc80d2df9", + "qname": "ControlActionSet", + "kind": "const", + "signature": "ControlActionSet = app_runtime.control.base.ControlActionSet", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "const JSONResponse\nJSONResponse = fastapi.responses.JSONResponse", + "layer": "C1_SYMBOL_CATALOG", + "title": "JSONResponse", + "span_start": 5, + "span_end": 5, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "238f600ea55013e25a3e1451f7fd65caabea125b314b89247900cdab5b801a23", + "qname": "JSONResponse", + "kind": "const", + "signature": "JSONResponse = fastapi.responses.JSONResponse", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "const HttpControlAppFactory\nHttpControlAppFactory = app_runtime.control.http_app.HttpControlAppFactory", + "layer": "C1_SYMBOL_CATALOG", + "title": "HttpControlAppFactory", + "span_start": 8, + "span_end": 8, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "9ee00379ee797cd2386e88a6e37dc69e3e31de9144fc4b95f0206cd1430e8983", + "qname": "HttpControlAppFactory", + "kind": "const", + "signature": "HttpControlAppFactory = app_runtime.control.http_app.HttpControlAppFactory", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "const UvicornThreadRunner\nUvicornThreadRunner = app_runtime.control.http_runner.UvicornThreadRunner", + "layer": "C1_SYMBOL_CATALOG", + "title": "UvicornThreadRunner", + "span_start": 9, + "span_end": 9, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "c6ee53f4ff75d5b34ee95854cb63bb3ecfa163023717cd969b8cba937a0cd3b3", + "qname": "UvicornThreadRunner", + "kind": "const", + "signature": "UvicornThreadRunner = app_runtime.control.http_runner.UvicornThreadRunner", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel\nHttpControlChannel(ControlChannel)", + "layer": "C1_SYMBOL_CATALOG", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "qname": "HttpControlChannel", + "kind": "class", + "signature": "HttpControlChannel(ControlChannel)", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "method HttpControlChannel.__init__\n__init__(self, host, port, timeout)", + "layer": "C1_SYMBOL_CATALOG", + "title": "HttpControlChannel.__init__", + "span_start": 13, + "span_end": 17, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "qname": "HttpControlChannel.__init__", + "kind": "method", + "signature": "__init__(self, host, port, timeout)", + "parent_symbol_id": "HttpControlChannel", + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "method HttpControlChannel.start\nstart(self, actions)", + "layer": "C1_SYMBOL_CATALOG", + "title": "HttpControlChannel.start", + "span_start": 19, + "span_end": 22, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0", + "qname": "HttpControlChannel.start", + "kind": "method", + "signature": "start(self, actions)", + "parent_symbol_id": "HttpControlChannel", + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel(ControlChannel):\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._timeout = timeout\n self._runner = UvicornThreadRunner(host, port, timeout)\n self._factory = HttpControlAppFactory()\n self._actions: ControlActionSet | None = None\n\n async def start(self, actions: ControlActionSet) -> None:\n self._actions = actions\n app = self._factory.create(self._health_response, self._action_response)\n await self._runner.start(app)\n\n async def stop(self) -> None:\n await self._runner.stop()\n\n @property\n def port(self) -> int:\n return self._runner.port\n\n async def _health_response(self) -> dict[str, object]:\n if self._actions is None:\n return {\"status\": \"unhealthy\", \"detail\": \"control actions are not configured\"}\n return await asyncio.wait_for(self._actions.health(), timeout=float(self._timeout))\n\n async def _action_response(self, action: str, _client_source: str = \"unknown\") -> JSONResponse:\n if self._actions is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"{action} handler is not configured\"}, status_code=404)\n callbacks = {\n \"start\": self._actions.start,\n \"stop\": self._actions.stop,\n \"status\": self._actions.status,\n }\n callback = callbacks.get(action)\n if callback is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"unsupported action: {action}\"}, status_code=404)\n action_timeout = max(float(self._timeout), 10.0) if action in {\"start\", \"stop\"} else float(self._timeout)\n try:\n detail = await asyncio.wait_for(callback(), timeout=action_timeout)\n except asyncio.TimeoutError:\n return JSONResponse(\n content={\"status\": \"accepted\", \"detail\": f\"{action} operation is still in progress\"},\n status_code=202,\n )\n except Exception as exc:\n return JSONResponse(content={\"status\": \"error\", \"detail\": str(exc)}, status_code=500)\n return JSONResponse(content={\"status\": \"ok\", \"detail\": detail or f\"{action} action accepted\"}, status_code=200)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_channel.py:HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._timeout\n -> HttpControlChannel._action_response", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "c3ef21fcae96c82c00be74b3ab827d4af2085d89cb3fa5521c19a174aad84dbb", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "e64969024ccaeb34d8d91473fad07b3b3d341875846392e7a006406c7ada1954", + "dst_ref": "HttpControlChannel._action_response", + "resolution": "resolved", + "slice_id": "c3ef21fcae96c82c00be74b3ab827d4af2085d89cb3fa5521c19a174aad84dbb", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._timeout", + "HttpControlChannel._action_response" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "e64969024ccaeb34d8d91473fad07b3b3d341875846392e7a006406c7ada1954" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._runner\n -> HttpControlChannel.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 15, + "span_end": 22, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "51d73913df709152258ed1b9a8c8f4eb3c575eccfe6b982aef0b28e0789a29da", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0", + "dst_ref": "HttpControlChannel.start", + "resolution": "resolved", + "slice_id": "51d73913df709152258ed1b9a8c8f4eb3c575eccfe6b982aef0b28e0789a29da", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._runner", + "HttpControlChannel.start" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._timeout\n -> HttpControlChannel._health_response", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 14, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "f858f5c9e575f6c4cdfe3853571b7ee21d1f628a443541d2037c3dc9d0790bef", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "e84bf04e9cd2127df235b7064d05f47e19f19a89c7c82f4c247231d4e8fa426a", + "dst_ref": "HttpControlChannel._health_response", + "resolution": "resolved", + "slice_id": "f858f5c9e575f6c4cdfe3853571b7ee21d1f628a443541d2037c3dc9d0790bef", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._timeout", + "HttpControlChannel._health_response" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "e84bf04e9cd2127df235b7064d05f47e19f19a89c7c82f4c247231d4e8fa426a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._runner\n -> HttpControlChannel.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 15, + "span_end": 25, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "0f827ef81a990258a8a74381c8564a8361afa6712dba3200592659c939adcb9d", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "f29ab212620093d72be20e26c5a399624c7939a6056a728762ed3f84a250bfa3", + "dst_ref": "HttpControlChannel.stop", + "resolution": "resolved", + "slice_id": "0f827ef81a990258a8a74381c8564a8361afa6712dba3200592659c939adcb9d", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._runner", + "HttpControlChannel.stop" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "f29ab212620093d72be20e26c5a399624c7939a6056a728762ed3f84a250bfa3" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "retrieval_report": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C2_DEPENDENCY_GRAPH" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "vector", + "C0_SOURCE_CHUNKS": "vector", + "C2_DEPENDENCY_GRAPH": "vector" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 12, + "C2_DEPENDENCY_GRAPH": 4 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ] + } + }, + "fallback": { + "used": false, + "reason": null + }, + "retrieval_by_layer_ms": { + "C1_SYMBOL_CATALOG": 38, + "C0_SOURCE_CHUNKS": 17, + "C2_DEPENDENCY_GRAPH": 17 + } + } + }, + "diagnostics": { + "intent_correct": null, + "target_found": true, + "layers_used": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C2_DEPENDENCY_GRAPH" + ], + "retrieval_sufficient": true, + "answer_mode": "normal", + "router_result": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "EXPLAIN_LOCAL", + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C2_DEPENDENCY_GRAPH" + ], + "symbol_resolution_status": "pending" + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Почему в файле src/app_runtime/control/http_channel.py класс HttpControlChannel устроен так?", + "sub_intent": "EXPLAIN_LOCAL", + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C2_DEPENDENCY_GRAPH" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 1, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 4, + "empty": false, + "fallback_used": false + } + ], + "empty_layers": [], + "evidence_gate_decision": { + "sufficient": true, + "failure_reasons": [], + "evidence_count": 13 + }, + "failure_reasons": [], + "timings_ms": {} + }, + "rag_rows": [ + { + "path": "src/app_runtime/control/http_channel.py", + "content": "const ControlChannel\nControlChannel = app_runtime.control.base.ControlChannel", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlChannel", + "span_start": 7, + "span_end": 7, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "6e69a934202b6e11891af8fb72b2033e8ae3071eb7577c64f5545b5b7ddfb51e", + "qname": "ControlChannel", + "kind": "const", + "signature": "ControlChannel = app_runtime.control.base.ControlChannel", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "const ControlActionSet\nControlActionSet = app_runtime.control.base.ControlActionSet", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlActionSet", + "span_start": 7, + "span_end": 7, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "2132a5717c57061e3488a1bf4d43650a60ea903a42278f4d494c014bc80d2df9", + "qname": "ControlActionSet", + "kind": "const", + "signature": "ControlActionSet = app_runtime.control.base.ControlActionSet", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "const JSONResponse\nJSONResponse = fastapi.responses.JSONResponse", + "layer": "C1_SYMBOL_CATALOG", + "title": "JSONResponse", + "span_start": 5, + "span_end": 5, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "238f600ea55013e25a3e1451f7fd65caabea125b314b89247900cdab5b801a23", + "qname": "JSONResponse", + "kind": "const", + "signature": "JSONResponse = fastapi.responses.JSONResponse", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "const HttpControlAppFactory\nHttpControlAppFactory = app_runtime.control.http_app.HttpControlAppFactory", + "layer": "C1_SYMBOL_CATALOG", + "title": "HttpControlAppFactory", + "span_start": 8, + "span_end": 8, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "9ee00379ee797cd2386e88a6e37dc69e3e31de9144fc4b95f0206cd1430e8983", + "qname": "HttpControlAppFactory", + "kind": "const", + "signature": "HttpControlAppFactory = app_runtime.control.http_app.HttpControlAppFactory", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "const UvicornThreadRunner\nUvicornThreadRunner = app_runtime.control.http_runner.UvicornThreadRunner", + "layer": "C1_SYMBOL_CATALOG", + "title": "UvicornThreadRunner", + "span_start": 9, + "span_end": 9, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "c6ee53f4ff75d5b34ee95854cb63bb3ecfa163023717cd969b8cba937a0cd3b3", + "qname": "UvicornThreadRunner", + "kind": "const", + "signature": "UvicornThreadRunner = app_runtime.control.http_runner.UvicornThreadRunner", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel\nHttpControlChannel(ControlChannel)", + "layer": "C1_SYMBOL_CATALOG", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "qname": "HttpControlChannel", + "kind": "class", + "signature": "HttpControlChannel(ControlChannel)", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "method HttpControlChannel.__init__\n__init__(self, host, port, timeout)", + "layer": "C1_SYMBOL_CATALOG", + "title": "HttpControlChannel.__init__", + "span_start": 13, + "span_end": 17, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "qname": "HttpControlChannel.__init__", + "kind": "method", + "signature": "__init__(self, host, port, timeout)", + "parent_symbol_id": "HttpControlChannel", + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "method HttpControlChannel.start\nstart(self, actions)", + "layer": "C1_SYMBOL_CATALOG", + "title": "HttpControlChannel.start", + "span_start": 19, + "span_end": 22, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0", + "qname": "HttpControlChannel.start", + "kind": "method", + "signature": "start(self, actions)", + "parent_symbol_id": "HttpControlChannel", + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel(ControlChannel):\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._timeout = timeout\n self._runner = UvicornThreadRunner(host, port, timeout)\n self._factory = HttpControlAppFactory()\n self._actions: ControlActionSet | None = None\n\n async def start(self, actions: ControlActionSet) -> None:\n self._actions = actions\n app = self._factory.create(self._health_response, self._action_response)\n await self._runner.start(app)\n\n async def stop(self) -> None:\n await self._runner.stop()\n\n @property\n def port(self) -> int:\n return self._runner.port\n\n async def _health_response(self) -> dict[str, object]:\n if self._actions is None:\n return {\"status\": \"unhealthy\", \"detail\": \"control actions are not configured\"}\n return await asyncio.wait_for(self._actions.health(), timeout=float(self._timeout))\n\n async def _action_response(self, action: str, _client_source: str = \"unknown\") -> JSONResponse:\n if self._actions is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"{action} handler is not configured\"}, status_code=404)\n callbacks = {\n \"start\": self._actions.start,\n \"stop\": self._actions.stop,\n \"status\": self._actions.status,\n }\n callback = callbacks.get(action)\n if callback is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"unsupported action: {action}\"}, status_code=404)\n action_timeout = max(float(self._timeout), 10.0) if action in {\"start\", \"stop\"} else float(self._timeout)\n try:\n detail = await asyncio.wait_for(callback(), timeout=action_timeout)\n except asyncio.TimeoutError:\n return JSONResponse(\n content={\"status\": \"accepted\", \"detail\": f\"{action} operation is still in progress\"},\n status_code=202,\n )\n except Exception as exc:\n return JSONResponse(content={\"status\": \"error\", \"detail\": str(exc)}, status_code=500)\n return JSONResponse(content={\"status\": \"ok\", \"detail\": detail or f\"{action} action accepted\"}, status_code=200)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_channel.py:HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._timeout\n -> HttpControlChannel._action_response", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "c3ef21fcae96c82c00be74b3ab827d4af2085d89cb3fa5521c19a174aad84dbb", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "e64969024ccaeb34d8d91473fad07b3b3d341875846392e7a006406c7ada1954", + "dst_ref": "HttpControlChannel._action_response", + "resolution": "resolved", + "slice_id": "c3ef21fcae96c82c00be74b3ab827d4af2085d89cb3fa5521c19a174aad84dbb", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._timeout", + "HttpControlChannel._action_response" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "e64969024ccaeb34d8d91473fad07b3b3d341875846392e7a006406c7ada1954" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._runner\n -> HttpControlChannel.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 15, + "span_end": 22, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "51d73913df709152258ed1b9a8c8f4eb3c575eccfe6b982aef0b28e0789a29da", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0", + "dst_ref": "HttpControlChannel.start", + "resolution": "resolved", + "slice_id": "51d73913df709152258ed1b9a8c8f4eb3c575eccfe6b982aef0b28e0789a29da", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._runner", + "HttpControlChannel.start" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._timeout\n -> HttpControlChannel._health_response", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 14, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "f858f5c9e575f6c4cdfe3853571b7ee21d1f628a443541d2037c3dc9d0790bef", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "e84bf04e9cd2127df235b7064d05f47e19f19a89c7c82f4c247231d4e8fa426a", + "dst_ref": "HttpControlChannel._health_response", + "resolution": "resolved", + "slice_id": "f858f5c9e575f6c4cdfe3853571b7ee21d1f628a443541d2037c3dc9d0790bef", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._timeout", + "HttpControlChannel._health_response" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "e84bf04e9cd2127df235b7064d05f47e19f19a89c7c82f4c247231d4e8fa426a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._runner\n -> HttpControlChannel.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 15, + "span_end": 25, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "0f827ef81a990258a8a74381c8564a8361afa6712dba3200592659c939adcb9d", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "f29ab212620093d72be20e26c5a399624c7939a6056a728762ed3f84a250bfa3", + "dst_ref": "HttpControlChannel.stop", + "resolution": "resolved", + "slice_id": "0f827ef81a990258a8a74381c8564a8361afa6712dba3200592659c939adcb9d", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._runner", + "HttpControlChannel.stop" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "f29ab212620093d72be20e26c5a399624c7939a6056a728762ed3f84a250bfa3" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "validation": { + "passed": true, + "action": "return", + "reasons": [] + } + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-explain-local-http-channel.md b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-explain-local-http-channel.md new file mode 100644 index 0000000..10a3a23 --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-explain-local-http-channel.md @@ -0,0 +1,34 @@ +# plba-v2-explain-local-http-channel + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: agent_runtime +- mode: full_chain +- passed: True + +## Query +Почему в файле src/app_runtime/control/http_channel.py класс HttpControlChannel устроен так? + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "EXPLAIN_LOCAL", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 13, + "llm_answer": "Класс `HttpControlChannel` предназначен для управления HTTP каналом контроля в приложении.\n\n**Ключевые шаги его реализации:**\n1. Инициализация (`__init__`) – принимает параметры хоста, порта и тайм-аута, создаёт внутренние объекты управления и инициализирует состояние канала.\n2. Запуск (`start`) – запускает сервер с заданными действиями контроля, создавая приложение и вызывая runner для запуска сервера.\n3. Остановка (`stop`) – останавливает запущенный сервер.\n4. Свойство `port` – возвращает порт, используемый сервером.\n5. Метод `_health_response` – генерирует ответ о состоянии здоровья системы (здоров или нет).\n\nОпорные файлы:\n- `src/app_runtime/control/http_channel.py:12-57` (определение класса и методов)\n- `src/app_runtime/control/http_channel.py:13-17` (инициализация)\n- `src/app_runtime/control/http_channel.py:19-22` (запуск)", + "answer_mode": "answered", + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "symbol_candidates": [ + "HttpControlChannel" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C2_DEPENDENCY_GRAPH" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-explain-nonexistent-symbol.json b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-explain-nonexistent-symbol.json new file mode 100644 index 0000000..271b1e1 --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-explain-nonexistent-symbol.json @@ -0,0 +1,4092 @@ +{ + "case_id": "plba-v2-explain-nonexistent-symbol", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "agent_runtime", + "mode": "full_chain", + "query": "Объясни класс RuntimeFactoryManager", + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 33, + "llm_answer": "Класс `RuntimeFactoryManager` не указан напрямую в предоставленном коде. Однако, судя по контексту и взаимосвязям между классами:\n\n**Назначение класса:**\n- Управление фабрикой для создания экземпляров классов, связанных с управлением рабочим состоянием приложения.\n\n**Ключевые шаги:**\n1. Инициализация фабрики.\n2. Создание экземпляра соответствующего класса управления каналом (`ControlChannel`) или другого необходимого класса.\n3. Регистрация созданных каналов в сервисе управления каналами.\n\n**Опорные файлы:**\n- `src/app_runtime/control/base.py`: Объявление абстрактного базового класса `ControlChannel`.\n- `src/app_runtime/control/service.py`: Реализация сервиса управления каналами, который регистрирует созданные каналы.\n- `src/app_runtime/control/http_channel.py`: Определение канала HTTP, используемого для взаимодействия через HTTP-протокол.\n\nОбратите внимание, что прямое определение класса `RuntimeFactoryManager` отсутствует в представленном коде, поэтому информация о его назначении основана на логическом выводе и контексте использования других классов.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "RuntimeFactoryManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": false, + "mismatches": [ + "answer_mode: expected degraded, got answered", + "retrieval: expected empty rag, got 33 rows", + "llm: expected answer to contain 'не найдена'" + ], + "details": { + "query": "Объясни класс RuntimeFactoryManager", + "router_result": { + "schema_version": "1.1", + "intent": "CODE_QA", + "retrieval_profile": "code", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query_plan": { + "raw": "Объясни класс RuntimeFactoryManager", + "normalized": "Объясни класс RuntimeFactoryManager", + "sub_intent": "EXPLAIN", + "negations": [], + "expansions": [ + "RuntimeFactoryManager" + ], + "keyword_hints": [ + "RuntimeFactoryManager" + ], + "path_hints": [], + "doc_scope_hints": [], + "symbol_candidates": [ + "RuntimeFactoryManager" + ], + "symbol_kind_hint": "class", + "anchors": [ + { + "type": "SYMBOL", + "value": "RuntimeFactoryManager", + "source": "user_text", + "subtype": null, + "span": { + "start": 14, + "end": 35 + }, + "confidence": 0.88 + }, + { + "type": "KEY_TERM", + "value": "класс", + "source": "user_text", + "subtype": null, + "span": { + "start": 8, + "end": 13 + }, + "confidence": 0.9 + } + ] + }, + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "top_k": 8 + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 8 + }, + { + "layer_id": "C4_SEMANTIC_ROLES", + "top_k": 8 + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "top_k": 6 + }, + { + "layer_id": "C3_ENTRYPOINTS", + "top_k": 6 + } + ], + "filters": { + "test_policy": "EXCLUDE", + "path_scope": [], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + }, + "symbol_resolution": { + "status": "pending", + "resolved_symbol": null, + "alternatives": [ + "RuntimeFactoryManager" + ], + "confidence": 0.0 + }, + "evidence_policy": { + "require_def": true, + "require_flow": true, + "require_spec": false, + "allow_answer_without_evidence": false + } + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Объясни класс RuntimeFactoryManager", + "sub_intent": "EXPLAIN", + "path_scope": [], + "keyword_hints": [ + "RuntimeFactoryManager" + ], + "symbol_candidates": [ + "RuntimeFactoryManager" + ], + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "top_k": 8 + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 8 + }, + { + "layer_id": "C4_SEMANTIC_ROLES", + "top_k": 8 + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "top_k": 6 + }, + { + "layer_id": "C3_ENTRYPOINTS", + "top_k": 6 + } + ], + "filters": { + "test_policy": "EXCLUDE", + "path_scope": [], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + }, + "query_plan": { + "raw": "Объясни класс RuntimeFactoryManager", + "normalized": "Объясни класс RuntimeFactoryManager", + "sub_intent": "EXPLAIN", + "negations": [], + "expansions": [ + "RuntimeFactoryManager" + ], + "keyword_hints": [ + "RuntimeFactoryManager" + ], + "path_hints": [], + "doc_scope_hints": [], + "symbol_candidates": [ + "RuntimeFactoryManager" + ], + "symbol_kind_hint": "class", + "anchors": [ + { + "type": "SYMBOL", + "value": "RuntimeFactoryManager", + "source": "user_text", + "subtype": null, + "span": { + "start": 14, + "end": 35 + }, + "confidence": 0.88 + }, + { + "type": "KEY_TERM", + "value": "класс", + "source": "user_text", + "subtype": null, + "span": { + "start": 8, + "end": 13 + }, + "confidence": 0.9 + } + ] + } + }, + "retrieval_result": { + "target_symbol_candidates": [ + "ControlChannel", + "ControlChannel.stop", + "ControlActionSet", + "ControlPlaneService", + "ControlChannel.start" + ], + "resolved_symbol": null, + "symbol_resolution_status": "ambiguous", + "file_candidates": [ + "src/app_runtime/control/base.py", + "src/app_runtime/control/__init__.py", + "src/app_runtime/control/http_channel.py", + "src/app_runtime/control/service.py", + "src/app_runtime/control/http_runner.py", + "src/app_runtime/control/http_app.py", + "src/plba/control.py", + "src/app_runtime/workflow/persistence/workflow_persistence.py", + "src/app_runtime/queue/in_memory.py" + ], + "code_chunks": [ + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/base.py", + "title": "ControlChannel", + "content": "class ControlChannel\nControlChannel(ABC)", + "start_line": 21, + "end_line": 28, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "qname": "ControlChannel", + "kind": "class", + "signature": "ControlChannel(ABC)", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/base.py", + "title": "ControlChannel.stop", + "content": "method ControlChannel.stop\nstop(self)\nStop the control channel and release resources.", + "start_line": 27, + "end_line": 28, + "metadata": { + "symbol_id": "54b5adf9866c526836221dc721b474ba23fbec83e1b1d3b8bc4da67ae3c1541d", + "qname": "ControlChannel.stop", + "kind": "method", + "signature": "stop(self)", + "parent_symbol_id": "ControlChannel", + "package_or_module": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/base.py", + "title": "ControlActionSet", + "content": "class ControlActionSet\nControlActionSet", + "start_line": 14, + "end_line": 18, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "qname": "ControlActionSet", + "kind": "class", + "signature": "ControlActionSet", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/__init__.py", + "title": "ControlChannel", + "content": "const ControlChannel\nControlChannel = app_runtime.control.base.ControlChannel", + "start_line": 1, + "end_line": 1, + "metadata": { + "symbol_id": "268420f7aa4ed74082b9276cae0cded4f00bac090ffd58fa020a65be0fe19c27", + "qname": "ControlChannel", + "kind": "const", + "signature": "ControlChannel = app_runtime.control.base.ControlChannel", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/__init__.py", + "title": "ControlPlaneService", + "content": "const ControlPlaneService\nControlPlaneService = app_runtime.control.service.ControlPlaneService", + "start_line": 3, + "end_line": 3, + "metadata": { + "symbol_id": "217e8f044d1c01644bf7b81e5046af9e84469210c692a2fb0c476a19bb069ae1", + "qname": "ControlPlaneService", + "kind": "const", + "signature": "ControlPlaneService = app_runtime.control.service.ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/base.py", + "title": "ControlChannel.start", + "content": "method ControlChannel.start\nstart(self, actions)\nStart the control channel and bind handlers.", + "start_line": 23, + "end_line": 24, + "metadata": { + "symbol_id": "e01e0d50d0f48d0c84c119c989b7a7c57ceea263811ce2605c684ae24d1a03b1", + "qname": "ControlChannel.start", + "kind": "method", + "signature": "start(self, actions)", + "parent_symbol_id": "ControlChannel", + "package_or_module": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/__init__.py", + "title": "ControlActionSet", + "content": "const ControlActionSet\nControlActionSet = app_runtime.control.base.ControlActionSet", + "start_line": 1, + "end_line": 1, + "metadata": { + "symbol_id": "767e4ac0d4224aeccb0783a38359d3c03899a876736eb83d99887c16ea07cc6c", + "qname": "ControlActionSet", + "kind": "const", + "signature": "ControlActionSet = app_runtime.control.base.ControlActionSet", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/http_channel.py", + "title": "ControlActionSet", + "content": "const ControlActionSet\nControlActionSet = app_runtime.control.base.ControlActionSet", + "start_line": 7, + "end_line": 7, + "metadata": { + "symbol_id": "2132a5717c57061e3488a1bf4d43650a60ea903a42278f4d494c014bc80d2df9", + "qname": "ControlActionSet", + "kind": "const", + "signature": "ControlActionSet = app_runtime.control.base.ControlActionSet", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/service.py", + "title": "src/app_runtime/control/service.py:ControlPlaneService", + "content": "class ControlPlaneService:\n def __init__(self) -> None:\n self._channels: list[ControlChannel] = []\n\n def register_channel(self, channel: ControlChannel) -> None:\n self._channels.append(channel)\n\n def start(self, runtime: RuntimeManager) -> None:\n if not self._channels:\n return\n asyncio.run(self._start_async(runtime))\n\n def stop(self) -> None:\n if not self._channels:\n return\n asyncio.run(self._stop_async())\n\n def snapshot(self, runtime: RuntimeManager) -> dict[str, object]:\n health = runtime.current_health()\n return {\n \"runtime\": {\"state\": runtime._state.value},\n \"modules\": list(runtime.registry.modules),\n \"services\": runtime.services.snapshot(),\n \"workers\": runtime.workers.snapshot(),\n \"health\": runtime.health.snapshot(runtime.workers.healths()) | {\"status\": health[\"status\"]},\n \"config\": runtime.configuration.get(),\n }\n\n async def _start_async(self, runtime: RuntimeManager) -> None:\n actions = ControlActionSet(\n health=runtime.health_status,\n start=runtime.start_runtime,\n stop=runtime.stop_runtime,\n status=runtime.runtime_status,\n )\n for channel in self._channels:\n await channel.start(actions)\n\n async def _stop_async(self) -> None:\n for channel in reversed(self._channels):\n await channel.stop()", + "start_line": 12, + "end_line": 52, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/http_runner.py", + "title": "src/app_runtime/control/http_runner.py:UvicornThreadRunner", + "content": "class UvicornThreadRunner:\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._host = host\n self._port = port\n self._timeout = timeout\n self._server: Server | None = None\n self._thread: Thread | None = None\n self._error: BaseException | None = None\n\n async def start(self, app: FastAPI) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._error = None\n config = Config(app=app, host=self._host, port=self._port, log_level=\"warning\")\n self._server = Server(config)\n self._thread = Thread(target=self._serve, name=\"plba-http-control\", daemon=True)\n self._thread.start()\n await self._wait_until_started()\n\n async def stop(self) -> None:\n if self._server is None or self._thread is None:\n return\n self._server.should_exit = True\n await asyncio.to_thread(self._thread.join, self._timeout)\n self._server = None\n self._thread = None\n\n @property\n def port(self) -> int:\n if self._server is None or not getattr(self._server, \"servers\", None):\n return self._port\n socket = self._server.servers[0].sockets[0]\n return int(socket.getsockname()[1])\n\n async def _wait_until_started(self) -> None:\n if self._server is None:\n raise RuntimeError(\"Server is not initialized\")\n deadline = asyncio.get_running_loop().time() + max(float(self._timeout), 1.0)\n while not self._server.started:\n if self._error is not None:\n raise RuntimeError(\"HTTP control server failed to start\") from self._error\n if asyncio.get_running_loop().time() >= deadline:\n raise TimeoutError(\"HTTP control server startup timed out\")\n await asyncio.sleep(0.05)\n\n def _serve(self) -> None:\n if self._server is None:\n return\n try:\n asyncio.run(self._server.serve())\n except BaseException as exc: # noqa: BLE001\n self._error = exc", + "start_line": 10, + "end_line": 61, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_runner", + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/base.py", + "title": "src/app_runtime/control/base.py:ControlChannel", + "content": "class ControlChannel(ABC):\n @abstractmethod\n async def start(self, actions: ControlActionSet) -> None:\n \"\"\"Start the control channel and bind handlers.\"\"\"\n\n @abstractmethod\n async def stop(self) -> None:\n \"\"\"Stop the control channel and release resources.\"\"\"", + "start_line": 21, + "end_line": 28, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/__init__.py", + "title": "src/app_runtime/control/__init__.py:1-5", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\"ControlActionSet\", \"ControlChannel\", \"ControlPlaneService\", \"HttpControlChannel\"]", + "start_line": 1, + "end_line": 5, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/http_app.py", + "title": "src/app_runtime/control/http_app.py:HttpControlAppFactory", + "content": "class HttpControlAppFactory:\n def create(\n self,\n health_provider: Callable[[], Awaitable[HealthPayload]],\n action_provider: Callable[[str, str], Awaitable[JSONResponse]],\n ) -> FastAPI:\n app = FastAPI(title=\"PLBA Control API\")\n\n @app.middleware(\"http\")\n async def log_api_call(request: Request, call_next): # type: ignore[no-untyped-def]\n started = time.monotonic()\n response = await call_next(request)\n response.headers[\"X-Response-Time-Ms\"] = str(int((time.monotonic() - started) * 1000))\n return response\n\n @app.get(\"/health\")\n async def health() -> JSONResponse:\n payload = await health_provider()\n status_code = 200 if payload.get(\"status\") == \"ok\" else 503\n return JSONResponse(content=payload, status_code=status_code)\n\n @app.get(\"/actions/{action}\")\n @app.post(\"/actions/{action}\")\n async def action(action: str, request: Request) -> JSONResponse:\n client_source = self._client_source(request)\n if action in {\"start\", \"stop\"}:\n LOGGER.warning(\"Control action requested: /actions/%s client=%s\", action, client_source)\n return await action_provider(action, client_source)\n\n return app\n\n def _client_source(self, request: Request) -> str:\n explicit_header = request.headers.get(\"X-Client-Source\", \"\").strip()\n if explicit_header:\n return explicit_header\n user_agent = request.headers.get(\"User-Agent\", \"\").strip()\n if user_agent:\n return f\"user-agent:{user_agent}\"\n return \"unknown\"", + "start_line": 15, + "end_line": 53, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/http_channel.py", + "title": "src/app_runtime/control/http_channel.py:HttpControlChannel", + "content": "class HttpControlChannel(ControlChannel):\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._timeout = timeout\n self._runner = UvicornThreadRunner(host, port, timeout)\n self._factory = HttpControlAppFactory()\n self._actions: ControlActionSet | None = None\n\n async def start(self, actions: ControlActionSet) -> None:\n self._actions = actions\n app = self._factory.create(self._health_response, self._action_response)\n await self._runner.start(app)\n\n async def stop(self) -> None:\n await self._runner.stop()\n\n @property\n def port(self) -> int:\n return self._runner.port\n\n async def _health_response(self) -> dict[str, object]:\n if self._actions is None:\n return {\"status\": \"unhealthy\", \"detail\": \"control actions are not configured\"}\n return await asyncio.wait_for(self._actions.health(), timeout=float(self._timeout))\n\n async def _action_response(self, action: str, _client_source: str = \"unknown\") -> JSONResponse:\n if self._actions is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"{action} handler is not configured\"}, status_code=404)\n callbacks = {\n \"start\": self._actions.start,\n \"stop\": self._actions.stop,\n \"status\": self._actions.status,\n }\n callback = callbacks.get(action)\n if callback is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"unsupported action: {action}\"}, status_code=404)\n action_timeout = max(float(self._timeout), 10.0) if action in {\"start\", \"stop\"} else float(self._timeout)\n try:\n detail = await asyncio.wait_for(callback(), timeout=action_timeout)\n except asyncio.TimeoutError:\n return JSONResponse(\n content={\"status\": \"accepted\", \"detail\": f\"{action} operation is still in progress\"},\n status_code=202,\n )\n except Exception as exc:\n return JSONResponse(content={\"status\": \"error\", \"detail\": str(exc)}, status_code=500)\n return JSONResponse(content={\"status\": \"ok\", \"detail\": detail or f\"{action} action accepted\"}, status_code=200)", + "start_line": 12, + "end_line": 57, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/base.py", + "title": "src/app_runtime/control/base.py:ControlActionSet", + "content": "class ControlActionSet:\n health: HealthHandler\n start: ActionHandler\n stop: ActionHandler\n status: ActionHandler", + "start_line": 14, + "end_line": 18, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/plba/control.py", + "title": "src/plba/control.py:1-10", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\n \"ControlActionSet\",\n \"ControlChannel\",\n \"ControlPlaneService\",\n \"HttpControlChannel\",\n]", + "start_line": 1, + "end_line": 10, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.control", + "is_test": false, + "blob_sha": "31bd5c4481bfa7fbca8fae56d4860a67e3953ca74474ac8439e1f39b685d7bc8", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/base.py", + "title": "ControlActionSet", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "start_line": 14, + "end_line": 18, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/base.py", + "title": "ControlChannel", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "start_line": 21, + "end_line": 28, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "start_line": 12, + "end_line": 52, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/http_runner.py", + "title": "UvicornThreadRunner", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "start_line": 10, + "end_line": 61, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/http_channel.py", + "title": "HttpControlChannel", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "start_line": 12, + "end_line": 57, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/http_app.py", + "title": "HttpControlAppFactory", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "start_line": 15, + "end_line": 53, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "title": "WorkflowPersistence", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "start_line": 8, + "end_line": 54, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/queue/in_memory.py", + "title": "InMemoryTaskQueue", + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)", + "start_line": 9, + "end_line": 38, + "metadata": { + "symbol_id": "2da04cb94544a3bcbf0943a95ad4bdd8710bcafaa32a02fd0e4de2178dcf3533", + "symbol_name": "InMemoryTaskQueue", + "qname": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 9, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "58f0cc001ccda0eee4c6bc32ed83bd05eafd6b6644f1e8b4aa9eed3103db73dc", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "start_line": 14, + "end_line": 25, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "start_line": 14, + "end_line": 51, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "start_line": 14, + "end_line": 17, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "start_line": 14, + "end_line": 20, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "start_line": 14, + "end_line": 47, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.register_channel:reads_attr", + "content": "ControlPlaneService.register_channel reads_attr self._channels.append", + "start_line": 17, + "end_line": 17, + "metadata": { + "edge_id": "1ee5925deffdc38ba15b88bf7c89e5fcd1a78f493fe30f2deb827d714a1b18e8", + "edge_type": "reads_attr", + "src_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "src_qname": "ControlPlaneService.register_channel", + "dst_symbol_id": null, + "dst_ref": "self._channels.append", + "resolution": "partial", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C3_ENTRYPOINTS", + "path": "src/app_runtime/control/http_app.py", + "title": "app.post", + "content": "fastapi http app.post", + "start_line": 38, + "end_line": 42, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C3_ENTRYPOINTS", + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "content": "fastapi http app.get", + "start_line": 31, + "end_line": 34, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C3_ENTRYPOINTS", + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "content": "fastapi http app.get", + "start_line": 38, + "end_line": 42, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "relations": [ + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop" + }, + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async" + }, + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel" + }, + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start" + }, + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async" + }, + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "1ee5925deffdc38ba15b88bf7c89e5fcd1a78f493fe30f2deb827d714a1b18e8", + "edge_type": "reads_attr", + "src_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "src_qname": "ControlPlaneService.register_channel", + "dst_symbol_id": null, + "dst_ref": "self._channels.append", + "resolution": "partial", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.register_channel reads_attr self._channels.append" + } + ], + "entrypoints": [ + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.post", + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "test_candidates": [], + "layer_outcomes": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C4_SEMANTIC_ROLES", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 6, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C3_ENTRYPOINTS", + "hit_count": 3, + "empty": false, + "fallback_used": false + } + ], + "missing_layers": [], + "raw_rows": [ + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlChannel\nControlChannel(ABC)", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "qname": "ControlChannel", + "kind": "class", + "signature": "ControlChannel(ABC)", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "method ControlChannel.stop\nstop(self)\nStop the control channel and release resources.", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlChannel.stop", + "span_start": 27, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "54b5adf9866c526836221dc721b474ba23fbec83e1b1d3b8bc4da67ae3c1541d", + "qname": "ControlChannel.stop", + "kind": "method", + "signature": "stop(self)", + "parent_symbol_id": "ControlChannel", + "package_or_module": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlActionSet\nControlActionSet", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "qname": "ControlActionSet", + "kind": "class", + "signature": "ControlActionSet", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "const ControlChannel\nControlChannel = app_runtime.control.base.ControlChannel", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlChannel", + "span_start": 1, + "span_end": 1, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "268420f7aa4ed74082b9276cae0cded4f00bac090ffd58fa020a65be0fe19c27", + "qname": "ControlChannel", + "kind": "const", + "signature": "ControlChannel = app_runtime.control.base.ControlChannel", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "const ControlPlaneService\nControlPlaneService = app_runtime.control.service.ControlPlaneService", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlPlaneService", + "span_start": 3, + "span_end": 3, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "217e8f044d1c01644bf7b81e5046af9e84469210c692a2fb0c476a19bb069ae1", + "qname": "ControlPlaneService", + "kind": "const", + "signature": "ControlPlaneService = app_runtime.control.service.ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "method ControlChannel.start\nstart(self, actions)\nStart the control channel and bind handlers.", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlChannel.start", + "span_start": 23, + "span_end": 24, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "e01e0d50d0f48d0c84c119c989b7a7c57ceea263811ce2605c684ae24d1a03b1", + "qname": "ControlChannel.start", + "kind": "method", + "signature": "start(self, actions)", + "parent_symbol_id": "ControlChannel", + "package_or_module": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "const ControlActionSet\nControlActionSet = app_runtime.control.base.ControlActionSet", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlActionSet", + "span_start": 1, + "span_end": 1, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "767e4ac0d4224aeccb0783a38359d3c03899a876736eb83d99887c16ea07cc6c", + "qname": "ControlActionSet", + "kind": "const", + "signature": "ControlActionSet = app_runtime.control.base.ControlActionSet", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "const ControlActionSet\nControlActionSet = app_runtime.control.base.ControlActionSet", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlActionSet", + "span_start": 7, + "span_end": 7, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "2132a5717c57061e3488a1bf4d43650a60ea903a42278f4d494c014bc80d2df9", + "qname": "ControlActionSet", + "kind": "const", + "signature": "ControlActionSet = app_runtime.control.base.ControlActionSet", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "class ControlPlaneService:\n def __init__(self) -> None:\n self._channels: list[ControlChannel] = []\n\n def register_channel(self, channel: ControlChannel) -> None:\n self._channels.append(channel)\n\n def start(self, runtime: RuntimeManager) -> None:\n if not self._channels:\n return\n asyncio.run(self._start_async(runtime))\n\n def stop(self) -> None:\n if not self._channels:\n return\n asyncio.run(self._stop_async())\n\n def snapshot(self, runtime: RuntimeManager) -> dict[str, object]:\n health = runtime.current_health()\n return {\n \"runtime\": {\"state\": runtime._state.value},\n \"modules\": list(runtime.registry.modules),\n \"services\": runtime.services.snapshot(),\n \"workers\": runtime.workers.snapshot(),\n \"health\": runtime.health.snapshot(runtime.workers.healths()) | {\"status\": health[\"status\"]},\n \"config\": runtime.configuration.get(),\n }\n\n async def _start_async(self, runtime: RuntimeManager) -> None:\n actions = ControlActionSet(\n health=runtime.health_status,\n start=runtime.start_runtime,\n stop=runtime.stop_runtime,\n status=runtime.runtime_status,\n )\n for channel in self._channels:\n await channel.start(actions)\n\n async def _stop_async(self) -> None:\n for channel in reversed(self._channels):\n await channel.stop()", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/service.py:ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "class UvicornThreadRunner:\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._host = host\n self._port = port\n self._timeout = timeout\n self._server: Server | None = None\n self._thread: Thread | None = None\n self._error: BaseException | None = None\n\n async def start(self, app: FastAPI) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._error = None\n config = Config(app=app, host=self._host, port=self._port, log_level=\"warning\")\n self._server = Server(config)\n self._thread = Thread(target=self._serve, name=\"plba-http-control\", daemon=True)\n self._thread.start()\n await self._wait_until_started()\n\n async def stop(self) -> None:\n if self._server is None or self._thread is None:\n return\n self._server.should_exit = True\n await asyncio.to_thread(self._thread.join, self._timeout)\n self._server = None\n self._thread = None\n\n @property\n def port(self) -> int:\n if self._server is None or not getattr(self._server, \"servers\", None):\n return self._port\n socket = self._server.servers[0].sockets[0]\n return int(socket.getsockname()[1])\n\n async def _wait_until_started(self) -> None:\n if self._server is None:\n raise RuntimeError(\"Server is not initialized\")\n deadline = asyncio.get_running_loop().time() + max(float(self._timeout), 1.0)\n while not self._server.started:\n if self._error is not None:\n raise RuntimeError(\"HTTP control server failed to start\") from self._error\n if asyncio.get_running_loop().time() >= deadline:\n raise TimeoutError(\"HTTP control server startup timed out\")\n await asyncio.sleep(0.05)\n\n def _serve(self) -> None:\n if self._server is None:\n return\n try:\n asyncio.run(self._server.serve())\n except BaseException as exc: # noqa: BLE001\n self._error = exc", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_runner.py:UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_runner", + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlChannel(ABC):\n @abstractmethod\n async def start(self, actions: ControlActionSet) -> None:\n \"\"\"Start the control channel and bind handlers.\"\"\"\n\n @abstractmethod\n async def stop(self) -> None:\n \"\"\"Stop the control channel and release resources.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\"ControlActionSet\", \"ControlChannel\", \"ControlPlaneService\", \"HttpControlChannel\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/__init__.py:1-5", + "span_start": 1, + "span_end": 5, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "class HttpControlAppFactory:\n def create(\n self,\n health_provider: Callable[[], Awaitable[HealthPayload]],\n action_provider: Callable[[str, str], Awaitable[JSONResponse]],\n ) -> FastAPI:\n app = FastAPI(title=\"PLBA Control API\")\n\n @app.middleware(\"http\")\n async def log_api_call(request: Request, call_next): # type: ignore[no-untyped-def]\n started = time.monotonic()\n response = await call_next(request)\n response.headers[\"X-Response-Time-Ms\"] = str(int((time.monotonic() - started) * 1000))\n return response\n\n @app.get(\"/health\")\n async def health() -> JSONResponse:\n payload = await health_provider()\n status_code = 200 if payload.get(\"status\") == \"ok\" else 503\n return JSONResponse(content=payload, status_code=status_code)\n\n @app.get(\"/actions/{action}\")\n @app.post(\"/actions/{action}\")\n async def action(action: str, request: Request) -> JSONResponse:\n client_source = self._client_source(request)\n if action in {\"start\", \"stop\"}:\n LOGGER.warning(\"Control action requested: /actions/%s client=%s\", action, client_source)\n return await action_provider(action, client_source)\n\n return app\n\n def _client_source(self, request: Request) -> str:\n explicit_header = request.headers.get(\"X-Client-Source\", \"\").strip()\n if explicit_header:\n return explicit_header\n user_agent = request.headers.get(\"User-Agent\", \"\").strip()\n if user_agent:\n return f\"user-agent:{user_agent}\"\n return \"unknown\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_app.py:HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel(ControlChannel):\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._timeout = timeout\n self._runner = UvicornThreadRunner(host, port, timeout)\n self._factory = HttpControlAppFactory()\n self._actions: ControlActionSet | None = None\n\n async def start(self, actions: ControlActionSet) -> None:\n self._actions = actions\n app = self._factory.create(self._health_response, self._action_response)\n await self._runner.start(app)\n\n async def stop(self) -> None:\n await self._runner.stop()\n\n @property\n def port(self) -> int:\n return self._runner.port\n\n async def _health_response(self) -> dict[str, object]:\n if self._actions is None:\n return {\"status\": \"unhealthy\", \"detail\": \"control actions are not configured\"}\n return await asyncio.wait_for(self._actions.health(), timeout=float(self._timeout))\n\n async def _action_response(self, action: str, _client_source: str = \"unknown\") -> JSONResponse:\n if self._actions is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"{action} handler is not configured\"}, status_code=404)\n callbacks = {\n \"start\": self._actions.start,\n \"stop\": self._actions.stop,\n \"status\": self._actions.status,\n }\n callback = callbacks.get(action)\n if callback is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"unsupported action: {action}\"}, status_code=404)\n action_timeout = max(float(self._timeout), 10.0) if action in {\"start\", \"stop\"} else float(self._timeout)\n try:\n detail = await asyncio.wait_for(callback(), timeout=action_timeout)\n except asyncio.TimeoutError:\n return JSONResponse(\n content={\"status\": \"accepted\", \"detail\": f\"{action} operation is still in progress\"},\n status_code=202,\n )\n except Exception as exc:\n return JSONResponse(content={\"status\": \"error\", \"detail\": str(exc)}, status_code=500)\n return JSONResponse(content={\"status\": \"ok\", \"detail\": detail or f\"{action} action accepted\"}, status_code=200)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_channel.py:HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlActionSet:\n health: HealthHandler\n start: ActionHandler\n stop: ActionHandler\n status: ActionHandler", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/control.py", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\n \"ControlActionSet\",\n \"ControlChannel\",\n \"ControlPlaneService\",\n \"HttpControlChannel\",\n]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/control.py:1-10", + "span_start": 1, + "span_end": 10, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.control", + "is_test": false, + "blob_sha": "31bd5c4481bfa7fbca8fae56d4860a67e3953ca74474ac8439e1f39b685d7bc8", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/queue/in_memory.py", + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)", + "layer": "C4_SEMANTIC_ROLES", + "title": "InMemoryTaskQueue", + "span_start": 9, + "span_end": 38, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 22, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "2da04cb94544a3bcbf0943a95ad4bdd8710bcafaa32a02fd0e4de2178dcf3533", + "symbol_name": "InMemoryTaskQueue", + "qname": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 9, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "58f0cc001ccda0eee4c6bc32ed83bd05eafd6b6644f1e8b4aa9eed3103db73dc", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.register_channel reads_attr self._channels.append", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.register_channel:reads_attr", + "span_start": 17, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "1ee5925deffdc38ba15b88bf7c89e5fcd1a78f493fe30f2deb827d714a1b18e8", + "edge_type": "reads_attr", + "src_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "src_qname": "ControlPlaneService.register_channel", + "dst_symbol_id": null, + "dst_ref": "self._channels.append", + "resolution": "partial", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": null, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": null, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": null, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "retrieval_report": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "vector", + "C0_SOURCE_CHUNKS": "vector", + "C4_SEMANTIC_ROLES": "vector", + "C2_DEPENDENCY_GRAPH": "vector", + "C3_ENTRYPOINTS": "vector" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [] + } + }, + "fallback": { + "used": false, + "reason": null + }, + "retrieval_by_layer_ms": { + "C1_SYMBOL_CATALOG": 52, + "C0_SOURCE_CHUNKS": 22, + "C4_SEMANTIC_ROLES": 18, + "C2_DEPENDENCY_GRAPH": 59, + "C3_ENTRYPOINTS": 13 + } + } + }, + "diagnostics": { + "intent_correct": null, + "target_found": true, + "layers_used": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_sufficient": true, + "answer_mode": "normal", + "router_result": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "EXPLAIN", + "path_scope": [], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_resolution_status": "pending" + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Объясни класс RuntimeFactoryManager", + "sub_intent": "EXPLAIN", + "path_scope": [], + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C4_SEMANTIC_ROLES", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 6, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C3_ENTRYPOINTS", + "hit_count": 3, + "empty": false, + "fallback_used": false + } + ], + "empty_layers": [], + "evidence_gate_decision": { + "sufficient": true, + "failure_reasons": [], + "evidence_count": 33 + }, + "failure_reasons": [], + "timings_ms": {} + }, + "rag_rows": [ + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlChannel\nControlChannel(ABC)", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "qname": "ControlChannel", + "kind": "class", + "signature": "ControlChannel(ABC)", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "method ControlChannel.stop\nstop(self)\nStop the control channel and release resources.", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlChannel.stop", + "span_start": 27, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "54b5adf9866c526836221dc721b474ba23fbec83e1b1d3b8bc4da67ae3c1541d", + "qname": "ControlChannel.stop", + "kind": "method", + "signature": "stop(self)", + "parent_symbol_id": "ControlChannel", + "package_or_module": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlActionSet\nControlActionSet", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "qname": "ControlActionSet", + "kind": "class", + "signature": "ControlActionSet", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "const ControlChannel\nControlChannel = app_runtime.control.base.ControlChannel", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlChannel", + "span_start": 1, + "span_end": 1, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "268420f7aa4ed74082b9276cae0cded4f00bac090ffd58fa020a65be0fe19c27", + "qname": "ControlChannel", + "kind": "const", + "signature": "ControlChannel = app_runtime.control.base.ControlChannel", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "const ControlPlaneService\nControlPlaneService = app_runtime.control.service.ControlPlaneService", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlPlaneService", + "span_start": 3, + "span_end": 3, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "217e8f044d1c01644bf7b81e5046af9e84469210c692a2fb0c476a19bb069ae1", + "qname": "ControlPlaneService", + "kind": "const", + "signature": "ControlPlaneService = app_runtime.control.service.ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "method ControlChannel.start\nstart(self, actions)\nStart the control channel and bind handlers.", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlChannel.start", + "span_start": 23, + "span_end": 24, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "e01e0d50d0f48d0c84c119c989b7a7c57ceea263811ce2605c684ae24d1a03b1", + "qname": "ControlChannel.start", + "kind": "method", + "signature": "start(self, actions)", + "parent_symbol_id": "ControlChannel", + "package_or_module": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "const ControlActionSet\nControlActionSet = app_runtime.control.base.ControlActionSet", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlActionSet", + "span_start": 1, + "span_end": 1, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "767e4ac0d4224aeccb0783a38359d3c03899a876736eb83d99887c16ea07cc6c", + "qname": "ControlActionSet", + "kind": "const", + "signature": "ControlActionSet = app_runtime.control.base.ControlActionSet", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "const ControlActionSet\nControlActionSet = app_runtime.control.base.ControlActionSet", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlActionSet", + "span_start": 7, + "span_end": 7, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "2132a5717c57061e3488a1bf4d43650a60ea903a42278f4d494c014bc80d2df9", + "qname": "ControlActionSet", + "kind": "const", + "signature": "ControlActionSet = app_runtime.control.base.ControlActionSet", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "class ControlPlaneService:\n def __init__(self) -> None:\n self._channels: list[ControlChannel] = []\n\n def register_channel(self, channel: ControlChannel) -> None:\n self._channels.append(channel)\n\n def start(self, runtime: RuntimeManager) -> None:\n if not self._channels:\n return\n asyncio.run(self._start_async(runtime))\n\n def stop(self) -> None:\n if not self._channels:\n return\n asyncio.run(self._stop_async())\n\n def snapshot(self, runtime: RuntimeManager) -> dict[str, object]:\n health = runtime.current_health()\n return {\n \"runtime\": {\"state\": runtime._state.value},\n \"modules\": list(runtime.registry.modules),\n \"services\": runtime.services.snapshot(),\n \"workers\": runtime.workers.snapshot(),\n \"health\": runtime.health.snapshot(runtime.workers.healths()) | {\"status\": health[\"status\"]},\n \"config\": runtime.configuration.get(),\n }\n\n async def _start_async(self, runtime: RuntimeManager) -> None:\n actions = ControlActionSet(\n health=runtime.health_status,\n start=runtime.start_runtime,\n stop=runtime.stop_runtime,\n status=runtime.runtime_status,\n )\n for channel in self._channels:\n await channel.start(actions)\n\n async def _stop_async(self) -> None:\n for channel in reversed(self._channels):\n await channel.stop()", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/service.py:ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "class UvicornThreadRunner:\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._host = host\n self._port = port\n self._timeout = timeout\n self._server: Server | None = None\n self._thread: Thread | None = None\n self._error: BaseException | None = None\n\n async def start(self, app: FastAPI) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._error = None\n config = Config(app=app, host=self._host, port=self._port, log_level=\"warning\")\n self._server = Server(config)\n self._thread = Thread(target=self._serve, name=\"plba-http-control\", daemon=True)\n self._thread.start()\n await self._wait_until_started()\n\n async def stop(self) -> None:\n if self._server is None or self._thread is None:\n return\n self._server.should_exit = True\n await asyncio.to_thread(self._thread.join, self._timeout)\n self._server = None\n self._thread = None\n\n @property\n def port(self) -> int:\n if self._server is None or not getattr(self._server, \"servers\", None):\n return self._port\n socket = self._server.servers[0].sockets[0]\n return int(socket.getsockname()[1])\n\n async def _wait_until_started(self) -> None:\n if self._server is None:\n raise RuntimeError(\"Server is not initialized\")\n deadline = asyncio.get_running_loop().time() + max(float(self._timeout), 1.0)\n while not self._server.started:\n if self._error is not None:\n raise RuntimeError(\"HTTP control server failed to start\") from self._error\n if asyncio.get_running_loop().time() >= deadline:\n raise TimeoutError(\"HTTP control server startup timed out\")\n await asyncio.sleep(0.05)\n\n def _serve(self) -> None:\n if self._server is None:\n return\n try:\n asyncio.run(self._server.serve())\n except BaseException as exc: # noqa: BLE001\n self._error = exc", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_runner.py:UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_runner", + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlChannel(ABC):\n @abstractmethod\n async def start(self, actions: ControlActionSet) -> None:\n \"\"\"Start the control channel and bind handlers.\"\"\"\n\n @abstractmethod\n async def stop(self) -> None:\n \"\"\"Stop the control channel and release resources.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\"ControlActionSet\", \"ControlChannel\", \"ControlPlaneService\", \"HttpControlChannel\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/__init__.py:1-5", + "span_start": 1, + "span_end": 5, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "class HttpControlAppFactory:\n def create(\n self,\n health_provider: Callable[[], Awaitable[HealthPayload]],\n action_provider: Callable[[str, str], Awaitable[JSONResponse]],\n ) -> FastAPI:\n app = FastAPI(title=\"PLBA Control API\")\n\n @app.middleware(\"http\")\n async def log_api_call(request: Request, call_next): # type: ignore[no-untyped-def]\n started = time.monotonic()\n response = await call_next(request)\n response.headers[\"X-Response-Time-Ms\"] = str(int((time.monotonic() - started) * 1000))\n return response\n\n @app.get(\"/health\")\n async def health() -> JSONResponse:\n payload = await health_provider()\n status_code = 200 if payload.get(\"status\") == \"ok\" else 503\n return JSONResponse(content=payload, status_code=status_code)\n\n @app.get(\"/actions/{action}\")\n @app.post(\"/actions/{action}\")\n async def action(action: str, request: Request) -> JSONResponse:\n client_source = self._client_source(request)\n if action in {\"start\", \"stop\"}:\n LOGGER.warning(\"Control action requested: /actions/%s client=%s\", action, client_source)\n return await action_provider(action, client_source)\n\n return app\n\n def _client_source(self, request: Request) -> str:\n explicit_header = request.headers.get(\"X-Client-Source\", \"\").strip()\n if explicit_header:\n return explicit_header\n user_agent = request.headers.get(\"User-Agent\", \"\").strip()\n if user_agent:\n return f\"user-agent:{user_agent}\"\n return \"unknown\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_app.py:HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel(ControlChannel):\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._timeout = timeout\n self._runner = UvicornThreadRunner(host, port, timeout)\n self._factory = HttpControlAppFactory()\n self._actions: ControlActionSet | None = None\n\n async def start(self, actions: ControlActionSet) -> None:\n self._actions = actions\n app = self._factory.create(self._health_response, self._action_response)\n await self._runner.start(app)\n\n async def stop(self) -> None:\n await self._runner.stop()\n\n @property\n def port(self) -> int:\n return self._runner.port\n\n async def _health_response(self) -> dict[str, object]:\n if self._actions is None:\n return {\"status\": \"unhealthy\", \"detail\": \"control actions are not configured\"}\n return await asyncio.wait_for(self._actions.health(), timeout=float(self._timeout))\n\n async def _action_response(self, action: str, _client_source: str = \"unknown\") -> JSONResponse:\n if self._actions is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"{action} handler is not configured\"}, status_code=404)\n callbacks = {\n \"start\": self._actions.start,\n \"stop\": self._actions.stop,\n \"status\": self._actions.status,\n }\n callback = callbacks.get(action)\n if callback is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"unsupported action: {action}\"}, status_code=404)\n action_timeout = max(float(self._timeout), 10.0) if action in {\"start\", \"stop\"} else float(self._timeout)\n try:\n detail = await asyncio.wait_for(callback(), timeout=action_timeout)\n except asyncio.TimeoutError:\n return JSONResponse(\n content={\"status\": \"accepted\", \"detail\": f\"{action} operation is still in progress\"},\n status_code=202,\n )\n except Exception as exc:\n return JSONResponse(content={\"status\": \"error\", \"detail\": str(exc)}, status_code=500)\n return JSONResponse(content={\"status\": \"ok\", \"detail\": detail or f\"{action} action accepted\"}, status_code=200)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_channel.py:HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlActionSet:\n health: HealthHandler\n start: ActionHandler\n stop: ActionHandler\n status: ActionHandler", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/control.py", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\n \"ControlActionSet\",\n \"ControlChannel\",\n \"ControlPlaneService\",\n \"HttpControlChannel\",\n]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/control.py:1-10", + "span_start": 1, + "span_end": 10, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.control", + "is_test": false, + "blob_sha": "31bd5c4481bfa7fbca8fae56d4860a67e3953ca74474ac8439e1f39b685d7bc8", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/queue/in_memory.py", + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)", + "layer": "C4_SEMANTIC_ROLES", + "title": "InMemoryTaskQueue", + "span_start": 9, + "span_end": 38, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 22, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "2da04cb94544a3bcbf0943a95ad4bdd8710bcafaa32a02fd0e4de2178dcf3533", + "symbol_name": "InMemoryTaskQueue", + "qname": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 9, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "58f0cc001ccda0eee4c6bc32ed83bd05eafd6b6644f1e8b4aa9eed3103db73dc", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.register_channel reads_attr self._channels.append", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.register_channel:reads_attr", + "span_start": 17, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "1ee5925deffdc38ba15b88bf7c89e5fcd1a78f493fe30f2deb827d714a1b18e8", + "edge_type": "reads_attr", + "src_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "src_qname": "ControlPlaneService.register_channel", + "dst_symbol_id": null, + "dst_ref": "self._channels.append", + "resolution": "partial", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "validation": { + "passed": true, + "action": "return", + "reasons": [] + } + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-explain-nonexistent-symbol.md b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-explain-nonexistent-symbol.md new file mode 100644 index 0000000..1c9d208 --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-explain-nonexistent-symbol.md @@ -0,0 +1,36 @@ +# plba-v2-explain-nonexistent-symbol + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: agent_runtime +- mode: full_chain +- passed: False + +## Query +Объясни класс RuntimeFactoryManager + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 33, + "llm_answer": "Класс `RuntimeFactoryManager` не указан напрямую в предоставленном коде. Однако, судя по контексту и взаимосвязям между классами:\n\n**Назначение класса:**\n- Управление фабрикой для создания экземпляров классов, связанных с управлением рабочим состоянием приложения.\n\n**Ключевые шаги:**\n1. Инициализация фабрики.\n2. Создание экземпляра соответствующего класса управления каналом (`ControlChannel`) или другого необходимого класса.\n3. Регистрация созданных каналов в сервисе управления каналами.\n\n**Опорные файлы:**\n- `src/app_runtime/control/base.py`: Объявление абстрактного базового класса `ControlChannel`.\n- `src/app_runtime/control/service.py`: Реализация сервиса управления каналами, который регистрирует созданные каналы.\n- `src/app_runtime/control/http_channel.py`: Определение канала HTTP, используемого для взаимодействия через HTTP-протокол.\n\nОбратите внимание, что прямое определение класса `RuntimeFactoryManager` отсутствует в представленном коде, поэтому информация о его назначении основана на логическом выводе и контексте использования других классов.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "RuntimeFactoryManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] +} + +## Mismatches +- answer_mode: expected degraded, got answered +- retrieval: expected empty rag, got 33 rows +- llm: expected answer to contain 'не найдена' \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-explain-runtime-manager.json b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-explain-runtime-manager.json new file mode 100644 index 0000000..9d308c8 --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-explain-runtime-manager.json @@ -0,0 +1,4154 @@ +{ + "case_id": "plba-v2-explain-runtime-manager", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "agent_runtime", + "mode": "full_chain", + "query": "Объясни как работает класс RuntimeManager", + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 33, + "llm_answer": "**Класс `RuntimeManager`** отвечает за управление жизненным циклом приложения и координацию различных компонентов системы.\n\n### Ключевые шаги работы класса:\n1. **Инициализация конфигурации:** \n Класс инициализирует начальные настройки приложения, включая загрузку конфигурационных файлов.\n \n2. **Регистрация каналов управления:**\n Метод `register_channel` позволяет зарегистрировать каналы управления, которые будут использоваться для взаимодействия с различными компонентами системы.\n\n3. **Запуск и остановка системы:**\n Методы `start` и `stop` инициируют запуск и остановку всех зарегистрированных каналов управления, обеспечивая корректное завершение работы системы.\n\n4. **Сохранение состояния:**\n Метод `snapshot` создает снимок текущего состояния системы, который может быть использован для восстановления или анализа состояния в будущем.\n\n### Опорные файлы:\n- `src/app_runtime/core/runtime.py`: Определение и реализация класса `RuntimeManager`.\n- `src/app_runtime/control/service.py`: Реализация методов регистрации и запуска каналов управления.\n- `src/app_runtime/control/http_channel.py`: Управление HTTP-каналом для взаимодействия с внешним миром.\n\nЭтот класс играет центральную роль в управлении потоком выполнения и состоянием приложения, координируя работу различных компонентов и обеспечивая их синхронность и согласованность.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "query": "Объясни как работает класс RuntimeManager", + "router_result": { + "schema_version": "1.1", + "intent": "CODE_QA", + "retrieval_profile": "code", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query_plan": { + "raw": "Объясни как работает класс RuntimeManager", + "normalized": "Объясни как работает класс RuntimeManager", + "sub_intent": "EXPLAIN", + "negations": [], + "expansions": [ + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "doc_scope_hints": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "symbol_kind_hint": "class", + "anchors": [ + { + "type": "SYMBOL", + "value": "RuntimeManager", + "source": "user_text", + "subtype": null, + "span": { + "start": 27, + "end": 41 + }, + "confidence": 0.88 + }, + { + "type": "KEY_TERM", + "value": "класс", + "source": "user_text", + "subtype": null, + "span": { + "start": 21, + "end": 26 + }, + "confidence": 0.9 + } + ] + }, + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "top_k": 8 + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 8 + }, + { + "layer_id": "C4_SEMANTIC_ROLES", + "top_k": 8 + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "top_k": 6 + }, + { + "layer_id": "C3_ENTRYPOINTS", + "top_k": 6 + } + ], + "filters": { + "test_policy": "EXCLUDE", + "path_scope": [], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + }, + "symbol_resolution": { + "status": "pending", + "resolved_symbol": null, + "alternatives": [ + "RuntimeManager" + ], + "confidence": 0.0 + }, + "evidence_policy": { + "require_def": true, + "require_flow": true, + "require_spec": false, + "allow_answer_without_evidence": false + } + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Объясни как работает класс RuntimeManager", + "sub_intent": "EXPLAIN", + "path_scope": [], + "keyword_hints": [ + "RuntimeManager" + ], + "symbol_candidates": [ + "RuntimeManager" + ], + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "top_k": 8 + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 8 + }, + { + "layer_id": "C4_SEMANTIC_ROLES", + "top_k": 8 + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "top_k": 6 + }, + { + "layer_id": "C3_ENTRYPOINTS", + "top_k": 6 + } + ], + "filters": { + "test_policy": "EXCLUDE", + "path_scope": [], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + }, + "query_plan": { + "raw": "Объясни как работает класс RuntimeManager", + "normalized": "Объясни как работает класс RuntimeManager", + "sub_intent": "EXPLAIN", + "negations": [], + "expansions": [ + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "doc_scope_hints": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "symbol_kind_hint": "class", + "anchors": [ + { + "type": "SYMBOL", + "value": "RuntimeManager", + "source": "user_text", + "subtype": null, + "span": { + "start": 27, + "end": 41 + }, + "confidence": 0.88 + }, + { + "type": "KEY_TERM", + "value": "класс", + "source": "user_text", + "subtype": null, + "span": { + "start": 21, + "end": 26 + }, + "confidence": 0.9 + } + ] + } + }, + "retrieval_result": { + "target_symbol_candidates": [ + "RuntimeManager", + "ControlPlaneService", + "ControlChannel.start", + "ControlChannel.stop" + ], + "resolved_symbol": "RuntimeManager", + "symbol_resolution_status": "resolved", + "file_candidates": [ + "src/plba/bootstrap.py", + "src/app_runtime/control/service.py", + "src/app_runtime/core/runtime.py", + "src/plba/__init__.py", + "src/plba/core.py", + "src/app_runtime/control/__init__.py", + "src/app_runtime/control/base.py", + "src/app_runtime/control/http_runner.py", + "src/app_runtime/control/http_app.py", + "src/app_runtime/control/http_channel.py", + "src/plba/control.py", + "src/app_runtime/workflow/persistence/workflow_persistence.py" + ], + "code_chunks": [ + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/plba/bootstrap.py", + "title": "RuntimeManager", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "start_line": 4, + "end_line": 4, + "metadata": { + "symbol_id": "27158ca220022eeb5083c6addf8a50775d45f7161284fd60aac48410105f4b98", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/service.py", + "title": "RuntimeManager", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "start_line": 9, + "end_line": 9, + "metadata": { + "symbol_id": "62a9575c77aad894120d18b4f2a08cf2ba42f77e9be4a8a432b767d157701afe", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/core/runtime.py", + "title": "RuntimeManager", + "content": "class RuntimeManager\nRuntimeManager", + "start_line": 18, + "end_line": 179, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "qname": "RuntimeManager", + "kind": "class", + "signature": "RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/plba/__init__.py", + "title": "RuntimeManager", + "content": "const RuntimeManager\nRuntimeManager = plba.core.RuntimeManager", + "start_line": 16, + "end_line": 16, + "metadata": { + "symbol_id": "7eacec84f9b8d6c4201374591faecdac7493091c263681495c338973f2971ad9", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = plba.core.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/plba/core.py", + "title": "RuntimeManager", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "start_line": 2, + "end_line": 2, + "metadata": { + "symbol_id": "e1684562d978b7af7fe9b27dc5869d770348a87b5dc19a50360f58544668578b", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.core", + "is_test": false, + "blob_sha": "c0ae25110d20e665216616e26b68adfe035b624ba45d31d1272fb21f906f9ca8", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/__init__.py", + "title": "ControlPlaneService", + "content": "const ControlPlaneService\nControlPlaneService = app_runtime.control.service.ControlPlaneService", + "start_line": 3, + "end_line": 3, + "metadata": { + "symbol_id": "217e8f044d1c01644bf7b81e5046af9e84469210c692a2fb0c476a19bb069ae1", + "qname": "ControlPlaneService", + "kind": "const", + "signature": "ControlPlaneService = app_runtime.control.service.ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/base.py", + "title": "ControlChannel.start", + "content": "method ControlChannel.start\nstart(self, actions)\nStart the control channel and bind handlers.", + "start_line": 23, + "end_line": 24, + "metadata": { + "symbol_id": "e01e0d50d0f48d0c84c119c989b7a7c57ceea263811ce2605c684ae24d1a03b1", + "qname": "ControlChannel.start", + "kind": "method", + "signature": "start(self, actions)", + "parent_symbol_id": "ControlChannel", + "package_or_module": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/base.py", + "title": "ControlChannel.stop", + "content": "method ControlChannel.stop\nstop(self)\nStop the control channel and release resources.", + "start_line": 27, + "end_line": 28, + "metadata": { + "symbol_id": "54b5adf9866c526836221dc721b474ba23fbec83e1b1d3b8bc4da67ae3c1541d", + "qname": "ControlChannel.stop", + "kind": "method", + "signature": "stop(self)", + "parent_symbol_id": "ControlChannel", + "package_or_module": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/service.py", + "title": "src/app_runtime/control/service.py:ControlPlaneService", + "content": "class ControlPlaneService:\n def __init__(self) -> None:\n self._channels: list[ControlChannel] = []\n\n def register_channel(self, channel: ControlChannel) -> None:\n self._channels.append(channel)\n\n def start(self, runtime: RuntimeManager) -> None:\n if not self._channels:\n return\n asyncio.run(self._start_async(runtime))\n\n def stop(self) -> None:\n if not self._channels:\n return\n asyncio.run(self._stop_async())\n\n def snapshot(self, runtime: RuntimeManager) -> dict[str, object]:\n health = runtime.current_health()\n return {\n \"runtime\": {\"state\": runtime._state.value},\n \"modules\": list(runtime.registry.modules),\n \"services\": runtime.services.snapshot(),\n \"workers\": runtime.workers.snapshot(),\n \"health\": runtime.health.snapshot(runtime.workers.healths()) | {\"status\": health[\"status\"]},\n \"config\": runtime.configuration.get(),\n }\n\n async def _start_async(self, runtime: RuntimeManager) -> None:\n actions = ControlActionSet(\n health=runtime.health_status,\n start=runtime.start_runtime,\n stop=runtime.stop_runtime,\n status=runtime.runtime_status,\n )\n for channel in self._channels:\n await channel.start(actions)\n\n async def _stop_async(self) -> None:\n for channel in reversed(self._channels):\n await channel.stop()", + "start_line": 12, + "end_line": 52, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/http_runner.py", + "title": "src/app_runtime/control/http_runner.py:UvicornThreadRunner", + "content": "class UvicornThreadRunner:\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._host = host\n self._port = port\n self._timeout = timeout\n self._server: Server | None = None\n self._thread: Thread | None = None\n self._error: BaseException | None = None\n\n async def start(self, app: FastAPI) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._error = None\n config = Config(app=app, host=self._host, port=self._port, log_level=\"warning\")\n self._server = Server(config)\n self._thread = Thread(target=self._serve, name=\"plba-http-control\", daemon=True)\n self._thread.start()\n await self._wait_until_started()\n\n async def stop(self) -> None:\n if self._server is None or self._thread is None:\n return\n self._server.should_exit = True\n await asyncio.to_thread(self._thread.join, self._timeout)\n self._server = None\n self._thread = None\n\n @property\n def port(self) -> int:\n if self._server is None or not getattr(self._server, \"servers\", None):\n return self._port\n socket = self._server.servers[0].sockets[0]\n return int(socket.getsockname()[1])\n\n async def _wait_until_started(self) -> None:\n if self._server is None:\n raise RuntimeError(\"Server is not initialized\")\n deadline = asyncio.get_running_loop().time() + max(float(self._timeout), 1.0)\n while not self._server.started:\n if self._error is not None:\n raise RuntimeError(\"HTTP control server failed to start\") from self._error\n if asyncio.get_running_loop().time() >= deadline:\n raise TimeoutError(\"HTTP control server startup timed out\")\n await asyncio.sleep(0.05)\n\n def _serve(self) -> None:\n if self._server is None:\n return\n try:\n asyncio.run(self._server.serve())\n except BaseException as exc: # noqa: BLE001\n self._error = exc", + "start_line": 10, + "end_line": 61, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_runner", + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/base.py", + "title": "src/app_runtime/control/base.py:ControlChannel", + "content": "class ControlChannel(ABC):\n @abstractmethod\n async def start(self, actions: ControlActionSet) -> None:\n \"\"\"Start the control channel and bind handlers.\"\"\"\n\n @abstractmethod\n async def stop(self) -> None:\n \"\"\"Stop the control channel and release resources.\"\"\"", + "start_line": 21, + "end_line": 28, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/__init__.py", + "title": "src/app_runtime/control/__init__.py:1-5", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\"ControlActionSet\", \"ControlChannel\", \"ControlPlaneService\", \"HttpControlChannel\"]", + "start_line": 1, + "end_line": 5, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/http_app.py", + "title": "src/app_runtime/control/http_app.py:HttpControlAppFactory", + "content": "class HttpControlAppFactory:\n def create(\n self,\n health_provider: Callable[[], Awaitable[HealthPayload]],\n action_provider: Callable[[str, str], Awaitable[JSONResponse]],\n ) -> FastAPI:\n app = FastAPI(title=\"PLBA Control API\")\n\n @app.middleware(\"http\")\n async def log_api_call(request: Request, call_next): # type: ignore[no-untyped-def]\n started = time.monotonic()\n response = await call_next(request)\n response.headers[\"X-Response-Time-Ms\"] = str(int((time.monotonic() - started) * 1000))\n return response\n\n @app.get(\"/health\")\n async def health() -> JSONResponse:\n payload = await health_provider()\n status_code = 200 if payload.get(\"status\") == \"ok\" else 503\n return JSONResponse(content=payload, status_code=status_code)\n\n @app.get(\"/actions/{action}\")\n @app.post(\"/actions/{action}\")\n async def action(action: str, request: Request) -> JSONResponse:\n client_source = self._client_source(request)\n if action in {\"start\", \"stop\"}:\n LOGGER.warning(\"Control action requested: /actions/%s client=%s\", action, client_source)\n return await action_provider(action, client_source)\n\n return app\n\n def _client_source(self, request: Request) -> str:\n explicit_header = request.headers.get(\"X-Client-Source\", \"\").strip()\n if explicit_header:\n return explicit_header\n user_agent = request.headers.get(\"User-Agent\", \"\").strip()\n if user_agent:\n return f\"user-agent:{user_agent}\"\n return \"unknown\"", + "start_line": 15, + "end_line": 53, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/http_channel.py", + "title": "src/app_runtime/control/http_channel.py:HttpControlChannel", + "content": "class HttpControlChannel(ControlChannel):\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._timeout = timeout\n self._runner = UvicornThreadRunner(host, port, timeout)\n self._factory = HttpControlAppFactory()\n self._actions: ControlActionSet | None = None\n\n async def start(self, actions: ControlActionSet) -> None:\n self._actions = actions\n app = self._factory.create(self._health_response, self._action_response)\n await self._runner.start(app)\n\n async def stop(self) -> None:\n await self._runner.stop()\n\n @property\n def port(self) -> int:\n return self._runner.port\n\n async def _health_response(self) -> dict[str, object]:\n if self._actions is None:\n return {\"status\": \"unhealthy\", \"detail\": \"control actions are not configured\"}\n return await asyncio.wait_for(self._actions.health(), timeout=float(self._timeout))\n\n async def _action_response(self, action: str, _client_source: str = \"unknown\") -> JSONResponse:\n if self._actions is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"{action} handler is not configured\"}, status_code=404)\n callbacks = {\n \"start\": self._actions.start,\n \"stop\": self._actions.stop,\n \"status\": self._actions.status,\n }\n callback = callbacks.get(action)\n if callback is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"unsupported action: {action}\"}, status_code=404)\n action_timeout = max(float(self._timeout), 10.0) if action in {\"start\", \"stop\"} else float(self._timeout)\n try:\n detail = await asyncio.wait_for(callback(), timeout=action_timeout)\n except asyncio.TimeoutError:\n return JSONResponse(\n content={\"status\": \"accepted\", \"detail\": f\"{action} operation is still in progress\"},\n status_code=202,\n )\n except Exception as exc:\n return JSONResponse(content={\"status\": \"error\", \"detail\": str(exc)}, status_code=500)\n return JSONResponse(content={\"status\": \"ok\", \"detail\": detail or f\"{action} action accepted\"}, status_code=200)", + "start_line": 12, + "end_line": 57, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/base.py", + "title": "src/app_runtime/control/base.py:ControlActionSet", + "content": "class ControlActionSet:\n health: HealthHandler\n start: ActionHandler\n stop: ActionHandler\n status: ActionHandler", + "start_line": 14, + "end_line": 18, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/plba/control.py", + "title": "src/plba/control.py:1-10", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\n \"ControlActionSet\",\n \"ControlChannel\",\n \"ControlPlaneService\",\n \"HttpControlChannel\",\n]", + "start_line": 1, + "end_line": 10, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.control", + "is_test": false, + "blob_sha": "31bd5c4481bfa7fbca8fae56d4860a67e3953ca74474ac8439e1f39b685d7bc8", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/core/runtime.py", + "title": "RuntimeManager", + "content": "RuntimeManager\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests manager\n- orchestrates role-like calls (4)\n- reads and writes state attributes\n- participates in dataflow slices (50)", + "start_line": 18, + "end_line": 179, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "symbol_name": "RuntimeManager", + "qname": "RuntimeManager", + "role": "pipeline_stage", + "confidence": 0.67, + "dataflow_participation": 50, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/base.py", + "title": "ControlChannel", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "start_line": 21, + "end_line": 28, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/base.py", + "title": "ControlActionSet", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "start_line": 14, + "end_line": 18, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "start_line": 12, + "end_line": 52, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/http_runner.py", + "title": "UvicornThreadRunner", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "start_line": 10, + "end_line": 61, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/http_channel.py", + "title": "HttpControlChannel", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "start_line": 12, + "end_line": 57, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/http_app.py", + "title": "HttpControlAppFactory", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "start_line": 15, + "end_line": 53, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "title": "WorkflowPersistence", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "start_line": 8, + "end_line": 54, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "start_line": 14, + "end_line": 25, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "start_line": 14, + "end_line": 51, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "start_line": 14, + "end_line": 17, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "start_line": 14, + "end_line": 20, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "start_line": 14, + "end_line": 47, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/core/runtime.py", + "title": "RuntimeManager.__init__:dataflow_slice", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file", + "start_line": 32, + "end_line": 52, + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C3_ENTRYPOINTS", + "path": "src/app_runtime/control/http_app.py", + "title": "app.post", + "content": "fastapi http app.post", + "start_line": 38, + "end_line": 42, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C3_ENTRYPOINTS", + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "content": "fastapi http app.get", + "start_line": 31, + "end_line": 34, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C3_ENTRYPOINTS", + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "content": "fastapi http app.get", + "start_line": 38, + "end_line": 42, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "relations": [ + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop" + }, + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async" + }, + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel" + }, + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start" + }, + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async" + }, + { + "path": "src/app_runtime/core/runtime.py", + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file" + } + ], + "entrypoints": [ + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.post", + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "test_candidates": [], + "layer_outcomes": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C4_SEMANTIC_ROLES", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 6, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C3_ENTRYPOINTS", + "hit_count": 3, + "empty": false, + "fallback_used": false + } + ], + "missing_layers": [], + "raw_rows": [ + { + "path": "src/plba/bootstrap.py", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 4, + "span_end": 4, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "27158ca220022eeb5083c6addf8a50775d45f7161284fd60aac48410105f4b98", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 9, + "span_end": 9, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "62a9575c77aad894120d18b4f2a08cf2ba42f77e9be4a8a432b767d157701afe", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager\nRuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "qname": "RuntimeManager", + "kind": "class", + "signature": "RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/__init__.py", + "content": "const RuntimeManager\nRuntimeManager = plba.core.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 16, + "span_end": 16, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "7eacec84f9b8d6c4201374591faecdac7493091c263681495c338973f2971ad9", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = plba.core.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/core.py", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 2, + "span_end": 2, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "e1684562d978b7af7fe9b27dc5869d770348a87b5dc19a50360f58544668578b", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.core", + "is_test": false, + "blob_sha": "c0ae25110d20e665216616e26b68adfe035b624ba45d31d1272fb21f906f9ca8", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "const ControlPlaneService\nControlPlaneService = app_runtime.control.service.ControlPlaneService", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlPlaneService", + "span_start": 3, + "span_end": 3, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "217e8f044d1c01644bf7b81e5046af9e84469210c692a2fb0c476a19bb069ae1", + "qname": "ControlPlaneService", + "kind": "const", + "signature": "ControlPlaneService = app_runtime.control.service.ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "method ControlChannel.start\nstart(self, actions)\nStart the control channel and bind handlers.", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlChannel.start", + "span_start": 23, + "span_end": 24, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "e01e0d50d0f48d0c84c119c989b7a7c57ceea263811ce2605c684ae24d1a03b1", + "qname": "ControlChannel.start", + "kind": "method", + "signature": "start(self, actions)", + "parent_symbol_id": "ControlChannel", + "package_or_module": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "method ControlChannel.stop\nstop(self)\nStop the control channel and release resources.", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlChannel.stop", + "span_start": 27, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "54b5adf9866c526836221dc721b474ba23fbec83e1b1d3b8bc4da67ae3c1541d", + "qname": "ControlChannel.stop", + "kind": "method", + "signature": "stop(self)", + "parent_symbol_id": "ControlChannel", + "package_or_module": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "class ControlPlaneService:\n def __init__(self) -> None:\n self._channels: list[ControlChannel] = []\n\n def register_channel(self, channel: ControlChannel) -> None:\n self._channels.append(channel)\n\n def start(self, runtime: RuntimeManager) -> None:\n if not self._channels:\n return\n asyncio.run(self._start_async(runtime))\n\n def stop(self) -> None:\n if not self._channels:\n return\n asyncio.run(self._stop_async())\n\n def snapshot(self, runtime: RuntimeManager) -> dict[str, object]:\n health = runtime.current_health()\n return {\n \"runtime\": {\"state\": runtime._state.value},\n \"modules\": list(runtime.registry.modules),\n \"services\": runtime.services.snapshot(),\n \"workers\": runtime.workers.snapshot(),\n \"health\": runtime.health.snapshot(runtime.workers.healths()) | {\"status\": health[\"status\"]},\n \"config\": runtime.configuration.get(),\n }\n\n async def _start_async(self, runtime: RuntimeManager) -> None:\n actions = ControlActionSet(\n health=runtime.health_status,\n start=runtime.start_runtime,\n stop=runtime.stop_runtime,\n status=runtime.runtime_status,\n )\n for channel in self._channels:\n await channel.start(actions)\n\n async def _stop_async(self) -> None:\n for channel in reversed(self._channels):\n await channel.stop()", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/service.py:ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "class UvicornThreadRunner:\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._host = host\n self._port = port\n self._timeout = timeout\n self._server: Server | None = None\n self._thread: Thread | None = None\n self._error: BaseException | None = None\n\n async def start(self, app: FastAPI) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._error = None\n config = Config(app=app, host=self._host, port=self._port, log_level=\"warning\")\n self._server = Server(config)\n self._thread = Thread(target=self._serve, name=\"plba-http-control\", daemon=True)\n self._thread.start()\n await self._wait_until_started()\n\n async def stop(self) -> None:\n if self._server is None or self._thread is None:\n return\n self._server.should_exit = True\n await asyncio.to_thread(self._thread.join, self._timeout)\n self._server = None\n self._thread = None\n\n @property\n def port(self) -> int:\n if self._server is None or not getattr(self._server, \"servers\", None):\n return self._port\n socket = self._server.servers[0].sockets[0]\n return int(socket.getsockname()[1])\n\n async def _wait_until_started(self) -> None:\n if self._server is None:\n raise RuntimeError(\"Server is not initialized\")\n deadline = asyncio.get_running_loop().time() + max(float(self._timeout), 1.0)\n while not self._server.started:\n if self._error is not None:\n raise RuntimeError(\"HTTP control server failed to start\") from self._error\n if asyncio.get_running_loop().time() >= deadline:\n raise TimeoutError(\"HTTP control server startup timed out\")\n await asyncio.sleep(0.05)\n\n def _serve(self) -> None:\n if self._server is None:\n return\n try:\n asyncio.run(self._server.serve())\n except BaseException as exc: # noqa: BLE001\n self._error = exc", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_runner.py:UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_runner", + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlChannel(ABC):\n @abstractmethod\n async def start(self, actions: ControlActionSet) -> None:\n \"\"\"Start the control channel and bind handlers.\"\"\"\n\n @abstractmethod\n async def stop(self) -> None:\n \"\"\"Stop the control channel and release resources.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\"ControlActionSet\", \"ControlChannel\", \"ControlPlaneService\", \"HttpControlChannel\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/__init__.py:1-5", + "span_start": 1, + "span_end": 5, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "class HttpControlAppFactory:\n def create(\n self,\n health_provider: Callable[[], Awaitable[HealthPayload]],\n action_provider: Callable[[str, str], Awaitable[JSONResponse]],\n ) -> FastAPI:\n app = FastAPI(title=\"PLBA Control API\")\n\n @app.middleware(\"http\")\n async def log_api_call(request: Request, call_next): # type: ignore[no-untyped-def]\n started = time.monotonic()\n response = await call_next(request)\n response.headers[\"X-Response-Time-Ms\"] = str(int((time.monotonic() - started) * 1000))\n return response\n\n @app.get(\"/health\")\n async def health() -> JSONResponse:\n payload = await health_provider()\n status_code = 200 if payload.get(\"status\") == \"ok\" else 503\n return JSONResponse(content=payload, status_code=status_code)\n\n @app.get(\"/actions/{action}\")\n @app.post(\"/actions/{action}\")\n async def action(action: str, request: Request) -> JSONResponse:\n client_source = self._client_source(request)\n if action in {\"start\", \"stop\"}:\n LOGGER.warning(\"Control action requested: /actions/%s client=%s\", action, client_source)\n return await action_provider(action, client_source)\n\n return app\n\n def _client_source(self, request: Request) -> str:\n explicit_header = request.headers.get(\"X-Client-Source\", \"\").strip()\n if explicit_header:\n return explicit_header\n user_agent = request.headers.get(\"User-Agent\", \"\").strip()\n if user_agent:\n return f\"user-agent:{user_agent}\"\n return \"unknown\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_app.py:HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel(ControlChannel):\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._timeout = timeout\n self._runner = UvicornThreadRunner(host, port, timeout)\n self._factory = HttpControlAppFactory()\n self._actions: ControlActionSet | None = None\n\n async def start(self, actions: ControlActionSet) -> None:\n self._actions = actions\n app = self._factory.create(self._health_response, self._action_response)\n await self._runner.start(app)\n\n async def stop(self) -> None:\n await self._runner.stop()\n\n @property\n def port(self) -> int:\n return self._runner.port\n\n async def _health_response(self) -> dict[str, object]:\n if self._actions is None:\n return {\"status\": \"unhealthy\", \"detail\": \"control actions are not configured\"}\n return await asyncio.wait_for(self._actions.health(), timeout=float(self._timeout))\n\n async def _action_response(self, action: str, _client_source: str = \"unknown\") -> JSONResponse:\n if self._actions is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"{action} handler is not configured\"}, status_code=404)\n callbacks = {\n \"start\": self._actions.start,\n \"stop\": self._actions.stop,\n \"status\": self._actions.status,\n }\n callback = callbacks.get(action)\n if callback is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"unsupported action: {action}\"}, status_code=404)\n action_timeout = max(float(self._timeout), 10.0) if action in {\"start\", \"stop\"} else float(self._timeout)\n try:\n detail = await asyncio.wait_for(callback(), timeout=action_timeout)\n except asyncio.TimeoutError:\n return JSONResponse(\n content={\"status\": \"accepted\", \"detail\": f\"{action} operation is still in progress\"},\n status_code=202,\n )\n except Exception as exc:\n return JSONResponse(content={\"status\": \"error\", \"detail\": str(exc)}, status_code=500)\n return JSONResponse(content={\"status\": \"ok\", \"detail\": detail or f\"{action} action accepted\"}, status_code=200)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_channel.py:HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlActionSet:\n health: HealthHandler\n start: ActionHandler\n stop: ActionHandler\n status: ActionHandler", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/control.py", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\n \"ControlActionSet\",\n \"ControlChannel\",\n \"ControlPlaneService\",\n \"HttpControlChannel\",\n]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/control.py:1-10", + "span_start": 1, + "span_end": 10, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.control", + "is_test": false, + "blob_sha": "31bd5c4481bfa7fbca8fae56d4860a67e3953ca74474ac8439e1f39b685d7bc8", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests manager\n- orchestrates role-like calls (4)\n- reads and writes state attributes\n- participates in dataflow slices (50)", + "layer": "C4_SEMANTIC_ROLES", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 43, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "symbol_name": "RuntimeManager", + "qname": "RuntimeManager", + "role": "pipeline_stage", + "confidence": 0.67, + "dataflow_participation": 50, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 52, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": null, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": null, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": null, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "retrieval_report": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "vector", + "C0_SOURCE_CHUNKS": "vector", + "C4_SEMANTIC_ROLES": "vector", + "C2_DEPENDENCY_GRAPH": "vector", + "C3_ENTRYPOINTS": "vector" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [] + } + }, + "fallback": { + "used": false, + "reason": null + }, + "retrieval_by_layer_ms": { + "C1_SYMBOL_CATALOG": 57, + "C0_SOURCE_CHUNKS": 15, + "C4_SEMANTIC_ROLES": 15, + "C2_DEPENDENCY_GRAPH": 54, + "C3_ENTRYPOINTS": 11 + } + } + }, + "diagnostics": { + "intent_correct": null, + "target_found": true, + "layers_used": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_sufficient": true, + "answer_mode": "normal", + "router_result": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "EXPLAIN", + "path_scope": [], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_resolution_status": "pending" + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Объясни как работает класс RuntimeManager", + "sub_intent": "EXPLAIN", + "path_scope": [], + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C4_SEMANTIC_ROLES", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 6, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C3_ENTRYPOINTS", + "hit_count": 3, + "empty": false, + "fallback_used": false + } + ], + "empty_layers": [], + "evidence_gate_decision": { + "sufficient": true, + "failure_reasons": [], + "evidence_count": 33 + }, + "failure_reasons": [], + "timings_ms": {} + }, + "rag_rows": [ + { + "path": "src/plba/bootstrap.py", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 4, + "span_end": 4, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "27158ca220022eeb5083c6addf8a50775d45f7161284fd60aac48410105f4b98", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 9, + "span_end": 9, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "62a9575c77aad894120d18b4f2a08cf2ba42f77e9be4a8a432b767d157701afe", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager\nRuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "qname": "RuntimeManager", + "kind": "class", + "signature": "RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/__init__.py", + "content": "const RuntimeManager\nRuntimeManager = plba.core.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 16, + "span_end": 16, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "7eacec84f9b8d6c4201374591faecdac7493091c263681495c338973f2971ad9", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = plba.core.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/core.py", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 2, + "span_end": 2, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "e1684562d978b7af7fe9b27dc5869d770348a87b5dc19a50360f58544668578b", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.core", + "is_test": false, + "blob_sha": "c0ae25110d20e665216616e26b68adfe035b624ba45d31d1272fb21f906f9ca8", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "const ControlPlaneService\nControlPlaneService = app_runtime.control.service.ControlPlaneService", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlPlaneService", + "span_start": 3, + "span_end": 3, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "217e8f044d1c01644bf7b81e5046af9e84469210c692a2fb0c476a19bb069ae1", + "qname": "ControlPlaneService", + "kind": "const", + "signature": "ControlPlaneService = app_runtime.control.service.ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "method ControlChannel.start\nstart(self, actions)\nStart the control channel and bind handlers.", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlChannel.start", + "span_start": 23, + "span_end": 24, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "e01e0d50d0f48d0c84c119c989b7a7c57ceea263811ce2605c684ae24d1a03b1", + "qname": "ControlChannel.start", + "kind": "method", + "signature": "start(self, actions)", + "parent_symbol_id": "ControlChannel", + "package_or_module": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "method ControlChannel.stop\nstop(self)\nStop the control channel and release resources.", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlChannel.stop", + "span_start": 27, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "54b5adf9866c526836221dc721b474ba23fbec83e1b1d3b8bc4da67ae3c1541d", + "qname": "ControlChannel.stop", + "kind": "method", + "signature": "stop(self)", + "parent_symbol_id": "ControlChannel", + "package_or_module": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "class ControlPlaneService:\n def __init__(self) -> None:\n self._channels: list[ControlChannel] = []\n\n def register_channel(self, channel: ControlChannel) -> None:\n self._channels.append(channel)\n\n def start(self, runtime: RuntimeManager) -> None:\n if not self._channels:\n return\n asyncio.run(self._start_async(runtime))\n\n def stop(self) -> None:\n if not self._channels:\n return\n asyncio.run(self._stop_async())\n\n def snapshot(self, runtime: RuntimeManager) -> dict[str, object]:\n health = runtime.current_health()\n return {\n \"runtime\": {\"state\": runtime._state.value},\n \"modules\": list(runtime.registry.modules),\n \"services\": runtime.services.snapshot(),\n \"workers\": runtime.workers.snapshot(),\n \"health\": runtime.health.snapshot(runtime.workers.healths()) | {\"status\": health[\"status\"]},\n \"config\": runtime.configuration.get(),\n }\n\n async def _start_async(self, runtime: RuntimeManager) -> None:\n actions = ControlActionSet(\n health=runtime.health_status,\n start=runtime.start_runtime,\n stop=runtime.stop_runtime,\n status=runtime.runtime_status,\n )\n for channel in self._channels:\n await channel.start(actions)\n\n async def _stop_async(self) -> None:\n for channel in reversed(self._channels):\n await channel.stop()", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/service.py:ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "class UvicornThreadRunner:\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._host = host\n self._port = port\n self._timeout = timeout\n self._server: Server | None = None\n self._thread: Thread | None = None\n self._error: BaseException | None = None\n\n async def start(self, app: FastAPI) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._error = None\n config = Config(app=app, host=self._host, port=self._port, log_level=\"warning\")\n self._server = Server(config)\n self._thread = Thread(target=self._serve, name=\"plba-http-control\", daemon=True)\n self._thread.start()\n await self._wait_until_started()\n\n async def stop(self) -> None:\n if self._server is None or self._thread is None:\n return\n self._server.should_exit = True\n await asyncio.to_thread(self._thread.join, self._timeout)\n self._server = None\n self._thread = None\n\n @property\n def port(self) -> int:\n if self._server is None or not getattr(self._server, \"servers\", None):\n return self._port\n socket = self._server.servers[0].sockets[0]\n return int(socket.getsockname()[1])\n\n async def _wait_until_started(self) -> None:\n if self._server is None:\n raise RuntimeError(\"Server is not initialized\")\n deadline = asyncio.get_running_loop().time() + max(float(self._timeout), 1.0)\n while not self._server.started:\n if self._error is not None:\n raise RuntimeError(\"HTTP control server failed to start\") from self._error\n if asyncio.get_running_loop().time() >= deadline:\n raise TimeoutError(\"HTTP control server startup timed out\")\n await asyncio.sleep(0.05)\n\n def _serve(self) -> None:\n if self._server is None:\n return\n try:\n asyncio.run(self._server.serve())\n except BaseException as exc: # noqa: BLE001\n self._error = exc", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_runner.py:UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_runner", + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlChannel(ABC):\n @abstractmethod\n async def start(self, actions: ControlActionSet) -> None:\n \"\"\"Start the control channel and bind handlers.\"\"\"\n\n @abstractmethod\n async def stop(self) -> None:\n \"\"\"Stop the control channel and release resources.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\"ControlActionSet\", \"ControlChannel\", \"ControlPlaneService\", \"HttpControlChannel\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/__init__.py:1-5", + "span_start": 1, + "span_end": 5, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "class HttpControlAppFactory:\n def create(\n self,\n health_provider: Callable[[], Awaitable[HealthPayload]],\n action_provider: Callable[[str, str], Awaitable[JSONResponse]],\n ) -> FastAPI:\n app = FastAPI(title=\"PLBA Control API\")\n\n @app.middleware(\"http\")\n async def log_api_call(request: Request, call_next): # type: ignore[no-untyped-def]\n started = time.monotonic()\n response = await call_next(request)\n response.headers[\"X-Response-Time-Ms\"] = str(int((time.monotonic() - started) * 1000))\n return response\n\n @app.get(\"/health\")\n async def health() -> JSONResponse:\n payload = await health_provider()\n status_code = 200 if payload.get(\"status\") == \"ok\" else 503\n return JSONResponse(content=payload, status_code=status_code)\n\n @app.get(\"/actions/{action}\")\n @app.post(\"/actions/{action}\")\n async def action(action: str, request: Request) -> JSONResponse:\n client_source = self._client_source(request)\n if action in {\"start\", \"stop\"}:\n LOGGER.warning(\"Control action requested: /actions/%s client=%s\", action, client_source)\n return await action_provider(action, client_source)\n\n return app\n\n def _client_source(self, request: Request) -> str:\n explicit_header = request.headers.get(\"X-Client-Source\", \"\").strip()\n if explicit_header:\n return explicit_header\n user_agent = request.headers.get(\"User-Agent\", \"\").strip()\n if user_agent:\n return f\"user-agent:{user_agent}\"\n return \"unknown\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_app.py:HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel(ControlChannel):\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._timeout = timeout\n self._runner = UvicornThreadRunner(host, port, timeout)\n self._factory = HttpControlAppFactory()\n self._actions: ControlActionSet | None = None\n\n async def start(self, actions: ControlActionSet) -> None:\n self._actions = actions\n app = self._factory.create(self._health_response, self._action_response)\n await self._runner.start(app)\n\n async def stop(self) -> None:\n await self._runner.stop()\n\n @property\n def port(self) -> int:\n return self._runner.port\n\n async def _health_response(self) -> dict[str, object]:\n if self._actions is None:\n return {\"status\": \"unhealthy\", \"detail\": \"control actions are not configured\"}\n return await asyncio.wait_for(self._actions.health(), timeout=float(self._timeout))\n\n async def _action_response(self, action: str, _client_source: str = \"unknown\") -> JSONResponse:\n if self._actions is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"{action} handler is not configured\"}, status_code=404)\n callbacks = {\n \"start\": self._actions.start,\n \"stop\": self._actions.stop,\n \"status\": self._actions.status,\n }\n callback = callbacks.get(action)\n if callback is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"unsupported action: {action}\"}, status_code=404)\n action_timeout = max(float(self._timeout), 10.0) if action in {\"start\", \"stop\"} else float(self._timeout)\n try:\n detail = await asyncio.wait_for(callback(), timeout=action_timeout)\n except asyncio.TimeoutError:\n return JSONResponse(\n content={\"status\": \"accepted\", \"detail\": f\"{action} operation is still in progress\"},\n status_code=202,\n )\n except Exception as exc:\n return JSONResponse(content={\"status\": \"error\", \"detail\": str(exc)}, status_code=500)\n return JSONResponse(content={\"status\": \"ok\", \"detail\": detail or f\"{action} action accepted\"}, status_code=200)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_channel.py:HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlActionSet:\n health: HealthHandler\n start: ActionHandler\n stop: ActionHandler\n status: ActionHandler", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/control.py", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\n \"ControlActionSet\",\n \"ControlChannel\",\n \"ControlPlaneService\",\n \"HttpControlChannel\",\n]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/control.py:1-10", + "span_start": 1, + "span_end": 10, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.control", + "is_test": false, + "blob_sha": "31bd5c4481bfa7fbca8fae56d4860a67e3953ca74474ac8439e1f39b685d7bc8", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests manager\n- orchestrates role-like calls (4)\n- reads and writes state attributes\n- participates in dataflow slices (50)", + "layer": "C4_SEMANTIC_ROLES", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 43, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "symbol_name": "RuntimeManager", + "qname": "RuntimeManager", + "role": "pipeline_stage", + "confidence": 0.67, + "dataflow_participation": 50, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 52, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "validation": { + "passed": true, + "action": "return", + "reasons": [] + } + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-explain-runtime-manager.md b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-explain-runtime-manager.md new file mode 100644 index 0000000..789c707 --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-explain-runtime-manager.md @@ -0,0 +1,34 @@ +# plba-v2-explain-runtime-manager + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: agent_runtime +- mode: full_chain +- passed: True + +## Query +Объясни как работает класс RuntimeManager + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 33, + "llm_answer": "**Класс `RuntimeManager`** отвечает за управление жизненным циклом приложения и координацию различных компонентов системы.\n\n### Ключевые шаги работы класса:\n1. **Инициализация конфигурации:** \n Класс инициализирует начальные настройки приложения, включая загрузку конфигурационных файлов.\n \n2. **Регистрация каналов управления:**\n Метод `register_channel` позволяет зарегистрировать каналы управления, которые будут использоваться для взаимодействия с различными компонентами системы.\n\n3. **Запуск и остановка системы:**\n Методы `start` и `stop` инициируют запуск и остановку всех зарегистрированных каналов управления, обеспечивая корректное завершение работы системы.\n\n4. **Сохранение состояния:**\n Метод `snapshot` создает снимок текущего состояния системы, который может быть использован для восстановления или анализа состояния в будущем.\n\n### Опорные файлы:\n- `src/app_runtime/core/runtime.py`: Определение и реализация класса `RuntimeManager`.\n- `src/app_runtime/control/service.py`: Реализация методов регистрации и запуска каналов управления.\n- `src/app_runtime/control/http_channel.py`: Управление HTTP-каналом для взаимодействия с внешним миром.\n\nЭтот класс играет центральную роль в управлении потоком выполнения и состоянием приложения, координируя работу различных компонентов и обеспечивая их синхронность и согласованность.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-explain-trace-service.json b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-explain-trace-service.json new file mode 100644 index 0000000..5cdd980 --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-explain-trace-service.json @@ -0,0 +1,4157 @@ +{ + "case_id": "plba-v2-explain-trace-service", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "agent_runtime", + "mode": "full_chain", + "query": "Объясни как работает класс TraceService", + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 33, + "llm_answer": "**Класс `TraceService`** предназначен для управления контекстом трассировки в приложении. Его основные функции включают создание нового контекста трассировки, получение текущего идентификатора трассировки и закрытие контекста.\n\n**Ключевые шаги работы класса:**\n1. **Инициализация:** При создании экземпляра `TraceService` задаются транспорт и хранилище контекста трассировки (по умолчанию используются заглушки).\n2. **Создание контекста:** Метод `create_context` создает новый контекст трассировки с заданными параметрами (идентификатор, родительский идентификатор, тип и атрибуты). Контекст сохраняется в хранилище.\n3. **Получение текущего идентификатора:** Метод `current_trace_id` возвращает текущий идентификатор трассировки.\n4. **Открытие контекста:** Метод `open_context` открывает новый контекст трассировки.\n5. **Закрытие контекста:** Метод `close_context` завершает текущую трассировку.\n\n**Опорные файлы:**\n- `src/app_runtime/tracing/service.py`: определение и реализация класса `TraceService`.\n- Другие файлы содержат декларации и зависимости, относящиеся к классу.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "TraceService" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "query": "Объясни как работает класс TraceService", + "router_result": { + "schema_version": "1.1", + "intent": "CODE_QA", + "retrieval_profile": "code", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query_plan": { + "raw": "Объясни как работает класс TraceService", + "normalized": "Объясни как работает класс TraceService", + "sub_intent": "EXPLAIN", + "negations": [], + "expansions": [ + "TraceService" + ], + "keyword_hints": [ + "TraceService" + ], + "path_hints": [], + "doc_scope_hints": [], + "symbol_candidates": [ + "TraceService" + ], + "symbol_kind_hint": "class", + "anchors": [ + { + "type": "SYMBOL", + "value": "TraceService", + "source": "user_text", + "subtype": null, + "span": { + "start": 27, + "end": 39 + }, + "confidence": 0.88 + }, + { + "type": "KEY_TERM", + "value": "класс", + "source": "user_text", + "subtype": null, + "span": { + "start": 21, + "end": 26 + }, + "confidence": 0.9 + } + ] + }, + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "top_k": 8 + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 8 + }, + { + "layer_id": "C4_SEMANTIC_ROLES", + "top_k": 8 + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "top_k": 6 + }, + { + "layer_id": "C3_ENTRYPOINTS", + "top_k": 6 + } + ], + "filters": { + "test_policy": "EXCLUDE", + "path_scope": [], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + }, + "symbol_resolution": { + "status": "pending", + "resolved_symbol": null, + "alternatives": [ + "TraceService" + ], + "confidence": 0.0 + }, + "evidence_policy": { + "require_def": true, + "require_flow": true, + "require_spec": false, + "allow_answer_without_evidence": false + } + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Объясни как работает класс TraceService", + "sub_intent": "EXPLAIN", + "path_scope": [], + "keyword_hints": [ + "TraceService" + ], + "symbol_candidates": [ + "TraceService" + ], + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "top_k": 8 + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 8 + }, + { + "layer_id": "C4_SEMANTIC_ROLES", + "top_k": 8 + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "top_k": 6 + }, + { + "layer_id": "C3_ENTRYPOINTS", + "top_k": 6 + } + ], + "filters": { + "test_policy": "EXCLUDE", + "path_scope": [], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + }, + "query_plan": { + "raw": "Объясни как работает класс TraceService", + "normalized": "Объясни как работает класс TraceService", + "sub_intent": "EXPLAIN", + "negations": [], + "expansions": [ + "TraceService" + ], + "keyword_hints": [ + "TraceService" + ], + "path_hints": [], + "doc_scope_hints": [], + "symbol_candidates": [ + "TraceService" + ], + "symbol_kind_hint": "class", + "anchors": [ + { + "type": "SYMBOL", + "value": "TraceService", + "source": "user_text", + "subtype": null, + "span": { + "start": 27, + "end": 39 + }, + "confidence": 0.88 + }, + { + "type": "KEY_TERM", + "value": "класс", + "source": "user_text", + "subtype": null, + "span": { + "start": 21, + "end": 26 + }, + "confidence": 0.9 + } + ] + } + }, + "retrieval_result": { + "target_symbol_candidates": [ + "TraceService", + "TraceService.open_context", + "TraceService.create_context", + "TraceService.current_trace_id" + ], + "resolved_symbol": "TraceService", + "symbol_resolution_status": "resolved", + "file_candidates": [ + "src/plba/__init__.py", + "src/app_runtime/core/runtime.py", + "src/app_runtime/tracing/__init__.py", + "src/app_runtime/tracing/service.py", + "src/plba/tracing.py", + "src/app_runtime/contracts/__init__.py", + "src/app_runtime/config/providers.py", + "src/app_runtime/control/http_runner.py", + "src/app_runtime/workflow/persistence/workflow_persistence.py", + "src/app_runtime/control/http_channel.py", + "src/app_runtime/queue/in_memory.py", + "src/app_runtime/config/file_loader.py", + "src/app_runtime/tracing/store.py", + "src/app_runtime/workers/supervisor.py", + "src/app_runtime/control/http_app.py" + ], + "code_chunks": [ + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/plba/__init__.py", + "title": "TraceService", + "content": "const TraceService\nTraceService = plba.tracing.TraceService", + "start_line": 20, + "end_line": 20, + "metadata": { + "symbol_id": "259ec03b77b9387ea53f69c77af32791dd29adf6de617ba72dd3f839197342a1", + "qname": "TraceService", + "kind": "const", + "signature": "TraceService = plba.tracing.TraceService", + "parent_symbol_id": null, + "package_or_module": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/core/runtime.py", + "title": "TraceService", + "content": "const TraceService\nTraceService = app_runtime.tracing.service.TraceService", + "start_line": 14, + "end_line": 14, + "metadata": { + "symbol_id": "3ccf6212fd7d9730f9df933e2ee7671b65bdae0520577e1a49c6432262842db6", + "qname": "TraceService", + "kind": "const", + "signature": "TraceService = app_runtime.tracing.service.TraceService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/tracing/__init__.py", + "title": "TraceService", + "content": "const TraceService\nTraceService = app_runtime.tracing.service.TraceService", + "start_line": 2, + "end_line": 2, + "metadata": { + "symbol_id": "ecd2fab7fa9744b2adca84d3d213f7aadcb7e1da84b9c2764a4ab39c65282b11", + "qname": "TraceService", + "kind": "const", + "signature": "TraceService = app_runtime.tracing.service.TraceService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.tracing.__init__", + "is_test": false, + "blob_sha": "a01dea5f773515aeaae8e6d3431fcb93531a8b577dfa26c2e5db16cd6ae6e4d9", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/tracing/service.py", + "title": "TraceService", + "content": "class TraceService\nTraceService(TraceContextFactory)", + "start_line": 39, + "end_line": 166, + "metadata": { + "symbol_id": "c2b2b976d99f2c600000b753731b26e0a69adcb4359398b93073590c5d5d04f4", + "qname": "TraceService", + "kind": "class", + "signature": "TraceService(TraceContextFactory)", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/plba/tracing.py", + "title": "TraceService", + "content": "const TraceService\nTraceService = app_runtime.tracing.service.TraceService", + "start_line": 1, + "end_line": 1, + "metadata": { + "symbol_id": "a4556fb3f83c50ea68b94a679786ce802cab7ffd9d7138aad3d6009b2661f425", + "qname": "TraceService", + "kind": "const", + "signature": "TraceService = app_runtime.tracing.service.TraceService", + "parent_symbol_id": null, + "package_or_module": "src.plba.tracing", + "is_test": false, + "blob_sha": "a27e11c716c93c3fcefe6f11b4cc420a6b743e7606606071d7f1aeeccc4e7d45", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/tracing/service.py", + "title": "TraceService.open_context", + "content": "method TraceService.open_context\nopen_context(self)", + "start_line": 66, + "end_line": 78, + "metadata": { + "symbol_id": "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426", + "qname": "TraceService.open_context", + "kind": "method", + "signature": "open_context(self)", + "parent_symbol_id": "TraceService", + "package_or_module": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/tracing/service.py", + "title": "TraceService.create_context", + "content": "method TraceService.create_context\ncreate_context(self)", + "start_line": 45, + "end_line": 63, + "metadata": { + "symbol_id": "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a", + "qname": "TraceService.create_context", + "kind": "method", + "signature": "create_context(self)", + "parent_symbol_id": "TraceService", + "package_or_module": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/tracing/service.py", + "title": "TraceService.current_trace_id", + "content": "method TraceService.current_trace_id\ncurrent_trace_id(self)", + "start_line": 80, + "end_line": 81, + "metadata": { + "symbol_id": "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c", + "qname": "TraceService.current_trace_id", + "kind": "method", + "signature": "current_trace_id(self)", + "parent_symbol_id": "TraceService", + "package_or_module": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/tracing/service.py", + "title": "src/app_runtime/tracing/service.py:TraceService", + "content": "class TraceService(TraceContextFactory):\n def __init__(self, transport: TraceTransport | None = None, store: TraceContextStore | None = None) -> None:\n self.transport = transport or NoOpTraceTransport()\n self.store = store or TraceContextStore()\n self._writer = TraceRecordWriter(self.transport)\n\n def create_context(\n self,\n *,\n alias: str,\n parent_id: str | None = None,\n kind: str | None = None,\n attrs: dict[str, Any] | None = None,\n ) -> str:\n record = TraceContextRecord(\n trace_id=uuid4().hex,\n alias=str(alias or \"\"),\n parent_id=parent_id,\n type=kind,\n event_time=utc_now(),\n attrs=dict(attrs or {}),\n )\n self.store.push(record)\n self._writer.write_context(record)\n return record.trace_id\n\n @contextmanager\n def open_context(\n self,\n *,\n alias: str,\n parent_id: str | None = None,\n kind: str | None = None,\n attrs: dict[str, Any] | None = None,\n ) -> Iterator[str]:\n trace_id = self.create_context(alias=alias, parent_id=parent_id, kind=kind, attrs=attrs)\n try:\n yield trace_id\n finally:\n self.store.pop()\n\n def current_trace_id(self) -> str | None:\n return self.store.current_trace_id()\n\n def close_context(self) -> str | None:\n previous = self.store.pop()\n return previous.record.trace_id if previous else None\n\n def step(self, name: str) -> None:\n self.store.set_step(str(name or \"\"))\n\n def info(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"INFO\", message, status, attrs)\n\n def debug(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"DEBUG\", message, status, attrs)\n\n def warning(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"WARNING\", message, status, attrs)\n\n def error(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"ERROR\", message, status, attrs)\n\n def exception(self, message: str, *, status: str = \"failed\", attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"ERROR\", message, status, attrs)\n\n def new_root(self, operation: str) -> TraceContext:\n trace_id = self.create_context(alias=operation, kind=\"operation\", attrs={\"operation\": operation})\n return TraceContext(trace_id=trace_id, span_id=trace_id, attributes={\"operation\": operation})\n\n def child_of(self, parent: TraceContext, operation: str) -> TraceContext:\n trace_id = self.create_context(\n alias=operation,\n parent_id=parent.trace_id,\n kind=\"worker\",\n attrs={\"operation\": operation},\n )\n return TraceContext(\n trace_id=trace_id,\n span_id=trace_id,\n parent_span_id=parent.span_id,\n attributes={\"operation\": operation},\n )\n\n def attach(self, metadata: dict[str, object], context: TraceContext) -> dict[str, object]:\n updated = dict(metadata)\n updated[\"trace_id\"] = context.trace_id\n updated[\"span_id\"] = context.span_id\n updated[\"parent_span_id\"] = context.parent_span_id\n return updated\n\n def resume(self, metadata: dict[str, object], operation: str) -> TraceContext:\n trace_id = str(metadata.get(\"trace_id\") or uuid4().hex)\n span_id = str(metadata.get(\"span_id\") or trace_id)\n parent_id = metadata.get(\"parent_span_id\")\n self.create_context(\n alias=operation,\n parent_id=str(parent_id) if parent_id else None,\n kind=\"worker\",\n attrs=dict(metadata),\n )\n return TraceContext(\n trace_id=trace_id,\n span_id=span_id,\n parent_span_id=str(parent_id) if parent_id else None,\n attributes={\"operation\": operation},\n )\n\n def _write_message(\n self,\n level: TraceLevel,\n message: str,\n status: str | None,\n attrs: dict[str, Any] | None,\n ) -> None:\n active = self.store.current()\n if active is None:\n raise RuntimeError(\"Trace context is not bound. Call create_context() first.\")\n record = TraceLogMessage(\n trace_id=active.record.trace_id,\n step=active.step,\n status=str(status or \"\"),\n message=str(message or \"\"),\n level=level,\n event_time=utc_now(),\n attrs=dict(attrs or {}),\n )\n self._writer.write_message(record)", + "start_line": 39, + "end_line": 166, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/tracing/service.py", + "title": "src/app_runtime/tracing/service.py:TraceManager", + "content": "class TraceManager(TraceService):\n \"\"\"Compatibility alias during the transition from ConfigManager-shaped naming.\"\"\"", + "start_line": 169, + "end_line": 170, + "metadata": { + "chunk_index": 2, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/core/runtime.py", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "start_line": 18, + "end_line": 179, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/tracing/__init__.py", + "title": "src/app_runtime/tracing/__init__.py:1-17", + "content": "from app_runtime.contracts.trace import TraceContext, TraceContextRecord, TraceLogMessage, TraceTransport\nfrom app_runtime.tracing.service import TraceManager, TraceService\nfrom app_runtime.tracing.store import ActiveTraceContext, TraceContextStore\nfrom app_runtime.tracing.transport import MySqlTraceTransport, NoOpTraceTransport\n\n__all__ = [\n \"ActiveTraceContext\",\n \"MySqlTraceTransport\",\n \"NoOpTraceTransport\",\n \"TraceContext\",\n \"TraceContextRecord\",\n \"TraceContextStore\",\n \"TraceLogMessage\",\n \"TraceManager\",\n \"TraceService\",\n \"TraceTransport\",\n]", + "start_line": 1, + "end_line": 17, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.tracing.__init__", + "is_test": false, + "blob_sha": "a01dea5f773515aeaae8e6d3431fcb93531a8b577dfa26c2e5db16cd6ae6e4d9", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/plba/__init__.py", + "title": "src/plba/__init__.py:1-69", + "content": "from plba.bootstrap import create_runtime\nfrom plba.config import ConfigFileLoader, FileConfigProvider\nfrom plba.control import ControlActionSet, ControlChannel, ControlPlaneService, HttpControlChannel\nfrom plba.contracts import (\n ApplicationModule,\n ConfigProvider,\n HealthContributor,\n TraceContext,\n TraceContextRecord,\n TraceLogMessage,\n TraceTransport,\n Worker,\n WorkerHealth,\n WorkerStatus,\n)\nfrom plba.core import ConfigurationManager, RuntimeManager, ServiceContainer\nfrom plba.health import HealthRegistry\nfrom plba.logging import LogManager\nfrom plba.queue import InMemoryTaskQueue\nfrom plba.tracing import MySqlTraceTransport, NoOpTraceTransport, TraceService\nfrom plba.workflow import (\n StepResult,\n WorkflowContext,\n WorkflowDefinition,\n WorkflowEngine,\n WorkflowEngineHooks,\n WorkflowNode,\n WorkflowRuntimeFactory,\n WorkflowStep,\n)\nfrom plba.workers import WorkerSupervisor\n\n__all__ = [\n \"ApplicationModule\",\n \"ConfigFileLoader\",\n \"ConfigProvider\",\n \"ConfigurationManager\",\n \"ControlActionSet\",\n \"ControlChannel\",\n \"ControlPlaneService\",\n \"create_runtime\",\n \"FileConfigProvider\",\n \"HealthContributor\",\n \"HealthRegistry\",\n \"HttpControlChannel\",\n \"InMemoryTaskQueue\",\n \"LogManager\",\n \"MySqlTraceTransport\",\n \"NoOpTraceTransport\",\n \"RuntimeManager\",\n \"ServiceContainer\",\n \"TraceContext\",\n \"TraceContextRecord\",\n \"TraceLogMessage\",\n \"TraceService\",\n \"TraceTransport\",\n \"StepResult\",\n \"Worker\",\n \"WorkerHealth\",\n \"WorkerStatus\",\n \"WorkflowContext\",\n \"WorkflowDefinition\",\n \"WorkflowEngine\",\n \"WorkflowEngineHooks\",\n \"WorkflowNode\",\n \"WorkflowRuntimeFactory\",\n \"WorkflowStep\",\n \"WorkerSupervisor\",\n]", + "start_line": 1, + "end_line": 69, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/plba/tracing.py", + "title": "src/plba/tracing.py:1-4", + "content": "from app_runtime.tracing.service import TraceService\nfrom app_runtime.tracing.transport import MySqlTraceTransport, NoOpTraceTransport\n\n__all__ = [\"MySqlTraceTransport\", \"NoOpTraceTransport\", \"TraceService\"]", + "start_line": 1, + "end_line": 4, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.tracing", + "is_test": false, + "blob_sha": "a27e11c716c93c3fcefe6f11b4cc420a6b743e7606606071d7f1aeeccc4e7d45", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/contracts/__init__.py", + "title": "src/app_runtime/__init__.py:1-1", + "content": "__all__: list[str] = []", + "start_line": 1, + "end_line": 1, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.__init__", + "is_test": false, + "blob_sha": "8eea9df4f6d7b38ca0e39ccc27b04700e3d08dbeec8046d613d22706d19985fa", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/config/providers.py", + "title": "src/app_runtime/config/providers.py:FileConfigProvider", + "content": "class FileConfigProvider(ConfigProvider):\n def __init__(self, path: str | Path) -> None:\n self._loader = ConfigFileLoader(path)\n\n @property\n def loader(self) -> ConfigFileLoader:\n return self._loader\n\n def load(self) -> dict[str, Any]:\n config = self._loader.load_sync()\n if not isinstance(config, dict):\n raise TypeError(\"Config root must be a mapping\")\n return dict(config)", + "start_line": 10, + "end_line": 22, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.config.providers", + "is_test": false, + "blob_sha": "8c53ca0122d6df6c5763bca15e99434bb4daebd5a618b8fc927e9ae90b022e64", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/tracing/service.py", + "title": "TraceService", + "content": "TraceService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (13)", + "start_line": 39, + "end_line": 166, + "metadata": { + "symbol_id": "c2b2b976d99f2c600000b753731b26e0a69adcb4359398b93073590c5d5d04f4", + "symbol_name": "TraceService", + "qname": "TraceService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 13, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/http_runner.py", + "title": "UvicornThreadRunner", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "start_line": 10, + "end_line": 61, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "title": "WorkflowPersistence", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "start_line": 8, + "end_line": 54, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/http_channel.py", + "title": "HttpControlChannel", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "start_line": 12, + "end_line": 57, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/queue/in_memory.py", + "title": "InMemoryTaskQueue", + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)", + "start_line": 9, + "end_line": 38, + "metadata": { + "symbol_id": "2da04cb94544a3bcbf0943a95ad4bdd8710bcafaa32a02fd0e4de2178dcf3533", + "symbol_name": "InMemoryTaskQueue", + "qname": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 9, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "58f0cc001ccda0eee4c6bc32ed83bd05eafd6b6644f1e8b4aa9eed3103db73dc", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/config/file_loader.py", + "title": "ConfigFileLoader", + "content": "ConfigFileLoader\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (8)", + "start_line": 11, + "end_line": 48, + "metadata": { + "symbol_id": "a8474eca8b6e9dc86ae67ed68b16fa5fb639ef08739c053e7b7195489765667f", + "symbol_name": "ConfigFileLoader", + "qname": "ConfigFileLoader", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 8, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/tracing/store.py", + "title": "TraceContextStore", + "content": "TraceContextStore\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "start_line": 15, + "end_line": 52, + "metadata": { + "symbol_id": "b2dad4fbe16ffb11b58deba311c7739955c39d59f291b22181f33e9c8cce4059", + "symbol_name": "TraceContextStore", + "qname": "TraceContextStore", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "d369554f08fc92039c6edd5a2a1e73b23901533e8974459170bbd9347d263dc5", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/workers/supervisor.py", + "title": "WorkerSupervisor", + "content": "WorkerSupervisor\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "start_line": 10, + "end_line": 59, + "metadata": { + "symbol_id": "c17b44e8d9e97d490989b21fa67d7c346cdda8a0472e4c41fb243c8846faa124", + "symbol_name": "WorkerSupervisor", + "qname": "WorkerSupervisor", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "77609d9d5927171cce7fc3a54897c183fd63068710c6362029b700937aae5eee", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/tracing/service.py", + "title": "TraceService.__init__:dataflow_slice", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.create_context", + "start_line": 42, + "end_line": 61, + "metadata": { + "edge_id": "3b052062067a78aef3302ee1d996897e02a67d1b340397bea4f59fe147c0492a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a", + "dst_ref": "TraceService.create_context", + "resolution": "resolved", + "slice_id": "3b052062067a78aef3302ee1d996897e02a67d1b340397bea4f59fe147c0492a", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.create_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/tracing/service.py", + "title": "TraceService.__init__:dataflow_slice", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.close_context", + "start_line": 42, + "end_line": 84, + "metadata": { + "edge_id": "7a9353ef57c9ae5d19b3a0c6ac50fad05e6d21d31bbe1cd1cd07af6332ba6505", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "01e14158dcced7e52d0c8ac84ac7b9a75225c261b6aca6a1d7da802d0994721c", + "dst_ref": "TraceService.close_context", + "resolution": "resolved", + "slice_id": "7a9353ef57c9ae5d19b3a0c6ac50fad05e6d21d31bbe1cd1cd07af6332ba6505", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.close_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "01e14158dcced7e52d0c8ac84ac7b9a75225c261b6aca6a1d7da802d0994721c" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/tracing/service.py", + "title": "TraceService.__init__:dataflow_slice", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.open_context", + "start_line": 42, + "end_line": 78, + "metadata": { + "edge_id": "a6e13b9ebc4fed84586afd53ed92a4d14757e440873f572b2337d5622ee96031", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426", + "dst_ref": "TraceService.open_context", + "resolution": "resolved", + "slice_id": "a6e13b9ebc4fed84586afd53ed92a4d14757e440873f572b2337d5622ee96031", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.open_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/tracing/service.py", + "title": "TraceService.__init__:dataflow_slice", + "content": "TraceService.__init__\n -> TraceService.transport\n -> TraceService.__init__", + "start_line": 41, + "end_line": 43, + "metadata": { + "edge_id": "1e923a93faa05c3c43ca9b19bd047007a8589ccce57d3cc1798ae7f9f200af98", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "dst_ref": "TraceService.__init__", + "resolution": "resolved", + "slice_id": "1e923a93faa05c3c43ca9b19bd047007a8589ccce57d3cc1798ae7f9f200af98", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.transport", + "TraceService.__init__" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/tracing/service.py", + "title": "TraceService.__init__:dataflow_slice", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.current_trace_id", + "start_line": 42, + "end_line": 81, + "metadata": { + "edge_id": "3ea17138634b1190bded77ddb84aa1595124f6519b246f24fc4b02bd62b5cac1", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c", + "dst_ref": "TraceService.current_trace_id", + "resolution": "resolved", + "slice_id": "3ea17138634b1190bded77ddb84aa1595124f6519b246f24fc4b02bd62b5cac1", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.current_trace_id" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/tracing/service.py", + "title": "TraceService.__init__:dataflow_slice", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.step", + "start_line": 42, + "end_line": 88, + "metadata": { + "edge_id": "9f34c5da9b09fba99df6f6b1bde183a9aeb45111b8218a747c71590c2c9f60f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "c44bfbc66cf747283f30088da3e011a10395031d41e77b74e523c24997f641ca", + "dst_ref": "TraceService.step", + "resolution": "resolved", + "slice_id": "9f34c5da9b09fba99df6f6b1bde183a9aeb45111b8218a747c71590c2c9f60f2", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.step" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "c44bfbc66cf747283f30088da3e011a10395031d41e77b74e523c24997f641ca" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C3_ENTRYPOINTS", + "path": "src/app_runtime/control/http_app.py", + "title": "app.post", + "content": "fastapi http app.post", + "start_line": 38, + "end_line": 42, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C3_ENTRYPOINTS", + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "content": "fastapi http app.get", + "start_line": 31, + "end_line": 34, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C3_ENTRYPOINTS", + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "content": "fastapi http app.get", + "start_line": 38, + "end_line": 42, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "relations": [ + { + "path": "src/app_runtime/tracing/service.py", + "metadata": { + "edge_id": "3b052062067a78aef3302ee1d996897e02a67d1b340397bea4f59fe147c0492a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a", + "dst_ref": "TraceService.create_context", + "resolution": "resolved", + "slice_id": "3b052062067a78aef3302ee1d996897e02a67d1b340397bea4f59fe147c0492a", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.create_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.create_context" + }, + { + "path": "src/app_runtime/tracing/service.py", + "metadata": { + "edge_id": "7a9353ef57c9ae5d19b3a0c6ac50fad05e6d21d31bbe1cd1cd07af6332ba6505", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "01e14158dcced7e52d0c8ac84ac7b9a75225c261b6aca6a1d7da802d0994721c", + "dst_ref": "TraceService.close_context", + "resolution": "resolved", + "slice_id": "7a9353ef57c9ae5d19b3a0c6ac50fad05e6d21d31bbe1cd1cd07af6332ba6505", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.close_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "01e14158dcced7e52d0c8ac84ac7b9a75225c261b6aca6a1d7da802d0994721c" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.close_context" + }, + { + "path": "src/app_runtime/tracing/service.py", + "metadata": { + "edge_id": "a6e13b9ebc4fed84586afd53ed92a4d14757e440873f572b2337d5622ee96031", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426", + "dst_ref": "TraceService.open_context", + "resolution": "resolved", + "slice_id": "a6e13b9ebc4fed84586afd53ed92a4d14757e440873f572b2337d5622ee96031", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.open_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.open_context" + }, + { + "path": "src/app_runtime/tracing/service.py", + "metadata": { + "edge_id": "1e923a93faa05c3c43ca9b19bd047007a8589ccce57d3cc1798ae7f9f200af98", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "dst_ref": "TraceService.__init__", + "resolution": "resolved", + "slice_id": "1e923a93faa05c3c43ca9b19bd047007a8589ccce57d3cc1798ae7f9f200af98", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.transport", + "TraceService.__init__" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "TraceService.__init__\n -> TraceService.transport\n -> TraceService.__init__" + }, + { + "path": "src/app_runtime/tracing/service.py", + "metadata": { + "edge_id": "3ea17138634b1190bded77ddb84aa1595124f6519b246f24fc4b02bd62b5cac1", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c", + "dst_ref": "TraceService.current_trace_id", + "resolution": "resolved", + "slice_id": "3ea17138634b1190bded77ddb84aa1595124f6519b246f24fc4b02bd62b5cac1", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.current_trace_id" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.current_trace_id" + }, + { + "path": "src/app_runtime/tracing/service.py", + "metadata": { + "edge_id": "9f34c5da9b09fba99df6f6b1bde183a9aeb45111b8218a747c71590c2c9f60f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "c44bfbc66cf747283f30088da3e011a10395031d41e77b74e523c24997f641ca", + "dst_ref": "TraceService.step", + "resolution": "resolved", + "slice_id": "9f34c5da9b09fba99df6f6b1bde183a9aeb45111b8218a747c71590c2c9f60f2", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.step" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "c44bfbc66cf747283f30088da3e011a10395031d41e77b74e523c24997f641ca" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.step" + } + ], + "entrypoints": [ + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.post", + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "test_candidates": [], + "layer_outcomes": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C4_SEMANTIC_ROLES", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 6, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C3_ENTRYPOINTS", + "hit_count": 3, + "empty": false, + "fallback_used": false + } + ], + "missing_layers": [], + "raw_rows": [ + { + "path": "src/plba/__init__.py", + "content": "const TraceService\nTraceService = plba.tracing.TraceService", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService", + "span_start": 20, + "span_end": 20, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "259ec03b77b9387ea53f69c77af32791dd29adf6de617ba72dd3f839197342a1", + "qname": "TraceService", + "kind": "const", + "signature": "TraceService = plba.tracing.TraceService", + "parent_symbol_id": null, + "package_or_module": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "const TraceService\nTraceService = app_runtime.tracing.service.TraceService", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService", + "span_start": 14, + "span_end": 14, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "3ccf6212fd7d9730f9df933e2ee7671b65bdae0520577e1a49c6432262842db6", + "qname": "TraceService", + "kind": "const", + "signature": "TraceService = app_runtime.tracing.service.TraceService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/__init__.py", + "content": "const TraceService\nTraceService = app_runtime.tracing.service.TraceService", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService", + "span_start": 2, + "span_end": 2, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "ecd2fab7fa9744b2adca84d3d213f7aadcb7e1da84b9c2764a4ab39c65282b11", + "qname": "TraceService", + "kind": "const", + "signature": "TraceService = app_runtime.tracing.service.TraceService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.tracing.__init__", + "is_test": false, + "blob_sha": "a01dea5f773515aeaae8e6d3431fcb93531a8b577dfa26c2e5db16cd6ae6e4d9", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceService\nTraceService(TraceContextFactory)", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService", + "span_start": 39, + "span_end": 166, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "c2b2b976d99f2c600000b753731b26e0a69adcb4359398b93073590c5d5d04f4", + "qname": "TraceService", + "kind": "class", + "signature": "TraceService(TraceContextFactory)", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/tracing.py", + "content": "const TraceService\nTraceService = app_runtime.tracing.service.TraceService", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService", + "span_start": 1, + "span_end": 1, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "a4556fb3f83c50ea68b94a679786ce802cab7ffd9d7138aad3d6009b2661f425", + "qname": "TraceService", + "kind": "const", + "signature": "TraceService = app_runtime.tracing.service.TraceService", + "parent_symbol_id": null, + "package_or_module": "src.plba.tracing", + "is_test": false, + "blob_sha": "a27e11c716c93c3fcefe6f11b4cc420a6b743e7606606071d7f1aeeccc4e7d45", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "method TraceService.open_context\nopen_context(self)", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService.open_context", + "span_start": 66, + "span_end": 78, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426", + "qname": "TraceService.open_context", + "kind": "method", + "signature": "open_context(self)", + "parent_symbol_id": "TraceService", + "package_or_module": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "method TraceService.create_context\ncreate_context(self)", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService.create_context", + "span_start": 45, + "span_end": 63, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a", + "qname": "TraceService.create_context", + "kind": "method", + "signature": "create_context(self)", + "parent_symbol_id": "TraceService", + "package_or_module": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "method TraceService.current_trace_id\ncurrent_trace_id(self)", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService.current_trace_id", + "span_start": 80, + "span_end": 81, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c", + "qname": "TraceService.current_trace_id", + "kind": "method", + "signature": "current_trace_id(self)", + "parent_symbol_id": "TraceService", + "package_or_module": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceService(TraceContextFactory):\n def __init__(self, transport: TraceTransport | None = None, store: TraceContextStore | None = None) -> None:\n self.transport = transport or NoOpTraceTransport()\n self.store = store or TraceContextStore()\n self._writer = TraceRecordWriter(self.transport)\n\n def create_context(\n self,\n *,\n alias: str,\n parent_id: str | None = None,\n kind: str | None = None,\n attrs: dict[str, Any] | None = None,\n ) -> str:\n record = TraceContextRecord(\n trace_id=uuid4().hex,\n alias=str(alias or \"\"),\n parent_id=parent_id,\n type=kind,\n event_time=utc_now(),\n attrs=dict(attrs or {}),\n )\n self.store.push(record)\n self._writer.write_context(record)\n return record.trace_id\n\n @contextmanager\n def open_context(\n self,\n *,\n alias: str,\n parent_id: str | None = None,\n kind: str | None = None,\n attrs: dict[str, Any] | None = None,\n ) -> Iterator[str]:\n trace_id = self.create_context(alias=alias, parent_id=parent_id, kind=kind, attrs=attrs)\n try:\n yield trace_id\n finally:\n self.store.pop()\n\n def current_trace_id(self) -> str | None:\n return self.store.current_trace_id()\n\n def close_context(self) -> str | None:\n previous = self.store.pop()\n return previous.record.trace_id if previous else None\n\n def step(self, name: str) -> None:\n self.store.set_step(str(name or \"\"))\n\n def info(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"INFO\", message, status, attrs)\n\n def debug(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"DEBUG\", message, status, attrs)\n\n def warning(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"WARNING\", message, status, attrs)\n\n def error(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"ERROR\", message, status, attrs)\n\n def exception(self, message: str, *, status: str = \"failed\", attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"ERROR\", message, status, attrs)\n\n def new_root(self, operation: str) -> TraceContext:\n trace_id = self.create_context(alias=operation, kind=\"operation\", attrs={\"operation\": operation})\n return TraceContext(trace_id=trace_id, span_id=trace_id, attributes={\"operation\": operation})\n\n def child_of(self, parent: TraceContext, operation: str) -> TraceContext:\n trace_id = self.create_context(\n alias=operation,\n parent_id=parent.trace_id,\n kind=\"worker\",\n attrs={\"operation\": operation},\n )\n return TraceContext(\n trace_id=trace_id,\n span_id=trace_id,\n parent_span_id=parent.span_id,\n attributes={\"operation\": operation},\n )\n\n def attach(self, metadata: dict[str, object], context: TraceContext) -> dict[str, object]:\n updated = dict(metadata)\n updated[\"trace_id\"] = context.trace_id\n updated[\"span_id\"] = context.span_id\n updated[\"parent_span_id\"] = context.parent_span_id\n return updated\n\n def resume(self, metadata: dict[str, object], operation: str) -> TraceContext:\n trace_id = str(metadata.get(\"trace_id\") or uuid4().hex)\n span_id = str(metadata.get(\"span_id\") or trace_id)\n parent_id = metadata.get(\"parent_span_id\")\n self.create_context(\n alias=operation,\n parent_id=str(parent_id) if parent_id else None,\n kind=\"worker\",\n attrs=dict(metadata),\n )\n return TraceContext(\n trace_id=trace_id,\n span_id=span_id,\n parent_span_id=str(parent_id) if parent_id else None,\n attributes={\"operation\": operation},\n )\n\n def _write_message(\n self,\n level: TraceLevel,\n message: str,\n status: str | None,\n attrs: dict[str, Any] | None,\n ) -> None:\n active = self.store.current()\n if active is None:\n raise RuntimeError(\"Trace context is not bound. Call create_context() first.\")\n record = TraceLogMessage(\n trace_id=active.record.trace_id,\n step=active.step,\n status=str(status or \"\"),\n message=str(message or \"\"),\n level=level,\n event_time=utc_now(),\n attrs=dict(attrs or {}),\n )\n self._writer.write_message(record)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/tracing/service.py:TraceService", + "span_start": 39, + "span_end": 166, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceManager(TraceService):\n \"\"\"Compatibility alias during the transition from ConfigManager-shaped naming.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/tracing/service.py:TraceManager", + "span_start": 169, + "span_end": 170, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 2, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/__init__.py", + "content": "from app_runtime.contracts.trace import TraceContext, TraceContextRecord, TraceLogMessage, TraceTransport\nfrom app_runtime.tracing.service import TraceManager, TraceService\nfrom app_runtime.tracing.store import ActiveTraceContext, TraceContextStore\nfrom app_runtime.tracing.transport import MySqlTraceTransport, NoOpTraceTransport\n\n__all__ = [\n \"ActiveTraceContext\",\n \"MySqlTraceTransport\",\n \"NoOpTraceTransport\",\n \"TraceContext\",\n \"TraceContextRecord\",\n \"TraceContextStore\",\n \"TraceLogMessage\",\n \"TraceManager\",\n \"TraceService\",\n \"TraceTransport\",\n]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/tracing/__init__.py:1-17", + "span_start": 1, + "span_end": 17, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.tracing.__init__", + "is_test": false, + "blob_sha": "a01dea5f773515aeaae8e6d3431fcb93531a8b577dfa26c2e5db16cd6ae6e4d9", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/__init__.py", + "content": "from plba.bootstrap import create_runtime\nfrom plba.config import ConfigFileLoader, FileConfigProvider\nfrom plba.control import ControlActionSet, ControlChannel, ControlPlaneService, HttpControlChannel\nfrom plba.contracts import (\n ApplicationModule,\n ConfigProvider,\n HealthContributor,\n TraceContext,\n TraceContextRecord,\n TraceLogMessage,\n TraceTransport,\n Worker,\n WorkerHealth,\n WorkerStatus,\n)\nfrom plba.core import ConfigurationManager, RuntimeManager, ServiceContainer\nfrom plba.health import HealthRegistry\nfrom plba.logging import LogManager\nfrom plba.queue import InMemoryTaskQueue\nfrom plba.tracing import MySqlTraceTransport, NoOpTraceTransport, TraceService\nfrom plba.workflow import (\n StepResult,\n WorkflowContext,\n WorkflowDefinition,\n WorkflowEngine,\n WorkflowEngineHooks,\n WorkflowNode,\n WorkflowRuntimeFactory,\n WorkflowStep,\n)\nfrom plba.workers import WorkerSupervisor\n\n__all__ = [\n \"ApplicationModule\",\n \"ConfigFileLoader\",\n \"ConfigProvider\",\n \"ConfigurationManager\",\n \"ControlActionSet\",\n \"ControlChannel\",\n \"ControlPlaneService\",\n \"create_runtime\",\n \"FileConfigProvider\",\n \"HealthContributor\",\n \"HealthRegistry\",\n \"HttpControlChannel\",\n \"InMemoryTaskQueue\",\n \"LogManager\",\n \"MySqlTraceTransport\",\n \"NoOpTraceTransport\",\n \"RuntimeManager\",\n \"ServiceContainer\",\n \"TraceContext\",\n \"TraceContextRecord\",\n \"TraceLogMessage\",\n \"TraceService\",\n \"TraceTransport\",\n \"StepResult\",\n \"Worker\",\n \"WorkerHealth\",\n \"WorkerStatus\",\n \"WorkflowContext\",\n \"WorkflowDefinition\",\n \"WorkflowEngine\",\n \"WorkflowEngineHooks\",\n \"WorkflowNode\",\n \"WorkflowRuntimeFactory\",\n \"WorkflowStep\",\n \"WorkerSupervisor\",\n]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/__init__.py:1-69", + "span_start": 1, + "span_end": 69, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/tracing.py", + "content": "from app_runtime.tracing.service import TraceService\nfrom app_runtime.tracing.transport import MySqlTraceTransport, NoOpTraceTransport\n\n__all__ = [\"MySqlTraceTransport\", \"NoOpTraceTransport\", \"TraceService\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/tracing.py:1-4", + "span_start": 1, + "span_end": 4, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.tracing", + "is_test": false, + "blob_sha": "a27e11c716c93c3fcefe6f11b4cc420a6b743e7606606071d7f1aeeccc4e7d45", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/__init__.py", + "content": "__all__: list[str] = []", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/__init__.py:1-1", + "span_start": 1, + "span_end": 1, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.__init__", + "is_test": false, + "blob_sha": "8eea9df4f6d7b38ca0e39ccc27b04700e3d08dbeec8046d613d22706d19985fa", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/providers.py", + "content": "class FileConfigProvider(ConfigProvider):\n def __init__(self, path: str | Path) -> None:\n self._loader = ConfigFileLoader(path)\n\n @property\n def loader(self) -> ConfigFileLoader:\n return self._loader\n\n def load(self) -> dict[str, Any]:\n config = self._loader.load_sync()\n if not isinstance(config, dict):\n raise TypeError(\"Config root must be a mapping\")\n return dict(config)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/config/providers.py:FileConfigProvider", + "span_start": 10, + "span_end": 22, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.config.providers", + "is_test": false, + "blob_sha": "8c53ca0122d6df6c5763bca15e99434bb4daebd5a618b8fc927e9ae90b022e64", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (13)", + "layer": "C4_SEMANTIC_ROLES", + "title": "TraceService", + "span_start": 39, + "span_end": 166, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 60, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "c2b2b976d99f2c600000b753731b26e0a69adcb4359398b93073590c5d5d04f4", + "symbol_name": "TraceService", + "qname": "TraceService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 13, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/queue/in_memory.py", + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)", + "layer": "C4_SEMANTIC_ROLES", + "title": "InMemoryTaskQueue", + "span_start": 9, + "span_end": 38, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 22, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "2da04cb94544a3bcbf0943a95ad4bdd8710bcafaa32a02fd0e4de2178dcf3533", + "symbol_name": "InMemoryTaskQueue", + "qname": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 9, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "58f0cc001ccda0eee4c6bc32ed83bd05eafd6b6644f1e8b4aa9eed3103db73dc", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "ConfigFileLoader\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (8)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ConfigFileLoader", + "span_start": 11, + "span_end": 48, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 23, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "a8474eca8b6e9dc86ae67ed68b16fa5fb639ef08739c053e7b7195489765667f", + "symbol_name": "ConfigFileLoader", + "qname": "ConfigFileLoader", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 8, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/store.py", + "content": "TraceContextStore\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "TraceContextStore", + "span_start": 15, + "span_end": 52, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "b2dad4fbe16ffb11b58deba311c7739955c39d59f291b22181f33e9c8cce4059", + "symbol_name": "TraceContextStore", + "qname": "TraceContextStore", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "d369554f08fc92039c6edd5a2a1e73b23901533e8974459170bbd9347d263dc5", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workers/supervisor.py", + "content": "WorkerSupervisor\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkerSupervisor", + "span_start": 10, + "span_end": 59, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "c17b44e8d9e97d490989b21fa67d7c346cdda8a0472e4c41fb243c8846faa124", + "symbol_name": "WorkerSupervisor", + "qname": "WorkerSupervisor", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "77609d9d5927171cce7fc3a54897c183fd63068710c6362029b700937aae5eee", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.create_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 61, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "3b052062067a78aef3302ee1d996897e02a67d1b340397bea4f59fe147c0492a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a", + "dst_ref": "TraceService.create_context", + "resolution": "resolved", + "slice_id": "3b052062067a78aef3302ee1d996897e02a67d1b340397bea4f59fe147c0492a", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.create_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.close_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 84, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "7a9353ef57c9ae5d19b3a0c6ac50fad05e6d21d31bbe1cd1cd07af6332ba6505", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "01e14158dcced7e52d0c8ac84ac7b9a75225c261b6aca6a1d7da802d0994721c", + "dst_ref": "TraceService.close_context", + "resolution": "resolved", + "slice_id": "7a9353ef57c9ae5d19b3a0c6ac50fad05e6d21d31bbe1cd1cd07af6332ba6505", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.close_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "01e14158dcced7e52d0c8ac84ac7b9a75225c261b6aca6a1d7da802d0994721c" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.open_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 78, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "a6e13b9ebc4fed84586afd53ed92a4d14757e440873f572b2337d5622ee96031", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426", + "dst_ref": "TraceService.open_context", + "resolution": "resolved", + "slice_id": "a6e13b9ebc4fed84586afd53ed92a4d14757e440873f572b2337d5622ee96031", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.open_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.transport\n -> TraceService.__init__", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 41, + "span_end": 43, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "1e923a93faa05c3c43ca9b19bd047007a8589ccce57d3cc1798ae7f9f200af98", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "dst_ref": "TraceService.__init__", + "resolution": "resolved", + "slice_id": "1e923a93faa05c3c43ca9b19bd047007a8589ccce57d3cc1798ae7f9f200af98", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.transport", + "TraceService.__init__" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.current_trace_id", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 81, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "3ea17138634b1190bded77ddb84aa1595124f6519b246f24fc4b02bd62b5cac1", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c", + "dst_ref": "TraceService.current_trace_id", + "resolution": "resolved", + "slice_id": "3ea17138634b1190bded77ddb84aa1595124f6519b246f24fc4b02bd62b5cac1", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.current_trace_id" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.step", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 88, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "9f34c5da9b09fba99df6f6b1bde183a9aeb45111b8218a747c71590c2c9f60f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "c44bfbc66cf747283f30088da3e011a10395031d41e77b74e523c24997f641ca", + "dst_ref": "TraceService.step", + "resolution": "resolved", + "slice_id": "9f34c5da9b09fba99df6f6b1bde183a9aeb45111b8218a747c71590c2c9f60f2", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.step" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "c44bfbc66cf747283f30088da3e011a10395031d41e77b74e523c24997f641ca" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": null, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": null, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": null, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "retrieval_report": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "vector", + "C0_SOURCE_CHUNKS": "vector", + "C4_SEMANTIC_ROLES": "vector", + "C2_DEPENDENCY_GRAPH": "vector", + "C3_ENTRYPOINTS": "vector" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [] + } + }, + "fallback": { + "used": false, + "reason": null + }, + "retrieval_by_layer_ms": { + "C1_SYMBOL_CATALOG": 33, + "C0_SOURCE_CHUNKS": 13, + "C4_SEMANTIC_ROLES": 14, + "C2_DEPENDENCY_GRAPH": 45, + "C3_ENTRYPOINTS": 10 + } + } + }, + "diagnostics": { + "intent_correct": null, + "target_found": true, + "layers_used": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_sufficient": true, + "answer_mode": "normal", + "router_result": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "EXPLAIN", + "path_scope": [], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_resolution_status": "pending" + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Объясни как работает класс TraceService", + "sub_intent": "EXPLAIN", + "path_scope": [], + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C4_SEMANTIC_ROLES", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 6, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C3_ENTRYPOINTS", + "hit_count": 3, + "empty": false, + "fallback_used": false + } + ], + "empty_layers": [], + "evidence_gate_decision": { + "sufficient": true, + "failure_reasons": [], + "evidence_count": 33 + }, + "failure_reasons": [], + "timings_ms": {} + }, + "rag_rows": [ + { + "path": "src/plba/__init__.py", + "content": "const TraceService\nTraceService = plba.tracing.TraceService", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService", + "span_start": 20, + "span_end": 20, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "259ec03b77b9387ea53f69c77af32791dd29adf6de617ba72dd3f839197342a1", + "qname": "TraceService", + "kind": "const", + "signature": "TraceService = plba.tracing.TraceService", + "parent_symbol_id": null, + "package_or_module": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "const TraceService\nTraceService = app_runtime.tracing.service.TraceService", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService", + "span_start": 14, + "span_end": 14, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "3ccf6212fd7d9730f9df933e2ee7671b65bdae0520577e1a49c6432262842db6", + "qname": "TraceService", + "kind": "const", + "signature": "TraceService = app_runtime.tracing.service.TraceService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/__init__.py", + "content": "const TraceService\nTraceService = app_runtime.tracing.service.TraceService", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService", + "span_start": 2, + "span_end": 2, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "ecd2fab7fa9744b2adca84d3d213f7aadcb7e1da84b9c2764a4ab39c65282b11", + "qname": "TraceService", + "kind": "const", + "signature": "TraceService = app_runtime.tracing.service.TraceService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.tracing.__init__", + "is_test": false, + "blob_sha": "a01dea5f773515aeaae8e6d3431fcb93531a8b577dfa26c2e5db16cd6ae6e4d9", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceService\nTraceService(TraceContextFactory)", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService", + "span_start": 39, + "span_end": 166, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "c2b2b976d99f2c600000b753731b26e0a69adcb4359398b93073590c5d5d04f4", + "qname": "TraceService", + "kind": "class", + "signature": "TraceService(TraceContextFactory)", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/tracing.py", + "content": "const TraceService\nTraceService = app_runtime.tracing.service.TraceService", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService", + "span_start": 1, + "span_end": 1, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "a4556fb3f83c50ea68b94a679786ce802cab7ffd9d7138aad3d6009b2661f425", + "qname": "TraceService", + "kind": "const", + "signature": "TraceService = app_runtime.tracing.service.TraceService", + "parent_symbol_id": null, + "package_or_module": "src.plba.tracing", + "is_test": false, + "blob_sha": "a27e11c716c93c3fcefe6f11b4cc420a6b743e7606606071d7f1aeeccc4e7d45", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "method TraceService.open_context\nopen_context(self)", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService.open_context", + "span_start": 66, + "span_end": 78, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426", + "qname": "TraceService.open_context", + "kind": "method", + "signature": "open_context(self)", + "parent_symbol_id": "TraceService", + "package_or_module": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "method TraceService.create_context\ncreate_context(self)", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService.create_context", + "span_start": 45, + "span_end": 63, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a", + "qname": "TraceService.create_context", + "kind": "method", + "signature": "create_context(self)", + "parent_symbol_id": "TraceService", + "package_or_module": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "method TraceService.current_trace_id\ncurrent_trace_id(self)", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService.current_trace_id", + "span_start": 80, + "span_end": 81, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c", + "qname": "TraceService.current_trace_id", + "kind": "method", + "signature": "current_trace_id(self)", + "parent_symbol_id": "TraceService", + "package_or_module": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceService(TraceContextFactory):\n def __init__(self, transport: TraceTransport | None = None, store: TraceContextStore | None = None) -> None:\n self.transport = transport or NoOpTraceTransport()\n self.store = store or TraceContextStore()\n self._writer = TraceRecordWriter(self.transport)\n\n def create_context(\n self,\n *,\n alias: str,\n parent_id: str | None = None,\n kind: str | None = None,\n attrs: dict[str, Any] | None = None,\n ) -> str:\n record = TraceContextRecord(\n trace_id=uuid4().hex,\n alias=str(alias or \"\"),\n parent_id=parent_id,\n type=kind,\n event_time=utc_now(),\n attrs=dict(attrs or {}),\n )\n self.store.push(record)\n self._writer.write_context(record)\n return record.trace_id\n\n @contextmanager\n def open_context(\n self,\n *,\n alias: str,\n parent_id: str | None = None,\n kind: str | None = None,\n attrs: dict[str, Any] | None = None,\n ) -> Iterator[str]:\n trace_id = self.create_context(alias=alias, parent_id=parent_id, kind=kind, attrs=attrs)\n try:\n yield trace_id\n finally:\n self.store.pop()\n\n def current_trace_id(self) -> str | None:\n return self.store.current_trace_id()\n\n def close_context(self) -> str | None:\n previous = self.store.pop()\n return previous.record.trace_id if previous else None\n\n def step(self, name: str) -> None:\n self.store.set_step(str(name or \"\"))\n\n def info(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"INFO\", message, status, attrs)\n\n def debug(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"DEBUG\", message, status, attrs)\n\n def warning(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"WARNING\", message, status, attrs)\n\n def error(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"ERROR\", message, status, attrs)\n\n def exception(self, message: str, *, status: str = \"failed\", attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"ERROR\", message, status, attrs)\n\n def new_root(self, operation: str) -> TraceContext:\n trace_id = self.create_context(alias=operation, kind=\"operation\", attrs={\"operation\": operation})\n return TraceContext(trace_id=trace_id, span_id=trace_id, attributes={\"operation\": operation})\n\n def child_of(self, parent: TraceContext, operation: str) -> TraceContext:\n trace_id = self.create_context(\n alias=operation,\n parent_id=parent.trace_id,\n kind=\"worker\",\n attrs={\"operation\": operation},\n )\n return TraceContext(\n trace_id=trace_id,\n span_id=trace_id,\n parent_span_id=parent.span_id,\n attributes={\"operation\": operation},\n )\n\n def attach(self, metadata: dict[str, object], context: TraceContext) -> dict[str, object]:\n updated = dict(metadata)\n updated[\"trace_id\"] = context.trace_id\n updated[\"span_id\"] = context.span_id\n updated[\"parent_span_id\"] = context.parent_span_id\n return updated\n\n def resume(self, metadata: dict[str, object], operation: str) -> TraceContext:\n trace_id = str(metadata.get(\"trace_id\") or uuid4().hex)\n span_id = str(metadata.get(\"span_id\") or trace_id)\n parent_id = metadata.get(\"parent_span_id\")\n self.create_context(\n alias=operation,\n parent_id=str(parent_id) if parent_id else None,\n kind=\"worker\",\n attrs=dict(metadata),\n )\n return TraceContext(\n trace_id=trace_id,\n span_id=span_id,\n parent_span_id=str(parent_id) if parent_id else None,\n attributes={\"operation\": operation},\n )\n\n def _write_message(\n self,\n level: TraceLevel,\n message: str,\n status: str | None,\n attrs: dict[str, Any] | None,\n ) -> None:\n active = self.store.current()\n if active is None:\n raise RuntimeError(\"Trace context is not bound. Call create_context() first.\")\n record = TraceLogMessage(\n trace_id=active.record.trace_id,\n step=active.step,\n status=str(status or \"\"),\n message=str(message or \"\"),\n level=level,\n event_time=utc_now(),\n attrs=dict(attrs or {}),\n )\n self._writer.write_message(record)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/tracing/service.py:TraceService", + "span_start": 39, + "span_end": 166, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceManager(TraceService):\n \"\"\"Compatibility alias during the transition from ConfigManager-shaped naming.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/tracing/service.py:TraceManager", + "span_start": 169, + "span_end": 170, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 2, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/__init__.py", + "content": "from app_runtime.contracts.trace import TraceContext, TraceContextRecord, TraceLogMessage, TraceTransport\nfrom app_runtime.tracing.service import TraceManager, TraceService\nfrom app_runtime.tracing.store import ActiveTraceContext, TraceContextStore\nfrom app_runtime.tracing.transport import MySqlTraceTransport, NoOpTraceTransport\n\n__all__ = [\n \"ActiveTraceContext\",\n \"MySqlTraceTransport\",\n \"NoOpTraceTransport\",\n \"TraceContext\",\n \"TraceContextRecord\",\n \"TraceContextStore\",\n \"TraceLogMessage\",\n \"TraceManager\",\n \"TraceService\",\n \"TraceTransport\",\n]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/tracing/__init__.py:1-17", + "span_start": 1, + "span_end": 17, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.tracing.__init__", + "is_test": false, + "blob_sha": "a01dea5f773515aeaae8e6d3431fcb93531a8b577dfa26c2e5db16cd6ae6e4d9", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/__init__.py", + "content": "from plba.bootstrap import create_runtime\nfrom plba.config import ConfigFileLoader, FileConfigProvider\nfrom plba.control import ControlActionSet, ControlChannel, ControlPlaneService, HttpControlChannel\nfrom plba.contracts import (\n ApplicationModule,\n ConfigProvider,\n HealthContributor,\n TraceContext,\n TraceContextRecord,\n TraceLogMessage,\n TraceTransport,\n Worker,\n WorkerHealth,\n WorkerStatus,\n)\nfrom plba.core import ConfigurationManager, RuntimeManager, ServiceContainer\nfrom plba.health import HealthRegistry\nfrom plba.logging import LogManager\nfrom plba.queue import InMemoryTaskQueue\nfrom plba.tracing import MySqlTraceTransport, NoOpTraceTransport, TraceService\nfrom plba.workflow import (\n StepResult,\n WorkflowContext,\n WorkflowDefinition,\n WorkflowEngine,\n WorkflowEngineHooks,\n WorkflowNode,\n WorkflowRuntimeFactory,\n WorkflowStep,\n)\nfrom plba.workers import WorkerSupervisor\n\n__all__ = [\n \"ApplicationModule\",\n \"ConfigFileLoader\",\n \"ConfigProvider\",\n \"ConfigurationManager\",\n \"ControlActionSet\",\n \"ControlChannel\",\n \"ControlPlaneService\",\n \"create_runtime\",\n \"FileConfigProvider\",\n \"HealthContributor\",\n \"HealthRegistry\",\n \"HttpControlChannel\",\n \"InMemoryTaskQueue\",\n \"LogManager\",\n \"MySqlTraceTransport\",\n \"NoOpTraceTransport\",\n \"RuntimeManager\",\n \"ServiceContainer\",\n \"TraceContext\",\n \"TraceContextRecord\",\n \"TraceLogMessage\",\n \"TraceService\",\n \"TraceTransport\",\n \"StepResult\",\n \"Worker\",\n \"WorkerHealth\",\n \"WorkerStatus\",\n \"WorkflowContext\",\n \"WorkflowDefinition\",\n \"WorkflowEngine\",\n \"WorkflowEngineHooks\",\n \"WorkflowNode\",\n \"WorkflowRuntimeFactory\",\n \"WorkflowStep\",\n \"WorkerSupervisor\",\n]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/__init__.py:1-69", + "span_start": 1, + "span_end": 69, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/tracing.py", + "content": "from app_runtime.tracing.service import TraceService\nfrom app_runtime.tracing.transport import MySqlTraceTransport, NoOpTraceTransport\n\n__all__ = [\"MySqlTraceTransport\", \"NoOpTraceTransport\", \"TraceService\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/tracing.py:1-4", + "span_start": 1, + "span_end": 4, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.tracing", + "is_test": false, + "blob_sha": "a27e11c716c93c3fcefe6f11b4cc420a6b743e7606606071d7f1aeeccc4e7d45", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/__init__.py", + "content": "__all__: list[str] = []", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/__init__.py:1-1", + "span_start": 1, + "span_end": 1, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.__init__", + "is_test": false, + "blob_sha": "8eea9df4f6d7b38ca0e39ccc27b04700e3d08dbeec8046d613d22706d19985fa", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/providers.py", + "content": "class FileConfigProvider(ConfigProvider):\n def __init__(self, path: str | Path) -> None:\n self._loader = ConfigFileLoader(path)\n\n @property\n def loader(self) -> ConfigFileLoader:\n return self._loader\n\n def load(self) -> dict[str, Any]:\n config = self._loader.load_sync()\n if not isinstance(config, dict):\n raise TypeError(\"Config root must be a mapping\")\n return dict(config)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/config/providers.py:FileConfigProvider", + "span_start": 10, + "span_end": 22, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.config.providers", + "is_test": false, + "blob_sha": "8c53ca0122d6df6c5763bca15e99434bb4daebd5a618b8fc927e9ae90b022e64", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (13)", + "layer": "C4_SEMANTIC_ROLES", + "title": "TraceService", + "span_start": 39, + "span_end": 166, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 60, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "c2b2b976d99f2c600000b753731b26e0a69adcb4359398b93073590c5d5d04f4", + "symbol_name": "TraceService", + "qname": "TraceService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 13, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/queue/in_memory.py", + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)", + "layer": "C4_SEMANTIC_ROLES", + "title": "InMemoryTaskQueue", + "span_start": 9, + "span_end": 38, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 22, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "2da04cb94544a3bcbf0943a95ad4bdd8710bcafaa32a02fd0e4de2178dcf3533", + "symbol_name": "InMemoryTaskQueue", + "qname": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 9, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "58f0cc001ccda0eee4c6bc32ed83bd05eafd6b6644f1e8b4aa9eed3103db73dc", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "ConfigFileLoader\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (8)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ConfigFileLoader", + "span_start": 11, + "span_end": 48, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 23, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "a8474eca8b6e9dc86ae67ed68b16fa5fb639ef08739c053e7b7195489765667f", + "symbol_name": "ConfigFileLoader", + "qname": "ConfigFileLoader", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 8, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/store.py", + "content": "TraceContextStore\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "TraceContextStore", + "span_start": 15, + "span_end": 52, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b2dad4fbe16ffb11b58deba311c7739955c39d59f291b22181f33e9c8cce4059", + "symbol_name": "TraceContextStore", + "qname": "TraceContextStore", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "d369554f08fc92039c6edd5a2a1e73b23901533e8974459170bbd9347d263dc5", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workers/supervisor.py", + "content": "WorkerSupervisor\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkerSupervisor", + "span_start": 10, + "span_end": 59, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "c17b44e8d9e97d490989b21fa67d7c346cdda8a0472e4c41fb243c8846faa124", + "symbol_name": "WorkerSupervisor", + "qname": "WorkerSupervisor", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "77609d9d5927171cce7fc3a54897c183fd63068710c6362029b700937aae5eee", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.create_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 61, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3b052062067a78aef3302ee1d996897e02a67d1b340397bea4f59fe147c0492a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a", + "dst_ref": "TraceService.create_context", + "resolution": "resolved", + "slice_id": "3b052062067a78aef3302ee1d996897e02a67d1b340397bea4f59fe147c0492a", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.create_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.close_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 84, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "7a9353ef57c9ae5d19b3a0c6ac50fad05e6d21d31bbe1cd1cd07af6332ba6505", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "01e14158dcced7e52d0c8ac84ac7b9a75225c261b6aca6a1d7da802d0994721c", + "dst_ref": "TraceService.close_context", + "resolution": "resolved", + "slice_id": "7a9353ef57c9ae5d19b3a0c6ac50fad05e6d21d31bbe1cd1cd07af6332ba6505", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.close_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "01e14158dcced7e52d0c8ac84ac7b9a75225c261b6aca6a1d7da802d0994721c" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.open_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 78, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a6e13b9ebc4fed84586afd53ed92a4d14757e440873f572b2337d5622ee96031", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426", + "dst_ref": "TraceService.open_context", + "resolution": "resolved", + "slice_id": "a6e13b9ebc4fed84586afd53ed92a4d14757e440873f572b2337d5622ee96031", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.open_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.transport\n -> TraceService.__init__", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 41, + "span_end": 43, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "1e923a93faa05c3c43ca9b19bd047007a8589ccce57d3cc1798ae7f9f200af98", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "dst_ref": "TraceService.__init__", + "resolution": "resolved", + "slice_id": "1e923a93faa05c3c43ca9b19bd047007a8589ccce57d3cc1798ae7f9f200af98", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.transport", + "TraceService.__init__" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.current_trace_id", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 81, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3ea17138634b1190bded77ddb84aa1595124f6519b246f24fc4b02bd62b5cac1", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c", + "dst_ref": "TraceService.current_trace_id", + "resolution": "resolved", + "slice_id": "3ea17138634b1190bded77ddb84aa1595124f6519b246f24fc4b02bd62b5cac1", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.current_trace_id" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.step", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 88, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "9f34c5da9b09fba99df6f6b1bde183a9aeb45111b8218a747c71590c2c9f60f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "c44bfbc66cf747283f30088da3e011a10395031d41e77b74e523c24997f641ca", + "dst_ref": "TraceService.step", + "resolution": "resolved", + "slice_id": "9f34c5da9b09fba99df6f6b1bde183a9aeb45111b8218a747c71590c2c9f60f2", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.step" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "c44bfbc66cf747283f30088da3e011a10395031d41e77b74e523c24997f641ca" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "validation": { + "passed": true, + "action": "return", + "reasons": [] + } + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-explain-trace-service.md b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-explain-trace-service.md new file mode 100644 index 0000000..238b762 --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-explain-trace-service.md @@ -0,0 +1,34 @@ +# plba-v2-explain-trace-service + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: agent_runtime +- mode: full_chain +- passed: True + +## Query +Объясни как работает класс TraceService + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 33, + "llm_answer": "**Класс `TraceService`** предназначен для управления контекстом трассировки в приложении. Его основные функции включают создание нового контекста трассировки, получение текущего идентификатора трассировки и закрытие контекста.\n\n**Ключевые шаги работы класса:**\n1. **Инициализация:** При создании экземпляра `TraceService` задаются транспорт и хранилище контекста трассировки (по умолчанию используются заглушки).\n2. **Создание контекста:** Метод `create_context` создает новый контекст трассировки с заданными параметрами (идентификатор, родительский идентификатор, тип и атрибуты). Контекст сохраняется в хранилище.\n3. **Получение текущего идентификатора:** Метод `current_trace_id` возвращает текущий идентификатор трассировки.\n4. **Открытие контекста:** Метод `open_context` открывает новый контекст трассировки.\n5. **Закрытие контекста:** Метод `close_context` завершает текущую трассировку.\n\n**Опорные файлы:**\n- `src/app_runtime/tracing/service.py`: определение и реализация класса `TraceService`.\n- Другие файлы содержат декларации и зависимости, относящиеся к классу.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "TraceService" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-control-plane.json b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-control-plane.json new file mode 100644 index 0000000..17a7e0e --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-control-plane.json @@ -0,0 +1,1303 @@ +{ + "case_id": "plba-v2-find-entrypoints-control-plane", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "agent_runtime", + "mode": "full_chain", + "query": "Найди точки входа HTTP control plane", + "actual": { + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 9, + "llm_answer": "confirmed_entrypoints:\n- src/app_runtime/control/http_app.py:app.post (line range: 38-42)\n- src/app_runtime/control/http_app.py:app.get (line range: 31-34)\n- src/app_runtime/control/http_app.py:app.get (line range: 38-42)", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "HTTP", + "control", + "plane" + ], + "layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "query": "Найди точки входа HTTP control plane", + "router_result": { + "schema_version": "1.1", + "intent": "CODE_QA", + "retrieval_profile": "code", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query_plan": { + "raw": "Найди точки входа HTTP control plane", + "normalized": "Найди точки входа HTTP control plane", + "sub_intent": "FIND_ENTRYPOINTS", + "negations": [], + "expansions": [ + "HTTP", + "control", + "plane" + ], + "keyword_hints": [ + "HTTP", + "control", + "plane" + ], + "path_hints": [], + "doc_scope_hints": [], + "symbol_candidates": [ + "HTTP", + "control", + "plane" + ], + "symbol_kind_hint": "class", + "anchors": [ + { + "type": "SYMBOL", + "value": "HTTP", + "source": "user_text", + "subtype": null, + "span": { + "start": 18, + "end": 22 + }, + "confidence": 0.88 + }, + { + "type": "SYMBOL", + "value": "control", + "source": "user_text", + "subtype": null, + "span": { + "start": 23, + "end": 30 + }, + "confidence": 0.88 + }, + { + "type": "SYMBOL", + "value": "plane", + "source": "user_text", + "subtype": null, + "span": { + "start": 31, + "end": 36 + }, + "confidence": 0.88 + } + ] + }, + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C3_ENTRYPOINTS", + "top_k": 12 + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 6 + } + ], + "filters": { + "test_policy": "EXCLUDE", + "path_scope": [], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + }, + "symbol_resolution": { + "status": "pending", + "resolved_symbol": null, + "alternatives": [ + "HTTP", + "control", + "plane" + ], + "confidence": 0.0 + }, + "evidence_policy": { + "require_def": true, + "require_flow": true, + "require_spec": false, + "allow_answer_without_evidence": false + } + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Найди точки входа HTTP control plane", + "sub_intent": "FIND_ENTRYPOINTS", + "path_scope": [], + "keyword_hints": [ + "HTTP", + "control", + "plane" + ], + "symbol_candidates": [ + "HTTP", + "control", + "plane" + ], + "requested_layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ], + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C3_ENTRYPOINTS", + "top_k": 12 + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 6 + } + ], + "filters": { + "test_policy": "EXCLUDE", + "path_scope": [], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + }, + "query_plan": { + "raw": "Найди точки входа HTTP control plane", + "normalized": "Найди точки входа HTTP control plane", + "sub_intent": "FIND_ENTRYPOINTS", + "negations": [], + "expansions": [ + "HTTP", + "control", + "plane" + ], + "keyword_hints": [ + "HTTP", + "control", + "plane" + ], + "path_hints": [], + "doc_scope_hints": [], + "symbol_candidates": [ + "HTTP", + "control", + "plane" + ], + "symbol_kind_hint": "class", + "anchors": [ + { + "type": "SYMBOL", + "value": "HTTP", + "source": "user_text", + "subtype": null, + "span": { + "start": 18, + "end": 22 + }, + "confidence": 0.88 + }, + { + "type": "SYMBOL", + "value": "control", + "source": "user_text", + "subtype": null, + "span": { + "start": 23, + "end": 30 + }, + "confidence": 0.88 + }, + { + "type": "SYMBOL", + "value": "plane", + "source": "user_text", + "subtype": null, + "span": { + "start": 31, + "end": 36 + }, + "confidence": 0.88 + } + ] + } + }, + "retrieval_result": { + "target_symbol_candidates": [], + "resolved_symbol": null, + "symbol_resolution_status": "not_found", + "file_candidates": [ + "src/app_runtime/control/http_app.py", + "src/app_runtime/control/http_channel.py", + "src/app_runtime/control/base.py", + "src/app_runtime/control/__init__.py", + "src/app_runtime/control/http_runner.py" + ], + "code_chunks": [ + { + "layer": "C3_ENTRYPOINTS", + "path": "src/app_runtime/control/http_app.py", + "title": "app.post", + "content": "fastapi http app.post", + "start_line": 38, + "end_line": 42, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C3_ENTRYPOINTS", + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "content": "fastapi http app.get", + "start_line": 31, + "end_line": 34, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C3_ENTRYPOINTS", + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "content": "fastapi http app.get", + "start_line": 38, + "end_line": 42, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/http_channel.py", + "title": "src/app_runtime/control/http_channel.py:HttpControlChannel", + "content": "class HttpControlChannel(ControlChannel):\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._timeout = timeout\n self._runner = UvicornThreadRunner(host, port, timeout)\n self._factory = HttpControlAppFactory()\n self._actions: ControlActionSet | None = None\n\n async def start(self, actions: ControlActionSet) -> None:\n self._actions = actions\n app = self._factory.create(self._health_response, self._action_response)\n await self._runner.start(app)\n\n async def stop(self) -> None:\n await self._runner.stop()\n\n @property\n def port(self) -> int:\n return self._runner.port\n\n async def _health_response(self) -> dict[str, object]:\n if self._actions is None:\n return {\"status\": \"unhealthy\", \"detail\": \"control actions are not configured\"}\n return await asyncio.wait_for(self._actions.health(), timeout=float(self._timeout))\n\n async def _action_response(self, action: str, _client_source: str = \"unknown\") -> JSONResponse:\n if self._actions is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"{action} handler is not configured\"}, status_code=404)\n callbacks = {\n \"start\": self._actions.start,\n \"stop\": self._actions.stop,\n \"status\": self._actions.status,\n }\n callback = callbacks.get(action)\n if callback is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"unsupported action: {action}\"}, status_code=404)\n action_timeout = max(float(self._timeout), 10.0) if action in {\"start\", \"stop\"} else float(self._timeout)\n try:\n detail = await asyncio.wait_for(callback(), timeout=action_timeout)\n except asyncio.TimeoutError:\n return JSONResponse(\n content={\"status\": \"accepted\", \"detail\": f\"{action} operation is still in progress\"},\n status_code=202,\n )\n except Exception as exc:\n return JSONResponse(content={\"status\": \"error\", \"detail\": str(exc)}, status_code=500)\n return JSONResponse(content={\"status\": \"ok\", \"detail\": detail or f\"{action} action accepted\"}, status_code=200)", + "start_line": 12, + "end_line": 57, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/http_app.py", + "title": "src/app_runtime/control/http_app.py:HttpControlAppFactory", + "content": "class HttpControlAppFactory:\n def create(\n self,\n health_provider: Callable[[], Awaitable[HealthPayload]],\n action_provider: Callable[[str, str], Awaitable[JSONResponse]],\n ) -> FastAPI:\n app = FastAPI(title=\"PLBA Control API\")\n\n @app.middleware(\"http\")\n async def log_api_call(request: Request, call_next): # type: ignore[no-untyped-def]\n started = time.monotonic()\n response = await call_next(request)\n response.headers[\"X-Response-Time-Ms\"] = str(int((time.monotonic() - started) * 1000))\n return response\n\n @app.get(\"/health\")\n async def health() -> JSONResponse:\n payload = await health_provider()\n status_code = 200 if payload.get(\"status\") == \"ok\" else 503\n return JSONResponse(content=payload, status_code=status_code)\n\n @app.get(\"/actions/{action}\")\n @app.post(\"/actions/{action}\")\n async def action(action: str, request: Request) -> JSONResponse:\n client_source = self._client_source(request)\n if action in {\"start\", \"stop\"}:\n LOGGER.warning(\"Control action requested: /actions/%s client=%s\", action, client_source)\n return await action_provider(action, client_source)\n\n return app\n\n def _client_source(self, request: Request) -> str:\n explicit_header = request.headers.get(\"X-Client-Source\", \"\").strip()\n if explicit_header:\n return explicit_header\n user_agent = request.headers.get(\"User-Agent\", \"\").strip()\n if user_agent:\n return f\"user-agent:{user_agent}\"\n return \"unknown\"", + "start_line": 15, + "end_line": 53, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/base.py", + "title": "src/app_runtime/control/base.py:ControlActionSet", + "content": "class ControlActionSet:\n health: HealthHandler\n start: ActionHandler\n stop: ActionHandler\n status: ActionHandler", + "start_line": 14, + "end_line": 18, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/__init__.py", + "title": "src/app_runtime/control/__init__.py:1-5", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\"ControlActionSet\", \"ControlChannel\", \"ControlPlaneService\", \"HttpControlChannel\"]", + "start_line": 1, + "end_line": 5, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/base.py", + "title": "src/app_runtime/control/base.py:ControlChannel", + "content": "class ControlChannel(ABC):\n @abstractmethod\n async def start(self, actions: ControlActionSet) -> None:\n \"\"\"Start the control channel and bind handlers.\"\"\"\n\n @abstractmethod\n async def stop(self) -> None:\n \"\"\"Stop the control channel and release resources.\"\"\"", + "start_line": 21, + "end_line": 28, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/http_runner.py", + "title": "src/app_runtime/control/http_runner.py:UvicornThreadRunner", + "content": "class UvicornThreadRunner:\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._host = host\n self._port = port\n self._timeout = timeout\n self._server: Server | None = None\n self._thread: Thread | None = None\n self._error: BaseException | None = None\n\n async def start(self, app: FastAPI) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._error = None\n config = Config(app=app, host=self._host, port=self._port, log_level=\"warning\")\n self._server = Server(config)\n self._thread = Thread(target=self._serve, name=\"plba-http-control\", daemon=True)\n self._thread.start()\n await self._wait_until_started()\n\n async def stop(self) -> None:\n if self._server is None or self._thread is None:\n return\n self._server.should_exit = True\n await asyncio.to_thread(self._thread.join, self._timeout)\n self._server = None\n self._thread = None\n\n @property\n def port(self) -> int:\n if self._server is None or not getattr(self._server, \"servers\", None):\n return self._port\n socket = self._server.servers[0].sockets[0]\n return int(socket.getsockname()[1])\n\n async def _wait_until_started(self) -> None:\n if self._server is None:\n raise RuntimeError(\"Server is not initialized\")\n deadline = asyncio.get_running_loop().time() + max(float(self._timeout), 1.0)\n while not self._server.started:\n if self._error is not None:\n raise RuntimeError(\"HTTP control server failed to start\") from self._error\n if asyncio.get_running_loop().time() >= deadline:\n raise TimeoutError(\"HTTP control server startup timed out\")\n await asyncio.sleep(0.05)\n\n def _serve(self) -> None:\n if self._server is None:\n return\n try:\n asyncio.run(self._server.serve())\n except BaseException as exc: # noqa: BLE001\n self._error = exc", + "start_line": 10, + "end_line": 61, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_runner", + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "relations": [], + "entrypoints": [ + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.post", + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "test_candidates": [], + "layer_outcomes": [ + { + "layer_id": "C3_ENTRYPOINTS", + "hit_count": 3, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 6, + "empty": false, + "fallback_used": false + } + ], + "missing_layers": [], + "raw_rows": [ + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": null, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": null, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": null, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel(ControlChannel):\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._timeout = timeout\n self._runner = UvicornThreadRunner(host, port, timeout)\n self._factory = HttpControlAppFactory()\n self._actions: ControlActionSet | None = None\n\n async def start(self, actions: ControlActionSet) -> None:\n self._actions = actions\n app = self._factory.create(self._health_response, self._action_response)\n await self._runner.start(app)\n\n async def stop(self) -> None:\n await self._runner.stop()\n\n @property\n def port(self) -> int:\n return self._runner.port\n\n async def _health_response(self) -> dict[str, object]:\n if self._actions is None:\n return {\"status\": \"unhealthy\", \"detail\": \"control actions are not configured\"}\n return await asyncio.wait_for(self._actions.health(), timeout=float(self._timeout))\n\n async def _action_response(self, action: str, _client_source: str = \"unknown\") -> JSONResponse:\n if self._actions is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"{action} handler is not configured\"}, status_code=404)\n callbacks = {\n \"start\": self._actions.start,\n \"stop\": self._actions.stop,\n \"status\": self._actions.status,\n }\n callback = callbacks.get(action)\n if callback is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"unsupported action: {action}\"}, status_code=404)\n action_timeout = max(float(self._timeout), 10.0) if action in {\"start\", \"stop\"} else float(self._timeout)\n try:\n detail = await asyncio.wait_for(callback(), timeout=action_timeout)\n except asyncio.TimeoutError:\n return JSONResponse(\n content={\"status\": \"accepted\", \"detail\": f\"{action} operation is still in progress\"},\n status_code=202,\n )\n except Exception as exc:\n return JSONResponse(content={\"status\": \"error\", \"detail\": str(exc)}, status_code=500)\n return JSONResponse(content={\"status\": \"ok\", \"detail\": detail or f\"{action} action accepted\"}, status_code=200)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_channel.py:HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "class HttpControlAppFactory:\n def create(\n self,\n health_provider: Callable[[], Awaitable[HealthPayload]],\n action_provider: Callable[[str, str], Awaitable[JSONResponse]],\n ) -> FastAPI:\n app = FastAPI(title=\"PLBA Control API\")\n\n @app.middleware(\"http\")\n async def log_api_call(request: Request, call_next): # type: ignore[no-untyped-def]\n started = time.monotonic()\n response = await call_next(request)\n response.headers[\"X-Response-Time-Ms\"] = str(int((time.monotonic() - started) * 1000))\n return response\n\n @app.get(\"/health\")\n async def health() -> JSONResponse:\n payload = await health_provider()\n status_code = 200 if payload.get(\"status\") == \"ok\" else 503\n return JSONResponse(content=payload, status_code=status_code)\n\n @app.get(\"/actions/{action}\")\n @app.post(\"/actions/{action}\")\n async def action(action: str, request: Request) -> JSONResponse:\n client_source = self._client_source(request)\n if action in {\"start\", \"stop\"}:\n LOGGER.warning(\"Control action requested: /actions/%s client=%s\", action, client_source)\n return await action_provider(action, client_source)\n\n return app\n\n def _client_source(self, request: Request) -> str:\n explicit_header = request.headers.get(\"X-Client-Source\", \"\").strip()\n if explicit_header:\n return explicit_header\n user_agent = request.headers.get(\"User-Agent\", \"\").strip()\n if user_agent:\n return f\"user-agent:{user_agent}\"\n return \"unknown\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_app.py:HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlActionSet:\n health: HealthHandler\n start: ActionHandler\n stop: ActionHandler\n status: ActionHandler", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\"ControlActionSet\", \"ControlChannel\", \"ControlPlaneService\", \"HttpControlChannel\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/__init__.py:1-5", + "span_start": 1, + "span_end": 5, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlChannel(ABC):\n @abstractmethod\n async def start(self, actions: ControlActionSet) -> None:\n \"\"\"Start the control channel and bind handlers.\"\"\"\n\n @abstractmethod\n async def stop(self) -> None:\n \"\"\"Stop the control channel and release resources.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "class UvicornThreadRunner:\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._host = host\n self._port = port\n self._timeout = timeout\n self._server: Server | None = None\n self._thread: Thread | None = None\n self._error: BaseException | None = None\n\n async def start(self, app: FastAPI) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._error = None\n config = Config(app=app, host=self._host, port=self._port, log_level=\"warning\")\n self._server = Server(config)\n self._thread = Thread(target=self._serve, name=\"plba-http-control\", daemon=True)\n self._thread.start()\n await self._wait_until_started()\n\n async def stop(self) -> None:\n if self._server is None or self._thread is None:\n return\n self._server.should_exit = True\n await asyncio.to_thread(self._thread.join, self._timeout)\n self._server = None\n self._thread = None\n\n @property\n def port(self) -> int:\n if self._server is None or not getattr(self._server, \"servers\", None):\n return self._port\n socket = self._server.servers[0].sockets[0]\n return int(socket.getsockname()[1])\n\n async def _wait_until_started(self) -> None:\n if self._server is None:\n raise RuntimeError(\"Server is not initialized\")\n deadline = asyncio.get_running_loop().time() + max(float(self._timeout), 1.0)\n while not self._server.started:\n if self._error is not None:\n raise RuntimeError(\"HTTP control server failed to start\") from self._error\n if asyncio.get_running_loop().time() >= deadline:\n raise TimeoutError(\"HTTP control server startup timed out\")\n await asyncio.sleep(0.05)\n\n def _serve(self) -> None:\n if self._server is None:\n return\n try:\n asyncio.run(self._server.serve())\n except BaseException as exc: # noqa: BLE001\n self._error = exc", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_runner.py:UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_runner", + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "retrieval_report": { + "executed_layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C3_ENTRYPOINTS": "vector", + "C0_SOURCE_CHUNKS": "vector" + }, + "top_k_by_layer": { + "C3_ENTRYPOINTS": 12, + "C0_SOURCE_CHUNKS": 6 + }, + "filters_by_layer": { + "C3_ENTRYPOINTS": { + "path_scope": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [] + } + }, + "fallback": { + "used": false, + "reason": null + }, + "retrieval_by_layer_ms": { + "C3_ENTRYPOINTS": 11, + "C0_SOURCE_CHUNKS": 20 + } + } + }, + "diagnostics": { + "intent_correct": null, + "target_found": true, + "layers_used": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ], + "retrieval_sufficient": true, + "answer_mode": "normal", + "router_result": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "FIND_ENTRYPOINTS", + "path_scope": [], + "layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ], + "symbol_resolution_status": "pending" + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Найди точки входа HTTP control plane", + "sub_intent": "FIND_ENTRYPOINTS", + "path_scope": [], + "requested_layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "C3_ENTRYPOINTS", + "hit_count": 3, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 6, + "empty": false, + "fallback_used": false + } + ], + "empty_layers": [], + "evidence_gate_decision": { + "sufficient": true, + "failure_reasons": [], + "evidence_count": 9 + }, + "failure_reasons": [], + "timings_ms": {} + }, + "rag_rows": [ + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel(ControlChannel):\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._timeout = timeout\n self._runner = UvicornThreadRunner(host, port, timeout)\n self._factory = HttpControlAppFactory()\n self._actions: ControlActionSet | None = None\n\n async def start(self, actions: ControlActionSet) -> None:\n self._actions = actions\n app = self._factory.create(self._health_response, self._action_response)\n await self._runner.start(app)\n\n async def stop(self) -> None:\n await self._runner.stop()\n\n @property\n def port(self) -> int:\n return self._runner.port\n\n async def _health_response(self) -> dict[str, object]:\n if self._actions is None:\n return {\"status\": \"unhealthy\", \"detail\": \"control actions are not configured\"}\n return await asyncio.wait_for(self._actions.health(), timeout=float(self._timeout))\n\n async def _action_response(self, action: str, _client_source: str = \"unknown\") -> JSONResponse:\n if self._actions is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"{action} handler is not configured\"}, status_code=404)\n callbacks = {\n \"start\": self._actions.start,\n \"stop\": self._actions.stop,\n \"status\": self._actions.status,\n }\n callback = callbacks.get(action)\n if callback is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"unsupported action: {action}\"}, status_code=404)\n action_timeout = max(float(self._timeout), 10.0) if action in {\"start\", \"stop\"} else float(self._timeout)\n try:\n detail = await asyncio.wait_for(callback(), timeout=action_timeout)\n except asyncio.TimeoutError:\n return JSONResponse(\n content={\"status\": \"accepted\", \"detail\": f\"{action} operation is still in progress\"},\n status_code=202,\n )\n except Exception as exc:\n return JSONResponse(content={\"status\": \"error\", \"detail\": str(exc)}, status_code=500)\n return JSONResponse(content={\"status\": \"ok\", \"detail\": detail or f\"{action} action accepted\"}, status_code=200)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_channel.py:HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "class HttpControlAppFactory:\n def create(\n self,\n health_provider: Callable[[], Awaitable[HealthPayload]],\n action_provider: Callable[[str, str], Awaitable[JSONResponse]],\n ) -> FastAPI:\n app = FastAPI(title=\"PLBA Control API\")\n\n @app.middleware(\"http\")\n async def log_api_call(request: Request, call_next): # type: ignore[no-untyped-def]\n started = time.monotonic()\n response = await call_next(request)\n response.headers[\"X-Response-Time-Ms\"] = str(int((time.monotonic() - started) * 1000))\n return response\n\n @app.get(\"/health\")\n async def health() -> JSONResponse:\n payload = await health_provider()\n status_code = 200 if payload.get(\"status\") == \"ok\" else 503\n return JSONResponse(content=payload, status_code=status_code)\n\n @app.get(\"/actions/{action}\")\n @app.post(\"/actions/{action}\")\n async def action(action: str, request: Request) -> JSONResponse:\n client_source = self._client_source(request)\n if action in {\"start\", \"stop\"}:\n LOGGER.warning(\"Control action requested: /actions/%s client=%s\", action, client_source)\n return await action_provider(action, client_source)\n\n return app\n\n def _client_source(self, request: Request) -> str:\n explicit_header = request.headers.get(\"X-Client-Source\", \"\").strip()\n if explicit_header:\n return explicit_header\n user_agent = request.headers.get(\"User-Agent\", \"\").strip()\n if user_agent:\n return f\"user-agent:{user_agent}\"\n return \"unknown\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_app.py:HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlActionSet:\n health: HealthHandler\n start: ActionHandler\n stop: ActionHandler\n status: ActionHandler", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\"ControlActionSet\", \"ControlChannel\", \"ControlPlaneService\", \"HttpControlChannel\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/__init__.py:1-5", + "span_start": 1, + "span_end": 5, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlChannel(ABC):\n @abstractmethod\n async def start(self, actions: ControlActionSet) -> None:\n \"\"\"Start the control channel and bind handlers.\"\"\"\n\n @abstractmethod\n async def stop(self) -> None:\n \"\"\"Stop the control channel and release resources.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "class UvicornThreadRunner:\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._host = host\n self._port = port\n self._timeout = timeout\n self._server: Server | None = None\n self._thread: Thread | None = None\n self._error: BaseException | None = None\n\n async def start(self, app: FastAPI) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._error = None\n config = Config(app=app, host=self._host, port=self._port, log_level=\"warning\")\n self._server = Server(config)\n self._thread = Thread(target=self._serve, name=\"plba-http-control\", daemon=True)\n self._thread.start()\n await self._wait_until_started()\n\n async def stop(self) -> None:\n if self._server is None or self._thread is None:\n return\n self._server.should_exit = True\n await asyncio.to_thread(self._thread.join, self._timeout)\n self._server = None\n self._thread = None\n\n @property\n def port(self) -> int:\n if self._server is None or not getattr(self._server, \"servers\", None):\n return self._port\n socket = self._server.servers[0].sockets[0]\n return int(socket.getsockname()[1])\n\n async def _wait_until_started(self) -> None:\n if self._server is None:\n raise RuntimeError(\"Server is not initialized\")\n deadline = asyncio.get_running_loop().time() + max(float(self._timeout), 1.0)\n while not self._server.started:\n if self._error is not None:\n raise RuntimeError(\"HTTP control server failed to start\") from self._error\n if asyncio.get_running_loop().time() >= deadline:\n raise TimeoutError(\"HTTP control server startup timed out\")\n await asyncio.sleep(0.05)\n\n def _serve(self) -> None:\n if self._server is None:\n return\n try:\n asyncio.run(self._server.serve())\n except BaseException as exc: # noqa: BLE001\n self._error = exc", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_runner.py:UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_runner", + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "validation": { + "passed": true, + "action": "return", + "reasons": [] + } + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-control-plane.md b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-control-plane.md new file mode 100644 index 0000000..a27500c --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-control-plane.md @@ -0,0 +1,33 @@ +# plba-v2-find-entrypoints-control-plane + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: agent_runtime +- mode: full_chain +- passed: True + +## Query +Найди точки входа HTTP control plane + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 9, + "llm_answer": "confirmed_entrypoints:\n- src/app_runtime/control/http_app.py:app.post (line range: 38-42)\n- src/app_runtime/control/http_app.py:app.get (line range: 31-34)\n- src/app_runtime/control/http_app.py:app.get (line range: 38-42)", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "HTTP", + "control", + "plane" + ], + "layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-health-endpoint.json b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-health-endpoint.json new file mode 100644 index 0000000..4c8ea75 --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-health-endpoint.json @@ -0,0 +1,1274 @@ +{ + "case_id": "plba-v2-find-entrypoints-health-endpoint", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "agent_runtime", + "mode": "full_chain", + "query": "Где health endpoint?", + "actual": { + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 9, + "llm_answer": "health endpoint: \n- src/app_runtime/control/http_app.py:38-42 (app.post)\n- src/app_runtime/control/http_app.py:31-34 (app.get)", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "health", + "endpoint" + ], + "layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ] + }, + "passed": false, + "mismatches": [ + "llm: expected answer to contain 'GET /health'" + ], + "details": { + "query": "Где health endpoint?", + "router_result": { + "schema_version": "1.1", + "intent": "CODE_QA", + "retrieval_profile": "code", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query_plan": { + "raw": "Где health endpoint?", + "normalized": "Где health endpoint?", + "sub_intent": "FIND_ENTRYPOINTS", + "negations": [], + "expansions": [ + "health", + "endpoint" + ], + "keyword_hints": [ + "health", + "endpoint" + ], + "path_hints": [], + "doc_scope_hints": [], + "symbol_candidates": [ + "health", + "endpoint" + ], + "symbol_kind_hint": "unknown", + "anchors": [ + { + "type": "SYMBOL", + "value": "health", + "source": "user_text", + "subtype": null, + "span": { + "start": 4, + "end": 10 + }, + "confidence": 0.88 + }, + { + "type": "SYMBOL", + "value": "endpoint", + "source": "user_text", + "subtype": null, + "span": { + "start": 11, + "end": 19 + }, + "confidence": 0.88 + } + ] + }, + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C3_ENTRYPOINTS", + "top_k": 12 + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 6 + } + ], + "filters": { + "test_policy": "EXCLUDE", + "path_scope": [], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + }, + "symbol_resolution": { + "status": "pending", + "resolved_symbol": null, + "alternatives": [ + "health", + "endpoint" + ], + "confidence": 0.0 + }, + "evidence_policy": { + "require_def": true, + "require_flow": true, + "require_spec": false, + "allow_answer_without_evidence": false + } + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Где health endpoint?", + "sub_intent": "FIND_ENTRYPOINTS", + "path_scope": [], + "keyword_hints": [ + "health", + "endpoint" + ], + "symbol_candidates": [ + "health", + "endpoint" + ], + "requested_layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ], + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C3_ENTRYPOINTS", + "top_k": 12 + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 6 + } + ], + "filters": { + "test_policy": "EXCLUDE", + "path_scope": [], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + }, + "query_plan": { + "raw": "Где health endpoint?", + "normalized": "Где health endpoint?", + "sub_intent": "FIND_ENTRYPOINTS", + "negations": [], + "expansions": [ + "health", + "endpoint" + ], + "keyword_hints": [ + "health", + "endpoint" + ], + "path_hints": [], + "doc_scope_hints": [], + "symbol_candidates": [ + "health", + "endpoint" + ], + "symbol_kind_hint": "unknown", + "anchors": [ + { + "type": "SYMBOL", + "value": "health", + "source": "user_text", + "subtype": null, + "span": { + "start": 4, + "end": 10 + }, + "confidence": 0.88 + }, + { + "type": "SYMBOL", + "value": "endpoint", + "source": "user_text", + "subtype": null, + "span": { + "start": 11, + "end": 19 + }, + "confidence": 0.88 + } + ] + } + }, + "retrieval_result": { + "target_symbol_candidates": [], + "resolved_symbol": null, + "symbol_resolution_status": "not_found", + "file_candidates": [ + "src/app_runtime/control/http_app.py", + "src/app_runtime/health/registry.py", + "src/plba/health.py", + "src/app_runtime/contracts/health.py", + "src/app_runtime/health/__init__.py", + "src/app_runtime/contracts/worker.py" + ], + "code_chunks": [ + { + "layer": "C3_ENTRYPOINTS", + "path": "src/app_runtime/control/http_app.py", + "title": "app.post", + "content": "fastapi http app.post", + "start_line": 38, + "end_line": 42, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C3_ENTRYPOINTS", + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "content": "fastapi http app.get", + "start_line": 31, + "end_line": 34, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C3_ENTRYPOINTS", + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "content": "fastapi http app.get", + "start_line": 38, + "end_line": 42, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/health/registry.py", + "title": "src/app_runtime/health/registry.py:HealthRegistry", + "content": "class HealthRegistry:\n def __init__(self) -> None:\n self._contributors: list[HealthContributor] = []\n\n def register(self, contributor: HealthContributor) -> None:\n self._contributors.append(contributor)\n\n def contributor_healths(self) -> list[WorkerHealth]:\n return [contributor.health() for contributor in self._contributors]\n\n def snapshot(self, worker_healths: list[WorkerHealth]) -> dict[str, object]:\n component_healths = worker_healths + self.contributor_healths()\n return {\n \"status\": self._aggregate_status(component_healths),\n \"components\": [self._health_dict(item) for item in component_healths],\n }\n\n def payload(self, state: LifecycleState, worker_healths: list[WorkerHealth]) -> HealthPayload:\n component_healths = worker_healths + self.contributor_healths()\n if state == LifecycleState.STOPPED:\n return {\"status\": \"unhealthy\", \"detail\": \"state=stopped\", \"state\": state.value}\n if state in {LifecycleState.STARTING, LifecycleState.STOPPING}:\n return {\n \"status\": \"degraded\",\n \"detail\": f\"state={state.value}\",\n \"state\": state.value,\n \"components\": [self._health_dict(item) for item in component_healths],\n }\n return {\n \"status\": self._aggregate_status(component_healths),\n \"state\": state.value,\n \"components\": [self._health_dict(item) for item in component_healths],\n }\n\n def _aggregate_status(self, component_healths: list[WorkerHealth]) -> str:\n if any(item.status == \"unhealthy\" and item.critical for item in component_healths):\n return \"unhealthy\"\n if any(item.status in {\"degraded\", \"unhealthy\"} for item in component_healths):\n return \"degraded\"\n return \"ok\"\n\n def _health_dict(self, health: WorkerHealth) -> dict[str, object]:\n return {\n \"name\": health.name,\n \"status\": health.status,\n \"critical\": health.critical,\n \"detail\": health.detail,\n \"meta\": health.meta,\n }", + "start_line": 8, + "end_line": 56, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.health.registry", + "is_test": false, + "blob_sha": "26e6a24daa43407ba5340b74497c20153020e79f8d7828ae502aaec378dfcf75", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/plba/health.py", + "title": "src/app_runtime/health/__init__.py:1-3", + "content": "from app_runtime.health.registry import HealthRegistry\n\n__all__ = [\"HealthRegistry\"]", + "start_line": 1, + "end_line": 3, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.health.__init__", + "is_test": false, + "blob_sha": "f7b15eed8b1f1cca8dfd467909a2612d8cb4e66e46b972ad89a0c9459ce283a0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/contracts/health.py", + "title": "src/app_runtime/contracts/health.py:HealthContributor", + "content": "class HealthContributor(ABC):\n @abstractmethod\n def health(self) -> WorkerHealth:\n \"\"\"Return contributor health state.\"\"\"", + "start_line": 7, + "end_line": 10, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.health", + "is_test": false, + "blob_sha": "6bd92611def7131e32d4dd34a8ed85e6cf3c67722ad27797032a632cb30dc097", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/health/__init__.py", + "title": "src/app_runtime/health/__init__.py:1-3", + "content": "from app_runtime.health.registry import HealthRegistry\n\n__all__ = [\"HealthRegistry\"]", + "start_line": 1, + "end_line": 3, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.health.__init__", + "is_test": false, + "blob_sha": "f7b15eed8b1f1cca8dfd467909a2612d8cb4e66e46b972ad89a0c9459ce283a0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/contracts/worker.py", + "title": "src/app_runtime/contracts/worker.py:WorkerHealth", + "content": "class WorkerHealth:\n name: str\n status: HealthState\n critical: bool\n detail: str | None = None\n meta: dict[str, Any] = field(default_factory=dict)", + "start_line": 13, + "end_line": 18, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.worker", + "is_test": false, + "blob_sha": "e4827d32220f322d8adc3e42769da3ca0cc680db6a5eab7a11f4d8773a75304e", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/contracts/worker.py", + "title": "src/app_runtime/contracts/worker.py:Worker", + "content": "class Worker(ABC):\n @property\n @abstractmethod\n def name(self) -> str:\n \"\"\"Stable worker name for diagnostics.\"\"\"\n\n @property\n @abstractmethod\n def critical(self) -> bool:\n \"\"\"Whether this worker is required for healthy app operation.\"\"\"\n\n @abstractmethod\n def start(self) -> None:\n \"\"\"Start worker execution.\"\"\"\n\n @abstractmethod\n def stop(self, force: bool = False) -> None:\n \"\"\"Request graceful or immediate stop.\"\"\"\n\n @abstractmethod\n def health(self) -> WorkerHealth:\n \"\"\"Return current health state.\"\"\"\n\n @abstractmethod\n def status(self) -> WorkerStatus:\n \"\"\"Return current runtime status.\"\"\"", + "start_line": 30, + "end_line": 55, + "metadata": { + "chunk_index": 2, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.worker", + "is_test": false, + "blob_sha": "e4827d32220f322d8adc3e42769da3ca0cc680db6a5eab7a11f4d8773a75304e", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "relations": [], + "entrypoints": [ + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.post", + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "test_candidates": [], + "layer_outcomes": [ + { + "layer_id": "C3_ENTRYPOINTS", + "hit_count": 3, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 6, + "empty": false, + "fallback_used": false + } + ], + "missing_layers": [], + "raw_rows": [ + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": null, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": null, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": null, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/health/registry.py", + "content": "class HealthRegistry:\n def __init__(self) -> None:\n self._contributors: list[HealthContributor] = []\n\n def register(self, contributor: HealthContributor) -> None:\n self._contributors.append(contributor)\n\n def contributor_healths(self) -> list[WorkerHealth]:\n return [contributor.health() for contributor in self._contributors]\n\n def snapshot(self, worker_healths: list[WorkerHealth]) -> dict[str, object]:\n component_healths = worker_healths + self.contributor_healths()\n return {\n \"status\": self._aggregate_status(component_healths),\n \"components\": [self._health_dict(item) for item in component_healths],\n }\n\n def payload(self, state: LifecycleState, worker_healths: list[WorkerHealth]) -> HealthPayload:\n component_healths = worker_healths + self.contributor_healths()\n if state == LifecycleState.STOPPED:\n return {\"status\": \"unhealthy\", \"detail\": \"state=stopped\", \"state\": state.value}\n if state in {LifecycleState.STARTING, LifecycleState.STOPPING}:\n return {\n \"status\": \"degraded\",\n \"detail\": f\"state={state.value}\",\n \"state\": state.value,\n \"components\": [self._health_dict(item) for item in component_healths],\n }\n return {\n \"status\": self._aggregate_status(component_healths),\n \"state\": state.value,\n \"components\": [self._health_dict(item) for item in component_healths],\n }\n\n def _aggregate_status(self, component_healths: list[WorkerHealth]) -> str:\n if any(item.status == \"unhealthy\" and item.critical for item in component_healths):\n return \"unhealthy\"\n if any(item.status in {\"degraded\", \"unhealthy\"} for item in component_healths):\n return \"degraded\"\n return \"ok\"\n\n def _health_dict(self, health: WorkerHealth) -> dict[str, object]:\n return {\n \"name\": health.name,\n \"status\": health.status,\n \"critical\": health.critical,\n \"detail\": health.detail,\n \"meta\": health.meta,\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/health/registry.py:HealthRegistry", + "span_start": 8, + "span_end": 56, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.health.registry", + "is_test": false, + "blob_sha": "26e6a24daa43407ba5340b74497c20153020e79f8d7828ae502aaec378dfcf75", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/health.py", + "content": "from app_runtime.health.registry import HealthRegistry\n\n__all__ = [\"HealthRegistry\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/health/__init__.py:1-3", + "span_start": 1, + "span_end": 3, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.health.__init__", + "is_test": false, + "blob_sha": "f7b15eed8b1f1cca8dfd467909a2612d8cb4e66e46b972ad89a0c9459ce283a0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/health.py", + "content": "class HealthContributor(ABC):\n @abstractmethod\n def health(self) -> WorkerHealth:\n \"\"\"Return contributor health state.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/contracts/health.py:HealthContributor", + "span_start": 7, + "span_end": 10, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.health", + "is_test": false, + "blob_sha": "6bd92611def7131e32d4dd34a8ed85e6cf3c67722ad27797032a632cb30dc097", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/health/__init__.py", + "content": "from app_runtime.health.registry import HealthRegistry\n\n__all__ = [\"HealthRegistry\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/health/__init__.py:1-3", + "span_start": 1, + "span_end": 3, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.health.__init__", + "is_test": false, + "blob_sha": "f7b15eed8b1f1cca8dfd467909a2612d8cb4e66e46b972ad89a0c9459ce283a0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/worker.py", + "content": "class WorkerHealth:\n name: str\n status: HealthState\n critical: bool\n detail: str | None = None\n meta: dict[str, Any] = field(default_factory=dict)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/contracts/worker.py:WorkerHealth", + "span_start": 13, + "span_end": 18, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.worker", + "is_test": false, + "blob_sha": "e4827d32220f322d8adc3e42769da3ca0cc680db6a5eab7a11f4d8773a75304e", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/worker.py", + "content": "class Worker(ABC):\n @property\n @abstractmethod\n def name(self) -> str:\n \"\"\"Stable worker name for diagnostics.\"\"\"\n\n @property\n @abstractmethod\n def critical(self) -> bool:\n \"\"\"Whether this worker is required for healthy app operation.\"\"\"\n\n @abstractmethod\n def start(self) -> None:\n \"\"\"Start worker execution.\"\"\"\n\n @abstractmethod\n def stop(self, force: bool = False) -> None:\n \"\"\"Request graceful or immediate stop.\"\"\"\n\n @abstractmethod\n def health(self) -> WorkerHealth:\n \"\"\"Return current health state.\"\"\"\n\n @abstractmethod\n def status(self) -> WorkerStatus:\n \"\"\"Return current runtime status.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/contracts/worker.py:Worker", + "span_start": 30, + "span_end": 55, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 2, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.worker", + "is_test": false, + "blob_sha": "e4827d32220f322d8adc3e42769da3ca0cc680db6a5eab7a11f4d8773a75304e", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "retrieval_report": { + "executed_layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C3_ENTRYPOINTS": "vector", + "C0_SOURCE_CHUNKS": "vector" + }, + "top_k_by_layer": { + "C3_ENTRYPOINTS": 12, + "C0_SOURCE_CHUNKS": 6 + }, + "filters_by_layer": { + "C3_ENTRYPOINTS": { + "path_scope": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [] + } + }, + "fallback": { + "used": false, + "reason": null + }, + "retrieval_by_layer_ms": { + "C3_ENTRYPOINTS": 22, + "C0_SOURCE_CHUNKS": 20 + } + } + }, + "diagnostics": { + "intent_correct": null, + "target_found": true, + "layers_used": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ], + "retrieval_sufficient": true, + "answer_mode": "normal", + "router_result": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "FIND_ENTRYPOINTS", + "path_scope": [], + "layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ], + "symbol_resolution_status": "pending" + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Где health endpoint?", + "sub_intent": "FIND_ENTRYPOINTS", + "path_scope": [], + "requested_layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "C3_ENTRYPOINTS", + "hit_count": 3, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 6, + "empty": false, + "fallback_used": false + } + ], + "empty_layers": [], + "evidence_gate_decision": { + "sufficient": true, + "failure_reasons": [], + "evidence_count": 9 + }, + "failure_reasons": [], + "timings_ms": {} + }, + "rag_rows": [ + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/health/registry.py", + "content": "class HealthRegistry:\n def __init__(self) -> None:\n self._contributors: list[HealthContributor] = []\n\n def register(self, contributor: HealthContributor) -> None:\n self._contributors.append(contributor)\n\n def contributor_healths(self) -> list[WorkerHealth]:\n return [contributor.health() for contributor in self._contributors]\n\n def snapshot(self, worker_healths: list[WorkerHealth]) -> dict[str, object]:\n component_healths = worker_healths + self.contributor_healths()\n return {\n \"status\": self._aggregate_status(component_healths),\n \"components\": [self._health_dict(item) for item in component_healths],\n }\n\n def payload(self, state: LifecycleState, worker_healths: list[WorkerHealth]) -> HealthPayload:\n component_healths = worker_healths + self.contributor_healths()\n if state == LifecycleState.STOPPED:\n return {\"status\": \"unhealthy\", \"detail\": \"state=stopped\", \"state\": state.value}\n if state in {LifecycleState.STARTING, LifecycleState.STOPPING}:\n return {\n \"status\": \"degraded\",\n \"detail\": f\"state={state.value}\",\n \"state\": state.value,\n \"components\": [self._health_dict(item) for item in component_healths],\n }\n return {\n \"status\": self._aggregate_status(component_healths),\n \"state\": state.value,\n \"components\": [self._health_dict(item) for item in component_healths],\n }\n\n def _aggregate_status(self, component_healths: list[WorkerHealth]) -> str:\n if any(item.status == \"unhealthy\" and item.critical for item in component_healths):\n return \"unhealthy\"\n if any(item.status in {\"degraded\", \"unhealthy\"} for item in component_healths):\n return \"degraded\"\n return \"ok\"\n\n def _health_dict(self, health: WorkerHealth) -> dict[str, object]:\n return {\n \"name\": health.name,\n \"status\": health.status,\n \"critical\": health.critical,\n \"detail\": health.detail,\n \"meta\": health.meta,\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/health/registry.py:HealthRegistry", + "span_start": 8, + "span_end": 56, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.health.registry", + "is_test": false, + "blob_sha": "26e6a24daa43407ba5340b74497c20153020e79f8d7828ae502aaec378dfcf75", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/health.py", + "content": "from app_runtime.health.registry import HealthRegistry\n\n__all__ = [\"HealthRegistry\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/health/__init__.py:1-3", + "span_start": 1, + "span_end": 3, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.health.__init__", + "is_test": false, + "blob_sha": "f7b15eed8b1f1cca8dfd467909a2612d8cb4e66e46b972ad89a0c9459ce283a0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/health.py", + "content": "class HealthContributor(ABC):\n @abstractmethod\n def health(self) -> WorkerHealth:\n \"\"\"Return contributor health state.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/contracts/health.py:HealthContributor", + "span_start": 7, + "span_end": 10, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.health", + "is_test": false, + "blob_sha": "6bd92611def7131e32d4dd34a8ed85e6cf3c67722ad27797032a632cb30dc097", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/health/__init__.py", + "content": "from app_runtime.health.registry import HealthRegistry\n\n__all__ = [\"HealthRegistry\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/health/__init__.py:1-3", + "span_start": 1, + "span_end": 3, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.health.__init__", + "is_test": false, + "blob_sha": "f7b15eed8b1f1cca8dfd467909a2612d8cb4e66e46b972ad89a0c9459ce283a0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/worker.py", + "content": "class WorkerHealth:\n name: str\n status: HealthState\n critical: bool\n detail: str | None = None\n meta: dict[str, Any] = field(default_factory=dict)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/contracts/worker.py:WorkerHealth", + "span_start": 13, + "span_end": 18, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.worker", + "is_test": false, + "blob_sha": "e4827d32220f322d8adc3e42769da3ca0cc680db6a5eab7a11f4d8773a75304e", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/worker.py", + "content": "class Worker(ABC):\n @property\n @abstractmethod\n def name(self) -> str:\n \"\"\"Stable worker name for diagnostics.\"\"\"\n\n @property\n @abstractmethod\n def critical(self) -> bool:\n \"\"\"Whether this worker is required for healthy app operation.\"\"\"\n\n @abstractmethod\n def start(self) -> None:\n \"\"\"Start worker execution.\"\"\"\n\n @abstractmethod\n def stop(self, force: bool = False) -> None:\n \"\"\"Request graceful or immediate stop.\"\"\"\n\n @abstractmethod\n def health(self) -> WorkerHealth:\n \"\"\"Return current health state.\"\"\"\n\n @abstractmethod\n def status(self) -> WorkerStatus:\n \"\"\"Return current runtime status.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/contracts/worker.py:Worker", + "span_start": 30, + "span_end": 55, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 2, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.worker", + "is_test": false, + "blob_sha": "e4827d32220f322d8adc3e42769da3ca0cc680db6a5eab7a11f4d8773a75304e", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "validation": { + "passed": true, + "action": "return", + "reasons": [] + } + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-health-endpoint.md b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-health-endpoint.md new file mode 100644 index 0000000..9dd7d51 --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-health-endpoint.md @@ -0,0 +1,32 @@ +# plba-v2-find-entrypoints-health-endpoint + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: agent_runtime +- mode: full_chain +- passed: False + +## Query +Где health endpoint? + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 9, + "llm_answer": "health endpoint: \n- src/app_runtime/control/http_app.py:38-42 (app.post)\n- src/app_runtime/control/http_app.py:31-34 (app.get)", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "health", + "endpoint" + ], + "layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- llm: expected answer to contain 'GET /health' \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-find-tests-create-runtime.json b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-find-tests-create-runtime.json new file mode 100644 index 0000000..63cdab9 --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-find-tests-create-runtime.json @@ -0,0 +1,2746 @@ +{ + "case_id": "plba-v2-find-tests-create-runtime", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "agent_runtime", + "mode": "full_chain", + "query": "Где тесты для create_runtime?", + "actual": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 24, + "llm_answer": "- tests/test_runtime.py:342-405 (test_public_plba_package_exports_runtime_builder_and_worker_contract)", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "create_runtime" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "query": "Где тесты для create_runtime?", + "router_result": { + "schema_version": "1.1", + "intent": "CODE_QA", + "retrieval_profile": "code", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query_plan": { + "raw": "Где тесты для create_runtime?", + "normalized": "Где тесты для create_runtime?", + "sub_intent": "FIND_TESTS", + "negations": [], + "expansions": [ + "test", + "unit test", + "create_runtime" + ], + "keyword_hints": [ + "create_runtime" + ], + "path_hints": [], + "doc_scope_hints": [], + "symbol_candidates": [ + "create_runtime" + ], + "symbol_kind_hint": "function", + "anchors": [ + { + "type": "SYMBOL", + "value": "create_runtime", + "source": "user_text", + "subtype": null, + "span": { + "start": 14, + "end": 28 + }, + "confidence": 0.88 + }, + { + "type": "KEY_TERM", + "value": "тест", + "source": "user_text", + "subtype": null, + "span": { + "start": 4, + "end": 9 + }, + "confidence": 0.9 + } + ] + }, + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "top_k": 8 + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "top_k": 6 + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 10 + } + ], + "filters": { + "test_policy": "INCLUDE", + "path_scope": [], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "test_file_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "test_symbol_patterns": [ + "test_create_runtime", + "Testcreate_runtime", + "create_runtime" + ], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + }, + "symbol_resolution": { + "status": "pending", + "resolved_symbol": null, + "alternatives": [ + "create_runtime" + ], + "confidence": 0.0 + }, + "evidence_policy": { + "require_def": true, + "require_flow": true, + "require_spec": false, + "allow_answer_without_evidence": false + } + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Где тесты для create_runtime?", + "sub_intent": "FIND_TESTS", + "path_scope": [], + "keyword_hints": [ + "create_runtime" + ], + "symbol_candidates": [ + "create_runtime" + ], + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "top_k": 8 + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "top_k": 6 + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 10 + } + ], + "filters": { + "test_policy": "INCLUDE", + "path_scope": [], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "test_file_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "test_symbol_patterns": [ + "test_create_runtime", + "Testcreate_runtime", + "create_runtime" + ], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + }, + "query_plan": { + "raw": "Где тесты для create_runtime?", + "normalized": "Где тесты для create_runtime?", + "sub_intent": "FIND_TESTS", + "negations": [], + "expansions": [ + "test", + "unit test", + "create_runtime" + ], + "keyword_hints": [ + "create_runtime" + ], + "path_hints": [], + "doc_scope_hints": [], + "symbol_candidates": [ + "create_runtime" + ], + "symbol_kind_hint": "function", + "anchors": [ + { + "type": "SYMBOL", + "value": "create_runtime", + "source": "user_text", + "subtype": null, + "span": { + "start": 14, + "end": 28 + }, + "confidence": 0.88 + }, + { + "type": "KEY_TERM", + "value": "тест", + "source": "user_text", + "subtype": null, + "span": { + "start": 4, + "end": 9 + }, + "confidence": 0.9 + } + ] + } + }, + "retrieval_result": { + "target_symbol_candidates": [ + "create_runtime", + "FileConfigProvider", + "hashlib", + "json", + "Path", + "Any", + "annotations" + ], + "resolved_symbol": "create_runtime", + "symbol_resolution_status": "resolved", + "file_candidates": [ + "src/plba/__init__.py", + "src/plba/bootstrap.py", + "src/app_runtime/config/__init__.py", + "src/app_runtime/config/file_loader.py", + "tests/test_runtime.py", + "src/app_runtime/config/providers.py", + "src/app_runtime/contracts/__init__.py", + "src/app_runtime/contracts/config.py", + "src/app_runtime/contracts/health.py", + "src/app_runtime/contracts/application.py" + ], + "code_chunks": [ + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/plba/__init__.py", + "title": "create_runtime", + "content": "const create_runtime\ncreate_runtime = plba.bootstrap.create_runtime", + "start_line": 1, + "end_line": 1, + "metadata": { + "symbol_id": "fa1e84f16c8c659bcd5448637386af4d15d431064e07714e34689ee64233cb51", + "qname": "create_runtime", + "kind": "const", + "signature": "create_runtime = plba.bootstrap.create_runtime", + "parent_symbol_id": null, + "package_or_module": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/plba/bootstrap.py", + "title": "create_runtime", + "content": "function create_runtime\ncreate_runtime(module)", + "start_line": 8, + "end_line": 29, + "metadata": { + "symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "qname": "create_runtime", + "kind": "function", + "signature": "create_runtime(module)", + "parent_symbol_id": null, + "package_or_module": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/config/__init__.py", + "title": "FileConfigProvider", + "content": "const FileConfigProvider\nFileConfigProvider = app_runtime.config.providers.FileConfigProvider", + "start_line": 2, + "end_line": 2, + "metadata": { + "symbol_id": "e449b19e5881889adeb6e056eafe1da30acbae864f06984ea2edc7c15f7cb6d6", + "qname": "FileConfigProvider", + "kind": "const", + "signature": "FileConfigProvider = app_runtime.config.providers.FileConfigProvider", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.__init__", + "is_test": false, + "blob_sha": "612918029820a2a983330ec92256142b55b9de4bdf3399ece18e2a02dbad9729", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/config/file_loader.py", + "title": "hashlib", + "content": "const hashlib\nimport hashlib", + "start_line": 3, + "end_line": 3, + "metadata": { + "symbol_id": "e7375824bd473da3d73d316d22e3cb6428930e2db1ffbd900ce5a8b88427bf05", + "qname": "hashlib", + "kind": "const", + "signature": "import hashlib", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/config/file_loader.py", + "title": "json", + "content": "const json\nimport json", + "start_line": 4, + "end_line": 4, + "metadata": { + "symbol_id": "bb9e2eaf992bfd050f7072d72eed87c55b1a4b001daa034a0f7c630a61bb1d78", + "qname": "json", + "kind": "const", + "signature": "import json", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/config/file_loader.py", + "title": "Path", + "content": "const Path\nPath = pathlib.Path", + "start_line": 5, + "end_line": 5, + "metadata": { + "symbol_id": "b785967ed1fb83aa62d5724c6d6e9c6d2b1505523db39bd941cc39b48db48306", + "qname": "Path", + "kind": "const", + "signature": "Path = pathlib.Path", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/config/file_loader.py", + "title": "Any", + "content": "const Any\nAny = typing.Any", + "start_line": 6, + "end_line": 6, + "metadata": { + "symbol_id": "8e330833b8073585db1c4b4315947c400683a23e4c3d2e2ccbcb260f347541b6", + "qname": "Any", + "kind": "const", + "signature": "Any = typing.Any", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/config/file_loader.py", + "title": "annotations", + "content": "const annotations\nannotations = __future__.annotations", + "start_line": 1, + "end_line": 1, + "metadata": { + "symbol_id": "5ed640ccec43a78659d50ec24f3717bf1144a182c22588f37456649ac6a4a815", + "qname": "annotations", + "kind": "const", + "signature": "annotations = __future__.annotations", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/plba/bootstrap.py", + "title": "create_runtime:calls", + "content": "create_runtime calls runtime.add_config_file", + "start_line": 19, + "end_line": 19, + "metadata": { + "edge_id": "4eaeec4ac55a59d5f66fd01c4754955f8fedaf4bc3df13fa769b352c7bfaacbb", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.add_config_file", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/plba/bootstrap.py", + "title": "create_runtime:reads_attr", + "content": "create_runtime reads_attr runtime.register_module", + "start_line": 28, + "end_line": 28, + "metadata": { + "edge_id": "45516c79ff358dbf9b650a081668df0f66d2fe989300f985a1a78be6be166f8f", + "edge_type": "reads_attr", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.register_module", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/plba/bootstrap.py", + "title": "create_runtime:instantiates", + "content": "create_runtime instantiates RuntimeManager", + "start_line": 17, + "end_line": 17, + "metadata": { + "edge_id": "0adba17984f850ea1608c9e734d2dd5c325cfde3a8133123aa239e44935ad18e", + "edge_type": "instantiates", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": "27158ca220022eeb5083c6addf8a50775d45f7161284fd60aac48410105f4b98", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/plba/bootstrap.py", + "title": "create_runtime:calls", + "content": "create_runtime calls runtime.register_module", + "start_line": 28, + "end_line": 28, + "metadata": { + "edge_id": "ab6003c3441addc1ba1b81edeca009165559f652f6b2cf424e5ae61b1f617de8", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.register_module", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/plba/bootstrap.py", + "title": "create_runtime:calls", + "content": "create_runtime calls runtime.control_plane.register_channel", + "start_line": 21, + "end_line": 27, + "metadata": { + "edge_id": "2678250030b9ce47a3b3b55fac7897ac530367edc8374ac9d5e6ecafb1e483f0", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.control_plane.register_channel", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/plba/bootstrap.py", + "title": "create_runtime:reads_attr", + "content": "create_runtime reads_attr runtime.add_config_file", + "start_line": 19, + "end_line": 19, + "metadata": { + "edge_id": "30d4e8aae984ab84d523e80d02f1caeda52d547fa3d2aa47be8845931cabbca2", + "edge_type": "reads_attr", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.add_config_file", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/plba/__init__.py", + "title": "src/plba/__init__.py:1-69", + "content": "from plba.bootstrap import create_runtime\nfrom plba.config import ConfigFileLoader, FileConfigProvider\nfrom plba.control import ControlActionSet, ControlChannel, ControlPlaneService, HttpControlChannel\nfrom plba.contracts import (\n ApplicationModule,\n ConfigProvider,\n HealthContributor,\n TraceContext,\n TraceContextRecord,\n TraceLogMessage,\n TraceTransport,\n Worker,\n WorkerHealth,\n WorkerStatus,\n)\nfrom plba.core import ConfigurationManager, RuntimeManager, ServiceContainer\nfrom plba.health import HealthRegistry\nfrom plba.logging import LogManager\nfrom plba.queue import InMemoryTaskQueue\nfrom plba.tracing import MySqlTraceTransport, NoOpTraceTransport, TraceService\nfrom plba.workflow import (\n StepResult,\n WorkflowContext,\n WorkflowDefinition,\n WorkflowEngine,\n WorkflowEngineHooks,\n WorkflowNode,\n WorkflowRuntimeFactory,\n WorkflowStep,\n)\nfrom plba.workers import WorkerSupervisor\n\n__all__ = [\n \"ApplicationModule\",\n \"ConfigFileLoader\",\n \"ConfigProvider\",\n \"ConfigurationManager\",\n \"ControlActionSet\",\n \"ControlChannel\",\n \"ControlPlaneService\",\n \"create_runtime\",\n \"FileConfigProvider\",\n \"HealthContributor\",\n \"HealthRegistry\",\n \"HttpControlChannel\",\n \"InMemoryTaskQueue\",\n \"LogManager\",\n \"MySqlTraceTransport\",\n \"NoOpTraceTransport\",\n \"RuntimeManager\",\n \"ServiceContainer\",\n \"TraceContext\",\n \"TraceContextRecord\",\n \"TraceLogMessage\",\n \"TraceService\",\n \"TraceTransport\",\n \"StepResult\",\n \"Worker\",\n \"WorkerHealth\",\n \"WorkerStatus\",\n \"WorkflowContext\",\n \"WorkflowDefinition\",\n \"WorkflowEngine\",\n \"WorkflowEngineHooks\",\n \"WorkflowNode\",\n \"WorkflowRuntimeFactory\",\n \"WorkflowStep\",\n \"WorkerSupervisor\",\n]", + "start_line": 1, + "end_line": 69, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/plba/bootstrap.py", + "title": "src/plba/bootstrap.py:create_runtime", + "content": "def create_runtime(\n module: ApplicationModule,\n *,\n config_path: str | None = None,\n enable_http_control: bool = False,\n control_host: str = \"127.0.0.1\",\n control_port: int = 8080,\n control_timeout: int = 5,\n) -> RuntimeManager:\n runtime = RuntimeManager()\n if config_path is not None:\n runtime.add_config_file(config_path)\n if enable_http_control:\n runtime.control_plane.register_channel(\n HttpControlChannel(\n host=control_host,\n port=control_port,\n timeout=control_timeout,\n )\n )\n runtime.register_module(module)\n return runtime", + "start_line": 8, + "end_line": 29, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "tests/test_runtime.py", + "title": "tests/test_runtime.py:test_public_plba_package_exports_runtime_builder_and_worker_contract", + "content": "def test_public_plba_package_exports_runtime_builder_and_worker_contract(tmp_path) -> None:\n import plba\n from plba import ApplicationModule as PublicApplicationModule\n from plba import InMemoryTaskQueue\n from plba import Worker as PublicWorker\n from plba import WorkerHealth as PublicWorkerHealth\n from plba import WorkerStatus as PublicWorkerStatus\n from plba import create_runtime\n\n config_path = tmp_path / \"config.yml\"\n config_path.write_text(\"platform: {}\\n\", encoding=\"utf-8\")\n\n queue = InMemoryTaskQueue[int]()\n queue.put(2)\n assert queue.get(timeout=0.01) == 2\n queue.task_done()\n\n class PublicRoutine:\n def __init__(self) -> None:\n self.runs = 0\n\n def run(self) -> None:\n if self.runs == 0:\n self.runs += 1\n\n class PublicWorkerImpl(PublicWorker):\n def __init__(self, routine: PublicRoutine) -> None:\n self._inner = RoutineWorker(\"public-worker\", routine)\n\n @property\n def name(self) -> str:\n return self._inner.name\n\n @property\n def critical(self) -> bool:\n return self._inner.critical\n\n def start(self) -> None:\n self._inner.start()\n\n def stop(self, force: bool = False) -> None:\n self._inner.stop(force=force)\n\n def health(self) -> PublicWorkerHealth:\n return self._inner.health()\n\n def status(self) -> PublicWorkerStatus:\n return self._inner.status()\n\n class PublicExampleModule(PublicApplicationModule):\n @property\n def name(self) -> str:\n return \"public-example\"\n\n def register(self, registry: ModuleRegistry) -> None:\n registry.add_worker(PublicWorkerImpl(PublicRoutine()))\n\n runtime = create_runtime(PublicExampleModule(), config_path=str(config_path))\n runtime.start()\n sleep(0.2)\n assert runtime.configuration.get() == {\"platform\": {}}\n assert runtime.status()[\"workers\"][\"registered\"] == 1\n assert hasattr(plba, \"QueueWorker\") is False\n runtime.stop()", + "start_line": 342, + "end_line": 405, + "metadata": { + "chunk_index": 13, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/config/__init__.py", + "title": "src/app_runtime/config/__init__.py:1-4", + "content": "from app_runtime.config.file_loader import ConfigFileLoader\nfrom app_runtime.config.providers import FileConfigProvider\n\n__all__ = [\"ConfigFileLoader\", \"FileConfigProvider\"]", + "start_line": 1, + "end_line": 4, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.config.__init__", + "is_test": false, + "blob_sha": "612918029820a2a983330ec92256142b55b9de4bdf3399ece18e2a02dbad9729", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/config/providers.py", + "title": "src/app_runtime/config/providers.py:FileConfigProvider", + "content": "class FileConfigProvider(ConfigProvider):\n def __init__(self, path: str | Path) -> None:\n self._loader = ConfigFileLoader(path)\n\n @property\n def loader(self) -> ConfigFileLoader:\n return self._loader\n\n def load(self) -> dict[str, Any]:\n config = self._loader.load_sync()\n if not isinstance(config, dict):\n raise TypeError(\"Config root must be a mapping\")\n return dict(config)", + "start_line": 10, + "end_line": 22, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.config.providers", + "is_test": false, + "blob_sha": "8c53ca0122d6df6c5763bca15e99434bb4daebd5a618b8fc927e9ae90b022e64", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/contracts/__init__.py", + "title": "src/app_runtime/__init__.py:1-1", + "content": "__all__: list[str] = []", + "start_line": 1, + "end_line": 1, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.__init__", + "is_test": false, + "blob_sha": "8eea9df4f6d7b38ca0e39ccc27b04700e3d08dbeec8046d613d22706d19985fa", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/config/file_loader.py", + "title": "src/app_runtime/config/file_loader.py:ConfigFileLoader", + "content": "class ConfigFileLoader:\n def __init__(self, path: str | Path) -> None:\n self.path = Path(path)\n self.config: Any = None\n self.last_valid_config: Any = None\n self._last_seen_hash: str | None = None\n\n def read_text(self) -> str:\n return self.path.read_text(encoding=\"utf-8\")\n\n def parse(self, data: str) -> Any:\n suffix = self.path.suffix.lower()\n if suffix in {\".yml\", \".yaml\"}:\n return yaml.safe_load(data)\n return json.loads(data)\n\n def load_sync(self) -> Any:\n data = self.read_text()\n parsed = self.parse(data)\n self.config = parsed\n self.last_valid_config = parsed\n self._last_seen_hash = self._calculate_hash(data)\n return parsed\n\n def load_if_changed(self) -> tuple[bool, Any]:\n data = self.read_text()\n current_hash = self._calculate_hash(data)\n if current_hash == self._last_seen_hash:\n return False, self.config\n parsed = self.parse(data)\n self.config = parsed\n self.last_valid_config = parsed\n self._last_seen_hash = current_hash\n return True, parsed\n\n @staticmethod\n def _calculate_hash(data: str) -> str:\n return hashlib.sha256(data.encode(\"utf-8\")).hexdigest()", + "start_line": 11, + "end_line": 48, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/contracts/config.py", + "title": "src/app_runtime/contracts/config.py:ConfigProvider", + "content": "class ConfigProvider(ABC):\n @abstractmethod\n def load(self) -> dict[str, Any]:\n \"\"\"Return a config fragment.\"\"\"", + "start_line": 7, + "end_line": 10, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.config", + "is_test": false, + "blob_sha": "5e773880267743ee94954ea2db120c2d88c54d4312893293d1b89df405283ed4", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/contracts/health.py", + "title": "src/app_runtime/contracts/health.py:HealthContributor", + "content": "class HealthContributor(ABC):\n @abstractmethod\n def health(self) -> WorkerHealth:\n \"\"\"Return contributor health state.\"\"\"", + "start_line": 7, + "end_line": 10, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.health", + "is_test": false, + "blob_sha": "6bd92611def7131e32d4dd34a8ed85e6cf3c67722ad27797032a632cb30dc097", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/contracts/application.py", + "title": "src/app_runtime/contracts/application.py:ApplicationModule", + "content": "class ApplicationModule(ABC):\n @property\n @abstractmethod\n def name(self) -> str:\n \"\"\"Module name used for runtime status and diagnostics.\"\"\"\n\n @abstractmethod\n def register(self, registry: ModuleRegistry) -> None:\n \"\"\"Register workers, services, and health contributors.\"\"\"", + "start_line": 8, + "end_line": 16, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.application", + "is_test": false, + "blob_sha": "197c35634dca49c352ce3f230295a485fbffb672ce7bb8c08e752bfdf61e7fa4", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "relations": [ + { + "path": "src/plba/bootstrap.py", + "metadata": { + "edge_id": "4eaeec4ac55a59d5f66fd01c4754955f8fedaf4bc3df13fa769b352c7bfaacbb", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.add_config_file", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "create_runtime calls runtime.add_config_file" + }, + { + "path": "src/plba/bootstrap.py", + "metadata": { + "edge_id": "45516c79ff358dbf9b650a081668df0f66d2fe989300f985a1a78be6be166f8f", + "edge_type": "reads_attr", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.register_module", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "create_runtime reads_attr runtime.register_module" + }, + { + "path": "src/plba/bootstrap.py", + "metadata": { + "edge_id": "0adba17984f850ea1608c9e734d2dd5c325cfde3a8133123aa239e44935ad18e", + "edge_type": "instantiates", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": "27158ca220022eeb5083c6addf8a50775d45f7161284fd60aac48410105f4b98", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "create_runtime instantiates RuntimeManager" + }, + { + "path": "src/plba/bootstrap.py", + "metadata": { + "edge_id": "ab6003c3441addc1ba1b81edeca009165559f652f6b2cf424e5ae61b1f617de8", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.register_module", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "create_runtime calls runtime.register_module" + }, + { + "path": "src/plba/bootstrap.py", + "metadata": { + "edge_id": "2678250030b9ce47a3b3b55fac7897ac530367edc8374ac9d5e6ecafb1e483f0", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.control_plane.register_channel", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "create_runtime calls runtime.control_plane.register_channel" + }, + { + "path": "src/plba/bootstrap.py", + "metadata": { + "edge_id": "30d4e8aae984ab84d523e80d02f1caeda52d547fa3d2aa47be8845931cabbca2", + "edge_type": "reads_attr", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.add_config_file", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "create_runtime reads_attr runtime.add_config_file" + } + ], + "entrypoints": [], + "test_candidates": [ + { + "path": "tests/test_runtime.py", + "title": "tests/test_runtime.py:test_public_plba_package_exports_runtime_builder_and_worker_contract", + "content": "def test_public_plba_package_exports_runtime_builder_and_worker_contract(tmp_path) -> None:\n import plba\n from plba import ApplicationModule as PublicApplicationModule\n from plba import InMemoryTaskQueue\n from plba import Worker as PublicWorker\n from plba import WorkerHealth as Public" + } + ], + "layer_outcomes": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 6, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 10, + "empty": false, + "fallback_used": false + } + ], + "missing_layers": [], + "raw_rows": [ + { + "path": "src/plba/__init__.py", + "content": "const create_runtime\ncreate_runtime = plba.bootstrap.create_runtime", + "layer": "C1_SYMBOL_CATALOG", + "title": "create_runtime", + "span_start": 1, + "span_end": 1, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "fa1e84f16c8c659bcd5448637386af4d15d431064e07714e34689ee64233cb51", + "qname": "create_runtime", + "kind": "const", + "signature": "create_runtime = plba.bootstrap.create_runtime", + "parent_symbol_id": null, + "package_or_module": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "function create_runtime\ncreate_runtime(module)", + "layer": "C1_SYMBOL_CATALOG", + "title": "create_runtime", + "span_start": 8, + "span_end": 29, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "qname": "create_runtime", + "kind": "function", + "signature": "create_runtime(module)", + "parent_symbol_id": null, + "package_or_module": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/__init__.py", + "content": "const FileConfigProvider\nFileConfigProvider = app_runtime.config.providers.FileConfigProvider", + "layer": "C1_SYMBOL_CATALOG", + "title": "FileConfigProvider", + "span_start": 2, + "span_end": 2, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "e449b19e5881889adeb6e056eafe1da30acbae864f06984ea2edc7c15f7cb6d6", + "qname": "FileConfigProvider", + "kind": "const", + "signature": "FileConfigProvider = app_runtime.config.providers.FileConfigProvider", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.__init__", + "is_test": false, + "blob_sha": "612918029820a2a983330ec92256142b55b9de4bdf3399ece18e2a02dbad9729", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "const hashlib\nimport hashlib", + "layer": "C1_SYMBOL_CATALOG", + "title": "hashlib", + "span_start": 3, + "span_end": 3, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "e7375824bd473da3d73d316d22e3cb6428930e2db1ffbd900ce5a8b88427bf05", + "qname": "hashlib", + "kind": "const", + "signature": "import hashlib", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "const json\nimport json", + "layer": "C1_SYMBOL_CATALOG", + "title": "json", + "span_start": 4, + "span_end": 4, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "bb9e2eaf992bfd050f7072d72eed87c55b1a4b001daa034a0f7c630a61bb1d78", + "qname": "json", + "kind": "const", + "signature": "import json", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "const Path\nPath = pathlib.Path", + "layer": "C1_SYMBOL_CATALOG", + "title": "Path", + "span_start": 5, + "span_end": 5, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "b785967ed1fb83aa62d5724c6d6e9c6d2b1505523db39bd941cc39b48db48306", + "qname": "Path", + "kind": "const", + "signature": "Path = pathlib.Path", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "const Any\nAny = typing.Any", + "layer": "C1_SYMBOL_CATALOG", + "title": "Any", + "span_start": 6, + "span_end": 6, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "8e330833b8073585db1c4b4315947c400683a23e4c3d2e2ccbcb260f347541b6", + "qname": "Any", + "kind": "const", + "signature": "Any = typing.Any", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "const annotations\nannotations = __future__.annotations", + "layer": "C1_SYMBOL_CATALOG", + "title": "annotations", + "span_start": 1, + "span_end": 1, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "5ed640ccec43a78659d50ec24f3717bf1144a182c22588f37456649ac6a4a815", + "qname": "annotations", + "kind": "const", + "signature": "annotations = __future__.annotations", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime calls runtime.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:calls", + "span_start": 19, + "span_end": 19, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "4eaeec4ac55a59d5f66fd01c4754955f8fedaf4bc3df13fa769b352c7bfaacbb", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.add_config_file", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime reads_attr runtime.register_module", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:reads_attr", + "span_start": 28, + "span_end": 28, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "45516c79ff358dbf9b650a081668df0f66d2fe989300f985a1a78be6be166f8f", + "edge_type": "reads_attr", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.register_module", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:instantiates", + "span_start": 17, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "0adba17984f850ea1608c9e734d2dd5c325cfde3a8133123aa239e44935ad18e", + "edge_type": "instantiates", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": "27158ca220022eeb5083c6addf8a50775d45f7161284fd60aac48410105f4b98", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime calls runtime.register_module", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:calls", + "span_start": 28, + "span_end": 28, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "ab6003c3441addc1ba1b81edeca009165559f652f6b2cf424e5ae61b1f617de8", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.register_module", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime calls runtime.control_plane.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:calls", + "span_start": 21, + "span_end": 27, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "2678250030b9ce47a3b3b55fac7897ac530367edc8374ac9d5e6ecafb1e483f0", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.control_plane.register_channel", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime reads_attr runtime.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:reads_attr", + "span_start": 19, + "span_end": 19, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "30d4e8aae984ab84d523e80d02f1caeda52d547fa3d2aa47be8845931cabbca2", + "edge_type": "reads_attr", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.add_config_file", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/__init__.py", + "content": "from plba.bootstrap import create_runtime\nfrom plba.config import ConfigFileLoader, FileConfigProvider\nfrom plba.control import ControlActionSet, ControlChannel, ControlPlaneService, HttpControlChannel\nfrom plba.contracts import (\n ApplicationModule,\n ConfigProvider,\n HealthContributor,\n TraceContext,\n TraceContextRecord,\n TraceLogMessage,\n TraceTransport,\n Worker,\n WorkerHealth,\n WorkerStatus,\n)\nfrom plba.core import ConfigurationManager, RuntimeManager, ServiceContainer\nfrom plba.health import HealthRegistry\nfrom plba.logging import LogManager\nfrom plba.queue import InMemoryTaskQueue\nfrom plba.tracing import MySqlTraceTransport, NoOpTraceTransport, TraceService\nfrom plba.workflow import (\n StepResult,\n WorkflowContext,\n WorkflowDefinition,\n WorkflowEngine,\n WorkflowEngineHooks,\n WorkflowNode,\n WorkflowRuntimeFactory,\n WorkflowStep,\n)\nfrom plba.workers import WorkerSupervisor\n\n__all__ = [\n \"ApplicationModule\",\n \"ConfigFileLoader\",\n \"ConfigProvider\",\n \"ConfigurationManager\",\n \"ControlActionSet\",\n \"ControlChannel\",\n \"ControlPlaneService\",\n \"create_runtime\",\n \"FileConfigProvider\",\n \"HealthContributor\",\n \"HealthRegistry\",\n \"HttpControlChannel\",\n \"InMemoryTaskQueue\",\n \"LogManager\",\n \"MySqlTraceTransport\",\n \"NoOpTraceTransport\",\n \"RuntimeManager\",\n \"ServiceContainer\",\n \"TraceContext\",\n \"TraceContextRecord\",\n \"TraceLogMessage\",\n \"TraceService\",\n \"TraceTransport\",\n \"StepResult\",\n \"Worker\",\n \"WorkerHealth\",\n \"WorkerStatus\",\n \"WorkflowContext\",\n \"WorkflowDefinition\",\n \"WorkflowEngine\",\n \"WorkflowEngineHooks\",\n \"WorkflowNode\",\n \"WorkflowRuntimeFactory\",\n \"WorkflowStep\",\n \"WorkerSupervisor\",\n]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/__init__.py:1-69", + "span_start": 1, + "span_end": 69, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "def create_runtime(\n module: ApplicationModule,\n *,\n config_path: str | None = None,\n enable_http_control: bool = False,\n control_host: str = \"127.0.0.1\",\n control_port: int = 8080,\n control_timeout: int = 5,\n) -> RuntimeManager:\n runtime = RuntimeManager()\n if config_path is not None:\n runtime.add_config_file(config_path)\n if enable_http_control:\n runtime.control_plane.register_channel(\n HttpControlChannel(\n host=control_host,\n port=control_port,\n timeout=control_timeout,\n )\n )\n runtime.register_module(module)\n return runtime", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/bootstrap.py:create_runtime", + "span_start": 8, + "span_end": 29, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "def test_public_plba_package_exports_runtime_builder_and_worker_contract(tmp_path) -> None:\n import plba\n from plba import ApplicationModule as PublicApplicationModule\n from plba import InMemoryTaskQueue\n from plba import Worker as PublicWorker\n from plba import WorkerHealth as PublicWorkerHealth\n from plba import WorkerStatus as PublicWorkerStatus\n from plba import create_runtime\n\n config_path = tmp_path / \"config.yml\"\n config_path.write_text(\"platform: {}\\n\", encoding=\"utf-8\")\n\n queue = InMemoryTaskQueue[int]()\n queue.put(2)\n assert queue.get(timeout=0.01) == 2\n queue.task_done()\n\n class PublicRoutine:\n def __init__(self) -> None:\n self.runs = 0\n\n def run(self) -> None:\n if self.runs == 0:\n self.runs += 1\n\n class PublicWorkerImpl(PublicWorker):\n def __init__(self, routine: PublicRoutine) -> None:\n self._inner = RoutineWorker(\"public-worker\", routine)\n\n @property\n def name(self) -> str:\n return self._inner.name\n\n @property\n def critical(self) -> bool:\n return self._inner.critical\n\n def start(self) -> None:\n self._inner.start()\n\n def stop(self, force: bool = False) -> None:\n self._inner.stop(force=force)\n\n def health(self) -> PublicWorkerHealth:\n return self._inner.health()\n\n def status(self) -> PublicWorkerStatus:\n return self._inner.status()\n\n class PublicExampleModule(PublicApplicationModule):\n @property\n def name(self) -> str:\n return \"public-example\"\n\n def register(self, registry: ModuleRegistry) -> None:\n registry.add_worker(PublicWorkerImpl(PublicRoutine()))\n\n runtime = create_runtime(PublicExampleModule(), config_path=str(config_path))\n runtime.start()\n sleep(0.2)\n assert runtime.configuration.get() == {\"platform\": {}}\n assert runtime.status()[\"workers\"][\"registered\"] == 1\n assert hasattr(plba, \"QueueWorker\") is False\n runtime.stop()", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_runtime.py:test_public_plba_package_exports_runtime_builder_and_worker_contract", + "span_start": 342, + "span_end": 405, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 13, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/__init__.py", + "content": "from app_runtime.config.file_loader import ConfigFileLoader\nfrom app_runtime.config.providers import FileConfigProvider\n\n__all__ = [\"ConfigFileLoader\", \"FileConfigProvider\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/config/__init__.py:1-4", + "span_start": 1, + "span_end": 4, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.config.__init__", + "is_test": false, + "blob_sha": "612918029820a2a983330ec92256142b55b9de4bdf3399ece18e2a02dbad9729", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/providers.py", + "content": "class FileConfigProvider(ConfigProvider):\n def __init__(self, path: str | Path) -> None:\n self._loader = ConfigFileLoader(path)\n\n @property\n def loader(self) -> ConfigFileLoader:\n return self._loader\n\n def load(self) -> dict[str, Any]:\n config = self._loader.load_sync()\n if not isinstance(config, dict):\n raise TypeError(\"Config root must be a mapping\")\n return dict(config)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/config/providers.py:FileConfigProvider", + "span_start": 10, + "span_end": 22, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.config.providers", + "is_test": false, + "blob_sha": "8c53ca0122d6df6c5763bca15e99434bb4daebd5a618b8fc927e9ae90b022e64", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/__init__.py", + "content": "__all__: list[str] = []", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/__init__.py:1-1", + "span_start": 1, + "span_end": 1, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.__init__", + "is_test": false, + "blob_sha": "8eea9df4f6d7b38ca0e39ccc27b04700e3d08dbeec8046d613d22706d19985fa", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "class ConfigFileLoader:\n def __init__(self, path: str | Path) -> None:\n self.path = Path(path)\n self.config: Any = None\n self.last_valid_config: Any = None\n self._last_seen_hash: str | None = None\n\n def read_text(self) -> str:\n return self.path.read_text(encoding=\"utf-8\")\n\n def parse(self, data: str) -> Any:\n suffix = self.path.suffix.lower()\n if suffix in {\".yml\", \".yaml\"}:\n return yaml.safe_load(data)\n return json.loads(data)\n\n def load_sync(self) -> Any:\n data = self.read_text()\n parsed = self.parse(data)\n self.config = parsed\n self.last_valid_config = parsed\n self._last_seen_hash = self._calculate_hash(data)\n return parsed\n\n def load_if_changed(self) -> tuple[bool, Any]:\n data = self.read_text()\n current_hash = self._calculate_hash(data)\n if current_hash == self._last_seen_hash:\n return False, self.config\n parsed = self.parse(data)\n self.config = parsed\n self.last_valid_config = parsed\n self._last_seen_hash = current_hash\n return True, parsed\n\n @staticmethod\n def _calculate_hash(data: str) -> str:\n return hashlib.sha256(data.encode(\"utf-8\")).hexdigest()", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/config/file_loader.py:ConfigFileLoader", + "span_start": 11, + "span_end": 48, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/config.py", + "content": "class ConfigProvider(ABC):\n @abstractmethod\n def load(self) -> dict[str, Any]:\n \"\"\"Return a config fragment.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/contracts/config.py:ConfigProvider", + "span_start": 7, + "span_end": 10, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.config", + "is_test": false, + "blob_sha": "5e773880267743ee94954ea2db120c2d88c54d4312893293d1b89df405283ed4", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/health.py", + "content": "class HealthContributor(ABC):\n @abstractmethod\n def health(self) -> WorkerHealth:\n \"\"\"Return contributor health state.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/contracts/health.py:HealthContributor", + "span_start": 7, + "span_end": 10, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.health", + "is_test": false, + "blob_sha": "6bd92611def7131e32d4dd34a8ed85e6cf3c67722ad27797032a632cb30dc097", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/application.py", + "content": "class ApplicationModule(ABC):\n @property\n @abstractmethod\n def name(self) -> str:\n \"\"\"Module name used for runtime status and diagnostics.\"\"\"\n\n @abstractmethod\n def register(self, registry: ModuleRegistry) -> None:\n \"\"\"Register workers, services, and health contributors.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/contracts/application.py:ApplicationModule", + "span_start": 8, + "span_end": 16, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.application", + "is_test": false, + "blob_sha": "197c35634dca49c352ce3f230295a485fbffb672ce7bb8c08e752bfdf61e7fa4", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "retrieval_report": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "vector", + "C2_DEPENDENCY_GRAPH": "vector", + "C0_SOURCE_CHUNKS": "vector" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C0_SOURCE_CHUNKS": 10 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [] + } + }, + "fallback": { + "used": false, + "reason": null + }, + "retrieval_by_layer_ms": { + "C1_SYMBOL_CATALOG": 33, + "C2_DEPENDENCY_GRAPH": 42, + "C0_SOURCE_CHUNKS": 14 + } + } + }, + "diagnostics": { + "intent_correct": null, + "target_found": true, + "layers_used": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "retrieval_sufficient": true, + "answer_mode": "normal", + "router_result": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "FIND_TESTS", + "path_scope": [], + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "symbol_resolution_status": "pending" + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Где тесты для create_runtime?", + "sub_intent": "FIND_TESTS", + "path_scope": [], + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 6, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 10, + "empty": false, + "fallback_used": false + } + ], + "empty_layers": [], + "evidence_gate_decision": { + "sufficient": true, + "failure_reasons": [], + "evidence_count": 24 + }, + "failure_reasons": [], + "timings_ms": {} + }, + "rag_rows": [ + { + "path": "src/plba/__init__.py", + "content": "const create_runtime\ncreate_runtime = plba.bootstrap.create_runtime", + "layer": "C1_SYMBOL_CATALOG", + "title": "create_runtime", + "span_start": 1, + "span_end": 1, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "fa1e84f16c8c659bcd5448637386af4d15d431064e07714e34689ee64233cb51", + "qname": "create_runtime", + "kind": "const", + "signature": "create_runtime = plba.bootstrap.create_runtime", + "parent_symbol_id": null, + "package_or_module": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "function create_runtime\ncreate_runtime(module)", + "layer": "C1_SYMBOL_CATALOG", + "title": "create_runtime", + "span_start": 8, + "span_end": 29, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "qname": "create_runtime", + "kind": "function", + "signature": "create_runtime(module)", + "parent_symbol_id": null, + "package_or_module": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/__init__.py", + "content": "const FileConfigProvider\nFileConfigProvider = app_runtime.config.providers.FileConfigProvider", + "layer": "C1_SYMBOL_CATALOG", + "title": "FileConfigProvider", + "span_start": 2, + "span_end": 2, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "e449b19e5881889adeb6e056eafe1da30acbae864f06984ea2edc7c15f7cb6d6", + "qname": "FileConfigProvider", + "kind": "const", + "signature": "FileConfigProvider = app_runtime.config.providers.FileConfigProvider", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.__init__", + "is_test": false, + "blob_sha": "612918029820a2a983330ec92256142b55b9de4bdf3399ece18e2a02dbad9729", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "const hashlib\nimport hashlib", + "layer": "C1_SYMBOL_CATALOG", + "title": "hashlib", + "span_start": 3, + "span_end": 3, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "e7375824bd473da3d73d316d22e3cb6428930e2db1ffbd900ce5a8b88427bf05", + "qname": "hashlib", + "kind": "const", + "signature": "import hashlib", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "const json\nimport json", + "layer": "C1_SYMBOL_CATALOG", + "title": "json", + "span_start": 4, + "span_end": 4, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "bb9e2eaf992bfd050f7072d72eed87c55b1a4b001daa034a0f7c630a61bb1d78", + "qname": "json", + "kind": "const", + "signature": "import json", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "const Path\nPath = pathlib.Path", + "layer": "C1_SYMBOL_CATALOG", + "title": "Path", + "span_start": 5, + "span_end": 5, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "b785967ed1fb83aa62d5724c6d6e9c6d2b1505523db39bd941cc39b48db48306", + "qname": "Path", + "kind": "const", + "signature": "Path = pathlib.Path", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "const Any\nAny = typing.Any", + "layer": "C1_SYMBOL_CATALOG", + "title": "Any", + "span_start": 6, + "span_end": 6, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "8e330833b8073585db1c4b4315947c400683a23e4c3d2e2ccbcb260f347541b6", + "qname": "Any", + "kind": "const", + "signature": "Any = typing.Any", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "const annotations\nannotations = __future__.annotations", + "layer": "C1_SYMBOL_CATALOG", + "title": "annotations", + "span_start": 1, + "span_end": 1, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "5ed640ccec43a78659d50ec24f3717bf1144a182c22588f37456649ac6a4a815", + "qname": "annotations", + "kind": "const", + "signature": "annotations = __future__.annotations", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime calls runtime.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:calls", + "span_start": 19, + "span_end": 19, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "4eaeec4ac55a59d5f66fd01c4754955f8fedaf4bc3df13fa769b352c7bfaacbb", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.add_config_file", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime reads_attr runtime.register_module", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:reads_attr", + "span_start": 28, + "span_end": 28, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "45516c79ff358dbf9b650a081668df0f66d2fe989300f985a1a78be6be166f8f", + "edge_type": "reads_attr", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.register_module", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:instantiates", + "span_start": 17, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "0adba17984f850ea1608c9e734d2dd5c325cfde3a8133123aa239e44935ad18e", + "edge_type": "instantiates", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": "27158ca220022eeb5083c6addf8a50775d45f7161284fd60aac48410105f4b98", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime calls runtime.register_module", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:calls", + "span_start": 28, + "span_end": 28, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "ab6003c3441addc1ba1b81edeca009165559f652f6b2cf424e5ae61b1f617de8", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.register_module", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime calls runtime.control_plane.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:calls", + "span_start": 21, + "span_end": 27, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "2678250030b9ce47a3b3b55fac7897ac530367edc8374ac9d5e6ecafb1e483f0", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.control_plane.register_channel", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime reads_attr runtime.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:reads_attr", + "span_start": 19, + "span_end": 19, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "30d4e8aae984ab84d523e80d02f1caeda52d547fa3d2aa47be8845931cabbca2", + "edge_type": "reads_attr", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.add_config_file", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/__init__.py", + "content": "from plba.bootstrap import create_runtime\nfrom plba.config import ConfigFileLoader, FileConfigProvider\nfrom plba.control import ControlActionSet, ControlChannel, ControlPlaneService, HttpControlChannel\nfrom plba.contracts import (\n ApplicationModule,\n ConfigProvider,\n HealthContributor,\n TraceContext,\n TraceContextRecord,\n TraceLogMessage,\n TraceTransport,\n Worker,\n WorkerHealth,\n WorkerStatus,\n)\nfrom plba.core import ConfigurationManager, RuntimeManager, ServiceContainer\nfrom plba.health import HealthRegistry\nfrom plba.logging import LogManager\nfrom plba.queue import InMemoryTaskQueue\nfrom plba.tracing import MySqlTraceTransport, NoOpTraceTransport, TraceService\nfrom plba.workflow import (\n StepResult,\n WorkflowContext,\n WorkflowDefinition,\n WorkflowEngine,\n WorkflowEngineHooks,\n WorkflowNode,\n WorkflowRuntimeFactory,\n WorkflowStep,\n)\nfrom plba.workers import WorkerSupervisor\n\n__all__ = [\n \"ApplicationModule\",\n \"ConfigFileLoader\",\n \"ConfigProvider\",\n \"ConfigurationManager\",\n \"ControlActionSet\",\n \"ControlChannel\",\n \"ControlPlaneService\",\n \"create_runtime\",\n \"FileConfigProvider\",\n \"HealthContributor\",\n \"HealthRegistry\",\n \"HttpControlChannel\",\n \"InMemoryTaskQueue\",\n \"LogManager\",\n \"MySqlTraceTransport\",\n \"NoOpTraceTransport\",\n \"RuntimeManager\",\n \"ServiceContainer\",\n \"TraceContext\",\n \"TraceContextRecord\",\n \"TraceLogMessage\",\n \"TraceService\",\n \"TraceTransport\",\n \"StepResult\",\n \"Worker\",\n \"WorkerHealth\",\n \"WorkerStatus\",\n \"WorkflowContext\",\n \"WorkflowDefinition\",\n \"WorkflowEngine\",\n \"WorkflowEngineHooks\",\n \"WorkflowNode\",\n \"WorkflowRuntimeFactory\",\n \"WorkflowStep\",\n \"WorkerSupervisor\",\n]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/__init__.py:1-69", + "span_start": 1, + "span_end": 69, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "def create_runtime(\n module: ApplicationModule,\n *,\n config_path: str | None = None,\n enable_http_control: bool = False,\n control_host: str = \"127.0.0.1\",\n control_port: int = 8080,\n control_timeout: int = 5,\n) -> RuntimeManager:\n runtime = RuntimeManager()\n if config_path is not None:\n runtime.add_config_file(config_path)\n if enable_http_control:\n runtime.control_plane.register_channel(\n HttpControlChannel(\n host=control_host,\n port=control_port,\n timeout=control_timeout,\n )\n )\n runtime.register_module(module)\n return runtime", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/bootstrap.py:create_runtime", + "span_start": 8, + "span_end": 29, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "def test_public_plba_package_exports_runtime_builder_and_worker_contract(tmp_path) -> None:\n import plba\n from plba import ApplicationModule as PublicApplicationModule\n from plba import InMemoryTaskQueue\n from plba import Worker as PublicWorker\n from plba import WorkerHealth as PublicWorkerHealth\n from plba import WorkerStatus as PublicWorkerStatus\n from plba import create_runtime\n\n config_path = tmp_path / \"config.yml\"\n config_path.write_text(\"platform: {}\\n\", encoding=\"utf-8\")\n\n queue = InMemoryTaskQueue[int]()\n queue.put(2)\n assert queue.get(timeout=0.01) == 2\n queue.task_done()\n\n class PublicRoutine:\n def __init__(self) -> None:\n self.runs = 0\n\n def run(self) -> None:\n if self.runs == 0:\n self.runs += 1\n\n class PublicWorkerImpl(PublicWorker):\n def __init__(self, routine: PublicRoutine) -> None:\n self._inner = RoutineWorker(\"public-worker\", routine)\n\n @property\n def name(self) -> str:\n return self._inner.name\n\n @property\n def critical(self) -> bool:\n return self._inner.critical\n\n def start(self) -> None:\n self._inner.start()\n\n def stop(self, force: bool = False) -> None:\n self._inner.stop(force=force)\n\n def health(self) -> PublicWorkerHealth:\n return self._inner.health()\n\n def status(self) -> PublicWorkerStatus:\n return self._inner.status()\n\n class PublicExampleModule(PublicApplicationModule):\n @property\n def name(self) -> str:\n return \"public-example\"\n\n def register(self, registry: ModuleRegistry) -> None:\n registry.add_worker(PublicWorkerImpl(PublicRoutine()))\n\n runtime = create_runtime(PublicExampleModule(), config_path=str(config_path))\n runtime.start()\n sleep(0.2)\n assert runtime.configuration.get() == {\"platform\": {}}\n assert runtime.status()[\"workers\"][\"registered\"] == 1\n assert hasattr(plba, \"QueueWorker\") is False\n runtime.stop()", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_runtime.py:test_public_plba_package_exports_runtime_builder_and_worker_contract", + "span_start": 342, + "span_end": 405, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 13, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/__init__.py", + "content": "from app_runtime.config.file_loader import ConfigFileLoader\nfrom app_runtime.config.providers import FileConfigProvider\n\n__all__ = [\"ConfigFileLoader\", \"FileConfigProvider\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/config/__init__.py:1-4", + "span_start": 1, + "span_end": 4, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.config.__init__", + "is_test": false, + "blob_sha": "612918029820a2a983330ec92256142b55b9de4bdf3399ece18e2a02dbad9729", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/providers.py", + "content": "class FileConfigProvider(ConfigProvider):\n def __init__(self, path: str | Path) -> None:\n self._loader = ConfigFileLoader(path)\n\n @property\n def loader(self) -> ConfigFileLoader:\n return self._loader\n\n def load(self) -> dict[str, Any]:\n config = self._loader.load_sync()\n if not isinstance(config, dict):\n raise TypeError(\"Config root must be a mapping\")\n return dict(config)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/config/providers.py:FileConfigProvider", + "span_start": 10, + "span_end": 22, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.config.providers", + "is_test": false, + "blob_sha": "8c53ca0122d6df6c5763bca15e99434bb4daebd5a618b8fc927e9ae90b022e64", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/__init__.py", + "content": "__all__: list[str] = []", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/__init__.py:1-1", + "span_start": 1, + "span_end": 1, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.__init__", + "is_test": false, + "blob_sha": "8eea9df4f6d7b38ca0e39ccc27b04700e3d08dbeec8046d613d22706d19985fa", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "class ConfigFileLoader:\n def __init__(self, path: str | Path) -> None:\n self.path = Path(path)\n self.config: Any = None\n self.last_valid_config: Any = None\n self._last_seen_hash: str | None = None\n\n def read_text(self) -> str:\n return self.path.read_text(encoding=\"utf-8\")\n\n def parse(self, data: str) -> Any:\n suffix = self.path.suffix.lower()\n if suffix in {\".yml\", \".yaml\"}:\n return yaml.safe_load(data)\n return json.loads(data)\n\n def load_sync(self) -> Any:\n data = self.read_text()\n parsed = self.parse(data)\n self.config = parsed\n self.last_valid_config = parsed\n self._last_seen_hash = self._calculate_hash(data)\n return parsed\n\n def load_if_changed(self) -> tuple[bool, Any]:\n data = self.read_text()\n current_hash = self._calculate_hash(data)\n if current_hash == self._last_seen_hash:\n return False, self.config\n parsed = self.parse(data)\n self.config = parsed\n self.last_valid_config = parsed\n self._last_seen_hash = current_hash\n return True, parsed\n\n @staticmethod\n def _calculate_hash(data: str) -> str:\n return hashlib.sha256(data.encode(\"utf-8\")).hexdigest()", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/config/file_loader.py:ConfigFileLoader", + "span_start": 11, + "span_end": 48, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/config.py", + "content": "class ConfigProvider(ABC):\n @abstractmethod\n def load(self) -> dict[str, Any]:\n \"\"\"Return a config fragment.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/contracts/config.py:ConfigProvider", + "span_start": 7, + "span_end": 10, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.config", + "is_test": false, + "blob_sha": "5e773880267743ee94954ea2db120c2d88c54d4312893293d1b89df405283ed4", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/health.py", + "content": "class HealthContributor(ABC):\n @abstractmethod\n def health(self) -> WorkerHealth:\n \"\"\"Return contributor health state.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/contracts/health.py:HealthContributor", + "span_start": 7, + "span_end": 10, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.health", + "is_test": false, + "blob_sha": "6bd92611def7131e32d4dd34a8ed85e6cf3c67722ad27797032a632cb30dc097", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/application.py", + "content": "class ApplicationModule(ABC):\n @property\n @abstractmethod\n def name(self) -> str:\n \"\"\"Module name used for runtime status and diagnostics.\"\"\"\n\n @abstractmethod\n def register(self, registry: ModuleRegistry) -> None:\n \"\"\"Register workers, services, and health contributors.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/contracts/application.py:ApplicationModule", + "span_start": 8, + "span_end": 16, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.application", + "is_test": false, + "blob_sha": "197c35634dca49c352ce3f230295a485fbffb672ce7bb8c08e752bfdf61e7fa4", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "validation": { + "passed": true, + "action": "return", + "reasons": [] + } + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-find-tests-create-runtime.md b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-find-tests-create-runtime.md new file mode 100644 index 0000000..013c72c --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-find-tests-create-runtime.md @@ -0,0 +1,32 @@ +# plba-v2-find-tests-create-runtime + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: agent_runtime +- mode: full_chain +- passed: True + +## Query +Где тесты для create_runtime? + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 24, + "llm_answer": "- tests/test_runtime.py:342-405 (test_public_plba_package_exports_runtime_builder_and_worker_contract)", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "create_runtime" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-find-tests-runtime-manager.json b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-find-tests-runtime-manager.json new file mode 100644 index 0000000..99d0936 --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-find-tests-runtime-manager.json @@ -0,0 +1,3133 @@ +{ + "case_id": "plba-v2-find-tests-runtime-manager", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "agent_runtime", + "mode": "full_chain", + "query": "Где тесты для RuntimeManager?", + "actual": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 24, + "llm_answer": "- tests/test_runtime.py:12-12\n- tests/test_business_control_actions.py:14-14", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "query": "Где тесты для RuntimeManager?", + "router_result": { + "schema_version": "1.1", + "intent": "CODE_QA", + "retrieval_profile": "code", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query_plan": { + "raw": "Где тесты для RuntimeManager?", + "normalized": "Где тесты для RuntimeManager?", + "sub_intent": "FIND_TESTS", + "negations": [], + "expansions": [ + "test", + "unit test", + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "doc_scope_hints": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "symbol_kind_hint": "class", + "anchors": [ + { + "type": "SYMBOL", + "value": "RuntimeManager", + "source": "user_text", + "subtype": null, + "span": { + "start": 14, + "end": 28 + }, + "confidence": 0.88 + }, + { + "type": "KEY_TERM", + "value": "тест", + "source": "user_text", + "subtype": null, + "span": { + "start": 4, + "end": 9 + }, + "confidence": 0.9 + } + ] + }, + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "top_k": 8 + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "top_k": 6 + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 10 + } + ], + "filters": { + "test_policy": "INCLUDE", + "path_scope": [], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "test_file_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "test_symbol_patterns": [ + "test_runtime_manager", + "TestRuntimeManager", + "RuntimeManager" + ], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + }, + "symbol_resolution": { + "status": "pending", + "resolved_symbol": null, + "alternatives": [ + "RuntimeManager" + ], + "confidence": 0.0 + }, + "evidence_policy": { + "require_def": true, + "require_flow": true, + "require_spec": false, + "allow_answer_without_evidence": false + } + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Где тесты для RuntimeManager?", + "sub_intent": "FIND_TESTS", + "path_scope": [], + "keyword_hints": [ + "RuntimeManager" + ], + "symbol_candidates": [ + "RuntimeManager" + ], + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "top_k": 8 + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "top_k": 6 + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 10 + } + ], + "filters": { + "test_policy": "INCLUDE", + "path_scope": [], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "test_file_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "test_symbol_patterns": [ + "test_runtime_manager", + "TestRuntimeManager", + "RuntimeManager" + ], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + }, + "query_plan": { + "raw": "Где тесты для RuntimeManager?", + "normalized": "Где тесты для RuntimeManager?", + "sub_intent": "FIND_TESTS", + "negations": [], + "expansions": [ + "test", + "unit test", + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "doc_scope_hints": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "symbol_kind_hint": "class", + "anchors": [ + { + "type": "SYMBOL", + "value": "RuntimeManager", + "source": "user_text", + "subtype": null, + "span": { + "start": 14, + "end": 28 + }, + "confidence": 0.88 + }, + { + "type": "KEY_TERM", + "value": "тест", + "source": "user_text", + "subtype": null, + "span": { + "start": 4, + "end": 9 + }, + "confidence": 0.9 + } + ] + } + }, + "retrieval_result": { + "target_symbol_candidates": [ + "RuntimeManager", + "ControlPlaneService" + ], + "resolved_symbol": "RuntimeManager", + "symbol_resolution_status": "resolved", + "file_candidates": [ + "src/plba/bootstrap.py", + "tests/test_runtime.py", + "src/app_runtime/core/runtime.py", + "src/plba/__init__.py", + "src/plba/core.py", + "tests/test_business_control_actions.py", + "src/app_runtime/control/service.py", + "src/app_runtime/control/__init__.py", + "src/plba/control.py", + "src/app_runtime/control/http_channel.py", + "src/app_runtime/control/http_app.py", + "src/app_runtime/control/http_runner.py", + "src/app_runtime/control/base.py" + ], + "code_chunks": [ + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/plba/bootstrap.py", + "title": "RuntimeManager", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "start_line": 4, + "end_line": 4, + "metadata": { + "symbol_id": "27158ca220022eeb5083c6addf8a50775d45f7161284fd60aac48410105f4b98", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "tests/test_runtime.py", + "title": "RuntimeManager", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "start_line": 12, + "end_line": 12, + "metadata": { + "symbol_id": "aeadc039653807b0da1ca6e3cc1078ee61cfc510b28e7f9c2ec04c59da43cc8d", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/core/runtime.py", + "title": "RuntimeManager", + "content": "class RuntimeManager\nRuntimeManager", + "start_line": 18, + "end_line": 179, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "qname": "RuntimeManager", + "kind": "class", + "signature": "RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/plba/__init__.py", + "title": "RuntimeManager", + "content": "const RuntimeManager\nRuntimeManager = plba.core.RuntimeManager", + "start_line": 16, + "end_line": 16, + "metadata": { + "symbol_id": "7eacec84f9b8d6c4201374591faecdac7493091c263681495c338973f2971ad9", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = plba.core.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/plba/core.py", + "title": "RuntimeManager", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "start_line": 2, + "end_line": 2, + "metadata": { + "symbol_id": "e1684562d978b7af7fe9b27dc5869d770348a87b5dc19a50360f58544668578b", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.core", + "is_test": false, + "blob_sha": "c0ae25110d20e665216616e26b68adfe035b624ba45d31d1272fb21f906f9ca8", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "tests/test_business_control_actions.py", + "title": "RuntimeManager", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "start_line": 14, + "end_line": 14, + "metadata": { + "symbol_id": "a1572ea8183dc0cd6ddbc74342bbde8c28cecfde37ad40b62feff09f8d103d11", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/service.py", + "title": "RuntimeManager", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "start_line": 9, + "end_line": 9, + "metadata": { + "symbol_id": "62a9575c77aad894120d18b4f2a08cf2ba42f77e9be4a8a432b767d157701afe", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/__init__.py", + "title": "ControlPlaneService", + "content": "const ControlPlaneService\nControlPlaneService = app_runtime.control.service.ControlPlaneService", + "start_line": 3, + "end_line": 3, + "metadata": { + "symbol_id": "217e8f044d1c01644bf7b81e5046af9e84469210c692a2fb0c476a19bb069ae1", + "qname": "ControlPlaneService", + "kind": "const", + "signature": "ControlPlaneService = app_runtime.control.service.ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "start_line": 14, + "end_line": 25, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "start_line": 14, + "end_line": 51, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "start_line": 14, + "end_line": 17, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "start_line": 14, + "end_line": 20, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "start_line": 14, + "end_line": 47, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/core/runtime.py", + "title": "RuntimeManager.__init__:dataflow_slice", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file", + "start_line": 32, + "end_line": 52, + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/plba/control.py", + "title": "src/plba/control.py:1-10", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\n \"ControlActionSet\",\n \"ControlChannel\",\n \"ControlPlaneService\",\n \"HttpControlChannel\",\n]", + "start_line": 1, + "end_line": 10, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.control", + "is_test": false, + "blob_sha": "31bd5c4481bfa7fbca8fae56d4860a67e3953ca74474ac8439e1f39b685d7bc8", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "tests/test_business_control_actions.py", + "title": "tests/test_business_control_actions.py:IntervalRoutine", + "content": "class IntervalRoutine:\n calls: list[float] = field(default_factory=list)\n _lock: Lock = field(default_factory=Lock)\n\n def run(self) -> None:\n with self._lock:\n self.calls.append(monotonic())\n\n def wait_runs(self, count: int, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n with self._lock:\n if len(self.calls) >= count:\n return True\n sleep(0.01)\n return False\n\n def deltas(self) -> list[float]:\n with self._lock:\n return [self.calls[index + 1] - self.calls[index] for index in range(len(self.calls) - 1)]", + "start_line": 18, + "end_line": 37, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/http_channel.py", + "title": "src/app_runtime/control/http_channel.py:HttpControlChannel", + "content": "class HttpControlChannel(ControlChannel):\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._timeout = timeout\n self._runner = UvicornThreadRunner(host, port, timeout)\n self._factory = HttpControlAppFactory()\n self._actions: ControlActionSet | None = None\n\n async def start(self, actions: ControlActionSet) -> None:\n self._actions = actions\n app = self._factory.create(self._health_response, self._action_response)\n await self._runner.start(app)\n\n async def stop(self) -> None:\n await self._runner.stop()\n\n @property\n def port(self) -> int:\n return self._runner.port\n\n async def _health_response(self) -> dict[str, object]:\n if self._actions is None:\n return {\"status\": \"unhealthy\", \"detail\": \"control actions are not configured\"}\n return await asyncio.wait_for(self._actions.health(), timeout=float(self._timeout))\n\n async def _action_response(self, action: str, _client_source: str = \"unknown\") -> JSONResponse:\n if self._actions is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"{action} handler is not configured\"}, status_code=404)\n callbacks = {\n \"start\": self._actions.start,\n \"stop\": self._actions.stop,\n \"status\": self._actions.status,\n }\n callback = callbacks.get(action)\n if callback is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"unsupported action: {action}\"}, status_code=404)\n action_timeout = max(float(self._timeout), 10.0) if action in {\"start\", \"stop\"} else float(self._timeout)\n try:\n detail = await asyncio.wait_for(callback(), timeout=action_timeout)\n except asyncio.TimeoutError:\n return JSONResponse(\n content={\"status\": \"accepted\", \"detail\": f\"{action} operation is still in progress\"},\n status_code=202,\n )\n except Exception as exc:\n return JSONResponse(content={\"status\": \"error\", \"detail\": str(exc)}, status_code=500)\n return JSONResponse(content={\"status\": \"ok\", \"detail\": detail or f\"{action} action accepted\"}, status_code=200)", + "start_line": 12, + "end_line": 57, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/http_app.py", + "title": "src/app_runtime/control/http_app.py:HttpControlAppFactory", + "content": "class HttpControlAppFactory:\n def create(\n self,\n health_provider: Callable[[], Awaitable[HealthPayload]],\n action_provider: Callable[[str, str], Awaitable[JSONResponse]],\n ) -> FastAPI:\n app = FastAPI(title=\"PLBA Control API\")\n\n @app.middleware(\"http\")\n async def log_api_call(request: Request, call_next): # type: ignore[no-untyped-def]\n started = time.monotonic()\n response = await call_next(request)\n response.headers[\"X-Response-Time-Ms\"] = str(int((time.monotonic() - started) * 1000))\n return response\n\n @app.get(\"/health\")\n async def health() -> JSONResponse:\n payload = await health_provider()\n status_code = 200 if payload.get(\"status\") == \"ok\" else 503\n return JSONResponse(content=payload, status_code=status_code)\n\n @app.get(\"/actions/{action}\")\n @app.post(\"/actions/{action}\")\n async def action(action: str, request: Request) -> JSONResponse:\n client_source = self._client_source(request)\n if action in {\"start\", \"stop\"}:\n LOGGER.warning(\"Control action requested: /actions/%s client=%s\", action, client_source)\n return await action_provider(action, client_source)\n\n return app\n\n def _client_source(self, request: Request) -> str:\n explicit_header = request.headers.get(\"X-Client-Source\", \"\").strip()\n if explicit_header:\n return explicit_header\n user_agent = request.headers.get(\"User-Agent\", \"\").strip()\n if user_agent:\n return f\"user-agent:{user_agent}\"\n return \"unknown\"", + "start_line": 15, + "end_line": 53, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/http_runner.py", + "title": "src/app_runtime/control/http_runner.py:UvicornThreadRunner", + "content": "class UvicornThreadRunner:\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._host = host\n self._port = port\n self._timeout = timeout\n self._server: Server | None = None\n self._thread: Thread | None = None\n self._error: BaseException | None = None\n\n async def start(self, app: FastAPI) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._error = None\n config = Config(app=app, host=self._host, port=self._port, log_level=\"warning\")\n self._server = Server(config)\n self._thread = Thread(target=self._serve, name=\"plba-http-control\", daemon=True)\n self._thread.start()\n await self._wait_until_started()\n\n async def stop(self) -> None:\n if self._server is None or self._thread is None:\n return\n self._server.should_exit = True\n await asyncio.to_thread(self._thread.join, self._timeout)\n self._server = None\n self._thread = None\n\n @property\n def port(self) -> int:\n if self._server is None or not getattr(self._server, \"servers\", None):\n return self._port\n socket = self._server.servers[0].sockets[0]\n return int(socket.getsockname()[1])\n\n async def _wait_until_started(self) -> None:\n if self._server is None:\n raise RuntimeError(\"Server is not initialized\")\n deadline = asyncio.get_running_loop().time() + max(float(self._timeout), 1.0)\n while not self._server.started:\n if self._error is not None:\n raise RuntimeError(\"HTTP control server failed to start\") from self._error\n if asyncio.get_running_loop().time() >= deadline:\n raise TimeoutError(\"HTTP control server startup timed out\")\n await asyncio.sleep(0.05)\n\n def _serve(self) -> None:\n if self._server is None:\n return\n try:\n asyncio.run(self._server.serve())\n except BaseException as exc: # noqa: BLE001\n self._error = exc", + "start_line": 10, + "end_line": 61, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_runner", + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/service.py", + "title": "src/app_runtime/control/service.py:ControlPlaneService", + "content": "class ControlPlaneService:\n def __init__(self) -> None:\n self._channels: list[ControlChannel] = []\n\n def register_channel(self, channel: ControlChannel) -> None:\n self._channels.append(channel)\n\n def start(self, runtime: RuntimeManager) -> None:\n if not self._channels:\n return\n asyncio.run(self._start_async(runtime))\n\n def stop(self) -> None:\n if not self._channels:\n return\n asyncio.run(self._stop_async())\n\n def snapshot(self, runtime: RuntimeManager) -> dict[str, object]:\n health = runtime.current_health()\n return {\n \"runtime\": {\"state\": runtime._state.value},\n \"modules\": list(runtime.registry.modules),\n \"services\": runtime.services.snapshot(),\n \"workers\": runtime.workers.snapshot(),\n \"health\": runtime.health.snapshot(runtime.workers.healths()) | {\"status\": health[\"status\"]},\n \"config\": runtime.configuration.get(),\n }\n\n async def _start_async(self, runtime: RuntimeManager) -> None:\n actions = ControlActionSet(\n health=runtime.health_status,\n start=runtime.start_runtime,\n stop=runtime.stop_runtime,\n status=runtime.runtime_status,\n )\n for channel in self._channels:\n await channel.start(actions)\n\n async def _stop_async(self) -> None:\n for channel in reversed(self._channels):\n await channel.stop()", + "start_line": 12, + "end_line": 52, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/base.py", + "title": "src/app_runtime/control/base.py:ControlActionSet", + "content": "class ControlActionSet:\n health: HealthHandler\n start: ActionHandler\n stop: ActionHandler\n status: ActionHandler", + "start_line": 14, + "end_line": 18, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/__init__.py", + "title": "src/app_runtime/control/__init__.py:1-5", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\"ControlActionSet\", \"ControlChannel\", \"ControlPlaneService\", \"HttpControlChannel\"]", + "start_line": 1, + "end_line": 5, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/base.py", + "title": "src/app_runtime/control/base.py:ControlChannel", + "content": "class ControlChannel(ABC):\n @abstractmethod\n async def start(self, actions: ControlActionSet) -> None:\n \"\"\"Start the control channel and bind handlers.\"\"\"\n\n @abstractmethod\n async def stop(self) -> None:\n \"\"\"Stop the control channel and release resources.\"\"\"", + "start_line": 21, + "end_line": 28, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "tests/test_business_control_actions.py", + "title": "tests/test_business_control_actions.py:BlockingRoutine", + "content": "class BlockingRoutine:\n def __init__(self, started: Event, release: Event) -> None:\n self._started = started\n self._release = release\n\n def run(self) -> None:\n self._started.set()\n self._release.wait(timeout=5.0)", + "start_line": 40, + "end_line": 47, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "relations": [ + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop" + }, + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async" + }, + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel" + }, + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start" + }, + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async" + }, + { + "path": "src/app_runtime/core/runtime.py", + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file" + } + ], + "entrypoints": [], + "test_candidates": [ + { + "path": "tests/test_business_control_actions.py", + "title": "tests/test_business_control_actions.py:IntervalRoutine", + "content": "class IntervalRoutine:\n calls: list[float] = field(default_factory=list)\n _lock: Lock = field(default_factory=Lock)\n\n def run(self) -> None:\n with self._lock:\n self.calls.append(monotonic())\n\n def wait_runs(self, count: int, timeout: float) -> bool:\n deadline = m" + }, + { + "path": "tests/test_business_control_actions.py", + "title": "tests/test_business_control_actions.py:BlockingRoutine", + "content": "class BlockingRoutine:\n def __init__(self, started: Event, release: Event) -> None:\n self._started = started\n self._release = release\n\n def run(self) -> None:\n self._started.set()\n self._release.wait(timeout=5.0)" + } + ], + "layer_outcomes": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 6, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 10, + "empty": false, + "fallback_used": false + } + ], + "missing_layers": [], + "raw_rows": [ + { + "path": "src/plba/bootstrap.py", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 4, + "span_end": 4, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "27158ca220022eeb5083c6addf8a50775d45f7161284fd60aac48410105f4b98", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 12, + "span_end": 12, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "aeadc039653807b0da1ca6e3cc1078ee61cfc510b28e7f9c2ec04c59da43cc8d", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager\nRuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "qname": "RuntimeManager", + "kind": "class", + "signature": "RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/__init__.py", + "content": "const RuntimeManager\nRuntimeManager = plba.core.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 16, + "span_end": 16, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "7eacec84f9b8d6c4201374591faecdac7493091c263681495c338973f2971ad9", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = plba.core.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/core.py", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 2, + "span_end": 2, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "e1684562d978b7af7fe9b27dc5869d770348a87b5dc19a50360f58544668578b", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.core", + "is_test": false, + "blob_sha": "c0ae25110d20e665216616e26b68adfe035b624ba45d31d1272fb21f906f9ca8", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 14, + "span_end": 14, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "a1572ea8183dc0cd6ddbc74342bbde8c28cecfde37ad40b62feff09f8d103d11", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 9, + "span_end": 9, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "62a9575c77aad894120d18b4f2a08cf2ba42f77e9be4a8a432b767d157701afe", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "const ControlPlaneService\nControlPlaneService = app_runtime.control.service.ControlPlaneService", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlPlaneService", + "span_start": 3, + "span_end": 3, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "217e8f044d1c01644bf7b81e5046af9e84469210c692a2fb0c476a19bb069ae1", + "qname": "ControlPlaneService", + "kind": "const", + "signature": "ControlPlaneService = app_runtime.control.service.ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 52, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/control.py", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\n \"ControlActionSet\",\n \"ControlChannel\",\n \"ControlPlaneService\",\n \"HttpControlChannel\",\n]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/control.py:1-10", + "span_start": 1, + "span_end": 10, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.control", + "is_test": false, + "blob_sha": "31bd5c4481bfa7fbca8fae56d4860a67e3953ca74474ac8439e1f39b685d7bc8", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class IntervalRoutine:\n calls: list[float] = field(default_factory=list)\n _lock: Lock = field(default_factory=Lock)\n\n def run(self) -> None:\n with self._lock:\n self.calls.append(monotonic())\n\n def wait_runs(self, count: int, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n with self._lock:\n if len(self.calls) >= count:\n return True\n sleep(0.01)\n return False\n\n def deltas(self) -> list[float]:\n with self._lock:\n return [self.calls[index + 1] - self.calls[index] for index in range(len(self.calls) - 1)]", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:IntervalRoutine", + "span_start": 18, + "span_end": 37, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel(ControlChannel):\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._timeout = timeout\n self._runner = UvicornThreadRunner(host, port, timeout)\n self._factory = HttpControlAppFactory()\n self._actions: ControlActionSet | None = None\n\n async def start(self, actions: ControlActionSet) -> None:\n self._actions = actions\n app = self._factory.create(self._health_response, self._action_response)\n await self._runner.start(app)\n\n async def stop(self) -> None:\n await self._runner.stop()\n\n @property\n def port(self) -> int:\n return self._runner.port\n\n async def _health_response(self) -> dict[str, object]:\n if self._actions is None:\n return {\"status\": \"unhealthy\", \"detail\": \"control actions are not configured\"}\n return await asyncio.wait_for(self._actions.health(), timeout=float(self._timeout))\n\n async def _action_response(self, action: str, _client_source: str = \"unknown\") -> JSONResponse:\n if self._actions is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"{action} handler is not configured\"}, status_code=404)\n callbacks = {\n \"start\": self._actions.start,\n \"stop\": self._actions.stop,\n \"status\": self._actions.status,\n }\n callback = callbacks.get(action)\n if callback is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"unsupported action: {action}\"}, status_code=404)\n action_timeout = max(float(self._timeout), 10.0) if action in {\"start\", \"stop\"} else float(self._timeout)\n try:\n detail = await asyncio.wait_for(callback(), timeout=action_timeout)\n except asyncio.TimeoutError:\n return JSONResponse(\n content={\"status\": \"accepted\", \"detail\": f\"{action} operation is still in progress\"},\n status_code=202,\n )\n except Exception as exc:\n return JSONResponse(content={\"status\": \"error\", \"detail\": str(exc)}, status_code=500)\n return JSONResponse(content={\"status\": \"ok\", \"detail\": detail or f\"{action} action accepted\"}, status_code=200)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_channel.py:HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "class HttpControlAppFactory:\n def create(\n self,\n health_provider: Callable[[], Awaitable[HealthPayload]],\n action_provider: Callable[[str, str], Awaitable[JSONResponse]],\n ) -> FastAPI:\n app = FastAPI(title=\"PLBA Control API\")\n\n @app.middleware(\"http\")\n async def log_api_call(request: Request, call_next): # type: ignore[no-untyped-def]\n started = time.monotonic()\n response = await call_next(request)\n response.headers[\"X-Response-Time-Ms\"] = str(int((time.monotonic() - started) * 1000))\n return response\n\n @app.get(\"/health\")\n async def health() -> JSONResponse:\n payload = await health_provider()\n status_code = 200 if payload.get(\"status\") == \"ok\" else 503\n return JSONResponse(content=payload, status_code=status_code)\n\n @app.get(\"/actions/{action}\")\n @app.post(\"/actions/{action}\")\n async def action(action: str, request: Request) -> JSONResponse:\n client_source = self._client_source(request)\n if action in {\"start\", \"stop\"}:\n LOGGER.warning(\"Control action requested: /actions/%s client=%s\", action, client_source)\n return await action_provider(action, client_source)\n\n return app\n\n def _client_source(self, request: Request) -> str:\n explicit_header = request.headers.get(\"X-Client-Source\", \"\").strip()\n if explicit_header:\n return explicit_header\n user_agent = request.headers.get(\"User-Agent\", \"\").strip()\n if user_agent:\n return f\"user-agent:{user_agent}\"\n return \"unknown\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_app.py:HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "class UvicornThreadRunner:\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._host = host\n self._port = port\n self._timeout = timeout\n self._server: Server | None = None\n self._thread: Thread | None = None\n self._error: BaseException | None = None\n\n async def start(self, app: FastAPI) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._error = None\n config = Config(app=app, host=self._host, port=self._port, log_level=\"warning\")\n self._server = Server(config)\n self._thread = Thread(target=self._serve, name=\"plba-http-control\", daemon=True)\n self._thread.start()\n await self._wait_until_started()\n\n async def stop(self) -> None:\n if self._server is None or self._thread is None:\n return\n self._server.should_exit = True\n await asyncio.to_thread(self._thread.join, self._timeout)\n self._server = None\n self._thread = None\n\n @property\n def port(self) -> int:\n if self._server is None or not getattr(self._server, \"servers\", None):\n return self._port\n socket = self._server.servers[0].sockets[0]\n return int(socket.getsockname()[1])\n\n async def _wait_until_started(self) -> None:\n if self._server is None:\n raise RuntimeError(\"Server is not initialized\")\n deadline = asyncio.get_running_loop().time() + max(float(self._timeout), 1.0)\n while not self._server.started:\n if self._error is not None:\n raise RuntimeError(\"HTTP control server failed to start\") from self._error\n if asyncio.get_running_loop().time() >= deadline:\n raise TimeoutError(\"HTTP control server startup timed out\")\n await asyncio.sleep(0.05)\n\n def _serve(self) -> None:\n if self._server is None:\n return\n try:\n asyncio.run(self._server.serve())\n except BaseException as exc: # noqa: BLE001\n self._error = exc", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_runner.py:UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_runner", + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "class ControlPlaneService:\n def __init__(self) -> None:\n self._channels: list[ControlChannel] = []\n\n def register_channel(self, channel: ControlChannel) -> None:\n self._channels.append(channel)\n\n def start(self, runtime: RuntimeManager) -> None:\n if not self._channels:\n return\n asyncio.run(self._start_async(runtime))\n\n def stop(self) -> None:\n if not self._channels:\n return\n asyncio.run(self._stop_async())\n\n def snapshot(self, runtime: RuntimeManager) -> dict[str, object]:\n health = runtime.current_health()\n return {\n \"runtime\": {\"state\": runtime._state.value},\n \"modules\": list(runtime.registry.modules),\n \"services\": runtime.services.snapshot(),\n \"workers\": runtime.workers.snapshot(),\n \"health\": runtime.health.snapshot(runtime.workers.healths()) | {\"status\": health[\"status\"]},\n \"config\": runtime.configuration.get(),\n }\n\n async def _start_async(self, runtime: RuntimeManager) -> None:\n actions = ControlActionSet(\n health=runtime.health_status,\n start=runtime.start_runtime,\n stop=runtime.stop_runtime,\n status=runtime.runtime_status,\n )\n for channel in self._channels:\n await channel.start(actions)\n\n async def _stop_async(self) -> None:\n for channel in reversed(self._channels):\n await channel.stop()", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/service.py:ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlActionSet:\n health: HealthHandler\n start: ActionHandler\n stop: ActionHandler\n status: ActionHandler", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\"ControlActionSet\", \"ControlChannel\", \"ControlPlaneService\", \"HttpControlChannel\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/__init__.py:1-5", + "span_start": 1, + "span_end": 5, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlChannel(ABC):\n @abstractmethod\n async def start(self, actions: ControlActionSet) -> None:\n \"\"\"Start the control channel and bind handlers.\"\"\"\n\n @abstractmethod\n async def stop(self) -> None:\n \"\"\"Stop the control channel and release resources.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class BlockingRoutine:\n def __init__(self, started: Event, release: Event) -> None:\n self._started = started\n self._release = release\n\n def run(self) -> None:\n self._started.set()\n self._release.wait(timeout=5.0)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:BlockingRoutine", + "span_start": 40, + "span_end": 47, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "retrieval_report": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "vector", + "C2_DEPENDENCY_GRAPH": "vector", + "C0_SOURCE_CHUNKS": "vector" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C0_SOURCE_CHUNKS": 10 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [] + } + }, + "fallback": { + "used": false, + "reason": null + }, + "retrieval_by_layer_ms": { + "C1_SYMBOL_CATALOG": 45, + "C2_DEPENDENCY_GRAPH": 53, + "C0_SOURCE_CHUNKS": 17 + } + } + }, + "diagnostics": { + "intent_correct": null, + "target_found": true, + "layers_used": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "retrieval_sufficient": true, + "answer_mode": "normal", + "router_result": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "FIND_TESTS", + "path_scope": [], + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "symbol_resolution_status": "pending" + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Где тесты для RuntimeManager?", + "sub_intent": "FIND_TESTS", + "path_scope": [], + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 6, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 10, + "empty": false, + "fallback_used": false + } + ], + "empty_layers": [], + "evidence_gate_decision": { + "sufficient": true, + "failure_reasons": [], + "evidence_count": 24 + }, + "failure_reasons": [], + "timings_ms": {} + }, + "rag_rows": [ + { + "path": "src/plba/bootstrap.py", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 4, + "span_end": 4, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "27158ca220022eeb5083c6addf8a50775d45f7161284fd60aac48410105f4b98", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 12, + "span_end": 12, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "aeadc039653807b0da1ca6e3cc1078ee61cfc510b28e7f9c2ec04c59da43cc8d", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager\nRuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "qname": "RuntimeManager", + "kind": "class", + "signature": "RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/__init__.py", + "content": "const RuntimeManager\nRuntimeManager = plba.core.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 16, + "span_end": 16, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "7eacec84f9b8d6c4201374591faecdac7493091c263681495c338973f2971ad9", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = plba.core.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/core.py", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 2, + "span_end": 2, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "e1684562d978b7af7fe9b27dc5869d770348a87b5dc19a50360f58544668578b", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.core", + "is_test": false, + "blob_sha": "c0ae25110d20e665216616e26b68adfe035b624ba45d31d1272fb21f906f9ca8", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 14, + "span_end": 14, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "a1572ea8183dc0cd6ddbc74342bbde8c28cecfde37ad40b62feff09f8d103d11", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 9, + "span_end": 9, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "62a9575c77aad894120d18b4f2a08cf2ba42f77e9be4a8a432b767d157701afe", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "const ControlPlaneService\nControlPlaneService = app_runtime.control.service.ControlPlaneService", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlPlaneService", + "span_start": 3, + "span_end": 3, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "217e8f044d1c01644bf7b81e5046af9e84469210c692a2fb0c476a19bb069ae1", + "qname": "ControlPlaneService", + "kind": "const", + "signature": "ControlPlaneService = app_runtime.control.service.ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 52, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/control.py", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\n \"ControlActionSet\",\n \"ControlChannel\",\n \"ControlPlaneService\",\n \"HttpControlChannel\",\n]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/control.py:1-10", + "span_start": 1, + "span_end": 10, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.control", + "is_test": false, + "blob_sha": "31bd5c4481bfa7fbca8fae56d4860a67e3953ca74474ac8439e1f39b685d7bc8", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class IntervalRoutine:\n calls: list[float] = field(default_factory=list)\n _lock: Lock = field(default_factory=Lock)\n\n def run(self) -> None:\n with self._lock:\n self.calls.append(monotonic())\n\n def wait_runs(self, count: int, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n with self._lock:\n if len(self.calls) >= count:\n return True\n sleep(0.01)\n return False\n\n def deltas(self) -> list[float]:\n with self._lock:\n return [self.calls[index + 1] - self.calls[index] for index in range(len(self.calls) - 1)]", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:IntervalRoutine", + "span_start": 18, + "span_end": 37, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel(ControlChannel):\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._timeout = timeout\n self._runner = UvicornThreadRunner(host, port, timeout)\n self._factory = HttpControlAppFactory()\n self._actions: ControlActionSet | None = None\n\n async def start(self, actions: ControlActionSet) -> None:\n self._actions = actions\n app = self._factory.create(self._health_response, self._action_response)\n await self._runner.start(app)\n\n async def stop(self) -> None:\n await self._runner.stop()\n\n @property\n def port(self) -> int:\n return self._runner.port\n\n async def _health_response(self) -> dict[str, object]:\n if self._actions is None:\n return {\"status\": \"unhealthy\", \"detail\": \"control actions are not configured\"}\n return await asyncio.wait_for(self._actions.health(), timeout=float(self._timeout))\n\n async def _action_response(self, action: str, _client_source: str = \"unknown\") -> JSONResponse:\n if self._actions is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"{action} handler is not configured\"}, status_code=404)\n callbacks = {\n \"start\": self._actions.start,\n \"stop\": self._actions.stop,\n \"status\": self._actions.status,\n }\n callback = callbacks.get(action)\n if callback is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"unsupported action: {action}\"}, status_code=404)\n action_timeout = max(float(self._timeout), 10.0) if action in {\"start\", \"stop\"} else float(self._timeout)\n try:\n detail = await asyncio.wait_for(callback(), timeout=action_timeout)\n except asyncio.TimeoutError:\n return JSONResponse(\n content={\"status\": \"accepted\", \"detail\": f\"{action} operation is still in progress\"},\n status_code=202,\n )\n except Exception as exc:\n return JSONResponse(content={\"status\": \"error\", \"detail\": str(exc)}, status_code=500)\n return JSONResponse(content={\"status\": \"ok\", \"detail\": detail or f\"{action} action accepted\"}, status_code=200)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_channel.py:HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "class HttpControlAppFactory:\n def create(\n self,\n health_provider: Callable[[], Awaitable[HealthPayload]],\n action_provider: Callable[[str, str], Awaitable[JSONResponse]],\n ) -> FastAPI:\n app = FastAPI(title=\"PLBA Control API\")\n\n @app.middleware(\"http\")\n async def log_api_call(request: Request, call_next): # type: ignore[no-untyped-def]\n started = time.monotonic()\n response = await call_next(request)\n response.headers[\"X-Response-Time-Ms\"] = str(int((time.monotonic() - started) * 1000))\n return response\n\n @app.get(\"/health\")\n async def health() -> JSONResponse:\n payload = await health_provider()\n status_code = 200 if payload.get(\"status\") == \"ok\" else 503\n return JSONResponse(content=payload, status_code=status_code)\n\n @app.get(\"/actions/{action}\")\n @app.post(\"/actions/{action}\")\n async def action(action: str, request: Request) -> JSONResponse:\n client_source = self._client_source(request)\n if action in {\"start\", \"stop\"}:\n LOGGER.warning(\"Control action requested: /actions/%s client=%s\", action, client_source)\n return await action_provider(action, client_source)\n\n return app\n\n def _client_source(self, request: Request) -> str:\n explicit_header = request.headers.get(\"X-Client-Source\", \"\").strip()\n if explicit_header:\n return explicit_header\n user_agent = request.headers.get(\"User-Agent\", \"\").strip()\n if user_agent:\n return f\"user-agent:{user_agent}\"\n return \"unknown\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_app.py:HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "class UvicornThreadRunner:\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._host = host\n self._port = port\n self._timeout = timeout\n self._server: Server | None = None\n self._thread: Thread | None = None\n self._error: BaseException | None = None\n\n async def start(self, app: FastAPI) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._error = None\n config = Config(app=app, host=self._host, port=self._port, log_level=\"warning\")\n self._server = Server(config)\n self._thread = Thread(target=self._serve, name=\"plba-http-control\", daemon=True)\n self._thread.start()\n await self._wait_until_started()\n\n async def stop(self) -> None:\n if self._server is None or self._thread is None:\n return\n self._server.should_exit = True\n await asyncio.to_thread(self._thread.join, self._timeout)\n self._server = None\n self._thread = None\n\n @property\n def port(self) -> int:\n if self._server is None or not getattr(self._server, \"servers\", None):\n return self._port\n socket = self._server.servers[0].sockets[0]\n return int(socket.getsockname()[1])\n\n async def _wait_until_started(self) -> None:\n if self._server is None:\n raise RuntimeError(\"Server is not initialized\")\n deadline = asyncio.get_running_loop().time() + max(float(self._timeout), 1.0)\n while not self._server.started:\n if self._error is not None:\n raise RuntimeError(\"HTTP control server failed to start\") from self._error\n if asyncio.get_running_loop().time() >= deadline:\n raise TimeoutError(\"HTTP control server startup timed out\")\n await asyncio.sleep(0.05)\n\n def _serve(self) -> None:\n if self._server is None:\n return\n try:\n asyncio.run(self._server.serve())\n except BaseException as exc: # noqa: BLE001\n self._error = exc", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_runner.py:UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_runner", + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "class ControlPlaneService:\n def __init__(self) -> None:\n self._channels: list[ControlChannel] = []\n\n def register_channel(self, channel: ControlChannel) -> None:\n self._channels.append(channel)\n\n def start(self, runtime: RuntimeManager) -> None:\n if not self._channels:\n return\n asyncio.run(self._start_async(runtime))\n\n def stop(self) -> None:\n if not self._channels:\n return\n asyncio.run(self._stop_async())\n\n def snapshot(self, runtime: RuntimeManager) -> dict[str, object]:\n health = runtime.current_health()\n return {\n \"runtime\": {\"state\": runtime._state.value},\n \"modules\": list(runtime.registry.modules),\n \"services\": runtime.services.snapshot(),\n \"workers\": runtime.workers.snapshot(),\n \"health\": runtime.health.snapshot(runtime.workers.healths()) | {\"status\": health[\"status\"]},\n \"config\": runtime.configuration.get(),\n }\n\n async def _start_async(self, runtime: RuntimeManager) -> None:\n actions = ControlActionSet(\n health=runtime.health_status,\n start=runtime.start_runtime,\n stop=runtime.stop_runtime,\n status=runtime.runtime_status,\n )\n for channel in self._channels:\n await channel.start(actions)\n\n async def _stop_async(self) -> None:\n for channel in reversed(self._channels):\n await channel.stop()", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/service.py:ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlActionSet:\n health: HealthHandler\n start: ActionHandler\n stop: ActionHandler\n status: ActionHandler", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\"ControlActionSet\", \"ControlChannel\", \"ControlPlaneService\", \"HttpControlChannel\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/__init__.py:1-5", + "span_start": 1, + "span_end": 5, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlChannel(ABC):\n @abstractmethod\n async def start(self, actions: ControlActionSet) -> None:\n \"\"\"Start the control channel and bind handlers.\"\"\"\n\n @abstractmethod\n async def stop(self) -> None:\n \"\"\"Stop the control channel and release resources.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class BlockingRoutine:\n def __init__(self, started: Event, release: Event) -> None:\n self._started = started\n self._release = release\n\n def run(self) -> None:\n self._started.set()\n self._release.wait(timeout=5.0)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:BlockingRoutine", + "span_start": 40, + "span_end": 47, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "validation": { + "passed": true, + "action": "return", + "reasons": [] + } + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-find-tests-runtime-manager.md b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-find-tests-runtime-manager.md new file mode 100644 index 0000000..7f1badd --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-find-tests-runtime-manager.md @@ -0,0 +1,32 @@ +# plba-v2-find-tests-runtime-manager + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: agent_runtime +- mode: full_chain +- passed: True + +## Query +Где тесты для RuntimeManager? + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 24, + "llm_answer": "- tests/test_runtime.py:12-12\n- tests/test_business_control_actions.py:14-14", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-find-tests-trace-service.json b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-find-tests-trace-service.json new file mode 100644 index 0000000..478ef7b --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-find-tests-trace-service.json @@ -0,0 +1,3134 @@ +{ + "case_id": "plba-v2-find-tests-trace-service", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "agent_runtime", + "mode": "full_chain", + "query": "Где тесты для TraceService?", + "actual": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 24, + "llm_answer": "tests/test_runtime.py:test_trace_service_allows_messages_without_status \ntests/test_runtime.py:test_trace_service_writes_contexts_and_messages \ntests/test_runtime.py:test_trace_service_supports_debug_warning_and_error_levels", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "TraceService" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "query": "Где тесты для TraceService?", + "router_result": { + "schema_version": "1.1", + "intent": "CODE_QA", + "retrieval_profile": "code", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query_plan": { + "raw": "Где тесты для TraceService?", + "normalized": "Где тесты для TraceService?", + "sub_intent": "FIND_TESTS", + "negations": [], + "expansions": [ + "test", + "unit test", + "TraceService" + ], + "keyword_hints": [ + "TraceService" + ], + "path_hints": [], + "doc_scope_hints": [], + "symbol_candidates": [ + "TraceService" + ], + "symbol_kind_hint": "class", + "anchors": [ + { + "type": "SYMBOL", + "value": "TraceService", + "source": "user_text", + "subtype": null, + "span": { + "start": 14, + "end": 26 + }, + "confidence": 0.88 + }, + { + "type": "KEY_TERM", + "value": "тест", + "source": "user_text", + "subtype": null, + "span": { + "start": 4, + "end": 9 + }, + "confidence": 0.9 + } + ] + }, + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "top_k": 8 + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "top_k": 6 + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 10 + } + ], + "filters": { + "test_policy": "INCLUDE", + "path_scope": [], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "test_file_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "test_symbol_patterns": [ + "test_trace_service", + "TestTraceService", + "TraceService" + ], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + }, + "symbol_resolution": { + "status": "pending", + "resolved_symbol": null, + "alternatives": [ + "TraceService" + ], + "confidence": 0.0 + }, + "evidence_policy": { + "require_def": true, + "require_flow": true, + "require_spec": false, + "allow_answer_without_evidence": false + } + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Где тесты для TraceService?", + "sub_intent": "FIND_TESTS", + "path_scope": [], + "keyword_hints": [ + "TraceService" + ], + "symbol_candidates": [ + "TraceService" + ], + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "top_k": 8 + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "top_k": 6 + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 10 + } + ], + "filters": { + "test_policy": "INCLUDE", + "path_scope": [], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "test_file_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "test_symbol_patterns": [ + "test_trace_service", + "TestTraceService", + "TraceService" + ], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + }, + "query_plan": { + "raw": "Где тесты для TraceService?", + "normalized": "Где тесты для TraceService?", + "sub_intent": "FIND_TESTS", + "negations": [], + "expansions": [ + "test", + "unit test", + "TraceService" + ], + "keyword_hints": [ + "TraceService" + ], + "path_hints": [], + "doc_scope_hints": [], + "symbol_candidates": [ + "TraceService" + ], + "symbol_kind_hint": "class", + "anchors": [ + { + "type": "SYMBOL", + "value": "TraceService", + "source": "user_text", + "subtype": null, + "span": { + "start": 14, + "end": 26 + }, + "confidence": 0.88 + }, + { + "type": "KEY_TERM", + "value": "тест", + "source": "user_text", + "subtype": null, + "span": { + "start": 4, + "end": 9 + }, + "confidence": 0.9 + } + ] + } + }, + "retrieval_result": { + "target_symbol_candidates": [ + "TraceService", + "TraceService.open_context", + "TraceService.create_context", + "TraceService.current_trace_id" + ], + "resolved_symbol": "TraceService", + "symbol_resolution_status": "resolved", + "file_candidates": [ + "src/plba/__init__.py", + "src/app_runtime/core/runtime.py", + "src/app_runtime/tracing/__init__.py", + "src/app_runtime/tracing/service.py", + "src/plba/tracing.py", + "tests/test_runtime.py", + "src/app_runtime/contracts/__init__.py" + ], + "code_chunks": [ + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/plba/__init__.py", + "title": "TraceService", + "content": "const TraceService\nTraceService = plba.tracing.TraceService", + "start_line": 20, + "end_line": 20, + "metadata": { + "symbol_id": "259ec03b77b9387ea53f69c77af32791dd29adf6de617ba72dd3f839197342a1", + "qname": "TraceService", + "kind": "const", + "signature": "TraceService = plba.tracing.TraceService", + "parent_symbol_id": null, + "package_or_module": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/core/runtime.py", + "title": "TraceService", + "content": "const TraceService\nTraceService = app_runtime.tracing.service.TraceService", + "start_line": 14, + "end_line": 14, + "metadata": { + "symbol_id": "3ccf6212fd7d9730f9df933e2ee7671b65bdae0520577e1a49c6432262842db6", + "qname": "TraceService", + "kind": "const", + "signature": "TraceService = app_runtime.tracing.service.TraceService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/tracing/__init__.py", + "title": "TraceService", + "content": "const TraceService\nTraceService = app_runtime.tracing.service.TraceService", + "start_line": 2, + "end_line": 2, + "metadata": { + "symbol_id": "ecd2fab7fa9744b2adca84d3d213f7aadcb7e1da84b9c2764a4ab39c65282b11", + "qname": "TraceService", + "kind": "const", + "signature": "TraceService = app_runtime.tracing.service.TraceService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.tracing.__init__", + "is_test": false, + "blob_sha": "a01dea5f773515aeaae8e6d3431fcb93531a8b577dfa26c2e5db16cd6ae6e4d9", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/tracing/service.py", + "title": "TraceService", + "content": "class TraceService\nTraceService(TraceContextFactory)", + "start_line": 39, + "end_line": 166, + "metadata": { + "symbol_id": "c2b2b976d99f2c600000b753731b26e0a69adcb4359398b93073590c5d5d04f4", + "qname": "TraceService", + "kind": "class", + "signature": "TraceService(TraceContextFactory)", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/plba/tracing.py", + "title": "TraceService", + "content": "const TraceService\nTraceService = app_runtime.tracing.service.TraceService", + "start_line": 1, + "end_line": 1, + "metadata": { + "symbol_id": "a4556fb3f83c50ea68b94a679786ce802cab7ffd9d7138aad3d6009b2661f425", + "qname": "TraceService", + "kind": "const", + "signature": "TraceService = app_runtime.tracing.service.TraceService", + "parent_symbol_id": null, + "package_or_module": "src.plba.tracing", + "is_test": false, + "blob_sha": "a27e11c716c93c3fcefe6f11b4cc420a6b743e7606606071d7f1aeeccc4e7d45", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/tracing/service.py", + "title": "TraceService.open_context", + "content": "method TraceService.open_context\nopen_context(self)", + "start_line": 66, + "end_line": 78, + "metadata": { + "symbol_id": "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426", + "qname": "TraceService.open_context", + "kind": "method", + "signature": "open_context(self)", + "parent_symbol_id": "TraceService", + "package_or_module": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/tracing/service.py", + "title": "TraceService.create_context", + "content": "method TraceService.create_context\ncreate_context(self)", + "start_line": 45, + "end_line": 63, + "metadata": { + "symbol_id": "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a", + "qname": "TraceService.create_context", + "kind": "method", + "signature": "create_context(self)", + "parent_symbol_id": "TraceService", + "package_or_module": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/tracing/service.py", + "title": "TraceService.current_trace_id", + "content": "method TraceService.current_trace_id\ncurrent_trace_id(self)", + "start_line": 80, + "end_line": 81, + "metadata": { + "symbol_id": "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c", + "qname": "TraceService.current_trace_id", + "kind": "method", + "signature": "current_trace_id(self)", + "parent_symbol_id": "TraceService", + "package_or_module": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/tracing/service.py", + "title": "TraceService.__init__:dataflow_slice", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.create_context", + "start_line": 42, + "end_line": 61, + "metadata": { + "edge_id": "3b052062067a78aef3302ee1d996897e02a67d1b340397bea4f59fe147c0492a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a", + "dst_ref": "TraceService.create_context", + "resolution": "resolved", + "slice_id": "3b052062067a78aef3302ee1d996897e02a67d1b340397bea4f59fe147c0492a", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.create_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/tracing/service.py", + "title": "TraceService.__init__:dataflow_slice", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.close_context", + "start_line": 42, + "end_line": 84, + "metadata": { + "edge_id": "7a9353ef57c9ae5d19b3a0c6ac50fad05e6d21d31bbe1cd1cd07af6332ba6505", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "01e14158dcced7e52d0c8ac84ac7b9a75225c261b6aca6a1d7da802d0994721c", + "dst_ref": "TraceService.close_context", + "resolution": "resolved", + "slice_id": "7a9353ef57c9ae5d19b3a0c6ac50fad05e6d21d31bbe1cd1cd07af6332ba6505", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.close_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "01e14158dcced7e52d0c8ac84ac7b9a75225c261b6aca6a1d7da802d0994721c" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/tracing/service.py", + "title": "TraceService.__init__:dataflow_slice", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.open_context", + "start_line": 42, + "end_line": 78, + "metadata": { + "edge_id": "a6e13b9ebc4fed84586afd53ed92a4d14757e440873f572b2337d5622ee96031", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426", + "dst_ref": "TraceService.open_context", + "resolution": "resolved", + "slice_id": "a6e13b9ebc4fed84586afd53ed92a4d14757e440873f572b2337d5622ee96031", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.open_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/tracing/service.py", + "title": "TraceService.__init__:dataflow_slice", + "content": "TraceService.__init__\n -> TraceService.transport\n -> TraceService.__init__", + "start_line": 41, + "end_line": 43, + "metadata": { + "edge_id": "1e923a93faa05c3c43ca9b19bd047007a8589ccce57d3cc1798ae7f9f200af98", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "dst_ref": "TraceService.__init__", + "resolution": "resolved", + "slice_id": "1e923a93faa05c3c43ca9b19bd047007a8589ccce57d3cc1798ae7f9f200af98", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.transport", + "TraceService.__init__" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/tracing/service.py", + "title": "TraceService.__init__:dataflow_slice", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.current_trace_id", + "start_line": 42, + "end_line": 81, + "metadata": { + "edge_id": "3ea17138634b1190bded77ddb84aa1595124f6519b246f24fc4b02bd62b5cac1", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c", + "dst_ref": "TraceService.current_trace_id", + "resolution": "resolved", + "slice_id": "3ea17138634b1190bded77ddb84aa1595124f6519b246f24fc4b02bd62b5cac1", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.current_trace_id" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/tracing/service.py", + "title": "TraceService.__init__:dataflow_slice", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.step", + "start_line": 42, + "end_line": 88, + "metadata": { + "edge_id": "9f34c5da9b09fba99df6f6b1bde183a9aeb45111b8218a747c71590c2c9f60f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "c44bfbc66cf747283f30088da3e011a10395031d41e77b74e523c24997f641ca", + "dst_ref": "TraceService.step", + "resolution": "resolved", + "slice_id": "9f34c5da9b09fba99df6f6b1bde183a9aeb45111b8218a747c71590c2c9f60f2", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.step" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "c44bfbc66cf747283f30088da3e011a10395031d41e77b74e523c24997f641ca" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/plba/tracing.py", + "title": "src/plba/tracing.py:1-4", + "content": "from app_runtime.tracing.service import TraceService\nfrom app_runtime.tracing.transport import MySqlTraceTransport, NoOpTraceTransport\n\n__all__ = [\"MySqlTraceTransport\", \"NoOpTraceTransport\", \"TraceService\"]", + "start_line": 1, + "end_line": 4, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.tracing", + "is_test": false, + "blob_sha": "a27e11c716c93c3fcefe6f11b4cc420a6b743e7606606071d7f1aeeccc4e7d45", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "tests/test_runtime.py", + "title": "tests/test_runtime.py:test_trace_service_allows_messages_without_status", + "content": "def test_trace_service_allows_messages_without_status() -> None:\n from app_runtime.tracing.service import TraceService\n\n transport = RecordingTransport()\n manager = TraceService(transport=transport)\n\n with manager.open_context(alias=\"worker\", kind=\"worker\"):\n manager.step(\"optional-status\")\n manager.debug(\"debug without status\")\n manager.info(\"info without status\")\n manager.warning(\"warning without status\")\n manager.error(\"error without status\")\n\n assert [message.status for message in transport.messages] == [\"\", \"\", \"\", \"\"]\n assert all(message.trace_id == transport.contexts[0].trace_id for message in transport.messages)", + "start_line": 279, + "end_line": 293, + "metadata": { + "chunk_index": 11, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/tracing/__init__.py", + "title": "src/app_runtime/tracing/__init__.py:1-17", + "content": "from app_runtime.contracts.trace import TraceContext, TraceContextRecord, TraceLogMessage, TraceTransport\nfrom app_runtime.tracing.service import TraceManager, TraceService\nfrom app_runtime.tracing.store import ActiveTraceContext, TraceContextStore\nfrom app_runtime.tracing.transport import MySqlTraceTransport, NoOpTraceTransport\n\n__all__ = [\n \"ActiveTraceContext\",\n \"MySqlTraceTransport\",\n \"NoOpTraceTransport\",\n \"TraceContext\",\n \"TraceContextRecord\",\n \"TraceContextStore\",\n \"TraceLogMessage\",\n \"TraceManager\",\n \"TraceService\",\n \"TraceTransport\",\n]", + "start_line": 1, + "end_line": 17, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.tracing.__init__", + "is_test": false, + "blob_sha": "a01dea5f773515aeaae8e6d3431fcb93531a8b577dfa26c2e5db16cd6ae6e4d9", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/plba/__init__.py", + "title": "src/plba/__init__.py:1-69", + "content": "from plba.bootstrap import create_runtime\nfrom plba.config import ConfigFileLoader, FileConfigProvider\nfrom plba.control import ControlActionSet, ControlChannel, ControlPlaneService, HttpControlChannel\nfrom plba.contracts import (\n ApplicationModule,\n ConfigProvider,\n HealthContributor,\n TraceContext,\n TraceContextRecord,\n TraceLogMessage,\n TraceTransport,\n Worker,\n WorkerHealth,\n WorkerStatus,\n)\nfrom plba.core import ConfigurationManager, RuntimeManager, ServiceContainer\nfrom plba.health import HealthRegistry\nfrom plba.logging import LogManager\nfrom plba.queue import InMemoryTaskQueue\nfrom plba.tracing import MySqlTraceTransport, NoOpTraceTransport, TraceService\nfrom plba.workflow import (\n StepResult,\n WorkflowContext,\n WorkflowDefinition,\n WorkflowEngine,\n WorkflowEngineHooks,\n WorkflowNode,\n WorkflowRuntimeFactory,\n WorkflowStep,\n)\nfrom plba.workers import WorkerSupervisor\n\n__all__ = [\n \"ApplicationModule\",\n \"ConfigFileLoader\",\n \"ConfigProvider\",\n \"ConfigurationManager\",\n \"ControlActionSet\",\n \"ControlChannel\",\n \"ControlPlaneService\",\n \"create_runtime\",\n \"FileConfigProvider\",\n \"HealthContributor\",\n \"HealthRegistry\",\n \"HttpControlChannel\",\n \"InMemoryTaskQueue\",\n \"LogManager\",\n \"MySqlTraceTransport\",\n \"NoOpTraceTransport\",\n \"RuntimeManager\",\n \"ServiceContainer\",\n \"TraceContext\",\n \"TraceContextRecord\",\n \"TraceLogMessage\",\n \"TraceService\",\n \"TraceTransport\",\n \"StepResult\",\n \"Worker\",\n \"WorkerHealth\",\n \"WorkerStatus\",\n \"WorkflowContext\",\n \"WorkflowDefinition\",\n \"WorkflowEngine\",\n \"WorkflowEngineHooks\",\n \"WorkflowNode\",\n \"WorkflowRuntimeFactory\",\n \"WorkflowStep\",\n \"WorkerSupervisor\",\n]", + "start_line": 1, + "end_line": 69, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "tests/test_runtime.py", + "title": "tests/test_runtime.py:test_trace_service_writes_contexts_and_messages", + "content": "def test_trace_service_writes_contexts_and_messages() -> None:\n from app_runtime.tracing.service import TraceService\n\n transport = RecordingTransport()\n manager = TraceService(transport=transport)\n\n with manager.open_context(alias=\"worker\", kind=\"worker\", attrs={\"routine\": \"incoming\"}):\n manager.step(\"parse\")\n manager.info(\"started\", status=\"ok\", attrs={\"attempt\": 1})\n\n assert len(transport.contexts) == 1\n assert len(transport.messages) == 1\n assert transport.contexts[0].alias == \"worker\"\n assert transport.messages[0].step == \"parse\"", + "start_line": 246, + "end_line": 259, + "metadata": { + "chunk_index": 9, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "tests/test_runtime.py", + "title": "tests/test_runtime.py:test_trace_service_supports_debug_warning_and_error_levels", + "content": "def test_trace_service_supports_debug_warning_and_error_levels() -> None:\n from app_runtime.tracing.service import TraceService\n\n transport = RecordingTransport()\n manager = TraceService(transport=transport)\n\n with manager.open_context(alias=\"worker\", kind=\"worker\", attrs={\"routine\": \"incoming\"}):\n manager.step(\"validate\")\n manager.debug(\"validation details\", attrs={\"rule\": \"basic\"})\n manager.warning(\"validation warning\", status=\"degraded\", attrs={\"attempt\": 1})\n manager.error(\"integration failed\", status=\"failed\", attrs={\"integration\": \"crm\"})\n manager.exception(\"caught exception\", attrs={\"exception_type\": \"RuntimeError\"})\n\n levels = [message.level for message in transport.messages]\n assert levels == [\"DEBUG\", \"WARNING\", \"ERROR\", \"ERROR\"]", + "start_line": 262, + "end_line": 276, + "metadata": { + "chunk_index": 10, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/tracing/service.py", + "title": "src/app_runtime/tracing/service.py:TraceManager", + "content": "class TraceManager(TraceService):\n \"\"\"Compatibility alias during the transition from ConfigManager-shaped naming.\"\"\"", + "start_line": 169, + "end_line": 170, + "metadata": { + "chunk_index": 2, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/core/runtime.py", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "start_line": 18, + "end_line": 179, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/tracing/service.py", + "title": "src/app_runtime/tracing/service.py:TraceService", + "content": "class TraceService(TraceContextFactory):\n def __init__(self, transport: TraceTransport | None = None, store: TraceContextStore | None = None) -> None:\n self.transport = transport or NoOpTraceTransport()\n self.store = store or TraceContextStore()\n self._writer = TraceRecordWriter(self.transport)\n\n def create_context(\n self,\n *,\n alias: str,\n parent_id: str | None = None,\n kind: str | None = None,\n attrs: dict[str, Any] | None = None,\n ) -> str:\n record = TraceContextRecord(\n trace_id=uuid4().hex,\n alias=str(alias or \"\"),\n parent_id=parent_id,\n type=kind,\n event_time=utc_now(),\n attrs=dict(attrs or {}),\n )\n self.store.push(record)\n self._writer.write_context(record)\n return record.trace_id\n\n @contextmanager\n def open_context(\n self,\n *,\n alias: str,\n parent_id: str | None = None,\n kind: str | None = None,\n attrs: dict[str, Any] | None = None,\n ) -> Iterator[str]:\n trace_id = self.create_context(alias=alias, parent_id=parent_id, kind=kind, attrs=attrs)\n try:\n yield trace_id\n finally:\n self.store.pop()\n\n def current_trace_id(self) -> str | None:\n return self.store.current_trace_id()\n\n def close_context(self) -> str | None:\n previous = self.store.pop()\n return previous.record.trace_id if previous else None\n\n def step(self, name: str) -> None:\n self.store.set_step(str(name or \"\"))\n\n def info(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"INFO\", message, status, attrs)\n\n def debug(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"DEBUG\", message, status, attrs)\n\n def warning(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"WARNING\", message, status, attrs)\n\n def error(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"ERROR\", message, status, attrs)\n\n def exception(self, message: str, *, status: str = \"failed\", attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"ERROR\", message, status, attrs)\n\n def new_root(self, operation: str) -> TraceContext:\n trace_id = self.create_context(alias=operation, kind=\"operation\", attrs={\"operation\": operation})\n return TraceContext(trace_id=trace_id, span_id=trace_id, attributes={\"operation\": operation})\n\n def child_of(self, parent: TraceContext, operation: str) -> TraceContext:\n trace_id = self.create_context(\n alias=operation,\n parent_id=parent.trace_id,\n kind=\"worker\",\n attrs={\"operation\": operation},\n )\n return TraceContext(\n trace_id=trace_id,\n span_id=trace_id,\n parent_span_id=parent.span_id,\n attributes={\"operation\": operation},\n )\n\n def attach(self, metadata: dict[str, object], context: TraceContext) -> dict[str, object]:\n updated = dict(metadata)\n updated[\"trace_id\"] = context.trace_id\n updated[\"span_id\"] = context.span_id\n updated[\"parent_span_id\"] = context.parent_span_id\n return updated\n\n def resume(self, metadata: dict[str, object], operation: str) -> TraceContext:\n trace_id = str(metadata.get(\"trace_id\") or uuid4().hex)\n span_id = str(metadata.get(\"span_id\") or trace_id)\n parent_id = metadata.get(\"parent_span_id\")\n self.create_context(\n alias=operation,\n parent_id=str(parent_id) if parent_id else None,\n kind=\"worker\",\n attrs=dict(metadata),\n )\n return TraceContext(\n trace_id=trace_id,\n span_id=span_id,\n parent_span_id=str(parent_id) if parent_id else None,\n attributes={\"operation\": operation},\n )\n\n def _write_message(\n self,\n level: TraceLevel,\n message: str,\n status: str | None,\n attrs: dict[str, Any] | None,\n ) -> None:\n active = self.store.current()\n if active is None:\n raise RuntimeError(\"Trace context is not bound. Call create_context() first.\")\n record = TraceLogMessage(\n trace_id=active.record.trace_id,\n step=active.step,\n status=str(status or \"\"),\n message=str(message or \"\"),\n level=level,\n event_time=utc_now(),\n attrs=dict(attrs or {}),\n )\n self._writer.write_message(record)", + "start_line": 39, + "end_line": 166, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/contracts/__init__.py", + "title": "src/app_runtime/__init__.py:1-1", + "content": "__all__: list[str] = []", + "start_line": 1, + "end_line": 1, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.__init__", + "is_test": false, + "blob_sha": "8eea9df4f6d7b38ca0e39ccc27b04700e3d08dbeec8046d613d22706d19985fa", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "relations": [ + { + "path": "src/app_runtime/tracing/service.py", + "metadata": { + "edge_id": "3b052062067a78aef3302ee1d996897e02a67d1b340397bea4f59fe147c0492a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a", + "dst_ref": "TraceService.create_context", + "resolution": "resolved", + "slice_id": "3b052062067a78aef3302ee1d996897e02a67d1b340397bea4f59fe147c0492a", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.create_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.create_context" + }, + { + "path": "src/app_runtime/tracing/service.py", + "metadata": { + "edge_id": "7a9353ef57c9ae5d19b3a0c6ac50fad05e6d21d31bbe1cd1cd07af6332ba6505", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "01e14158dcced7e52d0c8ac84ac7b9a75225c261b6aca6a1d7da802d0994721c", + "dst_ref": "TraceService.close_context", + "resolution": "resolved", + "slice_id": "7a9353ef57c9ae5d19b3a0c6ac50fad05e6d21d31bbe1cd1cd07af6332ba6505", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.close_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "01e14158dcced7e52d0c8ac84ac7b9a75225c261b6aca6a1d7da802d0994721c" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.close_context" + }, + { + "path": "src/app_runtime/tracing/service.py", + "metadata": { + "edge_id": "a6e13b9ebc4fed84586afd53ed92a4d14757e440873f572b2337d5622ee96031", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426", + "dst_ref": "TraceService.open_context", + "resolution": "resolved", + "slice_id": "a6e13b9ebc4fed84586afd53ed92a4d14757e440873f572b2337d5622ee96031", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.open_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.open_context" + }, + { + "path": "src/app_runtime/tracing/service.py", + "metadata": { + "edge_id": "1e923a93faa05c3c43ca9b19bd047007a8589ccce57d3cc1798ae7f9f200af98", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "dst_ref": "TraceService.__init__", + "resolution": "resolved", + "slice_id": "1e923a93faa05c3c43ca9b19bd047007a8589ccce57d3cc1798ae7f9f200af98", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.transport", + "TraceService.__init__" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "TraceService.__init__\n -> TraceService.transport\n -> TraceService.__init__" + }, + { + "path": "src/app_runtime/tracing/service.py", + "metadata": { + "edge_id": "3ea17138634b1190bded77ddb84aa1595124f6519b246f24fc4b02bd62b5cac1", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c", + "dst_ref": "TraceService.current_trace_id", + "resolution": "resolved", + "slice_id": "3ea17138634b1190bded77ddb84aa1595124f6519b246f24fc4b02bd62b5cac1", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.current_trace_id" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.current_trace_id" + }, + { + "path": "src/app_runtime/tracing/service.py", + "metadata": { + "edge_id": "9f34c5da9b09fba99df6f6b1bde183a9aeb45111b8218a747c71590c2c9f60f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "c44bfbc66cf747283f30088da3e011a10395031d41e77b74e523c24997f641ca", + "dst_ref": "TraceService.step", + "resolution": "resolved", + "slice_id": "9f34c5da9b09fba99df6f6b1bde183a9aeb45111b8218a747c71590c2c9f60f2", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.step" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "c44bfbc66cf747283f30088da3e011a10395031d41e77b74e523c24997f641ca" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.step" + } + ], + "entrypoints": [], + "test_candidates": [ + { + "path": "tests/test_runtime.py", + "title": "tests/test_runtime.py:test_trace_service_allows_messages_without_status", + "content": "def test_trace_service_allows_messages_without_status() -> None:\n from app_runtime.tracing.service import TraceService\n\n transport = RecordingTransport()\n manager = TraceService(transport=transport)\n\n with manager.open_context(alias=\"worker\", kind=\"worker\"):\n manager.step(\"optiona" + }, + { + "path": "tests/test_runtime.py", + "title": "tests/test_runtime.py:test_trace_service_writes_contexts_and_messages", + "content": "def test_trace_service_writes_contexts_and_messages() -> None:\n from app_runtime.tracing.service import TraceService\n\n transport = RecordingTransport()\n manager = TraceService(transport=transport)\n\n with manager.open_context(alias=\"worker\", kind=\"worker\", attrs={\"routine\": \"incoming\"}):\n" + }, + { + "path": "tests/test_runtime.py", + "title": "tests/test_runtime.py:test_trace_service_supports_debug_warning_and_error_levels", + "content": "def test_trace_service_supports_debug_warning_and_error_levels() -> None:\n from app_runtime.tracing.service import TraceService\n\n transport = RecordingTransport()\n manager = TraceService(transport=transport)\n\n with manager.open_context(alias=\"worker\", kind=\"worker\", attrs={\"routine\": \"in" + } + ], + "layer_outcomes": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 6, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 10, + "empty": false, + "fallback_used": false + } + ], + "missing_layers": [], + "raw_rows": [ + { + "path": "src/plba/__init__.py", + "content": "const TraceService\nTraceService = plba.tracing.TraceService", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService", + "span_start": 20, + "span_end": 20, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "259ec03b77b9387ea53f69c77af32791dd29adf6de617ba72dd3f839197342a1", + "qname": "TraceService", + "kind": "const", + "signature": "TraceService = plba.tracing.TraceService", + "parent_symbol_id": null, + "package_or_module": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "const TraceService\nTraceService = app_runtime.tracing.service.TraceService", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService", + "span_start": 14, + "span_end": 14, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "3ccf6212fd7d9730f9df933e2ee7671b65bdae0520577e1a49c6432262842db6", + "qname": "TraceService", + "kind": "const", + "signature": "TraceService = app_runtime.tracing.service.TraceService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/__init__.py", + "content": "const TraceService\nTraceService = app_runtime.tracing.service.TraceService", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService", + "span_start": 2, + "span_end": 2, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "ecd2fab7fa9744b2adca84d3d213f7aadcb7e1da84b9c2764a4ab39c65282b11", + "qname": "TraceService", + "kind": "const", + "signature": "TraceService = app_runtime.tracing.service.TraceService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.tracing.__init__", + "is_test": false, + "blob_sha": "a01dea5f773515aeaae8e6d3431fcb93531a8b577dfa26c2e5db16cd6ae6e4d9", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceService\nTraceService(TraceContextFactory)", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService", + "span_start": 39, + "span_end": 166, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "c2b2b976d99f2c600000b753731b26e0a69adcb4359398b93073590c5d5d04f4", + "qname": "TraceService", + "kind": "class", + "signature": "TraceService(TraceContextFactory)", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/tracing.py", + "content": "const TraceService\nTraceService = app_runtime.tracing.service.TraceService", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService", + "span_start": 1, + "span_end": 1, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "a4556fb3f83c50ea68b94a679786ce802cab7ffd9d7138aad3d6009b2661f425", + "qname": "TraceService", + "kind": "const", + "signature": "TraceService = app_runtime.tracing.service.TraceService", + "parent_symbol_id": null, + "package_or_module": "src.plba.tracing", + "is_test": false, + "blob_sha": "a27e11c716c93c3fcefe6f11b4cc420a6b743e7606606071d7f1aeeccc4e7d45", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "method TraceService.open_context\nopen_context(self)", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService.open_context", + "span_start": 66, + "span_end": 78, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426", + "qname": "TraceService.open_context", + "kind": "method", + "signature": "open_context(self)", + "parent_symbol_id": "TraceService", + "package_or_module": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "method TraceService.create_context\ncreate_context(self)", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService.create_context", + "span_start": 45, + "span_end": 63, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a", + "qname": "TraceService.create_context", + "kind": "method", + "signature": "create_context(self)", + "parent_symbol_id": "TraceService", + "package_or_module": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "method TraceService.current_trace_id\ncurrent_trace_id(self)", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService.current_trace_id", + "span_start": 80, + "span_end": 81, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c", + "qname": "TraceService.current_trace_id", + "kind": "method", + "signature": "current_trace_id(self)", + "parent_symbol_id": "TraceService", + "package_or_module": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.create_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 61, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "3b052062067a78aef3302ee1d996897e02a67d1b340397bea4f59fe147c0492a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a", + "dst_ref": "TraceService.create_context", + "resolution": "resolved", + "slice_id": "3b052062067a78aef3302ee1d996897e02a67d1b340397bea4f59fe147c0492a", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.create_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.close_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 84, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "7a9353ef57c9ae5d19b3a0c6ac50fad05e6d21d31bbe1cd1cd07af6332ba6505", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "01e14158dcced7e52d0c8ac84ac7b9a75225c261b6aca6a1d7da802d0994721c", + "dst_ref": "TraceService.close_context", + "resolution": "resolved", + "slice_id": "7a9353ef57c9ae5d19b3a0c6ac50fad05e6d21d31bbe1cd1cd07af6332ba6505", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.close_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "01e14158dcced7e52d0c8ac84ac7b9a75225c261b6aca6a1d7da802d0994721c" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.open_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 78, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "a6e13b9ebc4fed84586afd53ed92a4d14757e440873f572b2337d5622ee96031", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426", + "dst_ref": "TraceService.open_context", + "resolution": "resolved", + "slice_id": "a6e13b9ebc4fed84586afd53ed92a4d14757e440873f572b2337d5622ee96031", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.open_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.transport\n -> TraceService.__init__", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 41, + "span_end": 43, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "1e923a93faa05c3c43ca9b19bd047007a8589ccce57d3cc1798ae7f9f200af98", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "dst_ref": "TraceService.__init__", + "resolution": "resolved", + "slice_id": "1e923a93faa05c3c43ca9b19bd047007a8589ccce57d3cc1798ae7f9f200af98", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.transport", + "TraceService.__init__" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.current_trace_id", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 81, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "3ea17138634b1190bded77ddb84aa1595124f6519b246f24fc4b02bd62b5cac1", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c", + "dst_ref": "TraceService.current_trace_id", + "resolution": "resolved", + "slice_id": "3ea17138634b1190bded77ddb84aa1595124f6519b246f24fc4b02bd62b5cac1", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.current_trace_id" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.step", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 88, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "9f34c5da9b09fba99df6f6b1bde183a9aeb45111b8218a747c71590c2c9f60f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "c44bfbc66cf747283f30088da3e011a10395031d41e77b74e523c24997f641ca", + "dst_ref": "TraceService.step", + "resolution": "resolved", + "slice_id": "9f34c5da9b09fba99df6f6b1bde183a9aeb45111b8218a747c71590c2c9f60f2", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.step" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "c44bfbc66cf747283f30088da3e011a10395031d41e77b74e523c24997f641ca" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/tracing.py", + "content": "from app_runtime.tracing.service import TraceService\nfrom app_runtime.tracing.transport import MySqlTraceTransport, NoOpTraceTransport\n\n__all__ = [\"MySqlTraceTransport\", \"NoOpTraceTransport\", \"TraceService\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/tracing.py:1-4", + "span_start": 1, + "span_end": 4, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.tracing", + "is_test": false, + "blob_sha": "a27e11c716c93c3fcefe6f11b4cc420a6b743e7606606071d7f1aeeccc4e7d45", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "def test_trace_service_allows_messages_without_status() -> None:\n from app_runtime.tracing.service import TraceService\n\n transport = RecordingTransport()\n manager = TraceService(transport=transport)\n\n with manager.open_context(alias=\"worker\", kind=\"worker\"):\n manager.step(\"optional-status\")\n manager.debug(\"debug without status\")\n manager.info(\"info without status\")\n manager.warning(\"warning without status\")\n manager.error(\"error without status\")\n\n assert [message.status for message in transport.messages] == [\"\", \"\", \"\", \"\"]\n assert all(message.trace_id == transport.contexts[0].trace_id for message in transport.messages)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_runtime.py:test_trace_service_allows_messages_without_status", + "span_start": 279, + "span_end": 293, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 11, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/__init__.py", + "content": "from app_runtime.contracts.trace import TraceContext, TraceContextRecord, TraceLogMessage, TraceTransport\nfrom app_runtime.tracing.service import TraceManager, TraceService\nfrom app_runtime.tracing.store import ActiveTraceContext, TraceContextStore\nfrom app_runtime.tracing.transport import MySqlTraceTransport, NoOpTraceTransport\n\n__all__ = [\n \"ActiveTraceContext\",\n \"MySqlTraceTransport\",\n \"NoOpTraceTransport\",\n \"TraceContext\",\n \"TraceContextRecord\",\n \"TraceContextStore\",\n \"TraceLogMessage\",\n \"TraceManager\",\n \"TraceService\",\n \"TraceTransport\",\n]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/tracing/__init__.py:1-17", + "span_start": 1, + "span_end": 17, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.tracing.__init__", + "is_test": false, + "blob_sha": "a01dea5f773515aeaae8e6d3431fcb93531a8b577dfa26c2e5db16cd6ae6e4d9", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/__init__.py", + "content": "from plba.bootstrap import create_runtime\nfrom plba.config import ConfigFileLoader, FileConfigProvider\nfrom plba.control import ControlActionSet, ControlChannel, ControlPlaneService, HttpControlChannel\nfrom plba.contracts import (\n ApplicationModule,\n ConfigProvider,\n HealthContributor,\n TraceContext,\n TraceContextRecord,\n TraceLogMessage,\n TraceTransport,\n Worker,\n WorkerHealth,\n WorkerStatus,\n)\nfrom plba.core import ConfigurationManager, RuntimeManager, ServiceContainer\nfrom plba.health import HealthRegistry\nfrom plba.logging import LogManager\nfrom plba.queue import InMemoryTaskQueue\nfrom plba.tracing import MySqlTraceTransport, NoOpTraceTransport, TraceService\nfrom plba.workflow import (\n StepResult,\n WorkflowContext,\n WorkflowDefinition,\n WorkflowEngine,\n WorkflowEngineHooks,\n WorkflowNode,\n WorkflowRuntimeFactory,\n WorkflowStep,\n)\nfrom plba.workers import WorkerSupervisor\n\n__all__ = [\n \"ApplicationModule\",\n \"ConfigFileLoader\",\n \"ConfigProvider\",\n \"ConfigurationManager\",\n \"ControlActionSet\",\n \"ControlChannel\",\n \"ControlPlaneService\",\n \"create_runtime\",\n \"FileConfigProvider\",\n \"HealthContributor\",\n \"HealthRegistry\",\n \"HttpControlChannel\",\n \"InMemoryTaskQueue\",\n \"LogManager\",\n \"MySqlTraceTransport\",\n \"NoOpTraceTransport\",\n \"RuntimeManager\",\n \"ServiceContainer\",\n \"TraceContext\",\n \"TraceContextRecord\",\n \"TraceLogMessage\",\n \"TraceService\",\n \"TraceTransport\",\n \"StepResult\",\n \"Worker\",\n \"WorkerHealth\",\n \"WorkerStatus\",\n \"WorkflowContext\",\n \"WorkflowDefinition\",\n \"WorkflowEngine\",\n \"WorkflowEngineHooks\",\n \"WorkflowNode\",\n \"WorkflowRuntimeFactory\",\n \"WorkflowStep\",\n \"WorkerSupervisor\",\n]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/__init__.py:1-69", + "span_start": 1, + "span_end": 69, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "def test_trace_service_writes_contexts_and_messages() -> None:\n from app_runtime.tracing.service import TraceService\n\n transport = RecordingTransport()\n manager = TraceService(transport=transport)\n\n with manager.open_context(alias=\"worker\", kind=\"worker\", attrs={\"routine\": \"incoming\"}):\n manager.step(\"parse\")\n manager.info(\"started\", status=\"ok\", attrs={\"attempt\": 1})\n\n assert len(transport.contexts) == 1\n assert len(transport.messages) == 1\n assert transport.contexts[0].alias == \"worker\"\n assert transport.messages[0].step == \"parse\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_runtime.py:test_trace_service_writes_contexts_and_messages", + "span_start": 246, + "span_end": 259, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 9, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "def test_trace_service_supports_debug_warning_and_error_levels() -> None:\n from app_runtime.tracing.service import TraceService\n\n transport = RecordingTransport()\n manager = TraceService(transport=transport)\n\n with manager.open_context(alias=\"worker\", kind=\"worker\", attrs={\"routine\": \"incoming\"}):\n manager.step(\"validate\")\n manager.debug(\"validation details\", attrs={\"rule\": \"basic\"})\n manager.warning(\"validation warning\", status=\"degraded\", attrs={\"attempt\": 1})\n manager.error(\"integration failed\", status=\"failed\", attrs={\"integration\": \"crm\"})\n manager.exception(\"caught exception\", attrs={\"exception_type\": \"RuntimeError\"})\n\n levels = [message.level for message in transport.messages]\n assert levels == [\"DEBUG\", \"WARNING\", \"ERROR\", \"ERROR\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_runtime.py:test_trace_service_supports_debug_warning_and_error_levels", + "span_start": 262, + "span_end": 276, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 10, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceManager(TraceService):\n \"\"\"Compatibility alias during the transition from ConfigManager-shaped naming.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/tracing/service.py:TraceManager", + "span_start": 169, + "span_end": 170, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 2, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceService(TraceContextFactory):\n def __init__(self, transport: TraceTransport | None = None, store: TraceContextStore | None = None) -> None:\n self.transport = transport or NoOpTraceTransport()\n self.store = store or TraceContextStore()\n self._writer = TraceRecordWriter(self.transport)\n\n def create_context(\n self,\n *,\n alias: str,\n parent_id: str | None = None,\n kind: str | None = None,\n attrs: dict[str, Any] | None = None,\n ) -> str:\n record = TraceContextRecord(\n trace_id=uuid4().hex,\n alias=str(alias or \"\"),\n parent_id=parent_id,\n type=kind,\n event_time=utc_now(),\n attrs=dict(attrs or {}),\n )\n self.store.push(record)\n self._writer.write_context(record)\n return record.trace_id\n\n @contextmanager\n def open_context(\n self,\n *,\n alias: str,\n parent_id: str | None = None,\n kind: str | None = None,\n attrs: dict[str, Any] | None = None,\n ) -> Iterator[str]:\n trace_id = self.create_context(alias=alias, parent_id=parent_id, kind=kind, attrs=attrs)\n try:\n yield trace_id\n finally:\n self.store.pop()\n\n def current_trace_id(self) -> str | None:\n return self.store.current_trace_id()\n\n def close_context(self) -> str | None:\n previous = self.store.pop()\n return previous.record.trace_id if previous else None\n\n def step(self, name: str) -> None:\n self.store.set_step(str(name or \"\"))\n\n def info(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"INFO\", message, status, attrs)\n\n def debug(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"DEBUG\", message, status, attrs)\n\n def warning(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"WARNING\", message, status, attrs)\n\n def error(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"ERROR\", message, status, attrs)\n\n def exception(self, message: str, *, status: str = \"failed\", attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"ERROR\", message, status, attrs)\n\n def new_root(self, operation: str) -> TraceContext:\n trace_id = self.create_context(alias=operation, kind=\"operation\", attrs={\"operation\": operation})\n return TraceContext(trace_id=trace_id, span_id=trace_id, attributes={\"operation\": operation})\n\n def child_of(self, parent: TraceContext, operation: str) -> TraceContext:\n trace_id = self.create_context(\n alias=operation,\n parent_id=parent.trace_id,\n kind=\"worker\",\n attrs={\"operation\": operation},\n )\n return TraceContext(\n trace_id=trace_id,\n span_id=trace_id,\n parent_span_id=parent.span_id,\n attributes={\"operation\": operation},\n )\n\n def attach(self, metadata: dict[str, object], context: TraceContext) -> dict[str, object]:\n updated = dict(metadata)\n updated[\"trace_id\"] = context.trace_id\n updated[\"span_id\"] = context.span_id\n updated[\"parent_span_id\"] = context.parent_span_id\n return updated\n\n def resume(self, metadata: dict[str, object], operation: str) -> TraceContext:\n trace_id = str(metadata.get(\"trace_id\") or uuid4().hex)\n span_id = str(metadata.get(\"span_id\") or trace_id)\n parent_id = metadata.get(\"parent_span_id\")\n self.create_context(\n alias=operation,\n parent_id=str(parent_id) if parent_id else None,\n kind=\"worker\",\n attrs=dict(metadata),\n )\n return TraceContext(\n trace_id=trace_id,\n span_id=span_id,\n parent_span_id=str(parent_id) if parent_id else None,\n attributes={\"operation\": operation},\n )\n\n def _write_message(\n self,\n level: TraceLevel,\n message: str,\n status: str | None,\n attrs: dict[str, Any] | None,\n ) -> None:\n active = self.store.current()\n if active is None:\n raise RuntimeError(\"Trace context is not bound. Call create_context() first.\")\n record = TraceLogMessage(\n trace_id=active.record.trace_id,\n step=active.step,\n status=str(status or \"\"),\n message=str(message or \"\"),\n level=level,\n event_time=utc_now(),\n attrs=dict(attrs or {}),\n )\n self._writer.write_message(record)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/tracing/service.py:TraceService", + "span_start": 39, + "span_end": 166, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/__init__.py", + "content": "__all__: list[str] = []", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/__init__.py:1-1", + "span_start": 1, + "span_end": 1, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.__init__", + "is_test": false, + "blob_sha": "8eea9df4f6d7b38ca0e39ccc27b04700e3d08dbeec8046d613d22706d19985fa", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "retrieval_report": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "vector", + "C2_DEPENDENCY_GRAPH": "vector", + "C0_SOURCE_CHUNKS": "vector" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C0_SOURCE_CHUNKS": 10 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [] + } + }, + "fallback": { + "used": false, + "reason": null + }, + "retrieval_by_layer_ms": { + "C1_SYMBOL_CATALOG": 24, + "C2_DEPENDENCY_GRAPH": 27, + "C0_SOURCE_CHUNKS": 11 + } + } + }, + "diagnostics": { + "intent_correct": null, + "target_found": true, + "layers_used": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "retrieval_sufficient": true, + "answer_mode": "normal", + "router_result": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "FIND_TESTS", + "path_scope": [], + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "symbol_resolution_status": "pending" + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Где тесты для TraceService?", + "sub_intent": "FIND_TESTS", + "path_scope": [], + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 6, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 10, + "empty": false, + "fallback_used": false + } + ], + "empty_layers": [], + "evidence_gate_decision": { + "sufficient": true, + "failure_reasons": [], + "evidence_count": 24 + }, + "failure_reasons": [], + "timings_ms": {} + }, + "rag_rows": [ + { + "path": "src/plba/__init__.py", + "content": "const TraceService\nTraceService = plba.tracing.TraceService", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService", + "span_start": 20, + "span_end": 20, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "259ec03b77b9387ea53f69c77af32791dd29adf6de617ba72dd3f839197342a1", + "qname": "TraceService", + "kind": "const", + "signature": "TraceService = plba.tracing.TraceService", + "parent_symbol_id": null, + "package_or_module": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "const TraceService\nTraceService = app_runtime.tracing.service.TraceService", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService", + "span_start": 14, + "span_end": 14, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "3ccf6212fd7d9730f9df933e2ee7671b65bdae0520577e1a49c6432262842db6", + "qname": "TraceService", + "kind": "const", + "signature": "TraceService = app_runtime.tracing.service.TraceService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/__init__.py", + "content": "const TraceService\nTraceService = app_runtime.tracing.service.TraceService", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService", + "span_start": 2, + "span_end": 2, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "ecd2fab7fa9744b2adca84d3d213f7aadcb7e1da84b9c2764a4ab39c65282b11", + "qname": "TraceService", + "kind": "const", + "signature": "TraceService = app_runtime.tracing.service.TraceService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.tracing.__init__", + "is_test": false, + "blob_sha": "a01dea5f773515aeaae8e6d3431fcb93531a8b577dfa26c2e5db16cd6ae6e4d9", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceService\nTraceService(TraceContextFactory)", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService", + "span_start": 39, + "span_end": 166, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "c2b2b976d99f2c600000b753731b26e0a69adcb4359398b93073590c5d5d04f4", + "qname": "TraceService", + "kind": "class", + "signature": "TraceService(TraceContextFactory)", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/tracing.py", + "content": "const TraceService\nTraceService = app_runtime.tracing.service.TraceService", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService", + "span_start": 1, + "span_end": 1, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "a4556fb3f83c50ea68b94a679786ce802cab7ffd9d7138aad3d6009b2661f425", + "qname": "TraceService", + "kind": "const", + "signature": "TraceService = app_runtime.tracing.service.TraceService", + "parent_symbol_id": null, + "package_or_module": "src.plba.tracing", + "is_test": false, + "blob_sha": "a27e11c716c93c3fcefe6f11b4cc420a6b743e7606606071d7f1aeeccc4e7d45", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "method TraceService.open_context\nopen_context(self)", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService.open_context", + "span_start": 66, + "span_end": 78, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426", + "qname": "TraceService.open_context", + "kind": "method", + "signature": "open_context(self)", + "parent_symbol_id": "TraceService", + "package_or_module": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "method TraceService.create_context\ncreate_context(self)", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService.create_context", + "span_start": 45, + "span_end": 63, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a", + "qname": "TraceService.create_context", + "kind": "method", + "signature": "create_context(self)", + "parent_symbol_id": "TraceService", + "package_or_module": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "method TraceService.current_trace_id\ncurrent_trace_id(self)", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService.current_trace_id", + "span_start": 80, + "span_end": 81, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c", + "qname": "TraceService.current_trace_id", + "kind": "method", + "signature": "current_trace_id(self)", + "parent_symbol_id": "TraceService", + "package_or_module": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.create_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 61, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3b052062067a78aef3302ee1d996897e02a67d1b340397bea4f59fe147c0492a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a", + "dst_ref": "TraceService.create_context", + "resolution": "resolved", + "slice_id": "3b052062067a78aef3302ee1d996897e02a67d1b340397bea4f59fe147c0492a", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.create_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.close_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 84, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "7a9353ef57c9ae5d19b3a0c6ac50fad05e6d21d31bbe1cd1cd07af6332ba6505", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "01e14158dcced7e52d0c8ac84ac7b9a75225c261b6aca6a1d7da802d0994721c", + "dst_ref": "TraceService.close_context", + "resolution": "resolved", + "slice_id": "7a9353ef57c9ae5d19b3a0c6ac50fad05e6d21d31bbe1cd1cd07af6332ba6505", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.close_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "01e14158dcced7e52d0c8ac84ac7b9a75225c261b6aca6a1d7da802d0994721c" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.open_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 78, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a6e13b9ebc4fed84586afd53ed92a4d14757e440873f572b2337d5622ee96031", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426", + "dst_ref": "TraceService.open_context", + "resolution": "resolved", + "slice_id": "a6e13b9ebc4fed84586afd53ed92a4d14757e440873f572b2337d5622ee96031", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.open_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.transport\n -> TraceService.__init__", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 41, + "span_end": 43, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "1e923a93faa05c3c43ca9b19bd047007a8589ccce57d3cc1798ae7f9f200af98", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "dst_ref": "TraceService.__init__", + "resolution": "resolved", + "slice_id": "1e923a93faa05c3c43ca9b19bd047007a8589ccce57d3cc1798ae7f9f200af98", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.transport", + "TraceService.__init__" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.current_trace_id", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 81, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3ea17138634b1190bded77ddb84aa1595124f6519b246f24fc4b02bd62b5cac1", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c", + "dst_ref": "TraceService.current_trace_id", + "resolution": "resolved", + "slice_id": "3ea17138634b1190bded77ddb84aa1595124f6519b246f24fc4b02bd62b5cac1", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.current_trace_id" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.step", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 88, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "9f34c5da9b09fba99df6f6b1bde183a9aeb45111b8218a747c71590c2c9f60f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "c44bfbc66cf747283f30088da3e011a10395031d41e77b74e523c24997f641ca", + "dst_ref": "TraceService.step", + "resolution": "resolved", + "slice_id": "9f34c5da9b09fba99df6f6b1bde183a9aeb45111b8218a747c71590c2c9f60f2", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.step" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "c44bfbc66cf747283f30088da3e011a10395031d41e77b74e523c24997f641ca" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/tracing.py", + "content": "from app_runtime.tracing.service import TraceService\nfrom app_runtime.tracing.transport import MySqlTraceTransport, NoOpTraceTransport\n\n__all__ = [\"MySqlTraceTransport\", \"NoOpTraceTransport\", \"TraceService\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/tracing.py:1-4", + "span_start": 1, + "span_end": 4, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.tracing", + "is_test": false, + "blob_sha": "a27e11c716c93c3fcefe6f11b4cc420a6b743e7606606071d7f1aeeccc4e7d45", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "def test_trace_service_allows_messages_without_status() -> None:\n from app_runtime.tracing.service import TraceService\n\n transport = RecordingTransport()\n manager = TraceService(transport=transport)\n\n with manager.open_context(alias=\"worker\", kind=\"worker\"):\n manager.step(\"optional-status\")\n manager.debug(\"debug without status\")\n manager.info(\"info without status\")\n manager.warning(\"warning without status\")\n manager.error(\"error without status\")\n\n assert [message.status for message in transport.messages] == [\"\", \"\", \"\", \"\"]\n assert all(message.trace_id == transport.contexts[0].trace_id for message in transport.messages)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_runtime.py:test_trace_service_allows_messages_without_status", + "span_start": 279, + "span_end": 293, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 11, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/__init__.py", + "content": "from app_runtime.contracts.trace import TraceContext, TraceContextRecord, TraceLogMessage, TraceTransport\nfrom app_runtime.tracing.service import TraceManager, TraceService\nfrom app_runtime.tracing.store import ActiveTraceContext, TraceContextStore\nfrom app_runtime.tracing.transport import MySqlTraceTransport, NoOpTraceTransport\n\n__all__ = [\n \"ActiveTraceContext\",\n \"MySqlTraceTransport\",\n \"NoOpTraceTransport\",\n \"TraceContext\",\n \"TraceContextRecord\",\n \"TraceContextStore\",\n \"TraceLogMessage\",\n \"TraceManager\",\n \"TraceService\",\n \"TraceTransport\",\n]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/tracing/__init__.py:1-17", + "span_start": 1, + "span_end": 17, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.tracing.__init__", + "is_test": false, + "blob_sha": "a01dea5f773515aeaae8e6d3431fcb93531a8b577dfa26c2e5db16cd6ae6e4d9", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/__init__.py", + "content": "from plba.bootstrap import create_runtime\nfrom plba.config import ConfigFileLoader, FileConfigProvider\nfrom plba.control import ControlActionSet, ControlChannel, ControlPlaneService, HttpControlChannel\nfrom plba.contracts import (\n ApplicationModule,\n ConfigProvider,\n HealthContributor,\n TraceContext,\n TraceContextRecord,\n TraceLogMessage,\n TraceTransport,\n Worker,\n WorkerHealth,\n WorkerStatus,\n)\nfrom plba.core import ConfigurationManager, RuntimeManager, ServiceContainer\nfrom plba.health import HealthRegistry\nfrom plba.logging import LogManager\nfrom plba.queue import InMemoryTaskQueue\nfrom plba.tracing import MySqlTraceTransport, NoOpTraceTransport, TraceService\nfrom plba.workflow import (\n StepResult,\n WorkflowContext,\n WorkflowDefinition,\n WorkflowEngine,\n WorkflowEngineHooks,\n WorkflowNode,\n WorkflowRuntimeFactory,\n WorkflowStep,\n)\nfrom plba.workers import WorkerSupervisor\n\n__all__ = [\n \"ApplicationModule\",\n \"ConfigFileLoader\",\n \"ConfigProvider\",\n \"ConfigurationManager\",\n \"ControlActionSet\",\n \"ControlChannel\",\n \"ControlPlaneService\",\n \"create_runtime\",\n \"FileConfigProvider\",\n \"HealthContributor\",\n \"HealthRegistry\",\n \"HttpControlChannel\",\n \"InMemoryTaskQueue\",\n \"LogManager\",\n \"MySqlTraceTransport\",\n \"NoOpTraceTransport\",\n \"RuntimeManager\",\n \"ServiceContainer\",\n \"TraceContext\",\n \"TraceContextRecord\",\n \"TraceLogMessage\",\n \"TraceService\",\n \"TraceTransport\",\n \"StepResult\",\n \"Worker\",\n \"WorkerHealth\",\n \"WorkerStatus\",\n \"WorkflowContext\",\n \"WorkflowDefinition\",\n \"WorkflowEngine\",\n \"WorkflowEngineHooks\",\n \"WorkflowNode\",\n \"WorkflowRuntimeFactory\",\n \"WorkflowStep\",\n \"WorkerSupervisor\",\n]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/__init__.py:1-69", + "span_start": 1, + "span_end": 69, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "def test_trace_service_writes_contexts_and_messages() -> None:\n from app_runtime.tracing.service import TraceService\n\n transport = RecordingTransport()\n manager = TraceService(transport=transport)\n\n with manager.open_context(alias=\"worker\", kind=\"worker\", attrs={\"routine\": \"incoming\"}):\n manager.step(\"parse\")\n manager.info(\"started\", status=\"ok\", attrs={\"attempt\": 1})\n\n assert len(transport.contexts) == 1\n assert len(transport.messages) == 1\n assert transport.contexts[0].alias == \"worker\"\n assert transport.messages[0].step == \"parse\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_runtime.py:test_trace_service_writes_contexts_and_messages", + "span_start": 246, + "span_end": 259, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 9, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "def test_trace_service_supports_debug_warning_and_error_levels() -> None:\n from app_runtime.tracing.service import TraceService\n\n transport = RecordingTransport()\n manager = TraceService(transport=transport)\n\n with manager.open_context(alias=\"worker\", kind=\"worker\", attrs={\"routine\": \"incoming\"}):\n manager.step(\"validate\")\n manager.debug(\"validation details\", attrs={\"rule\": \"basic\"})\n manager.warning(\"validation warning\", status=\"degraded\", attrs={\"attempt\": 1})\n manager.error(\"integration failed\", status=\"failed\", attrs={\"integration\": \"crm\"})\n manager.exception(\"caught exception\", attrs={\"exception_type\": \"RuntimeError\"})\n\n levels = [message.level for message in transport.messages]\n assert levels == [\"DEBUG\", \"WARNING\", \"ERROR\", \"ERROR\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_runtime.py:test_trace_service_supports_debug_warning_and_error_levels", + "span_start": 262, + "span_end": 276, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 10, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceManager(TraceService):\n \"\"\"Compatibility alias during the transition from ConfigManager-shaped naming.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/tracing/service.py:TraceManager", + "span_start": 169, + "span_end": 170, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 2, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceService(TraceContextFactory):\n def __init__(self, transport: TraceTransport | None = None, store: TraceContextStore | None = None) -> None:\n self.transport = transport or NoOpTraceTransport()\n self.store = store or TraceContextStore()\n self._writer = TraceRecordWriter(self.transport)\n\n def create_context(\n self,\n *,\n alias: str,\n parent_id: str | None = None,\n kind: str | None = None,\n attrs: dict[str, Any] | None = None,\n ) -> str:\n record = TraceContextRecord(\n trace_id=uuid4().hex,\n alias=str(alias or \"\"),\n parent_id=parent_id,\n type=kind,\n event_time=utc_now(),\n attrs=dict(attrs or {}),\n )\n self.store.push(record)\n self._writer.write_context(record)\n return record.trace_id\n\n @contextmanager\n def open_context(\n self,\n *,\n alias: str,\n parent_id: str | None = None,\n kind: str | None = None,\n attrs: dict[str, Any] | None = None,\n ) -> Iterator[str]:\n trace_id = self.create_context(alias=alias, parent_id=parent_id, kind=kind, attrs=attrs)\n try:\n yield trace_id\n finally:\n self.store.pop()\n\n def current_trace_id(self) -> str | None:\n return self.store.current_trace_id()\n\n def close_context(self) -> str | None:\n previous = self.store.pop()\n return previous.record.trace_id if previous else None\n\n def step(self, name: str) -> None:\n self.store.set_step(str(name or \"\"))\n\n def info(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"INFO\", message, status, attrs)\n\n def debug(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"DEBUG\", message, status, attrs)\n\n def warning(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"WARNING\", message, status, attrs)\n\n def error(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"ERROR\", message, status, attrs)\n\n def exception(self, message: str, *, status: str = \"failed\", attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"ERROR\", message, status, attrs)\n\n def new_root(self, operation: str) -> TraceContext:\n trace_id = self.create_context(alias=operation, kind=\"operation\", attrs={\"operation\": operation})\n return TraceContext(trace_id=trace_id, span_id=trace_id, attributes={\"operation\": operation})\n\n def child_of(self, parent: TraceContext, operation: str) -> TraceContext:\n trace_id = self.create_context(\n alias=operation,\n parent_id=parent.trace_id,\n kind=\"worker\",\n attrs={\"operation\": operation},\n )\n return TraceContext(\n trace_id=trace_id,\n span_id=trace_id,\n parent_span_id=parent.span_id,\n attributes={\"operation\": operation},\n )\n\n def attach(self, metadata: dict[str, object], context: TraceContext) -> dict[str, object]:\n updated = dict(metadata)\n updated[\"trace_id\"] = context.trace_id\n updated[\"span_id\"] = context.span_id\n updated[\"parent_span_id\"] = context.parent_span_id\n return updated\n\n def resume(self, metadata: dict[str, object], operation: str) -> TraceContext:\n trace_id = str(metadata.get(\"trace_id\") or uuid4().hex)\n span_id = str(metadata.get(\"span_id\") or trace_id)\n parent_id = metadata.get(\"parent_span_id\")\n self.create_context(\n alias=operation,\n parent_id=str(parent_id) if parent_id else None,\n kind=\"worker\",\n attrs=dict(metadata),\n )\n return TraceContext(\n trace_id=trace_id,\n span_id=span_id,\n parent_span_id=str(parent_id) if parent_id else None,\n attributes={\"operation\": operation},\n )\n\n def _write_message(\n self,\n level: TraceLevel,\n message: str,\n status: str | None,\n attrs: dict[str, Any] | None,\n ) -> None:\n active = self.store.current()\n if active is None:\n raise RuntimeError(\"Trace context is not bound. Call create_context() first.\")\n record = TraceLogMessage(\n trace_id=active.record.trace_id,\n step=active.step,\n status=str(status or \"\"),\n message=str(message or \"\"),\n level=level,\n event_time=utc_now(),\n attrs=dict(attrs or {}),\n )\n self._writer.write_message(record)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/tracing/service.py:TraceService", + "span_start": 39, + "span_end": 166, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/__init__.py", + "content": "__all__: list[str] = []", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/__init__.py:1-1", + "span_start": 1, + "span_end": 1, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.__init__", + "is_test": false, + "blob_sha": "8eea9df4f6d7b38ca0e39ccc27b04700e3d08dbeec8046d613d22706d19985fa", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "validation": { + "passed": true, + "action": "return", + "reasons": [] + } + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-find-tests-trace-service.md b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-find-tests-trace-service.md new file mode 100644 index 0000000..36b6727 --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-find-tests-trace-service.md @@ -0,0 +1,32 @@ +# plba-v2-find-tests-trace-service + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: agent_runtime +- mode: full_chain +- passed: True + +## Query +Где тесты для TraceService? + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 24, + "llm_answer": "tests/test_runtime.py:test_trace_service_allows_messages_without_status \ntests/test_runtime.py:test_trace_service_writes_contexts_and_messages \ntests/test_runtime.py:test_trace_service_supports_debug_warning_and_error_levels", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "TraceService" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-find-tests-workflow-runtime-factory-negative.json b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-find-tests-workflow-runtime-factory-negative.json new file mode 100644 index 0000000..7fa9a08 --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-find-tests-workflow-runtime-factory-negative.json @@ -0,0 +1,3001 @@ +{ + "case_id": "plba-v2-find-tests-workflow-runtime-factory-negative", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "agent_runtime", + "mode": "full_chain", + "query": "Где тесты для WorkflowRuntimeFactory?", + "actual": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 24, + "llm_answer": "Insufficient evidence for a confident answer. No test candidates found.", + "answer_mode": "degraded", + "path_scope": [], + "symbol_candidates": [ + "WorkflowRuntimeFactory" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "query": "Где тесты для WorkflowRuntimeFactory?", + "router_result": { + "schema_version": "1.1", + "intent": "CODE_QA", + "retrieval_profile": "code", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query_plan": { + "raw": "Где тесты для WorkflowRuntimeFactory?", + "normalized": "Где тесты для WorkflowRuntimeFactory?", + "sub_intent": "FIND_TESTS", + "negations": [], + "expansions": [ + "test", + "unit test", + "WorkflowRuntimeFactory" + ], + "keyword_hints": [ + "WorkflowRuntimeFactory" + ], + "path_hints": [], + "doc_scope_hints": [], + "symbol_candidates": [ + "WorkflowRuntimeFactory" + ], + "symbol_kind_hint": "class", + "anchors": [ + { + "type": "SYMBOL", + "value": "WorkflowRuntimeFactory", + "source": "user_text", + "subtype": null, + "span": { + "start": 14, + "end": 36 + }, + "confidence": 0.88 + }, + { + "type": "KEY_TERM", + "value": "тест", + "source": "user_text", + "subtype": null, + "span": { + "start": 4, + "end": 9 + }, + "confidence": 0.9 + } + ] + }, + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "top_k": 8 + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "top_k": 6 + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 10 + } + ], + "filters": { + "test_policy": "INCLUDE", + "path_scope": [], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "test_file_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "test_symbol_patterns": [ + "test_workflow_runtime_factory", + "TestWorkflowRuntimeFactory", + "WorkflowRuntimeFactory" + ], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + }, + "symbol_resolution": { + "status": "pending", + "resolved_symbol": null, + "alternatives": [ + "WorkflowRuntimeFactory" + ], + "confidence": 0.0 + }, + "evidence_policy": { + "require_def": true, + "require_flow": true, + "require_spec": false, + "allow_answer_without_evidence": false + } + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Где тесты для WorkflowRuntimeFactory?", + "sub_intent": "FIND_TESTS", + "path_scope": [], + "keyword_hints": [ + "WorkflowRuntimeFactory" + ], + "symbol_candidates": [ + "WorkflowRuntimeFactory" + ], + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "top_k": 8 + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "top_k": 6 + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 10 + } + ], + "filters": { + "test_policy": "INCLUDE", + "path_scope": [], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "test_file_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "test_symbol_patterns": [ + "test_workflow_runtime_factory", + "TestWorkflowRuntimeFactory", + "WorkflowRuntimeFactory" + ], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + }, + "query_plan": { + "raw": "Где тесты для WorkflowRuntimeFactory?", + "normalized": "Где тесты для WorkflowRuntimeFactory?", + "sub_intent": "FIND_TESTS", + "negations": [], + "expansions": [ + "test", + "unit test", + "WorkflowRuntimeFactory" + ], + "keyword_hints": [ + "WorkflowRuntimeFactory" + ], + "path_hints": [], + "doc_scope_hints": [], + "symbol_candidates": [ + "WorkflowRuntimeFactory" + ], + "symbol_kind_hint": "class", + "anchors": [ + { + "type": "SYMBOL", + "value": "WorkflowRuntimeFactory", + "source": "user_text", + "subtype": null, + "span": { + "start": 14, + "end": 36 + }, + "confidence": 0.88 + }, + { + "type": "KEY_TERM", + "value": "тест", + "source": "user_text", + "subtype": null, + "span": { + "start": 4, + "end": 9 + }, + "confidence": 0.9 + } + ] + } + }, + "retrieval_result": { + "target_symbol_candidates": [ + "WorkflowRuntimeFactory", + "WorkflowRuntimeFactory.__init__", + "WorkflowRuntimeFactory.create_engine", + "WorkflowPersistence", + "annotations", + "WorkflowEngine" + ], + "resolved_symbol": "WorkflowRuntimeFactory", + "symbol_resolution_status": "resolved", + "file_candidates": [ + "src/plba/__init__.py", + "src/app_runtime/workflow/runtime_factory.py", + "src/plba/workflow.py", + "src/app_runtime/config/__init__.py", + "src/app_runtime/config/providers.py", + "src/app_runtime/contracts/__init__.py", + "src/app_runtime/config/file_loader.py", + "src/app_runtime/contracts/config.py", + "src/app_runtime/contracts/health.py", + "src/app_runtime/contracts/application.py" + ], + "code_chunks": [ + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/plba/__init__.py", + "title": "WorkflowRuntimeFactory", + "content": "const WorkflowRuntimeFactory\nWorkflowRuntimeFactory = plba.workflow.WorkflowRuntimeFactory", + "start_line": 21, + "end_line": 30, + "metadata": { + "symbol_id": "cb7c73db05c2622aac89114bed1cddd1d567de21cfac5c53037c62b1074b25c9", + "qname": "WorkflowRuntimeFactory", + "kind": "const", + "signature": "WorkflowRuntimeFactory = plba.workflow.WorkflowRuntimeFactory", + "parent_symbol_id": null, + "package_or_module": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/workflow/runtime_factory.py", + "title": "WorkflowRuntimeFactory", + "content": "class WorkflowRuntimeFactory\nWorkflowRuntimeFactory", + "start_line": 7, + "end_line": 19, + "metadata": { + "symbol_id": "9da827270329de64ebb426fadaaa5e35145e6666b92c6da186e08bf4b071f458", + "qname": "WorkflowRuntimeFactory", + "kind": "class", + "signature": "WorkflowRuntimeFactory", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.workflow.runtime_factory", + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/plba/workflow.py", + "title": "WorkflowRuntimeFactory", + "content": "const WorkflowRuntimeFactory\nWorkflowRuntimeFactory = app_runtime.workflow.runtime_factory.WorkflowRuntimeFactory", + "start_line": 7, + "end_line": 7, + "metadata": { + "symbol_id": "80865947d1ca709971efe9d68a9ee1f348c1c43d351bf4e1b4a5884d72985b6b", + "qname": "WorkflowRuntimeFactory", + "kind": "const", + "signature": "WorkflowRuntimeFactory = app_runtime.workflow.runtime_factory.WorkflowRuntimeFactory", + "parent_symbol_id": null, + "package_or_module": "src.plba.workflow", + "is_test": false, + "blob_sha": "f227797606042273d1f1798f76846952892eeb9e4e9e6a38fb8a631d7231ff39", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/workflow/runtime_factory.py", + "title": "WorkflowRuntimeFactory.__init__", + "content": "method WorkflowRuntimeFactory.__init__\n__init__(self, connection_factory)", + "start_line": 8, + "end_line": 12, + "metadata": { + "symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "qname": "WorkflowRuntimeFactory.__init__", + "kind": "method", + "signature": "__init__(self, connection_factory)", + "parent_symbol_id": "WorkflowRuntimeFactory", + "package_or_module": "src.app_runtime.workflow.runtime_factory", + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/workflow/runtime_factory.py", + "title": "WorkflowRuntimeFactory.create_engine", + "content": "method WorkflowRuntimeFactory.create_engine\ncreate_engine(self, workflow)", + "start_line": 14, + "end_line": 19, + "metadata": { + "symbol_id": "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333", + "qname": "WorkflowRuntimeFactory.create_engine", + "kind": "method", + "signature": "create_engine(self, workflow)", + "parent_symbol_id": "WorkflowRuntimeFactory", + "package_or_module": "src.app_runtime.workflow.runtime_factory", + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/workflow/runtime_factory.py", + "title": "WorkflowPersistence", + "content": "const WorkflowPersistence\nWorkflowPersistence = app_runtime.workflow.persistence.WorkflowPersistence", + "start_line": 4, + "end_line": 4, + "metadata": { + "symbol_id": "35693d37698e35079400b6a021d46209966ce469d9f77763d1c82d82ef4600b2", + "qname": "WorkflowPersistence", + "kind": "const", + "signature": "WorkflowPersistence = app_runtime.workflow.persistence.WorkflowPersistence", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.workflow.runtime_factory", + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/workflow/runtime_factory.py", + "title": "annotations", + "content": "const annotations\nannotations = __future__.annotations", + "start_line": 1, + "end_line": 1, + "metadata": { + "symbol_id": "e016ec68f9d15d52fe0505774229fafc705c1bf3dfda78845a3db9b032a4441d", + "qname": "annotations", + "kind": "const", + "signature": "annotations = __future__.annotations", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.workflow.runtime_factory", + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/workflow/runtime_factory.py", + "title": "WorkflowEngine", + "content": "const WorkflowEngine\nWorkflowEngine = app_runtime.workflow.engine.workflow_engine.WorkflowEngine", + "start_line": 3, + "end_line": 3, + "metadata": { + "symbol_id": "da4aee8bc7d248177fbc4f892732c6eb08baa6d268c32921a217747143a99fe0", + "qname": "WorkflowEngine", + "kind": "const", + "signature": "WorkflowEngine = app_runtime.workflow.engine.workflow_engine.WorkflowEngine", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.workflow.runtime_factory", + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/workflow/runtime_factory.py", + "title": "WorkflowRuntimeFactory.__init__:dataflow_slice", + "content": "WorkflowRuntimeFactory.__init__\n -> WorkflowRuntimeFactory._hooks\n -> WorkflowRuntimeFactory.create_engine", + "start_line": 11, + "end_line": 19, + "metadata": { + "edge_id": "db6124c75b447e4a0a9ba267bd6d6cdf267b41a733b2843d724dd42ec6f4945d", + "edge_type": "dataflow_slice", + "src_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "src_qname": "WorkflowRuntimeFactory.__init__", + "dst_symbol_id": "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333", + "dst_ref": "WorkflowRuntimeFactory.create_engine", + "resolution": "resolved", + "slice_id": "db6124c75b447e4a0a9ba267bd6d6cdf267b41a733b2843d724dd42ec6f4945d", + "root_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "path_symbols": [ + "WorkflowRuntimeFactory.__init__", + "WorkflowRuntimeFactory._hooks", + "WorkflowRuntimeFactory.create_engine" + ], + "path_symbol_ids": [ + "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/workflow/runtime_factory.py", + "title": "WorkflowRuntimeFactory.__init__:dataflow_slice", + "content": "WorkflowRuntimeFactory.__init__\n -> WorkflowRuntimeFactory._snapshot_sanitizer\n -> WorkflowRuntimeFactory.create_engine", + "start_line": 12, + "end_line": 17, + "metadata": { + "edge_id": "f46f5a871a3800b517b0f94ed2551392629e1d7920bc3e3b5a21e0d8f012b741", + "edge_type": "dataflow_slice", + "src_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "src_qname": "WorkflowRuntimeFactory.__init__", + "dst_symbol_id": "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333", + "dst_ref": "WorkflowRuntimeFactory.create_engine", + "resolution": "resolved", + "slice_id": "f46f5a871a3800b517b0f94ed2551392629e1d7920bc3e3b5a21e0d8f012b741", + "root_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "path_symbols": [ + "WorkflowRuntimeFactory.__init__", + "WorkflowRuntimeFactory._snapshot_sanitizer", + "WorkflowRuntimeFactory.create_engine" + ], + "path_symbol_ids": [ + "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/workflow/runtime_factory.py", + "title": "WorkflowRuntimeFactory.__init__:dataflow_slice", + "content": "WorkflowRuntimeFactory.__init__\n -> WorkflowRuntimeFactory._connection_factory\n -> WorkflowRuntimeFactory.create_engine", + "start_line": 9, + "end_line": 16, + "metadata": { + "edge_id": "543624853400c556d1939007017145281d76b00a694c7d5c4fbb0414ded3434e", + "edge_type": "dataflow_slice", + "src_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "src_qname": "WorkflowRuntimeFactory.__init__", + "dst_symbol_id": "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333", + "dst_ref": "WorkflowRuntimeFactory.create_engine", + "resolution": "resolved", + "slice_id": "543624853400c556d1939007017145281d76b00a694c7d5c4fbb0414ded3434e", + "root_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "path_symbols": [ + "WorkflowRuntimeFactory.__init__", + "WorkflowRuntimeFactory._connection_factory", + "WorkflowRuntimeFactory.create_engine" + ], + "path_symbol_ids": [ + "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/workflow/runtime_factory.py", + "title": "WorkflowRuntimeFactory.__init__:dataflow_slice", + "content": "WorkflowRuntimeFactory.__init__\n -> WorkflowRuntimeFactory._traces\n -> WorkflowRuntimeFactory.create_engine", + "start_line": 10, + "end_line": 19, + "metadata": { + "edge_id": "346cf5ddb4308b8403d27c5b54da8cba298bb0af7dc04c2fe30312ef574103c6", + "edge_type": "dataflow_slice", + "src_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "src_qname": "WorkflowRuntimeFactory.__init__", + "dst_symbol_id": "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333", + "dst_ref": "WorkflowRuntimeFactory.create_engine", + "resolution": "resolved", + "slice_id": "346cf5ddb4308b8403d27c5b54da8cba298bb0af7dc04c2fe30312ef574103c6", + "root_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "path_symbols": [ + "WorkflowRuntimeFactory.__init__", + "WorkflowRuntimeFactory._traces", + "WorkflowRuntimeFactory.create_engine" + ], + "path_symbol_ids": [ + "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/workflow/runtime_factory.py", + "title": "WorkflowRuntimeFactory.__init__:writes_attr", + "content": "WorkflowRuntimeFactory.__init__ writes_attr WorkflowRuntimeFactory._snapshot_sanitizer", + "start_line": 12, + "end_line": 12, + "metadata": { + "edge_id": "de0cb1913ba41f673cfb601cab23cfb2e1044ed3dd8c061aff486075aeb8af20", + "edge_type": "writes_attr", + "src_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "src_qname": "WorkflowRuntimeFactory.__init__", + "dst_symbol_id": null, + "dst_ref": "WorkflowRuntimeFactory._snapshot_sanitizer", + "resolution": "partial", + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/workflow/runtime_factory.py", + "title": "WorkflowRuntimeFactory.create_engine:calls", + "content": "WorkflowRuntimeFactory.create_engine calls WorkflowPersistence.create_default", + "start_line": 15, + "end_line": 18, + "metadata": { + "edge_id": "fa86efb6871092fc88df68295c0d92dbe46253e1afa3246ca62b6da11d4d5569", + "edge_type": "calls", + "src_symbol_id": "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333", + "src_qname": "WorkflowRuntimeFactory.create_engine", + "dst_symbol_id": null, + "dst_ref": "WorkflowPersistence.create_default", + "resolution": "partial", + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/workflow/runtime_factory.py", + "title": "src/app_runtime/workflow/runtime_factory.py:WorkflowRuntimeFactory", + "content": "class WorkflowRuntimeFactory:\n def __init__(self, connection_factory=None, *, traces, hooks=None, snapshot_sanitizer=None) -> None:\n self._connection_factory = connection_factory\n self._traces = traces\n self._hooks = hooks\n self._snapshot_sanitizer = snapshot_sanitizer\n\n def create_engine(self, workflow) -> WorkflowEngine:\n persistence = WorkflowPersistence.create_default(\n self._connection_factory,\n snapshot_sanitizer=self._snapshot_sanitizer,\n )\n return WorkflowEngine(workflow, persistence, traces=self._traces, hooks=self._hooks)", + "start_line": 7, + "end_line": 19, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.workflow.runtime_factory", + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/plba/__init__.py", + "title": "src/plba/__init__.py:1-69", + "content": "from plba.bootstrap import create_runtime\nfrom plba.config import ConfigFileLoader, FileConfigProvider\nfrom plba.control import ControlActionSet, ControlChannel, ControlPlaneService, HttpControlChannel\nfrom plba.contracts import (\n ApplicationModule,\n ConfigProvider,\n HealthContributor,\n TraceContext,\n TraceContextRecord,\n TraceLogMessage,\n TraceTransport,\n Worker,\n WorkerHealth,\n WorkerStatus,\n)\nfrom plba.core import ConfigurationManager, RuntimeManager, ServiceContainer\nfrom plba.health import HealthRegistry\nfrom plba.logging import LogManager\nfrom plba.queue import InMemoryTaskQueue\nfrom plba.tracing import MySqlTraceTransport, NoOpTraceTransport, TraceService\nfrom plba.workflow import (\n StepResult,\n WorkflowContext,\n WorkflowDefinition,\n WorkflowEngine,\n WorkflowEngineHooks,\n WorkflowNode,\n WorkflowRuntimeFactory,\n WorkflowStep,\n)\nfrom plba.workers import WorkerSupervisor\n\n__all__ = [\n \"ApplicationModule\",\n \"ConfigFileLoader\",\n \"ConfigProvider\",\n \"ConfigurationManager\",\n \"ControlActionSet\",\n \"ControlChannel\",\n \"ControlPlaneService\",\n \"create_runtime\",\n \"FileConfigProvider\",\n \"HealthContributor\",\n \"HealthRegistry\",\n \"HttpControlChannel\",\n \"InMemoryTaskQueue\",\n \"LogManager\",\n \"MySqlTraceTransport\",\n \"NoOpTraceTransport\",\n \"RuntimeManager\",\n \"ServiceContainer\",\n \"TraceContext\",\n \"TraceContextRecord\",\n \"TraceLogMessage\",\n \"TraceService\",\n \"TraceTransport\",\n \"StepResult\",\n \"Worker\",\n \"WorkerHealth\",\n \"WorkerStatus\",\n \"WorkflowContext\",\n \"WorkflowDefinition\",\n \"WorkflowEngine\",\n \"WorkflowEngineHooks\",\n \"WorkflowNode\",\n \"WorkflowRuntimeFactory\",\n \"WorkflowStep\",\n \"WorkerSupervisor\",\n]", + "start_line": 1, + "end_line": 69, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/plba/workflow.py", + "title": "src/plba/workflow.py:1-18", + "content": "from app_runtime.workflow.contracts.context import WorkflowContext\nfrom app_runtime.workflow.contracts.result import StepResult\nfrom app_runtime.workflow.contracts.step import WorkflowStep\nfrom app_runtime.workflow.contracts.workflow import WorkflowDefinition, WorkflowNode\nfrom app_runtime.workflow.engine.hooks import WorkflowEngineHooks\nfrom app_runtime.workflow.engine.workflow_engine import WorkflowEngine\nfrom app_runtime.workflow.runtime_factory import WorkflowRuntimeFactory\n\n__all__ = [\n \"StepResult\",\n \"WorkflowContext\",\n \"WorkflowDefinition\",\n \"WorkflowEngine\",\n \"WorkflowEngineHooks\",\n \"WorkflowNode\",\n \"WorkflowRuntimeFactory\",\n \"WorkflowStep\",\n]", + "start_line": 1, + "end_line": 18, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.workflow", + "is_test": false, + "blob_sha": "f227797606042273d1f1798f76846952892eeb9e4e9e6a38fb8a631d7231ff39", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/config/__init__.py", + "title": "src/app_runtime/config/__init__.py:1-4", + "content": "from app_runtime.config.file_loader import ConfigFileLoader\nfrom app_runtime.config.providers import FileConfigProvider\n\n__all__ = [\"ConfigFileLoader\", \"FileConfigProvider\"]", + "start_line": 1, + "end_line": 4, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.config.__init__", + "is_test": false, + "blob_sha": "612918029820a2a983330ec92256142b55b9de4bdf3399ece18e2a02dbad9729", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/config/providers.py", + "title": "src/app_runtime/config/providers.py:FileConfigProvider", + "content": "class FileConfigProvider(ConfigProvider):\n def __init__(self, path: str | Path) -> None:\n self._loader = ConfigFileLoader(path)\n\n @property\n def loader(self) -> ConfigFileLoader:\n return self._loader\n\n def load(self) -> dict[str, Any]:\n config = self._loader.load_sync()\n if not isinstance(config, dict):\n raise TypeError(\"Config root must be a mapping\")\n return dict(config)", + "start_line": 10, + "end_line": 22, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.config.providers", + "is_test": false, + "blob_sha": "8c53ca0122d6df6c5763bca15e99434bb4daebd5a618b8fc927e9ae90b022e64", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/contracts/__init__.py", + "title": "src/app_runtime/__init__.py:1-1", + "content": "__all__: list[str] = []", + "start_line": 1, + "end_line": 1, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.__init__", + "is_test": false, + "blob_sha": "8eea9df4f6d7b38ca0e39ccc27b04700e3d08dbeec8046d613d22706d19985fa", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/config/file_loader.py", + "title": "src/app_runtime/config/file_loader.py:ConfigFileLoader", + "content": "class ConfigFileLoader:\n def __init__(self, path: str | Path) -> None:\n self.path = Path(path)\n self.config: Any = None\n self.last_valid_config: Any = None\n self._last_seen_hash: str | None = None\n\n def read_text(self) -> str:\n return self.path.read_text(encoding=\"utf-8\")\n\n def parse(self, data: str) -> Any:\n suffix = self.path.suffix.lower()\n if suffix in {\".yml\", \".yaml\"}:\n return yaml.safe_load(data)\n return json.loads(data)\n\n def load_sync(self) -> Any:\n data = self.read_text()\n parsed = self.parse(data)\n self.config = parsed\n self.last_valid_config = parsed\n self._last_seen_hash = self._calculate_hash(data)\n return parsed\n\n def load_if_changed(self) -> tuple[bool, Any]:\n data = self.read_text()\n current_hash = self._calculate_hash(data)\n if current_hash == self._last_seen_hash:\n return False, self.config\n parsed = self.parse(data)\n self.config = parsed\n self.last_valid_config = parsed\n self._last_seen_hash = current_hash\n return True, parsed\n\n @staticmethod\n def _calculate_hash(data: str) -> str:\n return hashlib.sha256(data.encode(\"utf-8\")).hexdigest()", + "start_line": 11, + "end_line": 48, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/contracts/config.py", + "title": "src/app_runtime/contracts/config.py:ConfigProvider", + "content": "class ConfigProvider(ABC):\n @abstractmethod\n def load(self) -> dict[str, Any]:\n \"\"\"Return a config fragment.\"\"\"", + "start_line": 7, + "end_line": 10, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.config", + "is_test": false, + "blob_sha": "5e773880267743ee94954ea2db120c2d88c54d4312893293d1b89df405283ed4", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/contracts/health.py", + "title": "src/app_runtime/contracts/health.py:HealthContributor", + "content": "class HealthContributor(ABC):\n @abstractmethod\n def health(self) -> WorkerHealth:\n \"\"\"Return contributor health state.\"\"\"", + "start_line": 7, + "end_line": 10, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.health", + "is_test": false, + "blob_sha": "6bd92611def7131e32d4dd34a8ed85e6cf3c67722ad27797032a632cb30dc097", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/contracts/application.py", + "title": "src/app_runtime/contracts/application.py:ApplicationModule", + "content": "class ApplicationModule(ABC):\n @property\n @abstractmethod\n def name(self) -> str:\n \"\"\"Module name used for runtime status and diagnostics.\"\"\"\n\n @abstractmethod\n def register(self, registry: ModuleRegistry) -> None:\n \"\"\"Register workers, services, and health contributors.\"\"\"", + "start_line": 8, + "end_line": 16, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.application", + "is_test": false, + "blob_sha": "197c35634dca49c352ce3f230295a485fbffb672ce7bb8c08e752bfdf61e7fa4", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "relations": [ + { + "path": "src/app_runtime/workflow/runtime_factory.py", + "metadata": { + "edge_id": "db6124c75b447e4a0a9ba267bd6d6cdf267b41a733b2843d724dd42ec6f4945d", + "edge_type": "dataflow_slice", + "src_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "src_qname": "WorkflowRuntimeFactory.__init__", + "dst_symbol_id": "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333", + "dst_ref": "WorkflowRuntimeFactory.create_engine", + "resolution": "resolved", + "slice_id": "db6124c75b447e4a0a9ba267bd6d6cdf267b41a733b2843d724dd42ec6f4945d", + "root_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "path_symbols": [ + "WorkflowRuntimeFactory.__init__", + "WorkflowRuntimeFactory._hooks", + "WorkflowRuntimeFactory.create_engine" + ], + "path_symbol_ids": [ + "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "WorkflowRuntimeFactory.__init__\n -> WorkflowRuntimeFactory._hooks\n -> WorkflowRuntimeFactory.create_engine" + }, + { + "path": "src/app_runtime/workflow/runtime_factory.py", + "metadata": { + "edge_id": "f46f5a871a3800b517b0f94ed2551392629e1d7920bc3e3b5a21e0d8f012b741", + "edge_type": "dataflow_slice", + "src_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "src_qname": "WorkflowRuntimeFactory.__init__", + "dst_symbol_id": "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333", + "dst_ref": "WorkflowRuntimeFactory.create_engine", + "resolution": "resolved", + "slice_id": "f46f5a871a3800b517b0f94ed2551392629e1d7920bc3e3b5a21e0d8f012b741", + "root_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "path_symbols": [ + "WorkflowRuntimeFactory.__init__", + "WorkflowRuntimeFactory._snapshot_sanitizer", + "WorkflowRuntimeFactory.create_engine" + ], + "path_symbol_ids": [ + "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "WorkflowRuntimeFactory.__init__\n -> WorkflowRuntimeFactory._snapshot_sanitizer\n -> WorkflowRuntimeFactory.create_engine" + }, + { + "path": "src/app_runtime/workflow/runtime_factory.py", + "metadata": { + "edge_id": "543624853400c556d1939007017145281d76b00a694c7d5c4fbb0414ded3434e", + "edge_type": "dataflow_slice", + "src_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "src_qname": "WorkflowRuntimeFactory.__init__", + "dst_symbol_id": "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333", + "dst_ref": "WorkflowRuntimeFactory.create_engine", + "resolution": "resolved", + "slice_id": "543624853400c556d1939007017145281d76b00a694c7d5c4fbb0414ded3434e", + "root_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "path_symbols": [ + "WorkflowRuntimeFactory.__init__", + "WorkflowRuntimeFactory._connection_factory", + "WorkflowRuntimeFactory.create_engine" + ], + "path_symbol_ids": [ + "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "WorkflowRuntimeFactory.__init__\n -> WorkflowRuntimeFactory._connection_factory\n -> WorkflowRuntimeFactory.create_engine" + }, + { + "path": "src/app_runtime/workflow/runtime_factory.py", + "metadata": { + "edge_id": "346cf5ddb4308b8403d27c5b54da8cba298bb0af7dc04c2fe30312ef574103c6", + "edge_type": "dataflow_slice", + "src_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "src_qname": "WorkflowRuntimeFactory.__init__", + "dst_symbol_id": "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333", + "dst_ref": "WorkflowRuntimeFactory.create_engine", + "resolution": "resolved", + "slice_id": "346cf5ddb4308b8403d27c5b54da8cba298bb0af7dc04c2fe30312ef574103c6", + "root_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "path_symbols": [ + "WorkflowRuntimeFactory.__init__", + "WorkflowRuntimeFactory._traces", + "WorkflowRuntimeFactory.create_engine" + ], + "path_symbol_ids": [ + "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "WorkflowRuntimeFactory.__init__\n -> WorkflowRuntimeFactory._traces\n -> WorkflowRuntimeFactory.create_engine" + }, + { + "path": "src/app_runtime/workflow/runtime_factory.py", + "metadata": { + "edge_id": "de0cb1913ba41f673cfb601cab23cfb2e1044ed3dd8c061aff486075aeb8af20", + "edge_type": "writes_attr", + "src_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "src_qname": "WorkflowRuntimeFactory.__init__", + "dst_symbol_id": null, + "dst_ref": "WorkflowRuntimeFactory._snapshot_sanitizer", + "resolution": "partial", + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "WorkflowRuntimeFactory.__init__ writes_attr WorkflowRuntimeFactory._snapshot_sanitizer" + }, + { + "path": "src/app_runtime/workflow/runtime_factory.py", + "metadata": { + "edge_id": "fa86efb6871092fc88df68295c0d92dbe46253e1afa3246ca62b6da11d4d5569", + "edge_type": "calls", + "src_symbol_id": "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333", + "src_qname": "WorkflowRuntimeFactory.create_engine", + "dst_symbol_id": null, + "dst_ref": "WorkflowPersistence.create_default", + "resolution": "partial", + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "WorkflowRuntimeFactory.create_engine calls WorkflowPersistence.create_default" + } + ], + "entrypoints": [], + "test_candidates": [], + "layer_outcomes": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 6, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 10, + "empty": false, + "fallback_used": false + } + ], + "missing_layers": [], + "raw_rows": [ + { + "path": "src/plba/__init__.py", + "content": "const WorkflowRuntimeFactory\nWorkflowRuntimeFactory = plba.workflow.WorkflowRuntimeFactory", + "layer": "C1_SYMBOL_CATALOG", + "title": "WorkflowRuntimeFactory", + "span_start": 21, + "span_end": 30, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "cb7c73db05c2622aac89114bed1cddd1d567de21cfac5c53037c62b1074b25c9", + "qname": "WorkflowRuntimeFactory", + "kind": "const", + "signature": "WorkflowRuntimeFactory = plba.workflow.WorkflowRuntimeFactory", + "parent_symbol_id": null, + "package_or_module": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/runtime_factory.py", + "content": "class WorkflowRuntimeFactory\nWorkflowRuntimeFactory", + "layer": "C1_SYMBOL_CATALOG", + "title": "WorkflowRuntimeFactory", + "span_start": 7, + "span_end": 19, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "9da827270329de64ebb426fadaaa5e35145e6666b92c6da186e08bf4b071f458", + "qname": "WorkflowRuntimeFactory", + "kind": "class", + "signature": "WorkflowRuntimeFactory", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.workflow.runtime_factory", + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/workflow.py", + "content": "const WorkflowRuntimeFactory\nWorkflowRuntimeFactory = app_runtime.workflow.runtime_factory.WorkflowRuntimeFactory", + "layer": "C1_SYMBOL_CATALOG", + "title": "WorkflowRuntimeFactory", + "span_start": 7, + "span_end": 7, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "80865947d1ca709971efe9d68a9ee1f348c1c43d351bf4e1b4a5884d72985b6b", + "qname": "WorkflowRuntimeFactory", + "kind": "const", + "signature": "WorkflowRuntimeFactory = app_runtime.workflow.runtime_factory.WorkflowRuntimeFactory", + "parent_symbol_id": null, + "package_or_module": "src.plba.workflow", + "is_test": false, + "blob_sha": "f227797606042273d1f1798f76846952892eeb9e4e9e6a38fb8a631d7231ff39", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/runtime_factory.py", + "content": "method WorkflowRuntimeFactory.__init__\n__init__(self, connection_factory)", + "layer": "C1_SYMBOL_CATALOG", + "title": "WorkflowRuntimeFactory.__init__", + "span_start": 8, + "span_end": 12, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "qname": "WorkflowRuntimeFactory.__init__", + "kind": "method", + "signature": "__init__(self, connection_factory)", + "parent_symbol_id": "WorkflowRuntimeFactory", + "package_or_module": "src.app_runtime.workflow.runtime_factory", + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/runtime_factory.py", + "content": "method WorkflowRuntimeFactory.create_engine\ncreate_engine(self, workflow)", + "layer": "C1_SYMBOL_CATALOG", + "title": "WorkflowRuntimeFactory.create_engine", + "span_start": 14, + "span_end": 19, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333", + "qname": "WorkflowRuntimeFactory.create_engine", + "kind": "method", + "signature": "create_engine(self, workflow)", + "parent_symbol_id": "WorkflowRuntimeFactory", + "package_or_module": "src.app_runtime.workflow.runtime_factory", + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/runtime_factory.py", + "content": "const WorkflowPersistence\nWorkflowPersistence = app_runtime.workflow.persistence.WorkflowPersistence", + "layer": "C1_SYMBOL_CATALOG", + "title": "WorkflowPersistence", + "span_start": 4, + "span_end": 4, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "35693d37698e35079400b6a021d46209966ce469d9f77763d1c82d82ef4600b2", + "qname": "WorkflowPersistence", + "kind": "const", + "signature": "WorkflowPersistence = app_runtime.workflow.persistence.WorkflowPersistence", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.workflow.runtime_factory", + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/runtime_factory.py", + "content": "const annotations\nannotations = __future__.annotations", + "layer": "C1_SYMBOL_CATALOG", + "title": "annotations", + "span_start": 1, + "span_end": 1, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "e016ec68f9d15d52fe0505774229fafc705c1bf3dfda78845a3db9b032a4441d", + "qname": "annotations", + "kind": "const", + "signature": "annotations = __future__.annotations", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.workflow.runtime_factory", + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/runtime_factory.py", + "content": "const WorkflowEngine\nWorkflowEngine = app_runtime.workflow.engine.workflow_engine.WorkflowEngine", + "layer": "C1_SYMBOL_CATALOG", + "title": "WorkflowEngine", + "span_start": 3, + "span_end": 3, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "da4aee8bc7d248177fbc4f892732c6eb08baa6d268c32921a217747143a99fe0", + "qname": "WorkflowEngine", + "kind": "const", + "signature": "WorkflowEngine = app_runtime.workflow.engine.workflow_engine.WorkflowEngine", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.workflow.runtime_factory", + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/runtime_factory.py", + "content": "WorkflowRuntimeFactory.__init__\n -> WorkflowRuntimeFactory._hooks\n -> WorkflowRuntimeFactory.create_engine", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowRuntimeFactory.__init__:dataflow_slice", + "span_start": 11, + "span_end": 19, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "db6124c75b447e4a0a9ba267bd6d6cdf267b41a733b2843d724dd42ec6f4945d", + "edge_type": "dataflow_slice", + "src_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "src_qname": "WorkflowRuntimeFactory.__init__", + "dst_symbol_id": "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333", + "dst_ref": "WorkflowRuntimeFactory.create_engine", + "resolution": "resolved", + "slice_id": "db6124c75b447e4a0a9ba267bd6d6cdf267b41a733b2843d724dd42ec6f4945d", + "root_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "path_symbols": [ + "WorkflowRuntimeFactory.__init__", + "WorkflowRuntimeFactory._hooks", + "WorkflowRuntimeFactory.create_engine" + ], + "path_symbol_ids": [ + "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/runtime_factory.py", + "content": "WorkflowRuntimeFactory.__init__\n -> WorkflowRuntimeFactory._snapshot_sanitizer\n -> WorkflowRuntimeFactory.create_engine", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowRuntimeFactory.__init__:dataflow_slice", + "span_start": 12, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "f46f5a871a3800b517b0f94ed2551392629e1d7920bc3e3b5a21e0d8f012b741", + "edge_type": "dataflow_slice", + "src_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "src_qname": "WorkflowRuntimeFactory.__init__", + "dst_symbol_id": "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333", + "dst_ref": "WorkflowRuntimeFactory.create_engine", + "resolution": "resolved", + "slice_id": "f46f5a871a3800b517b0f94ed2551392629e1d7920bc3e3b5a21e0d8f012b741", + "root_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "path_symbols": [ + "WorkflowRuntimeFactory.__init__", + "WorkflowRuntimeFactory._snapshot_sanitizer", + "WorkflowRuntimeFactory.create_engine" + ], + "path_symbol_ids": [ + "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/runtime_factory.py", + "content": "WorkflowRuntimeFactory.__init__\n -> WorkflowRuntimeFactory._connection_factory\n -> WorkflowRuntimeFactory.create_engine", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowRuntimeFactory.__init__:dataflow_slice", + "span_start": 9, + "span_end": 16, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "543624853400c556d1939007017145281d76b00a694c7d5c4fbb0414ded3434e", + "edge_type": "dataflow_slice", + "src_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "src_qname": "WorkflowRuntimeFactory.__init__", + "dst_symbol_id": "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333", + "dst_ref": "WorkflowRuntimeFactory.create_engine", + "resolution": "resolved", + "slice_id": "543624853400c556d1939007017145281d76b00a694c7d5c4fbb0414ded3434e", + "root_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "path_symbols": [ + "WorkflowRuntimeFactory.__init__", + "WorkflowRuntimeFactory._connection_factory", + "WorkflowRuntimeFactory.create_engine" + ], + "path_symbol_ids": [ + "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/runtime_factory.py", + "content": "WorkflowRuntimeFactory.__init__\n -> WorkflowRuntimeFactory._traces\n -> WorkflowRuntimeFactory.create_engine", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowRuntimeFactory.__init__:dataflow_slice", + "span_start": 10, + "span_end": 19, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "346cf5ddb4308b8403d27c5b54da8cba298bb0af7dc04c2fe30312ef574103c6", + "edge_type": "dataflow_slice", + "src_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "src_qname": "WorkflowRuntimeFactory.__init__", + "dst_symbol_id": "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333", + "dst_ref": "WorkflowRuntimeFactory.create_engine", + "resolution": "resolved", + "slice_id": "346cf5ddb4308b8403d27c5b54da8cba298bb0af7dc04c2fe30312ef574103c6", + "root_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "path_symbols": [ + "WorkflowRuntimeFactory.__init__", + "WorkflowRuntimeFactory._traces", + "WorkflowRuntimeFactory.create_engine" + ], + "path_symbol_ids": [ + "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/runtime_factory.py", + "content": "WorkflowRuntimeFactory.__init__ writes_attr WorkflowRuntimeFactory._snapshot_sanitizer", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowRuntimeFactory.__init__:writes_attr", + "span_start": 12, + "span_end": 12, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "de0cb1913ba41f673cfb601cab23cfb2e1044ed3dd8c061aff486075aeb8af20", + "edge_type": "writes_attr", + "src_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "src_qname": "WorkflowRuntimeFactory.__init__", + "dst_symbol_id": null, + "dst_ref": "WorkflowRuntimeFactory._snapshot_sanitizer", + "resolution": "partial", + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/runtime_factory.py", + "content": "WorkflowRuntimeFactory.create_engine calls WorkflowPersistence.create_default", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowRuntimeFactory.create_engine:calls", + "span_start": 15, + "span_end": 18, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "fa86efb6871092fc88df68295c0d92dbe46253e1afa3246ca62b6da11d4d5569", + "edge_type": "calls", + "src_symbol_id": "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333", + "src_qname": "WorkflowRuntimeFactory.create_engine", + "dst_symbol_id": null, + "dst_ref": "WorkflowPersistence.create_default", + "resolution": "partial", + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/runtime_factory.py", + "content": "class WorkflowRuntimeFactory:\n def __init__(self, connection_factory=None, *, traces, hooks=None, snapshot_sanitizer=None) -> None:\n self._connection_factory = connection_factory\n self._traces = traces\n self._hooks = hooks\n self._snapshot_sanitizer = snapshot_sanitizer\n\n def create_engine(self, workflow) -> WorkflowEngine:\n persistence = WorkflowPersistence.create_default(\n self._connection_factory,\n snapshot_sanitizer=self._snapshot_sanitizer,\n )\n return WorkflowEngine(workflow, persistence, traces=self._traces, hooks=self._hooks)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/workflow/runtime_factory.py:WorkflowRuntimeFactory", + "span_start": 7, + "span_end": 19, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.workflow.runtime_factory", + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/__init__.py", + "content": "from plba.bootstrap import create_runtime\nfrom plba.config import ConfigFileLoader, FileConfigProvider\nfrom plba.control import ControlActionSet, ControlChannel, ControlPlaneService, HttpControlChannel\nfrom plba.contracts import (\n ApplicationModule,\n ConfigProvider,\n HealthContributor,\n TraceContext,\n TraceContextRecord,\n TraceLogMessage,\n TraceTransport,\n Worker,\n WorkerHealth,\n WorkerStatus,\n)\nfrom plba.core import ConfigurationManager, RuntimeManager, ServiceContainer\nfrom plba.health import HealthRegistry\nfrom plba.logging import LogManager\nfrom plba.queue import InMemoryTaskQueue\nfrom plba.tracing import MySqlTraceTransport, NoOpTraceTransport, TraceService\nfrom plba.workflow import (\n StepResult,\n WorkflowContext,\n WorkflowDefinition,\n WorkflowEngine,\n WorkflowEngineHooks,\n WorkflowNode,\n WorkflowRuntimeFactory,\n WorkflowStep,\n)\nfrom plba.workers import WorkerSupervisor\n\n__all__ = [\n \"ApplicationModule\",\n \"ConfigFileLoader\",\n \"ConfigProvider\",\n \"ConfigurationManager\",\n \"ControlActionSet\",\n \"ControlChannel\",\n \"ControlPlaneService\",\n \"create_runtime\",\n \"FileConfigProvider\",\n \"HealthContributor\",\n \"HealthRegistry\",\n \"HttpControlChannel\",\n \"InMemoryTaskQueue\",\n \"LogManager\",\n \"MySqlTraceTransport\",\n \"NoOpTraceTransport\",\n \"RuntimeManager\",\n \"ServiceContainer\",\n \"TraceContext\",\n \"TraceContextRecord\",\n \"TraceLogMessage\",\n \"TraceService\",\n \"TraceTransport\",\n \"StepResult\",\n \"Worker\",\n \"WorkerHealth\",\n \"WorkerStatus\",\n \"WorkflowContext\",\n \"WorkflowDefinition\",\n \"WorkflowEngine\",\n \"WorkflowEngineHooks\",\n \"WorkflowNode\",\n \"WorkflowRuntimeFactory\",\n \"WorkflowStep\",\n \"WorkerSupervisor\",\n]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/__init__.py:1-69", + "span_start": 1, + "span_end": 69, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/workflow.py", + "content": "from app_runtime.workflow.contracts.context import WorkflowContext\nfrom app_runtime.workflow.contracts.result import StepResult\nfrom app_runtime.workflow.contracts.step import WorkflowStep\nfrom app_runtime.workflow.contracts.workflow import WorkflowDefinition, WorkflowNode\nfrom app_runtime.workflow.engine.hooks import WorkflowEngineHooks\nfrom app_runtime.workflow.engine.workflow_engine import WorkflowEngine\nfrom app_runtime.workflow.runtime_factory import WorkflowRuntimeFactory\n\n__all__ = [\n \"StepResult\",\n \"WorkflowContext\",\n \"WorkflowDefinition\",\n \"WorkflowEngine\",\n \"WorkflowEngineHooks\",\n \"WorkflowNode\",\n \"WorkflowRuntimeFactory\",\n \"WorkflowStep\",\n]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/workflow.py:1-18", + "span_start": 1, + "span_end": 18, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.workflow", + "is_test": false, + "blob_sha": "f227797606042273d1f1798f76846952892eeb9e4e9e6a38fb8a631d7231ff39", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/__init__.py", + "content": "from app_runtime.config.file_loader import ConfigFileLoader\nfrom app_runtime.config.providers import FileConfigProvider\n\n__all__ = [\"ConfigFileLoader\", \"FileConfigProvider\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/config/__init__.py:1-4", + "span_start": 1, + "span_end": 4, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.config.__init__", + "is_test": false, + "blob_sha": "612918029820a2a983330ec92256142b55b9de4bdf3399ece18e2a02dbad9729", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/providers.py", + "content": "class FileConfigProvider(ConfigProvider):\n def __init__(self, path: str | Path) -> None:\n self._loader = ConfigFileLoader(path)\n\n @property\n def loader(self) -> ConfigFileLoader:\n return self._loader\n\n def load(self) -> dict[str, Any]:\n config = self._loader.load_sync()\n if not isinstance(config, dict):\n raise TypeError(\"Config root must be a mapping\")\n return dict(config)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/config/providers.py:FileConfigProvider", + "span_start": 10, + "span_end": 22, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.config.providers", + "is_test": false, + "blob_sha": "8c53ca0122d6df6c5763bca15e99434bb4daebd5a618b8fc927e9ae90b022e64", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/__init__.py", + "content": "__all__: list[str] = []", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/__init__.py:1-1", + "span_start": 1, + "span_end": 1, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.__init__", + "is_test": false, + "blob_sha": "8eea9df4f6d7b38ca0e39ccc27b04700e3d08dbeec8046d613d22706d19985fa", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "class ConfigFileLoader:\n def __init__(self, path: str | Path) -> None:\n self.path = Path(path)\n self.config: Any = None\n self.last_valid_config: Any = None\n self._last_seen_hash: str | None = None\n\n def read_text(self) -> str:\n return self.path.read_text(encoding=\"utf-8\")\n\n def parse(self, data: str) -> Any:\n suffix = self.path.suffix.lower()\n if suffix in {\".yml\", \".yaml\"}:\n return yaml.safe_load(data)\n return json.loads(data)\n\n def load_sync(self) -> Any:\n data = self.read_text()\n parsed = self.parse(data)\n self.config = parsed\n self.last_valid_config = parsed\n self._last_seen_hash = self._calculate_hash(data)\n return parsed\n\n def load_if_changed(self) -> tuple[bool, Any]:\n data = self.read_text()\n current_hash = self._calculate_hash(data)\n if current_hash == self._last_seen_hash:\n return False, self.config\n parsed = self.parse(data)\n self.config = parsed\n self.last_valid_config = parsed\n self._last_seen_hash = current_hash\n return True, parsed\n\n @staticmethod\n def _calculate_hash(data: str) -> str:\n return hashlib.sha256(data.encode(\"utf-8\")).hexdigest()", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/config/file_loader.py:ConfigFileLoader", + "span_start": 11, + "span_end": 48, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/config.py", + "content": "class ConfigProvider(ABC):\n @abstractmethod\n def load(self) -> dict[str, Any]:\n \"\"\"Return a config fragment.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/contracts/config.py:ConfigProvider", + "span_start": 7, + "span_end": 10, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.config", + "is_test": false, + "blob_sha": "5e773880267743ee94954ea2db120c2d88c54d4312893293d1b89df405283ed4", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/health.py", + "content": "class HealthContributor(ABC):\n @abstractmethod\n def health(self) -> WorkerHealth:\n \"\"\"Return contributor health state.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/contracts/health.py:HealthContributor", + "span_start": 7, + "span_end": 10, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.health", + "is_test": false, + "blob_sha": "6bd92611def7131e32d4dd34a8ed85e6cf3c67722ad27797032a632cb30dc097", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/application.py", + "content": "class ApplicationModule(ABC):\n @property\n @abstractmethod\n def name(self) -> str:\n \"\"\"Module name used for runtime status and diagnostics.\"\"\"\n\n @abstractmethod\n def register(self, registry: ModuleRegistry) -> None:\n \"\"\"Register workers, services, and health contributors.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/contracts/application.py:ApplicationModule", + "span_start": 8, + "span_end": 16, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.application", + "is_test": false, + "blob_sha": "197c35634dca49c352ce3f230295a485fbffb672ce7bb8c08e752bfdf61e7fa4", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "retrieval_report": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "vector", + "C2_DEPENDENCY_GRAPH": "vector", + "C0_SOURCE_CHUNKS": "vector" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C0_SOURCE_CHUNKS": 10 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [] + } + }, + "fallback": { + "used": false, + "reason": null + }, + "retrieval_by_layer_ms": { + "C1_SYMBOL_CATALOG": 24, + "C2_DEPENDENCY_GRAPH": 27, + "C0_SOURCE_CHUNKS": 12 + } + } + }, + "diagnostics": { + "intent_correct": null, + "target_found": true, + "layers_used": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "retrieval_sufficient": false, + "answer_mode": "degraded", + "router_result": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "FIND_TESTS", + "path_scope": [], + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "symbol_resolution_status": "pending" + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Где тесты для WorkflowRuntimeFactory?", + "sub_intent": "FIND_TESTS", + "path_scope": [], + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 6, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 10, + "empty": false, + "fallback_used": false + } + ], + "empty_layers": [], + "evidence_gate_decision": { + "sufficient": false, + "failure_reasons": [ + "tests_not_found" + ], + "evidence_count": 24 + }, + "failure_reasons": [ + "tests_not_found" + ], + "timings_ms": {} + }, + "rag_rows": [ + { + "path": "src/plba/__init__.py", + "content": "const WorkflowRuntimeFactory\nWorkflowRuntimeFactory = plba.workflow.WorkflowRuntimeFactory", + "layer": "C1_SYMBOL_CATALOG", + "title": "WorkflowRuntimeFactory", + "span_start": 21, + "span_end": 30, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "cb7c73db05c2622aac89114bed1cddd1d567de21cfac5c53037c62b1074b25c9", + "qname": "WorkflowRuntimeFactory", + "kind": "const", + "signature": "WorkflowRuntimeFactory = plba.workflow.WorkflowRuntimeFactory", + "parent_symbol_id": null, + "package_or_module": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/runtime_factory.py", + "content": "class WorkflowRuntimeFactory\nWorkflowRuntimeFactory", + "layer": "C1_SYMBOL_CATALOG", + "title": "WorkflowRuntimeFactory", + "span_start": 7, + "span_end": 19, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "9da827270329de64ebb426fadaaa5e35145e6666b92c6da186e08bf4b071f458", + "qname": "WorkflowRuntimeFactory", + "kind": "class", + "signature": "WorkflowRuntimeFactory", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.workflow.runtime_factory", + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/workflow.py", + "content": "const WorkflowRuntimeFactory\nWorkflowRuntimeFactory = app_runtime.workflow.runtime_factory.WorkflowRuntimeFactory", + "layer": "C1_SYMBOL_CATALOG", + "title": "WorkflowRuntimeFactory", + "span_start": 7, + "span_end": 7, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "80865947d1ca709971efe9d68a9ee1f348c1c43d351bf4e1b4a5884d72985b6b", + "qname": "WorkflowRuntimeFactory", + "kind": "const", + "signature": "WorkflowRuntimeFactory = app_runtime.workflow.runtime_factory.WorkflowRuntimeFactory", + "parent_symbol_id": null, + "package_or_module": "src.plba.workflow", + "is_test": false, + "blob_sha": "f227797606042273d1f1798f76846952892eeb9e4e9e6a38fb8a631d7231ff39", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/runtime_factory.py", + "content": "method WorkflowRuntimeFactory.__init__\n__init__(self, connection_factory)", + "layer": "C1_SYMBOL_CATALOG", + "title": "WorkflowRuntimeFactory.__init__", + "span_start": 8, + "span_end": 12, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "qname": "WorkflowRuntimeFactory.__init__", + "kind": "method", + "signature": "__init__(self, connection_factory)", + "parent_symbol_id": "WorkflowRuntimeFactory", + "package_or_module": "src.app_runtime.workflow.runtime_factory", + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/runtime_factory.py", + "content": "method WorkflowRuntimeFactory.create_engine\ncreate_engine(self, workflow)", + "layer": "C1_SYMBOL_CATALOG", + "title": "WorkflowRuntimeFactory.create_engine", + "span_start": 14, + "span_end": 19, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333", + "qname": "WorkflowRuntimeFactory.create_engine", + "kind": "method", + "signature": "create_engine(self, workflow)", + "parent_symbol_id": "WorkflowRuntimeFactory", + "package_or_module": "src.app_runtime.workflow.runtime_factory", + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/runtime_factory.py", + "content": "const WorkflowPersistence\nWorkflowPersistence = app_runtime.workflow.persistence.WorkflowPersistence", + "layer": "C1_SYMBOL_CATALOG", + "title": "WorkflowPersistence", + "span_start": 4, + "span_end": 4, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "35693d37698e35079400b6a021d46209966ce469d9f77763d1c82d82ef4600b2", + "qname": "WorkflowPersistence", + "kind": "const", + "signature": "WorkflowPersistence = app_runtime.workflow.persistence.WorkflowPersistence", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.workflow.runtime_factory", + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/runtime_factory.py", + "content": "const annotations\nannotations = __future__.annotations", + "layer": "C1_SYMBOL_CATALOG", + "title": "annotations", + "span_start": 1, + "span_end": 1, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "e016ec68f9d15d52fe0505774229fafc705c1bf3dfda78845a3db9b032a4441d", + "qname": "annotations", + "kind": "const", + "signature": "annotations = __future__.annotations", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.workflow.runtime_factory", + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/runtime_factory.py", + "content": "const WorkflowEngine\nWorkflowEngine = app_runtime.workflow.engine.workflow_engine.WorkflowEngine", + "layer": "C1_SYMBOL_CATALOG", + "title": "WorkflowEngine", + "span_start": 3, + "span_end": 3, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "da4aee8bc7d248177fbc4f892732c6eb08baa6d268c32921a217747143a99fe0", + "qname": "WorkflowEngine", + "kind": "const", + "signature": "WorkflowEngine = app_runtime.workflow.engine.workflow_engine.WorkflowEngine", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.workflow.runtime_factory", + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/runtime_factory.py", + "content": "WorkflowRuntimeFactory.__init__\n -> WorkflowRuntimeFactory._hooks\n -> WorkflowRuntimeFactory.create_engine", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowRuntimeFactory.__init__:dataflow_slice", + "span_start": 11, + "span_end": 19, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "db6124c75b447e4a0a9ba267bd6d6cdf267b41a733b2843d724dd42ec6f4945d", + "edge_type": "dataflow_slice", + "src_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "src_qname": "WorkflowRuntimeFactory.__init__", + "dst_symbol_id": "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333", + "dst_ref": "WorkflowRuntimeFactory.create_engine", + "resolution": "resolved", + "slice_id": "db6124c75b447e4a0a9ba267bd6d6cdf267b41a733b2843d724dd42ec6f4945d", + "root_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "path_symbols": [ + "WorkflowRuntimeFactory.__init__", + "WorkflowRuntimeFactory._hooks", + "WorkflowRuntimeFactory.create_engine" + ], + "path_symbol_ids": [ + "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/runtime_factory.py", + "content": "WorkflowRuntimeFactory.__init__\n -> WorkflowRuntimeFactory._snapshot_sanitizer\n -> WorkflowRuntimeFactory.create_engine", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowRuntimeFactory.__init__:dataflow_slice", + "span_start": 12, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "f46f5a871a3800b517b0f94ed2551392629e1d7920bc3e3b5a21e0d8f012b741", + "edge_type": "dataflow_slice", + "src_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "src_qname": "WorkflowRuntimeFactory.__init__", + "dst_symbol_id": "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333", + "dst_ref": "WorkflowRuntimeFactory.create_engine", + "resolution": "resolved", + "slice_id": "f46f5a871a3800b517b0f94ed2551392629e1d7920bc3e3b5a21e0d8f012b741", + "root_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "path_symbols": [ + "WorkflowRuntimeFactory.__init__", + "WorkflowRuntimeFactory._snapshot_sanitizer", + "WorkflowRuntimeFactory.create_engine" + ], + "path_symbol_ids": [ + "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/runtime_factory.py", + "content": "WorkflowRuntimeFactory.__init__\n -> WorkflowRuntimeFactory._connection_factory\n -> WorkflowRuntimeFactory.create_engine", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowRuntimeFactory.__init__:dataflow_slice", + "span_start": 9, + "span_end": 16, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "543624853400c556d1939007017145281d76b00a694c7d5c4fbb0414ded3434e", + "edge_type": "dataflow_slice", + "src_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "src_qname": "WorkflowRuntimeFactory.__init__", + "dst_symbol_id": "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333", + "dst_ref": "WorkflowRuntimeFactory.create_engine", + "resolution": "resolved", + "slice_id": "543624853400c556d1939007017145281d76b00a694c7d5c4fbb0414ded3434e", + "root_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "path_symbols": [ + "WorkflowRuntimeFactory.__init__", + "WorkflowRuntimeFactory._connection_factory", + "WorkflowRuntimeFactory.create_engine" + ], + "path_symbol_ids": [ + "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/runtime_factory.py", + "content": "WorkflowRuntimeFactory.__init__\n -> WorkflowRuntimeFactory._traces\n -> WorkflowRuntimeFactory.create_engine", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowRuntimeFactory.__init__:dataflow_slice", + "span_start": 10, + "span_end": 19, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "346cf5ddb4308b8403d27c5b54da8cba298bb0af7dc04c2fe30312ef574103c6", + "edge_type": "dataflow_slice", + "src_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "src_qname": "WorkflowRuntimeFactory.__init__", + "dst_symbol_id": "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333", + "dst_ref": "WorkflowRuntimeFactory.create_engine", + "resolution": "resolved", + "slice_id": "346cf5ddb4308b8403d27c5b54da8cba298bb0af7dc04c2fe30312ef574103c6", + "root_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "path_symbols": [ + "WorkflowRuntimeFactory.__init__", + "WorkflowRuntimeFactory._traces", + "WorkflowRuntimeFactory.create_engine" + ], + "path_symbol_ids": [ + "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/runtime_factory.py", + "content": "WorkflowRuntimeFactory.__init__ writes_attr WorkflowRuntimeFactory._snapshot_sanitizer", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowRuntimeFactory.__init__:writes_attr", + "span_start": 12, + "span_end": 12, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "de0cb1913ba41f673cfb601cab23cfb2e1044ed3dd8c061aff486075aeb8af20", + "edge_type": "writes_attr", + "src_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "src_qname": "WorkflowRuntimeFactory.__init__", + "dst_symbol_id": null, + "dst_ref": "WorkflowRuntimeFactory._snapshot_sanitizer", + "resolution": "partial", + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/runtime_factory.py", + "content": "WorkflowRuntimeFactory.create_engine calls WorkflowPersistence.create_default", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowRuntimeFactory.create_engine:calls", + "span_start": 15, + "span_end": 18, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "fa86efb6871092fc88df68295c0d92dbe46253e1afa3246ca62b6da11d4d5569", + "edge_type": "calls", + "src_symbol_id": "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333", + "src_qname": "WorkflowRuntimeFactory.create_engine", + "dst_symbol_id": null, + "dst_ref": "WorkflowPersistence.create_default", + "resolution": "partial", + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/runtime_factory.py", + "content": "class WorkflowRuntimeFactory:\n def __init__(self, connection_factory=None, *, traces, hooks=None, snapshot_sanitizer=None) -> None:\n self._connection_factory = connection_factory\n self._traces = traces\n self._hooks = hooks\n self._snapshot_sanitizer = snapshot_sanitizer\n\n def create_engine(self, workflow) -> WorkflowEngine:\n persistence = WorkflowPersistence.create_default(\n self._connection_factory,\n snapshot_sanitizer=self._snapshot_sanitizer,\n )\n return WorkflowEngine(workflow, persistence, traces=self._traces, hooks=self._hooks)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/workflow/runtime_factory.py:WorkflowRuntimeFactory", + "span_start": 7, + "span_end": 19, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.workflow.runtime_factory", + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/__init__.py", + "content": "from plba.bootstrap import create_runtime\nfrom plba.config import ConfigFileLoader, FileConfigProvider\nfrom plba.control import ControlActionSet, ControlChannel, ControlPlaneService, HttpControlChannel\nfrom plba.contracts import (\n ApplicationModule,\n ConfigProvider,\n HealthContributor,\n TraceContext,\n TraceContextRecord,\n TraceLogMessage,\n TraceTransport,\n Worker,\n WorkerHealth,\n WorkerStatus,\n)\nfrom plba.core import ConfigurationManager, RuntimeManager, ServiceContainer\nfrom plba.health import HealthRegistry\nfrom plba.logging import LogManager\nfrom plba.queue import InMemoryTaskQueue\nfrom plba.tracing import MySqlTraceTransport, NoOpTraceTransport, TraceService\nfrom plba.workflow import (\n StepResult,\n WorkflowContext,\n WorkflowDefinition,\n WorkflowEngine,\n WorkflowEngineHooks,\n WorkflowNode,\n WorkflowRuntimeFactory,\n WorkflowStep,\n)\nfrom plba.workers import WorkerSupervisor\n\n__all__ = [\n \"ApplicationModule\",\n \"ConfigFileLoader\",\n \"ConfigProvider\",\n \"ConfigurationManager\",\n \"ControlActionSet\",\n \"ControlChannel\",\n \"ControlPlaneService\",\n \"create_runtime\",\n \"FileConfigProvider\",\n \"HealthContributor\",\n \"HealthRegistry\",\n \"HttpControlChannel\",\n \"InMemoryTaskQueue\",\n \"LogManager\",\n \"MySqlTraceTransport\",\n \"NoOpTraceTransport\",\n \"RuntimeManager\",\n \"ServiceContainer\",\n \"TraceContext\",\n \"TraceContextRecord\",\n \"TraceLogMessage\",\n \"TraceService\",\n \"TraceTransport\",\n \"StepResult\",\n \"Worker\",\n \"WorkerHealth\",\n \"WorkerStatus\",\n \"WorkflowContext\",\n \"WorkflowDefinition\",\n \"WorkflowEngine\",\n \"WorkflowEngineHooks\",\n \"WorkflowNode\",\n \"WorkflowRuntimeFactory\",\n \"WorkflowStep\",\n \"WorkerSupervisor\",\n]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/__init__.py:1-69", + "span_start": 1, + "span_end": 69, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/workflow.py", + "content": "from app_runtime.workflow.contracts.context import WorkflowContext\nfrom app_runtime.workflow.contracts.result import StepResult\nfrom app_runtime.workflow.contracts.step import WorkflowStep\nfrom app_runtime.workflow.contracts.workflow import WorkflowDefinition, WorkflowNode\nfrom app_runtime.workflow.engine.hooks import WorkflowEngineHooks\nfrom app_runtime.workflow.engine.workflow_engine import WorkflowEngine\nfrom app_runtime.workflow.runtime_factory import WorkflowRuntimeFactory\n\n__all__ = [\n \"StepResult\",\n \"WorkflowContext\",\n \"WorkflowDefinition\",\n \"WorkflowEngine\",\n \"WorkflowEngineHooks\",\n \"WorkflowNode\",\n \"WorkflowRuntimeFactory\",\n \"WorkflowStep\",\n]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/workflow.py:1-18", + "span_start": 1, + "span_end": 18, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.workflow", + "is_test": false, + "blob_sha": "f227797606042273d1f1798f76846952892eeb9e4e9e6a38fb8a631d7231ff39", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/__init__.py", + "content": "from app_runtime.config.file_loader import ConfigFileLoader\nfrom app_runtime.config.providers import FileConfigProvider\n\n__all__ = [\"ConfigFileLoader\", \"FileConfigProvider\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/config/__init__.py:1-4", + "span_start": 1, + "span_end": 4, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.config.__init__", + "is_test": false, + "blob_sha": "612918029820a2a983330ec92256142b55b9de4bdf3399ece18e2a02dbad9729", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/providers.py", + "content": "class FileConfigProvider(ConfigProvider):\n def __init__(self, path: str | Path) -> None:\n self._loader = ConfigFileLoader(path)\n\n @property\n def loader(self) -> ConfigFileLoader:\n return self._loader\n\n def load(self) -> dict[str, Any]:\n config = self._loader.load_sync()\n if not isinstance(config, dict):\n raise TypeError(\"Config root must be a mapping\")\n return dict(config)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/config/providers.py:FileConfigProvider", + "span_start": 10, + "span_end": 22, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.config.providers", + "is_test": false, + "blob_sha": "8c53ca0122d6df6c5763bca15e99434bb4daebd5a618b8fc927e9ae90b022e64", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/__init__.py", + "content": "__all__: list[str] = []", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/__init__.py:1-1", + "span_start": 1, + "span_end": 1, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.__init__", + "is_test": false, + "blob_sha": "8eea9df4f6d7b38ca0e39ccc27b04700e3d08dbeec8046d613d22706d19985fa", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "class ConfigFileLoader:\n def __init__(self, path: str | Path) -> None:\n self.path = Path(path)\n self.config: Any = None\n self.last_valid_config: Any = None\n self._last_seen_hash: str | None = None\n\n def read_text(self) -> str:\n return self.path.read_text(encoding=\"utf-8\")\n\n def parse(self, data: str) -> Any:\n suffix = self.path.suffix.lower()\n if suffix in {\".yml\", \".yaml\"}:\n return yaml.safe_load(data)\n return json.loads(data)\n\n def load_sync(self) -> Any:\n data = self.read_text()\n parsed = self.parse(data)\n self.config = parsed\n self.last_valid_config = parsed\n self._last_seen_hash = self._calculate_hash(data)\n return parsed\n\n def load_if_changed(self) -> tuple[bool, Any]:\n data = self.read_text()\n current_hash = self._calculate_hash(data)\n if current_hash == self._last_seen_hash:\n return False, self.config\n parsed = self.parse(data)\n self.config = parsed\n self.last_valid_config = parsed\n self._last_seen_hash = current_hash\n return True, parsed\n\n @staticmethod\n def _calculate_hash(data: str) -> str:\n return hashlib.sha256(data.encode(\"utf-8\")).hexdigest()", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/config/file_loader.py:ConfigFileLoader", + "span_start": 11, + "span_end": 48, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/config.py", + "content": "class ConfigProvider(ABC):\n @abstractmethod\n def load(self) -> dict[str, Any]:\n \"\"\"Return a config fragment.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/contracts/config.py:ConfigProvider", + "span_start": 7, + "span_end": 10, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.config", + "is_test": false, + "blob_sha": "5e773880267743ee94954ea2db120c2d88c54d4312893293d1b89df405283ed4", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/health.py", + "content": "class HealthContributor(ABC):\n @abstractmethod\n def health(self) -> WorkerHealth:\n \"\"\"Return contributor health state.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/contracts/health.py:HealthContributor", + "span_start": 7, + "span_end": 10, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.health", + "is_test": false, + "blob_sha": "6bd92611def7131e32d4dd34a8ed85e6cf3c67722ad27797032a632cb30dc097", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/application.py", + "content": "class ApplicationModule(ABC):\n @property\n @abstractmethod\n def name(self) -> str:\n \"\"\"Module name used for runtime status and diagnostics.\"\"\"\n\n @abstractmethod\n def register(self, registry: ModuleRegistry) -> None:\n \"\"\"Register workers, services, and health contributors.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/contracts/application.py:ApplicationModule", + "span_start": 8, + "span_end": 16, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.application", + "is_test": false, + "blob_sha": "197c35634dca49c352ce3f230295a485fbffb672ce7bb8c08e752bfdf61e7fa4", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "validation": { + "passed": false, + "action": "repair", + "reasons": [ + "degraded_answer_missing_guardrail" + ] + } + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-find-tests-workflow-runtime-factory-negative.md b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-find-tests-workflow-runtime-factory-negative.md new file mode 100644 index 0000000..8d465e3 --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-find-tests-workflow-runtime-factory-negative.md @@ -0,0 +1,32 @@ +# plba-v2-find-tests-workflow-runtime-factory-negative + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: agent_runtime +- mode: full_chain +- passed: True + +## Query +Где тесты для WorkflowRuntimeFactory? + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 24, + "llm_answer": "Insufficient evidence for a confident answer. No test candidates found.", + "answer_mode": "degraded", + "path_scope": [], + "symbol_candidates": [ + "WorkflowRuntimeFactory" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-open-file-nonexistent.json b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-open-file-nonexistent.json new file mode 100644 index 0000000..aea7b21 --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-open-file-nonexistent.json @@ -0,0 +1,341 @@ +{ + "case_id": "plba-v2-open-file-nonexistent", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "agent_runtime", + "mode": "full_chain", + "query": "Открой файл src/app_runtime/core/missing_runtime.py", + "actual": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 0, + "llm_answer": "Файл `src/app_runtime/core/missing_runtime.py` не найден.", + "answer_mode": "not_found", + "path_scope": [ + "src/app_runtime/core/missing_runtime.py" + ], + "symbol_candidates": [], + "layers": [ + "C0_SOURCE_CHUNKS" + ] + }, + "passed": false, + "mismatches": [ + "answer_mode: expected degraded, got not_found", + "llm: expected answer to contain 'Файл src/app_runtime/core/missing_runtime.py не найден.'" + ], + "details": { + "query": "Открой файл src/app_runtime/core/missing_runtime.py", + "router_result": { + "schema_version": "1.1", + "intent": "CODE_QA", + "retrieval_profile": "code", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query_plan": { + "raw": "Открой файл src/app_runtime/core/missing_runtime.py", + "normalized": "Открой файл src/app_runtime/core/missing_runtime.py", + "sub_intent": "OPEN_FILE", + "negations": [], + "expansions": [ + "file" + ], + "keyword_hints": [], + "path_hints": [ + "src/app_runtime/core/missing_runtime.py" + ], + "doc_scope_hints": [], + "symbol_candidates": [], + "symbol_kind_hint": "unknown", + "anchors": [ + { + "type": "FILE_PATH", + "value": "src/app_runtime/core/missing_runtime.py", + "source": "user_text", + "subtype": null, + "span": { + "start": 12, + "end": 51 + }, + "confidence": 0.95 + }, + { + "type": "KEY_TERM", + "value": "файл", + "source": "user_text", + "subtype": null, + "span": { + "start": 7, + "end": 11 + }, + "confidence": 0.9 + } + ] + }, + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 12 + } + ], + "filters": { + "test_policy": "EXCLUDE", + "path_scope": [ + "src/app_runtime/core/missing_runtime.py" + ], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/app_runtime/core/missing_runtime.py" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": false, + "max_distance": 2, + "top_k": 5 + } + }, + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [], + "confidence": 0.0 + }, + "evidence_policy": { + "require_def": false, + "require_flow": false, + "require_spec": false, + "allow_answer_without_evidence": false + } + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Открой файл src/app_runtime/core/missing_runtime.py", + "sub_intent": "OPEN_FILE", + "path_scope": [ + "src/app_runtime/core/missing_runtime.py" + ], + "keyword_hints": [], + "symbol_candidates": [], + "requested_layers": [ + "C0_SOURCE_CHUNKS" + ], + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 12 + } + ], + "filters": { + "test_policy": "EXCLUDE", + "path_scope": [ + "src/app_runtime/core/missing_runtime.py" + ], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/app_runtime/core/missing_runtime.py" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": false, + "max_distance": 2, + "top_k": 5 + } + }, + "query_plan": { + "raw": "Открой файл src/app_runtime/core/missing_runtime.py", + "normalized": "Открой файл src/app_runtime/core/missing_runtime.py", + "sub_intent": "OPEN_FILE", + "negations": [], + "expansions": [ + "file" + ], + "keyword_hints": [], + "path_hints": [ + "src/app_runtime/core/missing_runtime.py" + ], + "doc_scope_hints": [], + "symbol_candidates": [], + "symbol_kind_hint": "unknown", + "anchors": [ + { + "type": "FILE_PATH", + "value": "src/app_runtime/core/missing_runtime.py", + "source": "user_text", + "subtype": null, + "span": { + "start": 12, + "end": 51 + }, + "confidence": 0.95 + }, + { + "type": "KEY_TERM", + "value": "файл", + "source": "user_text", + "subtype": null, + "span": { + "start": 7, + "end": 11 + }, + "confidence": 0.9 + } + ] + } + }, + "retrieval_result": { + "target_symbol_candidates": [], + "resolved_symbol": null, + "symbol_resolution_status": "not_requested", + "file_candidates": [], + "code_chunks": [], + "relations": [], + "entrypoints": [], + "test_candidates": [], + "layer_outcomes": [ + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 0, + "empty": true, + "fallback_used": false + } + ], + "missing_layers": [ + "C0_SOURCE_CHUNKS" + ], + "raw_rows": [], + "retrieval_report": { + "executed_layers": [ + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C0_SOURCE_CHUNKS": 200 + }, + "filters_by_layer": { + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src/app_runtime/core/missing_runtime.py" + ] + } + }, + "requests": [ + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Открой файл src/app_runtime/core/missing_runtime.py", + "ranking_profile": "code" + } + ], + "fallback": { + "used": false, + "reason": null + }, + "retrieval_by_layer_ms": { + "C0_SOURCE_CHUNKS": 23 + } + } + }, + "diagnostics": { + "intent_correct": null, + "target_found": false, + "layers_used": [ + "C0_SOURCE_CHUNKS" + ], + "retrieval_sufficient": false, + "answer_mode": "insufficient", + "router_result": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "OPEN_FILE", + "path_scope": [ + "src/app_runtime/core/missing_runtime.py" + ], + "layers": [ + "C0_SOURCE_CHUNKS" + ], + "symbol_resolution_status": "not_requested" + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Открой файл src/app_runtime/core/missing_runtime.py", + "sub_intent": "OPEN_FILE", + "path_scope": [ + "src/app_runtime/core/missing_runtime.py" + ], + "requested_layers": [ + "C0_SOURCE_CHUNKS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 0, + "empty": true, + "fallback_used": false + } + ], + "empty_layers": [ + "C0_SOURCE_CHUNKS" + ], + "evidence_gate_decision": { + "sufficient": false, + "failure_reasons": [ + "path_scope_empty", + "layer_c0_empty" + ], + "evidence_count": 0 + }, + "failure_reasons": [ + "path_scope_empty", + "layer_c0_empty" + ], + "timings_ms": {} + }, + "rag_rows": [], + "validation": { + "passed": true, + "action": "return", + "reasons": [] + } + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-open-file-nonexistent.md b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-open-file-nonexistent.md new file mode 100644 index 0000000..b301f23 --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-open-file-nonexistent.md @@ -0,0 +1,31 @@ +# plba-v2-open-file-nonexistent + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: agent_runtime +- mode: full_chain +- passed: False + +## Query +Открой файл src/app_runtime/core/missing_runtime.py + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 0, + "llm_answer": "Файл `src/app_runtime/core/missing_runtime.py` не найден.", + "answer_mode": "not_found", + "path_scope": [ + "src/app_runtime/core/missing_runtime.py" + ], + "symbol_candidates": [], + "layers": [ + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- answer_mode: expected degraded, got not_found +- llm: expected answer to contain 'Файл src/app_runtime/core/missing_runtime.py не найден.' \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-open-file-public-api.json b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-open-file-public-api.json new file mode 100644 index 0000000..d68abc5 --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-open-file-public-api.json @@ -0,0 +1,419 @@ +{ + "case_id": "plba-v2-open-file-public-api", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "agent_runtime", + "mode": "full_chain", + "query": "Открой файл src/plba/__init__.py", + "actual": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 1, + "llm_answer": "Путь к файлу: src/plba/__init__.py\n\nВ этом файле находятся импортированные модули и классы из различных подпакетов библиотеки plba. Файл служит точкой входа для пользователей, предоставляя доступ к основным функциям и классам библиотеки. В частности, здесь импортируются:\n\n- Функции и классы для создания runtime (create_runtime)\n- Конфигурационные файлы и провайдеры (ConfigFileLoader, FileConfigProvider)\n- Контрольные каналы и службы (ControlActionSet, ControlChannel, ControlPlaneService, HttpControlChannel)\n- Определения контрактов (ApplicationModule, ConfigProvider, HealthContributor и др.)\n- Менеджеры конфигурации и выполнения (ConfigurationManager, RuntimeManager, ServiceContainer)\n- Службы мониторинга здоровья (HealthRegistry)\n- Управление логированием (LogManager)\n- Очереди задач (InMemoryTaskQueue)\n- Транспортировка трассировки (MySqlTraceTransport, NoOpTraceTransport, TraceService)\n- Определение рабочих потоков и контекстов (StepResult, WorkflowContext, WorkflowDefinition, Workf)", + "answer_mode": "answered", + "path_scope": [ + "src/plba/__init__.py" + ], + "symbol_candidates": [], + "layers": [ + "C0_SOURCE_CHUNKS" + ] + }, + "passed": false, + "mismatches": [ + "llm: expected answer to exclude 'из различных подпакетов'" + ], + "details": { + "query": "Открой файл src/plba/__init__.py", + "router_result": { + "schema_version": "1.1", + "intent": "CODE_QA", + "retrieval_profile": "code", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query_plan": { + "raw": "Открой файл src/plba/__init__.py", + "normalized": "Открой файл src/plba/__init__.py", + "sub_intent": "OPEN_FILE", + "negations": [], + "expansions": [ + "file" + ], + "keyword_hints": [], + "path_hints": [ + "src/plba/__init__.py" + ], + "doc_scope_hints": [], + "symbol_candidates": [], + "symbol_kind_hint": "unknown", + "anchors": [ + { + "type": "FILE_PATH", + "value": "src/plba/__init__.py", + "source": "user_text", + "subtype": null, + "span": { + "start": 12, + "end": 32 + }, + "confidence": 0.95 + }, + { + "type": "KEY_TERM", + "value": "файл", + "source": "user_text", + "subtype": null, + "span": { + "start": 7, + "end": 11 + }, + "confidence": 0.9 + } + ] + }, + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 12 + } + ], + "filters": { + "test_policy": "EXCLUDE", + "path_scope": [ + "src/plba/__init__.py" + ], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/plba/__init__.py" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": false, + "max_distance": 2, + "top_k": 5 + } + }, + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [], + "confidence": 0.0 + }, + "evidence_policy": { + "require_def": false, + "require_flow": false, + "require_spec": false, + "allow_answer_without_evidence": false + } + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Открой файл src/plba/__init__.py", + "sub_intent": "OPEN_FILE", + "path_scope": [ + "src/plba/__init__.py" + ], + "keyword_hints": [], + "symbol_candidates": [], + "requested_layers": [ + "C0_SOURCE_CHUNKS" + ], + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 12 + } + ], + "filters": { + "test_policy": "EXCLUDE", + "path_scope": [ + "src/plba/__init__.py" + ], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/plba/__init__.py" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": false, + "max_distance": 2, + "top_k": 5 + } + }, + "query_plan": { + "raw": "Открой файл src/plba/__init__.py", + "normalized": "Открой файл src/plba/__init__.py", + "sub_intent": "OPEN_FILE", + "negations": [], + "expansions": [ + "file" + ], + "keyword_hints": [], + "path_hints": [ + "src/plba/__init__.py" + ], + "doc_scope_hints": [], + "symbol_candidates": [], + "symbol_kind_hint": "unknown", + "anchors": [ + { + "type": "FILE_PATH", + "value": "src/plba/__init__.py", + "source": "user_text", + "subtype": null, + "span": { + "start": 12, + "end": 32 + }, + "confidence": 0.95 + }, + { + "type": "KEY_TERM", + "value": "файл", + "source": "user_text", + "subtype": null, + "span": { + "start": 7, + "end": 11 + }, + "confidence": 0.9 + } + ] + } + }, + "retrieval_result": { + "target_symbol_candidates": [], + "resolved_symbol": null, + "symbol_resolution_status": "not_requested", + "file_candidates": [ + "src/plba/__init__.py" + ], + "code_chunks": [ + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/plba/__init__.py", + "title": "src/plba/__init__.py:1-69", + "content": "from plba.bootstrap import create_runtime\nfrom plba.config import ConfigFileLoader, FileConfigProvider\nfrom plba.control import ControlActionSet, ControlChannel, ControlPlaneService, HttpControlChannel\nfrom plba.contracts import (\n ApplicationModule,\n ConfigProvider,\n HealthContributor,\n TraceContext,\n TraceContextRecord,\n TraceLogMessage,\n TraceTransport,\n Worker,\n WorkerHealth,\n WorkerStatus,\n)\nfrom plba.core import ConfigurationManager, RuntimeManager, ServiceContainer\nfrom plba.health import HealthRegistry\nfrom plba.logging import LogManager\nfrom plba.queue import InMemoryTaskQueue\nfrom plba.tracing import MySqlTraceTransport, NoOpTraceTransport, TraceService\nfrom plba.workflow import (\n StepResult,\n WorkflowContext,\n WorkflowDefinition,\n WorkflowEngine,\n WorkflowEngineHooks,\n WorkflowNode,\n WorkflowRuntimeFactory,\n WorkflowStep,\n)\nfrom plba.workers import WorkerSupervisor\n\n__all__ = [\n \"ApplicationModule\",\n \"ConfigFileLoader\",\n \"ConfigProvider\",\n \"ConfigurationManager\",\n \"ControlActionSet\",\n \"ControlChannel\",\n \"ControlPlaneService\",\n \"create_runtime\",\n \"FileConfigProvider\",\n \"HealthContributor\",\n \"HealthRegistry\",\n \"HttpControlChannel\",\n \"InMemoryTaskQueue\",\n \"LogManager\",\n \"MySqlTraceTransport\",\n \"NoOpTraceTransport\",\n \"RuntimeManager\",\n \"ServiceContainer\",\n \"TraceContext\",\n \"TraceContextRecord\",\n \"TraceLogMessage\",\n \"TraceService\",\n \"TraceTransport\",\n \"StepResult\",\n \"Worker\",\n \"WorkerHealth\",\n \"WorkerStatus\",\n \"WorkflowContext\",\n \"WorkflowDefinition\",\n \"WorkflowEngine\",\n \"WorkflowEngineHooks\",\n \"WorkflowNode\",\n \"WorkflowRuntimeFactory\",\n \"WorkflowStep\",\n \"WorkerSupervisor\",\n]", + "start_line": 1, + "end_line": 69, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "relations": [], + "entrypoints": [], + "test_candidates": [], + "layer_outcomes": [ + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 1, + "empty": false, + "fallback_used": false + } + ], + "missing_layers": [], + "raw_rows": [ + { + "path": "src/plba/__init__.py", + "content": "from plba.bootstrap import create_runtime\nfrom plba.config import ConfigFileLoader, FileConfigProvider\nfrom plba.control import ControlActionSet, ControlChannel, ControlPlaneService, HttpControlChannel\nfrom plba.contracts import (\n ApplicationModule,\n ConfigProvider,\n HealthContributor,\n TraceContext,\n TraceContextRecord,\n TraceLogMessage,\n TraceTransport,\n Worker,\n WorkerHealth,\n WorkerStatus,\n)\nfrom plba.core import ConfigurationManager, RuntimeManager, ServiceContainer\nfrom plba.health import HealthRegistry\nfrom plba.logging import LogManager\nfrom plba.queue import InMemoryTaskQueue\nfrom plba.tracing import MySqlTraceTransport, NoOpTraceTransport, TraceService\nfrom plba.workflow import (\n StepResult,\n WorkflowContext,\n WorkflowDefinition,\n WorkflowEngine,\n WorkflowEngineHooks,\n WorkflowNode,\n WorkflowRuntimeFactory,\n WorkflowStep,\n)\nfrom plba.workers import WorkerSupervisor\n\n__all__ = [\n \"ApplicationModule\",\n \"ConfigFileLoader\",\n \"ConfigProvider\",\n \"ConfigurationManager\",\n \"ControlActionSet\",\n \"ControlChannel\",\n \"ControlPlaneService\",\n \"create_runtime\",\n \"FileConfigProvider\",\n \"HealthContributor\",\n \"HealthRegistry\",\n \"HttpControlChannel\",\n \"InMemoryTaskQueue\",\n \"LogManager\",\n \"MySqlTraceTransport\",\n \"NoOpTraceTransport\",\n \"RuntimeManager\",\n \"ServiceContainer\",\n \"TraceContext\",\n \"TraceContextRecord\",\n \"TraceLogMessage\",\n \"TraceService\",\n \"TraceTransport\",\n \"StepResult\",\n \"Worker\",\n \"WorkerHealth\",\n \"WorkerStatus\",\n \"WorkflowContext\",\n \"WorkflowDefinition\",\n \"WorkflowEngine\",\n \"WorkflowEngineHooks\",\n \"WorkflowNode\",\n \"WorkflowRuntimeFactory\",\n \"WorkflowStep\",\n \"WorkerSupervisor\",\n]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/__init__.py:1-69", + "span_start": 1, + "span_end": 69, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "retrieval_report": { + "executed_layers": [ + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C0_SOURCE_CHUNKS": 200 + }, + "filters_by_layer": { + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src/plba/__init__.py" + ] + } + }, + "requests": [ + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Открой файл src/plba/__init__.py", + "ranking_profile": "code" + } + ], + "fallback": { + "used": false, + "reason": null + }, + "retrieval_by_layer_ms": { + "C0_SOURCE_CHUNKS": 20 + } + } + }, + "diagnostics": { + "intent_correct": null, + "target_found": true, + "layers_used": [ + "C0_SOURCE_CHUNKS" + ], + "retrieval_sufficient": true, + "answer_mode": "normal", + "router_result": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "OPEN_FILE", + "path_scope": [ + "src/plba/__init__.py" + ], + "layers": [ + "C0_SOURCE_CHUNKS" + ], + "symbol_resolution_status": "not_requested" + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Открой файл src/plba/__init__.py", + "sub_intent": "OPEN_FILE", + "path_scope": [ + "src/plba/__init__.py" + ], + "requested_layers": [ + "C0_SOURCE_CHUNKS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 1, + "empty": false, + "fallback_used": false + } + ], + "empty_layers": [], + "evidence_gate_decision": { + "sufficient": true, + "failure_reasons": [], + "evidence_count": 1 + }, + "failure_reasons": [], + "timings_ms": {} + }, + "rag_rows": [ + { + "path": "src/plba/__init__.py", + "content": "from plba.bootstrap import create_runtime\nfrom plba.config import ConfigFileLoader, FileConfigProvider\nfrom plba.control import ControlActionSet, ControlChannel, ControlPlaneService, HttpControlChannel\nfrom plba.contracts import (\n ApplicationModule,\n ConfigProvider,\n HealthContributor,\n TraceContext,\n TraceContextRecord,\n TraceLogMessage,\n TraceTransport,\n Worker,\n WorkerHealth,\n WorkerStatus,\n)\nfrom plba.core import ConfigurationManager, RuntimeManager, ServiceContainer\nfrom plba.health import HealthRegistry\nfrom plba.logging import LogManager\nfrom plba.queue import InMemoryTaskQueue\nfrom plba.tracing import MySqlTraceTransport, NoOpTraceTransport, TraceService\nfrom plba.workflow import (\n StepResult,\n WorkflowContext,\n WorkflowDefinition,\n WorkflowEngine,\n WorkflowEngineHooks,\n WorkflowNode,\n WorkflowRuntimeFactory,\n WorkflowStep,\n)\nfrom plba.workers import WorkerSupervisor\n\n__all__ = [\n \"ApplicationModule\",\n \"ConfigFileLoader\",\n \"ConfigProvider\",\n \"ConfigurationManager\",\n \"ControlActionSet\",\n \"ControlChannel\",\n \"ControlPlaneService\",\n \"create_runtime\",\n \"FileConfigProvider\",\n \"HealthContributor\",\n \"HealthRegistry\",\n \"HttpControlChannel\",\n \"InMemoryTaskQueue\",\n \"LogManager\",\n \"MySqlTraceTransport\",\n \"NoOpTraceTransport\",\n \"RuntimeManager\",\n \"ServiceContainer\",\n \"TraceContext\",\n \"TraceContextRecord\",\n \"TraceLogMessage\",\n \"TraceService\",\n \"TraceTransport\",\n \"StepResult\",\n \"Worker\",\n \"WorkerHealth\",\n \"WorkerStatus\",\n \"WorkflowContext\",\n \"WorkflowDefinition\",\n \"WorkflowEngine\",\n \"WorkflowEngineHooks\",\n \"WorkflowNode\",\n \"WorkflowRuntimeFactory\",\n \"WorkflowStep\",\n \"WorkerSupervisor\",\n]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/__init__.py:1-69", + "span_start": 1, + "span_end": 69, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "validation": { + "passed": true, + "action": "return", + "reasons": [] + } + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-open-file-public-api.md b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-open-file-public-api.md new file mode 100644 index 0000000..ce42881 --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-open-file-public-api.md @@ -0,0 +1,30 @@ +# plba-v2-open-file-public-api + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: agent_runtime +- mode: full_chain +- passed: False + +## Query +Открой файл src/plba/__init__.py + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 1, + "llm_answer": "Путь к файлу: src/plba/__init__.py\n\nВ этом файле находятся импортированные модули и классы из различных подпакетов библиотеки plba. Файл служит точкой входа для пользователей, предоставляя доступ к основным функциям и классам библиотеки. В частности, здесь импортируются:\n\n- Функции и классы для создания runtime (create_runtime)\n- Конфигурационные файлы и провайдеры (ConfigFileLoader, FileConfigProvider)\n- Контрольные каналы и службы (ControlActionSet, ControlChannel, ControlPlaneService, HttpControlChannel)\n- Определения контрактов (ApplicationModule, ConfigProvider, HealthContributor и др.)\n- Менеджеры конфигурации и выполнения (ConfigurationManager, RuntimeManager, ServiceContainer)\n- Службы мониторинга здоровья (HealthRegistry)\n- Управление логированием (LogManager)\n- Очереди задач (InMemoryTaskQueue)\n- Транспортировка трассировки (MySqlTraceTransport, NoOpTraceTransport, TraceService)\n- Определение рабочих потоков и контекстов (StepResult, WorkflowContext, WorkflowDefinition, Workf)", + "answer_mode": "answered", + "path_scope": [ + "src/plba/__init__.py" + ], + "symbol_candidates": [], + "layers": [ + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- llm: expected answer to exclude 'из различных подпакетов' \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-open-file-runtime.json b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-open-file-runtime.json new file mode 100644 index 0000000..7d7cfe4 --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-open-file-runtime.json @@ -0,0 +1,417 @@ +{ + "case_id": "plba-v2-open-file-runtime", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "agent_runtime", + "mode": "full_chain", + "query": "Открой файл src/app_runtime/core/runtime.py", + "actual": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 1, + "llm_answer": "Путь: src/app_runtime/core/runtime.py\n\nВ этом файле содержится определение класса `RuntimeManager`. В примере приведено начало класса с инициализатором (`__init__`) и некоторыми атрибутами и параметрами, такими как `ACTION_TIMEOUT_SECONDS`, `ACTION_POLL_INTERVAL_SECONDS`, а также параметрами конфигурации и сервисов, которые могут передаваться при создании экземпляра класса.", + "answer_mode": "answered", + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "symbol_candidates": [], + "layers": [ + "C0_SOURCE_CHUNKS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "query": "Открой файл src/app_runtime/core/runtime.py", + "router_result": { + "schema_version": "1.1", + "intent": "CODE_QA", + "retrieval_profile": "code", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query_plan": { + "raw": "Открой файл src/app_runtime/core/runtime.py", + "normalized": "Открой файл src/app_runtime/core/runtime.py", + "sub_intent": "OPEN_FILE", + "negations": [], + "expansions": [ + "file" + ], + "keyword_hints": [], + "path_hints": [ + "src/app_runtime/core/runtime.py" + ], + "doc_scope_hints": [], + "symbol_candidates": [], + "symbol_kind_hint": "unknown", + "anchors": [ + { + "type": "FILE_PATH", + "value": "src/app_runtime/core/runtime.py", + "source": "user_text", + "subtype": null, + "span": { + "start": 12, + "end": 43 + }, + "confidence": 0.95 + }, + { + "type": "KEY_TERM", + "value": "файл", + "source": "user_text", + "subtype": null, + "span": { + "start": 7, + "end": 11 + }, + "confidence": 0.9 + } + ] + }, + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 12 + } + ], + "filters": { + "test_policy": "EXCLUDE", + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/app_runtime/core/runtime.py" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": false, + "max_distance": 2, + "top_k": 5 + } + }, + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [], + "confidence": 0.0 + }, + "evidence_policy": { + "require_def": false, + "require_flow": false, + "require_spec": false, + "allow_answer_without_evidence": false + } + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Открой файл src/app_runtime/core/runtime.py", + "sub_intent": "OPEN_FILE", + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "keyword_hints": [], + "symbol_candidates": [], + "requested_layers": [ + "C0_SOURCE_CHUNKS" + ], + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 12 + } + ], + "filters": { + "test_policy": "EXCLUDE", + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/app_runtime/core/runtime.py" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": false, + "max_distance": 2, + "top_k": 5 + } + }, + "query_plan": { + "raw": "Открой файл src/app_runtime/core/runtime.py", + "normalized": "Открой файл src/app_runtime/core/runtime.py", + "sub_intent": "OPEN_FILE", + "negations": [], + "expansions": [ + "file" + ], + "keyword_hints": [], + "path_hints": [ + "src/app_runtime/core/runtime.py" + ], + "doc_scope_hints": [], + "symbol_candidates": [], + "symbol_kind_hint": "unknown", + "anchors": [ + { + "type": "FILE_PATH", + "value": "src/app_runtime/core/runtime.py", + "source": "user_text", + "subtype": null, + "span": { + "start": 12, + "end": 43 + }, + "confidence": 0.95 + }, + { + "type": "KEY_TERM", + "value": "файл", + "source": "user_text", + "subtype": null, + "span": { + "start": 7, + "end": 11 + }, + "confidence": 0.9 + } + ] + } + }, + "retrieval_result": { + "target_symbol_candidates": [], + "resolved_symbol": null, + "symbol_resolution_status": "not_requested", + "file_candidates": [ + "src/app_runtime/core/runtime.py" + ], + "code_chunks": [ + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/core/runtime.py", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "start_line": 18, + "end_line": 179, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "relations": [], + "entrypoints": [], + "test_candidates": [], + "layer_outcomes": [ + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 1, + "empty": false, + "fallback_used": false + } + ], + "missing_layers": [], + "raw_rows": [ + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "retrieval_report": { + "executed_layers": [ + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C0_SOURCE_CHUNKS": 200 + }, + "filters_by_layer": { + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src/app_runtime/core/runtime.py" + ] + } + }, + "requests": [ + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Открой файл src/app_runtime/core/runtime.py", + "ranking_profile": "code" + } + ], + "fallback": { + "used": false, + "reason": null + }, + "retrieval_by_layer_ms": { + "C0_SOURCE_CHUNKS": 218 + } + } + }, + "diagnostics": { + "intent_correct": null, + "target_found": true, + "layers_used": [ + "C0_SOURCE_CHUNKS" + ], + "retrieval_sufficient": true, + "answer_mode": "normal", + "router_result": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "OPEN_FILE", + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "layers": [ + "C0_SOURCE_CHUNKS" + ], + "symbol_resolution_status": "not_requested" + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Открой файл src/app_runtime/core/runtime.py", + "sub_intent": "OPEN_FILE", + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "requested_layers": [ + "C0_SOURCE_CHUNKS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 1, + "empty": false, + "fallback_used": false + } + ], + "empty_layers": [], + "evidence_gate_decision": { + "sufficient": true, + "failure_reasons": [], + "evidence_count": 1 + }, + "failure_reasons": [], + "timings_ms": {} + }, + "rag_rows": [ + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "validation": { + "passed": true, + "action": "return", + "reasons": [] + } + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-open-file-runtime.md b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-open-file-runtime.md new file mode 100644 index 0000000..b1b8431 --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-open-file-runtime.md @@ -0,0 +1,30 @@ +# plba-v2-open-file-runtime + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: agent_runtime +- mode: full_chain +- passed: True + +## Query +Открой файл src/app_runtime/core/runtime.py + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 1, + "llm_answer": "Путь: src/app_runtime/core/runtime.py\n\nВ этом файле содержится определение класса `RuntimeManager`. В примере приведено начало класса с инициализатором (`__init__`) и некоторыми атрибутами и параметрами, такими как `ACTION_TIMEOUT_SECONDS`, `ACTION_POLL_INTERVAL_SECONDS`, а также параметрами конфигурации и сервисов, которые могут передаваться при создании экземпляра класса.", + "answer_mode": "answered", + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "symbol_candidates": [], + "layers": [ + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-health-endpoint.json b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-health-endpoint.json new file mode 100644 index 0000000..d10f193 --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-health-endpoint.json @@ -0,0 +1,4707 @@ +{ + "case_id": "plba-v2-trace-flow-health-endpoint", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "agent_runtime", + "mode": "full_chain", + "query": "Покажи как проходит запрос /health в HttpControlAppFactory", + "actual": { + "intent": "CODE_QA", + "sub_intent": "TRACE_FLOW", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 37, + "llm_answer": "1. HttpControlAppFactory.create(health_provider, action_provider)\n - Создает экземпляр FastAPI приложения.\n - Добавляет middleware для логирования времени ответа.\n - Определяет маршрут `/health`.\n \n2. HttpControlAppFactory.create().get(\"/health\")\n - Вызывает health_provider, чтобы получить состояние здоровья.\n - Устанавливает статус-код ответа:\n - 200, если состояние \"ok\".\n - 503, если состояние отличное от \"ok\".\n - Возвращает JSON с состоянием здоровья.\n\nЦепочка неполная, так как отсутствует детальная информация о вызове health_provider и его реализации.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "health", + "HttpControlAppFactory" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "query": "Покажи как проходит запрос /health в HttpControlAppFactory", + "router_result": { + "schema_version": "1.1", + "intent": "CODE_QA", + "retrieval_profile": "code", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query_plan": { + "raw": "Покажи как проходит запрос /health в HttpControlAppFactory", + "normalized": "Покажи как проходит запрос /health в HttpControlAppFactory", + "sub_intent": "TRACE_FLOW", + "negations": [], + "expansions": [ + "health", + "HttpControlAppFactory" + ], + "keyword_hints": [ + "health", + "HttpControlAppFactory" + ], + "path_hints": [], + "doc_scope_hints": [], + "symbol_candidates": [ + "health", + "HttpControlAppFactory" + ], + "symbol_kind_hint": "unknown", + "anchors": [ + { + "type": "SYMBOL", + "value": "health", + "source": "user_text", + "subtype": null, + "span": { + "start": 28, + "end": 34 + }, + "confidence": 0.88 + }, + { + "type": "SYMBOL", + "value": "HttpControlAppFactory", + "source": "user_text", + "subtype": null, + "span": { + "start": 37, + "end": 58 + }, + "confidence": 0.88 + } + ] + }, + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "top_k": 8 + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 8 + }, + { + "layer_id": "C4_SEMANTIC_ROLES", + "top_k": 8 + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "top_k": 10 + }, + { + "layer_id": "C3_ENTRYPOINTS", + "top_k": 10 + } + ], + "filters": { + "test_policy": "EXCLUDE", + "path_scope": [], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + }, + "symbol_resolution": { + "status": "pending", + "resolved_symbol": null, + "alternatives": [ + "health", + "HttpControlAppFactory" + ], + "confidence": 0.0 + }, + "evidence_policy": { + "require_def": true, + "require_flow": true, + "require_spec": false, + "allow_answer_without_evidence": false + } + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Покажи как проходит запрос /health в HttpControlAppFactory", + "sub_intent": "TRACE_FLOW", + "path_scope": [], + "keyword_hints": [ + "health", + "HttpControlAppFactory" + ], + "symbol_candidates": [ + "health", + "HttpControlAppFactory" + ], + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "top_k": 8 + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 8 + }, + { + "layer_id": "C4_SEMANTIC_ROLES", + "top_k": 8 + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "top_k": 10 + }, + { + "layer_id": "C3_ENTRYPOINTS", + "top_k": 10 + } + ], + "filters": { + "test_policy": "EXCLUDE", + "path_scope": [], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + }, + "query_plan": { + "raw": "Покажи как проходит запрос /health в HttpControlAppFactory", + "normalized": "Покажи как проходит запрос /health в HttpControlAppFactory", + "sub_intent": "TRACE_FLOW", + "negations": [], + "expansions": [ + "health", + "HttpControlAppFactory" + ], + "keyword_hints": [ + "health", + "HttpControlAppFactory" + ], + "path_hints": [], + "doc_scope_hints": [], + "symbol_candidates": [ + "health", + "HttpControlAppFactory" + ], + "symbol_kind_hint": "unknown", + "anchors": [ + { + "type": "SYMBOL", + "value": "health", + "source": "user_text", + "subtype": null, + "span": { + "start": 28, + "end": 34 + }, + "confidence": 0.88 + }, + { + "type": "SYMBOL", + "value": "HttpControlAppFactory", + "source": "user_text", + "subtype": null, + "span": { + "start": 37, + "end": 58 + }, + "confidence": 0.88 + } + ] + } + }, + "retrieval_result": { + "target_symbol_candidates": [ + "HttpControlAppFactory", + "ControlActionSet", + "ControlPlaneService", + "HealthContributor.health", + "HealthContributor", + "ControlChannel" + ], + "resolved_symbol": "HttpControlAppFactory", + "symbol_resolution_status": "resolved", + "file_candidates": [ + "src/app_runtime/control/http_app.py", + "src/app_runtime/control/http_channel.py", + "src/app_runtime/control/base.py", + "src/app_runtime/control/__init__.py", + "src/app_runtime/contracts/health.py", + "src/app_runtime/control/http_runner.py", + "src/app_runtime/control/service.py", + "src/app_runtime/health/registry.py", + "src/app_runtime/core/types.py" + ], + "code_chunks": [ + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/http_app.py", + "title": "HttpControlAppFactory", + "content": "class HttpControlAppFactory\nHttpControlAppFactory", + "start_line": 15, + "end_line": 53, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "qname": "HttpControlAppFactory", + "kind": "class", + "signature": "HttpControlAppFactory", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/http_channel.py", + "title": "HttpControlAppFactory", + "content": "const HttpControlAppFactory\nHttpControlAppFactory = app_runtime.control.http_app.HttpControlAppFactory", + "start_line": 8, + "end_line": 8, + "metadata": { + "symbol_id": "9ee00379ee797cd2386e88a6e37dc69e3e31de9144fc4b95f0206cd1430e8983", + "qname": "HttpControlAppFactory", + "kind": "const", + "signature": "HttpControlAppFactory = app_runtime.control.http_app.HttpControlAppFactory", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/base.py", + "title": "ControlActionSet", + "content": "class ControlActionSet\nControlActionSet", + "start_line": 14, + "end_line": 18, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "qname": "ControlActionSet", + "kind": "class", + "signature": "ControlActionSet", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/__init__.py", + "title": "ControlPlaneService", + "content": "const ControlPlaneService\nControlPlaneService = app_runtime.control.service.ControlPlaneService", + "start_line": 3, + "end_line": 3, + "metadata": { + "symbol_id": "217e8f044d1c01644bf7b81e5046af9e84469210c692a2fb0c476a19bb069ae1", + "qname": "ControlPlaneService", + "kind": "const", + "signature": "ControlPlaneService = app_runtime.control.service.ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/contracts/health.py", + "title": "HealthContributor.health", + "content": "method HealthContributor.health\nhealth(self)\nReturn contributor health state.", + "start_line": 9, + "end_line": 10, + "metadata": { + "symbol_id": "728cff18958d8a25e2661a0f08c83d68c3bbbfa8cef212b85dc0da2b11b3dc90", + "qname": "HealthContributor.health", + "kind": "method", + "signature": "health(self)", + "parent_symbol_id": "HealthContributor", + "package_or_module": "src.app_runtime.contracts.health", + "is_test": false, + "blob_sha": "6bd92611def7131e32d4dd34a8ed85e6cf3c67722ad27797032a632cb30dc097", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/contracts/health.py", + "title": "HealthContributor", + "content": "class HealthContributor\nHealthContributor(ABC)", + "start_line": 7, + "end_line": 10, + "metadata": { + "symbol_id": "db91ae387b89a2e9d83829754f27fa18a4055b3e72d7f31789a0b8e0bf5bba0b", + "qname": "HealthContributor", + "kind": "class", + "signature": "HealthContributor(ABC)", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.contracts.health", + "is_test": false, + "blob_sha": "6bd92611def7131e32d4dd34a8ed85e6cf3c67722ad27797032a632cb30dc097", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/__init__.py", + "title": "ControlActionSet", + "content": "const ControlActionSet\nControlActionSet = app_runtime.control.base.ControlActionSet", + "start_line": 1, + "end_line": 1, + "metadata": { + "symbol_id": "767e4ac0d4224aeccb0783a38359d3c03899a876736eb83d99887c16ea07cc6c", + "qname": "ControlActionSet", + "kind": "const", + "signature": "ControlActionSet = app_runtime.control.base.ControlActionSet", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/__init__.py", + "title": "ControlChannel", + "content": "const ControlChannel\nControlChannel = app_runtime.control.base.ControlChannel", + "start_line": 1, + "end_line": 1, + "metadata": { + "symbol_id": "268420f7aa4ed74082b9276cae0cded4f00bac090ffd58fa020a65be0fe19c27", + "qname": "ControlChannel", + "kind": "const", + "signature": "ControlChannel = app_runtime.control.base.ControlChannel", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/http_channel.py", + "title": "src/app_runtime/control/http_channel.py:HttpControlChannel", + "content": "class HttpControlChannel(ControlChannel):\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._timeout = timeout\n self._runner = UvicornThreadRunner(host, port, timeout)\n self._factory = HttpControlAppFactory()\n self._actions: ControlActionSet | None = None\n\n async def start(self, actions: ControlActionSet) -> None:\n self._actions = actions\n app = self._factory.create(self._health_response, self._action_response)\n await self._runner.start(app)\n\n async def stop(self) -> None:\n await self._runner.stop()\n\n @property\n def port(self) -> int:\n return self._runner.port\n\n async def _health_response(self) -> dict[str, object]:\n if self._actions is None:\n return {\"status\": \"unhealthy\", \"detail\": \"control actions are not configured\"}\n return await asyncio.wait_for(self._actions.health(), timeout=float(self._timeout))\n\n async def _action_response(self, action: str, _client_source: str = \"unknown\") -> JSONResponse:\n if self._actions is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"{action} handler is not configured\"}, status_code=404)\n callbacks = {\n \"start\": self._actions.start,\n \"stop\": self._actions.stop,\n \"status\": self._actions.status,\n }\n callback = callbacks.get(action)\n if callback is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"unsupported action: {action}\"}, status_code=404)\n action_timeout = max(float(self._timeout), 10.0) if action in {\"start\", \"stop\"} else float(self._timeout)\n try:\n detail = await asyncio.wait_for(callback(), timeout=action_timeout)\n except asyncio.TimeoutError:\n return JSONResponse(\n content={\"status\": \"accepted\", \"detail\": f\"{action} operation is still in progress\"},\n status_code=202,\n )\n except Exception as exc:\n return JSONResponse(content={\"status\": \"error\", \"detail\": str(exc)}, status_code=500)\n return JSONResponse(content={\"status\": \"ok\", \"detail\": detail or f\"{action} action accepted\"}, status_code=200)", + "start_line": 12, + "end_line": 57, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/http_runner.py", + "title": "src/app_runtime/control/http_runner.py:UvicornThreadRunner", + "content": "class UvicornThreadRunner:\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._host = host\n self._port = port\n self._timeout = timeout\n self._server: Server | None = None\n self._thread: Thread | None = None\n self._error: BaseException | None = None\n\n async def start(self, app: FastAPI) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._error = None\n config = Config(app=app, host=self._host, port=self._port, log_level=\"warning\")\n self._server = Server(config)\n self._thread = Thread(target=self._serve, name=\"plba-http-control\", daemon=True)\n self._thread.start()\n await self._wait_until_started()\n\n async def stop(self) -> None:\n if self._server is None or self._thread is None:\n return\n self._server.should_exit = True\n await asyncio.to_thread(self._thread.join, self._timeout)\n self._server = None\n self._thread = None\n\n @property\n def port(self) -> int:\n if self._server is None or not getattr(self._server, \"servers\", None):\n return self._port\n socket = self._server.servers[0].sockets[0]\n return int(socket.getsockname()[1])\n\n async def _wait_until_started(self) -> None:\n if self._server is None:\n raise RuntimeError(\"Server is not initialized\")\n deadline = asyncio.get_running_loop().time() + max(float(self._timeout), 1.0)\n while not self._server.started:\n if self._error is not None:\n raise RuntimeError(\"HTTP control server failed to start\") from self._error\n if asyncio.get_running_loop().time() >= deadline:\n raise TimeoutError(\"HTTP control server startup timed out\")\n await asyncio.sleep(0.05)\n\n def _serve(self) -> None:\n if self._server is None:\n return\n try:\n asyncio.run(self._server.serve())\n except BaseException as exc: # noqa: BLE001\n self._error = exc", + "start_line": 10, + "end_line": 61, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_runner", + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/http_app.py", + "title": "src/app_runtime/control/http_app.py:HttpControlAppFactory", + "content": "class HttpControlAppFactory:\n def create(\n self,\n health_provider: Callable[[], Awaitable[HealthPayload]],\n action_provider: Callable[[str, str], Awaitable[JSONResponse]],\n ) -> FastAPI:\n app = FastAPI(title=\"PLBA Control API\")\n\n @app.middleware(\"http\")\n async def log_api_call(request: Request, call_next): # type: ignore[no-untyped-def]\n started = time.monotonic()\n response = await call_next(request)\n response.headers[\"X-Response-Time-Ms\"] = str(int((time.monotonic() - started) * 1000))\n return response\n\n @app.get(\"/health\")\n async def health() -> JSONResponse:\n payload = await health_provider()\n status_code = 200 if payload.get(\"status\") == \"ok\" else 503\n return JSONResponse(content=payload, status_code=status_code)\n\n @app.get(\"/actions/{action}\")\n @app.post(\"/actions/{action}\")\n async def action(action: str, request: Request) -> JSONResponse:\n client_source = self._client_source(request)\n if action in {\"start\", \"stop\"}:\n LOGGER.warning(\"Control action requested: /actions/%s client=%s\", action, client_source)\n return await action_provider(action, client_source)\n\n return app\n\n def _client_source(self, request: Request) -> str:\n explicit_header = request.headers.get(\"X-Client-Source\", \"\").strip()\n if explicit_header:\n return explicit_header\n user_agent = request.headers.get(\"User-Agent\", \"\").strip()\n if user_agent:\n return f\"user-agent:{user_agent}\"\n return \"unknown\"", + "start_line": 15, + "end_line": 53, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/contracts/health.py", + "title": "src/app_runtime/contracts/health.py:HealthContributor", + "content": "class HealthContributor(ABC):\n @abstractmethod\n def health(self) -> WorkerHealth:\n \"\"\"Return contributor health state.\"\"\"", + "start_line": 7, + "end_line": 10, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.health", + "is_test": false, + "blob_sha": "6bd92611def7131e32d4dd34a8ed85e6cf3c67722ad27797032a632cb30dc097", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/base.py", + "title": "src/app_runtime/control/base.py:ControlChannel", + "content": "class ControlChannel(ABC):\n @abstractmethod\n async def start(self, actions: ControlActionSet) -> None:\n \"\"\"Start the control channel and bind handlers.\"\"\"\n\n @abstractmethod\n async def stop(self) -> None:\n \"\"\"Stop the control channel and release resources.\"\"\"", + "start_line": 21, + "end_line": 28, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/__init__.py", + "title": "src/app_runtime/control/__init__.py:1-5", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\"ControlActionSet\", \"ControlChannel\", \"ControlPlaneService\", \"HttpControlChannel\"]", + "start_line": 1, + "end_line": 5, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/base.py", + "title": "src/app_runtime/control/base.py:ControlActionSet", + "content": "class ControlActionSet:\n health: HealthHandler\n start: ActionHandler\n stop: ActionHandler\n status: ActionHandler", + "start_line": 14, + "end_line": 18, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/service.py", + "title": "src/app_runtime/control/service.py:ControlPlaneService", + "content": "class ControlPlaneService:\n def __init__(self) -> None:\n self._channels: list[ControlChannel] = []\n\n def register_channel(self, channel: ControlChannel) -> None:\n self._channels.append(channel)\n\n def start(self, runtime: RuntimeManager) -> None:\n if not self._channels:\n return\n asyncio.run(self._start_async(runtime))\n\n def stop(self) -> None:\n if not self._channels:\n return\n asyncio.run(self._stop_async())\n\n def snapshot(self, runtime: RuntimeManager) -> dict[str, object]:\n health = runtime.current_health()\n return {\n \"runtime\": {\"state\": runtime._state.value},\n \"modules\": list(runtime.registry.modules),\n \"services\": runtime.services.snapshot(),\n \"workers\": runtime.workers.snapshot(),\n \"health\": runtime.health.snapshot(runtime.workers.healths()) | {\"status\": health[\"status\"]},\n \"config\": runtime.configuration.get(),\n }\n\n async def _start_async(self, runtime: RuntimeManager) -> None:\n actions = ControlActionSet(\n health=runtime.health_status,\n start=runtime.start_runtime,\n stop=runtime.stop_runtime,\n status=runtime.runtime_status,\n )\n for channel in self._channels:\n await channel.start(actions)\n\n async def _stop_async(self) -> None:\n for channel in reversed(self._channels):\n await channel.stop()", + "start_line": 12, + "end_line": 52, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/http_app.py", + "title": "HttpControlAppFactory", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "start_line": 15, + "end_line": 53, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/health/registry.py", + "title": "HealthRegistry", + "content": "HealthRegistry\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (2)", + "start_line": 8, + "end_line": 56, + "metadata": { + "symbol_id": "fd3390eb0ba29c9979466b9c2117238e0da3bb829eeb4d505cb34c9c3df7a8e8", + "symbol_name": "HealthRegistry", + "qname": "HealthRegistry", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 2, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "26e6a24daa43407ba5340b74497c20153020e79f8d7828ae502aaec378dfcf75", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/core/types.py", + "title": "HealthPayload", + "content": "HealthPayload\nrole: model\n\nResponsibilities:\n- default model role", + "start_line": 7, + "end_line": 11, + "metadata": { + "symbol_id": "392235d63ddf752d6e419cb8528c93fe070d1bc02d3c87ba6a897baac810cf5d", + "symbol_name": "HealthPayload", + "qname": "HealthPayload", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "448a02e4a432b5ab65b246b2bd24a32a6f127b9d2091ea73b53ee3c0a2f53bb3", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/contracts/health.py", + "title": "HealthContributor", + "content": "HealthContributor\nrole: model\n\nResponsibilities:\n- default model role", + "start_line": 7, + "end_line": 10, + "metadata": { + "symbol_id": "db91ae387b89a2e9d83829754f27fa18a4055b3e72d7f31789a0b8e0bf5bba0b", + "symbol_name": "HealthContributor", + "qname": "HealthContributor", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "6bd92611def7131e32d4dd34a8ed85e6cf3c67722ad27797032a632cb30dc097", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/base.py", + "title": "ControlActionSet", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "start_line": 14, + "end_line": 18, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/base.py", + "title": "ControlChannel", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "start_line": 21, + "end_line": 28, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "start_line": 12, + "end_line": 52, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/http_runner.py", + "title": "UvicornThreadRunner", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "start_line": 10, + "end_line": 61, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/health/registry.py", + "title": "HealthRegistry.__init__:dataflow_slice", + "content": "HealthRegistry.__init__\n -> HealthRegistry._contributors\n -> HealthRegistry.register", + "start_line": 10, + "end_line": 13, + "metadata": { + "edge_id": "2381dfb339d541367c3251d2a610cac9d8b3f6bd6a352e119d00a93c5ccc2b7d", + "edge_type": "dataflow_slice", + "src_symbol_id": "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "src_qname": "HealthRegistry.__init__", + "dst_symbol_id": "a9e1f290c346c8bb1d67af0cafeebb5bcaf29c3ed7027e33c794532743df38f2", + "dst_ref": "HealthRegistry.register", + "resolution": "resolved", + "slice_id": "2381dfb339d541367c3251d2a610cac9d8b3f6bd6a352e119d00a93c5ccc2b7d", + "root_symbol_id": "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "path_symbols": [ + "HealthRegistry.__init__", + "HealthRegistry._contributors", + "HealthRegistry.register" + ], + "path_symbol_ids": [ + "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "a9e1f290c346c8bb1d67af0cafeebb5bcaf29c3ed7027e33c794532743df38f2" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "26e6a24daa43407ba5340b74497c20153020e79f8d7828ae502aaec378dfcf75", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "start_line": 14, + "end_line": 20, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "start_line": 14, + "end_line": 25, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "start_line": 14, + "end_line": 51, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/health/registry.py", + "title": "HealthRegistry.__init__:dataflow_slice", + "content": "HealthRegistry.__init__\n -> HealthRegistry._contributors\n -> HealthRegistry.contributor_healths", + "start_line": 10, + "end_line": 16, + "metadata": { + "edge_id": "d3a88a7abf16359e903e809ffc24473658fdd8198f60641fe1584fc4ac663c31", + "edge_type": "dataflow_slice", + "src_symbol_id": "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "src_qname": "HealthRegistry.__init__", + "dst_symbol_id": "fa7bbd8f4b64a55a5088640c30f52e84075d65f531bd7e1f6c1d7bb8d24fcbf2", + "dst_ref": "HealthRegistry.contributor_healths", + "resolution": "resolved", + "slice_id": "d3a88a7abf16359e903e809ffc24473658fdd8198f60641fe1584fc4ac663c31", + "root_symbol_id": "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "path_symbols": [ + "HealthRegistry.__init__", + "HealthRegistry._contributors", + "HealthRegistry.contributor_healths" + ], + "path_symbol_ids": [ + "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "fa7bbd8f4b64a55a5088640c30f52e84075d65f531bd7e1f6c1d7bb8d24fcbf2" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "26e6a24daa43407ba5340b74497c20153020e79f8d7828ae502aaec378dfcf75", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "start_line": 14, + "end_line": 47, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "start_line": 14, + "end_line": 17, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/http_app.py", + "title": "HttpControlAppFactory.create:calls", + "content": "HttpControlAppFactory.create calls time.monotonic", + "start_line": 25, + "end_line": 25, + "metadata": { + "edge_id": "3fdd0a88d10225ee74f3b84ab57e13f09f5ccc72f00e31af9ae4655411c289c0", + "edge_type": "calls", + "src_symbol_id": "4af42c2a9275d652e710a98ec48b8247236b4453a093629f8958704ff6d3cb58", + "src_qname": "HttpControlAppFactory.create", + "dst_symbol_id": null, + "dst_ref": "time.monotonic", + "resolution": "partial", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/http_app.py", + "title": "HttpControlAppFactory.create:calls", + "content": "HttpControlAppFactory.create calls app.post", + "start_line": 37, + "end_line": 37, + "metadata": { + "edge_id": "0e545d4b5187db7bec5ceac03071d2ad68177550c42af748fee364639e533c90", + "edge_type": "calls", + "src_symbol_id": "4af42c2a9275d652e710a98ec48b8247236b4453a093629f8958704ff6d3cb58", + "src_qname": "HttpControlAppFactory.create", + "dst_symbol_id": null, + "dst_ref": "app.post", + "resolution": "partial", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/http_app.py", + "title": "HttpControlAppFactory.create:calls", + "content": "HttpControlAppFactory.create calls str", + "start_line": 27, + "end_line": 27, + "metadata": { + "edge_id": "2a87c51461e31cd556508cc37fdff37b4d24c26f7f1604db30af5e8f1bda96cb", + "edge_type": "calls", + "src_symbol_id": "4af42c2a9275d652e710a98ec48b8247236b4453a093629f8958704ff6d3cb58", + "src_qname": "HttpControlAppFactory.create", + "dst_symbol_id": null, + "dst_ref": "str", + "resolution": "partial", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C3_ENTRYPOINTS", + "path": "src/app_runtime/control/http_app.py", + "title": "app.post", + "content": "fastapi http app.post", + "start_line": 38, + "end_line": 42, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C3_ENTRYPOINTS", + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "content": "fastapi http app.get", + "start_line": 31, + "end_line": 34, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C3_ENTRYPOINTS", + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "content": "fastapi http app.get", + "start_line": 38, + "end_line": 42, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "relations": [ + { + "path": "src/app_runtime/health/registry.py", + "metadata": { + "edge_id": "2381dfb339d541367c3251d2a610cac9d8b3f6bd6a352e119d00a93c5ccc2b7d", + "edge_type": "dataflow_slice", + "src_symbol_id": "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "src_qname": "HealthRegistry.__init__", + "dst_symbol_id": "a9e1f290c346c8bb1d67af0cafeebb5bcaf29c3ed7027e33c794532743df38f2", + "dst_ref": "HealthRegistry.register", + "resolution": "resolved", + "slice_id": "2381dfb339d541367c3251d2a610cac9d8b3f6bd6a352e119d00a93c5ccc2b7d", + "root_symbol_id": "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "path_symbols": [ + "HealthRegistry.__init__", + "HealthRegistry._contributors", + "HealthRegistry.register" + ], + "path_symbol_ids": [ + "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "a9e1f290c346c8bb1d67af0cafeebb5bcaf29c3ed7027e33c794532743df38f2" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "26e6a24daa43407ba5340b74497c20153020e79f8d7828ae502aaec378dfcf75", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "HealthRegistry.__init__\n -> HealthRegistry._contributors\n -> HealthRegistry.register" + }, + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start" + }, + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop" + }, + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async" + }, + { + "path": "src/app_runtime/health/registry.py", + "metadata": { + "edge_id": "d3a88a7abf16359e903e809ffc24473658fdd8198f60641fe1584fc4ac663c31", + "edge_type": "dataflow_slice", + "src_symbol_id": "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "src_qname": "HealthRegistry.__init__", + "dst_symbol_id": "fa7bbd8f4b64a55a5088640c30f52e84075d65f531bd7e1f6c1d7bb8d24fcbf2", + "dst_ref": "HealthRegistry.contributor_healths", + "resolution": "resolved", + "slice_id": "d3a88a7abf16359e903e809ffc24473658fdd8198f60641fe1584fc4ac663c31", + "root_symbol_id": "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "path_symbols": [ + "HealthRegistry.__init__", + "HealthRegistry._contributors", + "HealthRegistry.contributor_healths" + ], + "path_symbol_ids": [ + "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "fa7bbd8f4b64a55a5088640c30f52e84075d65f531bd7e1f6c1d7bb8d24fcbf2" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "26e6a24daa43407ba5340b74497c20153020e79f8d7828ae502aaec378dfcf75", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "HealthRegistry.__init__\n -> HealthRegistry._contributors\n -> HealthRegistry.contributor_healths" + }, + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async" + }, + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel" + }, + { + "path": "src/app_runtime/control/http_app.py", + "metadata": { + "edge_id": "3fdd0a88d10225ee74f3b84ab57e13f09f5ccc72f00e31af9ae4655411c289c0", + "edge_type": "calls", + "src_symbol_id": "4af42c2a9275d652e710a98ec48b8247236b4453a093629f8958704ff6d3cb58", + "src_qname": "HttpControlAppFactory.create", + "dst_symbol_id": null, + "dst_ref": "time.monotonic", + "resolution": "partial", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "HttpControlAppFactory.create calls time.monotonic" + }, + { + "path": "src/app_runtime/control/http_app.py", + "metadata": { + "edge_id": "0e545d4b5187db7bec5ceac03071d2ad68177550c42af748fee364639e533c90", + "edge_type": "calls", + "src_symbol_id": "4af42c2a9275d652e710a98ec48b8247236b4453a093629f8958704ff6d3cb58", + "src_qname": "HttpControlAppFactory.create", + "dst_symbol_id": null, + "dst_ref": "app.post", + "resolution": "partial", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "HttpControlAppFactory.create calls app.post" + }, + { + "path": "src/app_runtime/control/http_app.py", + "metadata": { + "edge_id": "2a87c51461e31cd556508cc37fdff37b4d24c26f7f1604db30af5e8f1bda96cb", + "edge_type": "calls", + "src_symbol_id": "4af42c2a9275d652e710a98ec48b8247236b4453a093629f8958704ff6d3cb58", + "src_qname": "HttpControlAppFactory.create", + "dst_symbol_id": null, + "dst_ref": "str", + "resolution": "partial", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "HttpControlAppFactory.create calls str" + } + ], + "entrypoints": [ + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.post", + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "test_candidates": [], + "layer_outcomes": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C4_SEMANTIC_ROLES", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 10, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C3_ENTRYPOINTS", + "hit_count": 3, + "empty": false, + "fallback_used": false + } + ], + "missing_layers": [], + "raw_rows": [ + { + "path": "src/app_runtime/control/http_app.py", + "content": "class HttpControlAppFactory\nHttpControlAppFactory", + "layer": "C1_SYMBOL_CATALOG", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "qname": "HttpControlAppFactory", + "kind": "class", + "signature": "HttpControlAppFactory", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "const HttpControlAppFactory\nHttpControlAppFactory = app_runtime.control.http_app.HttpControlAppFactory", + "layer": "C1_SYMBOL_CATALOG", + "title": "HttpControlAppFactory", + "span_start": 8, + "span_end": 8, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "9ee00379ee797cd2386e88a6e37dc69e3e31de9144fc4b95f0206cd1430e8983", + "qname": "HttpControlAppFactory", + "kind": "const", + "signature": "HttpControlAppFactory = app_runtime.control.http_app.HttpControlAppFactory", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlActionSet\nControlActionSet", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "qname": "ControlActionSet", + "kind": "class", + "signature": "ControlActionSet", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "const ControlPlaneService\nControlPlaneService = app_runtime.control.service.ControlPlaneService", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlPlaneService", + "span_start": 3, + "span_end": 3, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "217e8f044d1c01644bf7b81e5046af9e84469210c692a2fb0c476a19bb069ae1", + "qname": "ControlPlaneService", + "kind": "const", + "signature": "ControlPlaneService = app_runtime.control.service.ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/health.py", + "content": "method HealthContributor.health\nhealth(self)\nReturn contributor health state.", + "layer": "C1_SYMBOL_CATALOG", + "title": "HealthContributor.health", + "span_start": 9, + "span_end": 10, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "728cff18958d8a25e2661a0f08c83d68c3bbbfa8cef212b85dc0da2b11b3dc90", + "qname": "HealthContributor.health", + "kind": "method", + "signature": "health(self)", + "parent_symbol_id": "HealthContributor", + "package_or_module": "src.app_runtime.contracts.health", + "is_test": false, + "blob_sha": "6bd92611def7131e32d4dd34a8ed85e6cf3c67722ad27797032a632cb30dc097", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/health.py", + "content": "class HealthContributor\nHealthContributor(ABC)", + "layer": "C1_SYMBOL_CATALOG", + "title": "HealthContributor", + "span_start": 7, + "span_end": 10, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "db91ae387b89a2e9d83829754f27fa18a4055b3e72d7f31789a0b8e0bf5bba0b", + "qname": "HealthContributor", + "kind": "class", + "signature": "HealthContributor(ABC)", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.contracts.health", + "is_test": false, + "blob_sha": "6bd92611def7131e32d4dd34a8ed85e6cf3c67722ad27797032a632cb30dc097", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "const ControlActionSet\nControlActionSet = app_runtime.control.base.ControlActionSet", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlActionSet", + "span_start": 1, + "span_end": 1, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "767e4ac0d4224aeccb0783a38359d3c03899a876736eb83d99887c16ea07cc6c", + "qname": "ControlActionSet", + "kind": "const", + "signature": "ControlActionSet = app_runtime.control.base.ControlActionSet", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "const ControlChannel\nControlChannel = app_runtime.control.base.ControlChannel", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlChannel", + "span_start": 1, + "span_end": 1, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "268420f7aa4ed74082b9276cae0cded4f00bac090ffd58fa020a65be0fe19c27", + "qname": "ControlChannel", + "kind": "const", + "signature": "ControlChannel = app_runtime.control.base.ControlChannel", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel(ControlChannel):\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._timeout = timeout\n self._runner = UvicornThreadRunner(host, port, timeout)\n self._factory = HttpControlAppFactory()\n self._actions: ControlActionSet | None = None\n\n async def start(self, actions: ControlActionSet) -> None:\n self._actions = actions\n app = self._factory.create(self._health_response, self._action_response)\n await self._runner.start(app)\n\n async def stop(self) -> None:\n await self._runner.stop()\n\n @property\n def port(self) -> int:\n return self._runner.port\n\n async def _health_response(self) -> dict[str, object]:\n if self._actions is None:\n return {\"status\": \"unhealthy\", \"detail\": \"control actions are not configured\"}\n return await asyncio.wait_for(self._actions.health(), timeout=float(self._timeout))\n\n async def _action_response(self, action: str, _client_source: str = \"unknown\") -> JSONResponse:\n if self._actions is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"{action} handler is not configured\"}, status_code=404)\n callbacks = {\n \"start\": self._actions.start,\n \"stop\": self._actions.stop,\n \"status\": self._actions.status,\n }\n callback = callbacks.get(action)\n if callback is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"unsupported action: {action}\"}, status_code=404)\n action_timeout = max(float(self._timeout), 10.0) if action in {\"start\", \"stop\"} else float(self._timeout)\n try:\n detail = await asyncio.wait_for(callback(), timeout=action_timeout)\n except asyncio.TimeoutError:\n return JSONResponse(\n content={\"status\": \"accepted\", \"detail\": f\"{action} operation is still in progress\"},\n status_code=202,\n )\n except Exception as exc:\n return JSONResponse(content={\"status\": \"error\", \"detail\": str(exc)}, status_code=500)\n return JSONResponse(content={\"status\": \"ok\", \"detail\": detail or f\"{action} action accepted\"}, status_code=200)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_channel.py:HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "class UvicornThreadRunner:\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._host = host\n self._port = port\n self._timeout = timeout\n self._server: Server | None = None\n self._thread: Thread | None = None\n self._error: BaseException | None = None\n\n async def start(self, app: FastAPI) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._error = None\n config = Config(app=app, host=self._host, port=self._port, log_level=\"warning\")\n self._server = Server(config)\n self._thread = Thread(target=self._serve, name=\"plba-http-control\", daemon=True)\n self._thread.start()\n await self._wait_until_started()\n\n async def stop(self) -> None:\n if self._server is None or self._thread is None:\n return\n self._server.should_exit = True\n await asyncio.to_thread(self._thread.join, self._timeout)\n self._server = None\n self._thread = None\n\n @property\n def port(self) -> int:\n if self._server is None or not getattr(self._server, \"servers\", None):\n return self._port\n socket = self._server.servers[0].sockets[0]\n return int(socket.getsockname()[1])\n\n async def _wait_until_started(self) -> None:\n if self._server is None:\n raise RuntimeError(\"Server is not initialized\")\n deadline = asyncio.get_running_loop().time() + max(float(self._timeout), 1.0)\n while not self._server.started:\n if self._error is not None:\n raise RuntimeError(\"HTTP control server failed to start\") from self._error\n if asyncio.get_running_loop().time() >= deadline:\n raise TimeoutError(\"HTTP control server startup timed out\")\n await asyncio.sleep(0.05)\n\n def _serve(self) -> None:\n if self._server is None:\n return\n try:\n asyncio.run(self._server.serve())\n except BaseException as exc: # noqa: BLE001\n self._error = exc", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_runner.py:UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_runner", + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "class HttpControlAppFactory:\n def create(\n self,\n health_provider: Callable[[], Awaitable[HealthPayload]],\n action_provider: Callable[[str, str], Awaitable[JSONResponse]],\n ) -> FastAPI:\n app = FastAPI(title=\"PLBA Control API\")\n\n @app.middleware(\"http\")\n async def log_api_call(request: Request, call_next): # type: ignore[no-untyped-def]\n started = time.monotonic()\n response = await call_next(request)\n response.headers[\"X-Response-Time-Ms\"] = str(int((time.monotonic() - started) * 1000))\n return response\n\n @app.get(\"/health\")\n async def health() -> JSONResponse:\n payload = await health_provider()\n status_code = 200 if payload.get(\"status\") == \"ok\" else 503\n return JSONResponse(content=payload, status_code=status_code)\n\n @app.get(\"/actions/{action}\")\n @app.post(\"/actions/{action}\")\n async def action(action: str, request: Request) -> JSONResponse:\n client_source = self._client_source(request)\n if action in {\"start\", \"stop\"}:\n LOGGER.warning(\"Control action requested: /actions/%s client=%s\", action, client_source)\n return await action_provider(action, client_source)\n\n return app\n\n def _client_source(self, request: Request) -> str:\n explicit_header = request.headers.get(\"X-Client-Source\", \"\").strip()\n if explicit_header:\n return explicit_header\n user_agent = request.headers.get(\"User-Agent\", \"\").strip()\n if user_agent:\n return f\"user-agent:{user_agent}\"\n return \"unknown\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_app.py:HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/health.py", + "content": "class HealthContributor(ABC):\n @abstractmethod\n def health(self) -> WorkerHealth:\n \"\"\"Return contributor health state.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/contracts/health.py:HealthContributor", + "span_start": 7, + "span_end": 10, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.health", + "is_test": false, + "blob_sha": "6bd92611def7131e32d4dd34a8ed85e6cf3c67722ad27797032a632cb30dc097", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlChannel(ABC):\n @abstractmethod\n async def start(self, actions: ControlActionSet) -> None:\n \"\"\"Start the control channel and bind handlers.\"\"\"\n\n @abstractmethod\n async def stop(self) -> None:\n \"\"\"Stop the control channel and release resources.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\"ControlActionSet\", \"ControlChannel\", \"ControlPlaneService\", \"HttpControlChannel\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/__init__.py:1-5", + "span_start": 1, + "span_end": 5, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlActionSet:\n health: HealthHandler\n start: ActionHandler\n stop: ActionHandler\n status: ActionHandler", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "class ControlPlaneService:\n def __init__(self) -> None:\n self._channels: list[ControlChannel] = []\n\n def register_channel(self, channel: ControlChannel) -> None:\n self._channels.append(channel)\n\n def start(self, runtime: RuntimeManager) -> None:\n if not self._channels:\n return\n asyncio.run(self._start_async(runtime))\n\n def stop(self) -> None:\n if not self._channels:\n return\n asyncio.run(self._stop_async())\n\n def snapshot(self, runtime: RuntimeManager) -> dict[str, object]:\n health = runtime.current_health()\n return {\n \"runtime\": {\"state\": runtime._state.value},\n \"modules\": list(runtime.registry.modules),\n \"services\": runtime.services.snapshot(),\n \"workers\": runtime.workers.snapshot(),\n \"health\": runtime.health.snapshot(runtime.workers.healths()) | {\"status\": health[\"status\"]},\n \"config\": runtime.configuration.get(),\n }\n\n async def _start_async(self, runtime: RuntimeManager) -> None:\n actions = ControlActionSet(\n health=runtime.health_status,\n start=runtime.start_runtime,\n stop=runtime.stop_runtime,\n status=runtime.runtime_status,\n )\n for channel in self._channels:\n await channel.start(actions)\n\n async def _stop_async(self) -> None:\n for channel in reversed(self._channels):\n await channel.stop()", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/service.py:ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/health/registry.py", + "content": "HealthRegistry\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (2)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HealthRegistry", + "span_start": 8, + "span_end": 56, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 29, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "fd3390eb0ba29c9979466b9c2117238e0da3bb829eeb4d505cb34c9c3df7a8e8", + "symbol_name": "HealthRegistry", + "qname": "HealthRegistry", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 2, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "26e6a24daa43407ba5340b74497c20153020e79f8d7828ae502aaec378dfcf75", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/types.py", + "content": "HealthPayload\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "HealthPayload", + "span_start": 7, + "span_end": 11, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "392235d63ddf752d6e419cb8528c93fe070d1bc02d3c87ba6a897baac810cf5d", + "symbol_name": "HealthPayload", + "qname": "HealthPayload", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "448a02e4a432b5ab65b246b2bd24a32a6f127b9d2091ea73b53ee3c0a2f53bb3", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/health.py", + "content": "HealthContributor\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "HealthContributor", + "span_start": 7, + "span_end": 10, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "db91ae387b89a2e9d83829754f27fa18a4055b3e72d7f31789a0b8e0bf5bba0b", + "symbol_name": "HealthContributor", + "qname": "HealthContributor", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "6bd92611def7131e32d4dd34a8ed85e6cf3c67722ad27797032a632cb30dc097", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/health/registry.py", + "content": "HealthRegistry.__init__\n -> HealthRegistry._contributors\n -> HealthRegistry.register", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HealthRegistry.__init__:dataflow_slice", + "span_start": 10, + "span_end": 13, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "2381dfb339d541367c3251d2a610cac9d8b3f6bd6a352e119d00a93c5ccc2b7d", + "edge_type": "dataflow_slice", + "src_symbol_id": "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "src_qname": "HealthRegistry.__init__", + "dst_symbol_id": "a9e1f290c346c8bb1d67af0cafeebb5bcaf29c3ed7027e33c794532743df38f2", + "dst_ref": "HealthRegistry.register", + "resolution": "resolved", + "slice_id": "2381dfb339d541367c3251d2a610cac9d8b3f6bd6a352e119d00a93c5ccc2b7d", + "root_symbol_id": "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "path_symbols": [ + "HealthRegistry.__init__", + "HealthRegistry._contributors", + "HealthRegistry.register" + ], + "path_symbol_ids": [ + "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "a9e1f290c346c8bb1d67af0cafeebb5bcaf29c3ed7027e33c794532743df38f2" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "26e6a24daa43407ba5340b74497c20153020e79f8d7828ae502aaec378dfcf75", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/health/registry.py", + "content": "HealthRegistry.__init__\n -> HealthRegistry._contributors\n -> HealthRegistry.contributor_healths", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HealthRegistry.__init__:dataflow_slice", + "span_start": 10, + "span_end": 16, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "d3a88a7abf16359e903e809ffc24473658fdd8198f60641fe1584fc4ac663c31", + "edge_type": "dataflow_slice", + "src_symbol_id": "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "src_qname": "HealthRegistry.__init__", + "dst_symbol_id": "fa7bbd8f4b64a55a5088640c30f52e84075d65f531bd7e1f6c1d7bb8d24fcbf2", + "dst_ref": "HealthRegistry.contributor_healths", + "resolution": "resolved", + "slice_id": "d3a88a7abf16359e903e809ffc24473658fdd8198f60641fe1584fc4ac663c31", + "root_symbol_id": "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "path_symbols": [ + "HealthRegistry.__init__", + "HealthRegistry._contributors", + "HealthRegistry.contributor_healths" + ], + "path_symbol_ids": [ + "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "fa7bbd8f4b64a55a5088640c30f52e84075d65f531bd7e1f6c1d7bb8d24fcbf2" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "26e6a24daa43407ba5340b74497c20153020e79f8d7828ae502aaec378dfcf75", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory.create calls time.monotonic", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlAppFactory.create:calls", + "span_start": 25, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "3fdd0a88d10225ee74f3b84ab57e13f09f5ccc72f00e31af9ae4655411c289c0", + "edge_type": "calls", + "src_symbol_id": "4af42c2a9275d652e710a98ec48b8247236b4453a093629f8958704ff6d3cb58", + "src_qname": "HttpControlAppFactory.create", + "dst_symbol_id": null, + "dst_ref": "time.monotonic", + "resolution": "partial", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory.create calls app.post", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlAppFactory.create:calls", + "span_start": 37, + "span_end": 37, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "0e545d4b5187db7bec5ceac03071d2ad68177550c42af748fee364639e533c90", + "edge_type": "calls", + "src_symbol_id": "4af42c2a9275d652e710a98ec48b8247236b4453a093629f8958704ff6d3cb58", + "src_qname": "HttpControlAppFactory.create", + "dst_symbol_id": null, + "dst_ref": "app.post", + "resolution": "partial", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory.create calls str", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlAppFactory.create:calls", + "span_start": 27, + "span_end": 27, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "2a87c51461e31cd556508cc37fdff37b4d24c26f7f1604db30af5e8f1bda96cb", + "edge_type": "calls", + "src_symbol_id": "4af42c2a9275d652e710a98ec48b8247236b4453a093629f8958704ff6d3cb58", + "src_qname": "HttpControlAppFactory.create", + "dst_symbol_id": null, + "dst_ref": "str", + "resolution": "partial", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": null, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": null, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": null, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "retrieval_report": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "vector", + "C0_SOURCE_CHUNKS": "vector", + "C4_SEMANTIC_ROLES": "vector", + "C2_DEPENDENCY_GRAPH": "vector", + "C3_ENTRYPOINTS": "vector" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 10, + "C3_ENTRYPOINTS": 10 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [] + } + }, + "fallback": { + "used": false, + "reason": null + }, + "retrieval_by_layer_ms": { + "C1_SYMBOL_CATALOG": 29, + "C0_SOURCE_CHUNKS": 16, + "C4_SEMANTIC_ROLES": 14, + "C2_DEPENDENCY_GRAPH": 53, + "C3_ENTRYPOINTS": 11 + } + } + }, + "diagnostics": { + "intent_correct": null, + "target_found": true, + "layers_used": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_sufficient": true, + "answer_mode": "normal", + "router_result": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "TRACE_FLOW", + "path_scope": [], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_resolution_status": "pending" + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Покажи как проходит запрос /health в HttpControlAppFactory", + "sub_intent": "TRACE_FLOW", + "path_scope": [], + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C4_SEMANTIC_ROLES", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 10, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C3_ENTRYPOINTS", + "hit_count": 3, + "empty": false, + "fallback_used": false + } + ], + "empty_layers": [], + "evidence_gate_decision": { + "sufficient": true, + "failure_reasons": [], + "evidence_count": 37 + }, + "failure_reasons": [], + "timings_ms": {} + }, + "rag_rows": [ + { + "path": "src/app_runtime/control/http_app.py", + "content": "class HttpControlAppFactory\nHttpControlAppFactory", + "layer": "C1_SYMBOL_CATALOG", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "qname": "HttpControlAppFactory", + "kind": "class", + "signature": "HttpControlAppFactory", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "const HttpControlAppFactory\nHttpControlAppFactory = app_runtime.control.http_app.HttpControlAppFactory", + "layer": "C1_SYMBOL_CATALOG", + "title": "HttpControlAppFactory", + "span_start": 8, + "span_end": 8, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "9ee00379ee797cd2386e88a6e37dc69e3e31de9144fc4b95f0206cd1430e8983", + "qname": "HttpControlAppFactory", + "kind": "const", + "signature": "HttpControlAppFactory = app_runtime.control.http_app.HttpControlAppFactory", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlActionSet\nControlActionSet", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "qname": "ControlActionSet", + "kind": "class", + "signature": "ControlActionSet", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "const ControlPlaneService\nControlPlaneService = app_runtime.control.service.ControlPlaneService", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlPlaneService", + "span_start": 3, + "span_end": 3, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "217e8f044d1c01644bf7b81e5046af9e84469210c692a2fb0c476a19bb069ae1", + "qname": "ControlPlaneService", + "kind": "const", + "signature": "ControlPlaneService = app_runtime.control.service.ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/health.py", + "content": "method HealthContributor.health\nhealth(self)\nReturn contributor health state.", + "layer": "C1_SYMBOL_CATALOG", + "title": "HealthContributor.health", + "span_start": 9, + "span_end": 10, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "728cff18958d8a25e2661a0f08c83d68c3bbbfa8cef212b85dc0da2b11b3dc90", + "qname": "HealthContributor.health", + "kind": "method", + "signature": "health(self)", + "parent_symbol_id": "HealthContributor", + "package_or_module": "src.app_runtime.contracts.health", + "is_test": false, + "blob_sha": "6bd92611def7131e32d4dd34a8ed85e6cf3c67722ad27797032a632cb30dc097", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/health.py", + "content": "class HealthContributor\nHealthContributor(ABC)", + "layer": "C1_SYMBOL_CATALOG", + "title": "HealthContributor", + "span_start": 7, + "span_end": 10, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "db91ae387b89a2e9d83829754f27fa18a4055b3e72d7f31789a0b8e0bf5bba0b", + "qname": "HealthContributor", + "kind": "class", + "signature": "HealthContributor(ABC)", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.contracts.health", + "is_test": false, + "blob_sha": "6bd92611def7131e32d4dd34a8ed85e6cf3c67722ad27797032a632cb30dc097", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "const ControlActionSet\nControlActionSet = app_runtime.control.base.ControlActionSet", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlActionSet", + "span_start": 1, + "span_end": 1, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "767e4ac0d4224aeccb0783a38359d3c03899a876736eb83d99887c16ea07cc6c", + "qname": "ControlActionSet", + "kind": "const", + "signature": "ControlActionSet = app_runtime.control.base.ControlActionSet", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "const ControlChannel\nControlChannel = app_runtime.control.base.ControlChannel", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlChannel", + "span_start": 1, + "span_end": 1, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "268420f7aa4ed74082b9276cae0cded4f00bac090ffd58fa020a65be0fe19c27", + "qname": "ControlChannel", + "kind": "const", + "signature": "ControlChannel = app_runtime.control.base.ControlChannel", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel(ControlChannel):\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._timeout = timeout\n self._runner = UvicornThreadRunner(host, port, timeout)\n self._factory = HttpControlAppFactory()\n self._actions: ControlActionSet | None = None\n\n async def start(self, actions: ControlActionSet) -> None:\n self._actions = actions\n app = self._factory.create(self._health_response, self._action_response)\n await self._runner.start(app)\n\n async def stop(self) -> None:\n await self._runner.stop()\n\n @property\n def port(self) -> int:\n return self._runner.port\n\n async def _health_response(self) -> dict[str, object]:\n if self._actions is None:\n return {\"status\": \"unhealthy\", \"detail\": \"control actions are not configured\"}\n return await asyncio.wait_for(self._actions.health(), timeout=float(self._timeout))\n\n async def _action_response(self, action: str, _client_source: str = \"unknown\") -> JSONResponse:\n if self._actions is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"{action} handler is not configured\"}, status_code=404)\n callbacks = {\n \"start\": self._actions.start,\n \"stop\": self._actions.stop,\n \"status\": self._actions.status,\n }\n callback = callbacks.get(action)\n if callback is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"unsupported action: {action}\"}, status_code=404)\n action_timeout = max(float(self._timeout), 10.0) if action in {\"start\", \"stop\"} else float(self._timeout)\n try:\n detail = await asyncio.wait_for(callback(), timeout=action_timeout)\n except asyncio.TimeoutError:\n return JSONResponse(\n content={\"status\": \"accepted\", \"detail\": f\"{action} operation is still in progress\"},\n status_code=202,\n )\n except Exception as exc:\n return JSONResponse(content={\"status\": \"error\", \"detail\": str(exc)}, status_code=500)\n return JSONResponse(content={\"status\": \"ok\", \"detail\": detail or f\"{action} action accepted\"}, status_code=200)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_channel.py:HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "class UvicornThreadRunner:\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._host = host\n self._port = port\n self._timeout = timeout\n self._server: Server | None = None\n self._thread: Thread | None = None\n self._error: BaseException | None = None\n\n async def start(self, app: FastAPI) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._error = None\n config = Config(app=app, host=self._host, port=self._port, log_level=\"warning\")\n self._server = Server(config)\n self._thread = Thread(target=self._serve, name=\"plba-http-control\", daemon=True)\n self._thread.start()\n await self._wait_until_started()\n\n async def stop(self) -> None:\n if self._server is None or self._thread is None:\n return\n self._server.should_exit = True\n await asyncio.to_thread(self._thread.join, self._timeout)\n self._server = None\n self._thread = None\n\n @property\n def port(self) -> int:\n if self._server is None or not getattr(self._server, \"servers\", None):\n return self._port\n socket = self._server.servers[0].sockets[0]\n return int(socket.getsockname()[1])\n\n async def _wait_until_started(self) -> None:\n if self._server is None:\n raise RuntimeError(\"Server is not initialized\")\n deadline = asyncio.get_running_loop().time() + max(float(self._timeout), 1.0)\n while not self._server.started:\n if self._error is not None:\n raise RuntimeError(\"HTTP control server failed to start\") from self._error\n if asyncio.get_running_loop().time() >= deadline:\n raise TimeoutError(\"HTTP control server startup timed out\")\n await asyncio.sleep(0.05)\n\n def _serve(self) -> None:\n if self._server is None:\n return\n try:\n asyncio.run(self._server.serve())\n except BaseException as exc: # noqa: BLE001\n self._error = exc", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_runner.py:UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_runner", + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "class HttpControlAppFactory:\n def create(\n self,\n health_provider: Callable[[], Awaitable[HealthPayload]],\n action_provider: Callable[[str, str], Awaitable[JSONResponse]],\n ) -> FastAPI:\n app = FastAPI(title=\"PLBA Control API\")\n\n @app.middleware(\"http\")\n async def log_api_call(request: Request, call_next): # type: ignore[no-untyped-def]\n started = time.monotonic()\n response = await call_next(request)\n response.headers[\"X-Response-Time-Ms\"] = str(int((time.monotonic() - started) * 1000))\n return response\n\n @app.get(\"/health\")\n async def health() -> JSONResponse:\n payload = await health_provider()\n status_code = 200 if payload.get(\"status\") == \"ok\" else 503\n return JSONResponse(content=payload, status_code=status_code)\n\n @app.get(\"/actions/{action}\")\n @app.post(\"/actions/{action}\")\n async def action(action: str, request: Request) -> JSONResponse:\n client_source = self._client_source(request)\n if action in {\"start\", \"stop\"}:\n LOGGER.warning(\"Control action requested: /actions/%s client=%s\", action, client_source)\n return await action_provider(action, client_source)\n\n return app\n\n def _client_source(self, request: Request) -> str:\n explicit_header = request.headers.get(\"X-Client-Source\", \"\").strip()\n if explicit_header:\n return explicit_header\n user_agent = request.headers.get(\"User-Agent\", \"\").strip()\n if user_agent:\n return f\"user-agent:{user_agent}\"\n return \"unknown\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_app.py:HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/health.py", + "content": "class HealthContributor(ABC):\n @abstractmethod\n def health(self) -> WorkerHealth:\n \"\"\"Return contributor health state.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/contracts/health.py:HealthContributor", + "span_start": 7, + "span_end": 10, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.health", + "is_test": false, + "blob_sha": "6bd92611def7131e32d4dd34a8ed85e6cf3c67722ad27797032a632cb30dc097", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlChannel(ABC):\n @abstractmethod\n async def start(self, actions: ControlActionSet) -> None:\n \"\"\"Start the control channel and bind handlers.\"\"\"\n\n @abstractmethod\n async def stop(self) -> None:\n \"\"\"Stop the control channel and release resources.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\"ControlActionSet\", \"ControlChannel\", \"ControlPlaneService\", \"HttpControlChannel\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/__init__.py:1-5", + "span_start": 1, + "span_end": 5, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlActionSet:\n health: HealthHandler\n start: ActionHandler\n stop: ActionHandler\n status: ActionHandler", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "class ControlPlaneService:\n def __init__(self) -> None:\n self._channels: list[ControlChannel] = []\n\n def register_channel(self, channel: ControlChannel) -> None:\n self._channels.append(channel)\n\n def start(self, runtime: RuntimeManager) -> None:\n if not self._channels:\n return\n asyncio.run(self._start_async(runtime))\n\n def stop(self) -> None:\n if not self._channels:\n return\n asyncio.run(self._stop_async())\n\n def snapshot(self, runtime: RuntimeManager) -> dict[str, object]:\n health = runtime.current_health()\n return {\n \"runtime\": {\"state\": runtime._state.value},\n \"modules\": list(runtime.registry.modules),\n \"services\": runtime.services.snapshot(),\n \"workers\": runtime.workers.snapshot(),\n \"health\": runtime.health.snapshot(runtime.workers.healths()) | {\"status\": health[\"status\"]},\n \"config\": runtime.configuration.get(),\n }\n\n async def _start_async(self, runtime: RuntimeManager) -> None:\n actions = ControlActionSet(\n health=runtime.health_status,\n start=runtime.start_runtime,\n stop=runtime.stop_runtime,\n status=runtime.runtime_status,\n )\n for channel in self._channels:\n await channel.start(actions)\n\n async def _stop_async(self) -> None:\n for channel in reversed(self._channels):\n await channel.stop()", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/service.py:ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/health/registry.py", + "content": "HealthRegistry\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (2)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HealthRegistry", + "span_start": 8, + "span_end": 56, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 29, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd3390eb0ba29c9979466b9c2117238e0da3bb829eeb4d505cb34c9c3df7a8e8", + "symbol_name": "HealthRegistry", + "qname": "HealthRegistry", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 2, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "26e6a24daa43407ba5340b74497c20153020e79f8d7828ae502aaec378dfcf75", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/types.py", + "content": "HealthPayload\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "HealthPayload", + "span_start": 7, + "span_end": 11, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "392235d63ddf752d6e419cb8528c93fe070d1bc02d3c87ba6a897baac810cf5d", + "symbol_name": "HealthPayload", + "qname": "HealthPayload", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "448a02e4a432b5ab65b246b2bd24a32a6f127b9d2091ea73b53ee3c0a2f53bb3", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/health.py", + "content": "HealthContributor\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "HealthContributor", + "span_start": 7, + "span_end": 10, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "db91ae387b89a2e9d83829754f27fa18a4055b3e72d7f31789a0b8e0bf5bba0b", + "symbol_name": "HealthContributor", + "qname": "HealthContributor", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "6bd92611def7131e32d4dd34a8ed85e6cf3c67722ad27797032a632cb30dc097", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/health/registry.py", + "content": "HealthRegistry.__init__\n -> HealthRegistry._contributors\n -> HealthRegistry.register", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HealthRegistry.__init__:dataflow_slice", + "span_start": 10, + "span_end": 13, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "2381dfb339d541367c3251d2a610cac9d8b3f6bd6a352e119d00a93c5ccc2b7d", + "edge_type": "dataflow_slice", + "src_symbol_id": "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "src_qname": "HealthRegistry.__init__", + "dst_symbol_id": "a9e1f290c346c8bb1d67af0cafeebb5bcaf29c3ed7027e33c794532743df38f2", + "dst_ref": "HealthRegistry.register", + "resolution": "resolved", + "slice_id": "2381dfb339d541367c3251d2a610cac9d8b3f6bd6a352e119d00a93c5ccc2b7d", + "root_symbol_id": "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "path_symbols": [ + "HealthRegistry.__init__", + "HealthRegistry._contributors", + "HealthRegistry.register" + ], + "path_symbol_ids": [ + "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "a9e1f290c346c8bb1d67af0cafeebb5bcaf29c3ed7027e33c794532743df38f2" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "26e6a24daa43407ba5340b74497c20153020e79f8d7828ae502aaec378dfcf75", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/health/registry.py", + "content": "HealthRegistry.__init__\n -> HealthRegistry._contributors\n -> HealthRegistry.contributor_healths", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HealthRegistry.__init__:dataflow_slice", + "span_start": 10, + "span_end": 16, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d3a88a7abf16359e903e809ffc24473658fdd8198f60641fe1584fc4ac663c31", + "edge_type": "dataflow_slice", + "src_symbol_id": "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "src_qname": "HealthRegistry.__init__", + "dst_symbol_id": "fa7bbd8f4b64a55a5088640c30f52e84075d65f531bd7e1f6c1d7bb8d24fcbf2", + "dst_ref": "HealthRegistry.contributor_healths", + "resolution": "resolved", + "slice_id": "d3a88a7abf16359e903e809ffc24473658fdd8198f60641fe1584fc4ac663c31", + "root_symbol_id": "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "path_symbols": [ + "HealthRegistry.__init__", + "HealthRegistry._contributors", + "HealthRegistry.contributor_healths" + ], + "path_symbol_ids": [ + "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "fa7bbd8f4b64a55a5088640c30f52e84075d65f531bd7e1f6c1d7bb8d24fcbf2" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "26e6a24daa43407ba5340b74497c20153020e79f8d7828ae502aaec378dfcf75", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory.create calls time.monotonic", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlAppFactory.create:calls", + "span_start": 25, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3fdd0a88d10225ee74f3b84ab57e13f09f5ccc72f00e31af9ae4655411c289c0", + "edge_type": "calls", + "src_symbol_id": "4af42c2a9275d652e710a98ec48b8247236b4453a093629f8958704ff6d3cb58", + "src_qname": "HttpControlAppFactory.create", + "dst_symbol_id": null, + "dst_ref": "time.monotonic", + "resolution": "partial", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory.create calls app.post", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlAppFactory.create:calls", + "span_start": 37, + "span_end": 37, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "0e545d4b5187db7bec5ceac03071d2ad68177550c42af748fee364639e533c90", + "edge_type": "calls", + "src_symbol_id": "4af42c2a9275d652e710a98ec48b8247236b4453a093629f8958704ff6d3cb58", + "src_qname": "HttpControlAppFactory.create", + "dst_symbol_id": null, + "dst_ref": "app.post", + "resolution": "partial", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory.create calls str", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlAppFactory.create:calls", + "span_start": 27, + "span_end": 27, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "2a87c51461e31cd556508cc37fdff37b4d24c26f7f1604db30af5e8f1bda96cb", + "edge_type": "calls", + "src_symbol_id": "4af42c2a9275d652e710a98ec48b8247236b4453a093629f8958704ff6d3cb58", + "src_qname": "HttpControlAppFactory.create", + "dst_symbol_id": null, + "dst_ref": "str", + "resolution": "partial", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "validation": { + "passed": true, + "action": "return", + "reasons": [] + } + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-health-endpoint.md b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-health-endpoint.md new file mode 100644 index 0000000..bfb4301 --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-health-endpoint.md @@ -0,0 +1,35 @@ +# plba-v2-trace-flow-health-endpoint + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: agent_runtime +- mode: full_chain +- passed: True + +## Query +Покажи как проходит запрос /health в HttpControlAppFactory + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "TRACE_FLOW", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 37, + "llm_answer": "1. HttpControlAppFactory.create(health_provider, action_provider)\n - Создает экземпляр FastAPI приложения.\n - Добавляет middleware для логирования времени ответа.\n - Определяет маршрут `/health`.\n \n2. HttpControlAppFactory.create().get(\"/health\")\n - Вызывает health_provider, чтобы получить состояние здоровья.\n - Устанавливает статус-код ответа:\n - 200, если состояние \"ok\".\n - 503, если состояние отличное от \"ok\".\n - Возвращает JSON с состоянием здоровья.\n\nЦепочка неполная, так как отсутствует детальная информация о вызове health_provider и его реализации.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "health", + "HttpControlAppFactory" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-runtime-start.json b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-runtime-start.json new file mode 100644 index 0000000..46b4f8b --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-runtime-start.json @@ -0,0 +1,4868 @@ +{ + "case_id": "plba-v2-trace-flow-runtime-start", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "agent_runtime", + "mode": "full_chain", + "query": "Покажи поток выполнения при запуске RuntimeManager", + "actual": { + "intent": "CODE_QA", + "sub_intent": "TRACE_FLOW", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 37, + "llm_answer": "1. Запускается `RuntimeManager` через инициализацию переменной `RuntimeManager`.\n2. Инициализация `RuntimeManager` вызывает метод `RuntimeManager.__init__`.\n3. В методе `RuntimeManager.__init__` происходит регистрация основных сервисов с помощью метода `_register_core_services`.\n4. Метод `_register_core_services` вызывает регистрацию базовых сервисов, таких как конфигурация (`configuration`), сервисы (`services`) и другие компоненты системы.\n5. Далее выполняется метод `start`, который инициирует запуск различных каналов управления и контрольных служб.\n6. Вызывается метод `ControlPlaneService.start`, передавая экземпляр `RuntimeManager`.\n7. Внутри `ControlPlaneService.start` регистрируется канал управления и запускается асинхронный процесс старта с использованием `asyncio.run`.\n8. Контрольный канал (`ControlChannel`) начинает свою работу путем вызова метода `start` и регистрации действий (`ControlActionSet`).\n9. Затем управление передается в HTTP-контроллер, где создается экземпляр `HttpControlChannel`, запускающий веб-сервер с помощью библиотеки Uvicorn.\n10. Веб-сервер принимает запросы на стандартные действия, такие как проверка состояния здоровья (`health`), выполнение стартовых и остановочных операций, получение статусов активности.\n\nЦепочка неполная, так как отсутствует детальная информация о внутренних взаимодействиях между сервисами и модулями после запуска основного канала управления.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "query": "Покажи поток выполнения при запуске RuntimeManager", + "router_result": { + "schema_version": "1.1", + "intent": "CODE_QA", + "retrieval_profile": "code", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query_plan": { + "raw": "Покажи поток выполнения при запуске RuntimeManager", + "normalized": "Покажи поток выполнения при запуске RuntimeManager", + "sub_intent": "TRACE_FLOW", + "negations": [], + "expansions": [ + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "doc_scope_hints": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "symbol_kind_hint": "class", + "anchors": [ + { + "type": "SYMBOL", + "value": "RuntimeManager", + "source": "user_text", + "subtype": null, + "span": { + "start": 36, + "end": 50 + }, + "confidence": 0.88 + } + ] + }, + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "top_k": 8 + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 8 + }, + { + "layer_id": "C4_SEMANTIC_ROLES", + "top_k": 8 + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "top_k": 10 + }, + { + "layer_id": "C3_ENTRYPOINTS", + "top_k": 10 + } + ], + "filters": { + "test_policy": "EXCLUDE", + "path_scope": [], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + }, + "symbol_resolution": { + "status": "pending", + "resolved_symbol": null, + "alternatives": [ + "RuntimeManager" + ], + "confidence": 0.0 + }, + "evidence_policy": { + "require_def": true, + "require_flow": true, + "require_spec": false, + "allow_answer_without_evidence": false + } + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Покажи поток выполнения при запуске RuntimeManager", + "sub_intent": "TRACE_FLOW", + "path_scope": [], + "keyword_hints": [ + "RuntimeManager" + ], + "symbol_candidates": [ + "RuntimeManager" + ], + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "top_k": 8 + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 8 + }, + { + "layer_id": "C4_SEMANTIC_ROLES", + "top_k": 8 + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "top_k": 10 + }, + { + "layer_id": "C3_ENTRYPOINTS", + "top_k": 10 + } + ], + "filters": { + "test_policy": "EXCLUDE", + "path_scope": [], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + }, + "query_plan": { + "raw": "Покажи поток выполнения при запуске RuntimeManager", + "normalized": "Покажи поток выполнения при запуске RuntimeManager", + "sub_intent": "TRACE_FLOW", + "negations": [], + "expansions": [ + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "doc_scope_hints": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "symbol_kind_hint": "class", + "anchors": [ + { + "type": "SYMBOL", + "value": "RuntimeManager", + "source": "user_text", + "subtype": null, + "span": { + "start": 36, + "end": 50 + }, + "confidence": 0.88 + } + ] + } + }, + "retrieval_result": { + "target_symbol_candidates": [ + "RuntimeManager", + "ControlPlaneService", + "ControlChannel.start", + "ControlChannel.stop" + ], + "resolved_symbol": "RuntimeManager", + "symbol_resolution_status": "resolved", + "file_candidates": [ + "src/plba/bootstrap.py", + "src/app_runtime/control/service.py", + "src/app_runtime/core/runtime.py", + "src/plba/__init__.py", + "src/plba/core.py", + "src/app_runtime/control/__init__.py", + "src/app_runtime/control/base.py", + "src/app_runtime/control/http_runner.py", + "src/app_runtime/control/http_app.py", + "src/app_runtime/control/http_channel.py", + "src/plba/control.py", + "src/app_runtime/workflow/persistence/workflow_persistence.py" + ], + "code_chunks": [ + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/plba/bootstrap.py", + "title": "RuntimeManager", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "start_line": 4, + "end_line": 4, + "metadata": { + "symbol_id": "27158ca220022eeb5083c6addf8a50775d45f7161284fd60aac48410105f4b98", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/service.py", + "title": "RuntimeManager", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "start_line": 9, + "end_line": 9, + "metadata": { + "symbol_id": "62a9575c77aad894120d18b4f2a08cf2ba42f77e9be4a8a432b767d157701afe", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/core/runtime.py", + "title": "RuntimeManager", + "content": "class RuntimeManager\nRuntimeManager", + "start_line": 18, + "end_line": 179, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "qname": "RuntimeManager", + "kind": "class", + "signature": "RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/plba/__init__.py", + "title": "RuntimeManager", + "content": "const RuntimeManager\nRuntimeManager = plba.core.RuntimeManager", + "start_line": 16, + "end_line": 16, + "metadata": { + "symbol_id": "7eacec84f9b8d6c4201374591faecdac7493091c263681495c338973f2971ad9", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = plba.core.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/plba/core.py", + "title": "RuntimeManager", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "start_line": 2, + "end_line": 2, + "metadata": { + "symbol_id": "e1684562d978b7af7fe9b27dc5869d770348a87b5dc19a50360f58544668578b", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.core", + "is_test": false, + "blob_sha": "c0ae25110d20e665216616e26b68adfe035b624ba45d31d1272fb21f906f9ca8", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/__init__.py", + "title": "ControlPlaneService", + "content": "const ControlPlaneService\nControlPlaneService = app_runtime.control.service.ControlPlaneService", + "start_line": 3, + "end_line": 3, + "metadata": { + "symbol_id": "217e8f044d1c01644bf7b81e5046af9e84469210c692a2fb0c476a19bb069ae1", + "qname": "ControlPlaneService", + "kind": "const", + "signature": "ControlPlaneService = app_runtime.control.service.ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/base.py", + "title": "ControlChannel.start", + "content": "method ControlChannel.start\nstart(self, actions)\nStart the control channel and bind handlers.", + "start_line": 23, + "end_line": 24, + "metadata": { + "symbol_id": "e01e0d50d0f48d0c84c119c989b7a7c57ceea263811ce2605c684ae24d1a03b1", + "qname": "ControlChannel.start", + "kind": "method", + "signature": "start(self, actions)", + "parent_symbol_id": "ControlChannel", + "package_or_module": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/base.py", + "title": "ControlChannel.stop", + "content": "method ControlChannel.stop\nstop(self)\nStop the control channel and release resources.", + "start_line": 27, + "end_line": 28, + "metadata": { + "symbol_id": "54b5adf9866c526836221dc721b474ba23fbec83e1b1d3b8bc4da67ae3c1541d", + "qname": "ControlChannel.stop", + "kind": "method", + "signature": "stop(self)", + "parent_symbol_id": "ControlChannel", + "package_or_module": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/service.py", + "title": "src/app_runtime/control/service.py:ControlPlaneService", + "content": "class ControlPlaneService:\n def __init__(self) -> None:\n self._channels: list[ControlChannel] = []\n\n def register_channel(self, channel: ControlChannel) -> None:\n self._channels.append(channel)\n\n def start(self, runtime: RuntimeManager) -> None:\n if not self._channels:\n return\n asyncio.run(self._start_async(runtime))\n\n def stop(self) -> None:\n if not self._channels:\n return\n asyncio.run(self._stop_async())\n\n def snapshot(self, runtime: RuntimeManager) -> dict[str, object]:\n health = runtime.current_health()\n return {\n \"runtime\": {\"state\": runtime._state.value},\n \"modules\": list(runtime.registry.modules),\n \"services\": runtime.services.snapshot(),\n \"workers\": runtime.workers.snapshot(),\n \"health\": runtime.health.snapshot(runtime.workers.healths()) | {\"status\": health[\"status\"]},\n \"config\": runtime.configuration.get(),\n }\n\n async def _start_async(self, runtime: RuntimeManager) -> None:\n actions = ControlActionSet(\n health=runtime.health_status,\n start=runtime.start_runtime,\n stop=runtime.stop_runtime,\n status=runtime.runtime_status,\n )\n for channel in self._channels:\n await channel.start(actions)\n\n async def _stop_async(self) -> None:\n for channel in reversed(self._channels):\n await channel.stop()", + "start_line": 12, + "end_line": 52, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/http_runner.py", + "title": "src/app_runtime/control/http_runner.py:UvicornThreadRunner", + "content": "class UvicornThreadRunner:\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._host = host\n self._port = port\n self._timeout = timeout\n self._server: Server | None = None\n self._thread: Thread | None = None\n self._error: BaseException | None = None\n\n async def start(self, app: FastAPI) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._error = None\n config = Config(app=app, host=self._host, port=self._port, log_level=\"warning\")\n self._server = Server(config)\n self._thread = Thread(target=self._serve, name=\"plba-http-control\", daemon=True)\n self._thread.start()\n await self._wait_until_started()\n\n async def stop(self) -> None:\n if self._server is None or self._thread is None:\n return\n self._server.should_exit = True\n await asyncio.to_thread(self._thread.join, self._timeout)\n self._server = None\n self._thread = None\n\n @property\n def port(self) -> int:\n if self._server is None or not getattr(self._server, \"servers\", None):\n return self._port\n socket = self._server.servers[0].sockets[0]\n return int(socket.getsockname()[1])\n\n async def _wait_until_started(self) -> None:\n if self._server is None:\n raise RuntimeError(\"Server is not initialized\")\n deadline = asyncio.get_running_loop().time() + max(float(self._timeout), 1.0)\n while not self._server.started:\n if self._error is not None:\n raise RuntimeError(\"HTTP control server failed to start\") from self._error\n if asyncio.get_running_loop().time() >= deadline:\n raise TimeoutError(\"HTTP control server startup timed out\")\n await asyncio.sleep(0.05)\n\n def _serve(self) -> None:\n if self._server is None:\n return\n try:\n asyncio.run(self._server.serve())\n except BaseException as exc: # noqa: BLE001\n self._error = exc", + "start_line": 10, + "end_line": 61, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_runner", + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/base.py", + "title": "src/app_runtime/control/base.py:ControlChannel", + "content": "class ControlChannel(ABC):\n @abstractmethod\n async def start(self, actions: ControlActionSet) -> None:\n \"\"\"Start the control channel and bind handlers.\"\"\"\n\n @abstractmethod\n async def stop(self) -> None:\n \"\"\"Stop the control channel and release resources.\"\"\"", + "start_line": 21, + "end_line": 28, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/__init__.py", + "title": "src/app_runtime/control/__init__.py:1-5", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\"ControlActionSet\", \"ControlChannel\", \"ControlPlaneService\", \"HttpControlChannel\"]", + "start_line": 1, + "end_line": 5, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/http_app.py", + "title": "src/app_runtime/control/http_app.py:HttpControlAppFactory", + "content": "class HttpControlAppFactory:\n def create(\n self,\n health_provider: Callable[[], Awaitable[HealthPayload]],\n action_provider: Callable[[str, str], Awaitable[JSONResponse]],\n ) -> FastAPI:\n app = FastAPI(title=\"PLBA Control API\")\n\n @app.middleware(\"http\")\n async def log_api_call(request: Request, call_next): # type: ignore[no-untyped-def]\n started = time.monotonic()\n response = await call_next(request)\n response.headers[\"X-Response-Time-Ms\"] = str(int((time.monotonic() - started) * 1000))\n return response\n\n @app.get(\"/health\")\n async def health() -> JSONResponse:\n payload = await health_provider()\n status_code = 200 if payload.get(\"status\") == \"ok\" else 503\n return JSONResponse(content=payload, status_code=status_code)\n\n @app.get(\"/actions/{action}\")\n @app.post(\"/actions/{action}\")\n async def action(action: str, request: Request) -> JSONResponse:\n client_source = self._client_source(request)\n if action in {\"start\", \"stop\"}:\n LOGGER.warning(\"Control action requested: /actions/%s client=%s\", action, client_source)\n return await action_provider(action, client_source)\n\n return app\n\n def _client_source(self, request: Request) -> str:\n explicit_header = request.headers.get(\"X-Client-Source\", \"\").strip()\n if explicit_header:\n return explicit_header\n user_agent = request.headers.get(\"User-Agent\", \"\").strip()\n if user_agent:\n return f\"user-agent:{user_agent}\"\n return \"unknown\"", + "start_line": 15, + "end_line": 53, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/http_channel.py", + "title": "src/app_runtime/control/http_channel.py:HttpControlChannel", + "content": "class HttpControlChannel(ControlChannel):\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._timeout = timeout\n self._runner = UvicornThreadRunner(host, port, timeout)\n self._factory = HttpControlAppFactory()\n self._actions: ControlActionSet | None = None\n\n async def start(self, actions: ControlActionSet) -> None:\n self._actions = actions\n app = self._factory.create(self._health_response, self._action_response)\n await self._runner.start(app)\n\n async def stop(self) -> None:\n await self._runner.stop()\n\n @property\n def port(self) -> int:\n return self._runner.port\n\n async def _health_response(self) -> dict[str, object]:\n if self._actions is None:\n return {\"status\": \"unhealthy\", \"detail\": \"control actions are not configured\"}\n return await asyncio.wait_for(self._actions.health(), timeout=float(self._timeout))\n\n async def _action_response(self, action: str, _client_source: str = \"unknown\") -> JSONResponse:\n if self._actions is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"{action} handler is not configured\"}, status_code=404)\n callbacks = {\n \"start\": self._actions.start,\n \"stop\": self._actions.stop,\n \"status\": self._actions.status,\n }\n callback = callbacks.get(action)\n if callback is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"unsupported action: {action}\"}, status_code=404)\n action_timeout = max(float(self._timeout), 10.0) if action in {\"start\", \"stop\"} else float(self._timeout)\n try:\n detail = await asyncio.wait_for(callback(), timeout=action_timeout)\n except asyncio.TimeoutError:\n return JSONResponse(\n content={\"status\": \"accepted\", \"detail\": f\"{action} operation is still in progress\"},\n status_code=202,\n )\n except Exception as exc:\n return JSONResponse(content={\"status\": \"error\", \"detail\": str(exc)}, status_code=500)\n return JSONResponse(content={\"status\": \"ok\", \"detail\": detail or f\"{action} action accepted\"}, status_code=200)", + "start_line": 12, + "end_line": 57, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/base.py", + "title": "src/app_runtime/control/base.py:ControlActionSet", + "content": "class ControlActionSet:\n health: HealthHandler\n start: ActionHandler\n stop: ActionHandler\n status: ActionHandler", + "start_line": 14, + "end_line": 18, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/plba/control.py", + "title": "src/plba/control.py:1-10", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\n \"ControlActionSet\",\n \"ControlChannel\",\n \"ControlPlaneService\",\n \"HttpControlChannel\",\n]", + "start_line": 1, + "end_line": 10, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.control", + "is_test": false, + "blob_sha": "31bd5c4481bfa7fbca8fae56d4860a67e3953ca74474ac8439e1f39b685d7bc8", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/core/runtime.py", + "title": "RuntimeManager", + "content": "RuntimeManager\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests manager\n- orchestrates role-like calls (4)\n- reads and writes state attributes\n- participates in dataflow slices (50)", + "start_line": 18, + "end_line": 179, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "symbol_name": "RuntimeManager", + "qname": "RuntimeManager", + "role": "pipeline_stage", + "confidence": 0.67, + "dataflow_participation": 50, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/base.py", + "title": "ControlChannel", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "start_line": 21, + "end_line": 28, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/base.py", + "title": "ControlActionSet", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "start_line": 14, + "end_line": 18, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "start_line": 12, + "end_line": 52, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/http_runner.py", + "title": "UvicornThreadRunner", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "start_line": 10, + "end_line": 61, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/http_channel.py", + "title": "HttpControlChannel", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "start_line": 12, + "end_line": 57, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/http_app.py", + "title": "HttpControlAppFactory", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "start_line": 15, + "end_line": 53, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "title": "WorkflowPersistence", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "start_line": 8, + "end_line": 54, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/core/runtime.py", + "title": "RuntimeManager.__init__:dataflow_slice", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file", + "start_line": 32, + "end_line": 52, + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/core/runtime.py", + "title": "RuntimeManager.__init__:dataflow_slice", + "content": "RuntimeManager.__init__\n -> RuntimeManager.services\n -> RuntimeManager.__init__", + "start_line": 33, + "end_line": 39, + "metadata": { + "edge_id": "d43af85989222ee6d788ce418cdcb217c7ff044cfb915e3bdbd184417dc7bd61", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "dst_ref": "RuntimeManager.__init__", + "resolution": "resolved", + "slice_id": "d43af85989222ee6d788ce418cdcb217c7ff044cfb915e3bdbd184417dc7bd61", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.services", + "RuntimeManager.__init__" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "start_line": 14, + "end_line": 25, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "start_line": 14, + "end_line": 51, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/core/runtime.py", + "title": "RuntimeManager.__init__:dataflow_slice", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.start", + "start_line": 32, + "end_line": 59, + "metadata": { + "edge_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1", + "dst_ref": "RuntimeManager.start", + "resolution": "resolved", + "slice_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.start" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/core/runtime.py", + "title": "RuntimeManager.__init__:dataflow_slice", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager._register_core_services", + "start_line": 32, + "end_line": 127, + "metadata": { + "edge_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6", + "dst_ref": "RuntimeManager._register_core_services", + "resolution": "resolved", + "slice_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager._register_core_services" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "start_line": 14, + "end_line": 17, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "start_line": 14, + "end_line": 20, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "start_line": 14, + "end_line": 47, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/core/runtime.py", + "title": "RuntimeManager.__init__:dataflow_slice", + "content": "RuntimeManager.__init__\n -> RuntimeManager.services\n -> RuntimeManager._register_core_services", + "start_line": 33, + "end_line": 127, + "metadata": { + "edge_id": "aac6f9dda73963b977083a892bee39a48eca4fbd7404787e022ecf4ebedec65d", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6", + "dst_ref": "RuntimeManager._register_core_services", + "resolution": "resolved", + "slice_id": "aac6f9dda73963b977083a892bee39a48eca4fbd7404787e022ecf4ebedec65d", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.services", + "RuntimeManager._register_core_services" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C3_ENTRYPOINTS", + "path": "src/app_runtime/control/http_app.py", + "title": "app.post", + "content": "fastapi http app.post", + "start_line": 38, + "end_line": 42, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C3_ENTRYPOINTS", + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "content": "fastapi http app.get", + "start_line": 31, + "end_line": 34, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C3_ENTRYPOINTS", + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "content": "fastapi http app.get", + "start_line": 38, + "end_line": 42, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "relations": [ + { + "path": "src/app_runtime/core/runtime.py", + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file" + }, + { + "path": "src/app_runtime/core/runtime.py", + "metadata": { + "edge_id": "d43af85989222ee6d788ce418cdcb217c7ff044cfb915e3bdbd184417dc7bd61", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "dst_ref": "RuntimeManager.__init__", + "resolution": "resolved", + "slice_id": "d43af85989222ee6d788ce418cdcb217c7ff044cfb915e3bdbd184417dc7bd61", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.services", + "RuntimeManager.__init__" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "RuntimeManager.__init__\n -> RuntimeManager.services\n -> RuntimeManager.__init__" + }, + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop" + }, + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async" + }, + { + "path": "src/app_runtime/core/runtime.py", + "metadata": { + "edge_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1", + "dst_ref": "RuntimeManager.start", + "resolution": "resolved", + "slice_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.start" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.start" + }, + { + "path": "src/app_runtime/core/runtime.py", + "metadata": { + "edge_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6", + "dst_ref": "RuntimeManager._register_core_services", + "resolution": "resolved", + "slice_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager._register_core_services" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager._register_core_services" + }, + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel" + }, + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start" + }, + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async" + }, + { + "path": "src/app_runtime/core/runtime.py", + "metadata": { + "edge_id": "aac6f9dda73963b977083a892bee39a48eca4fbd7404787e022ecf4ebedec65d", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6", + "dst_ref": "RuntimeManager._register_core_services", + "resolution": "resolved", + "slice_id": "aac6f9dda73963b977083a892bee39a48eca4fbd7404787e022ecf4ebedec65d", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.services", + "RuntimeManager._register_core_services" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "RuntimeManager.__init__\n -> RuntimeManager.services\n -> RuntimeManager._register_core_services" + } + ], + "entrypoints": [ + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.post", + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "test_candidates": [], + "layer_outcomes": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C4_SEMANTIC_ROLES", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 10, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C3_ENTRYPOINTS", + "hit_count": 3, + "empty": false, + "fallback_used": false + } + ], + "missing_layers": [], + "raw_rows": [ + { + "path": "src/plba/bootstrap.py", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 4, + "span_end": 4, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "27158ca220022eeb5083c6addf8a50775d45f7161284fd60aac48410105f4b98", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 9, + "span_end": 9, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "62a9575c77aad894120d18b4f2a08cf2ba42f77e9be4a8a432b767d157701afe", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager\nRuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "qname": "RuntimeManager", + "kind": "class", + "signature": "RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/__init__.py", + "content": "const RuntimeManager\nRuntimeManager = plba.core.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 16, + "span_end": 16, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "7eacec84f9b8d6c4201374591faecdac7493091c263681495c338973f2971ad9", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = plba.core.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/core.py", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 2, + "span_end": 2, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "e1684562d978b7af7fe9b27dc5869d770348a87b5dc19a50360f58544668578b", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.core", + "is_test": false, + "blob_sha": "c0ae25110d20e665216616e26b68adfe035b624ba45d31d1272fb21f906f9ca8", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "const ControlPlaneService\nControlPlaneService = app_runtime.control.service.ControlPlaneService", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlPlaneService", + "span_start": 3, + "span_end": 3, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "217e8f044d1c01644bf7b81e5046af9e84469210c692a2fb0c476a19bb069ae1", + "qname": "ControlPlaneService", + "kind": "const", + "signature": "ControlPlaneService = app_runtime.control.service.ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "method ControlChannel.start\nstart(self, actions)\nStart the control channel and bind handlers.", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlChannel.start", + "span_start": 23, + "span_end": 24, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "e01e0d50d0f48d0c84c119c989b7a7c57ceea263811ce2605c684ae24d1a03b1", + "qname": "ControlChannel.start", + "kind": "method", + "signature": "start(self, actions)", + "parent_symbol_id": "ControlChannel", + "package_or_module": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "method ControlChannel.stop\nstop(self)\nStop the control channel and release resources.", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlChannel.stop", + "span_start": 27, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "54b5adf9866c526836221dc721b474ba23fbec83e1b1d3b8bc4da67ae3c1541d", + "qname": "ControlChannel.stop", + "kind": "method", + "signature": "stop(self)", + "parent_symbol_id": "ControlChannel", + "package_or_module": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "class ControlPlaneService:\n def __init__(self) -> None:\n self._channels: list[ControlChannel] = []\n\n def register_channel(self, channel: ControlChannel) -> None:\n self._channels.append(channel)\n\n def start(self, runtime: RuntimeManager) -> None:\n if not self._channels:\n return\n asyncio.run(self._start_async(runtime))\n\n def stop(self) -> None:\n if not self._channels:\n return\n asyncio.run(self._stop_async())\n\n def snapshot(self, runtime: RuntimeManager) -> dict[str, object]:\n health = runtime.current_health()\n return {\n \"runtime\": {\"state\": runtime._state.value},\n \"modules\": list(runtime.registry.modules),\n \"services\": runtime.services.snapshot(),\n \"workers\": runtime.workers.snapshot(),\n \"health\": runtime.health.snapshot(runtime.workers.healths()) | {\"status\": health[\"status\"]},\n \"config\": runtime.configuration.get(),\n }\n\n async def _start_async(self, runtime: RuntimeManager) -> None:\n actions = ControlActionSet(\n health=runtime.health_status,\n start=runtime.start_runtime,\n stop=runtime.stop_runtime,\n status=runtime.runtime_status,\n )\n for channel in self._channels:\n await channel.start(actions)\n\n async def _stop_async(self) -> None:\n for channel in reversed(self._channels):\n await channel.stop()", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/service.py:ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "class UvicornThreadRunner:\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._host = host\n self._port = port\n self._timeout = timeout\n self._server: Server | None = None\n self._thread: Thread | None = None\n self._error: BaseException | None = None\n\n async def start(self, app: FastAPI) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._error = None\n config = Config(app=app, host=self._host, port=self._port, log_level=\"warning\")\n self._server = Server(config)\n self._thread = Thread(target=self._serve, name=\"plba-http-control\", daemon=True)\n self._thread.start()\n await self._wait_until_started()\n\n async def stop(self) -> None:\n if self._server is None or self._thread is None:\n return\n self._server.should_exit = True\n await asyncio.to_thread(self._thread.join, self._timeout)\n self._server = None\n self._thread = None\n\n @property\n def port(self) -> int:\n if self._server is None or not getattr(self._server, \"servers\", None):\n return self._port\n socket = self._server.servers[0].sockets[0]\n return int(socket.getsockname()[1])\n\n async def _wait_until_started(self) -> None:\n if self._server is None:\n raise RuntimeError(\"Server is not initialized\")\n deadline = asyncio.get_running_loop().time() + max(float(self._timeout), 1.0)\n while not self._server.started:\n if self._error is not None:\n raise RuntimeError(\"HTTP control server failed to start\") from self._error\n if asyncio.get_running_loop().time() >= deadline:\n raise TimeoutError(\"HTTP control server startup timed out\")\n await asyncio.sleep(0.05)\n\n def _serve(self) -> None:\n if self._server is None:\n return\n try:\n asyncio.run(self._server.serve())\n except BaseException as exc: # noqa: BLE001\n self._error = exc", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_runner.py:UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_runner", + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlChannel(ABC):\n @abstractmethod\n async def start(self, actions: ControlActionSet) -> None:\n \"\"\"Start the control channel and bind handlers.\"\"\"\n\n @abstractmethod\n async def stop(self) -> None:\n \"\"\"Stop the control channel and release resources.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\"ControlActionSet\", \"ControlChannel\", \"ControlPlaneService\", \"HttpControlChannel\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/__init__.py:1-5", + "span_start": 1, + "span_end": 5, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "class HttpControlAppFactory:\n def create(\n self,\n health_provider: Callable[[], Awaitable[HealthPayload]],\n action_provider: Callable[[str, str], Awaitable[JSONResponse]],\n ) -> FastAPI:\n app = FastAPI(title=\"PLBA Control API\")\n\n @app.middleware(\"http\")\n async def log_api_call(request: Request, call_next): # type: ignore[no-untyped-def]\n started = time.monotonic()\n response = await call_next(request)\n response.headers[\"X-Response-Time-Ms\"] = str(int((time.monotonic() - started) * 1000))\n return response\n\n @app.get(\"/health\")\n async def health() -> JSONResponse:\n payload = await health_provider()\n status_code = 200 if payload.get(\"status\") == \"ok\" else 503\n return JSONResponse(content=payload, status_code=status_code)\n\n @app.get(\"/actions/{action}\")\n @app.post(\"/actions/{action}\")\n async def action(action: str, request: Request) -> JSONResponse:\n client_source = self._client_source(request)\n if action in {\"start\", \"stop\"}:\n LOGGER.warning(\"Control action requested: /actions/%s client=%s\", action, client_source)\n return await action_provider(action, client_source)\n\n return app\n\n def _client_source(self, request: Request) -> str:\n explicit_header = request.headers.get(\"X-Client-Source\", \"\").strip()\n if explicit_header:\n return explicit_header\n user_agent = request.headers.get(\"User-Agent\", \"\").strip()\n if user_agent:\n return f\"user-agent:{user_agent}\"\n return \"unknown\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_app.py:HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel(ControlChannel):\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._timeout = timeout\n self._runner = UvicornThreadRunner(host, port, timeout)\n self._factory = HttpControlAppFactory()\n self._actions: ControlActionSet | None = None\n\n async def start(self, actions: ControlActionSet) -> None:\n self._actions = actions\n app = self._factory.create(self._health_response, self._action_response)\n await self._runner.start(app)\n\n async def stop(self) -> None:\n await self._runner.stop()\n\n @property\n def port(self) -> int:\n return self._runner.port\n\n async def _health_response(self) -> dict[str, object]:\n if self._actions is None:\n return {\"status\": \"unhealthy\", \"detail\": \"control actions are not configured\"}\n return await asyncio.wait_for(self._actions.health(), timeout=float(self._timeout))\n\n async def _action_response(self, action: str, _client_source: str = \"unknown\") -> JSONResponse:\n if self._actions is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"{action} handler is not configured\"}, status_code=404)\n callbacks = {\n \"start\": self._actions.start,\n \"stop\": self._actions.stop,\n \"status\": self._actions.status,\n }\n callback = callbacks.get(action)\n if callback is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"unsupported action: {action}\"}, status_code=404)\n action_timeout = max(float(self._timeout), 10.0) if action in {\"start\", \"stop\"} else float(self._timeout)\n try:\n detail = await asyncio.wait_for(callback(), timeout=action_timeout)\n except asyncio.TimeoutError:\n return JSONResponse(\n content={\"status\": \"accepted\", \"detail\": f\"{action} operation is still in progress\"},\n status_code=202,\n )\n except Exception as exc:\n return JSONResponse(content={\"status\": \"error\", \"detail\": str(exc)}, status_code=500)\n return JSONResponse(content={\"status\": \"ok\", \"detail\": detail or f\"{action} action accepted\"}, status_code=200)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_channel.py:HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlActionSet:\n health: HealthHandler\n start: ActionHandler\n stop: ActionHandler\n status: ActionHandler", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/control.py", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\n \"ControlActionSet\",\n \"ControlChannel\",\n \"ControlPlaneService\",\n \"HttpControlChannel\",\n]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/control.py:1-10", + "span_start": 1, + "span_end": 10, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.control", + "is_test": false, + "blob_sha": "31bd5c4481bfa7fbca8fae56d4860a67e3953ca74474ac8439e1f39b685d7bc8", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests manager\n- orchestrates role-like calls (4)\n- reads and writes state attributes\n- participates in dataflow slices (50)", + "layer": "C4_SEMANTIC_ROLES", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 43, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "symbol_name": "RuntimeManager", + "qname": "RuntimeManager", + "role": "pipeline_stage", + "confidence": 0.67, + "dataflow_participation": 50, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 52, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.services\n -> RuntimeManager.__init__", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 33, + "span_end": 39, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "d43af85989222ee6d788ce418cdcb217c7ff044cfb915e3bdbd184417dc7bd61", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "dst_ref": "RuntimeManager.__init__", + "resolution": "resolved", + "slice_id": "d43af85989222ee6d788ce418cdcb217c7ff044cfb915e3bdbd184417dc7bd61", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.services", + "RuntimeManager.__init__" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 59, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1", + "dst_ref": "RuntimeManager.start", + "resolution": "resolved", + "slice_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.start" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager._register_core_services", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 127, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6", + "dst_ref": "RuntimeManager._register_core_services", + "resolution": "resolved", + "slice_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager._register_core_services" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.services\n -> RuntimeManager._register_core_services", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 33, + "span_end": 127, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "aac6f9dda73963b977083a892bee39a48eca4fbd7404787e022ecf4ebedec65d", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6", + "dst_ref": "RuntimeManager._register_core_services", + "resolution": "resolved", + "slice_id": "aac6f9dda73963b977083a892bee39a48eca4fbd7404787e022ecf4ebedec65d", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.services", + "RuntimeManager._register_core_services" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": null, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": null, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": null, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "retrieval_report": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "vector", + "C0_SOURCE_CHUNKS": "vector", + "C4_SEMANTIC_ROLES": "vector", + "C2_DEPENDENCY_GRAPH": "vector", + "C3_ENTRYPOINTS": "vector" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 10, + "C3_ENTRYPOINTS": 10 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [] + } + }, + "fallback": { + "used": false, + "reason": null + }, + "retrieval_by_layer_ms": { + "C1_SYMBOL_CATALOG": 35, + "C0_SOURCE_CHUNKS": 14, + "C4_SEMANTIC_ROLES": 13, + "C2_DEPENDENCY_GRAPH": 52, + "C3_ENTRYPOINTS": 10 + } + } + }, + "diagnostics": { + "intent_correct": null, + "target_found": true, + "layers_used": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_sufficient": true, + "answer_mode": "normal", + "router_result": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "TRACE_FLOW", + "path_scope": [], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_resolution_status": "pending" + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Покажи поток выполнения при запуске RuntimeManager", + "sub_intent": "TRACE_FLOW", + "path_scope": [], + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C4_SEMANTIC_ROLES", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 10, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C3_ENTRYPOINTS", + "hit_count": 3, + "empty": false, + "fallback_used": false + } + ], + "empty_layers": [], + "evidence_gate_decision": { + "sufficient": true, + "failure_reasons": [], + "evidence_count": 37 + }, + "failure_reasons": [], + "timings_ms": {} + }, + "rag_rows": [ + { + "path": "src/plba/bootstrap.py", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 4, + "span_end": 4, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "27158ca220022eeb5083c6addf8a50775d45f7161284fd60aac48410105f4b98", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 9, + "span_end": 9, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "62a9575c77aad894120d18b4f2a08cf2ba42f77e9be4a8a432b767d157701afe", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager\nRuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "qname": "RuntimeManager", + "kind": "class", + "signature": "RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/__init__.py", + "content": "const RuntimeManager\nRuntimeManager = plba.core.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 16, + "span_end": 16, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "7eacec84f9b8d6c4201374591faecdac7493091c263681495c338973f2971ad9", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = plba.core.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/core.py", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 2, + "span_end": 2, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "e1684562d978b7af7fe9b27dc5869d770348a87b5dc19a50360f58544668578b", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.core", + "is_test": false, + "blob_sha": "c0ae25110d20e665216616e26b68adfe035b624ba45d31d1272fb21f906f9ca8", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "const ControlPlaneService\nControlPlaneService = app_runtime.control.service.ControlPlaneService", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlPlaneService", + "span_start": 3, + "span_end": 3, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "217e8f044d1c01644bf7b81e5046af9e84469210c692a2fb0c476a19bb069ae1", + "qname": "ControlPlaneService", + "kind": "const", + "signature": "ControlPlaneService = app_runtime.control.service.ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "method ControlChannel.start\nstart(self, actions)\nStart the control channel and bind handlers.", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlChannel.start", + "span_start": 23, + "span_end": 24, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "e01e0d50d0f48d0c84c119c989b7a7c57ceea263811ce2605c684ae24d1a03b1", + "qname": "ControlChannel.start", + "kind": "method", + "signature": "start(self, actions)", + "parent_symbol_id": "ControlChannel", + "package_or_module": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "method ControlChannel.stop\nstop(self)\nStop the control channel and release resources.", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlChannel.stop", + "span_start": 27, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "54b5adf9866c526836221dc721b474ba23fbec83e1b1d3b8bc4da67ae3c1541d", + "qname": "ControlChannel.stop", + "kind": "method", + "signature": "stop(self)", + "parent_symbol_id": "ControlChannel", + "package_or_module": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "class ControlPlaneService:\n def __init__(self) -> None:\n self._channels: list[ControlChannel] = []\n\n def register_channel(self, channel: ControlChannel) -> None:\n self._channels.append(channel)\n\n def start(self, runtime: RuntimeManager) -> None:\n if not self._channels:\n return\n asyncio.run(self._start_async(runtime))\n\n def stop(self) -> None:\n if not self._channels:\n return\n asyncio.run(self._stop_async())\n\n def snapshot(self, runtime: RuntimeManager) -> dict[str, object]:\n health = runtime.current_health()\n return {\n \"runtime\": {\"state\": runtime._state.value},\n \"modules\": list(runtime.registry.modules),\n \"services\": runtime.services.snapshot(),\n \"workers\": runtime.workers.snapshot(),\n \"health\": runtime.health.snapshot(runtime.workers.healths()) | {\"status\": health[\"status\"]},\n \"config\": runtime.configuration.get(),\n }\n\n async def _start_async(self, runtime: RuntimeManager) -> None:\n actions = ControlActionSet(\n health=runtime.health_status,\n start=runtime.start_runtime,\n stop=runtime.stop_runtime,\n status=runtime.runtime_status,\n )\n for channel in self._channels:\n await channel.start(actions)\n\n async def _stop_async(self) -> None:\n for channel in reversed(self._channels):\n await channel.stop()", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/service.py:ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "class UvicornThreadRunner:\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._host = host\n self._port = port\n self._timeout = timeout\n self._server: Server | None = None\n self._thread: Thread | None = None\n self._error: BaseException | None = None\n\n async def start(self, app: FastAPI) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._error = None\n config = Config(app=app, host=self._host, port=self._port, log_level=\"warning\")\n self._server = Server(config)\n self._thread = Thread(target=self._serve, name=\"plba-http-control\", daemon=True)\n self._thread.start()\n await self._wait_until_started()\n\n async def stop(self) -> None:\n if self._server is None or self._thread is None:\n return\n self._server.should_exit = True\n await asyncio.to_thread(self._thread.join, self._timeout)\n self._server = None\n self._thread = None\n\n @property\n def port(self) -> int:\n if self._server is None or not getattr(self._server, \"servers\", None):\n return self._port\n socket = self._server.servers[0].sockets[0]\n return int(socket.getsockname()[1])\n\n async def _wait_until_started(self) -> None:\n if self._server is None:\n raise RuntimeError(\"Server is not initialized\")\n deadline = asyncio.get_running_loop().time() + max(float(self._timeout), 1.0)\n while not self._server.started:\n if self._error is not None:\n raise RuntimeError(\"HTTP control server failed to start\") from self._error\n if asyncio.get_running_loop().time() >= deadline:\n raise TimeoutError(\"HTTP control server startup timed out\")\n await asyncio.sleep(0.05)\n\n def _serve(self) -> None:\n if self._server is None:\n return\n try:\n asyncio.run(self._server.serve())\n except BaseException as exc: # noqa: BLE001\n self._error = exc", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_runner.py:UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_runner", + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlChannel(ABC):\n @abstractmethod\n async def start(self, actions: ControlActionSet) -> None:\n \"\"\"Start the control channel and bind handlers.\"\"\"\n\n @abstractmethod\n async def stop(self) -> None:\n \"\"\"Stop the control channel and release resources.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\"ControlActionSet\", \"ControlChannel\", \"ControlPlaneService\", \"HttpControlChannel\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/__init__.py:1-5", + "span_start": 1, + "span_end": 5, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "class HttpControlAppFactory:\n def create(\n self,\n health_provider: Callable[[], Awaitable[HealthPayload]],\n action_provider: Callable[[str, str], Awaitable[JSONResponse]],\n ) -> FastAPI:\n app = FastAPI(title=\"PLBA Control API\")\n\n @app.middleware(\"http\")\n async def log_api_call(request: Request, call_next): # type: ignore[no-untyped-def]\n started = time.monotonic()\n response = await call_next(request)\n response.headers[\"X-Response-Time-Ms\"] = str(int((time.monotonic() - started) * 1000))\n return response\n\n @app.get(\"/health\")\n async def health() -> JSONResponse:\n payload = await health_provider()\n status_code = 200 if payload.get(\"status\") == \"ok\" else 503\n return JSONResponse(content=payload, status_code=status_code)\n\n @app.get(\"/actions/{action}\")\n @app.post(\"/actions/{action}\")\n async def action(action: str, request: Request) -> JSONResponse:\n client_source = self._client_source(request)\n if action in {\"start\", \"stop\"}:\n LOGGER.warning(\"Control action requested: /actions/%s client=%s\", action, client_source)\n return await action_provider(action, client_source)\n\n return app\n\n def _client_source(self, request: Request) -> str:\n explicit_header = request.headers.get(\"X-Client-Source\", \"\").strip()\n if explicit_header:\n return explicit_header\n user_agent = request.headers.get(\"User-Agent\", \"\").strip()\n if user_agent:\n return f\"user-agent:{user_agent}\"\n return \"unknown\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_app.py:HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel(ControlChannel):\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._timeout = timeout\n self._runner = UvicornThreadRunner(host, port, timeout)\n self._factory = HttpControlAppFactory()\n self._actions: ControlActionSet | None = None\n\n async def start(self, actions: ControlActionSet) -> None:\n self._actions = actions\n app = self._factory.create(self._health_response, self._action_response)\n await self._runner.start(app)\n\n async def stop(self) -> None:\n await self._runner.stop()\n\n @property\n def port(self) -> int:\n return self._runner.port\n\n async def _health_response(self) -> dict[str, object]:\n if self._actions is None:\n return {\"status\": \"unhealthy\", \"detail\": \"control actions are not configured\"}\n return await asyncio.wait_for(self._actions.health(), timeout=float(self._timeout))\n\n async def _action_response(self, action: str, _client_source: str = \"unknown\") -> JSONResponse:\n if self._actions is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"{action} handler is not configured\"}, status_code=404)\n callbacks = {\n \"start\": self._actions.start,\n \"stop\": self._actions.stop,\n \"status\": self._actions.status,\n }\n callback = callbacks.get(action)\n if callback is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"unsupported action: {action}\"}, status_code=404)\n action_timeout = max(float(self._timeout), 10.0) if action in {\"start\", \"stop\"} else float(self._timeout)\n try:\n detail = await asyncio.wait_for(callback(), timeout=action_timeout)\n except asyncio.TimeoutError:\n return JSONResponse(\n content={\"status\": \"accepted\", \"detail\": f\"{action} operation is still in progress\"},\n status_code=202,\n )\n except Exception as exc:\n return JSONResponse(content={\"status\": \"error\", \"detail\": str(exc)}, status_code=500)\n return JSONResponse(content={\"status\": \"ok\", \"detail\": detail or f\"{action} action accepted\"}, status_code=200)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_channel.py:HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlActionSet:\n health: HealthHandler\n start: ActionHandler\n stop: ActionHandler\n status: ActionHandler", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/control.py", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\n \"ControlActionSet\",\n \"ControlChannel\",\n \"ControlPlaneService\",\n \"HttpControlChannel\",\n]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/control.py:1-10", + "span_start": 1, + "span_end": 10, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.control", + "is_test": false, + "blob_sha": "31bd5c4481bfa7fbca8fae56d4860a67e3953ca74474ac8439e1f39b685d7bc8", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests manager\n- orchestrates role-like calls (4)\n- reads and writes state attributes\n- participates in dataflow slices (50)", + "layer": "C4_SEMANTIC_ROLES", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 43, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "symbol_name": "RuntimeManager", + "qname": "RuntimeManager", + "role": "pipeline_stage", + "confidence": 0.67, + "dataflow_participation": 50, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 52, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.services\n -> RuntimeManager.__init__", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 33, + "span_end": 39, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d43af85989222ee6d788ce418cdcb217c7ff044cfb915e3bdbd184417dc7bd61", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "dst_ref": "RuntimeManager.__init__", + "resolution": "resolved", + "slice_id": "d43af85989222ee6d788ce418cdcb217c7ff044cfb915e3bdbd184417dc7bd61", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.services", + "RuntimeManager.__init__" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 59, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1", + "dst_ref": "RuntimeManager.start", + "resolution": "resolved", + "slice_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.start" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager._register_core_services", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 127, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6", + "dst_ref": "RuntimeManager._register_core_services", + "resolution": "resolved", + "slice_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager._register_core_services" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.services\n -> RuntimeManager._register_core_services", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 33, + "span_end": 127, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "aac6f9dda73963b977083a892bee39a48eca4fbd7404787e022ecf4ebedec65d", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6", + "dst_ref": "RuntimeManager._register_core_services", + "resolution": "resolved", + "slice_id": "aac6f9dda73963b977083a892bee39a48eca4fbd7404787e022ecf4ebedec65d", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.services", + "RuntimeManager._register_core_services" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "validation": { + "passed": true, + "action": "return", + "reasons": [] + } + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-runtime-start.md b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-runtime-start.md new file mode 100644 index 0000000..a84364c --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-runtime-start.md @@ -0,0 +1,34 @@ +# plba-v2-trace-flow-runtime-start + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: agent_runtime +- mode: full_chain +- passed: True + +## Query +Покажи поток выполнения при запуске RuntimeManager + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "TRACE_FLOW", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 37, + "llm_answer": "1. Запускается `RuntimeManager` через инициализацию переменной `RuntimeManager`.\n2. Инициализация `RuntimeManager` вызывает метод `RuntimeManager.__init__`.\n3. В методе `RuntimeManager.__init__` происходит регистрация основных сервисов с помощью метода `_register_core_services`.\n4. Метод `_register_core_services` вызывает регистрацию базовых сервисов, таких как конфигурация (`configuration`), сервисы (`services`) и другие компоненты системы.\n5. Далее выполняется метод `start`, который инициирует запуск различных каналов управления и контрольных служб.\n6. Вызывается метод `ControlPlaneService.start`, передавая экземпляр `RuntimeManager`.\n7. Внутри `ControlPlaneService.start` регистрируется канал управления и запускается асинхронный процесс старта с использованием `asyncio.run`.\n8. Контрольный канал (`ControlChannel`) начинает свою работу путем вызова метода `start` и регистрации действий (`ControlActionSet`).\n9. Затем управление передается в HTTP-контроллер, где создается экземпляр `HttpControlChannel`, запускающий веб-сервер с помощью библиотеки Uvicorn.\n10. Веб-сервер принимает запросы на стандартные действия, такие как проверка состояния здоровья (`health`), выполнение стартовых и остановочных операций, получение статусов активности.\n\nЦепочка неполная, так как отсутствует детальная информация о внутренних взаимодействиях между сервисами и модулями после запуска основного канала управления.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/summary.md b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/summary.md new file mode 100644 index 0000000..38cde5a --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/summary.md @@ -0,0 +1,86 @@ +# pipeline_setup_v3 summary + +Passed: 14/18 + +| File | Case | Mode | Query | Actual sub-intent | RAG layers | Pass | +|------|------|------|-------|-------------------|------------|------| +| full_chain_plba_code_subintents_v2.yaml | plba-v2-architecture-control-plane | full_chain | Какие компоненты участвуют в ControlPlaneService? | ARCHITECTURE | C0_SOURCE_CHUNKS:4, C1_SYMBOL_CATALOG:6, C2_DEPENDENCY_GRAPH:8, C3_ENTRYPOINTS:3, C4_SEMANTIC_ROLES:12 | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-architecture-runtime-manager | full_chain | Какие компоненты участвуют в RuntimeManager? | ARCHITECTURE | C0_SOURCE_CHUNKS:4, C1_SYMBOL_CATALOG:6, C2_DEPENDENCY_GRAPH:8, C3_ENTRYPOINTS:3, C4_SEMANTIC_ROLES:12 | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-explain-create-runtime | full_chain | Что делает функция create_runtime? | EXPLAIN | C0_SOURCE_CHUNKS:8, C1_SYMBOL_CATALOG:8, C2_DEPENDENCY_GRAPH:6, C3_ENTRYPOINTS:3, C4_SEMANTIC_ROLES:8 | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-explain-local-http-channel | full_chain | Почему в файле src/app_runtime/control/http_channel.py класс HttpControlChannel устроен так? | EXPLAIN_LOCAL | C0_SOURCE_CHUNKS:1, C1_SYMBOL_CATALOG:8, C2_DEPENDENCY_GRAPH:4 | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-explain-nonexistent-symbol | full_chain | Объясни класс RuntimeFactoryManager | EXPLAIN | C0_SOURCE_CHUNKS:8, C1_SYMBOL_CATALOG:8, C2_DEPENDENCY_GRAPH:6, C3_ENTRYPOINTS:3, C4_SEMANTIC_ROLES:8 | ✗ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-explain-runtime-manager | full_chain | Объясни как работает класс RuntimeManager | EXPLAIN | C0_SOURCE_CHUNKS:8, C1_SYMBOL_CATALOG:8, C2_DEPENDENCY_GRAPH:6, C3_ENTRYPOINTS:3, C4_SEMANTIC_ROLES:8 | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-explain-trace-service | full_chain | Объясни как работает класс TraceService | EXPLAIN | C0_SOURCE_CHUNKS:8, C1_SYMBOL_CATALOG:8, C2_DEPENDENCY_GRAPH:6, C3_ENTRYPOINTS:3, C4_SEMANTIC_ROLES:8 | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-find-entrypoints-control-plane | full_chain | Найди точки входа HTTP control plane | FIND_ENTRYPOINTS | C0_SOURCE_CHUNKS:6, C3_ENTRYPOINTS:3 | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-find-entrypoints-health-endpoint | full_chain | Где health endpoint? | FIND_ENTRYPOINTS | C0_SOURCE_CHUNKS:6, C3_ENTRYPOINTS:3 | ✗ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-find-tests-create-runtime | full_chain | Где тесты для create_runtime? | FIND_TESTS | C0_SOURCE_CHUNKS:10, C1_SYMBOL_CATALOG:8, C2_DEPENDENCY_GRAPH:6 | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-find-tests-runtime-manager | full_chain | Где тесты для RuntimeManager? | FIND_TESTS | C0_SOURCE_CHUNKS:10, C1_SYMBOL_CATALOG:8, C2_DEPENDENCY_GRAPH:6 | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-find-tests-trace-service | full_chain | Где тесты для TraceService? | FIND_TESTS | C0_SOURCE_CHUNKS:10, C1_SYMBOL_CATALOG:8, C2_DEPENDENCY_GRAPH:6 | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-find-tests-workflow-runtime-factory-negative | full_chain | Где тесты для WorkflowRuntimeFactory? | FIND_TESTS | C0_SOURCE_CHUNKS:10, C1_SYMBOL_CATALOG:8, C2_DEPENDENCY_GRAPH:6 | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-open-file-nonexistent | full_chain | Открой файл src/app_runtime/core/missing_runtime.py | OPEN_FILE | — | ✗ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-open-file-public-api | full_chain | Открой файл src/plba/__init__.py | OPEN_FILE | C0_SOURCE_CHUNKS:1 | ✗ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-open-file-runtime | full_chain | Открой файл src/app_runtime/core/runtime.py | OPEN_FILE | C0_SOURCE_CHUNKS:1 | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-trace-flow-health-endpoint | full_chain | Покажи как проходит запрос /health в HttpControlAppFactory | TRACE_FLOW | C0_SOURCE_CHUNKS:8, C1_SYMBOL_CATALOG:8, C2_DEPENDENCY_GRAPH:10, C3_ENTRYPOINTS:3, C4_SEMANTIC_ROLES:8 | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-trace-flow-runtime-start | full_chain | Покажи поток выполнения при запуске RuntimeManager | TRACE_FLOW | C0_SOURCE_CHUNKS:8, C1_SYMBOL_CATALOG:8, C2_DEPENDENCY_GRAPH:10, C3_ENTRYPOINTS:3, C4_SEMANTIC_ROLES:8 | ✓ | + +## Failures +- **plba-v2-explain-nonexistent-symbol**: answer_mode: expected degraded, got answered; retrieval: expected empty rag, got 33 rows; llm: expected answer to contain 'не найдена' +- **plba-v2-find-entrypoints-health-endpoint**: llm: expected answer to contain 'GET /health' +- **plba-v2-open-file-nonexistent**: answer_mode: expected degraded, got not_found; llm: expected answer to contain 'Файл src/app_runtime/core/missing_runtime.py не найден.' +- **plba-v2-open-file-public-api**: llm: expected answer to exclude 'из различных подпакетов' + +## LLM Answers +- **plba-v2-architecture-control-plane** + Query: Какие компоненты участвуют в ControlPlaneService? + > Подтвержденные связи и роли компонентов в контексте ControlPlaneService: \#\#\# Компоненты и их роли 1. \*\*ControlPlaneService\*\* \- Роль: pipeline\_stage \- Описание: Инициализирует каналы управления и управляет ими. 2. \*\*ControlChannel\*\* \- Роль: model \- Описание: Абстрактный класс для каналов управления с методами старта и остановки. 3. \*\*ControlActionSet\*\* \- Роль: model \- Описание: Представляет набор действий контроля. 4. \*\*UvicornThreadRunner\*\* \- Роль: pipeline\_stage \- Описание: Управляет uvicorn сервером и участвует в потоках данных. 5. \*\*HttpControlChannel\*\* \- Роль: pipeline\_stage \- Описание: Канал управления HTTP\-соединениями, участвующий в потоках данных. 6. \*\*HttpControlAppFactory\*\* \- Роль: factory \- Описание: Фабрика для создания fastAPI приложений. 7. \*\*WorkflowPersistence\*\* \- Роль: pipeline\_stage \- Описание: Хранит информацию о процессах и взаимодействует с ними.… +- **plba-v2-architecture-runtime-manager** + Query: Какие компоненты участвуют в RuntimeManager? + > \#\#\# Компоненты, участвующие в RuntimeManager \#\#\#\# Подтвержденные связи 1. \*\*RuntimeManager\*\* \- Role: Pipeline Stage \- Responsibilities: \- Manager responsibilities \- Orchestration of role\-like calls \- State attribute reading/writing \- Participation in dataflow slices 2. \*\*ControlPlaneService\*\* \- Role: Pipeline Stage \- Responsibilities: \- Service responsibilities \- State attribute reading/writing \- Participation in dataflow slices 3. \*\*UvicornThreadRunner\*\* \- Role: Pipeline Stage \- Responsibilities: \- State attribute reading/writing \- Participation in dataflow slices 4. \*\*HttpControlChannel\*\* \- Role: Pipeline Stage \- Responsibilities: \- State attribute reading/writing \- Participation in dataflow slices 5. \*\*WorkflowPersistence\*\* \- Role: Pipeline Stage \- Responsibilities: \- Orchestration of role\-like calls \- State attribute reading/writing \- Participation in dataflow sl… +- **plba-v2-explain-create-runtime** + Query: Что делает функция create_runtime? + > Функция \`create\_runtime\` инициализирует и настраивает менеджер выполнения приложения. \*\*Ключевые шаги:\*\* 1. Инициализация менеджера выполнения \(\`RuntimeManager\(\)\`\). 2. Добавление конфигурационного файла, если указан путь \(\`add\_config\_file\`\). 3. Регистрация HTTP\-канала управления, если включен режим управления \(\`register\_channel\`\). 4. Регистрация модуля приложения в менеджере выполнения \(\`register\_module\`\). \*\*Опорные файлы:\*\* \- \`src/plba/bootstrap.py:8\-29\` Этот процесс позволяет настроить и запустить приложение с учетом заданных конфигураций и режимов управления. +- **plba-v2-explain-local-http-channel** + Query: Почему в файле src/app_runtime/control/http_channel.py класс HttpControlChannel устроен так? + > Класс \`HttpControlChannel\` предназначен для управления HTTP каналом контроля в приложении. \*\*Ключевые шаги его реализации:\*\* 1. Инициализация \(\`\_\_init\_\_\`\) – принимает параметры хоста, порта и тайм\-аута, создаёт внутренние объекты управления и инициализирует состояние канала. 2. Запуск \(\`start\`\) – запускает сервер с заданными действиями контроля, создавая приложение и вызывая runner для запуска сервера. 3. Остановка \(\`stop\`\) – останавливает запущенный сервер. 4. Свойство \`port\` – возвращает порт, используемый сервером. 5. Метод \`\_health\_response\` – генерирует ответ о состоянии здоровья системы \(здоров или нет\). Опорные файлы: \- \`src/app\_runtime/control/http\_channel.py:12\-57\` \(определение класса и методов\) \- \`src/app\_runtime/control/http\_channel.py:13\-17\` \(инициализация\) \- \`src/app\_runtime/control/http\_channel.py:19\-22\` \(запуск\) +- **plba-v2-explain-nonexistent-symbol** + Query: Объясни класс RuntimeFactoryManager + > Класс \`RuntimeFactoryManager\` не указан напрямую в предоставленном коде. Однако, судя по контексту и взаимосвязям между классами: \*\*Назначение класса:\*\* \- Управление фабрикой для создания экземпляров классов, связанных с управлением рабочим состоянием приложения. \*\*Ключевые шаги:\*\* 1. Инициализация фабрики. 2. Создание экземпляра соответствующего класса управления каналом \(\`ControlChannel\`\) или другого необходимого класса. 3. Регистрация созданных каналов в сервисе управления каналами. \*\*Опорные файлы:\*\* \- \`src/app\_runtime/control/base.py\`: Объявление абстрактного базового класса \`ControlChannel\`. \- \`src/app\_runtime/control/service.py\`: Реализация сервиса управления каналами, который регистрирует созданные каналы. \- \`src/app\_runtime/control/http\_channel.py\`: Определение канала HTTP, используемого для взаимодействия через HTTP\-протокол. Обратите внимание, что прямое о… +- **plba-v2-explain-runtime-manager** + Query: Объясни как работает класс RuntimeManager + > \*\*Класс \`RuntimeManager\`\*\* отвечает за управление жизненным циклом приложения и координацию различных компонентов системы. \#\#\# Ключевые шаги работы класса: 1. \*\*Инициализация конфигурации:\*\* Класс инициализирует начальные настройки приложения, включая загрузку конфигурационных файлов. 2. \*\*Регистрация каналов управления:\*\* Метод \`register\_channel\` позволяет зарегистрировать каналы управления, которые будут использоваться для взаимодействия с различными компонентами системы. 3. \*\*Запуск и остановка системы:\*\* Методы \`start\` и \`stop\` инициируют запуск и остановку всех зарегистрированных каналов управления, обеспечивая корректное завершение работы системы. 4. \*\*Сохранение состояния:\*\* Метод \`snapshot\` создает снимок текущего состояния системы, который может быть использован для восстановления или анализа состояния в будущем. \#\#\# Опорные файлы: \- \`src/app\_runtime/core/ru… +- **plba-v2-explain-trace-service** + Query: Объясни как работает класс TraceService + > \*\*Класс \`TraceService\`\*\* предназначен для управления контекстом трассировки в приложении. Его основные функции включают создание нового контекста трассировки, получение текущего идентификатора трассировки и закрытие контекста. \*\*Ключевые шаги работы класса:\*\* 1. \*\*Инициализация:\*\* При создании экземпляра \`TraceService\` задаются транспорт и хранилище контекста трассировки \(по умолчанию используются заглушки\). 2. \*\*Создание контекста:\*\* Метод \`create\_context\` создает новый контекст трассировки с заданными параметрами \(идентификатор, родительский идентификатор, тип и атрибуты\). Контекст сохраняется в хранилище. 3. \*\*Получение текущего идентификатора:\*\* Метод \`current\_trace\_id\` возвращает текущий идентификатор трассировки. 4. \*\*Открытие контекста:\*\* Метод \`open\_context\` открывает новый контекст трассировки. 5. \*\*Закрытие контекста:\*\* Метод \`close\_context\` завершает текущ… +- **plba-v2-find-entrypoints-control-plane** + Query: Найди точки входа HTTP control plane + > confirmed\_entrypoints: \- src/app\_runtime/control/http\_app.py:app.post \(line range: 38\-42\) \- src/app\_runtime/control/http\_app.py:app.get \(line range: 31\-34\) \- src/app\_runtime/control/http\_app.py:app.get \(line range: 38\-42\) +- **plba-v2-find-entrypoints-health-endpoint** + Query: Где health endpoint? + > health endpoint: \- src/app\_runtime/control/http\_app.py:38\-42 \(app.post\) \- src/app\_runtime/control/http\_app.py:31\-34 \(app.get\) +- **plba-v2-find-tests-create-runtime** + Query: Где тесты для create_runtime? + > \- tests/test\_runtime.py:342\-405 \(test\_public\_plba\_package\_exports\_runtime\_builder\_and\_worker\_contract\) +- **plba-v2-find-tests-runtime-manager** + Query: Где тесты для RuntimeManager? + > \- tests/test\_runtime.py:12\-12 \- tests/test\_business\_control\_actions.py:14\-14 +- **plba-v2-find-tests-trace-service** + Query: Где тесты для TraceService? + > tests/test\_runtime.py:test\_trace\_service\_allows\_messages\_without\_status tests/test\_runtime.py:test\_trace\_service\_writes\_contexts\_and\_messages tests/test\_runtime.py:test\_trace\_service\_supports\_debug\_warning\_and\_error\_levels +- **plba-v2-find-tests-workflow-runtime-factory-negative** + Query: Где тесты для WorkflowRuntimeFactory? + > Insufficient evidence for a confident answer. No test candidates found. +- **plba-v2-open-file-nonexistent** + Query: Открой файл src/app_runtime/core/missing_runtime.py + > Файл \`src/app\_runtime/core/missing\_runtime.py\` не найден. +- **plba-v2-open-file-public-api** + Query: Открой файл src/plba/__init__.py + > Путь к файлу: src/plba/\_\_init\_\_.py В этом файле находятся импортированные модули и классы из различных подпакетов библиотеки plba. Файл служит точкой входа для пользователей, предоставляя доступ к основным функциям и классам библиотеки. В частности, здесь импортируются: \- Функции и классы для создания runtime \(create\_runtime\) \- Конфигурационные файлы и провайдеры \(ConfigFileLoader, FileConfigProvider\) \- Контрольные каналы и службы \(ControlActionSet, ControlChannel, ControlPlaneService, HttpControlChannel\) \- Определения контрактов \(ApplicationModule, ConfigProvider, HealthContributor и др.\) \- Менеджеры конфигурации и выполнения \(ConfigurationManager, RuntimeManager, ServiceContainer\) \- Службы мониторинга здоровья \(HealthRegistry\) \- Управление логированием \(LogManager\) \- Очереди задач \(InMemoryTaskQueue\) \- Транспортировка трассировки \(MySqlTraceTransport, NoOpTraceTran… +- **plba-v2-open-file-runtime** + Query: Открой файл src/app_runtime/core/runtime.py + > Путь: src/app\_runtime/core/runtime.py В этом файле содержится определение класса \`RuntimeManager\`. В примере приведено начало класса с инициализатором \(\`\_\_init\_\_\`\) и некоторыми атрибутами и параметрами, такими как \`ACTION\_TIMEOUT\_SECONDS\`, \`ACTION\_POLL\_INTERVAL\_SECONDS\`, а также параметрами конфигурации и сервисов, которые могут передаваться при создании экземпляра класса. +- **plba-v2-trace-flow-health-endpoint** + Query: Покажи как проходит запрос /health в HttpControlAppFactory + > 1. HttpControlAppFactory.create\(health\_provider, action\_provider\) \- Создает экземпляр FastAPI приложения. \- Добавляет middleware для логирования времени ответа. \- Определяет маршрут \`/health\`. 2. HttpControlAppFactory.create\(\).get\("/health"\) \- Вызывает health\_provider, чтобы получить состояние здоровья. \- Устанавливает статус\-код ответа: \- 200, если состояние "ok". \- 503, если состояние отличное от "ok". \- Возвращает JSON с состоянием здоровья. Цепочка неполная, так как отсутствует детальная информация о вызове health\_provider и его реализации. +- **plba-v2-trace-flow-runtime-start** + Query: Покажи поток выполнения при запуске RuntimeManager + > 1. Запускается \`RuntimeManager\` через инициализацию переменной \`RuntimeManager\`. 2. Инициализация \`RuntimeManager\` вызывает метод \`RuntimeManager.\_\_init\_\_\`. 3. В методе \`RuntimeManager.\_\_init\_\_\` происходит регистрация основных сервисов с помощью метода \`\_register\_core\_services\`. 4. Метод \`\_register\_core\_services\` вызывает регистрацию базовых сервисов, таких как конфигурация \(\`configuration\`\), сервисы \(\`services\`\) и другие компоненты системы. 5. Далее выполняется метод \`start\`, который инициирует запуск различных каналов управления и контрольных служб. 6. Вызывается метод \`ControlPlaneService.start\`, передавая экземпляр \`RuntimeManager\`. 7. Внутри \`ControlPlaneService.start\` регистрируется канал управления и запускается асинхронный процесс старта с использованием \`asyncio.run\`. 8. Контрольный канал \(\`ControlChannel\`\) начинает свою работу путем вызова метода \`start\` и… \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-architecture-control-plane.json b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-architecture-control-plane.json new file mode 100644 index 0000000..452c3ea --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-architecture-control-plane.json @@ -0,0 +1,4171 @@ +{ + "case_id": "plba-v2-architecture-control-plane", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "agent_runtime", + "mode": "full_chain", + "query": "Какие компоненты участвуют в ControlPlaneService?", + "actual": { + "intent": "CODE_QA", + "sub_intent": "ARCHITECTURE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 33, + "llm_answer": "### Подтвержденные Связи\n\n1. **ControlPlaneService**:\n - Вызывает методы инициализации (`_channels`, `_start_async`, `register_channel`, `start`, `stop`, `_stop_async`) [evidence: 16-20].\n \n2. **ControlPlaneService** взаимодействует с другими компонентами через методы регистрации каналов и запуска:\n - Регистрация канала (`register_channel`) использует атрибут `_channels` для хранения списка зарегистрированных каналов [evidence: 22].\n - Запуск сервиса использует метод `start`, который также обращается к атрибуту `_channels` [evidence: 23].\n\n### Роли Компонентов\n\n1. **ControlPlaneService**:\n - Pipeline stage: отвечает за чтение и запись состояния атрибутов, участвует в данных срезах (dataflow slices).\n\n2. **ControlChannel**:\n - Model: выполняет функции модели управления каналами, включая запуск и остановку.\n\n3. **ControlActionSet**:\n - Default model role: обеспечивает стандартные действия для контроля.\n\n4. **UvicornThreadRunner**, **HttpControlChannel**, **HttpControlAppFactory**, **WorkflowPersistence**, **InMemoryTaskQueue**, **ConfigFileLoader**, **TraceContextStore**, **WorkerSupervisor**, **WorkflowEngine**:\n - Pipeline stages: отвечают за выполнение различных задач, связанных с обработкой данных и состоянием приложения.\n\n### Ограничения Контекста\n\nКонтекст ограничивается исключительно компонентами, связанными непосредственно с функциональностью ControlPlaneService и его методами. Другие компоненты и зависимости не рассматриваются в данном анализе.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "ControlPlaneService" + ], + "layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "query": "Какие компоненты участвуют в ControlPlaneService?", + "router_result": { + "schema_version": "1.1", + "intent": "CODE_QA", + "retrieval_profile": "code", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query_plan": { + "raw": "Какие компоненты участвуют в ControlPlaneService?", + "normalized": "Какие компоненты участвуют в ControlPlaneService?", + "sub_intent": "ARCHITECTURE", + "negations": [], + "expansions": [ + "ControlPlaneService" + ], + "keyword_hints": [ + "ControlPlaneService" + ], + "path_hints": [], + "doc_scope_hints": [], + "symbol_candidates": [ + "ControlPlaneService" + ], + "symbol_kind_hint": "class", + "anchors": [ + { + "type": "SYMBOL", + "value": "ControlPlaneService", + "source": "user_text", + "subtype": null, + "span": { + "start": 29, + "end": 48 + }, + "confidence": 0.88 + } + ] + }, + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C4_SEMANTIC_ROLES", + "top_k": 12 + }, + { + "layer_id": "C3_ENTRYPOINTS", + "top_k": 8 + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "top_k": 8 + }, + { + "layer_id": "C1_SYMBOL_CATALOG", + "top_k": 6 + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 4 + } + ], + "filters": { + "test_policy": "EXCLUDE", + "path_scope": [], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + }, + "symbol_resolution": { + "status": "pending", + "resolved_symbol": null, + "alternatives": [ + "ControlPlaneService" + ], + "confidence": 0.0 + }, + "evidence_policy": { + "require_def": true, + "require_flow": true, + "require_spec": false, + "allow_answer_without_evidence": false + } + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Какие компоненты участвуют в ControlPlaneService?", + "sub_intent": "ARCHITECTURE", + "path_scope": [], + "keyword_hints": [ + "ControlPlaneService" + ], + "symbol_candidates": [ + "ControlPlaneService" + ], + "requested_layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ], + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C4_SEMANTIC_ROLES", + "top_k": 12 + }, + { + "layer_id": "C3_ENTRYPOINTS", + "top_k": 8 + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "top_k": 8 + }, + { + "layer_id": "C1_SYMBOL_CATALOG", + "top_k": 6 + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 4 + } + ], + "filters": { + "test_policy": "EXCLUDE", + "path_scope": [], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + }, + "query_plan": { + "raw": "Какие компоненты участвуют в ControlPlaneService?", + "normalized": "Какие компоненты участвуют в ControlPlaneService?", + "sub_intent": "ARCHITECTURE", + "negations": [], + "expansions": [ + "ControlPlaneService" + ], + "keyword_hints": [ + "ControlPlaneService" + ], + "path_hints": [], + "doc_scope_hints": [], + "symbol_candidates": [ + "ControlPlaneService" + ], + "symbol_kind_hint": "class", + "anchors": [ + { + "type": "SYMBOL", + "value": "ControlPlaneService", + "source": "user_text", + "subtype": null, + "span": { + "start": 29, + "end": 48 + }, + "confidence": 0.88 + } + ] + } + }, + "retrieval_result": { + "target_symbol_candidates": [ + "ControlPlaneService", + "ControlChannel" + ], + "resolved_symbol": "ControlPlaneService", + "symbol_resolution_status": "resolved", + "file_candidates": [ + "src/app_runtime/control/service.py", + "src/app_runtime/control/base.py", + "src/app_runtime/control/http_runner.py", + "src/app_runtime/control/http_channel.py", + "src/app_runtime/control/http_app.py", + "src/app_runtime/workflow/persistence/workflow_persistence.py", + "src/app_runtime/queue/in_memory.py", + "src/app_runtime/config/file_loader.py", + "src/app_runtime/tracing/store.py", + "src/app_runtime/workers/supervisor.py", + "src/app_runtime/workflow/engine/workflow_engine.py", + "src/app_runtime/core/runtime.py", + "src/plba/control.py", + "src/app_runtime/control/__init__.py", + "src/plba/__init__.py" + ], + "code_chunks": [ + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "start_line": 12, + "end_line": 52, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/base.py", + "title": "ControlActionSet", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "start_line": 14, + "end_line": 18, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/base.py", + "title": "ControlChannel", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "start_line": 21, + "end_line": 28, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/http_runner.py", + "title": "UvicornThreadRunner", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "start_line": 10, + "end_line": 61, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/http_channel.py", + "title": "HttpControlChannel", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "start_line": 12, + "end_line": 57, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/http_app.py", + "title": "HttpControlAppFactory", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "start_line": 15, + "end_line": 53, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "title": "WorkflowPersistence", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "start_line": 8, + "end_line": 54, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/queue/in_memory.py", + "title": "InMemoryTaskQueue", + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)", + "start_line": 9, + "end_line": 38, + "metadata": { + "symbol_id": "2da04cb94544a3bcbf0943a95ad4bdd8710bcafaa32a02fd0e4de2178dcf3533", + "symbol_name": "InMemoryTaskQueue", + "qname": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 9, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "58f0cc001ccda0eee4c6bc32ed83bd05eafd6b6644f1e8b4aa9eed3103db73dc", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/config/file_loader.py", + "title": "ConfigFileLoader", + "content": "ConfigFileLoader\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (8)", + "start_line": 11, + "end_line": 48, + "metadata": { + "symbol_id": "a8474eca8b6e9dc86ae67ed68b16fa5fb639ef08739c053e7b7195489765667f", + "symbol_name": "ConfigFileLoader", + "qname": "ConfigFileLoader", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 8, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/tracing/store.py", + "title": "TraceContextStore", + "content": "TraceContextStore\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "start_line": 15, + "end_line": 52, + "metadata": { + "symbol_id": "b2dad4fbe16ffb11b58deba311c7739955c39d59f291b22181f33e9c8cce4059", + "symbol_name": "TraceContextStore", + "qname": "TraceContextStore", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "d369554f08fc92039c6edd5a2a1e73b23901533e8974459170bbd9347d263dc5", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/workers/supervisor.py", + "title": "WorkerSupervisor", + "content": "WorkerSupervisor\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "start_line": 10, + "end_line": 59, + "metadata": { + "symbol_id": "c17b44e8d9e97d490989b21fa67d7c346cdda8a0472e4c41fb243c8846faa124", + "symbol_name": "WorkerSupervisor", + "qname": "WorkerSupervisor", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "77609d9d5927171cce7fc3a54897c183fd63068710c6362029b700937aae5eee", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "title": "WorkflowEngine", + "content": "WorkflowEngine\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "start_line": 10, + "end_line": 86, + "metadata": { + "symbol_id": "57ec0a9f11c542c78e008684a888397e8d9ef4223671acb2567e631a0cbc70b4", + "symbol_name": "WorkflowEngine", + "qname": "WorkflowEngine", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C3_ENTRYPOINTS", + "path": "src/app_runtime/control/http_app.py", + "title": "app.post", + "content": "fastapi http app.post", + "start_line": 38, + "end_line": 42, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C3_ENTRYPOINTS", + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "content": "fastapi http app.get", + "start_line": 31, + "end_line": 34, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C3_ENTRYPOINTS", + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "content": "fastapi http app.get", + "start_line": 38, + "end_line": 42, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "start_line": 14, + "end_line": 47, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "start_line": 14, + "end_line": 17, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "start_line": 14, + "end_line": 20, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "start_line": 14, + "end_line": 25, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "start_line": 14, + "end_line": 51, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.start:calls", + "content": "ControlPlaneService.start calls asyncio.run", + "start_line": 22, + "end_line": 22, + "metadata": { + "edge_id": "4e0b3147fb867d48d26567570c259f4052a739e3098133802d4b8bafcf03be6b", + "edge_type": "calls", + "src_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "src_qname": "ControlPlaneService.start", + "dst_symbol_id": null, + "dst_ref": "asyncio.run", + "resolution": "partial", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.register_channel:reads_attr", + "content": "ControlPlaneService.register_channel reads_attr ControlPlaneService._channels", + "start_line": 17, + "end_line": 17, + "metadata": { + "edge_id": "3101fdc99a7a9c5aebf18a024bc148d37b348248a6fd02b95724dff280f2908a", + "edge_type": "reads_attr", + "src_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "src_qname": "ControlPlaneService.register_channel", + "dst_symbol_id": null, + "dst_ref": "ControlPlaneService._channels", + "resolution": "partial", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.start:reads_attr", + "content": "ControlPlaneService.start reads_attr ControlPlaneService._channels", + "start_line": 20, + "end_line": 20, + "metadata": { + "edge_id": "9452e50ef27d47c30ee1c311c48fe73ecddbf7a6dbcf967a6345e98222d9f71a", + "edge_type": "reads_attr", + "src_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "src_qname": "ControlPlaneService.start", + "dst_symbol_id": null, + "dst_ref": "ControlPlaneService._channels", + "resolution": "partial", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/core/runtime.py", + "title": "ControlPlaneService", + "content": "const ControlPlaneService\nControlPlaneService = app_runtime.control.service.ControlPlaneService", + "start_line": 7, + "end_line": 7, + "metadata": { + "symbol_id": "3030804d119fa1d4b8a6c32616062a5e11080b03d33818c9280bcc5bdd8fd512", + "qname": "ControlPlaneService", + "kind": "const", + "signature": "ControlPlaneService = app_runtime.control.service.ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/plba/control.py", + "title": "ControlPlaneService", + "content": "const ControlPlaneService\nControlPlaneService = app_runtime.control.service.ControlPlaneService", + "start_line": 3, + "end_line": 3, + "metadata": { + "symbol_id": "bd7f620031a049b8d791534536941ce75071029542395a7bb14817742827070a", + "qname": "ControlPlaneService", + "kind": "const", + "signature": "ControlPlaneService = app_runtime.control.service.ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.plba.control", + "is_test": false, + "blob_sha": "31bd5c4481bfa7fbca8fae56d4860a67e3953ca74474ac8439e1f39b685d7bc8", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService", + "content": "class ControlPlaneService\nControlPlaneService", + "start_line": 12, + "end_line": 52, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "qname": "ControlPlaneService", + "kind": "class", + "signature": "ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/__init__.py", + "title": "ControlPlaneService", + "content": "const ControlPlaneService\nControlPlaneService = app_runtime.control.service.ControlPlaneService", + "start_line": 3, + "end_line": 3, + "metadata": { + "symbol_id": "217e8f044d1c01644bf7b81e5046af9e84469210c692a2fb0c476a19bb069ae1", + "qname": "ControlPlaneService", + "kind": "const", + "signature": "ControlPlaneService = app_runtime.control.service.ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/plba/__init__.py", + "title": "ControlPlaneService", + "content": "const ControlPlaneService\nControlPlaneService = plba.control.ControlPlaneService", + "start_line": 3, + "end_line": 3, + "metadata": { + "symbol_id": "90b154d49d544efb7c448e91bf5b75231578a6571b98c06a2a555fa5dcffb152", + "qname": "ControlPlaneService", + "kind": "const", + "signature": "ControlPlaneService = plba.control.ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/__init__.py", + "title": "ControlChannel", + "content": "const ControlChannel\nControlChannel = app_runtime.control.base.ControlChannel", + "start_line": 1, + "end_line": 1, + "metadata": { + "symbol_id": "268420f7aa4ed74082b9276cae0cded4f00bac090ffd58fa020a65be0fe19c27", + "qname": "ControlChannel", + "kind": "const", + "signature": "ControlChannel = app_runtime.control.base.ControlChannel", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/base.py", + "title": "src/app_runtime/control/base.py:ControlChannel", + "content": "class ControlChannel(ABC):\n @abstractmethod\n async def start(self, actions: ControlActionSet) -> None:\n \"\"\"Start the control channel and bind handlers.\"\"\"\n\n @abstractmethod\n async def stop(self) -> None:\n \"\"\"Stop the control channel and release resources.\"\"\"", + "start_line": 21, + "end_line": 28, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/__init__.py", + "title": "src/app_runtime/control/__init__.py:1-5", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\"ControlActionSet\", \"ControlChannel\", \"ControlPlaneService\", \"HttpControlChannel\"]", + "start_line": 1, + "end_line": 5, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/base.py", + "title": "src/app_runtime/control/base.py:ControlActionSet", + "content": "class ControlActionSet:\n health: HealthHandler\n start: ActionHandler\n stop: ActionHandler\n status: ActionHandler", + "start_line": 14, + "end_line": 18, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/http_app.py", + "title": "src/app_runtime/control/http_app.py:HttpControlAppFactory", + "content": "class HttpControlAppFactory:\n def create(\n self,\n health_provider: Callable[[], Awaitable[HealthPayload]],\n action_provider: Callable[[str, str], Awaitable[JSONResponse]],\n ) -> FastAPI:\n app = FastAPI(title=\"PLBA Control API\")\n\n @app.middleware(\"http\")\n async def log_api_call(request: Request, call_next): # type: ignore[no-untyped-def]\n started = time.monotonic()\n response = await call_next(request)\n response.headers[\"X-Response-Time-Ms\"] = str(int((time.monotonic() - started) * 1000))\n return response\n\n @app.get(\"/health\")\n async def health() -> JSONResponse:\n payload = await health_provider()\n status_code = 200 if payload.get(\"status\") == \"ok\" else 503\n return JSONResponse(content=payload, status_code=status_code)\n\n @app.get(\"/actions/{action}\")\n @app.post(\"/actions/{action}\")\n async def action(action: str, request: Request) -> JSONResponse:\n client_source = self._client_source(request)\n if action in {\"start\", \"stop\"}:\n LOGGER.warning(\"Control action requested: /actions/%s client=%s\", action, client_source)\n return await action_provider(action, client_source)\n\n return app\n\n def _client_source(self, request: Request) -> str:\n explicit_header = request.headers.get(\"X-Client-Source\", \"\").strip()\n if explicit_header:\n return explicit_header\n user_agent = request.headers.get(\"User-Agent\", \"\").strip()\n if user_agent:\n return f\"user-agent:{user_agent}\"\n return \"unknown\"", + "start_line": 15, + "end_line": 53, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "relations": [ + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async" + }, + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel" + }, + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start" + }, + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop" + }, + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async" + }, + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "4e0b3147fb867d48d26567570c259f4052a739e3098133802d4b8bafcf03be6b", + "edge_type": "calls", + "src_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "src_qname": "ControlPlaneService.start", + "dst_symbol_id": null, + "dst_ref": "asyncio.run", + "resolution": "partial", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.start calls asyncio.run" + }, + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "3101fdc99a7a9c5aebf18a024bc148d37b348248a6fd02b95724dff280f2908a", + "edge_type": "reads_attr", + "src_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "src_qname": "ControlPlaneService.register_channel", + "dst_symbol_id": null, + "dst_ref": "ControlPlaneService._channels", + "resolution": "partial", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.register_channel reads_attr ControlPlaneService._channels" + }, + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "9452e50ef27d47c30ee1c311c48fe73ecddbf7a6dbcf967a6345e98222d9f71a", + "edge_type": "reads_attr", + "src_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "src_qname": "ControlPlaneService.start", + "dst_symbol_id": null, + "dst_ref": "ControlPlaneService._channels", + "resolution": "partial", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.start reads_attr ControlPlaneService._channels" + } + ], + "entrypoints": [ + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.post", + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "test_candidates": [], + "layer_outcomes": [ + { + "layer_id": "C4_SEMANTIC_ROLES", + "hit_count": 12, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C3_ENTRYPOINTS", + "hit_count": 3, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 6, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 4, + "empty": false, + "fallback_used": false + } + ], + "missing_layers": [], + "raw_rows": [ + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/queue/in_memory.py", + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)", + "layer": "C4_SEMANTIC_ROLES", + "title": "InMemoryTaskQueue", + "span_start": 9, + "span_end": 38, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 22, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "2da04cb94544a3bcbf0943a95ad4bdd8710bcafaa32a02fd0e4de2178dcf3533", + "symbol_name": "InMemoryTaskQueue", + "qname": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 9, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "58f0cc001ccda0eee4c6bc32ed83bd05eafd6b6644f1e8b4aa9eed3103db73dc", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "ConfigFileLoader\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (8)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ConfigFileLoader", + "span_start": 11, + "span_end": 48, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 23, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "a8474eca8b6e9dc86ae67ed68b16fa5fb639ef08739c053e7b7195489765667f", + "symbol_name": "ConfigFileLoader", + "qname": "ConfigFileLoader", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 8, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/store.py", + "content": "TraceContextStore\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "TraceContextStore", + "span_start": 15, + "span_end": 52, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "b2dad4fbe16ffb11b58deba311c7739955c39d59f291b22181f33e9c8cce4059", + "symbol_name": "TraceContextStore", + "qname": "TraceContextStore", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "d369554f08fc92039c6edd5a2a1e73b23901533e8974459170bbd9347d263dc5", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workers/supervisor.py", + "content": "WorkerSupervisor\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkerSupervisor", + "span_start": 10, + "span_end": 59, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "c17b44e8d9e97d490989b21fa67d7c346cdda8a0472e4c41fb243c8846faa124", + "symbol_name": "WorkerSupervisor", + "qname": "WorkerSupervisor", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "77609d9d5927171cce7fc3a54897c183fd63068710c6362029b700937aae5eee", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowEngine", + "span_start": 10, + "span_end": 86, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "57ec0a9f11c542c78e008684a888397e8d9ef4223671acb2567e631a0cbc70b4", + "symbol_name": "WorkflowEngine", + "qname": "WorkflowEngine", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": null, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": null, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": null, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.start calls asyncio.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.start:calls", + "span_start": 22, + "span_end": 22, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "4e0b3147fb867d48d26567570c259f4052a739e3098133802d4b8bafcf03be6b", + "edge_type": "calls", + "src_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "src_qname": "ControlPlaneService.start", + "dst_symbol_id": null, + "dst_ref": "asyncio.run", + "resolution": "partial", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.register_channel reads_attr ControlPlaneService._channels", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.register_channel:reads_attr", + "span_start": 17, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "3101fdc99a7a9c5aebf18a024bc148d37b348248a6fd02b95724dff280f2908a", + "edge_type": "reads_attr", + "src_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "src_qname": "ControlPlaneService.register_channel", + "dst_symbol_id": null, + "dst_ref": "ControlPlaneService._channels", + "resolution": "partial", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.start reads_attr ControlPlaneService._channels", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.start:reads_attr", + "span_start": 20, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "9452e50ef27d47c30ee1c311c48fe73ecddbf7a6dbcf967a6345e98222d9f71a", + "edge_type": "reads_attr", + "src_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "src_qname": "ControlPlaneService.start", + "dst_symbol_id": null, + "dst_ref": "ControlPlaneService._channels", + "resolution": "partial", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "const ControlPlaneService\nControlPlaneService = app_runtime.control.service.ControlPlaneService", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlPlaneService", + "span_start": 7, + "span_end": 7, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "3030804d119fa1d4b8a6c32616062a5e11080b03d33818c9280bcc5bdd8fd512", + "qname": "ControlPlaneService", + "kind": "const", + "signature": "ControlPlaneService = app_runtime.control.service.ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/control.py", + "content": "const ControlPlaneService\nControlPlaneService = app_runtime.control.service.ControlPlaneService", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlPlaneService", + "span_start": 3, + "span_end": 3, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "bd7f620031a049b8d791534536941ce75071029542395a7bb14817742827070a", + "qname": "ControlPlaneService", + "kind": "const", + "signature": "ControlPlaneService = app_runtime.control.service.ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.plba.control", + "is_test": false, + "blob_sha": "31bd5c4481bfa7fbca8fae56d4860a67e3953ca74474ac8439e1f39b685d7bc8", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "class ControlPlaneService\nControlPlaneService", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "qname": "ControlPlaneService", + "kind": "class", + "signature": "ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "const ControlPlaneService\nControlPlaneService = app_runtime.control.service.ControlPlaneService", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlPlaneService", + "span_start": 3, + "span_end": 3, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "217e8f044d1c01644bf7b81e5046af9e84469210c692a2fb0c476a19bb069ae1", + "qname": "ControlPlaneService", + "kind": "const", + "signature": "ControlPlaneService = app_runtime.control.service.ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/__init__.py", + "content": "const ControlPlaneService\nControlPlaneService = plba.control.ControlPlaneService", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlPlaneService", + "span_start": 3, + "span_end": 3, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "90b154d49d544efb7c448e91bf5b75231578a6571b98c06a2a555fa5dcffb152", + "qname": "ControlPlaneService", + "kind": "const", + "signature": "ControlPlaneService = plba.control.ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "const ControlChannel\nControlChannel = app_runtime.control.base.ControlChannel", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlChannel", + "span_start": 1, + "span_end": 1, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "268420f7aa4ed74082b9276cae0cded4f00bac090ffd58fa020a65be0fe19c27", + "qname": "ControlChannel", + "kind": "const", + "signature": "ControlChannel = app_runtime.control.base.ControlChannel", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlChannel(ABC):\n @abstractmethod\n async def start(self, actions: ControlActionSet) -> None:\n \"\"\"Start the control channel and bind handlers.\"\"\"\n\n @abstractmethod\n async def stop(self) -> None:\n \"\"\"Stop the control channel and release resources.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\"ControlActionSet\", \"ControlChannel\", \"ControlPlaneService\", \"HttpControlChannel\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/__init__.py:1-5", + "span_start": 1, + "span_end": 5, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlActionSet:\n health: HealthHandler\n start: ActionHandler\n stop: ActionHandler\n status: ActionHandler", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "class HttpControlAppFactory:\n def create(\n self,\n health_provider: Callable[[], Awaitable[HealthPayload]],\n action_provider: Callable[[str, str], Awaitable[JSONResponse]],\n ) -> FastAPI:\n app = FastAPI(title=\"PLBA Control API\")\n\n @app.middleware(\"http\")\n async def log_api_call(request: Request, call_next): # type: ignore[no-untyped-def]\n started = time.monotonic()\n response = await call_next(request)\n response.headers[\"X-Response-Time-Ms\"] = str(int((time.monotonic() - started) * 1000))\n return response\n\n @app.get(\"/health\")\n async def health() -> JSONResponse:\n payload = await health_provider()\n status_code = 200 if payload.get(\"status\") == \"ok\" else 503\n return JSONResponse(content=payload, status_code=status_code)\n\n @app.get(\"/actions/{action}\")\n @app.post(\"/actions/{action}\")\n async def action(action: str, request: Request) -> JSONResponse:\n client_source = self._client_source(request)\n if action in {\"start\", \"stop\"}:\n LOGGER.warning(\"Control action requested: /actions/%s client=%s\", action, client_source)\n return await action_provider(action, client_source)\n\n return app\n\n def _client_source(self, request: Request) -> str:\n explicit_header = request.headers.get(\"X-Client-Source\", \"\").strip()\n if explicit_header:\n return explicit_header\n user_agent = request.headers.get(\"User-Agent\", \"\").strip()\n if user_agent:\n return f\"user-agent:{user_agent}\"\n return \"unknown\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_app.py:HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "retrieval_report": { + "executed_layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C4_SEMANTIC_ROLES": "vector", + "C3_ENTRYPOINTS": "vector", + "C2_DEPENDENCY_GRAPH": "vector", + "C1_SYMBOL_CATALOG": "vector", + "C0_SOURCE_CHUNKS": "vector" + }, + "top_k_by_layer": { + "C4_SEMANTIC_ROLES": 12, + "C3_ENTRYPOINTS": 8, + "C2_DEPENDENCY_GRAPH": 8, + "C1_SYMBOL_CATALOG": 6, + "C0_SOURCE_CHUNKS": 4 + }, + "filters_by_layer": { + "C4_SEMANTIC_ROLES": { + "path_scope": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [] + }, + "C1_SYMBOL_CATALOG": { + "path_scope": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [] + } + }, + "fallback": { + "used": false, + "reason": null + }, + "retrieval_by_layer_ms": { + "C4_SEMANTIC_ROLES": 72, + "C3_ENTRYPOINTS": 39, + "C2_DEPENDENCY_GRAPH": 98, + "C1_SYMBOL_CATALOG": 40, + "C0_SOURCE_CHUNKS": 32 + } + } + }, + "diagnostics": { + "intent_correct": null, + "target_found": true, + "layers_used": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ], + "retrieval_sufficient": true, + "answer_mode": "normal", + "router_result": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "ARCHITECTURE", + "path_scope": [], + "layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ], + "symbol_resolution_status": "pending" + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Какие компоненты участвуют в ControlPlaneService?", + "sub_intent": "ARCHITECTURE", + "path_scope": [], + "requested_layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "C4_SEMANTIC_ROLES", + "hit_count": 12, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C3_ENTRYPOINTS", + "hit_count": 3, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 6, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 4, + "empty": false, + "fallback_used": false + } + ], + "empty_layers": [], + "evidence_gate_decision": { + "sufficient": true, + "failure_reasons": [], + "evidence_count": 33 + }, + "failure_reasons": [], + "timings_ms": {} + }, + "rag_rows": [ + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/queue/in_memory.py", + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)", + "layer": "C4_SEMANTIC_ROLES", + "title": "InMemoryTaskQueue", + "span_start": 9, + "span_end": 38, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 22, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "2da04cb94544a3bcbf0943a95ad4bdd8710bcafaa32a02fd0e4de2178dcf3533", + "symbol_name": "InMemoryTaskQueue", + "qname": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 9, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "58f0cc001ccda0eee4c6bc32ed83bd05eafd6b6644f1e8b4aa9eed3103db73dc", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "ConfigFileLoader\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (8)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ConfigFileLoader", + "span_start": 11, + "span_end": 48, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 23, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "a8474eca8b6e9dc86ae67ed68b16fa5fb639ef08739c053e7b7195489765667f", + "symbol_name": "ConfigFileLoader", + "qname": "ConfigFileLoader", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 8, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/store.py", + "content": "TraceContextStore\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "TraceContextStore", + "span_start": 15, + "span_end": 52, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b2dad4fbe16ffb11b58deba311c7739955c39d59f291b22181f33e9c8cce4059", + "symbol_name": "TraceContextStore", + "qname": "TraceContextStore", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "d369554f08fc92039c6edd5a2a1e73b23901533e8974459170bbd9347d263dc5", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workers/supervisor.py", + "content": "WorkerSupervisor\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkerSupervisor", + "span_start": 10, + "span_end": 59, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "c17b44e8d9e97d490989b21fa67d7c346cdda8a0472e4c41fb243c8846faa124", + "symbol_name": "WorkerSupervisor", + "qname": "WorkerSupervisor", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "77609d9d5927171cce7fc3a54897c183fd63068710c6362029b700937aae5eee", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowEngine", + "span_start": 10, + "span_end": 86, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "57ec0a9f11c542c78e008684a888397e8d9ef4223671acb2567e631a0cbc70b4", + "symbol_name": "WorkflowEngine", + "qname": "WorkflowEngine", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.start calls asyncio.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.start:calls", + "span_start": 22, + "span_end": 22, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "4e0b3147fb867d48d26567570c259f4052a739e3098133802d4b8bafcf03be6b", + "edge_type": "calls", + "src_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "src_qname": "ControlPlaneService.start", + "dst_symbol_id": null, + "dst_ref": "asyncio.run", + "resolution": "partial", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.register_channel reads_attr ControlPlaneService._channels", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.register_channel:reads_attr", + "span_start": 17, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3101fdc99a7a9c5aebf18a024bc148d37b348248a6fd02b95724dff280f2908a", + "edge_type": "reads_attr", + "src_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "src_qname": "ControlPlaneService.register_channel", + "dst_symbol_id": null, + "dst_ref": "ControlPlaneService._channels", + "resolution": "partial", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.start reads_attr ControlPlaneService._channels", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.start:reads_attr", + "span_start": 20, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "9452e50ef27d47c30ee1c311c48fe73ecddbf7a6dbcf967a6345e98222d9f71a", + "edge_type": "reads_attr", + "src_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "src_qname": "ControlPlaneService.start", + "dst_symbol_id": null, + "dst_ref": "ControlPlaneService._channels", + "resolution": "partial", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "const ControlPlaneService\nControlPlaneService = app_runtime.control.service.ControlPlaneService", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlPlaneService", + "span_start": 7, + "span_end": 7, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "3030804d119fa1d4b8a6c32616062a5e11080b03d33818c9280bcc5bdd8fd512", + "qname": "ControlPlaneService", + "kind": "const", + "signature": "ControlPlaneService = app_runtime.control.service.ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/control.py", + "content": "const ControlPlaneService\nControlPlaneService = app_runtime.control.service.ControlPlaneService", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlPlaneService", + "span_start": 3, + "span_end": 3, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "bd7f620031a049b8d791534536941ce75071029542395a7bb14817742827070a", + "qname": "ControlPlaneService", + "kind": "const", + "signature": "ControlPlaneService = app_runtime.control.service.ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.plba.control", + "is_test": false, + "blob_sha": "31bd5c4481bfa7fbca8fae56d4860a67e3953ca74474ac8439e1f39b685d7bc8", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "class ControlPlaneService\nControlPlaneService", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "qname": "ControlPlaneService", + "kind": "class", + "signature": "ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "const ControlPlaneService\nControlPlaneService = app_runtime.control.service.ControlPlaneService", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlPlaneService", + "span_start": 3, + "span_end": 3, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "217e8f044d1c01644bf7b81e5046af9e84469210c692a2fb0c476a19bb069ae1", + "qname": "ControlPlaneService", + "kind": "const", + "signature": "ControlPlaneService = app_runtime.control.service.ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/__init__.py", + "content": "const ControlPlaneService\nControlPlaneService = plba.control.ControlPlaneService", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlPlaneService", + "span_start": 3, + "span_end": 3, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "90b154d49d544efb7c448e91bf5b75231578a6571b98c06a2a555fa5dcffb152", + "qname": "ControlPlaneService", + "kind": "const", + "signature": "ControlPlaneService = plba.control.ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "const ControlChannel\nControlChannel = app_runtime.control.base.ControlChannel", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlChannel", + "span_start": 1, + "span_end": 1, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "268420f7aa4ed74082b9276cae0cded4f00bac090ffd58fa020a65be0fe19c27", + "qname": "ControlChannel", + "kind": "const", + "signature": "ControlChannel = app_runtime.control.base.ControlChannel", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlChannel(ABC):\n @abstractmethod\n async def start(self, actions: ControlActionSet) -> None:\n \"\"\"Start the control channel and bind handlers.\"\"\"\n\n @abstractmethod\n async def stop(self) -> None:\n \"\"\"Stop the control channel and release resources.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\"ControlActionSet\", \"ControlChannel\", \"ControlPlaneService\", \"HttpControlChannel\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/__init__.py:1-5", + "span_start": 1, + "span_end": 5, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlActionSet:\n health: HealthHandler\n start: ActionHandler\n stop: ActionHandler\n status: ActionHandler", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "class HttpControlAppFactory:\n def create(\n self,\n health_provider: Callable[[], Awaitable[HealthPayload]],\n action_provider: Callable[[str, str], Awaitable[JSONResponse]],\n ) -> FastAPI:\n app = FastAPI(title=\"PLBA Control API\")\n\n @app.middleware(\"http\")\n async def log_api_call(request: Request, call_next): # type: ignore[no-untyped-def]\n started = time.monotonic()\n response = await call_next(request)\n response.headers[\"X-Response-Time-Ms\"] = str(int((time.monotonic() - started) * 1000))\n return response\n\n @app.get(\"/health\")\n async def health() -> JSONResponse:\n payload = await health_provider()\n status_code = 200 if payload.get(\"status\") == \"ok\" else 503\n return JSONResponse(content=payload, status_code=status_code)\n\n @app.get(\"/actions/{action}\")\n @app.post(\"/actions/{action}\")\n async def action(action: str, request: Request) -> JSONResponse:\n client_source = self._client_source(request)\n if action in {\"start\", \"stop\"}:\n LOGGER.warning(\"Control action requested: /actions/%s client=%s\", action, client_source)\n return await action_provider(action, client_source)\n\n return app\n\n def _client_source(self, request: Request) -> str:\n explicit_header = request.headers.get(\"X-Client-Source\", \"\").strip()\n if explicit_header:\n return explicit_header\n user_agent = request.headers.get(\"User-Agent\", \"\").strip()\n if user_agent:\n return f\"user-agent:{user_agent}\"\n return \"unknown\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_app.py:HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "validation": { + "passed": true, + "action": "return", + "reasons": [] + } + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-architecture-control-plane.md b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-architecture-control-plane.md new file mode 100644 index 0000000..cc320c0 --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-architecture-control-plane.md @@ -0,0 +1,34 @@ +# plba-v2-architecture-control-plane + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: agent_runtime +- mode: full_chain +- passed: True + +## Query +Какие компоненты участвуют в ControlPlaneService? + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "ARCHITECTURE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 33, + "llm_answer": "### Подтвержденные Связи\n\n1. **ControlPlaneService**:\n - Вызывает методы инициализации (`_channels`, `_start_async`, `register_channel`, `start`, `stop`, `_stop_async`) [evidence: 16-20].\n \n2. **ControlPlaneService** взаимодействует с другими компонентами через методы регистрации каналов и запуска:\n - Регистрация канала (`register_channel`) использует атрибут `_channels` для хранения списка зарегистрированных каналов [evidence: 22].\n - Запуск сервиса использует метод `start`, который также обращается к атрибуту `_channels` [evidence: 23].\n\n### Роли Компонентов\n\n1. **ControlPlaneService**:\n - Pipeline stage: отвечает за чтение и запись состояния атрибутов, участвует в данных срезах (dataflow slices).\n\n2. **ControlChannel**:\n - Model: выполняет функции модели управления каналами, включая запуск и остановку.\n\n3. **ControlActionSet**:\n - Default model role: обеспечивает стандартные действия для контроля.\n\n4. **UvicornThreadRunner**, **HttpControlChannel**, **HttpControlAppFactory**, **WorkflowPersistence**, **InMemoryTaskQueue**, **ConfigFileLoader**, **TraceContextStore**, **WorkerSupervisor**, **WorkflowEngine**:\n - Pipeline stages: отвечают за выполнение различных задач, связанных с обработкой данных и состоянием приложения.\n\n### Ограничения Контекста\n\nКонтекст ограничивается исключительно компонентами, связанными непосредственно с функциональностью ControlPlaneService и его методами. Другие компоненты и зависимости не рассматриваются в данном анализе.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "ControlPlaneService" + ], + "layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-architecture-runtime-manager.json b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-architecture-runtime-manager.json new file mode 100644 index 0000000..4094a86 --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-architecture-runtime-manager.json @@ -0,0 +1,4363 @@ +{ + "case_id": "plba-v2-architecture-runtime-manager", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "agent_runtime", + "mode": "full_chain", + "query": "Какие компоненты участвуют в RuntimeManager?", + "actual": { + "intent": "CODE_QA", + "sub_intent": "ARCHITECTURE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 33, + "llm_answer": "### Подтвержденные Связи\n\n1. **RuntimeManager**:\n - Является ключевым компонентом управления жизненным циклом приложения.\n - Инициализирует и управляет другими компонентами системы через метод `__init__`.\n \n2. **ControlPlaneService**:\n - Управляет каналами контроля.\n - Вызывается из метода инициализации `RuntimeManager` для регистрации каналов.\n\n3. **ControlChannel**:\n - Абстрактный класс для реализации конкретных каналов контроля.\n - Реализует методы `start` и `stop`, которые вызываются сервисами и менеджерами.\n\n4. **ConfigFileLoader**:\n - Загружает конфигурационные файлы и передает их в runtime-менеджер.\n\n5. **WorkflowPersistence**:\n - Обеспечивает сохранение информации о workflows.\n\n6. **InMemoryTaskQueue**:\n - Используется для хранения задач внутри памяти.\n\n7. **TraceContextStore**:\n - Хранит контекст трассировки.\n\n8. **WorkerSupervisor**:\n - Наблюдает за рабочими процессами и управляет ими.\n\n### Роли Компонентов\n\n1. **RuntimeManager**:\n - Координирует работу всех других компонентов.\n - Читает и записывает состояние атрибутов.\n - Участвует в управлении данными потока.\n\n2. **ControlPlaneService**:\n - Регистрирует каналы контроля.\n - Начинает и останавливает службы контроля.\n\n3. **ControlChannel**:\n - Осуществляет управление каналами взаимодействия между приложением и внешними системами.\n\n4. **ConfigFileLoader**:\n - Чтение конфигурации из файлов.\n\n5. **WorkflowPersistence**:\n - Сохраняет информацию о workflows.\n\n6. **InMemoryTaskQueue**:\n - Хранение данных задачи во временной памяти.\n\n7. **TraceContextStore**:\n - Управление контекстом трассировки.\n\n8. **WorkerSupervisor**:\n - Контроль рабочих процессов.\n\n### Ограничения Контекста\n\n1. **Dataflow Slices**:\n - Все перечисленные компоненты активно участвуют в обработке данных потоков.\n\n2. **State Attributes**:\n - Большинство компонентов читают или записывают состояние атрибутов системы.\n\nТаким образом, RuntimeManager является центральным управляющим элементом архитектуры, координирующим работу остальных компонентов.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "query": "Какие компоненты участвуют в RuntimeManager?", + "router_result": { + "schema_version": "1.1", + "intent": "CODE_QA", + "retrieval_profile": "code", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query_plan": { + "raw": "Какие компоненты участвуют в RuntimeManager?", + "normalized": "Какие компоненты участвуют в RuntimeManager?", + "sub_intent": "ARCHITECTURE", + "negations": [], + "expansions": [ + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "doc_scope_hints": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "symbol_kind_hint": "class", + "anchors": [ + { + "type": "SYMBOL", + "value": "RuntimeManager", + "source": "user_text", + "subtype": null, + "span": { + "start": 29, + "end": 43 + }, + "confidence": 0.88 + } + ] + }, + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C4_SEMANTIC_ROLES", + "top_k": 12 + }, + { + "layer_id": "C3_ENTRYPOINTS", + "top_k": 8 + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "top_k": 8 + }, + { + "layer_id": "C1_SYMBOL_CATALOG", + "top_k": 6 + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 4 + } + ], + "filters": { + "test_policy": "EXCLUDE", + "path_scope": [], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + }, + "symbol_resolution": { + "status": "pending", + "resolved_symbol": null, + "alternatives": [ + "RuntimeManager" + ], + "confidence": 0.0 + }, + "evidence_policy": { + "require_def": true, + "require_flow": true, + "require_spec": false, + "allow_answer_without_evidence": false + } + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Какие компоненты участвуют в RuntimeManager?", + "sub_intent": "ARCHITECTURE", + "path_scope": [], + "keyword_hints": [ + "RuntimeManager" + ], + "symbol_candidates": [ + "RuntimeManager" + ], + "requested_layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ], + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C4_SEMANTIC_ROLES", + "top_k": 12 + }, + { + "layer_id": "C3_ENTRYPOINTS", + "top_k": 8 + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "top_k": 8 + }, + { + "layer_id": "C1_SYMBOL_CATALOG", + "top_k": 6 + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 4 + } + ], + "filters": { + "test_policy": "EXCLUDE", + "path_scope": [], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + }, + "query_plan": { + "raw": "Какие компоненты участвуют в RuntimeManager?", + "normalized": "Какие компоненты участвуют в RuntimeManager?", + "sub_intent": "ARCHITECTURE", + "negations": [], + "expansions": [ + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "doc_scope_hints": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "symbol_kind_hint": "class", + "anchors": [ + { + "type": "SYMBOL", + "value": "RuntimeManager", + "source": "user_text", + "subtype": null, + "span": { + "start": 29, + "end": 43 + }, + "confidence": 0.88 + } + ] + } + }, + "retrieval_result": { + "target_symbol_candidates": [ + "RuntimeManager", + "ControlChannel" + ], + "resolved_symbol": "RuntimeManager", + "symbol_resolution_status": "resolved", + "file_candidates": [ + "src/app_runtime/core/runtime.py", + "src/app_runtime/control/base.py", + "src/app_runtime/control/service.py", + "src/app_runtime/control/http_runner.py", + "src/app_runtime/control/http_channel.py", + "src/app_runtime/control/http_app.py", + "src/app_runtime/workflow/persistence/workflow_persistence.py", + "src/app_runtime/queue/in_memory.py", + "src/app_runtime/config/file_loader.py", + "src/app_runtime/tracing/store.py", + "src/app_runtime/workers/supervisor.py", + "src/plba/__init__.py", + "src/plba/core.py", + "src/plba/bootstrap.py", + "src/app_runtime/control/__init__.py" + ], + "code_chunks": [ + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/core/runtime.py", + "title": "RuntimeManager", + "content": "RuntimeManager\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests manager\n- orchestrates role-like calls (4)\n- reads and writes state attributes\n- participates in dataflow slices (50)", + "start_line": 18, + "end_line": 179, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "symbol_name": "RuntimeManager", + "qname": "RuntimeManager", + "role": "pipeline_stage", + "confidence": 0.67, + "dataflow_participation": 50, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/base.py", + "title": "ControlActionSet", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "start_line": 14, + "end_line": 18, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/base.py", + "title": "ControlChannel", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "start_line": 21, + "end_line": 28, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "start_line": 12, + "end_line": 52, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/http_runner.py", + "title": "UvicornThreadRunner", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "start_line": 10, + "end_line": 61, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/http_channel.py", + "title": "HttpControlChannel", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "start_line": 12, + "end_line": 57, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/http_app.py", + "title": "HttpControlAppFactory", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "start_line": 15, + "end_line": 53, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "title": "WorkflowPersistence", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "start_line": 8, + "end_line": 54, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/queue/in_memory.py", + "title": "InMemoryTaskQueue", + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)", + "start_line": 9, + "end_line": 38, + "metadata": { + "symbol_id": "2da04cb94544a3bcbf0943a95ad4bdd8710bcafaa32a02fd0e4de2178dcf3533", + "symbol_name": "InMemoryTaskQueue", + "qname": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 9, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "58f0cc001ccda0eee4c6bc32ed83bd05eafd6b6644f1e8b4aa9eed3103db73dc", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/config/file_loader.py", + "title": "ConfigFileLoader", + "content": "ConfigFileLoader\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (8)", + "start_line": 11, + "end_line": 48, + "metadata": { + "symbol_id": "a8474eca8b6e9dc86ae67ed68b16fa5fb639ef08739c053e7b7195489765667f", + "symbol_name": "ConfigFileLoader", + "qname": "ConfigFileLoader", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 8, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/tracing/store.py", + "title": "TraceContextStore", + "content": "TraceContextStore\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "start_line": 15, + "end_line": 52, + "metadata": { + "symbol_id": "b2dad4fbe16ffb11b58deba311c7739955c39d59f291b22181f33e9c8cce4059", + "symbol_name": "TraceContextStore", + "qname": "TraceContextStore", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "d369554f08fc92039c6edd5a2a1e73b23901533e8974459170bbd9347d263dc5", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/workers/supervisor.py", + "title": "WorkerSupervisor", + "content": "WorkerSupervisor\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "start_line": 10, + "end_line": 59, + "metadata": { + "symbol_id": "c17b44e8d9e97d490989b21fa67d7c346cdda8a0472e4c41fb243c8846faa124", + "symbol_name": "WorkerSupervisor", + "qname": "WorkerSupervisor", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "77609d9d5927171cce7fc3a54897c183fd63068710c6362029b700937aae5eee", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C3_ENTRYPOINTS", + "path": "src/app_runtime/control/http_app.py", + "title": "app.post", + "content": "fastapi http app.post", + "start_line": 38, + "end_line": 42, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C3_ENTRYPOINTS", + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "content": "fastapi http app.get", + "start_line": 31, + "end_line": 34, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C3_ENTRYPOINTS", + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "content": "fastapi http app.get", + "start_line": 38, + "end_line": 42, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "start_line": 14, + "end_line": 47, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/core/runtime.py", + "title": "RuntimeManager.__init__:dataflow_slice", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.start", + "start_line": 32, + "end_line": 59, + "metadata": { + "edge_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1", + "dst_ref": "RuntimeManager.start", + "resolution": "resolved", + "slice_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.start" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "start_line": 14, + "end_line": 20, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "start_line": 14, + "end_line": 25, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "start_line": 14, + "end_line": 51, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/core/runtime.py", + "title": "RuntimeManager.__init__:dataflow_slice", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file", + "start_line": 32, + "end_line": 52, + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "start_line": 14, + "end_line": 17, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/core/runtime.py", + "title": "RuntimeManager.__init__:dataflow_slice", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager._register_core_services", + "start_line": 32, + "end_line": 127, + "metadata": { + "edge_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6", + "dst_ref": "RuntimeManager._register_core_services", + "resolution": "resolved", + "slice_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager._register_core_services" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/plba/__init__.py", + "title": "RuntimeManager", + "content": "const RuntimeManager\nRuntimeManager = plba.core.RuntimeManager", + "start_line": 16, + "end_line": 16, + "metadata": { + "symbol_id": "7eacec84f9b8d6c4201374591faecdac7493091c263681495c338973f2971ad9", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = plba.core.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/plba/core.py", + "title": "RuntimeManager", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "start_line": 2, + "end_line": 2, + "metadata": { + "symbol_id": "e1684562d978b7af7fe9b27dc5869d770348a87b5dc19a50360f58544668578b", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.core", + "is_test": false, + "blob_sha": "c0ae25110d20e665216616e26b68adfe035b624ba45d31d1272fb21f906f9ca8", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/service.py", + "title": "RuntimeManager", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "start_line": 9, + "end_line": 9, + "metadata": { + "symbol_id": "62a9575c77aad894120d18b4f2a08cf2ba42f77e9be4a8a432b767d157701afe", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/core/runtime.py", + "title": "RuntimeManager", + "content": "class RuntimeManager\nRuntimeManager", + "start_line": 18, + "end_line": 179, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "qname": "RuntimeManager", + "kind": "class", + "signature": "RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/plba/bootstrap.py", + "title": "RuntimeManager", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "start_line": 4, + "end_line": 4, + "metadata": { + "symbol_id": "27158ca220022eeb5083c6addf8a50775d45f7161284fd60aac48410105f4b98", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/__init__.py", + "title": "ControlChannel", + "content": "const ControlChannel\nControlChannel = app_runtime.control.base.ControlChannel", + "start_line": 1, + "end_line": 1, + "metadata": { + "symbol_id": "268420f7aa4ed74082b9276cae0cded4f00bac090ffd58fa020a65be0fe19c27", + "qname": "ControlChannel", + "kind": "const", + "signature": "ControlChannel = app_runtime.control.base.ControlChannel", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/base.py", + "title": "src/app_runtime/control/base.py:ControlChannel", + "content": "class ControlChannel(ABC):\n @abstractmethod\n async def start(self, actions: ControlActionSet) -> None:\n \"\"\"Start the control channel and bind handlers.\"\"\"\n\n @abstractmethod\n async def stop(self) -> None:\n \"\"\"Stop the control channel and release resources.\"\"\"", + "start_line": 21, + "end_line": 28, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/__init__.py", + "title": "src/app_runtime/control/__init__.py:1-5", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\"ControlActionSet\", \"ControlChannel\", \"ControlPlaneService\", \"HttpControlChannel\"]", + "start_line": 1, + "end_line": 5, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/base.py", + "title": "src/app_runtime/control/base.py:ControlActionSet", + "content": "class ControlActionSet:\n health: HealthHandler\n start: ActionHandler\n stop: ActionHandler\n status: ActionHandler", + "start_line": 14, + "end_line": 18, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/http_app.py", + "title": "src/app_runtime/control/http_app.py:HttpControlAppFactory", + "content": "class HttpControlAppFactory:\n def create(\n self,\n health_provider: Callable[[], Awaitable[HealthPayload]],\n action_provider: Callable[[str, str], Awaitable[JSONResponse]],\n ) -> FastAPI:\n app = FastAPI(title=\"PLBA Control API\")\n\n @app.middleware(\"http\")\n async def log_api_call(request: Request, call_next): # type: ignore[no-untyped-def]\n started = time.monotonic()\n response = await call_next(request)\n response.headers[\"X-Response-Time-Ms\"] = str(int((time.monotonic() - started) * 1000))\n return response\n\n @app.get(\"/health\")\n async def health() -> JSONResponse:\n payload = await health_provider()\n status_code = 200 if payload.get(\"status\") == \"ok\" else 503\n return JSONResponse(content=payload, status_code=status_code)\n\n @app.get(\"/actions/{action}\")\n @app.post(\"/actions/{action}\")\n async def action(action: str, request: Request) -> JSONResponse:\n client_source = self._client_source(request)\n if action in {\"start\", \"stop\"}:\n LOGGER.warning(\"Control action requested: /actions/%s client=%s\", action, client_source)\n return await action_provider(action, client_source)\n\n return app\n\n def _client_source(self, request: Request) -> str:\n explicit_header = request.headers.get(\"X-Client-Source\", \"\").strip()\n if explicit_header:\n return explicit_header\n user_agent = request.headers.get(\"User-Agent\", \"\").strip()\n if user_agent:\n return f\"user-agent:{user_agent}\"\n return \"unknown\"", + "start_line": 15, + "end_line": 53, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "relations": [ + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async" + }, + { + "path": "src/app_runtime/core/runtime.py", + "metadata": { + "edge_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1", + "dst_ref": "RuntimeManager.start", + "resolution": "resolved", + "slice_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.start" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.start" + }, + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start" + }, + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop" + }, + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async" + }, + { + "path": "src/app_runtime/core/runtime.py", + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file" + }, + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel" + }, + { + "path": "src/app_runtime/core/runtime.py", + "metadata": { + "edge_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6", + "dst_ref": "RuntimeManager._register_core_services", + "resolution": "resolved", + "slice_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager._register_core_services" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager._register_core_services" + } + ], + "entrypoints": [ + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.post", + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "test_candidates": [], + "layer_outcomes": [ + { + "layer_id": "C4_SEMANTIC_ROLES", + "hit_count": 12, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C3_ENTRYPOINTS", + "hit_count": 3, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 6, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 4, + "empty": false, + "fallback_used": false + } + ], + "missing_layers": [], + "raw_rows": [ + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests manager\n- orchestrates role-like calls (4)\n- reads and writes state attributes\n- participates in dataflow slices (50)", + "layer": "C4_SEMANTIC_ROLES", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 43, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "symbol_name": "RuntimeManager", + "qname": "RuntimeManager", + "role": "pipeline_stage", + "confidence": 0.67, + "dataflow_participation": 50, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/queue/in_memory.py", + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)", + "layer": "C4_SEMANTIC_ROLES", + "title": "InMemoryTaskQueue", + "span_start": 9, + "span_end": 38, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 22, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "2da04cb94544a3bcbf0943a95ad4bdd8710bcafaa32a02fd0e4de2178dcf3533", + "symbol_name": "InMemoryTaskQueue", + "qname": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 9, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "58f0cc001ccda0eee4c6bc32ed83bd05eafd6b6644f1e8b4aa9eed3103db73dc", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "ConfigFileLoader\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (8)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ConfigFileLoader", + "span_start": 11, + "span_end": 48, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 23, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "a8474eca8b6e9dc86ae67ed68b16fa5fb639ef08739c053e7b7195489765667f", + "symbol_name": "ConfigFileLoader", + "qname": "ConfigFileLoader", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 8, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/store.py", + "content": "TraceContextStore\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "TraceContextStore", + "span_start": 15, + "span_end": 52, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "b2dad4fbe16ffb11b58deba311c7739955c39d59f291b22181f33e9c8cce4059", + "symbol_name": "TraceContextStore", + "qname": "TraceContextStore", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "d369554f08fc92039c6edd5a2a1e73b23901533e8974459170bbd9347d263dc5", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workers/supervisor.py", + "content": "WorkerSupervisor\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkerSupervisor", + "span_start": 10, + "span_end": 59, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "c17b44e8d9e97d490989b21fa67d7c346cdda8a0472e4c41fb243c8846faa124", + "symbol_name": "WorkerSupervisor", + "qname": "WorkerSupervisor", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "77609d9d5927171cce7fc3a54897c183fd63068710c6362029b700937aae5eee", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": null, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": null, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": null, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 59, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1", + "dst_ref": "RuntimeManager.start", + "resolution": "resolved", + "slice_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.start" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 52, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager._register_core_services", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 127, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6", + "dst_ref": "RuntimeManager._register_core_services", + "resolution": "resolved", + "slice_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager._register_core_services" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/__init__.py", + "content": "const RuntimeManager\nRuntimeManager = plba.core.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 16, + "span_end": 16, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "7eacec84f9b8d6c4201374591faecdac7493091c263681495c338973f2971ad9", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = plba.core.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/core.py", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 2, + "span_end": 2, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "e1684562d978b7af7fe9b27dc5869d770348a87b5dc19a50360f58544668578b", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.core", + "is_test": false, + "blob_sha": "c0ae25110d20e665216616e26b68adfe035b624ba45d31d1272fb21f906f9ca8", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 9, + "span_end": 9, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "62a9575c77aad894120d18b4f2a08cf2ba42f77e9be4a8a432b767d157701afe", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager\nRuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "qname": "RuntimeManager", + "kind": "class", + "signature": "RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 4, + "span_end": 4, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "27158ca220022eeb5083c6addf8a50775d45f7161284fd60aac48410105f4b98", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "const ControlChannel\nControlChannel = app_runtime.control.base.ControlChannel", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlChannel", + "span_start": 1, + "span_end": 1, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "268420f7aa4ed74082b9276cae0cded4f00bac090ffd58fa020a65be0fe19c27", + "qname": "ControlChannel", + "kind": "const", + "signature": "ControlChannel = app_runtime.control.base.ControlChannel", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlChannel(ABC):\n @abstractmethod\n async def start(self, actions: ControlActionSet) -> None:\n \"\"\"Start the control channel and bind handlers.\"\"\"\n\n @abstractmethod\n async def stop(self) -> None:\n \"\"\"Stop the control channel and release resources.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\"ControlActionSet\", \"ControlChannel\", \"ControlPlaneService\", \"HttpControlChannel\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/__init__.py:1-5", + "span_start": 1, + "span_end": 5, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlActionSet:\n health: HealthHandler\n start: ActionHandler\n stop: ActionHandler\n status: ActionHandler", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "class HttpControlAppFactory:\n def create(\n self,\n health_provider: Callable[[], Awaitable[HealthPayload]],\n action_provider: Callable[[str, str], Awaitable[JSONResponse]],\n ) -> FastAPI:\n app = FastAPI(title=\"PLBA Control API\")\n\n @app.middleware(\"http\")\n async def log_api_call(request: Request, call_next): # type: ignore[no-untyped-def]\n started = time.monotonic()\n response = await call_next(request)\n response.headers[\"X-Response-Time-Ms\"] = str(int((time.monotonic() - started) * 1000))\n return response\n\n @app.get(\"/health\")\n async def health() -> JSONResponse:\n payload = await health_provider()\n status_code = 200 if payload.get(\"status\") == \"ok\" else 503\n return JSONResponse(content=payload, status_code=status_code)\n\n @app.get(\"/actions/{action}\")\n @app.post(\"/actions/{action}\")\n async def action(action: str, request: Request) -> JSONResponse:\n client_source = self._client_source(request)\n if action in {\"start\", \"stop\"}:\n LOGGER.warning(\"Control action requested: /actions/%s client=%s\", action, client_source)\n return await action_provider(action, client_source)\n\n return app\n\n def _client_source(self, request: Request) -> str:\n explicit_header = request.headers.get(\"X-Client-Source\", \"\").strip()\n if explicit_header:\n return explicit_header\n user_agent = request.headers.get(\"User-Agent\", \"\").strip()\n if user_agent:\n return f\"user-agent:{user_agent}\"\n return \"unknown\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_app.py:HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "retrieval_report": { + "executed_layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C4_SEMANTIC_ROLES": "vector", + "C3_ENTRYPOINTS": "vector", + "C2_DEPENDENCY_GRAPH": "vector", + "C1_SYMBOL_CATALOG": "vector", + "C0_SOURCE_CHUNKS": "vector" + }, + "top_k_by_layer": { + "C4_SEMANTIC_ROLES": 12, + "C3_ENTRYPOINTS": 8, + "C2_DEPENDENCY_GRAPH": 8, + "C1_SYMBOL_CATALOG": 6, + "C0_SOURCE_CHUNKS": 4 + }, + "filters_by_layer": { + "C4_SEMANTIC_ROLES": { + "path_scope": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [] + }, + "C1_SYMBOL_CATALOG": { + "path_scope": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [] + } + }, + "fallback": { + "used": false, + "reason": null + }, + "retrieval_by_layer_ms": { + "C4_SEMANTIC_ROLES": 28, + "C3_ENTRYPOINTS": 19, + "C2_DEPENDENCY_GRAPH": 54, + "C1_SYMBOL_CATALOG": 24, + "C0_SOURCE_CHUNKS": 15 + } + } + }, + "diagnostics": { + "intent_correct": null, + "target_found": true, + "layers_used": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ], + "retrieval_sufficient": true, + "answer_mode": "normal", + "router_result": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "ARCHITECTURE", + "path_scope": [], + "layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ], + "symbol_resolution_status": "pending" + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Какие компоненты участвуют в RuntimeManager?", + "sub_intent": "ARCHITECTURE", + "path_scope": [], + "requested_layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "C4_SEMANTIC_ROLES", + "hit_count": 12, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C3_ENTRYPOINTS", + "hit_count": 3, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 6, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 4, + "empty": false, + "fallback_used": false + } + ], + "empty_layers": [], + "evidence_gate_decision": { + "sufficient": true, + "failure_reasons": [], + "evidence_count": 33 + }, + "failure_reasons": [], + "timings_ms": {} + }, + "rag_rows": [ + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests manager\n- orchestrates role-like calls (4)\n- reads and writes state attributes\n- participates in dataflow slices (50)", + "layer": "C4_SEMANTIC_ROLES", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 43, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "symbol_name": "RuntimeManager", + "qname": "RuntimeManager", + "role": "pipeline_stage", + "confidence": 0.67, + "dataflow_participation": 50, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/queue/in_memory.py", + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)", + "layer": "C4_SEMANTIC_ROLES", + "title": "InMemoryTaskQueue", + "span_start": 9, + "span_end": 38, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 22, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "2da04cb94544a3bcbf0943a95ad4bdd8710bcafaa32a02fd0e4de2178dcf3533", + "symbol_name": "InMemoryTaskQueue", + "qname": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 9, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "58f0cc001ccda0eee4c6bc32ed83bd05eafd6b6644f1e8b4aa9eed3103db73dc", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "ConfigFileLoader\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (8)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ConfigFileLoader", + "span_start": 11, + "span_end": 48, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 23, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "a8474eca8b6e9dc86ae67ed68b16fa5fb639ef08739c053e7b7195489765667f", + "symbol_name": "ConfigFileLoader", + "qname": "ConfigFileLoader", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 8, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/store.py", + "content": "TraceContextStore\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "TraceContextStore", + "span_start": 15, + "span_end": 52, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b2dad4fbe16ffb11b58deba311c7739955c39d59f291b22181f33e9c8cce4059", + "symbol_name": "TraceContextStore", + "qname": "TraceContextStore", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "d369554f08fc92039c6edd5a2a1e73b23901533e8974459170bbd9347d263dc5", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workers/supervisor.py", + "content": "WorkerSupervisor\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkerSupervisor", + "span_start": 10, + "span_end": 59, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "c17b44e8d9e97d490989b21fa67d7c346cdda8a0472e4c41fb243c8846faa124", + "symbol_name": "WorkerSupervisor", + "qname": "WorkerSupervisor", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "77609d9d5927171cce7fc3a54897c183fd63068710c6362029b700937aae5eee", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 59, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1", + "dst_ref": "RuntimeManager.start", + "resolution": "resolved", + "slice_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.start" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 52, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager._register_core_services", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 127, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6", + "dst_ref": "RuntimeManager._register_core_services", + "resolution": "resolved", + "slice_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager._register_core_services" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/__init__.py", + "content": "const RuntimeManager\nRuntimeManager = plba.core.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 16, + "span_end": 16, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "7eacec84f9b8d6c4201374591faecdac7493091c263681495c338973f2971ad9", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = plba.core.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/core.py", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 2, + "span_end": 2, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "e1684562d978b7af7fe9b27dc5869d770348a87b5dc19a50360f58544668578b", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.core", + "is_test": false, + "blob_sha": "c0ae25110d20e665216616e26b68adfe035b624ba45d31d1272fb21f906f9ca8", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 9, + "span_end": 9, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "62a9575c77aad894120d18b4f2a08cf2ba42f77e9be4a8a432b767d157701afe", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager\nRuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "qname": "RuntimeManager", + "kind": "class", + "signature": "RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 4, + "span_end": 4, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "27158ca220022eeb5083c6addf8a50775d45f7161284fd60aac48410105f4b98", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "const ControlChannel\nControlChannel = app_runtime.control.base.ControlChannel", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlChannel", + "span_start": 1, + "span_end": 1, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "268420f7aa4ed74082b9276cae0cded4f00bac090ffd58fa020a65be0fe19c27", + "qname": "ControlChannel", + "kind": "const", + "signature": "ControlChannel = app_runtime.control.base.ControlChannel", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlChannel(ABC):\n @abstractmethod\n async def start(self, actions: ControlActionSet) -> None:\n \"\"\"Start the control channel and bind handlers.\"\"\"\n\n @abstractmethod\n async def stop(self) -> None:\n \"\"\"Stop the control channel and release resources.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\"ControlActionSet\", \"ControlChannel\", \"ControlPlaneService\", \"HttpControlChannel\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/__init__.py:1-5", + "span_start": 1, + "span_end": 5, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlActionSet:\n health: HealthHandler\n start: ActionHandler\n stop: ActionHandler\n status: ActionHandler", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "class HttpControlAppFactory:\n def create(\n self,\n health_provider: Callable[[], Awaitable[HealthPayload]],\n action_provider: Callable[[str, str], Awaitable[JSONResponse]],\n ) -> FastAPI:\n app = FastAPI(title=\"PLBA Control API\")\n\n @app.middleware(\"http\")\n async def log_api_call(request: Request, call_next): # type: ignore[no-untyped-def]\n started = time.monotonic()\n response = await call_next(request)\n response.headers[\"X-Response-Time-Ms\"] = str(int((time.monotonic() - started) * 1000))\n return response\n\n @app.get(\"/health\")\n async def health() -> JSONResponse:\n payload = await health_provider()\n status_code = 200 if payload.get(\"status\") == \"ok\" else 503\n return JSONResponse(content=payload, status_code=status_code)\n\n @app.get(\"/actions/{action}\")\n @app.post(\"/actions/{action}\")\n async def action(action: str, request: Request) -> JSONResponse:\n client_source = self._client_source(request)\n if action in {\"start\", \"stop\"}:\n LOGGER.warning(\"Control action requested: /actions/%s client=%s\", action, client_source)\n return await action_provider(action, client_source)\n\n return app\n\n def _client_source(self, request: Request) -> str:\n explicit_header = request.headers.get(\"X-Client-Source\", \"\").strip()\n if explicit_header:\n return explicit_header\n user_agent = request.headers.get(\"User-Agent\", \"\").strip()\n if user_agent:\n return f\"user-agent:{user_agent}\"\n return \"unknown\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_app.py:HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "validation": { + "passed": true, + "action": "return", + "reasons": [] + } + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-architecture-runtime-manager.md b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-architecture-runtime-manager.md new file mode 100644 index 0000000..35c56ff --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-architecture-runtime-manager.md @@ -0,0 +1,34 @@ +# plba-v2-architecture-runtime-manager + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: agent_runtime +- mode: full_chain +- passed: True + +## Query +Какие компоненты участвуют в RuntimeManager? + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "ARCHITECTURE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 33, + "llm_answer": "### Подтвержденные Связи\n\n1. **RuntimeManager**:\n - Является ключевым компонентом управления жизненным циклом приложения.\n - Инициализирует и управляет другими компонентами системы через метод `__init__`.\n \n2. **ControlPlaneService**:\n - Управляет каналами контроля.\n - Вызывается из метода инициализации `RuntimeManager` для регистрации каналов.\n\n3. **ControlChannel**:\n - Абстрактный класс для реализации конкретных каналов контроля.\n - Реализует методы `start` и `stop`, которые вызываются сервисами и менеджерами.\n\n4. **ConfigFileLoader**:\n - Загружает конфигурационные файлы и передает их в runtime-менеджер.\n\n5. **WorkflowPersistence**:\n - Обеспечивает сохранение информации о workflows.\n\n6. **InMemoryTaskQueue**:\n - Используется для хранения задач внутри памяти.\n\n7. **TraceContextStore**:\n - Хранит контекст трассировки.\n\n8. **WorkerSupervisor**:\n - Наблюдает за рабочими процессами и управляет ими.\n\n### Роли Компонентов\n\n1. **RuntimeManager**:\n - Координирует работу всех других компонентов.\n - Читает и записывает состояние атрибутов.\n - Участвует в управлении данными потока.\n\n2. **ControlPlaneService**:\n - Регистрирует каналы контроля.\n - Начинает и останавливает службы контроля.\n\n3. **ControlChannel**:\n - Осуществляет управление каналами взаимодействия между приложением и внешними системами.\n\n4. **ConfigFileLoader**:\n - Чтение конфигурации из файлов.\n\n5. **WorkflowPersistence**:\n - Сохраняет информацию о workflows.\n\n6. **InMemoryTaskQueue**:\n - Хранение данных задачи во временной памяти.\n\n7. **TraceContextStore**:\n - Управление контекстом трассировки.\n\n8. **WorkerSupervisor**:\n - Контроль рабочих процессов.\n\n### Ограничения Контекста\n\n1. **Dataflow Slices**:\n - Все перечисленные компоненты активно участвуют в обработке данных потоков.\n\n2. **State Attributes**:\n - Большинство компонентов читают или записывают состояние атрибутов системы.\n\nТаким образом, RuntimeManager является центральным управляющим элементом архитектуры, координирующим работу остальных компонентов.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-explain-create-runtime.json b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-explain-create-runtime.json new file mode 100644 index 0000000..5296731 --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-explain-create-runtime.json @@ -0,0 +1,3779 @@ +{ + "case_id": "plba-v2-explain-create-runtime", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "agent_runtime", + "mode": "full_chain", + "query": "Что делает функция create_runtime?", + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 33, + "llm_answer": "Функция `create_runtime` инициализирует и настраивает менеджер выполнения приложения.\n\n**Ключевые шаги:**\n1. Создает экземпляр менеджера выполнения (`RuntimeManager`).\n2. При наличии указанного пути к конфигурационному файлу добавляет его в менеджер.\n3. Если включена опция HTTP-контроля, регистрирует канал управления с указанными параметрами хоста, порта и тайм-аута.\n4. Регистрирует указанный модуль приложения в менеджере.\n5. Возвращает созданный менеджер выполнения.\n\n**Опорные файлы:**\n- `src/plba/bootstrap.py:8-29`", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "create_runtime" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "query": "Что делает функция create_runtime?", + "router_result": { + "schema_version": "1.1", + "intent": "CODE_QA", + "retrieval_profile": "code", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query_plan": { + "raw": "Что делает функция create_runtime?", + "normalized": "Что делает функция create_runtime?", + "sub_intent": "EXPLAIN", + "negations": [], + "expansions": [ + "function", + "create_runtime" + ], + "keyword_hints": [ + "create_runtime" + ], + "path_hints": [], + "doc_scope_hints": [], + "symbol_candidates": [ + "create_runtime" + ], + "symbol_kind_hint": "function", + "anchors": [ + { + "type": "SYMBOL", + "value": "create_runtime", + "source": "user_text", + "subtype": null, + "span": { + "start": 19, + "end": 33 + }, + "confidence": 0.88 + }, + { + "type": "KEY_TERM", + "value": "функция", + "source": "user_text", + "subtype": null, + "span": { + "start": 11, + "end": 18 + }, + "confidence": 0.9 + } + ] + }, + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "top_k": 8 + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 8 + }, + { + "layer_id": "C4_SEMANTIC_ROLES", + "top_k": 8 + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "top_k": 6 + }, + { + "layer_id": "C3_ENTRYPOINTS", + "top_k": 6 + } + ], + "filters": { + "test_policy": "EXCLUDE", + "path_scope": [], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + }, + "symbol_resolution": { + "status": "pending", + "resolved_symbol": null, + "alternatives": [ + "create_runtime" + ], + "confidence": 0.0 + }, + "evidence_policy": { + "require_def": true, + "require_flow": true, + "require_spec": false, + "allow_answer_without_evidence": false + } + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Что делает функция create_runtime?", + "sub_intent": "EXPLAIN", + "path_scope": [], + "keyword_hints": [ + "create_runtime" + ], + "symbol_candidates": [ + "create_runtime" + ], + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "top_k": 8 + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 8 + }, + { + "layer_id": "C4_SEMANTIC_ROLES", + "top_k": 8 + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "top_k": 6 + }, + { + "layer_id": "C3_ENTRYPOINTS", + "top_k": 6 + } + ], + "filters": { + "test_policy": "EXCLUDE", + "path_scope": [], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + }, + "query_plan": { + "raw": "Что делает функция create_runtime?", + "normalized": "Что делает функция create_runtime?", + "sub_intent": "EXPLAIN", + "negations": [], + "expansions": [ + "function", + "create_runtime" + ], + "keyword_hints": [ + "create_runtime" + ], + "path_hints": [], + "doc_scope_hints": [], + "symbol_candidates": [ + "create_runtime" + ], + "symbol_kind_hint": "function", + "anchors": [ + { + "type": "SYMBOL", + "value": "create_runtime", + "source": "user_text", + "subtype": null, + "span": { + "start": 19, + "end": 33 + }, + "confidence": 0.88 + }, + { + "type": "KEY_TERM", + "value": "функция", + "source": "user_text", + "subtype": null, + "span": { + "start": 11, + "end": 18 + }, + "confidence": 0.9 + } + ] + } + }, + "retrieval_result": { + "target_symbol_candidates": [ + "create_runtime", + "annotations", + "json", + "Path", + "Any", + "yaml", + "hashlib" + ], + "resolved_symbol": "create_runtime", + "symbol_resolution_status": "resolved", + "file_candidates": [ + "src/plba/__init__.py", + "src/plba/bootstrap.py", + "src/app_runtime/config/file_loader.py", + "src/app_runtime/config/__init__.py", + "src/app_runtime/config/providers.py", + "src/app_runtime/contracts/__init__.py", + "src/app_runtime/contracts/application.py", + "src/app_runtime/__init__.py", + "src/app_runtime/control/http_runner.py", + "src/app_runtime/workflow/persistence/workflow_persistence.py", + "src/app_runtime/control/http_channel.py", + "src/app_runtime/queue/in_memory.py", + "src/app_runtime/workers/supervisor.py", + "src/app_runtime/workflow/engine/workflow_engine.py", + "src/app_runtime/tracing/store.py", + "src/app_runtime/control/http_app.py" + ], + "code_chunks": [ + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/plba/__init__.py", + "title": "create_runtime", + "content": "const create_runtime\ncreate_runtime = plba.bootstrap.create_runtime", + "start_line": 1, + "end_line": 1, + "metadata": { + "symbol_id": "fa1e84f16c8c659bcd5448637386af4d15d431064e07714e34689ee64233cb51", + "qname": "create_runtime", + "kind": "const", + "signature": "create_runtime = plba.bootstrap.create_runtime", + "parent_symbol_id": null, + "package_or_module": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/plba/bootstrap.py", + "title": "create_runtime", + "content": "function create_runtime\ncreate_runtime(module)", + "start_line": 8, + "end_line": 29, + "metadata": { + "symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "qname": "create_runtime", + "kind": "function", + "signature": "create_runtime(module)", + "parent_symbol_id": null, + "package_or_module": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/config/file_loader.py", + "title": "annotations", + "content": "const annotations\nannotations = __future__.annotations", + "start_line": 1, + "end_line": 1, + "metadata": { + "symbol_id": "5ed640ccec43a78659d50ec24f3717bf1144a182c22588f37456649ac6a4a815", + "qname": "annotations", + "kind": "const", + "signature": "annotations = __future__.annotations", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/config/file_loader.py", + "title": "json", + "content": "const json\nimport json", + "start_line": 4, + "end_line": 4, + "metadata": { + "symbol_id": "bb9e2eaf992bfd050f7072d72eed87c55b1a4b001daa034a0f7c630a61bb1d78", + "qname": "json", + "kind": "const", + "signature": "import json", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/config/file_loader.py", + "title": "Path", + "content": "const Path\nPath = pathlib.Path", + "start_line": 5, + "end_line": 5, + "metadata": { + "symbol_id": "b785967ed1fb83aa62d5724c6d6e9c6d2b1505523db39bd941cc39b48db48306", + "qname": "Path", + "kind": "const", + "signature": "Path = pathlib.Path", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/config/file_loader.py", + "title": "Any", + "content": "const Any\nAny = typing.Any", + "start_line": 6, + "end_line": 6, + "metadata": { + "symbol_id": "8e330833b8073585db1c4b4315947c400683a23e4c3d2e2ccbcb260f347541b6", + "qname": "Any", + "kind": "const", + "signature": "Any = typing.Any", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/config/file_loader.py", + "title": "yaml", + "content": "const yaml\nimport yaml", + "start_line": 8, + "end_line": 8, + "metadata": { + "symbol_id": "223502bbfc2b82aea662f7466403cc99a3cd44f1b0507d637cd674874f751e4f", + "qname": "yaml", + "kind": "const", + "signature": "import yaml", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/config/file_loader.py", + "title": "hashlib", + "content": "const hashlib\nimport hashlib", + "start_line": 3, + "end_line": 3, + "metadata": { + "symbol_id": "e7375824bd473da3d73d316d22e3cb6428930e2db1ffbd900ce5a8b88427bf05", + "qname": "hashlib", + "kind": "const", + "signature": "import hashlib", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/plba/__init__.py", + "title": "src/plba/__init__.py:1-69", + "content": "from plba.bootstrap import create_runtime\nfrom plba.config import ConfigFileLoader, FileConfigProvider\nfrom plba.control import ControlActionSet, ControlChannel, ControlPlaneService, HttpControlChannel\nfrom plba.contracts import (\n ApplicationModule,\n ConfigProvider,\n HealthContributor,\n TraceContext,\n TraceContextRecord,\n TraceLogMessage,\n TraceTransport,\n Worker,\n WorkerHealth,\n WorkerStatus,\n)\nfrom plba.core import ConfigurationManager, RuntimeManager, ServiceContainer\nfrom plba.health import HealthRegistry\nfrom plba.logging import LogManager\nfrom plba.queue import InMemoryTaskQueue\nfrom plba.tracing import MySqlTraceTransport, NoOpTraceTransport, TraceService\nfrom plba.workflow import (\n StepResult,\n WorkflowContext,\n WorkflowDefinition,\n WorkflowEngine,\n WorkflowEngineHooks,\n WorkflowNode,\n WorkflowRuntimeFactory,\n WorkflowStep,\n)\nfrom plba.workers import WorkerSupervisor\n\n__all__ = [\n \"ApplicationModule\",\n \"ConfigFileLoader\",\n \"ConfigProvider\",\n \"ConfigurationManager\",\n \"ControlActionSet\",\n \"ControlChannel\",\n \"ControlPlaneService\",\n \"create_runtime\",\n \"FileConfigProvider\",\n \"HealthContributor\",\n \"HealthRegistry\",\n \"HttpControlChannel\",\n \"InMemoryTaskQueue\",\n \"LogManager\",\n \"MySqlTraceTransport\",\n \"NoOpTraceTransport\",\n \"RuntimeManager\",\n \"ServiceContainer\",\n \"TraceContext\",\n \"TraceContextRecord\",\n \"TraceLogMessage\",\n \"TraceService\",\n \"TraceTransport\",\n \"StepResult\",\n \"Worker\",\n \"WorkerHealth\",\n \"WorkerStatus\",\n \"WorkflowContext\",\n \"WorkflowDefinition\",\n \"WorkflowEngine\",\n \"WorkflowEngineHooks\",\n \"WorkflowNode\",\n \"WorkflowRuntimeFactory\",\n \"WorkflowStep\",\n \"WorkerSupervisor\",\n]", + "start_line": 1, + "end_line": 69, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/plba/bootstrap.py", + "title": "src/plba/bootstrap.py:create_runtime", + "content": "def create_runtime(\n module: ApplicationModule,\n *,\n config_path: str | None = None,\n enable_http_control: bool = False,\n control_host: str = \"127.0.0.1\",\n control_port: int = 8080,\n control_timeout: int = 5,\n) -> RuntimeManager:\n runtime = RuntimeManager()\n if config_path is not None:\n runtime.add_config_file(config_path)\n if enable_http_control:\n runtime.control_plane.register_channel(\n HttpControlChannel(\n host=control_host,\n port=control_port,\n timeout=control_timeout,\n )\n )\n runtime.register_module(module)\n return runtime", + "start_line": 8, + "end_line": 29, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/config/__init__.py", + "title": "src/app_runtime/config/__init__.py:1-4", + "content": "from app_runtime.config.file_loader import ConfigFileLoader\nfrom app_runtime.config.providers import FileConfigProvider\n\n__all__ = [\"ConfigFileLoader\", \"FileConfigProvider\"]", + "start_line": 1, + "end_line": 4, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.config.__init__", + "is_test": false, + "blob_sha": "612918029820a2a983330ec92256142b55b9de4bdf3399ece18e2a02dbad9729", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/config/file_loader.py", + "title": "src/app_runtime/config/file_loader.py:ConfigFileLoader", + "content": "class ConfigFileLoader:\n def __init__(self, path: str | Path) -> None:\n self.path = Path(path)\n self.config: Any = None\n self.last_valid_config: Any = None\n self._last_seen_hash: str | None = None\n\n def read_text(self) -> str:\n return self.path.read_text(encoding=\"utf-8\")\n\n def parse(self, data: str) -> Any:\n suffix = self.path.suffix.lower()\n if suffix in {\".yml\", \".yaml\"}:\n return yaml.safe_load(data)\n return json.loads(data)\n\n def load_sync(self) -> Any:\n data = self.read_text()\n parsed = self.parse(data)\n self.config = parsed\n self.last_valid_config = parsed\n self._last_seen_hash = self._calculate_hash(data)\n return parsed\n\n def load_if_changed(self) -> tuple[bool, Any]:\n data = self.read_text()\n current_hash = self._calculate_hash(data)\n if current_hash == self._last_seen_hash:\n return False, self.config\n parsed = self.parse(data)\n self.config = parsed\n self.last_valid_config = parsed\n self._last_seen_hash = current_hash\n return True, parsed\n\n @staticmethod\n def _calculate_hash(data: str) -> str:\n return hashlib.sha256(data.encode(\"utf-8\")).hexdigest()", + "start_line": 11, + "end_line": 48, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/config/providers.py", + "title": "src/app_runtime/config/providers.py:FileConfigProvider", + "content": "class FileConfigProvider(ConfigProvider):\n def __init__(self, path: str | Path) -> None:\n self._loader = ConfigFileLoader(path)\n\n @property\n def loader(self) -> ConfigFileLoader:\n return self._loader\n\n def load(self) -> dict[str, Any]:\n config = self._loader.load_sync()\n if not isinstance(config, dict):\n raise TypeError(\"Config root must be a mapping\")\n return dict(config)", + "start_line": 10, + "end_line": 22, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.config.providers", + "is_test": false, + "blob_sha": "8c53ca0122d6df6c5763bca15e99434bb4daebd5a618b8fc927e9ae90b022e64", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/contracts/__init__.py", + "title": "src/app_runtime/__init__.py:1-1", + "content": "__all__: list[str] = []", + "start_line": 1, + "end_line": 1, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.__init__", + "is_test": false, + "blob_sha": "8eea9df4f6d7b38ca0e39ccc27b04700e3d08dbeec8046d613d22706d19985fa", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/contracts/application.py", + "title": "src/app_runtime/contracts/application.py:ApplicationModule", + "content": "class ApplicationModule(ABC):\n @property\n @abstractmethod\n def name(self) -> str:\n \"\"\"Module name used for runtime status and diagnostics.\"\"\"\n\n @abstractmethod\n def register(self, registry: ModuleRegistry) -> None:\n \"\"\"Register workers, services, and health contributors.\"\"\"", + "start_line": 8, + "end_line": 16, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.application", + "is_test": false, + "blob_sha": "197c35634dca49c352ce3f230295a485fbffb672ce7bb8c08e752bfdf61e7fa4", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/__init__.py", + "title": "src/app_runtime/__init__.py:1-1", + "content": "__all__: list[str] = []", + "start_line": 1, + "end_line": 1, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.__init__", + "is_test": false, + "blob_sha": "8eea9df4f6d7b38ca0e39ccc27b04700e3d08dbeec8046d613d22706d19985fa", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/http_runner.py", + "title": "UvicornThreadRunner", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "start_line": 10, + "end_line": 61, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "title": "WorkflowPersistence", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "start_line": 8, + "end_line": 54, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/http_channel.py", + "title": "HttpControlChannel", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "start_line": 12, + "end_line": 57, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/queue/in_memory.py", + "title": "InMemoryTaskQueue", + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)", + "start_line": 9, + "end_line": 38, + "metadata": { + "symbol_id": "2da04cb94544a3bcbf0943a95ad4bdd8710bcafaa32a02fd0e4de2178dcf3533", + "symbol_name": "InMemoryTaskQueue", + "qname": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 9, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "58f0cc001ccda0eee4c6bc32ed83bd05eafd6b6644f1e8b4aa9eed3103db73dc", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/config/file_loader.py", + "title": "ConfigFileLoader", + "content": "ConfigFileLoader\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (8)", + "start_line": 11, + "end_line": 48, + "metadata": { + "symbol_id": "a8474eca8b6e9dc86ae67ed68b16fa5fb639ef08739c053e7b7195489765667f", + "symbol_name": "ConfigFileLoader", + "qname": "ConfigFileLoader", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 8, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/workers/supervisor.py", + "title": "WorkerSupervisor", + "content": "WorkerSupervisor\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "start_line": 10, + "end_line": 59, + "metadata": { + "symbol_id": "c17b44e8d9e97d490989b21fa67d7c346cdda8a0472e4c41fb243c8846faa124", + "symbol_name": "WorkerSupervisor", + "qname": "WorkerSupervisor", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "77609d9d5927171cce7fc3a54897c183fd63068710c6362029b700937aae5eee", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "title": "WorkflowEngine", + "content": "WorkflowEngine\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "start_line": 10, + "end_line": 86, + "metadata": { + "symbol_id": "57ec0a9f11c542c78e008684a888397e8d9ef4223671acb2567e631a0cbc70b4", + "symbol_name": "WorkflowEngine", + "qname": "WorkflowEngine", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/tracing/store.py", + "title": "TraceContextStore", + "content": "TraceContextStore\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "start_line": 15, + "end_line": 52, + "metadata": { + "symbol_id": "b2dad4fbe16ffb11b58deba311c7739955c39d59f291b22181f33e9c8cce4059", + "symbol_name": "TraceContextStore", + "qname": "TraceContextStore", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "d369554f08fc92039c6edd5a2a1e73b23901533e8974459170bbd9347d263dc5", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/plba/bootstrap.py", + "title": "create_runtime:calls", + "content": "create_runtime calls runtime.add_config_file", + "start_line": 19, + "end_line": 19, + "metadata": { + "edge_id": "4eaeec4ac55a59d5f66fd01c4754955f8fedaf4bc3df13fa769b352c7bfaacbb", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.add_config_file", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/plba/bootstrap.py", + "title": "create_runtime:reads_attr", + "content": "create_runtime reads_attr runtime.register_module", + "start_line": 28, + "end_line": 28, + "metadata": { + "edge_id": "45516c79ff358dbf9b650a081668df0f66d2fe989300f985a1a78be6be166f8f", + "edge_type": "reads_attr", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.register_module", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/plba/bootstrap.py", + "title": "create_runtime:instantiates", + "content": "create_runtime instantiates RuntimeManager", + "start_line": 17, + "end_line": 17, + "metadata": { + "edge_id": "0adba17984f850ea1608c9e734d2dd5c325cfde3a8133123aa239e44935ad18e", + "edge_type": "instantiates", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": "27158ca220022eeb5083c6addf8a50775d45f7161284fd60aac48410105f4b98", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/plba/bootstrap.py", + "title": "create_runtime:calls", + "content": "create_runtime calls runtime.register_module", + "start_line": 28, + "end_line": 28, + "metadata": { + "edge_id": "ab6003c3441addc1ba1b81edeca009165559f652f6b2cf424e5ae61b1f617de8", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.register_module", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/plba/bootstrap.py", + "title": "create_runtime:calls", + "content": "create_runtime calls runtime.control_plane.register_channel", + "start_line": 21, + "end_line": 27, + "metadata": { + "edge_id": "2678250030b9ce47a3b3b55fac7897ac530367edc8374ac9d5e6ecafb1e483f0", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.control_plane.register_channel", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/plba/bootstrap.py", + "title": "create_runtime:reads_attr", + "content": "create_runtime reads_attr runtime.add_config_file", + "start_line": 19, + "end_line": 19, + "metadata": { + "edge_id": "30d4e8aae984ab84d523e80d02f1caeda52d547fa3d2aa47be8845931cabbca2", + "edge_type": "reads_attr", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.add_config_file", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C3_ENTRYPOINTS", + "path": "src/app_runtime/control/http_app.py", + "title": "app.post", + "content": "fastapi http app.post", + "start_line": 38, + "end_line": 42, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C3_ENTRYPOINTS", + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "content": "fastapi http app.get", + "start_line": 31, + "end_line": 34, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C3_ENTRYPOINTS", + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "content": "fastapi http app.get", + "start_line": 38, + "end_line": 42, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "relations": [ + { + "path": "src/plba/bootstrap.py", + "metadata": { + "edge_id": "4eaeec4ac55a59d5f66fd01c4754955f8fedaf4bc3df13fa769b352c7bfaacbb", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.add_config_file", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "create_runtime calls runtime.add_config_file" + }, + { + "path": "src/plba/bootstrap.py", + "metadata": { + "edge_id": "45516c79ff358dbf9b650a081668df0f66d2fe989300f985a1a78be6be166f8f", + "edge_type": "reads_attr", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.register_module", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "create_runtime reads_attr runtime.register_module" + }, + { + "path": "src/plba/bootstrap.py", + "metadata": { + "edge_id": "0adba17984f850ea1608c9e734d2dd5c325cfde3a8133123aa239e44935ad18e", + "edge_type": "instantiates", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": "27158ca220022eeb5083c6addf8a50775d45f7161284fd60aac48410105f4b98", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "create_runtime instantiates RuntimeManager" + }, + { + "path": "src/plba/bootstrap.py", + "metadata": { + "edge_id": "ab6003c3441addc1ba1b81edeca009165559f652f6b2cf424e5ae61b1f617de8", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.register_module", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "create_runtime calls runtime.register_module" + }, + { + "path": "src/plba/bootstrap.py", + "metadata": { + "edge_id": "2678250030b9ce47a3b3b55fac7897ac530367edc8374ac9d5e6ecafb1e483f0", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.control_plane.register_channel", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "create_runtime calls runtime.control_plane.register_channel" + }, + { + "path": "src/plba/bootstrap.py", + "metadata": { + "edge_id": "30d4e8aae984ab84d523e80d02f1caeda52d547fa3d2aa47be8845931cabbca2", + "edge_type": "reads_attr", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.add_config_file", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "create_runtime reads_attr runtime.add_config_file" + } + ], + "entrypoints": [ + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.post", + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "test_candidates": [], + "layer_outcomes": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C4_SEMANTIC_ROLES", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 6, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C3_ENTRYPOINTS", + "hit_count": 3, + "empty": false, + "fallback_used": false + } + ], + "missing_layers": [], + "raw_rows": [ + { + "path": "src/plba/__init__.py", + "content": "const create_runtime\ncreate_runtime = plba.bootstrap.create_runtime", + "layer": "C1_SYMBOL_CATALOG", + "title": "create_runtime", + "span_start": 1, + "span_end": 1, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "fa1e84f16c8c659bcd5448637386af4d15d431064e07714e34689ee64233cb51", + "qname": "create_runtime", + "kind": "const", + "signature": "create_runtime = plba.bootstrap.create_runtime", + "parent_symbol_id": null, + "package_or_module": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "function create_runtime\ncreate_runtime(module)", + "layer": "C1_SYMBOL_CATALOG", + "title": "create_runtime", + "span_start": 8, + "span_end": 29, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "qname": "create_runtime", + "kind": "function", + "signature": "create_runtime(module)", + "parent_symbol_id": null, + "package_or_module": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "const annotations\nannotations = __future__.annotations", + "layer": "C1_SYMBOL_CATALOG", + "title": "annotations", + "span_start": 1, + "span_end": 1, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "5ed640ccec43a78659d50ec24f3717bf1144a182c22588f37456649ac6a4a815", + "qname": "annotations", + "kind": "const", + "signature": "annotations = __future__.annotations", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "const json\nimport json", + "layer": "C1_SYMBOL_CATALOG", + "title": "json", + "span_start": 4, + "span_end": 4, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "bb9e2eaf992bfd050f7072d72eed87c55b1a4b001daa034a0f7c630a61bb1d78", + "qname": "json", + "kind": "const", + "signature": "import json", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "const Path\nPath = pathlib.Path", + "layer": "C1_SYMBOL_CATALOG", + "title": "Path", + "span_start": 5, + "span_end": 5, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "b785967ed1fb83aa62d5724c6d6e9c6d2b1505523db39bd941cc39b48db48306", + "qname": "Path", + "kind": "const", + "signature": "Path = pathlib.Path", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "const Any\nAny = typing.Any", + "layer": "C1_SYMBOL_CATALOG", + "title": "Any", + "span_start": 6, + "span_end": 6, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "8e330833b8073585db1c4b4315947c400683a23e4c3d2e2ccbcb260f347541b6", + "qname": "Any", + "kind": "const", + "signature": "Any = typing.Any", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "const yaml\nimport yaml", + "layer": "C1_SYMBOL_CATALOG", + "title": "yaml", + "span_start": 8, + "span_end": 8, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "223502bbfc2b82aea662f7466403cc99a3cd44f1b0507d637cd674874f751e4f", + "qname": "yaml", + "kind": "const", + "signature": "import yaml", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "const hashlib\nimport hashlib", + "layer": "C1_SYMBOL_CATALOG", + "title": "hashlib", + "span_start": 3, + "span_end": 3, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "e7375824bd473da3d73d316d22e3cb6428930e2db1ffbd900ce5a8b88427bf05", + "qname": "hashlib", + "kind": "const", + "signature": "import hashlib", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/__init__.py", + "content": "from plba.bootstrap import create_runtime\nfrom plba.config import ConfigFileLoader, FileConfigProvider\nfrom plba.control import ControlActionSet, ControlChannel, ControlPlaneService, HttpControlChannel\nfrom plba.contracts import (\n ApplicationModule,\n ConfigProvider,\n HealthContributor,\n TraceContext,\n TraceContextRecord,\n TraceLogMessage,\n TraceTransport,\n Worker,\n WorkerHealth,\n WorkerStatus,\n)\nfrom plba.core import ConfigurationManager, RuntimeManager, ServiceContainer\nfrom plba.health import HealthRegistry\nfrom plba.logging import LogManager\nfrom plba.queue import InMemoryTaskQueue\nfrom plba.tracing import MySqlTraceTransport, NoOpTraceTransport, TraceService\nfrom plba.workflow import (\n StepResult,\n WorkflowContext,\n WorkflowDefinition,\n WorkflowEngine,\n WorkflowEngineHooks,\n WorkflowNode,\n WorkflowRuntimeFactory,\n WorkflowStep,\n)\nfrom plba.workers import WorkerSupervisor\n\n__all__ = [\n \"ApplicationModule\",\n \"ConfigFileLoader\",\n \"ConfigProvider\",\n \"ConfigurationManager\",\n \"ControlActionSet\",\n \"ControlChannel\",\n \"ControlPlaneService\",\n \"create_runtime\",\n \"FileConfigProvider\",\n \"HealthContributor\",\n \"HealthRegistry\",\n \"HttpControlChannel\",\n \"InMemoryTaskQueue\",\n \"LogManager\",\n \"MySqlTraceTransport\",\n \"NoOpTraceTransport\",\n \"RuntimeManager\",\n \"ServiceContainer\",\n \"TraceContext\",\n \"TraceContextRecord\",\n \"TraceLogMessage\",\n \"TraceService\",\n \"TraceTransport\",\n \"StepResult\",\n \"Worker\",\n \"WorkerHealth\",\n \"WorkerStatus\",\n \"WorkflowContext\",\n \"WorkflowDefinition\",\n \"WorkflowEngine\",\n \"WorkflowEngineHooks\",\n \"WorkflowNode\",\n \"WorkflowRuntimeFactory\",\n \"WorkflowStep\",\n \"WorkerSupervisor\",\n]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/__init__.py:1-69", + "span_start": 1, + "span_end": 69, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "def create_runtime(\n module: ApplicationModule,\n *,\n config_path: str | None = None,\n enable_http_control: bool = False,\n control_host: str = \"127.0.0.1\",\n control_port: int = 8080,\n control_timeout: int = 5,\n) -> RuntimeManager:\n runtime = RuntimeManager()\n if config_path is not None:\n runtime.add_config_file(config_path)\n if enable_http_control:\n runtime.control_plane.register_channel(\n HttpControlChannel(\n host=control_host,\n port=control_port,\n timeout=control_timeout,\n )\n )\n runtime.register_module(module)\n return runtime", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/bootstrap.py:create_runtime", + "span_start": 8, + "span_end": 29, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/__init__.py", + "content": "from app_runtime.config.file_loader import ConfigFileLoader\nfrom app_runtime.config.providers import FileConfigProvider\n\n__all__ = [\"ConfigFileLoader\", \"FileConfigProvider\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/config/__init__.py:1-4", + "span_start": 1, + "span_end": 4, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.config.__init__", + "is_test": false, + "blob_sha": "612918029820a2a983330ec92256142b55b9de4bdf3399ece18e2a02dbad9729", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "class ConfigFileLoader:\n def __init__(self, path: str | Path) -> None:\n self.path = Path(path)\n self.config: Any = None\n self.last_valid_config: Any = None\n self._last_seen_hash: str | None = None\n\n def read_text(self) -> str:\n return self.path.read_text(encoding=\"utf-8\")\n\n def parse(self, data: str) -> Any:\n suffix = self.path.suffix.lower()\n if suffix in {\".yml\", \".yaml\"}:\n return yaml.safe_load(data)\n return json.loads(data)\n\n def load_sync(self) -> Any:\n data = self.read_text()\n parsed = self.parse(data)\n self.config = parsed\n self.last_valid_config = parsed\n self._last_seen_hash = self._calculate_hash(data)\n return parsed\n\n def load_if_changed(self) -> tuple[bool, Any]:\n data = self.read_text()\n current_hash = self._calculate_hash(data)\n if current_hash == self._last_seen_hash:\n return False, self.config\n parsed = self.parse(data)\n self.config = parsed\n self.last_valid_config = parsed\n self._last_seen_hash = current_hash\n return True, parsed\n\n @staticmethod\n def _calculate_hash(data: str) -> str:\n return hashlib.sha256(data.encode(\"utf-8\")).hexdigest()", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/config/file_loader.py:ConfigFileLoader", + "span_start": 11, + "span_end": 48, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/providers.py", + "content": "class FileConfigProvider(ConfigProvider):\n def __init__(self, path: str | Path) -> None:\n self._loader = ConfigFileLoader(path)\n\n @property\n def loader(self) -> ConfigFileLoader:\n return self._loader\n\n def load(self) -> dict[str, Any]:\n config = self._loader.load_sync()\n if not isinstance(config, dict):\n raise TypeError(\"Config root must be a mapping\")\n return dict(config)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/config/providers.py:FileConfigProvider", + "span_start": 10, + "span_end": 22, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.config.providers", + "is_test": false, + "blob_sha": "8c53ca0122d6df6c5763bca15e99434bb4daebd5a618b8fc927e9ae90b022e64", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/__init__.py", + "content": "__all__: list[str] = []", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/__init__.py:1-1", + "span_start": 1, + "span_end": 1, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.__init__", + "is_test": false, + "blob_sha": "8eea9df4f6d7b38ca0e39ccc27b04700e3d08dbeec8046d613d22706d19985fa", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/application.py", + "content": "class ApplicationModule(ABC):\n @property\n @abstractmethod\n def name(self) -> str:\n \"\"\"Module name used for runtime status and diagnostics.\"\"\"\n\n @abstractmethod\n def register(self, registry: ModuleRegistry) -> None:\n \"\"\"Register workers, services, and health contributors.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/contracts/application.py:ApplicationModule", + "span_start": 8, + "span_end": 16, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.application", + "is_test": false, + "blob_sha": "197c35634dca49c352ce3f230295a485fbffb672ce7bb8c08e752bfdf61e7fa4", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/__init__.py", + "content": "__all__: list[str] = []", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/__init__.py:1-1", + "span_start": 1, + "span_end": 1, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.__init__", + "is_test": false, + "blob_sha": "8eea9df4f6d7b38ca0e39ccc27b04700e3d08dbeec8046d613d22706d19985fa", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/queue/in_memory.py", + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)", + "layer": "C4_SEMANTIC_ROLES", + "title": "InMemoryTaskQueue", + "span_start": 9, + "span_end": 38, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 22, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "2da04cb94544a3bcbf0943a95ad4bdd8710bcafaa32a02fd0e4de2178dcf3533", + "symbol_name": "InMemoryTaskQueue", + "qname": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 9, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "58f0cc001ccda0eee4c6bc32ed83bd05eafd6b6644f1e8b4aa9eed3103db73dc", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "ConfigFileLoader\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (8)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ConfigFileLoader", + "span_start": 11, + "span_end": 48, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 23, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "a8474eca8b6e9dc86ae67ed68b16fa5fb639ef08739c053e7b7195489765667f", + "symbol_name": "ConfigFileLoader", + "qname": "ConfigFileLoader", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 8, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workers/supervisor.py", + "content": "WorkerSupervisor\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkerSupervisor", + "span_start": 10, + "span_end": 59, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "c17b44e8d9e97d490989b21fa67d7c346cdda8a0472e4c41fb243c8846faa124", + "symbol_name": "WorkerSupervisor", + "qname": "WorkerSupervisor", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "77609d9d5927171cce7fc3a54897c183fd63068710c6362029b700937aae5eee", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowEngine", + "span_start": 10, + "span_end": 86, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "57ec0a9f11c542c78e008684a888397e8d9ef4223671acb2567e631a0cbc70b4", + "symbol_name": "WorkflowEngine", + "qname": "WorkflowEngine", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/store.py", + "content": "TraceContextStore\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "TraceContextStore", + "span_start": 15, + "span_end": 52, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "b2dad4fbe16ffb11b58deba311c7739955c39d59f291b22181f33e9c8cce4059", + "symbol_name": "TraceContextStore", + "qname": "TraceContextStore", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "d369554f08fc92039c6edd5a2a1e73b23901533e8974459170bbd9347d263dc5", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime calls runtime.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:calls", + "span_start": 19, + "span_end": 19, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "4eaeec4ac55a59d5f66fd01c4754955f8fedaf4bc3df13fa769b352c7bfaacbb", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.add_config_file", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime reads_attr runtime.register_module", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:reads_attr", + "span_start": 28, + "span_end": 28, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "45516c79ff358dbf9b650a081668df0f66d2fe989300f985a1a78be6be166f8f", + "edge_type": "reads_attr", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.register_module", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:instantiates", + "span_start": 17, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "0adba17984f850ea1608c9e734d2dd5c325cfde3a8133123aa239e44935ad18e", + "edge_type": "instantiates", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": "27158ca220022eeb5083c6addf8a50775d45f7161284fd60aac48410105f4b98", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime calls runtime.register_module", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:calls", + "span_start": 28, + "span_end": 28, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "ab6003c3441addc1ba1b81edeca009165559f652f6b2cf424e5ae61b1f617de8", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.register_module", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime calls runtime.control_plane.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:calls", + "span_start": 21, + "span_end": 27, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "2678250030b9ce47a3b3b55fac7897ac530367edc8374ac9d5e6ecafb1e483f0", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.control_plane.register_channel", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime reads_attr runtime.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:reads_attr", + "span_start": 19, + "span_end": 19, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "30d4e8aae984ab84d523e80d02f1caeda52d547fa3d2aa47be8845931cabbca2", + "edge_type": "reads_attr", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.add_config_file", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": null, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": null, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": null, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "retrieval_report": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "vector", + "C0_SOURCE_CHUNKS": "vector", + "C4_SEMANTIC_ROLES": "vector", + "C2_DEPENDENCY_GRAPH": "vector", + "C3_ENTRYPOINTS": "vector" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [] + } + }, + "fallback": { + "used": false, + "reason": null + }, + "retrieval_by_layer_ms": { + "C1_SYMBOL_CATALOG": 41, + "C0_SOURCE_CHUNKS": 21, + "C4_SEMANTIC_ROLES": 17, + "C2_DEPENDENCY_GRAPH": 46, + "C3_ENTRYPOINTS": 13 + } + } + }, + "diagnostics": { + "intent_correct": null, + "target_found": true, + "layers_used": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_sufficient": true, + "answer_mode": "normal", + "router_result": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "EXPLAIN", + "path_scope": [], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_resolution_status": "pending" + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Что делает функция create_runtime?", + "sub_intent": "EXPLAIN", + "path_scope": [], + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C4_SEMANTIC_ROLES", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 6, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C3_ENTRYPOINTS", + "hit_count": 3, + "empty": false, + "fallback_used": false + } + ], + "empty_layers": [], + "evidence_gate_decision": { + "sufficient": true, + "failure_reasons": [], + "evidence_count": 33 + }, + "failure_reasons": [], + "timings_ms": {} + }, + "rag_rows": [ + { + "path": "src/plba/__init__.py", + "content": "const create_runtime\ncreate_runtime = plba.bootstrap.create_runtime", + "layer": "C1_SYMBOL_CATALOG", + "title": "create_runtime", + "span_start": 1, + "span_end": 1, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "fa1e84f16c8c659bcd5448637386af4d15d431064e07714e34689ee64233cb51", + "qname": "create_runtime", + "kind": "const", + "signature": "create_runtime = plba.bootstrap.create_runtime", + "parent_symbol_id": null, + "package_or_module": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "function create_runtime\ncreate_runtime(module)", + "layer": "C1_SYMBOL_CATALOG", + "title": "create_runtime", + "span_start": 8, + "span_end": 29, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "qname": "create_runtime", + "kind": "function", + "signature": "create_runtime(module)", + "parent_symbol_id": null, + "package_or_module": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "const annotations\nannotations = __future__.annotations", + "layer": "C1_SYMBOL_CATALOG", + "title": "annotations", + "span_start": 1, + "span_end": 1, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "5ed640ccec43a78659d50ec24f3717bf1144a182c22588f37456649ac6a4a815", + "qname": "annotations", + "kind": "const", + "signature": "annotations = __future__.annotations", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "const json\nimport json", + "layer": "C1_SYMBOL_CATALOG", + "title": "json", + "span_start": 4, + "span_end": 4, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "bb9e2eaf992bfd050f7072d72eed87c55b1a4b001daa034a0f7c630a61bb1d78", + "qname": "json", + "kind": "const", + "signature": "import json", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "const Path\nPath = pathlib.Path", + "layer": "C1_SYMBOL_CATALOG", + "title": "Path", + "span_start": 5, + "span_end": 5, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "b785967ed1fb83aa62d5724c6d6e9c6d2b1505523db39bd941cc39b48db48306", + "qname": "Path", + "kind": "const", + "signature": "Path = pathlib.Path", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "const Any\nAny = typing.Any", + "layer": "C1_SYMBOL_CATALOG", + "title": "Any", + "span_start": 6, + "span_end": 6, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "8e330833b8073585db1c4b4315947c400683a23e4c3d2e2ccbcb260f347541b6", + "qname": "Any", + "kind": "const", + "signature": "Any = typing.Any", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "const yaml\nimport yaml", + "layer": "C1_SYMBOL_CATALOG", + "title": "yaml", + "span_start": 8, + "span_end": 8, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "223502bbfc2b82aea662f7466403cc99a3cd44f1b0507d637cd674874f751e4f", + "qname": "yaml", + "kind": "const", + "signature": "import yaml", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "const hashlib\nimport hashlib", + "layer": "C1_SYMBOL_CATALOG", + "title": "hashlib", + "span_start": 3, + "span_end": 3, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "e7375824bd473da3d73d316d22e3cb6428930e2db1ffbd900ce5a8b88427bf05", + "qname": "hashlib", + "kind": "const", + "signature": "import hashlib", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/__init__.py", + "content": "from plba.bootstrap import create_runtime\nfrom plba.config import ConfigFileLoader, FileConfigProvider\nfrom plba.control import ControlActionSet, ControlChannel, ControlPlaneService, HttpControlChannel\nfrom plba.contracts import (\n ApplicationModule,\n ConfigProvider,\n HealthContributor,\n TraceContext,\n TraceContextRecord,\n TraceLogMessage,\n TraceTransport,\n Worker,\n WorkerHealth,\n WorkerStatus,\n)\nfrom plba.core import ConfigurationManager, RuntimeManager, ServiceContainer\nfrom plba.health import HealthRegistry\nfrom plba.logging import LogManager\nfrom plba.queue import InMemoryTaskQueue\nfrom plba.tracing import MySqlTraceTransport, NoOpTraceTransport, TraceService\nfrom plba.workflow import (\n StepResult,\n WorkflowContext,\n WorkflowDefinition,\n WorkflowEngine,\n WorkflowEngineHooks,\n WorkflowNode,\n WorkflowRuntimeFactory,\n WorkflowStep,\n)\nfrom plba.workers import WorkerSupervisor\n\n__all__ = [\n \"ApplicationModule\",\n \"ConfigFileLoader\",\n \"ConfigProvider\",\n \"ConfigurationManager\",\n \"ControlActionSet\",\n \"ControlChannel\",\n \"ControlPlaneService\",\n \"create_runtime\",\n \"FileConfigProvider\",\n \"HealthContributor\",\n \"HealthRegistry\",\n \"HttpControlChannel\",\n \"InMemoryTaskQueue\",\n \"LogManager\",\n \"MySqlTraceTransport\",\n \"NoOpTraceTransport\",\n \"RuntimeManager\",\n \"ServiceContainer\",\n \"TraceContext\",\n \"TraceContextRecord\",\n \"TraceLogMessage\",\n \"TraceService\",\n \"TraceTransport\",\n \"StepResult\",\n \"Worker\",\n \"WorkerHealth\",\n \"WorkerStatus\",\n \"WorkflowContext\",\n \"WorkflowDefinition\",\n \"WorkflowEngine\",\n \"WorkflowEngineHooks\",\n \"WorkflowNode\",\n \"WorkflowRuntimeFactory\",\n \"WorkflowStep\",\n \"WorkerSupervisor\",\n]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/__init__.py:1-69", + "span_start": 1, + "span_end": 69, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "def create_runtime(\n module: ApplicationModule,\n *,\n config_path: str | None = None,\n enable_http_control: bool = False,\n control_host: str = \"127.0.0.1\",\n control_port: int = 8080,\n control_timeout: int = 5,\n) -> RuntimeManager:\n runtime = RuntimeManager()\n if config_path is not None:\n runtime.add_config_file(config_path)\n if enable_http_control:\n runtime.control_plane.register_channel(\n HttpControlChannel(\n host=control_host,\n port=control_port,\n timeout=control_timeout,\n )\n )\n runtime.register_module(module)\n return runtime", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/bootstrap.py:create_runtime", + "span_start": 8, + "span_end": 29, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/__init__.py", + "content": "from app_runtime.config.file_loader import ConfigFileLoader\nfrom app_runtime.config.providers import FileConfigProvider\n\n__all__ = [\"ConfigFileLoader\", \"FileConfigProvider\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/config/__init__.py:1-4", + "span_start": 1, + "span_end": 4, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.config.__init__", + "is_test": false, + "blob_sha": "612918029820a2a983330ec92256142b55b9de4bdf3399ece18e2a02dbad9729", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "class ConfigFileLoader:\n def __init__(self, path: str | Path) -> None:\n self.path = Path(path)\n self.config: Any = None\n self.last_valid_config: Any = None\n self._last_seen_hash: str | None = None\n\n def read_text(self) -> str:\n return self.path.read_text(encoding=\"utf-8\")\n\n def parse(self, data: str) -> Any:\n suffix = self.path.suffix.lower()\n if suffix in {\".yml\", \".yaml\"}:\n return yaml.safe_load(data)\n return json.loads(data)\n\n def load_sync(self) -> Any:\n data = self.read_text()\n parsed = self.parse(data)\n self.config = parsed\n self.last_valid_config = parsed\n self._last_seen_hash = self._calculate_hash(data)\n return parsed\n\n def load_if_changed(self) -> tuple[bool, Any]:\n data = self.read_text()\n current_hash = self._calculate_hash(data)\n if current_hash == self._last_seen_hash:\n return False, self.config\n parsed = self.parse(data)\n self.config = parsed\n self.last_valid_config = parsed\n self._last_seen_hash = current_hash\n return True, parsed\n\n @staticmethod\n def _calculate_hash(data: str) -> str:\n return hashlib.sha256(data.encode(\"utf-8\")).hexdigest()", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/config/file_loader.py:ConfigFileLoader", + "span_start": 11, + "span_end": 48, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/providers.py", + "content": "class FileConfigProvider(ConfigProvider):\n def __init__(self, path: str | Path) -> None:\n self._loader = ConfigFileLoader(path)\n\n @property\n def loader(self) -> ConfigFileLoader:\n return self._loader\n\n def load(self) -> dict[str, Any]:\n config = self._loader.load_sync()\n if not isinstance(config, dict):\n raise TypeError(\"Config root must be a mapping\")\n return dict(config)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/config/providers.py:FileConfigProvider", + "span_start": 10, + "span_end": 22, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.config.providers", + "is_test": false, + "blob_sha": "8c53ca0122d6df6c5763bca15e99434bb4daebd5a618b8fc927e9ae90b022e64", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/__init__.py", + "content": "__all__: list[str] = []", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/__init__.py:1-1", + "span_start": 1, + "span_end": 1, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.__init__", + "is_test": false, + "blob_sha": "8eea9df4f6d7b38ca0e39ccc27b04700e3d08dbeec8046d613d22706d19985fa", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/application.py", + "content": "class ApplicationModule(ABC):\n @property\n @abstractmethod\n def name(self) -> str:\n \"\"\"Module name used for runtime status and diagnostics.\"\"\"\n\n @abstractmethod\n def register(self, registry: ModuleRegistry) -> None:\n \"\"\"Register workers, services, and health contributors.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/contracts/application.py:ApplicationModule", + "span_start": 8, + "span_end": 16, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.application", + "is_test": false, + "blob_sha": "197c35634dca49c352ce3f230295a485fbffb672ce7bb8c08e752bfdf61e7fa4", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/__init__.py", + "content": "__all__: list[str] = []", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/__init__.py:1-1", + "span_start": 1, + "span_end": 1, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.__init__", + "is_test": false, + "blob_sha": "8eea9df4f6d7b38ca0e39ccc27b04700e3d08dbeec8046d613d22706d19985fa", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/queue/in_memory.py", + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)", + "layer": "C4_SEMANTIC_ROLES", + "title": "InMemoryTaskQueue", + "span_start": 9, + "span_end": 38, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 22, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "2da04cb94544a3bcbf0943a95ad4bdd8710bcafaa32a02fd0e4de2178dcf3533", + "symbol_name": "InMemoryTaskQueue", + "qname": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 9, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "58f0cc001ccda0eee4c6bc32ed83bd05eafd6b6644f1e8b4aa9eed3103db73dc", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "ConfigFileLoader\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (8)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ConfigFileLoader", + "span_start": 11, + "span_end": 48, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 23, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "a8474eca8b6e9dc86ae67ed68b16fa5fb639ef08739c053e7b7195489765667f", + "symbol_name": "ConfigFileLoader", + "qname": "ConfigFileLoader", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 8, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workers/supervisor.py", + "content": "WorkerSupervisor\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkerSupervisor", + "span_start": 10, + "span_end": 59, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "c17b44e8d9e97d490989b21fa67d7c346cdda8a0472e4c41fb243c8846faa124", + "symbol_name": "WorkerSupervisor", + "qname": "WorkerSupervisor", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "77609d9d5927171cce7fc3a54897c183fd63068710c6362029b700937aae5eee", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowEngine", + "span_start": 10, + "span_end": 86, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "57ec0a9f11c542c78e008684a888397e8d9ef4223671acb2567e631a0cbc70b4", + "symbol_name": "WorkflowEngine", + "qname": "WorkflowEngine", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/store.py", + "content": "TraceContextStore\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "TraceContextStore", + "span_start": 15, + "span_end": 52, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b2dad4fbe16ffb11b58deba311c7739955c39d59f291b22181f33e9c8cce4059", + "symbol_name": "TraceContextStore", + "qname": "TraceContextStore", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "d369554f08fc92039c6edd5a2a1e73b23901533e8974459170bbd9347d263dc5", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime calls runtime.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:calls", + "span_start": 19, + "span_end": 19, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "4eaeec4ac55a59d5f66fd01c4754955f8fedaf4bc3df13fa769b352c7bfaacbb", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.add_config_file", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime reads_attr runtime.register_module", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:reads_attr", + "span_start": 28, + "span_end": 28, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "45516c79ff358dbf9b650a081668df0f66d2fe989300f985a1a78be6be166f8f", + "edge_type": "reads_attr", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.register_module", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:instantiates", + "span_start": 17, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "0adba17984f850ea1608c9e734d2dd5c325cfde3a8133123aa239e44935ad18e", + "edge_type": "instantiates", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": "27158ca220022eeb5083c6addf8a50775d45f7161284fd60aac48410105f4b98", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime calls runtime.register_module", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:calls", + "span_start": 28, + "span_end": 28, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "ab6003c3441addc1ba1b81edeca009165559f652f6b2cf424e5ae61b1f617de8", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.register_module", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime calls runtime.control_plane.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:calls", + "span_start": 21, + "span_end": 27, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "2678250030b9ce47a3b3b55fac7897ac530367edc8374ac9d5e6ecafb1e483f0", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.control_plane.register_channel", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime reads_attr runtime.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:reads_attr", + "span_start": 19, + "span_end": 19, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "30d4e8aae984ab84d523e80d02f1caeda52d547fa3d2aa47be8845931cabbca2", + "edge_type": "reads_attr", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.add_config_file", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "validation": { + "passed": true, + "action": "return", + "reasons": [] + } + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-explain-create-runtime.md b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-explain-create-runtime.md new file mode 100644 index 0000000..b8c0d9e --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-explain-create-runtime.md @@ -0,0 +1,34 @@ +# plba-v2-explain-create-runtime + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: agent_runtime +- mode: full_chain +- passed: True + +## Query +Что делает функция create_runtime? + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 33, + "llm_answer": "Функция `create_runtime` инициализирует и настраивает менеджер выполнения приложения.\n\n**Ключевые шаги:**\n1. Создает экземпляр менеджера выполнения (`RuntimeManager`).\n2. При наличии указанного пути к конфигурационному файлу добавляет его в менеджер.\n3. Если включена опция HTTP-контроля, регистрирует канал управления с указанными параметрами хоста, порта и тайм-аута.\n4. Регистрирует указанный модуль приложения в менеджере.\n5. Возвращает созданный менеджер выполнения.\n\n**Опорные файлы:**\n- `src/plba/bootstrap.py:8-29`", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "create_runtime" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-explain-local-http-channel.json b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-explain-local-http-channel.json new file mode 100644 index 0000000..df03e18 --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-explain-local-http-channel.json @@ -0,0 +1,2033 @@ +{ + "case_id": "plba-v2-explain-local-http-channel", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "agent_runtime", + "mode": "full_chain", + "query": "Почему в файле src/app_runtime/control/http_channel.py класс HttpControlChannel устроен так?", + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN_LOCAL", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 13, + "llm_answer": "Класс `HttpControlChannel` в файле `src/app_runtime/control/http_channel.py` реализует механизм управления HTTP-каналом для взаимодействия с внешними сервисами или компонентами.\n\n**Ключевые шаги его реализации:**\n1. Инициализация класса:\n - При создании экземпляра устанавливается таймаут (`_timeout`), запускается сервер через объект `UvicornThreadRunner`, создается фабрика приложений `HttpControlAppFactory`.\n \n2. Запуск канала:\n - Метод `start` инициализирует набор действий (`actions`) и создает приложение для работы с ними. Затем запускает сервер через ранее созданный объект `UvicornThreadRunner`.\n \n3. Остановка канала:\n - Метод `stop` останавливает запущенный сервер.\n\nОпорные файлы:\n- `src/app_runtime/control/http_channel.py`: определение и реализация класса `HttpControlChannel`.", + "answer_mode": "answered", + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "symbol_candidates": [ + "HttpControlChannel" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C2_DEPENDENCY_GRAPH" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "query": "Почему в файле src/app_runtime/control/http_channel.py класс HttpControlChannel устроен так?", + "router_result": { + "schema_version": "1.1", + "intent": "CODE_QA", + "retrieval_profile": "code", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query_plan": { + "raw": "Почему в файле src/app_runtime/control/http_channel.py класс HttpControlChannel устроен так?", + "normalized": "Почему в файле src/app_runtime/control/http_channel.py класс HttpControlChannel устроен так?", + "sub_intent": "EXPLAIN_LOCAL", + "negations": [], + "expansions": [ + "file", + "HttpControlChannel" + ], + "keyword_hints": [ + "src/app_runtime/control/http_channel.py", + "HttpControlChannel" + ], + "path_hints": [ + "src/app_runtime/control/http_channel.py" + ], + "doc_scope_hints": [], + "symbol_candidates": [ + "HttpControlChannel" + ], + "symbol_kind_hint": "class", + "anchors": [ + { + "type": "FILE_PATH", + "value": "src/app_runtime/control/http_channel.py", + "source": "user_text", + "subtype": null, + "span": { + "start": 15, + "end": 54 + }, + "confidence": 0.95 + }, + { + "type": "SYMBOL", + "value": "HttpControlChannel", + "source": "user_text", + "subtype": null, + "span": { + "start": 61, + "end": 79 + }, + "confidence": 0.88 + }, + { + "type": "KEY_TERM", + "value": "файл", + "source": "user_text", + "subtype": null, + "span": { + "start": 9, + "end": 14 + }, + "confidence": 0.9 + }, + { + "type": "KEY_TERM", + "value": "класс", + "source": "user_text", + "subtype": null, + "span": { + "start": 55, + "end": 60 + }, + "confidence": 0.9 + } + ] + }, + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "top_k": 8 + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 12 + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "top_k": 4 + } + ], + "filters": { + "test_policy": "EXCLUDE", + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + }, + "symbol_resolution": { + "status": "pending", + "resolved_symbol": null, + "alternatives": [ + "HttpControlChannel" + ], + "confidence": 0.0 + }, + "evidence_policy": { + "require_def": true, + "require_flow": false, + "require_spec": false, + "allow_answer_without_evidence": false + } + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Почему в файле src/app_runtime/control/http_channel.py класс HttpControlChannel устроен так?", + "sub_intent": "EXPLAIN_LOCAL", + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "keyword_hints": [ + "src/app_runtime/control/http_channel.py", + "HttpControlChannel" + ], + "symbol_candidates": [ + "HttpControlChannel" + ], + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C2_DEPENDENCY_GRAPH" + ], + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "top_k": 8 + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 12 + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "top_k": 4 + } + ], + "filters": { + "test_policy": "EXCLUDE", + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + }, + "query_plan": { + "raw": "Почему в файле src/app_runtime/control/http_channel.py класс HttpControlChannel устроен так?", + "normalized": "Почему в файле src/app_runtime/control/http_channel.py класс HttpControlChannel устроен так?", + "sub_intent": "EXPLAIN_LOCAL", + "negations": [], + "expansions": [ + "file", + "HttpControlChannel" + ], + "keyword_hints": [ + "src/app_runtime/control/http_channel.py", + "HttpControlChannel" + ], + "path_hints": [ + "src/app_runtime/control/http_channel.py" + ], + "doc_scope_hints": [], + "symbol_candidates": [ + "HttpControlChannel" + ], + "symbol_kind_hint": "class", + "anchors": [ + { + "type": "FILE_PATH", + "value": "src/app_runtime/control/http_channel.py", + "source": "user_text", + "subtype": null, + "span": { + "start": 15, + "end": 54 + }, + "confidence": 0.95 + }, + { + "type": "SYMBOL", + "value": "HttpControlChannel", + "source": "user_text", + "subtype": null, + "span": { + "start": 61, + "end": 79 + }, + "confidence": 0.88 + }, + { + "type": "KEY_TERM", + "value": "файл", + "source": "user_text", + "subtype": null, + "span": { + "start": 9, + "end": 14 + }, + "confidence": 0.9 + }, + { + "type": "KEY_TERM", + "value": "класс", + "source": "user_text", + "subtype": null, + "span": { + "start": 55, + "end": 60 + }, + "confidence": 0.9 + } + ] + } + }, + "retrieval_result": { + "target_symbol_candidates": [ + "ControlChannel", + "ControlActionSet", + "JSONResponse", + "HttpControlAppFactory", + "UvicornThreadRunner", + "HttpControlChannel", + "HttpControlChannel.__init__", + "HttpControlChannel.start" + ], + "resolved_symbol": "HttpControlChannel", + "symbol_resolution_status": "resolved", + "file_candidates": [ + "src/app_runtime/control/http_channel.py" + ], + "code_chunks": [ + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/http_channel.py", + "title": "ControlChannel", + "content": "const ControlChannel\nControlChannel = app_runtime.control.base.ControlChannel", + "start_line": 7, + "end_line": 7, + "metadata": { + "symbol_id": "6e69a934202b6e11891af8fb72b2033e8ae3071eb7577c64f5545b5b7ddfb51e", + "qname": "ControlChannel", + "kind": "const", + "signature": "ControlChannel = app_runtime.control.base.ControlChannel", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/http_channel.py", + "title": "ControlActionSet", + "content": "const ControlActionSet\nControlActionSet = app_runtime.control.base.ControlActionSet", + "start_line": 7, + "end_line": 7, + "metadata": { + "symbol_id": "2132a5717c57061e3488a1bf4d43650a60ea903a42278f4d494c014bc80d2df9", + "qname": "ControlActionSet", + "kind": "const", + "signature": "ControlActionSet = app_runtime.control.base.ControlActionSet", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/http_channel.py", + "title": "JSONResponse", + "content": "const JSONResponse\nJSONResponse = fastapi.responses.JSONResponse", + "start_line": 5, + "end_line": 5, + "metadata": { + "symbol_id": "238f600ea55013e25a3e1451f7fd65caabea125b314b89247900cdab5b801a23", + "qname": "JSONResponse", + "kind": "const", + "signature": "JSONResponse = fastapi.responses.JSONResponse", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/http_channel.py", + "title": "HttpControlAppFactory", + "content": "const HttpControlAppFactory\nHttpControlAppFactory = app_runtime.control.http_app.HttpControlAppFactory", + "start_line": 8, + "end_line": 8, + "metadata": { + "symbol_id": "9ee00379ee797cd2386e88a6e37dc69e3e31de9144fc4b95f0206cd1430e8983", + "qname": "HttpControlAppFactory", + "kind": "const", + "signature": "HttpControlAppFactory = app_runtime.control.http_app.HttpControlAppFactory", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/http_channel.py", + "title": "UvicornThreadRunner", + "content": "const UvicornThreadRunner\nUvicornThreadRunner = app_runtime.control.http_runner.UvicornThreadRunner", + "start_line": 9, + "end_line": 9, + "metadata": { + "symbol_id": "c6ee53f4ff75d5b34ee95854cb63bb3ecfa163023717cd969b8cba937a0cd3b3", + "qname": "UvicornThreadRunner", + "kind": "const", + "signature": "UvicornThreadRunner = app_runtime.control.http_runner.UvicornThreadRunner", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/http_channel.py", + "title": "HttpControlChannel", + "content": "class HttpControlChannel\nHttpControlChannel(ControlChannel)", + "start_line": 12, + "end_line": 57, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "qname": "HttpControlChannel", + "kind": "class", + "signature": "HttpControlChannel(ControlChannel)", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/http_channel.py", + "title": "HttpControlChannel.__init__", + "content": "method HttpControlChannel.__init__\n__init__(self, host, port, timeout)", + "start_line": 13, + "end_line": 17, + "metadata": { + "symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "qname": "HttpControlChannel.__init__", + "kind": "method", + "signature": "__init__(self, host, port, timeout)", + "parent_symbol_id": "HttpControlChannel", + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/http_channel.py", + "title": "HttpControlChannel.start", + "content": "method HttpControlChannel.start\nstart(self, actions)", + "start_line": 19, + "end_line": 22, + "metadata": { + "symbol_id": "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0", + "qname": "HttpControlChannel.start", + "kind": "method", + "signature": "start(self, actions)", + "parent_symbol_id": "HttpControlChannel", + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/http_channel.py", + "title": "src/app_runtime/control/http_channel.py:HttpControlChannel", + "content": "class HttpControlChannel(ControlChannel):\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._timeout = timeout\n self._runner = UvicornThreadRunner(host, port, timeout)\n self._factory = HttpControlAppFactory()\n self._actions: ControlActionSet | None = None\n\n async def start(self, actions: ControlActionSet) -> None:\n self._actions = actions\n app = self._factory.create(self._health_response, self._action_response)\n await self._runner.start(app)\n\n async def stop(self) -> None:\n await self._runner.stop()\n\n @property\n def port(self) -> int:\n return self._runner.port\n\n async def _health_response(self) -> dict[str, object]:\n if self._actions is None:\n return {\"status\": \"unhealthy\", \"detail\": \"control actions are not configured\"}\n return await asyncio.wait_for(self._actions.health(), timeout=float(self._timeout))\n\n async def _action_response(self, action: str, _client_source: str = \"unknown\") -> JSONResponse:\n if self._actions is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"{action} handler is not configured\"}, status_code=404)\n callbacks = {\n \"start\": self._actions.start,\n \"stop\": self._actions.stop,\n \"status\": self._actions.status,\n }\n callback = callbacks.get(action)\n if callback is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"unsupported action: {action}\"}, status_code=404)\n action_timeout = max(float(self._timeout), 10.0) if action in {\"start\", \"stop\"} else float(self._timeout)\n try:\n detail = await asyncio.wait_for(callback(), timeout=action_timeout)\n except asyncio.TimeoutError:\n return JSONResponse(\n content={\"status\": \"accepted\", \"detail\": f\"{action} operation is still in progress\"},\n status_code=202,\n )\n except Exception as exc:\n return JSONResponse(content={\"status\": \"error\", \"detail\": str(exc)}, status_code=500)\n return JSONResponse(content={\"status\": \"ok\", \"detail\": detail or f\"{action} action accepted\"}, status_code=200)", + "start_line": 12, + "end_line": 57, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/http_channel.py", + "title": "HttpControlChannel.__init__:dataflow_slice", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._timeout\n -> HttpControlChannel._action_response", + "start_line": 14, + "end_line": 47, + "metadata": { + "edge_id": "c3ef21fcae96c82c00be74b3ab827d4af2085d89cb3fa5521c19a174aad84dbb", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "e64969024ccaeb34d8d91473fad07b3b3d341875846392e7a006406c7ada1954", + "dst_ref": "HttpControlChannel._action_response", + "resolution": "resolved", + "slice_id": "c3ef21fcae96c82c00be74b3ab827d4af2085d89cb3fa5521c19a174aad84dbb", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._timeout", + "HttpControlChannel._action_response" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "e64969024ccaeb34d8d91473fad07b3b3d341875846392e7a006406c7ada1954" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/http_channel.py", + "title": "HttpControlChannel.__init__:dataflow_slice", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._runner\n -> HttpControlChannel.start", + "start_line": 15, + "end_line": 22, + "metadata": { + "edge_id": "51d73913df709152258ed1b9a8c8f4eb3c575eccfe6b982aef0b28e0789a29da", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0", + "dst_ref": "HttpControlChannel.start", + "resolution": "resolved", + "slice_id": "51d73913df709152258ed1b9a8c8f4eb3c575eccfe6b982aef0b28e0789a29da", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._runner", + "HttpControlChannel.start" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/http_channel.py", + "title": "HttpControlChannel.__init__:dataflow_slice", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._timeout\n -> HttpControlChannel._health_response", + "start_line": 14, + "end_line": 34, + "metadata": { + "edge_id": "f858f5c9e575f6c4cdfe3853571b7ee21d1f628a443541d2037c3dc9d0790bef", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "e84bf04e9cd2127df235b7064d05f47e19f19a89c7c82f4c247231d4e8fa426a", + "dst_ref": "HttpControlChannel._health_response", + "resolution": "resolved", + "slice_id": "f858f5c9e575f6c4cdfe3853571b7ee21d1f628a443541d2037c3dc9d0790bef", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._timeout", + "HttpControlChannel._health_response" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "e84bf04e9cd2127df235b7064d05f47e19f19a89c7c82f4c247231d4e8fa426a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/http_channel.py", + "title": "HttpControlChannel.__init__:dataflow_slice", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._runner\n -> HttpControlChannel.stop", + "start_line": 15, + "end_line": 25, + "metadata": { + "edge_id": "0f827ef81a990258a8a74381c8564a8361afa6712dba3200592659c939adcb9d", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "f29ab212620093d72be20e26c5a399624c7939a6056a728762ed3f84a250bfa3", + "dst_ref": "HttpControlChannel.stop", + "resolution": "resolved", + "slice_id": "0f827ef81a990258a8a74381c8564a8361afa6712dba3200592659c939adcb9d", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._runner", + "HttpControlChannel.stop" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "f29ab212620093d72be20e26c5a399624c7939a6056a728762ed3f84a250bfa3" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "relations": [ + { + "path": "src/app_runtime/control/http_channel.py", + "metadata": { + "edge_id": "c3ef21fcae96c82c00be74b3ab827d4af2085d89cb3fa5521c19a174aad84dbb", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "e64969024ccaeb34d8d91473fad07b3b3d341875846392e7a006406c7ada1954", + "dst_ref": "HttpControlChannel._action_response", + "resolution": "resolved", + "slice_id": "c3ef21fcae96c82c00be74b3ab827d4af2085d89cb3fa5521c19a174aad84dbb", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._timeout", + "HttpControlChannel._action_response" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "e64969024ccaeb34d8d91473fad07b3b3d341875846392e7a006406c7ada1954" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._timeout\n -> HttpControlChannel._action_response" + }, + { + "path": "src/app_runtime/control/http_channel.py", + "metadata": { + "edge_id": "51d73913df709152258ed1b9a8c8f4eb3c575eccfe6b982aef0b28e0789a29da", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0", + "dst_ref": "HttpControlChannel.start", + "resolution": "resolved", + "slice_id": "51d73913df709152258ed1b9a8c8f4eb3c575eccfe6b982aef0b28e0789a29da", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._runner", + "HttpControlChannel.start" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._runner\n -> HttpControlChannel.start" + }, + { + "path": "src/app_runtime/control/http_channel.py", + "metadata": { + "edge_id": "f858f5c9e575f6c4cdfe3853571b7ee21d1f628a443541d2037c3dc9d0790bef", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "e84bf04e9cd2127df235b7064d05f47e19f19a89c7c82f4c247231d4e8fa426a", + "dst_ref": "HttpControlChannel._health_response", + "resolution": "resolved", + "slice_id": "f858f5c9e575f6c4cdfe3853571b7ee21d1f628a443541d2037c3dc9d0790bef", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._timeout", + "HttpControlChannel._health_response" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "e84bf04e9cd2127df235b7064d05f47e19f19a89c7c82f4c247231d4e8fa426a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._timeout\n -> HttpControlChannel._health_response" + }, + { + "path": "src/app_runtime/control/http_channel.py", + "metadata": { + "edge_id": "0f827ef81a990258a8a74381c8564a8361afa6712dba3200592659c939adcb9d", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "f29ab212620093d72be20e26c5a399624c7939a6056a728762ed3f84a250bfa3", + "dst_ref": "HttpControlChannel.stop", + "resolution": "resolved", + "slice_id": "0f827ef81a990258a8a74381c8564a8361afa6712dba3200592659c939adcb9d", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._runner", + "HttpControlChannel.stop" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "f29ab212620093d72be20e26c5a399624c7939a6056a728762ed3f84a250bfa3" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._runner\n -> HttpControlChannel.stop" + } + ], + "entrypoints": [], + "test_candidates": [], + "layer_outcomes": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 1, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 4, + "empty": false, + "fallback_used": false + } + ], + "missing_layers": [], + "raw_rows": [ + { + "path": "src/app_runtime/control/http_channel.py", + "content": "const ControlChannel\nControlChannel = app_runtime.control.base.ControlChannel", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlChannel", + "span_start": 7, + "span_end": 7, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "6e69a934202b6e11891af8fb72b2033e8ae3071eb7577c64f5545b5b7ddfb51e", + "qname": "ControlChannel", + "kind": "const", + "signature": "ControlChannel = app_runtime.control.base.ControlChannel", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "const ControlActionSet\nControlActionSet = app_runtime.control.base.ControlActionSet", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlActionSet", + "span_start": 7, + "span_end": 7, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "2132a5717c57061e3488a1bf4d43650a60ea903a42278f4d494c014bc80d2df9", + "qname": "ControlActionSet", + "kind": "const", + "signature": "ControlActionSet = app_runtime.control.base.ControlActionSet", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "const JSONResponse\nJSONResponse = fastapi.responses.JSONResponse", + "layer": "C1_SYMBOL_CATALOG", + "title": "JSONResponse", + "span_start": 5, + "span_end": 5, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "238f600ea55013e25a3e1451f7fd65caabea125b314b89247900cdab5b801a23", + "qname": "JSONResponse", + "kind": "const", + "signature": "JSONResponse = fastapi.responses.JSONResponse", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "const HttpControlAppFactory\nHttpControlAppFactory = app_runtime.control.http_app.HttpControlAppFactory", + "layer": "C1_SYMBOL_CATALOG", + "title": "HttpControlAppFactory", + "span_start": 8, + "span_end": 8, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "9ee00379ee797cd2386e88a6e37dc69e3e31de9144fc4b95f0206cd1430e8983", + "qname": "HttpControlAppFactory", + "kind": "const", + "signature": "HttpControlAppFactory = app_runtime.control.http_app.HttpControlAppFactory", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "const UvicornThreadRunner\nUvicornThreadRunner = app_runtime.control.http_runner.UvicornThreadRunner", + "layer": "C1_SYMBOL_CATALOG", + "title": "UvicornThreadRunner", + "span_start": 9, + "span_end": 9, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "c6ee53f4ff75d5b34ee95854cb63bb3ecfa163023717cd969b8cba937a0cd3b3", + "qname": "UvicornThreadRunner", + "kind": "const", + "signature": "UvicornThreadRunner = app_runtime.control.http_runner.UvicornThreadRunner", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel\nHttpControlChannel(ControlChannel)", + "layer": "C1_SYMBOL_CATALOG", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "qname": "HttpControlChannel", + "kind": "class", + "signature": "HttpControlChannel(ControlChannel)", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "method HttpControlChannel.__init__\n__init__(self, host, port, timeout)", + "layer": "C1_SYMBOL_CATALOG", + "title": "HttpControlChannel.__init__", + "span_start": 13, + "span_end": 17, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "qname": "HttpControlChannel.__init__", + "kind": "method", + "signature": "__init__(self, host, port, timeout)", + "parent_symbol_id": "HttpControlChannel", + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "method HttpControlChannel.start\nstart(self, actions)", + "layer": "C1_SYMBOL_CATALOG", + "title": "HttpControlChannel.start", + "span_start": 19, + "span_end": 22, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0", + "qname": "HttpControlChannel.start", + "kind": "method", + "signature": "start(self, actions)", + "parent_symbol_id": "HttpControlChannel", + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel(ControlChannel):\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._timeout = timeout\n self._runner = UvicornThreadRunner(host, port, timeout)\n self._factory = HttpControlAppFactory()\n self._actions: ControlActionSet | None = None\n\n async def start(self, actions: ControlActionSet) -> None:\n self._actions = actions\n app = self._factory.create(self._health_response, self._action_response)\n await self._runner.start(app)\n\n async def stop(self) -> None:\n await self._runner.stop()\n\n @property\n def port(self) -> int:\n return self._runner.port\n\n async def _health_response(self) -> dict[str, object]:\n if self._actions is None:\n return {\"status\": \"unhealthy\", \"detail\": \"control actions are not configured\"}\n return await asyncio.wait_for(self._actions.health(), timeout=float(self._timeout))\n\n async def _action_response(self, action: str, _client_source: str = \"unknown\") -> JSONResponse:\n if self._actions is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"{action} handler is not configured\"}, status_code=404)\n callbacks = {\n \"start\": self._actions.start,\n \"stop\": self._actions.stop,\n \"status\": self._actions.status,\n }\n callback = callbacks.get(action)\n if callback is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"unsupported action: {action}\"}, status_code=404)\n action_timeout = max(float(self._timeout), 10.0) if action in {\"start\", \"stop\"} else float(self._timeout)\n try:\n detail = await asyncio.wait_for(callback(), timeout=action_timeout)\n except asyncio.TimeoutError:\n return JSONResponse(\n content={\"status\": \"accepted\", \"detail\": f\"{action} operation is still in progress\"},\n status_code=202,\n )\n except Exception as exc:\n return JSONResponse(content={\"status\": \"error\", \"detail\": str(exc)}, status_code=500)\n return JSONResponse(content={\"status\": \"ok\", \"detail\": detail or f\"{action} action accepted\"}, status_code=200)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_channel.py:HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._timeout\n -> HttpControlChannel._action_response", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "c3ef21fcae96c82c00be74b3ab827d4af2085d89cb3fa5521c19a174aad84dbb", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "e64969024ccaeb34d8d91473fad07b3b3d341875846392e7a006406c7ada1954", + "dst_ref": "HttpControlChannel._action_response", + "resolution": "resolved", + "slice_id": "c3ef21fcae96c82c00be74b3ab827d4af2085d89cb3fa5521c19a174aad84dbb", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._timeout", + "HttpControlChannel._action_response" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "e64969024ccaeb34d8d91473fad07b3b3d341875846392e7a006406c7ada1954" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._runner\n -> HttpControlChannel.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 15, + "span_end": 22, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "51d73913df709152258ed1b9a8c8f4eb3c575eccfe6b982aef0b28e0789a29da", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0", + "dst_ref": "HttpControlChannel.start", + "resolution": "resolved", + "slice_id": "51d73913df709152258ed1b9a8c8f4eb3c575eccfe6b982aef0b28e0789a29da", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._runner", + "HttpControlChannel.start" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._timeout\n -> HttpControlChannel._health_response", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 14, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "f858f5c9e575f6c4cdfe3853571b7ee21d1f628a443541d2037c3dc9d0790bef", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "e84bf04e9cd2127df235b7064d05f47e19f19a89c7c82f4c247231d4e8fa426a", + "dst_ref": "HttpControlChannel._health_response", + "resolution": "resolved", + "slice_id": "f858f5c9e575f6c4cdfe3853571b7ee21d1f628a443541d2037c3dc9d0790bef", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._timeout", + "HttpControlChannel._health_response" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "e84bf04e9cd2127df235b7064d05f47e19f19a89c7c82f4c247231d4e8fa426a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._runner\n -> HttpControlChannel.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 15, + "span_end": 25, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "0f827ef81a990258a8a74381c8564a8361afa6712dba3200592659c939adcb9d", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "f29ab212620093d72be20e26c5a399624c7939a6056a728762ed3f84a250bfa3", + "dst_ref": "HttpControlChannel.stop", + "resolution": "resolved", + "slice_id": "0f827ef81a990258a8a74381c8564a8361afa6712dba3200592659c939adcb9d", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._runner", + "HttpControlChannel.stop" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "f29ab212620093d72be20e26c5a399624c7939a6056a728762ed3f84a250bfa3" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "retrieval_report": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C2_DEPENDENCY_GRAPH" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "vector", + "C0_SOURCE_CHUNKS": "vector", + "C2_DEPENDENCY_GRAPH": "vector" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 12, + "C2_DEPENDENCY_GRAPH": 4 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ] + } + }, + "fallback": { + "used": false, + "reason": null + }, + "retrieval_by_layer_ms": { + "C1_SYMBOL_CATALOG": 31, + "C0_SOURCE_CHUNKS": 15, + "C2_DEPENDENCY_GRAPH": 17 + } + } + }, + "diagnostics": { + "intent_correct": null, + "target_found": true, + "layers_used": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C2_DEPENDENCY_GRAPH" + ], + "retrieval_sufficient": true, + "answer_mode": "normal", + "router_result": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "EXPLAIN_LOCAL", + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C2_DEPENDENCY_GRAPH" + ], + "symbol_resolution_status": "pending" + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Почему в файле src/app_runtime/control/http_channel.py класс HttpControlChannel устроен так?", + "sub_intent": "EXPLAIN_LOCAL", + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C2_DEPENDENCY_GRAPH" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 1, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 4, + "empty": false, + "fallback_used": false + } + ], + "empty_layers": [], + "evidence_gate_decision": { + "sufficient": true, + "failure_reasons": [], + "evidence_count": 13 + }, + "failure_reasons": [], + "timings_ms": {} + }, + "rag_rows": [ + { + "path": "src/app_runtime/control/http_channel.py", + "content": "const ControlChannel\nControlChannel = app_runtime.control.base.ControlChannel", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlChannel", + "span_start": 7, + "span_end": 7, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "6e69a934202b6e11891af8fb72b2033e8ae3071eb7577c64f5545b5b7ddfb51e", + "qname": "ControlChannel", + "kind": "const", + "signature": "ControlChannel = app_runtime.control.base.ControlChannel", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "const ControlActionSet\nControlActionSet = app_runtime.control.base.ControlActionSet", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlActionSet", + "span_start": 7, + "span_end": 7, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "2132a5717c57061e3488a1bf4d43650a60ea903a42278f4d494c014bc80d2df9", + "qname": "ControlActionSet", + "kind": "const", + "signature": "ControlActionSet = app_runtime.control.base.ControlActionSet", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "const JSONResponse\nJSONResponse = fastapi.responses.JSONResponse", + "layer": "C1_SYMBOL_CATALOG", + "title": "JSONResponse", + "span_start": 5, + "span_end": 5, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "238f600ea55013e25a3e1451f7fd65caabea125b314b89247900cdab5b801a23", + "qname": "JSONResponse", + "kind": "const", + "signature": "JSONResponse = fastapi.responses.JSONResponse", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "const HttpControlAppFactory\nHttpControlAppFactory = app_runtime.control.http_app.HttpControlAppFactory", + "layer": "C1_SYMBOL_CATALOG", + "title": "HttpControlAppFactory", + "span_start": 8, + "span_end": 8, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "9ee00379ee797cd2386e88a6e37dc69e3e31de9144fc4b95f0206cd1430e8983", + "qname": "HttpControlAppFactory", + "kind": "const", + "signature": "HttpControlAppFactory = app_runtime.control.http_app.HttpControlAppFactory", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "const UvicornThreadRunner\nUvicornThreadRunner = app_runtime.control.http_runner.UvicornThreadRunner", + "layer": "C1_SYMBOL_CATALOG", + "title": "UvicornThreadRunner", + "span_start": 9, + "span_end": 9, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "c6ee53f4ff75d5b34ee95854cb63bb3ecfa163023717cd969b8cba937a0cd3b3", + "qname": "UvicornThreadRunner", + "kind": "const", + "signature": "UvicornThreadRunner = app_runtime.control.http_runner.UvicornThreadRunner", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel\nHttpControlChannel(ControlChannel)", + "layer": "C1_SYMBOL_CATALOG", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "qname": "HttpControlChannel", + "kind": "class", + "signature": "HttpControlChannel(ControlChannel)", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "method HttpControlChannel.__init__\n__init__(self, host, port, timeout)", + "layer": "C1_SYMBOL_CATALOG", + "title": "HttpControlChannel.__init__", + "span_start": 13, + "span_end": 17, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "qname": "HttpControlChannel.__init__", + "kind": "method", + "signature": "__init__(self, host, port, timeout)", + "parent_symbol_id": "HttpControlChannel", + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "method HttpControlChannel.start\nstart(self, actions)", + "layer": "C1_SYMBOL_CATALOG", + "title": "HttpControlChannel.start", + "span_start": 19, + "span_end": 22, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0", + "qname": "HttpControlChannel.start", + "kind": "method", + "signature": "start(self, actions)", + "parent_symbol_id": "HttpControlChannel", + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel(ControlChannel):\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._timeout = timeout\n self._runner = UvicornThreadRunner(host, port, timeout)\n self._factory = HttpControlAppFactory()\n self._actions: ControlActionSet | None = None\n\n async def start(self, actions: ControlActionSet) -> None:\n self._actions = actions\n app = self._factory.create(self._health_response, self._action_response)\n await self._runner.start(app)\n\n async def stop(self) -> None:\n await self._runner.stop()\n\n @property\n def port(self) -> int:\n return self._runner.port\n\n async def _health_response(self) -> dict[str, object]:\n if self._actions is None:\n return {\"status\": \"unhealthy\", \"detail\": \"control actions are not configured\"}\n return await asyncio.wait_for(self._actions.health(), timeout=float(self._timeout))\n\n async def _action_response(self, action: str, _client_source: str = \"unknown\") -> JSONResponse:\n if self._actions is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"{action} handler is not configured\"}, status_code=404)\n callbacks = {\n \"start\": self._actions.start,\n \"stop\": self._actions.stop,\n \"status\": self._actions.status,\n }\n callback = callbacks.get(action)\n if callback is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"unsupported action: {action}\"}, status_code=404)\n action_timeout = max(float(self._timeout), 10.0) if action in {\"start\", \"stop\"} else float(self._timeout)\n try:\n detail = await asyncio.wait_for(callback(), timeout=action_timeout)\n except asyncio.TimeoutError:\n return JSONResponse(\n content={\"status\": \"accepted\", \"detail\": f\"{action} operation is still in progress\"},\n status_code=202,\n )\n except Exception as exc:\n return JSONResponse(content={\"status\": \"error\", \"detail\": str(exc)}, status_code=500)\n return JSONResponse(content={\"status\": \"ok\", \"detail\": detail or f\"{action} action accepted\"}, status_code=200)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_channel.py:HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._timeout\n -> HttpControlChannel._action_response", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "c3ef21fcae96c82c00be74b3ab827d4af2085d89cb3fa5521c19a174aad84dbb", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "e64969024ccaeb34d8d91473fad07b3b3d341875846392e7a006406c7ada1954", + "dst_ref": "HttpControlChannel._action_response", + "resolution": "resolved", + "slice_id": "c3ef21fcae96c82c00be74b3ab827d4af2085d89cb3fa5521c19a174aad84dbb", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._timeout", + "HttpControlChannel._action_response" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "e64969024ccaeb34d8d91473fad07b3b3d341875846392e7a006406c7ada1954" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._runner\n -> HttpControlChannel.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 15, + "span_end": 22, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "51d73913df709152258ed1b9a8c8f4eb3c575eccfe6b982aef0b28e0789a29da", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0", + "dst_ref": "HttpControlChannel.start", + "resolution": "resolved", + "slice_id": "51d73913df709152258ed1b9a8c8f4eb3c575eccfe6b982aef0b28e0789a29da", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._runner", + "HttpControlChannel.start" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._timeout\n -> HttpControlChannel._health_response", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 14, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "f858f5c9e575f6c4cdfe3853571b7ee21d1f628a443541d2037c3dc9d0790bef", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "e84bf04e9cd2127df235b7064d05f47e19f19a89c7c82f4c247231d4e8fa426a", + "dst_ref": "HttpControlChannel._health_response", + "resolution": "resolved", + "slice_id": "f858f5c9e575f6c4cdfe3853571b7ee21d1f628a443541d2037c3dc9d0790bef", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._timeout", + "HttpControlChannel._health_response" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "e84bf04e9cd2127df235b7064d05f47e19f19a89c7c82f4c247231d4e8fa426a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._runner\n -> HttpControlChannel.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 15, + "span_end": 25, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "0f827ef81a990258a8a74381c8564a8361afa6712dba3200592659c939adcb9d", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "f29ab212620093d72be20e26c5a399624c7939a6056a728762ed3f84a250bfa3", + "dst_ref": "HttpControlChannel.stop", + "resolution": "resolved", + "slice_id": "0f827ef81a990258a8a74381c8564a8361afa6712dba3200592659c939adcb9d", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._runner", + "HttpControlChannel.stop" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "f29ab212620093d72be20e26c5a399624c7939a6056a728762ed3f84a250bfa3" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "validation": { + "passed": true, + "action": "return", + "reasons": [] + } + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-explain-local-http-channel.md b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-explain-local-http-channel.md new file mode 100644 index 0000000..eb88212 --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-explain-local-http-channel.md @@ -0,0 +1,34 @@ +# plba-v2-explain-local-http-channel + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: agent_runtime +- mode: full_chain +- passed: True + +## Query +Почему в файле src/app_runtime/control/http_channel.py класс HttpControlChannel устроен так? + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "EXPLAIN_LOCAL", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 13, + "llm_answer": "Класс `HttpControlChannel` в файле `src/app_runtime/control/http_channel.py` реализует механизм управления HTTP-каналом для взаимодействия с внешними сервисами или компонентами.\n\n**Ключевые шаги его реализации:**\n1. Инициализация класса:\n - При создании экземпляра устанавливается таймаут (`_timeout`), запускается сервер через объект `UvicornThreadRunner`, создается фабрика приложений `HttpControlAppFactory`.\n \n2. Запуск канала:\n - Метод `start` инициализирует набор действий (`actions`) и создает приложение для работы с ними. Затем запускает сервер через ранее созданный объект `UvicornThreadRunner`.\n \n3. Остановка канала:\n - Метод `stop` останавливает запущенный сервер.\n\nОпорные файлы:\n- `src/app_runtime/control/http_channel.py`: определение и реализация класса `HttpControlChannel`.", + "answer_mode": "answered", + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "symbol_candidates": [ + "HttpControlChannel" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C2_DEPENDENCY_GRAPH" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-explain-nonexistent-symbol.json b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-explain-nonexistent-symbol.json new file mode 100644 index 0000000..adca3b7 --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-explain-nonexistent-symbol.json @@ -0,0 +1,4092 @@ +{ + "case_id": "plba-v2-explain-nonexistent-symbol", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "agent_runtime", + "mode": "full_chain", + "query": "Объясни класс RuntimeFactoryManager", + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 33, + "llm_answer": "Класс `RuntimeFactoryManager` не найден в предоставленном коде или контекстной информации.\n\nКлючевые шаги и опорные файлы:\n1. Код и контекста относятся к управлению каналами управления («control channels») в приложении.\n2. Основные классы включают `ControlChannel`, `ControlActionSet`, и связанные с ними каналы и сервисы.\n3. Основной файл для рассмотрения — `base.py`.\n4. Ключевые обязанности и интерфейсы описаны через абстрактные методы (`start`, `stop`) в классе `ControlChannel`. \n\nПоскольку конкретный класс `RuntimeFactoryManager` отсутствует в данном контексте, невозможно предоставить его объяснение.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "RuntimeFactoryManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": false, + "mismatches": [ + "answer_mode: expected degraded, got answered", + "retrieval: expected empty rag, got 33 rows", + "llm: expected answer to contain 'не найдена'" + ], + "details": { + "query": "Объясни класс RuntimeFactoryManager", + "router_result": { + "schema_version": "1.1", + "intent": "CODE_QA", + "retrieval_profile": "code", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query_plan": { + "raw": "Объясни класс RuntimeFactoryManager", + "normalized": "Объясни класс RuntimeFactoryManager", + "sub_intent": "EXPLAIN", + "negations": [], + "expansions": [ + "RuntimeFactoryManager" + ], + "keyword_hints": [ + "RuntimeFactoryManager" + ], + "path_hints": [], + "doc_scope_hints": [], + "symbol_candidates": [ + "RuntimeFactoryManager" + ], + "symbol_kind_hint": "class", + "anchors": [ + { + "type": "SYMBOL", + "value": "RuntimeFactoryManager", + "source": "user_text", + "subtype": null, + "span": { + "start": 14, + "end": 35 + }, + "confidence": 0.88 + }, + { + "type": "KEY_TERM", + "value": "класс", + "source": "user_text", + "subtype": null, + "span": { + "start": 8, + "end": 13 + }, + "confidence": 0.9 + } + ] + }, + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "top_k": 8 + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 8 + }, + { + "layer_id": "C4_SEMANTIC_ROLES", + "top_k": 8 + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "top_k": 6 + }, + { + "layer_id": "C3_ENTRYPOINTS", + "top_k": 6 + } + ], + "filters": { + "test_policy": "EXCLUDE", + "path_scope": [], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + }, + "symbol_resolution": { + "status": "pending", + "resolved_symbol": null, + "alternatives": [ + "RuntimeFactoryManager" + ], + "confidence": 0.0 + }, + "evidence_policy": { + "require_def": true, + "require_flow": true, + "require_spec": false, + "allow_answer_without_evidence": false + } + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Объясни класс RuntimeFactoryManager", + "sub_intent": "EXPLAIN", + "path_scope": [], + "keyword_hints": [ + "RuntimeFactoryManager" + ], + "symbol_candidates": [ + "RuntimeFactoryManager" + ], + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "top_k": 8 + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 8 + }, + { + "layer_id": "C4_SEMANTIC_ROLES", + "top_k": 8 + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "top_k": 6 + }, + { + "layer_id": "C3_ENTRYPOINTS", + "top_k": 6 + } + ], + "filters": { + "test_policy": "EXCLUDE", + "path_scope": [], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + }, + "query_plan": { + "raw": "Объясни класс RuntimeFactoryManager", + "normalized": "Объясни класс RuntimeFactoryManager", + "sub_intent": "EXPLAIN", + "negations": [], + "expansions": [ + "RuntimeFactoryManager" + ], + "keyword_hints": [ + "RuntimeFactoryManager" + ], + "path_hints": [], + "doc_scope_hints": [], + "symbol_candidates": [ + "RuntimeFactoryManager" + ], + "symbol_kind_hint": "class", + "anchors": [ + { + "type": "SYMBOL", + "value": "RuntimeFactoryManager", + "source": "user_text", + "subtype": null, + "span": { + "start": 14, + "end": 35 + }, + "confidence": 0.88 + }, + { + "type": "KEY_TERM", + "value": "класс", + "source": "user_text", + "subtype": null, + "span": { + "start": 8, + "end": 13 + }, + "confidence": 0.9 + } + ] + } + }, + "retrieval_result": { + "target_symbol_candidates": [ + "ControlChannel", + "ControlChannel.stop", + "ControlActionSet", + "ControlPlaneService", + "ControlChannel.start" + ], + "resolved_symbol": null, + "symbol_resolution_status": "ambiguous", + "file_candidates": [ + "src/app_runtime/control/base.py", + "src/app_runtime/control/__init__.py", + "src/app_runtime/control/http_channel.py", + "src/app_runtime/control/service.py", + "src/app_runtime/control/http_runner.py", + "src/app_runtime/control/http_app.py", + "src/plba/control.py", + "src/app_runtime/workflow/persistence/workflow_persistence.py", + "src/app_runtime/queue/in_memory.py" + ], + "code_chunks": [ + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/base.py", + "title": "ControlChannel", + "content": "class ControlChannel\nControlChannel(ABC)", + "start_line": 21, + "end_line": 28, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "qname": "ControlChannel", + "kind": "class", + "signature": "ControlChannel(ABC)", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/base.py", + "title": "ControlChannel.stop", + "content": "method ControlChannel.stop\nstop(self)\nStop the control channel and release resources.", + "start_line": 27, + "end_line": 28, + "metadata": { + "symbol_id": "54b5adf9866c526836221dc721b474ba23fbec83e1b1d3b8bc4da67ae3c1541d", + "qname": "ControlChannel.stop", + "kind": "method", + "signature": "stop(self)", + "parent_symbol_id": "ControlChannel", + "package_or_module": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/base.py", + "title": "ControlActionSet", + "content": "class ControlActionSet\nControlActionSet", + "start_line": 14, + "end_line": 18, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "qname": "ControlActionSet", + "kind": "class", + "signature": "ControlActionSet", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/__init__.py", + "title": "ControlChannel", + "content": "const ControlChannel\nControlChannel = app_runtime.control.base.ControlChannel", + "start_line": 1, + "end_line": 1, + "metadata": { + "symbol_id": "268420f7aa4ed74082b9276cae0cded4f00bac090ffd58fa020a65be0fe19c27", + "qname": "ControlChannel", + "kind": "const", + "signature": "ControlChannel = app_runtime.control.base.ControlChannel", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/__init__.py", + "title": "ControlPlaneService", + "content": "const ControlPlaneService\nControlPlaneService = app_runtime.control.service.ControlPlaneService", + "start_line": 3, + "end_line": 3, + "metadata": { + "symbol_id": "217e8f044d1c01644bf7b81e5046af9e84469210c692a2fb0c476a19bb069ae1", + "qname": "ControlPlaneService", + "kind": "const", + "signature": "ControlPlaneService = app_runtime.control.service.ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/base.py", + "title": "ControlChannel.start", + "content": "method ControlChannel.start\nstart(self, actions)\nStart the control channel and bind handlers.", + "start_line": 23, + "end_line": 24, + "metadata": { + "symbol_id": "e01e0d50d0f48d0c84c119c989b7a7c57ceea263811ce2605c684ae24d1a03b1", + "qname": "ControlChannel.start", + "kind": "method", + "signature": "start(self, actions)", + "parent_symbol_id": "ControlChannel", + "package_or_module": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/__init__.py", + "title": "ControlActionSet", + "content": "const ControlActionSet\nControlActionSet = app_runtime.control.base.ControlActionSet", + "start_line": 1, + "end_line": 1, + "metadata": { + "symbol_id": "767e4ac0d4224aeccb0783a38359d3c03899a876736eb83d99887c16ea07cc6c", + "qname": "ControlActionSet", + "kind": "const", + "signature": "ControlActionSet = app_runtime.control.base.ControlActionSet", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/http_channel.py", + "title": "ControlActionSet", + "content": "const ControlActionSet\nControlActionSet = app_runtime.control.base.ControlActionSet", + "start_line": 7, + "end_line": 7, + "metadata": { + "symbol_id": "2132a5717c57061e3488a1bf4d43650a60ea903a42278f4d494c014bc80d2df9", + "qname": "ControlActionSet", + "kind": "const", + "signature": "ControlActionSet = app_runtime.control.base.ControlActionSet", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/service.py", + "title": "src/app_runtime/control/service.py:ControlPlaneService", + "content": "class ControlPlaneService:\n def __init__(self) -> None:\n self._channels: list[ControlChannel] = []\n\n def register_channel(self, channel: ControlChannel) -> None:\n self._channels.append(channel)\n\n def start(self, runtime: RuntimeManager) -> None:\n if not self._channels:\n return\n asyncio.run(self._start_async(runtime))\n\n def stop(self) -> None:\n if not self._channels:\n return\n asyncio.run(self._stop_async())\n\n def snapshot(self, runtime: RuntimeManager) -> dict[str, object]:\n health = runtime.current_health()\n return {\n \"runtime\": {\"state\": runtime._state.value},\n \"modules\": list(runtime.registry.modules),\n \"services\": runtime.services.snapshot(),\n \"workers\": runtime.workers.snapshot(),\n \"health\": runtime.health.snapshot(runtime.workers.healths()) | {\"status\": health[\"status\"]},\n \"config\": runtime.configuration.get(),\n }\n\n async def _start_async(self, runtime: RuntimeManager) -> None:\n actions = ControlActionSet(\n health=runtime.health_status,\n start=runtime.start_runtime,\n stop=runtime.stop_runtime,\n status=runtime.runtime_status,\n )\n for channel in self._channels:\n await channel.start(actions)\n\n async def _stop_async(self) -> None:\n for channel in reversed(self._channels):\n await channel.stop()", + "start_line": 12, + "end_line": 52, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/http_runner.py", + "title": "src/app_runtime/control/http_runner.py:UvicornThreadRunner", + "content": "class UvicornThreadRunner:\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._host = host\n self._port = port\n self._timeout = timeout\n self._server: Server | None = None\n self._thread: Thread | None = None\n self._error: BaseException | None = None\n\n async def start(self, app: FastAPI) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._error = None\n config = Config(app=app, host=self._host, port=self._port, log_level=\"warning\")\n self._server = Server(config)\n self._thread = Thread(target=self._serve, name=\"plba-http-control\", daemon=True)\n self._thread.start()\n await self._wait_until_started()\n\n async def stop(self) -> None:\n if self._server is None or self._thread is None:\n return\n self._server.should_exit = True\n await asyncio.to_thread(self._thread.join, self._timeout)\n self._server = None\n self._thread = None\n\n @property\n def port(self) -> int:\n if self._server is None or not getattr(self._server, \"servers\", None):\n return self._port\n socket = self._server.servers[0].sockets[0]\n return int(socket.getsockname()[1])\n\n async def _wait_until_started(self) -> None:\n if self._server is None:\n raise RuntimeError(\"Server is not initialized\")\n deadline = asyncio.get_running_loop().time() + max(float(self._timeout), 1.0)\n while not self._server.started:\n if self._error is not None:\n raise RuntimeError(\"HTTP control server failed to start\") from self._error\n if asyncio.get_running_loop().time() >= deadline:\n raise TimeoutError(\"HTTP control server startup timed out\")\n await asyncio.sleep(0.05)\n\n def _serve(self) -> None:\n if self._server is None:\n return\n try:\n asyncio.run(self._server.serve())\n except BaseException as exc: # noqa: BLE001\n self._error = exc", + "start_line": 10, + "end_line": 61, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_runner", + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/base.py", + "title": "src/app_runtime/control/base.py:ControlChannel", + "content": "class ControlChannel(ABC):\n @abstractmethod\n async def start(self, actions: ControlActionSet) -> None:\n \"\"\"Start the control channel and bind handlers.\"\"\"\n\n @abstractmethod\n async def stop(self) -> None:\n \"\"\"Stop the control channel and release resources.\"\"\"", + "start_line": 21, + "end_line": 28, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/__init__.py", + "title": "src/app_runtime/control/__init__.py:1-5", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\"ControlActionSet\", \"ControlChannel\", \"ControlPlaneService\", \"HttpControlChannel\"]", + "start_line": 1, + "end_line": 5, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/http_app.py", + "title": "src/app_runtime/control/http_app.py:HttpControlAppFactory", + "content": "class HttpControlAppFactory:\n def create(\n self,\n health_provider: Callable[[], Awaitable[HealthPayload]],\n action_provider: Callable[[str, str], Awaitable[JSONResponse]],\n ) -> FastAPI:\n app = FastAPI(title=\"PLBA Control API\")\n\n @app.middleware(\"http\")\n async def log_api_call(request: Request, call_next): # type: ignore[no-untyped-def]\n started = time.monotonic()\n response = await call_next(request)\n response.headers[\"X-Response-Time-Ms\"] = str(int((time.monotonic() - started) * 1000))\n return response\n\n @app.get(\"/health\")\n async def health() -> JSONResponse:\n payload = await health_provider()\n status_code = 200 if payload.get(\"status\") == \"ok\" else 503\n return JSONResponse(content=payload, status_code=status_code)\n\n @app.get(\"/actions/{action}\")\n @app.post(\"/actions/{action}\")\n async def action(action: str, request: Request) -> JSONResponse:\n client_source = self._client_source(request)\n if action in {\"start\", \"stop\"}:\n LOGGER.warning(\"Control action requested: /actions/%s client=%s\", action, client_source)\n return await action_provider(action, client_source)\n\n return app\n\n def _client_source(self, request: Request) -> str:\n explicit_header = request.headers.get(\"X-Client-Source\", \"\").strip()\n if explicit_header:\n return explicit_header\n user_agent = request.headers.get(\"User-Agent\", \"\").strip()\n if user_agent:\n return f\"user-agent:{user_agent}\"\n return \"unknown\"", + "start_line": 15, + "end_line": 53, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/http_channel.py", + "title": "src/app_runtime/control/http_channel.py:HttpControlChannel", + "content": "class HttpControlChannel(ControlChannel):\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._timeout = timeout\n self._runner = UvicornThreadRunner(host, port, timeout)\n self._factory = HttpControlAppFactory()\n self._actions: ControlActionSet | None = None\n\n async def start(self, actions: ControlActionSet) -> None:\n self._actions = actions\n app = self._factory.create(self._health_response, self._action_response)\n await self._runner.start(app)\n\n async def stop(self) -> None:\n await self._runner.stop()\n\n @property\n def port(self) -> int:\n return self._runner.port\n\n async def _health_response(self) -> dict[str, object]:\n if self._actions is None:\n return {\"status\": \"unhealthy\", \"detail\": \"control actions are not configured\"}\n return await asyncio.wait_for(self._actions.health(), timeout=float(self._timeout))\n\n async def _action_response(self, action: str, _client_source: str = \"unknown\") -> JSONResponse:\n if self._actions is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"{action} handler is not configured\"}, status_code=404)\n callbacks = {\n \"start\": self._actions.start,\n \"stop\": self._actions.stop,\n \"status\": self._actions.status,\n }\n callback = callbacks.get(action)\n if callback is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"unsupported action: {action}\"}, status_code=404)\n action_timeout = max(float(self._timeout), 10.0) if action in {\"start\", \"stop\"} else float(self._timeout)\n try:\n detail = await asyncio.wait_for(callback(), timeout=action_timeout)\n except asyncio.TimeoutError:\n return JSONResponse(\n content={\"status\": \"accepted\", \"detail\": f\"{action} operation is still in progress\"},\n status_code=202,\n )\n except Exception as exc:\n return JSONResponse(content={\"status\": \"error\", \"detail\": str(exc)}, status_code=500)\n return JSONResponse(content={\"status\": \"ok\", \"detail\": detail or f\"{action} action accepted\"}, status_code=200)", + "start_line": 12, + "end_line": 57, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/base.py", + "title": "src/app_runtime/control/base.py:ControlActionSet", + "content": "class ControlActionSet:\n health: HealthHandler\n start: ActionHandler\n stop: ActionHandler\n status: ActionHandler", + "start_line": 14, + "end_line": 18, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/plba/control.py", + "title": "src/plba/control.py:1-10", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\n \"ControlActionSet\",\n \"ControlChannel\",\n \"ControlPlaneService\",\n \"HttpControlChannel\",\n]", + "start_line": 1, + "end_line": 10, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.control", + "is_test": false, + "blob_sha": "31bd5c4481bfa7fbca8fae56d4860a67e3953ca74474ac8439e1f39b685d7bc8", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/base.py", + "title": "ControlActionSet", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "start_line": 14, + "end_line": 18, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/base.py", + "title": "ControlChannel", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "start_line": 21, + "end_line": 28, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "start_line": 12, + "end_line": 52, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/http_runner.py", + "title": "UvicornThreadRunner", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "start_line": 10, + "end_line": 61, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/http_channel.py", + "title": "HttpControlChannel", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "start_line": 12, + "end_line": 57, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/http_app.py", + "title": "HttpControlAppFactory", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "start_line": 15, + "end_line": 53, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "title": "WorkflowPersistence", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "start_line": 8, + "end_line": 54, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/queue/in_memory.py", + "title": "InMemoryTaskQueue", + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)", + "start_line": 9, + "end_line": 38, + "metadata": { + "symbol_id": "2da04cb94544a3bcbf0943a95ad4bdd8710bcafaa32a02fd0e4de2178dcf3533", + "symbol_name": "InMemoryTaskQueue", + "qname": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 9, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "58f0cc001ccda0eee4c6bc32ed83bd05eafd6b6644f1e8b4aa9eed3103db73dc", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "start_line": 14, + "end_line": 25, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "start_line": 14, + "end_line": 51, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "start_line": 14, + "end_line": 17, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "start_line": 14, + "end_line": 20, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "start_line": 14, + "end_line": 47, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.register_channel:reads_attr", + "content": "ControlPlaneService.register_channel reads_attr self._channels.append", + "start_line": 17, + "end_line": 17, + "metadata": { + "edge_id": "1ee5925deffdc38ba15b88bf7c89e5fcd1a78f493fe30f2deb827d714a1b18e8", + "edge_type": "reads_attr", + "src_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "src_qname": "ControlPlaneService.register_channel", + "dst_symbol_id": null, + "dst_ref": "self._channels.append", + "resolution": "partial", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C3_ENTRYPOINTS", + "path": "src/app_runtime/control/http_app.py", + "title": "app.post", + "content": "fastapi http app.post", + "start_line": 38, + "end_line": 42, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C3_ENTRYPOINTS", + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "content": "fastapi http app.get", + "start_line": 31, + "end_line": 34, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C3_ENTRYPOINTS", + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "content": "fastapi http app.get", + "start_line": 38, + "end_line": 42, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "relations": [ + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop" + }, + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async" + }, + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel" + }, + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start" + }, + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async" + }, + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "1ee5925deffdc38ba15b88bf7c89e5fcd1a78f493fe30f2deb827d714a1b18e8", + "edge_type": "reads_attr", + "src_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "src_qname": "ControlPlaneService.register_channel", + "dst_symbol_id": null, + "dst_ref": "self._channels.append", + "resolution": "partial", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.register_channel reads_attr self._channels.append" + } + ], + "entrypoints": [ + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.post", + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "test_candidates": [], + "layer_outcomes": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C4_SEMANTIC_ROLES", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 6, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C3_ENTRYPOINTS", + "hit_count": 3, + "empty": false, + "fallback_used": false + } + ], + "missing_layers": [], + "raw_rows": [ + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlChannel\nControlChannel(ABC)", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "qname": "ControlChannel", + "kind": "class", + "signature": "ControlChannel(ABC)", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "method ControlChannel.stop\nstop(self)\nStop the control channel and release resources.", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlChannel.stop", + "span_start": 27, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "54b5adf9866c526836221dc721b474ba23fbec83e1b1d3b8bc4da67ae3c1541d", + "qname": "ControlChannel.stop", + "kind": "method", + "signature": "stop(self)", + "parent_symbol_id": "ControlChannel", + "package_or_module": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlActionSet\nControlActionSet", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "qname": "ControlActionSet", + "kind": "class", + "signature": "ControlActionSet", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "const ControlChannel\nControlChannel = app_runtime.control.base.ControlChannel", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlChannel", + "span_start": 1, + "span_end": 1, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "268420f7aa4ed74082b9276cae0cded4f00bac090ffd58fa020a65be0fe19c27", + "qname": "ControlChannel", + "kind": "const", + "signature": "ControlChannel = app_runtime.control.base.ControlChannel", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "const ControlPlaneService\nControlPlaneService = app_runtime.control.service.ControlPlaneService", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlPlaneService", + "span_start": 3, + "span_end": 3, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "217e8f044d1c01644bf7b81e5046af9e84469210c692a2fb0c476a19bb069ae1", + "qname": "ControlPlaneService", + "kind": "const", + "signature": "ControlPlaneService = app_runtime.control.service.ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "method ControlChannel.start\nstart(self, actions)\nStart the control channel and bind handlers.", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlChannel.start", + "span_start": 23, + "span_end": 24, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "e01e0d50d0f48d0c84c119c989b7a7c57ceea263811ce2605c684ae24d1a03b1", + "qname": "ControlChannel.start", + "kind": "method", + "signature": "start(self, actions)", + "parent_symbol_id": "ControlChannel", + "package_or_module": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "const ControlActionSet\nControlActionSet = app_runtime.control.base.ControlActionSet", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlActionSet", + "span_start": 1, + "span_end": 1, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "767e4ac0d4224aeccb0783a38359d3c03899a876736eb83d99887c16ea07cc6c", + "qname": "ControlActionSet", + "kind": "const", + "signature": "ControlActionSet = app_runtime.control.base.ControlActionSet", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "const ControlActionSet\nControlActionSet = app_runtime.control.base.ControlActionSet", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlActionSet", + "span_start": 7, + "span_end": 7, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "2132a5717c57061e3488a1bf4d43650a60ea903a42278f4d494c014bc80d2df9", + "qname": "ControlActionSet", + "kind": "const", + "signature": "ControlActionSet = app_runtime.control.base.ControlActionSet", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "class ControlPlaneService:\n def __init__(self) -> None:\n self._channels: list[ControlChannel] = []\n\n def register_channel(self, channel: ControlChannel) -> None:\n self._channels.append(channel)\n\n def start(self, runtime: RuntimeManager) -> None:\n if not self._channels:\n return\n asyncio.run(self._start_async(runtime))\n\n def stop(self) -> None:\n if not self._channels:\n return\n asyncio.run(self._stop_async())\n\n def snapshot(self, runtime: RuntimeManager) -> dict[str, object]:\n health = runtime.current_health()\n return {\n \"runtime\": {\"state\": runtime._state.value},\n \"modules\": list(runtime.registry.modules),\n \"services\": runtime.services.snapshot(),\n \"workers\": runtime.workers.snapshot(),\n \"health\": runtime.health.snapshot(runtime.workers.healths()) | {\"status\": health[\"status\"]},\n \"config\": runtime.configuration.get(),\n }\n\n async def _start_async(self, runtime: RuntimeManager) -> None:\n actions = ControlActionSet(\n health=runtime.health_status,\n start=runtime.start_runtime,\n stop=runtime.stop_runtime,\n status=runtime.runtime_status,\n )\n for channel in self._channels:\n await channel.start(actions)\n\n async def _stop_async(self) -> None:\n for channel in reversed(self._channels):\n await channel.stop()", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/service.py:ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "class UvicornThreadRunner:\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._host = host\n self._port = port\n self._timeout = timeout\n self._server: Server | None = None\n self._thread: Thread | None = None\n self._error: BaseException | None = None\n\n async def start(self, app: FastAPI) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._error = None\n config = Config(app=app, host=self._host, port=self._port, log_level=\"warning\")\n self._server = Server(config)\n self._thread = Thread(target=self._serve, name=\"plba-http-control\", daemon=True)\n self._thread.start()\n await self._wait_until_started()\n\n async def stop(self) -> None:\n if self._server is None or self._thread is None:\n return\n self._server.should_exit = True\n await asyncio.to_thread(self._thread.join, self._timeout)\n self._server = None\n self._thread = None\n\n @property\n def port(self) -> int:\n if self._server is None or not getattr(self._server, \"servers\", None):\n return self._port\n socket = self._server.servers[0].sockets[0]\n return int(socket.getsockname()[1])\n\n async def _wait_until_started(self) -> None:\n if self._server is None:\n raise RuntimeError(\"Server is not initialized\")\n deadline = asyncio.get_running_loop().time() + max(float(self._timeout), 1.0)\n while not self._server.started:\n if self._error is not None:\n raise RuntimeError(\"HTTP control server failed to start\") from self._error\n if asyncio.get_running_loop().time() >= deadline:\n raise TimeoutError(\"HTTP control server startup timed out\")\n await asyncio.sleep(0.05)\n\n def _serve(self) -> None:\n if self._server is None:\n return\n try:\n asyncio.run(self._server.serve())\n except BaseException as exc: # noqa: BLE001\n self._error = exc", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_runner.py:UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_runner", + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlChannel(ABC):\n @abstractmethod\n async def start(self, actions: ControlActionSet) -> None:\n \"\"\"Start the control channel and bind handlers.\"\"\"\n\n @abstractmethod\n async def stop(self) -> None:\n \"\"\"Stop the control channel and release resources.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\"ControlActionSet\", \"ControlChannel\", \"ControlPlaneService\", \"HttpControlChannel\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/__init__.py:1-5", + "span_start": 1, + "span_end": 5, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "class HttpControlAppFactory:\n def create(\n self,\n health_provider: Callable[[], Awaitable[HealthPayload]],\n action_provider: Callable[[str, str], Awaitable[JSONResponse]],\n ) -> FastAPI:\n app = FastAPI(title=\"PLBA Control API\")\n\n @app.middleware(\"http\")\n async def log_api_call(request: Request, call_next): # type: ignore[no-untyped-def]\n started = time.monotonic()\n response = await call_next(request)\n response.headers[\"X-Response-Time-Ms\"] = str(int((time.monotonic() - started) * 1000))\n return response\n\n @app.get(\"/health\")\n async def health() -> JSONResponse:\n payload = await health_provider()\n status_code = 200 if payload.get(\"status\") == \"ok\" else 503\n return JSONResponse(content=payload, status_code=status_code)\n\n @app.get(\"/actions/{action}\")\n @app.post(\"/actions/{action}\")\n async def action(action: str, request: Request) -> JSONResponse:\n client_source = self._client_source(request)\n if action in {\"start\", \"stop\"}:\n LOGGER.warning(\"Control action requested: /actions/%s client=%s\", action, client_source)\n return await action_provider(action, client_source)\n\n return app\n\n def _client_source(self, request: Request) -> str:\n explicit_header = request.headers.get(\"X-Client-Source\", \"\").strip()\n if explicit_header:\n return explicit_header\n user_agent = request.headers.get(\"User-Agent\", \"\").strip()\n if user_agent:\n return f\"user-agent:{user_agent}\"\n return \"unknown\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_app.py:HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel(ControlChannel):\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._timeout = timeout\n self._runner = UvicornThreadRunner(host, port, timeout)\n self._factory = HttpControlAppFactory()\n self._actions: ControlActionSet | None = None\n\n async def start(self, actions: ControlActionSet) -> None:\n self._actions = actions\n app = self._factory.create(self._health_response, self._action_response)\n await self._runner.start(app)\n\n async def stop(self) -> None:\n await self._runner.stop()\n\n @property\n def port(self) -> int:\n return self._runner.port\n\n async def _health_response(self) -> dict[str, object]:\n if self._actions is None:\n return {\"status\": \"unhealthy\", \"detail\": \"control actions are not configured\"}\n return await asyncio.wait_for(self._actions.health(), timeout=float(self._timeout))\n\n async def _action_response(self, action: str, _client_source: str = \"unknown\") -> JSONResponse:\n if self._actions is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"{action} handler is not configured\"}, status_code=404)\n callbacks = {\n \"start\": self._actions.start,\n \"stop\": self._actions.stop,\n \"status\": self._actions.status,\n }\n callback = callbacks.get(action)\n if callback is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"unsupported action: {action}\"}, status_code=404)\n action_timeout = max(float(self._timeout), 10.0) if action in {\"start\", \"stop\"} else float(self._timeout)\n try:\n detail = await asyncio.wait_for(callback(), timeout=action_timeout)\n except asyncio.TimeoutError:\n return JSONResponse(\n content={\"status\": \"accepted\", \"detail\": f\"{action} operation is still in progress\"},\n status_code=202,\n )\n except Exception as exc:\n return JSONResponse(content={\"status\": \"error\", \"detail\": str(exc)}, status_code=500)\n return JSONResponse(content={\"status\": \"ok\", \"detail\": detail or f\"{action} action accepted\"}, status_code=200)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_channel.py:HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlActionSet:\n health: HealthHandler\n start: ActionHandler\n stop: ActionHandler\n status: ActionHandler", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/control.py", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\n \"ControlActionSet\",\n \"ControlChannel\",\n \"ControlPlaneService\",\n \"HttpControlChannel\",\n]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/control.py:1-10", + "span_start": 1, + "span_end": 10, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.control", + "is_test": false, + "blob_sha": "31bd5c4481bfa7fbca8fae56d4860a67e3953ca74474ac8439e1f39b685d7bc8", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/queue/in_memory.py", + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)", + "layer": "C4_SEMANTIC_ROLES", + "title": "InMemoryTaskQueue", + "span_start": 9, + "span_end": 38, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 22, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "2da04cb94544a3bcbf0943a95ad4bdd8710bcafaa32a02fd0e4de2178dcf3533", + "symbol_name": "InMemoryTaskQueue", + "qname": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 9, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "58f0cc001ccda0eee4c6bc32ed83bd05eafd6b6644f1e8b4aa9eed3103db73dc", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.register_channel reads_attr self._channels.append", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.register_channel:reads_attr", + "span_start": 17, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "1ee5925deffdc38ba15b88bf7c89e5fcd1a78f493fe30f2deb827d714a1b18e8", + "edge_type": "reads_attr", + "src_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "src_qname": "ControlPlaneService.register_channel", + "dst_symbol_id": null, + "dst_ref": "self._channels.append", + "resolution": "partial", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": null, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": null, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": null, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "retrieval_report": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "vector", + "C0_SOURCE_CHUNKS": "vector", + "C4_SEMANTIC_ROLES": "vector", + "C2_DEPENDENCY_GRAPH": "vector", + "C3_ENTRYPOINTS": "vector" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [] + } + }, + "fallback": { + "used": false, + "reason": null + }, + "retrieval_by_layer_ms": { + "C1_SYMBOL_CATALOG": 42, + "C0_SOURCE_CHUNKS": 20, + "C4_SEMANTIC_ROLES": 18, + "C2_DEPENDENCY_GRAPH": 54, + "C3_ENTRYPOINTS": 10 + } + } + }, + "diagnostics": { + "intent_correct": null, + "target_found": true, + "layers_used": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_sufficient": true, + "answer_mode": "normal", + "router_result": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "EXPLAIN", + "path_scope": [], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_resolution_status": "pending" + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Объясни класс RuntimeFactoryManager", + "sub_intent": "EXPLAIN", + "path_scope": [], + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C4_SEMANTIC_ROLES", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 6, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C3_ENTRYPOINTS", + "hit_count": 3, + "empty": false, + "fallback_used": false + } + ], + "empty_layers": [], + "evidence_gate_decision": { + "sufficient": true, + "failure_reasons": [], + "evidence_count": 33 + }, + "failure_reasons": [], + "timings_ms": {} + }, + "rag_rows": [ + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlChannel\nControlChannel(ABC)", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "qname": "ControlChannel", + "kind": "class", + "signature": "ControlChannel(ABC)", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "method ControlChannel.stop\nstop(self)\nStop the control channel and release resources.", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlChannel.stop", + "span_start": 27, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "54b5adf9866c526836221dc721b474ba23fbec83e1b1d3b8bc4da67ae3c1541d", + "qname": "ControlChannel.stop", + "kind": "method", + "signature": "stop(self)", + "parent_symbol_id": "ControlChannel", + "package_or_module": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlActionSet\nControlActionSet", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "qname": "ControlActionSet", + "kind": "class", + "signature": "ControlActionSet", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "const ControlChannel\nControlChannel = app_runtime.control.base.ControlChannel", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlChannel", + "span_start": 1, + "span_end": 1, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "268420f7aa4ed74082b9276cae0cded4f00bac090ffd58fa020a65be0fe19c27", + "qname": "ControlChannel", + "kind": "const", + "signature": "ControlChannel = app_runtime.control.base.ControlChannel", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "const ControlPlaneService\nControlPlaneService = app_runtime.control.service.ControlPlaneService", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlPlaneService", + "span_start": 3, + "span_end": 3, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "217e8f044d1c01644bf7b81e5046af9e84469210c692a2fb0c476a19bb069ae1", + "qname": "ControlPlaneService", + "kind": "const", + "signature": "ControlPlaneService = app_runtime.control.service.ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "method ControlChannel.start\nstart(self, actions)\nStart the control channel and bind handlers.", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlChannel.start", + "span_start": 23, + "span_end": 24, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "e01e0d50d0f48d0c84c119c989b7a7c57ceea263811ce2605c684ae24d1a03b1", + "qname": "ControlChannel.start", + "kind": "method", + "signature": "start(self, actions)", + "parent_symbol_id": "ControlChannel", + "package_or_module": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "const ControlActionSet\nControlActionSet = app_runtime.control.base.ControlActionSet", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlActionSet", + "span_start": 1, + "span_end": 1, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "767e4ac0d4224aeccb0783a38359d3c03899a876736eb83d99887c16ea07cc6c", + "qname": "ControlActionSet", + "kind": "const", + "signature": "ControlActionSet = app_runtime.control.base.ControlActionSet", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "const ControlActionSet\nControlActionSet = app_runtime.control.base.ControlActionSet", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlActionSet", + "span_start": 7, + "span_end": 7, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "2132a5717c57061e3488a1bf4d43650a60ea903a42278f4d494c014bc80d2df9", + "qname": "ControlActionSet", + "kind": "const", + "signature": "ControlActionSet = app_runtime.control.base.ControlActionSet", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "class ControlPlaneService:\n def __init__(self) -> None:\n self._channels: list[ControlChannel] = []\n\n def register_channel(self, channel: ControlChannel) -> None:\n self._channels.append(channel)\n\n def start(self, runtime: RuntimeManager) -> None:\n if not self._channels:\n return\n asyncio.run(self._start_async(runtime))\n\n def stop(self) -> None:\n if not self._channels:\n return\n asyncio.run(self._stop_async())\n\n def snapshot(self, runtime: RuntimeManager) -> dict[str, object]:\n health = runtime.current_health()\n return {\n \"runtime\": {\"state\": runtime._state.value},\n \"modules\": list(runtime.registry.modules),\n \"services\": runtime.services.snapshot(),\n \"workers\": runtime.workers.snapshot(),\n \"health\": runtime.health.snapshot(runtime.workers.healths()) | {\"status\": health[\"status\"]},\n \"config\": runtime.configuration.get(),\n }\n\n async def _start_async(self, runtime: RuntimeManager) -> None:\n actions = ControlActionSet(\n health=runtime.health_status,\n start=runtime.start_runtime,\n stop=runtime.stop_runtime,\n status=runtime.runtime_status,\n )\n for channel in self._channels:\n await channel.start(actions)\n\n async def _stop_async(self) -> None:\n for channel in reversed(self._channels):\n await channel.stop()", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/service.py:ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "class UvicornThreadRunner:\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._host = host\n self._port = port\n self._timeout = timeout\n self._server: Server | None = None\n self._thread: Thread | None = None\n self._error: BaseException | None = None\n\n async def start(self, app: FastAPI) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._error = None\n config = Config(app=app, host=self._host, port=self._port, log_level=\"warning\")\n self._server = Server(config)\n self._thread = Thread(target=self._serve, name=\"plba-http-control\", daemon=True)\n self._thread.start()\n await self._wait_until_started()\n\n async def stop(self) -> None:\n if self._server is None or self._thread is None:\n return\n self._server.should_exit = True\n await asyncio.to_thread(self._thread.join, self._timeout)\n self._server = None\n self._thread = None\n\n @property\n def port(self) -> int:\n if self._server is None or not getattr(self._server, \"servers\", None):\n return self._port\n socket = self._server.servers[0].sockets[0]\n return int(socket.getsockname()[1])\n\n async def _wait_until_started(self) -> None:\n if self._server is None:\n raise RuntimeError(\"Server is not initialized\")\n deadline = asyncio.get_running_loop().time() + max(float(self._timeout), 1.0)\n while not self._server.started:\n if self._error is not None:\n raise RuntimeError(\"HTTP control server failed to start\") from self._error\n if asyncio.get_running_loop().time() >= deadline:\n raise TimeoutError(\"HTTP control server startup timed out\")\n await asyncio.sleep(0.05)\n\n def _serve(self) -> None:\n if self._server is None:\n return\n try:\n asyncio.run(self._server.serve())\n except BaseException as exc: # noqa: BLE001\n self._error = exc", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_runner.py:UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_runner", + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlChannel(ABC):\n @abstractmethod\n async def start(self, actions: ControlActionSet) -> None:\n \"\"\"Start the control channel and bind handlers.\"\"\"\n\n @abstractmethod\n async def stop(self) -> None:\n \"\"\"Stop the control channel and release resources.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\"ControlActionSet\", \"ControlChannel\", \"ControlPlaneService\", \"HttpControlChannel\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/__init__.py:1-5", + "span_start": 1, + "span_end": 5, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "class HttpControlAppFactory:\n def create(\n self,\n health_provider: Callable[[], Awaitable[HealthPayload]],\n action_provider: Callable[[str, str], Awaitable[JSONResponse]],\n ) -> FastAPI:\n app = FastAPI(title=\"PLBA Control API\")\n\n @app.middleware(\"http\")\n async def log_api_call(request: Request, call_next): # type: ignore[no-untyped-def]\n started = time.monotonic()\n response = await call_next(request)\n response.headers[\"X-Response-Time-Ms\"] = str(int((time.monotonic() - started) * 1000))\n return response\n\n @app.get(\"/health\")\n async def health() -> JSONResponse:\n payload = await health_provider()\n status_code = 200 if payload.get(\"status\") == \"ok\" else 503\n return JSONResponse(content=payload, status_code=status_code)\n\n @app.get(\"/actions/{action}\")\n @app.post(\"/actions/{action}\")\n async def action(action: str, request: Request) -> JSONResponse:\n client_source = self._client_source(request)\n if action in {\"start\", \"stop\"}:\n LOGGER.warning(\"Control action requested: /actions/%s client=%s\", action, client_source)\n return await action_provider(action, client_source)\n\n return app\n\n def _client_source(self, request: Request) -> str:\n explicit_header = request.headers.get(\"X-Client-Source\", \"\").strip()\n if explicit_header:\n return explicit_header\n user_agent = request.headers.get(\"User-Agent\", \"\").strip()\n if user_agent:\n return f\"user-agent:{user_agent}\"\n return \"unknown\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_app.py:HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel(ControlChannel):\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._timeout = timeout\n self._runner = UvicornThreadRunner(host, port, timeout)\n self._factory = HttpControlAppFactory()\n self._actions: ControlActionSet | None = None\n\n async def start(self, actions: ControlActionSet) -> None:\n self._actions = actions\n app = self._factory.create(self._health_response, self._action_response)\n await self._runner.start(app)\n\n async def stop(self) -> None:\n await self._runner.stop()\n\n @property\n def port(self) -> int:\n return self._runner.port\n\n async def _health_response(self) -> dict[str, object]:\n if self._actions is None:\n return {\"status\": \"unhealthy\", \"detail\": \"control actions are not configured\"}\n return await asyncio.wait_for(self._actions.health(), timeout=float(self._timeout))\n\n async def _action_response(self, action: str, _client_source: str = \"unknown\") -> JSONResponse:\n if self._actions is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"{action} handler is not configured\"}, status_code=404)\n callbacks = {\n \"start\": self._actions.start,\n \"stop\": self._actions.stop,\n \"status\": self._actions.status,\n }\n callback = callbacks.get(action)\n if callback is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"unsupported action: {action}\"}, status_code=404)\n action_timeout = max(float(self._timeout), 10.0) if action in {\"start\", \"stop\"} else float(self._timeout)\n try:\n detail = await asyncio.wait_for(callback(), timeout=action_timeout)\n except asyncio.TimeoutError:\n return JSONResponse(\n content={\"status\": \"accepted\", \"detail\": f\"{action} operation is still in progress\"},\n status_code=202,\n )\n except Exception as exc:\n return JSONResponse(content={\"status\": \"error\", \"detail\": str(exc)}, status_code=500)\n return JSONResponse(content={\"status\": \"ok\", \"detail\": detail or f\"{action} action accepted\"}, status_code=200)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_channel.py:HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlActionSet:\n health: HealthHandler\n start: ActionHandler\n stop: ActionHandler\n status: ActionHandler", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/control.py", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\n \"ControlActionSet\",\n \"ControlChannel\",\n \"ControlPlaneService\",\n \"HttpControlChannel\",\n]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/control.py:1-10", + "span_start": 1, + "span_end": 10, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.control", + "is_test": false, + "blob_sha": "31bd5c4481bfa7fbca8fae56d4860a67e3953ca74474ac8439e1f39b685d7bc8", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/queue/in_memory.py", + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)", + "layer": "C4_SEMANTIC_ROLES", + "title": "InMemoryTaskQueue", + "span_start": 9, + "span_end": 38, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 22, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "2da04cb94544a3bcbf0943a95ad4bdd8710bcafaa32a02fd0e4de2178dcf3533", + "symbol_name": "InMemoryTaskQueue", + "qname": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 9, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "58f0cc001ccda0eee4c6bc32ed83bd05eafd6b6644f1e8b4aa9eed3103db73dc", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.register_channel reads_attr self._channels.append", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.register_channel:reads_attr", + "span_start": 17, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "1ee5925deffdc38ba15b88bf7c89e5fcd1a78f493fe30f2deb827d714a1b18e8", + "edge_type": "reads_attr", + "src_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "src_qname": "ControlPlaneService.register_channel", + "dst_symbol_id": null, + "dst_ref": "self._channels.append", + "resolution": "partial", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "validation": { + "passed": true, + "action": "return", + "reasons": [] + } + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-explain-nonexistent-symbol.md b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-explain-nonexistent-symbol.md new file mode 100644 index 0000000..2908407 --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-explain-nonexistent-symbol.md @@ -0,0 +1,36 @@ +# plba-v2-explain-nonexistent-symbol + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: agent_runtime +- mode: full_chain +- passed: False + +## Query +Объясни класс RuntimeFactoryManager + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 33, + "llm_answer": "Класс `RuntimeFactoryManager` не найден в предоставленном коде или контекстной информации.\n\nКлючевые шаги и опорные файлы:\n1. Код и контекста относятся к управлению каналами управления («control channels») в приложении.\n2. Основные классы включают `ControlChannel`, `ControlActionSet`, и связанные с ними каналы и сервисы.\n3. Основной файл для рассмотрения — `base.py`.\n4. Ключевые обязанности и интерфейсы описаны через абстрактные методы (`start`, `stop`) в классе `ControlChannel`. \n\nПоскольку конкретный класс `RuntimeFactoryManager` отсутствует в данном контексте, невозможно предоставить его объяснение.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "RuntimeFactoryManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] +} + +## Mismatches +- answer_mode: expected degraded, got answered +- retrieval: expected empty rag, got 33 rows +- llm: expected answer to contain 'не найдена' \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-explain-runtime-manager.json b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-explain-runtime-manager.json new file mode 100644 index 0000000..3a125c2 --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-explain-runtime-manager.json @@ -0,0 +1,4154 @@ +{ + "case_id": "plba-v2-explain-runtime-manager", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "agent_runtime", + "mode": "full_chain", + "query": "Объясни как работает класс RuntimeManager", + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 33, + "llm_answer": "Класс `RuntimeManager` играет ключевую роль в управлении выполнением приложений и координации различных компонентов системы. Его основная функция заключается в оркестрации действий, связанных с жизненным циклом приложения, включая инициализацию, запуск и остановку сервисов и модулей.\n\n**Ключевые шаги работы класса:**\n1. Инициализация конфигурации и состояния (`__init__`).\n2. Добавление конфигурационных файлов и настроек (`add_config_file`).\n3. Управление состоянием выполнения через чтение и запись атрибутов состояния (`configuration`, `_state`).\n4. Оркестровка вызова методов запуска и остановки для различных компонентов (`start`, `stop`).\n5. Участие в обработке данных потока и управлении потоками задач (`participates in dataflow slices`).\n\n**Опорные файлы:**\n- `src/app_runtime/core/runtime.py:18-179`\n- `src/app_runtime/control/service.py:12-52`\n- `src/app_runtime/control/base.py:21-28`\n- `src/app_runtime/control/base.py:14-18`", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "query": "Объясни как работает класс RuntimeManager", + "router_result": { + "schema_version": "1.1", + "intent": "CODE_QA", + "retrieval_profile": "code", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query_plan": { + "raw": "Объясни как работает класс RuntimeManager", + "normalized": "Объясни как работает класс RuntimeManager", + "sub_intent": "EXPLAIN", + "negations": [], + "expansions": [ + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "doc_scope_hints": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "symbol_kind_hint": "class", + "anchors": [ + { + "type": "SYMBOL", + "value": "RuntimeManager", + "source": "user_text", + "subtype": null, + "span": { + "start": 27, + "end": 41 + }, + "confidence": 0.88 + }, + { + "type": "KEY_TERM", + "value": "класс", + "source": "user_text", + "subtype": null, + "span": { + "start": 21, + "end": 26 + }, + "confidence": 0.9 + } + ] + }, + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "top_k": 8 + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 8 + }, + { + "layer_id": "C4_SEMANTIC_ROLES", + "top_k": 8 + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "top_k": 6 + }, + { + "layer_id": "C3_ENTRYPOINTS", + "top_k": 6 + } + ], + "filters": { + "test_policy": "EXCLUDE", + "path_scope": [], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + }, + "symbol_resolution": { + "status": "pending", + "resolved_symbol": null, + "alternatives": [ + "RuntimeManager" + ], + "confidence": 0.0 + }, + "evidence_policy": { + "require_def": true, + "require_flow": true, + "require_spec": false, + "allow_answer_without_evidence": false + } + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Объясни как работает класс RuntimeManager", + "sub_intent": "EXPLAIN", + "path_scope": [], + "keyword_hints": [ + "RuntimeManager" + ], + "symbol_candidates": [ + "RuntimeManager" + ], + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "top_k": 8 + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 8 + }, + { + "layer_id": "C4_SEMANTIC_ROLES", + "top_k": 8 + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "top_k": 6 + }, + { + "layer_id": "C3_ENTRYPOINTS", + "top_k": 6 + } + ], + "filters": { + "test_policy": "EXCLUDE", + "path_scope": [], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + }, + "query_plan": { + "raw": "Объясни как работает класс RuntimeManager", + "normalized": "Объясни как работает класс RuntimeManager", + "sub_intent": "EXPLAIN", + "negations": [], + "expansions": [ + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "doc_scope_hints": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "symbol_kind_hint": "class", + "anchors": [ + { + "type": "SYMBOL", + "value": "RuntimeManager", + "source": "user_text", + "subtype": null, + "span": { + "start": 27, + "end": 41 + }, + "confidence": 0.88 + }, + { + "type": "KEY_TERM", + "value": "класс", + "source": "user_text", + "subtype": null, + "span": { + "start": 21, + "end": 26 + }, + "confidence": 0.9 + } + ] + } + }, + "retrieval_result": { + "target_symbol_candidates": [ + "RuntimeManager", + "ControlPlaneService", + "ControlChannel.start", + "ControlChannel.stop" + ], + "resolved_symbol": "RuntimeManager", + "symbol_resolution_status": "resolved", + "file_candidates": [ + "src/plba/bootstrap.py", + "src/app_runtime/control/service.py", + "src/app_runtime/core/runtime.py", + "src/plba/__init__.py", + "src/plba/core.py", + "src/app_runtime/control/__init__.py", + "src/app_runtime/control/base.py", + "src/app_runtime/control/http_runner.py", + "src/app_runtime/control/http_app.py", + "src/app_runtime/control/http_channel.py", + "src/plba/control.py", + "src/app_runtime/workflow/persistence/workflow_persistence.py" + ], + "code_chunks": [ + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/plba/bootstrap.py", + "title": "RuntimeManager", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "start_line": 4, + "end_line": 4, + "metadata": { + "symbol_id": "27158ca220022eeb5083c6addf8a50775d45f7161284fd60aac48410105f4b98", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/service.py", + "title": "RuntimeManager", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "start_line": 9, + "end_line": 9, + "metadata": { + "symbol_id": "62a9575c77aad894120d18b4f2a08cf2ba42f77e9be4a8a432b767d157701afe", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/core/runtime.py", + "title": "RuntimeManager", + "content": "class RuntimeManager\nRuntimeManager", + "start_line": 18, + "end_line": 179, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "qname": "RuntimeManager", + "kind": "class", + "signature": "RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/plba/__init__.py", + "title": "RuntimeManager", + "content": "const RuntimeManager\nRuntimeManager = plba.core.RuntimeManager", + "start_line": 16, + "end_line": 16, + "metadata": { + "symbol_id": "7eacec84f9b8d6c4201374591faecdac7493091c263681495c338973f2971ad9", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = plba.core.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/plba/core.py", + "title": "RuntimeManager", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "start_line": 2, + "end_line": 2, + "metadata": { + "symbol_id": "e1684562d978b7af7fe9b27dc5869d770348a87b5dc19a50360f58544668578b", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.core", + "is_test": false, + "blob_sha": "c0ae25110d20e665216616e26b68adfe035b624ba45d31d1272fb21f906f9ca8", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/__init__.py", + "title": "ControlPlaneService", + "content": "const ControlPlaneService\nControlPlaneService = app_runtime.control.service.ControlPlaneService", + "start_line": 3, + "end_line": 3, + "metadata": { + "symbol_id": "217e8f044d1c01644bf7b81e5046af9e84469210c692a2fb0c476a19bb069ae1", + "qname": "ControlPlaneService", + "kind": "const", + "signature": "ControlPlaneService = app_runtime.control.service.ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/base.py", + "title": "ControlChannel.start", + "content": "method ControlChannel.start\nstart(self, actions)\nStart the control channel and bind handlers.", + "start_line": 23, + "end_line": 24, + "metadata": { + "symbol_id": "e01e0d50d0f48d0c84c119c989b7a7c57ceea263811ce2605c684ae24d1a03b1", + "qname": "ControlChannel.start", + "kind": "method", + "signature": "start(self, actions)", + "parent_symbol_id": "ControlChannel", + "package_or_module": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/base.py", + "title": "ControlChannel.stop", + "content": "method ControlChannel.stop\nstop(self)\nStop the control channel and release resources.", + "start_line": 27, + "end_line": 28, + "metadata": { + "symbol_id": "54b5adf9866c526836221dc721b474ba23fbec83e1b1d3b8bc4da67ae3c1541d", + "qname": "ControlChannel.stop", + "kind": "method", + "signature": "stop(self)", + "parent_symbol_id": "ControlChannel", + "package_or_module": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/service.py", + "title": "src/app_runtime/control/service.py:ControlPlaneService", + "content": "class ControlPlaneService:\n def __init__(self) -> None:\n self._channels: list[ControlChannel] = []\n\n def register_channel(self, channel: ControlChannel) -> None:\n self._channels.append(channel)\n\n def start(self, runtime: RuntimeManager) -> None:\n if not self._channels:\n return\n asyncio.run(self._start_async(runtime))\n\n def stop(self) -> None:\n if not self._channels:\n return\n asyncio.run(self._stop_async())\n\n def snapshot(self, runtime: RuntimeManager) -> dict[str, object]:\n health = runtime.current_health()\n return {\n \"runtime\": {\"state\": runtime._state.value},\n \"modules\": list(runtime.registry.modules),\n \"services\": runtime.services.snapshot(),\n \"workers\": runtime.workers.snapshot(),\n \"health\": runtime.health.snapshot(runtime.workers.healths()) | {\"status\": health[\"status\"]},\n \"config\": runtime.configuration.get(),\n }\n\n async def _start_async(self, runtime: RuntimeManager) -> None:\n actions = ControlActionSet(\n health=runtime.health_status,\n start=runtime.start_runtime,\n stop=runtime.stop_runtime,\n status=runtime.runtime_status,\n )\n for channel in self._channels:\n await channel.start(actions)\n\n async def _stop_async(self) -> None:\n for channel in reversed(self._channels):\n await channel.stop()", + "start_line": 12, + "end_line": 52, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/http_runner.py", + "title": "src/app_runtime/control/http_runner.py:UvicornThreadRunner", + "content": "class UvicornThreadRunner:\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._host = host\n self._port = port\n self._timeout = timeout\n self._server: Server | None = None\n self._thread: Thread | None = None\n self._error: BaseException | None = None\n\n async def start(self, app: FastAPI) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._error = None\n config = Config(app=app, host=self._host, port=self._port, log_level=\"warning\")\n self._server = Server(config)\n self._thread = Thread(target=self._serve, name=\"plba-http-control\", daemon=True)\n self._thread.start()\n await self._wait_until_started()\n\n async def stop(self) -> None:\n if self._server is None or self._thread is None:\n return\n self._server.should_exit = True\n await asyncio.to_thread(self._thread.join, self._timeout)\n self._server = None\n self._thread = None\n\n @property\n def port(self) -> int:\n if self._server is None or not getattr(self._server, \"servers\", None):\n return self._port\n socket = self._server.servers[0].sockets[0]\n return int(socket.getsockname()[1])\n\n async def _wait_until_started(self) -> None:\n if self._server is None:\n raise RuntimeError(\"Server is not initialized\")\n deadline = asyncio.get_running_loop().time() + max(float(self._timeout), 1.0)\n while not self._server.started:\n if self._error is not None:\n raise RuntimeError(\"HTTP control server failed to start\") from self._error\n if asyncio.get_running_loop().time() >= deadline:\n raise TimeoutError(\"HTTP control server startup timed out\")\n await asyncio.sleep(0.05)\n\n def _serve(self) -> None:\n if self._server is None:\n return\n try:\n asyncio.run(self._server.serve())\n except BaseException as exc: # noqa: BLE001\n self._error = exc", + "start_line": 10, + "end_line": 61, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_runner", + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/base.py", + "title": "src/app_runtime/control/base.py:ControlChannel", + "content": "class ControlChannel(ABC):\n @abstractmethod\n async def start(self, actions: ControlActionSet) -> None:\n \"\"\"Start the control channel and bind handlers.\"\"\"\n\n @abstractmethod\n async def stop(self) -> None:\n \"\"\"Stop the control channel and release resources.\"\"\"", + "start_line": 21, + "end_line": 28, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/__init__.py", + "title": "src/app_runtime/control/__init__.py:1-5", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\"ControlActionSet\", \"ControlChannel\", \"ControlPlaneService\", \"HttpControlChannel\"]", + "start_line": 1, + "end_line": 5, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/http_app.py", + "title": "src/app_runtime/control/http_app.py:HttpControlAppFactory", + "content": "class HttpControlAppFactory:\n def create(\n self,\n health_provider: Callable[[], Awaitable[HealthPayload]],\n action_provider: Callable[[str, str], Awaitable[JSONResponse]],\n ) -> FastAPI:\n app = FastAPI(title=\"PLBA Control API\")\n\n @app.middleware(\"http\")\n async def log_api_call(request: Request, call_next): # type: ignore[no-untyped-def]\n started = time.monotonic()\n response = await call_next(request)\n response.headers[\"X-Response-Time-Ms\"] = str(int((time.monotonic() - started) * 1000))\n return response\n\n @app.get(\"/health\")\n async def health() -> JSONResponse:\n payload = await health_provider()\n status_code = 200 if payload.get(\"status\") == \"ok\" else 503\n return JSONResponse(content=payload, status_code=status_code)\n\n @app.get(\"/actions/{action}\")\n @app.post(\"/actions/{action}\")\n async def action(action: str, request: Request) -> JSONResponse:\n client_source = self._client_source(request)\n if action in {\"start\", \"stop\"}:\n LOGGER.warning(\"Control action requested: /actions/%s client=%s\", action, client_source)\n return await action_provider(action, client_source)\n\n return app\n\n def _client_source(self, request: Request) -> str:\n explicit_header = request.headers.get(\"X-Client-Source\", \"\").strip()\n if explicit_header:\n return explicit_header\n user_agent = request.headers.get(\"User-Agent\", \"\").strip()\n if user_agent:\n return f\"user-agent:{user_agent}\"\n return \"unknown\"", + "start_line": 15, + "end_line": 53, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/http_channel.py", + "title": "src/app_runtime/control/http_channel.py:HttpControlChannel", + "content": "class HttpControlChannel(ControlChannel):\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._timeout = timeout\n self._runner = UvicornThreadRunner(host, port, timeout)\n self._factory = HttpControlAppFactory()\n self._actions: ControlActionSet | None = None\n\n async def start(self, actions: ControlActionSet) -> None:\n self._actions = actions\n app = self._factory.create(self._health_response, self._action_response)\n await self._runner.start(app)\n\n async def stop(self) -> None:\n await self._runner.stop()\n\n @property\n def port(self) -> int:\n return self._runner.port\n\n async def _health_response(self) -> dict[str, object]:\n if self._actions is None:\n return {\"status\": \"unhealthy\", \"detail\": \"control actions are not configured\"}\n return await asyncio.wait_for(self._actions.health(), timeout=float(self._timeout))\n\n async def _action_response(self, action: str, _client_source: str = \"unknown\") -> JSONResponse:\n if self._actions is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"{action} handler is not configured\"}, status_code=404)\n callbacks = {\n \"start\": self._actions.start,\n \"stop\": self._actions.stop,\n \"status\": self._actions.status,\n }\n callback = callbacks.get(action)\n if callback is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"unsupported action: {action}\"}, status_code=404)\n action_timeout = max(float(self._timeout), 10.0) if action in {\"start\", \"stop\"} else float(self._timeout)\n try:\n detail = await asyncio.wait_for(callback(), timeout=action_timeout)\n except asyncio.TimeoutError:\n return JSONResponse(\n content={\"status\": \"accepted\", \"detail\": f\"{action} operation is still in progress\"},\n status_code=202,\n )\n except Exception as exc:\n return JSONResponse(content={\"status\": \"error\", \"detail\": str(exc)}, status_code=500)\n return JSONResponse(content={\"status\": \"ok\", \"detail\": detail or f\"{action} action accepted\"}, status_code=200)", + "start_line": 12, + "end_line": 57, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/base.py", + "title": "src/app_runtime/control/base.py:ControlActionSet", + "content": "class ControlActionSet:\n health: HealthHandler\n start: ActionHandler\n stop: ActionHandler\n status: ActionHandler", + "start_line": 14, + "end_line": 18, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/plba/control.py", + "title": "src/plba/control.py:1-10", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\n \"ControlActionSet\",\n \"ControlChannel\",\n \"ControlPlaneService\",\n \"HttpControlChannel\",\n]", + "start_line": 1, + "end_line": 10, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.control", + "is_test": false, + "blob_sha": "31bd5c4481bfa7fbca8fae56d4860a67e3953ca74474ac8439e1f39b685d7bc8", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/core/runtime.py", + "title": "RuntimeManager", + "content": "RuntimeManager\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests manager\n- orchestrates role-like calls (4)\n- reads and writes state attributes\n- participates in dataflow slices (50)", + "start_line": 18, + "end_line": 179, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "symbol_name": "RuntimeManager", + "qname": "RuntimeManager", + "role": "pipeline_stage", + "confidence": 0.67, + "dataflow_participation": 50, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/base.py", + "title": "ControlChannel", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "start_line": 21, + "end_line": 28, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/base.py", + "title": "ControlActionSet", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "start_line": 14, + "end_line": 18, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "start_line": 12, + "end_line": 52, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/http_runner.py", + "title": "UvicornThreadRunner", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "start_line": 10, + "end_line": 61, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/http_channel.py", + "title": "HttpControlChannel", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "start_line": 12, + "end_line": 57, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/http_app.py", + "title": "HttpControlAppFactory", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "start_line": 15, + "end_line": 53, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "title": "WorkflowPersistence", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "start_line": 8, + "end_line": 54, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "start_line": 14, + "end_line": 25, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "start_line": 14, + "end_line": 51, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "start_line": 14, + "end_line": 17, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "start_line": 14, + "end_line": 20, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "start_line": 14, + "end_line": 47, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/core/runtime.py", + "title": "RuntimeManager.__init__:dataflow_slice", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file", + "start_line": 32, + "end_line": 52, + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C3_ENTRYPOINTS", + "path": "src/app_runtime/control/http_app.py", + "title": "app.post", + "content": "fastapi http app.post", + "start_line": 38, + "end_line": 42, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C3_ENTRYPOINTS", + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "content": "fastapi http app.get", + "start_line": 31, + "end_line": 34, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C3_ENTRYPOINTS", + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "content": "fastapi http app.get", + "start_line": 38, + "end_line": 42, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "relations": [ + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop" + }, + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async" + }, + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel" + }, + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start" + }, + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async" + }, + { + "path": "src/app_runtime/core/runtime.py", + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file" + } + ], + "entrypoints": [ + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.post", + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "test_candidates": [], + "layer_outcomes": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C4_SEMANTIC_ROLES", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 6, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C3_ENTRYPOINTS", + "hit_count": 3, + "empty": false, + "fallback_used": false + } + ], + "missing_layers": [], + "raw_rows": [ + { + "path": "src/plba/bootstrap.py", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 4, + "span_end": 4, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "27158ca220022eeb5083c6addf8a50775d45f7161284fd60aac48410105f4b98", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 9, + "span_end": 9, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "62a9575c77aad894120d18b4f2a08cf2ba42f77e9be4a8a432b767d157701afe", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager\nRuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "qname": "RuntimeManager", + "kind": "class", + "signature": "RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/__init__.py", + "content": "const RuntimeManager\nRuntimeManager = plba.core.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 16, + "span_end": 16, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "7eacec84f9b8d6c4201374591faecdac7493091c263681495c338973f2971ad9", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = plba.core.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/core.py", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 2, + "span_end": 2, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "e1684562d978b7af7fe9b27dc5869d770348a87b5dc19a50360f58544668578b", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.core", + "is_test": false, + "blob_sha": "c0ae25110d20e665216616e26b68adfe035b624ba45d31d1272fb21f906f9ca8", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "const ControlPlaneService\nControlPlaneService = app_runtime.control.service.ControlPlaneService", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlPlaneService", + "span_start": 3, + "span_end": 3, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "217e8f044d1c01644bf7b81e5046af9e84469210c692a2fb0c476a19bb069ae1", + "qname": "ControlPlaneService", + "kind": "const", + "signature": "ControlPlaneService = app_runtime.control.service.ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "method ControlChannel.start\nstart(self, actions)\nStart the control channel and bind handlers.", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlChannel.start", + "span_start": 23, + "span_end": 24, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "e01e0d50d0f48d0c84c119c989b7a7c57ceea263811ce2605c684ae24d1a03b1", + "qname": "ControlChannel.start", + "kind": "method", + "signature": "start(self, actions)", + "parent_symbol_id": "ControlChannel", + "package_or_module": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "method ControlChannel.stop\nstop(self)\nStop the control channel and release resources.", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlChannel.stop", + "span_start": 27, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "54b5adf9866c526836221dc721b474ba23fbec83e1b1d3b8bc4da67ae3c1541d", + "qname": "ControlChannel.stop", + "kind": "method", + "signature": "stop(self)", + "parent_symbol_id": "ControlChannel", + "package_or_module": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "class ControlPlaneService:\n def __init__(self) -> None:\n self._channels: list[ControlChannel] = []\n\n def register_channel(self, channel: ControlChannel) -> None:\n self._channels.append(channel)\n\n def start(self, runtime: RuntimeManager) -> None:\n if not self._channels:\n return\n asyncio.run(self._start_async(runtime))\n\n def stop(self) -> None:\n if not self._channels:\n return\n asyncio.run(self._stop_async())\n\n def snapshot(self, runtime: RuntimeManager) -> dict[str, object]:\n health = runtime.current_health()\n return {\n \"runtime\": {\"state\": runtime._state.value},\n \"modules\": list(runtime.registry.modules),\n \"services\": runtime.services.snapshot(),\n \"workers\": runtime.workers.snapshot(),\n \"health\": runtime.health.snapshot(runtime.workers.healths()) | {\"status\": health[\"status\"]},\n \"config\": runtime.configuration.get(),\n }\n\n async def _start_async(self, runtime: RuntimeManager) -> None:\n actions = ControlActionSet(\n health=runtime.health_status,\n start=runtime.start_runtime,\n stop=runtime.stop_runtime,\n status=runtime.runtime_status,\n )\n for channel in self._channels:\n await channel.start(actions)\n\n async def _stop_async(self) -> None:\n for channel in reversed(self._channels):\n await channel.stop()", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/service.py:ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "class UvicornThreadRunner:\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._host = host\n self._port = port\n self._timeout = timeout\n self._server: Server | None = None\n self._thread: Thread | None = None\n self._error: BaseException | None = None\n\n async def start(self, app: FastAPI) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._error = None\n config = Config(app=app, host=self._host, port=self._port, log_level=\"warning\")\n self._server = Server(config)\n self._thread = Thread(target=self._serve, name=\"plba-http-control\", daemon=True)\n self._thread.start()\n await self._wait_until_started()\n\n async def stop(self) -> None:\n if self._server is None or self._thread is None:\n return\n self._server.should_exit = True\n await asyncio.to_thread(self._thread.join, self._timeout)\n self._server = None\n self._thread = None\n\n @property\n def port(self) -> int:\n if self._server is None or not getattr(self._server, \"servers\", None):\n return self._port\n socket = self._server.servers[0].sockets[0]\n return int(socket.getsockname()[1])\n\n async def _wait_until_started(self) -> None:\n if self._server is None:\n raise RuntimeError(\"Server is not initialized\")\n deadline = asyncio.get_running_loop().time() + max(float(self._timeout), 1.0)\n while not self._server.started:\n if self._error is not None:\n raise RuntimeError(\"HTTP control server failed to start\") from self._error\n if asyncio.get_running_loop().time() >= deadline:\n raise TimeoutError(\"HTTP control server startup timed out\")\n await asyncio.sleep(0.05)\n\n def _serve(self) -> None:\n if self._server is None:\n return\n try:\n asyncio.run(self._server.serve())\n except BaseException as exc: # noqa: BLE001\n self._error = exc", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_runner.py:UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_runner", + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlChannel(ABC):\n @abstractmethod\n async def start(self, actions: ControlActionSet) -> None:\n \"\"\"Start the control channel and bind handlers.\"\"\"\n\n @abstractmethod\n async def stop(self) -> None:\n \"\"\"Stop the control channel and release resources.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\"ControlActionSet\", \"ControlChannel\", \"ControlPlaneService\", \"HttpControlChannel\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/__init__.py:1-5", + "span_start": 1, + "span_end": 5, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "class HttpControlAppFactory:\n def create(\n self,\n health_provider: Callable[[], Awaitable[HealthPayload]],\n action_provider: Callable[[str, str], Awaitable[JSONResponse]],\n ) -> FastAPI:\n app = FastAPI(title=\"PLBA Control API\")\n\n @app.middleware(\"http\")\n async def log_api_call(request: Request, call_next): # type: ignore[no-untyped-def]\n started = time.monotonic()\n response = await call_next(request)\n response.headers[\"X-Response-Time-Ms\"] = str(int((time.monotonic() - started) * 1000))\n return response\n\n @app.get(\"/health\")\n async def health() -> JSONResponse:\n payload = await health_provider()\n status_code = 200 if payload.get(\"status\") == \"ok\" else 503\n return JSONResponse(content=payload, status_code=status_code)\n\n @app.get(\"/actions/{action}\")\n @app.post(\"/actions/{action}\")\n async def action(action: str, request: Request) -> JSONResponse:\n client_source = self._client_source(request)\n if action in {\"start\", \"stop\"}:\n LOGGER.warning(\"Control action requested: /actions/%s client=%s\", action, client_source)\n return await action_provider(action, client_source)\n\n return app\n\n def _client_source(self, request: Request) -> str:\n explicit_header = request.headers.get(\"X-Client-Source\", \"\").strip()\n if explicit_header:\n return explicit_header\n user_agent = request.headers.get(\"User-Agent\", \"\").strip()\n if user_agent:\n return f\"user-agent:{user_agent}\"\n return \"unknown\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_app.py:HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel(ControlChannel):\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._timeout = timeout\n self._runner = UvicornThreadRunner(host, port, timeout)\n self._factory = HttpControlAppFactory()\n self._actions: ControlActionSet | None = None\n\n async def start(self, actions: ControlActionSet) -> None:\n self._actions = actions\n app = self._factory.create(self._health_response, self._action_response)\n await self._runner.start(app)\n\n async def stop(self) -> None:\n await self._runner.stop()\n\n @property\n def port(self) -> int:\n return self._runner.port\n\n async def _health_response(self) -> dict[str, object]:\n if self._actions is None:\n return {\"status\": \"unhealthy\", \"detail\": \"control actions are not configured\"}\n return await asyncio.wait_for(self._actions.health(), timeout=float(self._timeout))\n\n async def _action_response(self, action: str, _client_source: str = \"unknown\") -> JSONResponse:\n if self._actions is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"{action} handler is not configured\"}, status_code=404)\n callbacks = {\n \"start\": self._actions.start,\n \"stop\": self._actions.stop,\n \"status\": self._actions.status,\n }\n callback = callbacks.get(action)\n if callback is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"unsupported action: {action}\"}, status_code=404)\n action_timeout = max(float(self._timeout), 10.0) if action in {\"start\", \"stop\"} else float(self._timeout)\n try:\n detail = await asyncio.wait_for(callback(), timeout=action_timeout)\n except asyncio.TimeoutError:\n return JSONResponse(\n content={\"status\": \"accepted\", \"detail\": f\"{action} operation is still in progress\"},\n status_code=202,\n )\n except Exception as exc:\n return JSONResponse(content={\"status\": \"error\", \"detail\": str(exc)}, status_code=500)\n return JSONResponse(content={\"status\": \"ok\", \"detail\": detail or f\"{action} action accepted\"}, status_code=200)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_channel.py:HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlActionSet:\n health: HealthHandler\n start: ActionHandler\n stop: ActionHandler\n status: ActionHandler", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/control.py", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\n \"ControlActionSet\",\n \"ControlChannel\",\n \"ControlPlaneService\",\n \"HttpControlChannel\",\n]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/control.py:1-10", + "span_start": 1, + "span_end": 10, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.control", + "is_test": false, + "blob_sha": "31bd5c4481bfa7fbca8fae56d4860a67e3953ca74474ac8439e1f39b685d7bc8", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests manager\n- orchestrates role-like calls (4)\n- reads and writes state attributes\n- participates in dataflow slices (50)", + "layer": "C4_SEMANTIC_ROLES", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 43, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "symbol_name": "RuntimeManager", + "qname": "RuntimeManager", + "role": "pipeline_stage", + "confidence": 0.67, + "dataflow_participation": 50, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 52, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": null, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": null, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": null, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "retrieval_report": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "vector", + "C0_SOURCE_CHUNKS": "vector", + "C4_SEMANTIC_ROLES": "vector", + "C2_DEPENDENCY_GRAPH": "vector", + "C3_ENTRYPOINTS": "vector" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [] + } + }, + "fallback": { + "used": false, + "reason": null + }, + "retrieval_by_layer_ms": { + "C1_SYMBOL_CATALOG": 51, + "C0_SOURCE_CHUNKS": 16, + "C4_SEMANTIC_ROLES": 14, + "C2_DEPENDENCY_GRAPH": 54, + "C3_ENTRYPOINTS": 11 + } + } + }, + "diagnostics": { + "intent_correct": null, + "target_found": true, + "layers_used": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_sufficient": true, + "answer_mode": "normal", + "router_result": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "EXPLAIN", + "path_scope": [], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_resolution_status": "pending" + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Объясни как работает класс RuntimeManager", + "sub_intent": "EXPLAIN", + "path_scope": [], + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C4_SEMANTIC_ROLES", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 6, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C3_ENTRYPOINTS", + "hit_count": 3, + "empty": false, + "fallback_used": false + } + ], + "empty_layers": [], + "evidence_gate_decision": { + "sufficient": true, + "failure_reasons": [], + "evidence_count": 33 + }, + "failure_reasons": [], + "timings_ms": {} + }, + "rag_rows": [ + { + "path": "src/plba/bootstrap.py", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 4, + "span_end": 4, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "27158ca220022eeb5083c6addf8a50775d45f7161284fd60aac48410105f4b98", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 9, + "span_end": 9, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "62a9575c77aad894120d18b4f2a08cf2ba42f77e9be4a8a432b767d157701afe", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager\nRuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "qname": "RuntimeManager", + "kind": "class", + "signature": "RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/__init__.py", + "content": "const RuntimeManager\nRuntimeManager = plba.core.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 16, + "span_end": 16, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "7eacec84f9b8d6c4201374591faecdac7493091c263681495c338973f2971ad9", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = plba.core.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/core.py", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 2, + "span_end": 2, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "e1684562d978b7af7fe9b27dc5869d770348a87b5dc19a50360f58544668578b", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.core", + "is_test": false, + "blob_sha": "c0ae25110d20e665216616e26b68adfe035b624ba45d31d1272fb21f906f9ca8", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "const ControlPlaneService\nControlPlaneService = app_runtime.control.service.ControlPlaneService", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlPlaneService", + "span_start": 3, + "span_end": 3, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "217e8f044d1c01644bf7b81e5046af9e84469210c692a2fb0c476a19bb069ae1", + "qname": "ControlPlaneService", + "kind": "const", + "signature": "ControlPlaneService = app_runtime.control.service.ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "method ControlChannel.start\nstart(self, actions)\nStart the control channel and bind handlers.", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlChannel.start", + "span_start": 23, + "span_end": 24, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "e01e0d50d0f48d0c84c119c989b7a7c57ceea263811ce2605c684ae24d1a03b1", + "qname": "ControlChannel.start", + "kind": "method", + "signature": "start(self, actions)", + "parent_symbol_id": "ControlChannel", + "package_or_module": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "method ControlChannel.stop\nstop(self)\nStop the control channel and release resources.", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlChannel.stop", + "span_start": 27, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "54b5adf9866c526836221dc721b474ba23fbec83e1b1d3b8bc4da67ae3c1541d", + "qname": "ControlChannel.stop", + "kind": "method", + "signature": "stop(self)", + "parent_symbol_id": "ControlChannel", + "package_or_module": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "class ControlPlaneService:\n def __init__(self) -> None:\n self._channels: list[ControlChannel] = []\n\n def register_channel(self, channel: ControlChannel) -> None:\n self._channels.append(channel)\n\n def start(self, runtime: RuntimeManager) -> None:\n if not self._channels:\n return\n asyncio.run(self._start_async(runtime))\n\n def stop(self) -> None:\n if not self._channels:\n return\n asyncio.run(self._stop_async())\n\n def snapshot(self, runtime: RuntimeManager) -> dict[str, object]:\n health = runtime.current_health()\n return {\n \"runtime\": {\"state\": runtime._state.value},\n \"modules\": list(runtime.registry.modules),\n \"services\": runtime.services.snapshot(),\n \"workers\": runtime.workers.snapshot(),\n \"health\": runtime.health.snapshot(runtime.workers.healths()) | {\"status\": health[\"status\"]},\n \"config\": runtime.configuration.get(),\n }\n\n async def _start_async(self, runtime: RuntimeManager) -> None:\n actions = ControlActionSet(\n health=runtime.health_status,\n start=runtime.start_runtime,\n stop=runtime.stop_runtime,\n status=runtime.runtime_status,\n )\n for channel in self._channels:\n await channel.start(actions)\n\n async def _stop_async(self) -> None:\n for channel in reversed(self._channels):\n await channel.stop()", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/service.py:ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "class UvicornThreadRunner:\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._host = host\n self._port = port\n self._timeout = timeout\n self._server: Server | None = None\n self._thread: Thread | None = None\n self._error: BaseException | None = None\n\n async def start(self, app: FastAPI) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._error = None\n config = Config(app=app, host=self._host, port=self._port, log_level=\"warning\")\n self._server = Server(config)\n self._thread = Thread(target=self._serve, name=\"plba-http-control\", daemon=True)\n self._thread.start()\n await self._wait_until_started()\n\n async def stop(self) -> None:\n if self._server is None or self._thread is None:\n return\n self._server.should_exit = True\n await asyncio.to_thread(self._thread.join, self._timeout)\n self._server = None\n self._thread = None\n\n @property\n def port(self) -> int:\n if self._server is None or not getattr(self._server, \"servers\", None):\n return self._port\n socket = self._server.servers[0].sockets[0]\n return int(socket.getsockname()[1])\n\n async def _wait_until_started(self) -> None:\n if self._server is None:\n raise RuntimeError(\"Server is not initialized\")\n deadline = asyncio.get_running_loop().time() + max(float(self._timeout), 1.0)\n while not self._server.started:\n if self._error is not None:\n raise RuntimeError(\"HTTP control server failed to start\") from self._error\n if asyncio.get_running_loop().time() >= deadline:\n raise TimeoutError(\"HTTP control server startup timed out\")\n await asyncio.sleep(0.05)\n\n def _serve(self) -> None:\n if self._server is None:\n return\n try:\n asyncio.run(self._server.serve())\n except BaseException as exc: # noqa: BLE001\n self._error = exc", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_runner.py:UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_runner", + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlChannel(ABC):\n @abstractmethod\n async def start(self, actions: ControlActionSet) -> None:\n \"\"\"Start the control channel and bind handlers.\"\"\"\n\n @abstractmethod\n async def stop(self) -> None:\n \"\"\"Stop the control channel and release resources.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\"ControlActionSet\", \"ControlChannel\", \"ControlPlaneService\", \"HttpControlChannel\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/__init__.py:1-5", + "span_start": 1, + "span_end": 5, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "class HttpControlAppFactory:\n def create(\n self,\n health_provider: Callable[[], Awaitable[HealthPayload]],\n action_provider: Callable[[str, str], Awaitable[JSONResponse]],\n ) -> FastAPI:\n app = FastAPI(title=\"PLBA Control API\")\n\n @app.middleware(\"http\")\n async def log_api_call(request: Request, call_next): # type: ignore[no-untyped-def]\n started = time.monotonic()\n response = await call_next(request)\n response.headers[\"X-Response-Time-Ms\"] = str(int((time.monotonic() - started) * 1000))\n return response\n\n @app.get(\"/health\")\n async def health() -> JSONResponse:\n payload = await health_provider()\n status_code = 200 if payload.get(\"status\") == \"ok\" else 503\n return JSONResponse(content=payload, status_code=status_code)\n\n @app.get(\"/actions/{action}\")\n @app.post(\"/actions/{action}\")\n async def action(action: str, request: Request) -> JSONResponse:\n client_source = self._client_source(request)\n if action in {\"start\", \"stop\"}:\n LOGGER.warning(\"Control action requested: /actions/%s client=%s\", action, client_source)\n return await action_provider(action, client_source)\n\n return app\n\n def _client_source(self, request: Request) -> str:\n explicit_header = request.headers.get(\"X-Client-Source\", \"\").strip()\n if explicit_header:\n return explicit_header\n user_agent = request.headers.get(\"User-Agent\", \"\").strip()\n if user_agent:\n return f\"user-agent:{user_agent}\"\n return \"unknown\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_app.py:HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel(ControlChannel):\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._timeout = timeout\n self._runner = UvicornThreadRunner(host, port, timeout)\n self._factory = HttpControlAppFactory()\n self._actions: ControlActionSet | None = None\n\n async def start(self, actions: ControlActionSet) -> None:\n self._actions = actions\n app = self._factory.create(self._health_response, self._action_response)\n await self._runner.start(app)\n\n async def stop(self) -> None:\n await self._runner.stop()\n\n @property\n def port(self) -> int:\n return self._runner.port\n\n async def _health_response(self) -> dict[str, object]:\n if self._actions is None:\n return {\"status\": \"unhealthy\", \"detail\": \"control actions are not configured\"}\n return await asyncio.wait_for(self._actions.health(), timeout=float(self._timeout))\n\n async def _action_response(self, action: str, _client_source: str = \"unknown\") -> JSONResponse:\n if self._actions is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"{action} handler is not configured\"}, status_code=404)\n callbacks = {\n \"start\": self._actions.start,\n \"stop\": self._actions.stop,\n \"status\": self._actions.status,\n }\n callback = callbacks.get(action)\n if callback is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"unsupported action: {action}\"}, status_code=404)\n action_timeout = max(float(self._timeout), 10.0) if action in {\"start\", \"stop\"} else float(self._timeout)\n try:\n detail = await asyncio.wait_for(callback(), timeout=action_timeout)\n except asyncio.TimeoutError:\n return JSONResponse(\n content={\"status\": \"accepted\", \"detail\": f\"{action} operation is still in progress\"},\n status_code=202,\n )\n except Exception as exc:\n return JSONResponse(content={\"status\": \"error\", \"detail\": str(exc)}, status_code=500)\n return JSONResponse(content={\"status\": \"ok\", \"detail\": detail or f\"{action} action accepted\"}, status_code=200)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_channel.py:HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlActionSet:\n health: HealthHandler\n start: ActionHandler\n stop: ActionHandler\n status: ActionHandler", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/control.py", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\n \"ControlActionSet\",\n \"ControlChannel\",\n \"ControlPlaneService\",\n \"HttpControlChannel\",\n]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/control.py:1-10", + "span_start": 1, + "span_end": 10, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.control", + "is_test": false, + "blob_sha": "31bd5c4481bfa7fbca8fae56d4860a67e3953ca74474ac8439e1f39b685d7bc8", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests manager\n- orchestrates role-like calls (4)\n- reads and writes state attributes\n- participates in dataflow slices (50)", + "layer": "C4_SEMANTIC_ROLES", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 43, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "symbol_name": "RuntimeManager", + "qname": "RuntimeManager", + "role": "pipeline_stage", + "confidence": 0.67, + "dataflow_participation": 50, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 52, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "validation": { + "passed": true, + "action": "return", + "reasons": [] + } + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-explain-runtime-manager.md b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-explain-runtime-manager.md new file mode 100644 index 0000000..24ac750 --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-explain-runtime-manager.md @@ -0,0 +1,34 @@ +# plba-v2-explain-runtime-manager + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: agent_runtime +- mode: full_chain +- passed: True + +## Query +Объясни как работает класс RuntimeManager + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 33, + "llm_answer": "Класс `RuntimeManager` играет ключевую роль в управлении выполнением приложений и координации различных компонентов системы. Его основная функция заключается в оркестрации действий, связанных с жизненным циклом приложения, включая инициализацию, запуск и остановку сервисов и модулей.\n\n**Ключевые шаги работы класса:**\n1. Инициализация конфигурации и состояния (`__init__`).\n2. Добавление конфигурационных файлов и настроек (`add_config_file`).\n3. Управление состоянием выполнения через чтение и запись атрибутов состояния (`configuration`, `_state`).\n4. Оркестровка вызова методов запуска и остановки для различных компонентов (`start`, `stop`).\n5. Участие в обработке данных потока и управлении потоками задач (`participates in dataflow slices`).\n\n**Опорные файлы:**\n- `src/app_runtime/core/runtime.py:18-179`\n- `src/app_runtime/control/service.py:12-52`\n- `src/app_runtime/control/base.py:21-28`\n- `src/app_runtime/control/base.py:14-18`", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-explain-trace-service.json b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-explain-trace-service.json new file mode 100644 index 0000000..8b4c9d3 --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-explain-trace-service.json @@ -0,0 +1,4157 @@ +{ + "case_id": "plba-v2-explain-trace-service", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "agent_runtime", + "mode": "full_chain", + "query": "Объясни как работает класс TraceService", + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 33, + "llm_answer": "Класс `TraceService` является основным компонентом системы отслеживания трассировок в приложении. Его основная функция заключается в управлении контекстом трассировки и записи событий в журнал.\n\n**Ключевые шаги работы класса:**\n1. Инициализация с передачей транспорта (`transport`) и хранилища контекста (`store`), которые могут быть опциональными.\n2. Создание нового контекста трассировки через метод `create_context`, который генерирует уникальный идентификатор трассы и сохраняет запись о контексте в хранилище.\n3. Управление текущим контекстом трассировки через методы:\n - `current_trace_id`: возвращает текущий идентификатор трассировки.\n - `open_context`: открывает новый контекст трассировки.\n - `close_context`: закрывает текущий контекст трассировки.\n \n**Опорные файлы:**\n- `src/app_runtime/tracing/service.py:39-166`\n- `src/app_runtime/tracing/service.py:66-78`\n- `src/app_runtime/tracing/service.py:45-63`", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "TraceService" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "query": "Объясни как работает класс TraceService", + "router_result": { + "schema_version": "1.1", + "intent": "CODE_QA", + "retrieval_profile": "code", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query_plan": { + "raw": "Объясни как работает класс TraceService", + "normalized": "Объясни как работает класс TraceService", + "sub_intent": "EXPLAIN", + "negations": [], + "expansions": [ + "TraceService" + ], + "keyword_hints": [ + "TraceService" + ], + "path_hints": [], + "doc_scope_hints": [], + "symbol_candidates": [ + "TraceService" + ], + "symbol_kind_hint": "class", + "anchors": [ + { + "type": "SYMBOL", + "value": "TraceService", + "source": "user_text", + "subtype": null, + "span": { + "start": 27, + "end": 39 + }, + "confidence": 0.88 + }, + { + "type": "KEY_TERM", + "value": "класс", + "source": "user_text", + "subtype": null, + "span": { + "start": 21, + "end": 26 + }, + "confidence": 0.9 + } + ] + }, + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "top_k": 8 + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 8 + }, + { + "layer_id": "C4_SEMANTIC_ROLES", + "top_k": 8 + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "top_k": 6 + }, + { + "layer_id": "C3_ENTRYPOINTS", + "top_k": 6 + } + ], + "filters": { + "test_policy": "EXCLUDE", + "path_scope": [], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + }, + "symbol_resolution": { + "status": "pending", + "resolved_symbol": null, + "alternatives": [ + "TraceService" + ], + "confidence": 0.0 + }, + "evidence_policy": { + "require_def": true, + "require_flow": true, + "require_spec": false, + "allow_answer_without_evidence": false + } + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Объясни как работает класс TraceService", + "sub_intent": "EXPLAIN", + "path_scope": [], + "keyword_hints": [ + "TraceService" + ], + "symbol_candidates": [ + "TraceService" + ], + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "top_k": 8 + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 8 + }, + { + "layer_id": "C4_SEMANTIC_ROLES", + "top_k": 8 + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "top_k": 6 + }, + { + "layer_id": "C3_ENTRYPOINTS", + "top_k": 6 + } + ], + "filters": { + "test_policy": "EXCLUDE", + "path_scope": [], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + }, + "query_plan": { + "raw": "Объясни как работает класс TraceService", + "normalized": "Объясни как работает класс TraceService", + "sub_intent": "EXPLAIN", + "negations": [], + "expansions": [ + "TraceService" + ], + "keyword_hints": [ + "TraceService" + ], + "path_hints": [], + "doc_scope_hints": [], + "symbol_candidates": [ + "TraceService" + ], + "symbol_kind_hint": "class", + "anchors": [ + { + "type": "SYMBOL", + "value": "TraceService", + "source": "user_text", + "subtype": null, + "span": { + "start": 27, + "end": 39 + }, + "confidence": 0.88 + }, + { + "type": "KEY_TERM", + "value": "класс", + "source": "user_text", + "subtype": null, + "span": { + "start": 21, + "end": 26 + }, + "confidence": 0.9 + } + ] + } + }, + "retrieval_result": { + "target_symbol_candidates": [ + "TraceService", + "TraceService.open_context", + "TraceService.create_context", + "TraceService.current_trace_id" + ], + "resolved_symbol": "TraceService", + "symbol_resolution_status": "resolved", + "file_candidates": [ + "src/plba/__init__.py", + "src/app_runtime/core/runtime.py", + "src/app_runtime/tracing/__init__.py", + "src/app_runtime/tracing/service.py", + "src/plba/tracing.py", + "src/app_runtime/contracts/__init__.py", + "src/app_runtime/config/providers.py", + "src/app_runtime/control/http_runner.py", + "src/app_runtime/workflow/persistence/workflow_persistence.py", + "src/app_runtime/control/http_channel.py", + "src/app_runtime/queue/in_memory.py", + "src/app_runtime/config/file_loader.py", + "src/app_runtime/tracing/store.py", + "src/app_runtime/workers/supervisor.py", + "src/app_runtime/control/http_app.py" + ], + "code_chunks": [ + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/plba/__init__.py", + "title": "TraceService", + "content": "const TraceService\nTraceService = plba.tracing.TraceService", + "start_line": 20, + "end_line": 20, + "metadata": { + "symbol_id": "259ec03b77b9387ea53f69c77af32791dd29adf6de617ba72dd3f839197342a1", + "qname": "TraceService", + "kind": "const", + "signature": "TraceService = plba.tracing.TraceService", + "parent_symbol_id": null, + "package_or_module": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/core/runtime.py", + "title": "TraceService", + "content": "const TraceService\nTraceService = app_runtime.tracing.service.TraceService", + "start_line": 14, + "end_line": 14, + "metadata": { + "symbol_id": "3ccf6212fd7d9730f9df933e2ee7671b65bdae0520577e1a49c6432262842db6", + "qname": "TraceService", + "kind": "const", + "signature": "TraceService = app_runtime.tracing.service.TraceService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/tracing/__init__.py", + "title": "TraceService", + "content": "const TraceService\nTraceService = app_runtime.tracing.service.TraceService", + "start_line": 2, + "end_line": 2, + "metadata": { + "symbol_id": "ecd2fab7fa9744b2adca84d3d213f7aadcb7e1da84b9c2764a4ab39c65282b11", + "qname": "TraceService", + "kind": "const", + "signature": "TraceService = app_runtime.tracing.service.TraceService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.tracing.__init__", + "is_test": false, + "blob_sha": "a01dea5f773515aeaae8e6d3431fcb93531a8b577dfa26c2e5db16cd6ae6e4d9", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/tracing/service.py", + "title": "TraceService", + "content": "class TraceService\nTraceService(TraceContextFactory)", + "start_line": 39, + "end_line": 166, + "metadata": { + "symbol_id": "c2b2b976d99f2c600000b753731b26e0a69adcb4359398b93073590c5d5d04f4", + "qname": "TraceService", + "kind": "class", + "signature": "TraceService(TraceContextFactory)", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/plba/tracing.py", + "title": "TraceService", + "content": "const TraceService\nTraceService = app_runtime.tracing.service.TraceService", + "start_line": 1, + "end_line": 1, + "metadata": { + "symbol_id": "a4556fb3f83c50ea68b94a679786ce802cab7ffd9d7138aad3d6009b2661f425", + "qname": "TraceService", + "kind": "const", + "signature": "TraceService = app_runtime.tracing.service.TraceService", + "parent_symbol_id": null, + "package_or_module": "src.plba.tracing", + "is_test": false, + "blob_sha": "a27e11c716c93c3fcefe6f11b4cc420a6b743e7606606071d7f1aeeccc4e7d45", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/tracing/service.py", + "title": "TraceService.open_context", + "content": "method TraceService.open_context\nopen_context(self)", + "start_line": 66, + "end_line": 78, + "metadata": { + "symbol_id": "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426", + "qname": "TraceService.open_context", + "kind": "method", + "signature": "open_context(self)", + "parent_symbol_id": "TraceService", + "package_or_module": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/tracing/service.py", + "title": "TraceService.create_context", + "content": "method TraceService.create_context\ncreate_context(self)", + "start_line": 45, + "end_line": 63, + "metadata": { + "symbol_id": "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a", + "qname": "TraceService.create_context", + "kind": "method", + "signature": "create_context(self)", + "parent_symbol_id": "TraceService", + "package_or_module": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/tracing/service.py", + "title": "TraceService.current_trace_id", + "content": "method TraceService.current_trace_id\ncurrent_trace_id(self)", + "start_line": 80, + "end_line": 81, + "metadata": { + "symbol_id": "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c", + "qname": "TraceService.current_trace_id", + "kind": "method", + "signature": "current_trace_id(self)", + "parent_symbol_id": "TraceService", + "package_or_module": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/tracing/service.py", + "title": "src/app_runtime/tracing/service.py:TraceService", + "content": "class TraceService(TraceContextFactory):\n def __init__(self, transport: TraceTransport | None = None, store: TraceContextStore | None = None) -> None:\n self.transport = transport or NoOpTraceTransport()\n self.store = store or TraceContextStore()\n self._writer = TraceRecordWriter(self.transport)\n\n def create_context(\n self,\n *,\n alias: str,\n parent_id: str | None = None,\n kind: str | None = None,\n attrs: dict[str, Any] | None = None,\n ) -> str:\n record = TraceContextRecord(\n trace_id=uuid4().hex,\n alias=str(alias or \"\"),\n parent_id=parent_id,\n type=kind,\n event_time=utc_now(),\n attrs=dict(attrs or {}),\n )\n self.store.push(record)\n self._writer.write_context(record)\n return record.trace_id\n\n @contextmanager\n def open_context(\n self,\n *,\n alias: str,\n parent_id: str | None = None,\n kind: str | None = None,\n attrs: dict[str, Any] | None = None,\n ) -> Iterator[str]:\n trace_id = self.create_context(alias=alias, parent_id=parent_id, kind=kind, attrs=attrs)\n try:\n yield trace_id\n finally:\n self.store.pop()\n\n def current_trace_id(self) -> str | None:\n return self.store.current_trace_id()\n\n def close_context(self) -> str | None:\n previous = self.store.pop()\n return previous.record.trace_id if previous else None\n\n def step(self, name: str) -> None:\n self.store.set_step(str(name or \"\"))\n\n def info(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"INFO\", message, status, attrs)\n\n def debug(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"DEBUG\", message, status, attrs)\n\n def warning(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"WARNING\", message, status, attrs)\n\n def error(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"ERROR\", message, status, attrs)\n\n def exception(self, message: str, *, status: str = \"failed\", attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"ERROR\", message, status, attrs)\n\n def new_root(self, operation: str) -> TraceContext:\n trace_id = self.create_context(alias=operation, kind=\"operation\", attrs={\"operation\": operation})\n return TraceContext(trace_id=trace_id, span_id=trace_id, attributes={\"operation\": operation})\n\n def child_of(self, parent: TraceContext, operation: str) -> TraceContext:\n trace_id = self.create_context(\n alias=operation,\n parent_id=parent.trace_id,\n kind=\"worker\",\n attrs={\"operation\": operation},\n )\n return TraceContext(\n trace_id=trace_id,\n span_id=trace_id,\n parent_span_id=parent.span_id,\n attributes={\"operation\": operation},\n )\n\n def attach(self, metadata: dict[str, object], context: TraceContext) -> dict[str, object]:\n updated = dict(metadata)\n updated[\"trace_id\"] = context.trace_id\n updated[\"span_id\"] = context.span_id\n updated[\"parent_span_id\"] = context.parent_span_id\n return updated\n\n def resume(self, metadata: dict[str, object], operation: str) -> TraceContext:\n trace_id = str(metadata.get(\"trace_id\") or uuid4().hex)\n span_id = str(metadata.get(\"span_id\") or trace_id)\n parent_id = metadata.get(\"parent_span_id\")\n self.create_context(\n alias=operation,\n parent_id=str(parent_id) if parent_id else None,\n kind=\"worker\",\n attrs=dict(metadata),\n )\n return TraceContext(\n trace_id=trace_id,\n span_id=span_id,\n parent_span_id=str(parent_id) if parent_id else None,\n attributes={\"operation\": operation},\n )\n\n def _write_message(\n self,\n level: TraceLevel,\n message: str,\n status: str | None,\n attrs: dict[str, Any] | None,\n ) -> None:\n active = self.store.current()\n if active is None:\n raise RuntimeError(\"Trace context is not bound. Call create_context() first.\")\n record = TraceLogMessage(\n trace_id=active.record.trace_id,\n step=active.step,\n status=str(status or \"\"),\n message=str(message or \"\"),\n level=level,\n event_time=utc_now(),\n attrs=dict(attrs or {}),\n )\n self._writer.write_message(record)", + "start_line": 39, + "end_line": 166, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/tracing/service.py", + "title": "src/app_runtime/tracing/service.py:TraceManager", + "content": "class TraceManager(TraceService):\n \"\"\"Compatibility alias during the transition from ConfigManager-shaped naming.\"\"\"", + "start_line": 169, + "end_line": 170, + "metadata": { + "chunk_index": 2, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/core/runtime.py", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "start_line": 18, + "end_line": 179, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/tracing/__init__.py", + "title": "src/app_runtime/tracing/__init__.py:1-17", + "content": "from app_runtime.contracts.trace import TraceContext, TraceContextRecord, TraceLogMessage, TraceTransport\nfrom app_runtime.tracing.service import TraceManager, TraceService\nfrom app_runtime.tracing.store import ActiveTraceContext, TraceContextStore\nfrom app_runtime.tracing.transport import MySqlTraceTransport, NoOpTraceTransport\n\n__all__ = [\n \"ActiveTraceContext\",\n \"MySqlTraceTransport\",\n \"NoOpTraceTransport\",\n \"TraceContext\",\n \"TraceContextRecord\",\n \"TraceContextStore\",\n \"TraceLogMessage\",\n \"TraceManager\",\n \"TraceService\",\n \"TraceTransport\",\n]", + "start_line": 1, + "end_line": 17, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.tracing.__init__", + "is_test": false, + "blob_sha": "a01dea5f773515aeaae8e6d3431fcb93531a8b577dfa26c2e5db16cd6ae6e4d9", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/plba/__init__.py", + "title": "src/plba/__init__.py:1-69", + "content": "from plba.bootstrap import create_runtime\nfrom plba.config import ConfigFileLoader, FileConfigProvider\nfrom plba.control import ControlActionSet, ControlChannel, ControlPlaneService, HttpControlChannel\nfrom plba.contracts import (\n ApplicationModule,\n ConfigProvider,\n HealthContributor,\n TraceContext,\n TraceContextRecord,\n TraceLogMessage,\n TraceTransport,\n Worker,\n WorkerHealth,\n WorkerStatus,\n)\nfrom plba.core import ConfigurationManager, RuntimeManager, ServiceContainer\nfrom plba.health import HealthRegistry\nfrom plba.logging import LogManager\nfrom plba.queue import InMemoryTaskQueue\nfrom plba.tracing import MySqlTraceTransport, NoOpTraceTransport, TraceService\nfrom plba.workflow import (\n StepResult,\n WorkflowContext,\n WorkflowDefinition,\n WorkflowEngine,\n WorkflowEngineHooks,\n WorkflowNode,\n WorkflowRuntimeFactory,\n WorkflowStep,\n)\nfrom plba.workers import WorkerSupervisor\n\n__all__ = [\n \"ApplicationModule\",\n \"ConfigFileLoader\",\n \"ConfigProvider\",\n \"ConfigurationManager\",\n \"ControlActionSet\",\n \"ControlChannel\",\n \"ControlPlaneService\",\n \"create_runtime\",\n \"FileConfigProvider\",\n \"HealthContributor\",\n \"HealthRegistry\",\n \"HttpControlChannel\",\n \"InMemoryTaskQueue\",\n \"LogManager\",\n \"MySqlTraceTransport\",\n \"NoOpTraceTransport\",\n \"RuntimeManager\",\n \"ServiceContainer\",\n \"TraceContext\",\n \"TraceContextRecord\",\n \"TraceLogMessage\",\n \"TraceService\",\n \"TraceTransport\",\n \"StepResult\",\n \"Worker\",\n \"WorkerHealth\",\n \"WorkerStatus\",\n \"WorkflowContext\",\n \"WorkflowDefinition\",\n \"WorkflowEngine\",\n \"WorkflowEngineHooks\",\n \"WorkflowNode\",\n \"WorkflowRuntimeFactory\",\n \"WorkflowStep\",\n \"WorkerSupervisor\",\n]", + "start_line": 1, + "end_line": 69, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/plba/tracing.py", + "title": "src/plba/tracing.py:1-4", + "content": "from app_runtime.tracing.service import TraceService\nfrom app_runtime.tracing.transport import MySqlTraceTransport, NoOpTraceTransport\n\n__all__ = [\"MySqlTraceTransport\", \"NoOpTraceTransport\", \"TraceService\"]", + "start_line": 1, + "end_line": 4, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.tracing", + "is_test": false, + "blob_sha": "a27e11c716c93c3fcefe6f11b4cc420a6b743e7606606071d7f1aeeccc4e7d45", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/contracts/__init__.py", + "title": "src/app_runtime/__init__.py:1-1", + "content": "__all__: list[str] = []", + "start_line": 1, + "end_line": 1, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.__init__", + "is_test": false, + "blob_sha": "8eea9df4f6d7b38ca0e39ccc27b04700e3d08dbeec8046d613d22706d19985fa", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/config/providers.py", + "title": "src/app_runtime/config/providers.py:FileConfigProvider", + "content": "class FileConfigProvider(ConfigProvider):\n def __init__(self, path: str | Path) -> None:\n self._loader = ConfigFileLoader(path)\n\n @property\n def loader(self) -> ConfigFileLoader:\n return self._loader\n\n def load(self) -> dict[str, Any]:\n config = self._loader.load_sync()\n if not isinstance(config, dict):\n raise TypeError(\"Config root must be a mapping\")\n return dict(config)", + "start_line": 10, + "end_line": 22, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.config.providers", + "is_test": false, + "blob_sha": "8c53ca0122d6df6c5763bca15e99434bb4daebd5a618b8fc927e9ae90b022e64", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/tracing/service.py", + "title": "TraceService", + "content": "TraceService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (13)", + "start_line": 39, + "end_line": 166, + "metadata": { + "symbol_id": "c2b2b976d99f2c600000b753731b26e0a69adcb4359398b93073590c5d5d04f4", + "symbol_name": "TraceService", + "qname": "TraceService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 13, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/http_runner.py", + "title": "UvicornThreadRunner", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "start_line": 10, + "end_line": 61, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "title": "WorkflowPersistence", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "start_line": 8, + "end_line": 54, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/http_channel.py", + "title": "HttpControlChannel", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "start_line": 12, + "end_line": 57, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/queue/in_memory.py", + "title": "InMemoryTaskQueue", + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)", + "start_line": 9, + "end_line": 38, + "metadata": { + "symbol_id": "2da04cb94544a3bcbf0943a95ad4bdd8710bcafaa32a02fd0e4de2178dcf3533", + "symbol_name": "InMemoryTaskQueue", + "qname": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 9, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "58f0cc001ccda0eee4c6bc32ed83bd05eafd6b6644f1e8b4aa9eed3103db73dc", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/config/file_loader.py", + "title": "ConfigFileLoader", + "content": "ConfigFileLoader\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (8)", + "start_line": 11, + "end_line": 48, + "metadata": { + "symbol_id": "a8474eca8b6e9dc86ae67ed68b16fa5fb639ef08739c053e7b7195489765667f", + "symbol_name": "ConfigFileLoader", + "qname": "ConfigFileLoader", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 8, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/tracing/store.py", + "title": "TraceContextStore", + "content": "TraceContextStore\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "start_line": 15, + "end_line": 52, + "metadata": { + "symbol_id": "b2dad4fbe16ffb11b58deba311c7739955c39d59f291b22181f33e9c8cce4059", + "symbol_name": "TraceContextStore", + "qname": "TraceContextStore", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "d369554f08fc92039c6edd5a2a1e73b23901533e8974459170bbd9347d263dc5", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/workers/supervisor.py", + "title": "WorkerSupervisor", + "content": "WorkerSupervisor\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "start_line": 10, + "end_line": 59, + "metadata": { + "symbol_id": "c17b44e8d9e97d490989b21fa67d7c346cdda8a0472e4c41fb243c8846faa124", + "symbol_name": "WorkerSupervisor", + "qname": "WorkerSupervisor", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "77609d9d5927171cce7fc3a54897c183fd63068710c6362029b700937aae5eee", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/tracing/service.py", + "title": "TraceService.__init__:dataflow_slice", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.create_context", + "start_line": 42, + "end_line": 61, + "metadata": { + "edge_id": "3b052062067a78aef3302ee1d996897e02a67d1b340397bea4f59fe147c0492a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a", + "dst_ref": "TraceService.create_context", + "resolution": "resolved", + "slice_id": "3b052062067a78aef3302ee1d996897e02a67d1b340397bea4f59fe147c0492a", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.create_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/tracing/service.py", + "title": "TraceService.__init__:dataflow_slice", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.close_context", + "start_line": 42, + "end_line": 84, + "metadata": { + "edge_id": "7a9353ef57c9ae5d19b3a0c6ac50fad05e6d21d31bbe1cd1cd07af6332ba6505", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "01e14158dcced7e52d0c8ac84ac7b9a75225c261b6aca6a1d7da802d0994721c", + "dst_ref": "TraceService.close_context", + "resolution": "resolved", + "slice_id": "7a9353ef57c9ae5d19b3a0c6ac50fad05e6d21d31bbe1cd1cd07af6332ba6505", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.close_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "01e14158dcced7e52d0c8ac84ac7b9a75225c261b6aca6a1d7da802d0994721c" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/tracing/service.py", + "title": "TraceService.__init__:dataflow_slice", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.open_context", + "start_line": 42, + "end_line": 78, + "metadata": { + "edge_id": "a6e13b9ebc4fed84586afd53ed92a4d14757e440873f572b2337d5622ee96031", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426", + "dst_ref": "TraceService.open_context", + "resolution": "resolved", + "slice_id": "a6e13b9ebc4fed84586afd53ed92a4d14757e440873f572b2337d5622ee96031", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.open_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/tracing/service.py", + "title": "TraceService.__init__:dataflow_slice", + "content": "TraceService.__init__\n -> TraceService.transport\n -> TraceService.__init__", + "start_line": 41, + "end_line": 43, + "metadata": { + "edge_id": "1e923a93faa05c3c43ca9b19bd047007a8589ccce57d3cc1798ae7f9f200af98", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "dst_ref": "TraceService.__init__", + "resolution": "resolved", + "slice_id": "1e923a93faa05c3c43ca9b19bd047007a8589ccce57d3cc1798ae7f9f200af98", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.transport", + "TraceService.__init__" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/tracing/service.py", + "title": "TraceService.__init__:dataflow_slice", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.current_trace_id", + "start_line": 42, + "end_line": 81, + "metadata": { + "edge_id": "3ea17138634b1190bded77ddb84aa1595124f6519b246f24fc4b02bd62b5cac1", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c", + "dst_ref": "TraceService.current_trace_id", + "resolution": "resolved", + "slice_id": "3ea17138634b1190bded77ddb84aa1595124f6519b246f24fc4b02bd62b5cac1", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.current_trace_id" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/tracing/service.py", + "title": "TraceService.__init__:dataflow_slice", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.step", + "start_line": 42, + "end_line": 88, + "metadata": { + "edge_id": "9f34c5da9b09fba99df6f6b1bde183a9aeb45111b8218a747c71590c2c9f60f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "c44bfbc66cf747283f30088da3e011a10395031d41e77b74e523c24997f641ca", + "dst_ref": "TraceService.step", + "resolution": "resolved", + "slice_id": "9f34c5da9b09fba99df6f6b1bde183a9aeb45111b8218a747c71590c2c9f60f2", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.step" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "c44bfbc66cf747283f30088da3e011a10395031d41e77b74e523c24997f641ca" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C3_ENTRYPOINTS", + "path": "src/app_runtime/control/http_app.py", + "title": "app.post", + "content": "fastapi http app.post", + "start_line": 38, + "end_line": 42, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C3_ENTRYPOINTS", + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "content": "fastapi http app.get", + "start_line": 31, + "end_line": 34, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C3_ENTRYPOINTS", + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "content": "fastapi http app.get", + "start_line": 38, + "end_line": 42, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "relations": [ + { + "path": "src/app_runtime/tracing/service.py", + "metadata": { + "edge_id": "3b052062067a78aef3302ee1d996897e02a67d1b340397bea4f59fe147c0492a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a", + "dst_ref": "TraceService.create_context", + "resolution": "resolved", + "slice_id": "3b052062067a78aef3302ee1d996897e02a67d1b340397bea4f59fe147c0492a", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.create_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.create_context" + }, + { + "path": "src/app_runtime/tracing/service.py", + "metadata": { + "edge_id": "7a9353ef57c9ae5d19b3a0c6ac50fad05e6d21d31bbe1cd1cd07af6332ba6505", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "01e14158dcced7e52d0c8ac84ac7b9a75225c261b6aca6a1d7da802d0994721c", + "dst_ref": "TraceService.close_context", + "resolution": "resolved", + "slice_id": "7a9353ef57c9ae5d19b3a0c6ac50fad05e6d21d31bbe1cd1cd07af6332ba6505", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.close_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "01e14158dcced7e52d0c8ac84ac7b9a75225c261b6aca6a1d7da802d0994721c" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.close_context" + }, + { + "path": "src/app_runtime/tracing/service.py", + "metadata": { + "edge_id": "a6e13b9ebc4fed84586afd53ed92a4d14757e440873f572b2337d5622ee96031", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426", + "dst_ref": "TraceService.open_context", + "resolution": "resolved", + "slice_id": "a6e13b9ebc4fed84586afd53ed92a4d14757e440873f572b2337d5622ee96031", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.open_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.open_context" + }, + { + "path": "src/app_runtime/tracing/service.py", + "metadata": { + "edge_id": "1e923a93faa05c3c43ca9b19bd047007a8589ccce57d3cc1798ae7f9f200af98", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "dst_ref": "TraceService.__init__", + "resolution": "resolved", + "slice_id": "1e923a93faa05c3c43ca9b19bd047007a8589ccce57d3cc1798ae7f9f200af98", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.transport", + "TraceService.__init__" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "TraceService.__init__\n -> TraceService.transport\n -> TraceService.__init__" + }, + { + "path": "src/app_runtime/tracing/service.py", + "metadata": { + "edge_id": "3ea17138634b1190bded77ddb84aa1595124f6519b246f24fc4b02bd62b5cac1", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c", + "dst_ref": "TraceService.current_trace_id", + "resolution": "resolved", + "slice_id": "3ea17138634b1190bded77ddb84aa1595124f6519b246f24fc4b02bd62b5cac1", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.current_trace_id" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.current_trace_id" + }, + { + "path": "src/app_runtime/tracing/service.py", + "metadata": { + "edge_id": "9f34c5da9b09fba99df6f6b1bde183a9aeb45111b8218a747c71590c2c9f60f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "c44bfbc66cf747283f30088da3e011a10395031d41e77b74e523c24997f641ca", + "dst_ref": "TraceService.step", + "resolution": "resolved", + "slice_id": "9f34c5da9b09fba99df6f6b1bde183a9aeb45111b8218a747c71590c2c9f60f2", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.step" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "c44bfbc66cf747283f30088da3e011a10395031d41e77b74e523c24997f641ca" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.step" + } + ], + "entrypoints": [ + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.post", + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "test_candidates": [], + "layer_outcomes": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C4_SEMANTIC_ROLES", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 6, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C3_ENTRYPOINTS", + "hit_count": 3, + "empty": false, + "fallback_used": false + } + ], + "missing_layers": [], + "raw_rows": [ + { + "path": "src/plba/__init__.py", + "content": "const TraceService\nTraceService = plba.tracing.TraceService", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService", + "span_start": 20, + "span_end": 20, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "259ec03b77b9387ea53f69c77af32791dd29adf6de617ba72dd3f839197342a1", + "qname": "TraceService", + "kind": "const", + "signature": "TraceService = plba.tracing.TraceService", + "parent_symbol_id": null, + "package_or_module": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "const TraceService\nTraceService = app_runtime.tracing.service.TraceService", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService", + "span_start": 14, + "span_end": 14, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "3ccf6212fd7d9730f9df933e2ee7671b65bdae0520577e1a49c6432262842db6", + "qname": "TraceService", + "kind": "const", + "signature": "TraceService = app_runtime.tracing.service.TraceService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/__init__.py", + "content": "const TraceService\nTraceService = app_runtime.tracing.service.TraceService", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService", + "span_start": 2, + "span_end": 2, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "ecd2fab7fa9744b2adca84d3d213f7aadcb7e1da84b9c2764a4ab39c65282b11", + "qname": "TraceService", + "kind": "const", + "signature": "TraceService = app_runtime.tracing.service.TraceService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.tracing.__init__", + "is_test": false, + "blob_sha": "a01dea5f773515aeaae8e6d3431fcb93531a8b577dfa26c2e5db16cd6ae6e4d9", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceService\nTraceService(TraceContextFactory)", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService", + "span_start": 39, + "span_end": 166, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "c2b2b976d99f2c600000b753731b26e0a69adcb4359398b93073590c5d5d04f4", + "qname": "TraceService", + "kind": "class", + "signature": "TraceService(TraceContextFactory)", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/tracing.py", + "content": "const TraceService\nTraceService = app_runtime.tracing.service.TraceService", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService", + "span_start": 1, + "span_end": 1, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "a4556fb3f83c50ea68b94a679786ce802cab7ffd9d7138aad3d6009b2661f425", + "qname": "TraceService", + "kind": "const", + "signature": "TraceService = app_runtime.tracing.service.TraceService", + "parent_symbol_id": null, + "package_or_module": "src.plba.tracing", + "is_test": false, + "blob_sha": "a27e11c716c93c3fcefe6f11b4cc420a6b743e7606606071d7f1aeeccc4e7d45", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "method TraceService.open_context\nopen_context(self)", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService.open_context", + "span_start": 66, + "span_end": 78, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426", + "qname": "TraceService.open_context", + "kind": "method", + "signature": "open_context(self)", + "parent_symbol_id": "TraceService", + "package_or_module": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "method TraceService.create_context\ncreate_context(self)", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService.create_context", + "span_start": 45, + "span_end": 63, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a", + "qname": "TraceService.create_context", + "kind": "method", + "signature": "create_context(self)", + "parent_symbol_id": "TraceService", + "package_or_module": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "method TraceService.current_trace_id\ncurrent_trace_id(self)", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService.current_trace_id", + "span_start": 80, + "span_end": 81, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c", + "qname": "TraceService.current_trace_id", + "kind": "method", + "signature": "current_trace_id(self)", + "parent_symbol_id": "TraceService", + "package_or_module": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceService(TraceContextFactory):\n def __init__(self, transport: TraceTransport | None = None, store: TraceContextStore | None = None) -> None:\n self.transport = transport or NoOpTraceTransport()\n self.store = store or TraceContextStore()\n self._writer = TraceRecordWriter(self.transport)\n\n def create_context(\n self,\n *,\n alias: str,\n parent_id: str | None = None,\n kind: str | None = None,\n attrs: dict[str, Any] | None = None,\n ) -> str:\n record = TraceContextRecord(\n trace_id=uuid4().hex,\n alias=str(alias or \"\"),\n parent_id=parent_id,\n type=kind,\n event_time=utc_now(),\n attrs=dict(attrs or {}),\n )\n self.store.push(record)\n self._writer.write_context(record)\n return record.trace_id\n\n @contextmanager\n def open_context(\n self,\n *,\n alias: str,\n parent_id: str | None = None,\n kind: str | None = None,\n attrs: dict[str, Any] | None = None,\n ) -> Iterator[str]:\n trace_id = self.create_context(alias=alias, parent_id=parent_id, kind=kind, attrs=attrs)\n try:\n yield trace_id\n finally:\n self.store.pop()\n\n def current_trace_id(self) -> str | None:\n return self.store.current_trace_id()\n\n def close_context(self) -> str | None:\n previous = self.store.pop()\n return previous.record.trace_id if previous else None\n\n def step(self, name: str) -> None:\n self.store.set_step(str(name or \"\"))\n\n def info(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"INFO\", message, status, attrs)\n\n def debug(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"DEBUG\", message, status, attrs)\n\n def warning(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"WARNING\", message, status, attrs)\n\n def error(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"ERROR\", message, status, attrs)\n\n def exception(self, message: str, *, status: str = \"failed\", attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"ERROR\", message, status, attrs)\n\n def new_root(self, operation: str) -> TraceContext:\n trace_id = self.create_context(alias=operation, kind=\"operation\", attrs={\"operation\": operation})\n return TraceContext(trace_id=trace_id, span_id=trace_id, attributes={\"operation\": operation})\n\n def child_of(self, parent: TraceContext, operation: str) -> TraceContext:\n trace_id = self.create_context(\n alias=operation,\n parent_id=parent.trace_id,\n kind=\"worker\",\n attrs={\"operation\": operation},\n )\n return TraceContext(\n trace_id=trace_id,\n span_id=trace_id,\n parent_span_id=parent.span_id,\n attributes={\"operation\": operation},\n )\n\n def attach(self, metadata: dict[str, object], context: TraceContext) -> dict[str, object]:\n updated = dict(metadata)\n updated[\"trace_id\"] = context.trace_id\n updated[\"span_id\"] = context.span_id\n updated[\"parent_span_id\"] = context.parent_span_id\n return updated\n\n def resume(self, metadata: dict[str, object], operation: str) -> TraceContext:\n trace_id = str(metadata.get(\"trace_id\") or uuid4().hex)\n span_id = str(metadata.get(\"span_id\") or trace_id)\n parent_id = metadata.get(\"parent_span_id\")\n self.create_context(\n alias=operation,\n parent_id=str(parent_id) if parent_id else None,\n kind=\"worker\",\n attrs=dict(metadata),\n )\n return TraceContext(\n trace_id=trace_id,\n span_id=span_id,\n parent_span_id=str(parent_id) if parent_id else None,\n attributes={\"operation\": operation},\n )\n\n def _write_message(\n self,\n level: TraceLevel,\n message: str,\n status: str | None,\n attrs: dict[str, Any] | None,\n ) -> None:\n active = self.store.current()\n if active is None:\n raise RuntimeError(\"Trace context is not bound. Call create_context() first.\")\n record = TraceLogMessage(\n trace_id=active.record.trace_id,\n step=active.step,\n status=str(status or \"\"),\n message=str(message or \"\"),\n level=level,\n event_time=utc_now(),\n attrs=dict(attrs or {}),\n )\n self._writer.write_message(record)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/tracing/service.py:TraceService", + "span_start": 39, + "span_end": 166, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceManager(TraceService):\n \"\"\"Compatibility alias during the transition from ConfigManager-shaped naming.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/tracing/service.py:TraceManager", + "span_start": 169, + "span_end": 170, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 2, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/__init__.py", + "content": "from app_runtime.contracts.trace import TraceContext, TraceContextRecord, TraceLogMessage, TraceTransport\nfrom app_runtime.tracing.service import TraceManager, TraceService\nfrom app_runtime.tracing.store import ActiveTraceContext, TraceContextStore\nfrom app_runtime.tracing.transport import MySqlTraceTransport, NoOpTraceTransport\n\n__all__ = [\n \"ActiveTraceContext\",\n \"MySqlTraceTransport\",\n \"NoOpTraceTransport\",\n \"TraceContext\",\n \"TraceContextRecord\",\n \"TraceContextStore\",\n \"TraceLogMessage\",\n \"TraceManager\",\n \"TraceService\",\n \"TraceTransport\",\n]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/tracing/__init__.py:1-17", + "span_start": 1, + "span_end": 17, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.tracing.__init__", + "is_test": false, + "blob_sha": "a01dea5f773515aeaae8e6d3431fcb93531a8b577dfa26c2e5db16cd6ae6e4d9", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/__init__.py", + "content": "from plba.bootstrap import create_runtime\nfrom plba.config import ConfigFileLoader, FileConfigProvider\nfrom plba.control import ControlActionSet, ControlChannel, ControlPlaneService, HttpControlChannel\nfrom plba.contracts import (\n ApplicationModule,\n ConfigProvider,\n HealthContributor,\n TraceContext,\n TraceContextRecord,\n TraceLogMessage,\n TraceTransport,\n Worker,\n WorkerHealth,\n WorkerStatus,\n)\nfrom plba.core import ConfigurationManager, RuntimeManager, ServiceContainer\nfrom plba.health import HealthRegistry\nfrom plba.logging import LogManager\nfrom plba.queue import InMemoryTaskQueue\nfrom plba.tracing import MySqlTraceTransport, NoOpTraceTransport, TraceService\nfrom plba.workflow import (\n StepResult,\n WorkflowContext,\n WorkflowDefinition,\n WorkflowEngine,\n WorkflowEngineHooks,\n WorkflowNode,\n WorkflowRuntimeFactory,\n WorkflowStep,\n)\nfrom plba.workers import WorkerSupervisor\n\n__all__ = [\n \"ApplicationModule\",\n \"ConfigFileLoader\",\n \"ConfigProvider\",\n \"ConfigurationManager\",\n \"ControlActionSet\",\n \"ControlChannel\",\n \"ControlPlaneService\",\n \"create_runtime\",\n \"FileConfigProvider\",\n \"HealthContributor\",\n \"HealthRegistry\",\n \"HttpControlChannel\",\n \"InMemoryTaskQueue\",\n \"LogManager\",\n \"MySqlTraceTransport\",\n \"NoOpTraceTransport\",\n \"RuntimeManager\",\n \"ServiceContainer\",\n \"TraceContext\",\n \"TraceContextRecord\",\n \"TraceLogMessage\",\n \"TraceService\",\n \"TraceTransport\",\n \"StepResult\",\n \"Worker\",\n \"WorkerHealth\",\n \"WorkerStatus\",\n \"WorkflowContext\",\n \"WorkflowDefinition\",\n \"WorkflowEngine\",\n \"WorkflowEngineHooks\",\n \"WorkflowNode\",\n \"WorkflowRuntimeFactory\",\n \"WorkflowStep\",\n \"WorkerSupervisor\",\n]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/__init__.py:1-69", + "span_start": 1, + "span_end": 69, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/tracing.py", + "content": "from app_runtime.tracing.service import TraceService\nfrom app_runtime.tracing.transport import MySqlTraceTransport, NoOpTraceTransport\n\n__all__ = [\"MySqlTraceTransport\", \"NoOpTraceTransport\", \"TraceService\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/tracing.py:1-4", + "span_start": 1, + "span_end": 4, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.tracing", + "is_test": false, + "blob_sha": "a27e11c716c93c3fcefe6f11b4cc420a6b743e7606606071d7f1aeeccc4e7d45", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/__init__.py", + "content": "__all__: list[str] = []", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/__init__.py:1-1", + "span_start": 1, + "span_end": 1, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.__init__", + "is_test": false, + "blob_sha": "8eea9df4f6d7b38ca0e39ccc27b04700e3d08dbeec8046d613d22706d19985fa", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/providers.py", + "content": "class FileConfigProvider(ConfigProvider):\n def __init__(self, path: str | Path) -> None:\n self._loader = ConfigFileLoader(path)\n\n @property\n def loader(self) -> ConfigFileLoader:\n return self._loader\n\n def load(self) -> dict[str, Any]:\n config = self._loader.load_sync()\n if not isinstance(config, dict):\n raise TypeError(\"Config root must be a mapping\")\n return dict(config)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/config/providers.py:FileConfigProvider", + "span_start": 10, + "span_end": 22, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.config.providers", + "is_test": false, + "blob_sha": "8c53ca0122d6df6c5763bca15e99434bb4daebd5a618b8fc927e9ae90b022e64", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (13)", + "layer": "C4_SEMANTIC_ROLES", + "title": "TraceService", + "span_start": 39, + "span_end": 166, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 60, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "c2b2b976d99f2c600000b753731b26e0a69adcb4359398b93073590c5d5d04f4", + "symbol_name": "TraceService", + "qname": "TraceService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 13, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/queue/in_memory.py", + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)", + "layer": "C4_SEMANTIC_ROLES", + "title": "InMemoryTaskQueue", + "span_start": 9, + "span_end": 38, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 22, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "2da04cb94544a3bcbf0943a95ad4bdd8710bcafaa32a02fd0e4de2178dcf3533", + "symbol_name": "InMemoryTaskQueue", + "qname": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 9, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "58f0cc001ccda0eee4c6bc32ed83bd05eafd6b6644f1e8b4aa9eed3103db73dc", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "ConfigFileLoader\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (8)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ConfigFileLoader", + "span_start": 11, + "span_end": 48, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 23, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "a8474eca8b6e9dc86ae67ed68b16fa5fb639ef08739c053e7b7195489765667f", + "symbol_name": "ConfigFileLoader", + "qname": "ConfigFileLoader", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 8, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/store.py", + "content": "TraceContextStore\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "TraceContextStore", + "span_start": 15, + "span_end": 52, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "b2dad4fbe16ffb11b58deba311c7739955c39d59f291b22181f33e9c8cce4059", + "symbol_name": "TraceContextStore", + "qname": "TraceContextStore", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "d369554f08fc92039c6edd5a2a1e73b23901533e8974459170bbd9347d263dc5", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workers/supervisor.py", + "content": "WorkerSupervisor\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkerSupervisor", + "span_start": 10, + "span_end": 59, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "c17b44e8d9e97d490989b21fa67d7c346cdda8a0472e4c41fb243c8846faa124", + "symbol_name": "WorkerSupervisor", + "qname": "WorkerSupervisor", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "77609d9d5927171cce7fc3a54897c183fd63068710c6362029b700937aae5eee", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.create_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 61, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "3b052062067a78aef3302ee1d996897e02a67d1b340397bea4f59fe147c0492a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a", + "dst_ref": "TraceService.create_context", + "resolution": "resolved", + "slice_id": "3b052062067a78aef3302ee1d996897e02a67d1b340397bea4f59fe147c0492a", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.create_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.close_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 84, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "7a9353ef57c9ae5d19b3a0c6ac50fad05e6d21d31bbe1cd1cd07af6332ba6505", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "01e14158dcced7e52d0c8ac84ac7b9a75225c261b6aca6a1d7da802d0994721c", + "dst_ref": "TraceService.close_context", + "resolution": "resolved", + "slice_id": "7a9353ef57c9ae5d19b3a0c6ac50fad05e6d21d31bbe1cd1cd07af6332ba6505", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.close_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "01e14158dcced7e52d0c8ac84ac7b9a75225c261b6aca6a1d7da802d0994721c" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.open_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 78, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "a6e13b9ebc4fed84586afd53ed92a4d14757e440873f572b2337d5622ee96031", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426", + "dst_ref": "TraceService.open_context", + "resolution": "resolved", + "slice_id": "a6e13b9ebc4fed84586afd53ed92a4d14757e440873f572b2337d5622ee96031", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.open_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.transport\n -> TraceService.__init__", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 41, + "span_end": 43, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "1e923a93faa05c3c43ca9b19bd047007a8589ccce57d3cc1798ae7f9f200af98", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "dst_ref": "TraceService.__init__", + "resolution": "resolved", + "slice_id": "1e923a93faa05c3c43ca9b19bd047007a8589ccce57d3cc1798ae7f9f200af98", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.transport", + "TraceService.__init__" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.current_trace_id", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 81, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "3ea17138634b1190bded77ddb84aa1595124f6519b246f24fc4b02bd62b5cac1", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c", + "dst_ref": "TraceService.current_trace_id", + "resolution": "resolved", + "slice_id": "3ea17138634b1190bded77ddb84aa1595124f6519b246f24fc4b02bd62b5cac1", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.current_trace_id" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.step", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 88, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "9f34c5da9b09fba99df6f6b1bde183a9aeb45111b8218a747c71590c2c9f60f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "c44bfbc66cf747283f30088da3e011a10395031d41e77b74e523c24997f641ca", + "dst_ref": "TraceService.step", + "resolution": "resolved", + "slice_id": "9f34c5da9b09fba99df6f6b1bde183a9aeb45111b8218a747c71590c2c9f60f2", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.step" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "c44bfbc66cf747283f30088da3e011a10395031d41e77b74e523c24997f641ca" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": null, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": null, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": null, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "retrieval_report": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "vector", + "C0_SOURCE_CHUNKS": "vector", + "C4_SEMANTIC_ROLES": "vector", + "C2_DEPENDENCY_GRAPH": "vector", + "C3_ENTRYPOINTS": "vector" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [] + } + }, + "fallback": { + "used": false, + "reason": null + }, + "retrieval_by_layer_ms": { + "C1_SYMBOL_CATALOG": 38, + "C0_SOURCE_CHUNKS": 14, + "C4_SEMANTIC_ROLES": 14, + "C2_DEPENDENCY_GRAPH": 43, + "C3_ENTRYPOINTS": 9 + } + } + }, + "diagnostics": { + "intent_correct": null, + "target_found": true, + "layers_used": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_sufficient": true, + "answer_mode": "normal", + "router_result": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "EXPLAIN", + "path_scope": [], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_resolution_status": "pending" + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Объясни как работает класс TraceService", + "sub_intent": "EXPLAIN", + "path_scope": [], + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C4_SEMANTIC_ROLES", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 6, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C3_ENTRYPOINTS", + "hit_count": 3, + "empty": false, + "fallback_used": false + } + ], + "empty_layers": [], + "evidence_gate_decision": { + "sufficient": true, + "failure_reasons": [], + "evidence_count": 33 + }, + "failure_reasons": [], + "timings_ms": {} + }, + "rag_rows": [ + { + "path": "src/plba/__init__.py", + "content": "const TraceService\nTraceService = plba.tracing.TraceService", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService", + "span_start": 20, + "span_end": 20, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "259ec03b77b9387ea53f69c77af32791dd29adf6de617ba72dd3f839197342a1", + "qname": "TraceService", + "kind": "const", + "signature": "TraceService = plba.tracing.TraceService", + "parent_symbol_id": null, + "package_or_module": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "const TraceService\nTraceService = app_runtime.tracing.service.TraceService", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService", + "span_start": 14, + "span_end": 14, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "3ccf6212fd7d9730f9df933e2ee7671b65bdae0520577e1a49c6432262842db6", + "qname": "TraceService", + "kind": "const", + "signature": "TraceService = app_runtime.tracing.service.TraceService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/__init__.py", + "content": "const TraceService\nTraceService = app_runtime.tracing.service.TraceService", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService", + "span_start": 2, + "span_end": 2, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "ecd2fab7fa9744b2adca84d3d213f7aadcb7e1da84b9c2764a4ab39c65282b11", + "qname": "TraceService", + "kind": "const", + "signature": "TraceService = app_runtime.tracing.service.TraceService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.tracing.__init__", + "is_test": false, + "blob_sha": "a01dea5f773515aeaae8e6d3431fcb93531a8b577dfa26c2e5db16cd6ae6e4d9", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceService\nTraceService(TraceContextFactory)", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService", + "span_start": 39, + "span_end": 166, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "c2b2b976d99f2c600000b753731b26e0a69adcb4359398b93073590c5d5d04f4", + "qname": "TraceService", + "kind": "class", + "signature": "TraceService(TraceContextFactory)", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/tracing.py", + "content": "const TraceService\nTraceService = app_runtime.tracing.service.TraceService", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService", + "span_start": 1, + "span_end": 1, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "a4556fb3f83c50ea68b94a679786ce802cab7ffd9d7138aad3d6009b2661f425", + "qname": "TraceService", + "kind": "const", + "signature": "TraceService = app_runtime.tracing.service.TraceService", + "parent_symbol_id": null, + "package_or_module": "src.plba.tracing", + "is_test": false, + "blob_sha": "a27e11c716c93c3fcefe6f11b4cc420a6b743e7606606071d7f1aeeccc4e7d45", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "method TraceService.open_context\nopen_context(self)", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService.open_context", + "span_start": 66, + "span_end": 78, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426", + "qname": "TraceService.open_context", + "kind": "method", + "signature": "open_context(self)", + "parent_symbol_id": "TraceService", + "package_or_module": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "method TraceService.create_context\ncreate_context(self)", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService.create_context", + "span_start": 45, + "span_end": 63, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a", + "qname": "TraceService.create_context", + "kind": "method", + "signature": "create_context(self)", + "parent_symbol_id": "TraceService", + "package_or_module": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "method TraceService.current_trace_id\ncurrent_trace_id(self)", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService.current_trace_id", + "span_start": 80, + "span_end": 81, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c", + "qname": "TraceService.current_trace_id", + "kind": "method", + "signature": "current_trace_id(self)", + "parent_symbol_id": "TraceService", + "package_or_module": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceService(TraceContextFactory):\n def __init__(self, transport: TraceTransport | None = None, store: TraceContextStore | None = None) -> None:\n self.transport = transport or NoOpTraceTransport()\n self.store = store or TraceContextStore()\n self._writer = TraceRecordWriter(self.transport)\n\n def create_context(\n self,\n *,\n alias: str,\n parent_id: str | None = None,\n kind: str | None = None,\n attrs: dict[str, Any] | None = None,\n ) -> str:\n record = TraceContextRecord(\n trace_id=uuid4().hex,\n alias=str(alias or \"\"),\n parent_id=parent_id,\n type=kind,\n event_time=utc_now(),\n attrs=dict(attrs or {}),\n )\n self.store.push(record)\n self._writer.write_context(record)\n return record.trace_id\n\n @contextmanager\n def open_context(\n self,\n *,\n alias: str,\n parent_id: str | None = None,\n kind: str | None = None,\n attrs: dict[str, Any] | None = None,\n ) -> Iterator[str]:\n trace_id = self.create_context(alias=alias, parent_id=parent_id, kind=kind, attrs=attrs)\n try:\n yield trace_id\n finally:\n self.store.pop()\n\n def current_trace_id(self) -> str | None:\n return self.store.current_trace_id()\n\n def close_context(self) -> str | None:\n previous = self.store.pop()\n return previous.record.trace_id if previous else None\n\n def step(self, name: str) -> None:\n self.store.set_step(str(name or \"\"))\n\n def info(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"INFO\", message, status, attrs)\n\n def debug(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"DEBUG\", message, status, attrs)\n\n def warning(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"WARNING\", message, status, attrs)\n\n def error(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"ERROR\", message, status, attrs)\n\n def exception(self, message: str, *, status: str = \"failed\", attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"ERROR\", message, status, attrs)\n\n def new_root(self, operation: str) -> TraceContext:\n trace_id = self.create_context(alias=operation, kind=\"operation\", attrs={\"operation\": operation})\n return TraceContext(trace_id=trace_id, span_id=trace_id, attributes={\"operation\": operation})\n\n def child_of(self, parent: TraceContext, operation: str) -> TraceContext:\n trace_id = self.create_context(\n alias=operation,\n parent_id=parent.trace_id,\n kind=\"worker\",\n attrs={\"operation\": operation},\n )\n return TraceContext(\n trace_id=trace_id,\n span_id=trace_id,\n parent_span_id=parent.span_id,\n attributes={\"operation\": operation},\n )\n\n def attach(self, metadata: dict[str, object], context: TraceContext) -> dict[str, object]:\n updated = dict(metadata)\n updated[\"trace_id\"] = context.trace_id\n updated[\"span_id\"] = context.span_id\n updated[\"parent_span_id\"] = context.parent_span_id\n return updated\n\n def resume(self, metadata: dict[str, object], operation: str) -> TraceContext:\n trace_id = str(metadata.get(\"trace_id\") or uuid4().hex)\n span_id = str(metadata.get(\"span_id\") or trace_id)\n parent_id = metadata.get(\"parent_span_id\")\n self.create_context(\n alias=operation,\n parent_id=str(parent_id) if parent_id else None,\n kind=\"worker\",\n attrs=dict(metadata),\n )\n return TraceContext(\n trace_id=trace_id,\n span_id=span_id,\n parent_span_id=str(parent_id) if parent_id else None,\n attributes={\"operation\": operation},\n )\n\n def _write_message(\n self,\n level: TraceLevel,\n message: str,\n status: str | None,\n attrs: dict[str, Any] | None,\n ) -> None:\n active = self.store.current()\n if active is None:\n raise RuntimeError(\"Trace context is not bound. Call create_context() first.\")\n record = TraceLogMessage(\n trace_id=active.record.trace_id,\n step=active.step,\n status=str(status or \"\"),\n message=str(message or \"\"),\n level=level,\n event_time=utc_now(),\n attrs=dict(attrs or {}),\n )\n self._writer.write_message(record)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/tracing/service.py:TraceService", + "span_start": 39, + "span_end": 166, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceManager(TraceService):\n \"\"\"Compatibility alias during the transition from ConfigManager-shaped naming.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/tracing/service.py:TraceManager", + "span_start": 169, + "span_end": 170, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 2, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/__init__.py", + "content": "from app_runtime.contracts.trace import TraceContext, TraceContextRecord, TraceLogMessage, TraceTransport\nfrom app_runtime.tracing.service import TraceManager, TraceService\nfrom app_runtime.tracing.store import ActiveTraceContext, TraceContextStore\nfrom app_runtime.tracing.transport import MySqlTraceTransport, NoOpTraceTransport\n\n__all__ = [\n \"ActiveTraceContext\",\n \"MySqlTraceTransport\",\n \"NoOpTraceTransport\",\n \"TraceContext\",\n \"TraceContextRecord\",\n \"TraceContextStore\",\n \"TraceLogMessage\",\n \"TraceManager\",\n \"TraceService\",\n \"TraceTransport\",\n]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/tracing/__init__.py:1-17", + "span_start": 1, + "span_end": 17, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.tracing.__init__", + "is_test": false, + "blob_sha": "a01dea5f773515aeaae8e6d3431fcb93531a8b577dfa26c2e5db16cd6ae6e4d9", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/__init__.py", + "content": "from plba.bootstrap import create_runtime\nfrom plba.config import ConfigFileLoader, FileConfigProvider\nfrom plba.control import ControlActionSet, ControlChannel, ControlPlaneService, HttpControlChannel\nfrom plba.contracts import (\n ApplicationModule,\n ConfigProvider,\n HealthContributor,\n TraceContext,\n TraceContextRecord,\n TraceLogMessage,\n TraceTransport,\n Worker,\n WorkerHealth,\n WorkerStatus,\n)\nfrom plba.core import ConfigurationManager, RuntimeManager, ServiceContainer\nfrom plba.health import HealthRegistry\nfrom plba.logging import LogManager\nfrom plba.queue import InMemoryTaskQueue\nfrom plba.tracing import MySqlTraceTransport, NoOpTraceTransport, TraceService\nfrom plba.workflow import (\n StepResult,\n WorkflowContext,\n WorkflowDefinition,\n WorkflowEngine,\n WorkflowEngineHooks,\n WorkflowNode,\n WorkflowRuntimeFactory,\n WorkflowStep,\n)\nfrom plba.workers import WorkerSupervisor\n\n__all__ = [\n \"ApplicationModule\",\n \"ConfigFileLoader\",\n \"ConfigProvider\",\n \"ConfigurationManager\",\n \"ControlActionSet\",\n \"ControlChannel\",\n \"ControlPlaneService\",\n \"create_runtime\",\n \"FileConfigProvider\",\n \"HealthContributor\",\n \"HealthRegistry\",\n \"HttpControlChannel\",\n \"InMemoryTaskQueue\",\n \"LogManager\",\n \"MySqlTraceTransport\",\n \"NoOpTraceTransport\",\n \"RuntimeManager\",\n \"ServiceContainer\",\n \"TraceContext\",\n \"TraceContextRecord\",\n \"TraceLogMessage\",\n \"TraceService\",\n \"TraceTransport\",\n \"StepResult\",\n \"Worker\",\n \"WorkerHealth\",\n \"WorkerStatus\",\n \"WorkflowContext\",\n \"WorkflowDefinition\",\n \"WorkflowEngine\",\n \"WorkflowEngineHooks\",\n \"WorkflowNode\",\n \"WorkflowRuntimeFactory\",\n \"WorkflowStep\",\n \"WorkerSupervisor\",\n]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/__init__.py:1-69", + "span_start": 1, + "span_end": 69, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/tracing.py", + "content": "from app_runtime.tracing.service import TraceService\nfrom app_runtime.tracing.transport import MySqlTraceTransport, NoOpTraceTransport\n\n__all__ = [\"MySqlTraceTransport\", \"NoOpTraceTransport\", \"TraceService\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/tracing.py:1-4", + "span_start": 1, + "span_end": 4, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.tracing", + "is_test": false, + "blob_sha": "a27e11c716c93c3fcefe6f11b4cc420a6b743e7606606071d7f1aeeccc4e7d45", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/__init__.py", + "content": "__all__: list[str] = []", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/__init__.py:1-1", + "span_start": 1, + "span_end": 1, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.__init__", + "is_test": false, + "blob_sha": "8eea9df4f6d7b38ca0e39ccc27b04700e3d08dbeec8046d613d22706d19985fa", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/providers.py", + "content": "class FileConfigProvider(ConfigProvider):\n def __init__(self, path: str | Path) -> None:\n self._loader = ConfigFileLoader(path)\n\n @property\n def loader(self) -> ConfigFileLoader:\n return self._loader\n\n def load(self) -> dict[str, Any]:\n config = self._loader.load_sync()\n if not isinstance(config, dict):\n raise TypeError(\"Config root must be a mapping\")\n return dict(config)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/config/providers.py:FileConfigProvider", + "span_start": 10, + "span_end": 22, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.config.providers", + "is_test": false, + "blob_sha": "8c53ca0122d6df6c5763bca15e99434bb4daebd5a618b8fc927e9ae90b022e64", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (13)", + "layer": "C4_SEMANTIC_ROLES", + "title": "TraceService", + "span_start": 39, + "span_end": 166, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 60, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "c2b2b976d99f2c600000b753731b26e0a69adcb4359398b93073590c5d5d04f4", + "symbol_name": "TraceService", + "qname": "TraceService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 13, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/queue/in_memory.py", + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)", + "layer": "C4_SEMANTIC_ROLES", + "title": "InMemoryTaskQueue", + "span_start": 9, + "span_end": 38, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 22, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "2da04cb94544a3bcbf0943a95ad4bdd8710bcafaa32a02fd0e4de2178dcf3533", + "symbol_name": "InMemoryTaskQueue", + "qname": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 9, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "58f0cc001ccda0eee4c6bc32ed83bd05eafd6b6644f1e8b4aa9eed3103db73dc", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "ConfigFileLoader\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (8)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ConfigFileLoader", + "span_start": 11, + "span_end": 48, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 23, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "a8474eca8b6e9dc86ae67ed68b16fa5fb639ef08739c053e7b7195489765667f", + "symbol_name": "ConfigFileLoader", + "qname": "ConfigFileLoader", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 8, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/store.py", + "content": "TraceContextStore\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "TraceContextStore", + "span_start": 15, + "span_end": 52, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b2dad4fbe16ffb11b58deba311c7739955c39d59f291b22181f33e9c8cce4059", + "symbol_name": "TraceContextStore", + "qname": "TraceContextStore", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "d369554f08fc92039c6edd5a2a1e73b23901533e8974459170bbd9347d263dc5", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workers/supervisor.py", + "content": "WorkerSupervisor\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkerSupervisor", + "span_start": 10, + "span_end": 59, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "c17b44e8d9e97d490989b21fa67d7c346cdda8a0472e4c41fb243c8846faa124", + "symbol_name": "WorkerSupervisor", + "qname": "WorkerSupervisor", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "77609d9d5927171cce7fc3a54897c183fd63068710c6362029b700937aae5eee", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.create_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 61, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3b052062067a78aef3302ee1d996897e02a67d1b340397bea4f59fe147c0492a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a", + "dst_ref": "TraceService.create_context", + "resolution": "resolved", + "slice_id": "3b052062067a78aef3302ee1d996897e02a67d1b340397bea4f59fe147c0492a", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.create_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.close_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 84, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "7a9353ef57c9ae5d19b3a0c6ac50fad05e6d21d31bbe1cd1cd07af6332ba6505", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "01e14158dcced7e52d0c8ac84ac7b9a75225c261b6aca6a1d7da802d0994721c", + "dst_ref": "TraceService.close_context", + "resolution": "resolved", + "slice_id": "7a9353ef57c9ae5d19b3a0c6ac50fad05e6d21d31bbe1cd1cd07af6332ba6505", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.close_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "01e14158dcced7e52d0c8ac84ac7b9a75225c261b6aca6a1d7da802d0994721c" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.open_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 78, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a6e13b9ebc4fed84586afd53ed92a4d14757e440873f572b2337d5622ee96031", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426", + "dst_ref": "TraceService.open_context", + "resolution": "resolved", + "slice_id": "a6e13b9ebc4fed84586afd53ed92a4d14757e440873f572b2337d5622ee96031", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.open_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.transport\n -> TraceService.__init__", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 41, + "span_end": 43, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "1e923a93faa05c3c43ca9b19bd047007a8589ccce57d3cc1798ae7f9f200af98", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "dst_ref": "TraceService.__init__", + "resolution": "resolved", + "slice_id": "1e923a93faa05c3c43ca9b19bd047007a8589ccce57d3cc1798ae7f9f200af98", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.transport", + "TraceService.__init__" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.current_trace_id", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 81, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3ea17138634b1190bded77ddb84aa1595124f6519b246f24fc4b02bd62b5cac1", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c", + "dst_ref": "TraceService.current_trace_id", + "resolution": "resolved", + "slice_id": "3ea17138634b1190bded77ddb84aa1595124f6519b246f24fc4b02bd62b5cac1", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.current_trace_id" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.step", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 88, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "9f34c5da9b09fba99df6f6b1bde183a9aeb45111b8218a747c71590c2c9f60f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "c44bfbc66cf747283f30088da3e011a10395031d41e77b74e523c24997f641ca", + "dst_ref": "TraceService.step", + "resolution": "resolved", + "slice_id": "9f34c5da9b09fba99df6f6b1bde183a9aeb45111b8218a747c71590c2c9f60f2", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.step" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "c44bfbc66cf747283f30088da3e011a10395031d41e77b74e523c24997f641ca" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "validation": { + "passed": true, + "action": "return", + "reasons": [] + } + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-explain-trace-service.md b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-explain-trace-service.md new file mode 100644 index 0000000..225c568 --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-explain-trace-service.md @@ -0,0 +1,34 @@ +# plba-v2-explain-trace-service + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: agent_runtime +- mode: full_chain +- passed: True + +## Query +Объясни как работает класс TraceService + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 33, + "llm_answer": "Класс `TraceService` является основным компонентом системы отслеживания трассировок в приложении. Его основная функция заключается в управлении контекстом трассировки и записи событий в журнал.\n\n**Ключевые шаги работы класса:**\n1. Инициализация с передачей транспорта (`transport`) и хранилища контекста (`store`), которые могут быть опциональными.\n2. Создание нового контекста трассировки через метод `create_context`, который генерирует уникальный идентификатор трассы и сохраняет запись о контексте в хранилище.\n3. Управление текущим контекстом трассировки через методы:\n - `current_trace_id`: возвращает текущий идентификатор трассировки.\n - `open_context`: открывает новый контекст трассировки.\n - `close_context`: закрывает текущий контекст трассировки.\n \n**Опорные файлы:**\n- `src/app_runtime/tracing/service.py:39-166`\n- `src/app_runtime/tracing/service.py:66-78`\n- `src/app_runtime/tracing/service.py:45-63`", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "TraceService" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-control-plane.json b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-control-plane.json new file mode 100644 index 0000000..bab51a9 --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-control-plane.json @@ -0,0 +1,1303 @@ +{ + "case_id": "plba-v2-find-entrypoints-control-plane", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "agent_runtime", + "mode": "full_chain", + "query": "Найди точки входа HTTP control plane", + "actual": { + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 9, + "llm_answer": "Confirmed Entrypoints:\n1. src/app_runtime/control/http_app.py:app.post (lines 38-42)\n2. src/app_runtime/control/http_app.py:app.get (lines 31-34)\n3. src/app_runtime/control/http_app.py:app.get (lines 38-42)", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "HTTP", + "control", + "plane" + ], + "layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "query": "Найди точки входа HTTP control plane", + "router_result": { + "schema_version": "1.1", + "intent": "CODE_QA", + "retrieval_profile": "code", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query_plan": { + "raw": "Найди точки входа HTTP control plane", + "normalized": "Найди точки входа HTTP control plane", + "sub_intent": "FIND_ENTRYPOINTS", + "negations": [], + "expansions": [ + "HTTP", + "control", + "plane" + ], + "keyword_hints": [ + "HTTP", + "control", + "plane" + ], + "path_hints": [], + "doc_scope_hints": [], + "symbol_candidates": [ + "HTTP", + "control", + "plane" + ], + "symbol_kind_hint": "class", + "anchors": [ + { + "type": "SYMBOL", + "value": "HTTP", + "source": "user_text", + "subtype": null, + "span": { + "start": 18, + "end": 22 + }, + "confidence": 0.88 + }, + { + "type": "SYMBOL", + "value": "control", + "source": "user_text", + "subtype": null, + "span": { + "start": 23, + "end": 30 + }, + "confidence": 0.88 + }, + { + "type": "SYMBOL", + "value": "plane", + "source": "user_text", + "subtype": null, + "span": { + "start": 31, + "end": 36 + }, + "confidence": 0.88 + } + ] + }, + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C3_ENTRYPOINTS", + "top_k": 12 + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 6 + } + ], + "filters": { + "test_policy": "EXCLUDE", + "path_scope": [], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + }, + "symbol_resolution": { + "status": "pending", + "resolved_symbol": null, + "alternatives": [ + "HTTP", + "control", + "plane" + ], + "confidence": 0.0 + }, + "evidence_policy": { + "require_def": true, + "require_flow": true, + "require_spec": false, + "allow_answer_without_evidence": false + } + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Найди точки входа HTTP control plane", + "sub_intent": "FIND_ENTRYPOINTS", + "path_scope": [], + "keyword_hints": [ + "HTTP", + "control", + "plane" + ], + "symbol_candidates": [ + "HTTP", + "control", + "plane" + ], + "requested_layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ], + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C3_ENTRYPOINTS", + "top_k": 12 + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 6 + } + ], + "filters": { + "test_policy": "EXCLUDE", + "path_scope": [], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + }, + "query_plan": { + "raw": "Найди точки входа HTTP control plane", + "normalized": "Найди точки входа HTTP control plane", + "sub_intent": "FIND_ENTRYPOINTS", + "negations": [], + "expansions": [ + "HTTP", + "control", + "plane" + ], + "keyword_hints": [ + "HTTP", + "control", + "plane" + ], + "path_hints": [], + "doc_scope_hints": [], + "symbol_candidates": [ + "HTTP", + "control", + "plane" + ], + "symbol_kind_hint": "class", + "anchors": [ + { + "type": "SYMBOL", + "value": "HTTP", + "source": "user_text", + "subtype": null, + "span": { + "start": 18, + "end": 22 + }, + "confidence": 0.88 + }, + { + "type": "SYMBOL", + "value": "control", + "source": "user_text", + "subtype": null, + "span": { + "start": 23, + "end": 30 + }, + "confidence": 0.88 + }, + { + "type": "SYMBOL", + "value": "plane", + "source": "user_text", + "subtype": null, + "span": { + "start": 31, + "end": 36 + }, + "confidence": 0.88 + } + ] + } + }, + "retrieval_result": { + "target_symbol_candidates": [], + "resolved_symbol": null, + "symbol_resolution_status": "not_found", + "file_candidates": [ + "src/app_runtime/control/http_app.py", + "src/app_runtime/control/http_channel.py", + "src/app_runtime/control/base.py", + "src/app_runtime/control/__init__.py", + "src/app_runtime/control/http_runner.py" + ], + "code_chunks": [ + { + "layer": "C3_ENTRYPOINTS", + "path": "src/app_runtime/control/http_app.py", + "title": "app.post", + "content": "fastapi http app.post", + "start_line": 38, + "end_line": 42, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C3_ENTRYPOINTS", + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "content": "fastapi http app.get", + "start_line": 31, + "end_line": 34, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C3_ENTRYPOINTS", + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "content": "fastapi http app.get", + "start_line": 38, + "end_line": 42, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/http_channel.py", + "title": "src/app_runtime/control/http_channel.py:HttpControlChannel", + "content": "class HttpControlChannel(ControlChannel):\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._timeout = timeout\n self._runner = UvicornThreadRunner(host, port, timeout)\n self._factory = HttpControlAppFactory()\n self._actions: ControlActionSet | None = None\n\n async def start(self, actions: ControlActionSet) -> None:\n self._actions = actions\n app = self._factory.create(self._health_response, self._action_response)\n await self._runner.start(app)\n\n async def stop(self) -> None:\n await self._runner.stop()\n\n @property\n def port(self) -> int:\n return self._runner.port\n\n async def _health_response(self) -> dict[str, object]:\n if self._actions is None:\n return {\"status\": \"unhealthy\", \"detail\": \"control actions are not configured\"}\n return await asyncio.wait_for(self._actions.health(), timeout=float(self._timeout))\n\n async def _action_response(self, action: str, _client_source: str = \"unknown\") -> JSONResponse:\n if self._actions is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"{action} handler is not configured\"}, status_code=404)\n callbacks = {\n \"start\": self._actions.start,\n \"stop\": self._actions.stop,\n \"status\": self._actions.status,\n }\n callback = callbacks.get(action)\n if callback is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"unsupported action: {action}\"}, status_code=404)\n action_timeout = max(float(self._timeout), 10.0) if action in {\"start\", \"stop\"} else float(self._timeout)\n try:\n detail = await asyncio.wait_for(callback(), timeout=action_timeout)\n except asyncio.TimeoutError:\n return JSONResponse(\n content={\"status\": \"accepted\", \"detail\": f\"{action} operation is still in progress\"},\n status_code=202,\n )\n except Exception as exc:\n return JSONResponse(content={\"status\": \"error\", \"detail\": str(exc)}, status_code=500)\n return JSONResponse(content={\"status\": \"ok\", \"detail\": detail or f\"{action} action accepted\"}, status_code=200)", + "start_line": 12, + "end_line": 57, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/http_app.py", + "title": "src/app_runtime/control/http_app.py:HttpControlAppFactory", + "content": "class HttpControlAppFactory:\n def create(\n self,\n health_provider: Callable[[], Awaitable[HealthPayload]],\n action_provider: Callable[[str, str], Awaitable[JSONResponse]],\n ) -> FastAPI:\n app = FastAPI(title=\"PLBA Control API\")\n\n @app.middleware(\"http\")\n async def log_api_call(request: Request, call_next): # type: ignore[no-untyped-def]\n started = time.monotonic()\n response = await call_next(request)\n response.headers[\"X-Response-Time-Ms\"] = str(int((time.monotonic() - started) * 1000))\n return response\n\n @app.get(\"/health\")\n async def health() -> JSONResponse:\n payload = await health_provider()\n status_code = 200 if payload.get(\"status\") == \"ok\" else 503\n return JSONResponse(content=payload, status_code=status_code)\n\n @app.get(\"/actions/{action}\")\n @app.post(\"/actions/{action}\")\n async def action(action: str, request: Request) -> JSONResponse:\n client_source = self._client_source(request)\n if action in {\"start\", \"stop\"}:\n LOGGER.warning(\"Control action requested: /actions/%s client=%s\", action, client_source)\n return await action_provider(action, client_source)\n\n return app\n\n def _client_source(self, request: Request) -> str:\n explicit_header = request.headers.get(\"X-Client-Source\", \"\").strip()\n if explicit_header:\n return explicit_header\n user_agent = request.headers.get(\"User-Agent\", \"\").strip()\n if user_agent:\n return f\"user-agent:{user_agent}\"\n return \"unknown\"", + "start_line": 15, + "end_line": 53, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/base.py", + "title": "src/app_runtime/control/base.py:ControlActionSet", + "content": "class ControlActionSet:\n health: HealthHandler\n start: ActionHandler\n stop: ActionHandler\n status: ActionHandler", + "start_line": 14, + "end_line": 18, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/__init__.py", + "title": "src/app_runtime/control/__init__.py:1-5", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\"ControlActionSet\", \"ControlChannel\", \"ControlPlaneService\", \"HttpControlChannel\"]", + "start_line": 1, + "end_line": 5, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/base.py", + "title": "src/app_runtime/control/base.py:ControlChannel", + "content": "class ControlChannel(ABC):\n @abstractmethod\n async def start(self, actions: ControlActionSet) -> None:\n \"\"\"Start the control channel and bind handlers.\"\"\"\n\n @abstractmethod\n async def stop(self) -> None:\n \"\"\"Stop the control channel and release resources.\"\"\"", + "start_line": 21, + "end_line": 28, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/http_runner.py", + "title": "src/app_runtime/control/http_runner.py:UvicornThreadRunner", + "content": "class UvicornThreadRunner:\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._host = host\n self._port = port\n self._timeout = timeout\n self._server: Server | None = None\n self._thread: Thread | None = None\n self._error: BaseException | None = None\n\n async def start(self, app: FastAPI) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._error = None\n config = Config(app=app, host=self._host, port=self._port, log_level=\"warning\")\n self._server = Server(config)\n self._thread = Thread(target=self._serve, name=\"plba-http-control\", daemon=True)\n self._thread.start()\n await self._wait_until_started()\n\n async def stop(self) -> None:\n if self._server is None or self._thread is None:\n return\n self._server.should_exit = True\n await asyncio.to_thread(self._thread.join, self._timeout)\n self._server = None\n self._thread = None\n\n @property\n def port(self) -> int:\n if self._server is None or not getattr(self._server, \"servers\", None):\n return self._port\n socket = self._server.servers[0].sockets[0]\n return int(socket.getsockname()[1])\n\n async def _wait_until_started(self) -> None:\n if self._server is None:\n raise RuntimeError(\"Server is not initialized\")\n deadline = asyncio.get_running_loop().time() + max(float(self._timeout), 1.0)\n while not self._server.started:\n if self._error is not None:\n raise RuntimeError(\"HTTP control server failed to start\") from self._error\n if asyncio.get_running_loop().time() >= deadline:\n raise TimeoutError(\"HTTP control server startup timed out\")\n await asyncio.sleep(0.05)\n\n def _serve(self) -> None:\n if self._server is None:\n return\n try:\n asyncio.run(self._server.serve())\n except BaseException as exc: # noqa: BLE001\n self._error = exc", + "start_line": 10, + "end_line": 61, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_runner", + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "relations": [], + "entrypoints": [ + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.post", + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "test_candidates": [], + "layer_outcomes": [ + { + "layer_id": "C3_ENTRYPOINTS", + "hit_count": 3, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 6, + "empty": false, + "fallback_used": false + } + ], + "missing_layers": [], + "raw_rows": [ + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": null, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": null, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": null, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel(ControlChannel):\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._timeout = timeout\n self._runner = UvicornThreadRunner(host, port, timeout)\n self._factory = HttpControlAppFactory()\n self._actions: ControlActionSet | None = None\n\n async def start(self, actions: ControlActionSet) -> None:\n self._actions = actions\n app = self._factory.create(self._health_response, self._action_response)\n await self._runner.start(app)\n\n async def stop(self) -> None:\n await self._runner.stop()\n\n @property\n def port(self) -> int:\n return self._runner.port\n\n async def _health_response(self) -> dict[str, object]:\n if self._actions is None:\n return {\"status\": \"unhealthy\", \"detail\": \"control actions are not configured\"}\n return await asyncio.wait_for(self._actions.health(), timeout=float(self._timeout))\n\n async def _action_response(self, action: str, _client_source: str = \"unknown\") -> JSONResponse:\n if self._actions is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"{action} handler is not configured\"}, status_code=404)\n callbacks = {\n \"start\": self._actions.start,\n \"stop\": self._actions.stop,\n \"status\": self._actions.status,\n }\n callback = callbacks.get(action)\n if callback is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"unsupported action: {action}\"}, status_code=404)\n action_timeout = max(float(self._timeout), 10.0) if action in {\"start\", \"stop\"} else float(self._timeout)\n try:\n detail = await asyncio.wait_for(callback(), timeout=action_timeout)\n except asyncio.TimeoutError:\n return JSONResponse(\n content={\"status\": \"accepted\", \"detail\": f\"{action} operation is still in progress\"},\n status_code=202,\n )\n except Exception as exc:\n return JSONResponse(content={\"status\": \"error\", \"detail\": str(exc)}, status_code=500)\n return JSONResponse(content={\"status\": \"ok\", \"detail\": detail or f\"{action} action accepted\"}, status_code=200)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_channel.py:HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "class HttpControlAppFactory:\n def create(\n self,\n health_provider: Callable[[], Awaitable[HealthPayload]],\n action_provider: Callable[[str, str], Awaitable[JSONResponse]],\n ) -> FastAPI:\n app = FastAPI(title=\"PLBA Control API\")\n\n @app.middleware(\"http\")\n async def log_api_call(request: Request, call_next): # type: ignore[no-untyped-def]\n started = time.monotonic()\n response = await call_next(request)\n response.headers[\"X-Response-Time-Ms\"] = str(int((time.monotonic() - started) * 1000))\n return response\n\n @app.get(\"/health\")\n async def health() -> JSONResponse:\n payload = await health_provider()\n status_code = 200 if payload.get(\"status\") == \"ok\" else 503\n return JSONResponse(content=payload, status_code=status_code)\n\n @app.get(\"/actions/{action}\")\n @app.post(\"/actions/{action}\")\n async def action(action: str, request: Request) -> JSONResponse:\n client_source = self._client_source(request)\n if action in {\"start\", \"stop\"}:\n LOGGER.warning(\"Control action requested: /actions/%s client=%s\", action, client_source)\n return await action_provider(action, client_source)\n\n return app\n\n def _client_source(self, request: Request) -> str:\n explicit_header = request.headers.get(\"X-Client-Source\", \"\").strip()\n if explicit_header:\n return explicit_header\n user_agent = request.headers.get(\"User-Agent\", \"\").strip()\n if user_agent:\n return f\"user-agent:{user_agent}\"\n return \"unknown\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_app.py:HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlActionSet:\n health: HealthHandler\n start: ActionHandler\n stop: ActionHandler\n status: ActionHandler", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\"ControlActionSet\", \"ControlChannel\", \"ControlPlaneService\", \"HttpControlChannel\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/__init__.py:1-5", + "span_start": 1, + "span_end": 5, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlChannel(ABC):\n @abstractmethod\n async def start(self, actions: ControlActionSet) -> None:\n \"\"\"Start the control channel and bind handlers.\"\"\"\n\n @abstractmethod\n async def stop(self) -> None:\n \"\"\"Stop the control channel and release resources.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "class UvicornThreadRunner:\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._host = host\n self._port = port\n self._timeout = timeout\n self._server: Server | None = None\n self._thread: Thread | None = None\n self._error: BaseException | None = None\n\n async def start(self, app: FastAPI) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._error = None\n config = Config(app=app, host=self._host, port=self._port, log_level=\"warning\")\n self._server = Server(config)\n self._thread = Thread(target=self._serve, name=\"plba-http-control\", daemon=True)\n self._thread.start()\n await self._wait_until_started()\n\n async def stop(self) -> None:\n if self._server is None or self._thread is None:\n return\n self._server.should_exit = True\n await asyncio.to_thread(self._thread.join, self._timeout)\n self._server = None\n self._thread = None\n\n @property\n def port(self) -> int:\n if self._server is None or not getattr(self._server, \"servers\", None):\n return self._port\n socket = self._server.servers[0].sockets[0]\n return int(socket.getsockname()[1])\n\n async def _wait_until_started(self) -> None:\n if self._server is None:\n raise RuntimeError(\"Server is not initialized\")\n deadline = asyncio.get_running_loop().time() + max(float(self._timeout), 1.0)\n while not self._server.started:\n if self._error is not None:\n raise RuntimeError(\"HTTP control server failed to start\") from self._error\n if asyncio.get_running_loop().time() >= deadline:\n raise TimeoutError(\"HTTP control server startup timed out\")\n await asyncio.sleep(0.05)\n\n def _serve(self) -> None:\n if self._server is None:\n return\n try:\n asyncio.run(self._server.serve())\n except BaseException as exc: # noqa: BLE001\n self._error = exc", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_runner.py:UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_runner", + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "retrieval_report": { + "executed_layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C3_ENTRYPOINTS": "vector", + "C0_SOURCE_CHUNKS": "vector" + }, + "top_k_by_layer": { + "C3_ENTRYPOINTS": 12, + "C0_SOURCE_CHUNKS": 6 + }, + "filters_by_layer": { + "C3_ENTRYPOINTS": { + "path_scope": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [] + } + }, + "fallback": { + "used": false, + "reason": null + }, + "retrieval_by_layer_ms": { + "C3_ENTRYPOINTS": 11, + "C0_SOURCE_CHUNKS": 21 + } + } + }, + "diagnostics": { + "intent_correct": null, + "target_found": true, + "layers_used": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ], + "retrieval_sufficient": true, + "answer_mode": "normal", + "router_result": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "FIND_ENTRYPOINTS", + "path_scope": [], + "layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ], + "symbol_resolution_status": "pending" + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Найди точки входа HTTP control plane", + "sub_intent": "FIND_ENTRYPOINTS", + "path_scope": [], + "requested_layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "C3_ENTRYPOINTS", + "hit_count": 3, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 6, + "empty": false, + "fallback_used": false + } + ], + "empty_layers": [], + "evidence_gate_decision": { + "sufficient": true, + "failure_reasons": [], + "evidence_count": 9 + }, + "failure_reasons": [], + "timings_ms": {} + }, + "rag_rows": [ + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel(ControlChannel):\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._timeout = timeout\n self._runner = UvicornThreadRunner(host, port, timeout)\n self._factory = HttpControlAppFactory()\n self._actions: ControlActionSet | None = None\n\n async def start(self, actions: ControlActionSet) -> None:\n self._actions = actions\n app = self._factory.create(self._health_response, self._action_response)\n await self._runner.start(app)\n\n async def stop(self) -> None:\n await self._runner.stop()\n\n @property\n def port(self) -> int:\n return self._runner.port\n\n async def _health_response(self) -> dict[str, object]:\n if self._actions is None:\n return {\"status\": \"unhealthy\", \"detail\": \"control actions are not configured\"}\n return await asyncio.wait_for(self._actions.health(), timeout=float(self._timeout))\n\n async def _action_response(self, action: str, _client_source: str = \"unknown\") -> JSONResponse:\n if self._actions is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"{action} handler is not configured\"}, status_code=404)\n callbacks = {\n \"start\": self._actions.start,\n \"stop\": self._actions.stop,\n \"status\": self._actions.status,\n }\n callback = callbacks.get(action)\n if callback is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"unsupported action: {action}\"}, status_code=404)\n action_timeout = max(float(self._timeout), 10.0) if action in {\"start\", \"stop\"} else float(self._timeout)\n try:\n detail = await asyncio.wait_for(callback(), timeout=action_timeout)\n except asyncio.TimeoutError:\n return JSONResponse(\n content={\"status\": \"accepted\", \"detail\": f\"{action} operation is still in progress\"},\n status_code=202,\n )\n except Exception as exc:\n return JSONResponse(content={\"status\": \"error\", \"detail\": str(exc)}, status_code=500)\n return JSONResponse(content={\"status\": \"ok\", \"detail\": detail or f\"{action} action accepted\"}, status_code=200)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_channel.py:HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "class HttpControlAppFactory:\n def create(\n self,\n health_provider: Callable[[], Awaitable[HealthPayload]],\n action_provider: Callable[[str, str], Awaitable[JSONResponse]],\n ) -> FastAPI:\n app = FastAPI(title=\"PLBA Control API\")\n\n @app.middleware(\"http\")\n async def log_api_call(request: Request, call_next): # type: ignore[no-untyped-def]\n started = time.monotonic()\n response = await call_next(request)\n response.headers[\"X-Response-Time-Ms\"] = str(int((time.monotonic() - started) * 1000))\n return response\n\n @app.get(\"/health\")\n async def health() -> JSONResponse:\n payload = await health_provider()\n status_code = 200 if payload.get(\"status\") == \"ok\" else 503\n return JSONResponse(content=payload, status_code=status_code)\n\n @app.get(\"/actions/{action}\")\n @app.post(\"/actions/{action}\")\n async def action(action: str, request: Request) -> JSONResponse:\n client_source = self._client_source(request)\n if action in {\"start\", \"stop\"}:\n LOGGER.warning(\"Control action requested: /actions/%s client=%s\", action, client_source)\n return await action_provider(action, client_source)\n\n return app\n\n def _client_source(self, request: Request) -> str:\n explicit_header = request.headers.get(\"X-Client-Source\", \"\").strip()\n if explicit_header:\n return explicit_header\n user_agent = request.headers.get(\"User-Agent\", \"\").strip()\n if user_agent:\n return f\"user-agent:{user_agent}\"\n return \"unknown\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_app.py:HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlActionSet:\n health: HealthHandler\n start: ActionHandler\n stop: ActionHandler\n status: ActionHandler", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\"ControlActionSet\", \"ControlChannel\", \"ControlPlaneService\", \"HttpControlChannel\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/__init__.py:1-5", + "span_start": 1, + "span_end": 5, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlChannel(ABC):\n @abstractmethod\n async def start(self, actions: ControlActionSet) -> None:\n \"\"\"Start the control channel and bind handlers.\"\"\"\n\n @abstractmethod\n async def stop(self) -> None:\n \"\"\"Stop the control channel and release resources.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "class UvicornThreadRunner:\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._host = host\n self._port = port\n self._timeout = timeout\n self._server: Server | None = None\n self._thread: Thread | None = None\n self._error: BaseException | None = None\n\n async def start(self, app: FastAPI) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._error = None\n config = Config(app=app, host=self._host, port=self._port, log_level=\"warning\")\n self._server = Server(config)\n self._thread = Thread(target=self._serve, name=\"plba-http-control\", daemon=True)\n self._thread.start()\n await self._wait_until_started()\n\n async def stop(self) -> None:\n if self._server is None or self._thread is None:\n return\n self._server.should_exit = True\n await asyncio.to_thread(self._thread.join, self._timeout)\n self._server = None\n self._thread = None\n\n @property\n def port(self) -> int:\n if self._server is None or not getattr(self._server, \"servers\", None):\n return self._port\n socket = self._server.servers[0].sockets[0]\n return int(socket.getsockname()[1])\n\n async def _wait_until_started(self) -> None:\n if self._server is None:\n raise RuntimeError(\"Server is not initialized\")\n deadline = asyncio.get_running_loop().time() + max(float(self._timeout), 1.0)\n while not self._server.started:\n if self._error is not None:\n raise RuntimeError(\"HTTP control server failed to start\") from self._error\n if asyncio.get_running_loop().time() >= deadline:\n raise TimeoutError(\"HTTP control server startup timed out\")\n await asyncio.sleep(0.05)\n\n def _serve(self) -> None:\n if self._server is None:\n return\n try:\n asyncio.run(self._server.serve())\n except BaseException as exc: # noqa: BLE001\n self._error = exc", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_runner.py:UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_runner", + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "validation": { + "passed": true, + "action": "return", + "reasons": [] + } + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-control-plane.md b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-control-plane.md new file mode 100644 index 0000000..5287615 --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-control-plane.md @@ -0,0 +1,33 @@ +# plba-v2-find-entrypoints-control-plane + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: agent_runtime +- mode: full_chain +- passed: True + +## Query +Найди точки входа HTTP control plane + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 9, + "llm_answer": "Confirmed Entrypoints:\n1. src/app_runtime/control/http_app.py:app.post (lines 38-42)\n2. src/app_runtime/control/http_app.py:app.get (lines 31-34)\n3. src/app_runtime/control/http_app.py:app.get (lines 38-42)", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "HTTP", + "control", + "plane" + ], + "layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-health-endpoint.json b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-health-endpoint.json new file mode 100644 index 0000000..e4ae87b --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-health-endpoint.json @@ -0,0 +1,1274 @@ +{ + "case_id": "plba-v2-find-entrypoints-health-endpoint", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "agent_runtime", + "mode": "full_chain", + "query": "Где health endpoint?", + "actual": { + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 9, + "llm_answer": "health endpoint: \n- src/app_runtime/control/http_app.py:38-42 (app.post)\n- src/app_runtime/control/http_app.py:31-34 (app.get)", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "health", + "endpoint" + ], + "layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ] + }, + "passed": false, + "mismatches": [ + "llm: expected answer to contain 'GET /health'" + ], + "details": { + "query": "Где health endpoint?", + "router_result": { + "schema_version": "1.1", + "intent": "CODE_QA", + "retrieval_profile": "code", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query_plan": { + "raw": "Где health endpoint?", + "normalized": "Где health endpoint?", + "sub_intent": "FIND_ENTRYPOINTS", + "negations": [], + "expansions": [ + "health", + "endpoint" + ], + "keyword_hints": [ + "health", + "endpoint" + ], + "path_hints": [], + "doc_scope_hints": [], + "symbol_candidates": [ + "health", + "endpoint" + ], + "symbol_kind_hint": "unknown", + "anchors": [ + { + "type": "SYMBOL", + "value": "health", + "source": "user_text", + "subtype": null, + "span": { + "start": 4, + "end": 10 + }, + "confidence": 0.88 + }, + { + "type": "SYMBOL", + "value": "endpoint", + "source": "user_text", + "subtype": null, + "span": { + "start": 11, + "end": 19 + }, + "confidence": 0.88 + } + ] + }, + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C3_ENTRYPOINTS", + "top_k": 12 + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 6 + } + ], + "filters": { + "test_policy": "EXCLUDE", + "path_scope": [], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + }, + "symbol_resolution": { + "status": "pending", + "resolved_symbol": null, + "alternatives": [ + "health", + "endpoint" + ], + "confidence": 0.0 + }, + "evidence_policy": { + "require_def": true, + "require_flow": true, + "require_spec": false, + "allow_answer_without_evidence": false + } + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Где health endpoint?", + "sub_intent": "FIND_ENTRYPOINTS", + "path_scope": [], + "keyword_hints": [ + "health", + "endpoint" + ], + "symbol_candidates": [ + "health", + "endpoint" + ], + "requested_layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ], + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C3_ENTRYPOINTS", + "top_k": 12 + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 6 + } + ], + "filters": { + "test_policy": "EXCLUDE", + "path_scope": [], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + }, + "query_plan": { + "raw": "Где health endpoint?", + "normalized": "Где health endpoint?", + "sub_intent": "FIND_ENTRYPOINTS", + "negations": [], + "expansions": [ + "health", + "endpoint" + ], + "keyword_hints": [ + "health", + "endpoint" + ], + "path_hints": [], + "doc_scope_hints": [], + "symbol_candidates": [ + "health", + "endpoint" + ], + "symbol_kind_hint": "unknown", + "anchors": [ + { + "type": "SYMBOL", + "value": "health", + "source": "user_text", + "subtype": null, + "span": { + "start": 4, + "end": 10 + }, + "confidence": 0.88 + }, + { + "type": "SYMBOL", + "value": "endpoint", + "source": "user_text", + "subtype": null, + "span": { + "start": 11, + "end": 19 + }, + "confidence": 0.88 + } + ] + } + }, + "retrieval_result": { + "target_symbol_candidates": [], + "resolved_symbol": null, + "symbol_resolution_status": "not_found", + "file_candidates": [ + "src/app_runtime/control/http_app.py", + "src/app_runtime/health/registry.py", + "src/plba/health.py", + "src/app_runtime/contracts/health.py", + "src/app_runtime/health/__init__.py", + "src/app_runtime/contracts/worker.py" + ], + "code_chunks": [ + { + "layer": "C3_ENTRYPOINTS", + "path": "src/app_runtime/control/http_app.py", + "title": "app.post", + "content": "fastapi http app.post", + "start_line": 38, + "end_line": 42, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C3_ENTRYPOINTS", + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "content": "fastapi http app.get", + "start_line": 31, + "end_line": 34, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C3_ENTRYPOINTS", + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "content": "fastapi http app.get", + "start_line": 38, + "end_line": 42, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/health/registry.py", + "title": "src/app_runtime/health/registry.py:HealthRegistry", + "content": "class HealthRegistry:\n def __init__(self) -> None:\n self._contributors: list[HealthContributor] = []\n\n def register(self, contributor: HealthContributor) -> None:\n self._contributors.append(contributor)\n\n def contributor_healths(self) -> list[WorkerHealth]:\n return [contributor.health() for contributor in self._contributors]\n\n def snapshot(self, worker_healths: list[WorkerHealth]) -> dict[str, object]:\n component_healths = worker_healths + self.contributor_healths()\n return {\n \"status\": self._aggregate_status(component_healths),\n \"components\": [self._health_dict(item) for item in component_healths],\n }\n\n def payload(self, state: LifecycleState, worker_healths: list[WorkerHealth]) -> HealthPayload:\n component_healths = worker_healths + self.contributor_healths()\n if state == LifecycleState.STOPPED:\n return {\"status\": \"unhealthy\", \"detail\": \"state=stopped\", \"state\": state.value}\n if state in {LifecycleState.STARTING, LifecycleState.STOPPING}:\n return {\n \"status\": \"degraded\",\n \"detail\": f\"state={state.value}\",\n \"state\": state.value,\n \"components\": [self._health_dict(item) for item in component_healths],\n }\n return {\n \"status\": self._aggregate_status(component_healths),\n \"state\": state.value,\n \"components\": [self._health_dict(item) for item in component_healths],\n }\n\n def _aggregate_status(self, component_healths: list[WorkerHealth]) -> str:\n if any(item.status == \"unhealthy\" and item.critical for item in component_healths):\n return \"unhealthy\"\n if any(item.status in {\"degraded\", \"unhealthy\"} for item in component_healths):\n return \"degraded\"\n return \"ok\"\n\n def _health_dict(self, health: WorkerHealth) -> dict[str, object]:\n return {\n \"name\": health.name,\n \"status\": health.status,\n \"critical\": health.critical,\n \"detail\": health.detail,\n \"meta\": health.meta,\n }", + "start_line": 8, + "end_line": 56, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.health.registry", + "is_test": false, + "blob_sha": "26e6a24daa43407ba5340b74497c20153020e79f8d7828ae502aaec378dfcf75", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/plba/health.py", + "title": "src/app_runtime/health/__init__.py:1-3", + "content": "from app_runtime.health.registry import HealthRegistry\n\n__all__ = [\"HealthRegistry\"]", + "start_line": 1, + "end_line": 3, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.health.__init__", + "is_test": false, + "blob_sha": "f7b15eed8b1f1cca8dfd467909a2612d8cb4e66e46b972ad89a0c9459ce283a0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/contracts/health.py", + "title": "src/app_runtime/contracts/health.py:HealthContributor", + "content": "class HealthContributor(ABC):\n @abstractmethod\n def health(self) -> WorkerHealth:\n \"\"\"Return contributor health state.\"\"\"", + "start_line": 7, + "end_line": 10, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.health", + "is_test": false, + "blob_sha": "6bd92611def7131e32d4dd34a8ed85e6cf3c67722ad27797032a632cb30dc097", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/health/__init__.py", + "title": "src/app_runtime/health/__init__.py:1-3", + "content": "from app_runtime.health.registry import HealthRegistry\n\n__all__ = [\"HealthRegistry\"]", + "start_line": 1, + "end_line": 3, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.health.__init__", + "is_test": false, + "blob_sha": "f7b15eed8b1f1cca8dfd467909a2612d8cb4e66e46b972ad89a0c9459ce283a0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/contracts/worker.py", + "title": "src/app_runtime/contracts/worker.py:WorkerHealth", + "content": "class WorkerHealth:\n name: str\n status: HealthState\n critical: bool\n detail: str | None = None\n meta: dict[str, Any] = field(default_factory=dict)", + "start_line": 13, + "end_line": 18, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.worker", + "is_test": false, + "blob_sha": "e4827d32220f322d8adc3e42769da3ca0cc680db6a5eab7a11f4d8773a75304e", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/contracts/worker.py", + "title": "src/app_runtime/contracts/worker.py:Worker", + "content": "class Worker(ABC):\n @property\n @abstractmethod\n def name(self) -> str:\n \"\"\"Stable worker name for diagnostics.\"\"\"\n\n @property\n @abstractmethod\n def critical(self) -> bool:\n \"\"\"Whether this worker is required for healthy app operation.\"\"\"\n\n @abstractmethod\n def start(self) -> None:\n \"\"\"Start worker execution.\"\"\"\n\n @abstractmethod\n def stop(self, force: bool = False) -> None:\n \"\"\"Request graceful or immediate stop.\"\"\"\n\n @abstractmethod\n def health(self) -> WorkerHealth:\n \"\"\"Return current health state.\"\"\"\n\n @abstractmethod\n def status(self) -> WorkerStatus:\n \"\"\"Return current runtime status.\"\"\"", + "start_line": 30, + "end_line": 55, + "metadata": { + "chunk_index": 2, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.worker", + "is_test": false, + "blob_sha": "e4827d32220f322d8adc3e42769da3ca0cc680db6a5eab7a11f4d8773a75304e", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "relations": [], + "entrypoints": [ + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.post", + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "test_candidates": [], + "layer_outcomes": [ + { + "layer_id": "C3_ENTRYPOINTS", + "hit_count": 3, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 6, + "empty": false, + "fallback_used": false + } + ], + "missing_layers": [], + "raw_rows": [ + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": null, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": null, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": null, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/health/registry.py", + "content": "class HealthRegistry:\n def __init__(self) -> None:\n self._contributors: list[HealthContributor] = []\n\n def register(self, contributor: HealthContributor) -> None:\n self._contributors.append(contributor)\n\n def contributor_healths(self) -> list[WorkerHealth]:\n return [contributor.health() for contributor in self._contributors]\n\n def snapshot(self, worker_healths: list[WorkerHealth]) -> dict[str, object]:\n component_healths = worker_healths + self.contributor_healths()\n return {\n \"status\": self._aggregate_status(component_healths),\n \"components\": [self._health_dict(item) for item in component_healths],\n }\n\n def payload(self, state: LifecycleState, worker_healths: list[WorkerHealth]) -> HealthPayload:\n component_healths = worker_healths + self.contributor_healths()\n if state == LifecycleState.STOPPED:\n return {\"status\": \"unhealthy\", \"detail\": \"state=stopped\", \"state\": state.value}\n if state in {LifecycleState.STARTING, LifecycleState.STOPPING}:\n return {\n \"status\": \"degraded\",\n \"detail\": f\"state={state.value}\",\n \"state\": state.value,\n \"components\": [self._health_dict(item) for item in component_healths],\n }\n return {\n \"status\": self._aggregate_status(component_healths),\n \"state\": state.value,\n \"components\": [self._health_dict(item) for item in component_healths],\n }\n\n def _aggregate_status(self, component_healths: list[WorkerHealth]) -> str:\n if any(item.status == \"unhealthy\" and item.critical for item in component_healths):\n return \"unhealthy\"\n if any(item.status in {\"degraded\", \"unhealthy\"} for item in component_healths):\n return \"degraded\"\n return \"ok\"\n\n def _health_dict(self, health: WorkerHealth) -> dict[str, object]:\n return {\n \"name\": health.name,\n \"status\": health.status,\n \"critical\": health.critical,\n \"detail\": health.detail,\n \"meta\": health.meta,\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/health/registry.py:HealthRegistry", + "span_start": 8, + "span_end": 56, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.health.registry", + "is_test": false, + "blob_sha": "26e6a24daa43407ba5340b74497c20153020e79f8d7828ae502aaec378dfcf75", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/health.py", + "content": "from app_runtime.health.registry import HealthRegistry\n\n__all__ = [\"HealthRegistry\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/health/__init__.py:1-3", + "span_start": 1, + "span_end": 3, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.health.__init__", + "is_test": false, + "blob_sha": "f7b15eed8b1f1cca8dfd467909a2612d8cb4e66e46b972ad89a0c9459ce283a0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/health.py", + "content": "class HealthContributor(ABC):\n @abstractmethod\n def health(self) -> WorkerHealth:\n \"\"\"Return contributor health state.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/contracts/health.py:HealthContributor", + "span_start": 7, + "span_end": 10, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.health", + "is_test": false, + "blob_sha": "6bd92611def7131e32d4dd34a8ed85e6cf3c67722ad27797032a632cb30dc097", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/health/__init__.py", + "content": "from app_runtime.health.registry import HealthRegistry\n\n__all__ = [\"HealthRegistry\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/health/__init__.py:1-3", + "span_start": 1, + "span_end": 3, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.health.__init__", + "is_test": false, + "blob_sha": "f7b15eed8b1f1cca8dfd467909a2612d8cb4e66e46b972ad89a0c9459ce283a0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/worker.py", + "content": "class WorkerHealth:\n name: str\n status: HealthState\n critical: bool\n detail: str | None = None\n meta: dict[str, Any] = field(default_factory=dict)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/contracts/worker.py:WorkerHealth", + "span_start": 13, + "span_end": 18, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.worker", + "is_test": false, + "blob_sha": "e4827d32220f322d8adc3e42769da3ca0cc680db6a5eab7a11f4d8773a75304e", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/worker.py", + "content": "class Worker(ABC):\n @property\n @abstractmethod\n def name(self) -> str:\n \"\"\"Stable worker name for diagnostics.\"\"\"\n\n @property\n @abstractmethod\n def critical(self) -> bool:\n \"\"\"Whether this worker is required for healthy app operation.\"\"\"\n\n @abstractmethod\n def start(self) -> None:\n \"\"\"Start worker execution.\"\"\"\n\n @abstractmethod\n def stop(self, force: bool = False) -> None:\n \"\"\"Request graceful or immediate stop.\"\"\"\n\n @abstractmethod\n def health(self) -> WorkerHealth:\n \"\"\"Return current health state.\"\"\"\n\n @abstractmethod\n def status(self) -> WorkerStatus:\n \"\"\"Return current runtime status.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/contracts/worker.py:Worker", + "span_start": 30, + "span_end": 55, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 2, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.worker", + "is_test": false, + "blob_sha": "e4827d32220f322d8adc3e42769da3ca0cc680db6a5eab7a11f4d8773a75304e", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "retrieval_report": { + "executed_layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C3_ENTRYPOINTS": "vector", + "C0_SOURCE_CHUNKS": "vector" + }, + "top_k_by_layer": { + "C3_ENTRYPOINTS": 12, + "C0_SOURCE_CHUNKS": 6 + }, + "filters_by_layer": { + "C3_ENTRYPOINTS": { + "path_scope": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [] + } + }, + "fallback": { + "used": false, + "reason": null + }, + "retrieval_by_layer_ms": { + "C3_ENTRYPOINTS": 32, + "C0_SOURCE_CHUNKS": 19 + } + } + }, + "diagnostics": { + "intent_correct": null, + "target_found": true, + "layers_used": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ], + "retrieval_sufficient": true, + "answer_mode": "normal", + "router_result": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "FIND_ENTRYPOINTS", + "path_scope": [], + "layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ], + "symbol_resolution_status": "pending" + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Где health endpoint?", + "sub_intent": "FIND_ENTRYPOINTS", + "path_scope": [], + "requested_layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "C3_ENTRYPOINTS", + "hit_count": 3, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 6, + "empty": false, + "fallback_used": false + } + ], + "empty_layers": [], + "evidence_gate_decision": { + "sufficient": true, + "failure_reasons": [], + "evidence_count": 9 + }, + "failure_reasons": [], + "timings_ms": {} + }, + "rag_rows": [ + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/health/registry.py", + "content": "class HealthRegistry:\n def __init__(self) -> None:\n self._contributors: list[HealthContributor] = []\n\n def register(self, contributor: HealthContributor) -> None:\n self._contributors.append(contributor)\n\n def contributor_healths(self) -> list[WorkerHealth]:\n return [contributor.health() for contributor in self._contributors]\n\n def snapshot(self, worker_healths: list[WorkerHealth]) -> dict[str, object]:\n component_healths = worker_healths + self.contributor_healths()\n return {\n \"status\": self._aggregate_status(component_healths),\n \"components\": [self._health_dict(item) for item in component_healths],\n }\n\n def payload(self, state: LifecycleState, worker_healths: list[WorkerHealth]) -> HealthPayload:\n component_healths = worker_healths + self.contributor_healths()\n if state == LifecycleState.STOPPED:\n return {\"status\": \"unhealthy\", \"detail\": \"state=stopped\", \"state\": state.value}\n if state in {LifecycleState.STARTING, LifecycleState.STOPPING}:\n return {\n \"status\": \"degraded\",\n \"detail\": f\"state={state.value}\",\n \"state\": state.value,\n \"components\": [self._health_dict(item) for item in component_healths],\n }\n return {\n \"status\": self._aggregate_status(component_healths),\n \"state\": state.value,\n \"components\": [self._health_dict(item) for item in component_healths],\n }\n\n def _aggregate_status(self, component_healths: list[WorkerHealth]) -> str:\n if any(item.status == \"unhealthy\" and item.critical for item in component_healths):\n return \"unhealthy\"\n if any(item.status in {\"degraded\", \"unhealthy\"} for item in component_healths):\n return \"degraded\"\n return \"ok\"\n\n def _health_dict(self, health: WorkerHealth) -> dict[str, object]:\n return {\n \"name\": health.name,\n \"status\": health.status,\n \"critical\": health.critical,\n \"detail\": health.detail,\n \"meta\": health.meta,\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/health/registry.py:HealthRegistry", + "span_start": 8, + "span_end": 56, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.health.registry", + "is_test": false, + "blob_sha": "26e6a24daa43407ba5340b74497c20153020e79f8d7828ae502aaec378dfcf75", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/health.py", + "content": "from app_runtime.health.registry import HealthRegistry\n\n__all__ = [\"HealthRegistry\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/health/__init__.py:1-3", + "span_start": 1, + "span_end": 3, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.health.__init__", + "is_test": false, + "blob_sha": "f7b15eed8b1f1cca8dfd467909a2612d8cb4e66e46b972ad89a0c9459ce283a0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/health.py", + "content": "class HealthContributor(ABC):\n @abstractmethod\n def health(self) -> WorkerHealth:\n \"\"\"Return contributor health state.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/contracts/health.py:HealthContributor", + "span_start": 7, + "span_end": 10, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.health", + "is_test": false, + "blob_sha": "6bd92611def7131e32d4dd34a8ed85e6cf3c67722ad27797032a632cb30dc097", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/health/__init__.py", + "content": "from app_runtime.health.registry import HealthRegistry\n\n__all__ = [\"HealthRegistry\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/health/__init__.py:1-3", + "span_start": 1, + "span_end": 3, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.health.__init__", + "is_test": false, + "blob_sha": "f7b15eed8b1f1cca8dfd467909a2612d8cb4e66e46b972ad89a0c9459ce283a0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/worker.py", + "content": "class WorkerHealth:\n name: str\n status: HealthState\n critical: bool\n detail: str | None = None\n meta: dict[str, Any] = field(default_factory=dict)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/contracts/worker.py:WorkerHealth", + "span_start": 13, + "span_end": 18, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.worker", + "is_test": false, + "blob_sha": "e4827d32220f322d8adc3e42769da3ca0cc680db6a5eab7a11f4d8773a75304e", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/worker.py", + "content": "class Worker(ABC):\n @property\n @abstractmethod\n def name(self) -> str:\n \"\"\"Stable worker name for diagnostics.\"\"\"\n\n @property\n @abstractmethod\n def critical(self) -> bool:\n \"\"\"Whether this worker is required for healthy app operation.\"\"\"\n\n @abstractmethod\n def start(self) -> None:\n \"\"\"Start worker execution.\"\"\"\n\n @abstractmethod\n def stop(self, force: bool = False) -> None:\n \"\"\"Request graceful or immediate stop.\"\"\"\n\n @abstractmethod\n def health(self) -> WorkerHealth:\n \"\"\"Return current health state.\"\"\"\n\n @abstractmethod\n def status(self) -> WorkerStatus:\n \"\"\"Return current runtime status.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/contracts/worker.py:Worker", + "span_start": 30, + "span_end": 55, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 2, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.worker", + "is_test": false, + "blob_sha": "e4827d32220f322d8adc3e42769da3ca0cc680db6a5eab7a11f4d8773a75304e", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "validation": { + "passed": true, + "action": "return", + "reasons": [] + } + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-health-endpoint.md b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-health-endpoint.md new file mode 100644 index 0000000..9dd7d51 --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-health-endpoint.md @@ -0,0 +1,32 @@ +# plba-v2-find-entrypoints-health-endpoint + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: agent_runtime +- mode: full_chain +- passed: False + +## Query +Где health endpoint? + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 9, + "llm_answer": "health endpoint: \n- src/app_runtime/control/http_app.py:38-42 (app.post)\n- src/app_runtime/control/http_app.py:31-34 (app.get)", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "health", + "endpoint" + ], + "layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- llm: expected answer to contain 'GET /health' \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-find-tests-create-runtime.json b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-find-tests-create-runtime.json new file mode 100644 index 0000000..173bf33 --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-find-tests-create-runtime.json @@ -0,0 +1,2746 @@ +{ + "case_id": "plba-v2-find-tests-create-runtime", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "agent_runtime", + "mode": "full_chain", + "query": "Где тесты для create_runtime?", + "actual": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 24, + "llm_answer": "- tests/test_runtime.py:342-405", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "create_runtime" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "query": "Где тесты для create_runtime?", + "router_result": { + "schema_version": "1.1", + "intent": "CODE_QA", + "retrieval_profile": "code", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query_plan": { + "raw": "Где тесты для create_runtime?", + "normalized": "Где тесты для create_runtime?", + "sub_intent": "FIND_TESTS", + "negations": [], + "expansions": [ + "test", + "unit test", + "create_runtime" + ], + "keyword_hints": [ + "create_runtime" + ], + "path_hints": [], + "doc_scope_hints": [], + "symbol_candidates": [ + "create_runtime" + ], + "symbol_kind_hint": "function", + "anchors": [ + { + "type": "SYMBOL", + "value": "create_runtime", + "source": "user_text", + "subtype": null, + "span": { + "start": 14, + "end": 28 + }, + "confidence": 0.88 + }, + { + "type": "KEY_TERM", + "value": "тест", + "source": "user_text", + "subtype": null, + "span": { + "start": 4, + "end": 9 + }, + "confidence": 0.9 + } + ] + }, + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "top_k": 8 + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "top_k": 6 + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 10 + } + ], + "filters": { + "test_policy": "INCLUDE", + "path_scope": [], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "test_file_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "test_symbol_patterns": [ + "test_create_runtime", + "Testcreate_runtime", + "create_runtime" + ], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + }, + "symbol_resolution": { + "status": "pending", + "resolved_symbol": null, + "alternatives": [ + "create_runtime" + ], + "confidence": 0.0 + }, + "evidence_policy": { + "require_def": true, + "require_flow": true, + "require_spec": false, + "allow_answer_without_evidence": false + } + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Где тесты для create_runtime?", + "sub_intent": "FIND_TESTS", + "path_scope": [], + "keyword_hints": [ + "create_runtime" + ], + "symbol_candidates": [ + "create_runtime" + ], + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "top_k": 8 + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "top_k": 6 + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 10 + } + ], + "filters": { + "test_policy": "INCLUDE", + "path_scope": [], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "test_file_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "test_symbol_patterns": [ + "test_create_runtime", + "Testcreate_runtime", + "create_runtime" + ], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + }, + "query_plan": { + "raw": "Где тесты для create_runtime?", + "normalized": "Где тесты для create_runtime?", + "sub_intent": "FIND_TESTS", + "negations": [], + "expansions": [ + "test", + "unit test", + "create_runtime" + ], + "keyword_hints": [ + "create_runtime" + ], + "path_hints": [], + "doc_scope_hints": [], + "symbol_candidates": [ + "create_runtime" + ], + "symbol_kind_hint": "function", + "anchors": [ + { + "type": "SYMBOL", + "value": "create_runtime", + "source": "user_text", + "subtype": null, + "span": { + "start": 14, + "end": 28 + }, + "confidence": 0.88 + }, + { + "type": "KEY_TERM", + "value": "тест", + "source": "user_text", + "subtype": null, + "span": { + "start": 4, + "end": 9 + }, + "confidence": 0.9 + } + ] + } + }, + "retrieval_result": { + "target_symbol_candidates": [ + "create_runtime", + "FileConfigProvider", + "hashlib", + "json", + "Path", + "Any", + "annotations" + ], + "resolved_symbol": "create_runtime", + "symbol_resolution_status": "resolved", + "file_candidates": [ + "src/plba/__init__.py", + "src/plba/bootstrap.py", + "src/app_runtime/config/__init__.py", + "src/app_runtime/config/file_loader.py", + "tests/test_runtime.py", + "src/app_runtime/config/providers.py", + "src/app_runtime/contracts/__init__.py", + "src/app_runtime/contracts/config.py", + "src/app_runtime/contracts/health.py", + "src/app_runtime/contracts/application.py" + ], + "code_chunks": [ + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/plba/__init__.py", + "title": "create_runtime", + "content": "const create_runtime\ncreate_runtime = plba.bootstrap.create_runtime", + "start_line": 1, + "end_line": 1, + "metadata": { + "symbol_id": "fa1e84f16c8c659bcd5448637386af4d15d431064e07714e34689ee64233cb51", + "qname": "create_runtime", + "kind": "const", + "signature": "create_runtime = plba.bootstrap.create_runtime", + "parent_symbol_id": null, + "package_or_module": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/plba/bootstrap.py", + "title": "create_runtime", + "content": "function create_runtime\ncreate_runtime(module)", + "start_line": 8, + "end_line": 29, + "metadata": { + "symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "qname": "create_runtime", + "kind": "function", + "signature": "create_runtime(module)", + "parent_symbol_id": null, + "package_or_module": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/config/__init__.py", + "title": "FileConfigProvider", + "content": "const FileConfigProvider\nFileConfigProvider = app_runtime.config.providers.FileConfigProvider", + "start_line": 2, + "end_line": 2, + "metadata": { + "symbol_id": "e449b19e5881889adeb6e056eafe1da30acbae864f06984ea2edc7c15f7cb6d6", + "qname": "FileConfigProvider", + "kind": "const", + "signature": "FileConfigProvider = app_runtime.config.providers.FileConfigProvider", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.__init__", + "is_test": false, + "blob_sha": "612918029820a2a983330ec92256142b55b9de4bdf3399ece18e2a02dbad9729", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/config/file_loader.py", + "title": "hashlib", + "content": "const hashlib\nimport hashlib", + "start_line": 3, + "end_line": 3, + "metadata": { + "symbol_id": "e7375824bd473da3d73d316d22e3cb6428930e2db1ffbd900ce5a8b88427bf05", + "qname": "hashlib", + "kind": "const", + "signature": "import hashlib", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/config/file_loader.py", + "title": "json", + "content": "const json\nimport json", + "start_line": 4, + "end_line": 4, + "metadata": { + "symbol_id": "bb9e2eaf992bfd050f7072d72eed87c55b1a4b001daa034a0f7c630a61bb1d78", + "qname": "json", + "kind": "const", + "signature": "import json", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/config/file_loader.py", + "title": "Path", + "content": "const Path\nPath = pathlib.Path", + "start_line": 5, + "end_line": 5, + "metadata": { + "symbol_id": "b785967ed1fb83aa62d5724c6d6e9c6d2b1505523db39bd941cc39b48db48306", + "qname": "Path", + "kind": "const", + "signature": "Path = pathlib.Path", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/config/file_loader.py", + "title": "Any", + "content": "const Any\nAny = typing.Any", + "start_line": 6, + "end_line": 6, + "metadata": { + "symbol_id": "8e330833b8073585db1c4b4315947c400683a23e4c3d2e2ccbcb260f347541b6", + "qname": "Any", + "kind": "const", + "signature": "Any = typing.Any", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/config/file_loader.py", + "title": "annotations", + "content": "const annotations\nannotations = __future__.annotations", + "start_line": 1, + "end_line": 1, + "metadata": { + "symbol_id": "5ed640ccec43a78659d50ec24f3717bf1144a182c22588f37456649ac6a4a815", + "qname": "annotations", + "kind": "const", + "signature": "annotations = __future__.annotations", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/plba/bootstrap.py", + "title": "create_runtime:calls", + "content": "create_runtime calls runtime.add_config_file", + "start_line": 19, + "end_line": 19, + "metadata": { + "edge_id": "4eaeec4ac55a59d5f66fd01c4754955f8fedaf4bc3df13fa769b352c7bfaacbb", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.add_config_file", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/plba/bootstrap.py", + "title": "create_runtime:reads_attr", + "content": "create_runtime reads_attr runtime.register_module", + "start_line": 28, + "end_line": 28, + "metadata": { + "edge_id": "45516c79ff358dbf9b650a081668df0f66d2fe989300f985a1a78be6be166f8f", + "edge_type": "reads_attr", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.register_module", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/plba/bootstrap.py", + "title": "create_runtime:instantiates", + "content": "create_runtime instantiates RuntimeManager", + "start_line": 17, + "end_line": 17, + "metadata": { + "edge_id": "0adba17984f850ea1608c9e734d2dd5c325cfde3a8133123aa239e44935ad18e", + "edge_type": "instantiates", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": "27158ca220022eeb5083c6addf8a50775d45f7161284fd60aac48410105f4b98", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/plba/bootstrap.py", + "title": "create_runtime:calls", + "content": "create_runtime calls runtime.register_module", + "start_line": 28, + "end_line": 28, + "metadata": { + "edge_id": "ab6003c3441addc1ba1b81edeca009165559f652f6b2cf424e5ae61b1f617de8", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.register_module", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/plba/bootstrap.py", + "title": "create_runtime:calls", + "content": "create_runtime calls runtime.control_plane.register_channel", + "start_line": 21, + "end_line": 27, + "metadata": { + "edge_id": "2678250030b9ce47a3b3b55fac7897ac530367edc8374ac9d5e6ecafb1e483f0", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.control_plane.register_channel", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/plba/bootstrap.py", + "title": "create_runtime:reads_attr", + "content": "create_runtime reads_attr runtime.add_config_file", + "start_line": 19, + "end_line": 19, + "metadata": { + "edge_id": "30d4e8aae984ab84d523e80d02f1caeda52d547fa3d2aa47be8845931cabbca2", + "edge_type": "reads_attr", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.add_config_file", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/plba/__init__.py", + "title": "src/plba/__init__.py:1-69", + "content": "from plba.bootstrap import create_runtime\nfrom plba.config import ConfigFileLoader, FileConfigProvider\nfrom plba.control import ControlActionSet, ControlChannel, ControlPlaneService, HttpControlChannel\nfrom plba.contracts import (\n ApplicationModule,\n ConfigProvider,\n HealthContributor,\n TraceContext,\n TraceContextRecord,\n TraceLogMessage,\n TraceTransport,\n Worker,\n WorkerHealth,\n WorkerStatus,\n)\nfrom plba.core import ConfigurationManager, RuntimeManager, ServiceContainer\nfrom plba.health import HealthRegistry\nfrom plba.logging import LogManager\nfrom plba.queue import InMemoryTaskQueue\nfrom plba.tracing import MySqlTraceTransport, NoOpTraceTransport, TraceService\nfrom plba.workflow import (\n StepResult,\n WorkflowContext,\n WorkflowDefinition,\n WorkflowEngine,\n WorkflowEngineHooks,\n WorkflowNode,\n WorkflowRuntimeFactory,\n WorkflowStep,\n)\nfrom plba.workers import WorkerSupervisor\n\n__all__ = [\n \"ApplicationModule\",\n \"ConfigFileLoader\",\n \"ConfigProvider\",\n \"ConfigurationManager\",\n \"ControlActionSet\",\n \"ControlChannel\",\n \"ControlPlaneService\",\n \"create_runtime\",\n \"FileConfigProvider\",\n \"HealthContributor\",\n \"HealthRegistry\",\n \"HttpControlChannel\",\n \"InMemoryTaskQueue\",\n \"LogManager\",\n \"MySqlTraceTransport\",\n \"NoOpTraceTransport\",\n \"RuntimeManager\",\n \"ServiceContainer\",\n \"TraceContext\",\n \"TraceContextRecord\",\n \"TraceLogMessage\",\n \"TraceService\",\n \"TraceTransport\",\n \"StepResult\",\n \"Worker\",\n \"WorkerHealth\",\n \"WorkerStatus\",\n \"WorkflowContext\",\n \"WorkflowDefinition\",\n \"WorkflowEngine\",\n \"WorkflowEngineHooks\",\n \"WorkflowNode\",\n \"WorkflowRuntimeFactory\",\n \"WorkflowStep\",\n \"WorkerSupervisor\",\n]", + "start_line": 1, + "end_line": 69, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/plba/bootstrap.py", + "title": "src/plba/bootstrap.py:create_runtime", + "content": "def create_runtime(\n module: ApplicationModule,\n *,\n config_path: str | None = None,\n enable_http_control: bool = False,\n control_host: str = \"127.0.0.1\",\n control_port: int = 8080,\n control_timeout: int = 5,\n) -> RuntimeManager:\n runtime = RuntimeManager()\n if config_path is not None:\n runtime.add_config_file(config_path)\n if enable_http_control:\n runtime.control_plane.register_channel(\n HttpControlChannel(\n host=control_host,\n port=control_port,\n timeout=control_timeout,\n )\n )\n runtime.register_module(module)\n return runtime", + "start_line": 8, + "end_line": 29, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "tests/test_runtime.py", + "title": "tests/test_runtime.py:test_public_plba_package_exports_runtime_builder_and_worker_contract", + "content": "def test_public_plba_package_exports_runtime_builder_and_worker_contract(tmp_path) -> None:\n import plba\n from plba import ApplicationModule as PublicApplicationModule\n from plba import InMemoryTaskQueue\n from plba import Worker as PublicWorker\n from plba import WorkerHealth as PublicWorkerHealth\n from plba import WorkerStatus as PublicWorkerStatus\n from plba import create_runtime\n\n config_path = tmp_path / \"config.yml\"\n config_path.write_text(\"platform: {}\\n\", encoding=\"utf-8\")\n\n queue = InMemoryTaskQueue[int]()\n queue.put(2)\n assert queue.get(timeout=0.01) == 2\n queue.task_done()\n\n class PublicRoutine:\n def __init__(self) -> None:\n self.runs = 0\n\n def run(self) -> None:\n if self.runs == 0:\n self.runs += 1\n\n class PublicWorkerImpl(PublicWorker):\n def __init__(self, routine: PublicRoutine) -> None:\n self._inner = RoutineWorker(\"public-worker\", routine)\n\n @property\n def name(self) -> str:\n return self._inner.name\n\n @property\n def critical(self) -> bool:\n return self._inner.critical\n\n def start(self) -> None:\n self._inner.start()\n\n def stop(self, force: bool = False) -> None:\n self._inner.stop(force=force)\n\n def health(self) -> PublicWorkerHealth:\n return self._inner.health()\n\n def status(self) -> PublicWorkerStatus:\n return self._inner.status()\n\n class PublicExampleModule(PublicApplicationModule):\n @property\n def name(self) -> str:\n return \"public-example\"\n\n def register(self, registry: ModuleRegistry) -> None:\n registry.add_worker(PublicWorkerImpl(PublicRoutine()))\n\n runtime = create_runtime(PublicExampleModule(), config_path=str(config_path))\n runtime.start()\n sleep(0.2)\n assert runtime.configuration.get() == {\"platform\": {}}\n assert runtime.status()[\"workers\"][\"registered\"] == 1\n assert hasattr(plba, \"QueueWorker\") is False\n runtime.stop()", + "start_line": 342, + "end_line": 405, + "metadata": { + "chunk_index": 13, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/config/__init__.py", + "title": "src/app_runtime/config/__init__.py:1-4", + "content": "from app_runtime.config.file_loader import ConfigFileLoader\nfrom app_runtime.config.providers import FileConfigProvider\n\n__all__ = [\"ConfigFileLoader\", \"FileConfigProvider\"]", + "start_line": 1, + "end_line": 4, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.config.__init__", + "is_test": false, + "blob_sha": "612918029820a2a983330ec92256142b55b9de4bdf3399ece18e2a02dbad9729", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/config/providers.py", + "title": "src/app_runtime/config/providers.py:FileConfigProvider", + "content": "class FileConfigProvider(ConfigProvider):\n def __init__(self, path: str | Path) -> None:\n self._loader = ConfigFileLoader(path)\n\n @property\n def loader(self) -> ConfigFileLoader:\n return self._loader\n\n def load(self) -> dict[str, Any]:\n config = self._loader.load_sync()\n if not isinstance(config, dict):\n raise TypeError(\"Config root must be a mapping\")\n return dict(config)", + "start_line": 10, + "end_line": 22, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.config.providers", + "is_test": false, + "blob_sha": "8c53ca0122d6df6c5763bca15e99434bb4daebd5a618b8fc927e9ae90b022e64", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/contracts/__init__.py", + "title": "src/app_runtime/__init__.py:1-1", + "content": "__all__: list[str] = []", + "start_line": 1, + "end_line": 1, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.__init__", + "is_test": false, + "blob_sha": "8eea9df4f6d7b38ca0e39ccc27b04700e3d08dbeec8046d613d22706d19985fa", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/config/file_loader.py", + "title": "src/app_runtime/config/file_loader.py:ConfigFileLoader", + "content": "class ConfigFileLoader:\n def __init__(self, path: str | Path) -> None:\n self.path = Path(path)\n self.config: Any = None\n self.last_valid_config: Any = None\n self._last_seen_hash: str | None = None\n\n def read_text(self) -> str:\n return self.path.read_text(encoding=\"utf-8\")\n\n def parse(self, data: str) -> Any:\n suffix = self.path.suffix.lower()\n if suffix in {\".yml\", \".yaml\"}:\n return yaml.safe_load(data)\n return json.loads(data)\n\n def load_sync(self) -> Any:\n data = self.read_text()\n parsed = self.parse(data)\n self.config = parsed\n self.last_valid_config = parsed\n self._last_seen_hash = self._calculate_hash(data)\n return parsed\n\n def load_if_changed(self) -> tuple[bool, Any]:\n data = self.read_text()\n current_hash = self._calculate_hash(data)\n if current_hash == self._last_seen_hash:\n return False, self.config\n parsed = self.parse(data)\n self.config = parsed\n self.last_valid_config = parsed\n self._last_seen_hash = current_hash\n return True, parsed\n\n @staticmethod\n def _calculate_hash(data: str) -> str:\n return hashlib.sha256(data.encode(\"utf-8\")).hexdigest()", + "start_line": 11, + "end_line": 48, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/contracts/config.py", + "title": "src/app_runtime/contracts/config.py:ConfigProvider", + "content": "class ConfigProvider(ABC):\n @abstractmethod\n def load(self) -> dict[str, Any]:\n \"\"\"Return a config fragment.\"\"\"", + "start_line": 7, + "end_line": 10, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.config", + "is_test": false, + "blob_sha": "5e773880267743ee94954ea2db120c2d88c54d4312893293d1b89df405283ed4", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/contracts/health.py", + "title": "src/app_runtime/contracts/health.py:HealthContributor", + "content": "class HealthContributor(ABC):\n @abstractmethod\n def health(self) -> WorkerHealth:\n \"\"\"Return contributor health state.\"\"\"", + "start_line": 7, + "end_line": 10, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.health", + "is_test": false, + "blob_sha": "6bd92611def7131e32d4dd34a8ed85e6cf3c67722ad27797032a632cb30dc097", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/contracts/application.py", + "title": "src/app_runtime/contracts/application.py:ApplicationModule", + "content": "class ApplicationModule(ABC):\n @property\n @abstractmethod\n def name(self) -> str:\n \"\"\"Module name used for runtime status and diagnostics.\"\"\"\n\n @abstractmethod\n def register(self, registry: ModuleRegistry) -> None:\n \"\"\"Register workers, services, and health contributors.\"\"\"", + "start_line": 8, + "end_line": 16, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.application", + "is_test": false, + "blob_sha": "197c35634dca49c352ce3f230295a485fbffb672ce7bb8c08e752bfdf61e7fa4", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "relations": [ + { + "path": "src/plba/bootstrap.py", + "metadata": { + "edge_id": "4eaeec4ac55a59d5f66fd01c4754955f8fedaf4bc3df13fa769b352c7bfaacbb", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.add_config_file", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "create_runtime calls runtime.add_config_file" + }, + { + "path": "src/plba/bootstrap.py", + "metadata": { + "edge_id": "45516c79ff358dbf9b650a081668df0f66d2fe989300f985a1a78be6be166f8f", + "edge_type": "reads_attr", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.register_module", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "create_runtime reads_attr runtime.register_module" + }, + { + "path": "src/plba/bootstrap.py", + "metadata": { + "edge_id": "0adba17984f850ea1608c9e734d2dd5c325cfde3a8133123aa239e44935ad18e", + "edge_type": "instantiates", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": "27158ca220022eeb5083c6addf8a50775d45f7161284fd60aac48410105f4b98", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "create_runtime instantiates RuntimeManager" + }, + { + "path": "src/plba/bootstrap.py", + "metadata": { + "edge_id": "ab6003c3441addc1ba1b81edeca009165559f652f6b2cf424e5ae61b1f617de8", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.register_module", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "create_runtime calls runtime.register_module" + }, + { + "path": "src/plba/bootstrap.py", + "metadata": { + "edge_id": "2678250030b9ce47a3b3b55fac7897ac530367edc8374ac9d5e6ecafb1e483f0", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.control_plane.register_channel", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "create_runtime calls runtime.control_plane.register_channel" + }, + { + "path": "src/plba/bootstrap.py", + "metadata": { + "edge_id": "30d4e8aae984ab84d523e80d02f1caeda52d547fa3d2aa47be8845931cabbca2", + "edge_type": "reads_attr", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.add_config_file", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "create_runtime reads_attr runtime.add_config_file" + } + ], + "entrypoints": [], + "test_candidates": [ + { + "path": "tests/test_runtime.py", + "title": "tests/test_runtime.py:test_public_plba_package_exports_runtime_builder_and_worker_contract", + "content": "def test_public_plba_package_exports_runtime_builder_and_worker_contract(tmp_path) -> None:\n import plba\n from plba import ApplicationModule as PublicApplicationModule\n from plba import InMemoryTaskQueue\n from plba import Worker as PublicWorker\n from plba import WorkerHealth as Public" + } + ], + "layer_outcomes": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 6, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 10, + "empty": false, + "fallback_used": false + } + ], + "missing_layers": [], + "raw_rows": [ + { + "path": "src/plba/__init__.py", + "content": "const create_runtime\ncreate_runtime = plba.bootstrap.create_runtime", + "layer": "C1_SYMBOL_CATALOG", + "title": "create_runtime", + "span_start": 1, + "span_end": 1, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "fa1e84f16c8c659bcd5448637386af4d15d431064e07714e34689ee64233cb51", + "qname": "create_runtime", + "kind": "const", + "signature": "create_runtime = plba.bootstrap.create_runtime", + "parent_symbol_id": null, + "package_or_module": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "function create_runtime\ncreate_runtime(module)", + "layer": "C1_SYMBOL_CATALOG", + "title": "create_runtime", + "span_start": 8, + "span_end": 29, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "qname": "create_runtime", + "kind": "function", + "signature": "create_runtime(module)", + "parent_symbol_id": null, + "package_or_module": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/__init__.py", + "content": "const FileConfigProvider\nFileConfigProvider = app_runtime.config.providers.FileConfigProvider", + "layer": "C1_SYMBOL_CATALOG", + "title": "FileConfigProvider", + "span_start": 2, + "span_end": 2, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "e449b19e5881889adeb6e056eafe1da30acbae864f06984ea2edc7c15f7cb6d6", + "qname": "FileConfigProvider", + "kind": "const", + "signature": "FileConfigProvider = app_runtime.config.providers.FileConfigProvider", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.__init__", + "is_test": false, + "blob_sha": "612918029820a2a983330ec92256142b55b9de4bdf3399ece18e2a02dbad9729", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "const hashlib\nimport hashlib", + "layer": "C1_SYMBOL_CATALOG", + "title": "hashlib", + "span_start": 3, + "span_end": 3, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "e7375824bd473da3d73d316d22e3cb6428930e2db1ffbd900ce5a8b88427bf05", + "qname": "hashlib", + "kind": "const", + "signature": "import hashlib", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "const json\nimport json", + "layer": "C1_SYMBOL_CATALOG", + "title": "json", + "span_start": 4, + "span_end": 4, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "bb9e2eaf992bfd050f7072d72eed87c55b1a4b001daa034a0f7c630a61bb1d78", + "qname": "json", + "kind": "const", + "signature": "import json", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "const Path\nPath = pathlib.Path", + "layer": "C1_SYMBOL_CATALOG", + "title": "Path", + "span_start": 5, + "span_end": 5, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "b785967ed1fb83aa62d5724c6d6e9c6d2b1505523db39bd941cc39b48db48306", + "qname": "Path", + "kind": "const", + "signature": "Path = pathlib.Path", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "const Any\nAny = typing.Any", + "layer": "C1_SYMBOL_CATALOG", + "title": "Any", + "span_start": 6, + "span_end": 6, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "8e330833b8073585db1c4b4315947c400683a23e4c3d2e2ccbcb260f347541b6", + "qname": "Any", + "kind": "const", + "signature": "Any = typing.Any", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "const annotations\nannotations = __future__.annotations", + "layer": "C1_SYMBOL_CATALOG", + "title": "annotations", + "span_start": 1, + "span_end": 1, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "5ed640ccec43a78659d50ec24f3717bf1144a182c22588f37456649ac6a4a815", + "qname": "annotations", + "kind": "const", + "signature": "annotations = __future__.annotations", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime calls runtime.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:calls", + "span_start": 19, + "span_end": 19, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "4eaeec4ac55a59d5f66fd01c4754955f8fedaf4bc3df13fa769b352c7bfaacbb", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.add_config_file", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime reads_attr runtime.register_module", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:reads_attr", + "span_start": 28, + "span_end": 28, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "45516c79ff358dbf9b650a081668df0f66d2fe989300f985a1a78be6be166f8f", + "edge_type": "reads_attr", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.register_module", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:instantiates", + "span_start": 17, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "0adba17984f850ea1608c9e734d2dd5c325cfde3a8133123aa239e44935ad18e", + "edge_type": "instantiates", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": "27158ca220022eeb5083c6addf8a50775d45f7161284fd60aac48410105f4b98", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime calls runtime.register_module", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:calls", + "span_start": 28, + "span_end": 28, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "ab6003c3441addc1ba1b81edeca009165559f652f6b2cf424e5ae61b1f617de8", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.register_module", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime calls runtime.control_plane.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:calls", + "span_start": 21, + "span_end": 27, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "2678250030b9ce47a3b3b55fac7897ac530367edc8374ac9d5e6ecafb1e483f0", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.control_plane.register_channel", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime reads_attr runtime.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:reads_attr", + "span_start": 19, + "span_end": 19, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "30d4e8aae984ab84d523e80d02f1caeda52d547fa3d2aa47be8845931cabbca2", + "edge_type": "reads_attr", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.add_config_file", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/__init__.py", + "content": "from plba.bootstrap import create_runtime\nfrom plba.config import ConfigFileLoader, FileConfigProvider\nfrom plba.control import ControlActionSet, ControlChannel, ControlPlaneService, HttpControlChannel\nfrom plba.contracts import (\n ApplicationModule,\n ConfigProvider,\n HealthContributor,\n TraceContext,\n TraceContextRecord,\n TraceLogMessage,\n TraceTransport,\n Worker,\n WorkerHealth,\n WorkerStatus,\n)\nfrom plba.core import ConfigurationManager, RuntimeManager, ServiceContainer\nfrom plba.health import HealthRegistry\nfrom plba.logging import LogManager\nfrom plba.queue import InMemoryTaskQueue\nfrom plba.tracing import MySqlTraceTransport, NoOpTraceTransport, TraceService\nfrom plba.workflow import (\n StepResult,\n WorkflowContext,\n WorkflowDefinition,\n WorkflowEngine,\n WorkflowEngineHooks,\n WorkflowNode,\n WorkflowRuntimeFactory,\n WorkflowStep,\n)\nfrom plba.workers import WorkerSupervisor\n\n__all__ = [\n \"ApplicationModule\",\n \"ConfigFileLoader\",\n \"ConfigProvider\",\n \"ConfigurationManager\",\n \"ControlActionSet\",\n \"ControlChannel\",\n \"ControlPlaneService\",\n \"create_runtime\",\n \"FileConfigProvider\",\n \"HealthContributor\",\n \"HealthRegistry\",\n \"HttpControlChannel\",\n \"InMemoryTaskQueue\",\n \"LogManager\",\n \"MySqlTraceTransport\",\n \"NoOpTraceTransport\",\n \"RuntimeManager\",\n \"ServiceContainer\",\n \"TraceContext\",\n \"TraceContextRecord\",\n \"TraceLogMessage\",\n \"TraceService\",\n \"TraceTransport\",\n \"StepResult\",\n \"Worker\",\n \"WorkerHealth\",\n \"WorkerStatus\",\n \"WorkflowContext\",\n \"WorkflowDefinition\",\n \"WorkflowEngine\",\n \"WorkflowEngineHooks\",\n \"WorkflowNode\",\n \"WorkflowRuntimeFactory\",\n \"WorkflowStep\",\n \"WorkerSupervisor\",\n]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/__init__.py:1-69", + "span_start": 1, + "span_end": 69, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "def create_runtime(\n module: ApplicationModule,\n *,\n config_path: str | None = None,\n enable_http_control: bool = False,\n control_host: str = \"127.0.0.1\",\n control_port: int = 8080,\n control_timeout: int = 5,\n) -> RuntimeManager:\n runtime = RuntimeManager()\n if config_path is not None:\n runtime.add_config_file(config_path)\n if enable_http_control:\n runtime.control_plane.register_channel(\n HttpControlChannel(\n host=control_host,\n port=control_port,\n timeout=control_timeout,\n )\n )\n runtime.register_module(module)\n return runtime", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/bootstrap.py:create_runtime", + "span_start": 8, + "span_end": 29, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "def test_public_plba_package_exports_runtime_builder_and_worker_contract(tmp_path) -> None:\n import plba\n from plba import ApplicationModule as PublicApplicationModule\n from plba import InMemoryTaskQueue\n from plba import Worker as PublicWorker\n from plba import WorkerHealth as PublicWorkerHealth\n from plba import WorkerStatus as PublicWorkerStatus\n from plba import create_runtime\n\n config_path = tmp_path / \"config.yml\"\n config_path.write_text(\"platform: {}\\n\", encoding=\"utf-8\")\n\n queue = InMemoryTaskQueue[int]()\n queue.put(2)\n assert queue.get(timeout=0.01) == 2\n queue.task_done()\n\n class PublicRoutine:\n def __init__(self) -> None:\n self.runs = 0\n\n def run(self) -> None:\n if self.runs == 0:\n self.runs += 1\n\n class PublicWorkerImpl(PublicWorker):\n def __init__(self, routine: PublicRoutine) -> None:\n self._inner = RoutineWorker(\"public-worker\", routine)\n\n @property\n def name(self) -> str:\n return self._inner.name\n\n @property\n def critical(self) -> bool:\n return self._inner.critical\n\n def start(self) -> None:\n self._inner.start()\n\n def stop(self, force: bool = False) -> None:\n self._inner.stop(force=force)\n\n def health(self) -> PublicWorkerHealth:\n return self._inner.health()\n\n def status(self) -> PublicWorkerStatus:\n return self._inner.status()\n\n class PublicExampleModule(PublicApplicationModule):\n @property\n def name(self) -> str:\n return \"public-example\"\n\n def register(self, registry: ModuleRegistry) -> None:\n registry.add_worker(PublicWorkerImpl(PublicRoutine()))\n\n runtime = create_runtime(PublicExampleModule(), config_path=str(config_path))\n runtime.start()\n sleep(0.2)\n assert runtime.configuration.get() == {\"platform\": {}}\n assert runtime.status()[\"workers\"][\"registered\"] == 1\n assert hasattr(plba, \"QueueWorker\") is False\n runtime.stop()", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_runtime.py:test_public_plba_package_exports_runtime_builder_and_worker_contract", + "span_start": 342, + "span_end": 405, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 13, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/__init__.py", + "content": "from app_runtime.config.file_loader import ConfigFileLoader\nfrom app_runtime.config.providers import FileConfigProvider\n\n__all__ = [\"ConfigFileLoader\", \"FileConfigProvider\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/config/__init__.py:1-4", + "span_start": 1, + "span_end": 4, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.config.__init__", + "is_test": false, + "blob_sha": "612918029820a2a983330ec92256142b55b9de4bdf3399ece18e2a02dbad9729", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/providers.py", + "content": "class FileConfigProvider(ConfigProvider):\n def __init__(self, path: str | Path) -> None:\n self._loader = ConfigFileLoader(path)\n\n @property\n def loader(self) -> ConfigFileLoader:\n return self._loader\n\n def load(self) -> dict[str, Any]:\n config = self._loader.load_sync()\n if not isinstance(config, dict):\n raise TypeError(\"Config root must be a mapping\")\n return dict(config)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/config/providers.py:FileConfigProvider", + "span_start": 10, + "span_end": 22, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.config.providers", + "is_test": false, + "blob_sha": "8c53ca0122d6df6c5763bca15e99434bb4daebd5a618b8fc927e9ae90b022e64", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/__init__.py", + "content": "__all__: list[str] = []", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/__init__.py:1-1", + "span_start": 1, + "span_end": 1, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.__init__", + "is_test": false, + "blob_sha": "8eea9df4f6d7b38ca0e39ccc27b04700e3d08dbeec8046d613d22706d19985fa", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "class ConfigFileLoader:\n def __init__(self, path: str | Path) -> None:\n self.path = Path(path)\n self.config: Any = None\n self.last_valid_config: Any = None\n self._last_seen_hash: str | None = None\n\n def read_text(self) -> str:\n return self.path.read_text(encoding=\"utf-8\")\n\n def parse(self, data: str) -> Any:\n suffix = self.path.suffix.lower()\n if suffix in {\".yml\", \".yaml\"}:\n return yaml.safe_load(data)\n return json.loads(data)\n\n def load_sync(self) -> Any:\n data = self.read_text()\n parsed = self.parse(data)\n self.config = parsed\n self.last_valid_config = parsed\n self._last_seen_hash = self._calculate_hash(data)\n return parsed\n\n def load_if_changed(self) -> tuple[bool, Any]:\n data = self.read_text()\n current_hash = self._calculate_hash(data)\n if current_hash == self._last_seen_hash:\n return False, self.config\n parsed = self.parse(data)\n self.config = parsed\n self.last_valid_config = parsed\n self._last_seen_hash = current_hash\n return True, parsed\n\n @staticmethod\n def _calculate_hash(data: str) -> str:\n return hashlib.sha256(data.encode(\"utf-8\")).hexdigest()", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/config/file_loader.py:ConfigFileLoader", + "span_start": 11, + "span_end": 48, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/config.py", + "content": "class ConfigProvider(ABC):\n @abstractmethod\n def load(self) -> dict[str, Any]:\n \"\"\"Return a config fragment.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/contracts/config.py:ConfigProvider", + "span_start": 7, + "span_end": 10, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.config", + "is_test": false, + "blob_sha": "5e773880267743ee94954ea2db120c2d88c54d4312893293d1b89df405283ed4", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/health.py", + "content": "class HealthContributor(ABC):\n @abstractmethod\n def health(self) -> WorkerHealth:\n \"\"\"Return contributor health state.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/contracts/health.py:HealthContributor", + "span_start": 7, + "span_end": 10, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.health", + "is_test": false, + "blob_sha": "6bd92611def7131e32d4dd34a8ed85e6cf3c67722ad27797032a632cb30dc097", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/application.py", + "content": "class ApplicationModule(ABC):\n @property\n @abstractmethod\n def name(self) -> str:\n \"\"\"Module name used for runtime status and diagnostics.\"\"\"\n\n @abstractmethod\n def register(self, registry: ModuleRegistry) -> None:\n \"\"\"Register workers, services, and health contributors.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/contracts/application.py:ApplicationModule", + "span_start": 8, + "span_end": 16, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.application", + "is_test": false, + "blob_sha": "197c35634dca49c352ce3f230295a485fbffb672ce7bb8c08e752bfdf61e7fa4", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "retrieval_report": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "vector", + "C2_DEPENDENCY_GRAPH": "vector", + "C0_SOURCE_CHUNKS": "vector" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C0_SOURCE_CHUNKS": 10 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [] + } + }, + "fallback": { + "used": false, + "reason": null + }, + "retrieval_by_layer_ms": { + "C1_SYMBOL_CATALOG": 32, + "C2_DEPENDENCY_GRAPH": 107, + "C0_SOURCE_CHUNKS": 684 + } + } + }, + "diagnostics": { + "intent_correct": null, + "target_found": true, + "layers_used": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "retrieval_sufficient": true, + "answer_mode": "normal", + "router_result": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "FIND_TESTS", + "path_scope": [], + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "symbol_resolution_status": "pending" + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Где тесты для create_runtime?", + "sub_intent": "FIND_TESTS", + "path_scope": [], + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 6, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 10, + "empty": false, + "fallback_used": false + } + ], + "empty_layers": [], + "evidence_gate_decision": { + "sufficient": true, + "failure_reasons": [], + "evidence_count": 24 + }, + "failure_reasons": [], + "timings_ms": {} + }, + "rag_rows": [ + { + "path": "src/plba/__init__.py", + "content": "const create_runtime\ncreate_runtime = plba.bootstrap.create_runtime", + "layer": "C1_SYMBOL_CATALOG", + "title": "create_runtime", + "span_start": 1, + "span_end": 1, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "fa1e84f16c8c659bcd5448637386af4d15d431064e07714e34689ee64233cb51", + "qname": "create_runtime", + "kind": "const", + "signature": "create_runtime = plba.bootstrap.create_runtime", + "parent_symbol_id": null, + "package_or_module": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "function create_runtime\ncreate_runtime(module)", + "layer": "C1_SYMBOL_CATALOG", + "title": "create_runtime", + "span_start": 8, + "span_end": 29, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "qname": "create_runtime", + "kind": "function", + "signature": "create_runtime(module)", + "parent_symbol_id": null, + "package_or_module": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/__init__.py", + "content": "const FileConfigProvider\nFileConfigProvider = app_runtime.config.providers.FileConfigProvider", + "layer": "C1_SYMBOL_CATALOG", + "title": "FileConfigProvider", + "span_start": 2, + "span_end": 2, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "e449b19e5881889adeb6e056eafe1da30acbae864f06984ea2edc7c15f7cb6d6", + "qname": "FileConfigProvider", + "kind": "const", + "signature": "FileConfigProvider = app_runtime.config.providers.FileConfigProvider", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.__init__", + "is_test": false, + "blob_sha": "612918029820a2a983330ec92256142b55b9de4bdf3399ece18e2a02dbad9729", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "const hashlib\nimport hashlib", + "layer": "C1_SYMBOL_CATALOG", + "title": "hashlib", + "span_start": 3, + "span_end": 3, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "e7375824bd473da3d73d316d22e3cb6428930e2db1ffbd900ce5a8b88427bf05", + "qname": "hashlib", + "kind": "const", + "signature": "import hashlib", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "const json\nimport json", + "layer": "C1_SYMBOL_CATALOG", + "title": "json", + "span_start": 4, + "span_end": 4, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "bb9e2eaf992bfd050f7072d72eed87c55b1a4b001daa034a0f7c630a61bb1d78", + "qname": "json", + "kind": "const", + "signature": "import json", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "const Path\nPath = pathlib.Path", + "layer": "C1_SYMBOL_CATALOG", + "title": "Path", + "span_start": 5, + "span_end": 5, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "b785967ed1fb83aa62d5724c6d6e9c6d2b1505523db39bd941cc39b48db48306", + "qname": "Path", + "kind": "const", + "signature": "Path = pathlib.Path", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "const Any\nAny = typing.Any", + "layer": "C1_SYMBOL_CATALOG", + "title": "Any", + "span_start": 6, + "span_end": 6, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "8e330833b8073585db1c4b4315947c400683a23e4c3d2e2ccbcb260f347541b6", + "qname": "Any", + "kind": "const", + "signature": "Any = typing.Any", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "const annotations\nannotations = __future__.annotations", + "layer": "C1_SYMBOL_CATALOG", + "title": "annotations", + "span_start": 1, + "span_end": 1, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "5ed640ccec43a78659d50ec24f3717bf1144a182c22588f37456649ac6a4a815", + "qname": "annotations", + "kind": "const", + "signature": "annotations = __future__.annotations", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime calls runtime.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:calls", + "span_start": 19, + "span_end": 19, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "4eaeec4ac55a59d5f66fd01c4754955f8fedaf4bc3df13fa769b352c7bfaacbb", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.add_config_file", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime reads_attr runtime.register_module", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:reads_attr", + "span_start": 28, + "span_end": 28, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "45516c79ff358dbf9b650a081668df0f66d2fe989300f985a1a78be6be166f8f", + "edge_type": "reads_attr", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.register_module", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:instantiates", + "span_start": 17, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "0adba17984f850ea1608c9e734d2dd5c325cfde3a8133123aa239e44935ad18e", + "edge_type": "instantiates", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": "27158ca220022eeb5083c6addf8a50775d45f7161284fd60aac48410105f4b98", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime calls runtime.register_module", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:calls", + "span_start": 28, + "span_end": 28, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "ab6003c3441addc1ba1b81edeca009165559f652f6b2cf424e5ae61b1f617de8", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.register_module", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime calls runtime.control_plane.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:calls", + "span_start": 21, + "span_end": 27, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "2678250030b9ce47a3b3b55fac7897ac530367edc8374ac9d5e6ecafb1e483f0", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.control_plane.register_channel", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime reads_attr runtime.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:reads_attr", + "span_start": 19, + "span_end": 19, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "30d4e8aae984ab84d523e80d02f1caeda52d547fa3d2aa47be8845931cabbca2", + "edge_type": "reads_attr", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.add_config_file", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/__init__.py", + "content": "from plba.bootstrap import create_runtime\nfrom plba.config import ConfigFileLoader, FileConfigProvider\nfrom plba.control import ControlActionSet, ControlChannel, ControlPlaneService, HttpControlChannel\nfrom plba.contracts import (\n ApplicationModule,\n ConfigProvider,\n HealthContributor,\n TraceContext,\n TraceContextRecord,\n TraceLogMessage,\n TraceTransport,\n Worker,\n WorkerHealth,\n WorkerStatus,\n)\nfrom plba.core import ConfigurationManager, RuntimeManager, ServiceContainer\nfrom plba.health import HealthRegistry\nfrom plba.logging import LogManager\nfrom plba.queue import InMemoryTaskQueue\nfrom plba.tracing import MySqlTraceTransport, NoOpTraceTransport, TraceService\nfrom plba.workflow import (\n StepResult,\n WorkflowContext,\n WorkflowDefinition,\n WorkflowEngine,\n WorkflowEngineHooks,\n WorkflowNode,\n WorkflowRuntimeFactory,\n WorkflowStep,\n)\nfrom plba.workers import WorkerSupervisor\n\n__all__ = [\n \"ApplicationModule\",\n \"ConfigFileLoader\",\n \"ConfigProvider\",\n \"ConfigurationManager\",\n \"ControlActionSet\",\n \"ControlChannel\",\n \"ControlPlaneService\",\n \"create_runtime\",\n \"FileConfigProvider\",\n \"HealthContributor\",\n \"HealthRegistry\",\n \"HttpControlChannel\",\n \"InMemoryTaskQueue\",\n \"LogManager\",\n \"MySqlTraceTransport\",\n \"NoOpTraceTransport\",\n \"RuntimeManager\",\n \"ServiceContainer\",\n \"TraceContext\",\n \"TraceContextRecord\",\n \"TraceLogMessage\",\n \"TraceService\",\n \"TraceTransport\",\n \"StepResult\",\n \"Worker\",\n \"WorkerHealth\",\n \"WorkerStatus\",\n \"WorkflowContext\",\n \"WorkflowDefinition\",\n \"WorkflowEngine\",\n \"WorkflowEngineHooks\",\n \"WorkflowNode\",\n \"WorkflowRuntimeFactory\",\n \"WorkflowStep\",\n \"WorkerSupervisor\",\n]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/__init__.py:1-69", + "span_start": 1, + "span_end": 69, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "def create_runtime(\n module: ApplicationModule,\n *,\n config_path: str | None = None,\n enable_http_control: bool = False,\n control_host: str = \"127.0.0.1\",\n control_port: int = 8080,\n control_timeout: int = 5,\n) -> RuntimeManager:\n runtime = RuntimeManager()\n if config_path is not None:\n runtime.add_config_file(config_path)\n if enable_http_control:\n runtime.control_plane.register_channel(\n HttpControlChannel(\n host=control_host,\n port=control_port,\n timeout=control_timeout,\n )\n )\n runtime.register_module(module)\n return runtime", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/bootstrap.py:create_runtime", + "span_start": 8, + "span_end": 29, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "def test_public_plba_package_exports_runtime_builder_and_worker_contract(tmp_path) -> None:\n import plba\n from plba import ApplicationModule as PublicApplicationModule\n from plba import InMemoryTaskQueue\n from plba import Worker as PublicWorker\n from plba import WorkerHealth as PublicWorkerHealth\n from plba import WorkerStatus as PublicWorkerStatus\n from plba import create_runtime\n\n config_path = tmp_path / \"config.yml\"\n config_path.write_text(\"platform: {}\\n\", encoding=\"utf-8\")\n\n queue = InMemoryTaskQueue[int]()\n queue.put(2)\n assert queue.get(timeout=0.01) == 2\n queue.task_done()\n\n class PublicRoutine:\n def __init__(self) -> None:\n self.runs = 0\n\n def run(self) -> None:\n if self.runs == 0:\n self.runs += 1\n\n class PublicWorkerImpl(PublicWorker):\n def __init__(self, routine: PublicRoutine) -> None:\n self._inner = RoutineWorker(\"public-worker\", routine)\n\n @property\n def name(self) -> str:\n return self._inner.name\n\n @property\n def critical(self) -> bool:\n return self._inner.critical\n\n def start(self) -> None:\n self._inner.start()\n\n def stop(self, force: bool = False) -> None:\n self._inner.stop(force=force)\n\n def health(self) -> PublicWorkerHealth:\n return self._inner.health()\n\n def status(self) -> PublicWorkerStatus:\n return self._inner.status()\n\n class PublicExampleModule(PublicApplicationModule):\n @property\n def name(self) -> str:\n return \"public-example\"\n\n def register(self, registry: ModuleRegistry) -> None:\n registry.add_worker(PublicWorkerImpl(PublicRoutine()))\n\n runtime = create_runtime(PublicExampleModule(), config_path=str(config_path))\n runtime.start()\n sleep(0.2)\n assert runtime.configuration.get() == {\"platform\": {}}\n assert runtime.status()[\"workers\"][\"registered\"] == 1\n assert hasattr(plba, \"QueueWorker\") is False\n runtime.stop()", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_runtime.py:test_public_plba_package_exports_runtime_builder_and_worker_contract", + "span_start": 342, + "span_end": 405, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 13, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/__init__.py", + "content": "from app_runtime.config.file_loader import ConfigFileLoader\nfrom app_runtime.config.providers import FileConfigProvider\n\n__all__ = [\"ConfigFileLoader\", \"FileConfigProvider\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/config/__init__.py:1-4", + "span_start": 1, + "span_end": 4, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.config.__init__", + "is_test": false, + "blob_sha": "612918029820a2a983330ec92256142b55b9de4bdf3399ece18e2a02dbad9729", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/providers.py", + "content": "class FileConfigProvider(ConfigProvider):\n def __init__(self, path: str | Path) -> None:\n self._loader = ConfigFileLoader(path)\n\n @property\n def loader(self) -> ConfigFileLoader:\n return self._loader\n\n def load(self) -> dict[str, Any]:\n config = self._loader.load_sync()\n if not isinstance(config, dict):\n raise TypeError(\"Config root must be a mapping\")\n return dict(config)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/config/providers.py:FileConfigProvider", + "span_start": 10, + "span_end": 22, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.config.providers", + "is_test": false, + "blob_sha": "8c53ca0122d6df6c5763bca15e99434bb4daebd5a618b8fc927e9ae90b022e64", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/__init__.py", + "content": "__all__: list[str] = []", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/__init__.py:1-1", + "span_start": 1, + "span_end": 1, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.__init__", + "is_test": false, + "blob_sha": "8eea9df4f6d7b38ca0e39ccc27b04700e3d08dbeec8046d613d22706d19985fa", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "class ConfigFileLoader:\n def __init__(self, path: str | Path) -> None:\n self.path = Path(path)\n self.config: Any = None\n self.last_valid_config: Any = None\n self._last_seen_hash: str | None = None\n\n def read_text(self) -> str:\n return self.path.read_text(encoding=\"utf-8\")\n\n def parse(self, data: str) -> Any:\n suffix = self.path.suffix.lower()\n if suffix in {\".yml\", \".yaml\"}:\n return yaml.safe_load(data)\n return json.loads(data)\n\n def load_sync(self) -> Any:\n data = self.read_text()\n parsed = self.parse(data)\n self.config = parsed\n self.last_valid_config = parsed\n self._last_seen_hash = self._calculate_hash(data)\n return parsed\n\n def load_if_changed(self) -> tuple[bool, Any]:\n data = self.read_text()\n current_hash = self._calculate_hash(data)\n if current_hash == self._last_seen_hash:\n return False, self.config\n parsed = self.parse(data)\n self.config = parsed\n self.last_valid_config = parsed\n self._last_seen_hash = current_hash\n return True, parsed\n\n @staticmethod\n def _calculate_hash(data: str) -> str:\n return hashlib.sha256(data.encode(\"utf-8\")).hexdigest()", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/config/file_loader.py:ConfigFileLoader", + "span_start": 11, + "span_end": 48, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/config.py", + "content": "class ConfigProvider(ABC):\n @abstractmethod\n def load(self) -> dict[str, Any]:\n \"\"\"Return a config fragment.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/contracts/config.py:ConfigProvider", + "span_start": 7, + "span_end": 10, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.config", + "is_test": false, + "blob_sha": "5e773880267743ee94954ea2db120c2d88c54d4312893293d1b89df405283ed4", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/health.py", + "content": "class HealthContributor(ABC):\n @abstractmethod\n def health(self) -> WorkerHealth:\n \"\"\"Return contributor health state.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/contracts/health.py:HealthContributor", + "span_start": 7, + "span_end": 10, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.health", + "is_test": false, + "blob_sha": "6bd92611def7131e32d4dd34a8ed85e6cf3c67722ad27797032a632cb30dc097", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/application.py", + "content": "class ApplicationModule(ABC):\n @property\n @abstractmethod\n def name(self) -> str:\n \"\"\"Module name used for runtime status and diagnostics.\"\"\"\n\n @abstractmethod\n def register(self, registry: ModuleRegistry) -> None:\n \"\"\"Register workers, services, and health contributors.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/contracts/application.py:ApplicationModule", + "span_start": 8, + "span_end": 16, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.application", + "is_test": false, + "blob_sha": "197c35634dca49c352ce3f230295a485fbffb672ce7bb8c08e752bfdf61e7fa4", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "validation": { + "passed": true, + "action": "return", + "reasons": [] + } + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-find-tests-create-runtime.md b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-find-tests-create-runtime.md new file mode 100644 index 0000000..a8ed71b --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-find-tests-create-runtime.md @@ -0,0 +1,32 @@ +# plba-v2-find-tests-create-runtime + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: agent_runtime +- mode: full_chain +- passed: True + +## Query +Где тесты для create_runtime? + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 24, + "llm_answer": "- tests/test_runtime.py:342-405", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "create_runtime" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-find-tests-runtime-manager.json b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-find-tests-runtime-manager.json new file mode 100644 index 0000000..e4076db --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-find-tests-runtime-manager.json @@ -0,0 +1,3133 @@ +{ + "case_id": "plba-v2-find-tests-runtime-manager", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "agent_runtime", + "mode": "full_chain", + "query": "Где тесты для RuntimeManager?", + "actual": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 24, + "llm_answer": "- tests/test_runtime.py:12-12\n- tests/test_business_control_actions.py:14-14", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "query": "Где тесты для RuntimeManager?", + "router_result": { + "schema_version": "1.1", + "intent": "CODE_QA", + "retrieval_profile": "code", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query_plan": { + "raw": "Где тесты для RuntimeManager?", + "normalized": "Где тесты для RuntimeManager?", + "sub_intent": "FIND_TESTS", + "negations": [], + "expansions": [ + "test", + "unit test", + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "doc_scope_hints": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "symbol_kind_hint": "class", + "anchors": [ + { + "type": "SYMBOL", + "value": "RuntimeManager", + "source": "user_text", + "subtype": null, + "span": { + "start": 14, + "end": 28 + }, + "confidence": 0.88 + }, + { + "type": "KEY_TERM", + "value": "тест", + "source": "user_text", + "subtype": null, + "span": { + "start": 4, + "end": 9 + }, + "confidence": 0.9 + } + ] + }, + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "top_k": 8 + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "top_k": 6 + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 10 + } + ], + "filters": { + "test_policy": "INCLUDE", + "path_scope": [], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "test_file_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "test_symbol_patterns": [ + "test_runtime_manager", + "TestRuntimeManager", + "RuntimeManager" + ], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + }, + "symbol_resolution": { + "status": "pending", + "resolved_symbol": null, + "alternatives": [ + "RuntimeManager" + ], + "confidence": 0.0 + }, + "evidence_policy": { + "require_def": true, + "require_flow": true, + "require_spec": false, + "allow_answer_without_evidence": false + } + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Где тесты для RuntimeManager?", + "sub_intent": "FIND_TESTS", + "path_scope": [], + "keyword_hints": [ + "RuntimeManager" + ], + "symbol_candidates": [ + "RuntimeManager" + ], + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "top_k": 8 + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "top_k": 6 + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 10 + } + ], + "filters": { + "test_policy": "INCLUDE", + "path_scope": [], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "test_file_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "test_symbol_patterns": [ + "test_runtime_manager", + "TestRuntimeManager", + "RuntimeManager" + ], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + }, + "query_plan": { + "raw": "Где тесты для RuntimeManager?", + "normalized": "Где тесты для RuntimeManager?", + "sub_intent": "FIND_TESTS", + "negations": [], + "expansions": [ + "test", + "unit test", + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "doc_scope_hints": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "symbol_kind_hint": "class", + "anchors": [ + { + "type": "SYMBOL", + "value": "RuntimeManager", + "source": "user_text", + "subtype": null, + "span": { + "start": 14, + "end": 28 + }, + "confidence": 0.88 + }, + { + "type": "KEY_TERM", + "value": "тест", + "source": "user_text", + "subtype": null, + "span": { + "start": 4, + "end": 9 + }, + "confidence": 0.9 + } + ] + } + }, + "retrieval_result": { + "target_symbol_candidates": [ + "RuntimeManager", + "ControlPlaneService" + ], + "resolved_symbol": "RuntimeManager", + "symbol_resolution_status": "resolved", + "file_candidates": [ + "src/plba/bootstrap.py", + "tests/test_runtime.py", + "src/app_runtime/core/runtime.py", + "src/plba/__init__.py", + "src/plba/core.py", + "tests/test_business_control_actions.py", + "src/app_runtime/control/service.py", + "src/app_runtime/control/__init__.py", + "src/plba/control.py", + "src/app_runtime/control/http_channel.py", + "src/app_runtime/control/http_app.py", + "src/app_runtime/control/http_runner.py", + "src/app_runtime/control/base.py" + ], + "code_chunks": [ + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/plba/bootstrap.py", + "title": "RuntimeManager", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "start_line": 4, + "end_line": 4, + "metadata": { + "symbol_id": "27158ca220022eeb5083c6addf8a50775d45f7161284fd60aac48410105f4b98", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "tests/test_runtime.py", + "title": "RuntimeManager", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "start_line": 12, + "end_line": 12, + "metadata": { + "symbol_id": "aeadc039653807b0da1ca6e3cc1078ee61cfc510b28e7f9c2ec04c59da43cc8d", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/core/runtime.py", + "title": "RuntimeManager", + "content": "class RuntimeManager\nRuntimeManager", + "start_line": 18, + "end_line": 179, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "qname": "RuntimeManager", + "kind": "class", + "signature": "RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/plba/__init__.py", + "title": "RuntimeManager", + "content": "const RuntimeManager\nRuntimeManager = plba.core.RuntimeManager", + "start_line": 16, + "end_line": 16, + "metadata": { + "symbol_id": "7eacec84f9b8d6c4201374591faecdac7493091c263681495c338973f2971ad9", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = plba.core.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/plba/core.py", + "title": "RuntimeManager", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "start_line": 2, + "end_line": 2, + "metadata": { + "symbol_id": "e1684562d978b7af7fe9b27dc5869d770348a87b5dc19a50360f58544668578b", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.core", + "is_test": false, + "blob_sha": "c0ae25110d20e665216616e26b68adfe035b624ba45d31d1272fb21f906f9ca8", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "tests/test_business_control_actions.py", + "title": "RuntimeManager", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "start_line": 14, + "end_line": 14, + "metadata": { + "symbol_id": "a1572ea8183dc0cd6ddbc74342bbde8c28cecfde37ad40b62feff09f8d103d11", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/service.py", + "title": "RuntimeManager", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "start_line": 9, + "end_line": 9, + "metadata": { + "symbol_id": "62a9575c77aad894120d18b4f2a08cf2ba42f77e9be4a8a432b767d157701afe", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/__init__.py", + "title": "ControlPlaneService", + "content": "const ControlPlaneService\nControlPlaneService = app_runtime.control.service.ControlPlaneService", + "start_line": 3, + "end_line": 3, + "metadata": { + "symbol_id": "217e8f044d1c01644bf7b81e5046af9e84469210c692a2fb0c476a19bb069ae1", + "qname": "ControlPlaneService", + "kind": "const", + "signature": "ControlPlaneService = app_runtime.control.service.ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "start_line": 14, + "end_line": 25, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "start_line": 14, + "end_line": 51, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "start_line": 14, + "end_line": 17, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "start_line": 14, + "end_line": 20, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "start_line": 14, + "end_line": 47, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/core/runtime.py", + "title": "RuntimeManager.__init__:dataflow_slice", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file", + "start_line": 32, + "end_line": 52, + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/plba/control.py", + "title": "src/plba/control.py:1-10", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\n \"ControlActionSet\",\n \"ControlChannel\",\n \"ControlPlaneService\",\n \"HttpControlChannel\",\n]", + "start_line": 1, + "end_line": 10, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.control", + "is_test": false, + "blob_sha": "31bd5c4481bfa7fbca8fae56d4860a67e3953ca74474ac8439e1f39b685d7bc8", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "tests/test_business_control_actions.py", + "title": "tests/test_business_control_actions.py:IntervalRoutine", + "content": "class IntervalRoutine:\n calls: list[float] = field(default_factory=list)\n _lock: Lock = field(default_factory=Lock)\n\n def run(self) -> None:\n with self._lock:\n self.calls.append(monotonic())\n\n def wait_runs(self, count: int, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n with self._lock:\n if len(self.calls) >= count:\n return True\n sleep(0.01)\n return False\n\n def deltas(self) -> list[float]:\n with self._lock:\n return [self.calls[index + 1] - self.calls[index] for index in range(len(self.calls) - 1)]", + "start_line": 18, + "end_line": 37, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/http_channel.py", + "title": "src/app_runtime/control/http_channel.py:HttpControlChannel", + "content": "class HttpControlChannel(ControlChannel):\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._timeout = timeout\n self._runner = UvicornThreadRunner(host, port, timeout)\n self._factory = HttpControlAppFactory()\n self._actions: ControlActionSet | None = None\n\n async def start(self, actions: ControlActionSet) -> None:\n self._actions = actions\n app = self._factory.create(self._health_response, self._action_response)\n await self._runner.start(app)\n\n async def stop(self) -> None:\n await self._runner.stop()\n\n @property\n def port(self) -> int:\n return self._runner.port\n\n async def _health_response(self) -> dict[str, object]:\n if self._actions is None:\n return {\"status\": \"unhealthy\", \"detail\": \"control actions are not configured\"}\n return await asyncio.wait_for(self._actions.health(), timeout=float(self._timeout))\n\n async def _action_response(self, action: str, _client_source: str = \"unknown\") -> JSONResponse:\n if self._actions is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"{action} handler is not configured\"}, status_code=404)\n callbacks = {\n \"start\": self._actions.start,\n \"stop\": self._actions.stop,\n \"status\": self._actions.status,\n }\n callback = callbacks.get(action)\n if callback is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"unsupported action: {action}\"}, status_code=404)\n action_timeout = max(float(self._timeout), 10.0) if action in {\"start\", \"stop\"} else float(self._timeout)\n try:\n detail = await asyncio.wait_for(callback(), timeout=action_timeout)\n except asyncio.TimeoutError:\n return JSONResponse(\n content={\"status\": \"accepted\", \"detail\": f\"{action} operation is still in progress\"},\n status_code=202,\n )\n except Exception as exc:\n return JSONResponse(content={\"status\": \"error\", \"detail\": str(exc)}, status_code=500)\n return JSONResponse(content={\"status\": \"ok\", \"detail\": detail or f\"{action} action accepted\"}, status_code=200)", + "start_line": 12, + "end_line": 57, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/http_app.py", + "title": "src/app_runtime/control/http_app.py:HttpControlAppFactory", + "content": "class HttpControlAppFactory:\n def create(\n self,\n health_provider: Callable[[], Awaitable[HealthPayload]],\n action_provider: Callable[[str, str], Awaitable[JSONResponse]],\n ) -> FastAPI:\n app = FastAPI(title=\"PLBA Control API\")\n\n @app.middleware(\"http\")\n async def log_api_call(request: Request, call_next): # type: ignore[no-untyped-def]\n started = time.monotonic()\n response = await call_next(request)\n response.headers[\"X-Response-Time-Ms\"] = str(int((time.monotonic() - started) * 1000))\n return response\n\n @app.get(\"/health\")\n async def health() -> JSONResponse:\n payload = await health_provider()\n status_code = 200 if payload.get(\"status\") == \"ok\" else 503\n return JSONResponse(content=payload, status_code=status_code)\n\n @app.get(\"/actions/{action}\")\n @app.post(\"/actions/{action}\")\n async def action(action: str, request: Request) -> JSONResponse:\n client_source = self._client_source(request)\n if action in {\"start\", \"stop\"}:\n LOGGER.warning(\"Control action requested: /actions/%s client=%s\", action, client_source)\n return await action_provider(action, client_source)\n\n return app\n\n def _client_source(self, request: Request) -> str:\n explicit_header = request.headers.get(\"X-Client-Source\", \"\").strip()\n if explicit_header:\n return explicit_header\n user_agent = request.headers.get(\"User-Agent\", \"\").strip()\n if user_agent:\n return f\"user-agent:{user_agent}\"\n return \"unknown\"", + "start_line": 15, + "end_line": 53, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/http_runner.py", + "title": "src/app_runtime/control/http_runner.py:UvicornThreadRunner", + "content": "class UvicornThreadRunner:\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._host = host\n self._port = port\n self._timeout = timeout\n self._server: Server | None = None\n self._thread: Thread | None = None\n self._error: BaseException | None = None\n\n async def start(self, app: FastAPI) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._error = None\n config = Config(app=app, host=self._host, port=self._port, log_level=\"warning\")\n self._server = Server(config)\n self._thread = Thread(target=self._serve, name=\"plba-http-control\", daemon=True)\n self._thread.start()\n await self._wait_until_started()\n\n async def stop(self) -> None:\n if self._server is None or self._thread is None:\n return\n self._server.should_exit = True\n await asyncio.to_thread(self._thread.join, self._timeout)\n self._server = None\n self._thread = None\n\n @property\n def port(self) -> int:\n if self._server is None or not getattr(self._server, \"servers\", None):\n return self._port\n socket = self._server.servers[0].sockets[0]\n return int(socket.getsockname()[1])\n\n async def _wait_until_started(self) -> None:\n if self._server is None:\n raise RuntimeError(\"Server is not initialized\")\n deadline = asyncio.get_running_loop().time() + max(float(self._timeout), 1.0)\n while not self._server.started:\n if self._error is not None:\n raise RuntimeError(\"HTTP control server failed to start\") from self._error\n if asyncio.get_running_loop().time() >= deadline:\n raise TimeoutError(\"HTTP control server startup timed out\")\n await asyncio.sleep(0.05)\n\n def _serve(self) -> None:\n if self._server is None:\n return\n try:\n asyncio.run(self._server.serve())\n except BaseException as exc: # noqa: BLE001\n self._error = exc", + "start_line": 10, + "end_line": 61, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_runner", + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/service.py", + "title": "src/app_runtime/control/service.py:ControlPlaneService", + "content": "class ControlPlaneService:\n def __init__(self) -> None:\n self._channels: list[ControlChannel] = []\n\n def register_channel(self, channel: ControlChannel) -> None:\n self._channels.append(channel)\n\n def start(self, runtime: RuntimeManager) -> None:\n if not self._channels:\n return\n asyncio.run(self._start_async(runtime))\n\n def stop(self) -> None:\n if not self._channels:\n return\n asyncio.run(self._stop_async())\n\n def snapshot(self, runtime: RuntimeManager) -> dict[str, object]:\n health = runtime.current_health()\n return {\n \"runtime\": {\"state\": runtime._state.value},\n \"modules\": list(runtime.registry.modules),\n \"services\": runtime.services.snapshot(),\n \"workers\": runtime.workers.snapshot(),\n \"health\": runtime.health.snapshot(runtime.workers.healths()) | {\"status\": health[\"status\"]},\n \"config\": runtime.configuration.get(),\n }\n\n async def _start_async(self, runtime: RuntimeManager) -> None:\n actions = ControlActionSet(\n health=runtime.health_status,\n start=runtime.start_runtime,\n stop=runtime.stop_runtime,\n status=runtime.runtime_status,\n )\n for channel in self._channels:\n await channel.start(actions)\n\n async def _stop_async(self) -> None:\n for channel in reversed(self._channels):\n await channel.stop()", + "start_line": 12, + "end_line": 52, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/base.py", + "title": "src/app_runtime/control/base.py:ControlActionSet", + "content": "class ControlActionSet:\n health: HealthHandler\n start: ActionHandler\n stop: ActionHandler\n status: ActionHandler", + "start_line": 14, + "end_line": 18, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/__init__.py", + "title": "src/app_runtime/control/__init__.py:1-5", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\"ControlActionSet\", \"ControlChannel\", \"ControlPlaneService\", \"HttpControlChannel\"]", + "start_line": 1, + "end_line": 5, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/base.py", + "title": "src/app_runtime/control/base.py:ControlChannel", + "content": "class ControlChannel(ABC):\n @abstractmethod\n async def start(self, actions: ControlActionSet) -> None:\n \"\"\"Start the control channel and bind handlers.\"\"\"\n\n @abstractmethod\n async def stop(self) -> None:\n \"\"\"Stop the control channel and release resources.\"\"\"", + "start_line": 21, + "end_line": 28, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "tests/test_business_control_actions.py", + "title": "tests/test_business_control_actions.py:BlockingRoutine", + "content": "class BlockingRoutine:\n def __init__(self, started: Event, release: Event) -> None:\n self._started = started\n self._release = release\n\n def run(self) -> None:\n self._started.set()\n self._release.wait(timeout=5.0)", + "start_line": 40, + "end_line": 47, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "relations": [ + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop" + }, + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async" + }, + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel" + }, + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start" + }, + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async" + }, + { + "path": "src/app_runtime/core/runtime.py", + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file" + } + ], + "entrypoints": [], + "test_candidates": [ + { + "path": "tests/test_business_control_actions.py", + "title": "tests/test_business_control_actions.py:IntervalRoutine", + "content": "class IntervalRoutine:\n calls: list[float] = field(default_factory=list)\n _lock: Lock = field(default_factory=Lock)\n\n def run(self) -> None:\n with self._lock:\n self.calls.append(monotonic())\n\n def wait_runs(self, count: int, timeout: float) -> bool:\n deadline = m" + }, + { + "path": "tests/test_business_control_actions.py", + "title": "tests/test_business_control_actions.py:BlockingRoutine", + "content": "class BlockingRoutine:\n def __init__(self, started: Event, release: Event) -> None:\n self._started = started\n self._release = release\n\n def run(self) -> None:\n self._started.set()\n self._release.wait(timeout=5.0)" + } + ], + "layer_outcomes": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 6, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 10, + "empty": false, + "fallback_used": false + } + ], + "missing_layers": [], + "raw_rows": [ + { + "path": "src/plba/bootstrap.py", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 4, + "span_end": 4, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "27158ca220022eeb5083c6addf8a50775d45f7161284fd60aac48410105f4b98", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 12, + "span_end": 12, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "aeadc039653807b0da1ca6e3cc1078ee61cfc510b28e7f9c2ec04c59da43cc8d", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager\nRuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "qname": "RuntimeManager", + "kind": "class", + "signature": "RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/__init__.py", + "content": "const RuntimeManager\nRuntimeManager = plba.core.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 16, + "span_end": 16, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "7eacec84f9b8d6c4201374591faecdac7493091c263681495c338973f2971ad9", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = plba.core.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/core.py", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 2, + "span_end": 2, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "e1684562d978b7af7fe9b27dc5869d770348a87b5dc19a50360f58544668578b", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.core", + "is_test": false, + "blob_sha": "c0ae25110d20e665216616e26b68adfe035b624ba45d31d1272fb21f906f9ca8", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 14, + "span_end": 14, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "a1572ea8183dc0cd6ddbc74342bbde8c28cecfde37ad40b62feff09f8d103d11", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 9, + "span_end": 9, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "62a9575c77aad894120d18b4f2a08cf2ba42f77e9be4a8a432b767d157701afe", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "const ControlPlaneService\nControlPlaneService = app_runtime.control.service.ControlPlaneService", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlPlaneService", + "span_start": 3, + "span_end": 3, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "217e8f044d1c01644bf7b81e5046af9e84469210c692a2fb0c476a19bb069ae1", + "qname": "ControlPlaneService", + "kind": "const", + "signature": "ControlPlaneService = app_runtime.control.service.ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 52, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/control.py", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\n \"ControlActionSet\",\n \"ControlChannel\",\n \"ControlPlaneService\",\n \"HttpControlChannel\",\n]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/control.py:1-10", + "span_start": 1, + "span_end": 10, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.control", + "is_test": false, + "blob_sha": "31bd5c4481bfa7fbca8fae56d4860a67e3953ca74474ac8439e1f39b685d7bc8", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class IntervalRoutine:\n calls: list[float] = field(default_factory=list)\n _lock: Lock = field(default_factory=Lock)\n\n def run(self) -> None:\n with self._lock:\n self.calls.append(monotonic())\n\n def wait_runs(self, count: int, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n with self._lock:\n if len(self.calls) >= count:\n return True\n sleep(0.01)\n return False\n\n def deltas(self) -> list[float]:\n with self._lock:\n return [self.calls[index + 1] - self.calls[index] for index in range(len(self.calls) - 1)]", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:IntervalRoutine", + "span_start": 18, + "span_end": 37, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel(ControlChannel):\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._timeout = timeout\n self._runner = UvicornThreadRunner(host, port, timeout)\n self._factory = HttpControlAppFactory()\n self._actions: ControlActionSet | None = None\n\n async def start(self, actions: ControlActionSet) -> None:\n self._actions = actions\n app = self._factory.create(self._health_response, self._action_response)\n await self._runner.start(app)\n\n async def stop(self) -> None:\n await self._runner.stop()\n\n @property\n def port(self) -> int:\n return self._runner.port\n\n async def _health_response(self) -> dict[str, object]:\n if self._actions is None:\n return {\"status\": \"unhealthy\", \"detail\": \"control actions are not configured\"}\n return await asyncio.wait_for(self._actions.health(), timeout=float(self._timeout))\n\n async def _action_response(self, action: str, _client_source: str = \"unknown\") -> JSONResponse:\n if self._actions is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"{action} handler is not configured\"}, status_code=404)\n callbacks = {\n \"start\": self._actions.start,\n \"stop\": self._actions.stop,\n \"status\": self._actions.status,\n }\n callback = callbacks.get(action)\n if callback is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"unsupported action: {action}\"}, status_code=404)\n action_timeout = max(float(self._timeout), 10.0) if action in {\"start\", \"stop\"} else float(self._timeout)\n try:\n detail = await asyncio.wait_for(callback(), timeout=action_timeout)\n except asyncio.TimeoutError:\n return JSONResponse(\n content={\"status\": \"accepted\", \"detail\": f\"{action} operation is still in progress\"},\n status_code=202,\n )\n except Exception as exc:\n return JSONResponse(content={\"status\": \"error\", \"detail\": str(exc)}, status_code=500)\n return JSONResponse(content={\"status\": \"ok\", \"detail\": detail or f\"{action} action accepted\"}, status_code=200)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_channel.py:HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "class HttpControlAppFactory:\n def create(\n self,\n health_provider: Callable[[], Awaitable[HealthPayload]],\n action_provider: Callable[[str, str], Awaitable[JSONResponse]],\n ) -> FastAPI:\n app = FastAPI(title=\"PLBA Control API\")\n\n @app.middleware(\"http\")\n async def log_api_call(request: Request, call_next): # type: ignore[no-untyped-def]\n started = time.monotonic()\n response = await call_next(request)\n response.headers[\"X-Response-Time-Ms\"] = str(int((time.monotonic() - started) * 1000))\n return response\n\n @app.get(\"/health\")\n async def health() -> JSONResponse:\n payload = await health_provider()\n status_code = 200 if payload.get(\"status\") == \"ok\" else 503\n return JSONResponse(content=payload, status_code=status_code)\n\n @app.get(\"/actions/{action}\")\n @app.post(\"/actions/{action}\")\n async def action(action: str, request: Request) -> JSONResponse:\n client_source = self._client_source(request)\n if action in {\"start\", \"stop\"}:\n LOGGER.warning(\"Control action requested: /actions/%s client=%s\", action, client_source)\n return await action_provider(action, client_source)\n\n return app\n\n def _client_source(self, request: Request) -> str:\n explicit_header = request.headers.get(\"X-Client-Source\", \"\").strip()\n if explicit_header:\n return explicit_header\n user_agent = request.headers.get(\"User-Agent\", \"\").strip()\n if user_agent:\n return f\"user-agent:{user_agent}\"\n return \"unknown\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_app.py:HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "class UvicornThreadRunner:\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._host = host\n self._port = port\n self._timeout = timeout\n self._server: Server | None = None\n self._thread: Thread | None = None\n self._error: BaseException | None = None\n\n async def start(self, app: FastAPI) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._error = None\n config = Config(app=app, host=self._host, port=self._port, log_level=\"warning\")\n self._server = Server(config)\n self._thread = Thread(target=self._serve, name=\"plba-http-control\", daemon=True)\n self._thread.start()\n await self._wait_until_started()\n\n async def stop(self) -> None:\n if self._server is None or self._thread is None:\n return\n self._server.should_exit = True\n await asyncio.to_thread(self._thread.join, self._timeout)\n self._server = None\n self._thread = None\n\n @property\n def port(self) -> int:\n if self._server is None or not getattr(self._server, \"servers\", None):\n return self._port\n socket = self._server.servers[0].sockets[0]\n return int(socket.getsockname()[1])\n\n async def _wait_until_started(self) -> None:\n if self._server is None:\n raise RuntimeError(\"Server is not initialized\")\n deadline = asyncio.get_running_loop().time() + max(float(self._timeout), 1.0)\n while not self._server.started:\n if self._error is not None:\n raise RuntimeError(\"HTTP control server failed to start\") from self._error\n if asyncio.get_running_loop().time() >= deadline:\n raise TimeoutError(\"HTTP control server startup timed out\")\n await asyncio.sleep(0.05)\n\n def _serve(self) -> None:\n if self._server is None:\n return\n try:\n asyncio.run(self._server.serve())\n except BaseException as exc: # noqa: BLE001\n self._error = exc", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_runner.py:UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_runner", + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "class ControlPlaneService:\n def __init__(self) -> None:\n self._channels: list[ControlChannel] = []\n\n def register_channel(self, channel: ControlChannel) -> None:\n self._channels.append(channel)\n\n def start(self, runtime: RuntimeManager) -> None:\n if not self._channels:\n return\n asyncio.run(self._start_async(runtime))\n\n def stop(self) -> None:\n if not self._channels:\n return\n asyncio.run(self._stop_async())\n\n def snapshot(self, runtime: RuntimeManager) -> dict[str, object]:\n health = runtime.current_health()\n return {\n \"runtime\": {\"state\": runtime._state.value},\n \"modules\": list(runtime.registry.modules),\n \"services\": runtime.services.snapshot(),\n \"workers\": runtime.workers.snapshot(),\n \"health\": runtime.health.snapshot(runtime.workers.healths()) | {\"status\": health[\"status\"]},\n \"config\": runtime.configuration.get(),\n }\n\n async def _start_async(self, runtime: RuntimeManager) -> None:\n actions = ControlActionSet(\n health=runtime.health_status,\n start=runtime.start_runtime,\n stop=runtime.stop_runtime,\n status=runtime.runtime_status,\n )\n for channel in self._channels:\n await channel.start(actions)\n\n async def _stop_async(self) -> None:\n for channel in reversed(self._channels):\n await channel.stop()", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/service.py:ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlActionSet:\n health: HealthHandler\n start: ActionHandler\n stop: ActionHandler\n status: ActionHandler", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\"ControlActionSet\", \"ControlChannel\", \"ControlPlaneService\", \"HttpControlChannel\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/__init__.py:1-5", + "span_start": 1, + "span_end": 5, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlChannel(ABC):\n @abstractmethod\n async def start(self, actions: ControlActionSet) -> None:\n \"\"\"Start the control channel and bind handlers.\"\"\"\n\n @abstractmethod\n async def stop(self) -> None:\n \"\"\"Stop the control channel and release resources.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class BlockingRoutine:\n def __init__(self, started: Event, release: Event) -> None:\n self._started = started\n self._release = release\n\n def run(self) -> None:\n self._started.set()\n self._release.wait(timeout=5.0)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:BlockingRoutine", + "span_start": 40, + "span_end": 47, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "retrieval_report": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "vector", + "C2_DEPENDENCY_GRAPH": "vector", + "C0_SOURCE_CHUNKS": "vector" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C0_SOURCE_CHUNKS": 10 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [] + } + }, + "fallback": { + "used": false, + "reason": null + }, + "retrieval_by_layer_ms": { + "C1_SYMBOL_CATALOG": 53, + "C2_DEPENDENCY_GRAPH": 75, + "C0_SOURCE_CHUNKS": 35 + } + } + }, + "diagnostics": { + "intent_correct": null, + "target_found": true, + "layers_used": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "retrieval_sufficient": true, + "answer_mode": "normal", + "router_result": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "FIND_TESTS", + "path_scope": [], + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "symbol_resolution_status": "pending" + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Где тесты для RuntimeManager?", + "sub_intent": "FIND_TESTS", + "path_scope": [], + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 6, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 10, + "empty": false, + "fallback_used": false + } + ], + "empty_layers": [], + "evidence_gate_decision": { + "sufficient": true, + "failure_reasons": [], + "evidence_count": 24 + }, + "failure_reasons": [], + "timings_ms": {} + }, + "rag_rows": [ + { + "path": "src/plba/bootstrap.py", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 4, + "span_end": 4, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "27158ca220022eeb5083c6addf8a50775d45f7161284fd60aac48410105f4b98", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 12, + "span_end": 12, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "aeadc039653807b0da1ca6e3cc1078ee61cfc510b28e7f9c2ec04c59da43cc8d", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager\nRuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "qname": "RuntimeManager", + "kind": "class", + "signature": "RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/__init__.py", + "content": "const RuntimeManager\nRuntimeManager = plba.core.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 16, + "span_end": 16, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "7eacec84f9b8d6c4201374591faecdac7493091c263681495c338973f2971ad9", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = plba.core.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/core.py", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 2, + "span_end": 2, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "e1684562d978b7af7fe9b27dc5869d770348a87b5dc19a50360f58544668578b", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.core", + "is_test": false, + "blob_sha": "c0ae25110d20e665216616e26b68adfe035b624ba45d31d1272fb21f906f9ca8", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 14, + "span_end": 14, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "a1572ea8183dc0cd6ddbc74342bbde8c28cecfde37ad40b62feff09f8d103d11", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 9, + "span_end": 9, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "62a9575c77aad894120d18b4f2a08cf2ba42f77e9be4a8a432b767d157701afe", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "const ControlPlaneService\nControlPlaneService = app_runtime.control.service.ControlPlaneService", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlPlaneService", + "span_start": 3, + "span_end": 3, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "217e8f044d1c01644bf7b81e5046af9e84469210c692a2fb0c476a19bb069ae1", + "qname": "ControlPlaneService", + "kind": "const", + "signature": "ControlPlaneService = app_runtime.control.service.ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 52, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/control.py", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\n \"ControlActionSet\",\n \"ControlChannel\",\n \"ControlPlaneService\",\n \"HttpControlChannel\",\n]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/control.py:1-10", + "span_start": 1, + "span_end": 10, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.control", + "is_test": false, + "blob_sha": "31bd5c4481bfa7fbca8fae56d4860a67e3953ca74474ac8439e1f39b685d7bc8", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class IntervalRoutine:\n calls: list[float] = field(default_factory=list)\n _lock: Lock = field(default_factory=Lock)\n\n def run(self) -> None:\n with self._lock:\n self.calls.append(monotonic())\n\n def wait_runs(self, count: int, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n with self._lock:\n if len(self.calls) >= count:\n return True\n sleep(0.01)\n return False\n\n def deltas(self) -> list[float]:\n with self._lock:\n return [self.calls[index + 1] - self.calls[index] for index in range(len(self.calls) - 1)]", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:IntervalRoutine", + "span_start": 18, + "span_end": 37, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel(ControlChannel):\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._timeout = timeout\n self._runner = UvicornThreadRunner(host, port, timeout)\n self._factory = HttpControlAppFactory()\n self._actions: ControlActionSet | None = None\n\n async def start(self, actions: ControlActionSet) -> None:\n self._actions = actions\n app = self._factory.create(self._health_response, self._action_response)\n await self._runner.start(app)\n\n async def stop(self) -> None:\n await self._runner.stop()\n\n @property\n def port(self) -> int:\n return self._runner.port\n\n async def _health_response(self) -> dict[str, object]:\n if self._actions is None:\n return {\"status\": \"unhealthy\", \"detail\": \"control actions are not configured\"}\n return await asyncio.wait_for(self._actions.health(), timeout=float(self._timeout))\n\n async def _action_response(self, action: str, _client_source: str = \"unknown\") -> JSONResponse:\n if self._actions is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"{action} handler is not configured\"}, status_code=404)\n callbacks = {\n \"start\": self._actions.start,\n \"stop\": self._actions.stop,\n \"status\": self._actions.status,\n }\n callback = callbacks.get(action)\n if callback is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"unsupported action: {action}\"}, status_code=404)\n action_timeout = max(float(self._timeout), 10.0) if action in {\"start\", \"stop\"} else float(self._timeout)\n try:\n detail = await asyncio.wait_for(callback(), timeout=action_timeout)\n except asyncio.TimeoutError:\n return JSONResponse(\n content={\"status\": \"accepted\", \"detail\": f\"{action} operation is still in progress\"},\n status_code=202,\n )\n except Exception as exc:\n return JSONResponse(content={\"status\": \"error\", \"detail\": str(exc)}, status_code=500)\n return JSONResponse(content={\"status\": \"ok\", \"detail\": detail or f\"{action} action accepted\"}, status_code=200)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_channel.py:HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "class HttpControlAppFactory:\n def create(\n self,\n health_provider: Callable[[], Awaitable[HealthPayload]],\n action_provider: Callable[[str, str], Awaitable[JSONResponse]],\n ) -> FastAPI:\n app = FastAPI(title=\"PLBA Control API\")\n\n @app.middleware(\"http\")\n async def log_api_call(request: Request, call_next): # type: ignore[no-untyped-def]\n started = time.monotonic()\n response = await call_next(request)\n response.headers[\"X-Response-Time-Ms\"] = str(int((time.monotonic() - started) * 1000))\n return response\n\n @app.get(\"/health\")\n async def health() -> JSONResponse:\n payload = await health_provider()\n status_code = 200 if payload.get(\"status\") == \"ok\" else 503\n return JSONResponse(content=payload, status_code=status_code)\n\n @app.get(\"/actions/{action}\")\n @app.post(\"/actions/{action}\")\n async def action(action: str, request: Request) -> JSONResponse:\n client_source = self._client_source(request)\n if action in {\"start\", \"stop\"}:\n LOGGER.warning(\"Control action requested: /actions/%s client=%s\", action, client_source)\n return await action_provider(action, client_source)\n\n return app\n\n def _client_source(self, request: Request) -> str:\n explicit_header = request.headers.get(\"X-Client-Source\", \"\").strip()\n if explicit_header:\n return explicit_header\n user_agent = request.headers.get(\"User-Agent\", \"\").strip()\n if user_agent:\n return f\"user-agent:{user_agent}\"\n return \"unknown\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_app.py:HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "class UvicornThreadRunner:\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._host = host\n self._port = port\n self._timeout = timeout\n self._server: Server | None = None\n self._thread: Thread | None = None\n self._error: BaseException | None = None\n\n async def start(self, app: FastAPI) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._error = None\n config = Config(app=app, host=self._host, port=self._port, log_level=\"warning\")\n self._server = Server(config)\n self._thread = Thread(target=self._serve, name=\"plba-http-control\", daemon=True)\n self._thread.start()\n await self._wait_until_started()\n\n async def stop(self) -> None:\n if self._server is None or self._thread is None:\n return\n self._server.should_exit = True\n await asyncio.to_thread(self._thread.join, self._timeout)\n self._server = None\n self._thread = None\n\n @property\n def port(self) -> int:\n if self._server is None or not getattr(self._server, \"servers\", None):\n return self._port\n socket = self._server.servers[0].sockets[0]\n return int(socket.getsockname()[1])\n\n async def _wait_until_started(self) -> None:\n if self._server is None:\n raise RuntimeError(\"Server is not initialized\")\n deadline = asyncio.get_running_loop().time() + max(float(self._timeout), 1.0)\n while not self._server.started:\n if self._error is not None:\n raise RuntimeError(\"HTTP control server failed to start\") from self._error\n if asyncio.get_running_loop().time() >= deadline:\n raise TimeoutError(\"HTTP control server startup timed out\")\n await asyncio.sleep(0.05)\n\n def _serve(self) -> None:\n if self._server is None:\n return\n try:\n asyncio.run(self._server.serve())\n except BaseException as exc: # noqa: BLE001\n self._error = exc", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_runner.py:UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_runner", + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "class ControlPlaneService:\n def __init__(self) -> None:\n self._channels: list[ControlChannel] = []\n\n def register_channel(self, channel: ControlChannel) -> None:\n self._channels.append(channel)\n\n def start(self, runtime: RuntimeManager) -> None:\n if not self._channels:\n return\n asyncio.run(self._start_async(runtime))\n\n def stop(self) -> None:\n if not self._channels:\n return\n asyncio.run(self._stop_async())\n\n def snapshot(self, runtime: RuntimeManager) -> dict[str, object]:\n health = runtime.current_health()\n return {\n \"runtime\": {\"state\": runtime._state.value},\n \"modules\": list(runtime.registry.modules),\n \"services\": runtime.services.snapshot(),\n \"workers\": runtime.workers.snapshot(),\n \"health\": runtime.health.snapshot(runtime.workers.healths()) | {\"status\": health[\"status\"]},\n \"config\": runtime.configuration.get(),\n }\n\n async def _start_async(self, runtime: RuntimeManager) -> None:\n actions = ControlActionSet(\n health=runtime.health_status,\n start=runtime.start_runtime,\n stop=runtime.stop_runtime,\n status=runtime.runtime_status,\n )\n for channel in self._channels:\n await channel.start(actions)\n\n async def _stop_async(self) -> None:\n for channel in reversed(self._channels):\n await channel.stop()", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/service.py:ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlActionSet:\n health: HealthHandler\n start: ActionHandler\n stop: ActionHandler\n status: ActionHandler", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\"ControlActionSet\", \"ControlChannel\", \"ControlPlaneService\", \"HttpControlChannel\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/__init__.py:1-5", + "span_start": 1, + "span_end": 5, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlChannel(ABC):\n @abstractmethod\n async def start(self, actions: ControlActionSet) -> None:\n \"\"\"Start the control channel and bind handlers.\"\"\"\n\n @abstractmethod\n async def stop(self) -> None:\n \"\"\"Stop the control channel and release resources.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class BlockingRoutine:\n def __init__(self, started: Event, release: Event) -> None:\n self._started = started\n self._release = release\n\n def run(self) -> None:\n self._started.set()\n self._release.wait(timeout=5.0)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:BlockingRoutine", + "span_start": 40, + "span_end": 47, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "validation": { + "passed": true, + "action": "return", + "reasons": [] + } + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-find-tests-runtime-manager.md b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-find-tests-runtime-manager.md new file mode 100644 index 0000000..7f1badd --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-find-tests-runtime-manager.md @@ -0,0 +1,32 @@ +# plba-v2-find-tests-runtime-manager + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: agent_runtime +- mode: full_chain +- passed: True + +## Query +Где тесты для RuntimeManager? + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 24, + "llm_answer": "- tests/test_runtime.py:12-12\n- tests/test_business_control_actions.py:14-14", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-find-tests-trace-service.json b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-find-tests-trace-service.json new file mode 100644 index 0000000..bea3487 --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-find-tests-trace-service.json @@ -0,0 +1,3134 @@ +{ + "case_id": "plba-v2-find-tests-trace-service", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "agent_runtime", + "mode": "full_chain", + "query": "Где тесты для TraceService?", + "actual": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 24, + "llm_answer": "- tests/test_runtime.py:test_trace_service_allows_messages_without_status (line range: 279-293)\n- tests/test_runtime.py:test_trace_service_writes_contexts_and_messages (line range: 246-259)\n- tests/test_runtime.py:test_trace_service_supports_debug_warning_and_error_levels (line range: 262-276)", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "TraceService" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "query": "Где тесты для TraceService?", + "router_result": { + "schema_version": "1.1", + "intent": "CODE_QA", + "retrieval_profile": "code", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query_plan": { + "raw": "Где тесты для TraceService?", + "normalized": "Где тесты для TraceService?", + "sub_intent": "FIND_TESTS", + "negations": [], + "expansions": [ + "test", + "unit test", + "TraceService" + ], + "keyword_hints": [ + "TraceService" + ], + "path_hints": [], + "doc_scope_hints": [], + "symbol_candidates": [ + "TraceService" + ], + "symbol_kind_hint": "class", + "anchors": [ + { + "type": "SYMBOL", + "value": "TraceService", + "source": "user_text", + "subtype": null, + "span": { + "start": 14, + "end": 26 + }, + "confidence": 0.88 + }, + { + "type": "KEY_TERM", + "value": "тест", + "source": "user_text", + "subtype": null, + "span": { + "start": 4, + "end": 9 + }, + "confidence": 0.9 + } + ] + }, + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "top_k": 8 + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "top_k": 6 + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 10 + } + ], + "filters": { + "test_policy": "INCLUDE", + "path_scope": [], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "test_file_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "test_symbol_patterns": [ + "test_trace_service", + "TestTraceService", + "TraceService" + ], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + }, + "symbol_resolution": { + "status": "pending", + "resolved_symbol": null, + "alternatives": [ + "TraceService" + ], + "confidence": 0.0 + }, + "evidence_policy": { + "require_def": true, + "require_flow": true, + "require_spec": false, + "allow_answer_without_evidence": false + } + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Где тесты для TraceService?", + "sub_intent": "FIND_TESTS", + "path_scope": [], + "keyword_hints": [ + "TraceService" + ], + "symbol_candidates": [ + "TraceService" + ], + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "top_k": 8 + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "top_k": 6 + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 10 + } + ], + "filters": { + "test_policy": "INCLUDE", + "path_scope": [], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "test_file_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "test_symbol_patterns": [ + "test_trace_service", + "TestTraceService", + "TraceService" + ], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + }, + "query_plan": { + "raw": "Где тесты для TraceService?", + "normalized": "Где тесты для TraceService?", + "sub_intent": "FIND_TESTS", + "negations": [], + "expansions": [ + "test", + "unit test", + "TraceService" + ], + "keyword_hints": [ + "TraceService" + ], + "path_hints": [], + "doc_scope_hints": [], + "symbol_candidates": [ + "TraceService" + ], + "symbol_kind_hint": "class", + "anchors": [ + { + "type": "SYMBOL", + "value": "TraceService", + "source": "user_text", + "subtype": null, + "span": { + "start": 14, + "end": 26 + }, + "confidence": 0.88 + }, + { + "type": "KEY_TERM", + "value": "тест", + "source": "user_text", + "subtype": null, + "span": { + "start": 4, + "end": 9 + }, + "confidence": 0.9 + } + ] + } + }, + "retrieval_result": { + "target_symbol_candidates": [ + "TraceService", + "TraceService.open_context", + "TraceService.create_context", + "TraceService.current_trace_id" + ], + "resolved_symbol": "TraceService", + "symbol_resolution_status": "resolved", + "file_candidates": [ + "src/plba/__init__.py", + "src/app_runtime/core/runtime.py", + "src/app_runtime/tracing/__init__.py", + "src/app_runtime/tracing/service.py", + "src/plba/tracing.py", + "tests/test_runtime.py", + "src/app_runtime/contracts/__init__.py" + ], + "code_chunks": [ + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/plba/__init__.py", + "title": "TraceService", + "content": "const TraceService\nTraceService = plba.tracing.TraceService", + "start_line": 20, + "end_line": 20, + "metadata": { + "symbol_id": "259ec03b77b9387ea53f69c77af32791dd29adf6de617ba72dd3f839197342a1", + "qname": "TraceService", + "kind": "const", + "signature": "TraceService = plba.tracing.TraceService", + "parent_symbol_id": null, + "package_or_module": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/core/runtime.py", + "title": "TraceService", + "content": "const TraceService\nTraceService = app_runtime.tracing.service.TraceService", + "start_line": 14, + "end_line": 14, + "metadata": { + "symbol_id": "3ccf6212fd7d9730f9df933e2ee7671b65bdae0520577e1a49c6432262842db6", + "qname": "TraceService", + "kind": "const", + "signature": "TraceService = app_runtime.tracing.service.TraceService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/tracing/__init__.py", + "title": "TraceService", + "content": "const TraceService\nTraceService = app_runtime.tracing.service.TraceService", + "start_line": 2, + "end_line": 2, + "metadata": { + "symbol_id": "ecd2fab7fa9744b2adca84d3d213f7aadcb7e1da84b9c2764a4ab39c65282b11", + "qname": "TraceService", + "kind": "const", + "signature": "TraceService = app_runtime.tracing.service.TraceService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.tracing.__init__", + "is_test": false, + "blob_sha": "a01dea5f773515aeaae8e6d3431fcb93531a8b577dfa26c2e5db16cd6ae6e4d9", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/tracing/service.py", + "title": "TraceService", + "content": "class TraceService\nTraceService(TraceContextFactory)", + "start_line": 39, + "end_line": 166, + "metadata": { + "symbol_id": "c2b2b976d99f2c600000b753731b26e0a69adcb4359398b93073590c5d5d04f4", + "qname": "TraceService", + "kind": "class", + "signature": "TraceService(TraceContextFactory)", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/plba/tracing.py", + "title": "TraceService", + "content": "const TraceService\nTraceService = app_runtime.tracing.service.TraceService", + "start_line": 1, + "end_line": 1, + "metadata": { + "symbol_id": "a4556fb3f83c50ea68b94a679786ce802cab7ffd9d7138aad3d6009b2661f425", + "qname": "TraceService", + "kind": "const", + "signature": "TraceService = app_runtime.tracing.service.TraceService", + "parent_symbol_id": null, + "package_or_module": "src.plba.tracing", + "is_test": false, + "blob_sha": "a27e11c716c93c3fcefe6f11b4cc420a6b743e7606606071d7f1aeeccc4e7d45", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/tracing/service.py", + "title": "TraceService.open_context", + "content": "method TraceService.open_context\nopen_context(self)", + "start_line": 66, + "end_line": 78, + "metadata": { + "symbol_id": "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426", + "qname": "TraceService.open_context", + "kind": "method", + "signature": "open_context(self)", + "parent_symbol_id": "TraceService", + "package_or_module": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/tracing/service.py", + "title": "TraceService.create_context", + "content": "method TraceService.create_context\ncreate_context(self)", + "start_line": 45, + "end_line": 63, + "metadata": { + "symbol_id": "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a", + "qname": "TraceService.create_context", + "kind": "method", + "signature": "create_context(self)", + "parent_symbol_id": "TraceService", + "package_or_module": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/tracing/service.py", + "title": "TraceService.current_trace_id", + "content": "method TraceService.current_trace_id\ncurrent_trace_id(self)", + "start_line": 80, + "end_line": 81, + "metadata": { + "symbol_id": "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c", + "qname": "TraceService.current_trace_id", + "kind": "method", + "signature": "current_trace_id(self)", + "parent_symbol_id": "TraceService", + "package_or_module": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/tracing/service.py", + "title": "TraceService.__init__:dataflow_slice", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.create_context", + "start_line": 42, + "end_line": 61, + "metadata": { + "edge_id": "3b052062067a78aef3302ee1d996897e02a67d1b340397bea4f59fe147c0492a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a", + "dst_ref": "TraceService.create_context", + "resolution": "resolved", + "slice_id": "3b052062067a78aef3302ee1d996897e02a67d1b340397bea4f59fe147c0492a", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.create_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/tracing/service.py", + "title": "TraceService.__init__:dataflow_slice", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.close_context", + "start_line": 42, + "end_line": 84, + "metadata": { + "edge_id": "7a9353ef57c9ae5d19b3a0c6ac50fad05e6d21d31bbe1cd1cd07af6332ba6505", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "01e14158dcced7e52d0c8ac84ac7b9a75225c261b6aca6a1d7da802d0994721c", + "dst_ref": "TraceService.close_context", + "resolution": "resolved", + "slice_id": "7a9353ef57c9ae5d19b3a0c6ac50fad05e6d21d31bbe1cd1cd07af6332ba6505", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.close_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "01e14158dcced7e52d0c8ac84ac7b9a75225c261b6aca6a1d7da802d0994721c" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/tracing/service.py", + "title": "TraceService.__init__:dataflow_slice", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.open_context", + "start_line": 42, + "end_line": 78, + "metadata": { + "edge_id": "a6e13b9ebc4fed84586afd53ed92a4d14757e440873f572b2337d5622ee96031", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426", + "dst_ref": "TraceService.open_context", + "resolution": "resolved", + "slice_id": "a6e13b9ebc4fed84586afd53ed92a4d14757e440873f572b2337d5622ee96031", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.open_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/tracing/service.py", + "title": "TraceService.__init__:dataflow_slice", + "content": "TraceService.__init__\n -> TraceService.transport\n -> TraceService.__init__", + "start_line": 41, + "end_line": 43, + "metadata": { + "edge_id": "1e923a93faa05c3c43ca9b19bd047007a8589ccce57d3cc1798ae7f9f200af98", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "dst_ref": "TraceService.__init__", + "resolution": "resolved", + "slice_id": "1e923a93faa05c3c43ca9b19bd047007a8589ccce57d3cc1798ae7f9f200af98", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.transport", + "TraceService.__init__" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/tracing/service.py", + "title": "TraceService.__init__:dataflow_slice", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.current_trace_id", + "start_line": 42, + "end_line": 81, + "metadata": { + "edge_id": "3ea17138634b1190bded77ddb84aa1595124f6519b246f24fc4b02bd62b5cac1", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c", + "dst_ref": "TraceService.current_trace_id", + "resolution": "resolved", + "slice_id": "3ea17138634b1190bded77ddb84aa1595124f6519b246f24fc4b02bd62b5cac1", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.current_trace_id" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/tracing/service.py", + "title": "TraceService.__init__:dataflow_slice", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.step", + "start_line": 42, + "end_line": 88, + "metadata": { + "edge_id": "9f34c5da9b09fba99df6f6b1bde183a9aeb45111b8218a747c71590c2c9f60f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "c44bfbc66cf747283f30088da3e011a10395031d41e77b74e523c24997f641ca", + "dst_ref": "TraceService.step", + "resolution": "resolved", + "slice_id": "9f34c5da9b09fba99df6f6b1bde183a9aeb45111b8218a747c71590c2c9f60f2", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.step" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "c44bfbc66cf747283f30088da3e011a10395031d41e77b74e523c24997f641ca" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/plba/tracing.py", + "title": "src/plba/tracing.py:1-4", + "content": "from app_runtime.tracing.service import TraceService\nfrom app_runtime.tracing.transport import MySqlTraceTransport, NoOpTraceTransport\n\n__all__ = [\"MySqlTraceTransport\", \"NoOpTraceTransport\", \"TraceService\"]", + "start_line": 1, + "end_line": 4, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.tracing", + "is_test": false, + "blob_sha": "a27e11c716c93c3fcefe6f11b4cc420a6b743e7606606071d7f1aeeccc4e7d45", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "tests/test_runtime.py", + "title": "tests/test_runtime.py:test_trace_service_allows_messages_without_status", + "content": "def test_trace_service_allows_messages_without_status() -> None:\n from app_runtime.tracing.service import TraceService\n\n transport = RecordingTransport()\n manager = TraceService(transport=transport)\n\n with manager.open_context(alias=\"worker\", kind=\"worker\"):\n manager.step(\"optional-status\")\n manager.debug(\"debug without status\")\n manager.info(\"info without status\")\n manager.warning(\"warning without status\")\n manager.error(\"error without status\")\n\n assert [message.status for message in transport.messages] == [\"\", \"\", \"\", \"\"]\n assert all(message.trace_id == transport.contexts[0].trace_id for message in transport.messages)", + "start_line": 279, + "end_line": 293, + "metadata": { + "chunk_index": 11, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/tracing/__init__.py", + "title": "src/app_runtime/tracing/__init__.py:1-17", + "content": "from app_runtime.contracts.trace import TraceContext, TraceContextRecord, TraceLogMessage, TraceTransport\nfrom app_runtime.tracing.service import TraceManager, TraceService\nfrom app_runtime.tracing.store import ActiveTraceContext, TraceContextStore\nfrom app_runtime.tracing.transport import MySqlTraceTransport, NoOpTraceTransport\n\n__all__ = [\n \"ActiveTraceContext\",\n \"MySqlTraceTransport\",\n \"NoOpTraceTransport\",\n \"TraceContext\",\n \"TraceContextRecord\",\n \"TraceContextStore\",\n \"TraceLogMessage\",\n \"TraceManager\",\n \"TraceService\",\n \"TraceTransport\",\n]", + "start_line": 1, + "end_line": 17, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.tracing.__init__", + "is_test": false, + "blob_sha": "a01dea5f773515aeaae8e6d3431fcb93531a8b577dfa26c2e5db16cd6ae6e4d9", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/plba/__init__.py", + "title": "src/plba/__init__.py:1-69", + "content": "from plba.bootstrap import create_runtime\nfrom plba.config import ConfigFileLoader, FileConfigProvider\nfrom plba.control import ControlActionSet, ControlChannel, ControlPlaneService, HttpControlChannel\nfrom plba.contracts import (\n ApplicationModule,\n ConfigProvider,\n HealthContributor,\n TraceContext,\n TraceContextRecord,\n TraceLogMessage,\n TraceTransport,\n Worker,\n WorkerHealth,\n WorkerStatus,\n)\nfrom plba.core import ConfigurationManager, RuntimeManager, ServiceContainer\nfrom plba.health import HealthRegistry\nfrom plba.logging import LogManager\nfrom plba.queue import InMemoryTaskQueue\nfrom plba.tracing import MySqlTraceTransport, NoOpTraceTransport, TraceService\nfrom plba.workflow import (\n StepResult,\n WorkflowContext,\n WorkflowDefinition,\n WorkflowEngine,\n WorkflowEngineHooks,\n WorkflowNode,\n WorkflowRuntimeFactory,\n WorkflowStep,\n)\nfrom plba.workers import WorkerSupervisor\n\n__all__ = [\n \"ApplicationModule\",\n \"ConfigFileLoader\",\n \"ConfigProvider\",\n \"ConfigurationManager\",\n \"ControlActionSet\",\n \"ControlChannel\",\n \"ControlPlaneService\",\n \"create_runtime\",\n \"FileConfigProvider\",\n \"HealthContributor\",\n \"HealthRegistry\",\n \"HttpControlChannel\",\n \"InMemoryTaskQueue\",\n \"LogManager\",\n \"MySqlTraceTransport\",\n \"NoOpTraceTransport\",\n \"RuntimeManager\",\n \"ServiceContainer\",\n \"TraceContext\",\n \"TraceContextRecord\",\n \"TraceLogMessage\",\n \"TraceService\",\n \"TraceTransport\",\n \"StepResult\",\n \"Worker\",\n \"WorkerHealth\",\n \"WorkerStatus\",\n \"WorkflowContext\",\n \"WorkflowDefinition\",\n \"WorkflowEngine\",\n \"WorkflowEngineHooks\",\n \"WorkflowNode\",\n \"WorkflowRuntimeFactory\",\n \"WorkflowStep\",\n \"WorkerSupervisor\",\n]", + "start_line": 1, + "end_line": 69, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "tests/test_runtime.py", + "title": "tests/test_runtime.py:test_trace_service_writes_contexts_and_messages", + "content": "def test_trace_service_writes_contexts_and_messages() -> None:\n from app_runtime.tracing.service import TraceService\n\n transport = RecordingTransport()\n manager = TraceService(transport=transport)\n\n with manager.open_context(alias=\"worker\", kind=\"worker\", attrs={\"routine\": \"incoming\"}):\n manager.step(\"parse\")\n manager.info(\"started\", status=\"ok\", attrs={\"attempt\": 1})\n\n assert len(transport.contexts) == 1\n assert len(transport.messages) == 1\n assert transport.contexts[0].alias == \"worker\"\n assert transport.messages[0].step == \"parse\"", + "start_line": 246, + "end_line": 259, + "metadata": { + "chunk_index": 9, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "tests/test_runtime.py", + "title": "tests/test_runtime.py:test_trace_service_supports_debug_warning_and_error_levels", + "content": "def test_trace_service_supports_debug_warning_and_error_levels() -> None:\n from app_runtime.tracing.service import TraceService\n\n transport = RecordingTransport()\n manager = TraceService(transport=transport)\n\n with manager.open_context(alias=\"worker\", kind=\"worker\", attrs={\"routine\": \"incoming\"}):\n manager.step(\"validate\")\n manager.debug(\"validation details\", attrs={\"rule\": \"basic\"})\n manager.warning(\"validation warning\", status=\"degraded\", attrs={\"attempt\": 1})\n manager.error(\"integration failed\", status=\"failed\", attrs={\"integration\": \"crm\"})\n manager.exception(\"caught exception\", attrs={\"exception_type\": \"RuntimeError\"})\n\n levels = [message.level for message in transport.messages]\n assert levels == [\"DEBUG\", \"WARNING\", \"ERROR\", \"ERROR\"]", + "start_line": 262, + "end_line": 276, + "metadata": { + "chunk_index": 10, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/tracing/service.py", + "title": "src/app_runtime/tracing/service.py:TraceManager", + "content": "class TraceManager(TraceService):\n \"\"\"Compatibility alias during the transition from ConfigManager-shaped naming.\"\"\"", + "start_line": 169, + "end_line": 170, + "metadata": { + "chunk_index": 2, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/core/runtime.py", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "start_line": 18, + "end_line": 179, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/tracing/service.py", + "title": "src/app_runtime/tracing/service.py:TraceService", + "content": "class TraceService(TraceContextFactory):\n def __init__(self, transport: TraceTransport | None = None, store: TraceContextStore | None = None) -> None:\n self.transport = transport or NoOpTraceTransport()\n self.store = store or TraceContextStore()\n self._writer = TraceRecordWriter(self.transport)\n\n def create_context(\n self,\n *,\n alias: str,\n parent_id: str | None = None,\n kind: str | None = None,\n attrs: dict[str, Any] | None = None,\n ) -> str:\n record = TraceContextRecord(\n trace_id=uuid4().hex,\n alias=str(alias or \"\"),\n parent_id=parent_id,\n type=kind,\n event_time=utc_now(),\n attrs=dict(attrs or {}),\n )\n self.store.push(record)\n self._writer.write_context(record)\n return record.trace_id\n\n @contextmanager\n def open_context(\n self,\n *,\n alias: str,\n parent_id: str | None = None,\n kind: str | None = None,\n attrs: dict[str, Any] | None = None,\n ) -> Iterator[str]:\n trace_id = self.create_context(alias=alias, parent_id=parent_id, kind=kind, attrs=attrs)\n try:\n yield trace_id\n finally:\n self.store.pop()\n\n def current_trace_id(self) -> str | None:\n return self.store.current_trace_id()\n\n def close_context(self) -> str | None:\n previous = self.store.pop()\n return previous.record.trace_id if previous else None\n\n def step(self, name: str) -> None:\n self.store.set_step(str(name or \"\"))\n\n def info(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"INFO\", message, status, attrs)\n\n def debug(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"DEBUG\", message, status, attrs)\n\n def warning(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"WARNING\", message, status, attrs)\n\n def error(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"ERROR\", message, status, attrs)\n\n def exception(self, message: str, *, status: str = \"failed\", attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"ERROR\", message, status, attrs)\n\n def new_root(self, operation: str) -> TraceContext:\n trace_id = self.create_context(alias=operation, kind=\"operation\", attrs={\"operation\": operation})\n return TraceContext(trace_id=trace_id, span_id=trace_id, attributes={\"operation\": operation})\n\n def child_of(self, parent: TraceContext, operation: str) -> TraceContext:\n trace_id = self.create_context(\n alias=operation,\n parent_id=parent.trace_id,\n kind=\"worker\",\n attrs={\"operation\": operation},\n )\n return TraceContext(\n trace_id=trace_id,\n span_id=trace_id,\n parent_span_id=parent.span_id,\n attributes={\"operation\": operation},\n )\n\n def attach(self, metadata: dict[str, object], context: TraceContext) -> dict[str, object]:\n updated = dict(metadata)\n updated[\"trace_id\"] = context.trace_id\n updated[\"span_id\"] = context.span_id\n updated[\"parent_span_id\"] = context.parent_span_id\n return updated\n\n def resume(self, metadata: dict[str, object], operation: str) -> TraceContext:\n trace_id = str(metadata.get(\"trace_id\") or uuid4().hex)\n span_id = str(metadata.get(\"span_id\") or trace_id)\n parent_id = metadata.get(\"parent_span_id\")\n self.create_context(\n alias=operation,\n parent_id=str(parent_id) if parent_id else None,\n kind=\"worker\",\n attrs=dict(metadata),\n )\n return TraceContext(\n trace_id=trace_id,\n span_id=span_id,\n parent_span_id=str(parent_id) if parent_id else None,\n attributes={\"operation\": operation},\n )\n\n def _write_message(\n self,\n level: TraceLevel,\n message: str,\n status: str | None,\n attrs: dict[str, Any] | None,\n ) -> None:\n active = self.store.current()\n if active is None:\n raise RuntimeError(\"Trace context is not bound. Call create_context() first.\")\n record = TraceLogMessage(\n trace_id=active.record.trace_id,\n step=active.step,\n status=str(status or \"\"),\n message=str(message or \"\"),\n level=level,\n event_time=utc_now(),\n attrs=dict(attrs or {}),\n )\n self._writer.write_message(record)", + "start_line": 39, + "end_line": 166, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/contracts/__init__.py", + "title": "src/app_runtime/__init__.py:1-1", + "content": "__all__: list[str] = []", + "start_line": 1, + "end_line": 1, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.__init__", + "is_test": false, + "blob_sha": "8eea9df4f6d7b38ca0e39ccc27b04700e3d08dbeec8046d613d22706d19985fa", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "relations": [ + { + "path": "src/app_runtime/tracing/service.py", + "metadata": { + "edge_id": "3b052062067a78aef3302ee1d996897e02a67d1b340397bea4f59fe147c0492a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a", + "dst_ref": "TraceService.create_context", + "resolution": "resolved", + "slice_id": "3b052062067a78aef3302ee1d996897e02a67d1b340397bea4f59fe147c0492a", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.create_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.create_context" + }, + { + "path": "src/app_runtime/tracing/service.py", + "metadata": { + "edge_id": "7a9353ef57c9ae5d19b3a0c6ac50fad05e6d21d31bbe1cd1cd07af6332ba6505", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "01e14158dcced7e52d0c8ac84ac7b9a75225c261b6aca6a1d7da802d0994721c", + "dst_ref": "TraceService.close_context", + "resolution": "resolved", + "slice_id": "7a9353ef57c9ae5d19b3a0c6ac50fad05e6d21d31bbe1cd1cd07af6332ba6505", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.close_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "01e14158dcced7e52d0c8ac84ac7b9a75225c261b6aca6a1d7da802d0994721c" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.close_context" + }, + { + "path": "src/app_runtime/tracing/service.py", + "metadata": { + "edge_id": "a6e13b9ebc4fed84586afd53ed92a4d14757e440873f572b2337d5622ee96031", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426", + "dst_ref": "TraceService.open_context", + "resolution": "resolved", + "slice_id": "a6e13b9ebc4fed84586afd53ed92a4d14757e440873f572b2337d5622ee96031", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.open_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.open_context" + }, + { + "path": "src/app_runtime/tracing/service.py", + "metadata": { + "edge_id": "1e923a93faa05c3c43ca9b19bd047007a8589ccce57d3cc1798ae7f9f200af98", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "dst_ref": "TraceService.__init__", + "resolution": "resolved", + "slice_id": "1e923a93faa05c3c43ca9b19bd047007a8589ccce57d3cc1798ae7f9f200af98", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.transport", + "TraceService.__init__" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "TraceService.__init__\n -> TraceService.transport\n -> TraceService.__init__" + }, + { + "path": "src/app_runtime/tracing/service.py", + "metadata": { + "edge_id": "3ea17138634b1190bded77ddb84aa1595124f6519b246f24fc4b02bd62b5cac1", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c", + "dst_ref": "TraceService.current_trace_id", + "resolution": "resolved", + "slice_id": "3ea17138634b1190bded77ddb84aa1595124f6519b246f24fc4b02bd62b5cac1", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.current_trace_id" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.current_trace_id" + }, + { + "path": "src/app_runtime/tracing/service.py", + "metadata": { + "edge_id": "9f34c5da9b09fba99df6f6b1bde183a9aeb45111b8218a747c71590c2c9f60f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "c44bfbc66cf747283f30088da3e011a10395031d41e77b74e523c24997f641ca", + "dst_ref": "TraceService.step", + "resolution": "resolved", + "slice_id": "9f34c5da9b09fba99df6f6b1bde183a9aeb45111b8218a747c71590c2c9f60f2", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.step" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "c44bfbc66cf747283f30088da3e011a10395031d41e77b74e523c24997f641ca" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.step" + } + ], + "entrypoints": [], + "test_candidates": [ + { + "path": "tests/test_runtime.py", + "title": "tests/test_runtime.py:test_trace_service_allows_messages_without_status", + "content": "def test_trace_service_allows_messages_without_status() -> None:\n from app_runtime.tracing.service import TraceService\n\n transport = RecordingTransport()\n manager = TraceService(transport=transport)\n\n with manager.open_context(alias=\"worker\", kind=\"worker\"):\n manager.step(\"optiona" + }, + { + "path": "tests/test_runtime.py", + "title": "tests/test_runtime.py:test_trace_service_writes_contexts_and_messages", + "content": "def test_trace_service_writes_contexts_and_messages() -> None:\n from app_runtime.tracing.service import TraceService\n\n transport = RecordingTransport()\n manager = TraceService(transport=transport)\n\n with manager.open_context(alias=\"worker\", kind=\"worker\", attrs={\"routine\": \"incoming\"}):\n" + }, + { + "path": "tests/test_runtime.py", + "title": "tests/test_runtime.py:test_trace_service_supports_debug_warning_and_error_levels", + "content": "def test_trace_service_supports_debug_warning_and_error_levels() -> None:\n from app_runtime.tracing.service import TraceService\n\n transport = RecordingTransport()\n manager = TraceService(transport=transport)\n\n with manager.open_context(alias=\"worker\", kind=\"worker\", attrs={\"routine\": \"in" + } + ], + "layer_outcomes": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 6, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 10, + "empty": false, + "fallback_used": false + } + ], + "missing_layers": [], + "raw_rows": [ + { + "path": "src/plba/__init__.py", + "content": "const TraceService\nTraceService = plba.tracing.TraceService", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService", + "span_start": 20, + "span_end": 20, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "259ec03b77b9387ea53f69c77af32791dd29adf6de617ba72dd3f839197342a1", + "qname": "TraceService", + "kind": "const", + "signature": "TraceService = plba.tracing.TraceService", + "parent_symbol_id": null, + "package_or_module": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "const TraceService\nTraceService = app_runtime.tracing.service.TraceService", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService", + "span_start": 14, + "span_end": 14, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "3ccf6212fd7d9730f9df933e2ee7671b65bdae0520577e1a49c6432262842db6", + "qname": "TraceService", + "kind": "const", + "signature": "TraceService = app_runtime.tracing.service.TraceService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/__init__.py", + "content": "const TraceService\nTraceService = app_runtime.tracing.service.TraceService", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService", + "span_start": 2, + "span_end": 2, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "ecd2fab7fa9744b2adca84d3d213f7aadcb7e1da84b9c2764a4ab39c65282b11", + "qname": "TraceService", + "kind": "const", + "signature": "TraceService = app_runtime.tracing.service.TraceService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.tracing.__init__", + "is_test": false, + "blob_sha": "a01dea5f773515aeaae8e6d3431fcb93531a8b577dfa26c2e5db16cd6ae6e4d9", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceService\nTraceService(TraceContextFactory)", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService", + "span_start": 39, + "span_end": 166, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "c2b2b976d99f2c600000b753731b26e0a69adcb4359398b93073590c5d5d04f4", + "qname": "TraceService", + "kind": "class", + "signature": "TraceService(TraceContextFactory)", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/tracing.py", + "content": "const TraceService\nTraceService = app_runtime.tracing.service.TraceService", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService", + "span_start": 1, + "span_end": 1, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "a4556fb3f83c50ea68b94a679786ce802cab7ffd9d7138aad3d6009b2661f425", + "qname": "TraceService", + "kind": "const", + "signature": "TraceService = app_runtime.tracing.service.TraceService", + "parent_symbol_id": null, + "package_or_module": "src.plba.tracing", + "is_test": false, + "blob_sha": "a27e11c716c93c3fcefe6f11b4cc420a6b743e7606606071d7f1aeeccc4e7d45", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "method TraceService.open_context\nopen_context(self)", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService.open_context", + "span_start": 66, + "span_end": 78, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426", + "qname": "TraceService.open_context", + "kind": "method", + "signature": "open_context(self)", + "parent_symbol_id": "TraceService", + "package_or_module": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "method TraceService.create_context\ncreate_context(self)", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService.create_context", + "span_start": 45, + "span_end": 63, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a", + "qname": "TraceService.create_context", + "kind": "method", + "signature": "create_context(self)", + "parent_symbol_id": "TraceService", + "package_or_module": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "method TraceService.current_trace_id\ncurrent_trace_id(self)", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService.current_trace_id", + "span_start": 80, + "span_end": 81, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c", + "qname": "TraceService.current_trace_id", + "kind": "method", + "signature": "current_trace_id(self)", + "parent_symbol_id": "TraceService", + "package_or_module": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.create_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 61, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "3b052062067a78aef3302ee1d996897e02a67d1b340397bea4f59fe147c0492a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a", + "dst_ref": "TraceService.create_context", + "resolution": "resolved", + "slice_id": "3b052062067a78aef3302ee1d996897e02a67d1b340397bea4f59fe147c0492a", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.create_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.close_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 84, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "7a9353ef57c9ae5d19b3a0c6ac50fad05e6d21d31bbe1cd1cd07af6332ba6505", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "01e14158dcced7e52d0c8ac84ac7b9a75225c261b6aca6a1d7da802d0994721c", + "dst_ref": "TraceService.close_context", + "resolution": "resolved", + "slice_id": "7a9353ef57c9ae5d19b3a0c6ac50fad05e6d21d31bbe1cd1cd07af6332ba6505", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.close_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "01e14158dcced7e52d0c8ac84ac7b9a75225c261b6aca6a1d7da802d0994721c" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.open_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 78, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "a6e13b9ebc4fed84586afd53ed92a4d14757e440873f572b2337d5622ee96031", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426", + "dst_ref": "TraceService.open_context", + "resolution": "resolved", + "slice_id": "a6e13b9ebc4fed84586afd53ed92a4d14757e440873f572b2337d5622ee96031", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.open_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.transport\n -> TraceService.__init__", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 41, + "span_end": 43, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "1e923a93faa05c3c43ca9b19bd047007a8589ccce57d3cc1798ae7f9f200af98", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "dst_ref": "TraceService.__init__", + "resolution": "resolved", + "slice_id": "1e923a93faa05c3c43ca9b19bd047007a8589ccce57d3cc1798ae7f9f200af98", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.transport", + "TraceService.__init__" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.current_trace_id", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 81, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "3ea17138634b1190bded77ddb84aa1595124f6519b246f24fc4b02bd62b5cac1", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c", + "dst_ref": "TraceService.current_trace_id", + "resolution": "resolved", + "slice_id": "3ea17138634b1190bded77ddb84aa1595124f6519b246f24fc4b02bd62b5cac1", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.current_trace_id" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.step", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 88, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "9f34c5da9b09fba99df6f6b1bde183a9aeb45111b8218a747c71590c2c9f60f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "c44bfbc66cf747283f30088da3e011a10395031d41e77b74e523c24997f641ca", + "dst_ref": "TraceService.step", + "resolution": "resolved", + "slice_id": "9f34c5da9b09fba99df6f6b1bde183a9aeb45111b8218a747c71590c2c9f60f2", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.step" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "c44bfbc66cf747283f30088da3e011a10395031d41e77b74e523c24997f641ca" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/tracing.py", + "content": "from app_runtime.tracing.service import TraceService\nfrom app_runtime.tracing.transport import MySqlTraceTransport, NoOpTraceTransport\n\n__all__ = [\"MySqlTraceTransport\", \"NoOpTraceTransport\", \"TraceService\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/tracing.py:1-4", + "span_start": 1, + "span_end": 4, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.tracing", + "is_test": false, + "blob_sha": "a27e11c716c93c3fcefe6f11b4cc420a6b743e7606606071d7f1aeeccc4e7d45", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "def test_trace_service_allows_messages_without_status() -> None:\n from app_runtime.tracing.service import TraceService\n\n transport = RecordingTransport()\n manager = TraceService(transport=transport)\n\n with manager.open_context(alias=\"worker\", kind=\"worker\"):\n manager.step(\"optional-status\")\n manager.debug(\"debug without status\")\n manager.info(\"info without status\")\n manager.warning(\"warning without status\")\n manager.error(\"error without status\")\n\n assert [message.status for message in transport.messages] == [\"\", \"\", \"\", \"\"]\n assert all(message.trace_id == transport.contexts[0].trace_id for message in transport.messages)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_runtime.py:test_trace_service_allows_messages_without_status", + "span_start": 279, + "span_end": 293, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 11, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/__init__.py", + "content": "from app_runtime.contracts.trace import TraceContext, TraceContextRecord, TraceLogMessage, TraceTransport\nfrom app_runtime.tracing.service import TraceManager, TraceService\nfrom app_runtime.tracing.store import ActiveTraceContext, TraceContextStore\nfrom app_runtime.tracing.transport import MySqlTraceTransport, NoOpTraceTransport\n\n__all__ = [\n \"ActiveTraceContext\",\n \"MySqlTraceTransport\",\n \"NoOpTraceTransport\",\n \"TraceContext\",\n \"TraceContextRecord\",\n \"TraceContextStore\",\n \"TraceLogMessage\",\n \"TraceManager\",\n \"TraceService\",\n \"TraceTransport\",\n]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/tracing/__init__.py:1-17", + "span_start": 1, + "span_end": 17, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.tracing.__init__", + "is_test": false, + "blob_sha": "a01dea5f773515aeaae8e6d3431fcb93531a8b577dfa26c2e5db16cd6ae6e4d9", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/__init__.py", + "content": "from plba.bootstrap import create_runtime\nfrom plba.config import ConfigFileLoader, FileConfigProvider\nfrom plba.control import ControlActionSet, ControlChannel, ControlPlaneService, HttpControlChannel\nfrom plba.contracts import (\n ApplicationModule,\n ConfigProvider,\n HealthContributor,\n TraceContext,\n TraceContextRecord,\n TraceLogMessage,\n TraceTransport,\n Worker,\n WorkerHealth,\n WorkerStatus,\n)\nfrom plba.core import ConfigurationManager, RuntimeManager, ServiceContainer\nfrom plba.health import HealthRegistry\nfrom plba.logging import LogManager\nfrom plba.queue import InMemoryTaskQueue\nfrom plba.tracing import MySqlTraceTransport, NoOpTraceTransport, TraceService\nfrom plba.workflow import (\n StepResult,\n WorkflowContext,\n WorkflowDefinition,\n WorkflowEngine,\n WorkflowEngineHooks,\n WorkflowNode,\n WorkflowRuntimeFactory,\n WorkflowStep,\n)\nfrom plba.workers import WorkerSupervisor\n\n__all__ = [\n \"ApplicationModule\",\n \"ConfigFileLoader\",\n \"ConfigProvider\",\n \"ConfigurationManager\",\n \"ControlActionSet\",\n \"ControlChannel\",\n \"ControlPlaneService\",\n \"create_runtime\",\n \"FileConfigProvider\",\n \"HealthContributor\",\n \"HealthRegistry\",\n \"HttpControlChannel\",\n \"InMemoryTaskQueue\",\n \"LogManager\",\n \"MySqlTraceTransport\",\n \"NoOpTraceTransport\",\n \"RuntimeManager\",\n \"ServiceContainer\",\n \"TraceContext\",\n \"TraceContextRecord\",\n \"TraceLogMessage\",\n \"TraceService\",\n \"TraceTransport\",\n \"StepResult\",\n \"Worker\",\n \"WorkerHealth\",\n \"WorkerStatus\",\n \"WorkflowContext\",\n \"WorkflowDefinition\",\n \"WorkflowEngine\",\n \"WorkflowEngineHooks\",\n \"WorkflowNode\",\n \"WorkflowRuntimeFactory\",\n \"WorkflowStep\",\n \"WorkerSupervisor\",\n]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/__init__.py:1-69", + "span_start": 1, + "span_end": 69, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "def test_trace_service_writes_contexts_and_messages() -> None:\n from app_runtime.tracing.service import TraceService\n\n transport = RecordingTransport()\n manager = TraceService(transport=transport)\n\n with manager.open_context(alias=\"worker\", kind=\"worker\", attrs={\"routine\": \"incoming\"}):\n manager.step(\"parse\")\n manager.info(\"started\", status=\"ok\", attrs={\"attempt\": 1})\n\n assert len(transport.contexts) == 1\n assert len(transport.messages) == 1\n assert transport.contexts[0].alias == \"worker\"\n assert transport.messages[0].step == \"parse\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_runtime.py:test_trace_service_writes_contexts_and_messages", + "span_start": 246, + "span_end": 259, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 9, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "def test_trace_service_supports_debug_warning_and_error_levels() -> None:\n from app_runtime.tracing.service import TraceService\n\n transport = RecordingTransport()\n manager = TraceService(transport=transport)\n\n with manager.open_context(alias=\"worker\", kind=\"worker\", attrs={\"routine\": \"incoming\"}):\n manager.step(\"validate\")\n manager.debug(\"validation details\", attrs={\"rule\": \"basic\"})\n manager.warning(\"validation warning\", status=\"degraded\", attrs={\"attempt\": 1})\n manager.error(\"integration failed\", status=\"failed\", attrs={\"integration\": \"crm\"})\n manager.exception(\"caught exception\", attrs={\"exception_type\": \"RuntimeError\"})\n\n levels = [message.level for message in transport.messages]\n assert levels == [\"DEBUG\", \"WARNING\", \"ERROR\", \"ERROR\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_runtime.py:test_trace_service_supports_debug_warning_and_error_levels", + "span_start": 262, + "span_end": 276, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 10, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceManager(TraceService):\n \"\"\"Compatibility alias during the transition from ConfigManager-shaped naming.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/tracing/service.py:TraceManager", + "span_start": 169, + "span_end": 170, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 2, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceService(TraceContextFactory):\n def __init__(self, transport: TraceTransport | None = None, store: TraceContextStore | None = None) -> None:\n self.transport = transport or NoOpTraceTransport()\n self.store = store or TraceContextStore()\n self._writer = TraceRecordWriter(self.transport)\n\n def create_context(\n self,\n *,\n alias: str,\n parent_id: str | None = None,\n kind: str | None = None,\n attrs: dict[str, Any] | None = None,\n ) -> str:\n record = TraceContextRecord(\n trace_id=uuid4().hex,\n alias=str(alias or \"\"),\n parent_id=parent_id,\n type=kind,\n event_time=utc_now(),\n attrs=dict(attrs or {}),\n )\n self.store.push(record)\n self._writer.write_context(record)\n return record.trace_id\n\n @contextmanager\n def open_context(\n self,\n *,\n alias: str,\n parent_id: str | None = None,\n kind: str | None = None,\n attrs: dict[str, Any] | None = None,\n ) -> Iterator[str]:\n trace_id = self.create_context(alias=alias, parent_id=parent_id, kind=kind, attrs=attrs)\n try:\n yield trace_id\n finally:\n self.store.pop()\n\n def current_trace_id(self) -> str | None:\n return self.store.current_trace_id()\n\n def close_context(self) -> str | None:\n previous = self.store.pop()\n return previous.record.trace_id if previous else None\n\n def step(self, name: str) -> None:\n self.store.set_step(str(name or \"\"))\n\n def info(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"INFO\", message, status, attrs)\n\n def debug(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"DEBUG\", message, status, attrs)\n\n def warning(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"WARNING\", message, status, attrs)\n\n def error(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"ERROR\", message, status, attrs)\n\n def exception(self, message: str, *, status: str = \"failed\", attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"ERROR\", message, status, attrs)\n\n def new_root(self, operation: str) -> TraceContext:\n trace_id = self.create_context(alias=operation, kind=\"operation\", attrs={\"operation\": operation})\n return TraceContext(trace_id=trace_id, span_id=trace_id, attributes={\"operation\": operation})\n\n def child_of(self, parent: TraceContext, operation: str) -> TraceContext:\n trace_id = self.create_context(\n alias=operation,\n parent_id=parent.trace_id,\n kind=\"worker\",\n attrs={\"operation\": operation},\n )\n return TraceContext(\n trace_id=trace_id,\n span_id=trace_id,\n parent_span_id=parent.span_id,\n attributes={\"operation\": operation},\n )\n\n def attach(self, metadata: dict[str, object], context: TraceContext) -> dict[str, object]:\n updated = dict(metadata)\n updated[\"trace_id\"] = context.trace_id\n updated[\"span_id\"] = context.span_id\n updated[\"parent_span_id\"] = context.parent_span_id\n return updated\n\n def resume(self, metadata: dict[str, object], operation: str) -> TraceContext:\n trace_id = str(metadata.get(\"trace_id\") or uuid4().hex)\n span_id = str(metadata.get(\"span_id\") or trace_id)\n parent_id = metadata.get(\"parent_span_id\")\n self.create_context(\n alias=operation,\n parent_id=str(parent_id) if parent_id else None,\n kind=\"worker\",\n attrs=dict(metadata),\n )\n return TraceContext(\n trace_id=trace_id,\n span_id=span_id,\n parent_span_id=str(parent_id) if parent_id else None,\n attributes={\"operation\": operation},\n )\n\n def _write_message(\n self,\n level: TraceLevel,\n message: str,\n status: str | None,\n attrs: dict[str, Any] | None,\n ) -> None:\n active = self.store.current()\n if active is None:\n raise RuntimeError(\"Trace context is not bound. Call create_context() first.\")\n record = TraceLogMessage(\n trace_id=active.record.trace_id,\n step=active.step,\n status=str(status or \"\"),\n message=str(message or \"\"),\n level=level,\n event_time=utc_now(),\n attrs=dict(attrs or {}),\n )\n self._writer.write_message(record)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/tracing/service.py:TraceService", + "span_start": 39, + "span_end": 166, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/__init__.py", + "content": "__all__: list[str] = []", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/__init__.py:1-1", + "span_start": 1, + "span_end": 1, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.__init__", + "is_test": false, + "blob_sha": "8eea9df4f6d7b38ca0e39ccc27b04700e3d08dbeec8046d613d22706d19985fa", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "retrieval_report": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "vector", + "C2_DEPENDENCY_GRAPH": "vector", + "C0_SOURCE_CHUNKS": "vector" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C0_SOURCE_CHUNKS": 10 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [] + } + }, + "fallback": { + "used": false, + "reason": null + }, + "retrieval_by_layer_ms": { + "C1_SYMBOL_CATALOG": 26, + "C2_DEPENDENCY_GRAPH": 67, + "C0_SOURCE_CHUNKS": 57 + } + } + }, + "diagnostics": { + "intent_correct": null, + "target_found": true, + "layers_used": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "retrieval_sufficient": true, + "answer_mode": "normal", + "router_result": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "FIND_TESTS", + "path_scope": [], + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "symbol_resolution_status": "pending" + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Где тесты для TraceService?", + "sub_intent": "FIND_TESTS", + "path_scope": [], + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 6, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 10, + "empty": false, + "fallback_used": false + } + ], + "empty_layers": [], + "evidence_gate_decision": { + "sufficient": true, + "failure_reasons": [], + "evidence_count": 24 + }, + "failure_reasons": [], + "timings_ms": {} + }, + "rag_rows": [ + { + "path": "src/plba/__init__.py", + "content": "const TraceService\nTraceService = plba.tracing.TraceService", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService", + "span_start": 20, + "span_end": 20, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "259ec03b77b9387ea53f69c77af32791dd29adf6de617ba72dd3f839197342a1", + "qname": "TraceService", + "kind": "const", + "signature": "TraceService = plba.tracing.TraceService", + "parent_symbol_id": null, + "package_or_module": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "const TraceService\nTraceService = app_runtime.tracing.service.TraceService", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService", + "span_start": 14, + "span_end": 14, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "3ccf6212fd7d9730f9df933e2ee7671b65bdae0520577e1a49c6432262842db6", + "qname": "TraceService", + "kind": "const", + "signature": "TraceService = app_runtime.tracing.service.TraceService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/__init__.py", + "content": "const TraceService\nTraceService = app_runtime.tracing.service.TraceService", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService", + "span_start": 2, + "span_end": 2, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "ecd2fab7fa9744b2adca84d3d213f7aadcb7e1da84b9c2764a4ab39c65282b11", + "qname": "TraceService", + "kind": "const", + "signature": "TraceService = app_runtime.tracing.service.TraceService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.tracing.__init__", + "is_test": false, + "blob_sha": "a01dea5f773515aeaae8e6d3431fcb93531a8b577dfa26c2e5db16cd6ae6e4d9", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceService\nTraceService(TraceContextFactory)", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService", + "span_start": 39, + "span_end": 166, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "c2b2b976d99f2c600000b753731b26e0a69adcb4359398b93073590c5d5d04f4", + "qname": "TraceService", + "kind": "class", + "signature": "TraceService(TraceContextFactory)", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/tracing.py", + "content": "const TraceService\nTraceService = app_runtime.tracing.service.TraceService", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService", + "span_start": 1, + "span_end": 1, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "a4556fb3f83c50ea68b94a679786ce802cab7ffd9d7138aad3d6009b2661f425", + "qname": "TraceService", + "kind": "const", + "signature": "TraceService = app_runtime.tracing.service.TraceService", + "parent_symbol_id": null, + "package_or_module": "src.plba.tracing", + "is_test": false, + "blob_sha": "a27e11c716c93c3fcefe6f11b4cc420a6b743e7606606071d7f1aeeccc4e7d45", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "method TraceService.open_context\nopen_context(self)", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService.open_context", + "span_start": 66, + "span_end": 78, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426", + "qname": "TraceService.open_context", + "kind": "method", + "signature": "open_context(self)", + "parent_symbol_id": "TraceService", + "package_or_module": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "method TraceService.create_context\ncreate_context(self)", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService.create_context", + "span_start": 45, + "span_end": 63, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a", + "qname": "TraceService.create_context", + "kind": "method", + "signature": "create_context(self)", + "parent_symbol_id": "TraceService", + "package_or_module": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "method TraceService.current_trace_id\ncurrent_trace_id(self)", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService.current_trace_id", + "span_start": 80, + "span_end": 81, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c", + "qname": "TraceService.current_trace_id", + "kind": "method", + "signature": "current_trace_id(self)", + "parent_symbol_id": "TraceService", + "package_or_module": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.create_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 61, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3b052062067a78aef3302ee1d996897e02a67d1b340397bea4f59fe147c0492a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a", + "dst_ref": "TraceService.create_context", + "resolution": "resolved", + "slice_id": "3b052062067a78aef3302ee1d996897e02a67d1b340397bea4f59fe147c0492a", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.create_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.close_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 84, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "7a9353ef57c9ae5d19b3a0c6ac50fad05e6d21d31bbe1cd1cd07af6332ba6505", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "01e14158dcced7e52d0c8ac84ac7b9a75225c261b6aca6a1d7da802d0994721c", + "dst_ref": "TraceService.close_context", + "resolution": "resolved", + "slice_id": "7a9353ef57c9ae5d19b3a0c6ac50fad05e6d21d31bbe1cd1cd07af6332ba6505", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.close_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "01e14158dcced7e52d0c8ac84ac7b9a75225c261b6aca6a1d7da802d0994721c" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.open_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 78, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a6e13b9ebc4fed84586afd53ed92a4d14757e440873f572b2337d5622ee96031", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426", + "dst_ref": "TraceService.open_context", + "resolution": "resolved", + "slice_id": "a6e13b9ebc4fed84586afd53ed92a4d14757e440873f572b2337d5622ee96031", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.open_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.transport\n -> TraceService.__init__", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 41, + "span_end": 43, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "1e923a93faa05c3c43ca9b19bd047007a8589ccce57d3cc1798ae7f9f200af98", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "dst_ref": "TraceService.__init__", + "resolution": "resolved", + "slice_id": "1e923a93faa05c3c43ca9b19bd047007a8589ccce57d3cc1798ae7f9f200af98", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.transport", + "TraceService.__init__" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.current_trace_id", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 81, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3ea17138634b1190bded77ddb84aa1595124f6519b246f24fc4b02bd62b5cac1", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c", + "dst_ref": "TraceService.current_trace_id", + "resolution": "resolved", + "slice_id": "3ea17138634b1190bded77ddb84aa1595124f6519b246f24fc4b02bd62b5cac1", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.current_trace_id" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.step", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 88, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "9f34c5da9b09fba99df6f6b1bde183a9aeb45111b8218a747c71590c2c9f60f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "c44bfbc66cf747283f30088da3e011a10395031d41e77b74e523c24997f641ca", + "dst_ref": "TraceService.step", + "resolution": "resolved", + "slice_id": "9f34c5da9b09fba99df6f6b1bde183a9aeb45111b8218a747c71590c2c9f60f2", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.step" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "c44bfbc66cf747283f30088da3e011a10395031d41e77b74e523c24997f641ca" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/tracing.py", + "content": "from app_runtime.tracing.service import TraceService\nfrom app_runtime.tracing.transport import MySqlTraceTransport, NoOpTraceTransport\n\n__all__ = [\"MySqlTraceTransport\", \"NoOpTraceTransport\", \"TraceService\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/tracing.py:1-4", + "span_start": 1, + "span_end": 4, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.tracing", + "is_test": false, + "blob_sha": "a27e11c716c93c3fcefe6f11b4cc420a6b743e7606606071d7f1aeeccc4e7d45", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "def test_trace_service_allows_messages_without_status() -> None:\n from app_runtime.tracing.service import TraceService\n\n transport = RecordingTransport()\n manager = TraceService(transport=transport)\n\n with manager.open_context(alias=\"worker\", kind=\"worker\"):\n manager.step(\"optional-status\")\n manager.debug(\"debug without status\")\n manager.info(\"info without status\")\n manager.warning(\"warning without status\")\n manager.error(\"error without status\")\n\n assert [message.status for message in transport.messages] == [\"\", \"\", \"\", \"\"]\n assert all(message.trace_id == transport.contexts[0].trace_id for message in transport.messages)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_runtime.py:test_trace_service_allows_messages_without_status", + "span_start": 279, + "span_end": 293, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 11, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/__init__.py", + "content": "from app_runtime.contracts.trace import TraceContext, TraceContextRecord, TraceLogMessage, TraceTransport\nfrom app_runtime.tracing.service import TraceManager, TraceService\nfrom app_runtime.tracing.store import ActiveTraceContext, TraceContextStore\nfrom app_runtime.tracing.transport import MySqlTraceTransport, NoOpTraceTransport\n\n__all__ = [\n \"ActiveTraceContext\",\n \"MySqlTraceTransport\",\n \"NoOpTraceTransport\",\n \"TraceContext\",\n \"TraceContextRecord\",\n \"TraceContextStore\",\n \"TraceLogMessage\",\n \"TraceManager\",\n \"TraceService\",\n \"TraceTransport\",\n]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/tracing/__init__.py:1-17", + "span_start": 1, + "span_end": 17, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.tracing.__init__", + "is_test": false, + "blob_sha": "a01dea5f773515aeaae8e6d3431fcb93531a8b577dfa26c2e5db16cd6ae6e4d9", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/__init__.py", + "content": "from plba.bootstrap import create_runtime\nfrom plba.config import ConfigFileLoader, FileConfigProvider\nfrom plba.control import ControlActionSet, ControlChannel, ControlPlaneService, HttpControlChannel\nfrom plba.contracts import (\n ApplicationModule,\n ConfigProvider,\n HealthContributor,\n TraceContext,\n TraceContextRecord,\n TraceLogMessage,\n TraceTransport,\n Worker,\n WorkerHealth,\n WorkerStatus,\n)\nfrom plba.core import ConfigurationManager, RuntimeManager, ServiceContainer\nfrom plba.health import HealthRegistry\nfrom plba.logging import LogManager\nfrom plba.queue import InMemoryTaskQueue\nfrom plba.tracing import MySqlTraceTransport, NoOpTraceTransport, TraceService\nfrom plba.workflow import (\n StepResult,\n WorkflowContext,\n WorkflowDefinition,\n WorkflowEngine,\n WorkflowEngineHooks,\n WorkflowNode,\n WorkflowRuntimeFactory,\n WorkflowStep,\n)\nfrom plba.workers import WorkerSupervisor\n\n__all__ = [\n \"ApplicationModule\",\n \"ConfigFileLoader\",\n \"ConfigProvider\",\n \"ConfigurationManager\",\n \"ControlActionSet\",\n \"ControlChannel\",\n \"ControlPlaneService\",\n \"create_runtime\",\n \"FileConfigProvider\",\n \"HealthContributor\",\n \"HealthRegistry\",\n \"HttpControlChannel\",\n \"InMemoryTaskQueue\",\n \"LogManager\",\n \"MySqlTraceTransport\",\n \"NoOpTraceTransport\",\n \"RuntimeManager\",\n \"ServiceContainer\",\n \"TraceContext\",\n \"TraceContextRecord\",\n \"TraceLogMessage\",\n \"TraceService\",\n \"TraceTransport\",\n \"StepResult\",\n \"Worker\",\n \"WorkerHealth\",\n \"WorkerStatus\",\n \"WorkflowContext\",\n \"WorkflowDefinition\",\n \"WorkflowEngine\",\n \"WorkflowEngineHooks\",\n \"WorkflowNode\",\n \"WorkflowRuntimeFactory\",\n \"WorkflowStep\",\n \"WorkerSupervisor\",\n]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/__init__.py:1-69", + "span_start": 1, + "span_end": 69, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "def test_trace_service_writes_contexts_and_messages() -> None:\n from app_runtime.tracing.service import TraceService\n\n transport = RecordingTransport()\n manager = TraceService(transport=transport)\n\n with manager.open_context(alias=\"worker\", kind=\"worker\", attrs={\"routine\": \"incoming\"}):\n manager.step(\"parse\")\n manager.info(\"started\", status=\"ok\", attrs={\"attempt\": 1})\n\n assert len(transport.contexts) == 1\n assert len(transport.messages) == 1\n assert transport.contexts[0].alias == \"worker\"\n assert transport.messages[0].step == \"parse\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_runtime.py:test_trace_service_writes_contexts_and_messages", + "span_start": 246, + "span_end": 259, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 9, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "def test_trace_service_supports_debug_warning_and_error_levels() -> None:\n from app_runtime.tracing.service import TraceService\n\n transport = RecordingTransport()\n manager = TraceService(transport=transport)\n\n with manager.open_context(alias=\"worker\", kind=\"worker\", attrs={\"routine\": \"incoming\"}):\n manager.step(\"validate\")\n manager.debug(\"validation details\", attrs={\"rule\": \"basic\"})\n manager.warning(\"validation warning\", status=\"degraded\", attrs={\"attempt\": 1})\n manager.error(\"integration failed\", status=\"failed\", attrs={\"integration\": \"crm\"})\n manager.exception(\"caught exception\", attrs={\"exception_type\": \"RuntimeError\"})\n\n levels = [message.level for message in transport.messages]\n assert levels == [\"DEBUG\", \"WARNING\", \"ERROR\", \"ERROR\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_runtime.py:test_trace_service_supports_debug_warning_and_error_levels", + "span_start": 262, + "span_end": 276, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 10, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceManager(TraceService):\n \"\"\"Compatibility alias during the transition from ConfigManager-shaped naming.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/tracing/service.py:TraceManager", + "span_start": 169, + "span_end": 170, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 2, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceService(TraceContextFactory):\n def __init__(self, transport: TraceTransport | None = None, store: TraceContextStore | None = None) -> None:\n self.transport = transport or NoOpTraceTransport()\n self.store = store or TraceContextStore()\n self._writer = TraceRecordWriter(self.transport)\n\n def create_context(\n self,\n *,\n alias: str,\n parent_id: str | None = None,\n kind: str | None = None,\n attrs: dict[str, Any] | None = None,\n ) -> str:\n record = TraceContextRecord(\n trace_id=uuid4().hex,\n alias=str(alias or \"\"),\n parent_id=parent_id,\n type=kind,\n event_time=utc_now(),\n attrs=dict(attrs or {}),\n )\n self.store.push(record)\n self._writer.write_context(record)\n return record.trace_id\n\n @contextmanager\n def open_context(\n self,\n *,\n alias: str,\n parent_id: str | None = None,\n kind: str | None = None,\n attrs: dict[str, Any] | None = None,\n ) -> Iterator[str]:\n trace_id = self.create_context(alias=alias, parent_id=parent_id, kind=kind, attrs=attrs)\n try:\n yield trace_id\n finally:\n self.store.pop()\n\n def current_trace_id(self) -> str | None:\n return self.store.current_trace_id()\n\n def close_context(self) -> str | None:\n previous = self.store.pop()\n return previous.record.trace_id if previous else None\n\n def step(self, name: str) -> None:\n self.store.set_step(str(name or \"\"))\n\n def info(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"INFO\", message, status, attrs)\n\n def debug(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"DEBUG\", message, status, attrs)\n\n def warning(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"WARNING\", message, status, attrs)\n\n def error(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"ERROR\", message, status, attrs)\n\n def exception(self, message: str, *, status: str = \"failed\", attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"ERROR\", message, status, attrs)\n\n def new_root(self, operation: str) -> TraceContext:\n trace_id = self.create_context(alias=operation, kind=\"operation\", attrs={\"operation\": operation})\n return TraceContext(trace_id=trace_id, span_id=trace_id, attributes={\"operation\": operation})\n\n def child_of(self, parent: TraceContext, operation: str) -> TraceContext:\n trace_id = self.create_context(\n alias=operation,\n parent_id=parent.trace_id,\n kind=\"worker\",\n attrs={\"operation\": operation},\n )\n return TraceContext(\n trace_id=trace_id,\n span_id=trace_id,\n parent_span_id=parent.span_id,\n attributes={\"operation\": operation},\n )\n\n def attach(self, metadata: dict[str, object], context: TraceContext) -> dict[str, object]:\n updated = dict(metadata)\n updated[\"trace_id\"] = context.trace_id\n updated[\"span_id\"] = context.span_id\n updated[\"parent_span_id\"] = context.parent_span_id\n return updated\n\n def resume(self, metadata: dict[str, object], operation: str) -> TraceContext:\n trace_id = str(metadata.get(\"trace_id\") or uuid4().hex)\n span_id = str(metadata.get(\"span_id\") or trace_id)\n parent_id = metadata.get(\"parent_span_id\")\n self.create_context(\n alias=operation,\n parent_id=str(parent_id) if parent_id else None,\n kind=\"worker\",\n attrs=dict(metadata),\n )\n return TraceContext(\n trace_id=trace_id,\n span_id=span_id,\n parent_span_id=str(parent_id) if parent_id else None,\n attributes={\"operation\": operation},\n )\n\n def _write_message(\n self,\n level: TraceLevel,\n message: str,\n status: str | None,\n attrs: dict[str, Any] | None,\n ) -> None:\n active = self.store.current()\n if active is None:\n raise RuntimeError(\"Trace context is not bound. Call create_context() first.\")\n record = TraceLogMessage(\n trace_id=active.record.trace_id,\n step=active.step,\n status=str(status or \"\"),\n message=str(message or \"\"),\n level=level,\n event_time=utc_now(),\n attrs=dict(attrs or {}),\n )\n self._writer.write_message(record)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/tracing/service.py:TraceService", + "span_start": 39, + "span_end": 166, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/__init__.py", + "content": "__all__: list[str] = []", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/__init__.py:1-1", + "span_start": 1, + "span_end": 1, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.__init__", + "is_test": false, + "blob_sha": "8eea9df4f6d7b38ca0e39ccc27b04700e3d08dbeec8046d613d22706d19985fa", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "validation": { + "passed": true, + "action": "return", + "reasons": [] + } + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-find-tests-trace-service.md b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-find-tests-trace-service.md new file mode 100644 index 0000000..15eb7ce --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-find-tests-trace-service.md @@ -0,0 +1,32 @@ +# plba-v2-find-tests-trace-service + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: agent_runtime +- mode: full_chain +- passed: True + +## Query +Где тесты для TraceService? + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 24, + "llm_answer": "- tests/test_runtime.py:test_trace_service_allows_messages_without_status (line range: 279-293)\n- tests/test_runtime.py:test_trace_service_writes_contexts_and_messages (line range: 246-259)\n- tests/test_runtime.py:test_trace_service_supports_debug_warning_and_error_levels (line range: 262-276)", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "TraceService" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-find-tests-workflow-runtime-factory-negative.json b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-find-tests-workflow-runtime-factory-negative.json new file mode 100644 index 0000000..c6b7e33 --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-find-tests-workflow-runtime-factory-negative.json @@ -0,0 +1,3001 @@ +{ + "case_id": "plba-v2-find-tests-workflow-runtime-factory-negative", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "agent_runtime", + "mode": "full_chain", + "query": "Где тесты для WorkflowRuntimeFactory?", + "actual": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 24, + "llm_answer": "Insufficient evidence for a confident answer. No test candidates found.", + "answer_mode": "degraded", + "path_scope": [], + "symbol_candidates": [ + "WorkflowRuntimeFactory" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "query": "Где тесты для WorkflowRuntimeFactory?", + "router_result": { + "schema_version": "1.1", + "intent": "CODE_QA", + "retrieval_profile": "code", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query_plan": { + "raw": "Где тесты для WorkflowRuntimeFactory?", + "normalized": "Где тесты для WorkflowRuntimeFactory?", + "sub_intent": "FIND_TESTS", + "negations": [], + "expansions": [ + "test", + "unit test", + "WorkflowRuntimeFactory" + ], + "keyword_hints": [ + "WorkflowRuntimeFactory" + ], + "path_hints": [], + "doc_scope_hints": [], + "symbol_candidates": [ + "WorkflowRuntimeFactory" + ], + "symbol_kind_hint": "class", + "anchors": [ + { + "type": "SYMBOL", + "value": "WorkflowRuntimeFactory", + "source": "user_text", + "subtype": null, + "span": { + "start": 14, + "end": 36 + }, + "confidence": 0.88 + }, + { + "type": "KEY_TERM", + "value": "тест", + "source": "user_text", + "subtype": null, + "span": { + "start": 4, + "end": 9 + }, + "confidence": 0.9 + } + ] + }, + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "top_k": 8 + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "top_k": 6 + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 10 + } + ], + "filters": { + "test_policy": "INCLUDE", + "path_scope": [], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "test_file_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "test_symbol_patterns": [ + "test_workflow_runtime_factory", + "TestWorkflowRuntimeFactory", + "WorkflowRuntimeFactory" + ], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + }, + "symbol_resolution": { + "status": "pending", + "resolved_symbol": null, + "alternatives": [ + "WorkflowRuntimeFactory" + ], + "confidence": 0.0 + }, + "evidence_policy": { + "require_def": true, + "require_flow": true, + "require_spec": false, + "allow_answer_without_evidence": false + } + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Где тесты для WorkflowRuntimeFactory?", + "sub_intent": "FIND_TESTS", + "path_scope": [], + "keyword_hints": [ + "WorkflowRuntimeFactory" + ], + "symbol_candidates": [ + "WorkflowRuntimeFactory" + ], + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "top_k": 8 + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "top_k": 6 + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 10 + } + ], + "filters": { + "test_policy": "INCLUDE", + "path_scope": [], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "test_file_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "test_symbol_patterns": [ + "test_workflow_runtime_factory", + "TestWorkflowRuntimeFactory", + "WorkflowRuntimeFactory" + ], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + }, + "query_plan": { + "raw": "Где тесты для WorkflowRuntimeFactory?", + "normalized": "Где тесты для WorkflowRuntimeFactory?", + "sub_intent": "FIND_TESTS", + "negations": [], + "expansions": [ + "test", + "unit test", + "WorkflowRuntimeFactory" + ], + "keyword_hints": [ + "WorkflowRuntimeFactory" + ], + "path_hints": [], + "doc_scope_hints": [], + "symbol_candidates": [ + "WorkflowRuntimeFactory" + ], + "symbol_kind_hint": "class", + "anchors": [ + { + "type": "SYMBOL", + "value": "WorkflowRuntimeFactory", + "source": "user_text", + "subtype": null, + "span": { + "start": 14, + "end": 36 + }, + "confidence": 0.88 + }, + { + "type": "KEY_TERM", + "value": "тест", + "source": "user_text", + "subtype": null, + "span": { + "start": 4, + "end": 9 + }, + "confidence": 0.9 + } + ] + } + }, + "retrieval_result": { + "target_symbol_candidates": [ + "WorkflowRuntimeFactory", + "WorkflowRuntimeFactory.__init__", + "WorkflowRuntimeFactory.create_engine", + "WorkflowPersistence", + "annotations", + "WorkflowEngine" + ], + "resolved_symbol": "WorkflowRuntimeFactory", + "symbol_resolution_status": "resolved", + "file_candidates": [ + "src/plba/__init__.py", + "src/app_runtime/workflow/runtime_factory.py", + "src/plba/workflow.py", + "src/app_runtime/config/__init__.py", + "src/app_runtime/config/providers.py", + "src/app_runtime/contracts/__init__.py", + "src/app_runtime/config/file_loader.py", + "src/app_runtime/contracts/config.py", + "src/app_runtime/contracts/health.py", + "src/app_runtime/contracts/application.py" + ], + "code_chunks": [ + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/plba/__init__.py", + "title": "WorkflowRuntimeFactory", + "content": "const WorkflowRuntimeFactory\nWorkflowRuntimeFactory = plba.workflow.WorkflowRuntimeFactory", + "start_line": 21, + "end_line": 30, + "metadata": { + "symbol_id": "cb7c73db05c2622aac89114bed1cddd1d567de21cfac5c53037c62b1074b25c9", + "qname": "WorkflowRuntimeFactory", + "kind": "const", + "signature": "WorkflowRuntimeFactory = plba.workflow.WorkflowRuntimeFactory", + "parent_symbol_id": null, + "package_or_module": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/workflow/runtime_factory.py", + "title": "WorkflowRuntimeFactory", + "content": "class WorkflowRuntimeFactory\nWorkflowRuntimeFactory", + "start_line": 7, + "end_line": 19, + "metadata": { + "symbol_id": "9da827270329de64ebb426fadaaa5e35145e6666b92c6da186e08bf4b071f458", + "qname": "WorkflowRuntimeFactory", + "kind": "class", + "signature": "WorkflowRuntimeFactory", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.workflow.runtime_factory", + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/plba/workflow.py", + "title": "WorkflowRuntimeFactory", + "content": "const WorkflowRuntimeFactory\nWorkflowRuntimeFactory = app_runtime.workflow.runtime_factory.WorkflowRuntimeFactory", + "start_line": 7, + "end_line": 7, + "metadata": { + "symbol_id": "80865947d1ca709971efe9d68a9ee1f348c1c43d351bf4e1b4a5884d72985b6b", + "qname": "WorkflowRuntimeFactory", + "kind": "const", + "signature": "WorkflowRuntimeFactory = app_runtime.workflow.runtime_factory.WorkflowRuntimeFactory", + "parent_symbol_id": null, + "package_or_module": "src.plba.workflow", + "is_test": false, + "blob_sha": "f227797606042273d1f1798f76846952892eeb9e4e9e6a38fb8a631d7231ff39", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/workflow/runtime_factory.py", + "title": "WorkflowRuntimeFactory.__init__", + "content": "method WorkflowRuntimeFactory.__init__\n__init__(self, connection_factory)", + "start_line": 8, + "end_line": 12, + "metadata": { + "symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "qname": "WorkflowRuntimeFactory.__init__", + "kind": "method", + "signature": "__init__(self, connection_factory)", + "parent_symbol_id": "WorkflowRuntimeFactory", + "package_or_module": "src.app_runtime.workflow.runtime_factory", + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/workflow/runtime_factory.py", + "title": "WorkflowRuntimeFactory.create_engine", + "content": "method WorkflowRuntimeFactory.create_engine\ncreate_engine(self, workflow)", + "start_line": 14, + "end_line": 19, + "metadata": { + "symbol_id": "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333", + "qname": "WorkflowRuntimeFactory.create_engine", + "kind": "method", + "signature": "create_engine(self, workflow)", + "parent_symbol_id": "WorkflowRuntimeFactory", + "package_or_module": "src.app_runtime.workflow.runtime_factory", + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/workflow/runtime_factory.py", + "title": "WorkflowPersistence", + "content": "const WorkflowPersistence\nWorkflowPersistence = app_runtime.workflow.persistence.WorkflowPersistence", + "start_line": 4, + "end_line": 4, + "metadata": { + "symbol_id": "35693d37698e35079400b6a021d46209966ce469d9f77763d1c82d82ef4600b2", + "qname": "WorkflowPersistence", + "kind": "const", + "signature": "WorkflowPersistence = app_runtime.workflow.persistence.WorkflowPersistence", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.workflow.runtime_factory", + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/workflow/runtime_factory.py", + "title": "annotations", + "content": "const annotations\nannotations = __future__.annotations", + "start_line": 1, + "end_line": 1, + "metadata": { + "symbol_id": "e016ec68f9d15d52fe0505774229fafc705c1bf3dfda78845a3db9b032a4441d", + "qname": "annotations", + "kind": "const", + "signature": "annotations = __future__.annotations", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.workflow.runtime_factory", + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/workflow/runtime_factory.py", + "title": "WorkflowEngine", + "content": "const WorkflowEngine\nWorkflowEngine = app_runtime.workflow.engine.workflow_engine.WorkflowEngine", + "start_line": 3, + "end_line": 3, + "metadata": { + "symbol_id": "da4aee8bc7d248177fbc4f892732c6eb08baa6d268c32921a217747143a99fe0", + "qname": "WorkflowEngine", + "kind": "const", + "signature": "WorkflowEngine = app_runtime.workflow.engine.workflow_engine.WorkflowEngine", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.workflow.runtime_factory", + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/workflow/runtime_factory.py", + "title": "WorkflowRuntimeFactory.__init__:dataflow_slice", + "content": "WorkflowRuntimeFactory.__init__\n -> WorkflowRuntimeFactory._hooks\n -> WorkflowRuntimeFactory.create_engine", + "start_line": 11, + "end_line": 19, + "metadata": { + "edge_id": "db6124c75b447e4a0a9ba267bd6d6cdf267b41a733b2843d724dd42ec6f4945d", + "edge_type": "dataflow_slice", + "src_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "src_qname": "WorkflowRuntimeFactory.__init__", + "dst_symbol_id": "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333", + "dst_ref": "WorkflowRuntimeFactory.create_engine", + "resolution": "resolved", + "slice_id": "db6124c75b447e4a0a9ba267bd6d6cdf267b41a733b2843d724dd42ec6f4945d", + "root_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "path_symbols": [ + "WorkflowRuntimeFactory.__init__", + "WorkflowRuntimeFactory._hooks", + "WorkflowRuntimeFactory.create_engine" + ], + "path_symbol_ids": [ + "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/workflow/runtime_factory.py", + "title": "WorkflowRuntimeFactory.__init__:dataflow_slice", + "content": "WorkflowRuntimeFactory.__init__\n -> WorkflowRuntimeFactory._snapshot_sanitizer\n -> WorkflowRuntimeFactory.create_engine", + "start_line": 12, + "end_line": 17, + "metadata": { + "edge_id": "f46f5a871a3800b517b0f94ed2551392629e1d7920bc3e3b5a21e0d8f012b741", + "edge_type": "dataflow_slice", + "src_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "src_qname": "WorkflowRuntimeFactory.__init__", + "dst_symbol_id": "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333", + "dst_ref": "WorkflowRuntimeFactory.create_engine", + "resolution": "resolved", + "slice_id": "f46f5a871a3800b517b0f94ed2551392629e1d7920bc3e3b5a21e0d8f012b741", + "root_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "path_symbols": [ + "WorkflowRuntimeFactory.__init__", + "WorkflowRuntimeFactory._snapshot_sanitizer", + "WorkflowRuntimeFactory.create_engine" + ], + "path_symbol_ids": [ + "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/workflow/runtime_factory.py", + "title": "WorkflowRuntimeFactory.__init__:dataflow_slice", + "content": "WorkflowRuntimeFactory.__init__\n -> WorkflowRuntimeFactory._connection_factory\n -> WorkflowRuntimeFactory.create_engine", + "start_line": 9, + "end_line": 16, + "metadata": { + "edge_id": "543624853400c556d1939007017145281d76b00a694c7d5c4fbb0414ded3434e", + "edge_type": "dataflow_slice", + "src_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "src_qname": "WorkflowRuntimeFactory.__init__", + "dst_symbol_id": "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333", + "dst_ref": "WorkflowRuntimeFactory.create_engine", + "resolution": "resolved", + "slice_id": "543624853400c556d1939007017145281d76b00a694c7d5c4fbb0414ded3434e", + "root_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "path_symbols": [ + "WorkflowRuntimeFactory.__init__", + "WorkflowRuntimeFactory._connection_factory", + "WorkflowRuntimeFactory.create_engine" + ], + "path_symbol_ids": [ + "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/workflow/runtime_factory.py", + "title": "WorkflowRuntimeFactory.__init__:dataflow_slice", + "content": "WorkflowRuntimeFactory.__init__\n -> WorkflowRuntimeFactory._traces\n -> WorkflowRuntimeFactory.create_engine", + "start_line": 10, + "end_line": 19, + "metadata": { + "edge_id": "346cf5ddb4308b8403d27c5b54da8cba298bb0af7dc04c2fe30312ef574103c6", + "edge_type": "dataflow_slice", + "src_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "src_qname": "WorkflowRuntimeFactory.__init__", + "dst_symbol_id": "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333", + "dst_ref": "WorkflowRuntimeFactory.create_engine", + "resolution": "resolved", + "slice_id": "346cf5ddb4308b8403d27c5b54da8cba298bb0af7dc04c2fe30312ef574103c6", + "root_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "path_symbols": [ + "WorkflowRuntimeFactory.__init__", + "WorkflowRuntimeFactory._traces", + "WorkflowRuntimeFactory.create_engine" + ], + "path_symbol_ids": [ + "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/workflow/runtime_factory.py", + "title": "WorkflowRuntimeFactory.__init__:writes_attr", + "content": "WorkflowRuntimeFactory.__init__ writes_attr WorkflowRuntimeFactory._snapshot_sanitizer", + "start_line": 12, + "end_line": 12, + "metadata": { + "edge_id": "de0cb1913ba41f673cfb601cab23cfb2e1044ed3dd8c061aff486075aeb8af20", + "edge_type": "writes_attr", + "src_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "src_qname": "WorkflowRuntimeFactory.__init__", + "dst_symbol_id": null, + "dst_ref": "WorkflowRuntimeFactory._snapshot_sanitizer", + "resolution": "partial", + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/workflow/runtime_factory.py", + "title": "WorkflowRuntimeFactory.create_engine:calls", + "content": "WorkflowRuntimeFactory.create_engine calls WorkflowPersistence.create_default", + "start_line": 15, + "end_line": 18, + "metadata": { + "edge_id": "fa86efb6871092fc88df68295c0d92dbe46253e1afa3246ca62b6da11d4d5569", + "edge_type": "calls", + "src_symbol_id": "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333", + "src_qname": "WorkflowRuntimeFactory.create_engine", + "dst_symbol_id": null, + "dst_ref": "WorkflowPersistence.create_default", + "resolution": "partial", + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/workflow/runtime_factory.py", + "title": "src/app_runtime/workflow/runtime_factory.py:WorkflowRuntimeFactory", + "content": "class WorkflowRuntimeFactory:\n def __init__(self, connection_factory=None, *, traces, hooks=None, snapshot_sanitizer=None) -> None:\n self._connection_factory = connection_factory\n self._traces = traces\n self._hooks = hooks\n self._snapshot_sanitizer = snapshot_sanitizer\n\n def create_engine(self, workflow) -> WorkflowEngine:\n persistence = WorkflowPersistence.create_default(\n self._connection_factory,\n snapshot_sanitizer=self._snapshot_sanitizer,\n )\n return WorkflowEngine(workflow, persistence, traces=self._traces, hooks=self._hooks)", + "start_line": 7, + "end_line": 19, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.workflow.runtime_factory", + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/plba/__init__.py", + "title": "src/plba/__init__.py:1-69", + "content": "from plba.bootstrap import create_runtime\nfrom plba.config import ConfigFileLoader, FileConfigProvider\nfrom plba.control import ControlActionSet, ControlChannel, ControlPlaneService, HttpControlChannel\nfrom plba.contracts import (\n ApplicationModule,\n ConfigProvider,\n HealthContributor,\n TraceContext,\n TraceContextRecord,\n TraceLogMessage,\n TraceTransport,\n Worker,\n WorkerHealth,\n WorkerStatus,\n)\nfrom plba.core import ConfigurationManager, RuntimeManager, ServiceContainer\nfrom plba.health import HealthRegistry\nfrom plba.logging import LogManager\nfrom plba.queue import InMemoryTaskQueue\nfrom plba.tracing import MySqlTraceTransport, NoOpTraceTransport, TraceService\nfrom plba.workflow import (\n StepResult,\n WorkflowContext,\n WorkflowDefinition,\n WorkflowEngine,\n WorkflowEngineHooks,\n WorkflowNode,\n WorkflowRuntimeFactory,\n WorkflowStep,\n)\nfrom plba.workers import WorkerSupervisor\n\n__all__ = [\n \"ApplicationModule\",\n \"ConfigFileLoader\",\n \"ConfigProvider\",\n \"ConfigurationManager\",\n \"ControlActionSet\",\n \"ControlChannel\",\n \"ControlPlaneService\",\n \"create_runtime\",\n \"FileConfigProvider\",\n \"HealthContributor\",\n \"HealthRegistry\",\n \"HttpControlChannel\",\n \"InMemoryTaskQueue\",\n \"LogManager\",\n \"MySqlTraceTransport\",\n \"NoOpTraceTransport\",\n \"RuntimeManager\",\n \"ServiceContainer\",\n \"TraceContext\",\n \"TraceContextRecord\",\n \"TraceLogMessage\",\n \"TraceService\",\n \"TraceTransport\",\n \"StepResult\",\n \"Worker\",\n \"WorkerHealth\",\n \"WorkerStatus\",\n \"WorkflowContext\",\n \"WorkflowDefinition\",\n \"WorkflowEngine\",\n \"WorkflowEngineHooks\",\n \"WorkflowNode\",\n \"WorkflowRuntimeFactory\",\n \"WorkflowStep\",\n \"WorkerSupervisor\",\n]", + "start_line": 1, + "end_line": 69, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/plba/workflow.py", + "title": "src/plba/workflow.py:1-18", + "content": "from app_runtime.workflow.contracts.context import WorkflowContext\nfrom app_runtime.workflow.contracts.result import StepResult\nfrom app_runtime.workflow.contracts.step import WorkflowStep\nfrom app_runtime.workflow.contracts.workflow import WorkflowDefinition, WorkflowNode\nfrom app_runtime.workflow.engine.hooks import WorkflowEngineHooks\nfrom app_runtime.workflow.engine.workflow_engine import WorkflowEngine\nfrom app_runtime.workflow.runtime_factory import WorkflowRuntimeFactory\n\n__all__ = [\n \"StepResult\",\n \"WorkflowContext\",\n \"WorkflowDefinition\",\n \"WorkflowEngine\",\n \"WorkflowEngineHooks\",\n \"WorkflowNode\",\n \"WorkflowRuntimeFactory\",\n \"WorkflowStep\",\n]", + "start_line": 1, + "end_line": 18, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.workflow", + "is_test": false, + "blob_sha": "f227797606042273d1f1798f76846952892eeb9e4e9e6a38fb8a631d7231ff39", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/config/__init__.py", + "title": "src/app_runtime/config/__init__.py:1-4", + "content": "from app_runtime.config.file_loader import ConfigFileLoader\nfrom app_runtime.config.providers import FileConfigProvider\n\n__all__ = [\"ConfigFileLoader\", \"FileConfigProvider\"]", + "start_line": 1, + "end_line": 4, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.config.__init__", + "is_test": false, + "blob_sha": "612918029820a2a983330ec92256142b55b9de4bdf3399ece18e2a02dbad9729", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/config/providers.py", + "title": "src/app_runtime/config/providers.py:FileConfigProvider", + "content": "class FileConfigProvider(ConfigProvider):\n def __init__(self, path: str | Path) -> None:\n self._loader = ConfigFileLoader(path)\n\n @property\n def loader(self) -> ConfigFileLoader:\n return self._loader\n\n def load(self) -> dict[str, Any]:\n config = self._loader.load_sync()\n if not isinstance(config, dict):\n raise TypeError(\"Config root must be a mapping\")\n return dict(config)", + "start_line": 10, + "end_line": 22, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.config.providers", + "is_test": false, + "blob_sha": "8c53ca0122d6df6c5763bca15e99434bb4daebd5a618b8fc927e9ae90b022e64", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/contracts/__init__.py", + "title": "src/app_runtime/__init__.py:1-1", + "content": "__all__: list[str] = []", + "start_line": 1, + "end_line": 1, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.__init__", + "is_test": false, + "blob_sha": "8eea9df4f6d7b38ca0e39ccc27b04700e3d08dbeec8046d613d22706d19985fa", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/config/file_loader.py", + "title": "src/app_runtime/config/file_loader.py:ConfigFileLoader", + "content": "class ConfigFileLoader:\n def __init__(self, path: str | Path) -> None:\n self.path = Path(path)\n self.config: Any = None\n self.last_valid_config: Any = None\n self._last_seen_hash: str | None = None\n\n def read_text(self) -> str:\n return self.path.read_text(encoding=\"utf-8\")\n\n def parse(self, data: str) -> Any:\n suffix = self.path.suffix.lower()\n if suffix in {\".yml\", \".yaml\"}:\n return yaml.safe_load(data)\n return json.loads(data)\n\n def load_sync(self) -> Any:\n data = self.read_text()\n parsed = self.parse(data)\n self.config = parsed\n self.last_valid_config = parsed\n self._last_seen_hash = self._calculate_hash(data)\n return parsed\n\n def load_if_changed(self) -> tuple[bool, Any]:\n data = self.read_text()\n current_hash = self._calculate_hash(data)\n if current_hash == self._last_seen_hash:\n return False, self.config\n parsed = self.parse(data)\n self.config = parsed\n self.last_valid_config = parsed\n self._last_seen_hash = current_hash\n return True, parsed\n\n @staticmethod\n def _calculate_hash(data: str) -> str:\n return hashlib.sha256(data.encode(\"utf-8\")).hexdigest()", + "start_line": 11, + "end_line": 48, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/contracts/config.py", + "title": "src/app_runtime/contracts/config.py:ConfigProvider", + "content": "class ConfigProvider(ABC):\n @abstractmethod\n def load(self) -> dict[str, Any]:\n \"\"\"Return a config fragment.\"\"\"", + "start_line": 7, + "end_line": 10, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.config", + "is_test": false, + "blob_sha": "5e773880267743ee94954ea2db120c2d88c54d4312893293d1b89df405283ed4", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/contracts/health.py", + "title": "src/app_runtime/contracts/health.py:HealthContributor", + "content": "class HealthContributor(ABC):\n @abstractmethod\n def health(self) -> WorkerHealth:\n \"\"\"Return contributor health state.\"\"\"", + "start_line": 7, + "end_line": 10, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.health", + "is_test": false, + "blob_sha": "6bd92611def7131e32d4dd34a8ed85e6cf3c67722ad27797032a632cb30dc097", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/contracts/application.py", + "title": "src/app_runtime/contracts/application.py:ApplicationModule", + "content": "class ApplicationModule(ABC):\n @property\n @abstractmethod\n def name(self) -> str:\n \"\"\"Module name used for runtime status and diagnostics.\"\"\"\n\n @abstractmethod\n def register(self, registry: ModuleRegistry) -> None:\n \"\"\"Register workers, services, and health contributors.\"\"\"", + "start_line": 8, + "end_line": 16, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.application", + "is_test": false, + "blob_sha": "197c35634dca49c352ce3f230295a485fbffb672ce7bb8c08e752bfdf61e7fa4", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "relations": [ + { + "path": "src/app_runtime/workflow/runtime_factory.py", + "metadata": { + "edge_id": "db6124c75b447e4a0a9ba267bd6d6cdf267b41a733b2843d724dd42ec6f4945d", + "edge_type": "dataflow_slice", + "src_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "src_qname": "WorkflowRuntimeFactory.__init__", + "dst_symbol_id": "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333", + "dst_ref": "WorkflowRuntimeFactory.create_engine", + "resolution": "resolved", + "slice_id": "db6124c75b447e4a0a9ba267bd6d6cdf267b41a733b2843d724dd42ec6f4945d", + "root_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "path_symbols": [ + "WorkflowRuntimeFactory.__init__", + "WorkflowRuntimeFactory._hooks", + "WorkflowRuntimeFactory.create_engine" + ], + "path_symbol_ids": [ + "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "WorkflowRuntimeFactory.__init__\n -> WorkflowRuntimeFactory._hooks\n -> WorkflowRuntimeFactory.create_engine" + }, + { + "path": "src/app_runtime/workflow/runtime_factory.py", + "metadata": { + "edge_id": "f46f5a871a3800b517b0f94ed2551392629e1d7920bc3e3b5a21e0d8f012b741", + "edge_type": "dataflow_slice", + "src_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "src_qname": "WorkflowRuntimeFactory.__init__", + "dst_symbol_id": "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333", + "dst_ref": "WorkflowRuntimeFactory.create_engine", + "resolution": "resolved", + "slice_id": "f46f5a871a3800b517b0f94ed2551392629e1d7920bc3e3b5a21e0d8f012b741", + "root_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "path_symbols": [ + "WorkflowRuntimeFactory.__init__", + "WorkflowRuntimeFactory._snapshot_sanitizer", + "WorkflowRuntimeFactory.create_engine" + ], + "path_symbol_ids": [ + "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "WorkflowRuntimeFactory.__init__\n -> WorkflowRuntimeFactory._snapshot_sanitizer\n -> WorkflowRuntimeFactory.create_engine" + }, + { + "path": "src/app_runtime/workflow/runtime_factory.py", + "metadata": { + "edge_id": "543624853400c556d1939007017145281d76b00a694c7d5c4fbb0414ded3434e", + "edge_type": "dataflow_slice", + "src_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "src_qname": "WorkflowRuntimeFactory.__init__", + "dst_symbol_id": "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333", + "dst_ref": "WorkflowRuntimeFactory.create_engine", + "resolution": "resolved", + "slice_id": "543624853400c556d1939007017145281d76b00a694c7d5c4fbb0414ded3434e", + "root_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "path_symbols": [ + "WorkflowRuntimeFactory.__init__", + "WorkflowRuntimeFactory._connection_factory", + "WorkflowRuntimeFactory.create_engine" + ], + "path_symbol_ids": [ + "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "WorkflowRuntimeFactory.__init__\n -> WorkflowRuntimeFactory._connection_factory\n -> WorkflowRuntimeFactory.create_engine" + }, + { + "path": "src/app_runtime/workflow/runtime_factory.py", + "metadata": { + "edge_id": "346cf5ddb4308b8403d27c5b54da8cba298bb0af7dc04c2fe30312ef574103c6", + "edge_type": "dataflow_slice", + "src_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "src_qname": "WorkflowRuntimeFactory.__init__", + "dst_symbol_id": "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333", + "dst_ref": "WorkflowRuntimeFactory.create_engine", + "resolution": "resolved", + "slice_id": "346cf5ddb4308b8403d27c5b54da8cba298bb0af7dc04c2fe30312ef574103c6", + "root_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "path_symbols": [ + "WorkflowRuntimeFactory.__init__", + "WorkflowRuntimeFactory._traces", + "WorkflowRuntimeFactory.create_engine" + ], + "path_symbol_ids": [ + "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "WorkflowRuntimeFactory.__init__\n -> WorkflowRuntimeFactory._traces\n -> WorkflowRuntimeFactory.create_engine" + }, + { + "path": "src/app_runtime/workflow/runtime_factory.py", + "metadata": { + "edge_id": "de0cb1913ba41f673cfb601cab23cfb2e1044ed3dd8c061aff486075aeb8af20", + "edge_type": "writes_attr", + "src_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "src_qname": "WorkflowRuntimeFactory.__init__", + "dst_symbol_id": null, + "dst_ref": "WorkflowRuntimeFactory._snapshot_sanitizer", + "resolution": "partial", + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "WorkflowRuntimeFactory.__init__ writes_attr WorkflowRuntimeFactory._snapshot_sanitizer" + }, + { + "path": "src/app_runtime/workflow/runtime_factory.py", + "metadata": { + "edge_id": "fa86efb6871092fc88df68295c0d92dbe46253e1afa3246ca62b6da11d4d5569", + "edge_type": "calls", + "src_symbol_id": "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333", + "src_qname": "WorkflowRuntimeFactory.create_engine", + "dst_symbol_id": null, + "dst_ref": "WorkflowPersistence.create_default", + "resolution": "partial", + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "WorkflowRuntimeFactory.create_engine calls WorkflowPersistence.create_default" + } + ], + "entrypoints": [], + "test_candidates": [], + "layer_outcomes": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 6, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 10, + "empty": false, + "fallback_used": false + } + ], + "missing_layers": [], + "raw_rows": [ + { + "path": "src/plba/__init__.py", + "content": "const WorkflowRuntimeFactory\nWorkflowRuntimeFactory = plba.workflow.WorkflowRuntimeFactory", + "layer": "C1_SYMBOL_CATALOG", + "title": "WorkflowRuntimeFactory", + "span_start": 21, + "span_end": 30, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "cb7c73db05c2622aac89114bed1cddd1d567de21cfac5c53037c62b1074b25c9", + "qname": "WorkflowRuntimeFactory", + "kind": "const", + "signature": "WorkflowRuntimeFactory = plba.workflow.WorkflowRuntimeFactory", + "parent_symbol_id": null, + "package_or_module": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/runtime_factory.py", + "content": "class WorkflowRuntimeFactory\nWorkflowRuntimeFactory", + "layer": "C1_SYMBOL_CATALOG", + "title": "WorkflowRuntimeFactory", + "span_start": 7, + "span_end": 19, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "9da827270329de64ebb426fadaaa5e35145e6666b92c6da186e08bf4b071f458", + "qname": "WorkflowRuntimeFactory", + "kind": "class", + "signature": "WorkflowRuntimeFactory", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.workflow.runtime_factory", + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/workflow.py", + "content": "const WorkflowRuntimeFactory\nWorkflowRuntimeFactory = app_runtime.workflow.runtime_factory.WorkflowRuntimeFactory", + "layer": "C1_SYMBOL_CATALOG", + "title": "WorkflowRuntimeFactory", + "span_start": 7, + "span_end": 7, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "80865947d1ca709971efe9d68a9ee1f348c1c43d351bf4e1b4a5884d72985b6b", + "qname": "WorkflowRuntimeFactory", + "kind": "const", + "signature": "WorkflowRuntimeFactory = app_runtime.workflow.runtime_factory.WorkflowRuntimeFactory", + "parent_symbol_id": null, + "package_or_module": "src.plba.workflow", + "is_test": false, + "blob_sha": "f227797606042273d1f1798f76846952892eeb9e4e9e6a38fb8a631d7231ff39", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/runtime_factory.py", + "content": "method WorkflowRuntimeFactory.__init__\n__init__(self, connection_factory)", + "layer": "C1_SYMBOL_CATALOG", + "title": "WorkflowRuntimeFactory.__init__", + "span_start": 8, + "span_end": 12, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "qname": "WorkflowRuntimeFactory.__init__", + "kind": "method", + "signature": "__init__(self, connection_factory)", + "parent_symbol_id": "WorkflowRuntimeFactory", + "package_or_module": "src.app_runtime.workflow.runtime_factory", + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/runtime_factory.py", + "content": "method WorkflowRuntimeFactory.create_engine\ncreate_engine(self, workflow)", + "layer": "C1_SYMBOL_CATALOG", + "title": "WorkflowRuntimeFactory.create_engine", + "span_start": 14, + "span_end": 19, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333", + "qname": "WorkflowRuntimeFactory.create_engine", + "kind": "method", + "signature": "create_engine(self, workflow)", + "parent_symbol_id": "WorkflowRuntimeFactory", + "package_or_module": "src.app_runtime.workflow.runtime_factory", + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/runtime_factory.py", + "content": "const WorkflowPersistence\nWorkflowPersistence = app_runtime.workflow.persistence.WorkflowPersistence", + "layer": "C1_SYMBOL_CATALOG", + "title": "WorkflowPersistence", + "span_start": 4, + "span_end": 4, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "35693d37698e35079400b6a021d46209966ce469d9f77763d1c82d82ef4600b2", + "qname": "WorkflowPersistence", + "kind": "const", + "signature": "WorkflowPersistence = app_runtime.workflow.persistence.WorkflowPersistence", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.workflow.runtime_factory", + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/runtime_factory.py", + "content": "const annotations\nannotations = __future__.annotations", + "layer": "C1_SYMBOL_CATALOG", + "title": "annotations", + "span_start": 1, + "span_end": 1, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "e016ec68f9d15d52fe0505774229fafc705c1bf3dfda78845a3db9b032a4441d", + "qname": "annotations", + "kind": "const", + "signature": "annotations = __future__.annotations", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.workflow.runtime_factory", + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/runtime_factory.py", + "content": "const WorkflowEngine\nWorkflowEngine = app_runtime.workflow.engine.workflow_engine.WorkflowEngine", + "layer": "C1_SYMBOL_CATALOG", + "title": "WorkflowEngine", + "span_start": 3, + "span_end": 3, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "da4aee8bc7d248177fbc4f892732c6eb08baa6d268c32921a217747143a99fe0", + "qname": "WorkflowEngine", + "kind": "const", + "signature": "WorkflowEngine = app_runtime.workflow.engine.workflow_engine.WorkflowEngine", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.workflow.runtime_factory", + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/runtime_factory.py", + "content": "WorkflowRuntimeFactory.__init__\n -> WorkflowRuntimeFactory._hooks\n -> WorkflowRuntimeFactory.create_engine", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowRuntimeFactory.__init__:dataflow_slice", + "span_start": 11, + "span_end": 19, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "db6124c75b447e4a0a9ba267bd6d6cdf267b41a733b2843d724dd42ec6f4945d", + "edge_type": "dataflow_slice", + "src_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "src_qname": "WorkflowRuntimeFactory.__init__", + "dst_symbol_id": "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333", + "dst_ref": "WorkflowRuntimeFactory.create_engine", + "resolution": "resolved", + "slice_id": "db6124c75b447e4a0a9ba267bd6d6cdf267b41a733b2843d724dd42ec6f4945d", + "root_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "path_symbols": [ + "WorkflowRuntimeFactory.__init__", + "WorkflowRuntimeFactory._hooks", + "WorkflowRuntimeFactory.create_engine" + ], + "path_symbol_ids": [ + "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/runtime_factory.py", + "content": "WorkflowRuntimeFactory.__init__\n -> WorkflowRuntimeFactory._snapshot_sanitizer\n -> WorkflowRuntimeFactory.create_engine", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowRuntimeFactory.__init__:dataflow_slice", + "span_start": 12, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "f46f5a871a3800b517b0f94ed2551392629e1d7920bc3e3b5a21e0d8f012b741", + "edge_type": "dataflow_slice", + "src_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "src_qname": "WorkflowRuntimeFactory.__init__", + "dst_symbol_id": "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333", + "dst_ref": "WorkflowRuntimeFactory.create_engine", + "resolution": "resolved", + "slice_id": "f46f5a871a3800b517b0f94ed2551392629e1d7920bc3e3b5a21e0d8f012b741", + "root_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "path_symbols": [ + "WorkflowRuntimeFactory.__init__", + "WorkflowRuntimeFactory._snapshot_sanitizer", + "WorkflowRuntimeFactory.create_engine" + ], + "path_symbol_ids": [ + "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/runtime_factory.py", + "content": "WorkflowRuntimeFactory.__init__\n -> WorkflowRuntimeFactory._connection_factory\n -> WorkflowRuntimeFactory.create_engine", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowRuntimeFactory.__init__:dataflow_slice", + "span_start": 9, + "span_end": 16, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "543624853400c556d1939007017145281d76b00a694c7d5c4fbb0414ded3434e", + "edge_type": "dataflow_slice", + "src_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "src_qname": "WorkflowRuntimeFactory.__init__", + "dst_symbol_id": "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333", + "dst_ref": "WorkflowRuntimeFactory.create_engine", + "resolution": "resolved", + "slice_id": "543624853400c556d1939007017145281d76b00a694c7d5c4fbb0414ded3434e", + "root_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "path_symbols": [ + "WorkflowRuntimeFactory.__init__", + "WorkflowRuntimeFactory._connection_factory", + "WorkflowRuntimeFactory.create_engine" + ], + "path_symbol_ids": [ + "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/runtime_factory.py", + "content": "WorkflowRuntimeFactory.__init__\n -> WorkflowRuntimeFactory._traces\n -> WorkflowRuntimeFactory.create_engine", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowRuntimeFactory.__init__:dataflow_slice", + "span_start": 10, + "span_end": 19, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "346cf5ddb4308b8403d27c5b54da8cba298bb0af7dc04c2fe30312ef574103c6", + "edge_type": "dataflow_slice", + "src_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "src_qname": "WorkflowRuntimeFactory.__init__", + "dst_symbol_id": "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333", + "dst_ref": "WorkflowRuntimeFactory.create_engine", + "resolution": "resolved", + "slice_id": "346cf5ddb4308b8403d27c5b54da8cba298bb0af7dc04c2fe30312ef574103c6", + "root_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "path_symbols": [ + "WorkflowRuntimeFactory.__init__", + "WorkflowRuntimeFactory._traces", + "WorkflowRuntimeFactory.create_engine" + ], + "path_symbol_ids": [ + "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/runtime_factory.py", + "content": "WorkflowRuntimeFactory.__init__ writes_attr WorkflowRuntimeFactory._snapshot_sanitizer", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowRuntimeFactory.__init__:writes_attr", + "span_start": 12, + "span_end": 12, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "de0cb1913ba41f673cfb601cab23cfb2e1044ed3dd8c061aff486075aeb8af20", + "edge_type": "writes_attr", + "src_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "src_qname": "WorkflowRuntimeFactory.__init__", + "dst_symbol_id": null, + "dst_ref": "WorkflowRuntimeFactory._snapshot_sanitizer", + "resolution": "partial", + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/runtime_factory.py", + "content": "WorkflowRuntimeFactory.create_engine calls WorkflowPersistence.create_default", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowRuntimeFactory.create_engine:calls", + "span_start": 15, + "span_end": 18, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "fa86efb6871092fc88df68295c0d92dbe46253e1afa3246ca62b6da11d4d5569", + "edge_type": "calls", + "src_symbol_id": "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333", + "src_qname": "WorkflowRuntimeFactory.create_engine", + "dst_symbol_id": null, + "dst_ref": "WorkflowPersistence.create_default", + "resolution": "partial", + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/runtime_factory.py", + "content": "class WorkflowRuntimeFactory:\n def __init__(self, connection_factory=None, *, traces, hooks=None, snapshot_sanitizer=None) -> None:\n self._connection_factory = connection_factory\n self._traces = traces\n self._hooks = hooks\n self._snapshot_sanitizer = snapshot_sanitizer\n\n def create_engine(self, workflow) -> WorkflowEngine:\n persistence = WorkflowPersistence.create_default(\n self._connection_factory,\n snapshot_sanitizer=self._snapshot_sanitizer,\n )\n return WorkflowEngine(workflow, persistence, traces=self._traces, hooks=self._hooks)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/workflow/runtime_factory.py:WorkflowRuntimeFactory", + "span_start": 7, + "span_end": 19, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.workflow.runtime_factory", + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/__init__.py", + "content": "from plba.bootstrap import create_runtime\nfrom plba.config import ConfigFileLoader, FileConfigProvider\nfrom plba.control import ControlActionSet, ControlChannel, ControlPlaneService, HttpControlChannel\nfrom plba.contracts import (\n ApplicationModule,\n ConfigProvider,\n HealthContributor,\n TraceContext,\n TraceContextRecord,\n TraceLogMessage,\n TraceTransport,\n Worker,\n WorkerHealth,\n WorkerStatus,\n)\nfrom plba.core import ConfigurationManager, RuntimeManager, ServiceContainer\nfrom plba.health import HealthRegistry\nfrom plba.logging import LogManager\nfrom plba.queue import InMemoryTaskQueue\nfrom plba.tracing import MySqlTraceTransport, NoOpTraceTransport, TraceService\nfrom plba.workflow import (\n StepResult,\n WorkflowContext,\n WorkflowDefinition,\n WorkflowEngine,\n WorkflowEngineHooks,\n WorkflowNode,\n WorkflowRuntimeFactory,\n WorkflowStep,\n)\nfrom plba.workers import WorkerSupervisor\n\n__all__ = [\n \"ApplicationModule\",\n \"ConfigFileLoader\",\n \"ConfigProvider\",\n \"ConfigurationManager\",\n \"ControlActionSet\",\n \"ControlChannel\",\n \"ControlPlaneService\",\n \"create_runtime\",\n \"FileConfigProvider\",\n \"HealthContributor\",\n \"HealthRegistry\",\n \"HttpControlChannel\",\n \"InMemoryTaskQueue\",\n \"LogManager\",\n \"MySqlTraceTransport\",\n \"NoOpTraceTransport\",\n \"RuntimeManager\",\n \"ServiceContainer\",\n \"TraceContext\",\n \"TraceContextRecord\",\n \"TraceLogMessage\",\n \"TraceService\",\n \"TraceTransport\",\n \"StepResult\",\n \"Worker\",\n \"WorkerHealth\",\n \"WorkerStatus\",\n \"WorkflowContext\",\n \"WorkflowDefinition\",\n \"WorkflowEngine\",\n \"WorkflowEngineHooks\",\n \"WorkflowNode\",\n \"WorkflowRuntimeFactory\",\n \"WorkflowStep\",\n \"WorkerSupervisor\",\n]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/__init__.py:1-69", + "span_start": 1, + "span_end": 69, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/workflow.py", + "content": "from app_runtime.workflow.contracts.context import WorkflowContext\nfrom app_runtime.workflow.contracts.result import StepResult\nfrom app_runtime.workflow.contracts.step import WorkflowStep\nfrom app_runtime.workflow.contracts.workflow import WorkflowDefinition, WorkflowNode\nfrom app_runtime.workflow.engine.hooks import WorkflowEngineHooks\nfrom app_runtime.workflow.engine.workflow_engine import WorkflowEngine\nfrom app_runtime.workflow.runtime_factory import WorkflowRuntimeFactory\n\n__all__ = [\n \"StepResult\",\n \"WorkflowContext\",\n \"WorkflowDefinition\",\n \"WorkflowEngine\",\n \"WorkflowEngineHooks\",\n \"WorkflowNode\",\n \"WorkflowRuntimeFactory\",\n \"WorkflowStep\",\n]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/workflow.py:1-18", + "span_start": 1, + "span_end": 18, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.workflow", + "is_test": false, + "blob_sha": "f227797606042273d1f1798f76846952892eeb9e4e9e6a38fb8a631d7231ff39", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/__init__.py", + "content": "from app_runtime.config.file_loader import ConfigFileLoader\nfrom app_runtime.config.providers import FileConfigProvider\n\n__all__ = [\"ConfigFileLoader\", \"FileConfigProvider\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/config/__init__.py:1-4", + "span_start": 1, + "span_end": 4, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.config.__init__", + "is_test": false, + "blob_sha": "612918029820a2a983330ec92256142b55b9de4bdf3399ece18e2a02dbad9729", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/providers.py", + "content": "class FileConfigProvider(ConfigProvider):\n def __init__(self, path: str | Path) -> None:\n self._loader = ConfigFileLoader(path)\n\n @property\n def loader(self) -> ConfigFileLoader:\n return self._loader\n\n def load(self) -> dict[str, Any]:\n config = self._loader.load_sync()\n if not isinstance(config, dict):\n raise TypeError(\"Config root must be a mapping\")\n return dict(config)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/config/providers.py:FileConfigProvider", + "span_start": 10, + "span_end": 22, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.config.providers", + "is_test": false, + "blob_sha": "8c53ca0122d6df6c5763bca15e99434bb4daebd5a618b8fc927e9ae90b022e64", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/__init__.py", + "content": "__all__: list[str] = []", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/__init__.py:1-1", + "span_start": 1, + "span_end": 1, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.__init__", + "is_test": false, + "blob_sha": "8eea9df4f6d7b38ca0e39ccc27b04700e3d08dbeec8046d613d22706d19985fa", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "class ConfigFileLoader:\n def __init__(self, path: str | Path) -> None:\n self.path = Path(path)\n self.config: Any = None\n self.last_valid_config: Any = None\n self._last_seen_hash: str | None = None\n\n def read_text(self) -> str:\n return self.path.read_text(encoding=\"utf-8\")\n\n def parse(self, data: str) -> Any:\n suffix = self.path.suffix.lower()\n if suffix in {\".yml\", \".yaml\"}:\n return yaml.safe_load(data)\n return json.loads(data)\n\n def load_sync(self) -> Any:\n data = self.read_text()\n parsed = self.parse(data)\n self.config = parsed\n self.last_valid_config = parsed\n self._last_seen_hash = self._calculate_hash(data)\n return parsed\n\n def load_if_changed(self) -> tuple[bool, Any]:\n data = self.read_text()\n current_hash = self._calculate_hash(data)\n if current_hash == self._last_seen_hash:\n return False, self.config\n parsed = self.parse(data)\n self.config = parsed\n self.last_valid_config = parsed\n self._last_seen_hash = current_hash\n return True, parsed\n\n @staticmethod\n def _calculate_hash(data: str) -> str:\n return hashlib.sha256(data.encode(\"utf-8\")).hexdigest()", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/config/file_loader.py:ConfigFileLoader", + "span_start": 11, + "span_end": 48, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/config.py", + "content": "class ConfigProvider(ABC):\n @abstractmethod\n def load(self) -> dict[str, Any]:\n \"\"\"Return a config fragment.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/contracts/config.py:ConfigProvider", + "span_start": 7, + "span_end": 10, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.config", + "is_test": false, + "blob_sha": "5e773880267743ee94954ea2db120c2d88c54d4312893293d1b89df405283ed4", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/health.py", + "content": "class HealthContributor(ABC):\n @abstractmethod\n def health(self) -> WorkerHealth:\n \"\"\"Return contributor health state.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/contracts/health.py:HealthContributor", + "span_start": 7, + "span_end": 10, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.health", + "is_test": false, + "blob_sha": "6bd92611def7131e32d4dd34a8ed85e6cf3c67722ad27797032a632cb30dc097", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/application.py", + "content": "class ApplicationModule(ABC):\n @property\n @abstractmethod\n def name(self) -> str:\n \"\"\"Module name used for runtime status and diagnostics.\"\"\"\n\n @abstractmethod\n def register(self, registry: ModuleRegistry) -> None:\n \"\"\"Register workers, services, and health contributors.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/contracts/application.py:ApplicationModule", + "span_start": 8, + "span_end": 16, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.application", + "is_test": false, + "blob_sha": "197c35634dca49c352ce3f230295a485fbffb672ce7bb8c08e752bfdf61e7fa4", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "retrieval_report": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "vector", + "C2_DEPENDENCY_GRAPH": "vector", + "C0_SOURCE_CHUNKS": "vector" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C0_SOURCE_CHUNKS": 10 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [] + } + }, + "fallback": { + "used": false, + "reason": null + }, + "retrieval_by_layer_ms": { + "C1_SYMBOL_CATALOG": 37, + "C2_DEPENDENCY_GRAPH": 31, + "C0_SOURCE_CHUNKS": 11 + } + } + }, + "diagnostics": { + "intent_correct": null, + "target_found": true, + "layers_used": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "retrieval_sufficient": false, + "answer_mode": "degraded", + "router_result": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "FIND_TESTS", + "path_scope": [], + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "symbol_resolution_status": "pending" + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Где тесты для WorkflowRuntimeFactory?", + "sub_intent": "FIND_TESTS", + "path_scope": [], + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 6, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 10, + "empty": false, + "fallback_used": false + } + ], + "empty_layers": [], + "evidence_gate_decision": { + "sufficient": false, + "failure_reasons": [ + "tests_not_found" + ], + "evidence_count": 24 + }, + "failure_reasons": [ + "tests_not_found" + ], + "timings_ms": {} + }, + "rag_rows": [ + { + "path": "src/plba/__init__.py", + "content": "const WorkflowRuntimeFactory\nWorkflowRuntimeFactory = plba.workflow.WorkflowRuntimeFactory", + "layer": "C1_SYMBOL_CATALOG", + "title": "WorkflowRuntimeFactory", + "span_start": 21, + "span_end": 30, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "cb7c73db05c2622aac89114bed1cddd1d567de21cfac5c53037c62b1074b25c9", + "qname": "WorkflowRuntimeFactory", + "kind": "const", + "signature": "WorkflowRuntimeFactory = plba.workflow.WorkflowRuntimeFactory", + "parent_symbol_id": null, + "package_or_module": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/runtime_factory.py", + "content": "class WorkflowRuntimeFactory\nWorkflowRuntimeFactory", + "layer": "C1_SYMBOL_CATALOG", + "title": "WorkflowRuntimeFactory", + "span_start": 7, + "span_end": 19, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "9da827270329de64ebb426fadaaa5e35145e6666b92c6da186e08bf4b071f458", + "qname": "WorkflowRuntimeFactory", + "kind": "class", + "signature": "WorkflowRuntimeFactory", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.workflow.runtime_factory", + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/workflow.py", + "content": "const WorkflowRuntimeFactory\nWorkflowRuntimeFactory = app_runtime.workflow.runtime_factory.WorkflowRuntimeFactory", + "layer": "C1_SYMBOL_CATALOG", + "title": "WorkflowRuntimeFactory", + "span_start": 7, + "span_end": 7, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "80865947d1ca709971efe9d68a9ee1f348c1c43d351bf4e1b4a5884d72985b6b", + "qname": "WorkflowRuntimeFactory", + "kind": "const", + "signature": "WorkflowRuntimeFactory = app_runtime.workflow.runtime_factory.WorkflowRuntimeFactory", + "parent_symbol_id": null, + "package_or_module": "src.plba.workflow", + "is_test": false, + "blob_sha": "f227797606042273d1f1798f76846952892eeb9e4e9e6a38fb8a631d7231ff39", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/runtime_factory.py", + "content": "method WorkflowRuntimeFactory.__init__\n__init__(self, connection_factory)", + "layer": "C1_SYMBOL_CATALOG", + "title": "WorkflowRuntimeFactory.__init__", + "span_start": 8, + "span_end": 12, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "qname": "WorkflowRuntimeFactory.__init__", + "kind": "method", + "signature": "__init__(self, connection_factory)", + "parent_symbol_id": "WorkflowRuntimeFactory", + "package_or_module": "src.app_runtime.workflow.runtime_factory", + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/runtime_factory.py", + "content": "method WorkflowRuntimeFactory.create_engine\ncreate_engine(self, workflow)", + "layer": "C1_SYMBOL_CATALOG", + "title": "WorkflowRuntimeFactory.create_engine", + "span_start": 14, + "span_end": 19, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333", + "qname": "WorkflowRuntimeFactory.create_engine", + "kind": "method", + "signature": "create_engine(self, workflow)", + "parent_symbol_id": "WorkflowRuntimeFactory", + "package_or_module": "src.app_runtime.workflow.runtime_factory", + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/runtime_factory.py", + "content": "const WorkflowPersistence\nWorkflowPersistence = app_runtime.workflow.persistence.WorkflowPersistence", + "layer": "C1_SYMBOL_CATALOG", + "title": "WorkflowPersistence", + "span_start": 4, + "span_end": 4, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "35693d37698e35079400b6a021d46209966ce469d9f77763d1c82d82ef4600b2", + "qname": "WorkflowPersistence", + "kind": "const", + "signature": "WorkflowPersistence = app_runtime.workflow.persistence.WorkflowPersistence", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.workflow.runtime_factory", + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/runtime_factory.py", + "content": "const annotations\nannotations = __future__.annotations", + "layer": "C1_SYMBOL_CATALOG", + "title": "annotations", + "span_start": 1, + "span_end": 1, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "e016ec68f9d15d52fe0505774229fafc705c1bf3dfda78845a3db9b032a4441d", + "qname": "annotations", + "kind": "const", + "signature": "annotations = __future__.annotations", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.workflow.runtime_factory", + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/runtime_factory.py", + "content": "const WorkflowEngine\nWorkflowEngine = app_runtime.workflow.engine.workflow_engine.WorkflowEngine", + "layer": "C1_SYMBOL_CATALOG", + "title": "WorkflowEngine", + "span_start": 3, + "span_end": 3, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "da4aee8bc7d248177fbc4f892732c6eb08baa6d268c32921a217747143a99fe0", + "qname": "WorkflowEngine", + "kind": "const", + "signature": "WorkflowEngine = app_runtime.workflow.engine.workflow_engine.WorkflowEngine", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.workflow.runtime_factory", + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/runtime_factory.py", + "content": "WorkflowRuntimeFactory.__init__\n -> WorkflowRuntimeFactory._hooks\n -> WorkflowRuntimeFactory.create_engine", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowRuntimeFactory.__init__:dataflow_slice", + "span_start": 11, + "span_end": 19, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "db6124c75b447e4a0a9ba267bd6d6cdf267b41a733b2843d724dd42ec6f4945d", + "edge_type": "dataflow_slice", + "src_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "src_qname": "WorkflowRuntimeFactory.__init__", + "dst_symbol_id": "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333", + "dst_ref": "WorkflowRuntimeFactory.create_engine", + "resolution": "resolved", + "slice_id": "db6124c75b447e4a0a9ba267bd6d6cdf267b41a733b2843d724dd42ec6f4945d", + "root_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "path_symbols": [ + "WorkflowRuntimeFactory.__init__", + "WorkflowRuntimeFactory._hooks", + "WorkflowRuntimeFactory.create_engine" + ], + "path_symbol_ids": [ + "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/runtime_factory.py", + "content": "WorkflowRuntimeFactory.__init__\n -> WorkflowRuntimeFactory._snapshot_sanitizer\n -> WorkflowRuntimeFactory.create_engine", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowRuntimeFactory.__init__:dataflow_slice", + "span_start": 12, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "f46f5a871a3800b517b0f94ed2551392629e1d7920bc3e3b5a21e0d8f012b741", + "edge_type": "dataflow_slice", + "src_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "src_qname": "WorkflowRuntimeFactory.__init__", + "dst_symbol_id": "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333", + "dst_ref": "WorkflowRuntimeFactory.create_engine", + "resolution": "resolved", + "slice_id": "f46f5a871a3800b517b0f94ed2551392629e1d7920bc3e3b5a21e0d8f012b741", + "root_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "path_symbols": [ + "WorkflowRuntimeFactory.__init__", + "WorkflowRuntimeFactory._snapshot_sanitizer", + "WorkflowRuntimeFactory.create_engine" + ], + "path_symbol_ids": [ + "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/runtime_factory.py", + "content": "WorkflowRuntimeFactory.__init__\n -> WorkflowRuntimeFactory._connection_factory\n -> WorkflowRuntimeFactory.create_engine", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowRuntimeFactory.__init__:dataflow_slice", + "span_start": 9, + "span_end": 16, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "543624853400c556d1939007017145281d76b00a694c7d5c4fbb0414ded3434e", + "edge_type": "dataflow_slice", + "src_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "src_qname": "WorkflowRuntimeFactory.__init__", + "dst_symbol_id": "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333", + "dst_ref": "WorkflowRuntimeFactory.create_engine", + "resolution": "resolved", + "slice_id": "543624853400c556d1939007017145281d76b00a694c7d5c4fbb0414ded3434e", + "root_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "path_symbols": [ + "WorkflowRuntimeFactory.__init__", + "WorkflowRuntimeFactory._connection_factory", + "WorkflowRuntimeFactory.create_engine" + ], + "path_symbol_ids": [ + "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/runtime_factory.py", + "content": "WorkflowRuntimeFactory.__init__\n -> WorkflowRuntimeFactory._traces\n -> WorkflowRuntimeFactory.create_engine", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowRuntimeFactory.__init__:dataflow_slice", + "span_start": 10, + "span_end": 19, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "346cf5ddb4308b8403d27c5b54da8cba298bb0af7dc04c2fe30312ef574103c6", + "edge_type": "dataflow_slice", + "src_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "src_qname": "WorkflowRuntimeFactory.__init__", + "dst_symbol_id": "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333", + "dst_ref": "WorkflowRuntimeFactory.create_engine", + "resolution": "resolved", + "slice_id": "346cf5ddb4308b8403d27c5b54da8cba298bb0af7dc04c2fe30312ef574103c6", + "root_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "path_symbols": [ + "WorkflowRuntimeFactory.__init__", + "WorkflowRuntimeFactory._traces", + "WorkflowRuntimeFactory.create_engine" + ], + "path_symbol_ids": [ + "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/runtime_factory.py", + "content": "WorkflowRuntimeFactory.__init__ writes_attr WorkflowRuntimeFactory._snapshot_sanitizer", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowRuntimeFactory.__init__:writes_attr", + "span_start": 12, + "span_end": 12, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "de0cb1913ba41f673cfb601cab23cfb2e1044ed3dd8c061aff486075aeb8af20", + "edge_type": "writes_attr", + "src_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "src_qname": "WorkflowRuntimeFactory.__init__", + "dst_symbol_id": null, + "dst_ref": "WorkflowRuntimeFactory._snapshot_sanitizer", + "resolution": "partial", + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/runtime_factory.py", + "content": "WorkflowRuntimeFactory.create_engine calls WorkflowPersistence.create_default", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowRuntimeFactory.create_engine:calls", + "span_start": 15, + "span_end": 18, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "fa86efb6871092fc88df68295c0d92dbe46253e1afa3246ca62b6da11d4d5569", + "edge_type": "calls", + "src_symbol_id": "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333", + "src_qname": "WorkflowRuntimeFactory.create_engine", + "dst_symbol_id": null, + "dst_ref": "WorkflowPersistence.create_default", + "resolution": "partial", + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/runtime_factory.py", + "content": "class WorkflowRuntimeFactory:\n def __init__(self, connection_factory=None, *, traces, hooks=None, snapshot_sanitizer=None) -> None:\n self._connection_factory = connection_factory\n self._traces = traces\n self._hooks = hooks\n self._snapshot_sanitizer = snapshot_sanitizer\n\n def create_engine(self, workflow) -> WorkflowEngine:\n persistence = WorkflowPersistence.create_default(\n self._connection_factory,\n snapshot_sanitizer=self._snapshot_sanitizer,\n )\n return WorkflowEngine(workflow, persistence, traces=self._traces, hooks=self._hooks)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/workflow/runtime_factory.py:WorkflowRuntimeFactory", + "span_start": 7, + "span_end": 19, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.workflow.runtime_factory", + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/__init__.py", + "content": "from plba.bootstrap import create_runtime\nfrom plba.config import ConfigFileLoader, FileConfigProvider\nfrom plba.control import ControlActionSet, ControlChannel, ControlPlaneService, HttpControlChannel\nfrom plba.contracts import (\n ApplicationModule,\n ConfigProvider,\n HealthContributor,\n TraceContext,\n TraceContextRecord,\n TraceLogMessage,\n TraceTransport,\n Worker,\n WorkerHealth,\n WorkerStatus,\n)\nfrom plba.core import ConfigurationManager, RuntimeManager, ServiceContainer\nfrom plba.health import HealthRegistry\nfrom plba.logging import LogManager\nfrom plba.queue import InMemoryTaskQueue\nfrom plba.tracing import MySqlTraceTransport, NoOpTraceTransport, TraceService\nfrom plba.workflow import (\n StepResult,\n WorkflowContext,\n WorkflowDefinition,\n WorkflowEngine,\n WorkflowEngineHooks,\n WorkflowNode,\n WorkflowRuntimeFactory,\n WorkflowStep,\n)\nfrom plba.workers import WorkerSupervisor\n\n__all__ = [\n \"ApplicationModule\",\n \"ConfigFileLoader\",\n \"ConfigProvider\",\n \"ConfigurationManager\",\n \"ControlActionSet\",\n \"ControlChannel\",\n \"ControlPlaneService\",\n \"create_runtime\",\n \"FileConfigProvider\",\n \"HealthContributor\",\n \"HealthRegistry\",\n \"HttpControlChannel\",\n \"InMemoryTaskQueue\",\n \"LogManager\",\n \"MySqlTraceTransport\",\n \"NoOpTraceTransport\",\n \"RuntimeManager\",\n \"ServiceContainer\",\n \"TraceContext\",\n \"TraceContextRecord\",\n \"TraceLogMessage\",\n \"TraceService\",\n \"TraceTransport\",\n \"StepResult\",\n \"Worker\",\n \"WorkerHealth\",\n \"WorkerStatus\",\n \"WorkflowContext\",\n \"WorkflowDefinition\",\n \"WorkflowEngine\",\n \"WorkflowEngineHooks\",\n \"WorkflowNode\",\n \"WorkflowRuntimeFactory\",\n \"WorkflowStep\",\n \"WorkerSupervisor\",\n]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/__init__.py:1-69", + "span_start": 1, + "span_end": 69, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/workflow.py", + "content": "from app_runtime.workflow.contracts.context import WorkflowContext\nfrom app_runtime.workflow.contracts.result import StepResult\nfrom app_runtime.workflow.contracts.step import WorkflowStep\nfrom app_runtime.workflow.contracts.workflow import WorkflowDefinition, WorkflowNode\nfrom app_runtime.workflow.engine.hooks import WorkflowEngineHooks\nfrom app_runtime.workflow.engine.workflow_engine import WorkflowEngine\nfrom app_runtime.workflow.runtime_factory import WorkflowRuntimeFactory\n\n__all__ = [\n \"StepResult\",\n \"WorkflowContext\",\n \"WorkflowDefinition\",\n \"WorkflowEngine\",\n \"WorkflowEngineHooks\",\n \"WorkflowNode\",\n \"WorkflowRuntimeFactory\",\n \"WorkflowStep\",\n]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/workflow.py:1-18", + "span_start": 1, + "span_end": 18, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.workflow", + "is_test": false, + "blob_sha": "f227797606042273d1f1798f76846952892eeb9e4e9e6a38fb8a631d7231ff39", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/__init__.py", + "content": "from app_runtime.config.file_loader import ConfigFileLoader\nfrom app_runtime.config.providers import FileConfigProvider\n\n__all__ = [\"ConfigFileLoader\", \"FileConfigProvider\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/config/__init__.py:1-4", + "span_start": 1, + "span_end": 4, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.config.__init__", + "is_test": false, + "blob_sha": "612918029820a2a983330ec92256142b55b9de4bdf3399ece18e2a02dbad9729", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/providers.py", + "content": "class FileConfigProvider(ConfigProvider):\n def __init__(self, path: str | Path) -> None:\n self._loader = ConfigFileLoader(path)\n\n @property\n def loader(self) -> ConfigFileLoader:\n return self._loader\n\n def load(self) -> dict[str, Any]:\n config = self._loader.load_sync()\n if not isinstance(config, dict):\n raise TypeError(\"Config root must be a mapping\")\n return dict(config)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/config/providers.py:FileConfigProvider", + "span_start": 10, + "span_end": 22, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.config.providers", + "is_test": false, + "blob_sha": "8c53ca0122d6df6c5763bca15e99434bb4daebd5a618b8fc927e9ae90b022e64", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/__init__.py", + "content": "__all__: list[str] = []", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/__init__.py:1-1", + "span_start": 1, + "span_end": 1, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.__init__", + "is_test": false, + "blob_sha": "8eea9df4f6d7b38ca0e39ccc27b04700e3d08dbeec8046d613d22706d19985fa", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "class ConfigFileLoader:\n def __init__(self, path: str | Path) -> None:\n self.path = Path(path)\n self.config: Any = None\n self.last_valid_config: Any = None\n self._last_seen_hash: str | None = None\n\n def read_text(self) -> str:\n return self.path.read_text(encoding=\"utf-8\")\n\n def parse(self, data: str) -> Any:\n suffix = self.path.suffix.lower()\n if suffix in {\".yml\", \".yaml\"}:\n return yaml.safe_load(data)\n return json.loads(data)\n\n def load_sync(self) -> Any:\n data = self.read_text()\n parsed = self.parse(data)\n self.config = parsed\n self.last_valid_config = parsed\n self._last_seen_hash = self._calculate_hash(data)\n return parsed\n\n def load_if_changed(self) -> tuple[bool, Any]:\n data = self.read_text()\n current_hash = self._calculate_hash(data)\n if current_hash == self._last_seen_hash:\n return False, self.config\n parsed = self.parse(data)\n self.config = parsed\n self.last_valid_config = parsed\n self._last_seen_hash = current_hash\n return True, parsed\n\n @staticmethod\n def _calculate_hash(data: str) -> str:\n return hashlib.sha256(data.encode(\"utf-8\")).hexdigest()", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/config/file_loader.py:ConfigFileLoader", + "span_start": 11, + "span_end": 48, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/config.py", + "content": "class ConfigProvider(ABC):\n @abstractmethod\n def load(self) -> dict[str, Any]:\n \"\"\"Return a config fragment.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/contracts/config.py:ConfigProvider", + "span_start": 7, + "span_end": 10, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.config", + "is_test": false, + "blob_sha": "5e773880267743ee94954ea2db120c2d88c54d4312893293d1b89df405283ed4", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/health.py", + "content": "class HealthContributor(ABC):\n @abstractmethod\n def health(self) -> WorkerHealth:\n \"\"\"Return contributor health state.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/contracts/health.py:HealthContributor", + "span_start": 7, + "span_end": 10, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.health", + "is_test": false, + "blob_sha": "6bd92611def7131e32d4dd34a8ed85e6cf3c67722ad27797032a632cb30dc097", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/application.py", + "content": "class ApplicationModule(ABC):\n @property\n @abstractmethod\n def name(self) -> str:\n \"\"\"Module name used for runtime status and diagnostics.\"\"\"\n\n @abstractmethod\n def register(self, registry: ModuleRegistry) -> None:\n \"\"\"Register workers, services, and health contributors.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/contracts/application.py:ApplicationModule", + "span_start": 8, + "span_end": 16, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.application", + "is_test": false, + "blob_sha": "197c35634dca49c352ce3f230295a485fbffb672ce7bb8c08e752bfdf61e7fa4", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "validation": { + "passed": false, + "action": "repair", + "reasons": [ + "degraded_answer_missing_guardrail" + ] + } + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-find-tests-workflow-runtime-factory-negative.md b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-find-tests-workflow-runtime-factory-negative.md new file mode 100644 index 0000000..8d465e3 --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-find-tests-workflow-runtime-factory-negative.md @@ -0,0 +1,32 @@ +# plba-v2-find-tests-workflow-runtime-factory-negative + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: agent_runtime +- mode: full_chain +- passed: True + +## Query +Где тесты для WorkflowRuntimeFactory? + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 24, + "llm_answer": "Insufficient evidence for a confident answer. No test candidates found.", + "answer_mode": "degraded", + "path_scope": [], + "symbol_candidates": [ + "WorkflowRuntimeFactory" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-open-file-nonexistent.json b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-open-file-nonexistent.json new file mode 100644 index 0000000..0e8578d --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-open-file-nonexistent.json @@ -0,0 +1,341 @@ +{ + "case_id": "plba-v2-open-file-nonexistent", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "agent_runtime", + "mode": "full_chain", + "query": "Открой файл src/app_runtime/core/missing_runtime.py", + "actual": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 0, + "llm_answer": "Файл `src/app_runtime/core/missing_runtime.py` не найден.", + "answer_mode": "not_found", + "path_scope": [ + "src/app_runtime/core/missing_runtime.py" + ], + "symbol_candidates": [], + "layers": [ + "C0_SOURCE_CHUNKS" + ] + }, + "passed": false, + "mismatches": [ + "answer_mode: expected degraded, got not_found", + "llm: expected answer to contain 'Файл src/app_runtime/core/missing_runtime.py не найден.'" + ], + "details": { + "query": "Открой файл src/app_runtime/core/missing_runtime.py", + "router_result": { + "schema_version": "1.1", + "intent": "CODE_QA", + "retrieval_profile": "code", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query_plan": { + "raw": "Открой файл src/app_runtime/core/missing_runtime.py", + "normalized": "Открой файл src/app_runtime/core/missing_runtime.py", + "sub_intent": "OPEN_FILE", + "negations": [], + "expansions": [ + "file" + ], + "keyword_hints": [], + "path_hints": [ + "src/app_runtime/core/missing_runtime.py" + ], + "doc_scope_hints": [], + "symbol_candidates": [], + "symbol_kind_hint": "unknown", + "anchors": [ + { + "type": "FILE_PATH", + "value": "src/app_runtime/core/missing_runtime.py", + "source": "user_text", + "subtype": null, + "span": { + "start": 12, + "end": 51 + }, + "confidence": 0.95 + }, + { + "type": "KEY_TERM", + "value": "файл", + "source": "user_text", + "subtype": null, + "span": { + "start": 7, + "end": 11 + }, + "confidence": 0.9 + } + ] + }, + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 12 + } + ], + "filters": { + "test_policy": "EXCLUDE", + "path_scope": [ + "src/app_runtime/core/missing_runtime.py" + ], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/app_runtime/core/missing_runtime.py" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": false, + "max_distance": 2, + "top_k": 5 + } + }, + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [], + "confidence": 0.0 + }, + "evidence_policy": { + "require_def": false, + "require_flow": false, + "require_spec": false, + "allow_answer_without_evidence": false + } + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Открой файл src/app_runtime/core/missing_runtime.py", + "sub_intent": "OPEN_FILE", + "path_scope": [ + "src/app_runtime/core/missing_runtime.py" + ], + "keyword_hints": [], + "symbol_candidates": [], + "requested_layers": [ + "C0_SOURCE_CHUNKS" + ], + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 12 + } + ], + "filters": { + "test_policy": "EXCLUDE", + "path_scope": [ + "src/app_runtime/core/missing_runtime.py" + ], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/app_runtime/core/missing_runtime.py" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": false, + "max_distance": 2, + "top_k": 5 + } + }, + "query_plan": { + "raw": "Открой файл src/app_runtime/core/missing_runtime.py", + "normalized": "Открой файл src/app_runtime/core/missing_runtime.py", + "sub_intent": "OPEN_FILE", + "negations": [], + "expansions": [ + "file" + ], + "keyword_hints": [], + "path_hints": [ + "src/app_runtime/core/missing_runtime.py" + ], + "doc_scope_hints": [], + "symbol_candidates": [], + "symbol_kind_hint": "unknown", + "anchors": [ + { + "type": "FILE_PATH", + "value": "src/app_runtime/core/missing_runtime.py", + "source": "user_text", + "subtype": null, + "span": { + "start": 12, + "end": 51 + }, + "confidence": 0.95 + }, + { + "type": "KEY_TERM", + "value": "файл", + "source": "user_text", + "subtype": null, + "span": { + "start": 7, + "end": 11 + }, + "confidence": 0.9 + } + ] + } + }, + "retrieval_result": { + "target_symbol_candidates": [], + "resolved_symbol": null, + "symbol_resolution_status": "not_requested", + "file_candidates": [], + "code_chunks": [], + "relations": [], + "entrypoints": [], + "test_candidates": [], + "layer_outcomes": [ + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 0, + "empty": true, + "fallback_used": false + } + ], + "missing_layers": [ + "C0_SOURCE_CHUNKS" + ], + "raw_rows": [], + "retrieval_report": { + "executed_layers": [ + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C0_SOURCE_CHUNKS": 200 + }, + "filters_by_layer": { + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src/app_runtime/core/missing_runtime.py" + ] + } + }, + "requests": [ + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Открой файл src/app_runtime/core/missing_runtime.py", + "ranking_profile": "code" + } + ], + "fallback": { + "used": false, + "reason": null + }, + "retrieval_by_layer_ms": { + "C0_SOURCE_CHUNKS": 18 + } + } + }, + "diagnostics": { + "intent_correct": null, + "target_found": false, + "layers_used": [ + "C0_SOURCE_CHUNKS" + ], + "retrieval_sufficient": false, + "answer_mode": "insufficient", + "router_result": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "OPEN_FILE", + "path_scope": [ + "src/app_runtime/core/missing_runtime.py" + ], + "layers": [ + "C0_SOURCE_CHUNKS" + ], + "symbol_resolution_status": "not_requested" + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Открой файл src/app_runtime/core/missing_runtime.py", + "sub_intent": "OPEN_FILE", + "path_scope": [ + "src/app_runtime/core/missing_runtime.py" + ], + "requested_layers": [ + "C0_SOURCE_CHUNKS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 0, + "empty": true, + "fallback_used": false + } + ], + "empty_layers": [ + "C0_SOURCE_CHUNKS" + ], + "evidence_gate_decision": { + "sufficient": false, + "failure_reasons": [ + "path_scope_empty", + "layer_c0_empty" + ], + "evidence_count": 0 + }, + "failure_reasons": [ + "path_scope_empty", + "layer_c0_empty" + ], + "timings_ms": {} + }, + "rag_rows": [], + "validation": { + "passed": true, + "action": "return", + "reasons": [] + } + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-open-file-nonexistent.md b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-open-file-nonexistent.md new file mode 100644 index 0000000..b301f23 --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-open-file-nonexistent.md @@ -0,0 +1,31 @@ +# plba-v2-open-file-nonexistent + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: agent_runtime +- mode: full_chain +- passed: False + +## Query +Открой файл src/app_runtime/core/missing_runtime.py + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 0, + "llm_answer": "Файл `src/app_runtime/core/missing_runtime.py` не найден.", + "answer_mode": "not_found", + "path_scope": [ + "src/app_runtime/core/missing_runtime.py" + ], + "symbol_candidates": [], + "layers": [ + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- answer_mode: expected degraded, got not_found +- llm: expected answer to contain 'Файл src/app_runtime/core/missing_runtime.py не найден.' \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-open-file-public-api.json b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-open-file-public-api.json new file mode 100644 index 0000000..bf348ee --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-open-file-public-api.json @@ -0,0 +1,417 @@ +{ + "case_id": "plba-v2-open-file-public-api", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "agent_runtime", + "mode": "full_chain", + "query": "Открой файл src/plba/__init__.py", + "actual": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 1, + "llm_answer": "Путь к файлу: src/plba/__init__.py\n\nВ этом файле находятся импорт различных модулей и классов из пакета plba. В частности, здесь можно найти:\n- Импорты для создания runtime с помощью `create_runtime`\n- Классы и интерфейсы конфигурации (`ConfigFileLoader`, `FileConfigProvider`)\n- Контроллеры и каналы управления (`ControlActionSet`, `ControlChannel`, `HttpControlChannel`)\n- Определения контрактов (`ApplicationModule`, `Worker`, etc.)\n- Менеджеры конфигурации и выполнения (`ConfigurationManager`, `RuntimeManager`, `ServiceContainer`)\n- Регистраторы здоровья и службы логирования\n- Обработчики очередей задач и транспортные средства трассировки (`InMemoryTaskQueue`, `MySqlTraceTransport`, `NoOpTraceTransport`)\n- Определение рабочего потока и контекста (`StepResult`, `WorkflowContext`, `WorkflowDefinition`)", + "answer_mode": "answered", + "path_scope": [ + "src/plba/__init__.py" + ], + "symbol_candidates": [], + "layers": [ + "C0_SOURCE_CHUNKS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "query": "Открой файл src/plba/__init__.py", + "router_result": { + "schema_version": "1.1", + "intent": "CODE_QA", + "retrieval_profile": "code", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query_plan": { + "raw": "Открой файл src/plba/__init__.py", + "normalized": "Открой файл src/plba/__init__.py", + "sub_intent": "OPEN_FILE", + "negations": [], + "expansions": [ + "file" + ], + "keyword_hints": [], + "path_hints": [ + "src/plba/__init__.py" + ], + "doc_scope_hints": [], + "symbol_candidates": [], + "symbol_kind_hint": "unknown", + "anchors": [ + { + "type": "FILE_PATH", + "value": "src/plba/__init__.py", + "source": "user_text", + "subtype": null, + "span": { + "start": 12, + "end": 32 + }, + "confidence": 0.95 + }, + { + "type": "KEY_TERM", + "value": "файл", + "source": "user_text", + "subtype": null, + "span": { + "start": 7, + "end": 11 + }, + "confidence": 0.9 + } + ] + }, + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 12 + } + ], + "filters": { + "test_policy": "EXCLUDE", + "path_scope": [ + "src/plba/__init__.py" + ], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/plba/__init__.py" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": false, + "max_distance": 2, + "top_k": 5 + } + }, + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [], + "confidence": 0.0 + }, + "evidence_policy": { + "require_def": false, + "require_flow": false, + "require_spec": false, + "allow_answer_without_evidence": false + } + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Открой файл src/plba/__init__.py", + "sub_intent": "OPEN_FILE", + "path_scope": [ + "src/plba/__init__.py" + ], + "keyword_hints": [], + "symbol_candidates": [], + "requested_layers": [ + "C0_SOURCE_CHUNKS" + ], + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 12 + } + ], + "filters": { + "test_policy": "EXCLUDE", + "path_scope": [ + "src/plba/__init__.py" + ], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/plba/__init__.py" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": false, + "max_distance": 2, + "top_k": 5 + } + }, + "query_plan": { + "raw": "Открой файл src/plba/__init__.py", + "normalized": "Открой файл src/plba/__init__.py", + "sub_intent": "OPEN_FILE", + "negations": [], + "expansions": [ + "file" + ], + "keyword_hints": [], + "path_hints": [ + "src/plba/__init__.py" + ], + "doc_scope_hints": [], + "symbol_candidates": [], + "symbol_kind_hint": "unknown", + "anchors": [ + { + "type": "FILE_PATH", + "value": "src/plba/__init__.py", + "source": "user_text", + "subtype": null, + "span": { + "start": 12, + "end": 32 + }, + "confidence": 0.95 + }, + { + "type": "KEY_TERM", + "value": "файл", + "source": "user_text", + "subtype": null, + "span": { + "start": 7, + "end": 11 + }, + "confidence": 0.9 + } + ] + } + }, + "retrieval_result": { + "target_symbol_candidates": [], + "resolved_symbol": null, + "symbol_resolution_status": "not_requested", + "file_candidates": [ + "src/plba/__init__.py" + ], + "code_chunks": [ + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/plba/__init__.py", + "title": "src/plba/__init__.py:1-69", + "content": "from plba.bootstrap import create_runtime\nfrom plba.config import ConfigFileLoader, FileConfigProvider\nfrom plba.control import ControlActionSet, ControlChannel, ControlPlaneService, HttpControlChannel\nfrom plba.contracts import (\n ApplicationModule,\n ConfigProvider,\n HealthContributor,\n TraceContext,\n TraceContextRecord,\n TraceLogMessage,\n TraceTransport,\n Worker,\n WorkerHealth,\n WorkerStatus,\n)\nfrom plba.core import ConfigurationManager, RuntimeManager, ServiceContainer\nfrom plba.health import HealthRegistry\nfrom plba.logging import LogManager\nfrom plba.queue import InMemoryTaskQueue\nfrom plba.tracing import MySqlTraceTransport, NoOpTraceTransport, TraceService\nfrom plba.workflow import (\n StepResult,\n WorkflowContext,\n WorkflowDefinition,\n WorkflowEngine,\n WorkflowEngineHooks,\n WorkflowNode,\n WorkflowRuntimeFactory,\n WorkflowStep,\n)\nfrom plba.workers import WorkerSupervisor\n\n__all__ = [\n \"ApplicationModule\",\n \"ConfigFileLoader\",\n \"ConfigProvider\",\n \"ConfigurationManager\",\n \"ControlActionSet\",\n \"ControlChannel\",\n \"ControlPlaneService\",\n \"create_runtime\",\n \"FileConfigProvider\",\n \"HealthContributor\",\n \"HealthRegistry\",\n \"HttpControlChannel\",\n \"InMemoryTaskQueue\",\n \"LogManager\",\n \"MySqlTraceTransport\",\n \"NoOpTraceTransport\",\n \"RuntimeManager\",\n \"ServiceContainer\",\n \"TraceContext\",\n \"TraceContextRecord\",\n \"TraceLogMessage\",\n \"TraceService\",\n \"TraceTransport\",\n \"StepResult\",\n \"Worker\",\n \"WorkerHealth\",\n \"WorkerStatus\",\n \"WorkflowContext\",\n \"WorkflowDefinition\",\n \"WorkflowEngine\",\n \"WorkflowEngineHooks\",\n \"WorkflowNode\",\n \"WorkflowRuntimeFactory\",\n \"WorkflowStep\",\n \"WorkerSupervisor\",\n]", + "start_line": 1, + "end_line": 69, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "relations": [], + "entrypoints": [], + "test_candidates": [], + "layer_outcomes": [ + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 1, + "empty": false, + "fallback_used": false + } + ], + "missing_layers": [], + "raw_rows": [ + { + "path": "src/plba/__init__.py", + "content": "from plba.bootstrap import create_runtime\nfrom plba.config import ConfigFileLoader, FileConfigProvider\nfrom plba.control import ControlActionSet, ControlChannel, ControlPlaneService, HttpControlChannel\nfrom plba.contracts import (\n ApplicationModule,\n ConfigProvider,\n HealthContributor,\n TraceContext,\n TraceContextRecord,\n TraceLogMessage,\n TraceTransport,\n Worker,\n WorkerHealth,\n WorkerStatus,\n)\nfrom plba.core import ConfigurationManager, RuntimeManager, ServiceContainer\nfrom plba.health import HealthRegistry\nfrom plba.logging import LogManager\nfrom plba.queue import InMemoryTaskQueue\nfrom plba.tracing import MySqlTraceTransport, NoOpTraceTransport, TraceService\nfrom plba.workflow import (\n StepResult,\n WorkflowContext,\n WorkflowDefinition,\n WorkflowEngine,\n WorkflowEngineHooks,\n WorkflowNode,\n WorkflowRuntimeFactory,\n WorkflowStep,\n)\nfrom plba.workers import WorkerSupervisor\n\n__all__ = [\n \"ApplicationModule\",\n \"ConfigFileLoader\",\n \"ConfigProvider\",\n \"ConfigurationManager\",\n \"ControlActionSet\",\n \"ControlChannel\",\n \"ControlPlaneService\",\n \"create_runtime\",\n \"FileConfigProvider\",\n \"HealthContributor\",\n \"HealthRegistry\",\n \"HttpControlChannel\",\n \"InMemoryTaskQueue\",\n \"LogManager\",\n \"MySqlTraceTransport\",\n \"NoOpTraceTransport\",\n \"RuntimeManager\",\n \"ServiceContainer\",\n \"TraceContext\",\n \"TraceContextRecord\",\n \"TraceLogMessage\",\n \"TraceService\",\n \"TraceTransport\",\n \"StepResult\",\n \"Worker\",\n \"WorkerHealth\",\n \"WorkerStatus\",\n \"WorkflowContext\",\n \"WorkflowDefinition\",\n \"WorkflowEngine\",\n \"WorkflowEngineHooks\",\n \"WorkflowNode\",\n \"WorkflowRuntimeFactory\",\n \"WorkflowStep\",\n \"WorkerSupervisor\",\n]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/__init__.py:1-69", + "span_start": 1, + "span_end": 69, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "retrieval_report": { + "executed_layers": [ + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C0_SOURCE_CHUNKS": 200 + }, + "filters_by_layer": { + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src/plba/__init__.py" + ] + } + }, + "requests": [ + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Открой файл src/plba/__init__.py", + "ranking_profile": "code" + } + ], + "fallback": { + "used": false, + "reason": null + }, + "retrieval_by_layer_ms": { + "C0_SOURCE_CHUNKS": 21 + } + } + }, + "diagnostics": { + "intent_correct": null, + "target_found": true, + "layers_used": [ + "C0_SOURCE_CHUNKS" + ], + "retrieval_sufficient": true, + "answer_mode": "normal", + "router_result": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "OPEN_FILE", + "path_scope": [ + "src/plba/__init__.py" + ], + "layers": [ + "C0_SOURCE_CHUNKS" + ], + "symbol_resolution_status": "not_requested" + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Открой файл src/plba/__init__.py", + "sub_intent": "OPEN_FILE", + "path_scope": [ + "src/plba/__init__.py" + ], + "requested_layers": [ + "C0_SOURCE_CHUNKS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 1, + "empty": false, + "fallback_used": false + } + ], + "empty_layers": [], + "evidence_gate_decision": { + "sufficient": true, + "failure_reasons": [], + "evidence_count": 1 + }, + "failure_reasons": [], + "timings_ms": {} + }, + "rag_rows": [ + { + "path": "src/plba/__init__.py", + "content": "from plba.bootstrap import create_runtime\nfrom plba.config import ConfigFileLoader, FileConfigProvider\nfrom plba.control import ControlActionSet, ControlChannel, ControlPlaneService, HttpControlChannel\nfrom plba.contracts import (\n ApplicationModule,\n ConfigProvider,\n HealthContributor,\n TraceContext,\n TraceContextRecord,\n TraceLogMessage,\n TraceTransport,\n Worker,\n WorkerHealth,\n WorkerStatus,\n)\nfrom plba.core import ConfigurationManager, RuntimeManager, ServiceContainer\nfrom plba.health import HealthRegistry\nfrom plba.logging import LogManager\nfrom plba.queue import InMemoryTaskQueue\nfrom plba.tracing import MySqlTraceTransport, NoOpTraceTransport, TraceService\nfrom plba.workflow import (\n StepResult,\n WorkflowContext,\n WorkflowDefinition,\n WorkflowEngine,\n WorkflowEngineHooks,\n WorkflowNode,\n WorkflowRuntimeFactory,\n WorkflowStep,\n)\nfrom plba.workers import WorkerSupervisor\n\n__all__ = [\n \"ApplicationModule\",\n \"ConfigFileLoader\",\n \"ConfigProvider\",\n \"ConfigurationManager\",\n \"ControlActionSet\",\n \"ControlChannel\",\n \"ControlPlaneService\",\n \"create_runtime\",\n \"FileConfigProvider\",\n \"HealthContributor\",\n \"HealthRegistry\",\n \"HttpControlChannel\",\n \"InMemoryTaskQueue\",\n \"LogManager\",\n \"MySqlTraceTransport\",\n \"NoOpTraceTransport\",\n \"RuntimeManager\",\n \"ServiceContainer\",\n \"TraceContext\",\n \"TraceContextRecord\",\n \"TraceLogMessage\",\n \"TraceService\",\n \"TraceTransport\",\n \"StepResult\",\n \"Worker\",\n \"WorkerHealth\",\n \"WorkerStatus\",\n \"WorkflowContext\",\n \"WorkflowDefinition\",\n \"WorkflowEngine\",\n \"WorkflowEngineHooks\",\n \"WorkflowNode\",\n \"WorkflowRuntimeFactory\",\n \"WorkflowStep\",\n \"WorkerSupervisor\",\n]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/__init__.py:1-69", + "span_start": 1, + "span_end": 69, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "validation": { + "passed": true, + "action": "return", + "reasons": [] + } + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-open-file-public-api.md b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-open-file-public-api.md new file mode 100644 index 0000000..d650590 --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-open-file-public-api.md @@ -0,0 +1,30 @@ +# plba-v2-open-file-public-api + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: agent_runtime +- mode: full_chain +- passed: True + +## Query +Открой файл src/plba/__init__.py + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 1, + "llm_answer": "Путь к файлу: src/plba/__init__.py\n\nВ этом файле находятся импорт различных модулей и классов из пакета plba. В частности, здесь можно найти:\n- Импорты для создания runtime с помощью `create_runtime`\n- Классы и интерфейсы конфигурации (`ConfigFileLoader`, `FileConfigProvider`)\n- Контроллеры и каналы управления (`ControlActionSet`, `ControlChannel`, `HttpControlChannel`)\n- Определения контрактов (`ApplicationModule`, `Worker`, etc.)\n- Менеджеры конфигурации и выполнения (`ConfigurationManager`, `RuntimeManager`, `ServiceContainer`)\n- Регистраторы здоровья и службы логирования\n- Обработчики очередей задач и транспортные средства трассировки (`InMemoryTaskQueue`, `MySqlTraceTransport`, `NoOpTraceTransport`)\n- Определение рабочего потока и контекста (`StepResult`, `WorkflowContext`, `WorkflowDefinition`)", + "answer_mode": "answered", + "path_scope": [ + "src/plba/__init__.py" + ], + "symbol_candidates": [], + "layers": [ + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-open-file-runtime.json b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-open-file-runtime.json new file mode 100644 index 0000000..16cb1a8 --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-open-file-runtime.json @@ -0,0 +1,417 @@ +{ + "case_id": "plba-v2-open-file-runtime", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "agent_runtime", + "mode": "full_chain", + "query": "Открой файл src/app_runtime/core/runtime.py", + "actual": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 1, + "llm_answer": "Путь: src/app_runtime/core/runtime.py\n\nВ этом файле содержится определение класса `RuntimeManager`. В классе инициализируются различные компоненты системы, такие как конфигурация, службы, трассировка, здоровье, журналы, рабочие процессы и контрольная плоскость. Класс предназначен для управления выполнением действий в системе с заданными тайм-аутами и интервалами опроса.", + "answer_mode": "answered", + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "symbol_candidates": [], + "layers": [ + "C0_SOURCE_CHUNKS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "query": "Открой файл src/app_runtime/core/runtime.py", + "router_result": { + "schema_version": "1.1", + "intent": "CODE_QA", + "retrieval_profile": "code", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query_plan": { + "raw": "Открой файл src/app_runtime/core/runtime.py", + "normalized": "Открой файл src/app_runtime/core/runtime.py", + "sub_intent": "OPEN_FILE", + "negations": [], + "expansions": [ + "file" + ], + "keyword_hints": [], + "path_hints": [ + "src/app_runtime/core/runtime.py" + ], + "doc_scope_hints": [], + "symbol_candidates": [], + "symbol_kind_hint": "unknown", + "anchors": [ + { + "type": "FILE_PATH", + "value": "src/app_runtime/core/runtime.py", + "source": "user_text", + "subtype": null, + "span": { + "start": 12, + "end": 43 + }, + "confidence": 0.95 + }, + { + "type": "KEY_TERM", + "value": "файл", + "source": "user_text", + "subtype": null, + "span": { + "start": 7, + "end": 11 + }, + "confidence": 0.9 + } + ] + }, + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 12 + } + ], + "filters": { + "test_policy": "EXCLUDE", + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/app_runtime/core/runtime.py" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": false, + "max_distance": 2, + "top_k": 5 + } + }, + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [], + "confidence": 0.0 + }, + "evidence_policy": { + "require_def": false, + "require_flow": false, + "require_spec": false, + "allow_answer_without_evidence": false + } + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Открой файл src/app_runtime/core/runtime.py", + "sub_intent": "OPEN_FILE", + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "keyword_hints": [], + "symbol_candidates": [], + "requested_layers": [ + "C0_SOURCE_CHUNKS" + ], + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 12 + } + ], + "filters": { + "test_policy": "EXCLUDE", + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/app_runtime/core/runtime.py" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": false, + "max_distance": 2, + "top_k": 5 + } + }, + "query_plan": { + "raw": "Открой файл src/app_runtime/core/runtime.py", + "normalized": "Открой файл src/app_runtime/core/runtime.py", + "sub_intent": "OPEN_FILE", + "negations": [], + "expansions": [ + "file" + ], + "keyword_hints": [], + "path_hints": [ + "src/app_runtime/core/runtime.py" + ], + "doc_scope_hints": [], + "symbol_candidates": [], + "symbol_kind_hint": "unknown", + "anchors": [ + { + "type": "FILE_PATH", + "value": "src/app_runtime/core/runtime.py", + "source": "user_text", + "subtype": null, + "span": { + "start": 12, + "end": 43 + }, + "confidence": 0.95 + }, + { + "type": "KEY_TERM", + "value": "файл", + "source": "user_text", + "subtype": null, + "span": { + "start": 7, + "end": 11 + }, + "confidence": 0.9 + } + ] + } + }, + "retrieval_result": { + "target_symbol_candidates": [], + "resolved_symbol": null, + "symbol_resolution_status": "not_requested", + "file_candidates": [ + "src/app_runtime/core/runtime.py" + ], + "code_chunks": [ + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/core/runtime.py", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "start_line": 18, + "end_line": 179, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "relations": [], + "entrypoints": [], + "test_candidates": [], + "layer_outcomes": [ + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 1, + "empty": false, + "fallback_used": false + } + ], + "missing_layers": [], + "raw_rows": [ + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "retrieval_report": { + "executed_layers": [ + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C0_SOURCE_CHUNKS": 200 + }, + "filters_by_layer": { + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src/app_runtime/core/runtime.py" + ] + } + }, + "requests": [ + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Открой файл src/app_runtime/core/runtime.py", + "ranking_profile": "code" + } + ], + "fallback": { + "used": false, + "reason": null + }, + "retrieval_by_layer_ms": { + "C0_SOURCE_CHUNKS": 127 + } + } + }, + "diagnostics": { + "intent_correct": null, + "target_found": true, + "layers_used": [ + "C0_SOURCE_CHUNKS" + ], + "retrieval_sufficient": true, + "answer_mode": "normal", + "router_result": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "OPEN_FILE", + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "layers": [ + "C0_SOURCE_CHUNKS" + ], + "symbol_resolution_status": "not_requested" + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Открой файл src/app_runtime/core/runtime.py", + "sub_intent": "OPEN_FILE", + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "requested_layers": [ + "C0_SOURCE_CHUNKS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 1, + "empty": false, + "fallback_used": false + } + ], + "empty_layers": [], + "evidence_gate_decision": { + "sufficient": true, + "failure_reasons": [], + "evidence_count": 1 + }, + "failure_reasons": [], + "timings_ms": {} + }, + "rag_rows": [ + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "validation": { + "passed": true, + "action": "return", + "reasons": [] + } + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-open-file-runtime.md b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-open-file-runtime.md new file mode 100644 index 0000000..6b4b80b --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-open-file-runtime.md @@ -0,0 +1,30 @@ +# plba-v2-open-file-runtime + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: agent_runtime +- mode: full_chain +- passed: True + +## Query +Открой файл src/app_runtime/core/runtime.py + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 1, + "llm_answer": "Путь: src/app_runtime/core/runtime.py\n\nВ этом файле содержится определение класса `RuntimeManager`. В классе инициализируются различные компоненты системы, такие как конфигурация, службы, трассировка, здоровье, журналы, рабочие процессы и контрольная плоскость. Класс предназначен для управления выполнением действий в системе с заданными тайм-аутами и интервалами опроса.", + "answer_mode": "answered", + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "symbol_candidates": [], + "layers": [ + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-health-endpoint.json b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-health-endpoint.json new file mode 100644 index 0000000..b3155d7 --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-health-endpoint.json @@ -0,0 +1,4707 @@ +{ + "case_id": "plba-v2-trace-flow-health-endpoint", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "agent_runtime", + "mode": "full_chain", + "query": "Покажи как проходит запрос /health в HttpControlAppFactory", + "actual": { + "intent": "CODE_QA", + "sub_intent": "TRACE_FLOW", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 37, + "llm_answer": "1. HttpControlAppFactory.create(health_provider, action_provider)\n - Создает FastAPI приложение.\n - Добавляет middleware для логирования времени ответа.\n - Обрабатывает GET запрос к \"/health\".\n\n2. HttpControlAppFactory.create.health()\n - Вызывается при обработке запроса \"/health\".\n - Возвращает Awaitable объект типа HealthPayload.\n\n3. HttpControlAppFactory.create.action_provider()\n - Определяет поведение при запросе действий.\n\nПолный поток вызова от обработки запроса \"/health\" до получения HealthPayload отсутствует в предоставленных доказательствах.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "health", + "HttpControlAppFactory" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "query": "Покажи как проходит запрос /health в HttpControlAppFactory", + "router_result": { + "schema_version": "1.1", + "intent": "CODE_QA", + "retrieval_profile": "code", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query_plan": { + "raw": "Покажи как проходит запрос /health в HttpControlAppFactory", + "normalized": "Покажи как проходит запрос /health в HttpControlAppFactory", + "sub_intent": "TRACE_FLOW", + "negations": [], + "expansions": [ + "health", + "HttpControlAppFactory" + ], + "keyword_hints": [ + "health", + "HttpControlAppFactory" + ], + "path_hints": [], + "doc_scope_hints": [], + "symbol_candidates": [ + "health", + "HttpControlAppFactory" + ], + "symbol_kind_hint": "unknown", + "anchors": [ + { + "type": "SYMBOL", + "value": "health", + "source": "user_text", + "subtype": null, + "span": { + "start": 28, + "end": 34 + }, + "confidence": 0.88 + }, + { + "type": "SYMBOL", + "value": "HttpControlAppFactory", + "source": "user_text", + "subtype": null, + "span": { + "start": 37, + "end": 58 + }, + "confidence": 0.88 + } + ] + }, + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "top_k": 8 + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 8 + }, + { + "layer_id": "C4_SEMANTIC_ROLES", + "top_k": 8 + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "top_k": 10 + }, + { + "layer_id": "C3_ENTRYPOINTS", + "top_k": 10 + } + ], + "filters": { + "test_policy": "EXCLUDE", + "path_scope": [], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + }, + "symbol_resolution": { + "status": "pending", + "resolved_symbol": null, + "alternatives": [ + "health", + "HttpControlAppFactory" + ], + "confidence": 0.0 + }, + "evidence_policy": { + "require_def": true, + "require_flow": true, + "require_spec": false, + "allow_answer_without_evidence": false + } + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Покажи как проходит запрос /health в HttpControlAppFactory", + "sub_intent": "TRACE_FLOW", + "path_scope": [], + "keyword_hints": [ + "health", + "HttpControlAppFactory" + ], + "symbol_candidates": [ + "health", + "HttpControlAppFactory" + ], + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "top_k": 8 + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 8 + }, + { + "layer_id": "C4_SEMANTIC_ROLES", + "top_k": 8 + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "top_k": 10 + }, + { + "layer_id": "C3_ENTRYPOINTS", + "top_k": 10 + } + ], + "filters": { + "test_policy": "EXCLUDE", + "path_scope": [], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + }, + "query_plan": { + "raw": "Покажи как проходит запрос /health в HttpControlAppFactory", + "normalized": "Покажи как проходит запрос /health в HttpControlAppFactory", + "sub_intent": "TRACE_FLOW", + "negations": [], + "expansions": [ + "health", + "HttpControlAppFactory" + ], + "keyword_hints": [ + "health", + "HttpControlAppFactory" + ], + "path_hints": [], + "doc_scope_hints": [], + "symbol_candidates": [ + "health", + "HttpControlAppFactory" + ], + "symbol_kind_hint": "unknown", + "anchors": [ + { + "type": "SYMBOL", + "value": "health", + "source": "user_text", + "subtype": null, + "span": { + "start": 28, + "end": 34 + }, + "confidence": 0.88 + }, + { + "type": "SYMBOL", + "value": "HttpControlAppFactory", + "source": "user_text", + "subtype": null, + "span": { + "start": 37, + "end": 58 + }, + "confidence": 0.88 + } + ] + } + }, + "retrieval_result": { + "target_symbol_candidates": [ + "HttpControlAppFactory", + "ControlActionSet", + "ControlPlaneService", + "HealthContributor.health", + "HealthContributor", + "ControlChannel" + ], + "resolved_symbol": "HttpControlAppFactory", + "symbol_resolution_status": "resolved", + "file_candidates": [ + "src/app_runtime/control/http_app.py", + "src/app_runtime/control/http_channel.py", + "src/app_runtime/control/base.py", + "src/app_runtime/control/__init__.py", + "src/app_runtime/contracts/health.py", + "src/app_runtime/control/http_runner.py", + "src/app_runtime/control/service.py", + "src/app_runtime/health/registry.py", + "src/app_runtime/core/types.py" + ], + "code_chunks": [ + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/http_app.py", + "title": "HttpControlAppFactory", + "content": "class HttpControlAppFactory\nHttpControlAppFactory", + "start_line": 15, + "end_line": 53, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "qname": "HttpControlAppFactory", + "kind": "class", + "signature": "HttpControlAppFactory", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/http_channel.py", + "title": "HttpControlAppFactory", + "content": "const HttpControlAppFactory\nHttpControlAppFactory = app_runtime.control.http_app.HttpControlAppFactory", + "start_line": 8, + "end_line": 8, + "metadata": { + "symbol_id": "9ee00379ee797cd2386e88a6e37dc69e3e31de9144fc4b95f0206cd1430e8983", + "qname": "HttpControlAppFactory", + "kind": "const", + "signature": "HttpControlAppFactory = app_runtime.control.http_app.HttpControlAppFactory", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/base.py", + "title": "ControlActionSet", + "content": "class ControlActionSet\nControlActionSet", + "start_line": 14, + "end_line": 18, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "qname": "ControlActionSet", + "kind": "class", + "signature": "ControlActionSet", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/__init__.py", + "title": "ControlPlaneService", + "content": "const ControlPlaneService\nControlPlaneService = app_runtime.control.service.ControlPlaneService", + "start_line": 3, + "end_line": 3, + "metadata": { + "symbol_id": "217e8f044d1c01644bf7b81e5046af9e84469210c692a2fb0c476a19bb069ae1", + "qname": "ControlPlaneService", + "kind": "const", + "signature": "ControlPlaneService = app_runtime.control.service.ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/contracts/health.py", + "title": "HealthContributor.health", + "content": "method HealthContributor.health\nhealth(self)\nReturn contributor health state.", + "start_line": 9, + "end_line": 10, + "metadata": { + "symbol_id": "728cff18958d8a25e2661a0f08c83d68c3bbbfa8cef212b85dc0da2b11b3dc90", + "qname": "HealthContributor.health", + "kind": "method", + "signature": "health(self)", + "parent_symbol_id": "HealthContributor", + "package_or_module": "src.app_runtime.contracts.health", + "is_test": false, + "blob_sha": "6bd92611def7131e32d4dd34a8ed85e6cf3c67722ad27797032a632cb30dc097", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/contracts/health.py", + "title": "HealthContributor", + "content": "class HealthContributor\nHealthContributor(ABC)", + "start_line": 7, + "end_line": 10, + "metadata": { + "symbol_id": "db91ae387b89a2e9d83829754f27fa18a4055b3e72d7f31789a0b8e0bf5bba0b", + "qname": "HealthContributor", + "kind": "class", + "signature": "HealthContributor(ABC)", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.contracts.health", + "is_test": false, + "blob_sha": "6bd92611def7131e32d4dd34a8ed85e6cf3c67722ad27797032a632cb30dc097", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/__init__.py", + "title": "ControlActionSet", + "content": "const ControlActionSet\nControlActionSet = app_runtime.control.base.ControlActionSet", + "start_line": 1, + "end_line": 1, + "metadata": { + "symbol_id": "767e4ac0d4224aeccb0783a38359d3c03899a876736eb83d99887c16ea07cc6c", + "qname": "ControlActionSet", + "kind": "const", + "signature": "ControlActionSet = app_runtime.control.base.ControlActionSet", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/__init__.py", + "title": "ControlChannel", + "content": "const ControlChannel\nControlChannel = app_runtime.control.base.ControlChannel", + "start_line": 1, + "end_line": 1, + "metadata": { + "symbol_id": "268420f7aa4ed74082b9276cae0cded4f00bac090ffd58fa020a65be0fe19c27", + "qname": "ControlChannel", + "kind": "const", + "signature": "ControlChannel = app_runtime.control.base.ControlChannel", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/http_channel.py", + "title": "src/app_runtime/control/http_channel.py:HttpControlChannel", + "content": "class HttpControlChannel(ControlChannel):\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._timeout = timeout\n self._runner = UvicornThreadRunner(host, port, timeout)\n self._factory = HttpControlAppFactory()\n self._actions: ControlActionSet | None = None\n\n async def start(self, actions: ControlActionSet) -> None:\n self._actions = actions\n app = self._factory.create(self._health_response, self._action_response)\n await self._runner.start(app)\n\n async def stop(self) -> None:\n await self._runner.stop()\n\n @property\n def port(self) -> int:\n return self._runner.port\n\n async def _health_response(self) -> dict[str, object]:\n if self._actions is None:\n return {\"status\": \"unhealthy\", \"detail\": \"control actions are not configured\"}\n return await asyncio.wait_for(self._actions.health(), timeout=float(self._timeout))\n\n async def _action_response(self, action: str, _client_source: str = \"unknown\") -> JSONResponse:\n if self._actions is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"{action} handler is not configured\"}, status_code=404)\n callbacks = {\n \"start\": self._actions.start,\n \"stop\": self._actions.stop,\n \"status\": self._actions.status,\n }\n callback = callbacks.get(action)\n if callback is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"unsupported action: {action}\"}, status_code=404)\n action_timeout = max(float(self._timeout), 10.0) if action in {\"start\", \"stop\"} else float(self._timeout)\n try:\n detail = await asyncio.wait_for(callback(), timeout=action_timeout)\n except asyncio.TimeoutError:\n return JSONResponse(\n content={\"status\": \"accepted\", \"detail\": f\"{action} operation is still in progress\"},\n status_code=202,\n )\n except Exception as exc:\n return JSONResponse(content={\"status\": \"error\", \"detail\": str(exc)}, status_code=500)\n return JSONResponse(content={\"status\": \"ok\", \"detail\": detail or f\"{action} action accepted\"}, status_code=200)", + "start_line": 12, + "end_line": 57, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/http_runner.py", + "title": "src/app_runtime/control/http_runner.py:UvicornThreadRunner", + "content": "class UvicornThreadRunner:\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._host = host\n self._port = port\n self._timeout = timeout\n self._server: Server | None = None\n self._thread: Thread | None = None\n self._error: BaseException | None = None\n\n async def start(self, app: FastAPI) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._error = None\n config = Config(app=app, host=self._host, port=self._port, log_level=\"warning\")\n self._server = Server(config)\n self._thread = Thread(target=self._serve, name=\"plba-http-control\", daemon=True)\n self._thread.start()\n await self._wait_until_started()\n\n async def stop(self) -> None:\n if self._server is None or self._thread is None:\n return\n self._server.should_exit = True\n await asyncio.to_thread(self._thread.join, self._timeout)\n self._server = None\n self._thread = None\n\n @property\n def port(self) -> int:\n if self._server is None or not getattr(self._server, \"servers\", None):\n return self._port\n socket = self._server.servers[0].sockets[0]\n return int(socket.getsockname()[1])\n\n async def _wait_until_started(self) -> None:\n if self._server is None:\n raise RuntimeError(\"Server is not initialized\")\n deadline = asyncio.get_running_loop().time() + max(float(self._timeout), 1.0)\n while not self._server.started:\n if self._error is not None:\n raise RuntimeError(\"HTTP control server failed to start\") from self._error\n if asyncio.get_running_loop().time() >= deadline:\n raise TimeoutError(\"HTTP control server startup timed out\")\n await asyncio.sleep(0.05)\n\n def _serve(self) -> None:\n if self._server is None:\n return\n try:\n asyncio.run(self._server.serve())\n except BaseException as exc: # noqa: BLE001\n self._error = exc", + "start_line": 10, + "end_line": 61, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_runner", + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/http_app.py", + "title": "src/app_runtime/control/http_app.py:HttpControlAppFactory", + "content": "class HttpControlAppFactory:\n def create(\n self,\n health_provider: Callable[[], Awaitable[HealthPayload]],\n action_provider: Callable[[str, str], Awaitable[JSONResponse]],\n ) -> FastAPI:\n app = FastAPI(title=\"PLBA Control API\")\n\n @app.middleware(\"http\")\n async def log_api_call(request: Request, call_next): # type: ignore[no-untyped-def]\n started = time.monotonic()\n response = await call_next(request)\n response.headers[\"X-Response-Time-Ms\"] = str(int((time.monotonic() - started) * 1000))\n return response\n\n @app.get(\"/health\")\n async def health() -> JSONResponse:\n payload = await health_provider()\n status_code = 200 if payload.get(\"status\") == \"ok\" else 503\n return JSONResponse(content=payload, status_code=status_code)\n\n @app.get(\"/actions/{action}\")\n @app.post(\"/actions/{action}\")\n async def action(action: str, request: Request) -> JSONResponse:\n client_source = self._client_source(request)\n if action in {\"start\", \"stop\"}:\n LOGGER.warning(\"Control action requested: /actions/%s client=%s\", action, client_source)\n return await action_provider(action, client_source)\n\n return app\n\n def _client_source(self, request: Request) -> str:\n explicit_header = request.headers.get(\"X-Client-Source\", \"\").strip()\n if explicit_header:\n return explicit_header\n user_agent = request.headers.get(\"User-Agent\", \"\").strip()\n if user_agent:\n return f\"user-agent:{user_agent}\"\n return \"unknown\"", + "start_line": 15, + "end_line": 53, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/contracts/health.py", + "title": "src/app_runtime/contracts/health.py:HealthContributor", + "content": "class HealthContributor(ABC):\n @abstractmethod\n def health(self) -> WorkerHealth:\n \"\"\"Return contributor health state.\"\"\"", + "start_line": 7, + "end_line": 10, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.health", + "is_test": false, + "blob_sha": "6bd92611def7131e32d4dd34a8ed85e6cf3c67722ad27797032a632cb30dc097", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/base.py", + "title": "src/app_runtime/control/base.py:ControlChannel", + "content": "class ControlChannel(ABC):\n @abstractmethod\n async def start(self, actions: ControlActionSet) -> None:\n \"\"\"Start the control channel and bind handlers.\"\"\"\n\n @abstractmethod\n async def stop(self) -> None:\n \"\"\"Stop the control channel and release resources.\"\"\"", + "start_line": 21, + "end_line": 28, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/__init__.py", + "title": "src/app_runtime/control/__init__.py:1-5", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\"ControlActionSet\", \"ControlChannel\", \"ControlPlaneService\", \"HttpControlChannel\"]", + "start_line": 1, + "end_line": 5, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/base.py", + "title": "src/app_runtime/control/base.py:ControlActionSet", + "content": "class ControlActionSet:\n health: HealthHandler\n start: ActionHandler\n stop: ActionHandler\n status: ActionHandler", + "start_line": 14, + "end_line": 18, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/service.py", + "title": "src/app_runtime/control/service.py:ControlPlaneService", + "content": "class ControlPlaneService:\n def __init__(self) -> None:\n self._channels: list[ControlChannel] = []\n\n def register_channel(self, channel: ControlChannel) -> None:\n self._channels.append(channel)\n\n def start(self, runtime: RuntimeManager) -> None:\n if not self._channels:\n return\n asyncio.run(self._start_async(runtime))\n\n def stop(self) -> None:\n if not self._channels:\n return\n asyncio.run(self._stop_async())\n\n def snapshot(self, runtime: RuntimeManager) -> dict[str, object]:\n health = runtime.current_health()\n return {\n \"runtime\": {\"state\": runtime._state.value},\n \"modules\": list(runtime.registry.modules),\n \"services\": runtime.services.snapshot(),\n \"workers\": runtime.workers.snapshot(),\n \"health\": runtime.health.snapshot(runtime.workers.healths()) | {\"status\": health[\"status\"]},\n \"config\": runtime.configuration.get(),\n }\n\n async def _start_async(self, runtime: RuntimeManager) -> None:\n actions = ControlActionSet(\n health=runtime.health_status,\n start=runtime.start_runtime,\n stop=runtime.stop_runtime,\n status=runtime.runtime_status,\n )\n for channel in self._channels:\n await channel.start(actions)\n\n async def _stop_async(self) -> None:\n for channel in reversed(self._channels):\n await channel.stop()", + "start_line": 12, + "end_line": 52, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/http_app.py", + "title": "HttpControlAppFactory", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "start_line": 15, + "end_line": 53, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/health/registry.py", + "title": "HealthRegistry", + "content": "HealthRegistry\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (2)", + "start_line": 8, + "end_line": 56, + "metadata": { + "symbol_id": "fd3390eb0ba29c9979466b9c2117238e0da3bb829eeb4d505cb34c9c3df7a8e8", + "symbol_name": "HealthRegistry", + "qname": "HealthRegistry", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 2, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "26e6a24daa43407ba5340b74497c20153020e79f8d7828ae502aaec378dfcf75", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/core/types.py", + "title": "HealthPayload", + "content": "HealthPayload\nrole: model\n\nResponsibilities:\n- default model role", + "start_line": 7, + "end_line": 11, + "metadata": { + "symbol_id": "392235d63ddf752d6e419cb8528c93fe070d1bc02d3c87ba6a897baac810cf5d", + "symbol_name": "HealthPayload", + "qname": "HealthPayload", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "448a02e4a432b5ab65b246b2bd24a32a6f127b9d2091ea73b53ee3c0a2f53bb3", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/contracts/health.py", + "title": "HealthContributor", + "content": "HealthContributor\nrole: model\n\nResponsibilities:\n- default model role", + "start_line": 7, + "end_line": 10, + "metadata": { + "symbol_id": "db91ae387b89a2e9d83829754f27fa18a4055b3e72d7f31789a0b8e0bf5bba0b", + "symbol_name": "HealthContributor", + "qname": "HealthContributor", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "6bd92611def7131e32d4dd34a8ed85e6cf3c67722ad27797032a632cb30dc097", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/base.py", + "title": "ControlActionSet", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "start_line": 14, + "end_line": 18, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/base.py", + "title": "ControlChannel", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "start_line": 21, + "end_line": 28, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "start_line": 12, + "end_line": 52, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/http_runner.py", + "title": "UvicornThreadRunner", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "start_line": 10, + "end_line": 61, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/health/registry.py", + "title": "HealthRegistry.__init__:dataflow_slice", + "content": "HealthRegistry.__init__\n -> HealthRegistry._contributors\n -> HealthRegistry.register", + "start_line": 10, + "end_line": 13, + "metadata": { + "edge_id": "2381dfb339d541367c3251d2a610cac9d8b3f6bd6a352e119d00a93c5ccc2b7d", + "edge_type": "dataflow_slice", + "src_symbol_id": "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "src_qname": "HealthRegistry.__init__", + "dst_symbol_id": "a9e1f290c346c8bb1d67af0cafeebb5bcaf29c3ed7027e33c794532743df38f2", + "dst_ref": "HealthRegistry.register", + "resolution": "resolved", + "slice_id": "2381dfb339d541367c3251d2a610cac9d8b3f6bd6a352e119d00a93c5ccc2b7d", + "root_symbol_id": "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "path_symbols": [ + "HealthRegistry.__init__", + "HealthRegistry._contributors", + "HealthRegistry.register" + ], + "path_symbol_ids": [ + "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "a9e1f290c346c8bb1d67af0cafeebb5bcaf29c3ed7027e33c794532743df38f2" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "26e6a24daa43407ba5340b74497c20153020e79f8d7828ae502aaec378dfcf75", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "start_line": 14, + "end_line": 20, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "start_line": 14, + "end_line": 25, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "start_line": 14, + "end_line": 51, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/health/registry.py", + "title": "HealthRegistry.__init__:dataflow_slice", + "content": "HealthRegistry.__init__\n -> HealthRegistry._contributors\n -> HealthRegistry.contributor_healths", + "start_line": 10, + "end_line": 16, + "metadata": { + "edge_id": "d3a88a7abf16359e903e809ffc24473658fdd8198f60641fe1584fc4ac663c31", + "edge_type": "dataflow_slice", + "src_symbol_id": "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "src_qname": "HealthRegistry.__init__", + "dst_symbol_id": "fa7bbd8f4b64a55a5088640c30f52e84075d65f531bd7e1f6c1d7bb8d24fcbf2", + "dst_ref": "HealthRegistry.contributor_healths", + "resolution": "resolved", + "slice_id": "d3a88a7abf16359e903e809ffc24473658fdd8198f60641fe1584fc4ac663c31", + "root_symbol_id": "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "path_symbols": [ + "HealthRegistry.__init__", + "HealthRegistry._contributors", + "HealthRegistry.contributor_healths" + ], + "path_symbol_ids": [ + "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "fa7bbd8f4b64a55a5088640c30f52e84075d65f531bd7e1f6c1d7bb8d24fcbf2" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "26e6a24daa43407ba5340b74497c20153020e79f8d7828ae502aaec378dfcf75", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "start_line": 14, + "end_line": 47, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "start_line": 14, + "end_line": 17, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/http_app.py", + "title": "HttpControlAppFactory.create:calls", + "content": "HttpControlAppFactory.create calls time.monotonic", + "start_line": 25, + "end_line": 25, + "metadata": { + "edge_id": "3fdd0a88d10225ee74f3b84ab57e13f09f5ccc72f00e31af9ae4655411c289c0", + "edge_type": "calls", + "src_symbol_id": "4af42c2a9275d652e710a98ec48b8247236b4453a093629f8958704ff6d3cb58", + "src_qname": "HttpControlAppFactory.create", + "dst_symbol_id": null, + "dst_ref": "time.monotonic", + "resolution": "partial", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/http_app.py", + "title": "HttpControlAppFactory.create:calls", + "content": "HttpControlAppFactory.create calls app.post", + "start_line": 37, + "end_line": 37, + "metadata": { + "edge_id": "0e545d4b5187db7bec5ceac03071d2ad68177550c42af748fee364639e533c90", + "edge_type": "calls", + "src_symbol_id": "4af42c2a9275d652e710a98ec48b8247236b4453a093629f8958704ff6d3cb58", + "src_qname": "HttpControlAppFactory.create", + "dst_symbol_id": null, + "dst_ref": "app.post", + "resolution": "partial", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/http_app.py", + "title": "HttpControlAppFactory.create:calls", + "content": "HttpControlAppFactory.create calls str", + "start_line": 27, + "end_line": 27, + "metadata": { + "edge_id": "2a87c51461e31cd556508cc37fdff37b4d24c26f7f1604db30af5e8f1bda96cb", + "edge_type": "calls", + "src_symbol_id": "4af42c2a9275d652e710a98ec48b8247236b4453a093629f8958704ff6d3cb58", + "src_qname": "HttpControlAppFactory.create", + "dst_symbol_id": null, + "dst_ref": "str", + "resolution": "partial", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C3_ENTRYPOINTS", + "path": "src/app_runtime/control/http_app.py", + "title": "app.post", + "content": "fastapi http app.post", + "start_line": 38, + "end_line": 42, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C3_ENTRYPOINTS", + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "content": "fastapi http app.get", + "start_line": 31, + "end_line": 34, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C3_ENTRYPOINTS", + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "content": "fastapi http app.get", + "start_line": 38, + "end_line": 42, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "relations": [ + { + "path": "src/app_runtime/health/registry.py", + "metadata": { + "edge_id": "2381dfb339d541367c3251d2a610cac9d8b3f6bd6a352e119d00a93c5ccc2b7d", + "edge_type": "dataflow_slice", + "src_symbol_id": "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "src_qname": "HealthRegistry.__init__", + "dst_symbol_id": "a9e1f290c346c8bb1d67af0cafeebb5bcaf29c3ed7027e33c794532743df38f2", + "dst_ref": "HealthRegistry.register", + "resolution": "resolved", + "slice_id": "2381dfb339d541367c3251d2a610cac9d8b3f6bd6a352e119d00a93c5ccc2b7d", + "root_symbol_id": "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "path_symbols": [ + "HealthRegistry.__init__", + "HealthRegistry._contributors", + "HealthRegistry.register" + ], + "path_symbol_ids": [ + "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "a9e1f290c346c8bb1d67af0cafeebb5bcaf29c3ed7027e33c794532743df38f2" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "26e6a24daa43407ba5340b74497c20153020e79f8d7828ae502aaec378dfcf75", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "HealthRegistry.__init__\n -> HealthRegistry._contributors\n -> HealthRegistry.register" + }, + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start" + }, + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop" + }, + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async" + }, + { + "path": "src/app_runtime/health/registry.py", + "metadata": { + "edge_id": "d3a88a7abf16359e903e809ffc24473658fdd8198f60641fe1584fc4ac663c31", + "edge_type": "dataflow_slice", + "src_symbol_id": "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "src_qname": "HealthRegistry.__init__", + "dst_symbol_id": "fa7bbd8f4b64a55a5088640c30f52e84075d65f531bd7e1f6c1d7bb8d24fcbf2", + "dst_ref": "HealthRegistry.contributor_healths", + "resolution": "resolved", + "slice_id": "d3a88a7abf16359e903e809ffc24473658fdd8198f60641fe1584fc4ac663c31", + "root_symbol_id": "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "path_symbols": [ + "HealthRegistry.__init__", + "HealthRegistry._contributors", + "HealthRegistry.contributor_healths" + ], + "path_symbol_ids": [ + "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "fa7bbd8f4b64a55a5088640c30f52e84075d65f531bd7e1f6c1d7bb8d24fcbf2" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "26e6a24daa43407ba5340b74497c20153020e79f8d7828ae502aaec378dfcf75", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "HealthRegistry.__init__\n -> HealthRegistry._contributors\n -> HealthRegistry.contributor_healths" + }, + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async" + }, + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel" + }, + { + "path": "src/app_runtime/control/http_app.py", + "metadata": { + "edge_id": "3fdd0a88d10225ee74f3b84ab57e13f09f5ccc72f00e31af9ae4655411c289c0", + "edge_type": "calls", + "src_symbol_id": "4af42c2a9275d652e710a98ec48b8247236b4453a093629f8958704ff6d3cb58", + "src_qname": "HttpControlAppFactory.create", + "dst_symbol_id": null, + "dst_ref": "time.monotonic", + "resolution": "partial", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "HttpControlAppFactory.create calls time.monotonic" + }, + { + "path": "src/app_runtime/control/http_app.py", + "metadata": { + "edge_id": "0e545d4b5187db7bec5ceac03071d2ad68177550c42af748fee364639e533c90", + "edge_type": "calls", + "src_symbol_id": "4af42c2a9275d652e710a98ec48b8247236b4453a093629f8958704ff6d3cb58", + "src_qname": "HttpControlAppFactory.create", + "dst_symbol_id": null, + "dst_ref": "app.post", + "resolution": "partial", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "HttpControlAppFactory.create calls app.post" + }, + { + "path": "src/app_runtime/control/http_app.py", + "metadata": { + "edge_id": "2a87c51461e31cd556508cc37fdff37b4d24c26f7f1604db30af5e8f1bda96cb", + "edge_type": "calls", + "src_symbol_id": "4af42c2a9275d652e710a98ec48b8247236b4453a093629f8958704ff6d3cb58", + "src_qname": "HttpControlAppFactory.create", + "dst_symbol_id": null, + "dst_ref": "str", + "resolution": "partial", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "HttpControlAppFactory.create calls str" + } + ], + "entrypoints": [ + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.post", + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "test_candidates": [], + "layer_outcomes": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C4_SEMANTIC_ROLES", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 10, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C3_ENTRYPOINTS", + "hit_count": 3, + "empty": false, + "fallback_used": false + } + ], + "missing_layers": [], + "raw_rows": [ + { + "path": "src/app_runtime/control/http_app.py", + "content": "class HttpControlAppFactory\nHttpControlAppFactory", + "layer": "C1_SYMBOL_CATALOG", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "qname": "HttpControlAppFactory", + "kind": "class", + "signature": "HttpControlAppFactory", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "const HttpControlAppFactory\nHttpControlAppFactory = app_runtime.control.http_app.HttpControlAppFactory", + "layer": "C1_SYMBOL_CATALOG", + "title": "HttpControlAppFactory", + "span_start": 8, + "span_end": 8, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "9ee00379ee797cd2386e88a6e37dc69e3e31de9144fc4b95f0206cd1430e8983", + "qname": "HttpControlAppFactory", + "kind": "const", + "signature": "HttpControlAppFactory = app_runtime.control.http_app.HttpControlAppFactory", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlActionSet\nControlActionSet", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "qname": "ControlActionSet", + "kind": "class", + "signature": "ControlActionSet", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "const ControlPlaneService\nControlPlaneService = app_runtime.control.service.ControlPlaneService", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlPlaneService", + "span_start": 3, + "span_end": 3, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "217e8f044d1c01644bf7b81e5046af9e84469210c692a2fb0c476a19bb069ae1", + "qname": "ControlPlaneService", + "kind": "const", + "signature": "ControlPlaneService = app_runtime.control.service.ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/health.py", + "content": "method HealthContributor.health\nhealth(self)\nReturn contributor health state.", + "layer": "C1_SYMBOL_CATALOG", + "title": "HealthContributor.health", + "span_start": 9, + "span_end": 10, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "728cff18958d8a25e2661a0f08c83d68c3bbbfa8cef212b85dc0da2b11b3dc90", + "qname": "HealthContributor.health", + "kind": "method", + "signature": "health(self)", + "parent_symbol_id": "HealthContributor", + "package_or_module": "src.app_runtime.contracts.health", + "is_test": false, + "blob_sha": "6bd92611def7131e32d4dd34a8ed85e6cf3c67722ad27797032a632cb30dc097", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/health.py", + "content": "class HealthContributor\nHealthContributor(ABC)", + "layer": "C1_SYMBOL_CATALOG", + "title": "HealthContributor", + "span_start": 7, + "span_end": 10, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "db91ae387b89a2e9d83829754f27fa18a4055b3e72d7f31789a0b8e0bf5bba0b", + "qname": "HealthContributor", + "kind": "class", + "signature": "HealthContributor(ABC)", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.contracts.health", + "is_test": false, + "blob_sha": "6bd92611def7131e32d4dd34a8ed85e6cf3c67722ad27797032a632cb30dc097", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "const ControlActionSet\nControlActionSet = app_runtime.control.base.ControlActionSet", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlActionSet", + "span_start": 1, + "span_end": 1, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "767e4ac0d4224aeccb0783a38359d3c03899a876736eb83d99887c16ea07cc6c", + "qname": "ControlActionSet", + "kind": "const", + "signature": "ControlActionSet = app_runtime.control.base.ControlActionSet", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "const ControlChannel\nControlChannel = app_runtime.control.base.ControlChannel", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlChannel", + "span_start": 1, + "span_end": 1, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "268420f7aa4ed74082b9276cae0cded4f00bac090ffd58fa020a65be0fe19c27", + "qname": "ControlChannel", + "kind": "const", + "signature": "ControlChannel = app_runtime.control.base.ControlChannel", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel(ControlChannel):\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._timeout = timeout\n self._runner = UvicornThreadRunner(host, port, timeout)\n self._factory = HttpControlAppFactory()\n self._actions: ControlActionSet | None = None\n\n async def start(self, actions: ControlActionSet) -> None:\n self._actions = actions\n app = self._factory.create(self._health_response, self._action_response)\n await self._runner.start(app)\n\n async def stop(self) -> None:\n await self._runner.stop()\n\n @property\n def port(self) -> int:\n return self._runner.port\n\n async def _health_response(self) -> dict[str, object]:\n if self._actions is None:\n return {\"status\": \"unhealthy\", \"detail\": \"control actions are not configured\"}\n return await asyncio.wait_for(self._actions.health(), timeout=float(self._timeout))\n\n async def _action_response(self, action: str, _client_source: str = \"unknown\") -> JSONResponse:\n if self._actions is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"{action} handler is not configured\"}, status_code=404)\n callbacks = {\n \"start\": self._actions.start,\n \"stop\": self._actions.stop,\n \"status\": self._actions.status,\n }\n callback = callbacks.get(action)\n if callback is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"unsupported action: {action}\"}, status_code=404)\n action_timeout = max(float(self._timeout), 10.0) if action in {\"start\", \"stop\"} else float(self._timeout)\n try:\n detail = await asyncio.wait_for(callback(), timeout=action_timeout)\n except asyncio.TimeoutError:\n return JSONResponse(\n content={\"status\": \"accepted\", \"detail\": f\"{action} operation is still in progress\"},\n status_code=202,\n )\n except Exception as exc:\n return JSONResponse(content={\"status\": \"error\", \"detail\": str(exc)}, status_code=500)\n return JSONResponse(content={\"status\": \"ok\", \"detail\": detail or f\"{action} action accepted\"}, status_code=200)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_channel.py:HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "class UvicornThreadRunner:\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._host = host\n self._port = port\n self._timeout = timeout\n self._server: Server | None = None\n self._thread: Thread | None = None\n self._error: BaseException | None = None\n\n async def start(self, app: FastAPI) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._error = None\n config = Config(app=app, host=self._host, port=self._port, log_level=\"warning\")\n self._server = Server(config)\n self._thread = Thread(target=self._serve, name=\"plba-http-control\", daemon=True)\n self._thread.start()\n await self._wait_until_started()\n\n async def stop(self) -> None:\n if self._server is None or self._thread is None:\n return\n self._server.should_exit = True\n await asyncio.to_thread(self._thread.join, self._timeout)\n self._server = None\n self._thread = None\n\n @property\n def port(self) -> int:\n if self._server is None or not getattr(self._server, \"servers\", None):\n return self._port\n socket = self._server.servers[0].sockets[0]\n return int(socket.getsockname()[1])\n\n async def _wait_until_started(self) -> None:\n if self._server is None:\n raise RuntimeError(\"Server is not initialized\")\n deadline = asyncio.get_running_loop().time() + max(float(self._timeout), 1.0)\n while not self._server.started:\n if self._error is not None:\n raise RuntimeError(\"HTTP control server failed to start\") from self._error\n if asyncio.get_running_loop().time() >= deadline:\n raise TimeoutError(\"HTTP control server startup timed out\")\n await asyncio.sleep(0.05)\n\n def _serve(self) -> None:\n if self._server is None:\n return\n try:\n asyncio.run(self._server.serve())\n except BaseException as exc: # noqa: BLE001\n self._error = exc", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_runner.py:UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_runner", + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "class HttpControlAppFactory:\n def create(\n self,\n health_provider: Callable[[], Awaitable[HealthPayload]],\n action_provider: Callable[[str, str], Awaitable[JSONResponse]],\n ) -> FastAPI:\n app = FastAPI(title=\"PLBA Control API\")\n\n @app.middleware(\"http\")\n async def log_api_call(request: Request, call_next): # type: ignore[no-untyped-def]\n started = time.monotonic()\n response = await call_next(request)\n response.headers[\"X-Response-Time-Ms\"] = str(int((time.monotonic() - started) * 1000))\n return response\n\n @app.get(\"/health\")\n async def health() -> JSONResponse:\n payload = await health_provider()\n status_code = 200 if payload.get(\"status\") == \"ok\" else 503\n return JSONResponse(content=payload, status_code=status_code)\n\n @app.get(\"/actions/{action}\")\n @app.post(\"/actions/{action}\")\n async def action(action: str, request: Request) -> JSONResponse:\n client_source = self._client_source(request)\n if action in {\"start\", \"stop\"}:\n LOGGER.warning(\"Control action requested: /actions/%s client=%s\", action, client_source)\n return await action_provider(action, client_source)\n\n return app\n\n def _client_source(self, request: Request) -> str:\n explicit_header = request.headers.get(\"X-Client-Source\", \"\").strip()\n if explicit_header:\n return explicit_header\n user_agent = request.headers.get(\"User-Agent\", \"\").strip()\n if user_agent:\n return f\"user-agent:{user_agent}\"\n return \"unknown\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_app.py:HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/health.py", + "content": "class HealthContributor(ABC):\n @abstractmethod\n def health(self) -> WorkerHealth:\n \"\"\"Return contributor health state.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/contracts/health.py:HealthContributor", + "span_start": 7, + "span_end": 10, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.health", + "is_test": false, + "blob_sha": "6bd92611def7131e32d4dd34a8ed85e6cf3c67722ad27797032a632cb30dc097", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlChannel(ABC):\n @abstractmethod\n async def start(self, actions: ControlActionSet) -> None:\n \"\"\"Start the control channel and bind handlers.\"\"\"\n\n @abstractmethod\n async def stop(self) -> None:\n \"\"\"Stop the control channel and release resources.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\"ControlActionSet\", \"ControlChannel\", \"ControlPlaneService\", \"HttpControlChannel\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/__init__.py:1-5", + "span_start": 1, + "span_end": 5, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlActionSet:\n health: HealthHandler\n start: ActionHandler\n stop: ActionHandler\n status: ActionHandler", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "class ControlPlaneService:\n def __init__(self) -> None:\n self._channels: list[ControlChannel] = []\n\n def register_channel(self, channel: ControlChannel) -> None:\n self._channels.append(channel)\n\n def start(self, runtime: RuntimeManager) -> None:\n if not self._channels:\n return\n asyncio.run(self._start_async(runtime))\n\n def stop(self) -> None:\n if not self._channels:\n return\n asyncio.run(self._stop_async())\n\n def snapshot(self, runtime: RuntimeManager) -> dict[str, object]:\n health = runtime.current_health()\n return {\n \"runtime\": {\"state\": runtime._state.value},\n \"modules\": list(runtime.registry.modules),\n \"services\": runtime.services.snapshot(),\n \"workers\": runtime.workers.snapshot(),\n \"health\": runtime.health.snapshot(runtime.workers.healths()) | {\"status\": health[\"status\"]},\n \"config\": runtime.configuration.get(),\n }\n\n async def _start_async(self, runtime: RuntimeManager) -> None:\n actions = ControlActionSet(\n health=runtime.health_status,\n start=runtime.start_runtime,\n stop=runtime.stop_runtime,\n status=runtime.runtime_status,\n )\n for channel in self._channels:\n await channel.start(actions)\n\n async def _stop_async(self) -> None:\n for channel in reversed(self._channels):\n await channel.stop()", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/service.py:ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/health/registry.py", + "content": "HealthRegistry\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (2)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HealthRegistry", + "span_start": 8, + "span_end": 56, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 29, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "fd3390eb0ba29c9979466b9c2117238e0da3bb829eeb4d505cb34c9c3df7a8e8", + "symbol_name": "HealthRegistry", + "qname": "HealthRegistry", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 2, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "26e6a24daa43407ba5340b74497c20153020e79f8d7828ae502aaec378dfcf75", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/types.py", + "content": "HealthPayload\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "HealthPayload", + "span_start": 7, + "span_end": 11, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "392235d63ddf752d6e419cb8528c93fe070d1bc02d3c87ba6a897baac810cf5d", + "symbol_name": "HealthPayload", + "qname": "HealthPayload", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "448a02e4a432b5ab65b246b2bd24a32a6f127b9d2091ea73b53ee3c0a2f53bb3", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/health.py", + "content": "HealthContributor\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "HealthContributor", + "span_start": 7, + "span_end": 10, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "db91ae387b89a2e9d83829754f27fa18a4055b3e72d7f31789a0b8e0bf5bba0b", + "symbol_name": "HealthContributor", + "qname": "HealthContributor", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "6bd92611def7131e32d4dd34a8ed85e6cf3c67722ad27797032a632cb30dc097", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/health/registry.py", + "content": "HealthRegistry.__init__\n -> HealthRegistry._contributors\n -> HealthRegistry.register", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HealthRegistry.__init__:dataflow_slice", + "span_start": 10, + "span_end": 13, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "2381dfb339d541367c3251d2a610cac9d8b3f6bd6a352e119d00a93c5ccc2b7d", + "edge_type": "dataflow_slice", + "src_symbol_id": "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "src_qname": "HealthRegistry.__init__", + "dst_symbol_id": "a9e1f290c346c8bb1d67af0cafeebb5bcaf29c3ed7027e33c794532743df38f2", + "dst_ref": "HealthRegistry.register", + "resolution": "resolved", + "slice_id": "2381dfb339d541367c3251d2a610cac9d8b3f6bd6a352e119d00a93c5ccc2b7d", + "root_symbol_id": "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "path_symbols": [ + "HealthRegistry.__init__", + "HealthRegistry._contributors", + "HealthRegistry.register" + ], + "path_symbol_ids": [ + "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "a9e1f290c346c8bb1d67af0cafeebb5bcaf29c3ed7027e33c794532743df38f2" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "26e6a24daa43407ba5340b74497c20153020e79f8d7828ae502aaec378dfcf75", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/health/registry.py", + "content": "HealthRegistry.__init__\n -> HealthRegistry._contributors\n -> HealthRegistry.contributor_healths", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HealthRegistry.__init__:dataflow_slice", + "span_start": 10, + "span_end": 16, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "d3a88a7abf16359e903e809ffc24473658fdd8198f60641fe1584fc4ac663c31", + "edge_type": "dataflow_slice", + "src_symbol_id": "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "src_qname": "HealthRegistry.__init__", + "dst_symbol_id": "fa7bbd8f4b64a55a5088640c30f52e84075d65f531bd7e1f6c1d7bb8d24fcbf2", + "dst_ref": "HealthRegistry.contributor_healths", + "resolution": "resolved", + "slice_id": "d3a88a7abf16359e903e809ffc24473658fdd8198f60641fe1584fc4ac663c31", + "root_symbol_id": "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "path_symbols": [ + "HealthRegistry.__init__", + "HealthRegistry._contributors", + "HealthRegistry.contributor_healths" + ], + "path_symbol_ids": [ + "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "fa7bbd8f4b64a55a5088640c30f52e84075d65f531bd7e1f6c1d7bb8d24fcbf2" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "26e6a24daa43407ba5340b74497c20153020e79f8d7828ae502aaec378dfcf75", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory.create calls time.monotonic", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlAppFactory.create:calls", + "span_start": 25, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "3fdd0a88d10225ee74f3b84ab57e13f09f5ccc72f00e31af9ae4655411c289c0", + "edge_type": "calls", + "src_symbol_id": "4af42c2a9275d652e710a98ec48b8247236b4453a093629f8958704ff6d3cb58", + "src_qname": "HttpControlAppFactory.create", + "dst_symbol_id": null, + "dst_ref": "time.monotonic", + "resolution": "partial", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory.create calls app.post", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlAppFactory.create:calls", + "span_start": 37, + "span_end": 37, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "0e545d4b5187db7bec5ceac03071d2ad68177550c42af748fee364639e533c90", + "edge_type": "calls", + "src_symbol_id": "4af42c2a9275d652e710a98ec48b8247236b4453a093629f8958704ff6d3cb58", + "src_qname": "HttpControlAppFactory.create", + "dst_symbol_id": null, + "dst_ref": "app.post", + "resolution": "partial", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory.create calls str", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlAppFactory.create:calls", + "span_start": 27, + "span_end": 27, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "2a87c51461e31cd556508cc37fdff37b4d24c26f7f1604db30af5e8f1bda96cb", + "edge_type": "calls", + "src_symbol_id": "4af42c2a9275d652e710a98ec48b8247236b4453a093629f8958704ff6d3cb58", + "src_qname": "HttpControlAppFactory.create", + "dst_symbol_id": null, + "dst_ref": "str", + "resolution": "partial", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": null, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": null, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": null, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "retrieval_report": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "vector", + "C0_SOURCE_CHUNKS": "vector", + "C4_SEMANTIC_ROLES": "vector", + "C2_DEPENDENCY_GRAPH": "vector", + "C3_ENTRYPOINTS": "vector" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 10, + "C3_ENTRYPOINTS": 10 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [] + } + }, + "fallback": { + "used": false, + "reason": null + }, + "retrieval_by_layer_ms": { + "C1_SYMBOL_CATALOG": 56, + "C0_SOURCE_CHUNKS": 25, + "C4_SEMANTIC_ROLES": 24, + "C2_DEPENDENCY_GRAPH": 64, + "C3_ENTRYPOINTS": 15 + } + } + }, + "diagnostics": { + "intent_correct": null, + "target_found": true, + "layers_used": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_sufficient": true, + "answer_mode": "normal", + "router_result": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "TRACE_FLOW", + "path_scope": [], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_resolution_status": "pending" + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Покажи как проходит запрос /health в HttpControlAppFactory", + "sub_intent": "TRACE_FLOW", + "path_scope": [], + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C4_SEMANTIC_ROLES", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 10, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C3_ENTRYPOINTS", + "hit_count": 3, + "empty": false, + "fallback_used": false + } + ], + "empty_layers": [], + "evidence_gate_decision": { + "sufficient": true, + "failure_reasons": [], + "evidence_count": 37 + }, + "failure_reasons": [], + "timings_ms": {} + }, + "rag_rows": [ + { + "path": "src/app_runtime/control/http_app.py", + "content": "class HttpControlAppFactory\nHttpControlAppFactory", + "layer": "C1_SYMBOL_CATALOG", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "qname": "HttpControlAppFactory", + "kind": "class", + "signature": "HttpControlAppFactory", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "const HttpControlAppFactory\nHttpControlAppFactory = app_runtime.control.http_app.HttpControlAppFactory", + "layer": "C1_SYMBOL_CATALOG", + "title": "HttpControlAppFactory", + "span_start": 8, + "span_end": 8, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "9ee00379ee797cd2386e88a6e37dc69e3e31de9144fc4b95f0206cd1430e8983", + "qname": "HttpControlAppFactory", + "kind": "const", + "signature": "HttpControlAppFactory = app_runtime.control.http_app.HttpControlAppFactory", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlActionSet\nControlActionSet", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "qname": "ControlActionSet", + "kind": "class", + "signature": "ControlActionSet", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "const ControlPlaneService\nControlPlaneService = app_runtime.control.service.ControlPlaneService", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlPlaneService", + "span_start": 3, + "span_end": 3, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "217e8f044d1c01644bf7b81e5046af9e84469210c692a2fb0c476a19bb069ae1", + "qname": "ControlPlaneService", + "kind": "const", + "signature": "ControlPlaneService = app_runtime.control.service.ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/health.py", + "content": "method HealthContributor.health\nhealth(self)\nReturn contributor health state.", + "layer": "C1_SYMBOL_CATALOG", + "title": "HealthContributor.health", + "span_start": 9, + "span_end": 10, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "728cff18958d8a25e2661a0f08c83d68c3bbbfa8cef212b85dc0da2b11b3dc90", + "qname": "HealthContributor.health", + "kind": "method", + "signature": "health(self)", + "parent_symbol_id": "HealthContributor", + "package_or_module": "src.app_runtime.contracts.health", + "is_test": false, + "blob_sha": "6bd92611def7131e32d4dd34a8ed85e6cf3c67722ad27797032a632cb30dc097", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/health.py", + "content": "class HealthContributor\nHealthContributor(ABC)", + "layer": "C1_SYMBOL_CATALOG", + "title": "HealthContributor", + "span_start": 7, + "span_end": 10, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "db91ae387b89a2e9d83829754f27fa18a4055b3e72d7f31789a0b8e0bf5bba0b", + "qname": "HealthContributor", + "kind": "class", + "signature": "HealthContributor(ABC)", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.contracts.health", + "is_test": false, + "blob_sha": "6bd92611def7131e32d4dd34a8ed85e6cf3c67722ad27797032a632cb30dc097", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "const ControlActionSet\nControlActionSet = app_runtime.control.base.ControlActionSet", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlActionSet", + "span_start": 1, + "span_end": 1, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "767e4ac0d4224aeccb0783a38359d3c03899a876736eb83d99887c16ea07cc6c", + "qname": "ControlActionSet", + "kind": "const", + "signature": "ControlActionSet = app_runtime.control.base.ControlActionSet", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "const ControlChannel\nControlChannel = app_runtime.control.base.ControlChannel", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlChannel", + "span_start": 1, + "span_end": 1, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "268420f7aa4ed74082b9276cae0cded4f00bac090ffd58fa020a65be0fe19c27", + "qname": "ControlChannel", + "kind": "const", + "signature": "ControlChannel = app_runtime.control.base.ControlChannel", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel(ControlChannel):\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._timeout = timeout\n self._runner = UvicornThreadRunner(host, port, timeout)\n self._factory = HttpControlAppFactory()\n self._actions: ControlActionSet | None = None\n\n async def start(self, actions: ControlActionSet) -> None:\n self._actions = actions\n app = self._factory.create(self._health_response, self._action_response)\n await self._runner.start(app)\n\n async def stop(self) -> None:\n await self._runner.stop()\n\n @property\n def port(self) -> int:\n return self._runner.port\n\n async def _health_response(self) -> dict[str, object]:\n if self._actions is None:\n return {\"status\": \"unhealthy\", \"detail\": \"control actions are not configured\"}\n return await asyncio.wait_for(self._actions.health(), timeout=float(self._timeout))\n\n async def _action_response(self, action: str, _client_source: str = \"unknown\") -> JSONResponse:\n if self._actions is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"{action} handler is not configured\"}, status_code=404)\n callbacks = {\n \"start\": self._actions.start,\n \"stop\": self._actions.stop,\n \"status\": self._actions.status,\n }\n callback = callbacks.get(action)\n if callback is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"unsupported action: {action}\"}, status_code=404)\n action_timeout = max(float(self._timeout), 10.0) if action in {\"start\", \"stop\"} else float(self._timeout)\n try:\n detail = await asyncio.wait_for(callback(), timeout=action_timeout)\n except asyncio.TimeoutError:\n return JSONResponse(\n content={\"status\": \"accepted\", \"detail\": f\"{action} operation is still in progress\"},\n status_code=202,\n )\n except Exception as exc:\n return JSONResponse(content={\"status\": \"error\", \"detail\": str(exc)}, status_code=500)\n return JSONResponse(content={\"status\": \"ok\", \"detail\": detail or f\"{action} action accepted\"}, status_code=200)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_channel.py:HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "class UvicornThreadRunner:\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._host = host\n self._port = port\n self._timeout = timeout\n self._server: Server | None = None\n self._thread: Thread | None = None\n self._error: BaseException | None = None\n\n async def start(self, app: FastAPI) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._error = None\n config = Config(app=app, host=self._host, port=self._port, log_level=\"warning\")\n self._server = Server(config)\n self._thread = Thread(target=self._serve, name=\"plba-http-control\", daemon=True)\n self._thread.start()\n await self._wait_until_started()\n\n async def stop(self) -> None:\n if self._server is None or self._thread is None:\n return\n self._server.should_exit = True\n await asyncio.to_thread(self._thread.join, self._timeout)\n self._server = None\n self._thread = None\n\n @property\n def port(self) -> int:\n if self._server is None or not getattr(self._server, \"servers\", None):\n return self._port\n socket = self._server.servers[0].sockets[0]\n return int(socket.getsockname()[1])\n\n async def _wait_until_started(self) -> None:\n if self._server is None:\n raise RuntimeError(\"Server is not initialized\")\n deadline = asyncio.get_running_loop().time() + max(float(self._timeout), 1.0)\n while not self._server.started:\n if self._error is not None:\n raise RuntimeError(\"HTTP control server failed to start\") from self._error\n if asyncio.get_running_loop().time() >= deadline:\n raise TimeoutError(\"HTTP control server startup timed out\")\n await asyncio.sleep(0.05)\n\n def _serve(self) -> None:\n if self._server is None:\n return\n try:\n asyncio.run(self._server.serve())\n except BaseException as exc: # noqa: BLE001\n self._error = exc", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_runner.py:UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_runner", + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "class HttpControlAppFactory:\n def create(\n self,\n health_provider: Callable[[], Awaitable[HealthPayload]],\n action_provider: Callable[[str, str], Awaitable[JSONResponse]],\n ) -> FastAPI:\n app = FastAPI(title=\"PLBA Control API\")\n\n @app.middleware(\"http\")\n async def log_api_call(request: Request, call_next): # type: ignore[no-untyped-def]\n started = time.monotonic()\n response = await call_next(request)\n response.headers[\"X-Response-Time-Ms\"] = str(int((time.monotonic() - started) * 1000))\n return response\n\n @app.get(\"/health\")\n async def health() -> JSONResponse:\n payload = await health_provider()\n status_code = 200 if payload.get(\"status\") == \"ok\" else 503\n return JSONResponse(content=payload, status_code=status_code)\n\n @app.get(\"/actions/{action}\")\n @app.post(\"/actions/{action}\")\n async def action(action: str, request: Request) -> JSONResponse:\n client_source = self._client_source(request)\n if action in {\"start\", \"stop\"}:\n LOGGER.warning(\"Control action requested: /actions/%s client=%s\", action, client_source)\n return await action_provider(action, client_source)\n\n return app\n\n def _client_source(self, request: Request) -> str:\n explicit_header = request.headers.get(\"X-Client-Source\", \"\").strip()\n if explicit_header:\n return explicit_header\n user_agent = request.headers.get(\"User-Agent\", \"\").strip()\n if user_agent:\n return f\"user-agent:{user_agent}\"\n return \"unknown\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_app.py:HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/health.py", + "content": "class HealthContributor(ABC):\n @abstractmethod\n def health(self) -> WorkerHealth:\n \"\"\"Return contributor health state.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/contracts/health.py:HealthContributor", + "span_start": 7, + "span_end": 10, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.health", + "is_test": false, + "blob_sha": "6bd92611def7131e32d4dd34a8ed85e6cf3c67722ad27797032a632cb30dc097", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlChannel(ABC):\n @abstractmethod\n async def start(self, actions: ControlActionSet) -> None:\n \"\"\"Start the control channel and bind handlers.\"\"\"\n\n @abstractmethod\n async def stop(self) -> None:\n \"\"\"Stop the control channel and release resources.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\"ControlActionSet\", \"ControlChannel\", \"ControlPlaneService\", \"HttpControlChannel\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/__init__.py:1-5", + "span_start": 1, + "span_end": 5, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlActionSet:\n health: HealthHandler\n start: ActionHandler\n stop: ActionHandler\n status: ActionHandler", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "class ControlPlaneService:\n def __init__(self) -> None:\n self._channels: list[ControlChannel] = []\n\n def register_channel(self, channel: ControlChannel) -> None:\n self._channels.append(channel)\n\n def start(self, runtime: RuntimeManager) -> None:\n if not self._channels:\n return\n asyncio.run(self._start_async(runtime))\n\n def stop(self) -> None:\n if not self._channels:\n return\n asyncio.run(self._stop_async())\n\n def snapshot(self, runtime: RuntimeManager) -> dict[str, object]:\n health = runtime.current_health()\n return {\n \"runtime\": {\"state\": runtime._state.value},\n \"modules\": list(runtime.registry.modules),\n \"services\": runtime.services.snapshot(),\n \"workers\": runtime.workers.snapshot(),\n \"health\": runtime.health.snapshot(runtime.workers.healths()) | {\"status\": health[\"status\"]},\n \"config\": runtime.configuration.get(),\n }\n\n async def _start_async(self, runtime: RuntimeManager) -> None:\n actions = ControlActionSet(\n health=runtime.health_status,\n start=runtime.start_runtime,\n stop=runtime.stop_runtime,\n status=runtime.runtime_status,\n )\n for channel in self._channels:\n await channel.start(actions)\n\n async def _stop_async(self) -> None:\n for channel in reversed(self._channels):\n await channel.stop()", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/service.py:ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/health/registry.py", + "content": "HealthRegistry\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (2)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HealthRegistry", + "span_start": 8, + "span_end": 56, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 29, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd3390eb0ba29c9979466b9c2117238e0da3bb829eeb4d505cb34c9c3df7a8e8", + "symbol_name": "HealthRegistry", + "qname": "HealthRegistry", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 2, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "26e6a24daa43407ba5340b74497c20153020e79f8d7828ae502aaec378dfcf75", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/types.py", + "content": "HealthPayload\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "HealthPayload", + "span_start": 7, + "span_end": 11, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "392235d63ddf752d6e419cb8528c93fe070d1bc02d3c87ba6a897baac810cf5d", + "symbol_name": "HealthPayload", + "qname": "HealthPayload", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "448a02e4a432b5ab65b246b2bd24a32a6f127b9d2091ea73b53ee3c0a2f53bb3", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/health.py", + "content": "HealthContributor\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "HealthContributor", + "span_start": 7, + "span_end": 10, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "db91ae387b89a2e9d83829754f27fa18a4055b3e72d7f31789a0b8e0bf5bba0b", + "symbol_name": "HealthContributor", + "qname": "HealthContributor", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "6bd92611def7131e32d4dd34a8ed85e6cf3c67722ad27797032a632cb30dc097", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/health/registry.py", + "content": "HealthRegistry.__init__\n -> HealthRegistry._contributors\n -> HealthRegistry.register", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HealthRegistry.__init__:dataflow_slice", + "span_start": 10, + "span_end": 13, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "2381dfb339d541367c3251d2a610cac9d8b3f6bd6a352e119d00a93c5ccc2b7d", + "edge_type": "dataflow_slice", + "src_symbol_id": "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "src_qname": "HealthRegistry.__init__", + "dst_symbol_id": "a9e1f290c346c8bb1d67af0cafeebb5bcaf29c3ed7027e33c794532743df38f2", + "dst_ref": "HealthRegistry.register", + "resolution": "resolved", + "slice_id": "2381dfb339d541367c3251d2a610cac9d8b3f6bd6a352e119d00a93c5ccc2b7d", + "root_symbol_id": "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "path_symbols": [ + "HealthRegistry.__init__", + "HealthRegistry._contributors", + "HealthRegistry.register" + ], + "path_symbol_ids": [ + "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "a9e1f290c346c8bb1d67af0cafeebb5bcaf29c3ed7027e33c794532743df38f2" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "26e6a24daa43407ba5340b74497c20153020e79f8d7828ae502aaec378dfcf75", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/health/registry.py", + "content": "HealthRegistry.__init__\n -> HealthRegistry._contributors\n -> HealthRegistry.contributor_healths", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HealthRegistry.__init__:dataflow_slice", + "span_start": 10, + "span_end": 16, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d3a88a7abf16359e903e809ffc24473658fdd8198f60641fe1584fc4ac663c31", + "edge_type": "dataflow_slice", + "src_symbol_id": "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "src_qname": "HealthRegistry.__init__", + "dst_symbol_id": "fa7bbd8f4b64a55a5088640c30f52e84075d65f531bd7e1f6c1d7bb8d24fcbf2", + "dst_ref": "HealthRegistry.contributor_healths", + "resolution": "resolved", + "slice_id": "d3a88a7abf16359e903e809ffc24473658fdd8198f60641fe1584fc4ac663c31", + "root_symbol_id": "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "path_symbols": [ + "HealthRegistry.__init__", + "HealthRegistry._contributors", + "HealthRegistry.contributor_healths" + ], + "path_symbol_ids": [ + "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "fa7bbd8f4b64a55a5088640c30f52e84075d65f531bd7e1f6c1d7bb8d24fcbf2" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "26e6a24daa43407ba5340b74497c20153020e79f8d7828ae502aaec378dfcf75", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory.create calls time.monotonic", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlAppFactory.create:calls", + "span_start": 25, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3fdd0a88d10225ee74f3b84ab57e13f09f5ccc72f00e31af9ae4655411c289c0", + "edge_type": "calls", + "src_symbol_id": "4af42c2a9275d652e710a98ec48b8247236b4453a093629f8958704ff6d3cb58", + "src_qname": "HttpControlAppFactory.create", + "dst_symbol_id": null, + "dst_ref": "time.monotonic", + "resolution": "partial", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory.create calls app.post", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlAppFactory.create:calls", + "span_start": 37, + "span_end": 37, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "0e545d4b5187db7bec5ceac03071d2ad68177550c42af748fee364639e533c90", + "edge_type": "calls", + "src_symbol_id": "4af42c2a9275d652e710a98ec48b8247236b4453a093629f8958704ff6d3cb58", + "src_qname": "HttpControlAppFactory.create", + "dst_symbol_id": null, + "dst_ref": "app.post", + "resolution": "partial", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory.create calls str", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlAppFactory.create:calls", + "span_start": 27, + "span_end": 27, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "2a87c51461e31cd556508cc37fdff37b4d24c26f7f1604db30af5e8f1bda96cb", + "edge_type": "calls", + "src_symbol_id": "4af42c2a9275d652e710a98ec48b8247236b4453a093629f8958704ff6d3cb58", + "src_qname": "HttpControlAppFactory.create", + "dst_symbol_id": null, + "dst_ref": "str", + "resolution": "partial", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "validation": { + "passed": true, + "action": "return", + "reasons": [] + } + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-health-endpoint.md b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-health-endpoint.md new file mode 100644 index 0000000..5f8dc3b --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-health-endpoint.md @@ -0,0 +1,35 @@ +# plba-v2-trace-flow-health-endpoint + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: agent_runtime +- mode: full_chain +- passed: True + +## Query +Покажи как проходит запрос /health в HttpControlAppFactory + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "TRACE_FLOW", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 37, + "llm_answer": "1. HttpControlAppFactory.create(health_provider, action_provider)\n - Создает FastAPI приложение.\n - Добавляет middleware для логирования времени ответа.\n - Обрабатывает GET запрос к \"/health\".\n\n2. HttpControlAppFactory.create.health()\n - Вызывается при обработке запроса \"/health\".\n - Возвращает Awaitable объект типа HealthPayload.\n\n3. HttpControlAppFactory.create.action_provider()\n - Определяет поведение при запросе действий.\n\nПолный поток вызова от обработки запроса \"/health\" до получения HealthPayload отсутствует в предоставленных доказательствах.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "health", + "HttpControlAppFactory" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-runtime-start.json b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-runtime-start.json new file mode 100644 index 0000000..86a424b --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-runtime-start.json @@ -0,0 +1,4868 @@ +{ + "case_id": "plba-v2-trace-flow-runtime-start", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "agent_runtime", + "mode": "full_chain", + "query": "Покажи поток выполнения при запуске RuntimeManager", + "actual": { + "intent": "CODE_QA", + "sub_intent": "TRACE_FLOW", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 37, + "llm_answer": "1. Запускается `RuntimeManager` через импорт в `bootstrap.py` (`src/plba/bootstrap.py:4`).\n2. Далее, в `control/service.py`, происходит повторный импорт и переопределение переменной `RuntimeManager` как `app_runtime.core.runtime.RuntimeManager` (`src/app_runtime/control/service.py:9`).\n3. В файле `core/runtime.py` начинается определение класса `RuntimeManager`. Этот класс управляет состоянием приложения и участвует в управлении жизненным циклом различных сервисов и модулей (`src/app_runtime/core/runtime.py:18-179`).\n4. Из `__init__.py` модуля `plba` (`src/plba/__init__.py:16`) импортируется другой экземпляр `RuntimeManager`.\n5. Затем идет обращение к инициализации объекта `ControlPlaneService` в модуле `control/service.py` (`src/app_runtime/control/service.py:12-52`), который регистрирует каналы управления.\n6. Контроллер канала управления определяется в `base.py` файла `control` и имеет методы для запуска и остановки каналов (`src/app_runtime/control/base.py:21-28`).\n7. В `control/http_channel.py` создается объект `HttpControlChannel`, управляющий HTTP-запросами с использованием библиотеки uvicorn (`src/app_runtime/control/http_channel.py:12-57`).\n8. Модуль `control/http_app.py` создает фабрику приложений для обработки HTTP-запросов, связанных с управлением состоянием системы (`src/app_runtime/control/http_app.py:15-53`).\n9. Инициализация конфигурации и параметров происходит в методах `_register_core_services` и `_start_async` внутри класса `RuntimeManager` (`src/app_runtime/core/runtime.py:32-127`).\n\nПолный путь вызова:\n\n1. `src/plba/bootstrap.py`\n2. `src/app_runtime/control/service.py`\n3. `src/app_runtime/core/runtime.py`\n4. `src/plba/__init__.py`\n5. `src/app_runtime/control/service.py`\n6. `src/app_runtime/control/base.py`\n7. `src/app_runtime/control/http_channel.py`\n8. `src/app_runtime/control/http_app.py`\n9. `src/app_runtime/core/runtime.py`", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "query": "Покажи поток выполнения при запуске RuntimeManager", + "router_result": { + "schema_version": "1.1", + "intent": "CODE_QA", + "retrieval_profile": "code", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query_plan": { + "raw": "Покажи поток выполнения при запуске RuntimeManager", + "normalized": "Покажи поток выполнения при запуске RuntimeManager", + "sub_intent": "TRACE_FLOW", + "negations": [], + "expansions": [ + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "doc_scope_hints": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "symbol_kind_hint": "class", + "anchors": [ + { + "type": "SYMBOL", + "value": "RuntimeManager", + "source": "user_text", + "subtype": null, + "span": { + "start": 36, + "end": 50 + }, + "confidence": 0.88 + } + ] + }, + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "top_k": 8 + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 8 + }, + { + "layer_id": "C4_SEMANTIC_ROLES", + "top_k": 8 + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "top_k": 10 + }, + { + "layer_id": "C3_ENTRYPOINTS", + "top_k": 10 + } + ], + "filters": { + "test_policy": "EXCLUDE", + "path_scope": [], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + }, + "symbol_resolution": { + "status": "pending", + "resolved_symbol": null, + "alternatives": [ + "RuntimeManager" + ], + "confidence": 0.0 + }, + "evidence_policy": { + "require_def": true, + "require_flow": true, + "require_spec": false, + "allow_answer_without_evidence": false + } + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Покажи поток выполнения при запуске RuntimeManager", + "sub_intent": "TRACE_FLOW", + "path_scope": [], + "keyword_hints": [ + "RuntimeManager" + ], + "symbol_candidates": [ + "RuntimeManager" + ], + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "top_k": 8 + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 8 + }, + { + "layer_id": "C4_SEMANTIC_ROLES", + "top_k": 8 + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "top_k": 10 + }, + { + "layer_id": "C3_ENTRYPOINTS", + "top_k": 10 + } + ], + "filters": { + "test_policy": "EXCLUDE", + "path_scope": [], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + }, + "query_plan": { + "raw": "Покажи поток выполнения при запуске RuntimeManager", + "normalized": "Покажи поток выполнения при запуске RuntimeManager", + "sub_intent": "TRACE_FLOW", + "negations": [], + "expansions": [ + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "doc_scope_hints": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "symbol_kind_hint": "class", + "anchors": [ + { + "type": "SYMBOL", + "value": "RuntimeManager", + "source": "user_text", + "subtype": null, + "span": { + "start": 36, + "end": 50 + }, + "confidence": 0.88 + } + ] + } + }, + "retrieval_result": { + "target_symbol_candidates": [ + "RuntimeManager", + "ControlPlaneService", + "ControlChannel.start", + "ControlChannel.stop" + ], + "resolved_symbol": "RuntimeManager", + "symbol_resolution_status": "resolved", + "file_candidates": [ + "src/plba/bootstrap.py", + "src/app_runtime/control/service.py", + "src/app_runtime/core/runtime.py", + "src/plba/__init__.py", + "src/plba/core.py", + "src/app_runtime/control/__init__.py", + "src/app_runtime/control/base.py", + "src/app_runtime/control/http_runner.py", + "src/app_runtime/control/http_app.py", + "src/app_runtime/control/http_channel.py", + "src/plba/control.py", + "src/app_runtime/workflow/persistence/workflow_persistence.py" + ], + "code_chunks": [ + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/plba/bootstrap.py", + "title": "RuntimeManager", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "start_line": 4, + "end_line": 4, + "metadata": { + "symbol_id": "27158ca220022eeb5083c6addf8a50775d45f7161284fd60aac48410105f4b98", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/service.py", + "title": "RuntimeManager", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "start_line": 9, + "end_line": 9, + "metadata": { + "symbol_id": "62a9575c77aad894120d18b4f2a08cf2ba42f77e9be4a8a432b767d157701afe", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/core/runtime.py", + "title": "RuntimeManager", + "content": "class RuntimeManager\nRuntimeManager", + "start_line": 18, + "end_line": 179, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "qname": "RuntimeManager", + "kind": "class", + "signature": "RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/plba/__init__.py", + "title": "RuntimeManager", + "content": "const RuntimeManager\nRuntimeManager = plba.core.RuntimeManager", + "start_line": 16, + "end_line": 16, + "metadata": { + "symbol_id": "7eacec84f9b8d6c4201374591faecdac7493091c263681495c338973f2971ad9", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = plba.core.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/plba/core.py", + "title": "RuntimeManager", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "start_line": 2, + "end_line": 2, + "metadata": { + "symbol_id": "e1684562d978b7af7fe9b27dc5869d770348a87b5dc19a50360f58544668578b", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.core", + "is_test": false, + "blob_sha": "c0ae25110d20e665216616e26b68adfe035b624ba45d31d1272fb21f906f9ca8", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/__init__.py", + "title": "ControlPlaneService", + "content": "const ControlPlaneService\nControlPlaneService = app_runtime.control.service.ControlPlaneService", + "start_line": 3, + "end_line": 3, + "metadata": { + "symbol_id": "217e8f044d1c01644bf7b81e5046af9e84469210c692a2fb0c476a19bb069ae1", + "qname": "ControlPlaneService", + "kind": "const", + "signature": "ControlPlaneService = app_runtime.control.service.ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/base.py", + "title": "ControlChannel.start", + "content": "method ControlChannel.start\nstart(self, actions)\nStart the control channel and bind handlers.", + "start_line": 23, + "end_line": 24, + "metadata": { + "symbol_id": "e01e0d50d0f48d0c84c119c989b7a7c57ceea263811ce2605c684ae24d1a03b1", + "qname": "ControlChannel.start", + "kind": "method", + "signature": "start(self, actions)", + "parent_symbol_id": "ControlChannel", + "package_or_module": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/base.py", + "title": "ControlChannel.stop", + "content": "method ControlChannel.stop\nstop(self)\nStop the control channel and release resources.", + "start_line": 27, + "end_line": 28, + "metadata": { + "symbol_id": "54b5adf9866c526836221dc721b474ba23fbec83e1b1d3b8bc4da67ae3c1541d", + "qname": "ControlChannel.stop", + "kind": "method", + "signature": "stop(self)", + "parent_symbol_id": "ControlChannel", + "package_or_module": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/service.py", + "title": "src/app_runtime/control/service.py:ControlPlaneService", + "content": "class ControlPlaneService:\n def __init__(self) -> None:\n self._channels: list[ControlChannel] = []\n\n def register_channel(self, channel: ControlChannel) -> None:\n self._channels.append(channel)\n\n def start(self, runtime: RuntimeManager) -> None:\n if not self._channels:\n return\n asyncio.run(self._start_async(runtime))\n\n def stop(self) -> None:\n if not self._channels:\n return\n asyncio.run(self._stop_async())\n\n def snapshot(self, runtime: RuntimeManager) -> dict[str, object]:\n health = runtime.current_health()\n return {\n \"runtime\": {\"state\": runtime._state.value},\n \"modules\": list(runtime.registry.modules),\n \"services\": runtime.services.snapshot(),\n \"workers\": runtime.workers.snapshot(),\n \"health\": runtime.health.snapshot(runtime.workers.healths()) | {\"status\": health[\"status\"]},\n \"config\": runtime.configuration.get(),\n }\n\n async def _start_async(self, runtime: RuntimeManager) -> None:\n actions = ControlActionSet(\n health=runtime.health_status,\n start=runtime.start_runtime,\n stop=runtime.stop_runtime,\n status=runtime.runtime_status,\n )\n for channel in self._channels:\n await channel.start(actions)\n\n async def _stop_async(self) -> None:\n for channel in reversed(self._channels):\n await channel.stop()", + "start_line": 12, + "end_line": 52, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/http_runner.py", + "title": "src/app_runtime/control/http_runner.py:UvicornThreadRunner", + "content": "class UvicornThreadRunner:\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._host = host\n self._port = port\n self._timeout = timeout\n self._server: Server | None = None\n self._thread: Thread | None = None\n self._error: BaseException | None = None\n\n async def start(self, app: FastAPI) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._error = None\n config = Config(app=app, host=self._host, port=self._port, log_level=\"warning\")\n self._server = Server(config)\n self._thread = Thread(target=self._serve, name=\"plba-http-control\", daemon=True)\n self._thread.start()\n await self._wait_until_started()\n\n async def stop(self) -> None:\n if self._server is None or self._thread is None:\n return\n self._server.should_exit = True\n await asyncio.to_thread(self._thread.join, self._timeout)\n self._server = None\n self._thread = None\n\n @property\n def port(self) -> int:\n if self._server is None or not getattr(self._server, \"servers\", None):\n return self._port\n socket = self._server.servers[0].sockets[0]\n return int(socket.getsockname()[1])\n\n async def _wait_until_started(self) -> None:\n if self._server is None:\n raise RuntimeError(\"Server is not initialized\")\n deadline = asyncio.get_running_loop().time() + max(float(self._timeout), 1.0)\n while not self._server.started:\n if self._error is not None:\n raise RuntimeError(\"HTTP control server failed to start\") from self._error\n if asyncio.get_running_loop().time() >= deadline:\n raise TimeoutError(\"HTTP control server startup timed out\")\n await asyncio.sleep(0.05)\n\n def _serve(self) -> None:\n if self._server is None:\n return\n try:\n asyncio.run(self._server.serve())\n except BaseException as exc: # noqa: BLE001\n self._error = exc", + "start_line": 10, + "end_line": 61, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_runner", + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/base.py", + "title": "src/app_runtime/control/base.py:ControlChannel", + "content": "class ControlChannel(ABC):\n @abstractmethod\n async def start(self, actions: ControlActionSet) -> None:\n \"\"\"Start the control channel and bind handlers.\"\"\"\n\n @abstractmethod\n async def stop(self) -> None:\n \"\"\"Stop the control channel and release resources.\"\"\"", + "start_line": 21, + "end_line": 28, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/__init__.py", + "title": "src/app_runtime/control/__init__.py:1-5", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\"ControlActionSet\", \"ControlChannel\", \"ControlPlaneService\", \"HttpControlChannel\"]", + "start_line": 1, + "end_line": 5, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/http_app.py", + "title": "src/app_runtime/control/http_app.py:HttpControlAppFactory", + "content": "class HttpControlAppFactory:\n def create(\n self,\n health_provider: Callable[[], Awaitable[HealthPayload]],\n action_provider: Callable[[str, str], Awaitable[JSONResponse]],\n ) -> FastAPI:\n app = FastAPI(title=\"PLBA Control API\")\n\n @app.middleware(\"http\")\n async def log_api_call(request: Request, call_next): # type: ignore[no-untyped-def]\n started = time.monotonic()\n response = await call_next(request)\n response.headers[\"X-Response-Time-Ms\"] = str(int((time.monotonic() - started) * 1000))\n return response\n\n @app.get(\"/health\")\n async def health() -> JSONResponse:\n payload = await health_provider()\n status_code = 200 if payload.get(\"status\") == \"ok\" else 503\n return JSONResponse(content=payload, status_code=status_code)\n\n @app.get(\"/actions/{action}\")\n @app.post(\"/actions/{action}\")\n async def action(action: str, request: Request) -> JSONResponse:\n client_source = self._client_source(request)\n if action in {\"start\", \"stop\"}:\n LOGGER.warning(\"Control action requested: /actions/%s client=%s\", action, client_source)\n return await action_provider(action, client_source)\n\n return app\n\n def _client_source(self, request: Request) -> str:\n explicit_header = request.headers.get(\"X-Client-Source\", \"\").strip()\n if explicit_header:\n return explicit_header\n user_agent = request.headers.get(\"User-Agent\", \"\").strip()\n if user_agent:\n return f\"user-agent:{user_agent}\"\n return \"unknown\"", + "start_line": 15, + "end_line": 53, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/http_channel.py", + "title": "src/app_runtime/control/http_channel.py:HttpControlChannel", + "content": "class HttpControlChannel(ControlChannel):\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._timeout = timeout\n self._runner = UvicornThreadRunner(host, port, timeout)\n self._factory = HttpControlAppFactory()\n self._actions: ControlActionSet | None = None\n\n async def start(self, actions: ControlActionSet) -> None:\n self._actions = actions\n app = self._factory.create(self._health_response, self._action_response)\n await self._runner.start(app)\n\n async def stop(self) -> None:\n await self._runner.stop()\n\n @property\n def port(self) -> int:\n return self._runner.port\n\n async def _health_response(self) -> dict[str, object]:\n if self._actions is None:\n return {\"status\": \"unhealthy\", \"detail\": \"control actions are not configured\"}\n return await asyncio.wait_for(self._actions.health(), timeout=float(self._timeout))\n\n async def _action_response(self, action: str, _client_source: str = \"unknown\") -> JSONResponse:\n if self._actions is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"{action} handler is not configured\"}, status_code=404)\n callbacks = {\n \"start\": self._actions.start,\n \"stop\": self._actions.stop,\n \"status\": self._actions.status,\n }\n callback = callbacks.get(action)\n if callback is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"unsupported action: {action}\"}, status_code=404)\n action_timeout = max(float(self._timeout), 10.0) if action in {\"start\", \"stop\"} else float(self._timeout)\n try:\n detail = await asyncio.wait_for(callback(), timeout=action_timeout)\n except asyncio.TimeoutError:\n return JSONResponse(\n content={\"status\": \"accepted\", \"detail\": f\"{action} operation is still in progress\"},\n status_code=202,\n )\n except Exception as exc:\n return JSONResponse(content={\"status\": \"error\", \"detail\": str(exc)}, status_code=500)\n return JSONResponse(content={\"status\": \"ok\", \"detail\": detail or f\"{action} action accepted\"}, status_code=200)", + "start_line": 12, + "end_line": 57, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/base.py", + "title": "src/app_runtime/control/base.py:ControlActionSet", + "content": "class ControlActionSet:\n health: HealthHandler\n start: ActionHandler\n stop: ActionHandler\n status: ActionHandler", + "start_line": 14, + "end_line": 18, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/plba/control.py", + "title": "src/plba/control.py:1-10", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\n \"ControlActionSet\",\n \"ControlChannel\",\n \"ControlPlaneService\",\n \"HttpControlChannel\",\n]", + "start_line": 1, + "end_line": 10, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.control", + "is_test": false, + "blob_sha": "31bd5c4481bfa7fbca8fae56d4860a67e3953ca74474ac8439e1f39b685d7bc8", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/core/runtime.py", + "title": "RuntimeManager", + "content": "RuntimeManager\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests manager\n- orchestrates role-like calls (4)\n- reads and writes state attributes\n- participates in dataflow slices (50)", + "start_line": 18, + "end_line": 179, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "symbol_name": "RuntimeManager", + "qname": "RuntimeManager", + "role": "pipeline_stage", + "confidence": 0.67, + "dataflow_participation": 50, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/base.py", + "title": "ControlChannel", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "start_line": 21, + "end_line": 28, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/base.py", + "title": "ControlActionSet", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "start_line": 14, + "end_line": 18, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "start_line": 12, + "end_line": 52, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/http_runner.py", + "title": "UvicornThreadRunner", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "start_line": 10, + "end_line": 61, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/http_channel.py", + "title": "HttpControlChannel", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "start_line": 12, + "end_line": 57, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/http_app.py", + "title": "HttpControlAppFactory", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "start_line": 15, + "end_line": 53, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "title": "WorkflowPersistence", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "start_line": 8, + "end_line": 54, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/core/runtime.py", + "title": "RuntimeManager.__init__:dataflow_slice", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file", + "start_line": 32, + "end_line": 52, + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/core/runtime.py", + "title": "RuntimeManager.__init__:dataflow_slice", + "content": "RuntimeManager.__init__\n -> RuntimeManager.services\n -> RuntimeManager.__init__", + "start_line": 33, + "end_line": 39, + "metadata": { + "edge_id": "d43af85989222ee6d788ce418cdcb217c7ff044cfb915e3bdbd184417dc7bd61", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "dst_ref": "RuntimeManager.__init__", + "resolution": "resolved", + "slice_id": "d43af85989222ee6d788ce418cdcb217c7ff044cfb915e3bdbd184417dc7bd61", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.services", + "RuntimeManager.__init__" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "start_line": 14, + "end_line": 25, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "start_line": 14, + "end_line": 51, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/core/runtime.py", + "title": "RuntimeManager.__init__:dataflow_slice", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.start", + "start_line": 32, + "end_line": 59, + "metadata": { + "edge_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1", + "dst_ref": "RuntimeManager.start", + "resolution": "resolved", + "slice_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.start" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/core/runtime.py", + "title": "RuntimeManager.__init__:dataflow_slice", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager._register_core_services", + "start_line": 32, + "end_line": 127, + "metadata": { + "edge_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6", + "dst_ref": "RuntimeManager._register_core_services", + "resolution": "resolved", + "slice_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager._register_core_services" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "start_line": 14, + "end_line": 17, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "start_line": 14, + "end_line": 20, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "start_line": 14, + "end_line": 47, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/core/runtime.py", + "title": "RuntimeManager.__init__:dataflow_slice", + "content": "RuntimeManager.__init__\n -> RuntimeManager.services\n -> RuntimeManager._register_core_services", + "start_line": 33, + "end_line": 127, + "metadata": { + "edge_id": "aac6f9dda73963b977083a892bee39a48eca4fbd7404787e022ecf4ebedec65d", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6", + "dst_ref": "RuntimeManager._register_core_services", + "resolution": "resolved", + "slice_id": "aac6f9dda73963b977083a892bee39a48eca4fbd7404787e022ecf4ebedec65d", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.services", + "RuntimeManager._register_core_services" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C3_ENTRYPOINTS", + "path": "src/app_runtime/control/http_app.py", + "title": "app.post", + "content": "fastapi http app.post", + "start_line": 38, + "end_line": 42, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C3_ENTRYPOINTS", + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "content": "fastapi http app.get", + "start_line": 31, + "end_line": 34, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C3_ENTRYPOINTS", + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "content": "fastapi http app.get", + "start_line": 38, + "end_line": 42, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "relations": [ + { + "path": "src/app_runtime/core/runtime.py", + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file" + }, + { + "path": "src/app_runtime/core/runtime.py", + "metadata": { + "edge_id": "d43af85989222ee6d788ce418cdcb217c7ff044cfb915e3bdbd184417dc7bd61", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "dst_ref": "RuntimeManager.__init__", + "resolution": "resolved", + "slice_id": "d43af85989222ee6d788ce418cdcb217c7ff044cfb915e3bdbd184417dc7bd61", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.services", + "RuntimeManager.__init__" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "RuntimeManager.__init__\n -> RuntimeManager.services\n -> RuntimeManager.__init__" + }, + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop" + }, + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async" + }, + { + "path": "src/app_runtime/core/runtime.py", + "metadata": { + "edge_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1", + "dst_ref": "RuntimeManager.start", + "resolution": "resolved", + "slice_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.start" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.start" + }, + { + "path": "src/app_runtime/core/runtime.py", + "metadata": { + "edge_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6", + "dst_ref": "RuntimeManager._register_core_services", + "resolution": "resolved", + "slice_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager._register_core_services" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager._register_core_services" + }, + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel" + }, + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start" + }, + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async" + }, + { + "path": "src/app_runtime/core/runtime.py", + "metadata": { + "edge_id": "aac6f9dda73963b977083a892bee39a48eca4fbd7404787e022ecf4ebedec65d", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6", + "dst_ref": "RuntimeManager._register_core_services", + "resolution": "resolved", + "slice_id": "aac6f9dda73963b977083a892bee39a48eca4fbd7404787e022ecf4ebedec65d", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.services", + "RuntimeManager._register_core_services" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "RuntimeManager.__init__\n -> RuntimeManager.services\n -> RuntimeManager._register_core_services" + } + ], + "entrypoints": [ + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.post", + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "test_candidates": [], + "layer_outcomes": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C4_SEMANTIC_ROLES", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 10, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C3_ENTRYPOINTS", + "hit_count": 3, + "empty": false, + "fallback_used": false + } + ], + "missing_layers": [], + "raw_rows": [ + { + "path": "src/plba/bootstrap.py", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 4, + "span_end": 4, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "27158ca220022eeb5083c6addf8a50775d45f7161284fd60aac48410105f4b98", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 9, + "span_end": 9, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "62a9575c77aad894120d18b4f2a08cf2ba42f77e9be4a8a432b767d157701afe", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager\nRuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "qname": "RuntimeManager", + "kind": "class", + "signature": "RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/__init__.py", + "content": "const RuntimeManager\nRuntimeManager = plba.core.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 16, + "span_end": 16, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "7eacec84f9b8d6c4201374591faecdac7493091c263681495c338973f2971ad9", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = plba.core.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/core.py", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 2, + "span_end": 2, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "e1684562d978b7af7fe9b27dc5869d770348a87b5dc19a50360f58544668578b", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.core", + "is_test": false, + "blob_sha": "c0ae25110d20e665216616e26b68adfe035b624ba45d31d1272fb21f906f9ca8", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "const ControlPlaneService\nControlPlaneService = app_runtime.control.service.ControlPlaneService", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlPlaneService", + "span_start": 3, + "span_end": 3, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "217e8f044d1c01644bf7b81e5046af9e84469210c692a2fb0c476a19bb069ae1", + "qname": "ControlPlaneService", + "kind": "const", + "signature": "ControlPlaneService = app_runtime.control.service.ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "method ControlChannel.start\nstart(self, actions)\nStart the control channel and bind handlers.", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlChannel.start", + "span_start": 23, + "span_end": 24, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "e01e0d50d0f48d0c84c119c989b7a7c57ceea263811ce2605c684ae24d1a03b1", + "qname": "ControlChannel.start", + "kind": "method", + "signature": "start(self, actions)", + "parent_symbol_id": "ControlChannel", + "package_or_module": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "method ControlChannel.stop\nstop(self)\nStop the control channel and release resources.", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlChannel.stop", + "span_start": 27, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "54b5adf9866c526836221dc721b474ba23fbec83e1b1d3b8bc4da67ae3c1541d", + "qname": "ControlChannel.stop", + "kind": "method", + "signature": "stop(self)", + "parent_symbol_id": "ControlChannel", + "package_or_module": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "class ControlPlaneService:\n def __init__(self) -> None:\n self._channels: list[ControlChannel] = []\n\n def register_channel(self, channel: ControlChannel) -> None:\n self._channels.append(channel)\n\n def start(self, runtime: RuntimeManager) -> None:\n if not self._channels:\n return\n asyncio.run(self._start_async(runtime))\n\n def stop(self) -> None:\n if not self._channels:\n return\n asyncio.run(self._stop_async())\n\n def snapshot(self, runtime: RuntimeManager) -> dict[str, object]:\n health = runtime.current_health()\n return {\n \"runtime\": {\"state\": runtime._state.value},\n \"modules\": list(runtime.registry.modules),\n \"services\": runtime.services.snapshot(),\n \"workers\": runtime.workers.snapshot(),\n \"health\": runtime.health.snapshot(runtime.workers.healths()) | {\"status\": health[\"status\"]},\n \"config\": runtime.configuration.get(),\n }\n\n async def _start_async(self, runtime: RuntimeManager) -> None:\n actions = ControlActionSet(\n health=runtime.health_status,\n start=runtime.start_runtime,\n stop=runtime.stop_runtime,\n status=runtime.runtime_status,\n )\n for channel in self._channels:\n await channel.start(actions)\n\n async def _stop_async(self) -> None:\n for channel in reversed(self._channels):\n await channel.stop()", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/service.py:ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "class UvicornThreadRunner:\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._host = host\n self._port = port\n self._timeout = timeout\n self._server: Server | None = None\n self._thread: Thread | None = None\n self._error: BaseException | None = None\n\n async def start(self, app: FastAPI) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._error = None\n config = Config(app=app, host=self._host, port=self._port, log_level=\"warning\")\n self._server = Server(config)\n self._thread = Thread(target=self._serve, name=\"plba-http-control\", daemon=True)\n self._thread.start()\n await self._wait_until_started()\n\n async def stop(self) -> None:\n if self._server is None or self._thread is None:\n return\n self._server.should_exit = True\n await asyncio.to_thread(self._thread.join, self._timeout)\n self._server = None\n self._thread = None\n\n @property\n def port(self) -> int:\n if self._server is None or not getattr(self._server, \"servers\", None):\n return self._port\n socket = self._server.servers[0].sockets[0]\n return int(socket.getsockname()[1])\n\n async def _wait_until_started(self) -> None:\n if self._server is None:\n raise RuntimeError(\"Server is not initialized\")\n deadline = asyncio.get_running_loop().time() + max(float(self._timeout), 1.0)\n while not self._server.started:\n if self._error is not None:\n raise RuntimeError(\"HTTP control server failed to start\") from self._error\n if asyncio.get_running_loop().time() >= deadline:\n raise TimeoutError(\"HTTP control server startup timed out\")\n await asyncio.sleep(0.05)\n\n def _serve(self) -> None:\n if self._server is None:\n return\n try:\n asyncio.run(self._server.serve())\n except BaseException as exc: # noqa: BLE001\n self._error = exc", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_runner.py:UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_runner", + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlChannel(ABC):\n @abstractmethod\n async def start(self, actions: ControlActionSet) -> None:\n \"\"\"Start the control channel and bind handlers.\"\"\"\n\n @abstractmethod\n async def stop(self) -> None:\n \"\"\"Stop the control channel and release resources.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\"ControlActionSet\", \"ControlChannel\", \"ControlPlaneService\", \"HttpControlChannel\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/__init__.py:1-5", + "span_start": 1, + "span_end": 5, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "class HttpControlAppFactory:\n def create(\n self,\n health_provider: Callable[[], Awaitable[HealthPayload]],\n action_provider: Callable[[str, str], Awaitable[JSONResponse]],\n ) -> FastAPI:\n app = FastAPI(title=\"PLBA Control API\")\n\n @app.middleware(\"http\")\n async def log_api_call(request: Request, call_next): # type: ignore[no-untyped-def]\n started = time.monotonic()\n response = await call_next(request)\n response.headers[\"X-Response-Time-Ms\"] = str(int((time.monotonic() - started) * 1000))\n return response\n\n @app.get(\"/health\")\n async def health() -> JSONResponse:\n payload = await health_provider()\n status_code = 200 if payload.get(\"status\") == \"ok\" else 503\n return JSONResponse(content=payload, status_code=status_code)\n\n @app.get(\"/actions/{action}\")\n @app.post(\"/actions/{action}\")\n async def action(action: str, request: Request) -> JSONResponse:\n client_source = self._client_source(request)\n if action in {\"start\", \"stop\"}:\n LOGGER.warning(\"Control action requested: /actions/%s client=%s\", action, client_source)\n return await action_provider(action, client_source)\n\n return app\n\n def _client_source(self, request: Request) -> str:\n explicit_header = request.headers.get(\"X-Client-Source\", \"\").strip()\n if explicit_header:\n return explicit_header\n user_agent = request.headers.get(\"User-Agent\", \"\").strip()\n if user_agent:\n return f\"user-agent:{user_agent}\"\n return \"unknown\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_app.py:HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel(ControlChannel):\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._timeout = timeout\n self._runner = UvicornThreadRunner(host, port, timeout)\n self._factory = HttpControlAppFactory()\n self._actions: ControlActionSet | None = None\n\n async def start(self, actions: ControlActionSet) -> None:\n self._actions = actions\n app = self._factory.create(self._health_response, self._action_response)\n await self._runner.start(app)\n\n async def stop(self) -> None:\n await self._runner.stop()\n\n @property\n def port(self) -> int:\n return self._runner.port\n\n async def _health_response(self) -> dict[str, object]:\n if self._actions is None:\n return {\"status\": \"unhealthy\", \"detail\": \"control actions are not configured\"}\n return await asyncio.wait_for(self._actions.health(), timeout=float(self._timeout))\n\n async def _action_response(self, action: str, _client_source: str = \"unknown\") -> JSONResponse:\n if self._actions is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"{action} handler is not configured\"}, status_code=404)\n callbacks = {\n \"start\": self._actions.start,\n \"stop\": self._actions.stop,\n \"status\": self._actions.status,\n }\n callback = callbacks.get(action)\n if callback is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"unsupported action: {action}\"}, status_code=404)\n action_timeout = max(float(self._timeout), 10.0) if action in {\"start\", \"stop\"} else float(self._timeout)\n try:\n detail = await asyncio.wait_for(callback(), timeout=action_timeout)\n except asyncio.TimeoutError:\n return JSONResponse(\n content={\"status\": \"accepted\", \"detail\": f\"{action} operation is still in progress\"},\n status_code=202,\n )\n except Exception as exc:\n return JSONResponse(content={\"status\": \"error\", \"detail\": str(exc)}, status_code=500)\n return JSONResponse(content={\"status\": \"ok\", \"detail\": detail or f\"{action} action accepted\"}, status_code=200)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_channel.py:HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlActionSet:\n health: HealthHandler\n start: ActionHandler\n stop: ActionHandler\n status: ActionHandler", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/control.py", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\n \"ControlActionSet\",\n \"ControlChannel\",\n \"ControlPlaneService\",\n \"HttpControlChannel\",\n]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/control.py:1-10", + "span_start": 1, + "span_end": 10, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.control", + "is_test": false, + "blob_sha": "31bd5c4481bfa7fbca8fae56d4860a67e3953ca74474ac8439e1f39b685d7bc8", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests manager\n- orchestrates role-like calls (4)\n- reads and writes state attributes\n- participates in dataflow slices (50)", + "layer": "C4_SEMANTIC_ROLES", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 43, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "symbol_name": "RuntimeManager", + "qname": "RuntimeManager", + "role": "pipeline_stage", + "confidence": 0.67, + "dataflow_participation": 50, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 52, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.services\n -> RuntimeManager.__init__", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 33, + "span_end": 39, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "d43af85989222ee6d788ce418cdcb217c7ff044cfb915e3bdbd184417dc7bd61", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "dst_ref": "RuntimeManager.__init__", + "resolution": "resolved", + "slice_id": "d43af85989222ee6d788ce418cdcb217c7ff044cfb915e3bdbd184417dc7bd61", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.services", + "RuntimeManager.__init__" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 59, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1", + "dst_ref": "RuntimeManager.start", + "resolution": "resolved", + "slice_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.start" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager._register_core_services", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 127, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6", + "dst_ref": "RuntimeManager._register_core_services", + "resolution": "resolved", + "slice_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager._register_core_services" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.services\n -> RuntimeManager._register_core_services", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 33, + "span_end": 127, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "aac6f9dda73963b977083a892bee39a48eca4fbd7404787e022ecf4ebedec65d", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6", + "dst_ref": "RuntimeManager._register_core_services", + "resolution": "resolved", + "slice_id": "aac6f9dda73963b977083a892bee39a48eca4fbd7404787e022ecf4ebedec65d", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.services", + "RuntimeManager._register_core_services" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": null, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": null, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": null, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "retrieval_report": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "vector", + "C0_SOURCE_CHUNKS": "vector", + "C4_SEMANTIC_ROLES": "vector", + "C2_DEPENDENCY_GRAPH": "vector", + "C3_ENTRYPOINTS": "vector" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 10, + "C3_ENTRYPOINTS": 10 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [] + } + }, + "fallback": { + "used": false, + "reason": null + }, + "retrieval_by_layer_ms": { + "C1_SYMBOL_CATALOG": 50, + "C0_SOURCE_CHUNKS": 69, + "C4_SEMANTIC_ROLES": 82, + "C2_DEPENDENCY_GRAPH": 78, + "C3_ENTRYPOINTS": 11 + } + } + }, + "diagnostics": { + "intent_correct": null, + "target_found": true, + "layers_used": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_sufficient": true, + "answer_mode": "normal", + "router_result": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "TRACE_FLOW", + "path_scope": [], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_resolution_status": "pending" + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Покажи поток выполнения при запуске RuntimeManager", + "sub_intent": "TRACE_FLOW", + "path_scope": [], + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C4_SEMANTIC_ROLES", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 10, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C3_ENTRYPOINTS", + "hit_count": 3, + "empty": false, + "fallback_used": false + } + ], + "empty_layers": [], + "evidence_gate_decision": { + "sufficient": true, + "failure_reasons": [], + "evidence_count": 37 + }, + "failure_reasons": [], + "timings_ms": {} + }, + "rag_rows": [ + { + "path": "src/plba/bootstrap.py", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 4, + "span_end": 4, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "27158ca220022eeb5083c6addf8a50775d45f7161284fd60aac48410105f4b98", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 9, + "span_end": 9, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "62a9575c77aad894120d18b4f2a08cf2ba42f77e9be4a8a432b767d157701afe", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager\nRuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "qname": "RuntimeManager", + "kind": "class", + "signature": "RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/__init__.py", + "content": "const RuntimeManager\nRuntimeManager = plba.core.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 16, + "span_end": 16, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "7eacec84f9b8d6c4201374591faecdac7493091c263681495c338973f2971ad9", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = plba.core.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/core.py", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 2, + "span_end": 2, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "e1684562d978b7af7fe9b27dc5869d770348a87b5dc19a50360f58544668578b", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.core", + "is_test": false, + "blob_sha": "c0ae25110d20e665216616e26b68adfe035b624ba45d31d1272fb21f906f9ca8", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "const ControlPlaneService\nControlPlaneService = app_runtime.control.service.ControlPlaneService", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlPlaneService", + "span_start": 3, + "span_end": 3, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "217e8f044d1c01644bf7b81e5046af9e84469210c692a2fb0c476a19bb069ae1", + "qname": "ControlPlaneService", + "kind": "const", + "signature": "ControlPlaneService = app_runtime.control.service.ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "method ControlChannel.start\nstart(self, actions)\nStart the control channel and bind handlers.", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlChannel.start", + "span_start": 23, + "span_end": 24, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "e01e0d50d0f48d0c84c119c989b7a7c57ceea263811ce2605c684ae24d1a03b1", + "qname": "ControlChannel.start", + "kind": "method", + "signature": "start(self, actions)", + "parent_symbol_id": "ControlChannel", + "package_or_module": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "method ControlChannel.stop\nstop(self)\nStop the control channel and release resources.", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlChannel.stop", + "span_start": 27, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "54b5adf9866c526836221dc721b474ba23fbec83e1b1d3b8bc4da67ae3c1541d", + "qname": "ControlChannel.stop", + "kind": "method", + "signature": "stop(self)", + "parent_symbol_id": "ControlChannel", + "package_or_module": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "class ControlPlaneService:\n def __init__(self) -> None:\n self._channels: list[ControlChannel] = []\n\n def register_channel(self, channel: ControlChannel) -> None:\n self._channels.append(channel)\n\n def start(self, runtime: RuntimeManager) -> None:\n if not self._channels:\n return\n asyncio.run(self._start_async(runtime))\n\n def stop(self) -> None:\n if not self._channels:\n return\n asyncio.run(self._stop_async())\n\n def snapshot(self, runtime: RuntimeManager) -> dict[str, object]:\n health = runtime.current_health()\n return {\n \"runtime\": {\"state\": runtime._state.value},\n \"modules\": list(runtime.registry.modules),\n \"services\": runtime.services.snapshot(),\n \"workers\": runtime.workers.snapshot(),\n \"health\": runtime.health.snapshot(runtime.workers.healths()) | {\"status\": health[\"status\"]},\n \"config\": runtime.configuration.get(),\n }\n\n async def _start_async(self, runtime: RuntimeManager) -> None:\n actions = ControlActionSet(\n health=runtime.health_status,\n start=runtime.start_runtime,\n stop=runtime.stop_runtime,\n status=runtime.runtime_status,\n )\n for channel in self._channels:\n await channel.start(actions)\n\n async def _stop_async(self) -> None:\n for channel in reversed(self._channels):\n await channel.stop()", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/service.py:ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "class UvicornThreadRunner:\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._host = host\n self._port = port\n self._timeout = timeout\n self._server: Server | None = None\n self._thread: Thread | None = None\n self._error: BaseException | None = None\n\n async def start(self, app: FastAPI) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._error = None\n config = Config(app=app, host=self._host, port=self._port, log_level=\"warning\")\n self._server = Server(config)\n self._thread = Thread(target=self._serve, name=\"plba-http-control\", daemon=True)\n self._thread.start()\n await self._wait_until_started()\n\n async def stop(self) -> None:\n if self._server is None or self._thread is None:\n return\n self._server.should_exit = True\n await asyncio.to_thread(self._thread.join, self._timeout)\n self._server = None\n self._thread = None\n\n @property\n def port(self) -> int:\n if self._server is None or not getattr(self._server, \"servers\", None):\n return self._port\n socket = self._server.servers[0].sockets[0]\n return int(socket.getsockname()[1])\n\n async def _wait_until_started(self) -> None:\n if self._server is None:\n raise RuntimeError(\"Server is not initialized\")\n deadline = asyncio.get_running_loop().time() + max(float(self._timeout), 1.0)\n while not self._server.started:\n if self._error is not None:\n raise RuntimeError(\"HTTP control server failed to start\") from self._error\n if asyncio.get_running_loop().time() >= deadline:\n raise TimeoutError(\"HTTP control server startup timed out\")\n await asyncio.sleep(0.05)\n\n def _serve(self) -> None:\n if self._server is None:\n return\n try:\n asyncio.run(self._server.serve())\n except BaseException as exc: # noqa: BLE001\n self._error = exc", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_runner.py:UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_runner", + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlChannel(ABC):\n @abstractmethod\n async def start(self, actions: ControlActionSet) -> None:\n \"\"\"Start the control channel and bind handlers.\"\"\"\n\n @abstractmethod\n async def stop(self) -> None:\n \"\"\"Stop the control channel and release resources.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\"ControlActionSet\", \"ControlChannel\", \"ControlPlaneService\", \"HttpControlChannel\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/__init__.py:1-5", + "span_start": 1, + "span_end": 5, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "class HttpControlAppFactory:\n def create(\n self,\n health_provider: Callable[[], Awaitable[HealthPayload]],\n action_provider: Callable[[str, str], Awaitable[JSONResponse]],\n ) -> FastAPI:\n app = FastAPI(title=\"PLBA Control API\")\n\n @app.middleware(\"http\")\n async def log_api_call(request: Request, call_next): # type: ignore[no-untyped-def]\n started = time.monotonic()\n response = await call_next(request)\n response.headers[\"X-Response-Time-Ms\"] = str(int((time.monotonic() - started) * 1000))\n return response\n\n @app.get(\"/health\")\n async def health() -> JSONResponse:\n payload = await health_provider()\n status_code = 200 if payload.get(\"status\") == \"ok\" else 503\n return JSONResponse(content=payload, status_code=status_code)\n\n @app.get(\"/actions/{action}\")\n @app.post(\"/actions/{action}\")\n async def action(action: str, request: Request) -> JSONResponse:\n client_source = self._client_source(request)\n if action in {\"start\", \"stop\"}:\n LOGGER.warning(\"Control action requested: /actions/%s client=%s\", action, client_source)\n return await action_provider(action, client_source)\n\n return app\n\n def _client_source(self, request: Request) -> str:\n explicit_header = request.headers.get(\"X-Client-Source\", \"\").strip()\n if explicit_header:\n return explicit_header\n user_agent = request.headers.get(\"User-Agent\", \"\").strip()\n if user_agent:\n return f\"user-agent:{user_agent}\"\n return \"unknown\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_app.py:HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel(ControlChannel):\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._timeout = timeout\n self._runner = UvicornThreadRunner(host, port, timeout)\n self._factory = HttpControlAppFactory()\n self._actions: ControlActionSet | None = None\n\n async def start(self, actions: ControlActionSet) -> None:\n self._actions = actions\n app = self._factory.create(self._health_response, self._action_response)\n await self._runner.start(app)\n\n async def stop(self) -> None:\n await self._runner.stop()\n\n @property\n def port(self) -> int:\n return self._runner.port\n\n async def _health_response(self) -> dict[str, object]:\n if self._actions is None:\n return {\"status\": \"unhealthy\", \"detail\": \"control actions are not configured\"}\n return await asyncio.wait_for(self._actions.health(), timeout=float(self._timeout))\n\n async def _action_response(self, action: str, _client_source: str = \"unknown\") -> JSONResponse:\n if self._actions is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"{action} handler is not configured\"}, status_code=404)\n callbacks = {\n \"start\": self._actions.start,\n \"stop\": self._actions.stop,\n \"status\": self._actions.status,\n }\n callback = callbacks.get(action)\n if callback is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"unsupported action: {action}\"}, status_code=404)\n action_timeout = max(float(self._timeout), 10.0) if action in {\"start\", \"stop\"} else float(self._timeout)\n try:\n detail = await asyncio.wait_for(callback(), timeout=action_timeout)\n except asyncio.TimeoutError:\n return JSONResponse(\n content={\"status\": \"accepted\", \"detail\": f\"{action} operation is still in progress\"},\n status_code=202,\n )\n except Exception as exc:\n return JSONResponse(content={\"status\": \"error\", \"detail\": str(exc)}, status_code=500)\n return JSONResponse(content={\"status\": \"ok\", \"detail\": detail or f\"{action} action accepted\"}, status_code=200)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_channel.py:HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlActionSet:\n health: HealthHandler\n start: ActionHandler\n stop: ActionHandler\n status: ActionHandler", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/control.py", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\n \"ControlActionSet\",\n \"ControlChannel\",\n \"ControlPlaneService\",\n \"HttpControlChannel\",\n]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/control.py:1-10", + "span_start": 1, + "span_end": 10, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.control", + "is_test": false, + "blob_sha": "31bd5c4481bfa7fbca8fae56d4860a67e3953ca74474ac8439e1f39b685d7bc8", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests manager\n- orchestrates role-like calls (4)\n- reads and writes state attributes\n- participates in dataflow slices (50)", + "layer": "C4_SEMANTIC_ROLES", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 43, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "symbol_name": "RuntimeManager", + "qname": "RuntimeManager", + "role": "pipeline_stage", + "confidence": 0.67, + "dataflow_participation": 50, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 52, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.services\n -> RuntimeManager.__init__", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 33, + "span_end": 39, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d43af85989222ee6d788ce418cdcb217c7ff044cfb915e3bdbd184417dc7bd61", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "dst_ref": "RuntimeManager.__init__", + "resolution": "resolved", + "slice_id": "d43af85989222ee6d788ce418cdcb217c7ff044cfb915e3bdbd184417dc7bd61", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.services", + "RuntimeManager.__init__" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 59, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1", + "dst_ref": "RuntimeManager.start", + "resolution": "resolved", + "slice_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.start" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager._register_core_services", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 127, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6", + "dst_ref": "RuntimeManager._register_core_services", + "resolution": "resolved", + "slice_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager._register_core_services" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.services\n -> RuntimeManager._register_core_services", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 33, + "span_end": 127, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "aac6f9dda73963b977083a892bee39a48eca4fbd7404787e022ecf4ebedec65d", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6", + "dst_ref": "RuntimeManager._register_core_services", + "resolution": "resolved", + "slice_id": "aac6f9dda73963b977083a892bee39a48eca4fbd7404787e022ecf4ebedec65d", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.services", + "RuntimeManager._register_core_services" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "validation": { + "passed": true, + "action": "return", + "reasons": [] + } + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-runtime-start.md b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-runtime-start.md new file mode 100644 index 0000000..12448a5 --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-runtime-start.md @@ -0,0 +1,34 @@ +# plba-v2-trace-flow-runtime-start + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: agent_runtime +- mode: full_chain +- passed: True + +## Query +Покажи поток выполнения при запуске RuntimeManager + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "TRACE_FLOW", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 37, + "llm_answer": "1. Запускается `RuntimeManager` через импорт в `bootstrap.py` (`src/plba/bootstrap.py:4`).\n2. Далее, в `control/service.py`, происходит повторный импорт и переопределение переменной `RuntimeManager` как `app_runtime.core.runtime.RuntimeManager` (`src/app_runtime/control/service.py:9`).\n3. В файле `core/runtime.py` начинается определение класса `RuntimeManager`. Этот класс управляет состоянием приложения и участвует в управлении жизненным циклом различных сервисов и модулей (`src/app_runtime/core/runtime.py:18-179`).\n4. Из `__init__.py` модуля `plba` (`src/plba/__init__.py:16`) импортируется другой экземпляр `RuntimeManager`.\n5. Затем идет обращение к инициализации объекта `ControlPlaneService` в модуле `control/service.py` (`src/app_runtime/control/service.py:12-52`), который регистрирует каналы управления.\n6. Контроллер канала управления определяется в `base.py` файла `control` и имеет методы для запуска и остановки каналов (`src/app_runtime/control/base.py:21-28`).\n7. В `control/http_channel.py` создается объект `HttpControlChannel`, управляющий HTTP-запросами с использованием библиотеки uvicorn (`src/app_runtime/control/http_channel.py:12-57`).\n8. Модуль `control/http_app.py` создает фабрику приложений для обработки HTTP-запросов, связанных с управлением состоянием системы (`src/app_runtime/control/http_app.py:15-53`).\n9. Инициализация конфигурации и параметров происходит в методах `_register_core_services` и `_start_async` внутри класса `RuntimeManager` (`src/app_runtime/core/runtime.py:32-127`).\n\nПолный путь вызова:\n\n1. `src/plba/bootstrap.py`\n2. `src/app_runtime/control/service.py`\n3. `src/app_runtime/core/runtime.py`\n4. `src/plba/__init__.py`\n5. `src/app_runtime/control/service.py`\n6. `src/app_runtime/control/base.py`\n7. `src/app_runtime/control/http_channel.py`\n8. `src/app_runtime/control/http_app.py`\n9. `src/app_runtime/core/runtime.py`", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/summary.md b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/summary.md new file mode 100644 index 0000000..666ba7f --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/summary.md @@ -0,0 +1,85 @@ +# pipeline_setup_v3 summary + +Passed: 15/18 + +| File | Case | Mode | Query | Actual sub-intent | RAG layers | Pass | +|------|------|------|-------|-------------------|------------|------| +| full_chain_plba_code_subintents_v2.yaml | plba-v2-open-file-runtime | full_chain | Открой файл src/app_runtime/core/runtime.py | OPEN_FILE | C0_SOURCE_CHUNKS:1 | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-open-file-public-api | full_chain | Открой файл src/plba/__init__.py | OPEN_FILE | C0_SOURCE_CHUNKS:1 | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-explain-runtime-manager | full_chain | Объясни как работает класс RuntimeManager | EXPLAIN | C0_SOURCE_CHUNKS:8, C1_SYMBOL_CATALOG:8, C2_DEPENDENCY_GRAPH:6, C3_ENTRYPOINTS:3, C4_SEMANTIC_ROLES:8 | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-explain-trace-service | full_chain | Объясни как работает класс TraceService | EXPLAIN | C0_SOURCE_CHUNKS:8, C1_SYMBOL_CATALOG:8, C2_DEPENDENCY_GRAPH:6, C3_ENTRYPOINTS:3, C4_SEMANTIC_ROLES:8 | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-explain-create-runtime | full_chain | Что делает функция create_runtime? | EXPLAIN | C0_SOURCE_CHUNKS:8, C1_SYMBOL_CATALOG:8, C2_DEPENDENCY_GRAPH:6, C3_ENTRYPOINTS:3, C4_SEMANTIC_ROLES:8 | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-explain-local-http-channel | full_chain | Почему в файле src/app_runtime/control/http_channel.py класс HttpControlChannel устроен так? | EXPLAIN_LOCAL | C0_SOURCE_CHUNKS:1, C1_SYMBOL_CATALOG:8, C2_DEPENDENCY_GRAPH:4 | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-find-tests-runtime-manager | full_chain | Где тесты для RuntimeManager? | FIND_TESTS | C0_SOURCE_CHUNKS:10, C1_SYMBOL_CATALOG:8, C2_DEPENDENCY_GRAPH:6 | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-find-tests-trace-service | full_chain | Где тесты для TraceService? | FIND_TESTS | C0_SOURCE_CHUNKS:10, C1_SYMBOL_CATALOG:8, C2_DEPENDENCY_GRAPH:6 | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-find-tests-create-runtime | full_chain | Где тесты для create_runtime? | FIND_TESTS | C0_SOURCE_CHUNKS:10, C1_SYMBOL_CATALOG:8, C2_DEPENDENCY_GRAPH:6 | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-find-tests-workflow-runtime-factory-negative | full_chain | Где тесты для WorkflowRuntimeFactory? | FIND_TESTS | C0_SOURCE_CHUNKS:10, C1_SYMBOL_CATALOG:8, C2_DEPENDENCY_GRAPH:6 | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-find-entrypoints-control-plane | full_chain | Найди точки входа HTTP control plane | FIND_ENTRYPOINTS | C0_SOURCE_CHUNKS:6, C3_ENTRYPOINTS:3 | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-find-entrypoints-health-endpoint | full_chain | Где health endpoint? | FIND_ENTRYPOINTS | C0_SOURCE_CHUNKS:6, C3_ENTRYPOINTS:3 | ✗ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-trace-flow-runtime-start | full_chain | Покажи поток выполнения при запуске RuntimeManager | TRACE_FLOW | C0_SOURCE_CHUNKS:8, C1_SYMBOL_CATALOG:8, C2_DEPENDENCY_GRAPH:10, C3_ENTRYPOINTS:3, C4_SEMANTIC_ROLES:8 | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-trace-flow-health-endpoint | full_chain | Покажи как проходит запрос /health в HttpControlAppFactory | TRACE_FLOW | C0_SOURCE_CHUNKS:8, C1_SYMBOL_CATALOG:8, C2_DEPENDENCY_GRAPH:10, C3_ENTRYPOINTS:3, C4_SEMANTIC_ROLES:8 | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-architecture-runtime-manager | full_chain | Какие компоненты участвуют в RuntimeManager? | ARCHITECTURE | C0_SOURCE_CHUNKS:4, C1_SYMBOL_CATALOG:6, C2_DEPENDENCY_GRAPH:8, C3_ENTRYPOINTS:3, C4_SEMANTIC_ROLES:12 | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-architecture-control-plane | full_chain | Какие компоненты участвуют в ControlPlaneService? | ARCHITECTURE | C0_SOURCE_CHUNKS:4, C1_SYMBOL_CATALOG:6, C2_DEPENDENCY_GRAPH:8, C3_ENTRYPOINTS:3, C4_SEMANTIC_ROLES:12 | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-explain-nonexistent-symbol | full_chain | Объясни класс RuntimeFactoryManager | EXPLAIN | C0_SOURCE_CHUNKS:8, C1_SYMBOL_CATALOG:8, C2_DEPENDENCY_GRAPH:6, C3_ENTRYPOINTS:3, C4_SEMANTIC_ROLES:8 | ✗ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-open-file-nonexistent | full_chain | Открой файл src/app_runtime/core/missing_runtime.py | OPEN_FILE | — | ✗ | + +## Failures +- **plba-v2-find-entrypoints-health-endpoint**: llm: expected answer to contain 'GET /health' +- **plba-v2-explain-nonexistent-symbol**: answer_mode: expected degraded, got answered; retrieval: expected empty rag, got 33 rows; llm: expected answer to contain 'не найдена' +- **plba-v2-open-file-nonexistent**: answer_mode: expected degraded, got not_found; llm: expected answer to contain 'Файл src/app_runtime/core/missing_runtime.py не найден.' + +## LLM Answers +- **plba-v2-open-file-runtime** + Query: Открой файл src/app_runtime/core/runtime.py + > Путь: src/app\_runtime/core/runtime.py В этом файле содержится определение класса \`RuntimeManager\`. В классе инициализируются различные компоненты системы, такие как конфигурация, службы, трассировка, здоровье, журналы, рабочие процессы и контрольная плоскость. Класс предназначен для управления выполнением действий в системе с заданными тайм\-аутами и интервалами опроса. +- **plba-v2-open-file-public-api** + Query: Открой файл src/plba/__init__.py + > Путь к файлу: src/plba/\_\_init\_\_.py В этом файле находятся импорт различных модулей и классов из пакета plba. В частности, здесь можно найти: \- Импорты для создания runtime с помощью \`create\_runtime\` \- Классы и интерфейсы конфигурации \(\`ConfigFileLoader\`, \`FileConfigProvider\`\) \- Контроллеры и каналы управления \(\`ControlActionSet\`, \`ControlChannel\`, \`HttpControlChannel\`\) \- Определения контрактов \(\`ApplicationModule\`, \`Worker\`, etc.\) \- Менеджеры конфигурации и выполнения \(\`ConfigurationManager\`, \`RuntimeManager\`, \`ServiceContainer\`\) \- Регистраторы здоровья и службы логирования \- Обработчики очередей задач и транспортные средства трассировки \(\`InMemoryTaskQueue\`, \`MySqlTraceTransport\`, \`NoOpTraceTransport\`\) \- Определение рабочего потока и контекста \(\`StepResult\`, \`WorkflowContext\`, \`WorkflowDefinition\`\) +- **plba-v2-explain-runtime-manager** + Query: Объясни как работает класс RuntimeManager + > Класс \`RuntimeManager\` играет ключевую роль в управлении выполнением приложений и координации различных компонентов системы. Его основная функция заключается в оркестрации действий, связанных с жизненным циклом приложения, включая инициализацию, запуск и остановку сервисов и модулей. \*\*Ключевые шаги работы класса:\*\* 1. Инициализация конфигурации и состояния \(\`\_\_init\_\_\`\). 2. Добавление конфигурационных файлов и настроек \(\`add\_config\_file\`\). 3. Управление состоянием выполнения через чтение и запись атрибутов состояния \(\`configuration\`, \`\_state\`\). 4. Оркестровка вызова методов запуска и остановки для различных компонентов \(\`start\`, \`stop\`\). 5. Участие в обработке данных потока и управлении потоками задач \(\`participates in dataflow slices\`\). \*\*Опорные файлы:\*\* \- \`src/app\_runtime/core/runtime.py:18\-179\` \- \`src/app\_runtime/control/service.py:12\-52\` \- \`src/app\_runtime/contr… +- **plba-v2-explain-trace-service** + Query: Объясни как работает класс TraceService + > Класс \`TraceService\` является основным компонентом системы отслеживания трассировок в приложении. Его основная функция заключается в управлении контекстом трассировки и записи событий в журнал. \*\*Ключевые шаги работы класса:\*\* 1. Инициализация с передачей транспорта \(\`transport\`\) и хранилища контекста \(\`store\`\), которые могут быть опциональными. 2. Создание нового контекста трассировки через метод \`create\_context\`, который генерирует уникальный идентификатор трассы и сохраняет запись о контексте в хранилище. 3. Управление текущим контекстом трассировки через методы: \- \`current\_trace\_id\`: возвращает текущий идентификатор трассировки. \- \`open\_context\`: открывает новый контекст трассировки. \- \`close\_context\`: закрывает текущий контекст трассировки. \*\*Опорные файлы:\*\* \- \`src/app\_runtime/tracing/service.py:39\-166\` \- \`src/app\_runtime/tracing/service.py:66\-78\` \- \`src/app\_ru… +- **plba-v2-explain-create-runtime** + Query: Что делает функция create_runtime? + > Функция \`create\_runtime\` инициализирует и настраивает менеджер выполнения приложения. \*\*Ключевые шаги:\*\* 1. Создает экземпляр менеджера выполнения \(\`RuntimeManager\`\). 2. При наличии указанного пути к конфигурационному файлу добавляет его в менеджер. 3. Если включена опция HTTP\-контроля, регистрирует канал управления с указанными параметрами хоста, порта и тайм\-аута. 4. Регистрирует указанный модуль приложения в менеджере. 5. Возвращает созданный менеджер выполнения. \*\*Опорные файлы:\*\* \- \`src/plba/bootstrap.py:8\-29\` +- **plba-v2-explain-local-http-channel** + Query: Почему в файле src/app_runtime/control/http_channel.py класс HttpControlChannel устроен так? + > Класс \`HttpControlChannel\` в файле \`src/app\_runtime/control/http\_channel.py\` реализует механизм управления HTTP\-каналом для взаимодействия с внешними сервисами или компонентами. \*\*Ключевые шаги его реализации:\*\* 1. Инициализация класса: \- При создании экземпляра устанавливается таймаут \(\`\_timeout\`\), запускается сервер через объект \`UvicornThreadRunner\`, создается фабрика приложений \`HttpControlAppFactory\`. 2. Запуск канала: \- Метод \`start\` инициализирует набор действий \(\`actions\`\) и создает приложение для работы с ними. Затем запускает сервер через ранее созданный объект \`UvicornThreadRunner\`. 3. Остановка канала: \- Метод \`stop\` останавливает запущенный сервер. Опорные файлы: \- \`src/app\_runtime/control/http\_channel.py\`: определение и реализация класса \`HttpControlChannel\`. +- **plba-v2-find-tests-runtime-manager** + Query: Где тесты для RuntimeManager? + > \- tests/test\_runtime.py:12\-12 \- tests/test\_business\_control\_actions.py:14\-14 +- **plba-v2-find-tests-trace-service** + Query: Где тесты для TraceService? + > \- tests/test\_runtime.py:test\_trace\_service\_allows\_messages\_without\_status \(line range: 279\-293\) \- tests/test\_runtime.py:test\_trace\_service\_writes\_contexts\_and\_messages \(line range: 246\-259\) \- tests/test\_runtime.py:test\_trace\_service\_supports\_debug\_warning\_and\_error\_levels \(line range: 262\-276\) +- **plba-v2-find-tests-create-runtime** + Query: Где тесты для create_runtime? + > \- tests/test\_runtime.py:342\-405 +- **plba-v2-find-tests-workflow-runtime-factory-negative** + Query: Где тесты для WorkflowRuntimeFactory? + > Insufficient evidence for a confident answer. No test candidates found. +- **plba-v2-find-entrypoints-control-plane** + Query: Найди точки входа HTTP control plane + > Confirmed Entrypoints: 1. src/app\_runtime/control/http\_app.py:app.post \(lines 38\-42\) 2. src/app\_runtime/control/http\_app.py:app.get \(lines 31\-34\) 3. src/app\_runtime/control/http\_app.py:app.get \(lines 38\-42\) +- **plba-v2-find-entrypoints-health-endpoint** + Query: Где health endpoint? + > health endpoint: \- src/app\_runtime/control/http\_app.py:38\-42 \(app.post\) \- src/app\_runtime/control/http\_app.py:31\-34 \(app.get\) +- **plba-v2-trace-flow-runtime-start** + Query: Покажи поток выполнения при запуске RuntimeManager + > 1. Запускается \`RuntimeManager\` через импорт в \`bootstrap.py\` \(\`src/plba/bootstrap.py:4\`\). 2. Далее, в \`control/service.py\`, происходит повторный импорт и переопределение переменной \`RuntimeManager\` как \`app\_runtime.core.runtime.RuntimeManager\` \(\`src/app\_runtime/control/service.py:9\`\). 3. В файле \`core/runtime.py\` начинается определение класса \`RuntimeManager\`. Этот класс управляет состоянием приложения и участвует в управлении жизненным циклом различных сервисов и модулей \(\`src/app\_runtime/core/runtime.py:18\-179\`\). 4. Из \`\_\_init\_\_.py\` модуля \`plba\` \(\`src/plba/\_\_init\_\_.py:16\`\) импортируется другой экземпляр \`RuntimeManager\`. 5. Затем идет обращение к инициализации объекта \`ControlPlaneService\` в модуле \`control/service.py\` \(\`src/app\_runtime/control/service.py:12\-52\`\), который регистрирует каналы управления. 6. Контроллер канала управления определяется в \`base.py\` фай… +- **plba-v2-trace-flow-health-endpoint** + Query: Покажи как проходит запрос /health в HttpControlAppFactory + > 1. HttpControlAppFactory.create\(health\_provider, action\_provider\) \- Создает FastAPI приложение. \- Добавляет middleware для логирования времени ответа. \- Обрабатывает GET запрос к "/health". 2. HttpControlAppFactory.create.health\(\) \- Вызывается при обработке запроса "/health". \- Возвращает Awaitable объект типа HealthPayload. 3. HttpControlAppFactory.create.action\_provider\(\) \- Определяет поведение при запросе действий. Полный поток вызова от обработки запроса "/health" до получения HealthPayload отсутствует в предоставленных доказательствах. +- **plba-v2-architecture-runtime-manager** + Query: Какие компоненты участвуют в RuntimeManager? + > \#\#\# Подтвержденные Связи 1. \*\*RuntimeManager\*\*: \- Является ключевым компонентом управления жизненным циклом приложения. \- Инициализирует и управляет другими компонентами системы через метод \`\_\_init\_\_\`. 2. \*\*ControlPlaneService\*\*: \- Управляет каналами контроля. \- Вызывается из метода инициализации \`RuntimeManager\` для регистрации каналов. 3. \*\*ControlChannel\*\*: \- Абстрактный класс для реализации конкретных каналов контроля. \- Реализует методы \`start\` и \`stop\`, которые вызываются сервисами и менеджерами. 4. \*\*ConfigFileLoader\*\*: \- Загружает конфигурационные файлы и передает их в runtime\-менеджер. 5. \*\*WorkflowPersistence\*\*: \- Обеспечивает сохранение информации о workflows. 6. \*\*InMemoryTaskQueue\*\*: \- Используется для хранения задач внутри памяти. 7. \*\*TraceContextStore\*\*: \- Хранит контекст трассировки. 8. \*\*WorkerSupervisor\*\*: \- Наблюдает за рабочими процессами и управ… +- **plba-v2-architecture-control-plane** + Query: Какие компоненты участвуют в ControlPlaneService? + > \#\#\# Подтвержденные Связи 1. \*\*ControlPlaneService\*\*: \- Вызывает методы инициализации \(\`\_channels\`, \`\_start\_async\`, \`register\_channel\`, \`start\`, \`stop\`, \`\_stop\_async\`\) \[evidence: 16\-20\]. 2. \*\*ControlPlaneService\*\* взаимодействует с другими компонентами через методы регистрации каналов и запуска: \- Регистрация канала \(\`register\_channel\`\) использует атрибут \`\_channels\` для хранения списка зарегистрированных каналов \[evidence: 22\]. \- Запуск сервиса использует метод \`start\`, который также обращается к атрибуту \`\_channels\` \[evidence: 23\]. \#\#\# Роли Компонентов 1. \*\*ControlPlaneService\*\*: \- Pipeline stage: отвечает за чтение и запись состояния атрибутов, участвует в данных срезах \(dataflow slices\). 2. \*\*ControlChannel\*\*: \- Model: выполняет функции модели управления каналами, включая запуск и остановку. 3. \*\*ControlActionSet\*\*: \- Default model role: обеспечивает стандартные д… +- **plba-v2-explain-nonexistent-symbol** + Query: Объясни класс RuntimeFactoryManager + > Класс \`RuntimeFactoryManager\` не найден в предоставленном коде или контекстной информации. Ключевые шаги и опорные файлы: 1. Код и контекста относятся к управлению каналами управления \(«control channels»\) в приложении. 2. Основные классы включают \`ControlChannel\`, \`ControlActionSet\`, и связанные с ними каналы и сервисы. 3. Основной файл для рассмотрения — \`base.py\`. 4. Ключевые обязанности и интерфейсы описаны через абстрактные методы \(\`start\`, \`stop\`\) в классе \`ControlChannel\`. Поскольку конкретный класс \`RuntimeFactoryManager\` отсутствует в данном контексте, невозможно предоставить его объяснение. +- **plba-v2-open-file-nonexistent** + Query: Открой файл src/app_runtime/core/missing_runtime.py + > Файл \`src/app\_runtime/core/missing\_runtime.py\` не найден. \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-architecture-control-plane.json b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-architecture-control-plane.json new file mode 100644 index 0000000..6449f68 --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-architecture-control-plane.json @@ -0,0 +1,4171 @@ +{ + "case_id": "plba-v2-architecture-control-plane", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "agent_runtime", + "mode": "full_chain", + "query": "Какие компоненты участвуют в ControlPlaneService?", + "actual": { + "intent": "CODE_QA", + "sub_intent": "ARCHITECTURE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 33, + "llm_answer": "В архитектуре подсистемы ControlPlaneService участвуют следующие основные компоненты:\n\n1. **ControlPlaneService** – главный сервис, инициализирующий и управляющий каналами контроля. Он создает каналы, регистрирует их и управляет жизненным циклом через методы `register_channel`, `start` и `stop`.\n - Создаёт экземпляры каналов (`ControlChannel`) и сохраняет их в поле `_channels`.\n - Вызывает асинхронную инициализацию каналов с помощью методов `start` и `stop`.\n\n2. **ControlChannel** – абстрактный базовый класс для каналов управления, определяющий интерфейс для старта и остановки канала.\n - Описывает абстракции для начала работы канала и освобождения ресурсов при завершении.\n\n3. **ControlActionSet** – модель действий, используемых в канале управления.\n\nСвязи между компонентами реализованы следующим образом:\n- **ControlPlaneService** создаёт и регистрирует экземпляры каналов управления через метод `register_channel`.\n- Каналы управления (например, HttpControlChannel) используют общий интерфейс `ControlChannel` для реализации своих функций старта и завершения.\n\nГраницы ответственности включают управление жизненным циклом каналов и координацию взаимодействия различных компонентов через зарегистрированные каналы.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "ControlPlaneService" + ], + "layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "query": "Какие компоненты участвуют в ControlPlaneService?", + "router_result": { + "schema_version": "1.1", + "intent": "CODE_QA", + "retrieval_profile": "code", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query_plan": { + "raw": "Какие компоненты участвуют в ControlPlaneService?", + "normalized": "Какие компоненты участвуют в ControlPlaneService?", + "sub_intent": "ARCHITECTURE", + "negations": [], + "expansions": [ + "ControlPlaneService" + ], + "keyword_hints": [ + "ControlPlaneService" + ], + "path_hints": [], + "doc_scope_hints": [], + "symbol_candidates": [ + "ControlPlaneService" + ], + "symbol_kind_hint": "class", + "anchors": [ + { + "type": "SYMBOL", + "value": "ControlPlaneService", + "source": "user_text", + "subtype": null, + "span": { + "start": 29, + "end": 48 + }, + "confidence": 0.88 + } + ] + }, + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C4_SEMANTIC_ROLES", + "top_k": 12 + }, + { + "layer_id": "C3_ENTRYPOINTS", + "top_k": 8 + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "top_k": 8 + }, + { + "layer_id": "C1_SYMBOL_CATALOG", + "top_k": 6 + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 4 + } + ], + "filters": { + "test_policy": "EXCLUDE", + "path_scope": [], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + }, + "symbol_resolution": { + "status": "pending", + "resolved_symbol": null, + "alternatives": [ + "ControlPlaneService" + ], + "confidence": 0.0 + }, + "evidence_policy": { + "require_def": true, + "require_flow": true, + "require_spec": false, + "allow_answer_without_evidence": false + } + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Какие компоненты участвуют в ControlPlaneService?", + "sub_intent": "ARCHITECTURE", + "path_scope": [], + "keyword_hints": [ + "ControlPlaneService" + ], + "symbol_candidates": [ + "ControlPlaneService" + ], + "requested_layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ], + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C4_SEMANTIC_ROLES", + "top_k": 12 + }, + { + "layer_id": "C3_ENTRYPOINTS", + "top_k": 8 + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "top_k": 8 + }, + { + "layer_id": "C1_SYMBOL_CATALOG", + "top_k": 6 + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 4 + } + ], + "filters": { + "test_policy": "EXCLUDE", + "path_scope": [], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + }, + "query_plan": { + "raw": "Какие компоненты участвуют в ControlPlaneService?", + "normalized": "Какие компоненты участвуют в ControlPlaneService?", + "sub_intent": "ARCHITECTURE", + "negations": [], + "expansions": [ + "ControlPlaneService" + ], + "keyword_hints": [ + "ControlPlaneService" + ], + "path_hints": [], + "doc_scope_hints": [], + "symbol_candidates": [ + "ControlPlaneService" + ], + "symbol_kind_hint": "class", + "anchors": [ + { + "type": "SYMBOL", + "value": "ControlPlaneService", + "source": "user_text", + "subtype": null, + "span": { + "start": 29, + "end": 48 + }, + "confidence": 0.88 + } + ] + } + }, + "retrieval_result": { + "target_symbol_candidates": [ + "ControlPlaneService", + "ControlChannel" + ], + "resolved_symbol": "ControlPlaneService", + "symbol_resolution_status": "resolved", + "file_candidates": [ + "src/app_runtime/control/service.py", + "src/app_runtime/control/base.py", + "src/app_runtime/control/http_runner.py", + "src/app_runtime/control/http_channel.py", + "src/app_runtime/control/http_app.py", + "src/app_runtime/workflow/persistence/workflow_persistence.py", + "src/app_runtime/queue/in_memory.py", + "src/app_runtime/config/file_loader.py", + "src/app_runtime/tracing/store.py", + "src/app_runtime/workers/supervisor.py", + "src/app_runtime/workflow/engine/workflow_engine.py", + "src/app_runtime/core/runtime.py", + "src/plba/control.py", + "src/app_runtime/control/__init__.py", + "src/plba/__init__.py" + ], + "code_chunks": [ + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "start_line": 12, + "end_line": 52, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/base.py", + "title": "ControlActionSet", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "start_line": 14, + "end_line": 18, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/base.py", + "title": "ControlChannel", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "start_line": 21, + "end_line": 28, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/http_runner.py", + "title": "UvicornThreadRunner", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "start_line": 10, + "end_line": 61, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/http_channel.py", + "title": "HttpControlChannel", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "start_line": 12, + "end_line": 57, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/http_app.py", + "title": "HttpControlAppFactory", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "start_line": 15, + "end_line": 53, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "title": "WorkflowPersistence", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "start_line": 8, + "end_line": 54, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/queue/in_memory.py", + "title": "InMemoryTaskQueue", + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)", + "start_line": 9, + "end_line": 38, + "metadata": { + "symbol_id": "2da04cb94544a3bcbf0943a95ad4bdd8710bcafaa32a02fd0e4de2178dcf3533", + "symbol_name": "InMemoryTaskQueue", + "qname": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 9, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "58f0cc001ccda0eee4c6bc32ed83bd05eafd6b6644f1e8b4aa9eed3103db73dc", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/config/file_loader.py", + "title": "ConfigFileLoader", + "content": "ConfigFileLoader\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (8)", + "start_line": 11, + "end_line": 48, + "metadata": { + "symbol_id": "a8474eca8b6e9dc86ae67ed68b16fa5fb639ef08739c053e7b7195489765667f", + "symbol_name": "ConfigFileLoader", + "qname": "ConfigFileLoader", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 8, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/tracing/store.py", + "title": "TraceContextStore", + "content": "TraceContextStore\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "start_line": 15, + "end_line": 52, + "metadata": { + "symbol_id": "b2dad4fbe16ffb11b58deba311c7739955c39d59f291b22181f33e9c8cce4059", + "symbol_name": "TraceContextStore", + "qname": "TraceContextStore", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "d369554f08fc92039c6edd5a2a1e73b23901533e8974459170bbd9347d263dc5", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/workers/supervisor.py", + "title": "WorkerSupervisor", + "content": "WorkerSupervisor\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "start_line": 10, + "end_line": 59, + "metadata": { + "symbol_id": "c17b44e8d9e97d490989b21fa67d7c346cdda8a0472e4c41fb243c8846faa124", + "symbol_name": "WorkerSupervisor", + "qname": "WorkerSupervisor", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "77609d9d5927171cce7fc3a54897c183fd63068710c6362029b700937aae5eee", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "title": "WorkflowEngine", + "content": "WorkflowEngine\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "start_line": 10, + "end_line": 86, + "metadata": { + "symbol_id": "57ec0a9f11c542c78e008684a888397e8d9ef4223671acb2567e631a0cbc70b4", + "symbol_name": "WorkflowEngine", + "qname": "WorkflowEngine", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C3_ENTRYPOINTS", + "path": "src/app_runtime/control/http_app.py", + "title": "app.post", + "content": "fastapi http app.post", + "start_line": 38, + "end_line": 42, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C3_ENTRYPOINTS", + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "content": "fastapi http app.get", + "start_line": 31, + "end_line": 34, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C3_ENTRYPOINTS", + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "content": "fastapi http app.get", + "start_line": 38, + "end_line": 42, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "start_line": 14, + "end_line": 47, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "start_line": 14, + "end_line": 17, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "start_line": 14, + "end_line": 20, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "start_line": 14, + "end_line": 25, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "start_line": 14, + "end_line": 51, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.start:calls", + "content": "ControlPlaneService.start calls asyncio.run", + "start_line": 22, + "end_line": 22, + "metadata": { + "edge_id": "4e0b3147fb867d48d26567570c259f4052a739e3098133802d4b8bafcf03be6b", + "edge_type": "calls", + "src_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "src_qname": "ControlPlaneService.start", + "dst_symbol_id": null, + "dst_ref": "asyncio.run", + "resolution": "partial", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.register_channel:reads_attr", + "content": "ControlPlaneService.register_channel reads_attr ControlPlaneService._channels", + "start_line": 17, + "end_line": 17, + "metadata": { + "edge_id": "3101fdc99a7a9c5aebf18a024bc148d37b348248a6fd02b95724dff280f2908a", + "edge_type": "reads_attr", + "src_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "src_qname": "ControlPlaneService.register_channel", + "dst_symbol_id": null, + "dst_ref": "ControlPlaneService._channels", + "resolution": "partial", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.start:reads_attr", + "content": "ControlPlaneService.start reads_attr ControlPlaneService._channels", + "start_line": 20, + "end_line": 20, + "metadata": { + "edge_id": "9452e50ef27d47c30ee1c311c48fe73ecddbf7a6dbcf967a6345e98222d9f71a", + "edge_type": "reads_attr", + "src_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "src_qname": "ControlPlaneService.start", + "dst_symbol_id": null, + "dst_ref": "ControlPlaneService._channels", + "resolution": "partial", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/core/runtime.py", + "title": "ControlPlaneService", + "content": "const ControlPlaneService\nControlPlaneService = app_runtime.control.service.ControlPlaneService", + "start_line": 7, + "end_line": 7, + "metadata": { + "symbol_id": "3030804d119fa1d4b8a6c32616062a5e11080b03d33818c9280bcc5bdd8fd512", + "qname": "ControlPlaneService", + "kind": "const", + "signature": "ControlPlaneService = app_runtime.control.service.ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/plba/control.py", + "title": "ControlPlaneService", + "content": "const ControlPlaneService\nControlPlaneService = app_runtime.control.service.ControlPlaneService", + "start_line": 3, + "end_line": 3, + "metadata": { + "symbol_id": "bd7f620031a049b8d791534536941ce75071029542395a7bb14817742827070a", + "qname": "ControlPlaneService", + "kind": "const", + "signature": "ControlPlaneService = app_runtime.control.service.ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.plba.control", + "is_test": false, + "blob_sha": "31bd5c4481bfa7fbca8fae56d4860a67e3953ca74474ac8439e1f39b685d7bc8", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService", + "content": "class ControlPlaneService\nControlPlaneService", + "start_line": 12, + "end_line": 52, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "qname": "ControlPlaneService", + "kind": "class", + "signature": "ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/__init__.py", + "title": "ControlPlaneService", + "content": "const ControlPlaneService\nControlPlaneService = app_runtime.control.service.ControlPlaneService", + "start_line": 3, + "end_line": 3, + "metadata": { + "symbol_id": "217e8f044d1c01644bf7b81e5046af9e84469210c692a2fb0c476a19bb069ae1", + "qname": "ControlPlaneService", + "kind": "const", + "signature": "ControlPlaneService = app_runtime.control.service.ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/plba/__init__.py", + "title": "ControlPlaneService", + "content": "const ControlPlaneService\nControlPlaneService = plba.control.ControlPlaneService", + "start_line": 3, + "end_line": 3, + "metadata": { + "symbol_id": "90b154d49d544efb7c448e91bf5b75231578a6571b98c06a2a555fa5dcffb152", + "qname": "ControlPlaneService", + "kind": "const", + "signature": "ControlPlaneService = plba.control.ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/__init__.py", + "title": "ControlChannel", + "content": "const ControlChannel\nControlChannel = app_runtime.control.base.ControlChannel", + "start_line": 1, + "end_line": 1, + "metadata": { + "symbol_id": "268420f7aa4ed74082b9276cae0cded4f00bac090ffd58fa020a65be0fe19c27", + "qname": "ControlChannel", + "kind": "const", + "signature": "ControlChannel = app_runtime.control.base.ControlChannel", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/base.py", + "title": "src/app_runtime/control/base.py:ControlChannel", + "content": "class ControlChannel(ABC):\n @abstractmethod\n async def start(self, actions: ControlActionSet) -> None:\n \"\"\"Start the control channel and bind handlers.\"\"\"\n\n @abstractmethod\n async def stop(self) -> None:\n \"\"\"Stop the control channel and release resources.\"\"\"", + "start_line": 21, + "end_line": 28, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/__init__.py", + "title": "src/app_runtime/control/__init__.py:1-5", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\"ControlActionSet\", \"ControlChannel\", \"ControlPlaneService\", \"HttpControlChannel\"]", + "start_line": 1, + "end_line": 5, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/base.py", + "title": "src/app_runtime/control/base.py:ControlActionSet", + "content": "class ControlActionSet:\n health: HealthHandler\n start: ActionHandler\n stop: ActionHandler\n status: ActionHandler", + "start_line": 14, + "end_line": 18, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/http_app.py", + "title": "src/app_runtime/control/http_app.py:HttpControlAppFactory", + "content": "class HttpControlAppFactory:\n def create(\n self,\n health_provider: Callable[[], Awaitable[HealthPayload]],\n action_provider: Callable[[str, str], Awaitable[JSONResponse]],\n ) -> FastAPI:\n app = FastAPI(title=\"PLBA Control API\")\n\n @app.middleware(\"http\")\n async def log_api_call(request: Request, call_next): # type: ignore[no-untyped-def]\n started = time.monotonic()\n response = await call_next(request)\n response.headers[\"X-Response-Time-Ms\"] = str(int((time.monotonic() - started) * 1000))\n return response\n\n @app.get(\"/health\")\n async def health() -> JSONResponse:\n payload = await health_provider()\n status_code = 200 if payload.get(\"status\") == \"ok\" else 503\n return JSONResponse(content=payload, status_code=status_code)\n\n @app.get(\"/actions/{action}\")\n @app.post(\"/actions/{action}\")\n async def action(action: str, request: Request) -> JSONResponse:\n client_source = self._client_source(request)\n if action in {\"start\", \"stop\"}:\n LOGGER.warning(\"Control action requested: /actions/%s client=%s\", action, client_source)\n return await action_provider(action, client_source)\n\n return app\n\n def _client_source(self, request: Request) -> str:\n explicit_header = request.headers.get(\"X-Client-Source\", \"\").strip()\n if explicit_header:\n return explicit_header\n user_agent = request.headers.get(\"User-Agent\", \"\").strip()\n if user_agent:\n return f\"user-agent:{user_agent}\"\n return \"unknown\"", + "start_line": 15, + "end_line": 53, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "relations": [ + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async" + }, + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel" + }, + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start" + }, + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop" + }, + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async" + }, + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "4e0b3147fb867d48d26567570c259f4052a739e3098133802d4b8bafcf03be6b", + "edge_type": "calls", + "src_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "src_qname": "ControlPlaneService.start", + "dst_symbol_id": null, + "dst_ref": "asyncio.run", + "resolution": "partial", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.start calls asyncio.run" + }, + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "3101fdc99a7a9c5aebf18a024bc148d37b348248a6fd02b95724dff280f2908a", + "edge_type": "reads_attr", + "src_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "src_qname": "ControlPlaneService.register_channel", + "dst_symbol_id": null, + "dst_ref": "ControlPlaneService._channels", + "resolution": "partial", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.register_channel reads_attr ControlPlaneService._channels" + }, + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "9452e50ef27d47c30ee1c311c48fe73ecddbf7a6dbcf967a6345e98222d9f71a", + "edge_type": "reads_attr", + "src_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "src_qname": "ControlPlaneService.start", + "dst_symbol_id": null, + "dst_ref": "ControlPlaneService._channels", + "resolution": "partial", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.start reads_attr ControlPlaneService._channels" + } + ], + "entrypoints": [ + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.post", + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "test_candidates": [], + "layer_outcomes": [ + { + "layer_id": "C4_SEMANTIC_ROLES", + "hit_count": 12, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C3_ENTRYPOINTS", + "hit_count": 3, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 6, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 4, + "empty": false, + "fallback_used": false + } + ], + "missing_layers": [], + "raw_rows": [ + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/queue/in_memory.py", + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)", + "layer": "C4_SEMANTIC_ROLES", + "title": "InMemoryTaskQueue", + "span_start": 9, + "span_end": 38, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 22, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "2da04cb94544a3bcbf0943a95ad4bdd8710bcafaa32a02fd0e4de2178dcf3533", + "symbol_name": "InMemoryTaskQueue", + "qname": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 9, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "58f0cc001ccda0eee4c6bc32ed83bd05eafd6b6644f1e8b4aa9eed3103db73dc", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "ConfigFileLoader\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (8)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ConfigFileLoader", + "span_start": 11, + "span_end": 48, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 23, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "a8474eca8b6e9dc86ae67ed68b16fa5fb639ef08739c053e7b7195489765667f", + "symbol_name": "ConfigFileLoader", + "qname": "ConfigFileLoader", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 8, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/store.py", + "content": "TraceContextStore\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "TraceContextStore", + "span_start": 15, + "span_end": 52, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "b2dad4fbe16ffb11b58deba311c7739955c39d59f291b22181f33e9c8cce4059", + "symbol_name": "TraceContextStore", + "qname": "TraceContextStore", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "d369554f08fc92039c6edd5a2a1e73b23901533e8974459170bbd9347d263dc5", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workers/supervisor.py", + "content": "WorkerSupervisor\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkerSupervisor", + "span_start": 10, + "span_end": 59, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "c17b44e8d9e97d490989b21fa67d7c346cdda8a0472e4c41fb243c8846faa124", + "symbol_name": "WorkerSupervisor", + "qname": "WorkerSupervisor", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "77609d9d5927171cce7fc3a54897c183fd63068710c6362029b700937aae5eee", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowEngine", + "span_start": 10, + "span_end": 86, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "57ec0a9f11c542c78e008684a888397e8d9ef4223671acb2567e631a0cbc70b4", + "symbol_name": "WorkflowEngine", + "qname": "WorkflowEngine", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": null, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": null, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": null, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.start calls asyncio.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.start:calls", + "span_start": 22, + "span_end": 22, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "4e0b3147fb867d48d26567570c259f4052a739e3098133802d4b8bafcf03be6b", + "edge_type": "calls", + "src_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "src_qname": "ControlPlaneService.start", + "dst_symbol_id": null, + "dst_ref": "asyncio.run", + "resolution": "partial", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.register_channel reads_attr ControlPlaneService._channels", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.register_channel:reads_attr", + "span_start": 17, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "3101fdc99a7a9c5aebf18a024bc148d37b348248a6fd02b95724dff280f2908a", + "edge_type": "reads_attr", + "src_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "src_qname": "ControlPlaneService.register_channel", + "dst_symbol_id": null, + "dst_ref": "ControlPlaneService._channels", + "resolution": "partial", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.start reads_attr ControlPlaneService._channels", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.start:reads_attr", + "span_start": 20, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "9452e50ef27d47c30ee1c311c48fe73ecddbf7a6dbcf967a6345e98222d9f71a", + "edge_type": "reads_attr", + "src_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "src_qname": "ControlPlaneService.start", + "dst_symbol_id": null, + "dst_ref": "ControlPlaneService._channels", + "resolution": "partial", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "const ControlPlaneService\nControlPlaneService = app_runtime.control.service.ControlPlaneService", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlPlaneService", + "span_start": 7, + "span_end": 7, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "3030804d119fa1d4b8a6c32616062a5e11080b03d33818c9280bcc5bdd8fd512", + "qname": "ControlPlaneService", + "kind": "const", + "signature": "ControlPlaneService = app_runtime.control.service.ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/control.py", + "content": "const ControlPlaneService\nControlPlaneService = app_runtime.control.service.ControlPlaneService", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlPlaneService", + "span_start": 3, + "span_end": 3, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "bd7f620031a049b8d791534536941ce75071029542395a7bb14817742827070a", + "qname": "ControlPlaneService", + "kind": "const", + "signature": "ControlPlaneService = app_runtime.control.service.ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.plba.control", + "is_test": false, + "blob_sha": "31bd5c4481bfa7fbca8fae56d4860a67e3953ca74474ac8439e1f39b685d7bc8", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "class ControlPlaneService\nControlPlaneService", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "qname": "ControlPlaneService", + "kind": "class", + "signature": "ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "const ControlPlaneService\nControlPlaneService = app_runtime.control.service.ControlPlaneService", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlPlaneService", + "span_start": 3, + "span_end": 3, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "217e8f044d1c01644bf7b81e5046af9e84469210c692a2fb0c476a19bb069ae1", + "qname": "ControlPlaneService", + "kind": "const", + "signature": "ControlPlaneService = app_runtime.control.service.ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/__init__.py", + "content": "const ControlPlaneService\nControlPlaneService = plba.control.ControlPlaneService", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlPlaneService", + "span_start": 3, + "span_end": 3, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "90b154d49d544efb7c448e91bf5b75231578a6571b98c06a2a555fa5dcffb152", + "qname": "ControlPlaneService", + "kind": "const", + "signature": "ControlPlaneService = plba.control.ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "const ControlChannel\nControlChannel = app_runtime.control.base.ControlChannel", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlChannel", + "span_start": 1, + "span_end": 1, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "268420f7aa4ed74082b9276cae0cded4f00bac090ffd58fa020a65be0fe19c27", + "qname": "ControlChannel", + "kind": "const", + "signature": "ControlChannel = app_runtime.control.base.ControlChannel", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlChannel(ABC):\n @abstractmethod\n async def start(self, actions: ControlActionSet) -> None:\n \"\"\"Start the control channel and bind handlers.\"\"\"\n\n @abstractmethod\n async def stop(self) -> None:\n \"\"\"Stop the control channel and release resources.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\"ControlActionSet\", \"ControlChannel\", \"ControlPlaneService\", \"HttpControlChannel\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/__init__.py:1-5", + "span_start": 1, + "span_end": 5, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlActionSet:\n health: HealthHandler\n start: ActionHandler\n stop: ActionHandler\n status: ActionHandler", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "class HttpControlAppFactory:\n def create(\n self,\n health_provider: Callable[[], Awaitable[HealthPayload]],\n action_provider: Callable[[str, str], Awaitable[JSONResponse]],\n ) -> FastAPI:\n app = FastAPI(title=\"PLBA Control API\")\n\n @app.middleware(\"http\")\n async def log_api_call(request: Request, call_next): # type: ignore[no-untyped-def]\n started = time.monotonic()\n response = await call_next(request)\n response.headers[\"X-Response-Time-Ms\"] = str(int((time.monotonic() - started) * 1000))\n return response\n\n @app.get(\"/health\")\n async def health() -> JSONResponse:\n payload = await health_provider()\n status_code = 200 if payload.get(\"status\") == \"ok\" else 503\n return JSONResponse(content=payload, status_code=status_code)\n\n @app.get(\"/actions/{action}\")\n @app.post(\"/actions/{action}\")\n async def action(action: str, request: Request) -> JSONResponse:\n client_source = self._client_source(request)\n if action in {\"start\", \"stop\"}:\n LOGGER.warning(\"Control action requested: /actions/%s client=%s\", action, client_source)\n return await action_provider(action, client_source)\n\n return app\n\n def _client_source(self, request: Request) -> str:\n explicit_header = request.headers.get(\"X-Client-Source\", \"\").strip()\n if explicit_header:\n return explicit_header\n user_agent = request.headers.get(\"User-Agent\", \"\").strip()\n if user_agent:\n return f\"user-agent:{user_agent}\"\n return \"unknown\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_app.py:HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "retrieval_report": { + "executed_layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C4_SEMANTIC_ROLES": "vector", + "C3_ENTRYPOINTS": "vector", + "C2_DEPENDENCY_GRAPH": "vector", + "C1_SYMBOL_CATALOG": "vector", + "C0_SOURCE_CHUNKS": "vector" + }, + "top_k_by_layer": { + "C4_SEMANTIC_ROLES": 12, + "C3_ENTRYPOINTS": 8, + "C2_DEPENDENCY_GRAPH": 8, + "C1_SYMBOL_CATALOG": 6, + "C0_SOURCE_CHUNKS": 4 + }, + "filters_by_layer": { + "C4_SEMANTIC_ROLES": { + "path_scope": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [] + }, + "C1_SYMBOL_CATALOG": { + "path_scope": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [] + } + }, + "fallback": { + "used": false, + "reason": null + }, + "retrieval_by_layer_ms": { + "C4_SEMANTIC_ROLES": 35, + "C3_ENTRYPOINTS": 21, + "C2_DEPENDENCY_GRAPH": 65, + "C1_SYMBOL_CATALOG": 27, + "C0_SOURCE_CHUNKS": 17 + } + } + }, + "diagnostics": { + "intent_correct": null, + "target_found": true, + "layers_used": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ], + "retrieval_sufficient": true, + "answer_mode": "normal", + "router_result": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "ARCHITECTURE", + "path_scope": [], + "layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ], + "symbol_resolution_status": "pending" + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Какие компоненты участвуют в ControlPlaneService?", + "sub_intent": "ARCHITECTURE", + "path_scope": [], + "requested_layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "C4_SEMANTIC_ROLES", + "hit_count": 12, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C3_ENTRYPOINTS", + "hit_count": 3, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 6, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 4, + "empty": false, + "fallback_used": false + } + ], + "empty_layers": [], + "evidence_gate_decision": { + "sufficient": true, + "failure_reasons": [], + "evidence_count": 33 + }, + "failure_reasons": [], + "timings_ms": {} + }, + "rag_rows": [ + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/queue/in_memory.py", + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)", + "layer": "C4_SEMANTIC_ROLES", + "title": "InMemoryTaskQueue", + "span_start": 9, + "span_end": 38, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 22, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "2da04cb94544a3bcbf0943a95ad4bdd8710bcafaa32a02fd0e4de2178dcf3533", + "symbol_name": "InMemoryTaskQueue", + "qname": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 9, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "58f0cc001ccda0eee4c6bc32ed83bd05eafd6b6644f1e8b4aa9eed3103db73dc", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "ConfigFileLoader\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (8)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ConfigFileLoader", + "span_start": 11, + "span_end": 48, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 23, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "a8474eca8b6e9dc86ae67ed68b16fa5fb639ef08739c053e7b7195489765667f", + "symbol_name": "ConfigFileLoader", + "qname": "ConfigFileLoader", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 8, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/store.py", + "content": "TraceContextStore\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "TraceContextStore", + "span_start": 15, + "span_end": 52, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b2dad4fbe16ffb11b58deba311c7739955c39d59f291b22181f33e9c8cce4059", + "symbol_name": "TraceContextStore", + "qname": "TraceContextStore", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "d369554f08fc92039c6edd5a2a1e73b23901533e8974459170bbd9347d263dc5", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workers/supervisor.py", + "content": "WorkerSupervisor\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkerSupervisor", + "span_start": 10, + "span_end": 59, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "c17b44e8d9e97d490989b21fa67d7c346cdda8a0472e4c41fb243c8846faa124", + "symbol_name": "WorkerSupervisor", + "qname": "WorkerSupervisor", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "77609d9d5927171cce7fc3a54897c183fd63068710c6362029b700937aae5eee", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowEngine", + "span_start": 10, + "span_end": 86, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "57ec0a9f11c542c78e008684a888397e8d9ef4223671acb2567e631a0cbc70b4", + "symbol_name": "WorkflowEngine", + "qname": "WorkflowEngine", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.start calls asyncio.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.start:calls", + "span_start": 22, + "span_end": 22, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "4e0b3147fb867d48d26567570c259f4052a739e3098133802d4b8bafcf03be6b", + "edge_type": "calls", + "src_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "src_qname": "ControlPlaneService.start", + "dst_symbol_id": null, + "dst_ref": "asyncio.run", + "resolution": "partial", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.register_channel reads_attr ControlPlaneService._channels", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.register_channel:reads_attr", + "span_start": 17, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3101fdc99a7a9c5aebf18a024bc148d37b348248a6fd02b95724dff280f2908a", + "edge_type": "reads_attr", + "src_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "src_qname": "ControlPlaneService.register_channel", + "dst_symbol_id": null, + "dst_ref": "ControlPlaneService._channels", + "resolution": "partial", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.start reads_attr ControlPlaneService._channels", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.start:reads_attr", + "span_start": 20, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "9452e50ef27d47c30ee1c311c48fe73ecddbf7a6dbcf967a6345e98222d9f71a", + "edge_type": "reads_attr", + "src_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "src_qname": "ControlPlaneService.start", + "dst_symbol_id": null, + "dst_ref": "ControlPlaneService._channels", + "resolution": "partial", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "const ControlPlaneService\nControlPlaneService = app_runtime.control.service.ControlPlaneService", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlPlaneService", + "span_start": 7, + "span_end": 7, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "3030804d119fa1d4b8a6c32616062a5e11080b03d33818c9280bcc5bdd8fd512", + "qname": "ControlPlaneService", + "kind": "const", + "signature": "ControlPlaneService = app_runtime.control.service.ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/control.py", + "content": "const ControlPlaneService\nControlPlaneService = app_runtime.control.service.ControlPlaneService", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlPlaneService", + "span_start": 3, + "span_end": 3, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "bd7f620031a049b8d791534536941ce75071029542395a7bb14817742827070a", + "qname": "ControlPlaneService", + "kind": "const", + "signature": "ControlPlaneService = app_runtime.control.service.ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.plba.control", + "is_test": false, + "blob_sha": "31bd5c4481bfa7fbca8fae56d4860a67e3953ca74474ac8439e1f39b685d7bc8", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "class ControlPlaneService\nControlPlaneService", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "qname": "ControlPlaneService", + "kind": "class", + "signature": "ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "const ControlPlaneService\nControlPlaneService = app_runtime.control.service.ControlPlaneService", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlPlaneService", + "span_start": 3, + "span_end": 3, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "217e8f044d1c01644bf7b81e5046af9e84469210c692a2fb0c476a19bb069ae1", + "qname": "ControlPlaneService", + "kind": "const", + "signature": "ControlPlaneService = app_runtime.control.service.ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/__init__.py", + "content": "const ControlPlaneService\nControlPlaneService = plba.control.ControlPlaneService", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlPlaneService", + "span_start": 3, + "span_end": 3, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "90b154d49d544efb7c448e91bf5b75231578a6571b98c06a2a555fa5dcffb152", + "qname": "ControlPlaneService", + "kind": "const", + "signature": "ControlPlaneService = plba.control.ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "const ControlChannel\nControlChannel = app_runtime.control.base.ControlChannel", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlChannel", + "span_start": 1, + "span_end": 1, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "268420f7aa4ed74082b9276cae0cded4f00bac090ffd58fa020a65be0fe19c27", + "qname": "ControlChannel", + "kind": "const", + "signature": "ControlChannel = app_runtime.control.base.ControlChannel", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlChannel(ABC):\n @abstractmethod\n async def start(self, actions: ControlActionSet) -> None:\n \"\"\"Start the control channel and bind handlers.\"\"\"\n\n @abstractmethod\n async def stop(self) -> None:\n \"\"\"Stop the control channel and release resources.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\"ControlActionSet\", \"ControlChannel\", \"ControlPlaneService\", \"HttpControlChannel\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/__init__.py:1-5", + "span_start": 1, + "span_end": 5, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlActionSet:\n health: HealthHandler\n start: ActionHandler\n stop: ActionHandler\n status: ActionHandler", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "class HttpControlAppFactory:\n def create(\n self,\n health_provider: Callable[[], Awaitable[HealthPayload]],\n action_provider: Callable[[str, str], Awaitable[JSONResponse]],\n ) -> FastAPI:\n app = FastAPI(title=\"PLBA Control API\")\n\n @app.middleware(\"http\")\n async def log_api_call(request: Request, call_next): # type: ignore[no-untyped-def]\n started = time.monotonic()\n response = await call_next(request)\n response.headers[\"X-Response-Time-Ms\"] = str(int((time.monotonic() - started) * 1000))\n return response\n\n @app.get(\"/health\")\n async def health() -> JSONResponse:\n payload = await health_provider()\n status_code = 200 if payload.get(\"status\") == \"ok\" else 503\n return JSONResponse(content=payload, status_code=status_code)\n\n @app.get(\"/actions/{action}\")\n @app.post(\"/actions/{action}\")\n async def action(action: str, request: Request) -> JSONResponse:\n client_source = self._client_source(request)\n if action in {\"start\", \"stop\"}:\n LOGGER.warning(\"Control action requested: /actions/%s client=%s\", action, client_source)\n return await action_provider(action, client_source)\n\n return app\n\n def _client_source(self, request: Request) -> str:\n explicit_header = request.headers.get(\"X-Client-Source\", \"\").strip()\n if explicit_header:\n return explicit_header\n user_agent = request.headers.get(\"User-Agent\", \"\").strip()\n if user_agent:\n return f\"user-agent:{user_agent}\"\n return \"unknown\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_app.py:HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "validation": { + "passed": true, + "action": "return", + "reasons": [] + } + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-architecture-control-plane.md b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-architecture-control-plane.md new file mode 100644 index 0000000..0543d0f --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-architecture-control-plane.md @@ -0,0 +1,34 @@ +# plba-v2-architecture-control-plane + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: agent_runtime +- mode: full_chain +- passed: True + +## Query +Какие компоненты участвуют в ControlPlaneService? + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "ARCHITECTURE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 33, + "llm_answer": "В архитектуре подсистемы ControlPlaneService участвуют следующие основные компоненты:\n\n1. **ControlPlaneService** – главный сервис, инициализирующий и управляющий каналами контроля. Он создает каналы, регистрирует их и управляет жизненным циклом через методы `register_channel`, `start` и `stop`.\n - Создаёт экземпляры каналов (`ControlChannel`) и сохраняет их в поле `_channels`.\n - Вызывает асинхронную инициализацию каналов с помощью методов `start` и `stop`.\n\n2. **ControlChannel** – абстрактный базовый класс для каналов управления, определяющий интерфейс для старта и остановки канала.\n - Описывает абстракции для начала работы канала и освобождения ресурсов при завершении.\n\n3. **ControlActionSet** – модель действий, используемых в канале управления.\n\nСвязи между компонентами реализованы следующим образом:\n- **ControlPlaneService** создаёт и регистрирует экземпляры каналов управления через метод `register_channel`.\n- Каналы управления (например, HttpControlChannel) используют общий интерфейс `ControlChannel` для реализации своих функций старта и завершения.\n\nГраницы ответственности включают управление жизненным циклом каналов и координацию взаимодействия различных компонентов через зарегистрированные каналы.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "ControlPlaneService" + ], + "layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-architecture-runtime-manager.json b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-architecture-runtime-manager.json new file mode 100644 index 0000000..04ff995 --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-architecture-runtime-manager.json @@ -0,0 +1,4363 @@ +{ + "case_id": "plba-v2-architecture-runtime-manager", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "agent_runtime", + "mode": "full_chain", + "query": "Какие компоненты участвуют в RuntimeManager?", + "actual": { + "intent": "CODE_QA", + "sub_intent": "ARCHITECTURE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 33, + "llm_answer": "В подсистеме RuntimeManager участвуют следующие компоненты:\n\n1. **RuntimeManager** (src/app_runtime/core/runtime.py):\n - Инициализирует конфигурацию и управляет жизненным циклом runtime-пipeline.\n - Создаёт и регистрирует основные сервисы (ControlPlaneService, WorkflowPersistence, InMemoryTaskQueue, ConfigFileLoader, TraceContextStore, WorkerSupervisor).\n\n2. **ControlPlaneService** (src/app_runtime/control/service.py):\n - Служба управления каналами контроля и взаимодействия с внешними сущностями.\n - Регистрирует каналы и запускает асинхронные операции.\n\n3. **WorkflowPersistence** (src/app_runtime/workflow/persistence/workflow_persistence.py):\n - Обеспечивает долговременное хранение workflow-данных.\n\n4. **InMemoryTaskQueue** (src/app_runtime/queue/in_memory.py):\n - Хранит задачи в памяти для временного хранения и обработки.\n\n5. **ConfigFileLoader** (src/app_runtime/config/file_loader.py):\n - Загружает конфигурации из файлов.\n\n6. **TraceContextStore** (src/app_runtime/tracing/store.py):\n - Управляет контекстом трассировки.\n\n7. **WorkerSupervisor** (src/app_runtime/workers/supervisor.py):\n - Контролирует выполнение рабочих задач.\n\nЭти компоненты взаимодействуют через конструктор RuntimeManager, где регистрируются необходимые сервисы и каналы. Управление жизненным циклом и координация работы осуществляется через инициализацию и регистрацию сервисов.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "query": "Какие компоненты участвуют в RuntimeManager?", + "router_result": { + "schema_version": "1.1", + "intent": "CODE_QA", + "retrieval_profile": "code", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query_plan": { + "raw": "Какие компоненты участвуют в RuntimeManager?", + "normalized": "Какие компоненты участвуют в RuntimeManager?", + "sub_intent": "ARCHITECTURE", + "negations": [], + "expansions": [ + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "doc_scope_hints": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "symbol_kind_hint": "class", + "anchors": [ + { + "type": "SYMBOL", + "value": "RuntimeManager", + "source": "user_text", + "subtype": null, + "span": { + "start": 29, + "end": 43 + }, + "confidence": 0.88 + } + ] + }, + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C4_SEMANTIC_ROLES", + "top_k": 12 + }, + { + "layer_id": "C3_ENTRYPOINTS", + "top_k": 8 + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "top_k": 8 + }, + { + "layer_id": "C1_SYMBOL_CATALOG", + "top_k": 6 + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 4 + } + ], + "filters": { + "test_policy": "EXCLUDE", + "path_scope": [], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + }, + "symbol_resolution": { + "status": "pending", + "resolved_symbol": null, + "alternatives": [ + "RuntimeManager" + ], + "confidence": 0.0 + }, + "evidence_policy": { + "require_def": true, + "require_flow": true, + "require_spec": false, + "allow_answer_without_evidence": false + } + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Какие компоненты участвуют в RuntimeManager?", + "sub_intent": "ARCHITECTURE", + "path_scope": [], + "keyword_hints": [ + "RuntimeManager" + ], + "symbol_candidates": [ + "RuntimeManager" + ], + "requested_layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ], + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C4_SEMANTIC_ROLES", + "top_k": 12 + }, + { + "layer_id": "C3_ENTRYPOINTS", + "top_k": 8 + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "top_k": 8 + }, + { + "layer_id": "C1_SYMBOL_CATALOG", + "top_k": 6 + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 4 + } + ], + "filters": { + "test_policy": "EXCLUDE", + "path_scope": [], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + }, + "query_plan": { + "raw": "Какие компоненты участвуют в RuntimeManager?", + "normalized": "Какие компоненты участвуют в RuntimeManager?", + "sub_intent": "ARCHITECTURE", + "negations": [], + "expansions": [ + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "doc_scope_hints": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "symbol_kind_hint": "class", + "anchors": [ + { + "type": "SYMBOL", + "value": "RuntimeManager", + "source": "user_text", + "subtype": null, + "span": { + "start": 29, + "end": 43 + }, + "confidence": 0.88 + } + ] + } + }, + "retrieval_result": { + "target_symbol_candidates": [ + "RuntimeManager", + "ControlChannel" + ], + "resolved_symbol": "RuntimeManager", + "symbol_resolution_status": "resolved", + "file_candidates": [ + "src/app_runtime/core/runtime.py", + "src/app_runtime/control/base.py", + "src/app_runtime/control/service.py", + "src/app_runtime/control/http_runner.py", + "src/app_runtime/control/http_channel.py", + "src/app_runtime/control/http_app.py", + "src/app_runtime/workflow/persistence/workflow_persistence.py", + "src/app_runtime/queue/in_memory.py", + "src/app_runtime/config/file_loader.py", + "src/app_runtime/tracing/store.py", + "src/app_runtime/workers/supervisor.py", + "src/plba/__init__.py", + "src/plba/core.py", + "src/plba/bootstrap.py", + "src/app_runtime/control/__init__.py" + ], + "code_chunks": [ + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/core/runtime.py", + "title": "RuntimeManager", + "content": "RuntimeManager\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests manager\n- orchestrates role-like calls (4)\n- reads and writes state attributes\n- participates in dataflow slices (50)", + "start_line": 18, + "end_line": 179, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "symbol_name": "RuntimeManager", + "qname": "RuntimeManager", + "role": "pipeline_stage", + "confidence": 0.67, + "dataflow_participation": 50, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/base.py", + "title": "ControlActionSet", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "start_line": 14, + "end_line": 18, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/base.py", + "title": "ControlChannel", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "start_line": 21, + "end_line": 28, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "start_line": 12, + "end_line": 52, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/http_runner.py", + "title": "UvicornThreadRunner", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "start_line": 10, + "end_line": 61, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/http_channel.py", + "title": "HttpControlChannel", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "start_line": 12, + "end_line": 57, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/http_app.py", + "title": "HttpControlAppFactory", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "start_line": 15, + "end_line": 53, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "title": "WorkflowPersistence", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "start_line": 8, + "end_line": 54, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/queue/in_memory.py", + "title": "InMemoryTaskQueue", + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)", + "start_line": 9, + "end_line": 38, + "metadata": { + "symbol_id": "2da04cb94544a3bcbf0943a95ad4bdd8710bcafaa32a02fd0e4de2178dcf3533", + "symbol_name": "InMemoryTaskQueue", + "qname": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 9, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "58f0cc001ccda0eee4c6bc32ed83bd05eafd6b6644f1e8b4aa9eed3103db73dc", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/config/file_loader.py", + "title": "ConfigFileLoader", + "content": "ConfigFileLoader\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (8)", + "start_line": 11, + "end_line": 48, + "metadata": { + "symbol_id": "a8474eca8b6e9dc86ae67ed68b16fa5fb639ef08739c053e7b7195489765667f", + "symbol_name": "ConfigFileLoader", + "qname": "ConfigFileLoader", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 8, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/tracing/store.py", + "title": "TraceContextStore", + "content": "TraceContextStore\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "start_line": 15, + "end_line": 52, + "metadata": { + "symbol_id": "b2dad4fbe16ffb11b58deba311c7739955c39d59f291b22181f33e9c8cce4059", + "symbol_name": "TraceContextStore", + "qname": "TraceContextStore", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "d369554f08fc92039c6edd5a2a1e73b23901533e8974459170bbd9347d263dc5", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/workers/supervisor.py", + "title": "WorkerSupervisor", + "content": "WorkerSupervisor\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "start_line": 10, + "end_line": 59, + "metadata": { + "symbol_id": "c17b44e8d9e97d490989b21fa67d7c346cdda8a0472e4c41fb243c8846faa124", + "symbol_name": "WorkerSupervisor", + "qname": "WorkerSupervisor", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "77609d9d5927171cce7fc3a54897c183fd63068710c6362029b700937aae5eee", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C3_ENTRYPOINTS", + "path": "src/app_runtime/control/http_app.py", + "title": "app.post", + "content": "fastapi http app.post", + "start_line": 38, + "end_line": 42, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C3_ENTRYPOINTS", + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "content": "fastapi http app.get", + "start_line": 31, + "end_line": 34, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C3_ENTRYPOINTS", + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "content": "fastapi http app.get", + "start_line": 38, + "end_line": 42, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "start_line": 14, + "end_line": 47, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/core/runtime.py", + "title": "RuntimeManager.__init__:dataflow_slice", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.start", + "start_line": 32, + "end_line": 59, + "metadata": { + "edge_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1", + "dst_ref": "RuntimeManager.start", + "resolution": "resolved", + "slice_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.start" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "start_line": 14, + "end_line": 20, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "start_line": 14, + "end_line": 25, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "start_line": 14, + "end_line": 51, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/core/runtime.py", + "title": "RuntimeManager.__init__:dataflow_slice", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file", + "start_line": 32, + "end_line": 52, + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "start_line": 14, + "end_line": 17, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/core/runtime.py", + "title": "RuntimeManager.__init__:dataflow_slice", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager._register_core_services", + "start_line": 32, + "end_line": 127, + "metadata": { + "edge_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6", + "dst_ref": "RuntimeManager._register_core_services", + "resolution": "resolved", + "slice_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager._register_core_services" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/plba/__init__.py", + "title": "RuntimeManager", + "content": "const RuntimeManager\nRuntimeManager = plba.core.RuntimeManager", + "start_line": 16, + "end_line": 16, + "metadata": { + "symbol_id": "7eacec84f9b8d6c4201374591faecdac7493091c263681495c338973f2971ad9", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = plba.core.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/plba/core.py", + "title": "RuntimeManager", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "start_line": 2, + "end_line": 2, + "metadata": { + "symbol_id": "e1684562d978b7af7fe9b27dc5869d770348a87b5dc19a50360f58544668578b", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.core", + "is_test": false, + "blob_sha": "c0ae25110d20e665216616e26b68adfe035b624ba45d31d1272fb21f906f9ca8", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/service.py", + "title": "RuntimeManager", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "start_line": 9, + "end_line": 9, + "metadata": { + "symbol_id": "62a9575c77aad894120d18b4f2a08cf2ba42f77e9be4a8a432b767d157701afe", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/core/runtime.py", + "title": "RuntimeManager", + "content": "class RuntimeManager\nRuntimeManager", + "start_line": 18, + "end_line": 179, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "qname": "RuntimeManager", + "kind": "class", + "signature": "RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/plba/bootstrap.py", + "title": "RuntimeManager", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "start_line": 4, + "end_line": 4, + "metadata": { + "symbol_id": "27158ca220022eeb5083c6addf8a50775d45f7161284fd60aac48410105f4b98", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/__init__.py", + "title": "ControlChannel", + "content": "const ControlChannel\nControlChannel = app_runtime.control.base.ControlChannel", + "start_line": 1, + "end_line": 1, + "metadata": { + "symbol_id": "268420f7aa4ed74082b9276cae0cded4f00bac090ffd58fa020a65be0fe19c27", + "qname": "ControlChannel", + "kind": "const", + "signature": "ControlChannel = app_runtime.control.base.ControlChannel", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/base.py", + "title": "src/app_runtime/control/base.py:ControlChannel", + "content": "class ControlChannel(ABC):\n @abstractmethod\n async def start(self, actions: ControlActionSet) -> None:\n \"\"\"Start the control channel and bind handlers.\"\"\"\n\n @abstractmethod\n async def stop(self) -> None:\n \"\"\"Stop the control channel and release resources.\"\"\"", + "start_line": 21, + "end_line": 28, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/__init__.py", + "title": "src/app_runtime/control/__init__.py:1-5", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\"ControlActionSet\", \"ControlChannel\", \"ControlPlaneService\", \"HttpControlChannel\"]", + "start_line": 1, + "end_line": 5, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/base.py", + "title": "src/app_runtime/control/base.py:ControlActionSet", + "content": "class ControlActionSet:\n health: HealthHandler\n start: ActionHandler\n stop: ActionHandler\n status: ActionHandler", + "start_line": 14, + "end_line": 18, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/http_app.py", + "title": "src/app_runtime/control/http_app.py:HttpControlAppFactory", + "content": "class HttpControlAppFactory:\n def create(\n self,\n health_provider: Callable[[], Awaitable[HealthPayload]],\n action_provider: Callable[[str, str], Awaitable[JSONResponse]],\n ) -> FastAPI:\n app = FastAPI(title=\"PLBA Control API\")\n\n @app.middleware(\"http\")\n async def log_api_call(request: Request, call_next): # type: ignore[no-untyped-def]\n started = time.monotonic()\n response = await call_next(request)\n response.headers[\"X-Response-Time-Ms\"] = str(int((time.monotonic() - started) * 1000))\n return response\n\n @app.get(\"/health\")\n async def health() -> JSONResponse:\n payload = await health_provider()\n status_code = 200 if payload.get(\"status\") == \"ok\" else 503\n return JSONResponse(content=payload, status_code=status_code)\n\n @app.get(\"/actions/{action}\")\n @app.post(\"/actions/{action}\")\n async def action(action: str, request: Request) -> JSONResponse:\n client_source = self._client_source(request)\n if action in {\"start\", \"stop\"}:\n LOGGER.warning(\"Control action requested: /actions/%s client=%s\", action, client_source)\n return await action_provider(action, client_source)\n\n return app\n\n def _client_source(self, request: Request) -> str:\n explicit_header = request.headers.get(\"X-Client-Source\", \"\").strip()\n if explicit_header:\n return explicit_header\n user_agent = request.headers.get(\"User-Agent\", \"\").strip()\n if user_agent:\n return f\"user-agent:{user_agent}\"\n return \"unknown\"", + "start_line": 15, + "end_line": 53, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "relations": [ + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async" + }, + { + "path": "src/app_runtime/core/runtime.py", + "metadata": { + "edge_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1", + "dst_ref": "RuntimeManager.start", + "resolution": "resolved", + "slice_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.start" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.start" + }, + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start" + }, + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop" + }, + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async" + }, + { + "path": "src/app_runtime/core/runtime.py", + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file" + }, + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel" + }, + { + "path": "src/app_runtime/core/runtime.py", + "metadata": { + "edge_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6", + "dst_ref": "RuntimeManager._register_core_services", + "resolution": "resolved", + "slice_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager._register_core_services" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager._register_core_services" + } + ], + "entrypoints": [ + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.post", + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "test_candidates": [], + "layer_outcomes": [ + { + "layer_id": "C4_SEMANTIC_ROLES", + "hit_count": 12, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C3_ENTRYPOINTS", + "hit_count": 3, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 6, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 4, + "empty": false, + "fallback_used": false + } + ], + "missing_layers": [], + "raw_rows": [ + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests manager\n- orchestrates role-like calls (4)\n- reads and writes state attributes\n- participates in dataflow slices (50)", + "layer": "C4_SEMANTIC_ROLES", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 43, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "symbol_name": "RuntimeManager", + "qname": "RuntimeManager", + "role": "pipeline_stage", + "confidence": 0.67, + "dataflow_participation": 50, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/queue/in_memory.py", + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)", + "layer": "C4_SEMANTIC_ROLES", + "title": "InMemoryTaskQueue", + "span_start": 9, + "span_end": 38, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 22, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "2da04cb94544a3bcbf0943a95ad4bdd8710bcafaa32a02fd0e4de2178dcf3533", + "symbol_name": "InMemoryTaskQueue", + "qname": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 9, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "58f0cc001ccda0eee4c6bc32ed83bd05eafd6b6644f1e8b4aa9eed3103db73dc", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "ConfigFileLoader\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (8)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ConfigFileLoader", + "span_start": 11, + "span_end": 48, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 23, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "a8474eca8b6e9dc86ae67ed68b16fa5fb639ef08739c053e7b7195489765667f", + "symbol_name": "ConfigFileLoader", + "qname": "ConfigFileLoader", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 8, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/store.py", + "content": "TraceContextStore\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "TraceContextStore", + "span_start": 15, + "span_end": 52, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "b2dad4fbe16ffb11b58deba311c7739955c39d59f291b22181f33e9c8cce4059", + "symbol_name": "TraceContextStore", + "qname": "TraceContextStore", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "d369554f08fc92039c6edd5a2a1e73b23901533e8974459170bbd9347d263dc5", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workers/supervisor.py", + "content": "WorkerSupervisor\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkerSupervisor", + "span_start": 10, + "span_end": 59, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "c17b44e8d9e97d490989b21fa67d7c346cdda8a0472e4c41fb243c8846faa124", + "symbol_name": "WorkerSupervisor", + "qname": "WorkerSupervisor", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "77609d9d5927171cce7fc3a54897c183fd63068710c6362029b700937aae5eee", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": null, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": null, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": null, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 59, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1", + "dst_ref": "RuntimeManager.start", + "resolution": "resolved", + "slice_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.start" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 52, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager._register_core_services", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 127, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6", + "dst_ref": "RuntimeManager._register_core_services", + "resolution": "resolved", + "slice_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager._register_core_services" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/__init__.py", + "content": "const RuntimeManager\nRuntimeManager = plba.core.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 16, + "span_end": 16, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "7eacec84f9b8d6c4201374591faecdac7493091c263681495c338973f2971ad9", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = plba.core.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/core.py", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 2, + "span_end": 2, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "e1684562d978b7af7fe9b27dc5869d770348a87b5dc19a50360f58544668578b", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.core", + "is_test": false, + "blob_sha": "c0ae25110d20e665216616e26b68adfe035b624ba45d31d1272fb21f906f9ca8", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 9, + "span_end": 9, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "62a9575c77aad894120d18b4f2a08cf2ba42f77e9be4a8a432b767d157701afe", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager\nRuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "qname": "RuntimeManager", + "kind": "class", + "signature": "RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 4, + "span_end": 4, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "27158ca220022eeb5083c6addf8a50775d45f7161284fd60aac48410105f4b98", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "const ControlChannel\nControlChannel = app_runtime.control.base.ControlChannel", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlChannel", + "span_start": 1, + "span_end": 1, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "268420f7aa4ed74082b9276cae0cded4f00bac090ffd58fa020a65be0fe19c27", + "qname": "ControlChannel", + "kind": "const", + "signature": "ControlChannel = app_runtime.control.base.ControlChannel", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlChannel(ABC):\n @abstractmethod\n async def start(self, actions: ControlActionSet) -> None:\n \"\"\"Start the control channel and bind handlers.\"\"\"\n\n @abstractmethod\n async def stop(self) -> None:\n \"\"\"Stop the control channel and release resources.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\"ControlActionSet\", \"ControlChannel\", \"ControlPlaneService\", \"HttpControlChannel\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/__init__.py:1-5", + "span_start": 1, + "span_end": 5, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlActionSet:\n health: HealthHandler\n start: ActionHandler\n stop: ActionHandler\n status: ActionHandler", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "class HttpControlAppFactory:\n def create(\n self,\n health_provider: Callable[[], Awaitable[HealthPayload]],\n action_provider: Callable[[str, str], Awaitable[JSONResponse]],\n ) -> FastAPI:\n app = FastAPI(title=\"PLBA Control API\")\n\n @app.middleware(\"http\")\n async def log_api_call(request: Request, call_next): # type: ignore[no-untyped-def]\n started = time.monotonic()\n response = await call_next(request)\n response.headers[\"X-Response-Time-Ms\"] = str(int((time.monotonic() - started) * 1000))\n return response\n\n @app.get(\"/health\")\n async def health() -> JSONResponse:\n payload = await health_provider()\n status_code = 200 if payload.get(\"status\") == \"ok\" else 503\n return JSONResponse(content=payload, status_code=status_code)\n\n @app.get(\"/actions/{action}\")\n @app.post(\"/actions/{action}\")\n async def action(action: str, request: Request) -> JSONResponse:\n client_source = self._client_source(request)\n if action in {\"start\", \"stop\"}:\n LOGGER.warning(\"Control action requested: /actions/%s client=%s\", action, client_source)\n return await action_provider(action, client_source)\n\n return app\n\n def _client_source(self, request: Request) -> str:\n explicit_header = request.headers.get(\"X-Client-Source\", \"\").strip()\n if explicit_header:\n return explicit_header\n user_agent = request.headers.get(\"User-Agent\", \"\").strip()\n if user_agent:\n return f\"user-agent:{user_agent}\"\n return \"unknown\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_app.py:HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "retrieval_report": { + "executed_layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C4_SEMANTIC_ROLES": "vector", + "C3_ENTRYPOINTS": "vector", + "C2_DEPENDENCY_GRAPH": "vector", + "C1_SYMBOL_CATALOG": "vector", + "C0_SOURCE_CHUNKS": "vector" + }, + "top_k_by_layer": { + "C4_SEMANTIC_ROLES": 12, + "C3_ENTRYPOINTS": 8, + "C2_DEPENDENCY_GRAPH": 8, + "C1_SYMBOL_CATALOG": 6, + "C0_SOURCE_CHUNKS": 4 + }, + "filters_by_layer": { + "C4_SEMANTIC_ROLES": { + "path_scope": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [] + }, + "C1_SYMBOL_CATALOG": { + "path_scope": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [] + } + }, + "fallback": { + "used": false, + "reason": null + }, + "retrieval_by_layer_ms": { + "C4_SEMANTIC_ROLES": 28, + "C3_ENTRYPOINTS": 11, + "C2_DEPENDENCY_GRAPH": 58, + "C1_SYMBOL_CATALOG": 25, + "C0_SOURCE_CHUNKS": 16 + } + } + }, + "diagnostics": { + "intent_correct": null, + "target_found": true, + "layers_used": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ], + "retrieval_sufficient": true, + "answer_mode": "normal", + "router_result": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "ARCHITECTURE", + "path_scope": [], + "layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ], + "symbol_resolution_status": "pending" + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Какие компоненты участвуют в RuntimeManager?", + "sub_intent": "ARCHITECTURE", + "path_scope": [], + "requested_layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "C4_SEMANTIC_ROLES", + "hit_count": 12, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C3_ENTRYPOINTS", + "hit_count": 3, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 6, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 4, + "empty": false, + "fallback_used": false + } + ], + "empty_layers": [], + "evidence_gate_decision": { + "sufficient": true, + "failure_reasons": [], + "evidence_count": 33 + }, + "failure_reasons": [], + "timings_ms": {} + }, + "rag_rows": [ + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests manager\n- orchestrates role-like calls (4)\n- reads and writes state attributes\n- participates in dataflow slices (50)", + "layer": "C4_SEMANTIC_ROLES", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 43, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "symbol_name": "RuntimeManager", + "qname": "RuntimeManager", + "role": "pipeline_stage", + "confidence": 0.67, + "dataflow_participation": 50, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/queue/in_memory.py", + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)", + "layer": "C4_SEMANTIC_ROLES", + "title": "InMemoryTaskQueue", + "span_start": 9, + "span_end": 38, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 22, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "2da04cb94544a3bcbf0943a95ad4bdd8710bcafaa32a02fd0e4de2178dcf3533", + "symbol_name": "InMemoryTaskQueue", + "qname": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 9, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "58f0cc001ccda0eee4c6bc32ed83bd05eafd6b6644f1e8b4aa9eed3103db73dc", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "ConfigFileLoader\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (8)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ConfigFileLoader", + "span_start": 11, + "span_end": 48, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 23, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "a8474eca8b6e9dc86ae67ed68b16fa5fb639ef08739c053e7b7195489765667f", + "symbol_name": "ConfigFileLoader", + "qname": "ConfigFileLoader", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 8, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/store.py", + "content": "TraceContextStore\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "TraceContextStore", + "span_start": 15, + "span_end": 52, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b2dad4fbe16ffb11b58deba311c7739955c39d59f291b22181f33e9c8cce4059", + "symbol_name": "TraceContextStore", + "qname": "TraceContextStore", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "d369554f08fc92039c6edd5a2a1e73b23901533e8974459170bbd9347d263dc5", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workers/supervisor.py", + "content": "WorkerSupervisor\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkerSupervisor", + "span_start": 10, + "span_end": 59, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "c17b44e8d9e97d490989b21fa67d7c346cdda8a0472e4c41fb243c8846faa124", + "symbol_name": "WorkerSupervisor", + "qname": "WorkerSupervisor", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "77609d9d5927171cce7fc3a54897c183fd63068710c6362029b700937aae5eee", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 59, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1", + "dst_ref": "RuntimeManager.start", + "resolution": "resolved", + "slice_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.start" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 52, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager._register_core_services", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 127, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6", + "dst_ref": "RuntimeManager._register_core_services", + "resolution": "resolved", + "slice_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager._register_core_services" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/__init__.py", + "content": "const RuntimeManager\nRuntimeManager = plba.core.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 16, + "span_end": 16, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "7eacec84f9b8d6c4201374591faecdac7493091c263681495c338973f2971ad9", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = plba.core.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/core.py", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 2, + "span_end": 2, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "e1684562d978b7af7fe9b27dc5869d770348a87b5dc19a50360f58544668578b", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.core", + "is_test": false, + "blob_sha": "c0ae25110d20e665216616e26b68adfe035b624ba45d31d1272fb21f906f9ca8", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 9, + "span_end": 9, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "62a9575c77aad894120d18b4f2a08cf2ba42f77e9be4a8a432b767d157701afe", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager\nRuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "qname": "RuntimeManager", + "kind": "class", + "signature": "RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 4, + "span_end": 4, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "27158ca220022eeb5083c6addf8a50775d45f7161284fd60aac48410105f4b98", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "const ControlChannel\nControlChannel = app_runtime.control.base.ControlChannel", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlChannel", + "span_start": 1, + "span_end": 1, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "268420f7aa4ed74082b9276cae0cded4f00bac090ffd58fa020a65be0fe19c27", + "qname": "ControlChannel", + "kind": "const", + "signature": "ControlChannel = app_runtime.control.base.ControlChannel", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlChannel(ABC):\n @abstractmethod\n async def start(self, actions: ControlActionSet) -> None:\n \"\"\"Start the control channel and bind handlers.\"\"\"\n\n @abstractmethod\n async def stop(self) -> None:\n \"\"\"Stop the control channel and release resources.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\"ControlActionSet\", \"ControlChannel\", \"ControlPlaneService\", \"HttpControlChannel\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/__init__.py:1-5", + "span_start": 1, + "span_end": 5, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlActionSet:\n health: HealthHandler\n start: ActionHandler\n stop: ActionHandler\n status: ActionHandler", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "class HttpControlAppFactory:\n def create(\n self,\n health_provider: Callable[[], Awaitable[HealthPayload]],\n action_provider: Callable[[str, str], Awaitable[JSONResponse]],\n ) -> FastAPI:\n app = FastAPI(title=\"PLBA Control API\")\n\n @app.middleware(\"http\")\n async def log_api_call(request: Request, call_next): # type: ignore[no-untyped-def]\n started = time.monotonic()\n response = await call_next(request)\n response.headers[\"X-Response-Time-Ms\"] = str(int((time.monotonic() - started) * 1000))\n return response\n\n @app.get(\"/health\")\n async def health() -> JSONResponse:\n payload = await health_provider()\n status_code = 200 if payload.get(\"status\") == \"ok\" else 503\n return JSONResponse(content=payload, status_code=status_code)\n\n @app.get(\"/actions/{action}\")\n @app.post(\"/actions/{action}\")\n async def action(action: str, request: Request) -> JSONResponse:\n client_source = self._client_source(request)\n if action in {\"start\", \"stop\"}:\n LOGGER.warning(\"Control action requested: /actions/%s client=%s\", action, client_source)\n return await action_provider(action, client_source)\n\n return app\n\n def _client_source(self, request: Request) -> str:\n explicit_header = request.headers.get(\"X-Client-Source\", \"\").strip()\n if explicit_header:\n return explicit_header\n user_agent = request.headers.get(\"User-Agent\", \"\").strip()\n if user_agent:\n return f\"user-agent:{user_agent}\"\n return \"unknown\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_app.py:HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "validation": { + "passed": true, + "action": "return", + "reasons": [] + } + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-architecture-runtime-manager.md b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-architecture-runtime-manager.md new file mode 100644 index 0000000..0d551a8 --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-architecture-runtime-manager.md @@ -0,0 +1,34 @@ +# plba-v2-architecture-runtime-manager + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: agent_runtime +- mode: full_chain +- passed: True + +## Query +Какие компоненты участвуют в RuntimeManager? + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "ARCHITECTURE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 33, + "llm_answer": "В подсистеме RuntimeManager участвуют следующие компоненты:\n\n1. **RuntimeManager** (src/app_runtime/core/runtime.py):\n - Инициализирует конфигурацию и управляет жизненным циклом runtime-пipeline.\n - Создаёт и регистрирует основные сервисы (ControlPlaneService, WorkflowPersistence, InMemoryTaskQueue, ConfigFileLoader, TraceContextStore, WorkerSupervisor).\n\n2. **ControlPlaneService** (src/app_runtime/control/service.py):\n - Служба управления каналами контроля и взаимодействия с внешними сущностями.\n - Регистрирует каналы и запускает асинхронные операции.\n\n3. **WorkflowPersistence** (src/app_runtime/workflow/persistence/workflow_persistence.py):\n - Обеспечивает долговременное хранение workflow-данных.\n\n4. **InMemoryTaskQueue** (src/app_runtime/queue/in_memory.py):\n - Хранит задачи в памяти для временного хранения и обработки.\n\n5. **ConfigFileLoader** (src/app_runtime/config/file_loader.py):\n - Загружает конфигурации из файлов.\n\n6. **TraceContextStore** (src/app_runtime/tracing/store.py):\n - Управляет контекстом трассировки.\n\n7. **WorkerSupervisor** (src/app_runtime/workers/supervisor.py):\n - Контролирует выполнение рабочих задач.\n\nЭти компоненты взаимодействуют через конструктор RuntimeManager, где регистрируются необходимые сервисы и каналы. Управление жизненным циклом и координация работы осуществляется через инициализацию и регистрацию сервисов.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-explain-create-runtime.json b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-explain-create-runtime.json new file mode 100644 index 0000000..49a2b69 --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-explain-create-runtime.json @@ -0,0 +1,3779 @@ +{ + "case_id": "plba-v2-explain-create-runtime", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "agent_runtime", + "mode": "full_chain", + "query": "Что делает функция create_runtime?", + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 33, + "llm_answer": "Функция `create_runtime` находится в файле `src/plba/bootstrap.py`. Она принимает аргумент `module`, представляющий экземпляр интерфейса `ApplicationModule`.\n\nПодтвержденные действия функции:\n- Инициализирует объект типа `RuntimeManager`.\n- Если указан путь к конфигурационному файлу (`config_path`), добавляет этот файл в менеджер конфигурации.\n- При включённой опции HTTP-контроля регистрирует канал управления через класс `HttpControlChannel`.\n- Регистрирует переданный модуль в менеджере.\n\nТаким образом, основная задача функции – создать и настроить базовый runtime для приложения.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "create_runtime" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "query": "Что делает функция create_runtime?", + "router_result": { + "schema_version": "1.1", + "intent": "CODE_QA", + "retrieval_profile": "code", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query_plan": { + "raw": "Что делает функция create_runtime?", + "normalized": "Что делает функция create_runtime?", + "sub_intent": "EXPLAIN", + "negations": [], + "expansions": [ + "function", + "create_runtime" + ], + "keyword_hints": [ + "create_runtime" + ], + "path_hints": [], + "doc_scope_hints": [], + "symbol_candidates": [ + "create_runtime" + ], + "symbol_kind_hint": "function", + "anchors": [ + { + "type": "SYMBOL", + "value": "create_runtime", + "source": "user_text", + "subtype": null, + "span": { + "start": 19, + "end": 33 + }, + "confidence": 0.88 + }, + { + "type": "KEY_TERM", + "value": "функция", + "source": "user_text", + "subtype": null, + "span": { + "start": 11, + "end": 18 + }, + "confidence": 0.9 + } + ] + }, + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "top_k": 8 + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 8 + }, + { + "layer_id": "C4_SEMANTIC_ROLES", + "top_k": 8 + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "top_k": 6 + }, + { + "layer_id": "C3_ENTRYPOINTS", + "top_k": 6 + } + ], + "filters": { + "test_policy": "EXCLUDE", + "path_scope": [], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + }, + "symbol_resolution": { + "status": "pending", + "resolved_symbol": null, + "alternatives": [ + "create_runtime" + ], + "confidence": 0.0 + }, + "evidence_policy": { + "require_def": true, + "require_flow": true, + "require_spec": false, + "allow_answer_without_evidence": false + } + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Что делает функция create_runtime?", + "sub_intent": "EXPLAIN", + "path_scope": [], + "keyword_hints": [ + "create_runtime" + ], + "symbol_candidates": [ + "create_runtime" + ], + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "top_k": 8 + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 8 + }, + { + "layer_id": "C4_SEMANTIC_ROLES", + "top_k": 8 + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "top_k": 6 + }, + { + "layer_id": "C3_ENTRYPOINTS", + "top_k": 6 + } + ], + "filters": { + "test_policy": "EXCLUDE", + "path_scope": [], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + }, + "query_plan": { + "raw": "Что делает функция create_runtime?", + "normalized": "Что делает функция create_runtime?", + "sub_intent": "EXPLAIN", + "negations": [], + "expansions": [ + "function", + "create_runtime" + ], + "keyword_hints": [ + "create_runtime" + ], + "path_hints": [], + "doc_scope_hints": [], + "symbol_candidates": [ + "create_runtime" + ], + "symbol_kind_hint": "function", + "anchors": [ + { + "type": "SYMBOL", + "value": "create_runtime", + "source": "user_text", + "subtype": null, + "span": { + "start": 19, + "end": 33 + }, + "confidence": 0.88 + }, + { + "type": "KEY_TERM", + "value": "функция", + "source": "user_text", + "subtype": null, + "span": { + "start": 11, + "end": 18 + }, + "confidence": 0.9 + } + ] + } + }, + "retrieval_result": { + "target_symbol_candidates": [ + "create_runtime", + "annotations", + "json", + "Path", + "Any", + "yaml", + "hashlib" + ], + "resolved_symbol": "create_runtime", + "symbol_resolution_status": "resolved", + "file_candidates": [ + "src/plba/__init__.py", + "src/plba/bootstrap.py", + "src/app_runtime/config/file_loader.py", + "src/app_runtime/config/__init__.py", + "src/app_runtime/config/providers.py", + "src/app_runtime/contracts/__init__.py", + "src/app_runtime/contracts/application.py", + "src/app_runtime/__init__.py", + "src/app_runtime/control/http_runner.py", + "src/app_runtime/workflow/persistence/workflow_persistence.py", + "src/app_runtime/control/http_channel.py", + "src/app_runtime/queue/in_memory.py", + "src/app_runtime/workers/supervisor.py", + "src/app_runtime/workflow/engine/workflow_engine.py", + "src/app_runtime/tracing/store.py", + "src/app_runtime/control/http_app.py" + ], + "code_chunks": [ + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/plba/__init__.py", + "title": "create_runtime", + "content": "const create_runtime\ncreate_runtime = plba.bootstrap.create_runtime", + "start_line": 1, + "end_line": 1, + "metadata": { + "symbol_id": "fa1e84f16c8c659bcd5448637386af4d15d431064e07714e34689ee64233cb51", + "qname": "create_runtime", + "kind": "const", + "signature": "create_runtime = plba.bootstrap.create_runtime", + "parent_symbol_id": null, + "package_or_module": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/plba/bootstrap.py", + "title": "create_runtime", + "content": "function create_runtime\ncreate_runtime(module)", + "start_line": 8, + "end_line": 29, + "metadata": { + "symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "qname": "create_runtime", + "kind": "function", + "signature": "create_runtime(module)", + "parent_symbol_id": null, + "package_or_module": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/config/file_loader.py", + "title": "annotations", + "content": "const annotations\nannotations = __future__.annotations", + "start_line": 1, + "end_line": 1, + "metadata": { + "symbol_id": "5ed640ccec43a78659d50ec24f3717bf1144a182c22588f37456649ac6a4a815", + "qname": "annotations", + "kind": "const", + "signature": "annotations = __future__.annotations", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/config/file_loader.py", + "title": "json", + "content": "const json\nimport json", + "start_line": 4, + "end_line": 4, + "metadata": { + "symbol_id": "bb9e2eaf992bfd050f7072d72eed87c55b1a4b001daa034a0f7c630a61bb1d78", + "qname": "json", + "kind": "const", + "signature": "import json", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/config/file_loader.py", + "title": "Path", + "content": "const Path\nPath = pathlib.Path", + "start_line": 5, + "end_line": 5, + "metadata": { + "symbol_id": "b785967ed1fb83aa62d5724c6d6e9c6d2b1505523db39bd941cc39b48db48306", + "qname": "Path", + "kind": "const", + "signature": "Path = pathlib.Path", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/config/file_loader.py", + "title": "Any", + "content": "const Any\nAny = typing.Any", + "start_line": 6, + "end_line": 6, + "metadata": { + "symbol_id": "8e330833b8073585db1c4b4315947c400683a23e4c3d2e2ccbcb260f347541b6", + "qname": "Any", + "kind": "const", + "signature": "Any = typing.Any", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/config/file_loader.py", + "title": "yaml", + "content": "const yaml\nimport yaml", + "start_line": 8, + "end_line": 8, + "metadata": { + "symbol_id": "223502bbfc2b82aea662f7466403cc99a3cd44f1b0507d637cd674874f751e4f", + "qname": "yaml", + "kind": "const", + "signature": "import yaml", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/config/file_loader.py", + "title": "hashlib", + "content": "const hashlib\nimport hashlib", + "start_line": 3, + "end_line": 3, + "metadata": { + "symbol_id": "e7375824bd473da3d73d316d22e3cb6428930e2db1ffbd900ce5a8b88427bf05", + "qname": "hashlib", + "kind": "const", + "signature": "import hashlib", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/plba/__init__.py", + "title": "src/plba/__init__.py:1-69", + "content": "from plba.bootstrap import create_runtime\nfrom plba.config import ConfigFileLoader, FileConfigProvider\nfrom plba.control import ControlActionSet, ControlChannel, ControlPlaneService, HttpControlChannel\nfrom plba.contracts import (\n ApplicationModule,\n ConfigProvider,\n HealthContributor,\n TraceContext,\n TraceContextRecord,\n TraceLogMessage,\n TraceTransport,\n Worker,\n WorkerHealth,\n WorkerStatus,\n)\nfrom plba.core import ConfigurationManager, RuntimeManager, ServiceContainer\nfrom plba.health import HealthRegistry\nfrom plba.logging import LogManager\nfrom plba.queue import InMemoryTaskQueue\nfrom plba.tracing import MySqlTraceTransport, NoOpTraceTransport, TraceService\nfrom plba.workflow import (\n StepResult,\n WorkflowContext,\n WorkflowDefinition,\n WorkflowEngine,\n WorkflowEngineHooks,\n WorkflowNode,\n WorkflowRuntimeFactory,\n WorkflowStep,\n)\nfrom plba.workers import WorkerSupervisor\n\n__all__ = [\n \"ApplicationModule\",\n \"ConfigFileLoader\",\n \"ConfigProvider\",\n \"ConfigurationManager\",\n \"ControlActionSet\",\n \"ControlChannel\",\n \"ControlPlaneService\",\n \"create_runtime\",\n \"FileConfigProvider\",\n \"HealthContributor\",\n \"HealthRegistry\",\n \"HttpControlChannel\",\n \"InMemoryTaskQueue\",\n \"LogManager\",\n \"MySqlTraceTransport\",\n \"NoOpTraceTransport\",\n \"RuntimeManager\",\n \"ServiceContainer\",\n \"TraceContext\",\n \"TraceContextRecord\",\n \"TraceLogMessage\",\n \"TraceService\",\n \"TraceTransport\",\n \"StepResult\",\n \"Worker\",\n \"WorkerHealth\",\n \"WorkerStatus\",\n \"WorkflowContext\",\n \"WorkflowDefinition\",\n \"WorkflowEngine\",\n \"WorkflowEngineHooks\",\n \"WorkflowNode\",\n \"WorkflowRuntimeFactory\",\n \"WorkflowStep\",\n \"WorkerSupervisor\",\n]", + "start_line": 1, + "end_line": 69, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/plba/bootstrap.py", + "title": "src/plba/bootstrap.py:create_runtime", + "content": "def create_runtime(\n module: ApplicationModule,\n *,\n config_path: str | None = None,\n enable_http_control: bool = False,\n control_host: str = \"127.0.0.1\",\n control_port: int = 8080,\n control_timeout: int = 5,\n) -> RuntimeManager:\n runtime = RuntimeManager()\n if config_path is not None:\n runtime.add_config_file(config_path)\n if enable_http_control:\n runtime.control_plane.register_channel(\n HttpControlChannel(\n host=control_host,\n port=control_port,\n timeout=control_timeout,\n )\n )\n runtime.register_module(module)\n return runtime", + "start_line": 8, + "end_line": 29, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/config/__init__.py", + "title": "src/app_runtime/config/__init__.py:1-4", + "content": "from app_runtime.config.file_loader import ConfigFileLoader\nfrom app_runtime.config.providers import FileConfigProvider\n\n__all__ = [\"ConfigFileLoader\", \"FileConfigProvider\"]", + "start_line": 1, + "end_line": 4, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.config.__init__", + "is_test": false, + "blob_sha": "612918029820a2a983330ec92256142b55b9de4bdf3399ece18e2a02dbad9729", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/config/file_loader.py", + "title": "src/app_runtime/config/file_loader.py:ConfigFileLoader", + "content": "class ConfigFileLoader:\n def __init__(self, path: str | Path) -> None:\n self.path = Path(path)\n self.config: Any = None\n self.last_valid_config: Any = None\n self._last_seen_hash: str | None = None\n\n def read_text(self) -> str:\n return self.path.read_text(encoding=\"utf-8\")\n\n def parse(self, data: str) -> Any:\n suffix = self.path.suffix.lower()\n if suffix in {\".yml\", \".yaml\"}:\n return yaml.safe_load(data)\n return json.loads(data)\n\n def load_sync(self) -> Any:\n data = self.read_text()\n parsed = self.parse(data)\n self.config = parsed\n self.last_valid_config = parsed\n self._last_seen_hash = self._calculate_hash(data)\n return parsed\n\n def load_if_changed(self) -> tuple[bool, Any]:\n data = self.read_text()\n current_hash = self._calculate_hash(data)\n if current_hash == self._last_seen_hash:\n return False, self.config\n parsed = self.parse(data)\n self.config = parsed\n self.last_valid_config = parsed\n self._last_seen_hash = current_hash\n return True, parsed\n\n @staticmethod\n def _calculate_hash(data: str) -> str:\n return hashlib.sha256(data.encode(\"utf-8\")).hexdigest()", + "start_line": 11, + "end_line": 48, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/config/providers.py", + "title": "src/app_runtime/config/providers.py:FileConfigProvider", + "content": "class FileConfigProvider(ConfigProvider):\n def __init__(self, path: str | Path) -> None:\n self._loader = ConfigFileLoader(path)\n\n @property\n def loader(self) -> ConfigFileLoader:\n return self._loader\n\n def load(self) -> dict[str, Any]:\n config = self._loader.load_sync()\n if not isinstance(config, dict):\n raise TypeError(\"Config root must be a mapping\")\n return dict(config)", + "start_line": 10, + "end_line": 22, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.config.providers", + "is_test": false, + "blob_sha": "8c53ca0122d6df6c5763bca15e99434bb4daebd5a618b8fc927e9ae90b022e64", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/contracts/__init__.py", + "title": "src/app_runtime/__init__.py:1-1", + "content": "__all__: list[str] = []", + "start_line": 1, + "end_line": 1, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.__init__", + "is_test": false, + "blob_sha": "8eea9df4f6d7b38ca0e39ccc27b04700e3d08dbeec8046d613d22706d19985fa", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/contracts/application.py", + "title": "src/app_runtime/contracts/application.py:ApplicationModule", + "content": "class ApplicationModule(ABC):\n @property\n @abstractmethod\n def name(self) -> str:\n \"\"\"Module name used for runtime status and diagnostics.\"\"\"\n\n @abstractmethod\n def register(self, registry: ModuleRegistry) -> None:\n \"\"\"Register workers, services, and health contributors.\"\"\"", + "start_line": 8, + "end_line": 16, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.application", + "is_test": false, + "blob_sha": "197c35634dca49c352ce3f230295a485fbffb672ce7bb8c08e752bfdf61e7fa4", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/__init__.py", + "title": "src/app_runtime/__init__.py:1-1", + "content": "__all__: list[str] = []", + "start_line": 1, + "end_line": 1, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.__init__", + "is_test": false, + "blob_sha": "8eea9df4f6d7b38ca0e39ccc27b04700e3d08dbeec8046d613d22706d19985fa", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/http_runner.py", + "title": "UvicornThreadRunner", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "start_line": 10, + "end_line": 61, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "title": "WorkflowPersistence", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "start_line": 8, + "end_line": 54, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/http_channel.py", + "title": "HttpControlChannel", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "start_line": 12, + "end_line": 57, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/queue/in_memory.py", + "title": "InMemoryTaskQueue", + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)", + "start_line": 9, + "end_line": 38, + "metadata": { + "symbol_id": "2da04cb94544a3bcbf0943a95ad4bdd8710bcafaa32a02fd0e4de2178dcf3533", + "symbol_name": "InMemoryTaskQueue", + "qname": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 9, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "58f0cc001ccda0eee4c6bc32ed83bd05eafd6b6644f1e8b4aa9eed3103db73dc", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/config/file_loader.py", + "title": "ConfigFileLoader", + "content": "ConfigFileLoader\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (8)", + "start_line": 11, + "end_line": 48, + "metadata": { + "symbol_id": "a8474eca8b6e9dc86ae67ed68b16fa5fb639ef08739c053e7b7195489765667f", + "symbol_name": "ConfigFileLoader", + "qname": "ConfigFileLoader", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 8, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/workers/supervisor.py", + "title": "WorkerSupervisor", + "content": "WorkerSupervisor\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "start_line": 10, + "end_line": 59, + "metadata": { + "symbol_id": "c17b44e8d9e97d490989b21fa67d7c346cdda8a0472e4c41fb243c8846faa124", + "symbol_name": "WorkerSupervisor", + "qname": "WorkerSupervisor", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "77609d9d5927171cce7fc3a54897c183fd63068710c6362029b700937aae5eee", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "title": "WorkflowEngine", + "content": "WorkflowEngine\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "start_line": 10, + "end_line": 86, + "metadata": { + "symbol_id": "57ec0a9f11c542c78e008684a888397e8d9ef4223671acb2567e631a0cbc70b4", + "symbol_name": "WorkflowEngine", + "qname": "WorkflowEngine", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/tracing/store.py", + "title": "TraceContextStore", + "content": "TraceContextStore\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "start_line": 15, + "end_line": 52, + "metadata": { + "symbol_id": "b2dad4fbe16ffb11b58deba311c7739955c39d59f291b22181f33e9c8cce4059", + "symbol_name": "TraceContextStore", + "qname": "TraceContextStore", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "d369554f08fc92039c6edd5a2a1e73b23901533e8974459170bbd9347d263dc5", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/plba/bootstrap.py", + "title": "create_runtime:calls", + "content": "create_runtime calls runtime.add_config_file", + "start_line": 19, + "end_line": 19, + "metadata": { + "edge_id": "4eaeec4ac55a59d5f66fd01c4754955f8fedaf4bc3df13fa769b352c7bfaacbb", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.add_config_file", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/plba/bootstrap.py", + "title": "create_runtime:reads_attr", + "content": "create_runtime reads_attr runtime.register_module", + "start_line": 28, + "end_line": 28, + "metadata": { + "edge_id": "45516c79ff358dbf9b650a081668df0f66d2fe989300f985a1a78be6be166f8f", + "edge_type": "reads_attr", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.register_module", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/plba/bootstrap.py", + "title": "create_runtime:instantiates", + "content": "create_runtime instantiates RuntimeManager", + "start_line": 17, + "end_line": 17, + "metadata": { + "edge_id": "0adba17984f850ea1608c9e734d2dd5c325cfde3a8133123aa239e44935ad18e", + "edge_type": "instantiates", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": "27158ca220022eeb5083c6addf8a50775d45f7161284fd60aac48410105f4b98", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/plba/bootstrap.py", + "title": "create_runtime:calls", + "content": "create_runtime calls runtime.register_module", + "start_line": 28, + "end_line": 28, + "metadata": { + "edge_id": "ab6003c3441addc1ba1b81edeca009165559f652f6b2cf424e5ae61b1f617de8", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.register_module", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/plba/bootstrap.py", + "title": "create_runtime:calls", + "content": "create_runtime calls runtime.control_plane.register_channel", + "start_line": 21, + "end_line": 27, + "metadata": { + "edge_id": "2678250030b9ce47a3b3b55fac7897ac530367edc8374ac9d5e6ecafb1e483f0", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.control_plane.register_channel", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/plba/bootstrap.py", + "title": "create_runtime:reads_attr", + "content": "create_runtime reads_attr runtime.add_config_file", + "start_line": 19, + "end_line": 19, + "metadata": { + "edge_id": "30d4e8aae984ab84d523e80d02f1caeda52d547fa3d2aa47be8845931cabbca2", + "edge_type": "reads_attr", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.add_config_file", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C3_ENTRYPOINTS", + "path": "src/app_runtime/control/http_app.py", + "title": "app.post", + "content": "fastapi http app.post", + "start_line": 38, + "end_line": 42, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C3_ENTRYPOINTS", + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "content": "fastapi http app.get", + "start_line": 31, + "end_line": 34, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C3_ENTRYPOINTS", + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "content": "fastapi http app.get", + "start_line": 38, + "end_line": 42, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "relations": [ + { + "path": "src/plba/bootstrap.py", + "metadata": { + "edge_id": "4eaeec4ac55a59d5f66fd01c4754955f8fedaf4bc3df13fa769b352c7bfaacbb", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.add_config_file", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "create_runtime calls runtime.add_config_file" + }, + { + "path": "src/plba/bootstrap.py", + "metadata": { + "edge_id": "45516c79ff358dbf9b650a081668df0f66d2fe989300f985a1a78be6be166f8f", + "edge_type": "reads_attr", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.register_module", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "create_runtime reads_attr runtime.register_module" + }, + { + "path": "src/plba/bootstrap.py", + "metadata": { + "edge_id": "0adba17984f850ea1608c9e734d2dd5c325cfde3a8133123aa239e44935ad18e", + "edge_type": "instantiates", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": "27158ca220022eeb5083c6addf8a50775d45f7161284fd60aac48410105f4b98", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "create_runtime instantiates RuntimeManager" + }, + { + "path": "src/plba/bootstrap.py", + "metadata": { + "edge_id": "ab6003c3441addc1ba1b81edeca009165559f652f6b2cf424e5ae61b1f617de8", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.register_module", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "create_runtime calls runtime.register_module" + }, + { + "path": "src/plba/bootstrap.py", + "metadata": { + "edge_id": "2678250030b9ce47a3b3b55fac7897ac530367edc8374ac9d5e6ecafb1e483f0", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.control_plane.register_channel", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "create_runtime calls runtime.control_plane.register_channel" + }, + { + "path": "src/plba/bootstrap.py", + "metadata": { + "edge_id": "30d4e8aae984ab84d523e80d02f1caeda52d547fa3d2aa47be8845931cabbca2", + "edge_type": "reads_attr", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.add_config_file", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "create_runtime reads_attr runtime.add_config_file" + } + ], + "entrypoints": [ + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.post", + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "test_candidates": [], + "layer_outcomes": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C4_SEMANTIC_ROLES", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 6, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C3_ENTRYPOINTS", + "hit_count": 3, + "empty": false, + "fallback_used": false + } + ], + "missing_layers": [], + "raw_rows": [ + { + "path": "src/plba/__init__.py", + "content": "const create_runtime\ncreate_runtime = plba.bootstrap.create_runtime", + "layer": "C1_SYMBOL_CATALOG", + "title": "create_runtime", + "span_start": 1, + "span_end": 1, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "fa1e84f16c8c659bcd5448637386af4d15d431064e07714e34689ee64233cb51", + "qname": "create_runtime", + "kind": "const", + "signature": "create_runtime = plba.bootstrap.create_runtime", + "parent_symbol_id": null, + "package_or_module": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "function create_runtime\ncreate_runtime(module)", + "layer": "C1_SYMBOL_CATALOG", + "title": "create_runtime", + "span_start": 8, + "span_end": 29, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "qname": "create_runtime", + "kind": "function", + "signature": "create_runtime(module)", + "parent_symbol_id": null, + "package_or_module": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "const annotations\nannotations = __future__.annotations", + "layer": "C1_SYMBOL_CATALOG", + "title": "annotations", + "span_start": 1, + "span_end": 1, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "5ed640ccec43a78659d50ec24f3717bf1144a182c22588f37456649ac6a4a815", + "qname": "annotations", + "kind": "const", + "signature": "annotations = __future__.annotations", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "const json\nimport json", + "layer": "C1_SYMBOL_CATALOG", + "title": "json", + "span_start": 4, + "span_end": 4, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "bb9e2eaf992bfd050f7072d72eed87c55b1a4b001daa034a0f7c630a61bb1d78", + "qname": "json", + "kind": "const", + "signature": "import json", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "const Path\nPath = pathlib.Path", + "layer": "C1_SYMBOL_CATALOG", + "title": "Path", + "span_start": 5, + "span_end": 5, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "b785967ed1fb83aa62d5724c6d6e9c6d2b1505523db39bd941cc39b48db48306", + "qname": "Path", + "kind": "const", + "signature": "Path = pathlib.Path", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "const Any\nAny = typing.Any", + "layer": "C1_SYMBOL_CATALOG", + "title": "Any", + "span_start": 6, + "span_end": 6, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "8e330833b8073585db1c4b4315947c400683a23e4c3d2e2ccbcb260f347541b6", + "qname": "Any", + "kind": "const", + "signature": "Any = typing.Any", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "const yaml\nimport yaml", + "layer": "C1_SYMBOL_CATALOG", + "title": "yaml", + "span_start": 8, + "span_end": 8, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "223502bbfc2b82aea662f7466403cc99a3cd44f1b0507d637cd674874f751e4f", + "qname": "yaml", + "kind": "const", + "signature": "import yaml", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "const hashlib\nimport hashlib", + "layer": "C1_SYMBOL_CATALOG", + "title": "hashlib", + "span_start": 3, + "span_end": 3, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "e7375824bd473da3d73d316d22e3cb6428930e2db1ffbd900ce5a8b88427bf05", + "qname": "hashlib", + "kind": "const", + "signature": "import hashlib", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/__init__.py", + "content": "from plba.bootstrap import create_runtime\nfrom plba.config import ConfigFileLoader, FileConfigProvider\nfrom plba.control import ControlActionSet, ControlChannel, ControlPlaneService, HttpControlChannel\nfrom plba.contracts import (\n ApplicationModule,\n ConfigProvider,\n HealthContributor,\n TraceContext,\n TraceContextRecord,\n TraceLogMessage,\n TraceTransport,\n Worker,\n WorkerHealth,\n WorkerStatus,\n)\nfrom plba.core import ConfigurationManager, RuntimeManager, ServiceContainer\nfrom plba.health import HealthRegistry\nfrom plba.logging import LogManager\nfrom plba.queue import InMemoryTaskQueue\nfrom plba.tracing import MySqlTraceTransport, NoOpTraceTransport, TraceService\nfrom plba.workflow import (\n StepResult,\n WorkflowContext,\n WorkflowDefinition,\n WorkflowEngine,\n WorkflowEngineHooks,\n WorkflowNode,\n WorkflowRuntimeFactory,\n WorkflowStep,\n)\nfrom plba.workers import WorkerSupervisor\n\n__all__ = [\n \"ApplicationModule\",\n \"ConfigFileLoader\",\n \"ConfigProvider\",\n \"ConfigurationManager\",\n \"ControlActionSet\",\n \"ControlChannel\",\n \"ControlPlaneService\",\n \"create_runtime\",\n \"FileConfigProvider\",\n \"HealthContributor\",\n \"HealthRegistry\",\n \"HttpControlChannel\",\n \"InMemoryTaskQueue\",\n \"LogManager\",\n \"MySqlTraceTransport\",\n \"NoOpTraceTransport\",\n \"RuntimeManager\",\n \"ServiceContainer\",\n \"TraceContext\",\n \"TraceContextRecord\",\n \"TraceLogMessage\",\n \"TraceService\",\n \"TraceTransport\",\n \"StepResult\",\n \"Worker\",\n \"WorkerHealth\",\n \"WorkerStatus\",\n \"WorkflowContext\",\n \"WorkflowDefinition\",\n \"WorkflowEngine\",\n \"WorkflowEngineHooks\",\n \"WorkflowNode\",\n \"WorkflowRuntimeFactory\",\n \"WorkflowStep\",\n \"WorkerSupervisor\",\n]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/__init__.py:1-69", + "span_start": 1, + "span_end": 69, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "def create_runtime(\n module: ApplicationModule,\n *,\n config_path: str | None = None,\n enable_http_control: bool = False,\n control_host: str = \"127.0.0.1\",\n control_port: int = 8080,\n control_timeout: int = 5,\n) -> RuntimeManager:\n runtime = RuntimeManager()\n if config_path is not None:\n runtime.add_config_file(config_path)\n if enable_http_control:\n runtime.control_plane.register_channel(\n HttpControlChannel(\n host=control_host,\n port=control_port,\n timeout=control_timeout,\n )\n )\n runtime.register_module(module)\n return runtime", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/bootstrap.py:create_runtime", + "span_start": 8, + "span_end": 29, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/__init__.py", + "content": "from app_runtime.config.file_loader import ConfigFileLoader\nfrom app_runtime.config.providers import FileConfigProvider\n\n__all__ = [\"ConfigFileLoader\", \"FileConfigProvider\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/config/__init__.py:1-4", + "span_start": 1, + "span_end": 4, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.config.__init__", + "is_test": false, + "blob_sha": "612918029820a2a983330ec92256142b55b9de4bdf3399ece18e2a02dbad9729", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "class ConfigFileLoader:\n def __init__(self, path: str | Path) -> None:\n self.path = Path(path)\n self.config: Any = None\n self.last_valid_config: Any = None\n self._last_seen_hash: str | None = None\n\n def read_text(self) -> str:\n return self.path.read_text(encoding=\"utf-8\")\n\n def parse(self, data: str) -> Any:\n suffix = self.path.suffix.lower()\n if suffix in {\".yml\", \".yaml\"}:\n return yaml.safe_load(data)\n return json.loads(data)\n\n def load_sync(self) -> Any:\n data = self.read_text()\n parsed = self.parse(data)\n self.config = parsed\n self.last_valid_config = parsed\n self._last_seen_hash = self._calculate_hash(data)\n return parsed\n\n def load_if_changed(self) -> tuple[bool, Any]:\n data = self.read_text()\n current_hash = self._calculate_hash(data)\n if current_hash == self._last_seen_hash:\n return False, self.config\n parsed = self.parse(data)\n self.config = parsed\n self.last_valid_config = parsed\n self._last_seen_hash = current_hash\n return True, parsed\n\n @staticmethod\n def _calculate_hash(data: str) -> str:\n return hashlib.sha256(data.encode(\"utf-8\")).hexdigest()", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/config/file_loader.py:ConfigFileLoader", + "span_start": 11, + "span_end": 48, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/providers.py", + "content": "class FileConfigProvider(ConfigProvider):\n def __init__(self, path: str | Path) -> None:\n self._loader = ConfigFileLoader(path)\n\n @property\n def loader(self) -> ConfigFileLoader:\n return self._loader\n\n def load(self) -> dict[str, Any]:\n config = self._loader.load_sync()\n if not isinstance(config, dict):\n raise TypeError(\"Config root must be a mapping\")\n return dict(config)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/config/providers.py:FileConfigProvider", + "span_start": 10, + "span_end": 22, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.config.providers", + "is_test": false, + "blob_sha": "8c53ca0122d6df6c5763bca15e99434bb4daebd5a618b8fc927e9ae90b022e64", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/__init__.py", + "content": "__all__: list[str] = []", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/__init__.py:1-1", + "span_start": 1, + "span_end": 1, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.__init__", + "is_test": false, + "blob_sha": "8eea9df4f6d7b38ca0e39ccc27b04700e3d08dbeec8046d613d22706d19985fa", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/application.py", + "content": "class ApplicationModule(ABC):\n @property\n @abstractmethod\n def name(self) -> str:\n \"\"\"Module name used for runtime status and diagnostics.\"\"\"\n\n @abstractmethod\n def register(self, registry: ModuleRegistry) -> None:\n \"\"\"Register workers, services, and health contributors.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/contracts/application.py:ApplicationModule", + "span_start": 8, + "span_end": 16, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.application", + "is_test": false, + "blob_sha": "197c35634dca49c352ce3f230295a485fbffb672ce7bb8c08e752bfdf61e7fa4", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/__init__.py", + "content": "__all__: list[str] = []", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/__init__.py:1-1", + "span_start": 1, + "span_end": 1, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.__init__", + "is_test": false, + "blob_sha": "8eea9df4f6d7b38ca0e39ccc27b04700e3d08dbeec8046d613d22706d19985fa", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/queue/in_memory.py", + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)", + "layer": "C4_SEMANTIC_ROLES", + "title": "InMemoryTaskQueue", + "span_start": 9, + "span_end": 38, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 22, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "2da04cb94544a3bcbf0943a95ad4bdd8710bcafaa32a02fd0e4de2178dcf3533", + "symbol_name": "InMemoryTaskQueue", + "qname": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 9, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "58f0cc001ccda0eee4c6bc32ed83bd05eafd6b6644f1e8b4aa9eed3103db73dc", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "ConfigFileLoader\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (8)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ConfigFileLoader", + "span_start": 11, + "span_end": 48, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 23, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "a8474eca8b6e9dc86ae67ed68b16fa5fb639ef08739c053e7b7195489765667f", + "symbol_name": "ConfigFileLoader", + "qname": "ConfigFileLoader", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 8, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workers/supervisor.py", + "content": "WorkerSupervisor\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkerSupervisor", + "span_start": 10, + "span_end": 59, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "c17b44e8d9e97d490989b21fa67d7c346cdda8a0472e4c41fb243c8846faa124", + "symbol_name": "WorkerSupervisor", + "qname": "WorkerSupervisor", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "77609d9d5927171cce7fc3a54897c183fd63068710c6362029b700937aae5eee", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowEngine", + "span_start": 10, + "span_end": 86, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "57ec0a9f11c542c78e008684a888397e8d9ef4223671acb2567e631a0cbc70b4", + "symbol_name": "WorkflowEngine", + "qname": "WorkflowEngine", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/store.py", + "content": "TraceContextStore\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "TraceContextStore", + "span_start": 15, + "span_end": 52, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "b2dad4fbe16ffb11b58deba311c7739955c39d59f291b22181f33e9c8cce4059", + "symbol_name": "TraceContextStore", + "qname": "TraceContextStore", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "d369554f08fc92039c6edd5a2a1e73b23901533e8974459170bbd9347d263dc5", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime calls runtime.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:calls", + "span_start": 19, + "span_end": 19, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "4eaeec4ac55a59d5f66fd01c4754955f8fedaf4bc3df13fa769b352c7bfaacbb", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.add_config_file", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime reads_attr runtime.register_module", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:reads_attr", + "span_start": 28, + "span_end": 28, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "45516c79ff358dbf9b650a081668df0f66d2fe989300f985a1a78be6be166f8f", + "edge_type": "reads_attr", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.register_module", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:instantiates", + "span_start": 17, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "0adba17984f850ea1608c9e734d2dd5c325cfde3a8133123aa239e44935ad18e", + "edge_type": "instantiates", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": "27158ca220022eeb5083c6addf8a50775d45f7161284fd60aac48410105f4b98", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime calls runtime.register_module", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:calls", + "span_start": 28, + "span_end": 28, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "ab6003c3441addc1ba1b81edeca009165559f652f6b2cf424e5ae61b1f617de8", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.register_module", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime calls runtime.control_plane.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:calls", + "span_start": 21, + "span_end": 27, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "2678250030b9ce47a3b3b55fac7897ac530367edc8374ac9d5e6ecafb1e483f0", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.control_plane.register_channel", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime reads_attr runtime.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:reads_attr", + "span_start": 19, + "span_end": 19, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "30d4e8aae984ab84d523e80d02f1caeda52d547fa3d2aa47be8845931cabbca2", + "edge_type": "reads_attr", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.add_config_file", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": null, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": null, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": null, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "retrieval_report": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "vector", + "C0_SOURCE_CHUNKS": "vector", + "C4_SEMANTIC_ROLES": "vector", + "C2_DEPENDENCY_GRAPH": "vector", + "C3_ENTRYPOINTS": "vector" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [] + } + }, + "fallback": { + "used": false, + "reason": null + }, + "retrieval_by_layer_ms": { + "C1_SYMBOL_CATALOG": 33, + "C0_SOURCE_CHUNKS": 15, + "C4_SEMANTIC_ROLES": 15, + "C2_DEPENDENCY_GRAPH": 44, + "C3_ENTRYPOINTS": 10 + } + } + }, + "diagnostics": { + "intent_correct": null, + "target_found": true, + "layers_used": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_sufficient": true, + "answer_mode": "normal", + "router_result": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "EXPLAIN", + "path_scope": [], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_resolution_status": "pending" + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Что делает функция create_runtime?", + "sub_intent": "EXPLAIN", + "path_scope": [], + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C4_SEMANTIC_ROLES", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 6, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C3_ENTRYPOINTS", + "hit_count": 3, + "empty": false, + "fallback_used": false + } + ], + "empty_layers": [], + "evidence_gate_decision": { + "sufficient": true, + "failure_reasons": [], + "evidence_count": 33 + }, + "failure_reasons": [], + "timings_ms": {} + }, + "rag_rows": [ + { + "path": "src/plba/__init__.py", + "content": "const create_runtime\ncreate_runtime = plba.bootstrap.create_runtime", + "layer": "C1_SYMBOL_CATALOG", + "title": "create_runtime", + "span_start": 1, + "span_end": 1, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "fa1e84f16c8c659bcd5448637386af4d15d431064e07714e34689ee64233cb51", + "qname": "create_runtime", + "kind": "const", + "signature": "create_runtime = plba.bootstrap.create_runtime", + "parent_symbol_id": null, + "package_or_module": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "function create_runtime\ncreate_runtime(module)", + "layer": "C1_SYMBOL_CATALOG", + "title": "create_runtime", + "span_start": 8, + "span_end": 29, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "qname": "create_runtime", + "kind": "function", + "signature": "create_runtime(module)", + "parent_symbol_id": null, + "package_or_module": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "const annotations\nannotations = __future__.annotations", + "layer": "C1_SYMBOL_CATALOG", + "title": "annotations", + "span_start": 1, + "span_end": 1, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "5ed640ccec43a78659d50ec24f3717bf1144a182c22588f37456649ac6a4a815", + "qname": "annotations", + "kind": "const", + "signature": "annotations = __future__.annotations", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "const json\nimport json", + "layer": "C1_SYMBOL_CATALOG", + "title": "json", + "span_start": 4, + "span_end": 4, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "bb9e2eaf992bfd050f7072d72eed87c55b1a4b001daa034a0f7c630a61bb1d78", + "qname": "json", + "kind": "const", + "signature": "import json", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "const Path\nPath = pathlib.Path", + "layer": "C1_SYMBOL_CATALOG", + "title": "Path", + "span_start": 5, + "span_end": 5, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "b785967ed1fb83aa62d5724c6d6e9c6d2b1505523db39bd941cc39b48db48306", + "qname": "Path", + "kind": "const", + "signature": "Path = pathlib.Path", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "const Any\nAny = typing.Any", + "layer": "C1_SYMBOL_CATALOG", + "title": "Any", + "span_start": 6, + "span_end": 6, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "8e330833b8073585db1c4b4315947c400683a23e4c3d2e2ccbcb260f347541b6", + "qname": "Any", + "kind": "const", + "signature": "Any = typing.Any", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "const yaml\nimport yaml", + "layer": "C1_SYMBOL_CATALOG", + "title": "yaml", + "span_start": 8, + "span_end": 8, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "223502bbfc2b82aea662f7466403cc99a3cd44f1b0507d637cd674874f751e4f", + "qname": "yaml", + "kind": "const", + "signature": "import yaml", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "const hashlib\nimport hashlib", + "layer": "C1_SYMBOL_CATALOG", + "title": "hashlib", + "span_start": 3, + "span_end": 3, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "e7375824bd473da3d73d316d22e3cb6428930e2db1ffbd900ce5a8b88427bf05", + "qname": "hashlib", + "kind": "const", + "signature": "import hashlib", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/__init__.py", + "content": "from plba.bootstrap import create_runtime\nfrom plba.config import ConfigFileLoader, FileConfigProvider\nfrom plba.control import ControlActionSet, ControlChannel, ControlPlaneService, HttpControlChannel\nfrom plba.contracts import (\n ApplicationModule,\n ConfigProvider,\n HealthContributor,\n TraceContext,\n TraceContextRecord,\n TraceLogMessage,\n TraceTransport,\n Worker,\n WorkerHealth,\n WorkerStatus,\n)\nfrom plba.core import ConfigurationManager, RuntimeManager, ServiceContainer\nfrom plba.health import HealthRegistry\nfrom plba.logging import LogManager\nfrom plba.queue import InMemoryTaskQueue\nfrom plba.tracing import MySqlTraceTransport, NoOpTraceTransport, TraceService\nfrom plba.workflow import (\n StepResult,\n WorkflowContext,\n WorkflowDefinition,\n WorkflowEngine,\n WorkflowEngineHooks,\n WorkflowNode,\n WorkflowRuntimeFactory,\n WorkflowStep,\n)\nfrom plba.workers import WorkerSupervisor\n\n__all__ = [\n \"ApplicationModule\",\n \"ConfigFileLoader\",\n \"ConfigProvider\",\n \"ConfigurationManager\",\n \"ControlActionSet\",\n \"ControlChannel\",\n \"ControlPlaneService\",\n \"create_runtime\",\n \"FileConfigProvider\",\n \"HealthContributor\",\n \"HealthRegistry\",\n \"HttpControlChannel\",\n \"InMemoryTaskQueue\",\n \"LogManager\",\n \"MySqlTraceTransport\",\n \"NoOpTraceTransport\",\n \"RuntimeManager\",\n \"ServiceContainer\",\n \"TraceContext\",\n \"TraceContextRecord\",\n \"TraceLogMessage\",\n \"TraceService\",\n \"TraceTransport\",\n \"StepResult\",\n \"Worker\",\n \"WorkerHealth\",\n \"WorkerStatus\",\n \"WorkflowContext\",\n \"WorkflowDefinition\",\n \"WorkflowEngine\",\n \"WorkflowEngineHooks\",\n \"WorkflowNode\",\n \"WorkflowRuntimeFactory\",\n \"WorkflowStep\",\n \"WorkerSupervisor\",\n]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/__init__.py:1-69", + "span_start": 1, + "span_end": 69, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "def create_runtime(\n module: ApplicationModule,\n *,\n config_path: str | None = None,\n enable_http_control: bool = False,\n control_host: str = \"127.0.0.1\",\n control_port: int = 8080,\n control_timeout: int = 5,\n) -> RuntimeManager:\n runtime = RuntimeManager()\n if config_path is not None:\n runtime.add_config_file(config_path)\n if enable_http_control:\n runtime.control_plane.register_channel(\n HttpControlChannel(\n host=control_host,\n port=control_port,\n timeout=control_timeout,\n )\n )\n runtime.register_module(module)\n return runtime", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/bootstrap.py:create_runtime", + "span_start": 8, + "span_end": 29, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/__init__.py", + "content": "from app_runtime.config.file_loader import ConfigFileLoader\nfrom app_runtime.config.providers import FileConfigProvider\n\n__all__ = [\"ConfigFileLoader\", \"FileConfigProvider\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/config/__init__.py:1-4", + "span_start": 1, + "span_end": 4, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.config.__init__", + "is_test": false, + "blob_sha": "612918029820a2a983330ec92256142b55b9de4bdf3399ece18e2a02dbad9729", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "class ConfigFileLoader:\n def __init__(self, path: str | Path) -> None:\n self.path = Path(path)\n self.config: Any = None\n self.last_valid_config: Any = None\n self._last_seen_hash: str | None = None\n\n def read_text(self) -> str:\n return self.path.read_text(encoding=\"utf-8\")\n\n def parse(self, data: str) -> Any:\n suffix = self.path.suffix.lower()\n if suffix in {\".yml\", \".yaml\"}:\n return yaml.safe_load(data)\n return json.loads(data)\n\n def load_sync(self) -> Any:\n data = self.read_text()\n parsed = self.parse(data)\n self.config = parsed\n self.last_valid_config = parsed\n self._last_seen_hash = self._calculate_hash(data)\n return parsed\n\n def load_if_changed(self) -> tuple[bool, Any]:\n data = self.read_text()\n current_hash = self._calculate_hash(data)\n if current_hash == self._last_seen_hash:\n return False, self.config\n parsed = self.parse(data)\n self.config = parsed\n self.last_valid_config = parsed\n self._last_seen_hash = current_hash\n return True, parsed\n\n @staticmethod\n def _calculate_hash(data: str) -> str:\n return hashlib.sha256(data.encode(\"utf-8\")).hexdigest()", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/config/file_loader.py:ConfigFileLoader", + "span_start": 11, + "span_end": 48, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/providers.py", + "content": "class FileConfigProvider(ConfigProvider):\n def __init__(self, path: str | Path) -> None:\n self._loader = ConfigFileLoader(path)\n\n @property\n def loader(self) -> ConfigFileLoader:\n return self._loader\n\n def load(self) -> dict[str, Any]:\n config = self._loader.load_sync()\n if not isinstance(config, dict):\n raise TypeError(\"Config root must be a mapping\")\n return dict(config)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/config/providers.py:FileConfigProvider", + "span_start": 10, + "span_end": 22, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.config.providers", + "is_test": false, + "blob_sha": "8c53ca0122d6df6c5763bca15e99434bb4daebd5a618b8fc927e9ae90b022e64", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/__init__.py", + "content": "__all__: list[str] = []", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/__init__.py:1-1", + "span_start": 1, + "span_end": 1, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.__init__", + "is_test": false, + "blob_sha": "8eea9df4f6d7b38ca0e39ccc27b04700e3d08dbeec8046d613d22706d19985fa", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/application.py", + "content": "class ApplicationModule(ABC):\n @property\n @abstractmethod\n def name(self) -> str:\n \"\"\"Module name used for runtime status and diagnostics.\"\"\"\n\n @abstractmethod\n def register(self, registry: ModuleRegistry) -> None:\n \"\"\"Register workers, services, and health contributors.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/contracts/application.py:ApplicationModule", + "span_start": 8, + "span_end": 16, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.application", + "is_test": false, + "blob_sha": "197c35634dca49c352ce3f230295a485fbffb672ce7bb8c08e752bfdf61e7fa4", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/__init__.py", + "content": "__all__: list[str] = []", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/__init__.py:1-1", + "span_start": 1, + "span_end": 1, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.__init__", + "is_test": false, + "blob_sha": "8eea9df4f6d7b38ca0e39ccc27b04700e3d08dbeec8046d613d22706d19985fa", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/queue/in_memory.py", + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)", + "layer": "C4_SEMANTIC_ROLES", + "title": "InMemoryTaskQueue", + "span_start": 9, + "span_end": 38, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 22, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "2da04cb94544a3bcbf0943a95ad4bdd8710bcafaa32a02fd0e4de2178dcf3533", + "symbol_name": "InMemoryTaskQueue", + "qname": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 9, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "58f0cc001ccda0eee4c6bc32ed83bd05eafd6b6644f1e8b4aa9eed3103db73dc", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "ConfigFileLoader\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (8)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ConfigFileLoader", + "span_start": 11, + "span_end": 48, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 23, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "a8474eca8b6e9dc86ae67ed68b16fa5fb639ef08739c053e7b7195489765667f", + "symbol_name": "ConfigFileLoader", + "qname": "ConfigFileLoader", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 8, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workers/supervisor.py", + "content": "WorkerSupervisor\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkerSupervisor", + "span_start": 10, + "span_end": 59, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "c17b44e8d9e97d490989b21fa67d7c346cdda8a0472e4c41fb243c8846faa124", + "symbol_name": "WorkerSupervisor", + "qname": "WorkerSupervisor", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "77609d9d5927171cce7fc3a54897c183fd63068710c6362029b700937aae5eee", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowEngine", + "span_start": 10, + "span_end": 86, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "57ec0a9f11c542c78e008684a888397e8d9ef4223671acb2567e631a0cbc70b4", + "symbol_name": "WorkflowEngine", + "qname": "WorkflowEngine", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/store.py", + "content": "TraceContextStore\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "TraceContextStore", + "span_start": 15, + "span_end": 52, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b2dad4fbe16ffb11b58deba311c7739955c39d59f291b22181f33e9c8cce4059", + "symbol_name": "TraceContextStore", + "qname": "TraceContextStore", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "d369554f08fc92039c6edd5a2a1e73b23901533e8974459170bbd9347d263dc5", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime calls runtime.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:calls", + "span_start": 19, + "span_end": 19, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "4eaeec4ac55a59d5f66fd01c4754955f8fedaf4bc3df13fa769b352c7bfaacbb", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.add_config_file", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime reads_attr runtime.register_module", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:reads_attr", + "span_start": 28, + "span_end": 28, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "45516c79ff358dbf9b650a081668df0f66d2fe989300f985a1a78be6be166f8f", + "edge_type": "reads_attr", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.register_module", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:instantiates", + "span_start": 17, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "0adba17984f850ea1608c9e734d2dd5c325cfde3a8133123aa239e44935ad18e", + "edge_type": "instantiates", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": "27158ca220022eeb5083c6addf8a50775d45f7161284fd60aac48410105f4b98", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime calls runtime.register_module", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:calls", + "span_start": 28, + "span_end": 28, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "ab6003c3441addc1ba1b81edeca009165559f652f6b2cf424e5ae61b1f617de8", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.register_module", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime calls runtime.control_plane.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:calls", + "span_start": 21, + "span_end": 27, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "2678250030b9ce47a3b3b55fac7897ac530367edc8374ac9d5e6ecafb1e483f0", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.control_plane.register_channel", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime reads_attr runtime.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:reads_attr", + "span_start": 19, + "span_end": 19, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "30d4e8aae984ab84d523e80d02f1caeda52d547fa3d2aa47be8845931cabbca2", + "edge_type": "reads_attr", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.add_config_file", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "validation": { + "passed": true, + "action": "return", + "reasons": [] + } + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-explain-create-runtime.md b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-explain-create-runtime.md new file mode 100644 index 0000000..d3586a5 --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-explain-create-runtime.md @@ -0,0 +1,34 @@ +# plba-v2-explain-create-runtime + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: agent_runtime +- mode: full_chain +- passed: True + +## Query +Что делает функция create_runtime? + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 33, + "llm_answer": "Функция `create_runtime` находится в файле `src/plba/bootstrap.py`. Она принимает аргумент `module`, представляющий экземпляр интерфейса `ApplicationModule`.\n\nПодтвержденные действия функции:\n- Инициализирует объект типа `RuntimeManager`.\n- Если указан путь к конфигурационному файлу (`config_path`), добавляет этот файл в менеджер конфигурации.\n- При включённой опции HTTP-контроля регистрирует канал управления через класс `HttpControlChannel`.\n- Регистрирует переданный модуль в менеджере.\n\nТаким образом, основная задача функции – создать и настроить базовый runtime для приложения.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "create_runtime" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-explain-local-http-channel.json b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-explain-local-http-channel.json new file mode 100644 index 0000000..6a5c7ed --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-explain-local-http-channel.json @@ -0,0 +1,2033 @@ +{ + "case_id": "plba-v2-explain-local-http-channel", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "agent_runtime", + "mode": "full_chain", + "query": "Почему в файле src/app_runtime/control/http_channel.py класс HttpControlChannel устроен так?", + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN_LOCAL", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 13, + "llm_answer": "Класс `HttpControlChannel` в файле `http_channel.py` реализует канал управления для HTTP-запросов. В конструкторе (`__init__`) создаются основные компоненты:\n\n- `_runner`: объект типа `UvicornThreadRunner`, управляющий асинхронным сервером uvicorn.\n- `_factory`: фабрика приложений типа `HttpControlAppFactory`, создающая приложения для обработки запросов.\n- `_actions`: коллекция действий управления, инициализируется как `None`.\n\nМетод `start` запускает сервер с приложением, созданным фабрикой, и ожидает завершения работы сервера при вызове `stop`. Класс предназначен для организации взаимодействия с внешним миром через HTTP-интерфейсы.", + "answer_mode": "answered", + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "symbol_candidates": [ + "HttpControlChannel" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C2_DEPENDENCY_GRAPH" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "query": "Почему в файле src/app_runtime/control/http_channel.py класс HttpControlChannel устроен так?", + "router_result": { + "schema_version": "1.1", + "intent": "CODE_QA", + "retrieval_profile": "code", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query_plan": { + "raw": "Почему в файле src/app_runtime/control/http_channel.py класс HttpControlChannel устроен так?", + "normalized": "Почему в файле src/app_runtime/control/http_channel.py класс HttpControlChannel устроен так?", + "sub_intent": "EXPLAIN_LOCAL", + "negations": [], + "expansions": [ + "file", + "HttpControlChannel" + ], + "keyword_hints": [ + "src/app_runtime/control/http_channel.py", + "HttpControlChannel" + ], + "path_hints": [ + "src/app_runtime/control/http_channel.py" + ], + "doc_scope_hints": [], + "symbol_candidates": [ + "HttpControlChannel" + ], + "symbol_kind_hint": "class", + "anchors": [ + { + "type": "FILE_PATH", + "value": "src/app_runtime/control/http_channel.py", + "source": "user_text", + "subtype": null, + "span": { + "start": 15, + "end": 54 + }, + "confidence": 0.95 + }, + { + "type": "SYMBOL", + "value": "HttpControlChannel", + "source": "user_text", + "subtype": null, + "span": { + "start": 61, + "end": 79 + }, + "confidence": 0.88 + }, + { + "type": "KEY_TERM", + "value": "файл", + "source": "user_text", + "subtype": null, + "span": { + "start": 9, + "end": 14 + }, + "confidence": 0.9 + }, + { + "type": "KEY_TERM", + "value": "класс", + "source": "user_text", + "subtype": null, + "span": { + "start": 55, + "end": 60 + }, + "confidence": 0.9 + } + ] + }, + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "top_k": 8 + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 12 + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "top_k": 4 + } + ], + "filters": { + "test_policy": "EXCLUDE", + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + }, + "symbol_resolution": { + "status": "pending", + "resolved_symbol": null, + "alternatives": [ + "HttpControlChannel" + ], + "confidence": 0.0 + }, + "evidence_policy": { + "require_def": true, + "require_flow": false, + "require_spec": false, + "allow_answer_without_evidence": false + } + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Почему в файле src/app_runtime/control/http_channel.py класс HttpControlChannel устроен так?", + "sub_intent": "EXPLAIN_LOCAL", + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "keyword_hints": [ + "src/app_runtime/control/http_channel.py", + "HttpControlChannel" + ], + "symbol_candidates": [ + "HttpControlChannel" + ], + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C2_DEPENDENCY_GRAPH" + ], + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "top_k": 8 + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 12 + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "top_k": 4 + } + ], + "filters": { + "test_policy": "EXCLUDE", + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + }, + "query_plan": { + "raw": "Почему в файле src/app_runtime/control/http_channel.py класс HttpControlChannel устроен так?", + "normalized": "Почему в файле src/app_runtime/control/http_channel.py класс HttpControlChannel устроен так?", + "sub_intent": "EXPLAIN_LOCAL", + "negations": [], + "expansions": [ + "file", + "HttpControlChannel" + ], + "keyword_hints": [ + "src/app_runtime/control/http_channel.py", + "HttpControlChannel" + ], + "path_hints": [ + "src/app_runtime/control/http_channel.py" + ], + "doc_scope_hints": [], + "symbol_candidates": [ + "HttpControlChannel" + ], + "symbol_kind_hint": "class", + "anchors": [ + { + "type": "FILE_PATH", + "value": "src/app_runtime/control/http_channel.py", + "source": "user_text", + "subtype": null, + "span": { + "start": 15, + "end": 54 + }, + "confidence": 0.95 + }, + { + "type": "SYMBOL", + "value": "HttpControlChannel", + "source": "user_text", + "subtype": null, + "span": { + "start": 61, + "end": 79 + }, + "confidence": 0.88 + }, + { + "type": "KEY_TERM", + "value": "файл", + "source": "user_text", + "subtype": null, + "span": { + "start": 9, + "end": 14 + }, + "confidence": 0.9 + }, + { + "type": "KEY_TERM", + "value": "класс", + "source": "user_text", + "subtype": null, + "span": { + "start": 55, + "end": 60 + }, + "confidence": 0.9 + } + ] + } + }, + "retrieval_result": { + "target_symbol_candidates": [ + "ControlChannel", + "ControlActionSet", + "JSONResponse", + "HttpControlAppFactory", + "UvicornThreadRunner", + "HttpControlChannel", + "HttpControlChannel.__init__", + "HttpControlChannel.start" + ], + "resolved_symbol": "HttpControlChannel", + "symbol_resolution_status": "resolved", + "file_candidates": [ + "src/app_runtime/control/http_channel.py" + ], + "code_chunks": [ + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/http_channel.py", + "title": "ControlChannel", + "content": "const ControlChannel\nControlChannel = app_runtime.control.base.ControlChannel", + "start_line": 7, + "end_line": 7, + "metadata": { + "symbol_id": "6e69a934202b6e11891af8fb72b2033e8ae3071eb7577c64f5545b5b7ddfb51e", + "qname": "ControlChannel", + "kind": "const", + "signature": "ControlChannel = app_runtime.control.base.ControlChannel", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/http_channel.py", + "title": "ControlActionSet", + "content": "const ControlActionSet\nControlActionSet = app_runtime.control.base.ControlActionSet", + "start_line": 7, + "end_line": 7, + "metadata": { + "symbol_id": "2132a5717c57061e3488a1bf4d43650a60ea903a42278f4d494c014bc80d2df9", + "qname": "ControlActionSet", + "kind": "const", + "signature": "ControlActionSet = app_runtime.control.base.ControlActionSet", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/http_channel.py", + "title": "JSONResponse", + "content": "const JSONResponse\nJSONResponse = fastapi.responses.JSONResponse", + "start_line": 5, + "end_line": 5, + "metadata": { + "symbol_id": "238f600ea55013e25a3e1451f7fd65caabea125b314b89247900cdab5b801a23", + "qname": "JSONResponse", + "kind": "const", + "signature": "JSONResponse = fastapi.responses.JSONResponse", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/http_channel.py", + "title": "HttpControlAppFactory", + "content": "const HttpControlAppFactory\nHttpControlAppFactory = app_runtime.control.http_app.HttpControlAppFactory", + "start_line": 8, + "end_line": 8, + "metadata": { + "symbol_id": "9ee00379ee797cd2386e88a6e37dc69e3e31de9144fc4b95f0206cd1430e8983", + "qname": "HttpControlAppFactory", + "kind": "const", + "signature": "HttpControlAppFactory = app_runtime.control.http_app.HttpControlAppFactory", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/http_channel.py", + "title": "UvicornThreadRunner", + "content": "const UvicornThreadRunner\nUvicornThreadRunner = app_runtime.control.http_runner.UvicornThreadRunner", + "start_line": 9, + "end_line": 9, + "metadata": { + "symbol_id": "c6ee53f4ff75d5b34ee95854cb63bb3ecfa163023717cd969b8cba937a0cd3b3", + "qname": "UvicornThreadRunner", + "kind": "const", + "signature": "UvicornThreadRunner = app_runtime.control.http_runner.UvicornThreadRunner", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/http_channel.py", + "title": "HttpControlChannel", + "content": "class HttpControlChannel\nHttpControlChannel(ControlChannel)", + "start_line": 12, + "end_line": 57, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "qname": "HttpControlChannel", + "kind": "class", + "signature": "HttpControlChannel(ControlChannel)", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/http_channel.py", + "title": "HttpControlChannel.__init__", + "content": "method HttpControlChannel.__init__\n__init__(self, host, port, timeout)", + "start_line": 13, + "end_line": 17, + "metadata": { + "symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "qname": "HttpControlChannel.__init__", + "kind": "method", + "signature": "__init__(self, host, port, timeout)", + "parent_symbol_id": "HttpControlChannel", + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/http_channel.py", + "title": "HttpControlChannel.start", + "content": "method HttpControlChannel.start\nstart(self, actions)", + "start_line": 19, + "end_line": 22, + "metadata": { + "symbol_id": "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0", + "qname": "HttpControlChannel.start", + "kind": "method", + "signature": "start(self, actions)", + "parent_symbol_id": "HttpControlChannel", + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/http_channel.py", + "title": "src/app_runtime/control/http_channel.py:HttpControlChannel", + "content": "class HttpControlChannel(ControlChannel):\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._timeout = timeout\n self._runner = UvicornThreadRunner(host, port, timeout)\n self._factory = HttpControlAppFactory()\n self._actions: ControlActionSet | None = None\n\n async def start(self, actions: ControlActionSet) -> None:\n self._actions = actions\n app = self._factory.create(self._health_response, self._action_response)\n await self._runner.start(app)\n\n async def stop(self) -> None:\n await self._runner.stop()\n\n @property\n def port(self) -> int:\n return self._runner.port\n\n async def _health_response(self) -> dict[str, object]:\n if self._actions is None:\n return {\"status\": \"unhealthy\", \"detail\": \"control actions are not configured\"}\n return await asyncio.wait_for(self._actions.health(), timeout=float(self._timeout))\n\n async def _action_response(self, action: str, _client_source: str = \"unknown\") -> JSONResponse:\n if self._actions is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"{action} handler is not configured\"}, status_code=404)\n callbacks = {\n \"start\": self._actions.start,\n \"stop\": self._actions.stop,\n \"status\": self._actions.status,\n }\n callback = callbacks.get(action)\n if callback is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"unsupported action: {action}\"}, status_code=404)\n action_timeout = max(float(self._timeout), 10.0) if action in {\"start\", \"stop\"} else float(self._timeout)\n try:\n detail = await asyncio.wait_for(callback(), timeout=action_timeout)\n except asyncio.TimeoutError:\n return JSONResponse(\n content={\"status\": \"accepted\", \"detail\": f\"{action} operation is still in progress\"},\n status_code=202,\n )\n except Exception as exc:\n return JSONResponse(content={\"status\": \"error\", \"detail\": str(exc)}, status_code=500)\n return JSONResponse(content={\"status\": \"ok\", \"detail\": detail or f\"{action} action accepted\"}, status_code=200)", + "start_line": 12, + "end_line": 57, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/http_channel.py", + "title": "HttpControlChannel.__init__:dataflow_slice", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._timeout\n -> HttpControlChannel._action_response", + "start_line": 14, + "end_line": 47, + "metadata": { + "edge_id": "c3ef21fcae96c82c00be74b3ab827d4af2085d89cb3fa5521c19a174aad84dbb", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "e64969024ccaeb34d8d91473fad07b3b3d341875846392e7a006406c7ada1954", + "dst_ref": "HttpControlChannel._action_response", + "resolution": "resolved", + "slice_id": "c3ef21fcae96c82c00be74b3ab827d4af2085d89cb3fa5521c19a174aad84dbb", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._timeout", + "HttpControlChannel._action_response" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "e64969024ccaeb34d8d91473fad07b3b3d341875846392e7a006406c7ada1954" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/http_channel.py", + "title": "HttpControlChannel.__init__:dataflow_slice", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._runner\n -> HttpControlChannel.start", + "start_line": 15, + "end_line": 22, + "metadata": { + "edge_id": "51d73913df709152258ed1b9a8c8f4eb3c575eccfe6b982aef0b28e0789a29da", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0", + "dst_ref": "HttpControlChannel.start", + "resolution": "resolved", + "slice_id": "51d73913df709152258ed1b9a8c8f4eb3c575eccfe6b982aef0b28e0789a29da", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._runner", + "HttpControlChannel.start" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/http_channel.py", + "title": "HttpControlChannel.__init__:dataflow_slice", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._timeout\n -> HttpControlChannel._health_response", + "start_line": 14, + "end_line": 34, + "metadata": { + "edge_id": "f858f5c9e575f6c4cdfe3853571b7ee21d1f628a443541d2037c3dc9d0790bef", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "e84bf04e9cd2127df235b7064d05f47e19f19a89c7c82f4c247231d4e8fa426a", + "dst_ref": "HttpControlChannel._health_response", + "resolution": "resolved", + "slice_id": "f858f5c9e575f6c4cdfe3853571b7ee21d1f628a443541d2037c3dc9d0790bef", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._timeout", + "HttpControlChannel._health_response" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "e84bf04e9cd2127df235b7064d05f47e19f19a89c7c82f4c247231d4e8fa426a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/http_channel.py", + "title": "HttpControlChannel.__init__:dataflow_slice", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._runner\n -> HttpControlChannel.stop", + "start_line": 15, + "end_line": 25, + "metadata": { + "edge_id": "0f827ef81a990258a8a74381c8564a8361afa6712dba3200592659c939adcb9d", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "f29ab212620093d72be20e26c5a399624c7939a6056a728762ed3f84a250bfa3", + "dst_ref": "HttpControlChannel.stop", + "resolution": "resolved", + "slice_id": "0f827ef81a990258a8a74381c8564a8361afa6712dba3200592659c939adcb9d", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._runner", + "HttpControlChannel.stop" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "f29ab212620093d72be20e26c5a399624c7939a6056a728762ed3f84a250bfa3" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "relations": [ + { + "path": "src/app_runtime/control/http_channel.py", + "metadata": { + "edge_id": "c3ef21fcae96c82c00be74b3ab827d4af2085d89cb3fa5521c19a174aad84dbb", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "e64969024ccaeb34d8d91473fad07b3b3d341875846392e7a006406c7ada1954", + "dst_ref": "HttpControlChannel._action_response", + "resolution": "resolved", + "slice_id": "c3ef21fcae96c82c00be74b3ab827d4af2085d89cb3fa5521c19a174aad84dbb", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._timeout", + "HttpControlChannel._action_response" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "e64969024ccaeb34d8d91473fad07b3b3d341875846392e7a006406c7ada1954" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._timeout\n -> HttpControlChannel._action_response" + }, + { + "path": "src/app_runtime/control/http_channel.py", + "metadata": { + "edge_id": "51d73913df709152258ed1b9a8c8f4eb3c575eccfe6b982aef0b28e0789a29da", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0", + "dst_ref": "HttpControlChannel.start", + "resolution": "resolved", + "slice_id": "51d73913df709152258ed1b9a8c8f4eb3c575eccfe6b982aef0b28e0789a29da", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._runner", + "HttpControlChannel.start" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._runner\n -> HttpControlChannel.start" + }, + { + "path": "src/app_runtime/control/http_channel.py", + "metadata": { + "edge_id": "f858f5c9e575f6c4cdfe3853571b7ee21d1f628a443541d2037c3dc9d0790bef", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "e84bf04e9cd2127df235b7064d05f47e19f19a89c7c82f4c247231d4e8fa426a", + "dst_ref": "HttpControlChannel._health_response", + "resolution": "resolved", + "slice_id": "f858f5c9e575f6c4cdfe3853571b7ee21d1f628a443541d2037c3dc9d0790bef", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._timeout", + "HttpControlChannel._health_response" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "e84bf04e9cd2127df235b7064d05f47e19f19a89c7c82f4c247231d4e8fa426a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._timeout\n -> HttpControlChannel._health_response" + }, + { + "path": "src/app_runtime/control/http_channel.py", + "metadata": { + "edge_id": "0f827ef81a990258a8a74381c8564a8361afa6712dba3200592659c939adcb9d", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "f29ab212620093d72be20e26c5a399624c7939a6056a728762ed3f84a250bfa3", + "dst_ref": "HttpControlChannel.stop", + "resolution": "resolved", + "slice_id": "0f827ef81a990258a8a74381c8564a8361afa6712dba3200592659c939adcb9d", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._runner", + "HttpControlChannel.stop" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "f29ab212620093d72be20e26c5a399624c7939a6056a728762ed3f84a250bfa3" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._runner\n -> HttpControlChannel.stop" + } + ], + "entrypoints": [], + "test_candidates": [], + "layer_outcomes": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 1, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 4, + "empty": false, + "fallback_used": false + } + ], + "missing_layers": [], + "raw_rows": [ + { + "path": "src/app_runtime/control/http_channel.py", + "content": "const ControlChannel\nControlChannel = app_runtime.control.base.ControlChannel", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlChannel", + "span_start": 7, + "span_end": 7, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "6e69a934202b6e11891af8fb72b2033e8ae3071eb7577c64f5545b5b7ddfb51e", + "qname": "ControlChannel", + "kind": "const", + "signature": "ControlChannel = app_runtime.control.base.ControlChannel", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "const ControlActionSet\nControlActionSet = app_runtime.control.base.ControlActionSet", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlActionSet", + "span_start": 7, + "span_end": 7, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "2132a5717c57061e3488a1bf4d43650a60ea903a42278f4d494c014bc80d2df9", + "qname": "ControlActionSet", + "kind": "const", + "signature": "ControlActionSet = app_runtime.control.base.ControlActionSet", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "const JSONResponse\nJSONResponse = fastapi.responses.JSONResponse", + "layer": "C1_SYMBOL_CATALOG", + "title": "JSONResponse", + "span_start": 5, + "span_end": 5, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "238f600ea55013e25a3e1451f7fd65caabea125b314b89247900cdab5b801a23", + "qname": "JSONResponse", + "kind": "const", + "signature": "JSONResponse = fastapi.responses.JSONResponse", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "const HttpControlAppFactory\nHttpControlAppFactory = app_runtime.control.http_app.HttpControlAppFactory", + "layer": "C1_SYMBOL_CATALOG", + "title": "HttpControlAppFactory", + "span_start": 8, + "span_end": 8, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "9ee00379ee797cd2386e88a6e37dc69e3e31de9144fc4b95f0206cd1430e8983", + "qname": "HttpControlAppFactory", + "kind": "const", + "signature": "HttpControlAppFactory = app_runtime.control.http_app.HttpControlAppFactory", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "const UvicornThreadRunner\nUvicornThreadRunner = app_runtime.control.http_runner.UvicornThreadRunner", + "layer": "C1_SYMBOL_CATALOG", + "title": "UvicornThreadRunner", + "span_start": 9, + "span_end": 9, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "c6ee53f4ff75d5b34ee95854cb63bb3ecfa163023717cd969b8cba937a0cd3b3", + "qname": "UvicornThreadRunner", + "kind": "const", + "signature": "UvicornThreadRunner = app_runtime.control.http_runner.UvicornThreadRunner", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel\nHttpControlChannel(ControlChannel)", + "layer": "C1_SYMBOL_CATALOG", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "qname": "HttpControlChannel", + "kind": "class", + "signature": "HttpControlChannel(ControlChannel)", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "method HttpControlChannel.__init__\n__init__(self, host, port, timeout)", + "layer": "C1_SYMBOL_CATALOG", + "title": "HttpControlChannel.__init__", + "span_start": 13, + "span_end": 17, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "qname": "HttpControlChannel.__init__", + "kind": "method", + "signature": "__init__(self, host, port, timeout)", + "parent_symbol_id": "HttpControlChannel", + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "method HttpControlChannel.start\nstart(self, actions)", + "layer": "C1_SYMBOL_CATALOG", + "title": "HttpControlChannel.start", + "span_start": 19, + "span_end": 22, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0", + "qname": "HttpControlChannel.start", + "kind": "method", + "signature": "start(self, actions)", + "parent_symbol_id": "HttpControlChannel", + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel(ControlChannel):\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._timeout = timeout\n self._runner = UvicornThreadRunner(host, port, timeout)\n self._factory = HttpControlAppFactory()\n self._actions: ControlActionSet | None = None\n\n async def start(self, actions: ControlActionSet) -> None:\n self._actions = actions\n app = self._factory.create(self._health_response, self._action_response)\n await self._runner.start(app)\n\n async def stop(self) -> None:\n await self._runner.stop()\n\n @property\n def port(self) -> int:\n return self._runner.port\n\n async def _health_response(self) -> dict[str, object]:\n if self._actions is None:\n return {\"status\": \"unhealthy\", \"detail\": \"control actions are not configured\"}\n return await asyncio.wait_for(self._actions.health(), timeout=float(self._timeout))\n\n async def _action_response(self, action: str, _client_source: str = \"unknown\") -> JSONResponse:\n if self._actions is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"{action} handler is not configured\"}, status_code=404)\n callbacks = {\n \"start\": self._actions.start,\n \"stop\": self._actions.stop,\n \"status\": self._actions.status,\n }\n callback = callbacks.get(action)\n if callback is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"unsupported action: {action}\"}, status_code=404)\n action_timeout = max(float(self._timeout), 10.0) if action in {\"start\", \"stop\"} else float(self._timeout)\n try:\n detail = await asyncio.wait_for(callback(), timeout=action_timeout)\n except asyncio.TimeoutError:\n return JSONResponse(\n content={\"status\": \"accepted\", \"detail\": f\"{action} operation is still in progress\"},\n status_code=202,\n )\n except Exception as exc:\n return JSONResponse(content={\"status\": \"error\", \"detail\": str(exc)}, status_code=500)\n return JSONResponse(content={\"status\": \"ok\", \"detail\": detail or f\"{action} action accepted\"}, status_code=200)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_channel.py:HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._timeout\n -> HttpControlChannel._action_response", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "c3ef21fcae96c82c00be74b3ab827d4af2085d89cb3fa5521c19a174aad84dbb", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "e64969024ccaeb34d8d91473fad07b3b3d341875846392e7a006406c7ada1954", + "dst_ref": "HttpControlChannel._action_response", + "resolution": "resolved", + "slice_id": "c3ef21fcae96c82c00be74b3ab827d4af2085d89cb3fa5521c19a174aad84dbb", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._timeout", + "HttpControlChannel._action_response" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "e64969024ccaeb34d8d91473fad07b3b3d341875846392e7a006406c7ada1954" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._runner\n -> HttpControlChannel.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 15, + "span_end": 22, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "51d73913df709152258ed1b9a8c8f4eb3c575eccfe6b982aef0b28e0789a29da", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0", + "dst_ref": "HttpControlChannel.start", + "resolution": "resolved", + "slice_id": "51d73913df709152258ed1b9a8c8f4eb3c575eccfe6b982aef0b28e0789a29da", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._runner", + "HttpControlChannel.start" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._timeout\n -> HttpControlChannel._health_response", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 14, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "f858f5c9e575f6c4cdfe3853571b7ee21d1f628a443541d2037c3dc9d0790bef", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "e84bf04e9cd2127df235b7064d05f47e19f19a89c7c82f4c247231d4e8fa426a", + "dst_ref": "HttpControlChannel._health_response", + "resolution": "resolved", + "slice_id": "f858f5c9e575f6c4cdfe3853571b7ee21d1f628a443541d2037c3dc9d0790bef", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._timeout", + "HttpControlChannel._health_response" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "e84bf04e9cd2127df235b7064d05f47e19f19a89c7c82f4c247231d4e8fa426a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._runner\n -> HttpControlChannel.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 15, + "span_end": 25, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "0f827ef81a990258a8a74381c8564a8361afa6712dba3200592659c939adcb9d", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "f29ab212620093d72be20e26c5a399624c7939a6056a728762ed3f84a250bfa3", + "dst_ref": "HttpControlChannel.stop", + "resolution": "resolved", + "slice_id": "0f827ef81a990258a8a74381c8564a8361afa6712dba3200592659c939adcb9d", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._runner", + "HttpControlChannel.stop" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "f29ab212620093d72be20e26c5a399624c7939a6056a728762ed3f84a250bfa3" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "retrieval_report": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C2_DEPENDENCY_GRAPH" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "vector", + "C0_SOURCE_CHUNKS": "vector", + "C2_DEPENDENCY_GRAPH": "vector" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 12, + "C2_DEPENDENCY_GRAPH": 4 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ] + } + }, + "fallback": { + "used": false, + "reason": null + }, + "retrieval_by_layer_ms": { + "C1_SYMBOL_CATALOG": 20, + "C0_SOURCE_CHUNKS": 16, + "C2_DEPENDENCY_GRAPH": 18 + } + } + }, + "diagnostics": { + "intent_correct": null, + "target_found": true, + "layers_used": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C2_DEPENDENCY_GRAPH" + ], + "retrieval_sufficient": true, + "answer_mode": "normal", + "router_result": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "EXPLAIN_LOCAL", + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C2_DEPENDENCY_GRAPH" + ], + "symbol_resolution_status": "pending" + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Почему в файле src/app_runtime/control/http_channel.py класс HttpControlChannel устроен так?", + "sub_intent": "EXPLAIN_LOCAL", + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C2_DEPENDENCY_GRAPH" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 1, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 4, + "empty": false, + "fallback_used": false + } + ], + "empty_layers": [], + "evidence_gate_decision": { + "sufficient": true, + "failure_reasons": [], + "evidence_count": 13 + }, + "failure_reasons": [], + "timings_ms": {} + }, + "rag_rows": [ + { + "path": "src/app_runtime/control/http_channel.py", + "content": "const ControlChannel\nControlChannel = app_runtime.control.base.ControlChannel", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlChannel", + "span_start": 7, + "span_end": 7, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "6e69a934202b6e11891af8fb72b2033e8ae3071eb7577c64f5545b5b7ddfb51e", + "qname": "ControlChannel", + "kind": "const", + "signature": "ControlChannel = app_runtime.control.base.ControlChannel", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "const ControlActionSet\nControlActionSet = app_runtime.control.base.ControlActionSet", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlActionSet", + "span_start": 7, + "span_end": 7, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "2132a5717c57061e3488a1bf4d43650a60ea903a42278f4d494c014bc80d2df9", + "qname": "ControlActionSet", + "kind": "const", + "signature": "ControlActionSet = app_runtime.control.base.ControlActionSet", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "const JSONResponse\nJSONResponse = fastapi.responses.JSONResponse", + "layer": "C1_SYMBOL_CATALOG", + "title": "JSONResponse", + "span_start": 5, + "span_end": 5, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "238f600ea55013e25a3e1451f7fd65caabea125b314b89247900cdab5b801a23", + "qname": "JSONResponse", + "kind": "const", + "signature": "JSONResponse = fastapi.responses.JSONResponse", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "const HttpControlAppFactory\nHttpControlAppFactory = app_runtime.control.http_app.HttpControlAppFactory", + "layer": "C1_SYMBOL_CATALOG", + "title": "HttpControlAppFactory", + "span_start": 8, + "span_end": 8, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "9ee00379ee797cd2386e88a6e37dc69e3e31de9144fc4b95f0206cd1430e8983", + "qname": "HttpControlAppFactory", + "kind": "const", + "signature": "HttpControlAppFactory = app_runtime.control.http_app.HttpControlAppFactory", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "const UvicornThreadRunner\nUvicornThreadRunner = app_runtime.control.http_runner.UvicornThreadRunner", + "layer": "C1_SYMBOL_CATALOG", + "title": "UvicornThreadRunner", + "span_start": 9, + "span_end": 9, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "c6ee53f4ff75d5b34ee95854cb63bb3ecfa163023717cd969b8cba937a0cd3b3", + "qname": "UvicornThreadRunner", + "kind": "const", + "signature": "UvicornThreadRunner = app_runtime.control.http_runner.UvicornThreadRunner", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel\nHttpControlChannel(ControlChannel)", + "layer": "C1_SYMBOL_CATALOG", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "qname": "HttpControlChannel", + "kind": "class", + "signature": "HttpControlChannel(ControlChannel)", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "method HttpControlChannel.__init__\n__init__(self, host, port, timeout)", + "layer": "C1_SYMBOL_CATALOG", + "title": "HttpControlChannel.__init__", + "span_start": 13, + "span_end": 17, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "qname": "HttpControlChannel.__init__", + "kind": "method", + "signature": "__init__(self, host, port, timeout)", + "parent_symbol_id": "HttpControlChannel", + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "method HttpControlChannel.start\nstart(self, actions)", + "layer": "C1_SYMBOL_CATALOG", + "title": "HttpControlChannel.start", + "span_start": 19, + "span_end": 22, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0", + "qname": "HttpControlChannel.start", + "kind": "method", + "signature": "start(self, actions)", + "parent_symbol_id": "HttpControlChannel", + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel(ControlChannel):\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._timeout = timeout\n self._runner = UvicornThreadRunner(host, port, timeout)\n self._factory = HttpControlAppFactory()\n self._actions: ControlActionSet | None = None\n\n async def start(self, actions: ControlActionSet) -> None:\n self._actions = actions\n app = self._factory.create(self._health_response, self._action_response)\n await self._runner.start(app)\n\n async def stop(self) -> None:\n await self._runner.stop()\n\n @property\n def port(self) -> int:\n return self._runner.port\n\n async def _health_response(self) -> dict[str, object]:\n if self._actions is None:\n return {\"status\": \"unhealthy\", \"detail\": \"control actions are not configured\"}\n return await asyncio.wait_for(self._actions.health(), timeout=float(self._timeout))\n\n async def _action_response(self, action: str, _client_source: str = \"unknown\") -> JSONResponse:\n if self._actions is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"{action} handler is not configured\"}, status_code=404)\n callbacks = {\n \"start\": self._actions.start,\n \"stop\": self._actions.stop,\n \"status\": self._actions.status,\n }\n callback = callbacks.get(action)\n if callback is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"unsupported action: {action}\"}, status_code=404)\n action_timeout = max(float(self._timeout), 10.0) if action in {\"start\", \"stop\"} else float(self._timeout)\n try:\n detail = await asyncio.wait_for(callback(), timeout=action_timeout)\n except asyncio.TimeoutError:\n return JSONResponse(\n content={\"status\": \"accepted\", \"detail\": f\"{action} operation is still in progress\"},\n status_code=202,\n )\n except Exception as exc:\n return JSONResponse(content={\"status\": \"error\", \"detail\": str(exc)}, status_code=500)\n return JSONResponse(content={\"status\": \"ok\", \"detail\": detail or f\"{action} action accepted\"}, status_code=200)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_channel.py:HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._timeout\n -> HttpControlChannel._action_response", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "c3ef21fcae96c82c00be74b3ab827d4af2085d89cb3fa5521c19a174aad84dbb", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "e64969024ccaeb34d8d91473fad07b3b3d341875846392e7a006406c7ada1954", + "dst_ref": "HttpControlChannel._action_response", + "resolution": "resolved", + "slice_id": "c3ef21fcae96c82c00be74b3ab827d4af2085d89cb3fa5521c19a174aad84dbb", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._timeout", + "HttpControlChannel._action_response" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "e64969024ccaeb34d8d91473fad07b3b3d341875846392e7a006406c7ada1954" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._runner\n -> HttpControlChannel.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 15, + "span_end": 22, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "51d73913df709152258ed1b9a8c8f4eb3c575eccfe6b982aef0b28e0789a29da", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0", + "dst_ref": "HttpControlChannel.start", + "resolution": "resolved", + "slice_id": "51d73913df709152258ed1b9a8c8f4eb3c575eccfe6b982aef0b28e0789a29da", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._runner", + "HttpControlChannel.start" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._timeout\n -> HttpControlChannel._health_response", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 14, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "f858f5c9e575f6c4cdfe3853571b7ee21d1f628a443541d2037c3dc9d0790bef", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "e84bf04e9cd2127df235b7064d05f47e19f19a89c7c82f4c247231d4e8fa426a", + "dst_ref": "HttpControlChannel._health_response", + "resolution": "resolved", + "slice_id": "f858f5c9e575f6c4cdfe3853571b7ee21d1f628a443541d2037c3dc9d0790bef", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._timeout", + "HttpControlChannel._health_response" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "e84bf04e9cd2127df235b7064d05f47e19f19a89c7c82f4c247231d4e8fa426a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._runner\n -> HttpControlChannel.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 15, + "span_end": 25, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "0f827ef81a990258a8a74381c8564a8361afa6712dba3200592659c939adcb9d", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "f29ab212620093d72be20e26c5a399624c7939a6056a728762ed3f84a250bfa3", + "dst_ref": "HttpControlChannel.stop", + "resolution": "resolved", + "slice_id": "0f827ef81a990258a8a74381c8564a8361afa6712dba3200592659c939adcb9d", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._runner", + "HttpControlChannel.stop" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "f29ab212620093d72be20e26c5a399624c7939a6056a728762ed3f84a250bfa3" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "validation": { + "passed": true, + "action": "return", + "reasons": [] + } + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-explain-local-http-channel.md b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-explain-local-http-channel.md new file mode 100644 index 0000000..87e3b4b --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-explain-local-http-channel.md @@ -0,0 +1,34 @@ +# plba-v2-explain-local-http-channel + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: agent_runtime +- mode: full_chain +- passed: True + +## Query +Почему в файле src/app_runtime/control/http_channel.py класс HttpControlChannel устроен так? + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "EXPLAIN_LOCAL", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 13, + "llm_answer": "Класс `HttpControlChannel` в файле `http_channel.py` реализует канал управления для HTTP-запросов. В конструкторе (`__init__`) создаются основные компоненты:\n\n- `_runner`: объект типа `UvicornThreadRunner`, управляющий асинхронным сервером uvicorn.\n- `_factory`: фабрика приложений типа `HttpControlAppFactory`, создающая приложения для обработки запросов.\n- `_actions`: коллекция действий управления, инициализируется как `None`.\n\nМетод `start` запускает сервер с приложением, созданным фабрикой, и ожидает завершения работы сервера при вызове `stop`. Класс предназначен для организации взаимодействия с внешним миром через HTTP-интерфейсы.", + "answer_mode": "answered", + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "symbol_candidates": [ + "HttpControlChannel" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C2_DEPENDENCY_GRAPH" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-explain-nonexistent-symbol.json b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-explain-nonexistent-symbol.json new file mode 100644 index 0000000..83d2c9a --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-explain-nonexistent-symbol.json @@ -0,0 +1,4092 @@ +{ + "case_id": "plba-v2-explain-nonexistent-symbol", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "agent_runtime", + "mode": "full_chain", + "query": "Объясни класс RuntimeFactoryManager", + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 33, + "llm_answer": "Класс `RuntimeFactoryManager` не найден в предоставленном контексте. \n\nСогласно имеющимся данным, наиболее близкой сущностью является `ControlChannel`, объявленный в файле `base.py`. Однако его описание и работа напрямую не связаны с созданием или управлением фабриками для runtime. Если предполагается наличие класса с таким названием, возможно, он описан в другом модуле или импортируется из внешнего пакета. Рекомендую проверить остальные части проекта или уточнить местоположение данного класса.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "RuntimeFactoryManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": false, + "mismatches": [ + "answer_mode: expected degraded, got answered", + "retrieval: expected empty rag, got 33 rows", + "llm: expected answer to contain 'не найдена'" + ], + "details": { + "query": "Объясни класс RuntimeFactoryManager", + "router_result": { + "schema_version": "1.1", + "intent": "CODE_QA", + "retrieval_profile": "code", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query_plan": { + "raw": "Объясни класс RuntimeFactoryManager", + "normalized": "Объясни класс RuntimeFactoryManager", + "sub_intent": "EXPLAIN", + "negations": [], + "expansions": [ + "RuntimeFactoryManager" + ], + "keyword_hints": [ + "RuntimeFactoryManager" + ], + "path_hints": [], + "doc_scope_hints": [], + "symbol_candidates": [ + "RuntimeFactoryManager" + ], + "symbol_kind_hint": "class", + "anchors": [ + { + "type": "SYMBOL", + "value": "RuntimeFactoryManager", + "source": "user_text", + "subtype": null, + "span": { + "start": 14, + "end": 35 + }, + "confidence": 0.88 + }, + { + "type": "KEY_TERM", + "value": "класс", + "source": "user_text", + "subtype": null, + "span": { + "start": 8, + "end": 13 + }, + "confidence": 0.9 + } + ] + }, + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "top_k": 8 + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 8 + }, + { + "layer_id": "C4_SEMANTIC_ROLES", + "top_k": 8 + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "top_k": 6 + }, + { + "layer_id": "C3_ENTRYPOINTS", + "top_k": 6 + } + ], + "filters": { + "test_policy": "EXCLUDE", + "path_scope": [], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + }, + "symbol_resolution": { + "status": "pending", + "resolved_symbol": null, + "alternatives": [ + "RuntimeFactoryManager" + ], + "confidence": 0.0 + }, + "evidence_policy": { + "require_def": true, + "require_flow": true, + "require_spec": false, + "allow_answer_without_evidence": false + } + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Объясни класс RuntimeFactoryManager", + "sub_intent": "EXPLAIN", + "path_scope": [], + "keyword_hints": [ + "RuntimeFactoryManager" + ], + "symbol_candidates": [ + "RuntimeFactoryManager" + ], + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "top_k": 8 + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 8 + }, + { + "layer_id": "C4_SEMANTIC_ROLES", + "top_k": 8 + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "top_k": 6 + }, + { + "layer_id": "C3_ENTRYPOINTS", + "top_k": 6 + } + ], + "filters": { + "test_policy": "EXCLUDE", + "path_scope": [], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + }, + "query_plan": { + "raw": "Объясни класс RuntimeFactoryManager", + "normalized": "Объясни класс RuntimeFactoryManager", + "sub_intent": "EXPLAIN", + "negations": [], + "expansions": [ + "RuntimeFactoryManager" + ], + "keyword_hints": [ + "RuntimeFactoryManager" + ], + "path_hints": [], + "doc_scope_hints": [], + "symbol_candidates": [ + "RuntimeFactoryManager" + ], + "symbol_kind_hint": "class", + "anchors": [ + { + "type": "SYMBOL", + "value": "RuntimeFactoryManager", + "source": "user_text", + "subtype": null, + "span": { + "start": 14, + "end": 35 + }, + "confidence": 0.88 + }, + { + "type": "KEY_TERM", + "value": "класс", + "source": "user_text", + "subtype": null, + "span": { + "start": 8, + "end": 13 + }, + "confidence": 0.9 + } + ] + } + }, + "retrieval_result": { + "target_symbol_candidates": [ + "ControlChannel", + "ControlChannel.stop", + "ControlActionSet", + "ControlPlaneService", + "ControlChannel.start" + ], + "resolved_symbol": null, + "symbol_resolution_status": "ambiguous", + "file_candidates": [ + "src/app_runtime/control/base.py", + "src/app_runtime/control/__init__.py", + "src/app_runtime/control/http_channel.py", + "src/app_runtime/control/service.py", + "src/app_runtime/control/http_runner.py", + "src/app_runtime/control/http_app.py", + "src/plba/control.py", + "src/app_runtime/workflow/persistence/workflow_persistence.py", + "src/app_runtime/queue/in_memory.py" + ], + "code_chunks": [ + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/base.py", + "title": "ControlChannel", + "content": "class ControlChannel\nControlChannel(ABC)", + "start_line": 21, + "end_line": 28, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "qname": "ControlChannel", + "kind": "class", + "signature": "ControlChannel(ABC)", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/base.py", + "title": "ControlChannel.stop", + "content": "method ControlChannel.stop\nstop(self)\nStop the control channel and release resources.", + "start_line": 27, + "end_line": 28, + "metadata": { + "symbol_id": "54b5adf9866c526836221dc721b474ba23fbec83e1b1d3b8bc4da67ae3c1541d", + "qname": "ControlChannel.stop", + "kind": "method", + "signature": "stop(self)", + "parent_symbol_id": "ControlChannel", + "package_or_module": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/base.py", + "title": "ControlActionSet", + "content": "class ControlActionSet\nControlActionSet", + "start_line": 14, + "end_line": 18, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "qname": "ControlActionSet", + "kind": "class", + "signature": "ControlActionSet", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/__init__.py", + "title": "ControlChannel", + "content": "const ControlChannel\nControlChannel = app_runtime.control.base.ControlChannel", + "start_line": 1, + "end_line": 1, + "metadata": { + "symbol_id": "268420f7aa4ed74082b9276cae0cded4f00bac090ffd58fa020a65be0fe19c27", + "qname": "ControlChannel", + "kind": "const", + "signature": "ControlChannel = app_runtime.control.base.ControlChannel", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/__init__.py", + "title": "ControlPlaneService", + "content": "const ControlPlaneService\nControlPlaneService = app_runtime.control.service.ControlPlaneService", + "start_line": 3, + "end_line": 3, + "metadata": { + "symbol_id": "217e8f044d1c01644bf7b81e5046af9e84469210c692a2fb0c476a19bb069ae1", + "qname": "ControlPlaneService", + "kind": "const", + "signature": "ControlPlaneService = app_runtime.control.service.ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/base.py", + "title": "ControlChannel.start", + "content": "method ControlChannel.start\nstart(self, actions)\nStart the control channel and bind handlers.", + "start_line": 23, + "end_line": 24, + "metadata": { + "symbol_id": "e01e0d50d0f48d0c84c119c989b7a7c57ceea263811ce2605c684ae24d1a03b1", + "qname": "ControlChannel.start", + "kind": "method", + "signature": "start(self, actions)", + "parent_symbol_id": "ControlChannel", + "package_or_module": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/__init__.py", + "title": "ControlActionSet", + "content": "const ControlActionSet\nControlActionSet = app_runtime.control.base.ControlActionSet", + "start_line": 1, + "end_line": 1, + "metadata": { + "symbol_id": "767e4ac0d4224aeccb0783a38359d3c03899a876736eb83d99887c16ea07cc6c", + "qname": "ControlActionSet", + "kind": "const", + "signature": "ControlActionSet = app_runtime.control.base.ControlActionSet", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/http_channel.py", + "title": "ControlActionSet", + "content": "const ControlActionSet\nControlActionSet = app_runtime.control.base.ControlActionSet", + "start_line": 7, + "end_line": 7, + "metadata": { + "symbol_id": "2132a5717c57061e3488a1bf4d43650a60ea903a42278f4d494c014bc80d2df9", + "qname": "ControlActionSet", + "kind": "const", + "signature": "ControlActionSet = app_runtime.control.base.ControlActionSet", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/service.py", + "title": "src/app_runtime/control/service.py:ControlPlaneService", + "content": "class ControlPlaneService:\n def __init__(self) -> None:\n self._channels: list[ControlChannel] = []\n\n def register_channel(self, channel: ControlChannel) -> None:\n self._channels.append(channel)\n\n def start(self, runtime: RuntimeManager) -> None:\n if not self._channels:\n return\n asyncio.run(self._start_async(runtime))\n\n def stop(self) -> None:\n if not self._channels:\n return\n asyncio.run(self._stop_async())\n\n def snapshot(self, runtime: RuntimeManager) -> dict[str, object]:\n health = runtime.current_health()\n return {\n \"runtime\": {\"state\": runtime._state.value},\n \"modules\": list(runtime.registry.modules),\n \"services\": runtime.services.snapshot(),\n \"workers\": runtime.workers.snapshot(),\n \"health\": runtime.health.snapshot(runtime.workers.healths()) | {\"status\": health[\"status\"]},\n \"config\": runtime.configuration.get(),\n }\n\n async def _start_async(self, runtime: RuntimeManager) -> None:\n actions = ControlActionSet(\n health=runtime.health_status,\n start=runtime.start_runtime,\n stop=runtime.stop_runtime,\n status=runtime.runtime_status,\n )\n for channel in self._channels:\n await channel.start(actions)\n\n async def _stop_async(self) -> None:\n for channel in reversed(self._channels):\n await channel.stop()", + "start_line": 12, + "end_line": 52, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/http_runner.py", + "title": "src/app_runtime/control/http_runner.py:UvicornThreadRunner", + "content": "class UvicornThreadRunner:\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._host = host\n self._port = port\n self._timeout = timeout\n self._server: Server | None = None\n self._thread: Thread | None = None\n self._error: BaseException | None = None\n\n async def start(self, app: FastAPI) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._error = None\n config = Config(app=app, host=self._host, port=self._port, log_level=\"warning\")\n self._server = Server(config)\n self._thread = Thread(target=self._serve, name=\"plba-http-control\", daemon=True)\n self._thread.start()\n await self._wait_until_started()\n\n async def stop(self) -> None:\n if self._server is None or self._thread is None:\n return\n self._server.should_exit = True\n await asyncio.to_thread(self._thread.join, self._timeout)\n self._server = None\n self._thread = None\n\n @property\n def port(self) -> int:\n if self._server is None or not getattr(self._server, \"servers\", None):\n return self._port\n socket = self._server.servers[0].sockets[0]\n return int(socket.getsockname()[1])\n\n async def _wait_until_started(self) -> None:\n if self._server is None:\n raise RuntimeError(\"Server is not initialized\")\n deadline = asyncio.get_running_loop().time() + max(float(self._timeout), 1.0)\n while not self._server.started:\n if self._error is not None:\n raise RuntimeError(\"HTTP control server failed to start\") from self._error\n if asyncio.get_running_loop().time() >= deadline:\n raise TimeoutError(\"HTTP control server startup timed out\")\n await asyncio.sleep(0.05)\n\n def _serve(self) -> None:\n if self._server is None:\n return\n try:\n asyncio.run(self._server.serve())\n except BaseException as exc: # noqa: BLE001\n self._error = exc", + "start_line": 10, + "end_line": 61, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_runner", + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/base.py", + "title": "src/app_runtime/control/base.py:ControlChannel", + "content": "class ControlChannel(ABC):\n @abstractmethod\n async def start(self, actions: ControlActionSet) -> None:\n \"\"\"Start the control channel and bind handlers.\"\"\"\n\n @abstractmethod\n async def stop(self) -> None:\n \"\"\"Stop the control channel and release resources.\"\"\"", + "start_line": 21, + "end_line": 28, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/__init__.py", + "title": "src/app_runtime/control/__init__.py:1-5", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\"ControlActionSet\", \"ControlChannel\", \"ControlPlaneService\", \"HttpControlChannel\"]", + "start_line": 1, + "end_line": 5, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/http_app.py", + "title": "src/app_runtime/control/http_app.py:HttpControlAppFactory", + "content": "class HttpControlAppFactory:\n def create(\n self,\n health_provider: Callable[[], Awaitable[HealthPayload]],\n action_provider: Callable[[str, str], Awaitable[JSONResponse]],\n ) -> FastAPI:\n app = FastAPI(title=\"PLBA Control API\")\n\n @app.middleware(\"http\")\n async def log_api_call(request: Request, call_next): # type: ignore[no-untyped-def]\n started = time.monotonic()\n response = await call_next(request)\n response.headers[\"X-Response-Time-Ms\"] = str(int((time.monotonic() - started) * 1000))\n return response\n\n @app.get(\"/health\")\n async def health() -> JSONResponse:\n payload = await health_provider()\n status_code = 200 if payload.get(\"status\") == \"ok\" else 503\n return JSONResponse(content=payload, status_code=status_code)\n\n @app.get(\"/actions/{action}\")\n @app.post(\"/actions/{action}\")\n async def action(action: str, request: Request) -> JSONResponse:\n client_source = self._client_source(request)\n if action in {\"start\", \"stop\"}:\n LOGGER.warning(\"Control action requested: /actions/%s client=%s\", action, client_source)\n return await action_provider(action, client_source)\n\n return app\n\n def _client_source(self, request: Request) -> str:\n explicit_header = request.headers.get(\"X-Client-Source\", \"\").strip()\n if explicit_header:\n return explicit_header\n user_agent = request.headers.get(\"User-Agent\", \"\").strip()\n if user_agent:\n return f\"user-agent:{user_agent}\"\n return \"unknown\"", + "start_line": 15, + "end_line": 53, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/http_channel.py", + "title": "src/app_runtime/control/http_channel.py:HttpControlChannel", + "content": "class HttpControlChannel(ControlChannel):\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._timeout = timeout\n self._runner = UvicornThreadRunner(host, port, timeout)\n self._factory = HttpControlAppFactory()\n self._actions: ControlActionSet | None = None\n\n async def start(self, actions: ControlActionSet) -> None:\n self._actions = actions\n app = self._factory.create(self._health_response, self._action_response)\n await self._runner.start(app)\n\n async def stop(self) -> None:\n await self._runner.stop()\n\n @property\n def port(self) -> int:\n return self._runner.port\n\n async def _health_response(self) -> dict[str, object]:\n if self._actions is None:\n return {\"status\": \"unhealthy\", \"detail\": \"control actions are not configured\"}\n return await asyncio.wait_for(self._actions.health(), timeout=float(self._timeout))\n\n async def _action_response(self, action: str, _client_source: str = \"unknown\") -> JSONResponse:\n if self._actions is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"{action} handler is not configured\"}, status_code=404)\n callbacks = {\n \"start\": self._actions.start,\n \"stop\": self._actions.stop,\n \"status\": self._actions.status,\n }\n callback = callbacks.get(action)\n if callback is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"unsupported action: {action}\"}, status_code=404)\n action_timeout = max(float(self._timeout), 10.0) if action in {\"start\", \"stop\"} else float(self._timeout)\n try:\n detail = await asyncio.wait_for(callback(), timeout=action_timeout)\n except asyncio.TimeoutError:\n return JSONResponse(\n content={\"status\": \"accepted\", \"detail\": f\"{action} operation is still in progress\"},\n status_code=202,\n )\n except Exception as exc:\n return JSONResponse(content={\"status\": \"error\", \"detail\": str(exc)}, status_code=500)\n return JSONResponse(content={\"status\": \"ok\", \"detail\": detail or f\"{action} action accepted\"}, status_code=200)", + "start_line": 12, + "end_line": 57, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/base.py", + "title": "src/app_runtime/control/base.py:ControlActionSet", + "content": "class ControlActionSet:\n health: HealthHandler\n start: ActionHandler\n stop: ActionHandler\n status: ActionHandler", + "start_line": 14, + "end_line": 18, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/plba/control.py", + "title": "src/plba/control.py:1-10", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\n \"ControlActionSet\",\n \"ControlChannel\",\n \"ControlPlaneService\",\n \"HttpControlChannel\",\n]", + "start_line": 1, + "end_line": 10, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.control", + "is_test": false, + "blob_sha": "31bd5c4481bfa7fbca8fae56d4860a67e3953ca74474ac8439e1f39b685d7bc8", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/base.py", + "title": "ControlActionSet", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "start_line": 14, + "end_line": 18, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/base.py", + "title": "ControlChannel", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "start_line": 21, + "end_line": 28, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "start_line": 12, + "end_line": 52, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/http_runner.py", + "title": "UvicornThreadRunner", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "start_line": 10, + "end_line": 61, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/http_channel.py", + "title": "HttpControlChannel", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "start_line": 12, + "end_line": 57, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/http_app.py", + "title": "HttpControlAppFactory", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "start_line": 15, + "end_line": 53, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "title": "WorkflowPersistence", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "start_line": 8, + "end_line": 54, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/queue/in_memory.py", + "title": "InMemoryTaskQueue", + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)", + "start_line": 9, + "end_line": 38, + "metadata": { + "symbol_id": "2da04cb94544a3bcbf0943a95ad4bdd8710bcafaa32a02fd0e4de2178dcf3533", + "symbol_name": "InMemoryTaskQueue", + "qname": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 9, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "58f0cc001ccda0eee4c6bc32ed83bd05eafd6b6644f1e8b4aa9eed3103db73dc", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "start_line": 14, + "end_line": 25, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "start_line": 14, + "end_line": 51, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "start_line": 14, + "end_line": 17, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "start_line": 14, + "end_line": 20, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "start_line": 14, + "end_line": 47, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.register_channel:reads_attr", + "content": "ControlPlaneService.register_channel reads_attr self._channels.append", + "start_line": 17, + "end_line": 17, + "metadata": { + "edge_id": "1ee5925deffdc38ba15b88bf7c89e5fcd1a78f493fe30f2deb827d714a1b18e8", + "edge_type": "reads_attr", + "src_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "src_qname": "ControlPlaneService.register_channel", + "dst_symbol_id": null, + "dst_ref": "self._channels.append", + "resolution": "partial", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C3_ENTRYPOINTS", + "path": "src/app_runtime/control/http_app.py", + "title": "app.post", + "content": "fastapi http app.post", + "start_line": 38, + "end_line": 42, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C3_ENTRYPOINTS", + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "content": "fastapi http app.get", + "start_line": 31, + "end_line": 34, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C3_ENTRYPOINTS", + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "content": "fastapi http app.get", + "start_line": 38, + "end_line": 42, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "relations": [ + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop" + }, + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async" + }, + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel" + }, + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start" + }, + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async" + }, + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "1ee5925deffdc38ba15b88bf7c89e5fcd1a78f493fe30f2deb827d714a1b18e8", + "edge_type": "reads_attr", + "src_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "src_qname": "ControlPlaneService.register_channel", + "dst_symbol_id": null, + "dst_ref": "self._channels.append", + "resolution": "partial", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.register_channel reads_attr self._channels.append" + } + ], + "entrypoints": [ + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.post", + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "test_candidates": [], + "layer_outcomes": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C4_SEMANTIC_ROLES", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 6, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C3_ENTRYPOINTS", + "hit_count": 3, + "empty": false, + "fallback_used": false + } + ], + "missing_layers": [], + "raw_rows": [ + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlChannel\nControlChannel(ABC)", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "qname": "ControlChannel", + "kind": "class", + "signature": "ControlChannel(ABC)", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "method ControlChannel.stop\nstop(self)\nStop the control channel and release resources.", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlChannel.stop", + "span_start": 27, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "54b5adf9866c526836221dc721b474ba23fbec83e1b1d3b8bc4da67ae3c1541d", + "qname": "ControlChannel.stop", + "kind": "method", + "signature": "stop(self)", + "parent_symbol_id": "ControlChannel", + "package_or_module": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlActionSet\nControlActionSet", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "qname": "ControlActionSet", + "kind": "class", + "signature": "ControlActionSet", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "const ControlChannel\nControlChannel = app_runtime.control.base.ControlChannel", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlChannel", + "span_start": 1, + "span_end": 1, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "268420f7aa4ed74082b9276cae0cded4f00bac090ffd58fa020a65be0fe19c27", + "qname": "ControlChannel", + "kind": "const", + "signature": "ControlChannel = app_runtime.control.base.ControlChannel", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "const ControlPlaneService\nControlPlaneService = app_runtime.control.service.ControlPlaneService", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlPlaneService", + "span_start": 3, + "span_end": 3, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "217e8f044d1c01644bf7b81e5046af9e84469210c692a2fb0c476a19bb069ae1", + "qname": "ControlPlaneService", + "kind": "const", + "signature": "ControlPlaneService = app_runtime.control.service.ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "method ControlChannel.start\nstart(self, actions)\nStart the control channel and bind handlers.", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlChannel.start", + "span_start": 23, + "span_end": 24, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "e01e0d50d0f48d0c84c119c989b7a7c57ceea263811ce2605c684ae24d1a03b1", + "qname": "ControlChannel.start", + "kind": "method", + "signature": "start(self, actions)", + "parent_symbol_id": "ControlChannel", + "package_or_module": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "const ControlActionSet\nControlActionSet = app_runtime.control.base.ControlActionSet", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlActionSet", + "span_start": 1, + "span_end": 1, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "767e4ac0d4224aeccb0783a38359d3c03899a876736eb83d99887c16ea07cc6c", + "qname": "ControlActionSet", + "kind": "const", + "signature": "ControlActionSet = app_runtime.control.base.ControlActionSet", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "const ControlActionSet\nControlActionSet = app_runtime.control.base.ControlActionSet", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlActionSet", + "span_start": 7, + "span_end": 7, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "2132a5717c57061e3488a1bf4d43650a60ea903a42278f4d494c014bc80d2df9", + "qname": "ControlActionSet", + "kind": "const", + "signature": "ControlActionSet = app_runtime.control.base.ControlActionSet", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "class ControlPlaneService:\n def __init__(self) -> None:\n self._channels: list[ControlChannel] = []\n\n def register_channel(self, channel: ControlChannel) -> None:\n self._channels.append(channel)\n\n def start(self, runtime: RuntimeManager) -> None:\n if not self._channels:\n return\n asyncio.run(self._start_async(runtime))\n\n def stop(self) -> None:\n if not self._channels:\n return\n asyncio.run(self._stop_async())\n\n def snapshot(self, runtime: RuntimeManager) -> dict[str, object]:\n health = runtime.current_health()\n return {\n \"runtime\": {\"state\": runtime._state.value},\n \"modules\": list(runtime.registry.modules),\n \"services\": runtime.services.snapshot(),\n \"workers\": runtime.workers.snapshot(),\n \"health\": runtime.health.snapshot(runtime.workers.healths()) | {\"status\": health[\"status\"]},\n \"config\": runtime.configuration.get(),\n }\n\n async def _start_async(self, runtime: RuntimeManager) -> None:\n actions = ControlActionSet(\n health=runtime.health_status,\n start=runtime.start_runtime,\n stop=runtime.stop_runtime,\n status=runtime.runtime_status,\n )\n for channel in self._channels:\n await channel.start(actions)\n\n async def _stop_async(self) -> None:\n for channel in reversed(self._channels):\n await channel.stop()", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/service.py:ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "class UvicornThreadRunner:\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._host = host\n self._port = port\n self._timeout = timeout\n self._server: Server | None = None\n self._thread: Thread | None = None\n self._error: BaseException | None = None\n\n async def start(self, app: FastAPI) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._error = None\n config = Config(app=app, host=self._host, port=self._port, log_level=\"warning\")\n self._server = Server(config)\n self._thread = Thread(target=self._serve, name=\"plba-http-control\", daemon=True)\n self._thread.start()\n await self._wait_until_started()\n\n async def stop(self) -> None:\n if self._server is None or self._thread is None:\n return\n self._server.should_exit = True\n await asyncio.to_thread(self._thread.join, self._timeout)\n self._server = None\n self._thread = None\n\n @property\n def port(self) -> int:\n if self._server is None or not getattr(self._server, \"servers\", None):\n return self._port\n socket = self._server.servers[0].sockets[0]\n return int(socket.getsockname()[1])\n\n async def _wait_until_started(self) -> None:\n if self._server is None:\n raise RuntimeError(\"Server is not initialized\")\n deadline = asyncio.get_running_loop().time() + max(float(self._timeout), 1.0)\n while not self._server.started:\n if self._error is not None:\n raise RuntimeError(\"HTTP control server failed to start\") from self._error\n if asyncio.get_running_loop().time() >= deadline:\n raise TimeoutError(\"HTTP control server startup timed out\")\n await asyncio.sleep(0.05)\n\n def _serve(self) -> None:\n if self._server is None:\n return\n try:\n asyncio.run(self._server.serve())\n except BaseException as exc: # noqa: BLE001\n self._error = exc", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_runner.py:UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_runner", + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlChannel(ABC):\n @abstractmethod\n async def start(self, actions: ControlActionSet) -> None:\n \"\"\"Start the control channel and bind handlers.\"\"\"\n\n @abstractmethod\n async def stop(self) -> None:\n \"\"\"Stop the control channel and release resources.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\"ControlActionSet\", \"ControlChannel\", \"ControlPlaneService\", \"HttpControlChannel\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/__init__.py:1-5", + "span_start": 1, + "span_end": 5, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "class HttpControlAppFactory:\n def create(\n self,\n health_provider: Callable[[], Awaitable[HealthPayload]],\n action_provider: Callable[[str, str], Awaitable[JSONResponse]],\n ) -> FastAPI:\n app = FastAPI(title=\"PLBA Control API\")\n\n @app.middleware(\"http\")\n async def log_api_call(request: Request, call_next): # type: ignore[no-untyped-def]\n started = time.monotonic()\n response = await call_next(request)\n response.headers[\"X-Response-Time-Ms\"] = str(int((time.monotonic() - started) * 1000))\n return response\n\n @app.get(\"/health\")\n async def health() -> JSONResponse:\n payload = await health_provider()\n status_code = 200 if payload.get(\"status\") == \"ok\" else 503\n return JSONResponse(content=payload, status_code=status_code)\n\n @app.get(\"/actions/{action}\")\n @app.post(\"/actions/{action}\")\n async def action(action: str, request: Request) -> JSONResponse:\n client_source = self._client_source(request)\n if action in {\"start\", \"stop\"}:\n LOGGER.warning(\"Control action requested: /actions/%s client=%s\", action, client_source)\n return await action_provider(action, client_source)\n\n return app\n\n def _client_source(self, request: Request) -> str:\n explicit_header = request.headers.get(\"X-Client-Source\", \"\").strip()\n if explicit_header:\n return explicit_header\n user_agent = request.headers.get(\"User-Agent\", \"\").strip()\n if user_agent:\n return f\"user-agent:{user_agent}\"\n return \"unknown\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_app.py:HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel(ControlChannel):\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._timeout = timeout\n self._runner = UvicornThreadRunner(host, port, timeout)\n self._factory = HttpControlAppFactory()\n self._actions: ControlActionSet | None = None\n\n async def start(self, actions: ControlActionSet) -> None:\n self._actions = actions\n app = self._factory.create(self._health_response, self._action_response)\n await self._runner.start(app)\n\n async def stop(self) -> None:\n await self._runner.stop()\n\n @property\n def port(self) -> int:\n return self._runner.port\n\n async def _health_response(self) -> dict[str, object]:\n if self._actions is None:\n return {\"status\": \"unhealthy\", \"detail\": \"control actions are not configured\"}\n return await asyncio.wait_for(self._actions.health(), timeout=float(self._timeout))\n\n async def _action_response(self, action: str, _client_source: str = \"unknown\") -> JSONResponse:\n if self._actions is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"{action} handler is not configured\"}, status_code=404)\n callbacks = {\n \"start\": self._actions.start,\n \"stop\": self._actions.stop,\n \"status\": self._actions.status,\n }\n callback = callbacks.get(action)\n if callback is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"unsupported action: {action}\"}, status_code=404)\n action_timeout = max(float(self._timeout), 10.0) if action in {\"start\", \"stop\"} else float(self._timeout)\n try:\n detail = await asyncio.wait_for(callback(), timeout=action_timeout)\n except asyncio.TimeoutError:\n return JSONResponse(\n content={\"status\": \"accepted\", \"detail\": f\"{action} operation is still in progress\"},\n status_code=202,\n )\n except Exception as exc:\n return JSONResponse(content={\"status\": \"error\", \"detail\": str(exc)}, status_code=500)\n return JSONResponse(content={\"status\": \"ok\", \"detail\": detail or f\"{action} action accepted\"}, status_code=200)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_channel.py:HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlActionSet:\n health: HealthHandler\n start: ActionHandler\n stop: ActionHandler\n status: ActionHandler", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/control.py", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\n \"ControlActionSet\",\n \"ControlChannel\",\n \"ControlPlaneService\",\n \"HttpControlChannel\",\n]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/control.py:1-10", + "span_start": 1, + "span_end": 10, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.control", + "is_test": false, + "blob_sha": "31bd5c4481bfa7fbca8fae56d4860a67e3953ca74474ac8439e1f39b685d7bc8", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/queue/in_memory.py", + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)", + "layer": "C4_SEMANTIC_ROLES", + "title": "InMemoryTaskQueue", + "span_start": 9, + "span_end": 38, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 22, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "2da04cb94544a3bcbf0943a95ad4bdd8710bcafaa32a02fd0e4de2178dcf3533", + "symbol_name": "InMemoryTaskQueue", + "qname": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 9, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "58f0cc001ccda0eee4c6bc32ed83bd05eafd6b6644f1e8b4aa9eed3103db73dc", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.register_channel reads_attr self._channels.append", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.register_channel:reads_attr", + "span_start": 17, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "1ee5925deffdc38ba15b88bf7c89e5fcd1a78f493fe30f2deb827d714a1b18e8", + "edge_type": "reads_attr", + "src_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "src_qname": "ControlPlaneService.register_channel", + "dst_symbol_id": null, + "dst_ref": "self._channels.append", + "resolution": "partial", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": null, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": null, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": null, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "retrieval_report": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "vector", + "C0_SOURCE_CHUNKS": "vector", + "C4_SEMANTIC_ROLES": "vector", + "C2_DEPENDENCY_GRAPH": "vector", + "C3_ENTRYPOINTS": "vector" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [] + } + }, + "fallback": { + "used": false, + "reason": null + }, + "retrieval_by_layer_ms": { + "C1_SYMBOL_CATALOG": 64, + "C0_SOURCE_CHUNKS": 24, + "C4_SEMANTIC_ROLES": 16, + "C2_DEPENDENCY_GRAPH": 56, + "C3_ENTRYPOINTS": 12 + } + } + }, + "diagnostics": { + "intent_correct": null, + "target_found": true, + "layers_used": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_sufficient": true, + "answer_mode": "normal", + "router_result": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "EXPLAIN", + "path_scope": [], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_resolution_status": "pending" + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Объясни класс RuntimeFactoryManager", + "sub_intent": "EXPLAIN", + "path_scope": [], + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C4_SEMANTIC_ROLES", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 6, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C3_ENTRYPOINTS", + "hit_count": 3, + "empty": false, + "fallback_used": false + } + ], + "empty_layers": [], + "evidence_gate_decision": { + "sufficient": true, + "failure_reasons": [], + "evidence_count": 33 + }, + "failure_reasons": [], + "timings_ms": {} + }, + "rag_rows": [ + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlChannel\nControlChannel(ABC)", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "qname": "ControlChannel", + "kind": "class", + "signature": "ControlChannel(ABC)", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "method ControlChannel.stop\nstop(self)\nStop the control channel and release resources.", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlChannel.stop", + "span_start": 27, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "54b5adf9866c526836221dc721b474ba23fbec83e1b1d3b8bc4da67ae3c1541d", + "qname": "ControlChannel.stop", + "kind": "method", + "signature": "stop(self)", + "parent_symbol_id": "ControlChannel", + "package_or_module": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlActionSet\nControlActionSet", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "qname": "ControlActionSet", + "kind": "class", + "signature": "ControlActionSet", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "const ControlChannel\nControlChannel = app_runtime.control.base.ControlChannel", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlChannel", + "span_start": 1, + "span_end": 1, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "268420f7aa4ed74082b9276cae0cded4f00bac090ffd58fa020a65be0fe19c27", + "qname": "ControlChannel", + "kind": "const", + "signature": "ControlChannel = app_runtime.control.base.ControlChannel", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "const ControlPlaneService\nControlPlaneService = app_runtime.control.service.ControlPlaneService", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlPlaneService", + "span_start": 3, + "span_end": 3, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "217e8f044d1c01644bf7b81e5046af9e84469210c692a2fb0c476a19bb069ae1", + "qname": "ControlPlaneService", + "kind": "const", + "signature": "ControlPlaneService = app_runtime.control.service.ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "method ControlChannel.start\nstart(self, actions)\nStart the control channel and bind handlers.", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlChannel.start", + "span_start": 23, + "span_end": 24, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "e01e0d50d0f48d0c84c119c989b7a7c57ceea263811ce2605c684ae24d1a03b1", + "qname": "ControlChannel.start", + "kind": "method", + "signature": "start(self, actions)", + "parent_symbol_id": "ControlChannel", + "package_or_module": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "const ControlActionSet\nControlActionSet = app_runtime.control.base.ControlActionSet", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlActionSet", + "span_start": 1, + "span_end": 1, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "767e4ac0d4224aeccb0783a38359d3c03899a876736eb83d99887c16ea07cc6c", + "qname": "ControlActionSet", + "kind": "const", + "signature": "ControlActionSet = app_runtime.control.base.ControlActionSet", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "const ControlActionSet\nControlActionSet = app_runtime.control.base.ControlActionSet", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlActionSet", + "span_start": 7, + "span_end": 7, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "2132a5717c57061e3488a1bf4d43650a60ea903a42278f4d494c014bc80d2df9", + "qname": "ControlActionSet", + "kind": "const", + "signature": "ControlActionSet = app_runtime.control.base.ControlActionSet", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "class ControlPlaneService:\n def __init__(self) -> None:\n self._channels: list[ControlChannel] = []\n\n def register_channel(self, channel: ControlChannel) -> None:\n self._channels.append(channel)\n\n def start(self, runtime: RuntimeManager) -> None:\n if not self._channels:\n return\n asyncio.run(self._start_async(runtime))\n\n def stop(self) -> None:\n if not self._channels:\n return\n asyncio.run(self._stop_async())\n\n def snapshot(self, runtime: RuntimeManager) -> dict[str, object]:\n health = runtime.current_health()\n return {\n \"runtime\": {\"state\": runtime._state.value},\n \"modules\": list(runtime.registry.modules),\n \"services\": runtime.services.snapshot(),\n \"workers\": runtime.workers.snapshot(),\n \"health\": runtime.health.snapshot(runtime.workers.healths()) | {\"status\": health[\"status\"]},\n \"config\": runtime.configuration.get(),\n }\n\n async def _start_async(self, runtime: RuntimeManager) -> None:\n actions = ControlActionSet(\n health=runtime.health_status,\n start=runtime.start_runtime,\n stop=runtime.stop_runtime,\n status=runtime.runtime_status,\n )\n for channel in self._channels:\n await channel.start(actions)\n\n async def _stop_async(self) -> None:\n for channel in reversed(self._channels):\n await channel.stop()", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/service.py:ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "class UvicornThreadRunner:\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._host = host\n self._port = port\n self._timeout = timeout\n self._server: Server | None = None\n self._thread: Thread | None = None\n self._error: BaseException | None = None\n\n async def start(self, app: FastAPI) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._error = None\n config = Config(app=app, host=self._host, port=self._port, log_level=\"warning\")\n self._server = Server(config)\n self._thread = Thread(target=self._serve, name=\"plba-http-control\", daemon=True)\n self._thread.start()\n await self._wait_until_started()\n\n async def stop(self) -> None:\n if self._server is None or self._thread is None:\n return\n self._server.should_exit = True\n await asyncio.to_thread(self._thread.join, self._timeout)\n self._server = None\n self._thread = None\n\n @property\n def port(self) -> int:\n if self._server is None or not getattr(self._server, \"servers\", None):\n return self._port\n socket = self._server.servers[0].sockets[0]\n return int(socket.getsockname()[1])\n\n async def _wait_until_started(self) -> None:\n if self._server is None:\n raise RuntimeError(\"Server is not initialized\")\n deadline = asyncio.get_running_loop().time() + max(float(self._timeout), 1.0)\n while not self._server.started:\n if self._error is not None:\n raise RuntimeError(\"HTTP control server failed to start\") from self._error\n if asyncio.get_running_loop().time() >= deadline:\n raise TimeoutError(\"HTTP control server startup timed out\")\n await asyncio.sleep(0.05)\n\n def _serve(self) -> None:\n if self._server is None:\n return\n try:\n asyncio.run(self._server.serve())\n except BaseException as exc: # noqa: BLE001\n self._error = exc", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_runner.py:UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_runner", + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlChannel(ABC):\n @abstractmethod\n async def start(self, actions: ControlActionSet) -> None:\n \"\"\"Start the control channel and bind handlers.\"\"\"\n\n @abstractmethod\n async def stop(self) -> None:\n \"\"\"Stop the control channel and release resources.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\"ControlActionSet\", \"ControlChannel\", \"ControlPlaneService\", \"HttpControlChannel\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/__init__.py:1-5", + "span_start": 1, + "span_end": 5, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "class HttpControlAppFactory:\n def create(\n self,\n health_provider: Callable[[], Awaitable[HealthPayload]],\n action_provider: Callable[[str, str], Awaitable[JSONResponse]],\n ) -> FastAPI:\n app = FastAPI(title=\"PLBA Control API\")\n\n @app.middleware(\"http\")\n async def log_api_call(request: Request, call_next): # type: ignore[no-untyped-def]\n started = time.monotonic()\n response = await call_next(request)\n response.headers[\"X-Response-Time-Ms\"] = str(int((time.monotonic() - started) * 1000))\n return response\n\n @app.get(\"/health\")\n async def health() -> JSONResponse:\n payload = await health_provider()\n status_code = 200 if payload.get(\"status\") == \"ok\" else 503\n return JSONResponse(content=payload, status_code=status_code)\n\n @app.get(\"/actions/{action}\")\n @app.post(\"/actions/{action}\")\n async def action(action: str, request: Request) -> JSONResponse:\n client_source = self._client_source(request)\n if action in {\"start\", \"stop\"}:\n LOGGER.warning(\"Control action requested: /actions/%s client=%s\", action, client_source)\n return await action_provider(action, client_source)\n\n return app\n\n def _client_source(self, request: Request) -> str:\n explicit_header = request.headers.get(\"X-Client-Source\", \"\").strip()\n if explicit_header:\n return explicit_header\n user_agent = request.headers.get(\"User-Agent\", \"\").strip()\n if user_agent:\n return f\"user-agent:{user_agent}\"\n return \"unknown\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_app.py:HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel(ControlChannel):\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._timeout = timeout\n self._runner = UvicornThreadRunner(host, port, timeout)\n self._factory = HttpControlAppFactory()\n self._actions: ControlActionSet | None = None\n\n async def start(self, actions: ControlActionSet) -> None:\n self._actions = actions\n app = self._factory.create(self._health_response, self._action_response)\n await self._runner.start(app)\n\n async def stop(self) -> None:\n await self._runner.stop()\n\n @property\n def port(self) -> int:\n return self._runner.port\n\n async def _health_response(self) -> dict[str, object]:\n if self._actions is None:\n return {\"status\": \"unhealthy\", \"detail\": \"control actions are not configured\"}\n return await asyncio.wait_for(self._actions.health(), timeout=float(self._timeout))\n\n async def _action_response(self, action: str, _client_source: str = \"unknown\") -> JSONResponse:\n if self._actions is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"{action} handler is not configured\"}, status_code=404)\n callbacks = {\n \"start\": self._actions.start,\n \"stop\": self._actions.stop,\n \"status\": self._actions.status,\n }\n callback = callbacks.get(action)\n if callback is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"unsupported action: {action}\"}, status_code=404)\n action_timeout = max(float(self._timeout), 10.0) if action in {\"start\", \"stop\"} else float(self._timeout)\n try:\n detail = await asyncio.wait_for(callback(), timeout=action_timeout)\n except asyncio.TimeoutError:\n return JSONResponse(\n content={\"status\": \"accepted\", \"detail\": f\"{action} operation is still in progress\"},\n status_code=202,\n )\n except Exception as exc:\n return JSONResponse(content={\"status\": \"error\", \"detail\": str(exc)}, status_code=500)\n return JSONResponse(content={\"status\": \"ok\", \"detail\": detail or f\"{action} action accepted\"}, status_code=200)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_channel.py:HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlActionSet:\n health: HealthHandler\n start: ActionHandler\n stop: ActionHandler\n status: ActionHandler", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/control.py", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\n \"ControlActionSet\",\n \"ControlChannel\",\n \"ControlPlaneService\",\n \"HttpControlChannel\",\n]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/control.py:1-10", + "span_start": 1, + "span_end": 10, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.control", + "is_test": false, + "blob_sha": "31bd5c4481bfa7fbca8fae56d4860a67e3953ca74474ac8439e1f39b685d7bc8", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/queue/in_memory.py", + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)", + "layer": "C4_SEMANTIC_ROLES", + "title": "InMemoryTaskQueue", + "span_start": 9, + "span_end": 38, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 22, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "2da04cb94544a3bcbf0943a95ad4bdd8710bcafaa32a02fd0e4de2178dcf3533", + "symbol_name": "InMemoryTaskQueue", + "qname": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 9, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "58f0cc001ccda0eee4c6bc32ed83bd05eafd6b6644f1e8b4aa9eed3103db73dc", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.register_channel reads_attr self._channels.append", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.register_channel:reads_attr", + "span_start": 17, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "1ee5925deffdc38ba15b88bf7c89e5fcd1a78f493fe30f2deb827d714a1b18e8", + "edge_type": "reads_attr", + "src_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "src_qname": "ControlPlaneService.register_channel", + "dst_symbol_id": null, + "dst_ref": "self._channels.append", + "resolution": "partial", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "validation": { + "passed": true, + "action": "return", + "reasons": [] + } + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-explain-nonexistent-symbol.md b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-explain-nonexistent-symbol.md new file mode 100644 index 0000000..8858984 --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-explain-nonexistent-symbol.md @@ -0,0 +1,36 @@ +# plba-v2-explain-nonexistent-symbol + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: agent_runtime +- mode: full_chain +- passed: False + +## Query +Объясни класс RuntimeFactoryManager + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 33, + "llm_answer": "Класс `RuntimeFactoryManager` не найден в предоставленном контексте. \n\nСогласно имеющимся данным, наиболее близкой сущностью является `ControlChannel`, объявленный в файле `base.py`. Однако его описание и работа напрямую не связаны с созданием или управлением фабриками для runtime. Если предполагается наличие класса с таким названием, возможно, он описан в другом модуле или импортируется из внешнего пакета. Рекомендую проверить остальные части проекта или уточнить местоположение данного класса.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "RuntimeFactoryManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] +} + +## Mismatches +- answer_mode: expected degraded, got answered +- retrieval: expected empty rag, got 33 rows +- llm: expected answer to contain 'не найдена' \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-explain-runtime-manager.json b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-explain-runtime-manager.json new file mode 100644 index 0000000..40431cb --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-explain-runtime-manager.json @@ -0,0 +1,4154 @@ +{ + "case_id": "plba-v2-explain-runtime-manager", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "agent_runtime", + "mode": "full_chain", + "query": "Объясни как работает класс RuntimeManager", + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 33, + "llm_answer": "Класс `RuntimeManager` определен в файле `src/app_runtime/core/runtime.py`, начиная с строки 18. Из доступных контекстных данных напрямую невозможно точно описать его работу, так как отсутствует подробная реализация или вызовы этого класса.\n\nТем не менее, можно сделать осторожные выводы:\n\n- Класс играет роль менеджера и управляет состоянием выполнения приложения.\n- Вероятно, он участвует в координации различных компонентов и служб через атрибуты и методы, такие как чтение и запись состояния (`configuration`, `add_config_file`), а также участие в срезах данных потока выполнения (`participates in dataflow slices`).\n- На основании имеющихся свидетельств сложно точно понять, какие конкретно действия выполняет этот класс при инициализации и во время своей работы.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "query": "Объясни как работает класс RuntimeManager", + "router_result": { + "schema_version": "1.1", + "intent": "CODE_QA", + "retrieval_profile": "code", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query_plan": { + "raw": "Объясни как работает класс RuntimeManager", + "normalized": "Объясни как работает класс RuntimeManager", + "sub_intent": "EXPLAIN", + "negations": [], + "expansions": [ + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "doc_scope_hints": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "symbol_kind_hint": "class", + "anchors": [ + { + "type": "SYMBOL", + "value": "RuntimeManager", + "source": "user_text", + "subtype": null, + "span": { + "start": 27, + "end": 41 + }, + "confidence": 0.88 + }, + { + "type": "KEY_TERM", + "value": "класс", + "source": "user_text", + "subtype": null, + "span": { + "start": 21, + "end": 26 + }, + "confidence": 0.9 + } + ] + }, + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "top_k": 8 + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 8 + }, + { + "layer_id": "C4_SEMANTIC_ROLES", + "top_k": 8 + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "top_k": 6 + }, + { + "layer_id": "C3_ENTRYPOINTS", + "top_k": 6 + } + ], + "filters": { + "test_policy": "EXCLUDE", + "path_scope": [], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + }, + "symbol_resolution": { + "status": "pending", + "resolved_symbol": null, + "alternatives": [ + "RuntimeManager" + ], + "confidence": 0.0 + }, + "evidence_policy": { + "require_def": true, + "require_flow": true, + "require_spec": false, + "allow_answer_without_evidence": false + } + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Объясни как работает класс RuntimeManager", + "sub_intent": "EXPLAIN", + "path_scope": [], + "keyword_hints": [ + "RuntimeManager" + ], + "symbol_candidates": [ + "RuntimeManager" + ], + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "top_k": 8 + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 8 + }, + { + "layer_id": "C4_SEMANTIC_ROLES", + "top_k": 8 + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "top_k": 6 + }, + { + "layer_id": "C3_ENTRYPOINTS", + "top_k": 6 + } + ], + "filters": { + "test_policy": "EXCLUDE", + "path_scope": [], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + }, + "query_plan": { + "raw": "Объясни как работает класс RuntimeManager", + "normalized": "Объясни как работает класс RuntimeManager", + "sub_intent": "EXPLAIN", + "negations": [], + "expansions": [ + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "doc_scope_hints": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "symbol_kind_hint": "class", + "anchors": [ + { + "type": "SYMBOL", + "value": "RuntimeManager", + "source": "user_text", + "subtype": null, + "span": { + "start": 27, + "end": 41 + }, + "confidence": 0.88 + }, + { + "type": "KEY_TERM", + "value": "класс", + "source": "user_text", + "subtype": null, + "span": { + "start": 21, + "end": 26 + }, + "confidence": 0.9 + } + ] + } + }, + "retrieval_result": { + "target_symbol_candidates": [ + "RuntimeManager", + "ControlPlaneService", + "ControlChannel.start", + "ControlChannel.stop" + ], + "resolved_symbol": "RuntimeManager", + "symbol_resolution_status": "resolved", + "file_candidates": [ + "src/plba/bootstrap.py", + "src/app_runtime/control/service.py", + "src/app_runtime/core/runtime.py", + "src/plba/__init__.py", + "src/plba/core.py", + "src/app_runtime/control/__init__.py", + "src/app_runtime/control/base.py", + "src/app_runtime/control/http_runner.py", + "src/app_runtime/control/http_app.py", + "src/app_runtime/control/http_channel.py", + "src/plba/control.py", + "src/app_runtime/workflow/persistence/workflow_persistence.py" + ], + "code_chunks": [ + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/plba/bootstrap.py", + "title": "RuntimeManager", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "start_line": 4, + "end_line": 4, + "metadata": { + "symbol_id": "27158ca220022eeb5083c6addf8a50775d45f7161284fd60aac48410105f4b98", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/service.py", + "title": "RuntimeManager", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "start_line": 9, + "end_line": 9, + "metadata": { + "symbol_id": "62a9575c77aad894120d18b4f2a08cf2ba42f77e9be4a8a432b767d157701afe", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/core/runtime.py", + "title": "RuntimeManager", + "content": "class RuntimeManager\nRuntimeManager", + "start_line": 18, + "end_line": 179, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "qname": "RuntimeManager", + "kind": "class", + "signature": "RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/plba/__init__.py", + "title": "RuntimeManager", + "content": "const RuntimeManager\nRuntimeManager = plba.core.RuntimeManager", + "start_line": 16, + "end_line": 16, + "metadata": { + "symbol_id": "7eacec84f9b8d6c4201374591faecdac7493091c263681495c338973f2971ad9", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = plba.core.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/plba/core.py", + "title": "RuntimeManager", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "start_line": 2, + "end_line": 2, + "metadata": { + "symbol_id": "e1684562d978b7af7fe9b27dc5869d770348a87b5dc19a50360f58544668578b", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.core", + "is_test": false, + "blob_sha": "c0ae25110d20e665216616e26b68adfe035b624ba45d31d1272fb21f906f9ca8", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/__init__.py", + "title": "ControlPlaneService", + "content": "const ControlPlaneService\nControlPlaneService = app_runtime.control.service.ControlPlaneService", + "start_line": 3, + "end_line": 3, + "metadata": { + "symbol_id": "217e8f044d1c01644bf7b81e5046af9e84469210c692a2fb0c476a19bb069ae1", + "qname": "ControlPlaneService", + "kind": "const", + "signature": "ControlPlaneService = app_runtime.control.service.ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/base.py", + "title": "ControlChannel.start", + "content": "method ControlChannel.start\nstart(self, actions)\nStart the control channel and bind handlers.", + "start_line": 23, + "end_line": 24, + "metadata": { + "symbol_id": "e01e0d50d0f48d0c84c119c989b7a7c57ceea263811ce2605c684ae24d1a03b1", + "qname": "ControlChannel.start", + "kind": "method", + "signature": "start(self, actions)", + "parent_symbol_id": "ControlChannel", + "package_or_module": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/base.py", + "title": "ControlChannel.stop", + "content": "method ControlChannel.stop\nstop(self)\nStop the control channel and release resources.", + "start_line": 27, + "end_line": 28, + "metadata": { + "symbol_id": "54b5adf9866c526836221dc721b474ba23fbec83e1b1d3b8bc4da67ae3c1541d", + "qname": "ControlChannel.stop", + "kind": "method", + "signature": "stop(self)", + "parent_symbol_id": "ControlChannel", + "package_or_module": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/service.py", + "title": "src/app_runtime/control/service.py:ControlPlaneService", + "content": "class ControlPlaneService:\n def __init__(self) -> None:\n self._channels: list[ControlChannel] = []\n\n def register_channel(self, channel: ControlChannel) -> None:\n self._channels.append(channel)\n\n def start(self, runtime: RuntimeManager) -> None:\n if not self._channels:\n return\n asyncio.run(self._start_async(runtime))\n\n def stop(self) -> None:\n if not self._channels:\n return\n asyncio.run(self._stop_async())\n\n def snapshot(self, runtime: RuntimeManager) -> dict[str, object]:\n health = runtime.current_health()\n return {\n \"runtime\": {\"state\": runtime._state.value},\n \"modules\": list(runtime.registry.modules),\n \"services\": runtime.services.snapshot(),\n \"workers\": runtime.workers.snapshot(),\n \"health\": runtime.health.snapshot(runtime.workers.healths()) | {\"status\": health[\"status\"]},\n \"config\": runtime.configuration.get(),\n }\n\n async def _start_async(self, runtime: RuntimeManager) -> None:\n actions = ControlActionSet(\n health=runtime.health_status,\n start=runtime.start_runtime,\n stop=runtime.stop_runtime,\n status=runtime.runtime_status,\n )\n for channel in self._channels:\n await channel.start(actions)\n\n async def _stop_async(self) -> None:\n for channel in reversed(self._channels):\n await channel.stop()", + "start_line": 12, + "end_line": 52, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/http_runner.py", + "title": "src/app_runtime/control/http_runner.py:UvicornThreadRunner", + "content": "class UvicornThreadRunner:\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._host = host\n self._port = port\n self._timeout = timeout\n self._server: Server | None = None\n self._thread: Thread | None = None\n self._error: BaseException | None = None\n\n async def start(self, app: FastAPI) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._error = None\n config = Config(app=app, host=self._host, port=self._port, log_level=\"warning\")\n self._server = Server(config)\n self._thread = Thread(target=self._serve, name=\"plba-http-control\", daemon=True)\n self._thread.start()\n await self._wait_until_started()\n\n async def stop(self) -> None:\n if self._server is None or self._thread is None:\n return\n self._server.should_exit = True\n await asyncio.to_thread(self._thread.join, self._timeout)\n self._server = None\n self._thread = None\n\n @property\n def port(self) -> int:\n if self._server is None or not getattr(self._server, \"servers\", None):\n return self._port\n socket = self._server.servers[0].sockets[0]\n return int(socket.getsockname()[1])\n\n async def _wait_until_started(self) -> None:\n if self._server is None:\n raise RuntimeError(\"Server is not initialized\")\n deadline = asyncio.get_running_loop().time() + max(float(self._timeout), 1.0)\n while not self._server.started:\n if self._error is not None:\n raise RuntimeError(\"HTTP control server failed to start\") from self._error\n if asyncio.get_running_loop().time() >= deadline:\n raise TimeoutError(\"HTTP control server startup timed out\")\n await asyncio.sleep(0.05)\n\n def _serve(self) -> None:\n if self._server is None:\n return\n try:\n asyncio.run(self._server.serve())\n except BaseException as exc: # noqa: BLE001\n self._error = exc", + "start_line": 10, + "end_line": 61, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_runner", + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/base.py", + "title": "src/app_runtime/control/base.py:ControlChannel", + "content": "class ControlChannel(ABC):\n @abstractmethod\n async def start(self, actions: ControlActionSet) -> None:\n \"\"\"Start the control channel and bind handlers.\"\"\"\n\n @abstractmethod\n async def stop(self) -> None:\n \"\"\"Stop the control channel and release resources.\"\"\"", + "start_line": 21, + "end_line": 28, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/__init__.py", + "title": "src/app_runtime/control/__init__.py:1-5", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\"ControlActionSet\", \"ControlChannel\", \"ControlPlaneService\", \"HttpControlChannel\"]", + "start_line": 1, + "end_line": 5, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/http_app.py", + "title": "src/app_runtime/control/http_app.py:HttpControlAppFactory", + "content": "class HttpControlAppFactory:\n def create(\n self,\n health_provider: Callable[[], Awaitable[HealthPayload]],\n action_provider: Callable[[str, str], Awaitable[JSONResponse]],\n ) -> FastAPI:\n app = FastAPI(title=\"PLBA Control API\")\n\n @app.middleware(\"http\")\n async def log_api_call(request: Request, call_next): # type: ignore[no-untyped-def]\n started = time.monotonic()\n response = await call_next(request)\n response.headers[\"X-Response-Time-Ms\"] = str(int((time.monotonic() - started) * 1000))\n return response\n\n @app.get(\"/health\")\n async def health() -> JSONResponse:\n payload = await health_provider()\n status_code = 200 if payload.get(\"status\") == \"ok\" else 503\n return JSONResponse(content=payload, status_code=status_code)\n\n @app.get(\"/actions/{action}\")\n @app.post(\"/actions/{action}\")\n async def action(action: str, request: Request) -> JSONResponse:\n client_source = self._client_source(request)\n if action in {\"start\", \"stop\"}:\n LOGGER.warning(\"Control action requested: /actions/%s client=%s\", action, client_source)\n return await action_provider(action, client_source)\n\n return app\n\n def _client_source(self, request: Request) -> str:\n explicit_header = request.headers.get(\"X-Client-Source\", \"\").strip()\n if explicit_header:\n return explicit_header\n user_agent = request.headers.get(\"User-Agent\", \"\").strip()\n if user_agent:\n return f\"user-agent:{user_agent}\"\n return \"unknown\"", + "start_line": 15, + "end_line": 53, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/http_channel.py", + "title": "src/app_runtime/control/http_channel.py:HttpControlChannel", + "content": "class HttpControlChannel(ControlChannel):\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._timeout = timeout\n self._runner = UvicornThreadRunner(host, port, timeout)\n self._factory = HttpControlAppFactory()\n self._actions: ControlActionSet | None = None\n\n async def start(self, actions: ControlActionSet) -> None:\n self._actions = actions\n app = self._factory.create(self._health_response, self._action_response)\n await self._runner.start(app)\n\n async def stop(self) -> None:\n await self._runner.stop()\n\n @property\n def port(self) -> int:\n return self._runner.port\n\n async def _health_response(self) -> dict[str, object]:\n if self._actions is None:\n return {\"status\": \"unhealthy\", \"detail\": \"control actions are not configured\"}\n return await asyncio.wait_for(self._actions.health(), timeout=float(self._timeout))\n\n async def _action_response(self, action: str, _client_source: str = \"unknown\") -> JSONResponse:\n if self._actions is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"{action} handler is not configured\"}, status_code=404)\n callbacks = {\n \"start\": self._actions.start,\n \"stop\": self._actions.stop,\n \"status\": self._actions.status,\n }\n callback = callbacks.get(action)\n if callback is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"unsupported action: {action}\"}, status_code=404)\n action_timeout = max(float(self._timeout), 10.0) if action in {\"start\", \"stop\"} else float(self._timeout)\n try:\n detail = await asyncio.wait_for(callback(), timeout=action_timeout)\n except asyncio.TimeoutError:\n return JSONResponse(\n content={\"status\": \"accepted\", \"detail\": f\"{action} operation is still in progress\"},\n status_code=202,\n )\n except Exception as exc:\n return JSONResponse(content={\"status\": \"error\", \"detail\": str(exc)}, status_code=500)\n return JSONResponse(content={\"status\": \"ok\", \"detail\": detail or f\"{action} action accepted\"}, status_code=200)", + "start_line": 12, + "end_line": 57, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/base.py", + "title": "src/app_runtime/control/base.py:ControlActionSet", + "content": "class ControlActionSet:\n health: HealthHandler\n start: ActionHandler\n stop: ActionHandler\n status: ActionHandler", + "start_line": 14, + "end_line": 18, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/plba/control.py", + "title": "src/plba/control.py:1-10", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\n \"ControlActionSet\",\n \"ControlChannel\",\n \"ControlPlaneService\",\n \"HttpControlChannel\",\n]", + "start_line": 1, + "end_line": 10, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.control", + "is_test": false, + "blob_sha": "31bd5c4481bfa7fbca8fae56d4860a67e3953ca74474ac8439e1f39b685d7bc8", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/core/runtime.py", + "title": "RuntimeManager", + "content": "RuntimeManager\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests manager\n- orchestrates role-like calls (4)\n- reads and writes state attributes\n- participates in dataflow slices (50)", + "start_line": 18, + "end_line": 179, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "symbol_name": "RuntimeManager", + "qname": "RuntimeManager", + "role": "pipeline_stage", + "confidence": 0.67, + "dataflow_participation": 50, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/base.py", + "title": "ControlChannel", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "start_line": 21, + "end_line": 28, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/base.py", + "title": "ControlActionSet", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "start_line": 14, + "end_line": 18, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "start_line": 12, + "end_line": 52, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/http_runner.py", + "title": "UvicornThreadRunner", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "start_line": 10, + "end_line": 61, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/http_channel.py", + "title": "HttpControlChannel", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "start_line": 12, + "end_line": 57, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/http_app.py", + "title": "HttpControlAppFactory", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "start_line": 15, + "end_line": 53, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "title": "WorkflowPersistence", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "start_line": 8, + "end_line": 54, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "start_line": 14, + "end_line": 25, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "start_line": 14, + "end_line": 51, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "start_line": 14, + "end_line": 17, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "start_line": 14, + "end_line": 20, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "start_line": 14, + "end_line": 47, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/core/runtime.py", + "title": "RuntimeManager.__init__:dataflow_slice", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file", + "start_line": 32, + "end_line": 52, + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C3_ENTRYPOINTS", + "path": "src/app_runtime/control/http_app.py", + "title": "app.post", + "content": "fastapi http app.post", + "start_line": 38, + "end_line": 42, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C3_ENTRYPOINTS", + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "content": "fastapi http app.get", + "start_line": 31, + "end_line": 34, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C3_ENTRYPOINTS", + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "content": "fastapi http app.get", + "start_line": 38, + "end_line": 42, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "relations": [ + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop" + }, + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async" + }, + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel" + }, + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start" + }, + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async" + }, + { + "path": "src/app_runtime/core/runtime.py", + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file" + } + ], + "entrypoints": [ + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.post", + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "test_candidates": [], + "layer_outcomes": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C4_SEMANTIC_ROLES", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 6, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C3_ENTRYPOINTS", + "hit_count": 3, + "empty": false, + "fallback_used": false + } + ], + "missing_layers": [], + "raw_rows": [ + { + "path": "src/plba/bootstrap.py", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 4, + "span_end": 4, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "27158ca220022eeb5083c6addf8a50775d45f7161284fd60aac48410105f4b98", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 9, + "span_end": 9, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "62a9575c77aad894120d18b4f2a08cf2ba42f77e9be4a8a432b767d157701afe", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager\nRuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "qname": "RuntimeManager", + "kind": "class", + "signature": "RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/__init__.py", + "content": "const RuntimeManager\nRuntimeManager = plba.core.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 16, + "span_end": 16, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "7eacec84f9b8d6c4201374591faecdac7493091c263681495c338973f2971ad9", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = plba.core.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/core.py", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 2, + "span_end": 2, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "e1684562d978b7af7fe9b27dc5869d770348a87b5dc19a50360f58544668578b", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.core", + "is_test": false, + "blob_sha": "c0ae25110d20e665216616e26b68adfe035b624ba45d31d1272fb21f906f9ca8", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "const ControlPlaneService\nControlPlaneService = app_runtime.control.service.ControlPlaneService", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlPlaneService", + "span_start": 3, + "span_end": 3, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "217e8f044d1c01644bf7b81e5046af9e84469210c692a2fb0c476a19bb069ae1", + "qname": "ControlPlaneService", + "kind": "const", + "signature": "ControlPlaneService = app_runtime.control.service.ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "method ControlChannel.start\nstart(self, actions)\nStart the control channel and bind handlers.", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlChannel.start", + "span_start": 23, + "span_end": 24, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "e01e0d50d0f48d0c84c119c989b7a7c57ceea263811ce2605c684ae24d1a03b1", + "qname": "ControlChannel.start", + "kind": "method", + "signature": "start(self, actions)", + "parent_symbol_id": "ControlChannel", + "package_or_module": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "method ControlChannel.stop\nstop(self)\nStop the control channel and release resources.", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlChannel.stop", + "span_start": 27, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "54b5adf9866c526836221dc721b474ba23fbec83e1b1d3b8bc4da67ae3c1541d", + "qname": "ControlChannel.stop", + "kind": "method", + "signature": "stop(self)", + "parent_symbol_id": "ControlChannel", + "package_or_module": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "class ControlPlaneService:\n def __init__(self) -> None:\n self._channels: list[ControlChannel] = []\n\n def register_channel(self, channel: ControlChannel) -> None:\n self._channels.append(channel)\n\n def start(self, runtime: RuntimeManager) -> None:\n if not self._channels:\n return\n asyncio.run(self._start_async(runtime))\n\n def stop(self) -> None:\n if not self._channels:\n return\n asyncio.run(self._stop_async())\n\n def snapshot(self, runtime: RuntimeManager) -> dict[str, object]:\n health = runtime.current_health()\n return {\n \"runtime\": {\"state\": runtime._state.value},\n \"modules\": list(runtime.registry.modules),\n \"services\": runtime.services.snapshot(),\n \"workers\": runtime.workers.snapshot(),\n \"health\": runtime.health.snapshot(runtime.workers.healths()) | {\"status\": health[\"status\"]},\n \"config\": runtime.configuration.get(),\n }\n\n async def _start_async(self, runtime: RuntimeManager) -> None:\n actions = ControlActionSet(\n health=runtime.health_status,\n start=runtime.start_runtime,\n stop=runtime.stop_runtime,\n status=runtime.runtime_status,\n )\n for channel in self._channels:\n await channel.start(actions)\n\n async def _stop_async(self) -> None:\n for channel in reversed(self._channels):\n await channel.stop()", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/service.py:ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "class UvicornThreadRunner:\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._host = host\n self._port = port\n self._timeout = timeout\n self._server: Server | None = None\n self._thread: Thread | None = None\n self._error: BaseException | None = None\n\n async def start(self, app: FastAPI) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._error = None\n config = Config(app=app, host=self._host, port=self._port, log_level=\"warning\")\n self._server = Server(config)\n self._thread = Thread(target=self._serve, name=\"plba-http-control\", daemon=True)\n self._thread.start()\n await self._wait_until_started()\n\n async def stop(self) -> None:\n if self._server is None or self._thread is None:\n return\n self._server.should_exit = True\n await asyncio.to_thread(self._thread.join, self._timeout)\n self._server = None\n self._thread = None\n\n @property\n def port(self) -> int:\n if self._server is None or not getattr(self._server, \"servers\", None):\n return self._port\n socket = self._server.servers[0].sockets[0]\n return int(socket.getsockname()[1])\n\n async def _wait_until_started(self) -> None:\n if self._server is None:\n raise RuntimeError(\"Server is not initialized\")\n deadline = asyncio.get_running_loop().time() + max(float(self._timeout), 1.0)\n while not self._server.started:\n if self._error is not None:\n raise RuntimeError(\"HTTP control server failed to start\") from self._error\n if asyncio.get_running_loop().time() >= deadline:\n raise TimeoutError(\"HTTP control server startup timed out\")\n await asyncio.sleep(0.05)\n\n def _serve(self) -> None:\n if self._server is None:\n return\n try:\n asyncio.run(self._server.serve())\n except BaseException as exc: # noqa: BLE001\n self._error = exc", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_runner.py:UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_runner", + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlChannel(ABC):\n @abstractmethod\n async def start(self, actions: ControlActionSet) -> None:\n \"\"\"Start the control channel and bind handlers.\"\"\"\n\n @abstractmethod\n async def stop(self) -> None:\n \"\"\"Stop the control channel and release resources.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\"ControlActionSet\", \"ControlChannel\", \"ControlPlaneService\", \"HttpControlChannel\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/__init__.py:1-5", + "span_start": 1, + "span_end": 5, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "class HttpControlAppFactory:\n def create(\n self,\n health_provider: Callable[[], Awaitable[HealthPayload]],\n action_provider: Callable[[str, str], Awaitable[JSONResponse]],\n ) -> FastAPI:\n app = FastAPI(title=\"PLBA Control API\")\n\n @app.middleware(\"http\")\n async def log_api_call(request: Request, call_next): # type: ignore[no-untyped-def]\n started = time.monotonic()\n response = await call_next(request)\n response.headers[\"X-Response-Time-Ms\"] = str(int((time.monotonic() - started) * 1000))\n return response\n\n @app.get(\"/health\")\n async def health() -> JSONResponse:\n payload = await health_provider()\n status_code = 200 if payload.get(\"status\") == \"ok\" else 503\n return JSONResponse(content=payload, status_code=status_code)\n\n @app.get(\"/actions/{action}\")\n @app.post(\"/actions/{action}\")\n async def action(action: str, request: Request) -> JSONResponse:\n client_source = self._client_source(request)\n if action in {\"start\", \"stop\"}:\n LOGGER.warning(\"Control action requested: /actions/%s client=%s\", action, client_source)\n return await action_provider(action, client_source)\n\n return app\n\n def _client_source(self, request: Request) -> str:\n explicit_header = request.headers.get(\"X-Client-Source\", \"\").strip()\n if explicit_header:\n return explicit_header\n user_agent = request.headers.get(\"User-Agent\", \"\").strip()\n if user_agent:\n return f\"user-agent:{user_agent}\"\n return \"unknown\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_app.py:HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel(ControlChannel):\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._timeout = timeout\n self._runner = UvicornThreadRunner(host, port, timeout)\n self._factory = HttpControlAppFactory()\n self._actions: ControlActionSet | None = None\n\n async def start(self, actions: ControlActionSet) -> None:\n self._actions = actions\n app = self._factory.create(self._health_response, self._action_response)\n await self._runner.start(app)\n\n async def stop(self) -> None:\n await self._runner.stop()\n\n @property\n def port(self) -> int:\n return self._runner.port\n\n async def _health_response(self) -> dict[str, object]:\n if self._actions is None:\n return {\"status\": \"unhealthy\", \"detail\": \"control actions are not configured\"}\n return await asyncio.wait_for(self._actions.health(), timeout=float(self._timeout))\n\n async def _action_response(self, action: str, _client_source: str = \"unknown\") -> JSONResponse:\n if self._actions is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"{action} handler is not configured\"}, status_code=404)\n callbacks = {\n \"start\": self._actions.start,\n \"stop\": self._actions.stop,\n \"status\": self._actions.status,\n }\n callback = callbacks.get(action)\n if callback is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"unsupported action: {action}\"}, status_code=404)\n action_timeout = max(float(self._timeout), 10.0) if action in {\"start\", \"stop\"} else float(self._timeout)\n try:\n detail = await asyncio.wait_for(callback(), timeout=action_timeout)\n except asyncio.TimeoutError:\n return JSONResponse(\n content={\"status\": \"accepted\", \"detail\": f\"{action} operation is still in progress\"},\n status_code=202,\n )\n except Exception as exc:\n return JSONResponse(content={\"status\": \"error\", \"detail\": str(exc)}, status_code=500)\n return JSONResponse(content={\"status\": \"ok\", \"detail\": detail or f\"{action} action accepted\"}, status_code=200)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_channel.py:HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlActionSet:\n health: HealthHandler\n start: ActionHandler\n stop: ActionHandler\n status: ActionHandler", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/control.py", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\n \"ControlActionSet\",\n \"ControlChannel\",\n \"ControlPlaneService\",\n \"HttpControlChannel\",\n]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/control.py:1-10", + "span_start": 1, + "span_end": 10, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.control", + "is_test": false, + "blob_sha": "31bd5c4481bfa7fbca8fae56d4860a67e3953ca74474ac8439e1f39b685d7bc8", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests manager\n- orchestrates role-like calls (4)\n- reads and writes state attributes\n- participates in dataflow slices (50)", + "layer": "C4_SEMANTIC_ROLES", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 43, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "symbol_name": "RuntimeManager", + "qname": "RuntimeManager", + "role": "pipeline_stage", + "confidence": 0.67, + "dataflow_participation": 50, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 52, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": null, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": null, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": null, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "retrieval_report": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "vector", + "C0_SOURCE_CHUNKS": "vector", + "C4_SEMANTIC_ROLES": "vector", + "C2_DEPENDENCY_GRAPH": "vector", + "C3_ENTRYPOINTS": "vector" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [] + } + }, + "fallback": { + "used": false, + "reason": null + }, + "retrieval_by_layer_ms": { + "C1_SYMBOL_CATALOG": 46, + "C0_SOURCE_CHUNKS": 17, + "C4_SEMANTIC_ROLES": 16, + "C2_DEPENDENCY_GRAPH": 56, + "C3_ENTRYPOINTS": 11 + } + } + }, + "diagnostics": { + "intent_correct": null, + "target_found": true, + "layers_used": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_sufficient": true, + "answer_mode": "normal", + "router_result": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "EXPLAIN", + "path_scope": [], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_resolution_status": "pending" + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Объясни как работает класс RuntimeManager", + "sub_intent": "EXPLAIN", + "path_scope": [], + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C4_SEMANTIC_ROLES", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 6, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C3_ENTRYPOINTS", + "hit_count": 3, + "empty": false, + "fallback_used": false + } + ], + "empty_layers": [], + "evidence_gate_decision": { + "sufficient": true, + "failure_reasons": [], + "evidence_count": 33 + }, + "failure_reasons": [], + "timings_ms": {} + }, + "rag_rows": [ + { + "path": "src/plba/bootstrap.py", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 4, + "span_end": 4, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "27158ca220022eeb5083c6addf8a50775d45f7161284fd60aac48410105f4b98", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 9, + "span_end": 9, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "62a9575c77aad894120d18b4f2a08cf2ba42f77e9be4a8a432b767d157701afe", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager\nRuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "qname": "RuntimeManager", + "kind": "class", + "signature": "RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/__init__.py", + "content": "const RuntimeManager\nRuntimeManager = plba.core.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 16, + "span_end": 16, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "7eacec84f9b8d6c4201374591faecdac7493091c263681495c338973f2971ad9", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = plba.core.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/core.py", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 2, + "span_end": 2, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "e1684562d978b7af7fe9b27dc5869d770348a87b5dc19a50360f58544668578b", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.core", + "is_test": false, + "blob_sha": "c0ae25110d20e665216616e26b68adfe035b624ba45d31d1272fb21f906f9ca8", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "const ControlPlaneService\nControlPlaneService = app_runtime.control.service.ControlPlaneService", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlPlaneService", + "span_start": 3, + "span_end": 3, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "217e8f044d1c01644bf7b81e5046af9e84469210c692a2fb0c476a19bb069ae1", + "qname": "ControlPlaneService", + "kind": "const", + "signature": "ControlPlaneService = app_runtime.control.service.ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "method ControlChannel.start\nstart(self, actions)\nStart the control channel and bind handlers.", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlChannel.start", + "span_start": 23, + "span_end": 24, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "e01e0d50d0f48d0c84c119c989b7a7c57ceea263811ce2605c684ae24d1a03b1", + "qname": "ControlChannel.start", + "kind": "method", + "signature": "start(self, actions)", + "parent_symbol_id": "ControlChannel", + "package_or_module": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "method ControlChannel.stop\nstop(self)\nStop the control channel and release resources.", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlChannel.stop", + "span_start": 27, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "54b5adf9866c526836221dc721b474ba23fbec83e1b1d3b8bc4da67ae3c1541d", + "qname": "ControlChannel.stop", + "kind": "method", + "signature": "stop(self)", + "parent_symbol_id": "ControlChannel", + "package_or_module": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "class ControlPlaneService:\n def __init__(self) -> None:\n self._channels: list[ControlChannel] = []\n\n def register_channel(self, channel: ControlChannel) -> None:\n self._channels.append(channel)\n\n def start(self, runtime: RuntimeManager) -> None:\n if not self._channels:\n return\n asyncio.run(self._start_async(runtime))\n\n def stop(self) -> None:\n if not self._channels:\n return\n asyncio.run(self._stop_async())\n\n def snapshot(self, runtime: RuntimeManager) -> dict[str, object]:\n health = runtime.current_health()\n return {\n \"runtime\": {\"state\": runtime._state.value},\n \"modules\": list(runtime.registry.modules),\n \"services\": runtime.services.snapshot(),\n \"workers\": runtime.workers.snapshot(),\n \"health\": runtime.health.snapshot(runtime.workers.healths()) | {\"status\": health[\"status\"]},\n \"config\": runtime.configuration.get(),\n }\n\n async def _start_async(self, runtime: RuntimeManager) -> None:\n actions = ControlActionSet(\n health=runtime.health_status,\n start=runtime.start_runtime,\n stop=runtime.stop_runtime,\n status=runtime.runtime_status,\n )\n for channel in self._channels:\n await channel.start(actions)\n\n async def _stop_async(self) -> None:\n for channel in reversed(self._channels):\n await channel.stop()", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/service.py:ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "class UvicornThreadRunner:\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._host = host\n self._port = port\n self._timeout = timeout\n self._server: Server | None = None\n self._thread: Thread | None = None\n self._error: BaseException | None = None\n\n async def start(self, app: FastAPI) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._error = None\n config = Config(app=app, host=self._host, port=self._port, log_level=\"warning\")\n self._server = Server(config)\n self._thread = Thread(target=self._serve, name=\"plba-http-control\", daemon=True)\n self._thread.start()\n await self._wait_until_started()\n\n async def stop(self) -> None:\n if self._server is None or self._thread is None:\n return\n self._server.should_exit = True\n await asyncio.to_thread(self._thread.join, self._timeout)\n self._server = None\n self._thread = None\n\n @property\n def port(self) -> int:\n if self._server is None or not getattr(self._server, \"servers\", None):\n return self._port\n socket = self._server.servers[0].sockets[0]\n return int(socket.getsockname()[1])\n\n async def _wait_until_started(self) -> None:\n if self._server is None:\n raise RuntimeError(\"Server is not initialized\")\n deadline = asyncio.get_running_loop().time() + max(float(self._timeout), 1.0)\n while not self._server.started:\n if self._error is not None:\n raise RuntimeError(\"HTTP control server failed to start\") from self._error\n if asyncio.get_running_loop().time() >= deadline:\n raise TimeoutError(\"HTTP control server startup timed out\")\n await asyncio.sleep(0.05)\n\n def _serve(self) -> None:\n if self._server is None:\n return\n try:\n asyncio.run(self._server.serve())\n except BaseException as exc: # noqa: BLE001\n self._error = exc", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_runner.py:UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_runner", + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlChannel(ABC):\n @abstractmethod\n async def start(self, actions: ControlActionSet) -> None:\n \"\"\"Start the control channel and bind handlers.\"\"\"\n\n @abstractmethod\n async def stop(self) -> None:\n \"\"\"Stop the control channel and release resources.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\"ControlActionSet\", \"ControlChannel\", \"ControlPlaneService\", \"HttpControlChannel\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/__init__.py:1-5", + "span_start": 1, + "span_end": 5, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "class HttpControlAppFactory:\n def create(\n self,\n health_provider: Callable[[], Awaitable[HealthPayload]],\n action_provider: Callable[[str, str], Awaitable[JSONResponse]],\n ) -> FastAPI:\n app = FastAPI(title=\"PLBA Control API\")\n\n @app.middleware(\"http\")\n async def log_api_call(request: Request, call_next): # type: ignore[no-untyped-def]\n started = time.monotonic()\n response = await call_next(request)\n response.headers[\"X-Response-Time-Ms\"] = str(int((time.monotonic() - started) * 1000))\n return response\n\n @app.get(\"/health\")\n async def health() -> JSONResponse:\n payload = await health_provider()\n status_code = 200 if payload.get(\"status\") == \"ok\" else 503\n return JSONResponse(content=payload, status_code=status_code)\n\n @app.get(\"/actions/{action}\")\n @app.post(\"/actions/{action}\")\n async def action(action: str, request: Request) -> JSONResponse:\n client_source = self._client_source(request)\n if action in {\"start\", \"stop\"}:\n LOGGER.warning(\"Control action requested: /actions/%s client=%s\", action, client_source)\n return await action_provider(action, client_source)\n\n return app\n\n def _client_source(self, request: Request) -> str:\n explicit_header = request.headers.get(\"X-Client-Source\", \"\").strip()\n if explicit_header:\n return explicit_header\n user_agent = request.headers.get(\"User-Agent\", \"\").strip()\n if user_agent:\n return f\"user-agent:{user_agent}\"\n return \"unknown\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_app.py:HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel(ControlChannel):\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._timeout = timeout\n self._runner = UvicornThreadRunner(host, port, timeout)\n self._factory = HttpControlAppFactory()\n self._actions: ControlActionSet | None = None\n\n async def start(self, actions: ControlActionSet) -> None:\n self._actions = actions\n app = self._factory.create(self._health_response, self._action_response)\n await self._runner.start(app)\n\n async def stop(self) -> None:\n await self._runner.stop()\n\n @property\n def port(self) -> int:\n return self._runner.port\n\n async def _health_response(self) -> dict[str, object]:\n if self._actions is None:\n return {\"status\": \"unhealthy\", \"detail\": \"control actions are not configured\"}\n return await asyncio.wait_for(self._actions.health(), timeout=float(self._timeout))\n\n async def _action_response(self, action: str, _client_source: str = \"unknown\") -> JSONResponse:\n if self._actions is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"{action} handler is not configured\"}, status_code=404)\n callbacks = {\n \"start\": self._actions.start,\n \"stop\": self._actions.stop,\n \"status\": self._actions.status,\n }\n callback = callbacks.get(action)\n if callback is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"unsupported action: {action}\"}, status_code=404)\n action_timeout = max(float(self._timeout), 10.0) if action in {\"start\", \"stop\"} else float(self._timeout)\n try:\n detail = await asyncio.wait_for(callback(), timeout=action_timeout)\n except asyncio.TimeoutError:\n return JSONResponse(\n content={\"status\": \"accepted\", \"detail\": f\"{action} operation is still in progress\"},\n status_code=202,\n )\n except Exception as exc:\n return JSONResponse(content={\"status\": \"error\", \"detail\": str(exc)}, status_code=500)\n return JSONResponse(content={\"status\": \"ok\", \"detail\": detail or f\"{action} action accepted\"}, status_code=200)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_channel.py:HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlActionSet:\n health: HealthHandler\n start: ActionHandler\n stop: ActionHandler\n status: ActionHandler", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/control.py", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\n \"ControlActionSet\",\n \"ControlChannel\",\n \"ControlPlaneService\",\n \"HttpControlChannel\",\n]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/control.py:1-10", + "span_start": 1, + "span_end": 10, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.control", + "is_test": false, + "blob_sha": "31bd5c4481bfa7fbca8fae56d4860a67e3953ca74474ac8439e1f39b685d7bc8", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests manager\n- orchestrates role-like calls (4)\n- reads and writes state attributes\n- participates in dataflow slices (50)", + "layer": "C4_SEMANTIC_ROLES", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 43, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "symbol_name": "RuntimeManager", + "qname": "RuntimeManager", + "role": "pipeline_stage", + "confidence": 0.67, + "dataflow_participation": 50, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 52, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "validation": { + "passed": true, + "action": "return", + "reasons": [] + } + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-explain-runtime-manager.md b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-explain-runtime-manager.md new file mode 100644 index 0000000..8bae42c --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-explain-runtime-manager.md @@ -0,0 +1,34 @@ +# plba-v2-explain-runtime-manager + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: agent_runtime +- mode: full_chain +- passed: True + +## Query +Объясни как работает класс RuntimeManager + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 33, + "llm_answer": "Класс `RuntimeManager` определен в файле `src/app_runtime/core/runtime.py`, начиная с строки 18. Из доступных контекстных данных напрямую невозможно точно описать его работу, так как отсутствует подробная реализация или вызовы этого класса.\n\nТем не менее, можно сделать осторожные выводы:\n\n- Класс играет роль менеджера и управляет состоянием выполнения приложения.\n- Вероятно, он участвует в координации различных компонентов и служб через атрибуты и методы, такие как чтение и запись состояния (`configuration`, `add_config_file`), а также участие в срезах данных потока выполнения (`participates in dataflow slices`).\n- На основании имеющихся свидетельств сложно точно понять, какие конкретно действия выполняет этот класс при инициализации и во время своей работы.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-explain-trace-service.json b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-explain-trace-service.json new file mode 100644 index 0000000..e7d893b --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-explain-trace-service.json @@ -0,0 +1,4157 @@ +{ + "case_id": "plba-v2-explain-trace-service", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "agent_runtime", + "mode": "full_chain", + "query": "Объясни как работает класс TraceService", + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 33, + "llm_answer": "Класс `TraceService` находится в файле `src/app_runtime/tracing/service.py`. Это сервис для управления контекстами трассировки и записи событий в журнал.\n\nЕго основные обязанности:\n- Инициализация сервиса при создании экземпляра (`__init__`) с передачей транспортов и хранилищ контекста.\n- Создание нового контекста трассировки через метод `create_context`, который генерирует уникальный идентификатор трассировки и сохраняет запись контекста в хранилище.\n- Предоставление текущего идентификатора трассировки через метод `current_trace_id`.\n\nКонструктор принимает два необязательных параметра:\n- `transport`: транспорт для отправки сообщений трассировки (по умолчанию используется `NoOpTraceTransport`).\n- `store`: хранилище контекста (по умолчанию используется `TraceContextStore`).\n\nТаким образом, `TraceService` играет ключевую роль в отслеживании и документировании событий приложения, обеспечивая единообразие логирования и мониторинга.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "TraceService" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "query": "Объясни как работает класс TraceService", + "router_result": { + "schema_version": "1.1", + "intent": "CODE_QA", + "retrieval_profile": "code", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query_plan": { + "raw": "Объясни как работает класс TraceService", + "normalized": "Объясни как работает класс TraceService", + "sub_intent": "EXPLAIN", + "negations": [], + "expansions": [ + "TraceService" + ], + "keyword_hints": [ + "TraceService" + ], + "path_hints": [], + "doc_scope_hints": [], + "symbol_candidates": [ + "TraceService" + ], + "symbol_kind_hint": "class", + "anchors": [ + { + "type": "SYMBOL", + "value": "TraceService", + "source": "user_text", + "subtype": null, + "span": { + "start": 27, + "end": 39 + }, + "confidence": 0.88 + }, + { + "type": "KEY_TERM", + "value": "класс", + "source": "user_text", + "subtype": null, + "span": { + "start": 21, + "end": 26 + }, + "confidence": 0.9 + } + ] + }, + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "top_k": 8 + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 8 + }, + { + "layer_id": "C4_SEMANTIC_ROLES", + "top_k": 8 + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "top_k": 6 + }, + { + "layer_id": "C3_ENTRYPOINTS", + "top_k": 6 + } + ], + "filters": { + "test_policy": "EXCLUDE", + "path_scope": [], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + }, + "symbol_resolution": { + "status": "pending", + "resolved_symbol": null, + "alternatives": [ + "TraceService" + ], + "confidence": 0.0 + }, + "evidence_policy": { + "require_def": true, + "require_flow": true, + "require_spec": false, + "allow_answer_without_evidence": false + } + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Объясни как работает класс TraceService", + "sub_intent": "EXPLAIN", + "path_scope": [], + "keyword_hints": [ + "TraceService" + ], + "symbol_candidates": [ + "TraceService" + ], + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "top_k": 8 + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 8 + }, + { + "layer_id": "C4_SEMANTIC_ROLES", + "top_k": 8 + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "top_k": 6 + }, + { + "layer_id": "C3_ENTRYPOINTS", + "top_k": 6 + } + ], + "filters": { + "test_policy": "EXCLUDE", + "path_scope": [], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + }, + "query_plan": { + "raw": "Объясни как работает класс TraceService", + "normalized": "Объясни как работает класс TraceService", + "sub_intent": "EXPLAIN", + "negations": [], + "expansions": [ + "TraceService" + ], + "keyword_hints": [ + "TraceService" + ], + "path_hints": [], + "doc_scope_hints": [], + "symbol_candidates": [ + "TraceService" + ], + "symbol_kind_hint": "class", + "anchors": [ + { + "type": "SYMBOL", + "value": "TraceService", + "source": "user_text", + "subtype": null, + "span": { + "start": 27, + "end": 39 + }, + "confidence": 0.88 + }, + { + "type": "KEY_TERM", + "value": "класс", + "source": "user_text", + "subtype": null, + "span": { + "start": 21, + "end": 26 + }, + "confidence": 0.9 + } + ] + } + }, + "retrieval_result": { + "target_symbol_candidates": [ + "TraceService", + "TraceService.open_context", + "TraceService.create_context", + "TraceService.current_trace_id" + ], + "resolved_symbol": "TraceService", + "symbol_resolution_status": "resolved", + "file_candidates": [ + "src/plba/__init__.py", + "src/app_runtime/core/runtime.py", + "src/app_runtime/tracing/__init__.py", + "src/app_runtime/tracing/service.py", + "src/plba/tracing.py", + "src/app_runtime/contracts/__init__.py", + "src/app_runtime/config/providers.py", + "src/app_runtime/control/http_runner.py", + "src/app_runtime/workflow/persistence/workflow_persistence.py", + "src/app_runtime/control/http_channel.py", + "src/app_runtime/queue/in_memory.py", + "src/app_runtime/config/file_loader.py", + "src/app_runtime/tracing/store.py", + "src/app_runtime/workers/supervisor.py", + "src/app_runtime/control/http_app.py" + ], + "code_chunks": [ + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/plba/__init__.py", + "title": "TraceService", + "content": "const TraceService\nTraceService = plba.tracing.TraceService", + "start_line": 20, + "end_line": 20, + "metadata": { + "symbol_id": "259ec03b77b9387ea53f69c77af32791dd29adf6de617ba72dd3f839197342a1", + "qname": "TraceService", + "kind": "const", + "signature": "TraceService = plba.tracing.TraceService", + "parent_symbol_id": null, + "package_or_module": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/core/runtime.py", + "title": "TraceService", + "content": "const TraceService\nTraceService = app_runtime.tracing.service.TraceService", + "start_line": 14, + "end_line": 14, + "metadata": { + "symbol_id": "3ccf6212fd7d9730f9df933e2ee7671b65bdae0520577e1a49c6432262842db6", + "qname": "TraceService", + "kind": "const", + "signature": "TraceService = app_runtime.tracing.service.TraceService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/tracing/__init__.py", + "title": "TraceService", + "content": "const TraceService\nTraceService = app_runtime.tracing.service.TraceService", + "start_line": 2, + "end_line": 2, + "metadata": { + "symbol_id": "ecd2fab7fa9744b2adca84d3d213f7aadcb7e1da84b9c2764a4ab39c65282b11", + "qname": "TraceService", + "kind": "const", + "signature": "TraceService = app_runtime.tracing.service.TraceService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.tracing.__init__", + "is_test": false, + "blob_sha": "a01dea5f773515aeaae8e6d3431fcb93531a8b577dfa26c2e5db16cd6ae6e4d9", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/tracing/service.py", + "title": "TraceService", + "content": "class TraceService\nTraceService(TraceContextFactory)", + "start_line": 39, + "end_line": 166, + "metadata": { + "symbol_id": "c2b2b976d99f2c600000b753731b26e0a69adcb4359398b93073590c5d5d04f4", + "qname": "TraceService", + "kind": "class", + "signature": "TraceService(TraceContextFactory)", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/plba/tracing.py", + "title": "TraceService", + "content": "const TraceService\nTraceService = app_runtime.tracing.service.TraceService", + "start_line": 1, + "end_line": 1, + "metadata": { + "symbol_id": "a4556fb3f83c50ea68b94a679786ce802cab7ffd9d7138aad3d6009b2661f425", + "qname": "TraceService", + "kind": "const", + "signature": "TraceService = app_runtime.tracing.service.TraceService", + "parent_symbol_id": null, + "package_or_module": "src.plba.tracing", + "is_test": false, + "blob_sha": "a27e11c716c93c3fcefe6f11b4cc420a6b743e7606606071d7f1aeeccc4e7d45", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/tracing/service.py", + "title": "TraceService.open_context", + "content": "method TraceService.open_context\nopen_context(self)", + "start_line": 66, + "end_line": 78, + "metadata": { + "symbol_id": "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426", + "qname": "TraceService.open_context", + "kind": "method", + "signature": "open_context(self)", + "parent_symbol_id": "TraceService", + "package_or_module": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/tracing/service.py", + "title": "TraceService.create_context", + "content": "method TraceService.create_context\ncreate_context(self)", + "start_line": 45, + "end_line": 63, + "metadata": { + "symbol_id": "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a", + "qname": "TraceService.create_context", + "kind": "method", + "signature": "create_context(self)", + "parent_symbol_id": "TraceService", + "package_or_module": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/tracing/service.py", + "title": "TraceService.current_trace_id", + "content": "method TraceService.current_trace_id\ncurrent_trace_id(self)", + "start_line": 80, + "end_line": 81, + "metadata": { + "symbol_id": "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c", + "qname": "TraceService.current_trace_id", + "kind": "method", + "signature": "current_trace_id(self)", + "parent_symbol_id": "TraceService", + "package_or_module": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/tracing/service.py", + "title": "src/app_runtime/tracing/service.py:TraceService", + "content": "class TraceService(TraceContextFactory):\n def __init__(self, transport: TraceTransport | None = None, store: TraceContextStore | None = None) -> None:\n self.transport = transport or NoOpTraceTransport()\n self.store = store or TraceContextStore()\n self._writer = TraceRecordWriter(self.transport)\n\n def create_context(\n self,\n *,\n alias: str,\n parent_id: str | None = None,\n kind: str | None = None,\n attrs: dict[str, Any] | None = None,\n ) -> str:\n record = TraceContextRecord(\n trace_id=uuid4().hex,\n alias=str(alias or \"\"),\n parent_id=parent_id,\n type=kind,\n event_time=utc_now(),\n attrs=dict(attrs or {}),\n )\n self.store.push(record)\n self._writer.write_context(record)\n return record.trace_id\n\n @contextmanager\n def open_context(\n self,\n *,\n alias: str,\n parent_id: str | None = None,\n kind: str | None = None,\n attrs: dict[str, Any] | None = None,\n ) -> Iterator[str]:\n trace_id = self.create_context(alias=alias, parent_id=parent_id, kind=kind, attrs=attrs)\n try:\n yield trace_id\n finally:\n self.store.pop()\n\n def current_trace_id(self) -> str | None:\n return self.store.current_trace_id()\n\n def close_context(self) -> str | None:\n previous = self.store.pop()\n return previous.record.trace_id if previous else None\n\n def step(self, name: str) -> None:\n self.store.set_step(str(name or \"\"))\n\n def info(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"INFO\", message, status, attrs)\n\n def debug(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"DEBUG\", message, status, attrs)\n\n def warning(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"WARNING\", message, status, attrs)\n\n def error(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"ERROR\", message, status, attrs)\n\n def exception(self, message: str, *, status: str = \"failed\", attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"ERROR\", message, status, attrs)\n\n def new_root(self, operation: str) -> TraceContext:\n trace_id = self.create_context(alias=operation, kind=\"operation\", attrs={\"operation\": operation})\n return TraceContext(trace_id=trace_id, span_id=trace_id, attributes={\"operation\": operation})\n\n def child_of(self, parent: TraceContext, operation: str) -> TraceContext:\n trace_id = self.create_context(\n alias=operation,\n parent_id=parent.trace_id,\n kind=\"worker\",\n attrs={\"operation\": operation},\n )\n return TraceContext(\n trace_id=trace_id,\n span_id=trace_id,\n parent_span_id=parent.span_id,\n attributes={\"operation\": operation},\n )\n\n def attach(self, metadata: dict[str, object], context: TraceContext) -> dict[str, object]:\n updated = dict(metadata)\n updated[\"trace_id\"] = context.trace_id\n updated[\"span_id\"] = context.span_id\n updated[\"parent_span_id\"] = context.parent_span_id\n return updated\n\n def resume(self, metadata: dict[str, object], operation: str) -> TraceContext:\n trace_id = str(metadata.get(\"trace_id\") or uuid4().hex)\n span_id = str(metadata.get(\"span_id\") or trace_id)\n parent_id = metadata.get(\"parent_span_id\")\n self.create_context(\n alias=operation,\n parent_id=str(parent_id) if parent_id else None,\n kind=\"worker\",\n attrs=dict(metadata),\n )\n return TraceContext(\n trace_id=trace_id,\n span_id=span_id,\n parent_span_id=str(parent_id) if parent_id else None,\n attributes={\"operation\": operation},\n )\n\n def _write_message(\n self,\n level: TraceLevel,\n message: str,\n status: str | None,\n attrs: dict[str, Any] | None,\n ) -> None:\n active = self.store.current()\n if active is None:\n raise RuntimeError(\"Trace context is not bound. Call create_context() first.\")\n record = TraceLogMessage(\n trace_id=active.record.trace_id,\n step=active.step,\n status=str(status or \"\"),\n message=str(message or \"\"),\n level=level,\n event_time=utc_now(),\n attrs=dict(attrs or {}),\n )\n self._writer.write_message(record)", + "start_line": 39, + "end_line": 166, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/tracing/service.py", + "title": "src/app_runtime/tracing/service.py:TraceManager", + "content": "class TraceManager(TraceService):\n \"\"\"Compatibility alias during the transition from ConfigManager-shaped naming.\"\"\"", + "start_line": 169, + "end_line": 170, + "metadata": { + "chunk_index": 2, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/core/runtime.py", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "start_line": 18, + "end_line": 179, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/tracing/__init__.py", + "title": "src/app_runtime/tracing/__init__.py:1-17", + "content": "from app_runtime.contracts.trace import TraceContext, TraceContextRecord, TraceLogMessage, TraceTransport\nfrom app_runtime.tracing.service import TraceManager, TraceService\nfrom app_runtime.tracing.store import ActiveTraceContext, TraceContextStore\nfrom app_runtime.tracing.transport import MySqlTraceTransport, NoOpTraceTransport\n\n__all__ = [\n \"ActiveTraceContext\",\n \"MySqlTraceTransport\",\n \"NoOpTraceTransport\",\n \"TraceContext\",\n \"TraceContextRecord\",\n \"TraceContextStore\",\n \"TraceLogMessage\",\n \"TraceManager\",\n \"TraceService\",\n \"TraceTransport\",\n]", + "start_line": 1, + "end_line": 17, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.tracing.__init__", + "is_test": false, + "blob_sha": "a01dea5f773515aeaae8e6d3431fcb93531a8b577dfa26c2e5db16cd6ae6e4d9", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/plba/__init__.py", + "title": "src/plba/__init__.py:1-69", + "content": "from plba.bootstrap import create_runtime\nfrom plba.config import ConfigFileLoader, FileConfigProvider\nfrom plba.control import ControlActionSet, ControlChannel, ControlPlaneService, HttpControlChannel\nfrom plba.contracts import (\n ApplicationModule,\n ConfigProvider,\n HealthContributor,\n TraceContext,\n TraceContextRecord,\n TraceLogMessage,\n TraceTransport,\n Worker,\n WorkerHealth,\n WorkerStatus,\n)\nfrom plba.core import ConfigurationManager, RuntimeManager, ServiceContainer\nfrom plba.health import HealthRegistry\nfrom plba.logging import LogManager\nfrom plba.queue import InMemoryTaskQueue\nfrom plba.tracing import MySqlTraceTransport, NoOpTraceTransport, TraceService\nfrom plba.workflow import (\n StepResult,\n WorkflowContext,\n WorkflowDefinition,\n WorkflowEngine,\n WorkflowEngineHooks,\n WorkflowNode,\n WorkflowRuntimeFactory,\n WorkflowStep,\n)\nfrom plba.workers import WorkerSupervisor\n\n__all__ = [\n \"ApplicationModule\",\n \"ConfigFileLoader\",\n \"ConfigProvider\",\n \"ConfigurationManager\",\n \"ControlActionSet\",\n \"ControlChannel\",\n \"ControlPlaneService\",\n \"create_runtime\",\n \"FileConfigProvider\",\n \"HealthContributor\",\n \"HealthRegistry\",\n \"HttpControlChannel\",\n \"InMemoryTaskQueue\",\n \"LogManager\",\n \"MySqlTraceTransport\",\n \"NoOpTraceTransport\",\n \"RuntimeManager\",\n \"ServiceContainer\",\n \"TraceContext\",\n \"TraceContextRecord\",\n \"TraceLogMessage\",\n \"TraceService\",\n \"TraceTransport\",\n \"StepResult\",\n \"Worker\",\n \"WorkerHealth\",\n \"WorkerStatus\",\n \"WorkflowContext\",\n \"WorkflowDefinition\",\n \"WorkflowEngine\",\n \"WorkflowEngineHooks\",\n \"WorkflowNode\",\n \"WorkflowRuntimeFactory\",\n \"WorkflowStep\",\n \"WorkerSupervisor\",\n]", + "start_line": 1, + "end_line": 69, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/plba/tracing.py", + "title": "src/plba/tracing.py:1-4", + "content": "from app_runtime.tracing.service import TraceService\nfrom app_runtime.tracing.transport import MySqlTraceTransport, NoOpTraceTransport\n\n__all__ = [\"MySqlTraceTransport\", \"NoOpTraceTransport\", \"TraceService\"]", + "start_line": 1, + "end_line": 4, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.tracing", + "is_test": false, + "blob_sha": "a27e11c716c93c3fcefe6f11b4cc420a6b743e7606606071d7f1aeeccc4e7d45", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/contracts/__init__.py", + "title": "src/app_runtime/__init__.py:1-1", + "content": "__all__: list[str] = []", + "start_line": 1, + "end_line": 1, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.__init__", + "is_test": false, + "blob_sha": "8eea9df4f6d7b38ca0e39ccc27b04700e3d08dbeec8046d613d22706d19985fa", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/config/providers.py", + "title": "src/app_runtime/config/providers.py:FileConfigProvider", + "content": "class FileConfigProvider(ConfigProvider):\n def __init__(self, path: str | Path) -> None:\n self._loader = ConfigFileLoader(path)\n\n @property\n def loader(self) -> ConfigFileLoader:\n return self._loader\n\n def load(self) -> dict[str, Any]:\n config = self._loader.load_sync()\n if not isinstance(config, dict):\n raise TypeError(\"Config root must be a mapping\")\n return dict(config)", + "start_line": 10, + "end_line": 22, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.config.providers", + "is_test": false, + "blob_sha": "8c53ca0122d6df6c5763bca15e99434bb4daebd5a618b8fc927e9ae90b022e64", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/tracing/service.py", + "title": "TraceService", + "content": "TraceService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (13)", + "start_line": 39, + "end_line": 166, + "metadata": { + "symbol_id": "c2b2b976d99f2c600000b753731b26e0a69adcb4359398b93073590c5d5d04f4", + "symbol_name": "TraceService", + "qname": "TraceService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 13, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/http_runner.py", + "title": "UvicornThreadRunner", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "start_line": 10, + "end_line": 61, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "title": "WorkflowPersistence", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "start_line": 8, + "end_line": 54, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/http_channel.py", + "title": "HttpControlChannel", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "start_line": 12, + "end_line": 57, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/queue/in_memory.py", + "title": "InMemoryTaskQueue", + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)", + "start_line": 9, + "end_line": 38, + "metadata": { + "symbol_id": "2da04cb94544a3bcbf0943a95ad4bdd8710bcafaa32a02fd0e4de2178dcf3533", + "symbol_name": "InMemoryTaskQueue", + "qname": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 9, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "58f0cc001ccda0eee4c6bc32ed83bd05eafd6b6644f1e8b4aa9eed3103db73dc", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/config/file_loader.py", + "title": "ConfigFileLoader", + "content": "ConfigFileLoader\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (8)", + "start_line": 11, + "end_line": 48, + "metadata": { + "symbol_id": "a8474eca8b6e9dc86ae67ed68b16fa5fb639ef08739c053e7b7195489765667f", + "symbol_name": "ConfigFileLoader", + "qname": "ConfigFileLoader", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 8, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/tracing/store.py", + "title": "TraceContextStore", + "content": "TraceContextStore\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "start_line": 15, + "end_line": 52, + "metadata": { + "symbol_id": "b2dad4fbe16ffb11b58deba311c7739955c39d59f291b22181f33e9c8cce4059", + "symbol_name": "TraceContextStore", + "qname": "TraceContextStore", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "d369554f08fc92039c6edd5a2a1e73b23901533e8974459170bbd9347d263dc5", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/workers/supervisor.py", + "title": "WorkerSupervisor", + "content": "WorkerSupervisor\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "start_line": 10, + "end_line": 59, + "metadata": { + "symbol_id": "c17b44e8d9e97d490989b21fa67d7c346cdda8a0472e4c41fb243c8846faa124", + "symbol_name": "WorkerSupervisor", + "qname": "WorkerSupervisor", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "77609d9d5927171cce7fc3a54897c183fd63068710c6362029b700937aae5eee", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/tracing/service.py", + "title": "TraceService.__init__:dataflow_slice", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.create_context", + "start_line": 42, + "end_line": 61, + "metadata": { + "edge_id": "3b052062067a78aef3302ee1d996897e02a67d1b340397bea4f59fe147c0492a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a", + "dst_ref": "TraceService.create_context", + "resolution": "resolved", + "slice_id": "3b052062067a78aef3302ee1d996897e02a67d1b340397bea4f59fe147c0492a", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.create_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/tracing/service.py", + "title": "TraceService.__init__:dataflow_slice", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.close_context", + "start_line": 42, + "end_line": 84, + "metadata": { + "edge_id": "7a9353ef57c9ae5d19b3a0c6ac50fad05e6d21d31bbe1cd1cd07af6332ba6505", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "01e14158dcced7e52d0c8ac84ac7b9a75225c261b6aca6a1d7da802d0994721c", + "dst_ref": "TraceService.close_context", + "resolution": "resolved", + "slice_id": "7a9353ef57c9ae5d19b3a0c6ac50fad05e6d21d31bbe1cd1cd07af6332ba6505", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.close_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "01e14158dcced7e52d0c8ac84ac7b9a75225c261b6aca6a1d7da802d0994721c" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/tracing/service.py", + "title": "TraceService.__init__:dataflow_slice", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.open_context", + "start_line": 42, + "end_line": 78, + "metadata": { + "edge_id": "a6e13b9ebc4fed84586afd53ed92a4d14757e440873f572b2337d5622ee96031", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426", + "dst_ref": "TraceService.open_context", + "resolution": "resolved", + "slice_id": "a6e13b9ebc4fed84586afd53ed92a4d14757e440873f572b2337d5622ee96031", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.open_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/tracing/service.py", + "title": "TraceService.__init__:dataflow_slice", + "content": "TraceService.__init__\n -> TraceService.transport\n -> TraceService.__init__", + "start_line": 41, + "end_line": 43, + "metadata": { + "edge_id": "1e923a93faa05c3c43ca9b19bd047007a8589ccce57d3cc1798ae7f9f200af98", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "dst_ref": "TraceService.__init__", + "resolution": "resolved", + "slice_id": "1e923a93faa05c3c43ca9b19bd047007a8589ccce57d3cc1798ae7f9f200af98", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.transport", + "TraceService.__init__" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/tracing/service.py", + "title": "TraceService.__init__:dataflow_slice", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.current_trace_id", + "start_line": 42, + "end_line": 81, + "metadata": { + "edge_id": "3ea17138634b1190bded77ddb84aa1595124f6519b246f24fc4b02bd62b5cac1", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c", + "dst_ref": "TraceService.current_trace_id", + "resolution": "resolved", + "slice_id": "3ea17138634b1190bded77ddb84aa1595124f6519b246f24fc4b02bd62b5cac1", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.current_trace_id" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/tracing/service.py", + "title": "TraceService.__init__:dataflow_slice", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.step", + "start_line": 42, + "end_line": 88, + "metadata": { + "edge_id": "9f34c5da9b09fba99df6f6b1bde183a9aeb45111b8218a747c71590c2c9f60f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "c44bfbc66cf747283f30088da3e011a10395031d41e77b74e523c24997f641ca", + "dst_ref": "TraceService.step", + "resolution": "resolved", + "slice_id": "9f34c5da9b09fba99df6f6b1bde183a9aeb45111b8218a747c71590c2c9f60f2", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.step" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "c44bfbc66cf747283f30088da3e011a10395031d41e77b74e523c24997f641ca" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C3_ENTRYPOINTS", + "path": "src/app_runtime/control/http_app.py", + "title": "app.post", + "content": "fastapi http app.post", + "start_line": 38, + "end_line": 42, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C3_ENTRYPOINTS", + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "content": "fastapi http app.get", + "start_line": 31, + "end_line": 34, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C3_ENTRYPOINTS", + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "content": "fastapi http app.get", + "start_line": 38, + "end_line": 42, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "relations": [ + { + "path": "src/app_runtime/tracing/service.py", + "metadata": { + "edge_id": "3b052062067a78aef3302ee1d996897e02a67d1b340397bea4f59fe147c0492a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a", + "dst_ref": "TraceService.create_context", + "resolution": "resolved", + "slice_id": "3b052062067a78aef3302ee1d996897e02a67d1b340397bea4f59fe147c0492a", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.create_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.create_context" + }, + { + "path": "src/app_runtime/tracing/service.py", + "metadata": { + "edge_id": "7a9353ef57c9ae5d19b3a0c6ac50fad05e6d21d31bbe1cd1cd07af6332ba6505", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "01e14158dcced7e52d0c8ac84ac7b9a75225c261b6aca6a1d7da802d0994721c", + "dst_ref": "TraceService.close_context", + "resolution": "resolved", + "slice_id": "7a9353ef57c9ae5d19b3a0c6ac50fad05e6d21d31bbe1cd1cd07af6332ba6505", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.close_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "01e14158dcced7e52d0c8ac84ac7b9a75225c261b6aca6a1d7da802d0994721c" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.close_context" + }, + { + "path": "src/app_runtime/tracing/service.py", + "metadata": { + "edge_id": "a6e13b9ebc4fed84586afd53ed92a4d14757e440873f572b2337d5622ee96031", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426", + "dst_ref": "TraceService.open_context", + "resolution": "resolved", + "slice_id": "a6e13b9ebc4fed84586afd53ed92a4d14757e440873f572b2337d5622ee96031", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.open_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.open_context" + }, + { + "path": "src/app_runtime/tracing/service.py", + "metadata": { + "edge_id": "1e923a93faa05c3c43ca9b19bd047007a8589ccce57d3cc1798ae7f9f200af98", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "dst_ref": "TraceService.__init__", + "resolution": "resolved", + "slice_id": "1e923a93faa05c3c43ca9b19bd047007a8589ccce57d3cc1798ae7f9f200af98", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.transport", + "TraceService.__init__" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "TraceService.__init__\n -> TraceService.transport\n -> TraceService.__init__" + }, + { + "path": "src/app_runtime/tracing/service.py", + "metadata": { + "edge_id": "3ea17138634b1190bded77ddb84aa1595124f6519b246f24fc4b02bd62b5cac1", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c", + "dst_ref": "TraceService.current_trace_id", + "resolution": "resolved", + "slice_id": "3ea17138634b1190bded77ddb84aa1595124f6519b246f24fc4b02bd62b5cac1", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.current_trace_id" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.current_trace_id" + }, + { + "path": "src/app_runtime/tracing/service.py", + "metadata": { + "edge_id": "9f34c5da9b09fba99df6f6b1bde183a9aeb45111b8218a747c71590c2c9f60f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "c44bfbc66cf747283f30088da3e011a10395031d41e77b74e523c24997f641ca", + "dst_ref": "TraceService.step", + "resolution": "resolved", + "slice_id": "9f34c5da9b09fba99df6f6b1bde183a9aeb45111b8218a747c71590c2c9f60f2", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.step" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "c44bfbc66cf747283f30088da3e011a10395031d41e77b74e523c24997f641ca" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.step" + } + ], + "entrypoints": [ + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.post", + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "test_candidates": [], + "layer_outcomes": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C4_SEMANTIC_ROLES", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 6, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C3_ENTRYPOINTS", + "hit_count": 3, + "empty": false, + "fallback_used": false + } + ], + "missing_layers": [], + "raw_rows": [ + { + "path": "src/plba/__init__.py", + "content": "const TraceService\nTraceService = plba.tracing.TraceService", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService", + "span_start": 20, + "span_end": 20, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "259ec03b77b9387ea53f69c77af32791dd29adf6de617ba72dd3f839197342a1", + "qname": "TraceService", + "kind": "const", + "signature": "TraceService = plba.tracing.TraceService", + "parent_symbol_id": null, + "package_or_module": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "const TraceService\nTraceService = app_runtime.tracing.service.TraceService", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService", + "span_start": 14, + "span_end": 14, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "3ccf6212fd7d9730f9df933e2ee7671b65bdae0520577e1a49c6432262842db6", + "qname": "TraceService", + "kind": "const", + "signature": "TraceService = app_runtime.tracing.service.TraceService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/__init__.py", + "content": "const TraceService\nTraceService = app_runtime.tracing.service.TraceService", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService", + "span_start": 2, + "span_end": 2, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "ecd2fab7fa9744b2adca84d3d213f7aadcb7e1da84b9c2764a4ab39c65282b11", + "qname": "TraceService", + "kind": "const", + "signature": "TraceService = app_runtime.tracing.service.TraceService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.tracing.__init__", + "is_test": false, + "blob_sha": "a01dea5f773515aeaae8e6d3431fcb93531a8b577dfa26c2e5db16cd6ae6e4d9", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceService\nTraceService(TraceContextFactory)", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService", + "span_start": 39, + "span_end": 166, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "c2b2b976d99f2c600000b753731b26e0a69adcb4359398b93073590c5d5d04f4", + "qname": "TraceService", + "kind": "class", + "signature": "TraceService(TraceContextFactory)", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/tracing.py", + "content": "const TraceService\nTraceService = app_runtime.tracing.service.TraceService", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService", + "span_start": 1, + "span_end": 1, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "a4556fb3f83c50ea68b94a679786ce802cab7ffd9d7138aad3d6009b2661f425", + "qname": "TraceService", + "kind": "const", + "signature": "TraceService = app_runtime.tracing.service.TraceService", + "parent_symbol_id": null, + "package_or_module": "src.plba.tracing", + "is_test": false, + "blob_sha": "a27e11c716c93c3fcefe6f11b4cc420a6b743e7606606071d7f1aeeccc4e7d45", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "method TraceService.open_context\nopen_context(self)", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService.open_context", + "span_start": 66, + "span_end": 78, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426", + "qname": "TraceService.open_context", + "kind": "method", + "signature": "open_context(self)", + "parent_symbol_id": "TraceService", + "package_or_module": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "method TraceService.create_context\ncreate_context(self)", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService.create_context", + "span_start": 45, + "span_end": 63, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a", + "qname": "TraceService.create_context", + "kind": "method", + "signature": "create_context(self)", + "parent_symbol_id": "TraceService", + "package_or_module": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "method TraceService.current_trace_id\ncurrent_trace_id(self)", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService.current_trace_id", + "span_start": 80, + "span_end": 81, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c", + "qname": "TraceService.current_trace_id", + "kind": "method", + "signature": "current_trace_id(self)", + "parent_symbol_id": "TraceService", + "package_or_module": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceService(TraceContextFactory):\n def __init__(self, transport: TraceTransport | None = None, store: TraceContextStore | None = None) -> None:\n self.transport = transport or NoOpTraceTransport()\n self.store = store or TraceContextStore()\n self._writer = TraceRecordWriter(self.transport)\n\n def create_context(\n self,\n *,\n alias: str,\n parent_id: str | None = None,\n kind: str | None = None,\n attrs: dict[str, Any] | None = None,\n ) -> str:\n record = TraceContextRecord(\n trace_id=uuid4().hex,\n alias=str(alias or \"\"),\n parent_id=parent_id,\n type=kind,\n event_time=utc_now(),\n attrs=dict(attrs or {}),\n )\n self.store.push(record)\n self._writer.write_context(record)\n return record.trace_id\n\n @contextmanager\n def open_context(\n self,\n *,\n alias: str,\n parent_id: str | None = None,\n kind: str | None = None,\n attrs: dict[str, Any] | None = None,\n ) -> Iterator[str]:\n trace_id = self.create_context(alias=alias, parent_id=parent_id, kind=kind, attrs=attrs)\n try:\n yield trace_id\n finally:\n self.store.pop()\n\n def current_trace_id(self) -> str | None:\n return self.store.current_trace_id()\n\n def close_context(self) -> str | None:\n previous = self.store.pop()\n return previous.record.trace_id if previous else None\n\n def step(self, name: str) -> None:\n self.store.set_step(str(name or \"\"))\n\n def info(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"INFO\", message, status, attrs)\n\n def debug(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"DEBUG\", message, status, attrs)\n\n def warning(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"WARNING\", message, status, attrs)\n\n def error(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"ERROR\", message, status, attrs)\n\n def exception(self, message: str, *, status: str = \"failed\", attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"ERROR\", message, status, attrs)\n\n def new_root(self, operation: str) -> TraceContext:\n trace_id = self.create_context(alias=operation, kind=\"operation\", attrs={\"operation\": operation})\n return TraceContext(trace_id=trace_id, span_id=trace_id, attributes={\"operation\": operation})\n\n def child_of(self, parent: TraceContext, operation: str) -> TraceContext:\n trace_id = self.create_context(\n alias=operation,\n parent_id=parent.trace_id,\n kind=\"worker\",\n attrs={\"operation\": operation},\n )\n return TraceContext(\n trace_id=trace_id,\n span_id=trace_id,\n parent_span_id=parent.span_id,\n attributes={\"operation\": operation},\n )\n\n def attach(self, metadata: dict[str, object], context: TraceContext) -> dict[str, object]:\n updated = dict(metadata)\n updated[\"trace_id\"] = context.trace_id\n updated[\"span_id\"] = context.span_id\n updated[\"parent_span_id\"] = context.parent_span_id\n return updated\n\n def resume(self, metadata: dict[str, object], operation: str) -> TraceContext:\n trace_id = str(metadata.get(\"trace_id\") or uuid4().hex)\n span_id = str(metadata.get(\"span_id\") or trace_id)\n parent_id = metadata.get(\"parent_span_id\")\n self.create_context(\n alias=operation,\n parent_id=str(parent_id) if parent_id else None,\n kind=\"worker\",\n attrs=dict(metadata),\n )\n return TraceContext(\n trace_id=trace_id,\n span_id=span_id,\n parent_span_id=str(parent_id) if parent_id else None,\n attributes={\"operation\": operation},\n )\n\n def _write_message(\n self,\n level: TraceLevel,\n message: str,\n status: str | None,\n attrs: dict[str, Any] | None,\n ) -> None:\n active = self.store.current()\n if active is None:\n raise RuntimeError(\"Trace context is not bound. Call create_context() first.\")\n record = TraceLogMessage(\n trace_id=active.record.trace_id,\n step=active.step,\n status=str(status or \"\"),\n message=str(message or \"\"),\n level=level,\n event_time=utc_now(),\n attrs=dict(attrs or {}),\n )\n self._writer.write_message(record)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/tracing/service.py:TraceService", + "span_start": 39, + "span_end": 166, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceManager(TraceService):\n \"\"\"Compatibility alias during the transition from ConfigManager-shaped naming.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/tracing/service.py:TraceManager", + "span_start": 169, + "span_end": 170, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 2, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/__init__.py", + "content": "from app_runtime.contracts.trace import TraceContext, TraceContextRecord, TraceLogMessage, TraceTransport\nfrom app_runtime.tracing.service import TraceManager, TraceService\nfrom app_runtime.tracing.store import ActiveTraceContext, TraceContextStore\nfrom app_runtime.tracing.transport import MySqlTraceTransport, NoOpTraceTransport\n\n__all__ = [\n \"ActiveTraceContext\",\n \"MySqlTraceTransport\",\n \"NoOpTraceTransport\",\n \"TraceContext\",\n \"TraceContextRecord\",\n \"TraceContextStore\",\n \"TraceLogMessage\",\n \"TraceManager\",\n \"TraceService\",\n \"TraceTransport\",\n]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/tracing/__init__.py:1-17", + "span_start": 1, + "span_end": 17, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.tracing.__init__", + "is_test": false, + "blob_sha": "a01dea5f773515aeaae8e6d3431fcb93531a8b577dfa26c2e5db16cd6ae6e4d9", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/__init__.py", + "content": "from plba.bootstrap import create_runtime\nfrom plba.config import ConfigFileLoader, FileConfigProvider\nfrom plba.control import ControlActionSet, ControlChannel, ControlPlaneService, HttpControlChannel\nfrom plba.contracts import (\n ApplicationModule,\n ConfigProvider,\n HealthContributor,\n TraceContext,\n TraceContextRecord,\n TraceLogMessage,\n TraceTransport,\n Worker,\n WorkerHealth,\n WorkerStatus,\n)\nfrom plba.core import ConfigurationManager, RuntimeManager, ServiceContainer\nfrom plba.health import HealthRegistry\nfrom plba.logging import LogManager\nfrom plba.queue import InMemoryTaskQueue\nfrom plba.tracing import MySqlTraceTransport, NoOpTraceTransport, TraceService\nfrom plba.workflow import (\n StepResult,\n WorkflowContext,\n WorkflowDefinition,\n WorkflowEngine,\n WorkflowEngineHooks,\n WorkflowNode,\n WorkflowRuntimeFactory,\n WorkflowStep,\n)\nfrom plba.workers import WorkerSupervisor\n\n__all__ = [\n \"ApplicationModule\",\n \"ConfigFileLoader\",\n \"ConfigProvider\",\n \"ConfigurationManager\",\n \"ControlActionSet\",\n \"ControlChannel\",\n \"ControlPlaneService\",\n \"create_runtime\",\n \"FileConfigProvider\",\n \"HealthContributor\",\n \"HealthRegistry\",\n \"HttpControlChannel\",\n \"InMemoryTaskQueue\",\n \"LogManager\",\n \"MySqlTraceTransport\",\n \"NoOpTraceTransport\",\n \"RuntimeManager\",\n \"ServiceContainer\",\n \"TraceContext\",\n \"TraceContextRecord\",\n \"TraceLogMessage\",\n \"TraceService\",\n \"TraceTransport\",\n \"StepResult\",\n \"Worker\",\n \"WorkerHealth\",\n \"WorkerStatus\",\n \"WorkflowContext\",\n \"WorkflowDefinition\",\n \"WorkflowEngine\",\n \"WorkflowEngineHooks\",\n \"WorkflowNode\",\n \"WorkflowRuntimeFactory\",\n \"WorkflowStep\",\n \"WorkerSupervisor\",\n]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/__init__.py:1-69", + "span_start": 1, + "span_end": 69, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/tracing.py", + "content": "from app_runtime.tracing.service import TraceService\nfrom app_runtime.tracing.transport import MySqlTraceTransport, NoOpTraceTransport\n\n__all__ = [\"MySqlTraceTransport\", \"NoOpTraceTransport\", \"TraceService\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/tracing.py:1-4", + "span_start": 1, + "span_end": 4, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.tracing", + "is_test": false, + "blob_sha": "a27e11c716c93c3fcefe6f11b4cc420a6b743e7606606071d7f1aeeccc4e7d45", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/__init__.py", + "content": "__all__: list[str] = []", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/__init__.py:1-1", + "span_start": 1, + "span_end": 1, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.__init__", + "is_test": false, + "blob_sha": "8eea9df4f6d7b38ca0e39ccc27b04700e3d08dbeec8046d613d22706d19985fa", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/providers.py", + "content": "class FileConfigProvider(ConfigProvider):\n def __init__(self, path: str | Path) -> None:\n self._loader = ConfigFileLoader(path)\n\n @property\n def loader(self) -> ConfigFileLoader:\n return self._loader\n\n def load(self) -> dict[str, Any]:\n config = self._loader.load_sync()\n if not isinstance(config, dict):\n raise TypeError(\"Config root must be a mapping\")\n return dict(config)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/config/providers.py:FileConfigProvider", + "span_start": 10, + "span_end": 22, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.config.providers", + "is_test": false, + "blob_sha": "8c53ca0122d6df6c5763bca15e99434bb4daebd5a618b8fc927e9ae90b022e64", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (13)", + "layer": "C4_SEMANTIC_ROLES", + "title": "TraceService", + "span_start": 39, + "span_end": 166, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 60, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "c2b2b976d99f2c600000b753731b26e0a69adcb4359398b93073590c5d5d04f4", + "symbol_name": "TraceService", + "qname": "TraceService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 13, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/queue/in_memory.py", + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)", + "layer": "C4_SEMANTIC_ROLES", + "title": "InMemoryTaskQueue", + "span_start": 9, + "span_end": 38, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 22, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "2da04cb94544a3bcbf0943a95ad4bdd8710bcafaa32a02fd0e4de2178dcf3533", + "symbol_name": "InMemoryTaskQueue", + "qname": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 9, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "58f0cc001ccda0eee4c6bc32ed83bd05eafd6b6644f1e8b4aa9eed3103db73dc", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "ConfigFileLoader\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (8)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ConfigFileLoader", + "span_start": 11, + "span_end": 48, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 23, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "a8474eca8b6e9dc86ae67ed68b16fa5fb639ef08739c053e7b7195489765667f", + "symbol_name": "ConfigFileLoader", + "qname": "ConfigFileLoader", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 8, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/store.py", + "content": "TraceContextStore\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "TraceContextStore", + "span_start": 15, + "span_end": 52, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "b2dad4fbe16ffb11b58deba311c7739955c39d59f291b22181f33e9c8cce4059", + "symbol_name": "TraceContextStore", + "qname": "TraceContextStore", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "d369554f08fc92039c6edd5a2a1e73b23901533e8974459170bbd9347d263dc5", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workers/supervisor.py", + "content": "WorkerSupervisor\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkerSupervisor", + "span_start": 10, + "span_end": 59, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "c17b44e8d9e97d490989b21fa67d7c346cdda8a0472e4c41fb243c8846faa124", + "symbol_name": "WorkerSupervisor", + "qname": "WorkerSupervisor", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "77609d9d5927171cce7fc3a54897c183fd63068710c6362029b700937aae5eee", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.create_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 61, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "3b052062067a78aef3302ee1d996897e02a67d1b340397bea4f59fe147c0492a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a", + "dst_ref": "TraceService.create_context", + "resolution": "resolved", + "slice_id": "3b052062067a78aef3302ee1d996897e02a67d1b340397bea4f59fe147c0492a", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.create_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.close_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 84, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "7a9353ef57c9ae5d19b3a0c6ac50fad05e6d21d31bbe1cd1cd07af6332ba6505", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "01e14158dcced7e52d0c8ac84ac7b9a75225c261b6aca6a1d7da802d0994721c", + "dst_ref": "TraceService.close_context", + "resolution": "resolved", + "slice_id": "7a9353ef57c9ae5d19b3a0c6ac50fad05e6d21d31bbe1cd1cd07af6332ba6505", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.close_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "01e14158dcced7e52d0c8ac84ac7b9a75225c261b6aca6a1d7da802d0994721c" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.open_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 78, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "a6e13b9ebc4fed84586afd53ed92a4d14757e440873f572b2337d5622ee96031", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426", + "dst_ref": "TraceService.open_context", + "resolution": "resolved", + "slice_id": "a6e13b9ebc4fed84586afd53ed92a4d14757e440873f572b2337d5622ee96031", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.open_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.transport\n -> TraceService.__init__", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 41, + "span_end": 43, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "1e923a93faa05c3c43ca9b19bd047007a8589ccce57d3cc1798ae7f9f200af98", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "dst_ref": "TraceService.__init__", + "resolution": "resolved", + "slice_id": "1e923a93faa05c3c43ca9b19bd047007a8589ccce57d3cc1798ae7f9f200af98", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.transport", + "TraceService.__init__" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.current_trace_id", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 81, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "3ea17138634b1190bded77ddb84aa1595124f6519b246f24fc4b02bd62b5cac1", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c", + "dst_ref": "TraceService.current_trace_id", + "resolution": "resolved", + "slice_id": "3ea17138634b1190bded77ddb84aa1595124f6519b246f24fc4b02bd62b5cac1", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.current_trace_id" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.step", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 88, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "9f34c5da9b09fba99df6f6b1bde183a9aeb45111b8218a747c71590c2c9f60f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "c44bfbc66cf747283f30088da3e011a10395031d41e77b74e523c24997f641ca", + "dst_ref": "TraceService.step", + "resolution": "resolved", + "slice_id": "9f34c5da9b09fba99df6f6b1bde183a9aeb45111b8218a747c71590c2c9f60f2", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.step" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "c44bfbc66cf747283f30088da3e011a10395031d41e77b74e523c24997f641ca" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": null, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": null, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": null, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "retrieval_report": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "vector", + "C0_SOURCE_CHUNKS": "vector", + "C4_SEMANTIC_ROLES": "vector", + "C2_DEPENDENCY_GRAPH": "vector", + "C3_ENTRYPOINTS": "vector" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [] + } + }, + "fallback": { + "used": false, + "reason": null + }, + "retrieval_by_layer_ms": { + "C1_SYMBOL_CATALOG": 35, + "C0_SOURCE_CHUNKS": 12, + "C4_SEMANTIC_ROLES": 12, + "C2_DEPENDENCY_GRAPH": 42, + "C3_ENTRYPOINTS": 10 + } + } + }, + "diagnostics": { + "intent_correct": null, + "target_found": true, + "layers_used": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_sufficient": true, + "answer_mode": "normal", + "router_result": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "EXPLAIN", + "path_scope": [], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_resolution_status": "pending" + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Объясни как работает класс TraceService", + "sub_intent": "EXPLAIN", + "path_scope": [], + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C4_SEMANTIC_ROLES", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 6, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C3_ENTRYPOINTS", + "hit_count": 3, + "empty": false, + "fallback_used": false + } + ], + "empty_layers": [], + "evidence_gate_decision": { + "sufficient": true, + "failure_reasons": [], + "evidence_count": 33 + }, + "failure_reasons": [], + "timings_ms": {} + }, + "rag_rows": [ + { + "path": "src/plba/__init__.py", + "content": "const TraceService\nTraceService = plba.tracing.TraceService", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService", + "span_start": 20, + "span_end": 20, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "259ec03b77b9387ea53f69c77af32791dd29adf6de617ba72dd3f839197342a1", + "qname": "TraceService", + "kind": "const", + "signature": "TraceService = plba.tracing.TraceService", + "parent_symbol_id": null, + "package_or_module": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "const TraceService\nTraceService = app_runtime.tracing.service.TraceService", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService", + "span_start": 14, + "span_end": 14, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "3ccf6212fd7d9730f9df933e2ee7671b65bdae0520577e1a49c6432262842db6", + "qname": "TraceService", + "kind": "const", + "signature": "TraceService = app_runtime.tracing.service.TraceService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/__init__.py", + "content": "const TraceService\nTraceService = app_runtime.tracing.service.TraceService", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService", + "span_start": 2, + "span_end": 2, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "ecd2fab7fa9744b2adca84d3d213f7aadcb7e1da84b9c2764a4ab39c65282b11", + "qname": "TraceService", + "kind": "const", + "signature": "TraceService = app_runtime.tracing.service.TraceService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.tracing.__init__", + "is_test": false, + "blob_sha": "a01dea5f773515aeaae8e6d3431fcb93531a8b577dfa26c2e5db16cd6ae6e4d9", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceService\nTraceService(TraceContextFactory)", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService", + "span_start": 39, + "span_end": 166, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "c2b2b976d99f2c600000b753731b26e0a69adcb4359398b93073590c5d5d04f4", + "qname": "TraceService", + "kind": "class", + "signature": "TraceService(TraceContextFactory)", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/tracing.py", + "content": "const TraceService\nTraceService = app_runtime.tracing.service.TraceService", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService", + "span_start": 1, + "span_end": 1, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "a4556fb3f83c50ea68b94a679786ce802cab7ffd9d7138aad3d6009b2661f425", + "qname": "TraceService", + "kind": "const", + "signature": "TraceService = app_runtime.tracing.service.TraceService", + "parent_symbol_id": null, + "package_or_module": "src.plba.tracing", + "is_test": false, + "blob_sha": "a27e11c716c93c3fcefe6f11b4cc420a6b743e7606606071d7f1aeeccc4e7d45", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "method TraceService.open_context\nopen_context(self)", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService.open_context", + "span_start": 66, + "span_end": 78, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426", + "qname": "TraceService.open_context", + "kind": "method", + "signature": "open_context(self)", + "parent_symbol_id": "TraceService", + "package_or_module": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "method TraceService.create_context\ncreate_context(self)", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService.create_context", + "span_start": 45, + "span_end": 63, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a", + "qname": "TraceService.create_context", + "kind": "method", + "signature": "create_context(self)", + "parent_symbol_id": "TraceService", + "package_or_module": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "method TraceService.current_trace_id\ncurrent_trace_id(self)", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService.current_trace_id", + "span_start": 80, + "span_end": 81, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c", + "qname": "TraceService.current_trace_id", + "kind": "method", + "signature": "current_trace_id(self)", + "parent_symbol_id": "TraceService", + "package_or_module": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceService(TraceContextFactory):\n def __init__(self, transport: TraceTransport | None = None, store: TraceContextStore | None = None) -> None:\n self.transport = transport or NoOpTraceTransport()\n self.store = store or TraceContextStore()\n self._writer = TraceRecordWriter(self.transport)\n\n def create_context(\n self,\n *,\n alias: str,\n parent_id: str | None = None,\n kind: str | None = None,\n attrs: dict[str, Any] | None = None,\n ) -> str:\n record = TraceContextRecord(\n trace_id=uuid4().hex,\n alias=str(alias or \"\"),\n parent_id=parent_id,\n type=kind,\n event_time=utc_now(),\n attrs=dict(attrs or {}),\n )\n self.store.push(record)\n self._writer.write_context(record)\n return record.trace_id\n\n @contextmanager\n def open_context(\n self,\n *,\n alias: str,\n parent_id: str | None = None,\n kind: str | None = None,\n attrs: dict[str, Any] | None = None,\n ) -> Iterator[str]:\n trace_id = self.create_context(alias=alias, parent_id=parent_id, kind=kind, attrs=attrs)\n try:\n yield trace_id\n finally:\n self.store.pop()\n\n def current_trace_id(self) -> str | None:\n return self.store.current_trace_id()\n\n def close_context(self) -> str | None:\n previous = self.store.pop()\n return previous.record.trace_id if previous else None\n\n def step(self, name: str) -> None:\n self.store.set_step(str(name or \"\"))\n\n def info(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"INFO\", message, status, attrs)\n\n def debug(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"DEBUG\", message, status, attrs)\n\n def warning(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"WARNING\", message, status, attrs)\n\n def error(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"ERROR\", message, status, attrs)\n\n def exception(self, message: str, *, status: str = \"failed\", attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"ERROR\", message, status, attrs)\n\n def new_root(self, operation: str) -> TraceContext:\n trace_id = self.create_context(alias=operation, kind=\"operation\", attrs={\"operation\": operation})\n return TraceContext(trace_id=trace_id, span_id=trace_id, attributes={\"operation\": operation})\n\n def child_of(self, parent: TraceContext, operation: str) -> TraceContext:\n trace_id = self.create_context(\n alias=operation,\n parent_id=parent.trace_id,\n kind=\"worker\",\n attrs={\"operation\": operation},\n )\n return TraceContext(\n trace_id=trace_id,\n span_id=trace_id,\n parent_span_id=parent.span_id,\n attributes={\"operation\": operation},\n )\n\n def attach(self, metadata: dict[str, object], context: TraceContext) -> dict[str, object]:\n updated = dict(metadata)\n updated[\"trace_id\"] = context.trace_id\n updated[\"span_id\"] = context.span_id\n updated[\"parent_span_id\"] = context.parent_span_id\n return updated\n\n def resume(self, metadata: dict[str, object], operation: str) -> TraceContext:\n trace_id = str(metadata.get(\"trace_id\") or uuid4().hex)\n span_id = str(metadata.get(\"span_id\") or trace_id)\n parent_id = metadata.get(\"parent_span_id\")\n self.create_context(\n alias=operation,\n parent_id=str(parent_id) if parent_id else None,\n kind=\"worker\",\n attrs=dict(metadata),\n )\n return TraceContext(\n trace_id=trace_id,\n span_id=span_id,\n parent_span_id=str(parent_id) if parent_id else None,\n attributes={\"operation\": operation},\n )\n\n def _write_message(\n self,\n level: TraceLevel,\n message: str,\n status: str | None,\n attrs: dict[str, Any] | None,\n ) -> None:\n active = self.store.current()\n if active is None:\n raise RuntimeError(\"Trace context is not bound. Call create_context() first.\")\n record = TraceLogMessage(\n trace_id=active.record.trace_id,\n step=active.step,\n status=str(status or \"\"),\n message=str(message or \"\"),\n level=level,\n event_time=utc_now(),\n attrs=dict(attrs or {}),\n )\n self._writer.write_message(record)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/tracing/service.py:TraceService", + "span_start": 39, + "span_end": 166, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceManager(TraceService):\n \"\"\"Compatibility alias during the transition from ConfigManager-shaped naming.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/tracing/service.py:TraceManager", + "span_start": 169, + "span_end": 170, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 2, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/__init__.py", + "content": "from app_runtime.contracts.trace import TraceContext, TraceContextRecord, TraceLogMessage, TraceTransport\nfrom app_runtime.tracing.service import TraceManager, TraceService\nfrom app_runtime.tracing.store import ActiveTraceContext, TraceContextStore\nfrom app_runtime.tracing.transport import MySqlTraceTransport, NoOpTraceTransport\n\n__all__ = [\n \"ActiveTraceContext\",\n \"MySqlTraceTransport\",\n \"NoOpTraceTransport\",\n \"TraceContext\",\n \"TraceContextRecord\",\n \"TraceContextStore\",\n \"TraceLogMessage\",\n \"TraceManager\",\n \"TraceService\",\n \"TraceTransport\",\n]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/tracing/__init__.py:1-17", + "span_start": 1, + "span_end": 17, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.tracing.__init__", + "is_test": false, + "blob_sha": "a01dea5f773515aeaae8e6d3431fcb93531a8b577dfa26c2e5db16cd6ae6e4d9", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/__init__.py", + "content": "from plba.bootstrap import create_runtime\nfrom plba.config import ConfigFileLoader, FileConfigProvider\nfrom plba.control import ControlActionSet, ControlChannel, ControlPlaneService, HttpControlChannel\nfrom plba.contracts import (\n ApplicationModule,\n ConfigProvider,\n HealthContributor,\n TraceContext,\n TraceContextRecord,\n TraceLogMessage,\n TraceTransport,\n Worker,\n WorkerHealth,\n WorkerStatus,\n)\nfrom plba.core import ConfigurationManager, RuntimeManager, ServiceContainer\nfrom plba.health import HealthRegistry\nfrom plba.logging import LogManager\nfrom plba.queue import InMemoryTaskQueue\nfrom plba.tracing import MySqlTraceTransport, NoOpTraceTransport, TraceService\nfrom plba.workflow import (\n StepResult,\n WorkflowContext,\n WorkflowDefinition,\n WorkflowEngine,\n WorkflowEngineHooks,\n WorkflowNode,\n WorkflowRuntimeFactory,\n WorkflowStep,\n)\nfrom plba.workers import WorkerSupervisor\n\n__all__ = [\n \"ApplicationModule\",\n \"ConfigFileLoader\",\n \"ConfigProvider\",\n \"ConfigurationManager\",\n \"ControlActionSet\",\n \"ControlChannel\",\n \"ControlPlaneService\",\n \"create_runtime\",\n \"FileConfigProvider\",\n \"HealthContributor\",\n \"HealthRegistry\",\n \"HttpControlChannel\",\n \"InMemoryTaskQueue\",\n \"LogManager\",\n \"MySqlTraceTransport\",\n \"NoOpTraceTransport\",\n \"RuntimeManager\",\n \"ServiceContainer\",\n \"TraceContext\",\n \"TraceContextRecord\",\n \"TraceLogMessage\",\n \"TraceService\",\n \"TraceTransport\",\n \"StepResult\",\n \"Worker\",\n \"WorkerHealth\",\n \"WorkerStatus\",\n \"WorkflowContext\",\n \"WorkflowDefinition\",\n \"WorkflowEngine\",\n \"WorkflowEngineHooks\",\n \"WorkflowNode\",\n \"WorkflowRuntimeFactory\",\n \"WorkflowStep\",\n \"WorkerSupervisor\",\n]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/__init__.py:1-69", + "span_start": 1, + "span_end": 69, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/tracing.py", + "content": "from app_runtime.tracing.service import TraceService\nfrom app_runtime.tracing.transport import MySqlTraceTransport, NoOpTraceTransport\n\n__all__ = [\"MySqlTraceTransport\", \"NoOpTraceTransport\", \"TraceService\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/tracing.py:1-4", + "span_start": 1, + "span_end": 4, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.tracing", + "is_test": false, + "blob_sha": "a27e11c716c93c3fcefe6f11b4cc420a6b743e7606606071d7f1aeeccc4e7d45", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/__init__.py", + "content": "__all__: list[str] = []", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/__init__.py:1-1", + "span_start": 1, + "span_end": 1, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.__init__", + "is_test": false, + "blob_sha": "8eea9df4f6d7b38ca0e39ccc27b04700e3d08dbeec8046d613d22706d19985fa", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/providers.py", + "content": "class FileConfigProvider(ConfigProvider):\n def __init__(self, path: str | Path) -> None:\n self._loader = ConfigFileLoader(path)\n\n @property\n def loader(self) -> ConfigFileLoader:\n return self._loader\n\n def load(self) -> dict[str, Any]:\n config = self._loader.load_sync()\n if not isinstance(config, dict):\n raise TypeError(\"Config root must be a mapping\")\n return dict(config)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/config/providers.py:FileConfigProvider", + "span_start": 10, + "span_end": 22, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.config.providers", + "is_test": false, + "blob_sha": "8c53ca0122d6df6c5763bca15e99434bb4daebd5a618b8fc927e9ae90b022e64", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (13)", + "layer": "C4_SEMANTIC_ROLES", + "title": "TraceService", + "span_start": 39, + "span_end": 166, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 60, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "c2b2b976d99f2c600000b753731b26e0a69adcb4359398b93073590c5d5d04f4", + "symbol_name": "TraceService", + "qname": "TraceService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 13, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/queue/in_memory.py", + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)", + "layer": "C4_SEMANTIC_ROLES", + "title": "InMemoryTaskQueue", + "span_start": 9, + "span_end": 38, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 22, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "2da04cb94544a3bcbf0943a95ad4bdd8710bcafaa32a02fd0e4de2178dcf3533", + "symbol_name": "InMemoryTaskQueue", + "qname": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 9, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "58f0cc001ccda0eee4c6bc32ed83bd05eafd6b6644f1e8b4aa9eed3103db73dc", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "ConfigFileLoader\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (8)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ConfigFileLoader", + "span_start": 11, + "span_end": 48, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 23, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "a8474eca8b6e9dc86ae67ed68b16fa5fb639ef08739c053e7b7195489765667f", + "symbol_name": "ConfigFileLoader", + "qname": "ConfigFileLoader", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 8, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/store.py", + "content": "TraceContextStore\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "TraceContextStore", + "span_start": 15, + "span_end": 52, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b2dad4fbe16ffb11b58deba311c7739955c39d59f291b22181f33e9c8cce4059", + "symbol_name": "TraceContextStore", + "qname": "TraceContextStore", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "d369554f08fc92039c6edd5a2a1e73b23901533e8974459170bbd9347d263dc5", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workers/supervisor.py", + "content": "WorkerSupervisor\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkerSupervisor", + "span_start": 10, + "span_end": 59, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "c17b44e8d9e97d490989b21fa67d7c346cdda8a0472e4c41fb243c8846faa124", + "symbol_name": "WorkerSupervisor", + "qname": "WorkerSupervisor", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "77609d9d5927171cce7fc3a54897c183fd63068710c6362029b700937aae5eee", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.create_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 61, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3b052062067a78aef3302ee1d996897e02a67d1b340397bea4f59fe147c0492a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a", + "dst_ref": "TraceService.create_context", + "resolution": "resolved", + "slice_id": "3b052062067a78aef3302ee1d996897e02a67d1b340397bea4f59fe147c0492a", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.create_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.close_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 84, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "7a9353ef57c9ae5d19b3a0c6ac50fad05e6d21d31bbe1cd1cd07af6332ba6505", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "01e14158dcced7e52d0c8ac84ac7b9a75225c261b6aca6a1d7da802d0994721c", + "dst_ref": "TraceService.close_context", + "resolution": "resolved", + "slice_id": "7a9353ef57c9ae5d19b3a0c6ac50fad05e6d21d31bbe1cd1cd07af6332ba6505", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.close_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "01e14158dcced7e52d0c8ac84ac7b9a75225c261b6aca6a1d7da802d0994721c" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.open_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 78, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a6e13b9ebc4fed84586afd53ed92a4d14757e440873f572b2337d5622ee96031", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426", + "dst_ref": "TraceService.open_context", + "resolution": "resolved", + "slice_id": "a6e13b9ebc4fed84586afd53ed92a4d14757e440873f572b2337d5622ee96031", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.open_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.transport\n -> TraceService.__init__", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 41, + "span_end": 43, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "1e923a93faa05c3c43ca9b19bd047007a8589ccce57d3cc1798ae7f9f200af98", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "dst_ref": "TraceService.__init__", + "resolution": "resolved", + "slice_id": "1e923a93faa05c3c43ca9b19bd047007a8589ccce57d3cc1798ae7f9f200af98", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.transport", + "TraceService.__init__" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.current_trace_id", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 81, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3ea17138634b1190bded77ddb84aa1595124f6519b246f24fc4b02bd62b5cac1", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c", + "dst_ref": "TraceService.current_trace_id", + "resolution": "resolved", + "slice_id": "3ea17138634b1190bded77ddb84aa1595124f6519b246f24fc4b02bd62b5cac1", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.current_trace_id" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.step", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 88, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "9f34c5da9b09fba99df6f6b1bde183a9aeb45111b8218a747c71590c2c9f60f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "c44bfbc66cf747283f30088da3e011a10395031d41e77b74e523c24997f641ca", + "dst_ref": "TraceService.step", + "resolution": "resolved", + "slice_id": "9f34c5da9b09fba99df6f6b1bde183a9aeb45111b8218a747c71590c2c9f60f2", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.step" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "c44bfbc66cf747283f30088da3e011a10395031d41e77b74e523c24997f641ca" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "validation": { + "passed": true, + "action": "return", + "reasons": [] + } + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-explain-trace-service.md b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-explain-trace-service.md new file mode 100644 index 0000000..4786f23 --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-explain-trace-service.md @@ -0,0 +1,34 @@ +# plba-v2-explain-trace-service + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: agent_runtime +- mode: full_chain +- passed: True + +## Query +Объясни как работает класс TraceService + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 33, + "llm_answer": "Класс `TraceService` находится в файле `src/app_runtime/tracing/service.py`. Это сервис для управления контекстами трассировки и записи событий в журнал.\n\nЕго основные обязанности:\n- Инициализация сервиса при создании экземпляра (`__init__`) с передачей транспортов и хранилищ контекста.\n- Создание нового контекста трассировки через метод `create_context`, который генерирует уникальный идентификатор трассировки и сохраняет запись контекста в хранилище.\n- Предоставление текущего идентификатора трассировки через метод `current_trace_id`.\n\nКонструктор принимает два необязательных параметра:\n- `transport`: транспорт для отправки сообщений трассировки (по умолчанию используется `NoOpTraceTransport`).\n- `store`: хранилище контекста (по умолчанию используется `TraceContextStore`).\n\nТаким образом, `TraceService` играет ключевую роль в отслеживании и документировании событий приложения, обеспечивая единообразие логирования и мониторинга.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "TraceService" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-control-plane.json b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-control-plane.json new file mode 100644 index 0000000..d3d2afd --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-control-plane.json @@ -0,0 +1,1303 @@ +{ + "case_id": "plba-v2-find-entrypoints-control-plane", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "agent_runtime", + "mode": "full_chain", + "query": "Найди точки входа HTTP control plane", + "actual": { + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 9, + "llm_answer": "Подтверждённые HTTP route points:\n\n- GET /health (src/app_runtime/control/http_app.py:52)\n- POST (не указан конкретный путь, но находится в src/app_runtime/control/http_app.py:38-42)\n- GET (повтор, src/app_runtime/control/http_app.py:38-42)\n\nКандидат на точку входа без явного HTTP route маркера:\n- Класс HttpControlChannel в src/app_runtime/control/http_channel.py:12-57, хотя его прямая роль неясна без дополнительного анализа поведения методов start и stop.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "HTTP", + "control", + "plane" + ], + "layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "query": "Найди точки входа HTTP control plane", + "router_result": { + "schema_version": "1.1", + "intent": "CODE_QA", + "retrieval_profile": "code", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query_plan": { + "raw": "Найди точки входа HTTP control plane", + "normalized": "Найди точки входа HTTP control plane", + "sub_intent": "FIND_ENTRYPOINTS", + "negations": [], + "expansions": [ + "HTTP", + "control", + "plane" + ], + "keyword_hints": [ + "HTTP", + "control", + "plane" + ], + "path_hints": [], + "doc_scope_hints": [], + "symbol_candidates": [ + "HTTP", + "control", + "plane" + ], + "symbol_kind_hint": "class", + "anchors": [ + { + "type": "SYMBOL", + "value": "HTTP", + "source": "user_text", + "subtype": null, + "span": { + "start": 18, + "end": 22 + }, + "confidence": 0.88 + }, + { + "type": "SYMBOL", + "value": "control", + "source": "user_text", + "subtype": null, + "span": { + "start": 23, + "end": 30 + }, + "confidence": 0.88 + }, + { + "type": "SYMBOL", + "value": "plane", + "source": "user_text", + "subtype": null, + "span": { + "start": 31, + "end": 36 + }, + "confidence": 0.88 + } + ] + }, + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C3_ENTRYPOINTS", + "top_k": 12 + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 6 + } + ], + "filters": { + "test_policy": "EXCLUDE", + "path_scope": [], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + }, + "symbol_resolution": { + "status": "pending", + "resolved_symbol": null, + "alternatives": [ + "HTTP", + "control", + "plane" + ], + "confidence": 0.0 + }, + "evidence_policy": { + "require_def": true, + "require_flow": true, + "require_spec": false, + "allow_answer_without_evidence": false + } + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Найди точки входа HTTP control plane", + "sub_intent": "FIND_ENTRYPOINTS", + "path_scope": [], + "keyword_hints": [ + "HTTP", + "control", + "plane" + ], + "symbol_candidates": [ + "HTTP", + "control", + "plane" + ], + "requested_layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ], + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C3_ENTRYPOINTS", + "top_k": 12 + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 6 + } + ], + "filters": { + "test_policy": "EXCLUDE", + "path_scope": [], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + }, + "query_plan": { + "raw": "Найди точки входа HTTP control plane", + "normalized": "Найди точки входа HTTP control plane", + "sub_intent": "FIND_ENTRYPOINTS", + "negations": [], + "expansions": [ + "HTTP", + "control", + "plane" + ], + "keyword_hints": [ + "HTTP", + "control", + "plane" + ], + "path_hints": [], + "doc_scope_hints": [], + "symbol_candidates": [ + "HTTP", + "control", + "plane" + ], + "symbol_kind_hint": "class", + "anchors": [ + { + "type": "SYMBOL", + "value": "HTTP", + "source": "user_text", + "subtype": null, + "span": { + "start": 18, + "end": 22 + }, + "confidence": 0.88 + }, + { + "type": "SYMBOL", + "value": "control", + "source": "user_text", + "subtype": null, + "span": { + "start": 23, + "end": 30 + }, + "confidence": 0.88 + }, + { + "type": "SYMBOL", + "value": "plane", + "source": "user_text", + "subtype": null, + "span": { + "start": 31, + "end": 36 + }, + "confidence": 0.88 + } + ] + } + }, + "retrieval_result": { + "target_symbol_candidates": [], + "resolved_symbol": null, + "symbol_resolution_status": "not_found", + "file_candidates": [ + "src/app_runtime/control/http_app.py", + "src/app_runtime/control/http_channel.py", + "src/app_runtime/control/base.py", + "src/app_runtime/control/__init__.py", + "src/app_runtime/control/http_runner.py" + ], + "code_chunks": [ + { + "layer": "C3_ENTRYPOINTS", + "path": "src/app_runtime/control/http_app.py", + "title": "app.post", + "content": "fastapi http app.post", + "start_line": 38, + "end_line": 42, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C3_ENTRYPOINTS", + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "content": "fastapi http app.get", + "start_line": 31, + "end_line": 34, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C3_ENTRYPOINTS", + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "content": "fastapi http app.get", + "start_line": 38, + "end_line": 42, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/http_channel.py", + "title": "src/app_runtime/control/http_channel.py:HttpControlChannel", + "content": "class HttpControlChannel(ControlChannel):\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._timeout = timeout\n self._runner = UvicornThreadRunner(host, port, timeout)\n self._factory = HttpControlAppFactory()\n self._actions: ControlActionSet | None = None\n\n async def start(self, actions: ControlActionSet) -> None:\n self._actions = actions\n app = self._factory.create(self._health_response, self._action_response)\n await self._runner.start(app)\n\n async def stop(self) -> None:\n await self._runner.stop()\n\n @property\n def port(self) -> int:\n return self._runner.port\n\n async def _health_response(self) -> dict[str, object]:\n if self._actions is None:\n return {\"status\": \"unhealthy\", \"detail\": \"control actions are not configured\"}\n return await asyncio.wait_for(self._actions.health(), timeout=float(self._timeout))\n\n async def _action_response(self, action: str, _client_source: str = \"unknown\") -> JSONResponse:\n if self._actions is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"{action} handler is not configured\"}, status_code=404)\n callbacks = {\n \"start\": self._actions.start,\n \"stop\": self._actions.stop,\n \"status\": self._actions.status,\n }\n callback = callbacks.get(action)\n if callback is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"unsupported action: {action}\"}, status_code=404)\n action_timeout = max(float(self._timeout), 10.0) if action in {\"start\", \"stop\"} else float(self._timeout)\n try:\n detail = await asyncio.wait_for(callback(), timeout=action_timeout)\n except asyncio.TimeoutError:\n return JSONResponse(\n content={\"status\": \"accepted\", \"detail\": f\"{action} operation is still in progress\"},\n status_code=202,\n )\n except Exception as exc:\n return JSONResponse(content={\"status\": \"error\", \"detail\": str(exc)}, status_code=500)\n return JSONResponse(content={\"status\": \"ok\", \"detail\": detail or f\"{action} action accepted\"}, status_code=200)", + "start_line": 12, + "end_line": 57, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/http_app.py", + "title": "src/app_runtime/control/http_app.py:HttpControlAppFactory", + "content": "class HttpControlAppFactory:\n def create(\n self,\n health_provider: Callable[[], Awaitable[HealthPayload]],\n action_provider: Callable[[str, str], Awaitable[JSONResponse]],\n ) -> FastAPI:\n app = FastAPI(title=\"PLBA Control API\")\n\n @app.middleware(\"http\")\n async def log_api_call(request: Request, call_next): # type: ignore[no-untyped-def]\n started = time.monotonic()\n response = await call_next(request)\n response.headers[\"X-Response-Time-Ms\"] = str(int((time.monotonic() - started) * 1000))\n return response\n\n @app.get(\"/health\")\n async def health() -> JSONResponse:\n payload = await health_provider()\n status_code = 200 if payload.get(\"status\") == \"ok\" else 503\n return JSONResponse(content=payload, status_code=status_code)\n\n @app.get(\"/actions/{action}\")\n @app.post(\"/actions/{action}\")\n async def action(action: str, request: Request) -> JSONResponse:\n client_source = self._client_source(request)\n if action in {\"start\", \"stop\"}:\n LOGGER.warning(\"Control action requested: /actions/%s client=%s\", action, client_source)\n return await action_provider(action, client_source)\n\n return app\n\n def _client_source(self, request: Request) -> str:\n explicit_header = request.headers.get(\"X-Client-Source\", \"\").strip()\n if explicit_header:\n return explicit_header\n user_agent = request.headers.get(\"User-Agent\", \"\").strip()\n if user_agent:\n return f\"user-agent:{user_agent}\"\n return \"unknown\"", + "start_line": 15, + "end_line": 53, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/base.py", + "title": "src/app_runtime/control/base.py:ControlActionSet", + "content": "class ControlActionSet:\n health: HealthHandler\n start: ActionHandler\n stop: ActionHandler\n status: ActionHandler", + "start_line": 14, + "end_line": 18, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/__init__.py", + "title": "src/app_runtime/control/__init__.py:1-5", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\"ControlActionSet\", \"ControlChannel\", \"ControlPlaneService\", \"HttpControlChannel\"]", + "start_line": 1, + "end_line": 5, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/base.py", + "title": "src/app_runtime/control/base.py:ControlChannel", + "content": "class ControlChannel(ABC):\n @abstractmethod\n async def start(self, actions: ControlActionSet) -> None:\n \"\"\"Start the control channel and bind handlers.\"\"\"\n\n @abstractmethod\n async def stop(self) -> None:\n \"\"\"Stop the control channel and release resources.\"\"\"", + "start_line": 21, + "end_line": 28, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/http_runner.py", + "title": "src/app_runtime/control/http_runner.py:UvicornThreadRunner", + "content": "class UvicornThreadRunner:\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._host = host\n self._port = port\n self._timeout = timeout\n self._server: Server | None = None\n self._thread: Thread | None = None\n self._error: BaseException | None = None\n\n async def start(self, app: FastAPI) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._error = None\n config = Config(app=app, host=self._host, port=self._port, log_level=\"warning\")\n self._server = Server(config)\n self._thread = Thread(target=self._serve, name=\"plba-http-control\", daemon=True)\n self._thread.start()\n await self._wait_until_started()\n\n async def stop(self) -> None:\n if self._server is None or self._thread is None:\n return\n self._server.should_exit = True\n await asyncio.to_thread(self._thread.join, self._timeout)\n self._server = None\n self._thread = None\n\n @property\n def port(self) -> int:\n if self._server is None or not getattr(self._server, \"servers\", None):\n return self._port\n socket = self._server.servers[0].sockets[0]\n return int(socket.getsockname()[1])\n\n async def _wait_until_started(self) -> None:\n if self._server is None:\n raise RuntimeError(\"Server is not initialized\")\n deadline = asyncio.get_running_loop().time() + max(float(self._timeout), 1.0)\n while not self._server.started:\n if self._error is not None:\n raise RuntimeError(\"HTTP control server failed to start\") from self._error\n if asyncio.get_running_loop().time() >= deadline:\n raise TimeoutError(\"HTTP control server startup timed out\")\n await asyncio.sleep(0.05)\n\n def _serve(self) -> None:\n if self._server is None:\n return\n try:\n asyncio.run(self._server.serve())\n except BaseException as exc: # noqa: BLE001\n self._error = exc", + "start_line": 10, + "end_line": 61, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_runner", + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "relations": [], + "entrypoints": [ + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.post", + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "test_candidates": [], + "layer_outcomes": [ + { + "layer_id": "C3_ENTRYPOINTS", + "hit_count": 3, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 6, + "empty": false, + "fallback_used": false + } + ], + "missing_layers": [], + "raw_rows": [ + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": null, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": null, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": null, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel(ControlChannel):\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._timeout = timeout\n self._runner = UvicornThreadRunner(host, port, timeout)\n self._factory = HttpControlAppFactory()\n self._actions: ControlActionSet | None = None\n\n async def start(self, actions: ControlActionSet) -> None:\n self._actions = actions\n app = self._factory.create(self._health_response, self._action_response)\n await self._runner.start(app)\n\n async def stop(self) -> None:\n await self._runner.stop()\n\n @property\n def port(self) -> int:\n return self._runner.port\n\n async def _health_response(self) -> dict[str, object]:\n if self._actions is None:\n return {\"status\": \"unhealthy\", \"detail\": \"control actions are not configured\"}\n return await asyncio.wait_for(self._actions.health(), timeout=float(self._timeout))\n\n async def _action_response(self, action: str, _client_source: str = \"unknown\") -> JSONResponse:\n if self._actions is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"{action} handler is not configured\"}, status_code=404)\n callbacks = {\n \"start\": self._actions.start,\n \"stop\": self._actions.stop,\n \"status\": self._actions.status,\n }\n callback = callbacks.get(action)\n if callback is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"unsupported action: {action}\"}, status_code=404)\n action_timeout = max(float(self._timeout), 10.0) if action in {\"start\", \"stop\"} else float(self._timeout)\n try:\n detail = await asyncio.wait_for(callback(), timeout=action_timeout)\n except asyncio.TimeoutError:\n return JSONResponse(\n content={\"status\": \"accepted\", \"detail\": f\"{action} operation is still in progress\"},\n status_code=202,\n )\n except Exception as exc:\n return JSONResponse(content={\"status\": \"error\", \"detail\": str(exc)}, status_code=500)\n return JSONResponse(content={\"status\": \"ok\", \"detail\": detail or f\"{action} action accepted\"}, status_code=200)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_channel.py:HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "class HttpControlAppFactory:\n def create(\n self,\n health_provider: Callable[[], Awaitable[HealthPayload]],\n action_provider: Callable[[str, str], Awaitable[JSONResponse]],\n ) -> FastAPI:\n app = FastAPI(title=\"PLBA Control API\")\n\n @app.middleware(\"http\")\n async def log_api_call(request: Request, call_next): # type: ignore[no-untyped-def]\n started = time.monotonic()\n response = await call_next(request)\n response.headers[\"X-Response-Time-Ms\"] = str(int((time.monotonic() - started) * 1000))\n return response\n\n @app.get(\"/health\")\n async def health() -> JSONResponse:\n payload = await health_provider()\n status_code = 200 if payload.get(\"status\") == \"ok\" else 503\n return JSONResponse(content=payload, status_code=status_code)\n\n @app.get(\"/actions/{action}\")\n @app.post(\"/actions/{action}\")\n async def action(action: str, request: Request) -> JSONResponse:\n client_source = self._client_source(request)\n if action in {\"start\", \"stop\"}:\n LOGGER.warning(\"Control action requested: /actions/%s client=%s\", action, client_source)\n return await action_provider(action, client_source)\n\n return app\n\n def _client_source(self, request: Request) -> str:\n explicit_header = request.headers.get(\"X-Client-Source\", \"\").strip()\n if explicit_header:\n return explicit_header\n user_agent = request.headers.get(\"User-Agent\", \"\").strip()\n if user_agent:\n return f\"user-agent:{user_agent}\"\n return \"unknown\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_app.py:HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlActionSet:\n health: HealthHandler\n start: ActionHandler\n stop: ActionHandler\n status: ActionHandler", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\"ControlActionSet\", \"ControlChannel\", \"ControlPlaneService\", \"HttpControlChannel\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/__init__.py:1-5", + "span_start": 1, + "span_end": 5, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlChannel(ABC):\n @abstractmethod\n async def start(self, actions: ControlActionSet) -> None:\n \"\"\"Start the control channel and bind handlers.\"\"\"\n\n @abstractmethod\n async def stop(self) -> None:\n \"\"\"Stop the control channel and release resources.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "class UvicornThreadRunner:\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._host = host\n self._port = port\n self._timeout = timeout\n self._server: Server | None = None\n self._thread: Thread | None = None\n self._error: BaseException | None = None\n\n async def start(self, app: FastAPI) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._error = None\n config = Config(app=app, host=self._host, port=self._port, log_level=\"warning\")\n self._server = Server(config)\n self._thread = Thread(target=self._serve, name=\"plba-http-control\", daemon=True)\n self._thread.start()\n await self._wait_until_started()\n\n async def stop(self) -> None:\n if self._server is None or self._thread is None:\n return\n self._server.should_exit = True\n await asyncio.to_thread(self._thread.join, self._timeout)\n self._server = None\n self._thread = None\n\n @property\n def port(self) -> int:\n if self._server is None or not getattr(self._server, \"servers\", None):\n return self._port\n socket = self._server.servers[0].sockets[0]\n return int(socket.getsockname()[1])\n\n async def _wait_until_started(self) -> None:\n if self._server is None:\n raise RuntimeError(\"Server is not initialized\")\n deadline = asyncio.get_running_loop().time() + max(float(self._timeout), 1.0)\n while not self._server.started:\n if self._error is not None:\n raise RuntimeError(\"HTTP control server failed to start\") from self._error\n if asyncio.get_running_loop().time() >= deadline:\n raise TimeoutError(\"HTTP control server startup timed out\")\n await asyncio.sleep(0.05)\n\n def _serve(self) -> None:\n if self._server is None:\n return\n try:\n asyncio.run(self._server.serve())\n except BaseException as exc: # noqa: BLE001\n self._error = exc", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_runner.py:UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_runner", + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "retrieval_report": { + "executed_layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C3_ENTRYPOINTS": "vector", + "C0_SOURCE_CHUNKS": "vector" + }, + "top_k_by_layer": { + "C3_ENTRYPOINTS": 12, + "C0_SOURCE_CHUNKS": 6 + }, + "filters_by_layer": { + "C3_ENTRYPOINTS": { + "path_scope": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [] + } + }, + "fallback": { + "used": false, + "reason": null + }, + "retrieval_by_layer_ms": { + "C3_ENTRYPOINTS": 14, + "C0_SOURCE_CHUNKS": 17 + } + } + }, + "diagnostics": { + "intent_correct": null, + "target_found": true, + "layers_used": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ], + "retrieval_sufficient": true, + "answer_mode": "normal", + "router_result": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "FIND_ENTRYPOINTS", + "path_scope": [], + "layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ], + "symbol_resolution_status": "pending" + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Найди точки входа HTTP control plane", + "sub_intent": "FIND_ENTRYPOINTS", + "path_scope": [], + "requested_layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "C3_ENTRYPOINTS", + "hit_count": 3, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 6, + "empty": false, + "fallback_used": false + } + ], + "empty_layers": [], + "evidence_gate_decision": { + "sufficient": true, + "failure_reasons": [], + "evidence_count": 9 + }, + "failure_reasons": [], + "timings_ms": {} + }, + "rag_rows": [ + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel(ControlChannel):\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._timeout = timeout\n self._runner = UvicornThreadRunner(host, port, timeout)\n self._factory = HttpControlAppFactory()\n self._actions: ControlActionSet | None = None\n\n async def start(self, actions: ControlActionSet) -> None:\n self._actions = actions\n app = self._factory.create(self._health_response, self._action_response)\n await self._runner.start(app)\n\n async def stop(self) -> None:\n await self._runner.stop()\n\n @property\n def port(self) -> int:\n return self._runner.port\n\n async def _health_response(self) -> dict[str, object]:\n if self._actions is None:\n return {\"status\": \"unhealthy\", \"detail\": \"control actions are not configured\"}\n return await asyncio.wait_for(self._actions.health(), timeout=float(self._timeout))\n\n async def _action_response(self, action: str, _client_source: str = \"unknown\") -> JSONResponse:\n if self._actions is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"{action} handler is not configured\"}, status_code=404)\n callbacks = {\n \"start\": self._actions.start,\n \"stop\": self._actions.stop,\n \"status\": self._actions.status,\n }\n callback = callbacks.get(action)\n if callback is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"unsupported action: {action}\"}, status_code=404)\n action_timeout = max(float(self._timeout), 10.0) if action in {\"start\", \"stop\"} else float(self._timeout)\n try:\n detail = await asyncio.wait_for(callback(), timeout=action_timeout)\n except asyncio.TimeoutError:\n return JSONResponse(\n content={\"status\": \"accepted\", \"detail\": f\"{action} operation is still in progress\"},\n status_code=202,\n )\n except Exception as exc:\n return JSONResponse(content={\"status\": \"error\", \"detail\": str(exc)}, status_code=500)\n return JSONResponse(content={\"status\": \"ok\", \"detail\": detail or f\"{action} action accepted\"}, status_code=200)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_channel.py:HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "class HttpControlAppFactory:\n def create(\n self,\n health_provider: Callable[[], Awaitable[HealthPayload]],\n action_provider: Callable[[str, str], Awaitable[JSONResponse]],\n ) -> FastAPI:\n app = FastAPI(title=\"PLBA Control API\")\n\n @app.middleware(\"http\")\n async def log_api_call(request: Request, call_next): # type: ignore[no-untyped-def]\n started = time.monotonic()\n response = await call_next(request)\n response.headers[\"X-Response-Time-Ms\"] = str(int((time.monotonic() - started) * 1000))\n return response\n\n @app.get(\"/health\")\n async def health() -> JSONResponse:\n payload = await health_provider()\n status_code = 200 if payload.get(\"status\") == \"ok\" else 503\n return JSONResponse(content=payload, status_code=status_code)\n\n @app.get(\"/actions/{action}\")\n @app.post(\"/actions/{action}\")\n async def action(action: str, request: Request) -> JSONResponse:\n client_source = self._client_source(request)\n if action in {\"start\", \"stop\"}:\n LOGGER.warning(\"Control action requested: /actions/%s client=%s\", action, client_source)\n return await action_provider(action, client_source)\n\n return app\n\n def _client_source(self, request: Request) -> str:\n explicit_header = request.headers.get(\"X-Client-Source\", \"\").strip()\n if explicit_header:\n return explicit_header\n user_agent = request.headers.get(\"User-Agent\", \"\").strip()\n if user_agent:\n return f\"user-agent:{user_agent}\"\n return \"unknown\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_app.py:HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlActionSet:\n health: HealthHandler\n start: ActionHandler\n stop: ActionHandler\n status: ActionHandler", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\"ControlActionSet\", \"ControlChannel\", \"ControlPlaneService\", \"HttpControlChannel\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/__init__.py:1-5", + "span_start": 1, + "span_end": 5, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlChannel(ABC):\n @abstractmethod\n async def start(self, actions: ControlActionSet) -> None:\n \"\"\"Start the control channel and bind handlers.\"\"\"\n\n @abstractmethod\n async def stop(self) -> None:\n \"\"\"Stop the control channel and release resources.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "class UvicornThreadRunner:\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._host = host\n self._port = port\n self._timeout = timeout\n self._server: Server | None = None\n self._thread: Thread | None = None\n self._error: BaseException | None = None\n\n async def start(self, app: FastAPI) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._error = None\n config = Config(app=app, host=self._host, port=self._port, log_level=\"warning\")\n self._server = Server(config)\n self._thread = Thread(target=self._serve, name=\"plba-http-control\", daemon=True)\n self._thread.start()\n await self._wait_until_started()\n\n async def stop(self) -> None:\n if self._server is None or self._thread is None:\n return\n self._server.should_exit = True\n await asyncio.to_thread(self._thread.join, self._timeout)\n self._server = None\n self._thread = None\n\n @property\n def port(self) -> int:\n if self._server is None or not getattr(self._server, \"servers\", None):\n return self._port\n socket = self._server.servers[0].sockets[0]\n return int(socket.getsockname()[1])\n\n async def _wait_until_started(self) -> None:\n if self._server is None:\n raise RuntimeError(\"Server is not initialized\")\n deadline = asyncio.get_running_loop().time() + max(float(self._timeout), 1.0)\n while not self._server.started:\n if self._error is not None:\n raise RuntimeError(\"HTTP control server failed to start\") from self._error\n if asyncio.get_running_loop().time() >= deadline:\n raise TimeoutError(\"HTTP control server startup timed out\")\n await asyncio.sleep(0.05)\n\n def _serve(self) -> None:\n if self._server is None:\n return\n try:\n asyncio.run(self._server.serve())\n except BaseException as exc: # noqa: BLE001\n self._error = exc", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_runner.py:UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_runner", + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "validation": { + "passed": true, + "action": "return", + "reasons": [] + } + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-control-plane.md b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-control-plane.md new file mode 100644 index 0000000..86db5f1 --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-control-plane.md @@ -0,0 +1,33 @@ +# plba-v2-find-entrypoints-control-plane + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: agent_runtime +- mode: full_chain +- passed: True + +## Query +Найди точки входа HTTP control plane + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 9, + "llm_answer": "Подтверждённые HTTP route points:\n\n- GET /health (src/app_runtime/control/http_app.py:52)\n- POST (не указан конкретный путь, но находится в src/app_runtime/control/http_app.py:38-42)\n- GET (повтор, src/app_runtime/control/http_app.py:38-42)\n\nКандидат на точку входа без явного HTTP route маркера:\n- Класс HttpControlChannel в src/app_runtime/control/http_channel.py:12-57, хотя его прямая роль неясна без дополнительного анализа поведения методов start и stop.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "HTTP", + "control", + "plane" + ], + "layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-health-endpoint.json b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-health-endpoint.json new file mode 100644 index 0000000..38d9ece --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-health-endpoint.json @@ -0,0 +1,1274 @@ +{ + "case_id": "plba-v2-find-entrypoints-health-endpoint", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "agent_runtime", + "mode": "full_chain", + "query": "Где health endpoint?", + "actual": { + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 9, + "llm_answer": "Конкретный health endpoint не обнаружен напрямую.\n\nОднако подтверждённые HTTP routes:\n- GET / (объявлен в src/app_runtime/control/http_app.py:31-34)\n- POST / (объявлен в src/app_runtime/control/http_app.py:38-42)\n- GET / (повторное объявление в src/app_runtime/control/http_app.py:38-42)", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "health", + "endpoint" + ], + "layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ] + }, + "passed": false, + "mismatches": [ + "llm: expected answer to contain 'GET /health'" + ], + "details": { + "query": "Где health endpoint?", + "router_result": { + "schema_version": "1.1", + "intent": "CODE_QA", + "retrieval_profile": "code", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query_plan": { + "raw": "Где health endpoint?", + "normalized": "Где health endpoint?", + "sub_intent": "FIND_ENTRYPOINTS", + "negations": [], + "expansions": [ + "health", + "endpoint" + ], + "keyword_hints": [ + "health", + "endpoint" + ], + "path_hints": [], + "doc_scope_hints": [], + "symbol_candidates": [ + "health", + "endpoint" + ], + "symbol_kind_hint": "unknown", + "anchors": [ + { + "type": "SYMBOL", + "value": "health", + "source": "user_text", + "subtype": null, + "span": { + "start": 4, + "end": 10 + }, + "confidence": 0.88 + }, + { + "type": "SYMBOL", + "value": "endpoint", + "source": "user_text", + "subtype": null, + "span": { + "start": 11, + "end": 19 + }, + "confidence": 0.88 + } + ] + }, + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C3_ENTRYPOINTS", + "top_k": 12 + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 6 + } + ], + "filters": { + "test_policy": "EXCLUDE", + "path_scope": [], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + }, + "symbol_resolution": { + "status": "pending", + "resolved_symbol": null, + "alternatives": [ + "health", + "endpoint" + ], + "confidence": 0.0 + }, + "evidence_policy": { + "require_def": true, + "require_flow": true, + "require_spec": false, + "allow_answer_without_evidence": false + } + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Где health endpoint?", + "sub_intent": "FIND_ENTRYPOINTS", + "path_scope": [], + "keyword_hints": [ + "health", + "endpoint" + ], + "symbol_candidates": [ + "health", + "endpoint" + ], + "requested_layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ], + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C3_ENTRYPOINTS", + "top_k": 12 + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 6 + } + ], + "filters": { + "test_policy": "EXCLUDE", + "path_scope": [], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + }, + "query_plan": { + "raw": "Где health endpoint?", + "normalized": "Где health endpoint?", + "sub_intent": "FIND_ENTRYPOINTS", + "negations": [], + "expansions": [ + "health", + "endpoint" + ], + "keyword_hints": [ + "health", + "endpoint" + ], + "path_hints": [], + "doc_scope_hints": [], + "symbol_candidates": [ + "health", + "endpoint" + ], + "symbol_kind_hint": "unknown", + "anchors": [ + { + "type": "SYMBOL", + "value": "health", + "source": "user_text", + "subtype": null, + "span": { + "start": 4, + "end": 10 + }, + "confidence": 0.88 + }, + { + "type": "SYMBOL", + "value": "endpoint", + "source": "user_text", + "subtype": null, + "span": { + "start": 11, + "end": 19 + }, + "confidence": 0.88 + } + ] + } + }, + "retrieval_result": { + "target_symbol_candidates": [], + "resolved_symbol": null, + "symbol_resolution_status": "not_found", + "file_candidates": [ + "src/app_runtime/control/http_app.py", + "src/app_runtime/health/registry.py", + "src/plba/health.py", + "src/app_runtime/contracts/health.py", + "src/app_runtime/health/__init__.py", + "src/app_runtime/contracts/worker.py" + ], + "code_chunks": [ + { + "layer": "C3_ENTRYPOINTS", + "path": "src/app_runtime/control/http_app.py", + "title": "app.post", + "content": "fastapi http app.post", + "start_line": 38, + "end_line": 42, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C3_ENTRYPOINTS", + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "content": "fastapi http app.get", + "start_line": 31, + "end_line": 34, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C3_ENTRYPOINTS", + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "content": "fastapi http app.get", + "start_line": 38, + "end_line": 42, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/health/registry.py", + "title": "src/app_runtime/health/registry.py:HealthRegistry", + "content": "class HealthRegistry:\n def __init__(self) -> None:\n self._contributors: list[HealthContributor] = []\n\n def register(self, contributor: HealthContributor) -> None:\n self._contributors.append(contributor)\n\n def contributor_healths(self) -> list[WorkerHealth]:\n return [contributor.health() for contributor in self._contributors]\n\n def snapshot(self, worker_healths: list[WorkerHealth]) -> dict[str, object]:\n component_healths = worker_healths + self.contributor_healths()\n return {\n \"status\": self._aggregate_status(component_healths),\n \"components\": [self._health_dict(item) for item in component_healths],\n }\n\n def payload(self, state: LifecycleState, worker_healths: list[WorkerHealth]) -> HealthPayload:\n component_healths = worker_healths + self.contributor_healths()\n if state == LifecycleState.STOPPED:\n return {\"status\": \"unhealthy\", \"detail\": \"state=stopped\", \"state\": state.value}\n if state in {LifecycleState.STARTING, LifecycleState.STOPPING}:\n return {\n \"status\": \"degraded\",\n \"detail\": f\"state={state.value}\",\n \"state\": state.value,\n \"components\": [self._health_dict(item) for item in component_healths],\n }\n return {\n \"status\": self._aggregate_status(component_healths),\n \"state\": state.value,\n \"components\": [self._health_dict(item) for item in component_healths],\n }\n\n def _aggregate_status(self, component_healths: list[WorkerHealth]) -> str:\n if any(item.status == \"unhealthy\" and item.critical for item in component_healths):\n return \"unhealthy\"\n if any(item.status in {\"degraded\", \"unhealthy\"} for item in component_healths):\n return \"degraded\"\n return \"ok\"\n\n def _health_dict(self, health: WorkerHealth) -> dict[str, object]:\n return {\n \"name\": health.name,\n \"status\": health.status,\n \"critical\": health.critical,\n \"detail\": health.detail,\n \"meta\": health.meta,\n }", + "start_line": 8, + "end_line": 56, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.health.registry", + "is_test": false, + "blob_sha": "26e6a24daa43407ba5340b74497c20153020e79f8d7828ae502aaec378dfcf75", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/plba/health.py", + "title": "src/app_runtime/health/__init__.py:1-3", + "content": "from app_runtime.health.registry import HealthRegistry\n\n__all__ = [\"HealthRegistry\"]", + "start_line": 1, + "end_line": 3, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.health.__init__", + "is_test": false, + "blob_sha": "f7b15eed8b1f1cca8dfd467909a2612d8cb4e66e46b972ad89a0c9459ce283a0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/contracts/health.py", + "title": "src/app_runtime/contracts/health.py:HealthContributor", + "content": "class HealthContributor(ABC):\n @abstractmethod\n def health(self) -> WorkerHealth:\n \"\"\"Return contributor health state.\"\"\"", + "start_line": 7, + "end_line": 10, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.health", + "is_test": false, + "blob_sha": "6bd92611def7131e32d4dd34a8ed85e6cf3c67722ad27797032a632cb30dc097", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/health/__init__.py", + "title": "src/app_runtime/health/__init__.py:1-3", + "content": "from app_runtime.health.registry import HealthRegistry\n\n__all__ = [\"HealthRegistry\"]", + "start_line": 1, + "end_line": 3, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.health.__init__", + "is_test": false, + "blob_sha": "f7b15eed8b1f1cca8dfd467909a2612d8cb4e66e46b972ad89a0c9459ce283a0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/contracts/worker.py", + "title": "src/app_runtime/contracts/worker.py:WorkerHealth", + "content": "class WorkerHealth:\n name: str\n status: HealthState\n critical: bool\n detail: str | None = None\n meta: dict[str, Any] = field(default_factory=dict)", + "start_line": 13, + "end_line": 18, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.worker", + "is_test": false, + "blob_sha": "e4827d32220f322d8adc3e42769da3ca0cc680db6a5eab7a11f4d8773a75304e", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/contracts/worker.py", + "title": "src/app_runtime/contracts/worker.py:Worker", + "content": "class Worker(ABC):\n @property\n @abstractmethod\n def name(self) -> str:\n \"\"\"Stable worker name for diagnostics.\"\"\"\n\n @property\n @abstractmethod\n def critical(self) -> bool:\n \"\"\"Whether this worker is required for healthy app operation.\"\"\"\n\n @abstractmethod\n def start(self) -> None:\n \"\"\"Start worker execution.\"\"\"\n\n @abstractmethod\n def stop(self, force: bool = False) -> None:\n \"\"\"Request graceful or immediate stop.\"\"\"\n\n @abstractmethod\n def health(self) -> WorkerHealth:\n \"\"\"Return current health state.\"\"\"\n\n @abstractmethod\n def status(self) -> WorkerStatus:\n \"\"\"Return current runtime status.\"\"\"", + "start_line": 30, + "end_line": 55, + "metadata": { + "chunk_index": 2, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.worker", + "is_test": false, + "blob_sha": "e4827d32220f322d8adc3e42769da3ca0cc680db6a5eab7a11f4d8773a75304e", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "relations": [], + "entrypoints": [ + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.post", + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "test_candidates": [], + "layer_outcomes": [ + { + "layer_id": "C3_ENTRYPOINTS", + "hit_count": 3, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 6, + "empty": false, + "fallback_used": false + } + ], + "missing_layers": [], + "raw_rows": [ + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": null, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": null, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": null, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/health/registry.py", + "content": "class HealthRegistry:\n def __init__(self) -> None:\n self._contributors: list[HealthContributor] = []\n\n def register(self, contributor: HealthContributor) -> None:\n self._contributors.append(contributor)\n\n def contributor_healths(self) -> list[WorkerHealth]:\n return [contributor.health() for contributor in self._contributors]\n\n def snapshot(self, worker_healths: list[WorkerHealth]) -> dict[str, object]:\n component_healths = worker_healths + self.contributor_healths()\n return {\n \"status\": self._aggregate_status(component_healths),\n \"components\": [self._health_dict(item) for item in component_healths],\n }\n\n def payload(self, state: LifecycleState, worker_healths: list[WorkerHealth]) -> HealthPayload:\n component_healths = worker_healths + self.contributor_healths()\n if state == LifecycleState.STOPPED:\n return {\"status\": \"unhealthy\", \"detail\": \"state=stopped\", \"state\": state.value}\n if state in {LifecycleState.STARTING, LifecycleState.STOPPING}:\n return {\n \"status\": \"degraded\",\n \"detail\": f\"state={state.value}\",\n \"state\": state.value,\n \"components\": [self._health_dict(item) for item in component_healths],\n }\n return {\n \"status\": self._aggregate_status(component_healths),\n \"state\": state.value,\n \"components\": [self._health_dict(item) for item in component_healths],\n }\n\n def _aggregate_status(self, component_healths: list[WorkerHealth]) -> str:\n if any(item.status == \"unhealthy\" and item.critical for item in component_healths):\n return \"unhealthy\"\n if any(item.status in {\"degraded\", \"unhealthy\"} for item in component_healths):\n return \"degraded\"\n return \"ok\"\n\n def _health_dict(self, health: WorkerHealth) -> dict[str, object]:\n return {\n \"name\": health.name,\n \"status\": health.status,\n \"critical\": health.critical,\n \"detail\": health.detail,\n \"meta\": health.meta,\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/health/registry.py:HealthRegistry", + "span_start": 8, + "span_end": 56, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.health.registry", + "is_test": false, + "blob_sha": "26e6a24daa43407ba5340b74497c20153020e79f8d7828ae502aaec378dfcf75", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/health.py", + "content": "from app_runtime.health.registry import HealthRegistry\n\n__all__ = [\"HealthRegistry\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/health/__init__.py:1-3", + "span_start": 1, + "span_end": 3, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.health.__init__", + "is_test": false, + "blob_sha": "f7b15eed8b1f1cca8dfd467909a2612d8cb4e66e46b972ad89a0c9459ce283a0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/health.py", + "content": "class HealthContributor(ABC):\n @abstractmethod\n def health(self) -> WorkerHealth:\n \"\"\"Return contributor health state.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/contracts/health.py:HealthContributor", + "span_start": 7, + "span_end": 10, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.health", + "is_test": false, + "blob_sha": "6bd92611def7131e32d4dd34a8ed85e6cf3c67722ad27797032a632cb30dc097", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/health/__init__.py", + "content": "from app_runtime.health.registry import HealthRegistry\n\n__all__ = [\"HealthRegistry\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/health/__init__.py:1-3", + "span_start": 1, + "span_end": 3, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.health.__init__", + "is_test": false, + "blob_sha": "f7b15eed8b1f1cca8dfd467909a2612d8cb4e66e46b972ad89a0c9459ce283a0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/worker.py", + "content": "class WorkerHealth:\n name: str\n status: HealthState\n critical: bool\n detail: str | None = None\n meta: dict[str, Any] = field(default_factory=dict)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/contracts/worker.py:WorkerHealth", + "span_start": 13, + "span_end": 18, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.worker", + "is_test": false, + "blob_sha": "e4827d32220f322d8adc3e42769da3ca0cc680db6a5eab7a11f4d8773a75304e", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/worker.py", + "content": "class Worker(ABC):\n @property\n @abstractmethod\n def name(self) -> str:\n \"\"\"Stable worker name for diagnostics.\"\"\"\n\n @property\n @abstractmethod\n def critical(self) -> bool:\n \"\"\"Whether this worker is required for healthy app operation.\"\"\"\n\n @abstractmethod\n def start(self) -> None:\n \"\"\"Start worker execution.\"\"\"\n\n @abstractmethod\n def stop(self, force: bool = False) -> None:\n \"\"\"Request graceful or immediate stop.\"\"\"\n\n @abstractmethod\n def health(self) -> WorkerHealth:\n \"\"\"Return current health state.\"\"\"\n\n @abstractmethod\n def status(self) -> WorkerStatus:\n \"\"\"Return current runtime status.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/contracts/worker.py:Worker", + "span_start": 30, + "span_end": 55, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 2, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.worker", + "is_test": false, + "blob_sha": "e4827d32220f322d8adc3e42769da3ca0cc680db6a5eab7a11f4d8773a75304e", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "retrieval_report": { + "executed_layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C3_ENTRYPOINTS": "vector", + "C0_SOURCE_CHUNKS": "vector" + }, + "top_k_by_layer": { + "C3_ENTRYPOINTS": 12, + "C0_SOURCE_CHUNKS": 6 + }, + "filters_by_layer": { + "C3_ENTRYPOINTS": { + "path_scope": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [] + } + }, + "fallback": { + "used": false, + "reason": null + }, + "retrieval_by_layer_ms": { + "C3_ENTRYPOINTS": 37, + "C0_SOURCE_CHUNKS": 24 + } + } + }, + "diagnostics": { + "intent_correct": null, + "target_found": true, + "layers_used": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ], + "retrieval_sufficient": true, + "answer_mode": "normal", + "router_result": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "FIND_ENTRYPOINTS", + "path_scope": [], + "layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ], + "symbol_resolution_status": "pending" + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Где health endpoint?", + "sub_intent": "FIND_ENTRYPOINTS", + "path_scope": [], + "requested_layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "C3_ENTRYPOINTS", + "hit_count": 3, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 6, + "empty": false, + "fallback_used": false + } + ], + "empty_layers": [], + "evidence_gate_decision": { + "sufficient": true, + "failure_reasons": [], + "evidence_count": 9 + }, + "failure_reasons": [], + "timings_ms": {} + }, + "rag_rows": [ + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/health/registry.py", + "content": "class HealthRegistry:\n def __init__(self) -> None:\n self._contributors: list[HealthContributor] = []\n\n def register(self, contributor: HealthContributor) -> None:\n self._contributors.append(contributor)\n\n def contributor_healths(self) -> list[WorkerHealth]:\n return [contributor.health() for contributor in self._contributors]\n\n def snapshot(self, worker_healths: list[WorkerHealth]) -> dict[str, object]:\n component_healths = worker_healths + self.contributor_healths()\n return {\n \"status\": self._aggregate_status(component_healths),\n \"components\": [self._health_dict(item) for item in component_healths],\n }\n\n def payload(self, state: LifecycleState, worker_healths: list[WorkerHealth]) -> HealthPayload:\n component_healths = worker_healths + self.contributor_healths()\n if state == LifecycleState.STOPPED:\n return {\"status\": \"unhealthy\", \"detail\": \"state=stopped\", \"state\": state.value}\n if state in {LifecycleState.STARTING, LifecycleState.STOPPING}:\n return {\n \"status\": \"degraded\",\n \"detail\": f\"state={state.value}\",\n \"state\": state.value,\n \"components\": [self._health_dict(item) for item in component_healths],\n }\n return {\n \"status\": self._aggregate_status(component_healths),\n \"state\": state.value,\n \"components\": [self._health_dict(item) for item in component_healths],\n }\n\n def _aggregate_status(self, component_healths: list[WorkerHealth]) -> str:\n if any(item.status == \"unhealthy\" and item.critical for item in component_healths):\n return \"unhealthy\"\n if any(item.status in {\"degraded\", \"unhealthy\"} for item in component_healths):\n return \"degraded\"\n return \"ok\"\n\n def _health_dict(self, health: WorkerHealth) -> dict[str, object]:\n return {\n \"name\": health.name,\n \"status\": health.status,\n \"critical\": health.critical,\n \"detail\": health.detail,\n \"meta\": health.meta,\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/health/registry.py:HealthRegistry", + "span_start": 8, + "span_end": 56, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.health.registry", + "is_test": false, + "blob_sha": "26e6a24daa43407ba5340b74497c20153020e79f8d7828ae502aaec378dfcf75", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/health.py", + "content": "from app_runtime.health.registry import HealthRegistry\n\n__all__ = [\"HealthRegistry\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/health/__init__.py:1-3", + "span_start": 1, + "span_end": 3, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.health.__init__", + "is_test": false, + "blob_sha": "f7b15eed8b1f1cca8dfd467909a2612d8cb4e66e46b972ad89a0c9459ce283a0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/health.py", + "content": "class HealthContributor(ABC):\n @abstractmethod\n def health(self) -> WorkerHealth:\n \"\"\"Return contributor health state.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/contracts/health.py:HealthContributor", + "span_start": 7, + "span_end": 10, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.health", + "is_test": false, + "blob_sha": "6bd92611def7131e32d4dd34a8ed85e6cf3c67722ad27797032a632cb30dc097", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/health/__init__.py", + "content": "from app_runtime.health.registry import HealthRegistry\n\n__all__ = [\"HealthRegistry\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/health/__init__.py:1-3", + "span_start": 1, + "span_end": 3, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.health.__init__", + "is_test": false, + "blob_sha": "f7b15eed8b1f1cca8dfd467909a2612d8cb4e66e46b972ad89a0c9459ce283a0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/worker.py", + "content": "class WorkerHealth:\n name: str\n status: HealthState\n critical: bool\n detail: str | None = None\n meta: dict[str, Any] = field(default_factory=dict)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/contracts/worker.py:WorkerHealth", + "span_start": 13, + "span_end": 18, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.worker", + "is_test": false, + "blob_sha": "e4827d32220f322d8adc3e42769da3ca0cc680db6a5eab7a11f4d8773a75304e", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/worker.py", + "content": "class Worker(ABC):\n @property\n @abstractmethod\n def name(self) -> str:\n \"\"\"Stable worker name for diagnostics.\"\"\"\n\n @property\n @abstractmethod\n def critical(self) -> bool:\n \"\"\"Whether this worker is required for healthy app operation.\"\"\"\n\n @abstractmethod\n def start(self) -> None:\n \"\"\"Start worker execution.\"\"\"\n\n @abstractmethod\n def stop(self, force: bool = False) -> None:\n \"\"\"Request graceful or immediate stop.\"\"\"\n\n @abstractmethod\n def health(self) -> WorkerHealth:\n \"\"\"Return current health state.\"\"\"\n\n @abstractmethod\n def status(self) -> WorkerStatus:\n \"\"\"Return current runtime status.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/contracts/worker.py:Worker", + "span_start": 30, + "span_end": 55, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 2, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.worker", + "is_test": false, + "blob_sha": "e4827d32220f322d8adc3e42769da3ca0cc680db6a5eab7a11f4d8773a75304e", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "validation": { + "passed": true, + "action": "return", + "reasons": [] + } + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-health-endpoint.md b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-health-endpoint.md new file mode 100644 index 0000000..108557a --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-health-endpoint.md @@ -0,0 +1,32 @@ +# plba-v2-find-entrypoints-health-endpoint + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: agent_runtime +- mode: full_chain +- passed: False + +## Query +Где health endpoint? + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 9, + "llm_answer": "Конкретный health endpoint не обнаружен напрямую.\n\nОднако подтверждённые HTTP routes:\n- GET / (объявлен в src/app_runtime/control/http_app.py:31-34)\n- POST / (объявлен в src/app_runtime/control/http_app.py:38-42)\n- GET / (повторное объявление в src/app_runtime/control/http_app.py:38-42)", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "health", + "endpoint" + ], + "layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- llm: expected answer to contain 'GET /health' \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-find-tests-create-runtime.json b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-find-tests-create-runtime.json new file mode 100644 index 0000000..d7b55d8 --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-find-tests-create-runtime.json @@ -0,0 +1,2746 @@ +{ + "case_id": "plba-v2-find-tests-create-runtime", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "agent_runtime", + "mode": "full_chain", + "query": "Где тесты для create_runtime?", + "actual": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 24, + "llm_answer": "Прямых тестов для `create_runtime` не обнаружено. Ближайший тест находится в файле `tests/test_runtime.py`, но он проверяет экспорт публичных контрактов пакета PLBA, а не непосредственно сам метод `create_runtime`. Косвенное покрытие отсутствует.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "create_runtime" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "query": "Где тесты для create_runtime?", + "router_result": { + "schema_version": "1.1", + "intent": "CODE_QA", + "retrieval_profile": "code", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query_plan": { + "raw": "Где тесты для create_runtime?", + "normalized": "Где тесты для create_runtime?", + "sub_intent": "FIND_TESTS", + "negations": [], + "expansions": [ + "test", + "unit test", + "create_runtime" + ], + "keyword_hints": [ + "create_runtime" + ], + "path_hints": [], + "doc_scope_hints": [], + "symbol_candidates": [ + "create_runtime" + ], + "symbol_kind_hint": "function", + "anchors": [ + { + "type": "SYMBOL", + "value": "create_runtime", + "source": "user_text", + "subtype": null, + "span": { + "start": 14, + "end": 28 + }, + "confidence": 0.88 + }, + { + "type": "KEY_TERM", + "value": "тест", + "source": "user_text", + "subtype": null, + "span": { + "start": 4, + "end": 9 + }, + "confidence": 0.9 + } + ] + }, + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "top_k": 8 + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "top_k": 6 + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 10 + } + ], + "filters": { + "test_policy": "INCLUDE", + "path_scope": [], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "test_file_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "test_symbol_patterns": [ + "test_create_runtime", + "Testcreate_runtime", + "create_runtime" + ], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + }, + "symbol_resolution": { + "status": "pending", + "resolved_symbol": null, + "alternatives": [ + "create_runtime" + ], + "confidence": 0.0 + }, + "evidence_policy": { + "require_def": true, + "require_flow": true, + "require_spec": false, + "allow_answer_without_evidence": false + } + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Где тесты для create_runtime?", + "sub_intent": "FIND_TESTS", + "path_scope": [], + "keyword_hints": [ + "create_runtime" + ], + "symbol_candidates": [ + "create_runtime" + ], + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "top_k": 8 + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "top_k": 6 + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 10 + } + ], + "filters": { + "test_policy": "INCLUDE", + "path_scope": [], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "test_file_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "test_symbol_patterns": [ + "test_create_runtime", + "Testcreate_runtime", + "create_runtime" + ], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + }, + "query_plan": { + "raw": "Где тесты для create_runtime?", + "normalized": "Где тесты для create_runtime?", + "sub_intent": "FIND_TESTS", + "negations": [], + "expansions": [ + "test", + "unit test", + "create_runtime" + ], + "keyword_hints": [ + "create_runtime" + ], + "path_hints": [], + "doc_scope_hints": [], + "symbol_candidates": [ + "create_runtime" + ], + "symbol_kind_hint": "function", + "anchors": [ + { + "type": "SYMBOL", + "value": "create_runtime", + "source": "user_text", + "subtype": null, + "span": { + "start": 14, + "end": 28 + }, + "confidence": 0.88 + }, + { + "type": "KEY_TERM", + "value": "тест", + "source": "user_text", + "subtype": null, + "span": { + "start": 4, + "end": 9 + }, + "confidence": 0.9 + } + ] + } + }, + "retrieval_result": { + "target_symbol_candidates": [ + "create_runtime", + "FileConfigProvider", + "hashlib", + "json", + "Path", + "Any", + "annotations" + ], + "resolved_symbol": "create_runtime", + "symbol_resolution_status": "resolved", + "file_candidates": [ + "src/plba/__init__.py", + "src/plba/bootstrap.py", + "src/app_runtime/config/__init__.py", + "src/app_runtime/config/file_loader.py", + "tests/test_runtime.py", + "src/app_runtime/config/providers.py", + "src/app_runtime/contracts/__init__.py", + "src/app_runtime/contracts/config.py", + "src/app_runtime/contracts/health.py", + "src/app_runtime/contracts/application.py" + ], + "code_chunks": [ + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/plba/__init__.py", + "title": "create_runtime", + "content": "const create_runtime\ncreate_runtime = plba.bootstrap.create_runtime", + "start_line": 1, + "end_line": 1, + "metadata": { + "symbol_id": "fa1e84f16c8c659bcd5448637386af4d15d431064e07714e34689ee64233cb51", + "qname": "create_runtime", + "kind": "const", + "signature": "create_runtime = plba.bootstrap.create_runtime", + "parent_symbol_id": null, + "package_or_module": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/plba/bootstrap.py", + "title": "create_runtime", + "content": "function create_runtime\ncreate_runtime(module)", + "start_line": 8, + "end_line": 29, + "metadata": { + "symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "qname": "create_runtime", + "kind": "function", + "signature": "create_runtime(module)", + "parent_symbol_id": null, + "package_or_module": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/config/__init__.py", + "title": "FileConfigProvider", + "content": "const FileConfigProvider\nFileConfigProvider = app_runtime.config.providers.FileConfigProvider", + "start_line": 2, + "end_line": 2, + "metadata": { + "symbol_id": "e449b19e5881889adeb6e056eafe1da30acbae864f06984ea2edc7c15f7cb6d6", + "qname": "FileConfigProvider", + "kind": "const", + "signature": "FileConfigProvider = app_runtime.config.providers.FileConfigProvider", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.__init__", + "is_test": false, + "blob_sha": "612918029820a2a983330ec92256142b55b9de4bdf3399ece18e2a02dbad9729", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/config/file_loader.py", + "title": "hashlib", + "content": "const hashlib\nimport hashlib", + "start_line": 3, + "end_line": 3, + "metadata": { + "symbol_id": "e7375824bd473da3d73d316d22e3cb6428930e2db1ffbd900ce5a8b88427bf05", + "qname": "hashlib", + "kind": "const", + "signature": "import hashlib", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/config/file_loader.py", + "title": "json", + "content": "const json\nimport json", + "start_line": 4, + "end_line": 4, + "metadata": { + "symbol_id": "bb9e2eaf992bfd050f7072d72eed87c55b1a4b001daa034a0f7c630a61bb1d78", + "qname": "json", + "kind": "const", + "signature": "import json", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/config/file_loader.py", + "title": "Path", + "content": "const Path\nPath = pathlib.Path", + "start_line": 5, + "end_line": 5, + "metadata": { + "symbol_id": "b785967ed1fb83aa62d5724c6d6e9c6d2b1505523db39bd941cc39b48db48306", + "qname": "Path", + "kind": "const", + "signature": "Path = pathlib.Path", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/config/file_loader.py", + "title": "Any", + "content": "const Any\nAny = typing.Any", + "start_line": 6, + "end_line": 6, + "metadata": { + "symbol_id": "8e330833b8073585db1c4b4315947c400683a23e4c3d2e2ccbcb260f347541b6", + "qname": "Any", + "kind": "const", + "signature": "Any = typing.Any", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/config/file_loader.py", + "title": "annotations", + "content": "const annotations\nannotations = __future__.annotations", + "start_line": 1, + "end_line": 1, + "metadata": { + "symbol_id": "5ed640ccec43a78659d50ec24f3717bf1144a182c22588f37456649ac6a4a815", + "qname": "annotations", + "kind": "const", + "signature": "annotations = __future__.annotations", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/plba/bootstrap.py", + "title": "create_runtime:calls", + "content": "create_runtime calls runtime.add_config_file", + "start_line": 19, + "end_line": 19, + "metadata": { + "edge_id": "4eaeec4ac55a59d5f66fd01c4754955f8fedaf4bc3df13fa769b352c7bfaacbb", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.add_config_file", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/plba/bootstrap.py", + "title": "create_runtime:reads_attr", + "content": "create_runtime reads_attr runtime.register_module", + "start_line": 28, + "end_line": 28, + "metadata": { + "edge_id": "45516c79ff358dbf9b650a081668df0f66d2fe989300f985a1a78be6be166f8f", + "edge_type": "reads_attr", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.register_module", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/plba/bootstrap.py", + "title": "create_runtime:instantiates", + "content": "create_runtime instantiates RuntimeManager", + "start_line": 17, + "end_line": 17, + "metadata": { + "edge_id": "0adba17984f850ea1608c9e734d2dd5c325cfde3a8133123aa239e44935ad18e", + "edge_type": "instantiates", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": "27158ca220022eeb5083c6addf8a50775d45f7161284fd60aac48410105f4b98", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/plba/bootstrap.py", + "title": "create_runtime:calls", + "content": "create_runtime calls runtime.register_module", + "start_line": 28, + "end_line": 28, + "metadata": { + "edge_id": "ab6003c3441addc1ba1b81edeca009165559f652f6b2cf424e5ae61b1f617de8", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.register_module", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/plba/bootstrap.py", + "title": "create_runtime:calls", + "content": "create_runtime calls runtime.control_plane.register_channel", + "start_line": 21, + "end_line": 27, + "metadata": { + "edge_id": "2678250030b9ce47a3b3b55fac7897ac530367edc8374ac9d5e6ecafb1e483f0", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.control_plane.register_channel", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/plba/bootstrap.py", + "title": "create_runtime:reads_attr", + "content": "create_runtime reads_attr runtime.add_config_file", + "start_line": 19, + "end_line": 19, + "metadata": { + "edge_id": "30d4e8aae984ab84d523e80d02f1caeda52d547fa3d2aa47be8845931cabbca2", + "edge_type": "reads_attr", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.add_config_file", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/plba/__init__.py", + "title": "src/plba/__init__.py:1-69", + "content": "from plba.bootstrap import create_runtime\nfrom plba.config import ConfigFileLoader, FileConfigProvider\nfrom plba.control import ControlActionSet, ControlChannel, ControlPlaneService, HttpControlChannel\nfrom plba.contracts import (\n ApplicationModule,\n ConfigProvider,\n HealthContributor,\n TraceContext,\n TraceContextRecord,\n TraceLogMessage,\n TraceTransport,\n Worker,\n WorkerHealth,\n WorkerStatus,\n)\nfrom plba.core import ConfigurationManager, RuntimeManager, ServiceContainer\nfrom plba.health import HealthRegistry\nfrom plba.logging import LogManager\nfrom plba.queue import InMemoryTaskQueue\nfrom plba.tracing import MySqlTraceTransport, NoOpTraceTransport, TraceService\nfrom plba.workflow import (\n StepResult,\n WorkflowContext,\n WorkflowDefinition,\n WorkflowEngine,\n WorkflowEngineHooks,\n WorkflowNode,\n WorkflowRuntimeFactory,\n WorkflowStep,\n)\nfrom plba.workers import WorkerSupervisor\n\n__all__ = [\n \"ApplicationModule\",\n \"ConfigFileLoader\",\n \"ConfigProvider\",\n \"ConfigurationManager\",\n \"ControlActionSet\",\n \"ControlChannel\",\n \"ControlPlaneService\",\n \"create_runtime\",\n \"FileConfigProvider\",\n \"HealthContributor\",\n \"HealthRegistry\",\n \"HttpControlChannel\",\n \"InMemoryTaskQueue\",\n \"LogManager\",\n \"MySqlTraceTransport\",\n \"NoOpTraceTransport\",\n \"RuntimeManager\",\n \"ServiceContainer\",\n \"TraceContext\",\n \"TraceContextRecord\",\n \"TraceLogMessage\",\n \"TraceService\",\n \"TraceTransport\",\n \"StepResult\",\n \"Worker\",\n \"WorkerHealth\",\n \"WorkerStatus\",\n \"WorkflowContext\",\n \"WorkflowDefinition\",\n \"WorkflowEngine\",\n \"WorkflowEngineHooks\",\n \"WorkflowNode\",\n \"WorkflowRuntimeFactory\",\n \"WorkflowStep\",\n \"WorkerSupervisor\",\n]", + "start_line": 1, + "end_line": 69, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/plba/bootstrap.py", + "title": "src/plba/bootstrap.py:create_runtime", + "content": "def create_runtime(\n module: ApplicationModule,\n *,\n config_path: str | None = None,\n enable_http_control: bool = False,\n control_host: str = \"127.0.0.1\",\n control_port: int = 8080,\n control_timeout: int = 5,\n) -> RuntimeManager:\n runtime = RuntimeManager()\n if config_path is not None:\n runtime.add_config_file(config_path)\n if enable_http_control:\n runtime.control_plane.register_channel(\n HttpControlChannel(\n host=control_host,\n port=control_port,\n timeout=control_timeout,\n )\n )\n runtime.register_module(module)\n return runtime", + "start_line": 8, + "end_line": 29, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "tests/test_runtime.py", + "title": "tests/test_runtime.py:test_public_plba_package_exports_runtime_builder_and_worker_contract", + "content": "def test_public_plba_package_exports_runtime_builder_and_worker_contract(tmp_path) -> None:\n import plba\n from plba import ApplicationModule as PublicApplicationModule\n from plba import InMemoryTaskQueue\n from plba import Worker as PublicWorker\n from plba import WorkerHealth as PublicWorkerHealth\n from plba import WorkerStatus as PublicWorkerStatus\n from plba import create_runtime\n\n config_path = tmp_path / \"config.yml\"\n config_path.write_text(\"platform: {}\\n\", encoding=\"utf-8\")\n\n queue = InMemoryTaskQueue[int]()\n queue.put(2)\n assert queue.get(timeout=0.01) == 2\n queue.task_done()\n\n class PublicRoutine:\n def __init__(self) -> None:\n self.runs = 0\n\n def run(self) -> None:\n if self.runs == 0:\n self.runs += 1\n\n class PublicWorkerImpl(PublicWorker):\n def __init__(self, routine: PublicRoutine) -> None:\n self._inner = RoutineWorker(\"public-worker\", routine)\n\n @property\n def name(self) -> str:\n return self._inner.name\n\n @property\n def critical(self) -> bool:\n return self._inner.critical\n\n def start(self) -> None:\n self._inner.start()\n\n def stop(self, force: bool = False) -> None:\n self._inner.stop(force=force)\n\n def health(self) -> PublicWorkerHealth:\n return self._inner.health()\n\n def status(self) -> PublicWorkerStatus:\n return self._inner.status()\n\n class PublicExampleModule(PublicApplicationModule):\n @property\n def name(self) -> str:\n return \"public-example\"\n\n def register(self, registry: ModuleRegistry) -> None:\n registry.add_worker(PublicWorkerImpl(PublicRoutine()))\n\n runtime = create_runtime(PublicExampleModule(), config_path=str(config_path))\n runtime.start()\n sleep(0.2)\n assert runtime.configuration.get() == {\"platform\": {}}\n assert runtime.status()[\"workers\"][\"registered\"] == 1\n assert hasattr(plba, \"QueueWorker\") is False\n runtime.stop()", + "start_line": 342, + "end_line": 405, + "metadata": { + "chunk_index": 13, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/config/__init__.py", + "title": "src/app_runtime/config/__init__.py:1-4", + "content": "from app_runtime.config.file_loader import ConfigFileLoader\nfrom app_runtime.config.providers import FileConfigProvider\n\n__all__ = [\"ConfigFileLoader\", \"FileConfigProvider\"]", + "start_line": 1, + "end_line": 4, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.config.__init__", + "is_test": false, + "blob_sha": "612918029820a2a983330ec92256142b55b9de4bdf3399ece18e2a02dbad9729", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/config/providers.py", + "title": "src/app_runtime/config/providers.py:FileConfigProvider", + "content": "class FileConfigProvider(ConfigProvider):\n def __init__(self, path: str | Path) -> None:\n self._loader = ConfigFileLoader(path)\n\n @property\n def loader(self) -> ConfigFileLoader:\n return self._loader\n\n def load(self) -> dict[str, Any]:\n config = self._loader.load_sync()\n if not isinstance(config, dict):\n raise TypeError(\"Config root must be a mapping\")\n return dict(config)", + "start_line": 10, + "end_line": 22, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.config.providers", + "is_test": false, + "blob_sha": "8c53ca0122d6df6c5763bca15e99434bb4daebd5a618b8fc927e9ae90b022e64", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/contracts/__init__.py", + "title": "src/app_runtime/__init__.py:1-1", + "content": "__all__: list[str] = []", + "start_line": 1, + "end_line": 1, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.__init__", + "is_test": false, + "blob_sha": "8eea9df4f6d7b38ca0e39ccc27b04700e3d08dbeec8046d613d22706d19985fa", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/config/file_loader.py", + "title": "src/app_runtime/config/file_loader.py:ConfigFileLoader", + "content": "class ConfigFileLoader:\n def __init__(self, path: str | Path) -> None:\n self.path = Path(path)\n self.config: Any = None\n self.last_valid_config: Any = None\n self._last_seen_hash: str | None = None\n\n def read_text(self) -> str:\n return self.path.read_text(encoding=\"utf-8\")\n\n def parse(self, data: str) -> Any:\n suffix = self.path.suffix.lower()\n if suffix in {\".yml\", \".yaml\"}:\n return yaml.safe_load(data)\n return json.loads(data)\n\n def load_sync(self) -> Any:\n data = self.read_text()\n parsed = self.parse(data)\n self.config = parsed\n self.last_valid_config = parsed\n self._last_seen_hash = self._calculate_hash(data)\n return parsed\n\n def load_if_changed(self) -> tuple[bool, Any]:\n data = self.read_text()\n current_hash = self._calculate_hash(data)\n if current_hash == self._last_seen_hash:\n return False, self.config\n parsed = self.parse(data)\n self.config = parsed\n self.last_valid_config = parsed\n self._last_seen_hash = current_hash\n return True, parsed\n\n @staticmethod\n def _calculate_hash(data: str) -> str:\n return hashlib.sha256(data.encode(\"utf-8\")).hexdigest()", + "start_line": 11, + "end_line": 48, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/contracts/config.py", + "title": "src/app_runtime/contracts/config.py:ConfigProvider", + "content": "class ConfigProvider(ABC):\n @abstractmethod\n def load(self) -> dict[str, Any]:\n \"\"\"Return a config fragment.\"\"\"", + "start_line": 7, + "end_line": 10, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.config", + "is_test": false, + "blob_sha": "5e773880267743ee94954ea2db120c2d88c54d4312893293d1b89df405283ed4", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/contracts/health.py", + "title": "src/app_runtime/contracts/health.py:HealthContributor", + "content": "class HealthContributor(ABC):\n @abstractmethod\n def health(self) -> WorkerHealth:\n \"\"\"Return contributor health state.\"\"\"", + "start_line": 7, + "end_line": 10, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.health", + "is_test": false, + "blob_sha": "6bd92611def7131e32d4dd34a8ed85e6cf3c67722ad27797032a632cb30dc097", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/contracts/application.py", + "title": "src/app_runtime/contracts/application.py:ApplicationModule", + "content": "class ApplicationModule(ABC):\n @property\n @abstractmethod\n def name(self) -> str:\n \"\"\"Module name used for runtime status and diagnostics.\"\"\"\n\n @abstractmethod\n def register(self, registry: ModuleRegistry) -> None:\n \"\"\"Register workers, services, and health contributors.\"\"\"", + "start_line": 8, + "end_line": 16, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.application", + "is_test": false, + "blob_sha": "197c35634dca49c352ce3f230295a485fbffb672ce7bb8c08e752bfdf61e7fa4", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "relations": [ + { + "path": "src/plba/bootstrap.py", + "metadata": { + "edge_id": "4eaeec4ac55a59d5f66fd01c4754955f8fedaf4bc3df13fa769b352c7bfaacbb", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.add_config_file", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "create_runtime calls runtime.add_config_file" + }, + { + "path": "src/plba/bootstrap.py", + "metadata": { + "edge_id": "45516c79ff358dbf9b650a081668df0f66d2fe989300f985a1a78be6be166f8f", + "edge_type": "reads_attr", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.register_module", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "create_runtime reads_attr runtime.register_module" + }, + { + "path": "src/plba/bootstrap.py", + "metadata": { + "edge_id": "0adba17984f850ea1608c9e734d2dd5c325cfde3a8133123aa239e44935ad18e", + "edge_type": "instantiates", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": "27158ca220022eeb5083c6addf8a50775d45f7161284fd60aac48410105f4b98", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "create_runtime instantiates RuntimeManager" + }, + { + "path": "src/plba/bootstrap.py", + "metadata": { + "edge_id": "ab6003c3441addc1ba1b81edeca009165559f652f6b2cf424e5ae61b1f617de8", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.register_module", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "create_runtime calls runtime.register_module" + }, + { + "path": "src/plba/bootstrap.py", + "metadata": { + "edge_id": "2678250030b9ce47a3b3b55fac7897ac530367edc8374ac9d5e6ecafb1e483f0", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.control_plane.register_channel", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "create_runtime calls runtime.control_plane.register_channel" + }, + { + "path": "src/plba/bootstrap.py", + "metadata": { + "edge_id": "30d4e8aae984ab84d523e80d02f1caeda52d547fa3d2aa47be8845931cabbca2", + "edge_type": "reads_attr", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.add_config_file", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "create_runtime reads_attr runtime.add_config_file" + } + ], + "entrypoints": [], + "test_candidates": [ + { + "path": "tests/test_runtime.py", + "title": "tests/test_runtime.py:test_public_plba_package_exports_runtime_builder_and_worker_contract", + "content": "def test_public_plba_package_exports_runtime_builder_and_worker_contract(tmp_path) -> None:\n import plba\n from plba import ApplicationModule as PublicApplicationModule\n from plba import InMemoryTaskQueue\n from plba import Worker as PublicWorker\n from plba import WorkerHealth as Public" + } + ], + "layer_outcomes": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 6, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 10, + "empty": false, + "fallback_used": false + } + ], + "missing_layers": [], + "raw_rows": [ + { + "path": "src/plba/__init__.py", + "content": "const create_runtime\ncreate_runtime = plba.bootstrap.create_runtime", + "layer": "C1_SYMBOL_CATALOG", + "title": "create_runtime", + "span_start": 1, + "span_end": 1, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "fa1e84f16c8c659bcd5448637386af4d15d431064e07714e34689ee64233cb51", + "qname": "create_runtime", + "kind": "const", + "signature": "create_runtime = plba.bootstrap.create_runtime", + "parent_symbol_id": null, + "package_or_module": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "function create_runtime\ncreate_runtime(module)", + "layer": "C1_SYMBOL_CATALOG", + "title": "create_runtime", + "span_start": 8, + "span_end": 29, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "qname": "create_runtime", + "kind": "function", + "signature": "create_runtime(module)", + "parent_symbol_id": null, + "package_or_module": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/__init__.py", + "content": "const FileConfigProvider\nFileConfigProvider = app_runtime.config.providers.FileConfigProvider", + "layer": "C1_SYMBOL_CATALOG", + "title": "FileConfigProvider", + "span_start": 2, + "span_end": 2, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "e449b19e5881889adeb6e056eafe1da30acbae864f06984ea2edc7c15f7cb6d6", + "qname": "FileConfigProvider", + "kind": "const", + "signature": "FileConfigProvider = app_runtime.config.providers.FileConfigProvider", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.__init__", + "is_test": false, + "blob_sha": "612918029820a2a983330ec92256142b55b9de4bdf3399ece18e2a02dbad9729", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "const hashlib\nimport hashlib", + "layer": "C1_SYMBOL_CATALOG", + "title": "hashlib", + "span_start": 3, + "span_end": 3, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "e7375824bd473da3d73d316d22e3cb6428930e2db1ffbd900ce5a8b88427bf05", + "qname": "hashlib", + "kind": "const", + "signature": "import hashlib", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "const json\nimport json", + "layer": "C1_SYMBOL_CATALOG", + "title": "json", + "span_start": 4, + "span_end": 4, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "bb9e2eaf992bfd050f7072d72eed87c55b1a4b001daa034a0f7c630a61bb1d78", + "qname": "json", + "kind": "const", + "signature": "import json", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "const Path\nPath = pathlib.Path", + "layer": "C1_SYMBOL_CATALOG", + "title": "Path", + "span_start": 5, + "span_end": 5, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "b785967ed1fb83aa62d5724c6d6e9c6d2b1505523db39bd941cc39b48db48306", + "qname": "Path", + "kind": "const", + "signature": "Path = pathlib.Path", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "const Any\nAny = typing.Any", + "layer": "C1_SYMBOL_CATALOG", + "title": "Any", + "span_start": 6, + "span_end": 6, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "8e330833b8073585db1c4b4315947c400683a23e4c3d2e2ccbcb260f347541b6", + "qname": "Any", + "kind": "const", + "signature": "Any = typing.Any", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "const annotations\nannotations = __future__.annotations", + "layer": "C1_SYMBOL_CATALOG", + "title": "annotations", + "span_start": 1, + "span_end": 1, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "5ed640ccec43a78659d50ec24f3717bf1144a182c22588f37456649ac6a4a815", + "qname": "annotations", + "kind": "const", + "signature": "annotations = __future__.annotations", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime calls runtime.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:calls", + "span_start": 19, + "span_end": 19, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "4eaeec4ac55a59d5f66fd01c4754955f8fedaf4bc3df13fa769b352c7bfaacbb", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.add_config_file", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime reads_attr runtime.register_module", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:reads_attr", + "span_start": 28, + "span_end": 28, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "45516c79ff358dbf9b650a081668df0f66d2fe989300f985a1a78be6be166f8f", + "edge_type": "reads_attr", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.register_module", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:instantiates", + "span_start": 17, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "0adba17984f850ea1608c9e734d2dd5c325cfde3a8133123aa239e44935ad18e", + "edge_type": "instantiates", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": "27158ca220022eeb5083c6addf8a50775d45f7161284fd60aac48410105f4b98", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime calls runtime.register_module", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:calls", + "span_start": 28, + "span_end": 28, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "ab6003c3441addc1ba1b81edeca009165559f652f6b2cf424e5ae61b1f617de8", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.register_module", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime calls runtime.control_plane.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:calls", + "span_start": 21, + "span_end": 27, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "2678250030b9ce47a3b3b55fac7897ac530367edc8374ac9d5e6ecafb1e483f0", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.control_plane.register_channel", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime reads_attr runtime.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:reads_attr", + "span_start": 19, + "span_end": 19, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "30d4e8aae984ab84d523e80d02f1caeda52d547fa3d2aa47be8845931cabbca2", + "edge_type": "reads_attr", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.add_config_file", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/__init__.py", + "content": "from plba.bootstrap import create_runtime\nfrom plba.config import ConfigFileLoader, FileConfigProvider\nfrom plba.control import ControlActionSet, ControlChannel, ControlPlaneService, HttpControlChannel\nfrom plba.contracts import (\n ApplicationModule,\n ConfigProvider,\n HealthContributor,\n TraceContext,\n TraceContextRecord,\n TraceLogMessage,\n TraceTransport,\n Worker,\n WorkerHealth,\n WorkerStatus,\n)\nfrom plba.core import ConfigurationManager, RuntimeManager, ServiceContainer\nfrom plba.health import HealthRegistry\nfrom plba.logging import LogManager\nfrom plba.queue import InMemoryTaskQueue\nfrom plba.tracing import MySqlTraceTransport, NoOpTraceTransport, TraceService\nfrom plba.workflow import (\n StepResult,\n WorkflowContext,\n WorkflowDefinition,\n WorkflowEngine,\n WorkflowEngineHooks,\n WorkflowNode,\n WorkflowRuntimeFactory,\n WorkflowStep,\n)\nfrom plba.workers import WorkerSupervisor\n\n__all__ = [\n \"ApplicationModule\",\n \"ConfigFileLoader\",\n \"ConfigProvider\",\n \"ConfigurationManager\",\n \"ControlActionSet\",\n \"ControlChannel\",\n \"ControlPlaneService\",\n \"create_runtime\",\n \"FileConfigProvider\",\n \"HealthContributor\",\n \"HealthRegistry\",\n \"HttpControlChannel\",\n \"InMemoryTaskQueue\",\n \"LogManager\",\n \"MySqlTraceTransport\",\n \"NoOpTraceTransport\",\n \"RuntimeManager\",\n \"ServiceContainer\",\n \"TraceContext\",\n \"TraceContextRecord\",\n \"TraceLogMessage\",\n \"TraceService\",\n \"TraceTransport\",\n \"StepResult\",\n \"Worker\",\n \"WorkerHealth\",\n \"WorkerStatus\",\n \"WorkflowContext\",\n \"WorkflowDefinition\",\n \"WorkflowEngine\",\n \"WorkflowEngineHooks\",\n \"WorkflowNode\",\n \"WorkflowRuntimeFactory\",\n \"WorkflowStep\",\n \"WorkerSupervisor\",\n]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/__init__.py:1-69", + "span_start": 1, + "span_end": 69, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "def create_runtime(\n module: ApplicationModule,\n *,\n config_path: str | None = None,\n enable_http_control: bool = False,\n control_host: str = \"127.0.0.1\",\n control_port: int = 8080,\n control_timeout: int = 5,\n) -> RuntimeManager:\n runtime = RuntimeManager()\n if config_path is not None:\n runtime.add_config_file(config_path)\n if enable_http_control:\n runtime.control_plane.register_channel(\n HttpControlChannel(\n host=control_host,\n port=control_port,\n timeout=control_timeout,\n )\n )\n runtime.register_module(module)\n return runtime", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/bootstrap.py:create_runtime", + "span_start": 8, + "span_end": 29, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "def test_public_plba_package_exports_runtime_builder_and_worker_contract(tmp_path) -> None:\n import plba\n from plba import ApplicationModule as PublicApplicationModule\n from plba import InMemoryTaskQueue\n from plba import Worker as PublicWorker\n from plba import WorkerHealth as PublicWorkerHealth\n from plba import WorkerStatus as PublicWorkerStatus\n from plba import create_runtime\n\n config_path = tmp_path / \"config.yml\"\n config_path.write_text(\"platform: {}\\n\", encoding=\"utf-8\")\n\n queue = InMemoryTaskQueue[int]()\n queue.put(2)\n assert queue.get(timeout=0.01) == 2\n queue.task_done()\n\n class PublicRoutine:\n def __init__(self) -> None:\n self.runs = 0\n\n def run(self) -> None:\n if self.runs == 0:\n self.runs += 1\n\n class PublicWorkerImpl(PublicWorker):\n def __init__(self, routine: PublicRoutine) -> None:\n self._inner = RoutineWorker(\"public-worker\", routine)\n\n @property\n def name(self) -> str:\n return self._inner.name\n\n @property\n def critical(self) -> bool:\n return self._inner.critical\n\n def start(self) -> None:\n self._inner.start()\n\n def stop(self, force: bool = False) -> None:\n self._inner.stop(force=force)\n\n def health(self) -> PublicWorkerHealth:\n return self._inner.health()\n\n def status(self) -> PublicWorkerStatus:\n return self._inner.status()\n\n class PublicExampleModule(PublicApplicationModule):\n @property\n def name(self) -> str:\n return \"public-example\"\n\n def register(self, registry: ModuleRegistry) -> None:\n registry.add_worker(PublicWorkerImpl(PublicRoutine()))\n\n runtime = create_runtime(PublicExampleModule(), config_path=str(config_path))\n runtime.start()\n sleep(0.2)\n assert runtime.configuration.get() == {\"platform\": {}}\n assert runtime.status()[\"workers\"][\"registered\"] == 1\n assert hasattr(plba, \"QueueWorker\") is False\n runtime.stop()", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_runtime.py:test_public_plba_package_exports_runtime_builder_and_worker_contract", + "span_start": 342, + "span_end": 405, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 13, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/__init__.py", + "content": "from app_runtime.config.file_loader import ConfigFileLoader\nfrom app_runtime.config.providers import FileConfigProvider\n\n__all__ = [\"ConfigFileLoader\", \"FileConfigProvider\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/config/__init__.py:1-4", + "span_start": 1, + "span_end": 4, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.config.__init__", + "is_test": false, + "blob_sha": "612918029820a2a983330ec92256142b55b9de4bdf3399ece18e2a02dbad9729", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/providers.py", + "content": "class FileConfigProvider(ConfigProvider):\n def __init__(self, path: str | Path) -> None:\n self._loader = ConfigFileLoader(path)\n\n @property\n def loader(self) -> ConfigFileLoader:\n return self._loader\n\n def load(self) -> dict[str, Any]:\n config = self._loader.load_sync()\n if not isinstance(config, dict):\n raise TypeError(\"Config root must be a mapping\")\n return dict(config)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/config/providers.py:FileConfigProvider", + "span_start": 10, + "span_end": 22, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.config.providers", + "is_test": false, + "blob_sha": "8c53ca0122d6df6c5763bca15e99434bb4daebd5a618b8fc927e9ae90b022e64", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/__init__.py", + "content": "__all__: list[str] = []", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/__init__.py:1-1", + "span_start": 1, + "span_end": 1, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.__init__", + "is_test": false, + "blob_sha": "8eea9df4f6d7b38ca0e39ccc27b04700e3d08dbeec8046d613d22706d19985fa", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "class ConfigFileLoader:\n def __init__(self, path: str | Path) -> None:\n self.path = Path(path)\n self.config: Any = None\n self.last_valid_config: Any = None\n self._last_seen_hash: str | None = None\n\n def read_text(self) -> str:\n return self.path.read_text(encoding=\"utf-8\")\n\n def parse(self, data: str) -> Any:\n suffix = self.path.suffix.lower()\n if suffix in {\".yml\", \".yaml\"}:\n return yaml.safe_load(data)\n return json.loads(data)\n\n def load_sync(self) -> Any:\n data = self.read_text()\n parsed = self.parse(data)\n self.config = parsed\n self.last_valid_config = parsed\n self._last_seen_hash = self._calculate_hash(data)\n return parsed\n\n def load_if_changed(self) -> tuple[bool, Any]:\n data = self.read_text()\n current_hash = self._calculate_hash(data)\n if current_hash == self._last_seen_hash:\n return False, self.config\n parsed = self.parse(data)\n self.config = parsed\n self.last_valid_config = parsed\n self._last_seen_hash = current_hash\n return True, parsed\n\n @staticmethod\n def _calculate_hash(data: str) -> str:\n return hashlib.sha256(data.encode(\"utf-8\")).hexdigest()", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/config/file_loader.py:ConfigFileLoader", + "span_start": 11, + "span_end": 48, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/config.py", + "content": "class ConfigProvider(ABC):\n @abstractmethod\n def load(self) -> dict[str, Any]:\n \"\"\"Return a config fragment.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/contracts/config.py:ConfigProvider", + "span_start": 7, + "span_end": 10, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.config", + "is_test": false, + "blob_sha": "5e773880267743ee94954ea2db120c2d88c54d4312893293d1b89df405283ed4", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/health.py", + "content": "class HealthContributor(ABC):\n @abstractmethod\n def health(self) -> WorkerHealth:\n \"\"\"Return contributor health state.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/contracts/health.py:HealthContributor", + "span_start": 7, + "span_end": 10, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.health", + "is_test": false, + "blob_sha": "6bd92611def7131e32d4dd34a8ed85e6cf3c67722ad27797032a632cb30dc097", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/application.py", + "content": "class ApplicationModule(ABC):\n @property\n @abstractmethod\n def name(self) -> str:\n \"\"\"Module name used for runtime status and diagnostics.\"\"\"\n\n @abstractmethod\n def register(self, registry: ModuleRegistry) -> None:\n \"\"\"Register workers, services, and health contributors.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/contracts/application.py:ApplicationModule", + "span_start": 8, + "span_end": 16, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.application", + "is_test": false, + "blob_sha": "197c35634dca49c352ce3f230295a485fbffb672ce7bb8c08e752bfdf61e7fa4", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "retrieval_report": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "vector", + "C2_DEPENDENCY_GRAPH": "vector", + "C0_SOURCE_CHUNKS": "vector" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C0_SOURCE_CHUNKS": 10 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [] + } + }, + "fallback": { + "used": false, + "reason": null + }, + "retrieval_by_layer_ms": { + "C1_SYMBOL_CATALOG": 26, + "C2_DEPENDENCY_GRAPH": 29, + "C0_SOURCE_CHUNKS": 12 + } + } + }, + "diagnostics": { + "intent_correct": null, + "target_found": true, + "layers_used": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "retrieval_sufficient": true, + "answer_mode": "normal", + "router_result": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "FIND_TESTS", + "path_scope": [], + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "symbol_resolution_status": "pending" + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Где тесты для create_runtime?", + "sub_intent": "FIND_TESTS", + "path_scope": [], + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 6, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 10, + "empty": false, + "fallback_used": false + } + ], + "empty_layers": [], + "evidence_gate_decision": { + "sufficient": true, + "failure_reasons": [], + "evidence_count": 24 + }, + "failure_reasons": [], + "timings_ms": {} + }, + "rag_rows": [ + { + "path": "src/plba/__init__.py", + "content": "const create_runtime\ncreate_runtime = plba.bootstrap.create_runtime", + "layer": "C1_SYMBOL_CATALOG", + "title": "create_runtime", + "span_start": 1, + "span_end": 1, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "fa1e84f16c8c659bcd5448637386af4d15d431064e07714e34689ee64233cb51", + "qname": "create_runtime", + "kind": "const", + "signature": "create_runtime = plba.bootstrap.create_runtime", + "parent_symbol_id": null, + "package_or_module": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "function create_runtime\ncreate_runtime(module)", + "layer": "C1_SYMBOL_CATALOG", + "title": "create_runtime", + "span_start": 8, + "span_end": 29, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "qname": "create_runtime", + "kind": "function", + "signature": "create_runtime(module)", + "parent_symbol_id": null, + "package_or_module": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/__init__.py", + "content": "const FileConfigProvider\nFileConfigProvider = app_runtime.config.providers.FileConfigProvider", + "layer": "C1_SYMBOL_CATALOG", + "title": "FileConfigProvider", + "span_start": 2, + "span_end": 2, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "e449b19e5881889adeb6e056eafe1da30acbae864f06984ea2edc7c15f7cb6d6", + "qname": "FileConfigProvider", + "kind": "const", + "signature": "FileConfigProvider = app_runtime.config.providers.FileConfigProvider", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.__init__", + "is_test": false, + "blob_sha": "612918029820a2a983330ec92256142b55b9de4bdf3399ece18e2a02dbad9729", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "const hashlib\nimport hashlib", + "layer": "C1_SYMBOL_CATALOG", + "title": "hashlib", + "span_start": 3, + "span_end": 3, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "e7375824bd473da3d73d316d22e3cb6428930e2db1ffbd900ce5a8b88427bf05", + "qname": "hashlib", + "kind": "const", + "signature": "import hashlib", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "const json\nimport json", + "layer": "C1_SYMBOL_CATALOG", + "title": "json", + "span_start": 4, + "span_end": 4, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "bb9e2eaf992bfd050f7072d72eed87c55b1a4b001daa034a0f7c630a61bb1d78", + "qname": "json", + "kind": "const", + "signature": "import json", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "const Path\nPath = pathlib.Path", + "layer": "C1_SYMBOL_CATALOG", + "title": "Path", + "span_start": 5, + "span_end": 5, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "b785967ed1fb83aa62d5724c6d6e9c6d2b1505523db39bd941cc39b48db48306", + "qname": "Path", + "kind": "const", + "signature": "Path = pathlib.Path", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "const Any\nAny = typing.Any", + "layer": "C1_SYMBOL_CATALOG", + "title": "Any", + "span_start": 6, + "span_end": 6, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "8e330833b8073585db1c4b4315947c400683a23e4c3d2e2ccbcb260f347541b6", + "qname": "Any", + "kind": "const", + "signature": "Any = typing.Any", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "const annotations\nannotations = __future__.annotations", + "layer": "C1_SYMBOL_CATALOG", + "title": "annotations", + "span_start": 1, + "span_end": 1, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "5ed640ccec43a78659d50ec24f3717bf1144a182c22588f37456649ac6a4a815", + "qname": "annotations", + "kind": "const", + "signature": "annotations = __future__.annotations", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime calls runtime.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:calls", + "span_start": 19, + "span_end": 19, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "4eaeec4ac55a59d5f66fd01c4754955f8fedaf4bc3df13fa769b352c7bfaacbb", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.add_config_file", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime reads_attr runtime.register_module", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:reads_attr", + "span_start": 28, + "span_end": 28, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "45516c79ff358dbf9b650a081668df0f66d2fe989300f985a1a78be6be166f8f", + "edge_type": "reads_attr", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.register_module", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:instantiates", + "span_start": 17, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "0adba17984f850ea1608c9e734d2dd5c325cfde3a8133123aa239e44935ad18e", + "edge_type": "instantiates", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": "27158ca220022eeb5083c6addf8a50775d45f7161284fd60aac48410105f4b98", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime calls runtime.register_module", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:calls", + "span_start": 28, + "span_end": 28, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "ab6003c3441addc1ba1b81edeca009165559f652f6b2cf424e5ae61b1f617de8", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.register_module", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime calls runtime.control_plane.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:calls", + "span_start": 21, + "span_end": 27, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "2678250030b9ce47a3b3b55fac7897ac530367edc8374ac9d5e6ecafb1e483f0", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.control_plane.register_channel", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime reads_attr runtime.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:reads_attr", + "span_start": 19, + "span_end": 19, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "30d4e8aae984ab84d523e80d02f1caeda52d547fa3d2aa47be8845931cabbca2", + "edge_type": "reads_attr", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.add_config_file", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/__init__.py", + "content": "from plba.bootstrap import create_runtime\nfrom plba.config import ConfigFileLoader, FileConfigProvider\nfrom plba.control import ControlActionSet, ControlChannel, ControlPlaneService, HttpControlChannel\nfrom plba.contracts import (\n ApplicationModule,\n ConfigProvider,\n HealthContributor,\n TraceContext,\n TraceContextRecord,\n TraceLogMessage,\n TraceTransport,\n Worker,\n WorkerHealth,\n WorkerStatus,\n)\nfrom plba.core import ConfigurationManager, RuntimeManager, ServiceContainer\nfrom plba.health import HealthRegistry\nfrom plba.logging import LogManager\nfrom plba.queue import InMemoryTaskQueue\nfrom plba.tracing import MySqlTraceTransport, NoOpTraceTransport, TraceService\nfrom plba.workflow import (\n StepResult,\n WorkflowContext,\n WorkflowDefinition,\n WorkflowEngine,\n WorkflowEngineHooks,\n WorkflowNode,\n WorkflowRuntimeFactory,\n WorkflowStep,\n)\nfrom plba.workers import WorkerSupervisor\n\n__all__ = [\n \"ApplicationModule\",\n \"ConfigFileLoader\",\n \"ConfigProvider\",\n \"ConfigurationManager\",\n \"ControlActionSet\",\n \"ControlChannel\",\n \"ControlPlaneService\",\n \"create_runtime\",\n \"FileConfigProvider\",\n \"HealthContributor\",\n \"HealthRegistry\",\n \"HttpControlChannel\",\n \"InMemoryTaskQueue\",\n \"LogManager\",\n \"MySqlTraceTransport\",\n \"NoOpTraceTransport\",\n \"RuntimeManager\",\n \"ServiceContainer\",\n \"TraceContext\",\n \"TraceContextRecord\",\n \"TraceLogMessage\",\n \"TraceService\",\n \"TraceTransport\",\n \"StepResult\",\n \"Worker\",\n \"WorkerHealth\",\n \"WorkerStatus\",\n \"WorkflowContext\",\n \"WorkflowDefinition\",\n \"WorkflowEngine\",\n \"WorkflowEngineHooks\",\n \"WorkflowNode\",\n \"WorkflowRuntimeFactory\",\n \"WorkflowStep\",\n \"WorkerSupervisor\",\n]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/__init__.py:1-69", + "span_start": 1, + "span_end": 69, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "def create_runtime(\n module: ApplicationModule,\n *,\n config_path: str | None = None,\n enable_http_control: bool = False,\n control_host: str = \"127.0.0.1\",\n control_port: int = 8080,\n control_timeout: int = 5,\n) -> RuntimeManager:\n runtime = RuntimeManager()\n if config_path is not None:\n runtime.add_config_file(config_path)\n if enable_http_control:\n runtime.control_plane.register_channel(\n HttpControlChannel(\n host=control_host,\n port=control_port,\n timeout=control_timeout,\n )\n )\n runtime.register_module(module)\n return runtime", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/bootstrap.py:create_runtime", + "span_start": 8, + "span_end": 29, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "def test_public_plba_package_exports_runtime_builder_and_worker_contract(tmp_path) -> None:\n import plba\n from plba import ApplicationModule as PublicApplicationModule\n from plba import InMemoryTaskQueue\n from plba import Worker as PublicWorker\n from plba import WorkerHealth as PublicWorkerHealth\n from plba import WorkerStatus as PublicWorkerStatus\n from plba import create_runtime\n\n config_path = tmp_path / \"config.yml\"\n config_path.write_text(\"platform: {}\\n\", encoding=\"utf-8\")\n\n queue = InMemoryTaskQueue[int]()\n queue.put(2)\n assert queue.get(timeout=0.01) == 2\n queue.task_done()\n\n class PublicRoutine:\n def __init__(self) -> None:\n self.runs = 0\n\n def run(self) -> None:\n if self.runs == 0:\n self.runs += 1\n\n class PublicWorkerImpl(PublicWorker):\n def __init__(self, routine: PublicRoutine) -> None:\n self._inner = RoutineWorker(\"public-worker\", routine)\n\n @property\n def name(self) -> str:\n return self._inner.name\n\n @property\n def critical(self) -> bool:\n return self._inner.critical\n\n def start(self) -> None:\n self._inner.start()\n\n def stop(self, force: bool = False) -> None:\n self._inner.stop(force=force)\n\n def health(self) -> PublicWorkerHealth:\n return self._inner.health()\n\n def status(self) -> PublicWorkerStatus:\n return self._inner.status()\n\n class PublicExampleModule(PublicApplicationModule):\n @property\n def name(self) -> str:\n return \"public-example\"\n\n def register(self, registry: ModuleRegistry) -> None:\n registry.add_worker(PublicWorkerImpl(PublicRoutine()))\n\n runtime = create_runtime(PublicExampleModule(), config_path=str(config_path))\n runtime.start()\n sleep(0.2)\n assert runtime.configuration.get() == {\"platform\": {}}\n assert runtime.status()[\"workers\"][\"registered\"] == 1\n assert hasattr(plba, \"QueueWorker\") is False\n runtime.stop()", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_runtime.py:test_public_plba_package_exports_runtime_builder_and_worker_contract", + "span_start": 342, + "span_end": 405, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 13, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/__init__.py", + "content": "from app_runtime.config.file_loader import ConfigFileLoader\nfrom app_runtime.config.providers import FileConfigProvider\n\n__all__ = [\"ConfigFileLoader\", \"FileConfigProvider\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/config/__init__.py:1-4", + "span_start": 1, + "span_end": 4, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.config.__init__", + "is_test": false, + "blob_sha": "612918029820a2a983330ec92256142b55b9de4bdf3399ece18e2a02dbad9729", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/providers.py", + "content": "class FileConfigProvider(ConfigProvider):\n def __init__(self, path: str | Path) -> None:\n self._loader = ConfigFileLoader(path)\n\n @property\n def loader(self) -> ConfigFileLoader:\n return self._loader\n\n def load(self) -> dict[str, Any]:\n config = self._loader.load_sync()\n if not isinstance(config, dict):\n raise TypeError(\"Config root must be a mapping\")\n return dict(config)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/config/providers.py:FileConfigProvider", + "span_start": 10, + "span_end": 22, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.config.providers", + "is_test": false, + "blob_sha": "8c53ca0122d6df6c5763bca15e99434bb4daebd5a618b8fc927e9ae90b022e64", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/__init__.py", + "content": "__all__: list[str] = []", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/__init__.py:1-1", + "span_start": 1, + "span_end": 1, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.__init__", + "is_test": false, + "blob_sha": "8eea9df4f6d7b38ca0e39ccc27b04700e3d08dbeec8046d613d22706d19985fa", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "class ConfigFileLoader:\n def __init__(self, path: str | Path) -> None:\n self.path = Path(path)\n self.config: Any = None\n self.last_valid_config: Any = None\n self._last_seen_hash: str | None = None\n\n def read_text(self) -> str:\n return self.path.read_text(encoding=\"utf-8\")\n\n def parse(self, data: str) -> Any:\n suffix = self.path.suffix.lower()\n if suffix in {\".yml\", \".yaml\"}:\n return yaml.safe_load(data)\n return json.loads(data)\n\n def load_sync(self) -> Any:\n data = self.read_text()\n parsed = self.parse(data)\n self.config = parsed\n self.last_valid_config = parsed\n self._last_seen_hash = self._calculate_hash(data)\n return parsed\n\n def load_if_changed(self) -> tuple[bool, Any]:\n data = self.read_text()\n current_hash = self._calculate_hash(data)\n if current_hash == self._last_seen_hash:\n return False, self.config\n parsed = self.parse(data)\n self.config = parsed\n self.last_valid_config = parsed\n self._last_seen_hash = current_hash\n return True, parsed\n\n @staticmethod\n def _calculate_hash(data: str) -> str:\n return hashlib.sha256(data.encode(\"utf-8\")).hexdigest()", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/config/file_loader.py:ConfigFileLoader", + "span_start": 11, + "span_end": 48, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/config.py", + "content": "class ConfigProvider(ABC):\n @abstractmethod\n def load(self) -> dict[str, Any]:\n \"\"\"Return a config fragment.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/contracts/config.py:ConfigProvider", + "span_start": 7, + "span_end": 10, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.config", + "is_test": false, + "blob_sha": "5e773880267743ee94954ea2db120c2d88c54d4312893293d1b89df405283ed4", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/health.py", + "content": "class HealthContributor(ABC):\n @abstractmethod\n def health(self) -> WorkerHealth:\n \"\"\"Return contributor health state.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/contracts/health.py:HealthContributor", + "span_start": 7, + "span_end": 10, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.health", + "is_test": false, + "blob_sha": "6bd92611def7131e32d4dd34a8ed85e6cf3c67722ad27797032a632cb30dc097", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/application.py", + "content": "class ApplicationModule(ABC):\n @property\n @abstractmethod\n def name(self) -> str:\n \"\"\"Module name used for runtime status and diagnostics.\"\"\"\n\n @abstractmethod\n def register(self, registry: ModuleRegistry) -> None:\n \"\"\"Register workers, services, and health contributors.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/contracts/application.py:ApplicationModule", + "span_start": 8, + "span_end": 16, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.application", + "is_test": false, + "blob_sha": "197c35634dca49c352ce3f230295a485fbffb672ce7bb8c08e752bfdf61e7fa4", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "validation": { + "passed": true, + "action": "return", + "reasons": [] + } + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-find-tests-create-runtime.md b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-find-tests-create-runtime.md new file mode 100644 index 0000000..2a2e869 --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-find-tests-create-runtime.md @@ -0,0 +1,32 @@ +# plba-v2-find-tests-create-runtime + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: agent_runtime +- mode: full_chain +- passed: True + +## Query +Где тесты для create_runtime? + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 24, + "llm_answer": "Прямых тестов для `create_runtime` не обнаружено. Ближайший тест находится в файле `tests/test_runtime.py`, но он проверяет экспорт публичных контрактов пакета PLBA, а не непосредственно сам метод `create_runtime`. Косвенное покрытие отсутствует.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "create_runtime" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-find-tests-runtime-manager.json b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-find-tests-runtime-manager.json new file mode 100644 index 0000000..546bf32 --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-find-tests-runtime-manager.json @@ -0,0 +1,3133 @@ +{ + "case_id": "plba-v2-find-tests-runtime-manager", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "agent_runtime", + "mode": "full_chain", + "query": "Где тесты для RuntimeManager?", + "actual": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 24, + "llm_answer": "Прямые тесты для `RuntimeManager` обнаружены в следующих файлах:\n\n- **tests/test_runtime.py**: проверка инициализации и поведения `RuntimeManager`.\n- **tests/test_business_control_actions.py**: хотя этот файл упоминает `RuntimeManager`, он непосредственно не предназначен для тестирования `RuntimeManager`. Вместо этого здесь проверяются контрольные каналы и бизнес-действия.\n\nКосвенных тестов, специфичных для `RuntimeManager`, не найдено.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "query": "Где тесты для RuntimeManager?", + "router_result": { + "schema_version": "1.1", + "intent": "CODE_QA", + "retrieval_profile": "code", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query_plan": { + "raw": "Где тесты для RuntimeManager?", + "normalized": "Где тесты для RuntimeManager?", + "sub_intent": "FIND_TESTS", + "negations": [], + "expansions": [ + "test", + "unit test", + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "doc_scope_hints": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "symbol_kind_hint": "class", + "anchors": [ + { + "type": "SYMBOL", + "value": "RuntimeManager", + "source": "user_text", + "subtype": null, + "span": { + "start": 14, + "end": 28 + }, + "confidence": 0.88 + }, + { + "type": "KEY_TERM", + "value": "тест", + "source": "user_text", + "subtype": null, + "span": { + "start": 4, + "end": 9 + }, + "confidence": 0.9 + } + ] + }, + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "top_k": 8 + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "top_k": 6 + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 10 + } + ], + "filters": { + "test_policy": "INCLUDE", + "path_scope": [], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "test_file_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "test_symbol_patterns": [ + "test_runtime_manager", + "TestRuntimeManager", + "RuntimeManager" + ], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + }, + "symbol_resolution": { + "status": "pending", + "resolved_symbol": null, + "alternatives": [ + "RuntimeManager" + ], + "confidence": 0.0 + }, + "evidence_policy": { + "require_def": true, + "require_flow": true, + "require_spec": false, + "allow_answer_without_evidence": false + } + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Где тесты для RuntimeManager?", + "sub_intent": "FIND_TESTS", + "path_scope": [], + "keyword_hints": [ + "RuntimeManager" + ], + "symbol_candidates": [ + "RuntimeManager" + ], + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "top_k": 8 + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "top_k": 6 + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 10 + } + ], + "filters": { + "test_policy": "INCLUDE", + "path_scope": [], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "test_file_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "test_symbol_patterns": [ + "test_runtime_manager", + "TestRuntimeManager", + "RuntimeManager" + ], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + }, + "query_plan": { + "raw": "Где тесты для RuntimeManager?", + "normalized": "Где тесты для RuntimeManager?", + "sub_intent": "FIND_TESTS", + "negations": [], + "expansions": [ + "test", + "unit test", + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "doc_scope_hints": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "symbol_kind_hint": "class", + "anchors": [ + { + "type": "SYMBOL", + "value": "RuntimeManager", + "source": "user_text", + "subtype": null, + "span": { + "start": 14, + "end": 28 + }, + "confidence": 0.88 + }, + { + "type": "KEY_TERM", + "value": "тест", + "source": "user_text", + "subtype": null, + "span": { + "start": 4, + "end": 9 + }, + "confidence": 0.9 + } + ] + } + }, + "retrieval_result": { + "target_symbol_candidates": [ + "RuntimeManager", + "ControlPlaneService" + ], + "resolved_symbol": "RuntimeManager", + "symbol_resolution_status": "resolved", + "file_candidates": [ + "src/plba/bootstrap.py", + "tests/test_runtime.py", + "src/app_runtime/core/runtime.py", + "src/plba/__init__.py", + "src/plba/core.py", + "tests/test_business_control_actions.py", + "src/app_runtime/control/service.py", + "src/app_runtime/control/__init__.py", + "src/plba/control.py", + "src/app_runtime/control/http_channel.py", + "src/app_runtime/control/http_app.py", + "src/app_runtime/control/http_runner.py", + "src/app_runtime/control/base.py" + ], + "code_chunks": [ + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/plba/bootstrap.py", + "title": "RuntimeManager", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "start_line": 4, + "end_line": 4, + "metadata": { + "symbol_id": "27158ca220022eeb5083c6addf8a50775d45f7161284fd60aac48410105f4b98", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "tests/test_runtime.py", + "title": "RuntimeManager", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "start_line": 12, + "end_line": 12, + "metadata": { + "symbol_id": "aeadc039653807b0da1ca6e3cc1078ee61cfc510b28e7f9c2ec04c59da43cc8d", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/core/runtime.py", + "title": "RuntimeManager", + "content": "class RuntimeManager\nRuntimeManager", + "start_line": 18, + "end_line": 179, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "qname": "RuntimeManager", + "kind": "class", + "signature": "RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/plba/__init__.py", + "title": "RuntimeManager", + "content": "const RuntimeManager\nRuntimeManager = plba.core.RuntimeManager", + "start_line": 16, + "end_line": 16, + "metadata": { + "symbol_id": "7eacec84f9b8d6c4201374591faecdac7493091c263681495c338973f2971ad9", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = plba.core.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/plba/core.py", + "title": "RuntimeManager", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "start_line": 2, + "end_line": 2, + "metadata": { + "symbol_id": "e1684562d978b7af7fe9b27dc5869d770348a87b5dc19a50360f58544668578b", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.core", + "is_test": false, + "blob_sha": "c0ae25110d20e665216616e26b68adfe035b624ba45d31d1272fb21f906f9ca8", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "tests/test_business_control_actions.py", + "title": "RuntimeManager", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "start_line": 14, + "end_line": 14, + "metadata": { + "symbol_id": "a1572ea8183dc0cd6ddbc74342bbde8c28cecfde37ad40b62feff09f8d103d11", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/service.py", + "title": "RuntimeManager", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "start_line": 9, + "end_line": 9, + "metadata": { + "symbol_id": "62a9575c77aad894120d18b4f2a08cf2ba42f77e9be4a8a432b767d157701afe", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/__init__.py", + "title": "ControlPlaneService", + "content": "const ControlPlaneService\nControlPlaneService = app_runtime.control.service.ControlPlaneService", + "start_line": 3, + "end_line": 3, + "metadata": { + "symbol_id": "217e8f044d1c01644bf7b81e5046af9e84469210c692a2fb0c476a19bb069ae1", + "qname": "ControlPlaneService", + "kind": "const", + "signature": "ControlPlaneService = app_runtime.control.service.ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "start_line": 14, + "end_line": 25, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "start_line": 14, + "end_line": 51, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "start_line": 14, + "end_line": 17, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "start_line": 14, + "end_line": 20, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "start_line": 14, + "end_line": 47, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/core/runtime.py", + "title": "RuntimeManager.__init__:dataflow_slice", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file", + "start_line": 32, + "end_line": 52, + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/plba/control.py", + "title": "src/plba/control.py:1-10", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\n \"ControlActionSet\",\n \"ControlChannel\",\n \"ControlPlaneService\",\n \"HttpControlChannel\",\n]", + "start_line": 1, + "end_line": 10, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.control", + "is_test": false, + "blob_sha": "31bd5c4481bfa7fbca8fae56d4860a67e3953ca74474ac8439e1f39b685d7bc8", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "tests/test_business_control_actions.py", + "title": "tests/test_business_control_actions.py:IntervalRoutine", + "content": "class IntervalRoutine:\n calls: list[float] = field(default_factory=list)\n _lock: Lock = field(default_factory=Lock)\n\n def run(self) -> None:\n with self._lock:\n self.calls.append(monotonic())\n\n def wait_runs(self, count: int, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n with self._lock:\n if len(self.calls) >= count:\n return True\n sleep(0.01)\n return False\n\n def deltas(self) -> list[float]:\n with self._lock:\n return [self.calls[index + 1] - self.calls[index] for index in range(len(self.calls) - 1)]", + "start_line": 18, + "end_line": 37, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/http_channel.py", + "title": "src/app_runtime/control/http_channel.py:HttpControlChannel", + "content": "class HttpControlChannel(ControlChannel):\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._timeout = timeout\n self._runner = UvicornThreadRunner(host, port, timeout)\n self._factory = HttpControlAppFactory()\n self._actions: ControlActionSet | None = None\n\n async def start(self, actions: ControlActionSet) -> None:\n self._actions = actions\n app = self._factory.create(self._health_response, self._action_response)\n await self._runner.start(app)\n\n async def stop(self) -> None:\n await self._runner.stop()\n\n @property\n def port(self) -> int:\n return self._runner.port\n\n async def _health_response(self) -> dict[str, object]:\n if self._actions is None:\n return {\"status\": \"unhealthy\", \"detail\": \"control actions are not configured\"}\n return await asyncio.wait_for(self._actions.health(), timeout=float(self._timeout))\n\n async def _action_response(self, action: str, _client_source: str = \"unknown\") -> JSONResponse:\n if self._actions is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"{action} handler is not configured\"}, status_code=404)\n callbacks = {\n \"start\": self._actions.start,\n \"stop\": self._actions.stop,\n \"status\": self._actions.status,\n }\n callback = callbacks.get(action)\n if callback is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"unsupported action: {action}\"}, status_code=404)\n action_timeout = max(float(self._timeout), 10.0) if action in {\"start\", \"stop\"} else float(self._timeout)\n try:\n detail = await asyncio.wait_for(callback(), timeout=action_timeout)\n except asyncio.TimeoutError:\n return JSONResponse(\n content={\"status\": \"accepted\", \"detail\": f\"{action} operation is still in progress\"},\n status_code=202,\n )\n except Exception as exc:\n return JSONResponse(content={\"status\": \"error\", \"detail\": str(exc)}, status_code=500)\n return JSONResponse(content={\"status\": \"ok\", \"detail\": detail or f\"{action} action accepted\"}, status_code=200)", + "start_line": 12, + "end_line": 57, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/http_app.py", + "title": "src/app_runtime/control/http_app.py:HttpControlAppFactory", + "content": "class HttpControlAppFactory:\n def create(\n self,\n health_provider: Callable[[], Awaitable[HealthPayload]],\n action_provider: Callable[[str, str], Awaitable[JSONResponse]],\n ) -> FastAPI:\n app = FastAPI(title=\"PLBA Control API\")\n\n @app.middleware(\"http\")\n async def log_api_call(request: Request, call_next): # type: ignore[no-untyped-def]\n started = time.monotonic()\n response = await call_next(request)\n response.headers[\"X-Response-Time-Ms\"] = str(int((time.monotonic() - started) * 1000))\n return response\n\n @app.get(\"/health\")\n async def health() -> JSONResponse:\n payload = await health_provider()\n status_code = 200 if payload.get(\"status\") == \"ok\" else 503\n return JSONResponse(content=payload, status_code=status_code)\n\n @app.get(\"/actions/{action}\")\n @app.post(\"/actions/{action}\")\n async def action(action: str, request: Request) -> JSONResponse:\n client_source = self._client_source(request)\n if action in {\"start\", \"stop\"}:\n LOGGER.warning(\"Control action requested: /actions/%s client=%s\", action, client_source)\n return await action_provider(action, client_source)\n\n return app\n\n def _client_source(self, request: Request) -> str:\n explicit_header = request.headers.get(\"X-Client-Source\", \"\").strip()\n if explicit_header:\n return explicit_header\n user_agent = request.headers.get(\"User-Agent\", \"\").strip()\n if user_agent:\n return f\"user-agent:{user_agent}\"\n return \"unknown\"", + "start_line": 15, + "end_line": 53, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/http_runner.py", + "title": "src/app_runtime/control/http_runner.py:UvicornThreadRunner", + "content": "class UvicornThreadRunner:\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._host = host\n self._port = port\n self._timeout = timeout\n self._server: Server | None = None\n self._thread: Thread | None = None\n self._error: BaseException | None = None\n\n async def start(self, app: FastAPI) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._error = None\n config = Config(app=app, host=self._host, port=self._port, log_level=\"warning\")\n self._server = Server(config)\n self._thread = Thread(target=self._serve, name=\"plba-http-control\", daemon=True)\n self._thread.start()\n await self._wait_until_started()\n\n async def stop(self) -> None:\n if self._server is None or self._thread is None:\n return\n self._server.should_exit = True\n await asyncio.to_thread(self._thread.join, self._timeout)\n self._server = None\n self._thread = None\n\n @property\n def port(self) -> int:\n if self._server is None or not getattr(self._server, \"servers\", None):\n return self._port\n socket = self._server.servers[0].sockets[0]\n return int(socket.getsockname()[1])\n\n async def _wait_until_started(self) -> None:\n if self._server is None:\n raise RuntimeError(\"Server is not initialized\")\n deadline = asyncio.get_running_loop().time() + max(float(self._timeout), 1.0)\n while not self._server.started:\n if self._error is not None:\n raise RuntimeError(\"HTTP control server failed to start\") from self._error\n if asyncio.get_running_loop().time() >= deadline:\n raise TimeoutError(\"HTTP control server startup timed out\")\n await asyncio.sleep(0.05)\n\n def _serve(self) -> None:\n if self._server is None:\n return\n try:\n asyncio.run(self._server.serve())\n except BaseException as exc: # noqa: BLE001\n self._error = exc", + "start_line": 10, + "end_line": 61, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_runner", + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/service.py", + "title": "src/app_runtime/control/service.py:ControlPlaneService", + "content": "class ControlPlaneService:\n def __init__(self) -> None:\n self._channels: list[ControlChannel] = []\n\n def register_channel(self, channel: ControlChannel) -> None:\n self._channels.append(channel)\n\n def start(self, runtime: RuntimeManager) -> None:\n if not self._channels:\n return\n asyncio.run(self._start_async(runtime))\n\n def stop(self) -> None:\n if not self._channels:\n return\n asyncio.run(self._stop_async())\n\n def snapshot(self, runtime: RuntimeManager) -> dict[str, object]:\n health = runtime.current_health()\n return {\n \"runtime\": {\"state\": runtime._state.value},\n \"modules\": list(runtime.registry.modules),\n \"services\": runtime.services.snapshot(),\n \"workers\": runtime.workers.snapshot(),\n \"health\": runtime.health.snapshot(runtime.workers.healths()) | {\"status\": health[\"status\"]},\n \"config\": runtime.configuration.get(),\n }\n\n async def _start_async(self, runtime: RuntimeManager) -> None:\n actions = ControlActionSet(\n health=runtime.health_status,\n start=runtime.start_runtime,\n stop=runtime.stop_runtime,\n status=runtime.runtime_status,\n )\n for channel in self._channels:\n await channel.start(actions)\n\n async def _stop_async(self) -> None:\n for channel in reversed(self._channels):\n await channel.stop()", + "start_line": 12, + "end_line": 52, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/base.py", + "title": "src/app_runtime/control/base.py:ControlActionSet", + "content": "class ControlActionSet:\n health: HealthHandler\n start: ActionHandler\n stop: ActionHandler\n status: ActionHandler", + "start_line": 14, + "end_line": 18, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/__init__.py", + "title": "src/app_runtime/control/__init__.py:1-5", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\"ControlActionSet\", \"ControlChannel\", \"ControlPlaneService\", \"HttpControlChannel\"]", + "start_line": 1, + "end_line": 5, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/base.py", + "title": "src/app_runtime/control/base.py:ControlChannel", + "content": "class ControlChannel(ABC):\n @abstractmethod\n async def start(self, actions: ControlActionSet) -> None:\n \"\"\"Start the control channel and bind handlers.\"\"\"\n\n @abstractmethod\n async def stop(self) -> None:\n \"\"\"Stop the control channel and release resources.\"\"\"", + "start_line": 21, + "end_line": 28, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "tests/test_business_control_actions.py", + "title": "tests/test_business_control_actions.py:BlockingRoutine", + "content": "class BlockingRoutine:\n def __init__(self, started: Event, release: Event) -> None:\n self._started = started\n self._release = release\n\n def run(self) -> None:\n self._started.set()\n self._release.wait(timeout=5.0)", + "start_line": 40, + "end_line": 47, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "relations": [ + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop" + }, + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async" + }, + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel" + }, + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start" + }, + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async" + }, + { + "path": "src/app_runtime/core/runtime.py", + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file" + } + ], + "entrypoints": [], + "test_candidates": [ + { + "path": "tests/test_business_control_actions.py", + "title": "tests/test_business_control_actions.py:IntervalRoutine", + "content": "class IntervalRoutine:\n calls: list[float] = field(default_factory=list)\n _lock: Lock = field(default_factory=Lock)\n\n def run(self) -> None:\n with self._lock:\n self.calls.append(monotonic())\n\n def wait_runs(self, count: int, timeout: float) -> bool:\n deadline = m" + }, + { + "path": "tests/test_business_control_actions.py", + "title": "tests/test_business_control_actions.py:BlockingRoutine", + "content": "class BlockingRoutine:\n def __init__(self, started: Event, release: Event) -> None:\n self._started = started\n self._release = release\n\n def run(self) -> None:\n self._started.set()\n self._release.wait(timeout=5.0)" + } + ], + "layer_outcomes": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 6, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 10, + "empty": false, + "fallback_used": false + } + ], + "missing_layers": [], + "raw_rows": [ + { + "path": "src/plba/bootstrap.py", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 4, + "span_end": 4, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "27158ca220022eeb5083c6addf8a50775d45f7161284fd60aac48410105f4b98", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 12, + "span_end": 12, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "aeadc039653807b0da1ca6e3cc1078ee61cfc510b28e7f9c2ec04c59da43cc8d", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager\nRuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "qname": "RuntimeManager", + "kind": "class", + "signature": "RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/__init__.py", + "content": "const RuntimeManager\nRuntimeManager = plba.core.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 16, + "span_end": 16, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "7eacec84f9b8d6c4201374591faecdac7493091c263681495c338973f2971ad9", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = plba.core.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/core.py", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 2, + "span_end": 2, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "e1684562d978b7af7fe9b27dc5869d770348a87b5dc19a50360f58544668578b", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.core", + "is_test": false, + "blob_sha": "c0ae25110d20e665216616e26b68adfe035b624ba45d31d1272fb21f906f9ca8", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 14, + "span_end": 14, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "a1572ea8183dc0cd6ddbc74342bbde8c28cecfde37ad40b62feff09f8d103d11", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 9, + "span_end": 9, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "62a9575c77aad894120d18b4f2a08cf2ba42f77e9be4a8a432b767d157701afe", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "const ControlPlaneService\nControlPlaneService = app_runtime.control.service.ControlPlaneService", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlPlaneService", + "span_start": 3, + "span_end": 3, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "217e8f044d1c01644bf7b81e5046af9e84469210c692a2fb0c476a19bb069ae1", + "qname": "ControlPlaneService", + "kind": "const", + "signature": "ControlPlaneService = app_runtime.control.service.ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 52, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/control.py", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\n \"ControlActionSet\",\n \"ControlChannel\",\n \"ControlPlaneService\",\n \"HttpControlChannel\",\n]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/control.py:1-10", + "span_start": 1, + "span_end": 10, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.control", + "is_test": false, + "blob_sha": "31bd5c4481bfa7fbca8fae56d4860a67e3953ca74474ac8439e1f39b685d7bc8", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class IntervalRoutine:\n calls: list[float] = field(default_factory=list)\n _lock: Lock = field(default_factory=Lock)\n\n def run(self) -> None:\n with self._lock:\n self.calls.append(monotonic())\n\n def wait_runs(self, count: int, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n with self._lock:\n if len(self.calls) >= count:\n return True\n sleep(0.01)\n return False\n\n def deltas(self) -> list[float]:\n with self._lock:\n return [self.calls[index + 1] - self.calls[index] for index in range(len(self.calls) - 1)]", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:IntervalRoutine", + "span_start": 18, + "span_end": 37, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel(ControlChannel):\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._timeout = timeout\n self._runner = UvicornThreadRunner(host, port, timeout)\n self._factory = HttpControlAppFactory()\n self._actions: ControlActionSet | None = None\n\n async def start(self, actions: ControlActionSet) -> None:\n self._actions = actions\n app = self._factory.create(self._health_response, self._action_response)\n await self._runner.start(app)\n\n async def stop(self) -> None:\n await self._runner.stop()\n\n @property\n def port(self) -> int:\n return self._runner.port\n\n async def _health_response(self) -> dict[str, object]:\n if self._actions is None:\n return {\"status\": \"unhealthy\", \"detail\": \"control actions are not configured\"}\n return await asyncio.wait_for(self._actions.health(), timeout=float(self._timeout))\n\n async def _action_response(self, action: str, _client_source: str = \"unknown\") -> JSONResponse:\n if self._actions is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"{action} handler is not configured\"}, status_code=404)\n callbacks = {\n \"start\": self._actions.start,\n \"stop\": self._actions.stop,\n \"status\": self._actions.status,\n }\n callback = callbacks.get(action)\n if callback is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"unsupported action: {action}\"}, status_code=404)\n action_timeout = max(float(self._timeout), 10.0) if action in {\"start\", \"stop\"} else float(self._timeout)\n try:\n detail = await asyncio.wait_for(callback(), timeout=action_timeout)\n except asyncio.TimeoutError:\n return JSONResponse(\n content={\"status\": \"accepted\", \"detail\": f\"{action} operation is still in progress\"},\n status_code=202,\n )\n except Exception as exc:\n return JSONResponse(content={\"status\": \"error\", \"detail\": str(exc)}, status_code=500)\n return JSONResponse(content={\"status\": \"ok\", \"detail\": detail or f\"{action} action accepted\"}, status_code=200)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_channel.py:HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "class HttpControlAppFactory:\n def create(\n self,\n health_provider: Callable[[], Awaitable[HealthPayload]],\n action_provider: Callable[[str, str], Awaitable[JSONResponse]],\n ) -> FastAPI:\n app = FastAPI(title=\"PLBA Control API\")\n\n @app.middleware(\"http\")\n async def log_api_call(request: Request, call_next): # type: ignore[no-untyped-def]\n started = time.monotonic()\n response = await call_next(request)\n response.headers[\"X-Response-Time-Ms\"] = str(int((time.monotonic() - started) * 1000))\n return response\n\n @app.get(\"/health\")\n async def health() -> JSONResponse:\n payload = await health_provider()\n status_code = 200 if payload.get(\"status\") == \"ok\" else 503\n return JSONResponse(content=payload, status_code=status_code)\n\n @app.get(\"/actions/{action}\")\n @app.post(\"/actions/{action}\")\n async def action(action: str, request: Request) -> JSONResponse:\n client_source = self._client_source(request)\n if action in {\"start\", \"stop\"}:\n LOGGER.warning(\"Control action requested: /actions/%s client=%s\", action, client_source)\n return await action_provider(action, client_source)\n\n return app\n\n def _client_source(self, request: Request) -> str:\n explicit_header = request.headers.get(\"X-Client-Source\", \"\").strip()\n if explicit_header:\n return explicit_header\n user_agent = request.headers.get(\"User-Agent\", \"\").strip()\n if user_agent:\n return f\"user-agent:{user_agent}\"\n return \"unknown\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_app.py:HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "class UvicornThreadRunner:\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._host = host\n self._port = port\n self._timeout = timeout\n self._server: Server | None = None\n self._thread: Thread | None = None\n self._error: BaseException | None = None\n\n async def start(self, app: FastAPI) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._error = None\n config = Config(app=app, host=self._host, port=self._port, log_level=\"warning\")\n self._server = Server(config)\n self._thread = Thread(target=self._serve, name=\"plba-http-control\", daemon=True)\n self._thread.start()\n await self._wait_until_started()\n\n async def stop(self) -> None:\n if self._server is None or self._thread is None:\n return\n self._server.should_exit = True\n await asyncio.to_thread(self._thread.join, self._timeout)\n self._server = None\n self._thread = None\n\n @property\n def port(self) -> int:\n if self._server is None or not getattr(self._server, \"servers\", None):\n return self._port\n socket = self._server.servers[0].sockets[0]\n return int(socket.getsockname()[1])\n\n async def _wait_until_started(self) -> None:\n if self._server is None:\n raise RuntimeError(\"Server is not initialized\")\n deadline = asyncio.get_running_loop().time() + max(float(self._timeout), 1.0)\n while not self._server.started:\n if self._error is not None:\n raise RuntimeError(\"HTTP control server failed to start\") from self._error\n if asyncio.get_running_loop().time() >= deadline:\n raise TimeoutError(\"HTTP control server startup timed out\")\n await asyncio.sleep(0.05)\n\n def _serve(self) -> None:\n if self._server is None:\n return\n try:\n asyncio.run(self._server.serve())\n except BaseException as exc: # noqa: BLE001\n self._error = exc", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_runner.py:UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_runner", + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "class ControlPlaneService:\n def __init__(self) -> None:\n self._channels: list[ControlChannel] = []\n\n def register_channel(self, channel: ControlChannel) -> None:\n self._channels.append(channel)\n\n def start(self, runtime: RuntimeManager) -> None:\n if not self._channels:\n return\n asyncio.run(self._start_async(runtime))\n\n def stop(self) -> None:\n if not self._channels:\n return\n asyncio.run(self._stop_async())\n\n def snapshot(self, runtime: RuntimeManager) -> dict[str, object]:\n health = runtime.current_health()\n return {\n \"runtime\": {\"state\": runtime._state.value},\n \"modules\": list(runtime.registry.modules),\n \"services\": runtime.services.snapshot(),\n \"workers\": runtime.workers.snapshot(),\n \"health\": runtime.health.snapshot(runtime.workers.healths()) | {\"status\": health[\"status\"]},\n \"config\": runtime.configuration.get(),\n }\n\n async def _start_async(self, runtime: RuntimeManager) -> None:\n actions = ControlActionSet(\n health=runtime.health_status,\n start=runtime.start_runtime,\n stop=runtime.stop_runtime,\n status=runtime.runtime_status,\n )\n for channel in self._channels:\n await channel.start(actions)\n\n async def _stop_async(self) -> None:\n for channel in reversed(self._channels):\n await channel.stop()", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/service.py:ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlActionSet:\n health: HealthHandler\n start: ActionHandler\n stop: ActionHandler\n status: ActionHandler", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\"ControlActionSet\", \"ControlChannel\", \"ControlPlaneService\", \"HttpControlChannel\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/__init__.py:1-5", + "span_start": 1, + "span_end": 5, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlChannel(ABC):\n @abstractmethod\n async def start(self, actions: ControlActionSet) -> None:\n \"\"\"Start the control channel and bind handlers.\"\"\"\n\n @abstractmethod\n async def stop(self) -> None:\n \"\"\"Stop the control channel and release resources.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class BlockingRoutine:\n def __init__(self, started: Event, release: Event) -> None:\n self._started = started\n self._release = release\n\n def run(self) -> None:\n self._started.set()\n self._release.wait(timeout=5.0)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:BlockingRoutine", + "span_start": 40, + "span_end": 47, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "retrieval_report": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "vector", + "C2_DEPENDENCY_GRAPH": "vector", + "C0_SOURCE_CHUNKS": "vector" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C0_SOURCE_CHUNKS": 10 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [] + } + }, + "fallback": { + "used": false, + "reason": null + }, + "retrieval_by_layer_ms": { + "C1_SYMBOL_CATALOG": 41, + "C2_DEPENDENCY_GRAPH": 61, + "C0_SOURCE_CHUNKS": 15 + } + } + }, + "diagnostics": { + "intent_correct": null, + "target_found": true, + "layers_used": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "retrieval_sufficient": true, + "answer_mode": "normal", + "router_result": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "FIND_TESTS", + "path_scope": [], + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "symbol_resolution_status": "pending" + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Где тесты для RuntimeManager?", + "sub_intent": "FIND_TESTS", + "path_scope": [], + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 6, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 10, + "empty": false, + "fallback_used": false + } + ], + "empty_layers": [], + "evidence_gate_decision": { + "sufficient": true, + "failure_reasons": [], + "evidence_count": 24 + }, + "failure_reasons": [], + "timings_ms": {} + }, + "rag_rows": [ + { + "path": "src/plba/bootstrap.py", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 4, + "span_end": 4, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "27158ca220022eeb5083c6addf8a50775d45f7161284fd60aac48410105f4b98", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 12, + "span_end": 12, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "aeadc039653807b0da1ca6e3cc1078ee61cfc510b28e7f9c2ec04c59da43cc8d", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager\nRuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "qname": "RuntimeManager", + "kind": "class", + "signature": "RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/__init__.py", + "content": "const RuntimeManager\nRuntimeManager = plba.core.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 16, + "span_end": 16, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "7eacec84f9b8d6c4201374591faecdac7493091c263681495c338973f2971ad9", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = plba.core.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/core.py", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 2, + "span_end": 2, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "e1684562d978b7af7fe9b27dc5869d770348a87b5dc19a50360f58544668578b", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.core", + "is_test": false, + "blob_sha": "c0ae25110d20e665216616e26b68adfe035b624ba45d31d1272fb21f906f9ca8", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 14, + "span_end": 14, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "a1572ea8183dc0cd6ddbc74342bbde8c28cecfde37ad40b62feff09f8d103d11", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 9, + "span_end": 9, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "62a9575c77aad894120d18b4f2a08cf2ba42f77e9be4a8a432b767d157701afe", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "const ControlPlaneService\nControlPlaneService = app_runtime.control.service.ControlPlaneService", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlPlaneService", + "span_start": 3, + "span_end": 3, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "217e8f044d1c01644bf7b81e5046af9e84469210c692a2fb0c476a19bb069ae1", + "qname": "ControlPlaneService", + "kind": "const", + "signature": "ControlPlaneService = app_runtime.control.service.ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 52, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/control.py", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\n \"ControlActionSet\",\n \"ControlChannel\",\n \"ControlPlaneService\",\n \"HttpControlChannel\",\n]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/control.py:1-10", + "span_start": 1, + "span_end": 10, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.control", + "is_test": false, + "blob_sha": "31bd5c4481bfa7fbca8fae56d4860a67e3953ca74474ac8439e1f39b685d7bc8", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class IntervalRoutine:\n calls: list[float] = field(default_factory=list)\n _lock: Lock = field(default_factory=Lock)\n\n def run(self) -> None:\n with self._lock:\n self.calls.append(monotonic())\n\n def wait_runs(self, count: int, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n with self._lock:\n if len(self.calls) >= count:\n return True\n sleep(0.01)\n return False\n\n def deltas(self) -> list[float]:\n with self._lock:\n return [self.calls[index + 1] - self.calls[index] for index in range(len(self.calls) - 1)]", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:IntervalRoutine", + "span_start": 18, + "span_end": 37, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel(ControlChannel):\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._timeout = timeout\n self._runner = UvicornThreadRunner(host, port, timeout)\n self._factory = HttpControlAppFactory()\n self._actions: ControlActionSet | None = None\n\n async def start(self, actions: ControlActionSet) -> None:\n self._actions = actions\n app = self._factory.create(self._health_response, self._action_response)\n await self._runner.start(app)\n\n async def stop(self) -> None:\n await self._runner.stop()\n\n @property\n def port(self) -> int:\n return self._runner.port\n\n async def _health_response(self) -> dict[str, object]:\n if self._actions is None:\n return {\"status\": \"unhealthy\", \"detail\": \"control actions are not configured\"}\n return await asyncio.wait_for(self._actions.health(), timeout=float(self._timeout))\n\n async def _action_response(self, action: str, _client_source: str = \"unknown\") -> JSONResponse:\n if self._actions is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"{action} handler is not configured\"}, status_code=404)\n callbacks = {\n \"start\": self._actions.start,\n \"stop\": self._actions.stop,\n \"status\": self._actions.status,\n }\n callback = callbacks.get(action)\n if callback is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"unsupported action: {action}\"}, status_code=404)\n action_timeout = max(float(self._timeout), 10.0) if action in {\"start\", \"stop\"} else float(self._timeout)\n try:\n detail = await asyncio.wait_for(callback(), timeout=action_timeout)\n except asyncio.TimeoutError:\n return JSONResponse(\n content={\"status\": \"accepted\", \"detail\": f\"{action} operation is still in progress\"},\n status_code=202,\n )\n except Exception as exc:\n return JSONResponse(content={\"status\": \"error\", \"detail\": str(exc)}, status_code=500)\n return JSONResponse(content={\"status\": \"ok\", \"detail\": detail or f\"{action} action accepted\"}, status_code=200)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_channel.py:HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "class HttpControlAppFactory:\n def create(\n self,\n health_provider: Callable[[], Awaitable[HealthPayload]],\n action_provider: Callable[[str, str], Awaitable[JSONResponse]],\n ) -> FastAPI:\n app = FastAPI(title=\"PLBA Control API\")\n\n @app.middleware(\"http\")\n async def log_api_call(request: Request, call_next): # type: ignore[no-untyped-def]\n started = time.monotonic()\n response = await call_next(request)\n response.headers[\"X-Response-Time-Ms\"] = str(int((time.monotonic() - started) * 1000))\n return response\n\n @app.get(\"/health\")\n async def health() -> JSONResponse:\n payload = await health_provider()\n status_code = 200 if payload.get(\"status\") == \"ok\" else 503\n return JSONResponse(content=payload, status_code=status_code)\n\n @app.get(\"/actions/{action}\")\n @app.post(\"/actions/{action}\")\n async def action(action: str, request: Request) -> JSONResponse:\n client_source = self._client_source(request)\n if action in {\"start\", \"stop\"}:\n LOGGER.warning(\"Control action requested: /actions/%s client=%s\", action, client_source)\n return await action_provider(action, client_source)\n\n return app\n\n def _client_source(self, request: Request) -> str:\n explicit_header = request.headers.get(\"X-Client-Source\", \"\").strip()\n if explicit_header:\n return explicit_header\n user_agent = request.headers.get(\"User-Agent\", \"\").strip()\n if user_agent:\n return f\"user-agent:{user_agent}\"\n return \"unknown\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_app.py:HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "class UvicornThreadRunner:\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._host = host\n self._port = port\n self._timeout = timeout\n self._server: Server | None = None\n self._thread: Thread | None = None\n self._error: BaseException | None = None\n\n async def start(self, app: FastAPI) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._error = None\n config = Config(app=app, host=self._host, port=self._port, log_level=\"warning\")\n self._server = Server(config)\n self._thread = Thread(target=self._serve, name=\"plba-http-control\", daemon=True)\n self._thread.start()\n await self._wait_until_started()\n\n async def stop(self) -> None:\n if self._server is None or self._thread is None:\n return\n self._server.should_exit = True\n await asyncio.to_thread(self._thread.join, self._timeout)\n self._server = None\n self._thread = None\n\n @property\n def port(self) -> int:\n if self._server is None or not getattr(self._server, \"servers\", None):\n return self._port\n socket = self._server.servers[0].sockets[0]\n return int(socket.getsockname()[1])\n\n async def _wait_until_started(self) -> None:\n if self._server is None:\n raise RuntimeError(\"Server is not initialized\")\n deadline = asyncio.get_running_loop().time() + max(float(self._timeout), 1.0)\n while not self._server.started:\n if self._error is not None:\n raise RuntimeError(\"HTTP control server failed to start\") from self._error\n if asyncio.get_running_loop().time() >= deadline:\n raise TimeoutError(\"HTTP control server startup timed out\")\n await asyncio.sleep(0.05)\n\n def _serve(self) -> None:\n if self._server is None:\n return\n try:\n asyncio.run(self._server.serve())\n except BaseException as exc: # noqa: BLE001\n self._error = exc", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_runner.py:UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_runner", + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "class ControlPlaneService:\n def __init__(self) -> None:\n self._channels: list[ControlChannel] = []\n\n def register_channel(self, channel: ControlChannel) -> None:\n self._channels.append(channel)\n\n def start(self, runtime: RuntimeManager) -> None:\n if not self._channels:\n return\n asyncio.run(self._start_async(runtime))\n\n def stop(self) -> None:\n if not self._channels:\n return\n asyncio.run(self._stop_async())\n\n def snapshot(self, runtime: RuntimeManager) -> dict[str, object]:\n health = runtime.current_health()\n return {\n \"runtime\": {\"state\": runtime._state.value},\n \"modules\": list(runtime.registry.modules),\n \"services\": runtime.services.snapshot(),\n \"workers\": runtime.workers.snapshot(),\n \"health\": runtime.health.snapshot(runtime.workers.healths()) | {\"status\": health[\"status\"]},\n \"config\": runtime.configuration.get(),\n }\n\n async def _start_async(self, runtime: RuntimeManager) -> None:\n actions = ControlActionSet(\n health=runtime.health_status,\n start=runtime.start_runtime,\n stop=runtime.stop_runtime,\n status=runtime.runtime_status,\n )\n for channel in self._channels:\n await channel.start(actions)\n\n async def _stop_async(self) -> None:\n for channel in reversed(self._channels):\n await channel.stop()", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/service.py:ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlActionSet:\n health: HealthHandler\n start: ActionHandler\n stop: ActionHandler\n status: ActionHandler", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\"ControlActionSet\", \"ControlChannel\", \"ControlPlaneService\", \"HttpControlChannel\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/__init__.py:1-5", + "span_start": 1, + "span_end": 5, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlChannel(ABC):\n @abstractmethod\n async def start(self, actions: ControlActionSet) -> None:\n \"\"\"Start the control channel and bind handlers.\"\"\"\n\n @abstractmethod\n async def stop(self) -> None:\n \"\"\"Stop the control channel and release resources.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class BlockingRoutine:\n def __init__(self, started: Event, release: Event) -> None:\n self._started = started\n self._release = release\n\n def run(self) -> None:\n self._started.set()\n self._release.wait(timeout=5.0)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:BlockingRoutine", + "span_start": 40, + "span_end": 47, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "validation": { + "passed": true, + "action": "return", + "reasons": [] + } + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-find-tests-runtime-manager.md b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-find-tests-runtime-manager.md new file mode 100644 index 0000000..e237500 --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-find-tests-runtime-manager.md @@ -0,0 +1,32 @@ +# plba-v2-find-tests-runtime-manager + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: agent_runtime +- mode: full_chain +- passed: True + +## Query +Где тесты для RuntimeManager? + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 24, + "llm_answer": "Прямые тесты для `RuntimeManager` обнаружены в следующих файлах:\n\n- **tests/test_runtime.py**: проверка инициализации и поведения `RuntimeManager`.\n- **tests/test_business_control_actions.py**: хотя этот файл упоминает `RuntimeManager`, он непосредственно не предназначен для тестирования `RuntimeManager`. Вместо этого здесь проверяются контрольные каналы и бизнес-действия.\n\nКосвенных тестов, специфичных для `RuntimeManager`, не найдено.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-find-tests-trace-service.json b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-find-tests-trace-service.json new file mode 100644 index 0000000..b6879ec --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-find-tests-trace-service.json @@ -0,0 +1,3134 @@ +{ + "case_id": "plba-v2-find-tests-trace-service", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "agent_runtime", + "mode": "full_chain", + "query": "Где тесты для TraceService?", + "actual": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 24, + "llm_answer": "Прямые тесты для `TraceService` находятся в файле `tests/test_runtime.py`.\n\nВ следующих функциях проверяются различные аспекты работы `TraceService`:\n- `test_trace_service_allows_messages_without_status`: проверяет корректность записи сообщений без статуса.\n- `test_trace_service_writes_contexts_and_messages`: проверяет запись контекстов и сообщений.\n- `test_trace_service_supports_debug_warning_and_error_levels`: проверяет поддержку различных уровней логирования.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "TraceService" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "query": "Где тесты для TraceService?", + "router_result": { + "schema_version": "1.1", + "intent": "CODE_QA", + "retrieval_profile": "code", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query_plan": { + "raw": "Где тесты для TraceService?", + "normalized": "Где тесты для TraceService?", + "sub_intent": "FIND_TESTS", + "negations": [], + "expansions": [ + "test", + "unit test", + "TraceService" + ], + "keyword_hints": [ + "TraceService" + ], + "path_hints": [], + "doc_scope_hints": [], + "symbol_candidates": [ + "TraceService" + ], + "symbol_kind_hint": "class", + "anchors": [ + { + "type": "SYMBOL", + "value": "TraceService", + "source": "user_text", + "subtype": null, + "span": { + "start": 14, + "end": 26 + }, + "confidence": 0.88 + }, + { + "type": "KEY_TERM", + "value": "тест", + "source": "user_text", + "subtype": null, + "span": { + "start": 4, + "end": 9 + }, + "confidence": 0.9 + } + ] + }, + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "top_k": 8 + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "top_k": 6 + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 10 + } + ], + "filters": { + "test_policy": "INCLUDE", + "path_scope": [], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "test_file_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "test_symbol_patterns": [ + "test_trace_service", + "TestTraceService", + "TraceService" + ], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + }, + "symbol_resolution": { + "status": "pending", + "resolved_symbol": null, + "alternatives": [ + "TraceService" + ], + "confidence": 0.0 + }, + "evidence_policy": { + "require_def": true, + "require_flow": true, + "require_spec": false, + "allow_answer_without_evidence": false + } + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Где тесты для TraceService?", + "sub_intent": "FIND_TESTS", + "path_scope": [], + "keyword_hints": [ + "TraceService" + ], + "symbol_candidates": [ + "TraceService" + ], + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "top_k": 8 + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "top_k": 6 + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 10 + } + ], + "filters": { + "test_policy": "INCLUDE", + "path_scope": [], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "test_file_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "test_symbol_patterns": [ + "test_trace_service", + "TestTraceService", + "TraceService" + ], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + }, + "query_plan": { + "raw": "Где тесты для TraceService?", + "normalized": "Где тесты для TraceService?", + "sub_intent": "FIND_TESTS", + "negations": [], + "expansions": [ + "test", + "unit test", + "TraceService" + ], + "keyword_hints": [ + "TraceService" + ], + "path_hints": [], + "doc_scope_hints": [], + "symbol_candidates": [ + "TraceService" + ], + "symbol_kind_hint": "class", + "anchors": [ + { + "type": "SYMBOL", + "value": "TraceService", + "source": "user_text", + "subtype": null, + "span": { + "start": 14, + "end": 26 + }, + "confidence": 0.88 + }, + { + "type": "KEY_TERM", + "value": "тест", + "source": "user_text", + "subtype": null, + "span": { + "start": 4, + "end": 9 + }, + "confidence": 0.9 + } + ] + } + }, + "retrieval_result": { + "target_symbol_candidates": [ + "TraceService", + "TraceService.open_context", + "TraceService.create_context", + "TraceService.current_trace_id" + ], + "resolved_symbol": "TraceService", + "symbol_resolution_status": "resolved", + "file_candidates": [ + "src/plba/__init__.py", + "src/app_runtime/core/runtime.py", + "src/app_runtime/tracing/__init__.py", + "src/app_runtime/tracing/service.py", + "src/plba/tracing.py", + "tests/test_runtime.py", + "src/app_runtime/contracts/__init__.py" + ], + "code_chunks": [ + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/plba/__init__.py", + "title": "TraceService", + "content": "const TraceService\nTraceService = plba.tracing.TraceService", + "start_line": 20, + "end_line": 20, + "metadata": { + "symbol_id": "259ec03b77b9387ea53f69c77af32791dd29adf6de617ba72dd3f839197342a1", + "qname": "TraceService", + "kind": "const", + "signature": "TraceService = plba.tracing.TraceService", + "parent_symbol_id": null, + "package_or_module": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/core/runtime.py", + "title": "TraceService", + "content": "const TraceService\nTraceService = app_runtime.tracing.service.TraceService", + "start_line": 14, + "end_line": 14, + "metadata": { + "symbol_id": "3ccf6212fd7d9730f9df933e2ee7671b65bdae0520577e1a49c6432262842db6", + "qname": "TraceService", + "kind": "const", + "signature": "TraceService = app_runtime.tracing.service.TraceService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/tracing/__init__.py", + "title": "TraceService", + "content": "const TraceService\nTraceService = app_runtime.tracing.service.TraceService", + "start_line": 2, + "end_line": 2, + "metadata": { + "symbol_id": "ecd2fab7fa9744b2adca84d3d213f7aadcb7e1da84b9c2764a4ab39c65282b11", + "qname": "TraceService", + "kind": "const", + "signature": "TraceService = app_runtime.tracing.service.TraceService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.tracing.__init__", + "is_test": false, + "blob_sha": "a01dea5f773515aeaae8e6d3431fcb93531a8b577dfa26c2e5db16cd6ae6e4d9", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/tracing/service.py", + "title": "TraceService", + "content": "class TraceService\nTraceService(TraceContextFactory)", + "start_line": 39, + "end_line": 166, + "metadata": { + "symbol_id": "c2b2b976d99f2c600000b753731b26e0a69adcb4359398b93073590c5d5d04f4", + "qname": "TraceService", + "kind": "class", + "signature": "TraceService(TraceContextFactory)", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/plba/tracing.py", + "title": "TraceService", + "content": "const TraceService\nTraceService = app_runtime.tracing.service.TraceService", + "start_line": 1, + "end_line": 1, + "metadata": { + "symbol_id": "a4556fb3f83c50ea68b94a679786ce802cab7ffd9d7138aad3d6009b2661f425", + "qname": "TraceService", + "kind": "const", + "signature": "TraceService = app_runtime.tracing.service.TraceService", + "parent_symbol_id": null, + "package_or_module": "src.plba.tracing", + "is_test": false, + "blob_sha": "a27e11c716c93c3fcefe6f11b4cc420a6b743e7606606071d7f1aeeccc4e7d45", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/tracing/service.py", + "title": "TraceService.open_context", + "content": "method TraceService.open_context\nopen_context(self)", + "start_line": 66, + "end_line": 78, + "metadata": { + "symbol_id": "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426", + "qname": "TraceService.open_context", + "kind": "method", + "signature": "open_context(self)", + "parent_symbol_id": "TraceService", + "package_or_module": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/tracing/service.py", + "title": "TraceService.create_context", + "content": "method TraceService.create_context\ncreate_context(self)", + "start_line": 45, + "end_line": 63, + "metadata": { + "symbol_id": "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a", + "qname": "TraceService.create_context", + "kind": "method", + "signature": "create_context(self)", + "parent_symbol_id": "TraceService", + "package_or_module": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/tracing/service.py", + "title": "TraceService.current_trace_id", + "content": "method TraceService.current_trace_id\ncurrent_trace_id(self)", + "start_line": 80, + "end_line": 81, + "metadata": { + "symbol_id": "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c", + "qname": "TraceService.current_trace_id", + "kind": "method", + "signature": "current_trace_id(self)", + "parent_symbol_id": "TraceService", + "package_or_module": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/tracing/service.py", + "title": "TraceService.__init__:dataflow_slice", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.create_context", + "start_line": 42, + "end_line": 61, + "metadata": { + "edge_id": "3b052062067a78aef3302ee1d996897e02a67d1b340397bea4f59fe147c0492a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a", + "dst_ref": "TraceService.create_context", + "resolution": "resolved", + "slice_id": "3b052062067a78aef3302ee1d996897e02a67d1b340397bea4f59fe147c0492a", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.create_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/tracing/service.py", + "title": "TraceService.__init__:dataflow_slice", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.close_context", + "start_line": 42, + "end_line": 84, + "metadata": { + "edge_id": "7a9353ef57c9ae5d19b3a0c6ac50fad05e6d21d31bbe1cd1cd07af6332ba6505", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "01e14158dcced7e52d0c8ac84ac7b9a75225c261b6aca6a1d7da802d0994721c", + "dst_ref": "TraceService.close_context", + "resolution": "resolved", + "slice_id": "7a9353ef57c9ae5d19b3a0c6ac50fad05e6d21d31bbe1cd1cd07af6332ba6505", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.close_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "01e14158dcced7e52d0c8ac84ac7b9a75225c261b6aca6a1d7da802d0994721c" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/tracing/service.py", + "title": "TraceService.__init__:dataflow_slice", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.open_context", + "start_line": 42, + "end_line": 78, + "metadata": { + "edge_id": "a6e13b9ebc4fed84586afd53ed92a4d14757e440873f572b2337d5622ee96031", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426", + "dst_ref": "TraceService.open_context", + "resolution": "resolved", + "slice_id": "a6e13b9ebc4fed84586afd53ed92a4d14757e440873f572b2337d5622ee96031", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.open_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/tracing/service.py", + "title": "TraceService.__init__:dataflow_slice", + "content": "TraceService.__init__\n -> TraceService.transport\n -> TraceService.__init__", + "start_line": 41, + "end_line": 43, + "metadata": { + "edge_id": "1e923a93faa05c3c43ca9b19bd047007a8589ccce57d3cc1798ae7f9f200af98", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "dst_ref": "TraceService.__init__", + "resolution": "resolved", + "slice_id": "1e923a93faa05c3c43ca9b19bd047007a8589ccce57d3cc1798ae7f9f200af98", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.transport", + "TraceService.__init__" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/tracing/service.py", + "title": "TraceService.__init__:dataflow_slice", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.current_trace_id", + "start_line": 42, + "end_line": 81, + "metadata": { + "edge_id": "3ea17138634b1190bded77ddb84aa1595124f6519b246f24fc4b02bd62b5cac1", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c", + "dst_ref": "TraceService.current_trace_id", + "resolution": "resolved", + "slice_id": "3ea17138634b1190bded77ddb84aa1595124f6519b246f24fc4b02bd62b5cac1", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.current_trace_id" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/tracing/service.py", + "title": "TraceService.__init__:dataflow_slice", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.step", + "start_line": 42, + "end_line": 88, + "metadata": { + "edge_id": "9f34c5da9b09fba99df6f6b1bde183a9aeb45111b8218a747c71590c2c9f60f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "c44bfbc66cf747283f30088da3e011a10395031d41e77b74e523c24997f641ca", + "dst_ref": "TraceService.step", + "resolution": "resolved", + "slice_id": "9f34c5da9b09fba99df6f6b1bde183a9aeb45111b8218a747c71590c2c9f60f2", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.step" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "c44bfbc66cf747283f30088da3e011a10395031d41e77b74e523c24997f641ca" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/plba/tracing.py", + "title": "src/plba/tracing.py:1-4", + "content": "from app_runtime.tracing.service import TraceService\nfrom app_runtime.tracing.transport import MySqlTraceTransport, NoOpTraceTransport\n\n__all__ = [\"MySqlTraceTransport\", \"NoOpTraceTransport\", \"TraceService\"]", + "start_line": 1, + "end_line": 4, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.tracing", + "is_test": false, + "blob_sha": "a27e11c716c93c3fcefe6f11b4cc420a6b743e7606606071d7f1aeeccc4e7d45", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "tests/test_runtime.py", + "title": "tests/test_runtime.py:test_trace_service_allows_messages_without_status", + "content": "def test_trace_service_allows_messages_without_status() -> None:\n from app_runtime.tracing.service import TraceService\n\n transport = RecordingTransport()\n manager = TraceService(transport=transport)\n\n with manager.open_context(alias=\"worker\", kind=\"worker\"):\n manager.step(\"optional-status\")\n manager.debug(\"debug without status\")\n manager.info(\"info without status\")\n manager.warning(\"warning without status\")\n manager.error(\"error without status\")\n\n assert [message.status for message in transport.messages] == [\"\", \"\", \"\", \"\"]\n assert all(message.trace_id == transport.contexts[0].trace_id for message in transport.messages)", + "start_line": 279, + "end_line": 293, + "metadata": { + "chunk_index": 11, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/tracing/__init__.py", + "title": "src/app_runtime/tracing/__init__.py:1-17", + "content": "from app_runtime.contracts.trace import TraceContext, TraceContextRecord, TraceLogMessage, TraceTransport\nfrom app_runtime.tracing.service import TraceManager, TraceService\nfrom app_runtime.tracing.store import ActiveTraceContext, TraceContextStore\nfrom app_runtime.tracing.transport import MySqlTraceTransport, NoOpTraceTransport\n\n__all__ = [\n \"ActiveTraceContext\",\n \"MySqlTraceTransport\",\n \"NoOpTraceTransport\",\n \"TraceContext\",\n \"TraceContextRecord\",\n \"TraceContextStore\",\n \"TraceLogMessage\",\n \"TraceManager\",\n \"TraceService\",\n \"TraceTransport\",\n]", + "start_line": 1, + "end_line": 17, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.tracing.__init__", + "is_test": false, + "blob_sha": "a01dea5f773515aeaae8e6d3431fcb93531a8b577dfa26c2e5db16cd6ae6e4d9", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/plba/__init__.py", + "title": "src/plba/__init__.py:1-69", + "content": "from plba.bootstrap import create_runtime\nfrom plba.config import ConfigFileLoader, FileConfigProvider\nfrom plba.control import ControlActionSet, ControlChannel, ControlPlaneService, HttpControlChannel\nfrom plba.contracts import (\n ApplicationModule,\n ConfigProvider,\n HealthContributor,\n TraceContext,\n TraceContextRecord,\n TraceLogMessage,\n TraceTransport,\n Worker,\n WorkerHealth,\n WorkerStatus,\n)\nfrom plba.core import ConfigurationManager, RuntimeManager, ServiceContainer\nfrom plba.health import HealthRegistry\nfrom plba.logging import LogManager\nfrom plba.queue import InMemoryTaskQueue\nfrom plba.tracing import MySqlTraceTransport, NoOpTraceTransport, TraceService\nfrom plba.workflow import (\n StepResult,\n WorkflowContext,\n WorkflowDefinition,\n WorkflowEngine,\n WorkflowEngineHooks,\n WorkflowNode,\n WorkflowRuntimeFactory,\n WorkflowStep,\n)\nfrom plba.workers import WorkerSupervisor\n\n__all__ = [\n \"ApplicationModule\",\n \"ConfigFileLoader\",\n \"ConfigProvider\",\n \"ConfigurationManager\",\n \"ControlActionSet\",\n \"ControlChannel\",\n \"ControlPlaneService\",\n \"create_runtime\",\n \"FileConfigProvider\",\n \"HealthContributor\",\n \"HealthRegistry\",\n \"HttpControlChannel\",\n \"InMemoryTaskQueue\",\n \"LogManager\",\n \"MySqlTraceTransport\",\n \"NoOpTraceTransport\",\n \"RuntimeManager\",\n \"ServiceContainer\",\n \"TraceContext\",\n \"TraceContextRecord\",\n \"TraceLogMessage\",\n \"TraceService\",\n \"TraceTransport\",\n \"StepResult\",\n \"Worker\",\n \"WorkerHealth\",\n \"WorkerStatus\",\n \"WorkflowContext\",\n \"WorkflowDefinition\",\n \"WorkflowEngine\",\n \"WorkflowEngineHooks\",\n \"WorkflowNode\",\n \"WorkflowRuntimeFactory\",\n \"WorkflowStep\",\n \"WorkerSupervisor\",\n]", + "start_line": 1, + "end_line": 69, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "tests/test_runtime.py", + "title": "tests/test_runtime.py:test_trace_service_writes_contexts_and_messages", + "content": "def test_trace_service_writes_contexts_and_messages() -> None:\n from app_runtime.tracing.service import TraceService\n\n transport = RecordingTransport()\n manager = TraceService(transport=transport)\n\n with manager.open_context(alias=\"worker\", kind=\"worker\", attrs={\"routine\": \"incoming\"}):\n manager.step(\"parse\")\n manager.info(\"started\", status=\"ok\", attrs={\"attempt\": 1})\n\n assert len(transport.contexts) == 1\n assert len(transport.messages) == 1\n assert transport.contexts[0].alias == \"worker\"\n assert transport.messages[0].step == \"parse\"", + "start_line": 246, + "end_line": 259, + "metadata": { + "chunk_index": 9, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "tests/test_runtime.py", + "title": "tests/test_runtime.py:test_trace_service_supports_debug_warning_and_error_levels", + "content": "def test_trace_service_supports_debug_warning_and_error_levels() -> None:\n from app_runtime.tracing.service import TraceService\n\n transport = RecordingTransport()\n manager = TraceService(transport=transport)\n\n with manager.open_context(alias=\"worker\", kind=\"worker\", attrs={\"routine\": \"incoming\"}):\n manager.step(\"validate\")\n manager.debug(\"validation details\", attrs={\"rule\": \"basic\"})\n manager.warning(\"validation warning\", status=\"degraded\", attrs={\"attempt\": 1})\n manager.error(\"integration failed\", status=\"failed\", attrs={\"integration\": \"crm\"})\n manager.exception(\"caught exception\", attrs={\"exception_type\": \"RuntimeError\"})\n\n levels = [message.level for message in transport.messages]\n assert levels == [\"DEBUG\", \"WARNING\", \"ERROR\", \"ERROR\"]", + "start_line": 262, + "end_line": 276, + "metadata": { + "chunk_index": 10, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/tracing/service.py", + "title": "src/app_runtime/tracing/service.py:TraceManager", + "content": "class TraceManager(TraceService):\n \"\"\"Compatibility alias during the transition from ConfigManager-shaped naming.\"\"\"", + "start_line": 169, + "end_line": 170, + "metadata": { + "chunk_index": 2, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/core/runtime.py", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "start_line": 18, + "end_line": 179, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/tracing/service.py", + "title": "src/app_runtime/tracing/service.py:TraceService", + "content": "class TraceService(TraceContextFactory):\n def __init__(self, transport: TraceTransport | None = None, store: TraceContextStore | None = None) -> None:\n self.transport = transport or NoOpTraceTransport()\n self.store = store or TraceContextStore()\n self._writer = TraceRecordWriter(self.transport)\n\n def create_context(\n self,\n *,\n alias: str,\n parent_id: str | None = None,\n kind: str | None = None,\n attrs: dict[str, Any] | None = None,\n ) -> str:\n record = TraceContextRecord(\n trace_id=uuid4().hex,\n alias=str(alias or \"\"),\n parent_id=parent_id,\n type=kind,\n event_time=utc_now(),\n attrs=dict(attrs or {}),\n )\n self.store.push(record)\n self._writer.write_context(record)\n return record.trace_id\n\n @contextmanager\n def open_context(\n self,\n *,\n alias: str,\n parent_id: str | None = None,\n kind: str | None = None,\n attrs: dict[str, Any] | None = None,\n ) -> Iterator[str]:\n trace_id = self.create_context(alias=alias, parent_id=parent_id, kind=kind, attrs=attrs)\n try:\n yield trace_id\n finally:\n self.store.pop()\n\n def current_trace_id(self) -> str | None:\n return self.store.current_trace_id()\n\n def close_context(self) -> str | None:\n previous = self.store.pop()\n return previous.record.trace_id if previous else None\n\n def step(self, name: str) -> None:\n self.store.set_step(str(name or \"\"))\n\n def info(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"INFO\", message, status, attrs)\n\n def debug(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"DEBUG\", message, status, attrs)\n\n def warning(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"WARNING\", message, status, attrs)\n\n def error(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"ERROR\", message, status, attrs)\n\n def exception(self, message: str, *, status: str = \"failed\", attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"ERROR\", message, status, attrs)\n\n def new_root(self, operation: str) -> TraceContext:\n trace_id = self.create_context(alias=operation, kind=\"operation\", attrs={\"operation\": operation})\n return TraceContext(trace_id=trace_id, span_id=trace_id, attributes={\"operation\": operation})\n\n def child_of(self, parent: TraceContext, operation: str) -> TraceContext:\n trace_id = self.create_context(\n alias=operation,\n parent_id=parent.trace_id,\n kind=\"worker\",\n attrs={\"operation\": operation},\n )\n return TraceContext(\n trace_id=trace_id,\n span_id=trace_id,\n parent_span_id=parent.span_id,\n attributes={\"operation\": operation},\n )\n\n def attach(self, metadata: dict[str, object], context: TraceContext) -> dict[str, object]:\n updated = dict(metadata)\n updated[\"trace_id\"] = context.trace_id\n updated[\"span_id\"] = context.span_id\n updated[\"parent_span_id\"] = context.parent_span_id\n return updated\n\n def resume(self, metadata: dict[str, object], operation: str) -> TraceContext:\n trace_id = str(metadata.get(\"trace_id\") or uuid4().hex)\n span_id = str(metadata.get(\"span_id\") or trace_id)\n parent_id = metadata.get(\"parent_span_id\")\n self.create_context(\n alias=operation,\n parent_id=str(parent_id) if parent_id else None,\n kind=\"worker\",\n attrs=dict(metadata),\n )\n return TraceContext(\n trace_id=trace_id,\n span_id=span_id,\n parent_span_id=str(parent_id) if parent_id else None,\n attributes={\"operation\": operation},\n )\n\n def _write_message(\n self,\n level: TraceLevel,\n message: str,\n status: str | None,\n attrs: dict[str, Any] | None,\n ) -> None:\n active = self.store.current()\n if active is None:\n raise RuntimeError(\"Trace context is not bound. Call create_context() first.\")\n record = TraceLogMessage(\n trace_id=active.record.trace_id,\n step=active.step,\n status=str(status or \"\"),\n message=str(message or \"\"),\n level=level,\n event_time=utc_now(),\n attrs=dict(attrs or {}),\n )\n self._writer.write_message(record)", + "start_line": 39, + "end_line": 166, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/contracts/__init__.py", + "title": "src/app_runtime/__init__.py:1-1", + "content": "__all__: list[str] = []", + "start_line": 1, + "end_line": 1, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.__init__", + "is_test": false, + "blob_sha": "8eea9df4f6d7b38ca0e39ccc27b04700e3d08dbeec8046d613d22706d19985fa", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "relations": [ + { + "path": "src/app_runtime/tracing/service.py", + "metadata": { + "edge_id": "3b052062067a78aef3302ee1d996897e02a67d1b340397bea4f59fe147c0492a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a", + "dst_ref": "TraceService.create_context", + "resolution": "resolved", + "slice_id": "3b052062067a78aef3302ee1d996897e02a67d1b340397bea4f59fe147c0492a", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.create_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.create_context" + }, + { + "path": "src/app_runtime/tracing/service.py", + "metadata": { + "edge_id": "7a9353ef57c9ae5d19b3a0c6ac50fad05e6d21d31bbe1cd1cd07af6332ba6505", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "01e14158dcced7e52d0c8ac84ac7b9a75225c261b6aca6a1d7da802d0994721c", + "dst_ref": "TraceService.close_context", + "resolution": "resolved", + "slice_id": "7a9353ef57c9ae5d19b3a0c6ac50fad05e6d21d31bbe1cd1cd07af6332ba6505", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.close_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "01e14158dcced7e52d0c8ac84ac7b9a75225c261b6aca6a1d7da802d0994721c" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.close_context" + }, + { + "path": "src/app_runtime/tracing/service.py", + "metadata": { + "edge_id": "a6e13b9ebc4fed84586afd53ed92a4d14757e440873f572b2337d5622ee96031", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426", + "dst_ref": "TraceService.open_context", + "resolution": "resolved", + "slice_id": "a6e13b9ebc4fed84586afd53ed92a4d14757e440873f572b2337d5622ee96031", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.open_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.open_context" + }, + { + "path": "src/app_runtime/tracing/service.py", + "metadata": { + "edge_id": "1e923a93faa05c3c43ca9b19bd047007a8589ccce57d3cc1798ae7f9f200af98", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "dst_ref": "TraceService.__init__", + "resolution": "resolved", + "slice_id": "1e923a93faa05c3c43ca9b19bd047007a8589ccce57d3cc1798ae7f9f200af98", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.transport", + "TraceService.__init__" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "TraceService.__init__\n -> TraceService.transport\n -> TraceService.__init__" + }, + { + "path": "src/app_runtime/tracing/service.py", + "metadata": { + "edge_id": "3ea17138634b1190bded77ddb84aa1595124f6519b246f24fc4b02bd62b5cac1", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c", + "dst_ref": "TraceService.current_trace_id", + "resolution": "resolved", + "slice_id": "3ea17138634b1190bded77ddb84aa1595124f6519b246f24fc4b02bd62b5cac1", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.current_trace_id" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.current_trace_id" + }, + { + "path": "src/app_runtime/tracing/service.py", + "metadata": { + "edge_id": "9f34c5da9b09fba99df6f6b1bde183a9aeb45111b8218a747c71590c2c9f60f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "c44bfbc66cf747283f30088da3e011a10395031d41e77b74e523c24997f641ca", + "dst_ref": "TraceService.step", + "resolution": "resolved", + "slice_id": "9f34c5da9b09fba99df6f6b1bde183a9aeb45111b8218a747c71590c2c9f60f2", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.step" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "c44bfbc66cf747283f30088da3e011a10395031d41e77b74e523c24997f641ca" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.step" + } + ], + "entrypoints": [], + "test_candidates": [ + { + "path": "tests/test_runtime.py", + "title": "tests/test_runtime.py:test_trace_service_allows_messages_without_status", + "content": "def test_trace_service_allows_messages_without_status() -> None:\n from app_runtime.tracing.service import TraceService\n\n transport = RecordingTransport()\n manager = TraceService(transport=transport)\n\n with manager.open_context(alias=\"worker\", kind=\"worker\"):\n manager.step(\"optiona" + }, + { + "path": "tests/test_runtime.py", + "title": "tests/test_runtime.py:test_trace_service_writes_contexts_and_messages", + "content": "def test_trace_service_writes_contexts_and_messages() -> None:\n from app_runtime.tracing.service import TraceService\n\n transport = RecordingTransport()\n manager = TraceService(transport=transport)\n\n with manager.open_context(alias=\"worker\", kind=\"worker\", attrs={\"routine\": \"incoming\"}):\n" + }, + { + "path": "tests/test_runtime.py", + "title": "tests/test_runtime.py:test_trace_service_supports_debug_warning_and_error_levels", + "content": "def test_trace_service_supports_debug_warning_and_error_levels() -> None:\n from app_runtime.tracing.service import TraceService\n\n transport = RecordingTransport()\n manager = TraceService(transport=transport)\n\n with manager.open_context(alias=\"worker\", kind=\"worker\", attrs={\"routine\": \"in" + } + ], + "layer_outcomes": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 6, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 10, + "empty": false, + "fallback_used": false + } + ], + "missing_layers": [], + "raw_rows": [ + { + "path": "src/plba/__init__.py", + "content": "const TraceService\nTraceService = plba.tracing.TraceService", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService", + "span_start": 20, + "span_end": 20, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "259ec03b77b9387ea53f69c77af32791dd29adf6de617ba72dd3f839197342a1", + "qname": "TraceService", + "kind": "const", + "signature": "TraceService = plba.tracing.TraceService", + "parent_symbol_id": null, + "package_or_module": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "const TraceService\nTraceService = app_runtime.tracing.service.TraceService", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService", + "span_start": 14, + "span_end": 14, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "3ccf6212fd7d9730f9df933e2ee7671b65bdae0520577e1a49c6432262842db6", + "qname": "TraceService", + "kind": "const", + "signature": "TraceService = app_runtime.tracing.service.TraceService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/__init__.py", + "content": "const TraceService\nTraceService = app_runtime.tracing.service.TraceService", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService", + "span_start": 2, + "span_end": 2, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "ecd2fab7fa9744b2adca84d3d213f7aadcb7e1da84b9c2764a4ab39c65282b11", + "qname": "TraceService", + "kind": "const", + "signature": "TraceService = app_runtime.tracing.service.TraceService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.tracing.__init__", + "is_test": false, + "blob_sha": "a01dea5f773515aeaae8e6d3431fcb93531a8b577dfa26c2e5db16cd6ae6e4d9", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceService\nTraceService(TraceContextFactory)", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService", + "span_start": 39, + "span_end": 166, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "c2b2b976d99f2c600000b753731b26e0a69adcb4359398b93073590c5d5d04f4", + "qname": "TraceService", + "kind": "class", + "signature": "TraceService(TraceContextFactory)", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/tracing.py", + "content": "const TraceService\nTraceService = app_runtime.tracing.service.TraceService", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService", + "span_start": 1, + "span_end": 1, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "a4556fb3f83c50ea68b94a679786ce802cab7ffd9d7138aad3d6009b2661f425", + "qname": "TraceService", + "kind": "const", + "signature": "TraceService = app_runtime.tracing.service.TraceService", + "parent_symbol_id": null, + "package_or_module": "src.plba.tracing", + "is_test": false, + "blob_sha": "a27e11c716c93c3fcefe6f11b4cc420a6b743e7606606071d7f1aeeccc4e7d45", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "method TraceService.open_context\nopen_context(self)", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService.open_context", + "span_start": 66, + "span_end": 78, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426", + "qname": "TraceService.open_context", + "kind": "method", + "signature": "open_context(self)", + "parent_symbol_id": "TraceService", + "package_or_module": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "method TraceService.create_context\ncreate_context(self)", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService.create_context", + "span_start": 45, + "span_end": 63, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a", + "qname": "TraceService.create_context", + "kind": "method", + "signature": "create_context(self)", + "parent_symbol_id": "TraceService", + "package_or_module": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "method TraceService.current_trace_id\ncurrent_trace_id(self)", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService.current_trace_id", + "span_start": 80, + "span_end": 81, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c", + "qname": "TraceService.current_trace_id", + "kind": "method", + "signature": "current_trace_id(self)", + "parent_symbol_id": "TraceService", + "package_or_module": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.create_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 61, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "3b052062067a78aef3302ee1d996897e02a67d1b340397bea4f59fe147c0492a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a", + "dst_ref": "TraceService.create_context", + "resolution": "resolved", + "slice_id": "3b052062067a78aef3302ee1d996897e02a67d1b340397bea4f59fe147c0492a", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.create_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.close_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 84, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "7a9353ef57c9ae5d19b3a0c6ac50fad05e6d21d31bbe1cd1cd07af6332ba6505", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "01e14158dcced7e52d0c8ac84ac7b9a75225c261b6aca6a1d7da802d0994721c", + "dst_ref": "TraceService.close_context", + "resolution": "resolved", + "slice_id": "7a9353ef57c9ae5d19b3a0c6ac50fad05e6d21d31bbe1cd1cd07af6332ba6505", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.close_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "01e14158dcced7e52d0c8ac84ac7b9a75225c261b6aca6a1d7da802d0994721c" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.open_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 78, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "a6e13b9ebc4fed84586afd53ed92a4d14757e440873f572b2337d5622ee96031", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426", + "dst_ref": "TraceService.open_context", + "resolution": "resolved", + "slice_id": "a6e13b9ebc4fed84586afd53ed92a4d14757e440873f572b2337d5622ee96031", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.open_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.transport\n -> TraceService.__init__", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 41, + "span_end": 43, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "1e923a93faa05c3c43ca9b19bd047007a8589ccce57d3cc1798ae7f9f200af98", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "dst_ref": "TraceService.__init__", + "resolution": "resolved", + "slice_id": "1e923a93faa05c3c43ca9b19bd047007a8589ccce57d3cc1798ae7f9f200af98", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.transport", + "TraceService.__init__" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.current_trace_id", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 81, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "3ea17138634b1190bded77ddb84aa1595124f6519b246f24fc4b02bd62b5cac1", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c", + "dst_ref": "TraceService.current_trace_id", + "resolution": "resolved", + "slice_id": "3ea17138634b1190bded77ddb84aa1595124f6519b246f24fc4b02bd62b5cac1", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.current_trace_id" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.step", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 88, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "9f34c5da9b09fba99df6f6b1bde183a9aeb45111b8218a747c71590c2c9f60f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "c44bfbc66cf747283f30088da3e011a10395031d41e77b74e523c24997f641ca", + "dst_ref": "TraceService.step", + "resolution": "resolved", + "slice_id": "9f34c5da9b09fba99df6f6b1bde183a9aeb45111b8218a747c71590c2c9f60f2", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.step" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "c44bfbc66cf747283f30088da3e011a10395031d41e77b74e523c24997f641ca" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/tracing.py", + "content": "from app_runtime.tracing.service import TraceService\nfrom app_runtime.tracing.transport import MySqlTraceTransport, NoOpTraceTransport\n\n__all__ = [\"MySqlTraceTransport\", \"NoOpTraceTransport\", \"TraceService\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/tracing.py:1-4", + "span_start": 1, + "span_end": 4, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.tracing", + "is_test": false, + "blob_sha": "a27e11c716c93c3fcefe6f11b4cc420a6b743e7606606071d7f1aeeccc4e7d45", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "def test_trace_service_allows_messages_without_status() -> None:\n from app_runtime.tracing.service import TraceService\n\n transport = RecordingTransport()\n manager = TraceService(transport=transport)\n\n with manager.open_context(alias=\"worker\", kind=\"worker\"):\n manager.step(\"optional-status\")\n manager.debug(\"debug without status\")\n manager.info(\"info without status\")\n manager.warning(\"warning without status\")\n manager.error(\"error without status\")\n\n assert [message.status for message in transport.messages] == [\"\", \"\", \"\", \"\"]\n assert all(message.trace_id == transport.contexts[0].trace_id for message in transport.messages)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_runtime.py:test_trace_service_allows_messages_without_status", + "span_start": 279, + "span_end": 293, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 11, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/__init__.py", + "content": "from app_runtime.contracts.trace import TraceContext, TraceContextRecord, TraceLogMessage, TraceTransport\nfrom app_runtime.tracing.service import TraceManager, TraceService\nfrom app_runtime.tracing.store import ActiveTraceContext, TraceContextStore\nfrom app_runtime.tracing.transport import MySqlTraceTransport, NoOpTraceTransport\n\n__all__ = [\n \"ActiveTraceContext\",\n \"MySqlTraceTransport\",\n \"NoOpTraceTransport\",\n \"TraceContext\",\n \"TraceContextRecord\",\n \"TraceContextStore\",\n \"TraceLogMessage\",\n \"TraceManager\",\n \"TraceService\",\n \"TraceTransport\",\n]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/tracing/__init__.py:1-17", + "span_start": 1, + "span_end": 17, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.tracing.__init__", + "is_test": false, + "blob_sha": "a01dea5f773515aeaae8e6d3431fcb93531a8b577dfa26c2e5db16cd6ae6e4d9", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/__init__.py", + "content": "from plba.bootstrap import create_runtime\nfrom plba.config import ConfigFileLoader, FileConfigProvider\nfrom plba.control import ControlActionSet, ControlChannel, ControlPlaneService, HttpControlChannel\nfrom plba.contracts import (\n ApplicationModule,\n ConfigProvider,\n HealthContributor,\n TraceContext,\n TraceContextRecord,\n TraceLogMessage,\n TraceTransport,\n Worker,\n WorkerHealth,\n WorkerStatus,\n)\nfrom plba.core import ConfigurationManager, RuntimeManager, ServiceContainer\nfrom plba.health import HealthRegistry\nfrom plba.logging import LogManager\nfrom plba.queue import InMemoryTaskQueue\nfrom plba.tracing import MySqlTraceTransport, NoOpTraceTransport, TraceService\nfrom plba.workflow import (\n StepResult,\n WorkflowContext,\n WorkflowDefinition,\n WorkflowEngine,\n WorkflowEngineHooks,\n WorkflowNode,\n WorkflowRuntimeFactory,\n WorkflowStep,\n)\nfrom plba.workers import WorkerSupervisor\n\n__all__ = [\n \"ApplicationModule\",\n \"ConfigFileLoader\",\n \"ConfigProvider\",\n \"ConfigurationManager\",\n \"ControlActionSet\",\n \"ControlChannel\",\n \"ControlPlaneService\",\n \"create_runtime\",\n \"FileConfigProvider\",\n \"HealthContributor\",\n \"HealthRegistry\",\n \"HttpControlChannel\",\n \"InMemoryTaskQueue\",\n \"LogManager\",\n \"MySqlTraceTransport\",\n \"NoOpTraceTransport\",\n \"RuntimeManager\",\n \"ServiceContainer\",\n \"TraceContext\",\n \"TraceContextRecord\",\n \"TraceLogMessage\",\n \"TraceService\",\n \"TraceTransport\",\n \"StepResult\",\n \"Worker\",\n \"WorkerHealth\",\n \"WorkerStatus\",\n \"WorkflowContext\",\n \"WorkflowDefinition\",\n \"WorkflowEngine\",\n \"WorkflowEngineHooks\",\n \"WorkflowNode\",\n \"WorkflowRuntimeFactory\",\n \"WorkflowStep\",\n \"WorkerSupervisor\",\n]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/__init__.py:1-69", + "span_start": 1, + "span_end": 69, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "def test_trace_service_writes_contexts_and_messages() -> None:\n from app_runtime.tracing.service import TraceService\n\n transport = RecordingTransport()\n manager = TraceService(transport=transport)\n\n with manager.open_context(alias=\"worker\", kind=\"worker\", attrs={\"routine\": \"incoming\"}):\n manager.step(\"parse\")\n manager.info(\"started\", status=\"ok\", attrs={\"attempt\": 1})\n\n assert len(transport.contexts) == 1\n assert len(transport.messages) == 1\n assert transport.contexts[0].alias == \"worker\"\n assert transport.messages[0].step == \"parse\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_runtime.py:test_trace_service_writes_contexts_and_messages", + "span_start": 246, + "span_end": 259, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 9, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "def test_trace_service_supports_debug_warning_and_error_levels() -> None:\n from app_runtime.tracing.service import TraceService\n\n transport = RecordingTransport()\n manager = TraceService(transport=transport)\n\n with manager.open_context(alias=\"worker\", kind=\"worker\", attrs={\"routine\": \"incoming\"}):\n manager.step(\"validate\")\n manager.debug(\"validation details\", attrs={\"rule\": \"basic\"})\n manager.warning(\"validation warning\", status=\"degraded\", attrs={\"attempt\": 1})\n manager.error(\"integration failed\", status=\"failed\", attrs={\"integration\": \"crm\"})\n manager.exception(\"caught exception\", attrs={\"exception_type\": \"RuntimeError\"})\n\n levels = [message.level for message in transport.messages]\n assert levels == [\"DEBUG\", \"WARNING\", \"ERROR\", \"ERROR\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_runtime.py:test_trace_service_supports_debug_warning_and_error_levels", + "span_start": 262, + "span_end": 276, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 10, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceManager(TraceService):\n \"\"\"Compatibility alias during the transition from ConfigManager-shaped naming.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/tracing/service.py:TraceManager", + "span_start": 169, + "span_end": 170, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 2, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceService(TraceContextFactory):\n def __init__(self, transport: TraceTransport | None = None, store: TraceContextStore | None = None) -> None:\n self.transport = transport or NoOpTraceTransport()\n self.store = store or TraceContextStore()\n self._writer = TraceRecordWriter(self.transport)\n\n def create_context(\n self,\n *,\n alias: str,\n parent_id: str | None = None,\n kind: str | None = None,\n attrs: dict[str, Any] | None = None,\n ) -> str:\n record = TraceContextRecord(\n trace_id=uuid4().hex,\n alias=str(alias or \"\"),\n parent_id=parent_id,\n type=kind,\n event_time=utc_now(),\n attrs=dict(attrs or {}),\n )\n self.store.push(record)\n self._writer.write_context(record)\n return record.trace_id\n\n @contextmanager\n def open_context(\n self,\n *,\n alias: str,\n parent_id: str | None = None,\n kind: str | None = None,\n attrs: dict[str, Any] | None = None,\n ) -> Iterator[str]:\n trace_id = self.create_context(alias=alias, parent_id=parent_id, kind=kind, attrs=attrs)\n try:\n yield trace_id\n finally:\n self.store.pop()\n\n def current_trace_id(self) -> str | None:\n return self.store.current_trace_id()\n\n def close_context(self) -> str | None:\n previous = self.store.pop()\n return previous.record.trace_id if previous else None\n\n def step(self, name: str) -> None:\n self.store.set_step(str(name or \"\"))\n\n def info(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"INFO\", message, status, attrs)\n\n def debug(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"DEBUG\", message, status, attrs)\n\n def warning(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"WARNING\", message, status, attrs)\n\n def error(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"ERROR\", message, status, attrs)\n\n def exception(self, message: str, *, status: str = \"failed\", attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"ERROR\", message, status, attrs)\n\n def new_root(self, operation: str) -> TraceContext:\n trace_id = self.create_context(alias=operation, kind=\"operation\", attrs={\"operation\": operation})\n return TraceContext(trace_id=trace_id, span_id=trace_id, attributes={\"operation\": operation})\n\n def child_of(self, parent: TraceContext, operation: str) -> TraceContext:\n trace_id = self.create_context(\n alias=operation,\n parent_id=parent.trace_id,\n kind=\"worker\",\n attrs={\"operation\": operation},\n )\n return TraceContext(\n trace_id=trace_id,\n span_id=trace_id,\n parent_span_id=parent.span_id,\n attributes={\"operation\": operation},\n )\n\n def attach(self, metadata: dict[str, object], context: TraceContext) -> dict[str, object]:\n updated = dict(metadata)\n updated[\"trace_id\"] = context.trace_id\n updated[\"span_id\"] = context.span_id\n updated[\"parent_span_id\"] = context.parent_span_id\n return updated\n\n def resume(self, metadata: dict[str, object], operation: str) -> TraceContext:\n trace_id = str(metadata.get(\"trace_id\") or uuid4().hex)\n span_id = str(metadata.get(\"span_id\") or trace_id)\n parent_id = metadata.get(\"parent_span_id\")\n self.create_context(\n alias=operation,\n parent_id=str(parent_id) if parent_id else None,\n kind=\"worker\",\n attrs=dict(metadata),\n )\n return TraceContext(\n trace_id=trace_id,\n span_id=span_id,\n parent_span_id=str(parent_id) if parent_id else None,\n attributes={\"operation\": operation},\n )\n\n def _write_message(\n self,\n level: TraceLevel,\n message: str,\n status: str | None,\n attrs: dict[str, Any] | None,\n ) -> None:\n active = self.store.current()\n if active is None:\n raise RuntimeError(\"Trace context is not bound. Call create_context() first.\")\n record = TraceLogMessage(\n trace_id=active.record.trace_id,\n step=active.step,\n status=str(status or \"\"),\n message=str(message or \"\"),\n level=level,\n event_time=utc_now(),\n attrs=dict(attrs or {}),\n )\n self._writer.write_message(record)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/tracing/service.py:TraceService", + "span_start": 39, + "span_end": 166, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/__init__.py", + "content": "__all__: list[str] = []", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/__init__.py:1-1", + "span_start": 1, + "span_end": 1, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.__init__", + "is_test": false, + "blob_sha": "8eea9df4f6d7b38ca0e39ccc27b04700e3d08dbeec8046d613d22706d19985fa", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "retrieval_report": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "vector", + "C2_DEPENDENCY_GRAPH": "vector", + "C0_SOURCE_CHUNKS": "vector" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C0_SOURCE_CHUNKS": 10 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [] + } + }, + "fallback": { + "used": false, + "reason": null + }, + "retrieval_by_layer_ms": { + "C1_SYMBOL_CATALOG": 32, + "C2_DEPENDENCY_GRAPH": 34, + "C0_SOURCE_CHUNKS": 14 + } + } + }, + "diagnostics": { + "intent_correct": null, + "target_found": true, + "layers_used": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "retrieval_sufficient": true, + "answer_mode": "normal", + "router_result": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "FIND_TESTS", + "path_scope": [], + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "symbol_resolution_status": "pending" + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Где тесты для TraceService?", + "sub_intent": "FIND_TESTS", + "path_scope": [], + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 6, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 10, + "empty": false, + "fallback_used": false + } + ], + "empty_layers": [], + "evidence_gate_decision": { + "sufficient": true, + "failure_reasons": [], + "evidence_count": 24 + }, + "failure_reasons": [], + "timings_ms": {} + }, + "rag_rows": [ + { + "path": "src/plba/__init__.py", + "content": "const TraceService\nTraceService = plba.tracing.TraceService", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService", + "span_start": 20, + "span_end": 20, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "259ec03b77b9387ea53f69c77af32791dd29adf6de617ba72dd3f839197342a1", + "qname": "TraceService", + "kind": "const", + "signature": "TraceService = plba.tracing.TraceService", + "parent_symbol_id": null, + "package_or_module": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "const TraceService\nTraceService = app_runtime.tracing.service.TraceService", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService", + "span_start": 14, + "span_end": 14, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "3ccf6212fd7d9730f9df933e2ee7671b65bdae0520577e1a49c6432262842db6", + "qname": "TraceService", + "kind": "const", + "signature": "TraceService = app_runtime.tracing.service.TraceService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/__init__.py", + "content": "const TraceService\nTraceService = app_runtime.tracing.service.TraceService", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService", + "span_start": 2, + "span_end": 2, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "ecd2fab7fa9744b2adca84d3d213f7aadcb7e1da84b9c2764a4ab39c65282b11", + "qname": "TraceService", + "kind": "const", + "signature": "TraceService = app_runtime.tracing.service.TraceService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.tracing.__init__", + "is_test": false, + "blob_sha": "a01dea5f773515aeaae8e6d3431fcb93531a8b577dfa26c2e5db16cd6ae6e4d9", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceService\nTraceService(TraceContextFactory)", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService", + "span_start": 39, + "span_end": 166, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "c2b2b976d99f2c600000b753731b26e0a69adcb4359398b93073590c5d5d04f4", + "qname": "TraceService", + "kind": "class", + "signature": "TraceService(TraceContextFactory)", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/tracing.py", + "content": "const TraceService\nTraceService = app_runtime.tracing.service.TraceService", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService", + "span_start": 1, + "span_end": 1, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "a4556fb3f83c50ea68b94a679786ce802cab7ffd9d7138aad3d6009b2661f425", + "qname": "TraceService", + "kind": "const", + "signature": "TraceService = app_runtime.tracing.service.TraceService", + "parent_symbol_id": null, + "package_or_module": "src.plba.tracing", + "is_test": false, + "blob_sha": "a27e11c716c93c3fcefe6f11b4cc420a6b743e7606606071d7f1aeeccc4e7d45", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "method TraceService.open_context\nopen_context(self)", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService.open_context", + "span_start": 66, + "span_end": 78, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426", + "qname": "TraceService.open_context", + "kind": "method", + "signature": "open_context(self)", + "parent_symbol_id": "TraceService", + "package_or_module": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "method TraceService.create_context\ncreate_context(self)", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService.create_context", + "span_start": 45, + "span_end": 63, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a", + "qname": "TraceService.create_context", + "kind": "method", + "signature": "create_context(self)", + "parent_symbol_id": "TraceService", + "package_or_module": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "method TraceService.current_trace_id\ncurrent_trace_id(self)", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService.current_trace_id", + "span_start": 80, + "span_end": 81, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c", + "qname": "TraceService.current_trace_id", + "kind": "method", + "signature": "current_trace_id(self)", + "parent_symbol_id": "TraceService", + "package_or_module": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.create_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 61, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3b052062067a78aef3302ee1d996897e02a67d1b340397bea4f59fe147c0492a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a", + "dst_ref": "TraceService.create_context", + "resolution": "resolved", + "slice_id": "3b052062067a78aef3302ee1d996897e02a67d1b340397bea4f59fe147c0492a", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.create_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.close_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 84, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "7a9353ef57c9ae5d19b3a0c6ac50fad05e6d21d31bbe1cd1cd07af6332ba6505", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "01e14158dcced7e52d0c8ac84ac7b9a75225c261b6aca6a1d7da802d0994721c", + "dst_ref": "TraceService.close_context", + "resolution": "resolved", + "slice_id": "7a9353ef57c9ae5d19b3a0c6ac50fad05e6d21d31bbe1cd1cd07af6332ba6505", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.close_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "01e14158dcced7e52d0c8ac84ac7b9a75225c261b6aca6a1d7da802d0994721c" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.open_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 78, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a6e13b9ebc4fed84586afd53ed92a4d14757e440873f572b2337d5622ee96031", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426", + "dst_ref": "TraceService.open_context", + "resolution": "resolved", + "slice_id": "a6e13b9ebc4fed84586afd53ed92a4d14757e440873f572b2337d5622ee96031", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.open_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.transport\n -> TraceService.__init__", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 41, + "span_end": 43, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "1e923a93faa05c3c43ca9b19bd047007a8589ccce57d3cc1798ae7f9f200af98", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "dst_ref": "TraceService.__init__", + "resolution": "resolved", + "slice_id": "1e923a93faa05c3c43ca9b19bd047007a8589ccce57d3cc1798ae7f9f200af98", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.transport", + "TraceService.__init__" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.current_trace_id", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 81, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3ea17138634b1190bded77ddb84aa1595124f6519b246f24fc4b02bd62b5cac1", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c", + "dst_ref": "TraceService.current_trace_id", + "resolution": "resolved", + "slice_id": "3ea17138634b1190bded77ddb84aa1595124f6519b246f24fc4b02bd62b5cac1", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.current_trace_id" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.step", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 88, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "9f34c5da9b09fba99df6f6b1bde183a9aeb45111b8218a747c71590c2c9f60f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "c44bfbc66cf747283f30088da3e011a10395031d41e77b74e523c24997f641ca", + "dst_ref": "TraceService.step", + "resolution": "resolved", + "slice_id": "9f34c5da9b09fba99df6f6b1bde183a9aeb45111b8218a747c71590c2c9f60f2", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.step" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "c44bfbc66cf747283f30088da3e011a10395031d41e77b74e523c24997f641ca" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/tracing.py", + "content": "from app_runtime.tracing.service import TraceService\nfrom app_runtime.tracing.transport import MySqlTraceTransport, NoOpTraceTransport\n\n__all__ = [\"MySqlTraceTransport\", \"NoOpTraceTransport\", \"TraceService\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/tracing.py:1-4", + "span_start": 1, + "span_end": 4, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.tracing", + "is_test": false, + "blob_sha": "a27e11c716c93c3fcefe6f11b4cc420a6b743e7606606071d7f1aeeccc4e7d45", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "def test_trace_service_allows_messages_without_status() -> None:\n from app_runtime.tracing.service import TraceService\n\n transport = RecordingTransport()\n manager = TraceService(transport=transport)\n\n with manager.open_context(alias=\"worker\", kind=\"worker\"):\n manager.step(\"optional-status\")\n manager.debug(\"debug without status\")\n manager.info(\"info without status\")\n manager.warning(\"warning without status\")\n manager.error(\"error without status\")\n\n assert [message.status for message in transport.messages] == [\"\", \"\", \"\", \"\"]\n assert all(message.trace_id == transport.contexts[0].trace_id for message in transport.messages)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_runtime.py:test_trace_service_allows_messages_without_status", + "span_start": 279, + "span_end": 293, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 11, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/__init__.py", + "content": "from app_runtime.contracts.trace import TraceContext, TraceContextRecord, TraceLogMessage, TraceTransport\nfrom app_runtime.tracing.service import TraceManager, TraceService\nfrom app_runtime.tracing.store import ActiveTraceContext, TraceContextStore\nfrom app_runtime.tracing.transport import MySqlTraceTransport, NoOpTraceTransport\n\n__all__ = [\n \"ActiveTraceContext\",\n \"MySqlTraceTransport\",\n \"NoOpTraceTransport\",\n \"TraceContext\",\n \"TraceContextRecord\",\n \"TraceContextStore\",\n \"TraceLogMessage\",\n \"TraceManager\",\n \"TraceService\",\n \"TraceTransport\",\n]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/tracing/__init__.py:1-17", + "span_start": 1, + "span_end": 17, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.tracing.__init__", + "is_test": false, + "blob_sha": "a01dea5f773515aeaae8e6d3431fcb93531a8b577dfa26c2e5db16cd6ae6e4d9", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/__init__.py", + "content": "from plba.bootstrap import create_runtime\nfrom plba.config import ConfigFileLoader, FileConfigProvider\nfrom plba.control import ControlActionSet, ControlChannel, ControlPlaneService, HttpControlChannel\nfrom plba.contracts import (\n ApplicationModule,\n ConfigProvider,\n HealthContributor,\n TraceContext,\n TraceContextRecord,\n TraceLogMessage,\n TraceTransport,\n Worker,\n WorkerHealth,\n WorkerStatus,\n)\nfrom plba.core import ConfigurationManager, RuntimeManager, ServiceContainer\nfrom plba.health import HealthRegistry\nfrom plba.logging import LogManager\nfrom plba.queue import InMemoryTaskQueue\nfrom plba.tracing import MySqlTraceTransport, NoOpTraceTransport, TraceService\nfrom plba.workflow import (\n StepResult,\n WorkflowContext,\n WorkflowDefinition,\n WorkflowEngine,\n WorkflowEngineHooks,\n WorkflowNode,\n WorkflowRuntimeFactory,\n WorkflowStep,\n)\nfrom plba.workers import WorkerSupervisor\n\n__all__ = [\n \"ApplicationModule\",\n \"ConfigFileLoader\",\n \"ConfigProvider\",\n \"ConfigurationManager\",\n \"ControlActionSet\",\n \"ControlChannel\",\n \"ControlPlaneService\",\n \"create_runtime\",\n \"FileConfigProvider\",\n \"HealthContributor\",\n \"HealthRegistry\",\n \"HttpControlChannel\",\n \"InMemoryTaskQueue\",\n \"LogManager\",\n \"MySqlTraceTransport\",\n \"NoOpTraceTransport\",\n \"RuntimeManager\",\n \"ServiceContainer\",\n \"TraceContext\",\n \"TraceContextRecord\",\n \"TraceLogMessage\",\n \"TraceService\",\n \"TraceTransport\",\n \"StepResult\",\n \"Worker\",\n \"WorkerHealth\",\n \"WorkerStatus\",\n \"WorkflowContext\",\n \"WorkflowDefinition\",\n \"WorkflowEngine\",\n \"WorkflowEngineHooks\",\n \"WorkflowNode\",\n \"WorkflowRuntimeFactory\",\n \"WorkflowStep\",\n \"WorkerSupervisor\",\n]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/__init__.py:1-69", + "span_start": 1, + "span_end": 69, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "def test_trace_service_writes_contexts_and_messages() -> None:\n from app_runtime.tracing.service import TraceService\n\n transport = RecordingTransport()\n manager = TraceService(transport=transport)\n\n with manager.open_context(alias=\"worker\", kind=\"worker\", attrs={\"routine\": \"incoming\"}):\n manager.step(\"parse\")\n manager.info(\"started\", status=\"ok\", attrs={\"attempt\": 1})\n\n assert len(transport.contexts) == 1\n assert len(transport.messages) == 1\n assert transport.contexts[0].alias == \"worker\"\n assert transport.messages[0].step == \"parse\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_runtime.py:test_trace_service_writes_contexts_and_messages", + "span_start": 246, + "span_end": 259, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 9, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "def test_trace_service_supports_debug_warning_and_error_levels() -> None:\n from app_runtime.tracing.service import TraceService\n\n transport = RecordingTransport()\n manager = TraceService(transport=transport)\n\n with manager.open_context(alias=\"worker\", kind=\"worker\", attrs={\"routine\": \"incoming\"}):\n manager.step(\"validate\")\n manager.debug(\"validation details\", attrs={\"rule\": \"basic\"})\n manager.warning(\"validation warning\", status=\"degraded\", attrs={\"attempt\": 1})\n manager.error(\"integration failed\", status=\"failed\", attrs={\"integration\": \"crm\"})\n manager.exception(\"caught exception\", attrs={\"exception_type\": \"RuntimeError\"})\n\n levels = [message.level for message in transport.messages]\n assert levels == [\"DEBUG\", \"WARNING\", \"ERROR\", \"ERROR\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_runtime.py:test_trace_service_supports_debug_warning_and_error_levels", + "span_start": 262, + "span_end": 276, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 10, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceManager(TraceService):\n \"\"\"Compatibility alias during the transition from ConfigManager-shaped naming.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/tracing/service.py:TraceManager", + "span_start": 169, + "span_end": 170, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 2, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceService(TraceContextFactory):\n def __init__(self, transport: TraceTransport | None = None, store: TraceContextStore | None = None) -> None:\n self.transport = transport or NoOpTraceTransport()\n self.store = store or TraceContextStore()\n self._writer = TraceRecordWriter(self.transport)\n\n def create_context(\n self,\n *,\n alias: str,\n parent_id: str | None = None,\n kind: str | None = None,\n attrs: dict[str, Any] | None = None,\n ) -> str:\n record = TraceContextRecord(\n trace_id=uuid4().hex,\n alias=str(alias or \"\"),\n parent_id=parent_id,\n type=kind,\n event_time=utc_now(),\n attrs=dict(attrs or {}),\n )\n self.store.push(record)\n self._writer.write_context(record)\n return record.trace_id\n\n @contextmanager\n def open_context(\n self,\n *,\n alias: str,\n parent_id: str | None = None,\n kind: str | None = None,\n attrs: dict[str, Any] | None = None,\n ) -> Iterator[str]:\n trace_id = self.create_context(alias=alias, parent_id=parent_id, kind=kind, attrs=attrs)\n try:\n yield trace_id\n finally:\n self.store.pop()\n\n def current_trace_id(self) -> str | None:\n return self.store.current_trace_id()\n\n def close_context(self) -> str | None:\n previous = self.store.pop()\n return previous.record.trace_id if previous else None\n\n def step(self, name: str) -> None:\n self.store.set_step(str(name or \"\"))\n\n def info(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"INFO\", message, status, attrs)\n\n def debug(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"DEBUG\", message, status, attrs)\n\n def warning(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"WARNING\", message, status, attrs)\n\n def error(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"ERROR\", message, status, attrs)\n\n def exception(self, message: str, *, status: str = \"failed\", attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"ERROR\", message, status, attrs)\n\n def new_root(self, operation: str) -> TraceContext:\n trace_id = self.create_context(alias=operation, kind=\"operation\", attrs={\"operation\": operation})\n return TraceContext(trace_id=trace_id, span_id=trace_id, attributes={\"operation\": operation})\n\n def child_of(self, parent: TraceContext, operation: str) -> TraceContext:\n trace_id = self.create_context(\n alias=operation,\n parent_id=parent.trace_id,\n kind=\"worker\",\n attrs={\"operation\": operation},\n )\n return TraceContext(\n trace_id=trace_id,\n span_id=trace_id,\n parent_span_id=parent.span_id,\n attributes={\"operation\": operation},\n )\n\n def attach(self, metadata: dict[str, object], context: TraceContext) -> dict[str, object]:\n updated = dict(metadata)\n updated[\"trace_id\"] = context.trace_id\n updated[\"span_id\"] = context.span_id\n updated[\"parent_span_id\"] = context.parent_span_id\n return updated\n\n def resume(self, metadata: dict[str, object], operation: str) -> TraceContext:\n trace_id = str(metadata.get(\"trace_id\") or uuid4().hex)\n span_id = str(metadata.get(\"span_id\") or trace_id)\n parent_id = metadata.get(\"parent_span_id\")\n self.create_context(\n alias=operation,\n parent_id=str(parent_id) if parent_id else None,\n kind=\"worker\",\n attrs=dict(metadata),\n )\n return TraceContext(\n trace_id=trace_id,\n span_id=span_id,\n parent_span_id=str(parent_id) if parent_id else None,\n attributes={\"operation\": operation},\n )\n\n def _write_message(\n self,\n level: TraceLevel,\n message: str,\n status: str | None,\n attrs: dict[str, Any] | None,\n ) -> None:\n active = self.store.current()\n if active is None:\n raise RuntimeError(\"Trace context is not bound. Call create_context() first.\")\n record = TraceLogMessage(\n trace_id=active.record.trace_id,\n step=active.step,\n status=str(status or \"\"),\n message=str(message or \"\"),\n level=level,\n event_time=utc_now(),\n attrs=dict(attrs or {}),\n )\n self._writer.write_message(record)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/tracing/service.py:TraceService", + "span_start": 39, + "span_end": 166, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/__init__.py", + "content": "__all__: list[str] = []", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/__init__.py:1-1", + "span_start": 1, + "span_end": 1, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.__init__", + "is_test": false, + "blob_sha": "8eea9df4f6d7b38ca0e39ccc27b04700e3d08dbeec8046d613d22706d19985fa", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "validation": { + "passed": true, + "action": "return", + "reasons": [] + } + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-find-tests-trace-service.md b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-find-tests-trace-service.md new file mode 100644 index 0000000..cd1b133 --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-find-tests-trace-service.md @@ -0,0 +1,32 @@ +# plba-v2-find-tests-trace-service + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: agent_runtime +- mode: full_chain +- passed: True + +## Query +Где тесты для TraceService? + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 24, + "llm_answer": "Прямые тесты для `TraceService` находятся в файле `tests/test_runtime.py`.\n\nВ следующих функциях проверяются различные аспекты работы `TraceService`:\n- `test_trace_service_allows_messages_without_status`: проверяет корректность записи сообщений без статуса.\n- `test_trace_service_writes_contexts_and_messages`: проверяет запись контекстов и сообщений.\n- `test_trace_service_supports_debug_warning_and_error_levels`: проверяет поддержку различных уровней логирования.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "TraceService" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-find-tests-workflow-runtime-factory-negative.json b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-find-tests-workflow-runtime-factory-negative.json new file mode 100644 index 0000000..a062465 --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-find-tests-workflow-runtime-factory-negative.json @@ -0,0 +1,3001 @@ +{ + "case_id": "plba-v2-find-tests-workflow-runtime-factory-negative", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "agent_runtime", + "mode": "full_chain", + "query": "Где тесты для WorkflowRuntimeFactory?", + "actual": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 24, + "llm_answer": "Insufficient evidence for a confident answer. No test candidates found.", + "answer_mode": "degraded", + "path_scope": [], + "symbol_candidates": [ + "WorkflowRuntimeFactory" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "query": "Где тесты для WorkflowRuntimeFactory?", + "router_result": { + "schema_version": "1.1", + "intent": "CODE_QA", + "retrieval_profile": "code", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query_plan": { + "raw": "Где тесты для WorkflowRuntimeFactory?", + "normalized": "Где тесты для WorkflowRuntimeFactory?", + "sub_intent": "FIND_TESTS", + "negations": [], + "expansions": [ + "test", + "unit test", + "WorkflowRuntimeFactory" + ], + "keyword_hints": [ + "WorkflowRuntimeFactory" + ], + "path_hints": [], + "doc_scope_hints": [], + "symbol_candidates": [ + "WorkflowRuntimeFactory" + ], + "symbol_kind_hint": "class", + "anchors": [ + { + "type": "SYMBOL", + "value": "WorkflowRuntimeFactory", + "source": "user_text", + "subtype": null, + "span": { + "start": 14, + "end": 36 + }, + "confidence": 0.88 + }, + { + "type": "KEY_TERM", + "value": "тест", + "source": "user_text", + "subtype": null, + "span": { + "start": 4, + "end": 9 + }, + "confidence": 0.9 + } + ] + }, + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "top_k": 8 + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "top_k": 6 + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 10 + } + ], + "filters": { + "test_policy": "INCLUDE", + "path_scope": [], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "test_file_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "test_symbol_patterns": [ + "test_workflow_runtime_factory", + "TestWorkflowRuntimeFactory", + "WorkflowRuntimeFactory" + ], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + }, + "symbol_resolution": { + "status": "pending", + "resolved_symbol": null, + "alternatives": [ + "WorkflowRuntimeFactory" + ], + "confidence": 0.0 + }, + "evidence_policy": { + "require_def": true, + "require_flow": true, + "require_spec": false, + "allow_answer_without_evidence": false + } + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Где тесты для WorkflowRuntimeFactory?", + "sub_intent": "FIND_TESTS", + "path_scope": [], + "keyword_hints": [ + "WorkflowRuntimeFactory" + ], + "symbol_candidates": [ + "WorkflowRuntimeFactory" + ], + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "top_k": 8 + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "top_k": 6 + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 10 + } + ], + "filters": { + "test_policy": "INCLUDE", + "path_scope": [], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "test_file_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "test_symbol_patterns": [ + "test_workflow_runtime_factory", + "TestWorkflowRuntimeFactory", + "WorkflowRuntimeFactory" + ], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + }, + "query_plan": { + "raw": "Где тесты для WorkflowRuntimeFactory?", + "normalized": "Где тесты для WorkflowRuntimeFactory?", + "sub_intent": "FIND_TESTS", + "negations": [], + "expansions": [ + "test", + "unit test", + "WorkflowRuntimeFactory" + ], + "keyword_hints": [ + "WorkflowRuntimeFactory" + ], + "path_hints": [], + "doc_scope_hints": [], + "symbol_candidates": [ + "WorkflowRuntimeFactory" + ], + "symbol_kind_hint": "class", + "anchors": [ + { + "type": "SYMBOL", + "value": "WorkflowRuntimeFactory", + "source": "user_text", + "subtype": null, + "span": { + "start": 14, + "end": 36 + }, + "confidence": 0.88 + }, + { + "type": "KEY_TERM", + "value": "тест", + "source": "user_text", + "subtype": null, + "span": { + "start": 4, + "end": 9 + }, + "confidence": 0.9 + } + ] + } + }, + "retrieval_result": { + "target_symbol_candidates": [ + "WorkflowRuntimeFactory", + "WorkflowRuntimeFactory.__init__", + "WorkflowRuntimeFactory.create_engine", + "WorkflowPersistence", + "annotations", + "WorkflowEngine" + ], + "resolved_symbol": "WorkflowRuntimeFactory", + "symbol_resolution_status": "resolved", + "file_candidates": [ + "src/plba/__init__.py", + "src/app_runtime/workflow/runtime_factory.py", + "src/plba/workflow.py", + "src/app_runtime/config/__init__.py", + "src/app_runtime/config/providers.py", + "src/app_runtime/contracts/__init__.py", + "src/app_runtime/config/file_loader.py", + "src/app_runtime/contracts/config.py", + "src/app_runtime/contracts/health.py", + "src/app_runtime/contracts/application.py" + ], + "code_chunks": [ + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/plba/__init__.py", + "title": "WorkflowRuntimeFactory", + "content": "const WorkflowRuntimeFactory\nWorkflowRuntimeFactory = plba.workflow.WorkflowRuntimeFactory", + "start_line": 21, + "end_line": 30, + "metadata": { + "symbol_id": "cb7c73db05c2622aac89114bed1cddd1d567de21cfac5c53037c62b1074b25c9", + "qname": "WorkflowRuntimeFactory", + "kind": "const", + "signature": "WorkflowRuntimeFactory = plba.workflow.WorkflowRuntimeFactory", + "parent_symbol_id": null, + "package_or_module": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/workflow/runtime_factory.py", + "title": "WorkflowRuntimeFactory", + "content": "class WorkflowRuntimeFactory\nWorkflowRuntimeFactory", + "start_line": 7, + "end_line": 19, + "metadata": { + "symbol_id": "9da827270329de64ebb426fadaaa5e35145e6666b92c6da186e08bf4b071f458", + "qname": "WorkflowRuntimeFactory", + "kind": "class", + "signature": "WorkflowRuntimeFactory", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.workflow.runtime_factory", + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/plba/workflow.py", + "title": "WorkflowRuntimeFactory", + "content": "const WorkflowRuntimeFactory\nWorkflowRuntimeFactory = app_runtime.workflow.runtime_factory.WorkflowRuntimeFactory", + "start_line": 7, + "end_line": 7, + "metadata": { + "symbol_id": "80865947d1ca709971efe9d68a9ee1f348c1c43d351bf4e1b4a5884d72985b6b", + "qname": "WorkflowRuntimeFactory", + "kind": "const", + "signature": "WorkflowRuntimeFactory = app_runtime.workflow.runtime_factory.WorkflowRuntimeFactory", + "parent_symbol_id": null, + "package_or_module": "src.plba.workflow", + "is_test": false, + "blob_sha": "f227797606042273d1f1798f76846952892eeb9e4e9e6a38fb8a631d7231ff39", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/workflow/runtime_factory.py", + "title": "WorkflowRuntimeFactory.__init__", + "content": "method WorkflowRuntimeFactory.__init__\n__init__(self, connection_factory)", + "start_line": 8, + "end_line": 12, + "metadata": { + "symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "qname": "WorkflowRuntimeFactory.__init__", + "kind": "method", + "signature": "__init__(self, connection_factory)", + "parent_symbol_id": "WorkflowRuntimeFactory", + "package_or_module": "src.app_runtime.workflow.runtime_factory", + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/workflow/runtime_factory.py", + "title": "WorkflowRuntimeFactory.create_engine", + "content": "method WorkflowRuntimeFactory.create_engine\ncreate_engine(self, workflow)", + "start_line": 14, + "end_line": 19, + "metadata": { + "symbol_id": "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333", + "qname": "WorkflowRuntimeFactory.create_engine", + "kind": "method", + "signature": "create_engine(self, workflow)", + "parent_symbol_id": "WorkflowRuntimeFactory", + "package_or_module": "src.app_runtime.workflow.runtime_factory", + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/workflow/runtime_factory.py", + "title": "WorkflowPersistence", + "content": "const WorkflowPersistence\nWorkflowPersistence = app_runtime.workflow.persistence.WorkflowPersistence", + "start_line": 4, + "end_line": 4, + "metadata": { + "symbol_id": "35693d37698e35079400b6a021d46209966ce469d9f77763d1c82d82ef4600b2", + "qname": "WorkflowPersistence", + "kind": "const", + "signature": "WorkflowPersistence = app_runtime.workflow.persistence.WorkflowPersistence", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.workflow.runtime_factory", + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/workflow/runtime_factory.py", + "title": "annotations", + "content": "const annotations\nannotations = __future__.annotations", + "start_line": 1, + "end_line": 1, + "metadata": { + "symbol_id": "e016ec68f9d15d52fe0505774229fafc705c1bf3dfda78845a3db9b032a4441d", + "qname": "annotations", + "kind": "const", + "signature": "annotations = __future__.annotations", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.workflow.runtime_factory", + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/workflow/runtime_factory.py", + "title": "WorkflowEngine", + "content": "const WorkflowEngine\nWorkflowEngine = app_runtime.workflow.engine.workflow_engine.WorkflowEngine", + "start_line": 3, + "end_line": 3, + "metadata": { + "symbol_id": "da4aee8bc7d248177fbc4f892732c6eb08baa6d268c32921a217747143a99fe0", + "qname": "WorkflowEngine", + "kind": "const", + "signature": "WorkflowEngine = app_runtime.workflow.engine.workflow_engine.WorkflowEngine", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.workflow.runtime_factory", + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/workflow/runtime_factory.py", + "title": "WorkflowRuntimeFactory.__init__:dataflow_slice", + "content": "WorkflowRuntimeFactory.__init__\n -> WorkflowRuntimeFactory._hooks\n -> WorkflowRuntimeFactory.create_engine", + "start_line": 11, + "end_line": 19, + "metadata": { + "edge_id": "db6124c75b447e4a0a9ba267bd6d6cdf267b41a733b2843d724dd42ec6f4945d", + "edge_type": "dataflow_slice", + "src_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "src_qname": "WorkflowRuntimeFactory.__init__", + "dst_symbol_id": "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333", + "dst_ref": "WorkflowRuntimeFactory.create_engine", + "resolution": "resolved", + "slice_id": "db6124c75b447e4a0a9ba267bd6d6cdf267b41a733b2843d724dd42ec6f4945d", + "root_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "path_symbols": [ + "WorkflowRuntimeFactory.__init__", + "WorkflowRuntimeFactory._hooks", + "WorkflowRuntimeFactory.create_engine" + ], + "path_symbol_ids": [ + "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/workflow/runtime_factory.py", + "title": "WorkflowRuntimeFactory.__init__:dataflow_slice", + "content": "WorkflowRuntimeFactory.__init__\n -> WorkflowRuntimeFactory._snapshot_sanitizer\n -> WorkflowRuntimeFactory.create_engine", + "start_line": 12, + "end_line": 17, + "metadata": { + "edge_id": "f46f5a871a3800b517b0f94ed2551392629e1d7920bc3e3b5a21e0d8f012b741", + "edge_type": "dataflow_slice", + "src_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "src_qname": "WorkflowRuntimeFactory.__init__", + "dst_symbol_id": "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333", + "dst_ref": "WorkflowRuntimeFactory.create_engine", + "resolution": "resolved", + "slice_id": "f46f5a871a3800b517b0f94ed2551392629e1d7920bc3e3b5a21e0d8f012b741", + "root_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "path_symbols": [ + "WorkflowRuntimeFactory.__init__", + "WorkflowRuntimeFactory._snapshot_sanitizer", + "WorkflowRuntimeFactory.create_engine" + ], + "path_symbol_ids": [ + "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/workflow/runtime_factory.py", + "title": "WorkflowRuntimeFactory.__init__:dataflow_slice", + "content": "WorkflowRuntimeFactory.__init__\n -> WorkflowRuntimeFactory._connection_factory\n -> WorkflowRuntimeFactory.create_engine", + "start_line": 9, + "end_line": 16, + "metadata": { + "edge_id": "543624853400c556d1939007017145281d76b00a694c7d5c4fbb0414ded3434e", + "edge_type": "dataflow_slice", + "src_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "src_qname": "WorkflowRuntimeFactory.__init__", + "dst_symbol_id": "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333", + "dst_ref": "WorkflowRuntimeFactory.create_engine", + "resolution": "resolved", + "slice_id": "543624853400c556d1939007017145281d76b00a694c7d5c4fbb0414ded3434e", + "root_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "path_symbols": [ + "WorkflowRuntimeFactory.__init__", + "WorkflowRuntimeFactory._connection_factory", + "WorkflowRuntimeFactory.create_engine" + ], + "path_symbol_ids": [ + "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/workflow/runtime_factory.py", + "title": "WorkflowRuntimeFactory.__init__:dataflow_slice", + "content": "WorkflowRuntimeFactory.__init__\n -> WorkflowRuntimeFactory._traces\n -> WorkflowRuntimeFactory.create_engine", + "start_line": 10, + "end_line": 19, + "metadata": { + "edge_id": "346cf5ddb4308b8403d27c5b54da8cba298bb0af7dc04c2fe30312ef574103c6", + "edge_type": "dataflow_slice", + "src_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "src_qname": "WorkflowRuntimeFactory.__init__", + "dst_symbol_id": "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333", + "dst_ref": "WorkflowRuntimeFactory.create_engine", + "resolution": "resolved", + "slice_id": "346cf5ddb4308b8403d27c5b54da8cba298bb0af7dc04c2fe30312ef574103c6", + "root_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "path_symbols": [ + "WorkflowRuntimeFactory.__init__", + "WorkflowRuntimeFactory._traces", + "WorkflowRuntimeFactory.create_engine" + ], + "path_symbol_ids": [ + "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/workflow/runtime_factory.py", + "title": "WorkflowRuntimeFactory.__init__:writes_attr", + "content": "WorkflowRuntimeFactory.__init__ writes_attr WorkflowRuntimeFactory._snapshot_sanitizer", + "start_line": 12, + "end_line": 12, + "metadata": { + "edge_id": "de0cb1913ba41f673cfb601cab23cfb2e1044ed3dd8c061aff486075aeb8af20", + "edge_type": "writes_attr", + "src_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "src_qname": "WorkflowRuntimeFactory.__init__", + "dst_symbol_id": null, + "dst_ref": "WorkflowRuntimeFactory._snapshot_sanitizer", + "resolution": "partial", + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/workflow/runtime_factory.py", + "title": "WorkflowRuntimeFactory.create_engine:calls", + "content": "WorkflowRuntimeFactory.create_engine calls WorkflowPersistence.create_default", + "start_line": 15, + "end_line": 18, + "metadata": { + "edge_id": "fa86efb6871092fc88df68295c0d92dbe46253e1afa3246ca62b6da11d4d5569", + "edge_type": "calls", + "src_symbol_id": "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333", + "src_qname": "WorkflowRuntimeFactory.create_engine", + "dst_symbol_id": null, + "dst_ref": "WorkflowPersistence.create_default", + "resolution": "partial", + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/workflow/runtime_factory.py", + "title": "src/app_runtime/workflow/runtime_factory.py:WorkflowRuntimeFactory", + "content": "class WorkflowRuntimeFactory:\n def __init__(self, connection_factory=None, *, traces, hooks=None, snapshot_sanitizer=None) -> None:\n self._connection_factory = connection_factory\n self._traces = traces\n self._hooks = hooks\n self._snapshot_sanitizer = snapshot_sanitizer\n\n def create_engine(self, workflow) -> WorkflowEngine:\n persistence = WorkflowPersistence.create_default(\n self._connection_factory,\n snapshot_sanitizer=self._snapshot_sanitizer,\n )\n return WorkflowEngine(workflow, persistence, traces=self._traces, hooks=self._hooks)", + "start_line": 7, + "end_line": 19, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.workflow.runtime_factory", + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/plba/__init__.py", + "title": "src/plba/__init__.py:1-69", + "content": "from plba.bootstrap import create_runtime\nfrom plba.config import ConfigFileLoader, FileConfigProvider\nfrom plba.control import ControlActionSet, ControlChannel, ControlPlaneService, HttpControlChannel\nfrom plba.contracts import (\n ApplicationModule,\n ConfigProvider,\n HealthContributor,\n TraceContext,\n TraceContextRecord,\n TraceLogMessage,\n TraceTransport,\n Worker,\n WorkerHealth,\n WorkerStatus,\n)\nfrom plba.core import ConfigurationManager, RuntimeManager, ServiceContainer\nfrom plba.health import HealthRegistry\nfrom plba.logging import LogManager\nfrom plba.queue import InMemoryTaskQueue\nfrom plba.tracing import MySqlTraceTransport, NoOpTraceTransport, TraceService\nfrom plba.workflow import (\n StepResult,\n WorkflowContext,\n WorkflowDefinition,\n WorkflowEngine,\n WorkflowEngineHooks,\n WorkflowNode,\n WorkflowRuntimeFactory,\n WorkflowStep,\n)\nfrom plba.workers import WorkerSupervisor\n\n__all__ = [\n \"ApplicationModule\",\n \"ConfigFileLoader\",\n \"ConfigProvider\",\n \"ConfigurationManager\",\n \"ControlActionSet\",\n \"ControlChannel\",\n \"ControlPlaneService\",\n \"create_runtime\",\n \"FileConfigProvider\",\n \"HealthContributor\",\n \"HealthRegistry\",\n \"HttpControlChannel\",\n \"InMemoryTaskQueue\",\n \"LogManager\",\n \"MySqlTraceTransport\",\n \"NoOpTraceTransport\",\n \"RuntimeManager\",\n \"ServiceContainer\",\n \"TraceContext\",\n \"TraceContextRecord\",\n \"TraceLogMessage\",\n \"TraceService\",\n \"TraceTransport\",\n \"StepResult\",\n \"Worker\",\n \"WorkerHealth\",\n \"WorkerStatus\",\n \"WorkflowContext\",\n \"WorkflowDefinition\",\n \"WorkflowEngine\",\n \"WorkflowEngineHooks\",\n \"WorkflowNode\",\n \"WorkflowRuntimeFactory\",\n \"WorkflowStep\",\n \"WorkerSupervisor\",\n]", + "start_line": 1, + "end_line": 69, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/plba/workflow.py", + "title": "src/plba/workflow.py:1-18", + "content": "from app_runtime.workflow.contracts.context import WorkflowContext\nfrom app_runtime.workflow.contracts.result import StepResult\nfrom app_runtime.workflow.contracts.step import WorkflowStep\nfrom app_runtime.workflow.contracts.workflow import WorkflowDefinition, WorkflowNode\nfrom app_runtime.workflow.engine.hooks import WorkflowEngineHooks\nfrom app_runtime.workflow.engine.workflow_engine import WorkflowEngine\nfrom app_runtime.workflow.runtime_factory import WorkflowRuntimeFactory\n\n__all__ = [\n \"StepResult\",\n \"WorkflowContext\",\n \"WorkflowDefinition\",\n \"WorkflowEngine\",\n \"WorkflowEngineHooks\",\n \"WorkflowNode\",\n \"WorkflowRuntimeFactory\",\n \"WorkflowStep\",\n]", + "start_line": 1, + "end_line": 18, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.workflow", + "is_test": false, + "blob_sha": "f227797606042273d1f1798f76846952892eeb9e4e9e6a38fb8a631d7231ff39", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/config/__init__.py", + "title": "src/app_runtime/config/__init__.py:1-4", + "content": "from app_runtime.config.file_loader import ConfigFileLoader\nfrom app_runtime.config.providers import FileConfigProvider\n\n__all__ = [\"ConfigFileLoader\", \"FileConfigProvider\"]", + "start_line": 1, + "end_line": 4, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.config.__init__", + "is_test": false, + "blob_sha": "612918029820a2a983330ec92256142b55b9de4bdf3399ece18e2a02dbad9729", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/config/providers.py", + "title": "src/app_runtime/config/providers.py:FileConfigProvider", + "content": "class FileConfigProvider(ConfigProvider):\n def __init__(self, path: str | Path) -> None:\n self._loader = ConfigFileLoader(path)\n\n @property\n def loader(self) -> ConfigFileLoader:\n return self._loader\n\n def load(self) -> dict[str, Any]:\n config = self._loader.load_sync()\n if not isinstance(config, dict):\n raise TypeError(\"Config root must be a mapping\")\n return dict(config)", + "start_line": 10, + "end_line": 22, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.config.providers", + "is_test": false, + "blob_sha": "8c53ca0122d6df6c5763bca15e99434bb4daebd5a618b8fc927e9ae90b022e64", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/contracts/__init__.py", + "title": "src/app_runtime/__init__.py:1-1", + "content": "__all__: list[str] = []", + "start_line": 1, + "end_line": 1, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.__init__", + "is_test": false, + "blob_sha": "8eea9df4f6d7b38ca0e39ccc27b04700e3d08dbeec8046d613d22706d19985fa", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/config/file_loader.py", + "title": "src/app_runtime/config/file_loader.py:ConfigFileLoader", + "content": "class ConfigFileLoader:\n def __init__(self, path: str | Path) -> None:\n self.path = Path(path)\n self.config: Any = None\n self.last_valid_config: Any = None\n self._last_seen_hash: str | None = None\n\n def read_text(self) -> str:\n return self.path.read_text(encoding=\"utf-8\")\n\n def parse(self, data: str) -> Any:\n suffix = self.path.suffix.lower()\n if suffix in {\".yml\", \".yaml\"}:\n return yaml.safe_load(data)\n return json.loads(data)\n\n def load_sync(self) -> Any:\n data = self.read_text()\n parsed = self.parse(data)\n self.config = parsed\n self.last_valid_config = parsed\n self._last_seen_hash = self._calculate_hash(data)\n return parsed\n\n def load_if_changed(self) -> tuple[bool, Any]:\n data = self.read_text()\n current_hash = self._calculate_hash(data)\n if current_hash == self._last_seen_hash:\n return False, self.config\n parsed = self.parse(data)\n self.config = parsed\n self.last_valid_config = parsed\n self._last_seen_hash = current_hash\n return True, parsed\n\n @staticmethod\n def _calculate_hash(data: str) -> str:\n return hashlib.sha256(data.encode(\"utf-8\")).hexdigest()", + "start_line": 11, + "end_line": 48, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/contracts/config.py", + "title": "src/app_runtime/contracts/config.py:ConfigProvider", + "content": "class ConfigProvider(ABC):\n @abstractmethod\n def load(self) -> dict[str, Any]:\n \"\"\"Return a config fragment.\"\"\"", + "start_line": 7, + "end_line": 10, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.config", + "is_test": false, + "blob_sha": "5e773880267743ee94954ea2db120c2d88c54d4312893293d1b89df405283ed4", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/contracts/health.py", + "title": "src/app_runtime/contracts/health.py:HealthContributor", + "content": "class HealthContributor(ABC):\n @abstractmethod\n def health(self) -> WorkerHealth:\n \"\"\"Return contributor health state.\"\"\"", + "start_line": 7, + "end_line": 10, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.health", + "is_test": false, + "blob_sha": "6bd92611def7131e32d4dd34a8ed85e6cf3c67722ad27797032a632cb30dc097", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/contracts/application.py", + "title": "src/app_runtime/contracts/application.py:ApplicationModule", + "content": "class ApplicationModule(ABC):\n @property\n @abstractmethod\n def name(self) -> str:\n \"\"\"Module name used for runtime status and diagnostics.\"\"\"\n\n @abstractmethod\n def register(self, registry: ModuleRegistry) -> None:\n \"\"\"Register workers, services, and health contributors.\"\"\"", + "start_line": 8, + "end_line": 16, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.application", + "is_test": false, + "blob_sha": "197c35634dca49c352ce3f230295a485fbffb672ce7bb8c08e752bfdf61e7fa4", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "relations": [ + { + "path": "src/app_runtime/workflow/runtime_factory.py", + "metadata": { + "edge_id": "db6124c75b447e4a0a9ba267bd6d6cdf267b41a733b2843d724dd42ec6f4945d", + "edge_type": "dataflow_slice", + "src_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "src_qname": "WorkflowRuntimeFactory.__init__", + "dst_symbol_id": "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333", + "dst_ref": "WorkflowRuntimeFactory.create_engine", + "resolution": "resolved", + "slice_id": "db6124c75b447e4a0a9ba267bd6d6cdf267b41a733b2843d724dd42ec6f4945d", + "root_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "path_symbols": [ + "WorkflowRuntimeFactory.__init__", + "WorkflowRuntimeFactory._hooks", + "WorkflowRuntimeFactory.create_engine" + ], + "path_symbol_ids": [ + "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "WorkflowRuntimeFactory.__init__\n -> WorkflowRuntimeFactory._hooks\n -> WorkflowRuntimeFactory.create_engine" + }, + { + "path": "src/app_runtime/workflow/runtime_factory.py", + "metadata": { + "edge_id": "f46f5a871a3800b517b0f94ed2551392629e1d7920bc3e3b5a21e0d8f012b741", + "edge_type": "dataflow_slice", + "src_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "src_qname": "WorkflowRuntimeFactory.__init__", + "dst_symbol_id": "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333", + "dst_ref": "WorkflowRuntimeFactory.create_engine", + "resolution": "resolved", + "slice_id": "f46f5a871a3800b517b0f94ed2551392629e1d7920bc3e3b5a21e0d8f012b741", + "root_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "path_symbols": [ + "WorkflowRuntimeFactory.__init__", + "WorkflowRuntimeFactory._snapshot_sanitizer", + "WorkflowRuntimeFactory.create_engine" + ], + "path_symbol_ids": [ + "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "WorkflowRuntimeFactory.__init__\n -> WorkflowRuntimeFactory._snapshot_sanitizer\n -> WorkflowRuntimeFactory.create_engine" + }, + { + "path": "src/app_runtime/workflow/runtime_factory.py", + "metadata": { + "edge_id": "543624853400c556d1939007017145281d76b00a694c7d5c4fbb0414ded3434e", + "edge_type": "dataflow_slice", + "src_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "src_qname": "WorkflowRuntimeFactory.__init__", + "dst_symbol_id": "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333", + "dst_ref": "WorkflowRuntimeFactory.create_engine", + "resolution": "resolved", + "slice_id": "543624853400c556d1939007017145281d76b00a694c7d5c4fbb0414ded3434e", + "root_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "path_symbols": [ + "WorkflowRuntimeFactory.__init__", + "WorkflowRuntimeFactory._connection_factory", + "WorkflowRuntimeFactory.create_engine" + ], + "path_symbol_ids": [ + "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "WorkflowRuntimeFactory.__init__\n -> WorkflowRuntimeFactory._connection_factory\n -> WorkflowRuntimeFactory.create_engine" + }, + { + "path": "src/app_runtime/workflow/runtime_factory.py", + "metadata": { + "edge_id": "346cf5ddb4308b8403d27c5b54da8cba298bb0af7dc04c2fe30312ef574103c6", + "edge_type": "dataflow_slice", + "src_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "src_qname": "WorkflowRuntimeFactory.__init__", + "dst_symbol_id": "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333", + "dst_ref": "WorkflowRuntimeFactory.create_engine", + "resolution": "resolved", + "slice_id": "346cf5ddb4308b8403d27c5b54da8cba298bb0af7dc04c2fe30312ef574103c6", + "root_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "path_symbols": [ + "WorkflowRuntimeFactory.__init__", + "WorkflowRuntimeFactory._traces", + "WorkflowRuntimeFactory.create_engine" + ], + "path_symbol_ids": [ + "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "WorkflowRuntimeFactory.__init__\n -> WorkflowRuntimeFactory._traces\n -> WorkflowRuntimeFactory.create_engine" + }, + { + "path": "src/app_runtime/workflow/runtime_factory.py", + "metadata": { + "edge_id": "de0cb1913ba41f673cfb601cab23cfb2e1044ed3dd8c061aff486075aeb8af20", + "edge_type": "writes_attr", + "src_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "src_qname": "WorkflowRuntimeFactory.__init__", + "dst_symbol_id": null, + "dst_ref": "WorkflowRuntimeFactory._snapshot_sanitizer", + "resolution": "partial", + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "WorkflowRuntimeFactory.__init__ writes_attr WorkflowRuntimeFactory._snapshot_sanitizer" + }, + { + "path": "src/app_runtime/workflow/runtime_factory.py", + "metadata": { + "edge_id": "fa86efb6871092fc88df68295c0d92dbe46253e1afa3246ca62b6da11d4d5569", + "edge_type": "calls", + "src_symbol_id": "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333", + "src_qname": "WorkflowRuntimeFactory.create_engine", + "dst_symbol_id": null, + "dst_ref": "WorkflowPersistence.create_default", + "resolution": "partial", + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "WorkflowRuntimeFactory.create_engine calls WorkflowPersistence.create_default" + } + ], + "entrypoints": [], + "test_candidates": [], + "layer_outcomes": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 6, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 10, + "empty": false, + "fallback_used": false + } + ], + "missing_layers": [], + "raw_rows": [ + { + "path": "src/plba/__init__.py", + "content": "const WorkflowRuntimeFactory\nWorkflowRuntimeFactory = plba.workflow.WorkflowRuntimeFactory", + "layer": "C1_SYMBOL_CATALOG", + "title": "WorkflowRuntimeFactory", + "span_start": 21, + "span_end": 30, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "cb7c73db05c2622aac89114bed1cddd1d567de21cfac5c53037c62b1074b25c9", + "qname": "WorkflowRuntimeFactory", + "kind": "const", + "signature": "WorkflowRuntimeFactory = plba.workflow.WorkflowRuntimeFactory", + "parent_symbol_id": null, + "package_or_module": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/runtime_factory.py", + "content": "class WorkflowRuntimeFactory\nWorkflowRuntimeFactory", + "layer": "C1_SYMBOL_CATALOG", + "title": "WorkflowRuntimeFactory", + "span_start": 7, + "span_end": 19, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "9da827270329de64ebb426fadaaa5e35145e6666b92c6da186e08bf4b071f458", + "qname": "WorkflowRuntimeFactory", + "kind": "class", + "signature": "WorkflowRuntimeFactory", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.workflow.runtime_factory", + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/workflow.py", + "content": "const WorkflowRuntimeFactory\nWorkflowRuntimeFactory = app_runtime.workflow.runtime_factory.WorkflowRuntimeFactory", + "layer": "C1_SYMBOL_CATALOG", + "title": "WorkflowRuntimeFactory", + "span_start": 7, + "span_end": 7, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "80865947d1ca709971efe9d68a9ee1f348c1c43d351bf4e1b4a5884d72985b6b", + "qname": "WorkflowRuntimeFactory", + "kind": "const", + "signature": "WorkflowRuntimeFactory = app_runtime.workflow.runtime_factory.WorkflowRuntimeFactory", + "parent_symbol_id": null, + "package_or_module": "src.plba.workflow", + "is_test": false, + "blob_sha": "f227797606042273d1f1798f76846952892eeb9e4e9e6a38fb8a631d7231ff39", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/runtime_factory.py", + "content": "method WorkflowRuntimeFactory.__init__\n__init__(self, connection_factory)", + "layer": "C1_SYMBOL_CATALOG", + "title": "WorkflowRuntimeFactory.__init__", + "span_start": 8, + "span_end": 12, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "qname": "WorkflowRuntimeFactory.__init__", + "kind": "method", + "signature": "__init__(self, connection_factory)", + "parent_symbol_id": "WorkflowRuntimeFactory", + "package_or_module": "src.app_runtime.workflow.runtime_factory", + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/runtime_factory.py", + "content": "method WorkflowRuntimeFactory.create_engine\ncreate_engine(self, workflow)", + "layer": "C1_SYMBOL_CATALOG", + "title": "WorkflowRuntimeFactory.create_engine", + "span_start": 14, + "span_end": 19, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333", + "qname": "WorkflowRuntimeFactory.create_engine", + "kind": "method", + "signature": "create_engine(self, workflow)", + "parent_symbol_id": "WorkflowRuntimeFactory", + "package_or_module": "src.app_runtime.workflow.runtime_factory", + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/runtime_factory.py", + "content": "const WorkflowPersistence\nWorkflowPersistence = app_runtime.workflow.persistence.WorkflowPersistence", + "layer": "C1_SYMBOL_CATALOG", + "title": "WorkflowPersistence", + "span_start": 4, + "span_end": 4, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "35693d37698e35079400b6a021d46209966ce469d9f77763d1c82d82ef4600b2", + "qname": "WorkflowPersistence", + "kind": "const", + "signature": "WorkflowPersistence = app_runtime.workflow.persistence.WorkflowPersistence", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.workflow.runtime_factory", + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/runtime_factory.py", + "content": "const annotations\nannotations = __future__.annotations", + "layer": "C1_SYMBOL_CATALOG", + "title": "annotations", + "span_start": 1, + "span_end": 1, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "e016ec68f9d15d52fe0505774229fafc705c1bf3dfda78845a3db9b032a4441d", + "qname": "annotations", + "kind": "const", + "signature": "annotations = __future__.annotations", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.workflow.runtime_factory", + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/runtime_factory.py", + "content": "const WorkflowEngine\nWorkflowEngine = app_runtime.workflow.engine.workflow_engine.WorkflowEngine", + "layer": "C1_SYMBOL_CATALOG", + "title": "WorkflowEngine", + "span_start": 3, + "span_end": 3, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "da4aee8bc7d248177fbc4f892732c6eb08baa6d268c32921a217747143a99fe0", + "qname": "WorkflowEngine", + "kind": "const", + "signature": "WorkflowEngine = app_runtime.workflow.engine.workflow_engine.WorkflowEngine", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.workflow.runtime_factory", + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/runtime_factory.py", + "content": "WorkflowRuntimeFactory.__init__\n -> WorkflowRuntimeFactory._hooks\n -> WorkflowRuntimeFactory.create_engine", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowRuntimeFactory.__init__:dataflow_slice", + "span_start": 11, + "span_end": 19, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "db6124c75b447e4a0a9ba267bd6d6cdf267b41a733b2843d724dd42ec6f4945d", + "edge_type": "dataflow_slice", + "src_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "src_qname": "WorkflowRuntimeFactory.__init__", + "dst_symbol_id": "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333", + "dst_ref": "WorkflowRuntimeFactory.create_engine", + "resolution": "resolved", + "slice_id": "db6124c75b447e4a0a9ba267bd6d6cdf267b41a733b2843d724dd42ec6f4945d", + "root_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "path_symbols": [ + "WorkflowRuntimeFactory.__init__", + "WorkflowRuntimeFactory._hooks", + "WorkflowRuntimeFactory.create_engine" + ], + "path_symbol_ids": [ + "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/runtime_factory.py", + "content": "WorkflowRuntimeFactory.__init__\n -> WorkflowRuntimeFactory._snapshot_sanitizer\n -> WorkflowRuntimeFactory.create_engine", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowRuntimeFactory.__init__:dataflow_slice", + "span_start": 12, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "f46f5a871a3800b517b0f94ed2551392629e1d7920bc3e3b5a21e0d8f012b741", + "edge_type": "dataflow_slice", + "src_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "src_qname": "WorkflowRuntimeFactory.__init__", + "dst_symbol_id": "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333", + "dst_ref": "WorkflowRuntimeFactory.create_engine", + "resolution": "resolved", + "slice_id": "f46f5a871a3800b517b0f94ed2551392629e1d7920bc3e3b5a21e0d8f012b741", + "root_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "path_symbols": [ + "WorkflowRuntimeFactory.__init__", + "WorkflowRuntimeFactory._snapshot_sanitizer", + "WorkflowRuntimeFactory.create_engine" + ], + "path_symbol_ids": [ + "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/runtime_factory.py", + "content": "WorkflowRuntimeFactory.__init__\n -> WorkflowRuntimeFactory._connection_factory\n -> WorkflowRuntimeFactory.create_engine", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowRuntimeFactory.__init__:dataflow_slice", + "span_start": 9, + "span_end": 16, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "543624853400c556d1939007017145281d76b00a694c7d5c4fbb0414ded3434e", + "edge_type": "dataflow_slice", + "src_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "src_qname": "WorkflowRuntimeFactory.__init__", + "dst_symbol_id": "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333", + "dst_ref": "WorkflowRuntimeFactory.create_engine", + "resolution": "resolved", + "slice_id": "543624853400c556d1939007017145281d76b00a694c7d5c4fbb0414ded3434e", + "root_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "path_symbols": [ + "WorkflowRuntimeFactory.__init__", + "WorkflowRuntimeFactory._connection_factory", + "WorkflowRuntimeFactory.create_engine" + ], + "path_symbol_ids": [ + "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/runtime_factory.py", + "content": "WorkflowRuntimeFactory.__init__\n -> WorkflowRuntimeFactory._traces\n -> WorkflowRuntimeFactory.create_engine", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowRuntimeFactory.__init__:dataflow_slice", + "span_start": 10, + "span_end": 19, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "346cf5ddb4308b8403d27c5b54da8cba298bb0af7dc04c2fe30312ef574103c6", + "edge_type": "dataflow_slice", + "src_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "src_qname": "WorkflowRuntimeFactory.__init__", + "dst_symbol_id": "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333", + "dst_ref": "WorkflowRuntimeFactory.create_engine", + "resolution": "resolved", + "slice_id": "346cf5ddb4308b8403d27c5b54da8cba298bb0af7dc04c2fe30312ef574103c6", + "root_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "path_symbols": [ + "WorkflowRuntimeFactory.__init__", + "WorkflowRuntimeFactory._traces", + "WorkflowRuntimeFactory.create_engine" + ], + "path_symbol_ids": [ + "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/runtime_factory.py", + "content": "WorkflowRuntimeFactory.__init__ writes_attr WorkflowRuntimeFactory._snapshot_sanitizer", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowRuntimeFactory.__init__:writes_attr", + "span_start": 12, + "span_end": 12, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "de0cb1913ba41f673cfb601cab23cfb2e1044ed3dd8c061aff486075aeb8af20", + "edge_type": "writes_attr", + "src_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "src_qname": "WorkflowRuntimeFactory.__init__", + "dst_symbol_id": null, + "dst_ref": "WorkflowRuntimeFactory._snapshot_sanitizer", + "resolution": "partial", + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/runtime_factory.py", + "content": "WorkflowRuntimeFactory.create_engine calls WorkflowPersistence.create_default", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowRuntimeFactory.create_engine:calls", + "span_start": 15, + "span_end": 18, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "fa86efb6871092fc88df68295c0d92dbe46253e1afa3246ca62b6da11d4d5569", + "edge_type": "calls", + "src_symbol_id": "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333", + "src_qname": "WorkflowRuntimeFactory.create_engine", + "dst_symbol_id": null, + "dst_ref": "WorkflowPersistence.create_default", + "resolution": "partial", + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/runtime_factory.py", + "content": "class WorkflowRuntimeFactory:\n def __init__(self, connection_factory=None, *, traces, hooks=None, snapshot_sanitizer=None) -> None:\n self._connection_factory = connection_factory\n self._traces = traces\n self._hooks = hooks\n self._snapshot_sanitizer = snapshot_sanitizer\n\n def create_engine(self, workflow) -> WorkflowEngine:\n persistence = WorkflowPersistence.create_default(\n self._connection_factory,\n snapshot_sanitizer=self._snapshot_sanitizer,\n )\n return WorkflowEngine(workflow, persistence, traces=self._traces, hooks=self._hooks)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/workflow/runtime_factory.py:WorkflowRuntimeFactory", + "span_start": 7, + "span_end": 19, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.workflow.runtime_factory", + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/__init__.py", + "content": "from plba.bootstrap import create_runtime\nfrom plba.config import ConfigFileLoader, FileConfigProvider\nfrom plba.control import ControlActionSet, ControlChannel, ControlPlaneService, HttpControlChannel\nfrom plba.contracts import (\n ApplicationModule,\n ConfigProvider,\n HealthContributor,\n TraceContext,\n TraceContextRecord,\n TraceLogMessage,\n TraceTransport,\n Worker,\n WorkerHealth,\n WorkerStatus,\n)\nfrom plba.core import ConfigurationManager, RuntimeManager, ServiceContainer\nfrom plba.health import HealthRegistry\nfrom plba.logging import LogManager\nfrom plba.queue import InMemoryTaskQueue\nfrom plba.tracing import MySqlTraceTransport, NoOpTraceTransport, TraceService\nfrom plba.workflow import (\n StepResult,\n WorkflowContext,\n WorkflowDefinition,\n WorkflowEngine,\n WorkflowEngineHooks,\n WorkflowNode,\n WorkflowRuntimeFactory,\n WorkflowStep,\n)\nfrom plba.workers import WorkerSupervisor\n\n__all__ = [\n \"ApplicationModule\",\n \"ConfigFileLoader\",\n \"ConfigProvider\",\n \"ConfigurationManager\",\n \"ControlActionSet\",\n \"ControlChannel\",\n \"ControlPlaneService\",\n \"create_runtime\",\n \"FileConfigProvider\",\n \"HealthContributor\",\n \"HealthRegistry\",\n \"HttpControlChannel\",\n \"InMemoryTaskQueue\",\n \"LogManager\",\n \"MySqlTraceTransport\",\n \"NoOpTraceTransport\",\n \"RuntimeManager\",\n \"ServiceContainer\",\n \"TraceContext\",\n \"TraceContextRecord\",\n \"TraceLogMessage\",\n \"TraceService\",\n \"TraceTransport\",\n \"StepResult\",\n \"Worker\",\n \"WorkerHealth\",\n \"WorkerStatus\",\n \"WorkflowContext\",\n \"WorkflowDefinition\",\n \"WorkflowEngine\",\n \"WorkflowEngineHooks\",\n \"WorkflowNode\",\n \"WorkflowRuntimeFactory\",\n \"WorkflowStep\",\n \"WorkerSupervisor\",\n]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/__init__.py:1-69", + "span_start": 1, + "span_end": 69, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/workflow.py", + "content": "from app_runtime.workflow.contracts.context import WorkflowContext\nfrom app_runtime.workflow.contracts.result import StepResult\nfrom app_runtime.workflow.contracts.step import WorkflowStep\nfrom app_runtime.workflow.contracts.workflow import WorkflowDefinition, WorkflowNode\nfrom app_runtime.workflow.engine.hooks import WorkflowEngineHooks\nfrom app_runtime.workflow.engine.workflow_engine import WorkflowEngine\nfrom app_runtime.workflow.runtime_factory import WorkflowRuntimeFactory\n\n__all__ = [\n \"StepResult\",\n \"WorkflowContext\",\n \"WorkflowDefinition\",\n \"WorkflowEngine\",\n \"WorkflowEngineHooks\",\n \"WorkflowNode\",\n \"WorkflowRuntimeFactory\",\n \"WorkflowStep\",\n]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/workflow.py:1-18", + "span_start": 1, + "span_end": 18, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.workflow", + "is_test": false, + "blob_sha": "f227797606042273d1f1798f76846952892eeb9e4e9e6a38fb8a631d7231ff39", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/__init__.py", + "content": "from app_runtime.config.file_loader import ConfigFileLoader\nfrom app_runtime.config.providers import FileConfigProvider\n\n__all__ = [\"ConfigFileLoader\", \"FileConfigProvider\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/config/__init__.py:1-4", + "span_start": 1, + "span_end": 4, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.config.__init__", + "is_test": false, + "blob_sha": "612918029820a2a983330ec92256142b55b9de4bdf3399ece18e2a02dbad9729", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/providers.py", + "content": "class FileConfigProvider(ConfigProvider):\n def __init__(self, path: str | Path) -> None:\n self._loader = ConfigFileLoader(path)\n\n @property\n def loader(self) -> ConfigFileLoader:\n return self._loader\n\n def load(self) -> dict[str, Any]:\n config = self._loader.load_sync()\n if not isinstance(config, dict):\n raise TypeError(\"Config root must be a mapping\")\n return dict(config)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/config/providers.py:FileConfigProvider", + "span_start": 10, + "span_end": 22, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.config.providers", + "is_test": false, + "blob_sha": "8c53ca0122d6df6c5763bca15e99434bb4daebd5a618b8fc927e9ae90b022e64", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/__init__.py", + "content": "__all__: list[str] = []", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/__init__.py:1-1", + "span_start": 1, + "span_end": 1, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.__init__", + "is_test": false, + "blob_sha": "8eea9df4f6d7b38ca0e39ccc27b04700e3d08dbeec8046d613d22706d19985fa", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "class ConfigFileLoader:\n def __init__(self, path: str | Path) -> None:\n self.path = Path(path)\n self.config: Any = None\n self.last_valid_config: Any = None\n self._last_seen_hash: str | None = None\n\n def read_text(self) -> str:\n return self.path.read_text(encoding=\"utf-8\")\n\n def parse(self, data: str) -> Any:\n suffix = self.path.suffix.lower()\n if suffix in {\".yml\", \".yaml\"}:\n return yaml.safe_load(data)\n return json.loads(data)\n\n def load_sync(self) -> Any:\n data = self.read_text()\n parsed = self.parse(data)\n self.config = parsed\n self.last_valid_config = parsed\n self._last_seen_hash = self._calculate_hash(data)\n return parsed\n\n def load_if_changed(self) -> tuple[bool, Any]:\n data = self.read_text()\n current_hash = self._calculate_hash(data)\n if current_hash == self._last_seen_hash:\n return False, self.config\n parsed = self.parse(data)\n self.config = parsed\n self.last_valid_config = parsed\n self._last_seen_hash = current_hash\n return True, parsed\n\n @staticmethod\n def _calculate_hash(data: str) -> str:\n return hashlib.sha256(data.encode(\"utf-8\")).hexdigest()", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/config/file_loader.py:ConfigFileLoader", + "span_start": 11, + "span_end": 48, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/config.py", + "content": "class ConfigProvider(ABC):\n @abstractmethod\n def load(self) -> dict[str, Any]:\n \"\"\"Return a config fragment.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/contracts/config.py:ConfigProvider", + "span_start": 7, + "span_end": 10, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.config", + "is_test": false, + "blob_sha": "5e773880267743ee94954ea2db120c2d88c54d4312893293d1b89df405283ed4", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/health.py", + "content": "class HealthContributor(ABC):\n @abstractmethod\n def health(self) -> WorkerHealth:\n \"\"\"Return contributor health state.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/contracts/health.py:HealthContributor", + "span_start": 7, + "span_end": 10, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.health", + "is_test": false, + "blob_sha": "6bd92611def7131e32d4dd34a8ed85e6cf3c67722ad27797032a632cb30dc097", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/application.py", + "content": "class ApplicationModule(ABC):\n @property\n @abstractmethod\n def name(self) -> str:\n \"\"\"Module name used for runtime status and diagnostics.\"\"\"\n\n @abstractmethod\n def register(self, registry: ModuleRegistry) -> None:\n \"\"\"Register workers, services, and health contributors.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/contracts/application.py:ApplicationModule", + "span_start": 8, + "span_end": 16, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.application", + "is_test": false, + "blob_sha": "197c35634dca49c352ce3f230295a485fbffb672ce7bb8c08e752bfdf61e7fa4", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "retrieval_report": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "vector", + "C2_DEPENDENCY_GRAPH": "vector", + "C0_SOURCE_CHUNKS": "vector" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C0_SOURCE_CHUNKS": 10 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [] + } + }, + "fallback": { + "used": false, + "reason": null + }, + "retrieval_by_layer_ms": { + "C1_SYMBOL_CATALOG": 34, + "C2_DEPENDENCY_GRAPH": 38, + "C0_SOURCE_CHUNKS": 33 + } + } + }, + "diagnostics": { + "intent_correct": null, + "target_found": true, + "layers_used": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "retrieval_sufficient": false, + "answer_mode": "degraded", + "router_result": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "FIND_TESTS", + "path_scope": [], + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "symbol_resolution_status": "pending" + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Где тесты для WorkflowRuntimeFactory?", + "sub_intent": "FIND_TESTS", + "path_scope": [], + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 6, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 10, + "empty": false, + "fallback_used": false + } + ], + "empty_layers": [], + "evidence_gate_decision": { + "sufficient": false, + "failure_reasons": [ + "tests_not_found" + ], + "evidence_count": 24 + }, + "failure_reasons": [ + "tests_not_found" + ], + "timings_ms": {} + }, + "rag_rows": [ + { + "path": "src/plba/__init__.py", + "content": "const WorkflowRuntimeFactory\nWorkflowRuntimeFactory = plba.workflow.WorkflowRuntimeFactory", + "layer": "C1_SYMBOL_CATALOG", + "title": "WorkflowRuntimeFactory", + "span_start": 21, + "span_end": 30, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "cb7c73db05c2622aac89114bed1cddd1d567de21cfac5c53037c62b1074b25c9", + "qname": "WorkflowRuntimeFactory", + "kind": "const", + "signature": "WorkflowRuntimeFactory = plba.workflow.WorkflowRuntimeFactory", + "parent_symbol_id": null, + "package_or_module": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/runtime_factory.py", + "content": "class WorkflowRuntimeFactory\nWorkflowRuntimeFactory", + "layer": "C1_SYMBOL_CATALOG", + "title": "WorkflowRuntimeFactory", + "span_start": 7, + "span_end": 19, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "9da827270329de64ebb426fadaaa5e35145e6666b92c6da186e08bf4b071f458", + "qname": "WorkflowRuntimeFactory", + "kind": "class", + "signature": "WorkflowRuntimeFactory", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.workflow.runtime_factory", + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/workflow.py", + "content": "const WorkflowRuntimeFactory\nWorkflowRuntimeFactory = app_runtime.workflow.runtime_factory.WorkflowRuntimeFactory", + "layer": "C1_SYMBOL_CATALOG", + "title": "WorkflowRuntimeFactory", + "span_start": 7, + "span_end": 7, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "80865947d1ca709971efe9d68a9ee1f348c1c43d351bf4e1b4a5884d72985b6b", + "qname": "WorkflowRuntimeFactory", + "kind": "const", + "signature": "WorkflowRuntimeFactory = app_runtime.workflow.runtime_factory.WorkflowRuntimeFactory", + "parent_symbol_id": null, + "package_or_module": "src.plba.workflow", + "is_test": false, + "blob_sha": "f227797606042273d1f1798f76846952892eeb9e4e9e6a38fb8a631d7231ff39", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/runtime_factory.py", + "content": "method WorkflowRuntimeFactory.__init__\n__init__(self, connection_factory)", + "layer": "C1_SYMBOL_CATALOG", + "title": "WorkflowRuntimeFactory.__init__", + "span_start": 8, + "span_end": 12, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "qname": "WorkflowRuntimeFactory.__init__", + "kind": "method", + "signature": "__init__(self, connection_factory)", + "parent_symbol_id": "WorkflowRuntimeFactory", + "package_or_module": "src.app_runtime.workflow.runtime_factory", + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/runtime_factory.py", + "content": "method WorkflowRuntimeFactory.create_engine\ncreate_engine(self, workflow)", + "layer": "C1_SYMBOL_CATALOG", + "title": "WorkflowRuntimeFactory.create_engine", + "span_start": 14, + "span_end": 19, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333", + "qname": "WorkflowRuntimeFactory.create_engine", + "kind": "method", + "signature": "create_engine(self, workflow)", + "parent_symbol_id": "WorkflowRuntimeFactory", + "package_or_module": "src.app_runtime.workflow.runtime_factory", + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/runtime_factory.py", + "content": "const WorkflowPersistence\nWorkflowPersistence = app_runtime.workflow.persistence.WorkflowPersistence", + "layer": "C1_SYMBOL_CATALOG", + "title": "WorkflowPersistence", + "span_start": 4, + "span_end": 4, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "35693d37698e35079400b6a021d46209966ce469d9f77763d1c82d82ef4600b2", + "qname": "WorkflowPersistence", + "kind": "const", + "signature": "WorkflowPersistence = app_runtime.workflow.persistence.WorkflowPersistence", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.workflow.runtime_factory", + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/runtime_factory.py", + "content": "const annotations\nannotations = __future__.annotations", + "layer": "C1_SYMBOL_CATALOG", + "title": "annotations", + "span_start": 1, + "span_end": 1, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "e016ec68f9d15d52fe0505774229fafc705c1bf3dfda78845a3db9b032a4441d", + "qname": "annotations", + "kind": "const", + "signature": "annotations = __future__.annotations", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.workflow.runtime_factory", + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/runtime_factory.py", + "content": "const WorkflowEngine\nWorkflowEngine = app_runtime.workflow.engine.workflow_engine.WorkflowEngine", + "layer": "C1_SYMBOL_CATALOG", + "title": "WorkflowEngine", + "span_start": 3, + "span_end": 3, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "da4aee8bc7d248177fbc4f892732c6eb08baa6d268c32921a217747143a99fe0", + "qname": "WorkflowEngine", + "kind": "const", + "signature": "WorkflowEngine = app_runtime.workflow.engine.workflow_engine.WorkflowEngine", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.workflow.runtime_factory", + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/runtime_factory.py", + "content": "WorkflowRuntimeFactory.__init__\n -> WorkflowRuntimeFactory._hooks\n -> WorkflowRuntimeFactory.create_engine", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowRuntimeFactory.__init__:dataflow_slice", + "span_start": 11, + "span_end": 19, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "db6124c75b447e4a0a9ba267bd6d6cdf267b41a733b2843d724dd42ec6f4945d", + "edge_type": "dataflow_slice", + "src_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "src_qname": "WorkflowRuntimeFactory.__init__", + "dst_symbol_id": "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333", + "dst_ref": "WorkflowRuntimeFactory.create_engine", + "resolution": "resolved", + "slice_id": "db6124c75b447e4a0a9ba267bd6d6cdf267b41a733b2843d724dd42ec6f4945d", + "root_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "path_symbols": [ + "WorkflowRuntimeFactory.__init__", + "WorkflowRuntimeFactory._hooks", + "WorkflowRuntimeFactory.create_engine" + ], + "path_symbol_ids": [ + "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/runtime_factory.py", + "content": "WorkflowRuntimeFactory.__init__\n -> WorkflowRuntimeFactory._snapshot_sanitizer\n -> WorkflowRuntimeFactory.create_engine", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowRuntimeFactory.__init__:dataflow_slice", + "span_start": 12, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "f46f5a871a3800b517b0f94ed2551392629e1d7920bc3e3b5a21e0d8f012b741", + "edge_type": "dataflow_slice", + "src_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "src_qname": "WorkflowRuntimeFactory.__init__", + "dst_symbol_id": "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333", + "dst_ref": "WorkflowRuntimeFactory.create_engine", + "resolution": "resolved", + "slice_id": "f46f5a871a3800b517b0f94ed2551392629e1d7920bc3e3b5a21e0d8f012b741", + "root_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "path_symbols": [ + "WorkflowRuntimeFactory.__init__", + "WorkflowRuntimeFactory._snapshot_sanitizer", + "WorkflowRuntimeFactory.create_engine" + ], + "path_symbol_ids": [ + "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/runtime_factory.py", + "content": "WorkflowRuntimeFactory.__init__\n -> WorkflowRuntimeFactory._connection_factory\n -> WorkflowRuntimeFactory.create_engine", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowRuntimeFactory.__init__:dataflow_slice", + "span_start": 9, + "span_end": 16, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "543624853400c556d1939007017145281d76b00a694c7d5c4fbb0414ded3434e", + "edge_type": "dataflow_slice", + "src_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "src_qname": "WorkflowRuntimeFactory.__init__", + "dst_symbol_id": "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333", + "dst_ref": "WorkflowRuntimeFactory.create_engine", + "resolution": "resolved", + "slice_id": "543624853400c556d1939007017145281d76b00a694c7d5c4fbb0414ded3434e", + "root_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "path_symbols": [ + "WorkflowRuntimeFactory.__init__", + "WorkflowRuntimeFactory._connection_factory", + "WorkflowRuntimeFactory.create_engine" + ], + "path_symbol_ids": [ + "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/runtime_factory.py", + "content": "WorkflowRuntimeFactory.__init__\n -> WorkflowRuntimeFactory._traces\n -> WorkflowRuntimeFactory.create_engine", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowRuntimeFactory.__init__:dataflow_slice", + "span_start": 10, + "span_end": 19, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "346cf5ddb4308b8403d27c5b54da8cba298bb0af7dc04c2fe30312ef574103c6", + "edge_type": "dataflow_slice", + "src_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "src_qname": "WorkflowRuntimeFactory.__init__", + "dst_symbol_id": "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333", + "dst_ref": "WorkflowRuntimeFactory.create_engine", + "resolution": "resolved", + "slice_id": "346cf5ddb4308b8403d27c5b54da8cba298bb0af7dc04c2fe30312ef574103c6", + "root_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "path_symbols": [ + "WorkflowRuntimeFactory.__init__", + "WorkflowRuntimeFactory._traces", + "WorkflowRuntimeFactory.create_engine" + ], + "path_symbol_ids": [ + "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/runtime_factory.py", + "content": "WorkflowRuntimeFactory.__init__ writes_attr WorkflowRuntimeFactory._snapshot_sanitizer", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowRuntimeFactory.__init__:writes_attr", + "span_start": 12, + "span_end": 12, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "de0cb1913ba41f673cfb601cab23cfb2e1044ed3dd8c061aff486075aeb8af20", + "edge_type": "writes_attr", + "src_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "src_qname": "WorkflowRuntimeFactory.__init__", + "dst_symbol_id": null, + "dst_ref": "WorkflowRuntimeFactory._snapshot_sanitizer", + "resolution": "partial", + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/runtime_factory.py", + "content": "WorkflowRuntimeFactory.create_engine calls WorkflowPersistence.create_default", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowRuntimeFactory.create_engine:calls", + "span_start": 15, + "span_end": 18, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "fa86efb6871092fc88df68295c0d92dbe46253e1afa3246ca62b6da11d4d5569", + "edge_type": "calls", + "src_symbol_id": "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333", + "src_qname": "WorkflowRuntimeFactory.create_engine", + "dst_symbol_id": null, + "dst_ref": "WorkflowPersistence.create_default", + "resolution": "partial", + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/runtime_factory.py", + "content": "class WorkflowRuntimeFactory:\n def __init__(self, connection_factory=None, *, traces, hooks=None, snapshot_sanitizer=None) -> None:\n self._connection_factory = connection_factory\n self._traces = traces\n self._hooks = hooks\n self._snapshot_sanitizer = snapshot_sanitizer\n\n def create_engine(self, workflow) -> WorkflowEngine:\n persistence = WorkflowPersistence.create_default(\n self._connection_factory,\n snapshot_sanitizer=self._snapshot_sanitizer,\n )\n return WorkflowEngine(workflow, persistence, traces=self._traces, hooks=self._hooks)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/workflow/runtime_factory.py:WorkflowRuntimeFactory", + "span_start": 7, + "span_end": 19, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.workflow.runtime_factory", + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/__init__.py", + "content": "from plba.bootstrap import create_runtime\nfrom plba.config import ConfigFileLoader, FileConfigProvider\nfrom plba.control import ControlActionSet, ControlChannel, ControlPlaneService, HttpControlChannel\nfrom plba.contracts import (\n ApplicationModule,\n ConfigProvider,\n HealthContributor,\n TraceContext,\n TraceContextRecord,\n TraceLogMessage,\n TraceTransport,\n Worker,\n WorkerHealth,\n WorkerStatus,\n)\nfrom plba.core import ConfigurationManager, RuntimeManager, ServiceContainer\nfrom plba.health import HealthRegistry\nfrom plba.logging import LogManager\nfrom plba.queue import InMemoryTaskQueue\nfrom plba.tracing import MySqlTraceTransport, NoOpTraceTransport, TraceService\nfrom plba.workflow import (\n StepResult,\n WorkflowContext,\n WorkflowDefinition,\n WorkflowEngine,\n WorkflowEngineHooks,\n WorkflowNode,\n WorkflowRuntimeFactory,\n WorkflowStep,\n)\nfrom plba.workers import WorkerSupervisor\n\n__all__ = [\n \"ApplicationModule\",\n \"ConfigFileLoader\",\n \"ConfigProvider\",\n \"ConfigurationManager\",\n \"ControlActionSet\",\n \"ControlChannel\",\n \"ControlPlaneService\",\n \"create_runtime\",\n \"FileConfigProvider\",\n \"HealthContributor\",\n \"HealthRegistry\",\n \"HttpControlChannel\",\n \"InMemoryTaskQueue\",\n \"LogManager\",\n \"MySqlTraceTransport\",\n \"NoOpTraceTransport\",\n \"RuntimeManager\",\n \"ServiceContainer\",\n \"TraceContext\",\n \"TraceContextRecord\",\n \"TraceLogMessage\",\n \"TraceService\",\n \"TraceTransport\",\n \"StepResult\",\n \"Worker\",\n \"WorkerHealth\",\n \"WorkerStatus\",\n \"WorkflowContext\",\n \"WorkflowDefinition\",\n \"WorkflowEngine\",\n \"WorkflowEngineHooks\",\n \"WorkflowNode\",\n \"WorkflowRuntimeFactory\",\n \"WorkflowStep\",\n \"WorkerSupervisor\",\n]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/__init__.py:1-69", + "span_start": 1, + "span_end": 69, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/workflow.py", + "content": "from app_runtime.workflow.contracts.context import WorkflowContext\nfrom app_runtime.workflow.contracts.result import StepResult\nfrom app_runtime.workflow.contracts.step import WorkflowStep\nfrom app_runtime.workflow.contracts.workflow import WorkflowDefinition, WorkflowNode\nfrom app_runtime.workflow.engine.hooks import WorkflowEngineHooks\nfrom app_runtime.workflow.engine.workflow_engine import WorkflowEngine\nfrom app_runtime.workflow.runtime_factory import WorkflowRuntimeFactory\n\n__all__ = [\n \"StepResult\",\n \"WorkflowContext\",\n \"WorkflowDefinition\",\n \"WorkflowEngine\",\n \"WorkflowEngineHooks\",\n \"WorkflowNode\",\n \"WorkflowRuntimeFactory\",\n \"WorkflowStep\",\n]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/workflow.py:1-18", + "span_start": 1, + "span_end": 18, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.workflow", + "is_test": false, + "blob_sha": "f227797606042273d1f1798f76846952892eeb9e4e9e6a38fb8a631d7231ff39", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/__init__.py", + "content": "from app_runtime.config.file_loader import ConfigFileLoader\nfrom app_runtime.config.providers import FileConfigProvider\n\n__all__ = [\"ConfigFileLoader\", \"FileConfigProvider\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/config/__init__.py:1-4", + "span_start": 1, + "span_end": 4, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.config.__init__", + "is_test": false, + "blob_sha": "612918029820a2a983330ec92256142b55b9de4bdf3399ece18e2a02dbad9729", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/providers.py", + "content": "class FileConfigProvider(ConfigProvider):\n def __init__(self, path: str | Path) -> None:\n self._loader = ConfigFileLoader(path)\n\n @property\n def loader(self) -> ConfigFileLoader:\n return self._loader\n\n def load(self) -> dict[str, Any]:\n config = self._loader.load_sync()\n if not isinstance(config, dict):\n raise TypeError(\"Config root must be a mapping\")\n return dict(config)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/config/providers.py:FileConfigProvider", + "span_start": 10, + "span_end": 22, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.config.providers", + "is_test": false, + "blob_sha": "8c53ca0122d6df6c5763bca15e99434bb4daebd5a618b8fc927e9ae90b022e64", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/__init__.py", + "content": "__all__: list[str] = []", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/__init__.py:1-1", + "span_start": 1, + "span_end": 1, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.__init__", + "is_test": false, + "blob_sha": "8eea9df4f6d7b38ca0e39ccc27b04700e3d08dbeec8046d613d22706d19985fa", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "class ConfigFileLoader:\n def __init__(self, path: str | Path) -> None:\n self.path = Path(path)\n self.config: Any = None\n self.last_valid_config: Any = None\n self._last_seen_hash: str | None = None\n\n def read_text(self) -> str:\n return self.path.read_text(encoding=\"utf-8\")\n\n def parse(self, data: str) -> Any:\n suffix = self.path.suffix.lower()\n if suffix in {\".yml\", \".yaml\"}:\n return yaml.safe_load(data)\n return json.loads(data)\n\n def load_sync(self) -> Any:\n data = self.read_text()\n parsed = self.parse(data)\n self.config = parsed\n self.last_valid_config = parsed\n self._last_seen_hash = self._calculate_hash(data)\n return parsed\n\n def load_if_changed(self) -> tuple[bool, Any]:\n data = self.read_text()\n current_hash = self._calculate_hash(data)\n if current_hash == self._last_seen_hash:\n return False, self.config\n parsed = self.parse(data)\n self.config = parsed\n self.last_valid_config = parsed\n self._last_seen_hash = current_hash\n return True, parsed\n\n @staticmethod\n def _calculate_hash(data: str) -> str:\n return hashlib.sha256(data.encode(\"utf-8\")).hexdigest()", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/config/file_loader.py:ConfigFileLoader", + "span_start": 11, + "span_end": 48, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/config.py", + "content": "class ConfigProvider(ABC):\n @abstractmethod\n def load(self) -> dict[str, Any]:\n \"\"\"Return a config fragment.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/contracts/config.py:ConfigProvider", + "span_start": 7, + "span_end": 10, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.config", + "is_test": false, + "blob_sha": "5e773880267743ee94954ea2db120c2d88c54d4312893293d1b89df405283ed4", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/health.py", + "content": "class HealthContributor(ABC):\n @abstractmethod\n def health(self) -> WorkerHealth:\n \"\"\"Return contributor health state.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/contracts/health.py:HealthContributor", + "span_start": 7, + "span_end": 10, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.health", + "is_test": false, + "blob_sha": "6bd92611def7131e32d4dd34a8ed85e6cf3c67722ad27797032a632cb30dc097", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/application.py", + "content": "class ApplicationModule(ABC):\n @property\n @abstractmethod\n def name(self) -> str:\n \"\"\"Module name used for runtime status and diagnostics.\"\"\"\n\n @abstractmethod\n def register(self, registry: ModuleRegistry) -> None:\n \"\"\"Register workers, services, and health contributors.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/contracts/application.py:ApplicationModule", + "span_start": 8, + "span_end": 16, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.application", + "is_test": false, + "blob_sha": "197c35634dca49c352ce3f230295a485fbffb672ce7bb8c08e752bfdf61e7fa4", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "validation": { + "passed": false, + "action": "repair", + "reasons": [ + "degraded_answer_missing_guardrail" + ] + } + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-find-tests-workflow-runtime-factory-negative.md b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-find-tests-workflow-runtime-factory-negative.md new file mode 100644 index 0000000..8d465e3 --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-find-tests-workflow-runtime-factory-negative.md @@ -0,0 +1,32 @@ +# plba-v2-find-tests-workflow-runtime-factory-negative + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: agent_runtime +- mode: full_chain +- passed: True + +## Query +Где тесты для WorkflowRuntimeFactory? + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 24, + "llm_answer": "Insufficient evidence for a confident answer. No test candidates found.", + "answer_mode": "degraded", + "path_scope": [], + "symbol_candidates": [ + "WorkflowRuntimeFactory" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-open-file-nonexistent.json b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-open-file-nonexistent.json new file mode 100644 index 0000000..bd7f711 --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-open-file-nonexistent.json @@ -0,0 +1,341 @@ +{ + "case_id": "plba-v2-open-file-nonexistent", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "agent_runtime", + "mode": "full_chain", + "query": "Открой файл src/app_runtime/core/missing_runtime.py", + "actual": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 0, + "llm_answer": "Файл `src/app_runtime/core/missing_runtime.py` не найден.", + "answer_mode": "not_found", + "path_scope": [ + "src/app_runtime/core/missing_runtime.py" + ], + "symbol_candidates": [], + "layers": [ + "C0_SOURCE_CHUNKS" + ] + }, + "passed": false, + "mismatches": [ + "answer_mode: expected degraded, got not_found", + "llm: expected answer to contain 'Файл src/app_runtime/core/missing_runtime.py не найден.'" + ], + "details": { + "query": "Открой файл src/app_runtime/core/missing_runtime.py", + "router_result": { + "schema_version": "1.1", + "intent": "CODE_QA", + "retrieval_profile": "code", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query_plan": { + "raw": "Открой файл src/app_runtime/core/missing_runtime.py", + "normalized": "Открой файл src/app_runtime/core/missing_runtime.py", + "sub_intent": "OPEN_FILE", + "negations": [], + "expansions": [ + "file" + ], + "keyword_hints": [], + "path_hints": [ + "src/app_runtime/core/missing_runtime.py" + ], + "doc_scope_hints": [], + "symbol_candidates": [], + "symbol_kind_hint": "unknown", + "anchors": [ + { + "type": "FILE_PATH", + "value": "src/app_runtime/core/missing_runtime.py", + "source": "user_text", + "subtype": null, + "span": { + "start": 12, + "end": 51 + }, + "confidence": 0.95 + }, + { + "type": "KEY_TERM", + "value": "файл", + "source": "user_text", + "subtype": null, + "span": { + "start": 7, + "end": 11 + }, + "confidence": 0.9 + } + ] + }, + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 12 + } + ], + "filters": { + "test_policy": "EXCLUDE", + "path_scope": [ + "src/app_runtime/core/missing_runtime.py" + ], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/app_runtime/core/missing_runtime.py" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": false, + "max_distance": 2, + "top_k": 5 + } + }, + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [], + "confidence": 0.0 + }, + "evidence_policy": { + "require_def": false, + "require_flow": false, + "require_spec": false, + "allow_answer_without_evidence": false + } + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Открой файл src/app_runtime/core/missing_runtime.py", + "sub_intent": "OPEN_FILE", + "path_scope": [ + "src/app_runtime/core/missing_runtime.py" + ], + "keyword_hints": [], + "symbol_candidates": [], + "requested_layers": [ + "C0_SOURCE_CHUNKS" + ], + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 12 + } + ], + "filters": { + "test_policy": "EXCLUDE", + "path_scope": [ + "src/app_runtime/core/missing_runtime.py" + ], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/app_runtime/core/missing_runtime.py" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": false, + "max_distance": 2, + "top_k": 5 + } + }, + "query_plan": { + "raw": "Открой файл src/app_runtime/core/missing_runtime.py", + "normalized": "Открой файл src/app_runtime/core/missing_runtime.py", + "sub_intent": "OPEN_FILE", + "negations": [], + "expansions": [ + "file" + ], + "keyword_hints": [], + "path_hints": [ + "src/app_runtime/core/missing_runtime.py" + ], + "doc_scope_hints": [], + "symbol_candidates": [], + "symbol_kind_hint": "unknown", + "anchors": [ + { + "type": "FILE_PATH", + "value": "src/app_runtime/core/missing_runtime.py", + "source": "user_text", + "subtype": null, + "span": { + "start": 12, + "end": 51 + }, + "confidence": 0.95 + }, + { + "type": "KEY_TERM", + "value": "файл", + "source": "user_text", + "subtype": null, + "span": { + "start": 7, + "end": 11 + }, + "confidence": 0.9 + } + ] + } + }, + "retrieval_result": { + "target_symbol_candidates": [], + "resolved_symbol": null, + "symbol_resolution_status": "not_requested", + "file_candidates": [], + "code_chunks": [], + "relations": [], + "entrypoints": [], + "test_candidates": [], + "layer_outcomes": [ + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 0, + "empty": true, + "fallback_used": false + } + ], + "missing_layers": [ + "C0_SOURCE_CHUNKS" + ], + "raw_rows": [], + "retrieval_report": { + "executed_layers": [ + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C0_SOURCE_CHUNKS": 200 + }, + "filters_by_layer": { + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src/app_runtime/core/missing_runtime.py" + ] + } + }, + "requests": [ + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Открой файл src/app_runtime/core/missing_runtime.py", + "ranking_profile": "code" + } + ], + "fallback": { + "used": false, + "reason": null + }, + "retrieval_by_layer_ms": { + "C0_SOURCE_CHUNKS": 13 + } + } + }, + "diagnostics": { + "intent_correct": null, + "target_found": false, + "layers_used": [ + "C0_SOURCE_CHUNKS" + ], + "retrieval_sufficient": false, + "answer_mode": "insufficient", + "router_result": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "OPEN_FILE", + "path_scope": [ + "src/app_runtime/core/missing_runtime.py" + ], + "layers": [ + "C0_SOURCE_CHUNKS" + ], + "symbol_resolution_status": "not_requested" + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Открой файл src/app_runtime/core/missing_runtime.py", + "sub_intent": "OPEN_FILE", + "path_scope": [ + "src/app_runtime/core/missing_runtime.py" + ], + "requested_layers": [ + "C0_SOURCE_CHUNKS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 0, + "empty": true, + "fallback_used": false + } + ], + "empty_layers": [ + "C0_SOURCE_CHUNKS" + ], + "evidence_gate_decision": { + "sufficient": false, + "failure_reasons": [ + "path_scope_empty", + "layer_c0_empty" + ], + "evidence_count": 0 + }, + "failure_reasons": [ + "path_scope_empty", + "layer_c0_empty" + ], + "timings_ms": {} + }, + "rag_rows": [], + "validation": { + "passed": true, + "action": "return", + "reasons": [] + } + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-open-file-nonexistent.md b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-open-file-nonexistent.md new file mode 100644 index 0000000..b301f23 --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-open-file-nonexistent.md @@ -0,0 +1,31 @@ +# plba-v2-open-file-nonexistent + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: agent_runtime +- mode: full_chain +- passed: False + +## Query +Открой файл src/app_runtime/core/missing_runtime.py + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 0, + "llm_answer": "Файл `src/app_runtime/core/missing_runtime.py` не найден.", + "answer_mode": "not_found", + "path_scope": [ + "src/app_runtime/core/missing_runtime.py" + ], + "symbol_candidates": [], + "layers": [ + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- answer_mode: expected degraded, got not_found +- llm: expected answer to contain 'Файл src/app_runtime/core/missing_runtime.py не найден.' \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-open-file-public-api.json b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-open-file-public-api.json new file mode 100644 index 0000000..6e26093 --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-open-file-public-api.json @@ -0,0 +1,417 @@ +{ + "case_id": "plba-v2-open-file-public-api", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "agent_runtime", + "mode": "full_chain", + "query": "Открой файл src/plba/__init__.py", + "actual": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 1, + "llm_answer": "В файле src/plba/__init__.py видны следующие импорты и определения:\n\n- from plba.bootstrap import create_runtime\n- from plba.config import ConfigFileLoader, FileConfigProvider\n- from plba.control import ControlActionSet, ControlChannel, ControlPlaneService, HttpControlChannel\n- from plba.contracts import ApplicationModule, ConfigProvider, HealthContributor, TraceContext, TraceContextRecord, TraceLogMessage, TraceTransport, Worker, WorkerHealth, WorkerStatus\n- from plba.core import ConfigurationManager, RuntimeManager, ServiceContainer\n- from plba.health import HealthRegistry\n- from plba.logging import LogManager\n- from plba.queue import InMemoryTaskQueue\n- from plba.tracing import MySqlTraceTransport, NoOpTraceTransport, TraceService\n- from plba.workflow import StepResult, WorkflowContext, WorkflowDefinition, Workflo", + "answer_mode": "answered", + "path_scope": [ + "src/plba/__init__.py" + ], + "symbol_candidates": [], + "layers": [ + "C0_SOURCE_CHUNKS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "query": "Открой файл src/plba/__init__.py", + "router_result": { + "schema_version": "1.1", + "intent": "CODE_QA", + "retrieval_profile": "code", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query_plan": { + "raw": "Открой файл src/plba/__init__.py", + "normalized": "Открой файл src/plba/__init__.py", + "sub_intent": "OPEN_FILE", + "negations": [], + "expansions": [ + "file" + ], + "keyword_hints": [], + "path_hints": [ + "src/plba/__init__.py" + ], + "doc_scope_hints": [], + "symbol_candidates": [], + "symbol_kind_hint": "unknown", + "anchors": [ + { + "type": "FILE_PATH", + "value": "src/plba/__init__.py", + "source": "user_text", + "subtype": null, + "span": { + "start": 12, + "end": 32 + }, + "confidence": 0.95 + }, + { + "type": "KEY_TERM", + "value": "файл", + "source": "user_text", + "subtype": null, + "span": { + "start": 7, + "end": 11 + }, + "confidence": 0.9 + } + ] + }, + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 12 + } + ], + "filters": { + "test_policy": "EXCLUDE", + "path_scope": [ + "src/plba/__init__.py" + ], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/plba/__init__.py" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": false, + "max_distance": 2, + "top_k": 5 + } + }, + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [], + "confidence": 0.0 + }, + "evidence_policy": { + "require_def": false, + "require_flow": false, + "require_spec": false, + "allow_answer_without_evidence": false + } + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Открой файл src/plba/__init__.py", + "sub_intent": "OPEN_FILE", + "path_scope": [ + "src/plba/__init__.py" + ], + "keyword_hints": [], + "symbol_candidates": [], + "requested_layers": [ + "C0_SOURCE_CHUNKS" + ], + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 12 + } + ], + "filters": { + "test_policy": "EXCLUDE", + "path_scope": [ + "src/plba/__init__.py" + ], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/plba/__init__.py" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": false, + "max_distance": 2, + "top_k": 5 + } + }, + "query_plan": { + "raw": "Открой файл src/plba/__init__.py", + "normalized": "Открой файл src/plba/__init__.py", + "sub_intent": "OPEN_FILE", + "negations": [], + "expansions": [ + "file" + ], + "keyword_hints": [], + "path_hints": [ + "src/plba/__init__.py" + ], + "doc_scope_hints": [], + "symbol_candidates": [], + "symbol_kind_hint": "unknown", + "anchors": [ + { + "type": "FILE_PATH", + "value": "src/plba/__init__.py", + "source": "user_text", + "subtype": null, + "span": { + "start": 12, + "end": 32 + }, + "confidence": 0.95 + }, + { + "type": "KEY_TERM", + "value": "файл", + "source": "user_text", + "subtype": null, + "span": { + "start": 7, + "end": 11 + }, + "confidence": 0.9 + } + ] + } + }, + "retrieval_result": { + "target_symbol_candidates": [], + "resolved_symbol": null, + "symbol_resolution_status": "not_requested", + "file_candidates": [ + "src/plba/__init__.py" + ], + "code_chunks": [ + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/plba/__init__.py", + "title": "src/plba/__init__.py:1-69", + "content": "from plba.bootstrap import create_runtime\nfrom plba.config import ConfigFileLoader, FileConfigProvider\nfrom plba.control import ControlActionSet, ControlChannel, ControlPlaneService, HttpControlChannel\nfrom plba.contracts import (\n ApplicationModule,\n ConfigProvider,\n HealthContributor,\n TraceContext,\n TraceContextRecord,\n TraceLogMessage,\n TraceTransport,\n Worker,\n WorkerHealth,\n WorkerStatus,\n)\nfrom plba.core import ConfigurationManager, RuntimeManager, ServiceContainer\nfrom plba.health import HealthRegistry\nfrom plba.logging import LogManager\nfrom plba.queue import InMemoryTaskQueue\nfrom plba.tracing import MySqlTraceTransport, NoOpTraceTransport, TraceService\nfrom plba.workflow import (\n StepResult,\n WorkflowContext,\n WorkflowDefinition,\n WorkflowEngine,\n WorkflowEngineHooks,\n WorkflowNode,\n WorkflowRuntimeFactory,\n WorkflowStep,\n)\nfrom plba.workers import WorkerSupervisor\n\n__all__ = [\n \"ApplicationModule\",\n \"ConfigFileLoader\",\n \"ConfigProvider\",\n \"ConfigurationManager\",\n \"ControlActionSet\",\n \"ControlChannel\",\n \"ControlPlaneService\",\n \"create_runtime\",\n \"FileConfigProvider\",\n \"HealthContributor\",\n \"HealthRegistry\",\n \"HttpControlChannel\",\n \"InMemoryTaskQueue\",\n \"LogManager\",\n \"MySqlTraceTransport\",\n \"NoOpTraceTransport\",\n \"RuntimeManager\",\n \"ServiceContainer\",\n \"TraceContext\",\n \"TraceContextRecord\",\n \"TraceLogMessage\",\n \"TraceService\",\n \"TraceTransport\",\n \"StepResult\",\n \"Worker\",\n \"WorkerHealth\",\n \"WorkerStatus\",\n \"WorkflowContext\",\n \"WorkflowDefinition\",\n \"WorkflowEngine\",\n \"WorkflowEngineHooks\",\n \"WorkflowNode\",\n \"WorkflowRuntimeFactory\",\n \"WorkflowStep\",\n \"WorkerSupervisor\",\n]", + "start_line": 1, + "end_line": 69, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "relations": [], + "entrypoints": [], + "test_candidates": [], + "layer_outcomes": [ + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 1, + "empty": false, + "fallback_used": false + } + ], + "missing_layers": [], + "raw_rows": [ + { + "path": "src/plba/__init__.py", + "content": "from plba.bootstrap import create_runtime\nfrom plba.config import ConfigFileLoader, FileConfigProvider\nfrom plba.control import ControlActionSet, ControlChannel, ControlPlaneService, HttpControlChannel\nfrom plba.contracts import (\n ApplicationModule,\n ConfigProvider,\n HealthContributor,\n TraceContext,\n TraceContextRecord,\n TraceLogMessage,\n TraceTransport,\n Worker,\n WorkerHealth,\n WorkerStatus,\n)\nfrom plba.core import ConfigurationManager, RuntimeManager, ServiceContainer\nfrom plba.health import HealthRegistry\nfrom plba.logging import LogManager\nfrom plba.queue import InMemoryTaskQueue\nfrom plba.tracing import MySqlTraceTransport, NoOpTraceTransport, TraceService\nfrom plba.workflow import (\n StepResult,\n WorkflowContext,\n WorkflowDefinition,\n WorkflowEngine,\n WorkflowEngineHooks,\n WorkflowNode,\n WorkflowRuntimeFactory,\n WorkflowStep,\n)\nfrom plba.workers import WorkerSupervisor\n\n__all__ = [\n \"ApplicationModule\",\n \"ConfigFileLoader\",\n \"ConfigProvider\",\n \"ConfigurationManager\",\n \"ControlActionSet\",\n \"ControlChannel\",\n \"ControlPlaneService\",\n \"create_runtime\",\n \"FileConfigProvider\",\n \"HealthContributor\",\n \"HealthRegistry\",\n \"HttpControlChannel\",\n \"InMemoryTaskQueue\",\n \"LogManager\",\n \"MySqlTraceTransport\",\n \"NoOpTraceTransport\",\n \"RuntimeManager\",\n \"ServiceContainer\",\n \"TraceContext\",\n \"TraceContextRecord\",\n \"TraceLogMessage\",\n \"TraceService\",\n \"TraceTransport\",\n \"StepResult\",\n \"Worker\",\n \"WorkerHealth\",\n \"WorkerStatus\",\n \"WorkflowContext\",\n \"WorkflowDefinition\",\n \"WorkflowEngine\",\n \"WorkflowEngineHooks\",\n \"WorkflowNode\",\n \"WorkflowRuntimeFactory\",\n \"WorkflowStep\",\n \"WorkerSupervisor\",\n]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/__init__.py:1-69", + "span_start": 1, + "span_end": 69, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "retrieval_report": { + "executed_layers": [ + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C0_SOURCE_CHUNKS": 200 + }, + "filters_by_layer": { + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src/plba/__init__.py" + ] + } + }, + "requests": [ + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Открой файл src/plba/__init__.py", + "ranking_profile": "code" + } + ], + "fallback": { + "used": false, + "reason": null + }, + "retrieval_by_layer_ms": { + "C0_SOURCE_CHUNKS": 43 + } + } + }, + "diagnostics": { + "intent_correct": null, + "target_found": true, + "layers_used": [ + "C0_SOURCE_CHUNKS" + ], + "retrieval_sufficient": true, + "answer_mode": "normal", + "router_result": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "OPEN_FILE", + "path_scope": [ + "src/plba/__init__.py" + ], + "layers": [ + "C0_SOURCE_CHUNKS" + ], + "symbol_resolution_status": "not_requested" + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Открой файл src/plba/__init__.py", + "sub_intent": "OPEN_FILE", + "path_scope": [ + "src/plba/__init__.py" + ], + "requested_layers": [ + "C0_SOURCE_CHUNKS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 1, + "empty": false, + "fallback_used": false + } + ], + "empty_layers": [], + "evidence_gate_decision": { + "sufficient": true, + "failure_reasons": [], + "evidence_count": 1 + }, + "failure_reasons": [], + "timings_ms": {} + }, + "rag_rows": [ + { + "path": "src/plba/__init__.py", + "content": "from plba.bootstrap import create_runtime\nfrom plba.config import ConfigFileLoader, FileConfigProvider\nfrom plba.control import ControlActionSet, ControlChannel, ControlPlaneService, HttpControlChannel\nfrom plba.contracts import (\n ApplicationModule,\n ConfigProvider,\n HealthContributor,\n TraceContext,\n TraceContextRecord,\n TraceLogMessage,\n TraceTransport,\n Worker,\n WorkerHealth,\n WorkerStatus,\n)\nfrom plba.core import ConfigurationManager, RuntimeManager, ServiceContainer\nfrom plba.health import HealthRegistry\nfrom plba.logging import LogManager\nfrom plba.queue import InMemoryTaskQueue\nfrom plba.tracing import MySqlTraceTransport, NoOpTraceTransport, TraceService\nfrom plba.workflow import (\n StepResult,\n WorkflowContext,\n WorkflowDefinition,\n WorkflowEngine,\n WorkflowEngineHooks,\n WorkflowNode,\n WorkflowRuntimeFactory,\n WorkflowStep,\n)\nfrom plba.workers import WorkerSupervisor\n\n__all__ = [\n \"ApplicationModule\",\n \"ConfigFileLoader\",\n \"ConfigProvider\",\n \"ConfigurationManager\",\n \"ControlActionSet\",\n \"ControlChannel\",\n \"ControlPlaneService\",\n \"create_runtime\",\n \"FileConfigProvider\",\n \"HealthContributor\",\n \"HealthRegistry\",\n \"HttpControlChannel\",\n \"InMemoryTaskQueue\",\n \"LogManager\",\n \"MySqlTraceTransport\",\n \"NoOpTraceTransport\",\n \"RuntimeManager\",\n \"ServiceContainer\",\n \"TraceContext\",\n \"TraceContextRecord\",\n \"TraceLogMessage\",\n \"TraceService\",\n \"TraceTransport\",\n \"StepResult\",\n \"Worker\",\n \"WorkerHealth\",\n \"WorkerStatus\",\n \"WorkflowContext\",\n \"WorkflowDefinition\",\n \"WorkflowEngine\",\n \"WorkflowEngineHooks\",\n \"WorkflowNode\",\n \"WorkflowRuntimeFactory\",\n \"WorkflowStep\",\n \"WorkerSupervisor\",\n]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/__init__.py:1-69", + "span_start": 1, + "span_end": 69, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "validation": { + "passed": true, + "action": "return", + "reasons": [] + } + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-open-file-public-api.md b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-open-file-public-api.md new file mode 100644 index 0000000..46fe6af --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-open-file-public-api.md @@ -0,0 +1,30 @@ +# plba-v2-open-file-public-api + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: agent_runtime +- mode: full_chain +- passed: True + +## Query +Открой файл src/plba/__init__.py + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 1, + "llm_answer": "В файле src/plba/__init__.py видны следующие импорты и определения:\n\n- from plba.bootstrap import create_runtime\n- from plba.config import ConfigFileLoader, FileConfigProvider\n- from plba.control import ControlActionSet, ControlChannel, ControlPlaneService, HttpControlChannel\n- from plba.contracts import ApplicationModule, ConfigProvider, HealthContributor, TraceContext, TraceContextRecord, TraceLogMessage, TraceTransport, Worker, WorkerHealth, WorkerStatus\n- from plba.core import ConfigurationManager, RuntimeManager, ServiceContainer\n- from plba.health import HealthRegistry\n- from plba.logging import LogManager\n- from plba.queue import InMemoryTaskQueue\n- from plba.tracing import MySqlTraceTransport, NoOpTraceTransport, TraceService\n- from plba.workflow import StepResult, WorkflowContext, WorkflowDefinition, Workflo", + "answer_mode": "answered", + "path_scope": [ + "src/plba/__init__.py" + ], + "symbol_candidates": [], + "layers": [ + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-open-file-runtime.json b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-open-file-runtime.json new file mode 100644 index 0000000..3df8028 --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-open-file-runtime.json @@ -0,0 +1,417 @@ +{ + "case_id": "plba-v2-open-file-runtime", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "agent_runtime", + "mode": "full_chain", + "query": "Открой файл src/app_runtime/core/runtime.py", + "actual": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 1, + "llm_answer": "Виден класс `RuntimeManager` с инициализатором и статическими полями. Файл содержит 162 строки кода.", + "answer_mode": "answered", + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "symbol_candidates": [], + "layers": [ + "C0_SOURCE_CHUNKS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "query": "Открой файл src/app_runtime/core/runtime.py", + "router_result": { + "schema_version": "1.1", + "intent": "CODE_QA", + "retrieval_profile": "code", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query_plan": { + "raw": "Открой файл src/app_runtime/core/runtime.py", + "normalized": "Открой файл src/app_runtime/core/runtime.py", + "sub_intent": "OPEN_FILE", + "negations": [], + "expansions": [ + "file" + ], + "keyword_hints": [], + "path_hints": [ + "src/app_runtime/core/runtime.py" + ], + "doc_scope_hints": [], + "symbol_candidates": [], + "symbol_kind_hint": "unknown", + "anchors": [ + { + "type": "FILE_PATH", + "value": "src/app_runtime/core/runtime.py", + "source": "user_text", + "subtype": null, + "span": { + "start": 12, + "end": 43 + }, + "confidence": 0.95 + }, + { + "type": "KEY_TERM", + "value": "файл", + "source": "user_text", + "subtype": null, + "span": { + "start": 7, + "end": 11 + }, + "confidence": 0.9 + } + ] + }, + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 12 + } + ], + "filters": { + "test_policy": "EXCLUDE", + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/app_runtime/core/runtime.py" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": false, + "max_distance": 2, + "top_k": 5 + } + }, + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [], + "confidence": 0.0 + }, + "evidence_policy": { + "require_def": false, + "require_flow": false, + "require_spec": false, + "allow_answer_without_evidence": false + } + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Открой файл src/app_runtime/core/runtime.py", + "sub_intent": "OPEN_FILE", + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "keyword_hints": [], + "symbol_candidates": [], + "requested_layers": [ + "C0_SOURCE_CHUNKS" + ], + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 12 + } + ], + "filters": { + "test_policy": "EXCLUDE", + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/app_runtime/core/runtime.py" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": false, + "max_distance": 2, + "top_k": 5 + } + }, + "query_plan": { + "raw": "Открой файл src/app_runtime/core/runtime.py", + "normalized": "Открой файл src/app_runtime/core/runtime.py", + "sub_intent": "OPEN_FILE", + "negations": [], + "expansions": [ + "file" + ], + "keyword_hints": [], + "path_hints": [ + "src/app_runtime/core/runtime.py" + ], + "doc_scope_hints": [], + "symbol_candidates": [], + "symbol_kind_hint": "unknown", + "anchors": [ + { + "type": "FILE_PATH", + "value": "src/app_runtime/core/runtime.py", + "source": "user_text", + "subtype": null, + "span": { + "start": 12, + "end": 43 + }, + "confidence": 0.95 + }, + { + "type": "KEY_TERM", + "value": "файл", + "source": "user_text", + "subtype": null, + "span": { + "start": 7, + "end": 11 + }, + "confidence": 0.9 + } + ] + } + }, + "retrieval_result": { + "target_symbol_candidates": [], + "resolved_symbol": null, + "symbol_resolution_status": "not_requested", + "file_candidates": [ + "src/app_runtime/core/runtime.py" + ], + "code_chunks": [ + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/core/runtime.py", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "start_line": 18, + "end_line": 179, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "relations": [], + "entrypoints": [], + "test_candidates": [], + "layer_outcomes": [ + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 1, + "empty": false, + "fallback_used": false + } + ], + "missing_layers": [], + "raw_rows": [ + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "retrieval_report": { + "executed_layers": [ + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C0_SOURCE_CHUNKS": 200 + }, + "filters_by_layer": { + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src/app_runtime/core/runtime.py" + ] + } + }, + "requests": [ + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Открой файл src/app_runtime/core/runtime.py", + "ranking_profile": "code" + } + ], + "fallback": { + "used": false, + "reason": null + }, + "retrieval_by_layer_ms": { + "C0_SOURCE_CHUNKS": 136 + } + } + }, + "diagnostics": { + "intent_correct": null, + "target_found": true, + "layers_used": [ + "C0_SOURCE_CHUNKS" + ], + "retrieval_sufficient": true, + "answer_mode": "normal", + "router_result": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "OPEN_FILE", + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "layers": [ + "C0_SOURCE_CHUNKS" + ], + "symbol_resolution_status": "not_requested" + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Открой файл src/app_runtime/core/runtime.py", + "sub_intent": "OPEN_FILE", + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "requested_layers": [ + "C0_SOURCE_CHUNKS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 1, + "empty": false, + "fallback_used": false + } + ], + "empty_layers": [], + "evidence_gate_decision": { + "sufficient": true, + "failure_reasons": [], + "evidence_count": 1 + }, + "failure_reasons": [], + "timings_ms": {} + }, + "rag_rows": [ + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "validation": { + "passed": true, + "action": "return", + "reasons": [] + } + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-open-file-runtime.md b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-open-file-runtime.md new file mode 100644 index 0000000..4bdf579 --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-open-file-runtime.md @@ -0,0 +1,30 @@ +# plba-v2-open-file-runtime + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: agent_runtime +- mode: full_chain +- passed: True + +## Query +Открой файл src/app_runtime/core/runtime.py + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 1, + "llm_answer": "Виден класс `RuntimeManager` с инициализатором и статическими полями. Файл содержит 162 строки кода.", + "answer_mode": "answered", + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "symbol_candidates": [], + "layers": [ + "C0_SOURCE_CHUNKS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-health-endpoint.json b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-health-endpoint.json new file mode 100644 index 0000000..e9e2341 --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-health-endpoint.json @@ -0,0 +1,4707 @@ +{ + "case_id": "plba-v2-trace-flow-health-endpoint", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "agent_runtime", + "mode": "full_chain", + "query": "Покажи как проходит запрос /health в HttpControlAppFactory", + "actual": { + "intent": "CODE_QA", + "sub_intent": "TRACE_FLOW", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 37, + "llm_answer": "Поток выполнения запроса `/health` через `HttpControlAppFactory` выглядит следующим образом:\n\n1. Запрос приходит на сервер и обрабатывается фабрикой приложений `HttpControlAppFactory`.\n2. Внутри фабрики создается экземпляр приложения FastAPI с middleware для логирования времени обработки запросов.\n3. Для маршрута `/health` определяется обработчик, который вызывает предоставленный провайдер здоровья (`health_provider`), ожидающий асинхронный результат типа `HealthPayload`.\n4. В результате выполнения провайдера формируется JSON-ответ с кодом статуса 200 при успешном состоянии (\"ok\"), иначе возвращается статус 503.\n\nТаким образом, ключевой точкой является вызов провайдера здоровья внутри фабрики приложений, от которого зависит итоговый результат ответа.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "health", + "HttpControlAppFactory" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "query": "Покажи как проходит запрос /health в HttpControlAppFactory", + "router_result": { + "schema_version": "1.1", + "intent": "CODE_QA", + "retrieval_profile": "code", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query_plan": { + "raw": "Покажи как проходит запрос /health в HttpControlAppFactory", + "normalized": "Покажи как проходит запрос /health в HttpControlAppFactory", + "sub_intent": "TRACE_FLOW", + "negations": [], + "expansions": [ + "health", + "HttpControlAppFactory" + ], + "keyword_hints": [ + "health", + "HttpControlAppFactory" + ], + "path_hints": [], + "doc_scope_hints": [], + "symbol_candidates": [ + "health", + "HttpControlAppFactory" + ], + "symbol_kind_hint": "unknown", + "anchors": [ + { + "type": "SYMBOL", + "value": "health", + "source": "user_text", + "subtype": null, + "span": { + "start": 28, + "end": 34 + }, + "confidence": 0.88 + }, + { + "type": "SYMBOL", + "value": "HttpControlAppFactory", + "source": "user_text", + "subtype": null, + "span": { + "start": 37, + "end": 58 + }, + "confidence": 0.88 + } + ] + }, + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "top_k": 8 + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 8 + }, + { + "layer_id": "C4_SEMANTIC_ROLES", + "top_k": 8 + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "top_k": 10 + }, + { + "layer_id": "C3_ENTRYPOINTS", + "top_k": 10 + } + ], + "filters": { + "test_policy": "EXCLUDE", + "path_scope": [], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + }, + "symbol_resolution": { + "status": "pending", + "resolved_symbol": null, + "alternatives": [ + "health", + "HttpControlAppFactory" + ], + "confidence": 0.0 + }, + "evidence_policy": { + "require_def": true, + "require_flow": true, + "require_spec": false, + "allow_answer_without_evidence": false + } + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Покажи как проходит запрос /health в HttpControlAppFactory", + "sub_intent": "TRACE_FLOW", + "path_scope": [], + "keyword_hints": [ + "health", + "HttpControlAppFactory" + ], + "symbol_candidates": [ + "health", + "HttpControlAppFactory" + ], + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "top_k": 8 + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 8 + }, + { + "layer_id": "C4_SEMANTIC_ROLES", + "top_k": 8 + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "top_k": 10 + }, + { + "layer_id": "C3_ENTRYPOINTS", + "top_k": 10 + } + ], + "filters": { + "test_policy": "EXCLUDE", + "path_scope": [], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + }, + "query_plan": { + "raw": "Покажи как проходит запрос /health в HttpControlAppFactory", + "normalized": "Покажи как проходит запрос /health в HttpControlAppFactory", + "sub_intent": "TRACE_FLOW", + "negations": [], + "expansions": [ + "health", + "HttpControlAppFactory" + ], + "keyword_hints": [ + "health", + "HttpControlAppFactory" + ], + "path_hints": [], + "doc_scope_hints": [], + "symbol_candidates": [ + "health", + "HttpControlAppFactory" + ], + "symbol_kind_hint": "unknown", + "anchors": [ + { + "type": "SYMBOL", + "value": "health", + "source": "user_text", + "subtype": null, + "span": { + "start": 28, + "end": 34 + }, + "confidence": 0.88 + }, + { + "type": "SYMBOL", + "value": "HttpControlAppFactory", + "source": "user_text", + "subtype": null, + "span": { + "start": 37, + "end": 58 + }, + "confidence": 0.88 + } + ] + } + }, + "retrieval_result": { + "target_symbol_candidates": [ + "HttpControlAppFactory", + "ControlActionSet", + "ControlPlaneService", + "HealthContributor.health", + "HealthContributor", + "ControlChannel" + ], + "resolved_symbol": "HttpControlAppFactory", + "symbol_resolution_status": "resolved", + "file_candidates": [ + "src/app_runtime/control/http_app.py", + "src/app_runtime/control/http_channel.py", + "src/app_runtime/control/base.py", + "src/app_runtime/control/__init__.py", + "src/app_runtime/contracts/health.py", + "src/app_runtime/control/http_runner.py", + "src/app_runtime/control/service.py", + "src/app_runtime/health/registry.py", + "src/app_runtime/core/types.py" + ], + "code_chunks": [ + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/http_app.py", + "title": "HttpControlAppFactory", + "content": "class HttpControlAppFactory\nHttpControlAppFactory", + "start_line": 15, + "end_line": 53, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "qname": "HttpControlAppFactory", + "kind": "class", + "signature": "HttpControlAppFactory", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/http_channel.py", + "title": "HttpControlAppFactory", + "content": "const HttpControlAppFactory\nHttpControlAppFactory = app_runtime.control.http_app.HttpControlAppFactory", + "start_line": 8, + "end_line": 8, + "metadata": { + "symbol_id": "9ee00379ee797cd2386e88a6e37dc69e3e31de9144fc4b95f0206cd1430e8983", + "qname": "HttpControlAppFactory", + "kind": "const", + "signature": "HttpControlAppFactory = app_runtime.control.http_app.HttpControlAppFactory", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/base.py", + "title": "ControlActionSet", + "content": "class ControlActionSet\nControlActionSet", + "start_line": 14, + "end_line": 18, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "qname": "ControlActionSet", + "kind": "class", + "signature": "ControlActionSet", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/__init__.py", + "title": "ControlPlaneService", + "content": "const ControlPlaneService\nControlPlaneService = app_runtime.control.service.ControlPlaneService", + "start_line": 3, + "end_line": 3, + "metadata": { + "symbol_id": "217e8f044d1c01644bf7b81e5046af9e84469210c692a2fb0c476a19bb069ae1", + "qname": "ControlPlaneService", + "kind": "const", + "signature": "ControlPlaneService = app_runtime.control.service.ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/contracts/health.py", + "title": "HealthContributor.health", + "content": "method HealthContributor.health\nhealth(self)\nReturn contributor health state.", + "start_line": 9, + "end_line": 10, + "metadata": { + "symbol_id": "728cff18958d8a25e2661a0f08c83d68c3bbbfa8cef212b85dc0da2b11b3dc90", + "qname": "HealthContributor.health", + "kind": "method", + "signature": "health(self)", + "parent_symbol_id": "HealthContributor", + "package_or_module": "src.app_runtime.contracts.health", + "is_test": false, + "blob_sha": "6bd92611def7131e32d4dd34a8ed85e6cf3c67722ad27797032a632cb30dc097", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/contracts/health.py", + "title": "HealthContributor", + "content": "class HealthContributor\nHealthContributor(ABC)", + "start_line": 7, + "end_line": 10, + "metadata": { + "symbol_id": "db91ae387b89a2e9d83829754f27fa18a4055b3e72d7f31789a0b8e0bf5bba0b", + "qname": "HealthContributor", + "kind": "class", + "signature": "HealthContributor(ABC)", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.contracts.health", + "is_test": false, + "blob_sha": "6bd92611def7131e32d4dd34a8ed85e6cf3c67722ad27797032a632cb30dc097", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/__init__.py", + "title": "ControlActionSet", + "content": "const ControlActionSet\nControlActionSet = app_runtime.control.base.ControlActionSet", + "start_line": 1, + "end_line": 1, + "metadata": { + "symbol_id": "767e4ac0d4224aeccb0783a38359d3c03899a876736eb83d99887c16ea07cc6c", + "qname": "ControlActionSet", + "kind": "const", + "signature": "ControlActionSet = app_runtime.control.base.ControlActionSet", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/__init__.py", + "title": "ControlChannel", + "content": "const ControlChannel\nControlChannel = app_runtime.control.base.ControlChannel", + "start_line": 1, + "end_line": 1, + "metadata": { + "symbol_id": "268420f7aa4ed74082b9276cae0cded4f00bac090ffd58fa020a65be0fe19c27", + "qname": "ControlChannel", + "kind": "const", + "signature": "ControlChannel = app_runtime.control.base.ControlChannel", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/http_channel.py", + "title": "src/app_runtime/control/http_channel.py:HttpControlChannel", + "content": "class HttpControlChannel(ControlChannel):\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._timeout = timeout\n self._runner = UvicornThreadRunner(host, port, timeout)\n self._factory = HttpControlAppFactory()\n self._actions: ControlActionSet | None = None\n\n async def start(self, actions: ControlActionSet) -> None:\n self._actions = actions\n app = self._factory.create(self._health_response, self._action_response)\n await self._runner.start(app)\n\n async def stop(self) -> None:\n await self._runner.stop()\n\n @property\n def port(self) -> int:\n return self._runner.port\n\n async def _health_response(self) -> dict[str, object]:\n if self._actions is None:\n return {\"status\": \"unhealthy\", \"detail\": \"control actions are not configured\"}\n return await asyncio.wait_for(self._actions.health(), timeout=float(self._timeout))\n\n async def _action_response(self, action: str, _client_source: str = \"unknown\") -> JSONResponse:\n if self._actions is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"{action} handler is not configured\"}, status_code=404)\n callbacks = {\n \"start\": self._actions.start,\n \"stop\": self._actions.stop,\n \"status\": self._actions.status,\n }\n callback = callbacks.get(action)\n if callback is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"unsupported action: {action}\"}, status_code=404)\n action_timeout = max(float(self._timeout), 10.0) if action in {\"start\", \"stop\"} else float(self._timeout)\n try:\n detail = await asyncio.wait_for(callback(), timeout=action_timeout)\n except asyncio.TimeoutError:\n return JSONResponse(\n content={\"status\": \"accepted\", \"detail\": f\"{action} operation is still in progress\"},\n status_code=202,\n )\n except Exception as exc:\n return JSONResponse(content={\"status\": \"error\", \"detail\": str(exc)}, status_code=500)\n return JSONResponse(content={\"status\": \"ok\", \"detail\": detail or f\"{action} action accepted\"}, status_code=200)", + "start_line": 12, + "end_line": 57, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/http_runner.py", + "title": "src/app_runtime/control/http_runner.py:UvicornThreadRunner", + "content": "class UvicornThreadRunner:\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._host = host\n self._port = port\n self._timeout = timeout\n self._server: Server | None = None\n self._thread: Thread | None = None\n self._error: BaseException | None = None\n\n async def start(self, app: FastAPI) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._error = None\n config = Config(app=app, host=self._host, port=self._port, log_level=\"warning\")\n self._server = Server(config)\n self._thread = Thread(target=self._serve, name=\"plba-http-control\", daemon=True)\n self._thread.start()\n await self._wait_until_started()\n\n async def stop(self) -> None:\n if self._server is None or self._thread is None:\n return\n self._server.should_exit = True\n await asyncio.to_thread(self._thread.join, self._timeout)\n self._server = None\n self._thread = None\n\n @property\n def port(self) -> int:\n if self._server is None or not getattr(self._server, \"servers\", None):\n return self._port\n socket = self._server.servers[0].sockets[0]\n return int(socket.getsockname()[1])\n\n async def _wait_until_started(self) -> None:\n if self._server is None:\n raise RuntimeError(\"Server is not initialized\")\n deadline = asyncio.get_running_loop().time() + max(float(self._timeout), 1.0)\n while not self._server.started:\n if self._error is not None:\n raise RuntimeError(\"HTTP control server failed to start\") from self._error\n if asyncio.get_running_loop().time() >= deadline:\n raise TimeoutError(\"HTTP control server startup timed out\")\n await asyncio.sleep(0.05)\n\n def _serve(self) -> None:\n if self._server is None:\n return\n try:\n asyncio.run(self._server.serve())\n except BaseException as exc: # noqa: BLE001\n self._error = exc", + "start_line": 10, + "end_line": 61, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_runner", + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/http_app.py", + "title": "src/app_runtime/control/http_app.py:HttpControlAppFactory", + "content": "class HttpControlAppFactory:\n def create(\n self,\n health_provider: Callable[[], Awaitable[HealthPayload]],\n action_provider: Callable[[str, str], Awaitable[JSONResponse]],\n ) -> FastAPI:\n app = FastAPI(title=\"PLBA Control API\")\n\n @app.middleware(\"http\")\n async def log_api_call(request: Request, call_next): # type: ignore[no-untyped-def]\n started = time.monotonic()\n response = await call_next(request)\n response.headers[\"X-Response-Time-Ms\"] = str(int((time.monotonic() - started) * 1000))\n return response\n\n @app.get(\"/health\")\n async def health() -> JSONResponse:\n payload = await health_provider()\n status_code = 200 if payload.get(\"status\") == \"ok\" else 503\n return JSONResponse(content=payload, status_code=status_code)\n\n @app.get(\"/actions/{action}\")\n @app.post(\"/actions/{action}\")\n async def action(action: str, request: Request) -> JSONResponse:\n client_source = self._client_source(request)\n if action in {\"start\", \"stop\"}:\n LOGGER.warning(\"Control action requested: /actions/%s client=%s\", action, client_source)\n return await action_provider(action, client_source)\n\n return app\n\n def _client_source(self, request: Request) -> str:\n explicit_header = request.headers.get(\"X-Client-Source\", \"\").strip()\n if explicit_header:\n return explicit_header\n user_agent = request.headers.get(\"User-Agent\", \"\").strip()\n if user_agent:\n return f\"user-agent:{user_agent}\"\n return \"unknown\"", + "start_line": 15, + "end_line": 53, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/contracts/health.py", + "title": "src/app_runtime/contracts/health.py:HealthContributor", + "content": "class HealthContributor(ABC):\n @abstractmethod\n def health(self) -> WorkerHealth:\n \"\"\"Return contributor health state.\"\"\"", + "start_line": 7, + "end_line": 10, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.health", + "is_test": false, + "blob_sha": "6bd92611def7131e32d4dd34a8ed85e6cf3c67722ad27797032a632cb30dc097", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/base.py", + "title": "src/app_runtime/control/base.py:ControlChannel", + "content": "class ControlChannel(ABC):\n @abstractmethod\n async def start(self, actions: ControlActionSet) -> None:\n \"\"\"Start the control channel and bind handlers.\"\"\"\n\n @abstractmethod\n async def stop(self) -> None:\n \"\"\"Stop the control channel and release resources.\"\"\"", + "start_line": 21, + "end_line": 28, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/__init__.py", + "title": "src/app_runtime/control/__init__.py:1-5", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\"ControlActionSet\", \"ControlChannel\", \"ControlPlaneService\", \"HttpControlChannel\"]", + "start_line": 1, + "end_line": 5, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/base.py", + "title": "src/app_runtime/control/base.py:ControlActionSet", + "content": "class ControlActionSet:\n health: HealthHandler\n start: ActionHandler\n stop: ActionHandler\n status: ActionHandler", + "start_line": 14, + "end_line": 18, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/service.py", + "title": "src/app_runtime/control/service.py:ControlPlaneService", + "content": "class ControlPlaneService:\n def __init__(self) -> None:\n self._channels: list[ControlChannel] = []\n\n def register_channel(self, channel: ControlChannel) -> None:\n self._channels.append(channel)\n\n def start(self, runtime: RuntimeManager) -> None:\n if not self._channels:\n return\n asyncio.run(self._start_async(runtime))\n\n def stop(self) -> None:\n if not self._channels:\n return\n asyncio.run(self._stop_async())\n\n def snapshot(self, runtime: RuntimeManager) -> dict[str, object]:\n health = runtime.current_health()\n return {\n \"runtime\": {\"state\": runtime._state.value},\n \"modules\": list(runtime.registry.modules),\n \"services\": runtime.services.snapshot(),\n \"workers\": runtime.workers.snapshot(),\n \"health\": runtime.health.snapshot(runtime.workers.healths()) | {\"status\": health[\"status\"]},\n \"config\": runtime.configuration.get(),\n }\n\n async def _start_async(self, runtime: RuntimeManager) -> None:\n actions = ControlActionSet(\n health=runtime.health_status,\n start=runtime.start_runtime,\n stop=runtime.stop_runtime,\n status=runtime.runtime_status,\n )\n for channel in self._channels:\n await channel.start(actions)\n\n async def _stop_async(self) -> None:\n for channel in reversed(self._channels):\n await channel.stop()", + "start_line": 12, + "end_line": 52, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/http_app.py", + "title": "HttpControlAppFactory", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "start_line": 15, + "end_line": 53, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/health/registry.py", + "title": "HealthRegistry", + "content": "HealthRegistry\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (2)", + "start_line": 8, + "end_line": 56, + "metadata": { + "symbol_id": "fd3390eb0ba29c9979466b9c2117238e0da3bb829eeb4d505cb34c9c3df7a8e8", + "symbol_name": "HealthRegistry", + "qname": "HealthRegistry", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 2, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "26e6a24daa43407ba5340b74497c20153020e79f8d7828ae502aaec378dfcf75", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/core/types.py", + "title": "HealthPayload", + "content": "HealthPayload\nrole: model\n\nResponsibilities:\n- default model role", + "start_line": 7, + "end_line": 11, + "metadata": { + "symbol_id": "392235d63ddf752d6e419cb8528c93fe070d1bc02d3c87ba6a897baac810cf5d", + "symbol_name": "HealthPayload", + "qname": "HealthPayload", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "448a02e4a432b5ab65b246b2bd24a32a6f127b9d2091ea73b53ee3c0a2f53bb3", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/contracts/health.py", + "title": "HealthContributor", + "content": "HealthContributor\nrole: model\n\nResponsibilities:\n- default model role", + "start_line": 7, + "end_line": 10, + "metadata": { + "symbol_id": "db91ae387b89a2e9d83829754f27fa18a4055b3e72d7f31789a0b8e0bf5bba0b", + "symbol_name": "HealthContributor", + "qname": "HealthContributor", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "6bd92611def7131e32d4dd34a8ed85e6cf3c67722ad27797032a632cb30dc097", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/base.py", + "title": "ControlActionSet", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "start_line": 14, + "end_line": 18, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/base.py", + "title": "ControlChannel", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "start_line": 21, + "end_line": 28, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "start_line": 12, + "end_line": 52, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/http_runner.py", + "title": "UvicornThreadRunner", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "start_line": 10, + "end_line": 61, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/health/registry.py", + "title": "HealthRegistry.__init__:dataflow_slice", + "content": "HealthRegistry.__init__\n -> HealthRegistry._contributors\n -> HealthRegistry.register", + "start_line": 10, + "end_line": 13, + "metadata": { + "edge_id": "2381dfb339d541367c3251d2a610cac9d8b3f6bd6a352e119d00a93c5ccc2b7d", + "edge_type": "dataflow_slice", + "src_symbol_id": "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "src_qname": "HealthRegistry.__init__", + "dst_symbol_id": "a9e1f290c346c8bb1d67af0cafeebb5bcaf29c3ed7027e33c794532743df38f2", + "dst_ref": "HealthRegistry.register", + "resolution": "resolved", + "slice_id": "2381dfb339d541367c3251d2a610cac9d8b3f6bd6a352e119d00a93c5ccc2b7d", + "root_symbol_id": "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "path_symbols": [ + "HealthRegistry.__init__", + "HealthRegistry._contributors", + "HealthRegistry.register" + ], + "path_symbol_ids": [ + "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "a9e1f290c346c8bb1d67af0cafeebb5bcaf29c3ed7027e33c794532743df38f2" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "26e6a24daa43407ba5340b74497c20153020e79f8d7828ae502aaec378dfcf75", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "start_line": 14, + "end_line": 20, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "start_line": 14, + "end_line": 25, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "start_line": 14, + "end_line": 51, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/health/registry.py", + "title": "HealthRegistry.__init__:dataflow_slice", + "content": "HealthRegistry.__init__\n -> HealthRegistry._contributors\n -> HealthRegistry.contributor_healths", + "start_line": 10, + "end_line": 16, + "metadata": { + "edge_id": "d3a88a7abf16359e903e809ffc24473658fdd8198f60641fe1584fc4ac663c31", + "edge_type": "dataflow_slice", + "src_symbol_id": "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "src_qname": "HealthRegistry.__init__", + "dst_symbol_id": "fa7bbd8f4b64a55a5088640c30f52e84075d65f531bd7e1f6c1d7bb8d24fcbf2", + "dst_ref": "HealthRegistry.contributor_healths", + "resolution": "resolved", + "slice_id": "d3a88a7abf16359e903e809ffc24473658fdd8198f60641fe1584fc4ac663c31", + "root_symbol_id": "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "path_symbols": [ + "HealthRegistry.__init__", + "HealthRegistry._contributors", + "HealthRegistry.contributor_healths" + ], + "path_symbol_ids": [ + "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "fa7bbd8f4b64a55a5088640c30f52e84075d65f531bd7e1f6c1d7bb8d24fcbf2" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "26e6a24daa43407ba5340b74497c20153020e79f8d7828ae502aaec378dfcf75", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "start_line": 14, + "end_line": 47, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "start_line": 14, + "end_line": 17, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/http_app.py", + "title": "HttpControlAppFactory.create:calls", + "content": "HttpControlAppFactory.create calls time.monotonic", + "start_line": 25, + "end_line": 25, + "metadata": { + "edge_id": "3fdd0a88d10225ee74f3b84ab57e13f09f5ccc72f00e31af9ae4655411c289c0", + "edge_type": "calls", + "src_symbol_id": "4af42c2a9275d652e710a98ec48b8247236b4453a093629f8958704ff6d3cb58", + "src_qname": "HttpControlAppFactory.create", + "dst_symbol_id": null, + "dst_ref": "time.monotonic", + "resolution": "partial", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/http_app.py", + "title": "HttpControlAppFactory.create:calls", + "content": "HttpControlAppFactory.create calls app.post", + "start_line": 37, + "end_line": 37, + "metadata": { + "edge_id": "0e545d4b5187db7bec5ceac03071d2ad68177550c42af748fee364639e533c90", + "edge_type": "calls", + "src_symbol_id": "4af42c2a9275d652e710a98ec48b8247236b4453a093629f8958704ff6d3cb58", + "src_qname": "HttpControlAppFactory.create", + "dst_symbol_id": null, + "dst_ref": "app.post", + "resolution": "partial", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/http_app.py", + "title": "HttpControlAppFactory.create:calls", + "content": "HttpControlAppFactory.create calls str", + "start_line": 27, + "end_line": 27, + "metadata": { + "edge_id": "2a87c51461e31cd556508cc37fdff37b4d24c26f7f1604db30af5e8f1bda96cb", + "edge_type": "calls", + "src_symbol_id": "4af42c2a9275d652e710a98ec48b8247236b4453a093629f8958704ff6d3cb58", + "src_qname": "HttpControlAppFactory.create", + "dst_symbol_id": null, + "dst_ref": "str", + "resolution": "partial", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C3_ENTRYPOINTS", + "path": "src/app_runtime/control/http_app.py", + "title": "app.post", + "content": "fastapi http app.post", + "start_line": 38, + "end_line": 42, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C3_ENTRYPOINTS", + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "content": "fastapi http app.get", + "start_line": 31, + "end_line": 34, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C3_ENTRYPOINTS", + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "content": "fastapi http app.get", + "start_line": 38, + "end_line": 42, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "relations": [ + { + "path": "src/app_runtime/health/registry.py", + "metadata": { + "edge_id": "2381dfb339d541367c3251d2a610cac9d8b3f6bd6a352e119d00a93c5ccc2b7d", + "edge_type": "dataflow_slice", + "src_symbol_id": "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "src_qname": "HealthRegistry.__init__", + "dst_symbol_id": "a9e1f290c346c8bb1d67af0cafeebb5bcaf29c3ed7027e33c794532743df38f2", + "dst_ref": "HealthRegistry.register", + "resolution": "resolved", + "slice_id": "2381dfb339d541367c3251d2a610cac9d8b3f6bd6a352e119d00a93c5ccc2b7d", + "root_symbol_id": "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "path_symbols": [ + "HealthRegistry.__init__", + "HealthRegistry._contributors", + "HealthRegistry.register" + ], + "path_symbol_ids": [ + "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "a9e1f290c346c8bb1d67af0cafeebb5bcaf29c3ed7027e33c794532743df38f2" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "26e6a24daa43407ba5340b74497c20153020e79f8d7828ae502aaec378dfcf75", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "HealthRegistry.__init__\n -> HealthRegistry._contributors\n -> HealthRegistry.register" + }, + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start" + }, + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop" + }, + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async" + }, + { + "path": "src/app_runtime/health/registry.py", + "metadata": { + "edge_id": "d3a88a7abf16359e903e809ffc24473658fdd8198f60641fe1584fc4ac663c31", + "edge_type": "dataflow_slice", + "src_symbol_id": "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "src_qname": "HealthRegistry.__init__", + "dst_symbol_id": "fa7bbd8f4b64a55a5088640c30f52e84075d65f531bd7e1f6c1d7bb8d24fcbf2", + "dst_ref": "HealthRegistry.contributor_healths", + "resolution": "resolved", + "slice_id": "d3a88a7abf16359e903e809ffc24473658fdd8198f60641fe1584fc4ac663c31", + "root_symbol_id": "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "path_symbols": [ + "HealthRegistry.__init__", + "HealthRegistry._contributors", + "HealthRegistry.contributor_healths" + ], + "path_symbol_ids": [ + "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "fa7bbd8f4b64a55a5088640c30f52e84075d65f531bd7e1f6c1d7bb8d24fcbf2" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "26e6a24daa43407ba5340b74497c20153020e79f8d7828ae502aaec378dfcf75", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "HealthRegistry.__init__\n -> HealthRegistry._contributors\n -> HealthRegistry.contributor_healths" + }, + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async" + }, + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel" + }, + { + "path": "src/app_runtime/control/http_app.py", + "metadata": { + "edge_id": "3fdd0a88d10225ee74f3b84ab57e13f09f5ccc72f00e31af9ae4655411c289c0", + "edge_type": "calls", + "src_symbol_id": "4af42c2a9275d652e710a98ec48b8247236b4453a093629f8958704ff6d3cb58", + "src_qname": "HttpControlAppFactory.create", + "dst_symbol_id": null, + "dst_ref": "time.monotonic", + "resolution": "partial", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "HttpControlAppFactory.create calls time.monotonic" + }, + { + "path": "src/app_runtime/control/http_app.py", + "metadata": { + "edge_id": "0e545d4b5187db7bec5ceac03071d2ad68177550c42af748fee364639e533c90", + "edge_type": "calls", + "src_symbol_id": "4af42c2a9275d652e710a98ec48b8247236b4453a093629f8958704ff6d3cb58", + "src_qname": "HttpControlAppFactory.create", + "dst_symbol_id": null, + "dst_ref": "app.post", + "resolution": "partial", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "HttpControlAppFactory.create calls app.post" + }, + { + "path": "src/app_runtime/control/http_app.py", + "metadata": { + "edge_id": "2a87c51461e31cd556508cc37fdff37b4d24c26f7f1604db30af5e8f1bda96cb", + "edge_type": "calls", + "src_symbol_id": "4af42c2a9275d652e710a98ec48b8247236b4453a093629f8958704ff6d3cb58", + "src_qname": "HttpControlAppFactory.create", + "dst_symbol_id": null, + "dst_ref": "str", + "resolution": "partial", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "HttpControlAppFactory.create calls str" + } + ], + "entrypoints": [ + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.post", + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "test_candidates": [], + "layer_outcomes": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C4_SEMANTIC_ROLES", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 10, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C3_ENTRYPOINTS", + "hit_count": 3, + "empty": false, + "fallback_used": false + } + ], + "missing_layers": [], + "raw_rows": [ + { + "path": "src/app_runtime/control/http_app.py", + "content": "class HttpControlAppFactory\nHttpControlAppFactory", + "layer": "C1_SYMBOL_CATALOG", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "qname": "HttpControlAppFactory", + "kind": "class", + "signature": "HttpControlAppFactory", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "const HttpControlAppFactory\nHttpControlAppFactory = app_runtime.control.http_app.HttpControlAppFactory", + "layer": "C1_SYMBOL_CATALOG", + "title": "HttpControlAppFactory", + "span_start": 8, + "span_end": 8, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "9ee00379ee797cd2386e88a6e37dc69e3e31de9144fc4b95f0206cd1430e8983", + "qname": "HttpControlAppFactory", + "kind": "const", + "signature": "HttpControlAppFactory = app_runtime.control.http_app.HttpControlAppFactory", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlActionSet\nControlActionSet", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "qname": "ControlActionSet", + "kind": "class", + "signature": "ControlActionSet", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "const ControlPlaneService\nControlPlaneService = app_runtime.control.service.ControlPlaneService", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlPlaneService", + "span_start": 3, + "span_end": 3, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "217e8f044d1c01644bf7b81e5046af9e84469210c692a2fb0c476a19bb069ae1", + "qname": "ControlPlaneService", + "kind": "const", + "signature": "ControlPlaneService = app_runtime.control.service.ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/health.py", + "content": "method HealthContributor.health\nhealth(self)\nReturn contributor health state.", + "layer": "C1_SYMBOL_CATALOG", + "title": "HealthContributor.health", + "span_start": 9, + "span_end": 10, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "728cff18958d8a25e2661a0f08c83d68c3bbbfa8cef212b85dc0da2b11b3dc90", + "qname": "HealthContributor.health", + "kind": "method", + "signature": "health(self)", + "parent_symbol_id": "HealthContributor", + "package_or_module": "src.app_runtime.contracts.health", + "is_test": false, + "blob_sha": "6bd92611def7131e32d4dd34a8ed85e6cf3c67722ad27797032a632cb30dc097", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/health.py", + "content": "class HealthContributor\nHealthContributor(ABC)", + "layer": "C1_SYMBOL_CATALOG", + "title": "HealthContributor", + "span_start": 7, + "span_end": 10, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "db91ae387b89a2e9d83829754f27fa18a4055b3e72d7f31789a0b8e0bf5bba0b", + "qname": "HealthContributor", + "kind": "class", + "signature": "HealthContributor(ABC)", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.contracts.health", + "is_test": false, + "blob_sha": "6bd92611def7131e32d4dd34a8ed85e6cf3c67722ad27797032a632cb30dc097", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "const ControlActionSet\nControlActionSet = app_runtime.control.base.ControlActionSet", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlActionSet", + "span_start": 1, + "span_end": 1, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "767e4ac0d4224aeccb0783a38359d3c03899a876736eb83d99887c16ea07cc6c", + "qname": "ControlActionSet", + "kind": "const", + "signature": "ControlActionSet = app_runtime.control.base.ControlActionSet", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "const ControlChannel\nControlChannel = app_runtime.control.base.ControlChannel", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlChannel", + "span_start": 1, + "span_end": 1, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "268420f7aa4ed74082b9276cae0cded4f00bac090ffd58fa020a65be0fe19c27", + "qname": "ControlChannel", + "kind": "const", + "signature": "ControlChannel = app_runtime.control.base.ControlChannel", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel(ControlChannel):\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._timeout = timeout\n self._runner = UvicornThreadRunner(host, port, timeout)\n self._factory = HttpControlAppFactory()\n self._actions: ControlActionSet | None = None\n\n async def start(self, actions: ControlActionSet) -> None:\n self._actions = actions\n app = self._factory.create(self._health_response, self._action_response)\n await self._runner.start(app)\n\n async def stop(self) -> None:\n await self._runner.stop()\n\n @property\n def port(self) -> int:\n return self._runner.port\n\n async def _health_response(self) -> dict[str, object]:\n if self._actions is None:\n return {\"status\": \"unhealthy\", \"detail\": \"control actions are not configured\"}\n return await asyncio.wait_for(self._actions.health(), timeout=float(self._timeout))\n\n async def _action_response(self, action: str, _client_source: str = \"unknown\") -> JSONResponse:\n if self._actions is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"{action} handler is not configured\"}, status_code=404)\n callbacks = {\n \"start\": self._actions.start,\n \"stop\": self._actions.stop,\n \"status\": self._actions.status,\n }\n callback = callbacks.get(action)\n if callback is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"unsupported action: {action}\"}, status_code=404)\n action_timeout = max(float(self._timeout), 10.0) if action in {\"start\", \"stop\"} else float(self._timeout)\n try:\n detail = await asyncio.wait_for(callback(), timeout=action_timeout)\n except asyncio.TimeoutError:\n return JSONResponse(\n content={\"status\": \"accepted\", \"detail\": f\"{action} operation is still in progress\"},\n status_code=202,\n )\n except Exception as exc:\n return JSONResponse(content={\"status\": \"error\", \"detail\": str(exc)}, status_code=500)\n return JSONResponse(content={\"status\": \"ok\", \"detail\": detail or f\"{action} action accepted\"}, status_code=200)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_channel.py:HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "class UvicornThreadRunner:\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._host = host\n self._port = port\n self._timeout = timeout\n self._server: Server | None = None\n self._thread: Thread | None = None\n self._error: BaseException | None = None\n\n async def start(self, app: FastAPI) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._error = None\n config = Config(app=app, host=self._host, port=self._port, log_level=\"warning\")\n self._server = Server(config)\n self._thread = Thread(target=self._serve, name=\"plba-http-control\", daemon=True)\n self._thread.start()\n await self._wait_until_started()\n\n async def stop(self) -> None:\n if self._server is None or self._thread is None:\n return\n self._server.should_exit = True\n await asyncio.to_thread(self._thread.join, self._timeout)\n self._server = None\n self._thread = None\n\n @property\n def port(self) -> int:\n if self._server is None or not getattr(self._server, \"servers\", None):\n return self._port\n socket = self._server.servers[0].sockets[0]\n return int(socket.getsockname()[1])\n\n async def _wait_until_started(self) -> None:\n if self._server is None:\n raise RuntimeError(\"Server is not initialized\")\n deadline = asyncio.get_running_loop().time() + max(float(self._timeout), 1.0)\n while not self._server.started:\n if self._error is not None:\n raise RuntimeError(\"HTTP control server failed to start\") from self._error\n if asyncio.get_running_loop().time() >= deadline:\n raise TimeoutError(\"HTTP control server startup timed out\")\n await asyncio.sleep(0.05)\n\n def _serve(self) -> None:\n if self._server is None:\n return\n try:\n asyncio.run(self._server.serve())\n except BaseException as exc: # noqa: BLE001\n self._error = exc", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_runner.py:UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_runner", + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "class HttpControlAppFactory:\n def create(\n self,\n health_provider: Callable[[], Awaitable[HealthPayload]],\n action_provider: Callable[[str, str], Awaitable[JSONResponse]],\n ) -> FastAPI:\n app = FastAPI(title=\"PLBA Control API\")\n\n @app.middleware(\"http\")\n async def log_api_call(request: Request, call_next): # type: ignore[no-untyped-def]\n started = time.monotonic()\n response = await call_next(request)\n response.headers[\"X-Response-Time-Ms\"] = str(int((time.monotonic() - started) * 1000))\n return response\n\n @app.get(\"/health\")\n async def health() -> JSONResponse:\n payload = await health_provider()\n status_code = 200 if payload.get(\"status\") == \"ok\" else 503\n return JSONResponse(content=payload, status_code=status_code)\n\n @app.get(\"/actions/{action}\")\n @app.post(\"/actions/{action}\")\n async def action(action: str, request: Request) -> JSONResponse:\n client_source = self._client_source(request)\n if action in {\"start\", \"stop\"}:\n LOGGER.warning(\"Control action requested: /actions/%s client=%s\", action, client_source)\n return await action_provider(action, client_source)\n\n return app\n\n def _client_source(self, request: Request) -> str:\n explicit_header = request.headers.get(\"X-Client-Source\", \"\").strip()\n if explicit_header:\n return explicit_header\n user_agent = request.headers.get(\"User-Agent\", \"\").strip()\n if user_agent:\n return f\"user-agent:{user_agent}\"\n return \"unknown\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_app.py:HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/health.py", + "content": "class HealthContributor(ABC):\n @abstractmethod\n def health(self) -> WorkerHealth:\n \"\"\"Return contributor health state.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/contracts/health.py:HealthContributor", + "span_start": 7, + "span_end": 10, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.health", + "is_test": false, + "blob_sha": "6bd92611def7131e32d4dd34a8ed85e6cf3c67722ad27797032a632cb30dc097", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlChannel(ABC):\n @abstractmethod\n async def start(self, actions: ControlActionSet) -> None:\n \"\"\"Start the control channel and bind handlers.\"\"\"\n\n @abstractmethod\n async def stop(self) -> None:\n \"\"\"Stop the control channel and release resources.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\"ControlActionSet\", \"ControlChannel\", \"ControlPlaneService\", \"HttpControlChannel\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/__init__.py:1-5", + "span_start": 1, + "span_end": 5, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlActionSet:\n health: HealthHandler\n start: ActionHandler\n stop: ActionHandler\n status: ActionHandler", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "class ControlPlaneService:\n def __init__(self) -> None:\n self._channels: list[ControlChannel] = []\n\n def register_channel(self, channel: ControlChannel) -> None:\n self._channels.append(channel)\n\n def start(self, runtime: RuntimeManager) -> None:\n if not self._channels:\n return\n asyncio.run(self._start_async(runtime))\n\n def stop(self) -> None:\n if not self._channels:\n return\n asyncio.run(self._stop_async())\n\n def snapshot(self, runtime: RuntimeManager) -> dict[str, object]:\n health = runtime.current_health()\n return {\n \"runtime\": {\"state\": runtime._state.value},\n \"modules\": list(runtime.registry.modules),\n \"services\": runtime.services.snapshot(),\n \"workers\": runtime.workers.snapshot(),\n \"health\": runtime.health.snapshot(runtime.workers.healths()) | {\"status\": health[\"status\"]},\n \"config\": runtime.configuration.get(),\n }\n\n async def _start_async(self, runtime: RuntimeManager) -> None:\n actions = ControlActionSet(\n health=runtime.health_status,\n start=runtime.start_runtime,\n stop=runtime.stop_runtime,\n status=runtime.runtime_status,\n )\n for channel in self._channels:\n await channel.start(actions)\n\n async def _stop_async(self) -> None:\n for channel in reversed(self._channels):\n await channel.stop()", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/service.py:ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/health/registry.py", + "content": "HealthRegistry\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (2)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HealthRegistry", + "span_start": 8, + "span_end": 56, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 29, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "fd3390eb0ba29c9979466b9c2117238e0da3bb829eeb4d505cb34c9c3df7a8e8", + "symbol_name": "HealthRegistry", + "qname": "HealthRegistry", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 2, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "26e6a24daa43407ba5340b74497c20153020e79f8d7828ae502aaec378dfcf75", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/types.py", + "content": "HealthPayload\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "HealthPayload", + "span_start": 7, + "span_end": 11, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "392235d63ddf752d6e419cb8528c93fe070d1bc02d3c87ba6a897baac810cf5d", + "symbol_name": "HealthPayload", + "qname": "HealthPayload", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "448a02e4a432b5ab65b246b2bd24a32a6f127b9d2091ea73b53ee3c0a2f53bb3", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/health.py", + "content": "HealthContributor\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "HealthContributor", + "span_start": 7, + "span_end": 10, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "db91ae387b89a2e9d83829754f27fa18a4055b3e72d7f31789a0b8e0bf5bba0b", + "symbol_name": "HealthContributor", + "qname": "HealthContributor", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "6bd92611def7131e32d4dd34a8ed85e6cf3c67722ad27797032a632cb30dc097", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/health/registry.py", + "content": "HealthRegistry.__init__\n -> HealthRegistry._contributors\n -> HealthRegistry.register", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HealthRegistry.__init__:dataflow_slice", + "span_start": 10, + "span_end": 13, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "2381dfb339d541367c3251d2a610cac9d8b3f6bd6a352e119d00a93c5ccc2b7d", + "edge_type": "dataflow_slice", + "src_symbol_id": "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "src_qname": "HealthRegistry.__init__", + "dst_symbol_id": "a9e1f290c346c8bb1d67af0cafeebb5bcaf29c3ed7027e33c794532743df38f2", + "dst_ref": "HealthRegistry.register", + "resolution": "resolved", + "slice_id": "2381dfb339d541367c3251d2a610cac9d8b3f6bd6a352e119d00a93c5ccc2b7d", + "root_symbol_id": "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "path_symbols": [ + "HealthRegistry.__init__", + "HealthRegistry._contributors", + "HealthRegistry.register" + ], + "path_symbol_ids": [ + "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "a9e1f290c346c8bb1d67af0cafeebb5bcaf29c3ed7027e33c794532743df38f2" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "26e6a24daa43407ba5340b74497c20153020e79f8d7828ae502aaec378dfcf75", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/health/registry.py", + "content": "HealthRegistry.__init__\n -> HealthRegistry._contributors\n -> HealthRegistry.contributor_healths", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HealthRegistry.__init__:dataflow_slice", + "span_start": 10, + "span_end": 16, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "d3a88a7abf16359e903e809ffc24473658fdd8198f60641fe1584fc4ac663c31", + "edge_type": "dataflow_slice", + "src_symbol_id": "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "src_qname": "HealthRegistry.__init__", + "dst_symbol_id": "fa7bbd8f4b64a55a5088640c30f52e84075d65f531bd7e1f6c1d7bb8d24fcbf2", + "dst_ref": "HealthRegistry.contributor_healths", + "resolution": "resolved", + "slice_id": "d3a88a7abf16359e903e809ffc24473658fdd8198f60641fe1584fc4ac663c31", + "root_symbol_id": "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "path_symbols": [ + "HealthRegistry.__init__", + "HealthRegistry._contributors", + "HealthRegistry.contributor_healths" + ], + "path_symbol_ids": [ + "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "fa7bbd8f4b64a55a5088640c30f52e84075d65f531bd7e1f6c1d7bb8d24fcbf2" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "26e6a24daa43407ba5340b74497c20153020e79f8d7828ae502aaec378dfcf75", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory.create calls time.monotonic", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlAppFactory.create:calls", + "span_start": 25, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "3fdd0a88d10225ee74f3b84ab57e13f09f5ccc72f00e31af9ae4655411c289c0", + "edge_type": "calls", + "src_symbol_id": "4af42c2a9275d652e710a98ec48b8247236b4453a093629f8958704ff6d3cb58", + "src_qname": "HttpControlAppFactory.create", + "dst_symbol_id": null, + "dst_ref": "time.monotonic", + "resolution": "partial", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory.create calls app.post", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlAppFactory.create:calls", + "span_start": 37, + "span_end": 37, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "0e545d4b5187db7bec5ceac03071d2ad68177550c42af748fee364639e533c90", + "edge_type": "calls", + "src_symbol_id": "4af42c2a9275d652e710a98ec48b8247236b4453a093629f8958704ff6d3cb58", + "src_qname": "HttpControlAppFactory.create", + "dst_symbol_id": null, + "dst_ref": "app.post", + "resolution": "partial", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory.create calls str", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlAppFactory.create:calls", + "span_start": 27, + "span_end": 27, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "2a87c51461e31cd556508cc37fdff37b4d24c26f7f1604db30af5e8f1bda96cb", + "edge_type": "calls", + "src_symbol_id": "4af42c2a9275d652e710a98ec48b8247236b4453a093629f8958704ff6d3cb58", + "src_qname": "HttpControlAppFactory.create", + "dst_symbol_id": null, + "dst_ref": "str", + "resolution": "partial", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": null, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": null, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": null, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "retrieval_report": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "vector", + "C0_SOURCE_CHUNKS": "vector", + "C4_SEMANTIC_ROLES": "vector", + "C2_DEPENDENCY_GRAPH": "vector", + "C3_ENTRYPOINTS": "vector" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 10, + "C3_ENTRYPOINTS": 10 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [] + } + }, + "fallback": { + "used": false, + "reason": null + }, + "retrieval_by_layer_ms": { + "C1_SYMBOL_CATALOG": 36, + "C0_SOURCE_CHUNKS": 16, + "C4_SEMANTIC_ROLES": 13, + "C2_DEPENDENCY_GRAPH": 53, + "C3_ENTRYPOINTS": 12 + } + } + }, + "diagnostics": { + "intent_correct": null, + "target_found": true, + "layers_used": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_sufficient": true, + "answer_mode": "normal", + "router_result": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "TRACE_FLOW", + "path_scope": [], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_resolution_status": "pending" + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Покажи как проходит запрос /health в HttpControlAppFactory", + "sub_intent": "TRACE_FLOW", + "path_scope": [], + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C4_SEMANTIC_ROLES", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 10, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C3_ENTRYPOINTS", + "hit_count": 3, + "empty": false, + "fallback_used": false + } + ], + "empty_layers": [], + "evidence_gate_decision": { + "sufficient": true, + "failure_reasons": [], + "evidence_count": 37 + }, + "failure_reasons": [], + "timings_ms": {} + }, + "rag_rows": [ + { + "path": "src/app_runtime/control/http_app.py", + "content": "class HttpControlAppFactory\nHttpControlAppFactory", + "layer": "C1_SYMBOL_CATALOG", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "qname": "HttpControlAppFactory", + "kind": "class", + "signature": "HttpControlAppFactory", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "const HttpControlAppFactory\nHttpControlAppFactory = app_runtime.control.http_app.HttpControlAppFactory", + "layer": "C1_SYMBOL_CATALOG", + "title": "HttpControlAppFactory", + "span_start": 8, + "span_end": 8, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "9ee00379ee797cd2386e88a6e37dc69e3e31de9144fc4b95f0206cd1430e8983", + "qname": "HttpControlAppFactory", + "kind": "const", + "signature": "HttpControlAppFactory = app_runtime.control.http_app.HttpControlAppFactory", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlActionSet\nControlActionSet", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "qname": "ControlActionSet", + "kind": "class", + "signature": "ControlActionSet", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "const ControlPlaneService\nControlPlaneService = app_runtime.control.service.ControlPlaneService", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlPlaneService", + "span_start": 3, + "span_end": 3, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "217e8f044d1c01644bf7b81e5046af9e84469210c692a2fb0c476a19bb069ae1", + "qname": "ControlPlaneService", + "kind": "const", + "signature": "ControlPlaneService = app_runtime.control.service.ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/health.py", + "content": "method HealthContributor.health\nhealth(self)\nReturn contributor health state.", + "layer": "C1_SYMBOL_CATALOG", + "title": "HealthContributor.health", + "span_start": 9, + "span_end": 10, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "728cff18958d8a25e2661a0f08c83d68c3bbbfa8cef212b85dc0da2b11b3dc90", + "qname": "HealthContributor.health", + "kind": "method", + "signature": "health(self)", + "parent_symbol_id": "HealthContributor", + "package_or_module": "src.app_runtime.contracts.health", + "is_test": false, + "blob_sha": "6bd92611def7131e32d4dd34a8ed85e6cf3c67722ad27797032a632cb30dc097", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/health.py", + "content": "class HealthContributor\nHealthContributor(ABC)", + "layer": "C1_SYMBOL_CATALOG", + "title": "HealthContributor", + "span_start": 7, + "span_end": 10, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "db91ae387b89a2e9d83829754f27fa18a4055b3e72d7f31789a0b8e0bf5bba0b", + "qname": "HealthContributor", + "kind": "class", + "signature": "HealthContributor(ABC)", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.contracts.health", + "is_test": false, + "blob_sha": "6bd92611def7131e32d4dd34a8ed85e6cf3c67722ad27797032a632cb30dc097", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "const ControlActionSet\nControlActionSet = app_runtime.control.base.ControlActionSet", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlActionSet", + "span_start": 1, + "span_end": 1, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "767e4ac0d4224aeccb0783a38359d3c03899a876736eb83d99887c16ea07cc6c", + "qname": "ControlActionSet", + "kind": "const", + "signature": "ControlActionSet = app_runtime.control.base.ControlActionSet", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "const ControlChannel\nControlChannel = app_runtime.control.base.ControlChannel", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlChannel", + "span_start": 1, + "span_end": 1, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "268420f7aa4ed74082b9276cae0cded4f00bac090ffd58fa020a65be0fe19c27", + "qname": "ControlChannel", + "kind": "const", + "signature": "ControlChannel = app_runtime.control.base.ControlChannel", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel(ControlChannel):\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._timeout = timeout\n self._runner = UvicornThreadRunner(host, port, timeout)\n self._factory = HttpControlAppFactory()\n self._actions: ControlActionSet | None = None\n\n async def start(self, actions: ControlActionSet) -> None:\n self._actions = actions\n app = self._factory.create(self._health_response, self._action_response)\n await self._runner.start(app)\n\n async def stop(self) -> None:\n await self._runner.stop()\n\n @property\n def port(self) -> int:\n return self._runner.port\n\n async def _health_response(self) -> dict[str, object]:\n if self._actions is None:\n return {\"status\": \"unhealthy\", \"detail\": \"control actions are not configured\"}\n return await asyncio.wait_for(self._actions.health(), timeout=float(self._timeout))\n\n async def _action_response(self, action: str, _client_source: str = \"unknown\") -> JSONResponse:\n if self._actions is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"{action} handler is not configured\"}, status_code=404)\n callbacks = {\n \"start\": self._actions.start,\n \"stop\": self._actions.stop,\n \"status\": self._actions.status,\n }\n callback = callbacks.get(action)\n if callback is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"unsupported action: {action}\"}, status_code=404)\n action_timeout = max(float(self._timeout), 10.0) if action in {\"start\", \"stop\"} else float(self._timeout)\n try:\n detail = await asyncio.wait_for(callback(), timeout=action_timeout)\n except asyncio.TimeoutError:\n return JSONResponse(\n content={\"status\": \"accepted\", \"detail\": f\"{action} operation is still in progress\"},\n status_code=202,\n )\n except Exception as exc:\n return JSONResponse(content={\"status\": \"error\", \"detail\": str(exc)}, status_code=500)\n return JSONResponse(content={\"status\": \"ok\", \"detail\": detail or f\"{action} action accepted\"}, status_code=200)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_channel.py:HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "class UvicornThreadRunner:\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._host = host\n self._port = port\n self._timeout = timeout\n self._server: Server | None = None\n self._thread: Thread | None = None\n self._error: BaseException | None = None\n\n async def start(self, app: FastAPI) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._error = None\n config = Config(app=app, host=self._host, port=self._port, log_level=\"warning\")\n self._server = Server(config)\n self._thread = Thread(target=self._serve, name=\"plba-http-control\", daemon=True)\n self._thread.start()\n await self._wait_until_started()\n\n async def stop(self) -> None:\n if self._server is None or self._thread is None:\n return\n self._server.should_exit = True\n await asyncio.to_thread(self._thread.join, self._timeout)\n self._server = None\n self._thread = None\n\n @property\n def port(self) -> int:\n if self._server is None or not getattr(self._server, \"servers\", None):\n return self._port\n socket = self._server.servers[0].sockets[0]\n return int(socket.getsockname()[1])\n\n async def _wait_until_started(self) -> None:\n if self._server is None:\n raise RuntimeError(\"Server is not initialized\")\n deadline = asyncio.get_running_loop().time() + max(float(self._timeout), 1.0)\n while not self._server.started:\n if self._error is not None:\n raise RuntimeError(\"HTTP control server failed to start\") from self._error\n if asyncio.get_running_loop().time() >= deadline:\n raise TimeoutError(\"HTTP control server startup timed out\")\n await asyncio.sleep(0.05)\n\n def _serve(self) -> None:\n if self._server is None:\n return\n try:\n asyncio.run(self._server.serve())\n except BaseException as exc: # noqa: BLE001\n self._error = exc", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_runner.py:UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_runner", + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "class HttpControlAppFactory:\n def create(\n self,\n health_provider: Callable[[], Awaitable[HealthPayload]],\n action_provider: Callable[[str, str], Awaitable[JSONResponse]],\n ) -> FastAPI:\n app = FastAPI(title=\"PLBA Control API\")\n\n @app.middleware(\"http\")\n async def log_api_call(request: Request, call_next): # type: ignore[no-untyped-def]\n started = time.monotonic()\n response = await call_next(request)\n response.headers[\"X-Response-Time-Ms\"] = str(int((time.monotonic() - started) * 1000))\n return response\n\n @app.get(\"/health\")\n async def health() -> JSONResponse:\n payload = await health_provider()\n status_code = 200 if payload.get(\"status\") == \"ok\" else 503\n return JSONResponse(content=payload, status_code=status_code)\n\n @app.get(\"/actions/{action}\")\n @app.post(\"/actions/{action}\")\n async def action(action: str, request: Request) -> JSONResponse:\n client_source = self._client_source(request)\n if action in {\"start\", \"stop\"}:\n LOGGER.warning(\"Control action requested: /actions/%s client=%s\", action, client_source)\n return await action_provider(action, client_source)\n\n return app\n\n def _client_source(self, request: Request) -> str:\n explicit_header = request.headers.get(\"X-Client-Source\", \"\").strip()\n if explicit_header:\n return explicit_header\n user_agent = request.headers.get(\"User-Agent\", \"\").strip()\n if user_agent:\n return f\"user-agent:{user_agent}\"\n return \"unknown\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_app.py:HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/health.py", + "content": "class HealthContributor(ABC):\n @abstractmethod\n def health(self) -> WorkerHealth:\n \"\"\"Return contributor health state.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/contracts/health.py:HealthContributor", + "span_start": 7, + "span_end": 10, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.health", + "is_test": false, + "blob_sha": "6bd92611def7131e32d4dd34a8ed85e6cf3c67722ad27797032a632cb30dc097", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlChannel(ABC):\n @abstractmethod\n async def start(self, actions: ControlActionSet) -> None:\n \"\"\"Start the control channel and bind handlers.\"\"\"\n\n @abstractmethod\n async def stop(self) -> None:\n \"\"\"Stop the control channel and release resources.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\"ControlActionSet\", \"ControlChannel\", \"ControlPlaneService\", \"HttpControlChannel\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/__init__.py:1-5", + "span_start": 1, + "span_end": 5, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlActionSet:\n health: HealthHandler\n start: ActionHandler\n stop: ActionHandler\n status: ActionHandler", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "class ControlPlaneService:\n def __init__(self) -> None:\n self._channels: list[ControlChannel] = []\n\n def register_channel(self, channel: ControlChannel) -> None:\n self._channels.append(channel)\n\n def start(self, runtime: RuntimeManager) -> None:\n if not self._channels:\n return\n asyncio.run(self._start_async(runtime))\n\n def stop(self) -> None:\n if not self._channels:\n return\n asyncio.run(self._stop_async())\n\n def snapshot(self, runtime: RuntimeManager) -> dict[str, object]:\n health = runtime.current_health()\n return {\n \"runtime\": {\"state\": runtime._state.value},\n \"modules\": list(runtime.registry.modules),\n \"services\": runtime.services.snapshot(),\n \"workers\": runtime.workers.snapshot(),\n \"health\": runtime.health.snapshot(runtime.workers.healths()) | {\"status\": health[\"status\"]},\n \"config\": runtime.configuration.get(),\n }\n\n async def _start_async(self, runtime: RuntimeManager) -> None:\n actions = ControlActionSet(\n health=runtime.health_status,\n start=runtime.start_runtime,\n stop=runtime.stop_runtime,\n status=runtime.runtime_status,\n )\n for channel in self._channels:\n await channel.start(actions)\n\n async def _stop_async(self) -> None:\n for channel in reversed(self._channels):\n await channel.stop()", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/service.py:ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/health/registry.py", + "content": "HealthRegistry\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (2)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HealthRegistry", + "span_start": 8, + "span_end": 56, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 29, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd3390eb0ba29c9979466b9c2117238e0da3bb829eeb4d505cb34c9c3df7a8e8", + "symbol_name": "HealthRegistry", + "qname": "HealthRegistry", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 2, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "26e6a24daa43407ba5340b74497c20153020e79f8d7828ae502aaec378dfcf75", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/types.py", + "content": "HealthPayload\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "HealthPayload", + "span_start": 7, + "span_end": 11, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "392235d63ddf752d6e419cb8528c93fe070d1bc02d3c87ba6a897baac810cf5d", + "symbol_name": "HealthPayload", + "qname": "HealthPayload", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "448a02e4a432b5ab65b246b2bd24a32a6f127b9d2091ea73b53ee3c0a2f53bb3", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/health.py", + "content": "HealthContributor\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "HealthContributor", + "span_start": 7, + "span_end": 10, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "db91ae387b89a2e9d83829754f27fa18a4055b3e72d7f31789a0b8e0bf5bba0b", + "symbol_name": "HealthContributor", + "qname": "HealthContributor", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "6bd92611def7131e32d4dd34a8ed85e6cf3c67722ad27797032a632cb30dc097", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/health/registry.py", + "content": "HealthRegistry.__init__\n -> HealthRegistry._contributors\n -> HealthRegistry.register", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HealthRegistry.__init__:dataflow_slice", + "span_start": 10, + "span_end": 13, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "2381dfb339d541367c3251d2a610cac9d8b3f6bd6a352e119d00a93c5ccc2b7d", + "edge_type": "dataflow_slice", + "src_symbol_id": "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "src_qname": "HealthRegistry.__init__", + "dst_symbol_id": "a9e1f290c346c8bb1d67af0cafeebb5bcaf29c3ed7027e33c794532743df38f2", + "dst_ref": "HealthRegistry.register", + "resolution": "resolved", + "slice_id": "2381dfb339d541367c3251d2a610cac9d8b3f6bd6a352e119d00a93c5ccc2b7d", + "root_symbol_id": "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "path_symbols": [ + "HealthRegistry.__init__", + "HealthRegistry._contributors", + "HealthRegistry.register" + ], + "path_symbol_ids": [ + "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "a9e1f290c346c8bb1d67af0cafeebb5bcaf29c3ed7027e33c794532743df38f2" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "26e6a24daa43407ba5340b74497c20153020e79f8d7828ae502aaec378dfcf75", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/health/registry.py", + "content": "HealthRegistry.__init__\n -> HealthRegistry._contributors\n -> HealthRegistry.contributor_healths", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HealthRegistry.__init__:dataflow_slice", + "span_start": 10, + "span_end": 16, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d3a88a7abf16359e903e809ffc24473658fdd8198f60641fe1584fc4ac663c31", + "edge_type": "dataflow_slice", + "src_symbol_id": "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "src_qname": "HealthRegistry.__init__", + "dst_symbol_id": "fa7bbd8f4b64a55a5088640c30f52e84075d65f531bd7e1f6c1d7bb8d24fcbf2", + "dst_ref": "HealthRegistry.contributor_healths", + "resolution": "resolved", + "slice_id": "d3a88a7abf16359e903e809ffc24473658fdd8198f60641fe1584fc4ac663c31", + "root_symbol_id": "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "path_symbols": [ + "HealthRegistry.__init__", + "HealthRegistry._contributors", + "HealthRegistry.contributor_healths" + ], + "path_symbol_ids": [ + "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "fa7bbd8f4b64a55a5088640c30f52e84075d65f531bd7e1f6c1d7bb8d24fcbf2" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "26e6a24daa43407ba5340b74497c20153020e79f8d7828ae502aaec378dfcf75", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory.create calls time.monotonic", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlAppFactory.create:calls", + "span_start": 25, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3fdd0a88d10225ee74f3b84ab57e13f09f5ccc72f00e31af9ae4655411c289c0", + "edge_type": "calls", + "src_symbol_id": "4af42c2a9275d652e710a98ec48b8247236b4453a093629f8958704ff6d3cb58", + "src_qname": "HttpControlAppFactory.create", + "dst_symbol_id": null, + "dst_ref": "time.monotonic", + "resolution": "partial", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory.create calls app.post", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlAppFactory.create:calls", + "span_start": 37, + "span_end": 37, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "0e545d4b5187db7bec5ceac03071d2ad68177550c42af748fee364639e533c90", + "edge_type": "calls", + "src_symbol_id": "4af42c2a9275d652e710a98ec48b8247236b4453a093629f8958704ff6d3cb58", + "src_qname": "HttpControlAppFactory.create", + "dst_symbol_id": null, + "dst_ref": "app.post", + "resolution": "partial", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory.create calls str", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlAppFactory.create:calls", + "span_start": 27, + "span_end": 27, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "2a87c51461e31cd556508cc37fdff37b4d24c26f7f1604db30af5e8f1bda96cb", + "edge_type": "calls", + "src_symbol_id": "4af42c2a9275d652e710a98ec48b8247236b4453a093629f8958704ff6d3cb58", + "src_qname": "HttpControlAppFactory.create", + "dst_symbol_id": null, + "dst_ref": "str", + "resolution": "partial", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "validation": { + "passed": true, + "action": "return", + "reasons": [] + } + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-health-endpoint.md b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-health-endpoint.md new file mode 100644 index 0000000..98f8b3d --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-health-endpoint.md @@ -0,0 +1,35 @@ +# plba-v2-trace-flow-health-endpoint + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: agent_runtime +- mode: full_chain +- passed: True + +## Query +Покажи как проходит запрос /health в HttpControlAppFactory + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "TRACE_FLOW", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 37, + "llm_answer": "Поток выполнения запроса `/health` через `HttpControlAppFactory` выглядит следующим образом:\n\n1. Запрос приходит на сервер и обрабатывается фабрикой приложений `HttpControlAppFactory`.\n2. Внутри фабрики создается экземпляр приложения FastAPI с middleware для логирования времени обработки запросов.\n3. Для маршрута `/health` определяется обработчик, который вызывает предоставленный провайдер здоровья (`health_provider`), ожидающий асинхронный результат типа `HealthPayload`.\n4. В результате выполнения провайдера формируется JSON-ответ с кодом статуса 200 при успешном состоянии (\"ok\"), иначе возвращается статус 503.\n\nТаким образом, ключевой точкой является вызов провайдера здоровья внутри фабрики приложений, от которого зависит итоговый результат ответа.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "health", + "HttpControlAppFactory" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-runtime-start.json b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-runtime-start.json new file mode 100644 index 0000000..d03e20f --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-runtime-start.json @@ -0,0 +1,4868 @@ +{ + "case_id": "plba-v2-trace-flow-runtime-start", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "agent_runtime", + "mode": "full_chain", + "query": "Покажи поток выполнения при запуске RuntimeManager", + "actual": { + "intent": "CODE_QA", + "sub_intent": "TRACE_FLOW", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 37, + "llm_answer": "При запуске `RuntimeManager` выполняются следующие основные шаги:\n\n1. Инициализация через `RuntimeManager.__init__` в файле `src/app_runtime/core/runtime.py`.\n2. Вызов метода `start` внутри `RuntimeManager`, который далее вызывает асинхронную функцию `_start_async`.\n3. В `ControlPlaneService.start` создается экземпляр канала управления с помощью метода `register_channel`.\n4. Канал управления инициализируется через метод `start` экземпляра `ControlChannel`, где создается веб-приложение с использованием фабрики `HttpControlAppFactory`.\n5. Веб-приложение запускается с помощью `UvicornThreadRunner.start`, который выполняет запуск сервера через uvicorn.\n\nТаким образом, поток начинается с инициализации менеджера времени выполнения и завершается запуском веб-канала управления.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "query": "Покажи поток выполнения при запуске RuntimeManager", + "router_result": { + "schema_version": "1.1", + "intent": "CODE_QA", + "retrieval_profile": "code", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query_plan": { + "raw": "Покажи поток выполнения при запуске RuntimeManager", + "normalized": "Покажи поток выполнения при запуске RuntimeManager", + "sub_intent": "TRACE_FLOW", + "negations": [], + "expansions": [ + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "doc_scope_hints": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "symbol_kind_hint": "class", + "anchors": [ + { + "type": "SYMBOL", + "value": "RuntimeManager", + "source": "user_text", + "subtype": null, + "span": { + "start": 36, + "end": 50 + }, + "confidence": 0.88 + } + ] + }, + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "top_k": 8 + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 8 + }, + { + "layer_id": "C4_SEMANTIC_ROLES", + "top_k": 8 + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "top_k": 10 + }, + { + "layer_id": "C3_ENTRYPOINTS", + "top_k": 10 + } + ], + "filters": { + "test_policy": "EXCLUDE", + "path_scope": [], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + }, + "symbol_resolution": { + "status": "pending", + "resolved_symbol": null, + "alternatives": [ + "RuntimeManager" + ], + "confidence": 0.0 + }, + "evidence_policy": { + "require_def": true, + "require_flow": true, + "require_spec": false, + "allow_answer_without_evidence": false + } + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Покажи поток выполнения при запуске RuntimeManager", + "sub_intent": "TRACE_FLOW", + "path_scope": [], + "keyword_hints": [ + "RuntimeManager" + ], + "symbol_candidates": [ + "RuntimeManager" + ], + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "top_k": 8 + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 8 + }, + { + "layer_id": "C4_SEMANTIC_ROLES", + "top_k": 8 + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "top_k": 10 + }, + { + "layer_id": "C3_ENTRYPOINTS", + "top_k": 10 + } + ], + "filters": { + "test_policy": "EXCLUDE", + "path_scope": [], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + }, + "query_plan": { + "raw": "Покажи поток выполнения при запуске RuntimeManager", + "normalized": "Покажи поток выполнения при запуске RuntimeManager", + "sub_intent": "TRACE_FLOW", + "negations": [], + "expansions": [ + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "doc_scope_hints": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "symbol_kind_hint": "class", + "anchors": [ + { + "type": "SYMBOL", + "value": "RuntimeManager", + "source": "user_text", + "subtype": null, + "span": { + "start": 36, + "end": 50 + }, + "confidence": 0.88 + } + ] + } + }, + "retrieval_result": { + "target_symbol_candidates": [ + "RuntimeManager", + "ControlPlaneService", + "ControlChannel.start", + "ControlChannel.stop" + ], + "resolved_symbol": "RuntimeManager", + "symbol_resolution_status": "resolved", + "file_candidates": [ + "src/plba/bootstrap.py", + "src/app_runtime/control/service.py", + "src/app_runtime/core/runtime.py", + "src/plba/__init__.py", + "src/plba/core.py", + "src/app_runtime/control/__init__.py", + "src/app_runtime/control/base.py", + "src/app_runtime/control/http_runner.py", + "src/app_runtime/control/http_app.py", + "src/app_runtime/control/http_channel.py", + "src/plba/control.py", + "src/app_runtime/workflow/persistence/workflow_persistence.py" + ], + "code_chunks": [ + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/plba/bootstrap.py", + "title": "RuntimeManager", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "start_line": 4, + "end_line": 4, + "metadata": { + "symbol_id": "27158ca220022eeb5083c6addf8a50775d45f7161284fd60aac48410105f4b98", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/service.py", + "title": "RuntimeManager", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "start_line": 9, + "end_line": 9, + "metadata": { + "symbol_id": "62a9575c77aad894120d18b4f2a08cf2ba42f77e9be4a8a432b767d157701afe", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/core/runtime.py", + "title": "RuntimeManager", + "content": "class RuntimeManager\nRuntimeManager", + "start_line": 18, + "end_line": 179, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "qname": "RuntimeManager", + "kind": "class", + "signature": "RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/plba/__init__.py", + "title": "RuntimeManager", + "content": "const RuntimeManager\nRuntimeManager = plba.core.RuntimeManager", + "start_line": 16, + "end_line": 16, + "metadata": { + "symbol_id": "7eacec84f9b8d6c4201374591faecdac7493091c263681495c338973f2971ad9", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = plba.core.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/plba/core.py", + "title": "RuntimeManager", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "start_line": 2, + "end_line": 2, + "metadata": { + "symbol_id": "e1684562d978b7af7fe9b27dc5869d770348a87b5dc19a50360f58544668578b", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.core", + "is_test": false, + "blob_sha": "c0ae25110d20e665216616e26b68adfe035b624ba45d31d1272fb21f906f9ca8", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/__init__.py", + "title": "ControlPlaneService", + "content": "const ControlPlaneService\nControlPlaneService = app_runtime.control.service.ControlPlaneService", + "start_line": 3, + "end_line": 3, + "metadata": { + "symbol_id": "217e8f044d1c01644bf7b81e5046af9e84469210c692a2fb0c476a19bb069ae1", + "qname": "ControlPlaneService", + "kind": "const", + "signature": "ControlPlaneService = app_runtime.control.service.ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/base.py", + "title": "ControlChannel.start", + "content": "method ControlChannel.start\nstart(self, actions)\nStart the control channel and bind handlers.", + "start_line": 23, + "end_line": 24, + "metadata": { + "symbol_id": "e01e0d50d0f48d0c84c119c989b7a7c57ceea263811ce2605c684ae24d1a03b1", + "qname": "ControlChannel.start", + "kind": "method", + "signature": "start(self, actions)", + "parent_symbol_id": "ControlChannel", + "package_or_module": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/base.py", + "title": "ControlChannel.stop", + "content": "method ControlChannel.stop\nstop(self)\nStop the control channel and release resources.", + "start_line": 27, + "end_line": 28, + "metadata": { + "symbol_id": "54b5adf9866c526836221dc721b474ba23fbec83e1b1d3b8bc4da67ae3c1541d", + "qname": "ControlChannel.stop", + "kind": "method", + "signature": "stop(self)", + "parent_symbol_id": "ControlChannel", + "package_or_module": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/service.py", + "title": "src/app_runtime/control/service.py:ControlPlaneService", + "content": "class ControlPlaneService:\n def __init__(self) -> None:\n self._channels: list[ControlChannel] = []\n\n def register_channel(self, channel: ControlChannel) -> None:\n self._channels.append(channel)\n\n def start(self, runtime: RuntimeManager) -> None:\n if not self._channels:\n return\n asyncio.run(self._start_async(runtime))\n\n def stop(self) -> None:\n if not self._channels:\n return\n asyncio.run(self._stop_async())\n\n def snapshot(self, runtime: RuntimeManager) -> dict[str, object]:\n health = runtime.current_health()\n return {\n \"runtime\": {\"state\": runtime._state.value},\n \"modules\": list(runtime.registry.modules),\n \"services\": runtime.services.snapshot(),\n \"workers\": runtime.workers.snapshot(),\n \"health\": runtime.health.snapshot(runtime.workers.healths()) | {\"status\": health[\"status\"]},\n \"config\": runtime.configuration.get(),\n }\n\n async def _start_async(self, runtime: RuntimeManager) -> None:\n actions = ControlActionSet(\n health=runtime.health_status,\n start=runtime.start_runtime,\n stop=runtime.stop_runtime,\n status=runtime.runtime_status,\n )\n for channel in self._channels:\n await channel.start(actions)\n\n async def _stop_async(self) -> None:\n for channel in reversed(self._channels):\n await channel.stop()", + "start_line": 12, + "end_line": 52, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/http_runner.py", + "title": "src/app_runtime/control/http_runner.py:UvicornThreadRunner", + "content": "class UvicornThreadRunner:\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._host = host\n self._port = port\n self._timeout = timeout\n self._server: Server | None = None\n self._thread: Thread | None = None\n self._error: BaseException | None = None\n\n async def start(self, app: FastAPI) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._error = None\n config = Config(app=app, host=self._host, port=self._port, log_level=\"warning\")\n self._server = Server(config)\n self._thread = Thread(target=self._serve, name=\"plba-http-control\", daemon=True)\n self._thread.start()\n await self._wait_until_started()\n\n async def stop(self) -> None:\n if self._server is None or self._thread is None:\n return\n self._server.should_exit = True\n await asyncio.to_thread(self._thread.join, self._timeout)\n self._server = None\n self._thread = None\n\n @property\n def port(self) -> int:\n if self._server is None or not getattr(self._server, \"servers\", None):\n return self._port\n socket = self._server.servers[0].sockets[0]\n return int(socket.getsockname()[1])\n\n async def _wait_until_started(self) -> None:\n if self._server is None:\n raise RuntimeError(\"Server is not initialized\")\n deadline = asyncio.get_running_loop().time() + max(float(self._timeout), 1.0)\n while not self._server.started:\n if self._error is not None:\n raise RuntimeError(\"HTTP control server failed to start\") from self._error\n if asyncio.get_running_loop().time() >= deadline:\n raise TimeoutError(\"HTTP control server startup timed out\")\n await asyncio.sleep(0.05)\n\n def _serve(self) -> None:\n if self._server is None:\n return\n try:\n asyncio.run(self._server.serve())\n except BaseException as exc: # noqa: BLE001\n self._error = exc", + "start_line": 10, + "end_line": 61, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_runner", + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/base.py", + "title": "src/app_runtime/control/base.py:ControlChannel", + "content": "class ControlChannel(ABC):\n @abstractmethod\n async def start(self, actions: ControlActionSet) -> None:\n \"\"\"Start the control channel and bind handlers.\"\"\"\n\n @abstractmethod\n async def stop(self) -> None:\n \"\"\"Stop the control channel and release resources.\"\"\"", + "start_line": 21, + "end_line": 28, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/__init__.py", + "title": "src/app_runtime/control/__init__.py:1-5", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\"ControlActionSet\", \"ControlChannel\", \"ControlPlaneService\", \"HttpControlChannel\"]", + "start_line": 1, + "end_line": 5, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/http_app.py", + "title": "src/app_runtime/control/http_app.py:HttpControlAppFactory", + "content": "class HttpControlAppFactory:\n def create(\n self,\n health_provider: Callable[[], Awaitable[HealthPayload]],\n action_provider: Callable[[str, str], Awaitable[JSONResponse]],\n ) -> FastAPI:\n app = FastAPI(title=\"PLBA Control API\")\n\n @app.middleware(\"http\")\n async def log_api_call(request: Request, call_next): # type: ignore[no-untyped-def]\n started = time.monotonic()\n response = await call_next(request)\n response.headers[\"X-Response-Time-Ms\"] = str(int((time.monotonic() - started) * 1000))\n return response\n\n @app.get(\"/health\")\n async def health() -> JSONResponse:\n payload = await health_provider()\n status_code = 200 if payload.get(\"status\") == \"ok\" else 503\n return JSONResponse(content=payload, status_code=status_code)\n\n @app.get(\"/actions/{action}\")\n @app.post(\"/actions/{action}\")\n async def action(action: str, request: Request) -> JSONResponse:\n client_source = self._client_source(request)\n if action in {\"start\", \"stop\"}:\n LOGGER.warning(\"Control action requested: /actions/%s client=%s\", action, client_source)\n return await action_provider(action, client_source)\n\n return app\n\n def _client_source(self, request: Request) -> str:\n explicit_header = request.headers.get(\"X-Client-Source\", \"\").strip()\n if explicit_header:\n return explicit_header\n user_agent = request.headers.get(\"User-Agent\", \"\").strip()\n if user_agent:\n return f\"user-agent:{user_agent}\"\n return \"unknown\"", + "start_line": 15, + "end_line": 53, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/http_channel.py", + "title": "src/app_runtime/control/http_channel.py:HttpControlChannel", + "content": "class HttpControlChannel(ControlChannel):\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._timeout = timeout\n self._runner = UvicornThreadRunner(host, port, timeout)\n self._factory = HttpControlAppFactory()\n self._actions: ControlActionSet | None = None\n\n async def start(self, actions: ControlActionSet) -> None:\n self._actions = actions\n app = self._factory.create(self._health_response, self._action_response)\n await self._runner.start(app)\n\n async def stop(self) -> None:\n await self._runner.stop()\n\n @property\n def port(self) -> int:\n return self._runner.port\n\n async def _health_response(self) -> dict[str, object]:\n if self._actions is None:\n return {\"status\": \"unhealthy\", \"detail\": \"control actions are not configured\"}\n return await asyncio.wait_for(self._actions.health(), timeout=float(self._timeout))\n\n async def _action_response(self, action: str, _client_source: str = \"unknown\") -> JSONResponse:\n if self._actions is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"{action} handler is not configured\"}, status_code=404)\n callbacks = {\n \"start\": self._actions.start,\n \"stop\": self._actions.stop,\n \"status\": self._actions.status,\n }\n callback = callbacks.get(action)\n if callback is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"unsupported action: {action}\"}, status_code=404)\n action_timeout = max(float(self._timeout), 10.0) if action in {\"start\", \"stop\"} else float(self._timeout)\n try:\n detail = await asyncio.wait_for(callback(), timeout=action_timeout)\n except asyncio.TimeoutError:\n return JSONResponse(\n content={\"status\": \"accepted\", \"detail\": f\"{action} operation is still in progress\"},\n status_code=202,\n )\n except Exception as exc:\n return JSONResponse(content={\"status\": \"error\", \"detail\": str(exc)}, status_code=500)\n return JSONResponse(content={\"status\": \"ok\", \"detail\": detail or f\"{action} action accepted\"}, status_code=200)", + "start_line": 12, + "end_line": 57, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/base.py", + "title": "src/app_runtime/control/base.py:ControlActionSet", + "content": "class ControlActionSet:\n health: HealthHandler\n start: ActionHandler\n stop: ActionHandler\n status: ActionHandler", + "start_line": 14, + "end_line": 18, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/plba/control.py", + "title": "src/plba/control.py:1-10", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\n \"ControlActionSet\",\n \"ControlChannel\",\n \"ControlPlaneService\",\n \"HttpControlChannel\",\n]", + "start_line": 1, + "end_line": 10, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.control", + "is_test": false, + "blob_sha": "31bd5c4481bfa7fbca8fae56d4860a67e3953ca74474ac8439e1f39b685d7bc8", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/core/runtime.py", + "title": "RuntimeManager", + "content": "RuntimeManager\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests manager\n- orchestrates role-like calls (4)\n- reads and writes state attributes\n- participates in dataflow slices (50)", + "start_line": 18, + "end_line": 179, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "symbol_name": "RuntimeManager", + "qname": "RuntimeManager", + "role": "pipeline_stage", + "confidence": 0.67, + "dataflow_participation": 50, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/base.py", + "title": "ControlChannel", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "start_line": 21, + "end_line": 28, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/base.py", + "title": "ControlActionSet", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "start_line": 14, + "end_line": 18, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "start_line": 12, + "end_line": 52, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/http_runner.py", + "title": "UvicornThreadRunner", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "start_line": 10, + "end_line": 61, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/http_channel.py", + "title": "HttpControlChannel", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "start_line": 12, + "end_line": 57, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/http_app.py", + "title": "HttpControlAppFactory", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "start_line": 15, + "end_line": 53, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "title": "WorkflowPersistence", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "start_line": 8, + "end_line": 54, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/core/runtime.py", + "title": "RuntimeManager.__init__:dataflow_slice", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file", + "start_line": 32, + "end_line": 52, + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/core/runtime.py", + "title": "RuntimeManager.__init__:dataflow_slice", + "content": "RuntimeManager.__init__\n -> RuntimeManager.services\n -> RuntimeManager.__init__", + "start_line": 33, + "end_line": 39, + "metadata": { + "edge_id": "d43af85989222ee6d788ce418cdcb217c7ff044cfb915e3bdbd184417dc7bd61", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "dst_ref": "RuntimeManager.__init__", + "resolution": "resolved", + "slice_id": "d43af85989222ee6d788ce418cdcb217c7ff044cfb915e3bdbd184417dc7bd61", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.services", + "RuntimeManager.__init__" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "start_line": 14, + "end_line": 25, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "start_line": 14, + "end_line": 51, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/core/runtime.py", + "title": "RuntimeManager.__init__:dataflow_slice", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.start", + "start_line": 32, + "end_line": 59, + "metadata": { + "edge_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1", + "dst_ref": "RuntimeManager.start", + "resolution": "resolved", + "slice_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.start" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/core/runtime.py", + "title": "RuntimeManager.__init__:dataflow_slice", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager._register_core_services", + "start_line": 32, + "end_line": 127, + "metadata": { + "edge_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6", + "dst_ref": "RuntimeManager._register_core_services", + "resolution": "resolved", + "slice_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager._register_core_services" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "start_line": 14, + "end_line": 17, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "start_line": 14, + "end_line": 20, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "start_line": 14, + "end_line": 47, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/core/runtime.py", + "title": "RuntimeManager.__init__:dataflow_slice", + "content": "RuntimeManager.__init__\n -> RuntimeManager.services\n -> RuntimeManager._register_core_services", + "start_line": 33, + "end_line": 127, + "metadata": { + "edge_id": "aac6f9dda73963b977083a892bee39a48eca4fbd7404787e022ecf4ebedec65d", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6", + "dst_ref": "RuntimeManager._register_core_services", + "resolution": "resolved", + "slice_id": "aac6f9dda73963b977083a892bee39a48eca4fbd7404787e022ecf4ebedec65d", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.services", + "RuntimeManager._register_core_services" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C3_ENTRYPOINTS", + "path": "src/app_runtime/control/http_app.py", + "title": "app.post", + "content": "fastapi http app.post", + "start_line": 38, + "end_line": 42, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C3_ENTRYPOINTS", + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "content": "fastapi http app.get", + "start_line": 31, + "end_line": 34, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C3_ENTRYPOINTS", + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "content": "fastapi http app.get", + "start_line": 38, + "end_line": 42, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "relations": [ + { + "path": "src/app_runtime/core/runtime.py", + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file" + }, + { + "path": "src/app_runtime/core/runtime.py", + "metadata": { + "edge_id": "d43af85989222ee6d788ce418cdcb217c7ff044cfb915e3bdbd184417dc7bd61", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "dst_ref": "RuntimeManager.__init__", + "resolution": "resolved", + "slice_id": "d43af85989222ee6d788ce418cdcb217c7ff044cfb915e3bdbd184417dc7bd61", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.services", + "RuntimeManager.__init__" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "RuntimeManager.__init__\n -> RuntimeManager.services\n -> RuntimeManager.__init__" + }, + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop" + }, + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async" + }, + { + "path": "src/app_runtime/core/runtime.py", + "metadata": { + "edge_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1", + "dst_ref": "RuntimeManager.start", + "resolution": "resolved", + "slice_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.start" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.start" + }, + { + "path": "src/app_runtime/core/runtime.py", + "metadata": { + "edge_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6", + "dst_ref": "RuntimeManager._register_core_services", + "resolution": "resolved", + "slice_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager._register_core_services" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager._register_core_services" + }, + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel" + }, + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start" + }, + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async" + }, + { + "path": "src/app_runtime/core/runtime.py", + "metadata": { + "edge_id": "aac6f9dda73963b977083a892bee39a48eca4fbd7404787e022ecf4ebedec65d", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6", + "dst_ref": "RuntimeManager._register_core_services", + "resolution": "resolved", + "slice_id": "aac6f9dda73963b977083a892bee39a48eca4fbd7404787e022ecf4ebedec65d", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.services", + "RuntimeManager._register_core_services" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "RuntimeManager.__init__\n -> RuntimeManager.services\n -> RuntimeManager._register_core_services" + } + ], + "entrypoints": [ + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.post", + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "test_candidates": [], + "layer_outcomes": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C4_SEMANTIC_ROLES", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 10, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C3_ENTRYPOINTS", + "hit_count": 3, + "empty": false, + "fallback_used": false + } + ], + "missing_layers": [], + "raw_rows": [ + { + "path": "src/plba/bootstrap.py", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 4, + "span_end": 4, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "27158ca220022eeb5083c6addf8a50775d45f7161284fd60aac48410105f4b98", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 9, + "span_end": 9, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "62a9575c77aad894120d18b4f2a08cf2ba42f77e9be4a8a432b767d157701afe", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager\nRuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "qname": "RuntimeManager", + "kind": "class", + "signature": "RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/__init__.py", + "content": "const RuntimeManager\nRuntimeManager = plba.core.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 16, + "span_end": 16, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "7eacec84f9b8d6c4201374591faecdac7493091c263681495c338973f2971ad9", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = plba.core.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/core.py", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 2, + "span_end": 2, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "e1684562d978b7af7fe9b27dc5869d770348a87b5dc19a50360f58544668578b", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.core", + "is_test": false, + "blob_sha": "c0ae25110d20e665216616e26b68adfe035b624ba45d31d1272fb21f906f9ca8", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "const ControlPlaneService\nControlPlaneService = app_runtime.control.service.ControlPlaneService", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlPlaneService", + "span_start": 3, + "span_end": 3, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "217e8f044d1c01644bf7b81e5046af9e84469210c692a2fb0c476a19bb069ae1", + "qname": "ControlPlaneService", + "kind": "const", + "signature": "ControlPlaneService = app_runtime.control.service.ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "method ControlChannel.start\nstart(self, actions)\nStart the control channel and bind handlers.", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlChannel.start", + "span_start": 23, + "span_end": 24, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "e01e0d50d0f48d0c84c119c989b7a7c57ceea263811ce2605c684ae24d1a03b1", + "qname": "ControlChannel.start", + "kind": "method", + "signature": "start(self, actions)", + "parent_symbol_id": "ControlChannel", + "package_or_module": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "method ControlChannel.stop\nstop(self)\nStop the control channel and release resources.", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlChannel.stop", + "span_start": 27, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "54b5adf9866c526836221dc721b474ba23fbec83e1b1d3b8bc4da67ae3c1541d", + "qname": "ControlChannel.stop", + "kind": "method", + "signature": "stop(self)", + "parent_symbol_id": "ControlChannel", + "package_or_module": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "class ControlPlaneService:\n def __init__(self) -> None:\n self._channels: list[ControlChannel] = []\n\n def register_channel(self, channel: ControlChannel) -> None:\n self._channels.append(channel)\n\n def start(self, runtime: RuntimeManager) -> None:\n if not self._channels:\n return\n asyncio.run(self._start_async(runtime))\n\n def stop(self) -> None:\n if not self._channels:\n return\n asyncio.run(self._stop_async())\n\n def snapshot(self, runtime: RuntimeManager) -> dict[str, object]:\n health = runtime.current_health()\n return {\n \"runtime\": {\"state\": runtime._state.value},\n \"modules\": list(runtime.registry.modules),\n \"services\": runtime.services.snapshot(),\n \"workers\": runtime.workers.snapshot(),\n \"health\": runtime.health.snapshot(runtime.workers.healths()) | {\"status\": health[\"status\"]},\n \"config\": runtime.configuration.get(),\n }\n\n async def _start_async(self, runtime: RuntimeManager) -> None:\n actions = ControlActionSet(\n health=runtime.health_status,\n start=runtime.start_runtime,\n stop=runtime.stop_runtime,\n status=runtime.runtime_status,\n )\n for channel in self._channels:\n await channel.start(actions)\n\n async def _stop_async(self) -> None:\n for channel in reversed(self._channels):\n await channel.stop()", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/service.py:ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "class UvicornThreadRunner:\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._host = host\n self._port = port\n self._timeout = timeout\n self._server: Server | None = None\n self._thread: Thread | None = None\n self._error: BaseException | None = None\n\n async def start(self, app: FastAPI) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._error = None\n config = Config(app=app, host=self._host, port=self._port, log_level=\"warning\")\n self._server = Server(config)\n self._thread = Thread(target=self._serve, name=\"plba-http-control\", daemon=True)\n self._thread.start()\n await self._wait_until_started()\n\n async def stop(self) -> None:\n if self._server is None or self._thread is None:\n return\n self._server.should_exit = True\n await asyncio.to_thread(self._thread.join, self._timeout)\n self._server = None\n self._thread = None\n\n @property\n def port(self) -> int:\n if self._server is None or not getattr(self._server, \"servers\", None):\n return self._port\n socket = self._server.servers[0].sockets[0]\n return int(socket.getsockname()[1])\n\n async def _wait_until_started(self) -> None:\n if self._server is None:\n raise RuntimeError(\"Server is not initialized\")\n deadline = asyncio.get_running_loop().time() + max(float(self._timeout), 1.0)\n while not self._server.started:\n if self._error is not None:\n raise RuntimeError(\"HTTP control server failed to start\") from self._error\n if asyncio.get_running_loop().time() >= deadline:\n raise TimeoutError(\"HTTP control server startup timed out\")\n await asyncio.sleep(0.05)\n\n def _serve(self) -> None:\n if self._server is None:\n return\n try:\n asyncio.run(self._server.serve())\n except BaseException as exc: # noqa: BLE001\n self._error = exc", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_runner.py:UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_runner", + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlChannel(ABC):\n @abstractmethod\n async def start(self, actions: ControlActionSet) -> None:\n \"\"\"Start the control channel and bind handlers.\"\"\"\n\n @abstractmethod\n async def stop(self) -> None:\n \"\"\"Stop the control channel and release resources.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\"ControlActionSet\", \"ControlChannel\", \"ControlPlaneService\", \"HttpControlChannel\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/__init__.py:1-5", + "span_start": 1, + "span_end": 5, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "class HttpControlAppFactory:\n def create(\n self,\n health_provider: Callable[[], Awaitable[HealthPayload]],\n action_provider: Callable[[str, str], Awaitable[JSONResponse]],\n ) -> FastAPI:\n app = FastAPI(title=\"PLBA Control API\")\n\n @app.middleware(\"http\")\n async def log_api_call(request: Request, call_next): # type: ignore[no-untyped-def]\n started = time.monotonic()\n response = await call_next(request)\n response.headers[\"X-Response-Time-Ms\"] = str(int((time.monotonic() - started) * 1000))\n return response\n\n @app.get(\"/health\")\n async def health() -> JSONResponse:\n payload = await health_provider()\n status_code = 200 if payload.get(\"status\") == \"ok\" else 503\n return JSONResponse(content=payload, status_code=status_code)\n\n @app.get(\"/actions/{action}\")\n @app.post(\"/actions/{action}\")\n async def action(action: str, request: Request) -> JSONResponse:\n client_source = self._client_source(request)\n if action in {\"start\", \"stop\"}:\n LOGGER.warning(\"Control action requested: /actions/%s client=%s\", action, client_source)\n return await action_provider(action, client_source)\n\n return app\n\n def _client_source(self, request: Request) -> str:\n explicit_header = request.headers.get(\"X-Client-Source\", \"\").strip()\n if explicit_header:\n return explicit_header\n user_agent = request.headers.get(\"User-Agent\", \"\").strip()\n if user_agent:\n return f\"user-agent:{user_agent}\"\n return \"unknown\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_app.py:HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel(ControlChannel):\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._timeout = timeout\n self._runner = UvicornThreadRunner(host, port, timeout)\n self._factory = HttpControlAppFactory()\n self._actions: ControlActionSet | None = None\n\n async def start(self, actions: ControlActionSet) -> None:\n self._actions = actions\n app = self._factory.create(self._health_response, self._action_response)\n await self._runner.start(app)\n\n async def stop(self) -> None:\n await self._runner.stop()\n\n @property\n def port(self) -> int:\n return self._runner.port\n\n async def _health_response(self) -> dict[str, object]:\n if self._actions is None:\n return {\"status\": \"unhealthy\", \"detail\": \"control actions are not configured\"}\n return await asyncio.wait_for(self._actions.health(), timeout=float(self._timeout))\n\n async def _action_response(self, action: str, _client_source: str = \"unknown\") -> JSONResponse:\n if self._actions is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"{action} handler is not configured\"}, status_code=404)\n callbacks = {\n \"start\": self._actions.start,\n \"stop\": self._actions.stop,\n \"status\": self._actions.status,\n }\n callback = callbacks.get(action)\n if callback is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"unsupported action: {action}\"}, status_code=404)\n action_timeout = max(float(self._timeout), 10.0) if action in {\"start\", \"stop\"} else float(self._timeout)\n try:\n detail = await asyncio.wait_for(callback(), timeout=action_timeout)\n except asyncio.TimeoutError:\n return JSONResponse(\n content={\"status\": \"accepted\", \"detail\": f\"{action} operation is still in progress\"},\n status_code=202,\n )\n except Exception as exc:\n return JSONResponse(content={\"status\": \"error\", \"detail\": str(exc)}, status_code=500)\n return JSONResponse(content={\"status\": \"ok\", \"detail\": detail or f\"{action} action accepted\"}, status_code=200)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_channel.py:HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlActionSet:\n health: HealthHandler\n start: ActionHandler\n stop: ActionHandler\n status: ActionHandler", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/control.py", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\n \"ControlActionSet\",\n \"ControlChannel\",\n \"ControlPlaneService\",\n \"HttpControlChannel\",\n]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/control.py:1-10", + "span_start": 1, + "span_end": 10, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.control", + "is_test": false, + "blob_sha": "31bd5c4481bfa7fbca8fae56d4860a67e3953ca74474ac8439e1f39b685d7bc8", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests manager\n- orchestrates role-like calls (4)\n- reads and writes state attributes\n- participates in dataflow slices (50)", + "layer": "C4_SEMANTIC_ROLES", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 43, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "symbol_name": "RuntimeManager", + "qname": "RuntimeManager", + "role": "pipeline_stage", + "confidence": 0.67, + "dataflow_participation": 50, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 52, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.services\n -> RuntimeManager.__init__", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 33, + "span_end": 39, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "d43af85989222ee6d788ce418cdcb217c7ff044cfb915e3bdbd184417dc7bd61", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "dst_ref": "RuntimeManager.__init__", + "resolution": "resolved", + "slice_id": "d43af85989222ee6d788ce418cdcb217c7ff044cfb915e3bdbd184417dc7bd61", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.services", + "RuntimeManager.__init__" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 59, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1", + "dst_ref": "RuntimeManager.start", + "resolution": "resolved", + "slice_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.start" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager._register_core_services", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 127, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6", + "dst_ref": "RuntimeManager._register_core_services", + "resolution": "resolved", + "slice_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager._register_core_services" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.services\n -> RuntimeManager._register_core_services", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 33, + "span_end": 127, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "aac6f9dda73963b977083a892bee39a48eca4fbd7404787e022ecf4ebedec65d", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6", + "dst_ref": "RuntimeManager._register_core_services", + "resolution": "resolved", + "slice_id": "aac6f9dda73963b977083a892bee39a48eca4fbd7404787e022ecf4ebedec65d", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.services", + "RuntimeManager._register_core_services" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": null, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": null, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": null, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "retrieval_report": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "vector", + "C0_SOURCE_CHUNKS": "vector", + "C4_SEMANTIC_ROLES": "vector", + "C2_DEPENDENCY_GRAPH": "vector", + "C3_ENTRYPOINTS": "vector" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 10, + "C3_ENTRYPOINTS": 10 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [] + } + }, + "fallback": { + "used": false, + "reason": null + }, + "retrieval_by_layer_ms": { + "C1_SYMBOL_CATALOG": 37, + "C0_SOURCE_CHUNKS": 16, + "C4_SEMANTIC_ROLES": 13, + "C2_DEPENDENCY_GRAPH": 54, + "C3_ENTRYPOINTS": 9 + } + } + }, + "diagnostics": { + "intent_correct": null, + "target_found": true, + "layers_used": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_sufficient": true, + "answer_mode": "normal", + "router_result": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "TRACE_FLOW", + "path_scope": [], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_resolution_status": "pending" + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Покажи поток выполнения при запуске RuntimeManager", + "sub_intent": "TRACE_FLOW", + "path_scope": [], + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C4_SEMANTIC_ROLES", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 10, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C3_ENTRYPOINTS", + "hit_count": 3, + "empty": false, + "fallback_used": false + } + ], + "empty_layers": [], + "evidence_gate_decision": { + "sufficient": true, + "failure_reasons": [], + "evidence_count": 37 + }, + "failure_reasons": [], + "timings_ms": {} + }, + "rag_rows": [ + { + "path": "src/plba/bootstrap.py", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 4, + "span_end": 4, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "27158ca220022eeb5083c6addf8a50775d45f7161284fd60aac48410105f4b98", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 9, + "span_end": 9, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "62a9575c77aad894120d18b4f2a08cf2ba42f77e9be4a8a432b767d157701afe", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager\nRuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "qname": "RuntimeManager", + "kind": "class", + "signature": "RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/__init__.py", + "content": "const RuntimeManager\nRuntimeManager = plba.core.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 16, + "span_end": 16, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "7eacec84f9b8d6c4201374591faecdac7493091c263681495c338973f2971ad9", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = plba.core.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/core.py", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 2, + "span_end": 2, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "e1684562d978b7af7fe9b27dc5869d770348a87b5dc19a50360f58544668578b", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.core", + "is_test": false, + "blob_sha": "c0ae25110d20e665216616e26b68adfe035b624ba45d31d1272fb21f906f9ca8", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "const ControlPlaneService\nControlPlaneService = app_runtime.control.service.ControlPlaneService", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlPlaneService", + "span_start": 3, + "span_end": 3, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "217e8f044d1c01644bf7b81e5046af9e84469210c692a2fb0c476a19bb069ae1", + "qname": "ControlPlaneService", + "kind": "const", + "signature": "ControlPlaneService = app_runtime.control.service.ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "method ControlChannel.start\nstart(self, actions)\nStart the control channel and bind handlers.", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlChannel.start", + "span_start": 23, + "span_end": 24, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "e01e0d50d0f48d0c84c119c989b7a7c57ceea263811ce2605c684ae24d1a03b1", + "qname": "ControlChannel.start", + "kind": "method", + "signature": "start(self, actions)", + "parent_symbol_id": "ControlChannel", + "package_or_module": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "method ControlChannel.stop\nstop(self)\nStop the control channel and release resources.", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlChannel.stop", + "span_start": 27, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "54b5adf9866c526836221dc721b474ba23fbec83e1b1d3b8bc4da67ae3c1541d", + "qname": "ControlChannel.stop", + "kind": "method", + "signature": "stop(self)", + "parent_symbol_id": "ControlChannel", + "package_or_module": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "class ControlPlaneService:\n def __init__(self) -> None:\n self._channels: list[ControlChannel] = []\n\n def register_channel(self, channel: ControlChannel) -> None:\n self._channels.append(channel)\n\n def start(self, runtime: RuntimeManager) -> None:\n if not self._channels:\n return\n asyncio.run(self._start_async(runtime))\n\n def stop(self) -> None:\n if not self._channels:\n return\n asyncio.run(self._stop_async())\n\n def snapshot(self, runtime: RuntimeManager) -> dict[str, object]:\n health = runtime.current_health()\n return {\n \"runtime\": {\"state\": runtime._state.value},\n \"modules\": list(runtime.registry.modules),\n \"services\": runtime.services.snapshot(),\n \"workers\": runtime.workers.snapshot(),\n \"health\": runtime.health.snapshot(runtime.workers.healths()) | {\"status\": health[\"status\"]},\n \"config\": runtime.configuration.get(),\n }\n\n async def _start_async(self, runtime: RuntimeManager) -> None:\n actions = ControlActionSet(\n health=runtime.health_status,\n start=runtime.start_runtime,\n stop=runtime.stop_runtime,\n status=runtime.runtime_status,\n )\n for channel in self._channels:\n await channel.start(actions)\n\n async def _stop_async(self) -> None:\n for channel in reversed(self._channels):\n await channel.stop()", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/service.py:ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "class UvicornThreadRunner:\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._host = host\n self._port = port\n self._timeout = timeout\n self._server: Server | None = None\n self._thread: Thread | None = None\n self._error: BaseException | None = None\n\n async def start(self, app: FastAPI) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._error = None\n config = Config(app=app, host=self._host, port=self._port, log_level=\"warning\")\n self._server = Server(config)\n self._thread = Thread(target=self._serve, name=\"plba-http-control\", daemon=True)\n self._thread.start()\n await self._wait_until_started()\n\n async def stop(self) -> None:\n if self._server is None or self._thread is None:\n return\n self._server.should_exit = True\n await asyncio.to_thread(self._thread.join, self._timeout)\n self._server = None\n self._thread = None\n\n @property\n def port(self) -> int:\n if self._server is None or not getattr(self._server, \"servers\", None):\n return self._port\n socket = self._server.servers[0].sockets[0]\n return int(socket.getsockname()[1])\n\n async def _wait_until_started(self) -> None:\n if self._server is None:\n raise RuntimeError(\"Server is not initialized\")\n deadline = asyncio.get_running_loop().time() + max(float(self._timeout), 1.0)\n while not self._server.started:\n if self._error is not None:\n raise RuntimeError(\"HTTP control server failed to start\") from self._error\n if asyncio.get_running_loop().time() >= deadline:\n raise TimeoutError(\"HTTP control server startup timed out\")\n await asyncio.sleep(0.05)\n\n def _serve(self) -> None:\n if self._server is None:\n return\n try:\n asyncio.run(self._server.serve())\n except BaseException as exc: # noqa: BLE001\n self._error = exc", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_runner.py:UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_runner", + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlChannel(ABC):\n @abstractmethod\n async def start(self, actions: ControlActionSet) -> None:\n \"\"\"Start the control channel and bind handlers.\"\"\"\n\n @abstractmethod\n async def stop(self) -> None:\n \"\"\"Stop the control channel and release resources.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\"ControlActionSet\", \"ControlChannel\", \"ControlPlaneService\", \"HttpControlChannel\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/__init__.py:1-5", + "span_start": 1, + "span_end": 5, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "class HttpControlAppFactory:\n def create(\n self,\n health_provider: Callable[[], Awaitable[HealthPayload]],\n action_provider: Callable[[str, str], Awaitable[JSONResponse]],\n ) -> FastAPI:\n app = FastAPI(title=\"PLBA Control API\")\n\n @app.middleware(\"http\")\n async def log_api_call(request: Request, call_next): # type: ignore[no-untyped-def]\n started = time.monotonic()\n response = await call_next(request)\n response.headers[\"X-Response-Time-Ms\"] = str(int((time.monotonic() - started) * 1000))\n return response\n\n @app.get(\"/health\")\n async def health() -> JSONResponse:\n payload = await health_provider()\n status_code = 200 if payload.get(\"status\") == \"ok\" else 503\n return JSONResponse(content=payload, status_code=status_code)\n\n @app.get(\"/actions/{action}\")\n @app.post(\"/actions/{action}\")\n async def action(action: str, request: Request) -> JSONResponse:\n client_source = self._client_source(request)\n if action in {\"start\", \"stop\"}:\n LOGGER.warning(\"Control action requested: /actions/%s client=%s\", action, client_source)\n return await action_provider(action, client_source)\n\n return app\n\n def _client_source(self, request: Request) -> str:\n explicit_header = request.headers.get(\"X-Client-Source\", \"\").strip()\n if explicit_header:\n return explicit_header\n user_agent = request.headers.get(\"User-Agent\", \"\").strip()\n if user_agent:\n return f\"user-agent:{user_agent}\"\n return \"unknown\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_app.py:HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel(ControlChannel):\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._timeout = timeout\n self._runner = UvicornThreadRunner(host, port, timeout)\n self._factory = HttpControlAppFactory()\n self._actions: ControlActionSet | None = None\n\n async def start(self, actions: ControlActionSet) -> None:\n self._actions = actions\n app = self._factory.create(self._health_response, self._action_response)\n await self._runner.start(app)\n\n async def stop(self) -> None:\n await self._runner.stop()\n\n @property\n def port(self) -> int:\n return self._runner.port\n\n async def _health_response(self) -> dict[str, object]:\n if self._actions is None:\n return {\"status\": \"unhealthy\", \"detail\": \"control actions are not configured\"}\n return await asyncio.wait_for(self._actions.health(), timeout=float(self._timeout))\n\n async def _action_response(self, action: str, _client_source: str = \"unknown\") -> JSONResponse:\n if self._actions is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"{action} handler is not configured\"}, status_code=404)\n callbacks = {\n \"start\": self._actions.start,\n \"stop\": self._actions.stop,\n \"status\": self._actions.status,\n }\n callback = callbacks.get(action)\n if callback is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"unsupported action: {action}\"}, status_code=404)\n action_timeout = max(float(self._timeout), 10.0) if action in {\"start\", \"stop\"} else float(self._timeout)\n try:\n detail = await asyncio.wait_for(callback(), timeout=action_timeout)\n except asyncio.TimeoutError:\n return JSONResponse(\n content={\"status\": \"accepted\", \"detail\": f\"{action} operation is still in progress\"},\n status_code=202,\n )\n except Exception as exc:\n return JSONResponse(content={\"status\": \"error\", \"detail\": str(exc)}, status_code=500)\n return JSONResponse(content={\"status\": \"ok\", \"detail\": detail or f\"{action} action accepted\"}, status_code=200)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_channel.py:HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlActionSet:\n health: HealthHandler\n start: ActionHandler\n stop: ActionHandler\n status: ActionHandler", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/control.py", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\n \"ControlActionSet\",\n \"ControlChannel\",\n \"ControlPlaneService\",\n \"HttpControlChannel\",\n]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/control.py:1-10", + "span_start": 1, + "span_end": 10, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.control", + "is_test": false, + "blob_sha": "31bd5c4481bfa7fbca8fae56d4860a67e3953ca74474ac8439e1f39b685d7bc8", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests manager\n- orchestrates role-like calls (4)\n- reads and writes state attributes\n- participates in dataflow slices (50)", + "layer": "C4_SEMANTIC_ROLES", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 43, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "symbol_name": "RuntimeManager", + "qname": "RuntimeManager", + "role": "pipeline_stage", + "confidence": 0.67, + "dataflow_participation": 50, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 52, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.services\n -> RuntimeManager.__init__", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 33, + "span_end": 39, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d43af85989222ee6d788ce418cdcb217c7ff044cfb915e3bdbd184417dc7bd61", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "dst_ref": "RuntimeManager.__init__", + "resolution": "resolved", + "slice_id": "d43af85989222ee6d788ce418cdcb217c7ff044cfb915e3bdbd184417dc7bd61", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.services", + "RuntimeManager.__init__" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 59, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1", + "dst_ref": "RuntimeManager.start", + "resolution": "resolved", + "slice_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.start" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager._register_core_services", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 127, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6", + "dst_ref": "RuntimeManager._register_core_services", + "resolution": "resolved", + "slice_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager._register_core_services" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.services\n -> RuntimeManager._register_core_services", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 33, + "span_end": 127, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "aac6f9dda73963b977083a892bee39a48eca4fbd7404787e022ecf4ebedec65d", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6", + "dst_ref": "RuntimeManager._register_core_services", + "resolution": "resolved", + "slice_id": "aac6f9dda73963b977083a892bee39a48eca4fbd7404787e022ecf4ebedec65d", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.services", + "RuntimeManager._register_core_services" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "validation": { + "passed": true, + "action": "return", + "reasons": [] + } + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-runtime-start.md b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-runtime-start.md new file mode 100644 index 0000000..55e0ffb --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-runtime-start.md @@ -0,0 +1,34 @@ +# plba-v2-trace-flow-runtime-start + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: agent_runtime +- mode: full_chain +- passed: True + +## Query +Покажи поток выполнения при запуске RuntimeManager + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "TRACE_FLOW", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 37, + "llm_answer": "При запуске `RuntimeManager` выполняются следующие основные шаги:\n\n1. Инициализация через `RuntimeManager.__init__` в файле `src/app_runtime/core/runtime.py`.\n2. Вызов метода `start` внутри `RuntimeManager`, который далее вызывает асинхронную функцию `_start_async`.\n3. В `ControlPlaneService.start` создается экземпляр канала управления с помощью метода `register_channel`.\n4. Канал управления инициализируется через метод `start` экземпляра `ControlChannel`, где создается веб-приложение с использованием фабрики `HttpControlAppFactory`.\n5. Веб-приложение запускается с помощью `UvicornThreadRunner.start`, который выполняет запуск сервера через uvicorn.\n\nТаким образом, поток начинается с инициализации менеджера времени выполнения и завершается запуском веб-канала управления.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/summary.md b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/summary.md new file mode 100644 index 0000000..a2ae98f --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/summary.md @@ -0,0 +1,85 @@ +# pipeline_setup_v3 summary + +Passed: 15/18 + +| File | Case | Mode | Query | Actual sub-intent | RAG layers | Pass | +|------|------|------|-------|-------------------|------------|------| +| full_chain_plba_code_subintents_v2.yaml | plba-v2-open-file-runtime | full_chain | Открой файл src/app_runtime/core/runtime.py | OPEN_FILE | C0_SOURCE_CHUNKS:1 | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-open-file-public-api | full_chain | Открой файл src/plba/__init__.py | OPEN_FILE | C0_SOURCE_CHUNKS:1 | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-explain-runtime-manager | full_chain | Объясни как работает класс RuntimeManager | EXPLAIN | C0_SOURCE_CHUNKS:8, C1_SYMBOL_CATALOG:8, C2_DEPENDENCY_GRAPH:6, C3_ENTRYPOINTS:3, C4_SEMANTIC_ROLES:8 | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-explain-trace-service | full_chain | Объясни как работает класс TraceService | EXPLAIN | C0_SOURCE_CHUNKS:8, C1_SYMBOL_CATALOG:8, C2_DEPENDENCY_GRAPH:6, C3_ENTRYPOINTS:3, C4_SEMANTIC_ROLES:8 | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-explain-create-runtime | full_chain | Что делает функция create_runtime? | EXPLAIN | C0_SOURCE_CHUNKS:8, C1_SYMBOL_CATALOG:8, C2_DEPENDENCY_GRAPH:6, C3_ENTRYPOINTS:3, C4_SEMANTIC_ROLES:8 | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-explain-local-http-channel | full_chain | Почему в файле src/app_runtime/control/http_channel.py класс HttpControlChannel устроен так? | EXPLAIN_LOCAL | C0_SOURCE_CHUNKS:1, C1_SYMBOL_CATALOG:8, C2_DEPENDENCY_GRAPH:4 | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-find-tests-runtime-manager | full_chain | Где тесты для RuntimeManager? | FIND_TESTS | C0_SOURCE_CHUNKS:10, C1_SYMBOL_CATALOG:8, C2_DEPENDENCY_GRAPH:6 | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-find-tests-trace-service | full_chain | Где тесты для TraceService? | FIND_TESTS | C0_SOURCE_CHUNKS:10, C1_SYMBOL_CATALOG:8, C2_DEPENDENCY_GRAPH:6 | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-find-tests-create-runtime | full_chain | Где тесты для create_runtime? | FIND_TESTS | C0_SOURCE_CHUNKS:10, C1_SYMBOL_CATALOG:8, C2_DEPENDENCY_GRAPH:6 | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-find-tests-workflow-runtime-factory-negative | full_chain | Где тесты для WorkflowRuntimeFactory? | FIND_TESTS | C0_SOURCE_CHUNKS:10, C1_SYMBOL_CATALOG:8, C2_DEPENDENCY_GRAPH:6 | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-find-entrypoints-control-plane | full_chain | Найди точки входа HTTP control plane | FIND_ENTRYPOINTS | C0_SOURCE_CHUNKS:6, C3_ENTRYPOINTS:3 | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-find-entrypoints-health-endpoint | full_chain | Где health endpoint? | FIND_ENTRYPOINTS | C0_SOURCE_CHUNKS:6, C3_ENTRYPOINTS:3 | ✗ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-trace-flow-runtime-start | full_chain | Покажи поток выполнения при запуске RuntimeManager | TRACE_FLOW | C0_SOURCE_CHUNKS:8, C1_SYMBOL_CATALOG:8, C2_DEPENDENCY_GRAPH:10, C3_ENTRYPOINTS:3, C4_SEMANTIC_ROLES:8 | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-trace-flow-health-endpoint | full_chain | Покажи как проходит запрос /health в HttpControlAppFactory | TRACE_FLOW | C0_SOURCE_CHUNKS:8, C1_SYMBOL_CATALOG:8, C2_DEPENDENCY_GRAPH:10, C3_ENTRYPOINTS:3, C4_SEMANTIC_ROLES:8 | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-architecture-runtime-manager | full_chain | Какие компоненты участвуют в RuntimeManager? | ARCHITECTURE | C0_SOURCE_CHUNKS:4, C1_SYMBOL_CATALOG:6, C2_DEPENDENCY_GRAPH:8, C3_ENTRYPOINTS:3, C4_SEMANTIC_ROLES:12 | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-architecture-control-plane | full_chain | Какие компоненты участвуют в ControlPlaneService? | ARCHITECTURE | C0_SOURCE_CHUNKS:4, C1_SYMBOL_CATALOG:6, C2_DEPENDENCY_GRAPH:8, C3_ENTRYPOINTS:3, C4_SEMANTIC_ROLES:12 | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-explain-nonexistent-symbol | full_chain | Объясни класс RuntimeFactoryManager | EXPLAIN | C0_SOURCE_CHUNKS:8, C1_SYMBOL_CATALOG:8, C2_DEPENDENCY_GRAPH:6, C3_ENTRYPOINTS:3, C4_SEMANTIC_ROLES:8 | ✗ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-open-file-nonexistent | full_chain | Открой файл src/app_runtime/core/missing_runtime.py | OPEN_FILE | — | ✗ | + +## Failures +- **plba-v2-find-entrypoints-health-endpoint**: llm: expected answer to contain 'GET /health' +- **plba-v2-explain-nonexistent-symbol**: answer_mode: expected degraded, got answered; retrieval: expected empty rag, got 33 rows; llm: expected answer to contain 'не найдена' +- **plba-v2-open-file-nonexistent**: answer_mode: expected degraded, got not_found; llm: expected answer to contain 'Файл src/app_runtime/core/missing_runtime.py не найден.' + +## LLM Answers +- **plba-v2-open-file-runtime** + Query: Открой файл src/app_runtime/core/runtime.py + > Виден класс \`RuntimeManager\` с инициализатором и статическими полями. Файл содержит 162 строки кода. +- **plba-v2-open-file-public-api** + Query: Открой файл src/plba/__init__.py + > В файле src/plba/\_\_init\_\_.py видны следующие импорты и определения: \- from plba.bootstrap import create\_runtime \- from plba.config import ConfigFileLoader, FileConfigProvider \- from plba.control import ControlActionSet, ControlChannel, ControlPlaneService, HttpControlChannel \- from plba.contracts import ApplicationModule, ConfigProvider, HealthContributor, TraceContext, TraceContextRecord, TraceLogMessage, TraceTransport, Worker, WorkerHealth, WorkerStatus \- from plba.core import ConfigurationManager, RuntimeManager, ServiceContainer \- from plba.health import HealthRegistry \- from plba.logging import LogManager \- from plba.queue import InMemoryTaskQueue \- from plba.tracing import MySqlTraceTransport, NoOpTraceTransport, TraceService \- from plba.workflow import StepResult, WorkflowContext, WorkflowDefinition, Workflo +- **plba-v2-explain-runtime-manager** + Query: Объясни как работает класс RuntimeManager + > Класс \`RuntimeManager\` определен в файле \`src/app\_runtime/core/runtime.py\`, начиная с строки 18. Из доступных контекстных данных напрямую невозможно точно описать его работу, так как отсутствует подробная реализация или вызовы этого класса. Тем не менее, можно сделать осторожные выводы: \- Класс играет роль менеджера и управляет состоянием выполнения приложения. \- Вероятно, он участвует в координации различных компонентов и служб через атрибуты и методы, такие как чтение и запись состояния \(\`configuration\`, \`add\_config\_file\`\), а также участие в срезах данных потока выполнения \(\`participates in dataflow slices\`\). \- На основании имеющихся свидетельств сложно точно понять, какие конкретно действия выполняет этот класс при инициализации и во время своей работы. +- **plba-v2-explain-trace-service** + Query: Объясни как работает класс TraceService + > Класс \`TraceService\` находится в файле \`src/app\_runtime/tracing/service.py\`. Это сервис для управления контекстами трассировки и записи событий в журнал. Его основные обязанности: \- Инициализация сервиса при создании экземпляра \(\`\_\_init\_\_\`\) с передачей транспортов и хранилищ контекста. \- Создание нового контекста трассировки через метод \`create\_context\`, который генерирует уникальный идентификатор трассировки и сохраняет запись контекста в хранилище. \- Предоставление текущего идентификатора трассировки через метод \`current\_trace\_id\`. Конструктор принимает два необязательных параметра: \- \`transport\`: транспорт для отправки сообщений трассировки \(по умолчанию используется \`NoOpTraceTransport\`\). \- \`store\`: хранилище контекста \(по умолчанию используется \`TraceContextStore\`\). Таким образом, \`TraceService\` играет ключевую роль в отслеживании и документировании событий прил… +- **plba-v2-explain-create-runtime** + Query: Что делает функция create_runtime? + > Функция \`create\_runtime\` находится в файле \`src/plba/bootstrap.py\`. Она принимает аргумент \`module\`, представляющий экземпляр интерфейса \`ApplicationModule\`. Подтвержденные действия функции: \- Инициализирует объект типа \`RuntimeManager\`. \- Если указан путь к конфигурационному файлу \(\`config\_path\`\), добавляет этот файл в менеджер конфигурации. \- При включённой опции HTTP\-контроля регистрирует канал управления через класс \`HttpControlChannel\`. \- Регистрирует переданный модуль в менеджере. Таким образом, основная задача функции – создать и настроить базовый runtime для приложения. +- **plba-v2-explain-local-http-channel** + Query: Почему в файле src/app_runtime/control/http_channel.py класс HttpControlChannel устроен так? + > Класс \`HttpControlChannel\` в файле \`http\_channel.py\` реализует канал управления для HTTP\-запросов. В конструкторе \(\`\_\_init\_\_\`\) создаются основные компоненты: \- \`\_runner\`: объект типа \`UvicornThreadRunner\`, управляющий асинхронным сервером uvicorn. \- \`\_factory\`: фабрика приложений типа \`HttpControlAppFactory\`, создающая приложения для обработки запросов. \- \`\_actions\`: коллекция действий управления, инициализируется как \`None\`. Метод \`start\` запускает сервер с приложением, созданным фабрикой, и ожидает завершения работы сервера при вызове \`stop\`. Класс предназначен для организации взаимодействия с внешним миром через HTTP\-интерфейсы. +- **plba-v2-find-tests-runtime-manager** + Query: Где тесты для RuntimeManager? + > Прямые тесты для \`RuntimeManager\` обнаружены в следующих файлах: \- \*\*tests/test\_runtime.py\*\*: проверка инициализации и поведения \`RuntimeManager\`. \- \*\*tests/test\_business\_control\_actions.py\*\*: хотя этот файл упоминает \`RuntimeManager\`, он непосредственно не предназначен для тестирования \`RuntimeManager\`. Вместо этого здесь проверяются контрольные каналы и бизнес\-действия. Косвенных тестов, специфичных для \`RuntimeManager\`, не найдено. +- **plba-v2-find-tests-trace-service** + Query: Где тесты для TraceService? + > Прямые тесты для \`TraceService\` находятся в файле \`tests/test\_runtime.py\`. В следующих функциях проверяются различные аспекты работы \`TraceService\`: \- \`test\_trace\_service\_allows\_messages\_without\_status\`: проверяет корректность записи сообщений без статуса. \- \`test\_trace\_service\_writes\_contexts\_and\_messages\`: проверяет запись контекстов и сообщений. \- \`test\_trace\_service\_supports\_debug\_warning\_and\_error\_levels\`: проверяет поддержку различных уровней логирования. +- **plba-v2-find-tests-create-runtime** + Query: Где тесты для create_runtime? + > Прямых тестов для \`create\_runtime\` не обнаружено. Ближайший тест находится в файле \`tests/test\_runtime.py\`, но он проверяет экспорт публичных контрактов пакета PLBA, а не непосредственно сам метод \`create\_runtime\`. Косвенное покрытие отсутствует. +- **plba-v2-find-tests-workflow-runtime-factory-negative** + Query: Где тесты для WorkflowRuntimeFactory? + > Insufficient evidence for a confident answer. No test candidates found. +- **plba-v2-find-entrypoints-control-plane** + Query: Найди точки входа HTTP control plane + > Подтверждённые HTTP route points: \- GET /health \(src/app\_runtime/control/http\_app.py:52\) \- POST \(не указан конкретный путь, но находится в src/app\_runtime/control/http\_app.py:38\-42\) \- GET \(повтор, src/app\_runtime/control/http\_app.py:38\-42\) Кандидат на точку входа без явного HTTP route маркера: \- Класс HttpControlChannel в src/app\_runtime/control/http\_channel.py:12\-57, хотя его прямая роль неясна без дополнительного анализа поведения методов start и stop. +- **plba-v2-find-entrypoints-health-endpoint** + Query: Где health endpoint? + > Конкретный health endpoint не обнаружен напрямую. Однако подтверждённые HTTP routes: \- GET / \(объявлен в src/app\_runtime/control/http\_app.py:31\-34\) \- POST / \(объявлен в src/app\_runtime/control/http\_app.py:38\-42\) \- GET / \(повторное объявление в src/app\_runtime/control/http\_app.py:38\-42\) +- **plba-v2-trace-flow-runtime-start** + Query: Покажи поток выполнения при запуске RuntimeManager + > При запуске \`RuntimeManager\` выполняются следующие основные шаги: 1. Инициализация через \`RuntimeManager.\_\_init\_\_\` в файле \`src/app\_runtime/core/runtime.py\`. 2. Вызов метода \`start\` внутри \`RuntimeManager\`, который далее вызывает асинхронную функцию \`\_start\_async\`. 3. В \`ControlPlaneService.start\` создается экземпляр канала управления с помощью метода \`register\_channel\`. 4. Канал управления инициализируется через метод \`start\` экземпляра \`ControlChannel\`, где создается веб\-приложение с использованием фабрики \`HttpControlAppFactory\`. 5. Веб\-приложение запускается с помощью \`UvicornThreadRunner.start\`, который выполняет запуск сервера через uvicorn. Таким образом, поток начинается с инициализации менеджера времени выполнения и завершается запуском веб\-канала управления. +- **plba-v2-trace-flow-health-endpoint** + Query: Покажи как проходит запрос /health в HttpControlAppFactory + > Поток выполнения запроса \`/health\` через \`HttpControlAppFactory\` выглядит следующим образом: 1. Запрос приходит на сервер и обрабатывается фабрикой приложений \`HttpControlAppFactory\`. 2. Внутри фабрики создается экземпляр приложения FastAPI с middleware для логирования времени обработки запросов. 3. Для маршрута \`/health\` определяется обработчик, который вызывает предоставленный провайдер здоровья \(\`health\_provider\`\), ожидающий асинхронный результат типа \`HealthPayload\`. 4. В результате выполнения провайдера формируется JSON\-ответ с кодом статуса 200 при успешном состоянии \("ok"\), иначе возвращается статус 503. Таким образом, ключевой точкой является вызов провайдера здоровья внутри фабрики приложений, от которого зависит итоговый результат ответа. +- **plba-v2-architecture-runtime-manager** + Query: Какие компоненты участвуют в RuntimeManager? + > В подсистеме RuntimeManager участвуют следующие компоненты: 1. \*\*RuntimeManager\*\* \(src/app\_runtime/core/runtime.py\): \- Инициализирует конфигурацию и управляет жизненным циклом runtime\-пipeline. \- Создаёт и регистрирует основные сервисы \(ControlPlaneService, WorkflowPersistence, InMemoryTaskQueue, ConfigFileLoader, TraceContextStore, WorkerSupervisor\). 2. \*\*ControlPlaneService\*\* \(src/app\_runtime/control/service.py\): \- Служба управления каналами контроля и взаимодействия с внешними сущностями. \- Регистрирует каналы и запускает асинхронные операции. 3. \*\*WorkflowPersistence\*\* \(src/app\_runtime/workflow/persistence/workflow\_persistence.py\): \- Обеспечивает долговременное хранение workflow\-данных. 4. \*\*InMemoryTaskQueue\*\* \(src/app\_runtime/queue/in\_memory.py\): \- Хранит задачи в памяти для временного хранения и обработки. 5. \*\*ConfigFileLoader\*\* \(src/app\_runtime/config/file\_l… +- **plba-v2-architecture-control-plane** + Query: Какие компоненты участвуют в ControlPlaneService? + > В архитектуре подсистемы ControlPlaneService участвуют следующие основные компоненты: 1. \*\*ControlPlaneService\*\* – главный сервис, инициализирующий и управляющий каналами контроля. Он создает каналы, регистрирует их и управляет жизненным циклом через методы \`register\_channel\`, \`start\` и \`stop\`. \- Создаёт экземпляры каналов \(\`ControlChannel\`\) и сохраняет их в поле \`\_channels\`. \- Вызывает асинхронную инициализацию каналов с помощью методов \`start\` и \`stop\`. 2. \*\*ControlChannel\*\* – абстрактный базовый класс для каналов управления, определяющий интерфейс для старта и остановки канала. \- Описывает абстракции для начала работы канала и освобождения ресурсов при завершении. 3. \*\*ControlActionSet\*\* – модель действий, используемых в канале управления. Связи между компонентами реализованы следующим образом: \- \*\*ControlPlaneService\*\* создаёт и регистрирует экземпляры каналов уп… +- **plba-v2-explain-nonexistent-symbol** + Query: Объясни класс RuntimeFactoryManager + > Класс \`RuntimeFactoryManager\` не найден в предоставленном контексте. Согласно имеющимся данным, наиболее близкой сущностью является \`ControlChannel\`, объявленный в файле \`base.py\`. Однако его описание и работа напрямую не связаны с созданием или управлением фабриками для runtime. Если предполагается наличие класса с таким названием, возможно, он описан в другом модуле или импортируется из внешнего пакета. Рекомендую проверить остальные части проекта или уточнить местоположение данного класса. +- **plba-v2-open-file-nonexistent** + Query: Открой файл src/app_runtime/core/missing_runtime.py + > Файл \`src/app\_runtime/core/missing\_runtime.py\` не найден. \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-architecture-control-plane.json b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-architecture-control-plane.json new file mode 100644 index 0000000..ba60c23 --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-architecture-control-plane.json @@ -0,0 +1,4302 @@ +{ + "case_id": "plba-v2-architecture-control-plane", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "agent_runtime", + "mode": "full_chain", + "query": "Какие компоненты участвуют в ControlPlaneService?", + "actual": { + "intent": "CODE_QA", + "sub_intent": "ARCHITECTURE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 33, + "llm_answer": "В системе ControlPlaneService участвуют следующие компоненты:\n\n1. **ControlPlaneService** – главный объект управления, инициализирующий каналы и запускающий асинхронные операции. Он создает и управляет экземплярами каналов, участвующих в управлении данными и событиями.\n - Создаёт каналы с помощью `register_channel`.\n - Запускает и останавливает сервис с помощью методов `start` и `stop`.\n\n2. **ControlChannel** – абстрактный класс для реализации конкретных каналов управления. Подклассами являются HttpControlChannel и WorkerSupervisor.\n - Реализует метод `start`, предназначенный для запуска канала и привязки обработчиков событий.\n - Реализует метод `stop`, используемый для завершения работы и освобождения ресурсов.\n\n3. **HttpControlChannel** – конкретный канал управления HTTP-запросами, участвующий в обработке запросов API.\n - Регистрируется в ControlPlaneService через метод `register_channel`.\n - Обрабатывает входящие запросы с использованием FastAPI.\n\n4. **WorkerSupervisor** – управляет рабочими процессами и координирует выполнение задач.\n - Также регистрируется в ControlPlaneService и участвует в общем управлении системой.\n\nЭти компоненты взаимодействуют через создание и управление каналами, обработку событий и координацию рабочих процессов. Контроль состояния осуществляется через чтение и запись атрибутов состояния.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "ControlPlaneService" + ], + "layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "query": "Какие компоненты участвуют в ControlPlaneService?", + "router_result": { + "schema_version": "1.1", + "intent": "CODE_QA", + "retrieval_profile": "code", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query_plan": { + "raw": "Какие компоненты участвуют в ControlPlaneService?", + "normalized": "Какие компоненты участвуют в ControlPlaneService?", + "sub_intent": "ARCHITECTURE", + "negations": [], + "expansions": [ + "ControlPlaneService" + ], + "keyword_hints": [ + "ControlPlaneService" + ], + "path_hints": [], + "doc_scope_hints": [], + "symbol_candidates": [ + "ControlPlaneService" + ], + "symbol_kind_hint": "class", + "anchors": [ + { + "type": "SYMBOL", + "value": "ControlPlaneService", + "source": "user_text", + "subtype": null, + "span": { + "start": 29, + "end": 48 + }, + "confidence": 0.88 + } + ] + }, + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C4_SEMANTIC_ROLES", + "top_k": 12 + }, + { + "layer_id": "C3_ENTRYPOINTS", + "top_k": 8 + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "top_k": 8 + }, + { + "layer_id": "C1_SYMBOL_CATALOG", + "top_k": 6 + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 4 + } + ], + "filters": { + "test_policy": "EXCLUDE", + "path_scope": [], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "ControlPlaneService", + "alternatives": [ + "ControlPlaneService", + "ControlPlaneService", + "ControlPlaneService", + "ControlPlaneService", + "ControlPlaneService" + ], + "confidence": 0.99 + }, + "evidence_policy": { + "require_def": true, + "require_flow": true, + "require_spec": false, + "allow_answer_without_evidence": false + } + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Какие компоненты участвуют в ControlPlaneService?", + "sub_intent": "ARCHITECTURE", + "path_scope": [], + "keyword_hints": [ + "ControlPlaneService" + ], + "symbol_candidates": [ + "ControlPlaneService" + ], + "requested_layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ], + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C4_SEMANTIC_ROLES", + "top_k": 12 + }, + { + "layer_id": "C3_ENTRYPOINTS", + "top_k": 8 + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "top_k": 8 + }, + { + "layer_id": "C1_SYMBOL_CATALOG", + "top_k": 6 + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 4 + } + ], + "filters": { + "test_policy": "EXCLUDE", + "path_scope": [], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + }, + "query_plan": { + "raw": "Какие компоненты участвуют в ControlPlaneService?", + "normalized": "Какие компоненты участвуют в ControlPlaneService?", + "sub_intent": "ARCHITECTURE", + "negations": [], + "expansions": [ + "ControlPlaneService" + ], + "keyword_hints": [ + "ControlPlaneService" + ], + "path_hints": [], + "doc_scope_hints": [], + "symbol_candidates": [ + "ControlPlaneService" + ], + "symbol_kind_hint": "class", + "anchors": [ + { + "type": "SYMBOL", + "value": "ControlPlaneService", + "source": "user_text", + "subtype": null, + "span": { + "start": 29, + "end": 48 + }, + "confidence": 0.88 + } + ] + } + }, + "retrieval_result": { + "target_symbol_candidates": [ + "ControlPlaneService", + "ControlChannel" + ], + "resolved_symbol": "ControlPlaneService", + "symbol_resolution_status": "resolved", + "file_candidates": [ + "src/app_runtime/control/service.py", + "src/app_runtime/control/base.py", + "src/app_runtime/control/http_runner.py", + "src/app_runtime/control/http_channel.py", + "src/app_runtime/control/http_app.py", + "src/app_runtime/workflow/persistence/workflow_persistence.py", + "src/app_runtime/queue/in_memory.py", + "src/app_runtime/config/file_loader.py", + "src/app_runtime/tracing/store.py", + "src/app_runtime/workers/supervisor.py", + "src/app_runtime/workflow/engine/workflow_engine.py", + "src/app_runtime/core/runtime.py", + "src/plba/control.py", + "src/app_runtime/control/__init__.py", + "src/plba/__init__.py" + ], + "code_chunks": [ + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "start_line": 12, + "end_line": 52, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/base.py", + "title": "ControlActionSet", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "start_line": 14, + "end_line": 18, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/base.py", + "title": "ControlChannel", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "start_line": 21, + "end_line": 28, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/http_runner.py", + "title": "UvicornThreadRunner", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "start_line": 10, + "end_line": 61, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/http_channel.py", + "title": "HttpControlChannel", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "start_line": 12, + "end_line": 57, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/http_app.py", + "title": "HttpControlAppFactory", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "start_line": 15, + "end_line": 53, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "title": "WorkflowPersistence", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "start_line": 8, + "end_line": 54, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/queue/in_memory.py", + "title": "InMemoryTaskQueue", + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)", + "start_line": 9, + "end_line": 38, + "metadata": { + "symbol_id": "2da04cb94544a3bcbf0943a95ad4bdd8710bcafaa32a02fd0e4de2178dcf3533", + "symbol_name": "InMemoryTaskQueue", + "qname": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 9, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "58f0cc001ccda0eee4c6bc32ed83bd05eafd6b6644f1e8b4aa9eed3103db73dc", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/config/file_loader.py", + "title": "ConfigFileLoader", + "content": "ConfigFileLoader\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (8)", + "start_line": 11, + "end_line": 48, + "metadata": { + "symbol_id": "a8474eca8b6e9dc86ae67ed68b16fa5fb639ef08739c053e7b7195489765667f", + "symbol_name": "ConfigFileLoader", + "qname": "ConfigFileLoader", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 8, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/tracing/store.py", + "title": "TraceContextStore", + "content": "TraceContextStore\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "start_line": 15, + "end_line": 52, + "metadata": { + "symbol_id": "b2dad4fbe16ffb11b58deba311c7739955c39d59f291b22181f33e9c8cce4059", + "symbol_name": "TraceContextStore", + "qname": "TraceContextStore", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "d369554f08fc92039c6edd5a2a1e73b23901533e8974459170bbd9347d263dc5", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/workers/supervisor.py", + "title": "WorkerSupervisor", + "content": "WorkerSupervisor\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "start_line": 10, + "end_line": 59, + "metadata": { + "symbol_id": "c17b44e8d9e97d490989b21fa67d7c346cdda8a0472e4c41fb243c8846faa124", + "symbol_name": "WorkerSupervisor", + "qname": "WorkerSupervisor", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "77609d9d5927171cce7fc3a54897c183fd63068710c6362029b700937aae5eee", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "title": "WorkflowEngine", + "content": "WorkflowEngine\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "start_line": 10, + "end_line": 86, + "metadata": { + "symbol_id": "57ec0a9f11c542c78e008684a888397e8d9ef4223671acb2567e631a0cbc70b4", + "symbol_name": "WorkflowEngine", + "qname": "WorkflowEngine", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C3_ENTRYPOINTS", + "path": "src/app_runtime/control/http_app.py", + "title": "app.post", + "content": "fastapi http app.post", + "start_line": 38, + "end_line": 42, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C3_ENTRYPOINTS", + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "content": "fastapi http app.get", + "start_line": 31, + "end_line": 34, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C3_ENTRYPOINTS", + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "content": "fastapi http app.get", + "start_line": 38, + "end_line": 42, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "start_line": 14, + "end_line": 47, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "start_line": 14, + "end_line": 17, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "start_line": 14, + "end_line": 20, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "start_line": 14, + "end_line": 25, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "start_line": 14, + "end_line": 51, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.start:calls", + "content": "ControlPlaneService.start calls asyncio.run", + "start_line": 22, + "end_line": 22, + "metadata": { + "edge_id": "4e0b3147fb867d48d26567570c259f4052a739e3098133802d4b8bafcf03be6b", + "edge_type": "calls", + "src_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "src_qname": "ControlPlaneService.start", + "dst_symbol_id": null, + "dst_ref": "asyncio.run", + "resolution": "partial", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.register_channel:reads_attr", + "content": "ControlPlaneService.register_channel reads_attr ControlPlaneService._channels", + "start_line": 17, + "end_line": 17, + "metadata": { + "edge_id": "3101fdc99a7a9c5aebf18a024bc148d37b348248a6fd02b95724dff280f2908a", + "edge_type": "reads_attr", + "src_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "src_qname": "ControlPlaneService.register_channel", + "dst_symbol_id": null, + "dst_ref": "ControlPlaneService._channels", + "resolution": "partial", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.start:reads_attr", + "content": "ControlPlaneService.start reads_attr ControlPlaneService._channels", + "start_line": 20, + "end_line": 20, + "metadata": { + "edge_id": "9452e50ef27d47c30ee1c311c48fe73ecddbf7a6dbcf967a6345e98222d9f71a", + "edge_type": "reads_attr", + "src_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "src_qname": "ControlPlaneService.start", + "dst_symbol_id": null, + "dst_ref": "ControlPlaneService._channels", + "resolution": "partial", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/core/runtime.py", + "title": "ControlPlaneService", + "content": "const ControlPlaneService\nControlPlaneService = app_runtime.control.service.ControlPlaneService", + "start_line": 7, + "end_line": 7, + "metadata": { + "symbol_id": "3030804d119fa1d4b8a6c32616062a5e11080b03d33818c9280bcc5bdd8fd512", + "qname": "ControlPlaneService", + "kind": "const", + "signature": "ControlPlaneService = app_runtime.control.service.ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/plba/control.py", + "title": "ControlPlaneService", + "content": "const ControlPlaneService\nControlPlaneService = app_runtime.control.service.ControlPlaneService", + "start_line": 3, + "end_line": 3, + "metadata": { + "symbol_id": "bd7f620031a049b8d791534536941ce75071029542395a7bb14817742827070a", + "qname": "ControlPlaneService", + "kind": "const", + "signature": "ControlPlaneService = app_runtime.control.service.ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.plba.control", + "is_test": false, + "blob_sha": "31bd5c4481bfa7fbca8fae56d4860a67e3953ca74474ac8439e1f39b685d7bc8", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService", + "content": "class ControlPlaneService\nControlPlaneService", + "start_line": 12, + "end_line": 52, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "qname": "ControlPlaneService", + "kind": "class", + "signature": "ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/__init__.py", + "title": "ControlPlaneService", + "content": "const ControlPlaneService\nControlPlaneService = app_runtime.control.service.ControlPlaneService", + "start_line": 3, + "end_line": 3, + "metadata": { + "symbol_id": "217e8f044d1c01644bf7b81e5046af9e84469210c692a2fb0c476a19bb069ae1", + "qname": "ControlPlaneService", + "kind": "const", + "signature": "ControlPlaneService = app_runtime.control.service.ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/plba/__init__.py", + "title": "ControlPlaneService", + "content": "const ControlPlaneService\nControlPlaneService = plba.control.ControlPlaneService", + "start_line": 3, + "end_line": 3, + "metadata": { + "symbol_id": "90b154d49d544efb7c448e91bf5b75231578a6571b98c06a2a555fa5dcffb152", + "qname": "ControlPlaneService", + "kind": "const", + "signature": "ControlPlaneService = plba.control.ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/__init__.py", + "title": "ControlChannel", + "content": "const ControlChannel\nControlChannel = app_runtime.control.base.ControlChannel", + "start_line": 1, + "end_line": 1, + "metadata": { + "symbol_id": "268420f7aa4ed74082b9276cae0cded4f00bac090ffd58fa020a65be0fe19c27", + "qname": "ControlChannel", + "kind": "const", + "signature": "ControlChannel = app_runtime.control.base.ControlChannel", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/base.py", + "title": "src/app_runtime/control/base.py:ControlChannel", + "content": "class ControlChannel(ABC):\n @abstractmethod\n async def start(self, actions: ControlActionSet) -> None:\n \"\"\"Start the control channel and bind handlers.\"\"\"\n\n @abstractmethod\n async def stop(self) -> None:\n \"\"\"Stop the control channel and release resources.\"\"\"", + "start_line": 21, + "end_line": 28, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/__init__.py", + "title": "src/app_runtime/control/__init__.py:1-5", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\"ControlActionSet\", \"ControlChannel\", \"ControlPlaneService\", \"HttpControlChannel\"]", + "start_line": 1, + "end_line": 5, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/base.py", + "title": "src/app_runtime/control/base.py:ControlActionSet", + "content": "class ControlActionSet:\n health: HealthHandler\n start: ActionHandler\n stop: ActionHandler\n status: ActionHandler", + "start_line": 14, + "end_line": 18, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/http_app.py", + "title": "src/app_runtime/control/http_app.py:HttpControlAppFactory", + "content": "class HttpControlAppFactory:\n def create(\n self,\n health_provider: Callable[[], Awaitable[HealthPayload]],\n action_provider: Callable[[str, str], Awaitable[JSONResponse]],\n ) -> FastAPI:\n app = FastAPI(title=\"PLBA Control API\")\n\n @app.middleware(\"http\")\n async def log_api_call(request: Request, call_next): # type: ignore[no-untyped-def]\n started = time.monotonic()\n response = await call_next(request)\n response.headers[\"X-Response-Time-Ms\"] = str(int((time.monotonic() - started) * 1000))\n return response\n\n @app.get(\"/health\")\n async def health() -> JSONResponse:\n payload = await health_provider()\n status_code = 200 if payload.get(\"status\") == \"ok\" else 503\n return JSONResponse(content=payload, status_code=status_code)\n\n @app.get(\"/actions/{action}\")\n @app.post(\"/actions/{action}\")\n async def action(action: str, request: Request) -> JSONResponse:\n client_source = self._client_source(request)\n if action in {\"start\", \"stop\"}:\n LOGGER.warning(\"Control action requested: /actions/%s client=%s\", action, client_source)\n return await action_provider(action, client_source)\n\n return app\n\n def _client_source(self, request: Request) -> str:\n explicit_header = request.headers.get(\"X-Client-Source\", \"\").strip()\n if explicit_header:\n return explicit_header\n user_agent = request.headers.get(\"User-Agent\", \"\").strip()\n if user_agent:\n return f\"user-agent:{user_agent}\"\n return \"unknown\"", + "start_line": 15, + "end_line": 53, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "relations": [ + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async" + }, + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel" + }, + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start" + }, + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop" + }, + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async" + }, + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "4e0b3147fb867d48d26567570c259f4052a739e3098133802d4b8bafcf03be6b", + "edge_type": "calls", + "src_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "src_qname": "ControlPlaneService.start", + "dst_symbol_id": null, + "dst_ref": "asyncio.run", + "resolution": "partial", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.start calls asyncio.run" + }, + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "3101fdc99a7a9c5aebf18a024bc148d37b348248a6fd02b95724dff280f2908a", + "edge_type": "reads_attr", + "src_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "src_qname": "ControlPlaneService.register_channel", + "dst_symbol_id": null, + "dst_ref": "ControlPlaneService._channels", + "resolution": "partial", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.register_channel reads_attr ControlPlaneService._channels" + }, + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "9452e50ef27d47c30ee1c311c48fe73ecddbf7a6dbcf967a6345e98222d9f71a", + "edge_type": "reads_attr", + "src_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "src_qname": "ControlPlaneService.start", + "dst_symbol_id": null, + "dst_ref": "ControlPlaneService._channels", + "resolution": "partial", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.start reads_attr ControlPlaneService._channels" + } + ], + "entrypoints": [ + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.post", + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "test_candidates": [], + "layer_outcomes": [ + { + "layer_id": "C4_SEMANTIC_ROLES", + "hit_count": 12, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C3_ENTRYPOINTS", + "hit_count": 3, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 6, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 4, + "empty": false, + "fallback_used": false + } + ], + "missing_layers": [], + "raw_rows": [ + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/queue/in_memory.py", + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)", + "layer": "C4_SEMANTIC_ROLES", + "title": "InMemoryTaskQueue", + "span_start": 9, + "span_end": 38, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 22, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "2da04cb94544a3bcbf0943a95ad4bdd8710bcafaa32a02fd0e4de2178dcf3533", + "symbol_name": "InMemoryTaskQueue", + "qname": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 9, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "58f0cc001ccda0eee4c6bc32ed83bd05eafd6b6644f1e8b4aa9eed3103db73dc", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "ConfigFileLoader\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (8)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ConfigFileLoader", + "span_start": 11, + "span_end": 48, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 23, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "a8474eca8b6e9dc86ae67ed68b16fa5fb639ef08739c053e7b7195489765667f", + "symbol_name": "ConfigFileLoader", + "qname": "ConfigFileLoader", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 8, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/store.py", + "content": "TraceContextStore\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "TraceContextStore", + "span_start": 15, + "span_end": 52, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "b2dad4fbe16ffb11b58deba311c7739955c39d59f291b22181f33e9c8cce4059", + "symbol_name": "TraceContextStore", + "qname": "TraceContextStore", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "d369554f08fc92039c6edd5a2a1e73b23901533e8974459170bbd9347d263dc5", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workers/supervisor.py", + "content": "WorkerSupervisor\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkerSupervisor", + "span_start": 10, + "span_end": 59, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "c17b44e8d9e97d490989b21fa67d7c346cdda8a0472e4c41fb243c8846faa124", + "symbol_name": "WorkerSupervisor", + "qname": "WorkerSupervisor", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "77609d9d5927171cce7fc3a54897c183fd63068710c6362029b700937aae5eee", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowEngine", + "span_start": 10, + "span_end": 86, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "57ec0a9f11c542c78e008684a888397e8d9ef4223671acb2567e631a0cbc70b4", + "symbol_name": "WorkflowEngine", + "qname": "WorkflowEngine", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": null, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": null, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": null, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.start calls asyncio.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.start:calls", + "span_start": 22, + "span_end": 22, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "4e0b3147fb867d48d26567570c259f4052a739e3098133802d4b8bafcf03be6b", + "edge_type": "calls", + "src_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "src_qname": "ControlPlaneService.start", + "dst_symbol_id": null, + "dst_ref": "asyncio.run", + "resolution": "partial", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.register_channel reads_attr ControlPlaneService._channels", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.register_channel:reads_attr", + "span_start": 17, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "3101fdc99a7a9c5aebf18a024bc148d37b348248a6fd02b95724dff280f2908a", + "edge_type": "reads_attr", + "src_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "src_qname": "ControlPlaneService.register_channel", + "dst_symbol_id": null, + "dst_ref": "ControlPlaneService._channels", + "resolution": "partial", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.start reads_attr ControlPlaneService._channels", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.start:reads_attr", + "span_start": 20, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "9452e50ef27d47c30ee1c311c48fe73ecddbf7a6dbcf967a6345e98222d9f71a", + "edge_type": "reads_attr", + "src_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "src_qname": "ControlPlaneService.start", + "dst_symbol_id": null, + "dst_ref": "ControlPlaneService._channels", + "resolution": "partial", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "const ControlPlaneService\nControlPlaneService = app_runtime.control.service.ControlPlaneService", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlPlaneService", + "span_start": 7, + "span_end": 7, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "3030804d119fa1d4b8a6c32616062a5e11080b03d33818c9280bcc5bdd8fd512", + "qname": "ControlPlaneService", + "kind": "const", + "signature": "ControlPlaneService = app_runtime.control.service.ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/control.py", + "content": "const ControlPlaneService\nControlPlaneService = app_runtime.control.service.ControlPlaneService", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlPlaneService", + "span_start": 3, + "span_end": 3, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "bd7f620031a049b8d791534536941ce75071029542395a7bb14817742827070a", + "qname": "ControlPlaneService", + "kind": "const", + "signature": "ControlPlaneService = app_runtime.control.service.ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.plba.control", + "is_test": false, + "blob_sha": "31bd5c4481bfa7fbca8fae56d4860a67e3953ca74474ac8439e1f39b685d7bc8", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "class ControlPlaneService\nControlPlaneService", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "qname": "ControlPlaneService", + "kind": "class", + "signature": "ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "const ControlPlaneService\nControlPlaneService = app_runtime.control.service.ControlPlaneService", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlPlaneService", + "span_start": 3, + "span_end": 3, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "217e8f044d1c01644bf7b81e5046af9e84469210c692a2fb0c476a19bb069ae1", + "qname": "ControlPlaneService", + "kind": "const", + "signature": "ControlPlaneService = app_runtime.control.service.ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/__init__.py", + "content": "const ControlPlaneService\nControlPlaneService = plba.control.ControlPlaneService", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlPlaneService", + "span_start": 3, + "span_end": 3, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "90b154d49d544efb7c448e91bf5b75231578a6571b98c06a2a555fa5dcffb152", + "qname": "ControlPlaneService", + "kind": "const", + "signature": "ControlPlaneService = plba.control.ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "const ControlChannel\nControlChannel = app_runtime.control.base.ControlChannel", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlChannel", + "span_start": 1, + "span_end": 1, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "268420f7aa4ed74082b9276cae0cded4f00bac090ffd58fa020a65be0fe19c27", + "qname": "ControlChannel", + "kind": "const", + "signature": "ControlChannel = app_runtime.control.base.ControlChannel", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlChannel(ABC):\n @abstractmethod\n async def start(self, actions: ControlActionSet) -> None:\n \"\"\"Start the control channel and bind handlers.\"\"\"\n\n @abstractmethod\n async def stop(self) -> None:\n \"\"\"Stop the control channel and release resources.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\"ControlActionSet\", \"ControlChannel\", \"ControlPlaneService\", \"HttpControlChannel\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/__init__.py:1-5", + "span_start": 1, + "span_end": 5, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlActionSet:\n health: HealthHandler\n start: ActionHandler\n stop: ActionHandler\n status: ActionHandler", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "class HttpControlAppFactory:\n def create(\n self,\n health_provider: Callable[[], Awaitable[HealthPayload]],\n action_provider: Callable[[str, str], Awaitable[JSONResponse]],\n ) -> FastAPI:\n app = FastAPI(title=\"PLBA Control API\")\n\n @app.middleware(\"http\")\n async def log_api_call(request: Request, call_next): # type: ignore[no-untyped-def]\n started = time.monotonic()\n response = await call_next(request)\n response.headers[\"X-Response-Time-Ms\"] = str(int((time.monotonic() - started) * 1000))\n return response\n\n @app.get(\"/health\")\n async def health() -> JSONResponse:\n payload = await health_provider()\n status_code = 200 if payload.get(\"status\") == \"ok\" else 503\n return JSONResponse(content=payload, status_code=status_code)\n\n @app.get(\"/actions/{action}\")\n @app.post(\"/actions/{action}\")\n async def action(action: str, request: Request) -> JSONResponse:\n client_source = self._client_source(request)\n if action in {\"start\", \"stop\"}:\n LOGGER.warning(\"Control action requested: /actions/%s client=%s\", action, client_source)\n return await action_provider(action, client_source)\n\n return app\n\n def _client_source(self, request: Request) -> str:\n explicit_header = request.headers.get(\"X-Client-Source\", \"\").strip()\n if explicit_header:\n return explicit_header\n user_agent = request.headers.get(\"User-Agent\", \"\").strip()\n if user_agent:\n return f\"user-agent:{user_agent}\"\n return \"unknown\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_app.py:HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "retrieval_report": { + "executed_layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C4_SEMANTIC_ROLES": "vector", + "C3_ENTRYPOINTS": "vector", + "C2_DEPENDENCY_GRAPH": "vector", + "C1_SYMBOL_CATALOG": "vector", + "C0_SOURCE_CHUNKS": "vector" + }, + "top_k_by_layer": { + "C4_SEMANTIC_ROLES": 12, + "C3_ENTRYPOINTS": 8, + "C2_DEPENDENCY_GRAPH": 8, + "C1_SYMBOL_CATALOG": 6, + "C0_SOURCE_CHUNKS": 4 + }, + "filters_by_layer": { + "C4_SEMANTIC_ROLES": { + "path_scope": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [] + }, + "C1_SYMBOL_CATALOG": { + "path_scope": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [] + } + }, + "fallback": { + "used": false, + "reason": null + }, + "retrieval_by_layer_ms": { + "C4_SEMANTIC_ROLES": 37, + "C3_ENTRYPOINTS": 18, + "C2_DEPENDENCY_GRAPH": 61, + "C1_SYMBOL_CATALOG": 24, + "C0_SOURCE_CHUNKS": 16 + } + } + }, + "diagnostics": { + "intent_correct": null, + "target_found": true, + "layers_used": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ], + "retrieval_sufficient": true, + "answer_mode": "normal", + "router_result": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "ARCHITECTURE", + "path_scope": [], + "layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ], + "symbol_resolution_status": "resolved" + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Какие компоненты участвуют в ControlPlaneService?", + "sub_intent": "ARCHITECTURE", + "path_scope": [], + "requested_layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "C4_SEMANTIC_ROLES", + "hit_count": 12, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C3_ENTRYPOINTS", + "hit_count": 3, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 6, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 4, + "empty": false, + "fallback_used": false + } + ], + "empty_layers": [], + "evidence_gate_decision": { + "sufficient": true, + "failure_reasons": [], + "evidence_count": 33 + }, + "failure_reasons": [], + "timings_ms": { + "router": 0, + "retrieval": 158, + "pre_evidence_gate": 0, + "llm": 2251 + } + }, + "rag_rows": [ + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/queue/in_memory.py", + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)", + "layer": "C4_SEMANTIC_ROLES", + "title": "InMemoryTaskQueue", + "span_start": 9, + "span_end": 38, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 22, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "2da04cb94544a3bcbf0943a95ad4bdd8710bcafaa32a02fd0e4de2178dcf3533", + "symbol_name": "InMemoryTaskQueue", + "qname": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 9, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "58f0cc001ccda0eee4c6bc32ed83bd05eafd6b6644f1e8b4aa9eed3103db73dc", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "ConfigFileLoader\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (8)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ConfigFileLoader", + "span_start": 11, + "span_end": 48, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 23, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "a8474eca8b6e9dc86ae67ed68b16fa5fb639ef08739c053e7b7195489765667f", + "symbol_name": "ConfigFileLoader", + "qname": "ConfigFileLoader", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 8, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/store.py", + "content": "TraceContextStore\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "TraceContextStore", + "span_start": 15, + "span_end": 52, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b2dad4fbe16ffb11b58deba311c7739955c39d59f291b22181f33e9c8cce4059", + "symbol_name": "TraceContextStore", + "qname": "TraceContextStore", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "d369554f08fc92039c6edd5a2a1e73b23901533e8974459170bbd9347d263dc5", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workers/supervisor.py", + "content": "WorkerSupervisor\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkerSupervisor", + "span_start": 10, + "span_end": 59, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "c17b44e8d9e97d490989b21fa67d7c346cdda8a0472e4c41fb243c8846faa124", + "symbol_name": "WorkerSupervisor", + "qname": "WorkerSupervisor", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "77609d9d5927171cce7fc3a54897c183fd63068710c6362029b700937aae5eee", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowEngine", + "span_start": 10, + "span_end": 86, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "57ec0a9f11c542c78e008684a888397e8d9ef4223671acb2567e631a0cbc70b4", + "symbol_name": "WorkflowEngine", + "qname": "WorkflowEngine", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.start calls asyncio.run", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.start:calls", + "span_start": 22, + "span_end": 22, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "4e0b3147fb867d48d26567570c259f4052a739e3098133802d4b8bafcf03be6b", + "edge_type": "calls", + "src_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "src_qname": "ControlPlaneService.start", + "dst_symbol_id": null, + "dst_ref": "asyncio.run", + "resolution": "partial", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.register_channel reads_attr ControlPlaneService._channels", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.register_channel:reads_attr", + "span_start": 17, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3101fdc99a7a9c5aebf18a024bc148d37b348248a6fd02b95724dff280f2908a", + "edge_type": "reads_attr", + "src_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "src_qname": "ControlPlaneService.register_channel", + "dst_symbol_id": null, + "dst_ref": "ControlPlaneService._channels", + "resolution": "partial", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.start reads_attr ControlPlaneService._channels", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.start:reads_attr", + "span_start": 20, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "9452e50ef27d47c30ee1c311c48fe73ecddbf7a6dbcf967a6345e98222d9f71a", + "edge_type": "reads_attr", + "src_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "src_qname": "ControlPlaneService.start", + "dst_symbol_id": null, + "dst_ref": "ControlPlaneService._channels", + "resolution": "partial", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "const ControlPlaneService\nControlPlaneService = app_runtime.control.service.ControlPlaneService", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlPlaneService", + "span_start": 7, + "span_end": 7, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "3030804d119fa1d4b8a6c32616062a5e11080b03d33818c9280bcc5bdd8fd512", + "qname": "ControlPlaneService", + "kind": "const", + "signature": "ControlPlaneService = app_runtime.control.service.ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/control.py", + "content": "const ControlPlaneService\nControlPlaneService = app_runtime.control.service.ControlPlaneService", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlPlaneService", + "span_start": 3, + "span_end": 3, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "bd7f620031a049b8d791534536941ce75071029542395a7bb14817742827070a", + "qname": "ControlPlaneService", + "kind": "const", + "signature": "ControlPlaneService = app_runtime.control.service.ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.plba.control", + "is_test": false, + "blob_sha": "31bd5c4481bfa7fbca8fae56d4860a67e3953ca74474ac8439e1f39b685d7bc8", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "class ControlPlaneService\nControlPlaneService", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "qname": "ControlPlaneService", + "kind": "class", + "signature": "ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "const ControlPlaneService\nControlPlaneService = app_runtime.control.service.ControlPlaneService", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlPlaneService", + "span_start": 3, + "span_end": 3, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "217e8f044d1c01644bf7b81e5046af9e84469210c692a2fb0c476a19bb069ae1", + "qname": "ControlPlaneService", + "kind": "const", + "signature": "ControlPlaneService = app_runtime.control.service.ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/__init__.py", + "content": "const ControlPlaneService\nControlPlaneService = plba.control.ControlPlaneService", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlPlaneService", + "span_start": 3, + "span_end": 3, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "90b154d49d544efb7c448e91bf5b75231578a6571b98c06a2a555fa5dcffb152", + "qname": "ControlPlaneService", + "kind": "const", + "signature": "ControlPlaneService = plba.control.ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "const ControlChannel\nControlChannel = app_runtime.control.base.ControlChannel", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlChannel", + "span_start": 1, + "span_end": 1, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "268420f7aa4ed74082b9276cae0cded4f00bac090ffd58fa020a65be0fe19c27", + "qname": "ControlChannel", + "kind": "const", + "signature": "ControlChannel = app_runtime.control.base.ControlChannel", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlChannel(ABC):\n @abstractmethod\n async def start(self, actions: ControlActionSet) -> None:\n \"\"\"Start the control channel and bind handlers.\"\"\"\n\n @abstractmethod\n async def stop(self) -> None:\n \"\"\"Stop the control channel and release resources.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\"ControlActionSet\", \"ControlChannel\", \"ControlPlaneService\", \"HttpControlChannel\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/__init__.py:1-5", + "span_start": 1, + "span_end": 5, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlActionSet:\n health: HealthHandler\n start: ActionHandler\n stop: ActionHandler\n status: ActionHandler", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "class HttpControlAppFactory:\n def create(\n self,\n health_provider: Callable[[], Awaitable[HealthPayload]],\n action_provider: Callable[[str, str], Awaitable[JSONResponse]],\n ) -> FastAPI:\n app = FastAPI(title=\"PLBA Control API\")\n\n @app.middleware(\"http\")\n async def log_api_call(request: Request, call_next): # type: ignore[no-untyped-def]\n started = time.monotonic()\n response = await call_next(request)\n response.headers[\"X-Response-Time-Ms\"] = str(int((time.monotonic() - started) * 1000))\n return response\n\n @app.get(\"/health\")\n async def health() -> JSONResponse:\n payload = await health_provider()\n status_code = 200 if payload.get(\"status\") == \"ok\" else 503\n return JSONResponse(content=payload, status_code=status_code)\n\n @app.get(\"/actions/{action}\")\n @app.post(\"/actions/{action}\")\n async def action(action: str, request: Request) -> JSONResponse:\n client_source = self._client_source(request)\n if action in {\"start\", \"stop\"}:\n LOGGER.warning(\"Control action requested: /actions/%s client=%s\", action, client_source)\n return await action_provider(action, client_source)\n\n return app\n\n def _client_source(self, request: Request) -> str:\n explicit_header = request.headers.get(\"X-Client-Source\", \"\").strip()\n if explicit_header:\n return explicit_header\n user_agent = request.headers.get(\"User-Agent\", \"\").strip()\n if user_agent:\n return f\"user-agent:{user_agent}\"\n return \"unknown\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_app.py:HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "validation": { + "passed": true, + "action": "return", + "reasons": [] + }, + "steps": [ + { + "step": "router", + "status": "completed", + "timings_ms": { + "router": 0 + }, + "output": { + "intent": "CODE_QA", + "sub_intent": "ARCHITECTURE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + } + }, + { + "step": "retrieval", + "status": "completed", + "timings_ms": { + "retrieval": 158 + }, + "output": { + "rag_count": 33, + "answer_path_rag_count": 33, + "resolved_symbol_status": "resolved", + "resolved_symbol": "ControlPlaneService", + "requested_layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ] + }, + "diagnostics": { + "executed_layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C4_SEMANTIC_ROLES": "vector", + "C3_ENTRYPOINTS": "vector", + "C2_DEPENDENCY_GRAPH": "vector", + "C1_SYMBOL_CATALOG": "vector", + "C0_SOURCE_CHUNKS": "vector" + }, + "top_k_by_layer": { + "C4_SEMANTIC_ROLES": 12, + "C3_ENTRYPOINTS": 8, + "C2_DEPENDENCY_GRAPH": 8, + "C1_SYMBOL_CATALOG": 6, + "C0_SOURCE_CHUNKS": 4 + }, + "filters_by_layer": { + "C4_SEMANTIC_ROLES": { + "path_scope": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [] + }, + "C1_SYMBOL_CATALOG": { + "path_scope": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [] + } + }, + "fallback": { + "used": false, + "reason": null + }, + "retrieval_by_layer_ms": { + "C4_SEMANTIC_ROLES": 37, + "C3_ENTRYPOINTS": 18, + "C2_DEPENDENCY_GRAPH": 61, + "C1_SYMBOL_CATALOG": 24, + "C0_SOURCE_CHUNKS": 16 + } + } + }, + { + "step": "pre_evidence_gate", + "status": "passed", + "timings_ms": { + "pre_evidence_gate": 0 + }, + "output": { + "passed": true, + "failure_reasons": [], + "degraded_message": "" + } + }, + { + "step": "llm", + "status": "completed", + "timings_ms": { + "llm": 2251 + }, + "output": { + "prompt_name": "code_qa_architecture_answer", + "answer_preview": "В системе ControlPlaneService участвуют следующие компоненты:\n\n1. **ControlPlaneService** – главный объект управления, инициализирующий каналы и запускающий асинхронные операции. Он создает и управляет экземплярами каналов, участвующих в управлении данными и событиями.\n - Создаёт каналы с помощью " + } + }, + { + "step": "post_evidence_gate", + "status": "passed", + "timings_ms": { + "post_evidence_gate": 0, + "repair": 0 + }, + "output": { + "passed": true, + "reasons": [], + "repair_used": false + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-architecture-control-plane.md b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-architecture-control-plane.md new file mode 100644 index 0000000..4c1abb4 --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-architecture-control-plane.md @@ -0,0 +1,247 @@ +# plba-v2-architecture-control-plane + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: agent_runtime +- mode: full_chain +- passed: True + +## Query +Какие компоненты участвуют в ControlPlaneService? + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "ARCHITECTURE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 33, + "llm_answer": "В системе ControlPlaneService участвуют следующие компоненты:\n\n1. **ControlPlaneService** – главный объект управления, инициализирующий каналы и запускающий асинхронные операции. Он создает и управляет экземплярами каналов, участвующих в управлении данными и событиями.\n - Создаёт каналы с помощью `register_channel`.\n - Запускает и останавливает сервис с помощью методов `start` и `stop`.\n\n2. **ControlChannel** – абстрактный класс для реализации конкретных каналов управления. Подклассами являются HttpControlChannel и WorkerSupervisor.\n - Реализует метод `start`, предназначенный для запуска канала и привязки обработчиков событий.\n - Реализует метод `stop`, используемый для завершения работы и освобождения ресурсов.\n\n3. **HttpControlChannel** – конкретный канал управления HTTP-запросами, участвующий в обработке запросов API.\n - Регистрируется в ControlPlaneService через метод `register_channel`.\n - Обрабатывает входящие запросы с использованием FastAPI.\n\n4. **WorkerSupervisor** – управляет рабочими процессами и координирует выполнение задач.\n - Также регистрируется в ControlPlaneService и участвует в общем управлении системой.\n\nЭти компоненты взаимодействуют через создание и управление каналами, обработку событий и координацию рабочих процессов. Контроль состояния осуществляется через чтение и запись атрибутов состояния.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "ControlPlaneService" + ], + "layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ] +} + +## Steps +[ + { + "step": "router", + "status": "completed", + "timings_ms": { + "router": 0 + }, + "output": { + "intent": "CODE_QA", + "sub_intent": "ARCHITECTURE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + } + }, + { + "step": "retrieval", + "status": "completed", + "timings_ms": { + "retrieval": 158 + }, + "output": { + "rag_count": 33, + "answer_path_rag_count": 33, + "resolved_symbol_status": "resolved", + "resolved_symbol": "ControlPlaneService", + "requested_layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ] + }, + "diagnostics": { + "executed_layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C4_SEMANTIC_ROLES": "vector", + "C3_ENTRYPOINTS": "vector", + "C2_DEPENDENCY_GRAPH": "vector", + "C1_SYMBOL_CATALOG": "vector", + "C0_SOURCE_CHUNKS": "vector" + }, + "top_k_by_layer": { + "C4_SEMANTIC_ROLES": 12, + "C3_ENTRYPOINTS": 8, + "C2_DEPENDENCY_GRAPH": 8, + "C1_SYMBOL_CATALOG": 6, + "C0_SOURCE_CHUNKS": 4 + }, + "filters_by_layer": { + "C4_SEMANTIC_ROLES": { + "path_scope": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [] + }, + "C1_SYMBOL_CATALOG": { + "path_scope": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [] + } + }, + "fallback": { + "used": false, + "reason": null + }, + "retrieval_by_layer_ms": { + "C4_SEMANTIC_ROLES": 37, + "C3_ENTRYPOINTS": 18, + "C2_DEPENDENCY_GRAPH": 61, + "C1_SYMBOL_CATALOG": 24, + "C0_SOURCE_CHUNKS": 16 + } + } + }, + { + "step": "pre_evidence_gate", + "status": "passed", + "timings_ms": { + "pre_evidence_gate": 0 + }, + "output": { + "passed": true, + "failure_reasons": [], + "degraded_message": "" + } + }, + { + "step": "llm", + "status": "completed", + "timings_ms": { + "llm": 2251 + }, + "output": { + "prompt_name": "code_qa_architecture_answer", + "answer_preview": "В системе ControlPlaneService участвуют следующие компоненты:\n\n1. **ControlPlaneService** – главный объект управления, инициализирующий каналы и запускающий асинхронные операции. Он создает и управляет экземплярами каналов, участвующих в управлении данными и событиями.\n - Создаёт каналы с помощью " + } + }, + { + "step": "post_evidence_gate", + "status": "passed", + "timings_ms": { + "post_evidence_gate": 0, + "repair": 0 + }, + "output": { + "passed": true, + "reasons": [], + "repair_used": false + } + } +] + +## Diagnostics +{ + "intent_correct": null, + "target_found": true, + "layers_used": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ], + "retrieval_sufficient": true, + "answer_mode": "normal", + "router_result": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "ARCHITECTURE", + "path_scope": [], + "layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ], + "symbol_resolution_status": "resolved" + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Какие компоненты участвуют в ControlPlaneService?", + "sub_intent": "ARCHITECTURE", + "path_scope": [], + "requested_layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "C4_SEMANTIC_ROLES", + "hit_count": 12, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C3_ENTRYPOINTS", + "hit_count": 3, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 6, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 4, + "empty": false, + "fallback_used": false + } + ], + "empty_layers": [], + "evidence_gate_decision": { + "sufficient": true, + "failure_reasons": [], + "evidence_count": 33 + }, + "failure_reasons": [], + "timings_ms": { + "router": 0, + "retrieval": 158, + "pre_evidence_gate": 0, + "llm": 2251 + } +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-architecture-runtime-manager.json b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-architecture-runtime-manager.json new file mode 100644 index 0000000..1e733da --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-architecture-runtime-manager.json @@ -0,0 +1,4494 @@ +{ + "case_id": "plba-v2-architecture-runtime-manager", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "agent_runtime", + "mode": "full_chain", + "query": "Какие компоненты участвуют в RuntimeManager?", + "actual": { + "intent": "CODE_QA", + "sub_intent": "ARCHITECTURE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 33, + "llm_answer": "В подсистеме RuntimeManager участвуют следующие компоненты:\n\n1. **RuntimeManager** — главный менеджер runtime, отвечает за конфигурацию и запуск runtime-потоков (src/app_runtime/core/runtime.py).\n2. **ControlPlaneService** — сервис управления каналами контроля, обеспечивает регистрацию каналов и старт/стоп операций (src/app_runtime/control/service.py).\n3. **ControlChannel** — абстрактный канал управления, определяющий интерфейсы для запуска и остановки канала (src/app_runtime/control/base.py).\n4. **UvicornThreadRunner** — реализует uvicorn thread runner для обработки HTTP-запросов (src/app_runtime/control/http_runner.py).\n5. **HttpControlChannel** — HTTP-канал управления, участвует в управлении состояниями и операциях (src/app_runtime/control/http_channel.py).\n6. **HttpControlAppFactory** — фабрика для создания fastAPI приложений с контролем состояний (src/app_runtime/control/http_app.py).\n7. **WorkflowPersistence** — сохраняет состояние workflow-потоков (src/app_runtime/workflow/persistence/workflow_persistence.py).\n8. **InMemoryTaskQueue** — очередь задач в памяти, используется для хранения и обработки заданий (src/app_runtime/queue/in_memory.py).\n9. **ConfigFileLoader** — загружает конфигурации из файлов (src/app_runtime/config/file_loader.py).\n10. **TraceContextStore** — хранит контекст трассировки для отслеживания выполнения потоков (src/app_runtime/tracing/store.py).\n11. **WorkerSupervisor** — управляет рабочими процессами и их мониторингом (src/app_runtime/workers/supervisor.py).\n\nВсе эти компоненты взаимодействуют через общую инфраструктуру runtime, обмениваясь данными и событиями, участвуя в общем потоке управления и исполнения задач.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "query": "Какие компоненты участвуют в RuntimeManager?", + "router_result": { + "schema_version": "1.1", + "intent": "CODE_QA", + "retrieval_profile": "code", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query_plan": { + "raw": "Какие компоненты участвуют в RuntimeManager?", + "normalized": "Какие компоненты участвуют в RuntimeManager?", + "sub_intent": "ARCHITECTURE", + "negations": [], + "expansions": [ + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "doc_scope_hints": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "symbol_kind_hint": "class", + "anchors": [ + { + "type": "SYMBOL", + "value": "RuntimeManager", + "source": "user_text", + "subtype": null, + "span": { + "start": 29, + "end": 43 + }, + "confidence": 0.88 + } + ] + }, + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C4_SEMANTIC_ROLES", + "top_k": 12 + }, + { + "layer_id": "C3_ENTRYPOINTS", + "top_k": 8 + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "top_k": 8 + }, + { + "layer_id": "C1_SYMBOL_CATALOG", + "top_k": 6 + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 4 + } + ], + "filters": { + "test_policy": "EXCLUDE", + "path_scope": [], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager", + "RuntimeManager", + "RuntimeManager", + "RuntimeManager", + "RuntimeManager" + ], + "confidence": 0.99 + }, + "evidence_policy": { + "require_def": true, + "require_flow": true, + "require_spec": false, + "allow_answer_without_evidence": false + } + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Какие компоненты участвуют в RuntimeManager?", + "sub_intent": "ARCHITECTURE", + "path_scope": [], + "keyword_hints": [ + "RuntimeManager" + ], + "symbol_candidates": [ + "RuntimeManager" + ], + "requested_layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ], + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C4_SEMANTIC_ROLES", + "top_k": 12 + }, + { + "layer_id": "C3_ENTRYPOINTS", + "top_k": 8 + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "top_k": 8 + }, + { + "layer_id": "C1_SYMBOL_CATALOG", + "top_k": 6 + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 4 + } + ], + "filters": { + "test_policy": "EXCLUDE", + "path_scope": [], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + }, + "query_plan": { + "raw": "Какие компоненты участвуют в RuntimeManager?", + "normalized": "Какие компоненты участвуют в RuntimeManager?", + "sub_intent": "ARCHITECTURE", + "negations": [], + "expansions": [ + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "doc_scope_hints": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "symbol_kind_hint": "class", + "anchors": [ + { + "type": "SYMBOL", + "value": "RuntimeManager", + "source": "user_text", + "subtype": null, + "span": { + "start": 29, + "end": 43 + }, + "confidence": 0.88 + } + ] + } + }, + "retrieval_result": { + "target_symbol_candidates": [ + "RuntimeManager", + "ControlChannel" + ], + "resolved_symbol": "RuntimeManager", + "symbol_resolution_status": "resolved", + "file_candidates": [ + "src/app_runtime/core/runtime.py", + "src/app_runtime/control/base.py", + "src/app_runtime/control/service.py", + "src/app_runtime/control/http_runner.py", + "src/app_runtime/control/http_channel.py", + "src/app_runtime/control/http_app.py", + "src/app_runtime/workflow/persistence/workflow_persistence.py", + "src/app_runtime/queue/in_memory.py", + "src/app_runtime/config/file_loader.py", + "src/app_runtime/tracing/store.py", + "src/app_runtime/workers/supervisor.py", + "src/plba/__init__.py", + "src/plba/core.py", + "src/plba/bootstrap.py", + "src/app_runtime/control/__init__.py" + ], + "code_chunks": [ + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/core/runtime.py", + "title": "RuntimeManager", + "content": "RuntimeManager\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests manager\n- orchestrates role-like calls (4)\n- reads and writes state attributes\n- participates in dataflow slices (50)", + "start_line": 18, + "end_line": 179, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "symbol_name": "RuntimeManager", + "qname": "RuntimeManager", + "role": "pipeline_stage", + "confidence": 0.67, + "dataflow_participation": 50, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/base.py", + "title": "ControlActionSet", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "start_line": 14, + "end_line": 18, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/base.py", + "title": "ControlChannel", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "start_line": 21, + "end_line": 28, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "start_line": 12, + "end_line": 52, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/http_runner.py", + "title": "UvicornThreadRunner", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "start_line": 10, + "end_line": 61, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/http_channel.py", + "title": "HttpControlChannel", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "start_line": 12, + "end_line": 57, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/http_app.py", + "title": "HttpControlAppFactory", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "start_line": 15, + "end_line": 53, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "title": "WorkflowPersistence", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "start_line": 8, + "end_line": 54, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/queue/in_memory.py", + "title": "InMemoryTaskQueue", + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)", + "start_line": 9, + "end_line": 38, + "metadata": { + "symbol_id": "2da04cb94544a3bcbf0943a95ad4bdd8710bcafaa32a02fd0e4de2178dcf3533", + "symbol_name": "InMemoryTaskQueue", + "qname": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 9, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "58f0cc001ccda0eee4c6bc32ed83bd05eafd6b6644f1e8b4aa9eed3103db73dc", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/config/file_loader.py", + "title": "ConfigFileLoader", + "content": "ConfigFileLoader\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (8)", + "start_line": 11, + "end_line": 48, + "metadata": { + "symbol_id": "a8474eca8b6e9dc86ae67ed68b16fa5fb639ef08739c053e7b7195489765667f", + "symbol_name": "ConfigFileLoader", + "qname": "ConfigFileLoader", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 8, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/tracing/store.py", + "title": "TraceContextStore", + "content": "TraceContextStore\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "start_line": 15, + "end_line": 52, + "metadata": { + "symbol_id": "b2dad4fbe16ffb11b58deba311c7739955c39d59f291b22181f33e9c8cce4059", + "symbol_name": "TraceContextStore", + "qname": "TraceContextStore", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "d369554f08fc92039c6edd5a2a1e73b23901533e8974459170bbd9347d263dc5", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/workers/supervisor.py", + "title": "WorkerSupervisor", + "content": "WorkerSupervisor\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "start_line": 10, + "end_line": 59, + "metadata": { + "symbol_id": "c17b44e8d9e97d490989b21fa67d7c346cdda8a0472e4c41fb243c8846faa124", + "symbol_name": "WorkerSupervisor", + "qname": "WorkerSupervisor", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "77609d9d5927171cce7fc3a54897c183fd63068710c6362029b700937aae5eee", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C3_ENTRYPOINTS", + "path": "src/app_runtime/control/http_app.py", + "title": "app.post", + "content": "fastapi http app.post", + "start_line": 38, + "end_line": 42, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C3_ENTRYPOINTS", + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "content": "fastapi http app.get", + "start_line": 31, + "end_line": 34, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C3_ENTRYPOINTS", + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "content": "fastapi http app.get", + "start_line": 38, + "end_line": 42, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "start_line": 14, + "end_line": 47, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/core/runtime.py", + "title": "RuntimeManager.__init__:dataflow_slice", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.start", + "start_line": 32, + "end_line": 59, + "metadata": { + "edge_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1", + "dst_ref": "RuntimeManager.start", + "resolution": "resolved", + "slice_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.start" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "start_line": 14, + "end_line": 20, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "start_line": 14, + "end_line": 25, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "start_line": 14, + "end_line": 51, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/core/runtime.py", + "title": "RuntimeManager.__init__:dataflow_slice", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file", + "start_line": 32, + "end_line": 52, + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "start_line": 14, + "end_line": 17, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/core/runtime.py", + "title": "RuntimeManager.__init__:dataflow_slice", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager._register_core_services", + "start_line": 32, + "end_line": 127, + "metadata": { + "edge_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6", + "dst_ref": "RuntimeManager._register_core_services", + "resolution": "resolved", + "slice_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager._register_core_services" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/plba/__init__.py", + "title": "RuntimeManager", + "content": "const RuntimeManager\nRuntimeManager = plba.core.RuntimeManager", + "start_line": 16, + "end_line": 16, + "metadata": { + "symbol_id": "7eacec84f9b8d6c4201374591faecdac7493091c263681495c338973f2971ad9", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = plba.core.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/plba/core.py", + "title": "RuntimeManager", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "start_line": 2, + "end_line": 2, + "metadata": { + "symbol_id": "e1684562d978b7af7fe9b27dc5869d770348a87b5dc19a50360f58544668578b", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.core", + "is_test": false, + "blob_sha": "c0ae25110d20e665216616e26b68adfe035b624ba45d31d1272fb21f906f9ca8", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/service.py", + "title": "RuntimeManager", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "start_line": 9, + "end_line": 9, + "metadata": { + "symbol_id": "62a9575c77aad894120d18b4f2a08cf2ba42f77e9be4a8a432b767d157701afe", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/core/runtime.py", + "title": "RuntimeManager", + "content": "class RuntimeManager\nRuntimeManager", + "start_line": 18, + "end_line": 179, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "qname": "RuntimeManager", + "kind": "class", + "signature": "RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/plba/bootstrap.py", + "title": "RuntimeManager", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "start_line": 4, + "end_line": 4, + "metadata": { + "symbol_id": "27158ca220022eeb5083c6addf8a50775d45f7161284fd60aac48410105f4b98", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/__init__.py", + "title": "ControlChannel", + "content": "const ControlChannel\nControlChannel = app_runtime.control.base.ControlChannel", + "start_line": 1, + "end_line": 1, + "metadata": { + "symbol_id": "268420f7aa4ed74082b9276cae0cded4f00bac090ffd58fa020a65be0fe19c27", + "qname": "ControlChannel", + "kind": "const", + "signature": "ControlChannel = app_runtime.control.base.ControlChannel", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/base.py", + "title": "src/app_runtime/control/base.py:ControlChannel", + "content": "class ControlChannel(ABC):\n @abstractmethod\n async def start(self, actions: ControlActionSet) -> None:\n \"\"\"Start the control channel and bind handlers.\"\"\"\n\n @abstractmethod\n async def stop(self) -> None:\n \"\"\"Stop the control channel and release resources.\"\"\"", + "start_line": 21, + "end_line": 28, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/__init__.py", + "title": "src/app_runtime/control/__init__.py:1-5", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\"ControlActionSet\", \"ControlChannel\", \"ControlPlaneService\", \"HttpControlChannel\"]", + "start_line": 1, + "end_line": 5, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/base.py", + "title": "src/app_runtime/control/base.py:ControlActionSet", + "content": "class ControlActionSet:\n health: HealthHandler\n start: ActionHandler\n stop: ActionHandler\n status: ActionHandler", + "start_line": 14, + "end_line": 18, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/http_app.py", + "title": "src/app_runtime/control/http_app.py:HttpControlAppFactory", + "content": "class HttpControlAppFactory:\n def create(\n self,\n health_provider: Callable[[], Awaitable[HealthPayload]],\n action_provider: Callable[[str, str], Awaitable[JSONResponse]],\n ) -> FastAPI:\n app = FastAPI(title=\"PLBA Control API\")\n\n @app.middleware(\"http\")\n async def log_api_call(request: Request, call_next): # type: ignore[no-untyped-def]\n started = time.monotonic()\n response = await call_next(request)\n response.headers[\"X-Response-Time-Ms\"] = str(int((time.monotonic() - started) * 1000))\n return response\n\n @app.get(\"/health\")\n async def health() -> JSONResponse:\n payload = await health_provider()\n status_code = 200 if payload.get(\"status\") == \"ok\" else 503\n return JSONResponse(content=payload, status_code=status_code)\n\n @app.get(\"/actions/{action}\")\n @app.post(\"/actions/{action}\")\n async def action(action: str, request: Request) -> JSONResponse:\n client_source = self._client_source(request)\n if action in {\"start\", \"stop\"}:\n LOGGER.warning(\"Control action requested: /actions/%s client=%s\", action, client_source)\n return await action_provider(action, client_source)\n\n return app\n\n def _client_source(self, request: Request) -> str:\n explicit_header = request.headers.get(\"X-Client-Source\", \"\").strip()\n if explicit_header:\n return explicit_header\n user_agent = request.headers.get(\"User-Agent\", \"\").strip()\n if user_agent:\n return f\"user-agent:{user_agent}\"\n return \"unknown\"", + "start_line": 15, + "end_line": 53, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "relations": [ + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async" + }, + { + "path": "src/app_runtime/core/runtime.py", + "metadata": { + "edge_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1", + "dst_ref": "RuntimeManager.start", + "resolution": "resolved", + "slice_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.start" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.start" + }, + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start" + }, + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop" + }, + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async" + }, + { + "path": "src/app_runtime/core/runtime.py", + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file" + }, + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel" + }, + { + "path": "src/app_runtime/core/runtime.py", + "metadata": { + "edge_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6", + "dst_ref": "RuntimeManager._register_core_services", + "resolution": "resolved", + "slice_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager._register_core_services" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager._register_core_services" + } + ], + "entrypoints": [ + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.post", + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "test_candidates": [], + "layer_outcomes": [ + { + "layer_id": "C4_SEMANTIC_ROLES", + "hit_count": 12, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C3_ENTRYPOINTS", + "hit_count": 3, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 6, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 4, + "empty": false, + "fallback_used": false + } + ], + "missing_layers": [], + "raw_rows": [ + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests manager\n- orchestrates role-like calls (4)\n- reads and writes state attributes\n- participates in dataflow slices (50)", + "layer": "C4_SEMANTIC_ROLES", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 43, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "symbol_name": "RuntimeManager", + "qname": "RuntimeManager", + "role": "pipeline_stage", + "confidence": 0.67, + "dataflow_participation": 50, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/queue/in_memory.py", + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)", + "layer": "C4_SEMANTIC_ROLES", + "title": "InMemoryTaskQueue", + "span_start": 9, + "span_end": 38, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 22, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "2da04cb94544a3bcbf0943a95ad4bdd8710bcafaa32a02fd0e4de2178dcf3533", + "symbol_name": "InMemoryTaskQueue", + "qname": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 9, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "58f0cc001ccda0eee4c6bc32ed83bd05eafd6b6644f1e8b4aa9eed3103db73dc", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "ConfigFileLoader\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (8)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ConfigFileLoader", + "span_start": 11, + "span_end": 48, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 23, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "a8474eca8b6e9dc86ae67ed68b16fa5fb639ef08739c053e7b7195489765667f", + "symbol_name": "ConfigFileLoader", + "qname": "ConfigFileLoader", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 8, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/store.py", + "content": "TraceContextStore\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "TraceContextStore", + "span_start": 15, + "span_end": 52, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "b2dad4fbe16ffb11b58deba311c7739955c39d59f291b22181f33e9c8cce4059", + "symbol_name": "TraceContextStore", + "qname": "TraceContextStore", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "d369554f08fc92039c6edd5a2a1e73b23901533e8974459170bbd9347d263dc5", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workers/supervisor.py", + "content": "WorkerSupervisor\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkerSupervisor", + "span_start": 10, + "span_end": 59, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "c17b44e8d9e97d490989b21fa67d7c346cdda8a0472e4c41fb243c8846faa124", + "symbol_name": "WorkerSupervisor", + "qname": "WorkerSupervisor", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "77609d9d5927171cce7fc3a54897c183fd63068710c6362029b700937aae5eee", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": null, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": null, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": null, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 59, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1", + "dst_ref": "RuntimeManager.start", + "resolution": "resolved", + "slice_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.start" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 52, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager._register_core_services", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 127, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6", + "dst_ref": "RuntimeManager._register_core_services", + "resolution": "resolved", + "slice_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager._register_core_services" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/__init__.py", + "content": "const RuntimeManager\nRuntimeManager = plba.core.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 16, + "span_end": 16, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "7eacec84f9b8d6c4201374591faecdac7493091c263681495c338973f2971ad9", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = plba.core.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/core.py", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 2, + "span_end": 2, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "e1684562d978b7af7fe9b27dc5869d770348a87b5dc19a50360f58544668578b", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.core", + "is_test": false, + "blob_sha": "c0ae25110d20e665216616e26b68adfe035b624ba45d31d1272fb21f906f9ca8", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 9, + "span_end": 9, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "62a9575c77aad894120d18b4f2a08cf2ba42f77e9be4a8a432b767d157701afe", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager\nRuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "qname": "RuntimeManager", + "kind": "class", + "signature": "RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 4, + "span_end": 4, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "27158ca220022eeb5083c6addf8a50775d45f7161284fd60aac48410105f4b98", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "const ControlChannel\nControlChannel = app_runtime.control.base.ControlChannel", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlChannel", + "span_start": 1, + "span_end": 1, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "268420f7aa4ed74082b9276cae0cded4f00bac090ffd58fa020a65be0fe19c27", + "qname": "ControlChannel", + "kind": "const", + "signature": "ControlChannel = app_runtime.control.base.ControlChannel", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlChannel(ABC):\n @abstractmethod\n async def start(self, actions: ControlActionSet) -> None:\n \"\"\"Start the control channel and bind handlers.\"\"\"\n\n @abstractmethod\n async def stop(self) -> None:\n \"\"\"Stop the control channel and release resources.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\"ControlActionSet\", \"ControlChannel\", \"ControlPlaneService\", \"HttpControlChannel\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/__init__.py:1-5", + "span_start": 1, + "span_end": 5, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlActionSet:\n health: HealthHandler\n start: ActionHandler\n stop: ActionHandler\n status: ActionHandler", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "class HttpControlAppFactory:\n def create(\n self,\n health_provider: Callable[[], Awaitable[HealthPayload]],\n action_provider: Callable[[str, str], Awaitable[JSONResponse]],\n ) -> FastAPI:\n app = FastAPI(title=\"PLBA Control API\")\n\n @app.middleware(\"http\")\n async def log_api_call(request: Request, call_next): # type: ignore[no-untyped-def]\n started = time.monotonic()\n response = await call_next(request)\n response.headers[\"X-Response-Time-Ms\"] = str(int((time.monotonic() - started) * 1000))\n return response\n\n @app.get(\"/health\")\n async def health() -> JSONResponse:\n payload = await health_provider()\n status_code = 200 if payload.get(\"status\") == \"ok\" else 503\n return JSONResponse(content=payload, status_code=status_code)\n\n @app.get(\"/actions/{action}\")\n @app.post(\"/actions/{action}\")\n async def action(action: str, request: Request) -> JSONResponse:\n client_source = self._client_source(request)\n if action in {\"start\", \"stop\"}:\n LOGGER.warning(\"Control action requested: /actions/%s client=%s\", action, client_source)\n return await action_provider(action, client_source)\n\n return app\n\n def _client_source(self, request: Request) -> str:\n explicit_header = request.headers.get(\"X-Client-Source\", \"\").strip()\n if explicit_header:\n return explicit_header\n user_agent = request.headers.get(\"User-Agent\", \"\").strip()\n if user_agent:\n return f\"user-agent:{user_agent}\"\n return \"unknown\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_app.py:HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "retrieval_report": { + "executed_layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C4_SEMANTIC_ROLES": "vector", + "C3_ENTRYPOINTS": "vector", + "C2_DEPENDENCY_GRAPH": "vector", + "C1_SYMBOL_CATALOG": "vector", + "C0_SOURCE_CHUNKS": "vector" + }, + "top_k_by_layer": { + "C4_SEMANTIC_ROLES": 12, + "C3_ENTRYPOINTS": 8, + "C2_DEPENDENCY_GRAPH": 8, + "C1_SYMBOL_CATALOG": 6, + "C0_SOURCE_CHUNKS": 4 + }, + "filters_by_layer": { + "C4_SEMANTIC_ROLES": { + "path_scope": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [] + }, + "C1_SYMBOL_CATALOG": { + "path_scope": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [] + } + }, + "fallback": { + "used": false, + "reason": null + }, + "retrieval_by_layer_ms": { + "C4_SEMANTIC_ROLES": 33, + "C3_ENTRYPOINTS": 19, + "C2_DEPENDENCY_GRAPH": 61, + "C1_SYMBOL_CATALOG": 24, + "C0_SOURCE_CHUNKS": 15 + } + } + }, + "diagnostics": { + "intent_correct": null, + "target_found": true, + "layers_used": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ], + "retrieval_sufficient": true, + "answer_mode": "normal", + "router_result": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "ARCHITECTURE", + "path_scope": [], + "layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ], + "symbol_resolution_status": "resolved" + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Какие компоненты участвуют в RuntimeManager?", + "sub_intent": "ARCHITECTURE", + "path_scope": [], + "requested_layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "C4_SEMANTIC_ROLES", + "hit_count": 12, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C3_ENTRYPOINTS", + "hit_count": 3, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 6, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 4, + "empty": false, + "fallback_used": false + } + ], + "empty_layers": [], + "evidence_gate_decision": { + "sufficient": true, + "failure_reasons": [], + "evidence_count": 33 + }, + "failure_reasons": [], + "timings_ms": { + "router": 0, + "retrieval": 155, + "pre_evidence_gate": 0, + "llm": 2995 + } + }, + "rag_rows": [ + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests manager\n- orchestrates role-like calls (4)\n- reads and writes state attributes\n- participates in dataflow slices (50)", + "layer": "C4_SEMANTIC_ROLES", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 43, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "symbol_name": "RuntimeManager", + "qname": "RuntimeManager", + "role": "pipeline_stage", + "confidence": 0.67, + "dataflow_participation": 50, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/queue/in_memory.py", + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)", + "layer": "C4_SEMANTIC_ROLES", + "title": "InMemoryTaskQueue", + "span_start": 9, + "span_end": 38, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 22, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "2da04cb94544a3bcbf0943a95ad4bdd8710bcafaa32a02fd0e4de2178dcf3533", + "symbol_name": "InMemoryTaskQueue", + "qname": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 9, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "58f0cc001ccda0eee4c6bc32ed83bd05eafd6b6644f1e8b4aa9eed3103db73dc", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "ConfigFileLoader\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (8)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ConfigFileLoader", + "span_start": 11, + "span_end": 48, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 23, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "a8474eca8b6e9dc86ae67ed68b16fa5fb639ef08739c053e7b7195489765667f", + "symbol_name": "ConfigFileLoader", + "qname": "ConfigFileLoader", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 8, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/store.py", + "content": "TraceContextStore\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "TraceContextStore", + "span_start": 15, + "span_end": 52, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b2dad4fbe16ffb11b58deba311c7739955c39d59f291b22181f33e9c8cce4059", + "symbol_name": "TraceContextStore", + "qname": "TraceContextStore", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "d369554f08fc92039c6edd5a2a1e73b23901533e8974459170bbd9347d263dc5", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workers/supervisor.py", + "content": "WorkerSupervisor\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkerSupervisor", + "span_start": 10, + "span_end": 59, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "c17b44e8d9e97d490989b21fa67d7c346cdda8a0472e4c41fb243c8846faa124", + "symbol_name": "WorkerSupervisor", + "qname": "WorkerSupervisor", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "77609d9d5927171cce7fc3a54897c183fd63068710c6362029b700937aae5eee", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 59, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1", + "dst_ref": "RuntimeManager.start", + "resolution": "resolved", + "slice_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.start" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 52, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager._register_core_services", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 127, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6", + "dst_ref": "RuntimeManager._register_core_services", + "resolution": "resolved", + "slice_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager._register_core_services" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/__init__.py", + "content": "const RuntimeManager\nRuntimeManager = plba.core.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 16, + "span_end": 16, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "7eacec84f9b8d6c4201374591faecdac7493091c263681495c338973f2971ad9", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = plba.core.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/core.py", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 2, + "span_end": 2, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "e1684562d978b7af7fe9b27dc5869d770348a87b5dc19a50360f58544668578b", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.core", + "is_test": false, + "blob_sha": "c0ae25110d20e665216616e26b68adfe035b624ba45d31d1272fb21f906f9ca8", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 9, + "span_end": 9, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "62a9575c77aad894120d18b4f2a08cf2ba42f77e9be4a8a432b767d157701afe", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager\nRuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "qname": "RuntimeManager", + "kind": "class", + "signature": "RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 4, + "span_end": 4, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "27158ca220022eeb5083c6addf8a50775d45f7161284fd60aac48410105f4b98", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "const ControlChannel\nControlChannel = app_runtime.control.base.ControlChannel", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlChannel", + "span_start": 1, + "span_end": 1, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "268420f7aa4ed74082b9276cae0cded4f00bac090ffd58fa020a65be0fe19c27", + "qname": "ControlChannel", + "kind": "const", + "signature": "ControlChannel = app_runtime.control.base.ControlChannel", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlChannel(ABC):\n @abstractmethod\n async def start(self, actions: ControlActionSet) -> None:\n \"\"\"Start the control channel and bind handlers.\"\"\"\n\n @abstractmethod\n async def stop(self) -> None:\n \"\"\"Stop the control channel and release resources.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\"ControlActionSet\", \"ControlChannel\", \"ControlPlaneService\", \"HttpControlChannel\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/__init__.py:1-5", + "span_start": 1, + "span_end": 5, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlActionSet:\n health: HealthHandler\n start: ActionHandler\n stop: ActionHandler\n status: ActionHandler", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "class HttpControlAppFactory:\n def create(\n self,\n health_provider: Callable[[], Awaitable[HealthPayload]],\n action_provider: Callable[[str, str], Awaitable[JSONResponse]],\n ) -> FastAPI:\n app = FastAPI(title=\"PLBA Control API\")\n\n @app.middleware(\"http\")\n async def log_api_call(request: Request, call_next): # type: ignore[no-untyped-def]\n started = time.monotonic()\n response = await call_next(request)\n response.headers[\"X-Response-Time-Ms\"] = str(int((time.monotonic() - started) * 1000))\n return response\n\n @app.get(\"/health\")\n async def health() -> JSONResponse:\n payload = await health_provider()\n status_code = 200 if payload.get(\"status\") == \"ok\" else 503\n return JSONResponse(content=payload, status_code=status_code)\n\n @app.get(\"/actions/{action}\")\n @app.post(\"/actions/{action}\")\n async def action(action: str, request: Request) -> JSONResponse:\n client_source = self._client_source(request)\n if action in {\"start\", \"stop\"}:\n LOGGER.warning(\"Control action requested: /actions/%s client=%s\", action, client_source)\n return await action_provider(action, client_source)\n\n return app\n\n def _client_source(self, request: Request) -> str:\n explicit_header = request.headers.get(\"X-Client-Source\", \"\").strip()\n if explicit_header:\n return explicit_header\n user_agent = request.headers.get(\"User-Agent\", \"\").strip()\n if user_agent:\n return f\"user-agent:{user_agent}\"\n return \"unknown\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_app.py:HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "validation": { + "passed": true, + "action": "return", + "reasons": [] + }, + "steps": [ + { + "step": "router", + "status": "completed", + "timings_ms": { + "router": 0 + }, + "output": { + "intent": "CODE_QA", + "sub_intent": "ARCHITECTURE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + } + }, + { + "step": "retrieval", + "status": "completed", + "timings_ms": { + "retrieval": 155 + }, + "output": { + "rag_count": 33, + "answer_path_rag_count": 33, + "resolved_symbol_status": "resolved", + "resolved_symbol": "RuntimeManager", + "requested_layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ] + }, + "diagnostics": { + "executed_layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C4_SEMANTIC_ROLES": "vector", + "C3_ENTRYPOINTS": "vector", + "C2_DEPENDENCY_GRAPH": "vector", + "C1_SYMBOL_CATALOG": "vector", + "C0_SOURCE_CHUNKS": "vector" + }, + "top_k_by_layer": { + "C4_SEMANTIC_ROLES": 12, + "C3_ENTRYPOINTS": 8, + "C2_DEPENDENCY_GRAPH": 8, + "C1_SYMBOL_CATALOG": 6, + "C0_SOURCE_CHUNKS": 4 + }, + "filters_by_layer": { + "C4_SEMANTIC_ROLES": { + "path_scope": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [] + }, + "C1_SYMBOL_CATALOG": { + "path_scope": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [] + } + }, + "fallback": { + "used": false, + "reason": null + }, + "retrieval_by_layer_ms": { + "C4_SEMANTIC_ROLES": 33, + "C3_ENTRYPOINTS": 19, + "C2_DEPENDENCY_GRAPH": 61, + "C1_SYMBOL_CATALOG": 24, + "C0_SOURCE_CHUNKS": 15 + } + } + }, + { + "step": "pre_evidence_gate", + "status": "passed", + "timings_ms": { + "pre_evidence_gate": 0 + }, + "output": { + "passed": true, + "failure_reasons": [], + "degraded_message": "" + } + }, + { + "step": "llm", + "status": "completed", + "timings_ms": { + "llm": 2995 + }, + "output": { + "prompt_name": "code_qa_architecture_answer", + "answer_preview": "В подсистеме RuntimeManager участвуют следующие компоненты:\n\n1. **RuntimeManager** — главный менеджер runtime, отвечает за конфигурацию и запуск runtime-потоков (src/app_runtime/core/runtime.py).\n2. **ControlPlaneService** — сервис управления каналами контроля, обеспечивает регистрацию каналов и ста" + } + }, + { + "step": "post_evidence_gate", + "status": "passed", + "timings_ms": { + "post_evidence_gate": 0, + "repair": 0 + }, + "output": { + "passed": true, + "reasons": [], + "repair_used": false + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-architecture-runtime-manager.md b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-architecture-runtime-manager.md new file mode 100644 index 0000000..2f29970 --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-architecture-runtime-manager.md @@ -0,0 +1,247 @@ +# plba-v2-architecture-runtime-manager + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: agent_runtime +- mode: full_chain +- passed: True + +## Query +Какие компоненты участвуют в RuntimeManager? + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "ARCHITECTURE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 33, + "llm_answer": "В подсистеме RuntimeManager участвуют следующие компоненты:\n\n1. **RuntimeManager** — главный менеджер runtime, отвечает за конфигурацию и запуск runtime-потоков (src/app_runtime/core/runtime.py).\n2. **ControlPlaneService** — сервис управления каналами контроля, обеспечивает регистрацию каналов и старт/стоп операций (src/app_runtime/control/service.py).\n3. **ControlChannel** — абстрактный канал управления, определяющий интерфейсы для запуска и остановки канала (src/app_runtime/control/base.py).\n4. **UvicornThreadRunner** — реализует uvicorn thread runner для обработки HTTP-запросов (src/app_runtime/control/http_runner.py).\n5. **HttpControlChannel** — HTTP-канал управления, участвует в управлении состояниями и операциях (src/app_runtime/control/http_channel.py).\n6. **HttpControlAppFactory** — фабрика для создания fastAPI приложений с контролем состояний (src/app_runtime/control/http_app.py).\n7. **WorkflowPersistence** — сохраняет состояние workflow-потоков (src/app_runtime/workflow/persistence/workflow_persistence.py).\n8. **InMemoryTaskQueue** — очередь задач в памяти, используется для хранения и обработки заданий (src/app_runtime/queue/in_memory.py).\n9. **ConfigFileLoader** — загружает конфигурации из файлов (src/app_runtime/config/file_loader.py).\n10. **TraceContextStore** — хранит контекст трассировки для отслеживания выполнения потоков (src/app_runtime/tracing/store.py).\n11. **WorkerSupervisor** — управляет рабочими процессами и их мониторингом (src/app_runtime/workers/supervisor.py).\n\nВсе эти компоненты взаимодействуют через общую инфраструктуру runtime, обмениваясь данными и событиями, участвуя в общем потоке управления и исполнения задач.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ] +} + +## Steps +[ + { + "step": "router", + "status": "completed", + "timings_ms": { + "router": 0 + }, + "output": { + "intent": "CODE_QA", + "sub_intent": "ARCHITECTURE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + } + }, + { + "step": "retrieval", + "status": "completed", + "timings_ms": { + "retrieval": 155 + }, + "output": { + "rag_count": 33, + "answer_path_rag_count": 33, + "resolved_symbol_status": "resolved", + "resolved_symbol": "RuntimeManager", + "requested_layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ] + }, + "diagnostics": { + "executed_layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C4_SEMANTIC_ROLES": "vector", + "C3_ENTRYPOINTS": "vector", + "C2_DEPENDENCY_GRAPH": "vector", + "C1_SYMBOL_CATALOG": "vector", + "C0_SOURCE_CHUNKS": "vector" + }, + "top_k_by_layer": { + "C4_SEMANTIC_ROLES": 12, + "C3_ENTRYPOINTS": 8, + "C2_DEPENDENCY_GRAPH": 8, + "C1_SYMBOL_CATALOG": 6, + "C0_SOURCE_CHUNKS": 4 + }, + "filters_by_layer": { + "C4_SEMANTIC_ROLES": { + "path_scope": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [] + }, + "C1_SYMBOL_CATALOG": { + "path_scope": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [] + } + }, + "fallback": { + "used": false, + "reason": null + }, + "retrieval_by_layer_ms": { + "C4_SEMANTIC_ROLES": 33, + "C3_ENTRYPOINTS": 19, + "C2_DEPENDENCY_GRAPH": 61, + "C1_SYMBOL_CATALOG": 24, + "C0_SOURCE_CHUNKS": 15 + } + } + }, + { + "step": "pre_evidence_gate", + "status": "passed", + "timings_ms": { + "pre_evidence_gate": 0 + }, + "output": { + "passed": true, + "failure_reasons": [], + "degraded_message": "" + } + }, + { + "step": "llm", + "status": "completed", + "timings_ms": { + "llm": 2995 + }, + "output": { + "prompt_name": "code_qa_architecture_answer", + "answer_preview": "В подсистеме RuntimeManager участвуют следующие компоненты:\n\n1. **RuntimeManager** — главный менеджер runtime, отвечает за конфигурацию и запуск runtime-потоков (src/app_runtime/core/runtime.py).\n2. **ControlPlaneService** — сервис управления каналами контроля, обеспечивает регистрацию каналов и ста" + } + }, + { + "step": "post_evidence_gate", + "status": "passed", + "timings_ms": { + "post_evidence_gate": 0, + "repair": 0 + }, + "output": { + "passed": true, + "reasons": [], + "repair_used": false + } + } +] + +## Diagnostics +{ + "intent_correct": null, + "target_found": true, + "layers_used": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ], + "retrieval_sufficient": true, + "answer_mode": "normal", + "router_result": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "ARCHITECTURE", + "path_scope": [], + "layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ], + "symbol_resolution_status": "resolved" + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Какие компоненты участвуют в RuntimeManager?", + "sub_intent": "ARCHITECTURE", + "path_scope": [], + "requested_layers": [ + "C4_SEMANTIC_ROLES", + "C3_ENTRYPOINTS", + "C2_DEPENDENCY_GRAPH", + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "C4_SEMANTIC_ROLES", + "hit_count": 12, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C3_ENTRYPOINTS", + "hit_count": 3, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 6, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 4, + "empty": false, + "fallback_used": false + } + ], + "empty_layers": [], + "evidence_gate_decision": { + "sufficient": true, + "failure_reasons": [], + "evidence_count": 33 + }, + "failure_reasons": [], + "timings_ms": { + "router": 0, + "retrieval": 155, + "pre_evidence_gate": 0, + "llm": 2995 + } +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-explain-create-runtime.json b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-explain-create-runtime.json new file mode 100644 index 0000000..2a5103d --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-explain-create-runtime.json @@ -0,0 +1,3910 @@ +{ + "case_id": "plba-v2-explain-create-runtime", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "agent_runtime", + "mode": "full_chain", + "query": "Что делает функция create_runtime?", + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 33, + "llm_answer": "Функция `create_runtime` инициализирует объект `RuntimeManager`, загружает конфигурацию из указанного файла (если путь задан), регистрирует HTTP-контроллер для управления состоянием приложения и регистрирует переданный модуль (`ApplicationModule`) в системе.\n\nКонкретно:\n1. Функция создаёт экземпляр `RuntimeManager`.\n2. Если указан путь к файлу конфигурации, файл загружается и добавляется в систему конфигурирования.\n3. При включении опции HTTP-контроллера создаётся и регистрируется соответствующий канал управления через класс `HttpControlChannel`.\n4. Переданный аргумент-модуль регистрируется в системе.\n\nЗависимости и вызовы внутри функции:\n- Загрузка конфигурации через чтение файла и его парсинг (используются библиотеки JSON и YAML).\n- Регистрация модуля в системе конфигурирования через метод `register_module`.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "create_runtime" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "query": "Что делает функция create_runtime?", + "router_result": { + "schema_version": "1.1", + "intent": "CODE_QA", + "retrieval_profile": "code", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query_plan": { + "raw": "Что делает функция create_runtime?", + "normalized": "Что делает функция create_runtime?", + "sub_intent": "EXPLAIN", + "negations": [], + "expansions": [ + "function", + "create_runtime" + ], + "keyword_hints": [ + "create_runtime" + ], + "path_hints": [], + "doc_scope_hints": [], + "symbol_candidates": [ + "create_runtime" + ], + "symbol_kind_hint": "function", + "anchors": [ + { + "type": "SYMBOL", + "value": "create_runtime", + "source": "user_text", + "subtype": null, + "span": { + "start": 19, + "end": 33 + }, + "confidence": 0.88 + }, + { + "type": "KEY_TERM", + "value": "функция", + "source": "user_text", + "subtype": null, + "span": { + "start": 11, + "end": 18 + }, + "confidence": 0.9 + } + ] + }, + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "top_k": 8 + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 8 + }, + { + "layer_id": "C4_SEMANTIC_ROLES", + "top_k": 8 + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "top_k": 6 + }, + { + "layer_id": "C3_ENTRYPOINTS", + "top_k": 6 + } + ], + "filters": { + "test_policy": "EXCLUDE", + "path_scope": [], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "create_runtime", + "alternatives": [ + "create_runtime", + "create_runtime", + "annotations", + "json", + "Path" + ], + "confidence": 0.99 + }, + "evidence_policy": { + "require_def": true, + "require_flow": true, + "require_spec": false, + "allow_answer_without_evidence": false + } + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Что делает функция create_runtime?", + "sub_intent": "EXPLAIN", + "path_scope": [], + "keyword_hints": [ + "create_runtime" + ], + "symbol_candidates": [ + "create_runtime" + ], + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "top_k": 8 + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 8 + }, + { + "layer_id": "C4_SEMANTIC_ROLES", + "top_k": 8 + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "top_k": 6 + }, + { + "layer_id": "C3_ENTRYPOINTS", + "top_k": 6 + } + ], + "filters": { + "test_policy": "EXCLUDE", + "path_scope": [], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + }, + "query_plan": { + "raw": "Что делает функция create_runtime?", + "normalized": "Что делает функция create_runtime?", + "sub_intent": "EXPLAIN", + "negations": [], + "expansions": [ + "function", + "create_runtime" + ], + "keyword_hints": [ + "create_runtime" + ], + "path_hints": [], + "doc_scope_hints": [], + "symbol_candidates": [ + "create_runtime" + ], + "symbol_kind_hint": "function", + "anchors": [ + { + "type": "SYMBOL", + "value": "create_runtime", + "source": "user_text", + "subtype": null, + "span": { + "start": 19, + "end": 33 + }, + "confidence": 0.88 + }, + { + "type": "KEY_TERM", + "value": "функция", + "source": "user_text", + "subtype": null, + "span": { + "start": 11, + "end": 18 + }, + "confidence": 0.9 + } + ] + } + }, + "retrieval_result": { + "target_symbol_candidates": [ + "create_runtime", + "annotations", + "json", + "Path", + "Any", + "yaml", + "hashlib" + ], + "resolved_symbol": "create_runtime", + "symbol_resolution_status": "resolved", + "file_candidates": [ + "src/plba/__init__.py", + "src/plba/bootstrap.py", + "src/app_runtime/config/file_loader.py", + "src/app_runtime/config/__init__.py", + "src/app_runtime/config/providers.py", + "src/app_runtime/contracts/__init__.py", + "src/app_runtime/contracts/application.py", + "src/app_runtime/__init__.py", + "src/app_runtime/control/http_runner.py", + "src/app_runtime/workflow/persistence/workflow_persistence.py", + "src/app_runtime/control/http_channel.py", + "src/app_runtime/queue/in_memory.py", + "src/app_runtime/workers/supervisor.py", + "src/app_runtime/workflow/engine/workflow_engine.py", + "src/app_runtime/tracing/store.py", + "src/app_runtime/control/http_app.py" + ], + "code_chunks": [ + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/plba/__init__.py", + "title": "create_runtime", + "content": "const create_runtime\ncreate_runtime = plba.bootstrap.create_runtime", + "start_line": 1, + "end_line": 1, + "metadata": { + "symbol_id": "fa1e84f16c8c659bcd5448637386af4d15d431064e07714e34689ee64233cb51", + "qname": "create_runtime", + "kind": "const", + "signature": "create_runtime = plba.bootstrap.create_runtime", + "parent_symbol_id": null, + "package_or_module": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/plba/bootstrap.py", + "title": "create_runtime", + "content": "function create_runtime\ncreate_runtime(module)", + "start_line": 8, + "end_line": 29, + "metadata": { + "symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "qname": "create_runtime", + "kind": "function", + "signature": "create_runtime(module)", + "parent_symbol_id": null, + "package_or_module": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/config/file_loader.py", + "title": "annotations", + "content": "const annotations\nannotations = __future__.annotations", + "start_line": 1, + "end_line": 1, + "metadata": { + "symbol_id": "5ed640ccec43a78659d50ec24f3717bf1144a182c22588f37456649ac6a4a815", + "qname": "annotations", + "kind": "const", + "signature": "annotations = __future__.annotations", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/config/file_loader.py", + "title": "json", + "content": "const json\nimport json", + "start_line": 4, + "end_line": 4, + "metadata": { + "symbol_id": "bb9e2eaf992bfd050f7072d72eed87c55b1a4b001daa034a0f7c630a61bb1d78", + "qname": "json", + "kind": "const", + "signature": "import json", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/config/file_loader.py", + "title": "Path", + "content": "const Path\nPath = pathlib.Path", + "start_line": 5, + "end_line": 5, + "metadata": { + "symbol_id": "b785967ed1fb83aa62d5724c6d6e9c6d2b1505523db39bd941cc39b48db48306", + "qname": "Path", + "kind": "const", + "signature": "Path = pathlib.Path", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/config/file_loader.py", + "title": "Any", + "content": "const Any\nAny = typing.Any", + "start_line": 6, + "end_line": 6, + "metadata": { + "symbol_id": "8e330833b8073585db1c4b4315947c400683a23e4c3d2e2ccbcb260f347541b6", + "qname": "Any", + "kind": "const", + "signature": "Any = typing.Any", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/config/file_loader.py", + "title": "yaml", + "content": "const yaml\nimport yaml", + "start_line": 8, + "end_line": 8, + "metadata": { + "symbol_id": "223502bbfc2b82aea662f7466403cc99a3cd44f1b0507d637cd674874f751e4f", + "qname": "yaml", + "kind": "const", + "signature": "import yaml", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/config/file_loader.py", + "title": "hashlib", + "content": "const hashlib\nimport hashlib", + "start_line": 3, + "end_line": 3, + "metadata": { + "symbol_id": "e7375824bd473da3d73d316d22e3cb6428930e2db1ffbd900ce5a8b88427bf05", + "qname": "hashlib", + "kind": "const", + "signature": "import hashlib", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/plba/__init__.py", + "title": "src/plba/__init__.py:1-69", + "content": "from plba.bootstrap import create_runtime\nfrom plba.config import ConfigFileLoader, FileConfigProvider\nfrom plba.control import ControlActionSet, ControlChannel, ControlPlaneService, HttpControlChannel\nfrom plba.contracts import (\n ApplicationModule,\n ConfigProvider,\n HealthContributor,\n TraceContext,\n TraceContextRecord,\n TraceLogMessage,\n TraceTransport,\n Worker,\n WorkerHealth,\n WorkerStatus,\n)\nfrom plba.core import ConfigurationManager, RuntimeManager, ServiceContainer\nfrom plba.health import HealthRegistry\nfrom plba.logging import LogManager\nfrom plba.queue import InMemoryTaskQueue\nfrom plba.tracing import MySqlTraceTransport, NoOpTraceTransport, TraceService\nfrom plba.workflow import (\n StepResult,\n WorkflowContext,\n WorkflowDefinition,\n WorkflowEngine,\n WorkflowEngineHooks,\n WorkflowNode,\n WorkflowRuntimeFactory,\n WorkflowStep,\n)\nfrom plba.workers import WorkerSupervisor\n\n__all__ = [\n \"ApplicationModule\",\n \"ConfigFileLoader\",\n \"ConfigProvider\",\n \"ConfigurationManager\",\n \"ControlActionSet\",\n \"ControlChannel\",\n \"ControlPlaneService\",\n \"create_runtime\",\n \"FileConfigProvider\",\n \"HealthContributor\",\n \"HealthRegistry\",\n \"HttpControlChannel\",\n \"InMemoryTaskQueue\",\n \"LogManager\",\n \"MySqlTraceTransport\",\n \"NoOpTraceTransport\",\n \"RuntimeManager\",\n \"ServiceContainer\",\n \"TraceContext\",\n \"TraceContextRecord\",\n \"TraceLogMessage\",\n \"TraceService\",\n \"TraceTransport\",\n \"StepResult\",\n \"Worker\",\n \"WorkerHealth\",\n \"WorkerStatus\",\n \"WorkflowContext\",\n \"WorkflowDefinition\",\n \"WorkflowEngine\",\n \"WorkflowEngineHooks\",\n \"WorkflowNode\",\n \"WorkflowRuntimeFactory\",\n \"WorkflowStep\",\n \"WorkerSupervisor\",\n]", + "start_line": 1, + "end_line": 69, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/plba/bootstrap.py", + "title": "src/plba/bootstrap.py:create_runtime", + "content": "def create_runtime(\n module: ApplicationModule,\n *,\n config_path: str | None = None,\n enable_http_control: bool = False,\n control_host: str = \"127.0.0.1\",\n control_port: int = 8080,\n control_timeout: int = 5,\n) -> RuntimeManager:\n runtime = RuntimeManager()\n if config_path is not None:\n runtime.add_config_file(config_path)\n if enable_http_control:\n runtime.control_plane.register_channel(\n HttpControlChannel(\n host=control_host,\n port=control_port,\n timeout=control_timeout,\n )\n )\n runtime.register_module(module)\n return runtime", + "start_line": 8, + "end_line": 29, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/config/__init__.py", + "title": "src/app_runtime/config/__init__.py:1-4", + "content": "from app_runtime.config.file_loader import ConfigFileLoader\nfrom app_runtime.config.providers import FileConfigProvider\n\n__all__ = [\"ConfigFileLoader\", \"FileConfigProvider\"]", + "start_line": 1, + "end_line": 4, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.config.__init__", + "is_test": false, + "blob_sha": "612918029820a2a983330ec92256142b55b9de4bdf3399ece18e2a02dbad9729", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/config/file_loader.py", + "title": "src/app_runtime/config/file_loader.py:ConfigFileLoader", + "content": "class ConfigFileLoader:\n def __init__(self, path: str | Path) -> None:\n self.path = Path(path)\n self.config: Any = None\n self.last_valid_config: Any = None\n self._last_seen_hash: str | None = None\n\n def read_text(self) -> str:\n return self.path.read_text(encoding=\"utf-8\")\n\n def parse(self, data: str) -> Any:\n suffix = self.path.suffix.lower()\n if suffix in {\".yml\", \".yaml\"}:\n return yaml.safe_load(data)\n return json.loads(data)\n\n def load_sync(self) -> Any:\n data = self.read_text()\n parsed = self.parse(data)\n self.config = parsed\n self.last_valid_config = parsed\n self._last_seen_hash = self._calculate_hash(data)\n return parsed\n\n def load_if_changed(self) -> tuple[bool, Any]:\n data = self.read_text()\n current_hash = self._calculate_hash(data)\n if current_hash == self._last_seen_hash:\n return False, self.config\n parsed = self.parse(data)\n self.config = parsed\n self.last_valid_config = parsed\n self._last_seen_hash = current_hash\n return True, parsed\n\n @staticmethod\n def _calculate_hash(data: str) -> str:\n return hashlib.sha256(data.encode(\"utf-8\")).hexdigest()", + "start_line": 11, + "end_line": 48, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/config/providers.py", + "title": "src/app_runtime/config/providers.py:FileConfigProvider", + "content": "class FileConfigProvider(ConfigProvider):\n def __init__(self, path: str | Path) -> None:\n self._loader = ConfigFileLoader(path)\n\n @property\n def loader(self) -> ConfigFileLoader:\n return self._loader\n\n def load(self) -> dict[str, Any]:\n config = self._loader.load_sync()\n if not isinstance(config, dict):\n raise TypeError(\"Config root must be a mapping\")\n return dict(config)", + "start_line": 10, + "end_line": 22, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.config.providers", + "is_test": false, + "blob_sha": "8c53ca0122d6df6c5763bca15e99434bb4daebd5a618b8fc927e9ae90b022e64", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/contracts/__init__.py", + "title": "src/app_runtime/__init__.py:1-1", + "content": "__all__: list[str] = []", + "start_line": 1, + "end_line": 1, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.__init__", + "is_test": false, + "blob_sha": "8eea9df4f6d7b38ca0e39ccc27b04700e3d08dbeec8046d613d22706d19985fa", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/contracts/application.py", + "title": "src/app_runtime/contracts/application.py:ApplicationModule", + "content": "class ApplicationModule(ABC):\n @property\n @abstractmethod\n def name(self) -> str:\n \"\"\"Module name used for runtime status and diagnostics.\"\"\"\n\n @abstractmethod\n def register(self, registry: ModuleRegistry) -> None:\n \"\"\"Register workers, services, and health contributors.\"\"\"", + "start_line": 8, + "end_line": 16, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.application", + "is_test": false, + "blob_sha": "197c35634dca49c352ce3f230295a485fbffb672ce7bb8c08e752bfdf61e7fa4", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/__init__.py", + "title": "src/app_runtime/__init__.py:1-1", + "content": "__all__: list[str] = []", + "start_line": 1, + "end_line": 1, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.__init__", + "is_test": false, + "blob_sha": "8eea9df4f6d7b38ca0e39ccc27b04700e3d08dbeec8046d613d22706d19985fa", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/http_runner.py", + "title": "UvicornThreadRunner", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "start_line": 10, + "end_line": 61, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "title": "WorkflowPersistence", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "start_line": 8, + "end_line": 54, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/http_channel.py", + "title": "HttpControlChannel", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "start_line": 12, + "end_line": 57, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/queue/in_memory.py", + "title": "InMemoryTaskQueue", + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)", + "start_line": 9, + "end_line": 38, + "metadata": { + "symbol_id": "2da04cb94544a3bcbf0943a95ad4bdd8710bcafaa32a02fd0e4de2178dcf3533", + "symbol_name": "InMemoryTaskQueue", + "qname": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 9, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "58f0cc001ccda0eee4c6bc32ed83bd05eafd6b6644f1e8b4aa9eed3103db73dc", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/config/file_loader.py", + "title": "ConfigFileLoader", + "content": "ConfigFileLoader\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (8)", + "start_line": 11, + "end_line": 48, + "metadata": { + "symbol_id": "a8474eca8b6e9dc86ae67ed68b16fa5fb639ef08739c053e7b7195489765667f", + "symbol_name": "ConfigFileLoader", + "qname": "ConfigFileLoader", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 8, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/workers/supervisor.py", + "title": "WorkerSupervisor", + "content": "WorkerSupervisor\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "start_line": 10, + "end_line": 59, + "metadata": { + "symbol_id": "c17b44e8d9e97d490989b21fa67d7c346cdda8a0472e4c41fb243c8846faa124", + "symbol_name": "WorkerSupervisor", + "qname": "WorkerSupervisor", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "77609d9d5927171cce7fc3a54897c183fd63068710c6362029b700937aae5eee", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "title": "WorkflowEngine", + "content": "WorkflowEngine\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "start_line": 10, + "end_line": 86, + "metadata": { + "symbol_id": "57ec0a9f11c542c78e008684a888397e8d9ef4223671acb2567e631a0cbc70b4", + "symbol_name": "WorkflowEngine", + "qname": "WorkflowEngine", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/tracing/store.py", + "title": "TraceContextStore", + "content": "TraceContextStore\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "start_line": 15, + "end_line": 52, + "metadata": { + "symbol_id": "b2dad4fbe16ffb11b58deba311c7739955c39d59f291b22181f33e9c8cce4059", + "symbol_name": "TraceContextStore", + "qname": "TraceContextStore", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "d369554f08fc92039c6edd5a2a1e73b23901533e8974459170bbd9347d263dc5", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/plba/bootstrap.py", + "title": "create_runtime:calls", + "content": "create_runtime calls runtime.add_config_file", + "start_line": 19, + "end_line": 19, + "metadata": { + "edge_id": "4eaeec4ac55a59d5f66fd01c4754955f8fedaf4bc3df13fa769b352c7bfaacbb", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.add_config_file", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/plba/bootstrap.py", + "title": "create_runtime:reads_attr", + "content": "create_runtime reads_attr runtime.register_module", + "start_line": 28, + "end_line": 28, + "metadata": { + "edge_id": "45516c79ff358dbf9b650a081668df0f66d2fe989300f985a1a78be6be166f8f", + "edge_type": "reads_attr", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.register_module", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/plba/bootstrap.py", + "title": "create_runtime:instantiates", + "content": "create_runtime instantiates RuntimeManager", + "start_line": 17, + "end_line": 17, + "metadata": { + "edge_id": "0adba17984f850ea1608c9e734d2dd5c325cfde3a8133123aa239e44935ad18e", + "edge_type": "instantiates", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": "27158ca220022eeb5083c6addf8a50775d45f7161284fd60aac48410105f4b98", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/plba/bootstrap.py", + "title": "create_runtime:calls", + "content": "create_runtime calls runtime.register_module", + "start_line": 28, + "end_line": 28, + "metadata": { + "edge_id": "ab6003c3441addc1ba1b81edeca009165559f652f6b2cf424e5ae61b1f617de8", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.register_module", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/plba/bootstrap.py", + "title": "create_runtime:calls", + "content": "create_runtime calls runtime.control_plane.register_channel", + "start_line": 21, + "end_line": 27, + "metadata": { + "edge_id": "2678250030b9ce47a3b3b55fac7897ac530367edc8374ac9d5e6ecafb1e483f0", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.control_plane.register_channel", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/plba/bootstrap.py", + "title": "create_runtime:reads_attr", + "content": "create_runtime reads_attr runtime.add_config_file", + "start_line": 19, + "end_line": 19, + "metadata": { + "edge_id": "30d4e8aae984ab84d523e80d02f1caeda52d547fa3d2aa47be8845931cabbca2", + "edge_type": "reads_attr", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.add_config_file", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C3_ENTRYPOINTS", + "path": "src/app_runtime/control/http_app.py", + "title": "app.post", + "content": "fastapi http app.post", + "start_line": 38, + "end_line": 42, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C3_ENTRYPOINTS", + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "content": "fastapi http app.get", + "start_line": 31, + "end_line": 34, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C3_ENTRYPOINTS", + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "content": "fastapi http app.get", + "start_line": 38, + "end_line": 42, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "relations": [ + { + "path": "src/plba/bootstrap.py", + "metadata": { + "edge_id": "4eaeec4ac55a59d5f66fd01c4754955f8fedaf4bc3df13fa769b352c7bfaacbb", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.add_config_file", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "create_runtime calls runtime.add_config_file" + }, + { + "path": "src/plba/bootstrap.py", + "metadata": { + "edge_id": "45516c79ff358dbf9b650a081668df0f66d2fe989300f985a1a78be6be166f8f", + "edge_type": "reads_attr", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.register_module", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "create_runtime reads_attr runtime.register_module" + }, + { + "path": "src/plba/bootstrap.py", + "metadata": { + "edge_id": "0adba17984f850ea1608c9e734d2dd5c325cfde3a8133123aa239e44935ad18e", + "edge_type": "instantiates", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": "27158ca220022eeb5083c6addf8a50775d45f7161284fd60aac48410105f4b98", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "create_runtime instantiates RuntimeManager" + }, + { + "path": "src/plba/bootstrap.py", + "metadata": { + "edge_id": "ab6003c3441addc1ba1b81edeca009165559f652f6b2cf424e5ae61b1f617de8", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.register_module", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "create_runtime calls runtime.register_module" + }, + { + "path": "src/plba/bootstrap.py", + "metadata": { + "edge_id": "2678250030b9ce47a3b3b55fac7897ac530367edc8374ac9d5e6ecafb1e483f0", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.control_plane.register_channel", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "create_runtime calls runtime.control_plane.register_channel" + }, + { + "path": "src/plba/bootstrap.py", + "metadata": { + "edge_id": "30d4e8aae984ab84d523e80d02f1caeda52d547fa3d2aa47be8845931cabbca2", + "edge_type": "reads_attr", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.add_config_file", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "create_runtime reads_attr runtime.add_config_file" + } + ], + "entrypoints": [ + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.post", + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "test_candidates": [], + "layer_outcomes": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C4_SEMANTIC_ROLES", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 6, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C3_ENTRYPOINTS", + "hit_count": 3, + "empty": false, + "fallback_used": false + } + ], + "missing_layers": [], + "raw_rows": [ + { + "path": "src/plba/__init__.py", + "content": "const create_runtime\ncreate_runtime = plba.bootstrap.create_runtime", + "layer": "C1_SYMBOL_CATALOG", + "title": "create_runtime", + "span_start": 1, + "span_end": 1, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "fa1e84f16c8c659bcd5448637386af4d15d431064e07714e34689ee64233cb51", + "qname": "create_runtime", + "kind": "const", + "signature": "create_runtime = plba.bootstrap.create_runtime", + "parent_symbol_id": null, + "package_or_module": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "function create_runtime\ncreate_runtime(module)", + "layer": "C1_SYMBOL_CATALOG", + "title": "create_runtime", + "span_start": 8, + "span_end": 29, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "qname": "create_runtime", + "kind": "function", + "signature": "create_runtime(module)", + "parent_symbol_id": null, + "package_or_module": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "const annotations\nannotations = __future__.annotations", + "layer": "C1_SYMBOL_CATALOG", + "title": "annotations", + "span_start": 1, + "span_end": 1, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "5ed640ccec43a78659d50ec24f3717bf1144a182c22588f37456649ac6a4a815", + "qname": "annotations", + "kind": "const", + "signature": "annotations = __future__.annotations", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "const json\nimport json", + "layer": "C1_SYMBOL_CATALOG", + "title": "json", + "span_start": 4, + "span_end": 4, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "bb9e2eaf992bfd050f7072d72eed87c55b1a4b001daa034a0f7c630a61bb1d78", + "qname": "json", + "kind": "const", + "signature": "import json", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "const Path\nPath = pathlib.Path", + "layer": "C1_SYMBOL_CATALOG", + "title": "Path", + "span_start": 5, + "span_end": 5, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "b785967ed1fb83aa62d5724c6d6e9c6d2b1505523db39bd941cc39b48db48306", + "qname": "Path", + "kind": "const", + "signature": "Path = pathlib.Path", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "const Any\nAny = typing.Any", + "layer": "C1_SYMBOL_CATALOG", + "title": "Any", + "span_start": 6, + "span_end": 6, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "8e330833b8073585db1c4b4315947c400683a23e4c3d2e2ccbcb260f347541b6", + "qname": "Any", + "kind": "const", + "signature": "Any = typing.Any", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "const yaml\nimport yaml", + "layer": "C1_SYMBOL_CATALOG", + "title": "yaml", + "span_start": 8, + "span_end": 8, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "223502bbfc2b82aea662f7466403cc99a3cd44f1b0507d637cd674874f751e4f", + "qname": "yaml", + "kind": "const", + "signature": "import yaml", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "const hashlib\nimport hashlib", + "layer": "C1_SYMBOL_CATALOG", + "title": "hashlib", + "span_start": 3, + "span_end": 3, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "e7375824bd473da3d73d316d22e3cb6428930e2db1ffbd900ce5a8b88427bf05", + "qname": "hashlib", + "kind": "const", + "signature": "import hashlib", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/__init__.py", + "content": "from plba.bootstrap import create_runtime\nfrom plba.config import ConfigFileLoader, FileConfigProvider\nfrom plba.control import ControlActionSet, ControlChannel, ControlPlaneService, HttpControlChannel\nfrom plba.contracts import (\n ApplicationModule,\n ConfigProvider,\n HealthContributor,\n TraceContext,\n TraceContextRecord,\n TraceLogMessage,\n TraceTransport,\n Worker,\n WorkerHealth,\n WorkerStatus,\n)\nfrom plba.core import ConfigurationManager, RuntimeManager, ServiceContainer\nfrom plba.health import HealthRegistry\nfrom plba.logging import LogManager\nfrom plba.queue import InMemoryTaskQueue\nfrom plba.tracing import MySqlTraceTransport, NoOpTraceTransport, TraceService\nfrom plba.workflow import (\n StepResult,\n WorkflowContext,\n WorkflowDefinition,\n WorkflowEngine,\n WorkflowEngineHooks,\n WorkflowNode,\n WorkflowRuntimeFactory,\n WorkflowStep,\n)\nfrom plba.workers import WorkerSupervisor\n\n__all__ = [\n \"ApplicationModule\",\n \"ConfigFileLoader\",\n \"ConfigProvider\",\n \"ConfigurationManager\",\n \"ControlActionSet\",\n \"ControlChannel\",\n \"ControlPlaneService\",\n \"create_runtime\",\n \"FileConfigProvider\",\n \"HealthContributor\",\n \"HealthRegistry\",\n \"HttpControlChannel\",\n \"InMemoryTaskQueue\",\n \"LogManager\",\n \"MySqlTraceTransport\",\n \"NoOpTraceTransport\",\n \"RuntimeManager\",\n \"ServiceContainer\",\n \"TraceContext\",\n \"TraceContextRecord\",\n \"TraceLogMessage\",\n \"TraceService\",\n \"TraceTransport\",\n \"StepResult\",\n \"Worker\",\n \"WorkerHealth\",\n \"WorkerStatus\",\n \"WorkflowContext\",\n \"WorkflowDefinition\",\n \"WorkflowEngine\",\n \"WorkflowEngineHooks\",\n \"WorkflowNode\",\n \"WorkflowRuntimeFactory\",\n \"WorkflowStep\",\n \"WorkerSupervisor\",\n]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/__init__.py:1-69", + "span_start": 1, + "span_end": 69, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "def create_runtime(\n module: ApplicationModule,\n *,\n config_path: str | None = None,\n enable_http_control: bool = False,\n control_host: str = \"127.0.0.1\",\n control_port: int = 8080,\n control_timeout: int = 5,\n) -> RuntimeManager:\n runtime = RuntimeManager()\n if config_path is not None:\n runtime.add_config_file(config_path)\n if enable_http_control:\n runtime.control_plane.register_channel(\n HttpControlChannel(\n host=control_host,\n port=control_port,\n timeout=control_timeout,\n )\n )\n runtime.register_module(module)\n return runtime", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/bootstrap.py:create_runtime", + "span_start": 8, + "span_end": 29, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/__init__.py", + "content": "from app_runtime.config.file_loader import ConfigFileLoader\nfrom app_runtime.config.providers import FileConfigProvider\n\n__all__ = [\"ConfigFileLoader\", \"FileConfigProvider\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/config/__init__.py:1-4", + "span_start": 1, + "span_end": 4, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.config.__init__", + "is_test": false, + "blob_sha": "612918029820a2a983330ec92256142b55b9de4bdf3399ece18e2a02dbad9729", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "class ConfigFileLoader:\n def __init__(self, path: str | Path) -> None:\n self.path = Path(path)\n self.config: Any = None\n self.last_valid_config: Any = None\n self._last_seen_hash: str | None = None\n\n def read_text(self) -> str:\n return self.path.read_text(encoding=\"utf-8\")\n\n def parse(self, data: str) -> Any:\n suffix = self.path.suffix.lower()\n if suffix in {\".yml\", \".yaml\"}:\n return yaml.safe_load(data)\n return json.loads(data)\n\n def load_sync(self) -> Any:\n data = self.read_text()\n parsed = self.parse(data)\n self.config = parsed\n self.last_valid_config = parsed\n self._last_seen_hash = self._calculate_hash(data)\n return parsed\n\n def load_if_changed(self) -> tuple[bool, Any]:\n data = self.read_text()\n current_hash = self._calculate_hash(data)\n if current_hash == self._last_seen_hash:\n return False, self.config\n parsed = self.parse(data)\n self.config = parsed\n self.last_valid_config = parsed\n self._last_seen_hash = current_hash\n return True, parsed\n\n @staticmethod\n def _calculate_hash(data: str) -> str:\n return hashlib.sha256(data.encode(\"utf-8\")).hexdigest()", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/config/file_loader.py:ConfigFileLoader", + "span_start": 11, + "span_end": 48, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/providers.py", + "content": "class FileConfigProvider(ConfigProvider):\n def __init__(self, path: str | Path) -> None:\n self._loader = ConfigFileLoader(path)\n\n @property\n def loader(self) -> ConfigFileLoader:\n return self._loader\n\n def load(self) -> dict[str, Any]:\n config = self._loader.load_sync()\n if not isinstance(config, dict):\n raise TypeError(\"Config root must be a mapping\")\n return dict(config)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/config/providers.py:FileConfigProvider", + "span_start": 10, + "span_end": 22, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.config.providers", + "is_test": false, + "blob_sha": "8c53ca0122d6df6c5763bca15e99434bb4daebd5a618b8fc927e9ae90b022e64", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/__init__.py", + "content": "__all__: list[str] = []", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/__init__.py:1-1", + "span_start": 1, + "span_end": 1, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.__init__", + "is_test": false, + "blob_sha": "8eea9df4f6d7b38ca0e39ccc27b04700e3d08dbeec8046d613d22706d19985fa", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/application.py", + "content": "class ApplicationModule(ABC):\n @property\n @abstractmethod\n def name(self) -> str:\n \"\"\"Module name used for runtime status and diagnostics.\"\"\"\n\n @abstractmethod\n def register(self, registry: ModuleRegistry) -> None:\n \"\"\"Register workers, services, and health contributors.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/contracts/application.py:ApplicationModule", + "span_start": 8, + "span_end": 16, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.application", + "is_test": false, + "blob_sha": "197c35634dca49c352ce3f230295a485fbffb672ce7bb8c08e752bfdf61e7fa4", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/__init__.py", + "content": "__all__: list[str] = []", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/__init__.py:1-1", + "span_start": 1, + "span_end": 1, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.__init__", + "is_test": false, + "blob_sha": "8eea9df4f6d7b38ca0e39ccc27b04700e3d08dbeec8046d613d22706d19985fa", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/queue/in_memory.py", + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)", + "layer": "C4_SEMANTIC_ROLES", + "title": "InMemoryTaskQueue", + "span_start": 9, + "span_end": 38, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 22, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "2da04cb94544a3bcbf0943a95ad4bdd8710bcafaa32a02fd0e4de2178dcf3533", + "symbol_name": "InMemoryTaskQueue", + "qname": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 9, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "58f0cc001ccda0eee4c6bc32ed83bd05eafd6b6644f1e8b4aa9eed3103db73dc", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "ConfigFileLoader\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (8)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ConfigFileLoader", + "span_start": 11, + "span_end": 48, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 23, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "a8474eca8b6e9dc86ae67ed68b16fa5fb639ef08739c053e7b7195489765667f", + "symbol_name": "ConfigFileLoader", + "qname": "ConfigFileLoader", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 8, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workers/supervisor.py", + "content": "WorkerSupervisor\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkerSupervisor", + "span_start": 10, + "span_end": 59, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "c17b44e8d9e97d490989b21fa67d7c346cdda8a0472e4c41fb243c8846faa124", + "symbol_name": "WorkerSupervisor", + "qname": "WorkerSupervisor", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "77609d9d5927171cce7fc3a54897c183fd63068710c6362029b700937aae5eee", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowEngine", + "span_start": 10, + "span_end": 86, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "57ec0a9f11c542c78e008684a888397e8d9ef4223671acb2567e631a0cbc70b4", + "symbol_name": "WorkflowEngine", + "qname": "WorkflowEngine", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/store.py", + "content": "TraceContextStore\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "TraceContextStore", + "span_start": 15, + "span_end": 52, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "b2dad4fbe16ffb11b58deba311c7739955c39d59f291b22181f33e9c8cce4059", + "symbol_name": "TraceContextStore", + "qname": "TraceContextStore", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "d369554f08fc92039c6edd5a2a1e73b23901533e8974459170bbd9347d263dc5", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime calls runtime.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:calls", + "span_start": 19, + "span_end": 19, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "4eaeec4ac55a59d5f66fd01c4754955f8fedaf4bc3df13fa769b352c7bfaacbb", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.add_config_file", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime reads_attr runtime.register_module", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:reads_attr", + "span_start": 28, + "span_end": 28, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "45516c79ff358dbf9b650a081668df0f66d2fe989300f985a1a78be6be166f8f", + "edge_type": "reads_attr", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.register_module", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:instantiates", + "span_start": 17, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "0adba17984f850ea1608c9e734d2dd5c325cfde3a8133123aa239e44935ad18e", + "edge_type": "instantiates", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": "27158ca220022eeb5083c6addf8a50775d45f7161284fd60aac48410105f4b98", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime calls runtime.register_module", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:calls", + "span_start": 28, + "span_end": 28, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "ab6003c3441addc1ba1b81edeca009165559f652f6b2cf424e5ae61b1f617de8", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.register_module", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime calls runtime.control_plane.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:calls", + "span_start": 21, + "span_end": 27, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "2678250030b9ce47a3b3b55fac7897ac530367edc8374ac9d5e6ecafb1e483f0", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.control_plane.register_channel", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime reads_attr runtime.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:reads_attr", + "span_start": 19, + "span_end": 19, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "30d4e8aae984ab84d523e80d02f1caeda52d547fa3d2aa47be8845931cabbca2", + "edge_type": "reads_attr", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.add_config_file", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": null, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": null, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": null, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "retrieval_report": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "vector", + "C0_SOURCE_CHUNKS": "vector", + "C4_SEMANTIC_ROLES": "vector", + "C2_DEPENDENCY_GRAPH": "vector", + "C3_ENTRYPOINTS": "vector" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [] + } + }, + "fallback": { + "used": false, + "reason": null + }, + "retrieval_by_layer_ms": { + "C1_SYMBOL_CATALOG": 34, + "C0_SOURCE_CHUNKS": 12, + "C4_SEMANTIC_ROLES": 13, + "C2_DEPENDENCY_GRAPH": 42, + "C3_ENTRYPOINTS": 10 + } + } + }, + "diagnostics": { + "intent_correct": null, + "target_found": true, + "layers_used": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_sufficient": true, + "answer_mode": "normal", + "router_result": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "EXPLAIN", + "path_scope": [], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_resolution_status": "resolved" + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Что делает функция create_runtime?", + "sub_intent": "EXPLAIN", + "path_scope": [], + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C4_SEMANTIC_ROLES", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 6, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C3_ENTRYPOINTS", + "hit_count": 3, + "empty": false, + "fallback_used": false + } + ], + "empty_layers": [], + "evidence_gate_decision": { + "sufficient": true, + "failure_reasons": [], + "evidence_count": 33 + }, + "failure_reasons": [], + "timings_ms": { + "router": 0, + "retrieval": 113, + "pre_evidence_gate": 0, + "llm": 1394 + } + }, + "rag_rows": [ + { + "path": "src/plba/__init__.py", + "content": "const create_runtime\ncreate_runtime = plba.bootstrap.create_runtime", + "layer": "C1_SYMBOL_CATALOG", + "title": "create_runtime", + "span_start": 1, + "span_end": 1, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "fa1e84f16c8c659bcd5448637386af4d15d431064e07714e34689ee64233cb51", + "qname": "create_runtime", + "kind": "const", + "signature": "create_runtime = plba.bootstrap.create_runtime", + "parent_symbol_id": null, + "package_or_module": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "function create_runtime\ncreate_runtime(module)", + "layer": "C1_SYMBOL_CATALOG", + "title": "create_runtime", + "span_start": 8, + "span_end": 29, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "qname": "create_runtime", + "kind": "function", + "signature": "create_runtime(module)", + "parent_symbol_id": null, + "package_or_module": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "const annotations\nannotations = __future__.annotations", + "layer": "C1_SYMBOL_CATALOG", + "title": "annotations", + "span_start": 1, + "span_end": 1, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "5ed640ccec43a78659d50ec24f3717bf1144a182c22588f37456649ac6a4a815", + "qname": "annotations", + "kind": "const", + "signature": "annotations = __future__.annotations", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "const json\nimport json", + "layer": "C1_SYMBOL_CATALOG", + "title": "json", + "span_start": 4, + "span_end": 4, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "bb9e2eaf992bfd050f7072d72eed87c55b1a4b001daa034a0f7c630a61bb1d78", + "qname": "json", + "kind": "const", + "signature": "import json", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "const Path\nPath = pathlib.Path", + "layer": "C1_SYMBOL_CATALOG", + "title": "Path", + "span_start": 5, + "span_end": 5, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "b785967ed1fb83aa62d5724c6d6e9c6d2b1505523db39bd941cc39b48db48306", + "qname": "Path", + "kind": "const", + "signature": "Path = pathlib.Path", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "const Any\nAny = typing.Any", + "layer": "C1_SYMBOL_CATALOG", + "title": "Any", + "span_start": 6, + "span_end": 6, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "8e330833b8073585db1c4b4315947c400683a23e4c3d2e2ccbcb260f347541b6", + "qname": "Any", + "kind": "const", + "signature": "Any = typing.Any", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "const yaml\nimport yaml", + "layer": "C1_SYMBOL_CATALOG", + "title": "yaml", + "span_start": 8, + "span_end": 8, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "223502bbfc2b82aea662f7466403cc99a3cd44f1b0507d637cd674874f751e4f", + "qname": "yaml", + "kind": "const", + "signature": "import yaml", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "const hashlib\nimport hashlib", + "layer": "C1_SYMBOL_CATALOG", + "title": "hashlib", + "span_start": 3, + "span_end": 3, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "e7375824bd473da3d73d316d22e3cb6428930e2db1ffbd900ce5a8b88427bf05", + "qname": "hashlib", + "kind": "const", + "signature": "import hashlib", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/__init__.py", + "content": "from plba.bootstrap import create_runtime\nfrom plba.config import ConfigFileLoader, FileConfigProvider\nfrom plba.control import ControlActionSet, ControlChannel, ControlPlaneService, HttpControlChannel\nfrom plba.contracts import (\n ApplicationModule,\n ConfigProvider,\n HealthContributor,\n TraceContext,\n TraceContextRecord,\n TraceLogMessage,\n TraceTransport,\n Worker,\n WorkerHealth,\n WorkerStatus,\n)\nfrom plba.core import ConfigurationManager, RuntimeManager, ServiceContainer\nfrom plba.health import HealthRegistry\nfrom plba.logging import LogManager\nfrom plba.queue import InMemoryTaskQueue\nfrom plba.tracing import MySqlTraceTransport, NoOpTraceTransport, TraceService\nfrom plba.workflow import (\n StepResult,\n WorkflowContext,\n WorkflowDefinition,\n WorkflowEngine,\n WorkflowEngineHooks,\n WorkflowNode,\n WorkflowRuntimeFactory,\n WorkflowStep,\n)\nfrom plba.workers import WorkerSupervisor\n\n__all__ = [\n \"ApplicationModule\",\n \"ConfigFileLoader\",\n \"ConfigProvider\",\n \"ConfigurationManager\",\n \"ControlActionSet\",\n \"ControlChannel\",\n \"ControlPlaneService\",\n \"create_runtime\",\n \"FileConfigProvider\",\n \"HealthContributor\",\n \"HealthRegistry\",\n \"HttpControlChannel\",\n \"InMemoryTaskQueue\",\n \"LogManager\",\n \"MySqlTraceTransport\",\n \"NoOpTraceTransport\",\n \"RuntimeManager\",\n \"ServiceContainer\",\n \"TraceContext\",\n \"TraceContextRecord\",\n \"TraceLogMessage\",\n \"TraceService\",\n \"TraceTransport\",\n \"StepResult\",\n \"Worker\",\n \"WorkerHealth\",\n \"WorkerStatus\",\n \"WorkflowContext\",\n \"WorkflowDefinition\",\n \"WorkflowEngine\",\n \"WorkflowEngineHooks\",\n \"WorkflowNode\",\n \"WorkflowRuntimeFactory\",\n \"WorkflowStep\",\n \"WorkerSupervisor\",\n]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/__init__.py:1-69", + "span_start": 1, + "span_end": 69, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "def create_runtime(\n module: ApplicationModule,\n *,\n config_path: str | None = None,\n enable_http_control: bool = False,\n control_host: str = \"127.0.0.1\",\n control_port: int = 8080,\n control_timeout: int = 5,\n) -> RuntimeManager:\n runtime = RuntimeManager()\n if config_path is not None:\n runtime.add_config_file(config_path)\n if enable_http_control:\n runtime.control_plane.register_channel(\n HttpControlChannel(\n host=control_host,\n port=control_port,\n timeout=control_timeout,\n )\n )\n runtime.register_module(module)\n return runtime", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/bootstrap.py:create_runtime", + "span_start": 8, + "span_end": 29, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/__init__.py", + "content": "from app_runtime.config.file_loader import ConfigFileLoader\nfrom app_runtime.config.providers import FileConfigProvider\n\n__all__ = [\"ConfigFileLoader\", \"FileConfigProvider\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/config/__init__.py:1-4", + "span_start": 1, + "span_end": 4, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.config.__init__", + "is_test": false, + "blob_sha": "612918029820a2a983330ec92256142b55b9de4bdf3399ece18e2a02dbad9729", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "class ConfigFileLoader:\n def __init__(self, path: str | Path) -> None:\n self.path = Path(path)\n self.config: Any = None\n self.last_valid_config: Any = None\n self._last_seen_hash: str | None = None\n\n def read_text(self) -> str:\n return self.path.read_text(encoding=\"utf-8\")\n\n def parse(self, data: str) -> Any:\n suffix = self.path.suffix.lower()\n if suffix in {\".yml\", \".yaml\"}:\n return yaml.safe_load(data)\n return json.loads(data)\n\n def load_sync(self) -> Any:\n data = self.read_text()\n parsed = self.parse(data)\n self.config = parsed\n self.last_valid_config = parsed\n self._last_seen_hash = self._calculate_hash(data)\n return parsed\n\n def load_if_changed(self) -> tuple[bool, Any]:\n data = self.read_text()\n current_hash = self._calculate_hash(data)\n if current_hash == self._last_seen_hash:\n return False, self.config\n parsed = self.parse(data)\n self.config = parsed\n self.last_valid_config = parsed\n self._last_seen_hash = current_hash\n return True, parsed\n\n @staticmethod\n def _calculate_hash(data: str) -> str:\n return hashlib.sha256(data.encode(\"utf-8\")).hexdigest()", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/config/file_loader.py:ConfigFileLoader", + "span_start": 11, + "span_end": 48, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/providers.py", + "content": "class FileConfigProvider(ConfigProvider):\n def __init__(self, path: str | Path) -> None:\n self._loader = ConfigFileLoader(path)\n\n @property\n def loader(self) -> ConfigFileLoader:\n return self._loader\n\n def load(self) -> dict[str, Any]:\n config = self._loader.load_sync()\n if not isinstance(config, dict):\n raise TypeError(\"Config root must be a mapping\")\n return dict(config)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/config/providers.py:FileConfigProvider", + "span_start": 10, + "span_end": 22, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.config.providers", + "is_test": false, + "blob_sha": "8c53ca0122d6df6c5763bca15e99434bb4daebd5a618b8fc927e9ae90b022e64", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/__init__.py", + "content": "__all__: list[str] = []", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/__init__.py:1-1", + "span_start": 1, + "span_end": 1, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.__init__", + "is_test": false, + "blob_sha": "8eea9df4f6d7b38ca0e39ccc27b04700e3d08dbeec8046d613d22706d19985fa", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/application.py", + "content": "class ApplicationModule(ABC):\n @property\n @abstractmethod\n def name(self) -> str:\n \"\"\"Module name used for runtime status and diagnostics.\"\"\"\n\n @abstractmethod\n def register(self, registry: ModuleRegistry) -> None:\n \"\"\"Register workers, services, and health contributors.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/contracts/application.py:ApplicationModule", + "span_start": 8, + "span_end": 16, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.application", + "is_test": false, + "blob_sha": "197c35634dca49c352ce3f230295a485fbffb672ce7bb8c08e752bfdf61e7fa4", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/__init__.py", + "content": "__all__: list[str] = []", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/__init__.py:1-1", + "span_start": 1, + "span_end": 1, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.__init__", + "is_test": false, + "blob_sha": "8eea9df4f6d7b38ca0e39ccc27b04700e3d08dbeec8046d613d22706d19985fa", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/queue/in_memory.py", + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)", + "layer": "C4_SEMANTIC_ROLES", + "title": "InMemoryTaskQueue", + "span_start": 9, + "span_end": 38, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 22, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "2da04cb94544a3bcbf0943a95ad4bdd8710bcafaa32a02fd0e4de2178dcf3533", + "symbol_name": "InMemoryTaskQueue", + "qname": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 9, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "58f0cc001ccda0eee4c6bc32ed83bd05eafd6b6644f1e8b4aa9eed3103db73dc", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "ConfigFileLoader\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (8)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ConfigFileLoader", + "span_start": 11, + "span_end": 48, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 23, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "a8474eca8b6e9dc86ae67ed68b16fa5fb639ef08739c053e7b7195489765667f", + "symbol_name": "ConfigFileLoader", + "qname": "ConfigFileLoader", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 8, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workers/supervisor.py", + "content": "WorkerSupervisor\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkerSupervisor", + "span_start": 10, + "span_end": 59, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "c17b44e8d9e97d490989b21fa67d7c346cdda8a0472e4c41fb243c8846faa124", + "symbol_name": "WorkerSupervisor", + "qname": "WorkerSupervisor", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "77609d9d5927171cce7fc3a54897c183fd63068710c6362029b700937aae5eee", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "content": "WorkflowEngine\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowEngine", + "span_start": 10, + "span_end": 86, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "57ec0a9f11c542c78e008684a888397e8d9ef4223671acb2567e631a0cbc70b4", + "symbol_name": "WorkflowEngine", + "qname": "WorkflowEngine", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1057136e58a325cd5ab6f4e265d15665fb6a711b7022d9fab52a1a290afa2368", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/store.py", + "content": "TraceContextStore\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "TraceContextStore", + "span_start": 15, + "span_end": 52, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b2dad4fbe16ffb11b58deba311c7739955c39d59f291b22181f33e9c8cce4059", + "symbol_name": "TraceContextStore", + "qname": "TraceContextStore", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "d369554f08fc92039c6edd5a2a1e73b23901533e8974459170bbd9347d263dc5", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime calls runtime.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:calls", + "span_start": 19, + "span_end": 19, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "4eaeec4ac55a59d5f66fd01c4754955f8fedaf4bc3df13fa769b352c7bfaacbb", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.add_config_file", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime reads_attr runtime.register_module", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:reads_attr", + "span_start": 28, + "span_end": 28, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "45516c79ff358dbf9b650a081668df0f66d2fe989300f985a1a78be6be166f8f", + "edge_type": "reads_attr", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.register_module", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:instantiates", + "span_start": 17, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "0adba17984f850ea1608c9e734d2dd5c325cfde3a8133123aa239e44935ad18e", + "edge_type": "instantiates", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": "27158ca220022eeb5083c6addf8a50775d45f7161284fd60aac48410105f4b98", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime calls runtime.register_module", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:calls", + "span_start": 28, + "span_end": 28, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "ab6003c3441addc1ba1b81edeca009165559f652f6b2cf424e5ae61b1f617de8", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.register_module", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime calls runtime.control_plane.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:calls", + "span_start": 21, + "span_end": 27, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "2678250030b9ce47a3b3b55fac7897ac530367edc8374ac9d5e6ecafb1e483f0", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.control_plane.register_channel", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime reads_attr runtime.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:reads_attr", + "span_start": 19, + "span_end": 19, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "30d4e8aae984ab84d523e80d02f1caeda52d547fa3d2aa47be8845931cabbca2", + "edge_type": "reads_attr", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.add_config_file", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "validation": { + "passed": true, + "action": "return", + "reasons": [] + }, + "steps": [ + { + "step": "router", + "status": "completed", + "timings_ms": { + "router": 0 + }, + "output": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + } + }, + { + "step": "retrieval", + "status": "completed", + "timings_ms": { + "retrieval": 113 + }, + "output": { + "rag_count": 33, + "answer_path_rag_count": 33, + "resolved_symbol_status": "resolved", + "resolved_symbol": "create_runtime", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "diagnostics": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "vector", + "C0_SOURCE_CHUNKS": "vector", + "C4_SEMANTIC_ROLES": "vector", + "C2_DEPENDENCY_GRAPH": "vector", + "C3_ENTRYPOINTS": "vector" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [] + } + }, + "fallback": { + "used": false, + "reason": null + }, + "retrieval_by_layer_ms": { + "C1_SYMBOL_CATALOG": 34, + "C0_SOURCE_CHUNKS": 12, + "C4_SEMANTIC_ROLES": 13, + "C2_DEPENDENCY_GRAPH": 42, + "C3_ENTRYPOINTS": 10 + } + } + }, + { + "step": "pre_evidence_gate", + "status": "passed", + "timings_ms": { + "pre_evidence_gate": 0 + }, + "output": { + "passed": true, + "failure_reasons": [], + "degraded_message": "" + } + }, + { + "step": "llm", + "status": "completed", + "timings_ms": { + "llm": 1394 + }, + "output": { + "prompt_name": "code_qa_explain_answer", + "answer_preview": "Функция `create_runtime` инициализирует объект `RuntimeManager`, загружает конфигурацию из указанного файла (если путь задан), регистрирует HTTP-контроллер для управления состоянием приложения и регистрирует переданный модуль (`ApplicationModule`) в системе.\n\nКонкретно:\n1. Функция создаёт экземпляр " + } + }, + { + "step": "post_evidence_gate", + "status": "passed", + "timings_ms": { + "post_evidence_gate": 0, + "repair": 0 + }, + "output": { + "passed": true, + "reasons": [], + "repair_used": false + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-explain-create-runtime.md b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-explain-create-runtime.md new file mode 100644 index 0000000..cf02f94 --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-explain-create-runtime.md @@ -0,0 +1,247 @@ +# plba-v2-explain-create-runtime + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: agent_runtime +- mode: full_chain +- passed: True + +## Query +Что делает функция create_runtime? + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 33, + "llm_answer": "Функция `create_runtime` инициализирует объект `RuntimeManager`, загружает конфигурацию из указанного файла (если путь задан), регистрирует HTTP-контроллер для управления состоянием приложения и регистрирует переданный модуль (`ApplicationModule`) в системе.\n\nКонкретно:\n1. Функция создаёт экземпляр `RuntimeManager`.\n2. Если указан путь к файлу конфигурации, файл загружается и добавляется в систему конфигурирования.\n3. При включении опции HTTP-контроллера создаётся и регистрируется соответствующий канал управления через класс `HttpControlChannel`.\n4. Переданный аргумент-модуль регистрируется в системе.\n\nЗависимости и вызовы внутри функции:\n- Загрузка конфигурации через чтение файла и его парсинг (используются библиотеки JSON и YAML).\n- Регистрация модуля в системе конфигурирования через метод `register_module`.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "create_runtime" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] +} + +## Steps +[ + { + "step": "router", + "status": "completed", + "timings_ms": { + "router": 0 + }, + "output": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + } + }, + { + "step": "retrieval", + "status": "completed", + "timings_ms": { + "retrieval": 113 + }, + "output": { + "rag_count": 33, + "answer_path_rag_count": 33, + "resolved_symbol_status": "resolved", + "resolved_symbol": "create_runtime", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "diagnostics": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "vector", + "C0_SOURCE_CHUNKS": "vector", + "C4_SEMANTIC_ROLES": "vector", + "C2_DEPENDENCY_GRAPH": "vector", + "C3_ENTRYPOINTS": "vector" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [] + } + }, + "fallback": { + "used": false, + "reason": null + }, + "retrieval_by_layer_ms": { + "C1_SYMBOL_CATALOG": 34, + "C0_SOURCE_CHUNKS": 12, + "C4_SEMANTIC_ROLES": 13, + "C2_DEPENDENCY_GRAPH": 42, + "C3_ENTRYPOINTS": 10 + } + } + }, + { + "step": "pre_evidence_gate", + "status": "passed", + "timings_ms": { + "pre_evidence_gate": 0 + }, + "output": { + "passed": true, + "failure_reasons": [], + "degraded_message": "" + } + }, + { + "step": "llm", + "status": "completed", + "timings_ms": { + "llm": 1394 + }, + "output": { + "prompt_name": "code_qa_explain_answer", + "answer_preview": "Функция `create_runtime` инициализирует объект `RuntimeManager`, загружает конфигурацию из указанного файла (если путь задан), регистрирует HTTP-контроллер для управления состоянием приложения и регистрирует переданный модуль (`ApplicationModule`) в системе.\n\nКонкретно:\n1. Функция создаёт экземпляр " + } + }, + { + "step": "post_evidence_gate", + "status": "passed", + "timings_ms": { + "post_evidence_gate": 0, + "repair": 0 + }, + "output": { + "passed": true, + "reasons": [], + "repair_used": false + } + } +] + +## Diagnostics +{ + "intent_correct": null, + "target_found": true, + "layers_used": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_sufficient": true, + "answer_mode": "normal", + "router_result": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "EXPLAIN", + "path_scope": [], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_resolution_status": "resolved" + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Что делает функция create_runtime?", + "sub_intent": "EXPLAIN", + "path_scope": [], + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C4_SEMANTIC_ROLES", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 6, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C3_ENTRYPOINTS", + "hit_count": 3, + "empty": false, + "fallback_used": false + } + ], + "empty_layers": [], + "evidence_gate_decision": { + "sufficient": true, + "failure_reasons": [], + "evidence_count": 33 + }, + "failure_reasons": [], + "timings_ms": { + "router": 0, + "retrieval": 113, + "pre_evidence_gate": 0, + "llm": 1394 + } +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-explain-local-http-channel.json b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-explain-local-http-channel.json new file mode 100644 index 0000000..03b9151 --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-explain-local-http-channel.json @@ -0,0 +1,2154 @@ +{ + "case_id": "plba-v2-explain-local-http-channel", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "agent_runtime", + "mode": "full_chain", + "query": "Почему в файле src/app_runtime/control/http_channel.py класс HttpControlChannel устроен так?", + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN_LOCAL", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 13, + "llm_answer": "Класс `HttpControlChannel` в файле `http_channel.py` реализует канал управления для HTTP-приложения. В конструкторе (`__init__`) инициализируются атрибуты:\n\n- `_timeout`: таймаут для канала.\n- `_runner`: экземпляр `UvicornThreadRunner`, управляющий запуском uvicorn-сервера.\n- `_factory`: фабрика приложений `HttpControlAppFactory`.\n- `_actions`: набор действий (контролируемых операций).\n\nМетод `start` запускает сервер с приложением, созданным фабрикой, и ассоциирует действия с каналом. Метод `stop` останавливает сервер. Класс использует асинхронный подход через аннотации `async`.", + "answer_mode": "answered", + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "symbol_candidates": [ + "HttpControlChannel" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C2_DEPENDENCY_GRAPH" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "query": "Почему в файле src/app_runtime/control/http_channel.py класс HttpControlChannel устроен так?", + "router_result": { + "schema_version": "1.1", + "intent": "CODE_QA", + "retrieval_profile": "code", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query_plan": { + "raw": "Почему в файле src/app_runtime/control/http_channel.py класс HttpControlChannel устроен так?", + "normalized": "Почему в файле src/app_runtime/control/http_channel.py класс HttpControlChannel устроен так?", + "sub_intent": "EXPLAIN_LOCAL", + "negations": [], + "expansions": [ + "file", + "HttpControlChannel" + ], + "keyword_hints": [ + "src/app_runtime/control/http_channel.py", + "HttpControlChannel" + ], + "path_hints": [ + "src/app_runtime/control/http_channel.py" + ], + "doc_scope_hints": [], + "symbol_candidates": [ + "HttpControlChannel" + ], + "symbol_kind_hint": "class", + "anchors": [ + { + "type": "FILE_PATH", + "value": "src/app_runtime/control/http_channel.py", + "source": "user_text", + "subtype": null, + "span": { + "start": 15, + "end": 54 + }, + "confidence": 0.95 + }, + { + "type": "SYMBOL", + "value": "HttpControlChannel", + "source": "user_text", + "subtype": null, + "span": { + "start": 61, + "end": 79 + }, + "confidence": 0.88 + }, + { + "type": "KEY_TERM", + "value": "файл", + "source": "user_text", + "subtype": null, + "span": { + "start": 9, + "end": 14 + }, + "confidence": 0.9 + }, + { + "type": "KEY_TERM", + "value": "класс", + "source": "user_text", + "subtype": null, + "span": { + "start": 55, + "end": 60 + }, + "confidence": 0.9 + } + ] + }, + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "top_k": 8 + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 12 + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "top_k": 4 + } + ], + "filters": { + "test_policy": "EXCLUDE", + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "HttpControlChannel", + "alternatives": [ + "ControlChannel", + "ControlActionSet", + "JSONResponse", + "HttpControlAppFactory", + "UvicornThreadRunner" + ], + "confidence": 0.99 + }, + "evidence_policy": { + "require_def": true, + "require_flow": false, + "require_spec": false, + "allow_answer_without_evidence": false + } + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Почему в файле src/app_runtime/control/http_channel.py класс HttpControlChannel устроен так?", + "sub_intent": "EXPLAIN_LOCAL", + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "keyword_hints": [ + "src/app_runtime/control/http_channel.py", + "HttpControlChannel" + ], + "symbol_candidates": [ + "HttpControlChannel" + ], + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C2_DEPENDENCY_GRAPH" + ], + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "top_k": 8 + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 12 + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "top_k": 4 + } + ], + "filters": { + "test_policy": "EXCLUDE", + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + }, + "query_plan": { + "raw": "Почему в файле src/app_runtime/control/http_channel.py класс HttpControlChannel устроен так?", + "normalized": "Почему в файле src/app_runtime/control/http_channel.py класс HttpControlChannel устроен так?", + "sub_intent": "EXPLAIN_LOCAL", + "negations": [], + "expansions": [ + "file", + "HttpControlChannel" + ], + "keyword_hints": [ + "src/app_runtime/control/http_channel.py", + "HttpControlChannel" + ], + "path_hints": [ + "src/app_runtime/control/http_channel.py" + ], + "doc_scope_hints": [], + "symbol_candidates": [ + "HttpControlChannel" + ], + "symbol_kind_hint": "class", + "anchors": [ + { + "type": "FILE_PATH", + "value": "src/app_runtime/control/http_channel.py", + "source": "user_text", + "subtype": null, + "span": { + "start": 15, + "end": 54 + }, + "confidence": 0.95 + }, + { + "type": "SYMBOL", + "value": "HttpControlChannel", + "source": "user_text", + "subtype": null, + "span": { + "start": 61, + "end": 79 + }, + "confidence": 0.88 + }, + { + "type": "KEY_TERM", + "value": "файл", + "source": "user_text", + "subtype": null, + "span": { + "start": 9, + "end": 14 + }, + "confidence": 0.9 + }, + { + "type": "KEY_TERM", + "value": "класс", + "source": "user_text", + "subtype": null, + "span": { + "start": 55, + "end": 60 + }, + "confidence": 0.9 + } + ] + } + }, + "retrieval_result": { + "target_symbol_candidates": [ + "ControlChannel", + "ControlActionSet", + "JSONResponse", + "HttpControlAppFactory", + "UvicornThreadRunner", + "HttpControlChannel", + "HttpControlChannel.__init__", + "HttpControlChannel.start" + ], + "resolved_symbol": "HttpControlChannel", + "symbol_resolution_status": "resolved", + "file_candidates": [ + "src/app_runtime/control/http_channel.py" + ], + "code_chunks": [ + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/http_channel.py", + "title": "ControlChannel", + "content": "const ControlChannel\nControlChannel = app_runtime.control.base.ControlChannel", + "start_line": 7, + "end_line": 7, + "metadata": { + "symbol_id": "6e69a934202b6e11891af8fb72b2033e8ae3071eb7577c64f5545b5b7ddfb51e", + "qname": "ControlChannel", + "kind": "const", + "signature": "ControlChannel = app_runtime.control.base.ControlChannel", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/http_channel.py", + "title": "ControlActionSet", + "content": "const ControlActionSet\nControlActionSet = app_runtime.control.base.ControlActionSet", + "start_line": 7, + "end_line": 7, + "metadata": { + "symbol_id": "2132a5717c57061e3488a1bf4d43650a60ea903a42278f4d494c014bc80d2df9", + "qname": "ControlActionSet", + "kind": "const", + "signature": "ControlActionSet = app_runtime.control.base.ControlActionSet", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/http_channel.py", + "title": "JSONResponse", + "content": "const JSONResponse\nJSONResponse = fastapi.responses.JSONResponse", + "start_line": 5, + "end_line": 5, + "metadata": { + "symbol_id": "238f600ea55013e25a3e1451f7fd65caabea125b314b89247900cdab5b801a23", + "qname": "JSONResponse", + "kind": "const", + "signature": "JSONResponse = fastapi.responses.JSONResponse", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/http_channel.py", + "title": "HttpControlAppFactory", + "content": "const HttpControlAppFactory\nHttpControlAppFactory = app_runtime.control.http_app.HttpControlAppFactory", + "start_line": 8, + "end_line": 8, + "metadata": { + "symbol_id": "9ee00379ee797cd2386e88a6e37dc69e3e31de9144fc4b95f0206cd1430e8983", + "qname": "HttpControlAppFactory", + "kind": "const", + "signature": "HttpControlAppFactory = app_runtime.control.http_app.HttpControlAppFactory", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/http_channel.py", + "title": "UvicornThreadRunner", + "content": "const UvicornThreadRunner\nUvicornThreadRunner = app_runtime.control.http_runner.UvicornThreadRunner", + "start_line": 9, + "end_line": 9, + "metadata": { + "symbol_id": "c6ee53f4ff75d5b34ee95854cb63bb3ecfa163023717cd969b8cba937a0cd3b3", + "qname": "UvicornThreadRunner", + "kind": "const", + "signature": "UvicornThreadRunner = app_runtime.control.http_runner.UvicornThreadRunner", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/http_channel.py", + "title": "HttpControlChannel", + "content": "class HttpControlChannel\nHttpControlChannel(ControlChannel)", + "start_line": 12, + "end_line": 57, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "qname": "HttpControlChannel", + "kind": "class", + "signature": "HttpControlChannel(ControlChannel)", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/http_channel.py", + "title": "HttpControlChannel.__init__", + "content": "method HttpControlChannel.__init__\n__init__(self, host, port, timeout)", + "start_line": 13, + "end_line": 17, + "metadata": { + "symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "qname": "HttpControlChannel.__init__", + "kind": "method", + "signature": "__init__(self, host, port, timeout)", + "parent_symbol_id": "HttpControlChannel", + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/http_channel.py", + "title": "HttpControlChannel.start", + "content": "method HttpControlChannel.start\nstart(self, actions)", + "start_line": 19, + "end_line": 22, + "metadata": { + "symbol_id": "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0", + "qname": "HttpControlChannel.start", + "kind": "method", + "signature": "start(self, actions)", + "parent_symbol_id": "HttpControlChannel", + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/http_channel.py", + "title": "src/app_runtime/control/http_channel.py:HttpControlChannel", + "content": "class HttpControlChannel(ControlChannel):\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._timeout = timeout\n self._runner = UvicornThreadRunner(host, port, timeout)\n self._factory = HttpControlAppFactory()\n self._actions: ControlActionSet | None = None\n\n async def start(self, actions: ControlActionSet) -> None:\n self._actions = actions\n app = self._factory.create(self._health_response, self._action_response)\n await self._runner.start(app)\n\n async def stop(self) -> None:\n await self._runner.stop()\n\n @property\n def port(self) -> int:\n return self._runner.port\n\n async def _health_response(self) -> dict[str, object]:\n if self._actions is None:\n return {\"status\": \"unhealthy\", \"detail\": \"control actions are not configured\"}\n return await asyncio.wait_for(self._actions.health(), timeout=float(self._timeout))\n\n async def _action_response(self, action: str, _client_source: str = \"unknown\") -> JSONResponse:\n if self._actions is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"{action} handler is not configured\"}, status_code=404)\n callbacks = {\n \"start\": self._actions.start,\n \"stop\": self._actions.stop,\n \"status\": self._actions.status,\n }\n callback = callbacks.get(action)\n if callback is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"unsupported action: {action}\"}, status_code=404)\n action_timeout = max(float(self._timeout), 10.0) if action in {\"start\", \"stop\"} else float(self._timeout)\n try:\n detail = await asyncio.wait_for(callback(), timeout=action_timeout)\n except asyncio.TimeoutError:\n return JSONResponse(\n content={\"status\": \"accepted\", \"detail\": f\"{action} operation is still in progress\"},\n status_code=202,\n )\n except Exception as exc:\n return JSONResponse(content={\"status\": \"error\", \"detail\": str(exc)}, status_code=500)\n return JSONResponse(content={\"status\": \"ok\", \"detail\": detail or f\"{action} action accepted\"}, status_code=200)", + "start_line": 12, + "end_line": 57, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/http_channel.py", + "title": "HttpControlChannel.__init__:dataflow_slice", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._timeout\n -> HttpControlChannel._action_response", + "start_line": 14, + "end_line": 47, + "metadata": { + "edge_id": "c3ef21fcae96c82c00be74b3ab827d4af2085d89cb3fa5521c19a174aad84dbb", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "e64969024ccaeb34d8d91473fad07b3b3d341875846392e7a006406c7ada1954", + "dst_ref": "HttpControlChannel._action_response", + "resolution": "resolved", + "slice_id": "c3ef21fcae96c82c00be74b3ab827d4af2085d89cb3fa5521c19a174aad84dbb", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._timeout", + "HttpControlChannel._action_response" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "e64969024ccaeb34d8d91473fad07b3b3d341875846392e7a006406c7ada1954" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/http_channel.py", + "title": "HttpControlChannel.__init__:dataflow_slice", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._runner\n -> HttpControlChannel.start", + "start_line": 15, + "end_line": 22, + "metadata": { + "edge_id": "51d73913df709152258ed1b9a8c8f4eb3c575eccfe6b982aef0b28e0789a29da", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0", + "dst_ref": "HttpControlChannel.start", + "resolution": "resolved", + "slice_id": "51d73913df709152258ed1b9a8c8f4eb3c575eccfe6b982aef0b28e0789a29da", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._runner", + "HttpControlChannel.start" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/http_channel.py", + "title": "HttpControlChannel.__init__:dataflow_slice", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._timeout\n -> HttpControlChannel._health_response", + "start_line": 14, + "end_line": 34, + "metadata": { + "edge_id": "f858f5c9e575f6c4cdfe3853571b7ee21d1f628a443541d2037c3dc9d0790bef", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "e84bf04e9cd2127df235b7064d05f47e19f19a89c7c82f4c247231d4e8fa426a", + "dst_ref": "HttpControlChannel._health_response", + "resolution": "resolved", + "slice_id": "f858f5c9e575f6c4cdfe3853571b7ee21d1f628a443541d2037c3dc9d0790bef", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._timeout", + "HttpControlChannel._health_response" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "e84bf04e9cd2127df235b7064d05f47e19f19a89c7c82f4c247231d4e8fa426a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/http_channel.py", + "title": "HttpControlChannel.__init__:dataflow_slice", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._runner\n -> HttpControlChannel.stop", + "start_line": 15, + "end_line": 25, + "metadata": { + "edge_id": "0f827ef81a990258a8a74381c8564a8361afa6712dba3200592659c939adcb9d", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "f29ab212620093d72be20e26c5a399624c7939a6056a728762ed3f84a250bfa3", + "dst_ref": "HttpControlChannel.stop", + "resolution": "resolved", + "slice_id": "0f827ef81a990258a8a74381c8564a8361afa6712dba3200592659c939adcb9d", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._runner", + "HttpControlChannel.stop" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "f29ab212620093d72be20e26c5a399624c7939a6056a728762ed3f84a250bfa3" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "relations": [ + { + "path": "src/app_runtime/control/http_channel.py", + "metadata": { + "edge_id": "c3ef21fcae96c82c00be74b3ab827d4af2085d89cb3fa5521c19a174aad84dbb", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "e64969024ccaeb34d8d91473fad07b3b3d341875846392e7a006406c7ada1954", + "dst_ref": "HttpControlChannel._action_response", + "resolution": "resolved", + "slice_id": "c3ef21fcae96c82c00be74b3ab827d4af2085d89cb3fa5521c19a174aad84dbb", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._timeout", + "HttpControlChannel._action_response" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "e64969024ccaeb34d8d91473fad07b3b3d341875846392e7a006406c7ada1954" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._timeout\n -> HttpControlChannel._action_response" + }, + { + "path": "src/app_runtime/control/http_channel.py", + "metadata": { + "edge_id": "51d73913df709152258ed1b9a8c8f4eb3c575eccfe6b982aef0b28e0789a29da", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0", + "dst_ref": "HttpControlChannel.start", + "resolution": "resolved", + "slice_id": "51d73913df709152258ed1b9a8c8f4eb3c575eccfe6b982aef0b28e0789a29da", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._runner", + "HttpControlChannel.start" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._runner\n -> HttpControlChannel.start" + }, + { + "path": "src/app_runtime/control/http_channel.py", + "metadata": { + "edge_id": "f858f5c9e575f6c4cdfe3853571b7ee21d1f628a443541d2037c3dc9d0790bef", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "e84bf04e9cd2127df235b7064d05f47e19f19a89c7c82f4c247231d4e8fa426a", + "dst_ref": "HttpControlChannel._health_response", + "resolution": "resolved", + "slice_id": "f858f5c9e575f6c4cdfe3853571b7ee21d1f628a443541d2037c3dc9d0790bef", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._timeout", + "HttpControlChannel._health_response" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "e84bf04e9cd2127df235b7064d05f47e19f19a89c7c82f4c247231d4e8fa426a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._timeout\n -> HttpControlChannel._health_response" + }, + { + "path": "src/app_runtime/control/http_channel.py", + "metadata": { + "edge_id": "0f827ef81a990258a8a74381c8564a8361afa6712dba3200592659c939adcb9d", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "f29ab212620093d72be20e26c5a399624c7939a6056a728762ed3f84a250bfa3", + "dst_ref": "HttpControlChannel.stop", + "resolution": "resolved", + "slice_id": "0f827ef81a990258a8a74381c8564a8361afa6712dba3200592659c939adcb9d", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._runner", + "HttpControlChannel.stop" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "f29ab212620093d72be20e26c5a399624c7939a6056a728762ed3f84a250bfa3" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._runner\n -> HttpControlChannel.stop" + } + ], + "entrypoints": [], + "test_candidates": [], + "layer_outcomes": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 1, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 4, + "empty": false, + "fallback_used": false + } + ], + "missing_layers": [], + "raw_rows": [ + { + "path": "src/app_runtime/control/http_channel.py", + "content": "const ControlChannel\nControlChannel = app_runtime.control.base.ControlChannel", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlChannel", + "span_start": 7, + "span_end": 7, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "6e69a934202b6e11891af8fb72b2033e8ae3071eb7577c64f5545b5b7ddfb51e", + "qname": "ControlChannel", + "kind": "const", + "signature": "ControlChannel = app_runtime.control.base.ControlChannel", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "const ControlActionSet\nControlActionSet = app_runtime.control.base.ControlActionSet", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlActionSet", + "span_start": 7, + "span_end": 7, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "2132a5717c57061e3488a1bf4d43650a60ea903a42278f4d494c014bc80d2df9", + "qname": "ControlActionSet", + "kind": "const", + "signature": "ControlActionSet = app_runtime.control.base.ControlActionSet", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "const JSONResponse\nJSONResponse = fastapi.responses.JSONResponse", + "layer": "C1_SYMBOL_CATALOG", + "title": "JSONResponse", + "span_start": 5, + "span_end": 5, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "238f600ea55013e25a3e1451f7fd65caabea125b314b89247900cdab5b801a23", + "qname": "JSONResponse", + "kind": "const", + "signature": "JSONResponse = fastapi.responses.JSONResponse", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "const HttpControlAppFactory\nHttpControlAppFactory = app_runtime.control.http_app.HttpControlAppFactory", + "layer": "C1_SYMBOL_CATALOG", + "title": "HttpControlAppFactory", + "span_start": 8, + "span_end": 8, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "9ee00379ee797cd2386e88a6e37dc69e3e31de9144fc4b95f0206cd1430e8983", + "qname": "HttpControlAppFactory", + "kind": "const", + "signature": "HttpControlAppFactory = app_runtime.control.http_app.HttpControlAppFactory", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "const UvicornThreadRunner\nUvicornThreadRunner = app_runtime.control.http_runner.UvicornThreadRunner", + "layer": "C1_SYMBOL_CATALOG", + "title": "UvicornThreadRunner", + "span_start": 9, + "span_end": 9, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "c6ee53f4ff75d5b34ee95854cb63bb3ecfa163023717cd969b8cba937a0cd3b3", + "qname": "UvicornThreadRunner", + "kind": "const", + "signature": "UvicornThreadRunner = app_runtime.control.http_runner.UvicornThreadRunner", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel\nHttpControlChannel(ControlChannel)", + "layer": "C1_SYMBOL_CATALOG", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "qname": "HttpControlChannel", + "kind": "class", + "signature": "HttpControlChannel(ControlChannel)", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "method HttpControlChannel.__init__\n__init__(self, host, port, timeout)", + "layer": "C1_SYMBOL_CATALOG", + "title": "HttpControlChannel.__init__", + "span_start": 13, + "span_end": 17, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "qname": "HttpControlChannel.__init__", + "kind": "method", + "signature": "__init__(self, host, port, timeout)", + "parent_symbol_id": "HttpControlChannel", + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "method HttpControlChannel.start\nstart(self, actions)", + "layer": "C1_SYMBOL_CATALOG", + "title": "HttpControlChannel.start", + "span_start": 19, + "span_end": 22, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0", + "qname": "HttpControlChannel.start", + "kind": "method", + "signature": "start(self, actions)", + "parent_symbol_id": "HttpControlChannel", + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel(ControlChannel):\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._timeout = timeout\n self._runner = UvicornThreadRunner(host, port, timeout)\n self._factory = HttpControlAppFactory()\n self._actions: ControlActionSet | None = None\n\n async def start(self, actions: ControlActionSet) -> None:\n self._actions = actions\n app = self._factory.create(self._health_response, self._action_response)\n await self._runner.start(app)\n\n async def stop(self) -> None:\n await self._runner.stop()\n\n @property\n def port(self) -> int:\n return self._runner.port\n\n async def _health_response(self) -> dict[str, object]:\n if self._actions is None:\n return {\"status\": \"unhealthy\", \"detail\": \"control actions are not configured\"}\n return await asyncio.wait_for(self._actions.health(), timeout=float(self._timeout))\n\n async def _action_response(self, action: str, _client_source: str = \"unknown\") -> JSONResponse:\n if self._actions is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"{action} handler is not configured\"}, status_code=404)\n callbacks = {\n \"start\": self._actions.start,\n \"stop\": self._actions.stop,\n \"status\": self._actions.status,\n }\n callback = callbacks.get(action)\n if callback is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"unsupported action: {action}\"}, status_code=404)\n action_timeout = max(float(self._timeout), 10.0) if action in {\"start\", \"stop\"} else float(self._timeout)\n try:\n detail = await asyncio.wait_for(callback(), timeout=action_timeout)\n except asyncio.TimeoutError:\n return JSONResponse(\n content={\"status\": \"accepted\", \"detail\": f\"{action} operation is still in progress\"},\n status_code=202,\n )\n except Exception as exc:\n return JSONResponse(content={\"status\": \"error\", \"detail\": str(exc)}, status_code=500)\n return JSONResponse(content={\"status\": \"ok\", \"detail\": detail or f\"{action} action accepted\"}, status_code=200)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_channel.py:HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._timeout\n -> HttpControlChannel._action_response", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "c3ef21fcae96c82c00be74b3ab827d4af2085d89cb3fa5521c19a174aad84dbb", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "e64969024ccaeb34d8d91473fad07b3b3d341875846392e7a006406c7ada1954", + "dst_ref": "HttpControlChannel._action_response", + "resolution": "resolved", + "slice_id": "c3ef21fcae96c82c00be74b3ab827d4af2085d89cb3fa5521c19a174aad84dbb", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._timeout", + "HttpControlChannel._action_response" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "e64969024ccaeb34d8d91473fad07b3b3d341875846392e7a006406c7ada1954" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._runner\n -> HttpControlChannel.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 15, + "span_end": 22, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "51d73913df709152258ed1b9a8c8f4eb3c575eccfe6b982aef0b28e0789a29da", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0", + "dst_ref": "HttpControlChannel.start", + "resolution": "resolved", + "slice_id": "51d73913df709152258ed1b9a8c8f4eb3c575eccfe6b982aef0b28e0789a29da", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._runner", + "HttpControlChannel.start" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._timeout\n -> HttpControlChannel._health_response", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 14, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "f858f5c9e575f6c4cdfe3853571b7ee21d1f628a443541d2037c3dc9d0790bef", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "e84bf04e9cd2127df235b7064d05f47e19f19a89c7c82f4c247231d4e8fa426a", + "dst_ref": "HttpControlChannel._health_response", + "resolution": "resolved", + "slice_id": "f858f5c9e575f6c4cdfe3853571b7ee21d1f628a443541d2037c3dc9d0790bef", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._timeout", + "HttpControlChannel._health_response" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "e84bf04e9cd2127df235b7064d05f47e19f19a89c7c82f4c247231d4e8fa426a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._runner\n -> HttpControlChannel.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 15, + "span_end": 25, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "0f827ef81a990258a8a74381c8564a8361afa6712dba3200592659c939adcb9d", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "f29ab212620093d72be20e26c5a399624c7939a6056a728762ed3f84a250bfa3", + "dst_ref": "HttpControlChannel.stop", + "resolution": "resolved", + "slice_id": "0f827ef81a990258a8a74381c8564a8361afa6712dba3200592659c939adcb9d", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._runner", + "HttpControlChannel.stop" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "f29ab212620093d72be20e26c5a399624c7939a6056a728762ed3f84a250bfa3" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "retrieval_report": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C2_DEPENDENCY_GRAPH" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "vector", + "C0_SOURCE_CHUNKS": "vector", + "C2_DEPENDENCY_GRAPH": "vector" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 12, + "C2_DEPENDENCY_GRAPH": 4 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ] + } + }, + "fallback": { + "used": false, + "reason": null + }, + "retrieval_by_layer_ms": { + "C1_SYMBOL_CATALOG": 23, + "C0_SOURCE_CHUNKS": 11, + "C2_DEPENDENCY_GRAPH": 13 + } + } + }, + "diagnostics": { + "intent_correct": null, + "target_found": true, + "layers_used": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C2_DEPENDENCY_GRAPH" + ], + "retrieval_sufficient": true, + "answer_mode": "normal", + "router_result": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "EXPLAIN_LOCAL", + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C2_DEPENDENCY_GRAPH" + ], + "symbol_resolution_status": "resolved" + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Почему в файле src/app_runtime/control/http_channel.py класс HttpControlChannel устроен так?", + "sub_intent": "EXPLAIN_LOCAL", + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C2_DEPENDENCY_GRAPH" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 1, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 4, + "empty": false, + "fallback_used": false + } + ], + "empty_layers": [], + "evidence_gate_decision": { + "sufficient": true, + "failure_reasons": [], + "evidence_count": 13 + }, + "failure_reasons": [], + "timings_ms": { + "router": 0, + "retrieval": 47, + "pre_evidence_gate": 0, + "llm": 1155 + } + }, + "rag_rows": [ + { + "path": "src/app_runtime/control/http_channel.py", + "content": "const ControlChannel\nControlChannel = app_runtime.control.base.ControlChannel", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlChannel", + "span_start": 7, + "span_end": 7, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "6e69a934202b6e11891af8fb72b2033e8ae3071eb7577c64f5545b5b7ddfb51e", + "qname": "ControlChannel", + "kind": "const", + "signature": "ControlChannel = app_runtime.control.base.ControlChannel", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "const ControlActionSet\nControlActionSet = app_runtime.control.base.ControlActionSet", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlActionSet", + "span_start": 7, + "span_end": 7, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "2132a5717c57061e3488a1bf4d43650a60ea903a42278f4d494c014bc80d2df9", + "qname": "ControlActionSet", + "kind": "const", + "signature": "ControlActionSet = app_runtime.control.base.ControlActionSet", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "const JSONResponse\nJSONResponse = fastapi.responses.JSONResponse", + "layer": "C1_SYMBOL_CATALOG", + "title": "JSONResponse", + "span_start": 5, + "span_end": 5, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "238f600ea55013e25a3e1451f7fd65caabea125b314b89247900cdab5b801a23", + "qname": "JSONResponse", + "kind": "const", + "signature": "JSONResponse = fastapi.responses.JSONResponse", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "const HttpControlAppFactory\nHttpControlAppFactory = app_runtime.control.http_app.HttpControlAppFactory", + "layer": "C1_SYMBOL_CATALOG", + "title": "HttpControlAppFactory", + "span_start": 8, + "span_end": 8, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "9ee00379ee797cd2386e88a6e37dc69e3e31de9144fc4b95f0206cd1430e8983", + "qname": "HttpControlAppFactory", + "kind": "const", + "signature": "HttpControlAppFactory = app_runtime.control.http_app.HttpControlAppFactory", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "const UvicornThreadRunner\nUvicornThreadRunner = app_runtime.control.http_runner.UvicornThreadRunner", + "layer": "C1_SYMBOL_CATALOG", + "title": "UvicornThreadRunner", + "span_start": 9, + "span_end": 9, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "c6ee53f4ff75d5b34ee95854cb63bb3ecfa163023717cd969b8cba937a0cd3b3", + "qname": "UvicornThreadRunner", + "kind": "const", + "signature": "UvicornThreadRunner = app_runtime.control.http_runner.UvicornThreadRunner", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel\nHttpControlChannel(ControlChannel)", + "layer": "C1_SYMBOL_CATALOG", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "qname": "HttpControlChannel", + "kind": "class", + "signature": "HttpControlChannel(ControlChannel)", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "method HttpControlChannel.__init__\n__init__(self, host, port, timeout)", + "layer": "C1_SYMBOL_CATALOG", + "title": "HttpControlChannel.__init__", + "span_start": 13, + "span_end": 17, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "qname": "HttpControlChannel.__init__", + "kind": "method", + "signature": "__init__(self, host, port, timeout)", + "parent_symbol_id": "HttpControlChannel", + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "method HttpControlChannel.start\nstart(self, actions)", + "layer": "C1_SYMBOL_CATALOG", + "title": "HttpControlChannel.start", + "span_start": 19, + "span_end": 22, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0", + "qname": "HttpControlChannel.start", + "kind": "method", + "signature": "start(self, actions)", + "parent_symbol_id": "HttpControlChannel", + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel(ControlChannel):\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._timeout = timeout\n self._runner = UvicornThreadRunner(host, port, timeout)\n self._factory = HttpControlAppFactory()\n self._actions: ControlActionSet | None = None\n\n async def start(self, actions: ControlActionSet) -> None:\n self._actions = actions\n app = self._factory.create(self._health_response, self._action_response)\n await self._runner.start(app)\n\n async def stop(self) -> None:\n await self._runner.stop()\n\n @property\n def port(self) -> int:\n return self._runner.port\n\n async def _health_response(self) -> dict[str, object]:\n if self._actions is None:\n return {\"status\": \"unhealthy\", \"detail\": \"control actions are not configured\"}\n return await asyncio.wait_for(self._actions.health(), timeout=float(self._timeout))\n\n async def _action_response(self, action: str, _client_source: str = \"unknown\") -> JSONResponse:\n if self._actions is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"{action} handler is not configured\"}, status_code=404)\n callbacks = {\n \"start\": self._actions.start,\n \"stop\": self._actions.stop,\n \"status\": self._actions.status,\n }\n callback = callbacks.get(action)\n if callback is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"unsupported action: {action}\"}, status_code=404)\n action_timeout = max(float(self._timeout), 10.0) if action in {\"start\", \"stop\"} else float(self._timeout)\n try:\n detail = await asyncio.wait_for(callback(), timeout=action_timeout)\n except asyncio.TimeoutError:\n return JSONResponse(\n content={\"status\": \"accepted\", \"detail\": f\"{action} operation is still in progress\"},\n status_code=202,\n )\n except Exception as exc:\n return JSONResponse(content={\"status\": \"error\", \"detail\": str(exc)}, status_code=500)\n return JSONResponse(content={\"status\": \"ok\", \"detail\": detail or f\"{action} action accepted\"}, status_code=200)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_channel.py:HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._timeout\n -> HttpControlChannel._action_response", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "c3ef21fcae96c82c00be74b3ab827d4af2085d89cb3fa5521c19a174aad84dbb", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "e64969024ccaeb34d8d91473fad07b3b3d341875846392e7a006406c7ada1954", + "dst_ref": "HttpControlChannel._action_response", + "resolution": "resolved", + "slice_id": "c3ef21fcae96c82c00be74b3ab827d4af2085d89cb3fa5521c19a174aad84dbb", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._timeout", + "HttpControlChannel._action_response" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "e64969024ccaeb34d8d91473fad07b3b3d341875846392e7a006406c7ada1954" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._runner\n -> HttpControlChannel.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 15, + "span_end": 22, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "51d73913df709152258ed1b9a8c8f4eb3c575eccfe6b982aef0b28e0789a29da", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0", + "dst_ref": "HttpControlChannel.start", + "resolution": "resolved", + "slice_id": "51d73913df709152258ed1b9a8c8f4eb3c575eccfe6b982aef0b28e0789a29da", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._runner", + "HttpControlChannel.start" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "d1933f04137f52535b6525f1b93ff2cd83bfb216b480e887e791ed1714cda8e0" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._timeout\n -> HttpControlChannel._health_response", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 14, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "f858f5c9e575f6c4cdfe3853571b7ee21d1f628a443541d2037c3dc9d0790bef", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "e84bf04e9cd2127df235b7064d05f47e19f19a89c7c82f4c247231d4e8fa426a", + "dst_ref": "HttpControlChannel._health_response", + "resolution": "resolved", + "slice_id": "f858f5c9e575f6c4cdfe3853571b7ee21d1f628a443541d2037c3dc9d0790bef", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._timeout", + "HttpControlChannel._health_response" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "e84bf04e9cd2127df235b7064d05f47e19f19a89c7c82f4c247231d4e8fa426a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel.__init__\n -> HttpControlChannel._runner\n -> HttpControlChannel.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlChannel.__init__:dataflow_slice", + "span_start": 15, + "span_end": 25, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "0f827ef81a990258a8a74381c8564a8361afa6712dba3200592659c939adcb9d", + "edge_type": "dataflow_slice", + "src_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "src_qname": "HttpControlChannel.__init__", + "dst_symbol_id": "f29ab212620093d72be20e26c5a399624c7939a6056a728762ed3f84a250bfa3", + "dst_ref": "HttpControlChannel.stop", + "resolution": "resolved", + "slice_id": "0f827ef81a990258a8a74381c8564a8361afa6712dba3200592659c939adcb9d", + "root_symbol_id": "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "path_symbols": [ + "HttpControlChannel.__init__", + "HttpControlChannel._runner", + "HttpControlChannel.stop" + ], + "path_symbol_ids": [ + "8de037370533181832fa806ba2b86a458a7657ab5a95d9ffff90a649ada2dc3a", + "f29ab212620093d72be20e26c5a399624c7939a6056a728762ed3f84a250bfa3" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "validation": { + "passed": true, + "action": "return", + "reasons": [] + }, + "steps": [ + { + "step": "router", + "status": "completed", + "timings_ms": { + "router": 0 + }, + "output": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN_LOCAL", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + } + }, + { + "step": "retrieval", + "status": "completed", + "timings_ms": { + "retrieval": 47 + }, + "output": { + "rag_count": 13, + "answer_path_rag_count": 13, + "resolved_symbol_status": "resolved", + "resolved_symbol": "HttpControlChannel", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C2_DEPENDENCY_GRAPH" + ] + }, + "diagnostics": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C2_DEPENDENCY_GRAPH" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "vector", + "C0_SOURCE_CHUNKS": "vector", + "C2_DEPENDENCY_GRAPH": "vector" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 12, + "C2_DEPENDENCY_GRAPH": 4 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ] + } + }, + "fallback": { + "used": false, + "reason": null + }, + "retrieval_by_layer_ms": { + "C1_SYMBOL_CATALOG": 23, + "C0_SOURCE_CHUNKS": 11, + "C2_DEPENDENCY_GRAPH": 13 + } + } + }, + { + "step": "pre_evidence_gate", + "status": "passed", + "timings_ms": { + "pre_evidence_gate": 0 + }, + "output": { + "passed": true, + "failure_reasons": [], + "degraded_message": "" + } + }, + { + "step": "llm", + "status": "completed", + "timings_ms": { + "llm": 1155 + }, + "output": { + "prompt_name": "code_qa_explain_local_answer", + "answer_preview": "Класс `HttpControlChannel` в файле `http_channel.py` реализует канал управления для HTTP-приложения. В конструкторе (`__init__`) инициализируются атрибуты:\n\n- `_timeout`: таймаут для канала.\n- `_runner`: экземпляр `UvicornThreadRunner`, управляющий запуском uvicorn-сервера.\n- `_factory`: фабрика при" + } + }, + { + "step": "post_evidence_gate", + "status": "passed", + "timings_ms": { + "post_evidence_gate": 0, + "repair": 0 + }, + "output": { + "passed": true, + "reasons": [], + "repair_used": false + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-explain-local-http-channel.md b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-explain-local-http-channel.md new file mode 100644 index 0000000..636be0b --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-explain-local-http-channel.md @@ -0,0 +1,223 @@ +# plba-v2-explain-local-http-channel + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: agent_runtime +- mode: full_chain +- passed: True + +## Query +Почему в файле src/app_runtime/control/http_channel.py класс HttpControlChannel устроен так? + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "EXPLAIN_LOCAL", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 13, + "llm_answer": "Класс `HttpControlChannel` в файле `http_channel.py` реализует канал управления для HTTP-приложения. В конструкторе (`__init__`) инициализируются атрибуты:\n\n- `_timeout`: таймаут для канала.\n- `_runner`: экземпляр `UvicornThreadRunner`, управляющий запуском uvicorn-сервера.\n- `_factory`: фабрика приложений `HttpControlAppFactory`.\n- `_actions`: набор действий (контролируемых операций).\n\nМетод `start` запускает сервер с приложением, созданным фабрикой, и ассоциирует действия с каналом. Метод `stop` останавливает сервер. Класс использует асинхронный подход через аннотации `async`.", + "answer_mode": "answered", + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "symbol_candidates": [ + "HttpControlChannel" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C2_DEPENDENCY_GRAPH" + ] +} + +## Steps +[ + { + "step": "router", + "status": "completed", + "timings_ms": { + "router": 0 + }, + "output": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN_LOCAL", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + } + }, + { + "step": "retrieval", + "status": "completed", + "timings_ms": { + "retrieval": 47 + }, + "output": { + "rag_count": 13, + "answer_path_rag_count": 13, + "resolved_symbol_status": "resolved", + "resolved_symbol": "HttpControlChannel", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C2_DEPENDENCY_GRAPH" + ] + }, + "diagnostics": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C2_DEPENDENCY_GRAPH" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "vector", + "C0_SOURCE_CHUNKS": "vector", + "C2_DEPENDENCY_GRAPH": "vector" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 12, + "C2_DEPENDENCY_GRAPH": 4 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ] + } + }, + "fallback": { + "used": false, + "reason": null + }, + "retrieval_by_layer_ms": { + "C1_SYMBOL_CATALOG": 23, + "C0_SOURCE_CHUNKS": 11, + "C2_DEPENDENCY_GRAPH": 13 + } + } + }, + { + "step": "pre_evidence_gate", + "status": "passed", + "timings_ms": { + "pre_evidence_gate": 0 + }, + "output": { + "passed": true, + "failure_reasons": [], + "degraded_message": "" + } + }, + { + "step": "llm", + "status": "completed", + "timings_ms": { + "llm": 1155 + }, + "output": { + "prompt_name": "code_qa_explain_local_answer", + "answer_preview": "Класс `HttpControlChannel` в файле `http_channel.py` реализует канал управления для HTTP-приложения. В конструкторе (`__init__`) инициализируются атрибуты:\n\n- `_timeout`: таймаут для канала.\n- `_runner`: экземпляр `UvicornThreadRunner`, управляющий запуском uvicorn-сервера.\n- `_factory`: фабрика при" + } + }, + { + "step": "post_evidence_gate", + "status": "passed", + "timings_ms": { + "post_evidence_gate": 0, + "repair": 0 + }, + "output": { + "passed": true, + "reasons": [], + "repair_used": false + } + } +] + +## Diagnostics +{ + "intent_correct": null, + "target_found": true, + "layers_used": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C2_DEPENDENCY_GRAPH" + ], + "retrieval_sufficient": true, + "answer_mode": "normal", + "router_result": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "EXPLAIN_LOCAL", + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C2_DEPENDENCY_GRAPH" + ], + "symbol_resolution_status": "resolved" + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Почему в файле src/app_runtime/control/http_channel.py класс HttpControlChannel устроен так?", + "sub_intent": "EXPLAIN_LOCAL", + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ], + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C2_DEPENDENCY_GRAPH" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 1, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 4, + "empty": false, + "fallback_used": false + } + ], + "empty_layers": [], + "evidence_gate_decision": { + "sufficient": true, + "failure_reasons": [], + "evidence_count": 13 + }, + "failure_reasons": [], + "timings_ms": { + "router": 0, + "retrieval": 47, + "pre_evidence_gate": 0, + "llm": 1155 + } +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-explain-nonexistent-symbol.json b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-explain-nonexistent-symbol.json new file mode 100644 index 0000000..3b7279e --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-explain-nonexistent-symbol.json @@ -0,0 +1,590 @@ +{ + "case_id": "plba-v2-explain-nonexistent-symbol", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "agent_runtime", + "mode": "full_chain", + "query": "Объясни класс RuntimeFactoryManager", + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 0, + "llm_answer": "Сущность не удалось однозначно разрешить. Близкие варианты: ControlChannel, ControlChannel.stop, ControlActionSet.", + "answer_mode": "degraded", + "path_scope": [], + "symbol_candidates": [ + "RuntimeFactoryManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": false, + "mismatches": [ + "llm: expected answer to contain 'не найдена'" + ], + "details": { + "query": "Объясни класс RuntimeFactoryManager", + "router_result": { + "schema_version": "1.1", + "intent": "CODE_QA", + "retrieval_profile": "code", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query_plan": { + "raw": "Объясни класс RuntimeFactoryManager", + "normalized": "Объясни класс RuntimeFactoryManager", + "sub_intent": "EXPLAIN", + "negations": [], + "expansions": [ + "RuntimeFactoryManager" + ], + "keyword_hints": [ + "RuntimeFactoryManager" + ], + "path_hints": [], + "doc_scope_hints": [], + "symbol_candidates": [ + "RuntimeFactoryManager" + ], + "symbol_kind_hint": "class", + "anchors": [ + { + "type": "SYMBOL", + "value": "RuntimeFactoryManager", + "source": "user_text", + "subtype": null, + "span": { + "start": 14, + "end": 35 + }, + "confidence": 0.88 + }, + { + "type": "KEY_TERM", + "value": "класс", + "source": "user_text", + "subtype": null, + "span": { + "start": 8, + "end": 13 + }, + "confidence": 0.9 + } + ] + }, + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "top_k": 8 + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 8 + }, + { + "layer_id": "C4_SEMANTIC_ROLES", + "top_k": 8 + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "top_k": 6 + }, + { + "layer_id": "C3_ENTRYPOINTS", + "top_k": 6 + } + ], + "filters": { + "test_policy": "EXCLUDE", + "path_scope": [], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + }, + "symbol_resolution": { + "status": "ambiguous", + "resolved_symbol": null, + "alternatives": [ + "ControlChannel", + "ControlChannel.stop", + "ControlActionSet", + "ControlChannel", + "ControlPlaneService" + ], + "confidence": 0.55 + }, + "evidence_policy": { + "require_def": true, + "require_flow": true, + "require_spec": false, + "allow_answer_without_evidence": false + } + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Объясни класс RuntimeFactoryManager", + "sub_intent": "EXPLAIN", + "path_scope": [], + "keyword_hints": [ + "RuntimeFactoryManager" + ], + "symbol_candidates": [ + "RuntimeFactoryManager" + ], + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "top_k": 8 + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 8 + }, + { + "layer_id": "C4_SEMANTIC_ROLES", + "top_k": 8 + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "top_k": 6 + }, + { + "layer_id": "C3_ENTRYPOINTS", + "top_k": 6 + } + ], + "filters": { + "test_policy": "EXCLUDE", + "path_scope": [], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + }, + "query_plan": { + "raw": "Объясни класс RuntimeFactoryManager", + "normalized": "Объясни класс RuntimeFactoryManager", + "sub_intent": "EXPLAIN", + "negations": [], + "expansions": [ + "RuntimeFactoryManager" + ], + "keyword_hints": [ + "RuntimeFactoryManager" + ], + "path_hints": [], + "doc_scope_hints": [], + "symbol_candidates": [ + "RuntimeFactoryManager" + ], + "symbol_kind_hint": "class", + "anchors": [ + { + "type": "SYMBOL", + "value": "RuntimeFactoryManager", + "source": "user_text", + "subtype": null, + "span": { + "start": 14, + "end": 35 + }, + "confidence": 0.88 + }, + { + "type": "KEY_TERM", + "value": "класс", + "source": "user_text", + "subtype": null, + "span": { + "start": 8, + "end": 13 + }, + "confidence": 0.9 + } + ] + } + }, + "retrieval_result": { + "target_symbol_candidates": [], + "resolved_symbol": null, + "symbol_resolution_status": "ambiguous", + "file_candidates": [], + "code_chunks": [], + "relations": [], + "entrypoints": [], + "test_candidates": [], + "layer_outcomes": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 0, + "empty": true, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 0, + "empty": true, + "fallback_used": false + }, + { + "layer_id": "C4_SEMANTIC_ROLES", + "hit_count": 0, + "empty": true, + "fallback_used": false + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 0, + "empty": true, + "fallback_used": false + }, + { + "layer_id": "C3_ENTRYPOINTS", + "hit_count": 0, + "empty": true, + "fallback_used": false + } + ], + "missing_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "raw_rows": [], + "retrieval_report": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "vector", + "C0_SOURCE_CHUNKS": "vector", + "C4_SEMANTIC_ROLES": "vector", + "C2_DEPENDENCY_GRAPH": "vector", + "C3_ENTRYPOINTS": "vector" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [] + } + }, + "fallback": { + "used": false, + "reason": null + }, + "retrieval_by_layer_ms": { + "C1_SYMBOL_CATALOG": 39, + "C0_SOURCE_CHUNKS": 20, + "C4_SEMANTIC_ROLES": 16, + "C2_DEPENDENCY_GRAPH": 55, + "C3_ENTRYPOINTS": 12 + } + } + }, + "diagnostics": { + "intent_correct": null, + "target_found": false, + "layers_used": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_sufficient": false, + "answer_mode": "insufficient", + "router_result": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "EXPLAIN", + "path_scope": [], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_resolution_status": "ambiguous" + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Объясни класс RuntimeFactoryManager", + "sub_intent": "EXPLAIN", + "path_scope": [], + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 0, + "empty": true, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 0, + "empty": true, + "fallback_used": false + }, + { + "layer_id": "C4_SEMANTIC_ROLES", + "hit_count": 0, + "empty": true, + "fallback_used": false + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 0, + "empty": true, + "fallback_used": false + }, + { + "layer_id": "C3_ENTRYPOINTS", + "hit_count": 0, + "empty": true, + "fallback_used": false + } + ], + "empty_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "evidence_gate_decision": { + "sufficient": false, + "failure_reasons": [ + "insufficient_evidence" + ], + "evidence_count": 0 + }, + "failure_reasons": [ + "insufficient_evidence" + ], + "timings_ms": { + "router": 1, + "retrieval": 143, + "pre_evidence_gate": 0 + } + }, + "rag_rows": [], + "validation": { + "passed": false, + "action": "repair", + "reasons": [ + "degraded_answer_missing_guardrail" + ] + }, + "steps": [ + { + "step": "router", + "status": "completed", + "timings_ms": { + "router": 1 + }, + "output": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + } + }, + { + "step": "retrieval", + "status": "completed", + "timings_ms": { + "retrieval": 143 + }, + "output": { + "rag_count": 33, + "answer_path_rag_count": 0, + "resolved_symbol_status": "ambiguous", + "resolved_symbol": null, + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "diagnostics": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "vector", + "C0_SOURCE_CHUNKS": "vector", + "C4_SEMANTIC_ROLES": "vector", + "C2_DEPENDENCY_GRAPH": "vector", + "C3_ENTRYPOINTS": "vector" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [] + } + }, + "fallback": { + "used": false, + "reason": null + }, + "retrieval_by_layer_ms": { + "C1_SYMBOL_CATALOG": 39, + "C0_SOURCE_CHUNKS": 20, + "C4_SEMANTIC_ROLES": 16, + "C2_DEPENDENCY_GRAPH": 55, + "C3_ENTRYPOINTS": 12 + } + } + }, + { + "step": "pre_evidence_gate", + "status": "blocked", + "timings_ms": { + "pre_evidence_gate": 0 + }, + "output": { + "passed": false, + "failure_reasons": [ + "insufficient_evidence" + ], + "degraded_message": "Insufficient evidence for a confident answer. Evidence count: 0 (minimum required not met)." + } + }, + { + "step": "llm", + "status": "skipped", + "output": { + "reason": "policy_short_circuit", + "answer_mode": "degraded" + } + }, + { + "step": "post_evidence_gate", + "status": "skipped", + "output": { + "reason": "no_draft_answer" + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-explain-nonexistent-symbol.md b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-explain-nonexistent-symbol.md new file mode 100644 index 0000000..ada6837 --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-explain-nonexistent-symbol.md @@ -0,0 +1,249 @@ +# plba-v2-explain-nonexistent-symbol + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: agent_runtime +- mode: full_chain +- passed: False + +## Query +Объясни класс RuntimeFactoryManager + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 0, + "llm_answer": "Сущность не удалось однозначно разрешить. Близкие варианты: ControlChannel, ControlChannel.stop, ControlActionSet.", + "answer_mode": "degraded", + "path_scope": [], + "symbol_candidates": [ + "RuntimeFactoryManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] +} + +## Steps +[ + { + "step": "router", + "status": "completed", + "timings_ms": { + "router": 1 + }, + "output": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + } + }, + { + "step": "retrieval", + "status": "completed", + "timings_ms": { + "retrieval": 143 + }, + "output": { + "rag_count": 33, + "answer_path_rag_count": 0, + "resolved_symbol_status": "ambiguous", + "resolved_symbol": null, + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "diagnostics": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "vector", + "C0_SOURCE_CHUNKS": "vector", + "C4_SEMANTIC_ROLES": "vector", + "C2_DEPENDENCY_GRAPH": "vector", + "C3_ENTRYPOINTS": "vector" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [] + } + }, + "fallback": { + "used": false, + "reason": null + }, + "retrieval_by_layer_ms": { + "C1_SYMBOL_CATALOG": 39, + "C0_SOURCE_CHUNKS": 20, + "C4_SEMANTIC_ROLES": 16, + "C2_DEPENDENCY_GRAPH": 55, + "C3_ENTRYPOINTS": 12 + } + } + }, + { + "step": "pre_evidence_gate", + "status": "blocked", + "timings_ms": { + "pre_evidence_gate": 0 + }, + "output": { + "passed": false, + "failure_reasons": [ + "insufficient_evidence" + ], + "degraded_message": "Insufficient evidence for a confident answer. Evidence count: 0 (minimum required not met)." + } + }, + { + "step": "llm", + "status": "skipped", + "output": { + "reason": "policy_short_circuit", + "answer_mode": "degraded" + } + }, + { + "step": "post_evidence_gate", + "status": "skipped", + "output": { + "reason": "no_draft_answer" + } + } +] + +## Diagnostics +{ + "intent_correct": null, + "target_found": false, + "layers_used": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_sufficient": false, + "answer_mode": "insufficient", + "router_result": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "EXPLAIN", + "path_scope": [], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_resolution_status": "ambiguous" + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Объясни класс RuntimeFactoryManager", + "sub_intent": "EXPLAIN", + "path_scope": [], + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 0, + "empty": true, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 0, + "empty": true, + "fallback_used": false + }, + { + "layer_id": "C4_SEMANTIC_ROLES", + "hit_count": 0, + "empty": true, + "fallback_used": false + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 0, + "empty": true, + "fallback_used": false + }, + { + "layer_id": "C3_ENTRYPOINTS", + "hit_count": 0, + "empty": true, + "fallback_used": false + } + ], + "empty_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "evidence_gate_decision": { + "sufficient": false, + "failure_reasons": [ + "insufficient_evidence" + ], + "evidence_count": 0 + }, + "failure_reasons": [ + "insufficient_evidence" + ], + "timings_ms": { + "router": 1, + "retrieval": 143, + "pre_evidence_gate": 0 + } +} + +## Mismatches +- llm: expected answer to contain 'не найдена' \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-explain-runtime-manager.json b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-explain-runtime-manager.json new file mode 100644 index 0000000..1483a68 --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-explain-runtime-manager.json @@ -0,0 +1,4285 @@ +{ + "case_id": "plba-v2-explain-runtime-manager", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "agent_runtime", + "mode": "full_chain", + "query": "Объясни как работает класс RuntimeManager", + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 33, + "llm_answer": "Класс `RuntimeManager` находится в файле `src/app_runtime/core/runtime.py`. Конкретной реализации инициализации или подробного описания методов в предоставленном контексте не видно. Однако исходя из имеющихся признаков:\n\n1. Класс имеет ответственность за управление состоянием и конфигурацией runtime-системы, судя по названиям атрибутов и методов в окружении (`configuration`, `add_config_file`).\n2. Вероятно, он участвует в оркестрации различных компонентов системы через свои методы и атрибуты, хотя детальной информации об этих методах и атрибутах нет.\n\nТаким образом, класс `RuntimeManager` играет ключевую управляющую роль в системе, вероятно, интегрируя и координируя другие компоненты и модули.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "query": "Объясни как работает класс RuntimeManager", + "router_result": { + "schema_version": "1.1", + "intent": "CODE_QA", + "retrieval_profile": "code", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query_plan": { + "raw": "Объясни как работает класс RuntimeManager", + "normalized": "Объясни как работает класс RuntimeManager", + "sub_intent": "EXPLAIN", + "negations": [], + "expansions": [ + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "doc_scope_hints": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "symbol_kind_hint": "class", + "anchors": [ + { + "type": "SYMBOL", + "value": "RuntimeManager", + "source": "user_text", + "subtype": null, + "span": { + "start": 27, + "end": 41 + }, + "confidence": 0.88 + }, + { + "type": "KEY_TERM", + "value": "класс", + "source": "user_text", + "subtype": null, + "span": { + "start": 21, + "end": 26 + }, + "confidence": 0.9 + } + ] + }, + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "top_k": 8 + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 8 + }, + { + "layer_id": "C4_SEMANTIC_ROLES", + "top_k": 8 + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "top_k": 6 + }, + { + "layer_id": "C3_ENTRYPOINTS", + "top_k": 6 + } + ], + "filters": { + "test_policy": "EXCLUDE", + "path_scope": [], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager", + "RuntimeManager", + "RuntimeManager", + "RuntimeManager", + "RuntimeManager" + ], + "confidence": 0.99 + }, + "evidence_policy": { + "require_def": true, + "require_flow": true, + "require_spec": false, + "allow_answer_without_evidence": false + } + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Объясни как работает класс RuntimeManager", + "sub_intent": "EXPLAIN", + "path_scope": [], + "keyword_hints": [ + "RuntimeManager" + ], + "symbol_candidates": [ + "RuntimeManager" + ], + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "top_k": 8 + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 8 + }, + { + "layer_id": "C4_SEMANTIC_ROLES", + "top_k": 8 + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "top_k": 6 + }, + { + "layer_id": "C3_ENTRYPOINTS", + "top_k": 6 + } + ], + "filters": { + "test_policy": "EXCLUDE", + "path_scope": [], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + }, + "query_plan": { + "raw": "Объясни как работает класс RuntimeManager", + "normalized": "Объясни как работает класс RuntimeManager", + "sub_intent": "EXPLAIN", + "negations": [], + "expansions": [ + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "doc_scope_hints": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "symbol_kind_hint": "class", + "anchors": [ + { + "type": "SYMBOL", + "value": "RuntimeManager", + "source": "user_text", + "subtype": null, + "span": { + "start": 27, + "end": 41 + }, + "confidence": 0.88 + }, + { + "type": "KEY_TERM", + "value": "класс", + "source": "user_text", + "subtype": null, + "span": { + "start": 21, + "end": 26 + }, + "confidence": 0.9 + } + ] + } + }, + "retrieval_result": { + "target_symbol_candidates": [ + "RuntimeManager", + "ControlPlaneService", + "ControlChannel.start", + "ControlChannel.stop" + ], + "resolved_symbol": "RuntimeManager", + "symbol_resolution_status": "resolved", + "file_candidates": [ + "src/plba/bootstrap.py", + "src/app_runtime/control/service.py", + "src/app_runtime/core/runtime.py", + "src/plba/__init__.py", + "src/plba/core.py", + "src/app_runtime/control/__init__.py", + "src/app_runtime/control/base.py", + "src/app_runtime/control/http_runner.py", + "src/app_runtime/control/http_app.py", + "src/app_runtime/control/http_channel.py", + "src/plba/control.py", + "src/app_runtime/workflow/persistence/workflow_persistence.py" + ], + "code_chunks": [ + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/plba/bootstrap.py", + "title": "RuntimeManager", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "start_line": 4, + "end_line": 4, + "metadata": { + "symbol_id": "27158ca220022eeb5083c6addf8a50775d45f7161284fd60aac48410105f4b98", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/service.py", + "title": "RuntimeManager", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "start_line": 9, + "end_line": 9, + "metadata": { + "symbol_id": "62a9575c77aad894120d18b4f2a08cf2ba42f77e9be4a8a432b767d157701afe", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/core/runtime.py", + "title": "RuntimeManager", + "content": "class RuntimeManager\nRuntimeManager", + "start_line": 18, + "end_line": 179, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "qname": "RuntimeManager", + "kind": "class", + "signature": "RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/plba/__init__.py", + "title": "RuntimeManager", + "content": "const RuntimeManager\nRuntimeManager = plba.core.RuntimeManager", + "start_line": 16, + "end_line": 16, + "metadata": { + "symbol_id": "7eacec84f9b8d6c4201374591faecdac7493091c263681495c338973f2971ad9", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = plba.core.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/plba/core.py", + "title": "RuntimeManager", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "start_line": 2, + "end_line": 2, + "metadata": { + "symbol_id": "e1684562d978b7af7fe9b27dc5869d770348a87b5dc19a50360f58544668578b", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.core", + "is_test": false, + "blob_sha": "c0ae25110d20e665216616e26b68adfe035b624ba45d31d1272fb21f906f9ca8", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/__init__.py", + "title": "ControlPlaneService", + "content": "const ControlPlaneService\nControlPlaneService = app_runtime.control.service.ControlPlaneService", + "start_line": 3, + "end_line": 3, + "metadata": { + "symbol_id": "217e8f044d1c01644bf7b81e5046af9e84469210c692a2fb0c476a19bb069ae1", + "qname": "ControlPlaneService", + "kind": "const", + "signature": "ControlPlaneService = app_runtime.control.service.ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/base.py", + "title": "ControlChannel.start", + "content": "method ControlChannel.start\nstart(self, actions)\nStart the control channel and bind handlers.", + "start_line": 23, + "end_line": 24, + "metadata": { + "symbol_id": "e01e0d50d0f48d0c84c119c989b7a7c57ceea263811ce2605c684ae24d1a03b1", + "qname": "ControlChannel.start", + "kind": "method", + "signature": "start(self, actions)", + "parent_symbol_id": "ControlChannel", + "package_or_module": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/base.py", + "title": "ControlChannel.stop", + "content": "method ControlChannel.stop\nstop(self)\nStop the control channel and release resources.", + "start_line": 27, + "end_line": 28, + "metadata": { + "symbol_id": "54b5adf9866c526836221dc721b474ba23fbec83e1b1d3b8bc4da67ae3c1541d", + "qname": "ControlChannel.stop", + "kind": "method", + "signature": "stop(self)", + "parent_symbol_id": "ControlChannel", + "package_or_module": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/service.py", + "title": "src/app_runtime/control/service.py:ControlPlaneService", + "content": "class ControlPlaneService:\n def __init__(self) -> None:\n self._channels: list[ControlChannel] = []\n\n def register_channel(self, channel: ControlChannel) -> None:\n self._channels.append(channel)\n\n def start(self, runtime: RuntimeManager) -> None:\n if not self._channels:\n return\n asyncio.run(self._start_async(runtime))\n\n def stop(self) -> None:\n if not self._channels:\n return\n asyncio.run(self._stop_async())\n\n def snapshot(self, runtime: RuntimeManager) -> dict[str, object]:\n health = runtime.current_health()\n return {\n \"runtime\": {\"state\": runtime._state.value},\n \"modules\": list(runtime.registry.modules),\n \"services\": runtime.services.snapshot(),\n \"workers\": runtime.workers.snapshot(),\n \"health\": runtime.health.snapshot(runtime.workers.healths()) | {\"status\": health[\"status\"]},\n \"config\": runtime.configuration.get(),\n }\n\n async def _start_async(self, runtime: RuntimeManager) -> None:\n actions = ControlActionSet(\n health=runtime.health_status,\n start=runtime.start_runtime,\n stop=runtime.stop_runtime,\n status=runtime.runtime_status,\n )\n for channel in self._channels:\n await channel.start(actions)\n\n async def _stop_async(self) -> None:\n for channel in reversed(self._channels):\n await channel.stop()", + "start_line": 12, + "end_line": 52, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/http_runner.py", + "title": "src/app_runtime/control/http_runner.py:UvicornThreadRunner", + "content": "class UvicornThreadRunner:\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._host = host\n self._port = port\n self._timeout = timeout\n self._server: Server | None = None\n self._thread: Thread | None = None\n self._error: BaseException | None = None\n\n async def start(self, app: FastAPI) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._error = None\n config = Config(app=app, host=self._host, port=self._port, log_level=\"warning\")\n self._server = Server(config)\n self._thread = Thread(target=self._serve, name=\"plba-http-control\", daemon=True)\n self._thread.start()\n await self._wait_until_started()\n\n async def stop(self) -> None:\n if self._server is None or self._thread is None:\n return\n self._server.should_exit = True\n await asyncio.to_thread(self._thread.join, self._timeout)\n self._server = None\n self._thread = None\n\n @property\n def port(self) -> int:\n if self._server is None or not getattr(self._server, \"servers\", None):\n return self._port\n socket = self._server.servers[0].sockets[0]\n return int(socket.getsockname()[1])\n\n async def _wait_until_started(self) -> None:\n if self._server is None:\n raise RuntimeError(\"Server is not initialized\")\n deadline = asyncio.get_running_loop().time() + max(float(self._timeout), 1.0)\n while not self._server.started:\n if self._error is not None:\n raise RuntimeError(\"HTTP control server failed to start\") from self._error\n if asyncio.get_running_loop().time() >= deadline:\n raise TimeoutError(\"HTTP control server startup timed out\")\n await asyncio.sleep(0.05)\n\n def _serve(self) -> None:\n if self._server is None:\n return\n try:\n asyncio.run(self._server.serve())\n except BaseException as exc: # noqa: BLE001\n self._error = exc", + "start_line": 10, + "end_line": 61, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_runner", + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/base.py", + "title": "src/app_runtime/control/base.py:ControlChannel", + "content": "class ControlChannel(ABC):\n @abstractmethod\n async def start(self, actions: ControlActionSet) -> None:\n \"\"\"Start the control channel and bind handlers.\"\"\"\n\n @abstractmethod\n async def stop(self) -> None:\n \"\"\"Stop the control channel and release resources.\"\"\"", + "start_line": 21, + "end_line": 28, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/__init__.py", + "title": "src/app_runtime/control/__init__.py:1-5", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\"ControlActionSet\", \"ControlChannel\", \"ControlPlaneService\", \"HttpControlChannel\"]", + "start_line": 1, + "end_line": 5, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/http_app.py", + "title": "src/app_runtime/control/http_app.py:HttpControlAppFactory", + "content": "class HttpControlAppFactory:\n def create(\n self,\n health_provider: Callable[[], Awaitable[HealthPayload]],\n action_provider: Callable[[str, str], Awaitable[JSONResponse]],\n ) -> FastAPI:\n app = FastAPI(title=\"PLBA Control API\")\n\n @app.middleware(\"http\")\n async def log_api_call(request: Request, call_next): # type: ignore[no-untyped-def]\n started = time.monotonic()\n response = await call_next(request)\n response.headers[\"X-Response-Time-Ms\"] = str(int((time.monotonic() - started) * 1000))\n return response\n\n @app.get(\"/health\")\n async def health() -> JSONResponse:\n payload = await health_provider()\n status_code = 200 if payload.get(\"status\") == \"ok\" else 503\n return JSONResponse(content=payload, status_code=status_code)\n\n @app.get(\"/actions/{action}\")\n @app.post(\"/actions/{action}\")\n async def action(action: str, request: Request) -> JSONResponse:\n client_source = self._client_source(request)\n if action in {\"start\", \"stop\"}:\n LOGGER.warning(\"Control action requested: /actions/%s client=%s\", action, client_source)\n return await action_provider(action, client_source)\n\n return app\n\n def _client_source(self, request: Request) -> str:\n explicit_header = request.headers.get(\"X-Client-Source\", \"\").strip()\n if explicit_header:\n return explicit_header\n user_agent = request.headers.get(\"User-Agent\", \"\").strip()\n if user_agent:\n return f\"user-agent:{user_agent}\"\n return \"unknown\"", + "start_line": 15, + "end_line": 53, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/http_channel.py", + "title": "src/app_runtime/control/http_channel.py:HttpControlChannel", + "content": "class HttpControlChannel(ControlChannel):\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._timeout = timeout\n self._runner = UvicornThreadRunner(host, port, timeout)\n self._factory = HttpControlAppFactory()\n self._actions: ControlActionSet | None = None\n\n async def start(self, actions: ControlActionSet) -> None:\n self._actions = actions\n app = self._factory.create(self._health_response, self._action_response)\n await self._runner.start(app)\n\n async def stop(self) -> None:\n await self._runner.stop()\n\n @property\n def port(self) -> int:\n return self._runner.port\n\n async def _health_response(self) -> dict[str, object]:\n if self._actions is None:\n return {\"status\": \"unhealthy\", \"detail\": \"control actions are not configured\"}\n return await asyncio.wait_for(self._actions.health(), timeout=float(self._timeout))\n\n async def _action_response(self, action: str, _client_source: str = \"unknown\") -> JSONResponse:\n if self._actions is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"{action} handler is not configured\"}, status_code=404)\n callbacks = {\n \"start\": self._actions.start,\n \"stop\": self._actions.stop,\n \"status\": self._actions.status,\n }\n callback = callbacks.get(action)\n if callback is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"unsupported action: {action}\"}, status_code=404)\n action_timeout = max(float(self._timeout), 10.0) if action in {\"start\", \"stop\"} else float(self._timeout)\n try:\n detail = await asyncio.wait_for(callback(), timeout=action_timeout)\n except asyncio.TimeoutError:\n return JSONResponse(\n content={\"status\": \"accepted\", \"detail\": f\"{action} operation is still in progress\"},\n status_code=202,\n )\n except Exception as exc:\n return JSONResponse(content={\"status\": \"error\", \"detail\": str(exc)}, status_code=500)\n return JSONResponse(content={\"status\": \"ok\", \"detail\": detail or f\"{action} action accepted\"}, status_code=200)", + "start_line": 12, + "end_line": 57, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/base.py", + "title": "src/app_runtime/control/base.py:ControlActionSet", + "content": "class ControlActionSet:\n health: HealthHandler\n start: ActionHandler\n stop: ActionHandler\n status: ActionHandler", + "start_line": 14, + "end_line": 18, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/plba/control.py", + "title": "src/plba/control.py:1-10", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\n \"ControlActionSet\",\n \"ControlChannel\",\n \"ControlPlaneService\",\n \"HttpControlChannel\",\n]", + "start_line": 1, + "end_line": 10, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.control", + "is_test": false, + "blob_sha": "31bd5c4481bfa7fbca8fae56d4860a67e3953ca74474ac8439e1f39b685d7bc8", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/core/runtime.py", + "title": "RuntimeManager", + "content": "RuntimeManager\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests manager\n- orchestrates role-like calls (4)\n- reads and writes state attributes\n- participates in dataflow slices (50)", + "start_line": 18, + "end_line": 179, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "symbol_name": "RuntimeManager", + "qname": "RuntimeManager", + "role": "pipeline_stage", + "confidence": 0.67, + "dataflow_participation": 50, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/base.py", + "title": "ControlChannel", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "start_line": 21, + "end_line": 28, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/base.py", + "title": "ControlActionSet", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "start_line": 14, + "end_line": 18, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "start_line": 12, + "end_line": 52, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/http_runner.py", + "title": "UvicornThreadRunner", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "start_line": 10, + "end_line": 61, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/http_channel.py", + "title": "HttpControlChannel", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "start_line": 12, + "end_line": 57, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/http_app.py", + "title": "HttpControlAppFactory", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "start_line": 15, + "end_line": 53, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "title": "WorkflowPersistence", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "start_line": 8, + "end_line": 54, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "start_line": 14, + "end_line": 25, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "start_line": 14, + "end_line": 51, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "start_line": 14, + "end_line": 17, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "start_line": 14, + "end_line": 20, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "start_line": 14, + "end_line": 47, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/core/runtime.py", + "title": "RuntimeManager.__init__:dataflow_slice", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file", + "start_line": 32, + "end_line": 52, + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C3_ENTRYPOINTS", + "path": "src/app_runtime/control/http_app.py", + "title": "app.post", + "content": "fastapi http app.post", + "start_line": 38, + "end_line": 42, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C3_ENTRYPOINTS", + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "content": "fastapi http app.get", + "start_line": 31, + "end_line": 34, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C3_ENTRYPOINTS", + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "content": "fastapi http app.get", + "start_line": 38, + "end_line": 42, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "relations": [ + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop" + }, + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async" + }, + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel" + }, + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start" + }, + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async" + }, + { + "path": "src/app_runtime/core/runtime.py", + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file" + } + ], + "entrypoints": [ + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.post", + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "test_candidates": [], + "layer_outcomes": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C4_SEMANTIC_ROLES", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 6, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C3_ENTRYPOINTS", + "hit_count": 3, + "empty": false, + "fallback_used": false + } + ], + "missing_layers": [], + "raw_rows": [ + { + "path": "src/plba/bootstrap.py", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 4, + "span_end": 4, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "27158ca220022eeb5083c6addf8a50775d45f7161284fd60aac48410105f4b98", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 9, + "span_end": 9, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "62a9575c77aad894120d18b4f2a08cf2ba42f77e9be4a8a432b767d157701afe", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager\nRuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "qname": "RuntimeManager", + "kind": "class", + "signature": "RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/__init__.py", + "content": "const RuntimeManager\nRuntimeManager = plba.core.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 16, + "span_end": 16, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "7eacec84f9b8d6c4201374591faecdac7493091c263681495c338973f2971ad9", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = plba.core.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/core.py", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 2, + "span_end": 2, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "e1684562d978b7af7fe9b27dc5869d770348a87b5dc19a50360f58544668578b", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.core", + "is_test": false, + "blob_sha": "c0ae25110d20e665216616e26b68adfe035b624ba45d31d1272fb21f906f9ca8", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "const ControlPlaneService\nControlPlaneService = app_runtime.control.service.ControlPlaneService", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlPlaneService", + "span_start": 3, + "span_end": 3, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "217e8f044d1c01644bf7b81e5046af9e84469210c692a2fb0c476a19bb069ae1", + "qname": "ControlPlaneService", + "kind": "const", + "signature": "ControlPlaneService = app_runtime.control.service.ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "method ControlChannel.start\nstart(self, actions)\nStart the control channel and bind handlers.", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlChannel.start", + "span_start": 23, + "span_end": 24, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "e01e0d50d0f48d0c84c119c989b7a7c57ceea263811ce2605c684ae24d1a03b1", + "qname": "ControlChannel.start", + "kind": "method", + "signature": "start(self, actions)", + "parent_symbol_id": "ControlChannel", + "package_or_module": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "method ControlChannel.stop\nstop(self)\nStop the control channel and release resources.", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlChannel.stop", + "span_start": 27, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "54b5adf9866c526836221dc721b474ba23fbec83e1b1d3b8bc4da67ae3c1541d", + "qname": "ControlChannel.stop", + "kind": "method", + "signature": "stop(self)", + "parent_symbol_id": "ControlChannel", + "package_or_module": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "class ControlPlaneService:\n def __init__(self) -> None:\n self._channels: list[ControlChannel] = []\n\n def register_channel(self, channel: ControlChannel) -> None:\n self._channels.append(channel)\n\n def start(self, runtime: RuntimeManager) -> None:\n if not self._channels:\n return\n asyncio.run(self._start_async(runtime))\n\n def stop(self) -> None:\n if not self._channels:\n return\n asyncio.run(self._stop_async())\n\n def snapshot(self, runtime: RuntimeManager) -> dict[str, object]:\n health = runtime.current_health()\n return {\n \"runtime\": {\"state\": runtime._state.value},\n \"modules\": list(runtime.registry.modules),\n \"services\": runtime.services.snapshot(),\n \"workers\": runtime.workers.snapshot(),\n \"health\": runtime.health.snapshot(runtime.workers.healths()) | {\"status\": health[\"status\"]},\n \"config\": runtime.configuration.get(),\n }\n\n async def _start_async(self, runtime: RuntimeManager) -> None:\n actions = ControlActionSet(\n health=runtime.health_status,\n start=runtime.start_runtime,\n stop=runtime.stop_runtime,\n status=runtime.runtime_status,\n )\n for channel in self._channels:\n await channel.start(actions)\n\n async def _stop_async(self) -> None:\n for channel in reversed(self._channels):\n await channel.stop()", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/service.py:ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "class UvicornThreadRunner:\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._host = host\n self._port = port\n self._timeout = timeout\n self._server: Server | None = None\n self._thread: Thread | None = None\n self._error: BaseException | None = None\n\n async def start(self, app: FastAPI) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._error = None\n config = Config(app=app, host=self._host, port=self._port, log_level=\"warning\")\n self._server = Server(config)\n self._thread = Thread(target=self._serve, name=\"plba-http-control\", daemon=True)\n self._thread.start()\n await self._wait_until_started()\n\n async def stop(self) -> None:\n if self._server is None or self._thread is None:\n return\n self._server.should_exit = True\n await asyncio.to_thread(self._thread.join, self._timeout)\n self._server = None\n self._thread = None\n\n @property\n def port(self) -> int:\n if self._server is None or not getattr(self._server, \"servers\", None):\n return self._port\n socket = self._server.servers[0].sockets[0]\n return int(socket.getsockname()[1])\n\n async def _wait_until_started(self) -> None:\n if self._server is None:\n raise RuntimeError(\"Server is not initialized\")\n deadline = asyncio.get_running_loop().time() + max(float(self._timeout), 1.0)\n while not self._server.started:\n if self._error is not None:\n raise RuntimeError(\"HTTP control server failed to start\") from self._error\n if asyncio.get_running_loop().time() >= deadline:\n raise TimeoutError(\"HTTP control server startup timed out\")\n await asyncio.sleep(0.05)\n\n def _serve(self) -> None:\n if self._server is None:\n return\n try:\n asyncio.run(self._server.serve())\n except BaseException as exc: # noqa: BLE001\n self._error = exc", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_runner.py:UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_runner", + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlChannel(ABC):\n @abstractmethod\n async def start(self, actions: ControlActionSet) -> None:\n \"\"\"Start the control channel and bind handlers.\"\"\"\n\n @abstractmethod\n async def stop(self) -> None:\n \"\"\"Stop the control channel and release resources.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\"ControlActionSet\", \"ControlChannel\", \"ControlPlaneService\", \"HttpControlChannel\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/__init__.py:1-5", + "span_start": 1, + "span_end": 5, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "class HttpControlAppFactory:\n def create(\n self,\n health_provider: Callable[[], Awaitable[HealthPayload]],\n action_provider: Callable[[str, str], Awaitable[JSONResponse]],\n ) -> FastAPI:\n app = FastAPI(title=\"PLBA Control API\")\n\n @app.middleware(\"http\")\n async def log_api_call(request: Request, call_next): # type: ignore[no-untyped-def]\n started = time.monotonic()\n response = await call_next(request)\n response.headers[\"X-Response-Time-Ms\"] = str(int((time.monotonic() - started) * 1000))\n return response\n\n @app.get(\"/health\")\n async def health() -> JSONResponse:\n payload = await health_provider()\n status_code = 200 if payload.get(\"status\") == \"ok\" else 503\n return JSONResponse(content=payload, status_code=status_code)\n\n @app.get(\"/actions/{action}\")\n @app.post(\"/actions/{action}\")\n async def action(action: str, request: Request) -> JSONResponse:\n client_source = self._client_source(request)\n if action in {\"start\", \"stop\"}:\n LOGGER.warning(\"Control action requested: /actions/%s client=%s\", action, client_source)\n return await action_provider(action, client_source)\n\n return app\n\n def _client_source(self, request: Request) -> str:\n explicit_header = request.headers.get(\"X-Client-Source\", \"\").strip()\n if explicit_header:\n return explicit_header\n user_agent = request.headers.get(\"User-Agent\", \"\").strip()\n if user_agent:\n return f\"user-agent:{user_agent}\"\n return \"unknown\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_app.py:HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel(ControlChannel):\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._timeout = timeout\n self._runner = UvicornThreadRunner(host, port, timeout)\n self._factory = HttpControlAppFactory()\n self._actions: ControlActionSet | None = None\n\n async def start(self, actions: ControlActionSet) -> None:\n self._actions = actions\n app = self._factory.create(self._health_response, self._action_response)\n await self._runner.start(app)\n\n async def stop(self) -> None:\n await self._runner.stop()\n\n @property\n def port(self) -> int:\n return self._runner.port\n\n async def _health_response(self) -> dict[str, object]:\n if self._actions is None:\n return {\"status\": \"unhealthy\", \"detail\": \"control actions are not configured\"}\n return await asyncio.wait_for(self._actions.health(), timeout=float(self._timeout))\n\n async def _action_response(self, action: str, _client_source: str = \"unknown\") -> JSONResponse:\n if self._actions is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"{action} handler is not configured\"}, status_code=404)\n callbacks = {\n \"start\": self._actions.start,\n \"stop\": self._actions.stop,\n \"status\": self._actions.status,\n }\n callback = callbacks.get(action)\n if callback is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"unsupported action: {action}\"}, status_code=404)\n action_timeout = max(float(self._timeout), 10.0) if action in {\"start\", \"stop\"} else float(self._timeout)\n try:\n detail = await asyncio.wait_for(callback(), timeout=action_timeout)\n except asyncio.TimeoutError:\n return JSONResponse(\n content={\"status\": \"accepted\", \"detail\": f\"{action} operation is still in progress\"},\n status_code=202,\n )\n except Exception as exc:\n return JSONResponse(content={\"status\": \"error\", \"detail\": str(exc)}, status_code=500)\n return JSONResponse(content={\"status\": \"ok\", \"detail\": detail or f\"{action} action accepted\"}, status_code=200)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_channel.py:HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlActionSet:\n health: HealthHandler\n start: ActionHandler\n stop: ActionHandler\n status: ActionHandler", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/control.py", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\n \"ControlActionSet\",\n \"ControlChannel\",\n \"ControlPlaneService\",\n \"HttpControlChannel\",\n]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/control.py:1-10", + "span_start": 1, + "span_end": 10, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.control", + "is_test": false, + "blob_sha": "31bd5c4481bfa7fbca8fae56d4860a67e3953ca74474ac8439e1f39b685d7bc8", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests manager\n- orchestrates role-like calls (4)\n- reads and writes state attributes\n- participates in dataflow slices (50)", + "layer": "C4_SEMANTIC_ROLES", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 43, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "symbol_name": "RuntimeManager", + "qname": "RuntimeManager", + "role": "pipeline_stage", + "confidence": 0.67, + "dataflow_participation": 50, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 52, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": null, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": null, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": null, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "retrieval_report": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "vector", + "C0_SOURCE_CHUNKS": "vector", + "C4_SEMANTIC_ROLES": "vector", + "C2_DEPENDENCY_GRAPH": "vector", + "C3_ENTRYPOINTS": "vector" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [] + } + }, + "fallback": { + "used": false, + "reason": null + }, + "retrieval_by_layer_ms": { + "C1_SYMBOL_CATALOG": 76, + "C0_SOURCE_CHUNKS": 20, + "C4_SEMANTIC_ROLES": 22, + "C2_DEPENDENCY_GRAPH": 62, + "C3_ENTRYPOINTS": 12 + } + } + }, + "diagnostics": { + "intent_correct": null, + "target_found": true, + "layers_used": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_sufficient": true, + "answer_mode": "normal", + "router_result": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "EXPLAIN", + "path_scope": [], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_resolution_status": "resolved" + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Объясни как работает класс RuntimeManager", + "sub_intent": "EXPLAIN", + "path_scope": [], + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C4_SEMANTIC_ROLES", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 6, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C3_ENTRYPOINTS", + "hit_count": 3, + "empty": false, + "fallback_used": false + } + ], + "empty_layers": [], + "evidence_gate_decision": { + "sufficient": true, + "failure_reasons": [], + "evidence_count": 33 + }, + "failure_reasons": [], + "timings_ms": { + "router": 0, + "retrieval": 194, + "pre_evidence_gate": 0, + "llm": 1244 + } + }, + "rag_rows": [ + { + "path": "src/plba/bootstrap.py", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 4, + "span_end": 4, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "27158ca220022eeb5083c6addf8a50775d45f7161284fd60aac48410105f4b98", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 9, + "span_end": 9, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "62a9575c77aad894120d18b4f2a08cf2ba42f77e9be4a8a432b767d157701afe", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager\nRuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "qname": "RuntimeManager", + "kind": "class", + "signature": "RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/__init__.py", + "content": "const RuntimeManager\nRuntimeManager = plba.core.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 16, + "span_end": 16, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "7eacec84f9b8d6c4201374591faecdac7493091c263681495c338973f2971ad9", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = plba.core.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/core.py", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 2, + "span_end": 2, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "e1684562d978b7af7fe9b27dc5869d770348a87b5dc19a50360f58544668578b", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.core", + "is_test": false, + "blob_sha": "c0ae25110d20e665216616e26b68adfe035b624ba45d31d1272fb21f906f9ca8", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "const ControlPlaneService\nControlPlaneService = app_runtime.control.service.ControlPlaneService", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlPlaneService", + "span_start": 3, + "span_end": 3, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "217e8f044d1c01644bf7b81e5046af9e84469210c692a2fb0c476a19bb069ae1", + "qname": "ControlPlaneService", + "kind": "const", + "signature": "ControlPlaneService = app_runtime.control.service.ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "method ControlChannel.start\nstart(self, actions)\nStart the control channel and bind handlers.", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlChannel.start", + "span_start": 23, + "span_end": 24, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "e01e0d50d0f48d0c84c119c989b7a7c57ceea263811ce2605c684ae24d1a03b1", + "qname": "ControlChannel.start", + "kind": "method", + "signature": "start(self, actions)", + "parent_symbol_id": "ControlChannel", + "package_or_module": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "method ControlChannel.stop\nstop(self)\nStop the control channel and release resources.", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlChannel.stop", + "span_start": 27, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "54b5adf9866c526836221dc721b474ba23fbec83e1b1d3b8bc4da67ae3c1541d", + "qname": "ControlChannel.stop", + "kind": "method", + "signature": "stop(self)", + "parent_symbol_id": "ControlChannel", + "package_or_module": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "class ControlPlaneService:\n def __init__(self) -> None:\n self._channels: list[ControlChannel] = []\n\n def register_channel(self, channel: ControlChannel) -> None:\n self._channels.append(channel)\n\n def start(self, runtime: RuntimeManager) -> None:\n if not self._channels:\n return\n asyncio.run(self._start_async(runtime))\n\n def stop(self) -> None:\n if not self._channels:\n return\n asyncio.run(self._stop_async())\n\n def snapshot(self, runtime: RuntimeManager) -> dict[str, object]:\n health = runtime.current_health()\n return {\n \"runtime\": {\"state\": runtime._state.value},\n \"modules\": list(runtime.registry.modules),\n \"services\": runtime.services.snapshot(),\n \"workers\": runtime.workers.snapshot(),\n \"health\": runtime.health.snapshot(runtime.workers.healths()) | {\"status\": health[\"status\"]},\n \"config\": runtime.configuration.get(),\n }\n\n async def _start_async(self, runtime: RuntimeManager) -> None:\n actions = ControlActionSet(\n health=runtime.health_status,\n start=runtime.start_runtime,\n stop=runtime.stop_runtime,\n status=runtime.runtime_status,\n )\n for channel in self._channels:\n await channel.start(actions)\n\n async def _stop_async(self) -> None:\n for channel in reversed(self._channels):\n await channel.stop()", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/service.py:ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "class UvicornThreadRunner:\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._host = host\n self._port = port\n self._timeout = timeout\n self._server: Server | None = None\n self._thread: Thread | None = None\n self._error: BaseException | None = None\n\n async def start(self, app: FastAPI) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._error = None\n config = Config(app=app, host=self._host, port=self._port, log_level=\"warning\")\n self._server = Server(config)\n self._thread = Thread(target=self._serve, name=\"plba-http-control\", daemon=True)\n self._thread.start()\n await self._wait_until_started()\n\n async def stop(self) -> None:\n if self._server is None or self._thread is None:\n return\n self._server.should_exit = True\n await asyncio.to_thread(self._thread.join, self._timeout)\n self._server = None\n self._thread = None\n\n @property\n def port(self) -> int:\n if self._server is None or not getattr(self._server, \"servers\", None):\n return self._port\n socket = self._server.servers[0].sockets[0]\n return int(socket.getsockname()[1])\n\n async def _wait_until_started(self) -> None:\n if self._server is None:\n raise RuntimeError(\"Server is not initialized\")\n deadline = asyncio.get_running_loop().time() + max(float(self._timeout), 1.0)\n while not self._server.started:\n if self._error is not None:\n raise RuntimeError(\"HTTP control server failed to start\") from self._error\n if asyncio.get_running_loop().time() >= deadline:\n raise TimeoutError(\"HTTP control server startup timed out\")\n await asyncio.sleep(0.05)\n\n def _serve(self) -> None:\n if self._server is None:\n return\n try:\n asyncio.run(self._server.serve())\n except BaseException as exc: # noqa: BLE001\n self._error = exc", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_runner.py:UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_runner", + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlChannel(ABC):\n @abstractmethod\n async def start(self, actions: ControlActionSet) -> None:\n \"\"\"Start the control channel and bind handlers.\"\"\"\n\n @abstractmethod\n async def stop(self) -> None:\n \"\"\"Stop the control channel and release resources.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\"ControlActionSet\", \"ControlChannel\", \"ControlPlaneService\", \"HttpControlChannel\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/__init__.py:1-5", + "span_start": 1, + "span_end": 5, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "class HttpControlAppFactory:\n def create(\n self,\n health_provider: Callable[[], Awaitable[HealthPayload]],\n action_provider: Callable[[str, str], Awaitable[JSONResponse]],\n ) -> FastAPI:\n app = FastAPI(title=\"PLBA Control API\")\n\n @app.middleware(\"http\")\n async def log_api_call(request: Request, call_next): # type: ignore[no-untyped-def]\n started = time.monotonic()\n response = await call_next(request)\n response.headers[\"X-Response-Time-Ms\"] = str(int((time.monotonic() - started) * 1000))\n return response\n\n @app.get(\"/health\")\n async def health() -> JSONResponse:\n payload = await health_provider()\n status_code = 200 if payload.get(\"status\") == \"ok\" else 503\n return JSONResponse(content=payload, status_code=status_code)\n\n @app.get(\"/actions/{action}\")\n @app.post(\"/actions/{action}\")\n async def action(action: str, request: Request) -> JSONResponse:\n client_source = self._client_source(request)\n if action in {\"start\", \"stop\"}:\n LOGGER.warning(\"Control action requested: /actions/%s client=%s\", action, client_source)\n return await action_provider(action, client_source)\n\n return app\n\n def _client_source(self, request: Request) -> str:\n explicit_header = request.headers.get(\"X-Client-Source\", \"\").strip()\n if explicit_header:\n return explicit_header\n user_agent = request.headers.get(\"User-Agent\", \"\").strip()\n if user_agent:\n return f\"user-agent:{user_agent}\"\n return \"unknown\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_app.py:HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel(ControlChannel):\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._timeout = timeout\n self._runner = UvicornThreadRunner(host, port, timeout)\n self._factory = HttpControlAppFactory()\n self._actions: ControlActionSet | None = None\n\n async def start(self, actions: ControlActionSet) -> None:\n self._actions = actions\n app = self._factory.create(self._health_response, self._action_response)\n await self._runner.start(app)\n\n async def stop(self) -> None:\n await self._runner.stop()\n\n @property\n def port(self) -> int:\n return self._runner.port\n\n async def _health_response(self) -> dict[str, object]:\n if self._actions is None:\n return {\"status\": \"unhealthy\", \"detail\": \"control actions are not configured\"}\n return await asyncio.wait_for(self._actions.health(), timeout=float(self._timeout))\n\n async def _action_response(self, action: str, _client_source: str = \"unknown\") -> JSONResponse:\n if self._actions is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"{action} handler is not configured\"}, status_code=404)\n callbacks = {\n \"start\": self._actions.start,\n \"stop\": self._actions.stop,\n \"status\": self._actions.status,\n }\n callback = callbacks.get(action)\n if callback is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"unsupported action: {action}\"}, status_code=404)\n action_timeout = max(float(self._timeout), 10.0) if action in {\"start\", \"stop\"} else float(self._timeout)\n try:\n detail = await asyncio.wait_for(callback(), timeout=action_timeout)\n except asyncio.TimeoutError:\n return JSONResponse(\n content={\"status\": \"accepted\", \"detail\": f\"{action} operation is still in progress\"},\n status_code=202,\n )\n except Exception as exc:\n return JSONResponse(content={\"status\": \"error\", \"detail\": str(exc)}, status_code=500)\n return JSONResponse(content={\"status\": \"ok\", \"detail\": detail or f\"{action} action accepted\"}, status_code=200)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_channel.py:HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlActionSet:\n health: HealthHandler\n start: ActionHandler\n stop: ActionHandler\n status: ActionHandler", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/control.py", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\n \"ControlActionSet\",\n \"ControlChannel\",\n \"ControlPlaneService\",\n \"HttpControlChannel\",\n]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/control.py:1-10", + "span_start": 1, + "span_end": 10, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.control", + "is_test": false, + "blob_sha": "31bd5c4481bfa7fbca8fae56d4860a67e3953ca74474ac8439e1f39b685d7bc8", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests manager\n- orchestrates role-like calls (4)\n- reads and writes state attributes\n- participates in dataflow slices (50)", + "layer": "C4_SEMANTIC_ROLES", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 43, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "symbol_name": "RuntimeManager", + "qname": "RuntimeManager", + "role": "pipeline_stage", + "confidence": 0.67, + "dataflow_participation": 50, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 52, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "validation": { + "passed": true, + "action": "return", + "reasons": [] + }, + "steps": [ + { + "step": "router", + "status": "completed", + "timings_ms": { + "router": 0 + }, + "output": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + } + }, + { + "step": "retrieval", + "status": "completed", + "timings_ms": { + "retrieval": 194 + }, + "output": { + "rag_count": 33, + "answer_path_rag_count": 33, + "resolved_symbol_status": "resolved", + "resolved_symbol": "RuntimeManager", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "diagnostics": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "vector", + "C0_SOURCE_CHUNKS": "vector", + "C4_SEMANTIC_ROLES": "vector", + "C2_DEPENDENCY_GRAPH": "vector", + "C3_ENTRYPOINTS": "vector" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [] + } + }, + "fallback": { + "used": false, + "reason": null + }, + "retrieval_by_layer_ms": { + "C1_SYMBOL_CATALOG": 76, + "C0_SOURCE_CHUNKS": 20, + "C4_SEMANTIC_ROLES": 22, + "C2_DEPENDENCY_GRAPH": 62, + "C3_ENTRYPOINTS": 12 + } + } + }, + { + "step": "pre_evidence_gate", + "status": "passed", + "timings_ms": { + "pre_evidence_gate": 0 + }, + "output": { + "passed": true, + "failure_reasons": [], + "degraded_message": "" + } + }, + { + "step": "llm", + "status": "completed", + "timings_ms": { + "llm": 1244 + }, + "output": { + "prompt_name": "code_qa_explain_answer", + "answer_preview": "Класс `RuntimeManager` находится в файле `src/app_runtime/core/runtime.py`. Конкретной реализации инициализации или подробного описания методов в предоставленном контексте не видно. Однако исходя из имеющихся признаков:\n\n1. Класс имеет ответственность за управление состоянием и конфигурацией runtime" + } + }, + { + "step": "post_evidence_gate", + "status": "passed", + "timings_ms": { + "post_evidence_gate": 0, + "repair": 0 + }, + "output": { + "passed": true, + "reasons": [], + "repair_used": false + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-explain-runtime-manager.md b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-explain-runtime-manager.md new file mode 100644 index 0000000..29eda0e --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-explain-runtime-manager.md @@ -0,0 +1,247 @@ +# plba-v2-explain-runtime-manager + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: agent_runtime +- mode: full_chain +- passed: True + +## Query +Объясни как работает класс RuntimeManager + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 33, + "llm_answer": "Класс `RuntimeManager` находится в файле `src/app_runtime/core/runtime.py`. Конкретной реализации инициализации или подробного описания методов в предоставленном контексте не видно. Однако исходя из имеющихся признаков:\n\n1. Класс имеет ответственность за управление состоянием и конфигурацией runtime-системы, судя по названиям атрибутов и методов в окружении (`configuration`, `add_config_file`).\n2. Вероятно, он участвует в оркестрации различных компонентов системы через свои методы и атрибуты, хотя детальной информации об этих методах и атрибутах нет.\n\nТаким образом, класс `RuntimeManager` играет ключевую управляющую роль в системе, вероятно, интегрируя и координируя другие компоненты и модули.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] +} + +## Steps +[ + { + "step": "router", + "status": "completed", + "timings_ms": { + "router": 0 + }, + "output": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + } + }, + { + "step": "retrieval", + "status": "completed", + "timings_ms": { + "retrieval": 194 + }, + "output": { + "rag_count": 33, + "answer_path_rag_count": 33, + "resolved_symbol_status": "resolved", + "resolved_symbol": "RuntimeManager", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "diagnostics": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "vector", + "C0_SOURCE_CHUNKS": "vector", + "C4_SEMANTIC_ROLES": "vector", + "C2_DEPENDENCY_GRAPH": "vector", + "C3_ENTRYPOINTS": "vector" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [] + } + }, + "fallback": { + "used": false, + "reason": null + }, + "retrieval_by_layer_ms": { + "C1_SYMBOL_CATALOG": 76, + "C0_SOURCE_CHUNKS": 20, + "C4_SEMANTIC_ROLES": 22, + "C2_DEPENDENCY_GRAPH": 62, + "C3_ENTRYPOINTS": 12 + } + } + }, + { + "step": "pre_evidence_gate", + "status": "passed", + "timings_ms": { + "pre_evidence_gate": 0 + }, + "output": { + "passed": true, + "failure_reasons": [], + "degraded_message": "" + } + }, + { + "step": "llm", + "status": "completed", + "timings_ms": { + "llm": 1244 + }, + "output": { + "prompt_name": "code_qa_explain_answer", + "answer_preview": "Класс `RuntimeManager` находится в файле `src/app_runtime/core/runtime.py`. Конкретной реализации инициализации или подробного описания методов в предоставленном контексте не видно. Однако исходя из имеющихся признаков:\n\n1. Класс имеет ответственность за управление состоянием и конфигурацией runtime" + } + }, + { + "step": "post_evidence_gate", + "status": "passed", + "timings_ms": { + "post_evidence_gate": 0, + "repair": 0 + }, + "output": { + "passed": true, + "reasons": [], + "repair_used": false + } + } +] + +## Diagnostics +{ + "intent_correct": null, + "target_found": true, + "layers_used": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_sufficient": true, + "answer_mode": "normal", + "router_result": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "EXPLAIN", + "path_scope": [], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_resolution_status": "resolved" + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Объясни как работает класс RuntimeManager", + "sub_intent": "EXPLAIN", + "path_scope": [], + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C4_SEMANTIC_ROLES", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 6, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C3_ENTRYPOINTS", + "hit_count": 3, + "empty": false, + "fallback_used": false + } + ], + "empty_layers": [], + "evidence_gate_decision": { + "sufficient": true, + "failure_reasons": [], + "evidence_count": 33 + }, + "failure_reasons": [], + "timings_ms": { + "router": 0, + "retrieval": 194, + "pre_evidence_gate": 0, + "llm": 1244 + } +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-explain-trace-service.json b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-explain-trace-service.json new file mode 100644 index 0000000..4ea380a --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-explain-trace-service.json @@ -0,0 +1,4288 @@ +{ + "case_id": "plba-v2-explain-trace-service", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "agent_runtime", + "mode": "full_chain", + "query": "Объясни как работает класс TraceService", + "actual": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 33, + "llm_answer": "Класс `TraceService` определяется в файле `src/app_runtime/tracing/service.py`. Он наследует от `TraceContextFactory`.\n\nЕго основные обязанности:\n- Инициализация при создании через параметры `transport` и `store`, с возможностью использования стандартных реализаций (`NoOpTraceTransport` и `TraceContextStore`).\n- Метод `create_context` создаёт новый контекст трассировки с заданными параметрами и записывает его в хранилище.\n- Методы `current_trace_id` и `step` предоставляют доступ к текущему идентификатору трассы и выполняют дополнительные действия.\n\nДетали реализации зависят от конкретных методов, таких как инициализация транспорта и контекста, а также запись записей трассировки в хранилище.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "TraceService" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "query": "Объясни как работает класс TraceService", + "router_result": { + "schema_version": "1.1", + "intent": "CODE_QA", + "retrieval_profile": "code", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query_plan": { + "raw": "Объясни как работает класс TraceService", + "normalized": "Объясни как работает класс TraceService", + "sub_intent": "EXPLAIN", + "negations": [], + "expansions": [ + "TraceService" + ], + "keyword_hints": [ + "TraceService" + ], + "path_hints": [], + "doc_scope_hints": [], + "symbol_candidates": [ + "TraceService" + ], + "symbol_kind_hint": "class", + "anchors": [ + { + "type": "SYMBOL", + "value": "TraceService", + "source": "user_text", + "subtype": null, + "span": { + "start": 27, + "end": 39 + }, + "confidence": 0.88 + }, + { + "type": "KEY_TERM", + "value": "класс", + "source": "user_text", + "subtype": null, + "span": { + "start": 21, + "end": 26 + }, + "confidence": 0.9 + } + ] + }, + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "top_k": 8 + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 8 + }, + { + "layer_id": "C4_SEMANTIC_ROLES", + "top_k": 8 + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "top_k": 6 + }, + { + "layer_id": "C3_ENTRYPOINTS", + "top_k": 6 + } + ], + "filters": { + "test_policy": "EXCLUDE", + "path_scope": [], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "TraceService", + "alternatives": [ + "TraceService", + "TraceService", + "TraceService", + "TraceService", + "TraceService" + ], + "confidence": 0.99 + }, + "evidence_policy": { + "require_def": true, + "require_flow": true, + "require_spec": false, + "allow_answer_without_evidence": false + } + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Объясни как работает класс TraceService", + "sub_intent": "EXPLAIN", + "path_scope": [], + "keyword_hints": [ + "TraceService" + ], + "symbol_candidates": [ + "TraceService" + ], + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "top_k": 8 + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 8 + }, + { + "layer_id": "C4_SEMANTIC_ROLES", + "top_k": 8 + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "top_k": 6 + }, + { + "layer_id": "C3_ENTRYPOINTS", + "top_k": 6 + } + ], + "filters": { + "test_policy": "EXCLUDE", + "path_scope": [], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + }, + "query_plan": { + "raw": "Объясни как работает класс TraceService", + "normalized": "Объясни как работает класс TraceService", + "sub_intent": "EXPLAIN", + "negations": [], + "expansions": [ + "TraceService" + ], + "keyword_hints": [ + "TraceService" + ], + "path_hints": [], + "doc_scope_hints": [], + "symbol_candidates": [ + "TraceService" + ], + "symbol_kind_hint": "class", + "anchors": [ + { + "type": "SYMBOL", + "value": "TraceService", + "source": "user_text", + "subtype": null, + "span": { + "start": 27, + "end": 39 + }, + "confidence": 0.88 + }, + { + "type": "KEY_TERM", + "value": "класс", + "source": "user_text", + "subtype": null, + "span": { + "start": 21, + "end": 26 + }, + "confidence": 0.9 + } + ] + } + }, + "retrieval_result": { + "target_symbol_candidates": [ + "TraceService", + "TraceService.open_context", + "TraceService.create_context", + "TraceService.current_trace_id" + ], + "resolved_symbol": "TraceService", + "symbol_resolution_status": "resolved", + "file_candidates": [ + "src/plba/__init__.py", + "src/app_runtime/core/runtime.py", + "src/app_runtime/tracing/__init__.py", + "src/app_runtime/tracing/service.py", + "src/plba/tracing.py", + "src/app_runtime/contracts/__init__.py", + "src/app_runtime/config/providers.py", + "src/app_runtime/control/http_runner.py", + "src/app_runtime/workflow/persistence/workflow_persistence.py", + "src/app_runtime/control/http_channel.py", + "src/app_runtime/queue/in_memory.py", + "src/app_runtime/config/file_loader.py", + "src/app_runtime/tracing/store.py", + "src/app_runtime/workers/supervisor.py", + "src/app_runtime/control/http_app.py" + ], + "code_chunks": [ + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/plba/__init__.py", + "title": "TraceService", + "content": "const TraceService\nTraceService = plba.tracing.TraceService", + "start_line": 20, + "end_line": 20, + "metadata": { + "symbol_id": "259ec03b77b9387ea53f69c77af32791dd29adf6de617ba72dd3f839197342a1", + "qname": "TraceService", + "kind": "const", + "signature": "TraceService = plba.tracing.TraceService", + "parent_symbol_id": null, + "package_or_module": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/core/runtime.py", + "title": "TraceService", + "content": "const TraceService\nTraceService = app_runtime.tracing.service.TraceService", + "start_line": 14, + "end_line": 14, + "metadata": { + "symbol_id": "3ccf6212fd7d9730f9df933e2ee7671b65bdae0520577e1a49c6432262842db6", + "qname": "TraceService", + "kind": "const", + "signature": "TraceService = app_runtime.tracing.service.TraceService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/tracing/__init__.py", + "title": "TraceService", + "content": "const TraceService\nTraceService = app_runtime.tracing.service.TraceService", + "start_line": 2, + "end_line": 2, + "metadata": { + "symbol_id": "ecd2fab7fa9744b2adca84d3d213f7aadcb7e1da84b9c2764a4ab39c65282b11", + "qname": "TraceService", + "kind": "const", + "signature": "TraceService = app_runtime.tracing.service.TraceService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.tracing.__init__", + "is_test": false, + "blob_sha": "a01dea5f773515aeaae8e6d3431fcb93531a8b577dfa26c2e5db16cd6ae6e4d9", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/tracing/service.py", + "title": "TraceService", + "content": "class TraceService\nTraceService(TraceContextFactory)", + "start_line": 39, + "end_line": 166, + "metadata": { + "symbol_id": "c2b2b976d99f2c600000b753731b26e0a69adcb4359398b93073590c5d5d04f4", + "qname": "TraceService", + "kind": "class", + "signature": "TraceService(TraceContextFactory)", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/plba/tracing.py", + "title": "TraceService", + "content": "const TraceService\nTraceService = app_runtime.tracing.service.TraceService", + "start_line": 1, + "end_line": 1, + "metadata": { + "symbol_id": "a4556fb3f83c50ea68b94a679786ce802cab7ffd9d7138aad3d6009b2661f425", + "qname": "TraceService", + "kind": "const", + "signature": "TraceService = app_runtime.tracing.service.TraceService", + "parent_symbol_id": null, + "package_or_module": "src.plba.tracing", + "is_test": false, + "blob_sha": "a27e11c716c93c3fcefe6f11b4cc420a6b743e7606606071d7f1aeeccc4e7d45", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/tracing/service.py", + "title": "TraceService.open_context", + "content": "method TraceService.open_context\nopen_context(self)", + "start_line": 66, + "end_line": 78, + "metadata": { + "symbol_id": "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426", + "qname": "TraceService.open_context", + "kind": "method", + "signature": "open_context(self)", + "parent_symbol_id": "TraceService", + "package_or_module": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/tracing/service.py", + "title": "TraceService.create_context", + "content": "method TraceService.create_context\ncreate_context(self)", + "start_line": 45, + "end_line": 63, + "metadata": { + "symbol_id": "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a", + "qname": "TraceService.create_context", + "kind": "method", + "signature": "create_context(self)", + "parent_symbol_id": "TraceService", + "package_or_module": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/tracing/service.py", + "title": "TraceService.current_trace_id", + "content": "method TraceService.current_trace_id\ncurrent_trace_id(self)", + "start_line": 80, + "end_line": 81, + "metadata": { + "symbol_id": "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c", + "qname": "TraceService.current_trace_id", + "kind": "method", + "signature": "current_trace_id(self)", + "parent_symbol_id": "TraceService", + "package_or_module": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/tracing/service.py", + "title": "src/app_runtime/tracing/service.py:TraceService", + "content": "class TraceService(TraceContextFactory):\n def __init__(self, transport: TraceTransport | None = None, store: TraceContextStore | None = None) -> None:\n self.transport = transport or NoOpTraceTransport()\n self.store = store or TraceContextStore()\n self._writer = TraceRecordWriter(self.transport)\n\n def create_context(\n self,\n *,\n alias: str,\n parent_id: str | None = None,\n kind: str | None = None,\n attrs: dict[str, Any] | None = None,\n ) -> str:\n record = TraceContextRecord(\n trace_id=uuid4().hex,\n alias=str(alias or \"\"),\n parent_id=parent_id,\n type=kind,\n event_time=utc_now(),\n attrs=dict(attrs or {}),\n )\n self.store.push(record)\n self._writer.write_context(record)\n return record.trace_id\n\n @contextmanager\n def open_context(\n self,\n *,\n alias: str,\n parent_id: str | None = None,\n kind: str | None = None,\n attrs: dict[str, Any] | None = None,\n ) -> Iterator[str]:\n trace_id = self.create_context(alias=alias, parent_id=parent_id, kind=kind, attrs=attrs)\n try:\n yield trace_id\n finally:\n self.store.pop()\n\n def current_trace_id(self) -> str | None:\n return self.store.current_trace_id()\n\n def close_context(self) -> str | None:\n previous = self.store.pop()\n return previous.record.trace_id if previous else None\n\n def step(self, name: str) -> None:\n self.store.set_step(str(name or \"\"))\n\n def info(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"INFO\", message, status, attrs)\n\n def debug(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"DEBUG\", message, status, attrs)\n\n def warning(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"WARNING\", message, status, attrs)\n\n def error(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"ERROR\", message, status, attrs)\n\n def exception(self, message: str, *, status: str = \"failed\", attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"ERROR\", message, status, attrs)\n\n def new_root(self, operation: str) -> TraceContext:\n trace_id = self.create_context(alias=operation, kind=\"operation\", attrs={\"operation\": operation})\n return TraceContext(trace_id=trace_id, span_id=trace_id, attributes={\"operation\": operation})\n\n def child_of(self, parent: TraceContext, operation: str) -> TraceContext:\n trace_id = self.create_context(\n alias=operation,\n parent_id=parent.trace_id,\n kind=\"worker\",\n attrs={\"operation\": operation},\n )\n return TraceContext(\n trace_id=trace_id,\n span_id=trace_id,\n parent_span_id=parent.span_id,\n attributes={\"operation\": operation},\n )\n\n def attach(self, metadata: dict[str, object], context: TraceContext) -> dict[str, object]:\n updated = dict(metadata)\n updated[\"trace_id\"] = context.trace_id\n updated[\"span_id\"] = context.span_id\n updated[\"parent_span_id\"] = context.parent_span_id\n return updated\n\n def resume(self, metadata: dict[str, object], operation: str) -> TraceContext:\n trace_id = str(metadata.get(\"trace_id\") or uuid4().hex)\n span_id = str(metadata.get(\"span_id\") or trace_id)\n parent_id = metadata.get(\"parent_span_id\")\n self.create_context(\n alias=operation,\n parent_id=str(parent_id) if parent_id else None,\n kind=\"worker\",\n attrs=dict(metadata),\n )\n return TraceContext(\n trace_id=trace_id,\n span_id=span_id,\n parent_span_id=str(parent_id) if parent_id else None,\n attributes={\"operation\": operation},\n )\n\n def _write_message(\n self,\n level: TraceLevel,\n message: str,\n status: str | None,\n attrs: dict[str, Any] | None,\n ) -> None:\n active = self.store.current()\n if active is None:\n raise RuntimeError(\"Trace context is not bound. Call create_context() first.\")\n record = TraceLogMessage(\n trace_id=active.record.trace_id,\n step=active.step,\n status=str(status or \"\"),\n message=str(message or \"\"),\n level=level,\n event_time=utc_now(),\n attrs=dict(attrs or {}),\n )\n self._writer.write_message(record)", + "start_line": 39, + "end_line": 166, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/tracing/service.py", + "title": "src/app_runtime/tracing/service.py:TraceManager", + "content": "class TraceManager(TraceService):\n \"\"\"Compatibility alias during the transition from ConfigManager-shaped naming.\"\"\"", + "start_line": 169, + "end_line": 170, + "metadata": { + "chunk_index": 2, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/core/runtime.py", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "start_line": 18, + "end_line": 179, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/tracing/__init__.py", + "title": "src/app_runtime/tracing/__init__.py:1-17", + "content": "from app_runtime.contracts.trace import TraceContext, TraceContextRecord, TraceLogMessage, TraceTransport\nfrom app_runtime.tracing.service import TraceManager, TraceService\nfrom app_runtime.tracing.store import ActiveTraceContext, TraceContextStore\nfrom app_runtime.tracing.transport import MySqlTraceTransport, NoOpTraceTransport\n\n__all__ = [\n \"ActiveTraceContext\",\n \"MySqlTraceTransport\",\n \"NoOpTraceTransport\",\n \"TraceContext\",\n \"TraceContextRecord\",\n \"TraceContextStore\",\n \"TraceLogMessage\",\n \"TraceManager\",\n \"TraceService\",\n \"TraceTransport\",\n]", + "start_line": 1, + "end_line": 17, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.tracing.__init__", + "is_test": false, + "blob_sha": "a01dea5f773515aeaae8e6d3431fcb93531a8b577dfa26c2e5db16cd6ae6e4d9", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/plba/__init__.py", + "title": "src/plba/__init__.py:1-69", + "content": "from plba.bootstrap import create_runtime\nfrom plba.config import ConfigFileLoader, FileConfigProvider\nfrom plba.control import ControlActionSet, ControlChannel, ControlPlaneService, HttpControlChannel\nfrom plba.contracts import (\n ApplicationModule,\n ConfigProvider,\n HealthContributor,\n TraceContext,\n TraceContextRecord,\n TraceLogMessage,\n TraceTransport,\n Worker,\n WorkerHealth,\n WorkerStatus,\n)\nfrom plba.core import ConfigurationManager, RuntimeManager, ServiceContainer\nfrom plba.health import HealthRegistry\nfrom plba.logging import LogManager\nfrom plba.queue import InMemoryTaskQueue\nfrom plba.tracing import MySqlTraceTransport, NoOpTraceTransport, TraceService\nfrom plba.workflow import (\n StepResult,\n WorkflowContext,\n WorkflowDefinition,\n WorkflowEngine,\n WorkflowEngineHooks,\n WorkflowNode,\n WorkflowRuntimeFactory,\n WorkflowStep,\n)\nfrom plba.workers import WorkerSupervisor\n\n__all__ = [\n \"ApplicationModule\",\n \"ConfigFileLoader\",\n \"ConfigProvider\",\n \"ConfigurationManager\",\n \"ControlActionSet\",\n \"ControlChannel\",\n \"ControlPlaneService\",\n \"create_runtime\",\n \"FileConfigProvider\",\n \"HealthContributor\",\n \"HealthRegistry\",\n \"HttpControlChannel\",\n \"InMemoryTaskQueue\",\n \"LogManager\",\n \"MySqlTraceTransport\",\n \"NoOpTraceTransport\",\n \"RuntimeManager\",\n \"ServiceContainer\",\n \"TraceContext\",\n \"TraceContextRecord\",\n \"TraceLogMessage\",\n \"TraceService\",\n \"TraceTransport\",\n \"StepResult\",\n \"Worker\",\n \"WorkerHealth\",\n \"WorkerStatus\",\n \"WorkflowContext\",\n \"WorkflowDefinition\",\n \"WorkflowEngine\",\n \"WorkflowEngineHooks\",\n \"WorkflowNode\",\n \"WorkflowRuntimeFactory\",\n \"WorkflowStep\",\n \"WorkerSupervisor\",\n]", + "start_line": 1, + "end_line": 69, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/plba/tracing.py", + "title": "src/plba/tracing.py:1-4", + "content": "from app_runtime.tracing.service import TraceService\nfrom app_runtime.tracing.transport import MySqlTraceTransport, NoOpTraceTransport\n\n__all__ = [\"MySqlTraceTransport\", \"NoOpTraceTransport\", \"TraceService\"]", + "start_line": 1, + "end_line": 4, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.tracing", + "is_test": false, + "blob_sha": "a27e11c716c93c3fcefe6f11b4cc420a6b743e7606606071d7f1aeeccc4e7d45", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/contracts/__init__.py", + "title": "src/app_runtime/__init__.py:1-1", + "content": "__all__: list[str] = []", + "start_line": 1, + "end_line": 1, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.__init__", + "is_test": false, + "blob_sha": "8eea9df4f6d7b38ca0e39ccc27b04700e3d08dbeec8046d613d22706d19985fa", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/config/providers.py", + "title": "src/app_runtime/config/providers.py:FileConfigProvider", + "content": "class FileConfigProvider(ConfigProvider):\n def __init__(self, path: str | Path) -> None:\n self._loader = ConfigFileLoader(path)\n\n @property\n def loader(self) -> ConfigFileLoader:\n return self._loader\n\n def load(self) -> dict[str, Any]:\n config = self._loader.load_sync()\n if not isinstance(config, dict):\n raise TypeError(\"Config root must be a mapping\")\n return dict(config)", + "start_line": 10, + "end_line": 22, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.config.providers", + "is_test": false, + "blob_sha": "8c53ca0122d6df6c5763bca15e99434bb4daebd5a618b8fc927e9ae90b022e64", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/tracing/service.py", + "title": "TraceService", + "content": "TraceService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (13)", + "start_line": 39, + "end_line": 166, + "metadata": { + "symbol_id": "c2b2b976d99f2c600000b753731b26e0a69adcb4359398b93073590c5d5d04f4", + "symbol_name": "TraceService", + "qname": "TraceService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 13, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/http_runner.py", + "title": "UvicornThreadRunner", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "start_line": 10, + "end_line": 61, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "title": "WorkflowPersistence", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "start_line": 8, + "end_line": 54, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/http_channel.py", + "title": "HttpControlChannel", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "start_line": 12, + "end_line": 57, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/queue/in_memory.py", + "title": "InMemoryTaskQueue", + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)", + "start_line": 9, + "end_line": 38, + "metadata": { + "symbol_id": "2da04cb94544a3bcbf0943a95ad4bdd8710bcafaa32a02fd0e4de2178dcf3533", + "symbol_name": "InMemoryTaskQueue", + "qname": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 9, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "58f0cc001ccda0eee4c6bc32ed83bd05eafd6b6644f1e8b4aa9eed3103db73dc", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/config/file_loader.py", + "title": "ConfigFileLoader", + "content": "ConfigFileLoader\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (8)", + "start_line": 11, + "end_line": 48, + "metadata": { + "symbol_id": "a8474eca8b6e9dc86ae67ed68b16fa5fb639ef08739c053e7b7195489765667f", + "symbol_name": "ConfigFileLoader", + "qname": "ConfigFileLoader", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 8, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/tracing/store.py", + "title": "TraceContextStore", + "content": "TraceContextStore\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "start_line": 15, + "end_line": 52, + "metadata": { + "symbol_id": "b2dad4fbe16ffb11b58deba311c7739955c39d59f291b22181f33e9c8cce4059", + "symbol_name": "TraceContextStore", + "qname": "TraceContextStore", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "d369554f08fc92039c6edd5a2a1e73b23901533e8974459170bbd9347d263dc5", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/workers/supervisor.py", + "title": "WorkerSupervisor", + "content": "WorkerSupervisor\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "start_line": 10, + "end_line": 59, + "metadata": { + "symbol_id": "c17b44e8d9e97d490989b21fa67d7c346cdda8a0472e4c41fb243c8846faa124", + "symbol_name": "WorkerSupervisor", + "qname": "WorkerSupervisor", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "77609d9d5927171cce7fc3a54897c183fd63068710c6362029b700937aae5eee", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/tracing/service.py", + "title": "TraceService.__init__:dataflow_slice", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.create_context", + "start_line": 42, + "end_line": 61, + "metadata": { + "edge_id": "3b052062067a78aef3302ee1d996897e02a67d1b340397bea4f59fe147c0492a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a", + "dst_ref": "TraceService.create_context", + "resolution": "resolved", + "slice_id": "3b052062067a78aef3302ee1d996897e02a67d1b340397bea4f59fe147c0492a", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.create_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/tracing/service.py", + "title": "TraceService.__init__:dataflow_slice", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.close_context", + "start_line": 42, + "end_line": 84, + "metadata": { + "edge_id": "7a9353ef57c9ae5d19b3a0c6ac50fad05e6d21d31bbe1cd1cd07af6332ba6505", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "01e14158dcced7e52d0c8ac84ac7b9a75225c261b6aca6a1d7da802d0994721c", + "dst_ref": "TraceService.close_context", + "resolution": "resolved", + "slice_id": "7a9353ef57c9ae5d19b3a0c6ac50fad05e6d21d31bbe1cd1cd07af6332ba6505", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.close_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "01e14158dcced7e52d0c8ac84ac7b9a75225c261b6aca6a1d7da802d0994721c" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/tracing/service.py", + "title": "TraceService.__init__:dataflow_slice", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.open_context", + "start_line": 42, + "end_line": 78, + "metadata": { + "edge_id": "a6e13b9ebc4fed84586afd53ed92a4d14757e440873f572b2337d5622ee96031", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426", + "dst_ref": "TraceService.open_context", + "resolution": "resolved", + "slice_id": "a6e13b9ebc4fed84586afd53ed92a4d14757e440873f572b2337d5622ee96031", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.open_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/tracing/service.py", + "title": "TraceService.__init__:dataflow_slice", + "content": "TraceService.__init__\n -> TraceService.transport\n -> TraceService.__init__", + "start_line": 41, + "end_line": 43, + "metadata": { + "edge_id": "1e923a93faa05c3c43ca9b19bd047007a8589ccce57d3cc1798ae7f9f200af98", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "dst_ref": "TraceService.__init__", + "resolution": "resolved", + "slice_id": "1e923a93faa05c3c43ca9b19bd047007a8589ccce57d3cc1798ae7f9f200af98", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.transport", + "TraceService.__init__" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/tracing/service.py", + "title": "TraceService.__init__:dataflow_slice", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.current_trace_id", + "start_line": 42, + "end_line": 81, + "metadata": { + "edge_id": "3ea17138634b1190bded77ddb84aa1595124f6519b246f24fc4b02bd62b5cac1", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c", + "dst_ref": "TraceService.current_trace_id", + "resolution": "resolved", + "slice_id": "3ea17138634b1190bded77ddb84aa1595124f6519b246f24fc4b02bd62b5cac1", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.current_trace_id" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/tracing/service.py", + "title": "TraceService.__init__:dataflow_slice", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.step", + "start_line": 42, + "end_line": 88, + "metadata": { + "edge_id": "9f34c5da9b09fba99df6f6b1bde183a9aeb45111b8218a747c71590c2c9f60f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "c44bfbc66cf747283f30088da3e011a10395031d41e77b74e523c24997f641ca", + "dst_ref": "TraceService.step", + "resolution": "resolved", + "slice_id": "9f34c5da9b09fba99df6f6b1bde183a9aeb45111b8218a747c71590c2c9f60f2", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.step" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "c44bfbc66cf747283f30088da3e011a10395031d41e77b74e523c24997f641ca" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C3_ENTRYPOINTS", + "path": "src/app_runtime/control/http_app.py", + "title": "app.post", + "content": "fastapi http app.post", + "start_line": 38, + "end_line": 42, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C3_ENTRYPOINTS", + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "content": "fastapi http app.get", + "start_line": 31, + "end_line": 34, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C3_ENTRYPOINTS", + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "content": "fastapi http app.get", + "start_line": 38, + "end_line": 42, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "relations": [ + { + "path": "src/app_runtime/tracing/service.py", + "metadata": { + "edge_id": "3b052062067a78aef3302ee1d996897e02a67d1b340397bea4f59fe147c0492a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a", + "dst_ref": "TraceService.create_context", + "resolution": "resolved", + "slice_id": "3b052062067a78aef3302ee1d996897e02a67d1b340397bea4f59fe147c0492a", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.create_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.create_context" + }, + { + "path": "src/app_runtime/tracing/service.py", + "metadata": { + "edge_id": "7a9353ef57c9ae5d19b3a0c6ac50fad05e6d21d31bbe1cd1cd07af6332ba6505", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "01e14158dcced7e52d0c8ac84ac7b9a75225c261b6aca6a1d7da802d0994721c", + "dst_ref": "TraceService.close_context", + "resolution": "resolved", + "slice_id": "7a9353ef57c9ae5d19b3a0c6ac50fad05e6d21d31bbe1cd1cd07af6332ba6505", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.close_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "01e14158dcced7e52d0c8ac84ac7b9a75225c261b6aca6a1d7da802d0994721c" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.close_context" + }, + { + "path": "src/app_runtime/tracing/service.py", + "metadata": { + "edge_id": "a6e13b9ebc4fed84586afd53ed92a4d14757e440873f572b2337d5622ee96031", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426", + "dst_ref": "TraceService.open_context", + "resolution": "resolved", + "slice_id": "a6e13b9ebc4fed84586afd53ed92a4d14757e440873f572b2337d5622ee96031", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.open_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.open_context" + }, + { + "path": "src/app_runtime/tracing/service.py", + "metadata": { + "edge_id": "1e923a93faa05c3c43ca9b19bd047007a8589ccce57d3cc1798ae7f9f200af98", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "dst_ref": "TraceService.__init__", + "resolution": "resolved", + "slice_id": "1e923a93faa05c3c43ca9b19bd047007a8589ccce57d3cc1798ae7f9f200af98", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.transport", + "TraceService.__init__" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "TraceService.__init__\n -> TraceService.transport\n -> TraceService.__init__" + }, + { + "path": "src/app_runtime/tracing/service.py", + "metadata": { + "edge_id": "3ea17138634b1190bded77ddb84aa1595124f6519b246f24fc4b02bd62b5cac1", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c", + "dst_ref": "TraceService.current_trace_id", + "resolution": "resolved", + "slice_id": "3ea17138634b1190bded77ddb84aa1595124f6519b246f24fc4b02bd62b5cac1", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.current_trace_id" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.current_trace_id" + }, + { + "path": "src/app_runtime/tracing/service.py", + "metadata": { + "edge_id": "9f34c5da9b09fba99df6f6b1bde183a9aeb45111b8218a747c71590c2c9f60f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "c44bfbc66cf747283f30088da3e011a10395031d41e77b74e523c24997f641ca", + "dst_ref": "TraceService.step", + "resolution": "resolved", + "slice_id": "9f34c5da9b09fba99df6f6b1bde183a9aeb45111b8218a747c71590c2c9f60f2", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.step" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "c44bfbc66cf747283f30088da3e011a10395031d41e77b74e523c24997f641ca" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.step" + } + ], + "entrypoints": [ + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.post", + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "test_candidates": [], + "layer_outcomes": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C4_SEMANTIC_ROLES", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 6, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C3_ENTRYPOINTS", + "hit_count": 3, + "empty": false, + "fallback_used": false + } + ], + "missing_layers": [], + "raw_rows": [ + { + "path": "src/plba/__init__.py", + "content": "const TraceService\nTraceService = plba.tracing.TraceService", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService", + "span_start": 20, + "span_end": 20, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "259ec03b77b9387ea53f69c77af32791dd29adf6de617ba72dd3f839197342a1", + "qname": "TraceService", + "kind": "const", + "signature": "TraceService = plba.tracing.TraceService", + "parent_symbol_id": null, + "package_or_module": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "const TraceService\nTraceService = app_runtime.tracing.service.TraceService", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService", + "span_start": 14, + "span_end": 14, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "3ccf6212fd7d9730f9df933e2ee7671b65bdae0520577e1a49c6432262842db6", + "qname": "TraceService", + "kind": "const", + "signature": "TraceService = app_runtime.tracing.service.TraceService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/__init__.py", + "content": "const TraceService\nTraceService = app_runtime.tracing.service.TraceService", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService", + "span_start": 2, + "span_end": 2, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "ecd2fab7fa9744b2adca84d3d213f7aadcb7e1da84b9c2764a4ab39c65282b11", + "qname": "TraceService", + "kind": "const", + "signature": "TraceService = app_runtime.tracing.service.TraceService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.tracing.__init__", + "is_test": false, + "blob_sha": "a01dea5f773515aeaae8e6d3431fcb93531a8b577dfa26c2e5db16cd6ae6e4d9", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceService\nTraceService(TraceContextFactory)", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService", + "span_start": 39, + "span_end": 166, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "c2b2b976d99f2c600000b753731b26e0a69adcb4359398b93073590c5d5d04f4", + "qname": "TraceService", + "kind": "class", + "signature": "TraceService(TraceContextFactory)", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/tracing.py", + "content": "const TraceService\nTraceService = app_runtime.tracing.service.TraceService", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService", + "span_start": 1, + "span_end": 1, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "a4556fb3f83c50ea68b94a679786ce802cab7ffd9d7138aad3d6009b2661f425", + "qname": "TraceService", + "kind": "const", + "signature": "TraceService = app_runtime.tracing.service.TraceService", + "parent_symbol_id": null, + "package_or_module": "src.plba.tracing", + "is_test": false, + "blob_sha": "a27e11c716c93c3fcefe6f11b4cc420a6b743e7606606071d7f1aeeccc4e7d45", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "method TraceService.open_context\nopen_context(self)", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService.open_context", + "span_start": 66, + "span_end": 78, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426", + "qname": "TraceService.open_context", + "kind": "method", + "signature": "open_context(self)", + "parent_symbol_id": "TraceService", + "package_or_module": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "method TraceService.create_context\ncreate_context(self)", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService.create_context", + "span_start": 45, + "span_end": 63, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a", + "qname": "TraceService.create_context", + "kind": "method", + "signature": "create_context(self)", + "parent_symbol_id": "TraceService", + "package_or_module": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "method TraceService.current_trace_id\ncurrent_trace_id(self)", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService.current_trace_id", + "span_start": 80, + "span_end": 81, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c", + "qname": "TraceService.current_trace_id", + "kind": "method", + "signature": "current_trace_id(self)", + "parent_symbol_id": "TraceService", + "package_or_module": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceService(TraceContextFactory):\n def __init__(self, transport: TraceTransport | None = None, store: TraceContextStore | None = None) -> None:\n self.transport = transport or NoOpTraceTransport()\n self.store = store or TraceContextStore()\n self._writer = TraceRecordWriter(self.transport)\n\n def create_context(\n self,\n *,\n alias: str,\n parent_id: str | None = None,\n kind: str | None = None,\n attrs: dict[str, Any] | None = None,\n ) -> str:\n record = TraceContextRecord(\n trace_id=uuid4().hex,\n alias=str(alias or \"\"),\n parent_id=parent_id,\n type=kind,\n event_time=utc_now(),\n attrs=dict(attrs or {}),\n )\n self.store.push(record)\n self._writer.write_context(record)\n return record.trace_id\n\n @contextmanager\n def open_context(\n self,\n *,\n alias: str,\n parent_id: str | None = None,\n kind: str | None = None,\n attrs: dict[str, Any] | None = None,\n ) -> Iterator[str]:\n trace_id = self.create_context(alias=alias, parent_id=parent_id, kind=kind, attrs=attrs)\n try:\n yield trace_id\n finally:\n self.store.pop()\n\n def current_trace_id(self) -> str | None:\n return self.store.current_trace_id()\n\n def close_context(self) -> str | None:\n previous = self.store.pop()\n return previous.record.trace_id if previous else None\n\n def step(self, name: str) -> None:\n self.store.set_step(str(name or \"\"))\n\n def info(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"INFO\", message, status, attrs)\n\n def debug(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"DEBUG\", message, status, attrs)\n\n def warning(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"WARNING\", message, status, attrs)\n\n def error(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"ERROR\", message, status, attrs)\n\n def exception(self, message: str, *, status: str = \"failed\", attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"ERROR\", message, status, attrs)\n\n def new_root(self, operation: str) -> TraceContext:\n trace_id = self.create_context(alias=operation, kind=\"operation\", attrs={\"operation\": operation})\n return TraceContext(trace_id=trace_id, span_id=trace_id, attributes={\"operation\": operation})\n\n def child_of(self, parent: TraceContext, operation: str) -> TraceContext:\n trace_id = self.create_context(\n alias=operation,\n parent_id=parent.trace_id,\n kind=\"worker\",\n attrs={\"operation\": operation},\n )\n return TraceContext(\n trace_id=trace_id,\n span_id=trace_id,\n parent_span_id=parent.span_id,\n attributes={\"operation\": operation},\n )\n\n def attach(self, metadata: dict[str, object], context: TraceContext) -> dict[str, object]:\n updated = dict(metadata)\n updated[\"trace_id\"] = context.trace_id\n updated[\"span_id\"] = context.span_id\n updated[\"parent_span_id\"] = context.parent_span_id\n return updated\n\n def resume(self, metadata: dict[str, object], operation: str) -> TraceContext:\n trace_id = str(metadata.get(\"trace_id\") or uuid4().hex)\n span_id = str(metadata.get(\"span_id\") or trace_id)\n parent_id = metadata.get(\"parent_span_id\")\n self.create_context(\n alias=operation,\n parent_id=str(parent_id) if parent_id else None,\n kind=\"worker\",\n attrs=dict(metadata),\n )\n return TraceContext(\n trace_id=trace_id,\n span_id=span_id,\n parent_span_id=str(parent_id) if parent_id else None,\n attributes={\"operation\": operation},\n )\n\n def _write_message(\n self,\n level: TraceLevel,\n message: str,\n status: str | None,\n attrs: dict[str, Any] | None,\n ) -> None:\n active = self.store.current()\n if active is None:\n raise RuntimeError(\"Trace context is not bound. Call create_context() first.\")\n record = TraceLogMessage(\n trace_id=active.record.trace_id,\n step=active.step,\n status=str(status or \"\"),\n message=str(message or \"\"),\n level=level,\n event_time=utc_now(),\n attrs=dict(attrs or {}),\n )\n self._writer.write_message(record)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/tracing/service.py:TraceService", + "span_start": 39, + "span_end": 166, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceManager(TraceService):\n \"\"\"Compatibility alias during the transition from ConfigManager-shaped naming.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/tracing/service.py:TraceManager", + "span_start": 169, + "span_end": 170, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 2, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/__init__.py", + "content": "from app_runtime.contracts.trace import TraceContext, TraceContextRecord, TraceLogMessage, TraceTransport\nfrom app_runtime.tracing.service import TraceManager, TraceService\nfrom app_runtime.tracing.store import ActiveTraceContext, TraceContextStore\nfrom app_runtime.tracing.transport import MySqlTraceTransport, NoOpTraceTransport\n\n__all__ = [\n \"ActiveTraceContext\",\n \"MySqlTraceTransport\",\n \"NoOpTraceTransport\",\n \"TraceContext\",\n \"TraceContextRecord\",\n \"TraceContextStore\",\n \"TraceLogMessage\",\n \"TraceManager\",\n \"TraceService\",\n \"TraceTransport\",\n]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/tracing/__init__.py:1-17", + "span_start": 1, + "span_end": 17, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.tracing.__init__", + "is_test": false, + "blob_sha": "a01dea5f773515aeaae8e6d3431fcb93531a8b577dfa26c2e5db16cd6ae6e4d9", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/__init__.py", + "content": "from plba.bootstrap import create_runtime\nfrom plba.config import ConfigFileLoader, FileConfigProvider\nfrom plba.control import ControlActionSet, ControlChannel, ControlPlaneService, HttpControlChannel\nfrom plba.contracts import (\n ApplicationModule,\n ConfigProvider,\n HealthContributor,\n TraceContext,\n TraceContextRecord,\n TraceLogMessage,\n TraceTransport,\n Worker,\n WorkerHealth,\n WorkerStatus,\n)\nfrom plba.core import ConfigurationManager, RuntimeManager, ServiceContainer\nfrom plba.health import HealthRegistry\nfrom plba.logging import LogManager\nfrom plba.queue import InMemoryTaskQueue\nfrom plba.tracing import MySqlTraceTransport, NoOpTraceTransport, TraceService\nfrom plba.workflow import (\n StepResult,\n WorkflowContext,\n WorkflowDefinition,\n WorkflowEngine,\n WorkflowEngineHooks,\n WorkflowNode,\n WorkflowRuntimeFactory,\n WorkflowStep,\n)\nfrom plba.workers import WorkerSupervisor\n\n__all__ = [\n \"ApplicationModule\",\n \"ConfigFileLoader\",\n \"ConfigProvider\",\n \"ConfigurationManager\",\n \"ControlActionSet\",\n \"ControlChannel\",\n \"ControlPlaneService\",\n \"create_runtime\",\n \"FileConfigProvider\",\n \"HealthContributor\",\n \"HealthRegistry\",\n \"HttpControlChannel\",\n \"InMemoryTaskQueue\",\n \"LogManager\",\n \"MySqlTraceTransport\",\n \"NoOpTraceTransport\",\n \"RuntimeManager\",\n \"ServiceContainer\",\n \"TraceContext\",\n \"TraceContextRecord\",\n \"TraceLogMessage\",\n \"TraceService\",\n \"TraceTransport\",\n \"StepResult\",\n \"Worker\",\n \"WorkerHealth\",\n \"WorkerStatus\",\n \"WorkflowContext\",\n \"WorkflowDefinition\",\n \"WorkflowEngine\",\n \"WorkflowEngineHooks\",\n \"WorkflowNode\",\n \"WorkflowRuntimeFactory\",\n \"WorkflowStep\",\n \"WorkerSupervisor\",\n]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/__init__.py:1-69", + "span_start": 1, + "span_end": 69, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/tracing.py", + "content": "from app_runtime.tracing.service import TraceService\nfrom app_runtime.tracing.transport import MySqlTraceTransport, NoOpTraceTransport\n\n__all__ = [\"MySqlTraceTransport\", \"NoOpTraceTransport\", \"TraceService\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/tracing.py:1-4", + "span_start": 1, + "span_end": 4, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.tracing", + "is_test": false, + "blob_sha": "a27e11c716c93c3fcefe6f11b4cc420a6b743e7606606071d7f1aeeccc4e7d45", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/__init__.py", + "content": "__all__: list[str] = []", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/__init__.py:1-1", + "span_start": 1, + "span_end": 1, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.__init__", + "is_test": false, + "blob_sha": "8eea9df4f6d7b38ca0e39ccc27b04700e3d08dbeec8046d613d22706d19985fa", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/providers.py", + "content": "class FileConfigProvider(ConfigProvider):\n def __init__(self, path: str | Path) -> None:\n self._loader = ConfigFileLoader(path)\n\n @property\n def loader(self) -> ConfigFileLoader:\n return self._loader\n\n def load(self) -> dict[str, Any]:\n config = self._loader.load_sync()\n if not isinstance(config, dict):\n raise TypeError(\"Config root must be a mapping\")\n return dict(config)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/config/providers.py:FileConfigProvider", + "span_start": 10, + "span_end": 22, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.config.providers", + "is_test": false, + "blob_sha": "8c53ca0122d6df6c5763bca15e99434bb4daebd5a618b8fc927e9ae90b022e64", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (13)", + "layer": "C4_SEMANTIC_ROLES", + "title": "TraceService", + "span_start": 39, + "span_end": 166, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 60, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "c2b2b976d99f2c600000b753731b26e0a69adcb4359398b93073590c5d5d04f4", + "symbol_name": "TraceService", + "qname": "TraceService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 13, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/queue/in_memory.py", + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)", + "layer": "C4_SEMANTIC_ROLES", + "title": "InMemoryTaskQueue", + "span_start": 9, + "span_end": 38, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 22, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "2da04cb94544a3bcbf0943a95ad4bdd8710bcafaa32a02fd0e4de2178dcf3533", + "symbol_name": "InMemoryTaskQueue", + "qname": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 9, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "58f0cc001ccda0eee4c6bc32ed83bd05eafd6b6644f1e8b4aa9eed3103db73dc", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "ConfigFileLoader\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (8)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ConfigFileLoader", + "span_start": 11, + "span_end": 48, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 23, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "a8474eca8b6e9dc86ae67ed68b16fa5fb639ef08739c053e7b7195489765667f", + "symbol_name": "ConfigFileLoader", + "qname": "ConfigFileLoader", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 8, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/store.py", + "content": "TraceContextStore\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "TraceContextStore", + "span_start": 15, + "span_end": 52, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "b2dad4fbe16ffb11b58deba311c7739955c39d59f291b22181f33e9c8cce4059", + "symbol_name": "TraceContextStore", + "qname": "TraceContextStore", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "d369554f08fc92039c6edd5a2a1e73b23901533e8974459170bbd9347d263dc5", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workers/supervisor.py", + "content": "WorkerSupervisor\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkerSupervisor", + "span_start": 10, + "span_end": 59, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "c17b44e8d9e97d490989b21fa67d7c346cdda8a0472e4c41fb243c8846faa124", + "symbol_name": "WorkerSupervisor", + "qname": "WorkerSupervisor", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "77609d9d5927171cce7fc3a54897c183fd63068710c6362029b700937aae5eee", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.create_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 61, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "3b052062067a78aef3302ee1d996897e02a67d1b340397bea4f59fe147c0492a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a", + "dst_ref": "TraceService.create_context", + "resolution": "resolved", + "slice_id": "3b052062067a78aef3302ee1d996897e02a67d1b340397bea4f59fe147c0492a", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.create_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.close_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 84, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "7a9353ef57c9ae5d19b3a0c6ac50fad05e6d21d31bbe1cd1cd07af6332ba6505", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "01e14158dcced7e52d0c8ac84ac7b9a75225c261b6aca6a1d7da802d0994721c", + "dst_ref": "TraceService.close_context", + "resolution": "resolved", + "slice_id": "7a9353ef57c9ae5d19b3a0c6ac50fad05e6d21d31bbe1cd1cd07af6332ba6505", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.close_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "01e14158dcced7e52d0c8ac84ac7b9a75225c261b6aca6a1d7da802d0994721c" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.open_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 78, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "a6e13b9ebc4fed84586afd53ed92a4d14757e440873f572b2337d5622ee96031", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426", + "dst_ref": "TraceService.open_context", + "resolution": "resolved", + "slice_id": "a6e13b9ebc4fed84586afd53ed92a4d14757e440873f572b2337d5622ee96031", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.open_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.transport\n -> TraceService.__init__", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 41, + "span_end": 43, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "1e923a93faa05c3c43ca9b19bd047007a8589ccce57d3cc1798ae7f9f200af98", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "dst_ref": "TraceService.__init__", + "resolution": "resolved", + "slice_id": "1e923a93faa05c3c43ca9b19bd047007a8589ccce57d3cc1798ae7f9f200af98", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.transport", + "TraceService.__init__" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.current_trace_id", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 81, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "3ea17138634b1190bded77ddb84aa1595124f6519b246f24fc4b02bd62b5cac1", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c", + "dst_ref": "TraceService.current_trace_id", + "resolution": "resolved", + "slice_id": "3ea17138634b1190bded77ddb84aa1595124f6519b246f24fc4b02bd62b5cac1", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.current_trace_id" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.step", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 88, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "9f34c5da9b09fba99df6f6b1bde183a9aeb45111b8218a747c71590c2c9f60f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "c44bfbc66cf747283f30088da3e011a10395031d41e77b74e523c24997f641ca", + "dst_ref": "TraceService.step", + "resolution": "resolved", + "slice_id": "9f34c5da9b09fba99df6f6b1bde183a9aeb45111b8218a747c71590c2c9f60f2", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.step" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "c44bfbc66cf747283f30088da3e011a10395031d41e77b74e523c24997f641ca" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": null, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": null, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": null, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "retrieval_report": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "vector", + "C0_SOURCE_CHUNKS": "vector", + "C4_SEMANTIC_ROLES": "vector", + "C2_DEPENDENCY_GRAPH": "vector", + "C3_ENTRYPOINTS": "vector" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [] + } + }, + "fallback": { + "used": false, + "reason": null + }, + "retrieval_by_layer_ms": { + "C1_SYMBOL_CATALOG": 64, + "C0_SOURCE_CHUNKS": 15, + "C4_SEMANTIC_ROLES": 14, + "C2_DEPENDENCY_GRAPH": 43, + "C3_ENTRYPOINTS": 10 + } + } + }, + "diagnostics": { + "intent_correct": null, + "target_found": true, + "layers_used": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_sufficient": true, + "answer_mode": "normal", + "router_result": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "EXPLAIN", + "path_scope": [], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_resolution_status": "resolved" + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Объясни как работает класс TraceService", + "sub_intent": "EXPLAIN", + "path_scope": [], + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C4_SEMANTIC_ROLES", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 6, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C3_ENTRYPOINTS", + "hit_count": 3, + "empty": false, + "fallback_used": false + } + ], + "empty_layers": [], + "evidence_gate_decision": { + "sufficient": true, + "failure_reasons": [], + "evidence_count": 33 + }, + "failure_reasons": [], + "timings_ms": { + "router": 0, + "retrieval": 147, + "pre_evidence_gate": 0, + "llm": 1347 + } + }, + "rag_rows": [ + { + "path": "src/plba/__init__.py", + "content": "const TraceService\nTraceService = plba.tracing.TraceService", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService", + "span_start": 20, + "span_end": 20, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "259ec03b77b9387ea53f69c77af32791dd29adf6de617ba72dd3f839197342a1", + "qname": "TraceService", + "kind": "const", + "signature": "TraceService = plba.tracing.TraceService", + "parent_symbol_id": null, + "package_or_module": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "const TraceService\nTraceService = app_runtime.tracing.service.TraceService", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService", + "span_start": 14, + "span_end": 14, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "3ccf6212fd7d9730f9df933e2ee7671b65bdae0520577e1a49c6432262842db6", + "qname": "TraceService", + "kind": "const", + "signature": "TraceService = app_runtime.tracing.service.TraceService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/__init__.py", + "content": "const TraceService\nTraceService = app_runtime.tracing.service.TraceService", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService", + "span_start": 2, + "span_end": 2, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "ecd2fab7fa9744b2adca84d3d213f7aadcb7e1da84b9c2764a4ab39c65282b11", + "qname": "TraceService", + "kind": "const", + "signature": "TraceService = app_runtime.tracing.service.TraceService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.tracing.__init__", + "is_test": false, + "blob_sha": "a01dea5f773515aeaae8e6d3431fcb93531a8b577dfa26c2e5db16cd6ae6e4d9", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceService\nTraceService(TraceContextFactory)", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService", + "span_start": 39, + "span_end": 166, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "c2b2b976d99f2c600000b753731b26e0a69adcb4359398b93073590c5d5d04f4", + "qname": "TraceService", + "kind": "class", + "signature": "TraceService(TraceContextFactory)", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/tracing.py", + "content": "const TraceService\nTraceService = app_runtime.tracing.service.TraceService", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService", + "span_start": 1, + "span_end": 1, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "a4556fb3f83c50ea68b94a679786ce802cab7ffd9d7138aad3d6009b2661f425", + "qname": "TraceService", + "kind": "const", + "signature": "TraceService = app_runtime.tracing.service.TraceService", + "parent_symbol_id": null, + "package_or_module": "src.plba.tracing", + "is_test": false, + "blob_sha": "a27e11c716c93c3fcefe6f11b4cc420a6b743e7606606071d7f1aeeccc4e7d45", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "method TraceService.open_context\nopen_context(self)", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService.open_context", + "span_start": 66, + "span_end": 78, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426", + "qname": "TraceService.open_context", + "kind": "method", + "signature": "open_context(self)", + "parent_symbol_id": "TraceService", + "package_or_module": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "method TraceService.create_context\ncreate_context(self)", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService.create_context", + "span_start": 45, + "span_end": 63, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a", + "qname": "TraceService.create_context", + "kind": "method", + "signature": "create_context(self)", + "parent_symbol_id": "TraceService", + "package_or_module": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "method TraceService.current_trace_id\ncurrent_trace_id(self)", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService.current_trace_id", + "span_start": 80, + "span_end": 81, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c", + "qname": "TraceService.current_trace_id", + "kind": "method", + "signature": "current_trace_id(self)", + "parent_symbol_id": "TraceService", + "package_or_module": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceService(TraceContextFactory):\n def __init__(self, transport: TraceTransport | None = None, store: TraceContextStore | None = None) -> None:\n self.transport = transport or NoOpTraceTransport()\n self.store = store or TraceContextStore()\n self._writer = TraceRecordWriter(self.transport)\n\n def create_context(\n self,\n *,\n alias: str,\n parent_id: str | None = None,\n kind: str | None = None,\n attrs: dict[str, Any] | None = None,\n ) -> str:\n record = TraceContextRecord(\n trace_id=uuid4().hex,\n alias=str(alias or \"\"),\n parent_id=parent_id,\n type=kind,\n event_time=utc_now(),\n attrs=dict(attrs or {}),\n )\n self.store.push(record)\n self._writer.write_context(record)\n return record.trace_id\n\n @contextmanager\n def open_context(\n self,\n *,\n alias: str,\n parent_id: str | None = None,\n kind: str | None = None,\n attrs: dict[str, Any] | None = None,\n ) -> Iterator[str]:\n trace_id = self.create_context(alias=alias, parent_id=parent_id, kind=kind, attrs=attrs)\n try:\n yield trace_id\n finally:\n self.store.pop()\n\n def current_trace_id(self) -> str | None:\n return self.store.current_trace_id()\n\n def close_context(self) -> str | None:\n previous = self.store.pop()\n return previous.record.trace_id if previous else None\n\n def step(self, name: str) -> None:\n self.store.set_step(str(name or \"\"))\n\n def info(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"INFO\", message, status, attrs)\n\n def debug(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"DEBUG\", message, status, attrs)\n\n def warning(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"WARNING\", message, status, attrs)\n\n def error(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"ERROR\", message, status, attrs)\n\n def exception(self, message: str, *, status: str = \"failed\", attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"ERROR\", message, status, attrs)\n\n def new_root(self, operation: str) -> TraceContext:\n trace_id = self.create_context(alias=operation, kind=\"operation\", attrs={\"operation\": operation})\n return TraceContext(trace_id=trace_id, span_id=trace_id, attributes={\"operation\": operation})\n\n def child_of(self, parent: TraceContext, operation: str) -> TraceContext:\n trace_id = self.create_context(\n alias=operation,\n parent_id=parent.trace_id,\n kind=\"worker\",\n attrs={\"operation\": operation},\n )\n return TraceContext(\n trace_id=trace_id,\n span_id=trace_id,\n parent_span_id=parent.span_id,\n attributes={\"operation\": operation},\n )\n\n def attach(self, metadata: dict[str, object], context: TraceContext) -> dict[str, object]:\n updated = dict(metadata)\n updated[\"trace_id\"] = context.trace_id\n updated[\"span_id\"] = context.span_id\n updated[\"parent_span_id\"] = context.parent_span_id\n return updated\n\n def resume(self, metadata: dict[str, object], operation: str) -> TraceContext:\n trace_id = str(metadata.get(\"trace_id\") or uuid4().hex)\n span_id = str(metadata.get(\"span_id\") or trace_id)\n parent_id = metadata.get(\"parent_span_id\")\n self.create_context(\n alias=operation,\n parent_id=str(parent_id) if parent_id else None,\n kind=\"worker\",\n attrs=dict(metadata),\n )\n return TraceContext(\n trace_id=trace_id,\n span_id=span_id,\n parent_span_id=str(parent_id) if parent_id else None,\n attributes={\"operation\": operation},\n )\n\n def _write_message(\n self,\n level: TraceLevel,\n message: str,\n status: str | None,\n attrs: dict[str, Any] | None,\n ) -> None:\n active = self.store.current()\n if active is None:\n raise RuntimeError(\"Trace context is not bound. Call create_context() first.\")\n record = TraceLogMessage(\n trace_id=active.record.trace_id,\n step=active.step,\n status=str(status or \"\"),\n message=str(message or \"\"),\n level=level,\n event_time=utc_now(),\n attrs=dict(attrs or {}),\n )\n self._writer.write_message(record)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/tracing/service.py:TraceService", + "span_start": 39, + "span_end": 166, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceManager(TraceService):\n \"\"\"Compatibility alias during the transition from ConfigManager-shaped naming.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/tracing/service.py:TraceManager", + "span_start": 169, + "span_end": 170, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 2, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/__init__.py", + "content": "from app_runtime.contracts.trace import TraceContext, TraceContextRecord, TraceLogMessage, TraceTransport\nfrom app_runtime.tracing.service import TraceManager, TraceService\nfrom app_runtime.tracing.store import ActiveTraceContext, TraceContextStore\nfrom app_runtime.tracing.transport import MySqlTraceTransport, NoOpTraceTransport\n\n__all__ = [\n \"ActiveTraceContext\",\n \"MySqlTraceTransport\",\n \"NoOpTraceTransport\",\n \"TraceContext\",\n \"TraceContextRecord\",\n \"TraceContextStore\",\n \"TraceLogMessage\",\n \"TraceManager\",\n \"TraceService\",\n \"TraceTransport\",\n]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/tracing/__init__.py:1-17", + "span_start": 1, + "span_end": 17, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.tracing.__init__", + "is_test": false, + "blob_sha": "a01dea5f773515aeaae8e6d3431fcb93531a8b577dfa26c2e5db16cd6ae6e4d9", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/__init__.py", + "content": "from plba.bootstrap import create_runtime\nfrom plba.config import ConfigFileLoader, FileConfigProvider\nfrom plba.control import ControlActionSet, ControlChannel, ControlPlaneService, HttpControlChannel\nfrom plba.contracts import (\n ApplicationModule,\n ConfigProvider,\n HealthContributor,\n TraceContext,\n TraceContextRecord,\n TraceLogMessage,\n TraceTransport,\n Worker,\n WorkerHealth,\n WorkerStatus,\n)\nfrom plba.core import ConfigurationManager, RuntimeManager, ServiceContainer\nfrom plba.health import HealthRegistry\nfrom plba.logging import LogManager\nfrom plba.queue import InMemoryTaskQueue\nfrom plba.tracing import MySqlTraceTransport, NoOpTraceTransport, TraceService\nfrom plba.workflow import (\n StepResult,\n WorkflowContext,\n WorkflowDefinition,\n WorkflowEngine,\n WorkflowEngineHooks,\n WorkflowNode,\n WorkflowRuntimeFactory,\n WorkflowStep,\n)\nfrom plba.workers import WorkerSupervisor\n\n__all__ = [\n \"ApplicationModule\",\n \"ConfigFileLoader\",\n \"ConfigProvider\",\n \"ConfigurationManager\",\n \"ControlActionSet\",\n \"ControlChannel\",\n \"ControlPlaneService\",\n \"create_runtime\",\n \"FileConfigProvider\",\n \"HealthContributor\",\n \"HealthRegistry\",\n \"HttpControlChannel\",\n \"InMemoryTaskQueue\",\n \"LogManager\",\n \"MySqlTraceTransport\",\n \"NoOpTraceTransport\",\n \"RuntimeManager\",\n \"ServiceContainer\",\n \"TraceContext\",\n \"TraceContextRecord\",\n \"TraceLogMessage\",\n \"TraceService\",\n \"TraceTransport\",\n \"StepResult\",\n \"Worker\",\n \"WorkerHealth\",\n \"WorkerStatus\",\n \"WorkflowContext\",\n \"WorkflowDefinition\",\n \"WorkflowEngine\",\n \"WorkflowEngineHooks\",\n \"WorkflowNode\",\n \"WorkflowRuntimeFactory\",\n \"WorkflowStep\",\n \"WorkerSupervisor\",\n]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/__init__.py:1-69", + "span_start": 1, + "span_end": 69, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/tracing.py", + "content": "from app_runtime.tracing.service import TraceService\nfrom app_runtime.tracing.transport import MySqlTraceTransport, NoOpTraceTransport\n\n__all__ = [\"MySqlTraceTransport\", \"NoOpTraceTransport\", \"TraceService\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/tracing.py:1-4", + "span_start": 1, + "span_end": 4, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.tracing", + "is_test": false, + "blob_sha": "a27e11c716c93c3fcefe6f11b4cc420a6b743e7606606071d7f1aeeccc4e7d45", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/__init__.py", + "content": "__all__: list[str] = []", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/__init__.py:1-1", + "span_start": 1, + "span_end": 1, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.__init__", + "is_test": false, + "blob_sha": "8eea9df4f6d7b38ca0e39ccc27b04700e3d08dbeec8046d613d22706d19985fa", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/providers.py", + "content": "class FileConfigProvider(ConfigProvider):\n def __init__(self, path: str | Path) -> None:\n self._loader = ConfigFileLoader(path)\n\n @property\n def loader(self) -> ConfigFileLoader:\n return self._loader\n\n def load(self) -> dict[str, Any]:\n config = self._loader.load_sync()\n if not isinstance(config, dict):\n raise TypeError(\"Config root must be a mapping\")\n return dict(config)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/config/providers.py:FileConfigProvider", + "span_start": 10, + "span_end": 22, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.config.providers", + "is_test": false, + "blob_sha": "8c53ca0122d6df6c5763bca15e99434bb4daebd5a618b8fc927e9ae90b022e64", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (13)", + "layer": "C4_SEMANTIC_ROLES", + "title": "TraceService", + "span_start": 39, + "span_end": 166, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 60, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "c2b2b976d99f2c600000b753731b26e0a69adcb4359398b93073590c5d5d04f4", + "symbol_name": "TraceService", + "qname": "TraceService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 13, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/queue/in_memory.py", + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)", + "layer": "C4_SEMANTIC_ROLES", + "title": "InMemoryTaskQueue", + "span_start": 9, + "span_end": 38, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 22, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "2da04cb94544a3bcbf0943a95ad4bdd8710bcafaa32a02fd0e4de2178dcf3533", + "symbol_name": "InMemoryTaskQueue", + "qname": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 9, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "58f0cc001ccda0eee4c6bc32ed83bd05eafd6b6644f1e8b4aa9eed3103db73dc", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "ConfigFileLoader\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (8)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ConfigFileLoader", + "span_start": 11, + "span_end": 48, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 23, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "a8474eca8b6e9dc86ae67ed68b16fa5fb639ef08739c053e7b7195489765667f", + "symbol_name": "ConfigFileLoader", + "qname": "ConfigFileLoader", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 8, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/store.py", + "content": "TraceContextStore\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "TraceContextStore", + "span_start": 15, + "span_end": 52, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b2dad4fbe16ffb11b58deba311c7739955c39d59f291b22181f33e9c8cce4059", + "symbol_name": "TraceContextStore", + "qname": "TraceContextStore", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "d369554f08fc92039c6edd5a2a1e73b23901533e8974459170bbd9347d263dc5", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workers/supervisor.py", + "content": "WorkerSupervisor\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkerSupervisor", + "span_start": 10, + "span_end": 59, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 25, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "c17b44e8d9e97d490989b21fa67d7c346cdda8a0472e4c41fb243c8846faa124", + "symbol_name": "WorkerSupervisor", + "qname": "WorkerSupervisor", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 6, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "77609d9d5927171cce7fc3a54897c183fd63068710c6362029b700937aae5eee", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.create_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 61, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3b052062067a78aef3302ee1d996897e02a67d1b340397bea4f59fe147c0492a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a", + "dst_ref": "TraceService.create_context", + "resolution": "resolved", + "slice_id": "3b052062067a78aef3302ee1d996897e02a67d1b340397bea4f59fe147c0492a", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.create_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.close_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 84, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "7a9353ef57c9ae5d19b3a0c6ac50fad05e6d21d31bbe1cd1cd07af6332ba6505", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "01e14158dcced7e52d0c8ac84ac7b9a75225c261b6aca6a1d7da802d0994721c", + "dst_ref": "TraceService.close_context", + "resolution": "resolved", + "slice_id": "7a9353ef57c9ae5d19b3a0c6ac50fad05e6d21d31bbe1cd1cd07af6332ba6505", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.close_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "01e14158dcced7e52d0c8ac84ac7b9a75225c261b6aca6a1d7da802d0994721c" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.open_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 78, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a6e13b9ebc4fed84586afd53ed92a4d14757e440873f572b2337d5622ee96031", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426", + "dst_ref": "TraceService.open_context", + "resolution": "resolved", + "slice_id": "a6e13b9ebc4fed84586afd53ed92a4d14757e440873f572b2337d5622ee96031", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.open_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.transport\n -> TraceService.__init__", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 41, + "span_end": 43, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "1e923a93faa05c3c43ca9b19bd047007a8589ccce57d3cc1798ae7f9f200af98", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "dst_ref": "TraceService.__init__", + "resolution": "resolved", + "slice_id": "1e923a93faa05c3c43ca9b19bd047007a8589ccce57d3cc1798ae7f9f200af98", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.transport", + "TraceService.__init__" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.current_trace_id", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 81, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3ea17138634b1190bded77ddb84aa1595124f6519b246f24fc4b02bd62b5cac1", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c", + "dst_ref": "TraceService.current_trace_id", + "resolution": "resolved", + "slice_id": "3ea17138634b1190bded77ddb84aa1595124f6519b246f24fc4b02bd62b5cac1", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.current_trace_id" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.step", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 88, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "9f34c5da9b09fba99df6f6b1bde183a9aeb45111b8218a747c71590c2c9f60f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "c44bfbc66cf747283f30088da3e011a10395031d41e77b74e523c24997f641ca", + "dst_ref": "TraceService.step", + "resolution": "resolved", + "slice_id": "9f34c5da9b09fba99df6f6b1bde183a9aeb45111b8218a747c71590c2c9f60f2", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.step" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "c44bfbc66cf747283f30088da3e011a10395031d41e77b74e523c24997f641ca" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "validation": { + "passed": true, + "action": "return", + "reasons": [] + }, + "steps": [ + { + "step": "router", + "status": "completed", + "timings_ms": { + "router": 0 + }, + "output": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + } + }, + { + "step": "retrieval", + "status": "completed", + "timings_ms": { + "retrieval": 147 + }, + "output": { + "rag_count": 33, + "answer_path_rag_count": 33, + "resolved_symbol_status": "resolved", + "resolved_symbol": "TraceService", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "diagnostics": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "vector", + "C0_SOURCE_CHUNKS": "vector", + "C4_SEMANTIC_ROLES": "vector", + "C2_DEPENDENCY_GRAPH": "vector", + "C3_ENTRYPOINTS": "vector" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [] + } + }, + "fallback": { + "used": false, + "reason": null + }, + "retrieval_by_layer_ms": { + "C1_SYMBOL_CATALOG": 64, + "C0_SOURCE_CHUNKS": 15, + "C4_SEMANTIC_ROLES": 14, + "C2_DEPENDENCY_GRAPH": 43, + "C3_ENTRYPOINTS": 10 + } + } + }, + { + "step": "pre_evidence_gate", + "status": "passed", + "timings_ms": { + "pre_evidence_gate": 0 + }, + "output": { + "passed": true, + "failure_reasons": [], + "degraded_message": "" + } + }, + { + "step": "llm", + "status": "completed", + "timings_ms": { + "llm": 1347 + }, + "output": { + "prompt_name": "code_qa_explain_answer", + "answer_preview": "Класс `TraceService` определяется в файле `src/app_runtime/tracing/service.py`. Он наследует от `TraceContextFactory`.\n\nЕго основные обязанности:\n- Инициализация при создании через параметры `transport` и `store`, с возможностью использования стандартных реализаций (`NoOpTraceTransport` и `TraceCont" + } + }, + { + "step": "post_evidence_gate", + "status": "passed", + "timings_ms": { + "post_evidence_gate": 0, + "repair": 0 + }, + "output": { + "passed": true, + "reasons": [], + "repair_used": false + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-explain-trace-service.md b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-explain-trace-service.md new file mode 100644 index 0000000..f4b5c22 --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-explain-trace-service.md @@ -0,0 +1,247 @@ +# plba-v2-explain-trace-service + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: agent_runtime +- mode: full_chain +- passed: True + +## Query +Объясни как работает класс TraceService + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 33, + "llm_answer": "Класс `TraceService` определяется в файле `src/app_runtime/tracing/service.py`. Он наследует от `TraceContextFactory`.\n\nЕго основные обязанности:\n- Инициализация при создании через параметры `transport` и `store`, с возможностью использования стандартных реализаций (`NoOpTraceTransport` и `TraceContextStore`).\n- Метод `create_context` создаёт новый контекст трассировки с заданными параметрами и записывает его в хранилище.\n- Методы `current_trace_id` и `step` предоставляют доступ к текущему идентификатору трассы и выполняют дополнительные действия.\n\nДетали реализации зависят от конкретных методов, таких как инициализация транспорта и контекста, а также запись записей трассировки в хранилище.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "TraceService" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] +} + +## Steps +[ + { + "step": "router", + "status": "completed", + "timings_ms": { + "router": 0 + }, + "output": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + } + }, + { + "step": "retrieval", + "status": "completed", + "timings_ms": { + "retrieval": 147 + }, + "output": { + "rag_count": 33, + "answer_path_rag_count": 33, + "resolved_symbol_status": "resolved", + "resolved_symbol": "TraceService", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "diagnostics": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "vector", + "C0_SOURCE_CHUNKS": "vector", + "C4_SEMANTIC_ROLES": "vector", + "C2_DEPENDENCY_GRAPH": "vector", + "C3_ENTRYPOINTS": "vector" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C3_ENTRYPOINTS": 6 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [] + } + }, + "fallback": { + "used": false, + "reason": null + }, + "retrieval_by_layer_ms": { + "C1_SYMBOL_CATALOG": 64, + "C0_SOURCE_CHUNKS": 15, + "C4_SEMANTIC_ROLES": 14, + "C2_DEPENDENCY_GRAPH": 43, + "C3_ENTRYPOINTS": 10 + } + } + }, + { + "step": "pre_evidence_gate", + "status": "passed", + "timings_ms": { + "pre_evidence_gate": 0 + }, + "output": { + "passed": true, + "failure_reasons": [], + "degraded_message": "" + } + }, + { + "step": "llm", + "status": "completed", + "timings_ms": { + "llm": 1347 + }, + "output": { + "prompt_name": "code_qa_explain_answer", + "answer_preview": "Класс `TraceService` определяется в файле `src/app_runtime/tracing/service.py`. Он наследует от `TraceContextFactory`.\n\nЕго основные обязанности:\n- Инициализация при создании через параметры `transport` и `store`, с возможностью использования стандартных реализаций (`NoOpTraceTransport` и `TraceCont" + } + }, + { + "step": "post_evidence_gate", + "status": "passed", + "timings_ms": { + "post_evidence_gate": 0, + "repair": 0 + }, + "output": { + "passed": true, + "reasons": [], + "repair_used": false + } + } +] + +## Diagnostics +{ + "intent_correct": null, + "target_found": true, + "layers_used": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_sufficient": true, + "answer_mode": "normal", + "router_result": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "EXPLAIN", + "path_scope": [], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_resolution_status": "resolved" + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Объясни как работает класс TraceService", + "sub_intent": "EXPLAIN", + "path_scope": [], + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C4_SEMANTIC_ROLES", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 6, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C3_ENTRYPOINTS", + "hit_count": 3, + "empty": false, + "fallback_used": false + } + ], + "empty_layers": [], + "evidence_gate_decision": { + "sufficient": true, + "failure_reasons": [], + "evidence_count": 33 + }, + "failure_reasons": [], + "timings_ms": { + "router": 0, + "retrieval": 147, + "pre_evidence_gate": 0, + "llm": 1347 + } +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-control-plane.json b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-control-plane.json new file mode 100644 index 0000000..3a05ed5 --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-control-plane.json @@ -0,0 +1,1402 @@ +{ + "case_id": "plba-v2-find-entrypoints-control-plane", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "agent_runtime", + "mode": "full_chain", + "query": "Найди точки входа HTTP control plane", + "actual": { + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 9, + "llm_answer": "Подтверждённые HTTP route points:\n\n- GET /health (src/app_runtime/control/http_app.py:51)\n- POST (не указан путь, только декорированный метод в src/app_runtime/control/http_app.py:38-42)\n- GET (не указан путь, только декорированный метод в src/app_runtime/control/http_app.py:38-42)\n\nЭти маршруты объявлены непосредственно в src/app_runtime/control/http_app.py.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "HTTP", + "control", + "plane" + ], + "layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "query": "Найди точки входа HTTP control plane", + "router_result": { + "schema_version": "1.1", + "intent": "CODE_QA", + "retrieval_profile": "code", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query_plan": { + "raw": "Найди точки входа HTTP control plane", + "normalized": "Найди точки входа HTTP control plane", + "sub_intent": "FIND_ENTRYPOINTS", + "negations": [], + "expansions": [ + "HTTP", + "control", + "plane" + ], + "keyword_hints": [ + "HTTP", + "control", + "plane" + ], + "path_hints": [], + "doc_scope_hints": [], + "symbol_candidates": [ + "HTTP", + "control", + "plane" + ], + "symbol_kind_hint": "class", + "anchors": [ + { + "type": "SYMBOL", + "value": "HTTP", + "source": "user_text", + "subtype": null, + "span": { + "start": 18, + "end": 22 + }, + "confidence": 0.88 + }, + { + "type": "SYMBOL", + "value": "control", + "source": "user_text", + "subtype": null, + "span": { + "start": 23, + "end": 30 + }, + "confidence": 0.88 + }, + { + "type": "SYMBOL", + "value": "plane", + "source": "user_text", + "subtype": null, + "span": { + "start": 31, + "end": 36 + }, + "confidence": 0.88 + } + ] + }, + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C3_ENTRYPOINTS", + "top_k": 12 + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 6 + } + ], + "filters": { + "test_policy": "EXCLUDE", + "path_scope": [], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + }, + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [], + "confidence": 0.0 + }, + "evidence_policy": { + "require_def": true, + "require_flow": true, + "require_spec": false, + "allow_answer_without_evidence": false + } + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Найди точки входа HTTP control plane", + "sub_intent": "FIND_ENTRYPOINTS", + "path_scope": [], + "keyword_hints": [ + "HTTP", + "control", + "plane" + ], + "symbol_candidates": [ + "HTTP", + "control", + "plane" + ], + "requested_layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ], + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C3_ENTRYPOINTS", + "top_k": 12 + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 6 + } + ], + "filters": { + "test_policy": "EXCLUDE", + "path_scope": [], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + }, + "query_plan": { + "raw": "Найди точки входа HTTP control plane", + "normalized": "Найди точки входа HTTP control plane", + "sub_intent": "FIND_ENTRYPOINTS", + "negations": [], + "expansions": [ + "HTTP", + "control", + "plane" + ], + "keyword_hints": [ + "HTTP", + "control", + "plane" + ], + "path_hints": [], + "doc_scope_hints": [], + "symbol_candidates": [ + "HTTP", + "control", + "plane" + ], + "symbol_kind_hint": "class", + "anchors": [ + { + "type": "SYMBOL", + "value": "HTTP", + "source": "user_text", + "subtype": null, + "span": { + "start": 18, + "end": 22 + }, + "confidence": 0.88 + }, + { + "type": "SYMBOL", + "value": "control", + "source": "user_text", + "subtype": null, + "span": { + "start": 23, + "end": 30 + }, + "confidence": 0.88 + }, + { + "type": "SYMBOL", + "value": "plane", + "source": "user_text", + "subtype": null, + "span": { + "start": 31, + "end": 36 + }, + "confidence": 0.88 + } + ] + } + }, + "retrieval_result": { + "target_symbol_candidates": [], + "resolved_symbol": null, + "symbol_resolution_status": "not_found", + "file_candidates": [ + "src/app_runtime/control/http_app.py", + "src/app_runtime/control/http_channel.py", + "src/app_runtime/control/base.py", + "src/app_runtime/control/__init__.py", + "src/app_runtime/control/http_runner.py" + ], + "code_chunks": [ + { + "layer": "C3_ENTRYPOINTS", + "path": "src/app_runtime/control/http_app.py", + "title": "app.post", + "content": "fastapi http app.post", + "start_line": 38, + "end_line": 42, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C3_ENTRYPOINTS", + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "content": "fastapi http app.get", + "start_line": 31, + "end_line": 34, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C3_ENTRYPOINTS", + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "content": "fastapi http app.get", + "start_line": 38, + "end_line": 42, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/http_channel.py", + "title": "src/app_runtime/control/http_channel.py:HttpControlChannel", + "content": "class HttpControlChannel(ControlChannel):\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._timeout = timeout\n self._runner = UvicornThreadRunner(host, port, timeout)\n self._factory = HttpControlAppFactory()\n self._actions: ControlActionSet | None = None\n\n async def start(self, actions: ControlActionSet) -> None:\n self._actions = actions\n app = self._factory.create(self._health_response, self._action_response)\n await self._runner.start(app)\n\n async def stop(self) -> None:\n await self._runner.stop()\n\n @property\n def port(self) -> int:\n return self._runner.port\n\n async def _health_response(self) -> dict[str, object]:\n if self._actions is None:\n return {\"status\": \"unhealthy\", \"detail\": \"control actions are not configured\"}\n return await asyncio.wait_for(self._actions.health(), timeout=float(self._timeout))\n\n async def _action_response(self, action: str, _client_source: str = \"unknown\") -> JSONResponse:\n if self._actions is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"{action} handler is not configured\"}, status_code=404)\n callbacks = {\n \"start\": self._actions.start,\n \"stop\": self._actions.stop,\n \"status\": self._actions.status,\n }\n callback = callbacks.get(action)\n if callback is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"unsupported action: {action}\"}, status_code=404)\n action_timeout = max(float(self._timeout), 10.0) if action in {\"start\", \"stop\"} else float(self._timeout)\n try:\n detail = await asyncio.wait_for(callback(), timeout=action_timeout)\n except asyncio.TimeoutError:\n return JSONResponse(\n content={\"status\": \"accepted\", \"detail\": f\"{action} operation is still in progress\"},\n status_code=202,\n )\n except Exception as exc:\n return JSONResponse(content={\"status\": \"error\", \"detail\": str(exc)}, status_code=500)\n return JSONResponse(content={\"status\": \"ok\", \"detail\": detail or f\"{action} action accepted\"}, status_code=200)", + "start_line": 12, + "end_line": 57, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/http_app.py", + "title": "src/app_runtime/control/http_app.py:HttpControlAppFactory", + "content": "class HttpControlAppFactory:\n def create(\n self,\n health_provider: Callable[[], Awaitable[HealthPayload]],\n action_provider: Callable[[str, str], Awaitable[JSONResponse]],\n ) -> FastAPI:\n app = FastAPI(title=\"PLBA Control API\")\n\n @app.middleware(\"http\")\n async def log_api_call(request: Request, call_next): # type: ignore[no-untyped-def]\n started = time.monotonic()\n response = await call_next(request)\n response.headers[\"X-Response-Time-Ms\"] = str(int((time.monotonic() - started) * 1000))\n return response\n\n @app.get(\"/health\")\n async def health() -> JSONResponse:\n payload = await health_provider()\n status_code = 200 if payload.get(\"status\") == \"ok\" else 503\n return JSONResponse(content=payload, status_code=status_code)\n\n @app.get(\"/actions/{action}\")\n @app.post(\"/actions/{action}\")\n async def action(action: str, request: Request) -> JSONResponse:\n client_source = self._client_source(request)\n if action in {\"start\", \"stop\"}:\n LOGGER.warning(\"Control action requested: /actions/%s client=%s\", action, client_source)\n return await action_provider(action, client_source)\n\n return app\n\n def _client_source(self, request: Request) -> str:\n explicit_header = request.headers.get(\"X-Client-Source\", \"\").strip()\n if explicit_header:\n return explicit_header\n user_agent = request.headers.get(\"User-Agent\", \"\").strip()\n if user_agent:\n return f\"user-agent:{user_agent}\"\n return \"unknown\"", + "start_line": 15, + "end_line": 53, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/base.py", + "title": "src/app_runtime/control/base.py:ControlActionSet", + "content": "class ControlActionSet:\n health: HealthHandler\n start: ActionHandler\n stop: ActionHandler\n status: ActionHandler", + "start_line": 14, + "end_line": 18, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/__init__.py", + "title": "src/app_runtime/control/__init__.py:1-5", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\"ControlActionSet\", \"ControlChannel\", \"ControlPlaneService\", \"HttpControlChannel\"]", + "start_line": 1, + "end_line": 5, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/base.py", + "title": "src/app_runtime/control/base.py:ControlChannel", + "content": "class ControlChannel(ABC):\n @abstractmethod\n async def start(self, actions: ControlActionSet) -> None:\n \"\"\"Start the control channel and bind handlers.\"\"\"\n\n @abstractmethod\n async def stop(self) -> None:\n \"\"\"Stop the control channel and release resources.\"\"\"", + "start_line": 21, + "end_line": 28, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/http_runner.py", + "title": "src/app_runtime/control/http_runner.py:UvicornThreadRunner", + "content": "class UvicornThreadRunner:\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._host = host\n self._port = port\n self._timeout = timeout\n self._server: Server | None = None\n self._thread: Thread | None = None\n self._error: BaseException | None = None\n\n async def start(self, app: FastAPI) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._error = None\n config = Config(app=app, host=self._host, port=self._port, log_level=\"warning\")\n self._server = Server(config)\n self._thread = Thread(target=self._serve, name=\"plba-http-control\", daemon=True)\n self._thread.start()\n await self._wait_until_started()\n\n async def stop(self) -> None:\n if self._server is None or self._thread is None:\n return\n self._server.should_exit = True\n await asyncio.to_thread(self._thread.join, self._timeout)\n self._server = None\n self._thread = None\n\n @property\n def port(self) -> int:\n if self._server is None or not getattr(self._server, \"servers\", None):\n return self._port\n socket = self._server.servers[0].sockets[0]\n return int(socket.getsockname()[1])\n\n async def _wait_until_started(self) -> None:\n if self._server is None:\n raise RuntimeError(\"Server is not initialized\")\n deadline = asyncio.get_running_loop().time() + max(float(self._timeout), 1.0)\n while not self._server.started:\n if self._error is not None:\n raise RuntimeError(\"HTTP control server failed to start\") from self._error\n if asyncio.get_running_loop().time() >= deadline:\n raise TimeoutError(\"HTTP control server startup timed out\")\n await asyncio.sleep(0.05)\n\n def _serve(self) -> None:\n if self._server is None:\n return\n try:\n asyncio.run(self._server.serve())\n except BaseException as exc: # noqa: BLE001\n self._error = exc", + "start_line": 10, + "end_line": 61, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_runner", + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "relations": [], + "entrypoints": [ + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.post", + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "test_candidates": [], + "layer_outcomes": [ + { + "layer_id": "C3_ENTRYPOINTS", + "hit_count": 3, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 6, + "empty": false, + "fallback_used": false + } + ], + "missing_layers": [], + "raw_rows": [ + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": null, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": null, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": null, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel(ControlChannel):\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._timeout = timeout\n self._runner = UvicornThreadRunner(host, port, timeout)\n self._factory = HttpControlAppFactory()\n self._actions: ControlActionSet | None = None\n\n async def start(self, actions: ControlActionSet) -> None:\n self._actions = actions\n app = self._factory.create(self._health_response, self._action_response)\n await self._runner.start(app)\n\n async def stop(self) -> None:\n await self._runner.stop()\n\n @property\n def port(self) -> int:\n return self._runner.port\n\n async def _health_response(self) -> dict[str, object]:\n if self._actions is None:\n return {\"status\": \"unhealthy\", \"detail\": \"control actions are not configured\"}\n return await asyncio.wait_for(self._actions.health(), timeout=float(self._timeout))\n\n async def _action_response(self, action: str, _client_source: str = \"unknown\") -> JSONResponse:\n if self._actions is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"{action} handler is not configured\"}, status_code=404)\n callbacks = {\n \"start\": self._actions.start,\n \"stop\": self._actions.stop,\n \"status\": self._actions.status,\n }\n callback = callbacks.get(action)\n if callback is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"unsupported action: {action}\"}, status_code=404)\n action_timeout = max(float(self._timeout), 10.0) if action in {\"start\", \"stop\"} else float(self._timeout)\n try:\n detail = await asyncio.wait_for(callback(), timeout=action_timeout)\n except asyncio.TimeoutError:\n return JSONResponse(\n content={\"status\": \"accepted\", \"detail\": f\"{action} operation is still in progress\"},\n status_code=202,\n )\n except Exception as exc:\n return JSONResponse(content={\"status\": \"error\", \"detail\": str(exc)}, status_code=500)\n return JSONResponse(content={\"status\": \"ok\", \"detail\": detail or f\"{action} action accepted\"}, status_code=200)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_channel.py:HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "class HttpControlAppFactory:\n def create(\n self,\n health_provider: Callable[[], Awaitable[HealthPayload]],\n action_provider: Callable[[str, str], Awaitable[JSONResponse]],\n ) -> FastAPI:\n app = FastAPI(title=\"PLBA Control API\")\n\n @app.middleware(\"http\")\n async def log_api_call(request: Request, call_next): # type: ignore[no-untyped-def]\n started = time.monotonic()\n response = await call_next(request)\n response.headers[\"X-Response-Time-Ms\"] = str(int((time.monotonic() - started) * 1000))\n return response\n\n @app.get(\"/health\")\n async def health() -> JSONResponse:\n payload = await health_provider()\n status_code = 200 if payload.get(\"status\") == \"ok\" else 503\n return JSONResponse(content=payload, status_code=status_code)\n\n @app.get(\"/actions/{action}\")\n @app.post(\"/actions/{action}\")\n async def action(action: str, request: Request) -> JSONResponse:\n client_source = self._client_source(request)\n if action in {\"start\", \"stop\"}:\n LOGGER.warning(\"Control action requested: /actions/%s client=%s\", action, client_source)\n return await action_provider(action, client_source)\n\n return app\n\n def _client_source(self, request: Request) -> str:\n explicit_header = request.headers.get(\"X-Client-Source\", \"\").strip()\n if explicit_header:\n return explicit_header\n user_agent = request.headers.get(\"User-Agent\", \"\").strip()\n if user_agent:\n return f\"user-agent:{user_agent}\"\n return \"unknown\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_app.py:HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlActionSet:\n health: HealthHandler\n start: ActionHandler\n stop: ActionHandler\n status: ActionHandler", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\"ControlActionSet\", \"ControlChannel\", \"ControlPlaneService\", \"HttpControlChannel\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/__init__.py:1-5", + "span_start": 1, + "span_end": 5, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlChannel(ABC):\n @abstractmethod\n async def start(self, actions: ControlActionSet) -> None:\n \"\"\"Start the control channel and bind handlers.\"\"\"\n\n @abstractmethod\n async def stop(self) -> None:\n \"\"\"Stop the control channel and release resources.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "class UvicornThreadRunner:\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._host = host\n self._port = port\n self._timeout = timeout\n self._server: Server | None = None\n self._thread: Thread | None = None\n self._error: BaseException | None = None\n\n async def start(self, app: FastAPI) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._error = None\n config = Config(app=app, host=self._host, port=self._port, log_level=\"warning\")\n self._server = Server(config)\n self._thread = Thread(target=self._serve, name=\"plba-http-control\", daemon=True)\n self._thread.start()\n await self._wait_until_started()\n\n async def stop(self) -> None:\n if self._server is None or self._thread is None:\n return\n self._server.should_exit = True\n await asyncio.to_thread(self._thread.join, self._timeout)\n self._server = None\n self._thread = None\n\n @property\n def port(self) -> int:\n if self._server is None or not getattr(self._server, \"servers\", None):\n return self._port\n socket = self._server.servers[0].sockets[0]\n return int(socket.getsockname()[1])\n\n async def _wait_until_started(self) -> None:\n if self._server is None:\n raise RuntimeError(\"Server is not initialized\")\n deadline = asyncio.get_running_loop().time() + max(float(self._timeout), 1.0)\n while not self._server.started:\n if self._error is not None:\n raise RuntimeError(\"HTTP control server failed to start\") from self._error\n if asyncio.get_running_loop().time() >= deadline:\n raise TimeoutError(\"HTTP control server startup timed out\")\n await asyncio.sleep(0.05)\n\n def _serve(self) -> None:\n if self._server is None:\n return\n try:\n asyncio.run(self._server.serve())\n except BaseException as exc: # noqa: BLE001\n self._error = exc", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_runner.py:UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_runner", + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "retrieval_report": { + "executed_layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C3_ENTRYPOINTS": "vector", + "C0_SOURCE_CHUNKS": "vector" + }, + "top_k_by_layer": { + "C3_ENTRYPOINTS": 12, + "C0_SOURCE_CHUNKS": 6 + }, + "filters_by_layer": { + "C3_ENTRYPOINTS": { + "path_scope": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [] + } + }, + "fallback": { + "used": false, + "reason": null + }, + "retrieval_by_layer_ms": { + "C3_ENTRYPOINTS": 12, + "C0_SOURCE_CHUNKS": 16 + } + } + }, + "diagnostics": { + "intent_correct": null, + "target_found": true, + "layers_used": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ], + "retrieval_sufficient": true, + "answer_mode": "normal", + "router_result": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "FIND_ENTRYPOINTS", + "path_scope": [], + "layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ], + "symbol_resolution_status": "not_found" + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Найди точки входа HTTP control plane", + "sub_intent": "FIND_ENTRYPOINTS", + "path_scope": [], + "requested_layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "C3_ENTRYPOINTS", + "hit_count": 3, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 6, + "empty": false, + "fallback_used": false + } + ], + "empty_layers": [], + "evidence_gate_decision": { + "sufficient": true, + "failure_reasons": [], + "evidence_count": 9 + }, + "failure_reasons": [], + "timings_ms": { + "router": 0, + "retrieval": 29, + "pre_evidence_gate": 0, + "llm": 853 + } + }, + "rag_rows": [ + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel(ControlChannel):\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._timeout = timeout\n self._runner = UvicornThreadRunner(host, port, timeout)\n self._factory = HttpControlAppFactory()\n self._actions: ControlActionSet | None = None\n\n async def start(self, actions: ControlActionSet) -> None:\n self._actions = actions\n app = self._factory.create(self._health_response, self._action_response)\n await self._runner.start(app)\n\n async def stop(self) -> None:\n await self._runner.stop()\n\n @property\n def port(self) -> int:\n return self._runner.port\n\n async def _health_response(self) -> dict[str, object]:\n if self._actions is None:\n return {\"status\": \"unhealthy\", \"detail\": \"control actions are not configured\"}\n return await asyncio.wait_for(self._actions.health(), timeout=float(self._timeout))\n\n async def _action_response(self, action: str, _client_source: str = \"unknown\") -> JSONResponse:\n if self._actions is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"{action} handler is not configured\"}, status_code=404)\n callbacks = {\n \"start\": self._actions.start,\n \"stop\": self._actions.stop,\n \"status\": self._actions.status,\n }\n callback = callbacks.get(action)\n if callback is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"unsupported action: {action}\"}, status_code=404)\n action_timeout = max(float(self._timeout), 10.0) if action in {\"start\", \"stop\"} else float(self._timeout)\n try:\n detail = await asyncio.wait_for(callback(), timeout=action_timeout)\n except asyncio.TimeoutError:\n return JSONResponse(\n content={\"status\": \"accepted\", \"detail\": f\"{action} operation is still in progress\"},\n status_code=202,\n )\n except Exception as exc:\n return JSONResponse(content={\"status\": \"error\", \"detail\": str(exc)}, status_code=500)\n return JSONResponse(content={\"status\": \"ok\", \"detail\": detail or f\"{action} action accepted\"}, status_code=200)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_channel.py:HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "class HttpControlAppFactory:\n def create(\n self,\n health_provider: Callable[[], Awaitable[HealthPayload]],\n action_provider: Callable[[str, str], Awaitable[JSONResponse]],\n ) -> FastAPI:\n app = FastAPI(title=\"PLBA Control API\")\n\n @app.middleware(\"http\")\n async def log_api_call(request: Request, call_next): # type: ignore[no-untyped-def]\n started = time.monotonic()\n response = await call_next(request)\n response.headers[\"X-Response-Time-Ms\"] = str(int((time.monotonic() - started) * 1000))\n return response\n\n @app.get(\"/health\")\n async def health() -> JSONResponse:\n payload = await health_provider()\n status_code = 200 if payload.get(\"status\") == \"ok\" else 503\n return JSONResponse(content=payload, status_code=status_code)\n\n @app.get(\"/actions/{action}\")\n @app.post(\"/actions/{action}\")\n async def action(action: str, request: Request) -> JSONResponse:\n client_source = self._client_source(request)\n if action in {\"start\", \"stop\"}:\n LOGGER.warning(\"Control action requested: /actions/%s client=%s\", action, client_source)\n return await action_provider(action, client_source)\n\n return app\n\n def _client_source(self, request: Request) -> str:\n explicit_header = request.headers.get(\"X-Client-Source\", \"\").strip()\n if explicit_header:\n return explicit_header\n user_agent = request.headers.get(\"User-Agent\", \"\").strip()\n if user_agent:\n return f\"user-agent:{user_agent}\"\n return \"unknown\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_app.py:HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlActionSet:\n health: HealthHandler\n start: ActionHandler\n stop: ActionHandler\n status: ActionHandler", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\"ControlActionSet\", \"ControlChannel\", \"ControlPlaneService\", \"HttpControlChannel\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/__init__.py:1-5", + "span_start": 1, + "span_end": 5, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlChannel(ABC):\n @abstractmethod\n async def start(self, actions: ControlActionSet) -> None:\n \"\"\"Start the control channel and bind handlers.\"\"\"\n\n @abstractmethod\n async def stop(self) -> None:\n \"\"\"Stop the control channel and release resources.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "class UvicornThreadRunner:\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._host = host\n self._port = port\n self._timeout = timeout\n self._server: Server | None = None\n self._thread: Thread | None = None\n self._error: BaseException | None = None\n\n async def start(self, app: FastAPI) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._error = None\n config = Config(app=app, host=self._host, port=self._port, log_level=\"warning\")\n self._server = Server(config)\n self._thread = Thread(target=self._serve, name=\"plba-http-control\", daemon=True)\n self._thread.start()\n await self._wait_until_started()\n\n async def stop(self) -> None:\n if self._server is None or self._thread is None:\n return\n self._server.should_exit = True\n await asyncio.to_thread(self._thread.join, self._timeout)\n self._server = None\n self._thread = None\n\n @property\n def port(self) -> int:\n if self._server is None or not getattr(self._server, \"servers\", None):\n return self._port\n socket = self._server.servers[0].sockets[0]\n return int(socket.getsockname()[1])\n\n async def _wait_until_started(self) -> None:\n if self._server is None:\n raise RuntimeError(\"Server is not initialized\")\n deadline = asyncio.get_running_loop().time() + max(float(self._timeout), 1.0)\n while not self._server.started:\n if self._error is not None:\n raise RuntimeError(\"HTTP control server failed to start\") from self._error\n if asyncio.get_running_loop().time() >= deadline:\n raise TimeoutError(\"HTTP control server startup timed out\")\n await asyncio.sleep(0.05)\n\n def _serve(self) -> None:\n if self._server is None:\n return\n try:\n asyncio.run(self._server.serve())\n except BaseException as exc: # noqa: BLE001\n self._error = exc", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_runner.py:UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_runner", + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "validation": { + "passed": true, + "action": "return", + "reasons": [] + }, + "steps": [ + { + "step": "router", + "status": "completed", + "timings_ms": { + "router": 0 + }, + "output": { + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + } + }, + { + "step": "retrieval", + "status": "completed", + "timings_ms": { + "retrieval": 29 + }, + "output": { + "rag_count": 9, + "answer_path_rag_count": 9, + "resolved_symbol_status": "not_found", + "resolved_symbol": null, + "requested_layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ] + }, + "diagnostics": { + "executed_layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C3_ENTRYPOINTS": "vector", + "C0_SOURCE_CHUNKS": "vector" + }, + "top_k_by_layer": { + "C3_ENTRYPOINTS": 12, + "C0_SOURCE_CHUNKS": 6 + }, + "filters_by_layer": { + "C3_ENTRYPOINTS": { + "path_scope": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [] + } + }, + "fallback": { + "used": false, + "reason": null + }, + "retrieval_by_layer_ms": { + "C3_ENTRYPOINTS": 12, + "C0_SOURCE_CHUNKS": 16 + } + } + }, + { + "step": "pre_evidence_gate", + "status": "passed", + "timings_ms": { + "pre_evidence_gate": 0 + }, + "output": { + "passed": true, + "failure_reasons": [], + "degraded_message": "" + } + }, + { + "step": "llm", + "status": "completed", + "timings_ms": { + "llm": 853 + }, + "output": { + "prompt_name": "code_qa_find_entrypoints_answer", + "answer_preview": "Подтверждённые HTTP route points:\n\n- GET /health (src/app_runtime/control/http_app.py:51)\n- POST (не указан путь, только декорированный метод в src/app_runtime/control/http_app.py:38-42)\n- GET (не указан путь, только декорированный метод в src/app_runtime/control/http_app.py:38-42)\n\nЭти маршруты объ" + } + }, + { + "step": "post_evidence_gate", + "status": "passed", + "timings_ms": { + "post_evidence_gate": 0, + "repair": 0 + }, + "output": { + "passed": true, + "reasons": [], + "repair_used": false + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-control-plane.md b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-control-plane.md new file mode 100644 index 0000000..ace2a74 --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-control-plane.md @@ -0,0 +1,195 @@ +# plba-v2-find-entrypoints-control-plane + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: agent_runtime +- mode: full_chain +- passed: True + +## Query +Найди точки входа HTTP control plane + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 9, + "llm_answer": "Подтверждённые HTTP route points:\n\n- GET /health (src/app_runtime/control/http_app.py:51)\n- POST (не указан путь, только декорированный метод в src/app_runtime/control/http_app.py:38-42)\n- GET (не указан путь, только декорированный метод в src/app_runtime/control/http_app.py:38-42)\n\nЭти маршруты объявлены непосредственно в src/app_runtime/control/http_app.py.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "HTTP", + "control", + "plane" + ], + "layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ] +} + +## Steps +[ + { + "step": "router", + "status": "completed", + "timings_ms": { + "router": 0 + }, + "output": { + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + } + }, + { + "step": "retrieval", + "status": "completed", + "timings_ms": { + "retrieval": 29 + }, + "output": { + "rag_count": 9, + "answer_path_rag_count": 9, + "resolved_symbol_status": "not_found", + "resolved_symbol": null, + "requested_layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ] + }, + "diagnostics": { + "executed_layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C3_ENTRYPOINTS": "vector", + "C0_SOURCE_CHUNKS": "vector" + }, + "top_k_by_layer": { + "C3_ENTRYPOINTS": 12, + "C0_SOURCE_CHUNKS": 6 + }, + "filters_by_layer": { + "C3_ENTRYPOINTS": { + "path_scope": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [] + } + }, + "fallback": { + "used": false, + "reason": null + }, + "retrieval_by_layer_ms": { + "C3_ENTRYPOINTS": 12, + "C0_SOURCE_CHUNKS": 16 + } + } + }, + { + "step": "pre_evidence_gate", + "status": "passed", + "timings_ms": { + "pre_evidence_gate": 0 + }, + "output": { + "passed": true, + "failure_reasons": [], + "degraded_message": "" + } + }, + { + "step": "llm", + "status": "completed", + "timings_ms": { + "llm": 853 + }, + "output": { + "prompt_name": "code_qa_find_entrypoints_answer", + "answer_preview": "Подтверждённые HTTP route points:\n\n- GET /health (src/app_runtime/control/http_app.py:51)\n- POST (не указан путь, только декорированный метод в src/app_runtime/control/http_app.py:38-42)\n- GET (не указан путь, только декорированный метод в src/app_runtime/control/http_app.py:38-42)\n\nЭти маршруты объ" + } + }, + { + "step": "post_evidence_gate", + "status": "passed", + "timings_ms": { + "post_evidence_gate": 0, + "repair": 0 + }, + "output": { + "passed": true, + "reasons": [], + "repair_used": false + } + } +] + +## Diagnostics +{ + "intent_correct": null, + "target_found": true, + "layers_used": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ], + "retrieval_sufficient": true, + "answer_mode": "normal", + "router_result": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "FIND_ENTRYPOINTS", + "path_scope": [], + "layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ], + "symbol_resolution_status": "not_found" + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Найди точки входа HTTP control plane", + "sub_intent": "FIND_ENTRYPOINTS", + "path_scope": [], + "requested_layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "C3_ENTRYPOINTS", + "hit_count": 3, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 6, + "empty": false, + "fallback_used": false + } + ], + "empty_layers": [], + "evidence_gate_decision": { + "sufficient": true, + "failure_reasons": [], + "evidence_count": 9 + }, + "failure_reasons": [], + "timings_ms": { + "router": 0, + "retrieval": 29, + "pre_evidence_gate": 0, + "llm": 853 + } +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-health-endpoint.json b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-health-endpoint.json new file mode 100644 index 0000000..0c1fe54 --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-health-endpoint.json @@ -0,0 +1,1374 @@ +{ + "case_id": "plba-v2-find-entrypoints-health-endpoint", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "agent_runtime", + "mode": "full_chain", + "query": "Где health endpoint?", + "actual": { + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 9, + "llm_answer": "Конкретных health-endpoint'ов, объявленных как routes, не найдено.\n\nОднако, исходя из предоставленного кода:\n- В `http_app.py` есть две явные декларации маршрутов с использованием декоратора `app.get`, но neither из них явно помечен как health-check (метод и путь не указаны).\n- Есть декларация `app.post`, но она также не маркируется как health-related.\n\nТаким образом, хотя health-checking инфраструктура существует (через класс `HealthRegistry`), конкретный health-endpoint не обнаружен среди зарегистрированных маршрутов.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "health", + "endpoint" + ], + "layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ] + }, + "passed": false, + "mismatches": [ + "llm: expected answer to contain 'GET /health'" + ], + "details": { + "query": "Где health endpoint?", + "router_result": { + "schema_version": "1.1", + "intent": "CODE_QA", + "retrieval_profile": "code", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query_plan": { + "raw": "Где health endpoint?", + "normalized": "Где health endpoint?", + "sub_intent": "FIND_ENTRYPOINTS", + "negations": [], + "expansions": [ + "health", + "endpoint" + ], + "keyword_hints": [ + "health", + "endpoint" + ], + "path_hints": [], + "doc_scope_hints": [], + "symbol_candidates": [ + "health", + "endpoint" + ], + "symbol_kind_hint": "unknown", + "anchors": [ + { + "type": "SYMBOL", + "value": "health", + "source": "user_text", + "subtype": null, + "span": { + "start": 4, + "end": 10 + }, + "confidence": 0.88 + }, + { + "type": "SYMBOL", + "value": "endpoint", + "source": "user_text", + "subtype": null, + "span": { + "start": 11, + "end": 19 + }, + "confidence": 0.88 + } + ] + }, + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C3_ENTRYPOINTS", + "top_k": 12 + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 6 + } + ], + "filters": { + "test_policy": "EXCLUDE", + "path_scope": [], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + }, + "symbol_resolution": { + "status": "not_found", + "resolved_symbol": null, + "alternatives": [], + "confidence": 0.0 + }, + "evidence_policy": { + "require_def": true, + "require_flow": true, + "require_spec": false, + "allow_answer_without_evidence": false + } + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Где health endpoint?", + "sub_intent": "FIND_ENTRYPOINTS", + "path_scope": [], + "keyword_hints": [ + "health", + "endpoint" + ], + "symbol_candidates": [ + "health", + "endpoint" + ], + "requested_layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ], + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C3_ENTRYPOINTS", + "top_k": 12 + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 6 + } + ], + "filters": { + "test_policy": "EXCLUDE", + "path_scope": [], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + }, + "query_plan": { + "raw": "Где health endpoint?", + "normalized": "Где health endpoint?", + "sub_intent": "FIND_ENTRYPOINTS", + "negations": [], + "expansions": [ + "health", + "endpoint" + ], + "keyword_hints": [ + "health", + "endpoint" + ], + "path_hints": [], + "doc_scope_hints": [], + "symbol_candidates": [ + "health", + "endpoint" + ], + "symbol_kind_hint": "unknown", + "anchors": [ + { + "type": "SYMBOL", + "value": "health", + "source": "user_text", + "subtype": null, + "span": { + "start": 4, + "end": 10 + }, + "confidence": 0.88 + }, + { + "type": "SYMBOL", + "value": "endpoint", + "source": "user_text", + "subtype": null, + "span": { + "start": 11, + "end": 19 + }, + "confidence": 0.88 + } + ] + } + }, + "retrieval_result": { + "target_symbol_candidates": [], + "resolved_symbol": null, + "symbol_resolution_status": "not_found", + "file_candidates": [ + "src/app_runtime/control/http_app.py", + "src/app_runtime/health/registry.py", + "src/plba/health.py", + "src/app_runtime/contracts/health.py", + "src/app_runtime/health/__init__.py", + "src/app_runtime/contracts/worker.py" + ], + "code_chunks": [ + { + "layer": "C3_ENTRYPOINTS", + "path": "src/app_runtime/control/http_app.py", + "title": "app.post", + "content": "fastapi http app.post", + "start_line": 38, + "end_line": 42, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C3_ENTRYPOINTS", + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "content": "fastapi http app.get", + "start_line": 31, + "end_line": 34, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C3_ENTRYPOINTS", + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "content": "fastapi http app.get", + "start_line": 38, + "end_line": 42, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/health/registry.py", + "title": "src/app_runtime/health/registry.py:HealthRegistry", + "content": "class HealthRegistry:\n def __init__(self) -> None:\n self._contributors: list[HealthContributor] = []\n\n def register(self, contributor: HealthContributor) -> None:\n self._contributors.append(contributor)\n\n def contributor_healths(self) -> list[WorkerHealth]:\n return [contributor.health() for contributor in self._contributors]\n\n def snapshot(self, worker_healths: list[WorkerHealth]) -> dict[str, object]:\n component_healths = worker_healths + self.contributor_healths()\n return {\n \"status\": self._aggregate_status(component_healths),\n \"components\": [self._health_dict(item) for item in component_healths],\n }\n\n def payload(self, state: LifecycleState, worker_healths: list[WorkerHealth]) -> HealthPayload:\n component_healths = worker_healths + self.contributor_healths()\n if state == LifecycleState.STOPPED:\n return {\"status\": \"unhealthy\", \"detail\": \"state=stopped\", \"state\": state.value}\n if state in {LifecycleState.STARTING, LifecycleState.STOPPING}:\n return {\n \"status\": \"degraded\",\n \"detail\": f\"state={state.value}\",\n \"state\": state.value,\n \"components\": [self._health_dict(item) for item in component_healths],\n }\n return {\n \"status\": self._aggregate_status(component_healths),\n \"state\": state.value,\n \"components\": [self._health_dict(item) for item in component_healths],\n }\n\n def _aggregate_status(self, component_healths: list[WorkerHealth]) -> str:\n if any(item.status == \"unhealthy\" and item.critical for item in component_healths):\n return \"unhealthy\"\n if any(item.status in {\"degraded\", \"unhealthy\"} for item in component_healths):\n return \"degraded\"\n return \"ok\"\n\n def _health_dict(self, health: WorkerHealth) -> dict[str, object]:\n return {\n \"name\": health.name,\n \"status\": health.status,\n \"critical\": health.critical,\n \"detail\": health.detail,\n \"meta\": health.meta,\n }", + "start_line": 8, + "end_line": 56, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.health.registry", + "is_test": false, + "blob_sha": "26e6a24daa43407ba5340b74497c20153020e79f8d7828ae502aaec378dfcf75", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/plba/health.py", + "title": "src/app_runtime/health/__init__.py:1-3", + "content": "from app_runtime.health.registry import HealthRegistry\n\n__all__ = [\"HealthRegistry\"]", + "start_line": 1, + "end_line": 3, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.health.__init__", + "is_test": false, + "blob_sha": "f7b15eed8b1f1cca8dfd467909a2612d8cb4e66e46b972ad89a0c9459ce283a0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/contracts/health.py", + "title": "src/app_runtime/contracts/health.py:HealthContributor", + "content": "class HealthContributor(ABC):\n @abstractmethod\n def health(self) -> WorkerHealth:\n \"\"\"Return contributor health state.\"\"\"", + "start_line": 7, + "end_line": 10, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.health", + "is_test": false, + "blob_sha": "6bd92611def7131e32d4dd34a8ed85e6cf3c67722ad27797032a632cb30dc097", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/health/__init__.py", + "title": "src/app_runtime/health/__init__.py:1-3", + "content": "from app_runtime.health.registry import HealthRegistry\n\n__all__ = [\"HealthRegistry\"]", + "start_line": 1, + "end_line": 3, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.health.__init__", + "is_test": false, + "blob_sha": "f7b15eed8b1f1cca8dfd467909a2612d8cb4e66e46b972ad89a0c9459ce283a0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/contracts/worker.py", + "title": "src/app_runtime/contracts/worker.py:WorkerHealth", + "content": "class WorkerHealth:\n name: str\n status: HealthState\n critical: bool\n detail: str | None = None\n meta: dict[str, Any] = field(default_factory=dict)", + "start_line": 13, + "end_line": 18, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.worker", + "is_test": false, + "blob_sha": "e4827d32220f322d8adc3e42769da3ca0cc680db6a5eab7a11f4d8773a75304e", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/contracts/worker.py", + "title": "src/app_runtime/contracts/worker.py:Worker", + "content": "class Worker(ABC):\n @property\n @abstractmethod\n def name(self) -> str:\n \"\"\"Stable worker name for diagnostics.\"\"\"\n\n @property\n @abstractmethod\n def critical(self) -> bool:\n \"\"\"Whether this worker is required for healthy app operation.\"\"\"\n\n @abstractmethod\n def start(self) -> None:\n \"\"\"Start worker execution.\"\"\"\n\n @abstractmethod\n def stop(self, force: bool = False) -> None:\n \"\"\"Request graceful or immediate stop.\"\"\"\n\n @abstractmethod\n def health(self) -> WorkerHealth:\n \"\"\"Return current health state.\"\"\"\n\n @abstractmethod\n def status(self) -> WorkerStatus:\n \"\"\"Return current runtime status.\"\"\"", + "start_line": 30, + "end_line": 55, + "metadata": { + "chunk_index": 2, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.worker", + "is_test": false, + "blob_sha": "e4827d32220f322d8adc3e42769da3ca0cc680db6a5eab7a11f4d8773a75304e", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "relations": [], + "entrypoints": [ + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.post", + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "test_candidates": [], + "layer_outcomes": [ + { + "layer_id": "C3_ENTRYPOINTS", + "hit_count": 3, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 6, + "empty": false, + "fallback_used": false + } + ], + "missing_layers": [], + "raw_rows": [ + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": null, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": null, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": null, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/health/registry.py", + "content": "class HealthRegistry:\n def __init__(self) -> None:\n self._contributors: list[HealthContributor] = []\n\n def register(self, contributor: HealthContributor) -> None:\n self._contributors.append(contributor)\n\n def contributor_healths(self) -> list[WorkerHealth]:\n return [contributor.health() for contributor in self._contributors]\n\n def snapshot(self, worker_healths: list[WorkerHealth]) -> dict[str, object]:\n component_healths = worker_healths + self.contributor_healths()\n return {\n \"status\": self._aggregate_status(component_healths),\n \"components\": [self._health_dict(item) for item in component_healths],\n }\n\n def payload(self, state: LifecycleState, worker_healths: list[WorkerHealth]) -> HealthPayload:\n component_healths = worker_healths + self.contributor_healths()\n if state == LifecycleState.STOPPED:\n return {\"status\": \"unhealthy\", \"detail\": \"state=stopped\", \"state\": state.value}\n if state in {LifecycleState.STARTING, LifecycleState.STOPPING}:\n return {\n \"status\": \"degraded\",\n \"detail\": f\"state={state.value}\",\n \"state\": state.value,\n \"components\": [self._health_dict(item) for item in component_healths],\n }\n return {\n \"status\": self._aggregate_status(component_healths),\n \"state\": state.value,\n \"components\": [self._health_dict(item) for item in component_healths],\n }\n\n def _aggregate_status(self, component_healths: list[WorkerHealth]) -> str:\n if any(item.status == \"unhealthy\" and item.critical for item in component_healths):\n return \"unhealthy\"\n if any(item.status in {\"degraded\", \"unhealthy\"} for item in component_healths):\n return \"degraded\"\n return \"ok\"\n\n def _health_dict(self, health: WorkerHealth) -> dict[str, object]:\n return {\n \"name\": health.name,\n \"status\": health.status,\n \"critical\": health.critical,\n \"detail\": health.detail,\n \"meta\": health.meta,\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/health/registry.py:HealthRegistry", + "span_start": 8, + "span_end": 56, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.health.registry", + "is_test": false, + "blob_sha": "26e6a24daa43407ba5340b74497c20153020e79f8d7828ae502aaec378dfcf75", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/health.py", + "content": "from app_runtime.health.registry import HealthRegistry\n\n__all__ = [\"HealthRegistry\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/health/__init__.py:1-3", + "span_start": 1, + "span_end": 3, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.health.__init__", + "is_test": false, + "blob_sha": "f7b15eed8b1f1cca8dfd467909a2612d8cb4e66e46b972ad89a0c9459ce283a0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/health.py", + "content": "class HealthContributor(ABC):\n @abstractmethod\n def health(self) -> WorkerHealth:\n \"\"\"Return contributor health state.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/contracts/health.py:HealthContributor", + "span_start": 7, + "span_end": 10, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.health", + "is_test": false, + "blob_sha": "6bd92611def7131e32d4dd34a8ed85e6cf3c67722ad27797032a632cb30dc097", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/health/__init__.py", + "content": "from app_runtime.health.registry import HealthRegistry\n\n__all__ = [\"HealthRegistry\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/health/__init__.py:1-3", + "span_start": 1, + "span_end": 3, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.health.__init__", + "is_test": false, + "blob_sha": "f7b15eed8b1f1cca8dfd467909a2612d8cb4e66e46b972ad89a0c9459ce283a0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/worker.py", + "content": "class WorkerHealth:\n name: str\n status: HealthState\n critical: bool\n detail: str | None = None\n meta: dict[str, Any] = field(default_factory=dict)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/contracts/worker.py:WorkerHealth", + "span_start": 13, + "span_end": 18, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.worker", + "is_test": false, + "blob_sha": "e4827d32220f322d8adc3e42769da3ca0cc680db6a5eab7a11f4d8773a75304e", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/worker.py", + "content": "class Worker(ABC):\n @property\n @abstractmethod\n def name(self) -> str:\n \"\"\"Stable worker name for diagnostics.\"\"\"\n\n @property\n @abstractmethod\n def critical(self) -> bool:\n \"\"\"Whether this worker is required for healthy app operation.\"\"\"\n\n @abstractmethod\n def start(self) -> None:\n \"\"\"Start worker execution.\"\"\"\n\n @abstractmethod\n def stop(self, force: bool = False) -> None:\n \"\"\"Request graceful or immediate stop.\"\"\"\n\n @abstractmethod\n def health(self) -> WorkerHealth:\n \"\"\"Return current health state.\"\"\"\n\n @abstractmethod\n def status(self) -> WorkerStatus:\n \"\"\"Return current runtime status.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/contracts/worker.py:Worker", + "span_start": 30, + "span_end": 55, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 2, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.worker", + "is_test": false, + "blob_sha": "e4827d32220f322d8adc3e42769da3ca0cc680db6a5eab7a11f4d8773a75304e", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "retrieval_report": { + "executed_layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C3_ENTRYPOINTS": "vector", + "C0_SOURCE_CHUNKS": "vector" + }, + "top_k_by_layer": { + "C3_ENTRYPOINTS": 12, + "C0_SOURCE_CHUNKS": 6 + }, + "filters_by_layer": { + "C3_ENTRYPOINTS": { + "path_scope": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [] + } + }, + "fallback": { + "used": false, + "reason": null + }, + "retrieval_by_layer_ms": { + "C3_ENTRYPOINTS": 28, + "C0_SOURCE_CHUNKS": 18 + } + } + }, + "diagnostics": { + "intent_correct": null, + "target_found": true, + "layers_used": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ], + "retrieval_sufficient": true, + "answer_mode": "normal", + "router_result": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "FIND_ENTRYPOINTS", + "path_scope": [], + "layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ], + "symbol_resolution_status": "not_found" + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Где health endpoint?", + "sub_intent": "FIND_ENTRYPOINTS", + "path_scope": [], + "requested_layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "C3_ENTRYPOINTS", + "hit_count": 3, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 6, + "empty": false, + "fallback_used": false + } + ], + "empty_layers": [], + "evidence_gate_decision": { + "sufficient": true, + "failure_reasons": [], + "evidence_count": 9 + }, + "failure_reasons": [], + "timings_ms": { + "router": 0, + "retrieval": 46, + "pre_evidence_gate": 0, + "llm": 1055 + } + }, + "rag_rows": [ + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/health/registry.py", + "content": "class HealthRegistry:\n def __init__(self) -> None:\n self._contributors: list[HealthContributor] = []\n\n def register(self, contributor: HealthContributor) -> None:\n self._contributors.append(contributor)\n\n def contributor_healths(self) -> list[WorkerHealth]:\n return [contributor.health() for contributor in self._contributors]\n\n def snapshot(self, worker_healths: list[WorkerHealth]) -> dict[str, object]:\n component_healths = worker_healths + self.contributor_healths()\n return {\n \"status\": self._aggregate_status(component_healths),\n \"components\": [self._health_dict(item) for item in component_healths],\n }\n\n def payload(self, state: LifecycleState, worker_healths: list[WorkerHealth]) -> HealthPayload:\n component_healths = worker_healths + self.contributor_healths()\n if state == LifecycleState.STOPPED:\n return {\"status\": \"unhealthy\", \"detail\": \"state=stopped\", \"state\": state.value}\n if state in {LifecycleState.STARTING, LifecycleState.STOPPING}:\n return {\n \"status\": \"degraded\",\n \"detail\": f\"state={state.value}\",\n \"state\": state.value,\n \"components\": [self._health_dict(item) for item in component_healths],\n }\n return {\n \"status\": self._aggregate_status(component_healths),\n \"state\": state.value,\n \"components\": [self._health_dict(item) for item in component_healths],\n }\n\n def _aggregate_status(self, component_healths: list[WorkerHealth]) -> str:\n if any(item.status == \"unhealthy\" and item.critical for item in component_healths):\n return \"unhealthy\"\n if any(item.status in {\"degraded\", \"unhealthy\"} for item in component_healths):\n return \"degraded\"\n return \"ok\"\n\n def _health_dict(self, health: WorkerHealth) -> dict[str, object]:\n return {\n \"name\": health.name,\n \"status\": health.status,\n \"critical\": health.critical,\n \"detail\": health.detail,\n \"meta\": health.meta,\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/health/registry.py:HealthRegistry", + "span_start": 8, + "span_end": 56, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.health.registry", + "is_test": false, + "blob_sha": "26e6a24daa43407ba5340b74497c20153020e79f8d7828ae502aaec378dfcf75", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/health.py", + "content": "from app_runtime.health.registry import HealthRegistry\n\n__all__ = [\"HealthRegistry\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/health/__init__.py:1-3", + "span_start": 1, + "span_end": 3, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.health.__init__", + "is_test": false, + "blob_sha": "f7b15eed8b1f1cca8dfd467909a2612d8cb4e66e46b972ad89a0c9459ce283a0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/health.py", + "content": "class HealthContributor(ABC):\n @abstractmethod\n def health(self) -> WorkerHealth:\n \"\"\"Return contributor health state.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/contracts/health.py:HealthContributor", + "span_start": 7, + "span_end": 10, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.health", + "is_test": false, + "blob_sha": "6bd92611def7131e32d4dd34a8ed85e6cf3c67722ad27797032a632cb30dc097", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/health/__init__.py", + "content": "from app_runtime.health.registry import HealthRegistry\n\n__all__ = [\"HealthRegistry\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/health/__init__.py:1-3", + "span_start": 1, + "span_end": 3, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.health.__init__", + "is_test": false, + "blob_sha": "f7b15eed8b1f1cca8dfd467909a2612d8cb4e66e46b972ad89a0c9459ce283a0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/worker.py", + "content": "class WorkerHealth:\n name: str\n status: HealthState\n critical: bool\n detail: str | None = None\n meta: dict[str, Any] = field(default_factory=dict)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/contracts/worker.py:WorkerHealth", + "span_start": 13, + "span_end": 18, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.worker", + "is_test": false, + "blob_sha": "e4827d32220f322d8adc3e42769da3ca0cc680db6a5eab7a11f4d8773a75304e", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/worker.py", + "content": "class Worker(ABC):\n @property\n @abstractmethod\n def name(self) -> str:\n \"\"\"Stable worker name for diagnostics.\"\"\"\n\n @property\n @abstractmethod\n def critical(self) -> bool:\n \"\"\"Whether this worker is required for healthy app operation.\"\"\"\n\n @abstractmethod\n def start(self) -> None:\n \"\"\"Start worker execution.\"\"\"\n\n @abstractmethod\n def stop(self, force: bool = False) -> None:\n \"\"\"Request graceful or immediate stop.\"\"\"\n\n @abstractmethod\n def health(self) -> WorkerHealth:\n \"\"\"Return current health state.\"\"\"\n\n @abstractmethod\n def status(self) -> WorkerStatus:\n \"\"\"Return current runtime status.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/contracts/worker.py:Worker", + "span_start": 30, + "span_end": 55, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 2, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.worker", + "is_test": false, + "blob_sha": "e4827d32220f322d8adc3e42769da3ca0cc680db6a5eab7a11f4d8773a75304e", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "validation": { + "passed": true, + "action": "return", + "reasons": [] + }, + "steps": [ + { + "step": "router", + "status": "completed", + "timings_ms": { + "router": 0 + }, + "output": { + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + } + }, + { + "step": "retrieval", + "status": "completed", + "timings_ms": { + "retrieval": 46 + }, + "output": { + "rag_count": 9, + "answer_path_rag_count": 9, + "resolved_symbol_status": "not_found", + "resolved_symbol": null, + "requested_layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ] + }, + "diagnostics": { + "executed_layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C3_ENTRYPOINTS": "vector", + "C0_SOURCE_CHUNKS": "vector" + }, + "top_k_by_layer": { + "C3_ENTRYPOINTS": 12, + "C0_SOURCE_CHUNKS": 6 + }, + "filters_by_layer": { + "C3_ENTRYPOINTS": { + "path_scope": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [] + } + }, + "fallback": { + "used": false, + "reason": null + }, + "retrieval_by_layer_ms": { + "C3_ENTRYPOINTS": 28, + "C0_SOURCE_CHUNKS": 18 + } + } + }, + { + "step": "pre_evidence_gate", + "status": "passed", + "timings_ms": { + "pre_evidence_gate": 0 + }, + "output": { + "passed": true, + "failure_reasons": [], + "degraded_message": "" + } + }, + { + "step": "llm", + "status": "completed", + "timings_ms": { + "llm": 1055 + }, + "output": { + "prompt_name": "code_qa_find_entrypoints_answer", + "answer_preview": "Конкретных health-endpoint'ов, объявленных как routes, не найдено.\n\nОднако, исходя из предоставленного кода:\n- В `http_app.py` есть две явные декларации маршрутов с использованием декоратора `app.get`, но neither из них явно помечен как health-check (метод и путь не указаны).\n- Есть декларация `app." + } + }, + { + "step": "post_evidence_gate", + "status": "passed", + "timings_ms": { + "post_evidence_gate": 0, + "repair": 0 + }, + "output": { + "passed": true, + "reasons": [], + "repair_used": false + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-health-endpoint.md b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-health-endpoint.md new file mode 100644 index 0000000..6bacc06 --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-health-endpoint.md @@ -0,0 +1,194 @@ +# plba-v2-find-entrypoints-health-endpoint + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: agent_runtime +- mode: full_chain +- passed: False + +## Query +Где health endpoint? + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 9, + "llm_answer": "Конкретных health-endpoint'ов, объявленных как routes, не найдено.\n\nОднако, исходя из предоставленного кода:\n- В `http_app.py` есть две явные декларации маршрутов с использованием декоратора `app.get`, но neither из них явно помечен как health-check (метод и путь не указаны).\n- Есть декларация `app.post`, но она также не маркируется как health-related.\n\nТаким образом, хотя health-checking инфраструктура существует (через класс `HealthRegistry`), конкретный health-endpoint не обнаружен среди зарегистрированных маршрутов.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "health", + "endpoint" + ], + "layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ] +} + +## Steps +[ + { + "step": "router", + "status": "completed", + "timings_ms": { + "router": 0 + }, + "output": { + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + } + }, + { + "step": "retrieval", + "status": "completed", + "timings_ms": { + "retrieval": 46 + }, + "output": { + "rag_count": 9, + "answer_path_rag_count": 9, + "resolved_symbol_status": "not_found", + "resolved_symbol": null, + "requested_layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ] + }, + "diagnostics": { + "executed_layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C3_ENTRYPOINTS": "vector", + "C0_SOURCE_CHUNKS": "vector" + }, + "top_k_by_layer": { + "C3_ENTRYPOINTS": 12, + "C0_SOURCE_CHUNKS": 6 + }, + "filters_by_layer": { + "C3_ENTRYPOINTS": { + "path_scope": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [] + } + }, + "fallback": { + "used": false, + "reason": null + }, + "retrieval_by_layer_ms": { + "C3_ENTRYPOINTS": 28, + "C0_SOURCE_CHUNKS": 18 + } + } + }, + { + "step": "pre_evidence_gate", + "status": "passed", + "timings_ms": { + "pre_evidence_gate": 0 + }, + "output": { + "passed": true, + "failure_reasons": [], + "degraded_message": "" + } + }, + { + "step": "llm", + "status": "completed", + "timings_ms": { + "llm": 1055 + }, + "output": { + "prompt_name": "code_qa_find_entrypoints_answer", + "answer_preview": "Конкретных health-endpoint'ов, объявленных как routes, не найдено.\n\nОднако, исходя из предоставленного кода:\n- В `http_app.py` есть две явные декларации маршрутов с использованием декоратора `app.get`, но neither из них явно помечен как health-check (метод и путь не указаны).\n- Есть декларация `app." + } + }, + { + "step": "post_evidence_gate", + "status": "passed", + "timings_ms": { + "post_evidence_gate": 0, + "repair": 0 + }, + "output": { + "passed": true, + "reasons": [], + "repair_used": false + } + } +] + +## Diagnostics +{ + "intent_correct": null, + "target_found": true, + "layers_used": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ], + "retrieval_sufficient": true, + "answer_mode": "normal", + "router_result": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "FIND_ENTRYPOINTS", + "path_scope": [], + "layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ], + "symbol_resolution_status": "not_found" + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Где health endpoint?", + "sub_intent": "FIND_ENTRYPOINTS", + "path_scope": [], + "requested_layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "C3_ENTRYPOINTS", + "hit_count": 3, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 6, + "empty": false, + "fallback_used": false + } + ], + "empty_layers": [], + "evidence_gate_decision": { + "sufficient": true, + "failure_reasons": [], + "evidence_count": 9 + }, + "failure_reasons": [], + "timings_ms": { + "router": 0, + "retrieval": 46, + "pre_evidence_gate": 0, + "llm": 1055 + } +} + +## Mismatches +- llm: expected answer to contain 'GET /health' \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-find-tests-create-runtime.json b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-find-tests-create-runtime.json new file mode 100644 index 0000000..a33cda0 --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-find-tests-create-runtime.json @@ -0,0 +1,2861 @@ +{ + "case_id": "plba-v2-find-tests-create-runtime", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "agent_runtime", + "mode": "full_chain", + "query": "Где тесты для create_runtime?", + "actual": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 24, + "llm_answer": "Прямых тестов для `create_runtime` не обнаружено. Ближайший тест расположен в файле `tests/test_runtime.py`, но он проверяет экспорт публичных контрактов пакета PLBA, а не непосредственно сам метод `create_runtime`. Косвенное покрытие отсутствует.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "create_runtime" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "query": "Где тесты для create_runtime?", + "router_result": { + "schema_version": "1.1", + "intent": "CODE_QA", + "retrieval_profile": "code", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query_plan": { + "raw": "Где тесты для create_runtime?", + "normalized": "Где тесты для create_runtime?", + "sub_intent": "FIND_TESTS", + "negations": [], + "expansions": [ + "test", + "unit test", + "create_runtime" + ], + "keyword_hints": [ + "create_runtime" + ], + "path_hints": [], + "doc_scope_hints": [], + "symbol_candidates": [ + "create_runtime" + ], + "symbol_kind_hint": "function", + "anchors": [ + { + "type": "SYMBOL", + "value": "create_runtime", + "source": "user_text", + "subtype": null, + "span": { + "start": 14, + "end": 28 + }, + "confidence": 0.88 + }, + { + "type": "KEY_TERM", + "value": "тест", + "source": "user_text", + "subtype": null, + "span": { + "start": 4, + "end": 9 + }, + "confidence": 0.9 + } + ] + }, + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "top_k": 8 + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "top_k": 6 + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 10 + } + ], + "filters": { + "test_policy": "INCLUDE", + "path_scope": [], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "test_file_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "test_symbol_patterns": [ + "test_create_runtime", + "Testcreate_runtime", + "create_runtime" + ], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "create_runtime", + "alternatives": [ + "create_runtime", + "create_runtime", + "FileConfigProvider", + "hashlib", + "json" + ], + "confidence": 0.99 + }, + "evidence_policy": { + "require_def": true, + "require_flow": true, + "require_spec": false, + "allow_answer_without_evidence": false + } + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Где тесты для create_runtime?", + "sub_intent": "FIND_TESTS", + "path_scope": [], + "keyword_hints": [ + "create_runtime" + ], + "symbol_candidates": [ + "create_runtime" + ], + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "top_k": 8 + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "top_k": 6 + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 10 + } + ], + "filters": { + "test_policy": "INCLUDE", + "path_scope": [], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "test_file_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "test_symbol_patterns": [ + "test_create_runtime", + "Testcreate_runtime", + "create_runtime" + ], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + }, + "query_plan": { + "raw": "Где тесты для create_runtime?", + "normalized": "Где тесты для create_runtime?", + "sub_intent": "FIND_TESTS", + "negations": [], + "expansions": [ + "test", + "unit test", + "create_runtime" + ], + "keyword_hints": [ + "create_runtime" + ], + "path_hints": [], + "doc_scope_hints": [], + "symbol_candidates": [ + "create_runtime" + ], + "symbol_kind_hint": "function", + "anchors": [ + { + "type": "SYMBOL", + "value": "create_runtime", + "source": "user_text", + "subtype": null, + "span": { + "start": 14, + "end": 28 + }, + "confidence": 0.88 + }, + { + "type": "KEY_TERM", + "value": "тест", + "source": "user_text", + "subtype": null, + "span": { + "start": 4, + "end": 9 + }, + "confidence": 0.9 + } + ] + } + }, + "retrieval_result": { + "target_symbol_candidates": [ + "create_runtime", + "FileConfigProvider", + "hashlib", + "json", + "Path", + "Any", + "annotations" + ], + "resolved_symbol": "create_runtime", + "symbol_resolution_status": "resolved", + "file_candidates": [ + "src/plba/__init__.py", + "src/plba/bootstrap.py", + "src/app_runtime/config/__init__.py", + "src/app_runtime/config/file_loader.py", + "tests/test_runtime.py", + "src/app_runtime/config/providers.py", + "src/app_runtime/contracts/__init__.py", + "src/app_runtime/contracts/config.py", + "src/app_runtime/contracts/health.py", + "src/app_runtime/contracts/application.py" + ], + "code_chunks": [ + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/plba/__init__.py", + "title": "create_runtime", + "content": "const create_runtime\ncreate_runtime = plba.bootstrap.create_runtime", + "start_line": 1, + "end_line": 1, + "metadata": { + "symbol_id": "fa1e84f16c8c659bcd5448637386af4d15d431064e07714e34689ee64233cb51", + "qname": "create_runtime", + "kind": "const", + "signature": "create_runtime = plba.bootstrap.create_runtime", + "parent_symbol_id": null, + "package_or_module": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/plba/bootstrap.py", + "title": "create_runtime", + "content": "function create_runtime\ncreate_runtime(module)", + "start_line": 8, + "end_line": 29, + "metadata": { + "symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "qname": "create_runtime", + "kind": "function", + "signature": "create_runtime(module)", + "parent_symbol_id": null, + "package_or_module": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/config/__init__.py", + "title": "FileConfigProvider", + "content": "const FileConfigProvider\nFileConfigProvider = app_runtime.config.providers.FileConfigProvider", + "start_line": 2, + "end_line": 2, + "metadata": { + "symbol_id": "e449b19e5881889adeb6e056eafe1da30acbae864f06984ea2edc7c15f7cb6d6", + "qname": "FileConfigProvider", + "kind": "const", + "signature": "FileConfigProvider = app_runtime.config.providers.FileConfigProvider", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.__init__", + "is_test": false, + "blob_sha": "612918029820a2a983330ec92256142b55b9de4bdf3399ece18e2a02dbad9729", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/config/file_loader.py", + "title": "hashlib", + "content": "const hashlib\nimport hashlib", + "start_line": 3, + "end_line": 3, + "metadata": { + "symbol_id": "e7375824bd473da3d73d316d22e3cb6428930e2db1ffbd900ce5a8b88427bf05", + "qname": "hashlib", + "kind": "const", + "signature": "import hashlib", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/config/file_loader.py", + "title": "json", + "content": "const json\nimport json", + "start_line": 4, + "end_line": 4, + "metadata": { + "symbol_id": "bb9e2eaf992bfd050f7072d72eed87c55b1a4b001daa034a0f7c630a61bb1d78", + "qname": "json", + "kind": "const", + "signature": "import json", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/config/file_loader.py", + "title": "Path", + "content": "const Path\nPath = pathlib.Path", + "start_line": 5, + "end_line": 5, + "metadata": { + "symbol_id": "b785967ed1fb83aa62d5724c6d6e9c6d2b1505523db39bd941cc39b48db48306", + "qname": "Path", + "kind": "const", + "signature": "Path = pathlib.Path", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/config/file_loader.py", + "title": "Any", + "content": "const Any\nAny = typing.Any", + "start_line": 6, + "end_line": 6, + "metadata": { + "symbol_id": "8e330833b8073585db1c4b4315947c400683a23e4c3d2e2ccbcb260f347541b6", + "qname": "Any", + "kind": "const", + "signature": "Any = typing.Any", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/config/file_loader.py", + "title": "annotations", + "content": "const annotations\nannotations = __future__.annotations", + "start_line": 1, + "end_line": 1, + "metadata": { + "symbol_id": "5ed640ccec43a78659d50ec24f3717bf1144a182c22588f37456649ac6a4a815", + "qname": "annotations", + "kind": "const", + "signature": "annotations = __future__.annotations", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/plba/bootstrap.py", + "title": "create_runtime:calls", + "content": "create_runtime calls runtime.add_config_file", + "start_line": 19, + "end_line": 19, + "metadata": { + "edge_id": "4eaeec4ac55a59d5f66fd01c4754955f8fedaf4bc3df13fa769b352c7bfaacbb", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.add_config_file", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/plba/bootstrap.py", + "title": "create_runtime:reads_attr", + "content": "create_runtime reads_attr runtime.register_module", + "start_line": 28, + "end_line": 28, + "metadata": { + "edge_id": "45516c79ff358dbf9b650a081668df0f66d2fe989300f985a1a78be6be166f8f", + "edge_type": "reads_attr", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.register_module", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/plba/bootstrap.py", + "title": "create_runtime:instantiates", + "content": "create_runtime instantiates RuntimeManager", + "start_line": 17, + "end_line": 17, + "metadata": { + "edge_id": "0adba17984f850ea1608c9e734d2dd5c325cfde3a8133123aa239e44935ad18e", + "edge_type": "instantiates", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": "27158ca220022eeb5083c6addf8a50775d45f7161284fd60aac48410105f4b98", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/plba/bootstrap.py", + "title": "create_runtime:calls", + "content": "create_runtime calls runtime.register_module", + "start_line": 28, + "end_line": 28, + "metadata": { + "edge_id": "ab6003c3441addc1ba1b81edeca009165559f652f6b2cf424e5ae61b1f617de8", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.register_module", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/plba/bootstrap.py", + "title": "create_runtime:calls", + "content": "create_runtime calls runtime.control_plane.register_channel", + "start_line": 21, + "end_line": 27, + "metadata": { + "edge_id": "2678250030b9ce47a3b3b55fac7897ac530367edc8374ac9d5e6ecafb1e483f0", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.control_plane.register_channel", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/plba/bootstrap.py", + "title": "create_runtime:reads_attr", + "content": "create_runtime reads_attr runtime.add_config_file", + "start_line": 19, + "end_line": 19, + "metadata": { + "edge_id": "30d4e8aae984ab84d523e80d02f1caeda52d547fa3d2aa47be8845931cabbca2", + "edge_type": "reads_attr", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.add_config_file", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/plba/__init__.py", + "title": "src/plba/__init__.py:1-69", + "content": "from plba.bootstrap import create_runtime\nfrom plba.config import ConfigFileLoader, FileConfigProvider\nfrom plba.control import ControlActionSet, ControlChannel, ControlPlaneService, HttpControlChannel\nfrom plba.contracts import (\n ApplicationModule,\n ConfigProvider,\n HealthContributor,\n TraceContext,\n TraceContextRecord,\n TraceLogMessage,\n TraceTransport,\n Worker,\n WorkerHealth,\n WorkerStatus,\n)\nfrom plba.core import ConfigurationManager, RuntimeManager, ServiceContainer\nfrom plba.health import HealthRegistry\nfrom plba.logging import LogManager\nfrom plba.queue import InMemoryTaskQueue\nfrom plba.tracing import MySqlTraceTransport, NoOpTraceTransport, TraceService\nfrom plba.workflow import (\n StepResult,\n WorkflowContext,\n WorkflowDefinition,\n WorkflowEngine,\n WorkflowEngineHooks,\n WorkflowNode,\n WorkflowRuntimeFactory,\n WorkflowStep,\n)\nfrom plba.workers import WorkerSupervisor\n\n__all__ = [\n \"ApplicationModule\",\n \"ConfigFileLoader\",\n \"ConfigProvider\",\n \"ConfigurationManager\",\n \"ControlActionSet\",\n \"ControlChannel\",\n \"ControlPlaneService\",\n \"create_runtime\",\n \"FileConfigProvider\",\n \"HealthContributor\",\n \"HealthRegistry\",\n \"HttpControlChannel\",\n \"InMemoryTaskQueue\",\n \"LogManager\",\n \"MySqlTraceTransport\",\n \"NoOpTraceTransport\",\n \"RuntimeManager\",\n \"ServiceContainer\",\n \"TraceContext\",\n \"TraceContextRecord\",\n \"TraceLogMessage\",\n \"TraceService\",\n \"TraceTransport\",\n \"StepResult\",\n \"Worker\",\n \"WorkerHealth\",\n \"WorkerStatus\",\n \"WorkflowContext\",\n \"WorkflowDefinition\",\n \"WorkflowEngine\",\n \"WorkflowEngineHooks\",\n \"WorkflowNode\",\n \"WorkflowRuntimeFactory\",\n \"WorkflowStep\",\n \"WorkerSupervisor\",\n]", + "start_line": 1, + "end_line": 69, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/plba/bootstrap.py", + "title": "src/plba/bootstrap.py:create_runtime", + "content": "def create_runtime(\n module: ApplicationModule,\n *,\n config_path: str | None = None,\n enable_http_control: bool = False,\n control_host: str = \"127.0.0.1\",\n control_port: int = 8080,\n control_timeout: int = 5,\n) -> RuntimeManager:\n runtime = RuntimeManager()\n if config_path is not None:\n runtime.add_config_file(config_path)\n if enable_http_control:\n runtime.control_plane.register_channel(\n HttpControlChannel(\n host=control_host,\n port=control_port,\n timeout=control_timeout,\n )\n )\n runtime.register_module(module)\n return runtime", + "start_line": 8, + "end_line": 29, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "tests/test_runtime.py", + "title": "tests/test_runtime.py:test_public_plba_package_exports_runtime_builder_and_worker_contract", + "content": "def test_public_plba_package_exports_runtime_builder_and_worker_contract(tmp_path) -> None:\n import plba\n from plba import ApplicationModule as PublicApplicationModule\n from plba import InMemoryTaskQueue\n from plba import Worker as PublicWorker\n from plba import WorkerHealth as PublicWorkerHealth\n from plba import WorkerStatus as PublicWorkerStatus\n from plba import create_runtime\n\n config_path = tmp_path / \"config.yml\"\n config_path.write_text(\"platform: {}\\n\", encoding=\"utf-8\")\n\n queue = InMemoryTaskQueue[int]()\n queue.put(2)\n assert queue.get(timeout=0.01) == 2\n queue.task_done()\n\n class PublicRoutine:\n def __init__(self) -> None:\n self.runs = 0\n\n def run(self) -> None:\n if self.runs == 0:\n self.runs += 1\n\n class PublicWorkerImpl(PublicWorker):\n def __init__(self, routine: PublicRoutine) -> None:\n self._inner = RoutineWorker(\"public-worker\", routine)\n\n @property\n def name(self) -> str:\n return self._inner.name\n\n @property\n def critical(self) -> bool:\n return self._inner.critical\n\n def start(self) -> None:\n self._inner.start()\n\n def stop(self, force: bool = False) -> None:\n self._inner.stop(force=force)\n\n def health(self) -> PublicWorkerHealth:\n return self._inner.health()\n\n def status(self) -> PublicWorkerStatus:\n return self._inner.status()\n\n class PublicExampleModule(PublicApplicationModule):\n @property\n def name(self) -> str:\n return \"public-example\"\n\n def register(self, registry: ModuleRegistry) -> None:\n registry.add_worker(PublicWorkerImpl(PublicRoutine()))\n\n runtime = create_runtime(PublicExampleModule(), config_path=str(config_path))\n runtime.start()\n sleep(0.2)\n assert runtime.configuration.get() == {\"platform\": {}}\n assert runtime.status()[\"workers\"][\"registered\"] == 1\n assert hasattr(plba, \"QueueWorker\") is False\n runtime.stop()", + "start_line": 342, + "end_line": 405, + "metadata": { + "chunk_index": 13, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/config/__init__.py", + "title": "src/app_runtime/config/__init__.py:1-4", + "content": "from app_runtime.config.file_loader import ConfigFileLoader\nfrom app_runtime.config.providers import FileConfigProvider\n\n__all__ = [\"ConfigFileLoader\", \"FileConfigProvider\"]", + "start_line": 1, + "end_line": 4, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.config.__init__", + "is_test": false, + "blob_sha": "612918029820a2a983330ec92256142b55b9de4bdf3399ece18e2a02dbad9729", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/config/providers.py", + "title": "src/app_runtime/config/providers.py:FileConfigProvider", + "content": "class FileConfigProvider(ConfigProvider):\n def __init__(self, path: str | Path) -> None:\n self._loader = ConfigFileLoader(path)\n\n @property\n def loader(self) -> ConfigFileLoader:\n return self._loader\n\n def load(self) -> dict[str, Any]:\n config = self._loader.load_sync()\n if not isinstance(config, dict):\n raise TypeError(\"Config root must be a mapping\")\n return dict(config)", + "start_line": 10, + "end_line": 22, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.config.providers", + "is_test": false, + "blob_sha": "8c53ca0122d6df6c5763bca15e99434bb4daebd5a618b8fc927e9ae90b022e64", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/contracts/__init__.py", + "title": "src/app_runtime/__init__.py:1-1", + "content": "__all__: list[str] = []", + "start_line": 1, + "end_line": 1, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.__init__", + "is_test": false, + "blob_sha": "8eea9df4f6d7b38ca0e39ccc27b04700e3d08dbeec8046d613d22706d19985fa", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/config/file_loader.py", + "title": "src/app_runtime/config/file_loader.py:ConfigFileLoader", + "content": "class ConfigFileLoader:\n def __init__(self, path: str | Path) -> None:\n self.path = Path(path)\n self.config: Any = None\n self.last_valid_config: Any = None\n self._last_seen_hash: str | None = None\n\n def read_text(self) -> str:\n return self.path.read_text(encoding=\"utf-8\")\n\n def parse(self, data: str) -> Any:\n suffix = self.path.suffix.lower()\n if suffix in {\".yml\", \".yaml\"}:\n return yaml.safe_load(data)\n return json.loads(data)\n\n def load_sync(self) -> Any:\n data = self.read_text()\n parsed = self.parse(data)\n self.config = parsed\n self.last_valid_config = parsed\n self._last_seen_hash = self._calculate_hash(data)\n return parsed\n\n def load_if_changed(self) -> tuple[bool, Any]:\n data = self.read_text()\n current_hash = self._calculate_hash(data)\n if current_hash == self._last_seen_hash:\n return False, self.config\n parsed = self.parse(data)\n self.config = parsed\n self.last_valid_config = parsed\n self._last_seen_hash = current_hash\n return True, parsed\n\n @staticmethod\n def _calculate_hash(data: str) -> str:\n return hashlib.sha256(data.encode(\"utf-8\")).hexdigest()", + "start_line": 11, + "end_line": 48, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/contracts/config.py", + "title": "src/app_runtime/contracts/config.py:ConfigProvider", + "content": "class ConfigProvider(ABC):\n @abstractmethod\n def load(self) -> dict[str, Any]:\n \"\"\"Return a config fragment.\"\"\"", + "start_line": 7, + "end_line": 10, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.config", + "is_test": false, + "blob_sha": "5e773880267743ee94954ea2db120c2d88c54d4312893293d1b89df405283ed4", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/contracts/health.py", + "title": "src/app_runtime/contracts/health.py:HealthContributor", + "content": "class HealthContributor(ABC):\n @abstractmethod\n def health(self) -> WorkerHealth:\n \"\"\"Return contributor health state.\"\"\"", + "start_line": 7, + "end_line": 10, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.health", + "is_test": false, + "blob_sha": "6bd92611def7131e32d4dd34a8ed85e6cf3c67722ad27797032a632cb30dc097", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/contracts/application.py", + "title": "src/app_runtime/contracts/application.py:ApplicationModule", + "content": "class ApplicationModule(ABC):\n @property\n @abstractmethod\n def name(self) -> str:\n \"\"\"Module name used for runtime status and diagnostics.\"\"\"\n\n @abstractmethod\n def register(self, registry: ModuleRegistry) -> None:\n \"\"\"Register workers, services, and health contributors.\"\"\"", + "start_line": 8, + "end_line": 16, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.application", + "is_test": false, + "blob_sha": "197c35634dca49c352ce3f230295a485fbffb672ce7bb8c08e752bfdf61e7fa4", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "relations": [ + { + "path": "src/plba/bootstrap.py", + "metadata": { + "edge_id": "4eaeec4ac55a59d5f66fd01c4754955f8fedaf4bc3df13fa769b352c7bfaacbb", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.add_config_file", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "create_runtime calls runtime.add_config_file" + }, + { + "path": "src/plba/bootstrap.py", + "metadata": { + "edge_id": "45516c79ff358dbf9b650a081668df0f66d2fe989300f985a1a78be6be166f8f", + "edge_type": "reads_attr", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.register_module", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "create_runtime reads_attr runtime.register_module" + }, + { + "path": "src/plba/bootstrap.py", + "metadata": { + "edge_id": "0adba17984f850ea1608c9e734d2dd5c325cfde3a8133123aa239e44935ad18e", + "edge_type": "instantiates", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": "27158ca220022eeb5083c6addf8a50775d45f7161284fd60aac48410105f4b98", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "create_runtime instantiates RuntimeManager" + }, + { + "path": "src/plba/bootstrap.py", + "metadata": { + "edge_id": "ab6003c3441addc1ba1b81edeca009165559f652f6b2cf424e5ae61b1f617de8", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.register_module", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "create_runtime calls runtime.register_module" + }, + { + "path": "src/plba/bootstrap.py", + "metadata": { + "edge_id": "2678250030b9ce47a3b3b55fac7897ac530367edc8374ac9d5e6ecafb1e483f0", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.control_plane.register_channel", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "create_runtime calls runtime.control_plane.register_channel" + }, + { + "path": "src/plba/bootstrap.py", + "metadata": { + "edge_id": "30d4e8aae984ab84d523e80d02f1caeda52d547fa3d2aa47be8845931cabbca2", + "edge_type": "reads_attr", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.add_config_file", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "create_runtime reads_attr runtime.add_config_file" + } + ], + "entrypoints": [], + "test_candidates": [ + { + "path": "tests/test_runtime.py", + "title": "tests/test_runtime.py:test_public_plba_package_exports_runtime_builder_and_worker_contract", + "content": "def test_public_plba_package_exports_runtime_builder_and_worker_contract(tmp_path) -> None:\n import plba\n from plba import ApplicationModule as PublicApplicationModule\n from plba import InMemoryTaskQueue\n from plba import Worker as PublicWorker\n from plba import WorkerHealth as Public" + } + ], + "layer_outcomes": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 6, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 10, + "empty": false, + "fallback_used": false + } + ], + "missing_layers": [], + "raw_rows": [ + { + "path": "src/plba/__init__.py", + "content": "const create_runtime\ncreate_runtime = plba.bootstrap.create_runtime", + "layer": "C1_SYMBOL_CATALOG", + "title": "create_runtime", + "span_start": 1, + "span_end": 1, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "fa1e84f16c8c659bcd5448637386af4d15d431064e07714e34689ee64233cb51", + "qname": "create_runtime", + "kind": "const", + "signature": "create_runtime = plba.bootstrap.create_runtime", + "parent_symbol_id": null, + "package_or_module": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "function create_runtime\ncreate_runtime(module)", + "layer": "C1_SYMBOL_CATALOG", + "title": "create_runtime", + "span_start": 8, + "span_end": 29, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "qname": "create_runtime", + "kind": "function", + "signature": "create_runtime(module)", + "parent_symbol_id": null, + "package_or_module": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/__init__.py", + "content": "const FileConfigProvider\nFileConfigProvider = app_runtime.config.providers.FileConfigProvider", + "layer": "C1_SYMBOL_CATALOG", + "title": "FileConfigProvider", + "span_start": 2, + "span_end": 2, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "e449b19e5881889adeb6e056eafe1da30acbae864f06984ea2edc7c15f7cb6d6", + "qname": "FileConfigProvider", + "kind": "const", + "signature": "FileConfigProvider = app_runtime.config.providers.FileConfigProvider", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.__init__", + "is_test": false, + "blob_sha": "612918029820a2a983330ec92256142b55b9de4bdf3399ece18e2a02dbad9729", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "const hashlib\nimport hashlib", + "layer": "C1_SYMBOL_CATALOG", + "title": "hashlib", + "span_start": 3, + "span_end": 3, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "e7375824bd473da3d73d316d22e3cb6428930e2db1ffbd900ce5a8b88427bf05", + "qname": "hashlib", + "kind": "const", + "signature": "import hashlib", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "const json\nimport json", + "layer": "C1_SYMBOL_CATALOG", + "title": "json", + "span_start": 4, + "span_end": 4, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "bb9e2eaf992bfd050f7072d72eed87c55b1a4b001daa034a0f7c630a61bb1d78", + "qname": "json", + "kind": "const", + "signature": "import json", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "const Path\nPath = pathlib.Path", + "layer": "C1_SYMBOL_CATALOG", + "title": "Path", + "span_start": 5, + "span_end": 5, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "b785967ed1fb83aa62d5724c6d6e9c6d2b1505523db39bd941cc39b48db48306", + "qname": "Path", + "kind": "const", + "signature": "Path = pathlib.Path", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "const Any\nAny = typing.Any", + "layer": "C1_SYMBOL_CATALOG", + "title": "Any", + "span_start": 6, + "span_end": 6, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "8e330833b8073585db1c4b4315947c400683a23e4c3d2e2ccbcb260f347541b6", + "qname": "Any", + "kind": "const", + "signature": "Any = typing.Any", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "const annotations\nannotations = __future__.annotations", + "layer": "C1_SYMBOL_CATALOG", + "title": "annotations", + "span_start": 1, + "span_end": 1, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "5ed640ccec43a78659d50ec24f3717bf1144a182c22588f37456649ac6a4a815", + "qname": "annotations", + "kind": "const", + "signature": "annotations = __future__.annotations", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime calls runtime.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:calls", + "span_start": 19, + "span_end": 19, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "4eaeec4ac55a59d5f66fd01c4754955f8fedaf4bc3df13fa769b352c7bfaacbb", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.add_config_file", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime reads_attr runtime.register_module", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:reads_attr", + "span_start": 28, + "span_end": 28, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "45516c79ff358dbf9b650a081668df0f66d2fe989300f985a1a78be6be166f8f", + "edge_type": "reads_attr", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.register_module", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:instantiates", + "span_start": 17, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "0adba17984f850ea1608c9e734d2dd5c325cfde3a8133123aa239e44935ad18e", + "edge_type": "instantiates", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": "27158ca220022eeb5083c6addf8a50775d45f7161284fd60aac48410105f4b98", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime calls runtime.register_module", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:calls", + "span_start": 28, + "span_end": 28, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "ab6003c3441addc1ba1b81edeca009165559f652f6b2cf424e5ae61b1f617de8", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.register_module", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime calls runtime.control_plane.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:calls", + "span_start": 21, + "span_end": 27, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "2678250030b9ce47a3b3b55fac7897ac530367edc8374ac9d5e6ecafb1e483f0", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.control_plane.register_channel", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime reads_attr runtime.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:reads_attr", + "span_start": 19, + "span_end": 19, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "30d4e8aae984ab84d523e80d02f1caeda52d547fa3d2aa47be8845931cabbca2", + "edge_type": "reads_attr", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.add_config_file", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/__init__.py", + "content": "from plba.bootstrap import create_runtime\nfrom plba.config import ConfigFileLoader, FileConfigProvider\nfrom plba.control import ControlActionSet, ControlChannel, ControlPlaneService, HttpControlChannel\nfrom plba.contracts import (\n ApplicationModule,\n ConfigProvider,\n HealthContributor,\n TraceContext,\n TraceContextRecord,\n TraceLogMessage,\n TraceTransport,\n Worker,\n WorkerHealth,\n WorkerStatus,\n)\nfrom plba.core import ConfigurationManager, RuntimeManager, ServiceContainer\nfrom plba.health import HealthRegistry\nfrom plba.logging import LogManager\nfrom plba.queue import InMemoryTaskQueue\nfrom plba.tracing import MySqlTraceTransport, NoOpTraceTransport, TraceService\nfrom plba.workflow import (\n StepResult,\n WorkflowContext,\n WorkflowDefinition,\n WorkflowEngine,\n WorkflowEngineHooks,\n WorkflowNode,\n WorkflowRuntimeFactory,\n WorkflowStep,\n)\nfrom plba.workers import WorkerSupervisor\n\n__all__ = [\n \"ApplicationModule\",\n \"ConfigFileLoader\",\n \"ConfigProvider\",\n \"ConfigurationManager\",\n \"ControlActionSet\",\n \"ControlChannel\",\n \"ControlPlaneService\",\n \"create_runtime\",\n \"FileConfigProvider\",\n \"HealthContributor\",\n \"HealthRegistry\",\n \"HttpControlChannel\",\n \"InMemoryTaskQueue\",\n \"LogManager\",\n \"MySqlTraceTransport\",\n \"NoOpTraceTransport\",\n \"RuntimeManager\",\n \"ServiceContainer\",\n \"TraceContext\",\n \"TraceContextRecord\",\n \"TraceLogMessage\",\n \"TraceService\",\n \"TraceTransport\",\n \"StepResult\",\n \"Worker\",\n \"WorkerHealth\",\n \"WorkerStatus\",\n \"WorkflowContext\",\n \"WorkflowDefinition\",\n \"WorkflowEngine\",\n \"WorkflowEngineHooks\",\n \"WorkflowNode\",\n \"WorkflowRuntimeFactory\",\n \"WorkflowStep\",\n \"WorkerSupervisor\",\n]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/__init__.py:1-69", + "span_start": 1, + "span_end": 69, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "def create_runtime(\n module: ApplicationModule,\n *,\n config_path: str | None = None,\n enable_http_control: bool = False,\n control_host: str = \"127.0.0.1\",\n control_port: int = 8080,\n control_timeout: int = 5,\n) -> RuntimeManager:\n runtime = RuntimeManager()\n if config_path is not None:\n runtime.add_config_file(config_path)\n if enable_http_control:\n runtime.control_plane.register_channel(\n HttpControlChannel(\n host=control_host,\n port=control_port,\n timeout=control_timeout,\n )\n )\n runtime.register_module(module)\n return runtime", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/bootstrap.py:create_runtime", + "span_start": 8, + "span_end": 29, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "def test_public_plba_package_exports_runtime_builder_and_worker_contract(tmp_path) -> None:\n import plba\n from plba import ApplicationModule as PublicApplicationModule\n from plba import InMemoryTaskQueue\n from plba import Worker as PublicWorker\n from plba import WorkerHealth as PublicWorkerHealth\n from plba import WorkerStatus as PublicWorkerStatus\n from plba import create_runtime\n\n config_path = tmp_path / \"config.yml\"\n config_path.write_text(\"platform: {}\\n\", encoding=\"utf-8\")\n\n queue = InMemoryTaskQueue[int]()\n queue.put(2)\n assert queue.get(timeout=0.01) == 2\n queue.task_done()\n\n class PublicRoutine:\n def __init__(self) -> None:\n self.runs = 0\n\n def run(self) -> None:\n if self.runs == 0:\n self.runs += 1\n\n class PublicWorkerImpl(PublicWorker):\n def __init__(self, routine: PublicRoutine) -> None:\n self._inner = RoutineWorker(\"public-worker\", routine)\n\n @property\n def name(self) -> str:\n return self._inner.name\n\n @property\n def critical(self) -> bool:\n return self._inner.critical\n\n def start(self) -> None:\n self._inner.start()\n\n def stop(self, force: bool = False) -> None:\n self._inner.stop(force=force)\n\n def health(self) -> PublicWorkerHealth:\n return self._inner.health()\n\n def status(self) -> PublicWorkerStatus:\n return self._inner.status()\n\n class PublicExampleModule(PublicApplicationModule):\n @property\n def name(self) -> str:\n return \"public-example\"\n\n def register(self, registry: ModuleRegistry) -> None:\n registry.add_worker(PublicWorkerImpl(PublicRoutine()))\n\n runtime = create_runtime(PublicExampleModule(), config_path=str(config_path))\n runtime.start()\n sleep(0.2)\n assert runtime.configuration.get() == {\"platform\": {}}\n assert runtime.status()[\"workers\"][\"registered\"] == 1\n assert hasattr(plba, \"QueueWorker\") is False\n runtime.stop()", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_runtime.py:test_public_plba_package_exports_runtime_builder_and_worker_contract", + "span_start": 342, + "span_end": 405, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 13, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/__init__.py", + "content": "from app_runtime.config.file_loader import ConfigFileLoader\nfrom app_runtime.config.providers import FileConfigProvider\n\n__all__ = [\"ConfigFileLoader\", \"FileConfigProvider\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/config/__init__.py:1-4", + "span_start": 1, + "span_end": 4, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.config.__init__", + "is_test": false, + "blob_sha": "612918029820a2a983330ec92256142b55b9de4bdf3399ece18e2a02dbad9729", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/providers.py", + "content": "class FileConfigProvider(ConfigProvider):\n def __init__(self, path: str | Path) -> None:\n self._loader = ConfigFileLoader(path)\n\n @property\n def loader(self) -> ConfigFileLoader:\n return self._loader\n\n def load(self) -> dict[str, Any]:\n config = self._loader.load_sync()\n if not isinstance(config, dict):\n raise TypeError(\"Config root must be a mapping\")\n return dict(config)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/config/providers.py:FileConfigProvider", + "span_start": 10, + "span_end": 22, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.config.providers", + "is_test": false, + "blob_sha": "8c53ca0122d6df6c5763bca15e99434bb4daebd5a618b8fc927e9ae90b022e64", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/__init__.py", + "content": "__all__: list[str] = []", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/__init__.py:1-1", + "span_start": 1, + "span_end": 1, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.__init__", + "is_test": false, + "blob_sha": "8eea9df4f6d7b38ca0e39ccc27b04700e3d08dbeec8046d613d22706d19985fa", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "class ConfigFileLoader:\n def __init__(self, path: str | Path) -> None:\n self.path = Path(path)\n self.config: Any = None\n self.last_valid_config: Any = None\n self._last_seen_hash: str | None = None\n\n def read_text(self) -> str:\n return self.path.read_text(encoding=\"utf-8\")\n\n def parse(self, data: str) -> Any:\n suffix = self.path.suffix.lower()\n if suffix in {\".yml\", \".yaml\"}:\n return yaml.safe_load(data)\n return json.loads(data)\n\n def load_sync(self) -> Any:\n data = self.read_text()\n parsed = self.parse(data)\n self.config = parsed\n self.last_valid_config = parsed\n self._last_seen_hash = self._calculate_hash(data)\n return parsed\n\n def load_if_changed(self) -> tuple[bool, Any]:\n data = self.read_text()\n current_hash = self._calculate_hash(data)\n if current_hash == self._last_seen_hash:\n return False, self.config\n parsed = self.parse(data)\n self.config = parsed\n self.last_valid_config = parsed\n self._last_seen_hash = current_hash\n return True, parsed\n\n @staticmethod\n def _calculate_hash(data: str) -> str:\n return hashlib.sha256(data.encode(\"utf-8\")).hexdigest()", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/config/file_loader.py:ConfigFileLoader", + "span_start": 11, + "span_end": 48, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/config.py", + "content": "class ConfigProvider(ABC):\n @abstractmethod\n def load(self) -> dict[str, Any]:\n \"\"\"Return a config fragment.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/contracts/config.py:ConfigProvider", + "span_start": 7, + "span_end": 10, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.config", + "is_test": false, + "blob_sha": "5e773880267743ee94954ea2db120c2d88c54d4312893293d1b89df405283ed4", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/health.py", + "content": "class HealthContributor(ABC):\n @abstractmethod\n def health(self) -> WorkerHealth:\n \"\"\"Return contributor health state.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/contracts/health.py:HealthContributor", + "span_start": 7, + "span_end": 10, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.health", + "is_test": false, + "blob_sha": "6bd92611def7131e32d4dd34a8ed85e6cf3c67722ad27797032a632cb30dc097", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/application.py", + "content": "class ApplicationModule(ABC):\n @property\n @abstractmethod\n def name(self) -> str:\n \"\"\"Module name used for runtime status and diagnostics.\"\"\"\n\n @abstractmethod\n def register(self, registry: ModuleRegistry) -> None:\n \"\"\"Register workers, services, and health contributors.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/contracts/application.py:ApplicationModule", + "span_start": 8, + "span_end": 16, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.application", + "is_test": false, + "blob_sha": "197c35634dca49c352ce3f230295a485fbffb672ce7bb8c08e752bfdf61e7fa4", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "retrieval_report": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "vector", + "C2_DEPENDENCY_GRAPH": "vector", + "C0_SOURCE_CHUNKS": "vector" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C0_SOURCE_CHUNKS": 10 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [] + } + }, + "fallback": { + "used": false, + "reason": null + }, + "retrieval_by_layer_ms": { + "C1_SYMBOL_CATALOG": 33, + "C2_DEPENDENCY_GRAPH": 38, + "C0_SOURCE_CHUNKS": 13 + } + } + }, + "diagnostics": { + "intent_correct": null, + "target_found": true, + "layers_used": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "retrieval_sufficient": true, + "answer_mode": "normal", + "router_result": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "FIND_TESTS", + "path_scope": [], + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "symbol_resolution_status": "resolved" + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Где тесты для create_runtime?", + "sub_intent": "FIND_TESTS", + "path_scope": [], + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 6, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 10, + "empty": false, + "fallback_used": false + } + ], + "empty_layers": [], + "evidence_gate_decision": { + "sufficient": true, + "failure_reasons": [], + "evidence_count": 24 + }, + "failure_reasons": [], + "timings_ms": { + "router": 1, + "retrieval": 85, + "pre_evidence_gate": 0, + "llm": 611 + } + }, + "rag_rows": [ + { + "path": "src/plba/__init__.py", + "content": "const create_runtime\ncreate_runtime = plba.bootstrap.create_runtime", + "layer": "C1_SYMBOL_CATALOG", + "title": "create_runtime", + "span_start": 1, + "span_end": 1, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "fa1e84f16c8c659bcd5448637386af4d15d431064e07714e34689ee64233cb51", + "qname": "create_runtime", + "kind": "const", + "signature": "create_runtime = plba.bootstrap.create_runtime", + "parent_symbol_id": null, + "package_or_module": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "function create_runtime\ncreate_runtime(module)", + "layer": "C1_SYMBOL_CATALOG", + "title": "create_runtime", + "span_start": 8, + "span_end": 29, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "qname": "create_runtime", + "kind": "function", + "signature": "create_runtime(module)", + "parent_symbol_id": null, + "package_or_module": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/__init__.py", + "content": "const FileConfigProvider\nFileConfigProvider = app_runtime.config.providers.FileConfigProvider", + "layer": "C1_SYMBOL_CATALOG", + "title": "FileConfigProvider", + "span_start": 2, + "span_end": 2, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "e449b19e5881889adeb6e056eafe1da30acbae864f06984ea2edc7c15f7cb6d6", + "qname": "FileConfigProvider", + "kind": "const", + "signature": "FileConfigProvider = app_runtime.config.providers.FileConfigProvider", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.__init__", + "is_test": false, + "blob_sha": "612918029820a2a983330ec92256142b55b9de4bdf3399ece18e2a02dbad9729", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "const hashlib\nimport hashlib", + "layer": "C1_SYMBOL_CATALOG", + "title": "hashlib", + "span_start": 3, + "span_end": 3, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "e7375824bd473da3d73d316d22e3cb6428930e2db1ffbd900ce5a8b88427bf05", + "qname": "hashlib", + "kind": "const", + "signature": "import hashlib", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "const json\nimport json", + "layer": "C1_SYMBOL_CATALOG", + "title": "json", + "span_start": 4, + "span_end": 4, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "bb9e2eaf992bfd050f7072d72eed87c55b1a4b001daa034a0f7c630a61bb1d78", + "qname": "json", + "kind": "const", + "signature": "import json", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "const Path\nPath = pathlib.Path", + "layer": "C1_SYMBOL_CATALOG", + "title": "Path", + "span_start": 5, + "span_end": 5, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "b785967ed1fb83aa62d5724c6d6e9c6d2b1505523db39bd941cc39b48db48306", + "qname": "Path", + "kind": "const", + "signature": "Path = pathlib.Path", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "const Any\nAny = typing.Any", + "layer": "C1_SYMBOL_CATALOG", + "title": "Any", + "span_start": 6, + "span_end": 6, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "8e330833b8073585db1c4b4315947c400683a23e4c3d2e2ccbcb260f347541b6", + "qname": "Any", + "kind": "const", + "signature": "Any = typing.Any", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "const annotations\nannotations = __future__.annotations", + "layer": "C1_SYMBOL_CATALOG", + "title": "annotations", + "span_start": 1, + "span_end": 1, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "5ed640ccec43a78659d50ec24f3717bf1144a182c22588f37456649ac6a4a815", + "qname": "annotations", + "kind": "const", + "signature": "annotations = __future__.annotations", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime calls runtime.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:calls", + "span_start": 19, + "span_end": 19, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "4eaeec4ac55a59d5f66fd01c4754955f8fedaf4bc3df13fa769b352c7bfaacbb", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.add_config_file", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime reads_attr runtime.register_module", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:reads_attr", + "span_start": 28, + "span_end": 28, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "45516c79ff358dbf9b650a081668df0f66d2fe989300f985a1a78be6be166f8f", + "edge_type": "reads_attr", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.register_module", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime instantiates RuntimeManager", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:instantiates", + "span_start": 17, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "0adba17984f850ea1608c9e734d2dd5c325cfde3a8133123aa239e44935ad18e", + "edge_type": "instantiates", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": "27158ca220022eeb5083c6addf8a50775d45f7161284fd60aac48410105f4b98", + "dst_ref": "RuntimeManager", + "resolution": "resolved", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime calls runtime.register_module", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:calls", + "span_start": 28, + "span_end": 28, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "ab6003c3441addc1ba1b81edeca009165559f652f6b2cf424e5ae61b1f617de8", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.register_module", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime calls runtime.control_plane.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:calls", + "span_start": 21, + "span_end": 27, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "2678250030b9ce47a3b3b55fac7897ac530367edc8374ac9d5e6ecafb1e483f0", + "edge_type": "calls", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.control_plane.register_channel", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "create_runtime reads_attr runtime.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "create_runtime:reads_attr", + "span_start": 19, + "span_end": 19, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "30d4e8aae984ab84d523e80d02f1caeda52d547fa3d2aa47be8845931cabbca2", + "edge_type": "reads_attr", + "src_symbol_id": "bf07296d9990db302024370ae28446c5a392411cc7188f4607c37a888f125dc3", + "src_qname": "create_runtime", + "dst_symbol_id": null, + "dst_ref": "runtime.add_config_file", + "resolution": "partial", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/__init__.py", + "content": "from plba.bootstrap import create_runtime\nfrom plba.config import ConfigFileLoader, FileConfigProvider\nfrom plba.control import ControlActionSet, ControlChannel, ControlPlaneService, HttpControlChannel\nfrom plba.contracts import (\n ApplicationModule,\n ConfigProvider,\n HealthContributor,\n TraceContext,\n TraceContextRecord,\n TraceLogMessage,\n TraceTransport,\n Worker,\n WorkerHealth,\n WorkerStatus,\n)\nfrom plba.core import ConfigurationManager, RuntimeManager, ServiceContainer\nfrom plba.health import HealthRegistry\nfrom plba.logging import LogManager\nfrom plba.queue import InMemoryTaskQueue\nfrom plba.tracing import MySqlTraceTransport, NoOpTraceTransport, TraceService\nfrom plba.workflow import (\n StepResult,\n WorkflowContext,\n WorkflowDefinition,\n WorkflowEngine,\n WorkflowEngineHooks,\n WorkflowNode,\n WorkflowRuntimeFactory,\n WorkflowStep,\n)\nfrom plba.workers import WorkerSupervisor\n\n__all__ = [\n \"ApplicationModule\",\n \"ConfigFileLoader\",\n \"ConfigProvider\",\n \"ConfigurationManager\",\n \"ControlActionSet\",\n \"ControlChannel\",\n \"ControlPlaneService\",\n \"create_runtime\",\n \"FileConfigProvider\",\n \"HealthContributor\",\n \"HealthRegistry\",\n \"HttpControlChannel\",\n \"InMemoryTaskQueue\",\n \"LogManager\",\n \"MySqlTraceTransport\",\n \"NoOpTraceTransport\",\n \"RuntimeManager\",\n \"ServiceContainer\",\n \"TraceContext\",\n \"TraceContextRecord\",\n \"TraceLogMessage\",\n \"TraceService\",\n \"TraceTransport\",\n \"StepResult\",\n \"Worker\",\n \"WorkerHealth\",\n \"WorkerStatus\",\n \"WorkflowContext\",\n \"WorkflowDefinition\",\n \"WorkflowEngine\",\n \"WorkflowEngineHooks\",\n \"WorkflowNode\",\n \"WorkflowRuntimeFactory\",\n \"WorkflowStep\",\n \"WorkerSupervisor\",\n]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/__init__.py:1-69", + "span_start": 1, + "span_end": 69, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/bootstrap.py", + "content": "def create_runtime(\n module: ApplicationModule,\n *,\n config_path: str | None = None,\n enable_http_control: bool = False,\n control_host: str = \"127.0.0.1\",\n control_port: int = 8080,\n control_timeout: int = 5,\n) -> RuntimeManager:\n runtime = RuntimeManager()\n if config_path is not None:\n runtime.add_config_file(config_path)\n if enable_http_control:\n runtime.control_plane.register_channel(\n HttpControlChannel(\n host=control_host,\n port=control_port,\n timeout=control_timeout,\n )\n )\n runtime.register_module(module)\n return runtime", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/bootstrap.py:create_runtime", + "span_start": 8, + "span_end": 29, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "def test_public_plba_package_exports_runtime_builder_and_worker_contract(tmp_path) -> None:\n import plba\n from plba import ApplicationModule as PublicApplicationModule\n from plba import InMemoryTaskQueue\n from plba import Worker as PublicWorker\n from plba import WorkerHealth as PublicWorkerHealth\n from plba import WorkerStatus as PublicWorkerStatus\n from plba import create_runtime\n\n config_path = tmp_path / \"config.yml\"\n config_path.write_text(\"platform: {}\\n\", encoding=\"utf-8\")\n\n queue = InMemoryTaskQueue[int]()\n queue.put(2)\n assert queue.get(timeout=0.01) == 2\n queue.task_done()\n\n class PublicRoutine:\n def __init__(self) -> None:\n self.runs = 0\n\n def run(self) -> None:\n if self.runs == 0:\n self.runs += 1\n\n class PublicWorkerImpl(PublicWorker):\n def __init__(self, routine: PublicRoutine) -> None:\n self._inner = RoutineWorker(\"public-worker\", routine)\n\n @property\n def name(self) -> str:\n return self._inner.name\n\n @property\n def critical(self) -> bool:\n return self._inner.critical\n\n def start(self) -> None:\n self._inner.start()\n\n def stop(self, force: bool = False) -> None:\n self._inner.stop(force=force)\n\n def health(self) -> PublicWorkerHealth:\n return self._inner.health()\n\n def status(self) -> PublicWorkerStatus:\n return self._inner.status()\n\n class PublicExampleModule(PublicApplicationModule):\n @property\n def name(self) -> str:\n return \"public-example\"\n\n def register(self, registry: ModuleRegistry) -> None:\n registry.add_worker(PublicWorkerImpl(PublicRoutine()))\n\n runtime = create_runtime(PublicExampleModule(), config_path=str(config_path))\n runtime.start()\n sleep(0.2)\n assert runtime.configuration.get() == {\"platform\": {}}\n assert runtime.status()[\"workers\"][\"registered\"] == 1\n assert hasattr(plba, \"QueueWorker\") is False\n runtime.stop()", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_runtime.py:test_public_plba_package_exports_runtime_builder_and_worker_contract", + "span_start": 342, + "span_end": 405, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 13, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/__init__.py", + "content": "from app_runtime.config.file_loader import ConfigFileLoader\nfrom app_runtime.config.providers import FileConfigProvider\n\n__all__ = [\"ConfigFileLoader\", \"FileConfigProvider\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/config/__init__.py:1-4", + "span_start": 1, + "span_end": 4, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.config.__init__", + "is_test": false, + "blob_sha": "612918029820a2a983330ec92256142b55b9de4bdf3399ece18e2a02dbad9729", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/providers.py", + "content": "class FileConfigProvider(ConfigProvider):\n def __init__(self, path: str | Path) -> None:\n self._loader = ConfigFileLoader(path)\n\n @property\n def loader(self) -> ConfigFileLoader:\n return self._loader\n\n def load(self) -> dict[str, Any]:\n config = self._loader.load_sync()\n if not isinstance(config, dict):\n raise TypeError(\"Config root must be a mapping\")\n return dict(config)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/config/providers.py:FileConfigProvider", + "span_start": 10, + "span_end": 22, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.config.providers", + "is_test": false, + "blob_sha": "8c53ca0122d6df6c5763bca15e99434bb4daebd5a618b8fc927e9ae90b022e64", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/__init__.py", + "content": "__all__: list[str] = []", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/__init__.py:1-1", + "span_start": 1, + "span_end": 1, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.__init__", + "is_test": false, + "blob_sha": "8eea9df4f6d7b38ca0e39ccc27b04700e3d08dbeec8046d613d22706d19985fa", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "class ConfigFileLoader:\n def __init__(self, path: str | Path) -> None:\n self.path = Path(path)\n self.config: Any = None\n self.last_valid_config: Any = None\n self._last_seen_hash: str | None = None\n\n def read_text(self) -> str:\n return self.path.read_text(encoding=\"utf-8\")\n\n def parse(self, data: str) -> Any:\n suffix = self.path.suffix.lower()\n if suffix in {\".yml\", \".yaml\"}:\n return yaml.safe_load(data)\n return json.loads(data)\n\n def load_sync(self) -> Any:\n data = self.read_text()\n parsed = self.parse(data)\n self.config = parsed\n self.last_valid_config = parsed\n self._last_seen_hash = self._calculate_hash(data)\n return parsed\n\n def load_if_changed(self) -> tuple[bool, Any]:\n data = self.read_text()\n current_hash = self._calculate_hash(data)\n if current_hash == self._last_seen_hash:\n return False, self.config\n parsed = self.parse(data)\n self.config = parsed\n self.last_valid_config = parsed\n self._last_seen_hash = current_hash\n return True, parsed\n\n @staticmethod\n def _calculate_hash(data: str) -> str:\n return hashlib.sha256(data.encode(\"utf-8\")).hexdigest()", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/config/file_loader.py:ConfigFileLoader", + "span_start": 11, + "span_end": 48, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/config.py", + "content": "class ConfigProvider(ABC):\n @abstractmethod\n def load(self) -> dict[str, Any]:\n \"\"\"Return a config fragment.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/contracts/config.py:ConfigProvider", + "span_start": 7, + "span_end": 10, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.config", + "is_test": false, + "blob_sha": "5e773880267743ee94954ea2db120c2d88c54d4312893293d1b89df405283ed4", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/health.py", + "content": "class HealthContributor(ABC):\n @abstractmethod\n def health(self) -> WorkerHealth:\n \"\"\"Return contributor health state.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/contracts/health.py:HealthContributor", + "span_start": 7, + "span_end": 10, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.health", + "is_test": false, + "blob_sha": "6bd92611def7131e32d4dd34a8ed85e6cf3c67722ad27797032a632cb30dc097", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/application.py", + "content": "class ApplicationModule(ABC):\n @property\n @abstractmethod\n def name(self) -> str:\n \"\"\"Module name used for runtime status and diagnostics.\"\"\"\n\n @abstractmethod\n def register(self, registry: ModuleRegistry) -> None:\n \"\"\"Register workers, services, and health contributors.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/contracts/application.py:ApplicationModule", + "span_start": 8, + "span_end": 16, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.application", + "is_test": false, + "blob_sha": "197c35634dca49c352ce3f230295a485fbffb672ce7bb8c08e752bfdf61e7fa4", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "validation": { + "passed": true, + "action": "return", + "reasons": [] + }, + "steps": [ + { + "step": "router", + "status": "completed", + "timings_ms": { + "router": 1 + }, + "output": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + } + }, + { + "step": "retrieval", + "status": "completed", + "timings_ms": { + "retrieval": 85 + }, + "output": { + "rag_count": 24, + "answer_path_rag_count": 24, + "resolved_symbol_status": "resolved", + "resolved_symbol": "create_runtime", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "diagnostics": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "vector", + "C2_DEPENDENCY_GRAPH": "vector", + "C0_SOURCE_CHUNKS": "vector" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C0_SOURCE_CHUNKS": 10 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [] + } + }, + "fallback": { + "used": false, + "reason": null + }, + "retrieval_by_layer_ms": { + "C1_SYMBOL_CATALOG": 33, + "C2_DEPENDENCY_GRAPH": 38, + "C0_SOURCE_CHUNKS": 13 + } + } + }, + { + "step": "pre_evidence_gate", + "status": "passed", + "timings_ms": { + "pre_evidence_gate": 0 + }, + "output": { + "passed": true, + "failure_reasons": [], + "degraded_message": "" + } + }, + { + "step": "llm", + "status": "completed", + "timings_ms": { + "llm": 611 + }, + "output": { + "prompt_name": "code_qa_find_tests_answer", + "answer_preview": "Прямых тестов для `create_runtime` не обнаружено. Ближайший тест расположен в файле `tests/test_runtime.py`, но он проверяет экспорт публичных контрактов пакета PLBA, а не непосредственно сам метод `create_runtime`. Косвенное покрытие отсутствует." + } + }, + { + "step": "post_evidence_gate", + "status": "passed", + "timings_ms": { + "post_evidence_gate": 0, + "repair": 0 + }, + "output": { + "passed": true, + "reasons": [], + "repair_used": false + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-find-tests-create-runtime.md b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-find-tests-create-runtime.md new file mode 100644 index 0000000..27c5266 --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-find-tests-create-runtime.md @@ -0,0 +1,211 @@ +# plba-v2-find-tests-create-runtime + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: agent_runtime +- mode: full_chain +- passed: True + +## Query +Где тесты для create_runtime? + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 24, + "llm_answer": "Прямых тестов для `create_runtime` не обнаружено. Ближайший тест расположен в файле `tests/test_runtime.py`, но он проверяет экспорт публичных контрактов пакета PLBA, а не непосредственно сам метод `create_runtime`. Косвенное покрытие отсутствует.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "create_runtime" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] +} + +## Steps +[ + { + "step": "router", + "status": "completed", + "timings_ms": { + "router": 1 + }, + "output": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + } + }, + { + "step": "retrieval", + "status": "completed", + "timings_ms": { + "retrieval": 85 + }, + "output": { + "rag_count": 24, + "answer_path_rag_count": 24, + "resolved_symbol_status": "resolved", + "resolved_symbol": "create_runtime", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "diagnostics": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "vector", + "C2_DEPENDENCY_GRAPH": "vector", + "C0_SOURCE_CHUNKS": "vector" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C0_SOURCE_CHUNKS": 10 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [] + } + }, + "fallback": { + "used": false, + "reason": null + }, + "retrieval_by_layer_ms": { + "C1_SYMBOL_CATALOG": 33, + "C2_DEPENDENCY_GRAPH": 38, + "C0_SOURCE_CHUNKS": 13 + } + } + }, + { + "step": "pre_evidence_gate", + "status": "passed", + "timings_ms": { + "pre_evidence_gate": 0 + }, + "output": { + "passed": true, + "failure_reasons": [], + "degraded_message": "" + } + }, + { + "step": "llm", + "status": "completed", + "timings_ms": { + "llm": 611 + }, + "output": { + "prompt_name": "code_qa_find_tests_answer", + "answer_preview": "Прямых тестов для `create_runtime` не обнаружено. Ближайший тест расположен в файле `tests/test_runtime.py`, но он проверяет экспорт публичных контрактов пакета PLBA, а не непосредственно сам метод `create_runtime`. Косвенное покрытие отсутствует." + } + }, + { + "step": "post_evidence_gate", + "status": "passed", + "timings_ms": { + "post_evidence_gate": 0, + "repair": 0 + }, + "output": { + "passed": true, + "reasons": [], + "repair_used": false + } + } +] + +## Diagnostics +{ + "intent_correct": null, + "target_found": true, + "layers_used": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "retrieval_sufficient": true, + "answer_mode": "normal", + "router_result": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "FIND_TESTS", + "path_scope": [], + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "symbol_resolution_status": "resolved" + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Где тесты для create_runtime?", + "sub_intent": "FIND_TESTS", + "path_scope": [], + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 6, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 10, + "empty": false, + "fallback_used": false + } + ], + "empty_layers": [], + "evidence_gate_decision": { + "sufficient": true, + "failure_reasons": [], + "evidence_count": 24 + }, + "failure_reasons": [], + "timings_ms": { + "router": 1, + "retrieval": 85, + "pre_evidence_gate": 0, + "llm": 611 + } +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-find-tests-runtime-manager.json b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-find-tests-runtime-manager.json new file mode 100644 index 0000000..fe9f75a --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-find-tests-runtime-manager.json @@ -0,0 +1,3248 @@ +{ + "case_id": "plba-v2-find-tests-runtime-manager", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "agent_runtime", + "mode": "full_chain", + "query": "Где тесты для RuntimeManager?", + "actual": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 24, + "llm_answer": "Прямые тесты для `RuntimeManager` находятся в файле `tests/test_runtime.py`. Эти тесты проверяют инициализацию и поведение объекта `RuntimeManager`.\n\nКосвенных тестов, явно связанных с `RuntimeManager`, больше нигде не обнаружено.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "query": "Где тесты для RuntimeManager?", + "router_result": { + "schema_version": "1.1", + "intent": "CODE_QA", + "retrieval_profile": "code", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query_plan": { + "raw": "Где тесты для RuntimeManager?", + "normalized": "Где тесты для RuntimeManager?", + "sub_intent": "FIND_TESTS", + "negations": [], + "expansions": [ + "test", + "unit test", + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "doc_scope_hints": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "symbol_kind_hint": "class", + "anchors": [ + { + "type": "SYMBOL", + "value": "RuntimeManager", + "source": "user_text", + "subtype": null, + "span": { + "start": 14, + "end": 28 + }, + "confidence": 0.88 + }, + { + "type": "KEY_TERM", + "value": "тест", + "source": "user_text", + "subtype": null, + "span": { + "start": 4, + "end": 9 + }, + "confidence": 0.9 + } + ] + }, + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "top_k": 8 + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "top_k": 6 + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 10 + } + ], + "filters": { + "test_policy": "INCLUDE", + "path_scope": [], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "test_file_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "test_symbol_patterns": [ + "test_runtime_manager", + "TestRuntimeManager", + "RuntimeManager" + ], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager", + "RuntimeManager", + "RuntimeManager", + "RuntimeManager", + "RuntimeManager" + ], + "confidence": 0.99 + }, + "evidence_policy": { + "require_def": true, + "require_flow": true, + "require_spec": false, + "allow_answer_without_evidence": false + } + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Где тесты для RuntimeManager?", + "sub_intent": "FIND_TESTS", + "path_scope": [], + "keyword_hints": [ + "RuntimeManager" + ], + "symbol_candidates": [ + "RuntimeManager" + ], + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "top_k": 8 + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "top_k": 6 + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 10 + } + ], + "filters": { + "test_policy": "INCLUDE", + "path_scope": [], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "test_file_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "test_symbol_patterns": [ + "test_runtime_manager", + "TestRuntimeManager", + "RuntimeManager" + ], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + }, + "query_plan": { + "raw": "Где тесты для RuntimeManager?", + "normalized": "Где тесты для RuntimeManager?", + "sub_intent": "FIND_TESTS", + "negations": [], + "expansions": [ + "test", + "unit test", + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "doc_scope_hints": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "symbol_kind_hint": "class", + "anchors": [ + { + "type": "SYMBOL", + "value": "RuntimeManager", + "source": "user_text", + "subtype": null, + "span": { + "start": 14, + "end": 28 + }, + "confidence": 0.88 + }, + { + "type": "KEY_TERM", + "value": "тест", + "source": "user_text", + "subtype": null, + "span": { + "start": 4, + "end": 9 + }, + "confidence": 0.9 + } + ] + } + }, + "retrieval_result": { + "target_symbol_candidates": [ + "RuntimeManager", + "ControlPlaneService" + ], + "resolved_symbol": "RuntimeManager", + "symbol_resolution_status": "resolved", + "file_candidates": [ + "src/plba/bootstrap.py", + "tests/test_runtime.py", + "src/app_runtime/core/runtime.py", + "src/plba/__init__.py", + "src/plba/core.py", + "tests/test_business_control_actions.py", + "src/app_runtime/control/service.py", + "src/app_runtime/control/__init__.py", + "src/plba/control.py", + "src/app_runtime/control/http_channel.py", + "src/app_runtime/control/http_app.py", + "src/app_runtime/control/http_runner.py", + "src/app_runtime/control/base.py" + ], + "code_chunks": [ + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/plba/bootstrap.py", + "title": "RuntimeManager", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "start_line": 4, + "end_line": 4, + "metadata": { + "symbol_id": "27158ca220022eeb5083c6addf8a50775d45f7161284fd60aac48410105f4b98", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "tests/test_runtime.py", + "title": "RuntimeManager", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "start_line": 12, + "end_line": 12, + "metadata": { + "symbol_id": "aeadc039653807b0da1ca6e3cc1078ee61cfc510b28e7f9c2ec04c59da43cc8d", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/core/runtime.py", + "title": "RuntimeManager", + "content": "class RuntimeManager\nRuntimeManager", + "start_line": 18, + "end_line": 179, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "qname": "RuntimeManager", + "kind": "class", + "signature": "RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/plba/__init__.py", + "title": "RuntimeManager", + "content": "const RuntimeManager\nRuntimeManager = plba.core.RuntimeManager", + "start_line": 16, + "end_line": 16, + "metadata": { + "symbol_id": "7eacec84f9b8d6c4201374591faecdac7493091c263681495c338973f2971ad9", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = plba.core.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/plba/core.py", + "title": "RuntimeManager", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "start_line": 2, + "end_line": 2, + "metadata": { + "symbol_id": "e1684562d978b7af7fe9b27dc5869d770348a87b5dc19a50360f58544668578b", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.core", + "is_test": false, + "blob_sha": "c0ae25110d20e665216616e26b68adfe035b624ba45d31d1272fb21f906f9ca8", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "tests/test_business_control_actions.py", + "title": "RuntimeManager", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "start_line": 14, + "end_line": 14, + "metadata": { + "symbol_id": "a1572ea8183dc0cd6ddbc74342bbde8c28cecfde37ad40b62feff09f8d103d11", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/service.py", + "title": "RuntimeManager", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "start_line": 9, + "end_line": 9, + "metadata": { + "symbol_id": "62a9575c77aad894120d18b4f2a08cf2ba42f77e9be4a8a432b767d157701afe", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/__init__.py", + "title": "ControlPlaneService", + "content": "const ControlPlaneService\nControlPlaneService = app_runtime.control.service.ControlPlaneService", + "start_line": 3, + "end_line": 3, + "metadata": { + "symbol_id": "217e8f044d1c01644bf7b81e5046af9e84469210c692a2fb0c476a19bb069ae1", + "qname": "ControlPlaneService", + "kind": "const", + "signature": "ControlPlaneService = app_runtime.control.service.ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "start_line": 14, + "end_line": 25, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "start_line": 14, + "end_line": 51, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "start_line": 14, + "end_line": 17, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "start_line": 14, + "end_line": 20, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "start_line": 14, + "end_line": 47, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/core/runtime.py", + "title": "RuntimeManager.__init__:dataflow_slice", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file", + "start_line": 32, + "end_line": 52, + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/plba/control.py", + "title": "src/plba/control.py:1-10", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\n \"ControlActionSet\",\n \"ControlChannel\",\n \"ControlPlaneService\",\n \"HttpControlChannel\",\n]", + "start_line": 1, + "end_line": 10, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.control", + "is_test": false, + "blob_sha": "31bd5c4481bfa7fbca8fae56d4860a67e3953ca74474ac8439e1f39b685d7bc8", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "tests/test_business_control_actions.py", + "title": "tests/test_business_control_actions.py:IntervalRoutine", + "content": "class IntervalRoutine:\n calls: list[float] = field(default_factory=list)\n _lock: Lock = field(default_factory=Lock)\n\n def run(self) -> None:\n with self._lock:\n self.calls.append(monotonic())\n\n def wait_runs(self, count: int, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n with self._lock:\n if len(self.calls) >= count:\n return True\n sleep(0.01)\n return False\n\n def deltas(self) -> list[float]:\n with self._lock:\n return [self.calls[index + 1] - self.calls[index] for index in range(len(self.calls) - 1)]", + "start_line": 18, + "end_line": 37, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/http_channel.py", + "title": "src/app_runtime/control/http_channel.py:HttpControlChannel", + "content": "class HttpControlChannel(ControlChannel):\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._timeout = timeout\n self._runner = UvicornThreadRunner(host, port, timeout)\n self._factory = HttpControlAppFactory()\n self._actions: ControlActionSet | None = None\n\n async def start(self, actions: ControlActionSet) -> None:\n self._actions = actions\n app = self._factory.create(self._health_response, self._action_response)\n await self._runner.start(app)\n\n async def stop(self) -> None:\n await self._runner.stop()\n\n @property\n def port(self) -> int:\n return self._runner.port\n\n async def _health_response(self) -> dict[str, object]:\n if self._actions is None:\n return {\"status\": \"unhealthy\", \"detail\": \"control actions are not configured\"}\n return await asyncio.wait_for(self._actions.health(), timeout=float(self._timeout))\n\n async def _action_response(self, action: str, _client_source: str = \"unknown\") -> JSONResponse:\n if self._actions is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"{action} handler is not configured\"}, status_code=404)\n callbacks = {\n \"start\": self._actions.start,\n \"stop\": self._actions.stop,\n \"status\": self._actions.status,\n }\n callback = callbacks.get(action)\n if callback is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"unsupported action: {action}\"}, status_code=404)\n action_timeout = max(float(self._timeout), 10.0) if action in {\"start\", \"stop\"} else float(self._timeout)\n try:\n detail = await asyncio.wait_for(callback(), timeout=action_timeout)\n except asyncio.TimeoutError:\n return JSONResponse(\n content={\"status\": \"accepted\", \"detail\": f\"{action} operation is still in progress\"},\n status_code=202,\n )\n except Exception as exc:\n return JSONResponse(content={\"status\": \"error\", \"detail\": str(exc)}, status_code=500)\n return JSONResponse(content={\"status\": \"ok\", \"detail\": detail or f\"{action} action accepted\"}, status_code=200)", + "start_line": 12, + "end_line": 57, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/http_app.py", + "title": "src/app_runtime/control/http_app.py:HttpControlAppFactory", + "content": "class HttpControlAppFactory:\n def create(\n self,\n health_provider: Callable[[], Awaitable[HealthPayload]],\n action_provider: Callable[[str, str], Awaitable[JSONResponse]],\n ) -> FastAPI:\n app = FastAPI(title=\"PLBA Control API\")\n\n @app.middleware(\"http\")\n async def log_api_call(request: Request, call_next): # type: ignore[no-untyped-def]\n started = time.monotonic()\n response = await call_next(request)\n response.headers[\"X-Response-Time-Ms\"] = str(int((time.monotonic() - started) * 1000))\n return response\n\n @app.get(\"/health\")\n async def health() -> JSONResponse:\n payload = await health_provider()\n status_code = 200 if payload.get(\"status\") == \"ok\" else 503\n return JSONResponse(content=payload, status_code=status_code)\n\n @app.get(\"/actions/{action}\")\n @app.post(\"/actions/{action}\")\n async def action(action: str, request: Request) -> JSONResponse:\n client_source = self._client_source(request)\n if action in {\"start\", \"stop\"}:\n LOGGER.warning(\"Control action requested: /actions/%s client=%s\", action, client_source)\n return await action_provider(action, client_source)\n\n return app\n\n def _client_source(self, request: Request) -> str:\n explicit_header = request.headers.get(\"X-Client-Source\", \"\").strip()\n if explicit_header:\n return explicit_header\n user_agent = request.headers.get(\"User-Agent\", \"\").strip()\n if user_agent:\n return f\"user-agent:{user_agent}\"\n return \"unknown\"", + "start_line": 15, + "end_line": 53, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/http_runner.py", + "title": "src/app_runtime/control/http_runner.py:UvicornThreadRunner", + "content": "class UvicornThreadRunner:\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._host = host\n self._port = port\n self._timeout = timeout\n self._server: Server | None = None\n self._thread: Thread | None = None\n self._error: BaseException | None = None\n\n async def start(self, app: FastAPI) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._error = None\n config = Config(app=app, host=self._host, port=self._port, log_level=\"warning\")\n self._server = Server(config)\n self._thread = Thread(target=self._serve, name=\"plba-http-control\", daemon=True)\n self._thread.start()\n await self._wait_until_started()\n\n async def stop(self) -> None:\n if self._server is None or self._thread is None:\n return\n self._server.should_exit = True\n await asyncio.to_thread(self._thread.join, self._timeout)\n self._server = None\n self._thread = None\n\n @property\n def port(self) -> int:\n if self._server is None or not getattr(self._server, \"servers\", None):\n return self._port\n socket = self._server.servers[0].sockets[0]\n return int(socket.getsockname()[1])\n\n async def _wait_until_started(self) -> None:\n if self._server is None:\n raise RuntimeError(\"Server is not initialized\")\n deadline = asyncio.get_running_loop().time() + max(float(self._timeout), 1.0)\n while not self._server.started:\n if self._error is not None:\n raise RuntimeError(\"HTTP control server failed to start\") from self._error\n if asyncio.get_running_loop().time() >= deadline:\n raise TimeoutError(\"HTTP control server startup timed out\")\n await asyncio.sleep(0.05)\n\n def _serve(self) -> None:\n if self._server is None:\n return\n try:\n asyncio.run(self._server.serve())\n except BaseException as exc: # noqa: BLE001\n self._error = exc", + "start_line": 10, + "end_line": 61, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_runner", + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/service.py", + "title": "src/app_runtime/control/service.py:ControlPlaneService", + "content": "class ControlPlaneService:\n def __init__(self) -> None:\n self._channels: list[ControlChannel] = []\n\n def register_channel(self, channel: ControlChannel) -> None:\n self._channels.append(channel)\n\n def start(self, runtime: RuntimeManager) -> None:\n if not self._channels:\n return\n asyncio.run(self._start_async(runtime))\n\n def stop(self) -> None:\n if not self._channels:\n return\n asyncio.run(self._stop_async())\n\n def snapshot(self, runtime: RuntimeManager) -> dict[str, object]:\n health = runtime.current_health()\n return {\n \"runtime\": {\"state\": runtime._state.value},\n \"modules\": list(runtime.registry.modules),\n \"services\": runtime.services.snapshot(),\n \"workers\": runtime.workers.snapshot(),\n \"health\": runtime.health.snapshot(runtime.workers.healths()) | {\"status\": health[\"status\"]},\n \"config\": runtime.configuration.get(),\n }\n\n async def _start_async(self, runtime: RuntimeManager) -> None:\n actions = ControlActionSet(\n health=runtime.health_status,\n start=runtime.start_runtime,\n stop=runtime.stop_runtime,\n status=runtime.runtime_status,\n )\n for channel in self._channels:\n await channel.start(actions)\n\n async def _stop_async(self) -> None:\n for channel in reversed(self._channels):\n await channel.stop()", + "start_line": 12, + "end_line": 52, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/base.py", + "title": "src/app_runtime/control/base.py:ControlActionSet", + "content": "class ControlActionSet:\n health: HealthHandler\n start: ActionHandler\n stop: ActionHandler\n status: ActionHandler", + "start_line": 14, + "end_line": 18, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/__init__.py", + "title": "src/app_runtime/control/__init__.py:1-5", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\"ControlActionSet\", \"ControlChannel\", \"ControlPlaneService\", \"HttpControlChannel\"]", + "start_line": 1, + "end_line": 5, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/base.py", + "title": "src/app_runtime/control/base.py:ControlChannel", + "content": "class ControlChannel(ABC):\n @abstractmethod\n async def start(self, actions: ControlActionSet) -> None:\n \"\"\"Start the control channel and bind handlers.\"\"\"\n\n @abstractmethod\n async def stop(self) -> None:\n \"\"\"Stop the control channel and release resources.\"\"\"", + "start_line": 21, + "end_line": 28, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "tests/test_business_control_actions.py", + "title": "tests/test_business_control_actions.py:BlockingRoutine", + "content": "class BlockingRoutine:\n def __init__(self, started: Event, release: Event) -> None:\n self._started = started\n self._release = release\n\n def run(self) -> None:\n self._started.set()\n self._release.wait(timeout=5.0)", + "start_line": 40, + "end_line": 47, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "relations": [ + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop" + }, + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async" + }, + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel" + }, + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start" + }, + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async" + }, + { + "path": "src/app_runtime/core/runtime.py", + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file" + } + ], + "entrypoints": [], + "test_candidates": [ + { + "path": "tests/test_business_control_actions.py", + "title": "tests/test_business_control_actions.py:IntervalRoutine", + "content": "class IntervalRoutine:\n calls: list[float] = field(default_factory=list)\n _lock: Lock = field(default_factory=Lock)\n\n def run(self) -> None:\n with self._lock:\n self.calls.append(monotonic())\n\n def wait_runs(self, count: int, timeout: float) -> bool:\n deadline = m" + }, + { + "path": "tests/test_business_control_actions.py", + "title": "tests/test_business_control_actions.py:BlockingRoutine", + "content": "class BlockingRoutine:\n def __init__(self, started: Event, release: Event) -> None:\n self._started = started\n self._release = release\n\n def run(self) -> None:\n self._started.set()\n self._release.wait(timeout=5.0)" + } + ], + "layer_outcomes": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 6, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 10, + "empty": false, + "fallback_used": false + } + ], + "missing_layers": [], + "raw_rows": [ + { + "path": "src/plba/bootstrap.py", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 4, + "span_end": 4, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "27158ca220022eeb5083c6addf8a50775d45f7161284fd60aac48410105f4b98", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 12, + "span_end": 12, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "aeadc039653807b0da1ca6e3cc1078ee61cfc510b28e7f9c2ec04c59da43cc8d", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager\nRuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "qname": "RuntimeManager", + "kind": "class", + "signature": "RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/__init__.py", + "content": "const RuntimeManager\nRuntimeManager = plba.core.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 16, + "span_end": 16, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "7eacec84f9b8d6c4201374591faecdac7493091c263681495c338973f2971ad9", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = plba.core.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/core.py", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 2, + "span_end": 2, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "e1684562d978b7af7fe9b27dc5869d770348a87b5dc19a50360f58544668578b", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.core", + "is_test": false, + "blob_sha": "c0ae25110d20e665216616e26b68adfe035b624ba45d31d1272fb21f906f9ca8", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 14, + "span_end": 14, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "a1572ea8183dc0cd6ddbc74342bbde8c28cecfde37ad40b62feff09f8d103d11", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 9, + "span_end": 9, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "62a9575c77aad894120d18b4f2a08cf2ba42f77e9be4a8a432b767d157701afe", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "const ControlPlaneService\nControlPlaneService = app_runtime.control.service.ControlPlaneService", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlPlaneService", + "span_start": 3, + "span_end": 3, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "217e8f044d1c01644bf7b81e5046af9e84469210c692a2fb0c476a19bb069ae1", + "qname": "ControlPlaneService", + "kind": "const", + "signature": "ControlPlaneService = app_runtime.control.service.ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 52, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/control.py", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\n \"ControlActionSet\",\n \"ControlChannel\",\n \"ControlPlaneService\",\n \"HttpControlChannel\",\n]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/control.py:1-10", + "span_start": 1, + "span_end": 10, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.control", + "is_test": false, + "blob_sha": "31bd5c4481bfa7fbca8fae56d4860a67e3953ca74474ac8439e1f39b685d7bc8", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class IntervalRoutine:\n calls: list[float] = field(default_factory=list)\n _lock: Lock = field(default_factory=Lock)\n\n def run(self) -> None:\n with self._lock:\n self.calls.append(monotonic())\n\n def wait_runs(self, count: int, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n with self._lock:\n if len(self.calls) >= count:\n return True\n sleep(0.01)\n return False\n\n def deltas(self) -> list[float]:\n with self._lock:\n return [self.calls[index + 1] - self.calls[index] for index in range(len(self.calls) - 1)]", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:IntervalRoutine", + "span_start": 18, + "span_end": 37, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel(ControlChannel):\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._timeout = timeout\n self._runner = UvicornThreadRunner(host, port, timeout)\n self._factory = HttpControlAppFactory()\n self._actions: ControlActionSet | None = None\n\n async def start(self, actions: ControlActionSet) -> None:\n self._actions = actions\n app = self._factory.create(self._health_response, self._action_response)\n await self._runner.start(app)\n\n async def stop(self) -> None:\n await self._runner.stop()\n\n @property\n def port(self) -> int:\n return self._runner.port\n\n async def _health_response(self) -> dict[str, object]:\n if self._actions is None:\n return {\"status\": \"unhealthy\", \"detail\": \"control actions are not configured\"}\n return await asyncio.wait_for(self._actions.health(), timeout=float(self._timeout))\n\n async def _action_response(self, action: str, _client_source: str = \"unknown\") -> JSONResponse:\n if self._actions is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"{action} handler is not configured\"}, status_code=404)\n callbacks = {\n \"start\": self._actions.start,\n \"stop\": self._actions.stop,\n \"status\": self._actions.status,\n }\n callback = callbacks.get(action)\n if callback is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"unsupported action: {action}\"}, status_code=404)\n action_timeout = max(float(self._timeout), 10.0) if action in {\"start\", \"stop\"} else float(self._timeout)\n try:\n detail = await asyncio.wait_for(callback(), timeout=action_timeout)\n except asyncio.TimeoutError:\n return JSONResponse(\n content={\"status\": \"accepted\", \"detail\": f\"{action} operation is still in progress\"},\n status_code=202,\n )\n except Exception as exc:\n return JSONResponse(content={\"status\": \"error\", \"detail\": str(exc)}, status_code=500)\n return JSONResponse(content={\"status\": \"ok\", \"detail\": detail or f\"{action} action accepted\"}, status_code=200)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_channel.py:HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "class HttpControlAppFactory:\n def create(\n self,\n health_provider: Callable[[], Awaitable[HealthPayload]],\n action_provider: Callable[[str, str], Awaitable[JSONResponse]],\n ) -> FastAPI:\n app = FastAPI(title=\"PLBA Control API\")\n\n @app.middleware(\"http\")\n async def log_api_call(request: Request, call_next): # type: ignore[no-untyped-def]\n started = time.monotonic()\n response = await call_next(request)\n response.headers[\"X-Response-Time-Ms\"] = str(int((time.monotonic() - started) * 1000))\n return response\n\n @app.get(\"/health\")\n async def health() -> JSONResponse:\n payload = await health_provider()\n status_code = 200 if payload.get(\"status\") == \"ok\" else 503\n return JSONResponse(content=payload, status_code=status_code)\n\n @app.get(\"/actions/{action}\")\n @app.post(\"/actions/{action}\")\n async def action(action: str, request: Request) -> JSONResponse:\n client_source = self._client_source(request)\n if action in {\"start\", \"stop\"}:\n LOGGER.warning(\"Control action requested: /actions/%s client=%s\", action, client_source)\n return await action_provider(action, client_source)\n\n return app\n\n def _client_source(self, request: Request) -> str:\n explicit_header = request.headers.get(\"X-Client-Source\", \"\").strip()\n if explicit_header:\n return explicit_header\n user_agent = request.headers.get(\"User-Agent\", \"\").strip()\n if user_agent:\n return f\"user-agent:{user_agent}\"\n return \"unknown\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_app.py:HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "class UvicornThreadRunner:\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._host = host\n self._port = port\n self._timeout = timeout\n self._server: Server | None = None\n self._thread: Thread | None = None\n self._error: BaseException | None = None\n\n async def start(self, app: FastAPI) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._error = None\n config = Config(app=app, host=self._host, port=self._port, log_level=\"warning\")\n self._server = Server(config)\n self._thread = Thread(target=self._serve, name=\"plba-http-control\", daemon=True)\n self._thread.start()\n await self._wait_until_started()\n\n async def stop(self) -> None:\n if self._server is None or self._thread is None:\n return\n self._server.should_exit = True\n await asyncio.to_thread(self._thread.join, self._timeout)\n self._server = None\n self._thread = None\n\n @property\n def port(self) -> int:\n if self._server is None or not getattr(self._server, \"servers\", None):\n return self._port\n socket = self._server.servers[0].sockets[0]\n return int(socket.getsockname()[1])\n\n async def _wait_until_started(self) -> None:\n if self._server is None:\n raise RuntimeError(\"Server is not initialized\")\n deadline = asyncio.get_running_loop().time() + max(float(self._timeout), 1.0)\n while not self._server.started:\n if self._error is not None:\n raise RuntimeError(\"HTTP control server failed to start\") from self._error\n if asyncio.get_running_loop().time() >= deadline:\n raise TimeoutError(\"HTTP control server startup timed out\")\n await asyncio.sleep(0.05)\n\n def _serve(self) -> None:\n if self._server is None:\n return\n try:\n asyncio.run(self._server.serve())\n except BaseException as exc: # noqa: BLE001\n self._error = exc", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_runner.py:UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_runner", + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "class ControlPlaneService:\n def __init__(self) -> None:\n self._channels: list[ControlChannel] = []\n\n def register_channel(self, channel: ControlChannel) -> None:\n self._channels.append(channel)\n\n def start(self, runtime: RuntimeManager) -> None:\n if not self._channels:\n return\n asyncio.run(self._start_async(runtime))\n\n def stop(self) -> None:\n if not self._channels:\n return\n asyncio.run(self._stop_async())\n\n def snapshot(self, runtime: RuntimeManager) -> dict[str, object]:\n health = runtime.current_health()\n return {\n \"runtime\": {\"state\": runtime._state.value},\n \"modules\": list(runtime.registry.modules),\n \"services\": runtime.services.snapshot(),\n \"workers\": runtime.workers.snapshot(),\n \"health\": runtime.health.snapshot(runtime.workers.healths()) | {\"status\": health[\"status\"]},\n \"config\": runtime.configuration.get(),\n }\n\n async def _start_async(self, runtime: RuntimeManager) -> None:\n actions = ControlActionSet(\n health=runtime.health_status,\n start=runtime.start_runtime,\n stop=runtime.stop_runtime,\n status=runtime.runtime_status,\n )\n for channel in self._channels:\n await channel.start(actions)\n\n async def _stop_async(self) -> None:\n for channel in reversed(self._channels):\n await channel.stop()", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/service.py:ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlActionSet:\n health: HealthHandler\n start: ActionHandler\n stop: ActionHandler\n status: ActionHandler", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\"ControlActionSet\", \"ControlChannel\", \"ControlPlaneService\", \"HttpControlChannel\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/__init__.py:1-5", + "span_start": 1, + "span_end": 5, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlChannel(ABC):\n @abstractmethod\n async def start(self, actions: ControlActionSet) -> None:\n \"\"\"Start the control channel and bind handlers.\"\"\"\n\n @abstractmethod\n async def stop(self) -> None:\n \"\"\"Stop the control channel and release resources.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class BlockingRoutine:\n def __init__(self, started: Event, release: Event) -> None:\n self._started = started\n self._release = release\n\n def run(self) -> None:\n self._started.set()\n self._release.wait(timeout=5.0)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:BlockingRoutine", + "span_start": 40, + "span_end": 47, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "retrieval_report": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "vector", + "C2_DEPENDENCY_GRAPH": "vector", + "C0_SOURCE_CHUNKS": "vector" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C0_SOURCE_CHUNKS": 10 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [] + } + }, + "fallback": { + "used": false, + "reason": null + }, + "retrieval_by_layer_ms": { + "C1_SYMBOL_CATALOG": 58, + "C2_DEPENDENCY_GRAPH": 58, + "C0_SOURCE_CHUNKS": 24 + } + } + }, + "diagnostics": { + "intent_correct": null, + "target_found": true, + "layers_used": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "retrieval_sufficient": true, + "answer_mode": "normal", + "router_result": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "FIND_TESTS", + "path_scope": [], + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "symbol_resolution_status": "resolved" + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Где тесты для RuntimeManager?", + "sub_intent": "FIND_TESTS", + "path_scope": [], + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 6, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 10, + "empty": false, + "fallback_used": false + } + ], + "empty_layers": [], + "evidence_gate_decision": { + "sufficient": true, + "failure_reasons": [], + "evidence_count": 24 + }, + "failure_reasons": [], + "timings_ms": { + "router": 1, + "retrieval": 141, + "pre_evidence_gate": 0, + "llm": 584 + } + }, + "rag_rows": [ + { + "path": "src/plba/bootstrap.py", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 4, + "span_end": 4, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "27158ca220022eeb5083c6addf8a50775d45f7161284fd60aac48410105f4b98", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 12, + "span_end": 12, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "aeadc039653807b0da1ca6e3cc1078ee61cfc510b28e7f9c2ec04c59da43cc8d", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager\nRuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "qname": "RuntimeManager", + "kind": "class", + "signature": "RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/__init__.py", + "content": "const RuntimeManager\nRuntimeManager = plba.core.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 16, + "span_end": 16, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "7eacec84f9b8d6c4201374591faecdac7493091c263681495c338973f2971ad9", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = plba.core.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/core.py", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 2, + "span_end": 2, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "e1684562d978b7af7fe9b27dc5869d770348a87b5dc19a50360f58544668578b", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.core", + "is_test": false, + "blob_sha": "c0ae25110d20e665216616e26b68adfe035b624ba45d31d1272fb21f906f9ca8", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 14, + "span_end": 14, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "a1572ea8183dc0cd6ddbc74342bbde8c28cecfde37ad40b62feff09f8d103d11", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 9, + "span_end": 9, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "62a9575c77aad894120d18b4f2a08cf2ba42f77e9be4a8a432b767d157701afe", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "const ControlPlaneService\nControlPlaneService = app_runtime.control.service.ControlPlaneService", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlPlaneService", + "span_start": 3, + "span_end": 3, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "217e8f044d1c01644bf7b81e5046af9e84469210c692a2fb0c476a19bb069ae1", + "qname": "ControlPlaneService", + "kind": "const", + "signature": "ControlPlaneService = app_runtime.control.service.ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 52, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/control.py", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\n \"ControlActionSet\",\n \"ControlChannel\",\n \"ControlPlaneService\",\n \"HttpControlChannel\",\n]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/control.py:1-10", + "span_start": 1, + "span_end": 10, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.control", + "is_test": false, + "blob_sha": "31bd5c4481bfa7fbca8fae56d4860a67e3953ca74474ac8439e1f39b685d7bc8", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class IntervalRoutine:\n calls: list[float] = field(default_factory=list)\n _lock: Lock = field(default_factory=Lock)\n\n def run(self) -> None:\n with self._lock:\n self.calls.append(monotonic())\n\n def wait_runs(self, count: int, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n with self._lock:\n if len(self.calls) >= count:\n return True\n sleep(0.01)\n return False\n\n def deltas(self) -> list[float]:\n with self._lock:\n return [self.calls[index + 1] - self.calls[index] for index in range(len(self.calls) - 1)]", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:IntervalRoutine", + "span_start": 18, + "span_end": 37, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel(ControlChannel):\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._timeout = timeout\n self._runner = UvicornThreadRunner(host, port, timeout)\n self._factory = HttpControlAppFactory()\n self._actions: ControlActionSet | None = None\n\n async def start(self, actions: ControlActionSet) -> None:\n self._actions = actions\n app = self._factory.create(self._health_response, self._action_response)\n await self._runner.start(app)\n\n async def stop(self) -> None:\n await self._runner.stop()\n\n @property\n def port(self) -> int:\n return self._runner.port\n\n async def _health_response(self) -> dict[str, object]:\n if self._actions is None:\n return {\"status\": \"unhealthy\", \"detail\": \"control actions are not configured\"}\n return await asyncio.wait_for(self._actions.health(), timeout=float(self._timeout))\n\n async def _action_response(self, action: str, _client_source: str = \"unknown\") -> JSONResponse:\n if self._actions is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"{action} handler is not configured\"}, status_code=404)\n callbacks = {\n \"start\": self._actions.start,\n \"stop\": self._actions.stop,\n \"status\": self._actions.status,\n }\n callback = callbacks.get(action)\n if callback is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"unsupported action: {action}\"}, status_code=404)\n action_timeout = max(float(self._timeout), 10.0) if action in {\"start\", \"stop\"} else float(self._timeout)\n try:\n detail = await asyncio.wait_for(callback(), timeout=action_timeout)\n except asyncio.TimeoutError:\n return JSONResponse(\n content={\"status\": \"accepted\", \"detail\": f\"{action} operation is still in progress\"},\n status_code=202,\n )\n except Exception as exc:\n return JSONResponse(content={\"status\": \"error\", \"detail\": str(exc)}, status_code=500)\n return JSONResponse(content={\"status\": \"ok\", \"detail\": detail or f\"{action} action accepted\"}, status_code=200)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_channel.py:HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "class HttpControlAppFactory:\n def create(\n self,\n health_provider: Callable[[], Awaitable[HealthPayload]],\n action_provider: Callable[[str, str], Awaitable[JSONResponse]],\n ) -> FastAPI:\n app = FastAPI(title=\"PLBA Control API\")\n\n @app.middleware(\"http\")\n async def log_api_call(request: Request, call_next): # type: ignore[no-untyped-def]\n started = time.monotonic()\n response = await call_next(request)\n response.headers[\"X-Response-Time-Ms\"] = str(int((time.monotonic() - started) * 1000))\n return response\n\n @app.get(\"/health\")\n async def health() -> JSONResponse:\n payload = await health_provider()\n status_code = 200 if payload.get(\"status\") == \"ok\" else 503\n return JSONResponse(content=payload, status_code=status_code)\n\n @app.get(\"/actions/{action}\")\n @app.post(\"/actions/{action}\")\n async def action(action: str, request: Request) -> JSONResponse:\n client_source = self._client_source(request)\n if action in {\"start\", \"stop\"}:\n LOGGER.warning(\"Control action requested: /actions/%s client=%s\", action, client_source)\n return await action_provider(action, client_source)\n\n return app\n\n def _client_source(self, request: Request) -> str:\n explicit_header = request.headers.get(\"X-Client-Source\", \"\").strip()\n if explicit_header:\n return explicit_header\n user_agent = request.headers.get(\"User-Agent\", \"\").strip()\n if user_agent:\n return f\"user-agent:{user_agent}\"\n return \"unknown\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_app.py:HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "class UvicornThreadRunner:\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._host = host\n self._port = port\n self._timeout = timeout\n self._server: Server | None = None\n self._thread: Thread | None = None\n self._error: BaseException | None = None\n\n async def start(self, app: FastAPI) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._error = None\n config = Config(app=app, host=self._host, port=self._port, log_level=\"warning\")\n self._server = Server(config)\n self._thread = Thread(target=self._serve, name=\"plba-http-control\", daemon=True)\n self._thread.start()\n await self._wait_until_started()\n\n async def stop(self) -> None:\n if self._server is None or self._thread is None:\n return\n self._server.should_exit = True\n await asyncio.to_thread(self._thread.join, self._timeout)\n self._server = None\n self._thread = None\n\n @property\n def port(self) -> int:\n if self._server is None or not getattr(self._server, \"servers\", None):\n return self._port\n socket = self._server.servers[0].sockets[0]\n return int(socket.getsockname()[1])\n\n async def _wait_until_started(self) -> None:\n if self._server is None:\n raise RuntimeError(\"Server is not initialized\")\n deadline = asyncio.get_running_loop().time() + max(float(self._timeout), 1.0)\n while not self._server.started:\n if self._error is not None:\n raise RuntimeError(\"HTTP control server failed to start\") from self._error\n if asyncio.get_running_loop().time() >= deadline:\n raise TimeoutError(\"HTTP control server startup timed out\")\n await asyncio.sleep(0.05)\n\n def _serve(self) -> None:\n if self._server is None:\n return\n try:\n asyncio.run(self._server.serve())\n except BaseException as exc: # noqa: BLE001\n self._error = exc", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_runner.py:UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_runner", + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "class ControlPlaneService:\n def __init__(self) -> None:\n self._channels: list[ControlChannel] = []\n\n def register_channel(self, channel: ControlChannel) -> None:\n self._channels.append(channel)\n\n def start(self, runtime: RuntimeManager) -> None:\n if not self._channels:\n return\n asyncio.run(self._start_async(runtime))\n\n def stop(self) -> None:\n if not self._channels:\n return\n asyncio.run(self._stop_async())\n\n def snapshot(self, runtime: RuntimeManager) -> dict[str, object]:\n health = runtime.current_health()\n return {\n \"runtime\": {\"state\": runtime._state.value},\n \"modules\": list(runtime.registry.modules),\n \"services\": runtime.services.snapshot(),\n \"workers\": runtime.workers.snapshot(),\n \"health\": runtime.health.snapshot(runtime.workers.healths()) | {\"status\": health[\"status\"]},\n \"config\": runtime.configuration.get(),\n }\n\n async def _start_async(self, runtime: RuntimeManager) -> None:\n actions = ControlActionSet(\n health=runtime.health_status,\n start=runtime.start_runtime,\n stop=runtime.stop_runtime,\n status=runtime.runtime_status,\n )\n for channel in self._channels:\n await channel.start(actions)\n\n async def _stop_async(self) -> None:\n for channel in reversed(self._channels):\n await channel.stop()", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/service.py:ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlActionSet:\n health: HealthHandler\n start: ActionHandler\n stop: ActionHandler\n status: ActionHandler", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\"ControlActionSet\", \"ControlChannel\", \"ControlPlaneService\", \"HttpControlChannel\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/__init__.py:1-5", + "span_start": 1, + "span_end": 5, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlChannel(ABC):\n @abstractmethod\n async def start(self, actions: ControlActionSet) -> None:\n \"\"\"Start the control channel and bind handlers.\"\"\"\n\n @abstractmethod\n async def stop(self) -> None:\n \"\"\"Stop the control channel and release resources.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_business_control_actions.py", + "content": "class BlockingRoutine:\n def __init__(self, started: Event, release: Event) -> None:\n self._started = started\n self._release = release\n\n def run(self) -> None:\n self._started.set()\n self._release.wait(timeout=5.0)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_business_control_actions.py:BlockingRoutine", + "span_start": 40, + "span_end": 47, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_business_control_actions", + "is_test": true, + "blob_sha": "4c599657dbef51b9d5cd4ec0cc4170ac79c5b1d6b9a5e80782a770274cc39e9f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "validation": { + "passed": true, + "action": "return", + "reasons": [] + }, + "steps": [ + { + "step": "router", + "status": "completed", + "timings_ms": { + "router": 1 + }, + "output": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + } + }, + { + "step": "retrieval", + "status": "completed", + "timings_ms": { + "retrieval": 141 + }, + "output": { + "rag_count": 24, + "answer_path_rag_count": 24, + "resolved_symbol_status": "resolved", + "resolved_symbol": "RuntimeManager", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "diagnostics": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "vector", + "C2_DEPENDENCY_GRAPH": "vector", + "C0_SOURCE_CHUNKS": "vector" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C0_SOURCE_CHUNKS": 10 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [] + } + }, + "fallback": { + "used": false, + "reason": null + }, + "retrieval_by_layer_ms": { + "C1_SYMBOL_CATALOG": 58, + "C2_DEPENDENCY_GRAPH": 58, + "C0_SOURCE_CHUNKS": 24 + } + } + }, + { + "step": "pre_evidence_gate", + "status": "passed", + "timings_ms": { + "pre_evidence_gate": 0 + }, + "output": { + "passed": true, + "failure_reasons": [], + "degraded_message": "" + } + }, + { + "step": "llm", + "status": "completed", + "timings_ms": { + "llm": 584 + }, + "output": { + "prompt_name": "code_qa_find_tests_answer", + "answer_preview": "Прямые тесты для `RuntimeManager` находятся в файле `tests/test_runtime.py`. Эти тесты проверяют инициализацию и поведение объекта `RuntimeManager`.\n\nКосвенных тестов, явно связанных с `RuntimeManager`, больше нигде не обнаружено." + } + }, + { + "step": "post_evidence_gate", + "status": "passed", + "timings_ms": { + "post_evidence_gate": 0, + "repair": 0 + }, + "output": { + "passed": true, + "reasons": [], + "repair_used": false + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-find-tests-runtime-manager.md b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-find-tests-runtime-manager.md new file mode 100644 index 0000000..81f0f7b --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-find-tests-runtime-manager.md @@ -0,0 +1,211 @@ +# plba-v2-find-tests-runtime-manager + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: agent_runtime +- mode: full_chain +- passed: True + +## Query +Где тесты для RuntimeManager? + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 24, + "llm_answer": "Прямые тесты для `RuntimeManager` находятся в файле `tests/test_runtime.py`. Эти тесты проверяют инициализацию и поведение объекта `RuntimeManager`.\n\nКосвенных тестов, явно связанных с `RuntimeManager`, больше нигде не обнаружено.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] +} + +## Steps +[ + { + "step": "router", + "status": "completed", + "timings_ms": { + "router": 1 + }, + "output": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + } + }, + { + "step": "retrieval", + "status": "completed", + "timings_ms": { + "retrieval": 141 + }, + "output": { + "rag_count": 24, + "answer_path_rag_count": 24, + "resolved_symbol_status": "resolved", + "resolved_symbol": "RuntimeManager", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "diagnostics": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "vector", + "C2_DEPENDENCY_GRAPH": "vector", + "C0_SOURCE_CHUNKS": "vector" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C0_SOURCE_CHUNKS": 10 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [] + } + }, + "fallback": { + "used": false, + "reason": null + }, + "retrieval_by_layer_ms": { + "C1_SYMBOL_CATALOG": 58, + "C2_DEPENDENCY_GRAPH": 58, + "C0_SOURCE_CHUNKS": 24 + } + } + }, + { + "step": "pre_evidence_gate", + "status": "passed", + "timings_ms": { + "pre_evidence_gate": 0 + }, + "output": { + "passed": true, + "failure_reasons": [], + "degraded_message": "" + } + }, + { + "step": "llm", + "status": "completed", + "timings_ms": { + "llm": 584 + }, + "output": { + "prompt_name": "code_qa_find_tests_answer", + "answer_preview": "Прямые тесты для `RuntimeManager` находятся в файле `tests/test_runtime.py`. Эти тесты проверяют инициализацию и поведение объекта `RuntimeManager`.\n\nКосвенных тестов, явно связанных с `RuntimeManager`, больше нигде не обнаружено." + } + }, + { + "step": "post_evidence_gate", + "status": "passed", + "timings_ms": { + "post_evidence_gate": 0, + "repair": 0 + }, + "output": { + "passed": true, + "reasons": [], + "repair_used": false + } + } +] + +## Diagnostics +{ + "intent_correct": null, + "target_found": true, + "layers_used": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "retrieval_sufficient": true, + "answer_mode": "normal", + "router_result": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "FIND_TESTS", + "path_scope": [], + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "symbol_resolution_status": "resolved" + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Где тесты для RuntimeManager?", + "sub_intent": "FIND_TESTS", + "path_scope": [], + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 6, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 10, + "empty": false, + "fallback_used": false + } + ], + "empty_layers": [], + "evidence_gate_decision": { + "sufficient": true, + "failure_reasons": [], + "evidence_count": 24 + }, + "failure_reasons": [], + "timings_ms": { + "router": 1, + "retrieval": 141, + "pre_evidence_gate": 0, + "llm": 584 + } +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-find-tests-trace-service.json b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-find-tests-trace-service.json new file mode 100644 index 0000000..353a6c0 --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-find-tests-trace-service.json @@ -0,0 +1,3249 @@ +{ + "case_id": "plba-v2-find-tests-trace-service", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "agent_runtime", + "mode": "full_chain", + "query": "Где тесты для TraceService?", + "actual": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 24, + "llm_answer": "Прямые тесты для `TraceService` обнаружены в файле `tests/test_runtime.py`. Проверяются следующие аспекты:\n\n- `test_trace_service_allows_messages_without_status`: проверка обработки сообщений без статуса.\n- `test_trace_service_writes_contexts_and_messages`: проверка записи контекстов и сообщений.\n- `test_trace_service_supports_debug_warning_and_error_levels`: проверка поддержки различных уровней логирования (DEBUG, WARNING, ERROR).", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "TraceService" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "query": "Где тесты для TraceService?", + "router_result": { + "schema_version": "1.1", + "intent": "CODE_QA", + "retrieval_profile": "code", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query_plan": { + "raw": "Где тесты для TraceService?", + "normalized": "Где тесты для TraceService?", + "sub_intent": "FIND_TESTS", + "negations": [], + "expansions": [ + "test", + "unit test", + "TraceService" + ], + "keyword_hints": [ + "TraceService" + ], + "path_hints": [], + "doc_scope_hints": [], + "symbol_candidates": [ + "TraceService" + ], + "symbol_kind_hint": "class", + "anchors": [ + { + "type": "SYMBOL", + "value": "TraceService", + "source": "user_text", + "subtype": null, + "span": { + "start": 14, + "end": 26 + }, + "confidence": 0.88 + }, + { + "type": "KEY_TERM", + "value": "тест", + "source": "user_text", + "subtype": null, + "span": { + "start": 4, + "end": 9 + }, + "confidence": 0.9 + } + ] + }, + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "top_k": 8 + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "top_k": 6 + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 10 + } + ], + "filters": { + "test_policy": "INCLUDE", + "path_scope": [], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "test_file_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "test_symbol_patterns": [ + "test_trace_service", + "TestTraceService", + "TraceService" + ], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "TraceService", + "alternatives": [ + "TraceService", + "TraceService", + "TraceService", + "TraceService", + "TraceService" + ], + "confidence": 0.99 + }, + "evidence_policy": { + "require_def": true, + "require_flow": true, + "require_spec": false, + "allow_answer_without_evidence": false + } + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Где тесты для TraceService?", + "sub_intent": "FIND_TESTS", + "path_scope": [], + "keyword_hints": [ + "TraceService" + ], + "symbol_candidates": [ + "TraceService" + ], + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "top_k": 8 + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "top_k": 6 + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 10 + } + ], + "filters": { + "test_policy": "INCLUDE", + "path_scope": [], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "test_file_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "test_symbol_patterns": [ + "test_trace_service", + "TestTraceService", + "TraceService" + ], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + }, + "query_plan": { + "raw": "Где тесты для TraceService?", + "normalized": "Где тесты для TraceService?", + "sub_intent": "FIND_TESTS", + "negations": [], + "expansions": [ + "test", + "unit test", + "TraceService" + ], + "keyword_hints": [ + "TraceService" + ], + "path_hints": [], + "doc_scope_hints": [], + "symbol_candidates": [ + "TraceService" + ], + "symbol_kind_hint": "class", + "anchors": [ + { + "type": "SYMBOL", + "value": "TraceService", + "source": "user_text", + "subtype": null, + "span": { + "start": 14, + "end": 26 + }, + "confidence": 0.88 + }, + { + "type": "KEY_TERM", + "value": "тест", + "source": "user_text", + "subtype": null, + "span": { + "start": 4, + "end": 9 + }, + "confidence": 0.9 + } + ] + } + }, + "retrieval_result": { + "target_symbol_candidates": [ + "TraceService", + "TraceService.open_context", + "TraceService.create_context", + "TraceService.current_trace_id" + ], + "resolved_symbol": "TraceService", + "symbol_resolution_status": "resolved", + "file_candidates": [ + "src/plba/__init__.py", + "src/app_runtime/core/runtime.py", + "src/app_runtime/tracing/__init__.py", + "src/app_runtime/tracing/service.py", + "src/plba/tracing.py", + "tests/test_runtime.py", + "src/app_runtime/contracts/__init__.py" + ], + "code_chunks": [ + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/plba/__init__.py", + "title": "TraceService", + "content": "const TraceService\nTraceService = plba.tracing.TraceService", + "start_line": 20, + "end_line": 20, + "metadata": { + "symbol_id": "259ec03b77b9387ea53f69c77af32791dd29adf6de617ba72dd3f839197342a1", + "qname": "TraceService", + "kind": "const", + "signature": "TraceService = plba.tracing.TraceService", + "parent_symbol_id": null, + "package_or_module": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/core/runtime.py", + "title": "TraceService", + "content": "const TraceService\nTraceService = app_runtime.tracing.service.TraceService", + "start_line": 14, + "end_line": 14, + "metadata": { + "symbol_id": "3ccf6212fd7d9730f9df933e2ee7671b65bdae0520577e1a49c6432262842db6", + "qname": "TraceService", + "kind": "const", + "signature": "TraceService = app_runtime.tracing.service.TraceService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/tracing/__init__.py", + "title": "TraceService", + "content": "const TraceService\nTraceService = app_runtime.tracing.service.TraceService", + "start_line": 2, + "end_line": 2, + "metadata": { + "symbol_id": "ecd2fab7fa9744b2adca84d3d213f7aadcb7e1da84b9c2764a4ab39c65282b11", + "qname": "TraceService", + "kind": "const", + "signature": "TraceService = app_runtime.tracing.service.TraceService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.tracing.__init__", + "is_test": false, + "blob_sha": "a01dea5f773515aeaae8e6d3431fcb93531a8b577dfa26c2e5db16cd6ae6e4d9", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/tracing/service.py", + "title": "TraceService", + "content": "class TraceService\nTraceService(TraceContextFactory)", + "start_line": 39, + "end_line": 166, + "metadata": { + "symbol_id": "c2b2b976d99f2c600000b753731b26e0a69adcb4359398b93073590c5d5d04f4", + "qname": "TraceService", + "kind": "class", + "signature": "TraceService(TraceContextFactory)", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/plba/tracing.py", + "title": "TraceService", + "content": "const TraceService\nTraceService = app_runtime.tracing.service.TraceService", + "start_line": 1, + "end_line": 1, + "metadata": { + "symbol_id": "a4556fb3f83c50ea68b94a679786ce802cab7ffd9d7138aad3d6009b2661f425", + "qname": "TraceService", + "kind": "const", + "signature": "TraceService = app_runtime.tracing.service.TraceService", + "parent_symbol_id": null, + "package_or_module": "src.plba.tracing", + "is_test": false, + "blob_sha": "a27e11c716c93c3fcefe6f11b4cc420a6b743e7606606071d7f1aeeccc4e7d45", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/tracing/service.py", + "title": "TraceService.open_context", + "content": "method TraceService.open_context\nopen_context(self)", + "start_line": 66, + "end_line": 78, + "metadata": { + "symbol_id": "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426", + "qname": "TraceService.open_context", + "kind": "method", + "signature": "open_context(self)", + "parent_symbol_id": "TraceService", + "package_or_module": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/tracing/service.py", + "title": "TraceService.create_context", + "content": "method TraceService.create_context\ncreate_context(self)", + "start_line": 45, + "end_line": 63, + "metadata": { + "symbol_id": "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a", + "qname": "TraceService.create_context", + "kind": "method", + "signature": "create_context(self)", + "parent_symbol_id": "TraceService", + "package_or_module": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/tracing/service.py", + "title": "TraceService.current_trace_id", + "content": "method TraceService.current_trace_id\ncurrent_trace_id(self)", + "start_line": 80, + "end_line": 81, + "metadata": { + "symbol_id": "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c", + "qname": "TraceService.current_trace_id", + "kind": "method", + "signature": "current_trace_id(self)", + "parent_symbol_id": "TraceService", + "package_or_module": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/tracing/service.py", + "title": "TraceService.__init__:dataflow_slice", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.create_context", + "start_line": 42, + "end_line": 61, + "metadata": { + "edge_id": "3b052062067a78aef3302ee1d996897e02a67d1b340397bea4f59fe147c0492a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a", + "dst_ref": "TraceService.create_context", + "resolution": "resolved", + "slice_id": "3b052062067a78aef3302ee1d996897e02a67d1b340397bea4f59fe147c0492a", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.create_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/tracing/service.py", + "title": "TraceService.__init__:dataflow_slice", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.close_context", + "start_line": 42, + "end_line": 84, + "metadata": { + "edge_id": "7a9353ef57c9ae5d19b3a0c6ac50fad05e6d21d31bbe1cd1cd07af6332ba6505", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "01e14158dcced7e52d0c8ac84ac7b9a75225c261b6aca6a1d7da802d0994721c", + "dst_ref": "TraceService.close_context", + "resolution": "resolved", + "slice_id": "7a9353ef57c9ae5d19b3a0c6ac50fad05e6d21d31bbe1cd1cd07af6332ba6505", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.close_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "01e14158dcced7e52d0c8ac84ac7b9a75225c261b6aca6a1d7da802d0994721c" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/tracing/service.py", + "title": "TraceService.__init__:dataflow_slice", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.open_context", + "start_line": 42, + "end_line": 78, + "metadata": { + "edge_id": "a6e13b9ebc4fed84586afd53ed92a4d14757e440873f572b2337d5622ee96031", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426", + "dst_ref": "TraceService.open_context", + "resolution": "resolved", + "slice_id": "a6e13b9ebc4fed84586afd53ed92a4d14757e440873f572b2337d5622ee96031", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.open_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/tracing/service.py", + "title": "TraceService.__init__:dataflow_slice", + "content": "TraceService.__init__\n -> TraceService.transport\n -> TraceService.__init__", + "start_line": 41, + "end_line": 43, + "metadata": { + "edge_id": "1e923a93faa05c3c43ca9b19bd047007a8589ccce57d3cc1798ae7f9f200af98", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "dst_ref": "TraceService.__init__", + "resolution": "resolved", + "slice_id": "1e923a93faa05c3c43ca9b19bd047007a8589ccce57d3cc1798ae7f9f200af98", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.transport", + "TraceService.__init__" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/tracing/service.py", + "title": "TraceService.__init__:dataflow_slice", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.current_trace_id", + "start_line": 42, + "end_line": 81, + "metadata": { + "edge_id": "3ea17138634b1190bded77ddb84aa1595124f6519b246f24fc4b02bd62b5cac1", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c", + "dst_ref": "TraceService.current_trace_id", + "resolution": "resolved", + "slice_id": "3ea17138634b1190bded77ddb84aa1595124f6519b246f24fc4b02bd62b5cac1", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.current_trace_id" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/tracing/service.py", + "title": "TraceService.__init__:dataflow_slice", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.step", + "start_line": 42, + "end_line": 88, + "metadata": { + "edge_id": "9f34c5da9b09fba99df6f6b1bde183a9aeb45111b8218a747c71590c2c9f60f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "c44bfbc66cf747283f30088da3e011a10395031d41e77b74e523c24997f641ca", + "dst_ref": "TraceService.step", + "resolution": "resolved", + "slice_id": "9f34c5da9b09fba99df6f6b1bde183a9aeb45111b8218a747c71590c2c9f60f2", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.step" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "c44bfbc66cf747283f30088da3e011a10395031d41e77b74e523c24997f641ca" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/plba/tracing.py", + "title": "src/plba/tracing.py:1-4", + "content": "from app_runtime.tracing.service import TraceService\nfrom app_runtime.tracing.transport import MySqlTraceTransport, NoOpTraceTransport\n\n__all__ = [\"MySqlTraceTransport\", \"NoOpTraceTransport\", \"TraceService\"]", + "start_line": 1, + "end_line": 4, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.tracing", + "is_test": false, + "blob_sha": "a27e11c716c93c3fcefe6f11b4cc420a6b743e7606606071d7f1aeeccc4e7d45", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "tests/test_runtime.py", + "title": "tests/test_runtime.py:test_trace_service_allows_messages_without_status", + "content": "def test_trace_service_allows_messages_without_status() -> None:\n from app_runtime.tracing.service import TraceService\n\n transport = RecordingTransport()\n manager = TraceService(transport=transport)\n\n with manager.open_context(alias=\"worker\", kind=\"worker\"):\n manager.step(\"optional-status\")\n manager.debug(\"debug without status\")\n manager.info(\"info without status\")\n manager.warning(\"warning without status\")\n manager.error(\"error without status\")\n\n assert [message.status for message in transport.messages] == [\"\", \"\", \"\", \"\"]\n assert all(message.trace_id == transport.contexts[0].trace_id for message in transport.messages)", + "start_line": 279, + "end_line": 293, + "metadata": { + "chunk_index": 11, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/tracing/__init__.py", + "title": "src/app_runtime/tracing/__init__.py:1-17", + "content": "from app_runtime.contracts.trace import TraceContext, TraceContextRecord, TraceLogMessage, TraceTransport\nfrom app_runtime.tracing.service import TraceManager, TraceService\nfrom app_runtime.tracing.store import ActiveTraceContext, TraceContextStore\nfrom app_runtime.tracing.transport import MySqlTraceTransport, NoOpTraceTransport\n\n__all__ = [\n \"ActiveTraceContext\",\n \"MySqlTraceTransport\",\n \"NoOpTraceTransport\",\n \"TraceContext\",\n \"TraceContextRecord\",\n \"TraceContextStore\",\n \"TraceLogMessage\",\n \"TraceManager\",\n \"TraceService\",\n \"TraceTransport\",\n]", + "start_line": 1, + "end_line": 17, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.tracing.__init__", + "is_test": false, + "blob_sha": "a01dea5f773515aeaae8e6d3431fcb93531a8b577dfa26c2e5db16cd6ae6e4d9", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/plba/__init__.py", + "title": "src/plba/__init__.py:1-69", + "content": "from plba.bootstrap import create_runtime\nfrom plba.config import ConfigFileLoader, FileConfigProvider\nfrom plba.control import ControlActionSet, ControlChannel, ControlPlaneService, HttpControlChannel\nfrom plba.contracts import (\n ApplicationModule,\n ConfigProvider,\n HealthContributor,\n TraceContext,\n TraceContextRecord,\n TraceLogMessage,\n TraceTransport,\n Worker,\n WorkerHealth,\n WorkerStatus,\n)\nfrom plba.core import ConfigurationManager, RuntimeManager, ServiceContainer\nfrom plba.health import HealthRegistry\nfrom plba.logging import LogManager\nfrom plba.queue import InMemoryTaskQueue\nfrom plba.tracing import MySqlTraceTransport, NoOpTraceTransport, TraceService\nfrom plba.workflow import (\n StepResult,\n WorkflowContext,\n WorkflowDefinition,\n WorkflowEngine,\n WorkflowEngineHooks,\n WorkflowNode,\n WorkflowRuntimeFactory,\n WorkflowStep,\n)\nfrom plba.workers import WorkerSupervisor\n\n__all__ = [\n \"ApplicationModule\",\n \"ConfigFileLoader\",\n \"ConfigProvider\",\n \"ConfigurationManager\",\n \"ControlActionSet\",\n \"ControlChannel\",\n \"ControlPlaneService\",\n \"create_runtime\",\n \"FileConfigProvider\",\n \"HealthContributor\",\n \"HealthRegistry\",\n \"HttpControlChannel\",\n \"InMemoryTaskQueue\",\n \"LogManager\",\n \"MySqlTraceTransport\",\n \"NoOpTraceTransport\",\n \"RuntimeManager\",\n \"ServiceContainer\",\n \"TraceContext\",\n \"TraceContextRecord\",\n \"TraceLogMessage\",\n \"TraceService\",\n \"TraceTransport\",\n \"StepResult\",\n \"Worker\",\n \"WorkerHealth\",\n \"WorkerStatus\",\n \"WorkflowContext\",\n \"WorkflowDefinition\",\n \"WorkflowEngine\",\n \"WorkflowEngineHooks\",\n \"WorkflowNode\",\n \"WorkflowRuntimeFactory\",\n \"WorkflowStep\",\n \"WorkerSupervisor\",\n]", + "start_line": 1, + "end_line": 69, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "tests/test_runtime.py", + "title": "tests/test_runtime.py:test_trace_service_writes_contexts_and_messages", + "content": "def test_trace_service_writes_contexts_and_messages() -> None:\n from app_runtime.tracing.service import TraceService\n\n transport = RecordingTransport()\n manager = TraceService(transport=transport)\n\n with manager.open_context(alias=\"worker\", kind=\"worker\", attrs={\"routine\": \"incoming\"}):\n manager.step(\"parse\")\n manager.info(\"started\", status=\"ok\", attrs={\"attempt\": 1})\n\n assert len(transport.contexts) == 1\n assert len(transport.messages) == 1\n assert transport.contexts[0].alias == \"worker\"\n assert transport.messages[0].step == \"parse\"", + "start_line": 246, + "end_line": 259, + "metadata": { + "chunk_index": 9, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "tests/test_runtime.py", + "title": "tests/test_runtime.py:test_trace_service_supports_debug_warning_and_error_levels", + "content": "def test_trace_service_supports_debug_warning_and_error_levels() -> None:\n from app_runtime.tracing.service import TraceService\n\n transport = RecordingTransport()\n manager = TraceService(transport=transport)\n\n with manager.open_context(alias=\"worker\", kind=\"worker\", attrs={\"routine\": \"incoming\"}):\n manager.step(\"validate\")\n manager.debug(\"validation details\", attrs={\"rule\": \"basic\"})\n manager.warning(\"validation warning\", status=\"degraded\", attrs={\"attempt\": 1})\n manager.error(\"integration failed\", status=\"failed\", attrs={\"integration\": \"crm\"})\n manager.exception(\"caught exception\", attrs={\"exception_type\": \"RuntimeError\"})\n\n levels = [message.level for message in transport.messages]\n assert levels == [\"DEBUG\", \"WARNING\", \"ERROR\", \"ERROR\"]", + "start_line": 262, + "end_line": 276, + "metadata": { + "chunk_index": 10, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/tracing/service.py", + "title": "src/app_runtime/tracing/service.py:TraceManager", + "content": "class TraceManager(TraceService):\n \"\"\"Compatibility alias during the transition from ConfigManager-shaped naming.\"\"\"", + "start_line": 169, + "end_line": 170, + "metadata": { + "chunk_index": 2, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/core/runtime.py", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "start_line": 18, + "end_line": 179, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/tracing/service.py", + "title": "src/app_runtime/tracing/service.py:TraceService", + "content": "class TraceService(TraceContextFactory):\n def __init__(self, transport: TraceTransport | None = None, store: TraceContextStore | None = None) -> None:\n self.transport = transport or NoOpTraceTransport()\n self.store = store or TraceContextStore()\n self._writer = TraceRecordWriter(self.transport)\n\n def create_context(\n self,\n *,\n alias: str,\n parent_id: str | None = None,\n kind: str | None = None,\n attrs: dict[str, Any] | None = None,\n ) -> str:\n record = TraceContextRecord(\n trace_id=uuid4().hex,\n alias=str(alias or \"\"),\n parent_id=parent_id,\n type=kind,\n event_time=utc_now(),\n attrs=dict(attrs or {}),\n )\n self.store.push(record)\n self._writer.write_context(record)\n return record.trace_id\n\n @contextmanager\n def open_context(\n self,\n *,\n alias: str,\n parent_id: str | None = None,\n kind: str | None = None,\n attrs: dict[str, Any] | None = None,\n ) -> Iterator[str]:\n trace_id = self.create_context(alias=alias, parent_id=parent_id, kind=kind, attrs=attrs)\n try:\n yield trace_id\n finally:\n self.store.pop()\n\n def current_trace_id(self) -> str | None:\n return self.store.current_trace_id()\n\n def close_context(self) -> str | None:\n previous = self.store.pop()\n return previous.record.trace_id if previous else None\n\n def step(self, name: str) -> None:\n self.store.set_step(str(name or \"\"))\n\n def info(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"INFO\", message, status, attrs)\n\n def debug(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"DEBUG\", message, status, attrs)\n\n def warning(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"WARNING\", message, status, attrs)\n\n def error(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"ERROR\", message, status, attrs)\n\n def exception(self, message: str, *, status: str = \"failed\", attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"ERROR\", message, status, attrs)\n\n def new_root(self, operation: str) -> TraceContext:\n trace_id = self.create_context(alias=operation, kind=\"operation\", attrs={\"operation\": operation})\n return TraceContext(trace_id=trace_id, span_id=trace_id, attributes={\"operation\": operation})\n\n def child_of(self, parent: TraceContext, operation: str) -> TraceContext:\n trace_id = self.create_context(\n alias=operation,\n parent_id=parent.trace_id,\n kind=\"worker\",\n attrs={\"operation\": operation},\n )\n return TraceContext(\n trace_id=trace_id,\n span_id=trace_id,\n parent_span_id=parent.span_id,\n attributes={\"operation\": operation},\n )\n\n def attach(self, metadata: dict[str, object], context: TraceContext) -> dict[str, object]:\n updated = dict(metadata)\n updated[\"trace_id\"] = context.trace_id\n updated[\"span_id\"] = context.span_id\n updated[\"parent_span_id\"] = context.parent_span_id\n return updated\n\n def resume(self, metadata: dict[str, object], operation: str) -> TraceContext:\n trace_id = str(metadata.get(\"trace_id\") or uuid4().hex)\n span_id = str(metadata.get(\"span_id\") or trace_id)\n parent_id = metadata.get(\"parent_span_id\")\n self.create_context(\n alias=operation,\n parent_id=str(parent_id) if parent_id else None,\n kind=\"worker\",\n attrs=dict(metadata),\n )\n return TraceContext(\n trace_id=trace_id,\n span_id=span_id,\n parent_span_id=str(parent_id) if parent_id else None,\n attributes={\"operation\": operation},\n )\n\n def _write_message(\n self,\n level: TraceLevel,\n message: str,\n status: str | None,\n attrs: dict[str, Any] | None,\n ) -> None:\n active = self.store.current()\n if active is None:\n raise RuntimeError(\"Trace context is not bound. Call create_context() first.\")\n record = TraceLogMessage(\n trace_id=active.record.trace_id,\n step=active.step,\n status=str(status or \"\"),\n message=str(message or \"\"),\n level=level,\n event_time=utc_now(),\n attrs=dict(attrs or {}),\n )\n self._writer.write_message(record)", + "start_line": 39, + "end_line": 166, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/contracts/__init__.py", + "title": "src/app_runtime/__init__.py:1-1", + "content": "__all__: list[str] = []", + "start_line": 1, + "end_line": 1, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.__init__", + "is_test": false, + "blob_sha": "8eea9df4f6d7b38ca0e39ccc27b04700e3d08dbeec8046d613d22706d19985fa", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "relations": [ + { + "path": "src/app_runtime/tracing/service.py", + "metadata": { + "edge_id": "3b052062067a78aef3302ee1d996897e02a67d1b340397bea4f59fe147c0492a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a", + "dst_ref": "TraceService.create_context", + "resolution": "resolved", + "slice_id": "3b052062067a78aef3302ee1d996897e02a67d1b340397bea4f59fe147c0492a", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.create_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.create_context" + }, + { + "path": "src/app_runtime/tracing/service.py", + "metadata": { + "edge_id": "7a9353ef57c9ae5d19b3a0c6ac50fad05e6d21d31bbe1cd1cd07af6332ba6505", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "01e14158dcced7e52d0c8ac84ac7b9a75225c261b6aca6a1d7da802d0994721c", + "dst_ref": "TraceService.close_context", + "resolution": "resolved", + "slice_id": "7a9353ef57c9ae5d19b3a0c6ac50fad05e6d21d31bbe1cd1cd07af6332ba6505", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.close_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "01e14158dcced7e52d0c8ac84ac7b9a75225c261b6aca6a1d7da802d0994721c" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.close_context" + }, + { + "path": "src/app_runtime/tracing/service.py", + "metadata": { + "edge_id": "a6e13b9ebc4fed84586afd53ed92a4d14757e440873f572b2337d5622ee96031", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426", + "dst_ref": "TraceService.open_context", + "resolution": "resolved", + "slice_id": "a6e13b9ebc4fed84586afd53ed92a4d14757e440873f572b2337d5622ee96031", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.open_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.open_context" + }, + { + "path": "src/app_runtime/tracing/service.py", + "metadata": { + "edge_id": "1e923a93faa05c3c43ca9b19bd047007a8589ccce57d3cc1798ae7f9f200af98", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "dst_ref": "TraceService.__init__", + "resolution": "resolved", + "slice_id": "1e923a93faa05c3c43ca9b19bd047007a8589ccce57d3cc1798ae7f9f200af98", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.transport", + "TraceService.__init__" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "TraceService.__init__\n -> TraceService.transport\n -> TraceService.__init__" + }, + { + "path": "src/app_runtime/tracing/service.py", + "metadata": { + "edge_id": "3ea17138634b1190bded77ddb84aa1595124f6519b246f24fc4b02bd62b5cac1", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c", + "dst_ref": "TraceService.current_trace_id", + "resolution": "resolved", + "slice_id": "3ea17138634b1190bded77ddb84aa1595124f6519b246f24fc4b02bd62b5cac1", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.current_trace_id" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.current_trace_id" + }, + { + "path": "src/app_runtime/tracing/service.py", + "metadata": { + "edge_id": "9f34c5da9b09fba99df6f6b1bde183a9aeb45111b8218a747c71590c2c9f60f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "c44bfbc66cf747283f30088da3e011a10395031d41e77b74e523c24997f641ca", + "dst_ref": "TraceService.step", + "resolution": "resolved", + "slice_id": "9f34c5da9b09fba99df6f6b1bde183a9aeb45111b8218a747c71590c2c9f60f2", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.step" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "c44bfbc66cf747283f30088da3e011a10395031d41e77b74e523c24997f641ca" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.step" + } + ], + "entrypoints": [], + "test_candidates": [ + { + "path": "tests/test_runtime.py", + "title": "tests/test_runtime.py:test_trace_service_allows_messages_without_status", + "content": "def test_trace_service_allows_messages_without_status() -> None:\n from app_runtime.tracing.service import TraceService\n\n transport = RecordingTransport()\n manager = TraceService(transport=transport)\n\n with manager.open_context(alias=\"worker\", kind=\"worker\"):\n manager.step(\"optiona" + }, + { + "path": "tests/test_runtime.py", + "title": "tests/test_runtime.py:test_trace_service_writes_contexts_and_messages", + "content": "def test_trace_service_writes_contexts_and_messages() -> None:\n from app_runtime.tracing.service import TraceService\n\n transport = RecordingTransport()\n manager = TraceService(transport=transport)\n\n with manager.open_context(alias=\"worker\", kind=\"worker\", attrs={\"routine\": \"incoming\"}):\n" + }, + { + "path": "tests/test_runtime.py", + "title": "tests/test_runtime.py:test_trace_service_supports_debug_warning_and_error_levels", + "content": "def test_trace_service_supports_debug_warning_and_error_levels() -> None:\n from app_runtime.tracing.service import TraceService\n\n transport = RecordingTransport()\n manager = TraceService(transport=transport)\n\n with manager.open_context(alias=\"worker\", kind=\"worker\", attrs={\"routine\": \"in" + } + ], + "layer_outcomes": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 6, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 10, + "empty": false, + "fallback_used": false + } + ], + "missing_layers": [], + "raw_rows": [ + { + "path": "src/plba/__init__.py", + "content": "const TraceService\nTraceService = plba.tracing.TraceService", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService", + "span_start": 20, + "span_end": 20, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "259ec03b77b9387ea53f69c77af32791dd29adf6de617ba72dd3f839197342a1", + "qname": "TraceService", + "kind": "const", + "signature": "TraceService = plba.tracing.TraceService", + "parent_symbol_id": null, + "package_or_module": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "const TraceService\nTraceService = app_runtime.tracing.service.TraceService", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService", + "span_start": 14, + "span_end": 14, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "3ccf6212fd7d9730f9df933e2ee7671b65bdae0520577e1a49c6432262842db6", + "qname": "TraceService", + "kind": "const", + "signature": "TraceService = app_runtime.tracing.service.TraceService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/__init__.py", + "content": "const TraceService\nTraceService = app_runtime.tracing.service.TraceService", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService", + "span_start": 2, + "span_end": 2, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "ecd2fab7fa9744b2adca84d3d213f7aadcb7e1da84b9c2764a4ab39c65282b11", + "qname": "TraceService", + "kind": "const", + "signature": "TraceService = app_runtime.tracing.service.TraceService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.tracing.__init__", + "is_test": false, + "blob_sha": "a01dea5f773515aeaae8e6d3431fcb93531a8b577dfa26c2e5db16cd6ae6e4d9", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceService\nTraceService(TraceContextFactory)", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService", + "span_start": 39, + "span_end": 166, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "c2b2b976d99f2c600000b753731b26e0a69adcb4359398b93073590c5d5d04f4", + "qname": "TraceService", + "kind": "class", + "signature": "TraceService(TraceContextFactory)", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/tracing.py", + "content": "const TraceService\nTraceService = app_runtime.tracing.service.TraceService", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService", + "span_start": 1, + "span_end": 1, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "a4556fb3f83c50ea68b94a679786ce802cab7ffd9d7138aad3d6009b2661f425", + "qname": "TraceService", + "kind": "const", + "signature": "TraceService = app_runtime.tracing.service.TraceService", + "parent_symbol_id": null, + "package_or_module": "src.plba.tracing", + "is_test": false, + "blob_sha": "a27e11c716c93c3fcefe6f11b4cc420a6b743e7606606071d7f1aeeccc4e7d45", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "method TraceService.open_context\nopen_context(self)", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService.open_context", + "span_start": 66, + "span_end": 78, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426", + "qname": "TraceService.open_context", + "kind": "method", + "signature": "open_context(self)", + "parent_symbol_id": "TraceService", + "package_or_module": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "method TraceService.create_context\ncreate_context(self)", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService.create_context", + "span_start": 45, + "span_end": 63, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a", + "qname": "TraceService.create_context", + "kind": "method", + "signature": "create_context(self)", + "parent_symbol_id": "TraceService", + "package_or_module": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "method TraceService.current_trace_id\ncurrent_trace_id(self)", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService.current_trace_id", + "span_start": 80, + "span_end": 81, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c", + "qname": "TraceService.current_trace_id", + "kind": "method", + "signature": "current_trace_id(self)", + "parent_symbol_id": "TraceService", + "package_or_module": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.create_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 61, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "3b052062067a78aef3302ee1d996897e02a67d1b340397bea4f59fe147c0492a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a", + "dst_ref": "TraceService.create_context", + "resolution": "resolved", + "slice_id": "3b052062067a78aef3302ee1d996897e02a67d1b340397bea4f59fe147c0492a", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.create_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.close_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 84, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "7a9353ef57c9ae5d19b3a0c6ac50fad05e6d21d31bbe1cd1cd07af6332ba6505", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "01e14158dcced7e52d0c8ac84ac7b9a75225c261b6aca6a1d7da802d0994721c", + "dst_ref": "TraceService.close_context", + "resolution": "resolved", + "slice_id": "7a9353ef57c9ae5d19b3a0c6ac50fad05e6d21d31bbe1cd1cd07af6332ba6505", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.close_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "01e14158dcced7e52d0c8ac84ac7b9a75225c261b6aca6a1d7da802d0994721c" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.open_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 78, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "a6e13b9ebc4fed84586afd53ed92a4d14757e440873f572b2337d5622ee96031", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426", + "dst_ref": "TraceService.open_context", + "resolution": "resolved", + "slice_id": "a6e13b9ebc4fed84586afd53ed92a4d14757e440873f572b2337d5622ee96031", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.open_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.transport\n -> TraceService.__init__", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 41, + "span_end": 43, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "1e923a93faa05c3c43ca9b19bd047007a8589ccce57d3cc1798ae7f9f200af98", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "dst_ref": "TraceService.__init__", + "resolution": "resolved", + "slice_id": "1e923a93faa05c3c43ca9b19bd047007a8589ccce57d3cc1798ae7f9f200af98", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.transport", + "TraceService.__init__" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.current_trace_id", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 81, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "3ea17138634b1190bded77ddb84aa1595124f6519b246f24fc4b02bd62b5cac1", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c", + "dst_ref": "TraceService.current_trace_id", + "resolution": "resolved", + "slice_id": "3ea17138634b1190bded77ddb84aa1595124f6519b246f24fc4b02bd62b5cac1", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.current_trace_id" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.step", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 88, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "9f34c5da9b09fba99df6f6b1bde183a9aeb45111b8218a747c71590c2c9f60f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "c44bfbc66cf747283f30088da3e011a10395031d41e77b74e523c24997f641ca", + "dst_ref": "TraceService.step", + "resolution": "resolved", + "slice_id": "9f34c5da9b09fba99df6f6b1bde183a9aeb45111b8218a747c71590c2c9f60f2", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.step" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "c44bfbc66cf747283f30088da3e011a10395031d41e77b74e523c24997f641ca" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/tracing.py", + "content": "from app_runtime.tracing.service import TraceService\nfrom app_runtime.tracing.transport import MySqlTraceTransport, NoOpTraceTransport\n\n__all__ = [\"MySqlTraceTransport\", \"NoOpTraceTransport\", \"TraceService\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/tracing.py:1-4", + "span_start": 1, + "span_end": 4, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.tracing", + "is_test": false, + "blob_sha": "a27e11c716c93c3fcefe6f11b4cc420a6b743e7606606071d7f1aeeccc4e7d45", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "def test_trace_service_allows_messages_without_status() -> None:\n from app_runtime.tracing.service import TraceService\n\n transport = RecordingTransport()\n manager = TraceService(transport=transport)\n\n with manager.open_context(alias=\"worker\", kind=\"worker\"):\n manager.step(\"optional-status\")\n manager.debug(\"debug without status\")\n manager.info(\"info without status\")\n manager.warning(\"warning without status\")\n manager.error(\"error without status\")\n\n assert [message.status for message in transport.messages] == [\"\", \"\", \"\", \"\"]\n assert all(message.trace_id == transport.contexts[0].trace_id for message in transport.messages)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_runtime.py:test_trace_service_allows_messages_without_status", + "span_start": 279, + "span_end": 293, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 11, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/__init__.py", + "content": "from app_runtime.contracts.trace import TraceContext, TraceContextRecord, TraceLogMessage, TraceTransport\nfrom app_runtime.tracing.service import TraceManager, TraceService\nfrom app_runtime.tracing.store import ActiveTraceContext, TraceContextStore\nfrom app_runtime.tracing.transport import MySqlTraceTransport, NoOpTraceTransport\n\n__all__ = [\n \"ActiveTraceContext\",\n \"MySqlTraceTransport\",\n \"NoOpTraceTransport\",\n \"TraceContext\",\n \"TraceContextRecord\",\n \"TraceContextStore\",\n \"TraceLogMessage\",\n \"TraceManager\",\n \"TraceService\",\n \"TraceTransport\",\n]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/tracing/__init__.py:1-17", + "span_start": 1, + "span_end": 17, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.tracing.__init__", + "is_test": false, + "blob_sha": "a01dea5f773515aeaae8e6d3431fcb93531a8b577dfa26c2e5db16cd6ae6e4d9", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/__init__.py", + "content": "from plba.bootstrap import create_runtime\nfrom plba.config import ConfigFileLoader, FileConfigProvider\nfrom plba.control import ControlActionSet, ControlChannel, ControlPlaneService, HttpControlChannel\nfrom plba.contracts import (\n ApplicationModule,\n ConfigProvider,\n HealthContributor,\n TraceContext,\n TraceContextRecord,\n TraceLogMessage,\n TraceTransport,\n Worker,\n WorkerHealth,\n WorkerStatus,\n)\nfrom plba.core import ConfigurationManager, RuntimeManager, ServiceContainer\nfrom plba.health import HealthRegistry\nfrom plba.logging import LogManager\nfrom plba.queue import InMemoryTaskQueue\nfrom plba.tracing import MySqlTraceTransport, NoOpTraceTransport, TraceService\nfrom plba.workflow import (\n StepResult,\n WorkflowContext,\n WorkflowDefinition,\n WorkflowEngine,\n WorkflowEngineHooks,\n WorkflowNode,\n WorkflowRuntimeFactory,\n WorkflowStep,\n)\nfrom plba.workers import WorkerSupervisor\n\n__all__ = [\n \"ApplicationModule\",\n \"ConfigFileLoader\",\n \"ConfigProvider\",\n \"ConfigurationManager\",\n \"ControlActionSet\",\n \"ControlChannel\",\n \"ControlPlaneService\",\n \"create_runtime\",\n \"FileConfigProvider\",\n \"HealthContributor\",\n \"HealthRegistry\",\n \"HttpControlChannel\",\n \"InMemoryTaskQueue\",\n \"LogManager\",\n \"MySqlTraceTransport\",\n \"NoOpTraceTransport\",\n \"RuntimeManager\",\n \"ServiceContainer\",\n \"TraceContext\",\n \"TraceContextRecord\",\n \"TraceLogMessage\",\n \"TraceService\",\n \"TraceTransport\",\n \"StepResult\",\n \"Worker\",\n \"WorkerHealth\",\n \"WorkerStatus\",\n \"WorkflowContext\",\n \"WorkflowDefinition\",\n \"WorkflowEngine\",\n \"WorkflowEngineHooks\",\n \"WorkflowNode\",\n \"WorkflowRuntimeFactory\",\n \"WorkflowStep\",\n \"WorkerSupervisor\",\n]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/__init__.py:1-69", + "span_start": 1, + "span_end": 69, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "def test_trace_service_writes_contexts_and_messages() -> None:\n from app_runtime.tracing.service import TraceService\n\n transport = RecordingTransport()\n manager = TraceService(transport=transport)\n\n with manager.open_context(alias=\"worker\", kind=\"worker\", attrs={\"routine\": \"incoming\"}):\n manager.step(\"parse\")\n manager.info(\"started\", status=\"ok\", attrs={\"attempt\": 1})\n\n assert len(transport.contexts) == 1\n assert len(transport.messages) == 1\n assert transport.contexts[0].alias == \"worker\"\n assert transport.messages[0].step == \"parse\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_runtime.py:test_trace_service_writes_contexts_and_messages", + "span_start": 246, + "span_end": 259, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 9, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "def test_trace_service_supports_debug_warning_and_error_levels() -> None:\n from app_runtime.tracing.service import TraceService\n\n transport = RecordingTransport()\n manager = TraceService(transport=transport)\n\n with manager.open_context(alias=\"worker\", kind=\"worker\", attrs={\"routine\": \"incoming\"}):\n manager.step(\"validate\")\n manager.debug(\"validation details\", attrs={\"rule\": \"basic\"})\n manager.warning(\"validation warning\", status=\"degraded\", attrs={\"attempt\": 1})\n manager.error(\"integration failed\", status=\"failed\", attrs={\"integration\": \"crm\"})\n manager.exception(\"caught exception\", attrs={\"exception_type\": \"RuntimeError\"})\n\n levels = [message.level for message in transport.messages]\n assert levels == [\"DEBUG\", \"WARNING\", \"ERROR\", \"ERROR\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_runtime.py:test_trace_service_supports_debug_warning_and_error_levels", + "span_start": 262, + "span_end": 276, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 10, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceManager(TraceService):\n \"\"\"Compatibility alias during the transition from ConfigManager-shaped naming.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/tracing/service.py:TraceManager", + "span_start": 169, + "span_end": 170, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 2, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceService(TraceContextFactory):\n def __init__(self, transport: TraceTransport | None = None, store: TraceContextStore | None = None) -> None:\n self.transport = transport or NoOpTraceTransport()\n self.store = store or TraceContextStore()\n self._writer = TraceRecordWriter(self.transport)\n\n def create_context(\n self,\n *,\n alias: str,\n parent_id: str | None = None,\n kind: str | None = None,\n attrs: dict[str, Any] | None = None,\n ) -> str:\n record = TraceContextRecord(\n trace_id=uuid4().hex,\n alias=str(alias or \"\"),\n parent_id=parent_id,\n type=kind,\n event_time=utc_now(),\n attrs=dict(attrs or {}),\n )\n self.store.push(record)\n self._writer.write_context(record)\n return record.trace_id\n\n @contextmanager\n def open_context(\n self,\n *,\n alias: str,\n parent_id: str | None = None,\n kind: str | None = None,\n attrs: dict[str, Any] | None = None,\n ) -> Iterator[str]:\n trace_id = self.create_context(alias=alias, parent_id=parent_id, kind=kind, attrs=attrs)\n try:\n yield trace_id\n finally:\n self.store.pop()\n\n def current_trace_id(self) -> str | None:\n return self.store.current_trace_id()\n\n def close_context(self) -> str | None:\n previous = self.store.pop()\n return previous.record.trace_id if previous else None\n\n def step(self, name: str) -> None:\n self.store.set_step(str(name or \"\"))\n\n def info(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"INFO\", message, status, attrs)\n\n def debug(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"DEBUG\", message, status, attrs)\n\n def warning(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"WARNING\", message, status, attrs)\n\n def error(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"ERROR\", message, status, attrs)\n\n def exception(self, message: str, *, status: str = \"failed\", attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"ERROR\", message, status, attrs)\n\n def new_root(self, operation: str) -> TraceContext:\n trace_id = self.create_context(alias=operation, kind=\"operation\", attrs={\"operation\": operation})\n return TraceContext(trace_id=trace_id, span_id=trace_id, attributes={\"operation\": operation})\n\n def child_of(self, parent: TraceContext, operation: str) -> TraceContext:\n trace_id = self.create_context(\n alias=operation,\n parent_id=parent.trace_id,\n kind=\"worker\",\n attrs={\"operation\": operation},\n )\n return TraceContext(\n trace_id=trace_id,\n span_id=trace_id,\n parent_span_id=parent.span_id,\n attributes={\"operation\": operation},\n )\n\n def attach(self, metadata: dict[str, object], context: TraceContext) -> dict[str, object]:\n updated = dict(metadata)\n updated[\"trace_id\"] = context.trace_id\n updated[\"span_id\"] = context.span_id\n updated[\"parent_span_id\"] = context.parent_span_id\n return updated\n\n def resume(self, metadata: dict[str, object], operation: str) -> TraceContext:\n trace_id = str(metadata.get(\"trace_id\") or uuid4().hex)\n span_id = str(metadata.get(\"span_id\") or trace_id)\n parent_id = metadata.get(\"parent_span_id\")\n self.create_context(\n alias=operation,\n parent_id=str(parent_id) if parent_id else None,\n kind=\"worker\",\n attrs=dict(metadata),\n )\n return TraceContext(\n trace_id=trace_id,\n span_id=span_id,\n parent_span_id=str(parent_id) if parent_id else None,\n attributes={\"operation\": operation},\n )\n\n def _write_message(\n self,\n level: TraceLevel,\n message: str,\n status: str | None,\n attrs: dict[str, Any] | None,\n ) -> None:\n active = self.store.current()\n if active is None:\n raise RuntimeError(\"Trace context is not bound. Call create_context() first.\")\n record = TraceLogMessage(\n trace_id=active.record.trace_id,\n step=active.step,\n status=str(status or \"\"),\n message=str(message or \"\"),\n level=level,\n event_time=utc_now(),\n attrs=dict(attrs or {}),\n )\n self._writer.write_message(record)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/tracing/service.py:TraceService", + "span_start": 39, + "span_end": 166, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/__init__.py", + "content": "__all__: list[str] = []", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/__init__.py:1-1", + "span_start": 1, + "span_end": 1, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.__init__", + "is_test": false, + "blob_sha": "8eea9df4f6d7b38ca0e39ccc27b04700e3d08dbeec8046d613d22706d19985fa", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "retrieval_report": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "vector", + "C2_DEPENDENCY_GRAPH": "vector", + "C0_SOURCE_CHUNKS": "vector" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C0_SOURCE_CHUNKS": 10 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [] + } + }, + "fallback": { + "used": false, + "reason": null + }, + "retrieval_by_layer_ms": { + "C1_SYMBOL_CATALOG": 36, + "C2_DEPENDENCY_GRAPH": 31, + "C0_SOURCE_CHUNKS": 12 + } + } + }, + "diagnostics": { + "intent_correct": null, + "target_found": true, + "layers_used": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "retrieval_sufficient": true, + "answer_mode": "normal", + "router_result": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "FIND_TESTS", + "path_scope": [], + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "symbol_resolution_status": "resolved" + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Где тесты для TraceService?", + "sub_intent": "FIND_TESTS", + "path_scope": [], + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 6, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 10, + "empty": false, + "fallback_used": false + } + ], + "empty_layers": [], + "evidence_gate_decision": { + "sufficient": true, + "failure_reasons": [], + "evidence_count": 24 + }, + "failure_reasons": [], + "timings_ms": { + "router": 0, + "retrieval": 80, + "pre_evidence_gate": 0, + "llm": 820 + } + }, + "rag_rows": [ + { + "path": "src/plba/__init__.py", + "content": "const TraceService\nTraceService = plba.tracing.TraceService", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService", + "span_start": 20, + "span_end": 20, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "259ec03b77b9387ea53f69c77af32791dd29adf6de617ba72dd3f839197342a1", + "qname": "TraceService", + "kind": "const", + "signature": "TraceService = plba.tracing.TraceService", + "parent_symbol_id": null, + "package_or_module": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "const TraceService\nTraceService = app_runtime.tracing.service.TraceService", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService", + "span_start": 14, + "span_end": 14, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "3ccf6212fd7d9730f9df933e2ee7671b65bdae0520577e1a49c6432262842db6", + "qname": "TraceService", + "kind": "const", + "signature": "TraceService = app_runtime.tracing.service.TraceService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/__init__.py", + "content": "const TraceService\nTraceService = app_runtime.tracing.service.TraceService", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService", + "span_start": 2, + "span_end": 2, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "ecd2fab7fa9744b2adca84d3d213f7aadcb7e1da84b9c2764a4ab39c65282b11", + "qname": "TraceService", + "kind": "const", + "signature": "TraceService = app_runtime.tracing.service.TraceService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.tracing.__init__", + "is_test": false, + "blob_sha": "a01dea5f773515aeaae8e6d3431fcb93531a8b577dfa26c2e5db16cd6ae6e4d9", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceService\nTraceService(TraceContextFactory)", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService", + "span_start": 39, + "span_end": 166, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "c2b2b976d99f2c600000b753731b26e0a69adcb4359398b93073590c5d5d04f4", + "qname": "TraceService", + "kind": "class", + "signature": "TraceService(TraceContextFactory)", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/tracing.py", + "content": "const TraceService\nTraceService = app_runtime.tracing.service.TraceService", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService", + "span_start": 1, + "span_end": 1, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "a4556fb3f83c50ea68b94a679786ce802cab7ffd9d7138aad3d6009b2661f425", + "qname": "TraceService", + "kind": "const", + "signature": "TraceService = app_runtime.tracing.service.TraceService", + "parent_symbol_id": null, + "package_or_module": "src.plba.tracing", + "is_test": false, + "blob_sha": "a27e11c716c93c3fcefe6f11b4cc420a6b743e7606606071d7f1aeeccc4e7d45", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "method TraceService.open_context\nopen_context(self)", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService.open_context", + "span_start": 66, + "span_end": 78, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426", + "qname": "TraceService.open_context", + "kind": "method", + "signature": "open_context(self)", + "parent_symbol_id": "TraceService", + "package_or_module": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "method TraceService.create_context\ncreate_context(self)", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService.create_context", + "span_start": 45, + "span_end": 63, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a", + "qname": "TraceService.create_context", + "kind": "method", + "signature": "create_context(self)", + "parent_symbol_id": "TraceService", + "package_or_module": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "method TraceService.current_trace_id\ncurrent_trace_id(self)", + "layer": "C1_SYMBOL_CATALOG", + "title": "TraceService.current_trace_id", + "span_start": 80, + "span_end": 81, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c", + "qname": "TraceService.current_trace_id", + "kind": "method", + "signature": "current_trace_id(self)", + "parent_symbol_id": "TraceService", + "package_or_module": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.create_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 61, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3b052062067a78aef3302ee1d996897e02a67d1b340397bea4f59fe147c0492a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a", + "dst_ref": "TraceService.create_context", + "resolution": "resolved", + "slice_id": "3b052062067a78aef3302ee1d996897e02a67d1b340397bea4f59fe147c0492a", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.create_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "ff44881104b65ef50ee6fe16d367d4a81b6e7eb5c44c0963cf4543faec785d4a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.close_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 84, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "7a9353ef57c9ae5d19b3a0c6ac50fad05e6d21d31bbe1cd1cd07af6332ba6505", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "01e14158dcced7e52d0c8ac84ac7b9a75225c261b6aca6a1d7da802d0994721c", + "dst_ref": "TraceService.close_context", + "resolution": "resolved", + "slice_id": "7a9353ef57c9ae5d19b3a0c6ac50fad05e6d21d31bbe1cd1cd07af6332ba6505", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.close_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "01e14158dcced7e52d0c8ac84ac7b9a75225c261b6aca6a1d7da802d0994721c" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.open_context", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 78, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a6e13b9ebc4fed84586afd53ed92a4d14757e440873f572b2337d5622ee96031", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426", + "dst_ref": "TraceService.open_context", + "resolution": "resolved", + "slice_id": "a6e13b9ebc4fed84586afd53ed92a4d14757e440873f572b2337d5622ee96031", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.open_context" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "2da3d5b20a947bf63e14c103be4689b72fd837e0a82abd6c497846375d4c7426" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.transport\n -> TraceService.__init__", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 41, + "span_end": 43, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "1e923a93faa05c3c43ca9b19bd047007a8589ccce57d3cc1798ae7f9f200af98", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "dst_ref": "TraceService.__init__", + "resolution": "resolved", + "slice_id": "1e923a93faa05c3c43ca9b19bd047007a8589ccce57d3cc1798ae7f9f200af98", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.transport", + "TraceService.__init__" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.current_trace_id", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 81, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3ea17138634b1190bded77ddb84aa1595124f6519b246f24fc4b02bd62b5cac1", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c", + "dst_ref": "TraceService.current_trace_id", + "resolution": "resolved", + "slice_id": "3ea17138634b1190bded77ddb84aa1595124f6519b246f24fc4b02bd62b5cac1", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.current_trace_id" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "41135180f7b3b9ab20e097e0747474e219c37dd2366ef08a7b43c1f3edb10b4c" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.step", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "TraceService.__init__:dataflow_slice", + "span_start": 42, + "span_end": 88, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "9f34c5da9b09fba99df6f6b1bde183a9aeb45111b8218a747c71590c2c9f60f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "src_qname": "TraceService.__init__", + "dst_symbol_id": "c44bfbc66cf747283f30088da3e011a10395031d41e77b74e523c24997f641ca", + "dst_ref": "TraceService.step", + "resolution": "resolved", + "slice_id": "9f34c5da9b09fba99df6f6b1bde183a9aeb45111b8218a747c71590c2c9f60f2", + "root_symbol_id": "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "path_symbols": [ + "TraceService.__init__", + "TraceService.store", + "TraceService.step" + ], + "path_symbol_ids": [ + "0e7c96d23b32da14ba3b30b3d0380c4832de8ed9986706d56d03e5111280ccfd", + "c44bfbc66cf747283f30088da3e011a10395031d41e77b74e523c24997f641ca" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/tracing.py", + "content": "from app_runtime.tracing.service import TraceService\nfrom app_runtime.tracing.transport import MySqlTraceTransport, NoOpTraceTransport\n\n__all__ = [\"MySqlTraceTransport\", \"NoOpTraceTransport\", \"TraceService\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/tracing.py:1-4", + "span_start": 1, + "span_end": 4, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.tracing", + "is_test": false, + "blob_sha": "a27e11c716c93c3fcefe6f11b4cc420a6b743e7606606071d7f1aeeccc4e7d45", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "def test_trace_service_allows_messages_without_status() -> None:\n from app_runtime.tracing.service import TraceService\n\n transport = RecordingTransport()\n manager = TraceService(transport=transport)\n\n with manager.open_context(alias=\"worker\", kind=\"worker\"):\n manager.step(\"optional-status\")\n manager.debug(\"debug without status\")\n manager.info(\"info without status\")\n manager.warning(\"warning without status\")\n manager.error(\"error without status\")\n\n assert [message.status for message in transport.messages] == [\"\", \"\", \"\", \"\"]\n assert all(message.trace_id == transport.contexts[0].trace_id for message in transport.messages)", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_runtime.py:test_trace_service_allows_messages_without_status", + "span_start": 279, + "span_end": 293, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 11, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/__init__.py", + "content": "from app_runtime.contracts.trace import TraceContext, TraceContextRecord, TraceLogMessage, TraceTransport\nfrom app_runtime.tracing.service import TraceManager, TraceService\nfrom app_runtime.tracing.store import ActiveTraceContext, TraceContextStore\nfrom app_runtime.tracing.transport import MySqlTraceTransport, NoOpTraceTransport\n\n__all__ = [\n \"ActiveTraceContext\",\n \"MySqlTraceTransport\",\n \"NoOpTraceTransport\",\n \"TraceContext\",\n \"TraceContextRecord\",\n \"TraceContextStore\",\n \"TraceLogMessage\",\n \"TraceManager\",\n \"TraceService\",\n \"TraceTransport\",\n]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/tracing/__init__.py:1-17", + "span_start": 1, + "span_end": 17, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.tracing.__init__", + "is_test": false, + "blob_sha": "a01dea5f773515aeaae8e6d3431fcb93531a8b577dfa26c2e5db16cd6ae6e4d9", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/__init__.py", + "content": "from plba.bootstrap import create_runtime\nfrom plba.config import ConfigFileLoader, FileConfigProvider\nfrom plba.control import ControlActionSet, ControlChannel, ControlPlaneService, HttpControlChannel\nfrom plba.contracts import (\n ApplicationModule,\n ConfigProvider,\n HealthContributor,\n TraceContext,\n TraceContextRecord,\n TraceLogMessage,\n TraceTransport,\n Worker,\n WorkerHealth,\n WorkerStatus,\n)\nfrom plba.core import ConfigurationManager, RuntimeManager, ServiceContainer\nfrom plba.health import HealthRegistry\nfrom plba.logging import LogManager\nfrom plba.queue import InMemoryTaskQueue\nfrom plba.tracing import MySqlTraceTransport, NoOpTraceTransport, TraceService\nfrom plba.workflow import (\n StepResult,\n WorkflowContext,\n WorkflowDefinition,\n WorkflowEngine,\n WorkflowEngineHooks,\n WorkflowNode,\n WorkflowRuntimeFactory,\n WorkflowStep,\n)\nfrom plba.workers import WorkerSupervisor\n\n__all__ = [\n \"ApplicationModule\",\n \"ConfigFileLoader\",\n \"ConfigProvider\",\n \"ConfigurationManager\",\n \"ControlActionSet\",\n \"ControlChannel\",\n \"ControlPlaneService\",\n \"create_runtime\",\n \"FileConfigProvider\",\n \"HealthContributor\",\n \"HealthRegistry\",\n \"HttpControlChannel\",\n \"InMemoryTaskQueue\",\n \"LogManager\",\n \"MySqlTraceTransport\",\n \"NoOpTraceTransport\",\n \"RuntimeManager\",\n \"ServiceContainer\",\n \"TraceContext\",\n \"TraceContextRecord\",\n \"TraceLogMessage\",\n \"TraceService\",\n \"TraceTransport\",\n \"StepResult\",\n \"Worker\",\n \"WorkerHealth\",\n \"WorkerStatus\",\n \"WorkflowContext\",\n \"WorkflowDefinition\",\n \"WorkflowEngine\",\n \"WorkflowEngineHooks\",\n \"WorkflowNode\",\n \"WorkflowRuntimeFactory\",\n \"WorkflowStep\",\n \"WorkerSupervisor\",\n]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/__init__.py:1-69", + "span_start": 1, + "span_end": 69, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "def test_trace_service_writes_contexts_and_messages() -> None:\n from app_runtime.tracing.service import TraceService\n\n transport = RecordingTransport()\n manager = TraceService(transport=transport)\n\n with manager.open_context(alias=\"worker\", kind=\"worker\", attrs={\"routine\": \"incoming\"}):\n manager.step(\"parse\")\n manager.info(\"started\", status=\"ok\", attrs={\"attempt\": 1})\n\n assert len(transport.contexts) == 1\n assert len(transport.messages) == 1\n assert transport.contexts[0].alias == \"worker\"\n assert transport.messages[0].step == \"parse\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_runtime.py:test_trace_service_writes_contexts_and_messages", + "span_start": 246, + "span_end": 259, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 9, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "tests/test_runtime.py", + "content": "def test_trace_service_supports_debug_warning_and_error_levels() -> None:\n from app_runtime.tracing.service import TraceService\n\n transport = RecordingTransport()\n manager = TraceService(transport=transport)\n\n with manager.open_context(alias=\"worker\", kind=\"worker\", attrs={\"routine\": \"incoming\"}):\n manager.step(\"validate\")\n manager.debug(\"validation details\", attrs={\"rule\": \"basic\"})\n manager.warning(\"validation warning\", status=\"degraded\", attrs={\"attempt\": 1})\n manager.error(\"integration failed\", status=\"failed\", attrs={\"integration\": \"crm\"})\n manager.exception(\"caught exception\", attrs={\"exception_type\": \"RuntimeError\"})\n\n levels = [message.level for message in transport.messages]\n assert levels == [\"DEBUG\", \"WARNING\", \"ERROR\", \"ERROR\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "tests/test_runtime.py:test_trace_service_supports_debug_warning_and_error_levels", + "span_start": 262, + "span_end": 276, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 10, + "chunk_type": "symbol_block", + "module_or_unit": "tests.test_runtime", + "is_test": true, + "blob_sha": "336335976a7892e997ef1549c1e59db9d44b8eb61c914ef98e2869941306407b", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceManager(TraceService):\n \"\"\"Compatibility alias during the transition from ConfigManager-shaped naming.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/tracing/service.py:TraceManager", + "span_start": 169, + "span_end": 170, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 2, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/tracing/service.py", + "content": "class TraceService(TraceContextFactory):\n def __init__(self, transport: TraceTransport | None = None, store: TraceContextStore | None = None) -> None:\n self.transport = transport or NoOpTraceTransport()\n self.store = store or TraceContextStore()\n self._writer = TraceRecordWriter(self.transport)\n\n def create_context(\n self,\n *,\n alias: str,\n parent_id: str | None = None,\n kind: str | None = None,\n attrs: dict[str, Any] | None = None,\n ) -> str:\n record = TraceContextRecord(\n trace_id=uuid4().hex,\n alias=str(alias or \"\"),\n parent_id=parent_id,\n type=kind,\n event_time=utc_now(),\n attrs=dict(attrs or {}),\n )\n self.store.push(record)\n self._writer.write_context(record)\n return record.trace_id\n\n @contextmanager\n def open_context(\n self,\n *,\n alias: str,\n parent_id: str | None = None,\n kind: str | None = None,\n attrs: dict[str, Any] | None = None,\n ) -> Iterator[str]:\n trace_id = self.create_context(alias=alias, parent_id=parent_id, kind=kind, attrs=attrs)\n try:\n yield trace_id\n finally:\n self.store.pop()\n\n def current_trace_id(self) -> str | None:\n return self.store.current_trace_id()\n\n def close_context(self) -> str | None:\n previous = self.store.pop()\n return previous.record.trace_id if previous else None\n\n def step(self, name: str) -> None:\n self.store.set_step(str(name or \"\"))\n\n def info(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"INFO\", message, status, attrs)\n\n def debug(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"DEBUG\", message, status, attrs)\n\n def warning(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"WARNING\", message, status, attrs)\n\n def error(self, message: str, *, status: str | None = None, attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"ERROR\", message, status, attrs)\n\n def exception(self, message: str, *, status: str = \"failed\", attrs: dict[str, Any] | None = None) -> None:\n self._write_message(\"ERROR\", message, status, attrs)\n\n def new_root(self, operation: str) -> TraceContext:\n trace_id = self.create_context(alias=operation, kind=\"operation\", attrs={\"operation\": operation})\n return TraceContext(trace_id=trace_id, span_id=trace_id, attributes={\"operation\": operation})\n\n def child_of(self, parent: TraceContext, operation: str) -> TraceContext:\n trace_id = self.create_context(\n alias=operation,\n parent_id=parent.trace_id,\n kind=\"worker\",\n attrs={\"operation\": operation},\n )\n return TraceContext(\n trace_id=trace_id,\n span_id=trace_id,\n parent_span_id=parent.span_id,\n attributes={\"operation\": operation},\n )\n\n def attach(self, metadata: dict[str, object], context: TraceContext) -> dict[str, object]:\n updated = dict(metadata)\n updated[\"trace_id\"] = context.trace_id\n updated[\"span_id\"] = context.span_id\n updated[\"parent_span_id\"] = context.parent_span_id\n return updated\n\n def resume(self, metadata: dict[str, object], operation: str) -> TraceContext:\n trace_id = str(metadata.get(\"trace_id\") or uuid4().hex)\n span_id = str(metadata.get(\"span_id\") or trace_id)\n parent_id = metadata.get(\"parent_span_id\")\n self.create_context(\n alias=operation,\n parent_id=str(parent_id) if parent_id else None,\n kind=\"worker\",\n attrs=dict(metadata),\n )\n return TraceContext(\n trace_id=trace_id,\n span_id=span_id,\n parent_span_id=str(parent_id) if parent_id else None,\n attributes={\"operation\": operation},\n )\n\n def _write_message(\n self,\n level: TraceLevel,\n message: str,\n status: str | None,\n attrs: dict[str, Any] | None,\n ) -> None:\n active = self.store.current()\n if active is None:\n raise RuntimeError(\"Trace context is not bound. Call create_context() first.\")\n record = TraceLogMessage(\n trace_id=active.record.trace_id,\n step=active.step,\n status=str(status or \"\"),\n message=str(message or \"\"),\n level=level,\n event_time=utc_now(),\n attrs=dict(attrs or {}),\n )\n self._writer.write_message(record)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/tracing/service.py:TraceService", + "span_start": 39, + "span_end": 166, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.tracing.service", + "is_test": false, + "blob_sha": "87b875567583967acfa38996526d6e7592bffeb778de094fa4855aff8f8436d7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/__init__.py", + "content": "__all__: list[str] = []", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/__init__.py:1-1", + "span_start": 1, + "span_end": 1, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.__init__", + "is_test": false, + "blob_sha": "8eea9df4f6d7b38ca0e39ccc27b04700e3d08dbeec8046d613d22706d19985fa", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "validation": { + "passed": true, + "action": "return", + "reasons": [] + }, + "steps": [ + { + "step": "router", + "status": "completed", + "timings_ms": { + "router": 0 + }, + "output": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + } + }, + { + "step": "retrieval", + "status": "completed", + "timings_ms": { + "retrieval": 80 + }, + "output": { + "rag_count": 24, + "answer_path_rag_count": 24, + "resolved_symbol_status": "resolved", + "resolved_symbol": "TraceService", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "diagnostics": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "vector", + "C2_DEPENDENCY_GRAPH": "vector", + "C0_SOURCE_CHUNKS": "vector" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C0_SOURCE_CHUNKS": 10 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [] + } + }, + "fallback": { + "used": false, + "reason": null + }, + "retrieval_by_layer_ms": { + "C1_SYMBOL_CATALOG": 36, + "C2_DEPENDENCY_GRAPH": 31, + "C0_SOURCE_CHUNKS": 12 + } + } + }, + { + "step": "pre_evidence_gate", + "status": "passed", + "timings_ms": { + "pre_evidence_gate": 0 + }, + "output": { + "passed": true, + "failure_reasons": [], + "degraded_message": "" + } + }, + { + "step": "llm", + "status": "completed", + "timings_ms": { + "llm": 820 + }, + "output": { + "prompt_name": "code_qa_find_tests_answer", + "answer_preview": "Прямые тесты для `TraceService` обнаружены в файле `tests/test_runtime.py`. Проверяются следующие аспекты:\n\n- `test_trace_service_allows_messages_without_status`: проверка обработки сообщений без статуса.\n- `test_trace_service_writes_contexts_and_messages`: проверка записи контекстов и сообщений.\n- " + } + }, + { + "step": "post_evidence_gate", + "status": "passed", + "timings_ms": { + "post_evidence_gate": 0, + "repair": 0 + }, + "output": { + "passed": true, + "reasons": [], + "repair_used": false + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-find-tests-trace-service.md b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-find-tests-trace-service.md new file mode 100644 index 0000000..6599fd9 --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-find-tests-trace-service.md @@ -0,0 +1,211 @@ +# plba-v2-find-tests-trace-service + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: agent_runtime +- mode: full_chain +- passed: True + +## Query +Где тесты для TraceService? + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 24, + "llm_answer": "Прямые тесты для `TraceService` обнаружены в файле `tests/test_runtime.py`. Проверяются следующие аспекты:\n\n- `test_trace_service_allows_messages_without_status`: проверка обработки сообщений без статуса.\n- `test_trace_service_writes_contexts_and_messages`: проверка записи контекстов и сообщений.\n- `test_trace_service_supports_debug_warning_and_error_levels`: проверка поддержки различных уровней логирования (DEBUG, WARNING, ERROR).", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "TraceService" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] +} + +## Steps +[ + { + "step": "router", + "status": "completed", + "timings_ms": { + "router": 0 + }, + "output": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + } + }, + { + "step": "retrieval", + "status": "completed", + "timings_ms": { + "retrieval": 80 + }, + "output": { + "rag_count": 24, + "answer_path_rag_count": 24, + "resolved_symbol_status": "resolved", + "resolved_symbol": "TraceService", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "diagnostics": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "vector", + "C2_DEPENDENCY_GRAPH": "vector", + "C0_SOURCE_CHUNKS": "vector" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C0_SOURCE_CHUNKS": 10 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [] + } + }, + "fallback": { + "used": false, + "reason": null + }, + "retrieval_by_layer_ms": { + "C1_SYMBOL_CATALOG": 36, + "C2_DEPENDENCY_GRAPH": 31, + "C0_SOURCE_CHUNKS": 12 + } + } + }, + { + "step": "pre_evidence_gate", + "status": "passed", + "timings_ms": { + "pre_evidence_gate": 0 + }, + "output": { + "passed": true, + "failure_reasons": [], + "degraded_message": "" + } + }, + { + "step": "llm", + "status": "completed", + "timings_ms": { + "llm": 820 + }, + "output": { + "prompt_name": "code_qa_find_tests_answer", + "answer_preview": "Прямые тесты для `TraceService` обнаружены в файле `tests/test_runtime.py`. Проверяются следующие аспекты:\n\n- `test_trace_service_allows_messages_without_status`: проверка обработки сообщений без статуса.\n- `test_trace_service_writes_contexts_and_messages`: проверка записи контекстов и сообщений.\n- " + } + }, + { + "step": "post_evidence_gate", + "status": "passed", + "timings_ms": { + "post_evidence_gate": 0, + "repair": 0 + }, + "output": { + "passed": true, + "reasons": [], + "repair_used": false + } + } +] + +## Diagnostics +{ + "intent_correct": null, + "target_found": true, + "layers_used": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "retrieval_sufficient": true, + "answer_mode": "normal", + "router_result": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "FIND_TESTS", + "path_scope": [], + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "symbol_resolution_status": "resolved" + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Где тесты для TraceService?", + "sub_intent": "FIND_TESTS", + "path_scope": [], + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 6, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 10, + "empty": false, + "fallback_used": false + } + ], + "empty_layers": [], + "evidence_gate_decision": { + "sufficient": true, + "failure_reasons": [], + "evidence_count": 24 + }, + "failure_reasons": [], + "timings_ms": { + "router": 0, + "retrieval": 80, + "pre_evidence_gate": 0, + "llm": 820 + } +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-find-tests-workflow-runtime-factory-negative.json b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-find-tests-workflow-runtime-factory-negative.json new file mode 100644 index 0000000..049066a --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-find-tests-workflow-runtime-factory-negative.json @@ -0,0 +1,3108 @@ +{ + "case_id": "plba-v2-find-tests-workflow-runtime-factory-negative", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "agent_runtime", + "mode": "full_chain", + "query": "Где тесты для WorkflowRuntimeFactory?", + "actual": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 24, + "llm_answer": "Insufficient evidence for a confident answer. No test candidates found.", + "answer_mode": "degraded", + "path_scope": [], + "symbol_candidates": [ + "WorkflowRuntimeFactory" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "query": "Где тесты для WorkflowRuntimeFactory?", + "router_result": { + "schema_version": "1.1", + "intent": "CODE_QA", + "retrieval_profile": "code", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query_plan": { + "raw": "Где тесты для WorkflowRuntimeFactory?", + "normalized": "Где тесты для WorkflowRuntimeFactory?", + "sub_intent": "FIND_TESTS", + "negations": [], + "expansions": [ + "test", + "unit test", + "WorkflowRuntimeFactory" + ], + "keyword_hints": [ + "WorkflowRuntimeFactory" + ], + "path_hints": [], + "doc_scope_hints": [], + "symbol_candidates": [ + "WorkflowRuntimeFactory" + ], + "symbol_kind_hint": "class", + "anchors": [ + { + "type": "SYMBOL", + "value": "WorkflowRuntimeFactory", + "source": "user_text", + "subtype": null, + "span": { + "start": 14, + "end": 36 + }, + "confidence": 0.88 + }, + { + "type": "KEY_TERM", + "value": "тест", + "source": "user_text", + "subtype": null, + "span": { + "start": 4, + "end": 9 + }, + "confidence": 0.9 + } + ] + }, + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "top_k": 8 + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "top_k": 6 + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 10 + } + ], + "filters": { + "test_policy": "INCLUDE", + "path_scope": [], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "test_file_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "test_symbol_patterns": [ + "test_workflow_runtime_factory", + "TestWorkflowRuntimeFactory", + "WorkflowRuntimeFactory" + ], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "WorkflowRuntimeFactory", + "alternatives": [ + "WorkflowRuntimeFactory", + "WorkflowRuntimeFactory", + "WorkflowRuntimeFactory", + "WorkflowRuntimeFactory.__init__", + "WorkflowRuntimeFactory.create_engine" + ], + "confidence": 0.99 + }, + "evidence_policy": { + "require_def": true, + "require_flow": true, + "require_spec": false, + "allow_answer_without_evidence": false + } + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Где тесты для WorkflowRuntimeFactory?", + "sub_intent": "FIND_TESTS", + "path_scope": [], + "keyword_hints": [ + "WorkflowRuntimeFactory" + ], + "symbol_candidates": [ + "WorkflowRuntimeFactory" + ], + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "top_k": 8 + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "top_k": 6 + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 10 + } + ], + "filters": { + "test_policy": "INCLUDE", + "path_scope": [], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/**", + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "exclude_globs": [], + "prefer_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "test_file_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py" + ], + "test_symbol_patterns": [ + "test_workflow_runtime_factory", + "TestWorkflowRuntimeFactory", + "WorkflowRuntimeFactory" + ], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + }, + "query_plan": { + "raw": "Где тесты для WorkflowRuntimeFactory?", + "normalized": "Где тесты для WorkflowRuntimeFactory?", + "sub_intent": "FIND_TESTS", + "negations": [], + "expansions": [ + "test", + "unit test", + "WorkflowRuntimeFactory" + ], + "keyword_hints": [ + "WorkflowRuntimeFactory" + ], + "path_hints": [], + "doc_scope_hints": [], + "symbol_candidates": [ + "WorkflowRuntimeFactory" + ], + "symbol_kind_hint": "class", + "anchors": [ + { + "type": "SYMBOL", + "value": "WorkflowRuntimeFactory", + "source": "user_text", + "subtype": null, + "span": { + "start": 14, + "end": 36 + }, + "confidence": 0.88 + }, + { + "type": "KEY_TERM", + "value": "тест", + "source": "user_text", + "subtype": null, + "span": { + "start": 4, + "end": 9 + }, + "confidence": 0.9 + } + ] + } + }, + "retrieval_result": { + "target_symbol_candidates": [ + "WorkflowRuntimeFactory", + "WorkflowRuntimeFactory.__init__", + "WorkflowRuntimeFactory.create_engine", + "WorkflowPersistence", + "annotations", + "WorkflowEngine" + ], + "resolved_symbol": "WorkflowRuntimeFactory", + "symbol_resolution_status": "resolved", + "file_candidates": [ + "src/plba/__init__.py", + "src/app_runtime/workflow/runtime_factory.py", + "src/plba/workflow.py", + "src/app_runtime/config/__init__.py", + "src/app_runtime/config/providers.py", + "src/app_runtime/contracts/__init__.py", + "src/app_runtime/config/file_loader.py", + "src/app_runtime/contracts/config.py", + "src/app_runtime/contracts/health.py", + "src/app_runtime/contracts/application.py" + ], + "code_chunks": [ + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/plba/__init__.py", + "title": "WorkflowRuntimeFactory", + "content": "const WorkflowRuntimeFactory\nWorkflowRuntimeFactory = plba.workflow.WorkflowRuntimeFactory", + "start_line": 21, + "end_line": 30, + "metadata": { + "symbol_id": "cb7c73db05c2622aac89114bed1cddd1d567de21cfac5c53037c62b1074b25c9", + "qname": "WorkflowRuntimeFactory", + "kind": "const", + "signature": "WorkflowRuntimeFactory = plba.workflow.WorkflowRuntimeFactory", + "parent_symbol_id": null, + "package_or_module": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/workflow/runtime_factory.py", + "title": "WorkflowRuntimeFactory", + "content": "class WorkflowRuntimeFactory\nWorkflowRuntimeFactory", + "start_line": 7, + "end_line": 19, + "metadata": { + "symbol_id": "9da827270329de64ebb426fadaaa5e35145e6666b92c6da186e08bf4b071f458", + "qname": "WorkflowRuntimeFactory", + "kind": "class", + "signature": "WorkflowRuntimeFactory", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.workflow.runtime_factory", + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/plba/workflow.py", + "title": "WorkflowRuntimeFactory", + "content": "const WorkflowRuntimeFactory\nWorkflowRuntimeFactory = app_runtime.workflow.runtime_factory.WorkflowRuntimeFactory", + "start_line": 7, + "end_line": 7, + "metadata": { + "symbol_id": "80865947d1ca709971efe9d68a9ee1f348c1c43d351bf4e1b4a5884d72985b6b", + "qname": "WorkflowRuntimeFactory", + "kind": "const", + "signature": "WorkflowRuntimeFactory = app_runtime.workflow.runtime_factory.WorkflowRuntimeFactory", + "parent_symbol_id": null, + "package_or_module": "src.plba.workflow", + "is_test": false, + "blob_sha": "f227797606042273d1f1798f76846952892eeb9e4e9e6a38fb8a631d7231ff39", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/workflow/runtime_factory.py", + "title": "WorkflowRuntimeFactory.__init__", + "content": "method WorkflowRuntimeFactory.__init__\n__init__(self, connection_factory)", + "start_line": 8, + "end_line": 12, + "metadata": { + "symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "qname": "WorkflowRuntimeFactory.__init__", + "kind": "method", + "signature": "__init__(self, connection_factory)", + "parent_symbol_id": "WorkflowRuntimeFactory", + "package_or_module": "src.app_runtime.workflow.runtime_factory", + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/workflow/runtime_factory.py", + "title": "WorkflowRuntimeFactory.create_engine", + "content": "method WorkflowRuntimeFactory.create_engine\ncreate_engine(self, workflow)", + "start_line": 14, + "end_line": 19, + "metadata": { + "symbol_id": "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333", + "qname": "WorkflowRuntimeFactory.create_engine", + "kind": "method", + "signature": "create_engine(self, workflow)", + "parent_symbol_id": "WorkflowRuntimeFactory", + "package_or_module": "src.app_runtime.workflow.runtime_factory", + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/workflow/runtime_factory.py", + "title": "WorkflowPersistence", + "content": "const WorkflowPersistence\nWorkflowPersistence = app_runtime.workflow.persistence.WorkflowPersistence", + "start_line": 4, + "end_line": 4, + "metadata": { + "symbol_id": "35693d37698e35079400b6a021d46209966ce469d9f77763d1c82d82ef4600b2", + "qname": "WorkflowPersistence", + "kind": "const", + "signature": "WorkflowPersistence = app_runtime.workflow.persistence.WorkflowPersistence", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.workflow.runtime_factory", + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/workflow/runtime_factory.py", + "title": "annotations", + "content": "const annotations\nannotations = __future__.annotations", + "start_line": 1, + "end_line": 1, + "metadata": { + "symbol_id": "e016ec68f9d15d52fe0505774229fafc705c1bf3dfda78845a3db9b032a4441d", + "qname": "annotations", + "kind": "const", + "signature": "annotations = __future__.annotations", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.workflow.runtime_factory", + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/workflow/runtime_factory.py", + "title": "WorkflowEngine", + "content": "const WorkflowEngine\nWorkflowEngine = app_runtime.workflow.engine.workflow_engine.WorkflowEngine", + "start_line": 3, + "end_line": 3, + "metadata": { + "symbol_id": "da4aee8bc7d248177fbc4f892732c6eb08baa6d268c32921a217747143a99fe0", + "qname": "WorkflowEngine", + "kind": "const", + "signature": "WorkflowEngine = app_runtime.workflow.engine.workflow_engine.WorkflowEngine", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.workflow.runtime_factory", + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/workflow/runtime_factory.py", + "title": "WorkflowRuntimeFactory.__init__:dataflow_slice", + "content": "WorkflowRuntimeFactory.__init__\n -> WorkflowRuntimeFactory._hooks\n -> WorkflowRuntimeFactory.create_engine", + "start_line": 11, + "end_line": 19, + "metadata": { + "edge_id": "db6124c75b447e4a0a9ba267bd6d6cdf267b41a733b2843d724dd42ec6f4945d", + "edge_type": "dataflow_slice", + "src_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "src_qname": "WorkflowRuntimeFactory.__init__", + "dst_symbol_id": "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333", + "dst_ref": "WorkflowRuntimeFactory.create_engine", + "resolution": "resolved", + "slice_id": "db6124c75b447e4a0a9ba267bd6d6cdf267b41a733b2843d724dd42ec6f4945d", + "root_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "path_symbols": [ + "WorkflowRuntimeFactory.__init__", + "WorkflowRuntimeFactory._hooks", + "WorkflowRuntimeFactory.create_engine" + ], + "path_symbol_ids": [ + "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/workflow/runtime_factory.py", + "title": "WorkflowRuntimeFactory.__init__:dataflow_slice", + "content": "WorkflowRuntimeFactory.__init__\n -> WorkflowRuntimeFactory._snapshot_sanitizer\n -> WorkflowRuntimeFactory.create_engine", + "start_line": 12, + "end_line": 17, + "metadata": { + "edge_id": "f46f5a871a3800b517b0f94ed2551392629e1d7920bc3e3b5a21e0d8f012b741", + "edge_type": "dataflow_slice", + "src_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "src_qname": "WorkflowRuntimeFactory.__init__", + "dst_symbol_id": "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333", + "dst_ref": "WorkflowRuntimeFactory.create_engine", + "resolution": "resolved", + "slice_id": "f46f5a871a3800b517b0f94ed2551392629e1d7920bc3e3b5a21e0d8f012b741", + "root_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "path_symbols": [ + "WorkflowRuntimeFactory.__init__", + "WorkflowRuntimeFactory._snapshot_sanitizer", + "WorkflowRuntimeFactory.create_engine" + ], + "path_symbol_ids": [ + "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/workflow/runtime_factory.py", + "title": "WorkflowRuntimeFactory.__init__:dataflow_slice", + "content": "WorkflowRuntimeFactory.__init__\n -> WorkflowRuntimeFactory._connection_factory\n -> WorkflowRuntimeFactory.create_engine", + "start_line": 9, + "end_line": 16, + "metadata": { + "edge_id": "543624853400c556d1939007017145281d76b00a694c7d5c4fbb0414ded3434e", + "edge_type": "dataflow_slice", + "src_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "src_qname": "WorkflowRuntimeFactory.__init__", + "dst_symbol_id": "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333", + "dst_ref": "WorkflowRuntimeFactory.create_engine", + "resolution": "resolved", + "slice_id": "543624853400c556d1939007017145281d76b00a694c7d5c4fbb0414ded3434e", + "root_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "path_symbols": [ + "WorkflowRuntimeFactory.__init__", + "WorkflowRuntimeFactory._connection_factory", + "WorkflowRuntimeFactory.create_engine" + ], + "path_symbol_ids": [ + "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/workflow/runtime_factory.py", + "title": "WorkflowRuntimeFactory.__init__:dataflow_slice", + "content": "WorkflowRuntimeFactory.__init__\n -> WorkflowRuntimeFactory._traces\n -> WorkflowRuntimeFactory.create_engine", + "start_line": 10, + "end_line": 19, + "metadata": { + "edge_id": "346cf5ddb4308b8403d27c5b54da8cba298bb0af7dc04c2fe30312ef574103c6", + "edge_type": "dataflow_slice", + "src_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "src_qname": "WorkflowRuntimeFactory.__init__", + "dst_symbol_id": "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333", + "dst_ref": "WorkflowRuntimeFactory.create_engine", + "resolution": "resolved", + "slice_id": "346cf5ddb4308b8403d27c5b54da8cba298bb0af7dc04c2fe30312ef574103c6", + "root_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "path_symbols": [ + "WorkflowRuntimeFactory.__init__", + "WorkflowRuntimeFactory._traces", + "WorkflowRuntimeFactory.create_engine" + ], + "path_symbol_ids": [ + "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/workflow/runtime_factory.py", + "title": "WorkflowRuntimeFactory.__init__:writes_attr", + "content": "WorkflowRuntimeFactory.__init__ writes_attr WorkflowRuntimeFactory._snapshot_sanitizer", + "start_line": 12, + "end_line": 12, + "metadata": { + "edge_id": "de0cb1913ba41f673cfb601cab23cfb2e1044ed3dd8c061aff486075aeb8af20", + "edge_type": "writes_attr", + "src_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "src_qname": "WorkflowRuntimeFactory.__init__", + "dst_symbol_id": null, + "dst_ref": "WorkflowRuntimeFactory._snapshot_sanitizer", + "resolution": "partial", + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/workflow/runtime_factory.py", + "title": "WorkflowRuntimeFactory.create_engine:calls", + "content": "WorkflowRuntimeFactory.create_engine calls WorkflowPersistence.create_default", + "start_line": 15, + "end_line": 18, + "metadata": { + "edge_id": "fa86efb6871092fc88df68295c0d92dbe46253e1afa3246ca62b6da11d4d5569", + "edge_type": "calls", + "src_symbol_id": "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333", + "src_qname": "WorkflowRuntimeFactory.create_engine", + "dst_symbol_id": null, + "dst_ref": "WorkflowPersistence.create_default", + "resolution": "partial", + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/workflow/runtime_factory.py", + "title": "src/app_runtime/workflow/runtime_factory.py:WorkflowRuntimeFactory", + "content": "class WorkflowRuntimeFactory:\n def __init__(self, connection_factory=None, *, traces, hooks=None, snapshot_sanitizer=None) -> None:\n self._connection_factory = connection_factory\n self._traces = traces\n self._hooks = hooks\n self._snapshot_sanitizer = snapshot_sanitizer\n\n def create_engine(self, workflow) -> WorkflowEngine:\n persistence = WorkflowPersistence.create_default(\n self._connection_factory,\n snapshot_sanitizer=self._snapshot_sanitizer,\n )\n return WorkflowEngine(workflow, persistence, traces=self._traces, hooks=self._hooks)", + "start_line": 7, + "end_line": 19, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.workflow.runtime_factory", + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/plba/__init__.py", + "title": "src/plba/__init__.py:1-69", + "content": "from plba.bootstrap import create_runtime\nfrom plba.config import ConfigFileLoader, FileConfigProvider\nfrom plba.control import ControlActionSet, ControlChannel, ControlPlaneService, HttpControlChannel\nfrom plba.contracts import (\n ApplicationModule,\n ConfigProvider,\n HealthContributor,\n TraceContext,\n TraceContextRecord,\n TraceLogMessage,\n TraceTransport,\n Worker,\n WorkerHealth,\n WorkerStatus,\n)\nfrom plba.core import ConfigurationManager, RuntimeManager, ServiceContainer\nfrom plba.health import HealthRegistry\nfrom plba.logging import LogManager\nfrom plba.queue import InMemoryTaskQueue\nfrom plba.tracing import MySqlTraceTransport, NoOpTraceTransport, TraceService\nfrom plba.workflow import (\n StepResult,\n WorkflowContext,\n WorkflowDefinition,\n WorkflowEngine,\n WorkflowEngineHooks,\n WorkflowNode,\n WorkflowRuntimeFactory,\n WorkflowStep,\n)\nfrom plba.workers import WorkerSupervisor\n\n__all__ = [\n \"ApplicationModule\",\n \"ConfigFileLoader\",\n \"ConfigProvider\",\n \"ConfigurationManager\",\n \"ControlActionSet\",\n \"ControlChannel\",\n \"ControlPlaneService\",\n \"create_runtime\",\n \"FileConfigProvider\",\n \"HealthContributor\",\n \"HealthRegistry\",\n \"HttpControlChannel\",\n \"InMemoryTaskQueue\",\n \"LogManager\",\n \"MySqlTraceTransport\",\n \"NoOpTraceTransport\",\n \"RuntimeManager\",\n \"ServiceContainer\",\n \"TraceContext\",\n \"TraceContextRecord\",\n \"TraceLogMessage\",\n \"TraceService\",\n \"TraceTransport\",\n \"StepResult\",\n \"Worker\",\n \"WorkerHealth\",\n \"WorkerStatus\",\n \"WorkflowContext\",\n \"WorkflowDefinition\",\n \"WorkflowEngine\",\n \"WorkflowEngineHooks\",\n \"WorkflowNode\",\n \"WorkflowRuntimeFactory\",\n \"WorkflowStep\",\n \"WorkerSupervisor\",\n]", + "start_line": 1, + "end_line": 69, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/plba/workflow.py", + "title": "src/plba/workflow.py:1-18", + "content": "from app_runtime.workflow.contracts.context import WorkflowContext\nfrom app_runtime.workflow.contracts.result import StepResult\nfrom app_runtime.workflow.contracts.step import WorkflowStep\nfrom app_runtime.workflow.contracts.workflow import WorkflowDefinition, WorkflowNode\nfrom app_runtime.workflow.engine.hooks import WorkflowEngineHooks\nfrom app_runtime.workflow.engine.workflow_engine import WorkflowEngine\nfrom app_runtime.workflow.runtime_factory import WorkflowRuntimeFactory\n\n__all__ = [\n \"StepResult\",\n \"WorkflowContext\",\n \"WorkflowDefinition\",\n \"WorkflowEngine\",\n \"WorkflowEngineHooks\",\n \"WorkflowNode\",\n \"WorkflowRuntimeFactory\",\n \"WorkflowStep\",\n]", + "start_line": 1, + "end_line": 18, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.workflow", + "is_test": false, + "blob_sha": "f227797606042273d1f1798f76846952892eeb9e4e9e6a38fb8a631d7231ff39", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/config/__init__.py", + "title": "src/app_runtime/config/__init__.py:1-4", + "content": "from app_runtime.config.file_loader import ConfigFileLoader\nfrom app_runtime.config.providers import FileConfigProvider\n\n__all__ = [\"ConfigFileLoader\", \"FileConfigProvider\"]", + "start_line": 1, + "end_line": 4, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.config.__init__", + "is_test": false, + "blob_sha": "612918029820a2a983330ec92256142b55b9de4bdf3399ece18e2a02dbad9729", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/config/providers.py", + "title": "src/app_runtime/config/providers.py:FileConfigProvider", + "content": "class FileConfigProvider(ConfigProvider):\n def __init__(self, path: str | Path) -> None:\n self._loader = ConfigFileLoader(path)\n\n @property\n def loader(self) -> ConfigFileLoader:\n return self._loader\n\n def load(self) -> dict[str, Any]:\n config = self._loader.load_sync()\n if not isinstance(config, dict):\n raise TypeError(\"Config root must be a mapping\")\n return dict(config)", + "start_line": 10, + "end_line": 22, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.config.providers", + "is_test": false, + "blob_sha": "8c53ca0122d6df6c5763bca15e99434bb4daebd5a618b8fc927e9ae90b022e64", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/contracts/__init__.py", + "title": "src/app_runtime/__init__.py:1-1", + "content": "__all__: list[str] = []", + "start_line": 1, + "end_line": 1, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.__init__", + "is_test": false, + "blob_sha": "8eea9df4f6d7b38ca0e39ccc27b04700e3d08dbeec8046d613d22706d19985fa", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/config/file_loader.py", + "title": "src/app_runtime/config/file_loader.py:ConfigFileLoader", + "content": "class ConfigFileLoader:\n def __init__(self, path: str | Path) -> None:\n self.path = Path(path)\n self.config: Any = None\n self.last_valid_config: Any = None\n self._last_seen_hash: str | None = None\n\n def read_text(self) -> str:\n return self.path.read_text(encoding=\"utf-8\")\n\n def parse(self, data: str) -> Any:\n suffix = self.path.suffix.lower()\n if suffix in {\".yml\", \".yaml\"}:\n return yaml.safe_load(data)\n return json.loads(data)\n\n def load_sync(self) -> Any:\n data = self.read_text()\n parsed = self.parse(data)\n self.config = parsed\n self.last_valid_config = parsed\n self._last_seen_hash = self._calculate_hash(data)\n return parsed\n\n def load_if_changed(self) -> tuple[bool, Any]:\n data = self.read_text()\n current_hash = self._calculate_hash(data)\n if current_hash == self._last_seen_hash:\n return False, self.config\n parsed = self.parse(data)\n self.config = parsed\n self.last_valid_config = parsed\n self._last_seen_hash = current_hash\n return True, parsed\n\n @staticmethod\n def _calculate_hash(data: str) -> str:\n return hashlib.sha256(data.encode(\"utf-8\")).hexdigest()", + "start_line": 11, + "end_line": 48, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/contracts/config.py", + "title": "src/app_runtime/contracts/config.py:ConfigProvider", + "content": "class ConfigProvider(ABC):\n @abstractmethod\n def load(self) -> dict[str, Any]:\n \"\"\"Return a config fragment.\"\"\"", + "start_line": 7, + "end_line": 10, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.config", + "is_test": false, + "blob_sha": "5e773880267743ee94954ea2db120c2d88c54d4312893293d1b89df405283ed4", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/contracts/health.py", + "title": "src/app_runtime/contracts/health.py:HealthContributor", + "content": "class HealthContributor(ABC):\n @abstractmethod\n def health(self) -> WorkerHealth:\n \"\"\"Return contributor health state.\"\"\"", + "start_line": 7, + "end_line": 10, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.health", + "is_test": false, + "blob_sha": "6bd92611def7131e32d4dd34a8ed85e6cf3c67722ad27797032a632cb30dc097", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/contracts/application.py", + "title": "src/app_runtime/contracts/application.py:ApplicationModule", + "content": "class ApplicationModule(ABC):\n @property\n @abstractmethod\n def name(self) -> str:\n \"\"\"Module name used for runtime status and diagnostics.\"\"\"\n\n @abstractmethod\n def register(self, registry: ModuleRegistry) -> None:\n \"\"\"Register workers, services, and health contributors.\"\"\"", + "start_line": 8, + "end_line": 16, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.application", + "is_test": false, + "blob_sha": "197c35634dca49c352ce3f230295a485fbffb672ce7bb8c08e752bfdf61e7fa4", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "relations": [ + { + "path": "src/app_runtime/workflow/runtime_factory.py", + "metadata": { + "edge_id": "db6124c75b447e4a0a9ba267bd6d6cdf267b41a733b2843d724dd42ec6f4945d", + "edge_type": "dataflow_slice", + "src_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "src_qname": "WorkflowRuntimeFactory.__init__", + "dst_symbol_id": "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333", + "dst_ref": "WorkflowRuntimeFactory.create_engine", + "resolution": "resolved", + "slice_id": "db6124c75b447e4a0a9ba267bd6d6cdf267b41a733b2843d724dd42ec6f4945d", + "root_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "path_symbols": [ + "WorkflowRuntimeFactory.__init__", + "WorkflowRuntimeFactory._hooks", + "WorkflowRuntimeFactory.create_engine" + ], + "path_symbol_ids": [ + "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "WorkflowRuntimeFactory.__init__\n -> WorkflowRuntimeFactory._hooks\n -> WorkflowRuntimeFactory.create_engine" + }, + { + "path": "src/app_runtime/workflow/runtime_factory.py", + "metadata": { + "edge_id": "f46f5a871a3800b517b0f94ed2551392629e1d7920bc3e3b5a21e0d8f012b741", + "edge_type": "dataflow_slice", + "src_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "src_qname": "WorkflowRuntimeFactory.__init__", + "dst_symbol_id": "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333", + "dst_ref": "WorkflowRuntimeFactory.create_engine", + "resolution": "resolved", + "slice_id": "f46f5a871a3800b517b0f94ed2551392629e1d7920bc3e3b5a21e0d8f012b741", + "root_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "path_symbols": [ + "WorkflowRuntimeFactory.__init__", + "WorkflowRuntimeFactory._snapshot_sanitizer", + "WorkflowRuntimeFactory.create_engine" + ], + "path_symbol_ids": [ + "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "WorkflowRuntimeFactory.__init__\n -> WorkflowRuntimeFactory._snapshot_sanitizer\n -> WorkflowRuntimeFactory.create_engine" + }, + { + "path": "src/app_runtime/workflow/runtime_factory.py", + "metadata": { + "edge_id": "543624853400c556d1939007017145281d76b00a694c7d5c4fbb0414ded3434e", + "edge_type": "dataflow_slice", + "src_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "src_qname": "WorkflowRuntimeFactory.__init__", + "dst_symbol_id": "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333", + "dst_ref": "WorkflowRuntimeFactory.create_engine", + "resolution": "resolved", + "slice_id": "543624853400c556d1939007017145281d76b00a694c7d5c4fbb0414ded3434e", + "root_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "path_symbols": [ + "WorkflowRuntimeFactory.__init__", + "WorkflowRuntimeFactory._connection_factory", + "WorkflowRuntimeFactory.create_engine" + ], + "path_symbol_ids": [ + "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "WorkflowRuntimeFactory.__init__\n -> WorkflowRuntimeFactory._connection_factory\n -> WorkflowRuntimeFactory.create_engine" + }, + { + "path": "src/app_runtime/workflow/runtime_factory.py", + "metadata": { + "edge_id": "346cf5ddb4308b8403d27c5b54da8cba298bb0af7dc04c2fe30312ef574103c6", + "edge_type": "dataflow_slice", + "src_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "src_qname": "WorkflowRuntimeFactory.__init__", + "dst_symbol_id": "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333", + "dst_ref": "WorkflowRuntimeFactory.create_engine", + "resolution": "resolved", + "slice_id": "346cf5ddb4308b8403d27c5b54da8cba298bb0af7dc04c2fe30312ef574103c6", + "root_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "path_symbols": [ + "WorkflowRuntimeFactory.__init__", + "WorkflowRuntimeFactory._traces", + "WorkflowRuntimeFactory.create_engine" + ], + "path_symbol_ids": [ + "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "WorkflowRuntimeFactory.__init__\n -> WorkflowRuntimeFactory._traces\n -> WorkflowRuntimeFactory.create_engine" + }, + { + "path": "src/app_runtime/workflow/runtime_factory.py", + "metadata": { + "edge_id": "de0cb1913ba41f673cfb601cab23cfb2e1044ed3dd8c061aff486075aeb8af20", + "edge_type": "writes_attr", + "src_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "src_qname": "WorkflowRuntimeFactory.__init__", + "dst_symbol_id": null, + "dst_ref": "WorkflowRuntimeFactory._snapshot_sanitizer", + "resolution": "partial", + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "WorkflowRuntimeFactory.__init__ writes_attr WorkflowRuntimeFactory._snapshot_sanitizer" + }, + { + "path": "src/app_runtime/workflow/runtime_factory.py", + "metadata": { + "edge_id": "fa86efb6871092fc88df68295c0d92dbe46253e1afa3246ca62b6da11d4d5569", + "edge_type": "calls", + "src_symbol_id": "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333", + "src_qname": "WorkflowRuntimeFactory.create_engine", + "dst_symbol_id": null, + "dst_ref": "WorkflowPersistence.create_default", + "resolution": "partial", + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "WorkflowRuntimeFactory.create_engine calls WorkflowPersistence.create_default" + } + ], + "entrypoints": [], + "test_candidates": [], + "layer_outcomes": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 6, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 10, + "empty": false, + "fallback_used": false + } + ], + "missing_layers": [], + "raw_rows": [ + { + "path": "src/plba/__init__.py", + "content": "const WorkflowRuntimeFactory\nWorkflowRuntimeFactory = plba.workflow.WorkflowRuntimeFactory", + "layer": "C1_SYMBOL_CATALOG", + "title": "WorkflowRuntimeFactory", + "span_start": 21, + "span_end": 30, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "cb7c73db05c2622aac89114bed1cddd1d567de21cfac5c53037c62b1074b25c9", + "qname": "WorkflowRuntimeFactory", + "kind": "const", + "signature": "WorkflowRuntimeFactory = plba.workflow.WorkflowRuntimeFactory", + "parent_symbol_id": null, + "package_or_module": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/runtime_factory.py", + "content": "class WorkflowRuntimeFactory\nWorkflowRuntimeFactory", + "layer": "C1_SYMBOL_CATALOG", + "title": "WorkflowRuntimeFactory", + "span_start": 7, + "span_end": 19, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "9da827270329de64ebb426fadaaa5e35145e6666b92c6da186e08bf4b071f458", + "qname": "WorkflowRuntimeFactory", + "kind": "class", + "signature": "WorkflowRuntimeFactory", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.workflow.runtime_factory", + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/workflow.py", + "content": "const WorkflowRuntimeFactory\nWorkflowRuntimeFactory = app_runtime.workflow.runtime_factory.WorkflowRuntimeFactory", + "layer": "C1_SYMBOL_CATALOG", + "title": "WorkflowRuntimeFactory", + "span_start": 7, + "span_end": 7, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "80865947d1ca709971efe9d68a9ee1f348c1c43d351bf4e1b4a5884d72985b6b", + "qname": "WorkflowRuntimeFactory", + "kind": "const", + "signature": "WorkflowRuntimeFactory = app_runtime.workflow.runtime_factory.WorkflowRuntimeFactory", + "parent_symbol_id": null, + "package_or_module": "src.plba.workflow", + "is_test": false, + "blob_sha": "f227797606042273d1f1798f76846952892eeb9e4e9e6a38fb8a631d7231ff39", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/runtime_factory.py", + "content": "method WorkflowRuntimeFactory.__init__\n__init__(self, connection_factory)", + "layer": "C1_SYMBOL_CATALOG", + "title": "WorkflowRuntimeFactory.__init__", + "span_start": 8, + "span_end": 12, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "qname": "WorkflowRuntimeFactory.__init__", + "kind": "method", + "signature": "__init__(self, connection_factory)", + "parent_symbol_id": "WorkflowRuntimeFactory", + "package_or_module": "src.app_runtime.workflow.runtime_factory", + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/runtime_factory.py", + "content": "method WorkflowRuntimeFactory.create_engine\ncreate_engine(self, workflow)", + "layer": "C1_SYMBOL_CATALOG", + "title": "WorkflowRuntimeFactory.create_engine", + "span_start": 14, + "span_end": 19, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333", + "qname": "WorkflowRuntimeFactory.create_engine", + "kind": "method", + "signature": "create_engine(self, workflow)", + "parent_symbol_id": "WorkflowRuntimeFactory", + "package_or_module": "src.app_runtime.workflow.runtime_factory", + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/runtime_factory.py", + "content": "const WorkflowPersistence\nWorkflowPersistence = app_runtime.workflow.persistence.WorkflowPersistence", + "layer": "C1_SYMBOL_CATALOG", + "title": "WorkflowPersistence", + "span_start": 4, + "span_end": 4, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "35693d37698e35079400b6a021d46209966ce469d9f77763d1c82d82ef4600b2", + "qname": "WorkflowPersistence", + "kind": "const", + "signature": "WorkflowPersistence = app_runtime.workflow.persistence.WorkflowPersistence", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.workflow.runtime_factory", + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/runtime_factory.py", + "content": "const annotations\nannotations = __future__.annotations", + "layer": "C1_SYMBOL_CATALOG", + "title": "annotations", + "span_start": 1, + "span_end": 1, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "e016ec68f9d15d52fe0505774229fafc705c1bf3dfda78845a3db9b032a4441d", + "qname": "annotations", + "kind": "const", + "signature": "annotations = __future__.annotations", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.workflow.runtime_factory", + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/runtime_factory.py", + "content": "const WorkflowEngine\nWorkflowEngine = app_runtime.workflow.engine.workflow_engine.WorkflowEngine", + "layer": "C1_SYMBOL_CATALOG", + "title": "WorkflowEngine", + "span_start": 3, + "span_end": 3, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "da4aee8bc7d248177fbc4f892732c6eb08baa6d268c32921a217747143a99fe0", + "qname": "WorkflowEngine", + "kind": "const", + "signature": "WorkflowEngine = app_runtime.workflow.engine.workflow_engine.WorkflowEngine", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.workflow.runtime_factory", + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/runtime_factory.py", + "content": "WorkflowRuntimeFactory.__init__\n -> WorkflowRuntimeFactory._hooks\n -> WorkflowRuntimeFactory.create_engine", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowRuntimeFactory.__init__:dataflow_slice", + "span_start": 11, + "span_end": 19, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "db6124c75b447e4a0a9ba267bd6d6cdf267b41a733b2843d724dd42ec6f4945d", + "edge_type": "dataflow_slice", + "src_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "src_qname": "WorkflowRuntimeFactory.__init__", + "dst_symbol_id": "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333", + "dst_ref": "WorkflowRuntimeFactory.create_engine", + "resolution": "resolved", + "slice_id": "db6124c75b447e4a0a9ba267bd6d6cdf267b41a733b2843d724dd42ec6f4945d", + "root_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "path_symbols": [ + "WorkflowRuntimeFactory.__init__", + "WorkflowRuntimeFactory._hooks", + "WorkflowRuntimeFactory.create_engine" + ], + "path_symbol_ids": [ + "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/runtime_factory.py", + "content": "WorkflowRuntimeFactory.__init__\n -> WorkflowRuntimeFactory._snapshot_sanitizer\n -> WorkflowRuntimeFactory.create_engine", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowRuntimeFactory.__init__:dataflow_slice", + "span_start": 12, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "f46f5a871a3800b517b0f94ed2551392629e1d7920bc3e3b5a21e0d8f012b741", + "edge_type": "dataflow_slice", + "src_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "src_qname": "WorkflowRuntimeFactory.__init__", + "dst_symbol_id": "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333", + "dst_ref": "WorkflowRuntimeFactory.create_engine", + "resolution": "resolved", + "slice_id": "f46f5a871a3800b517b0f94ed2551392629e1d7920bc3e3b5a21e0d8f012b741", + "root_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "path_symbols": [ + "WorkflowRuntimeFactory.__init__", + "WorkflowRuntimeFactory._snapshot_sanitizer", + "WorkflowRuntimeFactory.create_engine" + ], + "path_symbol_ids": [ + "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/runtime_factory.py", + "content": "WorkflowRuntimeFactory.__init__\n -> WorkflowRuntimeFactory._connection_factory\n -> WorkflowRuntimeFactory.create_engine", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowRuntimeFactory.__init__:dataflow_slice", + "span_start": 9, + "span_end": 16, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "543624853400c556d1939007017145281d76b00a694c7d5c4fbb0414ded3434e", + "edge_type": "dataflow_slice", + "src_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "src_qname": "WorkflowRuntimeFactory.__init__", + "dst_symbol_id": "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333", + "dst_ref": "WorkflowRuntimeFactory.create_engine", + "resolution": "resolved", + "slice_id": "543624853400c556d1939007017145281d76b00a694c7d5c4fbb0414ded3434e", + "root_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "path_symbols": [ + "WorkflowRuntimeFactory.__init__", + "WorkflowRuntimeFactory._connection_factory", + "WorkflowRuntimeFactory.create_engine" + ], + "path_symbol_ids": [ + "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/runtime_factory.py", + "content": "WorkflowRuntimeFactory.__init__\n -> WorkflowRuntimeFactory._traces\n -> WorkflowRuntimeFactory.create_engine", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowRuntimeFactory.__init__:dataflow_slice", + "span_start": 10, + "span_end": 19, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "346cf5ddb4308b8403d27c5b54da8cba298bb0af7dc04c2fe30312ef574103c6", + "edge_type": "dataflow_slice", + "src_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "src_qname": "WorkflowRuntimeFactory.__init__", + "dst_symbol_id": "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333", + "dst_ref": "WorkflowRuntimeFactory.create_engine", + "resolution": "resolved", + "slice_id": "346cf5ddb4308b8403d27c5b54da8cba298bb0af7dc04c2fe30312ef574103c6", + "root_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "path_symbols": [ + "WorkflowRuntimeFactory.__init__", + "WorkflowRuntimeFactory._traces", + "WorkflowRuntimeFactory.create_engine" + ], + "path_symbol_ids": [ + "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/runtime_factory.py", + "content": "WorkflowRuntimeFactory.__init__ writes_attr WorkflowRuntimeFactory._snapshot_sanitizer", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowRuntimeFactory.__init__:writes_attr", + "span_start": 12, + "span_end": 12, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "de0cb1913ba41f673cfb601cab23cfb2e1044ed3dd8c061aff486075aeb8af20", + "edge_type": "writes_attr", + "src_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "src_qname": "WorkflowRuntimeFactory.__init__", + "dst_symbol_id": null, + "dst_ref": "WorkflowRuntimeFactory._snapshot_sanitizer", + "resolution": "partial", + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/runtime_factory.py", + "content": "WorkflowRuntimeFactory.create_engine calls WorkflowPersistence.create_default", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowRuntimeFactory.create_engine:calls", + "span_start": 15, + "span_end": 18, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "fa86efb6871092fc88df68295c0d92dbe46253e1afa3246ca62b6da11d4d5569", + "edge_type": "calls", + "src_symbol_id": "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333", + "src_qname": "WorkflowRuntimeFactory.create_engine", + "dst_symbol_id": null, + "dst_ref": "WorkflowPersistence.create_default", + "resolution": "partial", + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/runtime_factory.py", + "content": "class WorkflowRuntimeFactory:\n def __init__(self, connection_factory=None, *, traces, hooks=None, snapshot_sanitizer=None) -> None:\n self._connection_factory = connection_factory\n self._traces = traces\n self._hooks = hooks\n self._snapshot_sanitizer = snapshot_sanitizer\n\n def create_engine(self, workflow) -> WorkflowEngine:\n persistence = WorkflowPersistence.create_default(\n self._connection_factory,\n snapshot_sanitizer=self._snapshot_sanitizer,\n )\n return WorkflowEngine(workflow, persistence, traces=self._traces, hooks=self._hooks)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/workflow/runtime_factory.py:WorkflowRuntimeFactory", + "span_start": 7, + "span_end": 19, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.workflow.runtime_factory", + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/__init__.py", + "content": "from plba.bootstrap import create_runtime\nfrom plba.config import ConfigFileLoader, FileConfigProvider\nfrom plba.control import ControlActionSet, ControlChannel, ControlPlaneService, HttpControlChannel\nfrom plba.contracts import (\n ApplicationModule,\n ConfigProvider,\n HealthContributor,\n TraceContext,\n TraceContextRecord,\n TraceLogMessage,\n TraceTransport,\n Worker,\n WorkerHealth,\n WorkerStatus,\n)\nfrom plba.core import ConfigurationManager, RuntimeManager, ServiceContainer\nfrom plba.health import HealthRegistry\nfrom plba.logging import LogManager\nfrom plba.queue import InMemoryTaskQueue\nfrom plba.tracing import MySqlTraceTransport, NoOpTraceTransport, TraceService\nfrom plba.workflow import (\n StepResult,\n WorkflowContext,\n WorkflowDefinition,\n WorkflowEngine,\n WorkflowEngineHooks,\n WorkflowNode,\n WorkflowRuntimeFactory,\n WorkflowStep,\n)\nfrom plba.workers import WorkerSupervisor\n\n__all__ = [\n \"ApplicationModule\",\n \"ConfigFileLoader\",\n \"ConfigProvider\",\n \"ConfigurationManager\",\n \"ControlActionSet\",\n \"ControlChannel\",\n \"ControlPlaneService\",\n \"create_runtime\",\n \"FileConfigProvider\",\n \"HealthContributor\",\n \"HealthRegistry\",\n \"HttpControlChannel\",\n \"InMemoryTaskQueue\",\n \"LogManager\",\n \"MySqlTraceTransport\",\n \"NoOpTraceTransport\",\n \"RuntimeManager\",\n \"ServiceContainer\",\n \"TraceContext\",\n \"TraceContextRecord\",\n \"TraceLogMessage\",\n \"TraceService\",\n \"TraceTransport\",\n \"StepResult\",\n \"Worker\",\n \"WorkerHealth\",\n \"WorkerStatus\",\n \"WorkflowContext\",\n \"WorkflowDefinition\",\n \"WorkflowEngine\",\n \"WorkflowEngineHooks\",\n \"WorkflowNode\",\n \"WorkflowRuntimeFactory\",\n \"WorkflowStep\",\n \"WorkerSupervisor\",\n]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/__init__.py:1-69", + "span_start": 1, + "span_end": 69, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/workflow.py", + "content": "from app_runtime.workflow.contracts.context import WorkflowContext\nfrom app_runtime.workflow.contracts.result import StepResult\nfrom app_runtime.workflow.contracts.step import WorkflowStep\nfrom app_runtime.workflow.contracts.workflow import WorkflowDefinition, WorkflowNode\nfrom app_runtime.workflow.engine.hooks import WorkflowEngineHooks\nfrom app_runtime.workflow.engine.workflow_engine import WorkflowEngine\nfrom app_runtime.workflow.runtime_factory import WorkflowRuntimeFactory\n\n__all__ = [\n \"StepResult\",\n \"WorkflowContext\",\n \"WorkflowDefinition\",\n \"WorkflowEngine\",\n \"WorkflowEngineHooks\",\n \"WorkflowNode\",\n \"WorkflowRuntimeFactory\",\n \"WorkflowStep\",\n]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/workflow.py:1-18", + "span_start": 1, + "span_end": 18, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.workflow", + "is_test": false, + "blob_sha": "f227797606042273d1f1798f76846952892eeb9e4e9e6a38fb8a631d7231ff39", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/__init__.py", + "content": "from app_runtime.config.file_loader import ConfigFileLoader\nfrom app_runtime.config.providers import FileConfigProvider\n\n__all__ = [\"ConfigFileLoader\", \"FileConfigProvider\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/config/__init__.py:1-4", + "span_start": 1, + "span_end": 4, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.config.__init__", + "is_test": false, + "blob_sha": "612918029820a2a983330ec92256142b55b9de4bdf3399ece18e2a02dbad9729", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/providers.py", + "content": "class FileConfigProvider(ConfigProvider):\n def __init__(self, path: str | Path) -> None:\n self._loader = ConfigFileLoader(path)\n\n @property\n def loader(self) -> ConfigFileLoader:\n return self._loader\n\n def load(self) -> dict[str, Any]:\n config = self._loader.load_sync()\n if not isinstance(config, dict):\n raise TypeError(\"Config root must be a mapping\")\n return dict(config)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/config/providers.py:FileConfigProvider", + "span_start": 10, + "span_end": 22, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.config.providers", + "is_test": false, + "blob_sha": "8c53ca0122d6df6c5763bca15e99434bb4daebd5a618b8fc927e9ae90b022e64", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/__init__.py", + "content": "__all__: list[str] = []", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/__init__.py:1-1", + "span_start": 1, + "span_end": 1, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.__init__", + "is_test": false, + "blob_sha": "8eea9df4f6d7b38ca0e39ccc27b04700e3d08dbeec8046d613d22706d19985fa", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "class ConfigFileLoader:\n def __init__(self, path: str | Path) -> None:\n self.path = Path(path)\n self.config: Any = None\n self.last_valid_config: Any = None\n self._last_seen_hash: str | None = None\n\n def read_text(self) -> str:\n return self.path.read_text(encoding=\"utf-8\")\n\n def parse(self, data: str) -> Any:\n suffix = self.path.suffix.lower()\n if suffix in {\".yml\", \".yaml\"}:\n return yaml.safe_load(data)\n return json.loads(data)\n\n def load_sync(self) -> Any:\n data = self.read_text()\n parsed = self.parse(data)\n self.config = parsed\n self.last_valid_config = parsed\n self._last_seen_hash = self._calculate_hash(data)\n return parsed\n\n def load_if_changed(self) -> tuple[bool, Any]:\n data = self.read_text()\n current_hash = self._calculate_hash(data)\n if current_hash == self._last_seen_hash:\n return False, self.config\n parsed = self.parse(data)\n self.config = parsed\n self.last_valid_config = parsed\n self._last_seen_hash = current_hash\n return True, parsed\n\n @staticmethod\n def _calculate_hash(data: str) -> str:\n return hashlib.sha256(data.encode(\"utf-8\")).hexdigest()", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/config/file_loader.py:ConfigFileLoader", + "span_start": 11, + "span_end": 48, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/config.py", + "content": "class ConfigProvider(ABC):\n @abstractmethod\n def load(self) -> dict[str, Any]:\n \"\"\"Return a config fragment.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/contracts/config.py:ConfigProvider", + "span_start": 7, + "span_end": 10, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.config", + "is_test": false, + "blob_sha": "5e773880267743ee94954ea2db120c2d88c54d4312893293d1b89df405283ed4", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/health.py", + "content": "class HealthContributor(ABC):\n @abstractmethod\n def health(self) -> WorkerHealth:\n \"\"\"Return contributor health state.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/contracts/health.py:HealthContributor", + "span_start": 7, + "span_end": 10, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.health", + "is_test": false, + "blob_sha": "6bd92611def7131e32d4dd34a8ed85e6cf3c67722ad27797032a632cb30dc097", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/application.py", + "content": "class ApplicationModule(ABC):\n @property\n @abstractmethod\n def name(self) -> str:\n \"\"\"Module name used for runtime status and diagnostics.\"\"\"\n\n @abstractmethod\n def register(self, registry: ModuleRegistry) -> None:\n \"\"\"Register workers, services, and health contributors.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/contracts/application.py:ApplicationModule", + "span_start": 8, + "span_end": 16, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.application", + "is_test": false, + "blob_sha": "197c35634dca49c352ce3f230295a485fbffb672ce7bb8c08e752bfdf61e7fa4", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "retrieval_report": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "vector", + "C2_DEPENDENCY_GRAPH": "vector", + "C0_SOURCE_CHUNKS": "vector" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C0_SOURCE_CHUNKS": 10 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [] + } + }, + "fallback": { + "used": false, + "reason": null + }, + "retrieval_by_layer_ms": { + "C1_SYMBOL_CATALOG": 27, + "C2_DEPENDENCY_GRAPH": 29, + "C0_SOURCE_CHUNKS": 17 + } + } + }, + "diagnostics": { + "intent_correct": null, + "target_found": true, + "layers_used": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "retrieval_sufficient": false, + "answer_mode": "degraded", + "router_result": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "FIND_TESTS", + "path_scope": [], + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "symbol_resolution_status": "resolved" + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Где тесты для WorkflowRuntimeFactory?", + "sub_intent": "FIND_TESTS", + "path_scope": [], + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 6, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 10, + "empty": false, + "fallback_used": false + } + ], + "empty_layers": [], + "evidence_gate_decision": { + "sufficient": false, + "failure_reasons": [ + "tests_not_found" + ], + "evidence_count": 24 + }, + "failure_reasons": [ + "tests_not_found" + ], + "timings_ms": { + "router": 0, + "retrieval": 74, + "pre_evidence_gate": 0 + } + }, + "rag_rows": [ + { + "path": "src/plba/__init__.py", + "content": "const WorkflowRuntimeFactory\nWorkflowRuntimeFactory = plba.workflow.WorkflowRuntimeFactory", + "layer": "C1_SYMBOL_CATALOG", + "title": "WorkflowRuntimeFactory", + "span_start": 21, + "span_end": 30, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "cb7c73db05c2622aac89114bed1cddd1d567de21cfac5c53037c62b1074b25c9", + "qname": "WorkflowRuntimeFactory", + "kind": "const", + "signature": "WorkflowRuntimeFactory = plba.workflow.WorkflowRuntimeFactory", + "parent_symbol_id": null, + "package_or_module": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/runtime_factory.py", + "content": "class WorkflowRuntimeFactory\nWorkflowRuntimeFactory", + "layer": "C1_SYMBOL_CATALOG", + "title": "WorkflowRuntimeFactory", + "span_start": 7, + "span_end": 19, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "9da827270329de64ebb426fadaaa5e35145e6666b92c6da186e08bf4b071f458", + "qname": "WorkflowRuntimeFactory", + "kind": "class", + "signature": "WorkflowRuntimeFactory", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.workflow.runtime_factory", + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/workflow.py", + "content": "const WorkflowRuntimeFactory\nWorkflowRuntimeFactory = app_runtime.workflow.runtime_factory.WorkflowRuntimeFactory", + "layer": "C1_SYMBOL_CATALOG", + "title": "WorkflowRuntimeFactory", + "span_start": 7, + "span_end": 7, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "80865947d1ca709971efe9d68a9ee1f348c1c43d351bf4e1b4a5884d72985b6b", + "qname": "WorkflowRuntimeFactory", + "kind": "const", + "signature": "WorkflowRuntimeFactory = app_runtime.workflow.runtime_factory.WorkflowRuntimeFactory", + "parent_symbol_id": null, + "package_or_module": "src.plba.workflow", + "is_test": false, + "blob_sha": "f227797606042273d1f1798f76846952892eeb9e4e9e6a38fb8a631d7231ff39", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/runtime_factory.py", + "content": "method WorkflowRuntimeFactory.__init__\n__init__(self, connection_factory)", + "layer": "C1_SYMBOL_CATALOG", + "title": "WorkflowRuntimeFactory.__init__", + "span_start": 8, + "span_end": 12, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "qname": "WorkflowRuntimeFactory.__init__", + "kind": "method", + "signature": "__init__(self, connection_factory)", + "parent_symbol_id": "WorkflowRuntimeFactory", + "package_or_module": "src.app_runtime.workflow.runtime_factory", + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/runtime_factory.py", + "content": "method WorkflowRuntimeFactory.create_engine\ncreate_engine(self, workflow)", + "layer": "C1_SYMBOL_CATALOG", + "title": "WorkflowRuntimeFactory.create_engine", + "span_start": 14, + "span_end": 19, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333", + "qname": "WorkflowRuntimeFactory.create_engine", + "kind": "method", + "signature": "create_engine(self, workflow)", + "parent_symbol_id": "WorkflowRuntimeFactory", + "package_or_module": "src.app_runtime.workflow.runtime_factory", + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/runtime_factory.py", + "content": "const WorkflowPersistence\nWorkflowPersistence = app_runtime.workflow.persistence.WorkflowPersistence", + "layer": "C1_SYMBOL_CATALOG", + "title": "WorkflowPersistence", + "span_start": 4, + "span_end": 4, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "35693d37698e35079400b6a021d46209966ce469d9f77763d1c82d82ef4600b2", + "qname": "WorkflowPersistence", + "kind": "const", + "signature": "WorkflowPersistence = app_runtime.workflow.persistence.WorkflowPersistence", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.workflow.runtime_factory", + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/runtime_factory.py", + "content": "const annotations\nannotations = __future__.annotations", + "layer": "C1_SYMBOL_CATALOG", + "title": "annotations", + "span_start": 1, + "span_end": 1, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "e016ec68f9d15d52fe0505774229fafc705c1bf3dfda78845a3db9b032a4441d", + "qname": "annotations", + "kind": "const", + "signature": "annotations = __future__.annotations", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.workflow.runtime_factory", + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/runtime_factory.py", + "content": "const WorkflowEngine\nWorkflowEngine = app_runtime.workflow.engine.workflow_engine.WorkflowEngine", + "layer": "C1_SYMBOL_CATALOG", + "title": "WorkflowEngine", + "span_start": 3, + "span_end": 3, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "da4aee8bc7d248177fbc4f892732c6eb08baa6d268c32921a217747143a99fe0", + "qname": "WorkflowEngine", + "kind": "const", + "signature": "WorkflowEngine = app_runtime.workflow.engine.workflow_engine.WorkflowEngine", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.workflow.runtime_factory", + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/runtime_factory.py", + "content": "WorkflowRuntimeFactory.__init__\n -> WorkflowRuntimeFactory._hooks\n -> WorkflowRuntimeFactory.create_engine", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowRuntimeFactory.__init__:dataflow_slice", + "span_start": 11, + "span_end": 19, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "db6124c75b447e4a0a9ba267bd6d6cdf267b41a733b2843d724dd42ec6f4945d", + "edge_type": "dataflow_slice", + "src_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "src_qname": "WorkflowRuntimeFactory.__init__", + "dst_symbol_id": "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333", + "dst_ref": "WorkflowRuntimeFactory.create_engine", + "resolution": "resolved", + "slice_id": "db6124c75b447e4a0a9ba267bd6d6cdf267b41a733b2843d724dd42ec6f4945d", + "root_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "path_symbols": [ + "WorkflowRuntimeFactory.__init__", + "WorkflowRuntimeFactory._hooks", + "WorkflowRuntimeFactory.create_engine" + ], + "path_symbol_ids": [ + "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/runtime_factory.py", + "content": "WorkflowRuntimeFactory.__init__\n -> WorkflowRuntimeFactory._snapshot_sanitizer\n -> WorkflowRuntimeFactory.create_engine", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowRuntimeFactory.__init__:dataflow_slice", + "span_start": 12, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "f46f5a871a3800b517b0f94ed2551392629e1d7920bc3e3b5a21e0d8f012b741", + "edge_type": "dataflow_slice", + "src_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "src_qname": "WorkflowRuntimeFactory.__init__", + "dst_symbol_id": "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333", + "dst_ref": "WorkflowRuntimeFactory.create_engine", + "resolution": "resolved", + "slice_id": "f46f5a871a3800b517b0f94ed2551392629e1d7920bc3e3b5a21e0d8f012b741", + "root_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "path_symbols": [ + "WorkflowRuntimeFactory.__init__", + "WorkflowRuntimeFactory._snapshot_sanitizer", + "WorkflowRuntimeFactory.create_engine" + ], + "path_symbol_ids": [ + "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/runtime_factory.py", + "content": "WorkflowRuntimeFactory.__init__\n -> WorkflowRuntimeFactory._connection_factory\n -> WorkflowRuntimeFactory.create_engine", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowRuntimeFactory.__init__:dataflow_slice", + "span_start": 9, + "span_end": 16, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "543624853400c556d1939007017145281d76b00a694c7d5c4fbb0414ded3434e", + "edge_type": "dataflow_slice", + "src_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "src_qname": "WorkflowRuntimeFactory.__init__", + "dst_symbol_id": "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333", + "dst_ref": "WorkflowRuntimeFactory.create_engine", + "resolution": "resolved", + "slice_id": "543624853400c556d1939007017145281d76b00a694c7d5c4fbb0414ded3434e", + "root_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "path_symbols": [ + "WorkflowRuntimeFactory.__init__", + "WorkflowRuntimeFactory._connection_factory", + "WorkflowRuntimeFactory.create_engine" + ], + "path_symbol_ids": [ + "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/runtime_factory.py", + "content": "WorkflowRuntimeFactory.__init__\n -> WorkflowRuntimeFactory._traces\n -> WorkflowRuntimeFactory.create_engine", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowRuntimeFactory.__init__:dataflow_slice", + "span_start": 10, + "span_end": 19, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "346cf5ddb4308b8403d27c5b54da8cba298bb0af7dc04c2fe30312ef574103c6", + "edge_type": "dataflow_slice", + "src_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "src_qname": "WorkflowRuntimeFactory.__init__", + "dst_symbol_id": "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333", + "dst_ref": "WorkflowRuntimeFactory.create_engine", + "resolution": "resolved", + "slice_id": "346cf5ddb4308b8403d27c5b54da8cba298bb0af7dc04c2fe30312ef574103c6", + "root_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "path_symbols": [ + "WorkflowRuntimeFactory.__init__", + "WorkflowRuntimeFactory._traces", + "WorkflowRuntimeFactory.create_engine" + ], + "path_symbol_ids": [ + "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/runtime_factory.py", + "content": "WorkflowRuntimeFactory.__init__ writes_attr WorkflowRuntimeFactory._snapshot_sanitizer", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowRuntimeFactory.__init__:writes_attr", + "span_start": 12, + "span_end": 12, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "de0cb1913ba41f673cfb601cab23cfb2e1044ed3dd8c061aff486075aeb8af20", + "edge_type": "writes_attr", + "src_symbol_id": "d82a367758b2f7bcce3d351e576f25768b0afe8b915d01ace1c7d6380f14f52f", + "src_qname": "WorkflowRuntimeFactory.__init__", + "dst_symbol_id": null, + "dst_ref": "WorkflowRuntimeFactory._snapshot_sanitizer", + "resolution": "partial", + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/runtime_factory.py", + "content": "WorkflowRuntimeFactory.create_engine calls WorkflowPersistence.create_default", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "WorkflowRuntimeFactory.create_engine:calls", + "span_start": 15, + "span_end": 18, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "fa86efb6871092fc88df68295c0d92dbe46253e1afa3246ca62b6da11d4d5569", + "edge_type": "calls", + "src_symbol_id": "86f3a0bf3332952bf469e564748f16f1f7814ab51d5a963e5eb33de5e171b333", + "src_qname": "WorkflowRuntimeFactory.create_engine", + "dst_symbol_id": null, + "dst_ref": "WorkflowPersistence.create_default", + "resolution": "partial", + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/runtime_factory.py", + "content": "class WorkflowRuntimeFactory:\n def __init__(self, connection_factory=None, *, traces, hooks=None, snapshot_sanitizer=None) -> None:\n self._connection_factory = connection_factory\n self._traces = traces\n self._hooks = hooks\n self._snapshot_sanitizer = snapshot_sanitizer\n\n def create_engine(self, workflow) -> WorkflowEngine:\n persistence = WorkflowPersistence.create_default(\n self._connection_factory,\n snapshot_sanitizer=self._snapshot_sanitizer,\n )\n return WorkflowEngine(workflow, persistence, traces=self._traces, hooks=self._hooks)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/workflow/runtime_factory.py:WorkflowRuntimeFactory", + "span_start": 7, + "span_end": 19, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.workflow.runtime_factory", + "is_test": false, + "blob_sha": "4d03c095f3082eb3ea8d558d65a785eb747fffd9c1383946e6c433bcedb7259a", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/__init__.py", + "content": "from plba.bootstrap import create_runtime\nfrom plba.config import ConfigFileLoader, FileConfigProvider\nfrom plba.control import ControlActionSet, ControlChannel, ControlPlaneService, HttpControlChannel\nfrom plba.contracts import (\n ApplicationModule,\n ConfigProvider,\n HealthContributor,\n TraceContext,\n TraceContextRecord,\n TraceLogMessage,\n TraceTransport,\n Worker,\n WorkerHealth,\n WorkerStatus,\n)\nfrom plba.core import ConfigurationManager, RuntimeManager, ServiceContainer\nfrom plba.health import HealthRegistry\nfrom plba.logging import LogManager\nfrom plba.queue import InMemoryTaskQueue\nfrom plba.tracing import MySqlTraceTransport, NoOpTraceTransport, TraceService\nfrom plba.workflow import (\n StepResult,\n WorkflowContext,\n WorkflowDefinition,\n WorkflowEngine,\n WorkflowEngineHooks,\n WorkflowNode,\n WorkflowRuntimeFactory,\n WorkflowStep,\n)\nfrom plba.workers import WorkerSupervisor\n\n__all__ = [\n \"ApplicationModule\",\n \"ConfigFileLoader\",\n \"ConfigProvider\",\n \"ConfigurationManager\",\n \"ControlActionSet\",\n \"ControlChannel\",\n \"ControlPlaneService\",\n \"create_runtime\",\n \"FileConfigProvider\",\n \"HealthContributor\",\n \"HealthRegistry\",\n \"HttpControlChannel\",\n \"InMemoryTaskQueue\",\n \"LogManager\",\n \"MySqlTraceTransport\",\n \"NoOpTraceTransport\",\n \"RuntimeManager\",\n \"ServiceContainer\",\n \"TraceContext\",\n \"TraceContextRecord\",\n \"TraceLogMessage\",\n \"TraceService\",\n \"TraceTransport\",\n \"StepResult\",\n \"Worker\",\n \"WorkerHealth\",\n \"WorkerStatus\",\n \"WorkflowContext\",\n \"WorkflowDefinition\",\n \"WorkflowEngine\",\n \"WorkflowEngineHooks\",\n \"WorkflowNode\",\n \"WorkflowRuntimeFactory\",\n \"WorkflowStep\",\n \"WorkerSupervisor\",\n]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/__init__.py:1-69", + "span_start": 1, + "span_end": 69, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/workflow.py", + "content": "from app_runtime.workflow.contracts.context import WorkflowContext\nfrom app_runtime.workflow.contracts.result import StepResult\nfrom app_runtime.workflow.contracts.step import WorkflowStep\nfrom app_runtime.workflow.contracts.workflow import WorkflowDefinition, WorkflowNode\nfrom app_runtime.workflow.engine.hooks import WorkflowEngineHooks\nfrom app_runtime.workflow.engine.workflow_engine import WorkflowEngine\nfrom app_runtime.workflow.runtime_factory import WorkflowRuntimeFactory\n\n__all__ = [\n \"StepResult\",\n \"WorkflowContext\",\n \"WorkflowDefinition\",\n \"WorkflowEngine\",\n \"WorkflowEngineHooks\",\n \"WorkflowNode\",\n \"WorkflowRuntimeFactory\",\n \"WorkflowStep\",\n]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/workflow.py:1-18", + "span_start": 1, + "span_end": 18, + "lexical_rank": 6, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.workflow", + "is_test": false, + "blob_sha": "f227797606042273d1f1798f76846952892eeb9e4e9e6a38fb8a631d7231ff39", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/__init__.py", + "content": "from app_runtime.config.file_loader import ConfigFileLoader\nfrom app_runtime.config.providers import FileConfigProvider\n\n__all__ = [\"ConfigFileLoader\", \"FileConfigProvider\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/config/__init__.py:1-4", + "span_start": 1, + "span_end": 4, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.config.__init__", + "is_test": false, + "blob_sha": "612918029820a2a983330ec92256142b55b9de4bdf3399ece18e2a02dbad9729", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/providers.py", + "content": "class FileConfigProvider(ConfigProvider):\n def __init__(self, path: str | Path) -> None:\n self._loader = ConfigFileLoader(path)\n\n @property\n def loader(self) -> ConfigFileLoader:\n return self._loader\n\n def load(self) -> dict[str, Any]:\n config = self._loader.load_sync()\n if not isinstance(config, dict):\n raise TypeError(\"Config root must be a mapping\")\n return dict(config)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/config/providers.py:FileConfigProvider", + "span_start": 10, + "span_end": 22, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.config.providers", + "is_test": false, + "blob_sha": "8c53ca0122d6df6c5763bca15e99434bb4daebd5a618b8fc927e9ae90b022e64", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/__init__.py", + "content": "__all__: list[str] = []", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/__init__.py:1-1", + "span_start": 1, + "span_end": 1, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.__init__", + "is_test": false, + "blob_sha": "8eea9df4f6d7b38ca0e39ccc27b04700e3d08dbeec8046d613d22706d19985fa", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/config/file_loader.py", + "content": "class ConfigFileLoader:\n def __init__(self, path: str | Path) -> None:\n self.path = Path(path)\n self.config: Any = None\n self.last_valid_config: Any = None\n self._last_seen_hash: str | None = None\n\n def read_text(self) -> str:\n return self.path.read_text(encoding=\"utf-8\")\n\n def parse(self, data: str) -> Any:\n suffix = self.path.suffix.lower()\n if suffix in {\".yml\", \".yaml\"}:\n return yaml.safe_load(data)\n return json.loads(data)\n\n def load_sync(self) -> Any:\n data = self.read_text()\n parsed = self.parse(data)\n self.config = parsed\n self.last_valid_config = parsed\n self._last_seen_hash = self._calculate_hash(data)\n return parsed\n\n def load_if_changed(self) -> tuple[bool, Any]:\n data = self.read_text()\n current_hash = self._calculate_hash(data)\n if current_hash == self._last_seen_hash:\n return False, self.config\n parsed = self.parse(data)\n self.config = parsed\n self.last_valid_config = parsed\n self._last_seen_hash = current_hash\n return True, parsed\n\n @staticmethod\n def _calculate_hash(data: str) -> str:\n return hashlib.sha256(data.encode(\"utf-8\")).hexdigest()", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/config/file_loader.py:ConfigFileLoader", + "span_start": 11, + "span_end": 48, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.config.file_loader", + "is_test": false, + "blob_sha": "1f19ffebde5e38e4be5a5d5a678059a0f36dedb8fb8b3e00ab395c67106a87ea", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/config.py", + "content": "class ConfigProvider(ABC):\n @abstractmethod\n def load(self) -> dict[str, Any]:\n \"\"\"Return a config fragment.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/contracts/config.py:ConfigProvider", + "span_start": 7, + "span_end": 10, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.config", + "is_test": false, + "blob_sha": "5e773880267743ee94954ea2db120c2d88c54d4312893293d1b89df405283ed4", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/health.py", + "content": "class HealthContributor(ABC):\n @abstractmethod\n def health(self) -> WorkerHealth:\n \"\"\"Return contributor health state.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/contracts/health.py:HealthContributor", + "span_start": 7, + "span_end": 10, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.health", + "is_test": false, + "blob_sha": "6bd92611def7131e32d4dd34a8ed85e6cf3c67722ad27797032a632cb30dc097", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/application.py", + "content": "class ApplicationModule(ABC):\n @property\n @abstractmethod\n def name(self) -> str:\n \"\"\"Module name used for runtime status and diagnostics.\"\"\"\n\n @abstractmethod\n def register(self, registry: ModuleRegistry) -> None:\n \"\"\"Register workers, services, and health contributors.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/contracts/application.py:ApplicationModule", + "span_start": 8, + "span_end": 16, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.application", + "is_test": false, + "blob_sha": "197c35634dca49c352ce3f230295a485fbffb672ce7bb8c08e752bfdf61e7fa4", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "validation": { + "passed": false, + "action": "repair", + "reasons": [ + "degraded_answer_missing_guardrail" + ] + }, + "steps": [ + { + "step": "router", + "status": "completed", + "timings_ms": { + "router": 0 + }, + "output": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + } + }, + { + "step": "retrieval", + "status": "completed", + "timings_ms": { + "retrieval": 74 + }, + "output": { + "rag_count": 24, + "answer_path_rag_count": 24, + "resolved_symbol_status": "resolved", + "resolved_symbol": "WorkflowRuntimeFactory", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "diagnostics": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "vector", + "C2_DEPENDENCY_GRAPH": "vector", + "C0_SOURCE_CHUNKS": "vector" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C0_SOURCE_CHUNKS": 10 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [] + } + }, + "fallback": { + "used": false, + "reason": null + }, + "retrieval_by_layer_ms": { + "C1_SYMBOL_CATALOG": 27, + "C2_DEPENDENCY_GRAPH": 29, + "C0_SOURCE_CHUNKS": 17 + } + } + }, + { + "step": "pre_evidence_gate", + "status": "blocked", + "timings_ms": { + "pre_evidence_gate": 0 + }, + "output": { + "passed": false, + "failure_reasons": [ + "tests_not_found" + ], + "degraded_message": "Insufficient evidence for a confident answer. No test candidates found." + } + }, + { + "step": "llm", + "status": "skipped", + "output": { + "reason": "policy_short_circuit", + "answer_mode": "degraded" + } + }, + { + "step": "post_evidence_gate", + "status": "skipped", + "output": { + "reason": "no_draft_answer" + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-find-tests-workflow-runtime-factory-negative.md b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-find-tests-workflow-runtime-factory-negative.md new file mode 100644 index 0000000..4c62657 --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-find-tests-workflow-runtime-factory-negative.md @@ -0,0 +1,207 @@ +# plba-v2-find-tests-workflow-runtime-factory-negative + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: agent_runtime +- mode: full_chain +- passed: True + +## Query +Где тесты для WorkflowRuntimeFactory? + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 24, + "llm_answer": "Insufficient evidence for a confident answer. No test candidates found.", + "answer_mode": "degraded", + "path_scope": [], + "symbol_candidates": [ + "WorkflowRuntimeFactory" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] +} + +## Steps +[ + { + "step": "router", + "status": "completed", + "timings_ms": { + "router": 0 + }, + "output": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + } + }, + { + "step": "retrieval", + "status": "completed", + "timings_ms": { + "retrieval": 74 + }, + "output": { + "rag_count": 24, + "answer_path_rag_count": 24, + "resolved_symbol_status": "resolved", + "resolved_symbol": "WorkflowRuntimeFactory", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "diagnostics": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "vector", + "C2_DEPENDENCY_GRAPH": "vector", + "C0_SOURCE_CHUNKS": "vector" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C2_DEPENDENCY_GRAPH": 6, + "C0_SOURCE_CHUNKS": 10 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [] + } + }, + "fallback": { + "used": false, + "reason": null + }, + "retrieval_by_layer_ms": { + "C1_SYMBOL_CATALOG": 27, + "C2_DEPENDENCY_GRAPH": 29, + "C0_SOURCE_CHUNKS": 17 + } + } + }, + { + "step": "pre_evidence_gate", + "status": "blocked", + "timings_ms": { + "pre_evidence_gate": 0 + }, + "output": { + "passed": false, + "failure_reasons": [ + "tests_not_found" + ], + "degraded_message": "Insufficient evidence for a confident answer. No test candidates found." + } + }, + { + "step": "llm", + "status": "skipped", + "output": { + "reason": "policy_short_circuit", + "answer_mode": "degraded" + } + }, + { + "step": "post_evidence_gate", + "status": "skipped", + "output": { + "reason": "no_draft_answer" + } + } +] + +## Diagnostics +{ + "intent_correct": null, + "target_found": true, + "layers_used": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "retrieval_sufficient": false, + "answer_mode": "degraded", + "router_result": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "FIND_TESTS", + "path_scope": [], + "layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "symbol_resolution_status": "resolved" + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Где тесты для WorkflowRuntimeFactory?", + "sub_intent": "FIND_TESTS", + "path_scope": [], + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 6, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 10, + "empty": false, + "fallback_used": false + } + ], + "empty_layers": [], + "evidence_gate_decision": { + "sufficient": false, + "failure_reasons": [ + "tests_not_found" + ], + "evidence_count": 24 + }, + "failure_reasons": [ + "tests_not_found" + ], + "timings_ms": { + "router": 0, + "retrieval": 74, + "pre_evidence_gate": 0 + } +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-open-file-nonexistent.json b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-open-file-nonexistent.json new file mode 100644 index 0000000..d481c08 --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-open-file-nonexistent.json @@ -0,0 +1,435 @@ +{ + "case_id": "plba-v2-open-file-nonexistent", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "agent_runtime", + "mode": "full_chain", + "query": "Открой файл src/app_runtime/core/missing_runtime.py", + "actual": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 0, + "llm_answer": "Файл src/app_runtime/core/missing_runtime.py не найден.", + "answer_mode": "not_found", + "path_scope": [ + "src/app_runtime/core/missing_runtime.py" + ], + "symbol_candidates": [], + "layers": [ + "C0_SOURCE_CHUNKS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "query": "Открой файл src/app_runtime/core/missing_runtime.py", + "router_result": { + "schema_version": "1.1", + "intent": "CODE_QA", + "retrieval_profile": "code", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query_plan": { + "raw": "Открой файл src/app_runtime/core/missing_runtime.py", + "normalized": "Открой файл src/app_runtime/core/missing_runtime.py", + "sub_intent": "OPEN_FILE", + "negations": [], + "expansions": [ + "file" + ], + "keyword_hints": [], + "path_hints": [ + "src/app_runtime/core/missing_runtime.py" + ], + "doc_scope_hints": [], + "symbol_candidates": [], + "symbol_kind_hint": "unknown", + "anchors": [ + { + "type": "FILE_PATH", + "value": "src/app_runtime/core/missing_runtime.py", + "source": "user_text", + "subtype": null, + "span": { + "start": 12, + "end": 51 + }, + "confidence": 0.95 + }, + { + "type": "KEY_TERM", + "value": "файл", + "source": "user_text", + "subtype": null, + "span": { + "start": 7, + "end": 11 + }, + "confidence": 0.9 + } + ] + }, + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 12 + } + ], + "filters": { + "test_policy": "EXCLUDE", + "path_scope": [ + "src/app_runtime/core/missing_runtime.py" + ], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/app_runtime/core/missing_runtime.py" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": false, + "max_distance": 2, + "top_k": 5 + } + }, + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [], + "confidence": 0.0 + }, + "evidence_policy": { + "require_def": false, + "require_flow": false, + "require_spec": false, + "allow_answer_without_evidence": false + } + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Открой файл src/app_runtime/core/missing_runtime.py", + "sub_intent": "OPEN_FILE", + "path_scope": [ + "src/app_runtime/core/missing_runtime.py" + ], + "keyword_hints": [], + "symbol_candidates": [], + "requested_layers": [ + "C0_SOURCE_CHUNKS" + ], + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 12 + } + ], + "filters": { + "test_policy": "EXCLUDE", + "path_scope": [ + "src/app_runtime/core/missing_runtime.py" + ], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/app_runtime/core/missing_runtime.py" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": false, + "max_distance": 2, + "top_k": 5 + } + }, + "query_plan": { + "raw": "Открой файл src/app_runtime/core/missing_runtime.py", + "normalized": "Открой файл src/app_runtime/core/missing_runtime.py", + "sub_intent": "OPEN_FILE", + "negations": [], + "expansions": [ + "file" + ], + "keyword_hints": [], + "path_hints": [ + "src/app_runtime/core/missing_runtime.py" + ], + "doc_scope_hints": [], + "symbol_candidates": [], + "symbol_kind_hint": "unknown", + "anchors": [ + { + "type": "FILE_PATH", + "value": "src/app_runtime/core/missing_runtime.py", + "source": "user_text", + "subtype": null, + "span": { + "start": 12, + "end": 51 + }, + "confidence": 0.95 + }, + { + "type": "KEY_TERM", + "value": "файл", + "source": "user_text", + "subtype": null, + "span": { + "start": 7, + "end": 11 + }, + "confidence": 0.9 + } + ] + } + }, + "retrieval_result": { + "target_symbol_candidates": [], + "resolved_symbol": null, + "symbol_resolution_status": "not_requested", + "file_candidates": [], + "code_chunks": [], + "relations": [], + "entrypoints": [], + "test_candidates": [], + "layer_outcomes": [ + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 0, + "empty": true, + "fallback_used": false + } + ], + "missing_layers": [ + "C0_SOURCE_CHUNKS" + ], + "raw_rows": [], + "retrieval_report": { + "executed_layers": [ + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C0_SOURCE_CHUNKS": 200 + }, + "filters_by_layer": { + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src/app_runtime/core/missing_runtime.py" + ] + } + }, + "requests": [ + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Открой файл src/app_runtime/core/missing_runtime.py", + "ranking_profile": "code" + } + ], + "fallback": { + "used": false, + "reason": null + }, + "retrieval_by_layer_ms": { + "C0_SOURCE_CHUNKS": 10 + } + } + }, + "diagnostics": { + "intent_correct": null, + "target_found": false, + "layers_used": [ + "C0_SOURCE_CHUNKS" + ], + "retrieval_sufficient": false, + "answer_mode": "insufficient", + "router_result": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "OPEN_FILE", + "path_scope": [ + "src/app_runtime/core/missing_runtime.py" + ], + "layers": [ + "C0_SOURCE_CHUNKS" + ], + "symbol_resolution_status": "not_requested" + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Открой файл src/app_runtime/core/missing_runtime.py", + "sub_intent": "OPEN_FILE", + "path_scope": [ + "src/app_runtime/core/missing_runtime.py" + ], + "requested_layers": [ + "C0_SOURCE_CHUNKS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 0, + "empty": true, + "fallback_used": false + } + ], + "empty_layers": [ + "C0_SOURCE_CHUNKS" + ], + "evidence_gate_decision": { + "sufficient": false, + "failure_reasons": [ + "path_scope_empty", + "layer_c0_empty" + ], + "evidence_count": 0 + }, + "failure_reasons": [ + "path_scope_empty", + "layer_c0_empty" + ], + "timings_ms": { + "router": 0, + "retrieval": 10, + "pre_evidence_gate": 0 + } + }, + "rag_rows": [], + "validation": { + "passed": true, + "action": "return", + "reasons": [] + }, + "steps": [ + { + "step": "router", + "status": "completed", + "timings_ms": { + "router": 0 + }, + "output": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + } + }, + { + "step": "retrieval", + "status": "completed", + "timings_ms": { + "retrieval": 10 + }, + "output": { + "rag_count": 0, + "answer_path_rag_count": 0, + "resolved_symbol_status": "not_requested", + "resolved_symbol": null, + "requested_layers": [ + "C0_SOURCE_CHUNKS" + ] + }, + "diagnostics": { + "executed_layers": [ + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C0_SOURCE_CHUNKS": 200 + }, + "filters_by_layer": { + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src/app_runtime/core/missing_runtime.py" + ] + } + }, + "requests": [ + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Открой файл src/app_runtime/core/missing_runtime.py", + "ranking_profile": "code" + } + ], + "fallback": { + "used": false, + "reason": null + }, + "retrieval_by_layer_ms": { + "C0_SOURCE_CHUNKS": 10 + } + } + }, + { + "step": "pre_evidence_gate", + "status": "blocked", + "timings_ms": { + "pre_evidence_gate": 0 + }, + "output": { + "passed": false, + "failure_reasons": [ + "path_scope_empty", + "layer_c0_empty" + ], + "degraded_message": "Insufficient evidence for a confident answer. No matching path or file found. No code chunks retrieved." + } + }, + { + "step": "llm", + "status": "skipped", + "output": { + "reason": "policy_short_circuit", + "answer_mode": "not_found" + } + }, + { + "step": "post_evidence_gate", + "status": "skipped", + "output": { + "reason": "no_draft_answer" + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-open-file-nonexistent.md b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-open-file-nonexistent.md new file mode 100644 index 0000000..79babdc --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-open-file-nonexistent.md @@ -0,0 +1,189 @@ +# plba-v2-open-file-nonexistent + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: agent_runtime +- mode: full_chain +- passed: True + +## Query +Открой файл src/app_runtime/core/missing_runtime.py + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 0, + "llm_answer": "Файл src/app_runtime/core/missing_runtime.py не найден.", + "answer_mode": "not_found", + "path_scope": [ + "src/app_runtime/core/missing_runtime.py" + ], + "symbol_candidates": [], + "layers": [ + "C0_SOURCE_CHUNKS" + ] +} + +## Steps +[ + { + "step": "router", + "status": "completed", + "timings_ms": { + "router": 0 + }, + "output": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + } + }, + { + "step": "retrieval", + "status": "completed", + "timings_ms": { + "retrieval": 10 + }, + "output": { + "rag_count": 0, + "answer_path_rag_count": 0, + "resolved_symbol_status": "not_requested", + "resolved_symbol": null, + "requested_layers": [ + "C0_SOURCE_CHUNKS" + ] + }, + "diagnostics": { + "executed_layers": [ + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C0_SOURCE_CHUNKS": 200 + }, + "filters_by_layer": { + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src/app_runtime/core/missing_runtime.py" + ] + } + }, + "requests": [ + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Открой файл src/app_runtime/core/missing_runtime.py", + "ranking_profile": "code" + } + ], + "fallback": { + "used": false, + "reason": null + }, + "retrieval_by_layer_ms": { + "C0_SOURCE_CHUNKS": 10 + } + } + }, + { + "step": "pre_evidence_gate", + "status": "blocked", + "timings_ms": { + "pre_evidence_gate": 0 + }, + "output": { + "passed": false, + "failure_reasons": [ + "path_scope_empty", + "layer_c0_empty" + ], + "degraded_message": "Insufficient evidence for a confident answer. No matching path or file found. No code chunks retrieved." + } + }, + { + "step": "llm", + "status": "skipped", + "output": { + "reason": "policy_short_circuit", + "answer_mode": "not_found" + } + }, + { + "step": "post_evidence_gate", + "status": "skipped", + "output": { + "reason": "no_draft_answer" + } + } +] + +## Diagnostics +{ + "intent_correct": null, + "target_found": false, + "layers_used": [ + "C0_SOURCE_CHUNKS" + ], + "retrieval_sufficient": false, + "answer_mode": "insufficient", + "router_result": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "OPEN_FILE", + "path_scope": [ + "src/app_runtime/core/missing_runtime.py" + ], + "layers": [ + "C0_SOURCE_CHUNKS" + ], + "symbol_resolution_status": "not_requested" + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Открой файл src/app_runtime/core/missing_runtime.py", + "sub_intent": "OPEN_FILE", + "path_scope": [ + "src/app_runtime/core/missing_runtime.py" + ], + "requested_layers": [ + "C0_SOURCE_CHUNKS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 0, + "empty": true, + "fallback_used": false + } + ], + "empty_layers": [ + "C0_SOURCE_CHUNKS" + ], + "evidence_gate_decision": { + "sufficient": false, + "failure_reasons": [ + "path_scope_empty", + "layer_c0_empty" + ], + "evidence_count": 0 + }, + "failure_reasons": [ + "path_scope_empty", + "layer_c0_empty" + ], + "timings_ms": { + "router": 0, + "retrieval": 10, + "pre_evidence_gate": 0 + } +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-open-file-public-api.json b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-open-file-public-api.json new file mode 100644 index 0000000..32fe9ba --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-open-file-public-api.json @@ -0,0 +1,521 @@ +{ + "case_id": "plba-v2-open-file-public-api", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "agent_runtime", + "mode": "full_chain", + "query": "Открой файл src/plba/__init__.py", + "actual": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 1, + "llm_answer": "В файле src/plba/__init__.py видны следующие импорты и объявления:\n\n- from plba.bootstrap import create_runtime\n- from plba.config import ConfigFileLoader, FileConfigProvider\n- from plba.control import ControlActionSet, ControlChannel, ControlPlaneService, HttpControlChannel\n- from plba.contracts import ApplicationModule, ConfigProvider, HealthContributor, TraceContext, TraceContextRecord, TraceLogMessage, TraceTransport, Worker, WorkerHealth, WorkerStatus\n- from plba.core import ConfigurationManager, RuntimeManager, ServiceContainer\n- from plba.health import HealthRegistry\n- from plba.logging import LogManager\n- from plba.queue import InMemoryTaskQueue\n- from plba.tracing import MySqlTraceTransport, NoOpTraceTransport, TraceService\n- from plba.workflow import StepResult, WorkflowContext, WorkflowDefinition, Workflo", + "answer_mode": "answered", + "path_scope": [ + "src/plba/__init__.py" + ], + "symbol_candidates": [], + "layers": [ + "C0_SOURCE_CHUNKS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "query": "Открой файл src/plba/__init__.py", + "router_result": { + "schema_version": "1.1", + "intent": "CODE_QA", + "retrieval_profile": "code", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query_plan": { + "raw": "Открой файл src/plba/__init__.py", + "normalized": "Открой файл src/plba/__init__.py", + "sub_intent": "OPEN_FILE", + "negations": [], + "expansions": [ + "file" + ], + "keyword_hints": [], + "path_hints": [ + "src/plba/__init__.py" + ], + "doc_scope_hints": [], + "symbol_candidates": [], + "symbol_kind_hint": "unknown", + "anchors": [ + { + "type": "FILE_PATH", + "value": "src/plba/__init__.py", + "source": "user_text", + "subtype": null, + "span": { + "start": 12, + "end": 32 + }, + "confidence": 0.95 + }, + { + "type": "KEY_TERM", + "value": "файл", + "source": "user_text", + "subtype": null, + "span": { + "start": 7, + "end": 11 + }, + "confidence": 0.9 + } + ] + }, + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 12 + } + ], + "filters": { + "test_policy": "EXCLUDE", + "path_scope": [ + "src/plba/__init__.py" + ], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/plba/__init__.py" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": false, + "max_distance": 2, + "top_k": 5 + } + }, + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [], + "confidence": 0.0 + }, + "evidence_policy": { + "require_def": false, + "require_flow": false, + "require_spec": false, + "allow_answer_without_evidence": false + } + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Открой файл src/plba/__init__.py", + "sub_intent": "OPEN_FILE", + "path_scope": [ + "src/plba/__init__.py" + ], + "keyword_hints": [], + "symbol_candidates": [], + "requested_layers": [ + "C0_SOURCE_CHUNKS" + ], + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 12 + } + ], + "filters": { + "test_policy": "EXCLUDE", + "path_scope": [ + "src/plba/__init__.py" + ], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/plba/__init__.py" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": false, + "max_distance": 2, + "top_k": 5 + } + }, + "query_plan": { + "raw": "Открой файл src/plba/__init__.py", + "normalized": "Открой файл src/plba/__init__.py", + "sub_intent": "OPEN_FILE", + "negations": [], + "expansions": [ + "file" + ], + "keyword_hints": [], + "path_hints": [ + "src/plba/__init__.py" + ], + "doc_scope_hints": [], + "symbol_candidates": [], + "symbol_kind_hint": "unknown", + "anchors": [ + { + "type": "FILE_PATH", + "value": "src/plba/__init__.py", + "source": "user_text", + "subtype": null, + "span": { + "start": 12, + "end": 32 + }, + "confidence": 0.95 + }, + { + "type": "KEY_TERM", + "value": "файл", + "source": "user_text", + "subtype": null, + "span": { + "start": 7, + "end": 11 + }, + "confidence": 0.9 + } + ] + } + }, + "retrieval_result": { + "target_symbol_candidates": [], + "resolved_symbol": null, + "symbol_resolution_status": "not_requested", + "file_candidates": [ + "src/plba/__init__.py" + ], + "code_chunks": [ + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/plba/__init__.py", + "title": "src/plba/__init__.py:1-69", + "content": "from plba.bootstrap import create_runtime\nfrom plba.config import ConfigFileLoader, FileConfigProvider\nfrom plba.control import ControlActionSet, ControlChannel, ControlPlaneService, HttpControlChannel\nfrom plba.contracts import (\n ApplicationModule,\n ConfigProvider,\n HealthContributor,\n TraceContext,\n TraceContextRecord,\n TraceLogMessage,\n TraceTransport,\n Worker,\n WorkerHealth,\n WorkerStatus,\n)\nfrom plba.core import ConfigurationManager, RuntimeManager, ServiceContainer\nfrom plba.health import HealthRegistry\nfrom plba.logging import LogManager\nfrom plba.queue import InMemoryTaskQueue\nfrom plba.tracing import MySqlTraceTransport, NoOpTraceTransport, TraceService\nfrom plba.workflow import (\n StepResult,\n WorkflowContext,\n WorkflowDefinition,\n WorkflowEngine,\n WorkflowEngineHooks,\n WorkflowNode,\n WorkflowRuntimeFactory,\n WorkflowStep,\n)\nfrom plba.workers import WorkerSupervisor\n\n__all__ = [\n \"ApplicationModule\",\n \"ConfigFileLoader\",\n \"ConfigProvider\",\n \"ConfigurationManager\",\n \"ControlActionSet\",\n \"ControlChannel\",\n \"ControlPlaneService\",\n \"create_runtime\",\n \"FileConfigProvider\",\n \"HealthContributor\",\n \"HealthRegistry\",\n \"HttpControlChannel\",\n \"InMemoryTaskQueue\",\n \"LogManager\",\n \"MySqlTraceTransport\",\n \"NoOpTraceTransport\",\n \"RuntimeManager\",\n \"ServiceContainer\",\n \"TraceContext\",\n \"TraceContextRecord\",\n \"TraceLogMessage\",\n \"TraceService\",\n \"TraceTransport\",\n \"StepResult\",\n \"Worker\",\n \"WorkerHealth\",\n \"WorkerStatus\",\n \"WorkflowContext\",\n \"WorkflowDefinition\",\n \"WorkflowEngine\",\n \"WorkflowEngineHooks\",\n \"WorkflowNode\",\n \"WorkflowRuntimeFactory\",\n \"WorkflowStep\",\n \"WorkerSupervisor\",\n]", + "start_line": 1, + "end_line": 69, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "relations": [], + "entrypoints": [], + "test_candidates": [], + "layer_outcomes": [ + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 1, + "empty": false, + "fallback_used": false + } + ], + "missing_layers": [], + "raw_rows": [ + { + "path": "src/plba/__init__.py", + "content": "from plba.bootstrap import create_runtime\nfrom plba.config import ConfigFileLoader, FileConfigProvider\nfrom plba.control import ControlActionSet, ControlChannel, ControlPlaneService, HttpControlChannel\nfrom plba.contracts import (\n ApplicationModule,\n ConfigProvider,\n HealthContributor,\n TraceContext,\n TraceContextRecord,\n TraceLogMessage,\n TraceTransport,\n Worker,\n WorkerHealth,\n WorkerStatus,\n)\nfrom plba.core import ConfigurationManager, RuntimeManager, ServiceContainer\nfrom plba.health import HealthRegistry\nfrom plba.logging import LogManager\nfrom plba.queue import InMemoryTaskQueue\nfrom plba.tracing import MySqlTraceTransport, NoOpTraceTransport, TraceService\nfrom plba.workflow import (\n StepResult,\n WorkflowContext,\n WorkflowDefinition,\n WorkflowEngine,\n WorkflowEngineHooks,\n WorkflowNode,\n WorkflowRuntimeFactory,\n WorkflowStep,\n)\nfrom plba.workers import WorkerSupervisor\n\n__all__ = [\n \"ApplicationModule\",\n \"ConfigFileLoader\",\n \"ConfigProvider\",\n \"ConfigurationManager\",\n \"ControlActionSet\",\n \"ControlChannel\",\n \"ControlPlaneService\",\n \"create_runtime\",\n \"FileConfigProvider\",\n \"HealthContributor\",\n \"HealthRegistry\",\n \"HttpControlChannel\",\n \"InMemoryTaskQueue\",\n \"LogManager\",\n \"MySqlTraceTransport\",\n \"NoOpTraceTransport\",\n \"RuntimeManager\",\n \"ServiceContainer\",\n \"TraceContext\",\n \"TraceContextRecord\",\n \"TraceLogMessage\",\n \"TraceService\",\n \"TraceTransport\",\n \"StepResult\",\n \"Worker\",\n \"WorkerHealth\",\n \"WorkerStatus\",\n \"WorkflowContext\",\n \"WorkflowDefinition\",\n \"WorkflowEngine\",\n \"WorkflowEngineHooks\",\n \"WorkflowNode\",\n \"WorkflowRuntimeFactory\",\n \"WorkflowStep\",\n \"WorkerSupervisor\",\n]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/__init__.py:1-69", + "span_start": 1, + "span_end": 69, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "retrieval_report": { + "executed_layers": [ + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C0_SOURCE_CHUNKS": 200 + }, + "filters_by_layer": { + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src/plba/__init__.py" + ] + } + }, + "requests": [ + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Открой файл src/plba/__init__.py", + "ranking_profile": "code" + } + ], + "fallback": { + "used": false, + "reason": null + }, + "retrieval_by_layer_ms": { + "C0_SOURCE_CHUNKS": 24 + } + } + }, + "diagnostics": { + "intent_correct": null, + "target_found": true, + "layers_used": [ + "C0_SOURCE_CHUNKS" + ], + "retrieval_sufficient": true, + "answer_mode": "normal", + "router_result": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "OPEN_FILE", + "path_scope": [ + "src/plba/__init__.py" + ], + "layers": [ + "C0_SOURCE_CHUNKS" + ], + "symbol_resolution_status": "not_requested" + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Открой файл src/plba/__init__.py", + "sub_intent": "OPEN_FILE", + "path_scope": [ + "src/plba/__init__.py" + ], + "requested_layers": [ + "C0_SOURCE_CHUNKS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 1, + "empty": false, + "fallback_used": false + } + ], + "empty_layers": [], + "evidence_gate_decision": { + "sufficient": true, + "failure_reasons": [], + "evidence_count": 1 + }, + "failure_reasons": [], + "timings_ms": { + "router": 0, + "retrieval": 24, + "pre_evidence_gate": 0, + "llm": 1406 + } + }, + "rag_rows": [ + { + "path": "src/plba/__init__.py", + "content": "from plba.bootstrap import create_runtime\nfrom plba.config import ConfigFileLoader, FileConfigProvider\nfrom plba.control import ControlActionSet, ControlChannel, ControlPlaneService, HttpControlChannel\nfrom plba.contracts import (\n ApplicationModule,\n ConfigProvider,\n HealthContributor,\n TraceContext,\n TraceContextRecord,\n TraceLogMessage,\n TraceTransport,\n Worker,\n WorkerHealth,\n WorkerStatus,\n)\nfrom plba.core import ConfigurationManager, RuntimeManager, ServiceContainer\nfrom plba.health import HealthRegistry\nfrom plba.logging import LogManager\nfrom plba.queue import InMemoryTaskQueue\nfrom plba.tracing import MySqlTraceTransport, NoOpTraceTransport, TraceService\nfrom plba.workflow import (\n StepResult,\n WorkflowContext,\n WorkflowDefinition,\n WorkflowEngine,\n WorkflowEngineHooks,\n WorkflowNode,\n WorkflowRuntimeFactory,\n WorkflowStep,\n)\nfrom plba.workers import WorkerSupervisor\n\n__all__ = [\n \"ApplicationModule\",\n \"ConfigFileLoader\",\n \"ConfigProvider\",\n \"ConfigurationManager\",\n \"ControlActionSet\",\n \"ControlChannel\",\n \"ControlPlaneService\",\n \"create_runtime\",\n \"FileConfigProvider\",\n \"HealthContributor\",\n \"HealthRegistry\",\n \"HttpControlChannel\",\n \"InMemoryTaskQueue\",\n \"LogManager\",\n \"MySqlTraceTransport\",\n \"NoOpTraceTransport\",\n \"RuntimeManager\",\n \"ServiceContainer\",\n \"TraceContext\",\n \"TraceContextRecord\",\n \"TraceLogMessage\",\n \"TraceService\",\n \"TraceTransport\",\n \"StepResult\",\n \"Worker\",\n \"WorkerHealth\",\n \"WorkerStatus\",\n \"WorkflowContext\",\n \"WorkflowDefinition\",\n \"WorkflowEngine\",\n \"WorkflowEngineHooks\",\n \"WorkflowNode\",\n \"WorkflowRuntimeFactory\",\n \"WorkflowStep\",\n \"WorkerSupervisor\",\n]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/__init__.py:1-69", + "span_start": 1, + "span_end": 69, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "validation": { + "passed": true, + "action": "return", + "reasons": [] + }, + "steps": [ + { + "step": "router", + "status": "completed", + "timings_ms": { + "router": 0 + }, + "output": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + } + }, + { + "step": "retrieval", + "status": "completed", + "timings_ms": { + "retrieval": 24 + }, + "output": { + "rag_count": 1, + "answer_path_rag_count": 1, + "resolved_symbol_status": "not_requested", + "resolved_symbol": null, + "requested_layers": [ + "C0_SOURCE_CHUNKS" + ] + }, + "diagnostics": { + "executed_layers": [ + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C0_SOURCE_CHUNKS": 200 + }, + "filters_by_layer": { + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src/plba/__init__.py" + ] + } + }, + "requests": [ + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Открой файл src/plba/__init__.py", + "ranking_profile": "code" + } + ], + "fallback": { + "used": false, + "reason": null + }, + "retrieval_by_layer_ms": { + "C0_SOURCE_CHUNKS": 24 + } + } + }, + { + "step": "pre_evidence_gate", + "status": "passed", + "timings_ms": { + "pre_evidence_gate": 0 + }, + "output": { + "passed": true, + "failure_reasons": [], + "degraded_message": "" + } + }, + { + "step": "llm", + "status": "completed", + "timings_ms": { + "llm": 1406 + }, + "output": { + "prompt_name": "code_qa_open_file_answer", + "answer_preview": "В файле src/plba/__init__.py видны следующие импорты и объявления:\n\n- from plba.bootstrap import create_runtime\n- from plba.config import ConfigFileLoader, FileConfigProvider\n- from plba.control import ControlActionSet, ControlChannel, ControlPlaneService, HttpControlChannel\n- from plba.contracts im" + } + }, + { + "step": "post_evidence_gate", + "status": "passed", + "timings_ms": { + "post_evidence_gate": 0, + "repair": 0 + }, + "output": { + "passed": true, + "reasons": [], + "repair_used": false + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-open-file-public-api.md b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-open-file-public-api.md new file mode 100644 index 0000000..f6c7dcc --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-open-file-public-api.md @@ -0,0 +1,188 @@ +# plba-v2-open-file-public-api + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: agent_runtime +- mode: full_chain +- passed: True + +## Query +Открой файл src/plba/__init__.py + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 1, + "llm_answer": "В файле src/plba/__init__.py видны следующие импорты и объявления:\n\n- from plba.bootstrap import create_runtime\n- from plba.config import ConfigFileLoader, FileConfigProvider\n- from plba.control import ControlActionSet, ControlChannel, ControlPlaneService, HttpControlChannel\n- from plba.contracts import ApplicationModule, ConfigProvider, HealthContributor, TraceContext, TraceContextRecord, TraceLogMessage, TraceTransport, Worker, WorkerHealth, WorkerStatus\n- from plba.core import ConfigurationManager, RuntimeManager, ServiceContainer\n- from plba.health import HealthRegistry\n- from plba.logging import LogManager\n- from plba.queue import InMemoryTaskQueue\n- from plba.tracing import MySqlTraceTransport, NoOpTraceTransport, TraceService\n- from plba.workflow import StepResult, WorkflowContext, WorkflowDefinition, Workflo", + "answer_mode": "answered", + "path_scope": [ + "src/plba/__init__.py" + ], + "symbol_candidates": [], + "layers": [ + "C0_SOURCE_CHUNKS" + ] +} + +## Steps +[ + { + "step": "router", + "status": "completed", + "timings_ms": { + "router": 0 + }, + "output": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + } + }, + { + "step": "retrieval", + "status": "completed", + "timings_ms": { + "retrieval": 24 + }, + "output": { + "rag_count": 1, + "answer_path_rag_count": 1, + "resolved_symbol_status": "not_requested", + "resolved_symbol": null, + "requested_layers": [ + "C0_SOURCE_CHUNKS" + ] + }, + "diagnostics": { + "executed_layers": [ + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C0_SOURCE_CHUNKS": 200 + }, + "filters_by_layer": { + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src/plba/__init__.py" + ] + } + }, + "requests": [ + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Открой файл src/plba/__init__.py", + "ranking_profile": "code" + } + ], + "fallback": { + "used": false, + "reason": null + }, + "retrieval_by_layer_ms": { + "C0_SOURCE_CHUNKS": 24 + } + } + }, + { + "step": "pre_evidence_gate", + "status": "passed", + "timings_ms": { + "pre_evidence_gate": 0 + }, + "output": { + "passed": true, + "failure_reasons": [], + "degraded_message": "" + } + }, + { + "step": "llm", + "status": "completed", + "timings_ms": { + "llm": 1406 + }, + "output": { + "prompt_name": "code_qa_open_file_answer", + "answer_preview": "В файле src/plba/__init__.py видны следующие импорты и объявления:\n\n- from plba.bootstrap import create_runtime\n- from plba.config import ConfigFileLoader, FileConfigProvider\n- from plba.control import ControlActionSet, ControlChannel, ControlPlaneService, HttpControlChannel\n- from plba.contracts im" + } + }, + { + "step": "post_evidence_gate", + "status": "passed", + "timings_ms": { + "post_evidence_gate": 0, + "repair": 0 + }, + "output": { + "passed": true, + "reasons": [], + "repair_used": false + } + } +] + +## Diagnostics +{ + "intent_correct": null, + "target_found": true, + "layers_used": [ + "C0_SOURCE_CHUNKS" + ], + "retrieval_sufficient": true, + "answer_mode": "normal", + "router_result": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "OPEN_FILE", + "path_scope": [ + "src/plba/__init__.py" + ], + "layers": [ + "C0_SOURCE_CHUNKS" + ], + "symbol_resolution_status": "not_requested" + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Открой файл src/plba/__init__.py", + "sub_intent": "OPEN_FILE", + "path_scope": [ + "src/plba/__init__.py" + ], + "requested_layers": [ + "C0_SOURCE_CHUNKS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 1, + "empty": false, + "fallback_used": false + } + ], + "empty_layers": [], + "evidence_gate_decision": { + "sufficient": true, + "failure_reasons": [], + "evidence_count": 1 + }, + "failure_reasons": [], + "timings_ms": { + "router": 0, + "retrieval": 24, + "pre_evidence_gate": 0, + "llm": 1406 + } +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-open-file-runtime.json b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-open-file-runtime.json new file mode 100644 index 0000000..a6b476d --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-open-file-runtime.json @@ -0,0 +1,521 @@ +{ + "case_id": "plba-v2-open-file-runtime", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "agent_runtime", + "mode": "full_chain", + "query": "Открой файл src/app_runtime/core/runtime.py", + "actual": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 1, + "llm_answer": "Виден класс `RuntimeManager` с методом `__init__`, принимающим несколько параметров. Фиксированы также константы `ACTION_TIMEOUT_SECONDS` и `ACTION_POLL_INTERVAL_SECONDS`.", + "answer_mode": "answered", + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "symbol_candidates": [], + "layers": [ + "C0_SOURCE_CHUNKS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "query": "Открой файл src/app_runtime/core/runtime.py", + "router_result": { + "schema_version": "1.1", + "intent": "CODE_QA", + "retrieval_profile": "code", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query_plan": { + "raw": "Открой файл src/app_runtime/core/runtime.py", + "normalized": "Открой файл src/app_runtime/core/runtime.py", + "sub_intent": "OPEN_FILE", + "negations": [], + "expansions": [ + "file" + ], + "keyword_hints": [], + "path_hints": [ + "src/app_runtime/core/runtime.py" + ], + "doc_scope_hints": [], + "symbol_candidates": [], + "symbol_kind_hint": "unknown", + "anchors": [ + { + "type": "FILE_PATH", + "value": "src/app_runtime/core/runtime.py", + "source": "user_text", + "subtype": null, + "span": { + "start": 12, + "end": 43 + }, + "confidence": 0.95 + }, + { + "type": "KEY_TERM", + "value": "файл", + "source": "user_text", + "subtype": null, + "span": { + "start": 7, + "end": 11 + }, + "confidence": 0.9 + } + ] + }, + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 12 + } + ], + "filters": { + "test_policy": "EXCLUDE", + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/app_runtime/core/runtime.py" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": false, + "max_distance": 2, + "top_k": 5 + } + }, + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [], + "confidence": 0.0 + }, + "evidence_policy": { + "require_def": false, + "require_flow": false, + "require_spec": false, + "allow_answer_without_evidence": false + } + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Открой файл src/app_runtime/core/runtime.py", + "sub_intent": "OPEN_FILE", + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "keyword_hints": [], + "symbol_candidates": [], + "requested_layers": [ + "C0_SOURCE_CHUNKS" + ], + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 12 + } + ], + "filters": { + "test_policy": "EXCLUDE", + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/app_runtime/core/runtime.py" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": false, + "max_distance": 2, + "top_k": 5 + } + }, + "query_plan": { + "raw": "Открой файл src/app_runtime/core/runtime.py", + "normalized": "Открой файл src/app_runtime/core/runtime.py", + "sub_intent": "OPEN_FILE", + "negations": [], + "expansions": [ + "file" + ], + "keyword_hints": [], + "path_hints": [ + "src/app_runtime/core/runtime.py" + ], + "doc_scope_hints": [], + "symbol_candidates": [], + "symbol_kind_hint": "unknown", + "anchors": [ + { + "type": "FILE_PATH", + "value": "src/app_runtime/core/runtime.py", + "source": "user_text", + "subtype": null, + "span": { + "start": 12, + "end": 43 + }, + "confidence": 0.95 + }, + { + "type": "KEY_TERM", + "value": "файл", + "source": "user_text", + "subtype": null, + "span": { + "start": 7, + "end": 11 + }, + "confidence": 0.9 + } + ] + } + }, + "retrieval_result": { + "target_symbol_candidates": [], + "resolved_symbol": null, + "symbol_resolution_status": "not_requested", + "file_candidates": [ + "src/app_runtime/core/runtime.py" + ], + "code_chunks": [ + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/core/runtime.py", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "start_line": 18, + "end_line": 179, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "relations": [], + "entrypoints": [], + "test_candidates": [], + "layer_outcomes": [ + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 1, + "empty": false, + "fallback_used": false + } + ], + "missing_layers": [], + "raw_rows": [ + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "retrieval_report": { + "executed_layers": [ + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C0_SOURCE_CHUNKS": 200 + }, + "filters_by_layer": { + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src/app_runtime/core/runtime.py" + ] + } + }, + "requests": [ + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Открой файл src/app_runtime/core/runtime.py", + "ranking_profile": "code" + } + ], + "fallback": { + "used": false, + "reason": null + }, + "retrieval_by_layer_ms": { + "C0_SOURCE_CHUNKS": 221 + } + } + }, + "diagnostics": { + "intent_correct": null, + "target_found": true, + "layers_used": [ + "C0_SOURCE_CHUNKS" + ], + "retrieval_sufficient": true, + "answer_mode": "normal", + "router_result": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "OPEN_FILE", + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "layers": [ + "C0_SOURCE_CHUNKS" + ], + "symbol_resolution_status": "not_requested" + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Открой файл src/app_runtime/core/runtime.py", + "sub_intent": "OPEN_FILE", + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "requested_layers": [ + "C0_SOURCE_CHUNKS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 1, + "empty": false, + "fallback_used": false + } + ], + "empty_layers": [], + "evidence_gate_decision": { + "sufficient": true, + "failure_reasons": [], + "evidence_count": 1 + }, + "failure_reasons": [], + "timings_ms": { + "router": 0, + "retrieval": 221, + "pre_evidence_gate": 0, + "llm": 578 + } + }, + "rag_rows": [ + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager:\n ACTION_TIMEOUT_SECONDS = 10.0\n ACTION_POLL_INTERVAL_SECONDS = 0.05\n\n def __init__(\n self,\n configuration: ConfigurationManager | None = None,\n services: ServiceContainer | None = None,\n traces: TraceService | None = None,\n health: HealthRegistry | None = None,\n logs: LogManager | None = None,\n workers: WorkerSupervisor | None = None,\n control_plane: ControlPlaneService | None = None,\n ) -> None:\n self.configuration = configuration or ConfigurationManager()\n self.services = services or ServiceContainer()\n self.traces = traces or TraceService()\n self.health = health or HealthRegistry()\n self.logs = logs or LogManager()\n self.workers = workers or WorkerSupervisor()\n self.control_plane = control_plane or ControlPlaneService()\n self.registry = ModuleRegistry(self.services)\n self._started = False\n self._state = LifecycleState.IDLE\n self._core_registered = False\n self._workers_registered = False\n self._register_core_services()\n\n def register_module(self, module: ApplicationModule) -> None:\n self.registry.register_module(module.name)\n module.register(self.registry)\n\n def add_config_file(self, path: str) -> FileConfigProvider:\n provider = FileConfigProvider(path)\n self.configuration.add_provider(provider)\n return provider\n\n def start(self, *, start_control_plane: bool = True) -> None:\n if self._started:\n return\n self._state = LifecycleState.STARTING\n config = self.configuration.load()\n self.logs.apply_config(config)\n self._register_health_contributors()\n self._register_workers()\n self.workers.start()\n if start_control_plane:\n self.control_plane.start(self)\n self._started = True\n self._refresh_state()\n\n def stop(self, timeout: float = 30.0, force: bool = False, stop_control_plane: bool = True) -> None:\n if not self._started:\n return\n self._state = LifecycleState.STOPPING\n self.workers.stop(timeout=timeout, force=force)\n if stop_control_plane:\n self.control_plane.stop()\n self._started = False\n self._state = LifecycleState.STOPPED\n\n def status(self) -> dict[str, object]:\n self._refresh_state()\n return self.control_plane.snapshot(self)\n\n def current_health(self) -> HealthPayload:\n self._refresh_state()\n return self.health.payload(self._state, self.workers.healths())\n\n async def health_status(self) -> HealthPayload:\n return self.current_health()\n\n async def start_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if self._started:\n return \"runtime already running\"\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self.start(start_control_plane=False)\n started = self._wait_for_state({LifecycleState.IDLE, LifecycleState.BUSY}, timeout=self.ACTION_TIMEOUT_SECONDS)\n if started:\n return self._action_detail(\"runtime started\", timed_out=False)\n return self._action_detail(\"runtime start is still in progress\", timed_out=True)\n\n async def stop_runtime(self) -> dict[str, object] | str:\n self._refresh_state()\n if not self._started:\n if self._state == LifecycleState.STOPPING:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n return \"runtime already stopped\"\n\n self._state = LifecycleState.STOPPING\n try:\n self.workers.stop(timeout=self.ACTION_TIMEOUT_SECONDS, force=False)\n except TimeoutError:\n return self._action_detail(\"runtime stop is still in progress\", timed_out=True)\n\n self._started = False\n self._state = LifecycleState.STOPPED\n return self._action_detail(\"runtime stopped\", timed_out=False)\n\n async def runtime_status(self) -> str:\n self._refresh_state()\n return self._state.value\n\n def _register_core_services(self) -> None:\n if self._core_registered:\n return\n self.services.register(\"configuration\", self.configuration)\n self.services.register(\"traces\", self.traces)\n self.services.register(\"health\", self.health)\n self.services.register(\"logs\", self.logs)\n self.services.register(\"workers\", self.workers)\n self.services.register(\"control_plane\", self.control_plane)\n self._core_registered = True\n\n def _register_health_contributors(self) -> None:\n for contributor in self.registry.health_contributors:\n self.health.register(contributor)\n\n def _register_workers(self) -> None:\n if self._workers_registered:\n return\n for worker in self.registry.workers:\n self.workers.register(worker)\n self._workers_registered = True\n\n def _refresh_state(self) -> None:\n lifecycle = self.workers.lifecycle_state()\n\n if self._state == LifecycleState.STOPPING:\n if lifecycle == LifecycleState.STOPPED:\n self._started = False\n self._state = LifecycleState.STOPPED\n return\n\n if not self._started:\n if lifecycle == LifecycleState.STOPPED:\n self._state = LifecycleState.STOPPED\n return\n\n self._state = lifecycle\n\n def _wait_for_state(self, target_states: set[LifecycleState], *, timeout: float) -> bool:\n deadline = monotonic() + timeout\n while monotonic() < deadline:\n self._refresh_state()\n if self._state in target_states:\n return True\n sleep(self.ACTION_POLL_INTERVAL_SECONDS)\n self._refresh_state()\n return self._state in target_states\n\n def _action_detail(self, message: str, *, timed_out: bool) -> dict[str, object]:\n self._refresh_state()\n return {\n \"message\": message,\n \"state\": self._state.value,\n \"timed_out\": timed_out,\n \"workers\": self.workers.snapshot(),\n }", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/core/runtime.py:RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 0, + "test_penalty": 0, + "structural_rank": 0, + "layer_rank": 0, + "distance": 0, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "validation": { + "passed": true, + "action": "return", + "reasons": [] + }, + "steps": [ + { + "step": "router", + "status": "completed", + "timings_ms": { + "router": 0 + }, + "output": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + } + }, + { + "step": "retrieval", + "status": "completed", + "timings_ms": { + "retrieval": 221 + }, + "output": { + "rag_count": 1, + "answer_path_rag_count": 1, + "resolved_symbol_status": "not_requested", + "resolved_symbol": null, + "requested_layers": [ + "C0_SOURCE_CHUNKS" + ] + }, + "diagnostics": { + "executed_layers": [ + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C0_SOURCE_CHUNKS": 200 + }, + "filters_by_layer": { + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src/app_runtime/core/runtime.py" + ] + } + }, + "requests": [ + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Открой файл src/app_runtime/core/runtime.py", + "ranking_profile": "code" + } + ], + "fallback": { + "used": false, + "reason": null + }, + "retrieval_by_layer_ms": { + "C0_SOURCE_CHUNKS": 221 + } + } + }, + { + "step": "pre_evidence_gate", + "status": "passed", + "timings_ms": { + "pre_evidence_gate": 0 + }, + "output": { + "passed": true, + "failure_reasons": [], + "degraded_message": "" + } + }, + { + "step": "llm", + "status": "completed", + "timings_ms": { + "llm": 578 + }, + "output": { + "prompt_name": "code_qa_open_file_answer", + "answer_preview": "Виден класс `RuntimeManager` с методом `__init__`, принимающим несколько параметров. Фиксированы также константы `ACTION_TIMEOUT_SECONDS` и `ACTION_POLL_INTERVAL_SECONDS`." + } + }, + { + "step": "post_evidence_gate", + "status": "passed", + "timings_ms": { + "post_evidence_gate": 0, + "repair": 0 + }, + "output": { + "passed": true, + "reasons": [], + "repair_used": false + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-open-file-runtime.md b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-open-file-runtime.md new file mode 100644 index 0000000..6aa40ba --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-open-file-runtime.md @@ -0,0 +1,188 @@ +# plba-v2-open-file-runtime + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: agent_runtime +- mode: full_chain +- passed: True + +## Query +Открой файл src/app_runtime/core/runtime.py + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 1, + "llm_answer": "Виден класс `RuntimeManager` с методом `__init__`, принимающим несколько параметров. Фиксированы также константы `ACTION_TIMEOUT_SECONDS` и `ACTION_POLL_INTERVAL_SECONDS`.", + "answer_mode": "answered", + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "symbol_candidates": [], + "layers": [ + "C0_SOURCE_CHUNKS" + ] +} + +## Steps +[ + { + "step": "router", + "status": "completed", + "timings_ms": { + "router": 0 + }, + "output": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + } + }, + { + "step": "retrieval", + "status": "completed", + "timings_ms": { + "retrieval": 221 + }, + "output": { + "rag_count": 1, + "answer_path_rag_count": 1, + "resolved_symbol_status": "not_requested", + "resolved_symbol": null, + "requested_layers": [ + "C0_SOURCE_CHUNKS" + ] + }, + "diagnostics": { + "executed_layers": [ + "C0_SOURCE_CHUNKS" + ], + "retrieval_mode_by_layer": { + "C0_SOURCE_CHUNKS": "exact_path_fetch" + }, + "top_k_by_layer": { + "C0_SOURCE_CHUNKS": 200 + }, + "filters_by_layer": { + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src/app_runtime/core/runtime.py" + ] + } + }, + "requests": [ + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Открой файл src/app_runtime/core/runtime.py", + "ranking_profile": "code" + } + ], + "fallback": { + "used": false, + "reason": null + }, + "retrieval_by_layer_ms": { + "C0_SOURCE_CHUNKS": 221 + } + } + }, + { + "step": "pre_evidence_gate", + "status": "passed", + "timings_ms": { + "pre_evidence_gate": 0 + }, + "output": { + "passed": true, + "failure_reasons": [], + "degraded_message": "" + } + }, + { + "step": "llm", + "status": "completed", + "timings_ms": { + "llm": 578 + }, + "output": { + "prompt_name": "code_qa_open_file_answer", + "answer_preview": "Виден класс `RuntimeManager` с методом `__init__`, принимающим несколько параметров. Фиксированы также константы `ACTION_TIMEOUT_SECONDS` и `ACTION_POLL_INTERVAL_SECONDS`." + } + }, + { + "step": "post_evidence_gate", + "status": "passed", + "timings_ms": { + "post_evidence_gate": 0, + "repair": 0 + }, + "output": { + "passed": true, + "reasons": [], + "repair_used": false + } + } +] + +## Diagnostics +{ + "intent_correct": null, + "target_found": true, + "layers_used": [ + "C0_SOURCE_CHUNKS" + ], + "retrieval_sufficient": true, + "answer_mode": "normal", + "router_result": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "OPEN_FILE", + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "layers": [ + "C0_SOURCE_CHUNKS" + ], + "symbol_resolution_status": "not_requested" + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Открой файл src/app_runtime/core/runtime.py", + "sub_intent": "OPEN_FILE", + "path_scope": [ + "src/app_runtime/core/runtime.py" + ], + "requested_layers": [ + "C0_SOURCE_CHUNKS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 1, + "empty": false, + "fallback_used": false + } + ], + "empty_layers": [], + "evidence_gate_decision": { + "sufficient": true, + "failure_reasons": [], + "evidence_count": 1 + }, + "failure_reasons": [], + "timings_ms": { + "router": 0, + "retrieval": 221, + "pre_evidence_gate": 0, + "llm": 578 + } +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-health-endpoint.json b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-health-endpoint.json new file mode 100644 index 0000000..5eae58c --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-health-endpoint.json @@ -0,0 +1,4837 @@ +{ + "case_id": "plba-v2-trace-flow-health-endpoint", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "agent_runtime", + "mode": "full_chain", + "query": "Покажи как проходит запрос /health в HttpControlAppFactory", + "actual": { + "intent": "CODE_QA", + "sub_intent": "TRACE_FLOW", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 37, + "llm_answer": "Поток выполнения запроса `/health` в `HttpControlAppFactory` выглядит следующим образом:\n\n1. Запрос приходит на маршрут `/health`.\n2. Контроллер вызывает метод `health()` внутри фабрики, который объявлен в классе `HttpControlAppFactory`.\n3. Внутри метода `health()` фабрика ожидает асинхронный результат от провайдера здоровья (`health_provider`), представляющего состояние системы.\n4. Результат передается в виде объекта `HealthPayload`, содержащего статус (\"ok\" или иное).\n5. На основе статуса определяется HTTP-код ответа: 200 при успешном состоянии, иначе 503.\n6. Ответ формируется с использованием JSON формата.\n\nТаким образом, ключевой элемент — провайдер здоровья, определяющий текущее состояние системы и возвращающий соответствующий объект состояния.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "health", + "HttpControlAppFactory" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "query": "Покажи как проходит запрос /health в HttpControlAppFactory", + "router_result": { + "schema_version": "1.1", + "intent": "CODE_QA", + "retrieval_profile": "code", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query_plan": { + "raw": "Покажи как проходит запрос /health в HttpControlAppFactory", + "normalized": "Покажи как проходит запрос /health в HttpControlAppFactory", + "sub_intent": "TRACE_FLOW", + "negations": [], + "expansions": [ + "health", + "HttpControlAppFactory" + ], + "keyword_hints": [ + "health", + "HttpControlAppFactory" + ], + "path_hints": [], + "doc_scope_hints": [], + "symbol_candidates": [ + "health", + "HttpControlAppFactory" + ], + "symbol_kind_hint": "unknown", + "anchors": [ + { + "type": "SYMBOL", + "value": "health", + "source": "user_text", + "subtype": null, + "span": { + "start": 28, + "end": 34 + }, + "confidence": 0.88 + }, + { + "type": "SYMBOL", + "value": "HttpControlAppFactory", + "source": "user_text", + "subtype": null, + "span": { + "start": 37, + "end": 58 + }, + "confidence": 0.88 + } + ] + }, + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "top_k": 8 + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 8 + }, + { + "layer_id": "C4_SEMANTIC_ROLES", + "top_k": 8 + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "top_k": 10 + }, + { + "layer_id": "C3_ENTRYPOINTS", + "top_k": 10 + } + ], + "filters": { + "test_policy": "EXCLUDE", + "path_scope": [], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "HttpControlAppFactory", + "alternatives": [ + "HttpControlAppFactory", + "HttpControlAppFactory", + "ControlActionSet", + "ControlPlaneService", + "HealthContributor.health" + ], + "confidence": 0.99 + }, + "evidence_policy": { + "require_def": true, + "require_flow": true, + "require_spec": false, + "allow_answer_without_evidence": false + } + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Покажи как проходит запрос /health в HttpControlAppFactory", + "sub_intent": "TRACE_FLOW", + "path_scope": [], + "keyword_hints": [ + "health", + "HttpControlAppFactory" + ], + "symbol_candidates": [ + "health", + "HttpControlAppFactory" + ], + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "top_k": 8 + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 8 + }, + { + "layer_id": "C4_SEMANTIC_ROLES", + "top_k": 8 + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "top_k": 10 + }, + { + "layer_id": "C3_ENTRYPOINTS", + "top_k": 10 + } + ], + "filters": { + "test_policy": "EXCLUDE", + "path_scope": [], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + }, + "query_plan": { + "raw": "Покажи как проходит запрос /health в HttpControlAppFactory", + "normalized": "Покажи как проходит запрос /health в HttpControlAppFactory", + "sub_intent": "TRACE_FLOW", + "negations": [], + "expansions": [ + "health", + "HttpControlAppFactory" + ], + "keyword_hints": [ + "health", + "HttpControlAppFactory" + ], + "path_hints": [], + "doc_scope_hints": [], + "symbol_candidates": [ + "health", + "HttpControlAppFactory" + ], + "symbol_kind_hint": "unknown", + "anchors": [ + { + "type": "SYMBOL", + "value": "health", + "source": "user_text", + "subtype": null, + "span": { + "start": 28, + "end": 34 + }, + "confidence": 0.88 + }, + { + "type": "SYMBOL", + "value": "HttpControlAppFactory", + "source": "user_text", + "subtype": null, + "span": { + "start": 37, + "end": 58 + }, + "confidence": 0.88 + } + ] + } + }, + "retrieval_result": { + "target_symbol_candidates": [ + "HttpControlAppFactory", + "ControlActionSet", + "ControlPlaneService", + "HealthContributor.health", + "HealthContributor", + "ControlChannel" + ], + "resolved_symbol": "HttpControlAppFactory", + "symbol_resolution_status": "resolved", + "file_candidates": [ + "src/app_runtime/control/http_app.py", + "src/app_runtime/control/http_channel.py", + "src/app_runtime/control/base.py", + "src/app_runtime/control/__init__.py", + "src/app_runtime/contracts/health.py", + "src/app_runtime/control/http_runner.py", + "src/app_runtime/control/service.py", + "src/app_runtime/health/registry.py", + "src/app_runtime/core/types.py" + ], + "code_chunks": [ + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/http_app.py", + "title": "HttpControlAppFactory", + "content": "class HttpControlAppFactory\nHttpControlAppFactory", + "start_line": 15, + "end_line": 53, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "qname": "HttpControlAppFactory", + "kind": "class", + "signature": "HttpControlAppFactory", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/http_channel.py", + "title": "HttpControlAppFactory", + "content": "const HttpControlAppFactory\nHttpControlAppFactory = app_runtime.control.http_app.HttpControlAppFactory", + "start_line": 8, + "end_line": 8, + "metadata": { + "symbol_id": "9ee00379ee797cd2386e88a6e37dc69e3e31de9144fc4b95f0206cd1430e8983", + "qname": "HttpControlAppFactory", + "kind": "const", + "signature": "HttpControlAppFactory = app_runtime.control.http_app.HttpControlAppFactory", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/base.py", + "title": "ControlActionSet", + "content": "class ControlActionSet\nControlActionSet", + "start_line": 14, + "end_line": 18, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "qname": "ControlActionSet", + "kind": "class", + "signature": "ControlActionSet", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/__init__.py", + "title": "ControlPlaneService", + "content": "const ControlPlaneService\nControlPlaneService = app_runtime.control.service.ControlPlaneService", + "start_line": 3, + "end_line": 3, + "metadata": { + "symbol_id": "217e8f044d1c01644bf7b81e5046af9e84469210c692a2fb0c476a19bb069ae1", + "qname": "ControlPlaneService", + "kind": "const", + "signature": "ControlPlaneService = app_runtime.control.service.ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/contracts/health.py", + "title": "HealthContributor.health", + "content": "method HealthContributor.health\nhealth(self)\nReturn contributor health state.", + "start_line": 9, + "end_line": 10, + "metadata": { + "symbol_id": "728cff18958d8a25e2661a0f08c83d68c3bbbfa8cef212b85dc0da2b11b3dc90", + "qname": "HealthContributor.health", + "kind": "method", + "signature": "health(self)", + "parent_symbol_id": "HealthContributor", + "package_or_module": "src.app_runtime.contracts.health", + "is_test": false, + "blob_sha": "6bd92611def7131e32d4dd34a8ed85e6cf3c67722ad27797032a632cb30dc097", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/contracts/health.py", + "title": "HealthContributor", + "content": "class HealthContributor\nHealthContributor(ABC)", + "start_line": 7, + "end_line": 10, + "metadata": { + "symbol_id": "db91ae387b89a2e9d83829754f27fa18a4055b3e72d7f31789a0b8e0bf5bba0b", + "qname": "HealthContributor", + "kind": "class", + "signature": "HealthContributor(ABC)", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.contracts.health", + "is_test": false, + "blob_sha": "6bd92611def7131e32d4dd34a8ed85e6cf3c67722ad27797032a632cb30dc097", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/__init__.py", + "title": "ControlActionSet", + "content": "const ControlActionSet\nControlActionSet = app_runtime.control.base.ControlActionSet", + "start_line": 1, + "end_line": 1, + "metadata": { + "symbol_id": "767e4ac0d4224aeccb0783a38359d3c03899a876736eb83d99887c16ea07cc6c", + "qname": "ControlActionSet", + "kind": "const", + "signature": "ControlActionSet = app_runtime.control.base.ControlActionSet", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/__init__.py", + "title": "ControlChannel", + "content": "const ControlChannel\nControlChannel = app_runtime.control.base.ControlChannel", + "start_line": 1, + "end_line": 1, + "metadata": { + "symbol_id": "268420f7aa4ed74082b9276cae0cded4f00bac090ffd58fa020a65be0fe19c27", + "qname": "ControlChannel", + "kind": "const", + "signature": "ControlChannel = app_runtime.control.base.ControlChannel", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/http_channel.py", + "title": "src/app_runtime/control/http_channel.py:HttpControlChannel", + "content": "class HttpControlChannel(ControlChannel):\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._timeout = timeout\n self._runner = UvicornThreadRunner(host, port, timeout)\n self._factory = HttpControlAppFactory()\n self._actions: ControlActionSet | None = None\n\n async def start(self, actions: ControlActionSet) -> None:\n self._actions = actions\n app = self._factory.create(self._health_response, self._action_response)\n await self._runner.start(app)\n\n async def stop(self) -> None:\n await self._runner.stop()\n\n @property\n def port(self) -> int:\n return self._runner.port\n\n async def _health_response(self) -> dict[str, object]:\n if self._actions is None:\n return {\"status\": \"unhealthy\", \"detail\": \"control actions are not configured\"}\n return await asyncio.wait_for(self._actions.health(), timeout=float(self._timeout))\n\n async def _action_response(self, action: str, _client_source: str = \"unknown\") -> JSONResponse:\n if self._actions is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"{action} handler is not configured\"}, status_code=404)\n callbacks = {\n \"start\": self._actions.start,\n \"stop\": self._actions.stop,\n \"status\": self._actions.status,\n }\n callback = callbacks.get(action)\n if callback is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"unsupported action: {action}\"}, status_code=404)\n action_timeout = max(float(self._timeout), 10.0) if action in {\"start\", \"stop\"} else float(self._timeout)\n try:\n detail = await asyncio.wait_for(callback(), timeout=action_timeout)\n except asyncio.TimeoutError:\n return JSONResponse(\n content={\"status\": \"accepted\", \"detail\": f\"{action} operation is still in progress\"},\n status_code=202,\n )\n except Exception as exc:\n return JSONResponse(content={\"status\": \"error\", \"detail\": str(exc)}, status_code=500)\n return JSONResponse(content={\"status\": \"ok\", \"detail\": detail or f\"{action} action accepted\"}, status_code=200)", + "start_line": 12, + "end_line": 57, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/http_runner.py", + "title": "src/app_runtime/control/http_runner.py:UvicornThreadRunner", + "content": "class UvicornThreadRunner:\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._host = host\n self._port = port\n self._timeout = timeout\n self._server: Server | None = None\n self._thread: Thread | None = None\n self._error: BaseException | None = None\n\n async def start(self, app: FastAPI) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._error = None\n config = Config(app=app, host=self._host, port=self._port, log_level=\"warning\")\n self._server = Server(config)\n self._thread = Thread(target=self._serve, name=\"plba-http-control\", daemon=True)\n self._thread.start()\n await self._wait_until_started()\n\n async def stop(self) -> None:\n if self._server is None or self._thread is None:\n return\n self._server.should_exit = True\n await asyncio.to_thread(self._thread.join, self._timeout)\n self._server = None\n self._thread = None\n\n @property\n def port(self) -> int:\n if self._server is None or not getattr(self._server, \"servers\", None):\n return self._port\n socket = self._server.servers[0].sockets[0]\n return int(socket.getsockname()[1])\n\n async def _wait_until_started(self) -> None:\n if self._server is None:\n raise RuntimeError(\"Server is not initialized\")\n deadline = asyncio.get_running_loop().time() + max(float(self._timeout), 1.0)\n while not self._server.started:\n if self._error is not None:\n raise RuntimeError(\"HTTP control server failed to start\") from self._error\n if asyncio.get_running_loop().time() >= deadline:\n raise TimeoutError(\"HTTP control server startup timed out\")\n await asyncio.sleep(0.05)\n\n def _serve(self) -> None:\n if self._server is None:\n return\n try:\n asyncio.run(self._server.serve())\n except BaseException as exc: # noqa: BLE001\n self._error = exc", + "start_line": 10, + "end_line": 61, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_runner", + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/http_app.py", + "title": "src/app_runtime/control/http_app.py:HttpControlAppFactory", + "content": "class HttpControlAppFactory:\n def create(\n self,\n health_provider: Callable[[], Awaitable[HealthPayload]],\n action_provider: Callable[[str, str], Awaitable[JSONResponse]],\n ) -> FastAPI:\n app = FastAPI(title=\"PLBA Control API\")\n\n @app.middleware(\"http\")\n async def log_api_call(request: Request, call_next): # type: ignore[no-untyped-def]\n started = time.monotonic()\n response = await call_next(request)\n response.headers[\"X-Response-Time-Ms\"] = str(int((time.monotonic() - started) * 1000))\n return response\n\n @app.get(\"/health\")\n async def health() -> JSONResponse:\n payload = await health_provider()\n status_code = 200 if payload.get(\"status\") == \"ok\" else 503\n return JSONResponse(content=payload, status_code=status_code)\n\n @app.get(\"/actions/{action}\")\n @app.post(\"/actions/{action}\")\n async def action(action: str, request: Request) -> JSONResponse:\n client_source = self._client_source(request)\n if action in {\"start\", \"stop\"}:\n LOGGER.warning(\"Control action requested: /actions/%s client=%s\", action, client_source)\n return await action_provider(action, client_source)\n\n return app\n\n def _client_source(self, request: Request) -> str:\n explicit_header = request.headers.get(\"X-Client-Source\", \"\").strip()\n if explicit_header:\n return explicit_header\n user_agent = request.headers.get(\"User-Agent\", \"\").strip()\n if user_agent:\n return f\"user-agent:{user_agent}\"\n return \"unknown\"", + "start_line": 15, + "end_line": 53, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/contracts/health.py", + "title": "src/app_runtime/contracts/health.py:HealthContributor", + "content": "class HealthContributor(ABC):\n @abstractmethod\n def health(self) -> WorkerHealth:\n \"\"\"Return contributor health state.\"\"\"", + "start_line": 7, + "end_line": 10, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.health", + "is_test": false, + "blob_sha": "6bd92611def7131e32d4dd34a8ed85e6cf3c67722ad27797032a632cb30dc097", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/base.py", + "title": "src/app_runtime/control/base.py:ControlChannel", + "content": "class ControlChannel(ABC):\n @abstractmethod\n async def start(self, actions: ControlActionSet) -> None:\n \"\"\"Start the control channel and bind handlers.\"\"\"\n\n @abstractmethod\n async def stop(self) -> None:\n \"\"\"Stop the control channel and release resources.\"\"\"", + "start_line": 21, + "end_line": 28, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/__init__.py", + "title": "src/app_runtime/control/__init__.py:1-5", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\"ControlActionSet\", \"ControlChannel\", \"ControlPlaneService\", \"HttpControlChannel\"]", + "start_line": 1, + "end_line": 5, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/base.py", + "title": "src/app_runtime/control/base.py:ControlActionSet", + "content": "class ControlActionSet:\n health: HealthHandler\n start: ActionHandler\n stop: ActionHandler\n status: ActionHandler", + "start_line": 14, + "end_line": 18, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/service.py", + "title": "src/app_runtime/control/service.py:ControlPlaneService", + "content": "class ControlPlaneService:\n def __init__(self) -> None:\n self._channels: list[ControlChannel] = []\n\n def register_channel(self, channel: ControlChannel) -> None:\n self._channels.append(channel)\n\n def start(self, runtime: RuntimeManager) -> None:\n if not self._channels:\n return\n asyncio.run(self._start_async(runtime))\n\n def stop(self) -> None:\n if not self._channels:\n return\n asyncio.run(self._stop_async())\n\n def snapshot(self, runtime: RuntimeManager) -> dict[str, object]:\n health = runtime.current_health()\n return {\n \"runtime\": {\"state\": runtime._state.value},\n \"modules\": list(runtime.registry.modules),\n \"services\": runtime.services.snapshot(),\n \"workers\": runtime.workers.snapshot(),\n \"health\": runtime.health.snapshot(runtime.workers.healths()) | {\"status\": health[\"status\"]},\n \"config\": runtime.configuration.get(),\n }\n\n async def _start_async(self, runtime: RuntimeManager) -> None:\n actions = ControlActionSet(\n health=runtime.health_status,\n start=runtime.start_runtime,\n stop=runtime.stop_runtime,\n status=runtime.runtime_status,\n )\n for channel in self._channels:\n await channel.start(actions)\n\n async def _stop_async(self) -> None:\n for channel in reversed(self._channels):\n await channel.stop()", + "start_line": 12, + "end_line": 52, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/http_app.py", + "title": "HttpControlAppFactory", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "start_line": 15, + "end_line": 53, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/health/registry.py", + "title": "HealthRegistry", + "content": "HealthRegistry\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (2)", + "start_line": 8, + "end_line": 56, + "metadata": { + "symbol_id": "fd3390eb0ba29c9979466b9c2117238e0da3bb829eeb4d505cb34c9c3df7a8e8", + "symbol_name": "HealthRegistry", + "qname": "HealthRegistry", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 2, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "26e6a24daa43407ba5340b74497c20153020e79f8d7828ae502aaec378dfcf75", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/core/types.py", + "title": "HealthPayload", + "content": "HealthPayload\nrole: model\n\nResponsibilities:\n- default model role", + "start_line": 7, + "end_line": 11, + "metadata": { + "symbol_id": "392235d63ddf752d6e419cb8528c93fe070d1bc02d3c87ba6a897baac810cf5d", + "symbol_name": "HealthPayload", + "qname": "HealthPayload", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "448a02e4a432b5ab65b246b2bd24a32a6f127b9d2091ea73b53ee3c0a2f53bb3", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/contracts/health.py", + "title": "HealthContributor", + "content": "HealthContributor\nrole: model\n\nResponsibilities:\n- default model role", + "start_line": 7, + "end_line": 10, + "metadata": { + "symbol_id": "db91ae387b89a2e9d83829754f27fa18a4055b3e72d7f31789a0b8e0bf5bba0b", + "symbol_name": "HealthContributor", + "qname": "HealthContributor", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "6bd92611def7131e32d4dd34a8ed85e6cf3c67722ad27797032a632cb30dc097", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/base.py", + "title": "ControlActionSet", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "start_line": 14, + "end_line": 18, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/base.py", + "title": "ControlChannel", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "start_line": 21, + "end_line": 28, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "start_line": 12, + "end_line": 52, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/http_runner.py", + "title": "UvicornThreadRunner", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "start_line": 10, + "end_line": 61, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/health/registry.py", + "title": "HealthRegistry.__init__:dataflow_slice", + "content": "HealthRegistry.__init__\n -> HealthRegistry._contributors\n -> HealthRegistry.register", + "start_line": 10, + "end_line": 13, + "metadata": { + "edge_id": "2381dfb339d541367c3251d2a610cac9d8b3f6bd6a352e119d00a93c5ccc2b7d", + "edge_type": "dataflow_slice", + "src_symbol_id": "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "src_qname": "HealthRegistry.__init__", + "dst_symbol_id": "a9e1f290c346c8bb1d67af0cafeebb5bcaf29c3ed7027e33c794532743df38f2", + "dst_ref": "HealthRegistry.register", + "resolution": "resolved", + "slice_id": "2381dfb339d541367c3251d2a610cac9d8b3f6bd6a352e119d00a93c5ccc2b7d", + "root_symbol_id": "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "path_symbols": [ + "HealthRegistry.__init__", + "HealthRegistry._contributors", + "HealthRegistry.register" + ], + "path_symbol_ids": [ + "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "a9e1f290c346c8bb1d67af0cafeebb5bcaf29c3ed7027e33c794532743df38f2" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "26e6a24daa43407ba5340b74497c20153020e79f8d7828ae502aaec378dfcf75", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "start_line": 14, + "end_line": 20, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "start_line": 14, + "end_line": 25, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "start_line": 14, + "end_line": 51, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/health/registry.py", + "title": "HealthRegistry.__init__:dataflow_slice", + "content": "HealthRegistry.__init__\n -> HealthRegistry._contributors\n -> HealthRegistry.contributor_healths", + "start_line": 10, + "end_line": 16, + "metadata": { + "edge_id": "d3a88a7abf16359e903e809ffc24473658fdd8198f60641fe1584fc4ac663c31", + "edge_type": "dataflow_slice", + "src_symbol_id": "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "src_qname": "HealthRegistry.__init__", + "dst_symbol_id": "fa7bbd8f4b64a55a5088640c30f52e84075d65f531bd7e1f6c1d7bb8d24fcbf2", + "dst_ref": "HealthRegistry.contributor_healths", + "resolution": "resolved", + "slice_id": "d3a88a7abf16359e903e809ffc24473658fdd8198f60641fe1584fc4ac663c31", + "root_symbol_id": "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "path_symbols": [ + "HealthRegistry.__init__", + "HealthRegistry._contributors", + "HealthRegistry.contributor_healths" + ], + "path_symbol_ids": [ + "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "fa7bbd8f4b64a55a5088640c30f52e84075d65f531bd7e1f6c1d7bb8d24fcbf2" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "26e6a24daa43407ba5340b74497c20153020e79f8d7828ae502aaec378dfcf75", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "start_line": 14, + "end_line": 47, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "start_line": 14, + "end_line": 17, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/http_app.py", + "title": "HttpControlAppFactory.create:calls", + "content": "HttpControlAppFactory.create calls time.monotonic", + "start_line": 25, + "end_line": 25, + "metadata": { + "edge_id": "3fdd0a88d10225ee74f3b84ab57e13f09f5ccc72f00e31af9ae4655411c289c0", + "edge_type": "calls", + "src_symbol_id": "4af42c2a9275d652e710a98ec48b8247236b4453a093629f8958704ff6d3cb58", + "src_qname": "HttpControlAppFactory.create", + "dst_symbol_id": null, + "dst_ref": "time.monotonic", + "resolution": "partial", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/http_app.py", + "title": "HttpControlAppFactory.create:calls", + "content": "HttpControlAppFactory.create calls app.post", + "start_line": 37, + "end_line": 37, + "metadata": { + "edge_id": "0e545d4b5187db7bec5ceac03071d2ad68177550c42af748fee364639e533c90", + "edge_type": "calls", + "src_symbol_id": "4af42c2a9275d652e710a98ec48b8247236b4453a093629f8958704ff6d3cb58", + "src_qname": "HttpControlAppFactory.create", + "dst_symbol_id": null, + "dst_ref": "app.post", + "resolution": "partial", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/http_app.py", + "title": "HttpControlAppFactory.create:calls", + "content": "HttpControlAppFactory.create calls str", + "start_line": 27, + "end_line": 27, + "metadata": { + "edge_id": "2a87c51461e31cd556508cc37fdff37b4d24c26f7f1604db30af5e8f1bda96cb", + "edge_type": "calls", + "src_symbol_id": "4af42c2a9275d652e710a98ec48b8247236b4453a093629f8958704ff6d3cb58", + "src_qname": "HttpControlAppFactory.create", + "dst_symbol_id": null, + "dst_ref": "str", + "resolution": "partial", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C3_ENTRYPOINTS", + "path": "src/app_runtime/control/http_app.py", + "title": "app.post", + "content": "fastapi http app.post", + "start_line": 38, + "end_line": 42, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C3_ENTRYPOINTS", + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "content": "fastapi http app.get", + "start_line": 31, + "end_line": 34, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C3_ENTRYPOINTS", + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "content": "fastapi http app.get", + "start_line": 38, + "end_line": 42, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "relations": [ + { + "path": "src/app_runtime/health/registry.py", + "metadata": { + "edge_id": "2381dfb339d541367c3251d2a610cac9d8b3f6bd6a352e119d00a93c5ccc2b7d", + "edge_type": "dataflow_slice", + "src_symbol_id": "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "src_qname": "HealthRegistry.__init__", + "dst_symbol_id": "a9e1f290c346c8bb1d67af0cafeebb5bcaf29c3ed7027e33c794532743df38f2", + "dst_ref": "HealthRegistry.register", + "resolution": "resolved", + "slice_id": "2381dfb339d541367c3251d2a610cac9d8b3f6bd6a352e119d00a93c5ccc2b7d", + "root_symbol_id": "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "path_symbols": [ + "HealthRegistry.__init__", + "HealthRegistry._contributors", + "HealthRegistry.register" + ], + "path_symbol_ids": [ + "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "a9e1f290c346c8bb1d67af0cafeebb5bcaf29c3ed7027e33c794532743df38f2" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "26e6a24daa43407ba5340b74497c20153020e79f8d7828ae502aaec378dfcf75", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "HealthRegistry.__init__\n -> HealthRegistry._contributors\n -> HealthRegistry.register" + }, + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start" + }, + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop" + }, + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async" + }, + { + "path": "src/app_runtime/health/registry.py", + "metadata": { + "edge_id": "d3a88a7abf16359e903e809ffc24473658fdd8198f60641fe1584fc4ac663c31", + "edge_type": "dataflow_slice", + "src_symbol_id": "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "src_qname": "HealthRegistry.__init__", + "dst_symbol_id": "fa7bbd8f4b64a55a5088640c30f52e84075d65f531bd7e1f6c1d7bb8d24fcbf2", + "dst_ref": "HealthRegistry.contributor_healths", + "resolution": "resolved", + "slice_id": "d3a88a7abf16359e903e809ffc24473658fdd8198f60641fe1584fc4ac663c31", + "root_symbol_id": "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "path_symbols": [ + "HealthRegistry.__init__", + "HealthRegistry._contributors", + "HealthRegistry.contributor_healths" + ], + "path_symbol_ids": [ + "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "fa7bbd8f4b64a55a5088640c30f52e84075d65f531bd7e1f6c1d7bb8d24fcbf2" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "26e6a24daa43407ba5340b74497c20153020e79f8d7828ae502aaec378dfcf75", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "HealthRegistry.__init__\n -> HealthRegistry._contributors\n -> HealthRegistry.contributor_healths" + }, + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async" + }, + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel" + }, + { + "path": "src/app_runtime/control/http_app.py", + "metadata": { + "edge_id": "3fdd0a88d10225ee74f3b84ab57e13f09f5ccc72f00e31af9ae4655411c289c0", + "edge_type": "calls", + "src_symbol_id": "4af42c2a9275d652e710a98ec48b8247236b4453a093629f8958704ff6d3cb58", + "src_qname": "HttpControlAppFactory.create", + "dst_symbol_id": null, + "dst_ref": "time.monotonic", + "resolution": "partial", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "HttpControlAppFactory.create calls time.monotonic" + }, + { + "path": "src/app_runtime/control/http_app.py", + "metadata": { + "edge_id": "0e545d4b5187db7bec5ceac03071d2ad68177550c42af748fee364639e533c90", + "edge_type": "calls", + "src_symbol_id": "4af42c2a9275d652e710a98ec48b8247236b4453a093629f8958704ff6d3cb58", + "src_qname": "HttpControlAppFactory.create", + "dst_symbol_id": null, + "dst_ref": "app.post", + "resolution": "partial", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "HttpControlAppFactory.create calls app.post" + }, + { + "path": "src/app_runtime/control/http_app.py", + "metadata": { + "edge_id": "2a87c51461e31cd556508cc37fdff37b4d24c26f7f1604db30af5e8f1bda96cb", + "edge_type": "calls", + "src_symbol_id": "4af42c2a9275d652e710a98ec48b8247236b4453a093629f8958704ff6d3cb58", + "src_qname": "HttpControlAppFactory.create", + "dst_symbol_id": null, + "dst_ref": "str", + "resolution": "partial", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "HttpControlAppFactory.create calls str" + } + ], + "entrypoints": [ + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.post", + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "test_candidates": [], + "layer_outcomes": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C4_SEMANTIC_ROLES", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 10, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C3_ENTRYPOINTS", + "hit_count": 3, + "empty": false, + "fallback_used": false + } + ], + "missing_layers": [], + "raw_rows": [ + { + "path": "src/app_runtime/control/http_app.py", + "content": "class HttpControlAppFactory\nHttpControlAppFactory", + "layer": "C1_SYMBOL_CATALOG", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "qname": "HttpControlAppFactory", + "kind": "class", + "signature": "HttpControlAppFactory", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "const HttpControlAppFactory\nHttpControlAppFactory = app_runtime.control.http_app.HttpControlAppFactory", + "layer": "C1_SYMBOL_CATALOG", + "title": "HttpControlAppFactory", + "span_start": 8, + "span_end": 8, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "9ee00379ee797cd2386e88a6e37dc69e3e31de9144fc4b95f0206cd1430e8983", + "qname": "HttpControlAppFactory", + "kind": "const", + "signature": "HttpControlAppFactory = app_runtime.control.http_app.HttpControlAppFactory", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlActionSet\nControlActionSet", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "qname": "ControlActionSet", + "kind": "class", + "signature": "ControlActionSet", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "const ControlPlaneService\nControlPlaneService = app_runtime.control.service.ControlPlaneService", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlPlaneService", + "span_start": 3, + "span_end": 3, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "217e8f044d1c01644bf7b81e5046af9e84469210c692a2fb0c476a19bb069ae1", + "qname": "ControlPlaneService", + "kind": "const", + "signature": "ControlPlaneService = app_runtime.control.service.ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/health.py", + "content": "method HealthContributor.health\nhealth(self)\nReturn contributor health state.", + "layer": "C1_SYMBOL_CATALOG", + "title": "HealthContributor.health", + "span_start": 9, + "span_end": 10, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "728cff18958d8a25e2661a0f08c83d68c3bbbfa8cef212b85dc0da2b11b3dc90", + "qname": "HealthContributor.health", + "kind": "method", + "signature": "health(self)", + "parent_symbol_id": "HealthContributor", + "package_or_module": "src.app_runtime.contracts.health", + "is_test": false, + "blob_sha": "6bd92611def7131e32d4dd34a8ed85e6cf3c67722ad27797032a632cb30dc097", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/health.py", + "content": "class HealthContributor\nHealthContributor(ABC)", + "layer": "C1_SYMBOL_CATALOG", + "title": "HealthContributor", + "span_start": 7, + "span_end": 10, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "db91ae387b89a2e9d83829754f27fa18a4055b3e72d7f31789a0b8e0bf5bba0b", + "qname": "HealthContributor", + "kind": "class", + "signature": "HealthContributor(ABC)", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.contracts.health", + "is_test": false, + "blob_sha": "6bd92611def7131e32d4dd34a8ed85e6cf3c67722ad27797032a632cb30dc097", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "const ControlActionSet\nControlActionSet = app_runtime.control.base.ControlActionSet", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlActionSet", + "span_start": 1, + "span_end": 1, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "767e4ac0d4224aeccb0783a38359d3c03899a876736eb83d99887c16ea07cc6c", + "qname": "ControlActionSet", + "kind": "const", + "signature": "ControlActionSet = app_runtime.control.base.ControlActionSet", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "const ControlChannel\nControlChannel = app_runtime.control.base.ControlChannel", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlChannel", + "span_start": 1, + "span_end": 1, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "268420f7aa4ed74082b9276cae0cded4f00bac090ffd58fa020a65be0fe19c27", + "qname": "ControlChannel", + "kind": "const", + "signature": "ControlChannel = app_runtime.control.base.ControlChannel", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel(ControlChannel):\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._timeout = timeout\n self._runner = UvicornThreadRunner(host, port, timeout)\n self._factory = HttpControlAppFactory()\n self._actions: ControlActionSet | None = None\n\n async def start(self, actions: ControlActionSet) -> None:\n self._actions = actions\n app = self._factory.create(self._health_response, self._action_response)\n await self._runner.start(app)\n\n async def stop(self) -> None:\n await self._runner.stop()\n\n @property\n def port(self) -> int:\n return self._runner.port\n\n async def _health_response(self) -> dict[str, object]:\n if self._actions is None:\n return {\"status\": \"unhealthy\", \"detail\": \"control actions are not configured\"}\n return await asyncio.wait_for(self._actions.health(), timeout=float(self._timeout))\n\n async def _action_response(self, action: str, _client_source: str = \"unknown\") -> JSONResponse:\n if self._actions is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"{action} handler is not configured\"}, status_code=404)\n callbacks = {\n \"start\": self._actions.start,\n \"stop\": self._actions.stop,\n \"status\": self._actions.status,\n }\n callback = callbacks.get(action)\n if callback is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"unsupported action: {action}\"}, status_code=404)\n action_timeout = max(float(self._timeout), 10.0) if action in {\"start\", \"stop\"} else float(self._timeout)\n try:\n detail = await asyncio.wait_for(callback(), timeout=action_timeout)\n except asyncio.TimeoutError:\n return JSONResponse(\n content={\"status\": \"accepted\", \"detail\": f\"{action} operation is still in progress\"},\n status_code=202,\n )\n except Exception as exc:\n return JSONResponse(content={\"status\": \"error\", \"detail\": str(exc)}, status_code=500)\n return JSONResponse(content={\"status\": \"ok\", \"detail\": detail or f\"{action} action accepted\"}, status_code=200)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_channel.py:HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "class UvicornThreadRunner:\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._host = host\n self._port = port\n self._timeout = timeout\n self._server: Server | None = None\n self._thread: Thread | None = None\n self._error: BaseException | None = None\n\n async def start(self, app: FastAPI) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._error = None\n config = Config(app=app, host=self._host, port=self._port, log_level=\"warning\")\n self._server = Server(config)\n self._thread = Thread(target=self._serve, name=\"plba-http-control\", daemon=True)\n self._thread.start()\n await self._wait_until_started()\n\n async def stop(self) -> None:\n if self._server is None or self._thread is None:\n return\n self._server.should_exit = True\n await asyncio.to_thread(self._thread.join, self._timeout)\n self._server = None\n self._thread = None\n\n @property\n def port(self) -> int:\n if self._server is None or not getattr(self._server, \"servers\", None):\n return self._port\n socket = self._server.servers[0].sockets[0]\n return int(socket.getsockname()[1])\n\n async def _wait_until_started(self) -> None:\n if self._server is None:\n raise RuntimeError(\"Server is not initialized\")\n deadline = asyncio.get_running_loop().time() + max(float(self._timeout), 1.0)\n while not self._server.started:\n if self._error is not None:\n raise RuntimeError(\"HTTP control server failed to start\") from self._error\n if asyncio.get_running_loop().time() >= deadline:\n raise TimeoutError(\"HTTP control server startup timed out\")\n await asyncio.sleep(0.05)\n\n def _serve(self) -> None:\n if self._server is None:\n return\n try:\n asyncio.run(self._server.serve())\n except BaseException as exc: # noqa: BLE001\n self._error = exc", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_runner.py:UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_runner", + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "class HttpControlAppFactory:\n def create(\n self,\n health_provider: Callable[[], Awaitable[HealthPayload]],\n action_provider: Callable[[str, str], Awaitable[JSONResponse]],\n ) -> FastAPI:\n app = FastAPI(title=\"PLBA Control API\")\n\n @app.middleware(\"http\")\n async def log_api_call(request: Request, call_next): # type: ignore[no-untyped-def]\n started = time.monotonic()\n response = await call_next(request)\n response.headers[\"X-Response-Time-Ms\"] = str(int((time.monotonic() - started) * 1000))\n return response\n\n @app.get(\"/health\")\n async def health() -> JSONResponse:\n payload = await health_provider()\n status_code = 200 if payload.get(\"status\") == \"ok\" else 503\n return JSONResponse(content=payload, status_code=status_code)\n\n @app.get(\"/actions/{action}\")\n @app.post(\"/actions/{action}\")\n async def action(action: str, request: Request) -> JSONResponse:\n client_source = self._client_source(request)\n if action in {\"start\", \"stop\"}:\n LOGGER.warning(\"Control action requested: /actions/%s client=%s\", action, client_source)\n return await action_provider(action, client_source)\n\n return app\n\n def _client_source(self, request: Request) -> str:\n explicit_header = request.headers.get(\"X-Client-Source\", \"\").strip()\n if explicit_header:\n return explicit_header\n user_agent = request.headers.get(\"User-Agent\", \"\").strip()\n if user_agent:\n return f\"user-agent:{user_agent}\"\n return \"unknown\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_app.py:HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/health.py", + "content": "class HealthContributor(ABC):\n @abstractmethod\n def health(self) -> WorkerHealth:\n \"\"\"Return contributor health state.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/contracts/health.py:HealthContributor", + "span_start": 7, + "span_end": 10, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.health", + "is_test": false, + "blob_sha": "6bd92611def7131e32d4dd34a8ed85e6cf3c67722ad27797032a632cb30dc097", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlChannel(ABC):\n @abstractmethod\n async def start(self, actions: ControlActionSet) -> None:\n \"\"\"Start the control channel and bind handlers.\"\"\"\n\n @abstractmethod\n async def stop(self) -> None:\n \"\"\"Stop the control channel and release resources.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\"ControlActionSet\", \"ControlChannel\", \"ControlPlaneService\", \"HttpControlChannel\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/__init__.py:1-5", + "span_start": 1, + "span_end": 5, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlActionSet:\n health: HealthHandler\n start: ActionHandler\n stop: ActionHandler\n status: ActionHandler", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "class ControlPlaneService:\n def __init__(self) -> None:\n self._channels: list[ControlChannel] = []\n\n def register_channel(self, channel: ControlChannel) -> None:\n self._channels.append(channel)\n\n def start(self, runtime: RuntimeManager) -> None:\n if not self._channels:\n return\n asyncio.run(self._start_async(runtime))\n\n def stop(self) -> None:\n if not self._channels:\n return\n asyncio.run(self._stop_async())\n\n def snapshot(self, runtime: RuntimeManager) -> dict[str, object]:\n health = runtime.current_health()\n return {\n \"runtime\": {\"state\": runtime._state.value},\n \"modules\": list(runtime.registry.modules),\n \"services\": runtime.services.snapshot(),\n \"workers\": runtime.workers.snapshot(),\n \"health\": runtime.health.snapshot(runtime.workers.healths()) | {\"status\": health[\"status\"]},\n \"config\": runtime.configuration.get(),\n }\n\n async def _start_async(self, runtime: RuntimeManager) -> None:\n actions = ControlActionSet(\n health=runtime.health_status,\n start=runtime.start_runtime,\n stop=runtime.stop_runtime,\n status=runtime.runtime_status,\n )\n for channel in self._channels:\n await channel.start(actions)\n\n async def _stop_async(self) -> None:\n for channel in reversed(self._channels):\n await channel.stop()", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/service.py:ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/health/registry.py", + "content": "HealthRegistry\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (2)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HealthRegistry", + "span_start": 8, + "span_end": 56, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 29, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "fd3390eb0ba29c9979466b9c2117238e0da3bb829eeb4d505cb34c9c3df7a8e8", + "symbol_name": "HealthRegistry", + "qname": "HealthRegistry", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 2, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "26e6a24daa43407ba5340b74497c20153020e79f8d7828ae502aaec378dfcf75", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/types.py", + "content": "HealthPayload\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "HealthPayload", + "span_start": 7, + "span_end": 11, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "392235d63ddf752d6e419cb8528c93fe070d1bc02d3c87ba6a897baac810cf5d", + "symbol_name": "HealthPayload", + "qname": "HealthPayload", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "448a02e4a432b5ab65b246b2bd24a32a6f127b9d2091ea73b53ee3c0a2f53bb3", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/health.py", + "content": "HealthContributor\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "HealthContributor", + "span_start": 7, + "span_end": 10, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "db91ae387b89a2e9d83829754f27fa18a4055b3e72d7f31789a0b8e0bf5bba0b", + "symbol_name": "HealthContributor", + "qname": "HealthContributor", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "6bd92611def7131e32d4dd34a8ed85e6cf3c67722ad27797032a632cb30dc097", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/health/registry.py", + "content": "HealthRegistry.__init__\n -> HealthRegistry._contributors\n -> HealthRegistry.register", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HealthRegistry.__init__:dataflow_slice", + "span_start": 10, + "span_end": 13, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "2381dfb339d541367c3251d2a610cac9d8b3f6bd6a352e119d00a93c5ccc2b7d", + "edge_type": "dataflow_slice", + "src_symbol_id": "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "src_qname": "HealthRegistry.__init__", + "dst_symbol_id": "a9e1f290c346c8bb1d67af0cafeebb5bcaf29c3ed7027e33c794532743df38f2", + "dst_ref": "HealthRegistry.register", + "resolution": "resolved", + "slice_id": "2381dfb339d541367c3251d2a610cac9d8b3f6bd6a352e119d00a93c5ccc2b7d", + "root_symbol_id": "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "path_symbols": [ + "HealthRegistry.__init__", + "HealthRegistry._contributors", + "HealthRegistry.register" + ], + "path_symbol_ids": [ + "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "a9e1f290c346c8bb1d67af0cafeebb5bcaf29c3ed7027e33c794532743df38f2" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "26e6a24daa43407ba5340b74497c20153020e79f8d7828ae502aaec378dfcf75", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/health/registry.py", + "content": "HealthRegistry.__init__\n -> HealthRegistry._contributors\n -> HealthRegistry.contributor_healths", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HealthRegistry.__init__:dataflow_slice", + "span_start": 10, + "span_end": 16, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "d3a88a7abf16359e903e809ffc24473658fdd8198f60641fe1584fc4ac663c31", + "edge_type": "dataflow_slice", + "src_symbol_id": "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "src_qname": "HealthRegistry.__init__", + "dst_symbol_id": "fa7bbd8f4b64a55a5088640c30f52e84075d65f531bd7e1f6c1d7bb8d24fcbf2", + "dst_ref": "HealthRegistry.contributor_healths", + "resolution": "resolved", + "slice_id": "d3a88a7abf16359e903e809ffc24473658fdd8198f60641fe1584fc4ac663c31", + "root_symbol_id": "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "path_symbols": [ + "HealthRegistry.__init__", + "HealthRegistry._contributors", + "HealthRegistry.contributor_healths" + ], + "path_symbol_ids": [ + "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "fa7bbd8f4b64a55a5088640c30f52e84075d65f531bd7e1f6c1d7bb8d24fcbf2" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "26e6a24daa43407ba5340b74497c20153020e79f8d7828ae502aaec378dfcf75", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory.create calls time.monotonic", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlAppFactory.create:calls", + "span_start": 25, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "3fdd0a88d10225ee74f3b84ab57e13f09f5ccc72f00e31af9ae4655411c289c0", + "edge_type": "calls", + "src_symbol_id": "4af42c2a9275d652e710a98ec48b8247236b4453a093629f8958704ff6d3cb58", + "src_qname": "HttpControlAppFactory.create", + "dst_symbol_id": null, + "dst_ref": "time.monotonic", + "resolution": "partial", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory.create calls app.post", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlAppFactory.create:calls", + "span_start": 37, + "span_end": 37, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "0e545d4b5187db7bec5ceac03071d2ad68177550c42af748fee364639e533c90", + "edge_type": "calls", + "src_symbol_id": "4af42c2a9275d652e710a98ec48b8247236b4453a093629f8958704ff6d3cb58", + "src_qname": "HttpControlAppFactory.create", + "dst_symbol_id": null, + "dst_ref": "app.post", + "resolution": "partial", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory.create calls str", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlAppFactory.create:calls", + "span_start": 27, + "span_end": 27, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "2a87c51461e31cd556508cc37fdff37b4d24c26f7f1604db30af5e8f1bda96cb", + "edge_type": "calls", + "src_symbol_id": "4af42c2a9275d652e710a98ec48b8247236b4453a093629f8958704ff6d3cb58", + "src_qname": "HttpControlAppFactory.create", + "dst_symbol_id": null, + "dst_ref": "str", + "resolution": "partial", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": null, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": null, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": null, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "retrieval_report": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "vector", + "C0_SOURCE_CHUNKS": "vector", + "C4_SEMANTIC_ROLES": "vector", + "C2_DEPENDENCY_GRAPH": "vector", + "C3_ENTRYPOINTS": "vector" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 10, + "C3_ENTRYPOINTS": 10 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [] + } + }, + "fallback": { + "used": false, + "reason": null + }, + "retrieval_by_layer_ms": { + "C1_SYMBOL_CATALOG": 55, + "C0_SOURCE_CHUNKS": 28, + "C4_SEMANTIC_ROLES": 17, + "C2_DEPENDENCY_GRAPH": 55, + "C3_ENTRYPOINTS": 11 + } + } + }, + "diagnostics": { + "intent_correct": null, + "target_found": true, + "layers_used": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_sufficient": true, + "answer_mode": "normal", + "router_result": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "TRACE_FLOW", + "path_scope": [], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_resolution_status": "resolved" + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Покажи как проходит запрос /health в HttpControlAppFactory", + "sub_intent": "TRACE_FLOW", + "path_scope": [], + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C4_SEMANTIC_ROLES", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 10, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C3_ENTRYPOINTS", + "hit_count": 3, + "empty": false, + "fallback_used": false + } + ], + "empty_layers": [], + "evidence_gate_decision": { + "sufficient": true, + "failure_reasons": [], + "evidence_count": 37 + }, + "failure_reasons": [], + "timings_ms": { + "router": 0, + "retrieval": 169, + "pre_evidence_gate": 0, + "llm": 1342 + } + }, + "rag_rows": [ + { + "path": "src/app_runtime/control/http_app.py", + "content": "class HttpControlAppFactory\nHttpControlAppFactory", + "layer": "C1_SYMBOL_CATALOG", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "qname": "HttpControlAppFactory", + "kind": "class", + "signature": "HttpControlAppFactory", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "const HttpControlAppFactory\nHttpControlAppFactory = app_runtime.control.http_app.HttpControlAppFactory", + "layer": "C1_SYMBOL_CATALOG", + "title": "HttpControlAppFactory", + "span_start": 8, + "span_end": 8, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "9ee00379ee797cd2386e88a6e37dc69e3e31de9144fc4b95f0206cd1430e8983", + "qname": "HttpControlAppFactory", + "kind": "const", + "signature": "HttpControlAppFactory = app_runtime.control.http_app.HttpControlAppFactory", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlActionSet\nControlActionSet", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "qname": "ControlActionSet", + "kind": "class", + "signature": "ControlActionSet", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "const ControlPlaneService\nControlPlaneService = app_runtime.control.service.ControlPlaneService", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlPlaneService", + "span_start": 3, + "span_end": 3, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "217e8f044d1c01644bf7b81e5046af9e84469210c692a2fb0c476a19bb069ae1", + "qname": "ControlPlaneService", + "kind": "const", + "signature": "ControlPlaneService = app_runtime.control.service.ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/health.py", + "content": "method HealthContributor.health\nhealth(self)\nReturn contributor health state.", + "layer": "C1_SYMBOL_CATALOG", + "title": "HealthContributor.health", + "span_start": 9, + "span_end": 10, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "728cff18958d8a25e2661a0f08c83d68c3bbbfa8cef212b85dc0da2b11b3dc90", + "qname": "HealthContributor.health", + "kind": "method", + "signature": "health(self)", + "parent_symbol_id": "HealthContributor", + "package_or_module": "src.app_runtime.contracts.health", + "is_test": false, + "blob_sha": "6bd92611def7131e32d4dd34a8ed85e6cf3c67722ad27797032a632cb30dc097", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/health.py", + "content": "class HealthContributor\nHealthContributor(ABC)", + "layer": "C1_SYMBOL_CATALOG", + "title": "HealthContributor", + "span_start": 7, + "span_end": 10, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "db91ae387b89a2e9d83829754f27fa18a4055b3e72d7f31789a0b8e0bf5bba0b", + "qname": "HealthContributor", + "kind": "class", + "signature": "HealthContributor(ABC)", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.contracts.health", + "is_test": false, + "blob_sha": "6bd92611def7131e32d4dd34a8ed85e6cf3c67722ad27797032a632cb30dc097", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "const ControlActionSet\nControlActionSet = app_runtime.control.base.ControlActionSet", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlActionSet", + "span_start": 1, + "span_end": 1, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "767e4ac0d4224aeccb0783a38359d3c03899a876736eb83d99887c16ea07cc6c", + "qname": "ControlActionSet", + "kind": "const", + "signature": "ControlActionSet = app_runtime.control.base.ControlActionSet", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "const ControlChannel\nControlChannel = app_runtime.control.base.ControlChannel", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlChannel", + "span_start": 1, + "span_end": 1, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "268420f7aa4ed74082b9276cae0cded4f00bac090ffd58fa020a65be0fe19c27", + "qname": "ControlChannel", + "kind": "const", + "signature": "ControlChannel = app_runtime.control.base.ControlChannel", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel(ControlChannel):\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._timeout = timeout\n self._runner = UvicornThreadRunner(host, port, timeout)\n self._factory = HttpControlAppFactory()\n self._actions: ControlActionSet | None = None\n\n async def start(self, actions: ControlActionSet) -> None:\n self._actions = actions\n app = self._factory.create(self._health_response, self._action_response)\n await self._runner.start(app)\n\n async def stop(self) -> None:\n await self._runner.stop()\n\n @property\n def port(self) -> int:\n return self._runner.port\n\n async def _health_response(self) -> dict[str, object]:\n if self._actions is None:\n return {\"status\": \"unhealthy\", \"detail\": \"control actions are not configured\"}\n return await asyncio.wait_for(self._actions.health(), timeout=float(self._timeout))\n\n async def _action_response(self, action: str, _client_source: str = \"unknown\") -> JSONResponse:\n if self._actions is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"{action} handler is not configured\"}, status_code=404)\n callbacks = {\n \"start\": self._actions.start,\n \"stop\": self._actions.stop,\n \"status\": self._actions.status,\n }\n callback = callbacks.get(action)\n if callback is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"unsupported action: {action}\"}, status_code=404)\n action_timeout = max(float(self._timeout), 10.0) if action in {\"start\", \"stop\"} else float(self._timeout)\n try:\n detail = await asyncio.wait_for(callback(), timeout=action_timeout)\n except asyncio.TimeoutError:\n return JSONResponse(\n content={\"status\": \"accepted\", \"detail\": f\"{action} operation is still in progress\"},\n status_code=202,\n )\n except Exception as exc:\n return JSONResponse(content={\"status\": \"error\", \"detail\": str(exc)}, status_code=500)\n return JSONResponse(content={\"status\": \"ok\", \"detail\": detail or f\"{action} action accepted\"}, status_code=200)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_channel.py:HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "class UvicornThreadRunner:\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._host = host\n self._port = port\n self._timeout = timeout\n self._server: Server | None = None\n self._thread: Thread | None = None\n self._error: BaseException | None = None\n\n async def start(self, app: FastAPI) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._error = None\n config = Config(app=app, host=self._host, port=self._port, log_level=\"warning\")\n self._server = Server(config)\n self._thread = Thread(target=self._serve, name=\"plba-http-control\", daemon=True)\n self._thread.start()\n await self._wait_until_started()\n\n async def stop(self) -> None:\n if self._server is None or self._thread is None:\n return\n self._server.should_exit = True\n await asyncio.to_thread(self._thread.join, self._timeout)\n self._server = None\n self._thread = None\n\n @property\n def port(self) -> int:\n if self._server is None or not getattr(self._server, \"servers\", None):\n return self._port\n socket = self._server.servers[0].sockets[0]\n return int(socket.getsockname()[1])\n\n async def _wait_until_started(self) -> None:\n if self._server is None:\n raise RuntimeError(\"Server is not initialized\")\n deadline = asyncio.get_running_loop().time() + max(float(self._timeout), 1.0)\n while not self._server.started:\n if self._error is not None:\n raise RuntimeError(\"HTTP control server failed to start\") from self._error\n if asyncio.get_running_loop().time() >= deadline:\n raise TimeoutError(\"HTTP control server startup timed out\")\n await asyncio.sleep(0.05)\n\n def _serve(self) -> None:\n if self._server is None:\n return\n try:\n asyncio.run(self._server.serve())\n except BaseException as exc: # noqa: BLE001\n self._error = exc", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_runner.py:UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_runner", + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "class HttpControlAppFactory:\n def create(\n self,\n health_provider: Callable[[], Awaitable[HealthPayload]],\n action_provider: Callable[[str, str], Awaitable[JSONResponse]],\n ) -> FastAPI:\n app = FastAPI(title=\"PLBA Control API\")\n\n @app.middleware(\"http\")\n async def log_api_call(request: Request, call_next): # type: ignore[no-untyped-def]\n started = time.monotonic()\n response = await call_next(request)\n response.headers[\"X-Response-Time-Ms\"] = str(int((time.monotonic() - started) * 1000))\n return response\n\n @app.get(\"/health\")\n async def health() -> JSONResponse:\n payload = await health_provider()\n status_code = 200 if payload.get(\"status\") == \"ok\" else 503\n return JSONResponse(content=payload, status_code=status_code)\n\n @app.get(\"/actions/{action}\")\n @app.post(\"/actions/{action}\")\n async def action(action: str, request: Request) -> JSONResponse:\n client_source = self._client_source(request)\n if action in {\"start\", \"stop\"}:\n LOGGER.warning(\"Control action requested: /actions/%s client=%s\", action, client_source)\n return await action_provider(action, client_source)\n\n return app\n\n def _client_source(self, request: Request) -> str:\n explicit_header = request.headers.get(\"X-Client-Source\", \"\").strip()\n if explicit_header:\n return explicit_header\n user_agent = request.headers.get(\"User-Agent\", \"\").strip()\n if user_agent:\n return f\"user-agent:{user_agent}\"\n return \"unknown\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_app.py:HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/health.py", + "content": "class HealthContributor(ABC):\n @abstractmethod\n def health(self) -> WorkerHealth:\n \"\"\"Return contributor health state.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/contracts/health.py:HealthContributor", + "span_start": 7, + "span_end": 10, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.contracts.health", + "is_test": false, + "blob_sha": "6bd92611def7131e32d4dd34a8ed85e6cf3c67722ad27797032a632cb30dc097", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlChannel(ABC):\n @abstractmethod\n async def start(self, actions: ControlActionSet) -> None:\n \"\"\"Start the control channel and bind handlers.\"\"\"\n\n @abstractmethod\n async def stop(self) -> None:\n \"\"\"Stop the control channel and release resources.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\"ControlActionSet\", \"ControlChannel\", \"ControlPlaneService\", \"HttpControlChannel\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/__init__.py:1-5", + "span_start": 1, + "span_end": 5, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlActionSet:\n health: HealthHandler\n start: ActionHandler\n stop: ActionHandler\n status: ActionHandler", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "class ControlPlaneService:\n def __init__(self) -> None:\n self._channels: list[ControlChannel] = []\n\n def register_channel(self, channel: ControlChannel) -> None:\n self._channels.append(channel)\n\n def start(self, runtime: RuntimeManager) -> None:\n if not self._channels:\n return\n asyncio.run(self._start_async(runtime))\n\n def stop(self) -> None:\n if not self._channels:\n return\n asyncio.run(self._stop_async())\n\n def snapshot(self, runtime: RuntimeManager) -> dict[str, object]:\n health = runtime.current_health()\n return {\n \"runtime\": {\"state\": runtime._state.value},\n \"modules\": list(runtime.registry.modules),\n \"services\": runtime.services.snapshot(),\n \"workers\": runtime.workers.snapshot(),\n \"health\": runtime.health.snapshot(runtime.workers.healths()) | {\"status\": health[\"status\"]},\n \"config\": runtime.configuration.get(),\n }\n\n async def _start_async(self, runtime: RuntimeManager) -> None:\n actions = ControlActionSet(\n health=runtime.health_status,\n start=runtime.start_runtime,\n stop=runtime.stop_runtime,\n status=runtime.runtime_status,\n )\n for channel in self._channels:\n await channel.start(actions)\n\n async def _stop_async(self) -> None:\n for channel in reversed(self._channels):\n await channel.stop()", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/service.py:ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/health/registry.py", + "content": "HealthRegistry\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (2)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HealthRegistry", + "span_start": 8, + "span_end": 56, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 29, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd3390eb0ba29c9979466b9c2117238e0da3bb829eeb4d505cb34c9c3df7a8e8", + "symbol_name": "HealthRegistry", + "qname": "HealthRegistry", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 2, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "26e6a24daa43407ba5340b74497c20153020e79f8d7828ae502aaec378dfcf75", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/types.py", + "content": "HealthPayload\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "HealthPayload", + "span_start": 7, + "span_end": 11, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "392235d63ddf752d6e419cb8528c93fe070d1bc02d3c87ba6a897baac810cf5d", + "symbol_name": "HealthPayload", + "qname": "HealthPayload", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "448a02e4a432b5ab65b246b2bd24a32a6f127b9d2091ea73b53ee3c0a2f53bb3", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/contracts/health.py", + "content": "HealthContributor\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "HealthContributor", + "span_start": 7, + "span_end": 10, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "db91ae387b89a2e9d83829754f27fa18a4055b3e72d7f31789a0b8e0bf5bba0b", + "symbol_name": "HealthContributor", + "qname": "HealthContributor", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "6bd92611def7131e32d4dd34a8ed85e6cf3c67722ad27797032a632cb30dc097", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/health/registry.py", + "content": "HealthRegistry.__init__\n -> HealthRegistry._contributors\n -> HealthRegistry.register", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HealthRegistry.__init__:dataflow_slice", + "span_start": 10, + "span_end": 13, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "2381dfb339d541367c3251d2a610cac9d8b3f6bd6a352e119d00a93c5ccc2b7d", + "edge_type": "dataflow_slice", + "src_symbol_id": "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "src_qname": "HealthRegistry.__init__", + "dst_symbol_id": "a9e1f290c346c8bb1d67af0cafeebb5bcaf29c3ed7027e33c794532743df38f2", + "dst_ref": "HealthRegistry.register", + "resolution": "resolved", + "slice_id": "2381dfb339d541367c3251d2a610cac9d8b3f6bd6a352e119d00a93c5ccc2b7d", + "root_symbol_id": "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "path_symbols": [ + "HealthRegistry.__init__", + "HealthRegistry._contributors", + "HealthRegistry.register" + ], + "path_symbol_ids": [ + "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "a9e1f290c346c8bb1d67af0cafeebb5bcaf29c3ed7027e33c794532743df38f2" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "26e6a24daa43407ba5340b74497c20153020e79f8d7828ae502aaec378dfcf75", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/health/registry.py", + "content": "HealthRegistry.__init__\n -> HealthRegistry._contributors\n -> HealthRegistry.contributor_healths", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HealthRegistry.__init__:dataflow_slice", + "span_start": 10, + "span_end": 16, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d3a88a7abf16359e903e809ffc24473658fdd8198f60641fe1584fc4ac663c31", + "edge_type": "dataflow_slice", + "src_symbol_id": "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "src_qname": "HealthRegistry.__init__", + "dst_symbol_id": "fa7bbd8f4b64a55a5088640c30f52e84075d65f531bd7e1f6c1d7bb8d24fcbf2", + "dst_ref": "HealthRegistry.contributor_healths", + "resolution": "resolved", + "slice_id": "d3a88a7abf16359e903e809ffc24473658fdd8198f60641fe1584fc4ac663c31", + "root_symbol_id": "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "path_symbols": [ + "HealthRegistry.__init__", + "HealthRegistry._contributors", + "HealthRegistry.contributor_healths" + ], + "path_symbol_ids": [ + "e8ffd58441c231de43d9e86c31eb12303d4e2bf045b2acf13d1dfe78da01f8dc", + "fa7bbd8f4b64a55a5088640c30f52e84075d65f531bd7e1f6c1d7bb8d24fcbf2" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "26e6a24daa43407ba5340b74497c20153020e79f8d7828ae502aaec378dfcf75", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory.create calls time.monotonic", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlAppFactory.create:calls", + "span_start": 25, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3fdd0a88d10225ee74f3b84ab57e13f09f5ccc72f00e31af9ae4655411c289c0", + "edge_type": "calls", + "src_symbol_id": "4af42c2a9275d652e710a98ec48b8247236b4453a093629f8958704ff6d3cb58", + "src_qname": "HttpControlAppFactory.create", + "dst_symbol_id": null, + "dst_ref": "time.monotonic", + "resolution": "partial", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory.create calls app.post", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlAppFactory.create:calls", + "span_start": 37, + "span_end": 37, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "0e545d4b5187db7bec5ceac03071d2ad68177550c42af748fee364639e533c90", + "edge_type": "calls", + "src_symbol_id": "4af42c2a9275d652e710a98ec48b8247236b4453a093629f8958704ff6d3cb58", + "src_qname": "HttpControlAppFactory.create", + "dst_symbol_id": null, + "dst_ref": "app.post", + "resolution": "partial", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory.create calls str", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "HttpControlAppFactory.create:calls", + "span_start": 27, + "span_end": 27, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "2a87c51461e31cd556508cc37fdff37b4d24c26f7f1604db30af5e8f1bda96cb", + "edge_type": "calls", + "src_symbol_id": "4af42c2a9275d652e710a98ec48b8247236b4453a093629f8958704ff6d3cb58", + "src_qname": "HttpControlAppFactory.create", + "dst_symbol_id": null, + "dst_ref": "str", + "resolution": "partial", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "validation": { + "passed": true, + "action": "return", + "reasons": [] + }, + "steps": [ + { + "step": "router", + "status": "completed", + "timings_ms": { + "router": 0 + }, + "output": { + "intent": "CODE_QA", + "sub_intent": "TRACE_FLOW", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + } + }, + { + "step": "retrieval", + "status": "completed", + "timings_ms": { + "retrieval": 169 + }, + "output": { + "rag_count": 37, + "answer_path_rag_count": 37, + "resolved_symbol_status": "resolved", + "resolved_symbol": "HttpControlAppFactory", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "diagnostics": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "vector", + "C0_SOURCE_CHUNKS": "vector", + "C4_SEMANTIC_ROLES": "vector", + "C2_DEPENDENCY_GRAPH": "vector", + "C3_ENTRYPOINTS": "vector" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 10, + "C3_ENTRYPOINTS": 10 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [] + } + }, + "fallback": { + "used": false, + "reason": null + }, + "retrieval_by_layer_ms": { + "C1_SYMBOL_CATALOG": 55, + "C0_SOURCE_CHUNKS": 28, + "C4_SEMANTIC_ROLES": 17, + "C2_DEPENDENCY_GRAPH": 55, + "C3_ENTRYPOINTS": 11 + } + } + }, + { + "step": "pre_evidence_gate", + "status": "passed", + "timings_ms": { + "pre_evidence_gate": 0 + }, + "output": { + "passed": true, + "failure_reasons": [], + "degraded_message": "" + } + }, + { + "step": "llm", + "status": "completed", + "timings_ms": { + "llm": 1342 + }, + "output": { + "prompt_name": "code_qa_trace_flow_answer", + "answer_preview": "Поток выполнения запроса `/health` в `HttpControlAppFactory` выглядит следующим образом:\n\n1. Запрос приходит на маршрут `/health`.\n2. Контроллер вызывает метод `health()` внутри фабрики, который объявлен в классе `HttpControlAppFactory`.\n3. Внутри метода `health()` фабрика ожидает асинхронный резуль" + } + }, + { + "step": "post_evidence_gate", + "status": "passed", + "timings_ms": { + "post_evidence_gate": 0, + "repair": 0 + }, + "output": { + "passed": true, + "reasons": [], + "repair_used": false + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-health-endpoint.md b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-health-endpoint.md new file mode 100644 index 0000000..6cafd6c --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-health-endpoint.md @@ -0,0 +1,248 @@ +# plba-v2-trace-flow-health-endpoint + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: agent_runtime +- mode: full_chain +- passed: True + +## Query +Покажи как проходит запрос /health в HttpControlAppFactory + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "TRACE_FLOW", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 37, + "llm_answer": "Поток выполнения запроса `/health` в `HttpControlAppFactory` выглядит следующим образом:\n\n1. Запрос приходит на маршрут `/health`.\n2. Контроллер вызывает метод `health()` внутри фабрики, который объявлен в классе `HttpControlAppFactory`.\n3. Внутри метода `health()` фабрика ожидает асинхронный результат от провайдера здоровья (`health_provider`), представляющего состояние системы.\n4. Результат передается в виде объекта `HealthPayload`, содержащего статус (\"ok\" или иное).\n5. На основе статуса определяется HTTP-код ответа: 200 при успешном состоянии, иначе 503.\n6. Ответ формируется с использованием JSON формата.\n\nТаким образом, ключевой элемент — провайдер здоровья, определяющий текущее состояние системы и возвращающий соответствующий объект состояния.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "health", + "HttpControlAppFactory" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] +} + +## Steps +[ + { + "step": "router", + "status": "completed", + "timings_ms": { + "router": 0 + }, + "output": { + "intent": "CODE_QA", + "sub_intent": "TRACE_FLOW", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + } + }, + { + "step": "retrieval", + "status": "completed", + "timings_ms": { + "retrieval": 169 + }, + "output": { + "rag_count": 37, + "answer_path_rag_count": 37, + "resolved_symbol_status": "resolved", + "resolved_symbol": "HttpControlAppFactory", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "diagnostics": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "vector", + "C0_SOURCE_CHUNKS": "vector", + "C4_SEMANTIC_ROLES": "vector", + "C2_DEPENDENCY_GRAPH": "vector", + "C3_ENTRYPOINTS": "vector" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 10, + "C3_ENTRYPOINTS": 10 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [] + } + }, + "fallback": { + "used": false, + "reason": null + }, + "retrieval_by_layer_ms": { + "C1_SYMBOL_CATALOG": 55, + "C0_SOURCE_CHUNKS": 28, + "C4_SEMANTIC_ROLES": 17, + "C2_DEPENDENCY_GRAPH": 55, + "C3_ENTRYPOINTS": 11 + } + } + }, + { + "step": "pre_evidence_gate", + "status": "passed", + "timings_ms": { + "pre_evidence_gate": 0 + }, + "output": { + "passed": true, + "failure_reasons": [], + "degraded_message": "" + } + }, + { + "step": "llm", + "status": "completed", + "timings_ms": { + "llm": 1342 + }, + "output": { + "prompt_name": "code_qa_trace_flow_answer", + "answer_preview": "Поток выполнения запроса `/health` в `HttpControlAppFactory` выглядит следующим образом:\n\n1. Запрос приходит на маршрут `/health`.\n2. Контроллер вызывает метод `health()` внутри фабрики, который объявлен в классе `HttpControlAppFactory`.\n3. Внутри метода `health()` фабрика ожидает асинхронный резуль" + } + }, + { + "step": "post_evidence_gate", + "status": "passed", + "timings_ms": { + "post_evidence_gate": 0, + "repair": 0 + }, + "output": { + "passed": true, + "reasons": [], + "repair_used": false + } + } +] + +## Diagnostics +{ + "intent_correct": null, + "target_found": true, + "layers_used": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_sufficient": true, + "answer_mode": "normal", + "router_result": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "TRACE_FLOW", + "path_scope": [], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_resolution_status": "resolved" + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Покажи как проходит запрос /health в HttpControlAppFactory", + "sub_intent": "TRACE_FLOW", + "path_scope": [], + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C4_SEMANTIC_ROLES", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 10, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C3_ENTRYPOINTS", + "hit_count": 3, + "empty": false, + "fallback_used": false + } + ], + "empty_layers": [], + "evidence_gate_decision": { + "sufficient": true, + "failure_reasons": [], + "evidence_count": 37 + }, + "failure_reasons": [], + "timings_ms": { + "router": 0, + "retrieval": 169, + "pre_evidence_gate": 0, + "llm": 1342 + } +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-runtime-start.json b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-runtime-start.json new file mode 100644 index 0000000..f9f57c2 --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-runtime-start.json @@ -0,0 +1,4999 @@ +{ + "case_id": "plba-v2-trace-flow-runtime-start", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", + "runner": "agent_runtime", + "mode": "full_chain", + "query": "Покажи поток выполнения при запуске RuntimeManager", + "actual": { + "intent": "CODE_QA", + "sub_intent": "TRACE_FLOW", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 37, + "llm_answer": "При запуске `RuntimeManager` выполняются следующие основные шаги:\n\n1. В `bootstrap.py` создаётся экземпляр `RuntimeManager`.\n2. В `core/runtime.py` инициализируется объект `RuntimeManager`, вызывая его конструктор.\n3. Далее выполняется регистрация базовых сервисов через метод `_register_core_services`.\n4. Запускаются каналы управления с помощью метода `start` объекта `ControlPlaneService`.\n5. Каналы управления начинают свою работу через асинхронный запуск метода `_start_async`.\n6. Управление веб-приложением осуществляется через создание экземпляра `HttpControlChannel`, который использует сервер `UvicornThreadRunner` для запуска HTTP приложения.\n\nПолностью проследить весь поток данных не удалось из-за недостаточного количества информации.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": true, + "mismatches": [], + "details": { + "query": "Покажи поток выполнения при запуске RuntimeManager", + "router_result": { + "schema_version": "1.1", + "intent": "CODE_QA", + "retrieval_profile": "code", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "query_plan": { + "raw": "Покажи поток выполнения при запуске RuntimeManager", + "normalized": "Покажи поток выполнения при запуске RuntimeManager", + "sub_intent": "TRACE_FLOW", + "negations": [], + "expansions": [ + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "doc_scope_hints": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "symbol_kind_hint": "class", + "anchors": [ + { + "type": "SYMBOL", + "value": "RuntimeManager", + "source": "user_text", + "subtype": null, + "span": { + "start": 36, + "end": 50 + }, + "confidence": 0.88 + } + ] + }, + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "top_k": 8 + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 8 + }, + { + "layer_id": "C4_SEMANTIC_ROLES", + "top_k": 8 + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "top_k": 10 + }, + { + "layer_id": "C3_ENTRYPOINTS", + "top_k": 10 + } + ], + "filters": { + "test_policy": "EXCLUDE", + "path_scope": [], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + }, + "symbol_resolution": { + "status": "resolved", + "resolved_symbol": "RuntimeManager", + "alternatives": [ + "RuntimeManager", + "RuntimeManager", + "RuntimeManager", + "RuntimeManager", + "RuntimeManager" + ], + "confidence": 0.99 + }, + "evidence_policy": { + "require_def": true, + "require_flow": true, + "require_spec": false, + "allow_answer_without_evidence": false + } + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Покажи поток выполнения при запуске RuntimeManager", + "sub_intent": "TRACE_FLOW", + "path_scope": [], + "keyword_hints": [ + "RuntimeManager" + ], + "symbol_candidates": [ + "RuntimeManager" + ], + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_spec": { + "domains": [ + "CODE" + ], + "layer_queries": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "top_k": 8 + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "top_k": 8 + }, + { + "layer_id": "C4_SEMANTIC_ROLES", + "top_k": 8 + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "top_k": 10 + }, + { + "layer_id": "C3_ENTRYPOINTS", + "top_k": 10 + } + ], + "filters": { + "test_policy": "EXCLUDE", + "path_scope": [], + "language": [ + "python" + ] + }, + "rerank_profile": "code" + }, + "retrieval_constraints": { + "include_globs": [ + "src/**" + ], + "exclude_globs": [ + "tests/**", + "**/test_*.py", + "**/*_test.py" + ], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": { + "enabled": true, + "max_distance": 2, + "top_k": 5 + } + }, + "query_plan": { + "raw": "Покажи поток выполнения при запуске RuntimeManager", + "normalized": "Покажи поток выполнения при запуске RuntimeManager", + "sub_intent": "TRACE_FLOW", + "negations": [], + "expansions": [ + "RuntimeManager" + ], + "keyword_hints": [ + "RuntimeManager" + ], + "path_hints": [], + "doc_scope_hints": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "symbol_kind_hint": "class", + "anchors": [ + { + "type": "SYMBOL", + "value": "RuntimeManager", + "source": "user_text", + "subtype": null, + "span": { + "start": 36, + "end": 50 + }, + "confidence": 0.88 + } + ] + } + }, + "retrieval_result": { + "target_symbol_candidates": [ + "RuntimeManager", + "ControlPlaneService", + "ControlChannel.start", + "ControlChannel.stop" + ], + "resolved_symbol": "RuntimeManager", + "symbol_resolution_status": "resolved", + "file_candidates": [ + "src/plba/bootstrap.py", + "src/app_runtime/control/service.py", + "src/app_runtime/core/runtime.py", + "src/plba/__init__.py", + "src/plba/core.py", + "src/app_runtime/control/__init__.py", + "src/app_runtime/control/base.py", + "src/app_runtime/control/http_runner.py", + "src/app_runtime/control/http_app.py", + "src/app_runtime/control/http_channel.py", + "src/plba/control.py", + "src/app_runtime/workflow/persistence/workflow_persistence.py" + ], + "code_chunks": [ + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/plba/bootstrap.py", + "title": "RuntimeManager", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "start_line": 4, + "end_line": 4, + "metadata": { + "symbol_id": "27158ca220022eeb5083c6addf8a50775d45f7161284fd60aac48410105f4b98", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/service.py", + "title": "RuntimeManager", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "start_line": 9, + "end_line": 9, + "metadata": { + "symbol_id": "62a9575c77aad894120d18b4f2a08cf2ba42f77e9be4a8a432b767d157701afe", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/core/runtime.py", + "title": "RuntimeManager", + "content": "class RuntimeManager\nRuntimeManager", + "start_line": 18, + "end_line": 179, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "qname": "RuntimeManager", + "kind": "class", + "signature": "RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/plba/__init__.py", + "title": "RuntimeManager", + "content": "const RuntimeManager\nRuntimeManager = plba.core.RuntimeManager", + "start_line": 16, + "end_line": 16, + "metadata": { + "symbol_id": "7eacec84f9b8d6c4201374591faecdac7493091c263681495c338973f2971ad9", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = plba.core.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/plba/core.py", + "title": "RuntimeManager", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "start_line": 2, + "end_line": 2, + "metadata": { + "symbol_id": "e1684562d978b7af7fe9b27dc5869d770348a87b5dc19a50360f58544668578b", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.core", + "is_test": false, + "blob_sha": "c0ae25110d20e665216616e26b68adfe035b624ba45d31d1272fb21f906f9ca8", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/__init__.py", + "title": "ControlPlaneService", + "content": "const ControlPlaneService\nControlPlaneService = app_runtime.control.service.ControlPlaneService", + "start_line": 3, + "end_line": 3, + "metadata": { + "symbol_id": "217e8f044d1c01644bf7b81e5046af9e84469210c692a2fb0c476a19bb069ae1", + "qname": "ControlPlaneService", + "kind": "const", + "signature": "ControlPlaneService = app_runtime.control.service.ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/base.py", + "title": "ControlChannel.start", + "content": "method ControlChannel.start\nstart(self, actions)\nStart the control channel and bind handlers.", + "start_line": 23, + "end_line": 24, + "metadata": { + "symbol_id": "e01e0d50d0f48d0c84c119c989b7a7c57ceea263811ce2605c684ae24d1a03b1", + "qname": "ControlChannel.start", + "kind": "method", + "signature": "start(self, actions)", + "parent_symbol_id": "ControlChannel", + "package_or_module": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C1_SYMBOL_CATALOG", + "path": "src/app_runtime/control/base.py", + "title": "ControlChannel.stop", + "content": "method ControlChannel.stop\nstop(self)\nStop the control channel and release resources.", + "start_line": 27, + "end_line": 28, + "metadata": { + "symbol_id": "54b5adf9866c526836221dc721b474ba23fbec83e1b1d3b8bc4da67ae3c1541d", + "qname": "ControlChannel.stop", + "kind": "method", + "signature": "stop(self)", + "parent_symbol_id": "ControlChannel", + "package_or_module": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/service.py", + "title": "src/app_runtime/control/service.py:ControlPlaneService", + "content": "class ControlPlaneService:\n def __init__(self) -> None:\n self._channels: list[ControlChannel] = []\n\n def register_channel(self, channel: ControlChannel) -> None:\n self._channels.append(channel)\n\n def start(self, runtime: RuntimeManager) -> None:\n if not self._channels:\n return\n asyncio.run(self._start_async(runtime))\n\n def stop(self) -> None:\n if not self._channels:\n return\n asyncio.run(self._stop_async())\n\n def snapshot(self, runtime: RuntimeManager) -> dict[str, object]:\n health = runtime.current_health()\n return {\n \"runtime\": {\"state\": runtime._state.value},\n \"modules\": list(runtime.registry.modules),\n \"services\": runtime.services.snapshot(),\n \"workers\": runtime.workers.snapshot(),\n \"health\": runtime.health.snapshot(runtime.workers.healths()) | {\"status\": health[\"status\"]},\n \"config\": runtime.configuration.get(),\n }\n\n async def _start_async(self, runtime: RuntimeManager) -> None:\n actions = ControlActionSet(\n health=runtime.health_status,\n start=runtime.start_runtime,\n stop=runtime.stop_runtime,\n status=runtime.runtime_status,\n )\n for channel in self._channels:\n await channel.start(actions)\n\n async def _stop_async(self) -> None:\n for channel in reversed(self._channels):\n await channel.stop()", + "start_line": 12, + "end_line": 52, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/http_runner.py", + "title": "src/app_runtime/control/http_runner.py:UvicornThreadRunner", + "content": "class UvicornThreadRunner:\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._host = host\n self._port = port\n self._timeout = timeout\n self._server: Server | None = None\n self._thread: Thread | None = None\n self._error: BaseException | None = None\n\n async def start(self, app: FastAPI) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._error = None\n config = Config(app=app, host=self._host, port=self._port, log_level=\"warning\")\n self._server = Server(config)\n self._thread = Thread(target=self._serve, name=\"plba-http-control\", daemon=True)\n self._thread.start()\n await self._wait_until_started()\n\n async def stop(self) -> None:\n if self._server is None or self._thread is None:\n return\n self._server.should_exit = True\n await asyncio.to_thread(self._thread.join, self._timeout)\n self._server = None\n self._thread = None\n\n @property\n def port(self) -> int:\n if self._server is None or not getattr(self._server, \"servers\", None):\n return self._port\n socket = self._server.servers[0].sockets[0]\n return int(socket.getsockname()[1])\n\n async def _wait_until_started(self) -> None:\n if self._server is None:\n raise RuntimeError(\"Server is not initialized\")\n deadline = asyncio.get_running_loop().time() + max(float(self._timeout), 1.0)\n while not self._server.started:\n if self._error is not None:\n raise RuntimeError(\"HTTP control server failed to start\") from self._error\n if asyncio.get_running_loop().time() >= deadline:\n raise TimeoutError(\"HTTP control server startup timed out\")\n await asyncio.sleep(0.05)\n\n def _serve(self) -> None:\n if self._server is None:\n return\n try:\n asyncio.run(self._server.serve())\n except BaseException as exc: # noqa: BLE001\n self._error = exc", + "start_line": 10, + "end_line": 61, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_runner", + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/base.py", + "title": "src/app_runtime/control/base.py:ControlChannel", + "content": "class ControlChannel(ABC):\n @abstractmethod\n async def start(self, actions: ControlActionSet) -> None:\n \"\"\"Start the control channel and bind handlers.\"\"\"\n\n @abstractmethod\n async def stop(self) -> None:\n \"\"\"Stop the control channel and release resources.\"\"\"", + "start_line": 21, + "end_line": 28, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/__init__.py", + "title": "src/app_runtime/control/__init__.py:1-5", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\"ControlActionSet\", \"ControlChannel\", \"ControlPlaneService\", \"HttpControlChannel\"]", + "start_line": 1, + "end_line": 5, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/http_app.py", + "title": "src/app_runtime/control/http_app.py:HttpControlAppFactory", + "content": "class HttpControlAppFactory:\n def create(\n self,\n health_provider: Callable[[], Awaitable[HealthPayload]],\n action_provider: Callable[[str, str], Awaitable[JSONResponse]],\n ) -> FastAPI:\n app = FastAPI(title=\"PLBA Control API\")\n\n @app.middleware(\"http\")\n async def log_api_call(request: Request, call_next): # type: ignore[no-untyped-def]\n started = time.monotonic()\n response = await call_next(request)\n response.headers[\"X-Response-Time-Ms\"] = str(int((time.monotonic() - started) * 1000))\n return response\n\n @app.get(\"/health\")\n async def health() -> JSONResponse:\n payload = await health_provider()\n status_code = 200 if payload.get(\"status\") == \"ok\" else 503\n return JSONResponse(content=payload, status_code=status_code)\n\n @app.get(\"/actions/{action}\")\n @app.post(\"/actions/{action}\")\n async def action(action: str, request: Request) -> JSONResponse:\n client_source = self._client_source(request)\n if action in {\"start\", \"stop\"}:\n LOGGER.warning(\"Control action requested: /actions/%s client=%s\", action, client_source)\n return await action_provider(action, client_source)\n\n return app\n\n def _client_source(self, request: Request) -> str:\n explicit_header = request.headers.get(\"X-Client-Source\", \"\").strip()\n if explicit_header:\n return explicit_header\n user_agent = request.headers.get(\"User-Agent\", \"\").strip()\n if user_agent:\n return f\"user-agent:{user_agent}\"\n return \"unknown\"", + "start_line": 15, + "end_line": 53, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/http_channel.py", + "title": "src/app_runtime/control/http_channel.py:HttpControlChannel", + "content": "class HttpControlChannel(ControlChannel):\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._timeout = timeout\n self._runner = UvicornThreadRunner(host, port, timeout)\n self._factory = HttpControlAppFactory()\n self._actions: ControlActionSet | None = None\n\n async def start(self, actions: ControlActionSet) -> None:\n self._actions = actions\n app = self._factory.create(self._health_response, self._action_response)\n await self._runner.start(app)\n\n async def stop(self) -> None:\n await self._runner.stop()\n\n @property\n def port(self) -> int:\n return self._runner.port\n\n async def _health_response(self) -> dict[str, object]:\n if self._actions is None:\n return {\"status\": \"unhealthy\", \"detail\": \"control actions are not configured\"}\n return await asyncio.wait_for(self._actions.health(), timeout=float(self._timeout))\n\n async def _action_response(self, action: str, _client_source: str = \"unknown\") -> JSONResponse:\n if self._actions is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"{action} handler is not configured\"}, status_code=404)\n callbacks = {\n \"start\": self._actions.start,\n \"stop\": self._actions.stop,\n \"status\": self._actions.status,\n }\n callback = callbacks.get(action)\n if callback is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"unsupported action: {action}\"}, status_code=404)\n action_timeout = max(float(self._timeout), 10.0) if action in {\"start\", \"stop\"} else float(self._timeout)\n try:\n detail = await asyncio.wait_for(callback(), timeout=action_timeout)\n except asyncio.TimeoutError:\n return JSONResponse(\n content={\"status\": \"accepted\", \"detail\": f\"{action} operation is still in progress\"},\n status_code=202,\n )\n except Exception as exc:\n return JSONResponse(content={\"status\": \"error\", \"detail\": str(exc)}, status_code=500)\n return JSONResponse(content={\"status\": \"ok\", \"detail\": detail or f\"{action} action accepted\"}, status_code=200)", + "start_line": 12, + "end_line": 57, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/app_runtime/control/base.py", + "title": "src/app_runtime/control/base.py:ControlActionSet", + "content": "class ControlActionSet:\n health: HealthHandler\n start: ActionHandler\n stop: ActionHandler\n status: ActionHandler", + "start_line": 14, + "end_line": 18, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C0_SOURCE_CHUNKS", + "path": "src/plba/control.py", + "title": "src/plba/control.py:1-10", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\n \"ControlActionSet\",\n \"ControlChannel\",\n \"ControlPlaneService\",\n \"HttpControlChannel\",\n]", + "start_line": 1, + "end_line": 10, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.control", + "is_test": false, + "blob_sha": "31bd5c4481bfa7fbca8fae56d4860a67e3953ca74474ac8439e1f39b685d7bc8", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/core/runtime.py", + "title": "RuntimeManager", + "content": "RuntimeManager\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests manager\n- orchestrates role-like calls (4)\n- reads and writes state attributes\n- participates in dataflow slices (50)", + "start_line": 18, + "end_line": 179, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "symbol_name": "RuntimeManager", + "qname": "RuntimeManager", + "role": "pipeline_stage", + "confidence": 0.67, + "dataflow_participation": 50, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/base.py", + "title": "ControlChannel", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "start_line": 21, + "end_line": 28, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/base.py", + "title": "ControlActionSet", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "start_line": 14, + "end_line": 18, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "start_line": 12, + "end_line": 52, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/http_runner.py", + "title": "UvicornThreadRunner", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "start_line": 10, + "end_line": 61, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/http_channel.py", + "title": "HttpControlChannel", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "start_line": 12, + "end_line": 57, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/control/http_app.py", + "title": "HttpControlAppFactory", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "start_line": 15, + "end_line": 53, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "title": "WorkflowPersistence", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "start_line": 8, + "end_line": 54, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/core/runtime.py", + "title": "RuntimeManager.__init__:dataflow_slice", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file", + "start_line": 32, + "end_line": 52, + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/core/runtime.py", + "title": "RuntimeManager.__init__:dataflow_slice", + "content": "RuntimeManager.__init__\n -> RuntimeManager.services\n -> RuntimeManager.__init__", + "start_line": 33, + "end_line": 39, + "metadata": { + "edge_id": "d43af85989222ee6d788ce418cdcb217c7ff044cfb915e3bdbd184417dc7bd61", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "dst_ref": "RuntimeManager.__init__", + "resolution": "resolved", + "slice_id": "d43af85989222ee6d788ce418cdcb217c7ff044cfb915e3bdbd184417dc7bd61", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.services", + "RuntimeManager.__init__" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "start_line": 14, + "end_line": 25, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "start_line": 14, + "end_line": 51, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/core/runtime.py", + "title": "RuntimeManager.__init__:dataflow_slice", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.start", + "start_line": 32, + "end_line": 59, + "metadata": { + "edge_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1", + "dst_ref": "RuntimeManager.start", + "resolution": "resolved", + "slice_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.start" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/core/runtime.py", + "title": "RuntimeManager.__init__:dataflow_slice", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager._register_core_services", + "start_line": 32, + "end_line": 127, + "metadata": { + "edge_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6", + "dst_ref": "RuntimeManager._register_core_services", + "resolution": "resolved", + "slice_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager._register_core_services" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "start_line": 14, + "end_line": 17, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "start_line": 14, + "end_line": 20, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService.__init__:dataflow_slice", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "start_line": 14, + "end_line": 47, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/app_runtime/core/runtime.py", + "title": "RuntimeManager.__init__:dataflow_slice", + "content": "RuntimeManager.__init__\n -> RuntimeManager.services\n -> RuntimeManager._register_core_services", + "start_line": 33, + "end_line": 127, + "metadata": { + "edge_id": "aac6f9dda73963b977083a892bee39a48eca4fbd7404787e022ecf4ebedec65d", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6", + "dst_ref": "RuntimeManager._register_core_services", + "resolution": "resolved", + "slice_id": "aac6f9dda73963b977083a892bee39a48eca4fbd7404787e022ecf4ebedec65d", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.services", + "RuntimeManager._register_core_services" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C3_ENTRYPOINTS", + "path": "src/app_runtime/control/http_app.py", + "title": "app.post", + "content": "fastapi http app.post", + "start_line": 38, + "end_line": 42, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C3_ENTRYPOINTS", + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "content": "fastapi http app.get", + "start_line": 31, + "end_line": 34, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "layer": "C3_ENTRYPOINTS", + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "content": "fastapi http app.get", + "start_line": 38, + "end_line": 42, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "relations": [ + { + "path": "src/app_runtime/core/runtime.py", + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file" + }, + { + "path": "src/app_runtime/core/runtime.py", + "metadata": { + "edge_id": "d43af85989222ee6d788ce418cdcb217c7ff044cfb915e3bdbd184417dc7bd61", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "dst_ref": "RuntimeManager.__init__", + "resolution": "resolved", + "slice_id": "d43af85989222ee6d788ce418cdcb217c7ff044cfb915e3bdbd184417dc7bd61", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.services", + "RuntimeManager.__init__" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "RuntimeManager.__init__\n -> RuntimeManager.services\n -> RuntimeManager.__init__" + }, + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop" + }, + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async" + }, + { + "path": "src/app_runtime/core/runtime.py", + "metadata": { + "edge_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1", + "dst_ref": "RuntimeManager.start", + "resolution": "resolved", + "slice_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.start" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.start" + }, + { + "path": "src/app_runtime/core/runtime.py", + "metadata": { + "edge_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6", + "dst_ref": "RuntimeManager._register_core_services", + "resolution": "resolved", + "slice_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager._register_core_services" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager._register_core_services" + }, + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel" + }, + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start" + }, + { + "path": "src/app_runtime/control/service.py", + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async" + }, + { + "path": "src/app_runtime/core/runtime.py", + "metadata": { + "edge_id": "aac6f9dda73963b977083a892bee39a48eca4fbd7404787e022ecf4ebedec65d", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6", + "dst_ref": "RuntimeManager._register_core_services", + "resolution": "resolved", + "slice_id": "aac6f9dda73963b977083a892bee39a48eca4fbd7404787e022ecf4ebedec65d", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.services", + "RuntimeManager._register_core_services" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + }, + "content": "RuntimeManager.__init__\n -> RuntimeManager.services\n -> RuntimeManager._register_core_services" + } + ], + "entrypoints": [ + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.post", + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.get", + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "test_candidates": [], + "layer_outcomes": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C4_SEMANTIC_ROLES", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 10, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C3_ENTRYPOINTS", + "hit_count": 3, + "empty": false, + "fallback_used": false + } + ], + "missing_layers": [], + "raw_rows": [ + { + "path": "src/plba/bootstrap.py", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 4, + "span_end": 4, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "27158ca220022eeb5083c6addf8a50775d45f7161284fd60aac48410105f4b98", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 9, + "span_end": 9, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "62a9575c77aad894120d18b4f2a08cf2ba42f77e9be4a8a432b767d157701afe", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager\nRuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "qname": "RuntimeManager", + "kind": "class", + "signature": "RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/__init__.py", + "content": "const RuntimeManager\nRuntimeManager = plba.core.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 16, + "span_end": 16, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "7eacec84f9b8d6c4201374591faecdac7493091c263681495c338973f2971ad9", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = plba.core.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/core.py", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 2, + "span_end": 2, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "e1684562d978b7af7fe9b27dc5869d770348a87b5dc19a50360f58544668578b", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.core", + "is_test": false, + "blob_sha": "c0ae25110d20e665216616e26b68adfe035b624ba45d31d1272fb21f906f9ca8", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "const ControlPlaneService\nControlPlaneService = app_runtime.control.service.ControlPlaneService", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlPlaneService", + "span_start": 3, + "span_end": 3, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "217e8f044d1c01644bf7b81e5046af9e84469210c692a2fb0c476a19bb069ae1", + "qname": "ControlPlaneService", + "kind": "const", + "signature": "ControlPlaneService = app_runtime.control.service.ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "method ControlChannel.start\nstart(self, actions)\nStart the control channel and bind handlers.", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlChannel.start", + "span_start": 23, + "span_end": 24, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "e01e0d50d0f48d0c84c119c989b7a7c57ceea263811ce2605c684ae24d1a03b1", + "qname": "ControlChannel.start", + "kind": "method", + "signature": "start(self, actions)", + "parent_symbol_id": "ControlChannel", + "package_or_module": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "method ControlChannel.stop\nstop(self)\nStop the control channel and release resources.", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlChannel.stop", + "span_start": 27, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": null, + "metadata": { + "symbol_id": "54b5adf9866c526836221dc721b474ba23fbec83e1b1d3b8bc4da67ae3c1541d", + "qname": "ControlChannel.stop", + "kind": "method", + "signature": "stop(self)", + "parent_symbol_id": "ControlChannel", + "package_or_module": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "class ControlPlaneService:\n def __init__(self) -> None:\n self._channels: list[ControlChannel] = []\n\n def register_channel(self, channel: ControlChannel) -> None:\n self._channels.append(channel)\n\n def start(self, runtime: RuntimeManager) -> None:\n if not self._channels:\n return\n asyncio.run(self._start_async(runtime))\n\n def stop(self) -> None:\n if not self._channels:\n return\n asyncio.run(self._stop_async())\n\n def snapshot(self, runtime: RuntimeManager) -> dict[str, object]:\n health = runtime.current_health()\n return {\n \"runtime\": {\"state\": runtime._state.value},\n \"modules\": list(runtime.registry.modules),\n \"services\": runtime.services.snapshot(),\n \"workers\": runtime.workers.snapshot(),\n \"health\": runtime.health.snapshot(runtime.workers.healths()) | {\"status\": health[\"status\"]},\n \"config\": runtime.configuration.get(),\n }\n\n async def _start_async(self, runtime: RuntimeManager) -> None:\n actions = ControlActionSet(\n health=runtime.health_status,\n start=runtime.start_runtime,\n stop=runtime.stop_runtime,\n status=runtime.runtime_status,\n )\n for channel in self._channels:\n await channel.start(actions)\n\n async def _stop_async(self) -> None:\n for channel in reversed(self._channels):\n await channel.stop()", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/service.py:ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "class UvicornThreadRunner:\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._host = host\n self._port = port\n self._timeout = timeout\n self._server: Server | None = None\n self._thread: Thread | None = None\n self._error: BaseException | None = None\n\n async def start(self, app: FastAPI) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._error = None\n config = Config(app=app, host=self._host, port=self._port, log_level=\"warning\")\n self._server = Server(config)\n self._thread = Thread(target=self._serve, name=\"plba-http-control\", daemon=True)\n self._thread.start()\n await self._wait_until_started()\n\n async def stop(self) -> None:\n if self._server is None or self._thread is None:\n return\n self._server.should_exit = True\n await asyncio.to_thread(self._thread.join, self._timeout)\n self._server = None\n self._thread = None\n\n @property\n def port(self) -> int:\n if self._server is None or not getattr(self._server, \"servers\", None):\n return self._port\n socket = self._server.servers[0].sockets[0]\n return int(socket.getsockname()[1])\n\n async def _wait_until_started(self) -> None:\n if self._server is None:\n raise RuntimeError(\"Server is not initialized\")\n deadline = asyncio.get_running_loop().time() + max(float(self._timeout), 1.0)\n while not self._server.started:\n if self._error is not None:\n raise RuntimeError(\"HTTP control server failed to start\") from self._error\n if asyncio.get_running_loop().time() >= deadline:\n raise TimeoutError(\"HTTP control server startup timed out\")\n await asyncio.sleep(0.05)\n\n def _serve(self) -> None:\n if self._server is None:\n return\n try:\n asyncio.run(self._server.serve())\n except BaseException as exc: # noqa: BLE001\n self._error = exc", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_runner.py:UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_runner", + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlChannel(ABC):\n @abstractmethod\n async def start(self, actions: ControlActionSet) -> None:\n \"\"\"Start the control channel and bind handlers.\"\"\"\n\n @abstractmethod\n async def stop(self) -> None:\n \"\"\"Stop the control channel and release resources.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\"ControlActionSet\", \"ControlChannel\", \"ControlPlaneService\", \"HttpControlChannel\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/__init__.py:1-5", + "span_start": 1, + "span_end": 5, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "class HttpControlAppFactory:\n def create(\n self,\n health_provider: Callable[[], Awaitable[HealthPayload]],\n action_provider: Callable[[str, str], Awaitable[JSONResponse]],\n ) -> FastAPI:\n app = FastAPI(title=\"PLBA Control API\")\n\n @app.middleware(\"http\")\n async def log_api_call(request: Request, call_next): # type: ignore[no-untyped-def]\n started = time.monotonic()\n response = await call_next(request)\n response.headers[\"X-Response-Time-Ms\"] = str(int((time.monotonic() - started) * 1000))\n return response\n\n @app.get(\"/health\")\n async def health() -> JSONResponse:\n payload = await health_provider()\n status_code = 200 if payload.get(\"status\") == \"ok\" else 503\n return JSONResponse(content=payload, status_code=status_code)\n\n @app.get(\"/actions/{action}\")\n @app.post(\"/actions/{action}\")\n async def action(action: str, request: Request) -> JSONResponse:\n client_source = self._client_source(request)\n if action in {\"start\", \"stop\"}:\n LOGGER.warning(\"Control action requested: /actions/%s client=%s\", action, client_source)\n return await action_provider(action, client_source)\n\n return app\n\n def _client_source(self, request: Request) -> str:\n explicit_header = request.headers.get(\"X-Client-Source\", \"\").strip()\n if explicit_header:\n return explicit_header\n user_agent = request.headers.get(\"User-Agent\", \"\").strip()\n if user_agent:\n return f\"user-agent:{user_agent}\"\n return \"unknown\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_app.py:HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel(ControlChannel):\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._timeout = timeout\n self._runner = UvicornThreadRunner(host, port, timeout)\n self._factory = HttpControlAppFactory()\n self._actions: ControlActionSet | None = None\n\n async def start(self, actions: ControlActionSet) -> None:\n self._actions = actions\n app = self._factory.create(self._health_response, self._action_response)\n await self._runner.start(app)\n\n async def stop(self) -> None:\n await self._runner.stop()\n\n @property\n def port(self) -> int:\n return self._runner.port\n\n async def _health_response(self) -> dict[str, object]:\n if self._actions is None:\n return {\"status\": \"unhealthy\", \"detail\": \"control actions are not configured\"}\n return await asyncio.wait_for(self._actions.health(), timeout=float(self._timeout))\n\n async def _action_response(self, action: str, _client_source: str = \"unknown\") -> JSONResponse:\n if self._actions is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"{action} handler is not configured\"}, status_code=404)\n callbacks = {\n \"start\": self._actions.start,\n \"stop\": self._actions.stop,\n \"status\": self._actions.status,\n }\n callback = callbacks.get(action)\n if callback is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"unsupported action: {action}\"}, status_code=404)\n action_timeout = max(float(self._timeout), 10.0) if action in {\"start\", \"stop\"} else float(self._timeout)\n try:\n detail = await asyncio.wait_for(callback(), timeout=action_timeout)\n except asyncio.TimeoutError:\n return JSONResponse(\n content={\"status\": \"accepted\", \"detail\": f\"{action} operation is still in progress\"},\n status_code=202,\n )\n except Exception as exc:\n return JSONResponse(content={\"status\": \"error\", \"detail\": str(exc)}, status_code=500)\n return JSONResponse(content={\"status\": \"ok\", \"detail\": detail or f\"{action} action accepted\"}, status_code=200)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_channel.py:HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlActionSet:\n health: HealthHandler\n start: ActionHandler\n stop: ActionHandler\n status: ActionHandler", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/control.py", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\n \"ControlActionSet\",\n \"ControlChannel\",\n \"ControlPlaneService\",\n \"HttpControlChannel\",\n]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/control.py:1-10", + "span_start": 1, + "span_end": 10, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": null, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.control", + "is_test": false, + "blob_sha": "31bd5c4481bfa7fbca8fae56d4860a67e3953ca74474ac8439e1f39b685d7bc8", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests manager\n- orchestrates role-like calls (4)\n- reads and writes state attributes\n- participates in dataflow slices (50)", + "layer": "C4_SEMANTIC_ROLES", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 43, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "symbol_name": "RuntimeManager", + "qname": "RuntimeManager", + "role": "pipeline_stage", + "confidence": 0.67, + "dataflow_participation": 50, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": null, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 52, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.services\n -> RuntimeManager.__init__", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 33, + "span_end": 39, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "d43af85989222ee6d788ce418cdcb217c7ff044cfb915e3bdbd184417dc7bd61", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "dst_ref": "RuntimeManager.__init__", + "resolution": "resolved", + "slice_id": "d43af85989222ee6d788ce418cdcb217c7ff044cfb915e3bdbd184417dc7bd61", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.services", + "RuntimeManager.__init__" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 59, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1", + "dst_ref": "RuntimeManager.start", + "resolution": "resolved", + "slice_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.start" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager._register_core_services", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 127, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6", + "dst_ref": "RuntimeManager._register_core_services", + "resolution": "resolved", + "slice_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager._register_core_services" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.services\n -> RuntimeManager._register_core_services", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 33, + "span_end": 127, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": null, + "metadata": { + "edge_id": "aac6f9dda73963b977083a892bee39a48eca4fbd7404787e022ecf4ebedec65d", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6", + "dst_ref": "RuntimeManager._register_core_services", + "resolution": "resolved", + "slice_id": "aac6f9dda73963b977083a892bee39a48eca4fbd7404787e022ecf4ebedec65d", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.services", + "RuntimeManager._register_core_services" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": null, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": null, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": null, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "retrieval_report": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "vector", + "C0_SOURCE_CHUNKS": "vector", + "C4_SEMANTIC_ROLES": "vector", + "C2_DEPENDENCY_GRAPH": "vector", + "C3_ENTRYPOINTS": "vector" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 10, + "C3_ENTRYPOINTS": 10 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [] + } + }, + "fallback": { + "used": false, + "reason": null + }, + "retrieval_by_layer_ms": { + "C1_SYMBOL_CATALOG": 39, + "C0_SOURCE_CHUNKS": 24, + "C4_SEMANTIC_ROLES": 13, + "C2_DEPENDENCY_GRAPH": 55, + "C3_ENTRYPOINTS": 20 + } + } + }, + "diagnostics": { + "intent_correct": null, + "target_found": true, + "layers_used": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_sufficient": true, + "answer_mode": "normal", + "router_result": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "TRACE_FLOW", + "path_scope": [], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_resolution_status": "resolved" + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Покажи поток выполнения при запуске RuntimeManager", + "sub_intent": "TRACE_FLOW", + "path_scope": [], + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C4_SEMANTIC_ROLES", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 10, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C3_ENTRYPOINTS", + "hit_count": 3, + "empty": false, + "fallback_used": false + } + ], + "empty_layers": [], + "evidence_gate_decision": { + "sufficient": true, + "failure_reasons": [], + "evidence_count": 37 + }, + "failure_reasons": [], + "timings_ms": { + "router": 0, + "retrieval": 153, + "pre_evidence_gate": 0, + "llm": 1356 + } + }, + "rag_rows": [ + { + "path": "src/plba/bootstrap.py", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 4, + "span_end": 4, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "27158ca220022eeb5083c6addf8a50775d45f7161284fd60aac48410105f4b98", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.bootstrap", + "is_test": false, + "blob_sha": "ce2dc59c27bacd29e0d219729b307c6851ab3aab1a115c2e0054a869affdcbbd", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 9, + "span_end": 9, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "62a9575c77aad894120d18b4f2a08cf2ba42f77e9be4a8a432b767d157701afe", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "class RuntimeManager\nRuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "qname": "RuntimeManager", + "kind": "class", + "signature": "RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.core.runtime", + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/__init__.py", + "content": "const RuntimeManager\nRuntimeManager = plba.core.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 16, + "span_end": 16, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "7eacec84f9b8d6c4201374591faecdac7493091c263681495c338973f2971ad9", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = plba.core.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.__init__", + "is_test": false, + "blob_sha": "24e755ec8c249d14fb0e675b5dbf2b71ab91afb9c849897eebfa9feb2499e19d", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/core.py", + "content": "const RuntimeManager\nRuntimeManager = app_runtime.core.runtime.RuntimeManager", + "layer": "C1_SYMBOL_CATALOG", + "title": "RuntimeManager", + "span_start": 2, + "span_end": 2, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "e1684562d978b7af7fe9b27dc5869d770348a87b5dc19a50360f58544668578b", + "qname": "RuntimeManager", + "kind": "const", + "signature": "RuntimeManager = app_runtime.core.runtime.RuntimeManager", + "parent_symbol_id": null, + "package_or_module": "src.plba.core", + "is_test": false, + "blob_sha": "c0ae25110d20e665216616e26b68adfe035b624ba45d31d1272fb21f906f9ca8", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "const ControlPlaneService\nControlPlaneService = app_runtime.control.service.ControlPlaneService", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlPlaneService", + "span_start": 3, + "span_end": 3, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "217e8f044d1c01644bf7b81e5046af9e84469210c692a2fb0c476a19bb069ae1", + "qname": "ControlPlaneService", + "kind": "const", + "signature": "ControlPlaneService = app_runtime.control.service.ControlPlaneService", + "parent_symbol_id": null, + "package_or_module": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "method ControlChannel.start\nstart(self, actions)\nStart the control channel and bind handlers.", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlChannel.start", + "span_start": 23, + "span_end": 24, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "e01e0d50d0f48d0c84c119c989b7a7c57ceea263811ce2605c684ae24d1a03b1", + "qname": "ControlChannel.start", + "kind": "method", + "signature": "start(self, actions)", + "parent_symbol_id": "ControlChannel", + "package_or_module": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "method ControlChannel.stop\nstop(self)\nStop the control channel and release resources.", + "layer": "C1_SYMBOL_CATALOG", + "title": "ControlChannel.stop", + "span_start": 27, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 1, + "distance": NaN, + "metadata": { + "symbol_id": "54b5adf9866c526836221dc721b474ba23fbec83e1b1d3b8bc4da67ae3c1541d", + "qname": "ControlChannel.stop", + "kind": "method", + "signature": "stop(self)", + "parent_symbol_id": "ControlChannel", + "package_or_module": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "class ControlPlaneService:\n def __init__(self) -> None:\n self._channels: list[ControlChannel] = []\n\n def register_channel(self, channel: ControlChannel) -> None:\n self._channels.append(channel)\n\n def start(self, runtime: RuntimeManager) -> None:\n if not self._channels:\n return\n asyncio.run(self._start_async(runtime))\n\n def stop(self) -> None:\n if not self._channels:\n return\n asyncio.run(self._stop_async())\n\n def snapshot(self, runtime: RuntimeManager) -> dict[str, object]:\n health = runtime.current_health()\n return {\n \"runtime\": {\"state\": runtime._state.value},\n \"modules\": list(runtime.registry.modules),\n \"services\": runtime.services.snapshot(),\n \"workers\": runtime.workers.snapshot(),\n \"health\": runtime.health.snapshot(runtime.workers.healths()) | {\"status\": health[\"status\"]},\n \"config\": runtime.configuration.get(),\n }\n\n async def _start_async(self, runtime: RuntimeManager) -> None:\n actions = ControlActionSet(\n health=runtime.health_status,\n start=runtime.start_runtime,\n stop=runtime.stop_runtime,\n status=runtime.runtime_status,\n )\n for channel in self._channels:\n await channel.start(actions)\n\n async def _stop_async(self) -> None:\n for channel in reversed(self._channels):\n await channel.stop()", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/service.py:ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.service", + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "class UvicornThreadRunner:\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._host = host\n self._port = port\n self._timeout = timeout\n self._server: Server | None = None\n self._thread: Thread | None = None\n self._error: BaseException | None = None\n\n async def start(self, app: FastAPI) -> None:\n if self._thread is not None and self._thread.is_alive():\n return\n self._error = None\n config = Config(app=app, host=self._host, port=self._port, log_level=\"warning\")\n self._server = Server(config)\n self._thread = Thread(target=self._serve, name=\"plba-http-control\", daemon=True)\n self._thread.start()\n await self._wait_until_started()\n\n async def stop(self) -> None:\n if self._server is None or self._thread is None:\n return\n self._server.should_exit = True\n await asyncio.to_thread(self._thread.join, self._timeout)\n self._server = None\n self._thread = None\n\n @property\n def port(self) -> int:\n if self._server is None or not getattr(self._server, \"servers\", None):\n return self._port\n socket = self._server.servers[0].sockets[0]\n return int(socket.getsockname()[1])\n\n async def _wait_until_started(self) -> None:\n if self._server is None:\n raise RuntimeError(\"Server is not initialized\")\n deadline = asyncio.get_running_loop().time() + max(float(self._timeout), 1.0)\n while not self._server.started:\n if self._error is not None:\n raise RuntimeError(\"HTTP control server failed to start\") from self._error\n if asyncio.get_running_loop().time() >= deadline:\n raise TimeoutError(\"HTTP control server startup timed out\")\n await asyncio.sleep(0.05)\n\n def _serve(self) -> None:\n if self._server is None:\n return\n try:\n asyncio.run(self._server.serve())\n except BaseException as exc: # noqa: BLE001\n self._error = exc", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_runner.py:UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_runner", + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlChannel(ABC):\n @abstractmethod\n async def start(self, actions: ControlActionSet) -> None:\n \"\"\"Start the control channel and bind handlers.\"\"\"\n\n @abstractmethod\n async def stop(self) -> None:\n \"\"\"Stop the control channel and release resources.\"\"\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 1, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/__init__.py", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\"ControlActionSet\", \"ControlChannel\", \"ControlPlaneService\", \"HttpControlChannel\"]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/__init__.py:1-5", + "span_start": 1, + "span_end": 5, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.app_runtime.control.__init__", + "is_test": false, + "blob_sha": "bf3c37e3369a84cc618adc0fd71c232e5eb4b871eaff743069a17e661e498316", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "class HttpControlAppFactory:\n def create(\n self,\n health_provider: Callable[[], Awaitable[HealthPayload]],\n action_provider: Callable[[str, str], Awaitable[JSONResponse]],\n ) -> FastAPI:\n app = FastAPI(title=\"PLBA Control API\")\n\n @app.middleware(\"http\")\n async def log_api_call(request: Request, call_next): # type: ignore[no-untyped-def]\n started = time.monotonic()\n response = await call_next(request)\n response.headers[\"X-Response-Time-Ms\"] = str(int((time.monotonic() - started) * 1000))\n return response\n\n @app.get(\"/health\")\n async def health() -> JSONResponse:\n payload = await health_provider()\n status_code = 200 if payload.get(\"status\") == \"ok\" else 503\n return JSONResponse(content=payload, status_code=status_code)\n\n @app.get(\"/actions/{action}\")\n @app.post(\"/actions/{action}\")\n async def action(action: str, request: Request) -> JSONResponse:\n client_source = self._client_source(request)\n if action in {\"start\", \"stop\"}:\n LOGGER.warning(\"Control action requested: /actions/%s client=%s\", action, client_source)\n return await action_provider(action, client_source)\n\n return app\n\n def _client_source(self, request: Request) -> str:\n explicit_header = request.headers.get(\"X-Client-Source\", \"\").strip()\n if explicit_header:\n return explicit_header\n user_agent = request.headers.get(\"User-Agent\", \"\").strip()\n if user_agent:\n return f\"user-agent:{user_agent}\"\n return \"unknown\"", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_app.py:HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_app", + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "class HttpControlChannel(ControlChannel):\n def __init__(self, host: str, port: int, timeout: int) -> None:\n self._timeout = timeout\n self._runner = UvicornThreadRunner(host, port, timeout)\n self._factory = HttpControlAppFactory()\n self._actions: ControlActionSet | None = None\n\n async def start(self, actions: ControlActionSet) -> None:\n self._actions = actions\n app = self._factory.create(self._health_response, self._action_response)\n await self._runner.start(app)\n\n async def stop(self) -> None:\n await self._runner.stop()\n\n @property\n def port(self) -> int:\n return self._runner.port\n\n async def _health_response(self) -> dict[str, object]:\n if self._actions is None:\n return {\"status\": \"unhealthy\", \"detail\": \"control actions are not configured\"}\n return await asyncio.wait_for(self._actions.health(), timeout=float(self._timeout))\n\n async def _action_response(self, action: str, _client_source: str = \"unknown\") -> JSONResponse:\n if self._actions is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"{action} handler is not configured\"}, status_code=404)\n callbacks = {\n \"start\": self._actions.start,\n \"stop\": self._actions.stop,\n \"status\": self._actions.status,\n }\n callback = callbacks.get(action)\n if callback is None:\n return JSONResponse(content={\"status\": \"error\", \"detail\": f\"unsupported action: {action}\"}, status_code=404)\n action_timeout = max(float(self._timeout), 10.0) if action in {\"start\", \"stop\"} else float(self._timeout)\n try:\n detail = await asyncio.wait_for(callback(), timeout=action_timeout)\n except asyncio.TimeoutError:\n return JSONResponse(\n content={\"status\": \"accepted\", \"detail\": f\"{action} operation is still in progress\"},\n status_code=202,\n )\n except Exception as exc:\n return JSONResponse(content={\"status\": \"error\", \"detail\": str(exc)}, status_code=500)\n return JSONResponse(content={\"status\": \"ok\", \"detail\": detail or f\"{action} action accepted\"}, status_code=200)", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/http_channel.py:HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_channel", + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "class ControlActionSet:\n health: HealthHandler\n start: ActionHandler\n stop: ActionHandler\n status: ActionHandler", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/app_runtime/control/base.py:ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.base", + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/plba/control.py", + "content": "from app_runtime.control.base import ControlActionSet, ControlChannel\nfrom app_runtime.control.http_channel import HttpControlChannel\nfrom app_runtime.control.service import ControlPlaneService\n\n__all__ = [\n \"ControlActionSet\",\n \"ControlChannel\",\n \"ControlPlaneService\",\n \"HttpControlChannel\",\n]", + "layer": "C0_SOURCE_CHUNKS", + "title": "src/plba/control.py:1-10", + "span_start": 1, + "span_end": 10, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 4, + "distance": NaN, + "metadata": { + "chunk_index": 0, + "chunk_type": "window", + "module_or_unit": "src.plba.control", + "is_test": false, + "blob_sha": "31bd5c4481bfa7fbca8fae56d4860a67e3953ca74474ac8439e1f39b685d7bc8", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests manager\n- orchestrates role-like calls (4)\n- reads and writes state attributes\n- participates in dataflow slices (50)", + "layer": "C4_SEMANTIC_ROLES", + "title": "RuntimeManager", + "span_start": 18, + "span_end": 179, + "lexical_rank": 0, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 43, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7e4a9381328c5803bbc6179458612fc4e947d928aa7bf8b4b2bebb2c8592f758", + "symbol_name": "RuntimeManager", + "qname": "RuntimeManager", + "role": "pipeline_stage", + "confidence": 0.67, + "dataflow_participation": 50, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlChannel", + "span_start": 21, + "span_end": 28, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "cfcfe9a311d3a2dbdaf32ac4ccd73c0eb9a117f830591a1c0867ee97d46204ff", + "symbol_name": "ControlChannel", + "qname": "ControlChannel", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/base.py", + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlActionSet", + "span_start": 14, + "span_end": 18, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 40, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "46eb026cb3313415ec47b82dd22f84f4d112c9d987e8b1716dcb0baa1cce8988", + "symbol_name": "ControlActionSet", + "qname": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "84754bc651a3d90eed09f74a53d7df9a02fa15657e4773a6cc840bd3bed134b7", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)", + "layer": "C4_SEMANTIC_ROLES", + "title": "ControlPlaneService", + "span_start": 12, + "span_end": 52, + "lexical_rank": 3, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 68, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "b13471e5916986dccffb53fab613812842965705e6b3a89ae549d30c9e91e9aa", + "symbol_name": "ControlPlaneService", + "qname": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "dataflow_participation": 5, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_runner.py", + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)", + "layer": "C4_SEMANTIC_ROLES", + "title": "UvicornThreadRunner", + "span_start": 10, + "span_end": 61, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 11, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "fd55630045a02100df8877ac27d951ee08617d4598764394d48cb51fe067476a", + "symbol_name": "UvicornThreadRunner", + "qname": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 24, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "3779fdd2878b770e789a35bb2a89c9d79f13b61c26d7db1b3b683f9bb9e1623f", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_channel.py", + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlChannel", + "span_start": 12, + "span_end": 57, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 21, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "1c9fbdc24819e5604c26ea55428a74310f03a03e1af197ed84846af61e42fdb0", + "symbol_name": "HttpControlChannel", + "qname": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 10, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "286e9615e209bc395ce9db0cd70f2236012e3e86b0257dc87e215e01f7f89ada", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory", + "layer": "C4_SEMANTIC_ROLES", + "title": "HttpControlAppFactory", + "span_start": 15, + "span_end": 53, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 39, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "9b3502a5fb408b273223db13264349cf500de24915b6c649d9ea8970d0dfd8e0", + "symbol_name": "HttpControlAppFactory", + "qname": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "dataflow_participation": 0, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "content": "WorkflowPersistence\nrole: pipeline_stage\n\nResponsibilities:\n- orchestrates role-like calls (2)\n- reads and writes state attributes\n- participates in dataflow slices (16)", + "layer": "C4_SEMANTIC_ROLES", + "title": "WorkflowPersistence", + "span_start": 8, + "span_end": 54, + "lexical_rank": 100, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 15, + "layer_rank": 2, + "distance": NaN, + "metadata": { + "symbol_id": "7bd01ee45cf31f2d5c2e3e51656254860ac785d10cef9e0852cd4fba90857bae", + "symbol_name": "WorkflowPersistence", + "qname": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "dataflow_participation": 16, + "execution_trace_proximity": 0, + "is_test": false, + "blob_sha": "80e9410ddc639789b4353c2a1a757ba8d0d5b5bb6075b0b263b61551f04ae1f0", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 52, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d", + "dst_ref": "RuntimeManager.add_config_file", + "resolution": "resolved", + "slice_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.add_config_file" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "57ffbd4f0d9fdf3507c2b8624312ce211f3d02fdf86a57a8ec90778d8a7b498d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.services\n -> RuntimeManager.__init__", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 33, + "span_end": 39, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d43af85989222ee6d788ce418cdcb217c7ff044cfb915e3bdbd184417dc7bd61", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "dst_ref": "RuntimeManager.__init__", + "resolution": "resolved", + "slice_id": "d43af85989222ee6d788ce418cdcb217c7ff044cfb915e3bdbd184417dc7bd61", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.services", + "RuntimeManager.__init__" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.stop", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 25, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d", + "dst_ref": "ControlPlaneService.stop", + "resolution": "resolved", + "slice_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.stop" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "bd50ae61353169acb2967a7085411ff58dfaa2e125e79ff1a42697add7380d0d" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._stop_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 51, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a", + "dst_ref": "ControlPlaneService._stop_async", + "resolution": "resolved", + "slice_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._stop_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "f3b9abaed413133f25c01074948db3fc551540fd2f8b7ba7bfdb1c59bd0a748a" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 59, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1", + "dst_ref": "RuntimeManager.start", + "resolution": "resolved", + "slice_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager.start" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "77a7b260193018845e4e204df094ab89cfd7c82ee4e822b3a83ad4cd945f9cb1" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager._register_core_services", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 32, + "span_end": 127, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6", + "dst_ref": "RuntimeManager._register_core_services", + "resolution": "resolved", + "slice_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.configuration", + "RuntimeManager._register_core_services" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.register_channel", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 17, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957", + "dst_ref": "ControlPlaneService.register_channel", + "resolution": "resolved", + "slice_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.register_channel" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b0313a9161dec8d8ad803adcde0cb082c57806e0a3edcd3dd40f8ed1a09b0957" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService.start", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 20, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154", + "dst_ref": "ControlPlaneService.start", + "resolution": "resolved", + "slice_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService.start" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "8f9aa720eb89aaf78c914c2a96e1b07bc0699eb666b51e332fc5f467f6f44154" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/service.py", + "content": "ControlPlaneService.__init__\n -> ControlPlaneService._channels\n -> ControlPlaneService._start_async", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "ControlPlaneService.__init__:dataflow_slice", + "span_start": 14, + "span_end": 47, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "edge_type": "dataflow_slice", + "src_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "src_qname": "ControlPlaneService.__init__", + "dst_symbol_id": "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517", + "dst_ref": "ControlPlaneService._start_async", + "resolution": "resolved", + "slice_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", + "root_symbol_id": "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "path_symbols": [ + "ControlPlaneService.__init__", + "ControlPlaneService._channels", + "ControlPlaneService._start_async" + ], + "path_symbol_ids": [ + "d8008ee40e320f4551179bed7a3665a5e7d65850412051bcdf86007fa25f717a", + "b1a6eb93235bdad207d2bac24162aa65d662725b833b73e145b7f7fc3ecf9517" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "f53bb9e39148f37ecabad38b290219ae5bc562b9eb07fcd9965f5770fa3d6594", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/core/runtime.py", + "content": "RuntimeManager.__init__\n -> RuntimeManager.services\n -> RuntimeManager._register_core_services", + "layer": "C2_DEPENDENCY_GRAPH", + "title": "RuntimeManager.__init__:dataflow_slice", + "span_start": 33, + "span_end": 127, + "lexical_rank": 4, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 3, + "layer_rank": 3, + "distance": NaN, + "metadata": { + "edge_id": "aac6f9dda73963b977083a892bee39a48eca4fbd7404787e022ecf4ebedec65d", + "edge_type": "dataflow_slice", + "src_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "src_qname": "RuntimeManager.__init__", + "dst_symbol_id": "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6", + "dst_ref": "RuntimeManager._register_core_services", + "resolution": "resolved", + "slice_id": "aac6f9dda73963b977083a892bee39a48eca4fbd7404787e022ecf4ebedec65d", + "root_symbol_id": "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "path_symbols": [ + "RuntimeManager.__init__", + "RuntimeManager.services", + "RuntimeManager._register_core_services" + ], + "path_symbol_ids": [ + "0bd33af01139de711a34193394772f481224acf06d96055f935e259d9bcc4a05", + "972d6057a6caac9cf31ebc1e29c6f39f71b10d4cc170dec57cf875ba458549c6" + ], + "path_edge_types": [ + "writes_attr", + "reads_attr" + ], + "path_length": 3, + "is_test": false, + "blob_sha": "e16bb7231eb419d6d069a62767cfe7ac7a2acfc4cd1e34e65907f3456623aa68", + "repo_id": "plba", + "artifact_type": null, + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.post", + "layer": "C3_ENTRYPOINTS", + "title": "app.post", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.post", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "POST" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 31, + "span_end": 34, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + }, + { + "path": "src/app_runtime/control/http_app.py", + "content": "fastapi http app.get", + "layer": "C3_ENTRYPOINTS", + "title": "app.get", + "span_start": 38, + "span_end": 42, + "lexical_rank": 5, + "prefer_bonus": 1, + "test_penalty": 0, + "structural_rank": 99, + "layer_rank": 0, + "distance": NaN, + "metadata": { + "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", + "entry_type": "http", + "framework": "fastapi", + "route_or_command": "app.get", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "is_test": false, + "lang_payload": { + "methods": [ + "GET" + ] + }, + "artifact_type": null, + "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", + "repo_id": "plba", + "section": null, + "doc_id": null, + "doc_version": null, + "owner": null, + "system_component": null, + "last_modified": null, + "staleness_score": null + } + } + ], + "validation": { + "passed": true, + "action": "return", + "reasons": [] + }, + "steps": [ + { + "step": "router", + "status": "completed", + "timings_ms": { + "router": 0 + }, + "output": { + "intent": "CODE_QA", + "sub_intent": "TRACE_FLOW", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + } + }, + { + "step": "retrieval", + "status": "completed", + "timings_ms": { + "retrieval": 153 + }, + "output": { + "rag_count": 37, + "answer_path_rag_count": 37, + "resolved_symbol_status": "resolved", + "resolved_symbol": "RuntimeManager", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "diagnostics": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "vector", + "C0_SOURCE_CHUNKS": "vector", + "C4_SEMANTIC_ROLES": "vector", + "C2_DEPENDENCY_GRAPH": "vector", + "C3_ENTRYPOINTS": "vector" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 10, + "C3_ENTRYPOINTS": 10 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [] + } + }, + "fallback": { + "used": false, + "reason": null + }, + "retrieval_by_layer_ms": { + "C1_SYMBOL_CATALOG": 39, + "C0_SOURCE_CHUNKS": 24, + "C4_SEMANTIC_ROLES": 13, + "C2_DEPENDENCY_GRAPH": 55, + "C3_ENTRYPOINTS": 20 + } + } + }, + { + "step": "pre_evidence_gate", + "status": "passed", + "timings_ms": { + "pre_evidence_gate": 0 + }, + "output": { + "passed": true, + "failure_reasons": [], + "degraded_message": "" + } + }, + { + "step": "llm", + "status": "completed", + "timings_ms": { + "llm": 1356 + }, + "output": { + "prompt_name": "code_qa_trace_flow_answer", + "answer_preview": "При запуске `RuntimeManager` выполняются следующие основные шаги:\n\n1. В `bootstrap.py` создаётся экземпляр `RuntimeManager`.\n2. В `core/runtime.py` инициализируется объект `RuntimeManager`, вызывая его конструктор.\n3. Далее выполняется регистрация базовых сервисов через метод `_register_core_service" + } + }, + { + "step": "post_evidence_gate", + "status": "passed", + "timings_ms": { + "post_evidence_gate": 0, + "repair": 0 + }, + "output": { + "passed": true, + "reasons": [], + "repair_used": false + } + } + ] + } +} \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-runtime-start.md b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-runtime-start.md new file mode 100644 index 0000000..e2688c2 --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-runtime-start.md @@ -0,0 +1,247 @@ +# plba-v2-trace-flow-runtime-start + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v2/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: agent_runtime +- mode: full_chain +- passed: True + +## Query +Покажи поток выполнения при запуске RuntimeManager + +## Actual +{ + "intent": "CODE_QA", + "sub_intent": "TRACE_FLOW", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "rag_count": 37, + "llm_answer": "При запуске `RuntimeManager` выполняются следующие основные шаги:\n\n1. В `bootstrap.py` создаётся экземпляр `RuntimeManager`.\n2. В `core/runtime.py` инициализируется объект `RuntimeManager`, вызывая его конструктор.\n3. Далее выполняется регистрация базовых сервисов через метод `_register_core_services`.\n4. Запускаются каналы управления с помощью метода `start` объекта `ControlPlaneService`.\n5. Каналы управления начинают свою работу через асинхронный запуск метода `_start_async`.\n6. Управление веб-приложением осуществляется через создание экземпляра `HttpControlChannel`, который использует сервер `UvicornThreadRunner` для запуска HTTP приложения.\n\nПолностью проследить весь поток данных не удалось из-за недостаточного количества информации.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "RuntimeManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] +} + +## Steps +[ + { + "step": "router", + "status": "completed", + "timings_ms": { + "router": 0 + }, + "output": { + "intent": "CODE_QA", + "sub_intent": "TRACE_FLOW", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + } + }, + { + "step": "retrieval", + "status": "completed", + "timings_ms": { + "retrieval": 153 + }, + "output": { + "rag_count": 37, + "answer_path_rag_count": 37, + "resolved_symbol_status": "resolved", + "resolved_symbol": "RuntimeManager", + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "diagnostics": { + "executed_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_mode_by_layer": { + "C1_SYMBOL_CATALOG": "vector", + "C0_SOURCE_CHUNKS": "vector", + "C4_SEMANTIC_ROLES": "vector", + "C2_DEPENDENCY_GRAPH": "vector", + "C3_ENTRYPOINTS": "vector" + }, + "top_k_by_layer": { + "C1_SYMBOL_CATALOG": 8, + "C0_SOURCE_CHUNKS": 8, + "C4_SEMANTIC_ROLES": 8, + "C2_DEPENDENCY_GRAPH": 10, + "C3_ENTRYPOINTS": 10 + }, + "filters_by_layer": { + "C1_SYMBOL_CATALOG": { + "path_scope": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [] + }, + "C4_SEMANTIC_ROLES": { + "path_scope": [] + }, + "C2_DEPENDENCY_GRAPH": { + "path_scope": [] + }, + "C3_ENTRYPOINTS": { + "path_scope": [] + } + }, + "fallback": { + "used": false, + "reason": null + }, + "retrieval_by_layer_ms": { + "C1_SYMBOL_CATALOG": 39, + "C0_SOURCE_CHUNKS": 24, + "C4_SEMANTIC_ROLES": 13, + "C2_DEPENDENCY_GRAPH": 55, + "C3_ENTRYPOINTS": 20 + } + } + }, + { + "step": "pre_evidence_gate", + "status": "passed", + "timings_ms": { + "pre_evidence_gate": 0 + }, + "output": { + "passed": true, + "failure_reasons": [], + "degraded_message": "" + } + }, + { + "step": "llm", + "status": "completed", + "timings_ms": { + "llm": 1356 + }, + "output": { + "prompt_name": "code_qa_trace_flow_answer", + "answer_preview": "При запуске `RuntimeManager` выполняются следующие основные шаги:\n\n1. В `bootstrap.py` создаётся экземпляр `RuntimeManager`.\n2. В `core/runtime.py` инициализируется объект `RuntimeManager`, вызывая его конструктор.\n3. Далее выполняется регистрация базовых сервисов через метод `_register_core_service" + } + }, + { + "step": "post_evidence_gate", + "status": "passed", + "timings_ms": { + "post_evidence_gate": 0, + "repair": 0 + }, + "output": { + "passed": true, + "reasons": [], + "repair_used": false + } + } +] + +## Diagnostics +{ + "intent_correct": null, + "target_found": true, + "layers_used": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "retrieval_sufficient": true, + "answer_mode": "normal", + "router_result": { + "intent": "CODE_QA", + "graph_id": "CodeQAGraph", + "conversation_mode": "START", + "retrieval_profile": "code", + "sub_intent": "TRACE_FLOW", + "path_scope": [], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], + "symbol_resolution_status": "resolved" + }, + "retrieval_request": { + "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", + "query": "Покажи поток выполнения при запуске RuntimeManager", + "sub_intent": "TRACE_FLOW", + "path_scope": [], + "requested_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "per_layer_outcome": [ + { + "layer_id": "C1_SYMBOL_CATALOG", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C0_SOURCE_CHUNKS", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C4_SEMANTIC_ROLES", + "hit_count": 8, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C2_DEPENDENCY_GRAPH", + "hit_count": 10, + "empty": false, + "fallback_used": false + }, + { + "layer_id": "C3_ENTRYPOINTS", + "hit_count": 3, + "empty": false, + "fallback_used": false + } + ], + "empty_layers": [], + "evidence_gate_decision": { + "sufficient": true, + "failure_reasons": [], + "evidence_count": 37 + }, + "failure_reasons": [], + "timings_ms": { + "router": 0, + "retrieval": 153, + "pre_evidence_gate": 0, + "llm": 1356 + } +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/summary.md b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/summary.md new file mode 100644 index 0000000..3780ae5 --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/summary.md @@ -0,0 +1,84 @@ +# pipeline_setup_v3 summary + +Passed: 16/18 + +| File | Case | Mode | Query | Actual sub-intent | RAG layers | Pass | +|------|------|------|-------|-------------------|------------|------| +| full_chain_plba_code_subintents_v2.yaml | plba-v2-open-file-runtime | full_chain | Открой файл src/app_runtime/core/runtime.py | OPEN_FILE | C0_SOURCE_CHUNKS:1 | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-open-file-public-api | full_chain | Открой файл src/plba/__init__.py | OPEN_FILE | C0_SOURCE_CHUNKS:1 | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-explain-runtime-manager | full_chain | Объясни как работает класс RuntimeManager | EXPLAIN | C0_SOURCE_CHUNKS:8, C1_SYMBOL_CATALOG:8, C2_DEPENDENCY_GRAPH:6, C3_ENTRYPOINTS:3, C4_SEMANTIC_ROLES:8 | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-explain-trace-service | full_chain | Объясни как работает класс TraceService | EXPLAIN | C0_SOURCE_CHUNKS:8, C1_SYMBOL_CATALOG:8, C2_DEPENDENCY_GRAPH:6, C3_ENTRYPOINTS:3, C4_SEMANTIC_ROLES:8 | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-explain-create-runtime | full_chain | Что делает функция create_runtime? | EXPLAIN | C0_SOURCE_CHUNKS:8, C1_SYMBOL_CATALOG:8, C2_DEPENDENCY_GRAPH:6, C3_ENTRYPOINTS:3, C4_SEMANTIC_ROLES:8 | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-explain-local-http-channel | full_chain | Почему в файле src/app_runtime/control/http_channel.py класс HttpControlChannel устроен так? | EXPLAIN_LOCAL | C0_SOURCE_CHUNKS:1, C1_SYMBOL_CATALOG:8, C2_DEPENDENCY_GRAPH:4 | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-find-tests-runtime-manager | full_chain | Где тесты для RuntimeManager? | FIND_TESTS | C0_SOURCE_CHUNKS:10, C1_SYMBOL_CATALOG:8, C2_DEPENDENCY_GRAPH:6 | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-find-tests-trace-service | full_chain | Где тесты для TraceService? | FIND_TESTS | C0_SOURCE_CHUNKS:10, C1_SYMBOL_CATALOG:8, C2_DEPENDENCY_GRAPH:6 | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-find-tests-create-runtime | full_chain | Где тесты для create_runtime? | FIND_TESTS | C0_SOURCE_CHUNKS:10, C1_SYMBOL_CATALOG:8, C2_DEPENDENCY_GRAPH:6 | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-find-tests-workflow-runtime-factory-negative | full_chain | Где тесты для WorkflowRuntimeFactory? | FIND_TESTS | C0_SOURCE_CHUNKS:10, C1_SYMBOL_CATALOG:8, C2_DEPENDENCY_GRAPH:6 | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-find-entrypoints-control-plane | full_chain | Найди точки входа HTTP control plane | FIND_ENTRYPOINTS | C0_SOURCE_CHUNKS:6, C3_ENTRYPOINTS:3 | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-find-entrypoints-health-endpoint | full_chain | Где health endpoint? | FIND_ENTRYPOINTS | C0_SOURCE_CHUNKS:6, C3_ENTRYPOINTS:3 | ✗ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-trace-flow-runtime-start | full_chain | Покажи поток выполнения при запуске RuntimeManager | TRACE_FLOW | C0_SOURCE_CHUNKS:8, C1_SYMBOL_CATALOG:8, C2_DEPENDENCY_GRAPH:10, C3_ENTRYPOINTS:3, C4_SEMANTIC_ROLES:8 | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-trace-flow-health-endpoint | full_chain | Покажи как проходит запрос /health в HttpControlAppFactory | TRACE_FLOW | C0_SOURCE_CHUNKS:8, C1_SYMBOL_CATALOG:8, C2_DEPENDENCY_GRAPH:10, C3_ENTRYPOINTS:3, C4_SEMANTIC_ROLES:8 | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-architecture-runtime-manager | full_chain | Какие компоненты участвуют в RuntimeManager? | ARCHITECTURE | C0_SOURCE_CHUNKS:4, C1_SYMBOL_CATALOG:6, C2_DEPENDENCY_GRAPH:8, C3_ENTRYPOINTS:3, C4_SEMANTIC_ROLES:12 | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-architecture-control-plane | full_chain | Какие компоненты участвуют в ControlPlaneService? | ARCHITECTURE | C0_SOURCE_CHUNKS:4, C1_SYMBOL_CATALOG:6, C2_DEPENDENCY_GRAPH:8, C3_ENTRYPOINTS:3, C4_SEMANTIC_ROLES:12 | ✓ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-explain-nonexistent-symbol | full_chain | Объясни класс RuntimeFactoryManager | EXPLAIN | — | ✗ | +| full_chain_plba_code_subintents_v2.yaml | plba-v2-open-file-nonexistent | full_chain | Открой файл src/app_runtime/core/missing_runtime.py | OPEN_FILE | — | ✓ | + +## Failures +- **plba-v2-find-entrypoints-health-endpoint**: llm: expected answer to contain 'GET /health' +- **plba-v2-explain-nonexistent-symbol**: llm: expected answer to contain 'не найдена' + +## LLM Answers +- **plba-v2-open-file-runtime** + Query: Открой файл src/app_runtime/core/runtime.py + > Виден класс \`RuntimeManager\` с методом \`\_\_init\_\_\`, принимающим несколько параметров. Фиксированы также константы \`ACTION\_TIMEOUT\_SECONDS\` и \`ACTION\_POLL\_INTERVAL\_SECONDS\`. +- **plba-v2-open-file-public-api** + Query: Открой файл src/plba/__init__.py + > В файле src/plba/\_\_init\_\_.py видны следующие импорты и объявления: \- from plba.bootstrap import create\_runtime \- from plba.config import ConfigFileLoader, FileConfigProvider \- from plba.control import ControlActionSet, ControlChannel, ControlPlaneService, HttpControlChannel \- from plba.contracts import ApplicationModule, ConfigProvider, HealthContributor, TraceContext, TraceContextRecord, TraceLogMessage, TraceTransport, Worker, WorkerHealth, WorkerStatus \- from plba.core import ConfigurationManager, RuntimeManager, ServiceContainer \- from plba.health import HealthRegistry \- from plba.logging import LogManager \- from plba.queue import InMemoryTaskQueue \- from plba.tracing import MySqlTraceTransport, NoOpTraceTransport, TraceService \- from plba.workflow import StepResult, WorkflowContext, WorkflowDefinition, Workflo +- **plba-v2-explain-runtime-manager** + Query: Объясни как работает класс RuntimeManager + > Класс \`RuntimeManager\` находится в файле \`src/app\_runtime/core/runtime.py\`. Конкретной реализации инициализации или подробного описания методов в предоставленном контексте не видно. Однако исходя из имеющихся признаков: 1. Класс имеет ответственность за управление состоянием и конфигурацией runtime\-системы, судя по названиям атрибутов и методов в окружении \(\`configuration\`, \`add\_config\_file\`\). 2. Вероятно, он участвует в оркестрации различных компонентов системы через свои методы и атрибуты, хотя детальной информации об этих методах и атрибутах нет. Таким образом, класс \`RuntimeManager\` играет ключевую управляющую роль в системе, вероятно, интегрируя и координируя другие компоненты и модули. +- **plba-v2-explain-trace-service** + Query: Объясни как работает класс TraceService + > Класс \`TraceService\` определяется в файле \`src/app\_runtime/tracing/service.py\`. Он наследует от \`TraceContextFactory\`. Его основные обязанности: \- Инициализация при создании через параметры \`transport\` и \`store\`, с возможностью использования стандартных реализаций \(\`NoOpTraceTransport\` и \`TraceContextStore\`\). \- Метод \`create\_context\` создаёт новый контекст трассировки с заданными параметрами и записывает его в хранилище. \- Методы \`current\_trace\_id\` и \`step\` предоставляют доступ к текущему идентификатору трассы и выполняют дополнительные действия. Детали реализации зависят от конкретных методов, таких как инициализация транспорта и контекста, а также запись записей трассировки в хранилище. +- **plba-v2-explain-create-runtime** + Query: Что делает функция create_runtime? + > Функция \`create\_runtime\` инициализирует объект \`RuntimeManager\`, загружает конфигурацию из указанного файла \(если путь задан\), регистрирует HTTP\-контроллер для управления состоянием приложения и регистрирует переданный модуль \(\`ApplicationModule\`\) в системе. Конкретно: 1. Функция создаёт экземпляр \`RuntimeManager\`. 2. Если указан путь к файлу конфигурации, файл загружается и добавляется в систему конфигурирования. 3. При включении опции HTTP\-контроллера создаётся и регистрируется соответствующий канал управления через класс \`HttpControlChannel\`. 4. Переданный аргумент\-модуль регистрируется в системе. Зависимости и вызовы внутри функции: \- Загрузка конфигурации через чтение файла и его парсинг \(используются библиотеки JSON и YAML\). \- Регистрация модуля в системе конфигурирования через метод \`register\_module\`. +- **plba-v2-explain-local-http-channel** + Query: Почему в файле src/app_runtime/control/http_channel.py класс HttpControlChannel устроен так? + > Класс \`HttpControlChannel\` в файле \`http\_channel.py\` реализует канал управления для HTTP\-приложения. В конструкторе \(\`\_\_init\_\_\`\) инициализируются атрибуты: \- \`\_timeout\`: таймаут для канала. \- \`\_runner\`: экземпляр \`UvicornThreadRunner\`, управляющий запуском uvicorn\-сервера. \- \`\_factory\`: фабрика приложений \`HttpControlAppFactory\`. \- \`\_actions\`: набор действий \(контролируемых операций\). Метод \`start\` запускает сервер с приложением, созданным фабрикой, и ассоциирует действия с каналом. Метод \`stop\` останавливает сервер. Класс использует асинхронный подход через аннотации \`async\`. +- **plba-v2-find-tests-runtime-manager** + Query: Где тесты для RuntimeManager? + > Прямые тесты для \`RuntimeManager\` находятся в файле \`tests/test\_runtime.py\`. Эти тесты проверяют инициализацию и поведение объекта \`RuntimeManager\`. Косвенных тестов, явно связанных с \`RuntimeManager\`, больше нигде не обнаружено. +- **plba-v2-find-tests-trace-service** + Query: Где тесты для TraceService? + > Прямые тесты для \`TraceService\` обнаружены в файле \`tests/test\_runtime.py\`. Проверяются следующие аспекты: \- \`test\_trace\_service\_allows\_messages\_without\_status\`: проверка обработки сообщений без статуса. \- \`test\_trace\_service\_writes\_contexts\_and\_messages\`: проверка записи контекстов и сообщений. \- \`test\_trace\_service\_supports\_debug\_warning\_and\_error\_levels\`: проверка поддержки различных уровней логирования \(DEBUG, WARNING, ERROR\). +- **plba-v2-find-tests-create-runtime** + Query: Где тесты для create_runtime? + > Прямых тестов для \`create\_runtime\` не обнаружено. Ближайший тест расположен в файле \`tests/test\_runtime.py\`, но он проверяет экспорт публичных контрактов пакета PLBA, а не непосредственно сам метод \`create\_runtime\`. Косвенное покрытие отсутствует. +- **plba-v2-find-tests-workflow-runtime-factory-negative** + Query: Где тесты для WorkflowRuntimeFactory? + > Insufficient evidence for a confident answer. No test candidates found. +- **plba-v2-find-entrypoints-control-plane** + Query: Найди точки входа HTTP control plane + > Подтверждённые HTTP route points: \- GET /health \(src/app\_runtime/control/http\_app.py:51\) \- POST \(не указан путь, только декорированный метод в src/app\_runtime/control/http\_app.py:38\-42\) \- GET \(не указан путь, только декорированный метод в src/app\_runtime/control/http\_app.py:38\-42\) Эти маршруты объявлены непосредственно в src/app\_runtime/control/http\_app.py. +- **plba-v2-find-entrypoints-health-endpoint** + Query: Где health endpoint? + > Конкретных health\-endpoint'ов, объявленных как routes, не найдено. Однако, исходя из предоставленного кода: \- В \`http\_app.py\` есть две явные декларации маршрутов с использованием декоратора \`app.get\`, но neither из них явно помечен как health\-check \(метод и путь не указаны\). \- Есть декларация \`app.post\`, но она также не маркируется как health\-related. Таким образом, хотя health\-checking инфраструктура существует \(через класс \`HealthRegistry\`\), конкретный health\-endpoint не обнаружен среди зарегистрированных маршрутов. +- **plba-v2-trace-flow-runtime-start** + Query: Покажи поток выполнения при запуске RuntimeManager + > При запуске \`RuntimeManager\` выполняются следующие основные шаги: 1. В \`bootstrap.py\` создаётся экземпляр \`RuntimeManager\`. 2. В \`core/runtime.py\` инициализируется объект \`RuntimeManager\`, вызывая его конструктор. 3. Далее выполняется регистрация базовых сервисов через метод \`\_register\_core\_services\`. 4. Запускаются каналы управления с помощью метода \`start\` объекта \`ControlPlaneService\`. 5. Каналы управления начинают свою работу через асинхронный запуск метода \`\_start\_async\`. 6. Управление веб\-приложением осуществляется через создание экземпляра \`HttpControlChannel\`, который использует сервер \`UvicornThreadRunner\` для запуска HTTP приложения. Полностью проследить весь поток данных не удалось из\-за недостаточного количества информации. +- **plba-v2-trace-flow-health-endpoint** + Query: Покажи как проходит запрос /health в HttpControlAppFactory + > Поток выполнения запроса \`/health\` в \`HttpControlAppFactory\` выглядит следующим образом: 1. Запрос приходит на маршрут \`/health\`. 2. Контроллер вызывает метод \`health\(\)\` внутри фабрики, который объявлен в классе \`HttpControlAppFactory\`. 3. Внутри метода \`health\(\)\` фабрика ожидает асинхронный результат от провайдера здоровья \(\`health\_provider\`\), представляющего состояние системы. 4. Результат передается в виде объекта \`HealthPayload\`, содержащего статус \("ok" или иное\). 5. На основе статуса определяется HTTP\-код ответа: 200 при успешном состоянии, иначе 503. 6. Ответ формируется с использованием JSON формата. Таким образом, ключевой элемент — провайдер здоровья, определяющий текущее состояние системы и возвращающий соответствующий объект состояния. +- **plba-v2-architecture-runtime-manager** + Query: Какие компоненты участвуют в RuntimeManager? + > В подсистеме RuntimeManager участвуют следующие компоненты: 1. \*\*RuntimeManager\*\* — главный менеджер runtime, отвечает за конфигурацию и запуск runtime\-потоков \(src/app\_runtime/core/runtime.py\). 2. \*\*ControlPlaneService\*\* — сервис управления каналами контроля, обеспечивает регистрацию каналов и старт/стоп операций \(src/app\_runtime/control/service.py\). 3. \*\*ControlChannel\*\* — абстрактный канал управления, определяющий интерфейсы для запуска и остановки канала \(src/app\_runtime/control/base.py\). 4. \*\*UvicornThreadRunner\*\* — реализует uvicorn thread runner для обработки HTTP\-запросов \(src/app\_runtime/control/http\_runner.py\). 5. \*\*HttpControlChannel\*\* — HTTP\-канал управления, участвует в управлении состояниями и операциях \(src/app\_runtime/control/http\_channel.py\). 6. \*\*HttpControlAppFactory\*\* — фабрика для создания fastAPI приложений с контролем состояний \(src/app\_runtime… +- **plba-v2-architecture-control-plane** + Query: Какие компоненты участвуют в ControlPlaneService? + > В системе ControlPlaneService участвуют следующие компоненты: 1. \*\*ControlPlaneService\*\* – главный объект управления, инициализирующий каналы и запускающий асинхронные операции. Он создает и управляет экземплярами каналов, участвующих в управлении данными и событиями. \- Создаёт каналы с помощью \`register\_channel\`. \- Запускает и останавливает сервис с помощью методов \`start\` и \`stop\`. 2. \*\*ControlChannel\*\* – абстрактный класс для реализации конкретных каналов управления. Подклассами являются HttpControlChannel и WorkerSupervisor. \- Реализует метод \`start\`, предназначенный для запуска канала и привязки обработчиков событий. \- Реализует метод \`stop\`, используемый для завершения работы и освобождения ресурсов. 3. \*\*HttpControlChannel\*\* – конкретный канал управления HTTP\-запросами, участвующий в обработке запросов API. \- Регистрируется в ControlPlaneService через метод \`r… +- **plba-v2-explain-nonexistent-symbol** + Query: Объясни класс RuntimeFactoryManager + > Сущность не удалось однозначно разрешить. Близкие варианты: ControlChannel, ControlChannel.stop, ControlActionSet. +- **plba-v2-open-file-nonexistent** + Query: Открой файл src/app_runtime/core/missing_runtime.py + > Файл src/app\_runtime/core/missing\_runtime.py не найден. \ No newline at end of file diff --git a/tests/rag/__pycache__/asserts_intent_router.cpython-312.pyc b/tests/rag/__pycache__/asserts_intent_router.cpython-312.pyc deleted file mode 100644 index 3628608689e449c05a1640af46d62209078e192c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5517 zcmcIoO>7&-72eq&{%9qxL{hR9%MNKn$qp}otB~o6I z^b947HeJYVfLee7OHErThoUZekzlk=FRc#+n%)xh5H9JM?7{^K1O?igWBCy0)Hkyv ztsgo~f_8wNot=5}X6DT|-+QxvZD^?DAYENtiTh=a`-FZ}l3*3k+8h*?IF(b8&P}1S z2+=aH^JjT@3%W2Ro)w`^QN_2#vy$4VO7OO+O{xvvcGazVRQub~S%>OX9Z=&`n^h;g z>!3#+yk&UH@U92R7PTHE8$hA~YFzMk!CT4jfo=b$(+MC`jwBMvbR->5Cde>+yI)SE zwM6>$wezry_pWw=#D72D!W z@hWc$pxbn4vnef_)>J|@`h1^{hQ32IOhOS|n+*+UGvO3YPJ#pp&vb<%ai5CgGg`tI zNu_+y64eL^(S`|_Y$&afGzsCzL?}W)3G}fB3uCs7U@BuaSS{rSTn~df;2~bf=D3pV zx^ZOw$ny5Q>^DSzPWG=sJy(0>N1)|tE1z6%E2;w0Mr&XjR0Vj`g|#$}Ycml&Ou!PR zT}@6!;t7J;v@D}w01;=p%2TfhG(jbuKWT%E&Alk^G~}H{x!sW4S6~f?4DnD-K7<=U zV8a?js9?Ky779N>OI#X3fu(C`9I5DS2kdB#HB8c;o6-Pxt6X!dtfjK!0e(1IRSYr| z`-drLz7K_;qahA41CH+HxGN}&YC%ZlD1>GaRuCAl)|BRXD)9@n1SjZvhsb5nZ-t8p zEbAP6`Q-8NYrSur7=|w~ok?k?1a_X*0)oj0J55_85sf9WDW)Rn7@?E%`R16dKX>*3 zpa7cq*rk1Cv&SMNJRaAzFqIDW=*ehAC&z+SLAo8}0A!#2i~DSj%e!Ll&s>|iae4mo z@_9oE;y5~N(W$o_<;ooZ>^c(T_Dy-MZv0cBKKui!4=D$dZTzMY@7-gPfZx7ChodocjcHN z#&UAZf(KoGCE20C;PFE!tOrNBDh2SU0fk8l>P<;S6WpzGzga|h#KCtN6<35T$_g`O zipcU;?OFcGcZLJf;D^mRYVk0MCR5s~Xo`BAq)q#T25gnaSb^b8J8TT_6bXpTRHn1K zQKmzUW42|c#56FI`yg31Y%1IE$q+aI8Yvx+S0DrX)i?fZ+p?$FdcbHsP;5PHv>tx% zt@pbMO@sNSlOOCZ)W14+yd-;nW_7 zIRyj#U(L*eS<%D>HpV^}6z_&CAXxaKOpf6wapj{>wopsiLd>Megr2c>0#m5(pwcfu z_GQh~xbWt}P+or45TDJ-&sru~&kz(-40$J^cD+fyJRMcBg`U!<21W{u$Vcr)ZpXZR!A@tPfBF zwu6(QebMzeb-IY7IdCFu^04WSCKEGoN|=`q6F5H_rhF1`n1Ze)F!dv*fFl?2PFk{& z2C%_$v*qobrWE(|UWEe;jE?S{AgE>N!Rw!A9eR#p}Gxbsa)yNWG7VG0siYo{X26ttVHn0@xSf_L{>rhC z#ZVPfuIq)r1wzkJLE42+5$1bEsxVz8+=_y4 zg?iy4s;zDjb)!X8Dd{f?tA=D;1mr#Hh1+B8a@5m+b4>DXoKu8d$#pC z9UJ1#=JxYH(x=ExK4|-Nek#zr5N*F70qQFBEX?-nE4u0>>n98ZlZou92n_8ZK45) z*;owMphq$q4$}ZQt`XB=eS+Vh+fi{j600>GDXfjhXW{Zk1IsF++RBKsZb)HELq!yy z22o0!WC=1rRj8{N>NP^W#n6Zm8o8&8-PCfY&lFEb3a29r(voY@wS1w_=+7x*b0;7x z+3Sk-R>R&}wEGRa|K|A3GkN<#8tC;ecjqgiUddTsbnY;mJBrRdhI7w~?dELW8QLuM z58CUdXZc88X*V40Ii>ya!v?M~iU>{dUz6@P zZ(BOEcxE}aBGH)aRzsorg@+vP^j|w}D&A6K^OAGXx!nG7qwiA*Y99#D>w$yww5*Q^ zd8yk92#?MmUEW`ichh*VXR*f$ehQv_E7N(;^G5yiphN0@{IH4hsO3ZD?Qa!-=Yp(a zI?At@o;On#3#KrXnoS5s#Z2LoTFVt%wa2M)1%SgQymf>|vo0JSp9Y_= zg~ON~or$bLAmOEbF?vM`?o zsF+4~%$GCjWsq9sSS-gP+s_?6)@a9Y1SAnWgnIr50z&BT-0n{}=Rdi@H5)>^*Bl6S r(JYQ0IYi`NbMeTxR%b{3Xw8ezYlyZTdgKsjMZFz$Jo3t@n+^3JBF1xU diff --git a/tests/rag/__pycache__/intent_router_testkit.cpython-312.pyc b/tests/rag/__pycache__/intent_router_testkit.cpython-312.pyc deleted file mode 100644 index 4262ead9c9c76dfaef2a8ee840b1e37292e5b8e2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2710 zcmb7G&2Jk;6rb^a_-mcSO$z;>ty`sO9W}A~MFEwT)N#{5VyF4&M?$n(yi?=UUYpr< z)P#+cLo1~c66MrLEhxuS>7f!F_!E%0#3ZQEDu@Gc=q;j@L&bqNv);xD0*N`yzIpG> zdo%C--kbeC5(yy~V|NzwWf`Gg*uoovOW@}>fVhuzq~iiA;!%tl?JM|-!l=M$p&%Be zQK=}8%0>UEA9#u`-WEp#x}?jx|DjKh=z-hvXz)CHW*8+)v+^awgk@k*%k^nfgvJFYnk*TUgqmD91UkfN=rt^2Sc9dCMd+0iPI!=% zOQ2?vTUOS+hC3_pfqUWSEtuWOg4rE9&SBlB3ptnJ z%A>wjqfW|Bxoy-*8@7pHSto7!Pw9?-N^^n7;!-WwLntn#9l1PZeOxjeF`4O3IbwGv zIRs%37BnMQ(Q?FeqS~aEFK8bXh^m*0THY|7rcG9X<;jePs2`kB7DK0rSyEH!;lb+z zncnp9kkiaLL)ZH+Wct)(*Kk)~rpMXIncb;@RJuErPF`1g2D=6>IXhh4%*bFer6w

{M!hrhB9hc(whFoO!V;Ijr`Ag=@|Z&KOE1hkG;W8ZXLu1DU>FaKP0bq30|t zFUJ!jCY(H>709hbH{1l%r4prJ8k7N%w$979cYZ(=1vKzqZ!A_g?$j-h&HoF7Ijo zRcU#u9Ih&d*BNoNsvPA+dsS)Y#F46UWUHvPsBGlEqE z6GE?eVh+tnmgH(6WJ4=?>|3f8S~nWMjL?U$nvrMxwlKkbZ5y`V7OkMi^z3@Doe5ZB zPiD)Y8?b$kg{4~gVq{Ab5l_DPwF67F8-j*7(YPt`s7;L-@v|Wj>_CBt>1S*kG$qNj zG-^Epg2yW!psXcOc1 z6+-jGq;D`w``DIS3=8I`FwLU1mOVeTbUrjz_IJ+quPggjlmoM=wT7nIp7mV^7mhrMuI@Vd zI})X~yULt2S6Pehe;RGAMq3v~7E|Ax{rcQW^unCH9%#Oonm@hJ_9Xmc;OttU@$-he z4fiHj1N+yScHWPC5t+ZS(scN)v=IbD8zH1L&!#ybw;+v$k0Y%ei24?7qa3y|WEOjQ z*M00}GlDHZUW7E=3oFV{703L7aglZ~)~jIBPFR`@7c4ezTtYl9c_UXK^f*XbnF`wh zMH$&We|rANV%xVjS0nF#cf16WyS}ov>=kX_gy#`_cte*Szq0plwsrre$0-yKq+jB(Y5(|` zRiQ>~IyfH78|8}iPHZ|f9)sq^>5Bk!g&1aq5>+#^`TX>WcmMZ@`y7em-f1kBbW%|D zO0ld?m?Z-ebPTTGW{Ks79)f9Wg6Lt!XH%TXhGBxth{3t8IWl+kUeA1L{>(yrF|~MR zIdpPWJO!fLJ=^8&i&vg@B&!|C<;z!=JCZ9MSC@}nTMk`c6-Sxs(K{KQQ8+175DN%@ zyr80wg1hNpA#Yk^rbWj&lwR)K`nwUcW9gDX+;SB_jh=yBj>vY!W%qJ#1INYTTa03r zO&Jedun0H;w1qlN76vY_nPT?iiW5@R8x=SnQB}%N;2eM!(g{JW6o}aguTLj?UZ90r zW+!Vvru+P|Cu@tA+y1>bYVri{S#I~@k2dR7yn=W|xEXkz@mR~?W%Dv{)^&T1z6U%8 ze)Bv`8v@4oCv@mHbn0g`Rz+ja;)oX7Q_Yia@h1+P>N7`psb$Z!@hrG=L2Eh@D0k7 zFUm720lc9%rKqQpih3=UoIDpxtMOP;jhbT6!VAz1ztuoB%B1tw!?#T&3sPqJ3^#>T z>n_EmxD_G8|E}t7fj!E)GOj-ERrr=mT-5bakmIuMjC;y_>STY-b*oO`vO?Cad#v^; zpM}|FwklJV5w37qPsXGDLl>x9!oqAx-!}C`oE!}non1c2k>o)h`ztE&WU8#*75`&P-stGFg5(*&>XSGrE4{r; z36lDiz?<$_7@w?H5tZtUH^$SNPv2yHqvO4stv0*N_^kI@Pef! z!am2i*L*kbmiDaj8$Rw^EjjJ-bBufNyK%Sm$FOhsxIeXCUf5wi`#xX$-MFvU<2Q2L zpSGk_>R#c{Kd>yWWfQV~WkWWQ@lWlrDD6_&*aQ`@{(+1KyZ|vHYH^3nsq6)a;04qp zhwTM8cq&=FfF;W#=sXsk((tD1E3u3Lu#O^FM_X%+57An6rn;iWo}d~FT;h~Xzv2I{ zHMjX8nybmwRMcD()12}o)7s@$n0b#gpTk$Ji?(z}UK@9qG09mrb_pj&MNM zW|GmhU7Jt4Lz+&^o`DVJ06|9p9bz>Q)$vA?1Yg7?G`k50?)&9vLTyiz)Rf_oFGf2$ zyJqX;bh;gM!X%2MXBGs*OVo4ODSu{Kc~;*1Qqek35RK zum4>CKwtkr?*-|^;PG=O*LQI6Q62OT3=dv7clOl4@Y>IfnxPgo3Ha$<@LRnB;55fW z$eQ6^IsnU*&+t=}WG&FGpqr}{gyI6%_*+i{Z#f9H`4tYg1BExK_Gb9k`8Rl;yLCw5 zW?a8_U**GYL%1AEDu!=jIvLetspJ66gDN^SY?$iVV6M@v;Y+BxtjM~&;4)kh7(68v z)lkq-=zg>vXQVU zI~Nu%yw_Ul9xZf_7I%;4$A4TJpDc_|<}W1+MS`S%5BKs&^2Kek;$JAHkFIoN4~zbH7K-f)i&akm>q+`E+VGs;@%+V&>kvIh4D;S5J_#X5k*f`XmpYP3ey>n>c(0jhp z!O_CO(c4BLlO#SKIAL%H5}PA!~zZ*%F;VByeUv2F17P@!Sy z9ti`f;h!Kdf3K#&TG>$CN(8ECKBF;f(|{XGVZ7Vre24R~^%9 z2pmh#&;>0MV}pbPCxKBSV2{!=QH^SNOjoxaOKM<3=+ZSdgP}@I#}!H{O~z9f<+y|k z&G1W_JfUI_M({W_E3n1&6OtlEy)=;`30aq58;Q$F88<(Ic^raDA?+x)0DFv1wg4Iq z8a``#A-KQ|0rxzDfgph_A!mpv8Z%uT&Po@nu$S#~Rt^{ewlzu6m6K(Uv(jn!=zK;R zKi#;HT*G&w@wYF!7LB7{Y&#^Uq2DU_X|KWBnd9ECeWqBubME9_S52)jcjE3=uDYQl zK2;E(TB+NzQom)TX8TIrrn`QwdiyF@RqdJUyBp-1TmMqiI^TOU`fBW#v3yPI+zSBS z7wb!6OF?YO3w!cnORgm^?kNd)FPjalR)z&(&#i;3R-404a(#x5Wp{Xr*zRNmUdP>TCX0^ZAJ1FIFW#?VD!AJ8$}34!Fp z+IlbxclIvTpD)&)pF6pNb8l-w+&Vu_)qiGj_nEwK1_mJyhXnPTx|)P_b@k?$nA13uIeC+%|u?AU>NH4&-70^5V0(SV25c67XI& z8(6JKYYbmRdWJgTl5pVO$6L5ySi`mX+xj1JLKKklRXzoI9lWqF;}k^4_s|PYXe#GC z@LZ&l)9Ix#sG#^DBPL|3Xbg&HA8{Sdlh`#y&zP(lD-}OI`v@S9BkN)FRLGRr*&;{Z zmFVmf39+2@s8(tm=K+*NcTy#zogrBZt!WAnoM8l~_v}*|iMB%+ z3Jg+$akNVi9zdKbK}#JbQsVfC> z4D)6sIUbWCsDWUIMmZJ28TepM>jOaD=#M$BvCrjn^F|7XMv84C`LUNuV-tn3iTq@; zFqXQ@!C7jrYn9{1p}0Nt5#_r_&>tsH05GaxEFeMAi4A)ZKt#fkdIXrDG^)X?nv~M= zOgtqkMzvGkVVXwJ*2F=Yl^zKDsnbaIVNX2>&;cX(8RQ^>!w8NbI0^vBk0FlBo*V~Y z_?b??OCl$*u@}Kf1gHhl4?x3hrR+K}&#B`xE1L{MFKyTz1o94NX(jml+=&m+<~SXt z-Rm5sPlDWrMyA#~eV?`9MAns(+k71nr7&`@@J^5Ra0FCx9u z`6-jwwkcTVPE=^TD@LvNy+dfsYK~{bqPQ)7>`*{VclW|%3a5z`~bX!xV#1rrsJ4bfg z=i3hMN_N9-y~iry9NE9tvStMxR}Z~x%ZBGl+OL#=B0lyvH#uaf@XdPpeBF`-{tMt! zzx_cD(1G~rJoXnng3h+h)#h2f=dra~KFzSc#5|oBvQ=PlY6fPX4Periu56kPHIt;R zW?I!uH4c+$)oE(#kwIfgC}h(t`!efHPC}}a;84?Dr?Tb24XSK;8Xumqu`+ejoSBo^ z3{@%}ceBLa^taCIHEeE!+6nHb;^c0)3VR2E@(+x0?CVa3E{AA&w{LVTA*Z zz5Nh0kZuHYZ+{N4wR=0cfIQyy8$1oQSwP)Eo<}yi#pCX-p{rnS>}*@#^_W^A6?2I`>9#7*1raO-fdnA_T+`0TV45J zPf=0rgTx0k!7mC>ug6cM! zB$i)^uc1#92K07*L~k%_Nt>q0ZOo|oVEkNT{qA3f9JSY fxMgnd-?$U2o@V~w>HuHEzrcSIs^yRIw2%J+>TT+& diff --git a/tests/rag/__pycache__/test_code_indexing_pipeline.cpython-312.pyc b/tests/rag/__pycache__/test_code_indexing_pipeline.cpython-312.pyc deleted file mode 100644 index 60ae30de3c277cb4cc9785834783afded1924a6d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3833 zcmd57&-6`ox#f5g?VCBEQoVTu|CPz~9tsYdiYZg4k!IyX4LBW=o?1o$U6WB}#5;C#mj2_U_853K9 zs}rM>=CY+>zaKke;Qi`cPtfmIQZgZdX`s%ye3}B(f;mLPoY0ZLeY)mS$MWZd`#IStJd>w|yVFj}ZrPmqRx$LacB( zZVBf0H>-jRs9q#Fp5z|91$%cRsVYH5j=#Aw*ZCaxTka9Zp$CHk%JP47-Qj{RTezhg zs_jcG8;YfyMhq_HPB9R{Ojo--JRXTk@wu@N#;;4^t5a96kB`{Cv}VbwY{{#<&48C;KdrJ>IHa4) zdP*e{F_*ETNhF)TX{LyzsY#7UvY|>~TAa<8x?z#f<&>$&DKZ?|71;&akoTbbEBZ$P zJ@34?q7>s#=T_&Q^=u5y(4m?2Gc#)oKi^nL(uL&OqCpqTHIiRn$UjtQ=e?b61|Rpk zu5e!*y2Aa*dj-I?@nQ!CL z481h7{_f1fFm0dR*=G2DzpIz~!rRN)4a|*_mCb0w&MR|+_fo|6me7XSKHXT|y^{~) zv?IQQPXepmkihUd@0j?O?Ja|N(2rRbw*5{RN(nus)jXj?r3fFNo(xB&@U`jK$8pTk z89u=}=3!faFtun*1W*S7ek7NIb*bqqCjY=|eQcw)2l=w|!T z&8Cx^t%tW7P~*vMS_l2;EsK zoOLGNrsCVh_o&!Ug??uuNX1}rhKd7J7;q-Ksn}igP%%V>(95RFFNn7x7{mz zv?+G3{AlAyFFn#*oTW!DQ1Jp4F1&1Mhd_CJ{zd!jddqC#+9o^s7!{ALEP(K}Gh=Lr!XV=3GD~fjv`x%rwDJgrmDB2v+(aS;Gb?UE0wnLCS(`EO2dCG2r`P6hY|JOT)pF1#94QqpnXNu6h|5XPSqg05liBZ@KSj^j=Qt2EEdhC->orcn;x}4HT2&%6T zSkc0=0@aabET>7SUO2sYA$R-aj-pvJ^b0n|`HksimmDVZ(hw4zQX6;4URoGObZpX{!#U!%~Q* z(#+Kw8b?A}Bwc&8)`G)YUAq2iJ-{_G^8s^}ouy-ue;~7w7;V;F5GT%xvkC#YeK;%W zr!ulKqh=<~t2sqeGm7L)YgHf<6^7sHlO~kGpxwa-4p0E83Ur>DM69PCIV6W=CQtvi z<^f|56+-#YF!dqGeuI)i*P;|v2o1q!*R5}Zeb3N^nnJ|a&E$5U!iB!ZzBj(!cUOCE z{fh7V8?Kyw{WbPI`g-4e{n^kfzVADqmKQwCf9~g-Uhn(UdVD4KeYY#6-24HB`GFg8 z-I!3Q&(}}xak2bbZrKKn0xP#d^k?&t_j{nld`~6PR5d0Bd+ocKOx01=^8LFYJcQ zbgyr1F7(sTLL4&FhC*203ijII+iRi5*zaQbS(=rZ{zBd+Z-3!zEtoY{$<~Z+cNW*y zHq0}hp@8gd`v#Wm<(V7c`4;bGgD;%_)w(NiYd`;!cf8gvMdde3yKlVK?&fLN@MGGW z&xvV``Npa-ZKv(O^Q?YE-X-%Je0yG0a!y{+7yk01?ic6Q_~jMYS@4`R{0iZl0VuY6 zL~Mimh~C~_R+W>ym{a4|RSm8SCgKuNL_-nO%yd?j6xNu{DM>z;)l_Mgm9uG4%_MmT zmj#0N^(4#llBj9A0Bo?q^S$dhPK%lV2>lGn$7T#O7I{CbUstUh?ve!WegaU6-iBt8bGs(4rPk(15%v% z1R+_%zb6_*oxxe{B?5|K4di)AQx)KWOMc#bKz67P7~=9!g@QNlxH@AAj%%~$yD+6G zI?ML*X$7W~ye*15s&Tee1`GnIplf>#=_z1wU4aeORZIDE^`ewk5;>BcG$Z15sej<$ z+)f$pl@iW&CDt2AJT1oqRHe$Yub|9v+w;X^!#v{}h)8oVEhDL?=&JABWdqNmGe)0I(b0^sXZYv@jis=NerOb$i z7hZZSY=(ghivcVS%|%6BSBPO@ACBqRc^GDVd!rfOIX-kzI5jeS;(P061JdM1q@yQ> zE}l9!Ql0u+8&RJ>clOlKl`6!NcQXeI#zh~5-|7#bI788JbC;*CK`sL~b@U|kJ^dK& zT_aWPF3!t`=wH%zX_{K-W~f=}cj24#eR>3xT4Sl#R&`sI9l0MeLvc_$S_MwT^G~G2 zB~ZMc5H)2cF|14rXg`W%=)&|sLR5K~z=xdyuaM(mL{fA;fddm@7YPHbSWggf!h!_k z3f{-Q#1wMQEoMA7`=tIT;43pZlA0SqA{*7k5Ux+Dnyd?wXoy;NLKufnOBZwy0zNSC zO&M9Ry;%IHmIZ&Mr{W&Jw_p`I`uM+7|C*;Bc8uMVmPS9ha{tPwJ(c9;Qu1=S_wq+l zsbg$y74Ix>?>RvKy7mBV)~B;Fd`)2ZbK9TqLu2%l(6M7+Os!}R{V|K1?rtY-lrO98xmo}Q+hon&DrY1~QRTkkpLk^9vB5b3n1P-YBg z*9hL=5sXj&ZG9$z=V}KOwmzfDMdQw`d-8JAo>DZqwu<+|x1-JU+=0ON3d*oO0sy{8 z=yATF7+WyIVrKT`wQ@t$1uF)O5IlpDE+{r#A%i&6J}fYEf9XXu62+JzVAWPM`Cl&N zC~7OPv#F&+cYd_Ece$y%6iuyt#p*WObrC#R#loZwm25?cR?Bs*^Unk&-}KGK|91l3 zq;u?^z9fC3-d8_8QW?Bl8oXSNU;aohb&jnOya_iO9494Uyj&N@S8DN z%P)fYYKp&5g4Y`+`|aGUDNfME`0wS<3d~ zDCtF^TCCn+kTV(Z;D%WTX^IFrp-9l75jUcmZv`7~o2=uZfmM*CFW49`Sqv6}fv(Zy+}-dE+wrKe_fhkf z$Msahu2rh0Au>PwI7;p9`K+<$-q0QCL-ogMv9V|V9VkBM+A7@s61Ts|^cT7PONWbG ze}%z!#p$qHURh%L7mnDivJWm>$R3gn0L!Jr9;yolk${6GKv#+DDl)xAu4{3+$n{nj zd{>+fyXBQ7rWXZ3jIs|dTgV=g4FJo=pbr+ewBGDh$3WPKVv{ z$`X@60T83?gUc4Ohhzi5a;eipb-^GKaQLF71Jahoi_0Bj<(9Ge(~r0g+nDa%DskT| zGG~g3GgtzgI8)-zR2Y0$+#b7GwwgBl&?2$nUFiU#PcBDOMJ9#Pr^+0H zB`#HA{C5Qh?T)e!E;A`0u)7}uyq*U7q4SH@P6#-Q@^a@`xpizF_NueO?J9A*7NaFD z0j30{XI7q(dd36@YhUiBqOr9v+o{$|wB7<9>o;w}L1v|6k8p%pITD2ulFo>onT*6Z zvknt-3^!x|kj-s^9iZa22Zx{$C(2Et8W3!}E<8wDeWVX*cEN!mZhLS&4kv^-o+a@h zug8_lRN6TXc0Y~fo*v>DK;m9d!4PV>TPyKfg%)M`?RxFDu1)9Hwdd Y&lL3mwL%^G6Ls>RktE$m&cpD(0VX>8^Z)<= diff --git a/tests/rag/__pycache__/test_docs_indexing_pipeline.cpython-312.pyc b/tests/rag/__pycache__/test_docs_indexing_pipeline.cpython-312.pyc deleted file mode 100644 index 9ec6c7cdad75427a2a0e6d16f25a56e8f0a6b074..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3666 zcmcgu+fNi%7(cT+EHDGRTm)0KIEdnI>&_xt+bm=g3uy7O7(uAEW-`uOhnOS6U zH{BQ?OiE%ertru^+dyn%{{Y{7Y#$sULMECtsSoWNar;nw>UU;lSyV7htes@OIrE+G zeE0J^=a<@A2ElVI@SVD~5~1J8PwDZvgW_%&Od}b|l!g-2If^1zD{>WM4JE1aSFU^ue&njlLFC4;iCncU$E=fcvp7n!xNq|;zB(ti zK5D8JDzK&ORcZ8kFIm(G?mA{~BumeVU2`i$Z2x@XXrAi88WYbEN zOQ$qd$}(~)A*#tJ=gKm$;IbZNI8G8ZO&357`QfcQzv~Cn*2WE{6^R?nBoZRdGK?djb7GQnorQ17HJ%|0PAi{f z6y4x@Qb_}Yc81Au7ga@*xg19VgAWD~6)S|}`l+UpTn+@m4Pd@RVMa`(GD!m_WkpgG zq6VX^q63X_9k7&G?!!2Rxs#%S)d^zN2@ymTdm_h4nyP>f67pvDVA;VAP)NcfDHPW1 zUQ{P+$4P9Cz0(;@(HSPpB@{3zt(Ay(Q{$FZ1_=zJkZUJ~L zB#l#JmQTDO?e9D=*&+i}M%;2mo^KF7A%|$I5-aJHpvo2_r4k9%5cEr;MW;pMl2s`| z@*z}d4LzYb30@w6xA-ZLH|blzim_zufU;v|MR?pe@) zk8?<7Ls3gm59FYO*d!q9JOjQQ;y~ zTo-i3t~+d*q%1g_i|^J_u#NN>zozd!a7Awg@(236fF3lB%t&*Cch1hAy&GJL4x7>8 zh4An#$!r=~Et13G+OB=n_m%r7t2&XAp~z5=$!(i&ZHp#b!16ifH!cr3V%N$8Hu98= za@06-)677cDU#-p$Ese#fcQL`_ux8M3MP~Z!%ZnBhX8H_@?YmE3Ob8TK%6}JqqD}1 zt26RqV3+BSt`^Awd(B@*y?%(7L|w4)BaXL$QoJ3=8;`DwSbCd~79g)3L@ic~3{L8T zjYR)vAl)Qe>&g_HJ9y*s+1-nQcGDkQeMNL{8YD2e3WdD5mL%B*i3S@a2K#!3`Um1d zf4sNvV;msvJLvG{S~*6Hl(&5I$c#QG-BIV&yB{od4VzuV3;ggc-E1CN#pKpv)woC^ z5UdT=VAAUrW8)Nbs-~1Us_Q#GRn70$%+roHPaWDA2YL*i-mu#lr>Y!qJrvDO9s%iET02mgTzb%Z=NY zYs1TRTUV-4&CVjKsPPqgSNv#q@L_FmrssxqQ~g4{UmGkO0rH4#Tw?c{?B2OUCcEFH z_uGs%lWm(FH`%aBhiyi?$+ph{=`iUIo3Y1a_slh$Y{aA^PwJZhsAq>3n?@GuM+(Q5 z*(S%CnX4xI?)}K|2kdc^K3-;n=JvVZ1GdwoJAZ3`=VATO`c@b;y9O8d!7tmUgWm-2 z*AEqr0eQsw0r2J~7yZ#iHfqw*jTy0@ql^C7A{#U5*pr54Xr@_tv3X>nVWa@|o0r&~ zCcAUi|G@V9J{wtm+KT+4)u&rf!x>5^b^f8TZwGy^dRJd7eQ%#1DB!=(!IgNZ!rCdO z)4bCGIu9o(Pp$yu{-yIuGLz7qJ=XrBROxi(NptXPJw{sEF0PHaMfgK@w>+!rc5KA( e`@kdD3!NM~D_)AC9;1Vg(b2zrQK|zU0_HzMhO-|4 diff --git a/tests/rag/__pycache__/test_explain_intent_builder.cpython-312-pytest-9.0.2.pyc b/tests/rag/__pycache__/test_explain_intent_builder.cpython-312-pytest-9.0.2.pyc deleted file mode 100644 index 6bcbf1c4d59bd0206d9ed76d7c32809916d7458f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5982 zcmeHLO>7)R7Ve(u`R&-m#0de+rVWYX(TbVGPU3jwAXxFUAjpMX4pC5VXS(d^$xP3v zy2pu4j}#0C&;rq(;DEH|fJhV}AtY822hiSD;?nK0HBoD&jkKq|A!ScF?R!;S-QzGA zHj&UCGU|Ety;twOs(!D!{=OR-DN68r@8+l0T3V9+g^c*6B5>X z+p!uZq1C7vR^)&}KcriKgnoS}xw5Fd7J;thNp;k?<7dj(BHgZRrn)Ilt}Az_0NYJ_ z>3VjET=7z#vMhBoUdH*GTM!y`79GLy(oB1qMcHH)i>Yf-D+4yWw(BG3r9|({jQfD7 zukRKpDaCs(OU~W_pARM)0(tQp(?QK)t;d?S4DBaxH%vDzdioQ3iqJE&A1kX6({9$x znRzd3$&AandqqzNJna**r1WyalPK3tfu3<&uD-97tn8*UA}hf2+L+a>vS>eMOlyMTUYM92U{Av*#gBNyAG>Jn3j z7||8oU1<|=pq+~2d^L?hIf7({;)eM4V9X#l6xXHauVVI`tMcmc9U8OjYNKNk-6am@ zNwXZ0%`n>}rqyXeZ=c-3fl1nKZCm$BV-(LgVdfm3k-`ic0%0K@0b%j!_6oMA8#El# zt45=tQ_`l@R+aQloXwXy~@l zB;n{YZ0uMq`#DNmG~A;vwrJCEb%<%huniY#!d#T{FvD^ajt>iXII=A=VTQeDNey%C ztq7%f5(`!AARn+t2AN}n%!xr}hBLfhC;1z4=IAyLM+c2&2aQfRDm1MnzuVOcejZN6 zXpoDQXUVeOrmZ@RAxB@HsTh`KQfry84_Wfx`=xhkkqtIo>^%G~%-V$CP=B>(^i7aFe-ZPBy^mP~Rg^x}K>JxnhpDoUF zCZ+*Mp*2+KC2$jUxpV`4#p*Etja%?NNL3`_7vCcN9qxqg_7>?!Zje%NyOf4=Wg2$R zil@L?23upldS0NUgxew|x-Hs%mca>#{pv%`2-|Lf691#ZCMmbw0wtP5Zk7^Fb_=w# zZhT)g@OHy|#+TVK9q=?RWJ&4$*zOr`fs}3{vgUuO@zqj`E&S{LR~nnQ zHUC@m2L^xgzx2NdJ_yzZw|l>*c=blH$85Qxm;*Y71a}A}l`Yg1&ja)zl82Gt^##S# zFntUOp2Fy(NDd&;fRu7{3NbE$^hqReIF@J`Nd?KTfjF3?Xpy2v0Ef@)xPsWmxdw6g zMnu0*BR1Qp!s2?~!Bt#$Yotk!fgkL@^JgGGSVF#+q=}bP@JWrnlEQ@qW-C5(99}=> zD~ECBIOeN|`wBi=k$`hC4V1(9Eu%&+ftyU3i#HT-7wg9WROk%!s+0<|l(-#gpDq={ zyx6_4h=vdAJeg&_XMpWUnUV|Ca$(yOi^5zaWBCZDU|(8pw#*KMrwj`Szy1adj z=DEZ*mPP5R#CpRbe>=ax?Vq9xP>*-b&O<=HPs_6WPf2=P+LB(ll`YB#|MN&jo@R#s E1uFl|W&i*H diff --git a/tests/rag/__pycache__/test_explain_intent_builder.cpython-312.pyc b/tests/rag/__pycache__/test_explain_intent_builder.cpython-312.pyc deleted file mode 100644 index 44339876ac9ac99d7596eebe59391c217194091b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1034 zcmaJ=&1(}u6rV{pA9YP>B^1F38&gB$VFL{q3q?fGqF^pk52a<))(L zA%uQQ=Ul+|rFR$17eo-jHB`q77$c&P@MmQq)C%Pye|(e3Mhg z^B<)#EYi^!HOm#swRu>0OWB%LruqsMh6HGqt(lIKHyx|b)16j(Y&b+ac@?)kHq7*t ziV%($ty5w(>$y0S_3K1>%$2;H84yJ_m(fQV0Sg}HJ-cBa zXo8t#!41}E3TpK4W|%fH-diZfo?5gRVcYBMwizg3fTo~$%tITvSkOengaMgmV6uRp8 ziJEoQ?Ed5ZsUvmTRiyslj<0_d$HPeF&AjnFTQPE^}DHry#P!GM{Ak7-( zI;2AnGNBJc3YdAq>kAQlI29h78Pv?aroNl^zS%A$2rvMx{-X-B3H1j2$8Ad+BqK}wVt zWBF(-B~GO_)0&xh8a00+jgzUReednN_I=0hKZimA2Cjeq_NB~&4Gi-;j2IWEBiEW)hIxe% z7=ayO23ZoiM%^hF%Zze^9+u{K2fZZ6H|T@VHR2zw8LT0B?vcPKKgbiD8wrkv21BFa z!SHBgFfv*@SWD79BXy(ogY_(v_GMQY4Y0!OeHLzDgH3`r-8|$Hd@pi?i-d^ahj1~3 zH4rX=FaY6F2zdxwZos$O;AVv`CcWr2JsM<$;15Huxo8x4gte0nT@BsY;yi+hr(d`_H#?D~;hQb?T4i6^A-WGbCVk4?rnEu563 zw3tr_xzS{1OwyY5_)umfoyd)iOeLgLZal4p^z;njt<~$%d|JvU#&aW?6jl)wC&m&| z`fC&Eu~b^~is}4>IF{1ygalrIZur0Uj{sg_@-VLSGVY0G@|aJqtTFyZ0)zr9xQyP& z`fM3GYVZ-3vBsdQz?-X%_iK8q`VbfEW0 z;<0s!gZm!q)fkQK)WUoB?cK5K;T;2sfxZL1@t8-%+tOS)N%Ib;VWcKCkCYcP;~IA? zmm9gvT*KCWDs(&w10!`LN7AP{cBdy3<6IX)hRoK#wp zIxu4xM!o|_Md}cf!vssvF-wSKLL}1b(utvw+)1f@d`fFhi~yU&FwC43%p8~$$zvmF zL0kk)sE2>)VE|{C54h$zZt(|v=zRCNZl!7M>nmsZjYa-Jm49%S@A-!YmES$XPyVX$ zSI2&xc`u_JJ+5R&X5*v9xTMCV+4#ilzDb3f6q|rq$#n2T0+|l~Q(HP6hGC$;&l(;5 zB+wL?0$Xrd11Q51HzoosU{}E{vrZGHz{y+|r(M}q@W`Gl)?aoNys}&NPBI0b?33p6 zypf#^8kiLdZrL})3LKUga=oTcS6i8|MQdQP+qf&ildm&Uv)I{Xmob$m8L7#}v$2c} zqO#djqMg#Ic9U|9h5D_#bE4&pmR6wiR7vMG=mhVpp3^WU1;5}E{IWm8l2}b1ryaR$ zH7+*NtWd5oI2qyd@K89#7ToafgMSYGJq0hB6|O(BSy6M_W`)b>or<%fW9$3> zm$L%)iKW(DGO+A21GB>2%=tjdHO!=3Pqo8r4akA)3M<#ZgaAHjB=+S7$d4MSRw(d# zek;eIC>Q^K|d8#}Zc0+sZiI_y6O)UubxhBO@6R8igh~qK~A%>XGyt zBWQ%>dwRhmG?SG~#`Qk4}l&**`WJH&|$jGkh_haKsR0!r*8|zjM z8Z)L)E7wYYAuJVIs^0&W*jB8=$trJ(f<_&py@bOWzrF)Xoa!;LY|4vBaOZ4q~Ivj3U|XZu~znw^GJi- zP;n0p$_;QHS&3zAeSfE)Y0Vv^!WfzBuL7MZ5ecoI(^D}B5>74rH^BHfN;uj3js4LI z;XK=@pJ!ngDm2QC*)>+Kfx&sS7S5whg+}2Xc;33@rb+tztaKKo&(C|Ygf;dRddfNx zt-5XNv#IL!X;Q-aTqUgjoX(=|f^Q0B2p0Yefs@x`jVGDdeesxk0tZ9+p7O5xoboe( z&#PyYx1#Ec%InHcl%Jxirz4dU(*VYXGQ*(0ndrg--&fvLey+T!o>55h<3-Mz%x1$?IB5V-rAbQgJnA8sHK{1n_OpYX^@pLLs zXa}7mXe=eb#*_KuRPh)nXkIA|Z5A$jG&fX^U_FA32sR<;{xm|>k)#2g&_0a=%1+Ib zKb{cVeZF)RD|*a-gcrC-dpc?5D1to)~+&9&cnVHj&;5v{7rI zbti~AG&zh^uvkt z6ew(k#BosJLBCw)#Jhk$shQLyqBvR71{e{s6%tSTjbViQ^N!{6Fl2C#j~nfxDYrOc zH)~tUROLeLsMA{y|JP&y2N)Jqy)yIE2H100kiH?U{1O;^!hpK=E*7*|SzX<2rxIA5 zB1|ZBU0Vr-Yl8Vp_7#?8Uhd+UDc6tOC)t==#B-tu%t1%)*0}r>D6_p%ZbAeNH3ypT zF&Iu)`&!Mbk1kdnjf%|>d|I;=)T!xH)fbI-{SdD8hnL*OTFV1Nl~jyzyOaV#PqnB%8iaE#k5wFkdi}bOwocsnK(89`xn|!ymU5bixblE z+{B1LN+pIza>rn=8%vI+weSvNb%8yoR}^!i){q#=iKD20KZPrw>`q$1>MYHt&rT86 z5F>8HTkycnIRS>5l08D)f>{BpXSERR4CIwbOPb&4n^?2v8On%Yd037tQO?nLybU_T z*4iT*?2#^eWV1c8j`jn+mCm&#v325RtfsB3noe4t7SXGr5xp83DXC_?z05{&dl}1( z8kfnZN5wsmF5xncI$mUjYs<*^-e6gaxKp7@TKd34tRO9`ue!LJz%{pbnOEf&pXoi@ zbz$R2wT!1_dZV(kYmVErz~7~C2QGFMTQ{q%n*mi?Hy2yCtF7A!zP;FbKy5vMI1mED zA1HG8n>SKube2RZZbHhKkV8JyLC`r`2f=3$-%isBu5&k8P=qvc|HX~P)=g^bCWYIt zv~DW4Zc|&g5qw**b-&uWA8~9X!2LxIfAdBPjn0xN#Z3sMfH5J5d;^`Mb&%v4#J5or zg6rH(78F_N+FI<|t9I=zcJ--UeZOazmd9O}_9*?27yF-9`=3^hjn4LuD&nc4_^c{E zdxc?kyNkGL**e>wE)6Yrf+o=VTg(@J){m_4ax zPeN@ndl+x#1Oyi*Uy;8pLmCt~(?`RFyY9Yt=;AhI#d?KXf0l&&`XYzFc|C!~OsHZq zjm=u<9Jd~Lm_#N5)C+uVk#AA?7KQ6p_?9BSO66ApeyM{bth&^p^4&!afAdHI2{dLx zmFqqWOB*R>Ep(2uBgr$QASD6(Iu4KnycgQm7TdO|ZQF`%ht#%1@7KmJZn)6+%JOe7 zS8C&D_5oPHR<40oUWA6MDRTIm*Ar-Lmc%G-LMU?)T8Gq-Z=hy2AamTBPp&rLuJFm# z01m(>SG`PKA1k4-{9dpz*}=VccLZT)7+|rfF}Z;&-XB4@B@FO48yb?`Tnebo3!M<~ zynF3Qf2j={T@{8+%i5E0utXbni3QtjS+H&CU{SWxZ(!AS2_BHmT{3ZVKzoMtqdc~R zTv=#I`6YN|4m2}9EMrOMg5M^e2g}PajG=EOHfW2#lMd6gEQ40eqO851r)8}MsoP(H z*6hCube0~WM%Rpbgn+=yo(#1ud-DxOOKhAPjWjEiO)IsbMbP!6F0?Bb+?KvoW`*D| zTQX7(wrVHcHt1n|x*nzzW(C+LoUD&R2qhjd3b{^J$1usQgWRaqdIJ+8B-bVTK%283 zv^jpL#V@7N$|ls`wlOztHWkO*q=YfA*TM?P!_sf2vVF}zWvC5)=P<9n~0ky@v z9GqZKizS`0jl0wOXoPjag5?TISnI=9#%U%8j5$()&a{nIpfmN5LbE=LL&73qvCS@8 z?JT~LT{Hl*n1_FNAt;2Q@7S!voW=giI@w1fazKuN7M_=R&;(nn+^Ij8$UOAtQY>-n z{dvdlOXhxK>jkG75;10o(4uRCy}~kKx$M=~KyB4)z|=h(9QA$48c}c#yy=LVwk&I@ z6mES)SA035wEw<{5jFM3KF|^06`w%yU-_#N9k22>>TRQ-D}G)1F=~w=d{ccsx{GLu z4}mseI4w@>!h#o~>PwLSZdCa>kiQ#MzeQr8EJhxG5C89A=HEt@H$aj6Ht3Fj2Fl@g zkR@u6mAAHOzFmF0dlQfB(0sf5cJ(9T?f=TYfn5)aF{mNNp6=H5PfpsO66Nb?PDopN zAJmqUkFs13EFP0rTm~ED=?FM5Qf3 zd)HulL2E?Y3y7|*0xfbost2Ko8HwmgyFjVtw)9D;OzSGCX*1}aAaS#Z4hq1U=*Dc? z^3SLQ2AxoHOafgIXn@5IU@fji(2AfPYigv5E!>W^y6gH_Jb;7;5yTPnAvlcS5Q0Y# z96fB|-)^j(+);Mdw1{cUjPLhz9*9yjWBJWbx`4xw7-qcG#Czi{vLk~yyR z1Fr7Es_EDqch3S}SL9n&zE$BmE}jCQ@U0h5sXRzZ_?y=gXv~Bv*Krnvc%+!M&^ba( zlV^~fNpB)R{Q*~hp=)~2^k%62ikDfmyx6>2ZC+h$?ogXMe(&KT-rol6p;_l2Jon)A zeKY*Zi<3W)|5|?i*_qXQe%bZwp7(l`C&yLIHIXZBpg*(s3IoB10Vde+Qk?#M zJ$`l*VlU_+OjU!SG04n56&I+;up117UM5=(6qp^Zy57(=LSK z9zZT|ueJ%Hc`F^+iQA!r^VeU?ya6YU%h_Oj_@V%)b)xJBn_4~!3ci(?wPEn^zKZDVRzMBKbzO-dM3 zyUVK6Sp89tsSqjnZ!oSka*dOU0>;!Yb0F%0({sgDS}O-&mDXViYn9q&qEmmG3IXW( z+qIg_@vOL-P0A`p-c&wRxFc(o)_+c`)DJ5Z#l4!FuF_@J{$^k(&hX zUTZ?5t}fxL-U&^WjMGjC&nDJM=~loeTh!=PD}*Oo6Ws+t*;LJQt(iR67L`5M?(~&# z%i~h@iunSbYg0^YaolvVA`AT2)!zEA`>0#n{V2GKgkLb=O=qrR( zd`349OJ)T5^+C9;J)#KkvhIykJ=gSPM!+{q^%qXTKT3pmO*0~WpV1Q3;r>A|CC(lw z6N`8hrGo8O5IcaNvOKKSm>nXXgd$p`tbTai)mD8hSS|_^DVWHvDBn_1_^XH!!Iuci zMEXTRSqcKMOSV*~U1|!oWWYg)9Ug}Fa`E*|@#|1x4;C$2qU@H1U|)5jEWFWqVPZNn z$K8k6ztNyGenN?<{ioo7WR) zY!+h_H6i6hh#?!85_FC-CHM^DIzO`*Ai#Se(o~E@)ksv~+LTDN7->@@Z3J&qctljb zt;kuwd9Lm3Bu$vL&^cO|(9Ixj6`-_0KzjdfmA_lzHYxnwMZR6-!GB=W>-Um`b_jX6 zHT=yZ1tidz2~}nnTo`|}}#ChK5beNE3K zc36wQgYauvSK$zBQ922~_Cv700N)HUDKDVj;MerwwAZ99t79&YWUi$14))UYpy3!G_<^n*2War|S@;(|32M5DLSoT&Wd zX78$ej7lKo2S5xK#y7y!_*3;|^{n#dHW9rzL=>~MK)m9I zMFf9>fEd>zRZA2ZEJNCC8P!slCLlmjLqZ*!UBCdG${5|Ii~-;I8KZBy>l` zR07_B$iu5L>2WEMk>GnV!^iU{(+I_vfhRUxN?IaF*FtcmlL%tENPoaBo$dmUV{oIj z9rMA<*gWR%zts2ElS&))KwgbVi3c*KlsOBl+nyfySKGE1+u~|l{QcTK%QvwPeG~gWH{V2XS-e9I-f*bDa~zr9=XQQ_)yLEw zW~ohVO+&n!I~~_WZz+1iuP^m@xBSjAb>W);X}LxqryLrk5cOq4-H76lur>4uv+` z8g=k=w4>oCjT{a+D1JD7rl{AgLs0UG(z#j{z)UNjMGENJoJOxmU(Q?Ivm!G zz9C|a#na(%E}H@e98oPwr`k#82B8+{}LUg3r@T4nUF6_S;Q=issnR^Af2 z>cApY&8k~UR$a@NtB!W$7qRM0aV8An%(A$67OED{0XSVxKbiOd{bb?;_>Dw(P1sAL z8lM;O1DYerW9bnpy`aONh`TzKEpUexaaoG@B0$+j{04$=BG`psErM1AyAf0?dBmDT zJU(b1eA!g6$sRzsSOgJ_hy1y7&tA^IjhSr_gL)`pK!Q_gcscl|pyzirs&vf^z|Kody z6I>Cgh2%@o>CO?Iz-I9Y_*xp$%6s01zWceDOT^Q9Jhnpf8!w3yUtDcTg1%wiPA#qA z;|nIulOnvotksxFnom!os~R8MnwOT-@S`B@;7L6(l7;;PGrV2Lu8?gs74}YA)>wb z)W4P9{X^nK$Y9}L!kzYtn`PO5W0)727ixaTg#Lqh_+Oc=e{gwNcncH2$3cee{%xq? z{1fM%D27(4p;c!BSG+FvBzuv&#$b3Y(8NA)ZEYj_(6#njcJsAWVRjdLWhLYCztr+v qOOb6**@l1dubB0NIWD@uKXJvwxEil9ZkOw-AL(lV`w%hG*8c^h{8I)1 diff --git a/tests/rag/__pycache__/test_intent_router_invariants.cpython-312-pytest-9.0.2.pyc b/tests/rag/__pycache__/test_intent_router_invariants.cpython-312-pytest-9.0.2.pyc deleted file mode 100644 index 6b507909feb6370792c6d0f35b3a61104bc9a184..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 19316 zcmeG^Yj6}tdNaGDUG0u`^#Ftr0x!l77K8*s2(XPU5JKj_l6d)SIrgyZti+0a$UVCP z;oS;nd^xyt0x6ecrOK61$&Z+FB}J~z6`wEm8UKk>`H>k`V#$Q6q$;UOQmIO%OfF~h zE8o{WuU$qDIJmm1cxtx$>+Y|=ndzSC@7eozp-_;6wY@$b*otf?R}rHRN@WKQhHf!~cO~2cto~Ev6_5l9S|YI+n~x zsn}G4NE0M6nmnCQ^l(M1qBk4m(PSziWizQMNr`7C68ci3{zOcXXxl_AcR~*twaH8_ zk;&;TMlq9>l&SRbY)U$rm^zguvcC4NmQ*5kGB%cwMoBg;Au&a7GLV#sSVoa1W2vO9 zH=1?%k$o zWPXhQ&?w2C6;M;;a)?Qf0w;SvG+q^+%hfpQ1xGznrw8CW>I>X>t=VGdMQ_1d@Jw<= zp&%%Km}@k#$KgY$K4gDE80F@n*3P+;wjK1-{6a9qJ_janeL+-x6jF(Etu&;Tbn zWtoF!tBqko1&>LSI5FL>ZeeD4IUon$_nh&;xYfv_Tvw<`^0eg3tuiS)t_$N^eH47= zb4%L&iw*iyFx=9m)D{NAm8G%&jrUy}+5R@J+3CtDS-`frnp_KgC5G z27l2BNa~+zZ>pbZKTtnaKaQwBS3iqrZ>d++pQ=C8&P8Gq6P@uaNkEbrO^$U;OcDHS zb${Q`o_^`zt~*V4W9YT}`(Kuh^dEX5kDsYY?Fz4Zl9?;~nWo3rO-yZ$Dv@L+g5Z{@ zq6c6xlX3}?R<3w-FEnGa<&Lp}Qnamr29;a$_???XwR2baJHAXd2gHDMvq_rOnB=2P zBm|uZt|tUuXpZ2DqX%I@BU92uDwfgxu}u6#mMFTAn}Q{|23E*?LJ#&%OwpwPvvwUyHV1N zPaxt|*($!tS?FQ~MzY&k=uvPGBJ8-6=sXJiOX-ZI5~n-&Bqo7(Wycfo9B_!P&R8-c zljLL~gKt3uTH*;s>BNRHU`U-fE=nhfjZw&8AQH*uVH%+{86(M9Ca1tFqi>~SXw^ya ztPIQvxgatp=~NPucr266Bw^H$uhCb5bitkCBBitgBRR|63awCA9#C6fD1`>Ud|eA2 zJiGT_g~m%yOh;#g$8HHN)6MFdtusQ;EunR~M_s#ZM%aF{y{p{5Q)}N@ZtvIH`)@SF zFF)~R^WU%h+m-4|$4mQ;Uuu4@?VUEYA%1orBsaxns_^Lfr>0k^;-h5&&skPxg%TDR zXr<6$dWF?&f>tvC(CenSTou-xe`b1071xyoJZD*%6-roOpp`<0=_#w(1g&NOpw}&- z`O@T!u=ZstiHl_;?w=t35=H|z>C4;&6@=EhY9F*G3Iy;|}FAFe^+_(!T$59=R*c42t=m$Pt zTkscZ^IS1d2q@PaS9Tlua3KH^Q9br>jC{ib8+nTZf}}J5Xj+&s@(l~%3MOA&0MEZj zyjl}aZhT*$GF4D+l9v>MhJ+>N7CV!oNy*F&2}=Me%MZUmv9^NeFC8Q}ER=~8oFF|g zG~7QZ?cH~vpP(?SH}q|i4i6nY)YmWdJ%4m?|6yRTo}D|R2H)NUe0%3kld|p$n64Otw`B5IdLvu_M~(kOoA&Qz{LF zNg_v*31Iw^GLeYuA@*n}BP2nYt2LjLpkzfJ!{iA}p2P%J9*#VYNfZ;*K=t~nX8<+I z@d(j6df&Q`%q7xfJND|pUJjPNnRH_HrmE^KPMjWRVXKqVZ)Y+IlL0nwqCCOi`!pk) zk#2t#YX*HZ!&ozPqyv#0O(tZ6Tc02?B_ZXNgaT3w$StRs%BzqepoMa%vUf48dfBDX z>60_UdMBseu(`aUSKH8A-Y}?b7`)Libh-P|()U)qvr26kLhd|tbHxU=rCk-;&+mX- z6WhxIp0h>;D_NUO_?iTHTU? zt~uDZ2NcQ&!M@F<1C$074d~%iCGLxL&!=t+i&eKD_>~u@=zFQ64=j%=`Za}`MJW0; zRMCeXHd}Kj$1dVT!D1@F_Je6-%$7xCEtPvJ5Ny%;KmJd{1rWu6uzn zRYao=4wg!_R@D5-BbY=mLEbXwBsio|Zv}2#cn4q9dHe!N&(q@ec zUdm)_jH&IeVrt1uDw#A*JO+9P2| zzwj>|ct-f5EevUemWs0q`YCri0(|g6usNp%*~#eS8n9GbwrH^M^6qS>=qY&IY|NlD z@pO4Zi}1A^8k*?gW=Xa*Pw3%b6m}mMovC2k(eFh=wQ0I(sFwBv%bShqc6AGrYN+$$ zTGrzQXj)4qESF6GskShq7C{dOB{$3VToz^?bRX1#JVmd~#K4Q-bIf$;EzW(W-8A4m zoT>j8{SJ$(#rQxAu2tRz22j6fU3P`z*<9u*7cqvwngQbM;WAfu_kcO8cU;A#Pr-VE z1@LU0wc&j))ma0%#m-W|6bsDU5D)w?YTP)og{q_IFZjn%#i}}Rl*f@}R2{|O7*`Yv z!GcI_Ky`&WW!CXLEKxqu@6CL32hH zz_aWO@{;#!m={Q1DlaRTqGD*#??TADqM4iT0(`Bt@C(APt|;bE5}=1YlAxfVs()AQ z6c=qC%s&J5>Yt%6Bcgo|WS^_*U%~HFD5^h>eDR^2jVqn%Rqd?yef49&`bhmmds927 zomH=Pq~$Mu_MG9^*fZ337#thAzyGD-1H1MO>H^l}(I_@Q2`VpvndFe^gD~71V4+|( z4*(1U2e>j=6#zyRI6*pWcLbO_GUyISCC?<}V9~U2AoFAf7PPI9UQBjjvKx{($SKx= zoD-$O+fPBVpW}gp7PwbIqNDay3(W>(4!@i~;NRnU?(Jm)H^u+C_Y@CC9X~w2bf|yt zV3em)98`HaHc`1uL9Q8zP?_sa;2H1=fb)Vpd#1Na{K9dQ;!`A<0)Mi@Q)b^-pTy;cpbseYrPRtmN;sGxrBI z2DzA*z?QTQCj_iZ(O^;c#xhe^ywp@go&^%*IZS#Wfte$S*kjHO0LI+7ke$P7RcS(k zSp+8sxI+|xU=XB}$&3uJX+Q&mRJ5k*UeIjSL+A5Mz2nI?gTG7{z%RBr+UyXusr3qn zf{NOD(0*waD`zuzSOiJLFzJIt_ZzpZ2dukx_@cs0GT(@p4r^66*^dOMaQ*^9gP82Y z%75At{mW|WNGbG+ z`dhDRq1P%UdNficXVAyebg5^0@AP(*>%|SKu>XU}a%ZpB*$bfB*<0@1uXXN67#aZ( z_m>4cXU!T`EYTu^t&|a?=+F*yDLBLEQusQ;21TnI06^VvdF`4JcK<_o`08l6XF%&2 zDEAC$Jwr3$VO1D@dy5(#E{OKEUweUbrfD#7P~aD3*f8AX+_u70w04_!kCr1O` zRWq2!4@CWA;6`1%A9(Q{dcA;tdRSyoR$=aMx?13^Fvl`aKV}7a2V2PX%~f9&_0z^rB;qHf31laNV`}S(QYfj8pVUIB$}h|Qo^A0HU4&#)rJ^BB_I;q3Q+3#m(hA3( z+tn>46qKK!EE*w9KDkZ~S>mdH(GE6C;5I*Ghh;NdW!bc!VE&PGs{VE#w`Z|!#Ptts zBrWB8!I88uQH^|p3qr8M_!q#n*7XJOtW`^{wTz1p z%IXMTwRn<)k_&g5Gfc)|T$IK8oKY6`dd+bMZt_GOozc*@Gs-@fU(1Y!=bcd(*~Iup z?`1~ozn#%v-;9Ea1(F2Xc+@`uv)|7R1*=kLf}m&Z9LN=)XukvI!QYFdvN0K)gBbMe zP^Uy^HCWToYIO9$*!zs#9MTC;@W4jIY%H(9C2R{{9t|NC_j!?EcpuyZjjqC&YDeJn zeHtFCZ{!HO!i(l({_0l%RTeg(K!7tmXEfxHtlE5nNLt;K+^Tsh+TN=%0;uxnbVW?UT{V1D6|tpK{F>&WkmiLN7Tbw3}j!Dm*>Cx7@Z-YugB*+P1OW_O#aaG{EO~s*sCMmjyg$jS5yOVTplO z$|zA}Xa=GboMA*Md>vtfp4ANipnX$ZsS3L<_mtOmYiqj!RM&Qw*Y4KV?nW3I0T6eW z1w3cX8dfaPB7?1z5u@nP4sLm0Cnn!?wps6#gt-3>9Ce8xS$SeVS$WWd!xSQw^MR#et=t6LA!-W&*cK5i1Q*;E0ipk3WnGFrY|UL>_Q2Llr$%mn zO>S$9g$e7Wa|?wVu4Nl_SPtCqtk97K@T@Qqx!KU%MR~d0QV^4D<7wTZXR^+;)|z>B zkU=rvv^hps4CcZ6&8dF`M#fL58|J5=5U^d4bM1ko#zxW&-RQ;%vK1lJ324kDi|DVk zEb5JYn(?8hvvNUjL*YNXtxNnQpKX~NO z%fmza29F%xOVFQB(9Oa`+?@#R!URJA+;=umpDx*hNd1_s#pE$e=8eE4=+PkqkbsQ7 z0paH{K@X~17^dy%WzzNm#IyXs3Ob-Fe7H>J-c==Y+uIKmYg2l~egoUX4jU5DHAQ|K zD5J|r`7VSb7|y4DwRLYPH1H*_g}&nyxNiyfxAj1TK*#kE6?qwU2Cgp)c+MIXtW=^U z23slgxeR*)5gXb~&}wGYH^tSe(5Z^6FDF&8vn=2_YgDjOiIx~_rO@Yc(rPzBs~G_3 zb`!m{o57X(K|mEZmjyg$jS5yO(Gr8L6#9G+u-Z+~Y6bwhQH`M;RD;VqRL5QnT4C+G zfReSxf&s990^vNM(>JT5PE!`2eIp@XoIf{LpLv0m22Z z`yU`cz2NRjzF^7GJa@tC=A$fPIHQXd5kr2I-<4}*pCiZ%O$k*;g@qUQg3)8#Wkt8| z1>|oV(`A=~jS2k3H$Sdz4PF4x4v6&|p@<$k?%&bZ#a3tg5vw=@1V)|r;vSB-YTZZI zZDbump`6W|?B}2(|1RnsiyrwEj{A2R`CO|xFXsJ2Q0TlfaCZ-wiQxQw>?c?N?;*_u zSnR~Xd>1_GoB@5{68sEU^*Qyg!KC*ou+f>THfWYpgXY8;d^kwGY<9D$2f-2RUMON7~X0K!{cZe9zPiMFsI`b zAVglpw@e^+$(9l(oFc6DjdUDu45$;K}|eX7VL8t8(Brk24{q0 z(1BH72e`5i)B`RxZ$UsO{I>*d2^x$>^jh;jEa)8RDy`g(v*)%ar$jQ1h6n4pi5MIDL= zq4Uy7vVs)+Uxbo7nat7GP8ZTKa#9afVCX@1SJ*`VSb}a@rMrA+U?7cQqV9ES!lhCr zeOs<@bd>13cBl3k7LxTWxd^uduMnra3dw(ad7l3#j(dwc7y6|j@}6IEX7Y;`j^FXm zp(Phzx$sIk^n@0A;%xA?FUUu4x7PC8Z#M_{)wf$jD7N_^X{zPd-fs5sTW>ds{PzE8 L^YbyDUjF|8!k*k2 diff --git a/tests/rag/__pycache__/test_intent_router_phrase_matrix.cpython-312-pytest-9.0.2.pyc b/tests/rag/__pycache__/test_intent_router_phrase_matrix.cpython-312-pytest-9.0.2.pyc deleted file mode 100644 index 6baa84209984e79dea3124b2acd7a61cf1c38797..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 35062 zcmeHwdvFv-nrBsab?ebmw;mwCVB7~bAdDp>fh274MqV&B7?8bVV`$5&MzqjttGcm; zTQivPuJM{#*qE3zyX(8*<|6hWd>f;g81LZm*z>rHi@CTzu1YOU;f{&8iMY6nyZ^8? zzCHW?x!;#rl~vs;sfCR_*y~a&>&vV!zskz2%=})N^eF0e-Ql1XU{7U%gFs=j!%ZAFIE|;Zbc%aT9 zxv&F09hn0cDVn$ zuLSi-5%nrTz1l;)<`$@i)TkQk4-}M{%B!d~9*VUnZ!OAOhjSgy^*Gn#ya?w-I4{O| zG0qJ*H{iVFR!V^9T2k~}yaY=UGA_^;no zNBZ<;W5PUZ{<(1-SZ^6WGtZgdHqROpAoc5awrgP!Krs#xoquio$oxz5A_$=v55^g} zpT!B;_z_BX4(GSba~oLkjDJK7MKj(uU!p5W{kid;@e`!HV_t~&X3{6O=gW2<+|!MM zY6{3}Aq4rbmP}`~;XeB5Dz|s|v9wmJK+i*1VX}`7noN+}|y=A8yd0s)lY`Nk#pZEUCamNkeM*jo=y7?05*{ zM|n1sl36UAu63T#^DI82SvKrEi*r7Q(eVX&JUFhX72{=SWuNhGygXYz(BRy`J&#vp z%d!=x-%bZf)@$X2vQ_>PoRN>&MRc|P)?ILQm z8qG%RmaJNEOIA6QoU`4MWoXSx{Fjec^h@JGHHOylZ`F!yg>S1?XDhSSXjQa2-iUH7 zuGWl4=b#bG#(ZhiWTV*{(5TJUf=1aTS-?v%!z1Z!2?jkiR+EUy}qi(9vTcNE$aHgD90BRtwpujD-|1&HF_3JG_ zE84(r7C?3pS~{IXf}BLu^?apZ_u0h4b{2M0*t(IIq!rE2;;m<5p7v`+y|d)ajZux5 z!+e;(5c$d-qhsl$o=)^?`PxKZ@8DoUOO9%NBSWLTS~6dS%ZcYQsljw=7%$A=2r%^g z(u96;Br~Wo)I|T_$aB4eiQ(R%WWFMy_nt@+g?w};dw)_R!`+%TqUGxoC#Z$f2{7(x z@!mA9j*K=gahYGOnw}#<1>{fK;*GTN2*2fK zZ=}PEw$U5emK$lDghZ7y2PvHPaiSH*3B946-Gzgf@~%C$+@rNv&5;CeXB6>V>A!vHV*0LKP$@ zoVI1no_MZTPxa~AUKF<+|9Uq%@mc8)byD=M%bPE+%~h|u(qdNMclP1mM`|x_eRZp$ z+<$)S<%4GAeoLX>G>`L$2u-B6^H|OWrwCWzZ~*i!9~77l=tTm78zS zSqIQqvd&u4W-e(1e14OGbEM5u=r?UA@K}yw926m^#E@|rL>V~6i86SSV4I%E1^~3* zSDwZFlxN+tJnJb7U1MdLQl7o80PU9#TYH``_dEg6*z<(7=UH>lvw(38=gwy>#r`3U zW#tJuiiv9+00tG6@NwAzaUZ%pOP(YcrFN-uc-p=nk0JAQr3eYMQBa4r0}^eNSaFmYH?gX3~m@)e0mRJKK1hculbD$Cj6 zX)Y-LD($GMqyc)biw+gSG#IoHoIV%K3HJqjqj~xR(j8B0;?b57q^0?=$ zq$`bD&8^~;ifAN3Pi_ef5^7%xi;5i2WH5F`%k-y_B7 zf_v98&s*u!yVAravP1MTZw{YcHaiD;Tg-D8pFHjpl)w`z47J8qGF7A(+P{Q&>pY1g zo{X16{HQ&k(cr;kkdIaZnqNP9P0j~W!(fmPJ2FFR_;$$)j2F~Mm!&PIfLQYkG3j$? zYvV(zMwOr~M$jiTq=*o6+=l;|XAta{WK0=Z>Dav(=;f?DfVAR6l}Jzef~>_Lqsx9% zhsrdm|5AQkmZb}86lpB*55ec<#$dkU;eC&GCm!F~vsc>>vInjO@=AJaG?@>b?j6h| z5e+nL1S>q;cXCA2NzRGKwLih>lZq~|W#FT=ZD$_wVYW^slcRcqnjv?6t0#Uq zcx}+wcHC?_o{Js-fMI<+LsR3q^&8|*HgI;AwJd}nF7%KzBxKQb)c%lD8Y{>1!QSC9 zjV80kY9^Oxq`}uVQm~c+RIQ|KprDb0^%UGs!2=XDA;_26^`kw7SYsuB6*}m0Ck0z5 zc#wjJDCnYq8d%#z!Da+HbuX7?W;LAe_>|SE9R)EO0rdZe*XpeFyXs}e@~4cup3YSt zHJ&+URv#y(_I^XzfAzH0yu)nX0nljPVKwhJoA(opivS|~Erov5P706aSd_ye{ zu7fTEr#M{(PZDfX6xjfP`i;oi`3kdkR$(ZG(_n>J>!kIi*JpVI5)_VP1L%gWXH``*wWy$nc3&|6>rc`;%IRUT^oZbL)Qv zi__c2PhcT4Uxu0KUD&ez0#>cRiVu$Ts);^EAwxa0;PORer*36@7g^teS z%&l3t`$aNc!LY^6SB@x&acFD^k|ZyTK+tHE^|xN_!g%Lp*B5TR@?+EYNEcxz?#I23 zVWuMcmcJ#7#&TW0P><_W?M2652QI`Fu=r?}OtEWO032hZ~erpmbnyP#m=ocj}dG9DU3E6eyF4?d6ifa^%}<@>vzO7wIe zeoT856u^bl(JVx|IGYQ>gv8#)e8s8cSc1B#j^0a+q*416s6#QGX=Iu!n6#cI)I$^; zrof%Pie@f0n~CYGv7BqPs3Y*H>j{Dq6wox~RXnxv>55)VXS(8()q3B_%6?j?g^fBk0Uwhl9h8mP$gtOXzT4g4s(Qp&>?hEpxa7Y)xX~ zVG|8EI0@0Vv5E^zYv@rIIML*zg}2U^*>{G>M8X@Nd}zwyaubP1-pQw(%TFXuc`YNG znMCC)LbdqJN+(i-Nmz|w^?^Zw8xRud5wM$TGVy1<+9^=qh<`oGgr`5$%$}Sag8=3U zgHJYQ>B$FH0h*m?^0C1wcOLRgKi)Y9$TuRjRwQml;)b%xh{UbPIx_-8z^1EDUfs)* z)?M9eMxZpO-!$PMfyYE>Dx2t@gpqT>DNc|jPqK_01@J5ixbjk zaPvbI((w$YpK+)!pxX}k>&+NDOz%L^foTb@T{fFrN)xIuHaA2$+(EB|Zc3E#j@NCA z>8ZpMiNR55Lg5Sw-L^C6l`UBJCWcR^9c|qk4SFH`lWP~Xs6Tr_0?ynm3JMThO0{Su zYthK3Y|*L(>r=fp2p>_%wSbhgRtOdb;zd=7mbx=rlyuv^E$YXdcy!z49^JOk_`;E| zqDo?Jd|yTlw|I^cEh*Roq2Z1!xR*to-sPO_URI7CRxw`5wA>k*VGG@P$(z?!w-hN` z9wuC`|FNH1XJ|yt3?{ijoq0o~hMT!R2J^L0lNy=Ps|(aPOl}2BbDOm1xNYyS4i^k? z9{JFTl%}VP^yf@L4hH8oy7&~_G^{5fps59t)fcIK4w3V~jQz|m{and>&XK1(HQ&x7VRBL4S`q5R#V`0uMW->B-j z846ZZ&ICh?!!JE{w)=eh&8Sqh+)%b$PFgFQ%#}?5jg?K-$}Q%~Er8E&H*k(@u@w4E z+X+0DqZkK8$SE;oTn14FPI00Po+Q|&C$a$m?HiH13}xGuHP)&&a}|6|wi&D1tX130 zRoeigBsfR5SqlB8?F1gnQH+BkBsbV9WR0& zR>}|8Wo724DVWm|^g>RJs){4IdnQ!(9)3FJIaeZJLRC^b{ z-Lew6pWpj&r}qpYM3tx^m(`rV)?HS!{Ec#Zoks;UeeODsdW==<@Z8a_pUkz+gS@`U zb%{hgTJJ&YKCtEk+DShx^4wzHm!aQ8Zd<<*iiDE=Mqr}fL_BTe*T=r@H&Tfjy5su| z1h}dLjX`cS|9+8u$1$pt&vTK*DASHkTxex4upiB5G$(G^xa1g^j9)P0)ODD~|D0^% zv~o0#6Rr2WV4gSL+J0ul<1z#9f9^5^z;>DW49aDwTVctBh}XpYfb_nR(PZT~)Pj{1EvOXjUl496eKMt~jw-&NlFIBm<}2Om_Bbvv zP5u2qe|a7wjclccQ8r8=V|%c4+9Fx zSK$?5Q&~y^)}_riYoscu)9*1O_ZUj65xK{TtToB`2=H1f(rQLp0VA{&_cyJyp5M$9 zaxOT<^E13jp5KMt%sd~EJ$n4(9z8zbbylR!j6ldbK9R9H_M08>Upj7d?6*3Om>owL ze8lQFZgw0e7>Ix)$1R0^zjac0RD`B-oHYJ~l5@c+!jALgNrK@(PbdtA1HDa@1H3#A z2^5WiL;^(<**cDR;DY=-9U%&EBU0nk`Y}(f0~WP@Y$9p3KVr5&VkpOq_D8Jt!)E(o z1|PQCkD2Yq2uAY&jvTWT`u)~P;ZYHq$}ws%Ldm({6k*@PlP3v=*BGHN7!76<c-W)!R&Fmath7`|TeDb(YPy$Z~nQF*c)V^ThQ3#&S zli1o=*gE_fU_W6Gu3ll=)$3j;1j5;{pYB`@li0^xy}|=N&P6IS_v8BNY#44|aN8X( z8>fvu;CA$N8$0cDd)pY>q!iaKnY`KIzJHqv>~Nl|WDlB^13jp+ zM9&aoKnc9hs|U#g~Hc|1yx=z?3rtJ?5s zjRJe0TN1x9$*Tm3mZ;T**1iyF)R?ngLao6D1{Eppo>;ly(M)V(;Jj7NXaEpZS5gM=35f3>%MI5A>2m8a2u^Bq46Nz{MoiVnEu$#Jn?7MKFb%S@GXYOgPN>}?sduk0UaNE$pz5;K00kbl4ePt5*Vbq?32K$Ku9J zY(D0&=WsWDJpyhHiw^wqw7nGNq#0W?8QXQW{fAxGx~_Ma_wUNZcA3!uZVc1DLB%A4 z6ti!!N6>Uc{VVZ7ToDU>puU@bp^v?cXEB!X$ZQ!;KzjuQuu&Cv`#pllY)j$iP&+E! zXc+>#cDk;%qjs{dW-mWK9b02YyFS*5Jw3NQ!m0(OYEs- z+L=qCw*BJXhh)(ccV2Pc2X!j8%8Yi}PrURl8S9D$2lM5-4<6{*ci@R`#~pABX*GmS z!Br_hkI+=`PQpMBJ&B{6AkV;2++3qN*QglWACIK;#v0GMC1D9&h|tem#nVLWH3a$E zSq0!~fymry0b0DIk-IqUZ5^)7vE9%=uB z8Yy;4HV!>$9qKg?^;(Bg=AqP7bihysF0>iZfn0<@GcsT)?r)kd@`RiVPALP(z>_Bd z7v@1a5^tQo4|V zCr<({%!70!z8~$JXqbw28cHXT@61IAG$Wms;{K-TB2UP<;FQvd3_N)faA6*#BataO zR-2L4hSGB73<4vv`pOwI(qbv}o3;~pOoXP=LJAAQ$hqJYL*~hoL{8uf0N6~su*!_A zGL(&1(4-rU$f_%7*Nv7!ziB&x$3$o<8%aw*7&#Z5V#qvslE?{s0RZLW4=bp_bW+&; zhX)otUZ(uVK#amV1z{gj#Q_PQ%lhll6Bc4PW={G3rbVm<_mehZ(!>HE_((#|Ea_1f z%!b)gAX*Y6Hp+9g1b*A(xpEJd47uE}58wQz{n%{D5NSEsF;L?`?zzAW?PAh8v7*Dp zgnSb!QBondl)w{GKDNE%o28YpZSTr#4!hjLVY{XCGolGz-G{>tGcG%X?eECt-_LmV z$8S-u#Q51-R7gU%EJqigCE+wvEHWouFi| z6_{w_nlELqt^K-1y_0M9%ip4PU$^L2t3@vbF8qole6Ib1d1M~1_s98q{v%24bgD0z zA#dM>?Fmr4Bf$0yyV0E65n!oYN`+50b}t#tr1PP^L3m3rXLxNGH_cbE1gt4zTUpY~ z;BEnv4-X~NCr8wLH9y-}`5-iR`Phlfa35_#=%kiG0#9orgO20-Q=~1x&W_%F9Q}8V z}`o9<a!h&DN3!%_R>4KHq8J9C^@E=r?UA@K}yw926m^#E@|rL>V~6i86SSV4I%E1^~1n zL&IVG(m`uclevhwo-b;$7Hu&XG1v3W2F_mBb4uVYl-)EdY&pixuB)#%TLGH{9$W$+}yHa(FI0BGNcH5lbvFQ2ehHk&J(0U9ft zt(9BNm0JOyf8M}3w$&=9-?W{;V>ya(P=uTkL&jwgW#AMi%HTTWpkf zU4GKKyUDz}37~OzlXZ8Od3P7!^QR4*V_jA`{if{%9?MaTgCgXV7&0z{Cp5F+Cy-~`TLIinS zM*Nl(9q#T2r4$`5CTWg}jv__J{J5?uaeh2k*qR?tC`3H9apR4EY1T};2W7MOT1yngI{xc_|K z3(3!w3N9v9ScDwRR(f1a+}ia~X<=TVjdIDwr1C2`F9^pFHEO$l*0D zF%jD>(AFB?Q|r|F1#>IQJadiDtdtf`cn-G)_e6L6^qFyH=fEsgKYt$gIZEIOu2x;- zj9v@oJLlSNfvtMO*RK}O*&cDHzTNZJ?Ll>s{T$l^s=x+vgloZl$SV!5Zxi@b9X8V= z03Wmaj4;;96OCp6z-X^J+qVOW5pDG zQcvt^`Y!D+$`((t3v>hXHGCLv!b!DPR{exZ1CP9X*}en2AAMpE_x8aWru65zhKW1T zj0~pw##~1sd|igGtqS?AF5(}I@qU&C-;2>T8cCRYQNFDE8~g#tv54) zT;$@_hX0uz2!uBmL_X~IL_5jYOXG1-9Il^$?bWr^^<~5U)7Y4ce7ize+LP3<4@M6% zGS{}*UTs@^Jc&H@f{nfU`?1Z5k89s+AgYsZx4qLv&(+MO_RCLv|LETw{kvmR_3O>L z9^08~#Y$PrP!WVbpa1h;0*-ioEQOlen~j)IY}eg5*LK|l*iEbWaO!M8SYllad<@F2 zWxGCipg!#_zP01P;~V(eJ>US=-7(Lv!?>dT071Tz>4EjC1nrnF`SO3fh zEYrt2Ei*Z{Q`s4o8*91GTR&2?aRm8@r`bK4>qbIYPr>~Zux&&hAgGCgH59lCZ`Q!% zL057m+*Zo?5(Qlp?4p3}G?F6dAp~ zE88(KW++H#n;0`AJ1m8M({=)niO^JbkT#bvaxOSU$XGf>$&&6C!sC1%4DV;n3B zJuBaKdRD#x#>%%%*t^b9c3!VQU_>@uuP`G!Erov5b^?!y&{TGkqZnc2TyTnz<2-qi zV61E-6b578I~%@U!NH=?vpkJGsJ$qVJ?NcMhcy?wUWFUry_cbozxRCC`L$2u-A-B?%$tf>VUcQzwa*Ko5yYx z%~LP_lOzqwduTs-I{kqSY&Ws5dw1Z1jx$i<6GHJ zipHYv71g5N+2Nt&BbLqiy&`vOVn08{0KQ>#JKDpmru=N}Avm6r?IAFknsolQyA#{P z$LkbZcUOI?_NXrEA78hJ({1c?sr~_RG27hY(?B zeeNBrvmoz6oW;i~jCUcLPSE!;jO*Lo4W>0Fov~dTRM7UU3?W{b%XHx*f4Z+{_g?Kg zNNJ4R`nJv5Us1*~&ms^K_uMU-+17cS=cUo#UhTnGdiZU?oWy#xR9`C1zYat~N8icB z32kJE?ZK>F1C5LL*He&b!1&UBdAn{@9rD{Rul6g;6=9nSzKEjv$_s|lOp7R9FeA;D zLceJ{fyYE>D$T?j6GqMjrx-F%o>V|i;0pjKY$k`Eg~TG`Z%MU+w+$asc?TMmzo6I8 z_$i=^ajXZll^$>5)x;~gJwwxs@wb5AgJuMuV*y~E-JT(#%S(xW8{s8J1s{ApIWi1I z3|{VkBy~*T>O#Rp{1~r*mx=KC0?XH5H$WZH;hFe-ERe2l6_)!Tv)qT6n1Uo9=2`OhP=#RgqTYV{8{N)lbt(N+D$QCZuMA;x z{Cu^&NihHLE_NAWpKfNCBKTZ0KERBR3!F*jgIImcKCa8YM#et*!nW3D+o7`Ede|a9 z=Ch}fu7i#HtkSPZ>{;0a@=19Y->G<;_BN2{RoC|*ycv{b`M*ih%hI>2|A*B1`|A3O zM_)Z^Rj)Ct*PN}q8I}U&uPlFQxg{?(<)t^2I2-{(;h9ibAaJuLB=^b__;?qce^bxT z#-S%ZWC=610%r!8_zYJ~5v`RU20}!u9JJ~bdCf%MO$n#ptY#bf(_9j(uGV z3lsT$`J*?=*I+&)GGUO3D)Q#*M=1a1U-nS;%`-74eI{Bde^Z{hDsz)3^+<-WUcopJG#H(j~(dyrkcyH8iG#pN+rW1-9 z&m_~SflNG;Fv7=EnM5knpPtGjly9{`s76Ulrenit@So2ZA!RBRQnHp8vHL8DI z%-ODb#j{=YsM8xkJ@&~gOX5SchwaU_cV=d+QzV2r&F3Atb>#~yB;x#L7@fu5$6}wv;zvRN$Hx{=?&X@I#J?z1+kefz*7(o@; zO7JvW__ZA=JIdRO zecOv-AH)c%%hqP=So_sy>(!#G?|98L71?@>piPwL|M3W_wPr9^YkAF`b(WkQ zc|E}9&T4tH{Eck2Id?X!cgs5FnwI#{Go=`5bkMs6KRU@b*)T!~ztqP+8LKL)7u;*Sl zuBr(o!!kbsK`@^%q{C@BapvGrB|do(h3)#7!bV9ZmXsG37Z^Buu>UNwc79A&pieeV z6`MebWjcn(@ou+#hCi8#`mXeorq-w$Nv5oq<(0=sszPwff+p$YP10%9E;LAR;QZ-BeW&nVtIFPM zcT|n~mGw|WdUs!OH*h=G)^3PoPc+W}WkwGE+91r=Uc$0UBBLY|)A8|`I+++oZRGSs zJV{ltY>mdaB`WkAr_@ofnF6X+R5ZeeACGnSp6x&XRNwL5vjYGMTVuQ$vBL+?9z4}| z)L4DEEq0{)sqWq*-Mxp;$By^`=crn!EUy*_vs#~_rX$I5V3(+A3+y;Lg;C*D8b*o+$}3H46onRc_v&0-ycIpj z5MlJzvr+0Fh7+;L^muZ325+P!o|{T4iI|)i!Am7otA9fG`Oi!D z$awnlLgmd0efSwcKHQDaH_`kFH4}>~Mnh~kK0Y1;#;XjcCnn=c!l=RH*o7&yBKnIF z98W_+HP*${i|MIxnTf_m$I}uV1y5{DFS1rTT#-Au{t)ARwm+^ z7{(He!Ek1y%9;p_hDGDr2suO02stCrsEntEFQye(Br`LaFaqe=Q$VX1c5|cB?Bz!7 zczh4`Cr3? zr7b0q?jld~gdOVOw)0fpAqynSx$~sU7Pkoq-$7vqUOAwNk6fQXaP`3T30-=mB+^~v zX`Zk{9b6Pf0(pllkSyoUlP+7_CLoN$O438R^pGaD+_;QDlODQpS(jQ$BHcxk!Bcjq zi!D?jN#q@}z=Sz_p48d$HUa57(ke}Cdu^oDxJ_@|22yL>R%&e18{0r%eL_PlwUtD= zizb7o@|5DF9db=f7>}Wpkp-@l(ep%``s{2Vp!<&0tcmH{TT5Lh^{$hpt^vJk;JpXa zb3yIgv!!zv^m7-qkyQR%>iYDLvVWP?9!x_T;nf2~O6ihFcTwaFp2|~-lk-fN)9w%= ztkEO76w$=pniMHX+jVI>=$qfVd5p2P-#n&EyGtV7MUnx7r|eJ{casT7BJYp|u8^_k zSw=1bdXWY^f$lq7A1!U&t8d*~+In2ydi*`<#C7@Vk!z>Fe_E4Hd?*A0LBzio0)4)q zl|qcve+q$`;2%ifKSI9~?n+#eKVxhN@Mj-NLd{7Z<1rN^|Di-W7|#jp9Dg8fJVT98 zv#KQV#ya3?EYRCaQmZbtYT|*pi*rMWG^urNNS9y$x{D@*r|eJ{4^YFAMBX6_Bpl)F zd7`(w=vJGa8{%YH$PBt!mo{tS9!=U@k{;8g$3V}mVT{KROM6Np-9?fBgQx6J7x&Ox zkwo4h3tSyz&$EnN1oR>ecmmz7H)&^Y(t@$9iS2U_BhaK4#1hJ(yJ#|a$_{n0o!*4* zyh9d9cr$0uvy3)9_b?~j;d^5HN55YyY?}0a^e@s0_M7nQZEND4;;)|!BP>*|j_((} z_kE`;7w-F7yRA7PL;J$)vUxtB8unhP^_2FCGtj~>OE&9!!_1%aFMc{^@Az8zuzPFo zJTL^>s~kU8$BtexD|+o0=K^vCb_)X8Aj8rsvz6GFuC>Y;^FW8NBV7qBEkJo(SX$7* zgvRJ+w(PQM%J!ul{T@5BS<%9ZurKXMdh8iGlGv9HE+cF25-%g?>^)VQ`_ff#E2z#^ zCHcN|b*9OxnoE<1>q2&^otgkJuS&GJ=(QUIdxSofJ*4~g_-yu&Yp{1EdhLC|9>KAQ zWpyXcNm#e*-6J#)&!j!`qO|Cp%{XS%k5cGQ6OX4dz>g>_9 zOpPR~M$5?AdvS7|iA;y(dbuGRHb-aOibto7aa$#u$aKg=rD;D^%GJoLUKY?RJa+QD z_kyf>E*Ho|t)Aj|r~tLDRDU3^me;JtSdl28m9avZZ9`7COR;cN&L|6Pa3OQW>6;TNl zabbA?a5z*1!i0(dWO3HA@ZLhS0C0>06-~x77h~#hdJ-yFF*eeH!;Ubud#SQpj9{U6;WAG{Zv*8A=~>VnWbKs=z%+sUMWEu*2F zQ4vqg+^Q%8}j0(JdLPKpdjkM>H+i_f=1ToYd6mJydQ4< zeropUotjnGPQ7wUYZ@v%Gm(ELtv&aAzGh~&`~8}Y`I=3onr(W`wwr-`P0MWe2eqrO zJ@d*lTJy1g+@hU%I$wMK%g0qLsH6496-{gMM1f)4R?w`dq2&g5Gt3Xb6IkE|f&Nix!6` z^DN0}JLHO)IG&>nMizJ(jGia@9OpCI)NZTb#Baj=w}YjQ<9f&OQpXv+<4hskuZjJy zKCXrP^AeG|)L#;vyGRc?Bkzy}u^$;Ydmi+{Jm5nXa2n=23apD(X*445PGi1b%G=lF z1MIBGXyr$5U z57;fSjGXQHBU@{&09$KWUU9CkTbCw})n(TH&MfwJ%gO`o}-TqoCOgEpE$Ki2GWY4RFjOQ9KTgkh9b!SA#IYbC+UW7rGnI3if{6fmz% z)?2u6Et(&HAg_{FuXwg=a@B!8)XT1n?bm9}5?CwQ$e9<`wKxaXN~=FUk5hwXprL7p0A6g?0IXM zk@%(l_F&dq%BqpF4uT}knl%B7`{dsf&1K&c_ig$Geop}PTi-iH@P+ob9Ikr@$lNap zu0#9|;deic^miXTa=N=^LN>v?2p*Dq;q6HO!J`MJ2vO4hTKhZZY)F2ExAj^5CG8i4 z^1Z9Q1@a&05jiO8-^0T{E%Qc%*xUNGa`(d{eTN6&e(2zWh9swlRk#h2S7A9mC>_Bw z(|u5(b%-I70_9tY%c(ca@)sn@!ZF+d{Bjp0U5iPtKJf$Q+ z84n!o?(ObBc(yynTDqsd?{th@1dTeg;Dp)KM$=LLCJAce9wj|NuA0nIQ+bFqRaqGT zvkrYS=d(pXs)8z~E|GH(AXS&Y9U$3g1M@!nWSHF(RB49U5wcx|(~;YkySS*NJV#QO zDOeJnW5C=1i7-s=3@BAX;DX~g5ckc`YHZ~NsHI~Y>VE?y0r<9RgSPSM{HpV_C*N<3 zXq(l1V`jGR1F5kjZPcZWnz-Xe69P@zc%w;|c9cZAizb7o>`)hXT;0o4d50`8Va}c> zb+)`sK>7}qxJj2bY2vOM@QT`{NtFH^di&Wzcu*4u2{0SXOGN6@U`cfDB0c1cyh9em zL1f_UdC&{&!J?Jiy3>Z9Rhq}0rUVtR>4q4y|8GD{( zd?fV+b0lcQpfERy3|t==`NZKp0Yz-?4dUyiM&G=NI1&b z^DLuH-#)=fcle&zqogqWY38;s8#28BYAMJR{|I48fD{LgMO&LqV4>v0p;AD3fCPT! zILM6A=3Lo@f15y%DgE077ewdE6DrGqq_Y&op-OEXaaEt5jQdjn!L}6EFDp z3XY^#>GnTj!16Y*%$qvP+mF}jK&wIfuq6F^1qWKi#vQ+0C3=9QOD?DAu%w7Tf35=m zO5wgmt>#4R*#7^lMML*3>N4op!J^WAi+;TG7!VUNDu;;CvaDPVC$cd8lxXb)sj5E-B7&7r3KbO3YkN zD{|~2oO5t~iMtz+|D>}DW}XO2#t_v^deR7zTf&rz1rQzZVap_=c7Ya`mjrW*pjD^K zRl@d?h*t8_m=6PUZeZ&r=EHE3^3bA5r5{#vy~Ni_9o}mtIh{~rXpdN2mSdwhuAwI6 z*uwXE39865L)~LKC_JF88_Cy>l6L{zulHW>DQ$R6-vD>)z1oJyN*ng-8}@>}+NmLy zuppqjXfk*zPbp5?A=ku&@fb=OS>Q?;Jx{c$&&~z{y4jhB&g)xC&5!8KkI;gp`H@m{ zr{3HN8fP95yB05u;Ve{e=D}RpZ~|GN$y&!)B&}nh)LzFlFUZ6BSiHbLToXI4H`s(PZ#co>H8&L#~Ml<1v&nvcQ!xdY))gpPdZ^ zbl;IyYhu^+_R{)C_4SW})Yd;*THmFw?*e_bLqjZel|;IWCWEK)l;Wfva!pJakD-*2 z1+J9Q^F*8a>}(+36T8?qHe9A~U^O$PqGQtei~cI#~DuGrvv;_i0IH{iRwLGm5-{nv(| IZ!c5)zZDNR4gdfE diff --git a/tests/rag/__pycache__/test_intent_router_v2.cpython-312.pyc b/tests/rag/__pycache__/test_intent_router_v2.cpython-312.pyc deleted file mode 100644 index e7c0380fe20a7be8d7d023e6129e42c80fb84305..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6518 zcmcIoU2qfE72aK~WZ73XV1pCeB$yu?WI+6sIL7=MTQ&w;GO`?k1KknYwULk|aaS@3 z%#1_QHZ)94UV>*j)6l2Fq?vKj&^VzXo%E$Mec3CMtY?Q#Gi@K*HyY=meuqp zkT$&|-Fx?(`+N4@?|f(fP+3{QLArhUR_M1?9QPOckV`_gvM>OZ8=TC^e1se0hk2gX zg@`a_8Mcgx!{V5A*a|X>VjU4=@l|oyCRfNdD9fNMgVGMA9m;Yj%b~1DS)J(bba*Fk z*nNS~zCcRBPK&XkGZr0Juo_5&V$s1wAfXslz0rgcP55HTgo0n#X&|2xk3qA9av@>Z zu#!mPXfV4{RyZKHz<*&SPnVs5Jdh<`d8uyE$kj`=qxN5lZ&RB<8swZ-k70|a5@%vjL+tc+ zxec+)+c^m4FOLMGqshRiq8cj#+ug7HB2&iqW_S$PwMROcl3FCj8#n7y)L1s33VF|jBcYfDZ~z!gxTqm#&^2nDWg)taKxlw=8WNb=x2q$8iH(+ zdw^=^YZ|V%%r~sP*{apI{ME5icQg@4(*s)BL>!w~rG+?JSY;z|Y+S6`KpYzutD1?U z`QeK4`iig0Djl|mT&2~9pN82yiw-umH9OeDkQX29w?RSEWp08C(-tL3<`Z-SEaloJ z%1R}<19F+4;KL?ITNci40xJkdxGS`U$?=vgi&~f*aak<1kgYI^$w3dB9Pjb$yt3^v zeM}C07dIsYg;6djoO%{)BTNY4mAO3^O1X@!h`&|?`r3j#S9?Ra)+oXlmxbIKUkMf26KBnL5l1}glE4O4<4)(chnXrUm2c-#Cww$fZl4#87!s~LiLRqBU zP>|+oMcU?^tWXwd;oX;}(W1BcnBBFM_TjkjmZdVeyu?zjrES97m&)XdWZ^`b_1XEK z`lR5!^6cH7&($pFIVbWY$Do_`GwogSV=_fv);`u|8?}$L8SSG+G6}`I+C6dw$~)vr zqxK1iX0^N8J?+=p9okg8148W{?Qu_gpS;pYegrKiLHPld-PLBu%jD%o@L?mN(f&Xb z@D>|o3;>UH7^pKQE5|x|a3Frhunzh=e15|kj09BGs9fB|mVs7GZz3*-%Cq=G6J+9vtmOGC6qChnxPRAuA`IfHN}1DbTSl?RRDcikiW^ za2pIkQ9_*nS^>_WvSF_BnaS=iDr=@rUOoAc;~I_#UvXTYa7qA&(`LnSZn|Az^e*82!ep(xe&K-|VkH0nX z(~0!6F@j=5jIpsB32M~QCW1EIdg0dLG}=YPUGvRb^yWRJd5_-QOPYH>M@OdR*SetE?yX^$*LfUf%X4XLZ>A!C9@ghYrqBt)s$R zI@&?dj+rwv!)bJYhzHnG))KTFS8;3N z{G&gkBPu;PpRQclz25ezvkLOx?WpPABrbB8^e!-m`DO_d%sIi!Tq5r-^D-WsXx?4I z2-yTqbcxHH;PXyXSgH-vJ6Vz@gtxPN6ky$a9$~^#G_E)yexs`u!{6*`#V2*OVG~!H zbA5?bx$OYG=U`1D=1CraLAAF4QgcvCUIlFZP`le0h{v}9 zG$kWShOz-DMSzNK%d$3hXB7;bElGWfb{&uwa2b%7V)8w07I5|l6oa7#K>a?9dY4=y zuW5Gw?b8=@k$oJzAoQ8 zszkvOc>hJo9LvrsN}NI&i;)KC*UHJ)~r*l)({2TYrNiJRGyEXFK_|&DVm!{8tw#-SYe2*3=xL&Di;GLDs^)PpX zDGR|=1HMBZ2QXIfdMaw7*=Cw;qsoeSAaO=ggE821)P6S)$n?3vS;2=J=J%$Ppccg ze{yW@WK27EVa}17bU$!BGv`>NJ1FPBWu0@lCf!-jpw%D#eUojVR^tN8o)~mN2BW=g-SNZNE9}#^T z^0B}n2&>MgJPg*tF*1)EzB?Fv9H=dY$0Crk0Qa`%*PE{_iYEk97%XO>f*A~&!Jcd_ zW}690L|9^=CYS-BS>*6IPy@DZwwFwtk%^uxrhBm$#R`@u-pgXiv|nWK^J9R@Pbhvu`7s65_Zoffj;?;UYfR3fYa=Kr>78x#b@Uua4$$5|*M7w) zFlD>5WRkq1eMn*Vp7s$`e?wK2Hj^KM@+T!68JgWCQ>CPs#qpFBcg2EgmK0+IQ~jS% zxC|zgeC}=!-UpN5{g4%7FFpu@i-YD!!#Jo4UrU0j6o|^13WaLSzGg|P5)VLCiKI-B zwu{bGgtSAqy0b_d`fS-oQZ@7lcR&;4sUEk-?d$NnC1#p#pSNG4k%Lj!lbK1Omg>f_ zF&aj&AcDmQ!2Gj%r^5`WGx)p#rpVwk#Xd|IRlsD*_;Db5R*K^o5O&2WGK|JJ!fu|-=`gwEBe$)oeNt8YZ! zh-mARz{xN0y_Ae!;ExKx+WQ4ReR^t0nDl;uYIXDsLC@T*OQRMdw#-w(8iLl`+?Ph% ziMX8!nh0vj^48{=r_*RR5qC3e9-29;xAu|NKE2gXTK)H{hVG*wA`Ssr*AZpATGReC z+E2v&OhReCw((FJ9U|f(CUFwv%u?l%nHSS&9})KzDcT5Xn>~_7-9+rxQ1?>2&wnR! zJ(l)?>GLYME-ADW{`p~aS-*Rn$gEmjH56;vR#{Ph6lxfar z?*SC%WB(6809+HI{uuzh*$j!nu?S-?IAMrtA{IAnl*%Mkr!8|G^OPyWpePeED$gpZ z^D!(-XMpgkP9byO82Kq8ghreBeUf8}Dn(-nDIm+zCwu0L@v5$>gjwkqCs{n7#l d#lpH8{`rM1h#%w^R#)*o{8#Jj{2n&qzX5)VE{6aB diff --git a/tests/rag/__pycache__/test_intent_router_v2_local_flow.cpython-312-pytest-9.0.2.pyc b/tests/rag/__pycache__/test_intent_router_v2_local_flow.cpython-312-pytest-9.0.2.pyc deleted file mode 100644 index 50f714ae8ebef44888cb09827d4b851c4617c146..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 20416 zcmeG^ZEzIVku$rqUmESMz6D5zMaDLZL7#xcwIS2d4U9K)wH=~ujFmdWqmsH*HBNae)2(J5a z-S5rp?208)ut=^d8m->+^y}{Trn}#po;N-7?@nhC1KS(p7em+G4D(Ao&^Jy4ra6{j z&M^Wbuo0%8C41ALIbdR$L9XAz(i&^OmDJe!ZDeonx5M5PaSRsq7Y*|LJfSm3iU*zj zP6Bfg*Py%K%`!oI*rPXU?89{itV8`}f+biUtXK?)BPPLmitDcgOclU3fUAXK!4CUH z50KcR%Q5yQCRlx0J1k}d$9IY@o9H3P;!kmUUH_63tk-!Ht9rdAwWd2X;O{)@kME4e zgVFfjSRx)2pY;dgG4X`z%0<4^>}A!mNX#$zMq=VIX~-W4`hwA6z!r;%s80%hJ`s!t zf~r*v#uH*Rpmm1quq$TxpGGU4V+OzkZ?P{hUQ@5vmhb`2p~JDZht2@5w(RFiOgZgQPJ+1ilvhb(I`6yk73E9tchb`tiyjFL^!TIx zfuNXp7P-GQlR-HJ{dq@z7s&lXLk)v5ArT2m4WfUbA$WW!;txd|LPV>+!--Ht2#WPX zClY^IP!yaV_VkC?b8-su6*%!jLhy)(@UE1Ckt3@;2`MQ0K+WQbjUFj3dOd5ldb(&+ z)KnV}!MU!+CeC`4SFyuXS?|eL;k5n=l>-oH@CVTKca_u1xcv6E#5QF3Hl_YP(0mUR z0}57N0iH9O01wy&yLi>Jx4j$H`@!YCUG3X@y6Ojo58mCD_zRTrru=v~t z;#g0%us$W}2-pj(VA6+d*p^eFfw~;Qd~7Ad9B0KfAQ9C=wpnCzbCZ2p>otr_ORu_k z?~A>@oxOcsy?wsDdtU78+Ut9%*|&S=OI<3XvQ4V1duMlh=Z^M1U*DeRx_Z49(E@!@ zO)*Ke4g_I38CEUerJ*5}I~}p?d=apiZvZBs08BtIm-r7yf`V8Dm5bnC z+5yEF^AT4y$u0Vbcb?hs+6K9@@k(8qUzg!GDg351zvWuF!f&78hksh})5HG}`nQn$ zxubG8lI|VM^h!#vlliQ^woJC9Dan3^)s3Dq!*vG!^kbI!qIo-Wh6|Vmn1Jb^i(yh+ zk_)3N&e&czoi5>+lm+SwaRBGcP2;epIGBn}Z?P#`(vq~HW2Nj#yY!8Csm>8D(;;Io zn3MJ+tiU195z}SOnFUL{Ql|-{5oc_=28S7`GDkj|dd8Nt==u_KDVNM3gF}Nd%0l}_ zuM5%Ibg6>%4bv#tE9DSuf<5U7vE-;I{+QlEj-;hJ&e$i5bV>UD6^JH|vnhMZ2Ksam zeOezvpTLu&&!TzLr&aIgtoqDSfXVNV27$v3nBp>z|HqasPTwAz6gq12z znlw&lvN-8H)(SFQNtg7soU#2_%`7&Y>~rLNE5uS-&yFg9ykkK@f_tjbvnWI z21k6@Ex3h}q+9dok~w>Hi7rXsYaY#mSKHvf82();Cs?EOp{+qV7pwuUn`8e%^UK_= zQTEW*pqvZVm``hzKeRO{C$$D%h37I;naNC5fwSAfOqH53Qwf!)7>tJWs3T>MKcQbU zl6HNTOO+-|rLPNBLiL=lwTpAcZh_b(zCv$BZ$r%GC~)<-p98MF)j6#c;4#i%7P?Zs z7s8@9%;XADHs@4vr$f|uy{ec5Pd!>?Jj|6N59g7hZc-`%9G^<;~r;{PdbMg zjEiQCb!s5qWQAJfnD-eZtD9Lov|RVDS?G*d=dni|>y$#QQ$8csc~T$M#-2o;Fjvpq zAo45@ubPP^bGlhrO0EzU$%=3xiIvI9a3P6R$*O`9tCOx|HMwhBlw2hJDo2BbB3pBE z5m&Cx3==15mLN4lyx(pBqpg69o8nO7GJ%Z0k+VlDDsGUr)#i7rXs z7mB>WBNxGc1^idSe^sg)<_9C%DCA3cUsTAK7QB-T&2XWs>Rj);7Q8br+PdF6g~!Pi zjLvqy?+UiMz&uH>V7MkV`xR^jxq>~ha0MglPr6mKE12*kMrrh#Qz(WA*Wa)Gyok9; zuQ%dNjF^j=6ht2oH$Nq;oVU2SQEyA12WO3&@8f{Dd1cNuu+Rw4M*g$VWuupD+&mAf zgD_4?Q{_h)!TT-t%N}9XcIGU55SIE=HA!=_1|x&HTj@-#wk`}KC{>%R4L9rhGxoyM z7#m3J>2j!FYv6S#3~ORDH~oGIR*36iP5H4@?YIY`hSjI+$;TFa1GQBk>Yq2?ILn?c z;uvAg!rfItJE9t2yw zl4_$FJrX3enV}MkmQj~qf`p+sAzBASfLsUNu)NUMzPC@cckb!!+u8eKmxv4YMxk0? z*tfHevj4U65rb zZXJDbwwx|V?;4PNM(&)?9~FFB@)tPgP$FKxnPh-TTkEr8@pegC2F3p{zZ+vFT)VEW z7>}P{`^|0N*p{hTr_`*QbgxrfyY5M7gIDTSu%oMUthH8m4*)b@0Q;>(hiL|L7o}9Q zKN9hpMGtVJv7512TUhI3K$F$_`afLjkSn$b5>?rUuv8mZ%0w(>{sh(k!DYI8w^wX{ zLlJK}bL}Fo1H>b;2#S{Qj#aZrLJo%VO(MJ3O}GzTU2#qL*Vy~9%(I7-XAj9652f9Q z6jwsC)aI@1=-P)#tb{yQQz)vBHW=BSP?XFqFk0xi2SBs+dL0FTh5|=;@KoUCL|m#B z@xBBdVZG=D=q73$8vGf$O{*>v08QlF=OD<)6+^*c$Z?d0f&rL^j)WqR=PLm;b{}Yo}+PH}kcM`1pj(cFm+* zOUm{66C$XapxabuUbZew)YfP$4(0*fy@a|$V^Pd!F&NA?{-_j+ML}(a2kHUnb#|b_ zWhM21Atx}nE(607a>ij$7MLmp7Adsp@=0S5!qsViPsg6!YFQu_9R>^fGd51~f?>oEx+@{wz zU0A7J+T!h z<4^2R=(*XSV4^OhRBM^tDhHk)R4suB$OrvA4YlGLC{+7%UHg5I;@VT#wD^SO>ulDz z&;%OyHPf(eBv`gN!H}7f?IoG6Fu4=$b1={bRp-!Ae>5H&^x=^t;T6^686(%SM>%I= zX19d7n7^ZwW>x2vinHwM-_eobNn|IO}T9C{AR{_YL@|Fktb0H7j&K#@* z4pY)pFxi<&Fi>NK24-y3^K-m^1;?D;mQ}8)SKI*{Fk#~AuWHj=Tjk(=gs8X+tEk>Z zynu_(L7^#|1`dx>+0S5Od!W!9pL1J(QCxDpYRS3S>#fEelgr za;E0Bn)96OsJ-yyx7WP6MsDd=>bj@wJ8qeQ?7Dr&ZQS3JP))D2o7*kF;C!sbnUB(4(2sM^dG}SD>|S}X zd(z#axOU$YUxxa;arqGTPV56AGv2Jx-mCe{Z`Dwb`J<|AC#nn+CiP2;yT>FS|Dx8M$77`uhea<)9zgB{sgCtQ(CTw&Mw_Jf!->SIw(Np&>6>)ALZ|bOac#9+w91ccQ8{F~@grWng zZD0G|-krVOBF>?zm0DCS&5NG!9$zhbX6OXDk@SmdsSjQUiulCfkQj&!4*A8PS`5|X zHLiFl3a_`&+eLMePdXY)MBr``NPPp5*kK5hMYaBSA!~u6D8x0dZQFD8@v! z+;;?50pNufd~+*GA~dFtFRht&Dt3^h)srVAI;_bPJV??z; zte=252i|B3imFWv24bQhsYUQwP7j^gy~|Z=z&`|f67j*KYQr0Fc;^X;aYB^n1r+aq zMGSsa9yLItvgX`_CVD{6X>IPo`dqTc+yjk_N^8xn(Riq|4OH#)ph;_pGPUG3v@Tad z-hn28@_+2FUYQjv2G}? zH@1FQ+;)*0@5?wJPdgu%i`&M!pnwUR#W&@CQ*x7;E(JiV zA;>#=&0Va?9^EQsipvQB@KaU;l|uy$5Gtd{(i4H7Aorazrt&Z=bN=yla)n>v{TU8_ zQyPLEWlIIo^eAnBlbj!TvqV_{sIT*7XPaKzD03UeH)eQ`!g~Oec~6FaTH&7t_~OWw z&tDoP$fqxkD*T2FhrcPL0t7uu6LwNDLD>!XX-Wckoth%DfOJ`dmldBc^E2ji1aatV~5Nb?9P zd?LdczbUMwh_nGtatUCd=m~)Hc>oW{>wLS+1+VS<$@A~`Bha7e>Q}lDl)C^9DqTT@ zfeHXVnBnj@rDNz}njBJig2*6L0HO>7*0?DqTV`!IfP-m;!mp6I0hwQs;a4mCY67p$ z@U05p3h>p|YfbOKz#F)_F|(;p+0=*ioBA@F4k()r5coi5(}1#R0Ab(&m>tlLd+gMhn_$#T;zhOu;*PD`+dC8}wLDd{j#9F!C;)-k{cFh~K8 z`^!%>Nx3y3k4VqOLA!vX?d9TOk&NP@)m;4jFqQCM72C#ou9sF%GbYP+cHDBkZQC`= zJFZOI^Ge(EnYR5(+x`zLMlK$a4+b&^k17Y@_GmbLaQN&?=MKDnAXE92Qu)+WrB|*P z8FxVOv#QRkizll(Wqaq>TI8zEbUA`Dlx_qRcW1_K{HBnKBGLvp2@F*l(F9@6|+_V%_F*F`F7KDOXe2*X*dr(0m>woWq~zFiN9+X(#@q2JhVGIt#S+|iFdb}+^6 zyBZZGFi=^lTMiINsE9xm11JnhKo%*oq(uBDh`&|Lv~2jN`tR0%=x)DgJ!{RBELTdF zPnA3_yW7WhKyky>b8W|@t4HQ~a31bS^9U+@PlhvoQ&>q6X#B9KJ-t$9{qhL4!xB~1nIf7=E|k;`hniJ`}$% z%_FGr`!byIo5D(pNE_fJw+|R7dII2l9>4?b-4|JisY#^$zjv&RyYZe{+;;CyGXtso z_wJOyRKrSm>-V;+y~AOC-(B9`QN_K#5_UD*uWKsWJ3Q83H`e0rW3IZr;|cEl4u_?^ zque&yi;H(5xMA}=@KX(2nmq8h)06+H27Gh{pJxb(vFIRtAHx$9J@xccE^rg$mty%J zZ^4gI;M&vlzd%{&I|*T|ov~fkj#Eq=*OSSX#j)}12QHFqlF9i7g30)#Mbe~a0>hUP zAm0FTWI0?HPFa!`>9@vL6bgM20lrXRfvi=+W4!AEUkHG21JNy9qC>`B?;m`jU~!K8 zGJ`^g;;_m}H@%OLtqeC@bPHGLkg>m?1HV`xSm)fM${hIxdSqw|-tqsvJuxVu2i93= z&HDMxLdWTJf=zon%PQCfN75Ri-&U~2t94!ENGkCDWHS3EkuFhtAI1#X)A)r8lTbw7 zp@Q#J6ncjPe1)IkD`Pn=7VEt*_L{F0qkkE`lEYKLnnphSEOdXk{+!x-n)9tcJLpf- z;R(j;>J?G>H*p+_xLyFyN*nP(8zisH%wo|Ww83Lk$Xw7L62p^W)f@>%#S!G@L=Q@W z;mOb}7I<95d zAvvJPuI|ufoR(RaaYjP$&^_<#H{v;v(~AOYAoFI7`M8L2dDG5S8E2#7Y)m_wvnx2i zaxFREdU5@vt9h*ZSG;R{7D* zVuDm;;R_B5=9V9FUh*Lycyf!5+v}}S?Pz&ilqEJ+7yIZkZarP(gGE=!L>Lhve@Jy? zQMkrQaMVNmAWFn3Rkc!P6~7`?uYJ#}9=_+L`J$dQG~7(Qj;uVZkLA)zM`5v8z-uWa z9r@vtU-Xkm%g`erC*nRyh(8vJ)75Ei&@UcSoz(BOwqU`REK8FrE)tUBsu{kiL_NI{ zJ6?swS<-vySZFA8gt*d-k1c&_-%L+utN3?73NFS-C!x4yW?A+>8Riso()BaO@k_?} z-^}NJ&TRfU)AkEz`I(nrdpYBLQgJ>xR&;(>PL0~^! zRL_2ny>*ynO!il6zEqQ8%N4f#hJ9(;4(no`>-@{`ywg-M&6rK5J9ZnpYT5zNZG?zH F{|{U$)rSB8 diff --git a/tests/rag/__pycache__/test_intent_router_v2_local_flow.cpython-312.pyc b/tests/rag/__pycache__/test_intent_router_v2_local_flow.cpython-312.pyc deleted file mode 100644 index e5b7221946369ec84639527f435e0d4d080ec902..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8052 zcmc&ZZEzGUf{!?MeM$TPDN zl2>&y_Qg0R0slF;y1SgtzN&-5smOPBqB9qa`H?u4tI7=8SY(b=x#})e$3KCba&VGx)5wc5xZoX_!-_RX8_em(DX_jJGR`DdTcgP>g+yO{WS6+*wmH&$bcgSkJz;5-tM zNTpD}d8PU(a!>cuaHUhWG}F&e7-vh_(~f>e+S%_+yZT*ecfXs!nUp8Z_OmdyOYUQ| z=y-|g_rlmG`IiHKfH(mX07w;#T`;Z|-4<4~i_|ej^Z>L*42UdTYb84Qn6=dTYx42= zu{ENRRDHR4<3*zPP2XkOyaitVmlzAzzhs08R^7&^NRTpIJwm)o7?I>4W7LNeaiR6N zpmt_dDWmpebE+h_3o$h-j~FY;f%{`pMvxQPo?Ip)$%eli_e`_F_DF--)+}&2slqdA zQdvRdhqLktWl)Goyp$O-9I~Y5u%Vsi09Z-d`l9fftFLT@&aic=yj+TyfY+!I1c zOLG#sn;Z5bAJzgK3Sng$$-G+PXhzGu$a56VC~8NinL0At8|xj;17D%%+7zMlq`9 zK`E?jCFqfzz){AWjVjEE4@G)=4(*F}Mtb)fwFI*NQ1_l_7vI{_+tL*c8xIg*TWDV> z(iV!e9^%72E&Do*8k079pruxbL^7wzhV2N1GLXbx}w({-w(sLFa-h_A;ZK0$1hmx+<`L(P0D8xvCe zu~c@rX>i2w@iN#TA2W?mUI{E%_$dkK#?dWy$<5mObB#CaAD-B(t!Vtcw{FJ!i0*yl z79KpNdmkf%M%~*;1`WEmVIgX*?p?bO^{DQBbhg^P!t=4y=XJ~?pWPv^fTt}macsWC z#IcQ?M{#gBuT!8{Iudl|cz|)7_E*|l`k(7(^%u0i*QPiCysJ%W@4`SIhrwIgRs9rP z-_cKT+Is++(ynM%wZGNg!Q|RI0MxGHIajr}^%ptq7o7fQfWtJu=D6H8c!u^m0Nw)* z`mKBh>i zW8dO(iX`*T#?p!o#|1_Z31f;nf43^>pWUg8wj(-Owwy?(hT)Y8@+ zYD$aOuk6n4!#sYf{gUVdL=4l%^%u2Y;YX2;X}`uOc*rCuW=j9dN`<`*>p8nn?lKM@ zW``|Gu7}QW5dkD5MSciwv4JbtHI1XYvvXciyQb^-#|NlIP^9NiYt7w~4j9Pi7;z+gJW}>XBEQ{mmts$8FsLt#Gt_(&1O@T zVqU_h5<&0JEZmLJq_>SRsvTI7Cff7# z50U7|+kS|C%vkaT&6OxDy_Um@vz&QmF-w4zxGYYe#Z`1$6cjr1G=oM^&=YBgBZC8L zB&OcRnuc3YkRYq04;(iA$U4*OA32PV5ZtKy2$#qV=G5)nsOJa=0fCHRnpeswIa%Tb zC6-8xHt)Re28SZIl*y$fSx_azHVQ^!ACzGcMgY8=l;Xu)dXP^l*$kLf5Y}oqWl71U zRK>6-GNN?S@XWg^eC8oIEL8An9B01BwLD>Ig)&u!Gm^XoXx70`QK19#YS{30?PT9n z`~#`5u~&QcNTK07cM)S>rn}ahw(Eg4=R6nMZ@GM0)gu$qMBl~E$>ij-ntxBh)e6uv z&N9^A$)TAo-TIbp?eKuMrF(jdplv>?`C|o_2vnz!|3%=A8yK6ht8@f|Rg`>3JG0ON zE!!BQ%50IcG&@HBUn?53<#L^jWm?*St*)Sa;T{tT$kc zfrC5zS@&Sc)fR2u_TAE(0=$_vbk-iD<0wWSfdk!`J#SAgayWa9K2yb@F$drmn^9+R zpT8DoIAMmvjQ!Y4D)e4-ipo0yLcdOxK^W17J%4h^JO^u(TxN~tuX&qEe*%oB$deJ7 z`{Y3A7jUrOCkH~mfP>>cIS~4JIjA_^kp}4#(N0OXMf)^&TSn*lJUY>xzfZXgS@J|l z9B3;VSc|J@Enp>MuDmO`s)7V=tu=!U)PdEw$6V^e78N9YDDQ47(O8yV+}AuE`z7hT zUy{!ECF%U1M>m4jpp8hOhG_~Nf_IZb=cqG(bJBJQ4O20I#pp5nF!U88*DwkO;M{9C zNec0Fi@XiwQPCMrk`X-JVk`}ZBB7p^-Vkpl5CL_l`UBwsEf!U>ig7r3c}h$5Z0)_whdE3dX(n4$R*nFkfSRPN8^m)$z@iYxql)ZvAUXoVItG&b!Zsgkm* zsl*nJ21vm+`v>%2V+qNvik?SXX-cU^_vQTO}c;YJq1ha)atd=;u0GN zY)N99?_XkYTwDgV6Y7tU@>Y;CO{8r5Pb|9Ym(9zSh};UdGR|DeWh!?9;A@g5P5~4g zz>Ct%X;NaLIJLm08-anTwb#Ud%)XzUX&=zr2ej=2(}4lqpDRjv$1ZC0$v-CZSzI@3 zVLc_?K$tbHc?cD))Kg}q%gs|3XP&Y+VlCzgD?(1kmuNW*+ze-0QWRWsD6`eCQ?9*O zt~eGJZ$M>Th7nSb^m)M|cvfWX%LvNt5mm|B1G`dVZ^)5sklz ztskt|dfzqJ`V*6|^4cd=2Oy;lro$UGUJI%+;H}_^h7!% zVZ$cpGNfim@-V|;D%hxoa^et_PX#rR&G0w_l-n@B5Oju3NC7KZie+U{F+5OO=r-LW zU@{{?kKu?3gYYCs14+#iuB3WS@7$eWRJyW zCXsu-`nf4?)i9tDp8gINpBC*KpA>?OP8c|B_deVVGcxP!}C zvo*+DeWOme!3sJf0RG&@SGLcvoX&DH?BhBMK5_E7OQSc~Z9228 zEwFoaW-kHcw6t3A=L&32XL2{$mTP?&q_KYebl`5@0#9f`Y_OP z(Q(c(Q}wW3_3*z|tG=9uMDQmKNQ^?^*xp;a7KD*m#3o zsWU4}FYrp8T{+>t!3K3EsIfs(mb6ARK~Gh#)mudX$(FM8LQwcL{srAL=${4 zYQkTEpsJ=SU}(9tVt)3*-zpYRnSR&Gm4=#$oJ|3f(1G<}JXk(UIWEYOh^-g0E&-we zDJ>Hv7)&YwOR+&6lY|?&0WTAZJ&1%9;%f~iEyyRJ)_Ec^m^ennSy6rd)V0Ih$1XVs zQ?V&2KZ0)7Mp4vnk^i^I{X69Q5A@_GG@|y<@TCm;e@8oJ9e&Dj?)fm nsoH;YJv8m&G={s$9-g%$x^52HX!@?pO*PKBVRQ$Nh<^STLTof| diff --git a/tests/rag/__pycache__/test_layered_gateway.cpython-312-pytest-9.0.2.pyc b/tests/rag/__pycache__/test_layered_gateway.cpython-312-pytest-9.0.2.pyc deleted file mode 100644 index 49c720a33a7571ecd6255b9f62998c1024194749..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7062 zcmd^E&2QYs6(_mmE|;s7EJbo6OLo>#{J|t%S+*=WN*qUa6eYDIH~K&u#VJeeP%>ri zM~0NFRd)fS^}#7pBsV*S555$L;1np(9#XXbK+(%8k}H7-&;UIY?#ZqK1kkDP4ar?< zy-kc10RnWe`ti-oo3HoY%zHEXYci>DkdpuUjoA;>KQI#{(I>VRfw;jDj_?*Y&9kqN zjbsF#%Zk$yk2Qi7&BmrJbPqcjQ+fCC^Lo*s1{pUTY8s2WHL5$t6}_18M)5G}XSUKn+~5p0-D!dF zM#K<1p^OMXMGOgP{F@bFvf^~KD5{bh*G9541|bG@CC6BDY&S{`XMyH2{!*X;2P@>b z2>fj|0f1O|BFqVM`~;^)#{T*1k1+l5^qfch<@5@t3a)4y)-1)z+1NUj+P>I3WgFD) z)h%PG_Z4GNE71JBk#THo@mQ~JrU*3`ja*7E6jD%=F>JdRE9Q)x)9Vhj!~NB z$wiy<dF^3T%Ut8{8aM;)MTi3OFU+V1B(i4c)UBuZjLHhB^!xc!=L$;^_IV{V7B zl(80wp%rxJ5}2nkYc3h~a+h7qIr>t{pfpcYx|0IT89GfJQV(sngT3}HFvA8|G&2TR z<90hSW>a&9qhZZqbtqNPZQE@<+ow&u^~RYC=e4uLlf&mPjJk5b0uE_(IMxv&IN6b0xy8z!h~m2WP_NEBLihFR4^u z6>w1Cv1By1il7$viv2bKScTm5f%2ZRA$P9Ioi`7z%lkJItse}%H&oeuWId7oylr3Q z$rsn!PF0#t-H&pey_;Qqo1M>XcJ^%UJ^b-AmF^Rp-A``rOKo=Vd(awBHs6mVb}9F{ zM7)8W$uJdRn6x7lE0Pe1{ zN41FyQ{!hxw6m{Gjh&mIJy`cN!U2SX2!{aF7(I-%itr4=vk1>2piiK^2uBh60d^{} zBT$p(&qT}QiLtCU+UE^f_hFYm26!~}4y?5eR+U}n>UQf3zGU`@A-73CrR|JYX zdTb?1QLA(pLMuWy!XUyB0`8U2p}ZTj2)L1KY;cX+fj8Oom?55HsK2d?BI?fZeIUm+pbJFqTHL~(F?vNVrTN?i)pw8+_=q5j+J z*dXiR8NgCC9tgL<)1WRr+#<(gZ1Bi4>iGH@m1>bmn6tr5YMd~GM5xzByw%9&8~7rD z9KL~14EP`>l9nNKFGop|G?$_#&vG#bH!Vw{p71cJOQl%QQ}Bh@i(BH$0{lhbPb!O~ zr7VM`;qhIU%8`;>iY#(vp(NP94UN>umUfi{u%%XPQM08`n?`bzgIRs=HC)vkX}c9+ zI*60UNP8*nYeacujVQsIgRid<8MRW56gjnHY+Hg0){(yLT_Z~cOE+`X0G8ry<{ln6 zlPdzmoMzT^+++|ev%A?nJeX8|TR3$}<(JPLI9w>6P;KRBK9M?=Lh7h$AI9(Tpb7}T zs!z4krekDnrK~FD)G4pQN!4~EmXX6-sl8x1aAS=?Hwb+Q#}Q5-oLp{!5Zj;*8>kOP zf>^oOcXas`79tNl6ndxp6J58oS>3b@GUOEy?TYDK$}cz?E== zra(OY+UgexYf5KL+lEL0))JvV1j*1h5yk9Qz<-67rPn!mxj zt}8Lw&^Lg~RbDO>+1zyMwrY53)2LCPnS8dOQ^Re7YHel#0!lLnp}Um_4%>Y~vtdyd zVXWGmm7jry;{_L<0Bn60o*4?%Z60PKH1j!j34n{`Y@TLyM>EhOa=HUGZp>etns8(O z1)PrIyb?IDx4L8DOn*2t7|slM8E=s1y_tKNzP>Qu(J?72N!IdZx(JXyK;P9^(pCE2rIR z5$;`YR>VwY>g|oG%<5DIX($0Ak=YROcQ+{UvTH2s(N*+&VEo7cy)k+nX}_N;GZ0Yz zaA1dF2@7yO17yKzHN=4$KVhH}1T%bt(5KATf}av!yZi@1L(mpo$~;~L>Qe1t;1f9r zgy5NhpRa}zwFcmxB6blU4?=FHfolrJhJdBx>jR0J)2Ct12BA%j69be`uZ?(X&LeS4 zV9rBy9uL+LYKzy7x>Tx$0%3OnD{m+f(u8pVNg|dd0%1c*Dn%E#a;y}ytM94=_AV{9`qD^efKGW`;5VQ zzfLZX{r}1Z!ix4WcklS{sP@XpnJK{6Cx*|QAJHa9CMLC4Uq3%NGVY2FT`=ef7!Q3F z0fP-X3NT4u16)=^4)a(LH~>+LDbnoWQYpI%crpL|Qx)h1XpQdm7!|Nfe0O1f+y+11 zR`ugH^W*)h4K2`BV~hSBUV6au(gU^kLCd_%9tq*eCTFY7Zqzp5Ic||%@jOqCw<-D~ z1a?`*_b+-8;Vp!B5PpJyudwu|2-5(n;wG~B+-0K(&wQCnw15>e0AXk7dq&Ss9;aqq z^>Lc1mUuiT!rpVx#xpJOmcd)zksbc>Qa+cbwnmJZg*gpg67?B)6%R#2v4D10bCrq73b|Af_pFQN7m1FIMAvGft0E$9h_&BcvFrMfSFlzi*Tt^NPCj6P#+yM$ zH-}df@Sr%bni#Bzr$6lns3ZpAn>f88;_t3s;N{j>&Z9p=evb?zuzZKTgWPJ*2x`)m zgBXsY^|+my7xksR?EsNjni^Lq#D#9WTI9z3GG=G)A$Z?Sd;it2(-7RJSsZ8P(slnp z3E3=Om^?eiIEZPw?logue$nglCHf0sL3eGR1h^mJdH(PC!giNC_f=HjyB}}>UnxDj e@_+;Q>O8OTZ4Wqrtvykm@L#sY`ImXN=>GtCob;Rk diff --git a/tests/rag/__pycache__/test_local_project_reader.cpython-312-pytest-9.0.2.pyc b/tests/rag/__pycache__/test_local_project_reader.cpython-312-pytest-9.0.2.pyc deleted file mode 100644 index 2ec8529cccd39e1114100d2ece8b0850ac06449a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2902 zcmeGeO=w(2c;4H2`=2yTOd6ZEE+mmW!QHe?OQ|9j8U?W>mKJP4o-aGI$&2r2nR%Ng z%Pth@p`uXn;tJmEp^_fFc@ybL@Ulx%Q|6+e9=sLn#h(1;y`9~qt*gX+3cdt<4^A60uLk5*&mpuvXd~?awqt}eX{A4vRTPUPB3n7j zBS0`QZYQ^)RucMgN$Ouc(vNv$B3sD*Q6Smv?kY4C%5_GdRRI0 zHMFznhF;d!P+5O(7@?-#(AV?IqmMt+KN-QOnP}=H*TfCnNNk{{(J=TI;XY-xKBA~T zCi#X@(a4bWsOa0>jv4S7?b|A2f^$A7wv0C>A;^PA`C;JwPY9v%lHfZ^z z*?X40Muy40FZFs7>XIZQWPc;+Xc3nRr&Q#Dc@HUBA2(8JUWGq|^RcNlanm59&nnsc zZz`GTR#JPao*avM^0{X{`FKxm!9AeC*VL~dbNswW*ww1QBq;NGmQ%LjlxeZLRi7lZ zQeZWI&ODth0K}JY;b^vQ)WXWkr{LO7Q@qiXzBc$^ef+{7aYGJ$>Sy$hP?l|sfz@tK9=93ZN-d&P!6UO8u}T3&KmxUX3U#TB`Dgg~|sVdP#hXaxF9jVN9 zjHx|5*THkQ4({TG-||Ox@`b(pY$rc^vwUmrD{m*iaCPyQ>A9csW^3X4#T%DDzTD26 zR~KQpmz!$inRaffRcq&9a{0U46~x?5#Km-P1fN!|r&nZ84FtITzp*FUc>4M)E!xga z?_v478}l)7i|6IW zLl+g}7KTsuWh4&G zD)Ey#FFNK?e|?P}KpezoVR)E+H4gO}D*-G2kntH9?k6-&`x&8Y=q{T49bLMg%xg2> RhxZYn_R___BxXf0{0GOCe@p-X diff --git a/tests/rag/__pycache__/test_query_normalization.cpython-312-pytest-9.0.2.pyc b/tests/rag/__pycache__/test_query_normalization.cpython-312-pytest-9.0.2.pyc deleted file mode 100644 index 59302d0197c682099f17b5f8b9d4532d393693e5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 9860 zcmeHNUu@gP87C!5mPE;kk|uT9ZQ+8%wwy#xoPSGDrz>I&Lx6ecuwsD=jG;x^p)FC` zQLRGzTth#(sUHq;+~1LLFP}rKz753BIF(cR z3^&Bn+?VyIeLR;Hh5|gR2@VCJ#+PZ!hK52srv=A$xQZJ2*mDiqrG`W`toq*+hN6%Q zkjEeoK;8~{5b|x1w?V!g@(|?lDLxVTCyEayczfHcMU6}i=15k_=p~J$UA>sM!OsuB z)gSWs7YdNF>z0#OxH30}E!JHsf6HlG;ZQyO%b$6}X)hpF2l5|0mipN03 zIt7mSL&8m>7v}i~zW)AszO>^&cYf+f!j$^^B_xj}Ogmz@vq+uy*?y?U%qm|*WiDfy-G&A+&iF6 z$a#_*)6xY~p6KgUbV()pgl0%eJ}*H{S~JaFtQggdLN5-4*-MmBO3B~DmsEDgiW;2E zPuV?myw+A~L{8^286|IOraXB`hbDO?t&zQ882&4B5|U}|uW_js-#2~!e*DFH{6IB+ z!0H^W#VT>TEFdtiYU!FSD;v zzYisvd4h{6!Tp84Y6RDIf{QhYVS)=R>42o^eIj21e#0rR7&$|SB?0y@6JD1bOnb5q z1h%7+4X6BfYViv=8WIHX`Bnqjq0ToVf^FXwPR7_^&5?U+XnK zPc+zECSbA;E9voqo*sv7MI*zoH)P3vFpa)F8&3Rh*W$0?#7|j53MYQ5DyHfJ-pft_ z ztvQMBmvg?sk&JDPWaY_EiZGIJQfwbAo`cb~Zdf0|DR8>_Q#@+)rgKDt#2C>>;Ru1a z?A|Rkmo|H$#T#_H`-pCN0Q5j^A(>V0-7W2SSaP1XeY)Wu1&_i}P&eG8AjNd-40x2_ z654=vMMQCr?ynSa%#-p{aNrCYxdP~ho_6C&6MJGMZg0gGK;;J3OIg)9YLabe2f{&u zuRPg>2_C=6PE63VLUv>FJS6i$vIpt)$G{^5`yyY!9+-nJkEphMM8B07|7w}$o3K&}s|L z=*^8@5>9U+8JLmo)qwA7yk}cT#u=dhb4<8}WVolZ|85}}@PI!>By$qpFYA49PA_<9 zhN1{FucZN_NQWfrH{jq#C)MvL&dDmefdJ>rrD$_Q(g})4Hzv4d5%gL$&`C)|pyP;^ zLR2|G2yzfx9fqV7qLqM5ND|A?QT7lBIJW@^C>rTPkveZ>^vUYRsI2DT1P^dV9wwSH z4i4#pW|-iPHpwy2jNO_)*a!-Iw-%QX3hc3ju9>s5Lv(wC9jZ{8N+f zqE+n7R~8_4Mr9gjOI3Jku`|CLlUlR;xAJ&+Ey0f=JjLjp=bhQq0<{vkCiqHn0qKFcW zr`ROZYP{QAyZ-lMy@{nE*V0Yeh23^)^twP}sG=HE+smT!?4pnT?4qtFH+MV^Z4gzB zz%Nt@tJ}7oBgDqnyfd3TpJ(zpg5P8NV6hK2P6&uoyZ{lbPXHI(wtfqqj&G%28Tdwu zIyKPs(TofviTdah4+ppVAZQ&ZOzLUP7IH>fOZW(Wfq;SRzEX2^`#6hkAGc$mxR`}N zF5T@Zd;q;)Z{fc=8fe>~=r1AFkPLOr}59$-~oFI09cA1D#Ux@7|$|OM;MowVzB6dq7 z8h5^L&(p7 zj|afBGN~8fqW}o+8$?fE!pA^Tpbu>~-&=#GRw8Go&)pYy)y2J4aHjZc;{NG@mFVtz zRH{a$x#w!p&gs;Bar?UiZvoWlfO}c!m^tw-#QKo&?kbituGS#E>P4Z$6@hA(^s0dX z1uNnUmXMs=|Er!GJwV*(`QQ*_GcV5_vczOvzJ&arg z@{rfuBS7(rxC7DK{`Y&XLHC{4dVUVwcg~!eh3=c+AMhT&n>p2t?0}{Uyy{u#9wnDR zEp(6MB9M+eD`4qggiZ>v5>gNYq>$o<-by6NmaGW$Lx$>tD%?FYYWHzT3Gn$!%uPTzdL1znrX#yWiO!Ot!d|Sc3O%bvR8Mk9= zn%WVj5v%AY6*S0918&rLM`1giZSx%cOLX2o2))EQKTBSPNeEMrGhc?}Uw)qF|Hg4| za&N@`!JWS!+xgDxZ@pfRbyj1Y(~;F+fd3}Hx;?VUeIgnoDm=m|T47o8eNV zXvWPUL-4&fZ|1$(nfIAD|MYlV6tvB&w~`$|{Rej{jkAf84#b<3Ov!Yb%Fr`3jcF#$ zWY`%t!_9CR$BcvU*t9d#G}8n$r#R*r+3_kj(=4~jO@LbfHv@J7ZUM{#b^&$+<^g+T zx6%r7t@E7hfxdUu8T9@ae?pM9n#ZMuQE62{LDuqxv+A;fG)Yfp)d^kF6{~ev)fH7A z&*pUnJwIUa<4P_I({yD;2Wjum@(NmwWl=^-C$A{Taw0{~BQ;@fkRUfe7XGCU8t+yI zSZ*@CK+BBGE-*S%;iW2PQ(*wE8FkjMZL(&x`H`c<9*1Yt$l|Z8Yc->-bwkjt8Et#y zsQ=;7h2}qUTlh?%O;ABc%yQ;d^~J1eap8C*YH^Wxcmgcal9tqkytJTbmQPxil4)r! zt%!0qBPCVMYOAu+*o0cph429(tl4VAn#5>qa{SW8_;74;!fGd+iA!V8#Ye^P;N;+F z{G9a|VMd}Cqp?Ud7QQ5&8y~!Q-tw2{#;3-^Q89deDs}VAPSaxVK>YOb)8m0?ija?J3yEPAl^0Zn%4opZ(bK%cx>CaZC*343Bt4>)u#R$qKW4R7GsD_p`9Jhjij$wgN0|P1uY?e+-IZe^Tmlu;TB_|~m)CB_Hg})X8 z00#64MPFB8>eL8xtPJnhy@xOUI*1#pF+z+=)YE+fA3rcbQz*9)Ca@eAgrFHwlY=i}tGq z6Bo-r0lE*_#`v3Y7stz8<2~~g;U!s_7v}QGwA{NA{LxDgI@l|}xxf`~orbS5#z5l$ z$st8k&@u$boRnD7lZhowgll*Xl3xblFF6f=?I{2ajWSvEP1#0?-s7Vt7v1B(w*ki= zGP#h!haNt2e3_A?wF5-sGnZ*dOAQm(S~YPox&suDw#HP_Sq+a);Y3o`^n*(}#n%l% z7s`S1kCj=Od&^nTT8|H(6B6d|D~jQOZg#4fSDvl9cWuNo)#&Dhl5y z)teq9p^%?XE{sVkRG0|75Z^FRL*l5m9EjBX9MGiPvRviT40NkjlcXjVvq-ZzxXx9} zq3IIREml!wi%lzPkb{Q+5k~`97rY9zd|J1hwis3lUT@b8J;d$H^TqNE5v$e2`J^sF zsEBjfyeezxry%wd_-lCp;OU;uqUZ6#(4I>NPxrLnn0;gR=E?iV&lHajyf^lzc+nFn z41MB1vg+rw{7zK3rrYDWPk9iki=8 z<<|uEvO}|M@3PIdJb>^S5Z57Z5UcP13G`J;N>b#PQ!B3PNo`1q5pwyF{6ke5TSm6mtK~2cM`Ykmot;tlmx2w zAR>5FK|FbpUQ|THkNO9A*-%9o1O-ptgnIJio84>@#37mYd++_;o0&In_T$*tD1vcz z(-ZdsM(BrBvZ3_A+BAUs$UzSF&@4`*;^%AyBVV1>u=FTi-Y?7+0IN=JNu4dWu%Z2w z31$o|CN5d^iw#0smq-*cmxr`v_mU@~0CNuhYfG?)`-sDwj^&>0pf;M5jDLoMmwVg} zc9f3NR@%6UI=Oa^J>*(Op37%wARXY;u%pU|nzF2>o}rlHfSaMVlC9=wyp&nz${8BS zY~M}9HV@?-A22f1?w^1TGyk`GpBZ3BbMlXr1vpnnbqY?gt-3hTG`=CrJhbjaW*f-1 zmYpS&H{oXIaYyOoTF4lgX z)7?Oq@PNUD#tHSAp@C5|M;N-H?zC-atK9H1yMabQ|ndz8}V6 zT0~zJSr*MBKbcFU9Tj%c-fZSlZ!6Sl@#`8 z2zWsH?hN+b06wWxYp^bYM#)pc8#I_PMno~YQMwL%Vyl_9LnXZixS|Rr*Qv{)75XMo z=-H@z(PA%DwBmzj7GkZwM`+&*I|LfG zqVkT!c4y*0F|-hQyV8?4(S>~bQWmH*c>-B6s)2((l6LD?-l*sVvRGAo)NlX z+b@bpqFsX5Wl;`fxD~i_aOVTHCsjtzw@-p&_(^y>{5o6>SF~^?x)v=(A88=2hAZKn z@NW18jD8!gMmMzZyYQ|Cy4CO-_^g8V%jo@+%kq{oGgFbTxcd*bdPgg)^ll2Y84c02 zPyt9)hbpW}3Gjt3Sj-lMb2UfZ#_sorqBONOJn zMw7&&Iy347Bg8vS@q%p6Jxi%aVe*2h8eW<+IqY87AzC184g*jogp2)MZI}q`b_Uk*9=>;sNEs1 zX0%!wjF^P68V)pw>(_9dSdAJDj`VkMBh{0KRBiR*1AHB`TD{E((=E?r`lX(3k-E`# ze7Ya%$-~XoL0px79^bb%{=(IBKb3cFlqaI{M5uPd$%`NnPhMOr8-Ujd-5}kFba50k zfXm$t6~Fg|Cg~1jq;@|zn)KF&a2>5D67@ZvX^6|lz&QbFVx9(KU=bW+5R#^U*ku#u zB|YXATm`&_jPaOT{!iR;7M^YRS$HS(UoN6Q6i^e`H3g~fJgIvwrw7}# z{X{_tY^bp9(h7vYgW*5#nn5^O57mJ0n)S7E1MvF7;>JP{Ed+o=&;Tw68!CS93r*4; z$Vd%v*F=-GAzVjm*fmjo5AbAth|7%x4`iBH#K0mr#vlu6`hjr*z=a-w*;N#ved4#N zd%iLjj|k@F3m)&)6Rxf%ObPr6hm0<@ec;`JDlVov{85+;)>C&-cLJt)PbFk3%)fXZ$R|`HMe}Wr^3!pYGPki6qM_bQd|zcw;NQ2Wx8#HAF0_6pe*)3X>8JMF@5bGr7rC+9qwJbm z^pXmP`^X4l2k)G^@Nzo5K3&Ck>q+m2t^Qc zRSy#g=IRXLA13|K&s3xrCfD7N#BM~@(p%Ydf+SvNEMe+2=_V|41)g?9tF~6NkqKFr&_}GTG%<5kiNb7 zGQ0%4=(mNJq|FW%`0n~2t#i^`y>o3sWoz}w)Zbywb8?_b4oeGy2`$|PEZqP=^{}-p z&GWLgJn75U`6E+*hqH#99b_!Wr3KBTU-}DJx&eUfVe5HmuH1QTV#(IZk*UAKoaf{~ zlN^>71QV-t7qD~#_|;rFh8!U{xphWGpT!$aQ_U6Uis=VJohA99Z0AP;lG|qV1`7ln z$g)W_W^HUyYc9a{wxh)Fhm^NrKS3c_KnHHvt~}=1q0e^eYs8j8$IgOzH1~S0e1ok5 c)ekv81?KM>#`t%HZlgoA{!iV)FJ_wm0B0xRi*Da6L&Ol`9)H{)?|dwb5zN)8NMG*u8R zy~@f)Y&3)rj5+^+G&7`;C4yjO7r0bbd9!!o6+U=xzHi=q^XARWuX6bzpq)Hp>o3{)D}kJg&)TEn~bBNyZaVt&R35 z1{gd2 zs|-*Cft62iCNtiu26p~3ZnwiErCF1S5RVvQiZ|GL+ziJajGLN8@dMx`gU$cAnS3); a&hy7eO}C zmSU|J?}~(!m?$41g}{t@ho3q=4I#EMiVbS&o&ov6O$~m=M&%<6Gy&rY+GUMfE<(qLZ#7ykjEIw zCI`O7NcO@=RgwdwsuBuw@fc&-<*IKnma{NcHAq!0)I5PyPPw``60D(1sU58ws>8WF zMkMzoA{FL$sGiZhK&vp@3~i7ClJ62f)BsOEJR2vtNbn0}WKegj=M_iNwhN*%CaYK@{O}Lk-%w?$wu_2~{V)2o- zuH((kH+zkKxjLD6^Wawlfp}=anPlzKYjae<@1m_UbavOlF zL}rF$$RcsFRp#q~2HVyOe>TMNf0zf8zz^9c_=ruf5RQuH}b(@S#rmD&qZezp- zsHdWuOq0b(+rRnSZyfq_|Gd9F?QH)V9xB?~4?I=;V8o$21tBhu%7UP~1z|KHjVXwG z1>yXdsN_p{C8lb+Rn=fZhLwb<(GAc81? zfFdJJT1uz|+c9C-3>Y>jtQyxRlnorQ(mLpiZbr}wpj;n8kz(y|+%x@HuDGV$=5drp`G!!{2c>FqP1KhS5~jSRyXOq_UldvNCy5P2jiy zIx)%pl>D_N#+`&s1GYbJtD#}ao5yz!C+JRNTUiV_BFGKSow=htBeDjDnvI!iSSdtF zArl@qCCCwIyy2buL3+o_>81l|e|Os1Z3y6?u&Tg-?mVp|P7CT8F^W8!sUX7+pp;tk zNpco>T9M3`ZQjO5EVKz~(B}Y{%d!&*X!FXKC4_vhT-sFYTGFkowG}(70x(TJ_gBpx zSqMF!2|b_nZ%;e78$$9)Q9BbwOIVuN+VDWRO7i+;%)8B)cgAQZ6fFU38OYF^3kiVDv|`(^9|mc(DhxGS4)C^2+q4ZiYvjru@$0VtoqAS|RJ!mGQm zAyX|YnORkZ$+!nQ#Fwc~zChNFMtI$QeoUql0=`ysn-Uw1X}VnzC*Y)^2a;4CmZ=a2 zjb|qa-EUN8HeG^K1Kp23zJ%aq1P1^Vq(s4@=F2>YN3$wgnqUk;;AB+SjzGo@g zGrAGMHU#J=fKJDv8pW+mQCzwk!CnMx+lB$tt+BYK^QYl3Ltnv?9t0>O8_js7Zo(`A z>{aDpDlU=5?d`X<|0Wh&*OHU79h}>YFV=&%T9@&$Wan%<<_;ri$L(E6+JU6d4HZeD zTdZ>EvnrPRrG^zktimlTBi)t^Qh+pUT&%8H+`M(M<+(3|Zd>GDUBi+Mo=bMJq3N3Z zal?`Wb8b>yx8y<0O9E9(6^QvruzL37N3Lr}GJ)`tA4$+(^AdKmR7u>v8R_zdoW~PGr7=4=Cxv$);KT#} zOiTLUFkNa-@$CTbet54-_82EQB&Xz(+}E8W+@~JXs!nklwq;2xSTplnJ;|94$CL%E zGwS?`q~Yld7=Iu;r8dE-YzN zaPrJv2$|$fejZV;;08;f>y{KK`jkVemTD#)F^=V&8ZymNNl$o|T#+UVuBSQj`w%L) z$W8I^ZwHCVS`Iv%&RzM_IXK``u1VKgF1@+taB2_nWXe6|g3}tAbRQvR$&^QHF&UaH zYLIQxrv3$-OY61GX6e~h6DvN=UM>)|zC=oVkFQ8t*d&-z($W@dti|n%6(LvN5(L`K>7znsZ=p#WmE~Y86?i`ghQ4%!~qP$5lE~uJFHQmW@ISwwj z1o0{{9+e{;3sgL8#gUERmf8l9g|>V+mSxP?ECx<7JS)?b4eIRdOl=%LBU3pXQ^T>* zq#|Q9MwSYqQwy+2j{~^LJ+vG+aFa__ZrPTc=!~f00|&y0?vAJsgtY<+wwDcb%)=1RcembMPvF$zHq2u+tpJ07}ThFGy5rQL6NCMO$8?9NPQ;_Jgl?r{ zaTeRq-LE7kn2ixB3p6VVn3N=qCPtGYm35b(iV*n%itanaEF?sIdnrv&y-I+%?I?@} zmP!%hq6Q^8#8#O-(%tY5dDXCObOe~wy)ck)dMu`Bu{eCTF>I4w2jSPmn1XgJNre%J z$BGL3>OqsxDB{)aQ85W}=sZ+N=#Ko`0kRNp*FD&$VX8VxGrLMNT}H-Wc28+$FMd5j zcJZ}knBmffohp723zsAo`qB44xlN{j3O&98|LSkSoI&u`vjL(u_1hO4Iu`49EY@#c z+}N6at~=d$aIq=8*x0n#7``8LRrr>yo?7=;)(WqE`p8#}#9x1X<4>FCTC=|P>0|d? z{tufkH(#&)o92(3)19YgnzODq??XW56!*Em=EHX{zk6-(Lc{hJ!8{WwJ zzdyr2uwo4u-5Z$YF7KV)oAETH`L1+x7ec_ByE2}x1s;EQOp1}svaEs6vnB>!3Zc$o z*Ngwy_A~g%b!g5$YhMVoWCAUB0-MwRL(_c#?)v&abLM>gX}p?W*>0jWB zzdKlH5VA!y$M-`6gFFv-c^jYu@viUa?KgA2qiOyqc7HVMK{Vqzy1*BIcd*bPWQ%By zKMD;D@;u<>ZGaBMyS{SX?_5^AIN$T&3FbD_~P#l78-*d>$zQ*^Yx_p9_+p+>p?W*=~>{5zdKlH5VA!y$M--3gFFv-c^jYu@vg7$_Qjm9 zFU|L1_kCFpq8U%$0$=>y!9s(OEuuNT4;mQcdBDrt03GT+s6yQ`bntgyI!U01Q_({G zv+ubRmDXQW)ShVO=PPX|8XaZ!8Bd!mQaBHhywXUa8Jk(>Xdw5g#f;cJaWpU=&y*b3 zts{l#r0ES#trZt^<|Bfx$BYQNSwzsY&JjUxAtDH0V*lSq1pTW#({GLl2BhFq^ZUb~ zxh$D0{Ybw*oNqwP7U1^>AK}kGzTaQ@R3m~_&t|vG?|-_p8+tao>o~jB&t`Z1W_OL4 zmGw$|Rm`epkiG$Ck75|Y2;_97f_TTEB#JdErRp|^*#$qh`_OCsVM$h_G?ql~B4s}# zs%Lg~!o3Q1NnsHB(Y^UVlz?R{@bd+Hj3pF(Uy3dieH+0K5a6AgvJ=OX1a$%!)PYa_ z5SR%M#}qjq(D{ZS#gT%uU^FqpH_2F1R^Z~EAjT!UzKE9;p&V~{$!o-I&I8}2ethq( z+O)sr#;KftN51V2GAgWxiPKSuB;2(AG524BAOv9~9^2EAc`Qyn&4_^hXK`pD!OCSD`2EXPPo;at{=fV?;3Zxdx5Wq-yI`sWU`ns(0QzDprsIMJkmSwz1^4d^``k= z^bmWq9z-*q-UYt+yMu)WAzMUqd@nRG$n$`gw*fj3*WGaowP{YVZxW||et5MuEdc9zT^xBNb7`!;!s60+% z8iex-B#hKCnz13-e#PwzcZnxd_?k13lvUmRD!X<3I%FumDs`USj;n}LS=3~~xO@)Z zFjy_9uF4vGff8X`>Lr)d^YtiRuF>ti?8drYa${Y9Frx0w-|ifRJKj_;xl}ITrE=Xl zIHoACA@;347!~88hMmH&8{4=mu5rOle}nmMiZKQ}IIz21OID8KeuHE6KqLu>dFRp zP5bUPbx-?pq@iqtbnVu;rW|?kUgf6QEen;KGL@Usn|Eg`_e}d?glYfk0k+Mx=g9v5 lATK?zTeyz<1i%A#6IXek09fwfHgNsiSNm(Z!yLQI^}j8O?9l)K diff --git a/tests/rag/__pycache__/test_retrieval_statement_builder.cpython-312-pytest-9.0.2.pyc b/tests/rag/__pycache__/test_retrieval_statement_builder.cpython-312-pytest-9.0.2.pyc deleted file mode 100644 index d79cbb26aeaca261f1e6a3732793639efe59ce84..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 9121 zcmeHMO>7j&74Dwt`R(x!GyK@Fm z+hC_#BC9?4z=0eROcrU8qDZXRNF0-6j;mb8jAuP*t+bJHNu(T*oI~PM-mB`WY0PZQ zW=Wz*w7OrtSM};ubyaoM_g??Ltt~FWb?vXeDr|%#=}#!|E8sEf=YY8*>5?uNrHe96 z1GB+=K$d2eiy;|H0>$ub^zZeHOqAMRO7gb0@kR~7vL)x|=Ytg@8 z1Jj!9cAqmWQZVLo#q(CqGG>jE^@F)WQ8$PdaFZV(o3#wn%3dxMErXbDqF}O&O3u2P z_xeebD9|80>u;msP7 z1i9Gert9hu+)jacdjTok?=8nez9Zm&_eLo7wYF%iSWIe8{_X3MB z0!~;@=xuhmAX6z~?c$bw?RN3JW@<-xyFC2}7TyinQJj$8{&FOp7c-I_FGunPjb!J` zk$f>DX$SRf-LMfjik@_$u>VD`^?`(YX3@82wAwRMbkE$5b-w+c>9gHxcZ>3UNZ;Y@ zY%zVOzRQkzJ6rs@ceXgU#8bYr!R{7vqIwssq~Of%=3dA-M-51}%J*(30q>dcPLtpH zdf#ef*lE&@HNO4G=(}IoX%gh`yya;kG~qPa?R&dcbE9&rTj(XYp1$XvLeHZ%{S|$$ z-R8|<`*Y7>JGaDB{~W?Rs!l@hc{z`Oj{fiGaY54dO>cxq?n?jBE5Epl*KbdG%onFN zwol!t6mx}Add@UR8lL$=-f%l72eaqjy>M=FDm(f1h3PZrHN}m8IA@RrfUP$yH(bmu zAdcN(+{hQ_bR&y6Hd`Ua<-!famt8Deqh$bkOXgx|`rY@^eSnt(g_0&OCVTrT3r96G z4XqsKPN+s4N^?+=I=f&%SeJDt$uqfHs~TTuc|s z*A3E#D%vI;+MU70#MJr8(?6O@PaV2+>5$v`jD-kdb#tIslQ#lmWB#6wjnR&bXr>k* z2vM;=Ba8k{jT%7C{}}UtNi&=9ax4oNFAD}F13tx^VaA<4 zE$+DCN{-}aO--R~6GX-YK`-{=_)|mmI_t&ji?QBI)YE`&v=ek32x4)!ojE0h`7H*) zO_#J`NqnNRKz)@QakpjjxneO(j0(w@XQ6S!jb+W;Wdn2E1ZZZ_j#Vg`uq4W$Y`R@p z^J;kx93IrkUMZG8$Q84t+^pfYpQck;D3_)PDHAu9y<8@v7%M2~ z-_DC-&Wd7SpjJcet11IkweP`XRUKGU@UD9qOsY|d@q$8~2a}?lv!WOnsMb*XtI9}K z?SGW2sv~O(-gPg7Ni`}lUQnp>C?(1{D~f@EY7KQyRoP!v_bi)Lb^n@zciqciQjJQC z7ZmC&o1&bvq8J#c)=;-qlLuGS-l{V6pc_b4?S0U_q7JPoc-OrQCe^6K_{XTvSU&}o zhPtDw^eylFbno50z}(&Y$v#MyPAu<(ptC^aC8mv=ID70m8s>|?=0du|N9Zw+y6r&8G(`PcsY{JcVCk@lARw*cHj+( ze}Rr-?cm>LGtvnWf@nf=Vs^~@nZ8X=KKIw$?OU%czGh3rLiyK1{54vv@Mmkl*PZmW z(xOiDJ+{zmMjul5f-J83-M@SAQ=?7{{G0951UF}baqKq%nBzX^cA__8kZcJ64@FXd z=EDUuT`F4u$af<69z@@R=5YUmqDzR`1D+ma@H&NtDaLMp+D|}pU<;fVZVp`;mLtq{ zVowshBDx=W5zvPsgyO^Std9dZBgt^A*wXv3OdJf>`!%5)FJ0o(`E&V>EK9d`Dbj-c z>)>@6IvwTh;4g_dfJ9=M*9+hU1>8Vp&<$QQ7EJsnl1`HmNH$_80cHaBCgY1gq~H-S zY5_33z>ekF0svK7sjmZ4`(GT=X+5#|nobrT`_pQXRwlpZH1 z9v!$nd}sWptoD*=Zm>UF)=LW$v^Uj}sC1Lb5NlJ6nekK_Q7G?IfzdXc;VM2i#b zebdVzhe7oF14qegsBi>{hNOR!!Z8!qU(*kugYBO9_eYq#1NQd7WBwABL=&e|e12pl zc?9t}0Q2siClM*tzb+{PgD0e2fH`+B4d2$60O#z6yUs)=2)cr~OsX~6Rb}^WUFZk~ zlqr^d6|n66;i~%Tnu2#-VHr%SQHk+_R+U%pLo=ui<(w78EW4osfIYZ0ejgzC!8HZ% zI+K}DLxHh^LWTPPz)=^9IV*};_8*cHzuCE(oTw@jx6EpCqSk?I6{w2LiaN2TH19fU zv5Z=iU4;rsPw6qO?5_hnR3oD>S$TNGC9vZ?z<}^8Qii{H;`6q}NA1A>Iwt@KFEEGL zFlc_!{MR>wpUkF92OU5%3f5>M89iiSd-Q7cZ;ziyfC;;O_FJGwi<=QWgj2*rv69s4 zzu&Vp;1mh{>pIQ%-$GB|&MoxBpFBP6#Yq+TZ40q@4|9erbk*tQvxIx~rppfT?Utt= z=EOgFGCV;*@v(25%lON=!~t!!PMY3^Zw6Z6nCAc6|HfPbmQbf5npdd|>&N6?RgXdRwaWC{tMRRsTy5ZutoD?k=g*pSJBJQ#&Fq0#rW z7_I!ghnE&6Z=pdvjL1 z78wv_qcDJ+1uJ+Uno)WZHM$@YGj!`@wX3hDY8ZOBKtm52q)&w&Aj2PB0DcAQu{?-1 zaCQ|U6I~Elz?cO@CaS6?_-8CY34}EoT@bJt#V+*M)C{nX4g#sF8Aw%d`0=iL8B7v% z1?w@X)?`;fxvQULKc*E0{|Js3&!k|!R7UA`4E4!!$G~9 zYl|8*DD8y+X)KtnGmHgNph4&OGl{+w!->(8tQ+Ix0x03JWu}2V3CgnkwIqEk)us2p Ymd>q*Q}S!;M-uXB`ENY|`8c)kPXy-NtpET3 diff --git a/tests/rag/__pycache__/test_retriever_v2_no_fallback.cpython-312-pytest-9.0.2.pyc b/tests/rag/__pycache__/test_retriever_v2_no_fallback.cpython-312-pytest-9.0.2.pyc deleted file mode 100644 index 32afabf0c3231851dacea0f9ace72d38a9a20335..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6530 zcmeGg?{5^xb@p!Ww|zeU0uw{I1PEM6&S0DTAb<+yhiHkZfCO@Bv{~Pb?ZtaPGP^du z>s^B)tD;h*svlYtDN^}T2}C3DCy;Mc{c^_{nXDo;Qa`lmCle#3;Zxt6-Mw2MCPY;u z^+V@w-@bV>@9oT+_ukCBzjSs+36#t~|EL`f5%M>zxJ7o5RSw7^p@d30$w=bu%lWfD ziR9!=K*AQE9?XR@pAk@D=sC?6B%g96oEdaD&lNJ@U5YWO+T8u_%WI@h! zl%!PbD`Xx|`K%3N1M2}UX7R={NQ zreOs+GiP}|>&y{23GqA6>Hr{%#FUVTg-SOa{6i__8!z`WAq~VPXY=Zus_E*4&TdFn z$C=r@spZ%)&I=soE*ngrjW5bHKOa;~ui6pCea8i3al7D&cVebg_0G7WqZpg|_n5IkWPpb-W&VJZGH zECh|V)nje-4i=h>)6RupCS3BT;?^_D8CEP9npxnb^O`wbm^F_(iq19-1crphgJXQE z@ob)hi>f&dX2~YCd1hGsY(A^cQl>nCtZOr(&15`p zSPA4~9LzDV2y?aKV6Tb+cB}zOqgM3&S;kAyIB)VF!Ke9F1W5$XB0wX_;#{%d*igw> zUqzExBva%pxgm}74Nyykg`)U2!1;CrPm*Yap%t_zimk$aS33&0qLx*4B@2P7yytu9 za}5U?x)A|znXGIeiJmJFq1RM|CvZgF2zn4~M$iYq@@sjM_aY`w6bd@ui7hxGkLzFz z;s{W*Q30?(z6RHMeI-FQY`p(M`u_0C_<#2KuX|&Go-YRmR|4=}36lPSl@MZ4lIUHD zA=W_#HeVh4ZRy%*edErRP9()ia{INhk4x7_>syCbx{#DuL+VCS4;kG05XIXA!{KD% zX%^HfmepSZ@H!;}mt->YdqQ%6#xZQS=oH!~gEX)Z$OJ_TII7Ko&g)=daL2INRl>AO z^ooIu4tS#I&cNRZ{E<>Lm9YAhiHVTU2q=prc*kDYi`|0;@p z4M3afA>0@ReU7<$0)v4MmS0$RuH$Px0R}Iid6j-U&TKI>aWTb+4$5%4-(}f?iX!^LZ3;A29Rgc zchiXmG-%@PA<9Ku+_vJ*XO0;C9{IS&ZKcvY*>Z1B4D@ZK)iW=__gkZ0udmNNFF&Q9 z-|a_3pZLqLcGUodXkQ6vlBfkuv_DZik}!C-l}gZ+31|nJHEHhH+jaoj?T@b`xSSr+{>|!J|E|RHR$ksWgVW@ z44%?Yc1J-woizx3Z>@)1Uia;4y(-iA|20m?#r0O^hthagHN3u!L(B#q>vL%1&!oi77mo!lv)u zCd&c18oji)oN$sONj%2PLUte}J@Oqqn3Br-cI+yahEqoL7Y>p_oBiC`GPzH(eOK)5L+yaL^T_{y3qEbcCN(po(P;HPjl zUWC2w-F}G5xS!!^t*ubvuKVw$MM)wbZInq#`qY03vLxjlI_7uwkBunD#?PI3`)8+5 zj-NZ*y7fZ3Lem)?hpb7|Fja0Em*94N!)N)@dn{QqSm2h{d1N85Xqvv0p~e#_s$PsW{r?@6*;(JZAT%cteR_J>fJdqKTgURW#`w(SOhI4U0jH^^y_ zS;$XCtG2!GMLm!3qaZoe&GGQZaRJ3e+RjGphN=~vnALPD%*EVReixlIky9YNcqtO3OUlLLv^RhiNY6Oc~8G?^7q3>6Y0K(^wC zh5tbwM5G6;US+btb1Gb0Fgco6O=z(~&V=|lP9bVV+$;s>hjHXF{Jw38d%cxWZ)L=; z*y3OIR$ld1_IY{scq_vOri}20Wf%MQ`0{_|czhbC0*~=`h#`=0Og#TZV&~GXBaK~0 zmyTa(9M3co?|iZ8rN*YAhXH?g@bXDWU3By>$F|mETd##`sn;8^1DB6}8S7e(ZK=n$ z)Z}f~dH~d7TdwugW80Qx{NHm3cC88P^0q6ZcCFDumqcfqd>6$v`!^Bj{druiox8An z?!EfC_m%*c)sIGMakUXcv>sEJ<<|cmHrj+n3tf^`V6e$|0bk1lbRd2nr?vC%ET7NT z&u5namnnXQHe!g@V{}<={qJF;O=z^xC7A+)O}-2GS{|SS@qTQuChxv#{-N@51&~^7 z@M@(N+r2E~|DHpzYYkDe@g@|^&GxINjV^)6O0!QB0kVBP^>NG)ji)-TuO_CLIX#6eY*$7GTw4IAK(y(==h2Lm-kDJ2{!tr%92UrT_$J03Hqeb2L!-3(Jray0RiyM_L$W7fB<;7 KIVQa*=J#)KMbSb4 diff --git a/tests/rag/__pycache__/test_retriever_v2_no_fallback.cpython-312.pyc b/tests/rag/__pycache__/test_retriever_v2_no_fallback.cpython-312.pyc deleted file mode 100644 index 6719c036aaa73132f8fc5bbb0ef9e28ed2f7f9e4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3405 zcma)9-ER~}67TuiUGLb&EK35xIW}=V*bvN@xlYDEd29gBYiPbOMu^1sg;YZZWPNzK$on^uZ(>zkra#~5x=^D|=S;F)s z!i-ybI5TG`o(Vjw%QF=(2E2HeXR##fTQYO8dLnE8jEl2+@XUCH@ri}1=eXsI+!rpN z=i=QX!L#R`Iv1REc#e10@%dG!o)0$-Dd?_RdlX*Fgp-`cNKR)OH@LYQcua?$!7c3L zQ!tsKG%&MPkfOM6g}LS8L}`XI#zkQHe8HDNOmM#@%K6R_VI?6(=V|YP&NA^eWMX65 ztxo@AEvrv9c5)>R#Aa$`XWnr=XU5|2!YLla9tAZ*i_rNav|OPD$Ma^K{M=}@9$0Fd#;(UtF{(x^lsgFI8o59CTyxKn zmBFLU#L+fz$YeGiBq%LAB~EFOq_k9FH4pp!lwPShUT4JgTPiL z8@$8-67+#02pst$kR`IFYu4B&W7myO-&iBiy^+4bZXdfj*UBD$h~MFIT)DxW3Y5TX zzXhb%ol7KVFr699{7h#SH(3mxIJa1WLr*!{Xn-9H2>@6u7q1)HWbhol$g36U`V~=s z&-G_3HUCVx9i15at|Kqe9Rv@_A7#r8f>bC9w>QiUVCd3f# zz8y&l$uN>Mkic-uzSx1EFCjs-dtiz|E0FZTBToZaBEJAkPprkrW$goPjgUXVQSc(?)}AN3MEuE1{Q5^S5AWrK`c*2C_K>2k=yo?kH|68!tZbDBU?KI=cE#263h?pF+@Ih1V--X_-h=Z$Ci#Sp3 z=3~~}F!H4qjs2Z0l8@|YeEp3Vc6W}psC|T2BBn$@T~sABEVwfd9BvGC>d_3wQB88uc-g~h^!WHuIx%_a z;`@KSaBlL_)OsNRb(!mN*4WpXc9>4R|Msa1=jr&#ODE4?IQ#g_!OqM>8D6UTb-35i zF9Ksp-BMv$g?&Hm&4+iTgUTIQ)$``B0MZ-&1fZrKwpb7Ixr^NIiY;-`x(dw094gO3LYz)C95VjzO02^Y04M}j4oeY|>Jx0Iuj13af zmMcYV<*I{m*DL%s~3`+rMeY1cvz!W}L*?$jTfbml=go*fcZ6(zhq$O?g-* z!%g{EtnsA%nZQ&a6Pyatyf+=ngr~wR<6(|43U`T7d^bE6zbT%U`JpV}mPM4161>Ds zMGLGL{vHX(MUNR7%PH#dTuL^yT-Hn+mkTOUl?l}#nz|sTj~Qx4WX<(Rb@)O)Eo)i3 zP9^W}Oj+Gou+7e_d=AKEMy2DJ@+hq0QM~Zuu5yY`^(uaN0`LS?P6??{(gpMiTMPgU ztA2%tC!+eN<4W|Be=1JW;2$3#x8L)eEWgyrN2msvEi)#|o85*<98xiE3GkK+nrr-HZ`=M$%PX2W3f` zV){OtS4qM2rBQA0(lVMsf-oKuLVy!bcmOG9qJ5Bw!Q+KzWj%|EDtQ(5+#nF{Gazpz z#dE{P=a6z$GLQ>Rs8(nXidFnd;Ht*}CAu|1C3rJ*!)|{we8X?m%&;@eP2Mq!N$fvD z```OQ{YRmFOc4~n#;)o;{ye=Ks3@9BUT4govtrx085`Rr9Ueb5apt`f$Hq@hnm(hD zSM|qnIiDYv^V;ydt`dDHUnmMk4xdU|+2MpYmkD3 zEX+2$LedMFv$-_P`juKP{Do|`8r)eNL^Sp)gu zM1okFkp{wyYRHOg$YwBYucqrB)2G4u(ak_c1Cz|prn%?|6%wv>U~&Fs~3h3sSB`{ za&v0R(4~c)!?KoCh_;|+lQ2n1s7b+68ODkk(AO|sWW%t8C?*kWlYvn$?36(0b1<2( z!t7FsuBqat)-^ozWF;E3{tbXdrqRhn+A4`{cld1&IyPUKsde-(cZ^m$M!!o8*1JdQ z$&vb&t@SO#^&O+PKdSbedC;@Hvg>eV;#5VF@AjO16b-Cf-|&Vuv^Nq=*QUk>Cb4IQ zi6mkTCK8P`Hd5vTcld#|nU7NDJLVp}W0tt&7XM)bDK z1KmBGJpd;aAIz`p1#p>ZS+lIOe%9JEW*AuYp603-z2gM!h-?KQddMq?zlwN(3?be$ zk5!g|66v_l*fv3i0XNq*r$)V?rR21f0+&(jea7^)(Ck2d-2fJuM+qjr@yb9==v@|e zR)w8^Z@)EB5q8#uqm|%MG6FPUy+KLJf|-NS!ve_Ul=(E`5lQ-NUQXLJUfm$3SIZhE zm)3NEXLGqU!Jf!20M{AHj7m;$C=}qXs{aGPC8iN)UKy@$>8TP_}|> z8=tavSI|#e*msPj9U)@(MA0yIz*98xL=RC~hP^ffiehh%C?ji(IJ^`*ZbJ8jY2}Xq zTKzQmWRJ>O{&<>Gyl__VDJ+z7PAPa`yB@r_e>$iHfF=OjKT?I@3BwaaPd*KP{E}}f z2#x{kT)yDhy-*j0x=KrwSZmZnPZLsZqrh#E`7V;IZxHL9L-qAy zef?m4W8c!nO4qIjU44~T_TTQUd~oJ&*A(nyuw8jW@o<9)g~HSV%$QD6O<$*jFH~mW z#Dm_{jM5{El!r|is8a610=mQl2vsv~vzKA}m}IWA<76M?L|@B@aTdrJf@+r;9;))X4~w!(%8|{At{7`CMo&rhI{*>=PXNH*c*4H$R~-!oUbnX0(!Um05N&j_ zzV>Tl4F+Df61P%ccTu$R;m4IvKCONzTRAenf&>r!tS|8uB~IMhidBiq=?^O(N!8O5 z5+ok_u@jwka+|w7`AvwTm1*q}c4mo)LZ#qw6S@n!s3ySix1Kke`|AyxxcOb;l-y*U z6GxdTF>|=8S0&uBT^hE;&N=R>g|6%|pl>Uc+%KatIHodu{ggQTdMW!#zQ3?~*uWDl zO>=mxU6mA|nr0P0wwm_bz~v7~2^h}DD>H|OqE*Qm%>tu$weU}@B7>}f9}+Y;H#460tUKXnp!w*bjq6VQo!Nlyg!F<$_2LUfyWDv4{U~=d#TyN!G3Wo zi~MF~j&7UpUzL?@X^z{$esL><_{(p5nWJ6j{j0LFq%-Q~`xm#e*l$+W)UJd5+O13x z&?%RLrQlqzqm$;l>`~(7P{~sY(es(Nlt&>R5@$)}H z_q->Tki$=Dzv`uDkFe6ABuZiXB;tSWlZfBpZNYFWrltTqZT!*(Xff?(P0^+{- zX$+s8PAH`4gLvuokz$v9`;vr!bUp`PzHZF;d;Cxr*~gy!`$e`m)i;=yO#MH@-( zPa?KM)Ccjs%c%myt{M^bA&3Y=5LZ_V^`!RtjqrtxOl>j-oUEeh~vixV#@8i-}bPgaWrTu;6jSA#&59HP#~>{H_e zrjswm6hod8Tq&s}Z#>18cwnArqzO8B^+)Ccg=#8(RMa8BbOzf_0YDv(7Go_shM6HB zqY1PVj67KJO#F;9!)NEUv_eDcW@4=wCht?S1Nj1m<|Ub!Z4!iT(`bJrmCNL1qM8w? zmXMR7!3~%nZ#UAq*(vF>xq0A@q|!_}cNRjv7=1NEk}ks~8WfZ5$i73G&XJ4^5g@!j z%vu+X5nXN0s>!#^h8cZAiv-X3B5#JA_%b0MAXgrxvb30Ho)XG@GykQN? z%8ZP(((P!?>~3weN5{`ljF#BR3LEXF%5&wz+YG9BooZe>ufdI@H9)wKa?OLx1Fuiu z(GS4q^&;~i-v1!}(qCf_y0+K4h9CL7ZT`h$jW82gx6F4}`R=7aMLbmF4=*12R_It3 z2CKqgg&X?wu8J^N<3&KPodi(f#cL<4{LnIo|NC}9%!|d)yF2z?Ow%RY+F2ev~s=<9h&I0y+CDe9scd*}u%;|Gr&d zO0&3 z3Wp4!+ClFEF9CFj#Xtcax%iT7p{?*9H&Ew=Wqxy&-+Tom0!{A2vGIMNMa0E@w4@J^ zD!*@;!~Z>`!4fN5vzpMVJG9CwN8F*YN-TJv+ed>};7I+j3?Ys=F2>BDvu6>EXPI4+ zwaX1zn+9Bm!foPt0vEJq$SpDhb{Ube%@(-E9I~#M^da!WLv#z%vRJ03b$Y)_?*Yth z&!TMI7FO-gbO%@!9ef;o)9UYcqzn?EYu9lXZFpIh{WpdRmzj6}#T@y;zneYAK4cL7 VkY_iu;fD->M+evl`zBS!{{WI!Y2yF@ diff --git a/tests/rag/__pycache__/test_retriever_v2_pack.cpython-312.pyc b/tests/rag/__pycache__/test_retriever_v2_pack.cpython-312.pyc deleted file mode 100644 index bfd2857a146f56fd7b10e1c1731020831840af15..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4643 zcmcH-OKcQJwtA-L+w-$M7#lDi8~o`Y+h7v1!ekfX7(+q^);7D~uVD# z#*md2p;fM{J-~s354#c;XqDq0ojnolWd=v`sO8nJv|P9iv870y_Py%)*v2Sir7de- zy?*to>Q%jO`5)nMkU&#Pe=+|aA>=>!QEhSs*|-GAePR$pN|QNhQkrv3x+MH|rQLJ# zq%08^86}4M9x>#{E@#%HN68NheTY5fuR(0FqoNmo%IYy_<+mzce#3<7;*^FjUZgD$oW>V>S zgK9jdXSf|<`n1L==WrpKY1p1G<|)hDo-|$!bmp9CF+WJn0tirpsj9ND2SpM${5F~; zyobAPLz?Xc#vu#7oo2WmSMVFixuaR0D#3s|gZZ-IF}#NFq053>avF^I4gZtC~T%gVh9 z%;*^-O)AA@@CE8<*=@^c33iZMIdF8-|Z* z<5xfZ@Ztq+_{_wa3l~RU#SJ=@n5LG7=g}&n*|FCsfx5Jfu&?T|gPLZ}<+32EW=F>X zP1B@4N5M!_l%b(9)V&=!!(nCg-Vw&KO!eC`r|BuCAV&xRo`a!P?yy>pMx3a$SBHc% z41n0G1m`>OY1k1D}_<0OFlWQ(^+RmsyoRV zUJ3(ZOPL@NbPPV}@RzuFMCO>sq90{k5~Y)5Mp7(BBbTOgW*5sm)9cV>FlLrj=!R zVOtO&tAUfJss@gNV=xg0{vjaS4IC4^lcpd|)aF0}_q{1ejT2Q#G7NRB8$lO>9t4mp z35z4xi$F!tg5UsvWmi4)sqQTf@c|5S+!;K;G5c-mR`?bYvFCm}*XAaVy{!7>R1 zg2Dpq2xqB!65^1gjA<%z6x1A|jL>orUV$rB%lNP*RtDml(Vy=_bQmYgQj%d*Q9WBu zdRauPg!dtrml)cHh{)S4SmztT+%!+H@CiMTwninQ?p3kHbyQTeJQ3II9$pl10 z^<+@o0JY{>CZXTbO)CM3{HB?rLNCZ$ouJyW;iKC4#mi&EBiit}%gIm1-@;eeui%!| ztqMRVVV}INfEF|saZkci>i)mbx2q1`#C{f+-tIP8^qHUIHo|t`$q}j=1JqlyYLFdA z+0ifAdkAnB_6r235xkE8w`U(CNFqRwabhv1Lw2ePa3%f+0FYK(K~M0TrZRzUPxTWi96XMzH$hM;)Tms z3ZH4k%NjDoUwUy9$P~~$m7k7(7Z7M+%G^YfBO*$dOaZ7hbZFsK8Hfm5!)-mlKCUp= zUkp{s6RBEJd`a$-8|cRl1b2N*zS=$q-DyYr$vKf7 z6X5eF=fvJ_&RyxoE}Vu3bLbUEJqotf%d)E zD|;aZ7jkH~On4|eTfp0@zVtO%VjO<_&j6q#jCHTa4*V&y-rBd?I_GP3y5b0zY%wHECyMtfHk_0g}NDg8ycf8C)biqXWX(y;{8?xNgX zp|%&J?W;;+>C7{wt0;F>s2#;<$Ewn~q(hNklzU1_bWLe1Ds2z+qLNqxPNl1$4n0$b ziteVDq#T Jl1_<3{1>IPdaM8d diff --git a/tests/rag/__pycache__/test_retriever_v2_production_first.cpython-312-pytest-9.0.2.pyc b/tests/rag/__pycache__/test_retriever_v2_production_first.cpython-312-pytest-9.0.2.pyc deleted file mode 100644 index 7bb833e829b0fd07bc6808095a6f73986695d7d0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 9768 zcmds7U2GdycAg=Jz&Y?kwl3i znL8udWXP?Wx?6WQyV(?NZ4`OXO92Z`iahk8kKSS*QWPjiOJ1=97Y(orw07;Vu9f(t2d1# zW;01;I5w-OnOIzjI&@!uT2{`a<1sCfPU+z@v8+NA`Mjc$gfbsX4r$6P6nqAyPG8F; zV~LcRr;v+>;zmmh+H6MFehSP@Mxlc+?vR^h2Q;Lr65C%Y9+_Q1o#<5gU; zpg_tNC?~Ty4^UC@$Ub=dif1Ay2d=xvd9!@eC(df=N0r1_Oz|gDh5#5) zO4S30kUNDwL`XdVQImV|)BIUpF&eUPUk|1K~$ znLOCaOeYBXwd(v#!hC${u*`e}Wt@+b(M(5SK>CiU=>s;(4eNpa!_w*D(ev-Tb#7>Q zbY#h)yAojNs_vOhKvzWxnvgV! zdWjE`2`mc?X+`o3k~Sm_`mK5)BVq;OhZu~ZIoT2&wcOrEP3UGh5z4AB0a;)w?ToLv z7~XSF-18u`>vqfM=T|~~MPFZ83>L%t?uq+0r9KF3yLDkXu)E0bCQVR&$!TjTog8c6 zaAHt`PR@Q9LYN$88WQTmv{k~Ek#|{x&N6uyc~i4iN=5@0Hv%}dgDwj$*)4lMacDR^ zG(Zk7dp{Md)$UXAj@!twmG;3Z=ad6-(|1aP`^(LZN>4h#kXmYn)UZ_{IShJRkkcc6m!fz3gVa(XGQ9Ves^xIl3eOnNP$O@Z8*fS(%7TDw>2jozde0S_4e&97(|| zlkTqN>B0Vk(#W|B=lf4f{cl_tese_Ut=yas%XgWI2f&8CYIgQYI*D%RNvPCcAEMho zL`zw6>KwYdE~r|JXi_qfQgmKP$&_1i>uxnYN8*a^iKkNJcA(OK>}`Neakj<+6kbQKQ|6)#>Y z#+8+hiFLoH^_le`(;6-B>?=o3Q{k?1&+)r+rH->y_)PJg9~391RyqVblF0ic z>AksF(#RnJ7zo{|YD9M?Qku>s6DrUv>2#9pge>wJkR^sHr*lAX3#0^RNBuRB>&%*i zbv+O5InYzyv8&v%x4dKb*R4URhlp<2uYP@c3E zU!@5-tY#fm7#+mE#o?(2+*B~Ey$-|%#LTr80F+BX5al!>7{qMQ%d5B%jsbuY0YG^G zK>74$X%ykfxl}T1L8s9H5&`wLeXoHt#I0=s-3KR)ZX|yT%>Q5`@z<7YiVE1rEatWi zM&>tdF%H=)3$U@6t^CwyZ84L$nA`M5{lf%TBhrWDMI^hC97lp%@F;l>*%L@kBH53m z8_CN^UIp@2YG?D=%gGk;$ zGKAz0kf6trH<2J-Fr4lza!Bw|F95mDfEgS9hF-A6^a6OBUVxn81<2KT0VWwT%HPjIpm4ks?a5Uf32hWrUPoWfk=Zkhwf6VprJ z*kW=#95Vo;KzSYz2$mP&@xdeDAqL9(p}aRMM1y)*8i>s(gCv%jI$zx^sq?^wY;D_W z)nBmTh*+t=;Le2Skr9UAc20*m>a^`eZ$qkzq6j4X@YY*!<1_TC(v>Vg0u>CcK@%w0 z*eo~$3f6F)gyTX}^9?T@U%lBp3B;%7QZtg4%_vm}52BB0ELYc9g2tfYqJTT4(d2e) zGSyC7TpJYFDIeAFM&c>ZN=A{OCF%i{#LbbwQP2fNo`lm4v>y&T^mrm=;D7^Caop&w z@cRefW$Vu+C_>&rG7dyVCDmb1O@{Y=Jq#iY(rTM zm15V?W-? zWd-)~md`^K23~jf+*N-ST|@ROHzunz`3vrgk$?13wm6ZX*%i#b-EWi%-;Muji;;cl zhsDe9mM+DN7@4c;3V%+8!*_RMR=9ZKQt<~;>4LP5F=HLVhHYAh(37Ye{~gTEO{R9F zy#pB-3XJWb%G5SDE5Ei871%sGjr!^Wo}sKwu;73bnzi=X4GRYRWyfe??!MWhd zyVTD#(Gr=)Q*2$3L1u!L-B@PAaR;png6z@IvuKzOT3qdIwR@gXTW$LB=wBD|jCDdJ zc1b(|)PX*GGbrQ*HEC;E;~5lS2K`v3HiNb@jmFPw_2Myd)$_d^_{2d+OoV+fm>13Q z^F8tS`K%hPw>f@Z7(b!llAEtHj~YYE+6qn$p+60^>mF+5e<`=fp(nQ4Ew)}auvu+~ zRg2YDVlUBPJil84Y&c}Ar9qim4;~{|n}e`v!{QTEU1B#JCr>W1xuef@X0nH(s_?$a zL{3JKI~Y~FH(jU-g~&-G>u6LZG7L4`TR1@w$sr_1Hv;Av9~B&ns+f3;>;h481m)RW z3+D7jRZG>8s0tkbv0fxcHYs?)Q1HU0n_yh%4#TrH3gk_|Hh5aO904cA1sKxmL!;|2 zxw^Rdn7?9gvMlrAE{@5vpE<9xQAf^&_YcR1qj2>&k&e#+FroJ{>eYlc1&NOCgSrRq zVil6nRJ@rs0mX**1Y8#@*D~bg+!cDGVI39-y~Ksja_GoP(~(kO>|2T{KG@sI=AO4r5RAPs>A=(`z0)*! zNvMR(BGG_EgT|2^p)cL*b>YffA}LFVfs8vE;nhr*4nT~+`4q3?(I!beJ)4OUMfX9r zgk`h@TvNM^p6Tt9I+dOSJt!(oCev5oDjzQubg!hw;HDdr33|95k|xq*HU_{Azj~yM z&m;ag+}uElF)ic(wyuE9^;28bz17LU%eMH8E@CT;;pnwTj@ToIjfhd-3-(AKc^}(i z({j)rIb@eTYL6UK@fZLov=$7MeeQd<8S>{)&oy||&j2znFb@LHEeG~33_b|%y?u3M z=<@QAv=V%GVdzUSyejT2i8~iP#pp}R;)#V*Uy3cOVx%NSiroIi(ZvCH6~)NnKuO%c z%HjWgGr@>eX^Go^kyv@GkQ^%6vz~<$RTOTWRoy*jJ3x=l%x8{?q*sjz@;Pkw=q3z{sn37~ct+ zL^Ysz#e*tnT8&f-e1pmi9X!)?iM@Mj_0+}Esf#Otu_8D2;o)LnY*|FMB#y0ewg3B= zX(TMy*cEOJ3K+@vfZtpO(n0pyuf5Pl6`kwX-q27h*BG$=HLQdGyMR@80pNK$$m*t$ z)l&yq`6u4~?Lf4__Fn^{PX$@|$86(I4_Uoc$STO<|5?cDgCob&0akbZ{{dia3|8f4 zyk;$U^WNzyh=c?)6a=}Y;Li(rKLz((o>LcWR?`UFyWv;{P!h|0@8DjrK%uP-jex4( zl9Md}>cbCbd7pU*2s|+y4Op72xBUg#Ko}LY zAi_LMmFDa?waNqKDqa(c4EC&lb5}#1Cgn zV(%)4|M$%VBUYs)t{3qGN-Wpd6)J2b-{X20&sOED3`jo$KNPu(fF6pkUMRkD(d1vb zSQ0O;a`=DW$bH3(F4L%ybq{ze-AFMg$dtvVRdIVs+h2CV_!CCWFOx-(!%JQj zds%U^Ec)zcPd0xcgaF_=-Wge#Wtt6^iXW>kPcVIWDr{uNWX}+eG#f NyS|NQU!<3R{|&A`tuO!p diff --git a/tests/rag/__pycache__/test_trace_builder.cpython-312-pytest-9.0.2.pyc b/tests/rag/__pycache__/test_trace_builder.cpython-312-pytest-9.0.2.pyc deleted file mode 100644 index a0eb654d7bf00fe0359e2dd812018ac5f00c6214..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7840 zcmd5>T}&L;6`t9h*`56bmY)O+c;gs{r7?g0iR}W3gNgg&kSLDRg#1i~y#p-Xzur3# zLw75y@&i%((6>;@4_2jCMz&Nx_Nj8-BK2i4xU5F08mW2l81Q)m{RUx z<9NzvMn?-oKUYX=My8NAo6czqI@QS=xjPN+B{lM}S1RRuD85_zNrs1z{>cLRaL8 zAnyq~qoyPhff33=AQdy4)K|2N`dO+KXWr0@1(q=ibis^MZCYhIWAGYkhL~|i(<)oY zO%}2sGBd1`X=uM_ zpcG(#Fho?tYt}ZbC0UgCN`Wbn_;JjX?}q&;iDbBI%m%#r7JtKTnip8JXMV@Do&hEC zhP^)ZYI0}tr~zBk%!{yo?WuRtm7Q6MeATxIPgn+5A;D5GBXUVGz)7vkGgI7YtKCbA zGm~@w4LI&4u^cGN(*jZci1ze<1AD?4k3B=*nmzr_bM9(SR}<_R@>t<}vuDXi!qXyp zCOv30INyLoU|YpVoP;4f)RB79KoVDFqtVmfNE&Z8-9Rsg>t^!}+assN^TM=nUP!f! zZ^^Km4iBt|TfX7p6>%}q)m>cZPqF0ia1z-gDMrydSA3=)I*=UMiffGN)ZhxoQVbi9 zrTnIx*0Nb<1~a*0ff~$IGWi*uW(-Era$BJpEl;vKJv^{guN8}ZS~1f%2lKGr;=*E! z-I?TbB&T&l#XhrfbWlAr_WIcPnX&QFchs|QoPPZ$i!odI6j$DAx&WHzbvmC(>%H#C zU{Rw+M$6I`SUe@0v29_(j1gwkqJ|knk?K=snCh&Mo#Qbw;xO!F8>cxMTJ{N1%1EXk#-*lbB_HFjMYhOw@a%Yb$@(z<+c`TaYQo-gYU zR`(sQwjZsw^;O$aU!;y!Q-`b1o~$0~t9CtqKN9F{c^DTudn$dWKbx$)`~G^z2M=3g z4T(*ET~mBhsEfrnlR|xBDf9qLB8<}{P%~Q8(ig$@>P#kYq@6Sc6P^@g@s?U>a zL`h=jT!UvB6q8DdStPATf*A$HM20pYX-3kHBnf0O2q4f4*#UhCq^)Mm6#zOA-I<#( zZ0!Ruohgvyj@aKYI-s6^=hc^AJExAGe)IIX*UoN*>?t7oh}rY^VuryWvkAGU2eZM6 zd;3#Ba0__8mQs@cf`O74cdkM)&B&U%47|9S2hAIvc(qRzH zW}aru>rM(Xxq#WnV$Y7ywWBWDi=BD05LRvLuPFUXA644=SL^yW6#U(_8!XACtJrKw zYc+OV>4&kdlFNX0bw9`5((=MK+y&VMQHw#`Emuh?K*m2_P4|zDniSF%5x*14OD*d&U*92!^UuZcvA?6!t_P_C}GzRSlUjS zq1gj^*TCEy^zhi{=b$H*q&#Xj0R;|Vk&IMm?rM!^Hlwm=iY;B&LVJ=7!~JJd9e?!&5Ek6cTB<- z!dxjA{a)q$4_DvT zEQ!uNK!y9y$K~)XP=?#>XZfvi;qA)1>gomc0XA+X>*d6)#!Ufkw-4TCpQaunYdr%l zpN2p8a`WL4c%V;&8eSW20C8$Qj`Np=T2?_s;v;?{5x%v+(QyHOL61U0H^Z)@M{15< z7E8h`9Neq|VNc-h=uNX6;|qw({%_wH{IrH5rjK zU`FK$V2Rp>olQ9F)b7rEL#?aTGe08!BbR~b$}h)8)H?zX@Q+-NkATb*GLSt#QS<+P zqMEfJ_jM~`vpYOVO%tA=aTi@Tr0$|u%j=r1O1v%?AkCzuR6B2At(9M%ncAGT+P(C3 z=M6tp>fp=);rA(=s;rchSqy)VT;MA*d3xISNH%@hv+7R%(#rj%ZM(mC#_VKAx1P9* z-v4jIeOLWY#D)sk(6%FK2Map343$E&osSq2M6jV!lI8^fJwMycf*mD4?6^)GQQL95 zSZ1#l3^}`Om-%X5xc>=TFjSTngj8~zq6;t9PtE1iSb$5~bv};Hrs98Z-B>IG%!9=g4qMTJ-Q zTJU=FU!SQ&_pe2VE{}Z~i7(Cl_Ebe`TW$cdbZWWb;}-w$JD>KN<{3XAV=j-%b z&sVlB0}bvfl}L{}_4Sz=Yin2y7X61bWF@LTGeC7?j^@YVpN@)CZ0CM#wyIWnzSpXL zLsaUe`bY3z4Jfs{O=i$;t!^ep2$h!@_?uCLSF=9Qiu zh`vYPLV_O1{dh|mvep`*A3+<2IFdP)h%IGLnE!8i)tp!pgp8B8J+2z_J%{S-r zpWFX`|NozVMx$W_WoGbirWQr$KcZ1DKCiMj3YBLFBP>}cBh5+~c~+K0Teg&pZ`LOv z8BHRrJVn^IA=hTjsyKlCPkpogqM8csiq4eGBjY(t?&i{lZRWB(dDkcsO7MMRQ$z#m$RVBc$nY?qT9thVLWP?8PnGDgz6xbR=q2TUj#k{ zzP%E_GqfUMX{iq(CjS!sURqHWK*N7M+9P9S!EMt^wggk$f_+%Ue$ci8775}I4rA>* z)fVg4$0Inh8Qt)DHe(z9+Q@=5jTX=}O2wxRRJhT=NJ`;q+ORCf17;?lqc-C~GrLHr zX|sdSqLIZGp#viaO-4RHWaQ1E0wa_S=8L5^Z?MOm-m^e#U5xRT@oW0W6JJbBeLOKW z{z#v^Kla6^rKl%-(-l5Q&Vb}Jq045P3^ry4@&>g{!=f=bZA#_QV>;$h%`4L_;(Q zPznHH2Z68$t%A8gH^DX5pzlE^n07ITd(LEH^Z1B9{pj;M_wMTBV-Lpe-kUrKc}svV zM7^a4U0+z2d8iQxcynDZIjU!JxL}c8p`2Zp7hU3XJp!%(qPmWI*Gp5-F;5)^|z|h7TXV^whQGew|^KZ|N7BR>+F6@xG7vk;ZT^qD-IfN=zygg zkq8DFbf^XJ6A=&S;KjFhj+kHZBAiQrW9C;xwA<7g=8x3P--v8cj|3yIHyso(Bw$#8 zAO^iA;1>ek6Y#!(6NXWa80H3yGjXAYNfN?aYqw=O*aO0U>B^b*I4$T}__Q&!*0p!n zy0^8)v5!U=;KZE*f-Q^po=RgR*YybkBhSgpWpqk4C^pJ6s=i zjggY3QXwAH^{kO0y3WJ8$3>_|bp3Y)!}3NHW>fC7OlETh9GUhDZG0f$Lx6SUF6T0l zLiR*1h``1c0G^_%oKzDp#;XW^Tgk2T_w8=A{P3&tu8nqTJ>!SNB&pa%DsaIz7J<(b1X;Kp}TdD|tTbH)j_o;nRt(`$^Ka~b(lm@f>kQtw$L;f6w ziw#eB!^@pdklo0}Si+E9>$wzICU$TOj6m4g3^!P&9kT3+w1U1Ck^V%%5ny%{GOfq` zC$cTFfLm7N`u;e+^c5(tmhENSBpxqci+h|Xkl&jZjs!}aSgA{k+<2ladn*=Es%45M zV6@aUU&y9KM(pttuj>FjSkJYz8KjQ5g7AV}G4qHkh*-KSt^*IWP{#O1$0Tnr?g~{> z@#dq##Y){?(7`v)ilnI^6$-DBM?^L^Z*t8|e!57_j4Kw&QsHJ?&E_CM!jmN6B}c9@ zLg00!x{}A;@V(Qy6hb4s1eOVdmED&_Eurd0n&ueO=S_<+dJlH`2tM`~fK~KUtYfEh z=vC*)tJt;G$v43+r={0PUUuVO*Xj6oV{5KFJ+ssLD{#M17~C)FU!ACSp=k2Q$oWd- z{PVzz)_=THj+}oL8C{)tqs6{0{ORUe^B+H|_&OY|>Cer7_~1wFTtz$g{KJ=8`NHV7 zHd^tGI$Hk=@^Wl_@$cF7Y{l&=Yoj$^mbsr2yFjy3sQ^DGQco?fut9iG43cm1mSJW^ zAF-ILUH5&$d;g#0vDe2D>j=HjI|4*JcYXdKI9l85Hl2n(VR_aGP*o&J`ZxOgU+DIK T{qIYOw+LY0mXgvfck=%L3d>4F diff --git a/tests/rag/test_code_indexing_pipeline.py b/tests/rag/test_code_indexing_pipeline.py deleted file mode 100644 index 2f1a35b..0000000 --- a/tests/rag/test_code_indexing_pipeline.py +++ /dev/null @@ -1,75 +0,0 @@ -from app.modules.rag.contracts.enums import RagLayer -from app.modules.rag.indexing.code.pipeline import CodeIndexingPipeline - - -def test_code_pipeline_builds_source_symbols_edges_and_entrypoints() -> None: - pipeline = CodeIndexingPipeline() - content = """ -from fastapi import APIRouter - -router = APIRouter() - -class UserService: - def get_user(self, user_id): - return user_id - -@router.get("/users/{user_id}") -async def get_user(user_id: str): - service = UserService() - return service.get_user(user_id) -""" - docs = pipeline.index_file( - repo_id="acme/proj", - commit_sha="abc123", - path="app/api/users.py", - content=content, - ) - - layers = {doc.layer for doc in docs} - assert RagLayer.CODE_SOURCE_CHUNKS in layers - assert RagLayer.CODE_SYMBOL_CATALOG in layers - assert RagLayer.CODE_DEPENDENCY_GRAPH in layers - assert RagLayer.CODE_ENTRYPOINTS in layers - - symbol_doc = next(doc for doc in docs if doc.layer == RagLayer.CODE_SYMBOL_CATALOG and doc.metadata["kind"] == "function") - assert "get_user" in symbol_doc.metadata["qname"] - - edge_doc = next(doc for doc in docs if doc.layer == RagLayer.CODE_DEPENDENCY_GRAPH) - assert edge_doc.metadata["edge_type"] in {"calls", "imports", "inherits"} - - entry_doc = next(doc for doc in docs if doc.layer == RagLayer.CODE_ENTRYPOINTS) - assert entry_doc.metadata["framework"] == "fastapi" - - -def test_code_pipeline_indexes_import_alias_as_symbol() -> None: - pipeline = CodeIndexingPipeline() - content = "from .v2 import ConfigManagerV2 as ConfigManager\n" - - docs = pipeline.index_file( - repo_id="acme/proj", - commit_sha="abc123", - path="src/config_manager/__init__.py", - content=content, - ) - - alias_doc = next(doc for doc in docs if doc.layer == RagLayer.CODE_SYMBOL_CATALOG and doc.metadata["qname"] == "ConfigManager") - assert alias_doc.metadata["kind"] == "const" - assert alias_doc.metadata["lang_payload"]["import_alias"] is True - - -def test_code_pipeline_marks_test_documents() -> None: - pipeline = CodeIndexingPipeline() - content = """ -def test_user_service(): - assert True -""" - - docs = pipeline.index_file( - repo_id="acme/proj", - commit_sha="abc123", - path="tests/test_users.py", - content=content, - ) - - assert docs - assert all(doc.metadata["is_test"] is True for doc in docs) diff --git a/tests/unit_tests/__init__.py b/tests/unit_tests/__init__.py new file mode 100644 index 0000000..ed8a323 --- /dev/null +++ b/tests/unit_tests/__init__.py @@ -0,0 +1 @@ +"""Unit tests for application modules: agent, chat, rag.""" diff --git a/tests/agent/engine/router/test_router_service_intent_policy.py b/tests/unit_tests/agent/engine/router/test_router_service_intent_policy.py similarity index 100% rename from tests/agent/engine/router/test_router_service_intent_policy.py rename to tests/unit_tests/agent/engine/router/test_router_service_intent_policy.py diff --git a/tests/agent/orchestrator/test_code_explain_actions.py b/tests/unit_tests/agent/orchestrator/test_code_explain_actions.py similarity index 100% rename from tests/agent/orchestrator/test_code_explain_actions.py rename to tests/unit_tests/agent/orchestrator/test_code_explain_actions.py diff --git a/tests/agent/orchestrator/test_edit_actions_case_insensitive_path.py b/tests/unit_tests/agent/orchestrator/test_edit_actions_case_insensitive_path.py similarity index 100% rename from tests/agent/orchestrator/test_edit_actions_case_insensitive_path.py rename to tests/unit_tests/agent/orchestrator/test_edit_actions_case_insensitive_path.py diff --git a/tests/agent/orchestrator/test_eval_suite.py b/tests/unit_tests/agent/orchestrator/test_eval_suite.py similarity index 100% rename from tests/agent/orchestrator/test_eval_suite.py rename to tests/unit_tests/agent/orchestrator/test_eval_suite.py diff --git a/tests/agent/orchestrator/test_explain_actions.py b/tests/unit_tests/agent/orchestrator/test_explain_actions.py similarity index 100% rename from tests/agent/orchestrator/test_explain_actions.py rename to tests/unit_tests/agent/orchestrator/test_explain_actions.py diff --git a/tests/agent/orchestrator/test_orchestrator_service.py b/tests/unit_tests/agent/orchestrator/test_orchestrator_service.py similarity index 100% rename from tests/agent/orchestrator/test_orchestrator_service.py rename to tests/unit_tests/agent/orchestrator/test_orchestrator_service.py diff --git a/tests/agent/orchestrator/test_plan_validator.py b/tests/unit_tests/agent/orchestrator/test_plan_validator.py similarity index 100% rename from tests/agent/orchestrator/test_plan_validator.py rename to tests/unit_tests/agent/orchestrator/test_plan_validator.py diff --git a/tests/agent/orchestrator/test_project_qa_actions.py b/tests/unit_tests/agent/orchestrator/test_project_qa_actions.py similarity index 100% rename from tests/agent/orchestrator/test_project_qa_actions.py rename to tests/unit_tests/agent/orchestrator/test_project_qa_actions.py diff --git a/tests/agent/orchestrator/test_project_qa_answer_graph_v2.py b/tests/unit_tests/agent/orchestrator/test_project_qa_answer_graph_v2.py similarity index 100% rename from tests/agent/orchestrator/test_project_qa_answer_graph_v2.py rename to tests/unit_tests/agent/orchestrator/test_project_qa_answer_graph_v2.py diff --git a/tests/agent/orchestrator/test_project_qa_retrieval_graph_v2_only.py b/tests/unit_tests/agent/orchestrator/test_project_qa_retrieval_graph_v2_only.py similarity index 100% rename from tests/agent/orchestrator/test_project_qa_retrieval_graph_v2_only.py rename to tests/unit_tests/agent/orchestrator/test_project_qa_retrieval_graph_v2_only.py diff --git a/tests/agent/orchestrator/test_quality_metrics.py b/tests/unit_tests/agent/orchestrator/test_quality_metrics.py similarity index 100% rename from tests/agent/orchestrator/test_quality_metrics.py rename to tests/unit_tests/agent/orchestrator/test_quality_metrics.py diff --git a/tests/agent/orchestrator/test_quality_metrics_gate_expectations.py b/tests/unit_tests/agent/orchestrator/test_quality_metrics_gate_expectations.py similarity index 100% rename from tests/agent/orchestrator/test_quality_metrics_gate_expectations.py rename to tests/unit_tests/agent/orchestrator/test_quality_metrics_gate_expectations.py diff --git a/tests/agent/orchestrator/test_template_registry.py b/tests/unit_tests/agent/orchestrator/test_template_registry.py similarity index 100% rename from tests/agent/orchestrator/test_template_registry.py rename to tests/unit_tests/agent/orchestrator/test_template_registry.py diff --git a/tests/agent/test_gigachat_client_retry.py b/tests/unit_tests/agent/test_gigachat_client_retry.py similarity index 100% rename from tests/agent/test_gigachat_client_retry.py rename to tests/unit_tests/agent/test_gigachat_client_retry.py diff --git a/tests/agent/test_llm_service_logging.py b/tests/unit_tests/agent/test_llm_service_logging.py similarity index 100% rename from tests/agent/test_llm_service_logging.py rename to tests/unit_tests/agent/test_llm_service_logging.py diff --git a/tests/agent/test_logging_setup.py b/tests/unit_tests/agent/test_logging_setup.py similarity index 100% rename from tests/agent/test_logging_setup.py rename to tests/unit_tests/agent/test_logging_setup.py diff --git a/tests/agent/test_repo_webhook_service.py b/tests/unit_tests/agent/test_repo_webhook_service.py similarity index 97% rename from tests/agent/test_repo_webhook_service.py rename to tests/unit_tests/agent/test_repo_webhook_service.py index dac713f..fe64d28 100644 --- a/tests/agent/test_repo_webhook_service.py +++ b/tests/unit_tests/agent/test_repo_webhook_service.py @@ -1,6 +1,6 @@ from __future__ import annotations -from app.modules.rag_repo.webhook_service import RepoWebhookService +from app.modules.rag.webhook_service import RepoWebhookService class FakeStoryWriter: diff --git a/tests/agent/test_story_session_recorder.py b/tests/unit_tests/agent/test_story_session_recorder.py similarity index 100% rename from tests/agent/test_story_session_recorder.py rename to tests/unit_tests/agent/test_story_session_recorder.py diff --git a/tests/chat/test_chat_api_simple_code_explain.py b/tests/unit_tests/chat/test_chat_api_simple_code_explain.py similarity index 100% rename from tests/chat/test_chat_api_simple_code_explain.py rename to tests/unit_tests/chat/test_chat_api_simple_code_explain.py diff --git a/tests/chat/test_direct_service.py b/tests/unit_tests/chat/test_direct_service.py similarity index 100% rename from tests/chat/test_direct_service.py rename to tests/unit_tests/chat/test_direct_service.py diff --git a/tests/rag/asserts_intent_router.py b/tests/unit_tests/rag/asserts_intent_router.py similarity index 100% rename from tests/rag/asserts_intent_router.py rename to tests/unit_tests/rag/asserts_intent_router.py diff --git a/tests/rag/intent_router_testkit.py b/tests/unit_tests/rag/intent_router_testkit.py similarity index 90% rename from tests/rag/intent_router_testkit.py rename to tests/unit_tests/rag/intent_router_testkit.py index 257df03..e7cdc35 100644 --- a/tests/rag/intent_router_testkit.py +++ b/tests/unit_tests/rag/intent_router_testkit.py @@ -1,5 +1,7 @@ from __future__ import annotations +import json + from app.modules.rag.contracts.enums import RagLayer from app.modules.rag.intent_router_v2 import ConversationState, IntentRouterV2, RepoContext @@ -12,6 +14,7 @@ def repo_context() -> RepoContext: RagLayer.CODE_ENTRYPOINTS, RagLayer.CODE_SYMBOL_CATALOG, RagLayer.CODE_DEPENDENCY_GRAPH, + RagLayer.CODE_SEMANTIC_ROLES, RagLayer.CODE_SOURCE_CHUNKS, RagLayer.DOCS_MODULE_CATALOG, RagLayer.DOCS_FACT_INDEX, @@ -41,5 +44,5 @@ def run_single(query: str, *, router: IntentRouterV2 | None = None, trace_label: def print_trace(index: int, query: str, result, *, label: str = "intent-router") -> None: print(f"[{label}][turn {index}] input: {query}") print() - print(f"[{label}][turn {index}] output: {result.model_dump_json(ensure_ascii=False)}") + print(f"[{label}][turn {index}] output: {json.dumps(result.model_dump(), ensure_ascii=False)}") print("=" * 50) diff --git a/tests/unit_tests/rag/test_code_indexing_pipeline.py b/tests/unit_tests/rag/test_code_indexing_pipeline.py new file mode 100644 index 0000000..0b39e29 --- /dev/null +++ b/tests/unit_tests/rag/test_code_indexing_pipeline.py @@ -0,0 +1,217 @@ +from app.modules.rag.contracts.enums import RagLayer +from app.modules.rag.indexing.code.pipeline import CodeIndexingPipeline + + +def test_code_pipeline_builds_source_symbols_edges_and_entrypoints() -> None: + pipeline = CodeIndexingPipeline() + content = """ +from fastapi import APIRouter + +router = APIRouter() + +class UserService: + def get_user(self, user_id): + return user_id + +@router.get("/users/{user_id}") +async def get_user(user_id: str): + service = UserService() + return service.get_user(user_id) +""" + docs = pipeline.index_file( + repo_id="acme/proj", + commit_sha="abc123", + path="app/api/users.py", + content=content, + ) + + layers = {doc.layer for doc in docs} + assert RagLayer.CODE_SOURCE_CHUNKS in layers + assert RagLayer.CODE_SYMBOL_CATALOG in layers + assert RagLayer.CODE_DEPENDENCY_GRAPH in layers + assert RagLayer.CODE_ENTRYPOINTS in layers + assert RagLayer.CODE_SEMANTIC_ROLES in layers + + symbol_doc = next(doc for doc in docs if doc.layer == RagLayer.CODE_SYMBOL_CATALOG and doc.metadata["kind"] == "function") + assert "get_user" in symbol_doc.metadata["qname"] + + edge_doc = next(doc for doc in docs if doc.layer == RagLayer.CODE_DEPENDENCY_GRAPH) + assert edge_doc.metadata["edge_type"] in { + "calls", + "imports", + "inherits", + "instantiates", + "reads_attr", + "writes_attr", + "dataflow_slice", + } + + entry_doc = next(doc for doc in docs if doc.layer == RagLayer.CODE_ENTRYPOINTS) + assert entry_doc.metadata["framework"] == "fastapi" + assert entry_doc.metadata["http_method"] == "GET" + assert entry_doc.metadata["route_path"] == "/users/{user_id}" + assert entry_doc.metadata["entrypoint_kind"] == "http_route" + assert entry_doc.metadata["handler_symbol"] == "get_user" + assert entry_doc.metadata["summary_text"] == "GET /users/{user_id} declared in get_user" + assert "GET /users/{user_id}" in entry_doc.text + + +def test_code_pipeline_indexes_import_alias_as_symbol() -> None: + pipeline = CodeIndexingPipeline() + content = "from .v2 import ConfigManagerV2 as ConfigManager\n" + + docs = pipeline.index_file( + repo_id="acme/proj", + commit_sha="abc123", + path="src/config_manager/__init__.py", + content=content, + ) + + alias_doc = next(doc for doc in docs if doc.layer == RagLayer.CODE_SYMBOL_CATALOG and doc.metadata["qname"] == "ConfigManager") + assert alias_doc.metadata["kind"] == "const" + + +def test_code_pipeline_marks_test_documents() -> None: + pipeline = CodeIndexingPipeline() + content = """ +def test_user_service(): + assert True +""" + + docs = pipeline.index_file( + repo_id="acme/proj", + commit_sha="abc123", + path="tests/test_users.py", + content=content, + ) + + assert docs + assert all(doc.metadata["is_test"] is True for doc in docs) + + +def test_code_pipeline_extracts_data_flow_edges() -> None: + pipeline = CodeIndexingPipeline() + content = """ +class Context: + def __init__(self): + self.data = {} + + def set(self, new_context): + self.data = new_context + +def process(): + ctx = Context() + value = ctx.data + return value +""" + docs = pipeline.index_file( + repo_id="acme/proj", + commit_sha="abc123", + path="src/context.py", + content=content, + ) + edges = [doc.metadata for doc in docs if doc.layer == RagLayer.CODE_DEPENDENCY_GRAPH] + edge_pairs = {(str(item.get("edge_type") or ""), str(item.get("dst_ref") or "")) for item in edges} + + assert ("instantiates", "Context") in edge_pairs + assert ("writes_attr", "Context.data") in edge_pairs + assert ("reads_attr", "ctx.data") in edge_pairs + + +def test_code_pipeline_builds_dataflow_slice_documents() -> None: + pipeline = CodeIndexingPipeline() + content = """ +class Context: + def set(self, value): + self.data = value + +def read_data(ctx): + return ctx.data + +def run(): + ctx = Context() + Context().set({"order_id": 1}) + return read_data(ctx) +""" + docs = pipeline.index_file( + repo_id="acme/proj", + commit_sha="abc123", + path="src/context_flow.py", + content=content, + ) + + slices = [ + doc + for doc in docs + if doc.layer == RagLayer.CODE_DEPENDENCY_GRAPH and doc.metadata.get("edge_type") == "dataflow_slice" + ] + assert slices + assert any("Context.data" in item.metadata.get("path_symbols", []) for item in slices) + assert all(item.metadata.get("path_length", 0) <= 6 for item in slices) + + +def test_code_pipeline_builds_execution_trace_documents() -> None: + pipeline = CodeIndexingPipeline() + content = """ +from fastapi import APIRouter + +router = APIRouter() + +def parse(): + return "parsed" + +def send_email(): + return parse() + +@router.post("/run") +def run_pipeline(): + return send_email() +""" + docs = pipeline.index_file( + repo_id="acme/proj", + commit_sha="abc123", + path="src/pipeline.py", + content=content, + ) + + traces = [doc for doc in docs if doc.layer == RagLayer.CODE_ENTRYPOINTS and doc.metadata.get("edge_type") == "execution_trace"] + assert traces + assert any(item.metadata.get("path_length", 0) >= 2 for item in traces) + assert any("run_pipeline" in item.metadata.get("path_symbols", []) for item in traces) + + +def test_code_pipeline_builds_semantic_role_documents() -> None: + pipeline = CodeIndexingPipeline() + content = """ +class EmailAdapter: + def send(self, payload): + import requests + return requests.post("http://localhost", json=payload) + +class ExcelParser: + def parse(self, rows): + import csv + return list(csv.reader(rows)) + +class OrderHandler: + def handle(self, ctx, adapter): + ctx.data = {"status": "ready"} + value = ctx.data + return adapter.send(value) +""" + docs = pipeline.index_file( + repo_id="acme/proj", + commit_sha="abc123", + path="src/semantic_roles.py", + content=content, + ) + + roles = { + doc.metadata.get("symbol_name"): doc.metadata.get("role") + for doc in docs + if doc.layer == RagLayer.CODE_SEMANTIC_ROLES + } + + assert roles.get("EmailAdapter") == "adapter" + assert roles.get("ExcelParser") == "parser" + assert roles.get("OrderHandler") == "handler" diff --git a/tests/rag/test_docs_indexing_pipeline.py b/tests/unit_tests/rag/test_docs_indexing_pipeline.py similarity index 100% rename from tests/rag/test_docs_indexing_pipeline.py rename to tests/unit_tests/rag/test_docs_indexing_pipeline.py diff --git a/tests/rag/test_explain_intent_builder.py b/tests/unit_tests/rag/test_explain_intent_builder.py similarity index 100% rename from tests/rag/test_explain_intent_builder.py rename to tests/unit_tests/rag/test_explain_intent_builder.py diff --git a/tests/rag/test_intent_router_e2e_flows.py b/tests/unit_tests/rag/test_intent_router_e2e_flows.py similarity index 97% rename from tests/rag/test_intent_router_e2e_flows.py rename to tests/unit_tests/rag/test_intent_router_e2e_flows.py index 8f76ad7..e0f4851 100644 --- a/tests/rag/test_intent_router_e2e_flows.py +++ b/tests/unit_tests/rag/test_intent_router_e2e_flows.py @@ -4,13 +4,13 @@ import pytest from app.modules.rag.intent_router_v2 import GigaChatIntentRouterFactory from app.modules.shared.env_loader import load_workspace_env -from tests.rag.asserts_intent_router import ( +from tests.unit_tests.rag.asserts_intent_router import ( assert_domains, assert_file_only_scope, assert_intent, assert_test_policy, ) -from tests.rag.intent_router_testkit import run_sequence +from tests.unit_tests.rag.intent_router_testkit import run_sequence pytestmark = pytest.mark.intent_router diff --git a/tests/rag/test_intent_router_invariants.py b/tests/unit_tests/rag/test_intent_router_invariants.py similarity index 97% rename from tests/rag/test_intent_router_invariants.py rename to tests/unit_tests/rag/test_intent_router_invariants.py index 361fd44..9e26110 100644 --- a/tests/rag/test_intent_router_invariants.py +++ b/tests/unit_tests/rag/test_intent_router_invariants.py @@ -1,6 +1,6 @@ import pytest -from tests.rag.asserts_intent_router import ( +from tests.unit_tests.rag.asserts_intent_router import ( assert_domain_layer_prefixes, assert_domains, assert_file_only_scope, @@ -12,7 +12,7 @@ from tests.rag.asserts_intent_router import ( assert_sub_intent, assert_test_policy, ) -from tests.rag.intent_router_testkit import run_sequence +from tests.unit_tests.rag.intent_router_testkit import run_sequence pytestmark = pytest.mark.intent_router diff --git a/tests/rag/test_layered_gateway.py b/tests/unit_tests/rag/test_layered_gateway.py similarity index 100% rename from tests/rag/test_layered_gateway.py rename to tests/unit_tests/rag/test_layered_gateway.py diff --git a/tests/unit_tests/rag/test_path_filter.py b/tests/unit_tests/rag/test_path_filter.py new file mode 100644 index 0000000..7472496 --- /dev/null +++ b/tests/unit_tests/rag/test_path_filter.py @@ -0,0 +1,44 @@ +from __future__ import annotations + +from app.modules.rag.indexing.common.path_filter import ( + count_indexable_change_upserts, + filter_changes_for_indexing, + filter_snapshot_files, + should_skip_indexing_path, +) + + +def test_should_skip_indexing_path_for_hidden_and_cache_paths() -> None: + assert should_skip_indexing_path(".env") is True + assert should_skip_indexing_path(".venv/lib/site-packages/a.py") is True + assert should_skip_indexing_path("src/.secrets/config.py") is True + assert should_skip_indexing_path("src/__pycache__/module.cpython-312.pyc") is True + assert should_skip_indexing_path("src/main.py") is False + + +def test_filter_snapshot_files_excludes_hidden_and_cache_paths() -> None: + files = [ + {"path": ".env", "content": "A"}, + {"path": "src/__pycache__/x.py", "content": "B"}, + {"path": "src/main.py", "content": "C"}, + ] + + filtered = filter_snapshot_files(files) + + assert [item["path"] for item in filtered] == ["src/main.py"] + + +def test_filter_changes_for_indexing_keeps_deletes_and_filters_upserts() -> None: + changed_files = [ + {"op": "upsert", "path": ".env", "content": "A"}, + {"op": "upsert", "path": "src/main.py", "content": "B"}, + {"op": "delete", "path": ".cache/legacy.txt"}, + ] + + filtered = filter_changes_for_indexing(changed_files) + + assert filtered == [ + {"op": "upsert", "path": "src/main.py", "content": "B"}, + {"op": "delete", "path": ".cache/legacy.txt"}, + ] + assert count_indexable_change_upserts(filtered) == 1 diff --git a/tests/rag/test_query_normalization.py b/tests/unit_tests/rag/test_query_normalization.py similarity index 96% rename from tests/rag/test_query_normalization.py rename to tests/unit_tests/rag/test_query_normalization.py index 828c948..39889b9 100644 --- a/tests/rag/test_query_normalization.py +++ b/tests/unit_tests/rag/test_query_normalization.py @@ -1,6 +1,6 @@ import pytest -from app.modules.rag.intent_router_v2.normalization import QueryNormalizer +from app.modules.rag.intent_router_v2.analysis.normalization import QueryNormalizer pytestmark = pytest.mark.intent_router diff --git a/tests/rag/test_query_terms.py b/tests/unit_tests/rag/test_query_terms.py similarity index 100% rename from tests/rag/test_query_terms.py rename to tests/unit_tests/rag/test_query_terms.py diff --git a/tests/unit_tests/rag/test_rag_service_filtering.py b/tests/unit_tests/rag/test_rag_service_filtering.py new file mode 100644 index 0000000..3897e98 --- /dev/null +++ b/tests/unit_tests/rag/test_rag_service_filtering.py @@ -0,0 +1,52 @@ +from __future__ import annotations + +import asyncio + +from app.modules.rag.services.rag_service import RagService + + +class _FakeEmbedder: + def embed(self, texts: list[str]) -> list[list[float]]: + return [[0.0, 0.1, 0.2] for _ in texts] + + +class _FakeRepository: + def __init__(self) -> None: + self.replaced_docs = [] + + def get_session(self, rag_session_id: str) -> dict: + return {"project_id": rag_session_id} + + def get_cached_documents(self, repo_id: str, blob_sha: str) -> list: + return [] + + def cache_documents(self, repo_id: str, path: str, blob_sha: str, docs: list) -> None: + return None + + def replace_documents(self, rag_session_id: str, docs: list) -> None: + self.replaced_docs = docs + + +def test_rag_service_progress_uses_only_indexable_files() -> None: + repository = _FakeRepository() + service = RagService(embedder=_FakeEmbedder(), repository=repository) + files = [ + {"path": ".env", "content": "SECRET=1", "content_hash": "h1"}, + {"path": "src/.hidden/config.py", "content": "A=1", "content_hash": "h2"}, + {"path": "src/__pycache__/cache.py", "content": "A=2", "content_hash": "h3"}, + {"path": "src/main.py", "content": "def main():\n return 1\n", "content_hash": "h4"}, + ] + progress: list[tuple[int, int, str]] = [] + + def progress_cb(current: int, total: int, path: str) -> None: + progress.append((current, total, path)) + + indexed, failed, cache_hits, cache_misses = asyncio.run( + service.index_snapshot("project-1", files, progress_cb=progress_cb) + ) + + assert indexed == 1 + assert failed == 0 + assert cache_hits == 0 + assert cache_misses == 1 + assert progress == [(1, 1, "src/main.py")] diff --git a/tests/rag/test_retrieval_statement_builder.py b/tests/unit_tests/rag/test_retrieval_statement_builder.py similarity index 66% rename from tests/rag/test_retrieval_statement_builder.py rename to tests/unit_tests/rag/test_retrieval_statement_builder.py index f9b4cd8..b0c8dce 100644 --- a/tests/rag/test_retrieval_statement_builder.py +++ b/tests/unit_tests/rag/test_retrieval_statement_builder.py @@ -16,6 +16,7 @@ def test_retrieve_builder_adds_test_exclusion_filters() -> None: ) assert "NOT (" in sql + assert "vector_dims(embedding) = vector_dims(CAST(:emb AS vector))" in sql assert "path LIKE :exclude_prefix_0" in sql assert "lower(path) LIKE :exclude_like_0" in sql assert "ESCAPE E'\\\\'" in sql @@ -24,6 +25,26 @@ def test_retrieve_builder_adds_test_exclusion_filters() -> None: assert "%\\_test.%" in params.values() +def test_retrieve_builder_adds_prefer_bonus_sorting() -> None: + builder = RetrievalStatementBuilder() + + sql, params = builder.build_retrieve( + "rag-1", + [0.1, 0.2], + query_text="find context tests", + layers=["C1_SYMBOL_CATALOG"], + prefer_path_prefixes=["tests/"], + prefer_like_patterns=["%/test\\_%.py"], + ) + + assert "AS prefer_bonus" in sql + assert "AS structural_rank" in sql + assert "WHEN layer = 'C4_SEMANTIC_ROLES' THEN 2" in sql + assert "ORDER BY prefer_bonus ASC, test_penalty ASC, layer_rank ASC" in sql + assert params["prefer_prefix_0"] == "tests/%" + assert params["prefer_like_0"] == "%/test\\_%.py" + + def test_lexical_builder_omits_test_filters_when_not_requested() -> None: builder = RetrievalStatementBuilder() diff --git a/tests/rag/test_retriever_v2_no_fallback.py b/tests/unit_tests/rag/test_retriever_v2_no_fallback.py similarity index 100% rename from tests/rag/test_retriever_v2_no_fallback.py rename to tests/unit_tests/rag/test_retriever_v2_no_fallback.py diff --git a/tests/rag/test_retriever_v2_pack.py b/tests/unit_tests/rag/test_retriever_v2_pack.py similarity index 100% rename from tests/rag/test_retriever_v2_pack.py rename to tests/unit_tests/rag/test_retriever_v2_pack.py diff --git a/tests/rag/test_retriever_v2_production_first.py b/tests/unit_tests/rag/test_retriever_v2_production_first.py similarity index 100% rename from tests/rag/test_retriever_v2_production_first.py rename to tests/unit_tests/rag/test_retriever_v2_production_first.py diff --git a/tests/rag/test_trace_builder.py b/tests/unit_tests/rag/test_trace_builder.py similarity index 96% rename from tests/rag/test_trace_builder.py rename to tests/unit_tests/rag/test_trace_builder.py index 0292121..655546e 100644 --- a/tests/rag/test_trace_builder.py +++ b/tests/unit_tests/rag/test_trace_builder.py @@ -5,7 +5,7 @@ from app.modules.rag.explain.trace_builder import TraceBuilder class _FakeGraphRepository: def get_out_edges(self, rag_session_id: str, src_symbol_ids: list[str], edge_types: list[str], limit_per_src: int): assert rag_session_id == "rag-1" - assert edge_types == ["calls", "imports", "inherits"] + assert edge_types == ["calls", "imports", "inherits", "instantiates", "reads_attr", "writes_attr"] if src_symbol_ids == ["handler-1"]: return [ LayeredRetrievalItem( diff --git a/v1_plan.md b/v1_plan.md new file mode 100644 index 0000000..de1b0bf --- /dev/null +++ b/v1_plan.md @@ -0,0 +1,376 @@ +# v1.plan.md + +## 1. Цель ближайшего этапа + +На ближайшем этапе цель — не достраивать полного агента и не интегрировать решение в UI, а довести до зрелого состояния **изолированный code-first test pipeline**: + +**user query -> IntentRouterV2 -> retrieval plan -> layered retrieval -> evidence gate -> LLM answer -> diagnostics** + +Именно этот контур должен стать будущим ядром агента, которое позже заменит legacy `RouterService`. + +--- + +## 2. Что считается результатом этапа + +Этап можно считать успешным, когда: + +- `IntentRouterV2` стабильно определяет `intent`, `sub_intent`, `keyword_hints`, `path_scope`, `layers`, `conversation_mode` и retrieval constraints; +- retrieval реально следует плану, заданному роутером; +- LLM получает контекст, собранный из retrieval, а не из побочных обходных механизмов; +- ответ не строится без достаточного evidence; +- диагностика тестов позволяет понять: + - что выбрал router; + - что извлек retrieval; + - чего не хватило; + - почему ответ хороший или плохой. + +--- + +## 3. Что сейчас не делать + +На текущем этапе не стоит: + +- встраивать это сразу в UI; +- подключать docs retrieval как обязательную часть MVP; +- строить полный cross-domain runtime; +- пытаться довести сразу весь orchestration runtime; +- инвестировать много времени в `C6`, `D5`, `D6`; +- лечить legacy `RouterService`, кроме минимально необходимого для совместимости. + +--- + +## 4. Приоритетный план работ + +## 4.1. Итерация 1 — зафиксировать канонический test-first контур + +### 4.1.1. Принять `IntentRouterV2` как единственную точку истины для тестового MVP + +Именно `IntentRouterV2` должен определять: + +- `domain` +- `intent` +- `sub_intent` +- `keyword_hints` +- `path_scope` +- `layers` +- `conversation_mode` +- retrieval constraints + +### 4.1.2. Зафиксировать минимальный набор сценариев MVP-now + +Для текущего этапа в качестве канонического набора сценариев следует оставить: + +- `OPEN_FILE` +- `EXPLAIN` +- `FIND_TESTS` +- `FIND_ENTRYPOINTS` +- `GENERAL_QA` как fallback + +### 4.1.3. Зафиксировать контракт тестового пайплайна + +Нужно явно определить структуру следующих объектов: + +- `RouterResult` +- `RetrievalRequest` +- `RetrievalResult` +- `EvidenceBundle` +- `AnswerSynthesisInput` +- `DiagnosticsReport` + +Это нужно, чтобы тесты настраивали устойчивый контракт, а не размытый процесс. + +--- + +## 4.2. Итерация 2 — связать router и retrieval + +### 4.2.1. Сделать retrieval adapter под контракт роутера + +Output `IntentRouterV2` должен напрямую превращаться в retrieval plan. + +Примеры: + +- `OPEN_FILE` + - path-priority retrieval + - `C0_SOURCE_CHUNKS` + +- `EXPLAIN` + - symbol-first retrieval + - `C1 + C0 + C2`, optionally `C3` + +- `FIND_TESTS` + - target symbol / path + - lightweight `C5-lite` + +- `FIND_ENTRYPOINTS` + - `C3_ENTRYPOINTS` + +- `GENERAL_QA` + - ограниченный broad retrieval без агрессивных допущений + +### 4.2.2. Убрать разрыв между индексатором и retrieval runtime + +Нужна надежная связка: + +**index data -> retrieval gateway -> normalized retrieval output** + +Retrieval должен стать нормальной runtime-функцией, а не только наличием индексов и отдельных explain-механизмов. + +### 4.2.3. Ввести единый формат retrieval output + +Нужен единый формат, в который складываются найденные артефакты: + +- symbols +- chunks +- relations +- entrypoints +- tests +- diagnostics per layer + +Это станет основой для `EvidenceBundle`. + +--- + +## 4.3. Итерация 3 — перенести evidence-first логику в общий test pipeline + +### 4.3.1. Сделать общий evidence gate + +Для каждого sub-intent нужно определить minimum evidence. + +#### `OPEN_FILE` +- найден path или очень сильный lexical hit; +- есть хотя бы 1–2 relevant chunks. + +#### `EXPLAIN` +- найден целевой symbol или уверенный target fragment; +- есть минимальное число code chunks; +- есть хотя бы базовые relations или surrounding context. + +#### `FIND_TESTS` +- найден target symbol/file; +- найден хотя бы один reliable candidate test. + +#### `FIND_ENTRYPOINTS` +- найден хотя бы один candidate entrypoint. + +#### `GENERAL_QA` +- найден хоть какой-то устойчивый контекст; +- иначе ответ должен честно говорить о слабом evidence. + +### 4.3.2. Запретить уверенный ответ без опоры + +Если minimum evidence не выполнен, система должна: + +- либо честно деградировать; +- либо выдать частичный ответ; +- либо явно сообщить, каких данных не хватает. + +--- + +## 4.4. Итерация 4 — унифицировать сборку контекста для LLM + +### 4.4.1. Ввести единый `EvidenceBundle` + +LLM должна получать структурированный пакет: + +- target intent / sub-intent +- target symbol / path +- relevant code chunks +- retrieved relations +- entrypoints if any +- test evidence if any +- retrieval diagnostics summary +- evidence sufficiency flags + +### 4.4.2. Разделить fast context и deep context + +#### Fast context +Короткая выжимка: +- target symbol +- file +- short relations summary +- top evidence + +#### Deep context +Полные chunks, расширенные relations и supporting fragments. + +### 4.4.3. Стандартизировать prompt contract + +Для каждого sub-intent нужен понятный режим ответа: + +- открыть; +- объяснить; +- найти тесты; +- найти точки входа; +- общий fallback. + +LLM должна понимать: + +- какой тип ответа нужен; +- насколько evidence полон; +- можно ли делать выводы; +- где надо явно отметить неопределенность. + +--- + +## 4.5. Итерация 5 — довести диагностику до рабочего инструмента настройки + +### 4.5.1. Разделить диагностику на 2 уровня + +#### Уровень 1 — Human-readable summary +Коротко: +- intent выбран правильно / нет; +- target найден / нет; +- retrieval успешен / нет; +- evidence достаточен / нет; +- ответ надежный / частичный / слабый. + +#### Уровень 2 — Detailed diagnostics +Подробно: +- router fields; +- layer-by-layer retrieval; +- empty / failed layers; +- ranking decisions; +- evidence gate results; +- context assembly details. + +### 4.5.2. Добавить явные failure reasons + +Рекомендуемый минимальный набор: + +- `router_low_confidence` +- `target_symbol_not_found` +- `path_scope_empty` +- `layer_c1_empty` +- `layer_c2_empty` +- `test_mapping_not_found` +- `insufficient_code_evidence` + +--- + +## 5. Как трактовать RAG-план на текущем этапе + +## 5.1. Что оставить как целевой план + +Целевую карту слоев оставляем без изменений: + +- `C0–C6` +- `D0–D6` + +Она остается правильной как target architecture. + +## 5.2. Что считать MVP-now + +Для текущего этапа обязательны: + +- `C0_SOURCE_CHUNKS` +- `C1_SYMBOL_CATALOG` +- `C2_SYMBOL_RELATIONS` +- `C3_ENTRYPOINTS` + +И в облегченном виде: + +- `C5_TEST_MAPPINGS_LITE` + +Пока не делать блокирующими: + +- `C4_EXECUTION_PATHS` +- `C6_CODE_FACTS` +- весь docs runtime + +## 5.3. Что считать следующим этапом + +После стабилизации code-first MVP: + +- подключение docs retrieval; +- использование D-layers в runtime; +- docs-from-code generation; +- cross-domain linking. + +--- + +## 6. Как строить тестовый контур + +## 6.1. Router tests + +Проверяют только: + +- intent +- sub_intent +- layers +- keyword_hints +- path_scope +- confidence / fallback behavior + +## 6.2. Retrieval tests + +Проверяют: + +- что retrieval реально использует router output; +- какие слои сработали; +- что извлечено; +- нет ли шума от тестов; +- не пропал ли основной код. + +## 6.3. Evidence gate tests + +Проверяют: + +- достаточен ли evidence; +- правильно ли система деградирует; +- не отвечает ли уверенно при слабой опоре. + +## 6.4. Answer quality tests + +Проверяют финальный ответ LLM: + +- есть ли опора в коде; +- нет ли лишних догадок; +- хватает ли связности; +- соответствует ли ответ типу вопроса. + +--- + +## 7. Что скорректировать в README / архитектурном плане + +В README нужно явно разделить: + +### 7.1. Target Architecture +Полная целевая система. + +### 7.2. MVP-now +Изолированный test-first контур для `CODE_QA`, который: + +- не зависит от UI; +- не зависит от full runtime orchestration; +- нацелен на доводку `IntentRouterV2` + retrieval + evidence + LLM answers. + +--- + +## 8. Самые важные изменения в реализации прямо сейчас + +Приоритет: + +### P1 +Сделать `IntentRouterV2` центром тестового MVP. + +### P2 +Связать router output с реальным layered retrieval. + +### P3 +Ввести единый `EvidenceBundle`. + +### P4 +Сделать общий evidence gate для всего test pipeline. + +### P5 +Привести диагностику к форме, удобной для настройки через тесты. + +### P6 +Добавить `C5-lite` для `FIND_TESTS`. + +--- + +## 9. Итоговая формулировка ближайшей цели + +> Довести до зрелости изолированный code-first test pipeline на базе `IntentRouterV2`, в котором роутер управляет retrieval, retrieval формирует evidence bundle, evidence gate контролирует достаточность опоры, а LLM отвечает строго на основе извлеченного контекста и прозрачной диагностики. +

7&-72YL>%l|+9(y|5HlHz!4Td`3$P1;xnMXhAXGG$XzjIan63+-5ba<)T!Q^RkS*r|2np^IpMw zi=^bs`$|e)Df#n$fstaM6wC(&?<WfGTsMS(Orufwf(yP_~Ss>gBCf}zZgVQtf8hvKq`##ou%HLAt3VQ#rbaVhvoJVyx_o=H^7%chj~ zm~!4*^}t7BX~!|Pc1qN8HmbXn$F|DWgJOkRTU4*GVpb(QpzD@VqPosQx?U=ql_K&H zU4K+Dik+EQW-Yt8x~XL|n!cG^eIXs;SAQ5bc6UFpw{~dBus_(^F`U`mDhtDmAQ)#h zgqZY1YK^}4ILn5*GbbP6B24!m!Sv*b>CO90l2=S$-ft@Tfa%W%s{u9017IQt?Z=5x zamqZj%gPVwmZLv1c(lt?v*6e~ZkD%feVba88EAhV-hy>HXbd*y2?HEbbqXND=x+-2 z3+{PjWYrLhqP{UCaUh(eH#gRJ=x%OpMayjH_tHGt<+X+7jddPhSj(*IOIlXTr8kz> zvOJtwThR2(t#o!t5eNiMmD!gYOy>XcOJ=$t6p-4cL4ei#7ZfhX?+-z%=~!AO47V|rhammXIvAD}_g z^Ch?uWQ4I!kO}q3C>>)D?i22j@&AZSq(>%jEaQC@Ja%oA20@QdcaFwhg^%arG)5Dr zKy8qSoG6h5iJ^`}6eXY}#`ut^8`QRqZJMKxD%5s3fx1Vt>=MYR9_}~k1EW%O*cEu^ zNwZ)S%iFpQOQ3e>1(U~^(f1zenL92+1(RLI_5PCkEr_jnXJh?=vE`Imm4}Vv@@#Y8 z1Bgaj9UcrTQ4=O%D|Q`;2rCh4AL8pZBtJ*;5t5IQ`~nCk#R5d(4SW|FIES1Fy@7E2 zDNZ0kG5ZfdAU{VZpMC!HbBM-^4Kj5&qyBm3n`_M(?OQThxA!-me%T<};rR>Cop0pk z`T1J5p4p#yy3!!?hm%v!ufI+=C+BJ_b#L8#8fuWalfmKC*Xic)h1$~IdV^emZ@ivq z&fKisu8-6o9wg5<$j!s)i?2tT({nX#?|MCc5I)x=b8Z%(x_w#j|5Q4xd2cJ-(1v0E z`d)=rsF|boZrQRa_d9^0hZP%YTE))3@C|xH*jxBuz>H~7i6Oz1wcw6PLfA==Os!vsT2o+uzdT|Bf78K`xReyeMQ< z|A5w9xwolpY75+-+stN{vrC*TtYtOs({j1B++clL1YH=CpTW-_0|HGbI$B$7#l~w( zZaaz$Ki1qcq2S498iAR2&m`JR49@~)hb$BK62-9WFDTi zi{kli$}nLPQCNR8wdTYXtcgu>#XStloP3!7aWU&JS0nw0 za0?du5H@xXz!s1l@YJsmLz0D`jdx1$)c8b$OtePEn`GS8P6((ePAL3KVVDkFf#`y= zBEp0RcB`gg!3CN5V9qrRUiA1V-2Z1g_y5`B%w-roe5h}(Tq>03>SI2h!|6 zq|0xlOKnA#FVxrfXW9}l?LbhD?b-E(wggN&<&l&1Q*8-`cE~GVt{2)84DCojzPS%L z4DB(GoIoCic8JI$_2IhNmVjx;Jn|WLXJFbPMOIM`hW3yw&+e=E#o2biBd7L1{x_^o H3B&&v=45ZM diff --git a/app/schemas/__pycache__/common.cpython-312.pyc b/app/schemas/__pycache__/common.cpython-312.pyc deleted file mode 100644 index c1921f8491475f886d86774408c0b593d5f3471d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 765 zcmY*Xzi-qq7`4w%E<|@NQ0~gFqAndGAvz;fNY^7hD3GG6U9wmvcFT#xIh@>(?GRYu{O5LseE3~WeuES<2EJE4BV`<_2P+n=BPt=)EkjxYT4a03GH(+rkjFUV|P zlXJiTgE2^82%+JPxRIa`LC^pLz|a|Bm}3qvaJ?$Ds=B4?Hb)m|QMHSv=lnJU4=U`7 zaia6JU7GP%DdTZe%WBm9R59Ds=^StnLI%PHgCSy#5Hl2742L$e!e(K6P37t>#xW0Q z!d3GPjoxv=ltoXu$Q6?GRJlyts*TATQ#yE^HYH#R2w{+ViOPR{ow1`v66ppm-3NxNX%C4^-c(!brW7`H+ zG$@qiQmqm~g-COn4^xp5Qs3m35mjAw4ZFPrvo5=-;S(s`_Q&Tnw7TDMx0V}apq~wM z{R^bIk#a@_qaq(h()=QM-#}$owd>WBE}fma-6wKW>&$1#wlw@f5W*jz^9wwf+ZMb# VU7NBw&}4oc!S(6mzd)y|gMVo|vpWC) diff --git a/app/schemas/__pycache__/indexing.cpython-312.pyc b/app/schemas/__pycache__/indexing.cpython-312.pyc deleted file mode 100644 index 04be6ba4ecc6b20808c3cf85f06a21524aaf40ae..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2792 zcmbtW&2JM&6yNpEuGinrhZ7PKR7m*Ph6c4DM|x`o{|T2y_Q8zAsj4cZ9xBDXaO!)rHg-%ZwdzX#&71dTcHevRdvE+A zk%&t0yx9M-^gWTJUvV;cw7zig2MA9jM{?w{RFO?tMmbatRTNVZvQj1$)l@5*sfjr$ zhby|N%Th?%kR0`q93XJ+zwN~<6yKIDb zRp5b_%$8@brV04sL?xi9{t+b|f>j1F4~kBR>y4 zlY^xup(@oJ zsy1M_;JG#G)_A-xSVh|}<_w+dmgU+NYFRvLSryNzmr;&e)`PlT4lE3rz!Csl@oS8y zEX#IXuV!OTe9K}f{H$~UD7~4rtJMpBp-3yXf1%_$^qZ1s?WiC$g{|9 zLp3x$eGQ!)q%cn()F}jsWx-+qJX&SmeOjnlC5NkbA=`e=h_E!;ClDqPM26;3nnIWc z;G|rF7m2Vls1$+BqJ%yOz{L3r0Fa8A<4+%SW{l?bmeM9hH*? z&Ft+g8}s=De1#$4=lnRpBdMFnG}i$ht_MD%`H+uq+5Z(-hCc29_bGAYKEqWf^jvvc z2O157O`MOTnmUcpusAc~Xt*A9(Ggu3b#RV4j|H(hSP(qqRfk6?sGDO+SShG##KvM5 zafw44Qaw0Gu?Jg`*f^e(Wi%k5gZ@VVkEO1T93JEK;>qU5?ia1XcVD;3$?mB$!0mH; z7k~JmL(T-5!qPTY#M+`th`!MFYZn@cRdP zPtESd_NSIRWI0FxE7p@6N3{ty3pY{VKF4%HyI7S@*p= zSi+hQeX9;NJYE39${mmAeei%GVAJxk55h4|X4)jvji(-c9t42)Ljk<4Pt4OWfI)pa zim5up)I<+T4qV?B&T$Qz5QMw4N2HXRK~^7D z2FJ@*zzudDAq2n^;$~=D8hJG-Zr3yCOOjfZ}3z*K+fud6K{XX{@ma&l>%kT&} zMEWk{r<9UgV_2W;69n{8>}H~2gmF67L@%KZ;Y0ZO>i|P0&9}*XcW%CUqjeFbV{>=` zw#i)g_(F55wcREQ-G#+p$aJgFCX3zWbIt7TrPk(t>|}?W3yun3oHHglq42MT;W=@w z)~Eu1ghyPjHXPfnl?qG+n`m`>60Ymj{&l@t@G2G0Wx{iDZ(;g_&_(+f{SGTtRDDKn%GOn8LCBw4OYWyX^ HAX4);-`PyK diff --git a/app/schemas/__pycache__/rag_sessions.cpython-312.pyc b/app/schemas/__pycache__/rag_sessions.cpython-312.pyc deleted file mode 100644 index e2c24527903525ab4cad4653e68494688343e9ec..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1624 zcmah}y>Ht_6hD$jilQjni9aP-L7UhEi^3V&sSPqTXo|Rv3)twwgx2{%A^dS{4m*!%{I=K;cF?g0eLCq4Xmj|AeFJVy22rCFT5N;w=5Y`Y>+#4uu zT|x~6fzB6XvbH&BfVCwdD!i-{^im}R;H9T+*En&PIIF+$cm zC0B!4>#yXn3iszYd}SgFIkeG%fT@Z)0OYW`d0IPL-8rW_W$@^~KKSS0Sq%QayTqt( z0pBSzv3sD|O0#BKRcV!(<|xfpTGg*{msP)pF2HFAZG);;lk0Cg4kLNU%Xa5jzPyRh zLV%Zu$hvAdXJwtF`!s}6xzv_BA&@%gMa9g$QW}y-h*@E!$@4tRz54%fWpc7(r6Dq{r1Dr&UYXGJ7;+N0Tj&c4_KHMQ71RRqFw;G21C6!8|pn( zr6}!|jKN7Rsjr4x5neF{?^{UYjeW0tXYS|kffrvYaUb9>L({b1$?l(I|BUQUEnT~H i8chi-Q^(L+r-LbhW$J3$F3PY>Z5#GH`kTO_2>1^}5p)g! diff --git a/architecture_as_is.md b/architecture_as_is.md new file mode 100644 index 0000000..6101e5f --- /dev/null +++ b/architecture_as_is.md @@ -0,0 +1,422 @@ +# Архитектура агента As Is — отчёт + +## 1. Executive Summary + +- **Текущее устройство.** Запрос пользователя принимается в модуле `chat` (POST `/api/chat/messages`), ставится в очередь задач и обрабатывается асинхронно. Обработку выполняет `GraphAgentRuntime`: вызывается **router агента** (не IntentRouterV2), по его решению выбирается сценарий и план шагов оркестратора; шаги выполняются как вызовы функций или подграфов LangGraph. Итог — ответ или changeset в задаче и в событии `task_result`. + +- **Два режима входа.** При `SIMPLE_CODE_EXPLAIN_ONLY=true` (по умолчанию) запросы идут в **CodeExplainChatService**: без роутера, сразу retrieval через CodeExplainRetrieverV2, evidence gate и один промпт. При `false` используется полный агент с роутером и оркестратором. + +- **Router.** В продакшене используется **RouterService** из `app/modules/agent/engine/router/`: классификатор интентов (эвристики + LLM), регистр графов по `domain_id`/`process_id`, контекст диалога в AgentRepository. **IntentRouterV2** (модуль `rag/intent_router_v2`) в основном приложении **не вызывается** — только в тестах и пайплайне `tests/pipeline_intent_rag`. + +- **Retrieval.** В основном флоу агента **RAG по запросу в рантайме не вызывается**: в `GraphAgentRuntime.run` переменная `rag_ctx` задаётся как пустой список и не заполняется; граф `project_qa/context_retrieval` получает этот пустой список и строит `source_bundle` только из `files_map` (вложения пользователя). Реальный retrieval по индексу выполняется только: (1) в режиме **direct code explain** (CodeExplainRetrieverV2 → LayeredRetrievalGateway → RagRepository); (2) внутри шага **build_code_explain_pack** при сценарии EXPLAIN_PART (тот же CodeExplainRetrieverV2). Контракт `RagRetriever` (async `retrieve(rag_session_id, query)`) в коде **нигде не реализован**: RagService умеет только индексировать, не извлекать. + +- **Индексация.** При создании/обновлении RAG-сессии используется RagService с двумя пайплайнами: CodeIndexingPipeline (C0–C4: chunks, symbols, edges, entrypoints, traces, semantic roles) и DocsIndexingPipeline (D1–D4: module catalog, facts, sections, policy). Слои попадают в `rag_chunks`; retrieval по слоям делается только через RagRepository (LayeredRetrievalGateway), не через RagService. + +- **Графы и пайплайны.** Есть общий оркестратор (ScenarioTemplateRegistry → PlanCompiler → ExecutionEngine). Сценарии: GENERAL_QA (в т.ч. project/qa как подплан project_qa), EXPLAIN_PART, ANALYTICS_REVIEW, DOCS_FROM_ANALYTICS, TARGETED_EDIT, GHERKIN_MODEL. Для project/qa выполняется цепочка подграфов: conversation_understanding → question_classification → context_retrieval (без вызова RAG) → опционально build_code_explain_pack → context_analysis → answer_composition. Отдельные графы зарегистрированы для default/general, project/qa, project/edits, docs/generation и для подшагов project_qa. + +- **Сборка контекста для LLM.** В основном флоу в модель попадают: `rag_context` (из task_spec; по факту пустой), `confluence_context` (страницы из вложений), `files_map` (переданные пользователем файлы). Контекст по коду из индекса собирается только в direct code explain и в build_code_explain_pack (ExplainPack → PromptBudgeter). + +- **Диагностика.** В приложении: логи (router decision, graph step result, code explain pack, orchestrator decision), события прогресса (task_progress с stage/message/meta), в `task_result` — meta (route, used_rag, orchestrator_steps, quality). Отдельная структура диагностики (router_plan, execution, retrieval, timings_ms, constraint_violations) реализована в тестовом пайплайне под IntentRouterV2 и в ответ не отдаётся. + +- **Главные пробелы.** (1) Нет вызова RAG в основном агентском флоу — context_retrieval не использует индекс. (2) IntentRouterV2 и его retrieval/diagnostics не интегрированы в продакшен. (3) RagService не реализует контракт RagRetriever. (4) Целевые слои C5 (Test Mappings), C6 (Code Facts), D5 (Reference Graph), D6 (Doc-Code Links) в индексации и retrieval не представлены. (5) Evidence gate есть только у direct code explain; в оркестраторе quality gates проверяют артефакты шагов, но не «достаточность evidence» в целевом смысле. + +- **Близость к целевой архитектуре.** Частично: индексация уже многослойная (CODE C0–C4, DOCS D1–D4), есть задел intent-based роутинга (IntentRouterV2 в тестах), оркестрация по сценариям и графам есть. Не хватает: подключения retrieval к основному флоу, объединения роутера с intent/retrieval-спеками, полного набора слоёв и явного evidence gate в оркестраторе. + +--- + +## 2. End-to-End Flow As Is + +### 2.1. Request intake + +**Что происходит.** Клиент шлёт POST `/api/chat/messages` (ChatMessageRequest: message, mode, attachments, files, dialog_session_id и т.д.). ChatModule при `SIMPLE_CODE_EXPLAIN_ONLY=true` отдаёт запрос в CodeExplainChatService.handle_message; иначе — в ChatOrchestrator.enqueue_message. В последнем случае создаётся задача (TaskStore), по idempotency может возвращаться существующая, затем в фоне запускается _process_task. + +**Evidence.** `app/modules/chat/module.py` (send_message, условие по `_simple_code_explain_only`), `app/modules/chat/service.py` (enqueue_message, _process_task, _resolve_sessions). + +**Комментарий.** Точка входа одна; разветвление по флагу окружения определяет упрощённый (direct) или полный (agent) путь. + +### 2.2. Routing + +**Что происходит.** В полном пути GraphAgentRuntime.run вызывает `self._router.resolve(message, dialog_session_id, mode)`. Это RouterService (agent): читает контекст из RouterContextStore (AgentRepository), при принудительном mode возвращает маршрут из маппинга (project_qa, project_edits, docs_generation и др.), иначе — IntentClassifier: короткие подтверждения → last_routing, детерминированные правила (редакт файла, запрос документации) → соответствующий route, в остальных случаях — LLM (prompt "router_intent") с разбором JSON. Результат — RouteResolution (domain_id, process_id, confidence, reason, fallback_used). При низкой уверенности или невалидной паре (domain_id, process_id) возвращается fallback default/general. Graph factory выбирается по (domain_id, process_id) из IntentRegistry. + +**Evidence.** `app/modules/agent/service.py` (run, _resolve_graph), `app/modules/agent/engine/router/router_service.py` (resolve, _is_acceptable, _resolution, _fallback), `app/modules/agent/engine/router/intent_classifier.py` (classify_new_intent, from_mode, _deterministic_route, _classify_with_llm), `app/modules/agent/engine/router/__init__.py` (build_router_service, регистрация графов). + +**Комментарий.** IntentRouterV2 в этом флоу не участвует. graph_id в продакшене — это пара (domain_id, process_id), а не строка из IntentRouterV2. + +### 2.3. Retrieval + +**Что происходит.** В GraphAgentRuntime.run перед вызовом оркестратора `rag_ctx` инициализируется как `[]` и не заполняется. TaskSpec получает rag_items=rag_ctx и rag_context=_format_rag(rag_ctx) — т.е. пустой контекст. В плане project_qa шаг context_retrieval (граф ProjectQaRetrievalGraphFactory) в _retrieve_context читает state (resolved_request, question_profile, files_map), объявляет `rag_items: list[dict] = []`, вызывает build_source_bundle(profile, rag_items, files_map) — т.е. только ранжирование переданных файлов, без вызова RAG. Реальный retrieval: (1) CodeExplainChatService — CodeExplainRetrieverV2.build_pack → LayeredRetrievalGateway (C3, C1, C2, C0, lexical fallback); (2) шаг build_code_explain_pack в оркестраторе — тот же build_pack с file_candidates из source_bundle. + +**Evidence.** `app/modules/agent/service.py` (rag_ctx: list[dict] = [], task_spec), `app/modules/agent/engine/graphs/project_qa_step_graphs.py` (ProjectQaRetrievalGraphFactory._retrieve_context, rag_items=[], build_source_bundle), `app/modules/rag/explain/retriever_v2.py` (build_pack, _entrypoints, _seed_symbols, _trace_builder, _excerpt_fetcher, lexical fallback), `app/modules/rag/explain/layered_gateway.py` (retrieve_layer, retrieve_lexical_code → repository). + +**Комментарий.** Намеренно не меняя код: в as is основной агентский пайплайн не выполняет retrieval по индексу; контракт RagRetriever не реализован (RagService не имеет метода retrieve). + +### 2.4. Context assembly + +**Что происходит.** Для основного агента контекст для шагов собирается в TaskSpecBuilder: metadata содержит rag_items, rag_context, confluence_context, files_map. rag_context формируется в agent как _format_rag(rag_ctx) — при пустом rag_ctx это пустая строка. Confluence — из вложений типа confluence_url. В шагах оркестратора (collect_state) в agent_state попадает этот metadata; графы получают state с rag_context, confluence_context, files_map. Для ответа LLM контекст собирается внутри графов: в project_qa — ProjectQaSupport (build_answer_brief, compose_answer) и при наличии explain_pack — PromptBudgeter.build_prompt_input + code_explain_answer_v2. В direct code explain контекст — только ExplainPack через PromptBudgeter. + +**Evidence.** `app/modules/agent/service.py` (_format_rag, _format_confluence, task_spec), `app/modules/agent/engine/orchestrator/step_registry.py` (_collect_state, agent_state), `app/modules/agent/engine/graphs/project_qa_step_graphs.py` (ProjectQaAnswerGraphFactory._compose_answer, _compose_explain_answer), `app/modules/rag/explain` (PromptBudgeter). + +**Комментарий.** Разделения «intent-driven» сборки контекста по слоям в основном флоу нет; слои используются только в CodeExplainRetrieverV2 и при формировании промпта code_explain_answer_v2. + +### 2.5. LLM answer synthesis + +**Что происходит.** Ответ генерируется внутри графов и шагов оркестратора. Для default/general — граф, собранный BaseGraphFactory(llm). Для project/qa — цепочка подграфов, финальный ответ в ProjectQaAnswerGraphFactory (_compose_answer: при наличии explain_pack — LLM code_explain_answer_v2, иначе ProjectQaSupport.compose_answer по brief). Для direct code explain — один вызов LLM code_explain_answer_v2 после evidence gate. AgentLlmService.generate вызывается с ключом промпта (router_intent, code_explain_answer_v2 и т.д.) и payload; промпты загружаются через PromptLoader. + +**Evidence.** `app/modules/agent/engine/graphs/project_qa_step_graphs.py` (ProjectQaAnswerGraphFactory), `app/modules/agent/llm` (AgentLlmService), `app/modules/chat/direct_service.py` (CodeExplainChatService), `app/modules/agent/engine/graphs` (фабрики графов). + +**Комментарий.** Итоговый ответ и/или changeset собираются ResultAssembler из артефактов шагов (final_answer, final_changeset). + +### 2.6. Diagnostics + +**Что происходит.** В рантайме: логи (router decision, graph step result, code explain pack, orchestrator decision); события task_progress (stage, message, meta); в конце — task_result с meta (route, used_rag, used_confluence, orchestrator_steps, quality при наличии). Quality метрики при наличии записываются MetricsPersister в agent_repository. Структурированная диагностика (router_plan, execution, retrieval, timings_ms, constraint_violations) строится в тестах pipeline_intent_rag (helpers/diagnostics) для результата IntentRouterV2 и в ответ API не входит. + +**Evidence.** `app/modules/agent/service.py` (LOGGER.warning по route/orchestrator, meta в AgentResult, _persist_quality_metrics), `app/modules/chat/service.py` (_publish_progress, task_result), `tests/pipeline_intent_rag/helpers/diagnostics.py` (build_router_plan, init_diagnostics, apply_retrieval_report, validate_constraints). + +**Комментарий.** used_rag в meta всегда False в текущем коде, т.к. rag_ctx не заполняется. + +--- + +## 3. Router As Is + +### 3.1. Main router entrypoints + +Единственная точка входа роутера в основном приложении — `RouterService.resolve(user_message, conversation_key, mode)` в `app/modules/agent/engine/router/router_service.py`. Сборка: `build_router_service` в `app/modules/agent/engine/router/__init__.py` (IntentRegistry, IntentClassifier, RouterContextStore, IntentSwitchDetector, RouterService). + +### 3.2. Input contract + +- **Вход:** `user_message: str`, `conversation_key: str` (dialog_session_id), `mode: str` (например "auto", "project_qa", "project_edits", "docs_generation"). +- **Контекст:** из RouterContextStore по conversation_key — RouterContext (last_routing, message_history, active_intent, dialog_started, turn_index). Контекст обновляется при persist_context после ответа агента. + +**Evidence.** `app/modules/agent/engine/router/router_service.py` (resolve, context = self._ctx.get), `app/modules/agent/engine/router/schemas.py` (RouterContext). + +### 3.3. Output contract + +RouteResolution: domain_id, process_id, confidence, reason, fallback_used, decision_type, explicit_switch. Фабрика графа запрашивается отдельно: graph_factory(domain_id, process_id). + +**Evidence.** `app/modules/agent/engine/router/schemas.py` (RouteResolution), `app/modules/agent/engine/router/router_service.py` (_resolution, _fallback, _continue_current, graph_factory). + +### 3.4. Supported intents and sub-intents + +**Намерения (domain_id / process_id):** default/general, project/qa, project/edits, docs/generation. Внутри оркестратора сценарий (Scenario) определяется TaskSpecBuilder по mode, route и тексту сообщения: GENERAL_QA, EXPLAIN_PART, ANALYTICS_REVIEW, DOCS_FROM_ANALYTICS, TARGETED_EDIT, GHERKIN_MODEL. Подграфы project_qa зарегистрированы как project_qa/conversation_understanding, question_classification, context_retrieval, context_analysis, answer_composition. Sub-intent в смысле IntentRouterV2 (EXPLAIN, OPEN_FILE и т.д.) в этом роутере не фигурируют. + +**Evidence.** `app/modules/agent/engine/router/__init__.py` (registry.register), `app/modules/agent/engine/router/intent_classifier.py` (_route_mapping, from_mode), `app/modules/agent/engine/orchestrator/task_spec_builder.py` (_detect_scenario). + +### 3.5. Graph selection logic + +Граф выбирается по (domain_id, process_id). Для основного запроса оркестратор по сценарию решает, какой план выполнять; в плане шаги могут иметь graph_id="route" (тогда берётся domain_id/process_id из task.routing) или graph_id вида "project_qa/context_retrieval". Резолвер графа: _resolve_graph в GraphAgentRuntime — factory = self._router.graph_factory(domain_id, process_id), fallback на default/general. + +**Evidence.** `app/modules/agent/service.py` (_resolve_graph), `app/modules/agent/engine/orchestrator/step_registry.py` (_execute_graph_step, graph_key), `app/modules/agent/engine/orchestrator/template_registry.py` (graph_id в шагах). + +### 3.6. Heuristics / LLM / deterministic logic + +- Детерминировано: короткие подтверждения → last_routing; целевой редакт файла (_is_targeted_file_edit_request); запрос документации (_is_broad_docs_request) → project/edits, docs/generation. +- LLM: один вызов при отсутствии детерминированного решения — prompt "router_intent", ожидается JSON с route, confidence, reason; парсинг с допуском code fence. +- Эвристики: min_confidence=0.7, проверка registry.is_valid(domain_id, process_id); при переключении интента — IntentSwitchDetector.should_switch, при отказе — _continue_current. + +**Evidence.** `app/modules/agent/engine/router/intent_classifier.py`, `app/modules/agent/engine/router/router_service.py`. + +### 3.7. Current limitations + +- Нет keyword_hints, path_scope, layers в выходном контракте роутера; они не передаются в retrieval, т.к. retrieval в основном флоу не вызывается. +- Контекст диалога ограничен last_routing и message_history; нет структуры query plan / anchors как в IntentRouterV2. +- IntentRouterV2 с полным контрактом (intent, sub_intent, graph_id, retrieval_spec, retrieval_constraints, evidence_policy) в приложении не используется. + +| Router capability | Current state | Status | Evidence | Notes | +|-------------------------|---------------|--------|---------------------------------------------------------------------------|------------------------------------------------------| +| Main entrypoint | RouterService.resolve | full | router_service.py | | +| Input: message, session, mode | Yes | full | router_service.py | | +| Output: domain_id, process_id, confidence, reason | Yes | full | RouteResolution, schemas.py | | +| intent / sub-intent | domain/process only | partial | intent_classifier _route_mapping; no sub_intent in agent router | Sub-intent только в IntentRouterV2 | +| graph_id | (domain_id, process_id) | full | registry.get_factory, _resolve_graph | | +| conversation_mode | decision_type (start/continue/switch) | partial | RouteResolution.decision_type | Не буквально CONTINUE/FOLLOWUP_LIKELY | +| keyword_hints | — | none | — | Есть в IntentRouterV2.query_plan | +| path_scope | — | none | — | Есть в IntentRouterV2.retrieval_spec.filters | +| layers | — | none | — | Есть в IntentRouterV2 | +| Heuristics + LLM | Yes | full | intent_classifier | | +| Fallback default/general| Yes | full | _fallback, _is_acceptable | | + +--- + +## 4. Retrieval / RAG As Is + +### 4.1. Code retrieval as is + +- **Где выполняется:** только при direct code explain (CodeExplainChatService) и в шаге build_code_explain_pack (сценарий EXPLAIN_PART). Оба пути используют CodeExplainRetrieverV2 → LayeredRetrievalGateway → RagRepository. +- **Chunking:** при индексации — CodeTextChunker (code), при retrieval — C0_SOURCE_CHUNKS и lexical fallback по тексту запроса. +- **Symbol-based:** C1_SYMBOL_CATALOG через retrieve_layer; после entrypoints подтягиваются handler symbols через CodeGraphRepository.get_symbols_by_ids. +- **Path-aware:** path_prefixes передаются в retrieve_layer и retrieve_lexical_code (из intent/file_candidates). +- **Entrypoints:** C3_ENTRYPOINTS, фильтрация по entry_type из intent. +- **Test-specific:** exclude_tests в gateway; при малом числе excerpts делается _merge_test_fallback с include_tests. +- **Структурные связи:** C2 (edges), TraceBuilder строит пути по графу; SourceExcerptFetcher по путям достаёт фрагменты. Execution traces индексируются (entrypoints + execution_trace_document_builder). + +В основном агентском флоу (project_qa/context_retrieval) вызова RAG нет: rag_items пустые, source_bundle строится только из files_map. + +**Evidence.** `app/modules/rag/explain/retriever_v2.py`, `app/modules/rag/explain/layered_gateway.py`, `app/modules/rag/persistence/repository.py`, `app/modules/agent/engine/graphs/project_qa_step_graphs.py` (ProjectQaRetrievalGraphFactory). + +### 4.2. Docs retrieval as is + +- **Парсинг документов:** DocsIndexingPipeline при индексации: frontmatter, MarkdownDocChunker, DocsClassifier (doc_kind), build_module_catalog, build_section, build_policy, _extract_facts. Слои: D1_MODULE_CATALOG, D2_FACT_INDEX, D3_SECTION_INDEX, D4_POLICY_INDEX (enums). +- **Retrieval по документам:** в основном приложении отдельного «docs retrieval» по запросу пользователя не вызывается. LayeredRetrievalGateway и RetrievalStatementBuilder поддерживают слои D1–D4 в запросах (layer_rank_sql), но код, который бы по intent «DOCS_QA» или «GENERATE_DOCS_FROM_CODE» вызывал только docs-слои, в основном флоу не прослеживается — IntentRouterV2 с retrieval_profile "docs" используется только в тестах. +- **Doc-to-code linking:** явного слоя или индекса D6 (Doc-Code Links) нет. В индексации есть ссылки в документах (frontmatter links), но отдельного кросс-доменного индекса нет. + +**Evidence.** `app/modules/rag/indexing/docs/pipeline.py`, `app/modules/rag/contracts/enums.py`, `app/modules/rag/persistence/retrieval_statement_builder.py` (D1–D4 в SQL). + +### 4.3. Map current implementation to target layers + +| Target element | Current implementation | Status | Evidence | Notes | +|----------------|------------------------|--------|----------|--------| +| CODE / C0 Source Chunks | CodeTextChunker + CodeTextDocumentBuilder, слой C0_SOURCE_CHUNKS; retrieval через retrieve_lexical_code и retrieve(..., layers=[C0]) | full | code_text/document_builder.py, pipeline.py, retrieval_statement_builder.py, layered_gateway | | +| CODE / C1 Symbol Catalog | SymbolExtractor + SymbolDocumentBuilder, C1_SYMBOL_CATALOG; retrieval в retriever_v2 _seed_symbols | full | indexing/code/symbols/, enums.py, retriever_v2.py | | +| CODE / C2 Symbol Relations | EdgeExtractor, EdgeDocumentBuilder, DataflowDocumentBuilder; слой C2_DEPENDENCY_GRAPH; TraceBuilder использует граф | full | indexing/code/edges/, graph_repository.py | Целевое имя «Symbol Relations»; в коде «dependency/dataflow» | +| CODE / C3 Entrypoints | EntrypointDetectorRegistry (FastAPI, Flask, Typer/Click), EntrypointDocumentBuilder, execution_trace; C3_ENTRYPOINTS | full | indexing/code/entrypoints/, retriever_v2 _entrypoints | | +| CODE / C4 Execution Paths | Execution traces индексируются в C2 (execution_trace); пути строятся в рантайме TraceBuilder по графу | partial | execution_trace_builder, trace_builder.py, retriever_v2 | Нет отдельного слоя «C4 Execution Paths»; логика есть | +| CODE / C5 Test Mappings | Нет отдельного слоя или индекса тест→код | none | — | test_filter только исключает/включает пути | +| CODE / C6 Code Facts | Нет слоя «code facts» | none | — | | +| DOCS / D0 Document Chunks | Секции документов как D3_SECTION_INDEX; общего «D0» как аналога C0 нет | partial | docs pipeline build_section | Chunks по сути есть как section docs | +| DOCS / D1 Document Catalog | D1_MODULE_CATALOG, build_module_catalog | full | enums.py, docs/document_builder.py | | +| DOCS / D2 Fact Index | D2_FACT_INDEX, _extract_facts из frontmatter links | full | docs pipeline | | +| DOCS / D3 Entity Catalog | D3_SECTION_INDEX в коде; целевое «Entity Catalog» может отличаться | partial | enums.py DOCS_SECTION_INDEX | Именование не 1:1 | +| DOCS / D4 Workflow Index | D4_POLICY_INDEX (policy-документы) | partial | docs pipeline build_policy | Ограничено type=policy | +| DOCS / D5 Reference Graph | Нет отдельного графа ссылок между документами | none | — | | +| DOCS / D6 Doc-Code Links | Нет | none | — | | + +--- + +## 5. Graphs / Pipelines As Is + +### 5.1. List of existing graphs / pipelines + +- **По (domain_id, process_id):** default/general (BaseGraphFactory), project/qa (ProjectQaGraphFactory), project/edits (ProjectEditsGraphFactory), docs/generation (DocsGraphFactory). +- **Подграфы project_qa:** project_qa/conversation_understanding (ProjectQaConversationGraphFactory), project_qa/question_classification (ProjectQaClassificationGraphFactory), project_qa/context_retrieval (ProjectQaRetrievalGraphFactory), project_qa/context_analysis (ProjectQaAnalysisGraphFactory), project_qa/answer_composition (ProjectQaAnswerGraphFactory). + +Планы (ExecutionPlan) задаются ScenarioTemplateRegistry по сценарию: general_qa_v1, project_qa_reasoning_v1, explain_part_v1, analytics_review_v1, docs_from_analytics_v1, targeted_edit_v1, gherkin_model_v1. + +**Evidence.** `app/modules/agent/engine/router/__init__.py`, `app/modules/agent/engine/orchestrator/template_registry.py`, `app/modules/agent/engine/graphs/`. + +### 5.2. Shared orchestration logic + +OrchestratorService: build template → compile plan → validate → ExecutionEngine.run(ctx) → ResultAssembler.assemble. Шаги выполняются StepRegistry: либо функция (action_id), либо executor="graph" с graph_id. Состояние передаётся через ExecutionContext (task, plan, artifacts, evidences, graph_resolver, graph_invoker). Общая логика: один сценарий на запрос, линейные/параллельные зависимости шагов. + +**Evidence.** `app/modules/agent/engine/orchestrator/service.py`, `app/modules/agent/engine/orchestrator/execution_engine.py`, `app/modules/agent/engine/orchestrator/step_registry.py`. + +### 5.3. Specialized logic + +- project_qa: последовательность подграфов + опционально build_code_explain_pack; context_retrieval не вызывает RAG; context_analysis использует explain_pack или analyzer по profile (code/docs). +- explain_part: при route project/qa тот же project_qa_reasoning_v1 с добавлением шага build_code_explain_pack; анализ и ответ с ExplainPack. +- Остальные сценарии (review, docs, edit, gherkin) — свои шаги (fetch_source_doc, normalize_document, …), без слоёвого retrieval. + +**Evidence.** template_registry.py _project_qa, _explain, _review, _docs, _edit, _gherkin; project_qa_step_graphs.py. + +### 5.4. Retrieval failure behavior + +В основном флоу retrieval не вызывается, поэтому «failure» не возникает. В CodeExplainRetrieverV2 при пустых entrypoints/symbols/traces/excerpts заполняется pack.missing, делается lexical fallback; при недостатке excerpts — test fallback. CodeExplainEvidenceGate при числе excerpts < min_excerpts возвращает passed=False и шаблонный ответ с диагностикой (без вызова LLM). + +**Evidence.** retriever_v2.py (_run_pass, _merge_test_fallback), evidence_gate.py. + +### 5.5. Fallback behavior + +Router: при низкой уверенности или невалидной паре — fallback default/general. При явном переключении интента, если новый интент не принят — _continue_current. В retrieval (CodeExplainRetrieverV2): lexical fallback, затем при необходимости test fallback. Отдельного «fallback graph» или единого fallback-пайплайна при слабом retrieval в оркестраторе нет. + +**Evidence.** router_service.py _fallback, _continue_current; retriever_v2.py. + +### 5.6. Evidence sufficiency checks + +CodeExplainEvidenceGate (direct code explain): проверка количества code_excerpts >= min_excerpts; при неуспехе — ответ без вызова LLM. В оркестраторе QualityGateRunner проверяет evidence_required по ctx.evidences; шаги вроде explain/review могут добавлять evidence через add_evidence, но в project_qa flow заполнение evidences не прослеживается в коде (collect_state не вызывает retrieval). Т.е. «evidence gate» в смысле «достаточно ли retrieval для ответа» есть только в direct code explain. + +**Evidence.** `app/modules/chat/evidence_gate.py`, `app/modules/agent/engine/orchestrator/quality_gates.py` (_evidence_required), `app/modules/agent/engine/orchestrator/actions/common.py` (add_evidence). + +| Pipeline / graph capability | Current state | Status | Evidence | Notes | +|-----------------------------|---------------|--------|----------|--------| +| List of graphs by route | Yes | full | router __init__, template_registry | | +| Shared orchestration | Yes | full | OrchestratorService, ExecutionEngine, StepRegistry | | +| project_qa subgraphs | Yes | full | project_qa_step_graphs, template_registry | | +| context_retrieval uses RAG | No | none | project_qa_step_graphs rag_items=[] | | +| Fallback default/general | Yes (router) | full | router_service | | +| Fallback on weak retrieval | Only direct explain (evidence gate) | partial | evidence_gate, retriever_v2 | | +| Evidence sufficiency in orchestrator | Gates есть, evidences в project_qa не наполняются из RAG | partial | quality_gates, step_registry | | + +--- + +## 6. LLM Context Assembly As Is + +### 6.1. Inputs to LLM + +В основном флоу: message (user_message), rag_context (пустой), confluence_context (из вложений), files_map (из запроса). В state графов дополнительно: resolved_request, question_profile, source_bundle (rag_items + file_candidates; rag_items пустые), при EXPLAIN_PART — explain_pack (entrypoints, trace_paths, code_excerpts, missing). В direct code explain — только user message и ExplainPack (после build_pack и evidence gate). + +**Evidence.** agent/service.py (task_spec, _format_rag), template_registry (metadata), project_qa_step_graphs (state), direct_service.py. + +### 6.2. Context selection logic + +Нет отдельного «context selection» по слоям в основном агенте. В CodeExplainRetrieverV2: порядок C3 → C1 → C2 (traces) → excerpts по путям; при нехватке — lexical C0, затем при необходимости тесты. Ограничение по объёму — в PromptBudgeter при сборке промпта. + +**Evidence.** retriever_v2.py, explain/prompt_budgeter (если есть). + +### 6.3. Prompt construction + +AgentLlmService.generate(key, payload). Ключи: router_intent, code_explain_answer_v2 и др. Промпты загружаются через PromptLoader. Для code_explain_answer_v2 вход формирует PromptBudgeter.build_prompt_input(message, pack). + +**Evidence.** app/modules/agent/llm, project_qa_step_graphs _compose_explain_answer, direct_service. + +### 6.4. Noise control + +Явного «noise control» в основном флоу нет. В CodeExplainRetrieverV2: ограничение числа entrypoints, seeds, trace depth, excerpts; PromptBudgeter ограничивает объём в промпте. + +### 6.5. Handling tests + +exclude_tests в LayeredRetrievalGateway и retrieval; при малом количестве excerpts — _merge_test_fallback с include_tests. В project_qa_support при build_source_bundle для file_candidates/rag_items применяется штраф за test path, если нет explicit_test в terms. + +**Evidence.** layered_gateway (exclude_tests, _filter_args), retriever_v2 _merge_test_fallback, project_qa_support build_source_bundle. + +### 6.6. Current weaknesses + +- Пустой rag_context в основном флоу; контекст по коду только из вложений (files_map) и при сценарии explain — из explain_pack. +- Нет intent-driven выбора слоёв и объёмов контекста в оркестраторе. +- Prompt-level контракты (имена полей, лимиты) разбросаны по промптам и бюджетеру, не оформлены как единый контракт. + +--- + +## 7. Diagnostics As Is + +### 7.1. Existing diagnostic artifacts + +- В приложении: объект meta в ответе задачи (route, used_rag, used_confluence, orchestrator_steps, changeset_filtered_out и т.д.); при наличии quality — сохраняются через MetricsPersister. События: task_status, task_progress (stage, message, meta), task_result, task_error. +- В тестовом пайплайне (IntentRouterV2): router_plan (intent, sub_intent, graph_id, layers, path_scope, keyword_hints, retrieval_constraints), execution (executed_layers, retrieval_mode_by_layer, top_k_by_layer, filters_by_layer, repo_scope), retrieval (requests, applied, fallback), timings_ms (router, retrieval_total, retrieval_by_layer, prompt_build, llm_call), constraint_violations, prompt (prompt_stats, evidence_summary). + +**Evidence.** agent/service.py (AgentResult.meta, _persist_quality_metrics), chat/service.py (task_result, _publish_progress), tests/pipeline_intent_rag/helpers/diagnostics.py. + +### 7.2. Where diagnostics are produced + +- Router: логи (router decision с route, reason, confidence, fallback_used) в agent/service.py. +- Графы: логи (graph step result) в project_qa_step_graphs и др. +- Оркестратор: логи (orchestrator decision), meta в результате (orchestrator_steps, scenario). +- Quality: quality_meta из orchestrator_result.meta, сохраняется в БД при наличии. +- IntentRouterV2-диагностика: только в тестах (init_diagnostics, apply_retrieval_report, validate_constraints). + +### 7.3. Human-readable value + +Поле message в task_progress; ответ при evidence gate failure (paths, entrypoints, symbols, missing); meta.route (domain_id, process_id, reason); orchestrator_steps (step_id, status). Для аналитика полезны: сценарий, маршрут, факт использования RAG (сейчас всегда false), количество шагов и их статусы. + +### 7.4. Technical-only value + +timings_ms, executed_layers, retrieval_mode_by_layer, constraint_violations, детали retrieval_spec — в текущем приложении в API не отдаются, только в тестовой диагностике. + +### 7.5. Gaps and overload + +- Пробел: в продакшене нет слоёвой диагностики retrieval (какие слои запрашивались, сколько вернулось, fallback), нет constraint_violations. Слабо видно, почему ответ мог быть слабым (нет привязки к «мало evidence»). +- Перегрузка: при желании вывести полную диагностику IntentRouterV2 в API пришлось бы дублировать структуру; сейчас она только для тестов. + +| Diagnostic field / artifact | Produced where | Useful for human | Useful for debug | Notes | +|-----------------------------|----------------|------------------|------------------|--------| +| task_progress (stage, message) | chat/service, agent run | Yes | Yes | | +| meta.route | agent/service | Yes | Yes | | +| meta.orchestrator_steps | agent/service | Yes | Yes | | +| meta.used_rag | agent/service | Yes | — | Всегда false as is | +| quality (persisted) | metrics_persister | Yes | Yes | | +| router_plan, execution, retrieval, timings_ms | tests pipeline_intent_rag | — | Yes | Не в API | +| constraint_violations | diagnostics.validate_constraints | — | Yes | Только тесты | + +--- + +## 8. Docs Support As Is + +### 8.1. Current docs ingestion / parsing + +DocsIndexingPipeline: поддержка файлов по DocsFileFilter; парсинг frontmatter (YAML), MarkdownDocChunker по body; DocsClassifier по path (doc_kind); build_module_catalog (D1), build_section (D3), build_policy для type=policy (D4), _extract_facts из frontmatter links (D2). Результат пишется в те же rag_chunks с layer D1–D4. + +**Evidence.** `app/modules/rag/indexing/docs/pipeline.py`, file_filter, chunkers, document_builder. + +### 8.2. Current docs retrieval + +Retrieval по слоям D1–D4 возможен через RagRepository.retrieve(..., layers=[...]) и используется в общем retrieval_statement_builder (layer_rank_sql). В основном агенте и в direct code explain путь «только docs» не вызывается; IntentRouterV2 в тестах может задавать retrieval_profile "docs", но в приложении этот путь не задействован. + +### 8.3. Existing cross-domain hooks + +Нет явного слоя или индекса Doc-Code Links. В документах есть frontmatter links; код и доки индексируются в одну БД (rag_chunks), общий запрос по слоям может смешивать CODE и DOCS слои, но выделенной логики «связать док с кодом» нет. + +### 8.4. Readiness for docs generation from code + +Сценарий docs_from_analytics и граф docs/generation есть: шаги fetch_source_doc, normalize_document, extract_change_intents, map_to_doc_tree, load_current_docs_context, generate_doc_updates и т.д. Это рассчитано на генерацию/обновление документации из аналитики/контекста, а не напрямую «из кода» в одну команду. База для генерации доков (текущие доки, структура) частично есть; генерация «из кода» опиралась бы на код-контекст, который в основном флоу сейчас не подтягивается через RAG. + +### 8.5. Main limitations + +- Нет отдельного docs-only retrieval path в рантайме основного приложения. +- Нет D0 как общего «document chunks» и нет D5 (Reference Graph), D6 (Doc-Code Links). +- Различие code vs docs на уровне retrieval_profile и слоёв реализовано в IntentRouterV2 и в БД, но не в цепочке chat → agent → retrieval. + +--- + +## 9. Gap Analysis vs Target Architecture + +| Target capability | Current state | Gap | Priority | Notes | +|------------------|---------------|-----|----------|--------| +| Router: intent + sub-intent + graph_id | domain_id/process_id, сценарий по эвристикам | Нет sub_intent, keyword_hints, path_scope, layers в контракте агента | high | IntentRouterV2 есть, не подключён | +| Retrieval в основном флоу | Не вызывается; context_retrieval с пустым rag_items | Подключить вызов RAG по запросу и передавать результат в source_bundle | high | RagService не реализует retrieve | +| RagRetriever contract | Не реализован | Либо адаптер над RagRepository/LayeredRetrievalGateway, либо вызов gateway из агента | high | | +| Intent-driven context assembly | Только в direct explain и build_code_explain_pack | Сборка контекста по intent/layers в оркестраторе | medium | | +| Evidence gate в оркестраторе | Только quality gates по артефактам; evidence_required без RAG | Решение: достаточность evidence после retrieval и при отказе — fallback/деградация | medium | | +| Слои C5, C6, D5, D6 | Отсутствуют | C5 Test Mappings, C6 Code Facts; D5 Reference Graph, D6 Doc-Code Links | medium | | +| Docs retrieval в рантайме | Слои есть в БД, вызова нет | Отдельный путь или единый retrieval с profile docs | medium | | +| Диагностика retrieval и constraints | Только в тестах | Вынести router_plan, execution, retrieval, timings, violations в API или лог-артефакт | low | | +| README vs реализация | README описывает rag_session как источник retrieval | В основном флоу rag_session по запросу не используется для ответа | high | Уточнить или менять реализацию | + +--- + +## 10. Concrete Evidence Index + +### 10.1. Router + +- `app/modules/agent/engine/router/router_service.py` — RouterService.resolve, persist_context, graph_factory, _fallback, _continue_current, _is_acceptable. +- `app/modules/agent/engine/router/intent_classifier.py` — classify_new_intent, from_mode, _deterministic_route, _classify_with_llm, _route_mapping. +- `app/modules/agent/engine/router/__init__.py` — build_router_service, регистрация графов в IntentRegistry. +- `app/modules/agent/engine/router/schemas.py` — RouteDecision, RouteResolution, RouterContext. +- `app/modules/agent/engine/router/intents_registry.yaml` — список допустимых пар (domain_id, process_id) для IntentRegistry.is_valid. + +### 10.2. Retrieval + +- `app/modules/agent/service.py` — rag_ctx = [], task_spec с rag_items/rag_context. +- `app/modules/agent/engine/graphs/project_qa_step_graphs.py` — ProjectQaRetrievalGraphFactory._retrieve_context (rag_items=[]), build_source_bundle. +- `app/modules/rag/explain/retriever_v2.py` — build_pack, _entrypoints, _seed_symbols, _run_pass, _merge_test_fallback. +- `app/modules/rag/explain/layered_gateway.py` — retrieve_layer, retrieve_lexical_code, RagRepository. +- `app/modules/rag/persistence/repository.py` — retrieve, retrieve_lexical_code, retrieve_exact_files. +- `app/modules/rag/services/rag_service.py` — только index_snapshot/index_changes, нет retrieve. +- `app/modules/contracts.py` — RagRetriever (async retrieve). + +### 10.3. Graph orchestration + +- `app/modules/agent/engine/orchestrator/service.py` — OrchestratorService.run, template → compile → validate → engine.run → assemble. +- `app/modules/agent/engine/orchestrator/template_registry.py` — ScenarioTemplateRegistry.build, _general, _project_qa, _explain, _review, _docs, _edit, _gherkin. +- `app/modules/agent/engine/orchestrator/step_registry.py` — StepRegistry.execute, _execute_graph_step, graph_id, _build_graph_state. +- `app/modules/agent/engine/orchestrator/execution_engine.py` — выполнение шагов, quality gates. +- `app/modules/agent/engine/graphs/project_qa_step_graphs.py` — все ProjectQa*GraphFactory. + +### 10.4. Diagnostics + +- `app/modules/agent/service.py` — LOGGER.warning (route, orchestrator), AgentResult.meta, _persist_quality_metrics. +- `app/modules/chat/service.py` — _publish_progress, task_result event. +- `tests/pipeline_intent_rag/helpers/diagnostics.py` — build_router_plan, init_diagnostics, apply_retrieval_report, validate_constraints. + +### 10.5. Docs support + +- `app/modules/rag/indexing/docs/pipeline.py` — DocsIndexingPipeline.index_file, D1–D4. +- `app/modules/rag/contracts/enums.py` — RagLayer DOCS_*. +- `app/modules/rag/intent_router_v2/router.py` — _resolve_retrieval_profile("docs" для DOCS_QA). + +--- + +## 11. Final Conclusion + +### 11.1. Насколько текущая реализация уже соответствует целевой архитектуре? + +Реализация частично соответствует: есть многослойная индексация (CODE C0–C4, DOCS D1–D4), оркестрация по сценариям и подграфам, роутер по домену/процессу с LLM и эвристиками, задел в виде IntentRouterV2 с полным контрактом (intent, retrieval_spec, evidence_policy) и тестовый пайплайн с диагностикой. При этом основной агентский флоу не вызывает RAG при ответе, контракт RagRetriever не реализован, а IntentRouterV2 и его retrieval не интегрированы в приложение. Целевые слои C5, C6, D5, D6 отсутствуют; evidence gate в смысле «достаточность retrieval» есть только в direct code explain. + +### 11.2. Что логичнее делать следующим шагом? + +Имеет смысл **сначала уточнить документацию (README и целевую модель)** под as is, чтобы зафиксировать два режима (direct code explain vs full agent), факт отсутствия вызова RAG в основном флоу и роль IntentRouterV2 как тестового/перспективного контура. Затем **параллельно** задать приоритеты: (1) подключение retrieval к основному флоу (адаптер или вызов LayeredRetrievalGateway по решению роутера) и (2) решение о том, переносить ли в продакшен контракт IntentRouterV2 (intent, retrieval_spec, layers) или расширять текущий RouterService. Делать только доработку реализации без обновления README рискованно — расхождение описания и кода сохранится. + +### 11.3. Какие 3–5 самых важных расхождений между as is и target есть сейчас? + +1. **Retrieval не вызывается в основном флоу** — context_retrieval не использует индекс; rag_context всегда пустой. Приоритет: high. +2. **RagRetriever не реализован** — RagService только индексирует; агент не может получить список документов по запросу через контракт. Приоритет: high. +3. **IntentRouterV2 не в продакшене** — intent, sub_intent, retrieval_spec, layers, evidence_policy есть только в тестах; в приложении другой роутер и нет слоёвого retrieval. Приоритет: high. +4. **README говорит про retrieval из rag_session для ответа** — по факту для ответа в основном режиме rag_session по запросу не используется. Приоритет: high (документация). +5. **Нет evidence gate в оркестраторе** после retrieval — проверка «достаточно ли evidence» и деградация при слабом retrieval только в direct code explain. Приоритет: medium. diff --git a/iteration2_calibration_harness_report.md b/iteration2_calibration_harness_report.md new file mode 100644 index 0000000..01f4cb3 --- /dev/null +++ b/iteration2_calibration_harness_report.md @@ -0,0 +1,267 @@ +# Iteration 2 — Calibration Harness Report + +## 1. Executive Summary + +This iteration adds **calibration and evaluation infrastructure** for the canonical CODE_QA pipeline. The pipeline remains test-first and is not integrated into the UI or production runtime. + +**Added:** + +- A small **deterministic fixture repository** (`tests/fixtures/code_qa_repo/`) for reproducible tests. +- **Golden case format and initial cases** for OPEN_FILE, EXPLAIN, FIND_TESTS, FIND_ENTRYPOINTS, and GENERAL_QA (positive, borderline, negative). +- An **evaluation harness** that indexes a repo (fixture or user-provided path), runs golden cases through `CodeQAPipelineRunner` with the **real retrieval adapter** (`RagDbAdapter`), and compares actual vs expected (intent, sub_intent, answer_mode, path_scope, symbol_candidates). +- **Diagnostics artifact dumping** per run (Markdown + JSON) under `tests/artifacts/code_qa_eval//`. +- A **batch evaluation summary** (Markdown table + failure list) for manual review. +- **Two modes:** fixture repo by default; optional `CODE_QA_REPO_PATH` for a local real repository. + +**Now possible:** + +- Run the canonical pipeline end-to-end on the fixture repo with real indexing and retrieval. +- Run the same harness against a user-provided repo path (no hardcoded external repo). +- Inspect per-case diagnostics and batch summary to tune routing, retrieval, evidence gate, and answer mode. + +**Still manual / out of scope:** + +- Tuning prompts and retrieval heuristics (harness supports observation, not automatic tuning). +- UI integration, docs runtime retrieval, production router replacement. +- Exact LLM answer matching (we assert routing, retrieval alignment, evidence sufficiency, answer mode only). + +--- + +## 2. Fixture Repository + +**Location:** `tests/fixtures/code_qa_repo/` + +**Structure:** + +``` +tests/fixtures/code_qa_repo/ +├── app/ +│ └── main.py # Entrypoint: create_app(), app.run() +├── api/ +│ └── orders.py # Handlers: create_order, get_order; OrderService, OrderRepository +├── services/ +│ └── order_service.py # OrderService: create_order, get_order +├── repositories/ +│ └── order_repository.py # OrderRepository: save, find_by_id +├── domain/ +│ └── order.py # Order: id, product_id, quantity, status +├── tests/ +│ └── test_order_service.py # test_create_order, test_get_order_returns_saved_order +└── utils/ + └── helpers.py # format_order_id +``` + +**Purpose of each file:** + +| File | Purpose | +|------|--------| +| `app/main.py` | Single clear entrypoint for FIND_ENTRYPOINTS and “open main” style queries. | +| `api/orders.py` | API/handler layer; distinct symbols `create_order`, `get_order`, `create_app`. | +| `services/order_service.py` | Service calling repository; symbol `OrderService`. | +| `repositories/order_repository.py` | Persistence; symbol `OrderRepository`. | +| `domain/order.py` | Domain model; symbol `Order`. | +| `tests/test_order_service.py` | Tests tied to production code for FIND_TESTS. | +| `utils/helpers.py` | Extra module for bounded GENERAL_QA and path/symbol variety. | + +**Scenarios covered:** + +- **File by path:** `app/main.py`, `api/orders.py` (OPEN_FILE). +- **Symbol explanation:** `Order`, `OrderService`, `create_order` (EXPLAIN). +- **Import/call relations:** service → repository → domain (EXPLAIN / GENERAL_QA). +- **Entrypoint:** `app/main.py` (FIND_ENTRYPOINTS). +- **Related tests:** `tests/test_order_service.py` for OrderService/Order (FIND_TESTS). +- **Fallback:** “Что делает этот проект?” (GENERAL_QA with bounded context). + +The fixture is small and structured so routing and retrieval expectations are unambiguous for calibration. + +--- + +## 3. Real Adapter Integration + +The canonical pipeline runs with the **existing** retrieval/index stack: + +- **Indexing:** `RagSessionIndexer` (in `tests/pipeline_intent_rag/helpers/repo_indexer.py`) uses `RagService` and `LocalRepoFileCollector` to index a directory. The fixture (or `CODE_QA_REPO_PATH`) is indexed once per eval run. +- **Retrieval:** `RagDbAdapter` (in `tests/pipeline_intent_rag/helpers/rag_db_adapter.py`) implements the pipeline’s `RetrievalAdapter` protocol: `retrieve_with_plan`, `retrieve_exact_files`, `hydrate_resolved_symbol_sources`, `force_symbol_context_c0`, `consume_retrieval_report`. It uses `RagRepository` and the same layer logic as the rest of the project. +- **Pipeline:** `CodeQAPipelineRunner` (in `app/modules/rag/code_qa_pipeline/pipeline.py`) takes `IntentRouterV2` and this adapter, builds `RetrievalRequest` from the router, runs retrieval, builds `EvidenceBundle`, runs the evidence gate, and produces diagnostics. + +**Fixture repo:** The harness indexes `tests/fixtures/code_qa_repo` by default and runs all golden cases against that index. No external repo is required. + +**User-provided repo:** Set `CODE_QA_REPO_PATH` to a local directory. The harness indexes that path and runs the same golden cases (or the user can add repo-specific cases). Optional `CODE_QA_PROJECT_ID` sets the project id for the session. The codebase does **not** depend on any private or external repo being present. + +--- + +## 4. Golden Case Format + +**Location:** `tests/golden/code_qa/` +**File:** `cases.yaml` + +**Fields per case:** + +| Field | Meaning | +|-------|--------| +| `id` | Unique case id. | +| `query` | User query text. | +| `expected_intent` | Expected top-level intent (e.g. CODE_QA). | +| `expected_sub_intent` | OPEN_FILE \| EXPLAIN \| FIND_TESTS \| FIND_ENTRYPOINTS \| GENERAL_QA. | +| `expected_answer_mode` | normal \| degraded \| insufficient. | +| `expected_target_hint` | Optional: path, symbol, or test-like. | +| `expected_path_scope_contains` | Optional list of substrings that must appear in path_scope. | +| `expected_symbol_candidates_contain` | Optional list of symbols that must appear in symbol_candidates. | +| `expected_layers` | Optional list of layer ids expected in the retrieval plan. | +| `notes` | Optional: borderline, negative, or calibration hint. | + +**Expected results:** We assert routing (intent, sub_intent), retrieval alignment (path_scope, symbol_candidates, layers when specified), evidence sufficiency (via answer_mode), and diagnostics shape. We do **not** assert exact LLM wording. + +**Not asserted (yet):** Exact chunk content, relation counts, or full evidence bundle structure beyond what drives answer_mode and target hints. + +--- + +## 5. Golden Runner / Evaluation Harness + +**Entrypoints:** + +- **Programmatic:** `tests.code_qa_eval.runner.run_eval(config)` — runs all golden cases and returns `list[EvalCaseResult]`. +- **CLI:** `python -m tests.code_qa_eval.run` (from project root) — loads config, runs eval, writes artifacts and summary, exits 0 only if all pass. + +**Fixture mode (default):** + +1. Do not set `CODE_QA_REPO_PATH`. +2. Run: `python -m tests.code_qa_eval.run` (or call `run_eval(EvalConfig.from_env())`). +3. Repo used: `tests/fixtures/code_qa_repo`. It is indexed once; then each golden case is run through the pipeline and compared to expected. + +**User-provided repo:** + +1. Set `CODE_QA_REPO_PATH` to the repository root (e.g. `export CODE_QA_REPO_PATH=/path/to/your/repo`). +2. Optionally set `CODE_QA_PROJECT_ID`. +3. Run the same command. The harness indexes that path and runs the same golden cases (or you can point to a different `cases.yaml` by changing `EvalConfig.golden_cases_path` in code). + +**Outputs:** + +- **Per case:** under `tests/artifacts/code_qa_eval//`: `.md` and `.json` (query, expected/actual, router, retrieval, evidence gate, timings, mismatches). +- **Batch:** `tests/artifacts/code_qa_eval/summary_.md` — table (case id, query, expected/actual scenario, target, evidence, answer mode, pass/fail) and a failure list. +- **Exit code:** 0 if all cases pass, 1 otherwise; failures are printed to stderr. + +--- + +## 6. Diagnostics Artifacts + +**Generated artifacts:** + +- **Per run (per case):** `/.md` and `.json`. +- **Batch:** `summary_.md` in `tests/artifacts/code_qa_eval/`. + +**Location:** `tests/artifacts/code_qa_eval/` (created if missing). + +**Markdown (per case) contains:** + +- Query, expected (intent, sub_intent, answer_mode), actual (intent, sub_intent, answer_mode, evidence_gate_passed, evidence_count). +- Pass/fail and list of mismatches. +- Router: path_scope, layers. +- Retrieval: requested_layers, chunk_count, layer_outcomes. +- Evidence gate: failure_reasons. +- Timings (ms). + +**JSON (per case)** adds machine-readable detail: full expected/actual, passed, mismatches, router_result, retrieval_request, per_layer_outcome, failure_reasons, timings_ms. + +**Useful for calibration:** + +- **Router:** path_scope and layers — confirm OPEN_FILE vs EXPLAIN vs FIND_* routing and plan. +- **Retrieval:** layer_outcomes and chunk_count — see which layers returned hits. +- **Evidence gate:** failure_reasons and evidence_count — see why answer_mode is degraded/insufficient. +- **Mismatches:** quick list of what to fix (routing vs retrieval vs gate). + +**Example snippet (Markdown):** + +```markdown +# open_file_main_positive + +## Query +Открой файл app/main.py + +## Expected +- intent: CODE_QA, sub_intent: OPEN_FILE +- answer_mode: normal + +## Actual +- intent: CODE_QA, sub_intent: OPEN_FILE +- answer_mode: normal +- evidence_gate_passed: True +- evidence_count: 2 + +## Result +PASS +``` + +--- + +## 7. Tests Added + +| File | What it validates | +|------|-------------------| +| `tests/code_qa_eval/test_eval_harness.py` | Golden loader, compare logic, config, fixture-mode run structure. | + +**Test groups:** + +- **Golden loader:** `test_load_golden_cases_returns_list` — loads `cases.yaml`, checks count and field presence (id, query, expected_intent, expected_sub_intent, expected_answer_mode). +- **Compare logic:** `test_compare_passed_when_all_match`, `test_compare_fails_on_intent_mismatch`, `test_compare_fails_on_answer_mode_mismatch`, `test_compare_path_scope_contains` — assert pass/fail and mismatch messages for intent, sub_intent, answer_mode, path_scope. +- **Config:** `test_eval_config_fixture_mode_by_default` — default config uses fixture path, golden path, and artifacts dir under `tests/`. +- **Fixture-mode run:** `test_run_eval_fixture_mode_structure` — runs `run_eval(config)` with fixture config; asserts result list and that each item is `EvalCaseResult` with case, pipeline_result, passed, mismatches. **Skips** if DB or dependencies (e.g. sqlalchemy) are unavailable. + +**Modes:** Loader and compare tests are unit (no DB). Config test uses paths only. Fixture-mode test is integration-style with real adapter and DB; it is skipped when the environment cannot connect or import. + +--- + +## 8. Known Limitations + +- **LLM answer:** The harness does not call the LLM; `answer_mode` is derived from the evidence gate only. No assertion on final answer text. +- **Routing stability:** Golden expectations (especially borderline/negative) may need manual adjustment as the router or retrieval changes. +- **Real DB required:** Full eval (index + retrieve) needs a configured DB; otherwise the integration test and CLI run skip or fail. No in-memory SQLite path is implemented in this iteration. +- **Single session per run:** Each run indexes the repo once and reuses one RAG session for all cases. Cross-session or re-index behaviour is not exercised. +- **Docs / cross-domain:** Golden cases and harness are CODE_QA only; docs retrieval and cross-domain flows are out of scope. +- **Performance:** No timings or regression assertions; artifacts are for manual inspection and tuning. + +--- + +## 9. How to Use for Manual Calibration + +1. **Run fixture evaluation** + From project root: `python -m tests.code_qa_eval.run`. Check exit code and console output (pass/fail counts and failure lines). + +2. **Inspect diagnostics** + Open `tests/artifacts/code_qa_eval//*.md` for failing (or borderline) cases. Use router (path_scope, layers), retrieval (layer_outcomes, chunk_count), and evidence gate (failure_reasons) to see why a case failed. + +3. **Run against a real local repo** + Set `CODE_QA_REPO_PATH=/path/to/repo`, then run the same command. Compare behaviour to the fixture run. + +4. **Compare mismatches** + Use the batch summary and per-case mismatches to decide what to tune: intent/sub_intent (router/prompts), path_scope/symbol_candidates (router or retrieval), or evidence thresholds (evidence gate). + +5. **Adjust and re-run** + Update router, retrieval, or evidence policy; add/edit golden cases if needed; re-run the harness and confirm improvements in the summary and artifacts. + +--- + +## 10. Changed Files Index + +| File | Purpose | +|------|--------| +| `tests/fixtures/code_qa_repo/app/main.py` | Fixture entrypoint. | +| `tests/fixtures/code_qa_repo/api/orders.py` | Fixture API handlers. | +| `tests/fixtures/code_qa_repo/services/order_service.py` | Fixture service layer. | +| `tests/fixtures/code_qa_repo/repositories/order_repository.py` | Fixture repository. | +| `tests/fixtures/code_qa_repo/domain/order.py` | Fixture domain model. | +| `tests/fixtures/code_qa_repo/tests/test_order_service.py` | Fixture tests. | +| `tests/fixtures/code_qa_repo/utils/helpers.py` | Fixture utility. | +| `tests/golden/code_qa/README.md` | Golden case format description. | +| `tests/golden/code_qa/cases.yaml` | Golden cases for all MVP scenarios. | +| `tests/code_qa_eval/__init__.py` | Package init. | +| `tests/code_qa_eval/config.py` | EvalConfig: repo path (fixture vs CODE_QA_REPO_PATH), artifacts dir, golden path. | +| `tests/code_qa_eval/golden_loader.py` | Load and parse golden cases from YAML. | +| `tests/code_qa_eval/runner.py` | run_eval: index repo, run pipeline, compare to golden; _compare logic. | +| `tests/code_qa_eval/artifacts.py` | dump_run_artifact (md+json), write_batch_summary. | +| `tests/code_qa_eval/run.py` | CLI entrypoint: load config, run eval, write artifacts and summary. | +| `tests/code_qa_eval/test_eval_harness.py` | Tests for loader, compare, config, fixture-mode run. | +| `pytest.ini` | Added marker `code_qa_eval`. | +| `iteration2_calibration_harness_report.md` | This report. | + +No changes were made to production router, UI, or docs retrieval. The canonical pipeline and existing retrieval/index stack are reused; the harness is test-side only. diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..f4b411e --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,24 @@ +[build-system] +requires = ["setuptools>=61"] +build-backend = "setuptools.build_meta" + +[project] +name = "agent" +version = "0.1.0" +description = "Agent for Code-Aware Technical Documentation and Analysis" +readme = "README.md" +requires-python = ">=3.11" +dependencies = [ + "fastapi>=0.116", + "uvicorn>=0.35", + "pydantic>=2.11", + "langgraph>=0.6", + "langgraph-checkpoint-postgres>=2.0", + "PyYAML>=6.0", + "requests>=2.32", + "SQLAlchemy>=2.0", + "psycopg[binary]>=3.2", +] + +[tool.setuptools.packages.find] +where = ["src"] diff --git a/pytest.ini b/pytest.ini index 904d42b..28f4b18 100644 --- a/pytest.ini +++ b/pytest.ini @@ -1,3 +1,6 @@ [pytest] markers = intent_router: intent router v2 suite (routing, normalization, anchors, retrieval spec invariants) + router_rag: intent-router -> rag integration pipeline tests + full_chain: intent-router -> rag -> llm integration pipeline tests + code_qa_eval: CODE_QA golden evaluation harness (fixture + real-adapter; needs DB for full run) diff --git a/rag_structure_report.md b/rag_structure_report.md new file mode 100644 index 0000000..babe982 --- /dev/null +++ b/rag_structure_report.md @@ -0,0 +1,323 @@ +# 0) TL;DR (10–15 строк) + +- В `intent_router_v2` графы задаются как строковые `graph_id`: `CodeQAGraph` и `DocsQAGraph` (`app/modules/rag/intent_router_v2/intent/graph_id_resolver.py:4`, класс `GraphIdResolver.resolve`). +- Точка входа роутера: `IntentRouterV2.route(...)` (`app/modules/rag/intent_router_v2/router.py:35`, класс `IntentRouterV2`). +- Отдельные классы/функции с именами `CodeQAGraph` и `DocsQAGraph` в `app/` не найдены (поиск по коду). +- В тестовом CLI-пайплайне выполнение идет через `IntentRouterRagPipelineRunner.run_case(...)` (`tests/pipeline_intent_rag/helpers/pipeline_runner.py:45`) и `PipelineRuntime.run_*` (`tests/pipeline_intent_rag/helpers/runtime.py:31`). +- Контракт роутера возвращается моделью `IntentRouterResult` (`app/modules/rag/intent_router_v2/models.py:139`) и включает `intent`, `retrieval_profile`, `query_plan`, `retrieval_spec`, `retrieval_constraints`, `symbol_resolution`, `evidence_policy`. +- `sub_intent`, `symbol_kind_hint`, `symbol_candidates`, `path_hints`, `doc_scope_hints` находятся внутри `query_plan` (`app/modules/rag/intent_router_v2/models.py:43`). +- Топ-слои retrieval задаются фабрикой `RetrievalSpecFactory` (`app/modules/rag/intent_router_v2/retrieval/retrieval_spec_factory.py:9`). +- Реально индексируемые/используемые слои: `C0..C3`, `D1..D4` (`app/modules/rag/indexing/code/pipeline.py:37`, `app/modules/rag/indexing/docs/pipeline.py:24`, `app/modules/rag/intent_router_v2/retrieval/retrieval_spec_factory.py:10`). +- В enum есть `C4..C6`, но build/retrieval-код для них в `app/modules/rag` (кроме `README` и `enums.py`) не найден (`app/modules/rag/contracts/enums.py:13`). +- Слой `F0` в `app/` и `tests/` не найден (поиск по коду). +- Ранжирование retrieval: `lexical_rank -> test_penalty -> layer_rank -> distance` (`app/modules/rag/persistence/retrieval_statement_builder.py:59`). +- В `pipeline_intent_rag` evidence gate отсутствует; в `chat` есть `CodeExplainEvidenceGate(min_excerpts=2)` (`app/modules/chat/evidence_gate.py:15`). + +## 1) High-level pipeline (диаграмма текстом) + +### CodeQAGraph + +`Router -> Plan -> Retrieval per layer -> Merge/Rank -> Evidence gate -> LLM prompt builder` + +- Router: `IntentRouterV2.route` (`app/modules/rag/intent_router_v2/router.py:35`, класс `IntentRouterV2`). + Определяет `intent`, `graph_id`, `query_plan`, `retrieval_spec`, `retrieval_constraints`, `symbol_resolution`. +- Plan: `QueryPlanBuilder.build` (`app/modules/rag/intent_router_v2/analysis/query_plan_builder.py:50`, класс `QueryPlanBuilder`). + Извлекает anchors, `sub_intent`, symbol/path/doc hints. +- Retrieval per layer: `RetrievalSpecFactory.build` (`app/modules/rag/intent_router_v2/retrieval/retrieval_spec_factory.py:74`) + `RagDbAdapter.retrieve` (`tests/pipeline_intent_rag/helpers/rag_db_adapter.py:41`). + Для `CODE_QA` выбираются `C*` слои; выполняется запрос в БД с фильтрами. +- Merge/Rank: `RetrievalStatementBuilder.build_retrieve` (`app/modules/rag/persistence/retrieval_statement_builder.py:9`). + Все выбранные слои читаются одним SQL и сортируются по `lexical_rank`, `test_penalty`, `layer_rank`, `distance`. +- Evidence gate: в цепочке `tests/pipeline_intent_rag` не найден. + Для отдельного code-explain чата есть `CodeExplainEvidenceGate.evaluate` (`app/modules/chat/evidence_gate.py:19`). +- LLM prompt builder: в режиме `full_chain` — `GigaChatAnswerer.answer`/`_format_context` (`tests/pipeline_intent_rag/helpers/llm_answerer.py:15`, `:27`). + Формируется prompt из вопроса и первых RAG-строк. + +### DocsQAGraph + +`Router -> Plan -> Retrieval per layer -> Merge/Rank -> Evidence gate -> LLM prompt builder` + +- Router: `IntentRouterV2.route` (`app/modules/rag/intent_router_v2/router.py:35`). + Для `DOCS_QA` ставит `retrieval_profile="docs"` (`app/modules/rag/intent_router_v2/router.py:112`). +- Plan: `QueryPlanBuilder.build` (`app/modules/rag/intent_router_v2/analysis/query_plan_builder.py:50`). + Для `DOCS_QA` принудительно `sub_intent="EXPLAIN"` (`app/modules/rag/intent_router_v2/analysis/query_plan_builder.py:78`). +- Retrieval per layer: `RetrievalSpecFactory.build` (`app/modules/rag/intent_router_v2/retrieval/retrieval_spec_factory.py:74`) + `RagDbAdapter.retrieve` (`tests/pipeline_intent_rag/helpers/rag_db_adapter.py:41`). + Для docs выбираются `D*` слои; при `path_scope` используется docs-scoped набор (`app/modules/rag/intent_router_v2/retrieval/retrieval_spec_factory.py:97`). +- Merge/Rank: `RetrievalStatementBuilder.build_retrieve` (`app/modules/rag/persistence/retrieval_statement_builder.py:9`). + Механизм ранжирования тот же, что и для code. +- Evidence gate: для docs в `pipeline_intent_rag` не найден. +- LLM prompt builder: в `full_chain` тот же `GigaChatAnswerer` (`tests/pipeline_intent_rag/helpers/llm_answerer.py:15`). + +## 2) Router contract (фактическое API) + +### Пример JSON (code) + +```json +{ + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "retrieval_profile": "code", + "symbol_kind_hint": "class", + "symbol_candidates": ["Context"], + "path_hints": [], + "path_scope": [], + "doc_scope_hints": [], + "layers": ["C1_SYMBOL_CATALOG", "C0_SOURCE_CHUNKS", "C2_DEPENDENCY_GRAPH"], + "retrieval_constraints": { + "include_globs": ["src/**"], + "exclude_globs": ["tests/**", "**/test_*.py", "**/*_test.py"], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": {"enabled": true, "max_distance": 2, "top_k": 5} + }, + "symbol_resolution": { + "status": "pending", + "resolved_symbol": null, + "alternatives": ["Context"], + "confidence": 0.0 + } +} +``` + +### Пример JSON (docs) + +```json +{ + "intent": "DOCS_QA", + "sub_intent": "EXPLAIN", + "retrieval_profile": "docs", + "symbol_kind_hint": "unknown", + "symbol_candidates": [], + "path_hints": ["README_DEPLOY.md"], + "path_scope": ["README_DEPLOY.md"], + "doc_scope_hints": ["README_DEPLOY.md", "README*", "docs/**", "**/*.md"], + "layers": ["D3_SECTION_INDEX", "D2_FACT_INDEX"], + "retrieval_constraints": { + "include_globs": ["README_DEPLOY.md", "docs/**", "README*", "**/*.md"], + "exclude_globs": [".venv/**", "node_modules/**", "**/*.bin", "**/*.png", "**/*.jpg"], + "prefer_globs": [], + "test_file_globs": [], + "test_symbol_patterns": [], + "max_candidates": 20, + "fuzzy_symbol_search": {"enabled": true, "max_distance": 2, "top_k": 5} + }, + "symbol_resolution": { + "status": "not_requested", + "resolved_symbol": null, + "alternatives": [], + "confidence": 0.0 + } +} +``` + +### Поля контракта + +- `intent`, `retrieval_profile`: формируются в `IntentRouterV2.route` (`app/modules/rag/intent_router_v2/router.py:35`). +- `sub_intent`, `symbol_kind_hint`, `symbol_candidates`, `path_hints`, `doc_scope_hints`: внутри `QueryPlan` (`app/modules/rag/intent_router_v2/models.py:43`), заполняются в `QueryPlanBuilder.build` (`app/modules/rag/intent_router_v2/analysis/query_plan_builder.py:50`). +- `path_scope`: находится в `retrieval_spec.filters.path_scope`; строится `RetrievalFilterBuilder._path_scope` (`app/modules/rag/intent_router_v2/retrieval/retrieval_filter_builder.py:63`). +- `layers`: отдельного top-level поля в `IntentRouterResult` нет; фактический источник — `retrieval_spec.layer_queries[].layer_id` (`app/modules/rag/intent_router_v2/models.py:121`, `:125`). +- `retrieval_constraints`: модель `RetrievalConstraints` (`app/modules/rag/intent_router_v2/models.py:67`), заполняется в `RetrievalConstraintsFactory.build` (`app/modules/rag/intent_router_v2/retrieval/retrieval_constraints_factory.py:22`). +- `symbol_resolution`: модель `SymbolResolution` (`app/modules/rag/intent_router_v2/models.py:79`), первичный статус задает `_initial_symbol_resolution` (`app/modules/rag/intent_router_v2/router.py:93`). + +### `symbol_resolution` статусы и переходы + +- Допустимые статусы: `not_requested`, `pending`, `resolved`, `ambiguous`, `not_found` (`app/modules/rag/intent_router_v2/models.py:15`). +- Начальное состояние: `IntentRouterV2._initial_symbol_resolution` (`app/modules/rag/intent_router_v2/router.py:93`). +- Изменение статуса в тестовом router+rag пайплайне: `_resolve_symbol` (`tests/pipeline_intent_rag/helpers/pipeline_runner.py:69`), где `pending` переходит в `resolved`/`ambiguous`/`not_found`. + +### Где определены типы/схемы и где валидация + +- Типы/схемы: `QueryPlan`, `RetrievalConstraints`, `SymbolResolution`, `RetrievalSpec`, `IntentRouterResult` в `app/modules/rag/intent_router_v2/models.py:43`, `:67`, `:79`, `:121`, `:139`. +- Валидация: pydantic-модели с `ConfigDict(extra="forbid")` (например `app/modules/rag/intent_router_v2/models.py:44`, `:68`, `:80`, `:122`, `:140`), плюс валидаторы confidence (`app/modules/rag/intent_router_v2/models.py:37`, `:208`). + +## 3) Layer inventory (что реально индексируется и как) + +### 3.1 Code layers + +#### C0_SOURCE_CHUNKS + +- Назначение: фрагменты исходного кода для цитирования и lexical fallback. +- Единица индексации: chunk. +- Источник данных: AST-разбор (`ast.parse`) с fallback на оконную нарезку (`app/modules/rag/indexing/code/code_text/chunker.py:17`). +- Схема записи: + - Базовые поля документа: `layer`, `repo_id`, `commit_sha`, `path`, `title`, `text`, `span_start/end`, `metadata`, `embedding` (`app/modules/rag/contracts/documents.py:62`). + - C0 metadata: `chunk_index`, `chunk_type`, `module_or_unit`, `is_test`, `artifact_type` (`app/modules/rag/indexing/code/code_text/document_builder.py:17`). + - Колонки БД: `rag_chunks` + `layer/lang/repo_id/commit_sha/title/metadata_json/span_*...` (`app/modules/rag/persistence/schema_repository.py:47`, `:112`). +- Где строится индекс: `CodeIndexingPipeline.index_file` (`app/modules/rag/indexing/code/pipeline.py:37`) + `CodeTextDocumentBuilder.build` (`app/modules/rag/indexing/code/code_text/document_builder.py:9`). +- Где retrieval: `RagDbAdapter.retrieve` (`tests/pipeline_intent_rag/helpers/rag_db_adapter.py:41`) -> `RagRepository.retrieve|retrieve_lexical_code` (`app/modules/rag/persistence/repository.py:62`, `:87`). +- Как ранжируется: `build_retrieve` и `build_lexical_code` (`app/modules/rag/persistence/retrieval_statement_builder.py:9`, `:64`). + +#### C1_SYMBOL_CATALOG + +- Назначение: каталог символов (class/function/method/import aliases). +- Единица индексации: symbol. +- Источник данных: Python AST visitor (`app/modules/rag/indexing/code/symbols/extractor.py:32`). +- Схема записи: + - C1 metadata: `symbol_id`, `qname`, `kind`, `signature`, `decorators_or_annotations`, `docstring_or_javadoc`, `parent_symbol_id`, `package_or_module`, `is_entry_candidate`, `is_test`, `lang_payload`, `artifact_type` (`app/modules/rag/indexing/code/symbols/document_builder.py:20`). +- Где строится индекс: `SymbolExtractor.extract` (`app/modules/rag/indexing/code/symbols/extractor.py:24`) + `SymbolDocumentBuilder.build` (`app/modules/rag/indexing/code/symbols/document_builder.py:9`). +- Где retrieval: тот же общий путь SQL retrieval (`app/modules/rag/persistence/retrieval_statement_builder.py:9`). +- Как ранжируется: общий ranking SQL (`app/modules/rag/persistence/retrieval_statement_builder.py:31`, `:39`, `:59`). + +#### C2_DEPENDENCY_GRAPH + +- Назначение: связи между символами. +- Единица индексации: edge. +- Источник данных: AST visitor по классам/функциям/import/call (`app/modules/rag/indexing/code/edges/extractor.py:33`). +- Схема записи: + - C2 metadata: `edge_id`, `edge_type`, `src_symbol_id`, `src_qname`, `dst_symbol_id`, `dst_ref`, `resolution`, `is_test`, `lang_payload`, `artifact_type` (`app/modules/rag/indexing/code/edges/document_builder.py:18`). +- Где строится индекс: `EdgeExtractor.extract` (`app/modules/rag/indexing/code/edges/extractor.py:24`) + `EdgeDocumentBuilder.build` (`app/modules/rag/indexing/code/edges/document_builder.py:9`). +- Где retrieval: общий SQL retrieval (`app/modules/rag/persistence/retrieval_statement_builder.py:9`). +- Как ранжируется: общий ranking SQL (`app/modules/rag/persistence/retrieval_statement_builder.py:59`). + +Отдельно по `C2_DEPENDENCY_GRAPH`: + +- Поддерживаемые `edge_type`: `inherits`, `imports`, `calls` (`app/modules/rag/indexing/code/edges/extractor.py:43`, `:58`, `:72`). +- `dst_ref`: собирается из AST-узла имени/атрибута (`app/modules/rag/indexing/code/edges/extractor.py:107`). +- `dst_symbol_id`: ищется в `qname_map` (`app/modules/rag/indexing/code/edges/extractor.py:89`). +- `resolution`: `"resolved"` если `dst_symbol_id` найден, иначе `"partial"` (`app/modules/rag/indexing/code/edges/extractor.py:102`). + +#### C3_ENTRYPOINTS + +- Назначение: точки входа (HTTP/CLI). +- Единица индексации: entrypoint. +- Источник данных: эвристики по decorators символов (`FastAPI`, `Flask`, `Typer/Click`) (`app/modules/rag/indexing/code/entrypoints/registry.py:23`). +- Схема записи: + - C3 metadata: `entry_id`, `entry_type`, `framework`, `route_or_command`, `handler_symbol_id`, `is_test`, `lang_payload`, `artifact_type` (`app/modules/rag/indexing/code/entrypoints/document_builder.py:17`). +- Где строится индекс: detectors `FastApiEntrypointDetector.detect`, `FlaskEntrypointDetector.detect`, `TyperClickEntrypointDetector.detect` (`app/modules/rag/indexing/code/entrypoints/fastapi_detector.py:11`, `flask_detector.py:9`, `typer_click_detector.py:9`). +- Где retrieval: общий SQL retrieval (`app/modules/rag/persistence/retrieval_statement_builder.py:9`). +- Как ранжируется: общий ranking SQL (`app/modules/rag/persistence/retrieval_statement_builder.py:59`), приоритет слоя `C3` в `layer_rank` = 0 (`app/modules/rag/persistence/retrieval_statement_builder.py:41`). + +### 3.2 Docs layers + +#### D1_MODULE_CATALOG + +- Назначение: карточка модуля документации. +- Единица: документ на файл (если есть `id/type/domain` во frontmatter). +- Схема: `module_id`, `type`, `domain`, `status`, `version`, `tags`, `owners`, `links`, `source_path`, `summary_text`, `doc_kind` и поля связей (`calls_api`, `called_by`, ... ) (`app/modules/rag/indexing/docs/document_builder.py:10`). +- Build: `DocsIndexingPipeline.index_file` (`app/modules/rag/indexing/docs/pipeline.py:24`) -> `DocsDocumentBuilder.build_module_catalog` (`app/modules/rag/indexing/docs/document_builder.py:10`). +- Retrieval: общий SQL retrieval (`app/modules/rag/persistence/retrieval_statement_builder.py:9`). + +#### D2_FACT_INDEX + +- Назначение: атомарные факты. +- Единица: fact. +- Схема: `fact_id`, `subject_id`, `predicate`, `object`, `object_ref`, `anchor`, `tags`, `source_path` (`app/modules/rag/indexing/docs/document_builder.py:86`). +- Build: `DocsIndexingPipeline._extract_facts/_facts_from_table/_facts_from_lists` (`app/modules/rag/indexing/docs/pipeline.py:55`, `:76`, `:118`) -> `build_fact` (`app/modules/rag/indexing/docs/document_builder.py:86`). +- Retrieval: общий SQL retrieval (`app/modules/rag/persistence/retrieval_statement_builder.py:9`). + +#### D3_SECTION_INDEX + +- Назначение: секции документа. +- Единица: section chunk. +- Схема: `module_id`, `type`, `domain`, `tags`, `section_path`, `section_title`, `order`, `doc_kind`, `source_path`, `artifact_type` (`app/modules/rag/indexing/docs/document_builder.py:42`). +- Build: `MarkdownDocChunker.chunk` (`app/modules/rag/indexing/docs/chunkers/markdown_chunker.py:20`) -> `DocsDocumentBuilder.build_section` (`app/modules/rag/indexing/docs/document_builder.py:42`). +- Retrieval: общий SQL retrieval (`app/modules/rag/persistence/retrieval_statement_builder.py:9`). + +#### D4_POLICY_INDEX + +- Назначение: policy-документы. +- Единица: policy doc. +- Схема: `policy_id`, `applies_to`, `rules`, `default_behaviors`, `doc_kind`, `section_path`, `source_path` (`app/modules/rag/indexing/docs/document_builder.py:64`). +- Build: только если `frontmatter.type == "policy"` (`app/modules/rag/indexing/docs/pipeline.py:36`) -> `build_policy` (`app/modules/rag/indexing/docs/document_builder.py:64`). +- Retrieval: общий SQL retrieval (`app/modules/rag/persistence/retrieval_statement_builder.py:9`). + +## 4) Scoping & filtering (самое важное) + +- `repo_id`/workspace scope при индексации: + - `RagService._resolve_repo_id` берет `project_id` из `rag_session`; fallback — сам `rag_session_id` (`app/modules/rag/services/rag_service.py:161`). + - `repo_id` пишется в документы/metadata (`app/modules/rag/services/rag_service.py:147`). +- Retrieval scope: SQL всегда фильтрует по `rag_session_id = :sid` (`app/modules/rag/persistence/retrieval_statement_builder.py:23`). +- `include_globs`, `exclude_globs`, `prefer_globs`: + - Формируются роутером в `RetrievalConstraintsFactory.build` (`app/modules/rag/intent_router_v2/retrieval/retrieval_constraints_factory.py:22`). + - В `RagDbAdapter.retrieve` применяются `include_globs`/`exclude_globs` через перевод в prefixes/LIKE (`tests/pipeline_intent_rag/helpers/rag_db_adapter.py:46`). + - Использование `prefer_globs` в retrieval-коде не найдено; найдено только формирование/тесты. +- `path_scope`: + - Формируется в `RetrievalFilterBuilder._path_scope` (`app/modules/rag/intent_router_v2/retrieval/retrieval_filter_builder.py:63`). + - В retrieval используется как prefixes: сначала точный scope, затем parent prefix, затем без scope (`tests/pipeline_intent_rag/helpers/rag_db_adapter.py:98`). +- До/после ранжирования: + - Path/layer/test exclude фильтры попадают в `WHERE` до `ORDER BY` (`app/modules/rag/persistence/retrieval_statement_builder.py:23`, `:58`, `:59`). +- `tests/**` penalty: + - Penalty вычисляется как `CASE WHEN lower(path) LIKE ... THEN 1 ELSE 0 END` при `prefer_non_tests=True` (`app/modules/rag/persistence/retrieval_statement_builder.py:176`). + - В `RagDbAdapter` `prefer_non_tests` зависит от `test_policy` (`tests/pipeline_intent_rag/helpers/rag_db_adapter.py:72`). + +## 5) Merge policy (как собираются rag_rows) + +- Top-K на слой задается в `retrieval_spec.layer_queries` (`app/modules/rag/intent_router_v2/models.py:125`) и заполняется `RetrievalSpecFactory` (`app/modules/rag/intent_router_v2/retrieval/retrieval_spec_factory.py:10`). +- Фактический SQL limit в `pipeline_intent_rag`: `limit = max(top_k)` по всем слоям, не отдельный budget на слой (`tests/pipeline_intent_rag/helpers/rag_db_adapter.py:56`). +- Смешивание слоев: один SQL по списку слоев `layer = ANY(:layers)` + общий `ORDER BY` (`app/modules/rag/persistence/retrieval_statement_builder.py:29`, `:59`). +- Политика merge: interleave/concat как отдельные алгоритмы не найдены; порядок задает SQL sorting. +- Дедупликация по `blob_sha`/`symbol_id` для `rag_rows` в `pipeline_intent_rag` не найдена. +- Общий budget: + - retrieval rows ограничены `LIMIT :lim` (`app/modules/rag/persistence/retrieval_statement_builder.py:60`); + - в `full_chain` в prompt уходит максимум 6 `rag_rows`, каждый `content` режется до 1200 символов (`tests/pipeline_intent_rag/helpers/llm_answerer.py:31`, `:34`). + +## 6) Prompt builder / evidence packaging + +- Формат передачи `rag_rows` в LLM (`pipeline_intent_rag/full_chain`): + - `GigaChatAnswerer._format_context` делает блоки `- path | title\\ncontent` (`tests/pipeline_intent_rag/helpers/llm_answerer.py:35`), + - затем `answer` добавляет вопрос+контекст в `user_prompt` (`tests/pipeline_intent_rag/helpers/llm_answerer.py:17`). +- Evidence gate: + - в `pipeline_intent_rag` gate не найден; + - в direct code-explain есть `CodeExplainEvidenceGate(min_excerpts=2)` (`app/modules/chat/evidence_gate.py:16`), применяется в `CodeExplainChatService.handle_message` (`app/modules/chat/direct_service.py:46`). +- Шаблоны промптов: + - code explain: `app/modules/agent/prompts/code_explain_answer_v2.txt:1` (используется в `app/modules/chat/direct_service.py:50`, `app/modules/agent/engine/graphs/project_qa_step_graphs.py:169`); + - project/docs QA: `app/modules/agent/prompts/project_answer.txt:1` (используется в `app/modules/agent/engine/graphs/project_qa_graph.py:36`); + - general: `app/modules/agent/prompts/general_answer.txt:1` (используется в `app/modules/agent/engine/graphs/base_graph.py:62`). + +## 7) Repro commands + +- Построить новый индекс (новая `rag_session`) для локального репозитория: + +```bash +python3 -m tests.pipeline_intent_rag reindex --repo-path /abs/path/to/repo +# optional: +python3 -m tests.pipeline_intent_rag reindex --repo-path /abs/path/to/repo --project-id my-project +``` + + Источник: `tests/pipeline_intent_rag/cli.py:143`, `:123`; README `tests/pipeline_intent_rag/README.md:54`. + +- Прогнать тесткейсы: + +```bash +python3 -m tests.pipeline_intent_rag run --mode router_only +python3 -m tests.pipeline_intent_rag run --mode router_rag --rag-session-id +python3 -m tests.pipeline_intent_rag run --mode full_chain --rag-session-id +``` + + Источник: `tests/pipeline_intent_rag/cli.py:135`, `:138`; README `tests/pipeline_intent_rag/README.md:49`. + +- Получить `rag_rows` как в логах артефактов: + +```bash +python3 -m tests.pipeline_intent_rag run --mode router_rag --rag-session-id --test-name rag_probe +ls -t tests/artifacts/rag_probe_*.jsonl | head -n 1 +tail -n 50 "$(ls -t tests/artifacts/rag_probe_*.jsonl | head -n 1)" +``` + + `rag_rows` сериализуются в JSONL через `PipelineResult.to_record` (`tests/pipeline_intent_rag/helpers/models.py:31`) и `ArtifactWriter` (`tests/pipeline_intent_rag/helpers/artifact_writer.py:20`), имя файла `_.jsonl` (`tests/pipeline_intent_rag/helpers/artifact_writer.py:16`). + +## 8) Appendix: Code pointers + +- Entrypoints: + - Router API: `app/modules/rag/intent_router_v2/router.py:35` (`IntentRouterV2.route`). + - Graph-id map: `app/modules/rag/intent_router_v2/intent/graph_id_resolver.py:4` (`GraphIdResolver`). + - CLI: `tests/pipeline_intent_rag/__main__.py:1`, `tests/pipeline_intent_rag/cli.py:178` (`main`). +- Ключевые классы: + - `IntentRouterV2`: `app/modules/rag/intent_router_v2/router.py:14`. + - `RagService`: `app/modules/rag/services/rag_service.py:20`. + - `CodeIndexingPipeline`: `app/modules/rag/indexing/code/pipeline.py:19`. + - `DocsIndexingPipeline`: `app/modules/rag/indexing/docs/pipeline.py:14`. + - `RagDbAdapter`: `tests/pipeline_intent_rag/helpers/rag_db_adapter.py:36`. + - `RetrievalStatementBuilder`: `app/modules/rag/persistence/retrieval_statement_builder.py:8`. +- Конфиги/переменные окружения: + - Test env: `tests/pipeline_intent_rag/.env.test:3`. + - Env loader: `tests/pipeline_intent_rag/helpers/env_bootstrap.py:13`. + - Run config keys: `tests/pipeline_intent_rag/helpers/pipeline_config.py:30`. +- Форматы данных (pydantic/dataclasses): + - Router schema: `app/modules/rag/intent_router_v2/models.py:43`, `:139`. + - RAG document dataclass: `app/modules/rag/contracts/documents.py:29`. + - Pipeline result JSONL model: `tests/pipeline_intent_rag/helpers/models.py:18`. +- Not found: + - Классы/функции `CodeQAGraph`, `DocsQAGraph` как реальные graph-реализации в `app/` не найдены (строки встречаются как `graph_id` map). + - `F0` layer не найден в `app/` и `tests/`. diff --git a/app/__init__.py b/src/app/__init__.py similarity index 100% rename from app/__init__.py rename to src/app/__init__.py diff --git a/app/core/__init__.py b/src/app/core/__init__.py similarity index 100% rename from app/core/__init__.py rename to src/app/core/__init__.py diff --git a/app/core/constants.py b/src/app/core/constants.py similarity index 100% rename from app/core/constants.py rename to src/app/core/constants.py diff --git a/app/core/error_handlers.py b/src/app/core/error_handlers.py similarity index 100% rename from app/core/error_handlers.py rename to src/app/core/error_handlers.py diff --git a/app/core/exceptions.py b/src/app/core/exceptions.py similarity index 100% rename from app/core/exceptions.py rename to src/app/core/exceptions.py diff --git a/app/core/logging_setup.py b/src/app/core/logging_setup.py similarity index 100% rename from app/core/logging_setup.py rename to src/app/core/logging_setup.py diff --git a/app/main.py b/src/app/main.py similarity index 90% rename from app/main.py rename to src/app/main.py index 9d2eed0..30f985f 100644 --- a/app/main.py +++ b/src/app/main.py @@ -28,8 +28,8 @@ def create_app() -> FastAPI: ) app.include_router(modules.chat.public_router()) - app.include_router(modules.rag_session.public_router()) - app.include_router(modules.rag_session.internal_router()) + app.include_router(modules.rag.public_router()) + app.include_router(modules.rag.internal_router()) app.include_router(modules.rag_repo.internal_router()) app.include_router(modules.agent.internal_router()) diff --git a/app/modules/__init__.py b/src/app/modules/__init__.py similarity index 100% rename from app/modules/__init__.py rename to src/app/modules/__init__.py diff --git a/app/modules/agent/README.md b/src/app/modules/agent/README.md similarity index 100% rename from app/modules/agent/README.md rename to src/app/modules/agent/README.md diff --git a/app/modules/agent/__init__.py b/src/app/modules/agent/__init__.py similarity index 100% rename from app/modules/agent/__init__.py rename to src/app/modules/agent/__init__.py diff --git a/app/modules/agent/changeset_validator.py b/src/app/modules/agent/changeset_validator.py similarity index 100% rename from app/modules/agent/changeset_validator.py rename to src/app/modules/agent/changeset_validator.py diff --git a/src/app/modules/agent/code_qa_runtime/__init__.py b/src/app/modules/agent/code_qa_runtime/__init__.py new file mode 100644 index 0000000..aafbb64 --- /dev/null +++ b/src/app/modules/agent/code_qa_runtime/__init__.py @@ -0,0 +1,15 @@ +from app.modules.agent.code_qa_runtime.executor import CodeQaRuntimeExecutor +from app.modules.agent.code_qa_runtime.models import ( + CodeQaDraftAnswer, + CodeQaExecutionState, + CodeQaFinalResult, + CodeQaValidationResult, +) + +__all__ = [ + "CodeQaDraftAnswer", + "CodeQaExecutionState", + "CodeQaFinalResult", + "CodeQaRuntimeExecutor", + "CodeQaValidationResult", +] diff --git a/src/app/modules/agent/code_qa_runtime/answer_policy.py b/src/app/modules/agent/code_qa_runtime/answer_policy.py new file mode 100644 index 0000000..a7cb4db --- /dev/null +++ b/src/app/modules/agent/code_qa_runtime/answer_policy.py @@ -0,0 +1,62 @@ +from __future__ import annotations + +from dataclasses import dataclass + +from app.modules.rag.code_qa_pipeline.evidence_gate import EvidenceGateDecision +from app.modules.rag.intent_router_v2.models import IntentRouterResult + + +@dataclass(slots=True, frozen=True) +class CodeQaPolicyDecision: + answer_mode: str + answer: str = "" + should_call_llm: bool = True + branch: str = "normal_answer" + reason: str = "evidence_sufficient" + + +class CodeQaAnswerPolicy: + def decide( + self, + *, + router_result: IntentRouterResult, + gate_decision: EvidenceGateDecision, + ) -> CodeQaPolicyDecision: + sub_intent = router_result.query_plan.sub_intent.upper() + symbol_resolution = router_result.symbol_resolution + if sub_intent == "OPEN_FILE" and "path_scope_empty" in gate_decision.failure_reasons: + path_scope = list(getattr(router_result.retrieval_spec.filters, "path_scope", []) or []) + target = path_scope[0] if path_scope else "запрошенный файл" + return CodeQaPolicyDecision( + answer_mode="not_found", + answer=f"Файл {target} не найден.", + should_call_llm=False, + branch="open_file_not_found", + reason="path_scope_empty", + ) + if sub_intent == "EXPLAIN" and symbol_resolution.status in {"not_found", "ambiguous"}: + return CodeQaPolicyDecision( + answer_mode="degraded", + answer=self._symbol_message(symbol_resolution.status, symbol_resolution.alternatives), + should_call_llm=False, + branch="explain_unresolved_symbol", + reason=f"symbol_resolution_{symbol_resolution.status}", + ) + if not gate_decision.passed: + answer_mode = "insufficient" if "insufficient_evidence" in gate_decision.failure_reasons else "degraded" + reason = gate_decision.failure_reasons[0] if gate_decision.failure_reasons else "evidence_gate_failed" + return CodeQaPolicyDecision( + answer_mode=answer_mode, + answer=gate_decision.degraded_message, + should_call_llm=False, + branch="evidence_gate_short_circuit", + reason=reason, + ) + return CodeQaPolicyDecision(answer_mode="normal", branch="normal_answer", reason="evidence_sufficient") + + def _symbol_message(self, status: str, alternatives: list[str]) -> str: + if status == "ambiguous" and alternatives: + return f"Сущность не удалось однозначно разрешить. Близкие варианты: {', '.join(alternatives[:3])}." + if alternatives: + return f"Сущность не найдена в доступном коде. Ближайшие варианты: {', '.join(alternatives[:3])}." + return "Сущность не найдена в доступном коде." diff --git a/src/app/modules/agent/code_qa_runtime/executor.py b/src/app/modules/agent/code_qa_runtime/executor.py new file mode 100644 index 0000000..2b9944b --- /dev/null +++ b/src/app/modules/agent/code_qa_runtime/executor.py @@ -0,0 +1,309 @@ +from __future__ import annotations + +import logging +from time import perf_counter + +from app.modules.agent.code_qa_runtime.answer_policy import CodeQaAnswerPolicy +from app.modules.agent.code_qa_runtime.models import CodeQaDraftAnswer, CodeQaExecutionState, CodeQaFinalResult +from app.modules.agent.code_qa_runtime.post_gate import CodeQaPostEvidenceGate +from app.modules.agent.code_qa_runtime.prompt_payload_builder import CodeQaPromptPayloadBuilder +from app.modules.agent.code_qa_runtime.prompt_selector import CodeQaPromptSelector +from app.modules.agent.code_qa_runtime.repair import CodeQaAnswerRepairService +from app.modules.agent.code_qa_runtime.repo_context import CodeQaRepoContextFactory +from app.modules.agent.code_qa_runtime.retrieval_adapter import CodeQaRetrievalAdapter +from app.modules.agent.llm import AgentLlmService +from app.modules.rag.code_qa_pipeline.answer_synthesis import build_answer_synthesis_input +from app.modules.rag.code_qa_pipeline.diagnostics import build_diagnostics_report +from app.modules.rag.code_qa_pipeline.evidence_bundle_builder import build_evidence_bundle +from app.modules.rag.code_qa_pipeline.evidence_gate import evaluate_evidence +from app.modules.rag.code_qa_pipeline.retrieval_request_builder import build_retrieval_request +from app.modules.rag.code_qa_pipeline.retrieval_result_builder import build_retrieval_result +from app.modules.rag.intent_router_v2 import ConversationState, IntentRouterV2 +from app.modules.rag.intent_router_v2.models import SymbolResolution + +LOGGER = logging.getLogger(__name__) + + +class CodeQaRuntimeExecutor: + def __init__( + self, + llm: AgentLlmService | None, + *, + router: IntentRouterV2 | None = None, + retrieval: CodeQaRetrievalAdapter | None = None, + repo_context_factory: CodeQaRepoContextFactory | None = None, + prompt_selector: CodeQaPromptSelector | None = None, + payload_builder: CodeQaPromptPayloadBuilder | None = None, + answer_policy: CodeQaAnswerPolicy | None = None, + post_gate: CodeQaPostEvidenceGate | None = None, + ) -> None: + self._llm = llm + self._router = router or IntentRouterV2() + self._retrieval = retrieval or CodeQaRetrievalAdapter() + self._repo_context_factory = repo_context_factory or CodeQaRepoContextFactory() + self._prompt_selector = prompt_selector or CodeQaPromptSelector() + self._payload_builder = payload_builder or CodeQaPromptPayloadBuilder() + self._answer_policy = answer_policy or CodeQaAnswerPolicy() + self._post_gate = post_gate or CodeQaPostEvidenceGate() + self._repair = CodeQaAnswerRepairService(llm) if llm is not None else None + + def execute(self, *, user_query: str, rag_session_id: str, files_map: dict[str, dict] | None = None) -> CodeQaFinalResult: + timings_ms: dict[str, int] = {} + runtime_trace: list[dict] = [] + state = CodeQaExecutionState( + user_query=user_query, + rag_session_id=rag_session_id, + conversation_state=ConversationState(), + repo_context=self._repo_context_factory.build(files_map), + ) + started = perf_counter() + state.router_result = self._router.route(user_query, state.conversation_state, state.repo_context) + timings_ms["router"] = self._elapsed_ms(started) + runtime_trace.append( + { + "step": "router", + "status": "completed", + "timings_ms": {"router": timings_ms["router"]}, + "output": { + "intent": state.router_result.intent, + "sub_intent": state.router_result.query_plan.sub_intent, + "graph_id": state.router_result.graph_id, + "conversation_mode": state.router_result.conversation_mode, + }, + } + ) + state.retrieval_request = build_retrieval_request(state.router_result, rag_session_id) + started = perf_counter() + raw_rows = self._retrieve(state) + timings_ms["retrieval"] = self._elapsed_ms(started) + symbol_resolution = self._resolve_symbol(state.router_result.symbol_resolution.model_dump(), raw_rows) + state.router_result = state.router_result.model_copy(update={"symbol_resolution": SymbolResolution(**symbol_resolution)}) + retrieval_report = self._retrieval.consume_retrieval_report() + state.retrieval_result = build_retrieval_result(raw_rows, retrieval_report, symbol_resolution) + if state.retrieval_request.sub_intent.upper() == "EXPLAIN" and symbol_resolution.get("status") in {"not_found", "ambiguous"}: + state.retrieval_result = build_retrieval_result([], retrieval_report, symbol_resolution) + runtime_trace.append( + { + "step": "retrieval", + "status": "completed", + "timings_ms": {"retrieval": timings_ms["retrieval"]}, + "output": { + "rag_count": len(raw_rows), + "answer_path_rag_count": len(state.retrieval_result.raw_rows), + "resolved_symbol_status": symbol_resolution.get("status"), + "resolved_symbol": symbol_resolution.get("resolved_symbol"), + "requested_layers": list(state.retrieval_request.requested_layers or []), + }, + "diagnostics": retrieval_report or {}, + } + ) + state.evidence_pack = build_evidence_bundle(state.retrieval_result, state.router_result) + if state.retrieval_request.sub_intent.upper() == "EXPLAIN" and symbol_resolution.get("status") in {"not_found", "ambiguous"}: + state.evidence_pack.sufficient = False + state.evidence_pack.failure_reasons = ["target_not_resolved"] + gate_decision = evaluate_evidence(state.evidence_pack) + timings_ms["pre_evidence_gate"] = 0 + state.answer_mode = "normal" if gate_decision.passed else "degraded" + state.degraded_message = gate_decision.degraded_message + runtime_trace.append( + { + "step": "pre_evidence_gate", + "status": "passed" if gate_decision.passed else "blocked", + "timings_ms": {"pre_evidence_gate": timings_ms["pre_evidence_gate"]}, + "output": { + "passed": gate_decision.passed, + "failure_reasons": list(gate_decision.failure_reasons), + "degraded_message": gate_decision.degraded_message, + }, + } + ) + decision = self._answer_policy.decide(router_result=state.router_result, gate_decision=gate_decision) + if not decision.should_call_llm: + state.answer_mode = decision.answer_mode + runtime_trace.append( + { + "step": "llm", + "status": "skipped", + "output": { + "reason": "policy_short_circuit", + "answer_mode": decision.answer_mode, + }, + } + ) + runtime_trace.append( + { + "step": "post_evidence_gate", + "status": "skipped", + "output": {"reason": "no_draft_answer"}, + } + ) + return self._finalize( + state, + draft=None, + final_answer=decision.answer, + repair_used=False, + llm_used=False, + timings_ms=timings_ms, + runtime_trace=runtime_trace, + ) + if self._llm is None: + runtime_trace.append( + { + "step": "llm", + "status": "skipped", + "output": {"reason": "llm_unavailable"}, + } + ) + return self._finalize( + state, + draft=None, + final_answer="", + repair_used=False, + llm_used=False, + timings_ms=timings_ms, + runtime_trace=runtime_trace, + ) + state.synthesis_input = build_answer_synthesis_input(user_query, state.evidence_pack) + prompt_name = self._prompt_selector.select(sub_intent=state.retrieval_request.sub_intent, answer_mode=state.answer_mode) + prompt_payload = self._payload_builder.build( + user_query=user_query, + synthesis_input=state.synthesis_input, + evidence_pack=state.evidence_pack, + answer_mode=state.answer_mode, + ) + started = perf_counter() + draft = CodeQaDraftAnswer( + prompt_name=prompt_name, + prompt_payload=prompt_payload, + answer=self._llm.generate(prompt_name, prompt_payload, log_context="graph.project_qa.code_qa.answer").strip(), + ) + timings_ms["llm"] = self._elapsed_ms(started) + runtime_trace.append( + { + "step": "llm", + "status": "completed", + "timings_ms": {"llm": timings_ms["llm"]}, + "output": { + "prompt_name": prompt_name, + "answer_preview": draft.answer[:300], + }, + } + ) + validation = self._post_gate.validate(answer=draft.answer, answer_mode=state.answer_mode, degraded_message=state.degraded_message) + final_answer = draft.answer + repair_used = False + if not validation.passed and self._repair is not None: + started = perf_counter() + final_answer = self._repair.repair(draft_answer=draft.answer, validation=validation, prompt_payload=prompt_payload) + repair_used = True + timings_ms["repair"] = self._elapsed_ms(started) + validation = self._post_gate.validate(answer=final_answer, answer_mode=state.answer_mode, degraded_message=state.degraded_message) + if not validation.passed and state.degraded_message: + final_answer = state.degraded_message + runtime_trace.append( + { + "step": "post_evidence_gate", + "status": "passed" if validation.passed else "failed", + "timings_ms": { + "post_evidence_gate": 0, + "repair": timings_ms.get("repair", 0), + }, + "output": { + "passed": validation.passed, + "reasons": list(validation.reasons), + "repair_used": repair_used, + }, + } + ) + return self._finalize( + state, + draft=draft, + final_answer=final_answer, + repair_used=repair_used, + llm_used=True, + validation=validation, + timings_ms=timings_ms, + runtime_trace=runtime_trace, + ) + + def _retrieve(self, state: CodeQaExecutionState) -> list[dict]: + assert state.retrieval_request is not None + if state.retrieval_request.sub_intent == "OPEN_FILE" and state.retrieval_request.path_scope: + return self._retrieval.retrieve_exact_files( + state.rag_session_id, + paths=state.retrieval_request.path_scope, + layers=["C0_SOURCE_CHUNKS"], + limit=200, + query=state.retrieval_request.query, + ranking_profile=str(getattr(state.retrieval_request.retrieval_spec, "rerank_profile", "") or ""), + ) + return self._retrieval.retrieve_with_plan( + state.rag_session_id, + state.retrieval_request.query, + state.retrieval_request.retrieval_spec, + state.retrieval_request.retrieval_constraints, + query_plan=state.retrieval_request.query_plan, + ) + + def _resolve_symbol(self, initial: dict, rag_rows: list[dict]) -> dict: + if str(initial.get("status") or "") != "pending": + return initial + candidates = [str(item).strip() for item in initial.get("alternatives", []) if str(item).strip()] + found = [ + str(row.get("title") or "").strip() + for row in rag_rows + if str(row.get("layer") or "") == "C1_SYMBOL_CATALOG" and str(row.get("title") or "").strip() + ] + exact = next((item for item in found if item in candidates), None) + if exact: + return {"status": "resolved", "resolved_symbol": exact, "alternatives": found[:5], "confidence": 0.99} + if found: + return {"status": "ambiguous", "resolved_symbol": None, "alternatives": found[:5], "confidence": 0.55} + return {"status": "not_found", "resolved_symbol": None, "alternatives": [], "confidence": 0.0} + + def _finalize( + self, + state: CodeQaExecutionState, + *, + draft: CodeQaDraftAnswer | None, + final_answer: str, + repair_used: bool, + llm_used: bool, + validation=None, + timings_ms: dict[str, int] | None = None, + runtime_trace: list[dict] | None = None, + ) -> CodeQaFinalResult: + diagnostics = build_diagnostics_report( + router_result=state.router_result, + retrieval_request=state.retrieval_request, + retrieval_result=state.retrieval_result, + evidence_bundle=state.evidence_pack, + answer_mode=state.answer_mode, + timings_ms=timings_ms or {}, + ) + result = CodeQaFinalResult( + final_answer=final_answer.strip(), + answer_mode=state.answer_mode, + repair_used=repair_used, + llm_used=llm_used, + draft_answer=draft, + validation=validation or self._post_gate.validate(answer=final_answer, answer_mode=state.answer_mode, degraded_message=state.degraded_message), + router_result=state.router_result, + retrieval_request=state.retrieval_request, + retrieval_result=state.retrieval_result, + evidence_pack=state.evidence_pack, + diagnostics=diagnostics, + runtime_trace=list(runtime_trace or []), + ) + LOGGER.warning( + "code qa runtime executed: intent=%s sub_intent=%s answer_mode=%s repair_used=%s llm_used=%s", + state.router_result.intent, + state.router_result.query_plan.sub_intent, + result.answer_mode, + result.repair_used, + result.llm_used, + ) + return result + + def _elapsed_ms(self, started: float) -> int: + return int((perf_counter() - started) * 1000) diff --git a/src/app/modules/agent/code_qa_runtime/models.py b/src/app/modules/agent/code_qa_runtime/models.py new file mode 100644 index 0000000..0957ad7 --- /dev/null +++ b/src/app/modules/agent/code_qa_runtime/models.py @@ -0,0 +1,73 @@ +from __future__ import annotations + +from typing import Any + +from pydantic import BaseModel, ConfigDict, Field + +from app.modules.rag.code_qa_pipeline.contracts import ( + AnswerSynthesisInput as CodeQaAnswerSynthesisInput, +) +from app.modules.rag.code_qa_pipeline.contracts import ( + DiagnosticsReport as CodeQaDiagnosticsReport, +) +from app.modules.rag.code_qa_pipeline.contracts import ( + EvidenceBundle as CodeQaEvidencePack, +) +from app.modules.rag.code_qa_pipeline.contracts import ( + RetrievalRequest as CodeQaRetrievalRequest, +) +from app.modules.rag.code_qa_pipeline.contracts import ( + RetrievalResult as CodeQaRetrievalResult, +) +from app.modules.rag.intent_router_v2.models import ConversationState, IntentRouterResult, RepoContext + + +class CodeQaDraftAnswer(BaseModel): + model_config = ConfigDict(extra="forbid") + + prompt_name: str + prompt_payload: str + answer: str = "" + + +class CodeQaValidationResult(BaseModel): + model_config = ConfigDict(extra="forbid") + + passed: bool = False + action: str = "return" + reasons: list[str] = Field(default_factory=list) + + +class CodeQaFinalResult(BaseModel): + model_config = ConfigDict(extra="forbid") + + final_answer: str + answer_mode: str = "normal" + repair_used: bool = False + llm_used: bool = False + draft_answer: CodeQaDraftAnswer | None = None + validation: CodeQaValidationResult = Field(default_factory=CodeQaValidationResult) + router_result: IntentRouterResult | None = None + retrieval_request: CodeQaRetrievalRequest | None = None + retrieval_result: CodeQaRetrievalResult | None = None + evidence_pack: CodeQaEvidencePack | None = None + diagnostics: CodeQaDiagnosticsReport + runtime_trace: list[dict[str, Any]] = Field(default_factory=list) + + +class CodeQaExecutionState(BaseModel): + model_config = ConfigDict(extra="forbid") + + user_query: str + rag_session_id: str + conversation_state: ConversationState = Field(default_factory=ConversationState) + repo_context: RepoContext = Field(default_factory=RepoContext) + router_result: IntentRouterResult | None = None + retrieval_request: CodeQaRetrievalRequest | None = None + retrieval_result: CodeQaRetrievalResult | None = None + evidence_pack: CodeQaEvidencePack | None = None + synthesis_input: CodeQaAnswerSynthesisInput | None = None + diagnostics: CodeQaDiagnosticsReport | None = None + answer_mode: str = "normal" + degraded_message: str = "" + final_result: CodeQaFinalResult | None = None diff --git a/src/app/modules/agent/code_qa_runtime/post_gate.py b/src/app/modules/agent/code_qa_runtime/post_gate.py new file mode 100644 index 0000000..bcb0d30 --- /dev/null +++ b/src/app/modules/agent/code_qa_runtime/post_gate.py @@ -0,0 +1,23 @@ +from __future__ import annotations + +from app.modules.agent.code_qa_runtime.models import CodeQaValidationResult + + +class CodeQaPostEvidenceGate: + def validate( + self, + *, + answer: str, + answer_mode: str, + degraded_message: str, + ) -> CodeQaValidationResult: + normalized = (answer or "").strip() + if not normalized: + return CodeQaValidationResult(passed=False, action="repair", reasons=["empty_answer"]) + if answer_mode in {"degraded", "insufficient"} and "недостат" not in normalized.lower(): + return CodeQaValidationResult(passed=False, action="repair", reasons=["degraded_answer_missing_guardrail"]) + if answer_mode == "not_found" and "не найден" not in normalized.lower(): + return CodeQaValidationResult(passed=False, action="repair", reasons=["not_found_answer_missing_phrase"]) + if degraded_message and answer_mode != "normal" and len(normalized) < 24: + return CodeQaValidationResult(passed=False, action="repair", reasons=["answer_too_short"]) + return CodeQaValidationResult(passed=True, action="return") diff --git a/src/app/modules/agent/code_qa_runtime/prompt_payload_builder.py b/src/app/modules/agent/code_qa_runtime/prompt_payload_builder.py new file mode 100644 index 0000000..2711cd3 --- /dev/null +++ b/src/app/modules/agent/code_qa_runtime/prompt_payload_builder.py @@ -0,0 +1,37 @@ +from __future__ import annotations + +import json + +from app.modules.rag.code_qa_pipeline.contracts import AnswerSynthesisInput, EvidenceBundle + +_LAYER_GUIDE = ( + "- C0_SOURCE_CHUNKS: фактический код, это основной источник деталей.\n" + "- C1_SYMBOL_CATALOG: объявления и сигнатуры символов.\n" + "- C2_DEPENDENCY_GRAPH: связи вызовов и зависимостей.\n" + "- C3_ENTRYPOINTS: подтвержденные точки входа.\n" + "- C4_SEMANTIC_ROLES: вспомогательная роль компонента, использовать осторожно." +) + + +class CodeQaPromptPayloadBuilder: + def build( + self, + *, + user_query: str, + synthesis_input: AnswerSynthesisInput, + evidence_pack: EvidenceBundle, + answer_mode: str, + ) -> str: + payload = { + "user_query": user_query, + "resolved_scenario": synthesis_input.resolved_scenario, + "resolved_target": synthesis_input.resolved_target, + "answer_mode": answer_mode, + "fast_context": synthesis_input.fast_context, + "deep_context": synthesis_input.deep_context, + "evidence_summary": synthesis_input.evidence_summary, + "diagnostic_hints": synthesis_input.diagnostic_hints, + "retrieval_summary": evidence_pack.retrieval_summary, + "layer_guide": _LAYER_GUIDE, + } + return json.dumps(payload, ensure_ascii=False, indent=2) diff --git a/src/app/modules/agent/code_qa_runtime/prompt_selector.py b/src/app/modules/agent/code_qa_runtime/prompt_selector.py new file mode 100644 index 0000000..5cc54d9 --- /dev/null +++ b/src/app/modules/agent/code_qa_runtime/prompt_selector.py @@ -0,0 +1,19 @@ +from __future__ import annotations + + +class CodeQaPromptSelector: + _PROMPTS = { + "ARCHITECTURE": "code_qa_architecture_answer", + "EXPLAIN": "code_qa_explain_answer", + "EXPLAIN_LOCAL": "code_qa_explain_local_answer", + "FIND_ENTRYPOINTS": "code_qa_find_entrypoints_answer", + "FIND_TESTS": "code_qa_find_tests_answer", + "GENERAL_QA": "code_qa_general_answer", + "OPEN_FILE": "code_qa_open_file_answer", + "TRACE_FLOW": "code_qa_trace_flow_answer", + } + + def select(self, *, sub_intent: str, answer_mode: str) -> str: + if answer_mode in {"degraded", "not_found", "insufficient"}: + return "code_qa_degraded_answer" + return self._PROMPTS.get(sub_intent.upper(), "code_qa_explain_answer") diff --git a/src/app/modules/agent/code_qa_runtime/repair.py b/src/app/modules/agent/code_qa_runtime/repair.py new file mode 100644 index 0000000..af8b39d --- /dev/null +++ b/src/app/modules/agent/code_qa_runtime/repair.py @@ -0,0 +1,33 @@ +from __future__ import annotations + +import json + +from app.modules.agent.code_qa_runtime.models import CodeQaValidationResult +from app.modules.agent.llm import AgentLlmService + + +class CodeQaAnswerRepairService: + def __init__(self, llm: AgentLlmService) -> None: + self._llm = llm + + def repair( + self, + *, + draft_answer: str, + validation: CodeQaValidationResult, + prompt_payload: str, + ) -> str: + repair_input = json.dumps( + { + "draft_answer": draft_answer, + "validation_reasons": validation.reasons, + "prompt_payload": prompt_payload, + }, + ensure_ascii=False, + indent=2, + ) + return self._llm.generate( + "code_qa_repair_answer", + repair_input, + log_context="graph.project_qa.code_qa.repair", + ).strip() diff --git a/src/app/modules/agent/code_qa_runtime/repo_context.py b/src/app/modules/agent/code_qa_runtime/repo_context.py new file mode 100644 index 0000000..2f2aa12 --- /dev/null +++ b/src/app/modules/agent/code_qa_runtime/repo_context.py @@ -0,0 +1,36 @@ +from __future__ import annotations + +from app.modules.rag.contracts.enums import RagLayer +from app.modules.rag.intent_router_v2.models import RepoContext + + +class CodeQaRepoContextFactory: + _KNOWN_LAYERS = [ + RagLayer.CODE_ENTRYPOINTS, + RagLayer.CODE_SYMBOL_CATALOG, + RagLayer.CODE_DEPENDENCY_GRAPH, + RagLayer.CODE_SEMANTIC_ROLES, + RagLayer.CODE_SOURCE_CHUNKS, + RagLayer.DOCS_MODULE_CATALOG, + RagLayer.DOCS_FACT_INDEX, + RagLayer.DOCS_SECTION_INDEX, + RagLayer.DOCS_POLICY_INDEX, + ] + + def build(self, files_map: dict[str, dict] | None = None) -> RepoContext: + languages = self._languages(files_map or {}) + return RepoContext( + languages=languages or ["python"], + available_domains=["CODE", "DOCS"], + available_layers=list(self._KNOWN_LAYERS), + ) + + def _languages(self, files_map: dict[str, dict]) -> list[str]: + found: list[str] = [] + for path in files_map: + lower = path.lower() + if lower.endswith(".py") and "python" not in found: + found.append("python") + if lower.endswith((".md", ".rst", ".txt")) and "markdown" not in found: + found.append("markdown") + return found diff --git a/src/app/modules/agent/code_qa_runtime/retrieval_adapter.py b/src/app/modules/agent/code_qa_runtime/retrieval_adapter.py new file mode 100644 index 0000000..2dfd58b --- /dev/null +++ b/src/app/modules/agent/code_qa_runtime/retrieval_adapter.py @@ -0,0 +1,241 @@ +from __future__ import annotations + +from time import perf_counter +from typing import TYPE_CHECKING, Any + +if TYPE_CHECKING: + from app.modules.rag.persistence.repository import RagRepository + + +class SessionEmbeddingDimensions: + def __init__(self, repository: RagRepository | None = None) -> None: + self._cache: dict[str, int] = {} + self._repository = repository + + def resolve(self, rag_session_id: str) -> int: + if rag_session_id in self._cache: + return self._cache[rag_session_id] + from app.modules.shared.db import get_engine + from sqlalchemy import text + + with get_engine().connect() as conn: + row = conn.execute( + text( + """ + SELECT vector_dims(embedding) AS dim + FROM rag_chunks + WHERE rag_session_id = :sid AND embedding IS NOT NULL + LIMIT 1 + """ + ), + {"sid": rag_session_id}, + ).mappings().first() + dim = int(row["dim"]) if row and row.get("dim") else 0 + self._cache[rag_session_id] = dim + return dim + + +class CodeQaRetrievalAdapter: + def __init__(self, repository: RagRepository | None = None) -> None: + if repository is None: + from app.modules.rag.persistence.repository import RagRepository + + repository = RagRepository() + self._repository = repository + self._dim_resolver = SessionEmbeddingDimensions(self._repository) + self._last_report: dict[str, Any] | None = None + + def retrieve_with_plan( + self, + rag_session_id: str, + query: str, + retrieval_spec, + retrieval_constraints=None, + *, + query_plan=None, + ) -> list[dict]: + rows: list[dict] = [] + executed_layers: list[str] = [] + per_layer_ms: dict[str, int] = {} + for layer_query in list(getattr(retrieval_spec, "layer_queries", []) or []): + layer_id = str(layer_query.layer_id) + executed_layers.append(layer_id) + started = perf_counter() + layer_rows = self._retrieve_layer( + rag_session_id=rag_session_id, + query=query, + layer_id=layer_id, + limit=max(1, int(layer_query.top_k)), + path_scope=list(getattr(retrieval_spec.filters, "path_scope", []) or []), + retrieval_constraints=retrieval_constraints, + include_tests=str(getattr(retrieval_spec.filters, "test_policy", "EXCLUDE") or "EXCLUDE") == "INCLUDE", + ) + per_layer_ms[layer_id] = int((perf_counter() - started) * 1000) + rows.extend(layer_rows) + self._last_report = { + "executed_layers": executed_layers, + "retrieval_mode_by_layer": {layer_id: "vector" for layer_id in executed_layers}, + "top_k_by_layer": {str(item.layer_id): int(item.top_k) for item in list(getattr(retrieval_spec, "layer_queries", []) or [])}, + "filters_by_layer": { + layer_id: {"path_scope": list(getattr(retrieval_spec.filters, "path_scope", []) or [])} + for layer_id in executed_layers + }, + "fallback": {"used": False, "reason": None}, + "retrieval_by_layer_ms": per_layer_ms, + } + return self._dedupe(rows) + + def retrieve_exact_files( + self, + rag_session_id: str, + *, + repo_id: str | None = None, + paths: list[str], + layers: list[str] | None = None, + limit: int = 200, + query: str = "", + ranking_profile: str = "", + ) -> list[dict]: + started = perf_counter() + rows = self._repository.retrieve_exact_files(rag_session_id, repo_id=repo_id, paths=paths, layers=layers, limit=limit) + layer_id = list(layers or ["C0_SOURCE_CHUNKS"])[0] + self._last_report = { + "executed_layers": [layer_id], + "retrieval_mode_by_layer": {layer_id: "exact_path_fetch"}, + "top_k_by_layer": {layer_id: int(limit)}, + "filters_by_layer": {layer_id: {"path_scope": list(paths)}}, + "requests": [{"layer": layer_id, "query": query, "ranking_profile": ranking_profile}], + "fallback": {"used": False, "reason": None}, + "retrieval_by_layer_ms": {layer_id: int((perf_counter() - started) * 1000)}, + } + return self._dedupe(rows) + + def hydrate_resolved_symbol_sources( + self, + rag_session_id: str, + base_query: str, + rag_rows: list[dict], + symbol_resolution: dict, + retrieval_spec, + retrieval_constraints=None, + ) -> list[dict]: + if str(symbol_resolution.get("status") or "") != "resolved": + return rag_rows + target = str(symbol_resolution.get("resolved_symbol") or "").strip() + if not target: + return rag_rows + symbol_row = next( + ( + row + for row in rag_rows + if str(row.get("layer") or "") == "C1_SYMBOL_CATALOG" + and target in {str(row.get("title") or "").strip(), str(dict(row.get("metadata") or {}).get("qname") or "").strip()} + ), + None, + ) + if symbol_row is None: + return rag_rows + extra = self.retrieve_exact_files( + rag_session_id, + paths=[str(symbol_row.get("path") or "")], + layers=["C0_SOURCE_CHUNKS"], + limit=6, + query=base_query, + ranking_profile=str(getattr(retrieval_spec, "rerank_profile", "") or ""), + ) + return self._dedupe([*rag_rows, *extra]) + + def force_symbol_context_c0( + self, + rag_session_id: str, + *, + rag_rows: list[dict], + symbol_resolution: dict, + limit: int = 20, + ) -> list[dict]: + if str(symbol_resolution.get("status") or "") != "resolved": + return rag_rows + target = str(symbol_resolution.get("resolved_symbol") or "").strip() + target_row = next((row for row in rag_rows if str(row.get("title") or "").strip() == target), None) + if target_row is None: + return rag_rows + c0_rows = self.retrieve_exact_files( + rag_session_id, + paths=[str(target_row.get("path") or "")], + layers=["C0_SOURCE_CHUNKS"], + limit=limit, + query=target, + ranking_profile="symbol_context", + ) + preserved = [row for row in rag_rows if str(row.get("layer") or "") != "C0_SOURCE_CHUNKS"] + return self._dedupe([*preserved, *c0_rows]) + + def consume_retrieval_report(self) -> dict[str, Any] | None: + report = self._last_report + self._last_report = None + return report + + def _retrieve_layer( + self, + *, + rag_session_id: str, + query: str, + layer_id: str, + limit: int, + path_scope: list[str], + retrieval_constraints, + include_tests: bool, + ) -> list[dict]: + exclude_prefixes, exclude_like = self._test_filters(include_tests) + if retrieval_constraints is not None: + exclude_globs = [item.lower() for item in list(getattr(retrieval_constraints, "exclude_globs", []) or [])] + exclude_like.extend(self._glob_to_like(item) for item in exclude_globs if "*" in item) + dim = self._dim_resolver.resolve(rag_session_id) + if dim <= 0: + if layer_id != "C0_SOURCE_CHUNKS": + return [] + return self._repository.retrieve_lexical_code( + rag_session_id, + query_text=query, + limit=limit, + path_prefixes=path_scope or None, + exclude_path_prefixes=exclude_prefixes or None, + exclude_like_patterns=exclude_like or None, + prefer_non_tests=not include_tests, + ) + return self._repository.retrieve( + rag_session_id, + [0.0] * dim, + query_text=query, + limit=limit, + layers=[layer_id], + path_prefixes=path_scope or None, + exclude_path_prefixes=exclude_prefixes or None, + exclude_like_patterns=exclude_like or None, + prefer_non_tests=not include_tests, + ) + + def _test_filters(self, include_tests: bool) -> tuple[list[str], list[str]]: + if include_tests: + return [], [] + from app.modules.rag.retrieval.test_filter import build_test_filters + + filters = build_test_filters() + return list(filters.exclude_path_prefixes), list(filters.exclude_like_patterns) + + def _glob_to_like(self, glob: str) -> str: + return glob.replace("**/", "%/").replace("**", "%").replace("*", "%").replace("?", "_") + + def _dedupe(self, rows: list[dict]) -> list[dict]: + result: list[dict] = [] + seen: set[tuple[str, str, str, int | None, int | None]] = set() + for row in rows: + path = str(row.get("path") or "") + layer = str(row.get("layer") or "") + title = str(row.get("title") or "") + key = (layer, path, title, row.get("span_start"), row.get("span_end")) + if key in seen: + continue + seen.add(key) + result.append(row) + return result diff --git a/app/modules/agent/confluence_service.py b/src/app/modules/agent/confluence_service.py similarity index 100% rename from app/modules/agent/confluence_service.py rename to src/app/modules/agent/confluence_service.py diff --git a/app/modules/agent/engine/__init__.py b/src/app/modules/agent/engine/__init__.py similarity index 100% rename from app/modules/agent/engine/__init__.py rename to src/app/modules/agent/engine/__init__.py diff --git a/app/modules/agent/engine/graphs/__init__.py b/src/app/modules/agent/engine/graphs/__init__.py similarity index 91% rename from app/modules/agent/engine/graphs/__init__.py rename to src/app/modules/agent/engine/graphs/__init__.py index 2564438..55c1956 100644 --- a/app/modules/agent/engine/graphs/__init__.py +++ b/src/app/modules/agent/engine/graphs/__init__.py @@ -1,5 +1,6 @@ __all__ = [ "BaseGraphFactory", + "CodeQaGraphFactory", "DocsGraphFactory", "ProjectQaAnalysisGraphFactory", "ProjectQaAnswerGraphFactory", @@ -16,6 +17,10 @@ def __getattr__(name: str): from app.modules.agent.engine.graphs.base_graph import BaseGraphFactory return BaseGraphFactory + if name == "CodeQaGraphFactory": + from app.modules.agent.engine.graphs.code_qa_graph import CodeQaGraphFactory + + return CodeQaGraphFactory if name == "DocsGraphFactory": from app.modules.agent.engine.graphs.docs_graph import DocsGraphFactory diff --git a/app/modules/agent/engine/graphs/base_graph.py b/src/app/modules/agent/engine/graphs/base_graph.py similarity index 100% rename from app/modules/agent/engine/graphs/base_graph.py rename to src/app/modules/agent/engine/graphs/base_graph.py diff --git a/src/app/modules/agent/engine/graphs/code_qa_graph.py b/src/app/modules/agent/engine/graphs/code_qa_graph.py new file mode 100644 index 0000000..fbfc973 --- /dev/null +++ b/src/app/modules/agent/engine/graphs/code_qa_graph.py @@ -0,0 +1,45 @@ +from __future__ import annotations + +import logging + +from langgraph.graph import END, START, StateGraph + +from app.modules.agent.code_qa_runtime import CodeQaRuntimeExecutor +from app.modules.agent.engine.graphs.progress import emit_progress_sync +from app.modules.agent.engine.graphs.state import AgentGraphState +from app.modules.agent.llm import AgentLlmService + +LOGGER = logging.getLogger(__name__) + + +class CodeQaGraphFactory: + def __init__(self, llm: AgentLlmService) -> None: + self._executor = CodeQaRuntimeExecutor(llm) + + def build(self, checkpointer=None): + graph = StateGraph(AgentGraphState) + graph.add_node("execute_code_qa", self._execute_code_qa) + graph.add_edge(START, "execute_code_qa") + graph.add_edge("execute_code_qa", END) + return graph.compile(checkpointer=checkpointer) + + def _execute_code_qa(self, state: AgentGraphState) -> dict: + emit_progress_sync( + state, + stage="graph.project_qa.code_qa", + message="Исполняю CODE_QA runtime pipeline.", + ) + result = self._executor.execute( + user_query=str(state.get("message", "") or ""), + rag_session_id=str(state.get("project_id", "") or ""), + files_map=dict(state.get("files_map", {}) or {}), + ) + LOGGER.warning( + "graph step result: graph=project_qa/code_qa_runtime answer_mode=%s repair_used=%s", + result.answer_mode, + result.repair_used, + ) + return { + "final_answer": result.final_answer, + "code_qa_result": result.model_dump(mode="json"), + } diff --git a/app/modules/agent/engine/graphs/docs_examples_loader.py b/src/app/modules/agent/engine/graphs/docs_examples_loader.py similarity index 100% rename from app/modules/agent/engine/graphs/docs_examples_loader.py rename to src/app/modules/agent/engine/graphs/docs_examples_loader.py diff --git a/app/modules/agent/engine/graphs/docs_graph.py b/src/app/modules/agent/engine/graphs/docs_graph.py similarity index 100% rename from app/modules/agent/engine/graphs/docs_graph.py rename to src/app/modules/agent/engine/graphs/docs_graph.py diff --git a/app/modules/agent/engine/graphs/docs_graph_logic.py b/src/app/modules/agent/engine/graphs/docs_graph_logic.py similarity index 100% rename from app/modules/agent/engine/graphs/docs_graph_logic.py rename to src/app/modules/agent/engine/graphs/docs_graph_logic.py diff --git a/app/modules/agent/engine/graphs/file_targeting.py b/src/app/modules/agent/engine/graphs/file_targeting.py similarity index 100% rename from app/modules/agent/engine/graphs/file_targeting.py rename to src/app/modules/agent/engine/graphs/file_targeting.py diff --git a/app/modules/agent/engine/graphs/progress.py b/src/app/modules/agent/engine/graphs/progress.py similarity index 100% rename from app/modules/agent/engine/graphs/progress.py rename to src/app/modules/agent/engine/graphs/progress.py diff --git a/app/modules/agent/engine/graphs/progress_registry.py b/src/app/modules/agent/engine/graphs/progress_registry.py similarity index 100% rename from app/modules/agent/engine/graphs/progress_registry.py rename to src/app/modules/agent/engine/graphs/progress_registry.py diff --git a/app/modules/agent/engine/graphs/project_edits_contract.py b/src/app/modules/agent/engine/graphs/project_edits_contract.py similarity index 100% rename from app/modules/agent/engine/graphs/project_edits_contract.py rename to src/app/modules/agent/engine/graphs/project_edits_contract.py diff --git a/app/modules/agent/engine/graphs/project_edits_graph.py b/src/app/modules/agent/engine/graphs/project_edits_graph.py similarity index 100% rename from app/modules/agent/engine/graphs/project_edits_graph.py rename to src/app/modules/agent/engine/graphs/project_edits_graph.py diff --git a/app/modules/agent/engine/graphs/project_edits_logic.py b/src/app/modules/agent/engine/graphs/project_edits_logic.py similarity index 100% rename from app/modules/agent/engine/graphs/project_edits_logic.py rename to src/app/modules/agent/engine/graphs/project_edits_logic.py diff --git a/app/modules/agent/engine/graphs/project_edits_patcher.py b/src/app/modules/agent/engine/graphs/project_edits_patcher.py similarity index 100% rename from app/modules/agent/engine/graphs/project_edits_patcher.py rename to src/app/modules/agent/engine/graphs/project_edits_patcher.py diff --git a/app/modules/agent/engine/graphs/project_edits_support.py b/src/app/modules/agent/engine/graphs/project_edits_support.py similarity index 100% rename from app/modules/agent/engine/graphs/project_edits_support.py rename to src/app/modules/agent/engine/graphs/project_edits_support.py diff --git a/app/modules/agent/engine/graphs/project_qa_graph.py b/src/app/modules/agent/engine/graphs/project_qa_graph.py similarity index 100% rename from app/modules/agent/engine/graphs/project_qa_graph.py rename to src/app/modules/agent/engine/graphs/project_qa_graph.py diff --git a/app/modules/agent/engine/graphs/project_qa_step_graphs.py b/src/app/modules/agent/engine/graphs/project_qa_step_graphs.py similarity index 100% rename from app/modules/agent/engine/graphs/project_qa_step_graphs.py rename to src/app/modules/agent/engine/graphs/project_qa_step_graphs.py diff --git a/app/modules/agent/engine/graphs/state.py b/src/app/modules/agent/engine/graphs/state.py similarity index 100% rename from app/modules/agent/engine/graphs/state.py rename to src/app/modules/agent/engine/graphs/state.py diff --git a/app/modules/agent/engine/orchestrator/__init__.py b/src/app/modules/agent/engine/orchestrator/__init__.py similarity index 100% rename from app/modules/agent/engine/orchestrator/__init__.py rename to src/app/modules/agent/engine/orchestrator/__init__.py diff --git a/app/modules/agent/engine/orchestrator/actions/__init__.py b/src/app/modules/agent/engine/orchestrator/actions/__init__.py similarity index 100% rename from app/modules/agent/engine/orchestrator/actions/__init__.py rename to src/app/modules/agent/engine/orchestrator/actions/__init__.py diff --git a/app/modules/agent/engine/orchestrator/actions/code_explain_actions.py b/src/app/modules/agent/engine/orchestrator/actions/code_explain_actions.py similarity index 100% rename from app/modules/agent/engine/orchestrator/actions/code_explain_actions.py rename to src/app/modules/agent/engine/orchestrator/actions/code_explain_actions.py diff --git a/app/modules/agent/engine/orchestrator/actions/common.py b/src/app/modules/agent/engine/orchestrator/actions/common.py similarity index 100% rename from app/modules/agent/engine/orchestrator/actions/common.py rename to src/app/modules/agent/engine/orchestrator/actions/common.py diff --git a/app/modules/agent/engine/orchestrator/actions/docs_actions.py b/src/app/modules/agent/engine/orchestrator/actions/docs_actions.py similarity index 100% rename from app/modules/agent/engine/orchestrator/actions/docs_actions.py rename to src/app/modules/agent/engine/orchestrator/actions/docs_actions.py diff --git a/app/modules/agent/engine/orchestrator/actions/edit_actions.py b/src/app/modules/agent/engine/orchestrator/actions/edit_actions.py similarity index 100% rename from app/modules/agent/engine/orchestrator/actions/edit_actions.py rename to src/app/modules/agent/engine/orchestrator/actions/edit_actions.py diff --git a/app/modules/agent/engine/orchestrator/actions/explain_actions.py b/src/app/modules/agent/engine/orchestrator/actions/explain_actions.py similarity index 100% rename from app/modules/agent/engine/orchestrator/actions/explain_actions.py rename to src/app/modules/agent/engine/orchestrator/actions/explain_actions.py diff --git a/app/modules/agent/engine/orchestrator/actions/gherkin_actions.py b/src/app/modules/agent/engine/orchestrator/actions/gherkin_actions.py similarity index 100% rename from app/modules/agent/engine/orchestrator/actions/gherkin_actions.py rename to src/app/modules/agent/engine/orchestrator/actions/gherkin_actions.py diff --git a/app/modules/agent/engine/orchestrator/actions/project_qa_actions.py b/src/app/modules/agent/engine/orchestrator/actions/project_qa_actions.py similarity index 100% rename from app/modules/agent/engine/orchestrator/actions/project_qa_actions.py rename to src/app/modules/agent/engine/orchestrator/actions/project_qa_actions.py diff --git a/app/modules/agent/engine/orchestrator/actions/project_qa_analyzer.py b/src/app/modules/agent/engine/orchestrator/actions/project_qa_analyzer.py similarity index 100% rename from app/modules/agent/engine/orchestrator/actions/project_qa_analyzer.py rename to src/app/modules/agent/engine/orchestrator/actions/project_qa_analyzer.py diff --git a/app/modules/agent/engine/orchestrator/actions/project_qa_support.py b/src/app/modules/agent/engine/orchestrator/actions/project_qa_support.py similarity index 100% rename from app/modules/agent/engine/orchestrator/actions/project_qa_support.py rename to src/app/modules/agent/engine/orchestrator/actions/project_qa_support.py diff --git a/app/modules/agent/engine/orchestrator/actions/review_actions.py b/src/app/modules/agent/engine/orchestrator/actions/review_actions.py similarity index 100% rename from app/modules/agent/engine/orchestrator/actions/review_actions.py rename to src/app/modules/agent/engine/orchestrator/actions/review_actions.py diff --git a/app/modules/agent/engine/orchestrator/artifact_store.py b/src/app/modules/agent/engine/orchestrator/artifact_store.py similarity index 100% rename from app/modules/agent/engine/orchestrator/artifact_store.py rename to src/app/modules/agent/engine/orchestrator/artifact_store.py diff --git a/app/modules/agent/engine/orchestrator/evidence_store.py b/src/app/modules/agent/engine/orchestrator/evidence_store.py similarity index 100% rename from app/modules/agent/engine/orchestrator/evidence_store.py rename to src/app/modules/agent/engine/orchestrator/evidence_store.py diff --git a/app/modules/agent/engine/orchestrator/execution_context.py b/src/app/modules/agent/engine/orchestrator/execution_context.py similarity index 100% rename from app/modules/agent/engine/orchestrator/execution_context.py rename to src/app/modules/agent/engine/orchestrator/execution_context.py diff --git a/app/modules/agent/engine/orchestrator/execution_engine.py b/src/app/modules/agent/engine/orchestrator/execution_engine.py similarity index 100% rename from app/modules/agent/engine/orchestrator/execution_engine.py rename to src/app/modules/agent/engine/orchestrator/execution_engine.py diff --git a/app/modules/agent/engine/orchestrator/metrics_persister.py b/src/app/modules/agent/engine/orchestrator/metrics_persister.py similarity index 100% rename from app/modules/agent/engine/orchestrator/metrics_persister.py rename to src/app/modules/agent/engine/orchestrator/metrics_persister.py diff --git a/app/modules/agent/engine/orchestrator/models/__init__.py b/src/app/modules/agent/engine/orchestrator/models/__init__.py similarity index 100% rename from app/modules/agent/engine/orchestrator/models/__init__.py rename to src/app/modules/agent/engine/orchestrator/models/__init__.py diff --git a/app/modules/agent/engine/orchestrator/models/plan.py b/src/app/modules/agent/engine/orchestrator/models/plan.py similarity index 100% rename from app/modules/agent/engine/orchestrator/models/plan.py rename to src/app/modules/agent/engine/orchestrator/models/plan.py diff --git a/app/modules/agent/engine/orchestrator/models/result.py b/src/app/modules/agent/engine/orchestrator/models/result.py similarity index 100% rename from app/modules/agent/engine/orchestrator/models/result.py rename to src/app/modules/agent/engine/orchestrator/models/result.py diff --git a/app/modules/agent/engine/orchestrator/models/task_spec.py b/src/app/modules/agent/engine/orchestrator/models/task_spec.py similarity index 100% rename from app/modules/agent/engine/orchestrator/models/task_spec.py rename to src/app/modules/agent/engine/orchestrator/models/task_spec.py diff --git a/app/modules/agent/engine/orchestrator/plan_compiler.py b/src/app/modules/agent/engine/orchestrator/plan_compiler.py similarity index 100% rename from app/modules/agent/engine/orchestrator/plan_compiler.py rename to src/app/modules/agent/engine/orchestrator/plan_compiler.py diff --git a/app/modules/agent/engine/orchestrator/plan_validator.py b/src/app/modules/agent/engine/orchestrator/plan_validator.py similarity index 100% rename from app/modules/agent/engine/orchestrator/plan_validator.py rename to src/app/modules/agent/engine/orchestrator/plan_validator.py diff --git a/app/modules/agent/engine/orchestrator/quality_gates.py b/src/app/modules/agent/engine/orchestrator/quality_gates.py similarity index 100% rename from app/modules/agent/engine/orchestrator/quality_gates.py rename to src/app/modules/agent/engine/orchestrator/quality_gates.py diff --git a/app/modules/agent/engine/orchestrator/quality_metrics.py b/src/app/modules/agent/engine/orchestrator/quality_metrics.py similarity index 100% rename from app/modules/agent/engine/orchestrator/quality_metrics.py rename to src/app/modules/agent/engine/orchestrator/quality_metrics.py diff --git a/app/modules/agent/engine/orchestrator/result_assembler.py b/src/app/modules/agent/engine/orchestrator/result_assembler.py similarity index 100% rename from app/modules/agent/engine/orchestrator/result_assembler.py rename to src/app/modules/agent/engine/orchestrator/result_assembler.py diff --git a/app/modules/agent/engine/orchestrator/service.py b/src/app/modules/agent/engine/orchestrator/service.py similarity index 100% rename from app/modules/agent/engine/orchestrator/service.py rename to src/app/modules/agent/engine/orchestrator/service.py diff --git a/app/modules/agent/engine/orchestrator/step_registry.py b/src/app/modules/agent/engine/orchestrator/step_registry.py similarity index 100% rename from app/modules/agent/engine/orchestrator/step_registry.py rename to src/app/modules/agent/engine/orchestrator/step_registry.py diff --git a/app/modules/agent/engine/orchestrator/task_spec_builder.py b/src/app/modules/agent/engine/orchestrator/task_spec_builder.py similarity index 100% rename from app/modules/agent/engine/orchestrator/task_spec_builder.py rename to src/app/modules/agent/engine/orchestrator/task_spec_builder.py diff --git a/app/modules/agent/engine/orchestrator/template_registry.py b/src/app/modules/agent/engine/orchestrator/template_registry.py similarity index 82% rename from app/modules/agent/engine/orchestrator/template_registry.py rename to src/app/modules/agent/engine/orchestrator/template_registry.py index 3dd90d6..251ff46 100644 --- a/app/modules/agent/engine/orchestrator/template_registry.py +++ b/src/app/modules/agent/engine/orchestrator/template_registry.py @@ -45,68 +45,19 @@ class ScenarioTemplateRegistry: steps = [ self._step("collect_state", "Collect state", "collect_state", outputs=[self._out("agent_state", ArtifactType.STRUCTURED_JSON)]), self._step( - "conversation_understanding", - "Conversation understanding", - "execute_project_qa_graph", + "execute_code_qa_runtime", + "Execute CODE_QA runtime", + "execute_code_qa_runtime", executor="graph", - graph_id="project_qa/conversation_understanding", + graph_id="project_qa/code_qa_runtime", depends_on=["collect_state"], - outputs=[self._out("resolved_request", ArtifactType.STRUCTURED_JSON)], - ), - self._step( - "question_classification", - "Question classification", - "execute_project_qa_graph", - executor="graph", - graph_id="project_qa/question_classification", - depends_on=["conversation_understanding"], - outputs=[self._out("question_profile", ArtifactType.STRUCTURED_JSON)], - ), - self._step( - "context_retrieval", - "Context retrieval", - "execute_project_qa_graph", - executor="graph", - graph_id="project_qa/context_retrieval", - depends_on=["question_classification"], - outputs=[self._out("source_bundle", ArtifactType.STRUCTURED_JSON)], + outputs=[ + self._out("code_qa_result", ArtifactType.STRUCTURED_JSON), + self._out("final_answer", ArtifactType.TEXT), + ], + gates=[self._gate("non_empty_answer_or_changeset")], ), ] - analysis_depends_on = ["context_retrieval"] - if task.scenario == Scenario.EXPLAIN_PART: - steps.append( - self._step( - "code_explain_pack_step", - "Build code explain pack", - "build_code_explain_pack", - depends_on=["context_retrieval"], - outputs=[self._out("explain_pack", ArtifactType.STRUCTURED_JSON)], - ) - ) - analysis_depends_on = ["code_explain_pack_step"] - steps.extend( - [ - self._step( - "context_analysis", - "Context analysis", - "execute_project_qa_graph", - executor="graph", - graph_id="project_qa/context_analysis", - depends_on=analysis_depends_on, - outputs=[self._out("analysis_brief", ArtifactType.STRUCTURED_JSON)], - ), - self._step( - "answer_composition", - "Answer composition", - "execute_project_qa_graph", - executor="graph", - graph_id="project_qa/answer_composition", - depends_on=["context_analysis"], - outputs=[self._out("answer_brief", ArtifactType.STRUCTURED_JSON, required=False), self._out("final_answer", ArtifactType.TEXT)], - gates=[self._gate("non_empty_answer_or_changeset")], - ), - ] - ) return self._plan(task, "project_qa_reasoning_v1", steps, [self._gate("non_empty_answer_or_changeset")]) def _explain(self, task: TaskSpec) -> ExecutionPlan: diff --git a/app/modules/agent/engine/router/__init__.py b/src/app/modules/agent/engine/router/__init__.py similarity index 95% rename from app/modules/agent/engine/router/__init__.py rename to src/app/modules/agent/engine/router/__init__.py index ee2de63..141d95a 100644 --- a/app/modules/agent/engine/router/__init__.py +++ b/src/app/modules/agent/engine/router/__init__.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: def build_router_service(llm: AgentLlmService, agent_repository: "AgentRepository", rag: RagRetriever) -> "RouterService": from app.modules.agent.engine.graphs import ( BaseGraphFactory, + CodeQaGraphFactory, DocsGraphFactory, ProjectEditsGraphFactory, ProjectQaAnalysisGraphFactory, @@ -31,6 +32,7 @@ def build_router_service(llm: AgentLlmService, agent_repository: "AgentRepositor registry = IntentRegistry(registry_path=registry_path) registry.register("default", "general", BaseGraphFactory(llm).build) registry.register("project", "qa", ProjectQaGraphFactory(llm).build) + registry.register("project_qa", "code_qa_runtime", CodeQaGraphFactory(llm).build) registry.register("project", "edits", ProjectEditsGraphFactory(llm).build) registry.register("docs", "generation", DocsGraphFactory(llm).build) registry.register("project_qa", "conversation_understanding", ProjectQaConversationGraphFactory(llm).build) diff --git a/app/modules/agent/engine/router/context_store.py b/src/app/modules/agent/engine/router/context_store.py similarity index 100% rename from app/modules/agent/engine/router/context_store.py rename to src/app/modules/agent/engine/router/context_store.py diff --git a/app/modules/agent/engine/router/intent_classifier.py b/src/app/modules/agent/engine/router/intent_classifier.py similarity index 100% rename from app/modules/agent/engine/router/intent_classifier.py rename to src/app/modules/agent/engine/router/intent_classifier.py diff --git a/app/modules/agent/engine/router/intent_switch_detector.py b/src/app/modules/agent/engine/router/intent_switch_detector.py similarity index 100% rename from app/modules/agent/engine/router/intent_switch_detector.py rename to src/app/modules/agent/engine/router/intent_switch_detector.py diff --git a/app/modules/agent/engine/router/intents_registry.yaml b/src/app/modules/agent/engine/router/intents_registry.yaml similarity index 100% rename from app/modules/agent/engine/router/intents_registry.yaml rename to src/app/modules/agent/engine/router/intents_registry.yaml diff --git a/app/modules/agent/engine/router/registry.py b/src/app/modules/agent/engine/router/registry.py similarity index 100% rename from app/modules/agent/engine/router/registry.py rename to src/app/modules/agent/engine/router/registry.py diff --git a/app/modules/agent/engine/router/router_service.py b/src/app/modules/agent/engine/router/router_service.py similarity index 100% rename from app/modules/agent/engine/router/router_service.py rename to src/app/modules/agent/engine/router/router_service.py diff --git a/app/modules/agent/engine/router/schemas.py b/src/app/modules/agent/engine/router/schemas.py similarity index 100% rename from app/modules/agent/engine/router/schemas.py rename to src/app/modules/agent/engine/router/schemas.py diff --git a/app/modules/agent/llm/__init__.py b/src/app/modules/agent/llm/__init__.py similarity index 100% rename from app/modules/agent/llm/__init__.py rename to src/app/modules/agent/llm/__init__.py diff --git a/app/modules/agent/llm/service.py b/src/app/modules/agent/llm/service.py similarity index 100% rename from app/modules/agent/llm/service.py rename to src/app/modules/agent/llm/service.py diff --git a/app/modules/agent/module.py b/src/app/modules/agent/module.py similarity index 100% rename from app/modules/agent/module.py rename to src/app/modules/agent/module.py diff --git a/app/modules/agent/prompt_loader.py b/src/app/modules/agent/prompt_loader.py similarity index 100% rename from app/modules/agent/prompt_loader.py rename to src/app/modules/agent/prompt_loader.py diff --git a/app/modules/agent/prompts/code_explain_answer_v2.txt b/src/app/modules/agent/prompts/code_explain_answer_v2.txt similarity index 100% rename from app/modules/agent/prompts/code_explain_answer_v2.txt rename to src/app/modules/agent/prompts/code_explain_answer_v2.txt diff --git a/src/app/modules/agent/prompts/code_qa_architecture_answer.txt b/src/app/modules/agent/prompts/code_qa_architecture_answer.txt new file mode 100644 index 0000000..d12911c --- /dev/null +++ b/src/app/modules/agent/prompts/code_qa_architecture_answer.txt @@ -0,0 +1,25 @@ +Ты инженер, который объясняет устройство подсистемы только по наблюдаемым компонентам и связям из кода. + +Отвечай только по коду и структуре проекта, которые есть в контексте. +Пиши естественным инженерным языком, без искусственных markdown-секций и без повторов одной и той же мысли. +Если ответ можно дать в 1-3 фразах, не раздувай его. +Упоминай файлы, классы, функции, методы и связи только если они реально присутствуют в извлечённых данных. +Каждое содержательное утверждение по возможности привязывай к конкретному наблюдаемому имени или факту из контекста: пути файла, имени класса, функции, метода, аргумента, поля, route path, вызова или связи. +Если конкретные имена, параметры, вызовы или связи не видны, прямо скажи, чего именно не видно, вместо общих формулировок. +Не вводи новые сущности, зависимости или сценарии, которых нет в контексте. +Явно различай подтверждённые факты и осторожные выводы по косвенным признакам. +Если данных мало, честно скажи об этом вместо общего обзора. +Не используй жирные заголовки блоков, если пользователь их не просил. +Строго соблюдай контракт sub-intent и не подменяй локальный ответ архитектурным обзором. +Избегай расплывчатых и пустых формулировок вроде: "различные аргументы", "ряд аргументов", "различные подпакеты", "основные службы", "ключевой компонент", "играет роль", "представляет собой", если после них нет конкретики. +Не добавляй очевидные метафразы о том, что ответ основан на контексте или на видимом фрагменте, если это ничего не добавляет по сути. +Если сущность не найдена, остановись на факте not_found и не объясняй её предполагаемое назначение по одному только названию. +Не выводи пустые разделы, пустые списки и формулировки вида "кандидатов нет", если это не помогает ответу. + +Дай архитектурное объяснение без лишней теории. +Назови подтверждённые компоненты и конкретные связи между ними: создаёт, вызывает, регистрирует, читает, пишет, передаёт, оборачивает. +Затем коротко опиши границы ответственности, только если они реально видны в коде. +Не используй synthetic role labels как готовый пользовательский вывод, если они не поддержаны кодом. +Не придумывай скрытые слои и не расширяй архитектуру за пределы извлечённого контекста. +Не используй обязательные markdown-секции. +Не используй абстрактные формулы вроде "главный компонент", "центральный управляющий компонент", "управляет потоками данных и состоянием системы", если конкретная связь не раскрыта через наблюдаемые методы, поля или вызовы. diff --git a/src/app/modules/agent/prompts/code_qa_degraded_answer.txt b/src/app/modules/agent/prompts/code_qa_degraded_answer.txt new file mode 100644 index 0000000..0095ed9 --- /dev/null +++ b/src/app/modules/agent/prompts/code_qa_degraded_answer.txt @@ -0,0 +1,3 @@ +Ты формируешь осторожный деградированный ответ. +Нужно честно описать, что удалось подтвердить, а чего не хватает. +Не выдавай предположения за факты и не заполняй пробелы догадками. diff --git a/src/app/modules/agent/prompts/code_qa_explain_answer.txt b/src/app/modules/agent/prompts/code_qa_explain_answer.txt new file mode 100644 index 0000000..187c63d --- /dev/null +++ b/src/app/modules/agent/prompts/code_qa_explain_answer.txt @@ -0,0 +1,26 @@ +Ты senior Python-инженер и code reviewer, который объясняет устройство кода без домысливания. + +Отвечай только по коду и структуре проекта, которые есть в контексте. +Пиши естественным инженерным языком, без искусственных markdown-секций и без повторов одной и той же мысли. +Если ответ можно дать в 1-3 фразах, не раздувай его. +Упоминай файлы, классы, функции, методы и связи только если они реально присутствуют в извлечённых данных. +Каждое содержательное утверждение по возможности привязывай к конкретному наблюдаемому имени или факту из контекста: пути файла, имени класса, функции, метода, аргумента, поля, route path, вызова или связи. +Если конкретные имена, параметры, вызовы или связи не видны, прямо скажи, чего именно не видно, вместо общих формулировок. +Не вводи новые сущности, зависимости или сценарии, которых нет в контексте. +Явно различай подтверждённые факты и осторожные выводы по косвенным признакам. +Если данных мало, честно скажи об этом вместо общего обзора. +Не используй жирные заголовки блоков, если пользователь их не просил. +Строго соблюдай контракт sub-intent и не подменяй локальный ответ архитектурным обзором. +Избегай расплывчатых и пустых формулировок вроде: "различные аргументы", "ряд аргументов", "различные подпакеты", "основные службы", "ключевой компонент", "играет роль", "представляет собой", если после них нет конкретики. +Не добавляй очевидные метафразы о том, что ответ основан на контексте или на видимом фрагменте, если это ничего не добавляет по сути. +Если сущность не найдена, остановись на факте not_found и не объясняй её предполагаемое назначение по одному только названию. +Не выводи пустые разделы, пустые списки и формулировки вида "кандидатов нет", если это не помогает ответу. + +Объясни, как работает сущность из вопроса пользователя, обычным инженерным текстом. +Начни с самого важного: что это за сущность и где она находится, если это видно. +Затем кратко опиши подтверждённые зависимости, вызовы, аргументы, поля или шаги работы, только если они реально видны. +Не используй общие формулы без конкретных имён. +Если виден конструктор, метод или вызов, лучше назвать его явно, чем писать абстрактно про "инициализацию", "службы", "аргументы" или "компоненты". +Если вывод основан на косвенных признаках, явно пометь это как осторожный вывод. +Если сущность не найдена или evidence слабый, не пиши обычное объяснение — прямо скажи об этом и остановись. +Не используй обязательные секции и подзаголовки. diff --git a/src/app/modules/agent/prompts/code_qa_explain_local_answer.txt b/src/app/modules/agent/prompts/code_qa_explain_local_answer.txt new file mode 100644 index 0000000..500594c --- /dev/null +++ b/src/app/modules/agent/prompts/code_qa_explain_local_answer.txt @@ -0,0 +1,23 @@ +Ты инженер, который объясняет локальный фрагмент кода без лишней теории и без перехода на уровень всей архитектуры. + +Отвечай только по коду и структуре проекта, которые есть в контексте. +Пиши естественным инженерным языком, без искусственных markdown-секций и без повторов одной и той же мысли. +Если ответ можно дать в 1-3 фразах, не раздувай его. +Упоминай файлы, классы, функции, методы и связи только если они реально присутствуют в извлечённых данных. +Каждое содержательное утверждение по возможности привязывай к конкретному наблюдаемому имени или факту из контекста: пути файла, имени класса, функции, метода, аргумента, поля, route path, вызова или связи. +Если конкретные имена, параметры, вызовы или связи не видны, прямо скажи, чего именно не видно, вместо общих формулировок. +Не вводи новые сущности, зависимости или сценарии, которых нет в контексте. +Явно различай подтверждённые факты и осторожные выводы по косвенным признакам. +Если данных мало, честно скажи об этом вместо общего обзора. +Не используй жирные заголовки блоков, если пользователь их не просил. +Строго соблюдай контракт sub-intent и не подменяй локальный ответ архитектурным обзором. +Избегай расплывчатых и пустых формулировок вроде: "различные аргументы", "ряд аргументов", "различные подпакеты", "основные службы", "ключевой компонент", "играет роль", "представляет собой", если после них нет конкретики. +Не добавляй очевидные метафразы о том, что ответ основан на контексте или на видимом фрагменте, если это ничего не добавляет по сути. +Если сущность не найдена, остановись на факте not_found и не объясняй её предполагаемое назначение по одному только названию. +Не выводи пустые разделы, пустые списки и формулировки вида "кандидатов нет", если это не помогает ответу. + +Дай локальное объяснение по конкретному файлу, символу или короткому участку кода. +Сконцентрируйся на том, что делает этот участок, какие входы и выходы видны и какие ближайшие вызовы или зависимости заметны рядом. +Если виден только фрагмент, ограничь вывод тем, что прямо видно в этом фрагменте. +Не компенсируй нехватку локального контекста общими архитектурными фразами. +Не расписывай всю архитектуру проекта и не используй секции без необходимости. diff --git a/src/app/modules/agent/prompts/code_qa_find_entrypoints_answer.txt b/src/app/modules/agent/prompts/code_qa_find_entrypoints_answer.txt new file mode 100644 index 0000000..1a2be57 --- /dev/null +++ b/src/app/modules/agent/prompts/code_qa_find_entrypoints_answer.txt @@ -0,0 +1,27 @@ +Ты инженер, который находит подтверждённые точки входа и отдельно помечает только возможные кандидаты. + +Отвечай только по коду и структуре проекта, которые есть в контексте. +Пиши естественным инженерным языком, без искусственных markdown-секций и без повторов одной и той же мысли. +Если ответ можно дать в 1-3 фразах, не раздувай его. +Упоминай файлы, классы, функции, методы и связи только если они реально присутствуют в извлечённых данных. +Каждое содержательное утверждение по возможности привязывай к конкретному наблюдаемому имени или факту из контекста: пути файла, имени класса, функции, метода, аргумента, поля, route path, вызова или связи. +Если конкретные имена, параметры, вызовы или связи не видны, прямо скажи, чего именно не видно, вместо общих формулировок. +Не вводи новые сущности, зависимости или сценарии, которых нет в контексте. +Явно различай подтверждённые факты и осторожные выводы по косвенным признакам. +Если данных мало, честно скажи об этом вместо общего обзора. +Не используй жирные заголовки блоков, если пользователь их не просил. +Строго соблюдай контракт sub-intent и не подменяй локальный ответ архитектурным обзором. +Избегай расплывчатых и пустых формулировок вроде: "различные аргументы", "ряд аргументов", "различные подпакеты", "основные службы", "ключевой компонент", "играет роль", "представляет собой", если после них нет конкретики. +Не добавляй очевидные метафразы о том, что ответ основан на контексте или на видимом фрагменте, если это ничего не добавляет по сути. +Если сущность не найдена, остановись на факте not_found и не объясняй её предполагаемое назначение по одному только названию. +Не выводи пустые разделы, пустые списки и формулировки вида "кандидатов нет", если это не помогает ответу. + +Найди точки входа, обработчики запуска или важные entrypoints. +Для подтверждённых HTTP route сначала называй их в прикладном виде: HTTP method и route path, например `GET /health`. +Затем коротко добавляй, где route объявлен и какой handler, функция, метод или контекст его обслуживает, если это видно. +Подтверждённые entrypoints перечисляй первыми. +Кандидатов без явного route marker упоминай только если они действительно полезны, и явно помечай как кандидатов. +Не своди ответ к обсуждению декораторов вроде `@app.get`; пользователю важнее method, path и контекст. +Не используй искусственные секции, если ответ можно дать компактным списком или коротким абзацем. +Если кандидатов нет, не создавай отдельную строку или блок про их отсутствие. +Не заменяй `GET /health` абстрактной формулой вроде "route для health-check"; сначала всегда пиши method и path. diff --git a/src/app/modules/agent/prompts/code_qa_find_tests_answer.txt b/src/app/modules/agent/prompts/code_qa_find_tests_answer.txt new file mode 100644 index 0000000..9b467a2 --- /dev/null +++ b/src/app/modules/agent/prompts/code_qa_find_tests_answer.txt @@ -0,0 +1,24 @@ +Ты инженер, который ищет тестовое покрытие и различает прямые и косвенные тесты. + +Отвечай только по коду и структуре проекта, которые есть в контексте. +Пиши естественным инженерным языком, без искусственных markdown-секций и без повторов одной и той же мысли. +Если ответ можно дать в 1-3 фразах, не раздувай его. +Упоминай файлы, классы, функции, методы и связи только если они реально присутствуют в извлечённых данных. +Каждое содержательное утверждение по возможности привязывай к конкретному наблюдаемому имени или факту из контекста: пути файла, имени класса, функции, метода, аргумента, поля, route path, вызова или связи. +Если конкретные имена, параметры, вызовы или связи не видны, прямо скажи, чего именно не видно, вместо общих формулировок. +Не вводи новые сущности, зависимости или сценарии, которых нет в контексте. +Явно различай подтверждённые факты и осторожные выводы по косвенным признакам. +Если данных мало, честно скажи об этом вместо общего обзора. +Не используй жирные заголовки блоков, если пользователь их не просил. +Строго соблюдай контракт sub-intent и не подменяй локальный ответ архитектурным обзором. +Избегай расплывчатых и пустых формулировок вроде: "различные аргументы", "ряд аргументов", "различные подпакеты", "основные службы", "ключевой компонент", "играет роль", "представляет собой", если после них нет конкретики. +Не добавляй очевидные метафразы о том, что ответ основан на контексте или на видимом фрагменте, если это ничего не добавляет по сути. +Если сущность не найдена, остановись на факте not_found и не объясняй её предполагаемое назначение по одному только названию. +Не выводи пустые разделы, пустые списки и формулировки вида "кандидатов нет", если это не помогает ответу. + +Найди связанные тесты и ответь, где они расположены. +Сначала назови прямые тесты, только если связь с сущностью подтверждается именем, импортом, вызовом или проверяемым поведением. +Если прямых тестов нет, прямо скажи это и только потом упомяни ближайшие косвенные тесты, если они есть. +Коротко поясни, что именно проверяется. +Не выдавай косвенные совпадения за подтверждённое покрытие и не используй отчётные секции без нужды. +Если косвенных тестов тоже нет, не добавляй отдельный пустой блок про их отсутствие. diff --git a/src/app/modules/agent/prompts/code_qa_general_answer.txt b/src/app/modules/agent/prompts/code_qa_general_answer.txt new file mode 100644 index 0000000..6984c44 --- /dev/null +++ b/src/app/modules/agent/prompts/code_qa_general_answer.txt @@ -0,0 +1,24 @@ +Ты senior Python-инженер, который даёт обзорный ответ по подсистеме или проекту, но остаётся строго привязанным к коду из контекста. + +Отвечай только по коду и структуре проекта, которые есть в контексте. +Пиши естественным инженерным языком, без искусственных markdown-секций и без повторов одной и той же мысли. +Если ответ можно дать в 1-3 фразах, не раздувай его. +Упоминай файлы, классы, функции, методы и связи только если они реально присутствуют в извлечённых данных. +Каждое содержательное утверждение по возможности привязывай к конкретному наблюдаемому имени или факту из контекста: пути файла, имени класса, функции, метода, аргумента, поля, route path, вызова или связи. +Если конкретные имена, параметры, вызовы или связи не видны, прямо скажи, чего именно не видно, вместо общих формулировок. +Не вводи новые сущности, зависимости или сценарии, которых нет в контексте. +Явно различай подтверждённые факты и осторожные выводы по косвенным признакам. +Если данных мало, честно скажи об этом вместо общего обзора. +Не используй жирные заголовки блоков, если пользователь их не просил. +Строго соблюдай контракт sub-intent и не подменяй локальный ответ архитектурным обзором. +Избегай расплывчатых и пустых формулировок вроде: "различные аргументы", "ряд аргументов", "различные подпакеты", "основные службы", "ключевой компонент", "играет роль", "представляет собой", если после них нет конкретики. +Не добавляй очевидные метафразы о том, что ответ основан на контексте или на видимом фрагменте, если это ничего не добавляет по сути. +Если сущность не найдена, остановись на факте not_found и не объясняй её предполагаемое назначение по одному только названию. +Не выводи пустые разделы, пустые списки и формулировки вида "кандидатов нет", если это не помогает ответу. + +Дай обзорный ответ по вопросу пользователя о коде, подсистеме или сценарии работы. +Сначала скажи, что можно уверенно подтвердить по коду, затем коротко укажи, какие файлы, классы, функции или route это подтверждают. +Если данных недостаточно, прямо скажи, чего именно не хватает. +Не подменяй обзор общими рассуждениями о типичной архитектуре таких систем. +Не используй секции без необходимости. +Не заполняй пробелы общими словами вроде "несколько модулей", "различные компоненты" или "ряд зависимостей", если конкретные имена не видны. diff --git a/src/app/modules/agent/prompts/code_qa_open_file_answer.txt b/src/app/modules/agent/prompts/code_qa_open_file_answer.txt new file mode 100644 index 0000000..d9f86c6 --- /dev/null +++ b/src/app/modules/agent/prompts/code_qa_open_file_answer.txt @@ -0,0 +1,26 @@ +Ты технический ассистент, который помогает открыть конкретный файл и показать, что в нём реально видно. + +Отвечай только по коду и структуре проекта, которые есть в контексте. +Пиши естественным инженерным языком, без искусственных markdown-секций и без повторов одной и той же мысли. +Если ответ можно дать в 1-3 фразах, не раздувай его. +Упоминай файлы, классы, функции, методы и связи только если они реально присутствуют в извлечённых данных. +Каждое содержательное утверждение по возможности привязывай к конкретному наблюдаемому имени или факту из контекста: пути файла, имени класса, функции, метода, аргумента, поля, route path, вызова или связи. +Если конкретные имена, параметры, вызовы или связи не видны, прямо скажи, чего именно не видно, вместо общих формулировок. +Не вводи новые сущности, зависимости или сценарии, которых нет в контексте. +Явно различай подтверждённые факты и осторожные выводы по косвенным признакам. +Если данных мало, честно скажи об этом вместо общего обзора. +Не используй жирные заголовки блоков, если пользователь их не просил. +Строго соблюдай контракт sub-intent и не подменяй локальный ответ архитектурным обзором. +Избегай расплывчатых и пустых формулировок вроде: "различные аргументы", "ряд аргументов", "различные подпакеты", "основные службы", "ключевой компонент", "играет роль", "представляет собой", если после них нет конкретики. +Не добавляй очевидные метафразы о том, что ответ основан на контексте или на видимом фрагменте, если это ничего не добавляет по сути. +Если сущность не найдена, остановись на факте not_found и не объясняй её предполагаемое назначение по одному только названию. +Не выводи пустые разделы, пустые списки и формулировки вида "кандидатов нет", если это не помогает ответу. + +Сосредоточься на указанном файле и отвечай коротко. +Обычно достаточно назвать путь файла и в 1-3 фразах сказать, какие конкретные сущности или элементы видны: класс, функция, метод, импорт, route, константа. +Не используй общие описания файла без конкретных имён. +Если в контексте виден только фрагмент файла, не добавляй общую фразу про то, что ответ основан на видимом фрагменте. Вместо этого просто ограничься тем, что реально видно. +Не превращай ответ в архитектурный обзор проекта. +Не используй секции и подзаголовки. +Если файла нет, ответь одной короткой фразой: `Файл не найден.` +Не придумывай анализ отсутствующего файла. diff --git a/src/app/modules/agent/prompts/code_qa_repair_answer.txt b/src/app/modules/agent/prompts/code_qa_repair_answer.txt new file mode 100644 index 0000000..437b50d --- /dev/null +++ b/src/app/modules/agent/prompts/code_qa_repair_answer.txt @@ -0,0 +1,3 @@ +Ты исправляешь черновой ответ по коду после проверки groundedness. +Сделай ответ короче, точнее и строже по evidence payload. +Если проверка требует not_found или degraded формулировку, отрази это явно и убери спекуляции. diff --git a/src/app/modules/agent/prompts/code_qa_trace_flow_answer.txt b/src/app/modules/agent/prompts/code_qa_trace_flow_answer.txt new file mode 100644 index 0000000..91be153 --- /dev/null +++ b/src/app/modules/agent/prompts/code_qa_trace_flow_answer.txt @@ -0,0 +1,23 @@ +Ты инженер, который восстанавливает поток вызовов и движение данных только по доказуемой цепочке из контекста. + +Отвечай только по коду и структуре проекта, которые есть в контексте. +Пиши естественным инженерным языком, без искусственных markdown-секций и без повторов одной и той же мысли. +Если ответ можно дать в 1-3 фразах, не раздувай его. +Упоминай файлы, классы, функции, методы и связи только если они реально присутствуют в извлечённых данных. +Каждое содержательное утверждение по возможности привязывай к конкретному наблюдаемому имени или факту из контекста: пути файла, имени класса, функции, метода, аргумента, поля, route path, вызова или связи. +Если конкретные имена, параметры, вызовы или связи не видны, прямо скажи, чего именно не видно, вместо общих формулировок. +Не вводи новые сущности, зависимости или сценарии, которых нет в контексте. +Явно различай подтверждённые факты и осторожные выводы по косвенным признакам. +Если данных мало, честно скажи об этом вместо общего обзора. +Не используй жирные заголовки блоков, если пользователь их не просил. +Строго соблюдай контракт sub-intent и не подменяй локальный ответ архитектурным обзором. +Избегай расплывчатых и пустых формулировок вроде: "различные аргументы", "ряд аргументов", "различные подпакеты", "основные службы", "ключевой компонент", "играет роль", "представляет собой", если после них нет конкретики. +Не добавляй очевидные метафразы о том, что ответ основан на контексте или на видимом фрагменте, если это ничего не добавляет по сути. +Если сущность не найдена, остановись на факте not_found и не объясняй её предполагаемое назначение по одному только названию. +Не выводи пустые разделы, пустые списки и формулировки вида "кандидатов нет", если это не помогает ответу. + +Проследи поток выполнения или поток данных по найденным артефактам. +Старайся описывать шаги последовательно и коротко, без лишних подзаголовков. +Не склеивай шаги, если между ними нет прямой связи в коде или явно подтверждённого отношения в извлечённых данных. +Если поток восстанавливается только частично, так и скажи. +Не заменяй конкретные шаги общими словами вроде "обрабатывает запрос", "передаёт данные" или "инициализирует службы", если можно назвать конкретный вызов, метод или route. diff --git a/app/modules/agent/prompts/docs_detect.txt b/src/app/modules/agent/prompts/docs_detect.txt similarity index 100% rename from app/modules/agent/prompts/docs_detect.txt rename to src/app/modules/agent/prompts/docs_detect.txt diff --git a/app/modules/agent/prompts/docs_examples/from_scratch_example.md b/src/app/modules/agent/prompts/docs_examples/from_scratch_example.md similarity index 100% rename from app/modules/agent/prompts/docs_examples/from_scratch_example.md rename to src/app/modules/agent/prompts/docs_examples/from_scratch_example.md diff --git a/app/modules/agent/prompts/docs_examples/incremental_update_example.md b/src/app/modules/agent/prompts/docs_examples/incremental_update_example.md similarity index 100% rename from app/modules/agent/prompts/docs_examples/incremental_update_example.md rename to src/app/modules/agent/prompts/docs_examples/incremental_update_example.md diff --git a/app/modules/agent/prompts/docs_execution_summary.txt b/src/app/modules/agent/prompts/docs_execution_summary.txt similarity index 100% rename from app/modules/agent/prompts/docs_execution_summary.txt rename to src/app/modules/agent/prompts/docs_execution_summary.txt diff --git a/app/modules/agent/prompts/docs_generation.txt b/src/app/modules/agent/prompts/docs_generation.txt similarity index 100% rename from app/modules/agent/prompts/docs_generation.txt rename to src/app/modules/agent/prompts/docs_generation.txt diff --git a/app/modules/agent/prompts/docs_plan_sections.txt b/src/app/modules/agent/prompts/docs_plan_sections.txt similarity index 100% rename from app/modules/agent/prompts/docs_plan_sections.txt rename to src/app/modules/agent/prompts/docs_plan_sections.txt diff --git a/app/modules/agent/prompts/docs_self_check.txt b/src/app/modules/agent/prompts/docs_self_check.txt similarity index 100% rename from app/modules/agent/prompts/docs_self_check.txt rename to src/app/modules/agent/prompts/docs_self_check.txt diff --git a/app/modules/agent/prompts/docs_strategy.txt b/src/app/modules/agent/prompts/docs_strategy.txt similarity index 100% rename from app/modules/agent/prompts/docs_strategy.txt rename to src/app/modules/agent/prompts/docs_strategy.txt diff --git a/app/modules/agent/prompts/general_answer.txt b/src/app/modules/agent/prompts/general_answer.txt similarity index 100% rename from app/modules/agent/prompts/general_answer.txt rename to src/app/modules/agent/prompts/general_answer.txt diff --git a/app/modules/agent/prompts/project_answer.txt b/src/app/modules/agent/prompts/project_answer.txt similarity index 100% rename from app/modules/agent/prompts/project_answer.txt rename to src/app/modules/agent/prompts/project_answer.txt diff --git a/app/modules/agent/prompts/project_edits_hunks.txt b/src/app/modules/agent/prompts/project_edits_hunks.txt similarity index 100% rename from app/modules/agent/prompts/project_edits_hunks.txt rename to src/app/modules/agent/prompts/project_edits_hunks.txt diff --git a/app/modules/agent/prompts/project_edits_plan.txt b/src/app/modules/agent/prompts/project_edits_plan.txt similarity index 100% rename from app/modules/agent/prompts/project_edits_plan.txt rename to src/app/modules/agent/prompts/project_edits_plan.txt diff --git a/app/modules/agent/prompts/project_edits_self_check.txt b/src/app/modules/agent/prompts/project_edits_self_check.txt similarity index 100% rename from app/modules/agent/prompts/project_edits_self_check.txt rename to src/app/modules/agent/prompts/project_edits_self_check.txt diff --git a/app/modules/agent/prompts/rag_intent_router_v2.txt b/src/app/modules/agent/prompts/rag_intent_router_v2.txt similarity index 100% rename from app/modules/agent/prompts/rag_intent_router_v2.txt rename to src/app/modules/agent/prompts/rag_intent_router_v2.txt diff --git a/app/modules/agent/prompts/router_intent.txt b/src/app/modules/agent/prompts/router_intent.txt similarity index 100% rename from app/modules/agent/prompts/router_intent.txt rename to src/app/modules/agent/prompts/router_intent.txt diff --git a/app/modules/agent/repository.py b/src/app/modules/agent/repository.py similarity index 100% rename from app/modules/agent/repository.py rename to src/app/modules/agent/repository.py diff --git a/app/modules/agent/service.py b/src/app/modules/agent/service.py similarity index 100% rename from app/modules/agent/service.py rename to src/app/modules/agent/service.py diff --git a/app/modules/agent/story_context_repository.py b/src/app/modules/agent/story_context_repository.py similarity index 100% rename from app/modules/agent/story_context_repository.py rename to src/app/modules/agent/story_context_repository.py diff --git a/app/modules/agent/story_session_recorder.py b/src/app/modules/agent/story_session_recorder.py similarity index 100% rename from app/modules/agent/story_session_recorder.py rename to src/app/modules/agent/story_session_recorder.py diff --git a/app/modules/application.py b/src/app/modules/application.py similarity index 87% rename from app/modules/application.py rename to src/app/modules/application.py index fd3819b..380bc56 100644 --- a/app/modules/application.py +++ b/src/app/modules/application.py @@ -9,8 +9,7 @@ from app.modules.chat.session_resolver import ChatSessionResolver from app.modules.chat.task_store import TaskStore from app.modules.rag.persistence.repository import RagRepository from app.modules.rag.explain import CodeExplainRetrieverV2, CodeGraphRepository, LayeredRetrievalGateway -from app.modules.rag_session.module import RagModule -from app.modules.rag_repo.module import RagRepoModule +from app.modules.rag.module import RagModule, RagRepoModule from app.modules.shared.bootstrap import bootstrap_database from app.modules.shared.event_bus import EventBus from app.modules.shared.retry_executor import RetryExecutor @@ -27,17 +26,17 @@ class ModularApplication: self.story_context_repository = StoryContextRepository() self.chat_tasks = TaskStore() - self.rag_session = RagModule(event_bus=self.events, retry=self.retry, repository=self.rag_repository) + self.rag = RagModule(event_bus=self.events, retry=self.retry, repository=self.rag_repository) self.rag_repo = RagRepoModule( story_context_repository=self.story_context_repository, rag_repository=self.rag_repository, ) self.code_explain_retriever = CodeExplainRetrieverV2( - gateway=LayeredRetrievalGateway(self.rag_repository, self.rag_session.embedder), + gateway=LayeredRetrievalGateway(self.rag_repository, self.rag.embedder), graph_repository=CodeGraphRepository(), ) self.agent = AgentModule( - rag_retriever=self.rag_session.rag, + rag_retriever=self.rag.rag, agent_repository=self.agent_repository, story_context_repository=self.story_context_repository, code_explain_retriever=self.code_explain_retriever, @@ -47,7 +46,7 @@ class ModularApplication: llm=self.agent.llm, session_resolver=ChatSessionResolver( dialogs=DialogSessionStore(self.chat_repository), - rag_session_exists=lambda rag_session_id: self.rag_session.sessions.get(rag_session_id) is not None, + rag_session_exists=lambda rag_session_id: self.rag.sessions.get(rag_session_id) is not None, ), task_store=self.chat_tasks, message_sink=self.chat_repository.add_message, @@ -56,7 +55,7 @@ class ModularApplication: agent_runner=self.agent.runtime, event_bus=self.events, retry=self.retry, - rag_sessions=self.rag_session.sessions, + rag_sessions=self.rag.sessions, repository=self.chat_repository, direct_chat=self.direct_chat, task_store=self.chat_tasks, diff --git a/app/modules/chat/README.md b/src/app/modules/chat/README.md similarity index 100% rename from app/modules/chat/README.md rename to src/app/modules/chat/README.md diff --git a/app/modules/chat/__init__.py b/src/app/modules/chat/__init__.py similarity index 100% rename from app/modules/chat/__init__.py rename to src/app/modules/chat/__init__.py diff --git a/app/modules/chat/dialog_store.py b/src/app/modules/chat/dialog_store.py similarity index 100% rename from app/modules/chat/dialog_store.py rename to src/app/modules/chat/dialog_store.py diff --git a/app/modules/chat/direct_service.py b/src/app/modules/chat/direct_service.py similarity index 100% rename from app/modules/chat/direct_service.py rename to src/app/modules/chat/direct_service.py diff --git a/app/modules/chat/evidence_gate.py b/src/app/modules/chat/evidence_gate.py similarity index 100% rename from app/modules/chat/evidence_gate.py rename to src/app/modules/chat/evidence_gate.py diff --git a/app/modules/chat/module.py b/src/app/modules/chat/module.py similarity index 98% rename from app/modules/chat/module.py rename to src/app/modules/chat/module.py index e967bb7..7188c67 100644 --- a/app/modules/chat/module.py +++ b/src/app/modules/chat/module.py @@ -26,7 +26,7 @@ from app.schemas.common import ModuleName if TYPE_CHECKING: from app.modules.chat.repository import ChatRepository from app.modules.contracts import AgentRunner - from app.modules.rag_session.session_store import RagSessionStore + from app.modules.rag.session_store import RagSessionStore class ChatModule: diff --git a/app/modules/chat/repository.py b/src/app/modules/chat/repository.py similarity index 100% rename from app/modules/chat/repository.py rename to src/app/modules/chat/repository.py diff --git a/app/modules/chat/service.py b/src/app/modules/chat/service.py similarity index 100% rename from app/modules/chat/service.py rename to src/app/modules/chat/service.py diff --git a/app/modules/chat/session_resolver.py b/src/app/modules/chat/session_resolver.py similarity index 100% rename from app/modules/chat/session_resolver.py rename to src/app/modules/chat/session_resolver.py diff --git a/app/modules/chat/task_store.py b/src/app/modules/chat/task_store.py similarity index 100% rename from app/modules/chat/task_store.py rename to src/app/modules/chat/task_store.py diff --git a/app/modules/contracts.py b/src/app/modules/contracts.py similarity index 100% rename from app/modules/contracts.py rename to src/app/modules/contracts.py diff --git a/app/modules/rag/README.md b/src/app/modules/rag/README.md similarity index 100% rename from app/modules/rag/README.md rename to src/app/modules/rag/README.md diff --git a/app/modules/rag/__init__.py b/src/app/modules/rag/__init__.py similarity index 100% rename from app/modules/rag/__init__.py rename to src/app/modules/rag/__init__.py diff --git a/src/app/modules/rag/code_qa_pipeline/__init__.py b/src/app/modules/rag/code_qa_pipeline/__init__.py new file mode 100644 index 0000000..a8a469c --- /dev/null +++ b/src/app/modules/rag/code_qa_pipeline/__init__.py @@ -0,0 +1,37 @@ +"""Canonical test-first CODE_QA pipeline: IntentRouterV2 -> retrieval -> evidence gate -> LLM -> diagnostics. + +This package is the single source of truth for the test-only pipeline. +Legacy RouterService and production runtime are unchanged. + +Entrypoint: CodeQAPipelineRunner.run(user_query, rag_session_id). +Contracts: RouterResult, RetrievalRequest, RetrievalResult, EvidenceBundle, AnswerSynthesisInput, DiagnosticsReport. +See README § 4.1.3 and tests/pipeline_setup/pipeline_intent_rag/test_canonical_code_qa_pipeline.py. +""" + +from app.modules.rag.code_qa_pipeline.contracts import ( + AnswerSynthesisInput, + CodeChunkItem, + DiagnosticsReport, + EvidenceBundle, + FailureReason, + RetrievalRequest, + RetrievalResult, + RouterResult, +) +from app.modules.rag.code_qa_pipeline.pipeline import ( + CodeQAPipelineResult, + CodeQAPipelineRunner, +) + +__all__ = [ + "AnswerSynthesisInput", + "CodeChunkItem", + "CodeQAPipelineResult", + "CodeQAPipelineRunner", + "DiagnosticsReport", + "EvidenceBundle", + "FailureReason", + "RetrievalRequest", + "RetrievalResult", + "RouterResult", +] diff --git a/src/app/modules/rag/code_qa_pipeline/answer_synthesis.py b/src/app/modules/rag/code_qa_pipeline/answer_synthesis.py new file mode 100644 index 0000000..4da24fb --- /dev/null +++ b/src/app/modules/rag/code_qa_pipeline/answer_synthesis.py @@ -0,0 +1,58 @@ +"""Builds AnswerSynthesisInput from EvidenceBundle for LLM stage.""" + +from __future__ import annotations + +from app.modules.rag.code_qa_pipeline.contracts import AnswerSynthesisInput, EvidenceBundle + + +def build_answer_synthesis_input( + user_question: str, + bundle: EvidenceBundle, +) -> AnswerSynthesisInput: + """Build LLM input from EvidenceBundle; fast context (summary) + deep context (payload).""" + scenario = bundle.resolved_sub_intent or "EXPLAIN" + target = bundle.resolved_target + sufficient = bundle.sufficient + + fast_lines = [ + f"Scenario: {scenario}", + f"Target: {target or 'none'}", + f"Evidence chunks: {bundle.evidence_count}", + f"Sufficient: {sufficient}", + ] + if bundle.failure_reasons: + fast_lines.append(f"Failure reasons: {', '.join(bundle.failure_reasons)}") + fast_context = "\n".join(fast_lines) + + deep_parts = [] + for i, c in enumerate(bundle.code_chunks[:30], 1): + deep_parts.append(f"[{i}] {c.path}:{c.start_line or '?'}-{c.end_line or '?'}\n{c.content[:800]}") + deep_context = "\n\n---\n\n".join(deep_parts) if deep_parts else "(no code chunks)" + + evidence_summary = [] + for c in bundle.code_chunks[:20]: + evidence_summary.append({ + "layer": c.layer, + "path": c.path, + "title": c.title, + "lines": f"{c.start_line or '?'}-{c.end_line or '?'}", + }) + if bundle.entrypoints: + evidence_summary.append({"kind": "entrypoints", "count": len(bundle.entrypoints)}) + if bundle.test_evidence: + evidence_summary.append({"kind": "tests", "count": len(bundle.test_evidence)}) + + hints = list(bundle.failure_reasons) if bundle.failure_reasons else [] + if not sufficient and bundle.retrieval_summary.get("missing_layers"): + hints.append(f"Missing layers: {', '.join(bundle.retrieval_summary['missing_layers'])}") + + return AnswerSynthesisInput( + user_question=user_question, + resolved_scenario=scenario, + resolved_target=target, + fast_context=fast_context, + deep_context=deep_context, + evidence_summary=evidence_summary, + evidence_sufficient=sufficient, + diagnostic_hints=hints, + ) diff --git a/src/app/modules/rag/code_qa_pipeline/contracts.py b/src/app/modules/rag/code_qa_pipeline/contracts.py new file mode 100644 index 0000000..0ffe729 --- /dev/null +++ b/src/app/modules/rag/code_qa_pipeline/contracts.py @@ -0,0 +1,169 @@ +"""Typed contracts for the canonical CODE_QA test-first pipeline. + +Defines RouterResult, RetrievalRequest, RetrievalResult, EvidenceBundle, +AnswerSynthesisInput, DiagnosticsReport and machine-readable failure reasons. +Used only by the test-first pipeline; legacy runtime is unchanged. +""" + +from __future__ import annotations + +from typing import Any, Literal + +from pydantic import BaseModel, ConfigDict, Field + +# Re-export for pipeline: router output is IntentRouterResult +from app.modules.rag.intent_router_v2.models import IntentRouterResult + +# Type alias: router output is the source of truth for the test pipeline +RouterResult = IntentRouterResult + + +# --- Machine-readable failure reasons for diagnostics --- +FailureReason = Literal[ + "router_low_confidence", + "target_not_resolved", + "path_scope_empty", + "layer_c0_empty", + "layer_c1_empty", + "layer_c2_empty", + "entrypoints_not_found", + "tests_not_found", + "insufficient_evidence", +] + +FAILURE_REASONS: tuple[FailureReason, ...] = ( + "router_low_confidence", + "target_not_resolved", + "path_scope_empty", + "layer_c0_empty", + "layer_c1_empty", + "layer_c2_empty", + "entrypoints_not_found", + "tests_not_found", + "insufficient_evidence", +) + + +class RetrievalRequest(BaseModel): + """Request for retrieval stage; built from RouterResult.""" + + model_config = ConfigDict(extra="forbid") + + rag_session_id: str + query: str + sub_intent: str = "EXPLAIN" + path_scope: list[str] = Field(default_factory=list) + keyword_hints: list[str] = Field(default_factory=list) + symbol_candidates: list[str] = Field(default_factory=list) + requested_layers: list[str] = Field(default_factory=list) + # Pass-through for existing adapter (retrieval_spec, retrieval_constraints, query_plan) + retrieval_spec: Any = None + retrieval_constraints: Any = None + query_plan: Any = None + + +class CodeChunkItem(BaseModel): + """Single code chunk in normalized retrieval output.""" + + model_config = ConfigDict(extra="forbid") + + layer: str + path: str + title: str = "" + content: str = "" + start_line: int | None = None + end_line: int | None = None + metadata: dict[str, Any] = Field(default_factory=dict) + + +class LayerOutcome(BaseModel): + """Per-layer retrieval outcome for diagnostics.""" + + model_config = ConfigDict(extra="forbid") + + layer_id: str + hit_count: int = 0 + empty: bool = True + fallback_used: bool = False + + +class RetrievalResult(BaseModel): + """Normalized retrieval result; single structure for all scenarios.""" + + model_config = ConfigDict(extra="forbid") + + target_symbol_candidates: list[str] = Field(default_factory=list) + resolved_symbol: str | None = None + symbol_resolution_status: str = "not_requested" + file_candidates: list[str] = Field(default_factory=list) + code_chunks: list[CodeChunkItem] = Field(default_factory=list) + relations: list[dict[str, Any]] = Field(default_factory=list) + entrypoints: list[dict[str, Any]] = Field(default_factory=list) + test_candidates: list[dict[str, Any]] = Field(default_factory=list) + layer_outcomes: list[LayerOutcome] = Field(default_factory=list) + missing_layers: list[str] = Field(default_factory=list) + raw_rows: list[dict[str, Any]] = Field(default_factory=list) + retrieval_report: dict[str, Any] = Field(default_factory=dict) + + +class EvidenceBundle(BaseModel): + """Canonical evidence bundle for answer synthesis; only source of truth for LLM stage.""" + + model_config = ConfigDict(extra="forbid") + + resolved_intent: str = "" + resolved_sub_intent: str = "" + resolved_target: str | None = None + target_type: Literal["symbol", "path", "file", "entrypoint", "none"] = "none" + target_symbol_candidates: list[str] = Field(default_factory=list) + file_candidates: list[str] = Field(default_factory=list) + code_chunks: list[CodeChunkItem] = Field(default_factory=list) + relations: list[dict[str, Any]] = Field(default_factory=list) + entrypoints: list[dict[str, Any]] = Field(default_factory=list) + test_evidence: list[dict[str, Any]] = Field(default_factory=list) + evidence_count: int = 0 + sufficient: bool = False + failure_reasons: list[str] = Field(default_factory=list) + retrieval_summary: dict[str, Any] = Field(default_factory=dict) + + +class AnswerSynthesisInput(BaseModel): + """Input for LLM answer synthesis; derived from EvidenceBundle.""" + + model_config = ConfigDict(extra="forbid") + + user_question: str = "" + resolved_scenario: str = "" + resolved_target: str | None = None + fast_context: str = "" + deep_context: str = "" + evidence_summary: list[dict[str, Any]] = Field(default_factory=list) + evidence_sufficient: bool = False + diagnostic_hints: list[str] = Field(default_factory=list) + + +class DiagnosticsReport(BaseModel): + """Full diagnostics for the pipeline; Level 1 summary + Level 2 detail.""" + + model_config = ConfigDict(extra="forbid") + + # Level 1 — human-readable summary + intent_correct: bool | None = None + target_found: bool = False + layers_used: list[str] = Field(default_factory=list) + retrieval_sufficient: bool = False + answer_mode: Literal["normal", "degraded", "insufficient"] = "normal" + resolved_target: str | None = None + answer_policy_branch: str = "" + decision_reason: str = "" + + # Level 2 — detailed + router_result: dict[str, Any] = Field(default_factory=dict) + retrieval_request: dict[str, Any] = Field(default_factory=dict) + per_layer_outcome: list[dict[str, Any]] = Field(default_factory=list) + empty_layers: list[str] = Field(default_factory=list) + evidence_gate_decision: dict[str, Any] = Field(default_factory=dict) + evidence_gate_input: dict[str, Any] = Field(default_factory=dict) + post_evidence_gate: dict[str, Any] = Field(default_factory=dict) + failure_reasons: list[str] = Field(default_factory=list) + timings_ms: dict[str, int] = Field(default_factory=dict) diff --git a/src/app/modules/rag/code_qa_pipeline/diagnostics.py b/src/app/modules/rag/code_qa_pipeline/diagnostics.py new file mode 100644 index 0000000..cd80f5e --- /dev/null +++ b/src/app/modules/rag/code_qa_pipeline/diagnostics.py @@ -0,0 +1,120 @@ +"""Diagnostics for the CODE_QA pipeline: Level 1 summary and Level 2 detail.""" + +from __future__ import annotations + +from typing import Any + +from app.modules.rag.code_qa_pipeline.contracts import ( + DiagnosticsReport, + EvidenceBundle, + RetrievalRequest, + RetrievalResult, + RouterResult, +) + + +def build_diagnostics_report( + *, + router_result: RouterResult, + retrieval_request: RetrievalRequest | None, + retrieval_result: RetrievalResult | None, + evidence_bundle: EvidenceBundle | None, + answer_mode: str = "normal", + timings_ms: dict[str, int] | None = None, +) -> DiagnosticsReport: + """Build full diagnostics: Level 1 summary + Level 2 detail + failure reasons.""" + timings = dict(timings_ms or {}) + req = retrieval_request + res = retrieval_result + bundle = evidence_bundle + + intent_correct = None + target_found = bool(bundle and bundle.resolved_target) + layers_used = list(req.requested_layers) if req else [] + retrieval_sufficient = bool(bundle and bundle.sufficient) + if not retrieval_sufficient and bundle: + answer_mode = "degraded" if bundle.evidence_count else "insufficient" + failure_reasons = list(bundle.failure_reasons) if bundle else [] + + router_result_dict = _router_result_to_dict(router_result) + retrieval_request_dict = _retrieval_request_to_dict(req) if req else {} + per_layer = [] + if res: + for o in res.layer_outcomes: + per_layer.append({ + "layer_id": o.layer_id, + "hit_count": o.hit_count, + "empty": o.empty, + "fallback_used": o.fallback_used, + }) + empty_layers = list(res.missing_layers) if res else [] + evidence_gate_decision = {} + if bundle is not None: + evidence_gate_decision = { + "sufficient": bundle.sufficient, + "failure_reasons": list(bundle.failure_reasons), + "evidence_count": bundle.evidence_count, + } + + return DiagnosticsReport( + intent_correct=intent_correct, + target_found=target_found, + layers_used=layers_used, + retrieval_sufficient=retrieval_sufficient, + answer_mode=answer_mode, + router_result=router_result_dict, + retrieval_request=retrieval_request_dict, + per_layer_outcome=per_layer, + empty_layers=empty_layers, + evidence_gate_decision=evidence_gate_decision, + failure_reasons=failure_reasons, + timings_ms=timings, + ) + + +def build_level1_summary(report: DiagnosticsReport) -> dict[str, Any]: + """Human-readable summary: intent, target, layers, sufficiency, answer mode.""" + return { + "intent_correct": report.intent_correct, + "target_found": report.target_found, + "layers_used": report.layers_used, + "retrieval_sufficient": report.retrieval_sufficient, + "answer_mode": report.answer_mode, + "failure_reasons": report.failure_reasons, + } + + +def build_level2_detail(report: DiagnosticsReport) -> dict[str, Any]: + """Detailed diagnostics for tuning and tests.""" + return { + "router_result": report.router_result, + "retrieval_request": report.retrieval_request, + "per_layer_outcome": report.per_layer_outcome, + "empty_layers": report.empty_layers, + "evidence_gate_decision": report.evidence_gate_decision, + "failure_reasons": report.failure_reasons, + "timings_ms": report.timings_ms, + } + + +def _router_result_to_dict(r: RouterResult) -> dict[str, Any]: + return { + "intent": r.intent, + "graph_id": r.graph_id, + "conversation_mode": r.conversation_mode, + "retrieval_profile": r.retrieval_profile, + "sub_intent": r.query_plan.sub_intent if r.query_plan else None, + "path_scope": list(getattr(r.retrieval_spec.filters, "path_scope", []) or []), + "layers": [str(q.layer_id) for q in (r.retrieval_spec.layer_queries or [])], + "symbol_resolution_status": r.symbol_resolution.status if r.symbol_resolution else None, + } + + +def _retrieval_request_to_dict(req: RetrievalRequest) -> dict[str, Any]: + return { + "rag_session_id": req.rag_session_id, + "query": req.query, + "sub_intent": req.sub_intent, + "path_scope": list(req.path_scope), + "requested_layers": list(req.requested_layers), + } diff --git a/src/app/modules/rag/code_qa_pipeline/evidence_bundle_builder.py b/src/app/modules/rag/code_qa_pipeline/evidence_bundle_builder.py new file mode 100644 index 0000000..71b87af --- /dev/null +++ b/src/app/modules/rag/code_qa_pipeline/evidence_bundle_builder.py @@ -0,0 +1,57 @@ +"""Builds EvidenceBundle from RetrievalResult and router context.""" + +from __future__ import annotations + +from app.modules.rag.code_qa_pipeline.contracts import EvidenceBundle, RetrievalResult, RouterResult + + +def build_evidence_bundle( + retrieval_result: RetrievalResult, + router_result: RouterResult, +) -> EvidenceBundle: + """Build EvidenceBundle from normalized retrieval and router result.""" + intent = router_result.intent or "CODE_QA" + sub_intent = (router_result.query_plan and router_result.query_plan.sub_intent) or "EXPLAIN" + resolved_target: str | None = None + target_type: str = "none" + + if retrieval_result.resolved_symbol: + resolved_target = retrieval_result.resolved_symbol + target_type = "symbol" + elif retrieval_result.file_candidates: + resolved_target = retrieval_result.file_candidates[0] + target_type = "file" + if retrieval_result.entrypoints and not resolved_target: + resolved_target = retrieval_result.entrypoints[0].get("title") or retrieval_result.entrypoints[0].get("path") + target_type = "entrypoint" + + summary = { + "chunk_count": len(retrieval_result.code_chunks), + "relation_count": len(retrieval_result.relations), + "entrypoint_count": len(retrieval_result.entrypoints), + "test_candidate_count": len(retrieval_result.test_candidates), + "layers_with_hits": [ + o.layer_id for o in retrieval_result.layer_outcomes if o.hit_count > 0 + ], + "missing_layers": list(retrieval_result.missing_layers), + } + + file_candidates = list(retrieval_result.file_candidates) + target_symbols = list(retrieval_result.target_symbol_candidates) + + return EvidenceBundle( + resolved_intent=intent, + resolved_sub_intent=sub_intent, + resolved_target=resolved_target, + target_type=target_type, + target_symbol_candidates=target_symbols, + file_candidates=file_candidates, + code_chunks=list(retrieval_result.code_chunks), + relations=list(retrieval_result.relations), + entrypoints=list(retrieval_result.entrypoints), + test_evidence=list(retrieval_result.test_candidates), + evidence_count=len(retrieval_result.code_chunks), + sufficient=False, + failure_reasons=[], + retrieval_summary=summary, + ) diff --git a/src/app/modules/rag/code_qa_pipeline/evidence_gate.py b/src/app/modules/rag/code_qa_pipeline/evidence_gate.py new file mode 100644 index 0000000..c737f18 --- /dev/null +++ b/src/app/modules/rag/code_qa_pipeline/evidence_gate.py @@ -0,0 +1,75 @@ +"""Shared evidence sufficiency check for the CODE_QA test pipeline.""" + +from __future__ import annotations + +from dataclasses import dataclass, field + +from app.modules.rag.code_qa_pipeline.contracts import EvidenceBundle + + +@dataclass(slots=True) +class EvidenceGateDecision: + """Result of evidence sufficiency check.""" + + passed: bool + failure_reasons: list[str] = field(default_factory=list) + degraded_message: str = "" + + +def evaluate_evidence(bundle: EvidenceBundle) -> EvidenceGateDecision: + """Check evidence sufficiency by scenario; prevent confident answer without support.""" + sub = (bundle.resolved_sub_intent or "EXPLAIN").upper() + reasons: list[str] = [] + + if sub == "OPEN_FILE": + if not bundle.resolved_target and not bundle.file_candidates: + reasons.append("path_scope_empty") + if bundle.evidence_count < 1: + reasons.append("layer_c0_empty") + elif sub == "EXPLAIN": + if bundle.target_type == "symbol" and not bundle.resolved_target: + reasons.append("target_not_resolved") + if bundle.evidence_count < 2: + reasons.append("insufficient_evidence") + if bundle.target_type == "symbol" and not bundle.relations and bundle.evidence_count < 2: + reasons.append("layer_c2_empty") + elif sub == "FIND_TESTS": + if not bundle.resolved_target and not bundle.target_symbol_candidates: + reasons.append("target_not_resolved") + if not bundle.test_evidence: + reasons.append("tests_not_found") + elif sub == "FIND_ENTRYPOINTS": + if not bundle.entrypoints: + reasons.append("entrypoints_not_found") + else: + if bundle.evidence_count < 1: + reasons.append("insufficient_evidence") + + passed = len(reasons) == 0 + if not passed: + bundle.failure_reasons = list(reasons) + bundle.sufficient = False + else: + bundle.sufficient = True + + degraded = _degraded_message(bundle, reasons) + return EvidenceGateDecision(passed=passed, failure_reasons=reasons, degraded_message=degraded) + + +def _degraded_message(bundle: EvidenceBundle, reasons: list[str]) -> str: + if not reasons: + return "" + lines = ["Insufficient evidence for a confident answer."] + if "target_not_resolved" in reasons: + lines.append("Target symbol or file could not be resolved.") + if "path_scope_empty" in reasons: + lines.append("No matching path or file found.") + if "layer_c0_empty" in reasons: + lines.append("No code chunks retrieved.") + if "tests_not_found" in reasons: + lines.append("No test candidates found.") + if "entrypoints_not_found" in reasons: + lines.append("No entrypoints found.") + if "insufficient_evidence" in reasons: + lines.append(f"Evidence count: {bundle.evidence_count} (minimum required not met).") + return " ".join(lines).strip() diff --git a/src/app/modules/rag/code_qa_pipeline/pipeline.py b/src/app/modules/rag/code_qa_pipeline/pipeline.py new file mode 100644 index 0000000..e22d96f --- /dev/null +++ b/src/app/modules/rag/code_qa_pipeline/pipeline.py @@ -0,0 +1,237 @@ +"""Canonical test-first CODE_QA pipeline: router -> retrieval -> evidence -> synthesis -> diagnostics.""" + +from __future__ import annotations + +from dataclasses import dataclass, field +from difflib import get_close_matches +from time import perf_counter +from typing import Any, Protocol + +from app.modules.rag.code_qa_pipeline.answer_synthesis import build_answer_synthesis_input +from app.modules.rag.code_qa_pipeline.contracts import ( + EvidenceBundle, + RetrievalRequest, + RetrievalResult, + RouterResult, +) +from app.modules.rag.code_qa_pipeline.diagnostics import build_diagnostics_report +from app.modules.rag.code_qa_pipeline.evidence_bundle_builder import build_evidence_bundle +from app.modules.rag.code_qa_pipeline.evidence_gate import evaluate_evidence +from app.modules.rag.code_qa_pipeline.retrieval_request_builder import build_retrieval_request +from app.modules.rag.code_qa_pipeline.retrieval_result_builder import build_retrieval_result + + +class RetrievalAdapter(Protocol): + """Protocol for retrieval in the CODE_QA pipeline; satisfied by RagDbAdapter.""" + + def retrieve_with_plan( + self, + rag_session_id: str, + query: str, + retrieval_spec: Any, + retrieval_constraints: Any = None, + *, + query_plan: Any = None, + ) -> list[dict]: ... + + def retrieve_exact_files( + self, + rag_session_id: str, + *, + repo_id: str | None = None, + paths: list[str], + layers: list[str] | None = None, + limit: int = 200, + query: str = "", + ranking_profile: str = "", + ) -> list[dict]: ... + + def hydrate_resolved_symbol_sources( + self, + rag_session_id: str, + base_query: str, + rag_rows: list[dict], + symbol_resolution: dict, + retrieval_spec: Any, + retrieval_constraints: Any = None, + ) -> list[dict]: ... + + def force_symbol_context_c0( + self, + rag_session_id: str, + *, + rag_rows: list[dict], + symbol_resolution: dict, + limit: int = 20, + ) -> list[dict]: ... + + def consume_retrieval_report(self) -> dict[str, Any] | None: ... + + +@dataclass(slots=True) +class CodeQAPipelineResult: + """Result of one run of the canonical CODE_QA pipeline.""" + + user_query: str + rag_session_id: str + router_result: RouterResult + retrieval_request: RetrievalRequest + retrieval_result: RetrievalResult + evidence_bundle: EvidenceBundle + evidence_gate_passed: bool + answer_synthesis_input: Any + diagnostics_report: Any + answer_mode: str = "normal" + degraded_message: str = "" + llm_answer: str | None = None + timings_ms: dict[str, int] = field(default_factory=dict) + + +class CodeQAPipelineRunner: + """Single entrypoint for the test-first CODE_QA pipeline; uses IntentRouterV2 only.""" + + def __init__( + self, + router: Any, + retrieval_adapter: RetrievalAdapter, + repo_context: Any = None, + ) -> None: + self._router = router + self._adapter = retrieval_adapter + self._repo_context = repo_context + + def run( + self, + user_query: str, + rag_session_id: str, + *, + conversation_state: Any = None, + run_retrieval: bool = True, + run_hydrate: bool = True, + ) -> CodeQAPipelineResult: + """Run the full pipeline: route -> retrieval -> evidence bundle -> gate -> synthesis -> diagnostics.""" + timings: dict[str, int] = {} + t0 = perf_counter() + router_result = self._router.route( + user_query, + conversation_state or _default_conversation_state(), + self._repo_context or _default_repo_context(), + ) + timings["router"] = _ms(t0) + + request = build_retrieval_request(router_result, rag_session_id) + raw_rows: list[dict] = [] + symbol_resolution = router_result.symbol_resolution.model_dump() if router_result.symbol_resolution else {} + + if run_retrieval: + t1 = perf_counter() + raw_rows = self._retrieve(router_result, request) + timings["retrieval_total"] = _ms(t1) + symbol_resolution = self._resolve_symbol(symbol_resolution, raw_rows) + timings["symbol_resolution"] = 0 + if run_hydrate and request.sub_intent == "EXPLAIN" and symbol_resolution.get("status") == "resolved": + raw_rows = self._adapter.hydrate_resolved_symbol_sources( + rag_session_id, + request.query, + raw_rows, + symbol_resolution, + request.retrieval_spec, + request.retrieval_constraints, + ) + raw_rows = self._adapter.force_symbol_context_c0( + rag_session_id, + rag_rows=raw_rows, + symbol_resolution=symbol_resolution, + limit=20, + ) + + report = self._adapter.consume_retrieval_report() or {} + retrieval_result = build_retrieval_result(raw_rows, report, symbol_resolution) + evidence_bundle = build_evidence_bundle(retrieval_result, router_result) + gate_decision = evaluate_evidence(evidence_bundle) + synthesis_input = build_answer_synthesis_input(user_query, evidence_bundle) + answer_mode = "normal" if gate_decision.passed else "degraded" + if not gate_decision.passed and evidence_bundle.evidence_count == 0: + answer_mode = "insufficient" + diagnostics_report = build_diagnostics_report( + router_result=router_result, + retrieval_request=request, + retrieval_result=retrieval_result, + evidence_bundle=evidence_bundle, + answer_mode=answer_mode, + timings_ms=timings, + ) + + return CodeQAPipelineResult( + user_query=user_query, + rag_session_id=rag_session_id, + router_result=router_result, + retrieval_request=request, + retrieval_result=retrieval_result, + evidence_bundle=evidence_bundle, + evidence_gate_passed=gate_decision.passed, + answer_synthesis_input=synthesis_input, + diagnostics_report=diagnostics_report, + answer_mode=answer_mode, + degraded_message=gate_decision.degraded_message, + timings_ms=timings, + ) + + def _retrieve(self, router_result: RouterResult, request: RetrievalRequest) -> list[dict]: + path_scope = list(request.path_scope) + spec = request.retrieval_spec + if request.sub_intent == "OPEN_FILE" and path_scope: + return self._adapter.retrieve_exact_files( + request.rag_session_id, + paths=path_scope, + layers=["C0_SOURCE_CHUNKS"], + limit=200, + query=request.query, + ranking_profile=getattr(spec, "rerank_profile", "") or "", + ) + return self._adapter.retrieve_with_plan( + request.rag_session_id, + request.query, + spec, + request.retrieval_constraints, + query_plan=request.query_plan, + ) + + def _resolve_symbol(self, initial: dict, rag_rows: list[dict]) -> dict: + status = str(initial.get("status") or "not_requested") + if status != "pending": + return initial + candidates = [str(x).strip() for x in initial.get("alternatives", []) if str(x).strip()] + c1_titles = list(dict.fromkeys( + str(row.get("title") or "").strip() + for row in rag_rows + if str(row.get("layer") or "") == "C1_SYMBOL_CATALOG" and str(row.get("title") or "").strip() + )) + if not c1_titles: + return {**initial, "status": "not_found"} + exact = next((t for t in c1_titles if t in candidates), None) + if exact: + return {"status": "resolved", "resolved_symbol": exact, "alternatives": c1_titles[:5], "confidence": 0.99} + fuzzy = [] + for c in candidates: + fuzzy.extend(get_close_matches(c, c1_titles, n=3, cutoff=0.7)) + fuzzy = list(dict.fromkeys(fuzzy)) + if len(fuzzy) == 1: + return {"status": "resolved", "resolved_symbol": fuzzy[0], "alternatives": c1_titles[:5], "confidence": 0.82} + if len(fuzzy) > 1: + return {"status": "ambiguous", "resolved_symbol": None, "alternatives": fuzzy[:5], "confidence": 0.55} + return {"status": "not_found", "resolved_symbol": None, "alternatives": c1_titles[:5], "confidence": 0.0} + + +def _ms(started: float) -> int: + return int((perf_counter() - started) * 1000) + + +def _default_conversation_state() -> Any: + from app.modules.rag.intent_router_v2 import ConversationState + return ConversationState() + + +def _default_repo_context() -> Any: + from app.modules.rag.intent_router_v2 import RepoContext + return RepoContext() diff --git a/src/app/modules/rag/code_qa_pipeline/retrieval_request_builder.py b/src/app/modules/rag/code_qa_pipeline/retrieval_request_builder.py new file mode 100644 index 0000000..b8bbdc7 --- /dev/null +++ b/src/app/modules/rag/code_qa_pipeline/retrieval_request_builder.py @@ -0,0 +1,25 @@ +"""Builds RetrievalRequest from RouterResult for the CODE_QA pipeline.""" + +from __future__ import annotations + +from app.modules.rag.code_qa_pipeline.contracts import RetrievalRequest, RouterResult + + +def build_retrieval_request(router_result: RouterResult, rag_session_id: str) -> RetrievalRequest: + """Convert router output to RetrievalRequest; router is source of truth.""" + query_plan = router_result.query_plan + spec = router_result.retrieval_spec + path_scope = list(getattr(spec.filters, "path_scope", []) or []) + layers = [str(q.layer_id) for q in (spec.layer_queries or [])] + return RetrievalRequest( + rag_session_id=rag_session_id, + query=query_plan.normalized or query_plan.raw or "", + sub_intent=query_plan.sub_intent or "EXPLAIN", + path_scope=path_scope, + keyword_hints=list(query_plan.keyword_hints or []), + symbol_candidates=list(query_plan.symbol_candidates or []), + requested_layers=layers, + retrieval_spec=spec, + retrieval_constraints=router_result.retrieval_constraints, + query_plan=query_plan, + ) diff --git a/src/app/modules/rag/code_qa_pipeline/retrieval_result_builder.py b/src/app/modules/rag/code_qa_pipeline/retrieval_result_builder.py new file mode 100644 index 0000000..75d892f --- /dev/null +++ b/src/app/modules/rag/code_qa_pipeline/retrieval_result_builder.py @@ -0,0 +1,100 @@ +"""Builds normalized RetrievalResult from raw retrieval rows and report.""" + +from __future__ import annotations + +from app.modules.rag.code_qa_pipeline.contracts import ( + CodeChunkItem, + LayerOutcome, + RetrievalResult, +) +from app.modules.rag.retrieval.test_filter import is_test_path + + +def build_retrieval_result( + raw_rows: list[dict], + retrieval_report: dict | None, + symbol_resolution: dict | None, +) -> RetrievalResult: + """Convert raw adapter rows and optional report into normalized RetrievalResult.""" + report = retrieval_report or {} + sym = symbol_resolution or {} + layers_seen: set[str] = set() + code_chunks: list[CodeChunkItem] = [] + relations: list[dict] = [] + entrypoints: list[dict] = [] + test_candidates: list[dict] = [] + file_candidates: list[str] = [] + target_symbols: list[str] = [] + + for row in raw_rows: + layer = str(row.get("layer") or "") + path = str(row.get("path") or "") + if layer: + layers_seen.add(layer) + if path and path not in file_candidates: + file_candidates.append(path) + + chunk = CodeChunkItem( + layer=layer, + path=path, + title=str(row.get("title") or ""), + content=str(row.get("content") or ""), + start_line=row.get("span_start"), + end_line=row.get("span_end"), + metadata=dict(row.get("metadata") or {}), + ) + code_chunks.append(chunk) + + if layer == "C1_SYMBOL_CATALOG": + title = str(row.get("title") or "").strip() + if title and title not in target_symbols: + target_symbols.append(title) + elif layer == "C2_DEPENDENCY_GRAPH": + relations.append({"path": path, "metadata": chunk.metadata, "content": chunk.content[:500]}) + elif layer == "C3_ENTRYPOINTS": + entrypoints.append({"path": path, "title": chunk.title, "metadata": chunk.metadata}) + elif is_test_path(path): + test_candidates.append({"path": path, "title": chunk.title, "content": chunk.content[:300]}) + + executed = list(report.get("executed_layers") or []) + missing_layers = [lid for lid in executed if lid not in layers_seen] + layer_outcomes = [ + LayerOutcome( + layer_id=layer_id, + hit_count=sum(1 for r in raw_rows if str(r.get("layer") or "") == layer_id), + empty=layer_id not in layers_seen, + fallback_used=bool( + (report.get("fallback") or {}).get("used") + and report.get("retrieval_mode_by_layer", {}).get(layer_id) + ), + ) + for layer_id in executed + ] + if not executed and raw_rows: + for layer in layers_seen: + layer_outcomes.append( + LayerOutcome( + layer_id=layer, + hit_count=sum(1 for r in raw_rows if str(r.get("layer") or "") == layer), + empty=False, + fallback_used=False, + ) + ) + + resolved = str(sym.get("resolved_symbol") or "").strip() or None + status = str(sym.get("status") or "not_requested") + + return RetrievalResult( + target_symbol_candidates=target_symbols, + resolved_symbol=resolved, + symbol_resolution_status=status, + file_candidates=file_candidates, + code_chunks=code_chunks, + relations=relations, + entrypoints=entrypoints, + test_candidates=test_candidates, + layer_outcomes=layer_outcomes, + missing_layers=missing_layers, + raw_rows=raw_rows, + retrieval_report=report, + ) diff --git a/app/modules/rag/contracts/__init__.py b/src/app/modules/rag/contracts/__init__.py similarity index 100% rename from app/modules/rag/contracts/__init__.py rename to src/app/modules/rag/contracts/__init__.py diff --git a/app/modules/rag/contracts/documents.py b/src/app/modules/rag/contracts/documents.py similarity index 100% rename from app/modules/rag/contracts/documents.py rename to src/app/modules/rag/contracts/documents.py diff --git a/app/modules/rag/contracts/enums.py b/src/app/modules/rag/contracts/enums.py similarity index 83% rename from app/modules/rag/contracts/enums.py rename to src/app/modules/rag/contracts/enums.py index 72502c6..0db1fc3 100644 --- a/app/modules/rag/contracts/enums.py +++ b/src/app/modules/rag/contracts/enums.py @@ -10,9 +10,7 @@ class RagLayer: CODE_SYMBOL_CATALOG = "C1_SYMBOL_CATALOG" CODE_DEPENDENCY_GRAPH = "C2_DEPENDENCY_GRAPH" CODE_ENTRYPOINTS = "C3_ENTRYPOINTS" - CODE_PUBLIC_API = "C4_PUBLIC_API" - CODE_BEHAVIOR_SUMMARIES = "C5_BEHAVIOR_SUMMARIES" - CODE_RUNTIME_TRACES = "C6_RUNTIME_TRACES" + CODE_SEMANTIC_ROLES = "C4_SEMANTIC_ROLES" class RetrievalMode: diff --git a/app/modules/rag/contracts/evidence.py b/src/app/modules/rag/contracts/evidence.py similarity index 100% rename from app/modules/rag/contracts/evidence.py rename to src/app/modules/rag/contracts/evidence.py diff --git a/app/modules/rag/contracts/retrieval.py b/src/app/modules/rag/contracts/retrieval.py similarity index 100% rename from app/modules/rag/contracts/retrieval.py rename to src/app/modules/rag/contracts/retrieval.py diff --git a/src/app/modules/rag/embedding/__init__.py b/src/app/modules/rag/embedding/__init__.py new file mode 100644 index 0000000..e87086d --- /dev/null +++ b/src/app/modules/rag/embedding/__init__.py @@ -0,0 +1,5 @@ +"""Эмбеддинги для RAG (GigaChat и др.).""" + +from app.modules.rag.embedding.gigachat_embedder import GigaChatEmbedder + +__all__ = ["GigaChatEmbedder"] diff --git a/app/modules/rag_session/embedding/gigachat_embedder.py b/src/app/modules/rag/embedding/gigachat_embedder.py similarity index 84% rename from app/modules/rag_session/embedding/gigachat_embedder.py rename to src/app/modules/rag/embedding/gigachat_embedder.py index ce74fe2..78b7af9 100644 --- a/app/modules/rag_session/embedding/gigachat_embedder.py +++ b/src/app/modules/rag/embedding/gigachat_embedder.py @@ -1,3 +1,5 @@ +"""Эмбеддер на базе GigaChat API.""" + from app.modules.shared.gigachat.client import GigaChatClient diff --git a/app/modules/rag/explain/__init__.py b/src/app/modules/rag/explain/__init__.py similarity index 100% rename from app/modules/rag/explain/__init__.py rename to src/app/modules/rag/explain/__init__.py diff --git a/app/modules/rag/explain/budgeter.py b/src/app/modules/rag/explain/budgeter.py similarity index 100% rename from app/modules/rag/explain/budgeter.py rename to src/app/modules/rag/explain/budgeter.py diff --git a/app/modules/rag/explain/excerpt_planner.py b/src/app/modules/rag/explain/excerpt_planner.py similarity index 100% rename from app/modules/rag/explain/excerpt_planner.py rename to src/app/modules/rag/explain/excerpt_planner.py diff --git a/app/modules/rag/explain/graph_repository.py b/src/app/modules/rag/explain/graph_repository.py similarity index 100% rename from app/modules/rag/explain/graph_repository.py rename to src/app/modules/rag/explain/graph_repository.py diff --git a/app/modules/rag/explain/intent_builder.py b/src/app/modules/rag/explain/intent_builder.py similarity index 100% rename from app/modules/rag/explain/intent_builder.py rename to src/app/modules/rag/explain/intent_builder.py diff --git a/app/modules/rag/explain/layered_gateway.py b/src/app/modules/rag/explain/layered_gateway.py similarity index 99% rename from app/modules/rag/explain/layered_gateway.py rename to src/app/modules/rag/explain/layered_gateway.py index fb104eb..894ef05 100644 --- a/app/modules/rag/explain/layered_gateway.py +++ b/src/app/modules/rag/explain/layered_gateway.py @@ -11,7 +11,7 @@ LOGGER = logging.getLogger(__name__) if TYPE_CHECKING: from app.modules.rag.persistence.repository import RagRepository - from app.modules.rag_session.embedding.gigachat_embedder import GigaChatEmbedder + from app.modules.rag.embedding.gigachat_embedder import GigaChatEmbedder @dataclass(slots=True) diff --git a/app/modules/rag/explain/models.py b/src/app/modules/rag/explain/models.py similarity index 100% rename from app/modules/rag/explain/models.py rename to src/app/modules/rag/explain/models.py diff --git a/app/modules/rag/explain/retriever_v2.py b/src/app/modules/rag/explain/retriever_v2.py similarity index 100% rename from app/modules/rag/explain/retriever_v2.py rename to src/app/modules/rag/explain/retriever_v2.py diff --git a/app/modules/rag/explain/source_excerpt_fetcher.py b/src/app/modules/rag/explain/source_excerpt_fetcher.py similarity index 100% rename from app/modules/rag/explain/source_excerpt_fetcher.py rename to src/app/modules/rag/explain/source_excerpt_fetcher.py diff --git a/app/modules/rag/explain/trace_builder.py b/src/app/modules/rag/explain/trace_builder.py similarity index 98% rename from app/modules/rag/explain/trace_builder.py rename to src/app/modules/rag/explain/trace_builder.py index 791c160..9bd0a5f 100644 --- a/app/modules/rag/explain/trace_builder.py +++ b/src/app/modules/rag/explain/trace_builder.py @@ -21,7 +21,7 @@ class TraceBuilder: max_paths: int = 3, edge_types: list[str] | None = None, ) -> list[TracePath]: - edges_filter = edge_types or ["calls", "imports", "inherits"] + edges_filter = edge_types or ["calls", "imports", "inherits", "instantiates", "reads_attr", "writes_attr"] symbol_map = self._symbol_map(seed_symbols) paths: list[TracePath] = [] for seed in seed_symbols: diff --git a/app/modules/rag/indexing/code/code_text/chunker.py b/src/app/modules/rag/indexing/code/code_text/chunker.py similarity index 100% rename from app/modules/rag/indexing/code/code_text/chunker.py rename to src/app/modules/rag/indexing/code/code_text/chunker.py diff --git a/app/modules/rag/indexing/code/code_text/document_builder.py b/src/app/modules/rag/indexing/code/code_text/document_builder.py similarity index 95% rename from app/modules/rag/indexing/code/code_text/document_builder.py rename to src/app/modules/rag/indexing/code/code_text/document_builder.py index aa489e9..6d053ee 100644 --- a/app/modules/rag/indexing/code/code_text/document_builder.py +++ b/src/app/modules/rag/indexing/code/code_text/document_builder.py @@ -19,6 +19,5 @@ class CodeTextDocumentBuilder: "chunk_type": chunk.chunk_type, "module_or_unit": source.path.replace("/", ".").removesuffix(".py"), "is_test": is_test_path(source.path), - "artifact_type": "CODE", }, ) diff --git a/src/app/modules/rag/indexing/code/edges/dataflow_document_builder.py b/src/app/modules/rag/indexing/code/edges/dataflow_document_builder.py new file mode 100644 index 0000000..fa6a943 --- /dev/null +++ b/src/app/modules/rag/indexing/code/edges/dataflow_document_builder.py @@ -0,0 +1,43 @@ +from __future__ import annotations + +from app.modules.rag.contracts import EvidenceLink, EvidenceType, RagDocument, RagLayer, RagSource, RagSpan +from app.modules.rag.indexing.code.edges.dataflow_slice_builder import DataflowSlice +from app.modules.rag.retrieval.test_filter import is_test_path + + +class DataflowDocumentBuilder: + def build(self, source: RagSource, item: DataflowSlice) -> RagDocument: + text = "\n -> ".join(item.path_symbols) + return RagDocument( + layer=RagLayer.CODE_DEPENDENCY_GRAPH, + lang="python", + source=source, + title=f"{item.path_symbols[0]}:dataflow_slice", + text=text, + span=RagSpan(item.start_line, item.end_line), + metadata={ + "edge_id": item.slice_id, + "edge_type": "dataflow_slice", + "src_symbol_id": item.root_symbol_id, + "src_qname": item.path_symbols[0], + "dst_symbol_id": item.path_symbol_ids[-1] if item.path_symbol_ids else None, + "dst_ref": item.path_symbols[-1], + "resolution": "resolved" if len(item.path_symbol_ids) >= 2 else "partial", + "slice_id": item.slice_id, + "root_symbol_id": item.root_symbol_id, + "path_symbols": item.path_symbols, + "path_symbol_ids": item.path_symbol_ids, + "path_edge_types": item.path_edge_types, + "path_length": item.path_length, + "is_test": is_test_path(source.path), + }, + links=[ + EvidenceLink( + type=EvidenceType.EDGE, + target_id=item.slice_id, + path=source.path, + start_line=item.start_line, + end_line=item.end_line, + ) + ], + ) diff --git a/src/app/modules/rag/indexing/code/edges/dataflow_slice_builder.py b/src/app/modules/rag/indexing/code/edges/dataflow_slice_builder.py new file mode 100644 index 0000000..fa8dfa6 --- /dev/null +++ b/src/app/modules/rag/indexing/code/edges/dataflow_slice_builder.py @@ -0,0 +1,213 @@ +from __future__ import annotations + +from dataclasses import dataclass +from hashlib import sha256 + +from app.modules.rag.indexing.code.edges.extractor import PyEdge +from app.modules.rag.indexing.code.symbols.extractor import PySymbol + +_IGNORE_PREFIXES = ("logger", "logging", "print", "stdlib", "typing", "dataclasses") + + +@dataclass(slots=True) +class DataflowSlice: + slice_id: str + path: str + root_symbol_id: str + path_symbols: list[str] + path_symbol_ids: list[str] + path_edge_types: list[str] + path_length: int + start_line: int + end_line: int + + +class DataflowSliceBuilder: + def __init__( + self, + *, + max_path_length: int = 6, + max_slices_per_attribute: int = 10, + max_instantiation_prefixes: int = 2, + ) -> None: + self._max_path_length = max_path_length + self._max_slices_per_attribute = max_slices_per_attribute + self._max_instantiation_prefixes = max_instantiation_prefixes + + def build(self, path: str, edges: list[PyEdge], symbols: list[PySymbol]) -> list[DataflowSlice]: + if not edges: + return [] + symbol_ids_by_qname = {symbol.qname: symbol.symbol_id for symbol in symbols} + writers = _group_by_attribute(edges, edge_type="writes_attr") + readers = _group_by_attribute(edges, edge_type="reads_attr") + instantiations = [edge for edge in edges if edge.edge_type == "instantiates"] + slices: list[DataflowSlice] = [] + seen: set[tuple[tuple[str, ...], tuple[str, ...]]] = set() + for attribute_key, writer_edges in writers.items(): + reader_edges = readers.get(attribute_key, []) + if not reader_edges: + continue + canonical_attr = _canonical_attribute_ref(writer_edges + reader_edges, attribute_key) + if _should_ignore(canonical_attr): + continue + produced = 0 + for writer in writer_edges: + if produced >= self._max_slices_per_attribute: + break + for reader in reader_edges: + if produced >= self._max_slices_per_attribute: + break + prefixes = _instantiation_prefixes( + instantiations=instantiations, + writer=writer, + attribute_ref=canonical_attr, + limit=self._max_instantiation_prefixes, + ) + for instantiation in prefixes: + candidate = _build_slice( + path=path, + writer=writer, + reader=reader, + canonical_attr=canonical_attr, + instantiation=instantiation, + symbol_ids_by_qname=symbol_ids_by_qname, + max_path_length=self._max_path_length, + ) + if candidate is None: + continue + dedupe_key = (tuple(candidate.path_symbols), tuple(candidate.path_edge_types)) + if dedupe_key in seen: + continue + seen.add(dedupe_key) + slices.append(candidate) + produced += 1 + if produced >= self._max_slices_per_attribute: + break + return slices + + +def _group_by_attribute(edges: list[PyEdge], *, edge_type: str) -> dict[str, list[PyEdge]]: + grouped: dict[str, list[PyEdge]] = {} + for edge in edges: + if edge.edge_type != edge_type: + continue + ref = str(edge.dst_ref or "").strip() + if not ref: + continue + key = ref.rsplit(".", 1)[-1].strip().lower() + grouped.setdefault(key, []).append(edge) + return grouped + + +def _canonical_attribute_ref(edges: list[PyEdge], fallback: str) -> str: + refs = [str(edge.dst_ref or "").strip() for edge in edges if edge.dst_ref] + for ref in refs: + owner = ref.rsplit(".", 1)[0] if "." in ref else "" + if owner.rsplit(".", 1)[-1][:1].isupper(): + return ref + for ref in refs: + if "." in ref: + return ref + return fallback + + +def _should_ignore(value: str) -> bool: + lowered = value.lower() + return any(lowered == item or lowered.startswith(f"{item}.") for item in _IGNORE_PREFIXES) + + +def _instantiation_prefixes( + *, + instantiations: list[PyEdge], + writer: PyEdge, + attribute_ref: str, + limit: int, +) -> list[PyEdge | None]: + class_hints = _class_hints(writer, attribute_ref) + if not class_hints: + return [None] + matches: list[PyEdge] = [] + for edge in instantiations: + dst_ref = str(edge.dst_ref or "") + tail = dst_ref.rsplit(".", 1)[-1] + if dst_ref in class_hints or tail in class_hints: + matches.append(edge) + if not matches: + return [None] + matches.sort(key=lambda item: (item.start_line, item.src_qname)) + return matches[:limit] + + +def _class_hints(writer: PyEdge, attribute_ref: str) -> set[str]: + values: set[str] = set() + owner = attribute_ref.rsplit(".", 1)[0] if "." in attribute_ref else "" + if owner: + values.add(owner) + values.add(owner.rsplit(".", 1)[-1]) + writer_owner = writer.src_qname.split(".", 1)[0] + if writer_owner[:1].isupper(): + values.add(writer_owner) + return {item for item in values if item[:1].isupper()} + + +def _build_slice( + *, + path: str, + writer: PyEdge, + reader: PyEdge, + canonical_attr: str, + instantiation: PyEdge | None, + symbol_ids_by_qname: dict[str, str], + max_path_length: int, +) -> DataflowSlice | None: + path_symbols = [writer.src_qname, canonical_attr, reader.src_qname] + path_edges = ["writes_attr", "reads_attr"] + symbol_ids = [writer.src_symbol_id, symbol_ids_by_qname.get(canonical_attr, ""), reader.src_symbol_id] + start_line = min(writer.start_line, reader.start_line) + end_line = max(writer.end_line, reader.end_line) + if instantiation is not None: + class_name = _class_name(instantiation, writer, canonical_attr) + path_symbols = [instantiation.src_qname, class_name] + path_symbols + path_edges = ["instantiates"] + path_edges + symbol_ids = [ + instantiation.src_symbol_id, + instantiation.dst_symbol_id or symbol_ids_by_qname.get(class_name, ""), + *symbol_ids, + ] + start_line = min(start_line, instantiation.start_line) + end_line = max(end_line, instantiation.end_line) + if len(path_symbols) > max_path_length: + return None + if any(_should_ignore(item) for item in path_symbols): + return None + slice_id = sha256( + "|".join( + [ + path, + writer.edge_id, + reader.edge_id, + instantiation.edge_id if instantiation else "none", + canonical_attr, + ] + ).encode("utf-8") + ).hexdigest() + return DataflowSlice( + slice_id=slice_id, + path=path, + root_symbol_id=next((item for item in symbol_ids if item), writer.src_symbol_id), + path_symbols=path_symbols, + path_symbol_ids=[item for item in symbol_ids if item], + path_edge_types=path_edges, + path_length=len(path_symbols), + start_line=start_line, + end_line=end_line, + ) + + +def _class_name(instantiation: PyEdge, writer: PyEdge, attribute_ref: str) -> str: + if instantiation.dst_ref: + return instantiation.dst_ref.rsplit(".", 1)[-1] + owner = attribute_ref.rsplit(".", 1)[0] if "." in attribute_ref else "" + if owner: + return owner.rsplit(".", 1)[-1] + return writer.src_qname.split(".", 1)[0] diff --git a/app/modules/rag/indexing/code/edges/document_builder.py b/src/app/modules/rag/indexing/code/edges/document_builder.py similarity index 93% rename from app/modules/rag/indexing/code/edges/document_builder.py rename to src/app/modules/rag/indexing/code/edges/document_builder.py index 8fb2b62..6bf3bb7 100644 --- a/app/modules/rag/indexing/code/edges/document_builder.py +++ b/src/app/modules/rag/indexing/code/edges/document_builder.py @@ -24,8 +24,6 @@ class EdgeDocumentBuilder: "dst_ref": edge.dst_ref, "resolution": edge.resolution, "is_test": is_test_path(source.path), - "lang_payload": edge.metadata, - "artifact_type": "CODE", }, links=[EvidenceLink(type=EvidenceType.EDGE, target_id=edge.edge_id, path=source.path, start_line=edge.start_line, end_line=edge.end_line)], ) diff --git a/app/modules/rag/indexing/code/edges/extractor.py b/src/app/modules/rag/indexing/code/edges/extractor.py similarity index 61% rename from app/modules/rag/indexing/code/edges/extractor.py rename to src/app/modules/rag/indexing/code/edges/extractor.py index 1eaee75..38343c1 100644 --- a/app/modules/rag/indexing/code/edges/extractor.py +++ b/src/app/modules/rag/indexing/code/edges/extractor.py @@ -25,15 +25,17 @@ class EdgeExtractor: if ast_tree is None: return [] qname_map = {symbol.qname: symbol.symbol_id for symbol in symbols} - visitor = _EdgeVisitor(path, qname_map) + kind_map = {symbol.qname: symbol.kind for symbol in symbols} + visitor = _EdgeVisitor(path, qname_map, kind_map) visitor.visit(ast_tree) return visitor.edges class _EdgeVisitor(ast.NodeVisitor): - def __init__(self, path: str, qname_map: dict[str, str]) -> None: + def __init__(self, path: str, qname_map: dict[str, str], kind_map: dict[str, str]) -> None: self._path = path self._qname_map = qname_map + self._kind_map = kind_map self._scope: list[str] = [] self.edges: list[PyEdge] = [] @@ -69,7 +71,20 @@ class _EdgeVisitor(ast.NodeVisitor): current = self._enter(node.name) for inner in ast.walk(node): if isinstance(inner, ast.Call): - self._add_edge("calls", current, self._name(inner.func), inner, {"callsite_kind": "function_call"}) + callee = self._name(inner.func) + if not callee: + continue + edge_type = "instantiates" if self._looks_like_instantiation(callee) else "calls" + self._add_edge(edge_type, current, callee, inner, {"callsite_kind": "function_call"}) + elif isinstance(inner, ast.Assign): + for target in inner.targets: + self._track_attribute_access(current, target, edge_type="writes_attr") + elif isinstance(inner, ast.AnnAssign): + self._track_attribute_access(current, inner.target, edge_type="writes_attr") + elif isinstance(inner, ast.AugAssign): + self._track_attribute_access(current, inner.target, edge_type="writes_attr") + elif isinstance(inner, ast.Attribute) and isinstance(inner.ctx, ast.Load): + self._track_attribute_access(current, inner, edge_type="reads_attr") self.generic_visit(node) self._scope.pop() @@ -112,3 +127,34 @@ class _EdgeVisitor(ast.NodeVisitor): if isinstance(node, ast.Call): return self._name(node.func) return "" + + def _track_attribute_access(self, src_qname: str, node, *, edge_type: str) -> None: + dst_ref = self._attribute_ref(node) + if not dst_ref: + return + self._add_edge(edge_type, src_qname, dst_ref, node) + + def _attribute_ref(self, node) -> str: + if not isinstance(node, ast.Attribute): + return "" + base = self._name(node.value).strip() + if base in {"self", "cls"}: + owner = self._enclosing_class_name() + if owner: + return f"{owner}.{node.attr}" + if base: + return f"{base}.{node.attr}" + return node.attr + + def _enclosing_class_name(self) -> str: + if len(self._scope) < 2: + return "" + return self._scope[-2] + + def _looks_like_instantiation(self, callee: str) -> bool: + if callee in self._kind_map and self._kind_map[callee] == "class": + return True + tail = callee.rsplit(".", 1)[-1] + if tail in self._kind_map and self._kind_map[tail] == "class": + return True + return tail[:1].isupper() diff --git a/app/modules/rag/indexing/code/entrypoints/document_builder.py b/src/app/modules/rag/indexing/code/entrypoints/document_builder.py similarity index 50% rename from app/modules/rag/indexing/code/entrypoints/document_builder.py rename to src/app/modules/rag/indexing/code/entrypoints/document_builder.py index 9a03147..f5e0f63 100644 --- a/app/modules/rag/indexing/code/entrypoints/document_builder.py +++ b/src/app/modules/rag/indexing/code/entrypoints/document_builder.py @@ -7,12 +7,14 @@ from app.modules.rag.retrieval.test_filter import is_test_path class EntrypointDocumentBuilder: def build(self, source: RagSource, entrypoint: Entrypoint) -> RagDocument: + title = entrypoint.summary_text or entrypoint.route_or_command + text = self._text(entrypoint) return RagDocument( layer=RagLayer.CODE_ENTRYPOINTS, lang="python", source=source, - title=entrypoint.route_or_command, - text=f"{entrypoint.framework} {entrypoint.entry_type} {entrypoint.route_or_command}", + title=title, + text=text, span=RagSpan(entrypoint.start_line, entrypoint.end_line), metadata={ "entry_id": entrypoint.entry_id, @@ -20,9 +22,28 @@ class EntrypointDocumentBuilder: "framework": entrypoint.framework, "route_or_command": entrypoint.route_or_command, "handler_symbol_id": entrypoint.handler_symbol_id, + "handler_symbol": entrypoint.handler_symbol, + "declaring_symbol": entrypoint.declaring_symbol, + "entrypoint_kind": entrypoint.entrypoint_kind, + "http_method": entrypoint.http_method, + "route_path": entrypoint.route_path, + "decorator_text": entrypoint.decorator_text, + "summary_text": entrypoint.summary_text, "is_test": is_test_path(source.path), "lang_payload": entrypoint.metadata, "artifact_type": "CODE", }, links=[EvidenceLink(type=EvidenceType.CODE_SPAN, target_id=entrypoint.entry_id, path=source.path, start_line=entrypoint.start_line, end_line=entrypoint.end_line)], ) + + def _text(self, entrypoint: Entrypoint) -> str: + if not entrypoint.http_method or not entrypoint.route_path: + return f"{entrypoint.framework} {entrypoint.entry_type} {entrypoint.route_or_command}" + parts = [f"{entrypoint.http_method} {entrypoint.route_path}"] + if entrypoint.declaring_symbol: + parts.append(f"declared in {entrypoint.declaring_symbol}") + if entrypoint.handler_symbol: + parts.append(f"handled by {entrypoint.handler_symbol}") + if entrypoint.decorator_text: + parts.append(f"decorator {entrypoint.decorator_text}") + return " | ".join(parts) diff --git a/src/app/modules/rag/indexing/code/entrypoints/execution_trace_builder.py b/src/app/modules/rag/indexing/code/entrypoints/execution_trace_builder.py new file mode 100644 index 0000000..8c40dc1 --- /dev/null +++ b/src/app/modules/rag/indexing/code/entrypoints/execution_trace_builder.py @@ -0,0 +1,126 @@ +from __future__ import annotations + +from dataclasses import dataclass +from hashlib import sha256 + +from app.modules.rag.indexing.code.edges.extractor import PyEdge +from app.modules.rag.indexing.code.entrypoints.registry import Entrypoint +from app.modules.rag.indexing.code.symbols.extractor import PySymbol + + +@dataclass(slots=True) +class ExecutionTrace: + trace_id: str + path: str + entry_id: str + entry_symbol_id: str + path_symbols: list[str] + path_symbol_ids: list[str] + path_length: int + start_line: int + end_line: int + + +class ExecutionTraceBuilder: + _IGNORE_PREFIXES = ("logger", "logging", "print", "stdlib", "typing", "dataclasses") + + def __init__(self, *, max_trace_depth: int = 8, max_traces_per_entrypoint: int = 20) -> None: + self._max_trace_depth = max_trace_depth + self._max_traces_per_entrypoint = max_traces_per_entrypoint + + def build( + self, + path: str, + entrypoints: list[Entrypoint], + edges: list[PyEdge], + symbols: list[PySymbol], + ) -> list[ExecutionTrace]: + if not entrypoints: + return [] + symbol_map = {symbol.symbol_id: symbol for symbol in symbols} + call_map = self._call_edges(edges) + traces: list[ExecutionTrace] = [] + seen: set[tuple[str, tuple[str, ...]]] = set() + for entrypoint in entrypoints: + raw_paths = self._dfs_paths(entrypoint.handler_symbol_id, call_map) + for symbol_ids in raw_paths: + if len(symbol_ids) < 2: + continue + key = (entrypoint.entry_id, tuple(symbol_ids)) + if key in seen: + continue + seen.add(key) + trace = self._trace_for_path(path, entrypoint, symbol_ids, symbol_map) + if trace is None: + continue + traces.append(trace) + return traces + + def _call_edges(self, edges: list[PyEdge]) -> dict[str, list[PyEdge]]: + grouped: dict[str, list[PyEdge]] = {} + for edge in edges: + if edge.edge_type != "calls" or not edge.dst_symbol_id: + continue + grouped.setdefault(edge.src_symbol_id, []).append(edge) + for values in grouped.values(): + values.sort(key=lambda item: (item.start_line, item.dst_symbol_id or "")) + return grouped + + def _dfs_paths(self, start_symbol_id: str, call_map: dict[str, list[PyEdge]]) -> list[list[str]]: + if not start_symbol_id: + return [] + results: list[list[str]] = [] + stack: list[tuple[str, list[str], set[str]]] = [(start_symbol_id, [start_symbol_id], {start_symbol_id})] + while stack and len(results) < self._max_traces_per_entrypoint: + current, path_ids, visited = stack.pop() + edges = call_map.get(current, []) + if not edges or len(path_ids) >= self._max_trace_depth: + results.append(path_ids) + continue + pushed = False + for edge in reversed(edges): + dst_symbol_id = edge.dst_symbol_id + if not dst_symbol_id or dst_symbol_id in visited: + continue + pushed = True + stack.append((dst_symbol_id, path_ids + [dst_symbol_id], visited | {dst_symbol_id})) + if not pushed: + results.append(path_ids) + return results + + def _trace_for_path( + self, + path: str, + entrypoint: Entrypoint, + symbol_ids: list[str], + symbol_map: dict[str, PySymbol], + ) -> ExecutionTrace | None: + path_symbols = [self._symbol_name(symbol_map, symbol_id) for symbol_id in symbol_ids] + if any(self._should_ignore(item) for item in path_symbols): + return None + lines = [symbol_map.get(symbol_id) for symbol_id in symbol_ids] + known_lines = [item for item in lines if item is not None] + start_line = min([entrypoint.start_line, *[item.start_line for item in known_lines]]) + end_line = max([entrypoint.end_line, *[item.end_line for item in known_lines]]) + trace_id = sha256(f"{path}|{entrypoint.entry_id}|{'|'.join(symbol_ids)}".encode("utf-8")).hexdigest() + return ExecutionTrace( + trace_id=trace_id, + path=path, + entry_id=entrypoint.entry_id, + entry_symbol_id=entrypoint.handler_symbol_id, + path_symbols=path_symbols, + path_symbol_ids=symbol_ids, + path_length=len(path_symbols), + start_line=start_line, + end_line=end_line, + ) + + def _symbol_name(self, symbol_map: dict[str, PySymbol], symbol_id: str) -> str: + symbol = symbol_map.get(symbol_id) + if symbol is None: + return symbol_id + return symbol.qname + + def _should_ignore(self, value: str) -> bool: + lowered = value.lower() + return any(lowered == item or lowered.startswith(f"{item}.") for item in self._IGNORE_PREFIXES) diff --git a/src/app/modules/rag/indexing/code/entrypoints/execution_trace_document_builder.py b/src/app/modules/rag/indexing/code/entrypoints/execution_trace_document_builder.py new file mode 100644 index 0000000..6075d06 --- /dev/null +++ b/src/app/modules/rag/indexing/code/entrypoints/execution_trace_document_builder.py @@ -0,0 +1,43 @@ +from __future__ import annotations + +from app.modules.rag.contracts import EvidenceLink, EvidenceType, RagDocument, RagLayer, RagSource, RagSpan +from app.modules.rag.indexing.code.entrypoints.execution_trace_builder import ExecutionTrace +from app.modules.rag.retrieval.test_filter import is_test_path + + +class ExecutionTraceDocumentBuilder: + def build(self, source: RagSource, item: ExecutionTrace) -> RagDocument: + text = "\n -> ".join(item.path_symbols) + return RagDocument( + layer=RagLayer.CODE_ENTRYPOINTS, + lang="python", + source=source, + title=f"{item.path_symbols[0]}:execution_trace", + text=text, + span=RagSpan(item.start_line, item.end_line), + metadata={ + "edge_id": item.trace_id, + "edge_type": "execution_trace", + "src_symbol_id": item.entry_symbol_id, + "src_qname": item.path_symbols[0], + "dst_symbol_id": item.path_symbol_ids[-1] if item.path_symbol_ids else None, + "dst_ref": item.path_symbols[-1], + "resolution": "resolved", + "trace_id": item.trace_id, + "entry_id": item.entry_id, + "entry_symbol_id": item.entry_symbol_id, + "path_symbols": item.path_symbols, + "path_symbol_ids": item.path_symbol_ids, + "path_length": item.path_length, + "is_test": is_test_path(source.path), + }, + links=[ + EvidenceLink( + type=EvidenceType.EDGE, + target_id=item.trace_id, + path=source.path, + start_line=item.start_line, + end_line=item.end_line, + ) + ], + ) diff --git a/src/app/modules/rag/indexing/code/entrypoints/fastapi_detector.py b/src/app/modules/rag/indexing/code/entrypoints/fastapi_detector.py new file mode 100644 index 0000000..75f7b85 --- /dev/null +++ b/src/app/modules/rag/indexing/code/entrypoints/fastapi_detector.py @@ -0,0 +1,75 @@ +from __future__ import annotations + +import ast +from hashlib import sha256 + +from app.modules.rag.indexing.code.entrypoints.registry import Entrypoint + + +class FastApiEntrypointDetector: + _METHODS = {"get", "post", "put", "patch", "delete"} + + def detect(self, *, path: str, symbols: list) -> list[Entrypoint]: + items: list[Entrypoint] = [] + for symbol in symbols: + for decorator in symbol.decorators or []: + route = _FastApiRouteParser().parse(decorator) + if route is None: + continue + method, route_path = route + items.append( + Entrypoint( + entry_id=sha256(f"{path}|fastapi|{symbol.symbol_id}|{decorator}".encode("utf-8")).hexdigest(), + entry_type="http", + framework="fastapi", + route_or_command=f"{method} {route_path}", + handler_symbol_id=symbol.symbol_id, + path=path, + start_line=symbol.start_line, + end_line=symbol.end_line, + handler_symbol=symbol.qname, + declaring_symbol=_declaring_symbol(symbol.qname), + entrypoint_kind="http_route", + http_method=method, + route_path=route_path, + decorator_text=f"@{decorator}", + summary_text=_summary_text(method, route_path, symbol.qname), + metadata={"methods": [method]}, + ) + ) + return items + + +class _FastApiRouteParser: + def parse(self, decorator: str) -> tuple[str, str] | None: + lowered = decorator.lower() + tail = lowered.split(".")[-1].split("(", 1)[0] + if tail not in FastApiEntrypointDetector._METHODS: + return None + method = tail.upper() + route_path = self._route_path(decorator) + return (method, route_path) if route_path else None + + def _route_path(self, decorator: str) -> str: + try: + expr = ast.parse(decorator, mode="eval").body + except SyntaxError: + return "" + if not isinstance(expr, ast.Call) or not expr.args: + return "" + first = expr.args[0] + if isinstance(first, ast.Constant) and isinstance(first.value, str): + return first.value + return "" + + +def _declaring_symbol(qname: str) -> str: + parts = [item for item in qname.split(".") if item] + if len(parts) >= 2: + return parts[0] + return qname + + +def _summary_text(method: str, route_path: str, handler_symbol: str) -> str: + declaring = _declaring_symbol(handler_symbol) + return f"{method} {route_path} declared in {declaring}" diff --git a/app/modules/rag/indexing/code/entrypoints/flask_detector.py b/src/app/modules/rag/indexing/code/entrypoints/flask_detector.py similarity index 100% rename from app/modules/rag/indexing/code/entrypoints/flask_detector.py rename to src/app/modules/rag/indexing/code/entrypoints/flask_detector.py diff --git a/app/modules/rag/indexing/code/entrypoints/registry.py b/src/app/modules/rag/indexing/code/entrypoints/registry.py similarity index 72% rename from app/modules/rag/indexing/code/entrypoints/registry.py rename to src/app/modules/rag/indexing/code/entrypoints/registry.py index d49f6f8..a606bf8 100644 --- a/app/modules/rag/indexing/code/entrypoints/registry.py +++ b/src/app/modules/rag/indexing/code/entrypoints/registry.py @@ -13,6 +13,13 @@ class Entrypoint: path: str start_line: int end_line: int + handler_symbol: str | None = None + declaring_symbol: str | None = None + entrypoint_kind: str | None = None + http_method: str | None = None + route_path: str | None = None + decorator_text: str | None = None + summary_text: str | None = None metadata: dict = field(default_factory=dict) diff --git a/app/modules/rag/indexing/code/entrypoints/typer_click_detector.py b/src/app/modules/rag/indexing/code/entrypoints/typer_click_detector.py similarity index 100% rename from app/modules/rag/indexing/code/entrypoints/typer_click_detector.py rename to src/app/modules/rag/indexing/code/entrypoints/typer_click_detector.py diff --git a/app/modules/rag/indexing/code/file_filter.py b/src/app/modules/rag/indexing/code/file_filter.py similarity index 73% rename from app/modules/rag/indexing/code/file_filter.py rename to src/app/modules/rag/indexing/code/file_filter.py index 3c497e6..ed4953f 100644 --- a/app/modules/rag/indexing/code/file_filter.py +++ b/src/app/modules/rag/indexing/code/file_filter.py @@ -2,11 +2,15 @@ from __future__ import annotations from pathlib import PurePosixPath +from app.modules.rag.indexing.common.path_filter import should_skip_indexing_path + class PythonFileFilter: _EXCLUDE_PARTS = {"venv", ".venv", "__pycache__", "node_modules", ".git", "dist", "build"} def should_index(self, path: str) -> bool: + if should_skip_indexing_path(path): + return False candidate = PurePosixPath(path) if candidate.suffix.lower() != ".py": return False diff --git a/app/modules/rag/indexing/code/pipeline.py b/src/app/modules/rag/indexing/code/pipeline.py similarity index 61% rename from app/modules/rag/indexing/code/pipeline.py rename to src/app/modules/rag/indexing/code/pipeline.py index fe91b01..794e326 100644 --- a/app/modules/rag/indexing/code/pipeline.py +++ b/src/app/modules/rag/indexing/code/pipeline.py @@ -3,14 +3,20 @@ from __future__ import annotations from app.modules.rag.contracts import RagDocument, RagSource from app.modules.rag.indexing.code.code_text.chunker import CodeTextChunker from app.modules.rag.indexing.code.code_text.document_builder import CodeTextDocumentBuilder +from app.modules.rag.indexing.code.edges.dataflow_document_builder import DataflowDocumentBuilder +from app.modules.rag.indexing.code.edges.dataflow_slice_builder import DataflowSliceBuilder from app.modules.rag.indexing.code.edges.document_builder import EdgeDocumentBuilder from app.modules.rag.indexing.code.edges.extractor import EdgeExtractor from app.modules.rag.indexing.code.entrypoints.document_builder import EntrypointDocumentBuilder +from app.modules.rag.indexing.code.entrypoints.execution_trace_builder import ExecutionTraceBuilder +from app.modules.rag.indexing.code.entrypoints.execution_trace_document_builder import ExecutionTraceDocumentBuilder from app.modules.rag.indexing.code.entrypoints.fastapi_detector import FastApiEntrypointDetector from app.modules.rag.indexing.code.entrypoints.flask_detector import FlaskEntrypointDetector from app.modules.rag.indexing.code.entrypoints.registry import EntrypointDetectorRegistry from app.modules.rag.indexing.code.entrypoints.typer_click_detector import TyperClickEntrypointDetector from app.modules.rag.indexing.code.file_filter import PythonFileFilter +from app.modules.rag.indexing.code.roles.builder import SemanticRoleBuilder +from app.modules.rag.indexing.code.roles.document_builder import SemanticRoleDocumentBuilder from app.modules.rag.indexing.code.symbols.ast_parser import PythonAstParser from app.modules.rag.indexing.code.symbols.document_builder import SymbolDocumentBuilder from app.modules.rag.indexing.code.symbols.extractor import SymbolExtractor @@ -26,10 +32,16 @@ class CodeIndexingPipeline: self._symbol_builder = SymbolDocumentBuilder() self._edges = EdgeExtractor() self._edge_builder = EdgeDocumentBuilder() + self._dataflow_slices = DataflowSliceBuilder() + self._dataflow_builder = DataflowDocumentBuilder() self._entrypoints = EntrypointDetectorRegistry( [FastApiEntrypointDetector(), FlaskEntrypointDetector(), TyperClickEntrypointDetector()] ) self._entrypoint_builder = EntrypointDocumentBuilder() + self._execution_traces = ExecutionTraceBuilder() + self._execution_trace_builder = ExecutionTraceDocumentBuilder() + self._semantic_roles = SemanticRoleBuilder() + self._semantic_role_builder = SemanticRoleDocumentBuilder() def supports(self, path: str) -> bool: return self._filter.should_index(path) @@ -47,6 +59,21 @@ class CodeIndexingPipeline: edges = self._edges.extract(path, tree, symbols) for edge in edges: docs.append(self._edge_builder.build(source, edge)) - for entrypoint in self._entrypoints.detect_all(path=path, symbols=symbols): + dataflow_slices = self._dataflow_slices.build(path=path, edges=edges, symbols=symbols) + for item in dataflow_slices: + docs.append(self._dataflow_builder.build(source, item)) + entrypoints = self._entrypoints.detect_all(path=path, symbols=symbols) + for entrypoint in entrypoints: docs.append(self._entrypoint_builder.build(source, entrypoint)) + traces = self._execution_traces.build(path=path, entrypoints=entrypoints, edges=edges, symbols=symbols) + for trace in traces: + docs.append(self._execution_trace_builder.build(source, trace)) + semantic_roles = self._semantic_roles.build( + symbols=symbols, + edges=edges, + dataflow_slices=dataflow_slices, + execution_traces=traces, + ) + for semantic_role in semantic_roles: + docs.append(self._semantic_role_builder.build(source, semantic_role)) return docs diff --git a/src/app/modules/rag/indexing/code/roles/__init__.py b/src/app/modules/rag/indexing/code/roles/__init__.py new file mode 100644 index 0000000..f4c5b12 --- /dev/null +++ b/src/app/modules/rag/indexing/code/roles/__init__.py @@ -0,0 +1,9 @@ +from app.modules.rag.indexing.code.roles.builder import SemanticRoleBuilder +from app.modules.rag.indexing.code.roles.document_builder import SemanticRoleDocumentBuilder +from app.modules.rag.indexing.code.roles.models import SemanticRoleRecord + +__all__ = [ + "SemanticRoleBuilder", + "SemanticRoleDocumentBuilder", + "SemanticRoleRecord", +] diff --git a/src/app/modules/rag/indexing/code/roles/builder.py b/src/app/modules/rag/indexing/code/roles/builder.py new file mode 100644 index 0000000..bbb02de --- /dev/null +++ b/src/app/modules/rag/indexing/code/roles/builder.py @@ -0,0 +1,41 @@ +from __future__ import annotations + +from app.modules.rag.indexing.code.edges.dataflow_slice_builder import DataflowSlice +from app.modules.rag.indexing.code.edges.extractor import PyEdge +from app.modules.rag.indexing.code.entrypoints.execution_trace_builder import ExecutionTrace +from app.modules.rag.indexing.code.roles.models import SemanticRoleRecord +from app.modules.rag.indexing.code.roles.scorer import SemanticRoleScorer +from app.modules.rag.indexing.code.symbols.extractor import PySymbol + + +class SemanticRoleBuilder: + def __init__(self, scorer: SemanticRoleScorer | None = None) -> None: + self._scorer = scorer or SemanticRoleScorer() + + def build( + self, + *, + symbols: list[PySymbol], + edges: list[PyEdge], + dataflow_slices: list[DataflowSlice], + execution_traces: list[ExecutionTrace], + ) -> list[SemanticRoleRecord]: + class_symbols = [symbol for symbol in symbols if symbol.kind == "class"] + result: list[SemanticRoleRecord] = [] + for symbol in class_symbols: + class_edges = _class_edges(symbol, edges) + scored = self._scorer.score( + symbol=symbol, + class_edges=class_edges, + dataflow_slices=dataflow_slices, + execution_traces=execution_traces, + ) + if scored is None: + continue + result.append(scored) + return result + + +def _class_edges(symbol: PySymbol, edges: list[PyEdge]) -> list[PyEdge]: + scope = symbol.qname + return [edge for edge in edges if edge.src_qname == scope or edge.src_qname.startswith(f"{scope}.")] diff --git a/src/app/modules/rag/indexing/code/roles/document_builder.py b/src/app/modules/rag/indexing/code/roles/document_builder.py new file mode 100644 index 0000000..30c97f8 --- /dev/null +++ b/src/app/modules/rag/indexing/code/roles/document_builder.py @@ -0,0 +1,42 @@ +from __future__ import annotations + +from app.modules.rag.contracts import EvidenceLink, EvidenceType, RagDocument, RagLayer, RagSource, RagSpan +from app.modules.rag.indexing.code.roles.models import SemanticRoleRecord +from app.modules.rag.retrieval.test_filter import is_test_path + + +class SemanticRoleDocumentBuilder: + def build(self, source: RagSource, role_record: SemanticRoleRecord) -> RagDocument: + responsibilities = "\n".join(f"- {item}" for item in role_record.responsibilities) + content = ( + f"{role_record.symbol_name}\n" + f"role: {role_record.role}\n\n" + f"Responsibilities:\n{responsibilities}" + ) + return RagDocument( + layer=RagLayer.CODE_SEMANTIC_ROLES, + lang="python", + source=source, + title=role_record.symbol_name, + text=content, + span=RagSpan(role_record.start_line, role_record.end_line), + metadata={ + "symbol_id": role_record.symbol_id, + "symbol_name": role_record.symbol_name, + "qname": role_record.symbol_name, + "role": role_record.role, + "confidence": role_record.confidence, + "dataflow_participation": role_record.dataflow_participation, + "execution_trace_proximity": role_record.execution_trace_proximity, + "is_test": is_test_path(source.path), + }, + links=[ + EvidenceLink( + type=EvidenceType.SYMBOL, + target_id=role_record.symbol_id, + path=source.path, + start_line=role_record.start_line, + end_line=role_record.end_line, + ) + ], + ) diff --git a/src/app/modules/rag/indexing/code/roles/models.py b/src/app/modules/rag/indexing/code/roles/models.py new file mode 100644 index 0000000..90caace --- /dev/null +++ b/src/app/modules/rag/indexing/code/roles/models.py @@ -0,0 +1,16 @@ +from __future__ import annotations + +from dataclasses import dataclass, field + + +@dataclass(slots=True) +class SemanticRoleRecord: + symbol_id: str + symbol_name: str + role: str + confidence: float + responsibilities: list[str] = field(default_factory=list) + dataflow_participation: int = 0 + execution_trace_proximity: int = 0 + start_line: int = 1 + end_line: int = 1 diff --git a/src/app/modules/rag/indexing/code/roles/scorer.py b/src/app/modules/rag/indexing/code/roles/scorer.py new file mode 100644 index 0000000..9a3dd33 --- /dev/null +++ b/src/app/modules/rag/indexing/code/roles/scorer.py @@ -0,0 +1,205 @@ +from __future__ import annotations + +from dataclasses import dataclass, field + +from app.modules.rag.indexing.code.edges.dataflow_slice_builder import DataflowSlice +from app.modules.rag.indexing.code.edges.extractor import PyEdge +from app.modules.rag.indexing.code.entrypoints.execution_trace_builder import ExecutionTrace +from app.modules.rag.indexing.code.roles.models import SemanticRoleRecord +from app.modules.rag.indexing.code.symbols.extractor import PySymbol + +_ROLE_PRIORITY = [ + "handler", + "service", + "repository", + "adapter", + "parser", + "pipeline_stage", + "controller", + "manager", + "factory", + "model", +] +_SUFFIX_TO_ROLE = { + "handler": "handler", + "service": "service", + "repository": "repository", + "parser": "parser", + "controller": "controller", + "adapter": "adapter", + "manager": "manager", + "factory": "factory", +} +_MODEL_SUFFIXES = ("model", "entity", "schema", "dto") +_PIPELINE_HINTS = ("processor", "stage", "pipeline") +_ADAPTER_MODULES = {"requests", "httpx", "aiohttp", "smtplib", "sqlalchemy"} +_PARSER_MODULES = {"openpyxl", "csv", "xlrd", "pandas"} +_IGNORE_NAMES = {"logger", "logging", "typing", "dataclass"} + + +@dataclass(slots=True) +class _RoleScore: + values: dict[str, float] = field(default_factory=lambda: {role: 0.0 for role in _ROLE_PRIORITY}) + reasons: list[str] = field(default_factory=list) + + def add(self, role: str, score: float, reason: str) -> None: + self.values[role] = self.values.get(role, 0.0) + score + if reason and reason not in self.reasons: + self.reasons.append(reason) + + def top(self) -> tuple[str, float]: + best_role = "model" + best_value = -1.0 + for role in _ROLE_PRIORITY: + value = self.values.get(role, 0.0) + if value > best_value: + best_role = role + best_value = value + return best_role, best_value + + def confidence(self) -> float: + total = sum(value for value in self.values.values() if value > 0) + _, top_score = self.top() + if total <= 0: + return 0.51 + ratio = top_score / total + return round(min(0.99, max(0.55, ratio)), 2) + + +class SemanticRoleScorer: + def score( + self, + *, + symbol: PySymbol, + class_edges: list[PyEdge], + dataflow_slices: list[DataflowSlice], + execution_traces: list[ExecutionTrace], + ) -> SemanticRoleRecord | None: + if symbol.kind != "class": + return None + symbol_name = symbol.qname + class_name = symbol_name.rsplit(".", 1)[-1] + lowered_name = class_name.lower() + if any(marker in lowered_name for marker in _IGNORE_NAMES): + return None + role_score = _RoleScore() + self._score_by_name(lowered_name, role_score) + import_modules = _import_modules(class_edges) + self._score_by_imports(import_modules, role_score) + calls_to_roles = _calls_to_role_like_targets(class_edges) + reads_count = _edge_count(class_edges, "reads_attr") + writes_count = _edge_count(class_edges, "writes_attr") + self._score_pipeline_signals( + lowered_name=lowered_name, + calls_to_roles=calls_to_roles, + reads_count=reads_count, + writes_count=writes_count, + role_score=role_score, + ) + dataflow_participation = _dataflow_participation(symbol_name, class_name, dataflow_slices) + if dataflow_participation > 0: + role_score.add("pipeline_stage", 2.0, f"participates in dataflow slices ({dataflow_participation})") + execution_trace_proximity = _trace_proximity(symbol_name, class_name, execution_traces) + if execution_trace_proximity > 0: + role_score.add("pipeline_stage", 1.0, f"appears in execution traces ({execution_trace_proximity})") + role, top_score = role_score.top() + if top_score <= 0: + role_score.add("model", 1.0, "default model role") + role = "model" + responsibilities = role_score.reasons[:4] + if not responsibilities: + responsibilities = ["class-level domain responsibility"] + return SemanticRoleRecord( + symbol_id=symbol.symbol_id, + symbol_name=symbol_name, + role=role, + confidence=role_score.confidence(), + responsibilities=responsibilities, + dataflow_participation=dataflow_participation, + execution_trace_proximity=execution_trace_proximity, + start_line=symbol.start_line, + end_line=symbol.end_line, + ) + + def _score_by_name(self, lowered_name: str, role_score: _RoleScore) -> None: + for suffix, role in _SUFFIX_TO_ROLE.items(): + if lowered_name.endswith(suffix): + role_score.add(role, 3.0, f"name suffix suggests {role}") + if lowered_name.endswith(_MODEL_SUFFIXES): + role_score.add("model", 2.0, "name suffix suggests model") + if any(marker in lowered_name for marker in _PIPELINE_HINTS): + role_score.add("pipeline_stage", 2.0, "name indicates pipeline orchestration") + + def _score_by_imports(self, import_modules: set[str], role_score: _RoleScore) -> None: + adapter_hits = import_modules & _ADAPTER_MODULES + if adapter_hits: + role_score.add("adapter", min(4.0, 2.0 * len(adapter_hits)), "uses external I/O client modules") + parser_hits = import_modules & _PARSER_MODULES + if parser_hits: + role_score.add("parser", min(4.0, 2.0 * len(parser_hits)), "uses parsing libraries") + + def _score_pipeline_signals( + self, + *, + lowered_name: str, + calls_to_roles: int, + reads_count: int, + writes_count: int, + role_score: _RoleScore, + ) -> None: + if calls_to_roles >= 2: + role_score.add("pipeline_stage", 2.0, f"orchestrates role-like calls ({calls_to_roles})") + if reads_count > 0 and writes_count > 0: + role_score.add("pipeline_stage", 2.0, "reads and writes state attributes") + if lowered_name.endswith("handler") and (reads_count > 0 or writes_count > 0): + role_score.add("handler", 1.0, "handler works with pipeline state") + + +def _import_modules(edges: list[PyEdge]) -> set[str]: + modules: set[str] = set() + for edge in edges: + if edge.edge_type != "imports": + continue + dst = str(edge.dst_ref or "") + if not dst: + continue + modules.add(dst.split(".", 1)[0].lower()) + return modules + + +def _calls_to_role_like_targets(edges: list[PyEdge]) -> int: + total = 0 + for edge in edges: + if edge.edge_type not in {"calls", "instantiates"}: + continue + target = str(edge.dst_ref or "").rsplit(".", 1)[-1] + lowered = target.lower() + if any(lowered.endswith(suffix) for suffix in _SUFFIX_TO_ROLE): + total += 1 + return total + + +def _edge_count(edges: list[PyEdge], edge_type: str) -> int: + return sum(1 for edge in edges if edge.edge_type == edge_type) + + +def _dataflow_participation(symbol_name: str, class_name: str, slices: list[DataflowSlice]) -> int: + total = 0 + for item in slices: + if any(_matches_symbol(value, symbol_name, class_name) for value in item.path_symbols): + total += 1 + return total + + +def _trace_proximity(symbol_name: str, class_name: str, traces: list[ExecutionTrace]) -> int: + total = 0 + for item in traces: + if any(_matches_symbol(value, symbol_name, class_name) for value in item.path_symbols): + total += 1 + return total + + +def _matches_symbol(path_symbol: str, symbol_name: str, class_name: str) -> bool: + if path_symbol == symbol_name or path_symbol == class_name: + return True + return path_symbol.startswith(f"{symbol_name}.") or path_symbol.startswith(f"{class_name}.") diff --git a/app/modules/rag/indexing/code/symbols/ast_parser.py b/src/app/modules/rag/indexing/code/symbols/ast_parser.py similarity index 100% rename from app/modules/rag/indexing/code/symbols/ast_parser.py rename to src/app/modules/rag/indexing/code/symbols/ast_parser.py diff --git a/app/modules/rag/indexing/code/symbols/document_builder.py b/src/app/modules/rag/indexing/code/symbols/document_builder.py similarity index 81% rename from app/modules/rag/indexing/code/symbols/document_builder.py rename to src/app/modules/rag/indexing/code/symbols/document_builder.py index 2f81b5f..98b8ea3 100644 --- a/app/modules/rag/indexing/code/symbols/document_builder.py +++ b/src/app/modules/rag/indexing/code/symbols/document_builder.py @@ -22,13 +22,8 @@ class SymbolDocumentBuilder: "qname": symbol.qname, "kind": symbol.kind, "signature": symbol.signature, - "decorators_or_annotations": symbol.decorators, - "docstring_or_javadoc": symbol.docstring, "parent_symbol_id": symbol.parent_symbol_id, "package_or_module": source.path.replace("/", ".").removesuffix(".py"), - "is_entry_candidate": bool(symbol.decorators), "is_test": is_test_path(source.path), - "lang_payload": symbol.lang_payload, - "artifact_type": "CODE", }, ) diff --git a/app/modules/rag/indexing/code/symbols/extractor.py b/src/app/modules/rag/indexing/code/symbols/extractor.py similarity index 94% rename from app/modules/rag/indexing/code/symbols/extractor.py rename to src/app/modules/rag/indexing/code/symbols/extractor.py index 8142699..36a7c55 100644 --- a/app/modules/rag/indexing/code/symbols/extractor.py +++ b/src/app/modules/rag/indexing/code/symbols/extractor.py @@ -105,7 +105,7 @@ class _SymbolVisitor(ast.NodeVisitor): start_line=int(getattr(node, "lineno", 1)), end_line=int(getattr(node, "end_lineno", getattr(node, "lineno", 1))), signature=signature, - decorators=[self._expr_name(item) for item in getattr(node, "decorator_list", [])], + decorators=[self._decorator_text(item) for item in getattr(node, "decorator_list", [])], docstring=ast.get_docstring(node), parent_symbol_id=self._stack[-1][1] if self._stack else None, lang_payload=lang_payload, @@ -128,3 +128,9 @@ class _SymbolVisitor(ast.NodeVisitor): if isinstance(node, ast.Call): return self._expr_name(node.func) return ast.dump(node, include_attributes=False) + + def _decorator_text(self, node) -> str: + try: + return ast.unparse(node) + except Exception: + return self._expr_name(node) diff --git a/app/modules/rag/indexing/common/document_upserter.py b/src/app/modules/rag/indexing/common/document_upserter.py similarity index 100% rename from app/modules/rag/indexing/common/document_upserter.py rename to src/app/modules/rag/indexing/common/document_upserter.py diff --git a/src/app/modules/rag/indexing/common/path_filter.py b/src/app/modules/rag/indexing/common/path_filter.py new file mode 100644 index 0000000..d178875 --- /dev/null +++ b/src/app/modules/rag/indexing/common/path_filter.py @@ -0,0 +1,60 @@ +from __future__ import annotations + +from pathlib import PurePosixPath + +_CACHE_DIR_NAMES = {"__pycache__", "app-data", "build", "grafana"} + + +def should_skip_indexing_path(path: str) -> bool: + parts = _path_parts(path) + if not parts: + return True + for part in parts: + if part in _CACHE_DIR_NAMES: + return True + if _is_hidden_part(part): + return True + return False + + +def filter_snapshot_files(files: list[dict]) -> list[dict]: + return [item for item in files if not should_skip_indexing_path(str(item.get("path", "")))] + + +def filter_changes_for_indexing(changed_files: list[dict]) -> list[dict]: + result: list[dict] = [] + for item in changed_files: + op = str(item.get("op", "")).lower() + path = str(item.get("path", "")) + if op == "delete": + result.append(item) + continue + if should_skip_indexing_path(path): + continue + result.append(item) + return result + + +def count_indexable_change_upserts(changed_files: list[dict]) -> int: + total = 0 + for item in changed_files: + op = str(item.get("op", "")).lower() + if op == "delete": + continue + path = str(item.get("path", "")) + if should_skip_indexing_path(path): + continue + total += 1 + return total + + +def _path_parts(path: str) -> tuple[str, ...]: + normalized = (path or "").replace("\\", "/").strip() + if not normalized: + return () + posix = PurePosixPath(normalized) + return tuple(part for part in posix.parts if part not in {"", "/"} and part != ".") + + +def _is_hidden_part(part: str) -> bool: + return part not in {".", ".."} and part.startswith(".") diff --git a/app/modules/rag/indexing/common/report.py b/src/app/modules/rag/indexing/common/report.py similarity index 100% rename from app/modules/rag/indexing/common/report.py rename to src/app/modules/rag/indexing/common/report.py diff --git a/app/modules/rag/indexing/docs/chunkers/markdown_chunker.py b/src/app/modules/rag/indexing/docs/chunkers/markdown_chunker.py similarity index 100% rename from app/modules/rag/indexing/docs/chunkers/markdown_chunker.py rename to src/app/modules/rag/indexing/docs/chunkers/markdown_chunker.py diff --git a/app/modules/rag/indexing/docs/chunkers/text_chunker.py b/src/app/modules/rag/indexing/docs/chunkers/text_chunker.py similarity index 100% rename from app/modules/rag/indexing/docs/chunkers/text_chunker.py rename to src/app/modules/rag/indexing/docs/chunkers/text_chunker.py diff --git a/app/modules/rag/indexing/docs/classifier.py b/src/app/modules/rag/indexing/docs/classifier.py similarity index 100% rename from app/modules/rag/indexing/docs/classifier.py rename to src/app/modules/rag/indexing/docs/classifier.py diff --git a/app/modules/rag/indexing/docs/document_builder.py b/src/app/modules/rag/indexing/docs/document_builder.py similarity index 100% rename from app/modules/rag/indexing/docs/document_builder.py rename to src/app/modules/rag/indexing/docs/document_builder.py diff --git a/app/modules/rag/indexing/docs/file_filter.py b/src/app/modules/rag/indexing/docs/file_filter.py similarity index 85% rename from app/modules/rag/indexing/docs/file_filter.py rename to src/app/modules/rag/indexing/docs/file_filter.py index c8ae4f7..5fc7b2e 100644 --- a/app/modules/rag/indexing/docs/file_filter.py +++ b/src/app/modules/rag/indexing/docs/file_filter.py @@ -2,6 +2,8 @@ from __future__ import annotations from pathlib import PurePosixPath +from app.modules.rag.indexing.common.path_filter import should_skip_indexing_path + class DocsFileFilter: _EXTENSIONS = {".md", ".rst", ".txt", ".adoc"} @@ -9,6 +11,8 @@ class DocsFileFilter: _EXCLUDE_PARTS = {"node_modules", ".git", "vendor", "dist", "build", "target", "__pycache__"} def should_index(self, path: str) -> bool: + if should_skip_indexing_path(path): + return False candidate = PurePosixPath(path) if any(part in self._EXCLUDE_PARTS for part in candidate.parts): return False diff --git a/app/modules/rag/indexing/docs/pipeline.py b/src/app/modules/rag/indexing/docs/pipeline.py similarity index 100% rename from app/modules/rag/indexing/docs/pipeline.py rename to src/app/modules/rag/indexing/docs/pipeline.py diff --git a/app/modules/rag_session/indexing_service.py b/src/app/modules/rag/indexing_service.py similarity index 90% rename from app/modules/rag_session/indexing_service.py rename to src/app/modules/rag/indexing_service.py index 8e3c0fe..e3adc07 100644 --- a/app/modules/rag_session/indexing_service.py +++ b/src/app/modules/rag/indexing_service.py @@ -1,10 +1,17 @@ +"""Оркестрация индексации RAG (очередь задач, события).""" + import asyncio from collections import defaultdict from app.schemas.common import ErrorPayload, ModuleName from app.schemas.indexing import IndexJobStatus from app.modules.contracts import RagIndexer -from app.modules.rag_session.job_store import IndexJob, IndexJobStore +from app.modules.rag.indexing.common.path_filter import ( + count_indexable_change_upserts, + filter_changes_for_indexing, + filter_snapshot_files, +) +from app.modules.rag.job_store import IndexJob, IndexJobStore from app.modules.shared.event_bus import EventBus from app.modules.shared.retry_executor import RetryExecutor @@ -34,25 +41,27 @@ class IndexingOrchestrator: return job async def _process_snapshot(self, job_id: str, rag_session_id: str, files: list[dict]) -> None: + filtered_files = filter_snapshot_files(files) await self._run_with_project_lock( job_id=job_id, rag_session_id=rag_session_id, - total_files=len(files), + total_files=len(filtered_files), operation=lambda progress_cb: self._rag.index_snapshot( rag_session_id=rag_session_id, - files=files, + files=filtered_files, progress_cb=progress_cb, ), ) async def _process_changes(self, job_id: str, rag_session_id: str, changed_files: list[dict]) -> None: + filtered_changes = filter_changes_for_indexing(changed_files) await self._run_with_project_lock( job_id=job_id, rag_session_id=rag_session_id, - total_files=len(changed_files), + total_files=count_indexable_change_upserts(filtered_changes), operation=lambda progress_cb: self._rag.index_changes( rag_session_id=rag_session_id, - changed_files=changed_files, + changed_files=filtered_changes, progress_cb=progress_cb, ), ) diff --git a/app/modules/rag/intent_router.md b/src/app/modules/rag/intent_router.md similarity index 100% rename from app/modules/rag/intent_router.md rename to src/app/modules/rag/intent_router.md diff --git a/app/modules/rag/intent_router_v2/__init__.py b/src/app/modules/rag/intent_router_v2/__init__.py similarity index 100% rename from app/modules/rag/intent_router_v2/__init__.py rename to src/app/modules/rag/intent_router_v2/__init__.py diff --git a/src/app/modules/rag/intent_router_v2/analysis/__init__.py b/src/app/modules/rag/intent_router_v2/analysis/__init__.py new file mode 100644 index 0000000..5a05ed4 --- /dev/null +++ b/src/app/modules/rag/intent_router_v2/analysis/__init__.py @@ -0,0 +1,4 @@ +from app.modules.rag.intent_router_v2.analysis.normalization import QueryNormalizer +from app.modules.rag.intent_router_v2.analysis.query_plan_builder import QueryPlanBuilder + +__all__ = ["QueryNormalizer", "QueryPlanBuilder"] diff --git a/app/modules/rag/intent_router_v2/anchor_extractor.py b/src/app/modules/rag/intent_router_v2/analysis/anchor_extractor.py similarity index 95% rename from app/modules/rag/intent_router_v2/anchor_extractor.py rename to src/app/modules/rag/intent_router_v2/analysis/anchor_extractor.py index f01e08c..5b354c3 100644 --- a/app/modules/rag/intent_router_v2/anchor_extractor.py +++ b/src/app/modules/rag/intent_router_v2/analysis/anchor_extractor.py @@ -3,9 +3,9 @@ from __future__ import annotations import re from app.modules.rag.intent_router_v2.models import AnchorSpan, QueryAnchor -from app.modules.rag.intent_router_v2.normalization_terms import KeyTermCanonicalizer -from app.modules.rag.intent_router_v2.symbol_rules import COMMON_PATH_SEGMENTS, PY_KEYWORDS -from app.modules.rag.intent_router_v2.term_mapping import RuEnTermMapper +from app.modules.rag.intent_router_v2.analysis.normalization_terms import KeyTermCanonicalizer +from app.modules.rag.intent_router_v2.analysis.symbol_rules import COMMON_PATH_SEGMENTS, PY_KEYWORDS +from app.modules.rag.intent_router_v2.analysis.term_mapping import RuEnTermMapper _FILE_PATTERN = re.compile(r"(?P\b(?:[\w.-]+/)*[\w.-]+\.(?:py|md|rst|txt|yaml|yml|json|toml|ini|cfg)\b)") _PATH_HINT_PATTERN = re.compile(r"(?P\b(?:src|app|docs|tests)/[\w./-]*[\w-]\b)") diff --git a/app/modules/rag/intent_router_v2/anchor_span_validator.py b/src/app/modules/rag/intent_router_v2/analysis/anchor_span_validator.py similarity index 100% rename from app/modules/rag/intent_router_v2/anchor_span_validator.py rename to src/app/modules/rag/intent_router_v2/analysis/anchor_span_validator.py diff --git a/app/modules/rag/intent_router_v2/conversation_anchor_builder.py b/src/app/modules/rag/intent_router_v2/analysis/conversation_anchor_builder.py similarity index 95% rename from app/modules/rag/intent_router_v2/conversation_anchor_builder.py rename to src/app/modules/rag/intent_router_v2/analysis/conversation_anchor_builder.py index 2ebaa07..e8404a2 100644 --- a/app/modules/rag/intent_router_v2/conversation_anchor_builder.py +++ b/src/app/modules/rag/intent_router_v2/analysis/conversation_anchor_builder.py @@ -1,6 +1,6 @@ from __future__ import annotations -from app.modules.rag.intent_router_v2.followup_detector import FollowUpDetector +from app.modules.rag.intent_router_v2.analysis.followup_detector import FollowUpDetector from app.modules.rag.intent_router_v2.models import ConversationState, QueryAnchor diff --git a/app/modules/rag/intent_router_v2/followup_detector.py b/src/app/modules/rag/intent_router_v2/analysis/followup_detector.py similarity index 100% rename from app/modules/rag/intent_router_v2/followup_detector.py rename to src/app/modules/rag/intent_router_v2/analysis/followup_detector.py diff --git a/app/modules/rag/intent_router_v2/keyword_hint_builder.py b/src/app/modules/rag/intent_router_v2/analysis/keyword_hint_builder.py similarity index 85% rename from app/modules/rag/intent_router_v2/keyword_hint_builder.py rename to src/app/modules/rag/intent_router_v2/analysis/keyword_hint_builder.py index ed10577..b7cb353 100644 --- a/app/modules/rag/intent_router_v2/keyword_hint_builder.py +++ b/src/app/modules/rag/intent_router_v2/analysis/keyword_hint_builder.py @@ -2,8 +2,8 @@ from __future__ import annotations import re -from app.modules.rag.intent_router_v2.normalization import FILE_PATH_RE -from app.modules.rag.intent_router_v2.symbol_rules import COMMON_PATH_SEGMENTS, PY_KEYWORDS +from app.modules.rag.intent_router_v2.analysis.normalization import FILE_PATH_RE +from app.modules.rag.intent_router_v2.analysis.symbol_rules import COMMON_PATH_SEGMENTS, PY_KEYWORDS _IDENTIFIER_RE = re.compile(r"[A-Za-z_][A-Za-z0-9_]{2,}") diff --git a/app/modules/rag/intent_router_v2/keyword_hint_sanitizer.py b/src/app/modules/rag/intent_router_v2/analysis/keyword_hint_sanitizer.py similarity index 100% rename from app/modules/rag/intent_router_v2/keyword_hint_sanitizer.py rename to src/app/modules/rag/intent_router_v2/analysis/keyword_hint_sanitizer.py diff --git a/app/modules/rag/intent_router_v2/negation_detector.py b/src/app/modules/rag/intent_router_v2/analysis/negation_detector.py similarity index 100% rename from app/modules/rag/intent_router_v2/negation_detector.py rename to src/app/modules/rag/intent_router_v2/analysis/negation_detector.py diff --git a/app/modules/rag/intent_router_v2/normalization.py b/src/app/modules/rag/intent_router_v2/analysis/normalization.py similarity index 100% rename from app/modules/rag/intent_router_v2/normalization.py rename to src/app/modules/rag/intent_router_v2/analysis/normalization.py diff --git a/app/modules/rag/intent_router_v2/normalization_terms.py b/src/app/modules/rag/intent_router_v2/analysis/normalization_terms.py similarity index 100% rename from app/modules/rag/intent_router_v2/normalization_terms.py rename to src/app/modules/rag/intent_router_v2/analysis/normalization_terms.py diff --git a/src/app/modules/rag/intent_router_v2/analysis/query_normalizer.py b/src/app/modules/rag/intent_router_v2/analysis/query_normalizer.py new file mode 100644 index 0000000..7884cbc --- /dev/null +++ b/src/app/modules/rag/intent_router_v2/analysis/query_normalizer.py @@ -0,0 +1,3 @@ +from app.modules.rag.intent_router_v2.analysis.normalization import QueryNormalizer + +__all__ = ["QueryNormalizer"] diff --git a/app/modules/rag/intent_router_v2/query_plan_builder.py b/src/app/modules/rag/intent_router_v2/analysis/query_plan_builder.py similarity index 65% rename from app/modules/rag/intent_router_v2/query_plan_builder.py rename to src/app/modules/rag/intent_router_v2/analysis/query_plan_builder.py index 47f30fc..e56bbd0 100644 --- a/app/modules/rag/intent_router_v2/query_plan_builder.py +++ b/src/app/modules/rag/intent_router_v2/analysis/query_plan_builder.py @@ -1,21 +1,30 @@ from __future__ import annotations -from app.modules.rag.intent_router_v2.anchor_extractor import AnchorExtractor -from app.modules.rag.intent_router_v2.anchor_span_validator import AnchorSpanValidator -from app.modules.rag.intent_router_v2.conversation_anchor_builder import ConversationAnchorBuilder -from app.modules.rag.intent_router_v2.keyword_hint_builder import KeywordHintBuilder -from app.modules.rag.intent_router_v2.keyword_hint_sanitizer import KeywordHintSanitizer +from app.modules.rag.intent_router_v2.analysis.anchor_extractor import AnchorExtractor +from app.modules.rag.intent_router_v2.analysis.anchor_span_validator import AnchorSpanValidator +from app.modules.rag.intent_router_v2.analysis.conversation_anchor_builder import ConversationAnchorBuilder +from app.modules.rag.intent_router_v2.analysis.keyword_hint_builder import KeywordHintBuilder +from app.modules.rag.intent_router_v2.analysis.keyword_hint_sanitizer import KeywordHintSanitizer from app.modules.rag.intent_router_v2.models import ConversationState, QueryAnchor, QueryPlan -from app.modules.rag.intent_router_v2.negation_detector import NegationDetector -from app.modules.rag.intent_router_v2.normalization import QueryNormalizer -from app.modules.rag.intent_router_v2.sub_intent_detector import SubIntentDetector -from app.modules.rag.intent_router_v2.test_signals import has_test_focus, is_negative_test_request, is_test_related_token -from app.modules.rag.intent_router_v2.term_mapping import RuEnTermMapper +from app.modules.rag.intent_router_v2.analysis.negation_detector import NegationDetector +from app.modules.rag.intent_router_v2.analysis.normalization import QueryNormalizer +from app.modules.rag.intent_router_v2.analysis.sub_intent_detector import SubIntentDetector +from app.modules.rag.intent_router_v2.analysis.test_signals import has_test_focus, is_negative_test_request, is_test_related_token +from app.modules.rag.intent_router_v2.analysis.term_mapping import RuEnTermMapper class QueryPlanBuilder: _WHY_MARKERS = ("почему", "зачем", "откуда", "из-за чего") _NEXT_STEP_MARKERS = ("что дальше", "дальше что", "и что теперь", "продолжай") + _DOCS_TOPIC_HINTS = { + "деплой": ["deploy", "deployment", "docker", "compose", "env", "config", "production", "ci/cd"], + "deploy": ["deploy", "deployment", "docker", "compose", "env", "config", "production", "ci/cd"], + "docker": ["docker", "compose"], + "production": ["production", "deploy", "env"], + "ci": ["ci/cd", "pipeline", "deploy"], + "cd": ["ci/cd", "pipeline", "deploy"], + "установ": ["install", "setup", "config"], + } def __init__( self, normalizer: QueryNormalizer | None = None, @@ -77,6 +86,19 @@ class QueryPlanBuilder: intent=intent, state=conversation_state, ) + symbol_candidates = self._symbol_candidates(cleaned_anchors) + symbol_kind_hint = self._symbol_kind_hint(raw, cleaned_anchors) + path_hints = self._path_hints(cleaned_anchors) + doc_scope_hints = self._doc_scope_hints(intent, raw, keyword_hints, path_hints) + if sub_intent == "OPEN_FILE": + keyword_hints = [] + symbol_candidates = [] + symbol_kind_hint = "unknown" + doc_scope_hints = [] + if intent == "DOCS_QA": + symbol_candidates = [] + symbol_kind_hint = "unknown" + keyword_hints = self._docs_keyword_hints(raw, keyword_hints) return QueryPlan( raw=raw, normalized=normalized, @@ -84,6 +106,10 @@ class QueryPlanBuilder: negations=sorted(negations), expansions=expansions, keyword_hints=keyword_hints, + path_hints=path_hints, + doc_scope_hints=doc_scope_hints, + symbol_candidates=symbol_candidates, + symbol_kind_hint=symbol_kind_hint, anchors=cleaned_anchors, ) @@ -221,3 +247,63 @@ class QueryPlanBuilder: def _looks_like_file(self, value: str) -> bool: tail = (value or "").rsplit("/", 1)[-1] return "." in tail + + def _path_hints(self, anchors: list[QueryAnchor]) -> list[str]: + values: list[str] = [] + for anchor in anchors: + if anchor.type != "FILE_PATH": + continue + if anchor.value not in values: + values.append(anchor.value) + return values[:8] + + def _symbol_candidates(self, anchors: list[QueryAnchor]) -> list[str]: + values: list[str] = [] + for anchor in anchors: + if anchor.type != "SYMBOL": + continue + if anchor.value not in values: + values.append(anchor.value) + return values[:8] + + def _symbol_kind_hint(self, raw: str, anchors: list[QueryAnchor]) -> str: + text = " ".join((raw or "").lower().split()) + if "класс" in text or "class " in text: + return "class" + if "функц" in text or "function " in text: + return "function" + if "метод" in text or "method " in text: + return "method" + if "модул" in text or "module " in text: + return "module" + symbol = next((anchor.value for anchor in anchors if anchor.type == "SYMBOL"), "") + if symbol and symbol[:1].isupper(): + return "class" + if "_" in symbol: + return "function" + return "unknown" + + def _docs_keyword_hints(self, raw: str, values: list[str]) -> list[str]: + text = " ".join((raw or "").lower().split()) + result = list(values) + for marker, hints in self._DOCS_TOPIC_HINTS.items(): + if marker not in text: + continue + for hint in hints: + if hint not in result: + result.append(hint) + return result[:12] + + def _doc_scope_hints(self, intent: str, raw: str, keyword_hints: list[str], path_hints: list[str]) -> list[str]: + if intent != "DOCS_QA": + return [] + values = list(path_hints) + for candidate in ("README*", "docs/**", "**/*.md"): + if candidate not in values: + values.append(candidate) + for hint in keyword_hints: + if hint.lower() in {"readme", "deploy", "deployment", "docker", "compose"} and hint not in values: + values.append(hint) + if "docs/" in (raw or "").lower() and "docs/**" not in values: + values.append("docs/**") + return values[:8] diff --git a/src/app/modules/rag/intent_router_v2/analysis/sub_intent_detector.py b/src/app/modules/rag/intent_router_v2/analysis/sub_intent_detector.py new file mode 100644 index 0000000..61b1e90 --- /dev/null +++ b/src/app/modules/rag/intent_router_v2/analysis/sub_intent_detector.py @@ -0,0 +1,116 @@ +from __future__ import annotations + + +class SubIntentDetector: + """Rule-based sub-intent detector. + + Heuristics distinguish two close classes of questions: + - FIND_ENTRYPOINTS: "where does this endpoint/route start?" + - TRACE_FLOW: "what happens step by step for this symbol/request?" + """ + + _OPEN_VERBS = ("открой", "посмотри", "покажи", "выведи", "show", "open") + _EXPLAIN_MARKERS = ("объясни", "как работает", "почему", "что делает", "зачем", "логика", "флоу", "flow") + _TEST_MARKERS = ("тест", "pytest", "unit test", "юнит") + _TRACE_FLOW_MARKERS = ( + "trace flow", + "execution trace", + "dataflow", + "request flow", + "request path", + "поток", + "поток данных", + "поток выполнения", + "поток запроса", + "как проходит запрос", + "как обрабатывается запрос", + "обработка запроса", + "что происходит при запросе", + "какие шаги выполняются", + "по шагам", + "при запуске", + "трассиров", + "кто читает", + "кто пишет", + "что вызывает", + "где создается", + "где создаётся", + ) + _ARCHITECTURE_MARKERS = ( + "архитектур", + "architecture", + "какие сервисы", + "какие обработчики", + "какие компоненты", + "бизнес-логика", + "business logic", + "io", + ) + _ENTRYPOINTS_MARKERS = ( + "entrypoint", + "entrypoints", + "endpoint", + "route", + "handler", + "точки входа", + "точка входа", + "маршрут", + "роут", + "url", + "main", + "запуск", + "как запускается", + "где вход", + ) + _HTTP_ENTRYPOINT_MARKERS = ("endpoint", "route", "handler", "маршрут", "роут", "url") + + def detect(self, raw: str, *, has_file_path: bool, negations: set[str]) -> str: + raw_text = " ".join((raw or "").split()) + text = raw_text.lower() + if not text: + return "EXPLAIN" + if has_file_path and self._has_open_verb(text) and not self._has_explain_markers(text): + return "OPEN_FILE" + if has_file_path and ("файл" in text or "file" in text) and not self._has_explain_markers(text): + return "OPEN_FILE" + if "tests" not in negations and any(marker in text for marker in self._TEST_MARKERS): + return "FIND_TESTS" + has_flow = self._has_trace_flow_markers(text) + has_entrypoints = any(marker in text for marker in self._ENTRYPOINTS_MARKERS) + has_target = has_file_path or self._has_http_path(text) or self._has_symbol_like_target(raw_text) + if has_flow and has_target: + return "TRACE_FLOW" + if self._has_http_path(text) and any(marker in text for marker in self._HTTP_ENTRYPOINT_MARKERS): + return "FIND_ENTRYPOINTS" + if has_entrypoints: + return "FIND_ENTRYPOINTS" + if has_flow: + return "TRACE_FLOW" + if any(marker in text for marker in self._ARCHITECTURE_MARKERS): + return "ARCHITECTURE" + return "EXPLAIN" + + def _has_open_verb(self, text: str) -> bool: + return any(text.startswith(verb) or f" {verb} " in f" {text} " for verb in self._OPEN_VERBS) + + def _has_explain_markers(self, text: str) -> bool: + return any(marker in text for marker in self._EXPLAIN_MARKERS) + + def _has_trace_flow_markers(self, text: str) -> bool: + return any(marker in text for marker in self._TRACE_FLOW_MARKERS) + + def _has_http_path(self, text: str) -> bool: + return any(token.startswith("/") and len(token) > 1 for token in text.split()) + + def _has_symbol_like_target(self, text: str) -> bool: + tokens = [token.strip(".,:;?!()[]{}\"'") for token in text.split()] + for token in tokens: + if not token: + continue + if token.startswith("/"): + return True + if "_" in token: + return True + if len(token) >= 4 and any(char.isupper() for char in token): + return True + return False diff --git a/app/modules/rag/intent_router_v2/symbol_rules.py b/src/app/modules/rag/intent_router_v2/analysis/symbol_rules.py similarity index 100% rename from app/modules/rag/intent_router_v2/symbol_rules.py rename to src/app/modules/rag/intent_router_v2/analysis/symbol_rules.py diff --git a/app/modules/rag/intent_router_v2/term_mapping.py b/src/app/modules/rag/intent_router_v2/analysis/term_mapping.py similarity index 96% rename from app/modules/rag/intent_router_v2/term_mapping.py rename to src/app/modules/rag/intent_router_v2/analysis/term_mapping.py index 62aaab7..796b847 100644 --- a/app/modules/rag/intent_router_v2/term_mapping.py +++ b/src/app/modules/rag/intent_router_v2/analysis/term_mapping.py @@ -2,7 +2,7 @@ from __future__ import annotations import re -from app.modules.rag.intent_router_v2.normalization_terms import KeyTermCanonicalizer +from app.modules.rag.intent_router_v2.analysis.normalization_terms import KeyTermCanonicalizer _WORD_RE = re.compile(r"[A-Za-zА-Яа-яЁё-]+") diff --git a/app/modules/rag/intent_router_v2/test_signals.py b/src/app/modules/rag/intent_router_v2/analysis/test_signals.py similarity index 100% rename from app/modules/rag/intent_router_v2/test_signals.py rename to src/app/modules/rag/intent_router_v2/analysis/test_signals.py diff --git a/app/modules/rag/intent_router_v2/factory.py b/src/app/modules/rag/intent_router_v2/factory.py similarity index 92% rename from app/modules/rag/intent_router_v2/factory.py rename to src/app/modules/rag/intent_router_v2/factory.py index e16bc49..57ebd21 100644 --- a/app/modules/rag/intent_router_v2/factory.py +++ b/src/app/modules/rag/intent_router_v2/factory.py @@ -2,7 +2,7 @@ from __future__ import annotations from app.modules.agent.llm import AgentLlmService from app.modules.agent.prompt_loader import PromptLoader -from app.modules.rag.intent_router_v2.classifier import IntentClassifierV2 +from app.modules.rag.intent_router_v2.intent.classifier import IntentClassifierV2 from app.modules.rag.intent_router_v2.router import IntentRouterV2 from app.modules.shared.env_loader import load_workspace_env from app.modules.shared.gigachat.client import GigaChatClient diff --git a/src/app/modules/rag/intent_router_v2/intent/__init__.py b/src/app/modules/rag/intent_router_v2/intent/__init__.py new file mode 100644 index 0000000..1a84e6f --- /dev/null +++ b/src/app/modules/rag/intent_router_v2/intent/__init__.py @@ -0,0 +1,5 @@ +from app.modules.rag.intent_router_v2.intent.classifier import IntentClassifierV2 +from app.modules.rag.intent_router_v2.intent.conversation_policy import ConversationPolicy +from app.modules.rag.intent_router_v2.intent.graph_id_resolver import GraphIdResolver + +__all__ = ["IntentClassifierV2", "ConversationPolicy", "GraphIdResolver"] diff --git a/app/modules/rag/intent_router_v2/classifier.py b/src/app/modules/rag/intent_router_v2/intent/classifier.py similarity index 90% rename from app/modules/rag/intent_router_v2/classifier.py rename to src/app/modules/rag/intent_router_v2/intent/classifier.py index 0ba2c3a..e1ec761 100644 --- a/app/modules/rag/intent_router_v2/classifier.py +++ b/src/app/modules/rag/intent_router_v2/intent/classifier.py @@ -5,7 +5,7 @@ import re from app.modules.rag.intent_router_v2.models import ConversationState, IntentDecision from app.modules.rag.intent_router_v2.protocols import TextGenerator -from app.modules.rag.intent_router_v2.test_signals import has_test_focus +from app.modules.rag.intent_router_v2.analysis.test_signals import has_test_focus _CODE_FILE_PATH_RE = re.compile( r"\b(?:[\w.-]+/)*[\w.-]+\.(?:py|js|jsx|ts|tsx|java|kt|go|rb|php|c|cc|cpp|h|hpp|cs|swift|rs)(?!\w)\b", @@ -23,7 +23,25 @@ class IntentClassifierV2: "write documentation", ) _DOCS_MARKERS = ("документац", "readme", "docs/", ".md", "spec", "runbook", "markdown") - _CODE_MARKERS = ("по коду", "код", "класс", "метод", "функц", "модул", "пакет", "файл", "block", "блок", "handler", "endpoint") + _CODE_MARKERS = ( + "по коду", + "код", + "класс", + "метод", + "функц", + "модул", + "пакет", + "файл", + "block", + "блок", + "handler", + "endpoint", + "архитектур", + "сервис", + "обработчик", + "pipeline", + "бизнес-логика", + ) def __init__(self, llm: TextGenerator | None = None) -> None: self._llm = llm diff --git a/app/modules/rag/intent_router_v2/conversation_policy.py b/src/app/modules/rag/intent_router_v2/intent/conversation_policy.py similarity index 77% rename from app/modules/rag/intent_router_v2/conversation_policy.py rename to src/app/modules/rag/intent_router_v2/intent/conversation_policy.py index 3777f03..fecd3a4 100644 --- a/app/modules/rag/intent_router_v2/conversation_policy.py +++ b/src/app/modules/rag/intent_router_v2/intent/conversation_policy.py @@ -5,14 +5,21 @@ from app.modules.rag.intent_router_v2.models import ConversationState, IntentDec class ConversationPolicy: _SWITCH_MARKERS = ( - "теперь", - "а теперь", - "давай теперь", "переключ", "new task", "switch to", "instead", ) + _FOLLOWUP_MARKERS = ( + "теперь", + "а теперь", + "давай теперь", + "дальше", + "потом", + "следом", + "next", + "then", + ) _DOCS_SIGNALS = ("документац", "readme", "docs/", ".md") _CODE_SIGNALS = ("по коду", "класс", "метод", "файл", "блок кода", "function", "class") @@ -20,18 +27,25 @@ class ConversationPolicy: active_intent = conversation_state.active_intent if active_intent is None: return decision.intent, "START" + followup_likely = self._is_followup_likely(user_query) if active_intent == decision.intent: - return active_intent, "CONTINUE" + return active_intent, "FOLLOWUP_LIKELY" if followup_likely else "CONTINUE" if self._has_explicit_switch(user_query): return decision.intent, "SWITCH" if self._is_hard_mismatch(active_intent, decision.intent, user_query): return decision.intent, "SWITCH" + if followup_likely: + return active_intent, "FOLLOWUP_LIKELY" return active_intent, "CONTINUE" def _has_explicit_switch(self, user_query: str) -> bool: text = " ".join((user_query or "").lower().split()) return any(marker in text for marker in self._SWITCH_MARKERS) + def _is_followup_likely(self, user_query: str) -> bool: + text = " ".join((user_query or "").lower().split()) + return any(marker in text for marker in self._FOLLOWUP_MARKERS) + def _is_hard_mismatch(self, active_intent: str, candidate_intent: str, user_query: str) -> bool: if active_intent == candidate_intent: return False diff --git a/app/modules/rag/intent_router_v2/graph_id_resolver.py b/src/app/modules/rag/intent_router_v2/intent/graph_id_resolver.py similarity index 100% rename from app/modules/rag/intent_router_v2/graph_id_resolver.py rename to src/app/modules/rag/intent_router_v2/intent/graph_id_resolver.py diff --git a/app/modules/rag/intent_router_v2/local_runner.py b/src/app/modules/rag/intent_router_v2/local_runner.py similarity index 100% rename from app/modules/rag/intent_router_v2/local_runner.py rename to src/app/modules/rag/intent_router_v2/local_runner.py diff --git a/app/modules/rag/intent_router_v2/logger.py b/src/app/modules/rag/intent_router_v2/logger.py similarity index 84% rename from app/modules/rag/intent_router_v2/logger.py rename to src/app/modules/rag/intent_router_v2/logger.py index 2775bf8..911b502 100644 --- a/app/modules/rag/intent_router_v2/logger.py +++ b/src/app/modules/rag/intent_router_v2/logger.py @@ -1,5 +1,6 @@ from __future__ import annotations +import json import logging from app.modules.rag.intent_router_v2.models import ConversationState, IntentRouterResult, RepoContext @@ -19,4 +20,5 @@ class IntentRouterLogger: ) def log_result(self, result: IntentRouterResult) -> None: - LOGGER.warning("intent router v2 result: %s", result.model_dump_json(ensure_ascii=False)) + payload = json.dumps(result.model_dump(), ensure_ascii=False) + LOGGER.warning("intent router v2 result: %s", payload) diff --git a/app/modules/rag/intent_router_v2/models.py b/src/app/modules/rag/intent_router_v2/models.py similarity index 78% rename from app/modules/rag/intent_router_v2/models.py rename to src/app/modules/rag/intent_router_v2/models.py index d5897d5..61054f7 100644 --- a/app/modules/rag/intent_router_v2/models.py +++ b/src/app/modules/rag/intent_router_v2/models.py @@ -7,9 +7,12 @@ from pydantic import BaseModel, ConfigDict, Field, field_validator IntentType = Literal["CODE_QA", "DOCS_QA", "GENERATE_DOCS_FROM_CODE", "PROJECT_MISC"] -ConversationMode = Literal["START", "CONTINUE", "SWITCH"] +ConversationMode = Literal["START", "CONTINUE", "SWITCH", "FOLLOWUP_LIKELY"] +RetrievalProfile = Literal["code", "docs"] AnchorType = Literal["FILE_PATH", "SYMBOL", "DOC_REF", "KEY_TERM"] AnchorSource = Literal["user_text", "conversation_state", "heuristic"] +SymbolKindHint = Literal["class", "function", "method", "module", "unknown"] +SymbolResolutionStatus = Literal["not_requested", "pending", "resolved", "ambiguous", "not_found"] _INLINE_CODE_RE = re.compile(r"`([^`]*)`") _CODE_SYMBOL_RE = re.compile(r"\b([A-Za-z_][A-Za-z0-9_]{2,})\b") @@ -46,9 +49,42 @@ class QueryPlan(BaseModel): negations: list[str] = Field(default_factory=list) expansions: list[str] = Field(default_factory=list) keyword_hints: list[str] = Field(default_factory=list) + path_hints: list[str] = Field(default_factory=list) + doc_scope_hints: list[str] = Field(default_factory=list) + symbol_candidates: list[str] = Field(default_factory=list) + symbol_kind_hint: SymbolKindHint = "unknown" anchors: list[QueryAnchor] = Field(default_factory=list) +class FuzzySymbolSearch(BaseModel): + model_config = ConfigDict(extra="forbid") + + enabled: bool = True + max_distance: int = 2 + top_k: int = 5 + + +class RetrievalConstraints(BaseModel): + model_config = ConfigDict(extra="forbid") + + include_globs: list[str] = Field(default_factory=list) + exclude_globs: list[str] = Field(default_factory=list) + prefer_globs: list[str] = Field(default_factory=list) + test_file_globs: list[str] = Field(default_factory=list) + test_symbol_patterns: list[str] = Field(default_factory=list) + max_candidates: int = 20 + fuzzy_symbol_search: FuzzySymbolSearch = Field(default_factory=FuzzySymbolSearch) + + +class SymbolResolution(BaseModel): + model_config = ConfigDict(extra="forbid") + + status: SymbolResolutionStatus = "not_requested" + resolved_symbol: str | None = None + alternatives: list[str] = Field(default_factory=list) + confidence: float = 0.0 + + class LayerQuery(BaseModel): model_config = ConfigDict(extra="forbid") @@ -105,10 +141,13 @@ class IntentRouterResult(BaseModel): schema_version: str = "1.1" intent: IntentType + retrieval_profile: RetrievalProfile = "code" graph_id: str conversation_mode: ConversationMode query_plan: QueryPlan retrieval_spec: RetrievalSpec + retrieval_constraints: RetrievalConstraints = Field(default_factory=RetrievalConstraints) + symbol_resolution: SymbolResolution = Field(default_factory=SymbolResolution) evidence_policy: EvidencePolicy diff --git a/app/modules/rag/intent_router_v2/protocols.py b/src/app/modules/rag/intent_router_v2/protocols.py similarity index 100% rename from app/modules/rag/intent_router_v2/protocols.py rename to src/app/modules/rag/intent_router_v2/protocols.py diff --git a/src/app/modules/rag/intent_router_v2/readme.md b/src/app/modules/rag/intent_router_v2/readme.md new file mode 100644 index 0000000..43896e0 --- /dev/null +++ b/src/app/modules/rag/intent_router_v2/readme.md @@ -0,0 +1,37 @@ +# intent_router_v2 + +## Назначение +Маршрутизация пользовательского запроса в retrieval-профиль и граф выполнения. + +## Структура пакета +- `router.py` — фасад `IntentRouterV2`. +- `intent/` — классификация intent и политика диалога. +- `analysis/` — нормализация запроса, anchors, sub-intent, план запроса. +- `retrieval/` — выбор слоев RAG и фильтров retrieval. +- `factory.py` — сборка роутера с GigaChat-классификатором. + +## Публичный API +- `IntentRouterV2.route(user_query, conversation_state, repo_context) -> IntentRouterResult` +- `GigaChatIntentRouterFactory.build() -> IntentRouterV2` +- `IntentRouterScenarioRunner.run(queries, repo_context) -> list[IntentRouterResult]` +- `models`: + - `ConversationState` + - `RepoContext` + - `IntentRouterResult` + - `QueryPlan` + - `QueryAnchor` + +## Контракт результата `IntentRouterResult` +- `intent`: `CODE_QA | DOCS_QA | GENERATE_DOCS_FROM_CODE | PROJECT_MISC` +- `retrieval_profile`: `code | docs` +- `graph_id`: целевой graph в agent runtime +- `query_plan`: нормализованный запрос, anchors, sub-intent, keyword/path/doc hints +- `retrieval_spec`: слои + фильтры для RAG +- `retrieval_constraints`: include/exclude ограничения +- `symbol_resolution`: начальный статус резолва символа +- `evidence_policy`: политика набора источников + +## Правила расширения +- Новая логика анализа запроса добавляется в `analysis/`. +- Новая политика retrieval добавляется в `retrieval/`. +- `router.py` остается orchestration-слоем и не содержит доменной логики парсинга. diff --git a/src/app/modules/rag/intent_router_v2/retrieval/__init__.py b/src/app/modules/rag/intent_router_v2/retrieval/__init__.py new file mode 100644 index 0000000..5e370e5 --- /dev/null +++ b/src/app/modules/rag/intent_router_v2/retrieval/__init__.py @@ -0,0 +1,4 @@ +from app.modules.rag.intent_router_v2.retrieval.retrieval_spec_factory import RetrievalSpecFactory +from app.modules.rag.intent_router_v2.retrieval.retrieval_constraints_factory import RetrievalConstraintsFactory + +__all__ = ["RetrievalSpecFactory", "RetrievalConstraintsFactory"] diff --git a/app/modules/rag/intent_router_v2/evidence_policy_factory.py b/src/app/modules/rag/intent_router_v2/retrieval/evidence_policy_factory.py similarity index 81% rename from app/modules/rag/intent_router_v2/evidence_policy_factory.py rename to src/app/modules/rag/intent_router_v2/retrieval/evidence_policy_factory.py index c090bd6..3435e7f 100644 --- a/app/modules/rag/intent_router_v2/evidence_policy_factory.py +++ b/src/app/modules/rag/intent_router_v2/retrieval/evidence_policy_factory.py @@ -18,6 +18,10 @@ class EvidencePolicyFactory: return EvidencePolicy(require_def=False, require_flow=False, require_spec=False, allow_answer_without_evidence=False) if sub_intent == "EXPLAIN_LOCAL": return EvidencePolicy(require_def=True, require_flow=False, require_spec=False, allow_answer_without_evidence=False) + if sub_intent == "TRACE_FLOW": + return EvidencePolicy(require_def=True, require_flow=True, require_spec=False, allow_answer_without_evidence=False) + if sub_intent == "ARCHITECTURE": + return EvidencePolicy(require_def=True, require_flow=True, require_spec=False, allow_answer_without_evidence=False) if "tests" in negations_set and not has_user_anchor: return EvidencePolicy(require_def=True, require_flow=False, require_spec=False, allow_answer_without_evidence=False) return EvidencePolicy(require_def=True, require_flow=True, require_spec=False, allow_answer_without_evidence=False) diff --git a/app/modules/rag/intent_router_v2/layer_query_builder.py b/src/app/modules/rag/intent_router_v2/retrieval/layer_query_builder.py similarity index 100% rename from app/modules/rag/intent_router_v2/layer_query_builder.py rename to src/app/modules/rag/intent_router_v2/retrieval/layer_query_builder.py diff --git a/src/app/modules/rag/intent_router_v2/retrieval/retrieval_constraints_factory.py b/src/app/modules/rag/intent_router_v2/retrieval/retrieval_constraints_factory.py new file mode 100644 index 0000000..3b06e12 --- /dev/null +++ b/src/app/modules/rag/intent_router_v2/retrieval/retrieval_constraints_factory.py @@ -0,0 +1,118 @@ +from __future__ import annotations + +from app.modules.rag.intent_router_v2.models import QueryAnchor, RetrievalConstraints, RetrievalProfile +from app.modules.rag.intent_router_v2.analysis.test_signals import has_test_focus, is_negative_test_request + + +class RetrievalConstraintsFactory: + _DEFAULT_DOCS_INCLUDE = ["docs/**", "README*", "**/*.md"] + _DEFAULT_DOCS_EXCLUDE = [".venv/**", "node_modules/**", "**/*.bin", "**/*.png", "**/*.jpg"] + _DEFAULT_EXCLUDE_TESTS = [ + "tests/**", + "**/test_*.py", + "**/*_test.py", + ] + _TEST_FILE_GLOBS = [ + "tests/**", + "**/test_*.py", + "**/*_test.py", + "**/conftest.py", + ] + + def build( + self, + *, + retrieval_profile: RetrievalProfile, + sub_intent: str, + raw_query: str, + anchors: list[QueryAnchor], + path_scope: list[str], + ) -> RetrievalConstraints: + if retrieval_profile == "docs": + return self._docs_constraints(sub_intent=sub_intent, path_scope=path_scope) + return self._code_constraints(sub_intent=sub_intent, raw_query=raw_query, anchors=anchors) + + def _code_constraints(self, *, sub_intent: str, raw_query: str, anchors: list[QueryAnchor]) -> RetrievalConstraints: + include_tests = sub_intent == "FIND_TESTS" or has_test_focus(raw_query) + exclude_tests = is_negative_test_request(raw_query) + if include_tests: + include_globs = ["src/**", *self._TEST_FILE_GLOBS] + prefer_globs = ["tests/**", "**/test_*.py", "**/*_test.py"] + exclude_globs: list[str] = [] + else: + include_globs = ["src/**"] + prefer_globs = [] + exclude_globs = list(self._DEFAULT_EXCLUDE_TESTS) + if exclude_tests: + include_globs = ["src/**"] + prefer_globs = [] + exclude_globs = list(self._DEFAULT_EXCLUDE_TESTS) + if sub_intent == "OPEN_FILE": + include_globs = self._open_file_globs(anchors) or include_globs + prefer_globs = [] + test_file_globs = list(self._TEST_FILE_GLOBS) if sub_intent == "FIND_TESTS" else [] + test_symbol_patterns = self._test_symbol_patterns(anchors) if sub_intent == "FIND_TESTS" else [] + return RetrievalConstraints( + include_globs=include_globs, + exclude_globs=exclude_globs, + prefer_globs=prefer_globs, + test_file_globs=test_file_globs, + test_symbol_patterns=test_symbol_patterns, + max_candidates=20, + fuzzy_symbol_search={ + "enabled": sub_intent != "OPEN_FILE", + "max_distance": 2, + "top_k": 5, + }, + ) + + def _docs_constraints(self, *, sub_intent: str, path_scope: list[str]) -> RetrievalConstraints: + include_globs = self._dedupe([*path_scope, *self._DEFAULT_DOCS_INCLUDE]) if path_scope else list(self._DEFAULT_DOCS_INCLUDE) + return RetrievalConstraints( + include_globs=include_globs, + exclude_globs=list(self._DEFAULT_DOCS_EXCLUDE), + prefer_globs=[], + test_file_globs=[], + test_symbol_patterns=[], + max_candidates=20, + fuzzy_symbol_search={ + "enabled": sub_intent != "OPEN_FILE", + "max_distance": 2, + "top_k": 5, + }, + ) + + def _open_file_globs(self, anchors: list[QueryAnchor]) -> list[str]: + for anchor in anchors: + if anchor.type != "FILE_PATH": + continue + value = anchor.value.strip() + if not value: + continue + return [value] + return [] + + def _test_symbol_patterns(self, anchors: list[QueryAnchor]) -> list[str]: + result: list[str] = [] + symbols = [anchor.value for anchor in anchors if anchor.type == "SYMBOL"] + for symbol in symbols[:3]: + snake = self._camel_to_snake(symbol) + for pattern in (f"test_{snake}", f"Test{symbol}", symbol): + if pattern and pattern not in result: + result.append(pattern) + return result + + def _camel_to_snake(self, value: str) -> str: + chars: list[str] = [] + for index, char in enumerate(value): + if index > 0 and char.isupper() and value[index - 1].isalnum(): + chars.append("_") + chars.append(char.lower()) + return "".join(chars).strip("_") + + def _dedupe(self, values: list[str]) -> list[str]: + result: list[str] = [] + for value in values: + if value and value not in result: + result.append(value) + return result diff --git a/app/modules/rag/intent_router_v2/retrieval_filter_builder.py b/src/app/modules/rag/intent_router_v2/retrieval/retrieval_filter_builder.py similarity index 92% rename from app/modules/rag/intent_router_v2/retrieval_filter_builder.py rename to src/app/modules/rag/intent_router_v2/retrieval/retrieval_filter_builder.py index ed86b9c..b31de17 100644 --- a/app/modules/rag/intent_router_v2/retrieval_filter_builder.py +++ b/src/app/modules/rag/intent_router_v2/retrieval/retrieval_filter_builder.py @@ -8,7 +8,7 @@ from app.modules.rag.intent_router_v2.models import ( QueryAnchor, RepoContext, ) -from app.modules.rag.intent_router_v2.test_signals import has_test_focus, is_negative_test_request, is_test_related_token +from app.modules.rag.intent_router_v2.analysis.test_signals import has_test_focus, is_negative_test_request, is_test_related_token class RetrievalFilterBuilder: @@ -38,19 +38,21 @@ class RetrievalFilterBuilder: ) if domains == ["CODE"]: return CodeRetrievalFilters( - test_policy=self._test_policy(raw_query, anchors), + test_policy=self._test_policy(raw_query, anchors, sub_intent=sub_intent), path_scope=path_scope, language=list(repo_context.languages), ) return HybridRetrievalFilters( - test_policy=self._test_policy(raw_query, anchors), + test_policy=self._test_policy(raw_query, anchors, sub_intent=sub_intent), path_scope=path_scope, language=list(repo_context.languages), doc_kinds=self._doc_kinds(anchors, raw_query), doc_language=[], ) - def _test_policy(self, raw_query: str, anchors: list[QueryAnchor]) -> str: + def _test_policy(self, raw_query: str, anchors: list[QueryAnchor], *, sub_intent: str) -> str: + if sub_intent == "FIND_TESTS": + return "INCLUDE" if is_negative_test_request(raw_query): return "EXCLUDE" if has_test_focus(raw_query): diff --git a/app/modules/rag/intent_router_v2/retrieval_spec_factory.py b/src/app/modules/rag/intent_router_v2/retrieval/retrieval_spec_factory.py similarity index 60% rename from app/modules/rag/intent_router_v2/retrieval_spec_factory.py rename to src/app/modules/rag/intent_router_v2/retrieval/retrieval_spec_factory.py index 69ab20d..90f03f1 100644 --- a/app/modules/rag/intent_router_v2/retrieval_spec_factory.py +++ b/src/app/modules/rag/intent_router_v2/retrieval/retrieval_spec_factory.py @@ -1,18 +1,19 @@ from __future__ import annotations from app.modules.rag.contracts.enums import RagLayer -from app.modules.rag.intent_router_v2.layer_query_builder import LayerQueryBuilder +from app.modules.rag.intent_router_v2.retrieval.layer_query_builder import LayerQueryBuilder from app.modules.rag.intent_router_v2.models import ConversationState, QueryAnchor, RepoContext, RetrievalSpec -from app.modules.rag.intent_router_v2.retrieval_filter_builder import RetrievalFilterBuilder +from app.modules.rag.intent_router_v2.retrieval.retrieval_filter_builder import RetrievalFilterBuilder class RetrievalSpecFactory: _LAYERS = { "CODE_QA": [ - (RagLayer.CODE_ENTRYPOINTS, 6), (RagLayer.CODE_SYMBOL_CATALOG, 8), - (RagLayer.CODE_DEPENDENCY_GRAPH, 6), (RagLayer.CODE_SOURCE_CHUNKS, 8), + (RagLayer.CODE_SEMANTIC_ROLES, 8), + (RagLayer.CODE_DEPENDENCY_GRAPH, 6), + (RagLayer.CODE_ENTRYPOINTS, 6), ], "DOCS_QA": [ (RagLayer.DOCS_MODULE_CATALOG, 5), @@ -48,15 +49,38 @@ class RetrievalSpecFactory: _OPEN_FILE_LAYERS = [ (RagLayer.CODE_SOURCE_CHUNKS, 12), ] - _OPEN_FILE_WITH_SYMBOL_LAYERS = [ - (RagLayer.CODE_SOURCE_CHUNKS, 12), - (RagLayer.CODE_SYMBOL_CATALOG, 6), + _FIND_ENTRYPOINTS_LAYERS = [ + (RagLayer.CODE_ENTRYPOINTS, 12), + (RagLayer.CODE_SOURCE_CHUNKS, 6), ] _EXPLAIN_LOCAL_LAYERS = [ - (RagLayer.CODE_SOURCE_CHUNKS, 12), (RagLayer.CODE_SYMBOL_CATALOG, 8), + (RagLayer.CODE_SOURCE_CHUNKS, 12), (RagLayer.CODE_DEPENDENCY_GRAPH, 4), ] + _FIND_TESTS_LAYERS = [ + (RagLayer.CODE_SYMBOL_CATALOG, 8), + (RagLayer.CODE_DEPENDENCY_GRAPH, 6), + (RagLayer.CODE_SOURCE_CHUNKS, 10), + ] + _TRACE_FLOW_LAYERS = [ + (RagLayer.CODE_SYMBOL_CATALOG, 8), + (RagLayer.CODE_SOURCE_CHUNKS, 8), + (RagLayer.CODE_SEMANTIC_ROLES, 8), + (RagLayer.CODE_DEPENDENCY_GRAPH, 10), + (RagLayer.CODE_ENTRYPOINTS, 10), + ] + _ARCHITECTURE_LAYERS = [ + (RagLayer.CODE_SEMANTIC_ROLES, 12), + (RagLayer.CODE_ENTRYPOINTS, 8), + (RagLayer.CODE_DEPENDENCY_GRAPH, 8), + (RagLayer.CODE_SYMBOL_CATALOG, 6), + (RagLayer.CODE_SOURCE_CHUNKS, 4), + ] + _DOCS_SCOPED_LAYERS = [ + (RagLayer.DOCS_SECTION_INDEX, 8), + (RagLayer.DOCS_FACT_INDEX, 8), + ] def __init__( self, @@ -89,6 +113,10 @@ class RetrievalSpecFactory: conversation_mode=conversation_mode, sub_intent=sub_intent, ) + if intent == "DOCS_QA" and list(getattr(filters, "path_scope", []) or []): + scoped_map = dict(self._LAYERS) + scoped_map["DOCS_QA"] = list(self._DOCS_SCOPED_LAYERS) + layer_queries = self._layer_builder.build(intent, repo_context, domains=domains, layers_map=scoped_map) return RetrievalSpec( domains=domains, layer_queries=layer_queries, @@ -111,8 +139,26 @@ class RetrievalSpecFactory: return self._LAYERS layers_map = dict(self._LAYERS) if sub_intent == "OPEN_FILE": - has_symbol = any(anchor.type == "SYMBOL" and anchor.source == "user_text" for anchor in anchors) - layers_map["CODE_QA"] = list(self._OPEN_FILE_WITH_SYMBOL_LAYERS if has_symbol else self._OPEN_FILE_LAYERS) + layers_map["CODE_QA"] = list(self._OPEN_FILE_LAYERS) + elif sub_intent == "FIND_ENTRYPOINTS": + layers_map["CODE_QA"] = list(self._FIND_ENTRYPOINTS_LAYERS) + elif sub_intent == "FIND_TESTS": + layers_map["CODE_QA"] = list(self._FIND_TESTS_LAYERS) + elif sub_intent == "TRACE_FLOW": + layers_map["CODE_QA"] = list(self._TRACE_FLOW_LAYERS) + elif sub_intent == "ARCHITECTURE": + layers_map["CODE_QA"] = list(self._ARCHITECTURE_LAYERS) elif sub_intent == "EXPLAIN_LOCAL": layers_map["CODE_QA"] = list(self._EXPLAIN_LOCAL_LAYERS) + elif sub_intent != "EXPLAIN" and not self._needs_entrypoints(anchors): + layers_map["CODE_QA"] = [ + (RagLayer.CODE_SYMBOL_CATALOG, 8), + (RagLayer.CODE_SOURCE_CHUNKS, 8), + (RagLayer.CODE_DEPENDENCY_GRAPH, 6), + ] return layers_map + + def _needs_entrypoints(self, anchors: list[QueryAnchor]) -> bool: + values = " ".join(anchor.value.lower() for anchor in anchors if anchor.type in {"KEY_TERM", "SYMBOL"}) + markers = ("entrypoint", "endpoint", "вызыва", "поток", "flow", "запуска") + return any(marker in values for marker in markers) diff --git a/src/app/modules/rag/intent_router_v2/router.py b/src/app/modules/rag/intent_router_v2/router.py new file mode 100644 index 0000000..feae669 --- /dev/null +++ b/src/app/modules/rag/intent_router_v2/router.py @@ -0,0 +1,115 @@ +from __future__ import annotations + +from app.modules.rag.intent_router_v2.intent.classifier import IntentClassifierV2 +from app.modules.rag.intent_router_v2.intent.conversation_policy import ConversationPolicy +from app.modules.rag.intent_router_v2.retrieval.evidence_policy_factory import EvidencePolicyFactory +from app.modules.rag.intent_router_v2.intent.graph_id_resolver import GraphIdResolver +from app.modules.rag.intent_router_v2.logger import IntentRouterLogger +from app.modules.rag.intent_router_v2.models import ConversationState, IntentRouterResult, RepoContext, SymbolResolution +from app.modules.rag.intent_router_v2.analysis.query_plan_builder import QueryPlanBuilder +from app.modules.rag.intent_router_v2.retrieval.retrieval_constraints_factory import RetrievalConstraintsFactory +from app.modules.rag.intent_router_v2.retrieval.retrieval_spec_factory import RetrievalSpecFactory + + +class IntentRouterV2: + def __init__( + self, + classifier: IntentClassifierV2 | None = None, + conversation_policy: ConversationPolicy | None = None, + query_plan_builder: QueryPlanBuilder | None = None, + retrieval_factory: RetrievalSpecFactory | None = None, + constraints_factory: RetrievalConstraintsFactory | None = None, + evidence_factory: EvidencePolicyFactory | None = None, + graph_resolver: GraphIdResolver | None = None, + logger: IntentRouterLogger | None = None, + ) -> None: + self._classifier = classifier or IntentClassifierV2() + self._conversation_policy = conversation_policy or ConversationPolicy() + self._query_plan_builder = query_plan_builder or QueryPlanBuilder() + self._retrieval_factory = retrieval_factory or RetrievalSpecFactory() + self._constraints_factory = constraints_factory or RetrievalConstraintsFactory() + self._evidence_factory = evidence_factory or EvidencePolicyFactory() + self._graph_resolver = graph_resolver or GraphIdResolver() + self._logger = logger or IntentRouterLogger() + + def route( + self, + user_query: str, + conversation_state: ConversationState | None = None, + repo_context: RepoContext | None = None, + ) -> IntentRouterResult: + state = conversation_state or ConversationState() + context = repo_context or RepoContext() + self._logger.log_request(user_query, state, context) + decision = self._classifier.classify(user_query, state) + intent, conversation_mode = self._conversation_policy.resolve(decision, user_query, state) + retrieval_profile = self._resolve_retrieval_profile(intent) + query_plan = self._query_plan_builder.build( + user_query, + state, + continue_mode=conversation_mode in {"CONTINUE", "FOLLOWUP_LIKELY"}, + conversation_mode=conversation_mode, + intent=intent, + ) + retrieval_spec = self._retrieval_factory.build( + intent, + query_plan.anchors, + context, + raw_query=query_plan.raw, + conversation_state=state, + conversation_mode=conversation_mode, + sub_intent=query_plan.sub_intent, + ) + path_scope = list(getattr(retrieval_spec.filters, "path_scope", []) or []) + result = IntentRouterResult( + intent=intent, + retrieval_profile=retrieval_profile, + graph_id=self._graph_resolver.resolve(intent), + conversation_mode=conversation_mode, + query_plan=query_plan, + retrieval_spec=retrieval_spec, + retrieval_constraints=self._constraints_factory.build( + retrieval_profile=retrieval_profile, + sub_intent=query_plan.sub_intent, + raw_query=query_plan.raw, + anchors=query_plan.anchors, + path_scope=path_scope, + ), + symbol_resolution=self._initial_symbol_resolution( + retrieval_profile, + query_plan.sub_intent, + query_plan.symbol_candidates, + ), + evidence_policy=self._evidence_factory.build( + intent, + sub_intent=query_plan.sub_intent, + negations=query_plan.negations, + has_user_anchor=any(anchor.source == "user_text" for anchor in query_plan.anchors), + ), + ) + self._logger.log_result(result) + return result + + def _initial_symbol_resolution( + self, + retrieval_profile: str, + sub_intent: str, + symbol_candidates: list[str], + ) -> SymbolResolution: + if retrieval_profile == "docs": + return SymbolResolution(status="not_requested") + if sub_intent == "OPEN_FILE": + return SymbolResolution(status="not_requested") + if not symbol_candidates: + return SymbolResolution(status="not_requested") + return SymbolResolution( + status="pending", + resolved_symbol=None, + alternatives=list(symbol_candidates), + confidence=0.0, + ) + + def _resolve_retrieval_profile(self, intent: str) -> str: + if intent == "DOCS_QA": + return "docs" + return "code" diff --git a/app/modules/rag_session/job_store.py b/src/app/modules/rag/job_store.py similarity index 93% rename from app/modules/rag_session/job_store.py rename to src/app/modules/rag/job_store.py index a741dbe..bbe2b90 100644 --- a/app/modules/rag_session/job_store.py +++ b/src/app/modules/rag/job_store.py @@ -1,7 +1,9 @@ +"""Хранилище задач индексации RAG (in-memory + persistence).""" + from dataclasses import dataclass from uuid import uuid4 -from app.modules.rag_session.repository import RagRepository +from app.modules.rag.persistence.repository import RagRepository from app.schemas.common import ErrorPayload, ModuleName from app.schemas.indexing import IndexJobStatus diff --git a/app/modules/rag_session/module.py b/src/app/modules/rag/module.py similarity index 87% rename from app/modules/rag_session/module.py rename to src/app/modules/rag/module.py index 63ea414..d1ed1ca 100644 --- a/app/modules/rag_session/module.py +++ b/src/app/modules/rag/module.py @@ -1,14 +1,21 @@ -from fastapi import APIRouter +"""Публичный модуль RAG: сессии, индексация, API и webhook репозиториев.""" + +from __future__ import annotations + +from typing import TYPE_CHECKING + +from fastapi import APIRouter, Request from fastapi.responses import JSONResponse, StreamingResponse from app.core.exceptions import AppError -from app.modules.rag_session.embedding.gigachat_embedder import GigaChatEmbedder -from app.modules.rag_session.indexing_service import IndexingOrchestrator -from app.modules.rag_session.job_store import IndexJobStore -from app.modules.rag_session.repository import RagRepository -from app.modules.rag_session.retrieval.chunker import TextChunker -from app.modules.rag_session.session_store import RagSessionStore -from app.modules.rag_session.service import RagService +from app.modules.rag.embedding.gigachat_embedder import GigaChatEmbedder +from app.modules.rag.indexing_service import IndexingOrchestrator +from app.modules.rag.job_store import IndexJobStore +from app.modules.rag.persistence.repository import RagRepository +from app.modules.rag.retrieval.chunker import TextChunker +from app.modules.rag.session_store import RagSessionStore +from app.modules.rag.services.rag_service import RagService +from app.modules.rag.webhook_service import RepoWebhookService from app.modules.shared.event_bus import EventBus from app.modules.shared.gigachat.client import GigaChatClient from app.modules.shared.gigachat.settings import GigaChatSettings @@ -28,6 +35,9 @@ from app.schemas.rag_sessions import ( RagSessionJobResponse, ) +if TYPE_CHECKING: + from app.modules.agent.story_context_repository import StoryContextRepository + class RagModule: def __init__(self, event_bus: EventBus, retry: RetryExecutor, repository: RagRepository) -> None: @@ -263,3 +273,22 @@ class RagModule: ) return router + + +class RagRepoModule: + """Модуль webhook репозиториев (Gitea/Bitbucket).""" + + def __init__(self, story_context_repository: "StoryContextRepository", rag_repository: RagRepository) -> None: + self._webhook = RepoWebhookService(story_context_repository, rag_repository) + + def internal_router(self) -> APIRouter: + router = APIRouter(prefix="/internal/rag-repo", tags=["internal-rag-repo"]) + + @router.post("/webhook") + async def process_repo_webhook(request: Request, payload: dict) -> dict: + return self._webhook.process( + payload=payload, + headers={k: v for k, v in request.headers.items()}, + ) + + return router diff --git a/app/modules/rag/persistence/cache_repository.py b/src/app/modules/rag/persistence/cache_repository.py similarity index 100% rename from app/modules/rag/persistence/cache_repository.py rename to src/app/modules/rag/persistence/cache_repository.py diff --git a/app/modules/rag/persistence/document_repository.py b/src/app/modules/rag/persistence/document_repository.py similarity index 100% rename from app/modules/rag/persistence/document_repository.py rename to src/app/modules/rag/persistence/document_repository.py diff --git a/app/modules/rag/persistence/job_repository.py b/src/app/modules/rag/persistence/job_repository.py similarity index 100% rename from app/modules/rag/persistence/job_repository.py rename to src/app/modules/rag/persistence/job_repository.py diff --git a/src/app/modules/rag/persistence/query_repository.py b/src/app/modules/rag/persistence/query_repository.py new file mode 100644 index 0000000..8d189a7 --- /dev/null +++ b/src/app/modules/rag/persistence/query_repository.py @@ -0,0 +1,141 @@ +from __future__ import annotations + +import json + +from sqlalchemy import bindparam, text + +from app.modules.rag.persistence.retrieval_statement_builder import RetrievalStatementBuilder +from app.modules.shared.db import get_engine + + +class RagQueryRepository: + def __init__(self) -> None: + self._builder = RetrievalStatementBuilder() + + def retrieve( + self, + rag_session_id: str, + query_embedding: list[float], + *, + query_text: str = "", + limit: int = 5, + layers: list[str] | None = None, + path_prefixes: list[str] | None = None, + exclude_path_prefixes: list[str] | None = None, + exclude_like_patterns: list[str] | None = None, + prefer_path_prefixes: list[str] | None = None, + prefer_like_patterns: list[str] | None = None, + prefer_non_tests: bool = False, + ) -> list[dict]: + sql, params = self._builder.build_retrieve( + rag_session_id, + query_embedding, + query_text=query_text, + limit=limit, + layers=layers, + path_prefixes=path_prefixes, + exclude_path_prefixes=exclude_path_prefixes, + exclude_like_patterns=exclude_like_patterns, + prefer_path_prefixes=prefer_path_prefixes, + prefer_like_patterns=prefer_like_patterns, + prefer_non_tests=prefer_non_tests, + ) + with get_engine().connect() as conn: + rows = conn.execute(text(sql), params).mappings().fetchall() + return [self._row_to_dict(row) for row in rows] + + def retrieve_lexical_code( + self, + rag_session_id: str, + *, + query_text: str, + limit: int = 5, + path_prefixes: list[str] | None = None, + exclude_path_prefixes: list[str] | None = None, + exclude_like_patterns: list[str] | None = None, + prefer_path_prefixes: list[str] | None = None, + prefer_like_patterns: list[str] | None = None, + prefer_non_tests: bool = False, + ) -> list[dict]: + sql, params = self._builder.build_lexical_code( + rag_session_id, + query_text=query_text, + limit=limit, + path_prefixes=path_prefixes, + exclude_path_prefixes=exclude_path_prefixes, + exclude_like_patterns=exclude_like_patterns, + prefer_path_prefixes=prefer_path_prefixes, + prefer_like_patterns=prefer_like_patterns, + prefer_non_tests=prefer_non_tests, + ) + if sql is None: + return [] + with get_engine().connect() as conn: + rows = conn.execute(text(sql), params).mappings().fetchall() + return [self._row_to_dict(row) for row in rows] + + def retrieve_exact_files( + self, + rag_session_id: str, + *, + repo_id: str | None = None, + paths: list[str], + layers: list[str] | None = None, + limit: int = 200, + ) -> list[dict]: + normalized_paths = [str(path).strip() for path in paths if str(path).strip()] + if not normalized_paths: + return [] + filters = ["rag_session_id = :sid", "path IN :paths"] + params: dict = { + "sid": rag_session_id, + "paths": normalized_paths, + "lim": max(1, int(limit)), + } + if repo_id: + filters.append("repo_id = :repo_id") + params["repo_id"] = repo_id + stmt = text( + f""" + SELECT path, content, layer, title, metadata_json, span_start, span_end, + 0 AS lexical_rank, + 0 AS prefer_bonus, + 0 AS test_penalty, + 0 AS structural_rank, + 0 AS layer_rank, + 0 AS distance + FROM rag_chunks + WHERE {' AND '.join(filters)} + ORDER BY path ASC, COALESCE(span_start, 0) ASC, COALESCE(chunk_index, 0) ASC + LIMIT :lim + """ + ).bindparams(bindparam("paths", expanding=True)) + if layers: + params["layers"] = [str(item).strip() for item in layers if str(item).strip()] + if params["layers"]: + stmt = text( + f""" + SELECT path, content, layer, title, metadata_json, span_start, span_end, + 0 AS lexical_rank, + 0 AS prefer_bonus, + 0 AS test_penalty, + 0 AS structural_rank, + 0 AS layer_rank, + 0 AS distance + FROM rag_chunks + WHERE {' AND '.join(filters)} AND layer IN :layers + ORDER BY path ASC, COALESCE(span_start, 0) ASC, COALESCE(chunk_index, 0) ASC + LIMIT :lim + """ + ).bindparams( + bindparam("paths", expanding=True), + bindparam("layers", expanding=True), + ) + with get_engine().connect() as conn: + rows = conn.execute(stmt, params).mappings().fetchall() + return [self._row_to_dict(row) for row in rows] + + def _row_to_dict(self, row) -> dict: + data = dict(row) + data["metadata"] = json.loads(str(data.pop("metadata_json") or "{}")) + return data diff --git a/app/modules/rag/persistence/repository.py b/src/app/modules/rag/persistence/repository.py similarity index 83% rename from app/modules/rag/persistence/repository.py rename to src/app/modules/rag/persistence/repository.py index 54baefa..43be993 100644 --- a/app/modules/rag/persistence/repository.py +++ b/src/app/modules/rag/persistence/repository.py @@ -70,6 +70,8 @@ class RagRepository: path_prefixes: list[str] | None = None, exclude_path_prefixes: list[str] | None = None, exclude_like_patterns: list[str] | None = None, + prefer_path_prefixes: list[str] | None = None, + prefer_like_patterns: list[str] | None = None, prefer_non_tests: bool = False, ) -> list[dict]: return self._query.retrieve( @@ -81,6 +83,8 @@ class RagRepository: path_prefixes=path_prefixes, exclude_path_prefixes=exclude_path_prefixes, exclude_like_patterns=exclude_like_patterns, + prefer_path_prefixes=prefer_path_prefixes, + prefer_like_patterns=prefer_like_patterns, prefer_non_tests=prefer_non_tests, ) @@ -93,6 +97,8 @@ class RagRepository: path_prefixes: list[str] | None = None, exclude_path_prefixes: list[str] | None = None, exclude_like_patterns: list[str] | None = None, + prefer_path_prefixes: list[str] | None = None, + prefer_like_patterns: list[str] | None = None, prefer_non_tests: bool = False, ) -> list[dict]: return self._query.retrieve_lexical_code( @@ -102,5 +108,24 @@ class RagRepository: path_prefixes=path_prefixes, exclude_path_prefixes=exclude_path_prefixes, exclude_like_patterns=exclude_like_patterns, + prefer_path_prefixes=prefer_path_prefixes, + prefer_like_patterns=prefer_like_patterns, prefer_non_tests=prefer_non_tests, ) + + def retrieve_exact_files( + self, + rag_session_id: str, + *, + repo_id: str | None = None, + paths: list[str], + layers: list[str] | None = None, + limit: int = 200, + ) -> list[dict]: + return self._query.retrieve_exact_files( + rag_session_id, + repo_id=repo_id, + paths=paths, + layers=layers, + limit=limit, + ) diff --git a/app/modules/rag/persistence/retrieval_statement_builder.py b/src/app/modules/rag/persistence/retrieval_statement_builder.py similarity index 66% rename from app/modules/rag/persistence/retrieval_statement_builder.py rename to src/app/modules/rag/persistence/retrieval_statement_builder.py index a9972bf..94feeb1 100644 --- a/app/modules/rag/persistence/retrieval_statement_builder.py +++ b/src/app/modules/rag/persistence/retrieval_statement_builder.py @@ -17,11 +17,15 @@ class RetrievalStatementBuilder: path_prefixes: list[str] | None = None, exclude_path_prefixes: list[str] | None = None, exclude_like_patterns: list[str] | None = None, + prefer_path_prefixes: list[str] | None = None, + prefer_like_patterns: list[str] | None = None, prefer_non_tests: bool = False, ) -> tuple[str, dict]: emb = "[" + ",".join(str(x) for x in query_embedding) + "]" filters = ["rag_session_id = :sid"] params: dict = {"sid": rag_session_id, "emb": emb, "lim": limit} + filters.append("embedding IS NOT NULL") + filters.append("vector_dims(embedding) = vector_dims(CAST(:emb AS vector))") self._append_prefix_group(filters, params, "path", path_prefixes) self._append_prefix_group(filters, params, "exclude_prefix", exclude_path_prefixes, negate=True) self._append_like_group(filters, params, "exclude_like", exclude_like_patterns, negate=True) @@ -29,6 +33,12 @@ class RetrievalStatementBuilder: filters.append("layer = ANY(:layers)") params["layers"] = layers lexical_sql = self._lexical_rank_sql(query_text, params) + prefer_bonus_sql = self._path_bonus_sql( + params, + base_key="prefer", + path_prefixes=prefer_path_prefixes, + like_patterns=prefer_like_patterns, + ) test_penalty_sql = self._test_penalty_sql( prefer_non_tests, params, @@ -36,12 +46,14 @@ class RetrievalStatementBuilder: path_prefixes=exclude_path_prefixes, like_patterns=exclude_like_patterns, ) + structural_rank_sql = self._structural_rank_sql() layer_rank_sql = ( "CASE " "WHEN layer = 'C3_ENTRYPOINTS' THEN 0 " "WHEN layer = 'C1_SYMBOL_CATALOG' THEN 1 " - "WHEN layer = 'C2_DEPENDENCY_GRAPH' THEN 2 " - "WHEN layer = 'C0_SOURCE_CHUNKS' THEN 3 " + "WHEN layer = 'C4_SEMANTIC_ROLES' THEN 2 " + "WHEN layer = 'C2_DEPENDENCY_GRAPH' THEN 3 " + "WHEN layer = 'C0_SOURCE_CHUNKS' THEN 4 " "WHEN layer = 'D1_MODULE_CATALOG' THEN 0 " "WHEN layer = 'D2_FACT_INDEX' THEN 1 " "WHEN layer = 'D3_SECTION_INDEX' THEN 2 " @@ -51,12 +63,14 @@ class RetrievalStatementBuilder: sql = f""" SELECT path, content, layer, title, metadata_json, span_start, span_end, {lexical_sql} AS lexical_rank, + {prefer_bonus_sql} AS prefer_bonus, {test_penalty_sql} AS test_penalty, + {structural_rank_sql} AS structural_rank, {layer_rank_sql} AS layer_rank, (embedding <=> CAST(:emb AS vector)) AS distance FROM rag_chunks WHERE {' AND '.join(filters)} - ORDER BY lexical_rank ASC, test_penalty ASC, layer_rank ASC, embedding <=> CAST(:emb AS vector) + ORDER BY prefer_bonus ASC, test_penalty ASC, layer_rank ASC, lexical_rank ASC, structural_rank ASC, embedding <=> CAST(:emb AS vector) LIMIT :lim """ return sql, params @@ -70,6 +84,8 @@ class RetrievalStatementBuilder: path_prefixes: list[str] | None = None, exclude_path_prefixes: list[str] | None = None, exclude_like_patterns: list[str] | None = None, + prefer_path_prefixes: list[str] | None = None, + prefer_like_patterns: list[str] | None = None, prefer_non_tests: bool = False, ) -> tuple[str | None, dict]: terms = extract_query_terms(query_text) @@ -107,6 +123,12 @@ class RetrievalStatementBuilder: ) filters.append("(" + " OR ".join(lexical_filters) + ")") lexical_sql = "LEAST(" + ", ".join(lexical_ranks) + ")" + prefer_bonus_sql = self._path_bonus_sql( + params, + base_key="lex_prefer", + path_prefixes=prefer_path_prefixes, + like_patterns=prefer_like_patterns, + ) test_penalty_sql = self._test_penalty_sql( prefer_non_tests, params, @@ -117,10 +139,11 @@ class RetrievalStatementBuilder: sql = f""" SELECT path, content, layer, title, metadata_json, span_start, span_end, {lexical_sql} AS lexical_rank, + {prefer_bonus_sql} AS prefer_bonus, {test_penalty_sql} AS test_penalty FROM rag_chunks WHERE {' AND '.join(filters)} - ORDER BY lexical_rank ASC, test_penalty ASC, path ASC, span_start ASC + ORDER BY prefer_bonus ASC, test_penalty ASC, lexical_rank ASC, path ASC, span_start ASC LIMIT :lim """ return sql, params @@ -197,5 +220,68 @@ class RetrievalStatementBuilder: return "0" return "CASE WHEN " + " OR ".join(parts) + " THEN 1 ELSE 0 END" + def _path_bonus_sql( + self, + params: dict, + *, + base_key: str, + path_prefixes: list[str] | None, + like_patterns: list[str] | None, + ) -> str: + parts: list[str] = [] + for idx, prefix in enumerate(path_prefixes or []): + key = f"{base_key}_prefix_{idx}" + params[key] = self._escape_like_value(prefix) + "%" + parts.append(f"lower(path) LIKE :{key}{_LIKE_ESCAPE_SQL}") + for idx, pattern in enumerate(like_patterns or []): + key = f"{base_key}_like_{idx}" + params[key] = pattern + parts.append(f"lower(path) LIKE :{key}{_LIKE_ESCAPE_SQL}") + if not parts: + return "1" + return "CASE WHEN " + " OR ".join(parts) + " THEN 0 ELSE 1 END" + + def _structural_rank_sql(self) -> str: + path_length = "CAST(metadata_json AS jsonb)->>'path_length'" + numeric_path_length = f"CASE WHEN {path_length} ~ '^[0-9]+$' THEN ({path_length})::int ELSE 99 END" + role_value = "CAST(metadata_json AS jsonb)->>'role'" + confidence = ( + "CASE WHEN CAST(metadata_json AS jsonb)->>'confidence' ~ '^[0-9]+(\\.[0-9]+)?$' " + "THEN (CAST(metadata_json AS jsonb)->>'confidence')::numeric ELSE 0 END" + ) + dataflow_participation = ( + "CASE WHEN CAST(metadata_json AS jsonb)->>'dataflow_participation' ~ '^[0-9]+$' " + "THEN (CAST(metadata_json AS jsonb)->>'dataflow_participation')::int ELSE 0 END" + ) + trace_proximity = ( + "CASE WHEN CAST(metadata_json AS jsonb)->>'execution_trace_proximity' ~ '^[0-9]+$' " + "THEN (CAST(metadata_json AS jsonb)->>'execution_trace_proximity')::int ELSE 0 END" + ) + role_rank = ( + "CASE " + f"WHEN {role_value} = 'pipeline_stage' THEN 0 " + f"WHEN {role_value} = 'handler' THEN 1 " + f"WHEN {role_value} = 'service' THEN 2 " + f"WHEN {role_value} = 'parser' THEN 3 " + f"WHEN {role_value} = 'adapter' THEN 4 " + f"WHEN {role_value} = 'repository' THEN 5 " + f"WHEN {role_value} = 'controller' THEN 6 " + f"WHEN {role_value} = 'manager' THEN 7 " + f"WHEN {role_value} = 'factory' THEN 8 " + f"WHEN {role_value} = 'model' THEN 9 " + "ELSE 10 END" + ) + semantic_signal = f"LEAST(({dataflow_participation} + {trace_proximity}), 20)" + return ( + "CASE " + "WHEN layer = 'C2_DEPENDENCY_GRAPH' AND CAST(metadata_json AS jsonb)->>'edge_type' = 'dataflow_slice' " + f"THEN {numeric_path_length} " + "WHEN layer = 'C3_ENTRYPOINTS' AND CAST(metadata_json AS jsonb)->>'edge_type' = 'execution_trace' " + f"THEN {numeric_path_length} " + "WHEN layer = 'C4_SEMANTIC_ROLES' " + f"THEN ((30 - {semantic_signal}) + {role_rank} + (100 - ({confidence} * 100)::int)) " + "ELSE 99 END" + ) + def _escape_like_value(self, value: str) -> str: return value.replace("\\", "\\\\").replace("%", "\\%").replace("_", "\\_") diff --git a/app/modules/rag/persistence/schema_repository.py b/src/app/modules/rag/persistence/schema_repository.py similarity index 100% rename from app/modules/rag/persistence/schema_repository.py rename to src/app/modules/rag/persistence/schema_repository.py diff --git a/app/modules/rag/persistence/session_repository.py b/src/app/modules/rag/persistence/session_repository.py similarity index 100% rename from app/modules/rag/persistence/session_repository.py rename to src/app/modules/rag/persistence/session_repository.py diff --git a/app/modules/rag_session/retrieval/chunker.py b/src/app/modules/rag/retrieval/chunker.py similarity index 90% rename from app/modules/rag_session/retrieval/chunker.py rename to src/app/modules/rag/retrieval/chunker.py index 410b1e4..87255cb 100644 --- a/app/modules/rag_session/retrieval/chunker.py +++ b/src/app/modules/rag/retrieval/chunker.py @@ -1,3 +1,6 @@ +"""Разбиение текста на чанки для retrieval.""" + + class TextChunker: def __init__(self, chunk_size: int = 900, overlap: int = 120) -> None: self._chunk_size = chunk_size diff --git a/app/modules/rag/retrieval/query_terms.py b/src/app/modules/rag/retrieval/query_terms.py similarity index 100% rename from app/modules/rag/retrieval/query_terms.py rename to src/app/modules/rag/retrieval/query_terms.py diff --git a/app/modules/rag_session/retrieval/scoring.py b/src/app/modules/rag/retrieval/scoring.py similarity index 84% rename from app/modules/rag_session/retrieval/scoring.py rename to src/app/modules/rag/retrieval/scoring.py index 77d421f..05e16f7 100644 --- a/app/modules/rag_session/retrieval/scoring.py +++ b/src/app/modules/rag/retrieval/scoring.py @@ -1,3 +1,5 @@ +"""Скоринг для retrieval (cosine similarity и др.).""" + import math diff --git a/app/modules/rag/retrieval/test_filter.py b/src/app/modules/rag/retrieval/test_filter.py similarity index 100% rename from app/modules/rag/retrieval/test_filter.py rename to src/app/modules/rag/retrieval/test_filter.py diff --git a/app/modules/rag/services/rag_service.py b/src/app/modules/rag/services/rag_service.py similarity index 91% rename from app/modules/rag/services/rag_service.py rename to src/app/modules/rag/services/rag_service.py index 3d9b31f..43802fe 100644 --- a/app/modules/rag/services/rag_service.py +++ b/src/app/modules/rag/services/rag_service.py @@ -6,22 +6,26 @@ import logging import os from collections.abc import Awaitable, Callable from inspect import isawaitable +from typing import TYPE_CHECKING from app.modules.rag.contracts import RagDocument +from app.modules.rag.indexing.common.path_filter import filter_snapshot_files from app.modules.rag.indexing.code.pipeline import CodeIndexingPipeline from app.modules.rag.indexing.common.report import IndexReport from app.modules.rag.indexing.docs.pipeline import DocsIndexingPipeline -from app.modules.rag.persistence.repository import RagRepository -from app.modules.rag_session.embedding.gigachat_embedder import GigaChatEmbedder +from app.modules.rag.embedding.gigachat_embedder import GigaChatEmbedder LOGGER = logging.getLogger(__name__) +if TYPE_CHECKING: + from app.modules.rag.persistence.repository import RagRepository + class RagService: def __init__( self, embedder: GigaChatEmbedder, - repository: RagRepository, + repository: "RagRepository", chunker=None, ) -> None: self._embedder = embedder @@ -62,10 +66,18 @@ class RagService: files: list[dict], progress_cb: Callable[[int, int, str], Awaitable[None] | None] | None = None, ) -> "_PipelineReport": - total_files = len(files) + indexable_files = filter_snapshot_files(files) + skipped_files = len(files) - len(indexable_files) + total_files = len(indexable_files) report = _PipelineReport() repo_id = self._resolve_repo_id(rag_session_id) - for index, file in enumerate(files, start=1): + if skipped_files > 0: + LOGGER.warning( + "rag ingest filter: rag_session_id=%s skipped_files=%s", + rag_session_id, + skipped_files, + ) + for index, file in enumerate(indexable_files, start=1): path = str(file.get("path", "")) try: blob_sha = self._blob_sha(file) diff --git a/app/modules/rag_session/session_store.py b/src/app/modules/rag/session_store.py similarity index 88% rename from app/modules/rag_session/session_store.py rename to src/app/modules/rag/session_store.py index 6e353b4..bc6de8c 100644 --- a/app/modules/rag_session/session_store.py +++ b/src/app/modules/rag/session_store.py @@ -1,7 +1,9 @@ +"""Хранилище RAG-сессий (проект/сессия).""" + from dataclasses import dataclass from uuid import uuid4 -from app.modules.rag_session.repository import RagRepository +from app.modules.rag.persistence.repository import RagRepository @dataclass diff --git a/app/modules/rag_repo/webhook_service.py b/src/app/modules/rag/webhook_service.py similarity index 98% rename from app/modules/rag_repo/webhook_service.py rename to src/app/modules/rag/webhook_service.py index f4322e3..77766d0 100644 --- a/app/modules/rag_repo/webhook_service.py +++ b/src/app/modules/rag/webhook_service.py @@ -1,3 +1,5 @@ +"""Обработка webhook от репозиториев (Gitea, Bitbucket) для привязки коммитов к историям.""" + from __future__ import annotations import re diff --git a/app/modules/shared/README.md b/src/app/modules/shared/README.md similarity index 100% rename from app/modules/shared/README.md rename to src/app/modules/shared/README.md diff --git a/app/modules/rag_session/__init__.py b/src/app/modules/shared/__init__.py similarity index 100% rename from app/modules/rag_session/__init__.py rename to src/app/modules/shared/__init__.py diff --git a/app/modules/shared/bootstrap.py b/src/app/modules/shared/bootstrap.py similarity index 100% rename from app/modules/shared/bootstrap.py rename to src/app/modules/shared/bootstrap.py diff --git a/app/modules/shared/checkpointer.py b/src/app/modules/shared/checkpointer.py similarity index 100% rename from app/modules/shared/checkpointer.py rename to src/app/modules/shared/checkpointer.py diff --git a/app/modules/shared/db.py b/src/app/modules/shared/db.py similarity index 100% rename from app/modules/shared/db.py rename to src/app/modules/shared/db.py diff --git a/app/modules/shared/env_loader.py b/src/app/modules/shared/env_loader.py similarity index 100% rename from app/modules/shared/env_loader.py rename to src/app/modules/shared/env_loader.py diff --git a/app/modules/shared/event_bus.py b/src/app/modules/shared/event_bus.py similarity index 100% rename from app/modules/shared/event_bus.py rename to src/app/modules/shared/event_bus.py diff --git a/app/modules/rag_session/embedding/__init__.py b/src/app/modules/shared/gigachat/__init__.py similarity index 100% rename from app/modules/rag_session/embedding/__init__.py rename to src/app/modules/shared/gigachat/__init__.py diff --git a/app/modules/shared/gigachat/client.py b/src/app/modules/shared/gigachat/client.py similarity index 100% rename from app/modules/shared/gigachat/client.py rename to src/app/modules/shared/gigachat/client.py diff --git a/app/modules/shared/gigachat/errors.py b/src/app/modules/shared/gigachat/errors.py similarity index 100% rename from app/modules/shared/gigachat/errors.py rename to src/app/modules/shared/gigachat/errors.py diff --git a/app/modules/shared/gigachat/settings.py b/src/app/modules/shared/gigachat/settings.py similarity index 100% rename from app/modules/shared/gigachat/settings.py rename to src/app/modules/shared/gigachat/settings.py diff --git a/app/modules/shared/gigachat/token_provider.py b/src/app/modules/shared/gigachat/token_provider.py similarity index 100% rename from app/modules/shared/gigachat/token_provider.py rename to src/app/modules/shared/gigachat/token_provider.py diff --git a/app/modules/shared/idempotency_store.py b/src/app/modules/shared/idempotency_store.py similarity index 100% rename from app/modules/shared/idempotency_store.py rename to src/app/modules/shared/idempotency_store.py diff --git a/app/modules/shared/retry_executor.py b/src/app/modules/shared/retry_executor.py similarity index 100% rename from app/modules/shared/retry_executor.py rename to src/app/modules/shared/retry_executor.py diff --git a/app/modules/rag_session/retrieval/__init__.py b/src/app/schemas/__init__.py similarity index 100% rename from app/modules/rag_session/retrieval/__init__.py rename to src/app/schemas/__init__.py diff --git a/app/schemas/changeset.py b/src/app/schemas/changeset.py similarity index 100% rename from app/schemas/changeset.py rename to src/app/schemas/changeset.py diff --git a/app/schemas/chat.py b/src/app/schemas/chat.py similarity index 100% rename from app/schemas/chat.py rename to src/app/schemas/chat.py diff --git a/app/schemas/common.py b/src/app/schemas/common.py similarity index 100% rename from app/schemas/common.py rename to src/app/schemas/common.py diff --git a/app/schemas/indexing.py b/src/app/schemas/indexing.py similarity index 100% rename from app/schemas/indexing.py rename to src/app/schemas/indexing.py diff --git a/app/schemas/rag_sessions.py b/src/app/schemas/rag_sessions.py similarity index 100% rename from app/schemas/rag_sessions.py rename to src/app/schemas/rag_sessions.py diff --git a/tests/README.md b/tests/README.md new file mode 100644 index 0000000..8d35c9a --- /dev/null +++ b/tests/README.md @@ -0,0 +1,16 @@ +# Структура тестов + +- **unit_tests/** — юнит-тесты приложений: + - `agent/` — тесты модуля agent (оркестратор, роутер, сервисы) + - `chat/` — тесты модуля chat + - `rag/` — тесты модуля RAG (индексация, retrieval, intent router) + +- **pipeline_setup/** — тесты, используемые в настройке пайплайна: + - `pipeline_intent_rag/` — intent-router → RAG → LLM (маркеры `router_rag`, `full_chain`) + - `code_qa_eval/` — CODE_QA golden eval harness + - `golden/`, `fixtures/`, `test_results/`, `utils/` — данные, результаты прогонов и скрипты запуска пайплайна + +Запуск: + +- Юнит-тесты: `pytest tests/unit_tests/ -v` +- Пайплайн-тесты: `pytest tests/pipeline_setup/ -v` (см. `pipeline_setup/pipeline_intent_rag/README.md` и `pipeline_setup/code_qa_eval/README.md`) diff --git a/tests/__pycache__/conftest.cpython-312-pytest-9.0.2.pyc b/tests/__pycache__/conftest.cpython-312-pytest-9.0.2.pyc index 84b1b6e5122cee4a05201149b60ad791b75dab84..f3bdba3ba10b558e3ce2a0ad255932298342feca 100644 GIT binary patch delta 227 zcmdnRdYzT`G%qg~0}%Kf+?aWEBCjOlpNZ+63C7bcCR$u%mcGHl-tN)p e(eB^qKf!Tg@eJe16<1jlJ}@(|$P`He^#cF_WiVR+ delta 202 zcmcc4x{HwC?FoRM|12BQ*_rqJX-#@UlUG8S@40@Z*lD~_6+!(?P|lbNld wq}g(U^K_4i9v7KqZm_Vodo+5q`#1VeaGY2?!(?*hRTjk$%nU5DMdCnh06D-W!T5rFbXR?*fn9JqGcG*#`|0Sa9f>z$Fb(vr)} zEEQ280ihL8sc8{k3cElKx)eyD9&*ev#{j*^kpl|@7cEfq;F}B?aN$GI_jb7yr5gP_ zNN?u7dGmJOZ|3n&#bS;CykGu8z zT!yf-Gq>l!ZWrvf-N+wnQ%f0AttM2xA*uy zOu)T{GHtu+RJd)coNZSER`+pUuY}+ZZOJ>S(ByL3`i`>DFiPA!OJuZE31l; z!9U}&7E~oyc^NukUD|HIxXRR=h95Xg(U32P0*^NBCb^8C#SDoeT87De($t#7Mt%fM z9jH$Hn<=1@j3Nz)_q3G~$3YSt*Zz*cM6;+Uzz{8oVVogX;%7?$k-N~>Ueyb2d*%3{ z^OqAoI#uFEh|$;^>-3R1vO98So&Kh{J2}HA`d9e*!Wy@K?c>8xF8armXX(wf@l}!%)rO3jn=k#GCBj4A+b!+hw6?YLQ$3S zs-dFHb3-wJ%#(;tBRY~eL&!sf%H=qqHS$bP8Kaxm_6Q80za9-=xY6*{#6B|ja+-1K z9>dH!6=xP|IOGkqEb_)bA!xrUz@?=z-P3+uSTD?KEVX8~AlM6?@Pc$3!cLGGZE9Pn z13)7oR!jsTCQ<~%h)TMv$ zh!~K~)K=S5qFWNP{|FpNRyFwk!Kq&*OB1bZ;1hiXE{9f{4YHwT+S4K`6OJb8yEI|` z9)V^i(Ugq8fX8WBYZ)!NQD7RXX_@SJE88@i*~qK3Nu}SV_0?Xb;MHN=bKupkJ+HFK zOiu7$$&*SYz-^xk0@e3e0V{+j*F< zXW&12*?*_qCmZlSF6+xWx{T>75I`5+_sc-xO3XzEielI)9+vXpRZmLgHtAaF6o{vJ z+8q2RNq(DHxoL40^gcyB-V4Ag8}dpm5RPa({R)^WjylyH}fhP`LMBoI~5FSaT z2a9ltVcA<6G!UMY9fpeN*y0sRARM6=21=U)n|D8bYiD3`yD<5r_vC}yo8SFB`^AsG47b1k-uC!Uw#(Doul;nV_vW^F zGrGzYjZQg=pO@boA9w2Ee3>shm734Xc=VN#&Qi@gw4w~@1~snIlDp6&+))NR&Noj8pS)BF=*eDi7ieZ1%uLm6Ou9m$>j|8{#6a_D0(o^jFvxfWEYB zNQji8b?9-#TOea;FZHP@OIzvx_M5fFIZKwNrb;-yXhB>Amvuk1bd`cNL>E_j90_~F zNahmA0Q1sQ%+5r|`2!sjmW=nFN3n@Rdne<)lU9$)NDgm*D3mGq2X*YB1g3z%+c4@+ zl<5ZO#gMDq)mkG;14pQ1Hs%X7RW*U@j^L^Q%l6&6=R;Eo=Z}N0Mr=7B)O{9-+H-zz z*YTs4No8&6%yQJAdftu<^MdMiOdT~~&jz9by&GSy`A*ddVZ|z{d?lzZ@dGF4~mB(}x{=SLHnCRe#$c?F;gXtqWdhbq0rZWNIb{%ii(+_R|T8D~$ zm_PlP;@>wh9TPi9#M7@)IG%RnNAz^uE9r3)3fXEV=_TF;f2mPBPRMc`bV!o2;2#PP zay8pwsZ5(Eeh7QS4czz|{DdgS-MTExdB|Q?PJS1iq@27)eiLTZt zo<};im*(a8b611|dhzm>cm?dGG)?;pwr{`e{X3cZGkN<(TGxi35kN0;8ST_F0_geR K3GGbei+=%9G=Urd diff --git a/tests/agent/__pycache__/test_llm_service_logging.cpython-312-pytest-9.0.2.pyc b/tests/agent/__pycache__/test_llm_service_logging.cpython-312-pytest-9.0.2.pyc deleted file mode 100644 index 8f1aaf5148937ef98509aea3a20c8bc6647ec303..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6843 zcmeGgTWl29_0D5=XLrr6%_Beqcnu|CQL+m*kVgSSLrc>TLz`9+7U^hqXKdEYK6+>T zWLHHgsvHR^RB8)Rk&3E*fJ~+IEB&hY=trbh>Mpyk&8SiNRgA#*`yc$G@N=1vzhcGxpw7O992A#`PISQ}g90nX zqLdc}Qj`Zn0&fWqhM`3?BSmFU5r{~R5?wk^ba_VP!wg0lEd;c%M~mr-9yu=$#wUez z^dHDLkQSWe;bEg>A2W+@7<8Bdjec{1pX!XU$_D_ zkbzK>szOydvxAVDT$Qc&Y?qsiwD;NW%?e$t%0q(A`V5IPZHel#9dfxw-0ipoC}-OE z7_rs`##aI?ZL})PwCATmPIjhCxqZ%(0Q38+UWr$7N7X}D#3@)|Eu@F_NHtUtSS@U? zaz_u0lyGT&Sq-}*x#in%eFgI(?vzueb_Me)Fa>%!FP?K>)yyV6$bz=0H^eQAs0t-CHd5;P#_TTEyc zsDjNH_NFZ)?p=(18)&IQsWNI))P%*@v16~N%A+G1z+pKXRO@tk)YKWPI&7A6nyHqwqTxhUOB*t91SfHr zt)@^eeTC98b=IguWm?p1)tIQ5T1m5^B^_~O%P@!7UfA-SIL^p7(i^Po<`q81o?vC4 zh5JhJZ!wp}4O>~wG$yh~j4`wfBSzk~)Un>IR!HfzFlLleTBU+A&Ks7M#RfE1Sri2H z^l;TQizC4>^j;PE}Q%n5q`b`lx9D-l3}B9o0-cZ>UL@P3ae*!*xQp zLqWG8K-_#fI0?`ogMv-aO4hhRX&g>~qPwBbBS0rZ zyAZ5KfEJgo1CS2WEr>IwZp2audJt>{VBuxrYR+z%Bb#MSpXv%8eFjN5fu#We1>BOU zE1BuD^(~o3GBc;(Z?;X~H4iqB%xg^_Z7CV(>oIuAa&2zUb6-ICi%RXJwWj%BwJkwrJO@x3F z{@k7rXhv$%_m+kXNq3NuP8ah_U18x@6vK>ww#Do?p=F;dp&yDD*2<)&)FOJ~JgF*2ywJ5K+i1(#SCw5|uSKg->&JRh z?|kSJ*cjO13MXKrZnMvwg9dx7a1tNy0VmQKm}P}N{th0%7j;*mcU_TKs2sB&_N-!V zU$^u^<*2^;iF666J}&95c_Q7%DBZPBr2F`!J4v>Y-NX{c;W6eUcvgX2lrH>eLOMyt z1$>~%i?zr&Nv|82+6-AshR5MnhNUSP$WSuv3|J^z7~);Pc-C&+Kb%q}NV zgggy4Y+)FmO0no~F}fea%!vv;IQ1G!VV7lVmddhT2tsw0=ewAJs%$cM>zVyLr9GJO z218qKp_}?U`S&?;E0OzfxSl+C^VwGN)kY%s(E?^AZznp1spkUe_MWsAJBx`qASs@r zL$yp6eA2w%zF{+`OGrS_%h{Nd>En9eYnMdDCtW;c%(waKqe@} z{D$j0*txnMg(6#fNDhX8c>v+6QM@FOm)kN4IB3BT$|~apd}r5!g;L%Q#g^fA)|Y+ z+X@LFS|%LDQCxcvd?D%!J__x%;xGtL78&FjF&(}yVe_3Zd1`B2?wQ_q@l+$;GbiJ3me+a3gAJteTGK~ca?iz69*>6r z^L+1%A7p-&`D60%weZF8TxUO?L@^`w2xc`71opu3Uj_?nfB*mh diff --git a/tests/agent/__pycache__/test_logging_setup.cpython-312-pytest-9.0.2.pyc b/tests/agent/__pycache__/test_logging_setup.cpython-312-pytest-9.0.2.pyc deleted file mode 100644 index 22cb4ad23d2734c11e287c5bfb969efa1256b19a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3756 zcmeHK&1)M+6yKHBtB;K&e^Un&t2U-yl3KAHry(REfi`hU@gYrVFoo?}Gm=+X?W!{? z#a1OSZ4T|J$GVV%dnly1&_ARXC908F3@wx%atkCUpZaEZXIGFwatQR2WtsWCuX%6Y z&U+gDk;$Y5c(T9$VkF{%@DC&S6AQqzivWHUkbp!}*bu!rR*e^9qEMAKhD2W?Z^$5t znTcw0BMCeS#qUcSsU1-rdcqc3S4DU9(;}&FZW>nkx=pIO<6u$@oOn|TMur5FLR)G{^d~37H7i+;q8TMyQb|N9W>JbA1n~~o3`e>gwc>oQDD8}KZe^UK zXg&yFL!c7_YfeTQ9JOM6O){wYGVh_LC89J^9>kiE#r6<7fikTjL-Z)wnc^!C_&v#a z(cF@`Up{{W=Vx1N$J-LhzRhI&&15q7Hj{5ClfywK#n-Ct5wE&O-&XgF)!m9!rlUT< zQ9FUg+R2#EO0<&Prk!e~=+9{U|L=AKz3gS3F~K8#g zFNs};ALcy5MS~i)busVg^sZ*0%WQssDUS>t^fd}=fS3t<4v5M`uWd0-jo1}jbhNMZ zLeaJyyzOWNJH)^Z-TYNh6RyN!afiJ4++SJFwDx=FlU)C{X+ zH%ECOmk36B(ZT2nTqBJq;in?jSm#UGXU9IT^ zyD5$8CCFioxF~vG8BUs5O84!b}TS(IpqS_{; z?yknlge*h6?21e0;mW%!91YKQ=5BO{*LH6nWyX7%Q;#yI`k9kQ*@++Q@9m?JseW#_ zf5Pf#a{ZBs=ecB7-o5^GTo|6}|f|8r+X564+Dlz zbv??*;RrVS7eYCQp%?&|^%b=vt#%ak;hm1M+LPFO7%+UQ>rp-qN3eN#CzNv-iUELG zU&(i*GaV(rzt&OC^d$Bk1`MC-dX$gD5p4F?LOF+_7yy{{m9dUA_uYj(NXcAJV(+0( z`$U%!J`6`N*b8_d<}efk05&Y#Q>Gs&(;aDc?=}no_ilHUSr5+kr06}AW|sMS|}U z!+};1vfM<#Bd5TIus;LtB$UA-G#l*wm_YyWPrBEWypu}UQ6(#ESc2g=d8ulnx{0q4 i_WzRo^icL6=V@FN#lHmMzVL1KUt#sRJSxt4R{sHQ0wqTP diff --git a/tests/agent/__pycache__/test_repo_webhook_service.cpython-312-pytest-9.0.2.pyc b/tests/agent/__pycache__/test_repo_webhook_service.cpython-312-pytest-9.0.2.pyc deleted file mode 100644 index c7133786b28dc0381c006c9a52bb4f1ed0b632c8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 10659 zcmeHN&2JmW72hS7pG#67mTbwAZ0f^~8C#Mif5-{!G_GSgts521N0X`rwkys`TA3p0 z*`*xOOTcJzuz?iL%{u6y-YnStA9^g%3nf~Sut)&|JrudgP=EkF^}U(h)rt`+JB?Eq z?tpyz-prfXnVs30`Tb`9o=nCC2oL}EXFVtj!avb)gTxhaYYvoq0uhLq6K2J6QA9nE z3ycTZRhkWD1EMe+9*?k;U@kfv8;^-XK)50h=`(?Z9t3z<<8c-jhPa3qCli@OKa<82 zaE-w=3D-DWQ}cmL;%m&95p7w`=L@E4>V>>926prNTCwo4HZff&T>C(yb9z?G@_TUU z+)&)=1pA(#3F9IW#sfqmA`~5jYXGj&d@vKT8%EV@+6QKV&VNjGQ=?hYR}vN!6a;ar znH4l8Sc2ju&kM`q*s^GcvT818fFc=MZqmT~>8IJjj|`0(gKAFubnqQ*PASsDjFvSG zWo~#-)zgIPb6P&F7K>>}$!dl%hzV0#-W)VF!-Slku25*Ma)Y;5fnu@21I2keswjG1 zHx;GaR@aIFHzfkK*@}UcR|q)dfp@ z;5;o+m=|ail9vM%2bCR$mT7qcW`dd5Zm4w1Fz|t<(=>^3`>2*JP@)+4@Re*~c2+mb zz4Z;*#R+e))dB+A6iwWX--)kB+gGCP3rE+Y-Lw%B#+Czim}+K;=51-Lkk_E2;bG;~ zSxr&wxT4G!NGXSULQ$@l)ErNtDacFrgIE?=Ijo{IjIk*2zlH7jOxOyDp}udzVyK5Z zV$y#%1}~}EY3=#PAbaW*dzeBW3VitSdSh$&$ncfzjf@7&!UR6C7d9X$zB&|pYe(ld zIsM9pb{3mn?#8b7*YrCstf&K69_wV<25KfmJ1_=cb=rl3bz&cChfts^e;(bapwPWzCpQZQP zSns#L^u2%Z74Cgu24}yzPzjr@Zj=>v-yhyspp=Yj9 z>wm71C3rRQd+t(`ZBMAdAz!Jx`Fg#uhhNOS`yPIA*N+@t46*q%LDHn#N;tD?@|kDX zq+61Eb!OKv%&sx`%P?ld|Bo^@%6fjVQRZ!t>0YDE^Mo4o>@g}{?oqbuTt<3vb|-z# z93OlY*SL8hb7ag8O#u*9?bu`~mt&aaX-v(|YJ&(NpLSAh(ioi9RALNHYAQe+ZSW$5 z{-NPhr|oD7;30w;JEZ0SB?1nc$U;iFdGzwd5BrDGr6N&HElmnpqb#Ew%xgCWW{G2{ zMI8)4O97qOky(JH07IcHLNsDW0X6B9I%pB9%@*b~l9B8${1gL#7x zhvM|plxjfZOqO;wV_@W2TjuC-qEO01q1@0(In0~8EItifxZp4Q!UeZ%JH=oJfNMmd z8u=P``QUmL?|mj?#BVxEnrAtgF^*x(DK`leCkZM&z(|02B@?ftoqL?aI_9*z9lpVs zh2;=d`6PV{?t|JX6lYMJd)nY@+YsEzmY~@uky-#`L=j2Yafd-rbh4b{m=u8v#mziC zS56|>@wbcf$R8*wwVM>I6tV{t`l6^(&5kLCI;mldow~>#CvYm4DJ@WYpE6mXv#P0R zpB8g!p0OdM2Ind0HOPkyf$<3-z+1vs$U^cfnOY zvM%9o&57Vvjagh@MSrgPCAe(JO<(k{$myzdZ0Q{kRXGh;`PjOIzcnXX+bxCGt9EmfEUP2J6_iB4^em{H-|=+^R8)>#Gv@bJZ`w1xl)Q@5>}+zHx}2%;)?E{Q90_qv3? zFP#W(d2$7_ajUkiddaI&_w6|^*;OAwti@x&0q*1JOQM(6Q`V&JjfR%HH}Bl6N@=L$ z&6?Z++QM}ZRk>r~I`rAPgugGH2yS_D1+#Ihwyk=}t5W)Q$xC+CM-Y3H$ASag$I}95!|XVi|ecC&sD#C zB#kiAW(OsMkcCk)WuQ`i97={0GK&EcUkvEtln4}!ycl?x*g?l6o$X5Mx#*Y%2FM#< zFd%R8=$K}*?}gAYEl%rOU&+?Hbj+*R_s<6u4}4ELqP>oeIQY!4%ug=7I6C4W>3HTE z`QhI#HQGK)c`l&X@jnBKogN(lq|6JVBX$LfmDH3_iCHNt#^|k(6*B(fdkVXgTOlB~ z4r3l4xt0FG`tJKtNoilLccYS0E>W|GpGPH;?!_RZh#E)_>9rbkPQW)lGey+s-qF1} z6j2K3p-?3T@U(Btj!o$1L@9esGwExvDpO#g0f1zu)%=tOhzIawxzR)Pl$yD>QO*Y{SAzW*c?Ods3~hFbS;1|yw-ZDOsdC!vIgZ5kN1 z>3NaZCbM*zA(1p(cOVgn@F5Y{P9sJ^B;rK>7)a!$+2vQIu7zO`x6dyO0|;H0@VCZo zZg_G9V$X7`wyi!wUmm-PWqIzN0v_Mp_(x$VvW@>V$h|iH+f02$1TNbt>5RgzJ>R_x6#_AC~z8W98&0{a28O?!OElDw))P zA+){T(+rwyQE&9vXNO#d#k(I<*}@)V3pqW75obWaN*_V;8orI9=P>dO5PPia^b+`# zW8QuE;y#L{ML7{FVM)J6@iB@|Q2YkPIEvqb08hq8?!68h_*T2?C|^E%+4AX<*os;* z3q&*FYc6GCUU6GvK{jMNjY~iz`_@e)1Z$~dJ~}YHbhO%-ahFWw1P{MfJw3Y8cBOjY z-6s*rTO1>7acq8(i{lSZ{GC_=uIdC5e;q6GiFFBoYfc2WYRuyLss#RA^~*=n3I5>@ z`^2XKKiQfr;aP{GP*?{9JL*!=^mk~sE1dQo;G{B;+5=Q$w7VViqVU*)Q}H-T>^}HJ zZGe9WW(-huihX7`;BJx}%9_#ZKDHg{U$#Y}*xz+u7(I=i=jFXc{|Kot4g}*gh|QoV uivJLL{)JzTtqGUD4Tr>@Cjy9X8(nRyu}eI+^|p9WJoL?*4PrlQ{=WfKTI*5( diff --git a/tests/agent/__pycache__/test_story_session_recorder.cpython-312-pytest-9.0.2.pyc b/tests/agent/__pycache__/test_story_session_recorder.cpython-312-pytest-9.0.2.pyc deleted file mode 100644 index a9608481a5bbcb548df59346333529d8157af6c5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5853 zcmeHLO>Eo96(%W4rbPKCu^q?RBvzbX1*jBnoMas|br<<-T5MYEc7Z}zfMqlzTMk94 zGgK0(G7uCwB;6L-p5j9e>CJ)n)>E&&_9EHq+8|OiKnoPPxk!KlIrY66QDVIAW>38| z1NzN-Gw;25^YL-yH-GN$Pbtv;@WQ;dE1?%*L+$D49Wkv zT9lq8?JT3d+z;|2g(?M=CI59_EKkrlSgJqYuIKp6YiG#&DK;)|Rz_6^cTlOuhvFD9l z4&KYsSRViZHzA+TQ?4|L72GyR0|S}`ZeYT`gPBx@R|WC*RD{@3R0F;@kq@lLd^yIUbZ!|s~In;WH(xsw3W^wLx%m)P;p^T$o2XVty>BokNDr)(+D{q5f?3t zl0_}{g|of>>lUs`hRMjcj%f6oBkH|X7S-G#lAb0+FcR^)lWzAdyhSe-;_wzdJ=7zk zkK+x!xUsEZo>#o#XvIkRJyk-g*K zhKwU!G|0ZiWYcISMQ&+LjXRNbcg`#gGV49G>19^LW+xPlFvhp&B||;3|FI_UNRb2N zU^CT0$Nbjln4zbz@1SEKLa^g+LS~|aO#B@(VZM>f8##069WvXHne60D@*Of=WDdW} zng4RmNMw$5awhdIXSU_c(GD`l{vVO4E7{}M8wM%cjyLz6sYaaH&;`T9D{`yEyozPJ zwo~`ZMIH3+RRgZM2Q)B~eb zhX2SJEj0|sgOVy&A&mo9sY{vdQXltT!=dbg`VmS1&8r4_)%NFuc7DM_Ot41 z?ZSnu+W67Y6V>{eEKmKi!(=XGkUN#-C$K*qP65-In#%H=C^b`y+03l{;EQP75sNSila5`#qCMuj06>BEaWcfWKQ0k#7ZW$=IdRYt~HGC9d{sN$~MCa^h zutls2`L7|T?<&vCy`RtCz4UDG@RLhxgW0=3c&?{6^s%-+wz==f=Gei_UB{k}9&Mev z)=vL$b97?)WIKIkD;^t7Z5hf?{vYW*&xYT7H2b^R&C$uteG{99j%|+RUYUvhfvuP^ zoZ1>z;(K2yyW@$i6UxxY!^VR~OP~17>HCe(XMtI=f!v>6vfJjwhK|o)q%4IlZKI8p z)_QDrdKHZP?sUk01)~i)iVCw`cFFEqcA0g3V$&Rac>clpFYE^wmL}R}wxyq2E&yqn z+2umpJh!3av)&ny(wdMYzl!>jjZ#pFdfwkQkG1rRt&d8kyT4v_SM{RRzL&s;m zGa#ikAxVA}^(7mnpb|yoK-)at(x;bafV9lx%QJ0rdPB!&y)z)CH6clU74;<>rC;gO z@+Jx|#XA_)iIYw`@vQL9#cPQxVjIqmT za{?~)a`Nho=fwSFZs)5>CXVb;ROiKcTCw4mD?CSfr?))a@i1Xnq4#dwUK`()t9+0B s947Dwgiiw5im9slS7q{_cmubtT>G1H_TP!PI{7aJ$g814>KWnVKRfB>WdHyG diff --git a/tests/agent/engine/router/__pycache__/test_router_service_intent_policy.cpython-312-pytest-9.0.2.pyc b/tests/agent/engine/router/__pycache__/test_router_service_intent_policy.cpython-312-pytest-9.0.2.pyc deleted file mode 100644 index c85e675db941b7a42248629176dcd6f30e454acc..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 17888 zcmeHPdu$xXdEdR;d+;7S9^VunK9UlplWEG5^@?K2R!rG}YSWJ8N5aNfpKh1bQTL!` z_au=ys*I!5l50aQio$Gaq->i2VxJ;inf7ZS-I8e?Zq2j} zw_)2p#!11moD?$Uhc{4O7r;jA#+1%4y=_kiC7 zehmC(@Vmip0l#O0kGFk<6&un6%87I$ojfLICX$9O(Hdje4S#E1Aa8I5?g%%>56y9L zUiX|#r1P?Z60uJwwmqxJMA?=|%cr*u$|uEfk{gqgsv@4;u`Q8`NhEbr&c+hs<1u)W zloe$gJ{Xm=>NZtYRCtqy<3!b{?KE}cqF42(~F z>VGhu$Q+dt2S^PR#RGo|7IvDO^-ObX5aNV|JIxUsgOgFaVFy^{CTkt6 z9LcP!bR>kC*J7SkOGBR+r5Snam|2>LBkS>8E)Crneww!R5!SqMm%$j6lPM*Y%bL$0 z$w9lHR?7;DRYtdVKae*#nNDKEE{T`jFnPEow=9f!VFH55%;b#-k_Y1632)q|hs8$| z$K|Kx(UhW+3B5+jWfG~Zn3D8>p(Ggg5?RfYY!cPbbXaGMuVFnwE%}0L1oAxz>KS(p z9l#kDdritE6+HloC6j~-l>well1CExw5t0UJB>U;S#{Tm#GH%tz}vb8OFc_N*XCY#GDG+^>K;45uFrn!~6wwZleq;Hk;+#3K= zhomMzb)|X@Z=$A55&EtvRB%*Q#gRl(&5?=8w(@d09${S-95>V42a%>fIejidi!ubg z;}^wjA|s2U9uUP$PRge-91_J7`9#`y;)agXg`=QJWD6uhwj#kcqp7eFf)yZ0umzND zK+bZjF0Usr+q=qvcjW=<&F@^p*lHc`X`MZ?%7J$!c@;gD7N$_9eLi5ITl+Q;hxP@j z?(viG95m1^v5+9~po^Zfo?$`q${tBDpMXaCP$MNjaBE~AJ^{%9@cb}AhV%$+yhqXr zMM;gMWHO}tC3A3iM{*=7O9ZP{)_vFpR6(Djg)8u%Z@TUqr$GM61mNpdzR z<6ufCxh%o7;{s^_Pp=WJ`uIdvA>ETqq|-{=O*VrB*@5H%AQg%)LUt)t6en9N+GxOh zg0Cy66`=ZU-3x7Je)7WnceEqVYtk|8#MI)ZGv|a?Ygbx2!3(W4HJ=k+V`D)VK;z`3 z)dY|NhG~ULlDet|8Bva`L(bk*E-pY=wB7{TOoX-5A3xQVxuP4q&UJI;58ZMkUe@63n(sqD} zcqm>&?#0}(;mCbRP~*shNCuERj0C|Ic@#;-)Uh3TNc!MU`9mOQxsP3LPs?oQmBwQC zu2l}gzsqRP4Hq9BrV(vqYz>*K0p7EBCW+I?-r39*so1w~4a2Kmm#6EBdzAxkK0`h2 zsTZzdlua|3TN3^(XN*p64GZmz$(HUYYUI!VS1iVLARq?nyQC4_VM5^7m z@S%2B(`^H0!MHpOQf5IPhj7`rbi-mb*>r6|fsHz@gn&R9LG`B2Pig)RTE4QV#BFYqZq7C+_9%>d8A*Y}8S6;ODN z=wanpE}xb}g|crnYH(wSON4XO7~=$ReXUrQkg0pmz)Mcuqtn!6N0pLT!vv>RB>)6^ zt?S-%!jiw8HHbCmmZ5^%85ra_NR}MJ3{W>sv`Mg(lik${RaU7%d=b$x9URM%o?@g& z^Y>gwdvHp3%*s@mFr!NCIf6VS55u2@<#*d^(smP_y+@7hpIVN0t@U$72*%oJaOL$cHSlned@Xmfrn zW=oqP=#S94`XhX|Kkm3cddyz1edv$cb@fN&Zhzcae*jjg8+vq3(EY?bVhI><9=5T1 z*Z_;7fuTSo=lsmEwis_qE?>^D*sL+7<0rvEnp%ztG+-z6Aa| z#g}4$f5vlgF!!lnN+r^{(fhX3{plS4scZlKIev2crY++WJK{>Vb#HC-Asa zOc2-%;2v8f@;FK6GUEy8gAhCxkLFWpHI;?q#&ixO6us4iD<~?CrgKLVX?ipRJ9i~9 zA|qR`JxJRH4!I5y0$8a5ck-EpD$1wF(}^qv>h$bN50}*j4tjjX(JH|uSr1|vSR-$D zMs_+Q53mT!Vz)E0SHaa7&0}MlA+=mj(PS84MP)Xi@0J3{j$F2N$U@V=rKGmb?`J zX_{kKG1#RE@!8Elv|!il=3+3uEZ}d+V6d1)i$WZ8M2V6eT%^K`y@1JC@>T#uD0V{~ zv780lnxWI3u#KH=y$MIMc*+Gn?2j*dZMbE_IvdVOKFKfDNP){iQ|@xeT==JW^#&lX zz}xVyz?tu;7NC>DChu~snf8>c;2MiqHL(Ix#J*jDWy@XdzHJH)6Q?`{q2QsA&s*>U zZ;w!l|eo`{c7OM0$l+4Y{?EYb=xmkk^uP{ zZXzp~?RFD6>kd$AG$5Z(YLc1@z7&Iee)S%+1dfzqCeQW@*1emVvjO=8fP7wPbN5&^ zh#^R>b@fNf-Tt`a{@7^uo*9Di(YmhwXuI1Vci12N7#@{YIOvZJ>*|m8ivH;M%;qcS z7WKySl_d%DRfnT>s?BX*x%mnpc&Fp8X3k|_%REEyh-OaE!*EFlm*d9GjUIwid6iyz zr?R7ZEd$hm(E+8(a50Kkp&%;BrwO(I!M*h8&ma5u$;O}m&qI2xaR!vlK@#~a*^OE7 z^#0~iG7OPCPQ=<@Y41`f|M!ULe+!Yf0n)zE>5&u3U5&EJl^9Zdbi``tVgR7wMpoc%`8e z@bE=nsrmlvqv8GYfQAqMe?r6kvs*QxAJOpEVz7T%z~7R=U@?mpg?>cCC{eP5i&U7g z7X(PolD7gNy%KCP5r1svgeJrg@t-ILW6J{mmJ9}qS+pp`&h2Bdk{w*6!i>EjKysG6 z6#$VN;P0OR62D{o4M&oQz%K_(j0{K|PprY+A^x`JWkB?Tk>d66ci6Ug`V8@RgyQeI ziuEk|nXP9Qs=h7!9sSJLvw91EH%N_NApZ8!|yW^vxac`kNs^f2g^+%qYx|P#{Rytc%?uPF6#_je7Kenaf6^O25H^gSE z|NFb4&w2Hz*bR|Cg5G%MBiuHSX(XF~jLvuc@V~w_59VxPJh@IK!M+SlG3i!@{4t8r zeM~=uw7-Gv%5UKYV!HThOqS!Jft{CVLTfHz|c)Prx+>-Q$sSSZcb@Y5JV^IeMg`G|U?8JQSeX zc4lw2?F_4itcba6dIAW&L7@F$+li4sg%ok`rTpFPZD`u&PoeeSi@C+<_{}yngQeE( z*Baqeaiy=mJ9}qS+pqh;r0S0N_KFO3N!YC0LfYM zRsf_O$NO7nw`jsv+|X<(24ORTza@jgViqk5TQNtJDA~b9D$Ljm0wib2TLF-!ImTcE zqX}DP2Z3n882CYu#@~{`U@?mpg)NvPN|fy2A{A!r1x(J8w*nyjmD)mm#jh~zEmZiX zTc}zoVp*+xc2^j66qH0OAbb6nyoIWF0O$^wkSbikYPXxn*;g11))uN!YWf1VP`7)9 z!TO{5Zhts>HdfL75WNM+UVRJIa+_Ny)*r2R`{R!Lqxu%AZC(Ab;ckE2S$_a%Z+Bc_ zFwjn3g^|TTJ5IXn7UD;Lf$m@676MPb;cmeA=%f<5?|?VTpgUL>y$!(q*NE9;#h1aX z=-vB}#PD9C_yg@NxSP1;TM6%;I* zX-|K*6nf#y1My$Hjm{T#D^Yjh!SfGl!l2d;7=G~FgWwl~fWPs#WH4CFqD5c>hDV8# z9b80V#$BMvS@Ko@L~d{?@y~F1;JlQujebnS7VCO}v(12PLmyM>TC45?XB+%fwdY1# zZOi-zRNQcA&nPYNOhD^`Dn6>HjIomtJwJ4CI# zE3Aqg?^H1pDpa$vt|n()H%PT_x(pj@FkEujSX+igjvTAmir>V>8fO3K5W6~NCn!D8 z7}VY}k1bYiADYK6A+#UE)cs2|3#Bu0++$yPlY{VFkK%`vaGwo#rKZgvy`rV(Ks59s zh{2p(k8|?&xMG@x?u;w&krNnvZb!0n(rF61o0)>{j)xrvm=%_pM=7s}-~$Y34mq2{slzSwC2c|W}^c5-$&%^-IsRXGj=5!}Y17Jv zzLn*morWL<{y`2^52HXNkWhgTZ1Y z8e`!FlxIOFT@?1w83Mks!C^EM@74XLfh)bd*V{y95<9?bPQie6fXJsvN|p5*i-l&i zlt+6?cPkTMA&kbj@Ok$W^wZ>LAVS=bg)ZRNmSEis%eE?u?3;Vt$39>NaYa_mPrx1D z<{NSZCk@?ui2fG>u%@v7DS`;bw0cN^Z#toX8Te|QfWfr=6u+g{{X_Y5`Y8+zz&Bw7 zMvepY9~&6o{tqxKSi>{_rvbHg&^O=gB?bRILqcH&5;!YVS{$SVRm?tyZ^(+jjtbCZroUG+^B8ZTWb88 z#zj}!yMb1|ptWq(`u8t#2R@8;zuvSQ?Jh>UwVoZN=mXQW?{^)Tu3hBX%W}|KHec*o z7&-6`m!RCk}yhm;;_kRh>H9`rMOj4A@J5Uam z0um|9#gK$80W(~V6eB_pno2oZj0#;gW94`;UQQGf2}d*jw%^_DLi_rU(sRB{Xs?;ErGHr-~k(4bbRSxi~=MGzRa%Whs~V2O3Q0B;Iqn zLiMvtRZ}ypQzgf!ST@vV&MxVt8kSC1EJt5*auJ?5#T;W+D>*aERh=h&i}R*t@zfhN zr&@E+nt=(AU#LKLYwn!xXk00jbW3AKg{NmUdjX7Wure&i<_cC6s(L9GK$l_~ufd2G zxM&y8Yo&#fyB=3Y+lBkbLAgeB5!hmYN;Gg?qCq`KW%vu}vK|@+3o5NdK!)}3tU@DK z!^H>$K;bF%Rc%4PpgYXa7j=fQNY5Iku9h^58dP(1o2QsIr`o!0Lm*Ux@>tE*nfh)` zXUi-Du6da0PK{ZmV0%guykRhc<@64;5{Rk%#7IUVf)b5kk4_}JMt|Ho6mL`-|JouR@O(Zo;=UzBJWdn;qevwZ$s2$K*DRz22tsbZc*0UZSulIPX zE0A38^iBxy<vL{3`iIWS&bem-Z9oH#Lp>XDqy&?jJH5E@V%SxIR&fRG~$ zj^%8uJjNB>qSXo@Dxg@vusmOr;LEUlUp>CBNruR{lhLZx39V{OAghex7pU>Y6 zaJi~ES9qj^;17t7SO=4cGVMJV{dmTzu(D`*+VBj!}57xODkG))72K;nXjqxl1 zs%ffBud-65T-BJ)6VR+)t{Em|2%Cq^3Ru{DNVTt2Y9YQ1*teL8%m31CfZEaRZ z4?J~BtRC?AEMpbMd(~N-h@_lZRahNv6OUo^s9J^8xH7yu zk>xv0xNY`xfZJ=N_4If{8UN`08-vaC_?CjdyKdPn__B$$ZfT>VZYtw927Mb}0pnJB zxS>4z(aOigM*7(;1%G$lvRl}|f~)!xI(%I8n?2QU1_gSx4xYSotT}q2vA@tz3LpI# z-pzDjOTpjWc7H%_xLGv@g4_xi+E@VGdES%qaOQkJjz8pp5erO>)3kS zLp7S934_q&_27EyR=dwC>12MIrqY+sf@WxTjsQ-!InJu&;A+KFCv}PT0>ACMO4j?m zxvc`i&f`gc#n2j11@{`@C={`p-l<9DBvd6ZVl zz=Q?4Y-5Aa0eNQ)s#_%;Ii_Y;EFRV@`#qfj(8if=*Gxxskcg995GsJD3b0;scn|h9 zYuMMXiz2hN)v{IvNQ~ebaFndOh%SaJfRZN!%`F2?0WNXH_Sk!bxul-QVF;hXr=b$4 zzZgq!f29nh9|*Lz5=KluG|7Wb)#TD-E)3Ct8W@|MgRrslAb8x-%TVj+IHinV08Wmy zn}=*iuiCp#I&Rn?{N2Z6e2pxVo6VjNdbws%Qx|!R?Ze4@6U7J! zI0(T7eVHe<_C-w`5Vjwi5)40BhTkMloPF#34^F){t)4%1VTR!qfguxSI6sCnT9bnNh@_%NTW5hANDs z{d*8=WINv5$_%ykJkuK7*Xn!|kkA0aZunk|B+_fI3-H}_K>VxTZy$kN4<-TpFdpLRP-L&wgUwZ`F3tP!>)8`h zC!PfW5Sf3>Wo{mK^^u242Jr|df+G!xTW}ENDx`r&2*25Z=lRE6$0%G`;Sv?bOG1b6 zclCJ;^wxc9{sg-YEsywD9fd}_E{#5jcX{$5ytDBCcxeo}7sq9ii%s){Ac=ss$eY*! z=*~t_d=~|#gKpm3=HN$jb}qoa0gcGCkM5%1$6fk;JQo*7oZ(iBY|jT>61I!Ji9ro? z6vyNs;2OB~77NWQrCYAc@o#dtHm_v7z3aUS>! zU(J#3{lm@6*)9kl{A#^nqPl4dh;|WNV7Y*HgnSp@5i9trL86E&P=lP@-GOHV$lk7ui#Y}0R0dX%VNz&ht;oc?MU&+kFfFcDR5)faYc-TXv iSEYyHkVK^~2+DhzJyN=n+IOG8`@xG5>3fpc&3^;cJR<4< diff --git a/tests/agent/orchestrator/__pycache__/test_edit_actions_case_insensitive_path.cpython-312-pytest-9.0.2.pyc b/tests/agent/orchestrator/__pycache__/test_edit_actions_case_insensitive_path.cpython-312-pytest-9.0.2.pyc deleted file mode 100644 index aa75ae28dee909fd0a69a58c3d7ffe164a2b20b6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4115 zcmeGfTWB1~v1fPoIlHUX!?xsyw8W0AIqp`L?AQ?7@|lz39O0actw6GenapjsRwK=0 z>FJdvu?jlJgqRED0s)zDAIjey(uZ>pFbBDi@BHlAGFloP81fPF6C7-~;ICBo?5x%o z?&ANXHL9+vuI{d`uCA*6OE#NE(EhdaJ8L(A&|d`+wn%^|PbnZ92qUc6$Wcm)BJhYE zDMe+kI7+_2iK}+n(Mp=cV|K>Lmac)G1fL7LJMj*y5BP}b({ja@MWJXF%NJi7NFL2;5$b!2SD`IobYkiK~qGOjmgddk);2VPT#I*)s8ciI+Wh z&cehk6CQ`%eb1c*x5=2c?cFqPQVXW@RC(TXE5s*EI2a{<&1ME$sS=)=vuxrUj#+)4 zx;Arp`mGtzeKmQ!Fl#ZJqxR!ug~6R;m6F5{UtVh9NxB!#hrM!kWx z3?DQEw-u}$n5~;u9S;+psriH&4v3i*!jpdJs0kYQFV|p;j<@yz6TI9I+e$Z2I^f^f zWaetT3eNzpCC^M+A&g){*w9#-SdC5;Pr-vp2mw%p4#Snv;{dqEhyz?kgns!Bu|%j) zn#X)bs{RWPLwL*~@i2rhZ=eAZ{0snvrJB z7@cPW+H#k?MMCu?6)}N|aKW>)m#4z=<}T1QW|MqX*1cNooidT~o2T7OSiE*y0#a z@p|01nMiK3E%b%hevf1I_?&{{V$NJ7Oa)zY2KHq`tgeRk{4a8`P!1|KAGI3R>G2GXIOdu!8jL zRh|pdqRgC7K=Ld#ZyKG7fF1#7p~6bK@;q|!qOPp=eRHh3GNJp0ix&$5J)`@2ghzoV zz?s#Y=|i4la_p?`3+7oW9xjh~RUWTZAuAI-OGToTaTf}JAkG_sD!kwJOxz|qdiBXH z?O3kmn6^l2<$0cigh(I}$|MJL%B0MigG}gi4N`qD7pjr;>(v#JLJgDhUdWKP4XLF{ z%brs;DU>;eZ_W|H;knCFdB~(QlzNo+8*?6YOlFW}vA- z6o=GcFC#F)sczzQH!&Fy!P?*ICeHaHrWV2$R_#U+x0rgN)0scV92WU40k#JSDsU2&m`sN^jhIVXo zu&L?0s`wtY83FZBQUU%z$OmXQ+)?$QzKMwXo7JcrRwF+a&Z1uRT%sS~X~USS!6-2d zDzY_CzFV_w_?hPOjPR!pHDm;yTns!6{Ip1ktmDD?L)YbrHjjQ!to3auDT`23*Pxa! z${Mmr+=}IrVs|N7Yy{*0TTWe4d1LhDu4CmW{aZV_Je{=mTt0=6OSP% z=R_eP!-aI_pzIWtqkJJy+y)1nq8NChSoL)PPoj#Ve2%{HH-v7ZN9fw;X!eUpLWz8V U06ZNyrg+M;*Oi>|ioB$M15NlH@Bjb+ diff --git a/tests/agent/orchestrator/__pycache__/test_eval_suite.cpython-312-pytest-9.0.2.pyc b/tests/agent/orchestrator/__pycache__/test_eval_suite.cpython-312-pytest-9.0.2.pyc deleted file mode 100644 index c5b213d37cd52fa3b59c2171d5d9190e0bb77c5f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5126 zcmd5AOKcm*b(dU{%a15pA4{@ic`aME=*X01Teg!pNtH;6joMNw%Z^JMS+6)Na^)qL znOQOtLjr1JpmkBexiv*y#07dtVIK;#2OoRrAwVx=Y*)-6MFXTj;Y*=ZKIPOmyBv~E zg~kPXC_&A<|C@R9=FOx2)X@dTZcqJ_?dtNB$`4}bY@T1 zoAQW4R!aIrm*Y?R9Znz_fZ1cp*2 zYt1YBS}=!@q=#4bbF4KZ-?9fd2U-*kH8^7&Z_UW>=p1TMIMm>bbG$V(PTF_Z<5EyS z4|Yb(;l~V{i~DGFzF_AI_G?zo##+jz;RUN;8@cp(-PWjl zA*JUuY*@5&Q6twuh=7!lvk8?M;X+7@bE&>h!TLCjWD z87-IAiEh8XNM+8Xv2SvzAM17j=TeQGILq#W(F=cDNk2Ph8&2E(@Lg3rHsd=VB$kC0 ziDRw#7s4++$b-B{LcX$K2RH}$Q2@y(crSFfp=I;D5o;To;EjT>!IIn>6D zaawE6c#8rGqX_D_7j1g(=6uw7FLt-FPqYJdq3+wBw1|38FWQOvP(K>D?J-2O>$dma z;N7sRRq@)rTz_RJhgx&lv(neXI8^qcp&J6)eM7i6e76xr?ztkBrImgz*_zRw0YH$# z#)=Q^MI#wc#b5T7{Y9Y?Cw67dk7SVpDvFvH?zNItVlI2j@$5+*6 zdpkKlmqVksJtfGPii{4RgJsze9V}??~;#FtZpaUjQ_XD zg}8S#{y*E1$Zg_p+fh>zb~KI--}X6q8bJv(QI0gSw&R(zwuAfSb0cd5khLMmKauX5$#wb6qEm^k32Q?9=v>KX!^3vCBqKvJ zt@Po^k`HSzQAsPA9579!QN? zxyL$TY^7s%>O- zc=A=Er>I}ck#}_rPkI>Zq+r^ry_VOhoU!e^TEJ$hk3r;xi3xpG%jQizk+QNAu+O-M zN{*-xc2UqvBMWU?R$%S6zG^EFDy^s)rnUr{R4Dbb2u)~tW5UR#-1sE2ho!oDZELBFbJ$eQ zLK}rNAhdTg3})~A7JH(%>t-$pad8e#!EY_GOk#mh-MpZ(+Q%#9Z{qFL*um!M?YW8b@ zFxZI*Yq6k@7t_$6-}XQpymM4uhP+nv8z z-6hPbqA2(z%=i=x|Mk)*L5Z+6tqXrhR^Pr>dqGt^+FNO)W?LY-I(wlW-OS)HOPmUz>~*#mFfPJRT=- z@Lr&?;dm*k5jbeu;hl&RMm*st6HuOK8dGr+danT}FFAro;$)0bj&T+M4HmdcGy@r` z#6uN!L7DJLur4iGmdQ#DD+8GI!0=-MTpqz^0cOxKHcYYM$e^I05@$pxra`uU$}IUzk6yPR~uB`~KqD z*DlbG#p#7NW*28?)Y+M{i?rj7GqVfdJv*nKpP!jMhgl}jfJWAGDflttg*2rSyP7og zo%|ZR1*(SW4i)m&gpUqF7N*_mvW2snt-=o&IAYBP z4nEBmd7e3ofMIp1V3_b@icr6MCuqM)GFHJvjuSO)T1#-na#~h*5<4DqDvc9u8i2!Q zKcw(9vpL6XhM7$_s7Kn7W9`UM7jYLi)sCEO7dzgLoM;z2<*wZ|F!_|D$#%J8g#D(0 z`}NevxomW|6Vp}!dAdYk3lv#RC8wc?tqV_f3Y{YlqWjk0_*=NU-qrV^{89Ah(Q4np zYHX~&Yk$3OxZcrS@4Z~#G4Oe8@Q!hR=99&0^4i0g_Ib~~`oP{_XEqMJT08LSAJ1&e zBx^IthgZ?YRb0D@tD~ekKw8D)yZ1Z^`g%i8BErDI-=2Edf4V+ARy}sE)_cC% zGxx>dEA^56^<9(q3)M@>+OaFufvaByq^{7Dy}c3t`plDr5beEn<>r;T+<7Z}GhE-% z``O@2pY75%146K8OOS%0Ew4Z7Uw?fwCPcb!y?FD*4~n($@Q16l@K{xv`S{BHcy)XR zpeo=1gl9G+_I<=DF8aVhUHDUg#~WfUr72U7?c9hdwU| z4T*jK%qcF~9BWL;#U8Z4Ci_!q>H~k1&B2FYET*_*kN{Ur1s7ocM;o5OY!hx5dn8SL z79Om3_TH-8tW@Qpo0ScDsQG;)5B<34Vh>v2Lja!=1BseEwCNQhLvAS^pfbN{_!^`Y z9Z=m{op3J;+{^^lowkSun57 zQT(eQ+z{T6ekpYPU08c0to=nezv&k|@{b08Ft{Q1*Tnw1wC9W9j*Z}OEjWC~SCtRc z88%W2j@+58%7+|mv=$t_V^`&I2isE%?zz*$C7al0*zfai`GOwLX3wa&`{Og40!*Js V&Q$&0#eXt%s~7lRF}|~be*wNm@HGGc diff --git a/tests/agent/orchestrator/__pycache__/test_eval_suite.cpython-312.pyc b/tests/agent/orchestrator/__pycache__/test_eval_suite.cpython-312.pyc deleted file mode 100644 index 728c2aa3c84ce7e9ab6118d17f0dc65391f63283..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3000 zcmb7GO>7&-6`m!R@JBYO;YHUwwvzXn<(6gM^8)93(Aw)t!cEx^rDg z=uf0Hn+S-=T*)bxoQrnBVL0OmecmoPW+6L69W1nk3@u=0+M<0C^V?v=!OAQ+TxfD) zp-3|cMRd)vOpZ#GW3vUyR?Q48_w$DDX}Shxj*-dXLY8vsTv`;GrxekrwIaxdiH2&cBL?PFhLZZscg^E>BO|ccVLv zI7tWTBwY`DS%q|y80jIsq>uDJ@R$e`LFbNT$672o`u{EKRIz1 zk)gY2cX+3fMQ`U#bwhn7sz>@^SrT{0(N)BKZ=hc(&Y-s!cs&Ex-l`i)so}Aq@OH3$ z2GZ**uA_C77@I8z9Dv)IvPMj7+1WE^%K?Ug2o;wcyF7W#qL|Zok=Yr_dECjFJnlg( zUgCgfsapXU#)+Nbaa{XP%ycLh;XGb5xI>FvbW0Y% z&P>XUB4zHhh)Sj5n0X3?XmFYlL0sT>D1$=N8RaF*F`V@x6iJ3LiSXMN5x(46STy9i797#qV2m8*xr86ihqFdwUC{~5GHeUUIhqSEn-&C{$Hjy$ zLh?>!8awK@3c+%2+HRI3a;0OknzsoRttAd=%7YosQYMR3gjl^_2_3dO>Q3!230=+I zx8ByUAASsX?LZc@fUXJqSbLn13PZxm;3Ysrvbg?(cHYAIC4w)MpVk^4h`GT^h2(k5 z&R~mQ0H*Hn6WEQz(}%XupRWJ$#uhpN9%YVNAqbLp!;;+#9zrDxPu~L{1mm9-+A@H1 z31@C6d`#A>2p@In--Ce&8d-*mIiTFZ4wV7B1<2*9@pzp56exQMhX4EMXTgcfGi{+i zrz`KgTYVXCA@(zvfPGa74H0oShZ5nowMv<2tIK9#)xHg)TC{LM1m(#}{DMq8R54}_ zoDkx$WhFS2B%(|vh{<-(;&PBpo(1I)fI)Pn<}NN6m*(eYjLF%_t8Xt(UtADvi<9%0 zrxvGD##Cy0QM6sYGBy9^^sF&6mzuiDWb`70`FbG(Z=)ZsMyL`~LS3?Li=CHi%XB6J zE=ZYtLPQ9#D_=%7DJ5tZvXr?z0wl7LN-^{lJpK~^>@BdCu;)GSGHjv49@IYeRphy? z%YWCqYMs3wX`e)X8>#fZP>G(Z4Lo1#9j>)?)nYel9sQ4^gWKj8sV^5R>31JS@#F62 zYW<_1<@Qd#UOoBxU#{$>($!S@;VrUvi&by2$~dp|^IA_|ZFH6Gm(fC*TXl49dRX!P{$6k228Xn#bRJ4;dDUDUbW7|^|?MJROUJZ|LI~DD;D~(jcBir4c s<&m_n2Lr)_K-lNo?;cl%KEJY$fPAUCr1I9!|0TtP80f#3diU`E281Xr(*OVf diff --git a/tests/agent/orchestrator/__pycache__/test_explain_actions.cpython-312-pytest-9.0.2.pyc b/tests/agent/orchestrator/__pycache__/test_explain_actions.cpython-312-pytest-9.0.2.pyc deleted file mode 100644 index 29323aa09daab08dc373828724c316f68ed6a6f1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 10157 zcmeG?ZEPD?a=X-$6txmXeL12f*^J~Uq9Rk4Y%8g2JEu^Jl1m~xmhC3$wd*zCie7p7 z;kQf0BB(;~xxH)e0O#(0*e#4UKMK@_{ljr%ROeiB*MA1u0?W#R77G^*(Ece<6b@|Q z0QXO4-f~xztT;ZvK>v8LoSm6BGw;25Zy(>x+ka|ksN>-JRr}wn|J%xO|AB;i2^Hi) z36P5%;RvsB(>#0nGBqh5&t-&ZKaV9oEszOL2N_Y*isd6>K zvj%<-{s+KC&hW|zPkf|?2!^jB$<4Z6bs6w9f-XV)BtU|s_Il`AMa~GhW!EZ*A-Wt= zcU`MuxIQl@g*N= zInR;S^W60|w{=roe9L4pV1S=?4i#&ODr>nkV1Dq|&Y?mQRL#FOKP&%5`9k?)^GkCn zX8zjzDrVj`zcN2B{}7QI=IvN{5gwnJUzN|n^H%v>3=K+onoB9Vo}+dU&{+jW&UZ#m z|I0t)_1~}Cf}!X}T(CnVmw^G3RASdvbQqq>WoJ~PWK#+bnylxtc0kVRA1M^3jYt)} zpc#@epI2-yE>QF;aABN559g8Hj0Us<8t{0b8C6qsDI@3OAv?&L3Dq_^9hY=yE=)wM zJ&cyB==y@LP$>ffa$2!#b$8MQsWTUC5o+^hUL!DJ#KDRVeJI4HU_H#{h-F+$ZjB^#6T`B-HX2C*Qm zWQ{=_DbQqij;2llNo6BPS%IWD@3aK(Cce~({QRTZ{hFLPN#ujYEmF!jo7k`AQnIEW z1jOO@LYs7at3Ku)0OZzn1{=&egA@58r*cyqeFacDfM6#8r%!Yc>0JPxSPj0Oi=25n zv&hjQz+uh_IP|uFp0~qkD(6p0Frji9c-U@mXf->RI}LNKmf{jiYXR8x;~yM;cl7N^ z>G0^0qZI8@d{Zg5lll>$`{OliHqzb5*aJYv#U&PtvG&>mdW60PEPS{19|2h8?uji{ zq}|%O!+K$x)i!;vDZ1L!TW;#T7wPy^T^hSHWqv5#jhwjG+OypH(!KWH8?W7M-~V;A z+v@1Dx_4O7j&DN#=DLS1jrD=Wv4=6PK8ofd?Vcg4HEKmWt#IUFLy*ZtxcbgdTd$1$ zhajq86fdsmF!?i)8vRYOPt&`wp*}r6UImgXI1XqqUU-lJY>MaCF3u!F{RGv{mqs_HiWoe7cTYHv*t|j+*4t57;`Gp$z z`4A(i$LVcV?bx;^;bNs)w+FOZah_lE@cMYN~$94k;w9IGcVy zE4PDA^K?7xAh@l?O};Ipazu&qk9-FX#Q9?LOMUtIp|~D9a3F^0p12T!=ucv5EqP73ZY<&G?Swl*>Hk}tc($ZT?65ST@N;;lLb|S&>q5cCt$GK zCH+*cpb=(YN^7~3Fd#TTHkF*vPw=v!NejuGkO-N%}{skvb(AIfw#@;!aEHqf<)O;js5fhXO?hpVBj6 zIu1WwgAFJI1a;y20j^`%iVj%O5vyau>P_C6E_Z(LjTmSM-;c1OgcaRyb-ZhJ^<8<{ z>>PHAni@lO4{Dmkz+&>@4z96lIlOIg;%h-%6*|g7$ED<5A!Z>JEep|0J$Hp|jA|3R}MpH(kj5d1f{Iayk6+mC%jhK2%Zzex4}#9paj)D(y<$K>%@SKpq5H?bcj--2>|Pb{UU6uLSVqD@ zJqQYy-t>xH)GG!Av@EgP6b8WPr!%HFuqxoaQeimMGNT;agP`;2j92cWUNIn`W{JI~ zu*Vd8uYm16s{-CD6^27CGs?j|2s&55HcCUei+aU?+!gjb9`)73G-Od92a(mcM}3&- zg2*p)xrWq1^d~~Dte!N$FH9PNkGu%*nn*MJs(BEt5Qr1V3#7dw7sXvO>4f|jXr=w` z9^?NrYFx|HLG*(j*>KHzxwW+d(nYpC7XA3hcD6tA&2bP#3K0D?xf-*Z#1bS1F(Xf2 zgq^0ZD*9Q|fjsZVYb|yp-3I8V6NezJqSRPtA%pMcTjTCTFTS=1G9N8f#V(T_lSpL=rQ*?4lxb5A}aPrm%zlh4SL zeHBmgPqj|Q**e+(e4X56oqXl_oP0KO5+d?}$>KJhrUvmiNlnAqQ5FtD=%6I2S=Epv z2+ip}_-nHpl1$(|r@S~0^12aQ$E;gN#SUP6R%J6WH=I}}aeUbJgNSYvn;$Pa3IS|` zn#t#=p%7_?<}!A@LrSuy$~qiF9DsJwgV?xwIO#}Bd3j#T$%MWRtl~?XbP7&!hTh8v13(a-{>33I5Zt4>3*zi;M*#rid&;} zlBy8hW1X$*&Aq`23I-V3ta7Kg&iorVhr9*h_gCeQ*-7M0^NaEYb{=_3)(i;FW4a+5 z1>HTigrNPiwWG`Ok05%#?Fdn0P&aaU04Pt#um?SxwJ8Cog&;(YN)7NwQ{Ofhs+9H(?Hnnjz!BZu-R56`>%J_XW6rx>KDRGc{-OD6MuE>^4B({LycGkF z-U8+=^B-cPhu@C%rPyRo%*z>V0JA2TCiydSseB>kyi=IBh$p~4orHRvd<&+RdU|?d z=HJ1P!pZYZu>3jL2ekSmn*IT5e24%OD)b0~qX>=xDBvpq4u)5)@^+p8OJD(7hlv~L z0yNj1IoKEMgF8*w%T&NqN7j&EV1fsm|0_K3#{L2P>EreaBcNgae0@#`YWb4QNbC*x z2RdT@J#+@lErG$CKz?D~poc(}z7L>)D+@bV$E?y9<)4Dve`5ZU8O27I7t80N;Fsl( zHyMKRh3dQyokpX7h~NhZ2!cOC@W%)w1Sb&42owY}2+{~nBEZp)2k9xqRRqk{vxsR3 zatQJObUd=Fdzw0cK=6D)VW<)lR*WAe6B zHhAC1bx!%L-u=Hxmpdod6+=elpw)5I>VMlje!ASLd4&h9=qpzAd#F0ar!-LozK`J^PsE>qZNio0$=refc!fcHv;;ZVzra&QlV&JD;_pfr@bs8{T; zE%6;wIA)6P+?g}QW2*w*D;0)AEi=l&JqS8?=Dczj^@;%jHB0Pgxr+Xcxe8!-xd>D2 zuTDb%{@u9>NMTswK2sP2cPv33WNcNyd!@o~sAWbuxCcRJ3F<~^D0fk>*kM~@(iGl@ zeAAr~Q+$6_z%?xJ2XAfRT66U_F+M%%#fbWL%hS`F~;wtZK4 z-}$D&M=?h+8Q)^px=B>_65CP9$<-#Dv?%0T6IA(#!q-rc-gT3+cCf-@>wtX#P9PGQ z94WxZG70wCM?%S_)vS`J{`w=~e( zq3ELk?$_`<|L+`ko?GEQ_&4t8Z+$`D_gfCY{njX-<3Aa@)cUjU-{%lFdv-ry$b;9m Q^LrnT@vremcs4};2Rn4f9smFU diff --git a/tests/agent/orchestrator/__pycache__/test_orchestrator_service.cpython-312-pytest-9.0.2.pyc b/tests/agent/orchestrator/__pycache__/test_orchestrator_service.cpython-312-pytest-9.0.2.pyc deleted file mode 100644 index 1b4196572422f8df9d60723a7b6f27cacc6a9621..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 14323 zcmds8Yj6}-cJ7|(>FJps%|j265TF4`pwR|_co^9RY!)!a4|x|bHgfD?m~M#?^ANXt zWTc(hBD*Ak>{i*8+AXtNRF)*J3Y1Agw!B$q*XyKG`QcRl^jIRA>LLkM`Q<-}Sb5_V zzjDsK{Tg{Na^g)@(ui|k=bn4}^u6bP_uM=G(9#m-;0auNJNM0Qj{8?k*iXocEd3B7 zZ*dBz@Of^Gr=hRl&-!?-AdCfgRw9mxP~yu63(}ZW2#tjb;jwT*9+L}^u?Xey=UWQV zu_({^xWk+xT;!C%J3iLNSWFR>pdwxMDIqnigw?nr!~cjH8JConi{e;9Nhr~a!dNSW zF$mirj6>Ky!>3w5Mj@lAfEj(EtWTBo1Er!)GFjb}kCw`Mt~l|$s%K2;SXM1&NUmhY zj%T#9z@!0JuBdCKgc--C)NG13+g>2qGb$G8C2~w9)48mgWxZsSw-QSch`hzAR3&3R z=!nk@A1oINGlxlL>da`$Z%XNOF;h^}X)~No7fMPwkMT%4eXg9zvyvO!63V+jwe>|! zCEC_ZUOm6{pgNtNBBe<+t83}$?OQXsq(XAjYB8Cano2@RR@JnvSTLa$^{qN|7i!XY z$`9 zezx?Cf10cMb$bBAz*T&TUlEi5v?|;D6~5xbVRut{$7(@GRnVv6S3*iyk#9zvGVDKn zl$M*(cdR#4VoE&6DT%B8o2~EAsl;)|xK!Kdtf<47+A@4!QgWGmX=2OpY=C4SFojH6 zFWqlDbbcxi+Dz(aa$1s&jfrvk{M!?=p>i>&Z^7@H5$!po za|Omn))X^E?RAyFT#$*XmGgR9pP5ok|Iz)2O%6u24DXSKp6Kd%-E74!<;&P5CoeRf z%R>`|%v36D22l?rFn#FYk>h5|;inHBefG#``uP_Q9(s-hp&r5UKyY9Y9I@~Xuov!!AR8d5AyX0_ zf}g+)r13?`2*eXu`VAl#xO!Xn+tNaEPc6CU{WA;uj@R}bpFi>1!ijwCMBeBr7;S|M z&)t#R>haF{n!ft#_4SsvddFZr(RC-@eJ%IiGsdx(j8kXlnW*lL{48q??J z+h^`{Zn`xx-?`^*ce1{*uin*tFDSHzKk0}?#6>O^5a~2-uv<7A=={3~^es-e=O*_K z6yQ^Zd7?WrQSrI)aY6B46so);=+;c(z<4*5i%{;xqCBgr|j8S^;i6p_%)V2RY8%ffr?NGoE?Do6f2_kr+S;s zG>LX=*`q`%;yACgV4ZQFZ3C33zS?G-?6hNUXlrts(>grz*SH*Ztm3!(OuU?H?Q%DC zIg32B@AkSGuV71k2w%YFQ({;BvoO%BK_#vvD#092QhClw;fYjyCABxA+3g#cK9Npib%grxDwX#o;I6*n=pKv4y@yT8&92P znhDwcdkCLs^C_#Y`lv2sWwp{-kuA+cR;-zbEy)fo&4fTR;i@>prMgC4lah5N9_R$8 z5q{{UKZ9IAUVPP8;VM3=AQ58TPyZ0S^d6+bA*k9AxH!Q@4oNT10ji)O>%b&Nyv ziEO_T3|^PhTK?=dFsyJkCk$TUA-q1DR|#0E7jSv52$t#t?(*!B)WlR&oZ)Rtv{dh} z`Vk{gCbQ${6bjjO&e5fuRPS9n@qk(36|6kFijtd=q?6CvTCp>Bf6?HrV zxZwtW-?w+~4Su$@e_(26TS`mr-J8Vdj+916K7dL;6d>7gKbp~C-Pb9@u9SwEyUZYf zT9st-6jr7}X86ge8H7dY3^5bwEI=JVG*cv7DokYvKnEyJpDyR}fciC4%$I;eGdt7T znNm5gP}cNBzH~a1r@-6{rM1ksiW1D|e%d@BlS71*h}o7NFOfn;()yEie+5=_KSZ{iUR=N{q)8#zQLaK8YZ(@ObimCQa#U$7Z$NAw1;T1zv8 zHnfMm;J%?o39!a-+WSBNf2{2{r2b1YSB}(T{RcP0(k$W78s@UpoEx2&HeEUC@Hi1*z7y;EPQ{SADS$Bp znx4^BvISlyYc2f{^;pQ4sfDcY3Qrdkzv8P36@Nvb^E*%pz+&QBD6fsBVqg*S!vYVs z3G2A?+f&B@JXQq=+$H%Te9m(0STvDZG|{qXK^HK2BsGIhLEB2$p>5G%F$n;?kzlFy zS@1@xNDo~h{1pk_I)ruHw^qU~7@Ks!nET%LET{0s)oL>f?AV_MtJX}H4kuW(uty8c zcpba0$kqxGQX&A-LY6+mE7oV&)}tL-`UE{H(FqPNH9Bi4r4*~B8NA>`*?b)zv z&vvFXX3B=qYVB+=WsfjZ_6Wi8N%kSZ(M+B|@>L`UfZPuq(UY&2$XRXZhL7|^jv30H z$rLA4P1RvHa|juqLh=lfXOTRI$_ksJY%l1(v9jR84|dDxQIEN$~9c97?tVrHmz zc@5QWGKwNzK=L&pnhb=REk@Y3r-hlGTyeT|7HroO|6SW<3BV3(e**+eSFHU_FfKiY zG-C9QAcc7ENG&$9AmQI_JBKCbXp+T0qE%SjOM$1}H)KddMl5;lnObaULBhY=Rt8Hs zv_`X8a?TT@P{wpzl%Im8TpxN5JUxIlsj0C(ppKY0=a;K-OYyI zZd1Tj%oNd{mccE6D`sBRRfW8WT{wZ{BogXHXeDTbOh0V3O+m?lD=nDOW{O#Gp7}|+ zNO!qxhaEnAX!Ow0{m-SpzMl?T&q!??n#%^RDd1i`)nW!MmlSc8GLHSg!RH;VJIN`` z#*ye9r6VMb**KC(2FYn4S_=@*P_85WKr%34_J3KQQw4am*TdKZ{u-pM<$+#~ZI)ex)wO-jFZLcM_|6%ZWE0zx?={(=~bhmGd=uzz}v{hh}#h z^1yXyclUyTf48j+mYSm}7XJwOS=3AC1vdO~ggXxoC|tppj)P_Yzvq6i*9q!)2(Hxe zph#%-l@P@yf)ZZlgm~CSSEf#gNTUinTmg zrcK{q_rIA7!h>bHJo5YOI&P@1x8wF0Al@2HzQJc}0JdpU+E?5ouS=*&k6irO;5=&5 z6PFWu(C&H9X1vZK6P&D)`c)0jEdqyGS5egoZfb+S*yMns_>RrK3H?u^?0OO6Oc(&W~k@LVtW`Jl| z(^^aDay9$XgBKLGafR}Z74;v!0HT@ZH zdc*z*EiHXVc1Wf0fN6ac)A~nEv0MZfyFz{wm_(M8o>9fKrS{k;?3e zFZoq1z;^&!!{r(P-fDwh5hl15yWiV_WT zm%%5BicVocBQzp-a^}TVyS<4=ywK`V=1yT-gW+KfM+%Gy&%?F=pM&{VGzrKh5WE-u zYm>{s77t)+$07&8yT_I=SQPoduD2D;+VyvS%-Z#d*c5E-sIA^Hm)QBaKjFeeV3-4 zVmmqyvSK|f8#tgLCw^_%sp~|b>CYY!IT)=EJkY<}*333mxe4y~+8%sRbg2zJ&le+K zPnF;gAHc5FRweKZExKC4pFOvh}ld;4mXl5#azjSP8;06P}0DXR^r}38*Cq z`f9@(E_U(MX>!QqdbeRkN3R5v-UMTLFiwX@rh{kfy6~P3Y6L{#_PAN=4ktwvpU>+c z3P1qtm`S1tK(Y`($VEh+RyVr+vSSqobJ*Y0LI43+{ex9e>HM6pAx<{IP}Q)HtAuS0 z0n!XqWb2#V_Vne!->eI3{D1yt9xXH*2M)S>2%l_!F=dT|0=t#99u(-{bdRKFW8gt3 zkd6Tu2Z#p4@Fj)GP4>8PLuDO;O=Ue&@bUFjqwxKr)Ju%>H1BD<**8zpdAb4XeDQDY zk=;y_?q!mV)=n&@^eTOom^Dk{E1o5BTi15jFiX&{+5bl{UoN**g7nQ3l>~T--8tO+ z%@bguHent2&6UkxmgTwJX7}}BmdE7;%d^?j>t;H2{N>7krPEd=r3_YDEuBg$*6D+G zw~1;H_8eb%&=IZxU5u6ZKpf4#iZ3`F=GEzF%PQ9g*Se$p^!C*bBgYAa>m>eJ%rsOn9*f zuFa)i&*^Y*rZcGz+N-<>;x$}T{u3a))VUz_)TEwkUDuy6lDp@nk%s*X^Gf3mqhYrK zXoD&11Bl>xcZHwkNgPAPhcng=*(EMTyc)>y$2d3}M!pE305}0b6fl8ne*jJgSb2n& zcfe&1UJ0TcLPfP02;-2uZ1pVEqZbE`&&C9wn7sR>?*PvFi;QaV|=EoWJ2*Huwj zqjb~#)!I=Lz6U+Z!vjb9VaRc4n+yOkg)CfgIu3Ug<0X=t$Q9uv(mG)W&lpu3UCV&;yE2Ihmr4LPg|_UPM3>HUcKM1k?dBy z?3J56lB5>7N#=#8P+Fg?EaR| zmw86lr|9k(x{b0QWwM`!>_+(mjmZ>iFWH+!32{KB|p{1rxxU(~+C@_%9ctaicpN$p#h1w5DluAdw489y~{)qV%U z_mJ}zt^9M4^y6gh+s0o5-!0?Ezz4F7_iArE#$M8DJ2`Ob3+eP!Y6vxAjWSaj&w&Pt z6F3;At&4`jLqpM2GigUgn^vBhDiOSan|8#-3pp6J zo*Z%$WR?F3NN;b__#wU@CaKDhN( zs5bamy>C;!H&yTHy(f$Pt&4uCJ-WzAEz!kRF0$UKw7##tK2=}8`FfYJZbv=2u{nSD zwSG9;xEt@O_w*V4yK6lo^$opuH#}{;c&^q->Knec$Z@anCw=!gu4~M<81N6QT9mkr zz4hL{dx_9SXkEtEWoW&Vi>$r23r;ZZ#*_7)or^whucB7dxxOY zz1~i*;`#@T!9BIUz4g9F8!8RFWNdyJU$$rPUQ2LYbTQ7Y`=5KvVPMsmEv$77q;#&Azf?L%BkUVb_$VeB=+HhvW}|z{S`U#s`sn1<4;{u8(ZP z_)d)T;BA~jlS{$-vyat1q+ z12P+-Yk|E8^0TK8KBCiZd7P)nNw6n zN%UZudPdO;$~>cA!&n)~Zv*ieQgPY zPo{V-lK5WdLZYvh=$n)K7vyaYD}@MXqb3(VJcL`}U#f?b-+?weO%0 z(ogZL?uCNuTfr`_Pu^P{>5AS9#K1QCxybMmmxzcL4t}!9a?D;?{iE(5bYJg#@0-S} zlUKUuy3WqEqac8FZsXFw=#Ul8!`ww1wB zbC_aLhf;Y?@s$%SI!}dD5g!TLjdj~tHjP`N9SJP*>pF-BXY?<9ViJB4AO=K3?uIZa z-s8lG_$lW6d*owosl`)7bAM?UeTqd+YOw{@SjqqbSY0>E!v!r+E|)m`RN#MLZMuAd z9a#+{cr?{vO7@*idbnYBrP(ddA$Ft!hGmGT^am|w$jO2qg|IwkAkb)-zX4n1A@*Y$ zSQ_vLQA27Gc3J9>_c|qVsCkY4wuAlDgW4exB+#FKm|IpR#=g0N?rXX$XQw>WvQ1;& zB_udgDZFEcT5(9;m-etu?jwH>N!7&-6`tiTmrJfh>d&z(1u-2xiY~T0D~S@h zWM-GLB*=hJ_)wzhEN4?gseV-Ep(A!P$1rb1DmCtnH%bP>R(zPHOi zId)+by>$S-_vX#a&YL&yee?L2_Vy5gw)oi}(l>*I`~y4nCe?)MJP7v*B~-|e6mnli z$of*gte6tBQcBADQ~s=+k_8+SGl8sEi-nJsd+MeU&M9j~_Qw1kqa7J^M!*s*p>U6H)q^-H@rlWIZ#xO0NrE@%z z)a^x>WW%hq<=9+7#Z2BbVgm1;V#d6QLr#v(m~1I+n1*MKM}=Ca+6KaXVv>|VNy-O? z_;_fnkj<`4Fg-t?h>2X$G)vE#n#Mz#md(*Z2IV$Q`=X#{ypczwir;&A+JQaolSu3d6f_NjnI(AIKe2mJ}AL>$zgrk1aFPDKN{Z9{{EhoF~Gs z`Zpl=$r^Ehdu^e12lYPkmeKlMw+y$8$}Q@eI4>@d+kyiz<25Q!9~G%Y{jjUr(8@GG z6&lh@MvyZ6X4d{X!};UF^2ZLjYhUQHftxNowO@WX!qCRR?nszt%S^w*uKQ7 z?7&4IJMmJXX+4vhJ9c8#&vam1(hE-RW%u}UJ_8{Ub>`D{)VnYq$g|vn3DM;HLZ6#; z+dnU?1`Af&Ifi!=lX#Hkvan1`QyzlZhH2ZbY~-xjG&L>5bf?P7`b*cIXODR+mj>H6XVJ8F>QQoGRfN~E{{)NolI!g zr^d#wu>h=N7%2=xj$tgve6AHN3bKu^jz$@}o%=OB96JLtnrW{BStsT0{)fs=bhs29 z{$_sXe6n;t`Rv9oc5Y-!H!{V8*9#;6r;(V{zh_*A zai4>GxNSkHOHIB;78>c<)HajTLCAC4Lbxt9c|HBsgf-t*U=vRQt**T-u89kH4X-q+ zEFQ&sxz>Ka}hM`M?2atwbsy1h@kXT!Sp_cUlF&d764$9r|tNs`W;u;m23js%b z&E5~)3|Jv1*nU{adVxF=T!e+NYV5Tqtip4M_mHY~F0*8^)sNqZ*qF|Mz_#Y4Y33i`>jCmIIO#-h z<=CPff8=8Wpy5GdUbp5<8(<0}0^mm0+{3V8T!l8-Xj8PFgYDi?)7DaM5qx#wzx7q^ z1IKWK7!Y(-&zCn#k%PsJn!yxceV_+lw?rl_28efCJ?l8Xgr zVJRC$asddJ0RAm5qeBY-#zroi&zO!$V25Jxs4xS{*p4 zx;O?`>;j|kU)g*X)ey?icu zi3u(jET~H;`xrK;K@+=(@~22X1F{E~Tnt#f@jpIl4W!QDZdk=a4~AY9Ct78}9t6p&XC<4QR?r)ep_z+b@K@k2* x!rx1>;QJRr5+*`I_+A!-;CBQ_Md=jeFE3XJum`g1bXUFi>bjihO%ZIaA;W^0n zPL`L}sM`@<6u#^`p{!i#h`1x3jzYm4SI8VvuL&B<;#DeG_vOg<+%6yy$b`!;QQ^qk zHJ64C^CCI%s>9y~Sq{QpD7efa;aW^xOP6Il>UGEWh$A8!MG@Xu!WcmgLon)5Kw$t&2 z%r4WAGRI&3?pqwcJtwmm{am!d@+9))`tJbS3- z-UXN}la*kR`M_DTIrxRkI)Y$6=233Plqs^T;-)RUfP$xNPFOrzW(7D2udfl$@uOwn<{Sb7NfqY&4L5^`P+975xF-NMXPL?zPyC-{gRqcAP-GMY z6F`KRvVo?8%E~ZQisev|!m~@4m#$uX(SGG3Lw7N>F+(SPrYluBnt$%km4(;fPQKvy zbZy}ox@v>jR;Vkuz53vS= z?bReM8*x{rZL|nmfQu{e^D8jj(sqke{c62`;#B{hll}5k|JdwqZRT$6%=fi3yVaAo zy)T~MzWUnsn`Ea-ck8D=pZ$7r`?|Zmy0%mA?oQ8t{@Bj+g~O>rDYLH?(wPG|QX54( zA~pC`wCBLt|BUwkj&sa~u~<(JqdjvJ<0|r#I4*8x@Ip;n*0)LtyrGFv)Nc;9wUzP^ z7+ZRpz`RsL<;?KZ&0!{P=wxEU=ovkIRoh7QQv73qnyIlenLtM?srFKBozzgGZHzMT zNTz8SaGBT^`0%Uetc*3VL z4^@7c>p7}g0o3LqhazOtb{h_sX{;?>6jhnx5q27mX7}Thig>OM7h|ocj*wNzR5(JkFc&Ov4K;eSPxm{c*Qx@i{M?L+~LBIs;`aV%#!h z3ifb%XuaZaCSDl$5>fN7o(S4xNC? z%0=}$Fu)Q%T~68Uhy{+Y=^9$lL3@KaO+?rdKCOs140Ku?M;;s?1M&0Y$RivTn^S`| z@Qg>5GRj4xVg_#;)W|W@-@HM?ar?73KzbH_{v}LU=BBaCRqLbb*00a>XHNZEs`sa7 z`^WF?pRoEfr~9*~caPt9=bfG7&BJoGT-i_MCkltdSJ-SXM*%V%$s zt)(wIJLi^uC||mD>F477wz;@noWC=_U0l3t;`if_Fu;CL*Z>~QAaiGaw4Z>ZZ2)%6 zMYaeESO&wYb=j)RT;enK5>VufJ#ctqU}$hcgV8|}-tZc_MY~Kme&n69U%03UDL1V`mF%BK6H z&W!9RBoIn(g*P>6Ff(ud-pqUN zd-IFymI;)(t3O0P76|zR2cu#Rg`LYF+#{4wBPNN_GLl>?m*iXd#B7;Kp;bt%mX#D+ z#l&ve2JXwnrKH>{gPdm$HJQC=(!w`pt3qvBgx>90UTF)}d$w}tZnCf|qb$7~2dS!F z>dH=6zMrL%2cc9p&MrvSQO*@6dGB%-M_~^J8JtPmpD-CHdm&_Lz@to!eHMr>;jDne zQ7VP9ablsvLeEexs=6A)5e;Oh3GkFC%RZ4=JzJRz0 zRYwur$0H{E4&!=S)o{_5QNkcnzF?uUf>bOs4v}y;6YxG?_BzZfsiK4+;q~J*3gWB{ zyM+KCaH`6K7sh6iQKl+g0rw=ZEod`ki&6ZGe1L^=z>qx%#$Xbd@?lOx3E!^P3Z9E0@G(54D>|MBND=s7V1_oZ?szHl2h0TD^bdSpSuyefMDh(A4Jm*FUjYe(-#k3U+w z^7+~qbfd;L>(h^>embyrEnHi=xl!+JPMmu5_Qu57-Gk+dwN1(eYX?-4`8{TFG!9iW z`!fhHGyC7PBGLPZEex5p{v}oOJEGB9vG77d+Qw>SB;O%&kKL8QGP&Ung?-&^A~Cyk z(c}-ct_<_(jzPz68%spwJ|u1X_fC`JA(fX&=T^Sim{mE^R0W;E$_=wPW+9*^ z0|`tlcGD1ll`Yf^%vF%mKuVT$r0^_N)O-SA1sTbhsS^A)L*{Izza;o090AGTv&BVF ztP03@50C0#N0d*4YW_Mt$w9p_T#U@t_6AFgBgm?tGvz#g1NPpU)DPBK;-{JP^*_Yu zJEG~?9Al@!}k;g}lCmC1mLh zutW?#y}=8Xud{UjGx!BKJq1;y&>*lA2yCss$7#Pl*`GZ2XQkesnCc&XwSUCxPfquz zrZ*42_Ta0H!_8f{=vKG$rLpp^TdP=iKiEA%sz<-|pSma4-IMp}>fGb*#_72y?)kgt ze|JtjIJNG~uA8%K&McpWE4>^?VCKE5IvsR64M_NI%tS+HUW29WC}oZP35YvbEC#N_ z#NFpLoza-*gS5u9S7-j8))zB+;D7U4mc`ol+D#9MezA7=bNlSzrSI~Ka0^l=-h^g5 rZy3h2T*=5iBhc(%^LL#XmyB)8F|6;;Y!m42f4GC)?$jZpsdfGX6qh2; diff --git a/tests/agent/orchestrator/__pycache__/test_project_qa_actions.cpython-312-pytest-9.0.2.pyc b/tests/agent/orchestrator/__pycache__/test_project_qa_actions.cpython-312-pytest-9.0.2.pyc deleted file mode 100644 index 562c374afc72ebdf00ab98310d54d4aac1a51797..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6079 zcmeGgZEPGzb@y(4Uu&Q5V#l!?Cq3dM$7p%O7H`uj_zjOd-LYa%zJNU=eeCTOA| zOo?6_sYHtrQK(2$T_W~Gj94W;75Ct%k*Fl6k{&D>sfs)$SGuRVD?L*^mGo4)(mT~# z$xLOSzl&tG7}-GjhF}IQPWnie^pzqWmLSPeLQ9^NrusEmOF_GFM$C8r9Tzp37g^?U zYE6@(^Mrb+=;)SdBkkxJQmi3%#4;Un#>vN6Pe^;*P)(NpM$M_#9PFoR(P8qF77Q@U zj}b>@iDN}#s#LdF?^CM%JTTe7rJIh;5=b~!B}Epm5ZhMEge9q3R&<9{Y?dtP2CDt{ka+aezq>UGE2Hf%pyT$tF~pbm}=TD5(+LL zQ)1T)M{#DVgb8_xcEj?33Z{Z_=o4%M3NUIYAfQpyLO#jjxKf-X%a^LyFe$hblF}%n z1MjZcgerkEB<#R-;*@(7lVP6Fe|muke&^*RDU$_uIjhYU|=p*r(PV!xqQPHO6SeLyKXXA1ibtEd|GH~^f!6P9J;QFvLn z3AM0lKe%RZKj?ku1YI~L(7OSod$1}%#kWQ8L3|9VPn`zO)U4n>Uzru?UVy>jB(y%0 zQ28ufrfT(+0^Vd9pk&s=aos#^Jr9nSpm=XmydqiZk)xAGpFH$+<%vTSrBXax6jw>R zutNRkyC@z@&l^2wqxT_tKU6j{<*;}wXAWOdq37g$qlh|{Q) zHKid0mzgL42da8aS;OI9a-B?TIKr!Pg=Y;%cs;Jq(QyF^)0q{X0GjR#pp{mG&)U3y z;RicvMzmBj3YTc)w9u3qlKr}~F&HsD5I`#}T;)r4QA7N zoXr7s8t<4jC9uS4!QR**bL$#5KpT-jChg>0Z}yPW6tx~LeIZhZBhu``k4gi4!^2|E zmx4Ju=G_+1R@z1^m^Wx&frrT%u^DYjS{5`Jnclv_9YD=^L}G9y&1p7XMEIgs;k$$Yc=XG^t1Pn8p)jkVesPB>qRd7DPj76du<9X2hF7BQkJL-=UIgPP(a8z^Xl(UYo8;OShy`*v)U1iZ>gPuIx3=XTs& zDDF`ya`Phl*r&4xEAAM=x=XsL8VV1)Ct?J4ZoyfF!+<15*kfBY3V|@&1g>Jt)XBef+;Os|8(K)_213^$B{opBDpku~ z8N_>86k<1)gk!CjAX>ATTqZnFg+Py`4pwI{*i%%>vI@j&1_VV_ilS5sNf5kY`=k=TS;6%KDU&MJuYKkTV#9 zsh$S9JR{|07KNyY#rbUTr{{=k77f^b+o9D(M6Ba!QwApnM-jNFJuzLLI?5VCi;n_mKCoFmvdft`oN z^ha4anYtP8m1DC}lC-;x*hotnnLDy1?OF%h*^+k7 z*-O%0Uf;Hsv~BL*CF#q5>&d*pm2IWYUxwp?(feXd-% zw9}RMElc>j>JvD&=wTcVYZ!BBXV@QrVK)FUtSt|@(p~4D`RVc3j|1@f@t>T4=6mDk zPq^}3%M$*sa-1WJh;T5hJpp0&`DZu?J3N1!gC78RB4iH%5ZsoxxYFp{z?;Kw3(FY_GEo>-Rfchx6wY|+Cw9M&*qp%nH9VAu`7k~G0{9}$`cKb*`Dutacx=_F9tkit)Y zfu9mMs|8A4q>%N53nMtbEbh}NK26v`NEj6=mR5t5Xu-=66^L2ZO;YGg6cxh65YGX2 zoFINJKKS{>kRat7=JGJ#!tVZjqhXoEuz8-w%h-4c98Bx*ERL7uc@zaohHg7d()6Ok z?`}N3Jokj@BkxXt3>V+`I6Vb4%vjmSpt=ziMe#3!a8|e~Jo};W)W?yy82MO$>PG*N uXo;_l+z_yx+dk*Kv75sS{R_q4-?yOu`c96!k3D8dz?V2;BR$eZd znbn6338<}s#0ZM`ROg_BF9l@yP#<&bF-0#_>{N?sfEp+Y)Hk^fP{60YndMT9`$>SF zI^@p0c{B6o{bt^qKlJq(5|m%(f8$(ENzz| zR|`ApvYC3sH=AWi*Y?U~V%O#x16?pL5G*z``x=X1x_thJmra@NeVbJ0anZkMpZDkz zCa?2F7wn>6CG}z?2XB*|&Xdys+>)>`PC-FQ6obuUNI~kV3~E!6244a`rIC=pj94w{ zNWZQX;&sI|m~LILui-b{3eyPo7l=1o?AS?cz_k^F?@2~%QNB?fp^mrQvUn2r~1 z*QEfc6uTwL*JqzDj{k^aLdR_vFOR>57p+<-8MPKC#%(8yh_i^jtX->RVWfyD9p?jO z?D^w9rar6`aFrD2pi68}ff$GgS?}AHEtF&lO#Ujl#TcDhIXrC?f(TbjdrrcDTu~OIJWeMCxnQe@YjASn@R4O*98}EWDNWE5dJl{J0 zUiMwQT*L&}I{u!i5Pme62HL|OGF8IQ1{vfPH2iA^e!K7}$^O_S=_#e?-9TpB2C6Lm@>@tO#GXaG8W@#y}6ZB){v`cRN#BlHWB< zQ;Ke$mfV!*xmlknNQNU7bL6tbe@I2~RTXeD(#jniU=x7T%Q757V^!}CHHHRZMrJkc$Y?tnM4A}cfp(%H^xP_}7W8+m>S*_>+T}`VDrnDc;HedB#^$wW znB#aA?QO*ssi`*O-BnssqdwZ_N0)^(FK+yAu5Nan@LT3}x%rlP-Tl91o)+CISE zzc$7-*i@<8voAkM&lHqxswEi>^ED;qEFhN8S%dgik3?f|f=UBQovM^(-*GP?XLFxDh4r(>F zL3kOrYfgxR;QENWw;5w9=bstWw~24LjtA0#1OjR#=YV?`lViutI7>wuu^hzIYoI8? z!wl2iYSH$cs>gJ?P^(o5aGdPMw@3WsHF7qsd&MlmrLFXZ zmrR{Zal*+^rF^@%@A$ySB%sL&UhxRS5+cZZK8u&C#RY2WOapy^2G|ZrUV1bpOix*w zV$fk^s1)QOMQnxU>)#U2LwK3>6~WF{M+&fR#Q|sW$}9<6mRzUkQ!ss^0+|kEHf$T1 zl5!RBe5T~MnDyJ9?bfM7t*gYrC9qQHh_GGp8cTzl*={G}X&761LgP)Fg3bKw=vb|O z%B02z9UyyFpe7>}03FnEljeo-=#t~l8LctC;-pDUqXjI+YW3s1n&j0fl!GsR*q-s7?o|{!h-_ICJyjjh8=_Z=7qZQ|$v&P=9m| z+V#}bhRXk6b`W9jKJSI#7h--0_tr2aNFC-3PyY7Ioiq0?-g)^m`3{f=<_@o&>$37? z2NAM#U-Y^RufZnIviv}u4m0T?FuS>v=~ovV*LOU)0=YkTd%LahB;`X7hoh4xc!@YZ zX2~uJB4vmp1)v7`e;r~^7=nzq#6#gS#3RD3xWkjZ zyyCABah9IyFNY+*N9us%ml6FCs?C@z%YWvtm0ucvlF|>;`#zf4Nbg%u@B8%K`)P9} z8Dw%dM>jIL^-Qika^imGY{<{oL5v_ycMBuhLKdp=t8z#}ZUuXC~yA1f%~1^ID#l diff --git a/tests/agent/orchestrator/__pycache__/test_project_qa_retrieval_graph_v2_only.cpython-312-pytest-9.0.2.pyc b/tests/agent/orchestrator/__pycache__/test_project_qa_retrieval_graph_v2_only.cpython-312-pytest-9.0.2.pyc deleted file mode 100644 index 608cd1d9532044fdeee16534b6c3b56632b30ba9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3171 zcmdT`&2JmW6`$SZ@|%=IeMFWec`ZwV+1jM-IBwC@MvO)>iXw`?k^|FXu;vV@m6yBp z%u+U4s!$yRZEwD%2OV??kV5UDxBd^kkdXrs(*iY66liWT6rhPueY4A@r~*ZE?T|b3 zK4yM1Z{Ey%^XE(^iJ(mX@l&f6Md)3jN;wn|JT$6)}ICxf`_X-7)V{k6Conv~S6A zt7h4AS+g9PBHMwFW`X$xQQto$l_*pLOSMXbXt0h*Gm_Uu3a^@$Z8_DuW>sXFS;d@k zZn+M&h|nK3C}3+t;FA6rz9R#wpCASBy}tjz8%pS>r^+9+$4XvZYhAKw)hss+fHwHL z+pvk@xSsKV8fDYADKRQ8Gw74LZCVblo6G}avo|@X%!5^|Fy^wnCL)~L6_$WGnLL|Z zF2gX4*S{!!06lrpwCR)LyL1!RgKgq?^GeaQ48p8U>KJCdZh)o?rWK{4N*%B0QSQM= zpLSV!9av_7P#bONec@0;6rvIhevuuO=p;&FRfWXiOOWJ_PEsUIG9vIM;@LBx!%^f?Zv{WHl)%2QAn<>R}?ZX$5hn4{uLM+bwwEvWE|IGil{Y{iVy(ZGb;h?2MN2ZpIi`(kaM3{}a*oStrfsz-8OS1KmrxPw&ml5pAFCE%iOdP; zRk)i`;?^KGiKyjx5H^JFQC8z34z%T2l#3W^K*Thi);wqBVgQHxctwmY$MP_SV9~l% zVQ$SRY+f;}THR&dNi#mYVwn7-s1;o|`TE7nU|S4u{pr(v0!x()9lT5(lUc4v_G6!n z+@p+g*WLuP8HFIuJu&JxGO$Cpie*!gkTr*u)xLw+=H-rSAd}VAR@U@Gwy(RE=Tdl0q=Fed*E8)eW$=)2H%`Fa zIEITexLH9&6Jue}rP#Oki6@fp)SEJ7W0QeeCJ*RSXJxkrSp(LLxmlr7!sL5EjAKYF zHPgesqa9OblYCsnDnY^&QP`n|?TKjL<`lr=z=%s?h|2q_qYs7kdpl3 z$7b=izueF(ClU#NXw^9mQX`hT4UoY~`&p2^18@`Y@k!V?nL950{-eF0?PuTKzV$LQ zagbT=W|m)0FZX87zFb`CE#G>jYiF~ENp$*bZ{}QYCf_;ro!;Dq&g{kBY2#HY3c67= zcDZ-vPH*u7^nEjTsOdA=S924IEW&eO2u3to!{DcOF5IpHMn6s9j6!8ZQ%l0gXi?np-fIEeQvr`Bh3`YS{ z^kW7`TqFh}xX6KwU4?xY8gFvA?9Dn{@#K4cPQDKelW9>Lzt(~`0h0-b$($&n?gRNy z6Ulp?=~4fYCSpNO2Ov&8LMx^`dDq}oQs^rR{xhUN9f)5vcmVRk(8=K*tp_vl<6GjN z5hf2wklSU#c^&^@0C|Jm23B4={u`(cHAPYWCSM01C;x)dFVnNXUO7n5cGI)J{b)a( z-%j*$3(uDhatqzuLg(Do{oGsIBfY89+aoW~cyIcQY$tnj=VUw6L)x!Wzf2vVsV#ve?%Cf)Ie*Er86()DNzuZ6lIsS>$b>t{s$5~nHA4PQ{MUtJwMWX~!3N)J*EWJamDRIfo zkSkd#H&9cfjZZd^LtDTH6}_mC4ms+WV}Z7SWGS&SP|-ts3DAQ98wik7-{aq|Y!z0~ zqRqkF<(qHbym|B9yvG?1|CmlEIk*m%f2)2H<+#6L#lJ!xxL*eFD~@o4*SIq8l%ZO< z65_d

QoOrWqr=@|B_Raf#Z|C=B zejOalAXtZ|A6W$%q2GnjUm%Nx53d8=LIe?PqXsTvEck?-Xh1o{vW zc^wgDI}rt=lG;|a~F%XK)2DzBL{@4g3I=7!_3cGI;SuN())w3h`R zj)J^}C@NusN(mwnye^ldc0!ZGH*VS{zxy)5JoRYVb6FYpGKnOo;giJAd>{3`|2`gc=Mbu)s@%%5b~0J zotN%&K7I&C3H2iw`r3F0i{vX0(br0S@ZT085qZ1!fBn6F=A>7@JE9QPSN^+>k3pY3 z84KFsliHt>+o@RFuZz*<0~u|8FC$<22x+N>Rkg_6mPc2UenmjzA7Ou0X?c|^bD>=G zyk@9GdMy>EsKDK@NSKK^uid0!y28u`z2~yKVK&NSxXdWKjfUxvaHs~EnuFGAc+37vN9C>u6d3 zm{Z1e)21u>JY6=L%&o)Ba$|W$H?0Z6tYzv7djbE@|16>&&d` zmP6=@#?+ z^zg>bAUD~~6+5}&)7F@ z3_KgX@GO7n@$BQbpCo@)yK}cXbGLS{-rgD7d4K2f?$jsUsm0FJ;_l~kZ>qAFuXgiG zo&3^Xo(Gd!P|yNxCYXMwJAJJ)eJ#l4LD`+0?M%)F`Aa`s{O;n5q4e0~-`aF`|scKEk{J!vh&BEvO9H znRraXWX*o5EciJf`x3_ZH&l3z#-F3xf2*T->;M6YBL4yNIh4@= diff --git a/app/modules/rag/indexing/code/entrypoints/__pycache__/registry.cpython-312.pyc b/app/modules/rag/indexing/code/entrypoints/__pycache__/registry.cpython-312.pyc deleted file mode 100644 index 5e580fa57757607e775fddda9d372f8983faa555..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1677 zcmaJ>&2Jk;6rb6h-Pn#3Cv84WMNE<+7Em2NPEc`5XpxGMpuHGX!{QmI8`isKW*y?l zl`17jK?1=o?Wq?IMadrke*?z^$z2Jl5(m^s1e%)E zx{Qi-NJ1He<#cylR_=P)3xwSAg7tDO6tbM8Dajyc<+=x1Y+q`&RR%*qu;J710(?y# zjZf};*qu1P^HH~OZl}_nnLlFl-Pz(1D|T~ZJ0GMfGm{;Z?872#y}AkNe@)`hLI()(jy~ptN@m z$Uf=N4&f+IMjNWW0=JjrqVEIio@wdVq520RjXp{xg;C)pdVv>lzP`5@Yqfh;aKV=5GS_k zA{tm;BpW);3=@U>mvE%1%B2eK`u_IC|4G)V*(^BF?*Kr$7MJ&|?%aj@g?oi3gl6BT zdsn;p$?vaybM5Zj{e^oA55&(`?k*h7ul|-_J2BDVQDJH?pX9gVFtvywG9L;!wv~)p zDu`Jn45VYHN5ET2&Y@mI_Bz1!1e$+(8tP3r^bBe-Fg1s;gzzdt5g{pLEDZJH0L}x^ zd4OHgGpM!vx6Q2S)DUg(C4l~~w;&|we}z{Wj}D(&sTBiB+V@G*C63Q-_AGNb?cn#+ z3K(NG>9+tN50w5+7XKu#{ACkk^oOZqI`h=X(l<^BK+hz`>PiP!f7=LePX8$G8&7UojW^FcGOg7aS4ND7^wG5MaFT1muo!P#b zO|r`bJmio=4)tOvMXexMiH8Lda`Y&8$(lpPp`N4%Z!xI|Ir+Vr-KIwI!F=!g|GxRY z-+Mm|45SgP<0rl{J{1xAjSIa6GGF-k3east5Wyy@;S$E2kD0NWP!d93FvXfwk}!&) zYlw&&h)6rJFc_8M&3G~KI~R&L=+i9Ab~V?qEeFK7Q_*H#dFm|y>1%%@@bZN>QddcnU1^Zc%~=e6Zjvs zK)a2~XkGAP^XSHR2(62rSnaw#zO7*=hQSlOJ_j$!ld6#6?Aqxn*5d?w@fFM@5({^{ zHAV#B5QCa6OvLqsCsd`g@d&wzp3Y76I1k@}PI`%uiq&vZJzKPg7U>T9EKwc!r-e%- zzSI5t-d^P$IJ0`SlZ2P>Bm` z=^#z0ZZi##;{=jvuR=L-tzHKY#;3;kr3g}|+2YjFZ30zP=o&G~)N$D`_v3hll0}D_ zON{p@NJK%9)^KUf0q}<<1*u0T28r-MN*EuL!+SX1T_>LMfkT<2XeM1#=IM%BXLc13 z?x-s>ie`)xW~@+a97-Jri%uO!;f69aN&%%(vq{6Gj>5FEVpxQ(8CF^0l`CN@!<*+Q zVgJ>z{VM6+Ai3TQ;*roQ{NGiRBPR}D=NBL!BY)!JrsSW?9ihS0(B>O{u5gf(J30C1 z+-!T|2xSI_Zl(Ou!WYVIWqan!^ON^x?>*DT?PB}Z5n<20T?sRkZ-Dsv4wKH5v)<{i=Gip_!3|O+cz|5G%mO@|^IOAtW3S4wp92 z!`O(FjeNLbp_t$qml|*~WM}+|3KA8~shGxMgxMKDf!sxb3@DI$D1eJdsQefTWJb$S zI%`IV509UQgr_B)B(Fr7=9mly{>V5_0XY;f#=oM82Wa#Gdh@S%7H5wTkTCLZc}TUM diff --git a/app/modules/rag/indexing/code/entrypoints/fastapi_detector.py b/app/modules/rag/indexing/code/entrypoints/fastapi_detector.py deleted file mode 100644 index d048f9a..0000000 --- a/app/modules/rag/indexing/code/entrypoints/fastapi_detector.py +++ /dev/null @@ -1,34 +0,0 @@ -from __future__ import annotations - -from hashlib import sha256 - -from app.modules.rag.indexing.code.entrypoints.registry import Entrypoint - - -class FastApiEntrypointDetector: - _METHODS = {"get", "post", "put", "patch", "delete"} - - def detect(self, *, path: str, symbols: list) -> list[Entrypoint]: - items: list[Entrypoint] = [] - for symbol in symbols: - decorators = symbol.decorators or [] - for decorator in decorators: - name = decorator.lower() - tail = name.split(".")[-1] - if tail not in self._METHODS and ".route" not in name: - continue - route = decorator.split("(")[-1].rstrip(")") if "(" in decorator else decorator - items.append( - Entrypoint( - entry_id=sha256(f"{path}|fastapi|{symbol.symbol_id}|{decorator}".encode("utf-8")).hexdigest(), - entry_type="http", - framework="fastapi", - route_or_command=route, - handler_symbol_id=symbol.symbol_id, - path=path, - start_line=symbol.start_line, - end_line=symbol.end_line, - metadata={"methods": [tail.upper()] if tail in self._METHODS else []}, - ) - ) - return items diff --git a/app/modules/rag/indexing/code/symbols/__pycache__/ast_parser.cpython-312.pyc b/app/modules/rag/indexing/code/symbols/__pycache__/ast_parser.cpython-312.pyc deleted file mode 100644 index 4b0875ae672008c09579202ac40765974bb26935..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 770 zcmZ8fO=}ZD7=CAG6PvI0klF_Eurz`!NEW;mL@6jOQIsi|=_mkMyvPJ9ph)INIJ}ux zI8Vq~5${18RB<+ddmt!*eMsR5W^^Bph)cRI)ijVwm&T^AuJux`g4r`665(3fmMlKd zwqi3SO((}$a_=S1C%qtMGw&&z`eTtCvVoHR^r06-PAH-&<4!OhI~W--DLoSyGOj#y zdZQ$q#7uf37 z;VoQRw9-0nZp^peZ-3nT@Z?*4>+kv6ohu-f*7xS-CB=Oy>zMm)eG}%DHvL4}wCmcU zhCWTD61psynh1WpiUW0adV9`^(@i*YZN1|AJQy+G*Hyom40+x6-%NrykBA29e1Qcb z2-8QDuAz)Xnpscbw`G@F!u*RYjM6B0Fu}GcF7VAkn8ducX;_wP^p-1+@;iAfHqbOL ZE^i~?(FpkgTNhCMQ!bI#6(D3~{{U||yY~P9 diff --git a/app/modules/rag/indexing/code/symbols/__pycache__/document_builder.cpython-312.pyc b/app/modules/rag/indexing/code/symbols/__pycache__/document_builder.cpython-312.pyc deleted file mode 100644 index 3acb05434cbbe4a22df0555f3161560ff336e764..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2527 zcmaJ@-)|E~5Z<%Tza5AZ64^-rx8M*5a)t&~iIS#DFy#RnqXsI~s5%|KO*nJ*nZ0uw zqadLw4{e3i^3s3+0S^^HX+_m1{)MVig)x$?RgjSS(DscsNNw}f**o7kK-!bM_w6@x zv$L}^v;L{AEr{TG_t`hfj~;}6VH5k|Ex@gx0nV7%UXypLzJfpNH!-gU3c+lULoRd-$(|)7dskhS)oiHZOZtCjlO#t&Qn9ERlA< zJ;~G12hvF z8Rv4=O4it1mRsKe^JRolmXlG|CA(#AiO;$#E?Bn9vSY72RaR6Plbm~#oi4yI=hlA) zgUe{qmER<^;SGosNSaI9EPLNTx7;9UMs~Ag&UJ}Nyqh@-ljNd1A9$VLT00+lU30Zb zt#TINkkMvq8QW}>Z?{qFExQ)~V<)mZ-`Uc$k<2flMRyv#x}w42W zjqF?jX^+jd-oS1VVPIP-4gz+Im;>AAs5k)FElvU0U5<(a7P)-fnK&T7$AJ!zJ+0i& zCmh-Vvd=ypW1mfK?VqEUbo93L!qx*TgSKYtE&Jub&G5IuRiDMppk!!zgNsvdsbZYd ziW^)o*Gv~vfrWaQC4N7EYXI(Nmp$bHQ%LuC=l+CCa?|%w z(nVduLCTjTV(83BJicM1PV1QHDM`f(sWhG!OGL}#oS}>JZ>1z9E)!)Q7voZ?6bDHT z>w1a_=Aav-fJ_xMxvXM6MWnfuQk3z6Qk+ZWG#RIKvk~Yix!F9#vsMiYrOHNN91P%v z5}CLtY+2}nsVt1ET24~+3Bl3t0Jn8E{D%I%j2`!l-bw$EzInLXGy0G22l`WAg!=-1 z8(eCG6E3=8HOe2!q>m=UG+?inwNl}?GQ|eh1fD3DM`8W5Fn;yMTd4kD+DD{5pz;eR%FS5uGwsl zG^|QsvLsbhO_FIFoQ*Ooi`SEMs zdUT)~9jHfzYE-C24?YPWTHD^U*3nb%5UL$QBN79vjgIK@fvX1^k*?*~)fnX6O8QC9 zXe~0j7KvW#uEz$evB8!19%SxkYLW40JNMLg4pny!HDbGO_g(L6M0ec|T@N)JdT6*l zG*KOzXbcGTfsyLKNMr9{eeYOx?^q+T|K6FqXX=TOYGUMJ=fhkrF;!1ws)@{_lc#Hm z57+t!SKhAgAFu8oul2vP*1K=T`yg~bRO>z5i1*jy!`1k39(<0v z0>O0%5SmVU&1e(WTFEFISmjVJ!B7K5Gb!L${G!NeL=wPeU<+(b+PqIZ-6+R;MvYO`+LN1ZXEhPJ@zx zO3+(rYPoDCBcfiN2yvG$mF^()vjQSiK^3g&;6Sw%H4vC`Ar z$jh7C@Q+&_PLQMEGi%B^yNaH>IgWdZ-uxA1YAEv*rJtgSzq~zM@J|GTx$%DisRQclI>WIJ*GL7OqwFKGb7vL zQm6rYQMpKAsf%4no1|8N0HI(Ps}u#|0tMcZ8EDZ0L4i$wc_S}&?LX}~ zcQ`|e9%YMMfM@QVd+z(3@0@do|5j4sq#*69`8515l@#?27L3H}8G7|^ATv!#ltf3V zVS0e3G0#Mq0S2CIlpW>#!jWNEGZ?WK`HCG@Oi>m=O9FHk} zAEP;>fEox!1B#;YgW*tA0v?-kIk0p0tNoDWm1ta5f(6}Dxo+vz6uh0LLeu~)Q3K2= zSbm6=nAhPg$+2dRGjlx2*?`Y(<^;3WfjQik5P#okY|DU6asj`aaFq<$rBWz)awUP3 z%FK3-f_6@+95^emZmh&tsR{3l^^FZ*ibpk8QDx1ckb)SNH2%l2z;H<8u7qQf#*GBj z%NiSwshU$!1F|Yc!?BPigkqAOb131VSU??>L$E&{DKr=ujjG~cAgIRWv4kTUR@8Ga zzDZfafFywtSk#<599hTD^E^4>T)k;rh~ z?4~Vgu4*!p;kJBT-;z?7>bq{7nB2U?b;%oyq1Fg-PQ&O`+?c!&ORPlS;s#jI7*6x( z;_{X;@gN7hMnWxsAH6yNnQ1D?-e88PK1$6gGesq7LxRV-Bp1nPjnN#RN!H+?Dc~sV zJ;&BZ&C`A#tCfoSR8EJLFo=`JU&V}O&+V;`*El5<9h6I&jGZop5A@ z@;jc}o*7|DXw7=+mOb7@k2fuN$)@{#0-2DE2rB!KklZ%NB}!p>?Fak%4VAFTA<(E; zqLiqQp{eJ6oLr9$8;~?2c?C%e5^}I!%xyFXinU?~a*KM(@O-PzgVolD|31_d9KKsW ze5piYKnOUgRAS-DOCE`Xr%fu8czD{Sa>)iyL8<__<^~*6r6j=9DOE`hc)H-}gr|GV z<*Sz4aPXY8K^E~XCphhp0l}e@l!)(18ls?NiV!K8ZO15iGcbWT@Bj>eQ8p3qDR@QR zf^QjlD?G@CE7-(1V*rkDEUb!RqIRtiwHplqZ zCY!is35X*^_IqI@SOOJ+7sW}Y$6#?0bNc!E>$JjvDWu04sJD>%Uh4ce6gAE!*@!LQ z%E&=$H|Pr+LFgz-plQs9V0x`7 z(AvTf!;IJ@2bBAmi{M5VC5bo2H=Yp``l4hw14&M@S&yTlf{>&(8@VJc*}9ykxf3x)p{Wo4n?vb9O)W}!bfl><%2(>wsONP1 zb2^zQNrs0<;$U_I(QrU{&X1~t+xKdG5d0NYv!N}H#lJ-r(VT`!j>QwK_YH6VJfoH9 zjYE<+D9492cVS=if{dpx;{nShNDwdOG9-AIas?8^JYSjI2@lPtn>CF`3#(|hfTBAJ zgz{*@M~L=8&BzGMMz?DywDJzpJ`_V6s5vf&u1n#e5VSx^((FSaaKXR{DFFi-lEXof z0J_gclvv|p&`3UjoLpE94QtM5JQ#=)51?R$WKuX7BD$gPWuzzZDA~iqum_0^MS5S% z@DlW(*kDHy^GPd83AJ}Tch$4uC=Rdv(HrjC6_l{!i%db9P-cN=FL zAJuoJxL-Nu9TUg08`@?r&js}2+)vU?yOx`}7n`~tY|1q4n|M3xF1vH$_K9WphDG;= zm9n~(md(KGoOjM87djUP7EU}YNw@iz+fFUEol2iRpJ}_0X%UxO!iz28Ov{yQ!{%(g z7YA*aZCKf`@zXu2u7$b>otaH(4y6C=^kVCor{#|Fir=%YlF}!3SkIFd%2Bc`G%N}YGhL5! zw#yps+J6w-0i697;EYK!R$!NdGsX()00Jp1n6m;g6$P3k)dVYOjlx}&0Ep-$i!cdr zWI|V-Niy9MLy;p0_(jQtBUa+9$5BnFQ%yJnIN~MS3vgu3XV( zx2VYjp!KO3E0-JqY)%Vc`yT>qCd}qHrwG_we)(0XOxSa%ChvigycbC~lGl**07=+& zsPf7fu*my?_&fxKL(vLF46R0^90Vr~$GQeCrymTken)UA zpoA2kO>>C>Ny>$-azAtjfobUah)j$W5jfq1vLo>kADb6FkVxzSHQ2OSrMlD|!V!8y zgNbHKxihN$&{R1M1niaIUKZ*Wg}RxlnQN)q^r^GUr^Llm;#WH_e%Zg!^~L_r_do1< zyz9uLofp$v153gs(m;p$CBX}&JFeR<3}GG%_0PWJsa*k@1W6y)9rTs1F#@P3%#&Iv#H|21S5BJ4u zxi1AAeb@T=K`X^IZvcpr7WIQgE5$8TL7(0K?f*iOF^ZD$bipMJsh8uDCKv*w@kFoy z-qB^1Pa#3Pm(KuM1Ns>462EsX=*t)2eWI!8Y}N?rS>P~Ku5rWNo?rH)x_;F&-?Jdk z?|;y_`0^VMYahLQC^9Vxd1-7 zJA9BO016QJKJbon5X12Rlnww&cASTZ&=Puw=mZQgZj)$B$Tcrz$L*>KuGTP$j#Sc4 zD8!y0^H#8G;Zm9Inz3YxGERP6fRRimE?=LA^l?W%`b-K*dlF5D1;pngQ`L0gz#zf3 zvtd3AM`s;Q+q&&?nqjn0I@WO7hbUtNI3;I+k#oXKO?R(gZRUNiY2=)F_b-C?KSe3O z8_;7>9Tw#Z>-UmCbe%^EdJZ=U_Z|1pltUVKL7OH$Uq~$@SeLQ(b+y|n?gd#HG!43G zW{IR;Gfb`%Os>-}?}jN5?@@OeyRm5ci(099yA0RT5Lil3?Q{KqBHW_8;DUgcIG7q2 ziHBpdgVpV^p>NMPkg8zGR>f~H+rphprTTtC~yx{h0^-5BGlgZf5t%O#M5V>UW{( z%4-K7ZcZP0FFo*n=C$)*)m~WGJj31f%z9GXwR)Gya;S*!u~HdC`59owG2 z>zV1ldv5kzs$y15z5A%S;~~WBZBJ|670wCUlLqi<@3?P+*VMQuG|n7e5;o4TA4{O8^MB0JmNfFbze-7#q}{jyUsu7&!oFmRt_P zC0rj~Oj_{3^}Pwpz=5|zMM>h<02`YFHsB=Jl@`%9z*!lGW{I^P6X#{U`Xpzp3wX$^ za~?Sh@L=;Nm{+_(^nZ+m_H!48BL^V!bNV<%6L07|Apbahn~4j^cVCr4fl1m z960`e%U+}Pt7e+0HQYEe?K|Z6pb^pFob!HzDByF)>v)F+p8vkYE5&MPqDA}bS(6<_(SeroxgT2H6PDZ9iMpX z>-Jrf(sXz#Jb7-8o@<+{P0{JfZE5$L532sD{vYZgv$AO$cvao=-3x;cE@d_y{L1s@ z%%Mqk+Ws?p+VkcF2P9ijGwqx5O*YOPgslqChEv>!@pN;0Dv#k;Rh+I8-y4;FG_2_dle|Xh1!}*zYT0H0!vYX5fJH%Qh_Sa z)~bnj(d*8`LNU#GG_E@j^g@f0F%K9i=K+Bij|R0UftSVHXN@uXz!BH&`C<5GToH~1 zqoYzt#4F(NrBM|EYL|QsdeEhr^W)cO20lzX4jLS~edVtPqNDJkn%o_8hXT>4#$g-v)lP zTFP-CPgt6!e?x8jhI0NVwe>et!|!Yqg7NpVUHY>GRClp#bA?5>EhISIqEGr4Tok8@@ZyyFUs z6#fS(Y%L6FEG;bss}v!!kV-7<#1n*6zBjvfmuMOv?AtfnI@;A-%kiu8X!w2p!(kMF(_1n0BD*kt5nf zj7*LpIYw$J5$vYZlRbr1YPE|sx6^5aG4BRKHKf~a_z@Q`{ixmW;xLS(2G5DIZjPni z>7_Pfe&i>N^_Q+eTOWCCI78v2UXd@04_;fRc6A6V;sN}z;Jh@QY+eJhKXy%w{mU8o zHV`*P^P)gpPJzQQBp#T~0oB0u1RLR3jwxr*GYc%45=y}|na@)TB9y}VwOUP9Fr<_x z_ZP2YmpieTs)7P?cKOV%p4inhd-cR#eYf#p?bP0sH^Av3y^$2a&{Q|TI3)i^bzmOn zP56iGZ5U$E8&hT8o*T7=axBeQ;yp>rTm&K!tm7toO3uTULTJD_Ctb;k8C|0lCF$Ws~JbaDQ4hIl}L^0VlMDi z^8C`-J8}VY@f^q2(Q*+t?ttn~>1asa(b;kdJ(Kt%Uew491!L(nW7#zayUf^&t{Y?? zi9F;jR5;BeqCxA6AWOK53O|KSJ0L@Y7FLEuT6jc%f!?NBJVrE~5}vc$1%_~@#CfF) z(6oB~!s>AM>Rucr()AK0aRBMc-~Nt}3Ys7yPt+$5R(CH0RD-k$$P0TttG*$Z!9n5E bQ~6<1O3%stZ{*=Q+5BC!={EgIQ0v@3w-rHQ diff --git a/app/modules/rag/indexing/common/__pycache__/report.cpython-312.pyc b/app/modules/rag/indexing/common/__pycache__/report.cpython-312.pyc deleted file mode 100644 index 61db02c7b3047cb19c6b67edb474d4d2d1177c9c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1197 zcmZ8g&1(}u6rbIlP4lry3)X64KcZd?NLLhZ#gm`~t)TX@Qiow@Qn&0!oY~a2c*vnb zkGb{W)r+(T{|_&Q2*w3L@F3n=A_$&*vzwIK2m71%dv8A8*M2OQiwNXx<(*g35&EIX zSj?!Oqr60x89i2}XBO}^y3zU7t zk)tu>=&KN+V=$d#W-NgRn3*y>V!4!=BQ}w;+=%5(U+79YR0|!v_`8 zhR;FSN3YR_vYrvJjyiMN0akVTjDR(F#ssv9pFj&&8d#_i5+wzef-(REjwSb-QUzB3 z%j{Ljg|w;9x9q!ole9#%!QEJr&6_s$>P&c>Jgn1Js}3HQOKB^|I@G`hqa8%74W+aN zUANQXLejPy1wjW^F3>Rpp?0u zHJ2*&o>fnk%RTGzQNf%l9wD<(9Ksp20`r*@JZ_6{r<%U<40?UN{vWJ0%1NG(kOrKP zq)12>IOrB3FWc15JZZ&}NkUGIKOtvIC@S!(P(NXURm;Vc;?n@{kvOmPa|-ffP%VBUUSl}1iw(`-ZfkeN_FU{X5yTe%c!Y|>z}fMyjv3G#1# xDJ#Ssu>cM=6S4ttWN4c94PE((t{vx)Ug}PN)@J_b6%FbRFf@>U;aJi1s(;dwC5He2 diff --git a/app/modules/rag/indexing/docs/__pycache__/classifier.cpython-312.pyc b/app/modules/rag/indexing/docs/__pycache__/classifier.cpython-312.pyc deleted file mode 100644 index 266921689beabcb71843cdb7654a27916b8644b7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1255 zcmZ`&&1(};5Pxq!vS~K0>sPh5($pZDqFGTq2&F~aq9WE}C_*mFy8GI0-0a5pHno)q z9(t%JEgo9%;=zmb(*MItLxq+{J&6ZzVgCUTW!_!_tlNz|9b^HnX!^7Je@&aOq8&ah!VLR59lAEa!#S;)*CEJNePzn8~g8a`4JxN~2 zmS7_BTNGCn_OBa_PF#XY=)jAPB;JlKp+ahkYqTCb48uoUyFW8^Mf8UXV+>uU>w4jDTp}|L?$@RYUtK|!c1zX;fA3u}A;iqtb5PIGo^g8J-8S+&#`&gke#a;_jpDX(X+_;V(z`aiI{f;=ingmC zTi2TU;M=P^`76!*mCf59^P_u5Ppyruj%{Vn?CQpj-rv;w*Kd8)&kFzO>gZN>Xjeb{ z>OoT?gh>_Kit?c05q28B`7mclS|316{O%)V+94wbvM0tu57)n4-fd~4U zwk$Cg%i7&-6`tk)E+tc>NJ^9}i*n<{Ol&GrZO4@zSGJ`DPGl*Gl){l?Y**Zsv^0O@ z*`;j>6q17vDi9!6dyot}Fardr0_7kB0g|4YLk|IZ5yci_7Y-1hD2m+VSZGn7`ra&; z`Z1LtMTfxKxBF(^zL}lxdvEyX`g(ytySwib^`f7UzvGS79HzoOz68nwk%`QuNSYhv zIMi(^TiQNqXSzM*NIOTJY1gPL?H+ZfJ)@p9Kgu(kBPFE0qh5~K$g4zl-XgMV*=Bkk zt($hoJm29>j5EAaCX>}AUCm}RxOHihQupx_F{e@2e_fT8OhOq@Ggr6nMy96}!~2#r z(U(o+(n>}*Ja980O)J#kK^xBIXhH!`b;C*my`G=UWv(X7SDVsqUbx3^fU-aoGRnzh z)F!)S?v`WJE_-AfTpcnm+u`bz9kTNt$CDrW$%5><1?w>FhavO*Ki zZ4uOg4nc5_KZhk*AUbE+^0s6pIO_>sWp26B<0hxsV0mrUeR8|k%8=#Cb=LW#e(jc@ zpXAr|qkbL#lV5k}n>kmw=Rd1ouI#a4 z@XImZH%M&XpkY&GgBT7S@#vDXX-Ul(&Jv*dvN$$v2susB#8h@dO&D&_*+UOiBv}*XF@wKBRUJBj z>QghiGC?K0y`kc(l(edAqH-OmMl*Z~pedjo>%pf^m^0%Zml>bo)KxvDz>HaBX+@W0 zNta?C!>;Mnuumwu;RH>cG8}9wuG|!KP^cSc>cN>d_6?mM7B3FXtQd~azJlY%?2|~yH5Z!7|Qk`#W z@L4*glybAPPq{8m(QFd9QxmUucS>qhrYcN6DossA!IDrktrHCsuppiAu+w~@)=8y_ zPWTAQO*J#o37@yUz}moPnK=w}xtlWMwR&RS(q0ETe4jiF zHZ6MZ`|kLb9Hr)?Yt27j36z4z)`LC8U{5J{dX9e>jx4@#zw=J#(zB(OuCeFNKz#S>4}RZjL@`stXEp zo{bj5`#<#k#80QjEwy(SBi-MlVUyVTx=jyhXnh!H zSr5dEfq1zwQVz71{cVfNqQ2^XX3gKV#Fs;Dn_gFgut8kB@SpE_7^)#l{mIwTAM)%- zQ@BxBn)(3NdqGf8By-KY~WVKxlN%k(0FT>ZAp6yL>BPl30dg(mS%hNCGYF|G^H&PT3w^7hSh?fK@7q6aU+wBE zb@Z=wy#93nu~x;QnLr=;JPdIG3vow^fg@H1WcXUl6&$PnLpxwb&q3gWF^*N6iOK<$ zV6s3$XK=&Q&W_|~0|Mvrb|xK6a!G3>46+)txPa36TBo$FGn|zWllVb*wdKk^oN+vP zTiy<7h@Ew+u&DWF*?!M6%j?xsgz?TrVlMhD+_3ya52F@CfysoOMPgox5t}1iN+yw&6@#BtZp!L}0=4}X zGJOo0ube$UV&alAAmf3G;yeux*hMr$X04_~dJ*k|Xt%>$DE>=9-$cQVL<6X?#D<^M zf^IZwf>$uXi)%G=U~lN6{Z}wtD}i{QY=%i=Wbw7d(}inGktOd+*UIop|CjzRPyF%J zA5MLF^s8%Mhrjl$M&4YHTq;H`t-kZ?QbZ~R#?}L=VjxutWaix8HXT6R0(!#{RG=yj zHvjgu#dDRM_{h&Qcm^$aK3@zx&k|z$?STSUh!t8_Awvca+&&HIF;eg@buA4q^{@K7 z*Zn7p{*xtt4*>UJWBVuXt{>_t9_smOVs&J6eMBsdh^ynNzci*-1DVZwHx{;TUSPO} zMSTtz3xU8`&~U(B(ajSRD`XfUqGq_LqUUJlNnqPQOVNCEFq=_!xamb-xbP;eUPi6z zg}#fo`1yB?VYLnG*^72Ide@jMIHqA+xNHxw7;z(*soaZ1=+wh1Y9t1_v5Jc-BCK`33cr7QTObb1M?>dX(0*X-(pAxpJY@bmi z5+-nQwIqmJxPGfnm2gV1QKl8@S;{n z_W3vJQQJpC?HfMS8i+r*;YTe%eC-?PV)JG{wxv~@W+)OfUhK9Gjvbzz zuBke$5|!3X9JT}NCJs!3!=?#ooPZO50GEYSO7%2O2nlY8A~AB}`<$dp*J%>sDf#;Q zp1;4ppReDK?d^U9>+|4OdX7Wr7q)3EzQ*94Az(I=IpDpjpz`Z{S^!5aG&pW$>#*sMii(p6B`{r8>6jbr$!U;*qNy~Z5x|PBxfd1&Lt-kup6BjJ2jb%jV0%1 zVw9hqj*ZclnYqNtsj1T=EzCF{UC-N zENZe$+e}N<oMXO+_va23FZde(`ut%c1^6e0+{SuJJzoEx#=%--( zuCw7>cPc%DrJlj9&|oPT|Ho#K{iL@KPbBx0l^wffJpoKpS-V+Tp{UI*01399Oh>)A zJ&od$7vVLO*KfmEI`&1~Srj?KLZd>SX!H6q^%wGajmV~w(;77c~C-q~6MK>aKA8$gR{?=b=(KRc~Uj1B={>*9FlE4-aW22(*v`%()+Y zN%RxeSIQ}7k$M@bZ7SG>dDZ~0VO@lf126%}SYmc^DltoW)(+}*TSEmoF?u!zhb$@4 zOAaziFdEJxZOtgAs;de>R)kYB0L1nJ`7jbWal-8*ZEHsBO5by!9AMfvfmGMfqptot z1Ldy68?BE5!E!MEp!n_OZ!T{I<6D9Fc4zN)psNz-D+T&0f&NmUzZ^Jp$Eh4XT7qBT z=yqq%cK5-}^Eb{{y2VnrSnhs(!(TJ=-P=DL`~FzNOwV>l*JkgH-do}q(ru~SF<9vs zDs>E%JBBxeN1<>zoO(Dsw-rv6L#cSu4VNwav%Y4okARgw0VVSnDCK>t#xB0HYr#w}C$7|oC5%L}= du-SIq{lQ_3e@3tTiu(T+Liim16EW(#`xl8{7xDlA diff --git a/app/modules/rag/indexing/docs/__pycache__/pipeline.cpython-312.pyc b/app/modules/rag/indexing/docs/__pycache__/pipeline.cpython-312.pyc deleted file mode 100644 index e3267d8ef0e561caff14c919298a5108de458df8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 10772 zcmb_iYit`=cAgo|@HM0;iIhY=Y|EA{i+WIs<@G~R>^PFG*p8LNlI^S+bR-E+>p|75kA32?Vd{?dQGjv&6mgz9J|LT*GLGDmO( zM+S%>IYg2ervlUvC5O5p9fZ079b|@>pnga%|EB|npmE43$C-dBXdW`laeaUdT81og z+z_w^ONL5Ff+G3|&iEn0neI_at3$R)%4Pl<6E0F>y`fMz;*I#jA+g^@N$gqgaBtW* z9^^w2$pndk@VMaPfwKIJR~Y5O6CwEBb9Fp4$_tQN0x7X4;1xyx6~CNg#~ihaSH}GT zE>C#EAK>AO@PbcaM)7l;ksE`Mo+Ef-h~x+u1C}E{q+tv!90eiGSvehq3|GR@5b8M_ z$3SS{N;y4*My`xAKxpF1p~v))8PX;Q*-5j@E;*2`lOc}3?hg&W;UD7z{t)jY3)ny| zbOb?e#AGfa+P`}_q8Q=P@*<2{vfwY2R$RoS#tQywB_h@$e+_EhBypGQcNqn&LNa)+ z$ipSzZ;AEzw2>C{m}B(#l&KJmO7gNc;IzmGu87ER{bR2EoX87eyEnjJZ|~)=dB%kB z2=9xCo@@Ksz5aSm@L%IY_1>|udidkxMX?=!48tO5hs^e1m>Uo9V!PlSZujTLu$_Ye zZ6C{xqpYILqS zo72u#$h59GThh+91pTMh4In3cxrKspoGN9y4nbs&h!G>0yUC4cQU6jg)Q5fMkq`>0{=Y@m{V6aZAkduqZJd?=5bHP3atBv$ePIlX&}(I`>5B#G$*GyzmQ z@^z^(n6;g1JRiy}nbcL8uP4S15H5YcOD7owek|*_OgovFIcrM`4scgk3uU}pxi_Nt7%A!TpK z*jrQf*2TfJeP6-|xpObgzLc>yrtFOik+i)P@~UbxRr^v^`<4!+tGW}G?5^DjI$Kda zcWL%grs80#;^4A=g}wiF@}e(Y!6nRDwj#;y%vwrsp1yH<-n?pQ$X4xmM3AOSWTH>a zrtes9Su@Vgl(Tc`#B$%t#pKzcwDaN@mbce+NcnGUNn+~e`#0X7zm~Q&KCrbe?n<+5 z8MZUUcBa`MEIS{t$Fj8z3$HA^Ip6(=&{>;i4B6^!cedTymZ|PcRb#EE?^j{1)fZ>< zS$lQLz9;K&&Yhk;y`cZXv3K17W!8;^$$FE$!Orw%9D7ray^H!KcKNNeQibA=i}$|7*jQ2;5q`rn5CaVoBh(|OTk z1Z9LxE)VkxDEWyvlNVQFOhgu2v5;D`K*g9437pWy;9Z3+h!;-F34i1&>?+*X5>k zHD~P=GZQl}CN0~uRomy{v+;# ze?iWXa6FXL#3b?8x(QN|n@9m?2DAps-60%=XrY|+*whX3BY%BNI1)Xw#e@_?ZFhGd z?DGc1BW|rcaw$5%`%mJ(KOi2|^es-zAG~w)7e`Yyecy<n z*dJ0Bkxp4e&|f@s08&NVO0Z~@6|)->(U$MQAXX&eD#TS&adYa%6tJ<}w6bsI*mCP? zO<&s9m$98m+0LYGuLIcG>@&w_1`|_BV~w&7kYClIyd3oFxcZt~7vzXjI^180C{*SU9E_ zGooodYWF~fBSthp$>$aW5|DA}n4v)C)#S!vd7SQJ`d$v+)c(Q(JwX%GgCN7`fU7a! z$_!lL0lCQmSHtXddkQ12nX1_k-$}mKr~8`J^RXaRdYtS#T+>owLo_77Xdq zrU#|&#a9wcc4yNLdY)hP+xt6Wo@w2*xeUAvUwS0!jmOAFxSr!F| zGqYzhj@Fc;HS64-ZD`BxYFVq>vB2CuwbszMF#fBq?2diwR-&S9gD_N7{y}FdEB~Di z>R8u7-Rn-mS^tQjOo2jCDC2aeobJVIOVO2snVz>&J#Qt4yqO_?YRI2-Ot%p15O8u-SH zP!{D5aB3Z((3^?^F;P^-myIBx=;w|+wHAQ=KL;Q*4Zvz6;fpg9YRpg=13~C(9K6S5 zOh86tdBJ4{XhfM5&4HpUFi5%p9}>EO0uVJk!Gl8R4FrUjF+&&ik11$pD?~dXJmIny zfEYrT#1w!Yjn&Hl4d4YPB_SdiuJT?mjfyhFfoL0^5Z;1fLJxQ%$^|N*$)SR3=O8=U zSRB=4O|$@f5j4faGO%TvU&u6fr<%Ld%}2g0eSKl~%I<$`{%!L=w9Yu@YG!MGT9+(+ zJ;8vt2Ab3OPrByGKRGf#u*fWW?;2CvIzSpuoXqY&yu9<1S3m9lq<^I|y}vKB|4eHC znft!<{Y6!N>94|)h{bfE<|RyxslnC zp9Yc@Cle>Y!)g!wWa{U>g}t`}4?tuub*@#`{Je91Vo{&2ZBJKr6ex@tXKTvYx_EwR zXr7!$1C(cZASnJ?qyh53@Z7jf{6hCVInoS|&xs=#-5f`j|0745 zLGL+nWYah*c@{@p>9f|4@IPD3Y?+GZLg#at*>afEGUWGr&S$C0hgh}+r`nzp2DhNl z>iCX()9_q+Y>yefXI~v^U!T*MSHPG%o;K!O^_xo|mk;d0XFPhS`T zBMa-8XYR1K*xS|=yJxXxY5dcvPp1Ah{=n7y&o+Bb0h{l=bLQ5WOx^xe-TtNX_sz+7 z{K>GmP7uea;}it_)Bu&N+rL2&+XkuM6GYiL3ao-MPhG3F#w}|JB`2nm*J8<794dLA zJb`ufQEyVe!_-+!y+;mUFis9);H7vBLX@aB7m=GA*P1)9YTLDCb0bM{A}L%?UY~?Y zrpQ;Yt{&$zjlsL*YZ&~Hx`e?MYE*45AU7A(n(JP*HEr44SaLF+y#8MD zz4xJ#W7Mly*GcLeHg}9VkExfb3m8n0Z(+bwehdU^LT&E4+}tFUWy@#yxzX9tkAf+- zK^@vdtG3-+HXcewrl7Joc^umtSH^ZgY41lcjJfH$BDXNCb?D%#twCKst9!e$+xOfV zy*0YHH@$t|gY74mhCdzsWOSu5ec&zupqYW@dzUcB|cI#SM#rOK64$)S>(n5XbaueXtv-j`S0U!IFL#^O$Ut$mS^Zf;&p>gRj#aW#75j*4)u{*j<0AMc59F zL=8b6?mT^6l7)wxTG68?i39_sQ0!DHG!EuZB{vq9je{K4K%;e1 zGKa!K5DwWWoX7@Qb>}(RZYbiMs0S5<%2{;*GQWd1E!!xs0j&sIOFOL`wHZfa%F&p1 zG(93pOy{UXFJ6GkIcg4pqp9kn>FQ&N zQ`yS;Ol4!LvN2uR1S+d`59M05wPx#@XHD5MXQr$nRo1ZZ>S|eAwyv`<>%?kVOSZ0Q z*7UC(2bTAI-tt+?Z`x8FeW|+E`<@xomiXaI`Zu3^3VsYye*pYAN3CzeKCN%h8w2rm zm|l@WB)UHw;$5_C8CDF%(=ar6r5z5q%*s8uY(K`!@F-jW3iYviEK^WIoFOwmVOz%d^;9=2!#Tr$0M0N>caz%Wbt_39rp&5KY{}bp{Ohz zLT@K}yU|0-wSa~m0c9xx7wKI>zBy7>EiPpNy%PAu4)8uCHYl2LZ&*mCeM4W)I5wIX z<`lV6LNT=)MmwaNOTpV+$vA%BQN}ow%CHJoDROva97IjvRzU0({usTNz>})sjf6Y* z^vexTzufqq0bf0caPa^{IMUL=%|!B}0(fKR=HT6eJNG7&-6`uX&l3a3^ltf9EEK{=Nh;~9cNgc$7lhm->xPc`%wS6d4VZm}&GG&TX zXP1^GED-~B0UB^2DLF_+4po5^l_4K|%rQZMB0w)vC`9W;3Zy6k)Hl|0VZ?{FZ)Uml zPYD!VL2uu@H?#BJ%=^9>{y7o}A$UHCep>i_5TU=3hW`kj!t7lJWfkd2XNqW+$ubPl z*&;j3WjU&IMSfPu3JhYA!Rh>6VUzL3vglo;i#L!S*knD+ruRZwk@_U?1$|#Ounc+$jZ!iC6nyO=k)v-MCgLO=t9S-pu5^6*M!mIebMg&zH2OB|W!*C77EE zqL@7(evQ73ch&hWrz2746HY|^)j1~|z40FI^t-m-fggeU=?>_k9?;nvLYC7dox8zj z`5>UPW71_)+#tbpY zYE~seeihnCYuOgi9cCiMVp8^QP@BpXi@(U_ucTO)H;v+yD_c--{_2=yiewUZkqVlK1i!UJ9s^Ai!)8Yx9`QE zTchx$z_VUYw>g`)1zWTOn?7YAJD_um5tuz-2Y(K0RSi|cHa~`z2| zC9#CAKp&I21(p@|mcm0W;N{y!6tcrptRFjr?68;ft$7~(AMtURwYdvq1gY&8o|*6q z258!hKW8;!LG<2ZM|>;f7F|;Eun&+Opn+x`ttyt{_thDlu@yUdm*3<)8|0ecQJ$+R z)#wEn$H0G8p7%6rokuBQ!j+)VE3*J*Ov>&7sf9Z{CPjitq*x{*3IgaVWX=_VhYBUb zgu=XR`_>Xp~?QoU;sy`IL(Lh?ggI?+VQ? zHV2w82S=Y7||;8^9MVW7ZWZ>A*)RIk|$@ zRAKt$3lBvcJ_eq}o;F~k0|^(IM_`ozX=>-HvZB=0!J6Q_l&VQY2u{yXE#e#;0injA z+1dLLg@XrbV@_h<>g>ww`dB@Ys=ezdiQ0#bx_?(4-d2a#FYc&^9ks`i)m{0(wtQe+ z+8DXF|MSR~l^yw#BgdBCzxiJ6jMF!C^IYxB@-gSok*_=7S<^SHd#CQqf7Z46;YSy@ zI^U_C0Rg?2&fPq>HnQHeHn1a)I{kySai@Ra=6ItU0%`Q1U}RV7+m`y)&aN99lb?-$ zd2B~||9-f`>FBGScVbSKXZLw{BKmxblZ zBMwD+*JnNtZC(7?R&MHRd3uinZv%0`(Dx5xsOyK!_j@W>%s4FC7o(BWKM=oog9rJ? z?%vbK#k>e+{~<`Btn_zK;6l)rm2BQeL_5}Lah7O{CbNJDODzSKq$X~FT_|n>z*-WZ zBS_I9RRciaaMiH6X$IJeX~zpzi2^-^-u{AAc|}#orSq zw8$mjPCocIJa`b2hvS@|DHlov1-LMWhr#B7CPYDl$-#q<5b-h*uMj~1N}=j98h#ZT zu1GOpngq#D>)b2x5wI-|wkh%F5quQ7nI#a{QA0%?-K(jU)Y^DGet0*2bUS{u9)GPC zxUVD}Iqr$ZT5C{L#*%5 zI0M7$KfOKU^c-*!eUE}dB>GP-09CWcp?Jn5Our$YN{i2(TclcOh5QMW|9x)RY`YrK zTTDwT#A=;Nc8m3&wY58uo_@jK)kRq1DrW=d>u4WpS0Am);;r!C!R0| zQ#?KaDFM4$Ic%Bp1-SQdMWf`3MOpzV!Q1yV=_FCpoS|c~J9Mk*deJTRcK0AS+TRwM zGLM+Fxb@-Dp%ob(_Ujr^y9AO;0@dZIFKUdP*;`l#slPp3m}$ zbkh6Y+xW*Y1G!F^&2JM&6rb6hT|30FiE%)3+Q>}ucKb zFWzc;Ym`|7>&S;V7kGSFiaZ54Kt?1GB#?l^3A+Iyt!Pqs!l;=o!@6ZM9%haDI%Tfe zh>#(WU>UPtmTxVugcRZW69IvX|b&Km(d`+(VaA$}sy7YWwBTO5H z<2k-zw9mYqk@-ZRKyZ8<$UW3Ae%vKnx&G9rUGhhI@=#>K8dOPOBy^+9`H-P)6yVk4 zOhxjD><(Z@3M4L7(N$DM9ofbm5)l8m4uP~guw8=_*j-=vj@G+$0urEAHPIOU+W?b3 z>L`J{Ix>_c2r5bfrHI}aYZ41af%2~N*S>)mvG<8Tns~Kwpg>HSgdhIfFc-%$z3uw+~qx-4_S+b-XDTF#|pmMwg^ntWBLSVO}UImIHbO&kD3KIo^4p+F(oJJ_S)C=XB z<1sKtp$dIMJsWn+7E4E(OyndaqBFvjIxiR*z* z!*%?2;eQPj?F!%gXCTl$`P1984`v_EbyF{Lr~9WSx?lA_nChziljB{bpFQ=x)jR*t zeU_bmnV*R9&ZS4ozg&5IWpC!Q{rrXQ#eOD#|MIt&d*^q~K9Zjn=bjfA_KFMp#q#f& zrG73yaFCnspPYDEIMc(u#ht?QkIH-SO_uiyOWjKcqbOI1_4c#V2N^Uo`)6*kclM`i z-zm>>i%-*w|H6-pYdtxa`eKPZnI}MD#GRcSLa&cNps7r}Y@zIUJ`?q39|~4w)Ne8` zBrA1~YJ^QhI#2{A9;Eh&>u~=%us1YCOr2-esA0gvVZ>7lIAa*Mo2DB}*qHD<3FI+i zS%F1ROiV#U#1k6DxryFLk}~%uol(lMqR?4^X9s-WY(h+M4ij?~8;d7*=e$8q^@1SGQg4|*M3h5!Hn diff --git a/app/modules/rag/ingestion/session/__pycache__/local_project_reader.cpython-312.pyc b/app/modules/rag/ingestion/session/__pycache__/local_project_reader.cpython-312.pyc deleted file mode 100644 index e6fc9351c0ecdfb2616adc742c921e863184d031..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4058 zcmai1T})fa6`uQN8yhgO0cS&+HAzU~O=Hshuu+nd@Z%5?Vpw9TUANJV@x6du<4fmW z2oR&9hIUCeRfyCsTdk_H>Pnj^TQ!eJed}vq@EXh`A^gcaLg4;r!^yHB($^+-3ldU#Nw%#jvbpm5<7Fg1vs%UW{gCDk@S>i=<$+y z^CJ{H-1@hHStKfnatev^1F$J@lfMk3CMT3R5xFTTU}LU6swLI9aV?QjnV=h#iDR%5 zv&Xfxp{5O1Sz_dom_8B?h|D3&>DZ_$%giauqna|FLcUU#e>5ITl_YLi-m)uMen!^O z#|@)-Kv${W980N_&7JCmJXTy?mnY6N#}a;pCMMLhKQ=bz2T5Gj^=1?dgCor_*j!vr zZ>F)~=0ti})$!Dtbg0BTGc8&WW)XmPkGTYspn^Hzve zbX;!>cZGU-yI5sMZ#dH5-98ZM4nwc4zvFs$B-9ZZ=npaRc3-H2+4~2=?Y+G>TXE-L zaX5h%;fN=gs3dfQi6$=%jwezIvl%futQyQE%VSgVSbW61*tDjorF+)nC3J%|0zp6s zK#yC;6I~=3E<#)Sc{PI)voDGyE=svh8(sH>?VR#6_((T3koYvF^yN~9Bp zEKfJ=KBJ%|L{%Mcbe0qj9GMq?;Wn>sn`f0EHa+_g>@O0d6r}`wv?4ZH3L4NXH!Eh7 zrR-1^0AtB!_za(fY_hXia#{m&bZ??4i{Jbzf^`bkH+gbXYH`+@P#;Ptv$Q$#=r1D42)9YV z9-iJ`$^w4OxPB-C{vmBVtz7go?yYHQ+!#7_f!PwnX^pB7I}SA+*A&Ql%%)PRQ9U3~ z7c5B;?G!;1sHZmgFsC{>7E3GRkZPHos=Ah%P+`&}1iTIgby-PJwhuFYSTnBSk|8t* z)kdR+sxXNTr?f$42hAZY3zaf(>SR1Mu7I=(d;0j;SW#Kjp>{F5ZpeCKTBTTmSOw-@ z*-$4TmrykYwQWL`4UIWsx;&=oiAiRIY_6u2Vrs^41OIS)DytY#CzS-I_JEz9Dq7Pt zLpH0DNP%S%dZjZlVW^|#?wP|{MaR(e7h5r_i0I3-Z;y{BTe(tTJ3?4&i(e{uP-jeKfaQyJ^3YZS5(h;7QDX2%TF%7`g7b^EX?s?d=R?|>;qp@)C$Xes^ zr}jToKdXLmFL&ZfuJLNV@kX}sMy|2vwO!oj`L|%Js($4KXJ7eAP2GHDF{f_Lk$6ea zFTR-G-=0eU7^gRoM1Yvn?m`5Zj?(YK(Da+%%1_I8k)p!>=^R-8_wMUmCx!Sk# zwWqVSr*k#m0d%`PIZxa2`BhI_&fT`+Xxm+R(PtASe*)%x9$y7}UBg~@v9cyqiaqc$ z0d-;ut~H4nZb$on_4eodX1$%~0be}eizG2;?r3{rP6$V~fet-0L3b6HEue#nIfIbf z3eb}M%{VAQ&$knLPDr6}srM4b2;}rWn8$2mR2_mm>4ZG1QuD#R4S=*Cw5HGgk9#d= z=RL630u#4kukXe87B1$!C$ioXPwVsE(^*en340BPxPTq1!uSxnBBiu@P*7^*Na)=N z1WP0ozTMp$zRg5@^fSryln$WxuA)x3?N$f^sfbb&pix}B7)V!(_-w^}_`hi%XK)_k z8~|EyxgTG8cq#8Xm~|b@xehHI%^!X{3qRM}kW348Z!Es|cG^sajPa_+trN1usYc%LR_=ME7Fq#)R4LIVEp*r;lZ(=-#qT3Q837f7fR$smyF zeJQA--!BzzETMM-wqgV#FpFVma;VM3K}}165p(n9VXA;E;H1?!17CQw2FV>HcaiiW z!FZ%SNHB&e9u$S#Moia>hgXkXBxpoG0c4IaU+aokTk!l~_9m+vnGL@dIqB%Stxl?2 z5Asqw_u3&!?{GyUI5iw_;vc!8ao9Dy_bJ{EbCv&usyao?GduqMOC<)WS*-0?jj?C$ z$^3t1`m)`>4aeo;AGTJS02>$^`XwN*1diiglEZ%|jW5Z8mt_CHY=n0$)UI;%U-1H0 a|B3)v7YOfrh25_zk8|&EUlOFI-~R>Ct*0>n diff --git a/app/modules/rag/intent_router_v2/__pycache__/__init__.cpython-312.pyc b/app/modules/rag/intent_router_v2/__pycache__/__init__.cpython-312.pyc deleted file mode 100644 index b19f91fefb9dde0f13543ccdfc0ba06c4176b124..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 693 zcma)2&ubJh6i#M#XLfeFr4~>2){744Ec7e|*`j!nbt^sO62ffU4&=v>$rSfg`d9Sc zlm0FK2Z5eEc@v8idg@E2V)arVf@tjL`ZPl5n@@fRSR0pxWGBTL{na&%rp4&Qh}t FWw!+W%^d&$ diff --git a/app/modules/rag/intent_router_v2/__pycache__/anchor_extractor.cpython-312.pyc b/app/modules/rag/intent_router_v2/__pycache__/anchor_extractor.cpython-312.pyc deleted file mode 100644 index cb56e070806a3854c860dbc7ff0c834d33f7603a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 9195 zcmbtaYit`=cD^&@@F|HBDT=b?2krPpOO)bQHh#o{Bgv2GVXx)HYg$@{=8R;?6sg>y zY>OTl+Qy4eSQoY$bmeplM8+-<8+H*dx9>h#1C<0ppku5Lme}Vj43C%q%ZNEMwMyb<7s9v3FC%K2{Z| z;s{S9esr}yQ1L06@4;A@0yQt>u@rb5FXXWncxqqBV}m(t)J7|%_jv6s;Cx|Ad!ct1 zPmU0=>KYNN3+?JBd0)-1u@fJs+C$N3EFOxF#G-Pak5_GnqT%x~+CLtOs`hVBNOV#w z0M`0$Y4Vgr$2vmMSac*Dii{*A3Qg)ej`#K+?+czdbn0lZzw1bESKq0A)qdhku)FKb z>EkCm`=N2o$%(Egw(bp$k4rT1?QQKR4qOaHCZvM{=eD))J3DZx)j!zW=G&gn4YWe( z_@pu>DpZau@yl^#GBg%ZCgC?K$D&F+2Dy>wh!P$e_6?l#C3Y?AQl?=A22;dXSXSba z9G87<*m;|O5C`!OVxtQaS9N;~S8h&kk(d`u0nM?d21K-cmRH zsgF|+{OKDwD{pJtKK~%=bD|M?%ulb#l=@zJ7S=M1TdXI8mf@Cu2AMe`kpL%>0B8`<1`eG z$7o+T|5fbUP%Yq{TROqMP~k3fGN^StudsyNV{C*dBv>d@_&k@8uPo&%^gc=Ma(zA{ zwE~lB4vsMqrY3x=35Ltm!JrytDKey*G$ysWtXjq{yJYnxCxeT4?LYv~?wopIMrgfRBXpP=tAc%fZ$k79Au^A)|#=X7!9HoDNM>yuyzb zR=9+Nj28Byq?A+m`qy42DP`G2-7sF6FyZzwVR{6a7YS3mAbyoaM&ASgDgM6U zUS8Ok;8hZjiUJ$Azyw(O#xab=G4zp9KtTkAKGk~oSWg!-k;6kQ{Z~7fPO!dcZG-X2 zaY?m>W6_}zQHqA8;XnHT)34iog6h`yIXFaPV*oz!@OeoF3DSE!)pfE@wG53!#Sst- zx(a5iIyGy2^jP01%pnV12Nh+)K+$?6)-D%>GSPeq8=VG{7l)R#v*rHaqQ4{U?|9Ui z@gGZ_K9`EgDQ8Q@87~u&9cj;wg`J&?JA2bRdmoFLo&Bj$BsHm|JUcR;sRhf`tfL`W zQ@-_x7^qKd>#xH0&XHjE$rhe1dN_Y*Q@RE(p*wmeO9*J~@+j21+t*yaVC z#v+HF8{%jA>#rHflmH`>(MrNo(D*4+iO5vKh5`b1lEJ@+Z!s(8(Q199;!`Z}O<5Gn zsH0e;=fuL8vQacBmWzaP*SEv`>U56c6UNAkf3b{!!>kJ`)K@^=l6pZ`9~ff*#y~Jx zmXw0y3p`PUr!JT`YWA{pFaNHX*o@y*45Q%MFHbNAO7gNK8Wqd`_gh3kG~GAfLwf~D zUjdF>e{3X*p&w+7gWr_#67gC3RDn6EK0aXpGy2@nIwn5n+Ei2jncmlr_kiPhyqfPAg1 zf|_oFNvXmxnDcSf0xjfABk}XVHX?%smjNGG2dW(lz!Y4HQBf5lu}czFP3V}w80I`= z_^iwz(Dl$I#Wkj0?A)ZGj%sH!p`qw7;z{|m1co!T8Te(ih2XSkiJ1|Ku~B0E3gjra zUic;QYS3xGj?G&E9Nu{A=MD6cDHV8oF(9S!-#fQVAKE{#FE;wpjlMgte7yhe{*T-5 zwmmt^f72qxb4M_ZdHE1yW`MtDuSj;l)4TQ2k$QplG;nyqAZ!DL$T80P+Hd zOIHklsmlOU22j%qPLU|+d<>K;0G_Vy6+zCVx0boFPcS*XuWT{mj`rxE&v4yfC9AK_CD3zdAuWdvg`0LYzL%YwX5cQ0OvE%O;AEN z1A)Scb7;ny%0NvE6ef(V5W50}=ymv=*KCVF9{widisV~Jzy=cfDv|?8UPH1A$!;J%p+xJwSb7KvQ)L8srpKBZ zH^FPdyF!hZ`J8)!OMV2T#0OaLA6oRkk@mmwcz4EsBK6(jRQz&|kPg0w2VY=`5LYjs zG(UB3Ty!_5-QX)`+&i8TqxCqyLRnpnbNgrazyI2z%a?ZfQrizLxL#kOWY!0JKv|nV zX?`@E+1Hmk@#f-*GwBm&Qh`wB#JQAsK1Ff(*ZE%l)&UrOO&|YTLaLARIV+9{@eC?m zxw8QuRCG3e$aJh2EP~Wka2YBYNnO5m>6rpIWy(;ZT@|#Z7)pS4{UGnq*l|MTsc3+w z1VyN%LHg)ZCYW(ed24*D=nNEf7Mzc1K`|-(MGlPi;mR5XJy+5rUNJ-P48~Fsz?G_C z!u7d9Z3R=V*NO(wcweYsj{jIQ$39aZ#jQ{+aGVqbZRj2T=YPWVn|7u|^kt|7Q)`f= zIK>rE>q3!8FoMo-D8eEo8Ny#YhypdHOp}UAgn*+~l?CaQRLW9RDbF?KK}s@6iMvIY1w>*@7siic5FV#5l>TOQiI4s7z@0+}XHT@5$mbIPo; z=-HF@?8$h(m2thAv@pZ^)V+4my(R75G9S;lTb>bzwWg?L-1~j-vTEIjO&>JO*&?u|0V#>u5|lyz_wvm(!cui`tj1t)Hu!t;*J~%hs=bQom*1owu~_ z_hRPQ?6LQ|v-O^A)0SK{sav~5%yrJ+8m!edxoVh1&RbNwyBx#1f`vnO6eXTnxCfAd zD31d-U&y=phe0a@kUY@KXi%mk~5#3n5uH|K-4qPfs;A8}bmGpq@RCK_l35}Q|uMo2q5 zC<_8lWBU*gII*cGt2g|&V5qfyQR~hbNOj$fo|&FoP4m)67j9p8ur;$~-@~p?yFclE zY|b1wkve&L@#NX`$+M|}aOR|#8X5=iyu!WCCwmY!JNRb?=qX1GR@>Ll2xQqTzkkSn z$Yl(pH0uf77q)}@ATw8T*rvdN4d9A7Uf3rE*R*hiqX@J*{h+-+ZTkp>9Xkv*D|1Gp?4|YFlYxaGq?1ehwKH&hkYoqhla=S0MX? zu%FC}s$h8lL-AvmB`8JlS(c!*bdU12Lq@bAih%`PuK?1c_AN_F!7{L;wF+UWV$|&% zcu8k8FNq?b&rIKd2Ym|(+lGQ`qZ&e@$UGIFrVtu%ny4gCMB;d03ix>t+NlNrz!eIy z7HTT&k#^>F2`c3<5b#YlZAqG*zOwf(rKB<2u=W`dtQ(VuVXx4=m^Xb?b-U`$(8tlc z(T78yj(swga`q%UvJU4>apnpGyxJQ_XO7Akh(v#Jd_JM@yPBDD?4 zYHf2%w*m8PbI}I9$Gyjwsz8!YaznhxU9%{L&ceB}zI^OtFkFgms3{=2+!7j~Kjpg# zhnPqPU4#sPL`-p0{ESiIE({QInWJ!2NMMdmg<7 zB;)8wS$bBgC#o9T!B)ti394jpbTusoTNg<`(ZrtDoN-h*KqdAa$009c$GWvga7;8+ zTGo63|9xx$`;1ZyvFnwYD?ga}i9O|LPFb2)&KXsn&G|88N+nL8CmeAioOFZG7>WQ~ z2|yr>GE{<)N}-tJ&pNmQOnaB?yZ-j;?ZEa>?TG@)p_%b|oF(#RT!2;*?rBCAIBSZ-bSK-0v!6lx2Sp)(S)U@tLdy=L+oNP!Qep=r!cXamXt?$fV{7AX2ENm;=kY3G=KTwObX2BC$}MS=8q?=vkj!u?gR&MYgpiO`8jy z0KCDJ;KE7+B8nB*F&#(Jh2$M17!Yg2vYrKag%9##>53_0pOp24!LOFX%}co12gfJI zBhpzIvc(HzaFBhTYCIQorzFHtD%TKbORDRU}tA#6eDelUO$WSHD?hG8%0o~2oMxSlYSQoMq8RQXvZ89 z7yRV^0CJ7wOvLBU?%A6&n}oyM7qy#n0%oANahFz>vk+U&k`+srY6W5QQjJ0IEZH1D zHkyGrU4kd~3R(Zsm(_N`2HXv+a#qaQhcN!6rshB+Fh^z8=L0OKPleLGL)id7u0WV$nNv-%6KF?oWEuc z$HvC-plB<8tq;j7*q80tk-p<6yE+c_chMtQ+Jl72NxAGiw;a$`<{-TaEa+*-e*z?D z;5hDcvhkP1`tPLsbMofDlCz(aqhHjnzR4q6rJ7=y+VSb?tb6^5_qW@zV|zx{WvKTw*qn+DKFJi@zge0^*1-wZ{@6jU9Z7)MxGP fvz68F)3Ew$c9sO>*V> diff --git a/app/modules/rag/intent_router_v2/__pycache__/anchor_span_validator.cpython-312.pyc b/app/modules/rag/intent_router_v2/__pycache__/anchor_span_validator.cpython-312.pyc deleted file mode 100644 index 70eee15cc720d7b73143ea9a09dd2412a1945d0d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1539 zcma)6O=ufO6rR~X*_MP9*H#_1H6cx1)&?oG&`>B1C4Z-w6pIuT!m?;a&RVNoWp+2U z9I1rjgA9elC%I5)jxFh-M<09dMXDSumJ|{~54{;X(Bf0yXtcHy9GW@2d2inP-kUe? z&HFu>97BA4`;+yRjL`FeFeHlD@!nZr+K3>6ZB)fYj5#maQdKU>7)j^~BJwIC$|Ff2 zib`G8wZFNb<1lVIj_aGgyoa7ZwcH&&2+Atwna=IoWQ*g7S9G`y!S8WP8Ly9Zs3dP<}N}_rJ*bx7#=bNSI!~C z&NSquqn?HafKd-^BaTP}S@;+E5k%oD+A;d>6F_L<^eDYI{yP6humyiK!W{2qNmMH` z8tf6iss1lI@e=T5v__PMT9THfN)}!t-p~d-6osh`aW?5l7&&i}$L8yDJ@ze;pNj4U zS*IiZa3|^t)PQJFf05V^(y?#>;w=m2IQ1j`=3J0 zJj4rZ>gAcan1@i*@eSq%kcDyQqr89{JU`=3^dEAydN|^lj^$e`bmiS+eoQXX@@U>O zAoo!J%uGw`XWrXIiO~SJF85QD_nT|Yhw(pBbNzItom@|Dl((nz-Rb(l-`?|ZC!dYKKY>BuB=zu z?z-C>pJ`p_r_v8DZKY;6E&zFW?s01N6*v9F`2DMES2t$1vvb|-+~&otYYUx1al1gf z1=_h)=@u%TYOQzecK2h}$B zaAr`{RrEqisTpCzPv>=&dn^YK47@Wwd%_Q)ruP2W6P1Imt`jrok&j7(2B1q-Yba`MKb4J z>cP;f+!&4AWlMxUq-+B!tpCVO26$VFy2+Zh**^i+0hgu#GItKpp}@8P1Exj>n);vZ z`|g7hDaJ;I^gufIob#RUJI~+uIQ*B&N(TjrTU?7A_fXVtv0@}vE6|%ifWk7xQ#>7| zrs*I}W7!ln1x@Og2{Q0yqU^LeXr8tNEh?RjTBmJ6n_4zU?bD8+gQiTBz)aQ}18jYH z3$)j7)s52ICan~#G*JT-Z@o_OwnAIgyvc9>6g&87#Tkml;!;S8#A9N>Z&IpzXNJxqkXsDV9iJT;e5;qnPC&g4~Wc0DF z)0akOTU%Z_(&lg0OCzn&nwU>ditsm=mPGiQOHYPoLg^_fJswY!(R5-Wkq)QB@RvxW zC(;v;hsCrw8yS<*MD#z_)i^Ti9~liBOT{mvRp`x8C@fO~6{L9zcA179HU(Lp37YvT z-o=}*n}Zg97jL=F2CaNG> ztL9mMo#NK^q&FH8#mHDhAkQE3TatblK66d}NBJl6&*h(F7UbKRh0Lq+&wTQ`@(1#J zQ2Zw(Wxgff%6vQdDD;+p0fcvf;{#~?K>ml!>*f14YLY*Ye+s>CeUZc}l(;oI43erH z*N#c>@o+NJaE|K9raZGGB9%1ytw}FRC^K2bLWB@MEu_pKMr=zlt<${1iU}dCSV=NA z8jnvYw&@U=;^VV1e?_uVUz<;U4;PquHEF>XwUR{WK=FOpg=?8>S`{`%-GO)2YUVoZ z)z4wazHLxdA@ciL^%t-O?;%6d2BI?8aYy9$74v8`9-dO$sz({JmoSD7?JOlf8qdv2GbGr*pi4CQi_ zO|#IK9i}84MNK@-n|S6O_HCVanDUzgO2son7oP0zy~quoAMPFhtG6)ydzVr(7K%nk zL*Xf7C%Nf}7{19U7HxYJM>rlEi||4$EU1@K1dYTfRU9wCu1&)ZiBcr2xH*0E=DFF3 zG=b+wa6*1F!7Hvfl5lL?%SnOED{hcjPb%NgaTUN1BWMaxL_t1G1XZ$PGlnXA zFb44ebQK36gM+Exo2x&PsXwyzWVZg~V&%uq`n<;{SNQUEdvbNHnYz}sl-x0xtqUwx zeC({tdk)AI2kyG|tzP~mD-ZJPEC{IEF7O!$K0S97vno7$!bs+O=C3AT(`j$K}?pUz8$=zN^%;Vc$PQwmUpaM7X+lB z1}RB5OvcDX+&13MJ4(1+C9F_Q)4;Dozlh%n{1w~z=P7?>K%spK72XaEyuQZ~Hix0` zeflYiR>AWUtoJI7(r2h2(91MUz3yPCdFt<&S(>0$xkdE)*3zTMJyxAWW=*?DPMkK3|~jRGnKryg0Ms zef`feRpp6tGT7d{%l*dOjk%TGcN+YwBv;>_sc+BLAIsH0 zo~eI4TYoz1>R4p&I;*l(=hpgiM+Y)T2iB|3tvk=%^)$-s4a`4+$K?ASqfc{DY!T`MCbp-yiegv+aHcW5Y0 z3-mlC6}TpKmvwtD)asLHv`Z4SmI3%UD4V|pJ^wf0Y=NfNVRn_Vqs=IhfYr$Y__v6> zIn8WW1LahJp@P89P?ObLyhbU_8Y<$dIc>&Orp?1t6D6T*q^5%uVQA__0O%|=$Gk|* z(tcaO&yo{BC11zv7-qX6^RtR|8ca5rYo#(2mcW#Q2}UEWIKVVZy8Up0#e!?h>ooB! zcnlRnOiU7i3yI-KMDc=o*Qs0PJ+%*7TQzxGt*wT=03pt3e4GR0gzCa?ClF^)fEzG) zikVMNCq&YXGws1D8dgIiMQ?he!-cxtiUAx@8)cl)0 zhw_cbbB*1Z#_s(7_T2uC%>E9giT|D5Tv@eILG3yC7Ofj@#$KNXCjXK@=RTNm zACwPu+p%9?Z7}e?FQQ8R6@9dap+02nJuc?MDjM=4ON#!J3ZYvDgy376wmC>9 z`@_Iguv}Le38kwk&6I^f!SOQev~i^$1c=Ep7H=C^0G2Z}LC_aKlV&BnQ4g9)0ZjT# z%*IR}x(18UQ|GiA^#`rN==+Xs%M$?T>dFL^Mj3Tf2F~^X*$1m47>#wJX4{5sgtZ3n z{ZJYoQ`3KR5%kUo+E3NQ`5j6%ID&v9fFD?rG4wVGI&WyPLcFNBo*cdqfQT5V{e;Ac z!a#S085bn-q}nZ+NC-qTTIMm}k#x_K1dwbGLsSysA-X1mI4I7y#H}PxLtCn$9PU)0 z;%vlUL57Zgea_pQ@iwm=&wASy?HeY5&)wSH%aco!s}0%OBZ~v~046nWzOa00>C$R_ zwx;<`P5attw)$(i>XVu3liBK1x$3S=byv2!TZNF^5X?A(h+NmcyrPZCf24QVrhV}CJPQORPYIZfc$GP@~5`h%oFRAdRHm@8MVe2RAY)BlB}(2h@WVt%vYfVhN6@C+hNKpEYo zXe1_x5R3{j^~#aQv7_$lpqB$z6?^E;j;_p~1w!gzxl2`g-Jge^B8I}~?s(q#=8bQz zB-dSs;7%+)mEYxEb}hNGyBZhG;N~nQ|NQg{{hiL0=T?us_2Lh?x47)S)?0_}>^rIT z2KMM^V#@+h|@--ksAnf7rDNfT`k*ENsUz#8tKvOC;mtXg%Z<;i3K=p@F!}_jh z=KcvNr;dJ^xn2ei5m%0$G5WJj8E4aK-@4PE_tf8YxwG!xTWqeqC)3`u?(WUHdSzSh z1Kd^#ZahY>;Na64+e%nrdLp1>k?17749SUwTqy=V9S|L-c zYM3YR{|{6YMRH|OF#+;7@fpSle0x@(hrqXP-Q~+v^=Pp8>Q+S}Fw!4s6{4@Oiq9zO z0^Mtpg{hBb|;ZnPS8JLRc$UX9y-$u|#5VX>&mLmd`K-H;_54x&T zOaz_^MIl7O6ABAY)luC{DmI9F;Ae|DiQs(obJg`=C$v0N4;J0dFv_?IS&<%uu)hTz zDQCmVqwCH`)FM0#^sGs_w(d+@_j*;&y0hok$2avekBh&js07_(f+NSzJ*^!+Ps5c! zjf(FICG4uyN;TlB3CPcU#(S4Pa%a6yXI+D` zZE&aUMIEWy-m_3xrcf7aX`2^b(5(gy-_~@!RIth0^ol8II48L6>apkR-6ZnS<;Go3nP$1UloGtoK;yW z-G#p*#6r^o$0-hu(|&z`as>x(8KI~~A!kqq0*S;htHbOtWKf7hl#@dE?mu663z@(M&JTd zYP3e;P*NU+A6i=VA6i<=zPSKVh>F^=;)yEF4`qR0bEJ4U4qONsrRAXv>aU|>WIP5B zx2nEUtl{`{0(>;Zaeg3hVW_{id$^xSICpi|ig)t9?TogBPI3*pATCARb$HaE=})Lf zeoHz3jk5nI_1q^^-zU_$-_#s|dDimU;I+X`GgE7lDfjOyLNwj+8HKsJ Gh5rWv6|=(t diff --git a/app/modules/rag/intent_router_v2/__pycache__/conversation_anchor_builder.cpython-312.pyc b/app/modules/rag/intent_router_v2/__pycache__/conversation_anchor_builder.cpython-312.pyc deleted file mode 100644 index f4ab1a813aab581a3fff829f8aecaab417bcba14..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2827 zcmahLO>Z1UwyMA8%l6DTGl@UeWNasx&L%Svu)yv@Sc07_5C#&%VP_S!I^AujO}l%j z>Twv;MmhK}NLj_8m69VzBcs*+1dd2tY=^~@5(p4*$ZZk_A$(z9bec(K`nJ`+eT1~et7c~AlHzED%eC7!BotcDJ;qrF@g5} z%(y8oN)^dWz-gt5Y$i<^{z@IIDb~O91d-O0HQO;QQa0LFg?c#-C%~IWLhS*52h$`* zJ`Sk>R@z8_wC%Mz`WTm0fp7=2gf`;?01ws5bX_Nw*6ovF9wepjWE}pcodVB~F;OT)za1rCHCcITkGueY#}3J}hg* ztN9k;^2QEdYkKHl?LuU0v07(wO|xCw*R=VO2l}Mg;eixFv=_i-)a)N#?|=G>!+*MQ z`00l9ubxd2B8C6I{_D3d5aGuvL{^3e!{nVm6c zudcK?$IVz1XlFiPb2BQ*G;(}m|e*2g?JDr2Onyk62wF6VtZM~eXGXH zEOF|kGZWhDFTC-0)_YGLP+oM?PlV(9=T(_We!Xfjc}{m~7E`EKBZdX(TGd^a1j#Ae zv|Pg?JT6R`{Ku;&Upq7XZtg#)znlNzc{R>*T2=QiQpk0p89E_#59*s`b;F0u4QU!R zJkX#(zFMwH6xfJx53??ti}4S{gr%77?hLAl&mzB>E*L zhvu+uIH+&CHA{nnuvq${PPG~oR$GSkZZAyPPIM|3izDb6>vkQuFXwBX%9vr!wQnI~2iSh29mI$1;bEs=D z+AO{A>U;0Mw~;=wmOirl#24vOw4B|)kv+7QJ+z*^^qI9$cGk~kHG&xj8a*TfM%~jKc?`n>Uj*dZj;0v4NdZHtcgkf! z2!wHTRWzUl7{dAeP{1M-f2Uo5d}jn=M~31n`9SupnMSs!+bgy9DpFj!k`*(Hzfvi)xPjmZkBat8$n&WDvNR9Of)}l;g?ml%SM1 zi!kBp`$Vc@_}pxcs&P=a_h}E(_g5?A+j{#JkUeV9J3o2hLTMGDBOq zMEJFL>sJ_CxCocILTJ^oeN~LSm}x$x|SaO=*8vijr1RvPp+j)4XK&#T{0W*uEqz#R3!XW+L?oflCAt9%?ee*Q5)c=a5l8|1$@Nwy~!Go6qum`sa>E z%6U-DvuG<3QeemPgmaR=000{I4S9xxaFy?=#`taP>a&)nv82Yk6kOYYcWK(&HQk9Q zB+Z2$lOl7pLBz&6ieS?<5vBgli1Hm;})%^i+9RRb@=Q3;PT zdmNg0vHj>M!lR?O`_WPCyl^zL{pyPzLt_sW& diff --git a/app/modules/rag/intent_router_v2/__pycache__/conversation_policy.cpython-312.pyc b/app/modules/rag/intent_router_v2/__pycache__/conversation_policy.cpython-312.pyc deleted file mode 100644 index 0f966b5de4d3636006fadcd3982606db5f7145c8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3307 zcmb_eUu+!38K2qR`(vM-BX^E-gwR|dkZfY^3=QBylwjHCO9Vc*K1Y?VidM_*I^5;{ zxU+k zF(;O#oJ5I0(nJ$45ly--xLP@1-6#A1fdiTHkXor!P1P(^D~2ra-6Pe?tj-K)A`A06 z-*u*9>J@WT&le1k%DYxv>Y1b)gD_qsI>}Lu(>1657q;6h(|iz{j^#t4|$F<82Q}#!hX}f+z3|mxwxqs7aCp0T*1u06gR6pP^cKDu4=MW>vIj>us*jh zT3>?VAHd&={TlZ(5Gd;npH|Hq$%dFHYY=3w>*Gco9Ne%zvM<)~ywDpcy=uSe4#5ss z0e&qAT>BEnYJE}LjiMidD0uS>SSvg@U905rB)BhMQVk>Toihj%;)72lgl>Ebokh|V zi#WTjy(~4Qg&OvOb2->no3U@%Q77mTtBppboBGW60k4{9FZd3Vjwnexk;&gwjp z@5m3uzyx84HUqaSj_o!}o&|X$sh0HlGvnzn^+AUYenPB zN3H09)iclvh1Wxe?9id*+|AHnTjz8K^Pn9%xct~k?2`i@9{AJIo1yXTLgD>OMJs&7 z3Le>jNJzdDr-*h3;U7TfvH*3B7CpS7Y`Zn-JT(NUbVAX?O`C)N>)v1|{I+>*6#rT< zH*tDJn5IxCgH2MzOx@N-H|@4{vjlNSW5kGlj9L09bbd>pClqs)oCBLL(&p(Sy^OQI$1xGhkC>=o&&aAYl#T9MWV zNA1DUn~~I7IAsM>Y#-RzQa(4q)epyYS%O2MO~EO8v`zs^oregz*qWjTH1VE+CN%|3 z^1S(=?|1q?>VTgF@C$q&_<@z6W98u{y@S0j$DZ?ya97l(JHfe5F><%e7pOM=}kNqlds z7yxtZaU>Y9>}ObG*kL4ac@riB;l1u@WzVED!!KlE=q$?{%04$$@y6o!<<*K-(BKC1 z?#hk~Zr^5J4&&9)ICM9g@8tg#5XS_Dt7ZSdYG|Mpjono;w?YqC2ZmNdL#^mu=r7e* zLr1=f_OJD)S4P*5kJ-n^ZuY0wqG_uq-DY1s_i17EvGkp!!hKF9$jCv4$IozG&N8`Z zn2g~Yl3``QH=bEzl}6aC&6M6D=D+=#c6!&(AevblA3bo{N7$TJ6Yo0xc!flOoPS+>(ly z7DM8P&p;GhBDaL#UjM?xtq9qZrVHb(zPW|*4XN8FZ^Q)O82wkU+qcIxfr=T~kHJjW zV9^j5!<&X5hSx{JdwnF}^^w^A`aq^$GMpWAx6+9u4$A+F?so8mYvUxtLXLISxo~cY Xl+wSDhyF&+{@Z_;?)fJH;;8)>s8mtb diff --git a/app/modules/rag/intent_router_v2/__pycache__/evidence_policy_factory.cpython-312.pyc b/app/modules/rag/intent_router_v2/__pycache__/evidence_policy_factory.cpython-312.pyc deleted file mode 100644 index e2544ab522fa82207d770e705f49e77a100bb451..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1613 zcmaJ>&2Jk;6rb6(*I#j+kfd>&rZSMUH7YjZj1VSSmq@`5X#&I*j5gj$vas28XVy*~ z9Ks<7j&LGE`~gAX05^`g_p*c@qERYULL9gm8VRW<-t0OwO{&gHZ{Nr7ea(Bj_tWVl zg2TSuwXzyQe@NlvL_!8Xegl~AkcmueqcvQ^Sn`Uktf@5>BL&?;rn-&H$et2<)FSO@ zUi(W5c`Q)KYmT@PJCdL|=9HEg1qVq#MnEvtXOli7Ona`^t$(u{Way;sIBH_@LurQHXH8^Q< z%823AS6x=`^@3C=4Q@uh;U=)W2@hy^I_f>l6^vHUUQf3f?O+psegp1wrlXijz-2rc zB{vek@0WNwDr=7={u}-vw*gz-3Pe*(X@>D(zZU{0ylMkEmbNOUdfINds zoWs31TiBg;I!ZoS5wXeYlukYtmVZh5P2(<8LENg~}FFqx@NmS*Nf)T7+vA~sc>ye+ei+|n!hTxnh> zfu=lHeV@pR@`_M7^_ZMQUK0^c?PZ~b%faHHWC=;+CnD1S?+O7IE>|KKoF}c~0_+Vh z8aBOGoT4q#VD4wM?s3w3vuId3lUXh5`j6s$B7|2)XxF21*vNQdCb@!#; zvp2s^AEpMrSv*KxJ%EpZ{mNDq=Dmq DJsGRd diff --git a/app/modules/rag/intent_router_v2/__pycache__/factory.cpython-312.pyc b/app/modules/rag/intent_router_v2/__pycache__/factory.cpython-312.pyc deleted file mode 100644 index 23aa0d8817bb9bb2624bfd0e1de9b0223ee5d751..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1625 zcmah}&u<$=6rR~#+iN?v>zGJQAWA5eDwk>(s#YpeK`KF1Kvbco^srL3T6V|owzF$9 zJ9ZnCNE~wTf6xP$9*vR%e+OJZiG;MWPly9IM39hr;=Ng~6IvAJ@b>+hH*ene?fh7) zRS2xlo{U4?Ammpx@&z_7db|hn83{;0If2UXL11L+NFHE^0bWN;Gnt1eHA!RQEO21aTI(7uvPo z(P-1O>cw$SdNSdVcZ7cc?#;wQ0$oDJ?JN!SUQ zxPKMA^~`&>H;^;WB8MIBlb(2-^gW-sEFNOs?Xc@@JoI3H2vxvyF86FPDZ{vnZ7k)! zd%edjh6aWq9PVcq$mHxc^!PQfpAkkJ8W2Yd^nmUej=rt6jr8@r%<1Mn_I%kB+de&2 z4FS>-pdVB*Igjnnk|>c7&(@P77ZSLLPkm<{8wmR7xE?ya(bNGBH<< z%r_>jw|;3|`MGuFuw{+R$+9(mdboUJRG&20o||Lqu=(DoI5~gu+xn6~EL|FJ94);ws!STIQqy%~FJi8nR$Mo`66g!A z`_;hXSwt+u*6)Z|fsZ(k0{Nl@Dr%^EdF$oLTPF-tyh$(p?~V*LHIQ`mbawL46D+WRmN}D< zvFU~X$mzl(wgjus@6a0@VKi0 diff --git a/app/modules/rag/intent_router_v2/__pycache__/followup_detector.cpython-312.pyc b/app/modules/rag/intent_router_v2/__pycache__/followup_detector.cpython-312.pyc deleted file mode 100644 index e4e07a838817fdffff6f993f0955dcfcd856b370..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1301 zcma)5-)j_C6h3!mcHLx?Y}`d%OG~#Rg+bW(`zefCtSw0MpcZ67hUw0%>^hlQ@64Fp zutG3_WLv>Lw2kyBk1e4P!PH131DEP7_af&wuSYm$O&Dp*k|D0Nwl@xf!RZM$PXR*zb~ zRrFn|CV~t?!s+l5Th6iTY=Qk3UJhs2V$g?vc84v8(`=F53MT_G61%|`B1h08jtjX6 z+RhFqMHLL+W=lc3183L63AW6xp>q+dif-&Cwz-*OOY9cj z>~HGkHlci5z9)+1auaI@jB0gg)HMU!@`k8!cBt(5mgDQx4Sb907xoU7+Efavy4m4U zzFJ@F89r+{R;^04@!cD_mM?pH1k!_Qe%N-4hV5zj_lT|7+S`Ka%`g=y`rCkCG!*i6(oS1NAV;W1<~-aF=1?Xu5h+j6*UICY-Te>igD__rrc;(&^0 z*(EMhV~h@n^3iyQX$lX#@52j?fAP`#4hr;XRCu$MRQgJ-S-YC~bNih1AghL1wUyoV zAiF2b?rCNBwNm?Ml!vLzN+$a#IWXg28E=mN(r6_=pCk8@U#(=eJxZlpX>CEd(SNP~ zep+j#G?vg-u{MmT3KdV7%brhpoLYWB9j^T3x;DPvgswZrsHN+?SJ$I&gLa>;pAQT> zicqmcx?QNGP)I#!4@(8b+e+-w6U&%_7gEn)eB%38TjQ}qQL4xq!M$OFQh?2|85KK= m;Ok4SC5EF*Xmkgr2ugb5)xVGlA&+6l>v)F&_KbP6he~57V^=g2ieQ8WTrJG*-d9Qfk>e} zAzW0IveAmYH zvSLE!kC9vg14jBVATA+bKn<8N1!jIU;waacSdRTe8xBz!&-a7S3wwbtyKz8_cKjpr zbtIR-!6gh_gAryhlUdAuXSpUzvBcDJtx3{Jt6WWZ!)E6s98lhshWf1TMI`P%gZ|m7ck4^-<-cbe>?t?+xVQ?n4<^{#}eABOc@H5 z5Ih_SU))2*u~mvv-y3jBu>l&N4SAN*(~;MYJtBvpB9HI^#9hr-H0Vo@K))#Y0AUK> z@`V|Gk9KDFpZrSOD~XH!Kevdz8K>!thGXiTjz)M0+*RO|7o~KCoAOtwXYpxv#6xu8 YD+Z~z{b>?HzQX$7M4D{=281Z*AM)+M3;+NC diff --git a/app/modules/rag/intent_router_v2/__pycache__/keyword_hint_builder.cpython-312.pyc b/app/modules/rag/intent_router_v2/__pycache__/keyword_hint_builder.cpython-312.pyc deleted file mode 100644 index 7de9ed8cd6b471d5d0635aab3c530c89f9a3ad90..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2183 zcmah~&2JM|5P$n=8^>`7aabHEpAj`qoRZQ4r2-|5frKVOgsO_8Xtl{M!Djuz+jSsj zEuo5ot43;&kPPa99C`@kQ2vBUJ@$feQLLv_t%Q2umL^E8ICb8xH)$ZH?=WxP%)FU- zv%i`BIS|-}U>*HxA^9VZ&+!!v8U;ao--pt7*@Gh9R@ z%@?$p8(FNLPiD;Cd{S36JXybQJEMi;XyNX`L(6Ci6W_B9In-j@QWQCJ-9t+F zw~cFglQCE*^7@TFG~SC)k+=Ai=WYANy2$jpx@m-&+3>rqEzY*;w0Mi1W(;Pw+hS9G z*Tcqc@owG>n(gC}8E|!}Mwi>zEoO_{k3;T)C8V}**twj_y58UQvZ82-^(+tnN0y@N z2eLfLBg=+s7>%F^KSU6w1%KH9B;q5Da!xU?%7!+T)-t96=l(vxQvcch_$7cE@mxt} zR7KZ`pl5Gr7>jU?h)OP}WmHVRH}O)7q^V&dOyO)k7x56@(DW;WH?^B45v~GQ3=-HJ zMliG2v_k&`-M0S+7q(n67kI&Fh-cg_Wr;@B~T95Cy`?)7@Ry z96ZW2hCJaQGM1Ymg3TACxA7XYHT3buPe5*?THBtIP?L5qNzsZFUFfSyM@xa_(7~lp zv=V~zE1O;k3V_RT@8J_ia6i<;8oi5(Eq?c-}7DLlGIU= zI;v8v)L#oq^TM-WyX$H6dDGz)4_sLBqNdQ?$lOG!@YK6&4W5BEwIQvc-G+YyQ%2@` z18%gM3y>mft~XtZe%m+JmJl8S2y>>-HBH%*)IB-7%354%y*V~?D(6N{1vjKF=Qgi9 z6QR{xomPjI1ki8QG@Dvd;?e9y3V0jpm?l;b#=2tTQ5*Dtch1mEOrLCn7t<~zEY^r% zuP)mY;ik~f)~o=s08Ab<&2WnWSMM}Wv4BHZ;<8dc|~_LxQ*VVb$EpA zh)!YXEXI`3k!n!&9kj+a3gK7#M4{C&r0R&Dy1tT!v>*%y3?sZ32#LWYh}9=S3?@PB z%}Ef;WN}*2lLh;i=?tdM|Gi|)q$jevjOl=JKw*zJ&tx{8OX?b?0JihS5z5gL+7Ei| z{nSb3G>(Cc_LtECWQAiG=2vv!1@irY&i#hQe&60U*IW+Y4L{v|qPqR$?Z&^volNU0 I0%Cjn2Rw-7(f|Me diff --git a/app/modules/rag/intent_router_v2/__pycache__/keyword_hint_sanitizer.cpython-312.pyc b/app/modules/rag/intent_router_v2/__pycache__/keyword_hint_sanitizer.cpython-312.pyc deleted file mode 100644 index 89d05eabfe35f7d3121d5ebf06f779ee63c15d5d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3516 zcmbVOZ%`D;74M#z{mbeiu(;r#Z2Uhb?tY>)BmJ zvN=;3*w?SS-+TRjue;ytKdxKnM)3XkM{}`3CqjRvox;cE7`$8y%rugagcUT1doZRv zqcDSP4~r3ljv=}Xo5&>v3N2f#$(CYxJ(*sVEhRnMaCulrhZrd@CgloKCgeM-!$Ge-pzG? zr{6ZduYauHda~XUHQv)d(&vpI=y!}OPyAHj7R=7WFi7ejf$YuPWCIPF$u^#7H`(sS zV;w!kbx4*0PM;pKXuKlDr^4PU@20~>_pA(~PdzqRe>|WzHT#C~ebh{q};r=dHvJ>_JGyljUIB^?ba* zftGdn3jJJLSO@e%#U-vXll2@*+hJWhc;bk{839i=gC`D&(;OpoO{eDQr}19%Nt|RW z98<|&1+&+f$*o|`nRc8+mVm}eirxKU5G74lRGr` zSDnFhiBC#=On%<$xQU|-$Pb4gBUF|olYYen&`|H&6P+L{ZJma7^? z;H+TyrEQ}H&M}I3ci2SH)mMgIkOTB;?E>Z}xC3EGN*X!~xg(7=e3= zy6+Fqwa!$|zWTGRhClpNr8(oh^&7D1YHjaq5l%FoY+J#hM>LXzo>bOUt-#n#3)3D72{)Onb6$cEkv4*pJ)-f8oN7Mx+4&>u_4(k6_i9`KoykOfGqUJ z6xp%Zf_DgTHY2;wsdzz_;n_y%1W=v5^>aYh*n)vP4_ubm90nuFDl@%086N*Jtttg zsYk+)nCw$cjy9%yAf6bF=cS0Orj(>7xaqI}%MzjKUZnvIton`+T2M@9VGqW) zeB~CEP#f<c0KTi7kuH2J6re7 z&wcOAj@)Uz*KxPwv%?GZr}Wdp;^`sd^pHM0x;UIRhSLvEe{ZUHTKPcHeeY!4K(enl zeeR3gtoTIzO!{#ipIt58bWK`UBb0ifPYP&&;XWQ@=d( z^D_@h_ZKw#7QDOG%swpLzvKn;OJ%4s@EDc2_GDVJ-ijG+(H}J6-y3|c@aBWkz1dQK zwsI5o_=CaBv8=apX2)W6odN&eIywicZo|9n`XQ@RHYH!yX4$#dj6m((>OZ*Ypr`ao z=jBc~>Ar`a-Afx`#U(!~t(-bHHJlmOomEdCA3&8yn5U*MqHcjbxl_?v!To;SCQAAB zlzz+ATE%_p*a$TGtlWYm<>7~y4*~-@g&`X?M#GTS%Cw?oTVo0(1Vg5we}p~`;4x*- zopqiidttz|TQ@{CT~RSE#UwE)=QB^hI%5RNF&f`o^myfO4G$9P*MM9^UzAkLRL$)& zs%o>IvMXJeyJq-@o*hdps;IeJ}J$AG!a;+>VbLLLquXEwooc0j+WsxBiS^_ zsS(86!-Q5BvWXI?>gdtG;3Hds<1wM>IFFa?1Rm0b7*k%vxdX<>cNWLFCadfNQFS*E zdYgRLN@mIyz1t1%_SvSn4GZ4Ab4LwtD8psFWm8gSLU&dZ3hxEr&$bhuLI7NX;*fuX z0h|l4sTj&eu}Y}n!nS%SY&M)jOtAw_ih*aWeYJ3^G}wXsMpB2zUwJ9OXIZfh@4JFIhi7HaumjSJE0M=cygF>jg&M2F}ZLeF7uoPZ1wQDL_*=+ zrc)5&;-D-DrdtqlH4k`?APlEOB{xG}p~mQOCEFLp}WC3LRR^uMNazHHSQ;Fr10w(8}2#Rg?KzhiXzh;LL)Amo8;v7H<PY+cy?MX$ z=6my~yE}+ro&KVldn6$A8xuMUWVUegZJ?XTKnAu@9;Y#8JZEuvKF#Naw15$Z-bV(% zf(+pS*K$H>aYxDT``l(~Y?=ipcIRs1fR7mxdTyz6uM zPA6=<*5`^uggtQq6TB94rFq};K2D&s2bTVCamT+?1x9OE1>{PEbEPSCRL#0?-Jj)W zQI^Y`{Xcb)?iXeJl3N=TP?oRwE50d+i`)Diq;eB*eSV8wpO!PI=oCxZEmfqvZ8|ip zFX%Z-pSDb`Wnt5k9;4-TCp%}_no-Q_xq?k4y;L#_24N6W15~h0YlccW071c_Ap(fd zvK}O;uj3Q+VnVDE4IE~o5;5(vMv7$z z4zcj&uy>l<42{~fhn_@fiHa?LIdbC=t8Hi{S_*c9_IE(;qMuJhwnFvjNG&?D6TPzC zyL)1EHPAS7ZdGdZtJT3;{~J$`7-$~I{m&2z^){5g)$x4^olR6{YG+2Ci9$H| zYq)>Izjdx5D|LCOCJ$9FKm24*zWP)|-I4qLhvJW+OHCf^_K^?>{?$al+7eX$eO$d3 zl@2EbcG#47lkzn%o5Zv1n5nl6u7gj&Bxmq1u@;V5za$<^VGl+x z$a*Y}Do#)#IhndnagqwD$>bEpDR^^&wxbirzLRt2RG!FCu7{Cc;B0nIfCxFsw!48W zUwHnW{~f$h=6@5&UDW96-B{R|+vz&hP+qMogEeLFzP+o&ABW=qrII6cd7vf_+<$9V zKEER;tC#EXv08j=+un^QAN!L{2#zMyAPK`CM#~|j2ROnW8p6sy2v|AW`3w{pqJX>{ zGjiFMd@5tBuQ6;Y}{hi<>#<@uZk*{yfPYfmfTAUGctao`{IVvG?L e6b!^Rt9GBq82^F>en%fZlOi~UpCCqCj(-D*3$%a$ diff --git a/app/modules/rag/intent_router_v2/__pycache__/local_runner.cpython-312.pyc b/app/modules/rag/intent_router_v2/__pycache__/local_runner.cpython-312.pyc deleted file mode 100644 index bea058f81d839493ea57151478feadb601b4a9a4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1898 zcmah}&1)M+6rcT;Ex4#E6a|5uMOQ3}uuHB~m5Xv!DJoU9 zsB)R?YSlzBAs`W9v6ALyju4z$7vdkqJ`qhLTUkZ6x-NGA>C2*_JzKEKy#}fQUJAg`?2p2sjW8+-HiG12TUeEglC9XPEv+g=nT17%4_hjfuxAmcHXC{#CZ%oy+#WlF zWnrJ?-$s!TA(IOjSw{DSJcOm0ga>ViRQ9pEK-HM{+3jrh*`!skPgHAm=wg3@SmgEOms0$D+w%t%ZAPTvOxUSmu5|4AA;G5QmmJ4P z5!U&H)q*Cm7gjN0O{U)Xbb5MfmTI>w;yGTKFzir;$3>3;MzL$!VYO~n{F+Bq050}y zs#*4;<(06JB&;x0V_`bjr#gZDG)r-V@?^n>*5kD}KA$R%XX7QBdY&S*2#=k^Hrrc- zm5WNy2aVB};2z{m(foX6-jhkO?>sDvzRD15u+|JPW=Fs?B>es0Um$!zl zwXPp%e)4c?qwv{I!PzW08@Hm3g0od-fRven9348)J?1q4}4M zvRwZh6THS155G}7G3O114G+(%V$-B4(~QRsoOKhxWx27041y7I7RWusaI4e*Ewd6SvQFv8=%z)tMVc}~v~SL0YdAaBDz)|UPx zkUdEdgh%M~V>Iw5TG&JjkI;vIB!^p>o#gOla`^6hTgf+8)W6jMA@dXg;THb^?5^f0 diff --git a/app/modules/rag/intent_router_v2/__pycache__/logger.cpython-312.pyc b/app/modules/rag/intent_router_v2/__pycache__/logger.cpython-312.pyc deleted file mode 100644 index d40a1d55e8db758aa23e29d09f17e17071cccccc..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1643 zcmah}&2Jk;6rb4-#~W+D67y?ZIsxkLJ_I}2@s@6mZ<^*+1MS7;R|Q3zA~ z#Tm%cnH3Ld7PU$W*&?pCPh9;_$#dnQVig`^U{P6d!Z3=R*o#8Zv{ZTV-6$L|F4D|L zP+;=X2Vu;@csojB#>6zSwDiMG24yX8E$6tP3ZImhz|%OE$R|zUvufc)>2*F zRbbYJs#Q1-+=#ke#@jg+DOd?CP(`OlDOQ{&(fE*^A1>Wf{Ig%@3tVLc9@Gl+Ul5?w z$35o89^Iuv0qQlsGFO7|Fi*`W-cxV?|jEgzUd!S@UEWJ7U#7mhqc}lH0xMgzo zdBQ||+l&()zIj8KPCNDn%+3~KA`y(+u!s*a3Y@T;I9(<%aHF2%h3G!U`#+_oBvw%t z8Xs8(+3A()K3>+_Tb^>PSyI7jk z1PeN{{Inx^seML0wn*h;aFB`(1=Nbb8!};>t~vdFy%)Jjz(k!p-FkLJJLAG0+^Pqu zB5M7itbl9h)Qqm3m1Cxw+L=0DnfMsYJ@RvL@xkK##S^1*VqBXT*4VHfzCAWJ(rA5b zte+Sc9^AQq=PUom%ddR%&SYt0ytHw=R6jOeJu$9KjMcHRnmTJ^W9_f%La96jT++@p zjy}N~O*MKKoCET|8l}FDpPe7B@|`-<)9jh18qu1gtIyB~KEd1O4e>raV1tDs;mmeK z+w&}yR{@%%_T&X%mj$+)^!m0hqR>+K66Om$eZvBeVVeAT%#||+5qR|Ce-eykgb*f} zC;T2QzxI7+ve_7KHjY~M(Pra#^Ru6d4!;VEnpTlthFPj2=6o4Ejtbyc&>(l%4a!k! z%_wA+#$Un;a>Q5BybQ+DWzn`nr^jqtmTfyz4fuu)FTn}23SYtXCYWzYx_5dqUc@XK z{QU}KXP-=!qF(;=mz%T_=}MXKuZ^&%uP^hEmvy|)LNTYD;8NG zveTvQr>84*S)6HyX3eE9zi=S1F~xkkvL jlg_WDl`oekrIm4MGJQuIkhGp8M$A=XK9HxBtUpF*0zy|0fTF_ZxxS=4@}&W*HDtOc+YCDny?6 zQ*0Apn@g|_6x#w=R|&R}Vs`NasnUxEq^E| z_@fa519ZKY`aJyQ9$D9SsrL#N9Opb<&v4I(ho_kS;Y&k2c9PBS3}3q7=^f#R2CnqF z)w1TwNYC(ytna<#9U1Um^~l;Q?+uLfp2ubM4-9(vcX~$719Eie?4?0EKR@j0m-QDt zqx^_xcnGF2%t|8RqvD;YTos6fZ;3>rpT$e?d7^BX5@$(JiUtF7hUxiaGq%i4(u84n7NSXl$BCw`)W zUa~qE24chFNmN#gVZjTd^gJK-Pm4S+8+m>@BFu)cZ07k7XZ<0ig=lfG85+e94|D*w zktRe{@_Y%ed7d-__7SrIka;O~Uj^z(-Tshxr@K$Q#m|t)4KWav_*-vu`-3il1aFC9 zmw#r)1uX$llDe^BQVd7C0okprMd~L0$!=ITpm`FR1xdp3bS+ZXOpMgQyC|?hLBa+6 zA+uiH^x%BDx-&lb+*TF$EFS*Yo2j(Mdl#$k4U*mY0h<`X0TwQH0QNy6*sum{HVU>plSPwIEmYm(KEtKJ zm4EuoF{9fqn=a3aB&Kkgpp_#H0P=hviOq;I7e%O+qD0n!9zlOQb}{EfBQi?@qO6tZ z)BDm0{ao`dZzL?rI%#$s2hZ7xVw7*=B#^1!!bJ3vH4~wTKPnrkCj0rO144cCje9;s#Z zwEqr(V3-^R)FYLw4um9f0Ll`McezLhJY;Jiqc5Xxm$gKU&JtxQZVPFF35W~9E(EAK z1ZO5~2)Ym)L~sbf5d?YwvI$lrNz-CN!anyG7yUs%$lxW+Fv_N8knO>0JD z{aVFp4sNI!tqnoj?>ML`@5a||(vutm*^PgNmelx15L%EgesBC)Rg$tVYwjPQ}k9EX`@|lp;I$zU^fP<^Hv0 zr(k21O>WR16A7hUIs5b>Y~q6gal-tvCK{RHZ+hL@Z_&vzQeB3z1OYBmss*r#R28<5 zhd|HnT~NLeJ8u7t6VUQ)-&ne#=j2vfq6<3M?DZw`UTiZ8*hcpn*cnW+y%+Z8VKGXA zB3S+YUV4Y+DfNY%cN2hox5P=;8Xc?ZI zh0WOOHocmD@8Q@s1SpQ=5`y;;j3Ou_>{Y}eI0?6e)ZIi_hbw+@sXE2E%0;cAWtB@e zycs{g7)*0-DrCoLwkLZOT6QKo5LzQ@KUWtBjee9~F;83C4781I@mt!Aw2d0FnBHxW z?R}Ae^lBy)DNSi48-z%JzZnb*l5ED}Yf-$6&Xo4o;FAgJbUDR8KpcWzxTWI&N-6$j znM#)_d~@4sU%L5td~nH~=8h|5$GNsA`(H!L⪼0zW!gOeako#)r8U=qo^fj+D3Pb znAvTSYtP5VNl@5CNU~0dO#6djY0gSF)Z*SSCR>!<;6reMgQ7Iox1EIq|8_f_1@!ik zBI_m;(<&=cB3BRyY{NG(w1E~dmOJd-Mb#Y#3M*z4IY4b95wL`NM!87%5r+V6o`idU zsYrZT-~2F|u0H~f-e`(Dvfi=(abLQlCq9&@ZcA}J>m#Fy8{bcl+{K;wa*Df~X>i89 zOTB5%sc1A#yuBEp9p70DHf!|efD~$a8lF`8>H z_pcl9jS3@fVkv}R8bR6CHHA0?--TOx6F?~sp4TMNd>}5N8+{Mzq?gY2% z!I3nl1P^qc?MaTy`MpT41(GTRE)W+SVXfjogEnb%0jLE^x!@B@R&*(1Hg}a=H9+I) zVH#EsixT*>MKzmKAL=@!I1Ck1U`m|!^OyhucUCqk<7mXGRor4(KS}&EQ{a8cR>zG$rFs-sWU1YQ9EP&4Eo|IiKtIGABIQXQd-HCd0ysR7Oz|PYL?ExGzv@0 zco@M31e0)Y*$kgIw4h#qVF2c@@ROJ7+6OK|WDnfq)3II=N7Zbi;&l z9;cXU#dr^4Lq)E0F7PRIlw#B4k&xn(+H!qLT+_N7Dga^xQsNKu$^eOoFsmZ4Mu?`P zkii1!qM0uxA~0g04r>#{JDU;~CK#v2gvCLC%aD#hMJ&H=sLC-6)5rWk6;Mqw0o9nD zVHQ;LsvF$aUIKd)!Y+yZw0d53U-fA%$1JF!uexM3q^;;^?KY!T#nCtPTianq7tF{l zsG|5C^b*wf7@YsJTs`mVE@M5Ve3M^E`9Ioaspb{MXLwU!PyFR#<)cC1~dW1%@ambyq;nS-2Ne zw@XTHgO}zQi48gj*pf*=nHWgWu^T6#aFJnAwU{vwgavl{r3nlY@h{kAI1>7_hGSyv zKdEoCZWTchgOdcZ51ww7tm--_YjaiuwKA9RduccY$zw>mkTY`!wpgw%zihUNnCi)b=YR{O&-I#90R zY05qjh14aQIBE_h(u-X$A&3Kzb(10(DhLxot_Xt5imqHg{mN`ib zO<>lN?)HC#L(KG;BX5Rn$_x2`KP=!mj3~+WDZj+iPUz)=tA*zb%3`gMGuyn*IKC0R z$AW>+Iq7s&5*is-$))6Kbvf?L)xVN)_z_YNs2*oBorl*t&m=p~tabJ$JNtj-n0#>b zNyjfbf8Lq+U?O#4;z!zqV{*|9AoHERUpcQooOq)Bh3V&}#Cv?|JiqepPp-qG zlBz$uSn;g$;A(TK^X)Hso_2axDjt0Jw9ftH$lArRgTkL~@{+`m~W0J=Hy18AfE z6nP6ubJcscFm8|A_G&+kY7Ck}MOKT!(T)m4{v1c3)l_^iw10%kIRXi9OaN{2&iCxc zXb7D0{TWv~BrH#)xc2qEosWg|-rl%3Vc(tNdP`c`_CB_!+s-7onk7hlo>|}5{RNla z=SgtRm0*hVWNPb_3~61a)}fRfS*}iFR2GEG2*6#q&=b@mSS@JpF(tvX zlA0<8)}<*eB{fBJhcwzU4U01oU=SW<7G1cKK-!ScK1rKauYyIx7qA;fx_W^XRFkSJ zj9cxMIeO^I;UTQTkj-3qsXqm$FXMv$%$&XCRJj;kf@FTb-^ngo+=gYFB zSliy@@yqG9;hb~~uea`b%%xjTCph~OWG7E6LV(k4A|nR~xY&&_z@3GF9**P=7vZQx zn?EWM^bjMI9*#gxCBM~+2EhWqC~Q48G(y^|LatE!^gb~V#OSSr{~y9~lpO+(*ywqd zawb*uq+z4*OOfyg>LMZ|MRA^wpWN=<3KKlel ze1$}JYvKQa0q@{|*F%5cfWI$f{RBj3__v6xnS{gs8R$WO08xI@z#fo+3k#6(0S9nq z27Y01Yp7!c$JdIRBx|Pq(ZCec!$If(zdJ-DH^s1o#GqaW^*6{LLzRMmfr5l;30_5g zWBlARn`_PHPTJfL+y2qLT9vXL`I_N09gCVwm1BAT{rxNcKkZu7J*#P7t2vOYIq>kk zRLz@TGb%&Jq9;>nUpe=*vMpnEELYsGSegB$b@%Ty(DXtBGrTY|=IW(4mUu$k6F(zgqScN|^2y$Ik5jeGn)A?X{lAtk>^)oTSABI0q2!5Dy z%uMYb6=$l~C^^K9pc6;v0+Hz%@ZQMZBkCanjH#4^<+E7Avn(YUiFtmShNf8=nuSre zdfeWqwWK;%ECY|M%fOyqGGrNeWa~J#Qt4Bf zttbNRpy+}zA>W`4UfvtK(qI}nJz z@izSvBXlC2rg&Tf*Ji-jLMAeC7UggfV`-BtNfLr6$#|Ou?Z2r2?r-}|Ylpa2QYB~t znVwZ-sx8dBNTS|fG9ijZ(6Fq$ZP@9&#S_JK0I%N}b3QwJPxuYzOJ&J90Hd{XU4 zD`n@sv*&#H580PF&Zl}oJFi*kQaHPkZ6ES>%aC*6e5|~ZZtD!d3oLIIQ}P~wrt&6@ zrraJ}-Dn8cE`q;>C`w`zC5fq+c-50spe2v!PSDwUC*#znDLcN6AR$~gB%WFnJ&I;NiP8rvXEM3sX>6{MJ&cKMcJ~yfv>4?eFbJU6$g+c@(DayGf z1GCh!H2}37>?TXO#*A4lZP@_pEMK%Kll9H>bh9z`k;0KnQiI1ct61qUj@f$jOj;BYl`X*0ea-yS{;4OYAQ z9DiR;&NC79urBz+xNIi8jM_zJmHaTf#{fKqDfxBXGICVcMTf4toq!$E_2)$+>qb}) zFuX%dJ}wrPN^Pnj7+h|775yQq+VAGbaMULWXNqtjkTdyC1YuP8Qu$mVou#7V{zT%z zWbEGEsTh+qF6m`ywGKM--*T^Xn_Yo`d^mg*)Tx3o{*DGuP~b;b{~FsYt(Q&-QXi74 Z$NMtA9IvTLH(3h(4S8|@Zv?8&`46l+JrV!_ diff --git a/app/modules/rag/intent_router_v2/__pycache__/normalization.cpython-312.pyc b/app/modules/rag/intent_router_v2/__pycache__/normalization.cpython-312.pyc deleted file mode 100644 index 55bd0d473e8b9d515d7278fc01748f1ebc1105d1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4093 zcma)8O>7&-6`uVewG=6@Ezu%v*Y=uLEUjdbP8>J2I64ZEdXx%J+}fqcIMlZ%C(J9MuN3`3DN2Riq$=ilYQIMNy